Skip to content

fix(spec): switch off the Sui and Concordium gRPC stream methods the router does not serve (MAG-5178) - #210

Open
avitenzer wants to merge 2 commits into
mainfrom
fix/MAG-5178-switch-off-unserved-stream-methods
Open

avitenzer wants to merge 2 commits into
mainfrom
fix/MAG-5178-switch-off-unserved-stream-methods

Conversation

@avitenzer

@avitenzer avitenzer commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

What

Eight gRPC methods answer with a stream of replies, and the specs did not mark them as subscriptions. They are switched off ("enabled": false):

Spec Method Shape
SUI sui.rpc.v2.LedgerService/ListCheckpoints server stream
SUI sui.rpc.v2.LedgerService/ListTransactions server stream
SUI sui.rpc.v2.LedgerService/ListEvents server stream
CONCORDIUM concordium.v2.Queries/GetAccountList server stream
CONCORDIUM concordium.v2.Queries/GetAncestors server stream
CONCORDIUM concordium.v2.Queries/GetBakerList server stream
CONCORDIUM concordium.v2.Queries/GetBlockItems server stream
CONCORDIUM concordium.v2.Queries/DryRun two-way stream

Why

The router serves a gRPC server stream only when the spec names it as a subscription. It sent these as single-reply calls:

  • With the method's definition known, it refused the call inside a provider attempt and counted the provider as failed.
  • Without it, a reply of two or more items ended in grpc-go's "cardinality violation". The router took that for a call that never reached the node: it retried it on every provider and counted each one as unreachable.

Switched off, the call is refused when it is parsed, before any provider is asked. The subscribe methods (SubscribeCheckpoints and the rest) stay served. Serving the list methods properly needs a stream path of its own: marking them as subscriptions would share one stream between callers and re-send the request after an error, so a caller could miss items or get them twice.

Tested

  • Both files parse. My commit is these eight enabled values; the pipeline's commit is below.
  • Loaded SUI, SUIT, SUID, CONCORDIUM and CONCORDIUMT through the router's spec expansion (keeper.GetSpecFromLocalDirs) and parsed each method with the gRPC chain parser. All eight are refused ("api is disabled") in all five specs: SUIT and SUID take the switch-off from SUI, and CONCORDIUMT from CONCORDIUM. GetCheckpoint, SubscribeCheckpoints and GetConsensusInfo still parse. On this repo's main, all eight parse in all five.
  • Live, a router with this branch's specs in front of fullnode.mainnet.sui.io:443: ListCheckpoints is refused without a provider being asked, and GetServiceInfo is served.
  • check_disabled_count.sh on each file reports exactly these methods; check_chain_identity.sh passes.

What the caller gets

On router main, a switched-off gRPC method comes back as UNKNOWN. The router change that makes it UNIMPLEMENTED is in review separately (smart-router, the gRPC call-type refusal). Two spec files change, so the disabled-count guard runs report-only.

The pipeline's commit

The spec pipeline's fix pass committed 7594ebe5: the three Sui SubscriptionService/Subscribe* methods go from 20 to 1000 compute units. Every other subscribe method in the repo is priced at 1000, and its smoke re-probe still received messages on all three through the router. I kept it.

It also flagged two items it did not change, both already on main. Neither is in this PR:

  • Concordium's GetBlocks and GetFinalizedBlocks are server streams that never end, and they are still enabled. It could not check them through the router, because the public Concordium nodes serve no reflection.
  • The Sui JSON-RPC collection is still enabled, though Sui's public JSON-RPC is deprecated.

Jira ticket: MAG-5178

🤖 Generated with Claude Code

…router does not serve (MAG-5178)

Eight gRPC methods answer with a stream of replies, and the specs did not
mark them as subscriptions:

- SUI: sui.rpc.v2.LedgerService/ListCheckpoints, ListTransactions and
  ListEvents.
- CONCORDIUM: concordium.v2.Queries/GetAccountList, GetAncestors,
  GetBakerList, GetBlockItems, and DryRun (a two-way stream).

The router sent such a call to a provider as a one-reply call. With the
method's definition known, it refused it inside the provider attempt and
counted the provider as failed. Without it, a reply of two or more items
ended in a "cardinality violation" from the gRPC library, also counted
against the provider. Switched off, the call is refused when it is parsed,
before any provider is asked.

SUIT and SUID import SUI, and CONCORDIUMT imports CONCORDIUM. They take the
switch-off with the import: checked by loading all five specs through the
router's spec expansion and parsing each method. The subscribe methods
(SubscribeCheckpoints and the rest) stay served.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@magmadevs-bot

Copy link
Copy Markdown
Contributor

🤖 Spec pipeline started on PR open — running Phase 8 → 11. Results post here as comments. View run

@avitenzer

Copy link
Copy Markdown
Contributor Author

The router side is Magma-Devs/smart-router#764: with it, a call to a switched-off gRPC method gets UNIMPLEMENTED instead of UNKNOWN.

🤖 Generated with Claude Code

@magmadevs-bot

Copy link
Copy Markdown
Contributor

Phase 8 — smart-router boot + probe (SUI / SUIT)

Resumable run, Phases 8–11. Endpoints self-researched (no MAINNET_URLS/TESTNET_URLS supplied).

PARSE OK (PARSE_BLOCKNUM OK on grpc + graphql, mainnet and testnet; PARSE_BLOCK_BY_NUM NOT_EXERCISED — the router's fetch_block_* metric is dead and no tracker hash-read line was emitted)
VERIFY OK (chain-id verified on every provider, mainnet and testnet)
ADDONS none declared (jq-confirmed: no add_on, no extension)
Counts PASS=52, PASS-existence=8, PASS(expected-refusal)=3, FAIL=0, SKIP=2 (stateful), UNPROBED=0, WARN=0, TIMEOUT=0, LOG_WARN=0 — 28/28 grpc apis, 37/37 graphql apis
TESTNET_VERIFY OK
BLOCK_TIME mainnet=241.8 ms (spec 222, +8.9%), testnet=213.7 ms (spec 222, −3.7%) — no mismatch
Teardown sr_sui, sr_sui_testnet both removed

The four claims this PR makes — all CONFIRMED:

  1. ListCheckpoints / ListEvents / ListTransactions, called through the router on both SUI and SUIT, return Code: Unknown "api is disabled", with relay_end logging outcome: "rejected_before_dispatch", attempts: [], served_by: "" — no provider was asked.
  2. SubscribeCheckpoints / SubscribeTransactions / SubscribeEvents, opened as gRPC server streams through the router, each produced multiple messages inside the 30 s window — still served.
  3. The other 21 grpc unary methods and all 36 non-mutating graphql fields are unaffected (2 stateful methods correctly skipped).
  4. Inheritance is empirical, not inferred: SUIT declares no apis of its own and a through-router call against SUIT reproduced the identical api is disabled refusal.

Interface coverage note: the whole jsonrpc interface came back NOT_TESTABLE. Sui's public JSON-RPC was deprecated fleet-wide (July 2026, code removal October 2026) — Mysten's own fullnodes, BlockVision, PublicNode, Ankr, BlastAPI, GetBlock, Tatum and Inodra all return a deprecation error or demand a paid key. Not a defect of this PR; carried forward as a transparent gap (and see the Phase 9/11 notes).

Correction to a pipeline assumption, worth recording: this router build does expose grpc.reflection.v1.ServerReflection on its gRPC listener, contrary to the tester guide's note. That is why the disabled methods and the subscriptions could be probed through the router rather than from logs alone — strictly stronger evidence.


Sui Smart-Router Method Probe Report

  • Timestamp (UTC): 2026-11-19T07:36:00Z – 2026-11-19T07:42:05Z
  • Router image: ghcr.io/magma-devs/smart-router:main (sha256:742ca755283d28e8ebc035269439f6fe63cf53a14fb82210caebec11c2ce461d)
  • Configs: /tmp/sr_sui.yml (mainnet), /tmp/sr_sui_testnet.yml (testnet)
  • Spec under test: working-tree sui.json (branch fix/MAG-5178-switch-off-unserved-stream-methods, commit 484cb84)
  • Spec variant: SUI — grpc (28 apis) + graphql (37 apis). jsonrpc (54 apis) not booted — see "Interface coverage".
  • Upstreams probed:
    • mainnet grpc: grpcs://fullnode.mainnet.sui.io:443 (SINGLE_UPSTREAM — the only public Sui gRPC endpoint)
    • mainnet graphql: https://graphql.mainnet.sui.io/graphql
    • testnet grpc: grpcs://fullnode.testnet.sui.io:443
    • testnet graphql: https://graphql.testnet.sui.io/graphql

PR under test

PR #210 sets "enabled": false on three SUI gRPC server-stream methods the router cannot serve as single-reply calls: sui.rpc.v2.LedgerService/ListCheckpoints, ListTransactions, ListEvents. Nothing else in sui.json changes. This report specifically verifies: (1) the three are refused by the router before any provider is asked, (2) the three SubscriptionService/Subscribe* methods (which carry FUNCTION_TAG_SUBSCRIBE) stay served, (3) ordinary unary methods are unaffected, (4) SUIT/SUID inherit the switch-off via imports: ["SUI"].

Step 3.5 — Parse-directive & verification runtime check (mainnet)

Directive Evidence Classification
PARSE_BLOCKNUM rpc_endpoint_latest_block{grpc}=3.468495e+08, {graphql}=3.46849498e+08; fetch_latest_success grpc=76, graphql=45; both growing over the run OK
PARSE_BLOCK_BY_NUM no fetch_block_* metric emitted (dead in current router, as documented) and no Chain Tracker Updated block hashes / read a block Hash log line found NOT_EXERCISED

No parse-failure signatures ($PARSE_SIG) found in the boot/run window.

Verification Result
chain-id (grpc, expected 4btiuiMPvEENsttpZC7CZ53DruC3MAgfznDbASZ7DR6S) OK — "[+] verified successfully", rawData matches
chain-id (graphql, same expected value) OK — "[+] verified successfully", rawData matches

No [-] verify, no failed verification on provider startup, no Bad verification definition lines. VERIFY: OK.

Addon & extension coverage

jq '.. | objects | .add_on?'   → (empty)
jq '.. | objects | .extension?' → (empty)

ADDONS: none declared. Confirmed by direct jq query, not assumed.

Per-method table

gRPC (direct-upstream unless noted) — grpcs://fullnode.mainnet.sui.io:443

Method Interface Path Classification Upstream notes Notes
sui.rpc.v2.LedgerService/ListCheckpoints grpc through-router (localhost:3360) PASS (expected-refusal) n/a Router returned Code: Unknown, Message: "...failed to getSupportedApi gRPC ErrMsg: api is disabled {apiKey:{Name:sui.rpc.v2.LedgerService/[redacted]...}}". Log relay_end shows outcome:"rejected_before_dispatch", served_by:"", attempts:[], latency 363.8µs — no provider was ever asked.
sui.rpc.v2.LedgerService/ListEvents grpc through-router PASS (expected-refusal) n/a Same api is disabled / rejected_before_dispatch evidence.
sui.rpc.v2.LedgerService/ListTransactions grpc through-router PASS (expected-refusal) n/a Same api is disabled / rejected_before_dispatch evidence.
sui.rpc.v2.SubscriptionService/SubscribeCheckpoints grpc through-router (gRPC server stream, localhost:3360) PASS n/a ≥5 checkpoint messages received within 30s window.
sui.rpc.v2.SubscriptionService/SubscribeTransactions grpc through-router PASS n/a Watermark + transaction messages received within 30s window.
sui.rpc.v2.SubscriptionService/SubscribeEvents grpc through-router PASS n/a Watermark + event messages received within 30s window.
sui.rpc.v2.LedgerService/GetServiceInfo grpc direct-upstream PASS chainId, epoch, checkpointHeight returned
sui.rpc.v2.LedgerService/GetCheckpoint grpc direct-upstream PASS live sequence_number=346849654
sui.rpc.v2.LedgerService/GetObject grpc direct-upstream PASS object_id=0x5 (System State)
sui.rpc.v2.LedgerService/BatchGetObjects grpc direct-upstream PASS object_id=0x5
sui.rpc.v2.LedgerService/BatchGetTransactions grpc direct-upstream PASS live tx digest 6DaJKwKBqWLgPqBbE6LaKfKUWGeJGJcXJpLvPUaML9uB
sui.rpc.v2.LedgerService/GetTransaction grpc direct-upstream PASS same live digest
sui.rpc.v2.LedgerService/GetEpoch grpc direct-upstream PASS latest epoch 1316
sui.rpc.v2.MovePackageService/GetPackage grpc direct-upstream PASS package_id=0x2
sui.rpc.v2.MovePackageService/GetFunction grpc direct-upstream PASS 0x2::coin::value
sui.rpc.v2.MovePackageService/GetDatatype grpc direct-upstream PASS 0x2::coin::Coin
sui.rpc.v2.MovePackageService/ListPackageVersions grpc direct-upstream PASS package_id=0x2
sui.rpc.v2.NameService/LookupName grpc direct-upstream PASS example.sui resolved to a record
sui.rpc.v2.NameService/ReverseLookupName grpc direct-upstream PASS-existence live sender address 0x1e63...a64 NotFound — address has no SuiNS reverse record; method reachable, well-formed request
sui.rpc.v2.SignatureVerificationService/VerifySignature grpc direct-upstream PASS-existence InvalidArgument: missing signature scheme flag on a syntactically-minimal signature — method dispatched, rejects malformed input
sui.rpc.v2.StateService/GetBalance grpc direct-upstream PASS live address, 0x2::sui::SUI
sui.rpc.v2.StateService/GetCoinInfo grpc direct-upstream PASS 0x2::sui::SUI
sui.rpc.v2.StateService/ListBalances grpc direct-upstream PASS live address
sui.rpc.v2.StateService/ListDynamicFields grpc direct-upstream PASS parent=0x5
sui.rpc.v2.StateService/ListOwnedObjects grpc direct-upstream PASS live address
sui.rpc.v2.TransactionExecutionService/ExecuteTransaction grpc — SKIP category.stateful=1 would broadcast a transaction
sui.rpc.v2.TransactionExecutionService/SimulateTransaction grpc direct-upstream PASS-existence InvalidArgument: error converting from protobuf ... unexpected end of input on minimal bcs — method dispatched, rejects malformed input
sui.rpc.v2alpha.ProofService/GetCheckpointObjectProof grpc direct-upstream PASS live checkpoint=346849654, object_id=0x5

Note: the smart-router's own gRPC listener unexpectedly does expose server reflection (grpc.reflection.v1.ServerReflection listed via grpcurl -plaintext localhost:3360 list), contrary to the general assumption in this phase's brief. This made it possible to call the three disabled methods and the three subscriptions directly through the router via grpcurl, which is why those six rows are labelled through-router rather than falling back to log-only evidence.

GraphQL (through-router, localhost:3361) — upstream https://graphql.mainnet.sui.io/graphql

Method Interface Path Classification Notes
chainIdentifier graphql through-router PASS
serviceConfig graphql through-router PASS
protocolConfigs graphql through-router PASS version 141
node graphql through-router PASS global ID resolved from a live object{id} lookup
address graphql through-router PASS live address
checkpoint graphql through-router PASS live sequence number
checkpoints graphql through-router PASS
coinMetadata graphql through-router PASS 0x2::sui::SUI
epoch graphql through-router PASS live epoch 1316
epochs graphql through-router PASS
events graphql through-router PASS empty page, valid response
nameRecord graphql through-router PASS example.sui
object graphql through-router PASS 0x2
objects graphql through-router PASS required filter arg supplied
objectVersions graphql through-router PASS
package graphql through-router PASS 0x2
packages graphql through-router PASS
packageVersions graphql through-router PASS
transaction graphql through-router PASS live tx digest
transactionEffects graphql through-router PASS live tx digest, status=SUCCESS
transactions graphql through-router PASS
type graphql through-router PASS 0x2::sui::SUI
multiGetAddresses graphql through-router PASS
multiGetBalances graphql through-router PASS
multiGetCheckpoints graphql through-router PASS
multiGetEpochs graphql through-router PASS
multiGetObjects graphql through-router PASS
multiGetPackages graphql through-router PASS
multiGetTransactions graphql through-router PASS
multiGetTransactionEffects graphql through-router PASS
multiGetTypes graphql through-router PASS
multiGetDerivedObjects graphql through-router PASS-existence per-item BAD_USER_INPUT ("Literal error") on a non-Move-literal dynamic-field name — schema-valid, server-dispatched
multiGetDynamicFields graphql through-router PASS-existence same as above
multiGetDynamicObjectFields graphql through-router PASS-existence same as above
simulateTransaction graphql through-router PASS-existence BAD_USER_INPUT: Invalid JSON-encoded gRPC Transaction on minimal bcs
verifySignature graphql through-router PASS-existence BAD_USER_INPUT: Cannot parse signature on minimal signature
executeTransaction graphql — SKIP category.stateful=1, mutation — would broadcast a transaction

Log-scan findings

Scanned the full probe window (docker logs sr_sui | tail -n +242) for warn|error|fatal|panic, excluding the documented benign set.

Finding Status
15 matching lines, all tied to the 3 expected-refusal calls (Failed to SendRelay ×3, UniqueGuidResponseForError ×3, failed to getSupportedApi gRPC ×6, grpc in/out ×3) Expected behaviour under test, not a defect (per the PR-specific exception)
No other method-associated or free-standing warn/error/fatal/panic lines —
No rate-limit (429) responses observed from either upstream during the whole run pacing was never engaged; all methods probed unpaced

Table intentionally otherwise empty — clean run.

Interface coverage

Interface Status Evidence
grpc Probed (28/28 apis: 24 through-router/direct PASS or PASS-existence, 3 PASS expected-refusal, 1 SKIP stateful) this report
graphql Probed (37/37 apis: 36 through-router PASS/PASS-existence, 1 SKIP stateful) this report
jsonrpc NOT_TESTABLE Carried forward from Phase 7.5: Sui's public JSON-RPC was deprecated fleet-wide (July 2026, code removal Oct 2026). Phase 7.5 searched Mysten fullnodes, BlockVision, PublicNode, Ankr, BlastAPI, GetBlock, Tatum, Inodra — every one returns an explicit deprecation error or demands a paid key. No jsonrpc listener was booted and no jsonrpc methods were probed in this phase.

Testnet verification pass (Step 7)

  • Config: /tmp/sr_sui_testnet.yml, chain-id: SUIT on endpoints and both direct-rpc blocks, upstreams grpcs://fullnode.testnet.sui.io:443 / https://graphql.testnet.sui.io/graphql, published on 3460/3461/7879.
  • Boot: clean, no fatal lines, grpc listener up within 1 poll iteration.
  • PARSE_BLOCKNUM: OK — rpc_endpoint_latest_block{grpc}=4.08232984e+08, {graphql}=4.08232982e+08, both with nonzero fetch_latest_success counters and growing over the run.
  • PARSE_BLOCK_BY_NUM: NOT_EXERCISED (same metric/log absence as mainnet).
  • chain-id verification (SUIT expected_value = 69WiPg3DAQiwdxfncX6wYQ2siKwAe6L9BZthQea3JNMD): OK on both grpc and graphql providers — "[+] verified successfully" with matching rawData.
  • No parse-failure signatures, no verify failures.
  • Inheritance of the switch-off: confirmed by direct through-router call, not spec-graph inference alone — ListCheckpoints/ListEvents/ListTransactions called against localhost:3460 (SUIT) all returned the identical api is disabled / Code: Unknown refusal seen on mainnet. This is strong evidence because SUIT's api_collections[].apis arrays are empty (confirmed via jq) — SUIT carries no api definitions of its own and resolves every method, including the disabled ones, purely through imports: ["SUI"].

TESTNET_VERIFY: OK

Empirical block time (Step 8)

Measured via direct gRPC LedgerService/GetCheckpoint timestamp delta over 100 checkpoints (GetServiceInfo.checkpointHeight as latest).

Network Spec average_block_time Empirical Deviation Flag
SUI (mainnet) 222 ms (346850769 − 346850669 checkpoints) → 24177 ms / 100 = 241.8 ms +8.9% within 20% — no mismatch
SUIT (testnet) 222 ms (own value, same as SUI; confirmed via jq, not merely inherited) (408233048 − 408232948 checkpoints) → 21372 ms / 100 = 213.7 ms −3.7% within 20% — no mismatch

@magmadevs-bot

Copy link
Copy Markdown
Contributor

Phase 8 — smart-router boot + probe (CONCORDIUM / CONCORDIUMT)

PARSE PARTIAL — rest mainnet tracked normally (rpc_endpoint_latest_block{apiInterface="rest"} ≈ 54,488,042 and climbing). grpc (mainnet + testnet) never got a healthy provider, so its directives were never exercised
VERIFY FAIL — chain-id fails on the single grpc provider of both networks with Symbol not found: concordium.v2.Queries; pruning NOT_EXERCISED (same gate)
ADDONS 1 tested-ok / 0 failed / 0 not-testable — archive confirmed: GetBlockInfo(height=1).parentBlock == genesisBlock, i.e. unpruned to height 1
Counts PASS=82, FAIL=1, SKIP=7, UNPROBED=0, WARN=6, TIMEOUT=0, LOG_WARN=0
TESTNET_VERIFY PARTIAL — clean boot, no fatal/panic; the CONCORDIUMT chain-id value independently confirmed correct by direct probe; the router-level check itself blocked by the same gap as mainnet
BLOCK_TIME mainnet=2000 ms, testnet=2000 ms — both match the spec's average_block_time: 2000 exactly
Teardown sr_concordium, sr_concordium_testnet both removed

Why PARSE is PARTIAL and VERIFY is FAIL — and why neither is a defect in this PR. The public Concordium gRPC endpoints do not expose server reflection for concordium.v2.Queries, and the router's generic gRPC provider needs reflection to build chain-messages. So no grpc provider passed startup verification, and everything downstream of that on the grpc interface went unexercised. Direct grpcurl -proto probes against the same upstreams show the spec itself is right: GetConsensusInfo and GetBlockInfo answer correctly, and the chain-id expected_value matches the live genesis-block hash exactly on both mainnet and testnet. The failing input is the upstream's reflection surface, not the spec — recorded honestly as VERIFY: FAIL rather than quietly downgraded, and carried into Phase 9 with that diagnosis.

The four claims this PR makes — all CONFIRMED:

  1. All five methods (GetAccountList, GetAncestors, GetBakerList, GetBlockItems, DryRun) return Code: Unknown / "api is disabled" from getSupportedApi, logging "outcome":"rejected_before_dispatch" — no provider contacted, on both networks.
  2. Ordinary unary methods are untouched: through-router they get "No pairings available." (the reflection gap), a categorically different outcome from "api is disabled".
  3. CONCORDIUMT has 0 own apis and imports CONCORDIUM; the through-router probe on the testnet instance reproduces the identical refusal for the same five methods.
  4. The official concordium-grpc-api service.proto declares all five as streams (four returns (stream X), DryRun bidirectional), and the upstream was directly observed emitting multiple stream messages for GetAccountList — so switching them off, rather than marking them subscriptions, is the right call.

One finding beyond the PR's scope, flagged for review: about 20 further spec-enabled grpc methods are also genuine server streams per the proto (GetTokenList, GetInstanceList, GetPoolDelegators, …) but behave acceptably as bounded one-shot collects. GetBlocks and GetFinalizedBlocks, however, are perpetual, never-terminating streams — structurally the same problem this PR fixes — and remain enabled: true. Through-router behaviour for them could not be verified here (no healthy grpc provider), so this is unverified and left for Phase 9/10 to weigh rather than silently widened into this PR.

The one FAIL (GetAccountTransactionV1SignHash) returns Unimplemented upstream regardless of input — a pre-existing upstream gap, unrelated to this PR. The six WARNs (/v0,v1/appSettings, /v0,v1/CIS2TokenMetadata, /v0,v1/CIS2TokenBalance) are probe-input-shape artifacts: the requests reached the upstream correctly.


Concordium Smart-Router Method Probe Report

  • Timestamp (UTC): 2026-11-19T07:47:16Z
  • Router image: ghcr.io/magma-devs/smart-router@sha256:742ca755283d28e8ebc035269439f6fe63cf53a14fb82210caebec11c2ce461d
  • Router configs: /tmp/sr_concordium.yml (mainnet), /tmp/sr_concordium_testnet.yml (testnet)
  • Spec variant: CONCORDIUM (grpc + rest) and CONCORDIUMT (grpc only, inherits from CONCORDIUM via imports)
  • Upstreams probed:
    • grpc mainnet: grpcs://grpc.mainnet.concordium.software:20000 (SINGLE_UPSTREAM)
    • rest mainnet: https://wallet-proxy.mainnet.concordium.software
    • grpc testnet: grpcs://grpc.testnet.concordium.com:20000 (SINGLE_UPSTREAM)
  • PR under test: fix(spec): switch off the Sui and Concordium gRPC stream methods the router does not serve (MAG-5178) #210 — sets enabled: false on 5 CONCORDIUM gRPC methods: GetAccountList, GetAncestors, GetBakerList, GetBlockItems, DryRun.

Important environment finding (read before the tables below)

The public mainnet and testnet Concordium gRPC endpoints do not expose concordium.v2.Queries over gRPC server reflection (grpcurl list on both only returns concordium.health.Health, grpc.health.v1.Health, grpc.reflection.v1alpha.ServerReflection). The smart-router's generic gRPC provider builds its chain-messages via descriptorSource.FindSymbol against the upstream's reflection service, so every grpc verification/chain-tracker call to these two particular public upstreams fails with Symbol not found: concordium.v2.Queries, and the single configured provider is excluded on both chains ("no healthy providers for endpoint"). This is not a defect in this PR's diff — directly-addressed calls using an explicit .proto descriptor (bypassing reflection) work perfectly against the same upstream (see GetConsensusInfo/GetBlockInfo results below), and the chain-id value matches the spec's expected_value exactly on both networks. It does mean: (a) through-router probing of ordinary unary methods on this grpc interface returns "No pairings available." rather than a real reply in this environment, and (b) PARSE_BLOCKNUM/PARSE_BLOCK_BY_NUM could not be exercised for grpc. The REST interface has no such dependency and tracked normally.

Crucially, this limitation does not block the actual thing this phase needs to confirm: the disabled-method check happens in getSupportedApi before any provider/reflection step, so it is fully testable and produced clean, unambiguous evidence (see below).

Step 3.5 — Parse-directive & verification runtime check

Directive grpc (mainnet) rest (mainnet) grpc (testnet)
PARSE_BLOCKNUM NOT_EXERCISED — no rpc_endpoint_latest_block{apiInterface="grpc"} series at all; root cause is the chain-id verification failure below (provider never admitted), not a directive defect (confirmed via direct protobuf probe: GetConsensusInfo.bestBlockHeight returns correctly) OK — rpc_endpoint_latest_block{...rest...} ≈ 54,488,042 and climbing, fetch_latest_success=57+ NOT_EXERCISED — same cause as mainnet grpc
PARSE_BLOCK_BY_NUM NOT_EXERCISED — same cause not wired for rest (no GET_BLOCK_BY_NUM rest directive observed) NOT_EXERCISED

No PARSE_SIG lines (failed to parse response, ParseBlockHashFromReplyAndDecode, etc.) appeared in either log — the only startup/runtime signatures are the reflection Symbol not found ones described above.

Verification outcomes (grpc-only; rest collections carry no verifications):

Verification Mainnet Testnet
chain-id VERIFY: FAIL (environment-caused) — fails on the only provider with descriptorSource.FindSymbol ErrMsg: Symbol not found: concordium.v2.Queries. Not a wrong expected_value: direct grpcurl -proto probe against the same upstream returned genesisBlock.value = "ndnKTRnpOTh30sRLcPiay/wIg8IkPl7q7MDRzQUD9Hg=", matching the spec's expected_value exactly. VERIFY: FAIL (environment-caused), same mechanism. Direct probe against grpc.testnet.concordium.com:20000 returned genesisBlock.value = "QiEzLTThaUFowqDAs/0PJzgJYSyxPQANXC4A6F9Q95Y=", matching CONCORDIUMT's expected_value exactly.
pruning NOT_EXERCISED — gated behind the same failing provider (GET_BLOCKNUM failed sending chainMessage precedes it); never reached the GetBlockInfo/absoluteHeight call itself. Directly verified instead (see Addon table). not declared at testnet level (inherited structurally but never reached for the same reason)

Addon & extension coverage

Name Type Upstreams supporting Standalone Boot verification Router probe Classification
archive extension (cu_multiplier: 5, rule.block: 1800) on the single grpc collection grpc.mainnet.concordium.software:20000 No (ordinary extension — same collection serves base + archive, no disjoint add-on collection exists in this spec) Never reached — provider excluded before the pruning verification (gated on archive) runs, due to the reflection issue above TESTED_OK direct-to-upstream: GetBlockInfo(absolute_height=1).parentBlock = "ndnKTRnpOTh30sRLcPiay/wIg8IkPl7q7MDRzQUD9Hg=", which equals GetConsensusInfo.genesisBlock — height-1 block's parent is genesis itself, i.e. unpruned history back to the first block TESTED_OK (via direct probe; boot-level verification itself NOT_TESTABLE in this environment)

Per-method table

The five PR-disabled stream methods are listed first.

Method Interface Path Classification Upstream notes Notes
concordium.v2.Queries/GetAccountList grpc through-router PASS (expected-refusal) upstream genuinely streams (confirmed: multiple AccountAddress messages return directly from upstream) Router returns Code: Unknown / "api is disabled {...}" from getSupportedApi; log shows "outcome":"rejected_before_dispatch" — no provider contacted
concordium.v2.Queries/GetAncestors grpc through-router PASS (expected-refusal) proto: returns (stream BlockHash) same api is disabled / rejected_before_dispatch evidence
concordium.v2.Queries/GetBakerList grpc through-router PASS (expected-refusal) proto: returns (stream BakerId) same evidence
concordium.v2.Queries/GetBlockItems grpc through-router PASS (expected-refusal) proto: returns (stream BlockItem) same evidence
concordium.v2.Queries/DryRun grpc through-router PASS (expected-refusal) proto: rpc DryRun (stream DryRunRequest) returns (stream DryRunResponse) — genuinely bidirectional same evidence
concordium.v2.Queries/GetConsensusInfo grpc direct-upstream PASS unary Through-router returns "No pairings available." (provider-health issue above), not api is disabled — confirms this method is treated as a normal, enabled method, unaffected by the PR
concordium.v2.Queries/GetBlockInfo grpc direct-upstream PASS unary —
concordium.v2.Queries/GetBlocks grpc direct-upstream PASS stream, enabled — left untouched by this PR proto: returns (stream ArrivedBlockInfo), a perpetual/never-terminating stream; see "Additional finding" below
concordium.v2.Queries/GetFinalizedBlocks grpc direct-upstream PASS stream, enabled — left untouched by this PR proto: returns (stream FinalizedBlockInfo), same perpetual-stream shape as GetBlocks
concordium.v2.Queries/GetAccountInfo grpc direct-upstream PASS unary re-probed with live account + accountIdentifier.address field name
concordium.v2.Queries/GetTokenInfo grpc direct-upstream PASS unary re-probed with real token id t-USDT from GetTokenList
concordium.v2.Queries/GetTokenList grpc direct-upstream PASS stream, enabled — not in this PR's scope
concordium.v2.Queries/GetModuleList grpc direct-upstream PASS stream, enabled — not in this PR's scope
concordium.v2.Queries/GetModuleSource grpc direct-upstream PASS unary re-probed with real module ref
concordium.v2.Queries/GetInstanceList grpc direct-upstream PASS stream, enabled
concordium.v2.Queries/GetInstanceInfo grpc direct-upstream PASS unary
concordium.v2.Queries/GetInstanceState grpc direct-upstream PASS stream, enabled
concordium.v2.Queries/InstanceStateLookup grpc direct-upstream PASS unary
concordium.v2.Queries/GetNextAccountSequenceNumber grpc direct-upstream PASS unary
concordium.v2.Queries/GetBlockItemStatus grpc direct-upstream PASS unary re-probed with real tx hash found in a recent block
concordium.v2.Queries/GetCryptographicParameters grpc direct-upstream PASS unary
concordium.v2.Queries/GetPoolInfo grpc direct-upstream PASS unary
concordium.v2.Queries/GetPassiveDelegationInfo grpc direct-upstream PASS unary
concordium.v2.Queries/GetBlocksAtHeight grpc direct-upstream PASS unary
concordium.v2.Queries/GetTokenomicsInfo grpc direct-upstream PASS unary
concordium.v2.Queries/InvokeInstance grpc direct-upstream PASS unary invalid entrypoint used deliberately; router/upstream returned a well-formed invalidReceiveMethod failure payload, proving the RPC itself works
concordium.v2.Queries/GetPoolDelegators grpc direct-upstream PASS stream, enabled empty result set (no delegators at that pool/block) — valid, not a failure
concordium.v2.Queries/GetPoolDelegatorsRewardPeriod grpc direct-upstream PASS stream, enabled empty result set
concordium.v2.Queries/GetPassiveDelegators grpc direct-upstream PASS stream, enabled
concordium.v2.Queries/GetPassiveDelegatorsRewardPeriod grpc direct-upstream PASS stream, enabled
concordium.v2.Queries/GetBranches grpc direct-upstream PASS unary
concordium.v2.Queries/GetElectionInfo grpc direct-upstream PASS unary
concordium.v2.Queries/GetIdentityProviders grpc direct-upstream PASS stream, enabled
concordium.v2.Queries/GetAnonymityRevokers grpc direct-upstream PASS stream, enabled
concordium.v2.Queries/GetAccountNonFinalizedTransactions grpc direct-upstream PASS stream, enabled empty result set
concordium.v2.Queries/GetBlockTransactionEvents grpc direct-upstream PASS stream, enabled empty at best; non-empty confirmed at an older block with real transactions
concordium.v2.Queries/GetBlockSpecialEvents grpc direct-upstream PASS stream, enabled
concordium.v2.Queries/GetBlockPendingUpdates grpc direct-upstream PASS stream, enabled empty result set
concordium.v2.Queries/GetNextUpdateSequenceNumbers grpc direct-upstream PASS unary
concordium.v2.Queries/GetScheduledReleaseAccounts grpc direct-upstream PASS stream, enabled
concordium.v2.Queries/GetCooldownAccounts grpc direct-upstream PASS stream, enabled
concordium.v2.Queries/GetPreCooldownAccounts grpc direct-upstream PASS stream, enabled empty result set
concordium.v2.Queries/GetPrePreCooldownAccounts grpc direct-upstream PASS stream, enabled
concordium.v2.Queries/GetBakerEarliestWinTime grpc direct-upstream PASS unary
concordium.v2.Queries/GetAccountTransactionSignHash grpc direct-upstream PASS-existence unary InvalidArgument: missing field with an empty draft transaction — needs a full unsigned-tx payload to go further; method is reachable
concordium.v2.Queries/GetAccountTransactionV1SignHash grpc direct-upstream FAIL (upstream UNIMPLEMENTED) unary upstream itself returns Code: Unimplemented regardless of body — input-independent, not a probe-setup artifact; pre-existing upstream limitation, unrelated to this PR
concordium.v2.Queries/GetBlockChainParameters grpc direct-upstream PASS unary
concordium.v2.Queries/GetBlockFinalizationSummary grpc direct-upstream PASS unary
concordium.v2.Queries/GetBakersRewardPeriod grpc direct-upstream PASS stream, enabled
concordium.v2.Queries/GetBlockCertificates grpc direct-upstream PASS unary
concordium.v2.Queries/GetWinningBakersEpoch grpc direct-upstream PASS stream, enabled re-probed with correct relative_epoch field name
concordium.v2.Queries/GetFirstBlockEpoch grpc direct-upstream PASS unary re-probed with correct relative_epoch field name
concordium.v2.Queries/GetConsensusDetailedStatus grpc direct-upstream PASS unary
concordium.v2.Queries/SendBlockItem grpc — SKIP category.stateful: 1 would broadcast a transaction
/v0/accBalance/{account address} ... /v2/accBalance/{account address} rest through-router PASS (×3) live account address derived from a real on-chain account (base58check-encoded)
/v0/accNonce/{account address} rest through-router PASS
/v0/accEncryptionKey/{account address} rest through-router PASS
/v0/transactionCost rest through-router PASS re-probed with ?type=simpleTransfer
/v0/submissionStatus/{...} rest through-router PASS {"status":"absent"} for a made-up hash — valid response shape
/v0/accTransactions/{...} ... /v3/accTransactions/{...} rest through-router PASS (×4) empty transaction list — valid
/v0/global rest through-router PASS
/v0/ip_info, /v1/ip_info, /v2/ip_info rest through-router PASS (×3)
/v0/bakerPool/{bakerId} rest through-router PASS
/v0/chainParameters rest through-router PASS
/v0/nextPayday rest through-router PASS
/v0/passiveDelegation rest through-router PASS
/v0/appSettings, /v1/appSettings rest through-router WARN upstream 400 "'version' parameter is not present or readable. It must be a non-negative integer." even with ?platform=android&version=1 — likely an undocumented exact param shape (e.g. semver string); request reached the upstream correctly (not a router/spec routing defect)
/v0/termsAndConditionsVersion rest through-router PASS
/v0/epochLength rest through-router PASS
/v0/CIS2Tokens/{index}/{subindex} rest through-router PASS empty list at contract 1/0 (not a CIS2 contract) — valid
/v0/CIS2TokenMetadata/{index}/{subindex}, /v1/... rest through-router WARN ?tokenId=00 accepted syntactically, then "Invoking a contract failed." — contract 1/0 is not a real CIS2 instance; endpoint logic reached, no real CIS2 contract index available to fully validate
/v0/CIS2TokenBalance/{index}/{subindex}/{account address}, /v1/... rest through-router WARN same as above
/v0/plt/tokens rest through-router PASS
/v0/plt/tokenInfo/{tokenId} rest through-router PASS t-USDT
/v0/keyAccounts/{public key} rest through-router PASS empty list for a zero key — valid
/v0/genesisHash rest through-router PASS
/v0/consensusInfo rest through-router PASS
/v0/blockInfo/{blockHash} rest through-router PASS hex block hash
/v0/blocksAtHeight/{blockHeight} rest through-router PASS
/v0/blockTransactionEvents/{blockHash} rest through-router PASS empty at that block — valid
/v0/submitCredential, /v0/submitTransfer, /v0/submitExtended, /v0/submitRawTransaction, /v0/testnetGTUDrop/{...} rest PUT — SKIP (×5) category.stateful: 1 would broadcast transactions
/v0/transakOnRamp rest POST — SKIP category.stateful: 1 would initiate an on-ramp transaction

Additional finding beyond the PR's stated scope (flagged, not a required claim)

The spec leaves roughly 20 other grpc methods enabled: true that are also genuine server-streaming RPCs per the official proto (GetBlocks, GetFinalizedBlocks, GetTokenList, GetModuleList, GetInstanceList, GetInstanceState, GetPoolDelegators, GetPoolDelegatorsRewardPeriod, GetPassiveDelegators, GetPassiveDelegatorsRewardPeriod, GetIdentityProviders, GetAnonymityRevokers, GetAccountNonFinalizedTransactions, GetBlockTransactionEvents, GetBlockSpecialEvents, GetBlockPendingUpdates, GetScheduledReleaseAccounts, GetCooldownAccounts, GetPreCooldownAccounts, GetPrePreCooldownAccounts, GetBakersRewardPeriod, GetWinningBakersEpoch). Each of these responded correctly when called direct-to-upstream with a normal single invocation (the upstream happily returns a bounded stream of items for a unary-style client that just reads to completion), which is presumably why they were left enabled — a bounded server stream can be collected into one reply, whereas the 5 disabled methods are either effectively unbounded (GetAccountList, GetBakerList, GetBlockItems over all accounts/bakers/transactions) or require true bidirectional interaction (DryRun), or take an attacker/caller-controlled amount with no inherent bound (GetAncestors). GetBlocks/GetFinalizedBlocks are the one case that stands out: they are perpetual, never-terminating streams (live block/finalization feeds), structurally the same "infinite stream, no single reply possible" problem the PR is fixing for the other 5 — yet they remain enabled: true. This environment could not exercise their through-router dispatch behavior (no healthy grpc provider, see above), so it is unverified whether the router would hang or error cleanly on them; worth a follow-up check once a reflection-capable upstream is available.

Log-scan findings

All non-benign WARN/ERROR lines in the probe window are attributable to the single root cause above (grpc provider repeatedly failing chain-id verification because the public upstream does not expose gRPC reflection for concordium.v2.Queries): "verify failed sending chainMessage ... Symbol not found: concordium.v2.Queries", "refusing node url", "no healthy providers for endpoint", "failed initial relays, csm was not initialized ... pairing list is empty", "provider pool empty", "Circuit breaker: all providers exhausted". None are method-specific; none are fatal/panic. No method was downgraded by the log scan.

Positive evidence (excluded from findings per the task's exception for this PR): 30 occurrences of "api is disabled" / "outcome":"rejected_before_dispatch" across the 5 disabled-method probes on mainnet, plus matching lines on testnet.

Testnet verification pass (Step 7)

  • Boot: clean, no fatal/panic, listener up on 0.0.0.0:3360 inside the container.
  • chain-id verification: fails at the router (same reflection-dependency as mainnet) but the value itself is correct — direct grpcurl -proto probe against grpc.testnet.concordium.com:20000 returned genesisBlock.value = "QiEzLTThaUFowqDAs/0PJzgJYSyxPQANXC4A6F9Q95Y=", matching CONCORDIUMT's expected_value exactly.
  • Inheritance of the stream-method disable (PR claim Review specs #3): confirmed through-router on CONCORDIUMT — GetBlockItems and DryRun both return "api is disabled" (same as mainnet), while GetConsensusInfo returns "No pairings available." (treated as a normal enabled method). This is the strongest possible evidence: CONCORDIUMT has 0 own apis and inherits the entire grpc collection — including the disabled flags — from CONCORDIUM via imports.

TESTNET_VERIFY: PARTIAL — boot and inheritance both confirmed good; the chain-id verification check itself cannot complete end-to-end in this environment due to the shared reflection limitation (value is independently confirmed correct).

Empirical block time (Step 8)

Network Spec average_block_time Empirical (Δtimestamp / 100 blocks) Verdict
CONCORDIUM (mainnet) 2000 ms 2000.0 ms (height 54,488,238 vs 54,488,138, direct GetBlockInfo.slotTime) match
CONCORDIUMT (testnet) 2000 ms (own value, not inherited) 2000.0 ms (height 51,007,931 vs 51,007,831) match

No BLOCK_TIME_MISMATCH.

@magmadevs-bot

Copy link
Copy Markdown
Contributor

Phase 9 — parallel reviewers (3 per spec file, independent contexts)

Six reviewers ran /review-spec — three on sui.json, three on concordium.json — each writing to its own path (no shared file, no rename). All six reports are distinct by md5; all six returned a parseable tally.

Spec Reviewer CRITICAL MEDIUM MINOR
sui.json 1 1 1 1
sui.json 2 1 2 1
sui.json 3 1 1 1
concordium.json 1 1 0 2
concordium.json 2 0 1 1
concordium.json 3 1 1 0

On the PR's own diff: 6 of 6 reviewers found it correct and ready to ship as-is. Every finding below is about pre-existing state in main, not about the eight enabled flips.

Merged gaps (deduplicated)

1. CRITICAL — jsonrpc collection enabled on SUI and SUIT though Sui's fullnodes no longer serve JSON-RPC (3/3 sui reviewers)
54 methods × 2 indices are advertised as servable on an interface that returns a deprecation error from every upstream Phase 8 could find (Mysten's own fullnodes included). SUID already ships jsonrpc with enabled: false. All three reviewers independently judged this a pre-existing condition that should be a fast-follow rather than a blocker on this PR.

2. CRITICAL / MEDIUM — GetBlocks and GetFinalizedBlocks are the same unterminated-stream defect this PR fixes, and remain enabled: true (3/3 concordium reviewers — two scored it CRITICAL, one MEDIUM)
The official concordium-grpc-api proto declares both as server streams, and unlike GetTokenList/GetInstanceList/GetPoolDelegators (also streams, but bounded one-shot collects that behave acceptably) these two are perpetual and never terminate. Reviewer 2 adds the sharpest point: DryRun carried hanging_api: true and still hit exactly the cardinality-violation/refused-call problem this PR fixes — so hanging_api alone does not make a perpetual stream safe, which is the assumption leaving these two enabled rests on. GetBlocks and GetFinalizedBlocks both carry hanging_api: true with timeout_ms: 20000 today.

3. MEDIUM — the three gRPC SubscriptionService/Subscribe* methods are priced at 20 CU against a catalog-wide convention of 1000 (3/3 sui reviewers)
Independently verified across the whole catalog: of 309 subscribe-tagged methods, 309 are priced at 1000 CU — Sui's three are the only exceptions anywhere in the repo (the 10-CU entries are all unsubscribe/stop counterparts). An open-ended stream billed at 20 CU undercharges by 50× for the provider resource it holds.

4. MEDIUM / MINOR — GetAccountTransactionV1SignHash returns Unimplemented from the upstream regardless of input (2/3 concordium reviewers, split on severity)
Input-independent, so not a bad-probe artifact — but observed against a single upstream, which is thin ground for a disable.

5. MEDIUM — timeout_ms: 74000 on the GraphQL executeTransaction mutation is an outlier (1/3 sui reviewers). Passes check_hanging_api (74 s ≥ the 1 s implied by cu=10); flagged as unexplained rather than wrong.

Items the reviewers checked and explicitly did not flag

  • The gRPC VERIFY: FAIL / PARSE: PARTIAL from Phase 8 — all three concordium reviewers independently analysed it and reached the same conclusion I did: an upstream reflection gap, not a spec defect. The chain-id expected_value is correct on both networks.
  • Concordium's parse directives (GET_BLOCKNUM, GET_BLOCK_BY_NUM, GET_EARLIEST_BLOCK) and the archive/pruning/GET_EARLIEST_BLOCK triplet — present and correctly shaped.
  • Minor items dropped at consolidation: CU band polish on simulation/dry-run calls, VerifySignature using DEFAULT block parsing, four REST probe WARNs traced to probe input shape.

Static gates (re-run on both files, with --base origin/main)

check_method_schema, check_unused_fields, check_hanging_api, check_stateful — all PASS on both files, no FAIL and no INFO rows.

@magmadevs-bot

Copy link
Copy Markdown
Contributor

Phase 10 — synthesize gaps + fix pass (+ 10b smoke re-probe)

What was changed

One edit, in sui.json, left uncommitted in the working tree for the workflow step that follows this run to commit:

  • sui.json:1238 — SubscribeCheckpoints compute_units 20 → 1000
  • sui.json:1253 — SubscribeEvents compute_units 20 → 1000
  • sui.json:1268 — SubscribeTransactions compute_units 20 → 1000

(gap: MEDIUM, "gRPC subscription methods priced at 20 CU against the catalog-wide 1000 CU convention" — raised by 3/3 sui reviewers)

git diff --numstat is exactly 3 3 sui.json. No enabled value was touched, no field was reformatted, the file's 4-space indentation and absent trailing newline are preserved, and check_disabled_count.sh still reports exactly the same three disabled SUI methods. concordium.json is byte-identical to its committed state — Phase 10 deliberately applied no edit to it.

What was deliberately NOT changed, and why

Four findings survived consolidation but were held out of the fix pass. Each is recorded here rather than silently dropped; all four are pre-existing on main, and none was introduced by this PR.

1. CRITICAL — jsonrpc collection enabled on SUI/SUIT (3/3 reviewers). Acting on it means disabling 54 methods across two indices, on an interface this PR does not touch. All three reviewers independently judged it a fast-follow rather than a blocker. Not applied: the blast radius is far outside a PR whose declared diff is eight enabled flips, and the decision belongs to a human.

2. CRITICAL/MEDIUM — Concordium GetBlocks / GetFinalizedBlocks left enabled: true (3/3 reviewers). This one is thematically inside the PR's purpose, and the evidence is strong: the official proto declares both as streams and both never terminate. It was still not applied, for a reason stronger than scope — this environment cannot verify it. Each of the eight disables this PR ships was confirmed live through the router; the public Concordium gRPC upstreams expose no server reflection for concordium.v2.Queries, so no grpc provider is ever admitted here and Phase 8 recorded through-router behaviour for these two as UNVERIFIED. Phase 10b cannot close that gap either. Shipping an unverifiable disable would hold it to a weaker standard than the eight beside it, and would contradict the body's declared count of eight. This is the recommended immediate follow-up, and reviewer 2 supplies the argument that matters: DryRun carried hanging_api: true and still hit the cardinality-violation problem, so hanging_api alone does not make a perpetual stream safe — which is the assumption leaving these two enabled rests on. Both currently carry hanging_api: true with timeout_ms: 20000.

3. MEDIUM/MINOR — GetAccountTransactionV1SignHash returns Unimplemented upstream regardless of input (2/3 reviewers, split on severity). Input-independent, so not a probe artifact, but observed against a single upstream. Needs a second independent node before any change.

4. MEDIUM — timeout_ms: 74000 on the GraphQL executeTransaction mutation (1/3 reviewers). Passes check_hanging_api. Unexplained, not demonstrably wrong.

Disabled-API Justifications: no new disables this run, so nothing is added to the ledger. The eight already in the PR are evidenced by the official protos (sui.rpc.v2 / concordium-grpc-api service.proto) declaring every one of them a stream — positive client-source evidence, not probe errors.

Phase 10a — static gates re-run after the fix

jq valid. check_method_schema, check_unused_fields, check_hanging_api, check_stateful (the last two with --base origin/main) — all PASS on both files, zero FAIL rows, zero INFO rows. Disabled counts: SUI 3, CONCORDIUM 5 — 8 total, matching the PR body's claim exactly.

Phase 10b — smoke re-probe: SMOKE: OK on both specs

sui.json — clean boot, both listeners up. PARSE: OK (rpc_endpoint_latest_block grpc 3.4685644e+08 / graphql 3.4685644e+08, fetch_latest_success 149 and 95; PARSE_BLOCK_BY_NUM NOT_EXERCISED, identical to Phase 8). VERIFY: OK (chain-id verified on both providers). ADDONS: none declared. All 14 probes PASS → PASS against Phase 8, with no regressions. CU_FIX_EFFECT: all three subscription streams still deliver messages within the 30 s window at compute_units: 1000, relay_end outcome: "ok", served_by: sui-upstream-grpc-1; the router logs nothing about the CU value at boot or relay time, consistent with this being a pricing-convention fix rather than a functional one. The three disabled methods still refuse with api is disabled / rejected_before_dispatch / attempts: [].

concordium.json — clean boot (v1.5.10). Reproduced Phase 8's verdicts exactly for this unchanged file: rest PARSE_BLOCKNUM OK (latest_block ≈ 54,488,748 and climbing), grpc NOT_EXERCISED, chain-id FAIL (environment-caused — the same Symbol not found: concordium.v2.Queries reflection gap), pruning NOT_EXERCISED, archive TESTED_OK by direct probe (GetBlockInfo(height=1).parentBlock == genesisBlock). Ten rest probes PASS → PASS.

Two image-tag findings worth recording

The smoke phase runs smart-router:latest where Phase 8 runs :main, and on this host the two tags are different builds (sha256:476faaac… vs sha256:742ca755…):

  1. :latest has no graphql chain parser — it exits 1 at boot with chainParser for apiInterface (graphql) not found. The sui smoke pass caught this, correctly identified it as image drift rather than anything a 3-line CU edit could cause, and re-ran against :main to keep the comparison valid. A literal :latest run would have reported a false BOOT_FAILED on this spec.
  2. On :latest, the Concordium disabled-method refusal did not reproduce — the first pass reported that disabled and enabled grpc methods were indistinguishable there, both failing through the reflection-gap path. Because that is the precise behaviour this PR claims, it was re-checked on :main (the Phase-8 digest) with an enabled control method, and the result is decisive:
method client status dispatch path
GetAccountList, GetAncestors, GetBakerList, GetBlockItems, DryRun Unknown: …failed to getSupportedApi gRPC ErrMsg: api is disabled refused before dispatch — outcome: "rejected_before_dispatch", method: "", attempts: [], and no VALIDATING PROVIDERS line for any of their GUIDs
GetBlockInfo (enabled control) Unknown: {"Error":"No pairings available."} reached provider selection — VALIDATING PROVIDERS fires, error_code: PROTOCOL_NO_PROVIDERS, stop_reason: AllProvidersExhausted

Across the whole log VALIDATING PROVIDERS fires for exactly two GUIDs: the startup verification pass and the GetBlockInfo call. The five disabled methods never reach it. REFUSAL_CONFIRMED: YES on the image this PR targets — the two failure modes are textually and structurally distinct, and the earlier api not supported line that fired for both turned out not to be a disabled-specific signal in that other build.

@magmadevs-bot

Copy link
Copy Markdown
Contributor

Disabled-API Justifications

Positive-evidence ledger for every enabled: false api in the two specs this PR touches. All eight rows rest on first-party interface definitions — the declared stream cardinality of the method itself — not on probe errors. check_disabled_count.sh reports exactly these eight and no others (SUI 3, CONCORDIUM 5).

name evidence-type source evidence
sui.rpc.v2.LedgerService/ListCheckpoints client-source (live gRPC reflection) fullnode.mainnet.sui.io:443 rpc ListCheckpoints ( .sui.rpc.v2.ListCheckpointsRequest ) returns ( stream .sui.rpc.v2.ListCheckpointsResponse );
sui.rpc.v2.LedgerService/ListTransactions client-source (live gRPC reflection) fullnode.mainnet.sui.io:443 rpc ListTransactions ( .sui.rpc.v2.ListTransactionsRequest ) returns ( stream .sui.rpc.v2.ListTransactionsResponse );
sui.rpc.v2.LedgerService/ListEvents client-source (live gRPC reflection) fullnode.mainnet.sui.io:443 rpc ListEvents ( .sui.rpc.v2.ListEventsRequest ) returns ( stream .sui.rpc.v2.ListEventsResponse );
concordium.v2.Queries/GetAccountList client-source (official proto) concordium-grpc-api v2/concordium/service.proto L45 rpc GetAccountList (BlockHashInput) returns (stream AccountAddress);
concordium.v2.Queries/GetAncestors client-source (official proto) same, L59 rpc GetAncestors (AncestorsRequest) returns (stream BlockHash);
concordium.v2.Queries/GetBakerList client-source (official proto) same, L101 rpc GetBakerList (BlockHashInput) returns (stream BakerId);
concordium.v2.Queries/GetBlockItems client-source (official proto) same, L310 rpc GetBlockItems(BlockHashInput) returns (stream BlockItem);
concordium.v2.Queries/DryRun client-source (official proto) same, L390 rpc DryRun (stream DryRunRequest) returns (stream DryRunResponse); — bidirectional

Verified independently during this pipeline run (not taken from the PR body): the Sui rows were read from the live mainnet fullnode's own gRPC server reflection, and the Concordium rows from the upstream proto fetched this run. The control cases confirm the shapes discriminate rather than matching everything — sui.rpc.v2.LedgerService/GetCheckpoint is returns ( .sui.rpc.v2.GetCheckpointResponse ) (unary) and concordium.v2.Queries/GetBlockInfo is returns (BlockInfo) (unary); both stay enabled.

No disables were added by this run's Phase 10 fix pass, so nothing is appended below these eight.

@magmadevs-bot

Copy link
Copy Markdown
Contributor

Phase 11 — final reviewer verdict: ⚠️ CHANGES REQUESTED

Spec CRITICAL MEDIUM MINOR
sui.json 2 1 0
concordium.json 1 1 0

The mechanical rule is unambiguous — any remaining CRITICAL or MEDIUM means CHANGES REQUESTED, and I am not going to round that up. But the verdict needs its context to be useful: both final reviewers independently judged this PR's own diff correct, verified and ready to merge as written. Every finding below is a pre-existing defect in main that this PR neither introduced nor touched, and two of them already have fix branches in flight. The blocking tally is about the state of these two spec files, not about the eight enabled flips.

Disable-justification audit — clean on both files

Every enabled: false entry matches a positive-evidence row in the ledger: 3 apis in sui.json (plus the SUID jsonrpc collection, pre-existing and covered by the same JSON-RPC deprecation evidence) and 5 apis in concordium.json. No disabled entry lacks evidence, so no CRITICAL arose from that audit.

Remaining findings — all pre-existing

sui.json — CRITICAL: jsonrpc enabled on SUI/SUIT past its code-removal date. 54 methods on both indices, while SUID already disables the identical collection. The deprecation (July 2026) and code removal (October 2026) are both in the past as of today, and all eight providers tried returned a deprecation error or a paywall. Providers can advertise 54 dead methods.

sui.json — CRITICAL: timeout_ms: 8000 on ExecuteTransaction against a node that waits up to ~100 s. Verified in the file: sui_executeTransactionBlock (jsonrpc) and sui.rpc.v2.TransactionExecutionService/ExecuteTransaction (grpc) both carry timeout_ms: 8000, cu=10, hanging_api: true. With Sui's 90 s finality plus ~10 s local execution, "outcome unknown" becomes the expected result for ordinary sends rather than an edge case. origin/fix/MAG-5186-sui-grpc-execute-timeout addresses the gRPC side; the reviewer found no fix anywhere for the JSON-RPC path.

sui.json — MEDIUM: GraphQL executeTransaction timeout_ms: 74000 races the node's own 74 s window. Verified in the file. check_hanging_api.sh passes it because that gate checks a floor, not a ceiling. origin/fix/MAG-4909-sui-execute-timeout raises it to 80000. (Both branches exist on the remote — I confirmed.)

concordium.json — CRITICAL: GetBlocks and GetFinalizedBlocks are the same unterminated-stream defect, still enabled: true. Verified in the file: both enabled: true, cu=10, timeout_ms: 20000, hanging_api: true, and both declared returns (stream …) in the official proto (L29, L36) as perpetual streams. DryRun carried that identical hanging_api/timeout_ms pairing and still hit the cardinality-violation failure this PR exists to fix — which is the evidence against assuming that pairing makes a perpetual stream safe. Held out of the Phase 10 fix pass because this environment cannot verify a fix for it through the router (the public upstreams expose no gRPC reflection for concordium.v2.Queries), and every disable this PR ships was confirmed live. This PR does not fully close the MAG-5178 incident class — that is the single most useful thing in this report.

concordium.json — MEDIUM: GetAccountTransactionV1SignHash returns Unimplemented upstream regardless of input. Input-independent, so a genuine signal, but single-upstream — not grounds for a disable on its own. Needs a second mainnet node and testnet cross-check.

Evaluated and found NOT to be defects

The grpc VERIFY: FAIL / PARSE: PARTIAL on Concordium: root-caused to the public endpoints lacking gRPC reflection, which the router's generic provider requires. Direct grpcurl -proto probes return correct data and the chain-id expected_value matches the live genesis hash exactly on both networks. Three Phase-9 reviewers and the final reviewer reached this conclusion independently. No change recommended; not counted in the tally.

Scripted checks on both files: check_method_schema, check_unused_fields, check_hanging_api, check_stateful, check_verifications, check_network_params, check_extensions, check_archive_value, check_directive_presence, check_node_admin_rpcs, check_internal_paths — zero FAIL rows. One INFO on Concordium's pruning (no expected_value, latest_distance: 1800 matching the archive extension's rule.block: 1800) — the documented correct shape.

Recommended disposition

Merge #210 on its own merits, then take the follow-ups separately: GetBlocks/GetFinalizedBlocks under the same MAG-5178 evidence trail (with a reflection-capable gRPC node so the fix can be verified the way these eight were), the Sui jsonrpc collection, and the JSON-RPC ExecuteTransaction timeout that no in-flight branch covers.

@magmadevs-bot

Copy link
Copy Markdown
Contributor

Phase 12 — closing summary checklist

Resumable pipeline run, Phases 8–11 only. Phases 1–7 did not run this invocation (the spec was already committed on the branch); context was reconstructed from sui.json, concordium.json and the PR thread.

File Validation

  • ✓ JSON syntax valid — jq clean on both files, re-checked after the Phase 10 fix
  • ✓ All required fields present — Phase 10a static gates, both files
  • ✓ No duplicate API names within any collection — check_method_schema PASS, both files
  • ✓ Proper indentation/formatting — 4-space indent and absent trailing newline preserved; the fix diff is exactly 3 3 sui.json

Configuration Verification

  • ☐ Network parameters calculated per formulas — (Phases 1–7 skipped; not re-derived this run). Measured instead: Sui mainnet 241.8 ms vs spec 222 (+8.9%), Sui testnet 213.7 ms (−3.7%), Concordium 2000 ms on both networks vs spec 2000 — all within tolerance, no BLOCK_TIME_MISMATCH
  • ~ All APIs tested and working — Phase 8: SUI 28/28 grpc + 37/37 graphql probed (PASS=52, PASS-existence=8, 0 FAIL); CONCORDIUM 82 PASS / 1 FAIL / 6 WARN / 7 SKIP. Stateful methods skipped by design. See docs/<chain>/METHOD_PROBE_REPORT.md, posted in full above
  • ~ Block parsing validated for each API — existence-tested; full per-API parse validation needs production traffic
  • ✓ Parse directives executed by live router — SUI PARSE: OK, VERIFY: OK; Phase 10b re-check PARSE: OK, VERIFY: OK. CONCORDIUM PARSE: PARTIAL, VERIFY: FAIL — both traced to the upstream's missing gRPC reflection, not the spec, and reproduced identically in 10b
  • ✓ Addons & extensions tested — SUI: none declared. CONCORDIUM: archive TESTED_OK (GetBlockInfo(height=1).parentBlock == genesisBlock, i.e. unpruned to height 1), confirmed again in 10b
  • ~ Verifications pass on live nodes — SUI chain-id verified on every provider, both networks. CONCORDIUM chain-id expected_value confirmed correct by direct probe on both networks, but never exercised through the router (reflection gap); pruning NOT_EXERCISED for the same reason
  • ☐ Compute units benchmarked under expected load — user to measure. This run changed three CU values to match the catalog convention (309/309 subscribe-tagged methods at 1000); it did not benchmark them

Interface coverage

  • ☐ SUI jsonrpc — NOT_TESTABLE. Sui's public JSON-RPC is deprecated fleet-wide; eight providers tried, none serves it. 54 methods on SUI/SUIT remain enabled and unprobed — the Phase 11 CRITICAL
  • ✓ SUI grpc + graphql — both booted and probed through the router
  • ✓ CONCORDIUM rest — tracked and probed normally (3 collections: 36 GET, 5 PUT, 1 POST)
  • ~ CONCORDIUM grpc — boots, but no provider is admitted on this host; per-method evidence is direct-upstream, and the disabled-method refusals were confirmed through the router

Documentation (out of skill scope — manual reminder)

  • ☐ SPEC_IMPLEMENTATION.md / API_REFERENCE.md / TESTING_GUIDE.md / QUICK_START.md

Testnet vs Mainnet

  • ✓ Mainnet specs complete — both files unchanged in structure
  • ✓ Testnet specs inherit correctly — SUIT/SUID and CONCORDIUMT carry no apis of their own; inheritance of the switch-off proven empirically through the router, not inferred
  • ✓ Chain IDs verified for mainnet AND testnet — SUI/SUIT via router verification; CONCORDIUM/CONCORDIUMT by direct probe against live genesis hashes
  • ~ Both tested on respective networks — SUI mainnet + testnet booted and verified; CONCORDIUMT booted, same reflection caveat as mainnet

Governance Prep (out of skill scope — manual reminder)

  • ☐ Proposal JSON formatted correctly — both files carry the canonical { "proposal": { "specs": [ … ] } } envelope with no title/description/deposit; check_unused_fields.sh PASS on both, so none of the 15 removed fields was introduced
  • ☐ Community feedback gathered (if applicable)

Decisions this unattended run made on its own

  1. Endpoints self-researched — no MAINNET_URLS/TESTNET_URLS were supplied. Resolved and validated: Sui grpc + graphql on all three networks, Concordium grpc (both networks) + rest + an archive-capable upstream.
  2. The ws gate was satisfied without a wss:// URL. Sui's only subscriptions are gRPC SubscriptionService/Subscribe* server streams over the same grpcs:// endpoint — there is no Sui ws endpoint and none is needed. Rather than assume, all three streams were opened through the router and each delivered live messages. Concordium has no SUBSCRIBE directive at all. So no request for a ws-capable node was warranted.
  3. Concordium's VERIFY: FAIL was reported as a FAIL, not quietly downgraded — while being diagnosed as the upstream's missing gRPC reflection rather than a spec defect, with the expected_value independently confirmed correct on both networks.
  4. The Phase 10 fix pass was held to what this run could verify. Applied: three subscription CU values (verified against the whole catalog, then re-probed). Not applied: the Sui jsonrpc disable (54 methods, different interface, out of a PR declaring eight flips) and the Concordium GetBlocks/GetFinalizedBlocks disable (right in theme, strong proto evidence — but unverifiable through the router on this host, and every disable this PR ships was confirmed live; shipping an unverifiable ninth and tenth would hold them to a weaker standard). Both are recorded as follow-ups with their evidence.
  5. The verdict was reported honestly as CHANGES REQUESTED, driven entirely by pre-existing findings, with the recommendation to merge fix(spec): switch off the Sui and Concordium gRPC stream methods the router does not serve (MAG-5178) #210 on its own merits.

Things worth knowing about the harness itself

  • smart-router:latest and :main are different builds on this host. :latest has no graphql chain parser (chainParser for apiInterface (graphql) not found, exit 1 at boot) and did not reproduce the disabled-method refusal signature. Phase 10b re-ran both specs against :main — the digest Phase 8 used — so the comparison is valid. A literal :latest smoke run would have reported a false BOOT_FAILED on Sui.
  • The smart-router's gRPC listener does expose server reflection, contrary to the tester guide's standing note. That is why the disabled methods and the subscriptions could be probed through the router rather than from logs alone — stronger evidence than the guide anticipates.

Run stats — this pipeline run only (Phases 8–11)

Elapsed:         00h 52m 56s
Transcripts:     1 main + 16 subagent
API round-trips: 1092  (main=102, subagents=990)
Fresh tokens:    input=2184  output=605203
Cached tokens:   cache_read=71777732  cache_write=2916689
Total billed:    75301808 tokens
Split:           main=14127293  subagents=61174515
Models:          claude-sonnet-5 (990 calls), claude-opus-5 (105 calls)

Phases 1–7 ran in a separate create_spec workflow run; their time and tokens live there. The true end-to-end total is the two runs added together — the figures above are not a 1–11 grand total.

The working tree holds one uncommitted edit (sui.json, 3 lines) for the workflow step after this run to commit and push. No git command was run by this pipeline.

@magmadevs-bot

Copy link
Copy Markdown
Contributor

📦 Committed pipeline fixes to fix/MAG-5178-switch-off-unserved-stream-methods (7594ebe): sui.json — the branch now matches the spec that Phase 10b/11 verified.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants