Skip to content

Bump subxt to 0.50#12096

Merged
marian-radu merged 30 commits into
paritytech:masterfrom
RomarQ:chore/bump-subxt-0.50
Jul 15, 2026
Merged

Bump subxt to 0.50#12096
marian-radu merged 30 commits into
paritytech:masterfrom
RomarQ:chore/bump-subxt-0.50

Conversation

@RomarQ

@RomarQ RomarQ commented May 18, 2026

Copy link
Copy Markdown
Contributor

Blocked by paritytech/subxt#2236

Follow-up to #11422.

Bumps the workspace subxt, subxt-metadata, and subxt-signer dependencies from 0.44 to 0.50.

subxt 0.50 introduces a block-anchored client API and splits subxt::Error into per-operation sub-errors. Affected crates were updated to the new API; the JSON-RPC and CLI surfaces are unchanged.

@RomarQ
RomarQ marked this pull request as ready for review May 18, 2026 16:51
@RomarQ
RomarQ requested a review from a team as a code owner May 18, 2026 16:51
RomarQ added 3 commits May 18, 2026 20:37
- 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.
@RomarQ
RomarQ marked this pull request as draft May 18, 2026 20:35
@RomarQ

RomarQ commented May 18, 2026

Copy link
Copy Markdown
Contributor Author

Blocked by paritytech/subxt#2236. Will re-open the PR once a new version of subxt gets released.

@RomarQ RomarQ closed this May 18, 2026
@acatangiu

acatangiu commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

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?

@acatangiu acatangiu reopened this Jun 22, 2026
@RomarQ

RomarQ commented Jun 22, 2026

Copy link
Copy Markdown
Contributor Author

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.

RomarQ added 2 commits June 22, 2026 13:25
…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
@socket-security

socket-security Bot commented Jul 11, 2026

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatedcargo/​subxt@​0.50.0 ⏵ 0.50.2601009410090
Updatedcargo/​subxt-metadata@​0.50.0 ⏵ 0.50.21001009410090
Updatedcargo/​subxt-signer@​0.50.0 ⏵ 0.50.21001009310090
Updatedcargo/​async-channel@​2.3.0 ⏵ 2.5.010010093100100

View full report

@RomarQ
RomarQ marked this pull request as ready for review July 11, 2026 12:29
RomarQ and others added 6 commits July 11, 2026 15:31
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.
@bkchr bkchr added T17-primitives Changes to primitives that are not covered by any other label. and removed T17-primitives Changes to primitives that are not covered by any other label. labels Jul 13, 2026

@ggwpez ggwpez left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some grumbles in the pre-existing code, feel free to ignore.

Comment thread substrate/frame/revive/rpc/examples/extrinsic.rs Outdated
Comment thread substrate/frame/revive/rpc/examples/remark-extrinsic.rs Outdated
Comment thread substrate/frame/revive/rpc/src/client/runtime_api.rs
Comment thread substrate/frame/revive/rpc/src/client/runtime_api.rs
RomarQ and others added 3 commits July 13, 2026 17:29
…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").
@RomarQ

RomarQ commented Jul 14, 2026

Copy link
Copy Markdown
Contributor Author

@bkchr @acatangiu @ggwpez

Can we put this in the merge queue?

@bkchr
bkchr enabled auto-merge July 14, 2026 15:56
Comment thread substrate/frame/revive/rpc/src/receipt_extractor.rs Outdated
Comment thread substrate/frame/revive/rpc/src/receipt_extractor.rs Outdated
Comment thread substrate/frame/revive/rpc/src/receipt_extractor.rs Outdated

@marian-radu marian-radu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revive changes look good to me, thank you!

RomarQ added 4 commits July 15, 2026 10:36
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.
… 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.
auto-merge was automatically disabled July 15, 2026 09:44

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()?.
@RomarQ

RomarQ commented Jul 15, 2026

Copy link
Copy Markdown
Contributor Author

Revive changes look good to me, thank you!

Addressed the nits 👍

Can you add it to the merge queue?

@marian-radu
marian-radu enabled auto-merge July 15, 2026 09:55
@marian-radu
marian-radu added this pull request to the merge queue Jul 15, 2026
Merged via the queue into paritytech:master with commit be832f6 Jul 15, 2026
404 of 412 checks passed
RomarQ added a commit to RomarQ/polkadot-sdk that referenced this pull request Jul 15, 2026
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.
@RomarQ
RomarQ deleted the chore/bump-subxt-0.50 branch July 16, 2026 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

R0-no-crate-publish-required The change does not require any crates to be re-published.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants