Skip to content
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

Update to SDK stable2409-1 #490

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

Conversation

pandres95
Copy link
Contributor

@pandres95 pandres95 commented Oct 19, 2024

Closes #457
Closes #469

Updating the runtimes to SDK version stable2409-1. CHANGELOG mentions all relevant changes for UI and Walletbuilders.

Checklist

  • Update SDK to stable2409
  • Update configuration for relay chains.
  • Update configuration for system parachains.
  • Update configuration for emulated chains.
  • Update configuration for Encointer (see Help wanted).
  • Update CHANGELOG.
  • Update SDK to stable2409-1

Dependencies

This PR depends on certain PRs to be merged before it can properly work.

Impacts

The success of this PR impacts directly on the feasibility of executing certain issues, or closing certain PRs.

Help wanted

Initially, I request the help of:

  • @franciscoaguirre to help me correcting the potential conflicts that may arise when foreign assets change to XCMv4.
  • @acatangiu to help me setting up the Bridge Hubs, as well as adding the respective transition layer (a.k.a. preparing the migrations from fixed Lanes to LegacyLane-based lanes storage).
  • @clangenb to help me upgrading Encointer.
  • @Szegoo to check the parameters that changed in Coretime.

@pandres95 pandres95 changed the title Upgrade to Polkadot SDK stable2409 Update to Polkadot SDK stable2409 Oct 19, 2024
@pandres95 pandres95 changed the title Update to Polkadot SDK stable2409 Update to SDK stable2409 Oct 19, 2024
@pandres95 pandres95 force-pushed the upgrade-polkadot-stable2409 branch 3 times, most recently from f08d159 to 4b4a252 Compare October 21, 2024 02:23
- Rename `assigner_on_demand` to `on_demand` (SDK #4706)
- [BEEFY] Add runtime support for reporting fork voting (#4522)
- `SchedulerParams` moved from `polkadot_primitives::vstaging`, to `polkadot_primitives`
- `XcmFeeToAccount` -> `SendXcmFeeToAccount`
- Mock Weights
- Rename `assigner_on_demand` to `on_demand` (SDK #4706)
- [BEEFY] Add runtime support for reporting fork voting (SDK #4522)
- `SchedulerParams` moved from `polkadot_primitives::vstaging`, to `polkadot_primitives`
- `XcmFeeToAccount` -> `SendXcmFeeToAccount`
- Mock Weights
- [Assets] Call implementation for `transfer_all` (SDK #4527)
- [bridges-v2] Permissionless lanes (SDK #4949)
- add possibility to inject non-authorities session-keys in genesis (SDK #5078)
- Tx Payment: drop ED requirements for tx payments with exchangeable asset (SDK #4488)
- relax XcmFeeToAccount trait bound on AccountId (SDK #4959)
- [Assets] Call implementation for `transfer_all` (SDK #4527)
- [bridges-v2] Permissionless lanes (SDK #4949)
- add possibility to inject non-authorities session-keys in genesis (SDK #5078)
- Tx Payment: drop ED requirements for tx payments with exchangeable asset (SDK #4488)
- relax XcmFeeToAccount trait bound on AccountId (SDK #4959)
- Bridges V2 refactoring backport and pallet_bridge_messages simplifications (SDK #4935)
- [bridges-v2] Permissionless lanes (SDK #4949)
- add possibility to inject non-authorities session-keys in genesis (SDK #5078)
- Transfer Polkadot-native assets to Ethereum (SDK #5546)
- [stable2049] Backport #5546 (SDK #5710)
- `XcmFeeToAccount` -> `SendXcmFeeToAccount`
- Bridges V2 refactoring backport and pallet_bridge_messages simplifications (SDK #4935)
- [bridges-v2] Permissionless lanes (SDK #4949)
- add possibility to inject non-authorities session-keys in genesis (SDK #5078)
- Transfer Polkadot-native assets to Ethereum (SDK #5546)
- [stable2049] Backport #5546 (SDK #5710)
- `XcmFeeToAccount` -> `SendXcmFeeToAccount`
- [bh polkadot] minor: replace `DOLLARS` with `UNITS` on `BridgeDeposit` storage type
- `XcmFeeToAccount` -> `SendXcmFeeToAccount`
- add possibility to inject non-authorities session-keys in genesis (SDK #5078)
- `XcmFeeToAccount` -> `SendXcmFeeToAccount`
- add possibility to inject non-authorities session-keys in genesis (SDK #5078)
- Coretime auto-renew (SDK #4424)
- Mock Weights
- `XcmFeeToAccount` -> `SendXcmFeeToAccount`
- add possibility to inject non-authorities session-keys in genesis (SDK #5078)
- Coretime auto-renew (SDK #4424)
- Mock Weights
- `XcmFeeToAccount` -> `SendXcmFeeToAccount`
- add possibility to inject non-authorities session-keys in genesis (SDK #5078)
- `XcmFeeToAccount` -> `SendXcmFeeToAccount`
- add possibility to inject non-authorities session-keys in genesis (SDK #5078)
- add possibility to inject non-authorities session-keys in genesis (SDK #5078)
@pandres95 pandres95 marked this pull request as ready for review October 21, 2024 07:38
@clangenb
Copy link
Contributor

I can probably squeeze it in later this week. 👍

@pandres95
Copy link
Contributor Author

Opened for review with a small caveat: tests will keep failing, until #472 is merged and can be merged back to this branch.

Copy link
Contributor

@Szegoo Szegoo left a comment

Choose a reason for hiding this comment

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

The Coretime chain related changes look good to me.

@franciscoaguirre
Copy link
Contributor

What's the state of this? Only needs reviews?

@pandres95
Copy link
Contributor Author

Only reviews @franciscoaguirre. There are some "failing" migrations, but the failure is related to the spec version. Once we bump, those errors should disappear.

@pandres95
Copy link
Contributor Author

/cmd help

Copy link

github-actions bot commented Nov 6, 2024

Command "help" has started 🚀 See logs here

Copy link

github-actions bot commented Nov 6, 2024

Command "help" has failed ❌! See logs here

@pandres95
Copy link
Contributor Author

/cmd --help

Copy link

github-actions bot commented Nov 6, 2024

Command help:
usage: /cmd  [--help] {bench,fmt} ...

A command runner for polkadot runtimes repo

positional arguments:
  {bench,fmt}  a command to run
    bench      Runs benchmarks
    fmt        Formats code

options:
  --help       help for help if you need some help

### Command 'bench'
usage: /cmd bench [-h] [--continue-on-fail] [--quiet] [--clean]
                  [--runtime [{polkadot,kusama,glutton-kusama,asset-hub-kusama,asset-hub-polkadot,bridge-hub-kusama,bridge-hub-polkadot,collectives-polkadot,coretime-kusama,coretime-polkadot,people-kusama,people-polkadot,encointer-kusama} ...]]
                  [--pallet [PALLET ...]]

options:
  -h, --help            show this help message and exit
  --continue-on-fail    Won't exit(1) on failed command and continue with next
                        steps. Helpful when you want to push at least
                        successful pallets, and then run failed ones
                        separately
  --quiet               Won't print start/end/failed messages in Pull Request
  --clean               Clean up the previous bot's & author's comments in
                        Pull Request which triggered /cmd
  --runtime [{polkadot,kusama,glutton-kusama,asset-hub-kusama,asset-hub-polkadot,bridge-hub-kusama,bridge-hub-polkadot,collectives-polkadot,coretime-kusama,coretime-polkadot,people-kusama,people-polkadot,encointer-kusama} ...]
                        Runtime(s) space separated
  --pallet [PALLET ...]
                        Pallet(s) space separated

**Examples**:

 > runs all benchmarks
 
 /cmd bench
 
 > runs benchmarks for pallet_balances and pallet_multisig for all runtimes which have these pallets
 > --quiet makes it to output nothing to PR but reactions
 
 /cmd bench --pallet pallet_balances pallet_xcm_benchmarks::generic --quiet
 
 > runs bench for all pallets for polkadot runtime and continues even if some benchmarks fail
 
 /cmd bench --runtime polkadot --continue-on-fail 
 
 > does not output anything and cleans up the previous bot's & author command triggering comments in PR 
 
 /cmd bench --runtime polkadot kusama --pallet pallet_balances pallet_multisig --quiet --clean 

 


### Command 'fmt'
usage: /cmd fmt [-h] [--continue-on-fail] [--quiet] [--clean]

options:
  -h, --help          show this help message and exit
  --continue-on-fail  Won't exit(1) on failed command and continue with next
                      steps. Helpful when you want to push at least successful
                      pallets, and then run failed ones separately
  --quiet             Won't print start/end/failed messages in Pull Request
  --clean             Clean up the previous bot's & author's comments in Pull
                      Request which triggered /cmd

CHANGELOG.md Show resolved Hide resolved
@pandres95 pandres95 requested a review from Ank4n November 7, 2024 02:05
@pandres95
Copy link
Contributor Author

@SBalaguer @anaelleltd just to mention this PR aims to update the Polkadot SDK version of the runtimes to the latest stable one (stable2409-1).

…n instead of 1.3.4

Also, fixes a broken link.
Ank4n and others added 2 commits November 9, 2024 08:22
* add delegated staking to kusama

* delegate stake in polkadot

* fmt

* comment

* update delegated staking pallet

* fix comment

* make slashes go to the treasury

* update changelog

* fmt
Copy link
Contributor

@eskimor eskimor left a comment

Choose a reason for hiding this comment

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

LGTM (not an expert on most of the changed code). Someone from bridges should certainly double-check.


type ByteFee = xcm_config::bridging::XcmBridgeHubRouterByteFee;
type FeeAsset = xcm_config::bridging::XcmBridgeHubRouterFeeAssetId;
// TODO: @bkontur - change to `report_bridge_status` when patched - FAIL-CI
Copy link
Contributor

Choose a reason for hiding this comment

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

@bkontur will this be done before the release?

Copy link
Contributor

Choose a reason for hiding this comment

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

Well, the truth is, we missed the last stable202409 patch release on 14.11 with this PR. However, we are targeting the next stable202409 release on 2024-12-12.

Actually, I am working now on small nits/fixes/workarounds for this PR, should be ready today and I will remove this TODO.

Copy link
Contributor

Choose a reason for hiding this comment

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

this TODO: is removed as a part of pandres95#7

relay/polkadot/src/lib.rs Outdated Show resolved Hide resolved
relay/kusama/src/lib.rs Outdated Show resolved Hide resolved
@anaelleltd
Copy link
Collaborator

To reviewers:
Please take care to double check this update carefully and advise if there are potential breaking changes or disruptions for ecosystem builders.
If any, please ping @anaelleltd or @SBalaguer in your detailed commentary so that we can notify ecosystem teams with the critical information.

Copy link
Contributor

@bkontur bkontur left a comment

Choose a reason for hiding this comment

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

partial feedback, still not finished

@@ -380,6 +385,8 @@ impl pallet_mmr::Config for Runtime {
type WeightInfo = ();
type LeafData = pallet_beefy_mmr::Pallet<Runtime>;
type BlockHashProvider = pallet_mmr::DefaultBlockHashProvider<Runtime>;
#[cfg(feature = "runtime-benchmarks")]
type BenchmarkHelper = ();
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't this be better like this?
According to the stable2409 branch: https://github.com/paritytech/polkadot-sdk/blob/stable2409/polkadot/runtime/westend/src/lib.rs#L427

Suggested change
type BenchmarkHelper = ();
type BenchmarkHelper = parachains_paras::benchmarking::mmr_setup::MmrSetup<Runtime>;

@@ -367,6 +372,8 @@ impl pallet_mmr::Config for Runtime {
type WeightInfo = ();
type LeafData = pallet_beefy_mmr::Pallet<Runtime>;
type BlockHashProvider = pallet_mmr::DefaultBlockHashProvider<Runtime>;
#[cfg(feature = "runtime-benchmarks")]
type BenchmarkHelper = ();
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't this be better like this?
According to the stable2409 branch: https://github.com/paritytech/polkadot-sdk/blob/stable2409/polkadot/runtime/westend/src/lib.rs#L427

Suggested change
type BenchmarkHelper = ();
type BenchmarkHelper = parachains_paras::benchmarking::mmr_setup::MmrSetup<Runtime>;

Comment on lines +256 to +257
// TODO: @acatangiu (bridges-v2) - add `LocalXcmChannelManager` impl - https://github.com/paritytech/parity-bridges-common/issues/3047
// @acatangiu
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// TODO: @acatangiu (bridges-v2) - add `LocalXcmChannelManager` impl - https://github.com/paritytech/parity-bridges-common/issues/3047
// @acatangiu
// TODO: @bkontur (bridges-v2) - add impl - FAIL-CI

Copy link
Contributor

Choose a reason for hiding this comment

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

type AllowWithoutBridgeDeposit =
RelayOrOtherSystemParachains<AllSiblingSystemParachains, Runtime>;

// TODO: @acatangiu (bridges-v2) - add `LocalXcmChannelManager` impl - https://github.com/paritytech/parity-bridges-common/issues/3047
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// TODO: @acatangiu (bridges-v2) - add `LocalXcmChannelManager` impl - https://github.com/paritytech/parity-bridges-common/issues/3047
// TODO: @bkontur (bridges-v2) - add impl - FAIL-CI

Copy link
Contributor

Choose a reason for hiding this comment

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

Comment on lines +516 to +520
// TODO: @bkontur or @acatangiu, please confirm if this chain will be used at all.
pub const PolkadotNetwork: NetworkId = NetworkId::Polkadot;
pub const EthereumNetwork: NetworkId = NetworkId::Ethereum { chain_id: 1 };
// TODO: @bkontur or @acatangiu, please confirm if this should be in the configuration, or if
// this `chain_id` is just for testing purposes.
Copy link
Contributor

Choose a reason for hiding this comment

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

yes, it is used for PolkadotOrEthereumAssetFromAssetHubPolkadot, which means that AHK accepts these locations as trusted reserves

Suggested change
// TODO: @bkontur or @acatangiu, please confirm if this chain will be used at all.
pub const PolkadotNetwork: NetworkId = NetworkId::Polkadot;
pub const EthereumNetwork: NetworkId = NetworkId::Ethereum { chain_id: 1 };
// TODO: @bkontur or @acatangiu, please confirm if this should be in the configuration, or if
// this `chain_id` is just for testing purposes.
pub const PolkadotNetwork: NetworkId = NetworkId::Polkadot;
pub const EthereumNetwork: NetworkId = NetworkId::Ethereum { chain_id: 1 };

Comment on lines +144 to +145
// TODO: @acatangiu, is there any specs about the deposit cost?
pub storage BridgeDeposit: Balance = 10 * constants::currency::UNITS;
Copy link
Contributor

Choose a reason for hiding this comment

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

this TODO is fixed by: pandres95#7

Suggested change
// TODO: @acatangiu, is there any specs about the deposit cost?
pub storage BridgeDeposit: Balance = 10 * constants::currency::UNITS;

Comment on lines +143 to +144
// TODO: What's the correct value? - FAIL-CI
pub storage BridgeDeposit: Balance = constants::currency::UNITS;
Copy link
Contributor

Choose a reason for hiding this comment

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

this TODO is fixed by pandres95#7

Suggested change
// TODO: What's the correct value? - FAIL-CI
pub storage BridgeDeposit: Balance = constants::currency::UNITS;

* revert delegate stake configuration in kusama

* update pool migrating max count
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 sdk stable2409 chore: upgrade to polkadot sdk stable2407