Bump subxt to 0.50#12096
Conversation
- Migrate .number()/.hash() to .block_number()/.block_hash() on at-block handles - Update MockBlockInfo number field literals to u64 (SubstrateBlockNumber widened) - tx_client needs mut for create_signed (now takes &mut self) - node_client.tx() is async in 0.50, requires .await before chaining - find_first returns Option<Result<...>> not Result<Option<...>> - system::calls::Remark field renamed from value to remark
subxt 0.50.1's SubstrateConfigBuilder::set_genesis_hash stores the value but build() drops it, and the Config trait's genesis_hash() defaults to None. As a result, create_signable_offline fails at runtime with GenesisHashNotProvided. PolkadotConfig has the same issue since it delegates to SubstrateConfig. Wrap SubstrateConfig in a local OfflineConfig that holds the genesis hash and returns it from genesis_hash(). The remaining Config methods delegate to the inner SubstrateConfig.
|
Blocked by paritytech/subxt#2236. Will re-open the PR once a new version of subxt gets released. |
@RomarQ Looks like the fix in subxt should now be available? |
Waiting for a new version of subxt to be released. But can fix the conflicts in the meanwhile. |
…t-0.50 # Conflicts: # cumulus/zombienet/zombienet-sdk/Cargo.toml # substrate/client/statement-store/statement-latency-bench/Cargo.toml # substrate/frame/revive/rpc/src/client/runtime_api.rs # substrate/frame/revive/rpc/src/lib.rs
…t-0.50 # Conflicts: # Cargo.lock # substrate/frame/revive/rpc/src/client.rs # substrate/frame/revive/rpc/src/client/runtime_api.rs # substrate/frame/revive/rpc/src/lib.rs # substrate/frame/revive/rpc/src/receipt_provider.rs
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
subxt 0.50 removed OnlineClient::blocks(); fetch the receipt's block via at_block(number) instead of blocks().at_latest(). Header access is now the async block_header(), and block extrinsics come from extrinsics().fetch(). iter() yields Results, so propagate the error before decoding into OpaqueExtrinsic.
The workspace subxt is now 0.50, but zombienet-sdk still depends on subxt 0.44 and its client API (node.wait_client, OnlineClient) is typed against that version. The zombienet test crates are coupled to that API, so they cannot use the 0.50 workspace subxt. Route them through zombienet_sdk::subxt / zombienet_sdk::subxt_signer (the 0.44 re-export) and drop their direct subxt deps, so no subxt 0.44 pin appears in any Cargo.toml; it stays only as a transitive dependency of zombienet-sdk. - substrate, polkadot: drop direct subxt/subxt-signer deps and use the zombienet_sdk re-exports. - polkadot weights.rs: point the subxt codegen macro at ::zombienet_sdk::subxt::ext::subxt_core. - cumulus runtime_upgrade.rs: build the big-message client via jsonrpsee (zombienet_sdk::subxt::ext::jsonrpsee) rather than the reconnecting client, which is not enabled in zombienet-sdk's default subxt features.
- Use a `subxt` module alias (`use zombienet_sdk::subxt::{self, ...}`) in
block_building.rs and beefy_and_mmr.rs so call sites keep the bare `subxt::`
paths instead of repeating `zombienet_sdk::subxt::` at each use.
- Drop the now-dead `reconnecting-rpc-client` feature from the cumulus subxt
dependency; nothing uses the reconnecting client after runtime_upgrade.rs
moved to a plain jsonrpsee ws client (`native` is still needed for the 0.50
statement-store client).
- Apply the `crate = "::zombienet_sdk::subxt::ext::subxt_core"` codegen override
to the two subxt macros in coretime_revenue.rs that were missed; they only
compile under `--features zombie-metadata,zombie-ci` (what CI uses), so the
earlier zombie-ci-only check did not catch them.
check-semver detected larger changes than the prdoc declared: - frame-benchmarking-cli is a major bump: DynamicRemarkBuilder lost its generic Config parameter (now uses an internal wrapper config). - polkadot-omni-node-lib and sc-statement-store are minor, not patch.
check-semver flags pallet-revive as changed-but-not-listed: it depends on subxt-signer, which this PR bumps 0.44 -> 0.50. The dependency is behind a non-default feature, so there is no public API change (detected as "Dependency changed", not a major/minor API change); declare a minor bump.
ggwpez
left a comment
There was a problem hiding this comment.
Some grumbles in the pre-existing code, feel free to ignore.
…string
- extrinsic.rs: use `find_first().transpose()?` to match the previous
`find_first()?` behaviour (propagate decode errors, ignore a missing event).
- remark-extrinsic.rs: propagate decode errors instead of silently dropping
them via `filter_map(Result::ok)`; the previous `unwrap` was intentional.
- runtime_api.rs: document that the "is not found" match originates from
sc-executor ("Exported method <name> is not found").
|
Can we put this in the merge queue? |
marian-radu
left a comment
There was a problem hiding this comment.
Revive changes look good to me, thank you!
…t-0.50 # Conflicts: # Cargo.lock
Address review: match on decode_call_data_fields_as and warn when an extrinsic is a revive EthTransact call but its fields fail to decode, so the dropped transaction is visible in logs instead of vanishing.
…e/bump-subxt-0.50
… arm Address review: split the catch-all match arm so a failed ContractEmitted field decode logs the underlying error, and document that None is unreachable because is_event() already confirmed the variant.
Head branch was pushed to by a user without write access
Address review: inspect_err on at_block_hash_and_number so a failure to resolve the block for an eth_block_hash query is logged at debug before being swallowed by .ok()?.
Addressed the nits 👍 Can you add it to the merge queue? |
be832f6
PR paritytech#12096 bumped the workspace subxt/subxt-signer pin to 0.50 and moved the statement-store and zombienet-sdk crates onto workspace = true, so the ignore list (which existed to let them pin 0.50 while the workspace was on 0.44) no longer suppresses anything. Two entries also referenced the removed statement-latency-bench crate. The inheritance check stays green without it.
Blocked by paritytech/subxt#2236
Follow-up to #11422.
Bumps the workspace
subxt,subxt-metadata, andsubxt-signerdependencies from 0.44 to 0.50.subxt 0.50 introduces a block-anchored client API and splits
subxt::Errorinto per-operation sub-errors. Affected crates were updated to the new API; the JSON-RPC and CLI surfaces are unchanged.