Skip to content

[DRAFT] Upgrade polkadot-sdk to 2412#2298

Closed
shannonwells wants to merge 26 commits intomainfrom
upgrade-step-2409
Closed

[DRAFT] Upgrade polkadot-sdk to 2412#2298
shannonwells wants to merge 26 commits intomainfrom
upgrade-step-2409

Conversation

@shannonwells
Copy link
Copy Markdown
Collaborator

@shannonwells shannonwells commented Mar 26, 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
  • As part of transition to OpenGov, changes to Treasury proposals
  • 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
  • e2e Tests passing
  • Benchmark added for SignedExtensions/TransactionExtensions
  • Spec version incremented
  • Check the release notes for 1.13.0 -> stable2407 -> stable2409 -> stable2412 for migrations
  • Verified prometheus endpoint is returning data
  • Running Benchmarks for everything else
  • make sure there are no migrations for the pallets we use
  • Make sure the amounts we charge for frequent extrinsic are kinda close

type WeightInfo = weights::pallet_collective_council::SubstrateWeight<Runtime>;
type SetMembersOrigin = EnsureRoot<Self::AccountId>;
type MaxProposalWeight = MaxCollectivesProposalWeight;
// TODO: what to use for DisapproveOrigin,KillOrigin,Consideration
Copy link
Copy Markdown
Collaborator

@wilwade wilwade Mar 28, 2025

Choose a reason for hiding this comment

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

I am good with the values you have. 2/3 is reasonable and I don't think we need a Consideration cost at this time.

Same for the Technical Committee

  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
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 3, 2025

Codecov Report

Attention: Patch coverage is 88.11189% with 17 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
pallets/capacity/src/lib.rs 0.00% 5 Missing ⚠️
pallets/frequency-tx-payment/src/lib.rs 84.37% 5 Missing ⚠️
pallets/passkey/src/lib.rs 94.59% 4 Missing ⚠️
pallets/frequency-tx-payment/src/payment.rs 80.00% 3 Missing ⚠️
Files with missing lines Coverage Δ
common/primitives/src/capacity.rs 75.00% <ø> (ø)
pallets/handles/src/handles_signed_extension.rs 60.52% <ø> (ø)
pallets/msa/src/lib.rs 88.19% <ø> (-0.26%) ⬇️
pallets/passkey/src/tests_v2.rs 100.00% <100.00%> (ø)
pallets/frequency-tx-payment/src/payment.rs 81.48% <80.00%> (-5.19%) ⬇️
pallets/passkey/src/lib.rs 95.23% <94.59%> (-1.63%) ⬇️
pallets/capacity/src/lib.rs 93.95% <0.00%> (-0.90%) ⬇️
pallets/frequency-tx-payment/src/lib.rs 82.45% <84.37%> (-0.43%) ⬇️

... and 24 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

default = ["std"]
runtime-benchmarks = [
"frame-benchmarking/runtime-benchmarks",
"frame-support/runtime-benchmarks",
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@aramikm added these lines to allow pallet to be built, tested & debugged from inside the pallet directory

aramikm and others added 4 commits April 8, 2025 11:10
Co-authored-by: Joe Caputo <joseph.caputo@unfinished.com>
Co-authored-by: Joe Caputo <joseph.caputo@unfinished.com>
…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 <aramikm@gmail.com>
Co-authored-by: Joe Caputo <joseph.caputo@projectliberty.io>
@aramikm
Copy link
Copy Markdown
Collaborator

aramikm commented Apr 8, 2025

Replaced with #2315

@aramikm aramikm closed this Apr 8, 2025
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.

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

4 participants