diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8b342f1399..31fce66445 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -10,7 +10,7 @@ on: workflow_dispatch: env: - FRAME_OMNI_BENCHER_RELEASE_VERSION: polkadot-v1.13.0 + FRAME_OMNI_BENCHER_RELEASE_VERSION: polkadot-stable2409 # cancel previous runs concurrency: diff --git a/CHANGELOG.md b/CHANGELOG.md index 8a1c1d6fb2..1256bc4ea1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,29 @@ Changelog for the runtimes governed by the Polkadot Fellowship. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). +#### From [#490](https://github.com/polkadot-fellows/runtimes/pull/490) + +- Transfer Polkadot-native assets to Ethereum ([SDK `stable2409` #5710](https://github.com/paritytech/polkadot-sdk/pull/5710), [SDK #5546](https://github.com/paritytech/polkadot-sdk/pull/5546)) +- Add possibility to inject non-authorities session-keys in genesis ([SDK `stable2409` #5078](https://github.com/paritytech/polkadot-sdk/pull/5078)) +- \[bridges-v2\] Permissionless lanes ([SDK `stable2409` #4949](https://github.com/paritytech/polkadot-sdk/pull/4949)) +- \[Assets\] Call implementation for `transfer_all` ([SDK `stable2409` #4527](https://github.com/paritytech/polkadot-sdk/pull/4527)) +- Tx Payment: drop ED requirements for tx payments with exchangeable asset ([SDK `stable2409` #4488](https://github.com/paritytech/polkadot-sdk/pull/4488)) +- Coretime auto-renew ([SDK `stable2409` #4424](https://github.com/paritytech/polkadot-sdk/pull/4424)) +- Initialises pallet-delegated-staking ([SDK `v1.12.0` #3904](https://github.com/paritytech/polkadot-sdk/pull/3904)) + +### Changed + +#### From [#490](https://github.com/polkadot-fellows/runtimes/pull/490) + +- Polkadot Primitives v8 ([SDK v1.16 #5525](https://github.com/paritytech/polkadot-sdk/pull/5525)). +- Relax `XcmFeeToAccount` trait bound on `AccountId` ([SDK v1.16 #4959](https://github.com/paritytech/polkadot-sdk/pull/4959)) +- Bridges V2 refactoring backport and `pallet_bridge_messages` simplifications ([SDK `stable2407` #4935](https://github.com/paritytech/polkadot-sdk/pull/4935)) +- Renamed `assigner_on_demand` to `on_demand` ([SDK `stable2409` #4706](https://github.com/paritytech/polkadot-sdk/pull/4706)). +- \[BEEFY\] Add runtime support for reporting fork voting ([SDK `stable2407` #4522](https://github.com/paritytech/polkadot-sdk/pull/4522)). +- Migrates Nomination Pool to use delegated staking: i.e. allowing delegated funds to be held in member's own account + instead of the pool account. This would enable pool member funds to be used for voting in opengov. + ([SDK `v1.13.0` #3905](https://github.com/paritytech/polkadot-sdk/pull/3905)) + ## [1.3.4] 01.11.2024 ### Changed @@ -79,7 +102,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Kusama: Make the current inflation formula adjustable ([polkadot-fellows/runtimes#364](https://github.com/polkadot-fellows/runtimes/pull/364)) - Port Agile Coretime migration from polkadot-sdk in order to fix leases with gaps handling([polkadot-fellows/runtimes#426](https://github.com/polkadot-fellows/runtimes/pull/426)) -#### From [#322](https://github.com/polkadot-fellows/runtimes/pull/322): +#### From [#322](https://github.com/polkadot-fellows/runtimes/pull/322) - Add `claim_assets` extrinsic to `pallet-xcm` ([SDK v1.9 #3403](https://github.com/paritytech/polkadot-sdk/pull/3403)). - Add `Deposited`/`Withdrawn` events for `pallet-assets` ([SDK v1.12 #4312](https://github.com/paritytech/polkadot-sdk/pull/4312)). @@ -113,7 +136,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Upgrade dependencies to the [polkadot-sdk@1.13.0](https://github.com/paritytech/polkadot-sdk/releases/tag/polkadot-v1.13.0) release ([polkadot-fellows/runtimes#332](https://github.com/polkadot-fellows/runtimes/pull/332)). - Filter `interlace` calls on the Polkadot Coretime Chain until the Relay chain implementation is more mature ([polkadot-fellows/runtimes#438](https://github.com/polkadot-fellows/runtimes/pull/438)). -#### From [#322](https://github.com/polkadot-fellows/runtimes/pull/322): +#### From [#322](https://github.com/polkadot-fellows/runtimes/pull/322) - The `MessageQueue` also runs "on idle", this causes `MessageQueue::Processed` events to be emitted in other phases than just initialization ([SDK v1.13 #3844](https://github.com/paritytech/polkadot-sdk/pull/3844)). - AdaptPrice trait is now price controlled ([SDK v1.13 #4521](https://github.com/paritytech/polkadot-sdk/pull/4521)). @@ -134,10 +157,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Fix claim queue size ([runtimes#381](https://github.com/polkadot-fellows/runtimes/pull/381), [SDK v1.14 #4691](https://github.com/paritytech/polkadot-sdk/pull/4691)). - `pallet-referenda`: Ensure to schedule referenda earliest at the next block ([runtimes#381](https://github.com/polkadot-fellows/runtimes/pull/381), [SDK v1.14 #4823](https://github.com/paritytech/polkadot-sdk/pull/4823)). - Don't partially modify HRMP pages ([runtimes#381](https://github.com/polkadot-fellows/runtimes/pull/381), [SDK v1.14 #4710](https://github.com/paritytech/polkadot-sdk/pull/4710)). -- Coretime Chain: mitigate behaviour with many assignments on one core ([runtimes#434][https://github.com/polkadot-fellows/runtimes/pull/434]). +- Coretime Chain: mitigate behaviour with many assignments on one core ([runtimes#434](https://github.com/polkadot-fellows/runtimes/pull/434)). - Port Agile Coretime migration from polkadot-sdk in order to fix leases with gaps handling([polkadot-fellows/runtimes#426](https://github.com/polkadot-fellows/runtimes/pull/426)) -#### From [#322](https://github.com/polkadot-fellows/runtimes/pull/322): +#### From [#322](https://github.com/polkadot-fellows/runtimes/pull/322) - CheckWeight checks for combined extrinsic length and proof size ([SDK v1.12 #4326](https://github.com/paritytech/polkadot-sdk/pull/4326)). - Decrement total_deposit when clearing collection metadata ([SDK v1.11 #3976](https://github.com/paritytech/polkadot-sdk/pull/3976)). @@ -177,7 +200,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Kusama: Remove unused Snowbridge code and configs ([polkadot-fellows/runtimes#411](https://github.com/polkadot-fellows/runtimes/pull/411)). - Remove the identity ops pallet after the invalid judgments have been cleared ([polkadot-fellows/runtimes#408](https://github.com/polkadot-fellows/runtimes/pull/408)). -#### From [#322](https://github.com/polkadot-fellows/runtimes/pull/322): +#### From [#322](https://github.com/polkadot-fellows/runtimes/pull/322) - Deprecate dmp-queue pallet ([SDK v1.13 #4475](https://github.com/paritytech/polkadot-sdk/pull/4475)). - Deprecate XCMv2 ([SDK v1.13 #4131](https://github.com/paritytech/polkadot-sdk/pull/4131)). @@ -382,7 +405,7 @@ Note: This release only affects the following runtimes and is not a full system - Upgrade Preimage pallet's config implementations to adapt the new `Consideration` API ([polkadot-fellows/runtimes#56](https://github.com/polkadot-fellows/runtimes/pull/56)) - Remove `experimental` feature flag for `pallet-society`, `pallet-xcm`, and `runtime-common` crates imports ([polkadot-fellows/runtimes#56](https://github.com/polkadot-fellows/runtimes/pull/56)) - Election provider: use a geometric deposit base calculation for EPM signed submissions in Polkadot and Kusama ([polkadot-fellows/runtimes#56](https://github.com/polkadot-fellows/runtimes/pull/56)) -- Make `IdentityInfo` generic in `pallet-identity` ([polkadot-fellows/runtimes#87](https://github.com/polkadot-fellows/runtimes/pull/87)). Context: https://github.com/paritytech/polkadot-sdk/pull/1661 +- Make `IdentityInfo` generic in `pallet-identity` ([polkadot-fellows/runtimes#87](https://github.com/polkadot-fellows/runtimes/pull/87)). Context: - Whitelist `force_default_xcm_version` in XCM call filter ([polkadot-fellows/runtimes#45](https://github.com/polkadot-fellows/runtimes/pull/45)) - Update the fellowship salary budget amount in alignment with the Fellowship Salary [RFC](https://github.com/polkadot-fellows/RFCs/pull/50) ([polkadot-fellows/runtimes#121](https://github.com/polkadot-fellows/runtimes/pull/121)) - Set up an account ID for the local root location on Polkadot Collectives ([polkadot-fellows/runtimes#125](https://github.com/polkadot-fellows/runtimes/pull/125)) @@ -391,10 +414,10 @@ Note: This release only affects the following runtimes and is not a full system ### Added -- Enable async backing on Kusama ([polkadot-fellows/runtimes#87](https://github.com/polkadot-fellows/runtimes/pull/87)). Context: https://github.com/paritytech/polkadot-sdk/pull/1543 -- Implemented GenesisBuilder API for all runtimes ([polkadot-fellows/runtimes#87](https://github.com/polkadot-fellows/runtimes/pull/87)). Context: https://github.com/paritytech/polkadot-sdk/pull/1492 -- XCM transport fees are now exponential and are sent to a treasury account ([polkadot-fellows/runtimes#87](https://github.com/polkadot-fellows/runtimes/pull/87)). Context: https://github.com/paritytech/polkadot-sdk/pull/1234 -- System parachains are now trusted teleporters of each other ([polkadot-fellows/runtimes#87](https://github.com/polkadot-fellows/runtimes/pull/87)). Context: https://github.com/paritytech/polkadot-sdk/pull/1368 +- Enable async backing on Kusama ([polkadot-fellows/runtimes#87](https://github.com/polkadot-fellows/runtimes/pull/87)). Context: +- Implemented GenesisBuilder API for all runtimes ([polkadot-fellows/runtimes#87](https://github.com/polkadot-fellows/runtimes/pull/87)). Context: +- XCM transport fees are now exponential and are sent to a treasury account ([polkadot-fellows/runtimes#87](https://github.com/polkadot-fellows/runtimes/pull/87)). Context: +- System parachains are now trusted teleporters of each other ([polkadot-fellows/runtimes#87](https://github.com/polkadot-fellows/runtimes/pull/87)). Context: - Treasury is able to spend various asset kinds ([polkadot-fellows/runtimes#87](https://github.com/polkadot-fellows/runtimes/pull/87)) - Add BEEFY to Polkadot ([polkadot-fellows/runtimes#65](https://github.com/polkadot-fellows/runtimes/pull/65)) - Fellowship Treasury pallet on Polkadot Collectives ([polkadot-fellows/runtimes#109](https://github.com/polkadot-fellows/runtimes/pull/109)) @@ -403,7 +426,7 @@ Note: This release only affects the following runtimes and is not a full system ### Fixed - Add missing weight functions for `runtime_parachains_hrmp` and `preimage` pallets ([polkadot-fellows/runtimes#56](https://github.com/polkadot-fellows/runtimes/pull/56)) -- Fix for Reward Deficit in the pool ([polkadot-fellows/runtimes#87](https://github.com/polkadot-fellows/runtimes/pull/87)). Context: https://github.com/paritytech/polkadot-sdk/pull/1255 +- Fix for Reward Deficit in the pool ([polkadot-fellows/runtimes#87](https://github.com/polkadot-fellows/runtimes/pull/87)). Context: ## [1.0.1] 14.11.2023 diff --git a/Cargo.lock b/Cargo.lock index da338aa398..b3117086cc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,6 +1,6 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "Inflector" @@ -609,7 +609,7 @@ dependencies = [ "parachains-common", "parity-scale-codec", "polkadot-runtime-common", - "sp-runtime 38.0.0", + "sp-runtime 39.0.2", "staging-kusama-runtime", "staging-xcm", "staging-xcm-executor", @@ -687,9 +687,9 @@ dependencies = [ "sp-core 34.0.0", "sp-genesis-builder", "sp-inherents", - "sp-io 37.0.0", + "sp-io 38.0.0", "sp-offchain", - "sp-runtime 38.0.0", + "sp-runtime 39.0.2", "sp-session", "sp-std", "sp-storage 21.0.0", @@ -745,7 +745,7 @@ dependencies = [ "polkadot-runtime", "polkadot-runtime-common", "polkadot-system-emulated-network", - "sp-runtime 38.0.0", + "sp-runtime 39.0.2", "staging-xcm", "staging-xcm-executor", "system-parachains-constants", @@ -821,9 +821,9 @@ dependencies = [ "sp-core 34.0.0", "sp-genesis-builder", "sp-inherents", - "sp-io 37.0.0", + "sp-io 38.0.0", "sp-offchain", - "sp-runtime 38.0.0", + "sp-runtime 39.0.2", "sp-session", "sp-std", "sp-storage 21.0.0", @@ -841,9 +841,9 @@ dependencies = [ [[package]] name = "asset-test-utils" -version = "15.0.0" +version = "18.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ccc232efa79f7f180856e9bc8535dbb2d813b62418cda7bf154a713adb9ea36" +checksum = "d0324df9ce91a9840632e865dd3272bd20162023856f1b189b7ae58afa5c6b61" dependencies = [ "cumulus-pallet-parachain-system", "cumulus-pallet-xcmp-queue", @@ -860,9 +860,8 @@ dependencies = [ "parachains-common", "parachains-runtimes-test-utils", "parity-scale-codec", - "sp-io 37.0.0", - "sp-runtime 38.0.0", - "sp-std", + "sp-io 38.0.0", + "sp-runtime 39.0.2", "staging-parachain-info", "staging-xcm", "staging-xcm-builder", @@ -872,22 +871,22 @@ dependencies = [ [[package]] name = "assets-common" -version = "0.15.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4e2360c96927aa33b3fef7190eabf2aa4129fe3505c11dfa860ada0f27fd1b1" +checksum = "4556e56f9206b129c3f96249cd907b76e8d7ad5265fe368c228c708789a451a3" dependencies = [ "cumulus-primitives-core", "frame-support", "impl-trait-for-tuples", "log", "pallet-asset-conversion", + "pallet-assets", "pallet-xcm", "parachains-common", "parity-scale-codec", "scale-info", "sp-api", - "sp-runtime 38.0.0", - "sp-std", + "sp-runtime 39.0.2", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -1179,9 +1178,9 @@ dependencies = [ [[package]] name = "binary-merkle-tree" -version = "15.0.0" +version = "15.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b5c0fd4282c30c05647e1052d71bf1a0c8067ab1e9a8fc6d0c292dce0ecb237" +checksum = "336bf780dd7526a9a4bc1521720b25c1994dc132cccd59553431923fa4d1a693" dependencies = [ "hash-db", "log", @@ -1407,16 +1406,16 @@ dependencies = [ [[package]] name = "bp-bridge-hub-cumulus" -version = "0.15.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d48cca10dce1c6d2914e48594f13add2da4a5b7c3ed54fd0fa324054dfb8569a" +checksum = "3832b3362711b0c186f046d248407aec14b89812d39d996b914634a72b2bc2ce" dependencies = [ "bp-messages", "bp-polkadot-core", "bp-runtime", "frame-support", "frame-system", - "polkadot-primitives", + "polkadot-primitives 16.0.0", "sp-api", "sp-std", ] @@ -1432,7 +1431,7 @@ dependencies = [ "kusama-runtime-constants", "polkadot-runtime-constants", "sp-api", - "sp-runtime 38.0.0", + "sp-runtime 39.0.2", "sp-std", "system-parachains-constants", ] @@ -1450,7 +1449,7 @@ dependencies = [ "polkadot-runtime-constants", "snowbridge-core", "sp-api", - "sp-runtime 38.0.0", + "sp-runtime 39.0.2", "sp-std", "staging-xcm", "system-parachains-constants", @@ -1458,9 +1457,9 @@ dependencies = [ [[package]] name = "bp-header-chain" -version = "0.15.0" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57cac4b71008e46d43e346476ed1be85cf7b505efacee17dad84d687344bf1b1" +checksum = "890df97cea17ee61ff982466bb9e90cb6b1462adb45380999019388d05e4b92d" dependencies = [ "bp-runtime", "finality-grandpa", @@ -1470,15 +1469,15 @@ dependencies = [ "serde", "sp-consensus-grandpa", "sp-core 34.0.0", - "sp-runtime 38.0.0", + "sp-runtime 39.0.2", "sp-std", ] [[package]] name = "bp-kusama" -version = "0.13.0" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00615c1d380587c2e211a2d4d1c1ee490a743e32f478b1bba8deda76958d68ff" +checksum = "ad2076b1e50cfcdf07d04e5d395b0b57983bb73eb2791fbafe5348852a89381f" dependencies = [ "bp-header-chain", "bp-polkadot-core", @@ -1490,9 +1489,9 @@ dependencies = [ [[package]] name = "bp-messages" -version = "0.15.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f97eec00a98efeb052ac9fc9676d9fccf5acd19e3b18530f3d72af1a1faf21ec" +checksum = "7efabf94339950b914ba87249497f1a0e35a73849934d164fecae4b275928cf6" dependencies = [ "bp-header-chain", "bp-runtime", @@ -1501,14 +1500,15 @@ dependencies = [ "scale-info", "serde", "sp-core 34.0.0", + "sp-io 38.0.0", "sp-std", ] [[package]] name = "bp-parachains" -version = "0.15.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60c0bde723a5daf39f4f02816483c9ac049818990b06858dff751736636a4ea2" +checksum = "9011e5c12c15caf3c4129a98f4f4916ea9165db8daf6ed85867c3106075f40df" dependencies = [ "bp-header-chain", "bp-polkadot-core", @@ -1518,15 +1518,15 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-core 34.0.0", - "sp-runtime 38.0.0", + "sp-runtime 39.0.2", "sp-std", ] [[package]] name = "bp-polkadot" -version = "0.13.0" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7612420844a580cb268ea1846fe82fb4bd1825b53e9b6dcd56904b3d7f7ea7c" +checksum = "fa6277dd4333917ecfbcc35e9332a9f11682e0a506e76b617c336224660fce33" dependencies = [ "bp-header-chain", "bp-polkadot-core", @@ -1538,9 +1538,9 @@ dependencies = [ [[package]] name = "bp-polkadot-bulletin" -version = "0.12.0" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfb5b3cd885b40b52bf96e52ffbec92d0c435f7303fc11374ccfcfa5bebfbc4f" +checksum = "16ed3a8bcfb14fe0ff32102d0699df1afd1fd4bb94d4ed4bb84a09f76f9ca8f6" dependencies = [ "bp-header-chain", "bp-messages", @@ -1551,15 +1551,15 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-api", - "sp-runtime 38.0.0", + "sp-runtime 39.0.2", "sp-std", ] [[package]] name = "bp-polkadot-core" -version = "0.15.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ef2272823ecfee580c00f6542dfcab3ec7abdb00857af853429736847c3a2d9" +checksum = "345cf472bac11ef79d403e4846a666b7d22a13cd16d9c85b62cd6b5e16c4a042" dependencies = [ "bp-messages", "bp-runtime", @@ -1570,30 +1570,34 @@ dependencies = [ "scale-info", "serde", "sp-core 34.0.0", - "sp-runtime 38.0.0", + "sp-runtime 39.0.2", "sp-std", ] [[package]] name = "bp-relayers" -version = "0.15.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a589f5bb70baa4377a798823be752042aa6c220d51afc559716667e29b0203d" +checksum = "f9465ad727e466d67d64244a1aa7bb19933a297913fdde34b8e9bda0a341bdeb" dependencies = [ + "bp-header-chain", "bp-messages", + "bp-parachains", "bp-runtime", "frame-support", + "frame-system", + "pallet-utility", "parity-scale-codec", "scale-info", - "sp-runtime 38.0.0", + "sp-runtime 39.0.2", "sp-std", ] [[package]] name = "bp-runtime" -version = "0.15.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "904644c23b437dde65741f3148067624ed0b4d8360f68adf9e92273aeb970814" +checksum = "746d9464f912b278f8a5e2400f10541f95da7fc6c7d688a2788b9a46296146ee" dependencies = [ "frame-support", "frame-system", @@ -1605,19 +1609,19 @@ dependencies = [ "scale-info", "serde", "sp-core 34.0.0", - "sp-io 37.0.0", - "sp-runtime 38.0.0", - "sp-state-machine 0.42.0", + "sp-io 38.0.0", + "sp-runtime 39.0.2", + "sp-state-machine 0.43.0", "sp-std", - "sp-trie 36.0.0", + "sp-trie 37.0.0", "trie-db 0.29.1", ] [[package]] name = "bp-test-utils" -version = "0.15.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85062410c8f85ba074f04d843c59f39c7fcb64b83f2ece5bd4379f8c34a4bf15" +checksum = "92e659078b54c0b6bd79896738212a305842ad37168976363233516754337826" dependencies = [ "bp-header-chain", "bp-parachains", @@ -1626,40 +1630,50 @@ dependencies = [ "ed25519-dalek", "finality-grandpa", "parity-scale-codec", - "sp-application-crypto 37.0.0", + "sp-application-crypto 38.0.0", "sp-consensus-grandpa", "sp-core 34.0.0", - "sp-runtime 38.0.0", + "sp-runtime 39.0.2", "sp-std", - "sp-trie 36.0.0", + "sp-trie 37.0.0", ] [[package]] name = "bp-xcm-bridge-hub" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "192804908f1d3b7bfad12abce448fb3b7ec8dda765cac4a8d811fa75557e528f" +checksum = "6909117ca87cb93703742939d5f0c4c93e9646d9cda22262e9709d68c929999b" dependencies = [ + "bp-messages", + "bp-runtime", + "frame-support", + "parity-scale-codec", + "scale-info", + "serde", + "sp-core 34.0.0", + "sp-io 38.0.0", "sp-std", + "staging-xcm", ] [[package]] name = "bp-xcm-bridge-hub-router" -version = "0.13.0" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7dae4d1ec894ee920195dd39070b279ef3c1d4d078c3fcf7336c93a1d502a9d" +checksum = "9284820ca704f5c065563cad77d2e3d069a23cc9cb3a29db9c0de8dd3b173a87" dependencies = [ "parity-scale-codec", "scale-info", "sp-core 34.0.0", - "sp-runtime 38.0.0", + "sp-runtime 39.0.2", + "staging-xcm", ] [[package]] name = "bridge-hub-common" -version = "0.8.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd1e0c182cdd2ce204425d011965d2c6344360b48dd9aa3f4c470713cfaae9ba" +checksum = "c31b53c53d627e2da38f8910807944bf3121e154b5c0ac9e122995af9dfb13ed" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -1668,7 +1682,7 @@ dependencies = [ "scale-info", "snowbridge-core", "sp-core 34.0.0", - "sp-runtime 38.0.0", + "sp-runtime 39.0.2", "sp-std", "staging-xcm", ] @@ -1677,12 +1691,14 @@ dependencies = [ name = "bridge-hub-kusama-emulated-chain" version = "1.0.0" dependencies = [ + "bp-messages", "bridge-hub-common", "bridge-hub-kusama-runtime", "emulated-integration-tests-common", "frame-support", "parachains-common", "sp-core 34.0.0", + "staging-xcm", ] [[package]] @@ -1716,7 +1732,7 @@ dependencies = [ "snowbridge-pallet-system", "snowbridge-router-primitives", "sp-core 34.0.0", - "sp-runtime 38.0.0", + "sp-runtime 39.0.2", "staging-xcm", "staging-xcm-executor", "system-parachains-constants", @@ -1739,6 +1755,8 @@ dependencies = [ "bp-polkadot-core", "bp-relayers", "bp-runtime", + "bp-xcm-bridge-hub", + "bp-xcm-bridge-hub-router", "bridge-hub-common", "bridge-hub-test-utils", "bridge-runtime-common", @@ -1795,10 +1813,10 @@ dependencies = [ "sp-core 34.0.0", "sp-genesis-builder", "sp-inherents", - "sp-io 37.0.0", + "sp-io 38.0.0", "sp-keyring", "sp-offchain", - "sp-runtime 38.0.0", + "sp-runtime 39.0.2", "sp-session", "sp-std", "sp-storage 21.0.0", @@ -1819,12 +1837,14 @@ dependencies = [ name = "bridge-hub-polkadot-emulated-chain" version = "1.0.0" dependencies = [ + "bp-messages", "bridge-hub-common", "bridge-hub-polkadot-runtime", "emulated-integration-tests-common", "frame-support", "parachains-common", "sp-core 34.0.0", + "staging-xcm", ] [[package]] @@ -1858,7 +1878,7 @@ dependencies = [ "snowbridge-pallet-system", "snowbridge-router-primitives", "sp-core 34.0.0", - "sp-runtime 38.0.0", + "sp-runtime 39.0.2", "staging-xcm", "staging-xcm-executor", "system-parachains-constants", @@ -1881,6 +1901,8 @@ dependencies = [ "bp-polkadot-core", "bp-relayers", "bp-runtime", + "bp-xcm-bridge-hub", + "bp-xcm-bridge-hub-router", "bridge-hub-common", "bridge-hub-test-utils", "bridge-runtime-common", @@ -1935,6 +1957,7 @@ dependencies = [ "snowbridge-core", "snowbridge-outbound-queue-runtime-api", "snowbridge-pallet-ethereum-client", + "snowbridge-pallet-ethereum-client-fixtures", "snowbridge-pallet-inbound-queue", "snowbridge-pallet-outbound-queue", "snowbridge-pallet-system", @@ -1948,10 +1971,10 @@ dependencies = [ "sp-core 34.0.0", "sp-genesis-builder", "sp-inherents", - "sp-io 37.0.0", + "sp-io 38.0.0", "sp-keyring", "sp-offchain", - "sp-runtime 38.0.0", + "sp-runtime 39.0.2", "sp-session", "sp-std", "sp-storage 21.0.0", @@ -1970,17 +1993,19 @@ dependencies = [ [[package]] name = "bridge-hub-test-utils" -version = "0.15.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf6c88899f02bc16e383de957a17e01ad7c29d7e51e9c35fa4b70de3fa521f57" +checksum = "de0b3aa5fd8481a06ca16e47fd3d2d9c6abe76b27d922ec8980a853f242173b3" dependencies = [ "asset-test-utils", "bp-header-chain", "bp-messages", + "bp-parachains", "bp-polkadot-core", "bp-relayers", "bp-runtime", "bp-test-utils", + "bp-xcm-bridge-hub", "bridge-runtime-common", "cumulus-pallet-parachain-system", "cumulus-pallet-xcmp-queue", @@ -1995,15 +2020,16 @@ dependencies = [ "pallet-bridge-relayers", "pallet-timestamp", "pallet-utility", + "pallet-xcm", + "pallet-xcm-bridge-hub", "parachains-common", "parachains-runtimes-test-utils", "parity-scale-codec", "sp-core 34.0.0", - "sp-io 37.0.0", + "sp-io 38.0.0", "sp-keyring", - "sp-runtime 38.0.0", - "sp-std", - "sp-tracing 17.0.0", + "sp-runtime 39.0.2", + "sp-tracing 17.0.1", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -2011,9 +2037,9 @@ dependencies = [ [[package]] name = "bridge-runtime-common" -version = "0.15.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "639591635551f94b6e310852430b669495bd99cfd2af20b00a00f6cc7169e70d" +checksum = "c639aa22de6e904156a3e8b0e6b9e6af790cb27a1299688cc07997e1ffe5b648" dependencies = [ "bp-header-chain", "bp-messages", @@ -2022,10 +2048,8 @@ dependencies = [ "bp-relayers", "bp-runtime", "bp-xcm-bridge-hub", - "bp-xcm-bridge-hub-router", "frame-support", "frame-system", - "hash-db", "log", "pallet-bridge-grandpa", "pallet-bridge-messages", @@ -2035,14 +2059,11 @@ dependencies = [ "pallet-utility", "parity-scale-codec", "scale-info", - "sp-api", - "sp-core 34.0.0", - "sp-io 37.0.0", - "sp-runtime 38.0.0", + "sp-io 38.0.0", + "sp-runtime 39.0.2", "sp-std", - "sp-trie 36.0.0", + "sp-trie 37.0.0", "staging-xcm", - "staging-xcm-builder", "static_assertions", "tuplex", ] @@ -2055,9 +2076,9 @@ checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" [[package]] name = "bs58" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5353f36341f7451062466f0b755b96ac3a9547e4d7f6b70d603fc721a7d7896" +checksum = "bf88ba1141d185c399bee5288d850d63b8369520c1eafc32a0430b5b6c287bf4" dependencies = [ "tinyvec", ] @@ -2390,7 +2411,7 @@ dependencies = [ "polkadot-runtime-constants", "polkadot-system-emulated-network", "sp-core 34.0.0", - "sp-runtime 38.0.0", + "sp-runtime 39.0.2", "staging-xcm", "staging-xcm-executor", "system-parachains-constants", @@ -2458,9 +2479,9 @@ dependencies = [ "sp-core 34.0.0", "sp-genesis-builder", "sp-inherents", - "sp-io 37.0.0", + "sp-io 38.0.0", "sp-offchain", - "sp-runtime 38.0.0", + "sp-runtime 39.0.2", "sp-session", "sp-std", "sp-storage 21.0.0", @@ -2644,7 +2665,7 @@ dependencies = [ "parity-scale-codec", "polkadot-runtime-common", "polkadot-runtime-parachains", - "sp-runtime 38.0.0", + "sp-runtime 39.0.2", "staging-kusama-runtime", "staging-xcm", "staging-xcm-executor", @@ -2705,7 +2726,7 @@ dependencies = [ "sp-genesis-builder", "sp-inherents", "sp-offchain", - "sp-runtime 38.0.0", + "sp-runtime 39.0.2", "sp-session", "sp-std", "sp-storage 21.0.0", @@ -2753,7 +2774,7 @@ dependencies = [ "polkadot-runtime-constants", "polkadot-runtime-parachains", "polkadot-system-emulated-network", - "sp-runtime 38.0.0", + "sp-runtime 39.0.2", "staging-xcm", "staging-xcm-executor", "xcm-runtime-apis", @@ -2814,7 +2835,7 @@ dependencies = [ "sp-genesis-builder", "sp-inherents", "sp-offchain", - "sp-runtime 38.0.0", + "sp-runtime 39.0.2", "sp-session", "sp-std", "sp-storage 21.0.0", @@ -3063,9 +3084,9 @@ dependencies = [ [[package]] name = "cumulus-pallet-aura-ext" -version = "0.15.0" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5e8af48090936c45483d489ee681acb54277763586b53fa3dbd17173aa474fc" +checksum = "2cbe2735fc7cf2b6521eab00cb1a1ab025abc1575cc36887b36dc8c5cb1c9434" dependencies = [ "cumulus-pallet-parachain-system", "frame-support", @@ -3074,17 +3095,16 @@ dependencies = [ "pallet-timestamp", "parity-scale-codec", "scale-info", - "sp-application-crypto 37.0.0", + "sp-application-crypto 38.0.0", "sp-consensus-aura", - "sp-runtime 38.0.0", - "sp-std", + "sp-runtime 39.0.2", ] [[package]] name = "cumulus-pallet-parachain-system" -version = "0.15.0" +version = "0.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "300d5509bd8ac95bafe158fa475278315175a4eb0422c2cd82e08e8b9dde035c" +checksum = "546403ee1185f4051a74cc9c9d76e82c63cac3fb68e1bf29f61efb5604c96488" dependencies = [ "bytes", "cumulus-pallet-parachain-system-proc-macro", @@ -3106,11 +3126,11 @@ dependencies = [ "sp-core 34.0.0", "sp-externalities 0.29.0", "sp-inherents", - "sp-io 37.0.0", - "sp-runtime 38.0.0", - "sp-state-machine 0.42.0", + "sp-io 38.0.0", + "sp-runtime 39.0.2", + "sp-state-machine 0.43.0", "sp-std", - "sp-trie 36.0.0", + "sp-trie 37.0.0", "sp-version", "staging-xcm", "staging-xcm-builder", @@ -3131,41 +3151,39 @@ dependencies = [ [[package]] name = "cumulus-pallet-session-benchmarking" -version = "17.0.0" +version = "19.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "506daacefa861aa2909b64f26e76495ce029227fd8355b97e074cc1d5dc54ab2" +checksum = "18168570689417abfb514ac8812fca7e6429764d01942750e395d7d8ce0716ef" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "pallet-session", "parity-scale-codec", - "sp-runtime 38.0.0", - "sp-std", + "sp-runtime 39.0.2", ] [[package]] name = "cumulus-pallet-xcm" -version = "0.15.0" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d5224285f60e5159bab549f458079d606a7f95ef779def8b89f1a244dc7cf81" +checksum = "e49231f6cd8274438b078305dc8ce44c54c0d3f4a28e902589bcbaa53d954608" dependencies = [ "cumulus-primitives-core", "frame-support", "frame-system", "parity-scale-codec", "scale-info", - "sp-io 37.0.0", - "sp-runtime 38.0.0", - "sp-std", + "sp-io 38.0.0", + "sp-runtime 39.0.2", "staging-xcm", ] [[package]] name = "cumulus-pallet-xcmp-queue" -version = "0.15.0" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0adf5409618b21e754fef0ac70f257878d22d61c48fdeefcab666835dcb8e0f0" +checksum = "6f788bdac9474795ea13ba791b55798fb664b2e3da8c3a7385b480c9af4e6539" dependencies = [ "bounded-collections", "bp-xcm-bridge-hub-router", @@ -3180,9 +3198,8 @@ dependencies = [ "polkadot-runtime-parachains", "scale-info", "sp-core 34.0.0", - "sp-io 37.0.0", - "sp-runtime 38.0.0", - "sp-std", + "sp-io 38.0.0", + "sp-runtime 39.0.2", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -3190,42 +3207,40 @@ dependencies = [ [[package]] name = "cumulus-primitives-aura" -version = "0.14.0" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e7977947ad43a4cbc532ca33abcde136ae3deffdc7168b2ae253d73ccd371e4" +checksum = "11e7825bcf3cc6c962a5b9b9f47e02dc381109e521d0bc00cad785c65da18471" dependencies = [ "parity-scale-codec", "polkadot-core-primitives", - "polkadot-primitives", + "polkadot-primitives 15.0.0", "sp-api", "sp-consensus-aura", - "sp-runtime 38.0.0", - "sp-std", + "sp-runtime 39.0.2", ] [[package]] name = "cumulus-primitives-core" -version = "0.14.0" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "751e64b89a839d5cfabebc1c797936e5eee791d0fa2322d91e86f8440a743ddb" +checksum = "9c6b5221a4a3097f2ebef66c84c1e6d7a0b8ec7e63f2bd5ae04c1e6d3fc7514e" dependencies = [ "parity-scale-codec", "polkadot-core-primitives", "polkadot-parachain-primitives", - "polkadot-primitives", + "polkadot-primitives 16.0.0", "scale-info", "sp-api", - "sp-runtime 38.0.0", - "sp-std", - "sp-trie 36.0.0", + "sp-runtime 39.0.2", + "sp-trie 37.0.0", "staging-xcm", ] [[package]] name = "cumulus-primitives-parachain-inherent" -version = "0.14.0" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df521e13b48278b86d02c61d6e44036d6d263deb5aaec4838b1751da8988d3d2" +checksum = "842a694901e04a62d88995418dec35c22f7dba2b34d32d2b8de37d6b92f973ff" dependencies = [ "async-trait", "cumulus-primitives-core", @@ -3233,28 +3248,25 @@ dependencies = [ "scale-info", "sp-core 34.0.0", "sp-inherents", - "sp-runtime 38.0.0", - "sp-state-machine 0.42.0", - "sp-std", - "sp-trie 36.0.0", + "sp-trie 37.0.0", ] [[package]] name = "cumulus-primitives-proof-size-hostfunction" -version = "0.9.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f973d2a7262c90e48dcd42062bcb1e0fbf48bbcdac4ea6df3d85212d8d8be5d" +checksum = "421f03af054aac7c89e87a49e47964886e53a8d7395990eab27b6f201d42524f" dependencies = [ "sp-externalities 0.29.0", "sp-runtime-interface 28.0.0", - "sp-trie 36.0.0", + "sp-trie 37.0.0", ] [[package]] name = "cumulus-primitives-utility" -version = "0.15.0" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05742c520065e3870d419683113ed7f6d35de66f0c80af6828e7878d1bb0ea94" +checksum = "0bdcf4d46dd93f1e6d5dd6d379133566a44042ba6476d04bdcbdb4981c622ae4" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -3262,10 +3274,7 @@ dependencies = [ "pallet-asset-conversion", "parity-scale-codec", "polkadot-runtime-common", - "polkadot-runtime-parachains", - "sp-io 37.0.0", - "sp-runtime 38.0.0", - "sp-std", + "sp-runtime 39.0.2", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -3273,17 +3282,16 @@ dependencies = [ [[package]] name = "cumulus-test-relay-sproof-builder" -version = "0.14.0" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1f4ab9d64a581d4a5431f2554f4602a4208c5e28b30be01af386e24d8447599" +checksum = "e570e41c3f05a8143ebff967bbb0c7dcaaa6f0bebd8639b9418b8005b13eda03" dependencies = [ "cumulus-primitives-core", "parity-scale-codec", - "polkadot-primitives", - "sp-runtime 38.0.0", - "sp-state-machine 0.42.0", - "sp-std", - "sp-trie 36.0.0", + "polkadot-primitives 16.0.0", + "sp-runtime 39.0.2", + "sp-state-machine 0.43.0", + "sp-trie 37.0.0", ] [[package]] @@ -3301,16 +3309,15 @@ dependencies = [ [[package]] name = "curve25519-dalek" -version = "4.1.2" +version = "4.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a677b8922c94e01bdbb12126b0bc852f00447528dee1782229af9c720c3f348" +checksum = "97fb8b7c4503de7d6ae7b42ab72a5a59857b4c937ec27a3d4539dba95b5ab2be" dependencies = [ "cfg-if", "cpufeatures", "curve25519-dalek-derive", "digest 0.10.7", "fiat-crypto", - "platforms", "rustc_version 0.4.0", "subtle 2.5.0", "zeroize", @@ -3640,7 +3647,7 @@ dependencies = [ "regex", "syn 2.0.65", "termcolor", - "toml 0.8.10", + "toml 0.8.12", "walkdir", ] @@ -3726,7 +3733,7 @@ version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4a3daa8e81a3963a60642bcc1f90a670680bd4a77535faa384e9d1c79d620871" dependencies = [ - "curve25519-dalek 4.1.2", + "curve25519-dalek 4.1.3", "ed25519", "rand_core 0.6.4", "serde", @@ -3755,7 +3762,7 @@ version = "4.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7d9ce6874da5d4415896cd45ffbc4d1cfc0c4f9c079427bd870742c30f2f65a9" dependencies = [ - "curve25519-dalek 4.1.2", + "curve25519-dalek 4.1.3", "ed25519", "hashbrown 0.14.3", "hex", @@ -3792,12 +3799,13 @@ dependencies = [ [[package]] name = "emulated-integration-tests-common" -version = "11.0.0" +version = "14.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aef7c980b99bb2e4edfc9535d4096c1d0b5c8e3b52aab38a497a79563e6005f7" +checksum = "e02f16722b84c80116230ed1eac5b49356bebeb0589786d9c651e010369f1c95" dependencies = [ "asset-test-utils", "bp-messages", + "bp-xcm-bridge-hub", "bridge-runtime-common", "cumulus-pallet-parachain-system", "cumulus-pallet-xcmp-queue", @@ -3808,18 +3816,19 @@ dependencies = [ "pallet-bridge-messages", "pallet-message-queue", "pallet-xcm", + "pallet-xcm-bridge-hub", "parachains-common", "parity-scale-codec", "paste", "polkadot-parachain-primitives", - "polkadot-primitives", + "polkadot-primitives 16.0.0", "polkadot-runtime-parachains", "sc-consensus-grandpa", "sp-authority-discovery", "sp-consensus-babe", "sp-consensus-beefy", "sp-core 34.0.0", - "sp-runtime 38.0.0", + "sp-runtime 39.0.2", "staging-xcm", "xcm-emulator", ] @@ -3841,9 +3850,9 @@ dependencies = [ [[package]] name = "encointer-balances-tx-payment" -version = "13.1.0" +version = "14.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e0a21785d37fcc1d2bc52c4b962ed0ecc1ea0ad7b1421c84c57edb9e11a3d34" +checksum = "1f7fcaa7f5fc5cd9493884a4020a9b1d50cb3d26ad1a921e68a6c50310aff144" dependencies = [ "encointer-primitives", "frame-support", @@ -3853,14 +3862,14 @@ dependencies = [ "pallet-encointer-balances", "pallet-encointer-ceremonies", "pallet-transaction-payment", - "sp-runtime 38.0.0", + "sp-runtime 39.0.2", ] [[package]] name = "encointer-balances-tx-payment-rpc-runtime-api" -version = "13.1.0" +version = "14.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "449bca6d70a53456d223f2da58189e56a69eff96249b3d660d7d6123d0c824e9" +checksum = "584f431b0780640fa3fa7f6637f2661cc317cd126a345bf4bba6809c7c0f891f" dependencies = [ "encointer-primitives", "frame-support", @@ -3872,12 +3881,12 @@ dependencies = [ [[package]] name = "encointer-ceremonies-assignment" -version = "13.1.0" +version = "14.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b698a2f681dee5795ef660661df3165d3287807ba4e78fcc874880b18b3f7ec" +checksum = "7d3890b05d20d81cd72e461b4e4a40e574f357bd8bd93095d60196bf85f0ca2b" dependencies = [ "encointer-primitives", - "sp-runtime 38.0.0", + "sp-runtime 39.0.2", "sp-std", ] @@ -3942,7 +3951,7 @@ dependencies = [ "parity-scale-codec", "polkadot-core-primitives", "polkadot-parachain-primitives", - "polkadot-primitives", + "polkadot-primitives 16.0.0", "polkadot-runtime-common", "scale-info", "serde_json", @@ -3954,7 +3963,7 @@ dependencies = [ "sp-genesis-builder", "sp-inherents", "sp-offchain", - "sp-runtime 38.0.0", + "sp-runtime 39.0.2", "sp-session", "sp-std", "sp-transaction-pool", @@ -3970,25 +3979,25 @@ dependencies = [ [[package]] name = "encointer-meetup-validation" -version = "13.1.0" +version = "14.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdf1aa5d61d721fdee928075eac65a2e457d9f63043d3ad43904dab6b4e16938" +checksum = "722b39de0c811f628d8f4667b9d10f119b7219b2fef4bd8e58f4c06ea2e25b02" dependencies = [ "encointer-primitives", "parity-scale-codec", "scale-info", "serde", - "sp-runtime 38.0.0", + "sp-runtime 39.0.2", "sp-std", ] [[package]] name = "encointer-primitives" -version = "13.3.0" +version = "14.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66f3cfb30d32e288aee27656132ebac5cc30b82ffb7e82eba92e568cdd0b1f25" +checksum = "829bc6eb901227ef42798e4004703dd4b9512763d23c90f808063947d34679d7" dependencies = [ - "bs58 0.5.0", + "bs58 0.5.1", "crc", "ep-core", "frame-support", @@ -3997,8 +4006,8 @@ dependencies = [ "scale-info", "serde", "sp-core 34.0.0", - "sp-io 37.0.0", - "sp-runtime 38.0.0", + "sp-io 38.0.0", + "sp-runtime 39.0.2", "sp-std", "substrate-geohash", ] @@ -4079,9 +4088,9 @@ checksum = "e48c92028aaa870e83d51c64e5d4e0b6981b360c522198c23959f219a4e1b15b" [[package]] name = "ep-core" -version = "13.0.0" +version = "14.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "764f4e44c23280f490bcc465af0f0f790f860f2cb1a378d8caf6da4c3cc5c013" +checksum = "7252d3d17ddaf02f1f1dccce29db2de5d76fb94ed046c7b1e5a7d74e0b636cf5" dependencies = [ "array-bytes", "impl-serde", @@ -4090,7 +4099,7 @@ dependencies = [ "serde", "sp-arithmetic 26.0.0", "sp-core 34.0.0", - "sp-runtime 38.0.0", + "sp-runtime 39.0.2", "sp-std", "substrate-fixed", ] @@ -4380,9 +4389,9 @@ checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" [[package]] name = "frame-benchmarking" -version = "36.0.0" +version = "38.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "709b26657ebbba53dc7bb616577375ca462b20fef1b00e8d9b20d2435e87f7bc" +checksum = "a01bdd47c2d541b38bd892da647d1e972c9d85b4ecd7094ad64f7600175da54d" dependencies = [ "frame-support", "frame-support-procedural", @@ -4394,21 +4403,20 @@ dependencies = [ "scale-info", "serde", "sp-api", - "sp-application-crypto 37.0.0", + "sp-application-crypto 38.0.0", "sp-core 34.0.0", - "sp-io 37.0.0", - "sp-runtime 38.0.0", + "sp-io 38.0.0", + "sp-runtime 39.0.2", "sp-runtime-interface 28.0.0", - "sp-std", "sp-storage 21.0.0", "static_assertions", ] [[package]] name = "frame-election-provider-solution-type" -version = "14.0.0" +version = "14.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1388eb632484a1208a5b51d7d822a7df995f37bb10878b2a88f4ec89cbe5e6b2" +checksum = "8156f209055d352994ecd49e19658c6b469d7c6de923bd79868957d0dcfb6f71" dependencies = [ "proc-macro-crate 3.1.0", "proc-macro2", @@ -4418,9 +4426,9 @@ dependencies = [ [[package]] name = "frame-election-provider-support" -version = "36.0.0" +version = "38.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1ec289ebad5e601bb165cf7eb6ec2179ae34280ee310d0710a3111d4f8f8f94" +checksum = "c36f5116192c63d39f1b4556fa30ac7db5a6a52575fa241b045f7dfa82ecc2be" dependencies = [ "frame-election-provider-solution-type", "frame-support", @@ -4430,15 +4438,14 @@ dependencies = [ "sp-arithmetic 26.0.0", "sp-core 34.0.0", "sp-npos-elections", - "sp-runtime 38.0.0", - "sp-std", + "sp-runtime 39.0.2", ] [[package]] name = "frame-executive" -version = "36.0.0" +version = "38.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d878830330eaa9e8b886279c338556b05702d0059989cb51cfb226b70bf3fa4" +checksum = "c365bf3879de25bbee28e9584096955a02fbe8d7e7624e10675800317f1cee5b" dependencies = [ "aquamarine", "frame-support", @@ -4448,10 +4455,9 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-core 34.0.0", - "sp-io 37.0.0", - "sp-runtime 38.0.0", - "sp-std", - "sp-tracing 17.0.0", + "sp-io 38.0.0", + "sp-runtime 39.0.2", + "sp-tracing 17.0.1", ] [[package]] @@ -4479,9 +4485,9 @@ dependencies = [ [[package]] name = "frame-metadata-hash-extension" -version = "0.4.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf37fc730bf4b51e82a34c6357eebe32c04dbacf6525e0a7b9726f6a17ec9427" +checksum = "56ac71dbd97039c49fdd69f416a4dd5d8da3652fdcafc3738b45772ad79eb4ec" dependencies = [ "array-bytes", "docify", @@ -4490,26 +4496,26 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-runtime 38.0.0", + "sp-runtime 39.0.2", ] [[package]] name = "frame-remote-externalities" -version = "0.43.0" +version = "0.46.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff3f2bb3fcc79232818b2d6dd516301b5906cf9e49da77ccd803f19c3d060119" +checksum = "b2a946c33c9bd653f464bb158e020a9e85bd9d6746f39d702a84973bd6a4cde0" dependencies = [ "futures", "indicatif", - "jsonrpsee 0.23.2", + "jsonrpsee 0.24.7", "log", "parity-scale-codec", "serde", "sp-core 34.0.0", "sp-crypto-hashing", - "sp-io 37.0.0", - "sp-runtime 38.0.0", - "sp-state-machine 0.42.0", + "sp-io 38.0.0", + "sp-runtime 39.0.2", + "sp-state-machine 0.43.0", "spinners", "substrate-rpc-client", "tokio", @@ -4518,9 +4524,9 @@ dependencies = [ [[package]] name = "frame-support" -version = "36.0.0" +version = "38.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "512b517645f29d76c79e4c97bf8b0f4dcb6708a2af3be24b1956085dcdcf6ce5" +checksum = "1e44af69fa61bc5005ffe0339e198957e77f0f255704a9bee720da18a733e3dc" dependencies = [ "aquamarine", "array-bytes", @@ -4546,13 +4552,13 @@ dependencies = [ "sp-debug-derive", "sp-genesis-builder", "sp-inherents", - "sp-io 37.0.0", + "sp-io 38.0.0", "sp-metadata-ir", - "sp-runtime 38.0.0", - "sp-staking", - "sp-state-machine 0.42.0", + "sp-runtime 39.0.2", + "sp-staking 36.0.0", + "sp-state-machine 0.43.0", "sp-std", - "sp-tracing 17.0.0", + "sp-tracing 17.0.1", "sp-weights 31.0.0", "static_assertions", "tt-call", @@ -4560,9 +4566,9 @@ dependencies = [ [[package]] name = "frame-support-procedural" -version = "30.0.1" +version = "30.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd94af68373e179c32c360b3c280497a9cf0f45a4f47f0ee6539a6c6c9cf2343" +checksum = "5e8f9b6bc1517a6fcbf0b2377e5c8c6d39f5bb7862b191a59a9992081d63972d" dependencies = [ "Inflector", "cfg-expr", @@ -4604,9 +4610,9 @@ dependencies = [ [[package]] name = "frame-system" -version = "36.1.0" +version = "38.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64d6a0e7bb6503facdcc6f8e19c83cd0bfc8bbbd268522b1a50e107dfc6b972d" +checksum = "e3c7fa02f8c305496d2ae52edaecdb9d165f11afa965e05686d7d7dd1ce93611" dependencies = [ "cfg-if", "docify", @@ -4616,8 +4622,8 @@ dependencies = [ "scale-info", "serde", "sp-core 34.0.0", - "sp-io 37.0.0", - "sp-runtime 38.0.0", + "sp-io 38.0.0", + "sp-runtime 39.0.2", "sp-std", "sp-version", "sp-weights 31.0.0", @@ -4625,9 +4631,9 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" -version = "36.0.0" +version = "38.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15afc91c7780e18274dcea58ed1edb700c48d10e086a9785e3f6708099cd3250" +checksum = "9693b2a736beb076e673520e1e8dee4fc128b8d35b020ef3e8a4b1b5ad63d9f2" dependencies = [ "frame-benchmarking", "frame-support", @@ -4635,31 +4641,30 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-core 34.0.0", - "sp-runtime 38.0.0", - "sp-std", + "sp-runtime 39.0.2", ] [[package]] name = "frame-system-rpc-runtime-api" -version = "33.0.0" +version = "34.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9e9e2b7b85e451e367f4fb85ff3295bd039e17f64de1906154d3976e2638ee8" +checksum = "475c4f8604ba7e4f05cd2c881ba71105093e638b9591ec71a8db14a64b3b4ec3" dependencies = [ + "docify", "parity-scale-codec", "sp-api", ] [[package]] name = "frame-try-runtime" -version = "0.42.0" +version = "0.44.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae6ba8b36a52775ad39ccfb45ff4ad814c3cb45ec74d0a4271889e00bd791c6c" +checksum = "83c811a5a1f5429c7fb5ebbf6cf9502d8f9b673fd395c12cf46c44a30a7daf0e" dependencies = [ "frame-support", "parity-scale-codec", "sp-api", - "sp-runtime 38.0.0", - "sp-std", + "sp-runtime 39.0.2", ] [[package]] @@ -4914,7 +4919,7 @@ dependencies = [ "sp-genesis-builder", "sp-inherents", "sp-offchain", - "sp-runtime 38.0.0", + "sp-runtime 39.0.2", "sp-session", "sp-std", "sp-storage 21.0.0", @@ -5068,9 +5073,9 @@ checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" [[package]] name = "hkdf" -version = "0.12.3" +version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "791a029f6b9fc27657f6f188ec6e5e43f6911f6f878e0dc5501396e09809d437" +checksum = "7b5f8eb2ad728638ea2c7d47a21db23b7b58a72ed6a38256b8a1849f15fbbdf7" dependencies = [ "hmac 0.12.1", ] @@ -5740,14 +5745,14 @@ dependencies = [ [[package]] name = "jsonrpsee" -version = "0.23.2" +version = "0.24.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b089779ad7f80768693755a031cc14a7766aba707cbe886674e3f79e9b7e47" +checksum = "c5c71d8c1a731cc4227c2f698d377e7848ca12c8a48866fc5e6951c43a4db843" dependencies = [ - "jsonrpsee-core 0.23.2", - "jsonrpsee-http-client 0.23.2", + "jsonrpsee-core 0.24.7", + "jsonrpsee-http-client 0.24.7", "jsonrpsee-proc-macros", - "jsonrpsee-types 0.23.2", + "jsonrpsee-types 0.24.7", "jsonrpsee-ws-client", "tracing", ] @@ -5775,14 +5780,14 @@ dependencies = [ [[package]] name = "jsonrpsee-client-transport" -version = "0.23.2" +version = "0.24.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08163edd8bcc466c33d79e10f695cdc98c00d1e6ddfb95cec41b6b0279dd5432" +checksum = "548125b159ba1314104f5bb5f38519e03a41862786aa3925cf349aae9cdd546e" dependencies = [ "base64 0.22.1", "futures-util", "http 1.1.0", - "jsonrpsee-core 0.23.2", + "jsonrpsee-core 0.24.7", "pin-project", "rustls 0.23.11", "rustls-pki-types", @@ -5810,7 +5815,7 @@ dependencies = [ "hyper 0.14.27", "jsonrpsee-types 0.22.5", "pin-project", - "rustc-hash", + "rustc-hash 1.1.0", "serde", "serde_json", "thiserror", @@ -5821,24 +5826,22 @@ dependencies = [ [[package]] name = "jsonrpsee-core" -version = "0.23.2" +version = "0.24.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79712302e737d23ca0daa178e752c9334846b08321d439fd89af9a384f8c830b" +checksum = "f2882f6f8acb9fdaec7cefc4fd607119a9bd709831df7d7672a1d3b644628280" dependencies = [ - "anyhow", "async-trait", - "beef", "bytes", "futures-timer", "futures-util", "http 1.1.0", "http-body 1.0.1", "http-body-util", - "jsonrpsee-types 0.23.2", + "jsonrpsee-types 0.24.7", "parking_lot 0.12.3", "pin-project", "rand", - "rustc-hash", + "rustc-hash 2.0.0", "serde", "serde_json", "thiserror", @@ -5869,9 +5872,9 @@ dependencies = [ [[package]] name = "jsonrpsee-http-client" -version = "0.23.2" +version = "0.24.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d90064e04fb9d7282b1c71044ea94d0bbc6eff5621c66f1a0bce9e9de7cf3ac" +checksum = "b3638bc4617f96675973253b3a45006933bde93c2fd8a6170b33c777cc389e5b" dependencies = [ "async-trait", "base64 0.22.1", @@ -5879,8 +5882,8 @@ dependencies = [ "hyper 1.4.1", "hyper-rustls 0.27.2", "hyper-util", - "jsonrpsee-core 0.23.2", - "jsonrpsee-types 0.23.2", + "jsonrpsee-core 0.24.7", + "jsonrpsee-types 0.24.7", "rustls 0.23.11", "rustls-platform-verifier", "serde", @@ -5894,9 +5897,9 @@ dependencies = [ [[package]] name = "jsonrpsee-proc-macros" -version = "0.23.2" +version = "0.24.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7895f186d5921065d96e16bd795e5ca89ac8356ec423fafc6e3d7cf8ec11aee4" +checksum = "c06c01ae0007548e73412c08e2285ffe5d723195bf268bce67b1b77c3bb2a14d" dependencies = [ "heck 0.5.0", "proc-macro-crate 3.1.0", @@ -5920,11 +5923,10 @@ dependencies = [ [[package]] name = "jsonrpsee-types" -version = "0.23.2" +version = "0.24.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9c465fbe385238e861fdc4d1c85e04ada6c1fd246161d26385c1b311724d2af" +checksum = "a178c60086f24cc35bb82f57c651d0d25d99c4742b4d335de04e97fa1f08a8a1" dependencies = [ - "beef", "http 1.1.0", "serde", "serde_json", @@ -5933,14 +5935,14 @@ dependencies = [ [[package]] name = "jsonrpsee-ws-client" -version = "0.23.2" +version = "0.24.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c28759775f5cb2f1ea9667672d3fe2b0e701d1f4b7b67954e60afe7fd058b5e" +checksum = "0fe322e0896d0955a3ebdd5bf813571c53fea29edd713bc315b76620b327e86d" dependencies = [ "http 1.1.0", - "jsonrpsee-client-transport 0.23.2", - "jsonrpsee-core 0.23.2", - "jsonrpsee-types 0.23.2", + "jsonrpsee-client-transport 0.24.7", + "jsonrpsee-core 0.24.7", + "jsonrpsee-types 0.24.7", "url", ] @@ -6087,7 +6089,7 @@ dependencies = [ "emulated-integration-tests-common", "kusama-runtime-constants", "parachains-common", - "polkadot-primitives", + "polkadot-primitives 16.0.0", "sc-consensus-grandpa", "sp-authority-discovery", "sp-consensus-babe", @@ -6115,11 +6117,11 @@ name = "kusama-runtime-constants" version = "1.0.0" dependencies = [ "frame-support", - "polkadot-primitives", + "polkadot-primitives 16.0.0", "polkadot-runtime-common", "smallvec", "sp-core 34.0.0", - "sp-runtime 38.0.0", + "sp-runtime 39.0.2", "sp-weights 31.0.0", "staging-xcm-builder", ] @@ -6294,11 +6296,11 @@ dependencies = [ [[package]] name = "libp2p-identity" -version = "0.2.8" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "999ec70441b2fb35355076726a6bc466c932e9bdc66f6a11c6c0aa17c7ab9be0" +checksum = "55cca1eb2bc1fd29f099f3daaab7effd01e1a54b7c577d0ed082521034d912e8" dependencies = [ - "bs58 0.5.0", + "bs58 0.5.1", "ed25519-dalek", "hkdf", "multihash 0.19.1", @@ -6384,7 +6386,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2eeec39ad3ad0677551907dd304b2f13f17208ccebe333bef194076cd2e8921" dependencies = [ "bytes", - "curve25519-dalek 4.1.2", + "curve25519-dalek 4.1.3", "futures", "libp2p-core", "libp2p-identity", @@ -6780,9 +6782,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.21" +version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" +checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" [[package]] name = "lru" @@ -6889,6 +6891,15 @@ dependencies = [ "regex-automata 0.1.10", ] +[[package]] +name = "matchers" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" +dependencies = [ + "regex-automata 0.1.10", +] + [[package]] name = "matches" version = "0.1.10" @@ -7016,7 +7027,7 @@ dependencies = [ "bitflags 1.3.2", "blake2 0.10.6", "c2-chacha", - "curve25519-dalek 4.1.2", + "curve25519-dalek 4.1.3", "either", "hashlink", "lioness", @@ -7612,9 +7623,9 @@ checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" [[package]] name = "pallet-alliance" -version = "35.0.0" +version = "37.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6c2c92855904f34ce42de688cc9411ffcb4c3f13751af2dafd52474d540b158" +checksum = "59378a648a0aa279a4b10650366c3389cd0a1239b1876f74bfecd268eecb086b" dependencies = [ "array-bytes", "frame-benchmarking", @@ -7627,16 +7638,15 @@ dependencies = [ "scale-info", "sp-core 34.0.0", "sp-crypto-hashing", - "sp-io 37.0.0", - "sp-runtime 38.0.0", - "sp-std", + "sp-io 38.0.0", + "sp-runtime 39.0.2", ] [[package]] name = "pallet-asset-conversion" -version = "18.0.0" +version = "20.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f726ebb59401c1844a4a8703047bdafcd99a1827cd5d8b2c82abeb8948a7f25b" +checksum = "33f0078659ae95efe6a1bf138ab5250bc41ab98f22ff3651d0208684f08ae797" dependencies = [ "frame-benchmarking", "frame-support", @@ -7647,16 +7657,15 @@ dependencies = [ "sp-api", "sp-arithmetic 26.0.0", "sp-core 34.0.0", - "sp-io 37.0.0", - "sp-runtime 38.0.0", - "sp-std", + "sp-io 38.0.0", + "sp-runtime 39.0.2", ] [[package]] name = "pallet-asset-conversion-tx-payment" -version = "18.0.0" +version = "20.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0fde03a96382f4dbe37ef95cb4ef7aade7c0be410cb6c888eda911c94af3eaf" +checksum = "1ab66c4c22ac0f20e620a954ce7ba050118d6d8011e2d02df599309502064e98" dependencies = [ "frame-support", "frame-system", @@ -7664,15 +7673,14 @@ dependencies = [ "pallet-transaction-payment", "parity-scale-codec", "scale-info", - "sp-runtime 38.0.0", - "sp-std", + "sp-runtime 39.0.2", ] [[package]] name = "pallet-asset-rate" -version = "15.0.0" +version = "17.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e806842bec955190ec64f8b2179f74f5355137c4cadf04f3269e6196cd19caf9" +checksum = "71b2149aa741bc39466bbcc92d9d0ab6e9adcf39d2790443a735ad573b3191e7" dependencies = [ "frame-benchmarking", "frame-support", @@ -7680,15 +7688,14 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-core 34.0.0", - "sp-runtime 38.0.0", - "sp-std", + "sp-runtime 39.0.2", ] [[package]] name = "pallet-asset-tx-payment" -version = "36.0.0" +version = "38.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "100a180dfbf30a1c872100ec2dae8a61c0f5e8b3f2d3a5cbb34093826293e2ab" +checksum = "406a486466d15acc48c99420191f96f1af018f3381fde829c467aba489030f18" dependencies = [ "frame-benchmarking", "frame-support", @@ -7698,16 +7705,15 @@ dependencies = [ "scale-info", "serde", "sp-core 34.0.0", - "sp-io 37.0.0", - "sp-runtime 38.0.0", - "sp-std", + "sp-io 38.0.0", + "sp-runtime 39.0.2", ] [[package]] name = "pallet-assets" -version = "37.0.0" +version = "40.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f79ef6a7763fc08177f014052469ee12aefcdad0d99a747372360c2f648d2cc4" +checksum = "f45f4eb6027fc34c4650e0ed6a7e57ed3335cc364be74b4531f714237676bcee" dependencies = [ "frame-benchmarking", "frame-support", @@ -7717,15 +7723,14 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-core 34.0.0", - "sp-runtime 38.0.0", - "sp-std", + "sp-runtime 39.0.2", ] [[package]] name = "pallet-aura" -version = "35.0.0" +version = "37.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0861b2a1ad6526948567bb59a3fdc4c7f02ee79b07be8b931a544350ec35ab0c" +checksum = "b31da6e794d655d1f9c4da6557a57399538d75905a7862a2ed3f7e5fb711d7e4" dependencies = [ "frame-support", "frame-system", @@ -7733,49 +7738,46 @@ dependencies = [ "pallet-timestamp", "parity-scale-codec", "scale-info", - "sp-application-crypto 37.0.0", + "sp-application-crypto 38.0.0", "sp-consensus-aura", - "sp-runtime 38.0.0", - "sp-std", + "sp-runtime 39.0.2", ] [[package]] name = "pallet-authority-discovery" -version = "36.0.0" +version = "38.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed2c3666a476132f5846fe4d5e1961a923a58a0f54d873d84566f24ffaa3684f" +checksum = "ffb0208f0538d58dcb78ce1ff5e6e8641c5f37b23b20b05587e51da30ab13541" dependencies = [ "frame-support", "frame-system", "pallet-session", "parity-scale-codec", "scale-info", - "sp-application-crypto 37.0.0", + "sp-application-crypto 38.0.0", "sp-authority-discovery", - "sp-runtime 38.0.0", - "sp-std", + "sp-runtime 39.0.2", ] [[package]] name = "pallet-authorship" -version = "36.0.0" +version = "38.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38885846dbcf03b025fdbd7edb3649046dbc68fa0b419ffe8837ef853a10d31f" +checksum = "625d47577cabbe1318ccec5d612e2379002d1b6af1ab6edcef3243c66ec246df" dependencies = [ "frame-support", "frame-system", "impl-trait-for-tuples", "parity-scale-codec", "scale-info", - "sp-runtime 38.0.0", - "sp-std", + "sp-runtime 39.0.2", ] [[package]] name = "pallet-babe" -version = "36.0.0" +version = "38.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b23d2d814e3cb793659fcf84533f66fdf0ed9cccb66cb2225851f482843ed096" +checksum = "4ee096c0def13832475b340d00121025e0225de29604d44bc6dfcaa294c995b4" dependencies = [ "frame-benchmarking", "frame-support", @@ -7786,21 +7788,20 @@ dependencies = [ "pallet-timestamp", "parity-scale-codec", "scale-info", - "sp-application-crypto 37.0.0", + "sp-application-crypto 38.0.0", "sp-consensus-babe", "sp-core 34.0.0", - "sp-io 37.0.0", - "sp-runtime 38.0.0", + "sp-io 38.0.0", + "sp-runtime 39.0.2", "sp-session", - "sp-staking", - "sp-std", + "sp-staking 36.0.0", ] [[package]] name = "pallet-bags-list" -version = "35.0.0" +version = "37.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af34fa3fb6a0abe3577e435988039a9e441f6705ae2d3ad627a23e3f705baa2d" +checksum = "0fd23a6f94ba9c1e57c8a7f8a41327d132903a79c55c0c83f36cbae19946cf10" dependencies = [ "aquamarine", "docify", @@ -7813,17 +7814,16 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-core 34.0.0", - "sp-io 37.0.0", - "sp-runtime 38.0.0", - "sp-std", - "sp-tracing 17.0.0", + "sp-io 38.0.0", + "sp-runtime 39.0.2", + "sp-tracing 17.0.1", ] [[package]] name = "pallet-balances" -version = "37.0.0" +version = "39.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6878e240962d3887f0e0654ac343a18845adb95ad493c9d4d5e803c015d4a4c3" +checksum = "5c6945b078919acb14d126490e4b0973a688568b30142476ca69c6df2bed27ad" dependencies = [ "docify", "frame-benchmarking", @@ -7832,15 +7832,14 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-runtime 38.0.0", - "sp-std", + "sp-runtime 39.0.2", ] [[package]] name = "pallet-beefy" -version = "36.0.0" +version = "39.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "715dfcd1bf3f1f37af6335d4eb3cef921e746ac54721e2258c4fd968b61eb009" +checksum = "014d177a3aba19ac144fc6b2b5eb94930b9874734b91fd014902b6706288bb5f" dependencies = [ "frame-support", "frame-system", @@ -7851,20 +7850,20 @@ dependencies = [ "scale-info", "serde", "sp-consensus-beefy", - "sp-runtime 38.0.0", + "sp-runtime 39.0.2", "sp-session", - "sp-staking", - "sp-std", + "sp-staking 36.0.0", ] [[package]] name = "pallet-beefy-mmr" -version = "36.0.0" +version = "39.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01d70c6f872eb3f2635355ccbea944a4f9ea411c0aa25f6f1a15219e8da11ad2" +checksum = "9c64f536e7f04cf3a0a17fdf20870ddb3d63a7690419c40f75cfd2f72b6e6d22" dependencies = [ "array-bytes", "binary-merkle-tree", + "frame-benchmarking", "frame-support", "frame-system", "log", @@ -7877,17 +7876,16 @@ dependencies = [ "sp-api", "sp-consensus-beefy", "sp-core 34.0.0", - "sp-io 37.0.0", - "sp-runtime 38.0.0", - "sp-state-machine 0.42.0", - "sp-std", + "sp-io 38.0.0", + "sp-runtime 39.0.2", + "sp-state-machine 0.43.0", ] [[package]] name = "pallet-bounties" -version = "35.0.0" +version = "37.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0566499e74ba4b7ccbd1b667eef0dab76ca28402a8d501e22b73a363717b05a9" +checksum = "a1163f9cd8bbc47ec0c6900a3ca67689d8d7b40bedfa6aa22b1b3c6027b1090e" dependencies = [ "frame-benchmarking", "frame-support", @@ -7897,21 +7895,19 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-core 34.0.0", - "sp-io 37.0.0", - "sp-runtime 38.0.0", - "sp-std", + "sp-io 38.0.0", + "sp-runtime 39.0.2", ] [[package]] name = "pallet-bridge-grandpa" -version = "0.15.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61d30a4860bb12559dc28b2d46dd865e2066bce83239230f748e2c569a3cadf4" +checksum = "1d825fbed9fb68bc5d344311653dc0f69caeabe647365abf79a539310b2245f6" dependencies = [ "bp-header-chain", "bp-runtime", "bp-test-utils", - "finality-grandpa", "frame-benchmarking", "frame-support", "frame-system", @@ -7919,35 +7915,35 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-consensus-grandpa", - "sp-runtime 38.0.0", + "sp-runtime 39.0.2", "sp-std", - "sp-trie 36.0.0", ] [[package]] name = "pallet-bridge-messages" -version = "0.15.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3c0fcb1b9ae50ece73cbe36b72c2778f5d4637e4fb0cfac30cb16f7d4b61d5e" +checksum = "a1decdc9fb885e46eb17f850aa14f8cf39e17f31574aa6a5fa1a9e603cc526a2" dependencies = [ + "bp-header-chain", "bp-messages", "bp-runtime", "frame-benchmarking", "frame-support", "frame-system", "log", - "num-traits", "parity-scale-codec", "scale-info", - "sp-runtime 38.0.0", + "sp-runtime 39.0.2", "sp-std", + "sp-trie 37.0.0", ] [[package]] name = "pallet-bridge-parachains" -version = "0.15.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3974fb658cf1b9ca8c2d3c77bf080b2f94c054c2b466b709ef29f6d3726f2231" +checksum = "41450a8d214f20eaff57aeca8e647b20c0df7d66871ee2262609b90824bd4cca" dependencies = [ "bp-header-chain", "bp-parachains", @@ -7960,17 +7956,17 @@ dependencies = [ "pallet-bridge-grandpa", "parity-scale-codec", "scale-info", - "sp-runtime 38.0.0", + "sp-runtime 39.0.2", "sp-std", - "sp-trie 36.0.0", ] [[package]] name = "pallet-bridge-relayers" -version = "0.15.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c92383f4c7d1eaced8413e39b948227a527a0136f705660580c57753dc11568" +checksum = "2faead05455a965a0a0ec69ffa779933479b599e40bda809c0aa1efa72a39281" dependencies = [ + "bp-header-chain", "bp-messages", "bp-relayers", "bp-runtime", @@ -7978,19 +7974,22 @@ dependencies = [ "frame-support", "frame-system", "log", + "pallet-bridge-grandpa", "pallet-bridge-messages", + "pallet-bridge-parachains", + "pallet-transaction-payment", "parity-scale-codec", "scale-info", "sp-arithmetic 26.0.0", - "sp-runtime 38.0.0", + "sp-runtime 39.0.2", "sp-std", ] [[package]] name = "pallet-broker" -version = "0.15.0" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd0d652c399b6ed776ee3322e60f40e323f86b413719d7696eddb8f64c368ac0" +checksum = "3043c90106d88cb93fcf0d9b6d19418f11f44cc2b11873414aec3b46044a24ea" dependencies = [ "bitvec", "frame-benchmarking", @@ -8002,15 +8001,14 @@ dependencies = [ "sp-api", "sp-arithmetic 26.0.0", "sp-core 34.0.0", - "sp-runtime 38.0.0", - "sp-std", + "sp-runtime 39.0.2", ] [[package]] name = "pallet-child-bounties" -version = "35.0.0" +version = "37.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38e351f103ebbdd1eb095da8c2379caccc82ebc59a740c2731693d2204286b83" +checksum = "c7f3bc38ae6584b5f57e4de3e49e5184bfc0f20692829530ae1465ffe04e09e7" dependencies = [ "frame-benchmarking", "frame-support", @@ -8021,16 +8019,15 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-core 34.0.0", - "sp-io 37.0.0", - "sp-runtime 38.0.0", - "sp-std", + "sp-io 38.0.0", + "sp-runtime 39.0.2", ] [[package]] name = "pallet-collator-selection" -version = "17.0.0" +version = "19.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f660cc09f2f277a3976da2eef856b5c725ab7ad1192902ef7f4e4bafd992f04f" +checksum = "658798d70c9054165169f6a6a96cfa9d6a5e7d24a524bc19825bf17fcbc5cc5a" dependencies = [ "frame-benchmarking", "frame-support", @@ -8042,16 +8039,15 @@ dependencies = [ "parity-scale-codec", "rand", "scale-info", - "sp-runtime 38.0.0", - "sp-staking", - "sp-std", + "sp-runtime 39.0.2", + "sp-staking 36.0.0", ] [[package]] name = "pallet-collective" -version = "36.0.0" +version = "38.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "771bf7f6c76c3ea5e965fee0bf1d8a8c79c8c52d75ead65ed3c4d385f333756f" +checksum = "8e149f1aefd444c9a1da6ec5a94bc8a7671d7a33078f85dd19ae5b06e3438e60" dependencies = [ "frame-benchmarking", "frame-support", @@ -8060,16 +8056,15 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-core 34.0.0", - "sp-io 37.0.0", - "sp-runtime 38.0.0", - "sp-std", + "sp-io 38.0.0", + "sp-runtime 39.0.2", ] [[package]] name = "pallet-conviction-voting" -version = "36.0.0" +version = "38.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9033f0d23500bbc39298fd50c07b89a2f2d9f07300139b4df8005995ef683875" +checksum = "999c242491b74395b8c5409ef644e782fe426d87ae36ad92240ffbf21ff0a76e" dependencies = [ "assert_matches", "frame-benchmarking", @@ -8078,16 +8073,15 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-io 37.0.0", - "sp-runtime 38.0.0", - "sp-std", + "sp-io 38.0.0", + "sp-runtime 39.0.2", ] [[package]] name = "pallet-core-fellowship" -version = "20.0.0" +version = "22.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99f3caf5d750236fce5f59fa464a9ca5bbefedd97f2570caa96cf7bdd2ec5261" +checksum = "d063b41df454bd128d6fefd5800af8a71ac383c9dd6f20096832537efc110a8a" dependencies = [ "frame-benchmarking", "frame-support", @@ -8098,31 +8092,31 @@ dependencies = [ "scale-info", "sp-arithmetic 26.0.0", "sp-core 34.0.0", - "sp-io 37.0.0", - "sp-runtime 38.0.0", - "sp-std", + "sp-io 38.0.0", + "sp-runtime 39.0.2", ] [[package]] name = "pallet-delegated-staking" -version = "3.0.0" +version = "5.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0596ec5ab55e02b1b5637b3ec2b99027d036fe97a1ab4733ae105474dfa727cf" +checksum = "117f003a97f980514c6db25a50c22aaec2a9ccb5664b3cb32f52fb990e0b0c12" dependencies = [ "frame-support", "frame-system", + "log", "parity-scale-codec", "scale-info", - "sp-runtime 38.0.0", - "sp-staking", - "sp-std", + "sp-io 38.0.0", + "sp-runtime 39.0.2", + "sp-staking 36.0.0", ] [[package]] name = "pallet-election-provider-multi-phase" -version = "35.0.0" +version = "37.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd1090fdc6ccdd8ff08c60000c970428baaaf0b33e7a6b01a91ec8b697a650a3" +checksum = "62f9ad5ae0c13ba3727183dadf1825b6b7b0b0598ed5c366f8697e13fd540f7d" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -8135,33 +8129,31 @@ dependencies = [ "scale-info", "sp-arithmetic 26.0.0", "sp-core 34.0.0", - "sp-io 37.0.0", + "sp-io 38.0.0", "sp-npos-elections", - "sp-runtime 38.0.0", - "sp-std", + "sp-runtime 39.0.2", "strum 0.26.3", ] [[package]] name = "pallet-election-provider-support-benchmarking" -version = "35.0.0" +version = "37.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93475989d2f6900caf8f1c847a55d909295c156525a7510c5f1dde176ec7c714" +checksum = "d4111d0d27545c260c9dd0d6fc504961db59c1ec4b42e1bcdc28ebd478895c22" dependencies = [ "frame-benchmarking", "frame-election-provider-support", "frame-system", "parity-scale-codec", "sp-npos-elections", - "sp-runtime 38.0.0", - "sp-std", + "sp-runtime 39.0.2", ] [[package]] name = "pallet-encointer-balances" -version = "13.1.0" +version = "14.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85fe03301d9f19ce476b6ce91e0531c6c91b6cb26df88ff4a490ab7493afe026" +checksum = "c08d8d128d6062328cff1896e08239b638a8be998f4c49f3a71f458c00a93bac" dependencies = [ "approx", "encointer-primitives", @@ -8173,15 +8165,15 @@ dependencies = [ "pallet-transaction-payment", "parity-scale-codec", "scale-info", - "sp-runtime 38.0.0", + "sp-runtime 39.0.2", "sp-std", ] [[package]] name = "pallet-encointer-bazaar" -version = "13.1.0" +version = "14.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10d38c490fdd90b649b3ec68a8bb25d3cdfaa11223122482737114e00e29f8a5" +checksum = "8119cf4debfaa60ee94b6a57868c6a5e8491a1aa5e129c51d9093852e90907b2" dependencies = [ "encointer-primitives", "frame-benchmarking", @@ -8197,9 +8189,9 @@ dependencies = [ [[package]] name = "pallet-encointer-bazaar-rpc-runtime-api" -version = "13.1.0" +version = "14.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdfc381df1d6346e244994d4a5729b79b60f964ba4c13e29ea2f057627e1db25" +checksum = "e298ebe7c5b8f36ae47d470c6065bfa7b8aec1953c93358ab11004d1e0988632" dependencies = [ "encointer-primitives", "frame-support", @@ -8210,9 +8202,9 @@ dependencies = [ [[package]] name = "pallet-encointer-ceremonies" -version = "13.1.0" +version = "14.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b76d07f98908e1528413fc4f07162adaaadec0ebe8043fe1beb23ccd2b571b7a" +checksum = "2ee2cee62c5c2a816f5a5604f51c69d3db5818f47dbe9c98a6275f30fa8e2cb3" dependencies = [ "encointer-ceremonies-assignment", "encointer-meetup-validation", @@ -8227,18 +8219,18 @@ dependencies = [ "pallet-timestamp", "parity-scale-codec", "scale-info", - "sp-application-crypto 37.0.0", + "sp-application-crypto 38.0.0", "sp-core 34.0.0", - "sp-io 37.0.0", - "sp-runtime 38.0.0", + "sp-io 38.0.0", + "sp-runtime 39.0.2", "sp-std", ] [[package]] name = "pallet-encointer-ceremonies-rpc-runtime-api" -version = "13.1.0" +version = "14.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c186e855a19f98ba75ef8d674e71533584620a3d7a8ff653631c391f7a4a9b79" +checksum = "8a1d61b552aab2114b3635c8c950c8dcf8f2af585477a43d06b3316fb238742d" dependencies = [ "encointer-primitives", "frame-support", @@ -8249,9 +8241,9 @@ dependencies = [ [[package]] name = "pallet-encointer-communities" -version = "13.1.0" +version = "14.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffbd4cb15599fc47c662234cfdb2c1c63f39106c4099383d84c981fe5c40af0e" +checksum = "6f4fdd122abdd8d046adbb23699c305885a6cb2142bc4297cd801fc0cb8179f3" dependencies = [ "encointer-primitives", "frame-benchmarking", @@ -8262,16 +8254,16 @@ dependencies = [ "pallet-encointer-scheduler", "parity-scale-codec", "scale-info", - "sp-io 37.0.0", - "sp-runtime 38.0.0", + "sp-io 38.0.0", + "sp-runtime 39.0.2", "sp-std", ] [[package]] name = "pallet-encointer-communities-rpc-runtime-api" -version = "13.1.0" +version = "14.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bf0ab6667ef6adb7712810f90301e3047e2b7d18ef0e81017dfc9b823d8696f" +checksum = "a3485d8ecd6899a3c9d2e29ad9fcf404eea3c21b6a3c59fe62b767b4e1d7e61b" dependencies = [ "encointer-primitives", "parity-scale-codec", @@ -8281,9 +8273,9 @@ dependencies = [ [[package]] name = "pallet-encointer-democracy" -version = "13.3.2" +version = "14.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a85ffc73a3a0f927873ff96116cb994bc68f9fac509a556eb0b053265232724" +checksum = "9fe02f09f9202b7840bf2fcbfb88cf78cab603b654c47aad3eafe2e1d8052f5e" dependencies = [ "encointer-primitives", "frame-benchmarking", @@ -8298,18 +8290,18 @@ dependencies = [ "pallet-timestamp", "parity-scale-codec", "scale-info", - "sp-application-crypto 37.0.0", + "sp-application-crypto 38.0.0", "sp-core 34.0.0", - "sp-io 37.0.0", - "sp-runtime 38.0.0", + "sp-io 38.0.0", + "sp-runtime 39.0.2", "sp-std", ] [[package]] name = "pallet-encointer-faucet" -version = "13.2.0" +version = "14.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3493685d55804d44c674429c7f6eae641700542a4295eea9604677a006ecd46" +checksum = "55868ee5af69fbda4c9e846b7fb1d1b5818a70aeb378ca7b8859694c65e36cf5" dependencies = [ "approx", "encointer-primitives", @@ -8322,15 +8314,15 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-core 34.0.0", - "sp-runtime 38.0.0", + "sp-runtime 39.0.2", "sp-std", ] [[package]] name = "pallet-encointer-reputation-commitments" -version = "13.1.0" +version = "14.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfb74f5a90b77739db9829a5aa640afc002fd9ebe05ecf07dd61898a98909d5d" +checksum = "8cf93d7e68eedbd6a9bac69cfdf6d7ade00fbd1d08523361f0733b7b2441241d" dependencies = [ "approx", "encointer-primitives", @@ -8345,15 +8337,15 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-core 34.0.0", - "sp-runtime 38.0.0", + "sp-runtime 39.0.2", "sp-std", ] [[package]] name = "pallet-encointer-scheduler" -version = "13.1.0" +version = "14.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc3be9d4a09bd65fad4968354b320cd3cd1913950891293e00fbc879fc09b5d6" +checksum = "a1db5f74ee0a201eb39f08d769b1c9578fd6d68c619cf41f6acf927f765b6072" dependencies = [ "encointer-primitives", "frame-benchmarking", @@ -8364,15 +8356,15 @@ dependencies = [ "pallet-timestamp", "parity-scale-codec", "scale-info", - "sp-runtime 38.0.0", + "sp-runtime 39.0.2", "sp-std", ] [[package]] name = "pallet-encointer-treasuries" -version = "13.3.0" +version = "14.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65f42991fce5d96f04106e5d27d4c12c77250d70da9ac95497e8fb17a3ebe99f" +checksum = "b88fcb45c1337287da9b8d1568d8c9b87bfb7f45613572b1112527847d7e9931" dependencies = [ "approx", "encointer-primitives", @@ -8385,15 +8377,15 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-core 34.0.0", - "sp-runtime 38.0.0", + "sp-runtime 39.0.2", "sp-std", ] [[package]] name = "pallet-encointer-treasuries-rpc-runtime-api" -version = "13.3.0" +version = "14.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b8bcfc738dde3b75aba337d33ffb9cc109ac5c9f3fed24ce32f1f8c0ee39ab0" +checksum = "928962dcd8404a9bc6bfbca33f4fe5799f299455033efd44c75eb7c0f44b80f1" dependencies = [ "encointer-primitives", "frame-support", @@ -8405,9 +8397,9 @@ dependencies = [ [[package]] name = "pallet-fast-unstake" -version = "35.0.0" +version = "37.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9155f4f762513e0287320411415c76a647152799ad33db1785c9b71c36a14575" +checksum = "e0ee60e8ef10b3936f2700bd61fa45dcc190c61124becc63bed787addcfa0d20" dependencies = [ "docify", "frame-benchmarking", @@ -8417,17 +8409,16 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-io 37.0.0", - "sp-runtime 38.0.0", - "sp-staking", - "sp-std", + "sp-io 38.0.0", + "sp-runtime 39.0.2", + "sp-staking 36.0.0", ] [[package]] name = "pallet-glutton" -version = "22.0.0" +version = "24.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9947ef904cd7662b80f8dee58e03431ee409dacada26d394c34a7bb642d3eeea" +checksum = "a1c79ab340890f6ab088a638c350ac1173a1b2a79c18004787523032025582b4" dependencies = [ "blake2 0.10.6", "frame-benchmarking", @@ -8438,16 +8429,15 @@ dependencies = [ "scale-info", "sp-core 34.0.0", "sp-inherents", - "sp-io 37.0.0", - "sp-runtime 38.0.0", - "sp-std", + "sp-io 38.0.0", + "sp-runtime 39.0.2", ] [[package]] name = "pallet-grandpa" -version = "36.0.0" +version = "38.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8244b686d5cae6a8af1557ed0f49db08f812f0e7942a8d2da554b4da8a69daf0" +checksum = "6d3a570a4aac3173ea46b600408183ca2bcfdaadc077f802f11e6055963e2449" dependencies = [ "frame-benchmarking", "frame-support", @@ -8457,21 +8447,20 @@ dependencies = [ "pallet-session", "parity-scale-codec", "scale-info", - "sp-application-crypto 37.0.0", + "sp-application-crypto 38.0.0", "sp-consensus-grandpa", "sp-core 34.0.0", - "sp-io 37.0.0", - "sp-runtime 38.0.0", + "sp-io 38.0.0", + "sp-runtime 39.0.2", "sp-session", - "sp-staking", - "sp-std", + "sp-staking 36.0.0", ] [[package]] name = "pallet-identity" -version = "36.0.0" +version = "38.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4555795a3e0e3aa49ea432b7afecb9c71a7db8793a99c68bd8dd3a52a12571f3" +checksum = "e3a4288548de9a755e39fcb82ffb9024b6bb1ba0f582464a44423038dd7a892e" dependencies = [ "enumflags2", "frame-benchmarking", @@ -8480,16 +8469,15 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-io 37.0.0", - "sp-runtime 38.0.0", - "sp-std", + "sp-io 38.0.0", + "sp-runtime 39.0.2", ] [[package]] name = "pallet-im-online" -version = "35.0.0" +version = "37.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa761292e95020304b58b50e5187f8bb82f557c8c2d013e3c96ab41d611873b0" +checksum = "c6fd95270cf029d16cb40fe6bd9f8ab9c78cd966666dccbca4d8bfec35c5bba5" dependencies = [ "frame-benchmarking", "frame-support", @@ -8498,19 +8486,18 @@ dependencies = [ "pallet-authorship", "parity-scale-codec", "scale-info", - "sp-application-crypto 37.0.0", + "sp-application-crypto 38.0.0", "sp-core 34.0.0", - "sp-io 37.0.0", - "sp-runtime 38.0.0", - "sp-staking", - "sp-std", + "sp-io 38.0.0", + "sp-runtime 39.0.2", + "sp-staking 36.0.0", ] [[package]] name = "pallet-indices" -version = "36.0.0" +version = "38.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b183880ad5efae06afe6066e76f2bac5acf67f34b3cfab7352ceec46accf4b45" +checksum = "c5e4b97de630427a39d50c01c9e81ab8f029a00e56321823958b39b438f7b940" dependencies = [ "frame-benchmarking", "frame-support", @@ -8518,32 +8505,30 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-core 34.0.0", - "sp-io 37.0.0", + "sp-io 38.0.0", "sp-keyring", - "sp-runtime 38.0.0", - "sp-std", + "sp-runtime 39.0.2", ] [[package]] name = "pallet-insecure-randomness-collective-flip" -version = "24.0.0" +version = "26.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30555c1b6d76cca7266b639f127a055a4974f5a0796859933cbfebc9a75753a2" +checksum = "dce7ad80675d78bd38a7a66ecbbf2d218dd32955e97f8e301d0afe6c87b0f251" dependencies = [ "frame-support", "frame-system", "parity-scale-codec", "safe-mix", "scale-info", - "sp-runtime 38.0.0", - "sp-std", + "sp-runtime 39.0.2", ] [[package]] name = "pallet-membership" -version = "36.0.0" +version = "38.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34006cf047f47edbef33874cc64895918e2c5d7562795209068d5fb388c53a30" +checksum = "1868b5dca4bbfd1f4a222cbb80735a5197020712a71577b496bbb7e19aaa5394" dependencies = [ "frame-benchmarking", "frame-support", @@ -8552,16 +8537,15 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-core 34.0.0", - "sp-io 37.0.0", - "sp-runtime 38.0.0", - "sp-std", + "sp-io 38.0.0", + "sp-runtime 39.0.2", ] [[package]] name = "pallet-message-queue" -version = "39.0.1" +version = "41.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bb779dbfd58b3a4e6a84245392fe9d8c31a746ff7c6db414e91c012663859c3" +checksum = "0faa48b29bf5a178580c164ef00de87319a37da7547a9cd6472dfd160092811a" dependencies = [ "environmental", "frame-benchmarking", @@ -8572,17 +8556,16 @@ dependencies = [ "scale-info", "sp-arithmetic 26.0.0", "sp-core 34.0.0", - "sp-io 37.0.0", - "sp-runtime 38.0.0", - "sp-std", + "sp-io 38.0.0", + "sp-runtime 39.0.2", "sp-weights 31.0.0", ] [[package]] name = "pallet-mmr" -version = "35.0.0" +version = "38.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf8ccec82827413f031689fef4c714fdb0213d58c7a6e208d33f5eab80483770" +checksum = "f6932dfb85f77a57c2d1fdc28a7b3a59ffe23efd8d5bb02dc3039d91347e4a3b" dependencies = [ "frame-benchmarking", "frame-support", @@ -8591,17 +8574,16 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-core 34.0.0", - "sp-io 37.0.0", + "sp-io 38.0.0", "sp-mmr-primitives", - "sp-runtime 38.0.0", - "sp-std", + "sp-runtime 39.0.2", ] [[package]] name = "pallet-multisig" -version = "36.0.0" +version = "38.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be58483d827602eb8353ecf36aed65c857f0974db5d27981831e5ebf853040bd" +checksum = "0e5099c9a4442efcc1568d88ca1d22d624e81ab96358f99f616c67fbd82532d2" dependencies = [ "frame-benchmarking", "frame-support", @@ -8609,16 +8591,15 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-io 37.0.0", - "sp-runtime 38.0.0", - "sp-std", + "sp-io 38.0.0", + "sp-runtime 39.0.2", ] [[package]] name = "pallet-nft-fractionalization" -version = "18.0.0" +version = "21.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dcaa330221f60feaf3b23d495cccc3bf2a3d6254c596b3c032273c2b46d4078" +checksum = "168792cf95a32fa3baf9b874efec82a45124da0a79cee1ae3c98a823e6841959" dependencies = [ "frame-benchmarking", "frame-support", @@ -8628,15 +8609,14 @@ dependencies = [ "pallet-nfts", "parity-scale-codec", "scale-info", - "sp-runtime 38.0.0", - "sp-std", + "sp-runtime 39.0.2", ] [[package]] name = "pallet-nfts" -version = "30.0.0" +version = "32.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e1cd476809de3840e19091a083d5a79178af1f108ad489706e1f9e04c8836a4" +checksum = "59e2aad461a0849d7f0471576eeb1fe3151795bcf2ec9e15eca5cca5b9d743b2" dependencies = [ "enumflags2", "frame-benchmarking", @@ -8646,28 +8626,26 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-core 34.0.0", - "sp-io 37.0.0", - "sp-runtime 38.0.0", - "sp-std", + "sp-io 38.0.0", + "sp-runtime 39.0.2", ] [[package]] name = "pallet-nfts-runtime-api" -version = "22.0.0" +version = "24.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0ca7a0446d2d3c27f726a016c6366218df2e0bfef9ed35886b252cfa9757f6c" +checksum = "a7a1f50c217e19dc50ff586a71eb5915df6a05bc0b25564ea20674c8cd182c1f" dependencies = [ "pallet-nfts", "parity-scale-codec", "sp-api", - "sp-std", ] [[package]] name = "pallet-nis" -version = "36.0.0" +version = "38.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e77cba0e15749c8de2be65efffa51e02bd051b4e6fcf23360d43c3b6a859187c" +checksum = "8ac349e119880b7df1a7c4c36d919b33a498d0e9548af3c237365c654ae0c73d" dependencies = [ "frame-benchmarking", "frame-support", @@ -8676,15 +8654,14 @@ dependencies = [ "scale-info", "sp-arithmetic 26.0.0", "sp-core 34.0.0", - "sp-runtime 38.0.0", - "sp-std", + "sp-runtime 39.0.2", ] [[package]] name = "pallet-nomination-pools" -version = "33.0.0" +version = "35.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36f8c994eb7298a394b58f98afd520b521b5d46f6f39eade4657eeaac9962471" +checksum = "c42906923f9f2b65b22f1211136b57c6878296ba6f6228a075c4442cc1fc1659" dependencies = [ "frame-support", "frame-system", @@ -8693,18 +8670,17 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-core 34.0.0", - "sp-io 37.0.0", - "sp-runtime 38.0.0", - "sp-staking", - "sp-std", - "sp-tracing 17.0.0", + "sp-io 38.0.0", + "sp-runtime 39.0.2", + "sp-staking 36.0.0", + "sp-tracing 17.0.1", ] [[package]] name = "pallet-nomination-pools-benchmarking" -version = "34.0.0" +version = "36.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39ee599f2861e55fc6113c01e9b14d6e85fda46bac36a906b5dd5a951fa0455c" +checksum = "38d2eaca0349bcda923343226b8b64d25a80b67e0a1ebaaa5b0ab1e1b3b225bc" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -8716,29 +8692,27 @@ dependencies = [ "pallet-staking", "parity-scale-codec", "scale-info", - "sp-runtime 38.0.0", + "sp-runtime 39.0.2", "sp-runtime-interface 28.0.0", - "sp-staking", - "sp-std", + "sp-staking 36.0.0", ] [[package]] name = "pallet-nomination-pools-runtime-api" -version = "31.0.0" +version = "33.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2906899d8f029780f0d9da77b90ae86f42bcfda5ac402c931406cd84852012ed" +checksum = "7a9e1cb89cc2e6df06ce274a7fc814e5e688aad04c43902a10191fa3d2a56a96" dependencies = [ "pallet-nomination-pools", "parity-scale-codec", "sp-api", - "sp-std", ] [[package]] name = "pallet-offences" -version = "35.0.0" +version = "37.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4859e7bb2af46d2e0f137c2f777adf39f0e5d4d188226158d599f1cfcfb76b9e" +checksum = "6c4379cf853465696c1c5c03e7e8ce80aeaca0a6139d698abe9ecb3223fd732a" dependencies = [ "frame-support", "frame-system", @@ -8747,16 +8721,15 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-runtime 38.0.0", - "sp-staking", - "sp-std", + "sp-runtime 39.0.2", + "sp-staking 36.0.0", ] [[package]] name = "pallet-offences-benchmarking" -version = "36.0.0" +version = "38.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4351b0edafcdf3240f0471c638b39d2c981bde9d17c0172536a0aa3b7c3097ef" +checksum = "69aa1b24cdffc3fa8c89cdea32c83f1bf9c1c82a87fa00e57ae4be8e85f5e24f" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -8772,16 +8745,15 @@ dependencies = [ "pallet-staking", "parity-scale-codec", "scale-info", - "sp-runtime 38.0.0", - "sp-staking", - "sp-std", + "sp-runtime 39.0.2", + "sp-staking 36.0.0", ] [[package]] name = "pallet-parameters" -version = "0.7.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58d9a81a93202105a660e6aa3d3f81638bdd109ca0497f3e528529cd52d034db" +checksum = "b9aba424d55e17b2a2bec766a41586eab878137704d4803c04bebd6a4743db7b" dependencies = [ "docify", "frame-benchmarking", @@ -8792,15 +8764,14 @@ dependencies = [ "scale-info", "serde", "sp-core 34.0.0", - "sp-runtime 38.0.0", - "sp-std", + "sp-runtime 39.0.2", ] [[package]] name = "pallet-preimage" -version = "36.0.0" +version = "38.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68ac726abc5b1bcd6c8f783514b8e1a48be32c7d15e0b263e4bc28cc1e4e7763" +checksum = "407828bc48c6193ac076fdf909b2fadcaaecd65f42b0b0a04afe22fe8e563834" dependencies = [ "frame-benchmarking", "frame-support", @@ -8809,32 +8780,30 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-core 34.0.0", - "sp-io 37.0.0", - "sp-runtime 38.0.0", - "sp-std", + "sp-io 38.0.0", + "sp-runtime 39.0.2", ] [[package]] name = "pallet-proxy" -version = "36.0.0" +version = "38.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4e12680e176607815a78a0cd10a52af50790292cb950404f30a885e2a7229e9" +checksum = "d39df395f0dbcf07dafe842916adea3266a87ce36ed87b5132184b6bcd746393" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "parity-scale-codec", "scale-info", - "sp-io 37.0.0", - "sp-runtime 38.0.0", - "sp-std", + "sp-io 38.0.0", + "sp-runtime 39.0.2", ] [[package]] name = "pallet-ranked-collective" -version = "36.0.0" +version = "38.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "862ea8d386ed5737e859470c43cbfd9652c81398cad29e03ae7846c21aaee4c6" +checksum = "c2b38708feaed202debf1ac6beffaa5e20c99a9825c5ca0991753c2d4eaaf3ac" dependencies = [ "frame-benchmarking", "frame-support", @@ -8845,32 +8814,30 @@ dependencies = [ "scale-info", "sp-arithmetic 26.0.0", "sp-core 34.0.0", - "sp-io 37.0.0", - "sp-runtime 38.0.0", - "sp-std", + "sp-io 38.0.0", + "sp-runtime 39.0.2", ] [[package]] name = "pallet-recovery" -version = "36.0.0" +version = "38.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b24d4131bc79fee0b07550136ca6329faa84c1c3e76ae62a74aef6b1da0b95b4" +checksum = "406a116aa6d05f88f3c10d79ff89cf577323680a48abd8e5550efb47317e67fa" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "parity-scale-codec", "scale-info", - "sp-io 37.0.0", - "sp-runtime 38.0.0", - "sp-std", + "sp-io 38.0.0", + "sp-runtime 39.0.2", ] [[package]] name = "pallet-referenda" -version = "36.0.0" +version = "38.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2c906a9c4573eb58de4134ec7180bf12c6769df2b9859dae8adcbc5fce78add" +checksum = "c3008c20531d1730c9b457ae77ecf0e3c9b07aaf8c4f5d798d61ef6f0b9e2d4b" dependencies = [ "assert_matches", "frame-benchmarking", @@ -8881,16 +8848,15 @@ dependencies = [ "scale-info", "serde", "sp-arithmetic 26.0.0", - "sp-io 37.0.0", - "sp-runtime 38.0.0", - "sp-std", + "sp-io 38.0.0", + "sp-runtime 39.0.2", ] [[package]] name = "pallet-salary" -version = "21.0.0" +version = "23.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6246871441f85b32d67f70ef13726ac195b05f8e9297df7c46a95a397b8df42" +checksum = "0544a71dba06a9a29da0778ba8cb37728c3b9a8377ac9737c4b1bc48c618bc2f" dependencies = [ "frame-benchmarking", "frame-support", @@ -8901,16 +8867,15 @@ dependencies = [ "scale-info", "sp-arithmetic 26.0.0", "sp-core 34.0.0", - "sp-io 37.0.0", - "sp-runtime 38.0.0", - "sp-std", + "sp-io 38.0.0", + "sp-runtime 39.0.2", ] [[package]] name = "pallet-scheduler" -version = "37.0.0" +version = "39.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b170d6aa191197d3f50b1193925546972ffc394376ead4d2739eb40909b73c85" +checksum = "26899a331e7ab5f7d5966cbf203e1cf5bd99cd110356d7ddcaa7597087cdc0b5" dependencies = [ "docify", "frame-benchmarking", @@ -8919,17 +8884,16 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-io 37.0.0", - "sp-runtime 38.0.0", - "sp-std", + "sp-io 38.0.0", + "sp-runtime 39.0.2", "sp-weights 31.0.0", ] [[package]] name = "pallet-session" -version = "36.0.0" +version = "38.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c92b24c911c2cfa5351616edc7f2f93427ea6f4f95efdb13f0f5d51997939c3" +checksum = "8474b62b6b7622f891e83d922a589e2ad5be5471f5ca47d45831a797dba0b3f4" dependencies = [ "frame-support", "frame-system", @@ -8939,20 +8903,19 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-core 34.0.0", - "sp-io 37.0.0", - "sp-runtime 38.0.0", + "sp-io 38.0.0", + "sp-runtime 39.0.2", "sp-session", - "sp-staking", - "sp-state-machine 0.42.0", - "sp-std", - "sp-trie 36.0.0", + "sp-staking 36.0.0", + "sp-state-machine 0.43.0", + "sp-trie 37.0.0", ] [[package]] name = "pallet-session-benchmarking" -version = "36.0.0" +version = "38.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd02aaf5f10734670346677042ece94fae20dcd5436eafeb9b429d8d6d5b6385" +checksum = "8aadce7df0fee981721983795919642648b846dab5ab9096f82c2cea781007d0" dependencies = [ "frame-benchmarking", "frame-support", @@ -8961,16 +8924,15 @@ dependencies = [ "pallet-staking", "parity-scale-codec", "rand", - "sp-runtime 38.0.0", + "sp-runtime 39.0.2", "sp-session", - "sp-std", ] [[package]] name = "pallet-society" -version = "36.0.0" +version = "38.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66b60b1d726532317f9965bab4995aa49b73f9b7ca3b9a0f75d158bd84686c5f" +checksum = "d1dc69fea8a8de343e71691f009d5fece6ae302ed82b7bb357882b2ea6454143" dependencies = [ "frame-benchmarking", "frame-support", @@ -8980,16 +8942,15 @@ dependencies = [ "rand_chacha", "scale-info", "sp-arithmetic 26.0.0", - "sp-io 37.0.0", - "sp-runtime 38.0.0", - "sp-std", + "sp-io 38.0.0", + "sp-runtime 39.0.2", ] [[package]] name = "pallet-staking" -version = "36.0.0" +version = "38.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbebdb060417654f215fc6f03675e5f44cfc83837d9e523e1b8fd9a4a2e1bdc2" +checksum = "c870d123f4f053b56af808a4beae1ffc4309a696e829796c26837936c926db3b" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -9002,11 +8963,10 @@ dependencies = [ "rand_chacha", "scale-info", "serde", - "sp-application-crypto 37.0.0", - "sp-io 37.0.0", - "sp-runtime 38.0.0", - "sp-staking", - "sp-std", + "sp-application-crypto 38.0.0", + "sp-io 38.0.0", + "sp-runtime 39.0.2", + "sp-staking 36.0.0", ] [[package]] @@ -9033,20 +8993,20 @@ dependencies = [ [[package]] name = "pallet-staking-runtime-api" -version = "21.0.0" +version = "24.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3350ef1795b832f4adc464e88fb6d44827bd3f98701b0b0bbee495267b444a92" +checksum = "e7298559ef3a6b2f5dfbe9a3b8f3d22f2ff9b073c97f4c4853d2b316d973e72d" dependencies = [ "parity-scale-codec", "sp-api", - "sp-staking", + "sp-staking 36.0.0", ] [[package]] name = "pallet-state-trie-migration" -version = "37.0.0" +version = "40.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e07f8626f4ff62ac79d6ad0bd01fab7645897ce35706ddb95fa084e75be9306d" +checksum = "138c15b4200b9dc4c3e031def6a865a235cdc76ff91ee96fba19ca1787c9dda6" dependencies = [ "frame-benchmarking", "frame-support", @@ -9055,16 +9015,15 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-core 34.0.0", - "sp-io 37.0.0", - "sp-runtime 38.0.0", - "sp-std", + "sp-io 38.0.0", + "sp-runtime 39.0.2", ] [[package]] name = "pallet-sudo" -version = "36.0.0" +version = "38.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bd2a8797c1bb3d3897b4f87a7716111da5eeb8561345277b6e6d70349ec8b35" +checksum = "1574fe2aed3d52db4a389b77b53d8c9758257b121e3e7bbe24c4904e11681e0e" dependencies = [ "docify", "frame-benchmarking", @@ -9072,16 +9031,15 @@ dependencies = [ "frame-system", "parity-scale-codec", "scale-info", - "sp-io 37.0.0", - "sp-runtime 38.0.0", - "sp-std", + "sp-io 38.0.0", + "sp-runtime 39.0.2", ] [[package]] name = "pallet-timestamp" -version = "35.0.0" +version = "37.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae789d344be857679b0b98b28a67c747119724847f81d704d3fd03ee13fb6841" +checksum = "a9ba9b71bbfd33ae672f23ba7efaeed2755fdac37b8f946cb7474fc37841b7e1" dependencies = [ "docify", "frame-benchmarking", @@ -9091,18 +9049,17 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-inherents", - "sp-io 37.0.0", - "sp-runtime 38.0.0", - "sp-std", + "sp-io 38.0.0", + "sp-runtime 39.0.2", "sp-storage 21.0.0", "sp-timestamp", ] [[package]] name = "pallet-transaction-payment" -version = "36.0.0" +version = "38.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74fb6114223c8d967c3c2f21cbc845e8ea604ff7e21a8e59d119d5a9257ba886" +checksum = "47b1aa3498107a30237f941b0f02180db3b79012c3488878ff01a4ac3e8ee04e" dependencies = [ "frame-support", "frame-system", @@ -9110,29 +9067,28 @@ dependencies = [ "scale-info", "serde", "sp-core 34.0.0", - "sp-io 37.0.0", - "sp-runtime 38.0.0", - "sp-std", + "sp-io 38.0.0", + "sp-runtime 39.0.2", ] [[package]] name = "pallet-transaction-payment-rpc-runtime-api" -version = "36.0.0" +version = "38.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4bad1700ad7eb5ab254189e1df894d1d16b3626a3c4b9c45259ec4d9efc262c" +checksum = "49fdf5ab71e9dbcadcf7139736b6ea6bac8ec4a83985d46cbd130e1eec770e41" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", "sp-api", - "sp-runtime 38.0.0", + "sp-runtime 39.0.2", "sp-weights 31.0.0", ] [[package]] name = "pallet-treasury" -version = "35.0.0" +version = "37.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c502615bb4fdd02856a131cb2a612ad40c26435ec938f65f11cae4ff230812b" +checksum = "98bfdd3bb9b58fb010bcd419ff5bf940817a8e404cdbf7886a53ac730f5dda2b" dependencies = [ "docify", "frame-benchmarking", @@ -9144,15 +9100,14 @@ dependencies = [ "scale-info", "serde", "sp-core 34.0.0", - "sp-runtime 38.0.0", - "sp-std", + "sp-runtime 39.0.2", ] [[package]] name = "pallet-uniques" -version = "36.0.0" +version = "38.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a59e8599a8c19908e934645f845b5cb546cef1f08745319db7e5b9c24f9e0e4" +checksum = "c2b13cdaedf2d5bd913a5f6e637cb52b5973d8ed4b8d45e56d921bc4d627006f" dependencies = [ "frame-benchmarking", "frame-support", @@ -9160,15 +9115,14 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-runtime 38.0.0", - "sp-std", + "sp-runtime 39.0.2", ] [[package]] name = "pallet-utility" -version = "36.0.0" +version = "38.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3238fe6ad00da6a137be115904c39cab97eb5c7f03da0bb1a20de1bef03f0c71" +checksum = "2fdcade6efc0b66fc7fc4138964802c02d0ffb7380d894e26b9dd5073727d2b3" dependencies = [ "frame-benchmarking", "frame-support", @@ -9176,16 +9130,15 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-core 34.0.0", - "sp-io 37.0.0", - "sp-runtime 38.0.0", - "sp-std", + "sp-io 38.0.0", + "sp-runtime 39.0.2", ] [[package]] name = "pallet-vesting" -version = "36.0.0" +version = "38.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78f7f0f4fe5e1d851e85d81e5e73b6f929f0c35af786ce8be9c9e3363717c136" +checksum = "807df2ef13ab6bf940879352c3013bfa00b670458b4c125c2f60e5753f68e3d5" dependencies = [ "frame-benchmarking", "frame-support", @@ -9193,15 +9146,14 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-runtime 38.0.0", - "sp-std", + "sp-runtime 39.0.2", ] [[package]] name = "pallet-whitelist" -version = "35.0.0" +version = "37.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e4f27640279229eb73fde0cb06e98b799305e6b0bc724f4dfbef2001ab4ad00" +checksum = "1ef17df925290865cf37096dd0cb76f787df11805bba01b1d0ca3e106d06280b" dependencies = [ "frame-benchmarking", "frame-support", @@ -9209,15 +9161,14 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-api", - "sp-runtime 38.0.0", - "sp-std", + "sp-runtime 39.0.2", ] [[package]] name = "pallet-xcm" -version = "15.0.0" +version = "17.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe7409458b7fedc5c7d46459da154ccc2dc22a843ce08e8ab6c1743ef5cf972c" +checksum = "0b1760b6589e53f4ad82216c72c0e38fcb4df149c37224ab3301dc240c85d1d4" dependencies = [ "bounded-collections", "frame-benchmarking", @@ -9229,9 +9180,8 @@ dependencies = [ "scale-info", "serde", "sp-core 34.0.0", - "sp-io 37.0.0", - "sp-runtime 38.0.0", - "sp-std", + "sp-io 38.0.0", + "sp-runtime 39.0.2", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -9240,9 +9190,9 @@ dependencies = [ [[package]] name = "pallet-xcm-benchmarks" -version = "15.0.0" +version = "17.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f177a171203cc0bec3cff1bdd5d3b926abfbd0ecf347e044b147194e664f717" +checksum = "2da423463933b42f4a4c74175f9e9295a439de26719579b894ce533926665e4a" dependencies = [ "frame-benchmarking", "frame-support", @@ -9250,9 +9200,8 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-io 37.0.0", - "sp-runtime 38.0.0", - "sp-std", + "sp-io 38.0.0", + "sp-runtime 39.0.2", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -9260,14 +9209,13 @@ dependencies = [ [[package]] name = "pallet-xcm-bridge-hub" -version = "0.10.0" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b663d0aca0364d576464bd3c976c72ebfe51b3d5f5367686eb7da72c6cb71f23" +checksum = "d5f9670065b7cba92771060a4a3925b6650ff67611443ccfccd5aa356f7d5aac" dependencies = [ "bp-messages", "bp-runtime", "bp-xcm-bridge-hub", - "bridge-runtime-common", "frame-support", "frame-system", "log", @@ -9275,7 +9223,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-core 34.0.0", - "sp-runtime 38.0.0", + "sp-runtime 39.0.2", "sp-std", "staging-xcm", "staging-xcm-builder", @@ -9284,9 +9232,9 @@ dependencies = [ [[package]] name = "pallet-xcm-bridge-hub-router" -version = "0.13.0" +version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f48bd38d4061a51f263f4c08021e66100e16cbda9978fba163d2544637b31dab" +checksum = "f3b5347c826b721098ef39afb0d750e621c77538044fc1e865af1a8747824fdf" dependencies = [ "bp-xcm-bridge-hub-router", "frame-benchmarking", @@ -9296,7 +9244,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-core 34.0.0", - "sp-runtime 38.0.0", + "sp-runtime 39.0.2", "sp-std", "staging-xcm", "staging-xcm-builder", @@ -9304,9 +9252,9 @@ dependencies = [ [[package]] name = "parachains-common" -version = "15.0.0" +version = "18.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9319e656eebdf161666e54a4d8e24f73137f702f01600247f7be650bc4d46167" +checksum = "c9460a69f409be27c62161d8b4d36ffc32735d09a4f9097f9c789db0cca7196c" dependencies = [ "cumulus-primitives-core", "cumulus-primitives-utility", @@ -9321,13 +9269,12 @@ dependencies = [ "pallet-message-queue", "pallet-xcm", "parity-scale-codec", - "polkadot-primitives", + "polkadot-primitives 16.0.0", "scale-info", "sp-consensus-aura", "sp-core 34.0.0", - "sp-io 37.0.0", - "sp-runtime 38.0.0", - "sp-std", + "sp-io 38.0.0", + "sp-runtime 39.0.2", "staging-parachain-info", "staging-xcm", "staging-xcm-executor", @@ -9336,9 +9283,9 @@ dependencies = [ [[package]] name = "parachains-runtimes-test-utils" -version = "15.0.0" +version = "17.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c778447d2e71a418b083c0458579d0f8d13872f43c63142d9e5157edea000bdd" +checksum = "287d2db0a2d19466caa579a69f021bfdc6fa352f382c8395dade58d1d0c6adfe" dependencies = [ "cumulus-pallet-parachain-system", "cumulus-pallet-xcmp-queue", @@ -9356,10 +9303,9 @@ dependencies = [ "polkadot-parachain-primitives", "sp-consensus-aura", "sp-core 34.0.0", - "sp-io 37.0.0", - "sp-runtime 38.0.0", - "sp-std", - "sp-tracing 17.0.0", + "sp-io 38.0.0", + "sp-runtime 39.0.2", + "sp-tracing 17.0.1", "staging-parachain-info", "staging-xcm", "staging-xcm-executor", @@ -9374,7 +9320,7 @@ checksum = "4e69bf016dc406eff7d53a7d3f7cf1c2e72c82b9088aac1118591e36dd2cd3e9" dependencies = [ "bitcoin_hashes 0.13.0", "rand", - "rand_core 0.5.1", + "rand_core 0.6.4", "serde", "unicode-normalization", ] @@ -9520,9 +9466,9 @@ dependencies = [ [[package]] name = "paste" -version = "1.0.14" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" [[package]] name = "pbkdf2" @@ -9570,9 +9516,9 @@ dependencies = [ [[package]] name = "penpal-runtime" -version = "0.22.0" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35e9e9644360684706e3f4abcc85ccec611d142d5f7c2b72c12e7c0d28c49de1" +checksum = "20094cbee22c7e6099653d69ca9a36678be58d6a1739adceb0c98a7b20df53c7" dependencies = [ "assets-common", "cumulus-pallet-aura-ext", @@ -9590,6 +9536,7 @@ dependencies = [ "frame-system-rpc-runtime-api", "frame-try-runtime", "log", + "pallet-asset-conversion", "pallet-asset-tx-payment", "pallet-assets", "pallet-aura", @@ -9606,8 +9553,9 @@ dependencies = [ "parachains-common", "parity-scale-codec", "polkadot-parachain-primitives", - "polkadot-primitives", + "polkadot-primitives 16.0.0", "polkadot-runtime-common", + "primitive-types", "scale-info", "smallvec", "sp-api", @@ -9617,9 +9565,8 @@ dependencies = [ "sp-genesis-builder", "sp-inherents", "sp-offchain", - "sp-runtime 38.0.0", + "sp-runtime 39.0.2", "sp-session", - "sp-std", "sp-storage 21.0.0", "sp-transaction-pool", "sp-version", @@ -9663,7 +9610,7 @@ dependencies = [ "parity-scale-codec", "people-kusama-runtime", "polkadot-runtime-common", - "sp-runtime 38.0.0", + "sp-runtime 39.0.2", "staging-kusama-runtime", "staging-xcm", "staging-xcm-executor", @@ -9712,7 +9659,7 @@ dependencies = [ "parachains-common", "parity-scale-codec", "polkadot-parachain-primitives", - "polkadot-primitives", + "polkadot-primitives 16.0.0", "polkadot-runtime-common", "scale-info", "serde", @@ -9724,7 +9671,7 @@ dependencies = [ "sp-genesis-builder", "sp-inherents", "sp-offchain", - "sp-runtime 38.0.0", + "sp-runtime 39.0.2", "sp-session", "sp-std", "sp-storage 21.0.0", @@ -9772,7 +9719,7 @@ dependencies = [ "polkadot-runtime-common", "polkadot-runtime-constants", "polkadot-system-emulated-network", - "sp-runtime 38.0.0", + "sp-runtime 39.0.2", "staging-xcm", "staging-xcm-executor", "xcm-runtime-apis", @@ -9831,7 +9778,7 @@ dependencies = [ "sp-genesis-builder", "sp-inherents", "sp-offchain", - "sp-runtime 38.0.0", + "sp-runtime 39.0.2", "sp-session", "sp-std", "sp-storage 21.0.0", @@ -9972,12 +9919,6 @@ version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "69d3587f8a9e599cc7ec2c00e331f71c4e69a5f9a4b8a6efd5b07466b9736f9a" -[[package]] -name = "platforms" -version = "3.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14e6ab3f592e6fb464fc9712d8d6e6912de6473954635fd76a589d832cffcbb0" - [[package]] name = "polkadot-ckb-merkle-mountain-range" version = "0.7.0" @@ -9990,15 +9931,14 @@ dependencies = [ [[package]] name = "polkadot-core-primitives" -version = "14.0.0" +version = "15.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17c72ee63bcf920f963cd7ac066759b0b649350c8ab3781a85a6aac87b1488f2" +checksum = "e2900d3b857e34c480101618a950c3a4fbcddc8c0d50573d48553376185908b8" dependencies = [ "parity-scale-codec", "scale-info", "sp-core 34.0.0", - "sp-runtime 38.0.0", - "sp-std", + "sp-runtime 39.0.2", ] [[package]] @@ -10008,7 +9948,7 @@ dependencies = [ "emulated-integration-tests-common", "pallet-staking", "parachains-common", - "polkadot-primitives", + "polkadot-primitives 16.0.0", "polkadot-runtime", "polkadot-runtime-constants", "sc-consensus-grandpa", @@ -10016,14 +9956,14 @@ dependencies = [ "sp-consensus-babe", "sp-consensus-beefy", "sp-core 34.0.0", - "sp-runtime 38.0.0", + "sp-runtime 39.0.2", ] [[package]] name = "polkadot-parachain-primitives" -version = "13.0.0" +version = "14.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f61070d0ff28f596890def0e0d03c231860796130b2a43e293106fa86a50c9a9" +checksum = "52b5648a2e8ce1f9a0f8c41c38def670cefd91932cd793468e1a5b0b0b4e4af1" dependencies = [ "bounded-collections", "derive_more", @@ -10032,16 +9972,15 @@ dependencies = [ "scale-info", "serde", "sp-core 34.0.0", - "sp-runtime 38.0.0", - "sp-std", + "sp-runtime 39.0.2", "sp-weights 31.0.0", ] [[package]] name = "polkadot-primitives" -version = "14.0.0" +version = "15.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a4879609f4340138930c3c7313256941104a3ff6f7ecb2569d15223da9b35b2" +checksum = "b57bc055fa389372ec5fc0001b99aeffd50f3fd379280ce572d935189bb58dd8" dependencies = [ "bitvec", "hex-literal", @@ -10052,17 +9991,43 @@ dependencies = [ "scale-info", "serde", "sp-api", - "sp-application-crypto 37.0.0", + "sp-application-crypto 38.0.0", "sp-arithmetic 26.0.0", "sp-authority-discovery", "sp-consensus-slots", "sp-core 34.0.0", "sp-inherents", - "sp-io 37.0.0", + "sp-io 38.0.0", "sp-keystore 0.40.0", - "sp-runtime 38.0.0", - "sp-staking", - "sp-std", + "sp-runtime 39.0.2", + "sp-staking 34.0.0", +] + +[[package]] +name = "polkadot-primitives" +version = "16.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6bb20b75d33212150242d39890d7ededab55f1084160c337f15d0eb8ca8c3ad4" +dependencies = [ + "bitvec", + "hex-literal", + "log", + "parity-scale-codec", + "polkadot-core-primitives", + "polkadot-parachain-primitives", + "scale-info", + "serde", + "sp-api", + "sp-application-crypto 38.0.0", + "sp-arithmetic 26.0.0", + "sp-authority-discovery", + "sp-consensus-slots", + "sp-core 34.0.0", + "sp-inherents", + "sp-io 38.0.0", + "sp-keystore 0.40.0", + "sp-runtime 39.0.2", + "sp-staking 36.0.0", ] [[package]] @@ -10095,6 +10060,7 @@ dependencies = [ "pallet-broker", "pallet-child-bounties", "pallet-conviction-voting", + "pallet-delegated-staking", "pallet-election-provider-multi-phase", "pallet-election-provider-support-benchmarking", "pallet-fast-unstake", @@ -10130,7 +10096,7 @@ dependencies = [ "pallet-xcm-benchmarks", "parity-scale-codec", "polkadot-parachain-primitives", - "polkadot-primitives", + "polkadot-primitives 16.0.0", "polkadot-runtime-common", "polkadot-runtime-constants", "polkadot-runtime-parachains", @@ -10139,7 +10105,7 @@ dependencies = [ "separator", "serde_json", "sp-api", - "sp-application-crypto 37.0.0", + "sp-application-crypto 38.0.0", "sp-arithmetic 26.0.0", "sp-authority-discovery", "sp-block-builder", @@ -10149,18 +10115,18 @@ dependencies = [ "sp-debug-derive", "sp-genesis-builder", "sp-inherents", - "sp-io 37.0.0", + "sp-io 38.0.0", "sp-keyring", "sp-npos-elections", "sp-offchain", - "sp-runtime 38.0.0", + "sp-runtime 39.0.2", "sp-session", - "sp-staking", + "sp-staking 36.0.0", "sp-std", "sp-storage 21.0.0", - "sp-tracing 17.0.0", + "sp-tracing 17.0.1", "sp-transaction-pool", - "sp-trie 36.0.0", + "sp-trie 37.0.0", "sp-version", "ss58-registry", "staging-xcm", @@ -10173,9 +10139,9 @@ dependencies = [ [[package]] name = "polkadot-runtime-common" -version = "15.0.0" +version = "17.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28fdcb41bb21c7b14d0341a9a17364ccc04ad34de05d41e7938cb03acbc11066" +checksum = "dc15154ba5ca55d323fcf7af0f5dcd39d58dcb4dfac3d9b30404840a6d8bbde4" dependencies = [ "bitvec", "frame-benchmarking", @@ -10201,7 +10167,7 @@ dependencies = [ "pallet-treasury", "pallet-vesting", "parity-scale-codec", - "polkadot-primitives", + "polkadot-primitives 16.0.0", "polkadot-runtime-parachains", "rustc-hex", "scale-info", @@ -10211,12 +10177,11 @@ dependencies = [ "sp-api", "sp-core 34.0.0", "sp-inherents", - "sp-io 37.0.0", + "sp-io 38.0.0", "sp-npos-elections", - "sp-runtime 38.0.0", + "sp-runtime 39.0.2", "sp-session", - "sp-staking", - "sp-std", + "sp-staking 36.0.0", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -10228,34 +10193,33 @@ name = "polkadot-runtime-constants" version = "1.0.0" dependencies = [ "frame-support", - "polkadot-primitives", + "polkadot-primitives 16.0.0", "polkadot-runtime-common", "smallvec", "sp-core 34.0.0", - "sp-runtime 38.0.0", + "sp-runtime 39.0.2", "sp-weights 31.0.0", "staging-xcm-builder", ] [[package]] name = "polkadot-runtime-metrics" -version = "15.0.0" +version = "17.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac75b3fea8464e5681b44733ed11cf09e22ff1e956f6703b918b637bd40e7427" +checksum = "2c306f1ace7644a24de860479f92cf8d6467393bb0c9b0777c57e2d42c9d452a" dependencies = [ - "bs58 0.5.0", + "bs58 0.5.1", "frame-benchmarking", "parity-scale-codec", - "polkadot-primitives", - "sp-std", - "sp-tracing 17.0.0", + "polkadot-primitives 16.0.0", + "sp-tracing 17.0.1", ] [[package]] name = "polkadot-runtime-parachains" -version = "15.0.2" +version = "17.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6cb1cf1fa41c64b0b515a33d7bd388c3af0de31e5f93bd4c2b220e408f7f968" +checksum = "bd58e3a17e5df678f5737b018cbfec603af2c93bec56bbb9f8fb8b2b017b54b1" dependencies = [ "bitflags 1.3.2", "bitvec", @@ -10271,6 +10235,7 @@ dependencies = [ "pallet-balances", "pallet-broker", "pallet-message-queue", + "pallet-mmr", "pallet-session", "pallet-staking", "pallet-timestamp", @@ -10278,24 +10243,24 @@ dependencies = [ "parity-scale-codec", "polkadot-core-primitives", "polkadot-parachain-primitives", - "polkadot-primitives", + "polkadot-primitives 16.0.0", "polkadot-runtime-metrics", "rand", "rand_chacha", "scale-info", "serde", "sp-api", - "sp-application-crypto 37.0.0", + "sp-application-crypto 38.0.0", "sp-arithmetic 26.0.0", "sp-core 34.0.0", "sp-inherents", - "sp-io 37.0.0", + "sp-io 38.0.0", "sp-keystore 0.40.0", - "sp-runtime 38.0.0", + "sp-runtime 39.0.2", "sp-session", - "sp-staking", + "sp-staking 36.0.0", "sp-std", - "sp-tracing 17.0.0", + "sp-tracing 17.0.1", "staging-xcm", "staging-xcm-executor", "static_assertions", @@ -10861,7 +10826,7 @@ dependencies = [ "pin-project-lite 0.2.13", "quinn-proto 0.9.6", "quinn-udp 0.3.2", - "rustc-hash", + "rustc-hash 1.1.0", "rustls 0.20.9", "thiserror", "tokio", @@ -10880,7 +10845,7 @@ dependencies = [ "pin-project-lite 0.2.13", "quinn-proto 0.10.6", "quinn-udp 0.4.1", - "rustc-hash", + "rustc-hash 1.1.0", "rustls 0.21.10", "thiserror", "tokio", @@ -10896,7 +10861,7 @@ dependencies = [ "bytes", "rand", "ring 0.16.20", - "rustc-hash", + "rustc-hash 1.1.0", "rustls 0.20.9", "slab", "thiserror", @@ -10914,7 +10879,7 @@ dependencies = [ "bytes", "rand", "ring 0.16.20", - "rustc-hash", + "rustc-hash 1.1.0", "rustls 0.21.10", "slab", "thiserror", @@ -11125,7 +11090,7 @@ checksum = "ad156d539c879b7a24a363a2016d77961786e71f48f2e2fc8302a92abd2429a6" dependencies = [ "hashbrown 0.13.2", "log", - "rustc-hash", + "rustc-hash 1.1.0", "slice-group-by", "smallvec", ] @@ -11180,10 +11145,10 @@ version = "1.0.0" dependencies = [ "pallet-staking-reward-fn", "parity-scale-codec", - "polkadot-primitives", + "polkadot-primitives 16.0.0", "scale-info", "sp-api", - "sp-runtime 38.0.0", + "sp-runtime 39.0.2", ] [[package]] @@ -11342,6 +11307,12 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" +[[package]] +name = "rustc-hash" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "583034fd73374156e66797ed8e5b0d5690409c9226b22d87cb7f19821c05d152" + [[package]] name = "rustc-hex" version = "2.1.0" @@ -11642,15 +11613,15 @@ checksum = "b975ee3a95eaacb611e7b415737a7fa2db4d8ad7b880cc1b97371b04e95c7903" dependencies = [ "log", "sp-core 34.0.0", - "sp-wasm-interface 21.0.0", + "sp-wasm-interface 21.0.1", "thiserror", ] [[package]] name = "sc-block-builder" -version = "0.40.0" +version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6345fb862e10aaa7d88d6689a7c247448c40ae465253c83566dc76a17ec1426" +checksum = "f666f8ff11f96bf6d90676739eb7ccb6a156a4507634b7af83b94f0aa8195a50" dependencies = [ "parity-scale-codec", "sp-api", @@ -11658,15 +11629,15 @@ dependencies = [ "sp-blockchain", "sp-core 34.0.0", "sp-inherents", - "sp-runtime 38.0.0", - "sp-trie 36.0.0", + "sp-runtime 39.0.2", + "sp-trie 37.0.0", ] [[package]] name = "sc-chain-spec" -version = "35.0.0" +version = "38.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e04100ec7ff9cf1f2052b05086c77cc216ff7268b8c4fe41007de420bc1f70be" +checksum = "3534c5dc910e6c9e0f25871948e7bb683852d1aef44b8b7753062feef4235e7c" dependencies = [ "array-bytes", "docify", @@ -11684,10 +11655,10 @@ dependencies = [ "sp-core 34.0.0", "sp-crypto-hashing", "sp-genesis-builder", - "sp-io 37.0.0", - "sp-runtime 38.0.0", - "sp-state-machine 0.42.0", - "sp-tracing 17.0.0", + "sp-io 38.0.0", + "sp-runtime 39.0.2", + "sp-state-machine 0.43.0", + "sp-tracing 17.0.1", ] [[package]] @@ -11704,9 +11675,9 @@ dependencies = [ [[package]] name = "sc-client-api" -version = "35.1.0" +version = "37.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bb517f4418644aeefd7c29bbe34bfc56ba8b5ea56e0b661a48a4d4d6afef40b" +checksum = "e73f1673cdfe658c4be6ffd5113b71c0de74616717e604455dcfd29e15781729" dependencies = [ "fnv", "futures", @@ -11722,19 +11693,19 @@ dependencies = [ "sp-core 34.0.0", "sp-database", "sp-externalities 0.29.0", - "sp-runtime 38.0.0", - "sp-state-machine 0.42.0", + "sp-runtime 39.0.2", + "sp-state-machine 0.43.0", "sp-statement-store", "sp-storage 21.0.0", - "sp-trie 36.0.0", + "sp-trie 37.0.0", "substrate-prometheus-endpoint", ] [[package]] name = "sc-consensus" -version = "0.41.0" +version = "0.44.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b2927954d83d4c055a8699cad8ae093fc921ce73694da6773bd06d195e9a8dd" +checksum = "f64e538ab9edefbf0ddc105ff5b088344c88bc86f21650a2d2020be04a957730" dependencies = [ "async-trait", "futures", @@ -11749,17 +11720,17 @@ dependencies = [ "sp-blockchain", "sp-consensus", "sp-core 34.0.0", - "sp-runtime 38.0.0", - "sp-state-machine 0.42.0", + "sp-runtime 39.0.2", + "sp-state-machine 0.43.0", "substrate-prometheus-endpoint", "thiserror", ] [[package]] name = "sc-consensus-grandpa" -version = "0.27.0" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7c6c62a03b54973f1a608a405908af0fe957fefaf77483cce96bd213eee7ed0" +checksum = "a3aaab70cf6f93ceea829ef0a4980ce95d84d5c7f4b5419b29bbed17fa04e1a6" dependencies = [ "ahash 0.8.8", "array-bytes", @@ -11787,7 +11758,7 @@ dependencies = [ "sc-utils", "serde_json", "sp-api", - "sp-application-crypto 37.0.0", + "sp-application-crypto 38.0.0", "sp-arithmetic 26.0.0", "sp-blockchain", "sp-consensus", @@ -11795,16 +11766,16 @@ dependencies = [ "sp-core 34.0.0", "sp-crypto-hashing", "sp-keystore 0.40.0", - "sp-runtime 38.0.0", + "sp-runtime 39.0.2", "substrate-prometheus-endpoint", "thiserror", ] [[package]] name = "sc-executor" -version = "0.39.0" +version = "0.40.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39f5767bf6a6bad29365d6d08fcf940ee453d31457ed034cf14f0392877daafd" +checksum = "3f0cc0a3728fd033589183460c5a49b2e7545d09dc89a098216ef9e9aadcd9dc" dependencies = [ "parity-scale-codec", "parking_lot 0.12.3", @@ -11815,12 +11786,12 @@ dependencies = [ "sp-api", "sp-core 34.0.0", "sp-externalities 0.29.0", - "sp-io 37.0.0", + "sp-io 38.0.0", "sp-panic-handler", "sp-runtime-interface 28.0.0", - "sp-trie 36.0.0", + "sp-trie 37.0.0", "sp-version", - "sp-wasm-interface 21.0.0", + "sp-wasm-interface 21.0.1", "tracing", ] @@ -11833,7 +11804,7 @@ dependencies = [ "polkavm", "sc-allocator", "sp-maybe-compressed-blob", - "sp-wasm-interface 21.0.0", + "sp-wasm-interface 21.0.1", "thiserror", "wasm-instrument", ] @@ -11847,7 +11818,7 @@ dependencies = [ "log", "polkavm", "sc-executor-common", - "sp-wasm-interface 21.0.0", + "sp-wasm-interface 21.0.1", ] [[package]] @@ -11865,15 +11836,15 @@ dependencies = [ "sc-allocator", "sc-executor-common", "sp-runtime-interface 28.0.0", - "sp-wasm-interface 21.0.0", + "sp-wasm-interface 21.0.1", "wasmtime", ] [[package]] name = "sc-mixnet" -version = "0.12.0" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5a72a92dc72572a0facd73b410855d7f6edf38b32aef46c4798c74f25e595d5" +checksum = "781a1ffd953074e060a5f9e253f7a029bedd935fe9621bb7483cc2d442a6b1d1" dependencies = [ "array-bytes", "arrayvec 0.7.4", @@ -11895,15 +11866,15 @@ dependencies = [ "sp-core 34.0.0", "sp-keystore 0.40.0", "sp-mixnet", - "sp-runtime 38.0.0", + "sp-runtime 39.0.2", "thiserror", ] [[package]] name = "sc-network" -version = "0.42.0" +version = "0.45.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04be75f35cea819bae84be99cde138872b17494acf0e54f5f0ae8b0ed3fbe51a" +checksum = "e729c49834b3c5cfd514cdd1209ad7ae9707abebef92c991b2d41db5a0191396" dependencies = [ "array-bytes", "async-channel 1.9.0", @@ -11940,7 +11911,7 @@ dependencies = [ "sp-arithmetic 26.0.0", "sp-blockchain", "sp-core 34.0.0", - "sp-runtime 38.0.0", + "sp-runtime 39.0.2", "substrate-prometheus-endpoint", "thiserror", "tokio", @@ -11953,9 +11924,9 @@ dependencies = [ [[package]] name = "sc-network-common" -version = "0.41.0" +version = "0.44.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ec0c3c5629a418fb26b56963d40c5ca3fd02dd94eb5753e9eb72cea5c2eeb2f" +checksum = "dbff059c0ca497757f633cfa13625fbaa3028f23a77a9696e94e700008f8dd5a" dependencies = [ "async-trait", "bitflags 1.3.2", @@ -11967,14 +11938,14 @@ dependencies = [ "sc-network-types", "sp-consensus", "sp-consensus-grandpa", - "sp-runtime 38.0.0", + "sp-runtime 39.0.2", ] [[package]] name = "sc-network-gossip" -version = "0.42.0" +version = "0.45.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ae1836528495b6aa5140da39ed0278f5086c21ce530c37964db1b2e2c101ab1" +checksum = "d4086f4ac6b94ff2efd24f1776280c580454c5990b8665aa9f293fcd33c80630" dependencies = [ "ahash 0.8.8", "futures", @@ -11985,16 +11956,16 @@ dependencies = [ "sc-network-sync", "sc-network-types", "schnellru", - "sp-runtime 38.0.0", + "sp-runtime 39.0.2", "substrate-prometheus-endpoint", "tracing", ] [[package]] name = "sc-network-sync" -version = "0.41.0" +version = "0.44.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee9ab31b84534c487b9fb84e83db47890fcbd350f354b1e6484892d3d42d0020" +checksum = "08c9df284544a234ed8e507c6b55e6e3ed4803b7730906b94339706cf12bcc32" dependencies = [ "array-bytes", "async-channel 1.9.0", @@ -12021,7 +11992,7 @@ dependencies = [ "sp-consensus", "sp-consensus-grandpa", "sp-core 34.0.0", - "sp-runtime 38.0.0", + "sp-runtime 39.0.2", "substrate-prometheus-endpoint", "thiserror", "tokio", @@ -12034,7 +12005,7 @@ version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c372dbda66644a1df0daa8c0d99c36b6f74db7dca213d2416cd84f507125224" dependencies = [ - "bs58 0.5.0", + "bs58 0.5.1", "ed25519-dalek", "libp2p-identity", "litep2p", @@ -12048,11 +12019,11 @@ dependencies = [ [[package]] name = "sc-rpc-api" -version = "0.41.0" +version = "0.44.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57b8adf62a207985cf7534abf0d940b335fda0a68eb902da05b7270ee30a6293" +checksum = "147274633577e55db73dbdc64168c25b54cca6cac4fcde118bd9946cf7b24838" dependencies = [ - "jsonrpsee 0.23.2", + "jsonrpsee 0.24.7", "parity-scale-codec", "sc-chain-spec", "sc-mixnet", @@ -12062,16 +12033,16 @@ dependencies = [ "serde_json", "sp-core 34.0.0", "sp-rpc", - "sp-runtime 38.0.0", + "sp-runtime 39.0.2", "sp-version", "thiserror", ] [[package]] name = "sc-telemetry" -version = "22.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1fc8e8ad7f84f2ca864ee361b6207fe21e18c8182c60f209732b2a7c0dcbd31" +checksum = "e9e28cab12625bcdb8828f9a1177b8d061972f90fda89a70c10763da50e0aaa5" dependencies = [ "chrono", "futures", @@ -12090,9 +12061,9 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" -version = "35.0.0" +version = "37.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3de6f60df6706970061e225e87d77aab9a764b258fe151b896a700419bc6b9d" +checksum = "f02936289a079360935685eee5400311994b25e9edb2420a3c4247d419a77f46" dependencies = [ "async-trait", "futures", @@ -12101,7 +12072,7 @@ dependencies = [ "serde", "sp-blockchain", "sp-core 34.0.0", - "sp-runtime 38.0.0", + "sp-runtime 39.0.2", "thiserror", ] @@ -12298,9 +12269,9 @@ dependencies = [ [[package]] name = "schnellru" -version = "0.2.1" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "772575a524feeb803e5b0fcbc6dd9f367e579488197c94c6e4023aad2305774d" +checksum = "c9a8ef13a93c54d20580de1e5c413e624e53121d42fc7e2c11d10ef7f8b02367" dependencies = [ "ahash 0.8.8", "cfg-if", @@ -12316,7 +12287,7 @@ dependencies = [ "aead", "arrayref", "arrayvec 0.7.4", - "curve25519-dalek 4.1.2", + "curve25519-dalek 4.1.3", "getrandom_or_panic", "merlin", "rand_core 0.6.4", @@ -12495,9 +12466,9 @@ checksum = "f97841a747eef040fcd2e7b3b9a220a7205926e60488e673d9e4926d27772ce5" [[package]] name = "serde" -version = "1.0.197" +version = "1.0.210" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fb1c873e1b9b056a4dc4c0c198b24c3ffa059243875552b2bd0933b1aee4ce2" +checksum = "c8e3592472072e6e22e0a54d5904d9febf8508f65fb8552499a1abc7d1078c3a" dependencies = [ "serde_derive", ] @@ -12532,9 +12503,9 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.197" +version = "1.0.210" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" +checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f" dependencies = [ "proc-macro2", "quote", @@ -12543,11 +12514,12 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.114" +version = "1.0.131" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5f09b1bd632ef549eaa9f60a1f8de742bdbc698e6cee2095fc84dde5f549ae0" +checksum = "67d42a0bd4ac281beff598909bb56a86acaf979b84483e1c79c10dcaf98f8cf3" dependencies = [ "itoa", + "memchr", "ryu", "serde", ] @@ -12754,15 +12726,14 @@ checksum = "826167069c09b99d56f31e9ae5c99049e932a98c9dc2dac47645b08dbbf76ba7" [[package]] name = "slot-range-helper" -version = "14.0.0" +version = "15.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4d67aa9b1ccfd746c8529754c4ce06445b1d48e189567402ef856340a3a6b14" +checksum = "5e34f1146a457a5c554dedeae6c7273aa54c3b031f3e9eb0abd037b5511e2ce9" dependencies = [ "enumn", "parity-scale-codec", "paste", - "sp-runtime 38.0.0", - "sp-std", + "sp-runtime 39.0.2", ] [[package]] @@ -12800,7 +12771,7 @@ dependencies = [ "base64 0.21.6", "bip39", "blake2-rfc", - "bs58 0.5.0", + "bs58 0.5.1", "chacha20", "crossbeam-queue", "derive_more", @@ -12888,7 +12859,7 @@ dependencies = [ "aes-gcm", "blake2 0.10.6", "chacha20poly1305", - "curve25519-dalek 4.1.2", + "curve25519-dalek 4.1.3", "rand_core 0.6.4", "ring 0.17.7", "rustc_version 0.4.0", @@ -12908,9 +12879,9 @@ dependencies = [ [[package]] name = "snowbridge-beacon-primitives" -version = "0.8.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0ad61e3ab1c48d4c8060c7ef8571c5b6007df26687e8dbfdb6c857d840cfd2c" +checksum = "10bd720997e558beb556d354238fa90781deb38241cf31c1b6368738ef21c279" dependencies = [ "byte-slice-cast", "frame-support", @@ -12922,8 +12893,8 @@ dependencies = [ "snowbridge-ethereum", "snowbridge-milagro-bls", "sp-core 34.0.0", - "sp-io 37.0.0", - "sp-runtime 38.0.0", + "sp-io 38.0.0", + "sp-runtime 39.0.2", "sp-std", "ssz_rs", "ssz_rs_derive", @@ -12931,9 +12902,9 @@ dependencies = [ [[package]] name = "snowbridge-core" -version = "0.8.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "668cd71582305168ed51cb0357a4b4ea814c68c7db3898a9ba4d492f712c54e1" +checksum = "6be61e4db95d1e253a1d5e722953b2d2f6605e5f9761f0a919e5d3fbdbff9da9" dependencies = [ "ethabi-decode", "frame-support", @@ -12946,8 +12917,8 @@ dependencies = [ "snowbridge-beacon-primitives", "sp-arithmetic 26.0.0", "sp-core 34.0.0", - "sp-io 37.0.0", - "sp-runtime 38.0.0", + "sp-io 38.0.0", + "sp-runtime 39.0.2", "sp-std", "staging-xcm", "staging-xcm-builder", @@ -12955,9 +12926,9 @@ dependencies = [ [[package]] name = "snowbridge-ethereum" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ef1f6f60f6c8cc3cdb2a829d7452de946d8707f63f70c6f714d1c52cbc0fc17" +checksum = "dc3d6d549c57df27cf89ec852f932fa4008eea877a6911a87e03e8002104eabd" dependencies = [ "ethabi-decode", "ethbloom", @@ -12969,8 +12940,8 @@ dependencies = [ "scale-info", "serde", "serde-big-array", - "sp-io 37.0.0", - "sp-runtime 38.0.0", + "sp-io 38.0.0", + "sp-runtime 39.0.2", "sp-std", ] @@ -12991,21 +12962,21 @@ dependencies = [ [[package]] name = "snowbridge-outbound-queue-merkle-tree" -version = "0.8.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eece0e4a868674b3e48cfd7574c1e68a9f5bfd74fb67683f094dacee9abecf5b" +checksum = "74c6a9b65fa61711b704f0c6afb3663c6288288e8822ddae5cc1146fe3ad9ce8" dependencies = [ "parity-scale-codec", "scale-info", "sp-core 34.0.0", - "sp-runtime 38.0.0", + "sp-runtime 39.0.2", ] [[package]] name = "snowbridge-outbound-queue-runtime-api" -version = "0.8.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab6b34950a2abce198fe008ac6a199598053fedcbde2c40fedf981bc55f85dc7" +checksum = "38d27b8d9cb8022637a5ce4f52692520fa75874f393e04ef5cd75bd8795087f6" dependencies = [ "frame-support", "parity-scale-codec", @@ -13017,9 +12988,9 @@ dependencies = [ [[package]] name = "snowbridge-pallet-ethereum-client" -version = "0.8.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0040c2f5a66bcef85e125968af172200cd01d8558c8b3cb9c2e3f1b72abf7dc1" +checksum = "7d53d32d8470c643f9f8c1f508e1e34263f76297e4c9150e10e8f2e0b63992e1" dependencies = [ "frame-benchmarking", "frame-support", @@ -13035,17 +13006,17 @@ dependencies = [ "snowbridge-ethereum", "snowbridge-pallet-ethereum-client-fixtures", "sp-core 34.0.0", - "sp-io 37.0.0", - "sp-runtime 38.0.0", + "sp-io 38.0.0", + "sp-runtime 39.0.2", "sp-std", "static_assertions", ] [[package]] name = "snowbridge-pallet-ethereum-client-fixtures" -version = "0.16.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f00da83ce6214f76212ed70190cf0c8845d514132d3f9c6bab2ab2f914356f0c" +checksum = "3984b98465af1d862d4e87ba783e1731f2a3f851b148d6cb98d526cebd351185" dependencies = [ "hex-literal", "snowbridge-beacon-primitives", @@ -13056,9 +13027,9 @@ dependencies = [ [[package]] name = "snowbridge-pallet-inbound-queue" -version = "0.8.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bd92623ca85fe55e317654254acac72e5a324676c52f0993b0980c90a3544f8" +checksum = "f2e6a9d00e60e3744e6b6f0c21fea6694b9c6401ac40e41340a96e561dcf1935" dependencies = [ "alloy-primitives", "alloy-sol-types", @@ -13076,8 +13047,8 @@ dependencies = [ "snowbridge-pallet-inbound-queue-fixtures", "snowbridge-router-primitives", "sp-core 34.0.0", - "sp-io 37.0.0", - "sp-runtime 38.0.0", + "sp-io 38.0.0", + "sp-runtime 39.0.2", "sp-std", "staging-xcm", "staging-xcm-executor", @@ -13085,9 +13056,9 @@ dependencies = [ [[package]] name = "snowbridge-pallet-inbound-queue-fixtures" -version = "0.16.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b0fd4aebc8d5c244d9e658e911d1a84a06676fd05d9c15fb350bc2e653423ec" +checksum = "b099db83f4c10c0bf84e87deb1596019f91411ea1c8c9733ea9a7f2e7e967073" dependencies = [ "hex-literal", "snowbridge-beacon-primitives", @@ -13098,9 +13069,9 @@ dependencies = [ [[package]] name = "snowbridge-pallet-outbound-queue" -version = "0.8.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3cfbea7729bcbea661b323c6090d971afcb2ff14a88d9861aab384705415f9d6" +checksum = "c7d49478041b6512c710d0d4655675d146fe00a8e0c1624e5d8a1d6c161d490f" dependencies = [ "bridge-hub-common", "ethabi-decode", @@ -13114,16 +13085,16 @@ dependencies = [ "snowbridge-outbound-queue-merkle-tree", "sp-arithmetic 26.0.0", "sp-core 34.0.0", - "sp-io 37.0.0", - "sp-runtime 38.0.0", + "sp-io 38.0.0", + "sp-runtime 39.0.2", "sp-std", ] [[package]] name = "snowbridge-pallet-system" -version = "0.8.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f726d9d2bc15b2683995e6f6ae707d2db20085742860acd32d8fb246251681f2" +checksum = "674db59b3c8013382e5c07243ad9439b64d81d2e8b3c4f08d752b55aa5de697e" dependencies = [ "frame-benchmarking", "frame-support", @@ -13133,8 +13104,8 @@ dependencies = [ "scale-info", "snowbridge-core", "sp-core 34.0.0", - "sp-io 37.0.0", - "sp-runtime 38.0.0", + "sp-io 38.0.0", + "sp-runtime 39.0.2", "sp-std", "staging-xcm", "staging-xcm-executor", @@ -13142,9 +13113,9 @@ dependencies = [ [[package]] name = "snowbridge-router-primitives" -version = "0.14.0" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e8e6707ced1308d763117bfe68f85e3f22fcdca7987b32e438c0485570f6ac7" +checksum = "025f1e6805753821b1db539369f1fb183fd59fd5df7023f7633a4c0cfd3e62f9" dependencies = [ "frame-support", "hex-literal", @@ -13153,8 +13124,8 @@ dependencies = [ "scale-info", "snowbridge-core", "sp-core 34.0.0", - "sp-io 37.0.0", - "sp-runtime 38.0.0", + "sp-io 38.0.0", + "sp-runtime 39.0.2", "sp-std", "staging-xcm", "staging-xcm-executor", @@ -13162,9 +13133,9 @@ dependencies = [ [[package]] name = "snowbridge-runtime-common" -version = "0.8.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c033e7905056434638a068dca713ec9d15708af6c7590396fc95a216ec64b40b" +checksum = "6093f0e73d6cfdd2eea8712155d1d75b5063fc9b1d854d2665b097b4bb29570d" dependencies = [ "frame-support", "log", @@ -13179,9 +13150,9 @@ dependencies = [ [[package]] name = "snowbridge-runtime-test-common" -version = "0.8.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bbae06a0abb1ba5ffad59b929263c68cc47b8a286794a7389e781eba20f3481" +checksum = "893480d6cde2489051c65efb5d27fa87efe047b3b61216d8e27bb2f0509b7faf" dependencies = [ "cumulus-pallet-parachain-system", "frame-support", @@ -13201,9 +13172,9 @@ dependencies = [ "snowbridge-pallet-outbound-queue", "snowbridge-pallet-system", "sp-core 34.0.0", - "sp-io 37.0.0", + "sp-io 38.0.0", "sp-keyring", - "sp-runtime 38.0.0", + "sp-runtime 39.0.2", "staging-parachain-info", "staging-xcm", "staging-xcm-executor", @@ -13211,9 +13182,9 @@ dependencies = [ [[package]] name = "snowbridge-system-runtime-api" -version = "0.8.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dca4900b139bfb1c052358b6084aa61658b261900d117aa8996e833a1b344399" +checksum = "68b8b83b3db781c49844312a23965073e4d93341739a35eafe526c53b578d3b7" dependencies = [ "parity-scale-codec", "snowbridge-core", @@ -13274,10 +13245,11 @@ dependencies = [ [[package]] name = "sp-api" -version = "33.0.0" +version = "34.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7e43fbf034e9dbaa8ffc6a238a22808777eb38c580f66fc6736d8511631789e" +checksum = "bbce492e0482134128b7729ea36f5ef1a9f9b4de2d48ff8dde7b5e464e28ce75" dependencies = [ + "docify", "hash-db", "log", "parity-scale-codec", @@ -13286,11 +13258,10 @@ dependencies = [ "sp-core 34.0.0", "sp-externalities 0.29.0", "sp-metadata-ir", - "sp-runtime 38.0.0", + "sp-runtime 39.0.2", "sp-runtime-interface 28.0.0", - "sp-state-machine 0.42.0", - "sp-std", - "sp-trie 36.0.0", + "sp-state-machine 0.43.0", + "sp-trie 37.0.0", "sp-version", "thiserror", ] @@ -13326,16 +13297,15 @@ dependencies = [ [[package]] name = "sp-application-crypto" -version = "37.0.0" +version = "38.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d96d1fc0f1c741bbcbd0dd5470eff7b66f011708cc1942b088ebf0d4efb3d93" +checksum = "0d8133012faa5f75b2f0b1619d9f720c1424ac477152c143e5f7dbde2fe1a958" dependencies = [ "parity-scale-codec", "scale-info", "serde", "sp-core 34.0.0", - "sp-io 37.0.0", - "sp-std", + "sp-io 38.0.0", ] [[package]] @@ -13371,125 +13341,127 @@ dependencies = [ [[package]] name = "sp-authority-discovery" -version = "33.0.0" +version = "34.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a4a1e45abc3277f18484ee0b0f9808e4206eb696ad38500c892c72f33480d69" +checksum = "519c33af0e25ba2dd2eb3790dc404d634b6e4ce0801bcc8fa3574e07c365e734" dependencies = [ "parity-scale-codec", "scale-info", "sp-api", - "sp-application-crypto 37.0.0", - "sp-runtime 38.0.0", + "sp-application-crypto 38.0.0", + "sp-runtime 39.0.2", ] [[package]] name = "sp-block-builder" -version = "33.0.0" +version = "34.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cf199dc4f9f77abd3fd91c409759118159ce6ffcd8bc90b229b684ccc8c981f" +checksum = "74738809461e3d4bd707b5b94e0e0c064a623a74a6a8fe5c98514417a02858dd" dependencies = [ "sp-api", "sp-inherents", - "sp-runtime 38.0.0", + "sp-runtime 39.0.2", ] [[package]] name = "sp-blockchain" -version = "35.1.0" +version = "37.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f27eb18b6ddf7d663f4886f7edba3eb73bd102d68cf10802c1f862e3b3db32ab" +checksum = "a309eecd6b5689f57e67181deaa628d9c8951db1ba0d26f07c69e14dffdc4765" dependencies = [ "futures", - "log", "parity-scale-codec", "parking_lot 0.12.3", "schnellru", "sp-api", "sp-consensus", + "sp-core 34.0.0", "sp-database", - "sp-runtime 38.0.0", - "sp-state-machine 0.42.0", + "sp-runtime 39.0.2", + "sp-state-machine 0.43.0", "thiserror", + "tracing", ] [[package]] name = "sp-consensus" -version = "0.39.1" +version = "0.40.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab094e8a7e9e5c7f05f8d90592aa1d1cf9b3f547d0dd401daff7ed98af942e12" +checksum = "ce75efd1e164be667a53c20182c45b4c2abe325abcbd21fc292b82be5b9240f7" dependencies = [ "async-trait", "futures", "log", "sp-core 34.0.0", "sp-inherents", - "sp-runtime 38.0.0", - "sp-state-machine 0.42.0", + "sp-runtime 39.0.2", + "sp-state-machine 0.43.0", "thiserror", ] [[package]] name = "sp-consensus-aura" -version = "0.39.0" +version = "0.40.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05ebb90bf00f331b898eb729a1f707251846c1d5582d7467f083884799a69b89" +checksum = "7a8faaa05bbcb9c41f0cc535c4c1315abf6df472b53eae018678d1b4d811ac47" dependencies = [ "async-trait", "parity-scale-codec", "scale-info", "sp-api", - "sp-application-crypto 37.0.0", + "sp-application-crypto 38.0.0", "sp-consensus-slots", "sp-inherents", - "sp-runtime 38.0.0", + "sp-runtime 39.0.2", "sp-timestamp", ] [[package]] name = "sp-consensus-babe" -version = "0.39.0" +version = "0.40.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3aa2de4c7100a3279658d8dd4affd8f92487528deae5cb4b40322717b9175ed5" +checksum = "36ee95e17ee8dcd14db7d584b899a426565ca9abe5a266ab82277977fc547f86" dependencies = [ "async-trait", "parity-scale-codec", "scale-info", "serde", "sp-api", - "sp-application-crypto 37.0.0", + "sp-application-crypto 38.0.0", "sp-consensus-slots", "sp-core 34.0.0", "sp-inherents", - "sp-runtime 38.0.0", + "sp-runtime 39.0.2", "sp-timestamp", ] [[package]] name = "sp-consensus-beefy" -version = "20.0.0" +version = "22.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b277bc109da8e1c3768d3a046e1cd1ab687aabac821c976c5f510deb6f0bc8d3" +checksum = "e1d97e8cd75d85d15cda6f1923cf3834e848f80d5a6de1cf4edbbc5f0ad607eb" dependencies = [ "lazy_static", "parity-scale-codec", "scale-info", "serde", "sp-api", - "sp-application-crypto 37.0.0", + "sp-application-crypto 38.0.0", "sp-core 34.0.0", "sp-crypto-hashing", - "sp-io 37.0.0", + "sp-io 38.0.0", "sp-keystore 0.40.0", "sp-mmr-primitives", - "sp-runtime 38.0.0", + "sp-runtime 39.0.2", + "sp-weights 31.0.0", "strum 0.26.3", ] [[package]] name = "sp-consensus-grandpa" -version = "20.0.0" +version = "21.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21dd06bf366c60f69411668b26d6ab3c55120aa6d423e6af0373ec23d8957300" +checksum = "587b791efe6c5f18e09dbbaf1ece0ee7b5fe51602c233e7151a3676b0de0260b" dependencies = [ "finality-grandpa", "log", @@ -13497,17 +13469,17 @@ dependencies = [ "scale-info", "serde", "sp-api", - "sp-application-crypto 37.0.0", + "sp-application-crypto 38.0.0", "sp-core 34.0.0", "sp-keystore 0.40.0", - "sp-runtime 38.0.0", + "sp-runtime 39.0.2", ] [[package]] name = "sp-consensus-slots" -version = "0.39.0" +version = "0.40.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8ca60d713f8ddb03bbebcc755d5e6463fdc0b6259fabfc4221b20a5f1e428fd" +checksum = "bbafb7ed44f51c22fa277fb39b33dc601fa426133a8e2b53f3f46b10f07fba43" dependencies = [ "parity-scale-codec", "scale-info", @@ -13525,7 +13497,7 @@ dependencies = [ "bitflags 1.3.2", "blake2 0.10.6", "bounded-collections", - "bs58 0.5.0", + "bs58 0.5.1", "dyn-clonable", "ed25519-zebra 3.1.0", "futures", @@ -13572,7 +13544,7 @@ dependencies = [ "bitflags 1.3.2", "blake2 0.10.6", "bounded-collections", - "bs58 0.5.0", + "bs58 0.5.1", "dyn-clonable", "ed25519-zebra 4.0.3", "futures", @@ -13680,28 +13652,28 @@ dependencies = [ [[package]] name = "sp-genesis-builder" -version = "0.14.0" +version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcd065854d96fd81521c103d0aaa287d4f08b9b15c9fae2a3bfb208b0812bf44" +checksum = "32a646ed222fd86d5680faa4a8967980eb32f644cae6c8523e1c689a6deda3e8" dependencies = [ "parity-scale-codec", "scale-info", "serde_json", "sp-api", - "sp-runtime 38.0.0", + "sp-runtime 39.0.2", ] [[package]] name = "sp-inherents" -version = "33.0.0" +version = "34.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53407ba38ec22ca4a16381722c4bd0b559a0428bc1713079b0d5163ada63186a" +checksum = "afffbddc380d99a90c459ba1554bbbc01d62e892de9f1485af6940b89c4c0d57" dependencies = [ "async-trait", "impl-trait-for-tuples", "parity-scale-codec", "scale-info", - "sp-runtime 38.0.0", + "sp-runtime 39.0.2", "thiserror", ] @@ -13734,11 +13706,12 @@ dependencies = [ [[package]] name = "sp-io" -version = "37.0.0" +version = "38.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5036cad2e48d41f5caf6785226c8be1a7db15bec14a9fd7aa6cca84f34cf689f" +checksum = "59ef7eb561bb4839cc8424ce58c5ea236cbcca83f26fcc0426d8decfe8aa97d4" dependencies = [ "bytes", + "docify", "ed25519-dalek", "libsecp256k1", "log", @@ -13751,22 +13724,21 @@ dependencies = [ "sp-externalities 0.29.0", "sp-keystore 0.40.0", "sp-runtime-interface 28.0.0", - "sp-state-machine 0.42.0", - "sp-std", - "sp-tracing 17.0.0", - "sp-trie 36.0.0", + "sp-state-machine 0.43.0", + "sp-tracing 17.0.1", + "sp-trie 37.0.0", "tracing", "tracing-core", ] [[package]] name = "sp-keyring" -version = "38.0.0" +version = "39.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b03536e1ff3ec2bd8181eeaa26c0d682ebdcbd01548a055cf591077188b8c3f0" +checksum = "7c0e20624277f578b27f44ecfbe2ebc2e908488511ee2c900c5281599f700ab3" dependencies = [ "sp-core 34.0.0", - "sp-runtime 38.0.0", + "sp-runtime 39.0.2", "strum 0.26.3", ] @@ -13817,21 +13789,21 @@ dependencies = [ [[package]] name = "sp-mixnet" -version = "0.11.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f65a570519da820ce3dc35053497a65f9fbd3f5a7dc81fa03078ca263e9311e" +checksum = "3b0b017dd54823b6e62f9f7171a1df350972e5c6d0bf17e0c2f78680b5c31942" dependencies = [ "parity-scale-codec", "scale-info", "sp-api", - "sp-application-crypto 37.0.0", + "sp-application-crypto 38.0.0", ] [[package]] name = "sp-mmr-primitives" -version = "33.0.0" +version = "34.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47412a2d2e988430d5f59d7fec1473f229e1ef5ce24c1ea4f601b4b3679cac52" +checksum = "9a12dd76e368f1e48144a84b4735218b712f84b3f976970e2f25a29b30440e10" dependencies = [ "log", "parity-scale-codec", @@ -13841,33 +13813,33 @@ dependencies = [ "sp-api", "sp-core 34.0.0", "sp-debug-derive", - "sp-runtime 38.0.0", + "sp-runtime 39.0.2", "thiserror", ] [[package]] name = "sp-npos-elections" -version = "33.0.0" +version = "34.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b0c51a7b60cd663f2661e6949069eb316b092f22c239691d5272a4d0cfca0fb" +checksum = "af922f112c7c1ed199eabe14f12a82ceb75e1adf0804870eccfbcf3399492847" dependencies = [ "parity-scale-codec", "scale-info", "serde", "sp-arithmetic 26.0.0", "sp-core 34.0.0", - "sp-runtime 38.0.0", + "sp-runtime 39.0.2", ] [[package]] name = "sp-offchain" -version = "33.0.0" +version = "34.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbe721c367760bddf10fcfa24fb48edd64c442f71db971f043c8ac73f51aa6e9" +checksum = "2d9de237d72ecffd07f90826eef18360208b16d8de939d54e61591fac0fcbf99" dependencies = [ "sp-api", "sp-core 34.0.0", - "sp-runtime 38.0.0", + "sp-runtime 39.0.2", ] [[package]] @@ -13887,7 +13859,7 @@ version = "32.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "45458f0955870a92b3969098d4f1f4e9b55b4282d9f1dc112a51bb5bb6584900" dependencies = [ - "rustc-hash", + "rustc-hash 1.1.0", "serde", "sp-core 34.0.0", ] @@ -13919,9 +13891,9 @@ dependencies = [ [[package]] name = "sp-runtime" -version = "38.0.0" +version = "39.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89ef409c414546b655ec1e94aaea178e4a97e21284a91b24c762aebf836d3b49" +checksum = "658f23be7c79a85581029676a73265c107c5469157e3444c8c640fdbaa8bfed0" dependencies = [ "docify", "either", @@ -13935,12 +13907,13 @@ dependencies = [ "scale-info", "serde", "simple-mermaid", - "sp-application-crypto 37.0.0", + "sp-application-crypto 38.0.0", "sp-arithmetic 26.0.0", "sp-core 34.0.0", - "sp-io 37.0.0", + "sp-io 38.0.0", "sp-std", "sp-weights 31.0.0", + "tracing", ] [[package]] @@ -13978,8 +13951,8 @@ dependencies = [ "sp-runtime-interface-proc-macro", "sp-std", "sp-storage 21.0.0", - "sp-tracing 17.0.0", - "sp-wasm-interface 21.0.0", + "sp-tracing 17.0.1", + "sp-wasm-interface 21.0.1", "static_assertions", ] @@ -13999,31 +13972,45 @@ dependencies = [ [[package]] name = "sp-session" -version = "34.0.0" +version = "36.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4daf2e40ffc7e7e8de08efb860eb9534faf614a49c53dc282f430faedb4aed13" +checksum = "00a3a307fedc423fb8cd2a7726a3bbb99014f1b4b52f26153993e2aae3338fe6" dependencies = [ "parity-scale-codec", "scale-info", "sp-api", "sp-core 34.0.0", "sp-keystore 0.40.0", - "sp-runtime 38.0.0", - "sp-staking", + "sp-runtime 39.0.2", + "sp-staking 36.0.0", ] [[package]] name = "sp-staking" -version = "33.0.0" +version = "34.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "143a764cacbab58347d8b2fd4c8909031fb0888d7b02a0ec9fa44f81f780d732" +dependencies = [ + "impl-trait-for-tuples", + "parity-scale-codec", + "scale-info", + "serde", + "sp-core 34.0.0", + "sp-runtime 39.0.2", +] + +[[package]] +name = "sp-staking" +version = "36.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a0b7abfe66c07a3b6eb99e1286dfa9b6f3b057b0e986e7da2ccbf707f6c781a" +checksum = "2a73eedb4b85f4cd420d31764827546aa22f82ce1646d0fd258993d051de7a90" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", "scale-info", "serde", "sp-core 34.0.0", - "sp-runtime 38.0.0", + "sp-runtime 39.0.2", ] [[package]] @@ -14050,9 +14037,9 @@ dependencies = [ [[package]] name = "sp-state-machine" -version = "0.42.0" +version = "0.43.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "211e528aa6e902261a343f7b40840aa3d66fe4ad3aadbd04a035f10baf96dbc5" +checksum = "930104d6ae882626e8880d9b1578da9300655d337a3ffb45e130c608b6c89660" dependencies = [ "hash-db", "log", @@ -14063,7 +14050,7 @@ dependencies = [ "sp-core 34.0.0", "sp-externalities 0.29.0", "sp-panic-handler", - "sp-trie 36.0.0", + "sp-trie 37.0.0", "thiserror", "tracing", "trie-db 0.29.1", @@ -14071,12 +14058,12 @@ dependencies = [ [[package]] name = "sp-statement-store" -version = "17.0.0" +version = "18.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b03aa86b1b46549889d32348bc85a8135c725665115567507231a6d85712aaac" +checksum = "c219bc34ef4d1f9835f3ed881f965643c32034fcc030eb33b759dadbc802c1c2" dependencies = [ "aes-gcm", - "curve25519-dalek 4.1.2", + "curve25519-dalek 4.1.3", "ed25519-dalek", "hkdf", "parity-scale-codec", @@ -14084,11 +14071,11 @@ dependencies = [ "scale-info", "sha2 0.10.8", "sp-api", - "sp-application-crypto 37.0.0", + "sp-application-crypto 38.0.0", "sp-core 34.0.0", "sp-crypto-hashing", "sp-externalities 0.29.0", - "sp-runtime 38.0.0", + "sp-runtime 39.0.2", "sp-runtime-interface 28.0.0", "thiserror", "x25519-dalek", @@ -14129,14 +14116,14 @@ dependencies = [ [[package]] name = "sp-timestamp" -version = "33.0.0" +version = "34.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78becf144a76f6fd108dfe94a90e20a185b38c0b310dc5482328196143c8266b" +checksum = "72a1cb4df653d62ccc0dbce1db45d1c9443ec60247ee9576962d24da4c9c6f07" dependencies = [ "async-trait", "parity-scale-codec", "sp-inherents", - "sp-runtime 38.0.0", + "sp-runtime 39.0.2", "thiserror", ] @@ -14155,24 +14142,24 @@ dependencies = [ [[package]] name = "sp-tracing" -version = "17.0.0" +version = "17.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90b3decf116db9f1dfaf1f1597096b043d0e12c952d3bcdc018c6d6b77deec7e" +checksum = "cf641a1d17268c8fcfdb8e0fa51a79c2d4222f4cfda5f3944dbdbc384dced8d5" dependencies = [ "parity-scale-codec", "tracing", "tracing-core", - "tracing-subscriber 0.2.25", + "tracing-subscriber 0.3.18", ] [[package]] name = "sp-transaction-pool" -version = "33.0.0" +version = "34.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3c9d1604aadc15b70e95f4388d0b1aa380215520b7ddfd372531a6d8262269c" +checksum = "fc4bf251059485a7dd38fe4afeda8792983511cc47f342ff4695e2dcae6b5247" dependencies = [ "sp-api", - "sp-runtime 38.0.0", + "sp-runtime 39.0.2", ] [[package]] @@ -14202,9 +14189,9 @@ dependencies = [ [[package]] name = "sp-trie" -version = "36.0.0" +version = "37.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "841d717c0f465f5371569e6fdc25b6f32d47c15d6e4c92b3b779e1c9b18b951d" +checksum = "6282aef9f4b6ecd95a67a45bcdb67a71f4a4155c09a53c10add4ffe823db18cd" dependencies = [ "ahash 0.8.8", "hash-db", @@ -14226,9 +14213,9 @@ dependencies = [ [[package]] name = "sp-version" -version = "36.0.0" +version = "37.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bccf96fefae339dee7c4453f91be64eb28cce4c2fe82130445cf096b18b2c081" +checksum = "d521a405707b5be561367cd3d442ff67588993de24062ce3adefcf8437ee9fe1" dependencies = [ "impl-serde", "parity-scale-codec", @@ -14236,7 +14223,7 @@ dependencies = [ "scale-info", "serde", "sp-crypto-hashing-proc-macro", - "sp-runtime 38.0.0", + "sp-runtime 39.0.2", "sp-std", "sp-version-proc-macro", "thiserror", @@ -14270,9 +14257,9 @@ dependencies = [ [[package]] name = "sp-wasm-interface" -version = "21.0.0" +version = "21.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b04b919e150b4736d85089d49327eab65507deb1485eec929af69daa2278eb3" +checksum = "b066baa6d57951600b14ffe1243f54c47f9c23dd89c262e17ca00ae8dca58be9" dependencies = [ "anyhow", "impl-trait-for-tuples", @@ -14418,6 +14405,7 @@ dependencies = [ "pallet-bounties", "pallet-child-bounties", "pallet-conviction-voting", + "pallet-delegated-staking", "pallet-election-provider-multi-phase", "pallet-election-provider-support-benchmarking", "pallet-fast-unstake", @@ -14454,7 +14442,7 @@ dependencies = [ "pallet-xcm", "pallet-xcm-benchmarks", "parity-scale-codec", - "polkadot-primitives", + "polkadot-primitives 16.0.0", "polkadot-runtime-common", "polkadot-runtime-parachains", "relay-common", @@ -14462,7 +14450,7 @@ dependencies = [ "separator", "serde_json", "sp-api", - "sp-application-crypto 37.0.0", + "sp-application-crypto 38.0.0", "sp-arithmetic 26.0.0", "sp-authority-discovery", "sp-block-builder", @@ -14472,18 +14460,18 @@ dependencies = [ "sp-debug-derive", "sp-genesis-builder", "sp-inherents", - "sp-io 37.0.0", + "sp-io 38.0.0", "sp-keyring", "sp-npos-elections", "sp-offchain", - "sp-runtime 38.0.0", + "sp-runtime 39.0.2", "sp-session", - "sp-staking", + "sp-staking 36.0.0", "sp-std", "sp-storage 21.0.0", - "sp-tracing 17.0.0", + "sp-tracing 17.0.1", "sp-transaction-pool", - "sp-trie 36.0.0", + "sp-trie 37.0.0", "sp-version", "ss58-registry", "staging-xcm", @@ -14496,24 +14484,23 @@ dependencies = [ [[package]] name = "staging-parachain-info" -version = "0.15.0" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd00d586b0dac4f42736bdd0ad52213a891b240e011ea82b38938263dd821c25" +checksum = "d28266dfddbfff721d70ad2f873380845b569adfab32f257cf97d9cedd894b68" dependencies = [ "cumulus-primitives-core", "frame-support", "frame-system", "parity-scale-codec", "scale-info", - "sp-runtime 38.0.0", - "sp-std", + "sp-runtime 39.0.2", ] [[package]] name = "staging-xcm" -version = "14.1.0" +version = "14.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2b7b5f531c6bf9629514ef8e5fda0e9e80dd84516957f710940d0e01d3fb36c" +checksum = "96bee7cd999e9cdf10f8db72342070d456e21e82a0f5962ff3b87edbd5f2b20e" dependencies = [ "array-bytes", "bounded-collections", @@ -14524,28 +14511,29 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", + "sp-runtime 39.0.2", "sp-weights 31.0.0", "xcm-procedural", ] [[package]] name = "staging-xcm-builder" -version = "15.0.0" +version = "17.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "847fa2afe1bed2751eaabf7b91fa4043037947f17653d7cc59ea202cc44c6bb8" +checksum = "a3746adbbae27b1e6763f0cca622e15482ebcb94835a9e078c212dd7be896e35" dependencies = [ "frame-support", "frame-system", "impl-trait-for-tuples", "log", + "pallet-asset-conversion", "pallet-transaction-payment", "parity-scale-codec", "polkadot-parachain-primitives", "scale-info", "sp-arithmetic 26.0.0", - "sp-io 37.0.0", - "sp-runtime 38.0.0", - "sp-std", + "sp-io 38.0.0", + "sp-runtime 39.0.2", "sp-weights 31.0.0", "staging-xcm", "staging-xcm-executor", @@ -14553,24 +14541,23 @@ dependencies = [ [[package]] name = "staging-xcm-executor" -version = "15.0.0" +version = "17.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b98d8219449eaf02e71a7edf1a14b14d4c713dd01d9df66fde1ce30dba4d6d" +checksum = "79dd0c5332a5318e58f0300b20768b71cf9427c906f94a743c9dc7c3ee9e7fa9" dependencies = [ "environmental", "frame-benchmarking", "frame-support", "impl-trait-for-tuples", - "log", "parity-scale-codec", "scale-info", "sp-arithmetic 26.0.0", "sp-core 34.0.0", - "sp-io 37.0.0", - "sp-runtime 38.0.0", - "sp-std", + "sp-io 38.0.0", + "sp-runtime 39.0.2", "sp-weights 31.0.0", "staging-xcm", + "tracing", ] [[package]] @@ -14719,16 +14706,16 @@ dependencies = [ [[package]] name = "substrate-rpc-client" -version = "0.41.0" +version = "0.44.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68e021c03690bfce8dc67913e0edcb12bf07aea84bbbc61bcd24e6f790c8161a" +checksum = "5939d2b2a0b556714512dffb08ae3df3fc245039d9b08ee5b0df4e403007ee3a" dependencies = [ "async-trait", - "jsonrpsee 0.23.2", + "jsonrpsee 0.24.7", "log", "sc-rpc-api", "serde", - "sp-runtime 38.0.0", + "sp-runtime 39.0.2", ] [[package]] @@ -14743,9 +14730,9 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" -version = "23.0.0" +version = "24.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dc993ad871b63fbba60362f3ea86583f5e7e1256e8fdcb3b5b249c9ead354bf" +checksum = "cf035ffe7335fb24053edfe4d0a5780250eda772082a1b80ae25835dd4c09265" dependencies = [ "array-bytes", "build-helper", @@ -14753,19 +14740,20 @@ dependencies = [ "console", "filetime", "frame-metadata 16.0.0", + "jobserver", "merkleized-metadata", "parity-scale-codec", "parity-wasm", "polkavm-linker", "sc-executor", "sp-core 34.0.0", - "sp-io 37.0.0", + "sp-io 38.0.0", "sp-maybe-compressed-blob", - "sp-tracing 17.0.0", + "sp-tracing 17.0.1", "sp-version", "strum 0.26.3", "tempfile", - "toml 0.8.10", + "toml 0.8.12", "walkdir", "wasm-opt", ] @@ -15002,11 +14990,11 @@ dependencies = [ "kusama-runtime-constants", "parachains-common", "polkadot-core-primitives", - "polkadot-primitives", + "polkadot-primitives 16.0.0", "polkadot-runtime-constants", "smallvec", "sp-core 34.0.0", - "sp-runtime 38.0.0", + "sp-runtime 39.0.2", "sp-std", "staging-xcm", ] @@ -15304,14 +15292,14 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.10" +version = "0.8.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a9aad4a3066010876e8dcf5a8a06e70a558751117a145c6ce2b82c2e2054290" +checksum = "e9dd1545e8208b4a5af1aa9bbd0b4cf7e9ea08fabc5d0a5c67fcaafa17433aa3" dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.22.5", + "toml_edit 0.22.12", ] [[package]] @@ -15349,9 +15337,9 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.22.5" +version = "0.22.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99e68c159e8f5ba8a28c4eb7b0c0c190d77bb479047ca713270048145a9ad28a" +checksum = "d3328d4f68a705b2a4498da1d580585d39a6510f98318a2cec3018a7ec61ddef" dependencies = [ "indexmap 2.2.6", "serde", @@ -15484,7 +15472,7 @@ dependencies = [ "ansi_term", "chrono", "lazy_static", - "matchers", + "matchers 0.0.1", "regex", "serde", "serde_json", @@ -15503,10 +15491,15 @@ version = "0.3.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" dependencies = [ + "matchers 0.1.0", "nu-ansi-term", + "once_cell", + "regex", "sharded-slab", "smallvec", "thread_local", + "time", + "tracing", "tracing-core", "tracing-log 0.2.0", ] @@ -15872,9 +15865,9 @@ dependencies = [ [[package]] name = "walkdir" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" dependencies = [ "same-file", "winapi-util", @@ -16639,7 +16632,7 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fb66477291e7e8d2b0ff1bcb900bf29489a9692816d79874bea351e7a8b6de96" dependencies = [ - "curve25519-dalek 4.1.2", + "curve25519-dalek 4.1.3", "rand_core 0.6.4", "serde", "zeroize", @@ -16692,10 +16685,11 @@ dependencies = [ [[package]] name = "xcm-emulator" -version = "0.13.0" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be630e9b41c5d19d227162afe4cf642be24058b179fb1edbfe132f6328c7bde8" +checksum = "0e9ca0239660dd0303f2aa492e297d0be5051fc39e792c840580e05c522fecaa" dependencies = [ + "array-bytes", "cumulus-pallet-parachain-system", "cumulus-pallet-xcmp-queue", "cumulus-primitives-core", @@ -16712,15 +16706,15 @@ dependencies = [ "parity-scale-codec", "paste", "polkadot-parachain-primitives", - "polkadot-primitives", + "polkadot-primitives 16.0.0", "polkadot-runtime-parachains", "sp-arithmetic 26.0.0", "sp-core 34.0.0", "sp-crypto-hashing", - "sp-io 37.0.0", - "sp-runtime 38.0.0", + "sp-io 38.0.0", + "sp-runtime 39.0.2", "sp-std", - "sp-tracing 17.0.0", + "sp-tracing 17.0.1", "staging-xcm", "staging-xcm-executor", ] @@ -16739,15 +16733,14 @@ dependencies = [ [[package]] name = "xcm-runtime-apis" -version = "0.2.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30fffcd9128a46abd836c37dd001c2cbe122aeb8904cd7b9bac8358564fb7b56" +checksum = "69d4473a5d157e4d437d9ebcb1b99f9693a64983877ee57d97005f0167869935" dependencies = [ "frame-support", "parity-scale-codec", "scale-info", "sp-api", - "sp-std", "sp-weights 31.0.0", "staging-xcm", "staging-xcm-executor", diff --git a/Cargo.toml b/Cargo.toml index e96581a7b1..3c91060a80 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,34 +12,35 @@ asset-hub-kusama-emulated-chain = { path = "integration-tests/emulated/chains/pa asset-hub-kusama-runtime = { path = "system-parachains/asset-hubs/asset-hub-kusama" } asset-hub-polkadot-emulated-chain = { path = "integration-tests/emulated/chains/parachains/assets/asset-hub-polkadot" } asset-hub-polkadot-runtime = { path = "system-parachains/asset-hubs/asset-hub-polkadot" } -asset-test-utils = { version = "15.0.0" } -assets-common = { version = "0.15.0", default-features = false } -authority-discovery-primitives = { version = "33.0.0", default-features = false, package = "sp-authority-discovery" } -babe-primitives = { version = "0.39.0", default-features = false, package = "sp-consensus-babe" } -beefy-primitives = { version = "20.0.0", default-features = false, package = "sp-consensus-beefy" } -binary-merkle-tree = { version = "15.0.0", default-features = false } +asset-test-utils = { version = "18.0.0" } +assets-common = { version = "0.18.0", default-features = false } +authority-discovery-primitives = { version = "34.0.0", default-features = false, package = "sp-authority-discovery" } +babe-primitives = { version = "0.40.0", default-features = false, package = "sp-consensus-babe" } +beefy-primitives = { version = "22.1.0", default-features = false, package = "sp-consensus-beefy" } +binary-merkle-tree = { version = "15.0.1", default-features = false } bp-asset-hub-kusama = { path = "system-parachains/asset-hubs/asset-hub-kusama/primitives", default-features = false } bp-asset-hub-polkadot = { path = "system-parachains/asset-hubs/asset-hub-polkadot/primitives", default-features = false } -bp-bridge-hub-cumulus = { version = "0.15.0", default-features = false } +bp-bridge-hub-cumulus = { version = "0.18.0", default-features = false } bp-bridge-hub-kusama = { path = "system-parachains/bridge-hubs/bridge-hub-kusama/primitives", default-features = false } bp-bridge-hub-polkadot = { path = "system-parachains/bridge-hubs/bridge-hub-polkadot/primitives", default-features = false } -bp-header-chain = { version = "0.15.0", default-features = false } -bp-kusama = { version = "0.13.0", default-features = false } -bp-messages = { version = "0.15.0", default-features = false } -bp-parachains = { version = "0.15.0", default-features = false } -bp-polkadot = { version = "0.13.0", default-features = false } -bp-polkadot-bulletin = { version = "0.12.0", default-features = false } -bp-polkadot-core = { version = "0.15.0", default-features = false } -bp-relayers = { version = "0.15.0", default-features = false } -bp-runtime = { version = "0.15.0", default-features = false } -bp-xcm-bridge-hub-router = { version = "0.13.0", default-features = false } -bridge-hub-common = { version = "0.8.0", default-features = false } +bp-header-chain = { version = "0.18.1", default-features = false } +bp-kusama = { version = "0.16.0", default-features = false } +bp-messages = { version = "0.18.0", default-features = false } +bp-parachains = { version = "0.18.0", default-features = false } +bp-polkadot = { version = "0.16.0", default-features = false } +bp-polkadot-bulletin = { version = "0.15.0", default-features = false } +bp-polkadot-core = { version = "0.18.0", default-features = false } +bp-relayers = { version = "0.18.0", default-features = false } +bp-runtime = { version = "0.18.0", default-features = false } +bp-xcm-bridge-hub = { version = "0.4.0", default-features = false } +bp-xcm-bridge-hub-router = { version = "0.14.1", default-features = false } +bridge-hub-common = { version = "0.10.0", default-features = false } bridge-hub-kusama-emulated-chain = { path = "integration-tests/emulated/chains/parachains/bridges/bridge-hub-kusama" } bridge-hub-kusama-runtime = { path = "system-parachains/bridge-hubs/bridge-hub-kusama" } bridge-hub-polkadot-emulated-chain = { path = "integration-tests/emulated/chains/parachains/bridges/bridge-hub-polkadot" } bridge-hub-polkadot-runtime = { path = "system-parachains/bridge-hubs/bridge-hub-polkadot" } -bridge-hub-test-utils = { version = "0.15.0" } -bridge-runtime-common = { version = "0.15.0", default-features = false } +bridge-hub-test-utils = { version = "0.18.0" } +bridge-runtime-common = { version = "0.18.0", default-features = false } clap = { version = "4.5.0" } codec = { package = "parity-scale-codec", version = "3.6.9", default-features = false } collectives-polkadot-emulated-chain = { path = "integration-tests/emulated/chains/parachains/collectives/collectives-polkadot" } @@ -49,30 +50,30 @@ coretime-kusama-emulated-chain = { path = "integration-tests/emulated/chains/par coretime-kusama-runtime = { path = "system-parachains/coretime/coretime-kusama" } coretime-polkadot-emulated-chain = { path = "integration-tests/emulated/chains/parachains/coretime/coretime-polkadot" } coretime-polkadot-runtime = { path = "system-parachains/coretime/coretime-polkadot" } -cumulus-pallet-aura-ext = { version = "0.15.0", default-features = false } -cumulus-pallet-parachain-system = { version = "0.15.0", default-features = false } -cumulus-pallet-session-benchmarking = { version = "17.0.0", default-features = false } -cumulus-pallet-xcm = { version = "0.15.0", default-features = false } -cumulus-pallet-xcmp-queue = { version = "0.15.0", default-features = false } -cumulus-primitives-aura = { version = "0.14.0", default-features = false } -cumulus-primitives-core = { version = "0.14.0", default-features = false } -cumulus-primitives-utility = { version = "0.15.0", default-features = false } -emulated-integration-tests-common = { version = "11.0.0" } -encointer-balances-tx-payment = { version = "~13.1.0", default-features = false } -encointer-balances-tx-payment-rpc-runtime-api = { version = "~13.1.0", default-features = false } +cumulus-pallet-aura-ext = { version = "0.17.0", default-features = false } +cumulus-pallet-parachain-system = { version = "0.17.1", default-features = false } +cumulus-pallet-session-benchmarking = { version = "19.0.0", default-features = false } +cumulus-pallet-xcm = { version = "0.17.0", default-features = false } +cumulus-pallet-xcmp-queue = { version = "0.17.0", default-features = false } +cumulus-primitives-aura = { version = "0.15.0", default-features = false } +cumulus-primitives-core = { version = "0.16.0", default-features = false } +cumulus-primitives-utility = { version = "0.17.0", default-features = false } +emulated-integration-tests-common = { version = "14.1.0" } +encointer-balances-tx-payment = { version = "~14.1.0", default-features = false } +encointer-balances-tx-payment-rpc-runtime-api = { version = "~14.1.0", default-features = false } encointer-kusama-runtime = { path = "system-parachains/encointer" } -encointer-primitives = { version = "~13.3.0", default-features = false } +encointer-primitives = { version = "~14.3.0", default-features = false } enumflags2 = { version = "0.7.7" } -frame-benchmarking = { version = "36.0.0", default-features = false } -frame-election-provider-support = { version = "36.0.0", default-features = false } -frame-executive = { version = "36.0.0", default-features = false } -frame-support = { version = "36.0.0", default-features = false } -frame-system = { version = "36.0.0", default-features = false } -frame-system-benchmarking = { version = "36.0.0", default-features = false } -frame-system-rpc-runtime-api = { version = "33.0.0", default-features = false } -frame-try-runtime = { version = "0.42.0", default-features = false } +frame-benchmarking = { version = "38.0.0", default-features = false } +frame-election-provider-support = { version = "38.0.0", default-features = false } +frame-executive = { version = "38.0.0", default-features = false } +frame-support = { version = "38.0.0", default-features = false } +frame-system = { version = "38.0.0", default-features = false } +frame-system-benchmarking = { version = "38.0.0", default-features = false } +frame-system-rpc-runtime-api = { version = "34.0.0", default-features = false } +frame-try-runtime = { version = "0.44.0", default-features = false } glutton-kusama-runtime = { path = "system-parachains/gluttons/glutton-kusama" } -grandpa = { version = "0.27.0", package = "sc-consensus-grandpa" } +grandpa = { version = "0.30.0", package = "sc-consensus-grandpa" } hex-literal = { version = "0.4.1" } integration-tests-helpers = { path = "integration-tests/emulated/helpers" } kusama-emulated-chain = { path = "integration-tests/emulated/chains/relays/kusama" } @@ -81,167 +82,169 @@ kusama-runtime = { path = "relay/kusama", package = "staging-kusama-runtime" } kusama-runtime-constants = { path = "relay/kusama/constants", default-features = false } kusama-system-emulated-network = { path = "integration-tests/emulated/networks/kusama-system" } log = { version = "0.4.21", default-features = false } -pallet-alliance = { version = "35.0.0", default-features = false } -pallet-asset-conversion = { version = "18.0.0", default-features = false } -pallet-asset-conversion-tx-payment = { version = "18.0.0", default-features = false } -pallet-asset-rate = { version = "15.0.0", default-features = false } -pallet-asset-tx-payment = { version = "36.0.0", default-features = false } -pallet-assets = { version = "37.0.0", default-features = false } -pallet-aura = { version = "35.0.0", default-features = false } -pallet-authority-discovery = { version = "36.0.0", default-features = false } -pallet-authorship = { version = "36.0.0", default-features = false } -pallet-babe = { version = "36.0.0", default-features = false } -pallet-bags-list = { version = "35.0.0", default-features = false } -pallet-balances = { version = "37.0.0", default-features = false } -pallet-beefy = { version = "36.0.0", default-features = false } -pallet-beefy-mmr = { version = "36.0.0", default-features = false } -pallet-bounties = { version = "35.0.0", default-features = false } -pallet-bridge-grandpa = { version = "0.15.0", default-features = false } -pallet-bridge-messages = { version = "0.15.0", default-features = false } -pallet-bridge-parachains = { version = "0.15.0", default-features = false } -pallet-bridge-relayers = { version = "0.15.0", default-features = false } -pallet-broker = { version = "0.15.0", default-features = false } -pallet-child-bounties = { version = "35.0.0", default-features = false } -pallet-collator-selection = { version = "17.0.0", default-features = false } -pallet-collective = { version = "36.0.0", default-features = false } -pallet-conviction-voting = { version = "36.0.0", default-features = false } -pallet-core-fellowship = { version = "20.0.0", default-features = false } -pallet-election-provider-multi-phase = { version = "35.0.0", default-features = false } -pallet-election-provider-support-benchmarking = { version = "35.0.0", default-features = false } -pallet-encointer-balances = { version = "~13.1.0", default-features = false } -pallet-encointer-bazaar = { version = "~13.1.0", default-features = false } -pallet-encointer-bazaar-rpc-runtime-api = { version = "~13.1.0", default-features = false } -pallet-encointer-ceremonies = { version = "~13.1.0", default-features = false } -pallet-encointer-ceremonies-rpc-runtime-api = { version = "~13.1.0", default-features = false } -pallet-encointer-communities = { version = "~13.1.0", default-features = false } -pallet-encointer-communities-rpc-runtime-api = { version = "~13.1.0", default-features = false } -pallet-encointer-democracy = { version = "~13.3.2", default-features = false } -pallet-encointer-faucet = { version = "~13.2.0", default-features = false } -pallet-encointer-reputation-commitments = { version = "~13.1.0", default-features = false } -pallet-encointer-scheduler = { version = "~13.1.0", default-features = false } -pallet-encointer-treasuries = { version = "~13.3.0", default-features = false } -pallet-encointer-treasuries-rpc-runtime-api = { version = "~13.3.0", default-features = false } -pallet-fast-unstake = { version = "35.0.0", default-features = false } -pallet-glutton = { version = "22.0.0", default-features = false } -pallet-grandpa = { version = "36.0.0", default-features = false } -pallet-identity = { version = "36.0.0", default-features = false } -pallet-indices = { version = "36.0.0", default-features = false } -pallet-insecure-randomness-collective-flip = { version = "24.0.0", default-features = false } -pallet-membership = { version = "36.0.0", default-features = false } -pallet-message-queue = { version = "39.0.0", default-features = false } -pallet-mmr = { version = "35.0.0", default-features = false } -pallet-multisig = { version = "36.0.0", default-features = false } -pallet-nft-fractionalization = { version = "18.0.0", default-features = false } -pallet-nfts = { version = "30.0.0", default-features = false } -pallet-nfts-runtime-api = { version = "22.0.0", default-features = false } -pallet-nis = { version = "36.0.0", default-features = false } -pallet-nomination-pools = { version = "33.0.0", default-features = false } -pallet-nomination-pools-benchmarking = { version = "34.0.0", default-features = false } -pallet-nomination-pools-runtime-api = { version = "31.0.0", default-features = false } -pallet-offences = { version = "35.0.0", default-features = false } -pallet-offences-benchmarking = { version = "36.0.0", default-features = false } -pallet-parameters = { version = "0.7.0", default-features = false } -pallet-preimage = { version = "36.0.0", default-features = false } -pallet-proxy = { version = "36.0.0", default-features = false } -pallet-ranked-collective = { version = "36.0.0", default-features = false } -pallet-recovery = { version = "36.0.0", default-features = false } -pallet-referenda = { version = "36.0.0", default-features = false } -pallet-salary = { version = "21.0.0", default-features = false } -pallet-scheduler = { version = "37.0.0", default-features = false } -pallet-session = { version = "36.0.0", default-features = false } -pallet-session-benchmarking = { version = "36.0.0", default-features = false } -pallet-society = { version = "36.0.0", default-features = false } -pallet-staking = { version = "36.0.0", default-features = false } +pallet-alliance = { version = "37.0.0", default-features = false } +pallet-asset-conversion = { version = "20.0.0", default-features = false } +pallet-asset-conversion-tx-payment = { version = "20.0.0", default-features = false } +pallet-asset-rate = { version = "17.0.0", default-features = false } +pallet-asset-tx-payment = { version = "38.0.0", default-features = false } +pallet-assets = { version = "40.0.0", default-features = false } +pallet-aura = { version = "37.0.0", default-features = false } +pallet-authority-discovery = { version = "38.0.0", default-features = false } +pallet-authorship = { version = "38.0.0", default-features = false } +pallet-babe = { version = "38.0.0", default-features = false } +pallet-bags-list = { version = "37.0.0", default-features = false } +pallet-balances = { version = "39.0.0", default-features = false } +pallet-beefy = { version = "39.0.0", default-features = false } +pallet-beefy-mmr = { version = "39.0.0", default-features = false } +pallet-bounties = { version = "37.0.0", default-features = false } +pallet-bridge-grandpa = { version = "0.18.0", default-features = false } +pallet-bridge-messages = { version = "0.18.0", default-features = false } +pallet-bridge-parachains = { version = "0.18.0", default-features = false } +pallet-bridge-relayers = { version = "0.18.0", default-features = false } +pallet-broker = { version = "0.17.0", default-features = false } +pallet-child-bounties = { version = "37.0.0", default-features = false } +pallet-collator-selection = { version = "19.0.0", default-features = false } +pallet-collective = { version = "38.0.0", default-features = false } +pallet-conviction-voting = { version = "38.0.0", default-features = false } +pallet-core-fellowship = { version = "22.0.0", default-features = false } +pallet-election-provider-multi-phase = { version = "37.0.0", default-features = false } +pallet-election-provider-support-benchmarking = { version = "37.0.0", default-features = false } +pallet-encointer-balances = { version = "~14.1.0", default-features = false } +pallet-encointer-bazaar = { version = "~14.1.0", default-features = false } +pallet-encointer-bazaar-rpc-runtime-api = { version = "~14.1.0", default-features = false } +pallet-encointer-ceremonies = { version = "~14.1.0", default-features = false } +pallet-encointer-ceremonies-rpc-runtime-api = { version = "~14.1.0", default-features = false } +pallet-encointer-communities = { version = "~14.1.0", default-features = false } +pallet-encointer-communities-rpc-runtime-api = { version = "~14.1.0", default-features = false } +pallet-encointer-democracy = { version = "~14.3.2", default-features = false } +pallet-encointer-faucet = { version = "~14.2.0", default-features = false } +pallet-encointer-reputation-commitments = { version = "~14.1.0", default-features = false } +pallet-encointer-scheduler = { version = "~14.1.0", default-features = false } +pallet-encointer-treasuries = { version = "~14.3.0", default-features = false } +pallet-encointer-treasuries-rpc-runtime-api = { version = "~14.3.0", default-features = false } +pallet-fast-unstake = { version = "37.0.0", default-features = false } +pallet-glutton = { version = "24.0.0", default-features = false } +pallet-grandpa = { version = "38.0.0", default-features = false } +pallet-identity = { version = "38.0.0", default-features = false } +pallet-indices = { version = "38.0.0", default-features = false } +pallet-insecure-randomness-collective-flip = { version = "26.0.0", default-features = false } +pallet-membership = { version = "38.0.0", default-features = false } +pallet-message-queue = { version = "41.0.1", default-features = false } +pallet-mmr = { version = "38.0.0", default-features = false } +pallet-multisig = { version = "38.0.0", default-features = false } +pallet-nft-fractionalization = { version = "21.0.0", default-features = false } +pallet-nfts = { version = "32.0.0", default-features = false } +pallet-nfts-runtime-api = { version = "24.0.0", default-features = false } +pallet-nis = { version = "38.0.0", default-features = false } +pallet-nomination-pools = { version = "35.0.0", default-features = false } +pallet-nomination-pools-benchmarking = { version = "36.0.0", default-features = false } +pallet-nomination-pools-runtime-api = { version = "33.0.0", default-features = false } +pallet-offences = { version = "37.0.0", default-features = false } +pallet-offences-benchmarking = { version = "38.0.0", default-features = false } +pallet-parameters = { version = "0.9.0", default-features = false } +pallet-preimage = { version = "38.0.0", default-features = false } +pallet-proxy = { version = "38.0.0", default-features = false } +pallet-ranked-collective = { version = "38.0.0", default-features = false } +pallet-recovery = { version = "38.0.0", default-features = false } +pallet-referenda = { version = "38.0.0", default-features = false } +pallet-salary = { version = "23.0.0", default-features = false } +pallet-scheduler = { version = "39.0.0", default-features = false } +pallet-session = { version = "38.0.0", default-features = false } +pallet-session-benchmarking = { version = "38.0.0", default-features = false } +pallet-society = { version = "38.0.0", default-features = false } +pallet-staking = { version = "38.0.0", default-features = false } +pallet-delegated-staking = { version = "5.0.0", default-features = false } pallet-staking-reward-curve = { version = "12.0.0" } pallet-staking-reward-fn = { version = "22.0.0", default-features = false } -pallet-staking-runtime-api = { version = "21.0.0", default-features = false } -pallet-state-trie-migration = { version = "37.0.0", default-features = false } -pallet-sudo = { version = "36.0.0", default-features = false } -pallet-timestamp = { version = "35.0.0", default-features = false } -pallet-transaction-payment = { version = "36.0.0", default-features = false } -pallet-transaction-payment-rpc-runtime-api = { version = "36.0.0", default-features = false } -pallet-treasury = { version = "35.0.0", default-features = false } -pallet-uniques = { version = "36.0.0", default-features = false } -pallet-utility = { version = "36.0.0", default-features = false } -pallet-vesting = { version = "36.0.0", default-features = false } -pallet-whitelist = { version = "35.0.0", default-features = false } -pallet-xcm = { version = "15.0.0", default-features = false } -pallet-xcm-benchmarks = { version = "15.0.0", default-features = false } -pallet-xcm-bridge-hub = { version = "0.10.0", default-features = false } -pallet-xcm-bridge-hub-router = { version = "0.13.0", default-features = false } -parachain-info = { version = "0.15.0", default-features = false, package = "staging-parachain-info" } -parachains-common = { version = "15.0.0", default-features = false } -parachains-runtimes-test-utils = { version = "15.0.0" } +pallet-staking-runtime-api = { version = "24.0.0", default-features = false } +pallet-state-trie-migration = { version = "40.0.0", default-features = false } +pallet-sudo = { version = "38.0.0", default-features = false } +pallet-timestamp = { version = "37.0.0", default-features = false } +pallet-transaction-payment = { version = "38.0.0", default-features = false } +pallet-transaction-payment-rpc-runtime-api = { version = "38.0.0", default-features = false } +pallet-treasury = { version = "37.0.0", default-features = false } +pallet-uniques = { version = "38.0.0", default-features = false } +pallet-utility = { version = "38.0.0", default-features = false } +pallet-vesting = { version = "38.0.0", default-features = false } +pallet-whitelist = { version = "37.0.0", default-features = false } +pallet-xcm = { version = "17.0.0", default-features = false } +pallet-xcm-benchmarks = { version = "17.0.0", default-features = false } +pallet-xcm-bridge-hub = { version = "0.13.0", default-features = false } +pallet-xcm-bridge-hub-router = { version = "0.15.1", default-features = false } +parachain-info = { version = "0.17.0", default-features = false, package = "staging-parachain-info" } +parachains-common = { version = "18.0.0", default-features = false } +parachains-runtimes-test-utils = { version = "17.0.0" } paste = { version = "1.0.14" } penpal-emulated-chain = { path = "integration-tests/emulated/chains/parachains/testing/penpal" } -penpal-runtime = { version = "0.22.0" } +penpal-runtime = { version = "0.25.0" } people-kusama-emulated-chain = { path = "integration-tests/emulated/chains/parachains/people/people-kusama" } people-kusama-runtime = { path = "system-parachains/people/people-kusama" } people-polkadot-emulated-chain = { path = "integration-tests/emulated/chains/parachains/people/people-polkadot" } people-polkadot-runtime = { path = "system-parachains/people/people-polkadot" } -polkadot-core-primitives = { version = "14.0.0", default-features = false } +polkadot-core-primitives = { version = "15.0.0", default-features = false } polkadot-emulated-chain = { path = "integration-tests/emulated/chains/relays/polkadot" } -polkadot-parachain-primitives = { version = "13.0.0", default-features = false } -polkadot-primitives = { version = "14.0.0", default-features = false } +polkadot-parachain-primitives = { version = "14.0.0", default-features = false } +polkadot-primitives = { version = "16.0.0", default-features = false } polkadot-runtime = { path = "relay/polkadot" } -polkadot-runtime-common = { version = "15.0.0", default-features = false } +polkadot-runtime-common = { version = "17.0.0", default-features = false } polkadot-runtime-constants = { path = "relay/polkadot/constants", default-features = false } polkadot-system-emulated-network = { path = "integration-tests/emulated/networks/polkadot-system" } primitive-types = { version = "0.12.2", default-features = false } -frame-metadata-hash-extension = { version = "0.4.0", default-features = false } -remote-externalities = { version = "0.43.0", package = "frame-remote-externalities" } -runtime-parachains = { version = "15.0.2", default-features = false, package = "polkadot-runtime-parachains" } -sc-chain-spec = { version = "35.0.0" } -sc-network = { version = "0.42.0" } +frame-metadata-hash-extension = { version = "0.6.0", default-features = false } +remote-externalities = { version = "0.46.0", package = "frame-remote-externalities" } +runtime-parachains = { version = "17.0.1", default-features = false, package = "polkadot-runtime-parachains" } +sc-chain-spec = { version = "38.0.0" } +sc-network = { version = "0.45.1" } scale-info = { version = "2.10.0", default-features = false } separator = { version = "0.4.1" } serde = { version = "1.0.196" } serde_json = { version = "1.0.113", default-features = false } smallvec = { version = "1.13.1" } -snowbridge-beacon-primitives = { version = "0.8.0", default-features = false } -snowbridge-core = { version = "0.8.0", default-features = false } -snowbridge-outbound-queue-runtime-api = { version = "0.8.0", default-features = false } -snowbridge-pallet-ethereum-client = { version = "0.8.0", default-features = false } -snowbridge-pallet-inbound-queue = { version = "0.8.0", default-features = false } -snowbridge-pallet-inbound-queue-fixtures = { version = "0.16.0" } -snowbridge-pallet-outbound-queue = { version = "0.8.0", default-features = false } -snowbridge-pallet-system = { version = "0.8.0", default-features = false } -snowbridge-router-primitives = { version = "0.14.0", default-features = false } -snowbridge-runtime-common = { version = "0.8.0", default-features = false } -snowbridge-runtime-test-common = { version = "0.8.0" } -snowbridge-system-runtime-api = { version = "0.8.0", default-features = false } -sp-api = { version = "33.0.0", default-features = false } -sp-application-crypto = { version = "37.0.0", default-features = false } +snowbridge-beacon-primitives = { version = "0.10.0", default-features = false } +snowbridge-core = { version = "0.10.0", default-features = false } +snowbridge-outbound-queue-runtime-api = { version = "0.10.0", default-features = false } +snowbridge-pallet-ethereum-client = { version = "0.10.0", default-features = false } +snowbridge-pallet-inbound-queue = { version = "0.10.0", default-features = false } +snowbridge-pallet-inbound-queue-fixtures = { version = "0.18.0" } +snowbridge-pallet-ethereum-client-fixtures = { version = "0.18.0" } +snowbridge-pallet-outbound-queue = { version = "0.10.0", default-features = false } +snowbridge-pallet-system = { version = "0.10.0", default-features = false } +snowbridge-router-primitives = { version = "0.16.0", default-features = false } +snowbridge-runtime-common = { version = "0.10.0", default-features = false } +snowbridge-runtime-test-common = { version = "0.10.0" } +snowbridge-system-runtime-api = { version = "0.10.0", default-features = false } +sp-api = { version = "34.0.0", default-features = false } +sp-application-crypto = { version = "38.0.0", default-features = false } sp-arithmetic = { version = "26.0.0", default-features = false } -sp-block-builder = { version = "33.0.0", default-features = false } -sp-consensus-aura = { version = "0.39.0", default-features = false } +sp-block-builder = { version = "34.0.0", default-features = false } +sp-consensus-aura = { version = "0.40.0", default-features = false } sp-core = { version = "34.0.0", default-features = false } sp-debug-derive = { version = "14.0.0", default-features = false } -sp-genesis-builder = { version = "0.14.0", default-features = false } -sp-inherents = { version = "33.0.0", default-features = false } -sp-io = { version = "37.0.0", default-features = false } -sp-keyring = { version = "38.0.0" } -sp-npos-elections = { version = "33.0.0", default-features = false } -sp-offchain = { version = "33.0.0", default-features = false } -sp-runtime = { version = "38.0.0", default-features = false } -sp-session = { version = "34.0.0", default-features = false } -sp-staking = { version = "33.0.0", default-features = false } +sp-genesis-builder = { version = "0.15.1", default-features = false } +sp-inherents = { version = "34.0.0", default-features = false } +sp-io = { version = "38.0.0", default-features = false } +sp-keyring = { version = "39.0.0" } +sp-npos-elections = { version = "34.0.0", default-features = false } +sp-offchain = { version = "34.0.0", default-features = false } +sp-runtime = { version = "39.0.1", default-features = false } +sp-session = { version = "36.0.0", default-features = false } +sp-staking = { version = "36.0.0", default-features = false } sp-std = { version = "14.0.0", default-features = false } sp-storage = { version = "21.0.0", default-features = false } -sp-tracing = { version = "17.0.0", default-features = false } -sp-transaction-pool = { version = "33.0.0", default-features = false } -sp-trie = { version = "36.0.0" } -sp-version = { version = "36.0.0", default-features = false } +sp-tracing = { version = "17.0.1", default-features = false } +sp-transaction-pool = { version = "34.0.0", default-features = false } +sp-trie = { version = "37.0.0" } +sp-version = { version = "37.0.0", default-features = false } sp-weights = { version = "31.0.0", default-features = false } static_assertions = { version = "1.1.0" } -substrate-wasm-builder = { version = "23.0.0" } +substrate-wasm-builder = { version = "24.0.1" } system-parachains-constants = { path = "system-parachains/constants", default-features = false } tokio = { version = "1.36.0" } -xcm = { version = "14.0.1", default-features = false, package = "staging-xcm" } -xcm-builder = { version = "15.0.0", default-features = false, package = "staging-xcm-builder" } -xcm-emulator = { version = "0.13.0" } -xcm-executor = { version = "15.0.0", default-features = false, package = "staging-xcm-executor" } -xcm-runtime-apis = { version = "0.2.0", default-features = false } +xcm = { version = "14.2.0", default-features = false, package = "staging-xcm" } +xcm-builder = { version = "17.0.1", default-features = false, package = "staging-xcm-builder" } +xcm-emulator = { version = "0.16.0" } +xcm-executor = { version = "17.0.0", default-features = false, package = "staging-xcm-executor" } +xcm-runtime-apis = { version = "0.4.0", default-features = false } anyhow = { version = "1.0.82" } subxt = { version = "0.35.0", default-features = false } tracing-subscriber = { version = "0.3.18" } diff --git a/integration-tests/bridges/run-test.sh b/integration-tests/bridges/run-test.sh index 3b03edd22a..5ba302893a 100755 --- a/integration-tests/bridges/run-test.sh +++ b/integration-tests/bridges/run-test.sh @@ -21,7 +21,7 @@ if [ -z "$FRAMEWORK_REPO_PATH" ]; then pushd $framework_repo_path git sparse-checkout set --no-cone bridges/testing/framework git fetch --tags - git checkout polkadot-v1.11.0 + git checkout polkadot-stable2409 popd else framework_repo_path=$FRAMEWORK_REPO_PATH diff --git a/integration-tests/emulated/chains/parachains/assets/asset-hub-kusama/src/genesis.rs b/integration-tests/emulated/chains/parachains/assets/asset-hub-kusama/src/genesis.rs index ede135e87e..94cf5eeb07 100644 --- a/integration-tests/emulated/chains/parachains/assets/asset-hub-kusama/src/genesis.rs +++ b/integration-tests/emulated/chains/parachains/assets/asset-hub-kusama/src/genesis.rs @@ -72,6 +72,7 @@ pub fn genesis() -> Storage { ) }) .collect(), + ..Default::default() }, polkadot_xcm: asset_hub_kusama_runtime::PolkadotXcmConfig { safe_xcm_version: Some(SAFE_XCM_VERSION), diff --git a/integration-tests/emulated/chains/parachains/assets/asset-hub-polkadot/src/genesis.rs b/integration-tests/emulated/chains/parachains/assets/asset-hub-polkadot/src/genesis.rs index f4efa482d3..8f1ee3a5c1 100644 --- a/integration-tests/emulated/chains/parachains/assets/asset-hub-polkadot/src/genesis.rs +++ b/integration-tests/emulated/chains/parachains/assets/asset-hub-polkadot/src/genesis.rs @@ -98,6 +98,7 @@ pub fn genesis() -> Storage { ) }) .collect(), + ..Default::default() }, polkadot_xcm: asset_hub_polkadot_runtime::PolkadotXcmConfig { safe_xcm_version: Some(SAFE_XCM_VERSION), diff --git a/integration-tests/emulated/chains/parachains/bridges/bridge-hub-kusama/Cargo.toml b/integration-tests/emulated/chains/parachains/bridges/bridge-hub-kusama/Cargo.toml index e79ba4f465..a56869a1d2 100644 --- a/integration-tests/emulated/chains/parachains/bridges/bridge-hub-kusama/Cargo.toml +++ b/integration-tests/emulated/chains/parachains/bridges/bridge-hub-kusama/Cargo.toml @@ -13,6 +13,10 @@ publish = false sp-core = { workspace = true, default-features = true } frame-support = { workspace = true, default-features = true } +# Bridges +bp-messages = { workspace = true } +xcm = { workspace = true } + # Cumulus parachains-common = { workspace = true, default-features = true } bridge-hub-common = { workspace = true, default-features = true } diff --git a/integration-tests/emulated/chains/parachains/bridges/bridge-hub-kusama/src/genesis.rs b/integration-tests/emulated/chains/parachains/bridges/bridge-hub-kusama/src/genesis.rs index 085f8e86a7..11c614d0a1 100644 --- a/integration-tests/emulated/chains/parachains/bridges/bridge-hub-kusama/src/genesis.rs +++ b/integration-tests/emulated/chains/parachains/bridges/bridge-hub-kusama/src/genesis.rs @@ -21,6 +21,7 @@ use emulated_integration_tests_common::{ accounts, build_genesis_storage, collators, get_account_id_from_seed, SAFE_XCM_VERSION, }; use parachains_common::Balance; +use xcm::latest::prelude::*; pub const ASSET_HUB_PARA_ID: u32 = 1000; pub const PARA_ID: u32 = 1002; @@ -52,6 +53,7 @@ pub fn genesis() -> Storage { ) }) .collect(), + ..Default::default() }, polkadot_xcm: bridge_hub_kusama_runtime::PolkadotXcmConfig { safe_xcm_version: Some(SAFE_XCM_VERSION), @@ -65,6 +67,17 @@ pub fn genesis() -> Storage { owner: Some(get_account_id_from_seed::(accounts::BOB)), ..Default::default() }, + xcm_over_bridge_hub_polkadot: bridge_hub_kusama_runtime::XcmOverBridgeHubPolkadotConfig { + opened_bridges: vec![ + // open KAH -> PAH bridge + ( + Location::new(1, [Parachain(1000)]), + Junctions::from([Polkadot.into(), Parachain(1000)]), + Some(bp_messages::LegacyLaneId([0, 0, 0, 1])), + ), + ], + ..Default::default() + }, ..Default::default() }; diff --git a/integration-tests/emulated/chains/parachains/bridges/bridge-hub-polkadot/Cargo.toml b/integration-tests/emulated/chains/parachains/bridges/bridge-hub-polkadot/Cargo.toml index 026efeb91a..28715623c2 100644 --- a/integration-tests/emulated/chains/parachains/bridges/bridge-hub-polkadot/Cargo.toml +++ b/integration-tests/emulated/chains/parachains/bridges/bridge-hub-polkadot/Cargo.toml @@ -13,6 +13,10 @@ publish = false sp-core = { workspace = true, default-features = true } frame-support = { workspace = true, default-features = true } +# Bridges +bp-messages = { workspace = true } +xcm = { workspace = true } + # Cumulus parachains-common = { workspace = true, default-features = true } bridge-hub-common = { workspace = true, default-features = true } diff --git a/integration-tests/emulated/chains/parachains/bridges/bridge-hub-polkadot/src/genesis.rs b/integration-tests/emulated/chains/parachains/bridges/bridge-hub-polkadot/src/genesis.rs index 85b48a2661..19141625fe 100644 --- a/integration-tests/emulated/chains/parachains/bridges/bridge-hub-polkadot/src/genesis.rs +++ b/integration-tests/emulated/chains/parachains/bridges/bridge-hub-polkadot/src/genesis.rs @@ -21,6 +21,7 @@ use emulated_integration_tests_common::{ accounts, build_genesis_storage, collators, get_account_id_from_seed, SAFE_XCM_VERSION, }; use parachains_common::Balance; +use xcm::latest::prelude::*; pub const ASSET_HUB_PARA_ID: u32 = 1000; pub const PARA_ID: u32 = 1002; @@ -52,6 +53,7 @@ pub fn genesis() -> Storage { ) }) .collect(), + ..Default::default() }, polkadot_xcm: bridge_hub_polkadot_runtime::PolkadotXcmConfig { safe_xcm_version: Some(SAFE_XCM_VERSION), @@ -70,6 +72,17 @@ pub fn genesis() -> Storage { asset_hub_para_id: ASSET_HUB_PARA_ID.into(), ..Default::default() }, + xcm_over_bridge_hub_kusama: bridge_hub_polkadot_runtime::XcmOverBridgeHubKusamaConfig { + opened_bridges: vec![ + // open PAH -> KAH bridge + ( + Location::new(1, [Parachain(1000)]), + Junctions::from([Kusama.into(), Parachain(1000)]), + Some(bp_messages::LegacyLaneId([0, 0, 0, 1])), + ), + ], + ..Default::default() + }, ..Default::default() }; diff --git a/integration-tests/emulated/chains/parachains/collectives/collectives-polkadot/src/genesis.rs b/integration-tests/emulated/chains/parachains/collectives/collectives-polkadot/src/genesis.rs index 53621a963d..7becb87c8b 100644 --- a/integration-tests/emulated/chains/parachains/collectives/collectives-polkadot/src/genesis.rs +++ b/integration-tests/emulated/chains/parachains/collectives/collectives-polkadot/src/genesis.rs @@ -51,6 +51,7 @@ pub fn genesis() -> Storage { ) }) .collect(), + ..Default::default() }, polkadot_xcm: collectives_polkadot_runtime::PolkadotXcmConfig { safe_xcm_version: Some(SAFE_XCM_VERSION), diff --git a/integration-tests/emulated/chains/parachains/coretime/coretime-kusama/src/genesis.rs b/integration-tests/emulated/chains/parachains/coretime/coretime-kusama/src/genesis.rs index 9a3eae76ee..b9aff33084 100644 --- a/integration-tests/emulated/chains/parachains/coretime/coretime-kusama/src/genesis.rs +++ b/integration-tests/emulated/chains/parachains/coretime/coretime-kusama/src/genesis.rs @@ -51,6 +51,7 @@ pub fn genesis() -> Storage { ) }) .collect(), + ..Default::default() }, polkadot_xcm: coretime_kusama_runtime::PolkadotXcmConfig { safe_xcm_version: Some(SAFE_XCM_VERSION), diff --git a/integration-tests/emulated/chains/parachains/coretime/coretime-polkadot/src/genesis.rs b/integration-tests/emulated/chains/parachains/coretime/coretime-polkadot/src/genesis.rs index f043761bb8..7622fca4c1 100644 --- a/integration-tests/emulated/chains/parachains/coretime/coretime-polkadot/src/genesis.rs +++ b/integration-tests/emulated/chains/parachains/coretime/coretime-polkadot/src/genesis.rs @@ -52,6 +52,7 @@ pub fn genesis() -> Storage { ) }) .collect(), + ..Default::default() }, polkadot_xcm: coretime_polkadot_runtime::PolkadotXcmConfig { safe_xcm_version: Some(SAFE_XCM_VERSION), diff --git a/integration-tests/emulated/chains/parachains/people/people-kusama/src/genesis.rs b/integration-tests/emulated/chains/parachains/people/people-kusama/src/genesis.rs index 53c336d662..6e034d6ebf 100644 --- a/integration-tests/emulated/chains/parachains/people/people-kusama/src/genesis.rs +++ b/integration-tests/emulated/chains/parachains/people/people-kusama/src/genesis.rs @@ -47,6 +47,7 @@ pub fn genesis() -> Storage { ) }) .collect(), + ..Default::default() }, polkadot_xcm: people_kusama_runtime::PolkadotXcmConfig { safe_xcm_version: Some(SAFE_XCM_VERSION), diff --git a/integration-tests/emulated/chains/parachains/people/people-polkadot/src/genesis.rs b/integration-tests/emulated/chains/parachains/people/people-polkadot/src/genesis.rs index 557cca546c..93c6788ebb 100644 --- a/integration-tests/emulated/chains/parachains/people/people-polkadot/src/genesis.rs +++ b/integration-tests/emulated/chains/parachains/people/people-polkadot/src/genesis.rs @@ -47,6 +47,7 @@ pub fn genesis() -> Storage { ) }) .collect(), + ..Default::default() }, polkadot_xcm: people_polkadot_runtime::PolkadotXcmConfig { safe_xcm_version: Some(SAFE_XCM_VERSION), diff --git a/integration-tests/emulated/chains/parachains/testing/penpal/src/genesis.rs b/integration-tests/emulated/chains/parachains/testing/penpal/src/genesis.rs index a9ddf89522..c5ba18a90a 100644 --- a/integration-tests/emulated/chains/parachains/testing/penpal/src/genesis.rs +++ b/integration-tests/emulated/chains/parachains/testing/penpal/src/genesis.rs @@ -22,12 +22,13 @@ use emulated_integration_tests_common::{ accounts, build_genesis_storage, collators, get_account_id_from_seed, SAFE_XCM_VERSION, }; use parachains_common::{AccountId, Balance}; -use penpal_runtime::xcm_config::{LocalReservableFromAssetHub, RelayLocation}; +use penpal_runtime::xcm_config::{LocalReservableFromAssetHub, RelayLocation, UsdtFromAssetHub}; // Penpal pub const PARA_ID_A: u32 = 2000; pub const PARA_ID_B: u32 = 2001; pub const ED: Balance = penpal_runtime::ExistentialDeposit::get(); +pub const USDT_ED: Balance = 70_000; parameter_types! { pub PenpalSudoAccount: AccountId = get_account_id_from_seed::("Alice"); @@ -60,6 +61,7 @@ pub fn genesis(para_id: u32) -> Storage { ) }) .collect(), + ..Default::default() }, polkadot_xcm: penpal_runtime::PolkadotXcmConfig { safe_xcm_version: Some(SAFE_XCM_VERSION), @@ -81,6 +83,8 @@ pub fn genesis(para_id: u32) -> Storage { (RelayLocation::get(), PenpalAssetOwner::get(), true, ED), // Sufficient AssetHub asset representation (LocalReservableFromAssetHub::get(), PenpalAssetOwner::get(), true, ED), + // USDT from AssetHub + (UsdtFromAssetHub::get(), PenpalAssetOwner::get(), true, USDT_ED), ], ..Default::default() }, diff --git a/integration-tests/emulated/chains/parachains/testing/penpal/src/lib.rs b/integration-tests/emulated/chains/parachains/testing/penpal/src/lib.rs index c0d1f71c7c..bcb7bbb4b9 100644 --- a/integration-tests/emulated/chains/parachains/testing/penpal/src/lib.rs +++ b/integration-tests/emulated/chains/parachains/testing/penpal/src/lib.rs @@ -59,6 +59,7 @@ decl_test_parachains! { PolkadotXcm: penpal_runtime::PolkadotXcm, Assets: penpal_runtime::Assets, ForeignAssets: penpal_runtime::ForeignAssets, + AssetConversion: penpal_runtime::AssetConversion, Balances: penpal_runtime::Balances, } }, @@ -82,6 +83,7 @@ decl_test_parachains! { PolkadotXcm: penpal_runtime::PolkadotXcm, Assets: penpal_runtime::Assets, ForeignAssets: penpal_runtime::ForeignAssets, + AssetConversion: penpal_runtime::AssetConversion, Balances: penpal_runtime::Balances, } }, diff --git a/integration-tests/emulated/chains/relays/kusama/src/genesis.rs b/integration-tests/emulated/chains/relays/kusama/src/genesis.rs index b41e03f728..de368cae62 100644 --- a/integration-tests/emulated/chains/relays/kusama/src/genesis.rs +++ b/integration-tests/emulated/chains/relays/kusama/src/genesis.rs @@ -104,6 +104,7 @@ pub fn genesis() -> Storage { ) }) .collect::>(), + ..Default::default() }, babe: kusama_runtime::BabeConfig { authorities: Default::default(), diff --git a/integration-tests/emulated/chains/relays/polkadot/src/genesis.rs b/integration-tests/emulated/chains/relays/polkadot/src/genesis.rs index ce483f1b67..51bbfcb71c 100644 --- a/integration-tests/emulated/chains/relays/polkadot/src/genesis.rs +++ b/integration-tests/emulated/chains/relays/polkadot/src/genesis.rs @@ -106,6 +106,7 @@ pub fn genesis() -> Storage { ) }) .collect::>(), + ..Default::default() }, staking: polkadot_runtime::StakingConfig { validator_count: validators::initial_authorities().len() as u32, diff --git a/integration-tests/emulated/tests/assets/asset-hub-kusama/src/tests/hybrid_transfers.rs b/integration-tests/emulated/tests/assets/asset-hub-kusama/src/tests/hybrid_transfers.rs index fe0a8b6aa6..125883cbe8 100644 --- a/integration-tests/emulated/tests/assets/asset-hub-kusama/src/tests/hybrid_transfers.rs +++ b/integration-tests/emulated/tests/assets/asset-hub-kusama/src/tests/hybrid_transfers.rs @@ -433,7 +433,16 @@ fn transfer_foreign_assets_from_para_to_para_through_asset_hub() { let sov_of_receiver_on_ah = AssetHubKusama::sovereign_account_id_of(receiver_as_seen_by_ah); let dot_to_send = ASSET_HUB_KUSAMA_ED * 10_000_000; - // Configure destination chain to trust AH as reserve of DOT + // Configure source and destination chains to trust AH as reserve of DOT + PenpalA::execute_with(|| { + assert_ok!(::System::set_storage( + ::RuntimeOrigin::root(), + vec![( + CustomizableAssetFromSystemAssetHub::key().to_vec(), + Location::new(2, [GlobalConsensus(Polkadot)]).encode(), + )], + )); + }); PenpalB::execute_with(|| { assert_ok!(::System::set_storage( ::RuntimeOrigin::root(), diff --git a/integration-tests/emulated/tests/assets/asset-hub-kusama/src/tests/reserve_transfer.rs b/integration-tests/emulated/tests/assets/asset-hub-kusama/src/tests/reserve_transfer.rs index 11d886d0e6..e3f9b2af88 100644 --- a/integration-tests/emulated/tests/assets/asset-hub-kusama/src/tests/reserve_transfer.rs +++ b/integration-tests/emulated/tests/assets/asset-hub-kusama/src/tests/reserve_transfer.rs @@ -1055,3 +1055,58 @@ fn reserve_transfer_ksm_from_para_to_para_through_relay() { // Receiver's balance is increased assert!(receiver_assets_after > receiver_assets_before); } + +/// Reserve Withdraw Native Asset from AssetHub to Parachain fails. +#[test] +fn reserve_withdraw_from_untrusted_reserve_fails() { + // Init values for Parachain Origin + let destination = AssetHubKusama::sibling_location_of(PenpalA::para_id()); + let signed_origin = + ::RuntimeOrigin::signed(AssetHubKusamaSender::get()); + let ksm_to_send: Balance = KUSAMA_ED * 10000; + let ksm_location = KsmLocation::get(); + + // Assets to send + let assets: Vec = vec![(ksm_location.clone(), ksm_to_send).into()]; + let fee_id: AssetId = ksm_location.into(); + + // this should fail + AssetHubKusama::execute_with(|| { + let result = ::PolkadotXcm::transfer_assets_using_type_and_then( + signed_origin.clone(), + bx!(destination.clone().into()), + bx!(assets.clone().into()), + bx!(TransferType::DestinationReserve), + bx!(fee_id.into()), + bx!(TransferType::DestinationReserve), + bx!(VersionedXcm::from(Xcm::<()>::new())), + Unlimited, + ); + assert_err!( + result, + DispatchError::Module(sp_runtime::ModuleError { + index: 31, + error: [22, 0, 0, 0], + message: Some("InvalidAssetUnsupportedReserve") + }) + ); + }); + + // this should also fail + AssetHubKusama::execute_with(|| { + let xcm: Xcm = Xcm(vec![ + WithdrawAsset(assets.into()), + InitiateReserveWithdraw { + assets: Wild(All), + reserve: destination, + xcm: Xcm::<()>::new(), + }, + ]); + let result = ::PolkadotXcm::execute( + signed_origin, + bx!(xcm::VersionedXcm::V4(xcm)), + Weight::MAX, + ); + assert!(result.is_err()); + }); +} diff --git a/integration-tests/emulated/tests/assets/asset-hub-polkadot/src/tests/hybrid_transfers.rs b/integration-tests/emulated/tests/assets/asset-hub-polkadot/src/tests/hybrid_transfers.rs index e1ae744679..cf38d67912 100644 --- a/integration-tests/emulated/tests/assets/asset-hub-polkadot/src/tests/hybrid_transfers.rs +++ b/integration-tests/emulated/tests/assets/asset-hub-polkadot/src/tests/hybrid_transfers.rs @@ -434,7 +434,7 @@ fn transfer_foreign_assets_from_para_to_para_through_asset_hub() { let sov_of_receiver_on_ah = AssetHubPolkadot::sovereign_account_id_of(receiver_as_seen_by_ah); let ksm_to_send = ASSET_HUB_POLKADOT_ED * 10_000_000; - // Configure destination chain to trust AH as reserve of KSM + // Configure source and destination chains to trust AH as reserve of KSM PenpalA::execute_with(|| { assert_ok!(::System::set_storage( ::RuntimeOrigin::root(), @@ -444,6 +444,15 @@ fn transfer_foreign_assets_from_para_to_para_through_asset_hub() { )], )); }); + PenpalB::execute_with(|| { + assert_ok!(::System::set_storage( + ::RuntimeOrigin::root(), + vec![( + CustomizableAssetFromSystemAssetHub::key().to_vec(), + Location::new(2, [GlobalConsensus(Kusama)]).encode(), + )], + )); + }); // Register KSM as foreign asset and transfer it around the Polkadot ecosystem let ksm_at_polkadot_parachains = Location::new(2, [GlobalConsensus(Kusama)]); diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/lib.rs b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/lib.rs index 548bdccea2..9bdf33e39e 100644 --- a/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/lib.rs +++ b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/lib.rs @@ -14,6 +14,7 @@ // limitations under the License. // Substrate +pub use codec::Encode; pub use frame_support::{assert_err, assert_ok, pallet_prelude::DispatchResult}; pub use sp_runtime::{traits::Dispatchable, DispatchError}; @@ -29,7 +30,7 @@ pub use xcm::{ pub use xcm_executor::traits::TransferType; // Bridges -pub use bp_messages::LaneId; +pub use bp_messages::LegacyLaneId; // Cumulus pub use emulated_integration_tests_common::{ diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/asset_transfers.rs b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/asset_transfers.rs index 0e7621dabd..a9c7cc2748 100644 --- a/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/asset_transfers.rs +++ b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/asset_transfers.rs @@ -187,9 +187,9 @@ fn send_back_dot_usdt_and_weth_from_asset_hub_kusama_to_asset_hub_polkadot() { let amount_to_send = ASSET_HUB_POLKADOT_ED * 1_000; let sender = AssetHubKusamaSender::get(); let receiver = AssetHubPolkadotReceiver::get(); - let dot_at_asset_hub_kusama = bridged_dot_at_ah_kusama(); + let bridged_dot_at_asset_hub_kusama = bridged_dot_at_ah_kusama(); let prefund_accounts = vec![(sender.clone(), prefund_amount)]; - create_foreign_on_ah_kusama(dot_at_asset_hub_kusama.clone(), true, prefund_accounts); + create_foreign_on_ah_kusama(bridged_dot_at_asset_hub_kusama.clone(), true, prefund_accounts); //////////////////////////////////////////////////////////// // Let's first send back just some DOTs as a simple example @@ -206,7 +206,8 @@ fn send_back_dot_usdt_and_weth_from_asset_hub_kusama_to_asset_hub_polkadot() { ::account_data_of(sov_kah_on_pah.clone()).free; assert_eq!(dot_in_reserve_on_pah_before, prefund_amount); - let sender_dot_before = foreign_balance_on_ah_kusama(dot_at_asset_hub_kusama.clone(), &sender); + let sender_dot_before = + foreign_balance_on_ah_kusama(bridged_dot_at_asset_hub_kusama.clone(), &sender); assert_eq!(sender_dot_before, prefund_amount); let receiver_dot_before = ::account_data_of(receiver.clone()).free; @@ -242,7 +243,7 @@ fn send_back_dot_usdt_and_weth_from_asset_hub_kusama_to_asset_hub_polkadot() { ); }); - let sender_dot_after = foreign_balance_on_ah_kusama(dot_at_asset_hub_kusama, &sender); + let sender_dot_after = foreign_balance_on_ah_kusama(bridged_dot_at_asset_hub_kusama, &sender); let receiver_dot_after = ::account_data_of(receiver.clone()).free; let dot_in_reserve_on_pah_after = ::account_data_of(sov_kah_on_pah).free; @@ -449,6 +450,16 @@ fn send_back_dot_from_penpal_kusama_through_asset_hub_kusama_to_asset_hub_polkad ASSET_MIN_BALANCE, vec![(sender.clone(), amount * 2)], ); + // Configure source Penpal chain to trust local AH as reserve of bridged KSM + PenpalA::execute_with(|| { + assert_ok!(::System::set_storage( + ::RuntimeOrigin::root(), + vec![( + PenpalCustomizableAssetFromSystemAssetHub::key().to_vec(), + dot_at_kusama_parachains.encode(), + )], + )); + }); // fund the KAH's SA on PAH with the DOT tokens held in reserve let sov_kah_on_pah = AssetHubPolkadot::sovereign_account_of_parachain_on_other_global_consensus( diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/mod.rs b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/mod.rs index b943295e4a..b6edd6a076 100644 --- a/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/mod.rs +++ b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/mod.rs @@ -22,7 +22,7 @@ mod send_xcm; mod teleport; mod snowbridge { - pub const CHAIN_ID: u64 = 11155111; + pub const CHAIN_ID: u64 = 1; pub const WETH: [u8; 20] = hex_literal::hex!("87d1f7fdfEe7f651FaBc8bFCB6E086C278b77A7d"); } diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/lib.rs b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/lib.rs index 96c99fa117..6a55e4c24c 100644 --- a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/lib.rs +++ b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/lib.rs @@ -14,6 +14,7 @@ // limitations under the License. // Substrate +pub use codec::Encode; pub use frame_support::{assert_err, assert_ok, pallet_prelude::DispatchResult}; pub use sp_runtime::DispatchError; @@ -29,7 +30,7 @@ pub use xcm::{ pub use xcm_executor::traits::TransferType; // Bridges -pub use bp_messages::LaneId; +pub use bp_messages::LegacyLaneId; // Cumulus pub use emulated_integration_tests_common::{ diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/asset_transfers.rs b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/asset_transfers.rs index 6ce75f3441..794144a549 100644 --- a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/asset_transfers.rs +++ b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/asset_transfers.rs @@ -434,6 +434,16 @@ fn send_back_ksm_from_penpal_polkadot_through_asset_hub_polkadot_to_asset_hub_ku ASSET_MIN_BALANCE, vec![(sender.clone(), amount * 2)], ); + // Configure source Penpal chain to trust local AH as reserve of bridged KSM + PenpalB::execute_with(|| { + assert_ok!(::System::set_storage( + ::RuntimeOrigin::root(), + vec![( + PenpalCustomizableAssetFromSystemAssetHub::key().to_vec(), + ksm_at_polkadot_parachains.encode(), + )], + )); + }); // fund the PAH's SA on KAH with the KSM tokens held in reserve let sov_pah_on_kah = AssetHubKusama::sovereign_account_of_parachain_on_other_global_consensus( diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs index f579a049ac..4d94458662 100644 --- a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs +++ b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/snowbridge.rs @@ -23,10 +23,11 @@ use bridge_hub_polkadot_runtime::{ Runtime, RuntimeOrigin, }; use codec::{Decode, Encode}; -use emulated_integration_tests_common::xcm_emulator::ConvertLocation; +use emulated_integration_tests_common::{xcm_emulator::ConvertLocation, RESERVABLE_ASSET_ID}; use frame_support::pallet_prelude::TypeInfo; use hex_literal::hex; use polkadot_system_emulated_network::{ + asset_hub_polkadot_emulated_chain::genesis::AssetHubPolkadotAssetOwner, penpal_emulated_chain::CustomizableAssetFromSystemAssetHub, BridgeHubPolkadotParaSender as BridgeHubPolkadotSender, }; @@ -38,7 +39,7 @@ use snowbridge_core::{ inbound::{InboundQueueFixture, Log, Message, Proof}, meth, outbound::OperatingMode, - Rewards, + AssetMetadata, Rewards, TokenIdOf, }; use snowbridge_pallet_system::PricingParametersOf; use snowbridge_router_primitives::inbound::{ @@ -56,7 +57,8 @@ pub const GATEWAY_ADDRESS: [u8; 20] = hex!("EDa338E4dC46038493b885327842fD3E301C const INITIAL_FUND: u128 = 5_000_000_000 * POLKADOT_ED; const INSUFFICIENT_XCM_FEE: u128 = 1000; const XCM_FEE: u128 = 4_000_000_000; -const WETH_AMOUNT: u128 = 1_000_000_000; +const TOKEN_AMOUNT: u128 = 100_000_000_000; +const AH_BASE_FEE: u128 = 2_750_872_500_000u128; #[derive(Encode, Decode, Debug, PartialEq, Eq, Clone, TypeInfo)] pub enum ControlCall { @@ -240,14 +242,12 @@ fn register_weth_token_from_ethereum_to_asset_hub() { vec![(EthereumGatewayAddress::key().to_vec(), H160(GATEWAY_ADDRESS).encode())], )); // Construct RegisterToken message and sent to inbound queue - let message_id: H256 = [1; 32].into(); let message = VersionedMessage::V1(MessageV1 { chain_id: CHAIN_ID, command: Command::RegisterToken { token: WETH.into(), fee: XCM_FEE }, }); // Convert the message to XCM - let (xcm, _) = EthereumInboundQueue::do_convert(message_id, message).unwrap(); - // Send the XCM + let (xcm, _) = EthereumInboundQueue::do_convert([0; 32].into(), message).unwrap(); let _ = EthereumInboundQueue::send_xcm(xcm, AssetHubPolkadot::para_id()).unwrap(); assert_expected_events!( @@ -428,7 +428,7 @@ fn send_token_from_ethereum_to_asset_hub() { destination: Destination::AccountId32 { id: AssetHubPolkadotReceiver::get().into(), }, - amount: WETH_AMOUNT, + amount: TOKEN_AMOUNT, fee: XCM_FEE, }, }); @@ -470,13 +470,6 @@ fn send_weth_asset_from_asset_hub_to_ethereum() { [Parachain(AssetHubPolkadot::para_id().into())], )); - AssetHubPolkadot::force_default_xcm_version(Some(XCM_VERSION)); - BridgeHubPolkadot::force_default_xcm_version(Some(XCM_VERSION)); - AssetHubPolkadot::force_xcm_version( - Location::new(2, [GlobalConsensus(Ethereum { chain_id: CHAIN_ID })]), - XCM_VERSION, - ); - BridgeHubPolkadot::fund_accounts(vec![ (assethub_sovereign.clone(), INITIAL_FUND), (RelayTreasuryPalletAccount::get(), INITIAL_FUND), @@ -486,12 +479,11 @@ fn send_weth_asset_from_asset_hub_to_ethereum() { (ethereum_sovereign_account(), INITIAL_FUND), ]); - let base_fee = 2_750_872_500_000u128; - + // Set base transfer fee to Ethereum on AH. AssetHubPolkadot::execute_with(|| { assert_ok!(::System::set_storage( ::RuntimeOrigin::root(), - vec![(BridgeHubEthereumBaseFee::key().to_vec(), base_fee.encode())], + vec![(BridgeHubEthereumBaseFee::key().to_vec(), AH_BASE_FEE.encode())], )); }); @@ -544,7 +536,7 @@ fn send_weth_asset_from_asset_hub_to_ethereum() { destination: Destination::AccountId32 { id: AssetHubPolkadotReceiver::get().into(), }, - amount: WETH_AMOUNT, + amount: TOKEN_AMOUNT, fee: XCM_FEE, }, }); @@ -586,9 +578,9 @@ fn send_weth_asset_from_asset_hub_to_ethereum() { AccountKey20 { network: None, key: WETH }, ], )), - fun: Fungible(WETH_AMOUNT), + fun: Fungible(TOKEN_AMOUNT), }]; - let multi_assets = VersionedAssets::from(Assets::from(assets)); + let versioned_assets = VersionedAssets::from(Assets::from(assets)); let destination = VersionedLocation::from(Location::new( 2, @@ -610,7 +602,7 @@ fn send_weth_asset_from_asset_hub_to_ethereum() { RuntimeOrigin::signed(AssetHubPolkadotReceiver::get()), Box::new(destination), Box::new(beneficiary), - Box::new(multi_assets), + Box::new(versioned_assets), 0, Unlimited, ) @@ -622,7 +614,7 @@ fn send_weth_asset_from_asset_hub_to_ethereum() { ); // Assert at least DefaultBridgeHubEthereumBaseFee charged from the sender let free_balance_diff = free_balance_before - free_balance_after; - assert!(free_balance_diff > base_fee); + assert!(free_balance_diff > AH_BASE_FEE); }); BridgeHubPolkadot::execute_with(|| { @@ -962,3 +954,333 @@ fn send_token_from_ethereum_to_non_existent_account_on_asset_hub_with_sufficient ); }); } + +#[test] +fn transfer_relay_token() { + let assethub_sovereign = BridgeHubPolkadot::sovereign_account_id_of( + BridgeHubPolkadot::sibling_location_of(AssetHubPolkadot::para_id()), + ); + BridgeHubPolkadot::fund_accounts(vec![(assethub_sovereign.clone(), INITIAL_FUND)]); + + let asset_id: Location = Location { parents: 1, interior: [].into() }; + let expected_asset_id: Location = + Location { parents: 1, interior: [GlobalConsensus(Polkadot)].into() }; + + let expected_token_id = TokenIdOf::convert_location(&expected_asset_id).unwrap(); + + let ethereum_sovereign: AccountId = + GlobalConsensusEthereumConvertsFor::<[u8; 32]>::convert_location(&Location::new( + 2, + [GlobalConsensus(EthereumNetwork::get())], + )) + .unwrap() + .into(); + + // Register token + BridgeHubPolkadot::execute_with(|| { + type RuntimeOrigin = ::RuntimeOrigin; + type RuntimeEvent = ::RuntimeEvent; + + assert_ok!(::Balances::force_set_balance( + RuntimeOrigin::root(), + sp_runtime::MultiAddress::Id(BridgeHubPolkadotSender::get()), + INITIAL_FUND * 10, + )); + + assert_ok!(::EthereumSystem::register_token( + RuntimeOrigin::root(), + Box::new(VersionedLocation::V4(asset_id.clone())), + AssetMetadata { + name: "wnd".as_bytes().to_vec().try_into().unwrap(), + symbol: "wnd".as_bytes().to_vec().try_into().unwrap(), + decimals: 12, + }, + )); + // Check that a message was sent to Ethereum to create the agent + assert_expected_events!( + BridgeHubPolkadot, + vec![RuntimeEvent::EthereumSystem(snowbridge_pallet_system::Event::RegisterToken { .. }) => {},] + ); + }); + + // Send token to Ethereum + AssetHubPolkadot::execute_with(|| { + type RuntimeOrigin = ::RuntimeOrigin; + type RuntimeEvent = ::RuntimeEvent; + + // Set base transfer fee to Ethereum on AH. + assert_ok!(::System::set_storage( + ::RuntimeOrigin::root(), + vec![(BridgeHubEthereumBaseFee::key().to_vec(), AH_BASE_FEE.encode())], + )); + + let assets = vec![Asset { id: AssetId(Location::parent()), fun: Fungible(TOKEN_AMOUNT) }]; + let versioned_assets = VersionedAssets::V4(Assets::from(assets)); + + let destination = VersionedLocation::V4(Location::new( + 2, + [GlobalConsensus(Ethereum { chain_id: CHAIN_ID })], + )); + + let beneficiary = VersionedLocation::V4(Location::new( + 0, + [AccountKey20 { network: None, key: ETHEREUM_DESTINATION_ADDRESS }], + )); + + assert_ok!(::PolkadotXcm::limited_reserve_transfer_assets( + RuntimeOrigin::signed(AssetHubPolkadotSender::get()), + Box::new(destination), + Box::new(beneficiary), + Box::new(versioned_assets), + 0, + Unlimited, + )); + + let events = AssetHubPolkadot::events(); + // Check that the native asset transferred to some reserved account(sovereign of Ethereum) + assert!( + events.iter().any(|event| matches!( + event, + RuntimeEvent::Balances(pallet_balances::Event::Transfer { amount, to, ..}) + if *amount == TOKEN_AMOUNT && *to == ethereum_sovereign.clone(), + )), + "native token reserved to Ethereum sovereign account." + ); + }); + + // Send token back from ethereum + BridgeHubPolkadot::execute_with(|| { + type RuntimeEvent = ::RuntimeEvent; + + // Check that the transfer token back to Ethereum message was queue in the Ethereum + // Outbound Queue + assert_expected_events!( + BridgeHubPolkadot, + vec![RuntimeEvent::EthereumOutboundQueue(snowbridge_pallet_outbound_queue::Event::MessageQueued{ .. }) => {},] + ); + + // Send relay token back to AH + let message_id: H256 = [0; 32].into(); + let message = VersionedMessage::V1(MessageV1 { + chain_id: CHAIN_ID, + command: Command::SendNativeToken { + token_id: expected_token_id, + destination: Destination::AccountId32 { + id: AssetHubPolkadotReceiver::get().into(), + }, + amount: TOKEN_AMOUNT, + fee: XCM_FEE, + }, + }); + // Convert the message to XCM + let (xcm, _) = EthereumInboundQueue::do_convert(message_id, message).unwrap(); + // Send the XCM + let _ = EthereumInboundQueue::send_xcm(xcm, AssetHubPolkadot::para_id()).unwrap(); + + assert_expected_events!( + BridgeHubPolkadot, + vec![RuntimeEvent::XcmpQueue(cumulus_pallet_xcmp_queue::Event::XcmpMessageSent { .. }) => {},] + ); + }); + + AssetHubPolkadot::execute_with(|| { + type RuntimeEvent = ::RuntimeEvent; + + assert_expected_events!( + AssetHubPolkadot, + vec![RuntimeEvent::Balances(pallet_balances::Event::Burned{ .. }) => {},] + ); + + let events = AssetHubPolkadot::events(); + + // Check that the native token burnt from some reserved account + assert!( + events.iter().any(|event| matches!( + event, + RuntimeEvent::Balances(pallet_balances::Event::Burned { who, ..}) + if *who == ethereum_sovereign.clone(), + )), + "native token burnt from Ethereum sovereign account." + ); + + // Check that the token was minted to beneficiary + assert!( + events.iter().any(|event| matches!( + event, + RuntimeEvent::Balances(pallet_balances::Event::Minted { who, amount }) + if *amount >= TOKEN_AMOUNT && *who == AssetHubPolkadotReceiver::get() + )), + "Token minted to beneficiary." + ); + }); +} + +#[test] +fn transfer_ah_token() { + let assethub_sovereign = BridgeHubPolkadot::sovereign_account_id_of( + BridgeHubPolkadot::sibling_location_of(AssetHubPolkadot::para_id()), + ); + BridgeHubPolkadot::fund_accounts(vec![(assethub_sovereign.clone(), INITIAL_FUND)]); + + let ethereum_destination = Location::new(2, [GlobalConsensus(Ethereum { chain_id: CHAIN_ID })]); + + let ethereum_sovereign: AccountId = + GlobalConsensusEthereumConvertsFor::<[u8; 32]>::convert_location(ðereum_destination) + .unwrap() + .into(); + AssetHubPolkadot::fund_accounts(vec![(ethereum_sovereign.clone(), INITIAL_FUND)]); + + let asset_id: Location = + [PalletInstance(ASSETS_PALLET_ID), GeneralIndex(RESERVABLE_ASSET_ID.into())].into(); + + let asset_id_in_bh: Location = Location::new( + 1, + [ + Parachain(AssetHubPolkadot::para_id().into()), + PalletInstance(ASSETS_PALLET_ID), + GeneralIndex(RESERVABLE_ASSET_ID.into()), + ], + ); + + let asset_id_after_reanchored = Location::new( + 1, + [GlobalConsensus(Polkadot), Parachain(AssetHubPolkadot::para_id().into())], + ) + .appended_with(asset_id.clone().interior) + .unwrap(); + + let token_id = TokenIdOf::convert_location(&asset_id_after_reanchored).unwrap(); + + // Register token + BridgeHubPolkadot::execute_with(|| { + type RuntimeOrigin = ::RuntimeOrigin; + + assert_ok!(::EthereumSystem::register_token( + RuntimeOrigin::root(), + Box::new(VersionedLocation::V4(asset_id_in_bh.clone())), + AssetMetadata { + name: "ah_asset".as_bytes().to_vec().try_into().unwrap(), + symbol: "ah_asset".as_bytes().to_vec().try_into().unwrap(), + decimals: 12, + }, + )); + }); + + // Mint some token + AssetHubPolkadot::mint_asset( + ::RuntimeOrigin::signed(AssetHubPolkadotAssetOwner::get()), + RESERVABLE_ASSET_ID, + AssetHubPolkadotSender::get(), + TOKEN_AMOUNT, + ); + + // Send token to Ethereum + AssetHubPolkadot::execute_with(|| { + type RuntimeOrigin = ::RuntimeOrigin; + type RuntimeEvent = ::RuntimeEvent; + + // Set base transfer fee to Ethereum on AH. + assert_ok!(::System::set_storage( + ::RuntimeOrigin::root(), + vec![(BridgeHubEthereumBaseFee::key().to_vec(), AH_BASE_FEE.encode())], + )); + + // Send partial of the token, will fail if send all + let assets = vec![Asset { id: AssetId(asset_id.clone()), fun: Fungible(TOKEN_AMOUNT / 2) }]; + let versioned_assets = VersionedAssets::V4(Assets::from(assets)); + + let beneficiary = VersionedLocation::V4(Location::new( + 0, + [AccountKey20 { network: None, key: ETHEREUM_DESTINATION_ADDRESS }], + )); + + assert_ok!(::PolkadotXcm::limited_reserve_transfer_assets( + RuntimeOrigin::signed(AssetHubPolkadotSender::get()), + Box::new(VersionedLocation::from(ethereum_destination)), + Box::new(beneficiary), + Box::new(versioned_assets), + 0, + Unlimited, + )); + + assert_expected_events!( + AssetHubPolkadot, + vec![RuntimeEvent::Assets(pallet_assets::Event::Transferred{ .. }) => {},] + ); + + let events = AssetHubPolkadot::events(); + // Check that the native asset transferred to some reserved account(sovereign of Ethereum) + assert!( + events.iter().any(|event| matches!( + event, + RuntimeEvent::Assets(pallet_assets::Event::Transferred { asset_id, to, ..}) + if *asset_id == RESERVABLE_ASSET_ID && *to == ethereum_sovereign.clone() + )), + "native token reserved to Ethereum sovereign account." + ); + }); + + // Send token back from Ethereum + BridgeHubPolkadot::execute_with(|| { + type RuntimeEvent = ::RuntimeEvent; + + // Check that the transfer token back to Ethereum message was queue in the Ethereum + // Outbound Queue + assert_expected_events!( + BridgeHubPolkadot, + vec![RuntimeEvent::EthereumOutboundQueue(snowbridge_pallet_outbound_queue::Event::MessageQueued{ .. }) => {},] + ); + + let message = VersionedMessage::V1(MessageV1 { + chain_id: CHAIN_ID, + command: Command::SendNativeToken { + token_id, + destination: Destination::AccountId32 { + id: AssetHubPolkadotReceiver::get().into(), + }, + amount: TOKEN_AMOUNT / 10, + fee: XCM_FEE, + }, + }); + // Convert the message to XCM + let (xcm, _) = EthereumInboundQueue::do_convert([0; 32].into(), message).unwrap(); + // Send the XCM + let _ = EthereumInboundQueue::send_xcm(xcm, AssetHubPolkadot::para_id()).unwrap(); + + assert_expected_events!( + BridgeHubPolkadot, + vec![RuntimeEvent::XcmpQueue(cumulus_pallet_xcmp_queue::Event::XcmpMessageSent { .. }) => {},] + ); + }); + + AssetHubPolkadot::execute_with(|| { + type RuntimeEvent = ::RuntimeEvent; + + assert_expected_events!( + AssetHubPolkadot, + vec![RuntimeEvent::Assets(pallet_assets::Event::Burned{..}) => {},] + ); + + let events = AssetHubPolkadot::events(); + + // Check that the native token burnt from some reserved account + assert!( + events.iter().any(|event| matches!( + event, + RuntimeEvent::Assets(pallet_assets::Event::Burned { owner, .. }) + if *owner == ethereum_sovereign.clone(), + )), + "token burnt from Ethereum sovereign account." + ); + + // Check that the token was minted to beneficiary + assert!( + events.iter().any(|event| matches!( + event, + RuntimeEvent::Assets(pallet_assets::Event::Issued { owner, .. }) + if *owner == AssetHubPolkadotReceiver::get() + )), + "Token minted to beneficiary." + ); + }); +} diff --git a/relay/kusama/Cargo.toml b/relay/kusama/Cargo.toml index 83a5bf194b..bbb220140d 100644 --- a/relay/kusama/Cargo.toml +++ b/relay/kusama/Cargo.toml @@ -51,6 +51,7 @@ pallet-transaction-payment = { workspace = true } pallet-transaction-payment-rpc-runtime-api = { workspace = true } pallet-nomination-pools-runtime-api = { workspace = true } pallet-conviction-voting = { workspace = true } +pallet-delegated-staking = { workspace = true } pallet-election-provider-multi-phase = { workspace = true } pallet-fast-unstake = { workspace = true } frame-executive = { workspace = true } @@ -151,6 +152,7 @@ std = [ "pallet-bounties/std", "pallet-child-bounties/std", "pallet-conviction-voting/std", + "pallet-delegated-staking/std", "pallet-election-provider-multi-phase/std", "pallet-election-provider-support-benchmarking?/std", "pallet-fast-unstake/std", @@ -227,9 +229,11 @@ runtime-benchmarks = [ "pallet-babe/runtime-benchmarks", "pallet-bags-list/runtime-benchmarks", "pallet-balances/runtime-benchmarks", + "pallet-beefy-mmr/runtime-benchmarks", "pallet-bounties/runtime-benchmarks", "pallet-child-bounties/runtime-benchmarks", "pallet-conviction-voting/runtime-benchmarks", + "pallet-delegated-staking/runtime-benchmarks", "pallet-election-provider-multi-phase/runtime-benchmarks", "pallet-election-provider-support-benchmarking/runtime-benchmarks", "pallet-fast-unstake/runtime-benchmarks", @@ -287,6 +291,7 @@ try-runtime = [ "pallet-bounties/try-runtime", "pallet-child-bounties/try-runtime", "pallet-conviction-voting/try-runtime", + "pallet-delegated-staking/try-runtime", "pallet-election-provider-multi-phase/try-runtime", "pallet-fast-unstake/try-runtime", "pallet-grandpa/try-runtime", diff --git a/relay/kusama/src/genesis_config_presets.rs b/relay/kusama/src/genesis_config_presets.rs index 804c296fa3..3baaea5700 100644 --- a/relay/kusama/src/genesis_config_presets.rs +++ b/relay/kusama/src/genesis_config_presets.rs @@ -116,7 +116,7 @@ fn default_parachains_host_configuration() -> HostConfiguration>::Proof; type EquivocationReportSystem = @@ -380,6 +385,8 @@ impl pallet_mmr::Config for Runtime { type WeightInfo = (); type LeafData = pallet_beefy_mmr::Pallet; type BlockHashProvider = pallet_mmr::DefaultBlockHashProvider; + #[cfg(feature = "runtime-benchmarks")] + type BenchmarkHelper = parachains_paras::benchmarking::mmr_setup::MmrSetup; } /// MMR helper types. @@ -432,6 +439,7 @@ impl pallet_beefy_mmr::Config for Runtime { type BeefyAuthorityToMerkleLeaf = pallet_beefy_mmr::BeefyEcdsaToEthereum; type LeafExtra = H256; type BeefyDataProvider = ParaHeadsRootProvider; + type WeightInfo = weights::pallet_beefy_mmr::WeightInfo; } parameter_types! { @@ -1425,11 +1433,11 @@ parameter_types! { pub const OnDemandPalletId: PalletId = PalletId(*b"py/ondmd"); } -impl parachains_assigner_on_demand::Config for Runtime { +impl parachains_on_demand::Config for Runtime { type RuntimeEvent = RuntimeEvent; type Currency = Balances; type TrafficDefaultValue = OnDemandTrafficDefaultValue; - type WeightInfo = weights::runtime_parachains_assigner_on_demand::WeightInfo; + type WeightInfo = weights::runtime_parachains_on_demand::WeightInfo; type MaxHistoricalRevenue = MaxHistoricalRevenue; type PalletId = OnDemandPalletId; } @@ -1617,6 +1625,22 @@ impl pallet_nomination_pools::Config for Runtime { type AdminOrigin = EitherOf, StakingAdmin>; } +parameter_types! { + pub const DelegatedStakingPalletId: PalletId = PalletId(*b"py/dlstk"); + pub const SlashRewardFraction: Perbill = Perbill::from_percent(1); +} + +impl pallet_delegated_staking::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type PalletId = DelegatedStakingPalletId; + type Currency = Balances; + // slashes are sent to the treasury. + type OnSlash = ResolveTo, Balances>; + type SlashRewardFraction = SlashRewardFraction; + type RuntimeHoldReason = RuntimeHoldReason; + type CoreStaking = Staking; +} + /// The [frame_support::traits::tokens::ConversionFromAssetBalance] implementation provided by the /// `AssetRate` pallet instance. /// @@ -1731,6 +1755,9 @@ construct_runtime! { // Fast unstake pallet: extension to staking. FastUnstake: pallet_fast_unstake = 42, + // Staking extension for delegation + DelegatedStaking: pallet_delegated_staking = 47, + // Parachains pallets. Start indices at 50 to leave room. ParachainsOrigin: parachains_origin = 50, Configuration: parachains_configuration = 51, @@ -1745,7 +1772,7 @@ construct_runtime! { ParaSessionInfo: parachains_session_info = 61, ParasDisputes: parachains_disputes = 62, ParasSlashing: parachains_slashing = 63, - OnDemandAssignmentProvider: parachains_assigner_on_demand = 64, + OnDemandAssignmentProvider: parachains_on_demand = 64, CoretimeAssignmentProvider: parachains_assigner_coretime = 65, // Parachain Onboarding Pallets. Start indices at 70 to leave room. @@ -1819,7 +1846,7 @@ pub mod migrations { parachains_configuration::migration::v12::MigrateToV12, pallet_staking::migrations::v15::MigrateV14ToV15, parachains_inclusion::migration::MigrateToV1, - parachains_assigner_on_demand::migration::MigrateV0ToV1, + parachains_on_demand::migration::MigrateV0ToV1, restore_corrupted_ledgers::Migrate, ); @@ -2325,22 +2352,39 @@ sp_api::impl_runtime_apis! { Beefy::validator_set() } - fn submit_report_equivocation_unsigned_extrinsic( - equivocation_proof: beefy_primitives::DoubleVotingProof< - BlockNumber, - BeefyId, - BeefySignature, - >, - key_owner_proof: beefy_primitives::OpaqueKeyOwnershipProof, + fn submit_report_double_voting_unsigned_extrinsic( + equivocation_proof: + beefy_primitives::DoubleVotingProof, + key_owner_proof: OpaqueKeyOwnershipProof, ) -> Option<()> { let key_owner_proof = key_owner_proof.decode()?; - Beefy::submit_unsigned_equivocation_report( + Beefy::submit_unsigned_double_voting_report( equivocation_proof, key_owner_proof, ) } + fn submit_report_fork_voting_unsigned_extrinsic( + equivocation_proof: beefy_primitives::ForkVotingProof, + key_owner_proof: OpaqueKeyOwnershipProof, + ) -> Option<()> { + Beefy::submit_unsigned_fork_voting_report( + equivocation_proof.try_into()?, + key_owner_proof.decode()?, + ) + } + + fn submit_report_future_block_voting_unsigned_extrinsic( + equivocation_proof: beefy_primitives::FutureBlockVotingProof , + key_owner_proof: OpaqueKeyOwnershipProof, + ) -> Option<()> { + Beefy::submit_unsigned_future_block_voting_report( + equivocation_proof, + key_owner_proof.decode()?, + ) + } + fn generate_key_ownership_proof( _set_id: beefy_primitives::ValidatorSetId, authority_id: BeefyId, @@ -2351,6 +2395,16 @@ sp_api::impl_runtime_apis! { .map(|p| p.encode()) .map(beefy_primitives::OpaqueKeyOwnershipProof::new) } + + fn generate_ancestry_proof( + prev_block_number: BlockNumber, + best_known_block_number: Option, + ) -> Option { + Mmr::generate_ancestry_proof(prev_block_number, best_known_block_number) + .map(|p| p.encode()) + .map(OpaqueKeyOwnershipProof::new) + .ok() + } } impl mmr::MmrApi for Runtime { @@ -2639,6 +2693,14 @@ sp_api::impl_runtime_apis! { fn member_needs_delegate_migration(member: AccountId) -> bool { NominationPools::api_member_needs_delegate_migration(member) } + + fn member_total_balance(who: AccountId) -> Balance { + NominationPools::api_member_total_balance(who) + } + + fn pool_balance(pool_id: pallet_nomination_pools::PoolId) -> Balance { + NominationPools::api_pool_balance(pool_id) + } } impl pallet_staking_runtime_api::StakingApi for Runtime { diff --git a/relay/kusama/src/weights/mod.rs b/relay/kusama/src/weights/mod.rs index 263e2e1c6d..872af9c7ec 100644 --- a/relay/kusama/src/weights/mod.rs +++ b/relay/kusama/src/weights/mod.rs @@ -21,6 +21,7 @@ pub mod pallet_asset_rate; pub mod pallet_bags_list; pub mod pallet_balances_native; pub mod pallet_balances_nis_counterpart; +pub mod pallet_beefy_mmr; pub mod pallet_bounties; pub mod pallet_child_bounties; pub mod pallet_conviction_voting; @@ -52,7 +53,6 @@ pub mod polkadot_runtime_common_claims; pub mod polkadot_runtime_common_crowdloan; pub mod polkadot_runtime_common_paras_registrar; pub mod polkadot_runtime_common_slots; -pub mod runtime_parachains_assigner_on_demand; pub mod runtime_parachains_configuration; pub mod runtime_parachains_coretime; pub mod runtime_parachains_disputes; @@ -60,6 +60,7 @@ pub mod runtime_parachains_disputes_slashing; pub mod runtime_parachains_hrmp; pub mod runtime_parachains_inclusion; pub mod runtime_parachains_initializer; +pub mod runtime_parachains_on_demand; pub mod runtime_parachains_paras; pub mod runtime_parachains_paras_inherent; pub mod xcm; diff --git a/relay/kusama/src/weights/pallet_beefy_mmr.rs b/relay/kusama/src/weights/pallet_beefy_mmr.rs new file mode 100644 index 0000000000..e9d893a25f --- /dev/null +++ b/relay/kusama/src/weights/pallet_beefy_mmr.rs @@ -0,0 +1,32 @@ +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `pallet_balances`. +pub struct WeightInfo(PhantomData); +impl pallet_beefy_mmr::WeightInfo for WeightInfo { + fn extract_validation_context() -> Weight { + Weight::from_parts(0, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + + fn read_peak() -> Weight { + Weight::from_parts(0, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + + fn n_items_proof_is_non_canonical(_: u32, ) -> Weight { + Weight::from_parts(0, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } +} diff --git a/relay/kusama/src/weights/runtime_parachains_inclusion.rs b/relay/kusama/src/weights/runtime_parachains_inclusion.rs index 1b658e3173..1f3a75c630 100644 --- a/relay/kusama/src/weights/runtime_parachains_inclusion.rs +++ b/relay/kusama/src/weights/runtime_parachains_inclusion.rs @@ -47,26 +47,10 @@ use core::marker::PhantomData; /// Weight functions for `runtime_parachains::inclusion`. pub struct WeightInfo(PhantomData); impl runtime_parachains::inclusion::WeightInfo for WeightInfo { - /// Storage: `MessageQueue::BookStateFor` (r:1 w:1) - /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(55), added: 2530, mode: `MaxEncodedLen`) - /// Storage: `MessageQueue::Pages` (r:1 w:999) - /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65586), added: 68061, mode: `MaxEncodedLen`) - /// Storage: UNKNOWN KEY `0x3a72656c61795f64697370617463685f71756575655f72656d61696e696e675f` (r:0 w:1) - /// Proof: UNKNOWN KEY `0x3a72656c61795f64697370617463685f71756575655f72656d61696e696e675f` (r:0 w:1) - /// Storage: UNKNOWN KEY `0xf5207f03cfdce586301014700e2c2593fad157e461d71fd4c1f936839a5f1f3e` (r:0 w:1) - /// Proof: UNKNOWN KEY `0xf5207f03cfdce586301014700e2c2593fad157e461d71fd4c1f936839a5f1f3e` (r:0 w:1) - /// The range of component `i` is `[1, 1000]`. - fn receive_upward_messages(i: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `65761` - // Estimated: `69051` - // Minimum execution time: 105_891_000 picoseconds. - Weight::from_parts(106_141_000, 0) - .saturating_add(Weight::from_parts(0, 69051)) - // Standard Error: 123_112 - .saturating_add(Weight::from_parts(91_012_522, 0).saturating_mul(i.into())) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(3)) - .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) + fn enact_candidate(_: u32, _: u32, _: u32) -> Weight { + Weight::from_parts(0, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } } diff --git a/relay/kusama/src/weights/runtime_parachains_assigner_on_demand.rs b/relay/kusama/src/weights/runtime_parachains_on_demand.rs similarity index 97% rename from relay/kusama/src/weights/runtime_parachains_assigner_on_demand.rs rename to relay/kusama/src/weights/runtime_parachains_on_demand.rs index 501d5f7669..39a1d84463 100644 --- a/relay/kusama/src/weights/runtime_parachains_assigner_on_demand.rs +++ b/relay/kusama/src/weights/runtime_parachains_on_demand.rs @@ -46,7 +46,7 @@ use core::marker::PhantomData; /// Weight functions for `runtime_parachains::assigner_on_demand`. pub struct WeightInfo(PhantomData); -impl runtime_parachains::assigner_on_demand::WeightInfo for WeightInfo { +impl runtime_parachains::on_demand::WeightInfo for WeightInfo { /// Storage: `OnDemandAssignmentProvider::QueueStatus` (r:1 w:1) /// Proof: `OnDemandAssignmentProvider::QueueStatus` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `System::Account` (r:1 w:1) diff --git a/relay/kusama/src/weights/runtime_parachains_paras_inherent.rs b/relay/kusama/src/weights/runtime_parachains_paras_inherent.rs index 76447902f4..0def0ecf4d 100644 --- a/relay/kusama/src/weights/runtime_parachains_paras_inherent.rs +++ b/relay/kusama/src/weights/runtime_parachains_paras_inherent.rs @@ -324,4 +324,11 @@ impl runtime_parachains::paras_inherent::WeightInfo for .saturating_add(T::DbWeight::get().reads(31)) .saturating_add(T::DbWeight::get().writes(15)) } + + fn enter_empty() -> Weight { + Weight::from_parts(0, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } } diff --git a/relay/kusama/src/xcm_config.rs b/relay/kusama/src/xcm_config.rs index e29b4cc2da..b5bfc67046 100644 --- a/relay/kusama/src/xcm_config.rs +++ b/relay/kusama/src/xcm_config.rs @@ -38,10 +38,9 @@ use xcm_builder::{ AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, ChildParachainAsNative, ChildParachainConvertsVia, DescribeAllTerminal, DescribeFamily, FrameTransactionalProcessor, FungibleAdapter, HashedDescription, IsChildSystemParachain, IsConcrete, MintLocation, - OriginToPluralityVoice, SignedAccountId32AsNative, SignedToAccountId32, + OriginToPluralityVoice, SendXcmFeeToAccount, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, XcmFeeManagerFromComponents, - XcmFeeToAccount, }; parameter_types! { @@ -215,7 +214,7 @@ impl xcm_executor::Config for XcmConfig { type MaxAssetsIntoHolding = MaxAssetsIntoHolding; type FeeManager = XcmFeeManagerFromComponents< WaivedLocations, - XcmFeeToAccount, + SendXcmFeeToAccount, >; // No bridges on the Relay Chain type MessageExporter = (); diff --git a/relay/polkadot/Cargo.toml b/relay/polkadot/Cargo.toml index a1b2c8bb5e..823bcf41a3 100644 --- a/relay/polkadot/Cargo.toml +++ b/relay/polkadot/Cargo.toml @@ -46,6 +46,7 @@ pallet-beefy-mmr = { workspace = true } pallet-bounties = { workspace = true } pallet-broker = { workspace = true } pallet-child-bounties = { workspace = true } +pallet-delegated-staking = { workspace = true } pallet-transaction-payment = { workspace = true } pallet-transaction-payment-rpc-runtime-api = { workspace = true } pallet-conviction-voting = { workspace = true } @@ -154,6 +155,7 @@ std = [ "pallet-broker/std", "pallet-child-bounties/std", "pallet-conviction-voting/std", + "pallet-delegated-staking/std", "pallet-election-provider-multi-phase/std", "pallet-election-provider-support-benchmarking?/std", "pallet-fast-unstake/std", @@ -229,10 +231,12 @@ runtime-benchmarks = [ "pallet-babe/runtime-benchmarks", "pallet-bags-list/runtime-benchmarks", "pallet-balances/runtime-benchmarks", + "pallet-beefy-mmr/runtime-benchmarks", "pallet-bounties/runtime-benchmarks", "pallet-broker/runtime-benchmarks", "pallet-child-bounties/runtime-benchmarks", "pallet-conviction-voting/runtime-benchmarks", + "pallet-delegated-staking/runtime-benchmarks", "pallet-election-provider-multi-phase/runtime-benchmarks", "pallet-election-provider-support-benchmarking/runtime-benchmarks", "pallet-fast-unstake/runtime-benchmarks", @@ -288,6 +292,7 @@ try-runtime = [ "pallet-broker/try-runtime", "pallet-child-bounties/try-runtime", "pallet-conviction-voting/try-runtime", + "pallet-delegated-staking/try-runtime", "pallet-election-provider-multi-phase/try-runtime", "pallet-fast-unstake/try-runtime", "pallet-grandpa/try-runtime", diff --git a/relay/polkadot/src/coretime_migration.rs b/relay/polkadot/src/coretime_migration.rs index 9fc595031a..5bf73efc42 100644 --- a/relay/polkadot/src/coretime_migration.rs +++ b/relay/polkadot/src/coretime_migration.rs @@ -244,7 +244,7 @@ fn migrate_send_assignments_to_coretime_chain< }, }; - let time_slice = valid_until.div_ceil(TIMESLICE_PERIOD); + let time_slice = (valid_until + TIMESLICE_PERIOD - 1).div_ceil(TIMESLICE_PERIOD); log::trace!(target: "coretime-migration", "Sending of lease holding para {:?}, valid_until: {:?}, time_slice: {:?}", p, valid_until, time_slice); Some(mk_coretime_call::(CoretimeCalls::SetLease(p.into(), time_slice))) }); diff --git a/relay/polkadot/src/genesis_config_presets.rs b/relay/polkadot/src/genesis_config_presets.rs index 8d8afb6ad0..63717f69e5 100644 --- a/relay/polkadot/src/genesis_config_presets.rs +++ b/relay/polkadot/src/genesis_config_presets.rs @@ -116,7 +116,7 @@ fn default_parachains_host_configuration() -> HostConfiguration>::Proof; type EquivocationReportSystem = @@ -367,6 +372,8 @@ impl pallet_mmr::Config for Runtime { type WeightInfo = (); type LeafData = pallet_beefy_mmr::Pallet; type BlockHashProvider = pallet_mmr::DefaultBlockHashProvider; + #[cfg(feature = "runtime-benchmarks")] + type BenchmarkHelper = parachains_paras::benchmarking::mmr_setup::MmrSetup; } /// MMR helper types. @@ -419,6 +426,7 @@ impl pallet_beefy_mmr::Config for Runtime { type BeefyAuthorityToMerkleLeaf = pallet_beefy_mmr::BeefyEcdsaToEthereum; type LeafExtra = H256; type BeefyDataProvider = ParaHeadsRootProvider; + type WeightInfo = weights::pallet_beefy_mmr::WeightInfo; } parameter_types! { @@ -697,7 +705,7 @@ impl pallet_staking::Config for Runtime { type HistoryDepth = frame_support::traits::ConstU32<84>; type MaxControllersInDeprecationBatch = ConstU32<5314>; type BenchmarkingConfig = polkadot_runtime_common::StakingBenchmarkingConfig; - type EventListeners = NominationPools; + type EventListeners = (NominationPools, DelegatedStaking); type DisablingStrategy = pallet_staking::UpToLimitDisablingStrategy; type WeightInfo = weights::pallet_staking::WeightInfo; } @@ -1299,11 +1307,11 @@ parameter_types! { pub const OnDemandPalletId: PalletId = PalletId(*b"py/ondmd"); } -impl parachains_assigner_on_demand::Config for Runtime { +impl parachains_on_demand::Config for Runtime { type RuntimeEvent = RuntimeEvent; type Currency = Balances; type TrafficDefaultValue = OnDemandTrafficDefaultValue; - type WeightInfo = weights::runtime_parachains_assigner_on_demand::WeightInfo; + type WeightInfo = weights::runtime_parachains_on_demand::WeightInfo; type MaxHistoricalRevenue = MaxHistoricalRevenue; type PalletId = OnDemandPalletId; } @@ -1435,7 +1443,8 @@ impl pallet_nomination_pools::Config for Runtime { type RewardCounter = FixedU128; type BalanceToU256 = polkadot_runtime_common::BalanceToU256; type U256ToBalance = polkadot_runtime_common::U256ToBalance; - type StakeAdapter = pallet_nomination_pools::adapter::TransferStake; + type StakeAdapter = + pallet_nomination_pools::adapter::DelegateStake; type PostUnbondingPoolsWindow = frame_support::traits::ConstU32<4>; type MaxMetadataLen = frame_support::traits::ConstU32<256>; // we use the same number of allowed unlocking chunks as with staking. @@ -1446,6 +1455,22 @@ impl pallet_nomination_pools::Config for Runtime { type AdminOrigin = EitherOf, StakingAdmin>; } +parameter_types! { + pub const DelegatedStakingPalletId: PalletId = PalletId(*b"py/dlstk"); + pub const SlashRewardFraction: Perbill = Perbill::from_percent(1); +} + +impl pallet_delegated_staking::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type PalletId = DelegatedStakingPalletId; + type Currency = Balances; + // slashes are sent to the treasury. + type OnSlash = ResolveTo, Balances>; + type SlashRewardFraction = SlashRewardFraction; + type RuntimeHoldReason = RuntimeHoldReason; + type CoreStaking = Staking; +} + pub struct InitiateNominationPools; impl frame_support::traits::OnRuntimeUpgrade for InitiateNominationPools { fn on_runtime_upgrade() -> frame_support::weights::Weight { @@ -1591,6 +1616,9 @@ construct_runtime! { // Fast unstake pallet: extension to staking. FastUnstake: pallet_fast_unstake = 40, + // Staking extension for delegation + DelegatedStaking: pallet_delegated_staking = 41, + // Parachains pallets. Start indices at 50 to leave room. ParachainsOrigin: parachains_origin = 50, Configuration: parachains_configuration = 51, @@ -1606,7 +1634,7 @@ construct_runtime! { ParaSessionInfo: parachains_session_info = 61, ParasDisputes: parachains_disputes = 62, ParasSlashing: parachains_slashing = 63, - OnDemand: parachains_assigner_on_demand = 64, + OnDemand: parachains_on_demand = 64, CoretimeAssignmentProvider: parachains_assigner_coretime = 65, // Parachain Onboarding Pallets. Start indices at 70 to leave room. @@ -1947,6 +1975,13 @@ pub mod migrations { } } + parameter_types! { + // This is used to bound number of pools migrating in the runtime upgrade. This is set to + // ~existing_pool_count * 2 to also account for any new pools getting created before the + // migration is actually executed. + pub const MaxPoolsToMigrate: u32 = 500; + } + /// Unreleased migrations. Add new ones here: pub type Unreleased = ( parachains_configuration::migration::v12::MigrateToV12, @@ -1969,6 +2004,11 @@ pub mod migrations { >, CancelAuctions, restore_corrupted_ledgers::Migrate, + // Migrate NominationPools to `DelegateStake` adapter. + pallet_nomination_pools::migration::unversioned::DelegationStakeMigration< + Runtime, + MaxPoolsToMigrate, + >, ); /// Migrations/checks that do not need to be versioned and can run on every update. @@ -2152,7 +2192,7 @@ mod benches { [runtime_parachains::initializer, Initializer] [runtime_parachains::paras, Paras] [runtime_parachains::paras_inherent, ParaInherent] - [runtime_parachains::assigner_on_demand, OnDemand] + [runtime_parachains::on_demand, OnDemand] [runtime_parachains::coretime, Coretime] // Substrate [pallet_bags_list, VoterList] @@ -2303,6 +2343,14 @@ sp_api::impl_runtime_apis! { fn member_needs_delegate_migration(member: AccountId) -> bool { NominationPools::api_member_needs_delegate_migration(member) } + + fn member_total_balance(who: AccountId) -> Balance { + NominationPools::api_member_total_balance(who) + } + + fn pool_balance(pool_id: pallet_nomination_pools::PoolId) -> Balance { + NominationPools::api_pool_balance(pool_id) + } } impl pallet_staking_runtime_api::StakingApi for Runtime { @@ -2510,31 +2558,57 @@ sp_api::impl_runtime_apis! { Beefy::validator_set() } - fn submit_report_equivocation_unsigned_extrinsic( - equivocation_proof: beefy_primitives::DoubleVotingProof< - BlockNumber, - BeefyId, - BeefySignature, - >, - key_owner_proof: beefy_primitives::OpaqueKeyOwnershipProof, + fn generate_key_ownership_proof( + _set_id: beefy_primitives::ValidatorSetId, + authority_id: BeefyId, + ) -> Option { + use codec::Encode; + + Historical::prove((beefy_primitives::KEY_TYPE, authority_id)) + .map(|p| p.encode()) + .map(beefy_primitives::OpaqueKeyOwnershipProof::new) + } + + fn submit_report_double_voting_unsigned_extrinsic( + equivocation_proof: beefy_primitives::DoubleVotingProof, + key_owner_proof: OpaqueValue, ) -> Option<()> { let key_owner_proof = key_owner_proof.decode()?; - Beefy::submit_unsigned_equivocation_report( + Beefy::submit_unsigned_double_voting_report( equivocation_proof, key_owner_proof, ) } - fn generate_key_ownership_proof( - _set_id: beefy_primitives::ValidatorSetId, - authority_id: BeefyId, - ) -> Option { - use codec::Encode; + fn submit_report_fork_voting_unsigned_extrinsic( + equivocation_proof: beefy_primitives::ForkVotingProof, + key_owner_proof: OpaqueKeyOwnershipProof, + ) -> Option<()> { + Beefy::submit_unsigned_fork_voting_report( + equivocation_proof.try_into()?, + key_owner_proof.decode()?, + ) + } - Historical::prove((beefy_primitives::KEY_TYPE, authority_id)) + fn submit_report_future_block_voting_unsigned_extrinsic( + equivocation_proof: beefy_primitives::FutureBlockVotingProof , + key_owner_proof: OpaqueKeyOwnershipProof, + ) -> Option<()> { + Beefy::submit_unsigned_future_block_voting_report( + equivocation_proof, + key_owner_proof.decode()?, + ) + } + + fn generate_ancestry_proof( + prev_block_number: BlockNumber, + best_known_block_number: Option, + ) -> Option { + Mmr::generate_ancestry_proof(prev_block_number, best_known_block_number) .map(|p| p.encode()) - .map(beefy_primitives::OpaqueKeyOwnershipProof::new) + .map(OpaqueKeyOwnershipProof::new) + .ok() } } diff --git a/relay/polkadot/src/weights/mod.rs b/relay/polkadot/src/weights/mod.rs index 190b254db2..15cf054a74 100644 --- a/relay/polkadot/src/weights/mod.rs +++ b/relay/polkadot/src/weights/mod.rs @@ -20,6 +20,7 @@ pub mod frame_system; pub mod pallet_asset_rate; pub mod pallet_bags_list; pub mod pallet_balances; +pub mod pallet_beefy_mmr; pub mod pallet_bounties; pub mod pallet_child_bounties; pub mod pallet_conviction_voting; @@ -46,7 +47,6 @@ pub mod polkadot_runtime_common_claims; pub mod polkadot_runtime_common_crowdloan; pub mod polkadot_runtime_common_paras_registrar; pub mod polkadot_runtime_common_slots; -pub mod runtime_parachains_assigner_on_demand; pub mod runtime_parachains_configuration; pub mod runtime_parachains_coretime; pub mod runtime_parachains_disputes; @@ -54,6 +54,7 @@ pub mod runtime_parachains_disputes_slashing; pub mod runtime_parachains_hrmp; pub mod runtime_parachains_inclusion; pub mod runtime_parachains_initializer; +pub mod runtime_parachains_on_demand; pub mod runtime_parachains_paras; pub mod runtime_parachains_paras_inherent; pub mod xcm; diff --git a/relay/polkadot/src/weights/pallet_beefy_mmr.rs b/relay/polkadot/src/weights/pallet_beefy_mmr.rs new file mode 100644 index 0000000000..e9d893a25f --- /dev/null +++ b/relay/polkadot/src/weights/pallet_beefy_mmr.rs @@ -0,0 +1,32 @@ +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `pallet_balances`. +pub struct WeightInfo(PhantomData); +impl pallet_beefy_mmr::WeightInfo for WeightInfo { + fn extract_validation_context() -> Weight { + Weight::from_parts(0, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + + fn read_peak() -> Weight { + Weight::from_parts(0, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + + fn n_items_proof_is_non_canonical(_: u32, ) -> Weight { + Weight::from_parts(0, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } +} diff --git a/relay/polkadot/src/weights/runtime_parachains_inclusion.rs b/relay/polkadot/src/weights/runtime_parachains_inclusion.rs index eff81604c3..83c8a68c8f 100644 --- a/relay/polkadot/src/weights/runtime_parachains_inclusion.rs +++ b/relay/polkadot/src/weights/runtime_parachains_inclusion.rs @@ -47,26 +47,10 @@ use core::marker::PhantomData; /// Weight functions for `runtime_parachains::inclusion`. pub struct WeightInfo(PhantomData); impl runtime_parachains::inclusion::WeightInfo for WeightInfo { - /// Storage: `MessageQueue::BookStateFor` (r:1 w:1) - /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(55), added: 2530, mode: `MaxEncodedLen`) - /// Storage: `MessageQueue::Pages` (r:1 w:999) - /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65586), added: 68061, mode: `MaxEncodedLen`) - /// Storage: UNKNOWN KEY `0x3a72656c61795f64697370617463685f71756575655f72656d61696e696e675f` (r:0 w:1) - /// Proof: UNKNOWN KEY `0x3a72656c61795f64697370617463685f71756575655f72656d61696e696e675f` (r:0 w:1) - /// Storage: UNKNOWN KEY `0xf5207f03cfdce586301014700e2c2593fad157e461d71fd4c1f936839a5f1f3e` (r:0 w:1) - /// Proof: UNKNOWN KEY `0xf5207f03cfdce586301014700e2c2593fad157e461d71fd4c1f936839a5f1f3e` (r:0 w:1) - /// The range of component `i` is `[1, 1000]`. - fn receive_upward_messages(i: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `65761` - // Estimated: `69051` - // Minimum execution time: 106_550_000 picoseconds. - Weight::from_parts(106_861_000, 0) - .saturating_add(Weight::from_parts(0, 69051)) - // Standard Error: 95_545 - .saturating_add(Weight::from_parts(93_792_355, 0).saturating_mul(i.into())) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(3)) - .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) + fn enact_candidate(_: u32, _: u32, _: u32) -> Weight { + Weight::from_parts(0, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } } diff --git a/relay/polkadot/src/weights/runtime_parachains_assigner_on_demand.rs b/relay/polkadot/src/weights/runtime_parachains_on_demand.rs similarity index 97% rename from relay/polkadot/src/weights/runtime_parachains_assigner_on_demand.rs rename to relay/polkadot/src/weights/runtime_parachains_on_demand.rs index 8f5d832d4d..010726d68e 100644 --- a/relay/polkadot/src/weights/runtime_parachains_assigner_on_demand.rs +++ b/relay/polkadot/src/weights/runtime_parachains_on_demand.rs @@ -46,7 +46,7 @@ use core::marker::PhantomData; /// Weight functions for `runtime_parachains::assigner_on_demand`. pub struct WeightInfo(PhantomData); -impl runtime_parachains::assigner_on_demand::WeightInfo for WeightInfo { +impl runtime_parachains::on_demand::WeightInfo for WeightInfo { /// Storage: `OnDemand::QueueStatus` (r:1 w:1) /// Proof: `OnDemand::QueueStatus` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `System::Account` (r:1 w:1) diff --git a/relay/polkadot/src/weights/runtime_parachains_paras_inherent.rs b/relay/polkadot/src/weights/runtime_parachains_paras_inherent.rs index a381d493b7..b052869c60 100644 --- a/relay/polkadot/src/weights/runtime_parachains_paras_inherent.rs +++ b/relay/polkadot/src/weights/runtime_parachains_paras_inherent.rs @@ -324,4 +324,11 @@ impl runtime_parachains::paras_inherent::WeightInfo for .saturating_add(T::DbWeight::get().reads(31)) .saturating_add(T::DbWeight::get().writes(15)) } + + fn enter_empty() -> Weight { + Weight::from_parts(0, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } } diff --git a/relay/polkadot/src/xcm_config.rs b/relay/polkadot/src/xcm_config.rs index cc77bbe4ab..92b1ffe612 100644 --- a/relay/polkadot/src/xcm_config.rs +++ b/relay/polkadot/src/xcm_config.rs @@ -41,10 +41,9 @@ use xcm_builder::{ AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, ChildParachainAsNative, ChildParachainConvertsVia, DescribeAllTerminal, DescribeFamily, FrameTransactionalProcessor, FungibleAdapter, HashedDescription, IsChildSystemParachain, IsConcrete, MintLocation, - OriginToPluralityVoice, SignedAccountId32AsNative, SignedToAccountId32, + OriginToPluralityVoice, SendXcmFeeToAccount, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, XcmFeeManagerFromComponents, - XcmFeeToAccount, }; parameter_types! { @@ -234,7 +233,7 @@ impl xcm_executor::Config for XcmConfig { type MaxAssetsIntoHolding = MaxAssetsIntoHolding; type FeeManager = XcmFeeManagerFromComponents< WaivedLocations, - XcmFeeToAccount, + SendXcmFeeToAccount, >; // No bridges on the Relay Chain type MessageExporter = (); diff --git a/system-parachains/asset-hubs/asset-hub-kusama/primitives/src/lib.rs b/system-parachains/asset-hubs/asset-hub-kusama/primitives/src/lib.rs index 1fd35fd27a..f2f0b89052 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/primitives/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/primitives/src/lib.rs @@ -46,27 +46,9 @@ frame_support::parameter_types! { /// Some sane weight to execute `xcm::Transact(pallet-xcm-bridge-hub-router::Call::report_bridge_status)`. pub const XcmBridgeHubRouterTransactCallMaxWeight: Weight = Weight::from_parts(200_000_000, 6144); - /// Message that is sent to the sibling Kusama Asset Hub when the with-Polkadot bridge becomes congested. - pub CongestedMessage: Xcm<()> = build_congestion_message(true).into(); - /// Message that is sent to the sibling Kusama Asset Hub when the with-Polkadot bridge becomes uncongested. - pub UncongestedMessage: Xcm<()> = build_congestion_message(false).into(); - /// Should match the `AssetDeposit` of the `ForeignAssets` pallet on Asset Hub. pub const CreateForeignAssetDeposit: u128 = system_para_deposit(1, 190); } -fn build_congestion_message(is_congested: bool) -> sp_std::vec::Vec> { - sp_std::vec![ - UnpaidExecution { weight_limit: Unlimited, check_origin: None }, - Transact { - origin_kind: OriginKind::Xcm, - require_weight_at_most: XcmBridgeHubRouterTransactCallMaxWeight::get(), - call: Call::ToPolkadotXcmRouter(XcmBridgeHubRouterCall::report_bridge_status { - bridge_id: Default::default(), - is_congested, - }) - .encode() - .into(), - } - ] -} +/// Identifier of AssetHubKusama in the Kusama relay chain. +pub const ASSET_HUB_KUSAMA_PARACHAIN_ID: u32 = 1000; diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/genesis_config_presets.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/genesis_config_presets.rs index f092687fe6..7a32b04b16 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/genesis_config_presets.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/genesis_config_presets.rs @@ -56,6 +56,7 @@ fn asset_hub_kusama_genesis( ) }) .collect(), + ..Default::default() }, "polkadotXcm": { "safeXcmVersion": Some(SAFE_XCM_VERSION), diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/impls.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/impls.rs index 68a3bfb318..151ae0c0dd 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/impls.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/impls.rs @@ -23,13 +23,10 @@ pub mod tx_payment { ensure, pallet_prelude::{InvalidTransaction, TransactionValidityError}, traits::{ - fungibles::{Balanced as FungiblesBalanced, Inspect as FungiblesInspect}, tokens::{Fortitude, Precision, Preservation}, Defensive, OnUnbalanced, SameOrOther, }, }; - use pallet_asset_conversion::{Pallet as AssetConversion, SwapCredit}; - use pallet_asset_conversion_tx_payment::OnChargeAssetTransaction; use pallet_transaction_payment::OnChargeTransaction; use sp_core::Get; use sp_runtime::{ @@ -124,180 +121,4 @@ pub mod tx_payment { Ok(()) } } - - type LiquidityInfoOf = - <::OnChargeTransaction as OnChargeTransaction< - T, - >>::LiquidityInfo; - - /// Implements [`OnChargeAssetTransaction`] for [`pallet_asset_conversion_tx_payment`], where - /// the asset class used to pay the fee is defined with the `A` type parameter (eg. DOT - /// location) and accessed via the type implementing the [`frame_support::traits::fungibles`] - /// trait. - pub struct SwapCreditAdapter(PhantomData<(A, S)>); - impl OnChargeAssetTransaction for SwapCreditAdapter - where - A: Get, - S: SwapCredit< - T::AccountId, - Balance = T::Balance, - AssetKind = T::AssetKind, - Credit = fungibles::Credit, - >, - - T: pallet_asset_conversion_tx_payment::Config, - T::Fungibles: - fungibles::Inspect, - T::OnChargeTransaction: - OnChargeTransaction>, - { - type AssetId = T::AssetKind; - type Balance = T::Balance; - type LiquidityInfo = T::Balance; - - fn withdraw_fee( - who: &::AccountId, - _call: &::RuntimeCall, - _dispatch_info: &DispatchInfoOf<::RuntimeCall>, - asset_id: Self::AssetId, - fee: Self::Balance, - _tip: Self::Balance, - ) -> Result<(LiquidityInfoOf, Self::LiquidityInfo, T::Balance), TransactionValidityError> - { - let asset_fee = AssetConversion::::quote_price_tokens_for_exact_tokens( - asset_id.clone(), - A::get(), - fee, - true, - ) - .ok_or(InvalidTransaction::Payment)?; - - let asset_fee_credit = T::Assets::withdraw( - asset_id.clone(), - who, - asset_fee, - Precision::Exact, - Preservation::Preserve, - Fortitude::Polite, - ) - .map_err(|_| TransactionValidityError::from(InvalidTransaction::Payment))?; - - let (fee_credit, change) = match S::swap_tokens_for_exact_tokens( - vec![asset_id, A::get()], - asset_fee_credit, - fee, - ) { - Ok((fee_credit, change)) => (fee_credit, change), - Err((credit_in, _)) => { - // The swap should not error since the price quote was successful. - let _ = T::Assets::resolve(who, credit_in).defensive(); - return Err(InvalidTransaction::Payment.into()) - }, - }; - - // Should be always zero since the exact price was quoted before. - ensure!(change.peek().is_zero(), InvalidTransaction::Payment); - - Ok((Some(fee_credit), fee, asset_fee)) - } - fn correct_and_deposit_fee( - who: &::AccountId, - dispatch_info: &DispatchInfoOf<::RuntimeCall>, - post_info: &PostDispatchInfoOf<::RuntimeCall>, - corrected_fee: Self::Balance, - tip: Self::Balance, - fee_paid: LiquidityInfoOf, - _received_exchanged: Self::LiquidityInfo, - asset_id: Self::AssetId, - initial_asset_consumed: T::Balance, - ) -> Result { - let Some(fee_paid) = fee_paid else { - return Ok(Zero::zero()); - }; - // Try to refund if the fee paid is more than the corrected fee and the account was not - // removed by the dispatched function. - let (fee, fee_in_asset) = if fee_paid.peek() > corrected_fee && - !T::Assets::total_balance(asset_id.clone(), who).is_zero() - { - let refund_amount = fee_paid.peek().saturating_sub(corrected_fee); - // Check if the refund amount can be swapped back into the asset used by `who` for - // fee payment. - let refund_asset_amount = - AssetConversion::::quote_price_exact_tokens_for_tokens( - A::get(), - asset_id.clone(), - refund_amount, - true, - ) - // No refund given if it cannot be swapped back. - .unwrap_or(Zero::zero()); - - // Deposit the refund before the swap to ensure it can be processed. - let debt = match T::Assets::deposit( - asset_id.clone(), - who, - refund_asset_amount, - Precision::BestEffort, - ) { - Ok(debt) => debt, - // No refund given since it cannot be deposited. - Err(_) => fungibles::Debt::::zero(asset_id.clone()), - }; - - if debt.peek().is_zero() { - // No refund given. - (fee_paid, initial_asset_consumed) - } else { - let (refund, fee_paid) = fee_paid.split(refund_amount); - match S::swap_exact_tokens_for_tokens( - vec![A::get(), asset_id], - refund, - Some(refund_asset_amount), - ) { - Ok(refund_asset) => { - match refund_asset.offset(debt) { - Ok(SameOrOther::None) => {}, - // This arm should never be reached, as the amount of `debt` is - // expected to be exactly equal to the amount of `refund_asset` - // credit. - _ => return Err(InvalidTransaction::Payment.into()), - }; - (fee_paid, initial_asset_consumed.saturating_sub(refund_asset_amount)) - }, - // The error should not occur since swap was quoted before. - Err((refund, _)) => { - match T::Assets::settle(who, debt, Preservation::Expendable) { - Ok(dust) => - ensure!(dust.peek().is_zero(), InvalidTransaction::Payment), - // The error should not occur as the `debt` was just withdrawn - // above. - Err(_) => return Err(InvalidTransaction::Payment.into()), - }; - let fee_paid = fee_paid.merge(refund).map_err(|_| { - // The error should never occur since `fee_paid` and `refund` are - // credits of the same asset. - TransactionValidityError::from(InvalidTransaction::Payment) - })?; - (fee_paid, initial_asset_consumed) - }, - } - } - } else { - (fee_paid, initial_asset_consumed) - }; - - // Refund is already processed. - let corrected_fee = fee.peek(); - // Deposit fee. - T::OnChargeTransaction::correct_and_deposit_fee( - who, - dispatch_info, - post_info, - corrected_fee, - tip, - Some(fee), - ) - .map(|_| fee_in_asset) - } - } } diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs index 82e8113d34..97f62dbe5a 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs @@ -62,8 +62,8 @@ use frame_support::{ ord_parameter_types, parameter_types, traits::{ fungible, fungibles, tokens::imbalance::ResolveAssetTo, AsEnsureOriginWithArg, ConstBool, - ConstU128, ConstU32, ConstU64, ConstU8, EitherOfDiverse, Equals, InstanceFilter, - TransformOrigin, WithdrawReasons, + ConstU128, ConstU32, ConstU64, ConstU8, EitherOfDiverse, InstanceFilter, TransformOrigin, + WithdrawReasons, }, weights::{ConstantMultiplier, Weight, WeightToFee as _}, BoundedVec, PalletId, @@ -839,9 +839,13 @@ impl pallet_collator_selection::Config for Runtime { impl pallet_asset_conversion_tx_payment::Config for Runtime { type RuntimeEvent = RuntimeEvent; - type Fungibles = LocalAndForeignAssets; - type OnChargeAssetTransaction = - impls::tx_payment::SwapCreditAdapter; + type AssetId = xcm::latest::Location; + type OnChargeAssetTransaction = pallet_asset_conversion_tx_payment::SwapAssetAdapter< + KsmLocation, + NativeAndAssets, + AssetConversion, + ResolveAssetTo, + >; } parameter_types! { @@ -943,6 +947,7 @@ impl pallet_nfts::Config for Runtime { /// consensus with dynamic fees and back-pressure. pub type ToPolkadotXcmRouterInstance = pallet_xcm_bridge_hub_router::Instance1; impl pallet_xcm_bridge_hub_router::Config for Runtime { + type RuntimeEvent = RuntimeEvent; type WeightInfo = weights::pallet_xcm_bridge_hub_router::WeightInfo; type UniversalLocation = xcm_config::UniversalLocation; @@ -950,25 +955,13 @@ impl pallet_xcm_bridge_hub_router::Config for Runti type Bridges = xcm_config::bridging::NetworkExportTable; type DestinationVersion = PolkadotXcm; - #[cfg(not(feature = "runtime-benchmarks"))] - type BridgeHubOrigin = EnsureXcm>; - #[cfg(feature = "runtime-benchmarks")] - type BridgeHubOrigin = frame_support::traits::EitherOfDiverse< - // for running benchmarks - EnsureRoot, - // for running tests with `--feature runtime-benchmarks` - EnsureXcm>, - >; + type SiblingBridgeHubLocation = xcm_config::bridging::SiblingBridgeHub; type ToBridgeHubSender = XcmpQueue; - type WithBridgeHubChannel = - cumulus_pallet_xcmp_queue::bridging::InAndOutXcmpChannelStatusProvider< - xcm_config::bridging::SiblingBridgeHubParaId, - Runtime, - >; - type ByteFee = xcm_config::bridging::XcmBridgeHubRouterByteFee; type FeeAsset = xcm_config::bridging::XcmBridgeHubRouterFeeAssetId; + type LocalXcmChannelManager = + cumulus_pallet_xcmp_queue::bridging::InAndOutXcmpChannelStatusProvider; } // Create the runtime by composing the FRAME pallets that were previously configured. diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_assets_foreign.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_assets_foreign.rs index c7fe73238e..49584784d7 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_assets_foreign.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_assets_foreign.rs @@ -539,4 +539,11 @@ impl pallet_assets::WeightInfo for WeightInfo { .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } + + fn transfer_all() -> Weight { + Weight::from_parts(0, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } } diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_assets_local.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_assets_local.rs index c84ef577b1..c5236602b7 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_assets_local.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_assets_local.rs @@ -537,4 +537,11 @@ impl pallet_assets::WeightInfo for WeightInfo { .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } + + fn transfer_all() -> Weight { + Weight::from_parts(0, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } } diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_assets_pool.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_assets_pool.rs index f05db207c4..f40154e47d 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_assets_pool.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_assets_pool.rs @@ -535,4 +535,11 @@ impl pallet_assets::WeightInfo for WeightInfo { .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } + + fn transfer_all() -> Weight { + Weight::from_parts(0, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } } diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_xcm_bridge_hub_router.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_xcm_bridge_hub_router.rs index 06b1f47781..b2756ced8c 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_xcm_bridge_hub_router.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_xcm_bridge_hub_router.rs @@ -76,50 +76,4 @@ impl pallet_xcm_bridge_hub_router::WeightInfo for Weigh .saturating_add(Weight::from_parts(0, 5487)) .saturating_add(T::DbWeight::get().reads(2)) } - /// Storage: `ToPolkadotXcmRouter::Bridge` (r:1 w:1) - /// Proof: `ToPolkadotXcmRouter::Bridge` (`max_values`: Some(1), `max_size`: Some(17), added: 512, mode: `MaxEncodedLen`) - fn report_bridge_status() -> Weight { - // Proof Size summary in bytes: - // Measured: `83` - // Estimated: `1502` - // Minimum execution time: 13_020_000 picoseconds. - Weight::from_parts(13_540_000, 0) - .saturating_add(Weight::from_parts(0, 1502)) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) - /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) - /// Storage: UNKNOWN KEY `0x3302afcb67e838a3f960251b417b9a4f` (r:1 w:0) - /// Proof: UNKNOWN KEY `0x3302afcb67e838a3f960251b417b9a4f` (r:1 w:0) - /// Storage: UNKNOWN KEY `0x0973fe64c85043ba1c965cbc38eb63c7` (r:1 w:0) - /// Proof: UNKNOWN KEY `0x0973fe64c85043ba1c965cbc38eb63c7` (r:1 w:0) - /// Storage: `ToPolkadotXcmRouter::Bridge` (r:1 w:1) - /// Proof: `ToPolkadotXcmRouter::Bridge` (`max_values`: Some(1), `max_size`: Some(17), added: 512, mode: `MaxEncodedLen`) - /// Storage: `XcmpQueue::DeliveryFeeFactor` (r:1 w:0) - /// Proof: `XcmpQueue::DeliveryFeeFactor` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) - /// Storage: `PolkadotXcm::SupportedVersion` (r:2 w:0) - /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) - /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) - /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ParachainSystem::RelevantMessagingState` (r:1 w:0) - /// Proof: `ParachainSystem::RelevantMessagingState` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:1) - /// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: Some(1282), added: 1777, mode: `MaxEncodedLen`) - /// Storage: `XcmpQueue::InboundXcmpSuspended` (r:1 w:0) - /// Proof: `XcmpQueue::InboundXcmpSuspended` (`max_values`: Some(1), `max_size`: Some(4002), added: 4497, mode: `MaxEncodedLen`) - /// Storage: `XcmpQueue::OutboundXcmpMessages` (r:0 w:1) - /// Proof: `XcmpQueue::OutboundXcmpMessages` (`max_values`: None, `max_size`: Some(105506), added: 107981, mode: `MaxEncodedLen`) - fn send_message() -> Weight { - // Proof Size summary in bytes: - // Measured: `453` - // Estimated: `6393` - // Minimum execution time: 60_041_000 picoseconds. - Weight::from_parts(61_231_000, 0) - .saturating_add(Weight::from_parts(0, 6393)) - .saturating_add(T::DbWeight::get().reads(12)) - .saturating_add(T::DbWeight::get().writes(4)) - } } diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs index 0ab78671eb..4380ba988b 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/xcm_config.rs @@ -49,10 +49,10 @@ use xcm_builder::{ DenyThenTry, DescribeAllTerminal, DescribeFamily, EnsureXcmOrigin, FrameTransactionalProcessor, FungibleAdapter, FungiblesAdapter, GlobalConsensusParachainConvertsFor, HashedDescription, IsConcrete, LocalMint, NoChecking, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, - SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, - SignedToAccountId32, SovereignSignedViaLocation, StartsWith, StartsWithExplicitGlobalConsensus, - TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, - WithUniqueTopic, XcmFeeManagerFromComponents, XcmFeeToAccount, + SendXcmFeeToAccount, SiblingParachainAsNative, SiblingParachainConvertsVia, + SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, StartsWith, + StartsWithExplicitGlobalConsensus, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, + WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, XcmFeeManagerFromComponents, }; use xcm_executor::{traits::ConvertLocation, XcmExecutor}; @@ -381,7 +381,7 @@ impl xcm_executor::Config for XcmConfig { type AssetExchanger = (); type FeeManager = XcmFeeManagerFromComponents< WaivedLocations, - XcmFeeToAccount, + SendXcmFeeToAccount, >; type MessageExporter = (); type UniversalAliases = (bridging::to_polkadot::UniversalAliases,); @@ -522,7 +522,7 @@ pub mod bridging { [ GlobalConsensus(PolkadotNetwork::get()), Parachain(polkadot_runtime_constants::system_parachain::ASSET_HUB_ID), - ], + ], ); /// Set up exporters configuration. diff --git a/system-parachains/asset-hubs/asset-hub-kusama/tests/tests.rs b/system-parachains/asset-hubs/asset-hub-kusama/tests/tests.rs index 13907fa8e1..7e44cb1944 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/tests/tests.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/tests/tests.rs @@ -27,7 +27,7 @@ use asset_hub_kusama_runtime::{ AllPalletsWithoutSystem, AssetConversion, AssetDeposit, Assets, Balances, ExistentialDeposit, ForeignAssets, ForeignAssetsInstance, MetadataDepositBase, MetadataDepositPerByte, ParachainSystem, PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, SessionKeys, - ToPolkadotXcmRouterInstance, TrustBackedAssetsInstance, XcmpQueue, SLOT_DURATION, + TrustBackedAssetsInstance, XcmpQueue, SLOT_DURATION, }; use asset_test_utils::{ test_cases_over_bridge::TestBridgingConfig, CollatorSessionKey, CollatorSessionKeys, ExtBuilder, @@ -588,61 +588,6 @@ fn reserve_transfer_native_asset_to_non_teleport_para_works() { ); } -#[test] -fn report_bridge_status_from_xcm_bridge_router_for_polkadot_works() { - asset_test_utils::test_cases_over_bridge::report_bridge_status_from_xcm_bridge_router_works::< - Runtime, - AllPalletsWithoutSystem, - XcmConfig, - LocationToAccountId, - ToPolkadotXcmRouterInstance, - >( - collator_session_keys(), - bridging_to_asset_hub_polkadot, - || Decode::decode(&mut &bp_asset_hub_kusama::CongestedMessage::get().encode()[..]).unwrap(), - || { - Decode::decode(&mut &bp_asset_hub_kusama::UncongestedMessage::get().encode()[..]) - .unwrap() - }, - ) -} - -#[test] -fn test_report_bridge_status_call_compatibility() { - // if this test fails, make sure `bp_asset_hub_polkadot` has valid encoding - assert_eq!( - RuntimeCall::ToPolkadotXcmRouter( - pallet_xcm_bridge_hub_router::Call::report_bridge_status { - bridge_id: Default::default(), - is_congested: true, - } - ) - .encode(), - bp_asset_hub_kusama::Call::ToPolkadotXcmRouter( - bp_asset_hub_kusama::XcmBridgeHubRouterCall::report_bridge_status { - bridge_id: Default::default(), - is_congested: true, - } - ) - .encode() - ) -} - -#[test] -fn check_sane_weight_report_bridge_status() { - use pallet_xcm_bridge_hub_router::WeightInfo; - let actual = >::WeightInfo::report_bridge_status(); - let max_weight = bp_asset_hub_kusama::XcmBridgeHubRouterTransactCallMaxWeight::get(); - assert!( - actual.all_lte(max_weight), - "max_weight: {:?} should be adjusted to actual {:?}", - max_weight, - actual - ); -} - #[test] fn change_xcm_bridge_hub_router_base_fee_by_governance_works() { asset_test_utils::test_cases::change_storage_constant_by_governance_works::< diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/primitives/src/lib.rs b/system-parachains/asset-hubs/asset-hub-polkadot/primitives/src/lib.rs index 7d2a7f1e15..8a8916a86f 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/primitives/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/primitives/src/lib.rs @@ -46,27 +46,9 @@ frame_support::parameter_types! { /// Some sane weight to execute `xcm::Transact(pallet-xcm-bridge-hub-router::Call::report_bridge_status)`. pub const XcmBridgeHubRouterTransactCallMaxWeight: Weight = Weight::from_parts(200_000_000, 6144); - /// Message that is sent to the sibling Kusama Asset Hub when the with-Polkadot bridge becomes congested. - pub CongestedMessage: Xcm<()> = build_congestion_message(true).into(); - /// Message that is sent to the sibling Kusama Asset Hub when the with-Polkadot bridge becomes uncongested. - pub UncongestedMessage: Xcm<()> = build_congestion_message(false).into(); - /// Should match the `AssetDeposit` of the `ForeignAssets` pallet on Asset Hub. pub const CreateForeignAssetDeposit: u128 = system_para_deposit(1, 190); } -fn build_congestion_message(is_congested: bool) -> sp_std::vec::Vec> { - sp_std::vec![ - UnpaidExecution { weight_limit: Unlimited, check_origin: None }, - Transact { - origin_kind: OriginKind::Xcm, - require_weight_at_most: XcmBridgeHubRouterTransactCallMaxWeight::get(), - call: Call::ToKusamaXcmRouter(XcmBridgeHubRouterCall::report_bridge_status { - bridge_id: Default::default(), - is_congested, - }) - .encode() - .into(), - } - ] -} +/// Identifier of AssetHubPolkadot in the Polkadot relay chain. +pub const ASSET_HUB_POLKADOT_PARACHAIN_ID: u32 = 1000; diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/genesis_config_presets.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/genesis_config_presets.rs index 4d60c808d8..bfac3eb01a 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/genesis_config_presets.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/genesis_config_presets.rs @@ -72,6 +72,7 @@ fn asset_hub_polkadot_genesis( ) }) .collect(), + ..Default::default() }, "polkadotXcm": { "safeXcmVersion": Some(SAFE_XCM_VERSION), diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/impls.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/impls.rs index 68a3bfb318..151ae0c0dd 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/impls.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/impls.rs @@ -23,13 +23,10 @@ pub mod tx_payment { ensure, pallet_prelude::{InvalidTransaction, TransactionValidityError}, traits::{ - fungibles::{Balanced as FungiblesBalanced, Inspect as FungiblesInspect}, tokens::{Fortitude, Precision, Preservation}, Defensive, OnUnbalanced, SameOrOther, }, }; - use pallet_asset_conversion::{Pallet as AssetConversion, SwapCredit}; - use pallet_asset_conversion_tx_payment::OnChargeAssetTransaction; use pallet_transaction_payment::OnChargeTransaction; use sp_core::Get; use sp_runtime::{ @@ -124,180 +121,4 @@ pub mod tx_payment { Ok(()) } } - - type LiquidityInfoOf = - <::OnChargeTransaction as OnChargeTransaction< - T, - >>::LiquidityInfo; - - /// Implements [`OnChargeAssetTransaction`] for [`pallet_asset_conversion_tx_payment`], where - /// the asset class used to pay the fee is defined with the `A` type parameter (eg. DOT - /// location) and accessed via the type implementing the [`frame_support::traits::fungibles`] - /// trait. - pub struct SwapCreditAdapter(PhantomData<(A, S)>); - impl OnChargeAssetTransaction for SwapCreditAdapter - where - A: Get, - S: SwapCredit< - T::AccountId, - Balance = T::Balance, - AssetKind = T::AssetKind, - Credit = fungibles::Credit, - >, - - T: pallet_asset_conversion_tx_payment::Config, - T::Fungibles: - fungibles::Inspect, - T::OnChargeTransaction: - OnChargeTransaction>, - { - type AssetId = T::AssetKind; - type Balance = T::Balance; - type LiquidityInfo = T::Balance; - - fn withdraw_fee( - who: &::AccountId, - _call: &::RuntimeCall, - _dispatch_info: &DispatchInfoOf<::RuntimeCall>, - asset_id: Self::AssetId, - fee: Self::Balance, - _tip: Self::Balance, - ) -> Result<(LiquidityInfoOf, Self::LiquidityInfo, T::Balance), TransactionValidityError> - { - let asset_fee = AssetConversion::::quote_price_tokens_for_exact_tokens( - asset_id.clone(), - A::get(), - fee, - true, - ) - .ok_or(InvalidTransaction::Payment)?; - - let asset_fee_credit = T::Assets::withdraw( - asset_id.clone(), - who, - asset_fee, - Precision::Exact, - Preservation::Preserve, - Fortitude::Polite, - ) - .map_err(|_| TransactionValidityError::from(InvalidTransaction::Payment))?; - - let (fee_credit, change) = match S::swap_tokens_for_exact_tokens( - vec![asset_id, A::get()], - asset_fee_credit, - fee, - ) { - Ok((fee_credit, change)) => (fee_credit, change), - Err((credit_in, _)) => { - // The swap should not error since the price quote was successful. - let _ = T::Assets::resolve(who, credit_in).defensive(); - return Err(InvalidTransaction::Payment.into()) - }, - }; - - // Should be always zero since the exact price was quoted before. - ensure!(change.peek().is_zero(), InvalidTransaction::Payment); - - Ok((Some(fee_credit), fee, asset_fee)) - } - fn correct_and_deposit_fee( - who: &::AccountId, - dispatch_info: &DispatchInfoOf<::RuntimeCall>, - post_info: &PostDispatchInfoOf<::RuntimeCall>, - corrected_fee: Self::Balance, - tip: Self::Balance, - fee_paid: LiquidityInfoOf, - _received_exchanged: Self::LiquidityInfo, - asset_id: Self::AssetId, - initial_asset_consumed: T::Balance, - ) -> Result { - let Some(fee_paid) = fee_paid else { - return Ok(Zero::zero()); - }; - // Try to refund if the fee paid is more than the corrected fee and the account was not - // removed by the dispatched function. - let (fee, fee_in_asset) = if fee_paid.peek() > corrected_fee && - !T::Assets::total_balance(asset_id.clone(), who).is_zero() - { - let refund_amount = fee_paid.peek().saturating_sub(corrected_fee); - // Check if the refund amount can be swapped back into the asset used by `who` for - // fee payment. - let refund_asset_amount = - AssetConversion::::quote_price_exact_tokens_for_tokens( - A::get(), - asset_id.clone(), - refund_amount, - true, - ) - // No refund given if it cannot be swapped back. - .unwrap_or(Zero::zero()); - - // Deposit the refund before the swap to ensure it can be processed. - let debt = match T::Assets::deposit( - asset_id.clone(), - who, - refund_asset_amount, - Precision::BestEffort, - ) { - Ok(debt) => debt, - // No refund given since it cannot be deposited. - Err(_) => fungibles::Debt::::zero(asset_id.clone()), - }; - - if debt.peek().is_zero() { - // No refund given. - (fee_paid, initial_asset_consumed) - } else { - let (refund, fee_paid) = fee_paid.split(refund_amount); - match S::swap_exact_tokens_for_tokens( - vec![A::get(), asset_id], - refund, - Some(refund_asset_amount), - ) { - Ok(refund_asset) => { - match refund_asset.offset(debt) { - Ok(SameOrOther::None) => {}, - // This arm should never be reached, as the amount of `debt` is - // expected to be exactly equal to the amount of `refund_asset` - // credit. - _ => return Err(InvalidTransaction::Payment.into()), - }; - (fee_paid, initial_asset_consumed.saturating_sub(refund_asset_amount)) - }, - // The error should not occur since swap was quoted before. - Err((refund, _)) => { - match T::Assets::settle(who, debt, Preservation::Expendable) { - Ok(dust) => - ensure!(dust.peek().is_zero(), InvalidTransaction::Payment), - // The error should not occur as the `debt` was just withdrawn - // above. - Err(_) => return Err(InvalidTransaction::Payment.into()), - }; - let fee_paid = fee_paid.merge(refund).map_err(|_| { - // The error should never occur since `fee_paid` and `refund` are - // credits of the same asset. - TransactionValidityError::from(InvalidTransaction::Payment) - })?; - (fee_paid, initial_asset_consumed) - }, - } - } - } else { - (fee_paid, initial_asset_consumed) - }; - - // Refund is already processed. - let corrected_fee = fee.peek(); - // Deposit fee. - T::OnChargeTransaction::correct_and_deposit_fee( - who, - dispatch_info, - post_info, - corrected_fee, - tip, - Some(fee), - ) - .map(|_| fee_in_asset) - } - } } diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs index e6760f29b0..c0898617be 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs @@ -100,7 +100,7 @@ use frame_support::{ parameter_types, traits::{ fungible, fungibles, tokens::imbalance::ResolveAssetTo, AsEnsureOriginWithArg, ConstBool, - ConstU32, ConstU64, ConstU8, EitherOfDiverse, Equals, InstanceFilter, NeverEnsureOrigin, + ConstU32, ConstU64, ConstU8, EitherOfDiverse, InstanceFilter, NeverEnsureOrigin, TransformOrigin, WithdrawReasons, }, weights::{ConstantMultiplier, Weight, WeightToFee as _}, @@ -764,9 +764,13 @@ impl pallet_collator_selection::Config for Runtime { impl pallet_asset_conversion_tx_payment::Config for Runtime { type RuntimeEvent = RuntimeEvent; - type Fungibles = LocalAndForeignAssets; - type OnChargeAssetTransaction = - impls::tx_payment::SwapCreditAdapter; + type AssetId = xcm::latest::Location; + type OnChargeAssetTransaction = pallet_asset_conversion_tx_payment::SwapAssetAdapter< + DotLocation, + NativeAndAssets, + AssetConversion, + ResolveAssetTo, + >; } parameter_types! { @@ -842,6 +846,7 @@ impl pallet_nfts::Config for Runtime { /// consensus with dynamic fees and back-pressure. pub type ToKusamaXcmRouterInstance = pallet_xcm_bridge_hub_router::Instance1; impl pallet_xcm_bridge_hub_router::Config for Runtime { + type RuntimeEvent = RuntimeEvent; type WeightInfo = weights::pallet_xcm_bridge_hub_router::WeightInfo; type UniversalLocation = xcm_config::UniversalLocation; @@ -849,25 +854,14 @@ impl pallet_xcm_bridge_hub_router::Config for Runtime type Bridges = xcm_config::bridging::NetworkExportTable; type DestinationVersion = PolkadotXcm; - #[cfg(not(feature = "runtime-benchmarks"))] - type BridgeHubOrigin = EnsureXcm>; - #[cfg(feature = "runtime-benchmarks")] - type BridgeHubOrigin = frame_support::traits::EitherOfDiverse< - // for running benchmarks - EnsureRoot, - // for running tests with `--feature runtime-benchmarks` - EnsureXcm>, - >; + type SiblingBridgeHubLocation = xcm_config::bridging::SiblingBridgeHub; type ToBridgeHubSender = XcmpQueue; - type WithBridgeHubChannel = - cumulus_pallet_xcmp_queue::bridging::InAndOutXcmpChannelStatusProvider< - xcm_config::bridging::SiblingBridgeHubParaId, - Runtime, - >; type ByteFee = xcm_config::bridging::XcmBridgeHubRouterByteFee; type FeeAsset = xcm_config::bridging::XcmBridgeHubRouterFeeAssetId; + type LocalXcmChannelManager = + cumulus_pallet_xcmp_queue::bridging::InAndOutXcmpChannelStatusProvider; } pub type PoolAssetsInstance = pallet_assets::Instance3; diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_assets_foreign.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_assets_foreign.rs index 89dec61252..61ce70ecdb 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_assets_foreign.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_assets_foreign.rs @@ -539,4 +539,11 @@ impl pallet_assets::WeightInfo for WeightInfo { .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } + + fn transfer_all() -> Weight { + Weight::from_parts(0, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } } diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_assets_local.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_assets_local.rs index fb7936a26d..4711b0f436 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_assets_local.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_assets_local.rs @@ -537,4 +537,11 @@ impl pallet_assets::WeightInfo for WeightInfo { .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } + + fn transfer_all() -> Weight { + Weight::from_parts(0, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } } diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_assets_pool.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_assets_pool.rs index 9865f43ce4..9c7859b6da 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_assets_pool.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_assets_pool.rs @@ -529,4 +529,11 @@ impl pallet_assets::WeightInfo for WeightInfo { .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } + + fn transfer_all() -> Weight { + Weight::from_parts(0, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } } diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_xcm_bridge_hub_router.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_xcm_bridge_hub_router.rs index 0c6ec990df..3f458272a9 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_xcm_bridge_hub_router.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_xcm_bridge_hub_router.rs @@ -76,50 +76,4 @@ impl pallet_xcm_bridge_hub_router::WeightInfo for Weigh .saturating_add(Weight::from_parts(0, 5487)) .saturating_add(T::DbWeight::get().reads(2)) } - /// Storage: `ToKusamaXcmRouter::Bridge` (r:1 w:1) - /// Proof: `ToKusamaXcmRouter::Bridge` (`max_values`: Some(1), `max_size`: Some(17), added: 512, mode: `MaxEncodedLen`) - fn report_bridge_status() -> Weight { - // Proof Size summary in bytes: - // Measured: `150` - // Estimated: `1502` - // Minimum execution time: 12_570_000 picoseconds. - Weight::from_parts(12_960_000, 0) - .saturating_add(Weight::from_parts(0, 1502)) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) - /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) - /// Storage: UNKNOWN KEY `0x3302afcb67e838a3f960251b417b9a4f` (r:1 w:0) - /// Proof: UNKNOWN KEY `0x3302afcb67e838a3f960251b417b9a4f` (r:1 w:0) - /// Storage: UNKNOWN KEY `0x0973fe64c85043ba1c965cbc38eb63c7` (r:1 w:0) - /// Proof: UNKNOWN KEY `0x0973fe64c85043ba1c965cbc38eb63c7` (r:1 w:0) - /// Storage: `ToKusamaXcmRouter::Bridge` (r:1 w:1) - /// Proof: `ToKusamaXcmRouter::Bridge` (`max_values`: Some(1), `max_size`: Some(17), added: 512, mode: `MaxEncodedLen`) - /// Storage: `XcmpQueue::DeliveryFeeFactor` (r:1 w:0) - /// Proof: `XcmpQueue::DeliveryFeeFactor` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) - /// Storage: `PolkadotXcm::SupportedVersion` (r:2 w:0) - /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) - /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) - /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `ParachainSystem::RelevantMessagingState` (r:1 w:0) - /// Proof: `ParachainSystem::RelevantMessagingState` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:1) - /// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: Some(1282), added: 1777, mode: `MaxEncodedLen`) - /// Storage: `XcmpQueue::InboundXcmpSuspended` (r:1 w:0) - /// Proof: `XcmpQueue::InboundXcmpSuspended` (`max_values`: Some(1), `max_size`: Some(4002), added: 4497, mode: `MaxEncodedLen`) - /// Storage: `XcmpQueue::OutboundXcmpMessages` (r:0 w:1) - /// Proof: `XcmpQueue::OutboundXcmpMessages` (`max_values`: None, `max_size`: Some(105506), added: 107981, mode: `MaxEncodedLen`) - fn send_message() -> Weight { - // Proof Size summary in bytes: - // Measured: `486` - // Estimated: `6426` - // Minimum execution time: 59_481_000 picoseconds. - Weight::from_parts(60_690_000, 0) - .saturating_add(Weight::from_parts(0, 6426)) - .saturating_add(T::DbWeight::get().reads(12)) - .saturating_add(T::DbWeight::get().writes(4)) - } } diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs index a485abd6cb..8b8fc4b9dc 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/xcm_config.rs @@ -50,11 +50,11 @@ use xcm_builder::{ DenyThenTry, DescribeAllTerminal, DescribeFamily, EnsureXcmOrigin, FrameTransactionalProcessor, FungibleAdapter, FungiblesAdapter, GlobalConsensusParachainConvertsFor, HashedDescription, IsConcrete, LocalMint, NoChecking, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, - SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, - SignedToAccountId32, SovereignPaidRemoteExporter, SovereignSignedViaLocation, StartsWith, - StartsWithExplicitGlobalConsensus, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, - WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, XcmFeeManagerFromComponents, - XcmFeeToAccount, + SendXcmFeeToAccount, SiblingParachainAsNative, SiblingParachainConvertsVia, + SignedAccountId32AsNative, SignedToAccountId32, SovereignPaidRemoteExporter, + SovereignSignedViaLocation, StartsWith, StartsWithExplicitGlobalConsensus, TakeWeightCredit, + TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, + XcmFeeManagerFromComponents, }; use xcm_executor::{traits::ConvertLocation, XcmExecutor}; @@ -446,7 +446,7 @@ impl xcm_executor::Config for XcmConfig { type AssetExchanger = (); type FeeManager = XcmFeeManagerFromComponents< WaivedLocations, - XcmFeeToAccount, + SendXcmFeeToAccount, >; type MessageExporter = (); type UniversalAliases = diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/tests/tests.rs b/system-parachains/asset-hubs/asset-hub-polkadot/tests/tests.rs index 4cb83a2b0d..b03bf05954 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/tests/tests.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/tests/tests.rs @@ -27,7 +27,7 @@ use asset_hub_polkadot_runtime::{ AllPalletsWithoutSystem, AssetConversion, AssetDeposit, Assets, Balances, ExistentialDeposit, ForeignAssets, ForeignAssetsInstance, MetadataDepositBase, MetadataDepositPerByte, ParachainSystem, PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, SessionKeys, - ToKusamaXcmRouterInstance, TrustBackedAssetsInstance, XcmpQueue, SLOT_DURATION, + TrustBackedAssetsInstance, XcmpQueue, SLOT_DURATION, }; use asset_test_utils::{ test_cases_over_bridge::TestBridgingConfig, CollatorSessionKey, CollatorSessionKeys, ExtBuilder, @@ -585,62 +585,6 @@ fn reserve_transfer_native_asset_to_non_teleport_para_works() { ); } -#[test] -fn report_bridge_status_from_xcm_bridge_router_for_kusama_works() { - asset_test_utils::test_cases_over_bridge::report_bridge_status_from_xcm_bridge_router_works::< - Runtime, - AllPalletsWithoutSystem, - XcmConfig, - LocationToAccountId, - ToKusamaXcmRouterInstance, - >( - collator_session_keys(), - bridging_to_asset_hub_kusama, - || { - Decode::decode(&mut &bp_asset_hub_polkadot::CongestedMessage::get().encode()[..]) - .unwrap() - }, - || { - Decode::decode(&mut &bp_asset_hub_polkadot::UncongestedMessage::get().encode()[..]) - .unwrap() - }, - ) -} - -#[test] -fn test_report_bridge_status_call_compatibility() { - // if this test fails, make sure `bp_asset_hub_kusama` has valid encoding - assert_eq!( - RuntimeCall::ToKusamaXcmRouter(pallet_xcm_bridge_hub_router::Call::report_bridge_status { - bridge_id: Default::default(), - is_congested: true, - }) - .encode(), - bp_asset_hub_polkadot::Call::ToKusamaXcmRouter( - bp_asset_hub_polkadot::XcmBridgeHubRouterCall::report_bridge_status { - bridge_id: Default::default(), - is_congested: true, - } - ) - .encode() - ) -} - -#[test] -fn check_sane_weight_report_bridge_status() { - use pallet_xcm_bridge_hub_router::WeightInfo; - let actual = >::WeightInfo::report_bridge_status(); - let max_weight = bp_asset_hub_polkadot::XcmBridgeHubRouterTransactCallMaxWeight::get(); - assert!( - actual.all_lte(max_weight), - "max_weight: {:?} should be adjusted to actual {:?}", - max_weight, - actual - ); -} - #[test] fn change_xcm_bridge_hub_router_base_fee_by_governance_works() { asset_test_utils::test_cases::change_storage_constant_by_governance_works::< diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml b/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml index f0a8a0bb39..e61468c8de 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml @@ -96,6 +96,8 @@ bp-relayers = { workspace = true } bp-runtime = { workspace = true } bp-kusama = { workspace = true } bp-polkadot = { workspace = true } +bp-xcm-bridge-hub = { workspace = true } +bp-xcm-bridge-hub-router = { workspace = true } bridge-hub-common = { workspace = true } bridge-runtime-common = { workspace = true } pallet-bridge-grandpa = { workspace = true } @@ -109,6 +111,7 @@ bridge-hub-test-utils = { workspace = true } bridge-runtime-common = { features = [ "integrity-test", ], workspace = true, default-features = true } +pallet-bridge-relayers = { workspace = true, features = ["integrity-test"] } sp-keyring = { workspace = true } static_assertions = { workspace = true } parachains-runtimes-test-utils = { workspace = true } @@ -128,6 +131,8 @@ std = [ "bp-polkadot/std", "bp-relayers/std", "bp-runtime/std", + "bp-xcm-bridge-hub-router/std", + "bp-xcm-bridge-hub/std", "bridge-hub-common/std", "bridge-runtime-common/std", "codec/std", diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/primitives/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/primitives/src/lib.rs index 9d7981d46b..714c92f985 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/primitives/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/primitives/src/lib.rs @@ -28,7 +28,7 @@ use frame_support::{ dispatch::DispatchClass, sp_runtime::{MultiAddress, MultiSigner}, }; -use sp_runtime::{FixedPointNumber, FixedU128, RuntimeDebug, Saturating}; +use sp_runtime::{FixedPointNumber, FixedU128, RuntimeDebug, Saturating, StateVersion}; /// BridgeHubKusama parachain. #[derive(RuntimeDebug)] @@ -36,6 +36,7 @@ pub struct BridgeHubKusama; impl Chain for BridgeHubKusama { const ID: ChainId = *b"bhks"; + const STATE_VERSION: StateVersion = StateVersion::V1; type BlockNumber = BlockNumber; type Hash = Hash; @@ -93,7 +94,7 @@ pub const WITH_BRIDGE_HUB_KUSAMA_RELAYERS_PALLET_NAME: &str = "BridgeRelayers"; pub const WITH_BRIDGE_KUSAMA_TO_POLKADOT_MESSAGES_PALLET_INDEX: u8 = 53; decl_bridge_finality_runtime_apis!(bridge_hub_kusama); -decl_bridge_messages_runtime_apis!(bridge_hub_kusama); +decl_bridge_messages_runtime_apis!(bridge_hub_kusama, LegacyLaneId); frame_support::parameter_types! { /// The XCM fee that is paid for executing XCM program (with `ExportMessage` instruction) at the Kusama @@ -103,11 +104,11 @@ frame_support::parameter_types! { /// Transaction fee that is paid at the Kusama BridgeHub for delivering single inbound message. /// (initially was calculated by test `BridgeHubKusama::can_calculate_fee_for_complex_message_delivery_transaction` + `33%`) - pub const BridgeHubKusamaBaseDeliveryFeeInKsms: u128 = 3_140_827_287; + pub const BridgeHubKusamaBaseDeliveryFeeInKsms: u128 = 3_142_112_953; /// Transaction fee that is paid at the Kusama BridgeHub for delivering single outbound message confirmation. /// (initially was calculated by test `BridgeHubKusama::can_calculate_fee_for_complex_message_confirmation_transaction` + `33%`) - pub const BridgeHubKusamaBaseConfirmationFeeInKsms: u128 = 574_592_739; + pub const BridgeHubKusamaBaseConfirmationFeeInKsms: u128 = 575_036_072; } /// Compute the total estimated fee that needs to be paid in KSMs by the sender when sending diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/bridge_to_polkadot_config.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/bridge_to_polkadot_config.rs index b1662459bf..583053c990 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/bridge_to_polkadot_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/bridge_to_polkadot_config.rs @@ -20,35 +20,31 @@ use crate::{ weights, xcm_config::{UniversalLocation, XcmRouter}, AccountId, Balance, Balances, BlockNumber, BridgePolkadotMessages, PolkadotXcm, Runtime, - RuntimeEvent, RuntimeOrigin, XcmOverBridgeHubPolkadot, + RuntimeEvent, RuntimeHoldReason, XcmOverBridgeHubPolkadot, +}; +use bp_messages::{ + source_chain::FromBridgedChainMessagesDeliveryProof, + target_chain::FromBridgedChainMessagesProof, LegacyLaneId, }; -use bp_messages::LaneId; use bp_parachains::SingleParaStoredHeaderDataBuilder; use bp_runtime::Chain; -use bridge_runtime_common::{ - extensions::refund_relayer_extension::{ - ActualFeeRefund, RefundBridgedParachainMessages, RefundSignedExtensionAdapter, - RefundableMessagesLane, RefundableParachain, - }, - messages, - messages::{ - source::{FromBridgedChainMessagesDeliveryProof, TargetHeaderChainAdapter}, - target::{FromBridgedChainMessagesProof, SourceHeaderChainAdapter}, - MessageBridge, ThisChainWithMessages, UnderlyingChainProvider, - }, - messages_xcm_extension::{ - SenderAndLane, XcmAsPlainPayload, XcmBlobHauler, XcmBlobHaulerAdapter, - XcmBlobMessageDispatch, XcmVersionOfDestAndRemoteBridge, - }, +use bridge_hub_common::xcm_version::XcmVersionOfDestAndRemoteBridge; +use frame_support::{ + parameter_types, + traits::{ConstU128, PalletInfoAccess}, }; -use frame_support::{parameter_types, traits::PalletInfoAccess}; +use frame_system::{EnsureNever, EnsureRoot}; use kusama_runtime_constants as constants; -use sp_runtime::{traits::ConstU32, RuntimeDebug}; +use pallet_bridge_messages::LaneIdOf; +use pallet_bridge_relayers::extension::{ + BridgeRelayersSignedExtension, WithMessagesExtensionConfig, +}; +use pallet_xcm_bridge_hub::XcmAsPlainPayload; +use parachains_common::xcm_config::{AllSiblingSystemParachains, RelayOrOtherSystemParachains}; +use polkadot_parachain_primitives::primitives::Sibling; +use sp_runtime::traits::ConstU32; use xcm::latest::prelude::*; -use xcm_builder::BridgeBlobDispatcher; - -/// Lane identifier, used to connect Kusama Asset Hub and Polkadot Asset Hub. -pub const XCM_LANE_FOR_ASSET_HUB_KUSAMA_TO_ASSET_HUB_POLKADOT: LaneId = LaneId([0, 0, 0, 1]); +use xcm_builder::{BridgeBlobDispatcher, ParentIsPreset, SiblingParachainConvertsVia}; // Parameters that may be changed by the governance. parameter_types! { @@ -80,10 +76,10 @@ parameter_types! { /// Interior location (relative to this runtime) of the with-Polkadot messages pallet. pub BridgeKusamaToPolkadotMessagesPalletInstance: InteriorLocation = PalletInstance(::index() as u8).into(); + /// Identifier of the sibling Polkadot Asset Hub parachain. + pub AssetHubPolkadotParaId: cumulus_primitives_core::ParaId = polkadot_runtime_constants::system_parachain::ASSET_HUB_ID.into(); /// Identifier of the sibling Kusama Asset Hub parachain. pub AssetHubKusamaParaId: cumulus_primitives_core::ParaId = kusama_runtime_constants::system_parachain::ASSET_HUB_ID.into(); - /// Identifier of the bridged Polkadot Asset Hub parachain. - pub AssetHubPolkadotParaId: cumulus_primitives_core::ParaId = polkadot_runtime_constants::system_parachain::ASSET_HUB_ID.into(); /// Location of the bridged Polkadot Bridge Hub parachain. pub BridgeHubPolkadotLocation: Location = Location { parents: 2, @@ -92,28 +88,28 @@ parameter_types! { Parachain(::PARACHAIN_ID) ].into() }; +} - /// A route (XCM location and bridge lane) that the Kusama Asset Hub -> Polkadot Asset Hub - /// message is following. - pub FromAssetHubKusamaToAssetHubPolkadotRoute: SenderAndLane = SenderAndLane::new( - ParentThen(Parachain(AssetHubKusamaParaId::get().into()).into()).into(), - XCM_LANE_FOR_ASSET_HUB_KUSAMA_TO_ASSET_HUB_POLKADOT, - ); - - /// Lane identifier, used to connect Kusama Asset Hub and Polkadot Asset Hub. - pub const AssetHubKusamaToAssetHubPolkadotMessagesLane: bp_messages::LaneId - = XCM_LANE_FOR_ASSET_HUB_KUSAMA_TO_ASSET_HUB_POLKADOT; - /// All active lanes that the current bridge supports. - pub ActiveOutboundLanesToBridgeHubPolkadot: &'static [bp_messages::LaneId] - = &[XCM_LANE_FOR_ASSET_HUB_KUSAMA_TO_ASSET_HUB_POLKADOT]; - - /// Lanes - pub ActiveLanes: sp_std::vec::Vec<(SenderAndLane, (NetworkId, InteriorLocation))> = sp_std::vec![ - ( - FromAssetHubKusamaToAssetHubPolkadotRoute::get(), - (PolkadotGlobalConsensusNetwork::get(), Parachain(AssetHubPolkadotParaId::get().into()).into()) - ) - ]; +pub type RelayersForLegacyLaneIdsMessagesInstance = (); +/// Allows collect and claim rewards for relayers. +impl pallet_bridge_relayers::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type Reward = Balance; + type PaymentProcedure = bp_relayers::PayRewardFromAccount< + pallet_balances::Pallet, + AccountId, + Self::LaneId, + >; + type StakeAndSlash = pallet_bridge_relayers::StakeAndSlashNamed< + AccountId, + BlockNumber, + Balances, + RelayerStakeReserveId, + RequiredStakeForStakeAndSlash, + RelayerStakeLease, + >; + type LaneId = LegacyLaneId; + type WeightInfo = weights::pallet_bridge_relayers::WeightInfo; } // Parameters, used by bridge transport code. @@ -136,16 +132,6 @@ parameter_types! { /// Name of the `paras` pallet at Polkadot that tracks all parachain heads. pub const ParachainPalletNameAtPolkadot: &'static str = bp_polkadot::PARAS_PALLET_NAME; - /// Maximal number of entries in the unrewarded relayers vector at the Kusama Bridge Hub. It matches the - /// maximal number of unrewarded relayers that the single confirmation transaction at Polkadot Bridge - /// Hub may process. - pub const MaxUnrewardedRelayerEntriesAtInboundLane: bp_messages::MessageNonce = - bp_bridge_hub_polkadot::MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX; - /// Maximal number of unconfirmed messages at the Kusama Bridge Hub. It matches the maximal number of - /// uncinfirmed messages that the single confirmation transaction at Polkadot Bridge Hub may process. - pub const MaxUnconfirmedMessagesAtInboundLane: bp_messages::MessageNonce = - bp_bridge_hub_polkadot::MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX; - /// Reserve identifier, used by the `pallet_bridge_relayers` to hold funds of registered relayer. pub const RelayerStakeReserveId: [u8; 8] = *b"brdgrlrs"; /// Minimal period of relayer registration. Roughly, it is the 1 hour of real time. @@ -159,6 +145,34 @@ parameter_types! { pub PriorityBoostPerMessage: u64 = 182_044_444_444_444; } +/// Proof of messages, coming from Polkadot. +pub type FromPolkadotBridgeHubMessagesProof = + FromBridgedChainMessagesProof>; +/// Messages delivery proof for Polkadot Bridge Hub -> Kusama Bridge Hub messages. +pub type ToPolkadotBridgeHubMessagesDeliveryProof = + FromBridgedChainMessagesDeliveryProof>; + +/// Dispatches received XCM messages from other bridge +pub type FromPolkadotMessageBlobDispatcher = BridgeBlobDispatcher< + XcmRouter, + UniversalLocation, + BridgeKusamaToPolkadotMessagesPalletInstance, +>; + +/// Signed extension that refunds relayers that are delivering messages from the Polkadot parachain. +pub type OnBridgeHubPolkadotRefundBridgeHubKusamaMessages = BridgeRelayersSignedExtension< + Runtime, + WithMessagesExtensionConfig< + StrOnBridgeHubPolkadotRefundBridgeHubKusamaMessages, + Runtime, + WithBridgeHubPolkadotMessagesInstance, + RelayersForLegacyLaneIdsMessagesInstance, + PriorityBoostPerMessage, + >, + LaneIdOf, +>; +bp_runtime::generate_static_str_provider!(OnBridgeHubPolkadotRefundBridgeHubKusamaMessages); + /// Add GRANDPA bridge pallet to track Polkadot relay chain. pub type BridgeGrandpaPolkadotInstance = pallet_bridge_grandpa::Instance1; impl pallet_bridge_grandpa::Config for Runtime { @@ -183,88 +197,39 @@ impl pallet_bridge_parachains::Config for Runti type MaxParaHeadDataSize = MaxParaHeadDataSize; } -/// Allows collect and claim rewards for relayers. -impl pallet_bridge_relayers::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type Reward = Balance; - type PaymentProcedure = - bp_relayers::PayRewardFromAccount, AccountId>; - type StakeAndSlash = pallet_bridge_relayers::StakeAndSlashNamed< - AccountId, - BlockNumber, - Balances, - RelayerStakeReserveId, - RequiredStakeForStakeAndSlash, - RelayerStakeLease, - >; - type WeightInfo = weights::pallet_bridge_relayers::WeightInfo; -} - /// Add XCM messages support for exchanging messages with BridgeHubPolkadot. pub type WithBridgeHubPolkadotMessagesInstance = pallet_bridge_messages::Instance1; impl pallet_bridge_messages::Config for Runtime { type RuntimeEvent = RuntimeEvent; type WeightInfo = weights::pallet_bridge_messages::WeightInfo; - type BridgedChainId = BridgeHubPolkadotChainId; - type ActiveOutboundLanes = ActiveOutboundLanesToBridgeHubPolkadot; - type MaxUnrewardedRelayerEntriesAtInboundLane = MaxUnrewardedRelayerEntriesAtInboundLane; - type MaxUnconfirmedMessagesAtInboundLane = MaxUnconfirmedMessagesAtInboundLane; - type MaximalOutboundPayloadSize = ToBridgeHubPolkadotMaximalOutboundPayloadSize; - type OutboundPayload = XcmAsPlainPayload; + type ThisChain = bp_bridge_hub_kusama::BridgeHubKusama; + type BridgedChain = bp_bridge_hub_polkadot::BridgeHubPolkadot; + type BridgedHeaderChain = pallet_bridge_parachains::ParachainHeaders< + Runtime, + BridgeParachainPolkadotInstance, + bp_bridge_hub_polkadot::BridgeHubPolkadot, + >; + type OutboundPayload = XcmAsPlainPayload; type InboundPayload = XcmAsPlainPayload; - type InboundRelayer = AccountId; - type DeliveryPayments = (); + type LaneId = LegacyLaneId; - type TargetHeaderChain = TargetHeaderChainAdapter; + type DeliveryPayments = (); type DeliveryConfirmationPayments = pallet_bridge_relayers::DeliveryConfirmationPaymentsAdapter< Runtime, WithBridgeHubPolkadotMessagesInstance, DeliveryRewardInBalance, >; - - type SourceHeaderChain = SourceHeaderChainAdapter; - type MessageDispatch = XcmBlobMessageDispatch< - FromPolkadotMessageBlobDispatcher, - Self::WeightInfo, - cumulus_pallet_xcmp_queue::bridging::OutXcmpChannelStatusProvider< - AssetHubKusamaParaId, - Runtime, - >, - >; - type OnMessagesDelivered = OnMessagesDeliveredFromPolkadot; -} - -/// Proof of messages, coming from Polkadot. -pub type FromPolkadotBridgeHubMessagesProof = - FromBridgedChainMessagesProof; -/// Messages delivery proof for Kusama Bridge Hub -> Polkadot Bridge Hub messages. -pub type ToPolkadotBridgeHubMessagesDeliveryProof = - FromBridgedChainMessagesDeliveryProof; - -/// Dispatches received XCM messages from Polkadot BridgeHub. -type FromPolkadotMessageBlobDispatcher = BridgeBlobDispatcher< - XcmRouter, - UniversalLocation, - BridgeKusamaToPolkadotMessagesPalletInstance, ->; - -/// Export XCM messages to be relayed to the other side -pub type ToBridgeHubPolkadotHaulBlobExporter = XcmOverBridgeHubPolkadot; -pub struct ToBridgeHubPolkadotXcmBlobHauler; -impl XcmBlobHauler for ToBridgeHubPolkadotXcmBlobHauler { - type Runtime = Runtime; - type MessagesInstance = WithBridgeHubPolkadotMessagesInstance; - - type ToSourceChainSender = XcmRouter; - type CongestedMessage = bp_asset_hub_kusama::CongestedMessage; - type UncongestedMessage = bp_asset_hub_kusama::UncongestedMessage; + type MessageDispatch = XcmOverBridgeHubPolkadot; + type OnMessagesDelivered = XcmOverBridgeHubPolkadot; } /// Add support for the export and dispatch of XCM programs. pub type XcmOverBridgeHubPolkadotInstance = pallet_xcm_bridge_hub::Instance1; impl pallet_xcm_bridge_hub::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type UniversalLocation = UniversalLocation; type BridgedNetwork = PolkadotGlobalConsensusNetworkLocation; type BridgeMessagesPalletInstance = WithBridgeHubPolkadotMessagesInstance; @@ -274,82 +239,219 @@ impl pallet_xcm_bridge_hub::Config for Runtime type MessageExportPrice = (); type DestinationVersion = XcmVersionOfDestAndRemoteBridge; - type Lanes = ActiveLanes; - type LanesSupport = ToBridgeHubPolkadotXcmBlobHauler; -} -/// On messages delivered callback. -type OnMessagesDeliveredFromPolkadot = - XcmBlobHaulerAdapter; - -/// Messaging Bridge configuration for BridgeHubKusama -> BridgeHubPolkadot -pub struct WithBridgeHubPolkadotMessageBridge; -impl MessageBridge for WithBridgeHubPolkadotMessageBridge { - const BRIDGED_MESSAGES_PALLET_NAME: &'static str = - bp_bridge_hub_kusama::WITH_BRIDGE_HUB_KUSAMA_MESSAGES_PALLET_NAME; - type ThisChain = BridgeHubKusama; - type BridgedChain = BridgeHubPolkadot; - type BridgedHeaderChain = pallet_bridge_parachains::ParachainHeaders< - Runtime, - BridgeParachainPolkadotInstance, - bp_bridge_hub_polkadot::BridgeHubPolkadot, - >; + type ForceOrigin = EnsureRoot; + // We don't want to allow creating bridges for this instance with `LegacyLaneId`. + type OpenBridgeOrigin = EnsureNever; + // Converter aligned with `OpenBridgeOrigin`. + type BridgeOriginAccountIdConverter = + (ParentIsPreset, SiblingParachainConvertsVia); + + // We do not allow creating bridges here (see `T::OpenBridgeOrigin` above), so there is no need + // to set a deposit. + type BridgeDeposit = ConstU128<0>; + type Currency = Balances; + type RuntimeHoldReason = RuntimeHoldReason; + // Do not require deposit from system parachains or relay chain + type AllowWithoutBridgeDeposit = + RelayOrOtherSystemParachains; + + type LocalXcmChannelManager = XcmpQueueChannelManager; + type BlobDispatcher = FromPolkadotMessageBlobDispatcher; } -/// Maximal outbound payload size of BridgeHubKusama -> BridgeHubPolkadot messages. -pub type ToBridgeHubPolkadotMaximalOutboundPayloadSize = - messages::source::FromThisChainMaximalOutboundPayloadSize; +/// Implementation `bp_xcm_bridge_hub::LocalXcmChannelManager`. +pub struct XcmpQueueChannelManager; +impl bp_xcm_bridge_hub::LocalXcmChannelManager for XcmpQueueChannelManager { + type Error = (); + + fn is_congested(with: &Location) -> bool { + // This is used to check the inbound queue/messages to determine if they can be dispatched + // and sent to the sibling parachain. Therefore, checking `OutXcmp` is sufficient. + use bp_xcm_bridge_hub_router::XcmChannelStatusProvider; + cumulus_pallet_xcmp_queue::bridging::OutXcmpChannelStatusProvider::::is_congested( + with, + ) + } -/// BridgeHubPolkadot chain from message lane point of view. -#[derive(RuntimeDebug, Clone, Copy)] -pub struct BridgeHubPolkadot; + fn suspend_bridge( + _local_origin: &Location, + _: pallet_xcm_bridge_hub::BridgeId, + ) -> Result<(), Self::Error> { + // IMPORTANT NOTE: + // + // Unfortunately, `https://github.com/paritytech/polkadot-sdk/pull/6231` reworked congestion is not yet released. + // + // And unfortunately, we don't have access to `XcmpQueue::send_signal(para, + // ChannelSignal::Suspend)` here (which would require patch release), we can add this + // hacky workaround/tmp/implementation that should trigger `ChannelSignal::Suspend`, e.g.: + /* + use crate::{MessageQueue, XcmpQueue}; + use bridge_hub_common::message_queue::AggregateMessageOrigin; + use codec::{Decode, Encode, MaxEncodedLen}; + use frame_support::traits::EnqueueMessage; + use frame_support::pallet_prelude::OptionQuery; + use pallet_message_queue::OnQueueChanged; + use scale_info::TypeInfo; + + // get sibling para id + let local_origin_para_id: crate::ParaId = match local_origin.unpack() { + (1, [Parachain(id)]) => (*id).into(), + _ => return Err(()) + }; + + // read `suspend_threshold` from `XcmpQueue` storage + #[derive(Copy, Clone, Eq, PartialEq, Encode, Decode, TypeInfo, MaxEncodedLen)] + struct QueueConfigData { + suspend_threshold: u32, + drop_threshold: u32, + resume_threshold: u32, + } + #[frame_support::storage_alias] + type QueueConfig = StorageValue; + let suspend_threshold = match QueueConfig::get() { + Some(qc) => qc.suspend_threshold, + None => return Err(()) + }; + + // Now, this should trigger `XcmpQueue::send_signal(para, ChannelSignal::Suspend)` + let mut qf = MessageQueue::footprint(AggregateMessageOrigin::Sibling(local_origin_para_id)); + qf.ready_pages = suspend_threshold; + XcmpQueue::on_queue_changed(local_origin_para_id.into(), qf); + */ + + // IMPORTANT NOTE2: + // + // In the current setup, this code is likely triggered only for the hard-coded AHK<>AHP + // lane, as we do not support any other bridge lanes on BridgeHubs. It is triggered only + // when `pallet_bridge_messages::OutboundMessages` reaches 8,192 undelivered messages. The + // potential risk of keeping `Ok(())` or `Err(())` here is that + // `pallet_bridge_messages::OutboundMessages` may continue to grow: + // + // ``` + // #[pallet::storage] + // pub type OutboundMessages, I: 'static = ()> = + // StorageMap<_, Blake2_128Concat, MessageKey, StoredMessagePayload>; + // ``` + + // TODO: decide: + // 1. wait for patch-release stable2409-3 2024-12-12 + // 2. go with `Ok(())` / `Err(())` + // 3. go with `XcmpQueue::send_signal` temporary workaround till patch release + + Ok(()) + } -impl UnderlyingChainProvider for BridgeHubPolkadot { - type Chain = bp_bridge_hub_polkadot::BridgeHubPolkadot; + fn resume_bridge( + _local_origin: &Location, + _: pallet_xcm_bridge_hub::BridgeId, + ) -> Result<(), Self::Error> { + // IMPORTANT NOTE: + // + // Unfortunately, `https://github.com/paritytech/polkadot-sdk/pull/6231` reworked congestion is not yet released. + // + // And unfortunately, we don't have access to `XcmpQueue::send_signal(para, + // ChannelSignal::Resume)` here (which would require patch release), we can add this hacky + // workaround/tmp/implementation that should trigger `ChannelSignal::Resume`, e.g.: + /* + use crate::{MessageQueue, XcmpQueue}; + use bridge_hub_common::message_queue::AggregateMessageOrigin; + use codec::{Decode, Encode, MaxEncodedLen}; + use frame_support::traits::EnqueueMessage; + use frame_support::pallet_prelude::OptionQuery; + use pallet_message_queue::OnQueueChanged; + use scale_info::TypeInfo; + + // get sibling para id + let local_origin_para_id: crate::ParaId = match local_origin.unpack() { + (1, [Parachain(id)]) => (*id).into(), + _ => return Err(()) + }; + + // read `resume_threshold` from `XcmpQueue` storage + #[derive(Copy, Clone, Eq, PartialEq, Encode, Decode, TypeInfo, MaxEncodedLen)] + struct QueueConfigData { + suspend_threshold: u32, + drop_threshold: u32, + resume_threshold: u32, + } + #[frame_support::storage_alias] + type QueueConfig = StorageValue; + let resume_threshold = match QueueConfig::get() { + Some(qc) => qc.resume_threshold, + None => return Err(()) + }; + + // Now, this should trigger `XcmpQueue::send_signal(para, ChannelSignal::Resume)` + let mut qf = MessageQueue::footprint(AggregateMessageOrigin::Sibling(local_origin_para_id)); + qf.ready_pages = resume_threshold; + XcmpQueue::on_queue_changed(local_origin_para_id.into(), qf); + */ + + // TODO: decide: + // 1. wait for patch-release stable2409-3 2024-12-12 + // 2. go with `Ok(())` / `Err(())` + // 3. go with `XcmpQueue::send_signal` temporary workaround till patch release + + Ok(()) + } } -impl messages::BridgedChainWithMessages for BridgeHubPolkadot {} - -/// BridgeHubKusama chain from message lane point of view. -#[derive(RuntimeDebug, Clone, Copy)] -pub struct BridgeHubKusama; - -impl UnderlyingChainProvider for BridgeHubKusama { - type Chain = bp_bridge_hub_kusama::BridgeHubKusama; -} +#[cfg(feature = "runtime-benchmarks")] +pub(crate) fn open_bridge_for_benchmarks( + with: pallet_xcm_bridge_hub::LaneIdOf, + sibling_para_id: u32, +) -> InteriorLocation +where + R: pallet_xcm_bridge_hub::Config, + XBHI: 'static, + C: xcm_executor::traits::ConvertLocation< + bp_runtime::AccountIdOf>, + >, +{ + use pallet_xcm_bridge_hub::{Bridge, BridgeId, BridgeState}; + use sp_runtime::traits::Zero; + use xcm::VersionedInteriorLocation; + + // insert bridge metadata + let lane_id = with; + let sibling_parachain = Location::new(1, [Parachain(sibling_para_id)]); + let universal_source = [GlobalConsensus(Kusama), Parachain(sibling_para_id)].into(); + let universal_destination = [GlobalConsensus(Polkadot), Parachain(2075)].into(); + let bridge_id = BridgeId::new(&universal_source, &universal_destination); + + // insert only bridge metadata, because the benchmarks create lanes + pallet_xcm_bridge_hub::Bridges::::insert( + bridge_id, + Bridge { + bridge_origin_relative_location: sp_std::boxed::Box::new( + sibling_parachain.clone().into(), + ), + bridge_origin_universal_location: sp_std::boxed::Box::new( + VersionedInteriorLocation::from(universal_source.clone()), + ), + bridge_destination_universal_location: sp_std::boxed::Box::new( + VersionedInteriorLocation::from(universal_destination), + ), + state: BridgeState::Opened, + bridge_owner_account: C::convert_location(&sibling_parachain).expect("valid AccountId"), + deposit: Zero::zero(), + lane_id, + }, + ); + pallet_xcm_bridge_hub::LaneToBridge::::insert(lane_id, bridge_id); -impl ThisChainWithMessages for BridgeHubKusama { - type RuntimeOrigin = RuntimeOrigin; + universal_source } -/// Signed extension that refunds relayers that are delivering messages from the Polkadot parachain. -pub type RefundBridgeHubPolkadotMessages = RefundSignedExtensionAdapter< - RefundBridgedParachainMessages< - Runtime, - RefundableParachain< - BridgeParachainPolkadotInstance, - bp_bridge_hub_polkadot::BridgeHubPolkadot, - >, - RefundableMessagesLane< - WithBridgeHubPolkadotMessagesInstance, - AssetHubKusamaToAssetHubPolkadotMessagesLane, - >, - ActualFeeRefund, - PriorityBoostPerMessage, - StrRefundBridgeHubPolkadotMessages, - >, ->; -bp_runtime::generate_static_str_provider!(RefundBridgeHubPolkadotMessages); - #[cfg(test)] mod tests { use super::*; use bridge_runtime_common::{ assert_complete_bridge_types, integrity::{ - assert_complete_bridge_constants, check_message_lane_weights, - AssertBridgeMessagesPalletConstants, AssertBridgePalletNames, AssertChainConstants, - AssertCompleteBridgeConstants, + assert_complete_with_parachain_bridge_constants, check_message_lane_weights, + AssertChainConstants, AssertCompleteBridgeConstants, }, }; @@ -388,51 +490,36 @@ mod tests { runtime: Runtime, with_bridged_chain_grandpa_instance: BridgeGrandpaPolkadotInstance, with_bridged_chain_messages_instance: WithBridgeHubPolkadotMessagesInstance, - bridge: WithBridgeHubPolkadotMessageBridge, - this_chain: bp_kusama::Kusama, - bridged_chain: bp_polkadot::Polkadot, + this_chain: bp_bridge_hub_kusama::BridgeHubKusama, + bridged_chain: bp_bridge_hub_polkadot::BridgeHubPolkadot, ); - assert_complete_bridge_constants::< + assert_complete_with_parachain_bridge_constants::< Runtime, BridgeGrandpaPolkadotInstance, WithBridgeHubPolkadotMessagesInstance, - WithBridgeHubPolkadotMessageBridge, + bp_polkadot::Polkadot, >(AssertCompleteBridgeConstants { this_chain_constants: AssertChainConstants { block_length: bp_bridge_hub_kusama::BlockLength::get(), block_weights: bp_bridge_hub_kusama::BlockWeights::get(), }, - messages_pallet_constants: AssertBridgeMessagesPalletConstants { - max_unrewarded_relayers_in_bridged_confirmation_tx: - bp_bridge_hub_polkadot::MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX, - max_unconfirmed_messages_in_bridged_confirmation_tx: - bp_bridge_hub_polkadot::MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX, - bridged_chain_id: bp_bridge_hub_polkadot::BridgeHubPolkadot::ID, - }, - pallet_names: AssertBridgePalletNames { - with_this_chain_messages_pallet_name: - bp_bridge_hub_kusama::WITH_BRIDGE_HUB_KUSAMA_MESSAGES_PALLET_NAME, - with_bridged_chain_grandpa_pallet_name: - bp_polkadot::WITH_POLKADOT_GRANDPA_PALLET_NAME, - with_bridged_chain_messages_pallet_name: - bp_bridge_hub_polkadot::WITH_BRIDGE_HUB_POLKADOT_MESSAGES_PALLET_NAME, - }, }); - bridge_runtime_common::extensions::priority_calculator::per_relay_header::ensure_priority_boost_is_sane::< + pallet_bridge_relayers::extension::per_relay_header::ensure_priority_boost_is_sane::< Runtime, BridgeGrandpaPolkadotInstance, PriorityBoostPerRelayHeader, >(FEE_BOOST_PER_RELAY_HEADER); - bridge_runtime_common::extensions::priority_calculator::per_parachain_header::ensure_priority_boost_is_sane::< + pallet_bridge_relayers::extension::per_parachain_header::ensure_priority_boost_is_sane::< Runtime, - RefundableParachain, + WithBridgeHubPolkadotMessagesInstance, + bp_bridge_hub_polkadot::BridgeHubPolkadot, PriorityBoostPerParachainHeader, >(FEE_BOOST_PER_PARACHAIN_HEADER); - bridge_runtime_common::extensions::priority_calculator::per_message::ensure_priority_boost_is_sane::< + pallet_bridge_relayers::extension::per_message::ensure_priority_boost_is_sane::< Runtime, WithBridgeHubPolkadotMessagesInstance, PriorityBoostPerMessage, @@ -449,3 +536,27 @@ mod tests { .starts_with(&PolkadotGlobalConsensusNetworkLocation::get())); } } + +/// Contains the migration for the AssetHubKusama<>AssetHubPolkadot bridge. +pub mod migration { + use super::*; + use frame_support::traits::ConstBool; + + parameter_types! { + pub AssetHubKusamaToAssetHubPolkadotMessagesLane: LegacyLaneId = LegacyLaneId([0, 0, 0, 1]); + pub AssetHubKusamaLocation: Location = Location::new(1, [Parachain(bp_asset_hub_kusama::ASSET_HUB_KUSAMA_PARACHAIN_ID)]); + pub AssetHubPolkadotUniversalLocation: InteriorLocation = [GlobalConsensus(PolkadotGlobalConsensusNetwork::get()), Parachain(bp_asset_hub_polkadot::ASSET_HUB_POLKADOT_PARACHAIN_ID)].into(); + } + + /// Ensure that the existing lanes for the AHR<>AHW bridge are correctly configured. + pub type StaticToDynamicLanes = pallet_xcm_bridge_hub::migration::OpenBridgeForLane< + Runtime, + XcmOverBridgeHubPolkadotInstance, + AssetHubKusamaToAssetHubPolkadotMessagesLane, + // the lanes are already created for AHP<>AHK, but we need to link them to the bridge + // structs + ConstBool, + AssetHubKusamaLocation, + AssetHubPolkadotUniversalLocation, + >; +} diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/genesis_config_presets.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/genesis_config_presets.rs index d9850b62a7..d40ff9e449 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/genesis_config_presets.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/genesis_config_presets.rs @@ -56,6 +56,7 @@ fn bridge_hub_kusama_genesis( ) }) .collect(), + ..Default::default() }, "polkadotXcm": { "safeXcmVersion": Some(SAFE_XCM_VERSION), diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs index 44574b27e6..dc009ec2c2 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs @@ -116,7 +116,7 @@ pub type SignedExtra = ( frame_system::CheckWeight, pallet_transaction_payment::ChargeTransactionPayment, BridgeRejectObsoleteHeadersAndMessages, - bridge_to_polkadot_config::RefundBridgeHubPolkadotMessages, + bridge_to_polkadot_config::OnBridgeHubPolkadotRefundBridgeHubKusamaMessages, frame_metadata_hash_extension::CheckMetadataHash, ); @@ -141,6 +141,11 @@ parameter_types! { pub EthereumSystemName: &'static str = "EthereumSystem"; } +parameter_types! { + pub const BridgePolkadotMessagesPalletName: &'static str = "BridgePolkadotMessages"; + pub const OutboundLanesCongestedSignalsKey: &'static str = "OutboundLanesCongestedSignals"; +} + /// Migrations to apply on runtime upgrade. pub type Migrations = ( // unreleased and/or un-applied @@ -161,6 +166,20 @@ pub type Migrations = ( EthereumSystemName, ::DbWeight, >, + pallet_bridge_messages::migration::v1::MigrationToV1< + Runtime, + bridge_to_polkadot_config::WithBridgeHubPolkadotMessagesInstance, + >, + bridge_to_polkadot_config::migration::StaticToDynamicLanes, + frame_support::migrations::RemoveStorage< + BridgePolkadotMessagesPalletName, + OutboundLanesCongestedSignalsKey, + RocksDbWeight, + >, + pallet_bridge_relayers::migration::v1::MigrationToV1< + Runtime, + bridge_to_polkadot_config::RelayersForLegacyLaneIdsMessagesInstance, + >, // permanent pallet_xcm::migration::MigrateToLatestXcmVersion, ); @@ -568,6 +587,9 @@ construct_runtime!( } ); +#[cfg(feature = "runtime-benchmarks")] +use pallet_bridge_messages::LaneIdOf; + #[cfg(feature = "runtime-benchmarks")] mod benches { frame_benchmarking::define_benchmarks!( @@ -848,7 +870,7 @@ impl_runtime_apis! { impl bp_bridge_hub_polkadot::FromBridgeHubPolkadotInboundLaneApi for Runtime { fn message_details( - lane: bp_messages::LaneId, + lane: bp_messages::LegacyLaneId, messages: Vec<(bp_messages::MessagePayload, bp_messages::OutboundMessageDetails)>, ) -> Vec { bridge_runtime_common::messages_api::inbound_message_details::< @@ -860,7 +882,7 @@ impl_runtime_apis! { impl bp_bridge_hub_polkadot::ToBridgeHubPolkadotOutboundLaneApi for Runtime { fn message_details( - lane: bp_messages::LaneId, + lane: bp_messages::LegacyLaneId, begin: bp_messages::MessageNonce, end: bp_messages::MessageNonce, ) -> Vec { @@ -1105,11 +1127,36 @@ impl_runtime_apis! { ); BenchmarkError::Stop("XcmVersion was not stored!") })?; + + let sibling_system_parachain_id = Parachain(1000); + let remote_parachain_id = Parachain(5678); + let sibling_parachain_location = Location::new(1, [sibling_system_parachain_id]); + + // open bridge + let bridge_destination_universal_location: InteriorLocation = [GlobalConsensus(NetworkId::Polkadot), remote_parachain_id].into(); + let locations = XcmOverBridgeHubPolkadot::bridge_locations( + sibling_parachain_location.clone(), + bridge_destination_universal_location.clone(), + )?; + XcmOverBridgeHubPolkadot::do_open_bridge( + locations, + bp_messages::LegacyLaneId([1, 2, 3, 4]), + true, + ).map_err(|e| { + log::error!( + "Failed to `XcmOverBridgeHubRococo::open_bridge`({:?}, {:?})`, error: {:?}", + sibling_parachain_location, + bridge_destination_universal_location, + e + ); + BenchmarkError::Stop("Bridge was not opened!") + })?; + Ok( ( - bridge_to_polkadot_config::FromAssetHubKusamaToAssetHubPolkadotRoute::get().location, + sibling_parachain_location, NetworkId::Polkadot, - Parachain(bridge_to_polkadot_config::AssetHubPolkadotParaId::get().into()).into() + [remote_parachain_id].into() ) ) } @@ -1133,12 +1180,13 @@ impl_runtime_apis! { impl BridgeRelayersConfig for Runtime { fn prepare_rewards_account( - account_params: bp_relayers::RewardsAccountParams, + account_params: bp_relayers::RewardsAccountParams>, reward: Balance, ) { let rewards_account = bp_relayers::PayRewardFromAccount::< Balances, - AccountId + AccountId, + bp_messages::LegacyLaneId, >::rewards_account(account_params); Self::deposit_account(rewards_account, reward); } @@ -1161,17 +1209,17 @@ impl_runtime_apis! { fn prepare_parachain_heads_proof( parachains: &[bp_polkadot_core::parachains::ParaId], parachain_head_size: u32, - proof_size: bp_runtime::StorageProofSize, + proof_params: bp_runtime::UnverifiedStorageProofParams, ) -> ( - pallet_bridge_parachains::RelayBlockNumber, - pallet_bridge_parachains::RelayBlockHash, + bp_parachains::RelayBlockNumber, + bp_parachains::RelayBlockHash, bp_polkadot_core::parachains::ParaHeadsProof, Vec<(bp_polkadot_core::parachains::ParaId, bp_polkadot_core::parachains::ParaHash)>, ) { prepare_parachain_heads_proof::( parachains, parachain_head_size, - proof_size, + proof_params, ) } } @@ -1190,7 +1238,8 @@ impl_runtime_apis! { impl BridgeMessagesConfig for Runtime { fn is_relayer_rewarded(relayer: &Self::AccountId) -> bool { let bench_lane_id = >::bench_lane_id(); - let bridged_chain_id = bridge_to_polkadot_config::BridgeHubPolkadotChainId::get(); + use bp_runtime::Chain; + let bridged_chain_id =>::BridgedChain::ID; pallet_bridge_relayers::Pallet::::relayer_reward( relayer, bp_relayers::RewardsAccountParams::new( @@ -1202,25 +1251,35 @@ impl_runtime_apis! { } fn prepare_message_proof( - params: MessageProofParams, - ) -> (bridge_to_polkadot_config::FromPolkadotBridgeHubMessagesProof, Weight) { + params: MessageProofParams>, + ) -> (bridge_to_polkadot_config::FromPolkadotBridgeHubMessagesProof, Weight) { use cumulus_primitives_core::XcmpMessageSource; assert!(XcmpQueue::take_outbound_messages(usize::MAX).is_empty()); ParachainSystem::open_outbound_hrmp_channel_for_benchmarks_or_tests(42.into()); + let universal_source = bridge_to_polkadot_config::open_bridge_for_benchmarks::< + Runtime, + bridge_to_polkadot_config::XcmOverBridgeHubPolkadotInstance, + xcm_config::LocationToAccountId, + >(params.lane, 42); prepare_message_proof_from_parachain::< Runtime, bridge_to_polkadot_config::BridgeGrandpaPolkadotInstance, - bridge_to_polkadot_config::WithBridgeHubPolkadotMessageBridge, - >(params, generate_xcm_builder_bridge_message_sample([GlobalConsensus(Kusama), Parachain(42)].into())) + bridge_to_polkadot_config::WithBridgeHubPolkadotMessagesInstance, + >(params, generate_xcm_builder_bridge_message_sample(universal_source)) } fn prepare_message_delivery_proof( - params: MessageDeliveryProofParams, - ) -> bridge_to_polkadot_config::ToPolkadotBridgeHubMessagesDeliveryProof { + params: MessageDeliveryProofParams>, + ) -> bridge_to_polkadot_config::ToPolkadotBridgeHubMessagesDeliveryProof { + let _ = bridge_to_polkadot_config::open_bridge_for_benchmarks::< + Runtime, + bridge_to_polkadot_config::XcmOverBridgeHubPolkadotInstance, + xcm_config::LocationToAccountId, + >(params.lane, 42); prepare_message_delivery_proof_from_parachain::< Runtime, bridge_to_polkadot_config::BridgeGrandpaPolkadotInstance, - bridge_to_polkadot_config::WithBridgeHubPolkadotMessageBridge, + bridge_to_polkadot_config::WithBridgeHubPolkadotMessagesInstance, >(params) } diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_bridge_messages.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_bridge_messages.rs index a0e27e2497..a69730a504 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_bridge_messages.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_bridge_messages.rs @@ -69,22 +69,27 @@ impl pallet_bridge_messages::WeightInfo for WeightInfo< } /// Storage: `BridgePolkadotMessages::PalletOperatingMode` (r:1 w:0) /// Proof: `BridgePolkadotMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`) - /// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:0) - /// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: Some(1282), added: 1777, mode: `MaxEncodedLen`) /// Storage: `BridgePolkadotParachains::ImportedParaHeads` (r:1 w:0) - /// Proof: `BridgePolkadotParachains::ImportedParaHeads` (`max_values`: Some(600), `max_size`: Some(196), added: 1681, mode: `MaxEncodedLen`) + /// Proof: `BridgePolkadotParachains::ImportedParaHeads` (`max_values`: Some(64), `max_size`: Some(196), added: 1186, mode: `MaxEncodedLen`) /// Storage: `BridgePolkadotMessages::InboundLanes` (r:1 w:1) - /// Proof: `BridgePolkadotMessages::InboundLanes` (`max_values`: None, `max_size`: Some(49180), added: 51655, mode: `MaxEncodedLen`) + /// Proof: `BridgePolkadotMessages::InboundLanes` (`max_values`: None, `max_size`: Some(49209), added: 51684, mode: `MaxEncodedLen`) + /// Storage: `XcmOverBridgeHubKusama::LaneToBridge` (r:1 w:0) + /// Proof: `XcmOverBridgeHubKusama::LaneToBridge` (`max_values`: None, `max_size`: Some(65), added: 2540, mode: `MaxEncodedLen`) + /// Storage: `XcmOverBridgeHubKusama::Bridges` (r:1 w:0) + /// Proof: `XcmOverBridgeHubKusama::Bridges` (`max_values`: None, `max_size`: Some(1918), added: 4393, mode: `MaxEncodedLen`) /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) - fn receive_two_messages_proof() -> Weight { + /// The range of component `n` is `[1, 4076]`. + fn receive_n_messages_proof(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `489` - // Estimated: `52645` - // Minimum execution time: 70_821_000 picoseconds. - Weight::from_parts(73_401_000, 0) - .saturating_add(Weight::from_parts(0, 52645)) - .saturating_add(T::DbWeight::get().reads(5)) + // Measured: `701` + // Estimated: `52674` + // Minimum execution time: 62_034_000 picoseconds. + Weight::from_parts(63_355_000, 0) + .saturating_add(Weight::from_parts(0, 52674)) + // Standard Error: 8_231 + .saturating_add(Weight::from_parts(14_096_117, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `BridgePolkadotMessages::PalletOperatingMode` (r:1 w:0) @@ -109,38 +114,27 @@ impl pallet_bridge_messages::WeightInfo for WeightInfo< } /// Storage: `BridgePolkadotMessages::PalletOperatingMode` (r:1 w:0) /// Proof: `BridgePolkadotMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`) - /// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:0) - /// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: Some(1282), added: 1777, mode: `MaxEncodedLen`) /// Storage: `BridgePolkadotParachains::ImportedParaHeads` (r:1 w:0) - /// Proof: `BridgePolkadotParachains::ImportedParaHeads` (`max_values`: Some(600), `max_size`: Some(196), added: 1681, mode: `MaxEncodedLen`) + /// Proof: `BridgePolkadotParachains::ImportedParaHeads` (`max_values`: Some(64), `max_size`: Some(196), added: 1186, mode: `MaxEncodedLen`) /// Storage: `BridgePolkadotMessages::InboundLanes` (r:1 w:1) - /// Proof: `BridgePolkadotMessages::InboundLanes` (`max_values`: None, `max_size`: Some(49180), added: 51655, mode: `MaxEncodedLen`) - fn receive_single_message_proof_1_kb() -> Weight { - // Proof Size summary in bytes: - // Measured: `457` - // Estimated: `52645` - // Minimum execution time: 52_610_000 picoseconds. - Weight::from_parts(53_671_000, 0) - .saturating_add(Weight::from_parts(0, 52645)) - .saturating_add(T::DbWeight::get().reads(4)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: `BridgePolkadotMessages::PalletOperatingMode` (r:1 w:0) - /// Proof: `BridgePolkadotMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`) - /// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:0) - /// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: Some(1282), added: 1777, mode: `MaxEncodedLen`) - /// Storage: `BridgePolkadotParachains::ImportedParaHeads` (r:1 w:0) - /// Proof: `BridgePolkadotParachains::ImportedParaHeads` (`max_values`: Some(600), `max_size`: Some(196), added: 1681, mode: `MaxEncodedLen`) - /// Storage: `BridgePolkadotMessages::InboundLanes` (r:1 w:1) - /// Proof: `BridgePolkadotMessages::InboundLanes` (`max_values`: None, `max_size`: Some(49180), added: 51655, mode: `MaxEncodedLen`) - fn receive_single_message_proof_16_kb() -> Weight { + /// Proof: `BridgePolkadotMessages::InboundLanes` (`max_values`: None, `max_size`: Some(49209), added: 51684, mode: `MaxEncodedLen`) + /// Storage: `XcmOverBridgeHubKusama::LaneToBridge` (r:1 w:0) + /// Proof: `XcmOverBridgeHubKusama::LaneToBridge` (`max_values`: None, `max_size`: Some(65), added: 2540, mode: `MaxEncodedLen`) + /// Storage: `XcmOverBridgeHubKusama::Bridges` (r:1 w:0) + /// Proof: `XcmOverBridgeHubKusama::Bridges` (`max_values`: None, `max_size`: Some(1918), added: 4393, mode: `MaxEncodedLen`) + /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) + /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// The range of component `n` is `[1, 16384]`. + fn receive_single_n_bytes_message_proof(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `457` - // Estimated: `52645` - // Minimum execution time: 82_911_000 picoseconds. - Weight::from_parts(83_941_000, 0) - .saturating_add(Weight::from_parts(0, 52645)) - .saturating_add(T::DbWeight::get().reads(4)) + // Measured: `701` + // Estimated: `52674` + // Minimum execution time: 58_688_000 picoseconds. + Weight::from_parts(61_404_716, 0) + .saturating_add(Weight::from_parts(0, 52674)) + // Standard Error: 7 + .saturating_add(Weight::from_parts(2_249, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `BridgePolkadotMessages::PalletOperatingMode` (r:1 w:0) @@ -205,12 +199,14 @@ impl pallet_bridge_messages::WeightInfo for WeightInfo< } /// Storage: `BridgePolkadotMessages::PalletOperatingMode` (r:1 w:0) /// Proof: `BridgePolkadotMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`) - /// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:1) - /// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: Some(1282), added: 1777, mode: `MaxEncodedLen`) /// Storage: `BridgePolkadotParachains::ImportedParaHeads` (r:1 w:0) - /// Proof: `BridgePolkadotParachains::ImportedParaHeads` (`max_values`: Some(600), `max_size`: Some(196), added: 1681, mode: `MaxEncodedLen`) + /// Proof: `BridgePolkadotParachains::ImportedParaHeads` (`max_values`: Some(64), `max_size`: Some(196), added: 1186, mode: `MaxEncodedLen`) /// Storage: `BridgePolkadotMessages::InboundLanes` (r:1 w:1) - /// Proof: `BridgePolkadotMessages::InboundLanes` (`max_values`: None, `max_size`: Some(49180), added: 51655, mode: `MaxEncodedLen`) + /// Proof: `BridgePolkadotMessages::InboundLanes` (`max_values`: None, `max_size`: Some(49209), added: 51684, mode: `MaxEncodedLen`) + /// Storage: `XcmOverBridgeHubKusama::LaneToBridge` (r:1 w:0) + /// Proof: `XcmOverBridgeHubKusama::LaneToBridge` (`max_values`: None, `max_size`: Some(65), added: 2540, mode: `MaxEncodedLen`) + /// Storage: `XcmOverBridgeHubKusama::Bridges` (r:1 w:0) + /// Proof: `XcmOverBridgeHubKusama::Bridges` (`max_values`: None, `max_size`: Some(1918), added: 4393, mode: `MaxEncodedLen`) /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) /// Storage: `XcmpQueue::DeliveryFeeFactor` (r:1 w:0) @@ -223,19 +219,21 @@ impl pallet_bridge_messages::WeightInfo for WeightInfo< /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `ParachainSystem::RelevantMessagingState` (r:1 w:0) /// Proof: `ParachainSystem::RelevantMessagingState` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:1) + /// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: Some(1282), added: 1777, mode: `MaxEncodedLen`) /// Storage: `XcmpQueue::OutboundXcmpMessages` (r:0 w:1) /// Proof: `XcmpQueue::OutboundXcmpMessages` (`max_values`: None, `max_size`: Some(105506), added: 107981, mode: `MaxEncodedLen`) - /// The range of component `i` is `[128, 2048]`. - fn receive_single_message_proof_with_dispatch(i: u32, ) -> Weight { + /// The range of component `n` is `[1, 16384]`. + fn receive_single_n_bytes_message_proof_with_dispatch(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `657` - // Estimated: `52645` - // Minimum execution time: 74_781_000 picoseconds. - Weight::from_parts(75_851_615, 0) - .saturating_add(Weight::from_parts(0, 52645)) - // Standard Error: 49 - .saturating_add(Weight::from_parts(7_539, 0).saturating_mul(i.into())) - .saturating_add(T::DbWeight::get().reads(10)) + // Measured: `965` + // Estimated: `52674` + // Minimum execution time: 84_340_000 picoseconds. + Weight::from_parts(89_615_003, 0) + .saturating_add(Weight::from_parts(0, 52674)) + // Standard Error: 15 + .saturating_add(Weight::from_parts(7_574, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(12)) .saturating_add(T::DbWeight::get().writes(4)) } } diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs index 2a16b42aed..911958288f 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs @@ -14,17 +14,19 @@ // You should have received a copy of the GNU General Public License // along with Cumulus. If not, see . +use crate::XcmOverBridgeHubPolkadot; + use super::{ - bridge_to_polkadot_config::ToBridgeHubPolkadotHaulBlobExporter, AccountId, - AllPalletsWithSystem, Balances, CollatorSelection, ParachainInfo, ParachainSystem, PolkadotXcm, - PriceForParentDelivery, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, WeightToFee, - XcmpQueue, + AccountId, AllPalletsWithSystem, Balances, CollatorSelection, ParachainInfo, ParachainSystem, + PolkadotXcm, PriceForParentDelivery, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, + WeightToFee, XcmpQueue, }; use frame_support::{ parameter_types, traits::{tokens::imbalance::ResolveTo, ConstU32, Contains, Equals, Everything, Nothing}, }; use frame_system::EnsureRoot; +use pallet_collator_selection::StakingPotAccountId; use pallet_xcm::XcmPassthrough; use parachains_common::xcm_config::{ AllSiblingSystemParachains, ConcreteAssetFromSystem, ParentRelayOrSiblingParachains, @@ -35,14 +37,15 @@ use sp_runtime::traits::AccountIdConversion; use system_parachains_constants::TREASURY_PALLET_ID; use xcm::latest::prelude::*; use xcm_builder::{ - AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, - AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, DenyReserveTransferToRelayChain, - DenyThenTry, DescribeAllTerminal, DescribeFamily, EnsureXcmOrigin, FrameTransactionalProcessor, - FungibleAdapter, HashedDescription, IsConcrete, ParentAsSuperuser, ParentIsPreset, - RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, - SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, - TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, - XcmFeeManagerFromComponents, XcmFeeToAccount, + AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowHrmpNotificationsFromRelayChain, + AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, + DenyReserveTransferToRelayChain, DenyThenTry, DescribeAllTerminal, DescribeFamily, + EnsureXcmOrigin, FrameTransactionalProcessor, FungibleAdapter, HashedDescription, IsConcrete, + ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SendXcmFeeToAccount, + SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, + SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, + UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, + XcmFeeManagerFromComponents, }; use xcm_executor::{traits::ConvertLocation, XcmExecutor}; @@ -56,8 +59,8 @@ parameter_types! { pub const MaxAssetsIntoHolding: u32 = 64; pub const GovernanceLocation: Location = Location::parent(); pub const FellowshipLocation: Location = Location::parent(); - pub RelayTreasuryLocation: Location = (Parent, PalletInstance(kusama_runtime_constants::TREASURY_PALLET_ID)).into(); pub TreasuryAccount: AccountId = TREASURY_PALLET_ID.into_account_truncating(); + pub RelayTreasuryLocation: Location = (Parent, PalletInstance(kusama_runtime_constants::TREASURY_PALLET_ID)).into(); // Test [`crate::tests::treasury_pallet_account_not_none`] ensures that the result of location // conversion is not `None`. pub RelayTreasuryPalletAccount: AccountId = @@ -148,6 +151,8 @@ pub type Barrier = TrailingSetTopicAsId< )>, // Subscriptions for version tracking are OK. AllowSubscriptionsFrom, + // HRMP notifications from the relay chain are OK. + AllowHrmpNotificationsFromRelayChain, ), UniversalLocation, ConstU32<8>, @@ -172,7 +177,6 @@ pub struct XcmConfig; impl xcm_executor::Config for XcmConfig { type RuntimeCall = RuntimeCall; type XcmSender = XcmRouter; - type XcmRecorder = (); type AssetTransactor = FungibleTransactor; type OriginConverter = XcmOriginToTransactDispatchOrigin; // BridgeHub does not recognize a reserve location for any asset. Users must teleport KSM @@ -191,21 +195,21 @@ impl xcm_executor::Config for XcmConfig { KsmRelayLocation, AccountId, Balances, - ResolveTo, + ResolveTo, Balances>, >; type ResponseHandler = PolkadotXcm; type AssetTrap = PolkadotXcm; + type AssetLocker = (); + type AssetExchanger = (); type AssetClaims = PolkadotXcm; type SubscriptionService = PolkadotXcm; type PalletInstancesInfo = AllPalletsWithSystem; type MaxAssetsIntoHolding = MaxAssetsIntoHolding; - type AssetLocker = (); - type AssetExchanger = (); type FeeManager = XcmFeeManagerFromComponents< WaivedLocations, - XcmFeeToAccount, + SendXcmFeeToAccount, >; - type MessageExporter = ToBridgeHubPolkadotHaulBlobExporter; + type MessageExporter = XcmOverBridgeHubPolkadot; type UniversalAliases = Nothing; type CallDispatcher = RuntimeCall; type SafeCallFilter = Everything; @@ -214,6 +218,7 @@ impl xcm_executor::Config for XcmConfig { type HrmpNewChannelOpenRequestHandler = (); type HrmpChannelAcceptedHandler = (); type HrmpChannelClosingHandler = (); + type XcmRecorder = PolkadotXcm; } /// Converts a local signed origin into an XCM `Location`. @@ -231,9 +236,9 @@ pub type XcmRouter = WithUniqueTopic<( impl pallet_xcm::Config for Runtime { type RuntimeEvent = RuntimeEvent; + type XcmRouter = XcmRouter; // We want to disallow users sending (arbitrary) XCMs from this chain. type SendXcmOrigin = EnsureXcmOrigin; - type XcmRouter = XcmRouter; // Any local signed origin can execute XCM messages. type ExecuteXcmOrigin = EnsureXcmOrigin; type XcmExecuteFilter = Everything; diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/tests/tests.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/tests/tests.rs index e2525e6d87..20b87d9756 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/tests/tests.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/tests/tests.rs @@ -14,14 +14,15 @@ // You should have received a copy of the GNU General Public License // along with Cumulus. If not, see . +use bp_messages::LegacyLaneId; use bp_polkadot_core::Signature; use bridge_hub_kusama_runtime::{ bridge_to_polkadot_config::{ - AssetHubPolkadotParaId, BridgeGrandpaPolkadotInstance, BridgeHubPolkadotChainId, - BridgeHubPolkadotLocation, BridgeParachainPolkadotInstance, DeliveryRewardInBalance, - PolkadotGlobalConsensusNetwork, RefundBridgeHubPolkadotMessages, - RequiredStakeForStakeAndSlash, WithBridgeHubPolkadotMessageBridge, - WithBridgeHubPolkadotMessagesInstance, XCM_LANE_FOR_ASSET_HUB_KUSAMA_TO_ASSET_HUB_POLKADOT, + AssetHubPolkadotParaId, BridgeGrandpaPolkadotInstance, BridgeHubPolkadotLocation, + BridgeParachainPolkadotInstance, DeliveryRewardInBalance, + OnBridgeHubPolkadotRefundBridgeHubKusamaMessages, PolkadotGlobalConsensusNetwork, + RelayersForLegacyLaneIdsMessagesInstance, RequiredStakeForStakeAndSlash, + WithBridgeHubPolkadotMessagesInstance, XcmOverBridgeHubPolkadotInstance, }, xcm_config::{ KsmRelayLocation, LocationToAccountId, RelayNetwork, RelayTreasuryLocation, @@ -51,6 +52,16 @@ use xcm_runtime_apis::conversions::LocationToAccountHelper; // Para id of sibling chain used in tests. pub const SIBLING_PARACHAIN_ID: u32 = 1000; +// Random para id of sibling chain used in tests. +pub const SIBLING_SYSTEM_PARACHAIN_ID: u32 = 1008; +// Random para id of bridged chain from different global consensus used in tests. +pub const BRIDGED_LOCATION_PARACHAIN_ID: u32 = 1000; + +parameter_types! { + pub SiblingParachainLocation: Location = Location::new(1, [Parachain(SIBLING_PARACHAIN_ID)]); + pub SiblingSystemParachainLocation: Location = Location::new(1, [Parachain(SIBLING_SYSTEM_PARACHAIN_ID)]); + pub BridgedUniversalLocation: InteriorLocation = [GlobalConsensus(PolkadotGlobalConsensusNetwork::get()), Parachain(BRIDGED_LOCATION_PARACHAIN_ID)].into(); +} // Runtime from tests PoV type RuntimeTestsAdapter = from_parachain::WithRemoteParachainHelperAdapter< @@ -59,7 +70,7 @@ type RuntimeTestsAdapter = from_parachain::WithRemoteParachainHelperAdapter< BridgeGrandpaPolkadotInstance, BridgeParachainPolkadotInstance, WithBridgeHubPolkadotMessagesInstance, - WithBridgeHubPolkadotMessageBridge, + RelayersForLegacyLaneIdsMessagesInstance, >; parameter_types! { @@ -83,7 +94,7 @@ fn construct_extrinsic( frame_system::CheckWeight::::new(), pallet_transaction_payment::ChargeTransactionPayment::::from(0), BridgeRejectObsoleteHeadersAndMessages, - (RefundBridgeHubPolkadotMessages::default()), + (OnBridgeHubPolkadotRefundBridgeHubKusamaMessages::default()), frame_metadata_hash_extension::CheckMetadataHash::::new(false), ); let payload = SignedPayload::new(call.clone(), extra.clone()).unwrap(); @@ -229,11 +240,29 @@ fn handle_export_message_from_system_parachain_add_to_outbound_queue_works() { } }), || ExportMessage { network: Polkadot, destination: Parachain(AssetHubPolkadotParaId::get().into()).into(), xcm: Xcm(vec![]) }, - XCM_LANE_FOR_ASSET_HUB_KUSAMA_TO_ASSET_HUB_POLKADOT, Some((KsmRelayLocation::get(), ExistentialDeposit::get()).into()), // value should be >= than value generated by `can_calculate_weight_for_paid_export_message_with_reserve_transfer` Some((KsmRelayLocation::get(), bp_bridge_hub_kusama::BridgeHubKusamaBaseXcmFeeInKsms::get()).into()), - || PolkadotXcm::force_xcm_version(RuntimeOrigin::root(), Box::new(BridgeHubPolkadotLocation::get()), XCM_VERSION).expect("version saved!"), + || { + PolkadotXcm::force_xcm_version(RuntimeOrigin::root(), Box::new(BridgeHubPolkadotLocation::get()), XCM_VERSION).expect("version saved!"); + + // we need to create lane between sibling parachain and remote destination + bridge_hub_test_utils::ensure_opened_bridge::< + Runtime, + XcmOverBridgeHubPolkadotInstance, + LocationToAccountId, + KsmRelayLocation, + >( + SiblingParachainLocation::get(), + BridgedUniversalLocation::get(), + |locations, fee| { + bridge_hub_test_utils::open_bridge_with_storage::< + Runtime, + XcmOverBridgeHubPolkadotInstance + >(locations, fee, LegacyLaneId([0, 0, 0, 1])) + } + ).1 + }, ) } @@ -265,7 +294,6 @@ fn message_dispatch_routing_works() { _ => None, } }), - XCM_LANE_FOR_ASSET_HUB_KUSAMA_TO_ASSET_HUB_POLKADOT, || (), ) } @@ -277,12 +305,29 @@ fn relayed_incoming_message_works() { slot_durations(), bp_bridge_hub_kusama::BRIDGE_HUB_KUSAMA_PARACHAIN_ID, bp_bridge_hub_polkadot::BRIDGE_HUB_POLKADOT_PARACHAIN_ID, - BridgeHubPolkadotChainId::get(), SIBLING_PARACHAIN_ID, Kusama, - XCM_LANE_FOR_ASSET_HUB_KUSAMA_TO_ASSET_HUB_POLKADOT, - || (), + || { + // we need to create lane between sibling parachain and remote destination + bridge_hub_test_utils::ensure_opened_bridge::< + Runtime, + XcmOverBridgeHubPolkadotInstance, + LocationToAccountId, + KsmRelayLocation, + >( + SiblingParachainLocation::get(), + BridgedUniversalLocation::get(), + |locations, fee| { + bridge_hub_test_utils::open_bridge_with_storage::< + Runtime, + XcmOverBridgeHubPolkadotInstance, + >(locations, fee, LegacyLaneId([0, 0, 0, 1])) + }, + ) + .1 + }, construct_and_apply_extrinsic, + true, ) } @@ -294,12 +339,29 @@ fn free_relay_extrinsic_works() { slot_durations(), bp_bridge_hub_kusama::BRIDGE_HUB_KUSAMA_PARACHAIN_ID, bp_bridge_hub_polkadot::BRIDGE_HUB_POLKADOT_PARACHAIN_ID, - BridgeHubPolkadotChainId::get(), SIBLING_PARACHAIN_ID, Kusama, - XCM_LANE_FOR_ASSET_HUB_KUSAMA_TO_ASSET_HUB_POLKADOT, - || (), + || { + // we need to create lane between sibling parachain and remote destination + bridge_hub_test_utils::ensure_opened_bridge::< + Runtime, + XcmOverBridgeHubPolkadotInstance, + LocationToAccountId, + KsmRelayLocation, + >( + SiblingParachainLocation::get(), + BridgedUniversalLocation::get(), + |locations, fee| { + bridge_hub_test_utils::open_bridge_with_storage::< + Runtime, + XcmOverBridgeHubPolkadotInstance, + >(locations, fee, LegacyLaneId([0, 0, 0, 1])) + }, + ) + .1 + }, construct_and_apply_extrinsic, + true, ) } diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml b/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml index e4fd5aa9e9..75598dc389 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml @@ -96,6 +96,8 @@ bp-relayers = { workspace = true } bp-runtime = { workspace = true } bp-kusama = { workspace = true } bp-polkadot = { workspace = true } +bp-xcm-bridge-hub = { workspace = true } +bp-xcm-bridge-hub-router = { workspace = true } bridge-hub-common = { workspace = true } bridge-runtime-common = { workspace = true } pallet-bridge-grandpa = { workspace = true } @@ -121,9 +123,11 @@ bridge-hub-test-utils = { workspace = true } bridge-runtime-common = { features = [ "integrity-test", ], workspace = true, default-features = true } +pallet-bridge-relayers = { workspace = true, features = ["integrity-test"] } sp-keyring = { workspace = true } static_assertions = { workspace = true } snowbridge-runtime-test-common = { workspace = true } +snowbridge-pallet-ethereum-client-fixtures = { workspace = true } parachains-runtimes-test-utils = { workspace = true } [features] @@ -141,6 +145,8 @@ std = [ "bp-polkadot/std", "bp-relayers/std", "bp-runtime/std", + "bp-xcm-bridge-hub-router/std", + "bp-xcm-bridge-hub/std", "bridge-hub-common/std", "bridge-runtime-common/std", "codec/std", @@ -251,6 +257,7 @@ runtime-benchmarks = [ "polkadot-parachain-primitives/runtime-benchmarks", "polkadot-runtime-common/runtime-benchmarks", "snowbridge-core/runtime-benchmarks", + "snowbridge-pallet-ethereum-client-fixtures/runtime-benchmarks", "snowbridge-pallet-ethereum-client/runtime-benchmarks", "snowbridge-pallet-inbound-queue/runtime-benchmarks", "snowbridge-pallet-outbound-queue/runtime-benchmarks", diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/primitives/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/primitives/src/lib.rs index 85b3570d2c..2d97a220d5 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/primitives/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/primitives/src/lib.rs @@ -25,7 +25,7 @@ use bp_runtime::{ decl_bridge_finality_runtime_apis, decl_bridge_messages_runtime_apis, Chain, ChainId, Parachain, }; use frame_support::dispatch::DispatchClass; -use sp_runtime::{FixedPointNumber, FixedU128, RuntimeDebug, Saturating}; +use sp_runtime::{FixedPointNumber, FixedU128, RuntimeDebug, Saturating, StateVersion}; /// BridgeHubPolkadot parachain. #[derive(RuntimeDebug)] @@ -33,6 +33,7 @@ pub struct BridgeHubPolkadot; impl Chain for BridgeHubPolkadot { const ID: ChainId = *b"bhpd"; + const STATE_VERSION: StateVersion = StateVersion::V1; type BlockNumber = BlockNumber; type Hash = Hash; @@ -84,7 +85,7 @@ pub const WITH_BRIDGE_HUB_POLKADOT_RELAYERS_PALLET_NAME: &str = "BridgeRelayers" pub const WITH_BRIDGE_POLKADOT_TO_KUSAMA_MESSAGES_PALLET_INDEX: u8 = 53; decl_bridge_finality_runtime_apis!(bridge_hub_polkadot); -decl_bridge_messages_runtime_apis!(bridge_hub_polkadot); +decl_bridge_messages_runtime_apis!(bridge_hub_polkadot, LegacyLaneId); frame_support::parameter_types! { /// The XCM fee that is paid for executing XCM program (with `ExportMessage` instruction) at the Polkadot @@ -94,11 +95,11 @@ frame_support::parameter_types! { /// Transaction fee that is paid at the Polkadot BridgeHub for delivering single inbound message. /// (initially was calculated by test `BridgeHubPolkadot::can_calculate_fee_for_standalone_message_delivery_transaction` + `33%`) - pub const BridgeHubPolkadotBaseDeliveryFeeInDots: Balance = 471_124_182; + pub const BridgeHubPolkadotBaseDeliveryFeeInDots: Balance = 471_317_032; /// Transaction fee that is paid at the Polkadot BridgeHub for delivering single outbound message confirmation. /// (initially was calculated by test `BridgeHubPolkadot::can_calculate_fee_for_standalone_message_confirmation_transaction` + `33%`) - pub const BridgeHubPolkadotBaseConfirmationFeeInDots: Balance = 86_188_932; + pub const BridgeHubPolkadotBaseConfirmationFeeInDots: Balance = 86_255_432; } /// Compute the total estimated fee that needs to be paid in DOTs by the sender when sending @@ -155,7 +156,7 @@ pub mod snowbridge { use frame_support::parameter_types; use snowbridge_core::{PricingParameters, Rewards, U256}; use sp_runtime::FixedU128; - use xcm::latest::NetworkId; + use xcm::latest::{Location, NetworkId}; parameter_types! { /// Should match the `ForeignAssets::create` index on Asset Hub. @@ -186,6 +187,7 @@ pub mod snowbridge { /// /// pub EthereumNetwork: NetworkId = NetworkId::Ethereum { chain_id: 1 }; + pub EthereumLocation: Location = Location::new(2, EthereumNetwork::get()); } } diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/bridge_to_ethereum_config.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/bridge_to_ethereum_config.rs index 342b169bab..02863e311f 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/bridge_to_ethereum_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/bridge_to_ethereum_config.rs @@ -15,13 +15,12 @@ // along with Cumulus. If not, see . use crate::{ - xcm_config, - xcm_config::{RelayTreasuryPalletAccount, UniversalLocation}, + xcm_config::{self, RelayNetwork, RelayTreasuryPalletAccount, UniversalLocation}, Balances, EthereumInboundQueue, EthereumOutboundQueue, EthereumSystem, MessageQueue, Runtime, RuntimeEvent, TransactionByteFee, }; -pub use bp_bridge_hub_polkadot::snowbridge::EthereumNetwork; use bp_bridge_hub_polkadot::snowbridge::{CreateAssetCall, InboundQueuePalletInstance, Parameters}; +pub use bp_bridge_hub_polkadot::snowbridge::{EthereumLocation, EthereumNetwork}; use frame_support::{parameter_types, weights::ConstantMultiplier}; use pallet_xcm::EnsureXcm; use parachains_common::{AccountId, Balance}; @@ -31,6 +30,7 @@ use snowbridge_router_primitives::{inbound::MessageToXcm, outbound::EthereumBlob use sp_core::H160; use sp_runtime::traits::{ConstU32, ConstU8, Keccak256}; use system_parachains_constants::polkadot::fee::WeightToFee; +use xcm::prelude::{GlobalConsensus, InteriorLocation, Location, Parachain}; /// Exports message to the Ethereum Gateway contract. pub type SnowbridgeExporter = EthereumBlobExporter< @@ -38,11 +38,14 @@ pub type SnowbridgeExporter = EthereumBlobExporter< EthereumNetwork, snowbridge_pallet_outbound_queue::Pallet, snowbridge_core::AgentIdOf, + EthereumSystem, >; parameter_types! { // The gateway address is set by governance. pub storage EthereumGatewayAddress: H160 = H160::zero(); + pub AssetHubFromEthereum: Location = Location::new(1,[GlobalConsensus(RelayNetwork::get()),Parachain(polkadot_runtime_constants::system_parachain::ASSET_HUB_ID)]); + pub EthereumUniversalLocation: InteriorLocation = [GlobalConsensus(EthereumNetwork::get())].into(); } impl snowbridge_pallet_inbound_queue::Config for Runtime { @@ -63,6 +66,9 @@ impl snowbridge_pallet_inbound_queue::Config for Runtime { InboundQueuePalletInstance, AccountId, Balance, + EthereumSystem, + EthereumUniversalLocation, + AssetHubFromEthereum, >; type WeightToFee = WeightToFee; type LengthToFee = ConstantMultiplier; @@ -139,9 +145,12 @@ parameter_types! { }; } +pub const SLOTS_PER_EPOCH: u32 = snowbridge_pallet_ethereum_client::config::SLOTS_PER_EPOCH as u32; + impl snowbridge_pallet_ethereum_client::Config for Runtime { type RuntimeEvent = RuntimeEvent; type ForkVersions = ChainForkVersions; + type FreeHeadersInterval = ConstU32; type WeightInfo = crate::weights::snowbridge_pallet_ethereum_client::WeightInfo; } @@ -157,6 +166,8 @@ impl snowbridge_pallet_system::Config for Runtime { type Helper = Runtime; type DefaultPricingParameters = Parameters; type InboundDeliveryCost = EthereumInboundQueue; + type UniversalLocation = UniversalLocation; + type EthereumLocation = EthereumLocation; } #[cfg(feature = "runtime-benchmarks")] diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/bridge_to_kusama_config.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/bridge_to_kusama_config.rs index f6433fa846..869972e9b1 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/bridge_to_kusama_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/bridge_to_kusama_config.rs @@ -20,35 +20,32 @@ use crate::{ weights, xcm_config::{UniversalLocation, XcmRouter}, AccountId, Balance, Balances, BlockNumber, BridgeKusamaMessages, PolkadotXcm, Runtime, - RuntimeEvent, RuntimeOrigin, XcmOverBridgeHubKusama, + RuntimeEvent, RuntimeHoldReason, XcmOverBridgeHubKusama, +}; + +use bp_messages::{ + source_chain::FromBridgedChainMessagesDeliveryProof, + target_chain::FromBridgedChainMessagesProof, LegacyLaneId, }; -use bp_messages::LaneId; use bp_parachains::SingleParaStoredHeaderDataBuilder; use bp_runtime::Chain; -use bridge_runtime_common::{ - extensions::refund_relayer_extension::{ - ActualFeeRefund, RefundBridgedParachainMessages, RefundSignedExtensionAdapter, - RefundableMessagesLane, RefundableParachain, - }, - messages, - messages::{ - source::{FromBridgedChainMessagesDeliveryProof, TargetHeaderChainAdapter}, - target::{FromBridgedChainMessagesProof, SourceHeaderChainAdapter}, - MessageBridge, ThisChainWithMessages, UnderlyingChainProvider, - }, - messages_xcm_extension::{ - SenderAndLane, XcmAsPlainPayload, XcmBlobHauler, XcmBlobHaulerAdapter, - XcmBlobMessageDispatch, XcmVersionOfDestAndRemoteBridge, - }, +use bridge_hub_common::xcm_version::XcmVersionOfDestAndRemoteBridge; +use frame_support::{ + parameter_types, + traits::{ConstU128, PalletInfoAccess}, }; -use frame_support::{parameter_types, traits::PalletInfoAccess}; +use frame_system::{EnsureNever, EnsureRoot}; +use pallet_bridge_messages::LaneIdOf; +use pallet_bridge_relayers::extension::{ + BridgeRelayersSignedExtension, WithMessagesExtensionConfig, +}; +use pallet_xcm_bridge_hub::XcmAsPlainPayload; +use parachains_common::xcm_config::{AllSiblingSystemParachains, RelayOrOtherSystemParachains}; +use polkadot_parachain_primitives::primitives::Sibling; use polkadot_runtime_constants as constants; -use sp_runtime::{traits::ConstU32, RuntimeDebug}; +use sp_runtime::traits::ConstU32; use xcm::latest::prelude::*; -use xcm_builder::BridgeBlobDispatcher; - -/// Lane identifier, used to connect Polkadot Asset Hub and Kusama Asset Hub. -pub const XCM_LANE_FOR_ASSET_HUB_POLKADOT_TO_ASSET_HUB_KUSAMA: LaneId = LaneId([0, 0, 0, 1]); +use xcm_builder::{BridgeBlobDispatcher, ParentIsPreset, SiblingParachainConvertsVia}; // Parameters that may be changed by the governance. parameter_types! { @@ -82,7 +79,7 @@ parameter_types! { /// Identifier of the sibling Polkadot Asset Hub parachain. pub AssetHubPolkadotParaId: cumulus_primitives_core::ParaId = polkadot_runtime_constants::system_parachain::ASSET_HUB_ID.into(); - /// Identifier of the bridged Kusama Asset Hub parachain. + /// Identifier of the sibling Kusama Asset Hub parachain. pub AssetHubKusamaParaId: cumulus_primitives_core::ParaId = kusama_runtime_constants::system_parachain::ASSET_HUB_ID.into(); /// Location of the bridged Kusama Bridge Hub parachain. pub BridgeHubKusamaLocation: Location = Location { @@ -92,28 +89,28 @@ parameter_types! { Parachain(::PARACHAIN_ID) ].into() }; +} - /// A route (XCM location and bridge lane) that the Polkadot Asset Hub -> Kusama Asset Hub - /// message is following. - pub FromAssetHubPolkadotToAssetHubKusamaRoute: SenderAndLane = SenderAndLane::new( - ParentThen(Parachain(AssetHubPolkadotParaId::get().into()).into()).into(), - XCM_LANE_FOR_ASSET_HUB_POLKADOT_TO_ASSET_HUB_KUSAMA, - ); - - /// Lane identifier, used to connect Polkadot Asset Hub and Kusama Asset Hub. - pub const AssetHubPolkadotToAssetHubKusamaMessagesLane: bp_messages::LaneId - = XCM_LANE_FOR_ASSET_HUB_POLKADOT_TO_ASSET_HUB_KUSAMA; - /// All active lanes that the current bridge supports. - pub ActiveOutboundLanesToBridgeHubKusama: &'static [bp_messages::LaneId] - = &[XCM_LANE_FOR_ASSET_HUB_POLKADOT_TO_ASSET_HUB_KUSAMA]; - - /// Lanes - pub ActiveLanes: sp_std::vec::Vec<(SenderAndLane, (NetworkId, InteriorLocation))> = sp_std::vec![ - ( - FromAssetHubPolkadotToAssetHubKusamaRoute::get(), - (KusamaGlobalConsensusNetwork::get(), Parachain(AssetHubKusamaParaId::get().into()).into()) - ) - ]; +pub type RelayersForLegacyLaneIdsMessagesInstance = (); +/// Allows collect and claim rewards for relayers. +impl pallet_bridge_relayers::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type Reward = Balance; + type PaymentProcedure = bp_relayers::PayRewardFromAccount< + pallet_balances::Pallet, + AccountId, + Self::LaneId, + >; + type StakeAndSlash = pallet_bridge_relayers::StakeAndSlashNamed< + AccountId, + BlockNumber, + Balances, + RelayerStakeReserveId, + RequiredStakeForStakeAndSlash, + RelayerStakeLease, + >; + type LaneId = LegacyLaneId; + type WeightInfo = weights::pallet_bridge_relayers::WeightInfo; } // Parameters, used by bridge transport code. @@ -136,16 +133,6 @@ parameter_types! { /// Name of the `paras` pallet at Kusama that tracks all parachain heads. pub const ParachainPalletNameAtKusama: &'static str = bp_kusama::PARAS_PALLET_NAME; - /// Maximal number of entries in the unrewarded relayers vector at the Polkadot Bridge Hub. It matches the - /// maximal number of unrewarded relayers that the single confirmation transaction at Kusama Bridge - /// Hub may process. - pub const MaxUnrewardedRelayerEntriesAtInboundLane: bp_messages::MessageNonce = - bp_bridge_hub_kusama::MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX; - /// Maximal number of unconfirmed messages at the Polkadot Bridge Hub. It matches the maximal number of - /// uncinfirmed messages that the single confirmation transaction at Kusama Bridge Hub may process. - pub const MaxUnconfirmedMessagesAtInboundLane: bp_messages::MessageNonce = - bp_bridge_hub_kusama::MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX; - /// Reserve identifier, used by the `pallet_bridge_relayers` to hold funds of registered relayer. pub const RelayerStakeReserveId: [u8; 8] = *b"brdgrlrs"; /// Minimal period of relayer registration. Roughly, it is the 1 hour of real time. @@ -159,6 +146,34 @@ parameter_types! { pub PriorityBoostPerMessage: u64 = 1_820_444_444_444; } +/// Proof of messages, coming from Kusama. +pub type FromKusamaBridgeHubMessagesProof = + FromBridgedChainMessagesProof>; +/// Messages delivery proof for Kusama Bridge Hub -> Polkadot Bridge Hub messages. +pub type ToKusamaBridgeHubMessagesDeliveryProof = + FromBridgedChainMessagesDeliveryProof>; + +/// Dispatches received XCM messages from other bridge +pub type FromKusamaMessageBlobDispatcher = BridgeBlobDispatcher< + XcmRouter, + UniversalLocation, + BridgePolkadotToKusamaMessagesPalletInstance, +>; + +/// Signed extension that refunds relayers that are delivering messages from the Kusama parachain. +pub type OnBridgeHubPolkadotRefundBridgeHubKusamaMessages = BridgeRelayersSignedExtension< + Runtime, + WithMessagesExtensionConfig< + StrOnBridgeHubPolkadotRefundBridgeHubKusamaMessages, + Runtime, + WithBridgeHubKusamaMessagesInstance, + RelayersForLegacyLaneIdsMessagesInstance, + PriorityBoostPerMessage, + >, + LaneIdOf, +>; +bp_runtime::generate_static_str_provider!(OnBridgeHubPolkadotRefundBridgeHubKusamaMessages); + /// Add GRANDPA bridge pallet to track Kusama relay chain. pub type BridgeGrandpaKusamaInstance = pallet_bridge_grandpa::Instance1; impl pallet_bridge_grandpa::Config for Runtime { @@ -183,88 +198,40 @@ impl pallet_bridge_parachains::Config for Runtime type MaxParaHeadDataSize = MaxParaHeadDataSize; } -/// Allows collect and claim rewards for relayers. -impl pallet_bridge_relayers::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type Reward = Balance; - type PaymentProcedure = - bp_relayers::PayRewardFromAccount, AccountId>; - type StakeAndSlash = pallet_bridge_relayers::StakeAndSlashNamed< - AccountId, - BlockNumber, - Balances, - RelayerStakeReserveId, - RequiredStakeForStakeAndSlash, - RelayerStakeLease, - >; - type WeightInfo = weights::pallet_bridge_relayers::WeightInfo; -} - /// Add XCM messages support for exchanging messages with BridgeHubKusama. pub type WithBridgeHubKusamaMessagesInstance = pallet_bridge_messages::Instance1; impl pallet_bridge_messages::Config for Runtime { type RuntimeEvent = RuntimeEvent; type WeightInfo = weights::pallet_bridge_messages::WeightInfo; - type BridgedChainId = BridgeHubKusamaChainId; - type ActiveOutboundLanes = ActiveOutboundLanesToBridgeHubKusama; - type MaxUnrewardedRelayerEntriesAtInboundLane = MaxUnrewardedRelayerEntriesAtInboundLane; - type MaxUnconfirmedMessagesAtInboundLane = MaxUnconfirmedMessagesAtInboundLane; - type MaximalOutboundPayloadSize = ToBridgeHubKusamaMaximalOutboundPayloadSize; - type OutboundPayload = XcmAsPlainPayload; + type ThisChain = bp_bridge_hub_polkadot::BridgeHubPolkadot; + type BridgedChain = bp_bridge_hub_kusama::BridgeHubKusama; + type BridgedHeaderChain = pallet_bridge_parachains::ParachainHeaders< + Runtime, + BridgeParachainKusamaInstance, + bp_bridge_hub_kusama::BridgeHubKusama, + >; + type OutboundPayload = XcmAsPlainPayload; type InboundPayload = XcmAsPlainPayload; - type InboundRelayer = AccountId; - type DeliveryPayments = (); + type LaneId = LegacyLaneId; - type TargetHeaderChain = TargetHeaderChainAdapter; + type DeliveryPayments = (); type DeliveryConfirmationPayments = pallet_bridge_relayers::DeliveryConfirmationPaymentsAdapter< Runtime, WithBridgeHubKusamaMessagesInstance, DeliveryRewardInBalance, >; - type SourceHeaderChain = SourceHeaderChainAdapter; - type MessageDispatch = XcmBlobMessageDispatch< - FromKusamaMessageBlobDispatcher, - Self::WeightInfo, - cumulus_pallet_xcmp_queue::bridging::OutXcmpChannelStatusProvider< - AssetHubPolkadotParaId, - Runtime, - >, - >; - type OnMessagesDelivered = OnMessagesDeliveredFromKusama; -} - -/// Proof of messages, coming from Kusama. -pub type FromKusamaBridgeHubMessagesProof = - FromBridgedChainMessagesProof; -/// Messages delivery proof for Polkadot Bridge Hub -> Kusama Bridge Hub messages. -pub type ToKusamaBridgeHubMessagesDeliveryProof = - FromBridgedChainMessagesDeliveryProof; - -/// Dispatches received XCM messages from Kusama BridgeHub. -type FromKusamaMessageBlobDispatcher = BridgeBlobDispatcher< - XcmRouter, - UniversalLocation, - BridgePolkadotToKusamaMessagesPalletInstance, ->; - -/// Export XCM messages to be relayed to the other side -pub type ToBridgeHubKusamaHaulBlobExporter = XcmOverBridgeHubKusama; -pub struct ToBridgeHubKusamaXcmBlobHauler; -impl XcmBlobHauler for ToBridgeHubKusamaXcmBlobHauler { - type Runtime = Runtime; - type MessagesInstance = WithBridgeHubKusamaMessagesInstance; - - type ToSourceChainSender = XcmRouter; - type CongestedMessage = bp_asset_hub_polkadot::CongestedMessage; - type UncongestedMessage = bp_asset_hub_polkadot::UncongestedMessage; + type MessageDispatch = XcmOverBridgeHubKusama; + type OnMessagesDelivered = XcmOverBridgeHubKusama; } /// Add support for the export and dispatch of XCM programs. pub type XcmOverBridgeHubKusamaInstance = pallet_xcm_bridge_hub::Instance1; impl pallet_xcm_bridge_hub::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type UniversalLocation = UniversalLocation; type BridgedNetwork = KusamaGlobalConsensusNetworkLocation; type BridgeMessagesPalletInstance = WithBridgeHubKusamaMessagesInstance; @@ -273,79 +240,218 @@ impl pallet_xcm_bridge_hub::Config for Runtime { // covered by the measured weight of the `ExportMessage` instruction. type MessageExportPrice = (); type DestinationVersion = XcmVersionOfDestAndRemoteBridge; - type Lanes = ActiveLanes; - type LanesSupport = ToBridgeHubKusamaXcmBlobHauler; -} -/// On messages delivered callback. -type OnMessagesDeliveredFromKusama = - XcmBlobHaulerAdapter; - -/// Messaging Bridge configuration for BridgeHubPolkadot -> BridgeHubKusama -pub struct WithBridgeHubKusamaMessageBridge; -impl MessageBridge for WithBridgeHubKusamaMessageBridge { - const BRIDGED_MESSAGES_PALLET_NAME: &'static str = - bp_bridge_hub_polkadot::WITH_BRIDGE_HUB_POLKADOT_MESSAGES_PALLET_NAME; - type ThisChain = BridgeHubPolkadot; - type BridgedChain = BridgeHubKusama; - type BridgedHeaderChain = pallet_bridge_parachains::ParachainHeaders< - Runtime, - BridgeParachainKusamaInstance, - bp_bridge_hub_kusama::BridgeHubKusama, - >; + type ForceOrigin = EnsureRoot; + // We don't want to allow creating bridges for this instance with `LegacyLaneId`. + type OpenBridgeOrigin = EnsureNever; + // Converter aligned with `OpenBridgeOrigin`. + type BridgeOriginAccountIdConverter = + (ParentIsPreset, SiblingParachainConvertsVia); + + // We do not allow creating bridges here (see `T::OpenBridgeOrigin` above), so there is no need + // to set a deposit. + type BridgeDeposit = ConstU128<0>; + type Currency = Balances; + type RuntimeHoldReason = RuntimeHoldReason; + type AllowWithoutBridgeDeposit = + RelayOrOtherSystemParachains; + + type LocalXcmChannelManager = XcmpQueueChannelManager; + type BlobDispatcher = FromKusamaMessageBlobDispatcher; } -/// Maximal outbound payload size of BridgeHubPolkadot -> BridgeHubKusama messages. -pub type ToBridgeHubKusamaMaximalOutboundPayloadSize = - messages::source::FromThisChainMaximalOutboundPayloadSize; +/// Implementation `bp_xcm_bridge_hub::LocalXcmChannelManager`. +pub struct XcmpQueueChannelManager; +impl bp_xcm_bridge_hub::LocalXcmChannelManager for XcmpQueueChannelManager { + type Error = (); + + fn is_congested(with: &Location) -> bool { + // This is used to check the inbound queue/messages to determine if they can be dispatched + // and sent to the sibling parachain. Therefore, checking `OutXcmp` is sufficient. + use bp_xcm_bridge_hub_router::XcmChannelStatusProvider; + cumulus_pallet_xcmp_queue::bridging::OutXcmpChannelStatusProvider::::is_congested( + with, + ) + } -/// BridgeHubKusama chain from message lane point of view. -#[derive(RuntimeDebug, Clone, Copy)] -pub struct BridgeHubKusama; + fn suspend_bridge( + _local_origin: &Location, + _: pallet_xcm_bridge_hub::BridgeId, + ) -> Result<(), Self::Error> { + // IMPORTANT NOTE: + // + // Unfortunately, `https://github.com/paritytech/polkadot-sdk/pull/6231` reworked congestion is not yet released. + // + // And unfortunately, we don't have access to `XcmpQueue::send_signal(para, + // ChannelSignal::Suspend)` here (which would require patch release), we can add this + // hacky workaround/tmp/implementation that should trigger `ChannelSignal::Suspend`, e.g.: + /* + use crate::{MessageQueue, XcmpQueue}; + use bridge_hub_common::message_queue::AggregateMessageOrigin; + use codec::{Decode, Encode, MaxEncodedLen}; + use frame_support::traits::EnqueueMessage; + use frame_support::pallet_prelude::OptionQuery; + use pallet_message_queue::OnQueueChanged; + use scale_info::TypeInfo; + + // get sibling para id + let local_origin_para_id: crate::ParaId = match _local_origin.unpack() { + (1, [Parachain(id)]) => (*id).into(), + _ => return Err(()) + }; + + // read `suspend_threshold` from `XcmpQueue` storage + #[derive(Copy, Clone, Eq, PartialEq, Encode, Decode, TypeInfo, MaxEncodedLen)] + struct QueueConfigData { + suspend_threshold: u32, + drop_threshold: u32, + resume_threshold: u32, + } + #[frame_support::storage_alias] + type QueueConfig = StorageValue; + let suspend_threshold = match QueueConfig::get() { + Some(qc) => qc.suspend_threshold, + None => return Err(()) + }; + + // Now, this should trigger `XcmpQueue::send_signal(para, ChannelSignal::Suspend)` + let mut qf = MessageQueue::footprint(AggregateMessageOrigin::Sibling(local_origin_para_id)); + qf.ready_pages = suspend_threshold; + XcmpQueue::on_queue_changed(local_origin_para_id.into(), qf); + */ + + // IMPORTANT NOTE2: + // + // In the current setup, this code is likely triggered only for the hard-coded AHK<>AHP + // lane, as we do not support any other bridge lanes on BridgeHubs. It is triggered only + // when `pallet_bridge_messages::OutboundMessages` reaches 8,192 undelivered messages. The + // potential risk of keeping `Ok(())` or `Err(())` here is that + // `pallet_bridge_messages::OutboundMessages` may continue to grow: + // + // ``` + // #[pallet::storage] + // pub type OutboundMessages, I: 'static = ()> = + // StorageMap<_, Blake2_128Concat, MessageKey, StoredMessagePayload>; + // ``` + + // TODO: decide: + // 1. wait for patch-release stable2409-3 2024-12-12 + // 2. go with `Ok(())` / `Err(())` + // 3. go with `XcmpQueue::send_signal` temporary workaround till patch release + + Ok(()) + } -impl UnderlyingChainProvider for BridgeHubKusama { - type Chain = bp_bridge_hub_kusama::BridgeHubKusama; + fn resume_bridge( + _local_origin: &Location, + _: pallet_xcm_bridge_hub::BridgeId, + ) -> Result<(), Self::Error> { + // IMPORTANT NOTE: + // + // Unfortunately, `https://github.com/paritytech/polkadot-sdk/pull/6231` reworked congestion is not yet released. + // + // And unfortunately, we don't have access to `XcmpQueue::send_signal(para, + // ChannelSignal::Resume)` here (which would require patch release), we can add this hacky + // workaround/tmp/implementation that should trigger `ChannelSignal::Resume`, e.g.: + /* + use crate::{MessageQueue, XcmpQueue}; + use bridge_hub_common::message_queue::AggregateMessageOrigin; + use codec::{Decode, Encode, MaxEncodedLen}; + use frame_support::traits::EnqueueMessage; + use frame_support::pallet_prelude::OptionQuery; + use pallet_message_queue::OnQueueChanged; + use scale_info::TypeInfo; + + // get sibling para id + let local_origin_para_id: crate::ParaId = match _local_origin.unpack() { + (1, [Parachain(id)]) => (*id).into(), + _ => return Err(()) + }; + + // read `resume_threshold` from `XcmpQueue` storage + #[derive(Copy, Clone, Eq, PartialEq, Encode, Decode, TypeInfo, MaxEncodedLen)] + struct QueueConfigData { + suspend_threshold: u32, + drop_threshold: u32, + resume_threshold: u32, + } + #[frame_support::storage_alias] + type QueueConfig = StorageValue; + let resume_threshold = match QueueConfig::get() { + Some(qc) => qc.resume_threshold, + None => return Err(()) + }; + + // Now, this should trigger `XcmpQueue::send_signal(para, ChannelSignal::Resume)` + let mut qf = MessageQueue::footprint(AggregateMessageOrigin::Sibling(local_origin_para_id)); + qf.ready_pages = resume_threshold; + XcmpQueue::on_queue_changed(local_origin_para_id.into(), qf); + */ + + // TODO: decide: + // 1. wait for patch-release stable2409-3 2024-12-12 + // 2. go with `Ok(())` / `Err(())` + // 3. go with `XcmpQueue::send_signal` temporary workaround till patch release + + Ok(()) + } } -impl messages::BridgedChainWithMessages for BridgeHubKusama {} - -/// BridgeHubPolkadot chain from message lane point of view. -#[derive(RuntimeDebug, Clone, Copy)] -pub struct BridgeHubPolkadot; - -impl UnderlyingChainProvider for BridgeHubPolkadot { - type Chain = bp_bridge_hub_polkadot::BridgeHubPolkadot; -} +#[cfg(feature = "runtime-benchmarks")] +pub(crate) fn open_bridge_for_benchmarks( + with: pallet_xcm_bridge_hub::LaneIdOf, + sibling_para_id: u32, +) -> InteriorLocation +where + R: pallet_xcm_bridge_hub::Config, + XBHI: 'static, + C: xcm_executor::traits::ConvertLocation< + bp_runtime::AccountIdOf>, + >, +{ + use pallet_xcm_bridge_hub::{Bridge, BridgeId, BridgeState}; + use sp_runtime::traits::Zero; + use xcm::VersionedInteriorLocation; + + // insert bridge metadata + let lane_id = with; + let sibling_parachain = Location::new(1, [Parachain(sibling_para_id)]); + let universal_source = [GlobalConsensus(Polkadot), Parachain(sibling_para_id)].into(); + let universal_destination = [GlobalConsensus(Kusama), Parachain(2075)].into(); + let bridge_id = BridgeId::new(&universal_source, &universal_destination); + + // insert only bridge metadata, because the benchmarks create lanes + pallet_xcm_bridge_hub::Bridges::::insert( + bridge_id, + Bridge { + bridge_origin_relative_location: sp_std::boxed::Box::new( + sibling_parachain.clone().into(), + ), + bridge_origin_universal_location: sp_std::boxed::Box::new( + VersionedInteriorLocation::from(universal_source.clone()), + ), + bridge_destination_universal_location: sp_std::boxed::Box::new( + VersionedInteriorLocation::from(universal_destination), + ), + state: BridgeState::Opened, + bridge_owner_account: C::convert_location(&sibling_parachain).expect("valid AccountId"), + deposit: Zero::zero(), + lane_id, + }, + ); + pallet_xcm_bridge_hub::LaneToBridge::::insert(lane_id, bridge_id); -impl ThisChainWithMessages for BridgeHubPolkadot { - type RuntimeOrigin = RuntimeOrigin; + universal_source } -/// Signed extension that refunds relayers that are delivering messages from the Kusama parachain. -pub type RefundBridgeHubKusamaMessages = RefundSignedExtensionAdapter< - RefundBridgedParachainMessages< - Runtime, - RefundableParachain, - RefundableMessagesLane< - WithBridgeHubKusamaMessagesInstance, - AssetHubPolkadotToAssetHubKusamaMessagesLane, - >, - ActualFeeRefund, - PriorityBoostPerMessage, - StrRefundBridgeHubKusamaMessages, - >, ->; -bp_runtime::generate_static_str_provider!(RefundBridgeHubKusamaMessages); - #[cfg(test)] mod tests { use super::*; use bridge_runtime_common::{ assert_complete_bridge_types, integrity::{ - assert_complete_bridge_constants, check_message_lane_weights, - AssertBridgeMessagesPalletConstants, AssertBridgePalletNames, AssertChainConstants, - AssertCompleteBridgeConstants, + assert_complete_with_parachain_bridge_constants, check_message_lane_weights, + AssertChainConstants, AssertCompleteBridgeConstants, }, }; @@ -384,50 +490,36 @@ mod tests { runtime: Runtime, with_bridged_chain_grandpa_instance: BridgeGrandpaKusamaInstance, with_bridged_chain_messages_instance: WithBridgeHubKusamaMessagesInstance, - bridge: WithBridgeHubKusamaMessageBridge, - this_chain: bp_polkadot::Polkadot, - bridged_chain: bp_kusama::Kusama, + this_chain: bp_bridge_hub_polkadot::BridgeHubPolkadot, + bridged_chain: bp_bridge_hub_kusama::BridgeHubKusama, ); - assert_complete_bridge_constants::< + assert_complete_with_parachain_bridge_constants::< Runtime, BridgeGrandpaKusamaInstance, WithBridgeHubKusamaMessagesInstance, - WithBridgeHubKusamaMessageBridge, + bp_kusama::Kusama, >(AssertCompleteBridgeConstants { this_chain_constants: AssertChainConstants { block_length: bp_bridge_hub_polkadot::BlockLength::get(), block_weights: bp_bridge_hub_polkadot::BlockWeights::get(), }, - messages_pallet_constants: AssertBridgeMessagesPalletConstants { - max_unrewarded_relayers_in_bridged_confirmation_tx: - bp_bridge_hub_kusama::MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX, - max_unconfirmed_messages_in_bridged_confirmation_tx: - bp_bridge_hub_kusama::MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX, - bridged_chain_id: bp_bridge_hub_kusama::BridgeHubKusama::ID, - }, - pallet_names: AssertBridgePalletNames { - with_this_chain_messages_pallet_name: - bp_bridge_hub_polkadot::WITH_BRIDGE_HUB_POLKADOT_MESSAGES_PALLET_NAME, - with_bridged_chain_grandpa_pallet_name: bp_kusama::WITH_KUSAMA_GRANDPA_PALLET_NAME, - with_bridged_chain_messages_pallet_name: - bp_bridge_hub_kusama::WITH_BRIDGE_HUB_KUSAMA_MESSAGES_PALLET_NAME, - }, }); - bridge_runtime_common::extensions::priority_calculator::per_relay_header::ensure_priority_boost_is_sane::< + pallet_bridge_relayers::extension::per_relay_header::ensure_priority_boost_is_sane::< Runtime, BridgeGrandpaKusamaInstance, PriorityBoostPerRelayHeader, >(FEE_BOOST_PER_RELAY_HEADER); - bridge_runtime_common::extensions::priority_calculator::per_parachain_header::ensure_priority_boost_is_sane::< + pallet_bridge_relayers::extension::per_parachain_header::ensure_priority_boost_is_sane::< Runtime, - RefundableParachain, + WithBridgeHubKusamaMessagesInstance, + bp_bridge_hub_kusama::BridgeHubKusama, PriorityBoostPerParachainHeader, >(FEE_BOOST_PER_PARACHAIN_HEADER); - bridge_runtime_common::extensions::priority_calculator::per_message::ensure_priority_boost_is_sane::< + pallet_bridge_relayers::extension::per_message::ensure_priority_boost_is_sane::< Runtime, WithBridgeHubKusamaMessagesInstance, PriorityBoostPerMessage, @@ -444,3 +536,27 @@ mod tests { .starts_with(&KusamaGlobalConsensusNetworkLocation::get())); } } + +/// Contains the migration for the AssetHubPolkadot<>AssetHubKusama bridge. +pub mod migration { + use super::*; + use frame_support::traits::ConstBool; + + parameter_types! { + pub AssetHubPolkadotToAssetHubKusamaMessagesLane: LegacyLaneId = LegacyLaneId([0, 0, 0, 1]); + pub AssetHubPolkadotLocation: Location = Location::new(1, [Parachain(bp_asset_hub_polkadot::ASSET_HUB_POLKADOT_PARACHAIN_ID)]); + pub AssetHubKusamaUniversalLocation: InteriorLocation = [GlobalConsensus(KusamaGlobalConsensusNetwork::get()), Parachain(bp_asset_hub_kusama::ASSET_HUB_KUSAMA_PARACHAIN_ID)].into(); + } + + /// Ensure that the existing lanes for the AHR<>AHW bridge are correctly configured. + pub type StaticToDynamicLanes = pallet_xcm_bridge_hub::migration::OpenBridgeForLane< + Runtime, + XcmOverBridgeHubKusamaInstance, + AssetHubPolkadotToAssetHubKusamaMessagesLane, + // the lanes are already created for AHP<>AHK, but we need to link them to the bridge + // structs + ConstBool, + AssetHubPolkadotLocation, + AssetHubKusamaUniversalLocation, + >; +} diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/genesis_config_presets.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/genesis_config_presets.rs index e4ee542bea..20b5409148 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/genesis_config_presets.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/genesis_config_presets.rs @@ -56,6 +56,7 @@ fn bridge_hub_polkadot_genesis( ) }) .collect(), + ..Default::default() }, "polkadotXcm": { "safeXcmVersion": Some(SAFE_XCM_VERSION), diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs index fb126dd71b..83baa66f87 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs @@ -122,7 +122,7 @@ pub type SignedExtra = ( frame_system::CheckWeight, pallet_transaction_payment::ChargeTransactionPayment, BridgeRejectObsoleteHeadersAndMessages, - bridge_to_kusama_config::RefundBridgeHubKusamaMessages, + bridge_to_kusama_config::OnBridgeHubPolkadotRefundBridgeHubKusamaMessages, frame_metadata_hash_extension::CheckMetadataHash, ); @@ -140,10 +140,29 @@ bridge_runtime_common::generate_bridge_reject_obsolete_headers_and_messages! { pub type UncheckedExtrinsic = generic::UncheckedExtrinsic; +parameter_types! { + pub const BridgeKusamaMessagesPalletName: &'static str = "BridgeKusamaMessages"; + pub const OutboundLanesCongestedSignalsKey: &'static str = "OutboundLanesCongestedSignals"; +} + /// Migrations to apply on runtime upgrade. pub type Migrations = ( // unreleased and/or un-applied cumulus_pallet_xcmp_queue::migration::v5::MigrateV4ToV5, + pallet_bridge_messages::migration::v1::MigrationToV1< + Runtime, + bridge_to_kusama_config::WithBridgeHubKusamaMessagesInstance, + >, + bridge_to_kusama_config::migration::StaticToDynamicLanes, + frame_support::migrations::RemoveStorage< + BridgeKusamaMessagesPalletName, + OutboundLanesCongestedSignalsKey, + RocksDbWeight, + >, + pallet_bridge_relayers::migration::v1::MigrationToV1< + Runtime, + bridge_to_kusama_config::RelayersForLegacyLaneIdsMessagesInstance, + >, // permanent pallet_xcm::migration::MigrateToLatestXcmVersion, ); @@ -582,6 +601,9 @@ construct_runtime!( } ); +#[cfg(feature = "runtime-benchmarks")] +use pallet_bridge_messages::LaneIdOf; + #[cfg(feature = "runtime-benchmarks")] mod benches { frame_benchmarking::define_benchmarks!( @@ -867,7 +889,7 @@ impl_runtime_apis! { impl bp_bridge_hub_kusama::FromBridgeHubKusamaInboundLaneApi for Runtime { fn message_details( - lane: bp_messages::LaneId, + lane: bp_messages::LegacyLaneId, messages: Vec<(bp_messages::MessagePayload, bp_messages::OutboundMessageDetails)>, ) -> Vec { bridge_runtime_common::messages_api::inbound_message_details::< @@ -879,7 +901,7 @@ impl_runtime_apis! { impl bp_bridge_hub_kusama::ToBridgeHubKusamaOutboundLaneApi for Runtime { fn message_details( - lane: bp_messages::LaneId, + lane: bp_messages::LegacyLaneId, begin: bp_messages::MessageNonce, end: bp_messages::MessageNonce, ) -> Vec { @@ -1140,11 +1162,36 @@ impl_runtime_apis! { ); BenchmarkError::Stop("XcmVersion was not stored!") })?; + + let sibling_system_parachain_id = Parachain(1000); + let remote_parachain_id = Parachain(8765); + let sibling_parachain_location = Location::new(1, [sibling_system_parachain_id]); + + // open bridge + let bridge_destination_universal_location: InteriorLocation = [GlobalConsensus(NetworkId::Kusama), remote_parachain_id].into(); + let locations = XcmOverBridgeHubKusama::bridge_locations( + sibling_parachain_location.clone(), + bridge_destination_universal_location.clone(), + )?; + XcmOverBridgeHubKusama::do_open_bridge( + locations, + bp_messages::LegacyLaneId([1, 2, 3, 4]), + true, + ).map_err(|e| { + log::error!( + "Failed to `XcmOverBridgeHubRococo::open_bridge`({:?}, {:?})`, error: {:?}", + sibling_parachain_location, + bridge_destination_universal_location, + e + ); + BenchmarkError::Stop("Bridge was not opened!") + })?; + Ok( ( - bridge_to_kusama_config::FromAssetHubPolkadotToAssetHubKusamaRoute::get().location, + sibling_parachain_location, NetworkId::Kusama, - Parachain(bridge_to_kusama_config::AssetHubKusamaParaId::get().into()).into() + [remote_parachain_id].into() ) ) } @@ -1168,12 +1215,13 @@ impl_runtime_apis! { impl BridgeRelayersConfig for Runtime { fn prepare_rewards_account( - account_params: bp_relayers::RewardsAccountParams, + account_params: bp_relayers::RewardsAccountParams>, reward: Balance, ) { let rewards_account = bp_relayers::PayRewardFromAccount::< Balances, - AccountId + AccountId, + LaneIdOf >::rewards_account(account_params); Self::deposit_account(rewards_account, reward); } @@ -1196,17 +1244,17 @@ impl_runtime_apis! { fn prepare_parachain_heads_proof( parachains: &[bp_polkadot_core::parachains::ParaId], parachain_head_size: u32, - proof_size: bp_runtime::StorageProofSize, + proof_params: bp_runtime::UnverifiedStorageProofParams, ) -> ( - pallet_bridge_parachains::RelayBlockNumber, - pallet_bridge_parachains::RelayBlockHash, + bp_parachains::RelayBlockNumber, + bp_parachains::RelayBlockHash, bp_polkadot_core::parachains::ParaHeadsProof, Vec<(bp_polkadot_core::parachains::ParaId, bp_polkadot_core::parachains::ParaHash)>, ) { prepare_parachain_heads_proof::( parachains, parachain_head_size, - proof_size, + proof_params, ) } } @@ -1225,7 +1273,8 @@ impl_runtime_apis! { impl BridgeMessagesConfig for Runtime { fn is_relayer_rewarded(relayer: &Self::AccountId) -> bool { let bench_lane_id = >::bench_lane_id(); - let bridged_chain_id = bridge_to_kusama_config::BridgeHubKusamaChainId::get(); + use bp_runtime::Chain; + let bridged_chain_id =>::BridgedChain::ID; pallet_bridge_relayers::Pallet::::relayer_reward( relayer, bp_relayers::RewardsAccountParams::new( @@ -1237,25 +1286,35 @@ impl_runtime_apis! { } fn prepare_message_proof( - params: MessageProofParams, - ) -> (bridge_to_kusama_config::FromKusamaBridgeHubMessagesProof, Weight) { + params: MessageProofParams>, + ) -> (bridge_to_kusama_config::FromKusamaBridgeHubMessagesProof, Weight) { use cumulus_primitives_core::XcmpMessageSource; assert!(XcmpQueue::take_outbound_messages(usize::MAX).is_empty()); ParachainSystem::open_outbound_hrmp_channel_for_benchmarks_or_tests(42.into()); + let universal_source = bridge_to_kusama_config::open_bridge_for_benchmarks::< + Runtime, + bridge_to_kusama_config::XcmOverBridgeHubKusamaInstance, + xcm_config::LocationToAccountId, + >(params.lane, 42); prepare_message_proof_from_parachain::< Runtime, bridge_to_kusama_config::BridgeGrandpaKusamaInstance, - bridge_to_kusama_config::WithBridgeHubKusamaMessageBridge, - >(params, generate_xcm_builder_bridge_message_sample([GlobalConsensus(Polkadot), Parachain(42)].into())) + bridge_to_kusama_config::WithBridgeHubKusamaMessagesInstance, + >(params, generate_xcm_builder_bridge_message_sample(universal_source)) } fn prepare_message_delivery_proof( - params: MessageDeliveryProofParams, - ) -> bridge_to_kusama_config::ToKusamaBridgeHubMessagesDeliveryProof { + params: MessageDeliveryProofParams>, + ) -> bridge_to_kusama_config::ToKusamaBridgeHubMessagesDeliveryProof { + let _ = bridge_to_kusama_config::open_bridge_for_benchmarks::< + Runtime, + bridge_to_kusama_config::XcmOverBridgeHubKusamaInstance, + xcm_config::LocationToAccountId, + >(params.lane, 42); prepare_message_delivery_proof_from_parachain::< Runtime, bridge_to_kusama_config::BridgeGrandpaKusamaInstance, - bridge_to_kusama_config::WithBridgeHubKusamaMessageBridge, + bridge_to_kusama_config::WithBridgeHubKusamaMessagesInstance, >(params) } diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_bridge_messages.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_bridge_messages.rs index bba1f14218..982657940a 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_bridge_messages.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_bridge_messages.rs @@ -69,22 +69,27 @@ impl pallet_bridge_messages::WeightInfo for WeightInfo< } /// Storage: `BridgeKusamaMessages::PalletOperatingMode` (r:1 w:0) /// Proof: `BridgeKusamaMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`) - /// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:0) - /// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: Some(1282), added: 1777, mode: `MaxEncodedLen`) /// Storage: `BridgeKusamaParachains::ImportedParaHeads` (r:1 w:0) - /// Proof: `BridgeKusamaParachains::ImportedParaHeads` (`max_values`: Some(600), `max_size`: Some(196), added: 1681, mode: `MaxEncodedLen`) + /// Proof: `BridgeKusamaParachains::ImportedParaHeads` (`max_values`: Some(64), `max_size`: Some(196), added: 1186, mode: `MaxEncodedLen`) /// Storage: `BridgeKusamaMessages::InboundLanes` (r:1 w:1) - /// Proof: `BridgeKusamaMessages::InboundLanes` (`max_values`: None, `max_size`: Some(49180), added: 51655, mode: `MaxEncodedLen`) + /// Proof: `BridgeKusamaMessages::InboundLanes` (`max_values`: None, `max_size`: Some(49209), added: 51684, mode: `MaxEncodedLen`) + /// Storage: `XcmOverBridgeHubKusama::LaneToBridge` (r:1 w:0) + /// Proof: `XcmOverBridgeHubKusama::LaneToBridge` (`max_values`: None, `max_size`: Some(65), added: 2540, mode: `MaxEncodedLen`) + /// Storage: `XcmOverBridgeHubKusama::Bridges` (r:1 w:0) + /// Proof: `XcmOverBridgeHubKusama::Bridges` (`max_values`: None, `max_size`: Some(1918), added: 4393, mode: `MaxEncodedLen`) /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) - fn receive_two_messages_proof() -> Weight { + /// The range of component `n` is `[1, 4076]`. + fn receive_n_messages_proof(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `595` - // Estimated: `52645` - // Minimum execution time: 71_851_000 picoseconds. - Weight::from_parts(72_520_000, 0) - .saturating_add(Weight::from_parts(0, 52645)) - .saturating_add(T::DbWeight::get().reads(5)) + // Measured: `701` + // Estimated: `52674` + // Minimum execution time: 62_034_000 picoseconds. + Weight::from_parts(63_355_000, 0) + .saturating_add(Weight::from_parts(0, 52674)) + // Standard Error: 8_231 + .saturating_add(Weight::from_parts(14_096_117, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `BridgeKusamaMessages::PalletOperatingMode` (r:1 w:0) @@ -109,38 +114,27 @@ impl pallet_bridge_messages::WeightInfo for WeightInfo< } /// Storage: `BridgeKusamaMessages::PalletOperatingMode` (r:1 w:0) /// Proof: `BridgeKusamaMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`) - /// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:0) - /// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: Some(1282), added: 1777, mode: `MaxEncodedLen`) /// Storage: `BridgeKusamaParachains::ImportedParaHeads` (r:1 w:0) - /// Proof: `BridgeKusamaParachains::ImportedParaHeads` (`max_values`: Some(600), `max_size`: Some(196), added: 1681, mode: `MaxEncodedLen`) + /// Proof: `BridgeKusamaParachains::ImportedParaHeads` (`max_values`: Some(64), `max_size`: Some(196), added: 1186, mode: `MaxEncodedLen`) /// Storage: `BridgeKusamaMessages::InboundLanes` (r:1 w:1) - /// Proof: `BridgeKusamaMessages::InboundLanes` (`max_values`: None, `max_size`: Some(49180), added: 51655, mode: `MaxEncodedLen`) - fn receive_single_message_proof_1_kb() -> Weight { - // Proof Size summary in bytes: - // Measured: `563` - // Estimated: `52645` - // Minimum execution time: 54_011_000 picoseconds. - Weight::from_parts(54_860_000, 0) - .saturating_add(Weight::from_parts(0, 52645)) - .saturating_add(T::DbWeight::get().reads(4)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: `BridgeKusamaMessages::PalletOperatingMode` (r:1 w:0) - /// Proof: `BridgeKusamaMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`) - /// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:0) - /// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: Some(1282), added: 1777, mode: `MaxEncodedLen`) - /// Storage: `BridgeKusamaParachains::ImportedParaHeads` (r:1 w:0) - /// Proof: `BridgeKusamaParachains::ImportedParaHeads` (`max_values`: Some(600), `max_size`: Some(196), added: 1681, mode: `MaxEncodedLen`) - /// Storage: `BridgeKusamaMessages::InboundLanes` (r:1 w:1) - /// Proof: `BridgeKusamaMessages::InboundLanes` (`max_values`: None, `max_size`: Some(49180), added: 51655, mode: `MaxEncodedLen`) - fn receive_single_message_proof_16_kb() -> Weight { + /// Proof: `BridgeKusamaMessages::InboundLanes` (`max_values`: None, `max_size`: Some(49209), added: 51684, mode: `MaxEncodedLen`) + /// Storage: `XcmOverBridgeHubKusama::LaneToBridge` (r:1 w:0) + /// Proof: `XcmOverBridgeHubKusama::LaneToBridge` (`max_values`: None, `max_size`: Some(65), added: 2540, mode: `MaxEncodedLen`) + /// Storage: `XcmOverBridgeHubKusama::Bridges` (r:1 w:0) + /// Proof: `XcmOverBridgeHubKusama::Bridges` (`max_values`: None, `max_size`: Some(1918), added: 4393, mode: `MaxEncodedLen`) + /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) + /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// The range of component `n` is `[1, 16384]`. + fn receive_single_n_bytes_message_proof(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `563` - // Estimated: `52645` - // Minimum execution time: 87_801_000 picoseconds. - Weight::from_parts(88_701_000, 0) - .saturating_add(Weight::from_parts(0, 52645)) - .saturating_add(T::DbWeight::get().reads(4)) + // Measured: `701` + // Estimated: `52674` + // Minimum execution time: 58_688_000 picoseconds. + Weight::from_parts(61_404_716, 0) + .saturating_add(Weight::from_parts(0, 52674)) + // Standard Error: 7 + .saturating_add(Weight::from_parts(2_249, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `BridgeKusamaMessages::PalletOperatingMode` (r:1 w:0) @@ -205,12 +199,14 @@ impl pallet_bridge_messages::WeightInfo for WeightInfo< } /// Storage: `BridgeKusamaMessages::PalletOperatingMode` (r:1 w:0) /// Proof: `BridgeKusamaMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`) - /// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:1) - /// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: Some(1282), added: 1777, mode: `MaxEncodedLen`) /// Storage: `BridgeKusamaParachains::ImportedParaHeads` (r:1 w:0) - /// Proof: `BridgeKusamaParachains::ImportedParaHeads` (`max_values`: Some(600), `max_size`: Some(196), added: 1681, mode: `MaxEncodedLen`) + /// Proof: `BridgeKusamaParachains::ImportedParaHeads` (`max_values`: Some(64), `max_size`: Some(196), added: 1186, mode: `MaxEncodedLen`) /// Storage: `BridgeKusamaMessages::InboundLanes` (r:1 w:1) - /// Proof: `BridgeKusamaMessages::InboundLanes` (`max_values`: None, `max_size`: Some(49180), added: 51655, mode: `MaxEncodedLen`) + /// Proof: `BridgeKusamaMessages::InboundLanes` (`max_values`: None, `max_size`: Some(49209), added: 51684, mode: `MaxEncodedLen`) + /// Storage: `XcmOverBridgeHubKusama::LaneToBridge` (r:1 w:0) + /// Proof: `XcmOverBridgeHubKusama::LaneToBridge` (`max_values`: None, `max_size`: Some(65), added: 2540, mode: `MaxEncodedLen`) + /// Storage: `XcmOverBridgeHubKusama::Bridges` (r:1 w:0) + /// Proof: `XcmOverBridgeHubKusama::Bridges` (`max_values`: None, `max_size`: Some(1918), added: 4393, mode: `MaxEncodedLen`) /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) /// Storage: `XcmpQueue::DeliveryFeeFactor` (r:1 w:0) @@ -223,19 +219,21 @@ impl pallet_bridge_messages::WeightInfo for WeightInfo< /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `ParachainSystem::RelevantMessagingState` (r:1 w:0) /// Proof: `ParachainSystem::RelevantMessagingState` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:1) + /// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: Some(1282), added: 1777, mode: `MaxEncodedLen`) /// Storage: `XcmpQueue::OutboundXcmpMessages` (r:0 w:1) /// Proof: `XcmpQueue::OutboundXcmpMessages` (`max_values`: None, `max_size`: Some(105506), added: 107981, mode: `MaxEncodedLen`) - /// The range of component `i` is `[128, 2048]`. - fn receive_single_message_proof_with_dispatch(i: u32, ) -> Weight { + /// The range of component `n` is `[1, 16384]`. + fn receive_single_n_bytes_message_proof_with_dispatch(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `764` - // Estimated: `52645` - // Minimum execution time: 76_271_000 picoseconds. - Weight::from_parts(77_166_260, 0) - .saturating_add(Weight::from_parts(0, 52645)) - // Standard Error: 43 - .saturating_add(Weight::from_parts(8_417, 0).saturating_mul(i.into())) - .saturating_add(T::DbWeight::get().reads(10)) + // Measured: `965` + // Estimated: `52674` + // Minimum execution time: 84_340_000 picoseconds. + Weight::from_parts(89_615_003, 0) + .saturating_add(Weight::from_parts(0, 52674)) + // Standard Error: 15 + .saturating_add(Weight::from_parts(7_574, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(12)) .saturating_add(T::DbWeight::get().writes(4)) } } diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/snowbridge_pallet_system.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/snowbridge_pallet_system.rs index a5723ed350..92644893b0 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/snowbridge_pallet_system.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/snowbridge_pallet_system.rs @@ -269,4 +269,13 @@ impl snowbridge_pallet_system::WeightInfo for WeightInf .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) } + fn register_token() -> Weight { + // Proof Size summary in bytes: + // Measured: `256` + // Estimated: `6044` + // Minimum execution time: 45_000_000 picoseconds. + Weight::from_parts(45_000_000, 6044) + .saturating_add(T::DbWeight::get().reads(5_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) + } } diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs index c56990f7ed..6183d7bd79 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs @@ -14,18 +14,19 @@ // You should have received a copy of the GNU General Public License // along with Cumulus. If not, see . +use crate::XcmOverBridgeHubKusama; + use super::{ - bridge_to_ethereum_config::EthereumNetwork, - bridge_to_kusama_config::ToBridgeHubKusamaHaulBlobExporter, AccountId, AllPalletsWithSystem, - Balances, CollatorSelection, ParachainInfo, ParachainSystem, PolkadotXcm, - PriceForParentDelivery, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, WeightToFee, - XcmpQueue, + bridge_to_ethereum_config::EthereumNetwork, AccountId, AllPalletsWithSystem, Balances, + CollatorSelection, ParachainInfo, ParachainSystem, PolkadotXcm, PriceForParentDelivery, + Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, WeightToFee, XcmpQueue, }; use frame_support::{ parameter_types, traits::{tokens::imbalance::ResolveTo, ConstU32, Contains, Equals, Everything, Nothing}, }; use frame_system::EnsureRoot; +use pallet_collator_selection::StakingPotAccountId; use pallet_xcm::XcmPassthrough; use parachains_common::xcm_config::{ AllSiblingSystemParachains, ConcreteAssetFromSystem, ParentRelayOrSiblingParachains, @@ -39,14 +40,14 @@ use sp_std::marker::PhantomData; use system_parachains_constants::TREASURY_PALLET_ID; use xcm::latest::prelude::*; use xcm_builder::{ - AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, - AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, DenyReserveTransferToRelayChain, - DenyThenTry, DescribeAllTerminal, DescribeFamily, EnsureXcmOrigin, FrameTransactionalProcessor, - FungibleAdapter, HandleFee, HashedDescription, IsConcrete, ParentAsSuperuser, ParentIsPreset, - RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, - SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, - TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, - XcmFeeToAccount, + AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowHrmpNotificationsFromRelayChain, + AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, + DenyReserveTransferToRelayChain, DenyThenTry, DescribeAllTerminal, DescribeFamily, + EnsureXcmOrigin, FrameTransactionalProcessor, FungibleAdapter, HandleFee, HashedDescription, + IsConcrete, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SendXcmFeeToAccount, + SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, + SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, + UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, }; use xcm_executor::{ traits::{ConvertLocation, FeeManager, FeeReason, FeeReason::Export}, @@ -172,6 +173,8 @@ pub type Barrier = TrailingSetTopicAsId< )>, // Subscriptions for version tracking are OK. AllowSubscriptionsFrom, + // HRMP notifications from the relay chain are OK. + AllowHrmpNotificationsFromRelayChain, ), UniversalLocation, ConstU32<8>, @@ -197,7 +200,6 @@ pub struct XcmConfig; impl xcm_executor::Config for XcmConfig { type RuntimeCall = RuntimeCall; type XcmSender = XcmRouter; - type XcmRecorder = (); type AssetTransactor = FungibleTransactor; type OriginConverter = XcmOriginToTransactDispatchOrigin; // BridgeHub does not recognize a reserve location for any asset. Users must teleport DOT @@ -216,16 +218,16 @@ impl xcm_executor::Config for XcmConfig { DotRelayLocation, AccountId, Balances, - ResolveTo, + ResolveTo, Balances>, >; type ResponseHandler = PolkadotXcm; type AssetTrap = PolkadotXcm; + type AssetLocker = (); + type AssetExchanger = (); type AssetClaims = PolkadotXcm; type SubscriptionService = PolkadotXcm; type PalletInstancesInfo = AllPalletsWithSystem; type MaxAssetsIntoHolding = MaxAssetsIntoHolding; - type AssetLocker = (); - type AssetExchanger = (); type FeeManager = XcmFeeManagerFromComponentsBridgeHub< WaivedLocations, ( @@ -237,11 +239,11 @@ impl xcm_executor::Config for XcmConfig { Self::AssetTransactor, crate::EthereumOutboundQueue, >, - XcmFeeToAccount, + SendXcmFeeToAccount, ), >; type MessageExporter = - (ToBridgeHubKusamaHaulBlobExporter, crate::bridge_to_ethereum_config::SnowbridgeExporter); + (XcmOverBridgeHubKusama, crate::bridge_to_ethereum_config::SnowbridgeExporter); type UniversalAliases = Nothing; type CallDispatcher = RuntimeCall; type SafeCallFilter = Everything; @@ -250,6 +252,7 @@ impl xcm_executor::Config for XcmConfig { type HrmpNewChannelOpenRequestHandler = (); type HrmpChannelAcceptedHandler = (); type HrmpChannelClosingHandler = (); + type XcmRecorder = PolkadotXcm; } /// Converts a local signed origin into an XCM `Location`. @@ -267,9 +270,9 @@ pub type XcmRouter = WithUniqueTopic<( impl pallet_xcm::Config for Runtime { type RuntimeEvent = RuntimeEvent; + type XcmRouter = XcmRouter; // We want to disallow users sending (arbitrary) XCMs from this chain. type SendXcmOrigin = EnsureXcmOrigin; - type XcmRouter = XcmRouter; // Any local signed origin can execute XCM messages. type ExecuteXcmOrigin = EnsureXcmOrigin; type XcmExecuteFilter = Everything; diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/snowbridge.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/snowbridge.rs index b0a20a57fd..b05af5def3 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/snowbridge.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/snowbridge.rs @@ -19,7 +19,7 @@ use bp_polkadot_core::Signature; use bridge_hub_polkadot_runtime::{ bridge_to_ethereum_config::{EthereumGatewayAddress, EthereumNetwork}, - bridge_to_kusama_config::RefundBridgeHubKusamaMessages, + bridge_to_kusama_config::OnBridgeHubPolkadotRefundBridgeHubKusamaMessages, xcm_config::{XcmConfig, XcmFeeManagerFromComponentsBridgeHub}, AllPalletsWithoutSystem, BridgeRejectObsoleteHeadersAndMessages, Executive, MessageQueueServiceWeight, Runtime, RuntimeCall, RuntimeEvent, SessionKeys, SignedExtra, @@ -27,23 +27,31 @@ use bridge_hub_polkadot_runtime::{ }; use codec::{Decode, Encode}; use cumulus_primitives_core::XcmError::{FailedToTransactAsset, TooExpensive}; -use frame_support::{parameter_types, traits::Contains}; +use frame_support::{ + assert_err, assert_ok, parameter_types, + traits::{fungible::Mutate, Contains}, +}; use parachains_common::{AccountId, AuraId, Balance}; pub use parachains_runtimes_test_utils::test_cases::change_storage_constant_by_governance_works; +use parachains_runtimes_test_utils::{ + AccountIdOf, BalanceOf, CollatorSessionKeys, ExtBuilder, ValidatorIdOf, +}; use snowbridge_pallet_ethereum_client::WeightInfo; -use sp_core::H160; +use snowbridge_pallet_ethereum_client_fixtures::*; +use sp_core::{Get, H160}; use sp_keyring::AccountKeyring::Alice; use sp_runtime::{ generic::{Era, SignedPayload}, - AccountId32, + AccountId32, SaturatedConversion, }; use xcm::latest::prelude::*; use xcm_builder::HandleFee; use xcm_executor::traits::{FeeManager, FeeReason}; - parameter_types! { pub const DefaultBridgeHubEthereumBaseFee: Balance = 2_750_872_500_000; } +type RuntimeHelper = + parachains_runtimes_test_utils::RuntimeHelper; fn collator_session_keys() -> bridge_hub_test_utils::CollatorSessionKeys { bridge_hub_test_utils::CollatorSessionKeys::new( @@ -196,13 +204,10 @@ fn max_message_queue_service_weight_is_more_than_beacon_extrinsic_weights() { max_message_queue_weight.all_gt(submit_checkpoint); } +// FAIL-CI @bkontur can you help me to check why it's exceeding the weight limits? #[test] fn ethereum_client_consensus_extrinsics_work() { - snowbridge_runtime_test_common::ethereum_extrinsic( - collator_session_keys(), - 1013, - construct_and_apply_extrinsic, - ); + ethereum_extrinsic(collator_session_keys(), 1013, construct_and_apply_extrinsic); } #[test] @@ -237,6 +242,146 @@ fn ethereum_outbound_queue_processes_messages_before_message_queue_works() { ) } +// TODO replace with snowbridge runtime common method in stable-2412 release. +pub fn ethereum_extrinsic( + collator_session_key: CollatorSessionKeys, + runtime_para_id: u32, + construct_and_apply_extrinsic: fn( + sp_keyring::AccountKeyring, + ::RuntimeCall, + ) -> sp_runtime::DispatchOutcome, +) where + Runtime: frame_system::Config + + pallet_balances::Config + + pallet_session::Config + + pallet_xcm::Config + + pallet_utility::Config + + parachain_info::Config + + pallet_collator_selection::Config + + cumulus_pallet_parachain_system::Config + + snowbridge_pallet_outbound_queue::Config + + snowbridge_pallet_system::Config + + snowbridge_pallet_ethereum_client::Config + + pallet_timestamp::Config, + ValidatorIdOf: From>, + ::RuntimeCall: + From>, + ::RuntimeCall: From>, + AccountIdOf: From, +{ + ExtBuilder::::default() + .with_collators(collator_session_key.collators()) + .with_session_keys(collator_session_key.session_keys()) + .with_para_id(runtime_para_id.into()) + .with_tracing() + .build() + .execute_with(|| { + let initial_checkpoint = make_checkpoint(); + let update = make_finalized_header_update(); + let sync_committee_update = make_sync_committee_update(); + let mut invalid_update = make_finalized_header_update(); + let mut invalid_sync_committee_update = make_sync_committee_update(); + invalid_update.finalized_header.slot = 4354; + invalid_sync_committee_update.finalized_header.slot = 4354; + + let alice = Alice; + let alice_account = alice.to_account_id(); + >::mint_into( + &alice_account.clone().into(), + 10_000_000_000_000_u128.saturated_into::>(), + ) + .unwrap(); + let alice_account: ::AccountId = alice_account.into(); + let balance_before = >::free_balance(&alice_account); + + assert_ok!(>::force_checkpoint( + RuntimeHelper::::root_origin(), + initial_checkpoint.clone(), + )); + let balance_after_checkpoint = + >::free_balance(&alice_account); + + let update_call: ::RuntimeCall = + snowbridge_pallet_ethereum_client::Call::::submit { + update: Box::new(*update.clone()), + } + .into(); + + let invalid_update_call: ::RuntimeCall = + snowbridge_pallet_ethereum_client::Call::::submit { + update: Box::new(*invalid_update), + } + .into(); + + let update_sync_committee_call: ::RuntimeCall = + snowbridge_pallet_ethereum_client::Call::::submit { + update: Box::new(*sync_committee_update), + } + .into(); + + let invalid_update_sync_committee_call: ::RuntimeCall = + snowbridge_pallet_ethereum_client::Call::::submit { + update: Box::new(*invalid_sync_committee_update), + } + .into(); + + // Finalized header update + let update_outcome = construct_and_apply_extrinsic(alice, update_call.into()); + assert_ok!(update_outcome); + let balance_after_update = + >::free_balance(&alice_account); + + // All the extrinsics in this test do no fit into 1 block + let _ = RuntimeHelper::::run_to_block(2, AccountId::from(alice).into()); + + // Invalid finalized header update + let invalid_update_outcome = + construct_and_apply_extrinsic(alice, invalid_update_call.into()); + assert_err!( + invalid_update_outcome, + snowbridge_pallet_ethereum_client::Error::::InvalidUpdateSlot + ); + let balance_after_invalid_update = + >::free_balance(&alice_account); + + // Sync committee update + let sync_committee_outcome = + construct_and_apply_extrinsic(alice, update_sync_committee_call.into()); + assert_ok!(sync_committee_outcome); + let balance_after_sync_com_update = + >::free_balance(&alice_account); + + // Invalid sync committee update + let invalid_sync_committee_outcome = + construct_and_apply_extrinsic(alice, invalid_update_sync_committee_call.into()); + assert_err!( + invalid_sync_committee_outcome, + snowbridge_pallet_ethereum_client::Error::::InvalidUpdateSlot + ); + let balance_after_invalid_sync_com_update = + >::free_balance(&alice_account); + + // Assert paid operations are charged and free operations are free + // Checkpoint is a free operation + assert!(balance_before == balance_after_checkpoint); + let gap = + ::FreeHeadersInterval::get(); + // Large enough header gap is free + if update.finalized_header.slot >= initial_checkpoint.header.slot + gap as u64 { + assert!(balance_after_checkpoint == balance_after_update); + } else { + // Otherwise paid + assert!(balance_after_checkpoint > balance_after_update); + } + // An invalid update is paid + assert!(balance_after_update > balance_after_invalid_update); + // A successful sync committee update is free + assert!(balance_after_invalid_update == balance_after_sync_com_update); + // An invalid sync committee update is paid + assert!(balance_after_sync_com_update > balance_after_invalid_sync_com_update); + }); +} + fn construct_extrinsic( sender: sp_keyring::AccountKeyring, call: RuntimeCall, @@ -254,7 +399,7 @@ fn construct_extrinsic( frame_system::CheckWeight::::new(), pallet_transaction_payment::ChargeTransactionPayment::::from(0), BridgeRejectObsoleteHeadersAndMessages, - (RefundBridgeHubKusamaMessages::default()), + (OnBridgeHubPolkadotRefundBridgeHubKusamaMessages::default()), frame_metadata_hash_extension::CheckMetadataHash::::new(false), ); let payload = SignedPayload::new(call.clone(), extra.clone()).unwrap(); diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/tests.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/tests.rs index 956604c200..30fc9dca59 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/tests.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/tests.rs @@ -15,14 +15,15 @@ // along with Cumulus. If not, see . use bp_bridge_hub_kusama::Perbill; +use bp_messages::LegacyLaneId; use bp_polkadot_core::Signature; use bridge_hub_polkadot_runtime::{ bridge_to_kusama_config::{ - AssetHubKusamaParaId, BridgeGrandpaKusamaInstance, BridgeHubKusamaChainId, - BridgeHubKusamaLocation, BridgeParachainKusamaInstance, DeliveryRewardInBalance, - KusamaGlobalConsensusNetwork, RefundBridgeHubKusamaMessages, RequiredStakeForStakeAndSlash, - WithBridgeHubKusamaMessageBridge, WithBridgeHubKusamaMessagesInstance, - XCM_LANE_FOR_ASSET_HUB_POLKADOT_TO_ASSET_HUB_KUSAMA, + AssetHubKusamaParaId, BridgeGrandpaKusamaInstance, BridgeHubKusamaLocation, + BridgeParachainKusamaInstance, DeliveryRewardInBalance, KusamaGlobalConsensusNetwork, + OnBridgeHubPolkadotRefundBridgeHubKusamaMessages, RelayersForLegacyLaneIdsMessagesInstance, + RequiredStakeForStakeAndSlash, WithBridgeHubKusamaMessagesInstance, + XcmOverBridgeHubKusamaInstance, }, xcm_config::{ DotRelayLocation, LocationToAccountId, RelayNetwork, RelayTreasuryLocation, @@ -52,6 +53,16 @@ use xcm_runtime_apis::conversions::LocationToAccountHelper; // Para id of sibling chain used in tests. pub const SIBLING_PARACHAIN_ID: u32 = 1000; +// Random para id of sibling chain used in tests. +pub const SIBLING_SYSTEM_PARACHAIN_ID: u32 = 1008; +// Random para id of bridged chain from different global consensus used in tests. +pub const BRIDGED_LOCATION_PARACHAIN_ID: u32 = 1000; + +parameter_types! { + pub SiblingParachainLocation: Location = Location::new(1, [Parachain(SIBLING_PARACHAIN_ID)]); + pub SiblingSystemParachainLocation: Location = Location::new(1, [Parachain(SIBLING_SYSTEM_PARACHAIN_ID)]); + pub BridgedUniversalLocation: InteriorLocation = [GlobalConsensus(KusamaGlobalConsensusNetwork::get()), Parachain(BRIDGED_LOCATION_PARACHAIN_ID)].into(); +} // Runtime from tests PoV type RuntimeTestsAdapter = from_parachain::WithRemoteParachainHelperAdapter< @@ -60,7 +71,7 @@ type RuntimeTestsAdapter = from_parachain::WithRemoteParachainHelperAdapter< BridgeGrandpaKusamaInstance, BridgeParachainKusamaInstance, WithBridgeHubKusamaMessagesInstance, - WithBridgeHubKusamaMessageBridge, + RelayersForLegacyLaneIdsMessagesInstance, >; parameter_types! { @@ -84,7 +95,7 @@ fn construct_extrinsic( frame_system::CheckWeight::::new(), pallet_transaction_payment::ChargeTransactionPayment::::from(0), BridgeRejectObsoleteHeadersAndMessages, - (RefundBridgeHubKusamaMessages::default()), + (OnBridgeHubPolkadotRefundBridgeHubKusamaMessages::default()), frame_metadata_hash_extension::CheckMetadataHash::::new(false), ); let payload = SignedPayload::new(call.clone(), extra.clone()).unwrap(); @@ -230,11 +241,29 @@ fn handle_export_message_from_system_parachain_add_to_outbound_queue_works() { } }), || ExportMessage { network: Kusama, destination: Parachain(AssetHubKusamaParaId::get().into()).into(), xcm: Xcm(vec![]) }, - XCM_LANE_FOR_ASSET_HUB_POLKADOT_TO_ASSET_HUB_KUSAMA, Some((DotRelayLocation::get(), ExistentialDeposit::get()).into()), // value should be >= than value generated by `can_calculate_weight_for_paid_export_message_with_reserve_transfer` Some((DotRelayLocation::get(), bp_bridge_hub_polkadot::BridgeHubPolkadotBaseXcmFeeInDots::get()).into()), - || PolkadotXcm::force_xcm_version(RuntimeOrigin::root(), Box::new(BridgeHubKusamaLocation::get()), XCM_VERSION).expect("version saved!"), + || { + PolkadotXcm::force_xcm_version(RuntimeOrigin::root(), Box::new(BridgeHubKusamaLocation::get()), XCM_VERSION).expect("version saved!"); + + // we need to create lane between sibling parachain and remote destination + bridge_hub_test_utils::ensure_opened_bridge::< + Runtime, + XcmOverBridgeHubKusamaInstance, + LocationToAccountId, + DotRelayLocation, + >( + SiblingParachainLocation::get(), + BridgedUniversalLocation::get(), + |locations, fee| { + bridge_hub_test_utils::open_bridge_with_storage::< + Runtime, + XcmOverBridgeHubKusamaInstance + >(locations, fee, LegacyLaneId([0, 0, 0, 1])) + } + ).1 + }, ) } @@ -266,7 +295,6 @@ fn message_dispatch_routing_works() { _ => None, } }), - XCM_LANE_FOR_ASSET_HUB_POLKADOT_TO_ASSET_HUB_KUSAMA, || (), ) } @@ -278,12 +306,29 @@ fn relayed_incoming_message_works() { slot_durations(), bp_bridge_hub_polkadot::BRIDGE_HUB_POLKADOT_PARACHAIN_ID, bp_bridge_hub_kusama::BRIDGE_HUB_KUSAMA_PARACHAIN_ID, - BridgeHubKusamaChainId::get(), SIBLING_PARACHAIN_ID, Polkadot, - XCM_LANE_FOR_ASSET_HUB_POLKADOT_TO_ASSET_HUB_KUSAMA, - || (), + || { + // we need to create lane between sibling parachain and remote destination + bridge_hub_test_utils::ensure_opened_bridge::< + Runtime, + XcmOverBridgeHubKusamaInstance, + LocationToAccountId, + DotRelayLocation, + >( + SiblingParachainLocation::get(), + BridgedUniversalLocation::get(), + |locations, fee| { + bridge_hub_test_utils::open_bridge_with_storage::< + Runtime, + XcmOverBridgeHubKusamaInstance, + >(locations, fee, LegacyLaneId([0, 0, 0, 1])) + }, + ) + .1 + }, construct_and_apply_extrinsic, + true, ) } @@ -295,12 +340,29 @@ fn free_relay_extrinsic_works() { slot_durations(), bp_bridge_hub_polkadot::BRIDGE_HUB_POLKADOT_PARACHAIN_ID, bp_bridge_hub_kusama::BRIDGE_HUB_KUSAMA_PARACHAIN_ID, - BridgeHubKusamaChainId::get(), SIBLING_PARACHAIN_ID, Polkadot, - XCM_LANE_FOR_ASSET_HUB_POLKADOT_TO_ASSET_HUB_KUSAMA, - || (), + || { + // we need to create lane between sibling parachain and remote destination + bridge_hub_test_utils::ensure_opened_bridge::< + Runtime, + XcmOverBridgeHubKusamaInstance, + LocationToAccountId, + DotRelayLocation, + >( + SiblingParachainLocation::get(), + BridgedUniversalLocation::get(), + |locations, fee| { + bridge_hub_test_utils::open_bridge_with_storage::< + Runtime, + XcmOverBridgeHubKusamaInstance, + >(locations, fee, LegacyLaneId([0, 0, 0, 1])) + }, + ) + .1 + }, construct_and_apply_extrinsic, + true, ) } diff --git a/system-parachains/collectives/collectives-polkadot/src/genesis_config_presets.rs b/system-parachains/collectives/collectives-polkadot/src/genesis_config_presets.rs index 0fcbb37305..7d1b59ebd0 100644 --- a/system-parachains/collectives/collectives-polkadot/src/genesis_config_presets.rs +++ b/system-parachains/collectives/collectives-polkadot/src/genesis_config_presets.rs @@ -56,6 +56,7 @@ fn collectives_polkadot_genesis( ) }) .collect(), + ..Default::default() }, "polkadotXcm": { "safeXcmVersion": Some(SAFE_XCM_VERSION), diff --git a/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs b/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs index 7e37611c76..1d12636e9d 100644 --- a/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs +++ b/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs @@ -42,10 +42,10 @@ use xcm_builder::{ DenyThenTry, DescribeAllTerminal, DescribeFamily, DescribeTerminus, EnsureXcmOrigin, FixedWeightBounds, FrameTransactionalProcessor, FungibleAdapter, HashedDescription, IsConcrete, LocatableAssetId, OriginToPluralityVoice, ParentAsSuperuser, ParentIsPreset, - RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, + RelayChainAsNative, SendXcmFeeToAccount, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, WithComputedOrigin, WithUniqueTopic, - XcmFeeManagerFromComponents, XcmFeeToAccount, + XcmFeeManagerFromComponents, }; use xcm_executor::{traits::ConvertLocation, XcmExecutor}; @@ -233,7 +233,7 @@ impl xcm_executor::Config for XcmConfig { type AssetExchanger = (); type FeeManager = XcmFeeManagerFromComponents< WaivedLocations, - XcmFeeToAccount, + SendXcmFeeToAccount, >; type MessageExporter = (); type UniversalAliases = Nothing; diff --git a/system-parachains/coretime/coretime-kusama/src/coretime.rs b/system-parachains/coretime/coretime-kusama/src/coretime.rs index 9551cd4ed5..a1f861e8ff 100644 --- a/system-parachains/coretime/coretime-kusama/src/coretime.rs +++ b/system-parachains/coretime/coretime-kusama/src/coretime.rs @@ -29,11 +29,14 @@ use frame_support::{ }; use frame_system::Pallet as System; use kusama_runtime_constants::{system_parachain::coretime, time::DAYS as RELAY_DAYS}; -use pallet_broker::{CoreAssignment, CoreIndex, CoretimeInterface, PartsOf57600, RCBlockNumberOf}; +use pallet_broker::{ + CoreAssignment, CoreIndex, CoretimeInterface, PartsOf57600, RCBlockNumberOf, TaskId, +}; use parachains_common::{AccountId, Balance}; -use sp_runtime::traits::AccountIdConversion; +use sp_runtime::traits::{AccountIdConversion, MaybeConvert}; use xcm::latest::prelude::*; -use xcm_executor::traits::TransactAsset; +use xcm_config::LocationToAccountId; +use xcm_executor::traits::{ConvertLocation, TransactAsset}; /// A type containing the encoding of the coretime pallet in the Relay chain runtime. Used to /// construct any remote calls. The codec index must correspond to the index of `Coretime` in the @@ -320,6 +323,15 @@ parameter_types! { pub const BrokerPalletId: PalletId = PalletId(*b"py/broke"); } +pub struct SovereignAccountOf; +impl MaybeConvert for SovereignAccountOf { + fn maybe_convert(id: TaskId) -> Option { + // Currently all tasks are parachains + let location = Location::new(1, [Parachain(id)]); + LocationToAccountId::convert_location(&location) + } +} + impl pallet_broker::Config for Runtime { type RuntimeEvent = RuntimeEvent; type Currency = Balances; @@ -332,5 +344,7 @@ impl pallet_broker::Config for Runtime { type WeightInfo = weights::pallet_broker::WeightInfo; type PalletId = BrokerPalletId; type AdminOrigin = EnsureRoot; + type SovereignAccountOf = SovereignAccountOf; + type MaxAutoRenewals = ConstU32<0>; type PriceAdapter = pallet_broker::CenterTargetPrice; } diff --git a/system-parachains/coretime/coretime-kusama/src/genesis_config_presets.rs b/system-parachains/coretime/coretime-kusama/src/genesis_config_presets.rs index dbefac5c74..2f70d24a07 100644 --- a/system-parachains/coretime/coretime-kusama/src/genesis_config_presets.rs +++ b/system-parachains/coretime/coretime-kusama/src/genesis_config_presets.rs @@ -58,6 +58,7 @@ fn coretime_kusama_genesis( ) }) .collect(), + ..Default::default() }, "polkadotXcm": { "safeXcmVersion": Some(SAFE_XCM_VERSION), diff --git a/system-parachains/coretime/coretime-kusama/src/lib.rs b/system-parachains/coretime/coretime-kusama/src/lib.rs index ceddd02ac9..5ca865cd9f 100644 --- a/system-parachains/coretime/coretime-kusama/src/lib.rs +++ b/system-parachains/coretime/coretime-kusama/src/lib.rs @@ -183,19 +183,26 @@ parameter_types! { pub const SS58Prefix: u8 = 2; } -/// Filter out credit purchase calls until the credit system is implemented. Otherwise, users -/// may have chance of locking their funds forever on purchased credits they cannot use. -pub struct IsBrokerCreditPurchaseCall; -impl Contains for IsBrokerCreditPurchaseCall { +/// Filter: +/// - Credit purchase calls until the credit system is implemented. Otherwise, users may have chance +/// of locking their funds forever on purchased credits they cannot use. +/// - Auto-renew functionality until resolution of polkadot-sdk issue [#6474](https://github.com/paritytech/polkadot-sdk/issues/6474) +pub struct IsFilteredBrokerCall; +impl Contains for IsFilteredBrokerCall { fn contains(c: &RuntimeCall) -> bool { - matches!(c, RuntimeCall::Broker(pallet_broker::Call::purchase_credit { .. })) + matches!( + c, + RuntimeCall::Broker(pallet_broker::Call::purchase_credit { .. }) | + RuntimeCall::Broker(pallet_broker::Call::enable_auto_renew { .. }) | + RuntimeCall::Broker(pallet_broker::Call::disable_auto_renew { .. }) + ) } } // Configure FRAME pallets to include in runtime. #[derive_impl(frame_system::config_preludes::ParaChainDefaultConfig as frame_system::DefaultConfig)] impl frame_system::Config for Runtime { - type BaseCallFilter = EverythingBut; + type BaseCallFilter = EverythingBut; /// The identifier used to distinguish between accounts. type AccountId = AccountId; /// The nonce type for storing how many extrinsics an account has signed. diff --git a/system-parachains/coretime/coretime-kusama/src/weights/pallet_broker.rs b/system-parachains/coretime/coretime-kusama/src/weights/pallet_broker.rs index fbe3d815a5..b1f6ab6853 100644 --- a/system-parachains/coretime/coretime-kusama/src/weights/pallet_broker.rs +++ b/system-parachains/coretime/coretime-kusama/src/weights/pallet_broker.rs @@ -553,4 +553,16 @@ impl pallet_broker::WeightInfo for WeightInfo { .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) } + fn enable_auto_renew() -> Weight { + Weight::from_parts(0, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + fn disable_auto_renew() -> Weight { + Weight::from_parts(0, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } } diff --git a/system-parachains/coretime/coretime-kusama/src/xcm_config.rs b/system-parachains/coretime/coretime-kusama/src/xcm_config.rs index 3869ca63d7..46f5e2cc32 100644 --- a/system-parachains/coretime/coretime-kusama/src/xcm_config.rs +++ b/system-parachains/coretime/coretime-kusama/src/xcm_config.rs @@ -39,11 +39,11 @@ use xcm_builder::{ AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, DenyReserveTransferToRelayChain, DenyThenTry, DescribeAllTerminal, DescribeFamily, DescribeTerminus, EnsureXcmOrigin, FrameTransactionalProcessor, FungibleAdapter, HashedDescription, IsConcrete, - NonFungibleAdapter, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, + NonFungibleAdapter, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SendXcmFeeToAccount, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, - XcmFeeManagerFromComponents, XcmFeeToAccount, + XcmFeeManagerFromComponents, }; use xcm_executor::{traits::ConvertLocation, XcmExecutor}; @@ -221,7 +221,7 @@ impl xcm_executor::Config for XcmConfig { type AssetExchanger = (); type FeeManager = XcmFeeManagerFromComponents< WaivedLocations, - XcmFeeToAccount, + SendXcmFeeToAccount, >; type MessageExporter = (); type UniversalAliases = Nothing; diff --git a/system-parachains/coretime/coretime-polkadot/src/coretime.rs b/system-parachains/coretime/coretime-polkadot/src/coretime.rs index f7f81c8a3d..4a4e438a88 100644 --- a/system-parachains/coretime/coretime-polkadot/src/coretime.rs +++ b/system-parachains/coretime/coretime-polkadot/src/coretime.rs @@ -28,12 +28,15 @@ use frame_support::{ weights::constants::{WEIGHT_PROOF_SIZE_PER_KB, WEIGHT_REF_TIME_PER_MICROS}, }; use frame_system::Pallet as System; -use pallet_broker::{CoreAssignment, CoreIndex, CoretimeInterface, PartsOf57600, RCBlockNumberOf}; +use pallet_broker::{ + CoreAssignment, CoreIndex, CoretimeInterface, PartsOf57600, RCBlockNumberOf, TaskId, +}; use parachains_common::{AccountId, Balance}; use polkadot_runtime_constants::{system_parachain::coretime, time::DAYS as RELAY_DAYS}; -use sp_runtime::traits::AccountIdConversion; +use sp_runtime::traits::{AccountIdConversion, MaybeConvert}; use xcm::latest::prelude::*; -use xcm_executor::traits::TransactAsset; +use xcm_config::LocationToAccountId; +use xcm_executor::traits::{ConvertLocation, TransactAsset}; /// A type containing the encoding of the coretime pallet in the Relay chain runtime. Used to /// construct any remote calls. The codec index must correspond to the index of `Coretime` in the @@ -323,6 +326,15 @@ parameter_types! { pub const BrokerPalletId: PalletId = PalletId(*b"py/broke"); } +pub struct SovereignAccountOf; +impl MaybeConvert for SovereignAccountOf { + fn maybe_convert(id: TaskId) -> Option { + // Currently all tasks are parachains + let location = Location::new(1, [Parachain(id)]); + LocationToAccountId::convert_location(&location) + } +} + impl pallet_broker::Config for Runtime { type RuntimeEvent = RuntimeEvent; type Currency = Balances; @@ -335,5 +347,7 @@ impl pallet_broker::Config for Runtime { type WeightInfo = weights::pallet_broker::WeightInfo; type PalletId = BrokerPalletId; type AdminOrigin = EnsureRoot; + type SovereignAccountOf = SovereignAccountOf; + type MaxAutoRenewals = ConstU32<0>; type PriceAdapter = pallet_broker::CenterTargetPrice; } diff --git a/system-parachains/coretime/coretime-polkadot/src/genesis_config_presets.rs b/system-parachains/coretime/coretime-polkadot/src/genesis_config_presets.rs index 38f3aceed7..d63c826e61 100644 --- a/system-parachains/coretime/coretime-polkadot/src/genesis_config_presets.rs +++ b/system-parachains/coretime/coretime-polkadot/src/genesis_config_presets.rs @@ -58,6 +58,7 @@ fn coretime_polkadot_genesis( ) }) .collect(), + ..Default::default() }, "polkadotXcm": { "safeXcmVersion": Some(SAFE_XCM_VERSION), diff --git a/system-parachains/coretime/coretime-polkadot/src/lib.rs b/system-parachains/coretime/coretime-polkadot/src/lib.rs index 41c30ac263..8b8de4fce2 100644 --- a/system-parachains/coretime/coretime-polkadot/src/lib.rs +++ b/system-parachains/coretime/coretime-polkadot/src/lib.rs @@ -180,17 +180,20 @@ parameter_types! { pub const SS58Prefix: u8 = 0; } -/// Filter out credit purchase calls until the credit system is implemented. -/// -/// Otherwise, users may have chance of locking their funds forever on purchased credits they cannot -/// use. Also filter the interlace call until the relay can support this fully. +/// Filter: +/// - Credit purchase calls until the credit system is implemented. Otherwise, users may have chance +/// of locking their funds forever on purchased credits they cannot use. +/// - The interlace call until the relay can support this fully +/// - Auto-renew functionality until resolution of polkadot-sdk issue [#6474](https://github.com/paritytech/polkadot-sdk/issues/6474) pub struct IsFilteredBrokerCall; impl Contains for IsFilteredBrokerCall { fn contains(c: &RuntimeCall) -> bool { matches!( c, RuntimeCall::Broker(pallet_broker::Call::purchase_credit { .. }) | - RuntimeCall::Broker(pallet_broker::Call::interlace { .. }) + RuntimeCall::Broker(pallet_broker::Call::interlace { .. }) | + RuntimeCall::Broker(pallet_broker::Call::enable_auto_renew { .. }) | + RuntimeCall::Broker(pallet_broker::Call::disable_auto_renew { .. }) ) } } diff --git a/system-parachains/coretime/coretime-polkadot/src/weights/pallet_broker.rs b/system-parachains/coretime/coretime-polkadot/src/weights/pallet_broker.rs index 8c7402ac13..ec7e841c65 100644 --- a/system-parachains/coretime/coretime-polkadot/src/weights/pallet_broker.rs +++ b/system-parachains/coretime/coretime-polkadot/src/weights/pallet_broker.rs @@ -553,4 +553,16 @@ impl pallet_broker::WeightInfo for WeightInfo { .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) } + fn enable_auto_renew() -> Weight { + Weight::from_parts(0, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + fn disable_auto_renew() -> Weight { + Weight::from_parts(0, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } } diff --git a/system-parachains/coretime/coretime-polkadot/src/xcm_config.rs b/system-parachains/coretime/coretime-polkadot/src/xcm_config.rs index e3b46d0d41..234b77de36 100644 --- a/system-parachains/coretime/coretime-polkadot/src/xcm_config.rs +++ b/system-parachains/coretime/coretime-polkadot/src/xcm_config.rs @@ -40,11 +40,11 @@ use xcm_builder::{ AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, DenyReserveTransferToRelayChain, DenyThenTry, DescribeAllTerminal, DescribeFamily, DescribeTerminus, EnsureXcmOrigin, FrameTransactionalProcessor, FungibleAdapter, HashedDescription, IsConcrete, - NonFungibleAdapter, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, + NonFungibleAdapter, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SendXcmFeeToAccount, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, - XcmFeeManagerFromComponents, XcmFeeToAccount, + XcmFeeManagerFromComponents, }; use xcm_executor::{traits::ConvertLocation, XcmExecutor}; @@ -244,7 +244,7 @@ impl xcm_executor::Config for XcmConfig { type AssetExchanger = (); type FeeManager = XcmFeeManagerFromComponents< WaivedLocations, - XcmFeeToAccount, + SendXcmFeeToAccount, >; type MessageExporter = (); type UniversalAliases = Nothing; diff --git a/system-parachains/encointer/src/genesis_config_presets.rs b/system-parachains/encointer/src/genesis_config_presets.rs index 79d0dedaf9..cda23b6565 100644 --- a/system-parachains/encointer/src/genesis_config_presets.rs +++ b/system-parachains/encointer/src/genesis_config_presets.rs @@ -56,6 +56,7 @@ fn encointer_kusama_genesis( ) }) .collect(), + non_authority_keys: vec![], }, "polkadotXcm": { "safeXcmVersion": Some(SAFE_XCM_VERSION), diff --git a/system-parachains/people/people-kusama/src/genesis_config_presets.rs b/system-parachains/people/people-kusama/src/genesis_config_presets.rs index 1254ed4469..04249d196a 100644 --- a/system-parachains/people/people-kusama/src/genesis_config_presets.rs +++ b/system-parachains/people/people-kusama/src/genesis_config_presets.rs @@ -56,6 +56,7 @@ fn people_kusama_genesis( ) }) .collect(), + ..Default::default() }, "polkadotXcm": { "safeXcmVersion": Some(SAFE_XCM_VERSION), diff --git a/system-parachains/people/people-kusama/src/xcm_config.rs b/system-parachains/people/people-kusama/src/xcm_config.rs index fe7ac7c4c6..02f9193828 100644 --- a/system-parachains/people/people-kusama/src/xcm_config.rs +++ b/system-parachains/people/people-kusama/src/xcm_config.rs @@ -39,10 +39,10 @@ use xcm_builder::{ AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, DenyReserveTransferToRelayChain, DenyThenTry, DescribeAllTerminal, DescribeFamily, DescribeTerminus, EnsureXcmOrigin, FrameTransactionalProcessor, FungibleAdapter, HashedDescription, IsConcrete, ParentAsSuperuser, - ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, - SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, - TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, - XcmFeeManagerFromComponents, XcmFeeToAccount, + ParentIsPreset, RelayChainAsNative, SendXcmFeeToAccount, SiblingParachainAsNative, + SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, + SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, + WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, XcmFeeManagerFromComponents, }; use xcm_executor::{traits::ConvertLocation, XcmExecutor}; @@ -224,7 +224,7 @@ impl xcm_executor::Config for XcmConfig { type AssetExchanger = (); type FeeManager = XcmFeeManagerFromComponents< WaivedLocations, - XcmFeeToAccount, + SendXcmFeeToAccount, >; type MessageExporter = (); type UniversalAliases = Nothing; diff --git a/system-parachains/people/people-polkadot/src/genesis_config_presets.rs b/system-parachains/people/people-polkadot/src/genesis_config_presets.rs index f48e219922..61dfb6edd1 100644 --- a/system-parachains/people/people-polkadot/src/genesis_config_presets.rs +++ b/system-parachains/people/people-polkadot/src/genesis_config_presets.rs @@ -56,6 +56,7 @@ fn people_polkadot_genesis( ) }) .collect(), + ..Default::default() }, "polkadotXcm": { "safeXcmVersion": Some(SAFE_XCM_VERSION), diff --git a/system-parachains/people/people-polkadot/src/xcm_config.rs b/system-parachains/people/people-polkadot/src/xcm_config.rs index 0b9e1c110d..380137fe38 100644 --- a/system-parachains/people/people-polkadot/src/xcm_config.rs +++ b/system-parachains/people/people-polkadot/src/xcm_config.rs @@ -40,10 +40,10 @@ use xcm_builder::{ AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, DenyReserveTransferToRelayChain, DenyThenTry, DescribeAllTerminal, DescribeFamily, DescribeTerminus, EnsureXcmOrigin, FrameTransactionalProcessor, FungibleAdapter, HashedDescription, IsConcrete, ParentAsSuperuser, - ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, - SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, - TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, - XcmFeeManagerFromComponents, XcmFeeToAccount, + ParentIsPreset, RelayChainAsNative, SendXcmFeeToAccount, SiblingParachainAsNative, + SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, + SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, + WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, XcmFeeManagerFromComponents, }; use xcm_executor::{traits::ConvertLocation, XcmExecutor}; @@ -246,7 +246,7 @@ impl xcm_executor::Config for XcmConfig { type AssetExchanger = (); type FeeManager = XcmFeeManagerFromComponents< WaivedLocations, - XcmFeeToAccount, + SendXcmFeeToAccount, >; type MessageExporter = (); type UniversalAliases = Nothing;