Bump subxt 0.44.3 -> 0.50.2 across all chain-facing crates#288
Merged
Conversation
Mechanical migration to the redesigned subxt 0.50 API, no behavior change intended: - blocks().subscribe_finalized() -> stream_blocks(); block-level events via block.at().events().fetch() - storage().at_latest().fetch/iter -> at_current_block() + storage().try_fetch/iter; addresses are now <KeyParts, Value> generic and keys are passed at call time - constants().at(..) -> at_current_block().constants().entry(..) - tx() -> at_current_block().transactions(); dynamic tx payload construction is unchanged - event decoding: variant_name() -> event_name(), field_values() -> decode_fields_unchecked_as; decoded values drop the u32 type-id context (Value<u32> -> Value) - fetch_raw missing values surface as StorageError::NoValueFound instead of None; call sites map it back to preserve error strings Verified: 424 tests pass, clippy -D warnings clean, and the live zombienet flows (just demo, fs-demo-ci, s3-demo-ci) all pass against a running relay + parachain + provider. Known semantic change inherited from subxt 0.50: transaction nonces are read from state at the anchored finalized block rather than the pool-aware system_accountNextIndex, so a transaction submitted within one finality lag of a previous same-account transaction (across processes) can see a stale nonce. In-process flows are unaffected because every submission waits for finalization.
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
bkontur
reviewed
Jul 15, 2026
The patch-coverage gate flagged the subxt 0.50 migration's rewritten chain reads (RealChainStateClient, the finalized-block follow loop) as untested - previously they were only exercised against a live chain. Back a real OnlineClient (legacy backend) with subxt-rpcs' MockRpcClient and the repo's tracked runtime metadata snapshot, so the tests run the actual dynamic storage/constants/events machinery: - RequestTimeout constant lookup, asserted self-consistent against the raw constant bytes in the same metadata - Providers reads: absent -> None, and a full round-trip where the storage value is scale_value-encoded against the real runtime ProviderInfo type and decoded back (this immediately caught that the minimal decoder fixture lacks the runtime's public_key field) - the whole follow() pipeline over one finalized block: header subscription, System.Events decode, ProviderRegistered recognition, and the resulting provider-state refresh and nonce bootstrap connect_and_follow is split into connect + follow(api) so the tests can drive the full loop over the mock connection; behavior unchanged.
danielbui12
approved these changes
Jul 16, 2026
Open
6 tasks
Collaborator
|
sorry, my assistant accidentally posted some comments, I removed those - #294 |
bkontur
approved these changes
Jul 16, 2026
bkontur
enabled auto-merge
July 16, 2026 11:55
Regenerates crates/storage-subxt (added on dev in #282 with subxt-codegen 0.44) for subxt 0.50: subxt-core was discontinued at 0.44.3, so the bindings are regenerated with subxt-codegen 0.50.2 against the tracked metadata snapshot (default ::subxt crate path), the crate drops subxt-core and its no_std feature split (subxt 0.50 is std-only), and the justfile codegen recipe loses the --crate ::subxt_core flag.
scripts/paseo-lower-timeouts-setstorage.mjs is an untracked local helper that was accidentally staged into the preceding merge commit; it was never meant to be part of this branch. No secrets: the sudo SURI is read from the environment.
ilchu
added a commit
that referenced
this pull request
Jul 17, 2026
dev's #288 bumped subxt 0.44 -> 0.50 across chain-facing crates, which overlapped the two provider files this branch rewrote for the current_anchor_block runtime API. Resolution: - provider-node/src/subxt_client.rs (conflict): kept the anchor-block semantics but ported to subxt 0.50 — fetch via runtime_apis().call_raw ("StorageProviderApi_current_anchor_block") and decode the raw u32, which also avoids depending on the API being in the node metadata snapshot. current_anchor_block() now uses at_current_block(). - chain_state_coordinator.rs (silent auto-merge, 0.44 call left behind): fetch the anchor via block.at().runtime_apis(); hoisted the block handle so anchor + events share one at(). Added a state_call mock arm and updated the field-rename in the coordinator test. - client/src/substrate.rs: took dev's 0.50 version. The branch's fetch_last_relay_block_number helper here was dead code (orphaned when the provider inlined its own copy in f636e25) and 0.44-only, so dropping it matches dev. Full workspace compiles; pallet/provider/client/registry/paseo tests green; clippy clean.
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.
Bumps the workspace subxt pin from 0.44.3 to 0.50.2 (and subxt-signer to match) across all four chain-facing crates:
storage-provider-node,storage-client,file-system-client, ands3-client. This is the prerequisite step for #222 (embedded smoldot light-client transport): subxt 0.44.x pins smoldot-light from the abandoned pre-revival lineage, while 0.50.x tracks the revivedsmoldot-light1.x line and ships the stablelight-clientfeature. No behavior change intended — the diff is a mechanical adaptation to the redesigned 0.50 API.API migration applied throughout
api.blocks().subscribe_finalized()→api.stream_blocks(); block-level events viablock.at().await?.events().fetch().storage().at_latest().fetch(&q)→api.at_current_block().await?+storage().try_fetch(addr, (keys,))— storage addresses are now<KeyParts, Value>generic and keys are passed at call time;try_fetchcarries the old Option-returningfetchsemanticskey_bytes()/value().bytes()methods; the raw key layout (and existing offset math) is unchangedthunk.to_value()→value.decode(), which now yieldsValue<()>instead ofValue<u32>, so decode-helper signatures drop the type-id contextconstants().at(..)→at_current_block().constants().entry(..);api.tx()→at.transactions()(dynamic tx payload construction is unchanged)variant_name()→event_name(),field_values()→decode_fields_unchecked_asfetch_rawmissing values now surface asStorageError::NoValueFoundinstead ofOk(None); call sites match that variant explicitly to preserve the existing error stringsNotes for reviewers
at_current_block()results must be bound to a variable that outlives every storage read made through them (storage clients and values borrow theClientAtBlock), which accounts for the recurringlet at = ...shape at the call sites.One semantic change is inherited from subxt 0.50 rather than introduced here: transaction nonces are read from state at the anchored finalized block instead of the pool-aware
system_accountNextIndex. A transaction submitted within one finality lag of a previous same-signer transaction from another process can therefore be rejected asStale; in-process flows are unaffected because every submission waits for finalization before the next one.Verified beyond CI: the full live zombienet flows (
just demo,fs-demo-ci,s3-demo-ci) pass against a running relay + parachain + provider on this branch.Part of the #222 sequence; the event-driven coordinator redesign and the opt-in smoldot transport follow as stacked PRs.