ship: bench 086 polkadot-rpc to main (Railway rpc-capabilities pickup)#1183
Merged
Conversation
Cherry-picked from dev (#1179), adapted to main's rpc-capabilities shape (no bench 083 consensus/hash-quorum machinery on main yet). Extends rpc-capabilities to Polkadot, the first non-EVM, non-Solana chain in the cluster. Substrate JSON-RPC via chain_getHeader (returns hex-encoded block number matching EVM's eth_getBlockByNumber shape), staleness by relay-block gap (40 blocks, ~4 min at Polkadot's ~6 s cadence). Harness changes: - Chain.Kind gains "polkadot" alongside "solana" and default (EVM). - New callSubstrateHeader: chain_getHeader POST, parses hex block number, same latency measurement + result classification as EVM. - probeOne switches on Kind (was if solana / else). polkadot uses polkadotStaleBlockGap = 40. - Archive loop skipped for polkadot alongside solana: no eth_getBalance- by-depth equivalent on Substrate public endpoints. Providers at launch (3, live-verified 2026-07-15 with 4 consecutive chain_getHeader probes each, all returning block 0x1ea223d): - polkadot-official (Parity, rpc.polkadot.io) - onfinality (public gateway, Web3 Foundation grantee) - publicnode (Allnodes) Excluded by the launch audit: - 1RPC: filters chain_getHeader as "Not Allowed" on privacy relay - Dwellir: 503 during audit sweep, revisit - Ankr / Chainstack: paid tier / key-gated on Substrate - RadiumBlock / Grove / Thirdweb: referral header / invalid chain / key-gated Spec (benchmarks/polkadot-rpc.yml, bench № 086) copied from #1179 unchanged: 3-provider cohort, same schema as moonbeam-rpc etc. Post-merge: - Railway rpc-capabilities-{us,eu,sgp} auto-rebuild on this main push and start emitting rpc_latency_milliseconds{chain="polkadot"} metrics. - The bench 083 consensus path (dev-only for now) is not wired here; when dev syncs to main naturally, the polkadot switch case in probeOne already excludes consensus.observe correctly on that path.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cherry-pick of #1179 (Polkadot RPC bench), adapted to main's rpc-capabilities shape (main does not carry the bench 083 consensus/hash-quorum machinery yet, so my polkadot changes drop the
consensus.observeskip and the extrahashreturn fromcallSubstrateHeader, keeping the 4-value signature main uses).Motivation: Railway rpc-capabilities-{us,eu,sgp} watch
main, so the Polkadot code needs to land here for the harness to pick it up on next auto-build.What lands
harnesses/rpc-capabilities/cmd/script/config.go: newpolkadotchain block with 3 audited providers (Parity official, OnFinality, PublicNode), Kind comment extendedharnesses/rpc-capabilities/cmd/script/probe.go:polkadotStaleBlockGap = 40, newcallSubstrateHeader(chain_getHeaderPOST + hex block-number parse), probeOne switches on Kindharnesses/rpc-capabilities/cmd/script/archive.go: skip archive loop for polkadot alongside solanabenchmarks/polkadot-rpc.yml: identical to the file that landed on dev in add bench 086 polkadot-rpc: first Substrate chain in the RPC cluster #1179Test plan
go build ./...clean inharnesses/rpc-capabilitiesbun test src/- 89/89 pass across 9 files (main-side test count, no bench 083 tests here yet)0x1ea223d)Runtime impact
After merge, Railway will auto-rebuild the 3 rpc-capabilities services from this main SHA and the Polkadot probes will start feeding Prom (
rpc_latency_milliseconds{chain="polkadot", provider=...}). The/benchmarks/polkadot-rpcbench page renders "Awaiting first run" until Prom captures samples (~24h before percentiles are meaningful).