feat: protect archive RPC resources - #5637
Closed
ukint-vs wants to merge 1 commit into
Closed
Conversation
Member
Author
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.
Summary
sc-cli,sc-service, andsc-rpc-serverfrom Polkadot SDK commit298f676c91d64f15f38ea7fd78f125c5889ab09c, with provenance and license notices.--rpc-method-limit METHODS=CALLS_PER_MINUTE,MAX_IN_FLIGHTconfiguration. Alias groups share one node-wide rate/concurrency budget across HTTP, WebSocket, batches, and reconnects; exhausted calls fail immediately with JSON-RPC-32999.rpc_calls=traceattribution without request parameters or response bodies.Test Coverage
cargo test --locked -p sc-executor runtime_version— 6 passed.cargo test --locked -p sc-rpc-server method_limit— 14 passed.cargo test --locked -p sc-cli rpc_method_limit— 4 passed.cargo check --locked -p sc-service— passed.cargo check --locked -p gear-cli --features vara-native— passed.make node— passed.state_getRuntimeVersionsucceeded and itschain_getRuntimeVersionalias was rejected with-32999under a shared1,1budget; trace output reported the canonical method, rate reason, and bounded in-flight values.Pre-Landing Review
No blocking issues found after review fixes. One informational gap remains: cross-transport behavior has unit coverage and an HTTP smoke test, but no permanent real-network HTTP/WebSocket integration test.
Scope Drift
Scope check: clean. No budget values are hard-coded or enabled by default.
Plan Completion
Implementation and local verification are complete. Production measurement and rollout remain intentionally deferred because no disposable archive clone/snapshot or authorized canary endpoint was available, and the existing production/staging endpoints were unsafe for load generation.
Deferred operational checks:
Documentation
substrate/README.mdrecords the pinned Polkadot SDK source commit and local adaptation policy.THIRD_PARTY_NOTICES.mdrecords the copied crates and applicable licensing.Test plan