Skip to content

Fix breaking smoke tests #1472

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Fix breaking smoke tests #1472

wants to merge 5 commits into from

Conversation

yrong
Copy link
Contributor

@yrong yrong commented May 12, 2025

It seems that subxt is not compatible with the recent master branch of polkadot-sdk. An error is raised when generating Substrate binds, as shown below.

➜  smoketest git:(ron/on-demand-relay-beefy) ✗ ./make-bindings.sh
[⠊] Compiling...
No files changed, compilation skipped
Warning: `--ethers` bindings are deprecated and will be removed in the future. Consider using `--alloy` (default) instead.
Generating bindings for 13 contracts
Bindings have been generated to src/contracts
/Users/yangrong/.cargo/bin/subxt
The application panicked (crashed).
Message:  Unknown prelude type 'Duration'
Location: /Users/yangrong/.cargo/registry/src/index.crates.io-6f17d22bba15001f/scale-typegen-0.9.0/src/typegen/type_path.rs:219

  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
                                ⋮ 8 frames hidden ⋮
   9: scale_typegen::typegen::type_path::TypePathType::from_type_def_path::hd60a9ddca6887b09
      at <unknown source file>:<unknown line>
  10: scale_typegen::typegen::TypeGenerator::type_path_maybe_with_substitutes::h5addbacf2d185302
      at <unknown source file>:<unknown line>
  11: scale_typegen::typegen::TypeGenerator::resolve_type_path_recurse::h51ede92a96c0b0a7
      at <unknown source file>:<unknown line>

So I upgraded Subxt for compatibility. The main change in this PR addresses the breaking changes introduced in v0.39.0.

@yrong yrong marked this pull request as draft May 12, 2025 13:19
@yrong yrong marked this pull request as ready for review May 14, 2025 08:09
@yrong yrong requested a review from claravanstaden May 14, 2025 08:09
@@ -222,7 +222,7 @@ func (r *Relay) fetchUnprocessedParachainNonces(latest uint64) ([]uint64, error)
latestBucket := latest / 128

for b := uint64(0); b <= latestBucket; b++ {
encodedBucket, err := types.EncodeToBytes(types.NewU128(*big.NewInt(int64(b))))
encodedBucket, err := types.EncodeToBytes(types.NewU64(b))
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this related to the subxt change?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nope, it's to coordinate with paritytech/polkadot-sdk#8240, which includes an optimized SparseBitmap.

Copy link
Contributor

Choose a reason for hiding this comment

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

Good catch, thank you @yrong!

@yrong
Copy link
Contributor Author

yrong commented May 15, 2025

@claravanstaden Seems like some inbound V2 smoke tests are failing, potentially related to PR#8376. I'll double-check and apply fixes if needed.

@yrong yrong marked this pull request as draft May 15, 2025 05:32
@yrong yrong changed the title Update smoke tests Fix breaking smoke tests May 15, 2025
@yrong yrong marked this pull request as ready for review May 16, 2025 07:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants