-
Notifications
You must be signed in to change notification settings - Fork 939
[tracking] Migrate pallets to FRAME umbrella crate #6504
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
Comments
Can I pick this up @re-gius Thinking this should be a tracking issue as it involves more than one crate but happy to do it! |
Yes, it's going to be a tracking issue. You are more than welcome to start working at some pallets/crates, ideally one or two per PR. |
Are there still some pallets to work on or are you doing all of them? |
Part of #6504 polkadot address: 15rM9idTv1izwNFqPabfcT4jkqHDsEvHSa5fASAUZwZcS4Yw --------- Co-authored-by: Giuseppe Re <[email protected]>
Part of #6504 polkadot address: 15rM9idTv1izwNFqPabfcT4jkqHDsEvHSa5fASAUZwZcS4Yw --------- Co-authored-by: bennethxyz <[email protected]> Co-authored-by: Giuseppe Re <[email protected]>
Part of #6504 polkadot address: 15rM9idTv1izwNFqPabfcT4jkqHDsEvHSa5fASAUZwZcS4Yw --------- Co-authored-by: bennethxyz <[email protected]> Co-authored-by: Giuseppe Re <[email protected]>
Part of #6504 polkadot address: 15rM9idTv1izwNFqPabfcT4jkqHDsEvHSa5fASAUZwZcS4Yw --------- Co-authored-by: bennethxyz <[email protected]> Co-authored-by: Giuseppe Re <[email protected]>
Part of #6504 --------- Co-authored-by: Giuseppe Re <[email protected]> Co-authored-by: Bastian Köcher <[email protected]>
This issue has been mentioned on Polkadot Forum. There might be relevant details there: |
any wishes on which pallet you guys want first ? |
taking pallet core-fellowship |
PR opened @ #8264 for pallet-grandpa 😄 |
# Description * This PR adds a new extrinsic `poke_deposit` to `pallet-recovery`. This extrinsic will be used to re-adjust the deposits made in the pallet after AHM. * Part of #5591 ## Review Notes * Added a new extrinsic `poke_deposit` in `pallet-recovery`. * Added a new event `DepositPoked` to be emitted upon a successful call of the extrinsic. * Added a new enum `DepositKind` to differentiate between the 2 kinds of deposits in the pallet. * Although the immediate use of the extrinsic will be to give back some of the deposit after the AH-migration, the extrinsic is written such that it can work if the deposit decreases or increases (both). * The call to the extrinsic would be `free` if an actual adjustment is made to the deposit and `paid` otherwise. * Added tests to test all scenarios. * Added benchmark * **Fixed bug** in benchmark helper function `insert_recovery_config` where funds were being reserved from the wrong account. * Minor refactoring to avoid code duplication. * Had to re-organise imports to make the code more readable and modular. In the process, I removed unnecessary dependencies and imported everything from the frame umbrella crate. So this PR also solves: #6504 for `pallet-recovery` ## TO-DOs * [x] Run CI cmd bot to benchmark --------- Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Oliver Tale-Yazdi <[email protected]>
My goal is to stabilize the FRAME umbrella crate at the beginning of May 2025, then add documentation and make it usable starting from release 2506. |
* Snowbridge - Deny ExportMessage from everywhere except for root of AH (#8037) Follow up of #7402 , for the comments in https://github.com/paritytech/polkadot-sdk/pull/6838#issuecomment-2677270666. Related PR - https://github.com/paritytech/polkadot-sdk/pull/7169 - https://github.com/paritytech/polkadot-sdk/pull/7200 The initial idea and review came from @bkontur—many thanks! I'll also add a companion PR in https://github.com/polkadot-fellows/runtimes if this one gets merged. * Cumulus Zombienet: Fix readme + provide a script (#8034) Make the life easier for users who want to reproduce these tests locally. * [CI/CD] Fix failing backports to release branches if something was changed in the .github/workflows folder (#8042) This PR fixes the problem with the backports, when something was changed in the workflow files or in `.github` folder in general. Initially, those PR's were failing due to lack of permissions: <img width="1280" alt="Screenshot 2025-03-26 at 10 42 38" src="https://github.com/user-attachments/assets/0c934256-87e6-4f28-8d6d-75d3634c053a" /> * Migrate `pallet-whitelist` to umbrella crate (#6514) Part of https://github.com/paritytech/polkadot-sdk/issues/6504 polkadot address: 15rM9idTv1izwNFqPabfcT4jkqHDsEvHSa5fASAUZwZcS4Yw --------- Co-authored-by: Giuseppe Re <[email protected]> * Expose rpc_rate_limit* cli options to parachains (#7994) Expose rpc_rate_limit* cli options to parachains --------- Co-authored-by: Bastian Köcher <[email protected]> * XCM: Some weight fixes for `InitiateTransfer` (#7835) - Added some base weight for `InitiateTransfer` no matter what. - Short circuit on `AllCounted(0)` to not have to go through all fungibles. - Change `assets` to `BoundedVec` --------- Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Adrian Catangiu <[email protected]> * Updated readme and shell script bash version (#8045) # Description Replaced the NPM instructions to install @polkadot/api-cli with Yarn instructions, and added MacOS instructions for bash and JQ install. Also changed the shell scripts to use the environment's default version of bash instead of /bin/bash. ## Integration None needed ## Review Notes Trying to run run-test.sh with the old api-cli causes an obtuse divide-by-zero error in the setup of the bridge. The shell scripts were changed to allow more flexibility with the bash version; Mac's official version of bash does not support certain commands used in the scripts, so the user must install a new version of bash (e.g. with Brew) whose path will not be /bin/bash. * [AHM] Revert v17 migration of pallet-staking in Westend (#8059) closes part of https://github.com/paritytech/polkadot-sdk/issues/8061. ++ remove all epmb files. Note: Polkadot and Kusama are below this version (v15) and would not be affected. * Add expensive scenario for asset exchange (#7952) This PR introduces a proper implementation for `worst_case_asset_exchange()` in the `AssetHubWestend` benchmarking setup, ensuring accurate weight calculations and preparing for integration tests. It addresses #7943 partially. ### **Key Changes** - **Implemented `worst_case_asset_exchange()`** with a realistic high-cost asset exchange scenario. - **Generated accurate weight benchmarks** for `exchange_asset`. - **Replaced placeholder weight implementation** (`Weight::MAX`) with real benchmarked values. - **Added integration tests** to validate correctness and performance. ### **Integration Notes** - These changes ensure the benchmarking pipeline correctly reflects real execution costs. - The next steps involve verifying benchmark results, backporting to `stable2503`, and deploying on `AssetHubWestend`. ### **Review Notes** - [x] **Check `worst_case_asset_exchange()` logic**—does it properly model the most expensive execution path? - [x] **Verify weight integration**—are the benchmarked weights correctly applied? - [x] **Ensure tests cover edge cases**—do the [tests](https://github.com/paritytech/polkadot-sdk/issues/7943#issuecomment-2731941120) properly handle all edge cases? --------- Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Branislav Kontur <[email protected]> Co-authored-by: Francisco Aguirre <[email protected]> * Validator disabling in session enhancements (#7663) On top of [7581](https://github.com/paritytech/polkadot-sdk/pull/7581). Adds the missing testing cases and adresses some overdue review feedback post merge. - [x] Clean up disabling interface - [x] Review disabling severity defaults in the refactor - [x] Verify and test disabling duration (should be era long) - [x] Add always sorted try-runtime test for DisabledValidators. - [x] expose severities - [x] better debuggin/tracing - [x] Make migration more robust - [x] Ensure we dont disable for past era slashes (+test) - [x] Move disabling strategy tests from staking to session (left some there as it also tests the offence pipeline) - [ ] more? * Make the default 85% usage of the PoV (#8040) Increased the default PoV usage to 85% and also added a cli argument as a backup option in the `unlikely` case that overshooting might be more than, so that parachain collator can use it to unblock themselves Fixes: https://github.com/paritytech/polkadot-sdk/issues/8009 --------- Signed-off-by: Alexandru Gheorghe <[email protected]> Co-authored-by: Sebastian Kunert <[email protected]> Co-authored-by: s0me0ne-unkn0wn <[email protected]> Co-authored-by: Bastian Köcher <[email protected]> * Cleanup Elastic Scaling Checks for FeatureIndex::ElasticScalingMVP (#7286) ## Description This PR addresses [issue #6352](https://github.com/paritytech/polkadot-sdk/issues/6352), which proposes cleaning up the codebase by assuming that the FeatureIndex::ElasticScalingMVP feature is always enabled. ## Integration - Removed the traces of the `elastic_scaling_mvp` scaling limitation (provisioner) - Removed the traces of `inject_core_index` scaling limitation (backing) ## Review Notes - The inject_core_index flag is used to support elastic scaling. When true, the core index is injected into the BackedCandidate, enabling dynamic core allocation and deallocation. - I removed this check in the backing file since we assume elastic scaling is enabled. ``` node_features .get(FeatureIndex::ElasticScalingMVP as usize) .map(|b| *b) .unwrap_or(false); ``` - I removed this check in the provisioner file since we assume elastic scaling is enabled. ``` request_node_features() ``` ``` if !elastic_scaling_mvp && core_count > 1 { continue } ``` --------- Co-authored-by: Alin Dima <[email protected]> * [XCM] allow signed account to be aliased between system chains (#7983) Fixes https://github.com/polkadot-fellows/runtimes/issues/635 # New alias filter defined The PR introduces a new Alias filter that allows account `X` on a system chain to alias itself on another chain where the filter is installed. This allows UX improvements like configuring other chains to allow signed account on AH to operate over XCM on another chain using the same signed account on the remote chain (rather than use a sovereign account). E.g. ALICE sets her identity on People chain directly from AH (where her funds are). Sets identity for account ALICE on People using a cross-chain action initiated from AH using account ALICE (on AH). # Aliasing configuration for system chains - Asset Hub: does not allow same account aliasing: there is no real world demand for it, the direction is usually reversed, users already have accounts on AH and want to use them cross-chain on other chains. Without real world demand, it's better to keep AH permissions as tight as possible. - Bridge Hub: does not allow same account aliasing: there is no real world demand for it, only low-level power users (like relayers) directly interact with Bridge Hub. They don't need aliasing to operate cross-chain they can operate locally. - Collectives: allows account A on a sibling system chain to alias into the local account A. - Coretime: allows account A on a sibling system chain to alias into the local account A. - People: allows account A on a sibling system chain to alias into the local account A. # Practical example showcased `Alice` on AssetHub can set identity for `Alice` on People over XCM. --------- Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Bridges: Add initial primitives for AssetHub bridging (#8063) This resolves TODO no. 1: https://github.com/paritytech/parity-bridges-common/issues/3136#issue-2913441160 To add cli support to substrate-relay as described in above issue, necessary changes from [this](https://github.com/paritytech/polkadot-sdk/pull/6675) PR are added by this PR. Specifically below changes and any other supportive changes. ``` // bridges/chains/chain-asset-hub-rococo/src/lib.rs impl Chain for AssetHubRococo {..} impl Parachain for AssetHubRococo {..} ``` ``` // bridges/chains/chain-asset-hub-westend/src/lib.rs impl Chain for AssetHubWestend {..} impl Parachain for AssetHubWestend {..} ``` --------- Co-authored-by: Branislav Kontur <[email protected]> Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Remove primitives (#8057) # Description Removes the bridge-related primitives for Polkadot and Kusama from /bridges/chains, to be moved into parity-bridges-common and polkadot-fellows/runtimes, per [this issue](https://github.com/polkadot-fellows/runtimes/pull/627). Also tweaks the readme and scripts to be more platform-agnostic. **NB**: This will require those who run the bridge zombienet tests to rename the zombienet binary from `zombienet-linux-x64` to just `zombienet`. ## Integration This update breaks parity-bridges-common's dependency on these primitives, which are re-added to parity-bridge-common in [this PR](https://github.com/paritytech/parity-bridges-common/pull/3145). * Update zombienet version to `1.3.127` (#8071) Includes fixes for ci failures like https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/8414908. cc: @skunert * Voting hook (#7703) # Description This is a continuation of the following [PR](https://github.com/paritytech/polkadot-sdk/pull/5735#discussion_r1967297490) --------- Co-authored-by: Bastian Köcher <[email protected]> * frame-system: Don't underflow the sufficients (#8062) Closes: https://github.com/paritytech/polkadot-sdk/issues/8044 --------- Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> * [Staking] Extrinsic `migrate_currency` handles any scenario where an old staking lock exists (#7933) closes #7931. ## Context The `Currency::lock` to `fungible::hold` migration for pallet-staking is async. This means a staker can interact with their stake before migration occurs. In such cases, only the new hold amount gets updated, while the old lock remains in place without any change. To fully migrate and release the old lock, the permissionless `migrate_currency` extrinsic can be used. ## The bug Because the migration is async, the ledger amount and the old lock can become out of sync. The current implementation only allows the extrinsic to execute when `lock_amount == ledger.total`, which is too restrictive and blocks valid migrations. ## The fix `Staking::migrate_currency` is updated to handle any scenario where an old staking lock still exists. If a lock is found, it will be cleared, and the corresponding hold amount will be properly updated to reflect the total staked balance. ## Migration stats from rerunning all migration as a remote test: Westend: `success: 73023, err: 0, total force withdrawn stake: 340726297547707, no_migration_needed: 53` Kusama: `success: 26096, err: 0, total force withdrawn stake: 893395700711867, no_migration_needed: 0` Polkadot: `success: 56044, err: 0, total force withdrawn stake: 157489603546239, no_migration_needed: 0` --------- Co-authored-by: kianenigma <[email protected]> * Optimize origin checks (#8000) Optimize origin checks, avoid cloning and conversion when not needed. --------- Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Snowbridge - Various minor improvements (#8020) - **Renames event in the Outbound Queue v2**: Resolves [SNO-1430](https://linear.app/snowfork/issue/SNO-1430) - **Remove unnecessary PaidFees event in Inbound Queue:** Resolves [SNO-1437](https://linear.app/snowfork/issue/SNO-1437) - **Remove unused types from Inbound Queue v2 pallet config:** Resolves [SNO-1436](http://linear.app/snowfork/issue/SNO-1436) - **Zero relayer reward in Inbound Queue should not be registered for a reward:** Resolves [SNO-1435](https://linear.app/snowfork/issue/SNO-1435) - **Moves Snowbridge System Frontend Pallet index from `80` to `36` on AH**: https://github.com/paritytech/polkadot-sdk/pull/7402#discussion_r2012104826 - **Add message rejected event to outbound queue:** Resolves [SNO-1428](https://linear.app/snowfork/issue/SNO-1428) Closes https://github.com/paritytech/polkadot-sdk/issues/7972 - **Removes unused method from Outbound Queue v2:** Resolves [SNO-1431](https://linear.app/snowfork/issue/SNO-1431) - **Fixes bug introduced in V2 related to commands on Ethereum's indexes:** Introduced in https://github.com/paritytech/polkadot-sdk/pull/7402, the command IDs need to match on the [contract side](https://github.com/Snowfork/snowbridge/blob/b2eb7a4e0e8f9ef6182ff378733453a9513cb76b/contracts/src/Types.sol#L78). This ensures that when we upgrade BH with the new code, it will remain compatible with the existing contracts on Ethereum that don't know anything about V2. - **Benchmarks `submit_delivery_receipt` in the Outbound Queue v2** - **Allow transact without transfer of any asset** --------- Co-authored-by: Ron <[email protected]> * link-checker: Remove broken URL to claim statement. (#8070) This time for real, lets get link-checker green once again. https://statement.polkadot.network/regular.html does not exist anymore. Its really shitty that we are now only showing a multihash, but the url is useless anyway. I also don't know what exactly was shown there. --------- Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> * fix(substrate/client): cast `MAJOR_SYNC_BLOCKS` to usize (#8094) Rustc started complaining from some versions onward when calling `into` on `MAJOR_SYNC_BLOCKS`. Not sure what's the version from which it fails, but it does. I'm on 1.85.1, it did fail on 1.82 as well. --------- Co-authored-by: Iulian Barbu <[email protected]> * Cleanup unused crates (#8006) Follow up to #7999 RustRover warns several dependencies are unused. I tried to remove them, and it can pass compile and tests on my local machine (macOS and Ubuntu 24.04), but `udeps` doesn't find these. I've no confidence. Let's see what CI says. --------- Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> * network: remove handling of validation protocol versions 1 and 2 (#7449) ## Issue [[#7410] Remove validation protocol versions 1 and 2](https://github.com/paritytech/polkadot-sdk/issues/7410) ## What was done? - [X] Remove `ValidationVersion` `V1` and `V2`; - [X] Clean up `ApprovalDistributionMessage`; - [X] Clean up `BitfieldDistributionMessage`; - [X] Clean up `StatementDistributionMessage`; - [X] Add PRdoc. ## What is left to do? - Clean up the `Versioned` enum: - Separate collation from validation (not sure if it's possible, but if it is, it will require significant changes); - Remove definitions of old versions of messages whose handling was removed in this PR (should not be difficult, probably 1-2 days of work). - Remove the `v2` folder from `statement-distribution` since there is no longer a legacy variant (should be easy, will just require updating imports where it is used). * Migrate `pallet-tx-pause` to umbrella crate (#6630) Part of https://github.com/paritytech/polkadot-sdk/issues/6504 polkadot address: 15rM9idTv1izwNFqPabfcT4jkqHDsEvHSa5fASAUZwZcS4Yw --------- Co-authored-by: bennethxyz <[email protected]> Co-authored-by: Giuseppe Re <[email protected]> * Stabilize V2 archive RPC methods (#8104) # Description This PR Stabilizes the V2 archive RPCs, and should merge following the [correpsonding PR](https://github.com/paritytech/json-rpc-interface-spec/pull/167) in the spec repository merging. ## Integration Downstream projects can now rely on the `archive_*` RPC methods on being stable. Anybody using the prior `archive_unstable_*` RPCs in recent times should be able to upgrade by simply renaming `archive_unstable` to `archive_v1` for any RPC calls, given that the actual interface hasn't changed since December 2024. <!-- * [ ] My PR follows the [labeling requirements]( https://github.com/paritytech/polkadot-sdk/blob/master/docs/contributor/CONTRIBUTING.md#Process ) of this project (at minimum one label for `T` required) * External contributors: ask maintainers to put the right label on your PR. * [ ] I have made corresponding changes to the documentation (if applicable) * [ ] I have added tests that prove my fix is effective or that my feature works (if applicable) You can remove the "Checklist" section once all have been checked. Thank you for your contribution! --> * runtime: assume elastic scaling MVP is always enabled (#7986) The runtime part of https://github.com/paritytech/polkadot-sdk/issues/6352. The node-side part is handled by https://github.com/paritytech/polkadot-sdk/pull/7286 (which should be merged first) * rpc v2 archive: more verbose error types in API (#8109) Builds on #8104 --------- Co-authored-by: James Wilson <[email protected]> Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Introduce ark-vrf (#7669) Superseeds `bandersnatch_vrfs` with [ark-vrf](https://crates.io/crates/ark-vrf) - Same crypto as JAM - With a spec: github.com/davxy/bandersnatch-vrf-spec - Published on crates.io https://github.com/paritytech/polkadot-sdk/pull/7670 follow up NOTE: this crypto is under experimental feat --------- Signed-off-by: Oliver Tale-Yazdi <[email protected]> Co-authored-by: Sebastian Kunert <[email protected]> Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Oliver Tale-Yazdi <[email protected]> * pallet-revive-fixtures: Support relative path for `CARGO_TARGET_DIR` (#8023) By default this path should only be relative, while absolute is also supported. At least from what the documentation plus internet is saying. Right now the build script doesn't support a relative path, which is fixed by this pr :) --------- Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> * pallet-xcm: add support to authorize aliases (#6336) Add calls to pallet-xcm for adding and removing authorization for a certain `aliaser` location to alias into the caller `origin`. `pallet-xcm` also exposes an `AuthorizedAliases` filter implementation usable with `xcm_executor::Config::Aliasers` filter to easily allow runtimes to plug in the explicitly authorized aliases using the calls above. Usually useful to allow your local account to be aliased into from a remote location also under your control (like your account on another chain). For example, `Alice` on `Para42` can do _something_ on Asset Hub without having to transfer fees from `Para42`, but instead use her local Asset Hub account: ```rust // called by Alice on Para42 pallet_xcm::send( Location::new(1, Parachain(1000)), Xcm(vec![ AliasOrigin(AliceOnAH), WithdrawAsset(fees), PayFees(fees), DoWhatever ]) ); ``` Part of [Empowered cross-chain origins](https://github.com/paritytech/polkadot-sdk/issues/6054). Fixes [XCM: Arbitrary Origin Aliases #722](https://github.com/paritytech/polkadot-sdk/issues/722) --------- Co-authored-by: command-bot <> Co-authored-by: Francisco Aguirre <[email protected]> Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Set PoV size limit to 10 Mb (#5884) Okay, enough theory, let's kick it off. Closes #5334. **UPDATE: All the concerns below are irrelevant now as 10 Mb PoVs have been enacted on Polkadot.** What are the implications from my point of view right now: ### After this PR is merged All the new chains (including test ones) started from genesis will support 10 Mb PoVs. If some parachain updates to the SDK version containing this value and then upgrades its runtime, the runtime will allow for 10 Mb PoVs while the relay chain still has a 5 Mb limit. I don't think it's a problem because the collator building a block will be limited by the PoV size limit stored in the persistent validation data (or even half of that limit if the `full-pov-size` feature is not enabled). That may lead to overshooting some per-dispatch-class limits but not the absolute PoV size limits, which is safe. Still, a malicious collator can build a block that the relay chain will reject. I'm not 100% sure if we need to take care of such a thing as a "malicious collator". If that's a concern, the possibility of temporarily using another constant for parachains is discussible. ### After this change is propagated to the fellowship runtimes After a new relay chain runtime version with this value is released and the runtime upgrade is performed, it will theoretically allow for a 10 Mb PoV size, but the on-chain limit will still remain at 5 Mb. ### After governance changes the `max_pov_size` config value Everything supports 10 Mb PoVs now. @acatangiu please comment on implications for bridges, I see it's used in bridges code, but not sure if any special treatment is needed. --------- Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Add chat channels to README (#8105) This adds links to the Telegram, Discord and Matrix Polkadot SDK Dev chat channels to the README --------- Co-authored-by: Bastian Köcher <[email protected]> * `pallet-xmcp-queue`: Fix broken and ignored test (#8011) Now it works with debug asserts as well, by simply catching the panic ;) This way the test will run by CI and not get outdated anymore. Co-authored-by: Adrian Catangiu <[email protected]> * Add missing prdocs (#8140) Prdocs for: - #7598 - #7620 - #7627 - more? --------- Signed-off-by: Oliver Tale-Yazdi <[email protected]> * Improve documentation around development environment configuration (#8143) Update the development environment configuration: - fixing the configuration for `neovim` around `cargo-remote`, where `check` override was incorrectly set under `cargo` - adding a note about `neovim`/ `rustaceanvim` vs `rust-analyzer` - adding a basoc configuration for `Zed` - adding a note for `Cursor` * Bridges: Add missing initial primitives for AssetHub bridging (#8138) This adds missing initial primitives to add CLI support for AssetHub Bridging earlier PR - https://github.com/paritytech/polkadot-sdk/pull/8063 source PR - https://github.com/paritytech/polkadot-sdk/pull/6675 It adds constants required to make this [PR](https://github.com/paritytech/parity-bridges-common/issues/3136#issue-2913441160) build. - [x] Make [PR](https://github.com/paritytech/parity-bridges-common/issues/3136) build successful with these changes before merging --------- Co-authored-by: Branislav Kontur <[email protected]> Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Introduce `SelectCore` digest in Cumulus (#8153) Right now the select core information are only send as an `UMPSignal` to the relay chain. For a node to calculate the core of a block, it is first required execute the block to call `selected_core` runtime api. This pull requests solves this by putting the selected core into a digest. Thus, the node can directly fetch it from the header. --------- Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> * refactor: separate validation and collation protocols (#8134) ## Details In the previous PR #7449, I removed the handling of validation protocol versions 1 and 2. However, I did not remove the message definitions themselves, as both the validation and collation protocols were using the common enum `Versioned<V1, V2, V3 = V2>`, which prevented me from removing the message definitions for validation protocol versions 1 and 2. The goal of this PR is to separate validation from collation by no longer using a common `Versioned` enum and to remove validation protocol messages that are no longer used. ## TODO - [X] Separate versioned enums for Validation and Collation; - [X] Update all occurrences where these enums are used; - [X] Remove `StatementFetchingRequest/Response`, as it was part of the already removed legacy StatementDistribution protocol; - [X] Add PRdoc. * Ban bandersnatch git dependency (#8136) Changes: - **Ban bandersnatch crate git dep** - **Updated Mermaid with patch https://github.com/glueball/simple-mermaid/pull/2** - **inherit workspace dep** - **Ban mermaid git dep** - **Script nits** --------- Signed-off-by: Oliver Tale-Yazdi <[email protected]> * `xcm-emulator` improved callback triggering (`on_initialize`, `on_finalize`, `on_idle`, `OnSystemEvent`). (#8083) This PR fixes several issues related to `xcm-emulator`: - Corrects parent head propagation to the `PersistedValidationData` and `OnSystemEvent` callback. - Triggers `on_initialize` for all pallets, not just `ParachainSystem`. - Triggers `on_finalize` for all pallets, not just `ParachainSystem`. - Triggers `on_idle` for all parachain pallets. --------- Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Bump openssl from 0.10.70 to 0.10.72 (#8166) Bumps [openssl](https://github.com/sfackler/rust-openssl) from 0.10.70 to 0.10.72. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/sfackler/rust-openssl/releases">openssl's releases</a>.</em></p> <blockquote> <h2>openssl-v0.10.72</h2> <h2>What's Changed</h2> <ul> <li>make set_rsa_oaep_md visible to boringssl config by <a href="https://github.com/frncs-rss"><code>@frncs-rss</code></a> in <a href="https://redirect.github.com/sfackler/rust-openssl/pull/2372">sfackler/rust-openssl#2372</a></li> <li>Fix typo in openssl-sys build script by <a href="https://github.com/rushilmehra"><code>@rushilmehra</code></a> in <a href="https://redirect.github.com/sfackler/rust-openssl/pull/2375">sfackler/rust-openssl#2375</a></li> <li>Unify the two BoringSSL codepaths a bit and simplify init by <a href="https://github.com/davidben"><code>@davidben</code></a> in <a href="https://redirect.github.com/sfackler/rust-openssl/pull/2377">sfackler/rust-openssl#2377</a></li> <li>pkey_ctx: Fix link to the corresponding OpenSSL function by <a href="https://github.com/Jakuje"><code>@Jakuje</code></a> in <a href="https://redirect.github.com/sfackler/rust-openssl/pull/2378">sfackler/rust-openssl#2378</a></li> <li>fix test on MSRV by <a href="https://github.com/alex"><code>@alex</code></a> in <a href="https://redirect.github.com/sfackler/rust-openssl/pull/2383">sfackler/rust-openssl#2383</a></li> <li>Add support for AWS-LC to openssl and openssl-sys crates by <a href="https://github.com/skmcgrail"><code>@skmcgrail</code></a> in <a href="https://redirect.github.com/sfackler/rust-openssl/pull/1805">sfackler/rust-openssl#1805</a></li> <li>Enable additional capabilities for AWS-LC by <a href="https://github.com/skmcgrail"><code>@skmcgrail</code></a> in <a href="https://redirect.github.com/sfackler/rust-openssl/pull/2386">sfackler/rust-openssl#2386</a></li> <li>Use --experimental with bindgen-cli with aws-lc build by <a href="https://github.com/skmcgrail"><code>@skmcgrail</code></a> in <a href="https://redirect.github.com/sfackler/rust-openssl/pull/2389">sfackler/rust-openssl#2389</a></li> <li>Fixed two UAFs and bumped versions for release by <a href="https://github.com/alex"><code>@alex</code></a> in <a href="https://redirect.github.com/sfackler/rust-openssl/pull/2390">sfackler/rust-openssl#2390</a></li> </ul> <h2>New Contributors</h2> <ul> <li><a href="https://github.com/Jakuje"><code>@Jakuje</code></a> made their first contribution in <a href="https://redirect.github.com/sfackler/rust-openssl/pull/2378">sfackler/rust-openssl#2378</a></li> <li><a href="https://github.com/skmcgrail"><code>@skmcgrail</code></a> made their first contribution in <a href="https://redirect.github.com/sfackler/rust-openssl/pull/1805">sfackler/rust-openssl#1805</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/sfackler/rust-openssl/compare/openssl-v0.10.71...openssl-v0.10.72">https://github.com/sfackler/rust-openssl/compare/openssl-v0.10.71...openssl-v0.10.72</a></p> <h2>openssl-v0.10.71</h2> <h2>What's Changed</h2> <ul> <li>Expose rc2 ciphers on symm::Cipher by <a href="https://github.com/alex"><code>@alex</code></a> in <a href="https://redirect.github.com/sfackler/rust-openssl/pull/2361">sfackler/rust-openssl#2361</a></li> <li>add full Apache license file to openssl by <a href="https://github.com/frncs-rss"><code>@frncs-rss</code></a> in <a href="https://redirect.github.com/sfackler/rust-openssl/pull/2366">sfackler/rust-openssl#2366</a></li> <li>Release openssl v0.10.71 and openssl-sys v0.9.106 by <a href="https://github.com/alex"><code>@alex</code></a> in <a href="https://redirect.github.com/sfackler/rust-openssl/pull/2369">sfackler/rust-openssl#2369</a></li> </ul> <h2>New Contributors</h2> <ul> <li><a href="https://github.com/frncs-rss"><code>@frncs-rss</code></a> made their first contribution in <a href="https://redirect.github.com/sfackler/rust-openssl/pull/2366">sfackler/rust-openssl#2366</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/sfackler/rust-openssl/compare/openssl-v0.10.70...openssl-v0.10.71">https://github.com/sfackler/rust-openssl/compare/openssl-v0.10.70...openssl-v0.10.71</a></p> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/sfackler/rust-openssl/commit/87085bd67896b7f92e6de35d081f607a334beae4"><code>87085bd</code></a> Merge pull request <a href="https://redirect.github.com/sfackler/rust-openssl/issues/2390">#2390</a> from alex/uaf-fix</li> <li><a href="https://github.com/sfackler/rust-openssl/commit/d1a12e21573e95727b2e38b8b65273cb389be7e4"><code>d1a12e2</code></a> Fixed two UAFs and bumped versions for release</li> <li><a href="https://github.com/sfackler/rust-openssl/commit/7c7b2e6c9f95e77e56ab37af70b16de75beff387"><code>7c7b2e6</code></a> Merge pull request <a href="https://redirect.github.com/sfackler/rust-openssl/issues/2389">#2389</a> from skmcgrail/aws-lc-follow-up</li> <li><a href="https://github.com/sfackler/rust-openssl/commit/34a477bff20cbe43492915338d3c12597430c345"><code>34a477b</code></a> Use --experimental with bindgen-cli with aws-lc build</li> <li><a href="https://github.com/sfackler/rust-openssl/commit/d4bf0710640e4725b8b237968040aef3e5f4ab9a"><code>d4bf071</code></a> Merge pull request <a href="https://redirect.github.com/sfackler/rust-openssl/issues/2386">#2386</a> from skmcgrail/aws-lc-follow-up</li> <li><a href="https://github.com/sfackler/rust-openssl/commit/a86bf670c4cba3ee5531838b52419356791d966e"><code>a86bf67</code></a> Remove comment</li> <li><a href="https://github.com/sfackler/rust-openssl/commit/705dbfb2ee3f2d7151ff313d840bf558435d4379"><code>705dbfb</code></a> Fix test</li> <li><a href="https://github.com/sfackler/rust-openssl/commit/e0df413d46a89303c42e15bf7d4566193b242466"><code>e0df413</code></a> Skip final call for LibreSSL 4.1.0 for CCM mode</li> <li><a href="https://github.com/sfackler/rust-openssl/commit/2f1164b5e838d3665dd10a9fac19e22174289ea3"><code>2f1164b</code></a> Enable additional capabilities for AWS-LC</li> <li><a href="https://github.com/sfackler/rust-openssl/commit/dde9ffb36071249ff98474eec853fd830aea44f5"><code>dde9ffb</code></a> Merge pull request <a href="https://redirect.github.com/sfackler/rust-openssl/issues/1805">#1805</a> from skmcgrail/aws-lc-support-final</li> <li>Additional commits viewable in <a href="https://github.com/sfackler/rust-openssl/compare/openssl-v0.10.70...openssl-v0.10.72">compare view</a></li> </ul> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/paritytech/polkadot-sdk/network/alerts). </details> Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Alexandru Vasile <[email protected]> * rpc v2: move `archive MethodResult` to the archive mod (#8130) Close https://github.com/paritytech/polkadot-sdk/issues/7982 Co-authored by @varun-doshi --------- Co-authored-by: varun-doshi <[email protected]> Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Bastian Köcher <[email protected]> * Cleanup unused deps (#8161) Following https://github.com/paritytech/polkadot-sdk/issues/6906#issuecomment-2773919424 I had to examine it manually, and the result was half true. Recent changes have also prevented me from running CI steps on my local machine, so let's see what CI says. --------- Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Branislav Kontur <[email protected]> * expose current advertised xcm version (#8173) Right now there is no "easy" way of knowing what is the currently supported xcm version without looking at the code or the metadata. Since pallet-xcm already has a constant to detect the latest advertised version, there is no reason (I think) to not expose it as a constant --------- Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Bastian Köcher <[email protected]> * Bump tokio from 1.40.0 to 1.43.1 (#8178) Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.40.0 to 1.43.1. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/tokio-rs/tokio/releases">tokio's releases</a>.</em></p> <blockquote> <h2>Tokio v1.43.0</h2> <h1>1.43.0 (Jan 8th, 2025)</h1> <h3>Added</h3> <ul> <li>net: add <code>UdpSocket::peek</code> methods (<a href="https://redirect.github.com/tokio-rs/tokio/issues/7068">#7068</a>)</li> <li>net: add support for Haiku OS (<a href="https://redirect.github.com/tokio-rs/tokio/issues/7042">#7042</a>)</li> <li>process: add <code>Command::into_std()</code> (<a href="https://redirect.github.com/tokio-rs/tokio/issues/7014">#7014</a>)</li> <li>signal: add <code>SignalKind::info</code> on illumos (<a href="https://redirect.github.com/tokio-rs/tokio/issues/6995">#6995</a>)</li> <li>signal: add support for realtime signals on illumos (<a href="https://redirect.github.com/tokio-rs/tokio/issues/7029">#7029</a>)</li> </ul> <h3>Fixed</h3> <ul> <li>io: don't call <code>set_len</code> before initializing vector in <code>Blocking</code> (<a href="https://redirect.github.com/tokio-rs/tokio/issues/7054">#7054</a>)</li> <li>macros: suppress <code>clippy::needless_return</code> in <code>#[tokio::main]</code> (<a href="https://redirect.github.com/tokio-rs/tokio/issues/6874">#6874</a>)</li> <li>runtime: fix thread parking on WebAssembly (<a href="https://redirect.github.com/tokio-rs/tokio/issues/7041">#7041</a>)</li> </ul> <h3>Changes</h3> <ul> <li>chore: use unsync loads for <code>unsync_load</code> (<a href="https://redirect.github.com/tokio-rs/tokio/issues/7073">#7073</a>)</li> <li>io: use <code>Buf::put_bytes</code> in <code>Repeat</code> read impl (<a href="https://redirect.github.com/tokio-rs/tokio/issues/7055">#7055</a>)</li> <li>task: drop the join waker of a task eagerly (<a href="https://redirect.github.com/tokio-rs/tokio/issues/6986">#6986</a>)</li> </ul> <h3>Changes to unstable APIs</h3> <ul> <li>metrics: improve flexibility of H2Histogram Configuration (<a href="https://redirect.github.com/tokio-rs/tokio/issues/6963">#6963</a>)</li> <li>taskdump: add accessor methods for backtrace (<a href="https://redirect.github.com/tokio-rs/tokio/issues/6975">#6975</a>)</li> </ul> <h3>Documented</h3> <ul> <li>io: clarify <code>ReadBuf::uninit</code> allows initialized buffers as well (<a href="https://redirect.github.com/tokio-rs/tokio/issues/7053">#7053</a>)</li> <li>net: fix ambiguity in <code>TcpStream::try_write_vectored</code> docs (<a href="https://redirect.github.com/tokio-rs/tokio/issues/7067">#7067</a>)</li> <li>runtime: fix <code>LocalRuntime</code> doc links (<a href="https://redirect.github.com/tokio-rs/tokio/issues/7074">#7074</a>)</li> <li>sync: extend documentation for <code>watch::Receiver::wait_for</code> (<a href="https://redirect.github.com/tokio-rs/tokio/issues/7038">#7038</a>)</li> <li>sync: fix typos in <code>OnceCell</code> docs (<a href="https://redirect.github.com/tokio-rs/tokio/issues/7047">#7047</a>)</li> </ul> <p><a href="https://redirect.github.com/tokio-rs/tokio/issues/6874">#6874</a>: <a href="https://redirect.github.com/tokio-rs/tokio/pull/6874">tokio-rs/tokio#6874</a> <a href="https://redirect.github.com/tokio-rs/tokio/issues/6963">#6963</a>: <a href="https://redirect.github.com/tokio-rs/tokio/pull/6963">tokio-rs/tokio#6963</a> <a href="https://redirect.github.com/tokio-rs/tokio/issues/6975">#6975</a>: <a href="https://redirect.github.com/tokio-rs/tokio/pull/6975">tokio-rs/tokio#6975</a> <a href="https://redirect.github.com/tokio-rs/tokio/issues/6986">#6986</a>: <a href="https://redirect.github.com/tokio-rs/tokio/pull/6986">tokio-rs/tokio#6986</a> <a href="https://redirect.github.com/tokio-rs/tokio/issues/6995">#6995</a>: <a href="https://redirect.github.com/tokio-rs/tokio/pull/6995">tokio-rs/tokio#6995</a> <a href="https://redirect.github.com/tokio-rs/tokio/issues/7014">#7014</a>: <a href="https://redirect.github.com/tokio-rs/tokio/pull/7014">tokio-rs/tokio#7014</a> <a href="https://redirect.github.com/tokio-rs/tokio/issues/7029">#7029</a>: <a href="https://redirect.github.com/tokio-rs/tokio/pull/7029">tokio-rs/tokio#7029</a> <a href="https://redirect.github.com/tokio-rs/tokio/issues/7038">#7038</a>: <a href="https://redirect.github.com/tokio-rs/tokio/pull/7038">tokio-rs/tokio#7038</a> <a href="https://redirect.github.com/tokio-rs/tokio/issues/7041">#7041</a>: <a href="https://redirect.github.com/tokio-rs/tokio/pull/7041">tokio-rs/tokio#7041</a> <a href="https://redirect.github.com/tokio-rs/tokio/issues/7042">#7042</a>: <a href="https://redirect.github.com/tokio-rs/tokio/pull/7042">tokio-rs/tokio#7042</a> <a href="https://redirect.github.com/tokio-rs/tokio/issues/7047">#7047</a>: <a href="https://redirect.github.com/tokio-rs/tokio/pull/7047">tokio-rs/tokio#7047</a> <a href="https://redirect.github.com/tokio-rs/tokio/issues/7053">#7053</a>: <a href="https://redirect.github.com/tokio-rs/tokio/pull/7053">tokio-rs/tokio#7053</a> <a href="https://redirect.github.com/tokio-rs/tokio/issues/7054">#7054</a>: <a href="https://redirect.github.com/tokio-rs/tokio/pull/7054">tokio-rs/tokio#7054</a> <a href="https://redirect.github.com/tokio-rs/tokio/issues/7055">#7055</a>: <a href="https://redirect.github.com/tokio-rs/tokio/pull/7055">tokio-rs/tokio#7055</a></p> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/tokio-rs/tokio/commit/a7b658c35bd40f6811e557aeb97cbb361b612c56"><code>a7b658c</code></a> chore: prepare Tokio v1.43.1 release</li> <li><a href="https://github.com/tokio-rs/tokio/commit/c1c8d1033d637d7027fdc137ec8008c5801cbc0d"><code>c1c8d10</code></a> Merge remote-tracking branch 'origin/tokio-1.38.x' into forward-port-1.38.x</li> <li><a href="https://github.com/tokio-rs/tokio/commit/aa303bc2051f7c21b48bb7bfcafe8fd4f39afd21"><code>aa303bc</code></a> chore: prepare Tokio v1.38.2 release</li> <li><a href="https://github.com/tokio-rs/tokio/commit/7b6ccb515ff067151ed62db835f735e5653f8784"><code>7b6ccb5</code></a> chore: backport CI fixes</li> <li><a href="https://github.com/tokio-rs/tokio/commit/4b174ce2c95fe1d1a217917db93fcc935e17e0da"><code>4b174ce</code></a> sync: fix cloning value when receiving from broadcast channel</li> <li><a href="https://github.com/tokio-rs/tokio/commit/5f3296df77ad594779d1fe1a1583078ca9832daf"><code>5f3296d</code></a> chore: prepare Tokio v1.43.0 (<a href="https://redirect.github.com/tokio-rs/tokio/issues/7079">#7079</a>)</li> <li><a href="https://github.com/tokio-rs/tokio/commit/cc974a646bd3932c148e300a92fda387c23768dd"><code>cc974a6</code></a> chore: prepare tokio-macros v2.5.0 (<a href="https://redirect.github.com/tokio-rs/tokio/issues/7078">#7078</a>)</li> <li><a href="https://github.com/tokio-rs/tokio/commit/15495fd88305099d4ffa0a5583f6d8856d728ac3"><code>15495fd</code></a> metrics: improve flexibility of H2Histogram Configuration (<a href="https://redirect.github.com/tokio-rs/tokio/issues/6963">#6963</a>)</li> <li><a href="https://github.com/tokio-rs/tokio/commit/ad4183412a0c01a9a5b92de0c2dddb5471bc2563"><code>ad41834</code></a> io: don't call <code>set_len</code> before initializing vector in <code>Blocking</code> (<a href="https://redirect.github.com/tokio-rs/tokio/issues/7054">#7054</a>)</li> <li><a href="https://github.com/tokio-rs/tokio/commit/bd3e8577377a2b684b50fc0cb50d98f03ad09703"><code>bd3e857</code></a> runtime: move <code>is_join_waker_set</code> assertion in <code>unset_waker</code> (<a href="https://redirect.github.com/tokio-rs/tokio/issues/7072">#7072</a>)</li> <li>Additional commits viewable in <a href="https://github.com/tokio-rs/tokio/compare/tokio-1.40.0...tokio-1.43.1">compare view</a></li> </ul> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/paritytech/polkadot-sdk/network/alerts). </details> Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * benchmark: storage: Make read/write benchmarks more accurate (#7867) There are a few problems with these read/write benchmarks which makes them produce misleading results, especially when we enable the trie-cache. The problems are: - Both benchmarks run without PoV recorder enabled, that is not accurate for parachains because without the PoV recorder, you can directly access the key from the value cache, while with the PoV recorder you still need to do the walk through which uses the Node cache, e.g: https://github.com/paritytech/trie/blob/master/trie-db/src/lookup.rs#L446. To fix this I added I parameter enable-pov-recorder which is meant to be used when generating the weights for parachains. - Every write measures both the time to update the key and to compute the storage root and commit all the changes, which is not accurate because the storage root is computed only once at the end of the block. For this I added a new argument --batch-size, which is used to determine how many keys to update and performs the storage root computation only once, it then calculate the per key write cost as `durations / batch-size`. - For reads when you run with the PoV recorder, there is also a benefit from running with the same recorder rather than creating a different recorder every read, so we again use the `batch-size` for than to obtain the amortised cost of a read. - bench warmup seemed to not warmup child keys even when `include-child-trees`, so I fixed that as well ## Results on reference hardware, asset-hub-westend state | Setup | Batch size| Amortized cost of a key write(**ns**) | Amortized cost of a key read(**ns**)| |--------|--------|--------|--------| |Without TrieCache, Without PoV Recorder|1|88_521|46_981| |Without TrieCache, With PoV Recorder|1|95_161|48_711| |With TrieCache, Without PoV Recorder|1|66_008|528| |With TrieCache, With PoV Recorder|1|73_145|12_142| |Without TrieCache, Without PoV Recorder|1000|52_646|72_434| |Without TrieCache, With PoV Recorder|1000|54_896|50_267| |With TrieCache, Without PoV Recorder|1000|30_585|497| |With TrieCache, With PoV Recorder|1000|33_765|6_928| |Without TrieCache, Without PoV Recorder|10_000|48_945|52_730| |Without TrieCache, With PoV Recorder|10_000|50_285|49_860| |With TrieCache, Without PoV Recorder|10_000|25_903|484| |With TrieCache, With PoV Recorder|10_000|28_417|7_153| |Without TrieCache, Without PoV Recorder|100_000|31_359|45_839| |Without TrieCache, With PoV Recorder|100_000|32_932|48_393| |With TrieCache, Without PoV Recorder|100_000|20_255|493| |*With TrieCache, With PoV Recorder*, to be used|100_000|21_998|6_908| ## Results on reference hardware asset-hub-polkadot state | Setup | Batch size| Amortized cost of a key write(**ns**) | Amortized cost of a key read(**ns**)| |--------|--------|--------|--------| |Without TrieCache, Without PoV Recorder|1|102_239|56_209| |Without TrieCache, With PoV Recorder|1|106_659|54_256| |With TrieCache, Without PoV Recorder|1|85_419|608| |With TrieCache, With PoV Recorder|1|95_221|13_567| |Without TrieCache, Without PoV Recorder|1000|61_574|53_767| |Without TrieCache, With PoV Recorder|1000|64_770|66_162| |With TrieCache, Without PoV Recorder|1000|35_879|597| |With TrieCache, With PoV Recorder|1000|39_464|8_482| |Without TrieCache, Without PoV Recorder|10_000|62_465|58_236| |Without TrieCache, With PoV Recorder|10_000|65_082|95_118| |With TrieCache, Without PoV Recorder|10_000|32_259|601| |With TrieCache, With PoV Recorder|10_000|34_620|8_810| |Without TrieCache, Without PoV Recorder|100_000|43_794|69_157| |Without TrieCache, With PoV Recorder|100_000|45_060|66_343| |With TrieCache, Without PoV Recorder|100_000|25_327|596| |*With TrieCache, With PoV Recorder*, to be used|100_000|27_622|8_598| ## Results on my local machine with westend-assethub state. | Setup | Batch size| Amortized cost of a key write(**ns**) | Amortized cost of a key read(**ns**)| |--------|--------|--------|--------| |Without TrieCache, Without PoV Recorder|1| 55_443|27_510| |Without TrieCache, With PoV Recorder|1|143_189|105_103| |With TrieCache, Without PoV Recorder|1|37_519|370| |With TrieCache, With PoV Recorder|1|42_569|7_309| |Without TrieCache, Without PoV Recorder|1000| 29_364|25_150| |Without TrieCache, With PoV Recorder|1000|33_221|107_349| |With TrieCache, Without PoV Recorder|1000|18_355|370| |With TrieCache, With PoV Recorder|1000|19_883|4_063| |Without TrieCache, Without PoV Recorder|10_000| 28_336|27_765| |Without TrieCache, With PoV Recorder|10_000|29_673|62_392| |With TrieCache, Without PoV Recorder|10_000|15_102|370| |With TrieCache, With PoV Recorder|10_000|16_461|4_124| |Without TrieCache, Without PoV Recorder|100_000| 18_935|27_151| |Without TrieCache, With PoV Recorder|100_000|19_681|48_393| |With TrieCache, Without PoV Recorder|100_000|12_569|362| |*With TrieCache, With PoV Recorder*, to be used|100_000|13_469|3_895| Fixes: https://github.com/paritytech/polkadot-sdk/issues/7535 ## Todo: - [x] Run this benchmarks on reference hardware on configuration variant closest to the production environment. --------- Signed-off-by: Alexandru Gheorghe <[email protected]> Co-authored-by: Bastian Köcher <[email protected]> * Update to frame-metadata 21.0 (#8122) This PR will update polkadot-sdk to use frame-metadata 21.0.0, for the latest iteration of unstable V16 metadata. Hopefully this is the final change before we do a PR to stabilize v16 metadata at the end of April. Also updates to `merkelized-metadata` 0.5.0 which supports this version. * chore: idiomatic rust cleanup (#8163) Description This PR performs a series of non-functional refactors across multiple files to improve code readability and consistency. Key changes include: • Replacing verbose pattern matches with shorter .ok(), .err(), or .ok_or()? alternatives. • Using div_ceil() instead of manual (x + 1) / 2 calculations for better clarity. • Removing redundant .clone().take() patterns to simplify logic. • Applying consistent and idiomatic Rust expressions throughout the codebase. These changes do not affect runtime functionality, but improve maintainability and align the code with modern Rust practices. Integration No integration steps are required. These are non-functional refactors that do not alter the runtime behavior or public APIs. Downstream projects should experience no impact. Review Notes All changes are cosmetic or idiomatic improvements: • Each change was tested to ensure it preserves the original behavior. • Focus was on readability, simplicity, and reducing redundancy. • No logic paths were altered; only how those paths are expressed. --------- Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Oliver Tale-Yazdi <[email protected]> Co-authored-by: Dónal Murray <[email protected]> * collator protocol revamp: add new empty collator protocol subsystem for validator side (#8144) Add a new (empty) variant for the validator side of the collator protocol subsystem Forms the basis for the collator protocol revamp follow-up work. * [Backport] Regular version bumps and prdocs reordering from stable2503 back to master (#8186) This PR backports regular bumps of - regular bumps of spec_version - regular bumps of NODE_VERSION - prdocs reordering --------- Co-authored-by: ParityReleases <[email protected]> * `DeprecationInfo` propagate `#[allow(deprecated)]` attribute into the generated code. (#6312) # Description Propagate `#[allow(deprecated)]` attribute into the generated code, so that code is not littered with useless warnings while `DeprecationInfo` is still propagated in `MetadataIR` see an example of warnings being too noisy: #6169 ## Review Notes The change itself is just propagating attribute code after specific steps during macro expansion. --------- Co-authored-by: command-bot <> Co-authored-by: Bastian Köcher <[email protected]> Co-authored-by: Guillaume Thiolliere <[email protected]> Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> * ci: mark build jobs as required (#8193) PR creates a final build jobs that checks other build jobs to pass. After the PR is merged I'll mark the `All builds passed` job as `Required` and remove `Required` from gitlab jobs. cc https://github.com/paritytech/ci_cd/issues/1041 * [AHM] Replace Validator FullIdentification from `Exposure` to `Existence` (#7936) closes https://github.com/paritytech/polkadot-sdk/issues/6344. related https://github.com/paritytech/substrate/pull/14048. --- ## Overview Post-AHM, RC will no longer have validator exposure information, as all of it will move to AH alongside `pallet-staking`. Currently, we use `Exposure` to identify a validator when an offence report is received. After this change, we’ll only need to check whether the validator exists in the session. Also, the storage map `pallet-offences::Reports` depends on the `Exposure` type and is heavily bloated (and never cleared). There was [some work](https://github.com/paritytech/substrate/pull/14048) to clean it up, but it was never completed. Replacing `Exposure` with `Existence` would make the old storage undecodable, and migrating it would be a pain. The `pallet-offences` storage layout needs to be redesigned, and I didn’t want to make any rushed decisions there that could lead to long-term issues. Instead, this PR introduces a new type, `ExistenceOrLegacyExposure`, with a custom encoder/decoder that can handle both the legacy `Exposure` and the new `Existence` type. It also introduces `ExistenceOf` and `ExistenceOrLegacyExposureOf`, which replaces `ExposureOf`. With this change, runtimes can be configured to identify a validator based solely on their presence, without needing full exposure data. This is useful when configuring historical sessions. For example: ``` impl pallet_session::historical::Config for Runtime { type FullIdentification = pallet_staking::Existence; type FullIdentificationOf = pallet_staking::ExistenceOf<Runtime>; } ``` ## Backward Compatibility For existing runtimes that still depend on the Exposure type in pallet-offences — typically configured like this: ``` impl pallet_offences::Config for Runtime { ... type IdentificationTuple = pallet_session::historical::IdentificationTuple<Self>; } ``` Where `IdentificationTuple` is defined as: ``` pub type IdentificationTuple<T> = (<T as pallet_session::Config>::ValidatorId, <T as Config>::FullIdentification); ``` You should now use `ExistenceOrLegacyExposureOf`. This type includes a custom encoder/decoder that supports both the legacy `Exposure` and the new `Existence` types. This compatibility layer is essential to ensure the `Offences::Reports` storage map can still decode older entries. ## TODO - [x] TryStateCheck to see existing offence report decodes correctly. --------- Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Remove `#[no_mangle]` from the panic handler (#8198) Fixes https://github.com/paritytech/polkadot-sdk/issues/8190 Remove useless `#[no_mangle]` from the panic handler which screws up the panic handling machinery on recent versions of Rust. --------- Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Moved chain-bridge-hub-cumulus to chain-cumulus (#8107) # Description Moved the internal folder of bp-bridge-hub-cumulus as per the last task of [this issue](https://github.com/paritytech/parity-bridges-common/issues/2950) and refactored some constants into parachains-common. No implementation changes (external package name remains bp-bridge-hub-cumulus). --------- Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Moved Rococo and Westend primitives (#8177) # Description Moved the Rococo and Westend bridge- and asset- hub bridge primitives into cumulus/parachains/runtimes/rococo(westend)/bridge-primitives, as well as chain-rococo and chain-westend into polkadot/runtime as per the third task of [this issue](https://github.com/paritytech/parity-bridges-common/issues/2950) --------- Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> * cumulus: `ParachainBlockData` support multiple blocks (#6137) This pull request adds support to `ParachainBlockData` to support multiple blocks at once. This basically means that cumulus based Parachains could start packaging multiple blocks into one `PoV`. From the relay chain POV nothing changes and these `PoV`s appear like any other `PoV`. Internally this `PoV` then executes the blocks sequentially. However, all these blocks together can use the same amount of resources like a single `PoV`. This pull request is basically a preparation to support running parachains with a faster block time than the relay chain. This changes the encoding of `ParachainBlockData`. However, encoding and decoding is made in a backwards and forwards compatible way. This means that there is no dependency between the collator and runtime upgrade. --------- Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Michal Kucharczyk <[email protected]> * Moved Rococo and Westend primitives (#8177) # Description Moved the Rococo and Westend bridge- and asset- hub bridge primitives into cumulus/parachains/runtimes/rococo(westend)/bridge-primitives, as well as chain-rococo and chain-westend into polkadot/runtime as per the third task of [this issue](https://github.com/paritytech/parity-bridges-common/issues/2950) --------- Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Omni Node: Enable OCW http (#8208) This enables the HTTP support for the OCW. Closes: https://github.com/paritytech/polkadot-sdk/issues/8203 --------- Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> * [xcm-builder][origin_conversion] LocationAsSuperuser converter introduced (#8210) Relates to: https://github.com/polkadot-fellows/runtimes/issues/651 Already used by: https://github.com/polkadot-fellows/runtimes/pull/626 # Description This PR introduces a `LocationAsSuperuser` struct that implements `ConvertOrigin` to allow some `Location` chosen by the XCM configuration to act as Root on the local chain. Implementation is generic over `Location` but was created for purposes of allowing AssetHub system chain (by other system chains and relay chains) to execute Root level extrinsics like `authorize_upgrade` on them. ## TODO * [ ] backport to stable2412 * [ ] backport to stable2503 --------- Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Adrian Catangiu <[email protected]> Co-authored-by: Branislav Kontur <[email protected]> * Snowbridge - Fix penpal runtime and more tests transfer PNA (#8038) For testing multi-hops transfer of PNA from Penpal to Ethereum, the runtime configurations on Penpal have been revamped, including: - Allow to teleport native asset from/to AH - Allow to use native asset to pay fees - Allow unpaid execution from relay chain for sudo calls It's required for https://github.com/Snowfork/snowbridge/pull/1419 to setup a local test environment to transfer PNA from third-party parachains. It demonstrates that a one-click tranfer from a Parachain to Ethereum is possible. In this case, the first hop-from Penpal to AH, is teleport-based, while the next hop-from AH to Ethereum, is reserved-based. --------- Co-authored-by: Adrian Catangiu <[email protected]> * [CI/CD] Fix polkadot, polkadot-parachain and general bin docker images (#8211) This PR replaces `parity/base-bin ` with the `paritytech/base-bin` image in the docker files for `polkadot`, `polkadot-parachain` and general one. And fixes few typos in the CI flows Closes: https://github.com/paritytech/release-engineering/issues/256 * impl ApprovedPeer UMP signal (#7955) https://github.com/paritytech/polkadot-sdk/issues/7731 TODO: - [x] Merge [this](https://github.com/paritytech/polkadot-sdk/pull/7986) beforehand. It'll add some simplifications in the runtime (especially for tests) - [x] add more runtime tests - [x] PRDoc * tx/broadcast: Use client info for fetching the best block (#8162) This PR modifies the tx broadcast logic. Previously, we relied on the import notification stream to fetch the latest available block. In this revision, we use the available information of the `client.info()` to prefix the import notification stream. The change is needed because chains could be started with `InstantSeal`, which would not produce blocks until they encounter transactions. Closes: https://github.com/paritytech/polkadot-sdk/issues/8157 cc @paritytech/subxt-team --------- Signed-off-by: Alexandru Vasile <[email protected]> Co-authored-by: Bastian Köcher <[email protected]> * [pallet-revive] fix bn128 benchmark (#8212) Update bn128 benchmarks --------- Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Migrate pipeline to gha (#8068) Migrate pipeline from gitlab to gha. --------- Co-authored-by: Alexander Samusev <[email protected]> * add poke_deposit extrinsic to pallet-society (#7833) # Description * This PR adds a new extrinsic `poke_deposit` to `pallet-society`. This extrinsic will be used to re-adjust the deposits made in the pallet to create a bid after AHM. * Part of #5591 ## Review Notes * Added a new extrinsic `poke_deposit` in `pallet-society`. * Added a new event `DepositPoked` to be emitted upon a successful call of the extrinsic. * Although the immediate use of the extrinsic will be to give back some of the deposit after the AH-migration, the extrinsic is written such that it can work if the deposit decreases or increases (both). * The call to the extrinsic would be `free` if an actual adjustment is made to the deposit and `paid` otherwise. * Added tests to test all scenarios. * Added benchmark ## TO-DOs * [x] Run CI cmd bot to benchmark --------- Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Allow /cmd run with --clean flag (#8220) /cmd with the `--clean` flag should clean up the old comments but still run the job * Use `TryFrom` impls instead of `as` operator in `polkadot-runtime-parachains` (#8118) # Description - changed conversions based on `as` operator to `usize::try_from` in `polkadot-runtime-parachains` ## Integration N/A ## Review Notes N/A --------- Signed-off-by: Iulian Barbu <[email protected]> Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Bastian Köcher <[email protected]> Co-authored-by: Bastian Köcher <[email protected]> Co-authored-by: teor <[email protected]> Co-authored-by: Guillaume Thiolliere <[email protected]> * Refactor the host <-> runtime interface machinery (#7375) Keep calm and stand still, it's a hijacking of PR #3689 by @koute. The original description follows; please refer to the original PR for the past discussions. --- 8< --- cut here --- 8< --- This PR refactors the way the host functions are defined. Previously the way a given type was marshalled through the host <-> runtime boundary was hardcoded for every type by the virtue of it implementing the relevant conversion tra…
As far as I know, the only currently active PRs are #6931 #8264 #8285 . I hope they can be merged by the end of this week, then I will proceed by stabilizing the frame umbrella crate (whether these PRs are merged or not). No other PRs will be needed afterwards, unless there is a good reason to add the umbrella crate to a specific pallet. |
So, should I abort pallet-balances one? |
Unless your PR is going to be ready for review soon, I would say it's better to abort it. |
PR #6905 is still waiting for a last reviewer |
Part of #6504 --------- Co-authored-by: Kian Paimani <[email protected]> Co-authored-by: Guillaume Thiolliere <[email protected]> Co-authored-by: Giuseppe Re <[email protected]>
#8264 and #8285 are left to be fixed and possibly reviewed by the end of the week. It seems that the FRAME umbrella crate is in a good state, pretty stable and easy to integrate in an average pallet. I'm opening a PR to stabilize it, integrating it into the main Polkadot SDK umbrella crate and adding docs. |
# Description * This PR adds a new extrinsic `poke_deposit` to `pallet-recovery`. This extrinsic will be used to re-adjust the deposits made in the pallet after AHM. * Part of #5591 ## Review Notes * Added a new extrinsic `poke_deposit` in `pallet-recovery`. * Added a new event `DepositPoked` to be emitted upon a successful call of the extrinsic. * Added a new enum `DepositKind` to differentiate between the 2 kinds of deposits in the pallet. * Although the immediate use of the extrinsic will be to give back some of the deposit after the AH-migration, the extrinsic is written such that it can work if the deposit decreases or increases (both). * The call to the extrinsic would be `free` if an actual adjustment is made to the deposit and `paid` otherwise. * Added tests to test all scenarios. * Added benchmark * **Fixed bug** in benchmark helper function `insert_recovery_config` where funds were being reserved from the wrong account. * Minor refactoring to avoid code duplication. * Had to re-organise imports to make the code more readable and modular. In the process, I removed unnecessary dependencies and imported everything from the frame umbrella crate. So this PR also solves: #6504 for `pallet-recovery` ## TO-DOs * [x] Run CI cmd bot to benchmark --------- Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Oliver Tale-Yazdi <[email protected]>
Part of #6504 --------- Co-authored-by: Kian Paimani <[email protected]> Co-authored-by: Guillaume Thiolliere <[email protected]> Co-authored-by: Giuseppe Re <[email protected]>
Stabilizing the FRAME umbrella crate, which is no longer marked as experimental. Improving the related documentation, including README and maintenance notes. After integrating the FRAME umbrella crate in 17 pallets as tracked in #6504 and modifying it in the process, it has reached a good level of stability and it can be easily used for pallet development. Key improvements: - Enhanced documentation with clear usage guidelines - Added comprehensive maintenance notes for future contributors - Established clear design principles for prelude usage and module organization - Updated documentation links to point to the official hosted docs This closes #6504. --------- Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Uh oh!
There was an error while loading. Please reload this page.
The goal is to stabilize the FRAME umbrella crate, so that its use within an average pallet is relatively straightforward.
We intend to achieve this goal by migrating some pallets to
polkadot-sdk-frame
, adding types and preludes to it when necessary. As a reference, you can look into #5995.The guidelines of the umbrella crate are as follows:
polkadot-sdk/substrate/frame/src/lib.rs
Lines 134 to 150 in 06a68be
✅ Checklist:
polkadot-sdk-frame
to theCargo.toml
frame_support
,sp_runtime
and similar, and replace with the appropriateprelude::*
deps
Cargo.toml
to remove all unneeded dependencies.👉 If you want to work on this: Please check that there is not already a merge request for the pallet that you want to work on (here or in the comments below). Please pick only one or a small set of pallets - not all at once. This keeps review times low. Add a comment below to announce the pallets you're working on.
Pallet list
pallet-alliance
to umbrella crate #6541pallet-assets-freezer
to umbrella crate #6599pallet-atomic-swap
to umbrella crate #6601pallet-aura
to umbrella crate #6622pallet-authority-discovery
to umbrella crate #6619pallet-authorship
to umbrella crate #6620pallet-babe
&pallet-staking-reward-curve
#6412pallet-im-online
to umbrella crate #6736pallet-indices
to umbrella crate #6737pallet-insecure-randomness-collective-flip
to umbrella crate #6738pallet-lottery
to umbrella crate #6740pallet-proxy
andpallet-multisig
#5995pallet-proxy
andpallet-multisig
#5995pallet-babe
&pallet-staking-reward-curve
#6412pallet-timestamp
to umbrella crate #6523pallet-tips
to umbrella crate #6532pallet-tx-pause
to umbrella crate #6630pallet-verify-signature
to umbrella crate #6515pallet-whitelist
to umbrella crate #6514The text was updated successfully, but these errors were encountered: