speed up toolkit syncing#1263
Merged
Merged
Conversation
Complete the API migration across toolkit, upgrader, relay, e2e tests, and scripts for the subxt v0.50 rewrite. Key changes: - Block-centric API: api.blocks().at() → api.at_block(), api.storage().at_latest() → api.at_current_block().storage() - Transaction types: TxProgress → TransactionProgress, TxInBlock → TransactionInBlock, TxStatus → TransactionStatus - api.tx() is now async, encode_call_data() → tx().call_data() - api.metadata() removed from OnlineClient; use at_current_block().metadata_ref() - Metadata no longer Clone; use ArcMetadata (Arc<Metadata>) for shared ownership - Granular error types: OnlineClientAtBlockError, ExtrinsicError, RuntimeApiError, etc. - Event API: variant_name() → event_name(), as_event() → decode_fields_as(), field_values() removed - Storage API: key now passed to fetch(addr, key) instead of address constructor - Block from streams: extrinsics/events accessed via block.at().await? first - dynamic::tx().into_value() requires Composite::unnamed() instead of Vec - RpcConfig trait impl required for LegacyRpcMethods
Share the RPC WebSocket connection within each client, cap fetch workers to actual workload size, and retry transient transport errors during transaction submission with exponential backoff.
Signed-off-by: Giles Cope <gilescope@gmail.com>
Signed-off-by: Giles Cope <gilescope@gmail.com>
Signed-off-by: Giles Cope <gilescope@gmail.com>
ozgb
approved these changes
Apr 9, 2026
ozgb
left a comment
Contributor
There was a problem hiding this comment.
Changes look good - needs a rebase
Signed-off-by: Giles Cope <gilescope@gmail.com>
Signed-off-by: Giles Cope <gilescope@gmail.com>
Signed-off-by: Giles Cope <gilescope@gmail.com>
m2ux
added a commit
that referenced
this pull request
Apr 23, 2026
* chore(deps): migrate subxt from v0.44 to v0.50 Complete the API migration across toolkit, upgrader, relay, e2e tests, and scripts for the subxt v0.50 rewrite. Key changes: - Block-centric API: api.blocks().at() → api.at_block(), api.storage().at_latest() → api.at_current_block().storage() - Transaction types: TxProgress → TransactionProgress, TxInBlock → TransactionInBlock, TxStatus → TransactionStatus - api.tx() is now async, encode_call_data() → tx().call_data() - api.metadata() removed from OnlineClient; use at_current_block().metadata_ref() - Metadata no longer Clone; use ArcMetadata (Arc<Metadata>) for shared ownership - Granular error types: OnlineClientAtBlockError, ExtrinsicError, RuntimeApiError, etc. - Event API: variant_name() → event_name(), as_event() → decode_fields_as(), field_values() removed - Storage API: key now passed to fetch(addr, key) instead of address constructor - Block from streams: extrinsics/events accessed via block.at().await? first - dynamic::tx().into_value() requires Composite::unnamed() instead of Vec - RpcConfig trait impl required for LegacyRpcMethods * chore: add change file for subxt v0.50 migration * chore: fix tags in change file * docs: add pr link to change file * chore: cargo fmt * fix(toolkit): add retry with backoff for RPC 429 rate limiting Share the RPC WebSocket connection within each client, cap fetch workers to actual workload size, and retry transient transport errors during transaction submission with exponential backoff. * chore: cargo fmt * docs: add issue link to change file * fix: compile tests in e2e tests * chore: fix metadata * test: fix deploy_tx race condition causing test failures * more robust decoding Signed-off-by: Giles Cope <gilescope@gmail.com> * feat: optimise block_number to hash Signed-off-by: Giles Cope <gilescope@gmail.com> * fix: tweak Signed-off-by: Giles Cope <gilescope@gmail.com> * chore: fmt Signed-off-by: Giles Cope <gilescope@gmail.com> * chore: changelog Signed-off-by: Giles Cope <gilescope@gmail.com> --------- Signed-off-by: Giles Cope <gilescope@gmail.com> Co-authored-by: Oscar Bailey <79094698+ozgb@users.noreply.github.com> Signed-off-by: Mike Clay <mike.clay@shielded.io>
m2ux
added a commit
that referenced
this pull request
Apr 23, 2026
* chore(deps): migrate subxt from v0.44 to v0.50 Complete the API migration across toolkit, upgrader, relay, e2e tests, and scripts for the subxt v0.50 rewrite. Key changes: - Block-centric API: api.blocks().at() → api.at_block(), api.storage().at_latest() → api.at_current_block().storage() - Transaction types: TxProgress → TransactionProgress, TxInBlock → TransactionInBlock, TxStatus → TransactionStatus - api.tx() is now async, encode_call_data() → tx().call_data() - api.metadata() removed from OnlineClient; use at_current_block().metadata_ref() - Metadata no longer Clone; use ArcMetadata (Arc<Metadata>) for shared ownership - Granular error types: OnlineClientAtBlockError, ExtrinsicError, RuntimeApiError, etc. - Event API: variant_name() → event_name(), as_event() → decode_fields_as(), field_values() removed - Storage API: key now passed to fetch(addr, key) instead of address constructor - Block from streams: extrinsics/events accessed via block.at().await? first - dynamic::tx().into_value() requires Composite::unnamed() instead of Vec - RpcConfig trait impl required for LegacyRpcMethods * chore: add change file for subxt v0.50 migration * chore: fix tags in change file * docs: add pr link to change file * chore: cargo fmt * fix(toolkit): add retry with backoff for RPC 429 rate limiting Share the RPC WebSocket connection within each client, cap fetch workers to actual workload size, and retry transient transport errors during transaction submission with exponential backoff. * chore: cargo fmt * docs: add issue link to change file * fix: compile tests in e2e tests * chore: fix metadata * test: fix deploy_tx race condition causing test failures * more robust decoding Signed-off-by: Giles Cope <gilescope@gmail.com> * feat: optimise block_number to hash Signed-off-by: Giles Cope <gilescope@gmail.com> * fix: tweak Signed-off-by: Giles Cope <gilescope@gmail.com> * chore: fmt Signed-off-by: Giles Cope <gilescope@gmail.com> * chore: changelog Signed-off-by: Giles Cope <gilescope@gmail.com> --------- Signed-off-by: Giles Cope <gilescope@gmail.com> Co-authored-by: Oscar Bailey <79094698+ozgb@users.noreply.github.com> Signed-off-by: Mike Clay <mike.clay@shielded.io>
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.
Overview
Batch block-number-to-hash RPC calls into a single request instead of one call per block, reducing network round trips during toolkit sync. Also simplifies several function parameters across the fetcher module.
🗹 TODO before merging
📌 Submission Checklist
🧪 Testing Evidence
Please describe any additional testing aside from CI:
🔱 Fork Strategy
Links