Skip to content

Upgrade: stable2412#2315

Merged
aramikm merged 41 commits intomainfrom
upgrade-step-2412
Apr 11, 2025
Merged

Upgrade: stable2412#2315
aramikm merged 41 commits intomainfrom
upgrade-step-2412

Conversation

@aramikm
Copy link
Collaborator

@aramikm aramikm commented Apr 8, 2025

Goal

The goal of this PR is to upgrade polkadot-sdk from polkadot-v1.13.0 to stable2412 release.

Closes #2255

Discussion

Most significant updates affecting Frequency in rough order, from most to least:

  • SignedExtensionsTransactionExtensions
  • Fork-aware transaction pool
  • Ols Treasury pallet is pulled in and we are going to use that going forward due to changes getting applied to that pallet which is not comatible with our current governance
  • sc-network, litep2p updates
  • rpc config refactor

Checklist

  • Upgraded to 2407, running in instant-seal mode
  • Upgraded to 2409, running in instant-seal mode
  • Running 2412 in instant-seal mode with commented-out code in passkey, frequency-tx-payment, msa pallets
  • Make a Council sub-Treasury (possible solution to Treasury changes)
    • Simple setup using Root or Council for spending
  • TechnicalCommittee, Council: correct DisapproveOrigin, KillOrigin (@wilwade)
  • Running in instant-seal mode, no commented-out code
  • Fork-aware mode working
  • Unit tests passing
  • Spec version incremented
  • Verified prometheus endpoint is returning data
  • e2e Tests passing
    • A few test related to treasury are commented out since they might not make sense anymore
  • Benchmark added for SignedExtensions/TransactionExtensions
    • I think we can skip this for this release since we they are still lightweight and we didn't change anything major.
  • Running Benchmarks
  • make sure there are no migrations for the pallets we use
  • Make sure the amounts we charge for frequent extrinsic are kinda close
  • Do we need to change anything related to removal of unsafe?

shannonwells and others added 26 commits March 26, 2025 17:43
Get passkey code working with stable2412
  only the first rpc address in the parachain config.
* bunch of allow(deprecated) to try to shut the compiler up
* some other fixing of compiler warnings, remove todos and debugging
  comments
* note why the `add_onchain_message` benchmark is failing
* use sp_std::Borrow::Cow
…2314)

# Goal
Fixes the double-charge problem and undoes some of the hacks used to
make some e2e tests pass.

Followed the model of ChargeTransactionPayment and created a
`can_withdraw_fee` function in the Nontransferable trait. Then this is
used by `validate` and `withdraw_fee` is only used in `pre_dispatch`.

Following the guidance/direction from Parity, we do not perform the
validation steps twice so `withdraw_fee` doesn't call
`can_withdraw_fee`.

This also required adding a `replenishable_balance` to the
Nontransferable trait, which isn't what I'd prefer but the trait
generics required it, otherwise it was a mismatch of Balance types.

---------

Co-authored-by: Aramik <[email protected]>
Co-authored-by: Joe Caputo <[email protected]>
@aramikm aramikm requested a review from wilwade as a code owner April 8, 2025 18:35
@aramikm aramikm marked this pull request as draft April 8, 2025 18:35
@aramikm aramikm mentioned this pull request Apr 8, 2025
16 tasks
@github-actions github-actions bot added metadata-changed Metadata has changed since the latest full release and removed metadata-changed Metadata has changed since the latest full release labels Apr 9, 2025
@github-actions github-actions bot added metadata-changed Metadata has changed since the latest full release and removed metadata-changed Metadata has changed since the latest full release labels Apr 9, 2025
@aramikm aramikm marked this pull request as ready for review April 9, 2025 23:56
@JoeCap08055
Copy link
Collaborator

Odd; just FYI whatever changed in the last couple of commits on this branch required me to do a cargo clean in order to get it to build.

Update Cargo & npm lock files

- Ran cargo clean && make start to get the latest updated dependencies
- Ran npm audit fix in e2e directory
@aramikm aramikm requested a review from demisx as a code owner April 10, 2025 16:33
@github-actions github-actions bot added metadata-changed Metadata has changed since the latest full release and removed metadata-changed Metadata has changed since the latest full release labels Apr 10, 2025
Copy link
Collaborator

@wilwade wilwade left a comment

Choose a reason for hiding this comment

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

Some small changes I found when running things, but everything looked good from a quick review of the code and running local tests on it.

  • Pulled and ran instant and interval sealing without issue (post comment change)
  • Ran e2 tests without issue
  • Reviewed non-test, non-weight related code changes

@github-actions github-actions bot added metadata-changed Metadata has changed since the latest full release and removed metadata-changed Metadata has changed since the latest full release labels Apr 10, 2025
// https://github.com/paritytech/polkadot-sdk/pull/4792
let FullDeps { client, pool, command_sink } = deps;

module.merge(System::new(client.clone(), pool.clone(), deny_unsafe).into_rpc())?;
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

deny_unsafe is removed and incorporated into command line option:
frequency --rpc-methods [auto,safe,unsafe], default = auto
paritytech/polkadot-sdk#4792

// Standard Error: 34
.saturating_add(Weight::from_parts(938, 0).saturating_mul(n.into()))
// Minimum execution time: 41_793_000 picoseconds.
Weight::from_parts(44_390_407, 4177)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Very high jump! In general I see increase the weights but I think this might be due to incorporating the extension weights as part of the extrinsic

*maybe_delegation_info = Some(delegation);
result
})
let result = f(&mut delegation, is_new)?;
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Improved the readability of the code and the linter issue complaining about the result not being changes inside the map.

// Measured: `632`
// Estimated: `6077`
// Minimum execution time: 39_866_000 picoseconds.
Weight::from_parts(40_477_620, 6077)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

A considerable bump in here as well

@github-actions github-actions bot added metadata-changed Metadata has changed since the latest full release and removed metadata-changed Metadata has changed since the latest full release labels Apr 11, 2025
Copy link
Collaborator

@wilwade wilwade left a comment

Choose a reason for hiding this comment

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

All my questions and issues were resolved. Great job team!

Copy link
Collaborator

@JoeCap08055 JoeCap08055 left a comment

Choose a reason for hiding this comment

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

  • Reviewed changes
  • Ran unit tests
  • Ran e2e tests

# Goal

Pulling in and using old Treasury Pallet

This is copied from
https://github.com/paritytech/polkadot-sdk/tree/release-polkadot-v1.13.0
Git Hash d5160c1d567cc73c7df6c816d41e21aa3adb188d
@github-actions github-actions bot added metadata-changed Metadata has changed since the latest full release and removed metadata-changed Metadata has changed since the latest full release labels Apr 11, 2025
@aramikm aramikm merged commit 1320a80 into main Apr 11, 2025
29 checks passed
@aramikm aramikm deleted the upgrade-step-2412 branch April 11, 2025 23:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

metadata-changed Metadata has changed since the latest full release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Upgrade to Polkadot Release polkadot-stable2412-1 (READ WARNINGS)

4 participants