Skip to content

Upgrade to unstable2507#1029

Merged
bkchr merged 37 commits into
polkadot-fellows:mainfrom
TorstenStueber:main
Dec 17, 2025
Merged

Upgrade to unstable2507#1029
bkchr merged 37 commits into
polkadot-fellows:mainfrom
TorstenStueber:main

Conversation

@TorstenStueber

Copy link
Copy Markdown
Contributor

This upgrades polkadot-sdk crates to the latest version of unstable2507. The main change is the following backport: paritytech/polkadot-sdk#10552.

This is an important step for upgrading the Kusama AH runtime to the latest version of pallet-revive with:

  • EVM backend
  • Ethereum block storage
  • New gas mapping


impl pallet_transaction_payment::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type OnChargeTransaction = impls::tx_payment::FungiblesAdapter<

@TorstenStueber TorstenStueber Dec 10, 2025

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Reasoning for this change: Using FungiblesAdapter (plural) for NativeAndAsset and DotLocation is the same as using FungibleAdapter (singular) with Balances because NativeAndAsset will just forward all calls to Balances for DotLocation.

Comment thread Cargo.toml
pallet-election-provider-multi-block = { version = "0.3.4", default-features = false }
pallet-staking-async = { version = "0.6.2", default-features = false }
pallet-election-provider-multi-block = { version = "0.5.0", default-features = false }
pallet-staking-async = { version = "0.7.0", default-features = false }

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.

@kianenigma anything to do when bumping these?

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.

No changes needed for this bump.

type OnChargeTransaction =
pallet_transaction_payment::FungibleAdapter<Balances, ResolveTo<StakingPot, Balances>>;
type WeightToFee = WeightToFee;
type WeightToFee = pallet_revive::evm::fees::BlockRatioFee<333333333, 10_815_700_000_000, Self>;

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.

Where do these numbers come from?

@TorstenStueber TorstenStueber Dec 11, 2025

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This encodes the same fraction as the one in the WeightToFeePolynomial used in WeightToFee, which is defined as:

  • numerator: super::currency::CENTS
    • this is 1_000_000_000_000 / 30 / 100 = 333_333_333
  • denominator: 100 * Balance::from(ExtrinsicBaseWeight::get().ref_time())
    • this is 100 * 1_000 * 108_157 = 10_815_700_000

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I corrected the value that was here before, it was wrongly calculated.

@ggwpez ggwpez Dec 11, 2025

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.

Maybe you can add a sanity check test to ensure that the fee of a simple transaction is sane?
And please put the calculation into a comment above the code so that we can reproduce it later.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I added a comment with explanation.

Comment thread system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs Outdated
Comment thread system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs
Comment thread system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs
@athei

athei commented Dec 10, 2025

Copy link
Copy Markdown
Contributor

/cmd bench --runtime asset-hub-kusama --pallet pallet_revive

Comment thread system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs
Comment thread system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_revive.rs Outdated
Comment thread system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs Outdated
Comment thread system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs Outdated
@github-actions

Copy link
Copy Markdown

Command "bench --runtime asset-hub-kusama --pallet pallet_revive" has started 🚀 See logs here

@github-actions

Copy link
Copy Markdown

Command "bench --runtime asset-hub-kusama --pallet pallet_revive" has finished ✅ See logs here

Details

Subweight results:

No changes found.

@athei

athei commented Dec 11, 2025

Copy link
Copy Markdown
Contributor

/cmd fmt

type OnChargeTransaction =
pallet_transaction_payment::FungibleAdapter<Balances, ResolveTo<StakingPot, Balances>>;
type WeightToFee = WeightToFee;
type WeightToFee = pallet_revive::evm::fees::BlockRatioFee<333333333, 10_815_700_000, Self>;

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.

can you add a comment here explaining the used WeightToFee? I'm sure it will not age well without clear docs/code-comments..

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I added a comment with explanation.

type DepositPerChildTrieItem = DepositPerChildTrieItem;
type DepositPerByte = DepositPerByte;
type WeightPrice = pallet_transaction_payment::Pallet<Self>;
// TODO(#840): use `weights::pallet_revive::WeightInfo` here

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.

with the new pallet-revive version you should be able to fix this too, right?

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.

I believe the benchmark is still not fixed. Also we need solc to be installed on the benchmarking bot. We don't have time to get this done right now.

Comment thread Cargo.toml
Comment on lines +220 to +237
snowbridge-outbound-queue-runtime-api = { version = "0.17.0", default-features = false }
snowbridge-outbound-queue-v2-runtime-api = { version = "0.6.0", default-features = false }
snowbridge-outbound-queue-primitives = { version = "0.6.0", default-features = false }
snowbridge-pallet-ethereum-client = { version = "0.17.0", default-features = false }
snowbridge-pallet-inbound-queue = { version = "0.17.0", default-features = false }
snowbridge-pallet-inbound-queue-v2 = { version = "0.6.0", default-features = false }
snowbridge-pallet-inbound-queue-fixtures = { version = "0.25.0" }
snowbridge-pallet-ethereum-client-fixtures = { version = "0.25.0" }
snowbridge-pallet-outbound-queue = { version = "0.17.0", default-features = false }
snowbridge-pallet-outbound-queue-v2 = { version = "0.6.0", default-features = false }
snowbridge-pallet-system = { version = "0.17.0", default-features = false }
snowbridge-pallet-system-v2 = { version = "0.6.0", default-features = false }
snowbridge-pallet-system-frontend = { version = "0.6.0", default-features = false }
snowbridge-inbound-queue-primitives = { version = "0.6.0", default-features = false }
snowbridge-runtime-common = { version = "0.18.0", default-features = false }
snowbridge-runtime-test-common = { version = "0.20.0" }
snowbridge-system-runtime-api = { version = "0.17.0", default-features = false }
snowbridge-system-v2-runtime-api = { version = "0.6.0", default-features = false }

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.

@claravanstaden please confirm the snowbridge pallet versions bump

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.

All of the version bumps are just because of crate dependency changes.

@github-actions

Copy link
Copy Markdown

Command "fmt" has started 🚀 See logs here

@github-actions

Copy link
Copy Markdown

Command "fmt" has failed ❌! See logs here

@claravanstaden claravanstaden 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.

To bump to the latest: https://matrix.to/#/!cqAmzdIcbOFwrdrubV:parity.io/$Kygjlcxk58wiMVkbVeiK1mAfZtLnkB8i-oVBPnoIb5I?via=parity.io&via=matrix.org&via=web3.foundation

The other Snowbridge crate bumps are correct, its just because the Snowbridge crate dependency updates.

Comment thread Cargo.toml Outdated
@TorstenStueber

Copy link
Copy Markdown
Contributor Author

To bump to the latest: https://matrix.to/#/!cqAmzdIcbOFwrdrubV:parity.io/$Kygjlcxk58wiMVkbVeiK1mAfZtLnkB8i-oVBPnoIb5I?via=parity.io&via=matrix.org&via=web3.foundation

The other Snowbridge crate bumps are correct, its just because the Snowbridge crate dependency updates.

I bumped that crate.

@athei

athei commented Dec 16, 2025

Copy link
Copy Markdown
Contributor

The failures for kusama are actually real. We are missing this migration:
https://paritytech.github.io/polkadot-sdk/master/pallet_revive/migrations/v2/struct.Migration.html

Needs to be added to the pallet_migrations::Config:Migrations tuple.

@acatangiu

Copy link
Copy Markdown
Contributor

@athei @TorstenStueber the asset-hub-kusama check-migrations is still failing for pallet-revive 😢

@athei

athei commented Dec 17, 2025

Copy link
Copy Markdown
Contributor

Should be fixed by paritytech/polkadot-sdk#10680

@github-actions github-actions Bot requested a review from acatangiu December 17, 2025 17:43
@bkchr bkchr merged commit f56d87d into polkadot-fellows:main Dec 17, 2025
60 of 64 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants