diff --git a/CHANGELOG.md b/CHANGELOG.md index 36856cc515..5af3b2d71c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,10 +6,102 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## [1.2.8] 03.07.2024 +### Added + +#### 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)). +- Add `MaxRank` Config to `pallet-core-fellowship` ([SDK v1.13 #3393](https://github.com/paritytech/polkadot-sdk/pull/3393)). +- Add Extra Check in Primary Username Setter ([SDK v1.13 #4534](https://github.com/paritytech/polkadot-sdk/pull/4534)). +- Add HRMP notification handlers to the xcm-executor ([SDK v1.10 #3696](https://github.com/paritytech/polkadot-sdk/pull/3696)). +- Add retry mechanics to `pallet-scheduler` ([SDK v1.8 #3060](https://github.com/paritytech/polkadot-sdk/pull/3060)). +- Add support for versioned notification for HRMP pallet ([SDK v1.12 #4281](https://github.com/paritytech/polkadot-sdk/pull/4281)). +- Adds ability to trigger tasks via unsigned transactions ([SDK v1.11 #4075](https://github.com/paritytech/polkadot-sdk/pull/4075)). +- Asset Conversion: Pool Account ID derivation with additional Pallet ID seed ([SDK v1.11 #3250](https://github.com/paritytech/polkadot-sdk/pull/3250)). +- Asset Conversion: Pool Touch Call ([SDK v1.11 #3251](https://github.com/paritytech/polkadot-sdk/pull/3251)). +- Balances: add failsafe for consumer ref underflow ([SDK v1.12 #3865](https://github.com/paritytech/polkadot-sdk/pull/3865)). +- Bridge: added force_set_pallet-state call to pallet-bridge-grandpa ([SDK v1.13 #4465](https://github.com/paritytech/polkadot-sdk/pull/4465)). +- Burn extrinsic call and `fn burn_from` `Preservation` argument ([SDK v1.12 #3964](https://github.com/paritytech/polkadot-sdk/pull/3964)). +- GenesisConfig presets for runtime ([SDK v1.11 #2714](https://github.com/paritytech/polkadot-sdk/pull/2714)). +- Im-online pallet offchain storage cleanup ([SDK v1.8 #2290](https://github.com/paritytech/polkadot-sdk/pull/2290)). +- Implements a percentage cap on staking rewards from era inflation ([SDK v1.8 #1660](https://github.com/paritytech/polkadot-sdk/pull/1660)). +- Introduce submit_finality_proof_ex call to bridges GRANDPA pallet ([SDK v1.8 #3225](https://github.com/paritytech/polkadot-sdk/pull/3225)). +- New call `hrmp.establish_channel_with_system` to allow parachains to establish a channel with a system parachain ([SDK v1.11 #3721](https://github.com/paritytech/polkadot-sdk/pull/3721)). +- New runtime api to check if a validator has pending pages of rewards for an era ([SDK v1.12 #4301](https://github.com/paritytech/polkadot-sdk/pull/4301)). +- Pallet-xcm: add new extrinsic for asset transfers using explicit reserve ([SDK v1.11 #3695](https://github.com/paritytech/polkadot-sdk/pull/3695)). +- Ranked collective introduce `Add` and `Remove` origins ([SDK v1.8 #3212](https://github.com/paritytech/polkadot-sdk/pull/3212)). +- Runtime apis to help with delegate-stake based Nomination Pools ([SDK v1.13 #4537](https://github.com/paritytech/polkadot-sdk/pull/4537)). +- Kusama system chains: enable PoV-reclaim. + ### Changed -- Polkadot chains: allow arbitrary XCM execution ([polkadot-fellows/runtimes#345](https://github.com/polkadot-fellows/runtimes/pull/345)) - Snowbridge: Sync headers on demand ([polkadot-fellows/runtimes#345](https://github.com/polkadot-fellows/runtimes/pull/365)) +- Polkadot chains: allow arbitrary XCM execution ([polkadot-fellows/runtimes#345](https://github.com/polkadot-fellows/runtimes/pull/345)). + +#### From [#322](https://github.com/polkadot-fellows/runtimes/pull/322): + +- AdaptPrice trait is now price controlled ([SDK v1.13 #4521](https://github.com/paritytech/polkadot-sdk/pull/4521)). +- Allow StakingAdmin to manage nomination pool configurations ([SDK v1.11 #3959](https://github.com/paritytech/polkadot-sdk/pull/3959)). +- Bridge: make some headers submissions free ([SDK v1.12 #4102](https://github.com/paritytech/polkadot-sdk/pull/4102)). +- Improving on_demand_assigner emitted events ([SDK v1.13 #4339](https://github.com/paritytech/polkadot-sdk/pull/4339)). +- `pallet-broker::start_sales`: Take `extra_cores` and not total cores ([SDK v1.11 #4221](https://github.com/paritytech/polkadot-sdk/pull/4221)). +- Pallet-nomination-pools: `chill` is permissionless if depositor's stake is less than `min_nominator_bond` ([SDK v1.9 #3453](https://github.com/paritytech/polkadot-sdk/pull/3453)). +- `polkadot_runtime_parachains::coretime`: Expose `MaxXcmTransactWeight` ([SDK v1.11 #4189](https://github.com/paritytech/polkadot-sdk/pull/4189)). +- Pools: Make PermissionlessWithdraw the default claim permission ([SDK v1.10 #3438](https://github.com/paritytech/polkadot-sdk/pull/3438)). +- Prevents staking controllers from becoming stashes of different ledgers; Ensures that no ledger in bad state is mutated ([SDK v1.9 #3639](https://github.com/paritytech/polkadot-sdk/pull/3639)). +- Snowbridge: deposit extra fee to beneficiary on Asset Hub ([SDK v1.12 #4175](https://github.com/paritytech/polkadot-sdk/pull/4175)). +- Storage bound the XCMP queue pallet ([SDK v1.13 #3952](https://github.com/paritytech/polkadot-sdk/pull/3952)). +- Validator disabling strategy in runtime ([SDK v1.12 #2226](https://github.com/paritytech/polkadot-sdk/pull/2226)). + +### Fixed + +#### 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)). +- Detect incorrect pre-image length when submitting a referenda ([SDK v1.10 #3850](https://github.com/paritytech/polkadot-sdk/pull/3850)). +- Fix `schedule_code_upgrade` when called by the owner/root ([SDK v1.10 #3341](https://github.com/paritytech/polkadot-sdk/pull/3341)). +- Fix algorithmic complexity of the on-demand scheduler ([SDK v1.10 #3190](https://github.com/paritytech/polkadot-sdk/pull/3190)). +- Fix call enum's metadata regression ([SDK v1.9 #3513](https://github.com/paritytech/polkadot-sdk/pull/3513)). +- Fix dust unbonded for zero existential deposit ([SDK v1.12 #4364](https://github.com/paritytech/polkadot-sdk/pull/4364)). +- Fix extrinsics count logging in frame-system ([SDK v1.12 #4461](https://github.com/paritytech/polkadot-sdk/pull/4461)). +- Fix kusama 0 backing rewards when entering active set ([SDK v1.10 #3722](https://github.com/paritytech/polkadot-sdk/pull/3722)). +- Fix Stuck Collator Funds ([SDK v1.11 #4229](https://github.com/paritytech/polkadot-sdk/pull/4229)). +- Fix weight calculation and event emission in pallet-membership ([SDK v1.9 #3324](https://github.com/paritytech/polkadot-sdk/pull/3324)). +- Fix weight refund for `pallet-collator-selection::set_candidacy_bond` ([SDK v1.9 #3643](https://github.com/paritytech/polkadot-sdk/pull/3643)). +- Fixed `GrandpaConsensusLogReader::find_scheduled_change` ([SDK v1.11 #4208](https://github.com/paritytech/polkadot-sdk/pull/4208)). +- Fixes a scenario where a nomination pool's `TotalValueLocked` is out of sync due to staking's implicit withdraw ([SDK v1.8 #3052](https://github.com/paritytech/polkadot-sdk/pull/3052)). +- Handle legacy lease swaps on coretime ([SDK v1.10 #3714](https://github.com/paritytech/polkadot-sdk/pull/3714)). +- Ignore mandatory extrinsics in total PoV size check ([SDK v1.13 #4571](https://github.com/paritytech/polkadot-sdk/pull/4571)). +- Pallet assets: minor improvement on errors returned for some calls ([SDK v1.11 #4118](https://github.com/paritytech/polkadot-sdk/pull/4118)). +- Pallet-broker: Fix `Linear::adapt_price` behavior at zero ([SDK v1.9 #3636](https://github.com/paritytech/polkadot-sdk/pull/3636)). +- Pallet-broker: Fix claim revenue behaviour for zero timeslices ([SDK v1.11 #3997](https://github.com/paritytech/polkadot-sdk/pull/3997)). +- Pallet-broker: Support renewing leases expired in a previous period ([SDK v1.11 #4089](https://github.com/paritytech/polkadot-sdk/pull/4089)). +- Pallet-broker: Use saturating math in input validation ([SDK v1.11 #4151](https://github.com/paritytech/polkadot-sdk/pull/4151)). +- Pallet-xcm: fix transport fees for remote reserve transfers ([SDK v1.10 #3792](https://github.com/paritytech/polkadot-sdk/pull/3792)). +- Patch pool to handle extra consumer ref when destroying ([SDK v1.13 #4503](https://github.com/paritytech/polkadot-sdk/pull/4503)). +- Region reserve transfers fix ([SDK v1.11 #3455](https://github.com/paritytech/polkadot-sdk/pull/3455)). +- Snowbridge - Ethereum Client - Reject finalized updates without a sync committee in next store period ([SDK v1.13 #4478](https://github.com/paritytech/polkadot-sdk/pull/4478)). +- Treat XCM ExceedsStackLimit errors as transient in the MQ pallet ([SDK v1.12 #4202](https://github.com/paritytech/polkadot-sdk/pull/4202)). +- Unrequest a pre-image when it failed to execute ([SDK v1.10 #3849](https://github.com/paritytech/polkadot-sdk/pull/3849)). +- Validate code when scheduling uprades ([SDK v1.8 #3232](https://github.com/paritytech/polkadot-sdk/pull/3232)). +- XCMP: Use the number of 'ready' pages in XCMP suspend logic ([SDK v1.9 #2393](https://github.com/paritytech/polkadot-sdk/pull/2393)). + +### Removed + +#### 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)). +- Identity: Remove double encoding username signature payload ([SDK v1.13 #4646](https://github.com/paritytech/polkadot-sdk/pull/4646)). +- Pallet-xcm: deprecate execute and send in favor of execute_blob and send_blob ([SDK v1.10 #3749](https://github.com/paritytech/polkadot-sdk/pull/3749)). +- Pallet-xcm: deprecate transfer extrinsics without weight limit ([SDK v1.10 #3927](https://github.com/paritytech/polkadot-sdk/pull/3927)). +- Remove `parametrized-consensus-hook` feature ([SDK v1.13 #4380](https://github.com/paritytech/polkadot-sdk/pull/4380)). + +### Based on Polkadot-SDK + +- 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)) Note: This release only affects the following runtimes and is not a full system release: diff --git a/Cargo.lock b/Cargo.lock index dbe1dd731b..be996e7cf0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -124,7 +124,7 @@ dependencies = [ "hex-literal", "itoa", "proptest", - "rand", + "rand 0.8.5", "ruint", "serde", "tiny-keccak", @@ -136,22 +136,10 @@ version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8d58d9f5da7b40e9bfff0b7e7816700be4019db97d4b6359fe7f94a9e22e42ac" dependencies = [ - "alloy-rlp-derive", "arrayvec 0.7.4", "bytes", ] -[[package]] -name = "alloy-rlp-derive" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a047897373be4bbb0224c1afdabca92648dc57a9c9ef6e7b0be3aff7a859c83" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.52", -] - [[package]] name = "alloy-sol-macro" version = "0.4.2" @@ -160,11 +148,11 @@ checksum = "8a98ad1696a2e17f010ae8e43e9f2a1e930ed176a8e3ff77acfeff6dfb07b42c" dependencies = [ "const-hex", "dunce", - "heck", + "heck 0.4.1", "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.65", "syn-solidity", "tiny-keccak", ] @@ -181,12 +169,6 @@ dependencies = [ "serde", ] -[[package]] -name = "always-assert" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4436e0292ab1bb631b42973c61205e704475fe8126af845c8d923c0996328127" - [[package]] name = "android-tzdata" version = "0.1.1" @@ -285,7 +267,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.65", ] [[package]] @@ -464,7 +446,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1df2c09229cbc5a028b1d70e00fdb2acee28b1055dfb5ca73eea49c5a25c4e7c" dependencies = [ "num-traits", - "rand", + "rand 0.8.5", ] [[package]] @@ -474,15 +456,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" dependencies = [ "num-traits", - "rand", + "rand 0.8.5", ] -[[package]] -name = "array-bytes" -version = "4.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f52f63c5c1316a16a4b35eaac8b76a98248961a533f061684cb2a7cb0eafb6c6" - [[package]] name = "array-bytes" version = "6.2.2" @@ -504,12 +480,6 @@ dependencies = [ "nodrop", ] -[[package]] -name = "arrayvec" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" - [[package]] name = "arrayvec" version = "0.7.4" @@ -571,7 +541,10 @@ dependencies = [ "frame-support", "kusama-emulated-chain", "parachains-common", - "sp-core 29.0.0", + "penpal-emulated-chain", + "polkadot-parachain-primitives", + "sp-core 34.0.0", + "staging-xcm", ] [[package]] @@ -597,7 +570,7 @@ dependencies = [ "parachains-common", "parity-scale-codec", "polkadot-runtime-common", - "sp-runtime 32.0.0", + "sp-runtime 38.0.0", "staging-kusama-runtime", "staging-xcm", "staging-xcm-executor", @@ -622,6 +595,7 @@ dependencies = [ "cumulus-pallet-xcmp-queue", "cumulus-primitives-aura", "cumulus-primitives-core", + "cumulus-primitives-storage-weight-reclaim", "cumulus-primitives-utility", "frame-benchmarking", "frame-executive", @@ -671,18 +645,18 @@ dependencies = [ "sp-api", "sp-block-builder", "sp-consensus-aura", - "sp-core 29.0.0", + "sp-core 34.0.0", "sp-genesis-builder", "sp-inherents", - "sp-io 31.0.0", + "sp-io 37.0.0", "sp-offchain", - "sp-runtime 32.0.0", + "sp-runtime 38.0.0", "sp-session", "sp-std", - "sp-storage", + "sp-storage 21.0.0", "sp-transaction-pool", "sp-version", - "sp-weights 28.0.0", + "sp-weights 31.0.0", "staging-parachain-info", "staging-xcm", "staging-xcm-builder", @@ -700,8 +674,11 @@ dependencies = [ "emulated-integration-tests-common", "frame-support", "parachains-common", + "penpal-emulated-chain", "polkadot-emulated-chain", - "sp-core 29.0.0", + "polkadot-parachain-primitives", + "sp-core 34.0.0", + "staging-xcm", ] [[package]] @@ -728,7 +705,7 @@ dependencies = [ "polkadot-runtime", "polkadot-runtime-common", "polkadot-system-emulated-network", - "sp-runtime 32.0.0", + "sp-runtime 38.0.0", "staging-xcm", "staging-xcm-executor", "system-parachains-constants", @@ -799,18 +776,18 @@ dependencies = [ "sp-api", "sp-block-builder", "sp-consensus-aura", - "sp-core 29.0.0", + "sp-core 34.0.0", "sp-genesis-builder", "sp-inherents", - "sp-io 31.0.0", + "sp-io 37.0.0", "sp-offchain", - "sp-runtime 32.0.0", + "sp-runtime 38.0.0", "sp-session", "sp-std", - "sp-storage", + "sp-storage 21.0.0", "sp-transaction-pool", "sp-version", - "sp-weights 28.0.0", + "sp-weights 31.0.0", "staging-parachain-info", "staging-xcm", "staging-xcm-builder", @@ -821,9 +798,9 @@ dependencies = [ [[package]] name = "asset-test-utils" -version = "8.0.1" +version = "14.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d78501ca6b4c848efe233672124ebab9293d8efefc44a728d70f3245a8ef595" +checksum = "91ebd50fb5aa439aaadf0560ad3afd426e03cf136e57a2c751f88376cd924799" dependencies = [ "cumulus-pallet-parachain-system", "cumulus-pallet-xcmp-queue", @@ -834,13 +811,14 @@ dependencies = [ "pallet-balances", "pallet-collator-selection", "pallet-session", + "pallet-timestamp", "pallet-xcm", "pallet-xcm-bridge-hub-router", "parachains-common", "parachains-runtimes-test-utils", "parity-scale-codec", - "sp-io 31.0.0", - "sp-runtime 32.0.0", + "sp-io 37.0.0", + "sp-runtime 38.0.0", "sp-std", "staging-parachain-info", "staging-xcm", @@ -851,9 +829,9 @@ dependencies = [ [[package]] name = "assets-common" -version = "0.8.0" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65e90021d772c2dd82d45fd085e05a2cb5866464d4c7421ac6a8007733b350bb" +checksum = "81cd608a43b6683340fd39a41b518d55029214d240967e560f5b893498c9ff08" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -865,7 +843,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-api", - "sp-runtime 32.0.0", + "sp-runtime 38.0.0", "sp-std", "staging-xcm", "staging-xcm-builder", @@ -1017,13 +995,13 @@ checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de" [[package]] name = "async-trait" -version = "0.1.74" +version = "0.1.80" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a66537f1bb974b254c98ed142ff995236e81b9d0fe4db0575f46612cb15eb0f9" +checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.65", ] [[package]] @@ -1059,7 +1037,7 @@ checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.65", ] [[package]] @@ -1076,7 +1054,7 @@ checksum = "b62ddb9cb1ec0a098ad4bbf9344d0713fa193ae1a80af55febcff2627b6a00c1" dependencies = [ "getrandom 0.2.12", "instant", - "rand", + "rand 0.8.5", ] [[package]] @@ -1147,9 +1125,9 @@ dependencies = [ [[package]] name = "binary-merkle-tree" -version = "14.0.0" +version = "15.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bf857f8f411164ce1af14a778626af96251de7a77837711efbc440807e7053f" +checksum = "4b5c0fd4282c30c05647e1052d71bf1a0c8067ab1e9a8fc6d0c292dce0ecb237" dependencies = [ "hash-db", "log", @@ -1164,27 +1142,6 @@ dependencies = [ "serde", ] -[[package]] -name = "bindgen" -version = "0.65.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfdf7b466f9a4903edc73f95d6d2bcd5baf8ae620638762244d3f60143643cc5" -dependencies = [ - "bitflags 1.3.2", - "cexpr", - "clang-sys", - "lazy_static", - "lazycell", - "peeking_take_while", - "prettyplease 0.2.16", - "proc-macro2", - "quote", - "regex", - "rustc-hash", - "shlex", - "syn 2.0.52", -] - [[package]] name = "bip39" version = "2.0.0" @@ -1192,8 +1149,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "93f2635620bf0b9d4576eb7bb9a38a55df78bd1205d26fa994b25911a69f212f" dependencies = [ "bitcoin_hashes 0.11.0", - "rand", - "rand_core 0.6.4", "serde", "unicode-normalization", ] @@ -1326,18 +1281,6 @@ dependencies = [ "constant_time_eq 0.3.0", ] -[[package]] -name = "block-buffer" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b" -dependencies = [ - "block-padding", - "byte-tools", - "byteorder", - "generic-array 0.12.4", -] - [[package]] name = "block-buffer" version = "0.9.0" @@ -1356,15 +1299,6 @@ dependencies = [ "generic-array 0.14.7", ] -[[package]] -name = "block-padding" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa79dedbb091f449f1f39e53edf88d5dbe95f895dae6135a8d7b881fb5af73f5" -dependencies = [ - "byte-tools", -] - [[package]] name = "blocking" version = "1.6.0" @@ -1391,15 +1325,6 @@ dependencies = [ "serde", ] -[[package]] -name = "bounded-vec" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68534a48cbf63a4b1323c433cf21238c9ec23711e0df13b08c33e5c2082663ce" -dependencies = [ - "thiserror", -] - [[package]] name = "bp-asset-hub-kusama" version = "1.0.0" @@ -1428,9 +1353,9 @@ dependencies = [ [[package]] name = "bp-bridge-hub-cumulus" -version = "0.8.0" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e91ab68506081576066d3641d7794f63d96f3ca1eee0c059c2cc2174e55f638" +checksum = "3ba00946c8a825bec15b1a6ebdf0c35f0d2f2110b529b5067de14279d6dcce8a" dependencies = [ "bp-messages", "bp-polkadot-core", @@ -1454,7 +1379,7 @@ dependencies = [ "polkadot-runtime-constants", "snowbridge-core", "sp-api", - "sp-runtime 32.0.0", + "sp-runtime 38.0.0", "sp-std", "staging-xcm", "system-parachains-constants", @@ -1466,13 +1391,14 @@ version = "1.0.0" dependencies = [ "bp-bridge-hub-cumulus", "bp-messages", + "bp-polkadot-bulletin", "bp-runtime", "frame-support", "kusama-runtime-constants", "polkadot-runtime-constants", "snowbridge-core", "sp-api", - "sp-runtime 32.0.0", + "sp-runtime 38.0.0", "sp-std", "staging-xcm", "system-parachains-constants", @@ -1480,9 +1406,9 @@ dependencies = [ [[package]] name = "bp-header-chain" -version = "0.8.1" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d7e059216225bc586fb74f2be6a9f527c19f47c8c7aeaf95b1738050d2afac1" +checksum = "3445ca2e7a3b5e86f03f5bed0a98edcfbdada59f97b71c7dbace25b60b9d3c4a" dependencies = [ "bp-runtime", "finality-grandpa", @@ -1491,16 +1417,16 @@ dependencies = [ "scale-info", "serde", "sp-consensus-grandpa", - "sp-core 29.0.0", - "sp-runtime 32.0.0", + "sp-core 34.0.0", + "sp-runtime 38.0.0", "sp-std", ] [[package]] name = "bp-kusama" -version = "0.6.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c37ed284f7648ca888de72da69873ead9672b56436b08eae2e196c11d0847626" +checksum = "47290e9ba104bd3522a0949ccd9e8b26ce25de621223d766ec40d3259ec35123" dependencies = [ "bp-header-chain", "bp-polkadot-core", @@ -1512,9 +1438,9 @@ dependencies = [ [[package]] name = "bp-messages" -version = "0.8.0" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf43a49ea13d4c2f141481b6cbff85a197c47fe6aec1f5af21e40b68e8fd02fd" +checksum = "75cee5c02e0cf8cfec023231ba3b40922321bab0ab2490ab1f71af5f5d9eaf63" dependencies = [ "bp-header-chain", "bp-runtime", @@ -1522,15 +1448,15 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-core 29.0.0", + "sp-core 34.0.0", "sp-std", ] [[package]] name = "bp-parachains" -version = "0.8.0" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "762e309a008b2ad4088d4c4e9d39fa9f78f59124b6a52c25ceb0ef5f22d901f5" +checksum = "3509fb70e4e42a7cdea1be3a97cf695f0a93313a5526e39ce409d07bf8479f68" dependencies = [ "bp-header-chain", "bp-polkadot-core", @@ -1539,30 +1465,49 @@ dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", "scale-info", - "sp-core 29.0.0", - "sp-runtime 32.0.0", + "sp-core 34.0.0", + "sp-runtime 38.0.0", "sp-std", ] [[package]] name = "bp-polkadot" -version = "0.6.0" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5531357b4cbd7bd8c845cc0922a8b1453016995e7196b4df33744c90d67a74ad" +dependencies = [ + "bp-header-chain", + "bp-polkadot-core", + "bp-runtime", + "frame-support", + "sp-api", + "sp-std", +] + +[[package]] +name = "bp-polkadot-bulletin" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "059126468d590f377fa941a2b6fa744eb6754e9dd0d3d339e2ead4f2e45a7f7d" +checksum = "bb2e4c6ba687dad4303d88511eec378065d3f8a88f135d041fb4134e8306d1f1" dependencies = [ "bp-header-chain", + "bp-messages", "bp-polkadot-core", "bp-runtime", "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", "sp-api", + "sp-runtime 38.0.0", "sp-std", ] [[package]] name = "bp-polkadot-core" -version = "0.8.0" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b862e8dcccc9a3fafb58a1735bc205b7663d3335d7b3dd942503b98f28d6b067" +checksum = "330626b279be8405c3d6e712b84af7c8f2636cbe9ca4c1ed7d42937fe933a050" dependencies = [ "bp-messages", "bp-runtime", @@ -1572,31 +1517,31 @@ dependencies = [ "parity-util-mem", "scale-info", "serde", - "sp-core 29.0.0", - "sp-runtime 32.0.0", + "sp-core 34.0.0", + "sp-runtime 38.0.0", "sp-std", ] [[package]] name = "bp-relayers" -version = "0.8.0" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74a4b0e2771227611fe9e6a2c37ba2bf7408cf2385a9eb2f44e6096bb0e616ec" +checksum = "cf7d8f513b18231df91ef7da1db32e591006d8193d85c8efa3737f904c6b31e0" dependencies = [ "bp-messages", "bp-runtime", "frame-support", "parity-scale-codec", "scale-info", - "sp-runtime 32.0.0", + "sp-runtime 38.0.0", "sp-std", ] [[package]] name = "bp-runtime" -version = "0.8.0" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b29668fffbc3e4a7ad789b498424ed6d8a313f93544a090bbaaef8a1f7fd243" +checksum = "bae0eaf8669eeb086c5ce8b9a6b5f4fb3f83cd0699c63a6f42236482873c8236" dependencies = [ "frame-support", "frame-system", @@ -1607,62 +1552,62 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-core 29.0.0", - "sp-io 31.0.0", - "sp-runtime 32.0.0", - "sp-state-machine 0.36.0", + "sp-core 34.0.0", + "sp-io 37.0.0", + "sp-runtime 38.0.0", + "sp-state-machine 0.42.0", "sp-std", - "sp-trie 30.0.0", - "trie-db", + "sp-trie 36.0.0", + "trie-db 0.29.1", ] [[package]] name = "bp-test-utils" -version = "0.8.0" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6640a95733148b4f2004d362471eba49583da4b961681f5ea722039478924d31" +checksum = "4f325da595f8edb134fe8458beb6fb71f5db1e13cf47af34c3e4ce19248d4c7a" dependencies = [ "bp-header-chain", "bp-parachains", "bp-polkadot-core", "bp-runtime", - "ed25519-dalek", + "ed25519-dalek 2.1.0", "finality-grandpa", "parity-scale-codec", - "sp-application-crypto 31.0.0", + "sp-application-crypto 37.0.0", "sp-consensus-grandpa", - "sp-core 29.0.0", - "sp-runtime 32.0.0", + "sp-core 34.0.0", + "sp-runtime 38.0.0", "sp-std", - "sp-trie 30.0.0", + "sp-trie 36.0.0", ] [[package]] name = "bp-xcm-bridge-hub" -version = "0.2.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6663e0179d475e30cfcf28cf597cdc8f4bb1c2c39a557b4cbe0057db0657fb67" +checksum = "192804908f1d3b7bfad12abce448fb3b7ec8dda765cac4a8d811fa75557e528f" dependencies = [ "sp-std", ] [[package]] name = "bp-xcm-bridge-hub-router" -version = "0.7.0" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86ff4abe93be7bc1663adc41817b1aa3476fbec953ce361537419924310d5dd4" +checksum = "b7dae4d1ec894ee920195dd39070b279ef3c1d4d078c3fcf7336c93a1d502a9d" dependencies = [ "parity-scale-codec", "scale-info", - "sp-core 29.0.0", - "sp-runtime 32.0.0", + "sp-core 34.0.0", + "sp-runtime 38.0.0", ] [[package]] name = "bridge-hub-common" -version = "0.1.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e69c25ec3db0ef22ae409cc60f5c42364124264ce6640e17dbcfc0280e4b5dd9" +checksum = "02a1e75deff2d32eeff349a27c062da47d5861b041a0af9f0c24cea9a079bb11" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -1670,8 +1615,8 @@ dependencies = [ "parity-scale-codec", "scale-info", "snowbridge-core", - "sp-core 29.0.0", - "sp-runtime 32.0.0", + "sp-core 34.0.0", + "sp-runtime 38.0.0", "sp-std", "staging-xcm", ] @@ -1685,7 +1630,7 @@ dependencies = [ "emulated-integration-tests-common", "frame-support", "parachains-common", - "sp-core 29.0.0", + "sp-core 34.0.0", ] [[package]] @@ -1718,8 +1663,8 @@ dependencies = [ "snowbridge-pallet-outbound-queue", "snowbridge-pallet-system", "snowbridge-router-primitives", - "sp-core 29.0.0", - "sp-runtime 32.0.0", + "sp-core 34.0.0", + "sp-runtime 38.0.0", "staging-xcm", "staging-xcm-executor", "system-parachains-constants", @@ -1738,6 +1683,7 @@ dependencies = [ "bp-messages", "bp-parachains", "bp-polkadot", + "bp-polkadot-bulletin", "bp-polkadot-core", "bp-relayers", "bp-runtime", @@ -1752,6 +1698,7 @@ dependencies = [ "cumulus-pallet-xcmp-queue", "cumulus-primitives-aura", "cumulus-primitives-core", + "cumulus-primitives-storage-weight-reclaim", "cumulus-primitives-utility", "frame-benchmarking", "frame-executive", @@ -1805,16 +1752,16 @@ dependencies = [ "sp-api", "sp-block-builder", "sp-consensus-aura", - "sp-core 29.0.0", + "sp-core 34.0.0", "sp-genesis-builder", "sp-inherents", - "sp-io 31.0.0", + "sp-io 37.0.0", "sp-keyring", "sp-offchain", - "sp-runtime 32.0.0", + "sp-runtime 38.0.0", "sp-session", "sp-std", - "sp-storage", + "sp-storage 21.0.0", "sp-transaction-pool", "sp-version", "staging-parachain-info", @@ -1824,6 +1771,7 @@ dependencies = [ "static_assertions", "substrate-wasm-builder", "system-parachains-constants", + "tuplex", ] [[package]] @@ -1835,7 +1783,7 @@ dependencies = [ "emulated-integration-tests-common", "frame-support", "parachains-common", - "sp-core 29.0.0", + "sp-core 34.0.0", ] [[package]] @@ -1868,8 +1816,8 @@ dependencies = [ "snowbridge-pallet-outbound-queue", "snowbridge-pallet-system", "snowbridge-router-primitives", - "sp-core 29.0.0", - "sp-runtime 32.0.0", + "sp-core 34.0.0", + "sp-runtime 38.0.0", "staging-xcm", "staging-xcm-executor", "system-parachains-constants", @@ -1888,6 +1836,7 @@ dependencies = [ "bp-messages", "bp-parachains", "bp-polkadot", + "bp-polkadot-bulletin", "bp-polkadot-core", "bp-relayers", "bp-runtime", @@ -1954,16 +1903,16 @@ dependencies = [ "sp-api", "sp-block-builder", "sp-consensus-aura", - "sp-core 29.0.0", + "sp-core 34.0.0", "sp-genesis-builder", "sp-inherents", - "sp-io 31.0.0", + "sp-io 37.0.0", "sp-keyring", "sp-offchain", - "sp-runtime 32.0.0", + "sp-runtime 38.0.0", "sp-session", "sp-std", - "sp-storage", + "sp-storage 21.0.0", "sp-transaction-pool", "sp-version", "staging-parachain-info", @@ -1973,13 +1922,14 @@ dependencies = [ "static_assertions", "substrate-wasm-builder", "system-parachains-constants", + "tuplex", ] [[package]] name = "bridge-hub-test-utils" -version = "0.8.0" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69d67fc7c61f5155579fa7c039b69605c6b0efde22771f947dfa49dafe087be1" +checksum = "cdc3faa943c6524154d8ae8700cddda47bef36f94120bf947a210effe0a323f5" dependencies = [ "asset-test-utils", "bp-header-chain", @@ -2000,16 +1950,17 @@ dependencies = [ "pallet-bridge-messages", "pallet-bridge-parachains", "pallet-bridge-relayers", + "pallet-timestamp", "pallet-utility", "parachains-common", "parachains-runtimes-test-utils", "parity-scale-codec", - "sp-core 29.0.0", - "sp-io 31.0.0", + "sp-core 34.0.0", + "sp-io 37.0.0", "sp-keyring", - "sp-runtime 32.0.0", + "sp-runtime 38.0.0", "sp-std", - "sp-tracing", + "sp-tracing 17.0.0", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -2017,9 +1968,9 @@ dependencies = [ [[package]] name = "bridge-runtime-common" -version = "0.8.0" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be96f5eb3ef2ce92e0337e06b76a2e0e9f120a5f6fd96bf8db817e5643c118b9" +checksum = "fb83d2cdbf8282d03d8c9fb2ed2bdb67f98ae48dd3937ba3d8a302e2f349a332" dependencies = [ "bp-header-chain", "bp-messages", @@ -2042,14 +1993,15 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-api", - "sp-core 29.0.0", - "sp-io 31.0.0", - "sp-runtime 32.0.0", + "sp-core 34.0.0", + "sp-io 37.0.0", + "sp-runtime 38.0.0", "sp-std", - "sp-trie 30.0.0", + "sp-trie 36.0.0", "staging-xcm", "staging-xcm-builder", "static_assertions", + "tuplex", ] [[package]] @@ -2112,17 +2064,6 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" -[[package]] -name = "bzip2-sys" -version = "0.1.11+1.0.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "736a955f3fa7875102d57c82b8cac37ec45224a07fd32d58f9f7a186b6cd4cdc" -dependencies = [ - "cc", - "libc", - "pkg-config", -] - [[package]] name = "c2-chacha" version = "0.3.3" @@ -2175,15 +2116,6 @@ dependencies = [ "libc", ] -[[package]] -name = "cexpr" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" -dependencies = [ - "nom", -] - [[package]] name = "cfg-expr" version = "0.15.5" @@ -2199,12 +2131,6 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" -[[package]] -name = "cfg_aliases" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" - [[package]] name = "chacha" version = "0.3.0" @@ -2269,8 +2195,8 @@ dependencies = [ "sp-authority-discovery", "sp-consensus-babe", "sp-consensus-beefy", - "sp-core 29.0.0", - "sp-runtime 32.0.0", + "sp-core 34.0.0", + "sp-runtime 38.0.0", "staging-kusama-runtime", "staging-xcm", ] @@ -2303,6 +2229,19 @@ dependencies = [ "unsigned-varint", ] +[[package]] +name = "cid" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd94671561e36e4e7de75f753f577edafb0e7c05d6e4547229fdf7938fbcd2c3" +dependencies = [ + "core2", + "multibase", + "multihash 0.18.1", + "serde", + "unsigned-varint", +] + [[package]] name = "cipher" version = "0.2.5" @@ -2323,26 +2262,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "ckb-merkle-mountain-range" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56ccb671c5921be8a84686e6212ca184cb1d7c51cadcdbfcbd1cc3f042f5dfb8" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "clang-sys" -version = "1.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67523a3b4be3ce1989d607a828d036249522dd9c1c8de7f4dd2dae43a37369d1" -dependencies = [ - "glob", - "libc", - "libloading", -] - [[package]] name = "clap" version = "4.5.0" @@ -2363,7 +2282,6 @@ dependencies = [ "anstyle", "clap_lex", "strsim 0.11.0", - "terminal_size", ] [[package]] @@ -2372,10 +2290,10 @@ version = "4.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "307bc0538d5f0f83b8248db3087aa92fe504e4691294d0c96c0eabc33f47ba47" dependencies = [ - "heck", + "heck 0.4.1", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.65", ] [[package]] @@ -2384,17 +2302,6 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" -[[package]] -name = "coarsetime" -version = "0.1.34" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13b3839cf01bb7960114be3ccf2340f541b6d0c81f8690b007b2b39f750f7e5d" -dependencies = [ - "libc", - "wasix", - "wasm-bindgen", -] - [[package]] name = "codespan-reporting" version = "0.11.1" @@ -2414,7 +2321,7 @@ dependencies = [ "emulated-integration-tests-common", "frame-support", "parachains-common", - "sp-core 29.0.0", + "sp-core 34.0.0", ] [[package]] @@ -2445,8 +2352,8 @@ dependencies = [ "polkadot-runtime-common", "polkadot-runtime-constants", "polkadot-system-emulated-network", - "sp-core 29.0.0", - "sp-runtime 32.0.0", + "sp-core 34.0.0", + "sp-runtime 38.0.0", "staging-xcm", "staging-xcm-executor", "system-parachains-constants", @@ -2506,17 +2413,17 @@ dependencies = [ "polkadot-runtime-constants", "scale-info", "sp-api", - "sp-arithmetic 24.0.0", + "sp-arithmetic 26.0.0", "sp-block-builder", "sp-consensus-aura", - "sp-core 29.0.0", + "sp-core 34.0.0", "sp-genesis-builder", "sp-inherents", "sp-offchain", - "sp-runtime 32.0.0", + "sp-runtime 38.0.0", "sp-session", "sp-std", - "sp-storage", + "sp-storage 21.0.0", "sp-transaction-pool", "sp-version", "staging-parachain-info", @@ -2538,14 +2445,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" [[package]] -name = "comfy-table" -version = "7.1.0" +name = "combine" +version = "4.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c64043d6c7b7a4c58e39e7efccfdea7b93d885a795d0c054a69dbbf4dd52686" +checksum = "ba5a308b75df32fe02788e748662718f03fde005016435c444eea572398219fd" dependencies = [ - "strum 0.25.0", - "strum_macros 0.25.3", - "unicode-width", + "bytes", + "memchr", ] [[package]] @@ -2675,6 +2581,7 @@ dependencies = [ "cumulus-pallet-xcmp-queue", "cumulus-primitives-aura", "cumulus-primitives-core", + "cumulus-primitives-storage-weight-reclaim", "cumulus-primitives-utility", "frame-benchmarking", "frame-executive", @@ -2713,14 +2620,14 @@ dependencies = [ "sp-api", "sp-block-builder", "sp-consensus-aura", - "sp-core 29.0.0", + "sp-core 34.0.0", "sp-genesis-builder", "sp-inherents", "sp-offchain", - "sp-runtime 32.0.0", + "sp-runtime 38.0.0", "sp-session", "sp-std", - "sp-storage", + "sp-storage 21.0.0", "sp-transaction-pool", "sp-version", "staging-parachain-info", @@ -2740,16 +2647,6 @@ dependencies = [ "cfg-if", ] -[[package]] -name = "cpu-time" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9e393a7668fe1fad3075085b86c781883000b4ede868f43627b34a87c8b7ded" -dependencies = [ - "libc", - "winapi", -] - [[package]] name = "cpufeatures" version = "0.2.11" @@ -2783,7 +2680,7 @@ dependencies = [ "gimli 0.27.3", "hashbrown 0.13.2", "log", - "regalloc2", + "regalloc2 0.6.1", "smallvec", "target-lexicon", ] @@ -2859,18 +2756,18 @@ dependencies = [ [[package]] name = "crc" -version = "2.1.0" +version = "3.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49fc9a695bca7f35f5f4c15cddc84415f66a74ea78eef08e90c5024f2b540e23" +checksum = "69e6e4d7b33a94f0991c26729976b10ebde1d34c3ee82408fb536164fa10d636" dependencies = [ "crc-catalog", ] [[package]] name = "crc-catalog" -version = "1.1.1" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccaeedb56da03b09f598226e25e80088cb4cd25f316e6e4df7d695f0feeb1403" +checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5" [[package]] name = "crc32fast" @@ -2964,16 +2861,6 @@ dependencies = [ "subtle 2.5.0", ] -[[package]] -name = "crypto-mac" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25fab6889090c8133f3deb8f73ba3c65a7f456f66436fc012a1b1e272b1e103e" -dependencies = [ - "generic-array 0.14.7", - "subtle 2.5.0", -] - [[package]] name = "ctr" version = "0.9.2" @@ -2985,9 +2872,9 @@ dependencies = [ [[package]] name = "cumulus-pallet-aura-ext" -version = "0.8.0" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e8e78b18548ae3454bc8a46e2bc2e3f521ea547844cbaecc9344d4741f4b1ef" +checksum = "52088d88534bd04ea251c030af1fef69845d29ed4fc9be399c1fbd5a311bea61" dependencies = [ "cumulus-pallet-parachain-system", "frame-support", @@ -2996,17 +2883,17 @@ dependencies = [ "pallet-timestamp", "parity-scale-codec", "scale-info", - "sp-application-crypto 31.0.0", + "sp-application-crypto 37.0.0", "sp-consensus-aura", - "sp-runtime 32.0.0", + "sp-runtime 38.0.0", "sp-std", ] [[package]] name = "cumulus-pallet-dmp-queue" -version = "0.8.0" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ebf036bcb1e61c943cf588d14b903234594fb2538f2d7dae36e20fcc3c86e8" +checksum = "162f3379818ae6493b842b5c603010827d3ea5b7093070acb5ab12f824e168fc" dependencies = [ "cumulus-primitives-core", "frame-benchmarking", @@ -3015,17 +2902,17 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-io 31.0.0", - "sp-runtime 32.0.0", + "sp-io 37.0.0", + "sp-runtime 38.0.0", "sp-std", "staging-xcm", ] [[package]] name = "cumulus-pallet-parachain-system" -version = "0.8.1" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a215fe4d66d23e8f3956bd21b9d80d2b33239f3b150b36d56fa238cfc9421a5" +checksum = "95f75a9e4dfebf1850c7c946a49cdb8b5e82a143155a40337ea083f412e13071" dependencies = [ "bytes", "cumulus-pallet-parachain-system-proc-macro", @@ -3044,17 +2931,18 @@ dependencies = [ "polkadot-runtime-common", "polkadot-runtime-parachains", "scale-info", - "sp-core 29.0.0", - "sp-externalities 0.26.0", + "sp-core 34.0.0", + "sp-externalities 0.29.0", "sp-inherents", - "sp-io 31.0.0", - "sp-runtime 32.0.0", - "sp-state-machine 0.36.0", + "sp-io 37.0.0", + "sp-runtime 38.0.0", + "sp-state-machine 0.42.0", "sp-std", - "sp-trie 30.0.0", + "sp-trie 36.0.0", "sp-version", "staging-xcm", - "trie-db", + "staging-xcm-builder", + "trie-db 0.29.1", ] [[package]] @@ -3066,46 +2954,46 @@ dependencies = [ "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.65", ] [[package]] name = "cumulus-pallet-session-benchmarking" -version = "10.0.0" +version = "16.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f3259f743f70f39baa3abf2d9d8de864e18120465f8731b99bef039a3bf9329" +checksum = "5d45ca03e091945ecbb293df36823202ce3eba6133454968bf54e3f82c1b58ee" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "pallet-session", "parity-scale-codec", - "sp-runtime 32.0.0", + "sp-runtime 38.0.0", "sp-std", ] [[package]] name = "cumulus-pallet-xcm" -version = "0.8.0" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e802291060763f8d1176bf808da97aafe5afe7351f62bb093c317c1d35c5cee" +checksum = "dccf061aecc7c4b393c6586a0d95900bc0dfc8ac9298313a608d2389bf7f8de2" dependencies = [ "cumulus-primitives-core", "frame-support", "frame-system", "parity-scale-codec", "scale-info", - "sp-io 31.0.0", - "sp-runtime 32.0.0", + "sp-io 37.0.0", + "sp-runtime 38.0.0", "sp-std", "staging-xcm", ] [[package]] name = "cumulus-pallet-xcmp-queue" -version = "0.8.0" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa22d6e479a4d3a2790bab291269ba0917a1ac384255a54a2ebc3f7c37e505e" +checksum = "437a52fc63387f1aa2211bc219e1283a935ed36d9ccbb3373faee0398125c466" dependencies = [ "bounded-collections", "bp-xcm-bridge-hub-router", @@ -3119,34 +3007,35 @@ dependencies = [ "polkadot-runtime-common", "polkadot-runtime-parachains", "scale-info", - "sp-core 29.0.0", - "sp-io 31.0.0", - "sp-runtime 32.0.0", + "sp-core 34.0.0", + "sp-io 37.0.0", + "sp-runtime 38.0.0", "sp-std", "staging-xcm", + "staging-xcm-builder", "staging-xcm-executor", ] [[package]] name = "cumulus-primitives-aura" -version = "0.8.0" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f07d6177692154043d7ddcc0b87ca5365ae8e4d94b90d9931f6b2f76e162f09" +checksum = "3e7977947ad43a4cbc532ca33abcde136ae3deffdc7168b2ae253d73ccd371e4" dependencies = [ "parity-scale-codec", "polkadot-core-primitives", "polkadot-primitives", "sp-api", "sp-consensus-aura", - "sp-runtime 32.0.0", + "sp-runtime 38.0.0", "sp-std", ] [[package]] name = "cumulus-primitives-core" -version = "0.8.0" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9df07f6825fd50ea30aae335e43dc1a615a05de7465f5f329b9e414f2c886a12" +checksum = "751e64b89a839d5cfabebc1c797936e5eee791d0fa2322d91e86f8440a743ddb" dependencies = [ "parity-scale-codec", "polkadot-core-primitives", @@ -3154,44 +3043,64 @@ dependencies = [ "polkadot-primitives", "scale-info", "sp-api", - "sp-runtime 32.0.0", + "sp-runtime 38.0.0", "sp-std", - "sp-trie 30.0.0", + "sp-trie 36.0.0", "staging-xcm", ] [[package]] name = "cumulus-primitives-parachain-inherent" -version = "0.8.0" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38ad140a065a6b8001fb26ec42b91391e90fde120f5b4e57986698249a9b98c8" +checksum = "df521e13b48278b86d02c61d6e44036d6d263deb5aaec4838b1751da8988d3d2" dependencies = [ "async-trait", "cumulus-primitives-core", "parity-scale-codec", "scale-info", - "sp-core 29.0.0", + "sp-core 34.0.0", "sp-inherents", + "sp-runtime 38.0.0", + "sp-state-machine 0.42.0", "sp-std", - "sp-trie 30.0.0", + "sp-trie 36.0.0", ] [[package]] name = "cumulus-primitives-proof-size-hostfunction" -version = "0.3.0" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f973d2a7262c90e48dcd42062bcb1e0fbf48bbcdac4ea6df3d85212d8d8be5d" +dependencies = [ + "sp-externalities 0.29.0", + "sp-runtime-interface 28.0.0", + "sp-trie 36.0.0", +] + +[[package]] +name = "cumulus-primitives-storage-weight-reclaim" +version = "5.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1b74f9141190b9f4bf96a947ade46da64097b77f1ebfa8d611c81724250e119" +checksum = "4ea10ccbf595c8b2e6dd34dcf8f5f213d6dd5e3de0f73b1eae71045ac04c692f" dependencies = [ - "sp-externalities 0.26.0", - "sp-runtime-interface 25.0.0", - "sp-trie 30.0.0", + "cumulus-primitives-core", + "cumulus-primitives-proof-size-hostfunction", + "docify", + "frame-support", + "frame-system", + "log", + "parity-scale-codec", + "scale-info", + "sp-runtime 38.0.0", + "sp-std", ] [[package]] name = "cumulus-primitives-utility" -version = "0.8.1" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e65466e56d642f979b556d098a03755ae51972fff5fa0f9b1cdcfdb3df062ea3" +checksum = "192d7917d70fdb0998311df31430bd28408af9abce79a2245efbf511a8fa4671" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -3200,8 +3109,8 @@ dependencies = [ "parity-scale-codec", "polkadot-runtime-common", "polkadot-runtime-parachains", - "sp-io 31.0.0", - "sp-runtime 32.0.0", + "sp-io 37.0.0", + "sp-runtime 38.0.0", "sp-std", "staging-xcm", "staging-xcm-builder", @@ -3210,30 +3119,17 @@ dependencies = [ [[package]] name = "cumulus-test-relay-sproof-builder" -version = "0.8.0" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfff604ad01c5c0c397f9a971c8cec6443aea3658813778875b4f64de07847d5" +checksum = "e1f4ab9d64a581d4a5431f2554f4602a4208c5e28b30be01af386e24d8447599" dependencies = [ "cumulus-primitives-core", "parity-scale-codec", "polkadot-primitives", - "sp-runtime 32.0.0", - "sp-state-machine 0.36.0", + "sp-runtime 38.0.0", + "sp-state-machine 0.42.0", "sp-std", - "sp-trie 30.0.0", -] - -[[package]] -name = "curve25519-dalek" -version = "2.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a9b85542f99a2dfa2a1b8e192662741c9859a846b296bef1c92ef9b58b5a216" -dependencies = [ - "byteorder", - "digest 0.8.1", - "rand_core 0.5.1", - "subtle 2.5.0", - "zeroize", + "sp-trie 36.0.0", ] [[package]] @@ -3274,7 +3170,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.65", ] [[package]] @@ -3301,7 +3197,7 @@ dependencies = [ "proc-macro2", "quote", "scratch", - "syn 2.0.52", + "syn 2.0.65", ] [[package]] @@ -3318,7 +3214,7 @@ checksum = "587663dd5fb3d10932c8aecfe7c844db1bcf0aee93eeab08fac13dc1212c2e7f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.65", ] [[package]] @@ -3366,7 +3262,7 @@ dependencies = [ "proc-macro2", "quote", "strsim 0.10.0", - "syn 2.0.52", + "syn 2.0.65", ] [[package]] @@ -3388,7 +3284,7 @@ checksum = "a668eda54683121533a393014d8692171709ff57a7d61f187b6e782719f8933f" dependencies = [ "darling_core 0.20.8", "quote", - "syn 2.0.52", + "syn 2.0.65", ] [[package]] @@ -3480,7 +3376,7 @@ checksum = "d65d7ce8132b7c0e54497a4d9a55a1c2a0912a0d786cf894472ba818fba45762" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.65", ] [[package]] @@ -3532,15 +3428,6 @@ dependencies = [ "subtle 2.5.0", ] -[[package]] -name = "directories" -version = "5.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a49173b84e034382284f27f1af4dcbbd231ffa358c0fe316541a7337f376a35" -dependencies = [ - "dirs-sys", -] - [[package]] name = "directories-next" version = "2.0.0" @@ -3552,26 +3439,14 @@ dependencies = [ ] [[package]] -name = "dirs-sys" -version = "0.4.1" +name = "dirs-sys-next" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" +checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" dependencies = [ "libc", - "option-ext", "redox_users", - "windows-sys 0.48.0", -] - -[[package]] -name = "dirs-sys-next" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" -dependencies = [ - "libc", - "redox_users", - "winapi", + "winapi", ] [[package]] @@ -3582,7 +3457,7 @@ checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.65", ] [[package]] @@ -3606,7 +3481,7 @@ dependencies = [ "proc-macro2", "quote", "regex", - "syn 2.0.52", + "syn 2.0.65", "termcolor", "toml 0.8.10", "walkdir", @@ -3674,10 +3549,19 @@ dependencies = [ "elliptic-curve", "rfc6979", "serdect", - "signature", + "signature 2.2.0", "spki", ] +[[package]] +name = "ed25519" +version = "1.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91cff35c70bba8a626e3185d8cd48cc11b5437e1a5bcd15b9b5fa3c64b6dfee7" +dependencies = [ + "signature 1.6.4", +] + [[package]] name = "ed25519" version = "2.2.3" @@ -3685,7 +3569,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53" dependencies = [ "pkcs8", - "signature", + "signature 2.2.0", +] + +[[package]] +name = "ed25519-dalek" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c762bae6dcaf24c4c84667b8579785430908723d5c889f469d76a41d59cc7a9d" +dependencies = [ + "curve25519-dalek 3.2.0", + "ed25519 1.5.3", + "rand 0.7.3", + "serde", + "sha2 0.9.9", + "zeroize", ] [[package]] @@ -3695,7 +3593,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1f628eaec48bfd21b865dc2950cfa014450c01d2fa2b69a86c2fd5844ec523c0" dependencies = [ "curve25519-dalek 4.1.2", - "ed25519", + "ed25519 2.2.3", "rand_core 0.6.4", "serde", "sha2 0.10.8", @@ -3724,7 +3622,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7d9ce6874da5d4415896cd45ffbc4d1cfc0c4f9c079427bd870742c30f2f65a9" dependencies = [ "curve25519-dalek 4.1.2", - "ed25519", + "ed25519 2.2.3", "hashbrown 0.14.3", "hex", "rand_core 0.6.4", @@ -3760,9 +3658,9 @@ dependencies = [ [[package]] name = "emulated-integration-tests-common" -version = "4.0.0" +version = "10.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24a73ae1af5bb264240ccd199335ae78db85d055da4f749d44333d21719e5896" +checksum = "7ed370859bdc90ced8e87c23f5df05cb360437607583b9c32734780014ff5cd9" dependencies = [ "asset-test-utils", "bp-messages", @@ -3779,14 +3677,15 @@ dependencies = [ "parachains-common", "parity-scale-codec", "paste", + "polkadot-parachain-primitives", "polkadot-primitives", "polkadot-runtime-parachains", - "polkadot-service", "sc-consensus-grandpa", "sp-authority-discovery", "sp-consensus-babe", - "sp-core 29.0.0", - "sp-runtime 32.0.0", + "sp-consensus-beefy", + "sp-core 34.0.0", + "sp-runtime 38.0.0", "staging-xcm", "xcm-emulator", ] @@ -3808,9 +3707,9 @@ dependencies = [ [[package]] name = "encointer-balances-tx-payment" -version = "6.1.0" +version = "12.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be09b48ab6e4cdf6316cd3faf036940c4517d149499f07c9e3ddfb70dcc71488" +checksum = "f912501176bc6c3594ff9f1e60994d99faa41bd90395866d7aed87214bb5a3a4" dependencies = [ "encointer-primitives", "frame-support", @@ -3820,14 +3719,14 @@ dependencies = [ "pallet-encointer-balances", "pallet-encointer-ceremonies", "pallet-transaction-payment", - "sp-runtime 32.0.0", + "sp-runtime 38.0.0", ] [[package]] name = "encointer-balances-tx-payment-rpc-runtime-api" -version = "6.1.0" +version = "12.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "817560882892e4527f08b152a300772057317725a335e15ce654a07adb60d9d8" +checksum = "0d0708f366a77b08ec7e4e0b5977294d1498201c21fe560ddb10a714eddf9ca1" dependencies = [ "encointer-primitives", "frame-support", @@ -3839,12 +3738,12 @@ dependencies = [ [[package]] name = "encointer-ceremonies-assignment" -version = "6.1.0" +version = "12.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06fb1e51610f1aedf130a9909977943e75de4d44218c60fc73f78b8b410ef872" +checksum = "4843d58de5b199ce7df902d13ee032b306dd753c49a70996b67f4457a209d817" dependencies = [ "encointer-primitives", - "sp-runtime 32.0.0", + "sp-runtime 38.0.0", "sp-std", ] @@ -3912,11 +3811,11 @@ dependencies = [ "sp-api", "sp-block-builder", "sp-consensus-aura", - "sp-core 29.0.0", + "sp-core 34.0.0", "sp-genesis-builder", "sp-inherents", "sp-offchain", - "sp-runtime 32.0.0", + "sp-runtime 38.0.0", "sp-session", "sp-std", "sp-transaction-pool", @@ -3931,23 +3830,23 @@ dependencies = [ [[package]] name = "encointer-meetup-validation" -version = "6.1.0" +version = "12.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f7840e8d6e88ac1f2393f6cf5003471663585f8c43d94b26c2e3d4376248148" +checksum = "9c7662dc01216f37278396d7375663d11af6ea676c78b9263745d50db507b477" dependencies = [ "encointer-primitives", "parity-scale-codec", "scale-info", "serde", - "sp-runtime 32.0.0", + "sp-runtime 38.0.0", "sp-std", ] [[package]] name = "encointer-primitives" -version = "6.1.0" +version = "12.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf4b67ace89f88af02b70f36c8668222bcfc3ac0cac48ac92007ed1218a7643e" +checksum = "a8c009e8a0f388b7e6c7cc59bf81a6f9783eb7493c5230282f1c899ec6e2c637" dependencies = [ "bs58 0.5.0", "crc", @@ -3957,9 +3856,9 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-core 29.0.0", - "sp-io 31.0.0", - "sp-runtime 32.0.0", + "sp-core 34.0.0", + "sp-io 37.0.0", + "sp-runtime 38.0.0", "sp-std", "substrate-geohash", ] @@ -3970,12 +3869,24 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c9720bba047d567ffc8a3cba48bf19126600e249ab7f128e9233e6376976a116" dependencies = [ - "heck", + "heck 0.4.1", "proc-macro2", "quote", "syn 1.0.109", ] +[[package]] +name = "enum-as-inner" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ffccbb6966c05b32ef8fbac435df276c4ae4d3dc55a8cd0eb9745e6c12f546a" +dependencies = [ + "heck 0.4.1", + "proc-macro2", + "quote", + "syn 2.0.65", +] + [[package]] name = "enumflags2" version = "0.7.8" @@ -3993,7 +3904,7 @@ checksum = "f95e2801cd355d4a1a3e3953ce6ee5ae9603a5c833455343a8bfe3f44d418246" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.65", ] [[package]] @@ -4004,7 +3915,7 @@ checksum = "c2ad8cef1d801a4686bfd8919f0b30eac4c8e48968c437a6405ded4fb5272d2b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.65", ] [[package]] @@ -4028,18 +3939,18 @@ checksum = "e48c92028aaa870e83d51c64e5d4e0b6981b360c522198c23959f219a4e1b15b" [[package]] name = "ep-core" -version = "6.0.0" +version = "12.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b20f3b698c54e106bcb0533055bf99d64ae9c53261e7ed24366d1ca729a1259" +checksum = "21fa8791695ac76e98d9f7044201ae8e1ac036ae00a347337794c5d8a645e4ad" dependencies = [ - "array-bytes 6.2.2", + "array-bytes", "impl-serde", "parity-scale-codec", "scale-info", "serde", - "sp-arithmetic 24.0.0", - "sp-core 29.0.0", - "sp-runtime 32.0.0", + "sp-arithmetic 26.0.0", + "sp-core 34.0.0", + "sp-runtime 38.0.0", "sp-std", "substrate-fixed", ] @@ -4149,27 +4060,6 @@ dependencies = [ "pin-project-lite 0.2.13", ] -[[package]] -name = "exit-future" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e43f2f1833d64e33f15592464d6fdd70f349dda7b1a53088eb83cd94014008c5" -dependencies = [ - "futures", -] - -[[package]] -name = "expander" -version = "0.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a718c0675c555c5f976fff4ea9e2c150fa06cefa201cadef87cfbf9324075881" -dependencies = [ - "blake3", - "fs-err", - "proc-macro2", - "quote", -] - [[package]] name = "expander" version = "2.0.0" @@ -4180,20 +4070,20 @@ dependencies = [ "fs-err", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.65", ] [[package]] -name = "fake-simd" -version = "0.1.2" +name = "fallible-iterator" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" +checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" [[package]] name = "fallible-iterator" -version = "0.2.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" +checksum = "2acce4a10f12dc2fb14a218589d4f1f62ef011b2d0cc4b3cb1bba8e94da14649" [[package]] name = "fastrand" @@ -4212,41 +4102,6 @@ dependencies = [ "bytes", ] -[[package]] -name = "fatality" -version = "0.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ad875162843b0d046276327afe0136e9ed3a23d5a754210fb6f1f33610d39ab" -dependencies = [ - "fatality-proc-macro", - "thiserror", -] - -[[package]] -name = "fatality-proc-macro" -version = "0.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5aa1e3ae159e592ad222dc90c5acbad632b527779ba88486abe92782ab268bd" -dependencies = [ - "expander 0.0.4", - "indexmap 1.9.3", - "proc-macro-crate 1.3.1", - "proc-macro2", - "quote", - "syn 1.0.109", - "thiserror", -] - -[[package]] -name = "fdlimit" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e182f7dbc2ef73d9ef67351c5fbbea084729c48362d3ce9dd44c28e32e277fe5" -dependencies = [ - "libc", - "thiserror", -] - [[package]] name = "ff" version = "0.13.0" @@ -4308,7 +4163,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "835c052cb0c08c1acf6ffd71c022172e18723949c8282f2b9f27efbc51e64534" dependencies = [ "byteorder", - "rand", + "rand 0.8.5", "rustc-hex", "static_assertions", ] @@ -4362,9 +4217,9 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "fork-tree" -version = "12.0.0" +version = "13.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e93d3f0315c2eccf23453609e0ab92fe7c6ad1ca8129bcaf80b9a08c8d7fc52b" +checksum = "ad4cc2314d3be8b49c555f6a7e550f5559e73ffd6ef9690ffbd9a706774452e0" dependencies = [ "parity-scale-codec", ] @@ -4386,9 +4241,9 @@ checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" [[package]] name = "frame-benchmarking" -version = "29.0.0" +version = "35.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4090659c6aaa3c4d5b6c6ec909b4b0a25dec10ad92aad5f729efa8d5bd4d806a" +checksum = "ad6366773db71a556710652c0560300dc938252e009d4d2c1eb9d6e5b38e0860" dependencies = [ "frame-support", "frame-support-procedural", @@ -4400,112 +4255,64 @@ dependencies = [ "scale-info", "serde", "sp-api", - "sp-application-crypto 31.0.0", - "sp-core 29.0.0", - "sp-io 31.0.0", - "sp-runtime 32.0.0", - "sp-runtime-interface 25.0.0", + "sp-application-crypto 37.0.0", + "sp-core 34.0.0", + "sp-io 37.0.0", + "sp-runtime 38.0.0", + "sp-runtime-interface 28.0.0", "sp-std", - "sp-storage", + "sp-storage 21.0.0", "static_assertions", ] -[[package]] -name = "frame-benchmarking-cli" -version = "33.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efe02c96362e3c7308cdea7545859f767194a1f3f00928f0e1357f4b8a0b3b2c" -dependencies = [ - "Inflector", - "array-bytes 6.2.2", - "chrono", - "clap", - "comfy-table", - "frame-benchmarking", - "frame-support", - "frame-system", - "gethostname", - "handlebars", - "itertools 0.10.5", - "lazy_static", - "linked-hash-map", - "log", - "parity-scale-codec", - "rand", - "rand_pcg", - "sc-block-builder", - "sc-cli", - "sc-client-api", - "sc-client-db", - "sc-executor", - "sc-service", - "sc-sysinfo", - "serde", - "serde_json", - "sp-api", - "sp-blockchain", - "sp-core 29.0.0", - "sp-database", - "sp-externalities 0.26.0", - "sp-inherents", - "sp-io 31.0.0", - "sp-keystore 0.35.0", - "sp-runtime 32.0.0", - "sp-state-machine 0.36.0", - "sp-storage", - "sp-trie 30.0.0", - "sp-wasm-interface", - "thiserror", - "thousands", -] - [[package]] name = "frame-election-provider-solution-type" -version = "13.0.0" +version = "14.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5c3bff645e46577c69c272733c53fa3a77d1ee6e40dfb66157bc94b0740b8fc" +checksum = "1388eb632484a1208a5b51d7d822a7df995f37bb10878b2a88f4ec89cbe5e6b2" dependencies = [ "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.65", ] [[package]] name = "frame-election-provider-support" -version = "29.0.0" +version = "35.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87da19ee99e6473cd057ead84337d20011fe5e299c6750e88e43b8b7963b8852" +checksum = "b3c089c16a066dfb5042cadc27c01738d93258e8f5f7ef7a83b4c8661616d1ac" dependencies = [ "frame-election-provider-solution-type", "frame-support", "frame-system", "parity-scale-codec", "scale-info", - "sp-arithmetic 24.0.0", - "sp-core 29.0.0", + "sp-arithmetic 26.0.0", + "sp-core 34.0.0", "sp-npos-elections", - "sp-runtime 32.0.0", + "sp-runtime 38.0.0", "sp-std", ] [[package]] name = "frame-executive" -version = "29.0.0" +version = "35.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09bff9574ee2dcc349f646e1d2faadf76afd688c2ea1bbac5e4a0e19a0c19c59" +checksum = "9287dd6070c0ca90b42c9b4fc44f2bc91adf08b73c11c74484c416f0cc9abe04" dependencies = [ + "aquamarine", "frame-support", "frame-system", "frame-try-runtime", "log", "parity-scale-codec", "scale-info", - "sp-core 29.0.0", - "sp-io 31.0.0", - "sp-runtime 32.0.0", + "sp-core 34.0.0", + "sp-io 37.0.0", + "sp-runtime 38.0.0", "sp-std", - "sp-tracing", + "sp-tracing 17.0.0", ] [[package]] @@ -4533,37 +4340,37 @@ dependencies = [ [[package]] name = "frame-metadata-hash-extension" -version = "0.1.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bb1eec9eb46d3e016c95b2fa875118c04609f2150013c56a894cae00581e265" +checksum = "ba1fa15dc90efe948898c06a3be111628230db100ffa2907e662062e9c9d1abd" dependencies = [ - "array-bytes 6.2.2", + "array-bytes", "docify", "frame-support", "frame-system", "log", "parity-scale-codec", "scale-info", - "sp-runtime 32.0.0", + "sp-runtime 38.0.0", ] [[package]] name = "frame-remote-externalities" -version = "0.36.0" +version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "360bfdb6821372164a65933d9a6d5998f38c722360b59b69d2bf78a87ef58b2a" +checksum = "36b0819e6a65cd647f33ddef0e73583c2d527e87e4bcd1472e41e9c6bbcfeb67" dependencies = [ "futures", "indicatif", - "jsonrpsee 0.20.3", + "jsonrpsee", "log", "parity-scale-codec", "serde", - "sp-core 29.0.0", + "sp-core 34.0.0", "sp-crypto-hashing", - "sp-io 31.0.0", - "sp-runtime 32.0.0", - "sp-state-machine 0.36.0", + "sp-io 37.0.0", + "sp-runtime 38.0.0", + "sp-state-machine 0.42.0", "spinners", "substrate-rpc-client", "tokio", @@ -4572,12 +4379,12 @@ dependencies = [ [[package]] name = "frame-support" -version = "29.0.2" +version = "35.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8e52c84b611d2049d9253f83a62ab0f093e4be5c42a7ef42ea5bb16d6611e32" +checksum = "ab6d7780b7f337c8a072f0a7480cbc7b580f9bf871c434fae65e8935053ee5ef" dependencies = [ "aquamarine", - "array-bytes 6.2.2", + "array-bytes", "bitflags 1.3.2", "docify", "environmental", @@ -4594,73 +4401,73 @@ dependencies = [ "serde_json", "smallvec", "sp-api", - "sp-arithmetic 24.0.0", - "sp-core 29.0.0", + "sp-arithmetic 26.0.0", + "sp-core 34.0.0", "sp-crypto-hashing-proc-macro", "sp-debug-derive", "sp-genesis-builder", "sp-inherents", - "sp-io 31.0.0", + "sp-io 37.0.0", "sp-metadata-ir", - "sp-runtime 32.0.0", + "sp-runtime 38.0.0", "sp-staking", - "sp-state-machine 0.36.0", + "sp-state-machine 0.42.0", "sp-std", - "sp-tracing", - "sp-weights 28.0.0", + "sp-tracing 17.0.0", + "sp-weights 31.0.0", "static_assertions", "tt-call", ] [[package]] name = "frame-support-procedural" -version = "24.0.0" +version = "30.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3bf1d648c4007d421b9677b3c893256913498fff159dc2d85022cdd9cc432f3c" +checksum = "4328bc3667947393eabd1234ae2f07f1c71b63f57b41344db3d9eafe3384adfd" dependencies = [ "Inflector", "cfg-expr", - "derive-syn-parse 0.1.5", - "expander 2.0.0", + "derive-syn-parse 0.2.0", + "expander", "frame-support-procedural-tools", - "itertools 0.10.5", + "itertools 0.11.0", "macro_magic", "proc-macro-warning", "proc-macro2", "quote", "sp-crypto-hashing", - "syn 2.0.52", + "syn 2.0.65", ] [[package]] name = "frame-support-procedural-tools" -version = "10.0.0" +version = "13.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3363df38464c47a73eb521a4f648bfcc7537a82d70347ef8af3f73b6d019e910" +checksum = "bead15a320be1764cdd50458c4cfacb23e0cee65f64f500f8e34136a94c7eeca" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.65", ] [[package]] name = "frame-support-procedural-tools-derive" -version = "11.0.0" +version = "12.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68672b9ec6fe72d259d3879dc212c5e42e977588cdac830c76f54d9f492aeb58" +checksum = "ed971c6435503a099bdac99fe4c5bea08981709e5b5a0a8535a1856f48561191" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.65", ] [[package]] name = "frame-system" -version = "29.0.0" +version = "35.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bc20a793c3cec0b11165c1075fe11a255b2491f3eef8230bb3073cb296e7383" +checksum = "6baa2218d90c5a23db08dd0188cfe6aa0af7d36fb9b0fc2f73bc5c4abe4dd812" dependencies = [ "cfg-if", "docify", @@ -4669,35 +4476,35 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-core 29.0.0", - "sp-io 31.0.0", - "sp-runtime 32.0.0", + "sp-core 34.0.0", + "sp-io 37.0.0", + "sp-runtime 38.0.0", "sp-std", "sp-version", - "sp-weights 28.0.0", + "sp-weights 31.0.0", ] [[package]] name = "frame-system-benchmarking" -version = "29.0.0" +version = "35.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac47ee48fee3a0b49c9ab9ee68997dee3733776a355f780cf2858449cf495d69" +checksum = "be45f57aefef5fa97fce1482dc1ede197620d8b0bb588b3cec8d84f32557cf8b" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "parity-scale-codec", "scale-info", - "sp-core 29.0.0", - "sp-runtime 32.0.0", + "sp-core 34.0.0", + "sp-runtime 38.0.0", "sp-std", ] [[package]] name = "frame-system-rpc-runtime-api" -version = "27.0.0" +version = "33.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c1b20433c3c76b56ce905ed971631ec8c34fa64cf6c20e590afe46455fc0cc8" +checksum = "c9e9e2b7b85e451e367f4fb85ff3295bd039e17f64de1906154d3976e2638ee8" dependencies = [ "parity-scale-codec", "sp-api", @@ -4705,14 +4512,14 @@ dependencies = [ [[package]] name = "frame-try-runtime" -version = "0.35.0" +version = "0.41.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0eab87d07bc2f9a2160b818d1b7506c303b3b28b6a8a5f01dc5e2641390450b5" +checksum = "8f2b9c95e0b38d713a46bb71bc395d4ed067c7a0f5370e13282c07c91fd1ec0d" dependencies = [ "frame-support", "parity-scale-codec", "sp-api", - "sp-runtime 32.0.0", + "sp-runtime 38.0.0", "sp-std", ] @@ -4725,16 +4532,6 @@ dependencies = [ "autocfg", ] -[[package]] -name = "fs2" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9564fc758e15025b46aa6643b1b77d047d1a56a1aea6e01002ac0c7026876213" -dependencies = [ - "libc", - "winapi", -] - [[package]] name = "funty" version = "2.0.0" @@ -4811,7 +4608,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.65", ] [[package]] @@ -4839,9 +4636,9 @@ checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" [[package]] name = "futures-timer" -version = "3.0.2" +version = "3.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c" +checksum = "f288b0a4f20f9a56b5d1da57e2227c661b7b16168e2f72365f57b63326e29b24" [[package]] name = "futures-util" @@ -4890,16 +4687,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "gethostname" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1ebd34e35c46e00bb73e81363248d627782724609fe1b6396f553f68fe3862e" -dependencies = [ - "libc", - "winapi", -] - [[package]] name = "getrandom" version = "0.1.16" @@ -4928,7 +4715,7 @@ version = "0.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6ea1015b5a70616b688dc230cfe50c8af89d972cb132d5a622814d29773b10b9" dependencies = [ - "rand", + "rand 0.8.5", "rand_core 0.6.4", ] @@ -4948,7 +4735,7 @@ version = "0.27.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6c80984affa11d98d1b88b66ac8853f143217b399d3c74116778ff8fdb4ed2e" dependencies = [ - "fallible-iterator", + "fallible-iterator 0.2.0", "indexmap 1.9.3", "stable_deref_trait", ] @@ -4958,12 +4745,10 @@ name = "gimli" version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" - -[[package]] -name = "glob" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" +dependencies = [ + "fallible-iterator 0.3.0", + "stable_deref_trait", +] [[package]] name = "glutton-kusama-runtime" @@ -4987,14 +4772,14 @@ dependencies = [ "scale-info", "sp-api", "sp-block-builder", - "sp-core 29.0.0", + "sp-core 34.0.0", "sp-genesis-builder", "sp-inherents", "sp-offchain", - "sp-runtime 32.0.0", + "sp-runtime 38.0.0", "sp-session", "sp-std", - "sp-storage", + "sp-storage 21.0.0", "sp-transaction-pool", "sp-version", "staging-parachain-info", @@ -5035,20 +4820,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "handlebars" -version = "4.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "faa67bab9ff362228eb3d00bd024a4965d8231bbb7921167f0cfa66c6626b225" -dependencies = [ - "log", - "pest", - "pest_derive", - "serde", - "serde_json", - "thiserror", -] - [[package]] name = "hash-db" version = "0.16.0" @@ -5108,6 +4879,12 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + [[package]] name = "hermit-abi" version = "0.3.3" @@ -5151,16 +4928,6 @@ dependencies = [ "digest 0.9.0", ] -[[package]] -name = "hmac" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a2a2320eb7ec0ebe8da8f744d7812d9fc4cb4d09344ac01898dbcb6a20ae69b" -dependencies = [ - "crypto-mac 0.11.0", - "digest 0.9.0", -] - [[package]] name = "hmac" version = "0.12.1" @@ -5352,6 +5119,16 @@ dependencies = [ "unicode-normalization", ] +[[package]] +name = "idna" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" +dependencies = [ + "unicode-bidi", + "unicode-normalization", +] + [[package]] name = "idna" version = "0.5.0" @@ -5517,12 +5294,6 @@ dependencies = [ "cfg-if", ] -[[package]] -name = "integer-encoding" -version = "3.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bb03732005da905c88227371639bf1ad885cc712789c011c31c5fb3ab3ccf02" - [[package]] name = "integer-sqrt" version = "0.1.5" @@ -5592,15 +5363,6 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "is_executable" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa9acdc6d67b75e626ad644734e8bc6df893d9cd2a834129065d3dd6158ea9c8" -dependencies = [ - "winapi", -] - [[package]] name = "itertools" version = "0.10.5" @@ -5676,52 +5438,19 @@ dependencies = [ "thiserror", ] -[[package]] -name = "jsonrpsee" -version = "0.20.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "affdc52f7596ccb2d7645231fc6163bb314630c989b64998f3699a28b4d5d4dc" -dependencies = [ - "jsonrpsee-core 0.20.3", - "jsonrpsee-http-client 0.20.3", - "jsonrpsee-proc-macros", - "jsonrpsee-server", - "jsonrpsee-types 0.20.3", - "jsonrpsee-ws-client", - "tokio", - "tracing", -] - [[package]] name = "jsonrpsee" version = "0.22.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cfdb12a2381ea5b2e68c3469ec604a007b367778cdb14d09612c8069ebd616ad" dependencies = [ - "jsonrpsee-client-transport 0.22.5", - "jsonrpsee-core 0.22.5", - "jsonrpsee-http-client 0.22.5", - "jsonrpsee-types 0.22.5", -] - -[[package]] -name = "jsonrpsee-client-transport" -version = "0.20.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5b005c793122d03217da09af68ba9383363caa950b90d3436106df8cabce935" -dependencies = [ - "futures-util", - "http", - "jsonrpsee-core 0.20.3", - "pin-project", - "rustls-native-certs 0.6.3", - "soketto", - "thiserror", - "tokio", - "tokio-rustls 0.24.1", - "tokio-util", + "jsonrpsee-client-transport", + "jsonrpsee-core", + "jsonrpsee-http-client", + "jsonrpsee-proc-macros", + "jsonrpsee-types", + "jsonrpsee-ws-client", "tracing", - "url", ] [[package]] @@ -5732,7 +5461,7 @@ checksum = "4978087a58c3ab02efc5b07c5e5e2803024536106fd5506f558db172c889b3aa" dependencies = [ "futures-util", "http", - "jsonrpsee-core 0.22.5", + "jsonrpsee-core", "pin-project", "rustls-native-certs 0.7.0", "rustls-pki-types", @@ -5747,83 +5476,40 @@ dependencies = [ [[package]] name = "jsonrpsee-core" -version = "0.20.3" +version = "0.22.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da2327ba8df2fdbd5e897e2b5ed25ce7f299d345b9736b6828814c3dbd1fd47b" +checksum = "b4b257e1ec385e07b0255dde0b933f948b5c8b8c28d42afda9587c3a967b896d" dependencies = [ "anyhow", - "async-lock 2.8.0", "async-trait", "beef", "futures-timer", "futures-util", "hyper", - "jsonrpsee-types 0.20.3", + "jsonrpsee-types", "parking_lot 0.12.1", - "rand", + "pin-project", + "rand 0.8.5", "rustc-hash", "serde", "serde_json", - "soketto", "thiserror", "tokio", + "tokio-stream", "tracing", ] [[package]] -name = "jsonrpsee-core" +name = "jsonrpsee-http-client" version = "0.22.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4b257e1ec385e07b0255dde0b933f948b5c8b8c28d42afda9587c3a967b896d" -dependencies = [ - "anyhow", - "async-trait", - "beef", - "futures-timer", - "futures-util", - "hyper", - "jsonrpsee-types 0.22.5", - "pin-project", - "rustc-hash", - "serde", - "serde_json", - "thiserror", - "tokio", - "tokio-stream", - "tracing", -] - -[[package]] -name = "jsonrpsee-http-client" -version = "0.20.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f80c17f62c7653ce767e3d7288b793dfec920f97067ceb189ebdd3570f2bc20" -dependencies = [ - "async-trait", - "hyper", - "hyper-rustls", - "jsonrpsee-core 0.20.3", - "jsonrpsee-types 0.20.3", - "serde", - "serde_json", - "thiserror", - "tokio", - "tower", - "tracing", - "url", -] - -[[package]] -name = "jsonrpsee-http-client" -version = "0.22.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ccf93fc4a0bfe05d851d37d7c32b7f370fe94336b52a2f0efc5f1981895c2e5" +checksum = "1ccf93fc4a0bfe05d851d37d7c32b7f370fe94336b52a2f0efc5f1981895c2e5" dependencies = [ "async-trait", "hyper", "hyper-rustls", - "jsonrpsee-core 0.22.5", - "jsonrpsee-types 0.22.5", + "jsonrpsee-core", + "jsonrpsee-types", "serde", "serde_json", "thiserror", @@ -5835,52 +5521,15 @@ dependencies = [ [[package]] name = "jsonrpsee-proc-macros" -version = "0.20.3" +version = "0.22.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29110019693a4fa2dbda04876499d098fa16d70eba06b1e6e2b3f1b251419515" +checksum = "7d0bb047e79a143b32ea03974a6bf59b62c2a4c5f5d42a381c907a8bbb3f75c0" dependencies = [ - "heck", - "proc-macro-crate 1.3.1", + "heck 0.4.1", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 1.0.109", -] - -[[package]] -name = "jsonrpsee-server" -version = "0.20.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82c39a00449c9ef3f50b84fc00fc4acba20ef8f559f07902244abf4c15c5ab9c" -dependencies = [ - "futures-util", - "http", - "hyper", - "jsonrpsee-core 0.20.3", - "jsonrpsee-types 0.20.3", - "route-recognizer", - "serde", - "serde_json", - "soketto", - "thiserror", - "tokio", - "tokio-stream", - "tokio-util", - "tower", - "tracing", -] - -[[package]] -name = "jsonrpsee-types" -version = "0.20.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5be0be325642e850ed0bdff426674d2e66b2b7117c9be23a7caef68a2902b7d9" -dependencies = [ - "anyhow", - "beef", - "serde", - "serde_json", - "thiserror", - "tracing", + "syn 2.0.65", ] [[package]] @@ -5898,14 +5547,14 @@ dependencies = [ [[package]] name = "jsonrpsee-ws-client" -version = "0.20.3" +version = "0.22.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bca9cb3933ccae417eb6b08c3448eb1cb46e39834e5b503e395e5e5bd08546c0" +checksum = "58b9db2dfd5bb1194b0ce921504df9ceae210a345bc2f6c5a61432089bbab070" dependencies = [ "http", - "jsonrpsee-client-transport 0.20.3", - "jsonrpsee-core 0.20.3", - "jsonrpsee-types 0.20.3", + "jsonrpsee-client-transport", + "jsonrpsee-core", + "jsonrpsee-types", "url", ] @@ -5986,7 +5635,7 @@ dependencies = [ "kube-core", "pem 3.0.4", "pin-project", - "rand", + "rand 0.8.5", "rustls 0.21.10", "rustls-pemfile 1.0.4", "secrecy", @@ -6057,7 +5706,7 @@ dependencies = [ "sp-authority-discovery", "sp-consensus-babe", "sp-consensus-beefy", - "sp-core 29.0.0", + "sp-core 34.0.0", "staging-kusama-runtime", ] @@ -6083,9 +5732,9 @@ dependencies = [ "polkadot-primitives", "polkadot-runtime-common", "smallvec", - "sp-core 29.0.0", - "sp-runtime 32.0.0", - "sp-weights 28.0.0", + "sp-core 34.0.0", + "sp-runtime 38.0.0", + "sp-weights 31.0.0", "staging-xcm-builder", ] @@ -6110,69 +5759,18 @@ dependencies = [ "smallvec", ] -[[package]] -name = "kvdb-memorydb" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf7a85fe66f9ff9cd74e169fdd2c94c6e1e74c412c99a73b4df3200b5d3760b2" -dependencies = [ - "kvdb", - "parking_lot 0.12.1", -] - -[[package]] -name = "kvdb-rocksdb" -version = "0.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b644c70b92285f66bfc2032922a79000ea30af7bc2ab31902992a5dcb9b434f6" -dependencies = [ - "kvdb", - "num_cpus", - "parking_lot 0.12.1", - "regex", - "rocksdb", - "smallvec", -] - -[[package]] -name = "landlock" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1530c5b973eeed4ac216af7e24baf5737645a6272e361f1fb95710678b67d9cc" -dependencies = [ - "enumflags2", - "libc", - "thiserror", -] - [[package]] name = "lazy_static" version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" -[[package]] -name = "lazycell" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" - [[package]] name = "libc" version = "0.2.152" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13e3bf6590cbc649f4d1a3eefc9d5d6eb746f5200ffb04e5e142700b8faa56e7" -[[package]] -name = "libloading" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c571b676ddfc9a8c12f1f3d3085a7b163966a8fd8098a90640953ce5f6170161" -dependencies = [ - "cfg-if", - "windows-sys 0.48.0", -] - [[package]] name = "libm" version = "0.2.8" @@ -6303,7 +5901,7 @@ dependencies = [ "parking_lot 0.12.1", "pin-project", "quick-protobuf", - "rand", + "rand 0.8.5", "rw-stream-sink 0.3.0", "smallvec", "thiserror", @@ -6331,7 +5929,7 @@ dependencies = [ "parking_lot 0.12.1", "pin-project", "quick-protobuf", - "rand", + "rand 0.8.5", "rw-stream-sink 0.4.0", "smallvec", "thiserror", @@ -6350,7 +5948,7 @@ dependencies = [ "log", "parking_lot 0.12.1", "smallvec", - "trust-dns-resolver", + "trust-dns-resolver 0.22.0", ] [[package]] @@ -6382,12 +5980,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "276bb57e7af15d8f100d3c11cbdd32c6752b7eef4ba7a18ecf464972c07abcce" dependencies = [ "bs58 0.4.0", - "ed25519-dalek", + "ed25519-dalek 2.1.0", "log", "multiaddr 0.17.1", "multihash 0.17.0", "quick-protobuf", - "rand", + "rand 0.8.5", "sha2 0.10.8", "thiserror", "zeroize", @@ -6400,11 +5998,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "999ec70441b2fb35355076726a6bc466c932e9bdc66f6a11c6c0aa17c7ab9be0" dependencies = [ "bs58 0.5.0", - "ed25519-dalek", + "ed25519-dalek 2.1.0", "hkdf", "multihash 0.19.1", "quick-protobuf", - "rand", + "rand 0.8.5", "sha2 0.10.8", "thiserror", "tracing", @@ -6430,7 +6028,7 @@ dependencies = [ "libp2p-swarm 0.42.2", "log", "quick-protobuf", - "rand", + "rand 0.8.5", "sha2 0.10.8", "smallvec", "thiserror", @@ -6452,11 +6050,11 @@ dependencies = [ "libp2p-identity 0.1.3", "libp2p-swarm 0.42.2", "log", - "rand", + "rand 0.8.5", "smallvec", "socket2 0.4.10", "tokio", - "trust-dns-proto", + "trust-dns-proto 0.22.0", "void", ] @@ -6488,7 +6086,7 @@ dependencies = [ "log", "once_cell", "quick-protobuf", - "rand", + "rand 0.8.5", "sha2 0.10.8", "snow", "static_assertions", @@ -6510,7 +6108,7 @@ dependencies = [ "libp2p-core 0.39.2", "libp2p-swarm 0.42.2", "log", - "rand", + "rand 0.8.5", "void", ] @@ -6530,7 +6128,7 @@ dependencies = [ "log", "parking_lot 0.12.1", "quinn-proto", - "rand", + "rand 0.8.5", "rustls 0.20.9", "thiserror", "tokio", @@ -6548,7 +6146,7 @@ dependencies = [ "libp2p-core 0.39.2", "libp2p-identity 0.1.3", "libp2p-swarm 0.42.2", - "rand", + "rand 0.8.5", "smallvec", ] @@ -6567,7 +6165,7 @@ dependencies = [ "libp2p-identity 0.1.3", "libp2p-swarm-derive", "log", - "rand", + "rand 0.8.5", "smallvec", "tokio", "void", @@ -6589,7 +6187,7 @@ dependencies = [ "log", "multistream-select 0.13.0", "once_cell", - "rand", + "rand 0.8.5", "smallvec", "void", ] @@ -6600,7 +6198,7 @@ version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fba456131824ab6acd4c7bf61e9c0f0a3014b5fc9868ccb8e10d344594cdc4f" dependencies = [ - "heck", + "heck 0.4.1", "quote", "syn 1.0.109", ] @@ -6636,7 +6234,7 @@ dependencies = [ "rustls 0.20.9", "thiserror", "webpki", - "x509-parser", + "x509-parser 0.14.0", "yasna", ] @@ -6697,21 +6295,6 @@ dependencies = [ "redox_syscall 0.4.1", ] -[[package]] -name = "librocksdb-sys" -version = "0.11.0+8.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3386f101bcb4bd252d8e9d2fb41ec3b0862a15a62b478c355b2982efa469e3e" -dependencies = [ - "bindgen", - "bzip2-sys", - "cc", - "glob", - "libc", - "libz-sys", - "tikv-jemalloc-sys", -] - [[package]] name = "libsecp256k1" version = "0.7.1" @@ -6725,7 +6308,7 @@ dependencies = [ "libsecp256k1-core", "libsecp256k1-gen-ecmult", "libsecp256k1-gen-genmult", - "rand", + "rand 0.8.5", "serde", "sha2 0.9.9", "typenum", @@ -6828,6 +6411,61 @@ dependencies = [ "keystream", ] +[[package]] +name = "litep2p" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f02542ae3a94b4c4ffa37dc56388c923e286afa3bf65452e3984b50b2a2f316" +dependencies = [ + "async-trait", + "bs58 0.4.0", + "bytes", + "cid 0.10.1", + "ed25519-dalek 1.0.1", + "futures", + "futures-timer", + "hex-literal", + "indexmap 2.2.6", + "libc", + "mockall 0.12.1", + "multiaddr 0.17.1", + "multihash 0.17.0", + "network-interface", + "nohash-hasher", + "parking_lot 0.12.1", + "pin-project", + "prost 0.11.9", + "prost-build 0.11.9", + "quinn", + "rand 0.8.5", + "rcgen", + "ring 0.16.20", + "rustls 0.20.9", + "serde", + "sha2 0.10.8", + "simple-dns", + "smallvec", + "snow", + "socket2 0.5.5", + "static_assertions", + "str0m", + "thiserror", + "tokio", + "tokio-stream", + "tokio-tungstenite", + "tokio-util", + "tracing", + "trust-dns-resolver 0.23.2", + "uint", + "unsigned-varint", + "url", + "webpki", + "x25519-dalek 2.0.0", + "x509-parser 0.15.1", + "yasna", + "zeroize", +] + [[package]] name = "lock_api" version = "0.4.11" @@ -6880,26 +6518,6 @@ dependencies = [ "linked-hash-map", ] -[[package]] -name = "lz4" -version = "1.24.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e9e2dd86df36ce760a60f6ff6ad526f7ba1f14ba0356f8254fb6905e6494df1" -dependencies = [ - "libc", - "lz4-sys", -] - -[[package]] -name = "lz4-sys" -version = "1.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57d27b317e207b10f69f5e75494119e391a96f48861ae870d1da6edac98ca900" -dependencies = [ - "cc", - "libc", -] - [[package]] name = "mach" version = "0.3.2" @@ -6918,7 +6536,7 @@ dependencies = [ "macro_magic_core", "macro_magic_macros", "quote", - "syn 2.0.52", + "syn 2.0.65", ] [[package]] @@ -6932,7 +6550,7 @@ dependencies = [ "macro_magic_core_macros", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.65", ] [[package]] @@ -6943,7 +6561,7 @@ checksum = "9ea73aa640dc01d62a590d48c0c3521ed739d53b27f919b25c3551e233481654" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.65", ] [[package]] @@ -6954,7 +6572,7 @@ checksum = "ef9d79ae96aaba821963320eb2b6e34d17df1e5a83d8a1985c29cc5be59577b3" dependencies = [ "macro_magic_core", "quote", - "syn 2.0.52", + "syn 2.0.65", ] [[package]] @@ -7009,15 +6627,6 @@ dependencies = [ "rustix 0.38.31", ] -[[package]] -name = "memmap2" -version = "0.5.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83faa42c0a078c393f6b29d5db232d8be22776a891f8f56e5284faee4a20b327" -dependencies = [ - "libc", -] - [[package]] name = "memmap2" version = "0.9.4" @@ -7051,7 +6660,7 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f313fcff1d2a4bcaa2deeaa00bf7530d77d5f7bd0467a117dde2e29a75a7a17a" dependencies = [ - "array-bytes 6.2.2", + "array-bytes", "blake3", "frame-metadata 16.0.0", "parity-scale-codec", @@ -7059,18 +6668,6 @@ dependencies = [ "scale-info", ] -[[package]] -name = "merlin" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e261cf0f8b3c42ded9f7d2bb59dea03aa52bc8a1cbc7482f9fc3fd1229d3b42" -dependencies = [ - "byteorder", - "keccak", - "rand_core 0.5.1", - "zeroize", -] - [[package]] name = "merlin" version = "3.0.0" @@ -7083,17 +6680,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "mick-jaeger" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69672161530e8aeca1d1400fbf3f1a1747ff60ea604265a4e906c2442df20532" -dependencies = [ - "futures", - "rand", - "thrift", -] - [[package]] name = "mime" version = "0.3.17" @@ -7143,7 +6729,7 @@ dependencies = [ "lioness", "log", "parking_lot 0.12.1", - "rand", + "rand 0.8.5", "rand_chacha 0.3.1", "rand_distr", "subtle 2.5.0", @@ -7152,53 +6738,32 @@ dependencies = [ ] [[package]] -name = "mmr-gadget" -version = "30.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f62cddc29c17965ab16a051a745520d41c28d8b4c2b6188aaf661db056d67c9" -dependencies = [ - "futures", - "log", - "parity-scale-codec", - "sc-client-api", - "sc-offchain", - "sp-api", - "sp-blockchain", - "sp-consensus", - "sp-consensus-beefy", - "sp-core 29.0.0", - "sp-mmr-primitives", - "sp-runtime 32.0.0", -] - -[[package]] -name = "mmr-rpc" -version = "29.0.0" +name = "mockall" +version = "0.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2634b45039e064c343a0a77ed45e03ca027c84e1b250b2f3988af7cde9b7e79e" +checksum = "4c84490118f2ee2d74570d114f3d0493cbf02790df303d2707606c3e14e07c96" dependencies = [ - "jsonrpsee 0.20.3", - "parity-scale-codec", - "serde", - "sp-api", - "sp-blockchain", - "sp-core 29.0.0", - "sp-mmr-primitives", - "sp-runtime 32.0.0", + "cfg-if", + "downcast", + "fragile", + "lazy_static", + "mockall_derive 0.11.4", + "predicates 2.1.5", + "predicates-tree", ] [[package]] name = "mockall" -version = "0.11.4" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c84490118f2ee2d74570d114f3d0493cbf02790df303d2707606c3e14e07c96" +checksum = "43766c2b5203b10de348ffe19f7e54564b64f3d6018ff7648d1e2d6d3a0f0a48" dependencies = [ "cfg-if", "downcast", "fragile", "lazy_static", - "mockall_derive", - "predicates", + "mockall_derive 0.12.1", + "predicates 3.1.0", "predicates-tree", ] @@ -7214,6 +6779,18 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "mockall_derive" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af7cbce79ec385a1d4f54baa90a76401eb15d9cab93685f62e7e9f942aa00ae2" +dependencies = [ + "cfg-if", + "proc-macro2", + "quote", + "syn 2.0.65", +] + [[package]] name = "multiaddr" version = "0.17.1" @@ -7274,7 +6851,7 @@ dependencies = [ "blake3", "core2", "digest 0.10.7", - "multihash-derive 0.8.0", + "multihash-derive", "sha2 0.10.8", "sha3", "unsigned-varint", @@ -7286,10 +6863,14 @@ version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cfd8a792c1694c6da4f68db0a9d707c72bd260994da179e6030a5dcee00bb815" dependencies = [ + "blake2b_simd", + "blake2s_simd", + "blake3", "core2", "digest 0.10.7", - "multihash-derive 0.8.0", + "multihash-derive", "sha2 0.10.8", + "sha3", "unsigned-varint", ] @@ -7303,26 +6884,6 @@ dependencies = [ "unsigned-varint", ] -[[package]] -name = "multihash-codetable" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6d815ecb3c8238d00647f8630ede7060a642c9f704761cd6082cb4028af6935" -dependencies = [ - "blake2b_simd", - "blake2s_simd", - "blake3", - "core2", - "digest 0.10.7", - "multihash-derive 0.9.0", - "ripemd", - "serde", - "sha1", - "sha2 0.10.8", - "sha3", - "strobe-rs", -] - [[package]] name = "multihash-derive" version = "0.8.0" @@ -7337,31 +6898,6 @@ dependencies = [ "synstructure", ] -[[package]] -name = "multihash-derive" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "890e72cb7396cb99ed98c1246a97b243cc16394470d94e0bc8b0c2c11d84290e" -dependencies = [ - "core2", - "multihash 0.19.1", - "multihash-derive-impl", -] - -[[package]] -name = "multihash-derive-impl" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d38685e08adb338659871ecfc6ee47ba9b22dcc8abcf6975d379cc49145c3040" -dependencies = [ - "proc-macro-crate 1.3.1", - "proc-macro-error", - "proc-macro2", - "quote", - "syn 1.0.109", - "synstructure", -] - [[package]] name = "multimap" version = "0.8.3" @@ -7423,21 +6959,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "names" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7bddcd3bf5144b6392de80e04c347cd7fab2508f6df16a85fc496ecd5cec39bc" -dependencies = [ - "rand", -] - -[[package]] -name = "nanorand" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a51313c5820b0b02bd422f4b44776fbf47961755c74ce64afc73bfad10226c3" - [[package]] name = "native-tls" version = "0.2.11" @@ -7522,6 +7043,18 @@ dependencies = [ "tokio", ] +[[package]] +name = "network-interface" +version = "1.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4a43439bf756eed340bdf8feba761e2d50c7d47175d87545cd5cbe4a137c4d1" +dependencies = [ + "cc", + "libc", + "thiserror", + "winapi", +] + [[package]] name = "nix" version = "0.24.3" @@ -7737,7 +7270,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.65", ] [[package]] @@ -7746,6 +7279,15 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" +[[package]] +name = "openssl-src" +version = "300.3.1+3.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7259953d42a81bf137fbbd73bd30a8e1914d6dce43c2b90ed575783a22608b91" +dependencies = [ + "cc", +] + [[package]] name = "openssl-sys" version = "0.9.102" @@ -7754,58 +7296,11 @@ checksum = "c597637d56fbc83893a35eb0dd04b2b8e7a50c91e64e9493e398b5df4fb45fa2" dependencies = [ "cc", "libc", + "openssl-src", "pkg-config", "vcpkg", ] -[[package]] -name = "option-ext" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" - -[[package]] -name = "orchestra" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2356622ffdfe72362a45a1e5e87bb113b8327e596e39b91f11f0ef4395c8da79" -dependencies = [ - "async-trait", - "dyn-clonable", - "futures", - "futures-timer", - "orchestra-proc-macro", - "pin-project", - "prioritized-metered-channel", - "thiserror", - "tracing", -] - -[[package]] -name = "orchestra-proc-macro" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eedb646674596266dc9bb2b5c7eea7c36b32ecc7777eba0d510196972d72c4fd" -dependencies = [ - "expander 2.0.0", - "indexmap 2.2.6", - "itertools 0.11.0", - "petgraph", - "proc-macro-crate 1.3.1", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "ordered-float" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3305af35278dd29f46fcdd139e0b1fbfae2153f0e5928b39b035542dd31e37b7" -dependencies = [ - "num-traits", -] - [[package]] name = "ordered-float" version = "2.10.1" @@ -7823,11 +7318,11 @@ checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" [[package]] name = "pallet-alliance" -version = "28.0.0" +version = "34.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2807a0de560760490eb581095a23a68377308879bd6096b0f100795b53898db6" +checksum = "57abf7d4ed855673270296956b1f02e80d2d5b30477fb7b75ced2ebb40a0d6ef" dependencies = [ - "array-bytes 6.2.2", + "array-bytes", "frame-benchmarking", "frame-support", "frame-system", @@ -7836,37 +7331,38 @@ dependencies = [ "pallet-identity", "parity-scale-codec", "scale-info", - "sp-core 29.0.0", + "sp-core 34.0.0", "sp-crypto-hashing", - "sp-io 31.0.0", - "sp-runtime 32.0.0", + "sp-io 37.0.0", + "sp-runtime 38.0.0", "sp-std", ] [[package]] name = "pallet-asset-conversion" -version = "11.0.0" +version = "17.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4079f12db3cf98daa717337ab5b7e5ef15aa3bec3b497f501dc715d129b500da" +checksum = "0e9f1c4496f1c366a3ee01b38ba968589db41f5d44c41331111ff5a07964dbde" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", + "log", "parity-scale-codec", "scale-info", "sp-api", - "sp-arithmetic 24.0.0", - "sp-core 29.0.0", - "sp-io 31.0.0", - "sp-runtime 32.0.0", + "sp-arithmetic 26.0.0", + "sp-core 34.0.0", + "sp-io 37.0.0", + "sp-runtime 38.0.0", "sp-std", ] [[package]] name = "pallet-asset-conversion-tx-payment" -version = "11.0.0" +version = "17.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2019e84d65bf6c6105edb61cd6b6f4c6d9a1b347e05d9380e92b0dcf2a29fd7" +checksum = "59b413508fc0745307d01c55e686cf00d67f09b6652b7db344b69da305feaae0" dependencies = [ "frame-support", "frame-system", @@ -7874,31 +7370,31 @@ dependencies = [ "pallet-transaction-payment", "parity-scale-codec", "scale-info", - "sp-runtime 32.0.0", + "sp-runtime 38.0.0", "sp-std", ] [[package]] name = "pallet-asset-rate" -version = "8.0.0" +version = "14.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "571ce57fd846911041749832b46a8c2b01f0b79ffebcd7585e3973865607036d" +checksum = "e83f523d209396ba42743008b64fe021eb6411a8d5ac868978636f0341feacc4" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "parity-scale-codec", "scale-info", - "sp-core 29.0.0", - "sp-runtime 32.0.0", + "sp-core 34.0.0", + "sp-runtime 38.0.0", "sp-std", ] [[package]] name = "pallet-asset-tx-payment" -version = "29.0.0" +version = "35.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ed783679921ad8b96807d683d320c314e305753b230d5c04dc713bab7aca64c" +checksum = "7686ab6ba85afc432794a9dbc3e7399cb1a3b1bcfdd487ce0eb2aa81c11c2497" dependencies = [ "frame-benchmarking", "frame-support", @@ -7907,17 +7403,17 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-core 29.0.0", - "sp-io 31.0.0", - "sp-runtime 32.0.0", + "sp-core 34.0.0", + "sp-io 37.0.0", + "sp-runtime 38.0.0", "sp-std", ] [[package]] name = "pallet-assets" -version = "30.0.0" +version = "36.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46728a98a910af13f6a77033dd053456650773bb7adc71e0ba845bff7e31b33e" +checksum = "5a58bb6d37a23df83b861e148129dc0130a4b80291f2c9dda3491989ec4c3662" dependencies = [ "frame-benchmarking", "frame-support", @@ -7925,16 +7421,16 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-core 29.0.0", - "sp-runtime 32.0.0", + "sp-core 34.0.0", + "sp-runtime 38.0.0", "sp-std", ] [[package]] name = "pallet-aura" -version = "28.0.0" +version = "34.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a611bef3c8cf281e41a43f32a4153260bdc8b7b61b901e65c7a4442529224e11" +checksum = "638e3cbb539540e45503f5ae756b6bbb4e6085269d025afa273e684782f514ac" dependencies = [ "frame-support", "frame-system", @@ -7942,49 +7438,49 @@ dependencies = [ "pallet-timestamp", "parity-scale-codec", "scale-info", - "sp-application-crypto 31.0.0", + "sp-application-crypto 37.0.0", "sp-consensus-aura", - "sp-runtime 32.0.0", + "sp-runtime 38.0.0", "sp-std", ] [[package]] name = "pallet-authority-discovery" -version = "29.0.1" +version = "35.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cd9a381c613e6538638391fb51f353fd13b16f849d0d1ac66a388326bd456f1" +checksum = "3a5fafb21222ab509f0d9d4bda52730eb342574a0733321e1105e14d5454d6d5" dependencies = [ "frame-support", "frame-system", "pallet-session", "parity-scale-codec", "scale-info", - "sp-application-crypto 31.0.0", + "sp-application-crypto 37.0.0", "sp-authority-discovery", - "sp-runtime 32.0.0", + "sp-runtime 38.0.0", "sp-std", ] [[package]] name = "pallet-authorship" -version = "29.0.0" +version = "35.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d83773e731a1760f99684b09961ed7b92acafe335f36f08ebb8313d3b9c72e2" +checksum = "b134d987dfc6f2ddc3b4470672318fd59e740868485a25ec15ba909c42e6a622" dependencies = [ "frame-support", "frame-system", "impl-trait-for-tuples", "parity-scale-codec", "scale-info", - "sp-runtime 32.0.0", + "sp-runtime 38.0.0", "sp-std", ] [[package]] name = "pallet-babe" -version = "29.0.0" +version = "35.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3f2020c52667a650d64e84a4bbb63388e25bc1c9bc872a8243d03bfcb285049" +checksum = "84fa5a4406cd9f43babb90ce6e8f1598d36695c86c8e35094ec4cbf3224086fd" dependencies = [ "frame-benchmarking", "frame-support", @@ -7995,11 +7491,11 @@ dependencies = [ "pallet-timestamp", "parity-scale-codec", "scale-info", - "sp-application-crypto 31.0.0", + "sp-application-crypto 37.0.0", "sp-consensus-babe", - "sp-core 29.0.0", - "sp-io 31.0.0", - "sp-runtime 32.0.0", + "sp-core 34.0.0", + "sp-io 37.0.0", + "sp-runtime 38.0.0", "sp-session", "sp-staking", "sp-std", @@ -8007,9 +7503,9 @@ dependencies = [ [[package]] name = "pallet-bags-list" -version = "28.0.0" +version = "34.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd27bfa4bfa5751652842b81241c7eff3e68f2806d9dacc17b03d2cb20a39756" +checksum = "381526d7d765b4c895efa9da7c7f7b1965f251de6fe30757a63f535a021f2b69" dependencies = [ "aquamarine", "docify", @@ -8021,18 +7517,18 @@ dependencies = [ "pallet-balances", "parity-scale-codec", "scale-info", - "sp-core 29.0.0", - "sp-io 31.0.0", - "sp-runtime 32.0.0", + "sp-core 34.0.0", + "sp-io 37.0.0", + "sp-runtime 38.0.0", "sp-std", - "sp-tracing", + "sp-tracing 17.0.0", ] [[package]] name = "pallet-balances" -version = "29.0.2" +version = "36.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9a54b5d0c7c4c3731883d6b1ac18aff44db20c3d0a3470c8861001a17afdc85" +checksum = "8dfe056082a1d857b0731572d7f9a96d98356b8610b258814cf75a55cd43c435" dependencies = [ "docify", "frame-benchmarking", @@ -8041,15 +7537,15 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-runtime 32.0.0", + "sp-runtime 38.0.0", "sp-std", ] [[package]] name = "pallet-beefy" -version = "29.0.0" +version = "35.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bedd80e9d8b196f31ea134efd271fdc1b8380ca3aa2d8af6ea8b5a0dc4fa460" +checksum = "6005abf441b2c6fc21505f0d3e00a66e40759ddff0311834f3f8ae2c5874b0e5" dependencies = [ "frame-support", "frame-system", @@ -8060,7 +7556,7 @@ dependencies = [ "scale-info", "serde", "sp-consensus-beefy", - "sp-runtime 32.0.0", + "sp-runtime 38.0.0", "sp-session", "sp-staking", "sp-std", @@ -8068,11 +7564,11 @@ dependencies = [ [[package]] name = "pallet-beefy-mmr" -version = "29.0.0" +version = "35.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d334f24d3c0c016d16aa87d069485847d622e8ebebace18ec5cf56609ca3a67" +checksum = "effb0467f4d9b43be918a6e0ad419c539cd55dceef4c70000cb373701dc3d029" dependencies = [ - "array-bytes 6.2.2", + "array-bytes", "binary-merkle-tree", "frame-support", "frame-system", @@ -8085,18 +7581,18 @@ dependencies = [ "serde", "sp-api", "sp-consensus-beefy", - "sp-core 29.0.0", - "sp-io 31.0.0", - "sp-runtime 32.0.0", - "sp-state-machine 0.36.0", + "sp-core 34.0.0", + "sp-io 37.0.0", + "sp-runtime 38.0.0", + "sp-state-machine 0.42.0", "sp-std", ] [[package]] name = "pallet-bounties" -version = "28.0.0" +version = "34.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4765879e96676c13cdbed746d66fd59dcde1e9e65fda1f064fa2fffa3bc5d597" +checksum = "84e118557f0d4e863a243f2c91ffd4fce624c5afc42b6bd0e04e6f7cc767afd7" dependencies = [ "frame-benchmarking", "frame-support", @@ -8105,17 +7601,17 @@ dependencies = [ "pallet-treasury", "parity-scale-codec", "scale-info", - "sp-core 29.0.0", - "sp-io 31.0.0", - "sp-runtime 32.0.0", + "sp-core 34.0.0", + "sp-io 37.0.0", + "sp-runtime 38.0.0", "sp-std", ] [[package]] name = "pallet-bridge-grandpa" -version = "0.8.0" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "085573f22a29f8108e2e374b4b4c90702a7449c21edc29d1d614889e9b0c8c0c" +checksum = "105a956904498bd236266cc4a7e6cff5c83fd1ea6d6d62ff4efb947b48c81245" dependencies = [ "bp-header-chain", "bp-runtime", @@ -8128,16 +7624,16 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-consensus-grandpa", - "sp-runtime 32.0.0", + "sp-runtime 38.0.0", "sp-std", - "sp-trie 30.0.0", + "sp-trie 36.0.0", ] [[package]] name = "pallet-bridge-messages" -version = "0.8.0" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b0aac358f6781471f6fd667d5d5af6ee55c3eb11fc494de76787e942bc43726" +checksum = "6af9efd8200ffe03ad35043ec4b9a9ce26e0fd015737949fd153764c38bf35dd" dependencies = [ "bp-messages", "bp-runtime", @@ -8148,15 +7644,15 @@ dependencies = [ "num-traits", "parity-scale-codec", "scale-info", - "sp-runtime 32.0.0", + "sp-runtime 38.0.0", "sp-std", ] [[package]] name = "pallet-bridge-parachains" -version = "0.8.0" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6976281a13460098827ef61a368ef5c26f07bb4bfaf81a9ee4105577a73fc488" +checksum = "1ecd77f4bf6a30f9ac686261c38d764ba4b93edba1448bb6a12bbd1709c190aa" dependencies = [ "bp-header-chain", "bp-parachains", @@ -8169,16 +7665,16 @@ dependencies = [ "pallet-bridge-grandpa", "parity-scale-codec", "scale-info", - "sp-runtime 32.0.0", + "sp-runtime 38.0.0", "sp-std", - "sp-trie 30.0.0", + "sp-trie 36.0.0", ] [[package]] name = "pallet-bridge-relayers" -version = "0.8.0" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc71ebc287106596ae4d6026d1bdea6448c4b26f08f4477e8e9a2620e5a7c24b" +checksum = "e1512f82bb532b1193636953816e08e5f782137ec23f3039083c68ab9a9a7cb4" dependencies = [ "bp-messages", "bp-relayers", @@ -8190,16 +7686,16 @@ dependencies = [ "pallet-bridge-messages", "parity-scale-codec", "scale-info", - "sp-arithmetic 24.0.0", - "sp-runtime 32.0.0", + "sp-arithmetic 26.0.0", + "sp-runtime 38.0.0", "sp-std", ] [[package]] name = "pallet-broker" -version = "0.7.2" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "574c52fd629191c374c24a18036acac008ea92142309e5dd05e7f03149a667c3" +checksum = "4f369dabb59f4ec26bedb86f294f71b257e4d2e998a53693e45e711bc573627d" dependencies = [ "bitvec", "frame-benchmarking", @@ -8208,17 +7704,18 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-arithmetic 24.0.0", - "sp-core 29.0.0", - "sp-runtime 32.0.0", + "sp-api", + "sp-arithmetic 26.0.0", + "sp-core 34.0.0", + "sp-runtime 38.0.0", "sp-std", ] [[package]] name = "pallet-child-bounties" -version = "28.0.0" +version = "34.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00fd06f2d719f5bb16ab3e836c6b053bbd92631ba694f8c2bf810013b2548167" +checksum = "b2eefafbc018dc5a69cec5b1a9bbbc02fd3191464825e0bd5f899d407dfd03b9" dependencies = [ "frame-benchmarking", "frame-support", @@ -8228,17 +7725,17 @@ dependencies = [ "pallet-treasury", "parity-scale-codec", "scale-info", - "sp-core 29.0.0", - "sp-io 31.0.0", - "sp-runtime 32.0.0", + "sp-core 34.0.0", + "sp-io 37.0.0", + "sp-runtime 38.0.0", "sp-std", ] [[package]] name = "pallet-collator-selection" -version = "10.0.3" +version = "16.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a36858c4275b7d19671b321e95f545e07c9643f97dffed1b333774cb391a4456" +checksum = "4b78dc5ba93d88d019eecb4d77f1ec95d8c288d9e9c4e039ab8a2dea039deea4" dependencies = [ "frame-benchmarking", "frame-support", @@ -8248,18 +7745,18 @@ dependencies = [ "pallet-balances", "pallet-session", "parity-scale-codec", - "rand", + "rand 0.8.5", "scale-info", - "sp-runtime 32.0.0", + "sp-runtime 38.0.0", "sp-staking", "sp-std", ] [[package]] name = "pallet-collective" -version = "29.0.0" +version = "35.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c362a0b8f30895c15ecc7d8c24b0d94bb586c4b9bbd37ac8053b4629d9cc80b" +checksum = "64984961a8667e8a16d2445fc98ac3229f9d01def0c1ae1e6f9ce859ec0fedbb" dependencies = [ "frame-benchmarking", "frame-support", @@ -8267,17 +7764,17 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-core 29.0.0", - "sp-io 31.0.0", - "sp-runtime 32.0.0", + "sp-core 34.0.0", + "sp-io 37.0.0", + "sp-runtime 38.0.0", "sp-std", ] [[package]] name = "pallet-conviction-voting" -version = "29.0.0" +version = "35.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6aee3a8b6fcde893f862993f9d45eb0fcd492dde0967fd56ef78d79fc7b53dc0" +checksum = "242927ab508e5f1cb63aa851b7f5662f6886adb688c57458e05449c8ad0376dd" dependencies = [ "assert_matches", "frame-benchmarking", @@ -8286,16 +7783,16 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-io 31.0.0", - "sp-runtime 32.0.0", + "sp-io 37.0.0", + "sp-runtime 38.0.0", "sp-std", ] [[package]] name = "pallet-core-fellowship" -version = "13.0.0" +version = "19.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c596f690afabed04954b52de0cf4ae3e05fd388d2fce2f64f0d6766c62e8e260" +checksum = "775266859860d3deb767caed33f6147eee1a0ef68386da033f33ab45cb4c913f" dependencies = [ "frame-benchmarking", "frame-support", @@ -8304,18 +7801,33 @@ dependencies = [ "pallet-ranked-collective", "parity-scale-codec", "scale-info", - "sp-arithmetic 24.0.0", - "sp-core 29.0.0", - "sp-io 31.0.0", - "sp-runtime 32.0.0", + "sp-arithmetic 26.0.0", + "sp-core 34.0.0", + "sp-io 37.0.0", + "sp-runtime 38.0.0", + "sp-std", +] + +[[package]] +name = "pallet-delegated-staking" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72cfda2549b70198f2cdee30f8d72cae469a692f83b3072015062bc2dd6f473b" +dependencies = [ + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "sp-runtime 38.0.0", + "sp-staking", "sp-std", ] [[package]] name = "pallet-election-provider-multi-phase" -version = "28.0.0" +version = "34.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b54d1d3fe9ae61a144d581147e699b7c3009169de0019a0f87cca0bed82681e7" +checksum = "f9cae34d714e3410bcdd932ce0dc927997125e1eaa083dacdeb700439f22b67b" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -8324,37 +7836,37 @@ dependencies = [ "log", "pallet-election-provider-support-benchmarking", "parity-scale-codec", - "rand", + "rand 0.8.5", "scale-info", - "sp-arithmetic 24.0.0", - "sp-core 29.0.0", - "sp-io 31.0.0", + "sp-arithmetic 26.0.0", + "sp-core 34.0.0", + "sp-io 37.0.0", "sp-npos-elections", - "sp-runtime 32.0.0", + "sp-runtime 38.0.0", "sp-std", - "strum 0.24.1", + "strum 0.26.3", ] [[package]] name = "pallet-election-provider-support-benchmarking" -version = "28.0.0" +version = "34.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46ec87816a1e32a1ab6deececa99e21e6684b111efe87b11b8298328dbbefd01" +checksum = "a5153f459dd839fceb81e1d1df9413cc55f83b55fa110485fdb05f442015fb57" dependencies = [ "frame-benchmarking", "frame-election-provider-support", "frame-system", "parity-scale-codec", "sp-npos-elections", - "sp-runtime 32.0.0", + "sp-runtime 38.0.0", "sp-std", ] [[package]] name = "pallet-encointer-balances" -version = "6.1.0" +version = "12.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb968c2b87c3ef3ef67e5da9237b6c9b32218762b9e69bf523ddea4f55a5f260" +checksum = "6a0ffd2d4a106903298ead5eec236d9dae348ce73db4b6d32690543e178f4b11" dependencies = [ "approx", "encointer-primitives", @@ -8366,15 +7878,15 @@ dependencies = [ "pallet-transaction-payment", "parity-scale-codec", "scale-info", - "sp-runtime 32.0.0", + "sp-runtime 38.0.0", "sp-std", ] [[package]] name = "pallet-encointer-bazaar" -version = "6.1.0" +version = "12.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1a4f6a43dce9ec7470ce65716b7009e86eda70f18e3f7690a4841a05d471f10" +checksum = "16a3f0caa065fbb9a7274945d35d14b79a27263acb3ad6739f32e349e0e6ca94" dependencies = [ "encointer-primitives", "frame-benchmarking", @@ -8384,15 +7896,15 @@ dependencies = [ "pallet-encointer-communities", "parity-scale-codec", "scale-info", - "sp-core 29.0.0", + "sp-core 34.0.0", "sp-std", ] [[package]] name = "pallet-encointer-bazaar-rpc-runtime-api" -version = "6.1.0" +version = "12.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "430c3a5bcaa9d2fd7ab314b8e50222c8645699b3157448eabed64b65ad4cf801" +checksum = "8f9abb60a54e20083a48be6a14fb267262efe3b1712a6ce9aaf65a32b5791f58" dependencies = [ "encointer-primitives", "frame-support", @@ -8403,9 +7915,9 @@ dependencies = [ [[package]] name = "pallet-encointer-ceremonies" -version = "6.1.0" +version = "12.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87c965513d515c8b74d1d526f999d58aad713462887e290c5295ae2ca13f4b97" +checksum = "2384656184280a803be722af24193248509874df198acd41b318f5d6f37c7f0f" dependencies = [ "encointer-ceremonies-assignment", "encointer-meetup-validation", @@ -8420,18 +7932,18 @@ dependencies = [ "pallet-timestamp", "parity-scale-codec", "scale-info", - "sp-application-crypto 31.0.0", - "sp-core 29.0.0", - "sp-io 31.0.0", - "sp-runtime 32.0.0", + "sp-application-crypto 37.0.0", + "sp-core 34.0.0", + "sp-io 37.0.0", + "sp-runtime 38.0.0", "sp-std", ] [[package]] name = "pallet-encointer-ceremonies-rpc-runtime-api" -version = "6.1.0" +version = "12.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "562c6c756d356318dead2e90710b1c7cee12a6e2ff9aa555e6782ba5202fcde0" +checksum = "6d0c64fe6380975c85c8ba5da27e1c6cc9bb1f1a00070cf8a6e827714fd0d1df" dependencies = [ "encointer-primitives", "frame-support", @@ -8442,9 +7954,9 @@ dependencies = [ [[package]] name = "pallet-encointer-communities" -version = "6.1.0" +version = "12.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efdbb9bac32cd764992ced4055e76c6d09907f5ac3863d1d19f14edda7eaa3ac" +checksum = "95b7b944c3b3a26225f0925f41010b250fb0b168f1d37f57483c9b73c69ff944" dependencies = [ "encointer-primitives", "frame-benchmarking", @@ -8455,16 +7967,16 @@ dependencies = [ "pallet-encointer-scheduler", "parity-scale-codec", "scale-info", - "sp-io 31.0.0", - "sp-runtime 32.0.0", + "sp-io 37.0.0", + "sp-runtime 38.0.0", "sp-std", ] [[package]] name = "pallet-encointer-communities-rpc-runtime-api" -version = "6.1.0" +version = "12.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c10de1b47024c9c7a957521eb29edcf7c9cf31d8c70eee7e991d11f43d137606" +checksum = "41510010990ea29c43476fa495721756e71b3828f0df41b6333230302bd0c95b" dependencies = [ "encointer-primitives", "parity-scale-codec", @@ -8474,9 +7986,9 @@ dependencies = [ [[package]] name = "pallet-encointer-faucet" -version = "6.2.0" +version = "12.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3024bc49c1fd7fffa68f4aa636b199c7a0772690049d0471a6b60d17080024d8" +checksum = "f45135e33671b00a9f00cb87e2364c68903a166b43b5e301b43c7624e045158b" dependencies = [ "approx", "encointer-primitives", @@ -8488,16 +8000,16 @@ dependencies = [ "pallet-encointer-reputation-commitments", "parity-scale-codec", "scale-info", - "sp-core 29.0.0", - "sp-runtime 32.0.0", + "sp-core 34.0.0", + "sp-runtime 38.0.0", "sp-std", ] [[package]] name = "pallet-encointer-reputation-commitments" -version = "6.1.0" +version = "12.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9029fcdd0cd76e41d067bcf7f09860b4018de9c5382ab1b8006823e2fa148ac5" +checksum = "1be4add4c2fa83d305e40bdf8167d998dc6fdd6369f1b7c50687a728fb6df5e4" dependencies = [ "approx", "encointer-primitives", @@ -8511,16 +8023,16 @@ dependencies = [ "pallet-timestamp", "parity-scale-codec", "scale-info", - "sp-core 29.0.0", - "sp-runtime 32.0.0", + "sp-core 34.0.0", + "sp-runtime 38.0.0", "sp-std", ] [[package]] name = "pallet-encointer-scheduler" -version = "6.1.0" +version = "12.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a13047a59df28111d0e6bd64ca45fa95fe1b97021ba244fe3f7fe3a2edbf2e2c" +checksum = "d760a2d2922618b1750ccd641e8d1b441d6f38dad5db347de5d3f27dddd8f647" dependencies = [ "encointer-primitives", "frame-benchmarking", @@ -8531,15 +8043,15 @@ dependencies = [ "pallet-timestamp", "parity-scale-codec", "scale-info", - "sp-runtime 32.0.0", + "sp-runtime 38.0.0", "sp-std", ] [[package]] name = "pallet-fast-unstake" -version = "28.0.0" +version = "34.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2222607a0dba10a9d57cab5360a6549b5fda925181c3c7af481246c0964998df" +checksum = "aad27a480c5d4a4705808b8267d38540d5dfeee50d1e7d5a1684d7bbf98a4aa2" dependencies = [ "docify", "frame-benchmarking", @@ -8549,17 +8061,17 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-io 31.0.0", - "sp-runtime 32.0.0", + "sp-io 37.0.0", + "sp-runtime 38.0.0", "sp-staking", "sp-std", ] [[package]] name = "pallet-glutton" -version = "15.0.0" +version = "21.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81f2b2f49d42832bfc2320fb34d606065c0fd1c326a65f9075e5edd354ed2be2" +checksum = "e8f9b0613037a9f1f1391a2991cc02f96c1cf158b7f266a281ba4cd54a83ad04" dependencies = [ "blake2 0.10.6", "frame-benchmarking", @@ -8568,17 +8080,17 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-core 29.0.0", - "sp-io 31.0.0", - "sp-runtime 32.0.0", + "sp-core 34.0.0", + "sp-io 37.0.0", + "sp-runtime 38.0.0", "sp-std", ] [[package]] name = "pallet-grandpa" -version = "29.0.0" +version = "35.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5b20be8592eed7ebca2ee661fc43450088552ebe0bd483d7b101cf5968ab12d" +checksum = "9cc1bf0bd43c8434b46af7de18f8863bfbbf56efcf8d340b238b511a52cfa03c" dependencies = [ "frame-benchmarking", "frame-support", @@ -8588,11 +8100,11 @@ dependencies = [ "pallet-session", "parity-scale-codec", "scale-info", - "sp-application-crypto 31.0.0", + "sp-application-crypto 37.0.0", "sp-consensus-grandpa", - "sp-core 29.0.0", - "sp-io 31.0.0", - "sp-runtime 32.0.0", + "sp-core 34.0.0", + "sp-io 37.0.0", + "sp-runtime 38.0.0", "sp-session", "sp-staking", "sp-std", @@ -8600,9 +8112,9 @@ dependencies = [ [[package]] name = "pallet-identity" -version = "29.0.1" +version = "35.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "452bba25325b7f0148eeecbde13e7c26dfb677ad46b3f160b359d7643b44c94b" +checksum = "0ad181bf900fcea894911421496e05c4b2bc2dadea8c7d744af091a525af3a48" dependencies = [ "enumflags2", "frame-benchmarking", @@ -8611,16 +8123,16 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-io 31.0.0", - "sp-runtime 32.0.0", + "sp-io 37.0.0", + "sp-runtime 38.0.0", "sp-std", ] [[package]] name = "pallet-im-online" -version = "28.0.0" +version = "34.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "598ea5c87351edc953d1f455f32ff456cf2f1daf7bbada1f1e03be8e384852ab" +checksum = "41a23e720204fde0302206016aaf1e095ff808ff1a434ec6507d87a40258bfe1" dependencies = [ "frame-benchmarking", "frame-support", @@ -8629,52 +8141,52 @@ dependencies = [ "pallet-authorship", "parity-scale-codec", "scale-info", - "sp-application-crypto 31.0.0", - "sp-core 29.0.0", - "sp-io 31.0.0", - "sp-runtime 32.0.0", + "sp-application-crypto 37.0.0", + "sp-core 34.0.0", + "sp-io 37.0.0", + "sp-runtime 38.0.0", "sp-staking", "sp-std", ] [[package]] name = "pallet-indices" -version = "29.0.0" +version = "35.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e880ebdb429ca76fb400b1b361ed7fce018a5ea2fc2da4764de5156fffdfa73" +checksum = "639b5e46336d35cb888325da0294e54e558d26be45f767ff26ddfca42b709801" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "parity-scale-codec", "scale-info", - "sp-core 29.0.0", - "sp-io 31.0.0", + "sp-core 34.0.0", + "sp-io 37.0.0", "sp-keyring", - "sp-runtime 32.0.0", + "sp-runtime 38.0.0", "sp-std", ] [[package]] name = "pallet-insecure-randomness-collective-flip" -version = "17.0.0" +version = "23.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2d1abf59195719d739c65178f65f7fda6ddd0eaacd8e2273ca44f3a9b86d27a" +checksum = "bdbcd8635732846a585ee77ecd038e2701e7061ba89eb758d999d52931b02235" dependencies = [ "frame-support", "frame-system", "parity-scale-codec", "safe-mix", "scale-info", - "sp-runtime 32.0.0", + "sp-runtime 38.0.0", "sp-std", ] [[package]] name = "pallet-membership" -version = "29.0.0" +version = "35.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad901cdf3de23daf23ff8b092ab318b13faebfc1aa4d84263f2fdc84feaf3e9b" +checksum = "4d48c79ce463ee54a9c6bf4ea82405499abc24999fa64f4a4e8b6336829d68c7" dependencies = [ "frame-benchmarking", "frame-support", @@ -8682,17 +8194,17 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-core 29.0.0", - "sp-io 31.0.0", - "sp-runtime 32.0.0", + "sp-core 34.0.0", + "sp-io 37.0.0", + "sp-runtime 38.0.0", "sp-std", ] [[package]] name = "pallet-message-queue" -version = "32.0.0" +version = "38.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ccb23dee70b184a214d729db550117a0965a69107d466d35181d60a6feede38" +checksum = "8913838f2059495cd9f0c3f9a402346b2f00287b077f344a1b84f850a164d084" dependencies = [ "environmental", "frame-benchmarking", @@ -8701,19 +8213,19 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-arithmetic 24.0.0", - "sp-core 29.0.0", - "sp-io 31.0.0", - "sp-runtime 32.0.0", + "sp-arithmetic 26.0.0", + "sp-core 34.0.0", + "sp-io 37.0.0", + "sp-runtime 38.0.0", "sp-std", - "sp-weights 28.0.0", + "sp-weights 31.0.0", ] [[package]] name = "pallet-mmr" -version = "28.0.0" +version = "34.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6f1f23a70764dad2b4094d8be12ebbb82df210f2e80dd36fa941a5ac191c6cd" +checksum = "e836e2f38af303d9ae4c3b8ca512afe81279f2d6922223a8f571478740d09fb3" dependencies = [ "frame-benchmarking", "frame-support", @@ -8721,18 +8233,18 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-core 29.0.0", - "sp-io 31.0.0", + "sp-core 34.0.0", + "sp-io 37.0.0", "sp-mmr-primitives", - "sp-runtime 32.0.0", + "sp-runtime 38.0.0", "sp-std", ] [[package]] name = "pallet-multisig" -version = "29.0.0" +version = "35.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "176f6a5c170185f892a047c0ae189bc52eb390f2c0b94d4261ed0ebc7f82a548" +checksum = "2acdab77a60e7fbf76239ad530d00029fa7f9bc2194155c3356221aa76d19868" dependencies = [ "frame-benchmarking", "frame-support", @@ -8740,16 +8252,16 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-io 31.0.0", - "sp-runtime 32.0.0", + "sp-io 37.0.0", + "sp-runtime 38.0.0", "sp-std", ] [[package]] name = "pallet-nft-fractionalization" -version = "11.0.0" +version = "17.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4225c31beb3a10235dd165c78f340c344ee78f6ebccd7c99d62a71fb76d2e39" +checksum = "a37b1df43074592e190bc0a9ba443e7520e07db10de8c09aa73b22197a56d77a" dependencies = [ "frame-benchmarking", "frame-support", @@ -8759,15 +8271,15 @@ dependencies = [ "pallet-nfts", "parity-scale-codec", "scale-info", - "sp-runtime 32.0.0", + "sp-runtime 38.0.0", "sp-std", ] [[package]] name = "pallet-nfts" -version = "23.0.0" +version = "29.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3a8978bd9c43ac5ebaa7a26e5bd0c130b037d7cde97189e1a62fa64e5ee1ef1" +checksum = "49c68c96f03ef2dd6c23072f315d6ef3e1b4664795f29aab5962db8cc9062ad3" dependencies = [ "enumflags2", "frame-benchmarking", @@ -8776,17 +8288,17 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-core 29.0.0", - "sp-io 31.0.0", - "sp-runtime 32.0.0", + "sp-core 34.0.0", + "sp-io 37.0.0", + "sp-runtime 38.0.0", "sp-std", ] [[package]] name = "pallet-nfts-runtime-api" -version = "15.0.0" +version = "21.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c412ca82207d43e651ef80a3be837220b82ad0d6c3174922c369ef301ea0e5af" +checksum = "f1c2745697dcd469b5d8f37e50b116e48198dd5df4c3a6ea7af98c20c548cc30" dependencies = [ "pallet-nfts", "parity-scale-codec", @@ -8796,26 +8308,26 @@ dependencies = [ [[package]] name = "pallet-nis" -version = "29.0.0" +version = "35.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32a64a0e80dec2c60d5962dd249061a47dc4356db440f26cdec50b8acaded1d3" +checksum = "6955efc279e63f4463ea29b45c81de013faa243e45a0155b0519df07d5e0a1fb" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "parity-scale-codec", "scale-info", - "sp-arithmetic 24.0.0", - "sp-core 29.0.0", - "sp-runtime 32.0.0", + "sp-arithmetic 26.0.0", + "sp-core 34.0.0", + "sp-runtime 38.0.0", "sp-std", ] [[package]] name = "pallet-nomination-pools" -version = "26.0.1" +version = "32.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b62091305ec7426e71c3da2b0944c2df5a804109ee4d2e8f4fe34865e049f8ac" +checksum = "7faf96228372dcaf4c01e53ba59248b59a4a9ec994f30bee373110900f34c7bc" dependencies = [ "frame-support", "frame-system", @@ -8823,40 +8335,41 @@ dependencies = [ "pallet-balances", "parity-scale-codec", "scale-info", - "sp-core 29.0.0", - "sp-io 31.0.0", - "sp-runtime 32.0.0", + "sp-core 34.0.0", + "sp-io 37.0.0", + "sp-runtime 38.0.0", "sp-staking", "sp-std", - "sp-tracing", + "sp-tracing 17.0.0", ] [[package]] name = "pallet-nomination-pools-benchmarking" -version = "27.0.0" +version = "33.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18a1eba3078e2492cad15e4695f90eb3fc570386d9f71f8b81f709c7123fc6b5" +checksum = "91b308c436d36e4159ec617e9e03e20a54aa4c2cd99729a411b969c1d9062392" dependencies = [ "frame-benchmarking", "frame-election-provider-support", "frame-support", "frame-system", "pallet-bags-list", + "pallet-delegated-staking", "pallet-nomination-pools", "pallet-staking", "parity-scale-codec", "scale-info", - "sp-runtime 32.0.0", - "sp-runtime-interface 25.0.0", + "sp-runtime 38.0.0", + "sp-runtime-interface 28.0.0", "sp-staking", "sp-std", ] [[package]] name = "pallet-nomination-pools-runtime-api" -version = "24.0.0" +version = "30.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc5b35e6c471a669437b987ff02e11e2283412c9ebaeec5334dec3f73bcea652" +checksum = "57e14836c36af92c218a801d6dbd84460210f8af7820df400c5ffed6ae15006c" dependencies = [ "pallet-nomination-pools", "parity-scale-codec", @@ -8866,9 +8379,9 @@ dependencies = [ [[package]] name = "pallet-offences" -version = "28.0.0" +version = "34.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60b5bcfdc4f6032d7570929094fd459de12d840c440c395fb4d365d679e13eda" +checksum = "d2edc30910e938ef9df027aad650ea03644d0a33a604cec2267fce28951c0530" dependencies = [ "frame-support", "frame-system", @@ -8877,16 +8390,16 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-runtime 32.0.0", + "sp-runtime 38.0.0", "sp-staking", "sp-std", ] [[package]] name = "pallet-offences-benchmarking" -version = "29.0.0" +version = "35.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbc33e3086c19235cb903cbbbde1bc1c4f428519ad4c23446dc84c75d0061582" +checksum = "c605b2a3cf4eab08293ceb8f16a9352fcd71a27f0ab0dbdd8380946ab5800db6" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -8902,16 +8415,16 @@ dependencies = [ "pallet-staking", "parity-scale-codec", "scale-info", - "sp-runtime 32.0.0", + "sp-runtime 38.0.0", "sp-staking", "sp-std", ] [[package]] name = "pallet-preimage" -version = "29.0.0" +version = "35.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7344a30c304771beb90aec34604100185e47cdc0366e268ad18922de602a0c7e" +checksum = "e17c6fa28b38ef4cf33203709e3610c89aa8299900c7d0096bdec7b9e90ab2d3" dependencies = [ "frame-benchmarking", "frame-support", @@ -8919,33 +8432,33 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-core 29.0.0", - "sp-io 31.0.0", - "sp-runtime 32.0.0", + "sp-core 34.0.0", + "sp-io 37.0.0", + "sp-runtime 38.0.0", "sp-std", ] [[package]] name = "pallet-proxy" -version = "29.0.0" +version = "35.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7aa31a0b91e8060b808c3e3407e4578a5e94503b174b9e99769147b24fb2c56" +checksum = "279b23df802b3edb41d04836cc2f97d59c358b3bd43d39b98fd1fe2e03204b87" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "parity-scale-codec", "scale-info", - "sp-io 31.0.0", - "sp-runtime 32.0.0", + "sp-io 37.0.0", + "sp-runtime 38.0.0", "sp-std", ] [[package]] name = "pallet-ranked-collective" -version = "29.0.0" +version = "35.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3733dbfc44d8f5e1a08287a9064e5794e9d0e92b1bd68cdad2e22202b1964528" +checksum = "aac3413b3e5620c0b83bc32855ea16f0c9381fea96b85ffbe9490cb648815c96" dependencies = [ "frame-benchmarking", "frame-support", @@ -8954,34 +8467,34 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-arithmetic 24.0.0", - "sp-core 29.0.0", - "sp-io 31.0.0", - "sp-runtime 32.0.0", + "sp-arithmetic 26.0.0", + "sp-core 34.0.0", + "sp-io 37.0.0", + "sp-runtime 38.0.0", "sp-std", ] [[package]] name = "pallet-recovery" -version = "29.0.0" +version = "35.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "797b554ddc87082c18223440d61a81cf35ccab6573321ce473a099e7a709a760" +checksum = "9fe5112bc7fe0282330e01a9c4fb58e42ed9030575eaf8479d54e3d6bd36f889" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "parity-scale-codec", "scale-info", - "sp-io 31.0.0", - "sp-runtime 32.0.0", + "sp-io 37.0.0", + "sp-runtime 38.0.0", "sp-std", ] [[package]] name = "pallet-referenda" -version = "29.0.0" +version = "35.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da850889e7101b63cadb980b7f39df67feb6d63bc6092769b9b708e9eb596db1" +checksum = "7c969360bab41c9d50cd99755408690f23241424c3cc15935dd6c47206fc9c23" dependencies = [ "assert_matches", "frame-benchmarking", @@ -8991,17 +8504,17 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-arithmetic 24.0.0", - "sp-io 31.0.0", - "sp-runtime 32.0.0", + "sp-arithmetic 26.0.0", + "sp-io 37.0.0", + "sp-runtime 38.0.0", "sp-std", ] [[package]] name = "pallet-salary" -version = "14.0.0" +version = "20.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "433048af0ba0aae9f8c5a03e3b1b54b6628809a7d2af671a9c0cc54611dae093" +checksum = "f82cc83b8982f352ba0a83126d19e04f9bef069dc6ec4c1770ac525622f88eec" dependencies = [ "frame-benchmarking", "frame-support", @@ -9010,18 +8523,18 @@ dependencies = [ "pallet-ranked-collective", "parity-scale-codec", "scale-info", - "sp-arithmetic 24.0.0", - "sp-core 29.0.0", - "sp-io 31.0.0", - "sp-runtime 32.0.0", + "sp-arithmetic 26.0.0", + "sp-core 34.0.0", + "sp-io 37.0.0", + "sp-runtime 38.0.0", "sp-std", ] [[package]] name = "pallet-scheduler" -version = "30.0.0" +version = "36.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45e2a4ebe6a5f98b14a26deed8d7a1ea28bb2c2d3ad4d6dc129a725523a2042d" +checksum = "05840a0a1c517438d21873ad2279fea914eec836e1d76d15f29548a8ace6c707" dependencies = [ "docify", "frame-benchmarking", @@ -9030,17 +8543,17 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-io 31.0.0", - "sp-runtime 32.0.0", + "sp-io 37.0.0", + "sp-runtime 38.0.0", "sp-std", - "sp-weights 28.0.0", + "sp-weights 31.0.0", ] [[package]] name = "pallet-session" -version = "29.0.0" +version = "35.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7412ac59247b300feee53709f7009a23d1c6f8c70528599f48f44e102d896d03" +checksum = "7c77e7b0716fdf3cf8ecfcc872d583c972c4c9706842709a1112f26c51f701ae" dependencies = [ "frame-support", "frame-system", @@ -9049,21 +8562,21 @@ dependencies = [ "pallet-timestamp", "parity-scale-codec", "scale-info", - "sp-core 29.0.0", - "sp-io 31.0.0", - "sp-runtime 32.0.0", + "sp-core 34.0.0", + "sp-io 37.0.0", + "sp-runtime 38.0.0", "sp-session", "sp-staking", - "sp-state-machine 0.36.0", + "sp-state-machine 0.42.0", "sp-std", - "sp-trie 30.0.0", + "sp-trie 36.0.0", ] [[package]] name = "pallet-session-benchmarking" -version = "29.0.0" +version = "35.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9c2731415381020db1e78db8b40207f8423a16099e78f2fde599cbcb57ea8db" +checksum = "42b450a525ea08dcdf4b3f33dce8796b2161c5c7917b99fba720d2fcd09b421b" dependencies = [ "frame-benchmarking", "frame-support", @@ -9071,36 +8584,36 @@ dependencies = [ "pallet-session", "pallet-staking", "parity-scale-codec", - "rand", - "sp-runtime 32.0.0", + "rand 0.8.5", + "sp-runtime 38.0.0", "sp-session", "sp-std", ] [[package]] name = "pallet-society" -version = "29.0.0" +version = "35.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dba64f96619c25ae7a0b41f4a5111c2d3102e8b8c6cbce80ece6955e825f9de2" +checksum = "236344aaf3ab6d088364aab2f284de04628bf1b7a187686347dbec7ecd0b8cc9" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "log", "parity-scale-codec", - "rand_chacha 0.2.2", + "rand_chacha 0.3.1", "scale-info", - "sp-arithmetic 24.0.0", - "sp-io 31.0.0", - "sp-runtime 32.0.0", + "sp-arithmetic 26.0.0", + "sp-io 37.0.0", + "sp-runtime 38.0.0", "sp-std", ] [[package]] name = "pallet-staking" -version = "29.0.3" +version = "35.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "061b00814eb794a40df4eca7972a7c67b26473cd85cc7c54f5816ae49ad6e11b" +checksum = "e8f63dce0732789c9222056a3292576b7843aa1c7eb5e7e0fcb158dbab8f4455" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -9110,43 +8623,43 @@ dependencies = [ "pallet-authorship", "pallet-session", "parity-scale-codec", - "rand_chacha 0.2.2", + "rand_chacha 0.3.1", "scale-info", "serde", - "sp-application-crypto 31.0.0", - "sp-io 31.0.0", - "sp-runtime 32.0.0", + "sp-application-crypto 37.0.0", + "sp-io 37.0.0", + "sp-runtime 38.0.0", "sp-staking", "sp-std", ] [[package]] name = "pallet-staking-reward-curve" -version = "11.0.0" +version = "12.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efca5a4a423427d2c83af5fe07ab648c16b91e3782c3cc23316fe0bd96b4c794" +checksum = "db5e6b1d8ee9d3f6894c5abd8c3e17737ed738c9854f87bfd16239741b7f4d5d" dependencies = [ "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.65", ] [[package]] name = "pallet-staking-reward-fn" -version = "20.0.0" +version = "22.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "505d45e08bad052f55fb51f00a6b6244d23ee46ffdc8091f6cddf4e3a880319d" +checksum = "988a7ebeacc84d4bdb0b12409681e956ffe35438447d8f8bc78db547cffb6ebc" dependencies = [ "log", - "sp-arithmetic 24.0.0", + "sp-arithmetic 26.0.0", ] [[package]] name = "pallet-staking-runtime-api" -version = "15.0.1" +version = "21.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e47c73850103db30b61ef170107afe1ef0dab6905c495bd6dfb57b3c1dd81bc7" +checksum = "3350ef1795b832f4adc464e88fb6d44827bd3f98701b0b0bbee495267b444a92" dependencies = [ "parity-scale-codec", "sp-api", @@ -9155,9 +8668,9 @@ dependencies = [ [[package]] name = "pallet-state-trie-migration" -version = "30.0.0" +version = "36.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d76e52dedc146b7a9c3b7c5a6ff4c4c442a8ab8cc58ec30e90e1e98cdc51ad34" +checksum = "2fdd28b85f5c5beb7659a0dee158155b6114dcc747c139f247df944cca132df2" dependencies = [ "frame-benchmarking", "frame-support", @@ -9165,17 +8678,17 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-core 29.0.0", - "sp-io 31.0.0", - "sp-runtime 32.0.0", + "sp-core 34.0.0", + "sp-io 37.0.0", + "sp-runtime 38.0.0", "sp-std", ] [[package]] name = "pallet-sudo" -version = "29.0.0" +version = "35.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6d02f7855d411913e77e57126f4a8b8a32d90d9bf47d0b747e367a1301729c3" +checksum = "d15062b0caa6194e3ab13a10a500b2ed4b9d5915bf30dda18833e1c3bbbf6e85" dependencies = [ "docify", "frame-benchmarking", @@ -9183,16 +8696,16 @@ dependencies = [ "frame-system", "parity-scale-codec", "scale-info", - "sp-io 31.0.0", - "sp-runtime 32.0.0", + "sp-io 37.0.0", + "sp-runtime 38.0.0", "sp-std", ] [[package]] name = "pallet-timestamp" -version = "28.0.0" +version = "34.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1b8810ddfb254c7fb8cd7698229cce513d309a43ff117b38798dae6120f477b" +checksum = "34a42af51e32d3ea442e9aaabb935976e4154f89f3604bfb892a316e8d77c0d4" dependencies = [ "docify", "frame-benchmarking", @@ -9202,65 +8715,48 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-inherents", - "sp-io 31.0.0", - "sp-runtime 32.0.0", + "sp-io 37.0.0", + "sp-runtime 38.0.0", "sp-std", - "sp-storage", + "sp-storage 21.0.0", "sp-timestamp", ] [[package]] name = "pallet-transaction-payment" -version = "29.0.2" +version = "35.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a5ba71f06f09e955b80dc313c333be3f8d9e8505b051558e0b7af4806b13310" +checksum = "349e56fa9f8c4093d912f0654e37b57ae628ad4b4fea67d9f3373e5dfcab2bcc" dependencies = [ "frame-support", "frame-system", "parity-scale-codec", "scale-info", "serde", - "sp-core 29.0.0", - "sp-io 31.0.0", - "sp-runtime 32.0.0", + "sp-core 34.0.0", + "sp-io 37.0.0", + "sp-runtime 38.0.0", "sp-std", ] -[[package]] -name = "pallet-transaction-payment-rpc" -version = "31.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08ef209d2d5d077e325bf49b024fd2eff109a5c2ca0d84ce0d50a65839e6b026" -dependencies = [ - "jsonrpsee 0.20.3", - "pallet-transaction-payment-rpc-runtime-api", - "parity-scale-codec", - "sp-api", - "sp-blockchain", - "sp-core 29.0.0", - "sp-rpc", - "sp-runtime 32.0.0", - "sp-weights 28.0.0", -] - [[package]] name = "pallet-transaction-payment-rpc-runtime-api" -version = "29.0.0" +version = "35.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c78bcba80c7c61712b98a6b5640975ebd25ceb688c18e975af78a0fac81785b0" +checksum = "331b2011bdf0ede2b607431360a94b7c3198f706bff63cd727c259e815f62389" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", "sp-api", - "sp-runtime 32.0.0", - "sp-weights 28.0.0", + "sp-runtime 38.0.0", + "sp-weights 31.0.0", ] [[package]] name = "pallet-treasury" -version = "28.0.1" +version = "34.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3eca44990d0d759213744f2d1f6fe1fadec1079a3e4e4da40556d6b4e42abbcd" +checksum = "1317444c1dd38d7281db919b88331a9a76b483450a78f800d1cb76e21ce33563" dependencies = [ "docify", "frame-benchmarking", @@ -9271,16 +8767,16 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-core 29.0.0", - "sp-runtime 32.0.0", + "sp-core 34.0.0", + "sp-runtime 38.0.0", "sp-std", ] [[package]] name = "pallet-uniques" -version = "29.0.0" +version = "35.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac9449d6e2cdcc4456466eff97a065c43dde678620551f5fd79072dec3b9f560" +checksum = "bb356a869d24f826d0887f9953f296f0b1f1e3210f84beedc83d858845c5be93" dependencies = [ "frame-benchmarking", "frame-support", @@ -9288,32 +8784,32 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-runtime 32.0.0", + "sp-runtime 38.0.0", "sp-std", ] [[package]] name = "pallet-utility" -version = "29.0.0" +version = "35.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "954f15b98c3fdebb763bb5cea4ec6803fd180d540ec5b07a9fcb2c118251d52c" +checksum = "489431d3b751d07853119fd250145273ea050e84565b3435b5b19c6d3f622b56" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "parity-scale-codec", "scale-info", - "sp-core 29.0.0", - "sp-io 31.0.0", - "sp-runtime 32.0.0", + "sp-core 34.0.0", + "sp-io 37.0.0", + "sp-runtime 38.0.0", "sp-std", ] [[package]] name = "pallet-vesting" -version = "29.0.0" +version = "35.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4525f3038cdf078fea39d913c563ca626f09a615e7724f0c9eac97743c75ff44" +checksum = "79641f9c6720a5f1705a0b7464c13a6cf4c0a3d3c9db523ed73c345130bcaadd" dependencies = [ "frame-benchmarking", "frame-support", @@ -9321,15 +8817,15 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-runtime 32.0.0", + "sp-runtime 38.0.0", "sp-std", ] [[package]] name = "pallet-whitelist" -version = "28.0.0" +version = "34.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da0ad4ce05688bdddcdb682cbed2f3edff0ee5349f0b745ebacc27d179582432" +checksum = "7a8196f8403117eab3042f49bec96b80290e9bef678017073f62b409e5311476" dependencies = [ "frame-benchmarking", "frame-support", @@ -9337,15 +8833,15 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-api", - "sp-runtime 32.0.0", + "sp-runtime 38.0.0", "sp-std", ] [[package]] name = "pallet-xcm" -version = "8.0.5" +version = "14.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba9138b04168b07b1aff4a2079f5514753c31dddba40e5fb471b9cda7da27ad6" +checksum = "870c71f937c78c722fc91a8f8fdf7bc0c74590eb01413eb17c5a72c405c9f134" dependencies = [ "bounded-collections", "frame-benchmarking", @@ -9356,20 +8852,21 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-core 29.0.0", - "sp-io 31.0.0", - "sp-runtime 32.0.0", + "sp-core 34.0.0", + "sp-io 37.0.0", + "sp-runtime 38.0.0", "sp-std", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", + "xcm-fee-payment-runtime-api", ] [[package]] name = "pallet-xcm-benchmarks" -version = "8.0.2" +version = "14.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c10e1c92086ce2069a3d2387d9431f48660b6ec92054c4d0a4e30a9f54e7ad3" +checksum = "19da3779debfcbaecda285e8d240d0415cc7df7ff0b75bcaa227dbc2fa0cdb5c" dependencies = [ "frame-benchmarking", "frame-support", @@ -9377,8 +8874,8 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-io 31.0.0", - "sp-runtime 32.0.0", + "sp-io 37.0.0", + "sp-runtime 38.0.0", "sp-std", "staging-xcm", "staging-xcm-builder", @@ -9387,9 +8884,9 @@ dependencies = [ [[package]] name = "pallet-xcm-bridge-hub" -version = "0.3.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6177a88f606fc95e2bfa576f06b2f461dcdd0e0a01e73276c9478834267d214f" +checksum = "7ae780e414ad9cb180ae0f7a0577f641a51923f2b6d474ac8a500d4f85b9f8bb" dependencies = [ "bp-messages", "bp-runtime", @@ -9401,8 +8898,8 @@ dependencies = [ "pallet-bridge-messages", "parity-scale-codec", "scale-info", - "sp-core 29.0.0", - "sp-runtime 32.0.0", + "sp-core 34.0.0", + "sp-runtime 38.0.0", "sp-std", "staging-xcm", "staging-xcm-builder", @@ -9411,9 +8908,9 @@ dependencies = [ [[package]] name = "pallet-xcm-bridge-hub-router" -version = "0.6.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd5bd3947da7f031c86904f12b6690bbecd2efa122906a8dd838499150fe4322" +checksum = "806996c671acfb8640cb7a29de16c58092b81a6e15b22e3a3fffe0c2a4845b03" dependencies = [ "bp-xcm-bridge-hub-router", "frame-benchmarking", @@ -9422,8 +8919,8 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-core 29.0.0", - "sp-runtime 32.0.0", + "sp-core 34.0.0", + "sp-runtime 38.0.0", "sp-std", "staging-xcm", "staging-xcm-builder", @@ -9431,9 +8928,9 @@ dependencies = [ [[package]] name = "parachains-common" -version = "8.0.1" +version = "14.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "711a4c073e7c83aac7e414ba16c7c641d6d9e22e6d32f9775ff35b2464ffd7ff" +checksum = "41525e5ddae2ae87949323fce5ba5e039ac5ceea2a76bcf34c6e794c111134f7" dependencies = [ "cumulus-primitives-core", "cumulus-primitives-utility", @@ -9451,9 +8948,9 @@ dependencies = [ "polkadot-primitives", "scale-info", "sp-consensus-aura", - "sp-core 29.0.0", - "sp-io 31.0.0", - "sp-runtime 32.0.0", + "sp-core 34.0.0", + "sp-io 37.0.0", + "sp-runtime 38.0.0", "sp-std", "staging-parachain-info", "staging-xcm", @@ -9463,9 +8960,9 @@ dependencies = [ [[package]] name = "parachains-runtimes-test-utils" -version = "8.0.0" +version = "14.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d295b9c391ce15f68ddcd7b0d428eb2d3338643a4d1f471b3dd8a15538865e17" +checksum = "459295caad69abc21337036427d7ecd09e3956c3464ba9be7a0c57655e572f8f" dependencies = [ "cumulus-pallet-parachain-system", "cumulus-pallet-xcmp-queue", @@ -9477,15 +8974,16 @@ dependencies = [ "pallet-balances", "pallet-collator-selection", "pallet-session", + "pallet-timestamp", "pallet-xcm", "parity-scale-codec", "polkadot-parachain-primitives", "sp-consensus-aura", - "sp-core 29.0.0", - "sp-io 31.0.0", - "sp-runtime 32.0.0", + "sp-core 34.0.0", + "sp-io 37.0.0", + "sp-runtime 38.0.0", "sp-std", - "sp-tracing", + "sp-tracing 17.0.0", "staging-parachain-info", "staging-xcm", "staging-xcm-executor", @@ -9499,7 +8997,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4e69bf016dc406eff7d53a7d3f7cf1c2e72c82b9088aac1118591e36dd2cd3e9" dependencies = [ "bitcoin_hashes 0.13.0", - "rand", + "rand 0.8.5", "rand_core 0.6.4", "serde", "unicode-normalization", @@ -9511,32 +9009,11 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "16b56e3a2420138bdb970f84dfb9c774aea80fa0e7371549eedec0d80c209c67" -[[package]] -name = "parity-db" -version = "0.4.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "592a28a24b09c9dc20ac8afaa6839abc417c720afe42c12e1e4a9d6aa2508d2e" -dependencies = [ - "blake2 0.10.6", - "crc32fast", - "fs2", - "hex", - "libc", - "log", - "lz4", - "memmap2 0.5.10", - "parking_lot 0.12.1", - "rand", - "siphasher 0.3.11", - "snap", - "winapi", -] - [[package]] name = "parity-scale-codec" -version = "3.6.9" +version = "3.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "881331e34fa842a2fb61cc2db9643a8fedc615e47cfcc52597d1af0db9a7e8fe" +checksum = "306800abfa29c7f16596b5970a588435e3d5b3149683d00c12b699cc19f895ee" dependencies = [ "arrayvec 0.7.4", "bitvec", @@ -9549,11 +9026,11 @@ dependencies = [ [[package]] name = "parity-scale-codec-derive" -version = "3.6.9" +version = "3.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be30eaf4b0a9fba5336683b38de57bb86d179a35862ba6bfcf57625d006bde5b" +checksum = "d830939c76d294956402033aee57a6da7b438f2294eb94864c37b0569053a42c" dependencies = [ - "proc-macro-crate 2.0.0", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", "syn 1.0.109", @@ -9677,15 +9154,6 @@ version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" -[[package]] -name = "pbkdf2" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d95f5254224e617595d2cc3cc73ff0a5eaf2637519e25f03388154e9378b6ffa" -dependencies = [ - "crypto-mac 0.11.0", -] - [[package]] name = "pbkdf2" version = "0.12.2" @@ -9696,12 +9164,6 @@ dependencies = [ "password-hash", ] -[[package]] -name = "peeking_take_while" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" - [[package]] name = "pem" version = "1.1.1" @@ -9732,14 +9194,15 @@ dependencies = [ "parachains-common", "penpal-runtime", "polkadot-emulated-chain", - "sp-core 29.0.0", + "sp-core 34.0.0", + "staging-xcm", ] [[package]] name = "penpal-runtime" -version = "0.15.1" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec559654c03e2c39b3b6921e4baddb34df06feaf37fac1432e277158233345b5" +checksum = "adb845cc69bd90e75e6bb80bd63bb750a0e065fee8f56d4a47cab65f228f3bcc" dependencies = [ "assets-common", "cumulus-pallet-aura-ext", @@ -9780,14 +9243,14 @@ dependencies = [ "sp-api", "sp-block-builder", "sp-consensus-aura", - "sp-core 29.0.0", + "sp-core 34.0.0", "sp-genesis-builder", "sp-inherents", "sp-offchain", - "sp-runtime 32.0.0", + "sp-runtime 38.0.0", "sp-session", "sp-std", - "sp-storage", + "sp-storage 21.0.0", "sp-transaction-pool", "sp-version", "staging-parachain-info", @@ -9795,6 +9258,7 @@ dependencies = [ "staging-xcm-builder", "staging-xcm-executor", "substrate-wasm-builder", + "xcm-fee-payment-runtime-api", ] [[package]] @@ -9807,7 +9271,7 @@ dependencies = [ "kusama-emulated-chain", "parachains-common", "people-kusama-runtime", - "sp-core 29.0.0", + "sp-core 34.0.0", ] [[package]] @@ -9827,7 +9291,7 @@ dependencies = [ "parity-scale-codec", "people-kusama-runtime", "polkadot-runtime-common", - "sp-runtime 32.0.0", + "sp-runtime 38.0.0", "staging-kusama-runtime", "staging-xcm", "staging-xcm-executor", @@ -9844,6 +9308,7 @@ dependencies = [ "cumulus-pallet-xcmp-queue", "cumulus-primitives-aura", "cumulus-primitives-core", + "cumulus-primitives-storage-weight-reclaim", "cumulus-primitives-utility", "enumflags2", "frame-benchmarking", @@ -9882,14 +9347,14 @@ dependencies = [ "sp-api", "sp-block-builder", "sp-consensus-aura", - "sp-core 29.0.0", + "sp-core 34.0.0", "sp-genesis-builder", "sp-inherents", "sp-offchain", - "sp-runtime 32.0.0", + "sp-runtime 38.0.0", "sp-session", "sp-std", - "sp-storage", + "sp-storage 21.0.0", "sp-transaction-pool", "sp-version", "staging-parachain-info", @@ -9910,7 +9375,7 @@ dependencies = [ "parachains-common", "people-polkadot-runtime", "polkadot-emulated-chain", - "sp-core 29.0.0", + "sp-core 34.0.0", ] [[package]] @@ -9931,7 +9396,7 @@ dependencies = [ "polkadot-runtime-common", "polkadot-runtime-constants", "polkadot-system-emulated-network", - "sp-runtime 32.0.0", + "sp-runtime 38.0.0", "staging-xcm", "staging-xcm-executor", ] @@ -9984,14 +9449,14 @@ dependencies = [ "sp-api", "sp-block-builder", "sp-consensus-aura", - "sp-core 29.0.0", + "sp-core 34.0.0", "sp-genesis-builder", "sp-inherents", "sp-offchain", - "sp-runtime 32.0.0", + "sp-runtime 38.0.0", "sp-session", "sp-std", - "sp-storage", + "sp-storage 21.0.0", "sp-transaction-pool", "sp-version", "staging-parachain-info", @@ -10039,7 +9504,7 @@ dependencies = [ "pest_meta", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.65", ] [[package]] @@ -10080,7 +9545,7 @@ checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.65", ] [[package]] @@ -10135,151 +9600,26 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "14e6ab3f592e6fb464fc9712d8d6e6912de6473954635fd76a589d832cffcbb0" [[package]] -name = "polkadot-approval-distribution" -version = "8.0.0" +name = "polkadot-ckb-merkle-mountain-range" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cdfa52beecc446ccf733dede1a0089e6396d3df13401004d27c0ce2530816bc" +checksum = "a4b44320e5f7ce2c18227537a3032ae5b2c476a7e8eddba45333e1011fc31b92" dependencies = [ - "bitvec", - "futures", - "futures-timer", + "cfg-if", "itertools 0.10.5", - "polkadot-node-jaeger", - "polkadot-node-metrics", - "polkadot-node-network-protocol", - "polkadot-node-primitives", - "polkadot-node-subsystem", - "polkadot-node-subsystem-util", - "polkadot-primitives", - "rand", - "tracing-gum", ] [[package]] -name = "polkadot-availability-bitfield-distribution" -version = "8.0.0" +name = "polkadot-core-primitives" +version = "14.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80ffc856dfbdb31178625760824ae320ddb7dd5694b217f489bd2832b8de15a5" +checksum = "17c72ee63bcf920f963cd7ac066759b0b649350c8ab3781a85a6aac87b1488f2" dependencies = [ - "always-assert", - "futures", - "futures-timer", - "polkadot-node-network-protocol", - "polkadot-node-subsystem", - "polkadot-node-subsystem-util", - "polkadot-primitives", - "rand", - "tracing-gum", -] - -[[package]] -name = "polkadot-availability-distribution" -version = "8.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9d05c26cc8d6fa0f5f432d9de880f20ad0d24ca51a618834ea6612d1bd96ab1" -dependencies = [ - "derive_more", - "fatality", - "futures", - "parity-scale-codec", - "polkadot-erasure-coding", - "polkadot-node-network-protocol", - "polkadot-node-primitives", - "polkadot-node-subsystem", - "polkadot-node-subsystem-util", - "polkadot-primitives", - "rand", - "schnellru", - "sp-core 29.0.0", - "sp-keystore 0.35.0", - "thiserror", - "tracing-gum", -] - -[[package]] -name = "polkadot-availability-recovery" -version = "8.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d77e0b979f43861ab4c78c216c2729644bb12812f9bc859858bd3b8fc56b4d6" -dependencies = [ - "async-trait", - "fatality", - "futures", - "parity-scale-codec", - "polkadot-erasure-coding", - "polkadot-node-network-protocol", - "polkadot-node-primitives", - "polkadot-node-subsystem", - "polkadot-node-subsystem-util", - "polkadot-primitives", - "rand", - "sc-network", - "schnellru", - "thiserror", - "tokio", - "tracing-gum", -] - -[[package]] -name = "polkadot-collator-protocol" -version = "8.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "507391f1be9f9b9a8fbf28ca13b0ab3f04947a54a1115d423d115aacf8889bf4" -dependencies = [ - "bitvec", - "fatality", - "futures", - "futures-timer", - "polkadot-node-network-protocol", - "polkadot-node-primitives", - "polkadot-node-subsystem", - "polkadot-node-subsystem-util", - "polkadot-primitives", - "sp-core 29.0.0", - "sp-keystore 0.35.0", - "sp-runtime 32.0.0", - "thiserror", - "tokio-util", - "tracing-gum", -] - -[[package]] -name = "polkadot-core-primitives" -version = "8.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6a08e4e014c853b252ecbbe3ccd67b2d33d78e46988d309b8cccf4ac06e25ef" -dependencies = [ - "parity-scale-codec", - "scale-info", - "sp-core 29.0.0", - "sp-runtime 32.0.0", - "sp-std", -] - -[[package]] -name = "polkadot-dispute-distribution" -version = "8.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae32e83ef6bc0ec2874c76c19dff8f3795832ccc27f0abc587a7137994c42d26" -dependencies = [ - "derive_more", - "fatality", - "futures", - "futures-timer", - "indexmap 2.2.6", - "parity-scale-codec", - "polkadot-erasure-coding", - "polkadot-node-network-protocol", - "polkadot-node-primitives", - "polkadot-node-subsystem", - "polkadot-node-subsystem-util", - "polkadot-primitives", - "sc-network", - "schnellru", - "sp-application-crypto 31.0.0", - "sp-keystore 0.35.0", - "thiserror", - "tracing-gum", + "parity-scale-codec", + "scale-info", + "sp-core 34.0.0", + "sp-runtime 38.0.0", + "sp-std", ] [[package]] @@ -10296,601 +9636,15 @@ dependencies = [ "sp-authority-discovery", "sp-consensus-babe", "sp-consensus-beefy", - "sp-core 29.0.0", - "sp-runtime 32.0.0", -] - -[[package]] -name = "polkadot-erasure-coding" -version = "8.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b10514ace3272d38b602e1795a5a340b265285c4af875473d682a5c9d6c831c" -dependencies = [ - "parity-scale-codec", - "polkadot-node-primitives", - "polkadot-primitives", - "reed-solomon-novelpoly", - "sp-core 29.0.0", - "sp-trie 30.0.0", - "thiserror", -] - -[[package]] -name = "polkadot-gossip-support" -version = "8.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01f05f7f60022d4beb30414f1f7c7e4ae728fea02086a4a0f8ff0a73e73ea4aa" -dependencies = [ - "futures", - "futures-timer", - "polkadot-node-network-protocol", - "polkadot-node-subsystem", - "polkadot-node-subsystem-util", - "polkadot-primitives", - "rand", - "rand_chacha 0.3.1", - "sc-network", - "sc-network-common", - "sp-application-crypto 31.0.0", - "sp-core 29.0.0", - "sp-crypto-hashing", - "sp-keystore 0.35.0", - "tracing-gum", -] - -[[package]] -name = "polkadot-network-bridge" -version = "8.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "049ec1298ac6e96bcf4d980cd5864aceeee73b3298ab5d6dd7a3193d47578abc" -dependencies = [ - "always-assert", - "async-trait", - "bytes", - "fatality", - "futures", - "parity-scale-codec", - "parking_lot 0.12.1", - "polkadot-node-metrics", - "polkadot-node-network-protocol", - "polkadot-node-subsystem", - "polkadot-overseer", - "polkadot-primitives", - "sc-network", - "sp-consensus", - "thiserror", - "tracing-gum", -] - -[[package]] -name = "polkadot-node-collation-generation" -version = "8.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f1211ab8b154c2e2b4b89c64f57f96056c881e4fcfa2ce29b6e5cbc978e74f1" -dependencies = [ - "futures", - "parity-scale-codec", - "polkadot-erasure-coding", - "polkadot-node-primitives", - "polkadot-node-subsystem", - "polkadot-node-subsystem-util", - "polkadot-primitives", - "sp-core 29.0.0", - "sp-maybe-compressed-blob", - "thiserror", - "tracing-gum", -] - -[[package]] -name = "polkadot-node-core-approval-voting" -version = "8.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c61a17b7e4edd3b73afbe0c6e8b5369bf3b721361a232baf11fb1698077067a4" -dependencies = [ - "bitvec", - "derive_more", - "futures", - "futures-timer", - "itertools 0.10.5", - "kvdb", - "merlin 3.0.0", - "parity-scale-codec", - "polkadot-node-jaeger", - "polkadot-node-primitives", - "polkadot-node-subsystem", - "polkadot-node-subsystem-util", - "polkadot-overseer", - "polkadot-primitives", - "rand", - "rand_chacha 0.3.1", - "rand_core 0.6.4", - "sc-keystore", - "schnellru", - "schnorrkel 0.11.4", - "sp-application-crypto 31.0.0", - "sp-consensus", - "sp-consensus-slots", - "sp-runtime 32.0.0", - "thiserror", - "tracing-gum", -] - -[[package]] -name = "polkadot-node-core-av-store" -version = "8.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84b334f06423ff701e4b807d6832741ec24e0e97ebc13b560fc99bc0652926c0" -dependencies = [ - "bitvec", - "futures", - "futures-timer", - "kvdb", - "parity-scale-codec", - "polkadot-erasure-coding", - "polkadot-node-jaeger", - "polkadot-node-primitives", - "polkadot-node-subsystem", - "polkadot-node-subsystem-util", - "polkadot-overseer", - "polkadot-primitives", - "sp-consensus", - "thiserror", - "tracing-gum", -] - -[[package]] -name = "polkadot-node-core-backing" -version = "8.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f07f8840f3f2f0bee6264c18ce471c99c925f9afb65952e1d584b6d773cf4115" -dependencies = [ - "bitvec", - "fatality", - "futures", - "polkadot-erasure-coding", - "polkadot-node-primitives", - "polkadot-node-subsystem", - "polkadot-node-subsystem-util", - "polkadot-primitives", - "polkadot-statement-table", - "schnellru", - "sp-keystore 0.35.0", - "thiserror", - "tracing-gum", -] - -[[package]] -name = "polkadot-node-core-bitfield-signing" -version = "8.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0687006f843d6da8687eb24da735a04cbdcf4c3a98d82055b9b3a9047537e17e" -dependencies = [ - "futures", - "polkadot-node-subsystem", - "polkadot-node-subsystem-util", - "polkadot-primitives", - "sp-keystore 0.35.0", - "thiserror", - "tracing-gum", - "wasm-timer", -] - -[[package]] -name = "polkadot-node-core-candidate-validation" -version = "8.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3035acf9069801e980b91b5178591f8a7052b4409de13824db7a6c798b36b98" -dependencies = [ - "async-trait", - "futures", - "futures-timer", - "parity-scale-codec", - "polkadot-node-core-pvf", - "polkadot-node-metrics", - "polkadot-node-primitives", - "polkadot-node-subsystem", - "polkadot-node-subsystem-util", - "polkadot-overseer", - "polkadot-parachain-primitives", - "polkadot-primitives", - "sp-maybe-compressed-blob", - "tracing-gum", -] - -[[package]] -name = "polkadot-node-core-chain-api" -version = "8.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c990b9ffdde6725fe79f55e3b7c4c32ce2134a06103708476fa595a4ac652e95" -dependencies = [ - "futures", - "polkadot-node-metrics", - "polkadot-node-subsystem", - "polkadot-node-subsystem-types", - "sc-client-api", - "sc-consensus-babe", - "tracing-gum", -] - -[[package]] -name = "polkadot-node-core-chain-selection" -version = "8.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "451965f3ace786d392c407872d61324765061b87027890b02ffd625554531f97" -dependencies = [ - "futures", - "futures-timer", - "kvdb", - "parity-scale-codec", - "polkadot-node-primitives", - "polkadot-node-subsystem", - "polkadot-node-subsystem-util", - "polkadot-primitives", - "thiserror", - "tracing-gum", -] - -[[package]] -name = "polkadot-node-core-dispute-coordinator" -version = "8.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c13ea9d5b4aa43b5b1f718c3ec951adff0b0d74909cb1fe28206f5d88492247d" -dependencies = [ - "fatality", - "futures", - "kvdb", - "parity-scale-codec", - "polkadot-node-primitives", - "polkadot-node-subsystem", - "polkadot-node-subsystem-util", - "polkadot-primitives", - "sc-keystore", - "schnellru", - "thiserror", - "tracing-gum", -] - -[[package]] -name = "polkadot-node-core-parachains-inherent" -version = "8.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6574c0bda4e10d722f761d4b8ab5d1708f0f963e5840370aa9cee8f559c90a23" -dependencies = [ - "async-trait", - "futures", - "futures-timer", - "polkadot-node-subsystem", - "polkadot-overseer", - "polkadot-primitives", - "sp-blockchain", - "sp-inherents", - "thiserror", - "tracing-gum", -] - -[[package]] -name = "polkadot-node-core-prospective-parachains" -version = "7.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "160f80a11b9d2b8e36e510ea54ce5b06e77179c0c502f7e19e5a5809bc1523ee" -dependencies = [ - "bitvec", - "fatality", - "futures", - "parity-scale-codec", - "polkadot-node-primitives", - "polkadot-node-subsystem", - "polkadot-node-subsystem-util", - "polkadot-primitives", - "thiserror", - "tracing-gum", -] - -[[package]] -name = "polkadot-node-core-provisioner" -version = "8.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0d0a64371700537c3dc15b3956536e4541f093b7c38ac21737ea9fea3562a83" -dependencies = [ - "bitvec", - "fatality", - "futures", - "futures-timer", - "polkadot-node-primitives", - "polkadot-node-subsystem", - "polkadot-node-subsystem-util", - "polkadot-primitives", - "thiserror", - "tracing-gum", -] - -[[package]] -name = "polkadot-node-core-pvf" -version = "8.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3bbb1b5f4b966f21a0336e94c0a0222958d2f3cba451da1157af271d07f9748" -dependencies = [ - "always-assert", - "array-bytes 6.2.2", - "blake3", - "cfg-if", - "futures", - "futures-timer", - "is_executable", - "libc", - "parity-scale-codec", - "pin-project", - "polkadot-core-primitives", - "polkadot-node-core-pvf-common", - "polkadot-node-metrics", - "polkadot-node-primitives", - "polkadot-node-subsystem", - "polkadot-parachain-primitives", - "polkadot-primitives", - "rand", - "slotmap", - "sp-core 29.0.0", - "sp-maybe-compressed-blob", - "sp-wasm-interface", - "tempfile", - "thiserror", - "tokio", - "tracing-gum", -] - -[[package]] -name = "polkadot-node-core-pvf-checker" -version = "8.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94ab4a91e62a9f7e67cf400931578f2505417cc43a32ac29458163604f2b277b" -dependencies = [ - "futures", - "polkadot-node-primitives", - "polkadot-node-subsystem", - "polkadot-node-subsystem-util", - "polkadot-overseer", - "polkadot-primitives", - "sp-keystore 0.35.0", - "thiserror", - "tracing-gum", -] - -[[package]] -name = "polkadot-node-core-pvf-common" -version = "8.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "003981d3b63e4f527ef7f03cbe280e41ec649d9be365668887f0b107610640f4" -dependencies = [ - "cfg-if", - "cpu-time", - "futures", - "landlock", - "libc", - "nix 0.27.1", - "parity-scale-codec", - "polkadot-parachain-primitives", - "polkadot-primitives", - "sc-executor", - "sc-executor-common", - "sc-executor-wasmtime", - "seccompiler", - "sp-core 29.0.0", - "sp-crypto-hashing", - "sp-externalities 0.26.0", - "sp-io 31.0.0", - "sp-tracing", - "thiserror", - "tracing-gum", -] - -[[package]] -name = "polkadot-node-core-runtime-api" -version = "8.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ba6ea6a03f297b7387fc59c41c3c32285803971cb27e81d7e9ca696824d6773" -dependencies = [ - "futures", - "polkadot-node-metrics", - "polkadot-node-subsystem", - "polkadot-node-subsystem-types", - "polkadot-primitives", - "schnellru", - "sp-consensus-babe", - "tracing-gum", -] - -[[package]] -name = "polkadot-node-jaeger" -version = "8.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7d113b48e7b6126964c3a790b101d99e17fd3cb75a92e94d54587ce1340df21" -dependencies = [ - "lazy_static", - "log", - "mick-jaeger", - "parity-scale-codec", - "parking_lot 0.12.1", - "polkadot-node-primitives", - "polkadot-primitives", - "sc-network", - "sp-core 29.0.0", - "thiserror", - "tokio", -] - -[[package]] -name = "polkadot-node-metrics" -version = "8.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aef2e2a934f0d0d606fcfc53fc26f4cacd8b9f18fb2118829203fa813af2cdae" -dependencies = [ - "bs58 0.5.0", - "futures", - "futures-timer", - "log", - "parity-scale-codec", - "polkadot-primitives", - "prioritized-metered-channel", - "sc-cli", - "sc-service", - "sc-tracing", - "substrate-prometheus-endpoint", - "tracing-gum", -] - -[[package]] -name = "polkadot-node-network-protocol" -version = "8.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07f9e67b0f25d695947a15b6fe8ee6f8e83f3dfcbca124a13281c0edd0dc4703" -dependencies = [ - "async-channel 1.9.0", - "async-trait", - "bitvec", - "derive_more", - "fatality", - "futures", - "hex", - "parity-scale-codec", - "polkadot-node-jaeger", - "polkadot-node-primitives", - "polkadot-primitives", - "rand", - "sc-authority-discovery", - "sc-network", - "strum 0.24.1", - "thiserror", - "tracing-gum", -] - -[[package]] -name = "polkadot-node-primitives" -version = "8.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "375744eee7a53576387e14856e1c65be8ecef8b449567bb2cff85706266c8912" -dependencies = [ - "bitvec", - "bounded-vec", - "futures", - "parity-scale-codec", - "polkadot-parachain-primitives", - "polkadot-primitives", - "schnorrkel 0.11.4", - "serde", - "sp-application-crypto 31.0.0", - "sp-consensus-babe", - "sp-core 29.0.0", - "sp-keystore 0.35.0", - "sp-maybe-compressed-blob", - "sp-runtime 32.0.0", - "thiserror", - "zstd 0.12.4", -] - -[[package]] -name = "polkadot-node-subsystem" -version = "8.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24d6c226cdbcd48ab1e506d8512f0fb01839f9a72eec2fc0cf7771f6d3352171" -dependencies = [ - "polkadot-node-jaeger", - "polkadot-node-subsystem-types", - "polkadot-overseer", -] - -[[package]] -name = "polkadot-node-subsystem-types" -version = "8.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1404525da0ab9d44bac1041449bf0c5576240f9031b305dc41654567e98b6021" -dependencies = [ - "async-trait", - "bitvec", - "derive_more", - "futures", - "orchestra", - "polkadot-node-jaeger", - "polkadot-node-network-protocol", - "polkadot-node-primitives", - "polkadot-primitives", - "polkadot-statement-table", - "sc-client-api", - "sc-network", - "sc-transaction-pool-api", - "smallvec", - "sp-api", - "sp-authority-discovery", - "sp-blockchain", - "sp-consensus-babe", - "sp-runtime 32.0.0", - "substrate-prometheus-endpoint", - "thiserror", -] - -[[package]] -name = "polkadot-node-subsystem-util" -version = "8.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65a7d101f28bf718d15f01a060ed8cf7a7e2d8d5705c494b49ece696cada0adf" -dependencies = [ - "async-trait", - "derive_more", - "fatality", - "futures", - "futures-channel", - "itertools 0.10.5", - "kvdb", - "parity-db", - "parity-scale-codec", - "parking_lot 0.12.1", - "pin-project", - "polkadot-node-jaeger", - "polkadot-node-metrics", - "polkadot-node-network-protocol", - "polkadot-node-primitives", - "polkadot-node-subsystem", - "polkadot-node-subsystem-types", - "polkadot-overseer", - "polkadot-primitives", - "prioritized-metered-channel", - "rand", - "sc-client-api", - "schnellru", - "sp-application-crypto 31.0.0", - "sp-core 29.0.0", - "sp-keystore 0.35.0", - "thiserror", - "tracing-gum", -] - -[[package]] -name = "polkadot-overseer" -version = "8.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd5ed988deffeddf440473586f62efc5dd498f6016e6650881db09dd60b3b24f" -dependencies = [ - "async-trait", - "futures", - "futures-timer", - "orchestra", - "parking_lot 0.12.1", - "polkadot-node-metrics", - "polkadot-node-network-protocol", - "polkadot-node-primitives", - "polkadot-node-subsystem-types", - "polkadot-primitives", - "sc-client-api", - "sp-api", - "sp-core 29.0.0", - "tikv-jemalloc-ctl", - "tracing-gum", + "sp-core 34.0.0", + "sp-runtime 38.0.0", ] [[package]] name = "polkadot-parachain-primitives" -version = "7.0.0" +version = "13.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "248ab090959a92e61493277e33b7e85104280a4beb4cb0815137d3c8c50a07f4" +checksum = "f61070d0ff28f596890def0e0d03c231860796130b2a43e293106fa86a50c9a9" dependencies = [ "bounded-collections", "derive_more", @@ -10898,17 +9652,17 @@ dependencies = [ "polkadot-core-primitives", "scale-info", "serde", - "sp-core 29.0.0", - "sp-runtime 32.0.0", + "sp-core 34.0.0", + "sp-runtime 38.0.0", "sp-std", - "sp-weights 28.0.0", + "sp-weights 31.0.0", ] [[package]] name = "polkadot-primitives" -version = "8.0.1" +version = "14.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0d5f9930210cab0233d81204415c9ef4a8889cdf3e60de1435250481a2773ca" +checksum = "5a4879609f4340138930c3c7313256941104a3ff6f7ecb2569d15223da9b35b2" dependencies = [ "bitvec", "hex-literal", @@ -10919,53 +9673,19 @@ dependencies = [ "scale-info", "serde", "sp-api", - "sp-application-crypto 31.0.0", - "sp-arithmetic 24.0.0", + "sp-application-crypto 37.0.0", + "sp-arithmetic 26.0.0", "sp-authority-discovery", "sp-consensus-slots", - "sp-core 29.0.0", + "sp-core 34.0.0", "sp-inherents", - "sp-io 31.0.0", - "sp-keystore 0.35.0", - "sp-runtime 32.0.0", + "sp-io 37.0.0", + "sp-keystore 0.40.0", + "sp-runtime 38.0.0", "sp-staking", "sp-std", ] -[[package]] -name = "polkadot-rpc" -version = "8.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb4747cb8faa532e8446b38b74266fd626d6b660fe6b00776dd6c4543cc0457f" -dependencies = [ - "jsonrpsee 0.20.3", - "mmr-rpc", - "pallet-transaction-payment-rpc", - "polkadot-primitives", - "sc-chain-spec", - "sc-client-api", - "sc-consensus-babe", - "sc-consensus-babe-rpc", - "sc-consensus-beefy", - "sc-consensus-beefy-rpc", - "sc-consensus-epochs", - "sc-consensus-grandpa", - "sc-consensus-grandpa-rpc", - "sc-rpc", - "sc-rpc-spec-v2", - "sc-sync-state-rpc", - "sc-transaction-pool-api", - "sp-api", - "sp-block-builder", - "sp-blockchain", - "sp-consensus", - "sp-consensus-babe", - "sp-keystore 0.35.0", - "sp-runtime 32.0.0", - "substrate-frame-rpc-system", - "substrate-state-trie-migration-rpc", -] - [[package]] name = "polkadot-runtime" version = "1.0.0" @@ -11036,28 +9756,28 @@ dependencies = [ "separator", "serde_json", "sp-api", - "sp-application-crypto 31.0.0", - "sp-arithmetic 24.0.0", + "sp-application-crypto 37.0.0", + "sp-arithmetic 26.0.0", "sp-authority-discovery", "sp-block-builder", "sp-consensus-babe", "sp-consensus-beefy", - "sp-core 29.0.0", + "sp-core 34.0.0", "sp-debug-derive", "sp-genesis-builder", "sp-inherents", - "sp-io 31.0.0", + "sp-io 37.0.0", "sp-keyring", "sp-npos-elections", "sp-offchain", - "sp-runtime 32.0.0", + "sp-runtime 38.0.0", "sp-session", "sp-staking", "sp-std", - "sp-storage", - "sp-tracing", + "sp-storage 21.0.0", + "sp-tracing 17.0.0", "sp-transaction-pool", - "sp-trie 30.0.0", + "sp-trie 36.0.0", "sp-version", "staging-xcm", "staging-xcm-builder", @@ -11068,9 +9788,9 @@ dependencies = [ [[package]] name = "polkadot-runtime-common" -version = "8.0.3" +version = "14.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12a70422ca43d30457e2d9502a5e4af35e20fa2ff3f7cd46e0d2997c784f2665" +checksum = "929499dd53b664110a787bd700030c0d5aa55ff5732556007e052711920933e8" dependencies = [ "bitvec", "frame-benchmarking", @@ -11104,11 +9824,11 @@ dependencies = [ "serde_derive", "slot-range-helper", "sp-api", - "sp-core 29.0.0", + "sp-core 34.0.0", "sp-inherents", - "sp-io 31.0.0", + "sp-io 37.0.0", "sp-npos-elections", - "sp-runtime 32.0.0", + "sp-runtime 38.0.0", "sp-session", "sp-staking", "sp-std", @@ -11126,31 +9846,31 @@ dependencies = [ "polkadot-primitives", "polkadot-runtime-common", "smallvec", - "sp-core 29.0.0", - "sp-runtime 32.0.0", - "sp-weights 28.0.0", + "sp-core 34.0.0", + "sp-runtime 38.0.0", + "sp-weights 31.0.0", "staging-xcm-builder", ] [[package]] name = "polkadot-runtime-metrics" -version = "8.0.0" +version = "14.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3566c6fd0c21b5dd555309427c984cf506f875ee90f710acea295b478fecbe0" +checksum = "17496ddf5f7bc75db80d8b5c8183a1fbc64d984c39238055c67bd45469d97e37" dependencies = [ "bs58 0.5.0", "frame-benchmarking", "parity-scale-codec", "polkadot-primitives", "sp-std", - "sp-tracing", + "sp-tracing 17.0.0", ] [[package]] name = "polkadot-runtime-parachains" -version = "8.0.3" +version = "14.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8d37cd3e014b06daf396d1483b5327782a0ebadc816423419665166b75b3e3e" +checksum = "2502de64c7fea2a931712c3e0eb0830ed0af753115472c7ccb2b74c4eba61c65" dependencies = [ "bitflags 1.3.2", "bitvec", @@ -11175,191 +9895,61 @@ dependencies = [ "polkadot-parachain-primitives", "polkadot-primitives", "polkadot-runtime-metrics", - "rand", + "rand 0.8.5", "rand_chacha 0.3.1", "rustc-hex", "scale-info", "serde", "sp-api", - "sp-application-crypto 31.0.0", - "sp-arithmetic 24.0.0", - "sp-core 29.0.0", + "sp-application-crypto 37.0.0", + "sp-arithmetic 26.0.0", + "sp-core 34.0.0", "sp-inherents", - "sp-io 31.0.0", - "sp-keystore 0.35.0", - "sp-runtime 32.0.0", + "sp-io 37.0.0", + "sp-keystore 0.40.0", + "sp-runtime 38.0.0", "sp-session", "sp-staking", "sp-std", - "sp-tracing", + "sp-tracing 17.0.0", "staging-xcm", "staging-xcm-executor", "static_assertions", ] [[package]] -name = "polkadot-service" -version = "8.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2fd665185877bec296588c7cf1ec0ef75e0545050b5e1d42d94240a284149da" +name = "polkadot-system-emulated-network" +version = "1.0.0" dependencies = [ - "async-trait", - "frame-benchmarking", - "frame-benchmarking-cli", - "frame-support", - "frame-system", - "frame-system-rpc-runtime-api", - "futures", - "hex-literal", - "is_executable", - "kvdb", - "kvdb-rocksdb", - "log", - "mmr-gadget", - "pallet-babe", - "pallet-im-online", - "pallet-staking", - "pallet-transaction-payment", - "pallet-transaction-payment-rpc-runtime-api", - "parity-db", - "parity-scale-codec", - "parking_lot 0.12.1", - "polkadot-approval-distribution", - "polkadot-availability-bitfield-distribution", - "polkadot-availability-distribution", - "polkadot-availability-recovery", - "polkadot-collator-protocol", - "polkadot-core-primitives", - "polkadot-dispute-distribution", - "polkadot-gossip-support", - "polkadot-network-bridge", - "polkadot-node-collation-generation", - "polkadot-node-core-approval-voting", - "polkadot-node-core-av-store", - "polkadot-node-core-backing", - "polkadot-node-core-bitfield-signing", - "polkadot-node-core-candidate-validation", - "polkadot-node-core-chain-api", - "polkadot-node-core-chain-selection", - "polkadot-node-core-dispute-coordinator", - "polkadot-node-core-parachains-inherent", - "polkadot-node-core-prospective-parachains", - "polkadot-node-core-provisioner", - "polkadot-node-core-pvf", - "polkadot-node-core-pvf-checker", - "polkadot-node-core-runtime-api", - "polkadot-node-network-protocol", - "polkadot-node-primitives", - "polkadot-node-subsystem", - "polkadot-node-subsystem-types", - "polkadot-node-subsystem-util", - "polkadot-overseer", - "polkadot-parachain-primitives", - "polkadot-primitives", - "polkadot-rpc", - "polkadot-runtime-parachains", - "polkadot-statement-distribution", - "sc-authority-discovery", - "sc-basic-authorship", - "sc-block-builder", - "sc-chain-spec", - "sc-client-api", - "sc-client-db", - "sc-consensus", - "sc-consensus-babe", - "sc-consensus-beefy", - "sc-consensus-grandpa", - "sc-consensus-slots", - "sc-executor", - "sc-keystore", - "sc-network", - "sc-network-common", - "sc-network-sync", - "sc-offchain", - "sc-service", - "sc-sync-state-rpc", - "sc-sysinfo", - "sc-telemetry", - "sc-transaction-pool", - "sc-transaction-pool-api", - "schnellru", - "serde", - "serde_json", - "sp-api", - "sp-authority-discovery", - "sp-block-builder", - "sp-blockchain", - "sp-consensus", - "sp-consensus-babe", - "sp-consensus-beefy", - "sp-consensus-grandpa", - "sp-core 29.0.0", - "sp-inherents", - "sp-io 31.0.0", - "sp-keyring", - "sp-keystore 0.35.0", - "sp-mmr-primitives", - "sp-offchain", - "sp-runtime 32.0.0", - "sp-session", - "sp-state-machine 0.36.0", - "sp-storage", - "sp-timestamp", - "sp-transaction-pool", - "sp-version", - "sp-weights 28.0.0", - "substrate-prometheus-endpoint", - "thiserror", - "tracing-gum", + "asset-hub-polkadot-emulated-chain", + "bridge-hub-polkadot-emulated-chain", + "collectives-polkadot-emulated-chain", + "emulated-integration-tests-common", + "penpal-emulated-chain", + "people-polkadot-emulated-chain", + "polkadot-emulated-chain", ] [[package]] -name = "polkadot-statement-distribution" -version = "8.0.0" +name = "polkavm" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ff6d16cbd994987f48a9f107f12e4c7fff26cdd71df6288e9521adc7cff3427" +checksum = "8a3693e5efdb2bf74e449cd25fd777a28bd7ed87e41f5d5da75eb31b4de48b94" dependencies = [ - "arrayvec 0.7.4", - "bitvec", - "fatality", - "futures", - "futures-timer", - "indexmap 2.2.6", - "parity-scale-codec", - "polkadot-node-network-protocol", - "polkadot-node-primitives", - "polkadot-node-subsystem", - "polkadot-node-subsystem-util", - "polkadot-primitives", - "sp-keystore 0.35.0", - "sp-staking", - "thiserror", - "tracing-gum", + "libc", + "log", + "polkavm-assembler", + "polkavm-common 0.9.0", + "polkavm-linux-raw", ] [[package]] -name = "polkadot-statement-table" -version = "8.0.1" +name = "polkavm-assembler" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de5e010da3c6a65d8f263d0f825a04d995ffc8a37f886f674fcbbc73bf158d01" -dependencies = [ - "parity-scale-codec", - "polkadot-primitives", - "sp-core 29.0.0", - "tracing-gum", -] - -[[package]] -name = "polkadot-system-emulated-network" -version = "1.0.0" +checksum = "1fa96d6d868243acc12de813dd48e756cbadcc8e13964c70d272753266deadc1" dependencies = [ - "asset-hub-polkadot-emulated-chain", - "bridge-hub-polkadot-emulated-chain", - "collectives-polkadot-emulated-chain", - "emulated-integration-tests-common", - "penpal-emulated-chain", - "people-polkadot-emulated-chain", - "polkadot-emulated-chain", + "log", ] [[package]] @@ -11373,6 +9963,9 @@ name = "polkavm-common" version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d9428a5cfcc85c5d7b9fc4b6a18c4b802d0173d768182a51cc7751640f08b92" +dependencies = [ + "log", +] [[package]] name = "polkavm-derive" @@ -11401,7 +9994,7 @@ dependencies = [ "polkavm-common 0.8.0", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.65", ] [[package]] @@ -11413,7 +10006,7 @@ dependencies = [ "polkavm-common 0.9.0", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.65", ] [[package]] @@ -11423,7 +10016,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "15e85319a0d5129dc9f021c62607e0804f5fb777a05cdda44d750ac0732def66" dependencies = [ "polkavm-derive-impl 0.8.0", - "syn 2.0.52", + "syn 2.0.65", ] [[package]] @@ -11433,9 +10026,30 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ba81f7b5faac81e528eb6158a6f3c9e0bb1008e0ffa19653bc8dea925ecb429" dependencies = [ "polkavm-derive-impl 0.9.0", - "syn 2.0.52", + "syn 2.0.65", ] +[[package]] +name = "polkavm-linker" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c7be503e60cf56c0eb785f90aaba4b583b36bff00e93997d93fef97f9553c39" +dependencies = [ + "gimli 0.28.1", + "hashbrown 0.14.3", + "log", + "object 0.32.2", + "polkavm-common 0.9.0", + "regalloc2 0.9.3", + "rustc-demangle", +] + +[[package]] +name = "polkavm-linux-raw" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26e85d3456948e650dff0cfc85603915847faf893ed1e66b020bb82ef4557120" + [[package]] name = "polling" version = "3.5.0" @@ -11505,6 +10119,16 @@ dependencies = [ "regex", ] +[[package]] +name = "predicates" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68b87bfd4605926cdfefc1c3b5f8fe560e3feca9d5552cf68c466d3d8236c7e8" +dependencies = [ + "anstyle", + "predicates-core", +] + [[package]] name = "predicates-core" version = "1.0.6" @@ -11538,7 +10162,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a41cf62165e97c7f814d2221421dbb9afcbcdb0a88068e5ea206e19951c2cbb5" dependencies = [ "proc-macro2", - "syn 2.0.52", + "syn 2.0.65", ] [[package]] @@ -11556,22 +10180,6 @@ dependencies = [ "uint", ] -[[package]] -name = "prioritized-metered-channel" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a172e6cc603231f2cf004232eabcecccc0da53ba576ab286ef7baa0cfc7927ad" -dependencies = [ - "coarsetime", - "crossbeam-queue", - "derive_more", - "futures", - "futures-timer", - "nanorand", - "thiserror", - "tracing", -] - [[package]] name = "proc-macro-crate" version = "1.3.1" @@ -11582,15 +10190,6 @@ dependencies = [ "toml_edit 0.19.15", ] -[[package]] -name = "proc-macro-crate" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e8366a6159044a37876a2b9817124296703c586a5c92e2c53751fa06d8d43e8" -dependencies = [ - "toml_edit 0.20.2", -] - [[package]] name = "proc-macro-crate" version = "3.1.0" @@ -11632,7 +10231,7 @@ checksum = "9b698b0b09d40e9b7c1a47b132d66a8b54bcd20583d9b6d06e4535e383b4405c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.65", ] [[package]] @@ -11678,7 +10277,7 @@ checksum = "440f724eba9f6996b75d63681b0a92b06947f1457076d503a4d2e2c8f56442b8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.65", ] [[package]] @@ -11692,7 +10291,7 @@ dependencies = [ "bitflags 2.4.1", "lazy_static", "num-traits", - "rand", + "rand 0.8.5", "rand_chacha 0.3.1", "rand_xorshift", "regex-syntax 0.8.2", @@ -11713,12 +10312,12 @@ dependencies = [ [[package]] name = "prost" -version = "0.12.3" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "146c289cda302b98a28d40c8b3b90498d6e526dd24ac2ecea73e4e491685b94a" +checksum = "deb1435c188b76130da55f17a466d252ff7b1418b2ad3e037d127b94e3411f29" dependencies = [ "bytes", - "prost-derive 0.12.3", + "prost-derive 0.12.6", ] [[package]] @@ -11728,7 +10327,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "119533552c9a7ffacc21e099c24a0ac8bb19c2a2a3f363de84cd9b844feab270" dependencies = [ "bytes", - "heck", + "heck 0.4.1", "itertools 0.10.5", "lazy_static", "log", @@ -11736,13 +10335,34 @@ dependencies = [ "petgraph", "prettyplease 0.1.25", "prost 0.11.9", - "prost-types", + "prost-types 0.11.9", "regex", "syn 1.0.109", "tempfile", "which", ] +[[package]] +name = "prost-build" +version = "0.12.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22505a5c94da8e3b7c2996394d1c933236c4d743e81a410bcca4e6989fc066a4" +dependencies = [ + "bytes", + "heck 0.4.1", + "itertools 0.12.1", + "log", + "multimap", + "once_cell", + "petgraph", + "prettyplease 0.2.16", + "prost 0.12.6", + "prost-types 0.12.6", + "regex", + "syn 2.0.65", + "tempfile", +] + [[package]] name = "prost-derive" version = "0.11.9" @@ -11758,15 +10378,15 @@ dependencies = [ [[package]] name = "prost-derive" -version = "0.12.3" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efb6c9a1dd1def8e2124d17e83a20af56f1570d6c2d2bd9e266ccb768df3840e" +checksum = "81bddcdb20abf9501610992b6759a4c888aef7d1a7247ef75e2404275ac24af1" dependencies = [ "anyhow", - "itertools 0.11.0", + "itertools 0.12.1", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.65", ] [[package]] @@ -11778,6 +10398,15 @@ dependencies = [ "prost 0.11.9", ] +[[package]] +name = "prost-types" +version = "0.12.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9091c90b0a32608e984ff2fa4091273cbdd755d54935c51d520887f4a1dbd5b0" +dependencies = [ + "prost 0.12.6", +] + [[package]] name = "psm" version = "0.1.21" @@ -11826,6 +10455,24 @@ dependencies = [ "pin-project-lite 0.1.12", ] +[[package]] +name = "quinn" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e8b432585672228923edbbf64b8b12c14e1112f62e88737655b4a083dbcd78e" +dependencies = [ + "bytes", + "pin-project-lite 0.2.13", + "quinn-proto", + "quinn-udp", + "rustc-hash", + "rustls 0.20.9", + "thiserror", + "tokio", + "tracing", + "webpki", +] + [[package]] name = "quinn-proto" version = "0.9.6" @@ -11833,7 +10480,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94b0b33c13a79f669c85defaf4c275dc86a0c0372807d0ca3d78e0bb87274863" dependencies = [ "bytes", - "rand", + "rand 0.8.5", "ring 0.16.20", "rustc-hash", "rustls 0.20.9", @@ -11844,6 +10491,19 @@ dependencies = [ "webpki", ] +[[package]] +name = "quinn-udp" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "641538578b21f5e5c8ea733b736895576d0fe329bb883b937db6f4d163dbaaf4" +dependencies = [ + "libc", + "quinn-proto", + "socket2 0.4.10", + "tracing", + "windows-sys 0.42.0", +] + [[package]] name = "quote" version = "1.0.35" @@ -11859,6 +10519,19 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" +[[package]] +name = "rand" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" +dependencies = [ + "getrandom 0.1.16", + "libc", + "rand_chacha 0.2.2", + "rand_core 0.5.1", + "rand_hc", +] + [[package]] name = "rand" version = "0.8.5" @@ -11915,16 +10588,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32cb0b9bc82b0a0876c2dd994a7e7a2683d3e7390ca40e6886785ef0c7e3ee31" dependencies = [ "num-traits", - "rand", + "rand 0.8.5", ] [[package]] -name = "rand_pcg" -version = "0.3.1" +name = "rand_hc" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59cad018caf63deb318e5a4586d99a24424a364f40f1e5778c29aca23f4fc73e" +checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" dependencies = [ - "rand_core 0.6.4", + "rand_core 0.5.1", ] [[package]] @@ -12003,18 +10676,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "reed-solomon-novelpoly" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87413ebb313323d431e85d0afc5a68222aaed972843537cbfe5f061cf1b4bcab" -dependencies = [ - "derive_more", - "fs-err", - "static_init", - "thiserror", -] - [[package]] name = "ref-cast" version = "1.0.20" @@ -12032,7 +10693,7 @@ checksum = "7f7473c2cfcf90008193dd0e3e16599455cb601a9fce322b5bb55de799664925" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.65", ] [[package]] @@ -12047,6 +10708,19 @@ dependencies = [ "smallvec", ] +[[package]] +name = "regalloc2" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad156d539c879b7a24a363a2016d77961786e71f48f2e2fc8302a92abd2429a6" +dependencies = [ + "hashbrown 0.13.2", + "log", + "rustc-hash", + "slice-group-by", + "smallvec", +] + [[package]] name = "regex" version = "1.10.4" @@ -12180,50 +10854,14 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "ripemd" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd124222d17ad93a644ed9d011a40f4fb64aa54275c08cc216524a9ea82fb09f" -dependencies = [ - "digest 0.10.7", -] - [[package]] name = "rlp" version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bb919243f34364b6bd2fc10ef797edbfa75f33c252e7998527479c6d6b47e1ec" dependencies = [ - "bytes", - "rustc-hex", -] - -[[package]] -name = "rocksdb" -version = "0.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb6f170a4041d50a0ce04b0d2e14916d6ca863ea2e422689a5b694395d299ffe" -dependencies = [ - "libc", - "librocksdb-sys", -] - -[[package]] -name = "route-recognizer" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afab94fb28594581f62d981211a9a4d53cc8130bbcbbb89a0440d9b8e81a7746" - -[[package]] -name = "rpassword" -version = "7.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80472be3c897911d0137b2d2b9055faf6eeac5b14e324073d83bc17b191d7e3f" -dependencies = [ - "libc", - "rtoolbox", - "windows-sys 0.48.0", + "bytes", + "rustc-hex", ] [[package]] @@ -12241,16 +10879,6 @@ dependencies = [ "tokio", ] -[[package]] -name = "rtoolbox" -version = "0.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c247d24e63230cdb56463ae328478bd5eac8b8faa8c69461a77e8e323afac90e" -dependencies = [ - "libc", - "windows-sys 0.48.0", -] - [[package]] name = "ruint" version = "1.12.0" @@ -12267,7 +10895,7 @@ dependencies = [ "parity-scale-codec", "primitive-types", "proptest", - "rand", + "rand 0.8.5", "rlp", "ruint-macro", "serde", @@ -12557,95 +11185,42 @@ dependencies = [ [[package]] name = "sc-allocator" -version = "24.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "357127c91373ed6d1ae582f6e3300ab5b13bcde43bbf270a891f44194ef48b70" -dependencies = [ - "log", - "sp-core 29.0.0", - "sp-wasm-interface", - "thiserror", -] - -[[package]] -name = "sc-authority-discovery" -version = "0.35.0" +version = "29.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fb3c14cb8022844835a6f7209196b8c6544d389fe5d2972d8df2ae4ca75afbe" +checksum = "b975ee3a95eaacb611e7b415737a7fa2db4d8ad7b880cc1b97371b04e95c7903" dependencies = [ - "async-trait", - "futures", - "futures-timer", - "ip_network", - "libp2p 0.51.4", "log", - "multihash 0.18.1", - "multihash-codetable", - "parity-scale-codec", - "prost 0.12.3", - "prost-build", - "rand", - "sc-client-api", - "sc-network", - "sp-api", - "sp-authority-discovery", - "sp-blockchain", - "sp-core 29.0.0", - "sp-keystore 0.35.0", - "sp-runtime 32.0.0", - "substrate-prometheus-endpoint", + "sp-core 34.0.0", + "sp-wasm-interface 21.0.0", "thiserror", ] -[[package]] -name = "sc-basic-authorship" -version = "0.35.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "724c3a6eee5f0829a1b79a15e12d63ed81b33281b14004a6331a8883b2fd8fd1" -dependencies = [ - "futures", - "futures-timer", - "log", - "parity-scale-codec", - "sc-block-builder", - "sc-proposer-metrics", - "sc-telemetry", - "sc-transaction-pool-api", - "sp-api", - "sp-blockchain", - "sp-consensus", - "sp-core 29.0.0", - "sp-inherents", - "sp-runtime 32.0.0", - "substrate-prometheus-endpoint", -] - [[package]] name = "sc-block-builder" -version = "0.34.0" +version = "0.40.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e8b0640994965c6ff3afa13242d95a61611b83da21fd86ac2b1ebd03e241a02" +checksum = "d6345fb862e10aaa7d88d6689a7c247448c40ae465253c83566dc76a17ec1426" dependencies = [ "parity-scale-codec", "sp-api", "sp-block-builder", "sp-blockchain", - "sp-core 29.0.0", + "sp-core 34.0.0", "sp-inherents", - "sp-runtime 32.0.0", - "sp-trie 30.0.0", + "sp-runtime 38.0.0", + "sp-trie 36.0.0", ] [[package]] name = "sc-chain-spec" -version = "28.0.0" +version = "34.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f73880050f8b04fed7f6301279ef3899df13a3891bd06156d56f9a1c50fefba" +checksum = "ae230af4bbf2f518da9fd2c710e2b1945011d993017ede3e0f816c6d825bb225" dependencies = [ - "array-bytes 6.2.2", + "array-bytes", "docify", "log", - "memmap2 0.9.4", + "memmap2", "parity-scale-codec", "sc-chain-spec-derive", "sc-client-api", @@ -12655,73 +11230,32 @@ dependencies = [ "serde", "serde_json", "sp-blockchain", - "sp-core 29.0.0", + "sp-core 34.0.0", "sp-crypto-hashing", "sp-genesis-builder", - "sp-io 31.0.0", - "sp-runtime 32.0.0", - "sp-state-machine 0.36.0", + "sp-io 37.0.0", + "sp-runtime 38.0.0", + "sp-state-machine 0.42.0", + "sp-tracing 17.0.0", ] [[package]] name = "sc-chain-spec-derive" -version = "11.0.0" +version = "12.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2e80fbdaea194762d4b4b0eec389037c25ad102676203b42d684774ae3019b8" +checksum = "b18cef11d2c69703e0d7c3528202ef4ed1cd2b47a6f063e9e17cad8255b1fa94" dependencies = [ "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.52", -] - -[[package]] -name = "sc-cli" -version = "0.37.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8a284c10ea92b1fe789b9f0e5815d393f3a1e3bf6a4adaa884f24e36143b83b" -dependencies = [ - "array-bytes 6.2.2", - "bip39", - "chrono", - "clap", - "fdlimit", - "futures", - "itertools 0.10.5", - "libp2p-identity 0.1.3", - "log", - "names", - "parity-scale-codec", - "rand", - "regex", - "rpassword", - "sc-client-api", - "sc-client-db", - "sc-keystore", - "sc-mixnet", - "sc-network", - "sc-service", - "sc-telemetry", - "sc-tracing", - "sc-utils", - "serde", - "serde_json", - "sp-blockchain", - "sp-core 29.0.0", - "sp-keyring", - "sp-keystore 0.35.0", - "sp-panic-handler", - "sp-runtime 32.0.0", - "sp-version", - "thiserror", - "tokio", + "syn 2.0.65", ] [[package]] name = "sc-client-api" -version = "29.0.0" +version = "35.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e914dfadaaf384d8869ae47f3ec783bf6a1ac24e7827f5fec2e0e649a450a91" +checksum = "5b1c4e71765e679439a7e5af3f92ad4ebdccc36c02ef485de604bb3dc5d98267" dependencies = [ "fnv", "futures", @@ -12734,209 +11268,51 @@ dependencies = [ "sp-api", "sp-blockchain", "sp-consensus", - "sp-core 29.0.0", + "sp-core 34.0.0", "sp-database", - "sp-externalities 0.26.0", - "sp-runtime 32.0.0", - "sp-state-machine 0.36.0", + "sp-externalities 0.29.0", + "sp-runtime 38.0.0", + "sp-state-machine 0.42.0", "sp-statement-store", - "sp-storage", - "sp-trie 30.0.0", + "sp-storage 21.0.0", + "sp-trie 36.0.0", "substrate-prometheus-endpoint", ] -[[package]] -name = "sc-client-db" -version = "0.36.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f08c4f29e6d2b8915bab6435b8817fa39ef7708c04a7cf6226f803e133b017c" -dependencies = [ - "hash-db", - "kvdb", - "kvdb-memorydb", - "kvdb-rocksdb", - "linked-hash-map", - "log", - "parity-db", - "parity-scale-codec", - "parking_lot 0.12.1", - "sc-client-api", - "sc-state-db", - "schnellru", - "sp-arithmetic 24.0.0", - "sp-blockchain", - "sp-core 29.0.0", - "sp-database", - "sp-runtime 32.0.0", - "sp-state-machine 0.36.0", - "sp-trie 30.0.0", -] - [[package]] name = "sc-consensus" -version = "0.34.0" +version = "0.40.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8e1ac2c698b828073982b6f5b1a466fcc345a452983356af74254ade8e9987d" +checksum = "5d7149e17ec363316391119f614ffb0da96284f4ed3aa1d67560687f627605b6" dependencies = [ "async-trait", "futures", "futures-timer", - "libp2p-identity 0.1.3", "log", - "mockall", + "mockall 0.11.4", "parking_lot 0.12.1", "sc-client-api", + "sc-network-types", "sc-utils", "serde", "sp-api", "sp-blockchain", "sp-consensus", - "sp-core 29.0.0", - "sp-runtime 32.0.0", - "sp-state-machine 0.36.0", - "substrate-prometheus-endpoint", - "thiserror", -] - -[[package]] -name = "sc-consensus-babe" -version = "0.35.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82ec3dc31f8fd024684d1306488836680558b680a8ec38219e19f20854811f02" -dependencies = [ - "async-trait", - "fork-tree", - "futures", - "log", - "num-bigint", - "num-rational", - "num-traits", - "parity-scale-codec", - "parking_lot 0.12.1", - "sc-client-api", - "sc-consensus", - "sc-consensus-epochs", - "sc-consensus-slots", - "sc-telemetry", - "sc-transaction-pool-api", - "sp-api", - "sp-application-crypto 31.0.0", - "sp-block-builder", - "sp-blockchain", - "sp-consensus", - "sp-consensus-babe", - "sp-consensus-slots", - "sp-core 29.0.0", - "sp-crypto-hashing", - "sp-inherents", - "sp-keystore 0.35.0", - "sp-runtime 32.0.0", - "substrate-prometheus-endpoint", - "thiserror", -] - -[[package]] -name = "sc-consensus-babe-rpc" -version = "0.35.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf2b3004672f9eea0d9af6c9b944fa3ef0bc72fd88cea9075cdf6dc96d1439ac" -dependencies = [ - "futures", - "jsonrpsee 0.20.3", - "sc-consensus-babe", - "sc-consensus-epochs", - "sc-rpc-api", - "serde", - "sp-api", - "sp-application-crypto 31.0.0", - "sp-blockchain", - "sp-consensus", - "sp-consensus-babe", - "sp-core 29.0.0", - "sp-keystore 0.35.0", - "sp-runtime 32.0.0", - "thiserror", -] - -[[package]] -name = "sc-consensus-beefy" -version = "14.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9ce3ee15eff7fa642791966d427f185184df3c7f4e58893705f3e7781da8ef5" -dependencies = [ - "array-bytes 6.2.2", - "async-channel 1.9.0", - "async-trait", - "fnv", - "futures", - "log", - "parity-scale-codec", - "parking_lot 0.12.1", - "sc-client-api", - "sc-consensus", - "sc-network", - "sc-network-gossip", - "sc-network-sync", - "sc-utils", - "sp-api", - "sp-application-crypto 31.0.0", - "sp-arithmetic 24.0.0", - "sp-blockchain", - "sp-consensus", - "sp-consensus-beefy", - "sp-core 29.0.0", - "sp-crypto-hashing", - "sp-keystore 0.35.0", - "sp-mmr-primitives", - "sp-runtime 32.0.0", + "sp-core 34.0.0", + "sp-runtime 38.0.0", + "sp-state-machine 0.42.0", "substrate-prometheus-endpoint", "thiserror", - "tokio", - "wasm-timer", -] - -[[package]] -name = "sc-consensus-beefy-rpc" -version = "14.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a1ed5e8ac2cb53c6a248c8f469353f55bd23c72f23fe371ac19c1d46618de1a" -dependencies = [ - "futures", - "jsonrpsee 0.20.3", - "log", - "parity-scale-codec", - "parking_lot 0.12.1", - "sc-consensus-beefy", - "sc-rpc", - "serde", - "sp-consensus-beefy", - "sp-core 29.0.0", - "sp-runtime 32.0.0", - "thiserror", -] - -[[package]] -name = "sc-consensus-epochs" -version = "0.34.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19f68ddb91626f901578515eed93c7919f739660161f4e9f7b9407e2d0ede981" -dependencies = [ - "fork-tree", - "parity-scale-codec", - "sc-client-api", - "sc-consensus", - "sp-blockchain", - "sp-runtime 32.0.0", ] [[package]] name = "sc-consensus-grandpa" -version = "0.20.0" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ae91e5b5a120be4d13a59eaf94fd85d7c7af528482b8e21d861fa1167df3083" +checksum = "3380570b0c27d2c26dd16a3c73ea99e8b87c0a91b4d7e1e7332dd501d0250d95" dependencies = [ "ahash 0.8.8", - "array-bytes 6.2.2", + "array-bytes", "async-trait", "dyn-clone", "finality-grandpa", @@ -12946,7 +11322,7 @@ dependencies = [ "log", "parity-scale-codec", "parking_lot 0.12.1", - "rand", + "rand 0.8.5", "sc-block-builder", "sc-chain-spec", "sc-client-api", @@ -12955,170 +11331,106 @@ dependencies = [ "sc-network-common", "sc-network-gossip", "sc-network-sync", + "sc-network-types", "sc-telemetry", "sc-transaction-pool-api", "sc-utils", "serde_json", "sp-api", - "sp-application-crypto 31.0.0", - "sp-arithmetic 24.0.0", + "sp-application-crypto 37.0.0", + "sp-arithmetic 26.0.0", "sp-blockchain", "sp-consensus", "sp-consensus-grandpa", - "sp-core 29.0.0", + "sp-core 34.0.0", "sp-crypto-hashing", - "sp-keystore 0.35.0", - "sp-runtime 32.0.0", + "sp-keystore 0.40.0", + "sp-runtime 38.0.0", "substrate-prometheus-endpoint", "thiserror", ] -[[package]] -name = "sc-consensus-grandpa-rpc" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "697cbd528516561dbc818a8990d5477169e86d9335a0b29207cf6f6a90269e7c" -dependencies = [ - "finality-grandpa", - "futures", - "jsonrpsee 0.20.3", - "log", - "parity-scale-codec", - "sc-client-api", - "sc-consensus-grandpa", - "sc-rpc", - "serde", - "sp-blockchain", - "sp-core 29.0.0", - "sp-runtime 32.0.0", - "thiserror", -] - -[[package]] -name = "sc-consensus-slots" -version = "0.34.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "567bddd65d52951fb9bc7a7e05d1dfdfc47ff2c594ec5ca9756d27e7226635bb" -dependencies = [ - "async-trait", - "futures", - "futures-timer", - "log", - "parity-scale-codec", - "sc-client-api", - "sc-consensus", - "sc-telemetry", - "sp-arithmetic 24.0.0", - "sp-blockchain", - "sp-consensus", - "sp-consensus-slots", - "sp-core 29.0.0", - "sp-inherents", - "sp-runtime 32.0.0", - "sp-state-machine 0.36.0", -] - [[package]] name = "sc-executor" -version = "0.33.0" +version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa2ac6c356538d67987bbb867e11a12a84ba87250c70fd50005b6d74f570a4f7" +checksum = "39f5767bf6a6bad29365d6d08fcf940ee453d31457ed034cf14f0392877daafd" dependencies = [ "parity-scale-codec", "parking_lot 0.12.1", "sc-executor-common", + "sc-executor-polkavm", "sc-executor-wasmtime", "schnellru", "sp-api", - "sp-core 29.0.0", - "sp-externalities 0.26.0", - "sp-io 31.0.0", + "sp-core 34.0.0", + "sp-externalities 0.29.0", + "sp-io 37.0.0", "sp-panic-handler", - "sp-runtime-interface 25.0.0", - "sp-trie 30.0.0", + "sp-runtime-interface 28.0.0", + "sp-trie 36.0.0", "sp-version", - "sp-wasm-interface", + "sp-wasm-interface 21.0.0", "tracing", ] [[package]] name = "sc-executor-common" -version = "0.30.0" +version = "0.35.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07498138dee3ddf2c71299ca372d8449880bb3a8a8a299a483094e9c26b0823e" +checksum = "0c3b703a33dcb7cddf19176fdf12294b9a6408125836b0f4afee3e6969e7f190" dependencies = [ + "polkavm", "sc-allocator", "sp-maybe-compressed-blob", - "sp-wasm-interface", + "sp-wasm-interface 21.0.0", "thiserror", "wasm-instrument", ] [[package]] -name = "sc-executor-wasmtime" -version = "0.30.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30a387779ab54ec1ffce0bf3a6631faada079459d42796c1895683767918a642" -dependencies = [ - "anyhow", - "cfg-if", - "libc", - "log", - "parking_lot 0.12.1", - "rustix 0.36.17", - "sc-allocator", - "sc-executor-common", - "sp-runtime-interface 25.0.0", - "sp-wasm-interface", - "wasmtime", -] - -[[package]] -name = "sc-informant" -version = "0.34.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb603a0a703f1bc10a4e6462bec1036d8fb8b3e3eff5513a9c07f98ccb8d662d" -dependencies = [ - "ansi_term", - "futures", - "futures-timer", - "log", - "sc-client-api", - "sc-network", - "sc-network-common", - "sc-network-sync", - "sp-blockchain", - "sp-runtime 32.0.0", +name = "sc-executor-polkavm" +version = "0.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26fe58d9cacfab73e5595fa84b80f7bd03efebe54a0574daaeb221a1d1f7ab80" +dependencies = [ + "log", + "polkavm", + "sc-executor-common", + "sp-wasm-interface 21.0.0", ] [[package]] -name = "sc-keystore" -version = "26.0.0" +name = "sc-executor-wasmtime" +version = "0.35.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cc4f6a558dd23e3bae2e9f195da822465258b9aaf211c34360d7f6efb944e54" +checksum = "8cd498f2f77ec1f861c30804f5bfd796d4afcc8ce44ea1f11bfbe2847551d161" dependencies = [ - "array-bytes 6.2.2", + "anyhow", + "cfg-if", + "libc", + "log", "parking_lot 0.12.1", - "serde_json", - "sp-application-crypto 31.0.0", - "sp-core 29.0.0", - "sp-keystore 0.35.0", - "thiserror", + "rustix 0.36.17", + "sc-allocator", + "sc-executor-common", + "sp-runtime-interface 28.0.0", + "sp-wasm-interface 21.0.0", + "wasmtime", ] [[package]] name = "sc-mixnet" -version = "0.5.0" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45fb213c15679fe5b87c383815d7fb758c70d3e7c573948bd7fe26ff344d2272" +checksum = "f7f295f4c06dfad60e8a5755a3866bb756bcd8208fa2f4d370c92fe2ec0de07c" dependencies = [ - "array-bytes 4.2.0", + "array-bytes", "arrayvec 0.7.4", "blake2 0.10.6", "bytes", "futures", "futures-timer", - "libp2p-identity 0.1.3", "log", "mixnet", "multiaddr 0.17.1", @@ -13126,27 +11438,29 @@ dependencies = [ "parking_lot 0.12.1", "sc-client-api", "sc-network", + "sc-network-types", "sc-transaction-pool-api", "sp-api", "sp-consensus", - "sp-core 29.0.0", - "sp-keystore 0.35.0", + "sp-core 34.0.0", + "sp-keystore 0.40.0", "sp-mixnet", - "sp-runtime 32.0.0", + "sp-runtime 38.0.0", "thiserror", ] [[package]] name = "sc-network" -version = "0.35.0" +version = "0.41.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f231c7d5e749ec428b4cfa669d759ae76cd3da4f50d7352a2d711acdc7532891" +checksum = "6dc1b9eea5954cd4cec2a13a264f5c54d2f43e155b4f1065eaf285fa602fce1c" dependencies = [ - "array-bytes 6.2.2", + "array-bytes", "async-channel 1.9.0", "async-trait", "asynchronous-codec", "bytes", + "cid 0.9.0", "either", "fnv", "futures", @@ -13154,76 +11468,63 @@ dependencies = [ "ip_network", "libp2p 0.51.4", "linked_hash_set", + "litep2p", "log", - "mockall", + "mockall 0.11.4", + "once_cell", "parity-scale-codec", "parking_lot 0.12.1", "partial_sort", "pin-project", - "rand", + "prost 0.12.6", + "prost-build 0.12.6", + "rand 0.8.5", "sc-client-api", "sc-network-common", + "sc-network-types", "sc-utils", + "schnellru", "serde", "serde_json", "smallvec", - "sp-arithmetic 24.0.0", + "sp-arithmetic 26.0.0", "sp-blockchain", - "sp-core 29.0.0", - "sp-runtime 32.0.0", + "sp-core 34.0.0", + "sp-runtime 38.0.0", "substrate-prometheus-endpoint", "thiserror", "tokio", "tokio-stream", "unsigned-varint", + "void", "wasm-timer", "zeroize", ] -[[package]] -name = "sc-network-bitswap" -version = "0.34.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2f89b0134738cb3d982b6e625ca93ae8dbe83ce2a06e4b6a396e4df09ed3499" -dependencies = [ - "async-channel 1.9.0", - "cid", - "futures", - "libp2p-identity 0.1.3", - "log", - "prost 0.12.3", - "prost-build", - "sc-client-api", - "sc-network", - "sp-blockchain", - "sp-runtime 32.0.0", - "thiserror", - "unsigned-varint", -] - [[package]] name = "sc-network-common" -version = "0.34.0" +version = "0.40.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3504bbff5ab016948dbab0f21a8be26324810b76eff3627ce744adb5bfc1b3ce" +checksum = "8a86e8a1a517986fd00fd2c963347f5f459241c2ae4e84083ca34b2078f79651" dependencies = [ "async-trait", "bitflags 1.3.2", "futures", "libp2p-identity 0.1.3", "parity-scale-codec", - "prost-build", + "prost-build 0.12.6", "sc-consensus", + "sc-network-types", "sp-consensus", "sp-consensus-grandpa", - "sp-runtime 32.0.0", + "sp-runtime 38.0.0", ] [[package]] name = "sc-network-gossip" -version = "0.35.0" +version = "0.41.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dad02cf809c34b53614fa61377e3289064edf6c78eb11df071d11fbf7546d7e9" +checksum = "17d8d4b7cc4eb58e9f1e73eb6ba84de8bb0101f14d5c688ae7bd5ff0535ed282" dependencies = [ "ahash 0.8.8", "futures", @@ -13233,41 +11534,20 @@ dependencies = [ "sc-network", "sc-network-common", "sc-network-sync", + "sc-network-types", "schnellru", - "sp-runtime 32.0.0", + "sp-runtime 38.0.0", "substrate-prometheus-endpoint", "tracing", ] -[[package]] -name = "sc-network-light" -version = "0.34.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38d84ef0b212c775f58e0304ec09166089f6b09afddf559b7c2b5702933b3be4" -dependencies = [ - "array-bytes 6.2.2", - "async-channel 1.9.0", - "futures", - "libp2p-identity 0.1.3", - "log", - "parity-scale-codec", - "prost 0.12.3", - "prost-build", - "sc-client-api", - "sc-network", - "sp-blockchain", - "sp-core 29.0.0", - "sp-runtime 32.0.0", - "thiserror", -] - [[package]] name = "sc-network-sync" -version = "0.34.0" +version = "0.40.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9aa9377059deece4e7d419d9ec456f657268c0c603e1cf98df4a920f6da83461" +checksum = "4599c3b68457fd150491074de9a3999030953bdc84a79780cb32e6a74c875be8" dependencies = [ - "array-bytes 6.2.2", + "array-bytes", "async-channel 1.9.0", "async-trait", "fork-tree", @@ -13275,409 +11555,94 @@ dependencies = [ "futures-timer", "libp2p 0.51.4", "log", - "mockall", + "mockall 0.11.4", "parity-scale-codec", - "prost 0.12.3", - "prost-build", + "prost 0.12.6", + "prost-build 0.12.6", "sc-client-api", "sc-consensus", "sc-network", "sc-network-common", + "sc-network-types", "sc-utils", "schnellru", "smallvec", - "sp-arithmetic 24.0.0", + "sp-arithmetic 26.0.0", "sp-blockchain", "sp-consensus", "sp-consensus-grandpa", - "sp-core 29.0.0", - "sp-runtime 32.0.0", - "substrate-prometheus-endpoint", - "thiserror", - "tokio", - "tokio-stream", -] - -[[package]] -name = "sc-network-transactions" -version = "0.34.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16c9cad4baf348725bd82eadcd1747fc112ec49c76b863755ce79c588fa73fe4" -dependencies = [ - "array-bytes 6.2.2", - "futures", - "libp2p 0.51.4", - "log", - "parity-scale-codec", - "sc-network", - "sc-network-common", - "sc-network-sync", - "sc-utils", - "sp-consensus", - "sp-runtime 32.0.0", - "substrate-prometheus-endpoint", -] - -[[package]] -name = "sc-offchain" -version = "30.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1aee89f2abd406356bfd688bd7a51155dc963259e4b752bb85d1f8a061a194fd" -dependencies = [ - "array-bytes 6.2.2", - "bytes", - "fnv", - "futures", - "futures-timer", - "hyper", - "hyper-rustls", - "libp2p 0.51.4", - "log", - "num_cpus", - "once_cell", - "parity-scale-codec", - "parking_lot 0.12.1", - "rand", - "sc-client-api", - "sc-network", - "sc-network-common", - "sc-transaction-pool-api", - "sc-utils", - "sp-api", - "sp-core 29.0.0", - "sp-externalities 0.26.0", - "sp-keystore 0.35.0", - "sp-offchain", - "sp-runtime 32.0.0", - "threadpool", - "tracing", -] - -[[package]] -name = "sc-proposer-metrics" -version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb8dadb2ae5a316e4d08cad6aacd5de1dec792f3bd94e3960795ff7ffd07211c" -dependencies = [ - "log", - "substrate-prometheus-endpoint", -] - -[[package]] -name = "sc-rpc" -version = "30.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a5acf6d89f062d1334a0c5b67e9dea97666cd47a49acb2696eab55ff1a1bf74" -dependencies = [ - "futures", - "jsonrpsee 0.20.3", - "log", - "parity-scale-codec", - "parking_lot 0.12.1", - "sc-block-builder", - "sc-chain-spec", - "sc-client-api", - "sc-mixnet", - "sc-rpc-api", - "sc-tracing", - "sc-transaction-pool-api", - "sc-utils", - "serde_json", - "sp-api", - "sp-blockchain", - "sp-core 29.0.0", - "sp-keystore 0.35.0", - "sp-offchain", - "sp-rpc", - "sp-runtime 32.0.0", - "sp-session", - "sp-statement-store", - "sp-version", - "tokio", -] - -[[package]] -name = "sc-rpc-api" -version = "0.34.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9db6aaabfa7e0c27ec15d0f0a11b994cd4bcf86e362f0d9732b4a414d793f0f" -dependencies = [ - "jsonrpsee 0.20.3", - "parity-scale-codec", - "sc-chain-spec", - "sc-mixnet", - "sc-transaction-pool-api", - "scale-info", - "serde", - "serde_json", - "sp-core 29.0.0", - "sp-rpc", - "sp-runtime 32.0.0", - "sp-version", - "thiserror", -] - -[[package]] -name = "sc-rpc-server" -version = "12.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "691440bbaddd3bc2675309c965cc75f8bf694f51e0a28039bfc9658299fbc394" -dependencies = [ - "http", - "jsonrpsee 0.20.3", - "log", - "serde_json", + "sp-core 34.0.0", + "sp-runtime 38.0.0", "substrate-prometheus-endpoint", - "tokio", - "tower", - "tower-http", -] - -[[package]] -name = "sc-rpc-spec-v2" -version = "0.35.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7f10275c62296a785f6e2ac716521e3b6e0fae470416fdf86491cbbfcc2e23d" -dependencies = [ - "array-bytes 6.2.2", - "futures", - "futures-util", - "hex", - "jsonrpsee 0.20.3", - "log", - "parity-scale-codec", - "parking_lot 0.12.1", - "sc-chain-spec", - "sc-client-api", - "sc-rpc", - "sc-transaction-pool-api", - "sc-utils", - "serde", - "sp-api", - "sp-blockchain", - "sp-core 29.0.0", - "sp-rpc", - "sp-runtime 32.0.0", - "sp-version", "thiserror", "tokio", "tokio-stream", ] [[package]] -name = "sc-service" -version = "0.36.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e14ea779b8c5bdb0d0199c8beebcf1fdc5641e468c480e1c4684be660c8c90af" -dependencies = [ - "async-trait", - "directories", - "exit-future", - "futures", - "futures-timer", - "jsonrpsee 0.20.3", - "log", - "parity-scale-codec", - "parking_lot 0.12.1", - "pin-project", - "rand", - "sc-chain-spec", - "sc-client-api", - "sc-client-db", - "sc-consensus", - "sc-executor", - "sc-informant", - "sc-keystore", - "sc-network", - "sc-network-bitswap", - "sc-network-common", - "sc-network-light", - "sc-network-sync", - "sc-network-transactions", - "sc-rpc", - "sc-rpc-server", - "sc-rpc-spec-v2", - "sc-sysinfo", - "sc-telemetry", - "sc-tracing", - "sc-transaction-pool", - "sc-transaction-pool-api", - "sc-utils", - "serde", - "serde_json", - "sp-api", - "sp-blockchain", - "sp-consensus", - "sp-core 29.0.0", - "sp-externalities 0.26.0", - "sp-keystore 0.35.0", - "sp-runtime 32.0.0", - "sp-session", - "sp-state-machine 0.36.0", - "sp-storage", - "sp-transaction-pool", - "sp-transaction-storage-proof", - "sp-trie 30.0.0", - "sp-version", - "static_init", - "substrate-prometheus-endpoint", - "tempfile", - "thiserror", - "tokio", - "tracing", - "tracing-futures", -] - -[[package]] -name = "sc-state-db" -version = "0.31.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa842052c41ad379eaecdfddc0d5c953d57e311ae688233f68f461b91d38da0a" -dependencies = [ - "log", - "parity-scale-codec", - "parking_lot 0.12.1", - "sp-core 29.0.0", -] - -[[package]] -name = "sc-sync-state-rpc" -version = "0.35.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bc382c7d997f4531eee5e5d57f970eaf2761d722298d7747385a4ad69fa6b12" -dependencies = [ - "jsonrpsee 0.20.3", - "parity-scale-codec", - "sc-chain-spec", - "sc-client-api", - "sc-consensus-babe", - "sc-consensus-epochs", - "sc-consensus-grandpa", - "serde", - "serde_json", - "sp-blockchain", - "sp-runtime 32.0.0", - "thiserror", -] - -[[package]] -name = "sc-sysinfo" -version = "28.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25d2ab8f15021916a07cfbe7a08be484c5dc7d57f07bc0e2aa03260b55a5632f" -dependencies = [ - "derive_more", - "futures", - "libc", - "log", - "rand", - "rand_pcg", - "regex", - "sc-telemetry", - "serde", - "serde_json", - "sp-core 29.0.0", - "sp-crypto-hashing", - "sp-io 31.0.0", - "sp-std", -] - -[[package]] -name = "sc-telemetry" -version = "16.0.0" +name = "sc-network-types" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0673a93aa0684b606abfc5fce6c882ada7bb5fad8a2ddc66a09a42bcc9664d91" +checksum = "efe67b8d4050c438331b82969d40e4a1e665d0dfd9eb0a5e949c02b925b5484d" dependencies = [ - "chrono", - "futures", - "libp2p 0.51.4", - "log", - "parking_lot 0.12.1", - "pin-project", - "rand", - "sc-utils", - "serde", - "serde_json", + "bs58 0.5.0", + "ed25519-dalek 2.1.0", + "libp2p-identity 0.1.3", + "litep2p", + "multiaddr 0.17.1", + "multihash 0.17.0", + "rand 0.8.5", "thiserror", - "wasm-timer", + "zeroize", ] [[package]] -name = "sc-tracing" -version = "29.0.0" +name = "sc-rpc-api" +version = "0.40.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e77b4fdb4f359f19c395ba862430f3ca0efb50b0310b09753caaa06997edd606" +checksum = "5e383ce9ec80c14694256a55a4e70b9929d4559d9b1fc5decf2d344c39d94208" dependencies = [ - "ansi_term", - "chrono", - "is-terminal", - "lazy_static", - "libc", - "log", + "jsonrpsee", "parity-scale-codec", - "parking_lot 0.12.1", - "regex", - "rustc-hash", - "sc-client-api", - "sc-tracing-proc-macro", + "sc-chain-spec", + "sc-mixnet", + "sc-transaction-pool-api", + "scale-info", "serde", - "sp-api", - "sp-blockchain", - "sp-core 29.0.0", + "serde_json", + "sp-core 34.0.0", "sp-rpc", - "sp-runtime 32.0.0", - "sp-tracing", + "sp-runtime 38.0.0", + "sp-version", "thiserror", - "tracing", - "tracing-log 0.1.4", - "tracing-subscriber 0.2.25", -] - -[[package]] -name = "sc-tracing-proc-macro" -version = "11.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "151cdf86d79abf22cf2a240a7ca95041c908dbd96c2ae9a818073042aa210964" -dependencies = [ - "proc-macro-crate 3.1.0", - "proc-macro2", - "quote", - "syn 2.0.52", ] [[package]] -name = "sc-transaction-pool" -version = "29.0.0" +name = "sc-telemetry" +version = "21.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "326dc8ea417c53b6787bd1bb27431d44768504451f5ce4efdde0c15877c7c121" +checksum = "85ee91de6648ca949b8080fe8a787c1bf2d66311fec78fba52136959e0b9719c" dependencies = [ - "async-trait", + "chrono", "futures", - "futures-timer", - "linked-hash-map", + "libp2p 0.51.4", "log", - "parity-scale-codec", "parking_lot 0.12.1", - "sc-client-api", - "sc-transaction-pool-api", + "pin-project", + "rand 0.8.5", + "sc-network", "sc-utils", "serde", - "sp-api", - "sp-blockchain", - "sp-core 29.0.0", - "sp-crypto-hashing", - "sp-runtime 32.0.0", - "sp-tracing", - "sp-transaction-pool", - "substrate-prometheus-endpoint", + "serde_json", "thiserror", + "wasm-timer", ] [[package]] name = "sc-transaction-pool-api" -version = "29.0.0" +version = "35.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93ae888ce3491acb1b489c3dba930d0c46c7ef9f9893ba0ab8af9125362f3d14" +checksum = "b3de6f60df6706970061e225e87d77aab9a764b258fe151b896a700419bc6b9d" dependencies = [ "async-trait", "futures", @@ -13685,16 +11650,16 @@ dependencies = [ "parity-scale-codec", "serde", "sp-blockchain", - "sp-core 29.0.0", - "sp-runtime 32.0.0", + "sp-core 34.0.0", + "sp-runtime 38.0.0", "thiserror", ] [[package]] name = "sc-utils" -version = "15.0.0" +version = "17.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28b1a238f5baa56405db4e440e2d2f697583736fa2e2f1aac345c438a42975f1" +checksum = "acf1bad736c230f16beb1cf48af9e69564df23b13aca9e5751a61266340b4bb5" dependencies = [ "async-channel 1.9.0", "futures", @@ -13703,7 +11668,7 @@ dependencies = [ "log", "parking_lot 0.12.1", "prometheus", - "sp-arithmetic 24.0.0", + "sp-arithmetic 26.0.0", ] [[package]] @@ -13847,7 +11812,7 @@ dependencies = [ "proc-macro2", "quote", "scale-info", - "syn 2.0.52", + "syn 2.0.65", "thiserror", ] @@ -13892,22 +11857,6 @@ dependencies = [ "hashbrown 0.13.2", ] -[[package]] -name = "schnorrkel" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "021b403afe70d81eea68f6ea12f6b3c9588e5d536a94c3bf80f15e7faa267862" -dependencies = [ - "arrayref", - "arrayvec 0.5.2", - "curve25519-dalek 2.1.3", - "merlin 2.0.1", - "rand_core 0.5.1", - "sha2 0.8.2", - "subtle 2.5.0", - "zeroize", -] - [[package]] name = "schnorrkel" version = "0.11.4" @@ -13919,7 +11868,7 @@ dependencies = [ "arrayvec 0.7.4", "curve25519-dalek 4.1.2", "getrandom_or_panic", - "merlin 3.0.0", + "merlin", "rand_core 0.6.4", "serde_bytes", "sha2 0.10.8", @@ -13949,6 +11898,21 @@ dependencies = [ "untrusted 0.9.0", ] +[[package]] +name = "sctp-proto" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6220f78bb44c15f326b0596113305f6101097a18755d53727a575c97e09fb24" +dependencies = [ + "bytes", + "crc", + "fxhash", + "log", + "rand 0.8.5", + "slab", + "thiserror", +] + [[package]] name = "sec1" version = "0.7.3" @@ -13964,15 +11928,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "seccompiler" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "345a3e4dddf721a478089d4697b83c6c0a8f5bf16086f6c13397e4534eb6e2e5" -dependencies = [ - "libc", -] - [[package]] name = "secp256k1" version = "0.28.2" @@ -14105,7 +12060,7 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f3a1a3341211875ef120e117ea7fd5228530ae7e7036a779fdc9117be6b3282c" dependencies = [ - "ordered-float 2.10.1", + "ordered-float", "serde", ] @@ -14126,7 +12081,7 @@ checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.65", ] [[package]] @@ -14197,6 +12152,18 @@ dependencies = [ "opaque-debug 0.3.0", ] +[[package]] +name = "sha-1" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f5058ada175748e33390e40e872bd0fe59a19f265d0158daa551c5a88a76009c" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest 0.10.7", + "sha1-asm", +] + [[package]] name = "sha1" version = "0.10.6" @@ -14209,15 +12176,12 @@ dependencies = [ ] [[package]] -name = "sha2" -version = "0.8.2" +name = "sha1-asm" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a256f46ea78a0c0d9ff00077504903ac881a1dafdc20da66545699e7776b3e69" +checksum = "286acebaf8b67c1130aedffad26f594eff0c1292389158135327d2e23aed582b" dependencies = [ - "block-buffer 0.7.3", - "digest 0.8.1", - "fake-simd", - "opaque-debug 0.2.3", + "cc", ] [[package]] @@ -14263,12 +12227,6 @@ dependencies = [ "lazy_static", ] -[[package]] -name = "shlex" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" - [[package]] name = "signal-hook-registry" version = "1.4.1" @@ -14278,6 +12236,12 @@ dependencies = [ "libc", ] +[[package]] +name = "signature" +version = "1.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" + [[package]] name = "signature" version = "2.2.0" @@ -14302,16 +12266,19 @@ dependencies = [ ] [[package]] -name = "simple-mermaid" -version = "0.1.1" +name = "simple-dns" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "620a1d43d70e142b1d46a929af51d44f383db9c7a2ec122de2cd992ccfcf3c18" +checksum = "cae9a3fcdadafb6d97f4c0e007e4247b114ee0f119f650c3cbf3a8b3a1479694" +dependencies = [ + "bitflags 2.4.1", +] [[package]] -name = "siphasher" -version = "0.3.11" +name = "simple-mermaid" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" +checksum = "620a1d43d70e142b1d46a929af51d44f383db9c7a2ec122de2cd992ccfcf3c18" [[package]] name = "siphasher" @@ -14336,31 +12303,22 @@ checksum = "826167069c09b99d56f31e9ae5c99049e932a98c9dc2dac47645b08dbbf76ba7" [[package]] name = "slot-range-helper" -version = "8.0.0" +version = "14.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d40fa5e14772407fd2ccffdd5971bf055bbf46a40727c0ea96d2bb6563d17e1c" +checksum = "a4d67aa9b1ccfd746c8529754c4ce06445b1d48e189567402ef856340a3a6b14" dependencies = [ "enumn", "parity-scale-codec", "paste", - "sp-runtime 32.0.0", + "sp-runtime 38.0.0", "sp-std", ] -[[package]] -name = "slotmap" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbff4acf519f630b3a3ddcfaea6c06b42174d9a44bc70c620e9ed1649d58b82a" -dependencies = [ - "version_check", -] - [[package]] name = "smallvec" -version = "1.13.1" +version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" [[package]] name = "smol" @@ -14407,24 +12365,24 @@ dependencies = [ "itertools 0.12.1", "libm", "libsecp256k1", - "merlin 3.0.0", + "merlin", "no-std-net", "nom", "num-bigint", "num-rational", "num-traits", - "pbkdf2 0.12.2", + "pbkdf2", "pin-project", "poly1305", - "rand", + "rand 0.8.5", "rand_chacha 0.3.1", "ruzstd", - "schnorrkel 0.11.4", + "schnorrkel", "serde", "serde_json", "sha2 0.10.8", "sha3", - "siphasher 1.0.1", + "siphasher", "slab", "smallvec", "soketto", @@ -14459,23 +12417,17 @@ dependencies = [ "no-std-net", "parking_lot 0.12.1", "pin-project", - "rand", + "rand 0.8.5", "rand_chacha 0.3.1", "serde", "serde_json", - "siphasher 1.0.1", + "siphasher", "slab", "smol", "smoldot", "zeroize", ] -[[package]] -name = "snap" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b6b67fb9a61334225b5b790716f609cd58395f895b3fe8b328786812a40bc3b" - [[package]] name = "snow" version = "0.9.4" @@ -14505,13 +12457,12 @@ dependencies = [ [[package]] name = "snowbridge-beacon-primitives" -version = "0.1.2" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5404af73550b39022e08e5500b30fba627e109a56407b7e80b08da2305b11bfe" +checksum = "6534a4c0a1b5b16003977498df47eba13431c18d11315cdde16675e619d4ed2a" dependencies = [ "byte-slice-cast", "frame-support", - "frame-system", "hex", "parity-scale-codec", "rlp", @@ -14519,20 +12470,19 @@ dependencies = [ "serde", "snowbridge-ethereum", "snowbridge-milagro-bls", - "sp-core 29.0.0", - "sp-io 31.0.0", - "sp-runtime 32.0.0", + "sp-core 34.0.0", + "sp-io 37.0.0", + "sp-runtime 38.0.0", "sp-std", "ssz_rs", "ssz_rs_derive", - "static_assertions", ] [[package]] name = "snowbridge-core" -version = "0.1.3" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aed4ebefed4c40b9c00e9adf5f02ab2760a7a2dad8bf05110c0013a7a59f4097" +checksum = "d118d73d30ad61271306cfb9cfd2f776779508858ede35500aabccff60651f64" dependencies = [ "ethabi-decode", "frame-support", @@ -14543,10 +12493,10 @@ dependencies = [ "scale-info", "serde", "snowbridge-beacon-primitives", - "sp-arithmetic 24.0.0", - "sp-core 29.0.0", - "sp-io 31.0.0", - "sp-runtime 32.0.0", + "sp-arithmetic 26.0.0", + "sp-core 34.0.0", + "sp-io 37.0.0", + "sp-runtime 38.0.0", "sp-std", "staging-xcm", "staging-xcm-builder", @@ -14554,9 +12504,9 @@ dependencies = [ [[package]] name = "snowbridge-ethereum" -version = "0.2.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "315ad74f081734cb51f48bb10cd18a3f83cfec3c09a551bc936027708635e808" +checksum = "1ef1f6f60f6c8cc3cdb2a829d7452de946d8707f63f70c6f714d1c52cbc0fc17" dependencies = [ "ethabi-decode", "ethbloom", @@ -14565,13 +12515,11 @@ dependencies = [ "parity-bytes", "parity-scale-codec", "rlp", - "rustc-hex", "scale-info", "serde", "serde-big-array", - "sp-core 29.0.0", - "sp-io 31.0.0", - "sp-runtime 32.0.0", + "sp-io 37.0.0", + "sp-runtime 38.0.0", "sp-std", ] @@ -14584,7 +12532,7 @@ dependencies = [ "hex", "lazy_static", "parity-scale-codec", - "rand", + "rand 0.8.5", "scale-info", "snowbridge-amcl", "zeroize", @@ -14592,40 +12540,36 @@ dependencies = [ [[package]] name = "snowbridge-outbound-queue-merkle-tree" -version = "0.2.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5382cf77aeb8a92a142751949cdea1f230b7864e1ea687352c28439faabcf69d" +checksum = "eece0e4a868674b3e48cfd7574c1e68a9f5bfd74fb67683f094dacee9abecf5b" dependencies = [ "parity-scale-codec", "scale-info", - "sp-core 29.0.0", - "sp-runtime 32.0.0", + "sp-core 34.0.0", + "sp-runtime 38.0.0", ] [[package]] name = "snowbridge-outbound-queue-runtime-api" -version = "0.1.1" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c822746dcdf13b2e98d5474b2257d86f04362435a6b9355abeaecd8bca6c2d9" +checksum = "8b52ffc85ffa4d58afb0997776ac407366c09e1471a114ce857a3506bc89ecd5" dependencies = [ "frame-support", "parity-scale-codec", "snowbridge-core", "snowbridge-outbound-queue-merkle-tree", "sp-api", - "sp-core 29.0.0", "sp-std", - "staging-xcm", ] [[package]] name = "snowbridge-pallet-ethereum-client" -version = "0.1.3" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06b0cddcf36990abadb88f2b2e0ad70b0b054cb7b99d3fb8ebeb8b240a360dee" +checksum = "7a9f974bdf94ade45c6fe5b09a197e48b9ccd17825830d21e0b8d20b4729a2f9" dependencies = [ - "bp-runtime", - "byte-slice-cast", "frame-benchmarking", "frame-support", "frame-system", @@ -14633,119 +12577,103 @@ dependencies = [ "log", "pallet-timestamp", "parity-scale-codec", - "rlp", "scale-info", "serde", "snowbridge-beacon-primitives", "snowbridge-core", "snowbridge-ethereum", "snowbridge-pallet-ethereum-client-fixtures", - "sp-core 29.0.0", - "sp-io 31.0.0", - "sp-runtime 32.0.0", + "sp-core 34.0.0", + "sp-io 37.0.0", + "sp-runtime 38.0.0", "sp-std", - "ssz_rs", - "ssz_rs_derive", "static_assertions", ] [[package]] name = "snowbridge-pallet-ethereum-client-fixtures" -version = "0.9.1" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08ec8b51ade2efa43052b6674e1767eddc33881937c22ebe9de3989776ab2e3a" +checksum = "ef95c9cff69443d39b9b4b04b2277fcd62317510d387172618ec467562ad594f" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", "hex-literal", "snowbridge-beacon-primitives", "snowbridge-core", - "sp-core 29.0.0", + "sp-core 34.0.0", "sp-std", ] [[package]] name = "snowbridge-pallet-inbound-queue" -version = "0.1.3" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc432a9022892842137975172ecf448662659b6774d734fedd487344183a1297" +checksum = "c4bd73b19ae8b7ff286f1bbd9fce57f5370d28e2fdf3da7b8d891a24101eea03" dependencies = [ "alloy-primitives", - "alloy-rlp", "alloy-sol-types", "frame-benchmarking", "frame-support", "frame-system", "hex-literal", "log", - "num-traits", "pallet-balances", "parity-scale-codec", "scale-info", "serde", "snowbridge-beacon-primitives", "snowbridge-core", - "snowbridge-ethereum", "snowbridge-pallet-inbound-queue-fixtures", "snowbridge-router-primitives", - "sp-core 29.0.0", - "sp-io 31.0.0", - "sp-runtime 32.0.0", + "sp-core 34.0.0", + "sp-io 37.0.0", + "sp-runtime 38.0.0", "sp-std", "staging-xcm", - "staging-xcm-builder", "staging-xcm-executor", ] [[package]] name = "snowbridge-pallet-inbound-queue-fixtures" -version = "0.9.1" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a807de65ca917735369a94d6d37390c325f29f6dabfbd738c0278e3db003829" +checksum = "e513d4b427ea7f3d9e644219bf990bca0fcb0643c566aa892ff4b4c88877c2f0" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", "hex-literal", "snowbridge-beacon-primitives", "snowbridge-core", - "sp-core 29.0.0", + "sp-core 34.0.0", "sp-std", ] [[package]] name = "snowbridge-pallet-outbound-queue" -version = "0.1.1" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3467d4c9f2eea9ef1b9a86e0ee811727bd373140b01a35216b5a02d54dd9108f" +checksum = "5c3b64edbfc4438c3200d429ad5835e6106af4ab43d7c9392ef571ee9c4f381e" dependencies = [ "bridge-hub-common", "ethabi-decode", "frame-benchmarking", "frame-support", "frame-system", - "hex-literal", "parity-scale-codec", "scale-info", "serde", "snowbridge-core", "snowbridge-outbound-queue-merkle-tree", - "sp-arithmetic 24.0.0", - "sp-core 29.0.0", - "sp-io 31.0.0", - "sp-runtime 32.0.0", + "sp-arithmetic 26.0.0", + "sp-core 34.0.0", + "sp-io 37.0.0", + "sp-runtime 38.0.0", "sp-std", - "staging-xcm", ] [[package]] name = "snowbridge-pallet-system" -version = "0.1.1" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "514249487076bff142a2a5b5ddc7bd2f51826247af39ef1a0e48ca0db48ccfc3" +checksum = "94333776d87827ffa381d557cb61b14d7a5aabd0fc842a4da37912e85deb09bf" dependencies = [ - "ethabi-decode", "frame-benchmarking", "frame-support", "frame-system", @@ -14753,51 +12681,45 @@ dependencies = [ "parity-scale-codec", "scale-info", "snowbridge-core", - "sp-core 29.0.0", - "sp-io 31.0.0", - "sp-runtime 32.0.0", + "sp-core 34.0.0", + "sp-io 37.0.0", + "sp-runtime 38.0.0", "sp-std", "staging-xcm", - "staging-xcm-builder", "staging-xcm-executor", ] [[package]] name = "snowbridge-router-primitives" -version = "0.1.0" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee5cc8e156f033971c5435676be92ab6f70a926b3497ca9c28c0dde9697b8da9" +checksum = "883ae82583071808e61981f0758d21daa3da54082dd05438eb420fdc02fa2124" dependencies = [ - "ethabi-decode", "frame-support", - "frame-system", "hex-literal", "log", "parity-scale-codec", "scale-info", - "serde", "snowbridge-core", - "sp-core 29.0.0", - "sp-io 31.0.0", - "sp-runtime 32.0.0", + "sp-core 34.0.0", + "sp-io 37.0.0", + "sp-runtime 38.0.0", "sp-std", "staging-xcm", - "staging-xcm-builder", "staging-xcm-executor", ] [[package]] name = "snowbridge-runtime-common" -version = "0.1.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d751007be1c9c68b075b0b1f9b02c25a02f458903a2c7893ba6e4231a00c24a" +checksum = "a933e8a33d57bdd4d8dd7cf518698f0d1312e7a1b498b1b5c8530c489e8a5400" dependencies = [ "frame-support", - "frame-system", "log", "parity-scale-codec", "snowbridge-core", - "sp-arithmetic 24.0.0", + "sp-arithmetic 26.0.0", "sp-std", "staging-xcm", "staging-xcm-builder", @@ -14806,90 +12728,45 @@ dependencies = [ [[package]] name = "snowbridge-runtime-test-common" -version = "0.1.2" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e01c27ca895778591488864880f4c6eb2ddbc1538c76bf688dbccaa4a5ca9316" +checksum = "792a7155e484b7314df7462543af7643a743a82ce8b51dcce5c9f21e565e757d" dependencies = [ - "assets-common", - "cumulus-pallet-aura-ext", "cumulus-pallet-parachain-system", - "cumulus-pallet-session-benchmarking", - "cumulus-pallet-xcm", - "cumulus-pallet-xcmp-queue", - "cumulus-primitives-core", - "cumulus-primitives-utility", - "frame-benchmarking", - "frame-executive", "frame-support", "frame-system", - "frame-system-benchmarking", - "frame-system-rpc-runtime-api", - "frame-try-runtime", - "hex-literal", - "log", - "pallet-aura", - "pallet-authorship", "pallet-balances", "pallet-collator-selection", "pallet-message-queue", - "pallet-multisig", "pallet-session", "pallet-timestamp", - "pallet-transaction-payment", - "pallet-transaction-payment-rpc-runtime-api", "pallet-utility", "pallet-xcm", - "pallet-xcm-benchmarks", - "parachains-common", "parachains-runtimes-test-utils", "parity-scale-codec", - "polkadot-core-primitives", - "polkadot-parachain-primitives", - "polkadot-runtime-common", - "scale-info", - "serde", - "smallvec", - "snowbridge-beacon-primitives", "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", - "snowbridge-router-primitives", - "snowbridge-system-runtime-api", - "sp-api", - "sp-block-builder", - "sp-consensus-aura", - "sp-core 29.0.0", - "sp-genesis-builder", - "sp-inherents", - "sp-io 31.0.0", + "sp-core 34.0.0", + "sp-io 37.0.0", "sp-keyring", - "sp-offchain", - "sp-runtime 32.0.0", - "sp-session", - "sp-std", - "sp-storage", - "sp-transaction-pool", - "sp-version", + "sp-runtime 38.0.0", "staging-parachain-info", "staging-xcm", - "staging-xcm-builder", "staging-xcm-executor", ] [[package]] name = "snowbridge-system-runtime-api" -version = "0.1.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c5c3c4e6e87b76ae1f9639bbc1528e1ae4e5a8d6a16d02d8d48e56d4a89f4ca" +checksum = "1781d85129dde596e9b66e5fe34477ae4394ed35e5d162354b19335af3a2eedb" dependencies = [ "parity-scale-codec", "snowbridge-core", "sp-api", - "sp-core 29.0.0", "sp-std", "staging-xcm", ] @@ -14924,83 +12801,83 @@ dependencies = [ "bytes", "flate2", "futures", - "http", "httparse", "log", - "rand", - "sha-1", + "rand 0.8.5", + "sha-1 0.9.8", ] [[package]] name = "sp-api" -version = "27.0.1" +version = "33.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e4f8702afd77f14a32733e2b589c02694bf79d0b3a641963c508016208724d0" +checksum = "b7e43fbf034e9dbaa8ffc6a238a22808777eb38c580f66fc6736d8511631789e" dependencies = [ "hash-db", "log", "parity-scale-codec", "scale-info", "sp-api-proc-macro", - "sp-core 29.0.0", - "sp-externalities 0.26.0", + "sp-core 34.0.0", + "sp-externalities 0.29.0", "sp-metadata-ir", - "sp-runtime 32.0.0", - "sp-state-machine 0.36.0", + "sp-runtime 38.0.0", + "sp-runtime-interface 28.0.0", + "sp-state-machine 0.42.0", "sp-std", - "sp-trie 30.0.0", + "sp-trie 36.0.0", "sp-version", "thiserror", ] [[package]] name = "sp-api-proc-macro" -version = "15.0.1" +version = "20.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0301e2f77afb450fbf2b093f8b324c7ad88cc82e5e69bd5dc8658a1f068b2a96" +checksum = "c9aadf9e97e694f0e343978aa632938c5de309cbcc8afed4136cb71596737278" dependencies = [ "Inflector", "blake2 0.10.6", - "expander 2.0.0", + "expander", "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.65", ] [[package]] name = "sp-application-crypto" -version = "31.0.0" +version = "33.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "547cad7a6eabb52c639ec117b3db9c6b43cf1b29a9393b18feb19e101a91833f" +checksum = "13ca6121c22c8bd3d1dce1f05c479101fd0d7b159bef2a3e8c834138d839c75c" dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-core 29.0.0", - "sp-io 31.0.0", + "sp-core 31.0.0", + "sp-io 33.0.0", "sp-std", ] [[package]] name = "sp-application-crypto" -version = "33.0.0" +version = "37.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13ca6121c22c8bd3d1dce1f05c479101fd0d7b159bef2a3e8c834138d839c75c" +checksum = "0d96d1fc0f1c741bbcbd0dd5470eff7b66f011708cc1942b088ebf0d4efb3d93" dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-core 31.0.0", - "sp-io 33.0.0", + "sp-core 34.0.0", + "sp-io 37.0.0", "sp-std", ] [[package]] name = "sp-arithmetic" -version = "24.0.0" +version = "25.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afa823ca5adc490d47dccb41d69ad482bc57a317bd341de275868378f48f131c" +checksum = "910c07fa263b20bf7271fdd4adcb5d3217dfdac14270592e0780223542e7e114" dependencies = [ "integer-sqrt", "num-traits", @@ -15013,10 +12890,11 @@ dependencies = [ [[package]] name = "sp-arithmetic" -version = "25.0.0" +version = "26.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "910c07fa263b20bf7271fdd4adcb5d3217dfdac14270592e0780223542e7e114" +checksum = "46d0d0a4c591c421d3231ddd5e27d828618c24456d51445d21a1f79fcee97c23" dependencies = [ + "docify", "integer-sqrt", "num-traits", "parity-scale-codec", @@ -15028,35 +12906,33 @@ dependencies = [ [[package]] name = "sp-authority-discovery" -version = "27.0.0" +version = "33.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c92b177c72b5d2973c36d60f6ef942d791d9fd91eae8b08c71882e4118d4fbfc" +checksum = "6a4a1e45abc3277f18484ee0b0f9808e4206eb696ad38500c892c72f33480d69" dependencies = [ "parity-scale-codec", "scale-info", "sp-api", - "sp-application-crypto 31.0.0", - "sp-runtime 32.0.0", - "sp-std", + "sp-application-crypto 37.0.0", + "sp-runtime 38.0.0", ] [[package]] name = "sp-block-builder" -version = "27.0.0" +version = "33.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b36ce171caa7eb2bbe682c089f755fdefa71d3702e4fb1ba30d10146aef99d5" +checksum = "2cf199dc4f9f77abd3fd91c409759118159ce6ffcd8bc90b229b684ccc8c981f" dependencies = [ "sp-api", "sp-inherents", - "sp-runtime 32.0.0", - "sp-std", + "sp-runtime 38.0.0", ] [[package]] name = "sp-blockchain" -version = "29.0.0" +version = "35.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a31303e766d2e53812641bbc1f1cec03a85793fc9e627e55f0a6854b28708758" +checksum = "a85f5a7dff5979c1c4830cdf9d6e7fcd21ce7582440adf6bc9c95de672dde848" dependencies = [ "futures", "log", @@ -15066,91 +12942,89 @@ dependencies = [ "sp-api", "sp-consensus", "sp-database", - "sp-runtime 32.0.0", - "sp-state-machine 0.36.0", + "sp-runtime 38.0.0", + "sp-state-machine 0.42.0", "thiserror", ] [[package]] name = "sp-consensus" -version = "0.33.0" +version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb6e512b862c4ff7a26cdcd364898cc42e181ff5cb35fbb226ff27d88c81569a" +checksum = "3376b89c6f4f0d2029cbc029643f1670f79dc018485f8da270e2813b3a81fd77" dependencies = [ "async-trait", "futures", "log", - "sp-core 29.0.0", + "sp-core 34.0.0", "sp-inherents", - "sp-runtime 32.0.0", - "sp-state-machine 0.36.0", + "sp-runtime 38.0.0", + "sp-state-machine 0.42.0", "thiserror", ] [[package]] name = "sp-consensus-aura" -version = "0.33.0" +version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bf13c293685319751f72fa5216c7fb5f25f3e8e8fe29b4503296ed5f5466b3d" +checksum = "05ebb90bf00f331b898eb729a1f707251846c1d5582d7467f083884799a69b89" dependencies = [ "async-trait", "parity-scale-codec", "scale-info", "sp-api", - "sp-application-crypto 31.0.0", + "sp-application-crypto 37.0.0", "sp-consensus-slots", "sp-inherents", - "sp-runtime 32.0.0", - "sp-std", + "sp-runtime 38.0.0", "sp-timestamp", ] [[package]] name = "sp-consensus-babe" -version = "0.33.0" +version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9be2f86a2f0ce2a78b455feb547aa27604fd76a7f7a691995cbad44e0b1b9dd" +checksum = "3aa2de4c7100a3279658d8dd4affd8f92487528deae5cb4b40322717b9175ed5" dependencies = [ "async-trait", "parity-scale-codec", "scale-info", "serde", "sp-api", - "sp-application-crypto 31.0.0", + "sp-application-crypto 37.0.0", "sp-consensus-slots", - "sp-core 29.0.0", + "sp-core 34.0.0", "sp-inherents", - "sp-runtime 32.0.0", - "sp-std", + "sp-runtime 38.0.0", "sp-timestamp", ] [[package]] name = "sp-consensus-beefy" -version = "14.0.0" +version = "20.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90ff890a84ef57628b010df0e1d75b3a78fb7f575e4ceeba7215c276902c403e" +checksum = "b277bc109da8e1c3768d3a046e1cd1ab687aabac821c976c5f510deb6f0bc8d3" dependencies = [ "lazy_static", "parity-scale-codec", "scale-info", "serde", "sp-api", - "sp-application-crypto 31.0.0", - "sp-core 29.0.0", + "sp-application-crypto 37.0.0", + "sp-core 34.0.0", "sp-crypto-hashing", - "sp-io 31.0.0", + "sp-io 37.0.0", + "sp-keystore 0.40.0", "sp-mmr-primitives", - "sp-runtime 32.0.0", - "sp-std", - "strum 0.24.1", + "sp-runtime 38.0.0", + "strum 0.26.3", ] [[package]] name = "sp-consensus-grandpa" -version = "14.0.0" +version = "20.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64b606164600db36e596db7abf32b4533dc9a74526d9444c4c45035427b2199b" +checksum = "21dd06bf366c60f69411668b26d6ab3c55120aa6d423e6af0373ec23d8957300" dependencies = [ "finality-grandpa", "log", @@ -15158,34 +13032,31 @@ dependencies = [ "scale-info", "serde", "sp-api", - "sp-application-crypto 31.0.0", - "sp-core 29.0.0", - "sp-keystore 0.35.0", - "sp-runtime 32.0.0", - "sp-std", + "sp-application-crypto 37.0.0", + "sp-core 34.0.0", + "sp-keystore 0.40.0", + "sp-runtime 38.0.0", ] [[package]] name = "sp-consensus-slots" -version = "0.33.0" +version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73a5bd1fcd84bbdc7255528c7cdb92f9357fd555f06ee553af7e340cbdab517c" +checksum = "c8ca60d713f8ddb03bbebcc755d5e6463fdc0b6259fabfc4221b20a5f1e428fd" dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-std", "sp-timestamp", ] [[package]] name = "sp-core" -version = "29.0.0" +version = "31.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c33c7a1568175250628567d50c4e1c54a6ac5bc1190413b9be29a9e810cbe73" +checksum = "26d7a0fd8f16dcc3761198fc83be12872f823b37b749bc72a3a6a1f702509366" dependencies = [ - "array-bytes 6.2.2", - "bip39", + "array-bytes", "bitflags 1.3.2", "blake2 0.10.6", "bounded-collections", @@ -15197,27 +13068,29 @@ dependencies = [ "hash256-std-hasher", "impl-serde", "itertools 0.10.5", + "k256", "libsecp256k1", "log", - "merlin 3.0.0", + "merlin", + "parity-bip39", "parity-scale-codec", "parking_lot 0.12.1", "paste", "primitive-types", - "rand", + "rand 0.8.5", "scale-info", - "schnorrkel 0.11.4", + "schnorrkel", "secp256k1", "secrecy", "serde", "sp-crypto-hashing", "sp-debug-derive", - "sp-externalities 0.26.0", - "sp-runtime-interface 25.0.0", + "sp-externalities 0.27.0", + "sp-runtime-interface 26.0.0", "sp-std", - "sp-storage", + "sp-storage 20.0.0", "ss58-registry", - "substrate-bip39 0.4.5", + "substrate-bip39 0.5.0", "thiserror", "tracing", "w3f-bls", @@ -15226,45 +13099,45 @@ dependencies = [ [[package]] name = "sp-core" -version = "31.0.0" +version = "34.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26d7a0fd8f16dcc3761198fc83be12872f823b37b749bc72a3a6a1f702509366" +checksum = "c961a5e33fb2962fa775c044ceba43df9c6f917e2c35d63bfe23738468fa76a7" dependencies = [ - "array-bytes 6.2.2", + "array-bytes", "bitflags 1.3.2", "blake2 0.10.6", "bounded-collections", "bs58 0.5.0", "dyn-clonable", - "ed25519-zebra 3.1.0", + "ed25519-zebra 4.0.3", "futures", "hash-db", "hash256-std-hasher", "impl-serde", - "itertools 0.10.5", + "itertools 0.11.0", "k256", "libsecp256k1", "log", - "merlin 3.0.0", + "merlin", "parity-bip39", "parity-scale-codec", "parking_lot 0.12.1", "paste", "primitive-types", - "rand", + "rand 0.8.5", "scale-info", - "schnorrkel 0.11.4", + "schnorrkel", "secp256k1", "secrecy", "serde", "sp-crypto-hashing", "sp-debug-derive", - "sp-externalities 0.27.0", - "sp-runtime-interface 26.0.0", + "sp-externalities 0.29.0", + "sp-runtime-interface 28.0.0", "sp-std", - "sp-storage", + "sp-storage 21.0.0", "ss58-registry", - "substrate-bip39 0.5.0", + "substrate-bip39 0.6.0", "thiserror", "tracing", "w3f-bls", @@ -15293,7 +13166,7 @@ checksum = "b85d0f1f1e44bd8617eb2a48203ee854981229e3e79e6f468c7175d5fd37489b" dependencies = [ "quote", "sp-crypto-hashing", - "syn 2.0.52", + "syn 2.0.65", ] [[package]] @@ -15314,147 +13187,146 @@ checksum = "48d09fa0a5f7299fb81ee25ae3853d26200f7a348148aed6de76be905c007dbe" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.65", ] [[package]] name = "sp-externalities" -version = "0.26.0" +version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7096ed024cec397804864898b093b51e14c7299f1d00c67dd5800330e02bb82" +checksum = "a1d6a4572eadd4a63cff92509a210bf425501a0c5e76574b30a366ac77653787" dependencies = [ "environmental", "parity-scale-codec", "sp-std", - "sp-storage", + "sp-storage 20.0.0", ] [[package]] name = "sp-externalities" -version = "0.27.0" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1d6a4572eadd4a63cff92509a210bf425501a0c5e76574b30a366ac77653787" +checksum = "a904407d61cb94228c71b55a9d3708e9d6558991f9e83bd42bd91df37a159d30" dependencies = [ "environmental", "parity-scale-codec", - "sp-std", - "sp-storage", + "sp-storage 21.0.0", ] [[package]] name = "sp-genesis-builder" -version = "0.8.0" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd865540ec19479c7349b584ccd78cc34c3f3a628a2a69dbb6365ceec36295ee" +checksum = "fcd065854d96fd81521c103d0aaa287d4f08b9b15c9fae2a3bfb208b0812bf44" dependencies = [ + "parity-scale-codec", + "scale-info", "serde_json", "sp-api", - "sp-runtime 32.0.0", - "sp-std", + "sp-runtime 38.0.0", ] [[package]] name = "sp-inherents" -version = "27.0.0" +version = "33.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "607c9e35e96966645ff180a9e9f976433b96e905d0a91d8d5315e605a21f4bc0" +checksum = "53407ba38ec22ca4a16381722c4bd0b559a0428bc1713079b0d5163ada63186a" dependencies = [ "async-trait", "impl-trait-for-tuples", "parity-scale-codec", "scale-info", - "sp-runtime 32.0.0", - "sp-std", + "sp-runtime 38.0.0", "thiserror", ] [[package]] name = "sp-io" -version = "31.0.0" +version = "33.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec43aa073eab35fcb920d7592474d5427ea3be2bf938706a3ad955d7ba54fd8d" +checksum = "3e09bba780b55bd9e67979cd8f654a31e4a6cf45426ff371394a65953d2177f2" dependencies = [ "bytes", - "ed25519-dalek", + "ed25519-dalek 2.1.0", "libsecp256k1", "log", "parity-scale-codec", + "polkavm-derive 0.9.1", "rustversion", "secp256k1", - "sp-core 29.0.0", + "sp-core 31.0.0", "sp-crypto-hashing", - "sp-externalities 0.26.0", - "sp-keystore 0.35.0", - "sp-runtime-interface 25.0.0", - "sp-state-machine 0.36.0", + "sp-externalities 0.27.0", + "sp-keystore 0.37.0", + "sp-runtime-interface 26.0.0", + "sp-state-machine 0.38.0", "sp-std", - "sp-tracing", - "sp-trie 30.0.0", + "sp-tracing 16.0.0", + "sp-trie 32.0.0", "tracing", "tracing-core", ] [[package]] name = "sp-io" -version = "33.0.0" +version = "37.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e09bba780b55bd9e67979cd8f654a31e4a6cf45426ff371394a65953d2177f2" +checksum = "5036cad2e48d41f5caf6785226c8be1a7db15bec14a9fd7aa6cca84f34cf689f" dependencies = [ "bytes", - "ed25519-dalek", + "ed25519-dalek 2.1.0", "libsecp256k1", "log", "parity-scale-codec", "polkavm-derive 0.9.1", "rustversion", "secp256k1", - "sp-core 31.0.0", + "sp-core 34.0.0", "sp-crypto-hashing", - "sp-externalities 0.27.0", - "sp-keystore 0.37.0", - "sp-runtime-interface 26.0.0", - "sp-state-machine 0.38.0", + "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", - "sp-trie 32.0.0", + "sp-tracing 17.0.0", + "sp-trie 36.0.0", "tracing", "tracing-core", ] [[package]] name = "sp-keyring" -version = "32.0.0" +version = "38.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69cf0a2f881958466fc92bc9b39bbc2c0d815ded4a21f8f953372b0ac2e11b02" +checksum = "b03536e1ff3ec2bd8181eeaa26c0d682ebdcbd01548a055cf591077188b8c3f0" dependencies = [ - "sp-core 29.0.0", - "sp-runtime 32.0.0", - "strum 0.24.1", + "sp-core 34.0.0", + "sp-runtime 38.0.0", + "strum 0.26.3", ] [[package]] name = "sp-keystore" -version = "0.35.0" +version = "0.37.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "444f2d53968b1ce5e908882710ff1f3873fcf3e95f59d57432daf685bbacb959" +checksum = "bdbab8b61bd61d5f8625a0c75753b5d5a23be55d3445419acd42caf59cf6236b" dependencies = [ "parity-scale-codec", "parking_lot 0.12.1", - "sp-core 29.0.0", - "sp-externalities 0.26.0", - "thiserror", + "sp-core 31.0.0", + "sp-externalities 0.27.0", ] [[package]] name = "sp-keystore" -version = "0.37.0" +version = "0.40.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdbab8b61bd61d5f8625a0c75753b5d5a23be55d3445419acd42caf59cf6236b" +checksum = "0248b4d784cb4a01472276928977121fa39d977a5bb24793b6b15e64b046df42" dependencies = [ "parity-scale-codec", "parking_lot 0.12.1", - "sp-core 31.0.0", - "sp-externalities 0.27.0", + "sp-core 34.0.0", + "sp-externalities 0.29.0", ] [[package]] @@ -15469,72 +13341,68 @@ dependencies = [ [[package]] name = "sp-metadata-ir" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa0b5e87e56c1bb26d9524d48dd127121d630f895bd5914a34f0b017489f7c1d" +checksum = "a616fa51350b35326682a472ee8e6ba742fdacb18babac38ecd46b3e05ead869" dependencies = [ "frame-metadata 16.0.0", "parity-scale-codec", "scale-info", - "sp-std", ] [[package]] name = "sp-mixnet" -version = "0.5.0" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7bebd44b915c65aeb7e7eeaea466aba3b27cdd915c83ea83d4643c54f21ffbbf" +checksum = "2f65a570519da820ce3dc35053497a65f9fbd3f5a7dc81fa03078ca263e9311e" dependencies = [ "parity-scale-codec", "scale-info", "sp-api", - "sp-application-crypto 31.0.0", - "sp-std", + "sp-application-crypto 37.0.0", ] [[package]] name = "sp-mmr-primitives" -version = "27.0.0" +version = "33.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "891b7263b7c44a569173ee1078f68fb1a01991a44914607c0100aa5ae41f6562" +checksum = "47412a2d2e988430d5f59d7fec1473f229e1ef5ce24c1ea4f601b4b3679cac52" dependencies = [ - "ckb-merkle-mountain-range", "log", "parity-scale-codec", + "polkadot-ckb-merkle-mountain-range", "scale-info", "serde", "sp-api", - "sp-core 29.0.0", + "sp-core 34.0.0", "sp-debug-derive", - "sp-runtime 32.0.0", - "sp-std", + "sp-runtime 38.0.0", "thiserror", ] [[package]] name = "sp-npos-elections" -version = "27.0.0" +version = "33.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "195d7e1154c91cce5c3abc8c778689c3e5799da6411328dd32ac7a974c68e526" +checksum = "0b0c51a7b60cd663f2661e6949069eb316b092f22c239691d5272a4d0cfca0fb" dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-arithmetic 24.0.0", - "sp-core 29.0.0", - "sp-runtime 32.0.0", - "sp-std", + "sp-arithmetic 26.0.0", + "sp-core 34.0.0", + "sp-runtime 38.0.0", ] [[package]] name = "sp-offchain" -version = "27.0.0" +version = "33.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d83b955dce0b6d143bec3f60571311168f362b1c16cf044da7037a407b66c19" +checksum = "cbe721c367760bddf10fcfa24fb48edd64c442f71db971f043c8ac73f51aa6e9" dependencies = [ "sp-api", - "sp-core 29.0.0", - "sp-runtime 32.0.0", + "sp-core 34.0.0", + "sp-runtime 38.0.0", ] [[package]] @@ -15550,20 +13418,20 @@ dependencies = [ [[package]] name = "sp-rpc" -version = "27.0.0" +version = "32.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9af4b73fe7ddd88b1641cca90048c4e525e721763199e6fd29c4f590884f4d16" +checksum = "45458f0955870a92b3969098d4f1f4e9b55b4282d9f1dc112a51bb5bb6584900" dependencies = [ "rustc-hash", "serde", - "sp-core 29.0.0", + "sp-core 34.0.0", ] [[package]] name = "sp-runtime" -version = "32.0.0" +version = "34.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a95e71603a6281e91b0f1fd3d68057644be16d75a4602013187b8137db8abee" +checksum = "ec3cb126971e7db2f0fcf8053dce740684c438c7180cfca1959598230f342c58" dependencies = [ "docify", "either", @@ -15572,96 +13440,84 @@ dependencies = [ "log", "parity-scale-codec", "paste", - "rand", + "rand 0.8.5", "scale-info", "serde", "simple-mermaid", - "sp-application-crypto 31.0.0", - "sp-arithmetic 24.0.0", - "sp-core 29.0.0", - "sp-io 31.0.0", + "sp-application-crypto 33.0.0", + "sp-arithmetic 25.0.0", + "sp-core 31.0.0", + "sp-io 33.0.0", "sp-std", - "sp-weights 28.0.0", + "sp-weights 30.0.0", ] [[package]] name = "sp-runtime" -version = "34.0.0" +version = "38.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec3cb126971e7db2f0fcf8053dce740684c438c7180cfca1959598230f342c58" +checksum = "89ef409c414546b655ec1e94aaea178e4a97e21284a91b24c762aebf836d3b49" dependencies = [ "docify", "either", "hash256-std-hasher", "impl-trait-for-tuples", "log", + "num-traits", "parity-scale-codec", "paste", - "rand", + "rand 0.8.5", "scale-info", "serde", "simple-mermaid", - "sp-application-crypto 33.0.0", - "sp-arithmetic 25.0.0", - "sp-core 31.0.0", - "sp-io 33.0.0", + "sp-application-crypto 37.0.0", + "sp-arithmetic 26.0.0", + "sp-core 34.0.0", + "sp-io 37.0.0", "sp-std", - "sp-weights 30.0.0", + "sp-weights 31.0.0", ] [[package]] name = "sp-runtime-interface" -version = "25.0.0" +version = "26.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e2321ab29d4bcc31f1ba1b4f076a81fb2a666465231e5c981c72320d74dbe63" +checksum = "e48a675ea4858333d4d755899ed5ed780174aa34fec15953428d516af5452295" dependencies = [ "bytes", "impl-trait-for-tuples", "parity-scale-codec", + "polkavm-derive 0.8.0", "primitive-types", - "sp-externalities 0.26.0", - "sp-runtime-interface-proc-macro 17.0.0", + "sp-externalities 0.27.0", + "sp-runtime-interface-proc-macro", "sp-std", - "sp-storage", - "sp-tracing", - "sp-wasm-interface", + "sp-storage 20.0.0", + "sp-tracing 16.0.0", + "sp-wasm-interface 20.0.0", "static_assertions", ] [[package]] name = "sp-runtime-interface" -version = "26.0.0" +version = "28.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e48a675ea4858333d4d755899ed5ed780174aa34fec15953428d516af5452295" +checksum = "985eb981f40c689c6a0012c937b68ed58dabb4341d06f2dfe4dfd5ed72fa4017" dependencies = [ "bytes", "impl-trait-for-tuples", "parity-scale-codec", - "polkavm-derive 0.8.0", + "polkavm-derive 0.9.1", "primitive-types", - "sp-externalities 0.27.0", - "sp-runtime-interface-proc-macro 18.0.0", + "sp-externalities 0.29.0", + "sp-runtime-interface-proc-macro", "sp-std", - "sp-storage", - "sp-tracing", - "sp-wasm-interface", + "sp-storage 21.0.0", + "sp-tracing 17.0.0", + "sp-wasm-interface 21.0.0", "static_assertions", ] -[[package]] -name = "sp-runtime-interface-proc-macro" -version = "17.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfaf6e85b2ec12a4b99cd6d8d57d083e30c94b7f1b0d8f93547121495aae6f0c" -dependencies = [ - "Inflector", - "expander 2.0.0", - "proc-macro-crate 3.1.0", - "proc-macro2", - "quote", - "syn 2.0.52", -] - [[package]] name = "sp-runtime-interface-proc-macro" version = "18.0.0" @@ -15669,110 +13525,106 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0195f32c628fee3ce1dfbbf2e7e52a30ea85f3589da9fe62a8b816d70fc06294" dependencies = [ "Inflector", - "expander 2.0.0", + "expander", "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.65", ] [[package]] name = "sp-session" -version = "28.0.0" +version = "34.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b86531090cc04d2ab3535df07146258e2fb3ab6257b0a77ef14aa08282c3d4a" +checksum = "4daf2e40ffc7e7e8de08efb860eb9534faf614a49c53dc282f430faedb4aed13" dependencies = [ "parity-scale-codec", "scale-info", "sp-api", - "sp-core 29.0.0", - "sp-keystore 0.35.0", - "sp-runtime 32.0.0", + "sp-core 34.0.0", + "sp-keystore 0.40.0", + "sp-runtime 38.0.0", "sp-staking", - "sp-std", ] [[package]] name = "sp-staking" -version = "27.0.0" +version = "33.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e14d003ecf0b610bf1305a92bdab875289b39d514c073f30e75e78c2763a788" +checksum = "0a0b7abfe66c07a3b6eb99e1286dfa9b6f3b057b0e986e7da2ccbf707f6c781a" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", "scale-info", "serde", - "sp-core 29.0.0", - "sp-runtime 32.0.0", - "sp-std", + "sp-core 34.0.0", + "sp-runtime 38.0.0", ] [[package]] name = "sp-state-machine" -version = "0.36.0" +version = "0.38.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a67297e702aa32027d7766803f362a420d6d3ec9e2f84961f3c64e2e52b5aaf9" +checksum = "1eae0eac8034ba14437e772366336f579398a46d101de13dbb781ab1e35e67c5" dependencies = [ "hash-db", "log", "parity-scale-codec", "parking_lot 0.12.1", - "rand", + "rand 0.8.5", "smallvec", - "sp-core 29.0.0", - "sp-externalities 0.26.0", + "sp-core 31.0.0", + "sp-externalities 0.27.0", "sp-panic-handler", "sp-std", - "sp-trie 30.0.0", + "sp-trie 32.0.0", "thiserror", "tracing", - "trie-db", + "trie-db 0.28.0", ] [[package]] name = "sp-state-machine" -version = "0.38.0" +version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1eae0eac8034ba14437e772366336f579398a46d101de13dbb781ab1e35e67c5" +checksum = "211e528aa6e902261a343f7b40840aa3d66fe4ad3aadbd04a035f10baf96dbc5" dependencies = [ "hash-db", "log", "parity-scale-codec", "parking_lot 0.12.1", - "rand", + "rand 0.8.5", "smallvec", - "sp-core 31.0.0", - "sp-externalities 0.27.0", + "sp-core 34.0.0", + "sp-externalities 0.29.0", "sp-panic-handler", - "sp-std", - "sp-trie 32.0.0", + "sp-trie 36.0.0", "thiserror", "tracing", - "trie-db", + "trie-db 0.29.1", ] [[package]] name = "sp-statement-store" -version = "11.0.0" +version = "17.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "309a9ae4e8134bbed8ffc510cf4d461a4a651f9250b556de782cedd876abe1ff" +checksum = "b03aa86b1b46549889d32348bc85a8135c725665115567507231a6d85712aaac" dependencies = [ "aes-gcm", "curve25519-dalek 4.1.2", - "ed25519-dalek", + "ed25519-dalek 2.1.0", "hkdf", "parity-scale-codec", - "rand", + "rand 0.8.5", "scale-info", "sha2 0.10.8", "sp-api", - "sp-application-crypto 31.0.0", - "sp-core 29.0.0", + "sp-application-crypto 37.0.0", + "sp-core 34.0.0", "sp-crypto-hashing", - "sp-externalities 0.26.0", - "sp-runtime 32.0.0", - "sp-runtime-interface 25.0.0", - "sp-std", + "sp-externalities 0.29.0", + "sp-runtime 38.0.0", + "sp-runtime-interface 28.0.0", "thiserror", "x25519-dalek 2.0.0", ] @@ -15797,17 +13649,29 @@ dependencies = [ "sp-std", ] +[[package]] +name = "sp-storage" +version = "21.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99c82989b3a4979a7e1ad848aad9f5d0b4388f1f454cc131766526601ab9e8f8" +dependencies = [ + "impl-serde", + "parity-scale-codec", + "ref-cast", + "serde", + "sp-debug-derive", +] + [[package]] name = "sp-timestamp" -version = "27.0.0" +version = "33.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "249cd06624f2edb53b25af528ab216a508dc9d0870e158b43caac3a97e86699f" +checksum = "78becf144a76f6fd108dfe94a90e20a185b38c0b310dc5482328196143c8266b" dependencies = [ "async-trait", "parity-scale-codec", "sp-inherents", - "sp-runtime 32.0.0", - "sp-std", + "sp-runtime 38.0.0", "thiserror", ] @@ -15825,36 +13689,32 @@ dependencies = [ ] [[package]] -name = "sp-transaction-pool" -version = "27.0.0" +name = "sp-tracing" +version = "17.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9742861c5330bdcb42856a6eed3d3745b58ee1c92ca4c9260032ff4e6c387165" +checksum = "90b3decf116db9f1dfaf1f1597096b043d0e12c952d3bcdc018c6d6b77deec7e" dependencies = [ - "sp-api", - "sp-runtime 32.0.0", + "parity-scale-codec", + "tracing", + "tracing-core", + "tracing-subscriber 0.2.25", ] [[package]] -name = "sp-transaction-storage-proof" -version = "27.0.0" +name = "sp-transaction-pool" +version = "33.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ece8e22a5419c7a336a2544654e1389fec8cac19b93081a30912842b44e8167f" +checksum = "a3c9d1604aadc15b70e95f4388d0b1aa380215520b7ddfd372531a6d8262269c" dependencies = [ - "async-trait", - "parity-scale-codec", - "scale-info", - "sp-core 29.0.0", - "sp-inherents", - "sp-runtime 32.0.0", - "sp-std", - "sp-trie 30.0.0", + "sp-api", + "sp-runtime 38.0.0", ] [[package]] name = "sp-trie" -version = "30.0.0" +version = "32.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eed48dfd05081e8b36741b10ce4eb686c135a2952227a11fe71caec89890ddbb" +checksum = "f1aa91ad26c62b93d73e65f9ce7ebd04459c4bad086599348846a81988d6faa4" dependencies = [ "ahash 0.8.8", "hash-db", @@ -15863,23 +13723,23 @@ dependencies = [ "nohash-hasher", "parity-scale-codec", "parking_lot 0.12.1", - "rand", + "rand 0.8.5", "scale-info", "schnellru", - "sp-core 29.0.0", - "sp-externalities 0.26.0", + "sp-core 31.0.0", + "sp-externalities 0.27.0", "sp-std", "thiserror", "tracing", - "trie-db", + "trie-db 0.28.0", "trie-root", ] [[package]] name = "sp-trie" -version = "32.0.0" +version = "36.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1aa91ad26c62b93d73e65f9ce7ebd04459c4bad086599348846a81988d6faa4" +checksum = "841d717c0f465f5371569e6fdc25b6f32d47c15d6e4c92b3b779e1c9b18b951d" dependencies = [ "ahash 0.8.8", "hash-db", @@ -15888,23 +13748,22 @@ dependencies = [ "nohash-hasher", "parity-scale-codec", "parking_lot 0.12.1", - "rand", + "rand 0.8.5", "scale-info", "schnellru", - "sp-core 31.0.0", - "sp-externalities 0.27.0", - "sp-std", + "sp-core 34.0.0", + "sp-externalities 0.29.0", "thiserror", "tracing", - "trie-db", + "trie-db 0.29.1", "trie-root", ] [[package]] name = "sp-version" -version = "30.0.0" +version = "36.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff4a660c68995663d6778df324f4e2b4efc48d55a8e9c92c22a5fb7dae7899cd" +checksum = "bccf96fefae339dee7c4453f91be64eb28cce4c2fe82130445cf096b18b2c081" dependencies = [ "impl-serde", "parity-scale-codec", @@ -15912,7 +13771,7 @@ dependencies = [ "scale-info", "serde", "sp-crypto-hashing-proc-macro", - "sp-runtime 32.0.0", + "sp-runtime 38.0.0", "sp-std", "sp-version-proc-macro", "thiserror", @@ -15920,14 +13779,14 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" -version = "13.0.0" +version = "14.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9bc3fed32d6dacbbbfb28dd1fe0224affbb737cb6cbfca1d9149351c2b69a7d" +checksum = "5aee8f6730641a65fcf0c8f9b1e448af4b3bb083d08058b47528188bccc7b7a7" dependencies = [ "parity-scale-codec", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.65", ] [[package]] @@ -15944,36 +13803,48 @@ dependencies = [ "wasmtime", ] +[[package]] +name = "sp-wasm-interface" +version = "21.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b04b919e150b4736d85089d49327eab65507deb1485eec929af69daa2278eb3" +dependencies = [ + "anyhow", + "impl-trait-for-tuples", + "log", + "parity-scale-codec", + "wasmtime", +] + [[package]] name = "sp-weights" -version = "28.0.0" +version = "30.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3be30aec904994451dcacf841a9168cfbbaf817de6b24b6a1c1418cbf1af2fe" +checksum = "9af6c661fe3066b29f9e1d258000f402ff5cc2529a9191972d214e5871d0ba87" dependencies = [ "bounded-collections", "parity-scale-codec", "scale-info", "serde", "smallvec", - "sp-arithmetic 24.0.0", + "sp-arithmetic 25.0.0", "sp-debug-derive", "sp-std", ] [[package]] name = "sp-weights" -version = "30.0.0" +version = "31.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9af6c661fe3066b29f9e1d258000f402ff5cc2529a9191972d214e5871d0ba87" +checksum = "93cdaf72a1dad537bbb130ba4d47307ebe5170405280ed1aa31fa712718a400e" dependencies = [ "bounded-collections", "parity-scale-codec", "scale-info", "serde", "smallvec", - "sp-arithmetic 25.0.0", + "sp-arithmetic 26.0.0", "sp-debug-derive", - "sp-std", ] [[package]] @@ -16124,28 +13995,28 @@ dependencies = [ "separator", "serde_json", "sp-api", - "sp-application-crypto 31.0.0", - "sp-arithmetic 24.0.0", + "sp-application-crypto 37.0.0", + "sp-arithmetic 26.0.0", "sp-authority-discovery", "sp-block-builder", "sp-consensus-babe", "sp-consensus-beefy", - "sp-core 29.0.0", + "sp-core 34.0.0", "sp-debug-derive", "sp-genesis-builder", "sp-inherents", - "sp-io 31.0.0", + "sp-io 37.0.0", "sp-keyring", "sp-npos-elections", "sp-offchain", - "sp-runtime 32.0.0", + "sp-runtime 38.0.0", "sp-session", "sp-staking", "sp-std", - "sp-storage", - "sp-tracing", + "sp-storage 21.0.0", + "sp-tracing 17.0.0", "sp-transaction-pool", - "sp-trie 30.0.0", + "sp-trie 36.0.0", "sp-version", "staging-xcm", "staging-xcm-builder", @@ -16156,26 +14027,26 @@ dependencies = [ [[package]] name = "staging-parachain-info" -version = "0.8.0" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da7dc139d104f676a18c13380a09c3f72d59450a7471116387cbf8cb5f845a0e" +checksum = "7eab4e71683cd8ceb50c1c77badc49772148699ffe33a3e4dbbdb5ea34d90e19" dependencies = [ "cumulus-primitives-core", "frame-support", "frame-system", "parity-scale-codec", "scale-info", - "sp-runtime 32.0.0", + "sp-runtime 38.0.0", "sp-std", ] [[package]] name = "staging-xcm" -version = "8.0.1" +version = "14.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48fa328b87de3466bc38cc9a07244c42c647b7755b81115e1dfeb47cc13fc6e6" +checksum = "0ec2833832f84bc6dccd89f3a61d09f33441043a5f84ea688ca53c886956213a" dependencies = [ - "array-bytes 6.2.2", + "array-bytes", "bounded-collections", "derivative", "environmental", @@ -16184,15 +14055,15 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-weights 28.0.0", + "sp-weights 31.0.0", "xcm-procedural", ] [[package]] name = "staging-xcm-builder" -version = "8.0.3" +version = "14.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78b7447c38be3ca9fb21c7434de2243aa6ac74acde8944cda7bb6e2a4f765801" +checksum = "b0517f2de0dd59ecc2693c0cb707ac30cee3d6576978b7287a4c3c9791b7792f" dependencies = [ "frame-support", "frame-system", @@ -16202,20 +14073,20 @@ dependencies = [ "parity-scale-codec", "polkadot-parachain-primitives", "scale-info", - "sp-arithmetic 24.0.0", - "sp-io 31.0.0", - "sp-runtime 32.0.0", + "sp-arithmetic 26.0.0", + "sp-io 37.0.0", + "sp-runtime 38.0.0", "sp-std", - "sp-weights 28.0.0", + "sp-weights 31.0.0", "staging-xcm", "staging-xcm-executor", ] [[package]] name = "staging-xcm-executor" -version = "8.0.2" +version = "14.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74b5c5f2a1d610c5e20e5fae2680c9a28380f305afafeed62f341bfbce57b79a" +checksum = "7a5b83ea34a2ba2083c6f5bfec468fb00535d0e0788a78237d06da32dba76be9" dependencies = [ "environmental", "frame-benchmarking", @@ -16224,60 +14095,39 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-arithmetic 24.0.0", - "sp-core 29.0.0", - "sp-io 31.0.0", - "sp-runtime 32.0.0", + "sp-arithmetic 26.0.0", + "sp-core 34.0.0", + "sp-io 37.0.0", + "sp-runtime 38.0.0", "sp-std", - "sp-weights 28.0.0", + "sp-weights 31.0.0", "staging-xcm", ] -[[package]] -name = "static_assertions" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" - -[[package]] -name = "static_init" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a2a1c578e98c1c16fc3b8ec1328f7659a500737d7a0c6d625e73e830ff9c1f6" -dependencies = [ - "bitflags 1.3.2", - "cfg_aliases", - "libc", - "parking_lot 0.11.2", - "parking_lot_core 0.8.6", - "static_init_macro", - "winapi", -] - -[[package]] -name = "static_init_macro" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70a2595fc3aa78f2d0e45dd425b22282dd863273761cc77780914b2cf3003acf" -dependencies = [ - "cfg_aliases", - "memchr", - "proc-macro2", - "quote", - "syn 1.0.109", -] +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] -name = "strobe-rs" -version = "0.8.1" +name = "str0m" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fabb238a1cccccfa4c4fb703670c0d157e1256c1ba695abf1b93bd2bb14bab2d" +checksum = "6706347e49b13373f7ddfafad47df7583ed52083d6fc8a594eb2c80497ef959d" dependencies = [ - "bitflags 1.3.2", - "byteorder", - "keccak", - "subtle 2.5.0", - "zeroize", + "combine", + "crc", + "fastrand", + "hmac 0.12.1", + "once_cell", + "openssl", + "openssl-sys", + "sctp-proto", + "serde", + "sha-1 0.10.1", + "thiserror", + "tracing", ] [[package]] @@ -16303,9 +14153,12 @@ dependencies = [ [[package]] name = "strum" -version = "0.25.0" +version = "0.26.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290d54ea6f91c969195bdbcd7442c8c2a2ba87da8bf60a7ee86a235d4bc1e125" +checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06" +dependencies = [ + "strum_macros 0.26.4", +] [[package]] name = "strum_macros" @@ -16313,7 +14166,7 @@ version = "0.24.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e385be0d24f186b4ce2f9982191e7101bb737312ad61c1f2f984f34bcf85d59" dependencies = [ - "heck", + "heck 0.4.1", "proc-macro2", "quote", "rustversion", @@ -16322,39 +14175,39 @@ dependencies = [ [[package]] name = "strum_macros" -version = "0.25.3" +version = "0.26.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23dc1fa9ac9c169a78ba62f0b841814b7abae11bdd047b9c58f893439e309ea0" +checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be" dependencies = [ - "heck", + "heck 0.5.0", "proc-macro2", "quote", "rustversion", - "syn 2.0.52", + "syn 2.0.65", ] [[package]] name = "substrate-bip39" -version = "0.4.5" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e620c7098893ba667438b47169c00aacdd9e7c10e042250ce2b60b087ec97328" +checksum = "a2b564c293e6194e8b222e52436bcb99f60de72043c7f845cf6c4406db4df121" dependencies = [ - "hmac 0.11.0", - "pbkdf2 0.8.0", - "schnorrkel 0.9.1", - "sha2 0.9.9", + "hmac 0.12.1", + "pbkdf2", + "schnorrkel", + "sha2 0.10.8", "zeroize", ] [[package]] name = "substrate-bip39" -version = "0.5.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2b564c293e6194e8b222e52436bcb99f60de72043c7f845cf6c4406db4df121" +checksum = "ca58ffd742f693dc13d69bdbb2e642ae239e0053f6aab3b104252892f856700a" dependencies = [ "hmac 0.12.1", - "pbkdf2 0.12.2", - "schnorrkel 0.11.4", + "pbkdf2", + "schnorrkel", "sha2 0.10.8", "zeroize", ] @@ -16371,26 +14224,6 @@ dependencies = [ "substrate-typenum", ] -[[package]] -name = "substrate-frame-rpc-system" -version = "29.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "332f903d2f34703204f0003136c9abbc569d691028279996a1daf8f248a7369f" -dependencies = [ - "frame-system-rpc-runtime-api", - "futures", - "jsonrpsee 0.20.3", - "log", - "parity-scale-codec", - "sc-rpc-api", - "sc-transaction-pool-api", - "sp-api", - "sp-block-builder", - "sp-blockchain", - "sp-core 29.0.0", - "sp-runtime 32.0.0", -] - [[package]] name = "substrate-geohash" version = "0.13.0" @@ -16417,34 +14250,16 @@ dependencies = [ [[package]] name = "substrate-rpc-client" -version = "0.34.0" +version = "0.40.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40e5235d8460ec81e9a382345aa80d75e2943f224a332559847344bb62fa13b3" +checksum = "e595aa4ad93c8902270fd7540f7626430cc911aa26b55607802f1e58e10890cb" dependencies = [ "async-trait", - "jsonrpsee 0.20.3", + "jsonrpsee", "log", "sc-rpc-api", "serde", - "sp-runtime 32.0.0", -] - -[[package]] -name = "substrate-state-trie-migration-rpc" -version = "28.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5768a5d3c76eebfdf94c23a3fde6c832243a043d60561e5ac1a2b475b9ad09f3" -dependencies = [ - "jsonrpsee 0.20.3", - "parity-scale-codec", - "sc-client-api", - "sc-rpc-api", - "serde", - "sp-core 29.0.0", - "sp-runtime 32.0.0", - "sp-state-machine 0.36.0", - "sp-trie 30.0.0", - "trie-db", + "sp-runtime 38.0.0", ] [[package]] @@ -16459,11 +14274,11 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" -version = "18.0.1" +version = "23.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a39a20e17c24ede36b5bd5e7543a4cef8d8a0daf6e1a046dc31832b837a54a0" +checksum = "7dc993ad871b63fbba60362f3ea86583f5e7e1256e8fdcb3b5b249c9ead354bf" dependencies = [ - "array-bytes 6.2.2", + "array-bytes", "build-helper", "cargo_metadata", "console", @@ -16472,13 +14287,14 @@ dependencies = [ "merkleized-metadata", "parity-scale-codec", "parity-wasm", + "polkavm-linker", "sc-executor", - "sp-core 29.0.0", - "sp-io 31.0.0", + "sp-core 34.0.0", + "sp-io 37.0.0", "sp-maybe-compressed-blob", - "sp-tracing", + "sp-tracing 17.0.0", "sp-version", - "strum 0.24.1", + "strum 0.26.3", "tempfile", "toml 0.8.10", "walkdir", @@ -16513,7 +14329,7 @@ dependencies = [ "hex", "impl-serde", "instant", - "jsonrpsee 0.22.5", + "jsonrpsee", "parity-scale-codec", "primitive-types", "scale-bits 0.5.0", @@ -16542,16 +14358,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d9e2b256b71d31a2629e44eb9cbfd944eb7d577c9e0c8e9802cc3c3943af2d9" dependencies = [ "frame-metadata 16.0.0", - "heck", + "heck 0.4.1", "hex", - "jsonrpsee 0.22.5", + "jsonrpsee", "parity-scale-codec", "proc-macro2", "quote", "scale-info", "scale-typegen", "subxt-metadata", - "syn 2.0.52", + "syn 2.0.65", "thiserror", "tokio", ] @@ -16585,7 +14401,7 @@ dependencies = [ "quote", "scale-typegen", "subxt-codegen", - "syn 2.0.52", + "syn 2.0.65", ] [[package]] @@ -16614,9 +14430,9 @@ dependencies = [ "hex", "hmac 0.12.1", "parity-scale-codec", - "pbkdf2 0.12.2", + "pbkdf2", "regex", - "schnorrkel 0.11.4", + "schnorrkel", "secp256k1", "secrecy", "sha2 0.10.8", @@ -16638,9 +14454,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.52" +version = "2.0.65" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b699d15b36d1f02c3e7c69f8ffef53de37aefae075d8488d4ba1a7788d574a07" +checksum = "d2863d96a84c6439701d7a38f9de935ec562c8832cc55d1dde0f513b52fad106" dependencies = [ "proc-macro2", "quote", @@ -16656,7 +14472,7 @@ dependencies = [ "paste", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.65", ] [[package]] @@ -16709,7 +14525,7 @@ dependencies = [ "polkadot-primitives", "polkadot-runtime-constants", "smallvec", - "sp-runtime 32.0.0", + "sp-runtime 38.0.0", ] [[package]] @@ -16757,16 +14573,6 @@ dependencies = [ "winapi-util", ] -[[package]] -name = "terminal_size" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21bebf2b7c9e0a515f6e0f8c51dc0f8e4696391e6f1ff30379559f8365fb0df7" -dependencies = [ - "rustix 0.38.31", - "windows-sys 0.48.0", -] - [[package]] name = "termtree" version = "0.4.1" @@ -16790,15 +14596,9 @@ checksum = "e2470041c06ec3ac1ab38d0356a6119054dedaea53e12fbefc0de730a1c08524" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.65", ] -[[package]] -name = "thousands" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3bf63baf9f5039dadc247375c29eb13706706cfde997d0330d05aa63a77d8820" - [[package]] name = "thread_local" version = "1.1.7" @@ -16809,49 +14609,6 @@ dependencies = [ "once_cell", ] -[[package]] -name = "threadpool" -version = "1.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d050e60b33d41c19108b32cea32164033a9013fe3b46cbd4457559bfbf77afaa" -dependencies = [ - "num_cpus", -] - -[[package]] -name = "thrift" -version = "0.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b82ca8f46f95b3ce96081fe3dd89160fdea970c254bb72925255d1b62aae692e" -dependencies = [ - "byteorder", - "integer-encoding", - "log", - "ordered-float 1.1.1", - "threadpool", -] - -[[package]] -name = "tikv-jemalloc-ctl" -version = "0.5.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "619bfed27d807b54f7f776b9430d4f8060e66ee138a28632ca898584d462c31c" -dependencies = [ - "libc", - "paste", - "tikv-jemalloc-sys", -] - -[[package]] -name = "tikv-jemalloc-sys" -version = "0.5.4+5.3.0-patched" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9402443cb8fd499b6f327e40565234ff34dbda27460c5b47db0db77443dd85d1" -dependencies = [ - "cc", - "libc", -] - [[package]] name = "time" version = "0.3.30" @@ -16942,7 +14699,7 @@ checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.65", ] [[package]] @@ -16962,7 +14719,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f57eb36ecbe0fc510036adff84824dd3c24bb781e21bfa67b69d556aa85214f" dependencies = [ "pin-project", - "rand", + "rand 0.8.5", "tokio", ] @@ -16996,7 +14753,6 @@ dependencies = [ "futures-core", "pin-project-lite 0.2.13", "tokio", - "tokio-util", ] [[package]] @@ -17007,15 +14763,18 @@ checksum = "212d5dcb2a1ce06d81107c3d0ffa3121fe974b73f068c8282cb1c32328113b6c" dependencies = [ "futures-util", "log", + "rustls 0.21.10", + "rustls-native-certs 0.6.3", "tokio", + "tokio-rustls 0.24.1", "tungstenite", ] [[package]] name = "tokio-util" -version = "0.7.10" +version = "0.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" +checksum = "9cf6b47b3771c49ac75ad09a6162f53ad4b8088b76ac60e8ec1455b31a189fe1" dependencies = [ "bytes", "futures-core", @@ -17024,7 +14783,6 @@ dependencies = [ "pin-project-lite 0.2.13", "slab", "tokio", - "tracing", ] [[package]] @@ -17082,17 +14840,6 @@ dependencies = [ "winnow 0.5.33", ] -[[package]] -name = "toml_edit" -version = "0.20.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" -dependencies = [ - "indexmap 2.2.6", - "toml_datetime", - "winnow 0.5.33", -] - [[package]] name = "toml_edit" version = "0.21.0" @@ -17187,7 +14934,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.65", ] [[package]] @@ -17200,41 +14947,6 @@ dependencies = [ "valuable", ] -[[package]] -name = "tracing-futures" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97d095ae15e245a057c8e8451bab9b3ee1e1f68e9ba2b4fbc18d0ac5237835f2" -dependencies = [ - "pin-project", - "tracing", -] - -[[package]] -name = "tracing-gum" -version = "8.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9690af7fe11d125786fa1b5ca802192f631b61a4411277865c8e0581c887e286" -dependencies = [ - "coarsetime", - "polkadot-primitives", - "tracing", - "tracing-gum-proc-macro", -] - -[[package]] -name = "tracing-gum-proc-macro" -version = "5.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f074568687ffdfd0adb6005aa8d1d96840197f2c159f80471285f08694cf0ce" -dependencies = [ - "expander 2.0.0", - "proc-macro-crate 3.1.0", - "proc-macro2", - "quote", - "syn 2.0.52", -] - [[package]] name = "tracing-log" version = "0.1.4" @@ -17277,7 +14989,6 @@ dependencies = [ "chrono", "lazy_static", "matchers", - "parking_lot 0.11.2", "regex", "serde", "serde_json", @@ -17317,6 +15028,18 @@ dependencies = [ "smallvec", ] +[[package]] +name = "trie-db" +version = "0.29.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c992b4f40c234a074d48a757efeabb1a6be88af84c0c23f7ca158950cb0ae7f" +dependencies = [ + "hash-db", + "log", + "rustc-hex", + "smallvec", +] + [[package]] name = "trie-root" version = "0.18.0" @@ -17335,14 +15058,14 @@ dependencies = [ "async-trait", "cfg-if", "data-encoding", - "enum-as-inner", + "enum-as-inner 0.5.1", "futures-channel", "futures-io", "futures-util", "idna 0.2.3", "ipnet", "lazy_static", - "rand", + "rand 0.8.5", "smallvec", "socket2 0.4.10", "thiserror", @@ -17352,6 +15075,31 @@ dependencies = [ "url", ] +[[package]] +name = "trust-dns-proto" +version = "0.23.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3119112651c157f4488931a01e586aa459736e9d6046d3bd9105ffb69352d374" +dependencies = [ + "async-trait", + "cfg-if", + "data-encoding", + "enum-as-inner 0.6.0", + "futures-channel", + "futures-io", + "futures-util", + "idna 0.4.0", + "ipnet", + "once_cell", + "rand 0.8.5", + "smallvec", + "thiserror", + "tinyvec", + "tokio", + "tracing", + "url", +] + [[package]] name = "trust-dns-resolver" version = "0.22.0" @@ -17369,7 +15117,28 @@ dependencies = [ "thiserror", "tokio", "tracing", - "trust-dns-proto", + "trust-dns-proto 0.22.0", +] + +[[package]] +name = "trust-dns-resolver" +version = "0.23.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10a3e6c3aff1718b3c73e395d1f35202ba2ffa847c6a62eea0db8fb4cfe30be6" +dependencies = [ + "cfg-if", + "futures-util", + "ipconfig", + "lru-cache", + "once_cell", + "parking_lot 0.12.1", + "rand 0.8.5", + "resolv-conf", + "smallvec", + "thiserror", + "tokio", + "tracing", + "trust-dns-proto 0.23.2", ] [[package]] @@ -17396,13 +15165,20 @@ dependencies = [ "http", "httparse", "log", - "rand", + "rand 0.8.5", + "rustls 0.21.10", "sha1", "thiserror", "url", "utf-8", ] +[[package]] +name = "tuplex" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "676ac81d5454c4dcf37955d34fa8626ede3490f744b86ca14a7b90168d2a08aa" + [[package]] name = "twox-hash" version = "1.6.3" @@ -17411,7 +15187,7 @@ checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675" dependencies = [ "cfg-if", "digest 0.10.7", - "rand", + "rand 0.8.5", "static_assertions", ] @@ -17504,6 +15280,7 @@ dependencies = [ "bytes", "futures-io", "futures-util", + "tokio-util", ] [[package]] @@ -17590,7 +15367,7 @@ dependencies = [ "arrayref", "constcat", "digest 0.10.7", - "rand", + "rand 0.8.5", "rand_chacha 0.3.1", "rand_core 0.6.4", "sha2 0.10.8", @@ -17639,15 +15416,6 @@ version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" -[[package]] -name = "wasix" -version = "0.12.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1fbb4ef9bbca0c1170e0b00dd28abc9e3b68669821600cad1caaed606583c6d" -dependencies = [ - "wasi 0.11.0+wasi-snapshot-preview1", -] - [[package]] name = "wasm-bindgen" version = "0.2.89" @@ -17669,7 +15437,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.65", "wasm-bindgen-shared", ] @@ -17703,7 +15471,7 @@ checksum = "f0eb82fcb7930ae6219a7ecfd55b217f5f0893484b7a13022ebb2b2bf20b5283" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.65", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -18003,7 +15771,7 @@ dependencies = [ "memfd", "memoffset", "paste", - "rand", + "rand 0.8.5", "rustix 0.36.17", "wasmtime-asm-macros", "wasmtime-environ", @@ -18130,6 +15898,21 @@ dependencies = [ "windows-targets 0.48.5", ] +[[package]] +name = "windows-sys" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" +dependencies = [ + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", +] + [[package]] name = "windows-sys" version = "0.45.0" @@ -18406,6 +16189,23 @@ dependencies = [ "time", ] +[[package]] +name = "x509-parser" +version = "0.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7069fba5b66b9193bd2c5d3d4ff12b839118f6bcbef5328efafafb5395cf63da" +dependencies = [ + "asn1-rs", + "data-encoding", + "der-parser", + "lazy_static", + "nom", + "oid-registry", + "rusticata-macros", + "thiserror", + "time", +] + [[package]] name = "xattr" version = "1.3.1" @@ -18419,9 +16219,9 @@ dependencies = [ [[package]] name = "xcm-emulator" -version = "0.6.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b49681988880dd6d08a4d5f6b7cb612a0f12172270349655c1e2f870b3526fd" +checksum = "4fec574213c6c373641128fdea17886fb8a9ae5e3a5f25f80371ffd304dfa080" dependencies = [ "cumulus-pallet-parachain-system", "cumulus-pallet-xcmp-queue", @@ -18441,27 +16241,43 @@ dependencies = [ "polkadot-parachain-primitives", "polkadot-primitives", "polkadot-runtime-parachains", - "sp-arithmetic 24.0.0", - "sp-core 29.0.0", + "sp-arithmetic 26.0.0", + "sp-core 34.0.0", "sp-crypto-hashing", - "sp-io 31.0.0", - "sp-runtime 32.0.0", + "sp-io 37.0.0", + "sp-runtime 38.0.0", "sp-std", - "sp-tracing", + "sp-tracing 17.0.0", "staging-xcm", "staging-xcm-executor", ] +[[package]] +name = "xcm-fee-payment-runtime-api" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d4261279994b1cb0d16a77cc12734fca18b88b56b65b8740de543af6d6a17dc" +dependencies = [ + "frame-support", + "parity-scale-codec", + "scale-info", + "sp-api", + "sp-runtime 38.0.0", + "sp-std", + "sp-weights 31.0.0", + "staging-xcm", +] + [[package]] name = "xcm-procedural" -version = "8.0.0" +version = "10.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4717a97970a9cda70d7db53cf50d2615c2f6f6b7c857445325b4a39ea7aa2cd" +checksum = "e0fd01495dfeb643167557631b34b54d312c1e70cf7eb64249ab687d84fd6045" dependencies = [ "Inflector", "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.65", ] [[package]] @@ -18474,7 +16290,7 @@ dependencies = [ "log", "nohash-hasher", "parking_lot 0.12.1", - "rand", + "rand 0.8.5", "static_assertions", ] @@ -18510,7 +16326,7 @@ checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.65", ] [[package]] @@ -18530,14 +16346,14 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.65", ] [[package]] name = "zombienet-configuration" -version = "0.2.3" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9ced8f504669bc6c11f95becaaadf84b5eeffb99cf7ef127e64cbf6de50be8e" +checksum = "ecd24a5c580ce4d871a4f3291144a731f0cfc633fedd681b99e73825f38181b6" dependencies = [ "anyhow", "lazy_static", @@ -18553,16 +16369,16 @@ dependencies = [ [[package]] name = "zombienet-orchestrator" -version = "0.2.3" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82828a7caf26921fb958f827e7891aec7800922b6080af53bfdc53c46a9291b0" +checksum = "0a2d240dea2272d66138cd510a39d580b6227966185bf63d7ec23eac14533c9c" dependencies = [ "anyhow", "futures", "hex", "libp2p 0.52.4", "multiaddr 0.18.1", - "rand", + "rand 0.8.5", "reqwest", "serde_json", "sha2 0.10.8", @@ -18581,9 +16397,9 @@ dependencies = [ [[package]] name = "zombienet-prom-metrics-parser" -version = "0.2.3" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1aae7bc37efa70ce88df44fe1b8d5671381db13d5458e404b24bccf74e0a38c6" +checksum = "80ed716ba0901e603cbd3b5e3ddc59e3df20d69cd58109ef12bbea6097ffd325" dependencies = [ "pest", "pest_derive", @@ -18592,9 +16408,9 @@ dependencies = [ [[package]] name = "zombienet-provider" -version = "0.2.3" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e3314ed27e86dc06522197b06985c7cc6f9af8af241a5ad7d24588feb9849a1" +checksum = "5a7522089152c02622ac27f30f95652ff5b9e3d193ef7eafee41603e9d7cc785" dependencies = [ "anyhow", "async-trait", @@ -18623,9 +16439,9 @@ dependencies = [ [[package]] name = "zombienet-sdk" -version = "0.2.3" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06e293dc8886bd759ad37db12925d2e46d45dd5c97b659668b15512b947f666d" +checksum = "d629add7e175261c047c9dc038b4b23fefb174edaf2868f858c5ff1b682f6541" dependencies = [ "async-trait", "futures", @@ -18652,19 +16468,20 @@ dependencies = [ [[package]] name = "zombienet-support" -version = "0.2.3" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85abe4a8c3581269f4a0fe010d5924e96e231cad047f358ed8fcad262753f637" +checksum = "6026607084432996fd590d4beb9d4fb15937bce4f3bd6bddd7e8c0ead1bbc141" dependencies = [ "anyhow", "async-trait", "futures", "nix 0.27.1", - "rand", + "rand 0.8.5", "regex", "reqwest", "thiserror", "tokio", + "tracing", "uuid", ] diff --git a/Cargo.toml b/Cargo.toml index a6ae6b33a6..066fe70f4d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,65 +11,66 @@ 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 = "8.0.1" } -assets-common = { version = "0.8.0", default-features = false } -authority-discovery-primitives = { version = "27.0.0", default-features = false, package = "sp-authority-discovery" } -babe-primitives = { version = "0.33.0", default-features = false, package = "sp-consensus-babe" } -beefy-primitives = { version = "14.0.0", default-features = false, package = "sp-consensus-beefy" } -binary-merkle-tree = { version = "14.0.0", default-features = false } +asset-test-utils = { version = "14.0.0" } +assets-common = { version = "0.14.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 } 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.8.0", default-features = false } +bp-bridge-hub-cumulus = { version = "0.14.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.8.1", default-features = false } -bp-kusama = { version = "0.6.0", default-features = false } -bp-messages = { version = "0.8.0", default-features = false } -bp-parachains = { version = "0.8.0", default-features = false } -bp-polkadot = { version = "0.6.0", default-features = false } -bp-polkadot-core = { version = "0.8.0", default-features = false } -bp-relayers = { version = "0.8.0", default-features = false } -bp-runtime = { version = "0.8.0", default-features = false } -bp-xcm-bridge-hub-router = { version = "0.7.0", default-features = false } -bridge-hub-common = { version = "0.1.0", default-features = false } +bp-header-chain = { version = "0.14.0", default-features = false } +bp-kusama = { version = "0.12.0", default-features = false } +bp-messages = { version = "0.14.0", default-features = false } +bp-parachains = { version = "0.14.0", default-features = false } +bp-polkadot = { version = "0.12.0", default-features = false } +bp-polkadot-bulletin = { version = "0.11.0", default-features = false } +bp-polkadot-core = { version = "0.14.0", default-features = false } +bp-relayers = { version = "0.14.0", default-features = false } +bp-runtime = { version = "0.14.0", default-features = false } +bp-xcm-bridge-hub-router = { version = "0.13.0", default-features = false } +bridge-hub-common = { version = "0.7.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.8.0" } -bridge-runtime-common = { version = "0.8.0", default-features = false } +bridge-hub-test-utils = { version = "0.14.0" } +bridge-runtime-common = { version = "0.14.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" } collectives-polkadot-runtime = { path = "system-parachains/collectives/collectives-polkadot" } collectives-polkadot-runtime-constants = { path = "system-parachains/collectives/collectives-polkadot/constants" } coretime-kusama-runtime = { path = "system-parachains/coretime/coretime-kusama" } -cumulus-pallet-aura-ext = { version = "0.8.0", default-features = false } -cumulus-pallet-dmp-queue = { version = "0.8.0", default-features = false } -cumulus-pallet-parachain-system = { version = "0.8.1", default-features = false } -cumulus-pallet-session-benchmarking = { version = "10.0.0", default-features = false } -cumulus-pallet-xcm = { version = "0.8.0", default-features = false } -cumulus-pallet-xcmp-queue = { version = "0.8.0", default-features = false } -cumulus-primitives-aura = { version = "0.8.0", default-features = false } -cumulus-primitives-core = { version = "0.8.0", default-features = false } -cumulus-primitives-utility = { version = "0.8.1", default-features = false } -emulated-integration-tests-common = { version = "4.0.0" } -encointer-balances-tx-payment = { version = "~6.1.0", default-features = false } -encointer-balances-tx-payment-rpc-runtime-api = { version = "~6.1.0", default-features = false } +cumulus-pallet-aura-ext = { version = "0.14.0", default-features = false } +cumulus-pallet-dmp-queue = { version = "0.14.0", default-features = false } +cumulus-pallet-parachain-system = { version = "0.14.0", default-features = false } +cumulus-pallet-session-benchmarking = { version = "16.0.0", default-features = false } +cumulus-pallet-xcm = { version = "0.14.0", default-features = false } +cumulus-pallet-xcmp-queue = { version = "0.14.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.14.0", default-features = false } +cumulus-primitives-storage-weight-reclaim = { version = "5.0.0", default-features = false } +emulated-integration-tests-common = { version = "10.0.0" } +encointer-balances-tx-payment = { version = "~12.1.0", default-features = false } +encointer-balances-tx-payment-rpc-runtime-api = { version = "~12.1.0", default-features = false } encointer-kusama-runtime = { path = "system-parachains/encointer" } -encointer-primitives = { version = "~6.1.0", default-features = false } +encointer-primitives = { version = "~12.2.0", default-features = false } enumflags2 = { version = "0.7.7" } -frame-benchmarking = { version = "29.0.0", default-features = false } -frame-election-provider-support = { version = "29.0.0", default-features = false } -frame-executive = { version = "29.0.0", default-features = false } -frame-metadata-hash-extension = { version = "0.1.0", default-features = false } -frame-support = { version = "29.0.2", default-features = false } -frame-system = { version = "29.0.0", default-features = false } -frame-system-benchmarking = { version = "29.0.0", default-features = false } -frame-system-rpc-runtime-api = { version = "27.0.0", default-features = false } -frame-try-runtime = { version = "0.35.0", default-features = false } +frame-benchmarking = { version = "35.0.0", default-features = false } +frame-election-provider-support = { version = "35.0.0", default-features = false } +frame-executive = { version = "35.0.0", default-features = false } +frame-support = { version = "35.0.0", default-features = false } +frame-system = { version = "35.0.0", default-features = false } +frame-system-benchmarking = { version = "35.0.0", default-features = false } +frame-system-rpc-runtime-api = { version = "33.0.0", default-features = false } +frame-try-runtime = { version = "0.41.0", default-features = false } glutton-kusama-runtime = { path = "system-parachains/gluttons/glutton-kusama" } -grandpa = { version = "0.20.0", package = "sc-consensus-grandpa" } +grandpa = { version = "0.26.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" } @@ -78,164 +79,166 @@ 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 = "28.0.0", default-features = false } -pallet-asset-conversion = { version = "11.0.0", default-features = false } -pallet-asset-conversion-tx-payment = { version = "11.0.0", default-features = false } -pallet-asset-rate = { version = "8.0.0", default-features = false } -pallet-asset-tx-payment = { version = "29.0.0", default-features = false } -pallet-assets = { version = "30.0.0", default-features = false } -pallet-aura = { version = "28.0.0", default-features = false } -pallet-authority-discovery = { version = "29.0.1", default-features = false } -pallet-authorship = { version = "29.0.0", default-features = false } -pallet-babe = { version = "29.0.0", default-features = false } -pallet-bags-list = { version = "28.0.0", default-features = false } -pallet-balances = { version = "29.0.1", default-features = false } -pallet-beefy = { version = "29.0.0", default-features = false } -pallet-beefy-mmr = { version = "29.0.0", default-features = false } -pallet-bounties = { version = "28.0.0", default-features = false } -pallet-bridge-grandpa = { version = "0.8.0", default-features = false } -pallet-bridge-messages = { version = "0.8.0", default-features = false } -pallet-bridge-parachains = { version = "0.8.0", default-features = false } -pallet-bridge-relayers = { version = "0.8.0", default-features = false } -pallet-broker = { version = "0.7.2", default-features = false } -pallet-child-bounties = { version = "28.0.0", default-features = false } -pallet-collator-selection = { version = "10.0.2", default-features = false } -pallet-collective = { version = "29.0.0", default-features = false } -pallet-conviction-voting = { version = "29.0.0", default-features = false } -pallet-core-fellowship = { version = "13.0.0", default-features = false } -pallet-election-provider-multi-phase = { version = "28.0.0", default-features = false } -pallet-election-provider-support-benchmarking = { version = "28.0.0", default-features = false } -pallet-encointer-balances = { version = "~6.1.0", default-features = false } -pallet-encointer-bazaar = { version = "~6.1.0", default-features = false } -pallet-encointer-bazaar-rpc-runtime-api = { version = "~6.1.0", default-features = false } -pallet-encointer-ceremonies = { version = "~6.1.0", default-features = false } -pallet-encointer-ceremonies-rpc-runtime-api = { version = "~6.1.0", default-features = false } -pallet-encointer-communities = { version = "~6.1.0", default-features = false } -pallet-encointer-communities-rpc-runtime-api = { version = "~6.1.0", default-features = false } -pallet-encointer-faucet = { version = "~6.2.0", default-features = false } -pallet-encointer-reputation-commitments = { version = "~6.1.0", default-features = false } -pallet-encointer-scheduler = { version = "~6.1.0", default-features = false } -pallet-fast-unstake = { version = "28.0.0", default-features = false } -pallet-glutton = { version = "15.0.0", default-features = false } -pallet-grandpa = { version = "29.0.0", default-features = false } -pallet-identity = { version = "29.0.1", default-features = false } -pallet-indices = { version = "29.0.0", default-features = false } -pallet-insecure-randomness-collective-flip = { version = "17.0.0", default-features = false } -pallet-membership = { version = "29.0.0", default-features = false } -pallet-message-queue = { version = "32.0.0", default-features = false } -pallet-mmr = { version = "28.0.0", default-features = false } -pallet-multisig = { version = "29.0.0", default-features = false } -pallet-nft-fractionalization = { version = "11.0.0", default-features = false } -pallet-nfts = { version = "23.0.0", default-features = false } -pallet-nfts-runtime-api = { version = "15.0.0", default-features = false } -pallet-nis = { version = "29.0.0", default-features = false } -pallet-nomination-pools = { version = "26.0.1", default-features = false } -pallet-nomination-pools-benchmarking = { version = "27.0.0", default-features = false } -pallet-nomination-pools-runtime-api = { version = "24.0.0", default-features = false } -pallet-offences = { version = "28.0.0", default-features = false } -pallet-offences-benchmarking = { version = "29.0.0", default-features = false } -pallet-preimage = { version = "29.0.0", default-features = false } -pallet-proxy = { version = "29.0.0", default-features = false } -pallet-ranked-collective = { version = "29.0.0", default-features = false } -pallet-recovery = { version = "29.0.0", default-features = false } -pallet-referenda = { version = "29.0.0", default-features = false } -pallet-salary = { version = "14.0.0", default-features = false } -pallet-scheduler = { version = "30.0.0", default-features = false } -pallet-session = { version = "29.0.0", default-features = false } -pallet-session-benchmarking = { version = "29.0.0", default-features = false } -pallet-society = { version = "29.0.0", default-features = false } -pallet-staking = { version = "29.0.3", default-features = false } -pallet-staking-reward-curve = { version = "11.0.0" } -pallet-staking-reward-fn = { version = "20.0.0", default-features = false } -pallet-staking-runtime-api = { version = "15.0.1", default-features = false } -pallet-state-trie-migration = { version = "30.0.0", default-features = false } -pallet-sudo = { version = "29.0.0", default-features = false } -pallet-timestamp = { version = "28.0.0", default-features = false } -pallet-transaction-payment = { version = "29.0.1", default-features = false } -pallet-transaction-payment-rpc-runtime-api = { version = "29.0.0", default-features = false } -pallet-treasury = { version = "28.0.1", default-features = false } -pallet-uniques = { version = "29.0.0", default-features = false } -pallet-utility = { version = "29.0.0", default-features = false } -pallet-vesting = { version = "29.0.0", default-features = false } -pallet-whitelist = { version = "28.0.0", default-features = false } -pallet-xcm = { version = "8.0.5", default-features = false } -pallet-xcm-benchmarks = { version = "8.0.2", default-features = false } -pallet-xcm-bridge-hub = { version = "0.3.0", default-features = false } -pallet-xcm-bridge-hub-router = { version = "0.6.0", default-features = false } -parachain-info = { version = "0.8.0", default-features = false, package = "staging-parachain-info" } -parachains-common = { version = "8.0.0", default-features = false } -parachains-runtimes-test-utils = { version = "8.0.0" } +pallet-alliance = { version = "34.0.0", default-features = false } +pallet-asset-conversion = { version = "17.0.0", default-features = false } +pallet-asset-conversion-tx-payment = { version = "17.0.0", default-features = false } +pallet-asset-rate = { version = "14.0.0", default-features = false } +pallet-asset-tx-payment = { version = "35.0.0", default-features = false } +pallet-assets = { version = "36.0.0", default-features = false } +pallet-aura = { version = "34.0.0", default-features = false } +pallet-authority-discovery = { version = "35.0.0", default-features = false } +pallet-authorship = { version = "35.0.0", default-features = false } +pallet-babe = { version = "35.0.0", default-features = false } +pallet-bags-list = { version = "34.0.0", default-features = false } +pallet-balances = { version = "36.0.0", default-features = false } +pallet-beefy = { version = "35.0.0", default-features = false } +pallet-beefy-mmr = { version = "35.0.0", default-features = false } +pallet-bounties = { version = "34.0.0", default-features = false } +pallet-bridge-grandpa = { version = "0.14.0", default-features = false } +pallet-bridge-messages = { version = "0.14.0", default-features = false } +pallet-bridge-parachains = { version = "0.14.0", default-features = false } +pallet-bridge-relayers = { version = "0.14.0", default-features = false } +pallet-broker = { version = "0.14.0", default-features = false } +pallet-child-bounties = { version = "34.0.0", default-features = false } +pallet-collator-selection = { version = "16.0.0", default-features = false } +pallet-collective = { version = "35.0.0", default-features = false } +pallet-conviction-voting = { version = "35.0.0", default-features = false } +pallet-core-fellowship = { version = "19.0.0", default-features = false } +pallet-election-provider-multi-phase = { version = "34.0.0", default-features = false } +pallet-election-provider-support-benchmarking = { version = "34.0.0", default-features = false } +pallet-encointer-balances = { version = "~12.1.0", default-features = false } +pallet-encointer-bazaar = { version = "~12.1.0", default-features = false } +pallet-encointer-bazaar-rpc-runtime-api = { version = "~12.1.0", default-features = false } +pallet-encointer-ceremonies = { version = "~12.1.0", default-features = false } +pallet-encointer-ceremonies-rpc-runtime-api = { version = "~12.1.0", default-features = false } +pallet-encointer-communities = { version = "~12.1.0", default-features = false } +pallet-encointer-communities-rpc-runtime-api = { version = "~12.1.0", default-features = false } +pallet-encointer-faucet = { version = "~12.2.0", default-features = false } +pallet-encointer-reputation-commitments = { version = "~12.1.0", default-features = false } +pallet-encointer-scheduler = { version = "~12.1.0", default-features = false } +pallet-fast-unstake = { version = "34.0.0", default-features = false } +pallet-glutton = { version = "21.0.0", default-features = false } +pallet-grandpa = { version = "35.0.0", default-features = false } +pallet-identity = { version = "35.0.0", default-features = false } +pallet-indices = { version = "35.0.0", default-features = false } +pallet-insecure-randomness-collective-flip = { version = "23.0.0", default-features = false } +pallet-membership = { version = "35.0.0", default-features = false } +pallet-message-queue = { version = "38.0.0", default-features = false } +pallet-mmr = { version = "34.0.0", default-features = false } +pallet-multisig = { version = "35.0.0", default-features = false } +pallet-nft-fractionalization = { version = "17.0.0", default-features = false } +pallet-nfts = { version = "29.0.0", default-features = false } +pallet-nfts-runtime-api = { version = "21.0.0", default-features = false } +pallet-nis = { version = "35.0.0", default-features = false } +pallet-nomination-pools = { version = "32.0.0", default-features = false } +pallet-nomination-pools-benchmarking = { version = "33.0.0", default-features = false } +pallet-nomination-pools-runtime-api = { version = "30.0.0", default-features = false } +pallet-offences = { version = "34.0.0", default-features = false } +pallet-offences-benchmarking = { version = "35.0.0", default-features = false } +pallet-preimage = { version = "35.0.0", default-features = false } +pallet-proxy = { version = "35.0.0", default-features = false } +pallet-ranked-collective = { version = "35.0.0", default-features = false } +pallet-recovery = { version = "35.0.0", default-features = false } +pallet-referenda = { version = "35.0.0", default-features = false } +pallet-salary = { version = "20.0.0", default-features = false } +pallet-scheduler = { version = "36.0.0", default-features = false } +pallet-session = { version = "35.0.0", default-features = false } +pallet-session-benchmarking = { version = "35.0.0", default-features = false } +pallet-society = { version = "35.0.0", default-features = false } +pallet-staking = { version = "35.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 = "36.0.0", default-features = false } +pallet-sudo = { version = "35.0.0", default-features = false } +pallet-timestamp = { version = "34.0.0", default-features = false } +pallet-transaction-payment = { version = "35.0.0", default-features = false } +pallet-transaction-payment-rpc-runtime-api = { version = "35.0.0", default-features = false } +pallet-treasury = { version = "34.0.0", default-features = false } +pallet-uniques = { version = "35.0.0", default-features = false } +pallet-utility = { version = "35.0.0", default-features = false } +pallet-vesting = { version = "35.0.0", default-features = false } +pallet-whitelist = { version = "34.0.0", default-features = false } +pallet-xcm = { version = "14.0.0", default-features = false } +pallet-xcm-benchmarks = { version = "14.0.0", default-features = false } +pallet-xcm-bridge-hub = { version = "0.9.0", default-features = false } +pallet-xcm-bridge-hub-router = { version = "0.12.0", default-features = false } +parachain-info = { version = "0.14.0", default-features = false, package = "staging-parachain-info" } +parachains-common = { version = "14.0.0", default-features = false } +parachains-runtimes-test-utils = { version = "14.0.0" } paste = { version = "1.0.14" } penpal-emulated-chain = { path = "integration-tests/emulated/chains/parachains/testing/penpal" } -penpal-runtime = { version = "0.15.1" } +penpal-runtime = { version = "0.21.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 = "8.0.0", default-features = false } +polkadot-core-primitives = { version = "14.0.0", default-features = false } polkadot-emulated-chain = { path = "integration-tests/emulated/chains/relays/polkadot" } -polkadot-parachain-primitives = { version = "7.0.0", default-features = false } -polkadot-primitives = { version = "8.0.1", default-features = false } +polkadot-parachain-primitives = { version = "13.0.0", default-features = false } +polkadot-primitives = { version = "14.0.0", default-features = false } polkadot-runtime = { path = "relay/polkadot" } -polkadot-runtime-common = { version = "8.0.2", default-features = false } +polkadot-runtime-common = { version = "14.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 } -remote-externalities = { version = "0.36.0", package = "frame-remote-externalities" } -runtime-parachains = { version = "8.0.1", default-features = false, package = "polkadot-runtime-parachains" } -sc-chain-spec = { version = "28.0.0" } +frame-metadata-hash-extension = { version = "0.3.0", default-features = false } +remote-externalities = { version = "0.42.0", package = "frame-remote-externalities" } +runtime-parachains = { version = "14.0.0", default-features = false, package = "polkadot-runtime-parachains" } +sc-chain-spec = { version = "34.0.0" } 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" } smallvec = { version = "1.13.1" } -snowbridge-beacon-primitives = { version = "0.1.2", default-features = false } -snowbridge-core = { version = "0.1.3", default-features = false } -snowbridge-outbound-queue-runtime-api = { version = "0.1.1", default-features = false } -snowbridge-pallet-ethereum-client = { version = "0.1.3", default-features = false } -snowbridge-pallet-inbound-queue = { version = "0.1.3", default-features = false } -snowbridge-pallet-inbound-queue-fixtures = { version = "0.9.1" } -snowbridge-pallet-outbound-queue = { version = "0.1.1", default-features = false } -snowbridge-pallet-system = { version = "0.1.1", default-features = false } -snowbridge-router-primitives = { version = "0.1.0", default-features = false } -snowbridge-runtime-common = { version = "0.1.0", default-features = false } -snowbridge-runtime-test-common = { version = "0.1.2" } -snowbridge-system-runtime-api = { version = "0.1.0", default-features = false } -sp-api = { version = "27.0.1", default-features = false } -sp-application-crypto = { version = "31.0.0", default-features = false } -sp-arithmetic = { version = "24.0.0", default-features = false } -sp-block-builder = { version = "27.0.0", default-features = false } -sp-consensus-aura = { version = "0.33.0", default-features = false } -sp-core = { version = "29.0.0", default-features = false } +snowbridge-beacon-primitives = { version = "0.7.0", default-features = false } +snowbridge-core = { version = "0.7.0", default-features = false } +snowbridge-outbound-queue-runtime-api = { version = "0.7.0", default-features = false } +snowbridge-pallet-ethereum-client = { version = "0.7.0", default-features = false } +snowbridge-pallet-inbound-queue = { version = "0.7.0", default-features = false } +snowbridge-pallet-inbound-queue-fixtures = { version = "0.15.0" } +snowbridge-pallet-outbound-queue = { version = "0.7.0", default-features = false } +snowbridge-pallet-system = { version = "0.7.0", default-features = false } +snowbridge-router-primitives = { version = "0.13.0", default-features = false } +snowbridge-runtime-common = { version = "0.7.0", default-features = false } +snowbridge-runtime-test-common = { version = "0.7.0" } +snowbridge-system-runtime-api = { version = "0.7.0", default-features = false } +sp-api = { version = "33.0.0", default-features = false } +sp-application-crypto = { version = "37.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-core = { version = "34.0.0", default-features = false } sp-debug-derive = { version = "14.0.0", default-features = false } -sp-genesis-builder = { version = "0.8.0", default-features = false } -sp-inherents = { version = "27.0.0", default-features = false } -sp-io = { version = "31.0.0", default-features = false } -sp-keyring = { version = "32.0.0" } -sp-npos-elections = { version = "27.0.0", default-features = false } -sp-offchain = { version = "27.0.0", default-features = false } -sp-runtime = { version = "32.0.0", default-features = false } -sp-session = { version = "28.0.0", default-features = false } -sp-staking = { version = "27.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-std = { version = "14.0.0", default-features = false } -sp-storage = { version = "20.0.0", default-features = false } -sp-tracing = { version = "16.0.0", default-features = false } -sp-transaction-pool = { version = "27.0.0", default-features = false } -sp-trie = { version = "30.0.0" } -sp-version = { version = "30.0.0", default-features = false } -sp-weights = { version = "28.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-weights = { version = "31.0.0", default-features = false } static_assertions = { version = "1.1.0" } -substrate-wasm-builder = { version = "18.0.1" } +substrate-wasm-builder = { version = "23.0.0" } system-parachains-constants = { path = "system-parachains/constants", default-features = false } tokio = { version = "1.36.0" } -xcm = { version = "8.0.1", default-features = false, package = "staging-xcm" } -xcm-builder = { version = "8.0.2", default-features = false, package = "staging-xcm-builder" } -xcm-emulator = { version = "0.6.0" } -xcm-executor = { version = "8.0.1", default-features = false, package = "staging-xcm-executor" } +xcm = { version = "14.0.0", default-features = false, package = "staging-xcm" } +xcm-builder = { version = "14.0.0", default-features = false, package = "staging-xcm-builder" } +xcm-emulator = { version = "0.12.0" } +xcm-executor = { version = "14.0.0", default-features = false, package = "staging-xcm-executor" } anyhow = { version = "1.0.82" } subxt = { version = "0.35.0", default-features = false } tracing-subscriber = { version = "0.3.18" } -zombienet-sdk = { version = "0.2" } +zombienet-sdk = { version = "0.2.4" } +tuplex = { version = "0.1.0", default-features = false } [workspace] resolver = "2" diff --git a/chain-spec-generator/Cargo.toml b/chain-spec-generator/Cargo.toml index 4d44340016..7a97e371a7 100644 --- a/chain-spec-generator/Cargo.toml +++ b/chain-spec-generator/Cargo.toml @@ -62,4 +62,5 @@ runtime-benchmarks = [ "polkadot-runtime/runtime-benchmarks", "runtime-parachains/runtime-benchmarks", "sp-runtime/runtime-benchmarks", + "encointer-kusama-runtime/runtime-benchmarks" ] diff --git a/chain-spec-generator/src/relay_chain_specs.rs b/chain-spec-generator/src/relay_chain_specs.rs index 5ee20389d8..fafc276d9d 100644 --- a/chain-spec-generator/src/relay_chain_specs.rs +++ b/chain-spec-generator/src/relay_chain_specs.rs @@ -22,9 +22,8 @@ use grandpa::AuthorityId as GrandpaId; use kusama_runtime_constants::currency::UNITS as KSM; use pallet_staking::Forcing; use polkadot_primitives::{ - vstaging::{ApprovalVotingParams, NodeFeatures}, - AccountId, AccountPublic, AssignmentId, AsyncBackingParams, ValidatorId, - ON_DEMAND_DEFAULT_QUEUE_MAX_SIZE, + AccountId, AccountPublic, ApprovalVotingParams, AssignmentId, AsyncBackingParams, NodeFeatures, + ValidatorId, }; use polkadot_runtime_constants::currency::UNITS as DOT; use runtime_parachains::configuration::HostConfiguration; @@ -32,9 +31,9 @@ use sc_chain_spec::{ChainSpec, ChainType, NoExtension}; use sp_core::{sr25519, Pair, Public}; use sp_runtime::{traits::IdentifyAccount, Perbill}; -pub type PolkadotChainSpec = sc_chain_spec::GenericChainSpec<(), NoExtension>; +pub type PolkadotChainSpec = sc_chain_spec::GenericChainSpec; -pub type KusamaChainSpec = sc_chain_spec::GenericChainSpec<(), NoExtension>; +pub type KusamaChainSpec = sc_chain_spec::GenericChainSpec; const DEFAULT_PROTOCOL_ID: &str = "dot"; @@ -58,8 +57,6 @@ fn default_parachains_host_configuration() -> HostConfiguration HostConfiguration HostConfiguration; +pub type AssetHubPolkadotChainSpec = sc_chain_spec::GenericChainSpec; -pub type AssetHubKusamaChainSpec = sc_chain_spec::GenericChainSpec<(), Extensions>; +pub type AssetHubKusamaChainSpec = sc_chain_spec::GenericChainSpec; -pub type CollectivesPolkadotChainSpec = sc_chain_spec::GenericChainSpec<(), Extensions>; +pub type CollectivesPolkadotChainSpec = sc_chain_spec::GenericChainSpec; -pub type BridgeHubPolkadotChainSpec = sc_chain_spec::GenericChainSpec<(), Extensions>; +pub type BridgeHubPolkadotChainSpec = sc_chain_spec::GenericChainSpec; -pub type BridgeHubKusamaChainSpec = sc_chain_spec::GenericChainSpec<(), Extensions>; +pub type BridgeHubKusamaChainSpec = sc_chain_spec::GenericChainSpec; -pub type GluttonKusamaChainSpec = sc_chain_spec::GenericChainSpec<(), Extensions>; +pub type GluttonKusamaChainSpec = sc_chain_spec::GenericChainSpec; -pub type EncointerKusamaChainSpec = sc_chain_spec::GenericChainSpec<(), Extensions>; +pub type EncointerKusamaChainSpec = sc_chain_spec::GenericChainSpec; -pub type CoretimeKusamaChainSpec = sc_chain_spec::GenericChainSpec<(), Extensions>; +pub type CoretimeKusamaChainSpec = sc_chain_spec::GenericChainSpec; -pub type PeopleKusamaChainSpec = sc_chain_spec::GenericChainSpec<(), Extensions>; +pub type PeopleKusamaChainSpec = sc_chain_spec::GenericChainSpec; -pub type PeoplePolkadotChainSpec = sc_chain_spec::GenericChainSpec<(), Extensions>; +pub type PeoplePolkadotChainSpec = sc_chain_spec::GenericChainSpec; const ASSET_HUB_POLKADOT_ED: Balance = asset_hub_polkadot_runtime::ExistentialDeposit::get(); diff --git a/integration-tests/bridges/tests/0001-polkadot-kusama-asset-transfer/wksm-reaches-kusama.zndsl b/integration-tests/bridges/tests/0001-polkadot-kusama-asset-transfer/wksm-reaches-kusama.zndsl index 7bb680f080..fd8b9bc5c3 100644 --- a/integration-tests/bridges/tests/0001-polkadot-kusama-asset-transfer/wksm-reaches-kusama.zndsl +++ b/integration-tests/bridges/tests/0001-polkadot-kusama-asset-transfer/wksm-reaches-kusama.zndsl @@ -5,6 +5,6 @@ Creds: config # send 3 wKSM back to Alice from Polkadot AH to Kusama AH asset-hub-kusama-collator-1: run {{ENV_PATH}}/helper.sh with "withdraw-reserve-assets-from-asset-hub-polkadot-local 3000000000000" within 120 seconds -# check that //Alice received at least 2.8 wKSM on Westend AH +# check that //Alice received at least 2.8 wKSM on Polkadot AH # (we wait until //Alice account increases here - there are no other transactions that may increase it) asset-hub-kusama-collator-1: js-script {{FRAMEWORK_PATH}}/js-helpers/native-assets-balance-increased.js with "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY,2800000000000" within 300 seconds diff --git a/integration-tests/emulated/chains/parachains/assets/asset-hub-kusama/Cargo.toml b/integration-tests/emulated/chains/parachains/assets/asset-hub-kusama/Cargo.toml index 3401d3b653..a14a2362bd 100644 --- a/integration-tests/emulated/chains/parachains/assets/asset-hub-kusama/Cargo.toml +++ b/integration-tests/emulated/chains/parachains/assets/asset-hub-kusama/Cargo.toml @@ -17,7 +17,10 @@ frame-support = { workspace = true, default-features = true } parachains-common = { workspace = true, default-features = true } cumulus-primitives-core = { workspace = true, default-features = true } emulated-integration-tests-common = { workspace = true } +xcm = { workspace = true, default-features = true } +polkadot-parachain-primitives = { workspace = true } # Runtimes asset-hub-kusama-runtime = { workspace = true } kusama-emulated-chain = { workspace = true } +penpal-emulated-chain = { workspace = true } 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 b1677e8762..0da714d34a 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 @@ -14,17 +14,33 @@ // limitations under the License. // Substrate -use sp_core::storage::Storage; +use sp_core::{sr25519, storage::Storage}; // Cumulus use emulated_integration_tests_common::{ - accounts, build_genesis_storage, collators, SAFE_XCM_VERSION, + accounts, build_genesis_storage, collators, get_account_id_from_seed, RESERVABLE_ASSET_ID, + SAFE_XCM_VERSION, }; -use parachains_common::Balance; +use frame_support::sp_runtime::traits::AccountIdConversion; +use parachains_common::{AccountId, Balance}; +use polkadot_parachain_primitives::primitives::Sibling; +use xcm::prelude::*; pub const PARA_ID: u32 = 1000; pub const ED: Balance = asset_hub_kusama_runtime::ExistentialDeposit::get(); +frame_support::parameter_types! { + pub AssetHubKusamaAssetOwner: AccountId = get_account_id_from_seed::("Alice"); + pub PenpalATeleportableAssetLocation: Location + = Location::new(1, [ + Junction::Parachain(penpal_emulated_chain::PARA_ID_A), + Junction::PalletInstance(penpal_emulated_chain::ASSETS_PALLET_ID), + Junction::GeneralIndex(penpal_emulated_chain::TELEPORTABLE_ASSET_ID.into()), + ] + ); + pub PenpalASiblingSovereignAccount: AccountId = Sibling::from(penpal_emulated_chain::PARA_ID_A).into_account_truncating(); +} + pub fn genesis() -> Storage { let genesis_config = asset_hub_kusama_runtime::RuntimeGenesisConfig { system: asset_hub_kusama_runtime::SystemConfig::default(), @@ -60,6 +76,22 @@ pub fn genesis() -> Storage { safe_xcm_version: Some(SAFE_XCM_VERSION), ..Default::default() }, + assets: asset_hub_kusama_runtime::AssetsConfig { + assets: vec![(RESERVABLE_ASSET_ID, AssetHubKusamaAssetOwner::get(), true, ED)], + ..Default::default() + }, + foreign_assets: asset_hub_kusama_runtime::ForeignAssetsConfig { + assets: vec![ + // Penpal's teleportable asset representation + ( + PenpalATeleportableAssetLocation::get().try_into().unwrap(), + PenpalASiblingSovereignAccount::get(), + true, + ED, + ), + ], + ..Default::default() + }, ..Default::default() }; diff --git a/integration-tests/emulated/chains/parachains/assets/asset-hub-kusama/src/lib.rs b/integration-tests/emulated/chains/parachains/assets/asset-hub-kusama/src/lib.rs index 775e575e7e..af76285d73 100644 --- a/integration-tests/emulated/chains/parachains/assets/asset-hub-kusama/src/lib.rs +++ b/integration-tests/emulated/chains/parachains/assets/asset-hub-kusama/src/lib.rs @@ -21,8 +21,9 @@ use frame_support::traits::OnInitialize; // Cumulus use emulated_integration_tests_common::{ impl_accounts_helpers_for_parachain, impl_assert_events_helpers_for_parachain, - impl_assets_helpers_for_parachain, impl_foreign_assets_helpers_for_parachain, - impl_xcm_helpers_for_parachain, impls::Parachain, xcm_emulator::decl_test_parachains, + impl_assets_helpers_for_parachain, impl_assets_helpers_for_system_parachain, + impl_foreign_assets_helpers_for_parachain, impl_xcm_helpers_for_parachain, impls::Parachain, + xcm_emulator::decl_test_parachains, }; use kusama_emulated_chain::Kusama; @@ -54,6 +55,7 @@ decl_test_parachains! { // AssetHubKusama implementation impl_accounts_helpers_for_parachain!(AssetHubKusama); impl_assert_events_helpers_for_parachain!(AssetHubKusama); -impl_assets_helpers_for_parachain!(AssetHubKusama, Kusama); -impl_foreign_assets_helpers_for_parachain!(AssetHubKusama, Kusama); +impl_assets_helpers_for_system_parachain!(AssetHubKusama, Kusama); +impl_assets_helpers_for_parachain!(AssetHubKusama); +impl_foreign_assets_helpers_for_parachain!(AssetHubKusama, xcm::v3::Location); impl_xcm_helpers_for_parachain!(AssetHubKusama); diff --git a/integration-tests/emulated/chains/parachains/assets/asset-hub-polkadot/Cargo.toml b/integration-tests/emulated/chains/parachains/assets/asset-hub-polkadot/Cargo.toml index 3bb7ebde64..4b217ac017 100644 --- a/integration-tests/emulated/chains/parachains/assets/asset-hub-polkadot/Cargo.toml +++ b/integration-tests/emulated/chains/parachains/assets/asset-hub-polkadot/Cargo.toml @@ -17,7 +17,10 @@ frame-support = { workspace = true, default-features = true } parachains-common = { workspace = true, default-features = true } cumulus-primitives-core = { workspace = true, default-features = true } emulated-integration-tests-common = { workspace = true } +xcm = { workspace = true, default-features = true } +polkadot-parachain-primitives = { workspace = true } # Runtimes asset-hub-polkadot-runtime = { workspace = true } polkadot-emulated-chain = { workspace = true } +penpal-emulated-chain = { workspace = true } 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 671eb79b67..38bb6309d2 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 @@ -18,14 +18,38 @@ use sp_core::storage::Storage; // Cumulus use emulated_integration_tests_common::{ - accounts, build_genesis_storage, get_account_id_from_seed, get_from_seed, SAFE_XCM_VERSION, + accounts, build_genesis_storage, get_account_id_from_seed, get_from_seed, RESERVABLE_ASSET_ID, + SAFE_XCM_VERSION, }; +use frame_support::sp_runtime::traits::AccountIdConversion; use parachains_common::{AccountId, AssetHubPolkadotAuraId, Balance}; +use polkadot_parachain_primitives::primitives::Sibling; use sp_core::sr25519; +use xcm::prelude::*; pub const PARA_ID: u32 = 1000; pub const ED: Balance = asset_hub_polkadot_runtime::ExistentialDeposit::get(); +frame_support::parameter_types! { + pub AssetHubPolkadotAssetOwner: AccountId = get_account_id_from_seed::("Alice"); + pub PenpalATeleportableAssetLocation: Location + = Location::new(1, [ + Junction::Parachain(penpal_emulated_chain::PARA_ID_A), + Junction::PalletInstance(penpal_emulated_chain::ASSETS_PALLET_ID), + Junction::GeneralIndex(penpal_emulated_chain::TELEPORTABLE_ASSET_ID.into()), + ] + ); + pub PenpalBTeleportableAssetLocation: Location + = Location::new(1, [ + Junction::Parachain(penpal_emulated_chain::PARA_ID_B), + Junction::PalletInstance(penpal_emulated_chain::ASSETS_PALLET_ID), + Junction::GeneralIndex(penpal_emulated_chain::TELEPORTABLE_ASSET_ID.into()), + ] + ); + pub PenpalASiblingSovereignAccount: AccountId = Sibling::from(penpal_emulated_chain::PARA_ID_A).into_account_truncating(); + pub PenpalBSiblingSovereignAccount: AccountId = Sibling::from(penpal_emulated_chain::PARA_ID_B).into_account_truncating(); +} + fn invulnerables_asset_hub_polkadot() -> Vec<(AccountId, AssetHubPolkadotAuraId)> { vec![ ( @@ -43,7 +67,11 @@ pub fn genesis() -> Storage { let genesis_config = asset_hub_polkadot_runtime::RuntimeGenesisConfig { system: asset_hub_polkadot_runtime::SystemConfig::default(), balances: asset_hub_polkadot_runtime::BalancesConfig { - balances: accounts::init_balances().iter().cloned().map(|k| (k, ED * 4096)).collect(), + balances: accounts::init_balances() + .iter() + .cloned() + .map(|k| (k, ED * 4096 * 4096)) + .collect(), }, parachain_info: asset_hub_polkadot_runtime::ParachainInfoConfig { parachain_id: PARA_ID.into(), @@ -74,6 +102,28 @@ pub fn genesis() -> Storage { safe_xcm_version: Some(SAFE_XCM_VERSION), ..Default::default() }, + assets: asset_hub_polkadot_runtime::AssetsConfig { + assets: vec![(RESERVABLE_ASSET_ID, AssetHubPolkadotAssetOwner::get(), true, ED)], + ..Default::default() + }, + foreign_assets: asset_hub_polkadot_runtime::ForeignAssetsConfig { + assets: vec![ + // Penpal's teleportable asset representation + ( + PenpalATeleportableAssetLocation::get().try_into().unwrap(), + PenpalASiblingSovereignAccount::get(), + true, + ED, + ), + ( + PenpalBTeleportableAssetLocation::get().try_into().unwrap(), + PenpalBSiblingSovereignAccount::get(), + true, + ED, + ), + ], + ..Default::default() + }, ..Default::default() }; diff --git a/integration-tests/emulated/chains/parachains/assets/asset-hub-polkadot/src/lib.rs b/integration-tests/emulated/chains/parachains/assets/asset-hub-polkadot/src/lib.rs index 4a91be0a3e..b24ba95926 100644 --- a/integration-tests/emulated/chains/parachains/assets/asset-hub-polkadot/src/lib.rs +++ b/integration-tests/emulated/chains/parachains/assets/asset-hub-polkadot/src/lib.rs @@ -21,8 +21,9 @@ use frame_support::traits::OnInitialize; // Cumulus use emulated_integration_tests_common::{ impl_accounts_helpers_for_parachain, impl_assert_events_helpers_for_parachain, - impl_assets_helpers_for_parachain, impl_foreign_assets_helpers_for_parachain, - impl_xcm_helpers_for_parachain, impls::Parachain, xcm_emulator::decl_test_parachains, + impl_assets_helpers_for_parachain, impl_assets_helpers_for_system_parachain, + impl_foreign_assets_helpers_for_parachain, impl_xcm_helpers_for_parachain, impls::Parachain, + xcm_emulator::decl_test_parachains, }; use polkadot_emulated_chain::Polkadot; @@ -54,6 +55,7 @@ decl_test_parachains! { // AssetHubPolkadot implementation impl_accounts_helpers_for_parachain!(AssetHubPolkadot); impl_assert_events_helpers_for_parachain!(AssetHubPolkadot); -impl_assets_helpers_for_parachain!(AssetHubPolkadot, Polkadot); -impl_foreign_assets_helpers_for_parachain!(AssetHubPolkadot, Polkadot); +impl_assets_helpers_for_system_parachain!(AssetHubPolkadot, Polkadot); +impl_assets_helpers_for_parachain!(AssetHubPolkadot); +impl_foreign_assets_helpers_for_parachain!(AssetHubPolkadot, xcm::v3::Location); impl_xcm_helpers_for_parachain!(AssetHubPolkadot); diff --git a/integration-tests/emulated/chains/parachains/testing/penpal/Cargo.toml b/integration-tests/emulated/chains/parachains/testing/penpal/Cargo.toml index 3f5198ea35..a9b5ce3aa6 100644 --- a/integration-tests/emulated/chains/parachains/testing/penpal/Cargo.toml +++ b/integration-tests/emulated/chains/parachains/testing/penpal/Cargo.toml @@ -17,7 +17,8 @@ frame-support = { workspace = true, default-features = true } parachains-common = { workspace = true, default-features = true } cumulus-primitives-core = { workspace = true, default-features = true } emulated-integration-tests-common = { workspace = true } -penpal-runtime = { features = ["experimental"], workspace = true } +penpal-runtime = { workspace = true } +xcm = { workspace = true, default-features = true } # Runtimes kusama-emulated-chain = { workspace = true } 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 5ba5bfd3ea..a9ddf89522 100644 --- a/integration-tests/emulated/chains/parachains/testing/penpal/src/genesis.rs +++ b/integration-tests/emulated/chains/parachains/testing/penpal/src/genesis.rs @@ -14,19 +14,26 @@ // limitations under the License. // Substrate +use frame_support::parameter_types; use sp_core::{sr25519, storage::Storage}; // Cumulus use emulated_integration_tests_common::{ accounts, build_genesis_storage, collators, get_account_id_from_seed, SAFE_XCM_VERSION, }; -use parachains_common::Balance; +use parachains_common::{AccountId, Balance}; +use penpal_runtime::xcm_config::{LocalReservableFromAssetHub, RelayLocation}; // Penpal pub const PARA_ID_A: u32 = 2000; pub const PARA_ID_B: u32 = 2001; pub const ED: Balance = penpal_runtime::ExistentialDeposit::get(); +parameter_types! { + pub PenpalSudoAccount: AccountId = get_account_id_from_seed::("Alice"); + pub PenpalAssetOwner: AccountId = PenpalSudoAccount::get(); +} + pub fn genesis(para_id: u32) -> Storage { let genesis_config = penpal_runtime::RuntimeGenesisConfig { system: penpal_runtime::SystemConfig::default(), @@ -58,8 +65,24 @@ pub fn genesis(para_id: u32) -> Storage { safe_xcm_version: Some(SAFE_XCM_VERSION), ..Default::default() }, - sudo: penpal_runtime::SudoConfig { - key: Some(get_account_id_from_seed::("Alice")), + sudo: penpal_runtime::SudoConfig { key: Some(PenpalSudoAccount::get()) }, + assets: penpal_runtime::AssetsConfig { + assets: vec![( + penpal_runtime::xcm_config::TELEPORTABLE_ASSET_ID, + PenpalAssetOwner::get(), + false, + ED, + )], + ..Default::default() + }, + foreign_assets: penpal_runtime::ForeignAssetsConfig { + assets: vec![ + // Relay Native asset representation + (RelayLocation::get(), PenpalAssetOwner::get(), true, ED), + // Sufficient AssetHub asset representation + (LocalReservableFromAssetHub::get(), PenpalAssetOwner::get(), true, ED), + ], + ..Default::default() }, ..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 2a8001126c..09fe2aa0e3 100644 --- a/integration-tests/emulated/chains/parachains/testing/penpal/src/lib.rs +++ b/integration-tests/emulated/chains/parachains/testing/penpal/src/lib.rs @@ -14,9 +14,10 @@ // limitations under the License. mod genesis; -pub use genesis::{genesis, ED, PARA_ID_A, PARA_ID_B}; +pub use genesis::{genesis, PenpalAssetOwner, ED, PARA_ID_A, PARA_ID_B}; pub use penpal_runtime::xcm_config::{ - CustomizableAssetFromSystemAssetHub, LocalTeleportableToAssetHub, XcmConfig, + CustomizableAssetFromSystemAssetHub, LocalReservableFromAssetHub, LocalTeleportableToAssetHub, + XcmConfig, ASSETS_PALLET_ID, RESERVABLE_ASSET_ID, TELEPORTABLE_ASSET_ID, }; // Substrate @@ -25,10 +26,9 @@ use frame_support::traits::OnInitialize; // Cumulus use emulated_integration_tests_common::{ impl_accounts_helpers_for_parachain, impl_assert_events_helpers_for_parachain, - impl_assets_helpers_for_parachain, impls::Parachain, xcm_emulator::decl_test_parachains, + impl_assets_helpers_for_parachain, impl_foreign_assets_helpers_for_parachain, impls::Parachain, + xcm_emulator::decl_test_parachains, }; -use kusama_emulated_chain::Kusama; -use polkadot_emulated_chain::Polkadot; // Penpal Parachain declaration decl_test_parachains! { @@ -75,7 +75,9 @@ decl_test_parachains! { // Penpal implementation impl_accounts_helpers_for_parachain!(PenpalA); impl_accounts_helpers_for_parachain!(PenpalB); -impl_assets_helpers_for_parachain!(PenpalA, Kusama); -impl_assets_helpers_for_parachain!(PenpalB, Polkadot); +impl_assets_helpers_for_parachain!(PenpalA); +impl_assets_helpers_for_parachain!(PenpalB); +impl_foreign_assets_helpers_for_parachain!(PenpalA, xcm::latest::Location); +impl_foreign_assets_helpers_for_parachain!(PenpalB, xcm::latest::Location); impl_assert_events_helpers_for_parachain!(PenpalA); impl_assert_events_helpers_for_parachain!(PenpalB); diff --git a/integration-tests/emulated/chains/relays/kusama/src/genesis.rs b/integration-tests/emulated/chains/relays/kusama/src/genesis.rs index cc0b844516..b41e03f728 100644 --- a/integration-tests/emulated/chains/relays/kusama/src/genesis.rs +++ b/integration-tests/emulated/chains/relays/kusama/src/genesis.rs @@ -107,7 +107,7 @@ pub fn genesis() -> Storage { }, babe: kusama_runtime::BabeConfig { authorities: Default::default(), - epoch_config: Some(kusama_runtime::BABE_GENESIS_EPOCH_CONFIG), + epoch_config: kusama_runtime::BABE_GENESIS_EPOCH_CONFIG, ..Default::default() }, configuration: kusama_runtime::ConfigurationConfig { config: get_host_config() }, diff --git a/integration-tests/emulated/chains/relays/kusama/src/lib.rs b/integration-tests/emulated/chains/relays/kusama/src/lib.rs index 98ab2db269..ec65fffb83 100644 --- a/integration-tests/emulated/chains/relays/kusama/src/lib.rs +++ b/integration-tests/emulated/chains/relays/kusama/src/lib.rs @@ -24,7 +24,7 @@ use emulated_integration_tests_common::{ // Kusama declaration decl_test_relay_chains! { - #[api_version(10)] + #[api_version(11)] pub struct Kusama { genesis = genesis::genesis(), on_init = (), diff --git a/integration-tests/emulated/chains/relays/polkadot/src/genesis.rs b/integration-tests/emulated/chains/relays/polkadot/src/genesis.rs index 36ea0bfff1..0f9877edb4 100644 --- a/integration-tests/emulated/chains/relays/polkadot/src/genesis.rs +++ b/integration-tests/emulated/chains/relays/polkadot/src/genesis.rs @@ -123,7 +123,7 @@ pub fn genesis() -> Storage { }, babe: polkadot_runtime::BabeConfig { authorities: Default::default(), - epoch_config: Some(polkadot_runtime::BABE_GENESIS_EPOCH_CONFIG), + epoch_config: polkadot_runtime::BABE_GENESIS_EPOCH_CONFIG, ..Default::default() }, configuration: polkadot_runtime::ConfigurationConfig { config: get_host_config() }, diff --git a/integration-tests/emulated/chains/relays/polkadot/src/lib.rs b/integration-tests/emulated/chains/relays/polkadot/src/lib.rs index 8bf8a354ce..62ea7fa069 100644 --- a/integration-tests/emulated/chains/relays/polkadot/src/lib.rs +++ b/integration-tests/emulated/chains/relays/polkadot/src/lib.rs @@ -24,7 +24,7 @@ use emulated_integration_tests_common::{ // Polkadot declaration decl_test_relay_chains! { - #[api_version(10)] + #[api_version(11)] pub struct Polkadot { genesis = genesis::genesis(), on_init = (), diff --git a/integration-tests/emulated/helpers/src/lib.rs b/integration-tests/emulated/helpers/src/lib.rs index 09f7c99fdd..7f29c0e16b 100644 --- a/integration-tests/emulated/helpers/src/lib.rs +++ b/integration-tests/emulated/helpers/src/lib.rs @@ -30,98 +30,7 @@ pub use xcm_emulator::Chain; /// TODO: when bumping to polkadot-sdk v1.8.0, /// remove this crate altogether and get the macros from `emulated-integration-tests-common`. -#[macro_export] -macro_rules! test_sibling_is_trusted_teleporter { - ( $sender_para:ty, $sender_xcm_config:ty, vec![$( $receiver_para:ty ),+], ($assets:expr, $amount:expr) ) => { - $crate::paste::paste! { - // init Origin variables - let sender = [<$sender_para Sender>]::get(); - let mut para_sender_balance_before = - <$sender_para as $crate::Chain>::account_data_of(sender.clone()).free; - let origin = <$sender_para as $crate::Chain>::RuntimeOrigin::signed(sender.clone()); - let fee_asset_item = 0; - let weight_limit = $crate::WeightLimit::Unlimited; - - $( - { - // init Destination variables - let receiver = [<$receiver_para Receiver>]::get(); - let para_receiver_balance_before = - <$receiver_para as $crate::Chain>::account_data_of(receiver.clone()).free; - let para_destination = - <$sender_para>::sibling_location_of(<$receiver_para>::para_id()); - let beneficiary: Location = - $crate::AccountId32 { network: None, id: receiver.clone().into() }.into(); - - // Send XCM message from Origin Parachain - // We are only testing the limited teleport version, which should be ok since success will - // depend only on a proper `XcmConfig` at destination. - <$sender_para>::execute_with(|| { - assert_ok!(<$sender_para as [<$sender_para Pallet>]>::PolkadotXcm::limited_teleport_assets( - origin.clone(), - bx!(para_destination.clone().into()), - bx!(beneficiary.clone().into()), - bx!($assets.clone().into()), - fee_asset_item, - weight_limit.clone(), - )); - - type RuntimeEvent = <$sender_para as $crate::Chain>::RuntimeEvent; - - assert_expected_events!( - $sender_para, - vec![ - RuntimeEvent::PolkadotXcm( - $crate::pallet_xcm::Event::Attempted { outcome: Outcome::Complete { .. } } - ) => {}, - RuntimeEvent::XcmpQueue( - $crate::cumulus_pallet_xcmp_queue::Event::XcmpMessageSent { .. } - ) => {}, - RuntimeEvent::Balances( - $crate::pallet_balances::Event::Burned { who: sender, amount } - ) => {}, - ] - ); - }); - - // Receive XCM message in Destination Parachain - <$receiver_para>::execute_with(|| { - type RuntimeEvent = <$receiver_para as $crate::Chain>::RuntimeEvent; - - assert_expected_events!( - $receiver_para, - vec![ - RuntimeEvent::Balances( - $crate::pallet_balances::Event::Minted { who: receiver, .. } - ) => {}, - RuntimeEvent::MessageQueue( - $crate::pallet_message_queue::Event::Processed { success: true, .. } - ) => {}, - ] - ); - }); - - // Check if balances are updated accordingly in Origin and Destination Parachains - let para_sender_balance_after = - <$sender_para as $crate::Chain>::account_data_of(sender.clone()).free; - let para_receiver_balance_after = - <$receiver_para as $crate::Chain>::account_data_of(receiver.clone()).free; - let delivery_fees = <$sender_para>::execute_with(|| { - $crate::asset_test_utils::xcm_helpers::transfer_assets_delivery_fees::< - <$sender_xcm_config as xcm_executor::Config>::XcmSender, - >($assets.clone(), fee_asset_item, weight_limit.clone(), beneficiary, para_destination) - }); - - assert_eq!(para_sender_balance_before - $amount - delivery_fees, para_sender_balance_after); - assert!(para_receiver_balance_after > para_receiver_balance_before); - - // Update sender balance - para_sender_balance_before = <$sender_para as $crate::Chain>::account_data_of(sender.clone()).free; - } - )+ - } - }; -} +/// TODO: backport this macros to polkadot-sdk #[macro_export] macro_rules! test_relay_is_trusted_teleporter { @@ -198,7 +107,7 @@ macro_rules! test_relay_is_trusted_teleporter { let para_receiver_balance_after = <$receiver_para as $crate::Chain>::account_data_of(receiver.clone()).free; let delivery_fees = <$sender_relay>::execute_with(|| { - $crate::asset_test_utils::xcm_helpers::transfer_assets_delivery_fees::< + $crate::asset_test_utils::xcm_helpers::teleport_assets_delivery_fees::< <$sender_xcm_config as xcm_executor::Config>::XcmSender, >($assets.clone(), fee_asset_item, weight_limit.clone(), beneficiary, para_destination) }); @@ -215,7 +124,7 @@ macro_rules! test_relay_is_trusted_teleporter { } #[macro_export] -macro_rules! test_parachain_is_trusted_teleporter { +macro_rules! test_parachain_is_trusted_teleporter_for_relay { ( $sender_para:ty, $sender_xcm_config:ty, $receiver_relay:ty, $amount:expr ) => { $crate::paste::paste! { // init Origin variables @@ -287,7 +196,7 @@ macro_rules! test_parachain_is_trusted_teleporter { let relay_receiver_balance_after = <$receiver_relay as $crate::Chain>::account_data_of(receiver.clone()).free; let delivery_fees = <$sender_para>::execute_with(|| { - $crate::asset_test_utils::xcm_helpers::transfer_assets_delivery_fees::< + $crate::asset_test_utils::xcm_helpers::teleport_assets_delivery_fees::< <$sender_xcm_config as xcm_executor::Config>::XcmSender, >(assets, fee_asset_item, weight_limit.clone(), beneficiary, relay_destination) }); diff --git a/integration-tests/emulated/tests/assets/asset-hub-kusama/Cargo.toml b/integration-tests/emulated/tests/assets/asset-hub-kusama/Cargo.toml index 3e10c1f40a..18fdb9675a 100644 --- a/integration-tests/emulated/tests/assets/asset-hub-kusama/Cargo.toml +++ b/integration-tests/emulated/tests/assets/asset-hub-kusama/Cargo.toml @@ -31,9 +31,7 @@ polkadot-runtime-common = { workspace = true } parachains-common = { workspace = true, default-features = true } emulated-integration-tests-common = { workspace = true } asset-test-utils = { workspace = true } -cumulus-pallet-parachain-system = { features = [ - "parameterized-consensus-hook", -], workspace = true, default-features = true } +cumulus-pallet-parachain-system = { workspace = true, default-features = true } # Local asset-hub-kusama-runtime = { workspace = true } diff --git a/integration-tests/emulated/tests/assets/asset-hub-kusama/src/lib.rs b/integration-tests/emulated/tests/assets/asset-hub-kusama/src/lib.rs index d738a7ab8b..eb274ac988 100644 --- a/integration-tests/emulated/tests/assets/asset-hub-kusama/src/lib.rs +++ b/integration-tests/emulated/tests/assets/asset-hub-kusama/src/lib.rs @@ -28,24 +28,30 @@ pub use xcm::{ prelude::{AccountId32 as AccountId32Junction, *}, v3::{self, Error, NetworkId::Kusama as KusamaId}, }; +pub use xcm_executor::traits::TransferType; // Cumulus pub use asset_test_utils::xcm_helpers; pub use emulated_integration_tests_common::{ + test_parachain_is_trusted_teleporter, xcm_emulator::{ assert_expected_events, bx, helpers::weight_within_threshold, Chain, Parachain as Para, RelayChain as Relay, Test, TestArgs, TestContext, TestExt, }, xcm_helpers::{xcm_transact_paid_execution, xcm_transact_unpaid_execution}, - PROOF_SIZE_THRESHOLD, REF_TIME_THRESHOLD, XCM_V3, + PROOF_SIZE_THRESHOLD, REF_TIME_THRESHOLD, RESERVABLE_ASSET_ID, XCM_V3, }; -pub use integration_tests_helpers::test_sibling_is_trusted_teleporter; +pub use kusama_runtime::xcm_config::UniversalLocation as KusamaUniversalLocation; pub use kusama_system_emulated_network::{ asset_hub_kusama_emulated_chain::{ - genesis::ED as ASSET_HUB_KUSAMA_ED, AssetHubKusamaParaPallet as AssetHubKusamaPallet, + genesis::{AssetHubKusamaAssetOwner, ED as ASSET_HUB_KUSAMA_ED}, + AssetHubKusamaParaPallet as AssetHubKusamaPallet, }, kusama_emulated_chain::{genesis::ED as KUSAMA_ED, KusamaRelayPallet as KusamaPallet}, - penpal_emulated_chain::PenpalAParaPallet as PenpalAPallet, + penpal_emulated_chain::{ + CustomizableAssetFromSystemAssetHub, PenpalAParaPallet as PenpalAPallet, PenpalAssetOwner, + PenpalBParaPallet as PenpalBPallet, ED as PENPAL_ED, + }, AssetHubKusamaPara as AssetHubKusama, AssetHubKusamaParaReceiver as AssetHubKusamaReceiver, AssetHubKusamaParaSender as AssetHubKusamaSender, BridgeHubKusamaPara as BridgeHubKusama, BridgeHubKusamaParaReceiver as BridgeHubKusamaReceiver, KusamaRelay as Kusama, @@ -56,7 +62,7 @@ pub use kusama_system_emulated_network::{ }; pub use parachains_common::{AccountId, Balance}; -pub const ASSET_ID: u32 = 1; +pub const ASSET_ID: u32 = 3; pub const ASSET_MIN_BALANCE: u128 = 1000; // `Assets` pallet index pub const ASSETS_PALLET_ID: u8 = 50; @@ -66,7 +72,9 @@ pub type RelayToParaTest = Test; pub type SystemParaToRelayTest = Test; pub type SystemParaToParaTest = Test; pub type ParaToSystemParaTest = Test; -pub type ParaToParaTest = Test; +pub type ParaToParaThroughRelayTest = Test; +pub type ParaToParaThroughAHTest = Test; +pub type RelayToParaThroughAHTest = Test; #[cfg(test)] mod tests; 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 new file mode 100644 index 0000000000..893a79315c --- /dev/null +++ b/integration-tests/emulated/tests/assets/asset-hub-kusama/src/tests/hybrid_transfers.rs @@ -0,0 +1,808 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +use super::reserve_transfer::*; +use crate::{ + tests::teleport::do_bidirectional_teleport_foreign_assets_between_para_and_asset_hub_using_xt, + *, +}; +use asset_hub_kusama_runtime::xcm_config::KsmLocation; + +fn para_to_para_assethub_hop_assertions(t: ParaToParaThroughAHTest) { + type RuntimeEvent = ::RuntimeEvent; + let sov_penpal_a_on_ah = AssetHubKusama::sovereign_account_id_of( + AssetHubKusama::sibling_location_of(PenpalA::para_id()), + ); + let sov_penpal_b_on_ah = AssetHubKusama::sovereign_account_id_of( + AssetHubKusama::sibling_location_of(PenpalB::para_id()), + ); + + assert_expected_events!( + AssetHubKusama, + vec![ + // Withdrawn from sender parachain SA + RuntimeEvent::Balances( + pallet_balances::Event::Burned { who, amount } + ) => { + who: *who == sov_penpal_a_on_ah, + amount: *amount == t.args.amount, + }, + // Deposited to receiver parachain SA + RuntimeEvent::Balances( + pallet_balances::Event::Minted { who, .. } + ) => { + who: *who == sov_penpal_b_on_ah, + }, + RuntimeEvent::MessageQueue( + pallet_message_queue::Event::Processed { success: true, .. } + ) => {}, + ] + ); +} + +fn ah_to_para_transfer_assets(t: SystemParaToParaTest) -> DispatchResult { + let fee_idx = t.args.fee_asset_item as usize; + let fee: Asset = t.args.assets.inner().get(fee_idx).cloned().unwrap(); + let custom_xcm_on_dest = Xcm::<()>(vec![DepositAsset { + assets: Wild(AllCounted(t.args.assets.len() as u32)), + beneficiary: t.args.beneficiary, + }]); + ::PolkadotXcm::transfer_assets_using_type_and_then( + t.signed_origin, + bx!(t.args.dest.into()), + bx!(t.args.assets.into()), + bx!(TransferType::LocalReserve), + bx!(fee.id.into()), + bx!(TransferType::LocalReserve), + bx!(VersionedXcm::from(custom_xcm_on_dest)), + t.args.weight_limit, + ) +} + +fn para_to_ah_transfer_assets(t: ParaToSystemParaTest) -> DispatchResult { + let fee_idx = t.args.fee_asset_item as usize; + let fee: Asset = t.args.assets.inner().get(fee_idx).cloned().unwrap(); + let custom_xcm_on_dest = Xcm::<()>(vec![DepositAsset { + assets: Wild(AllCounted(t.args.assets.len() as u32)), + beneficiary: t.args.beneficiary, + }]); + ::PolkadotXcm::transfer_assets_using_type_and_then( + t.signed_origin, + bx!(t.args.dest.into()), + bx!(t.args.assets.into()), + bx!(TransferType::DestinationReserve), + bx!(fee.id.into()), + bx!(TransferType::DestinationReserve), + bx!(VersionedXcm::from(custom_xcm_on_dest)), + t.args.weight_limit, + ) +} + +fn para_to_para_transfer_assets_through_ah(t: ParaToParaThroughAHTest) -> DispatchResult { + let fee_idx = t.args.fee_asset_item as usize; + let fee: Asset = t.args.assets.inner().get(fee_idx).cloned().unwrap(); + let asset_hub_location: Location = PenpalA::sibling_location_of(AssetHubKusama::para_id()); + let custom_xcm_on_dest = Xcm::<()>(vec![DepositAsset { + assets: Wild(AllCounted(t.args.assets.len() as u32)), + beneficiary: t.args.beneficiary, + }]); + ::PolkadotXcm::transfer_assets_using_type_and_then( + t.signed_origin, + bx!(t.args.dest.into()), + bx!(t.args.assets.into()), + bx!(TransferType::RemoteReserve(asset_hub_location.clone().into())), + bx!(fee.id.into()), + bx!(TransferType::RemoteReserve(asset_hub_location.into())), + bx!(VersionedXcm::from(custom_xcm_on_dest)), + t.args.weight_limit, + ) +} + +fn para_to_asset_hub_teleport_foreign_assets(t: ParaToSystemParaTest) -> DispatchResult { + let fee_idx = t.args.fee_asset_item as usize; + let fee: Asset = t.args.assets.inner().get(fee_idx).cloned().unwrap(); + let custom_xcm_on_dest = Xcm::<()>(vec![DepositAsset { + assets: Wild(AllCounted(t.args.assets.len() as u32)), + beneficiary: t.args.beneficiary, + }]); + ::PolkadotXcm::transfer_assets_using_type_and_then( + t.signed_origin, + bx!(t.args.dest.into()), + bx!(t.args.assets.into()), + bx!(TransferType::Teleport), + bx!(fee.id.into()), + bx!(TransferType::DestinationReserve), + bx!(VersionedXcm::from(custom_xcm_on_dest)), + t.args.weight_limit, + ) +} + +fn asset_hub_to_para_teleport_foreign_assets(t: SystemParaToParaTest) -> DispatchResult { + let fee_idx = t.args.fee_asset_item as usize; + let fee: Asset = t.args.assets.inner().get(fee_idx).cloned().unwrap(); + let custom_xcm_on_dest = Xcm::<()>(vec![DepositAsset { + assets: Wild(AllCounted(t.args.assets.len() as u32)), + beneficiary: t.args.beneficiary, + }]); + ::PolkadotXcm::transfer_assets_using_type_and_then( + t.signed_origin, + bx!(t.args.dest.into()), + bx!(t.args.assets.into()), + bx!(TransferType::Teleport), + bx!(fee.id.into()), + bx!(TransferType::LocalReserve), + bx!(VersionedXcm::from(custom_xcm_on_dest)), + t.args.weight_limit, + ) +} + +// =========================================================================== +// ======= Transfer - Native + Bridged Assets - AssetHub->Parachain ========== +// =========================================================================== +/// Transfers of native asset plus bridged asset from AssetHub to some Parachain +/// while paying fees using native asset. +#[test] +fn transfer_foreign_assets_from_asset_hub_to_para() { + let destination = AssetHubKusama::sibling_location_of(PenpalA::para_id()); + let sender = AssetHubKusamaSender::get(); + let native_amount_to_send: Balance = ASSET_HUB_KUSAMA_ED * 10000; + let native_asset_location = KsmLocation::get(); + let receiver = PenpalAReceiver::get(); + let assets_owner = PenpalAssetOwner::get(); + // Foreign asset used: bridged WND + let foreign_amount_to_send = ASSET_HUB_KUSAMA_ED * 10_000_000; + let wnd_at_rococo_parachains = + Location::new(2, [Junction::GlobalConsensus(NetworkId::Westend)]); + + // Configure destination chain to trust AH as reserve of WND + PenpalA::execute_with(|| { + assert_ok!(::System::set_storage( + ::RuntimeOrigin::root(), + vec![( + CustomizableAssetFromSystemAssetHub::key().to_vec(), + Location::new(2, [GlobalConsensus(Westend)]).encode(), + )], + )); + }); + PenpalA::force_create_foreign_asset( + wnd_at_rococo_parachains.clone(), + assets_owner.clone(), + false, + ASSET_MIN_BALANCE, + vec![], + ); + AssetHubKusama::force_create_foreign_asset( + wnd_at_rococo_parachains.clone().try_into().unwrap(), + assets_owner.clone(), + false, + ASSET_MIN_BALANCE, + vec![], + ); + AssetHubKusama::mint_foreign_asset( + ::RuntimeOrigin::signed(assets_owner), + wnd_at_rococo_parachains.clone().try_into().unwrap(), + sender.clone(), + foreign_amount_to_send * 2, + ); + + // Assets to send + let assets: Vec = vec![ + (Parent, native_amount_to_send).into(), + (wnd_at_rococo_parachains.clone(), foreign_amount_to_send).into(), + ]; + let fee_asset_id = AssetId(Parent.into()); + let fee_asset_item = assets.iter().position(|a| a.id == fee_asset_id).unwrap() as u32; + + // Init Test + let test_args = TestContext { + sender: sender.clone(), + receiver: receiver.clone(), + args: TestArgs::new_para( + destination.clone(), + receiver.clone(), + native_amount_to_send, + assets.into(), + None, + fee_asset_item, + ), + }; + let mut test = SystemParaToParaTest::new(test_args); + + // Query initial balances + let sender_balance_before = test.sender.balance; + let sender_wnds_before = AssetHubKusama::execute_with(|| { + type ForeignAssets = ::ForeignAssets; + >::balance( + wnd_at_rococo_parachains.clone().try_into().unwrap(), + &sender, + ) + }); + let receiver_assets_before = PenpalA::execute_with(|| { + type ForeignAssets = ::ForeignAssets; + >::balance(native_asset_location.clone(), &receiver) + }); + let receiver_wnds_before = PenpalA::execute_with(|| { + type ForeignAssets = ::ForeignAssets; + >::balance(wnd_at_rococo_parachains.clone(), &receiver) + }); + + // Set assertions and dispatchables + test.set_assertion::(system_para_to_para_sender_assertions); + test.set_assertion::(system_para_to_para_receiver_assertions); + test.set_dispatchable::(ah_to_para_transfer_assets); + test.assert(); + + // Query final balances + let sender_balance_after = test.sender.balance; + let sender_wnds_after = AssetHubKusama::execute_with(|| { + type ForeignAssets = ::ForeignAssets; + >::balance( + wnd_at_rococo_parachains.clone().try_into().unwrap(), + &sender, + ) + }); + let receiver_assets_after = PenpalA::execute_with(|| { + type ForeignAssets = ::ForeignAssets; + >::balance(native_asset_location, &receiver) + }); + let receiver_wnds_after = PenpalA::execute_with(|| { + type ForeignAssets = ::ForeignAssets; + >::balance(wnd_at_rococo_parachains, &receiver) + }); + + // Sender's balance is reduced by amount sent plus delivery fees + assert!(sender_balance_after < sender_balance_before - native_amount_to_send); + // Sender's balance is reduced by foreign amount sent + assert_eq!(sender_wnds_after, sender_wnds_before - foreign_amount_to_send); + // Receiver's assets is increased + assert!(receiver_assets_after > receiver_assets_before); + // Receiver's assets increased by `amount_to_send - delivery_fees - bought_execution`; + // `delivery_fees` might be paid from transfer or JIT, also `bought_execution` is unknown but + // should be non-zero + assert!(receiver_assets_after < receiver_assets_before + native_amount_to_send); + // Receiver's balance is increased by foreign amount sent + assert_eq!(receiver_wnds_after, receiver_wnds_before + foreign_amount_to_send); +} + +/// Reserve Transfers of native asset from Parachain to System Parachain should work +// =========================================================================== +// ======= Transfer - Native + Bridged Assets - Parachain->AssetHub ========== +// =========================================================================== +/// Transfers of native asset plus bridged asset from some Parachain to AssetHub +/// while paying fees using native asset. +#[test] +fn transfer_foreign_assets_from_para_to_asset_hub() { + // Init values for Parachain + let destination = PenpalA::sibling_location_of(AssetHubKusama::para_id()); + let sender = PenpalASender::get(); + let native_amount_to_send: Balance = ASSET_HUB_KUSAMA_ED * 10000; + let native_asset_location = KsmLocation::get(); + let assets_owner = PenpalAssetOwner::get(); + + // Foreign asset used: bridged WND + let foreign_amount_to_send = ASSET_HUB_KUSAMA_ED * 10_000_000; + let wnd_at_rococo_parachains = + Location::new(2, [Junction::GlobalConsensus(NetworkId::Westend)]); + + // Configure destination chain to trust AH as reserve of WND + PenpalA::execute_with(|| { + assert_ok!(::System::set_storage( + ::RuntimeOrigin::root(), + vec![( + CustomizableAssetFromSystemAssetHub::key().to_vec(), + Location::new(2, [GlobalConsensus(Westend)]).encode(), + )], + )); + }); + PenpalA::force_create_foreign_asset( + wnd_at_rococo_parachains.clone(), + assets_owner.clone(), + false, + ASSET_MIN_BALANCE, + vec![], + ); + AssetHubKusama::force_create_foreign_asset( + wnd_at_rococo_parachains.clone().try_into().unwrap(), + assets_owner.clone(), + false, + ASSET_MIN_BALANCE, + vec![], + ); + + // fund Parachain's sender account + PenpalA::mint_foreign_asset( + ::RuntimeOrigin::signed(assets_owner.clone()), + native_asset_location.clone(), + sender.clone(), + native_amount_to_send * 2, + ); + PenpalA::mint_foreign_asset( + ::RuntimeOrigin::signed(assets_owner.clone()), + wnd_at_rococo_parachains.clone(), + sender.clone(), + foreign_amount_to_send * 2, + ); + + // Init values for System Parachain + let receiver = AssetHubKusamaReceiver::get(); + let penpal_location_as_seen_by_ahr = AssetHubKusama::sibling_location_of(PenpalA::para_id()); + let sov_penpal_on_ahr = AssetHubKusama::sovereign_account_id_of(penpal_location_as_seen_by_ahr); + + // fund Parachain's SA on AssetHub with the assets held in reserve + AssetHubKusama::fund_accounts(vec![(sov_penpal_on_ahr.clone(), native_amount_to_send * 2)]); + AssetHubKusama::mint_foreign_asset( + ::RuntimeOrigin::signed(assets_owner), + wnd_at_rococo_parachains.clone().try_into().unwrap(), + sov_penpal_on_ahr, + foreign_amount_to_send * 2, + ); + + // Assets to send + let assets: Vec = vec![ + (Parent, native_amount_to_send).into(), + (wnd_at_rococo_parachains.clone(), foreign_amount_to_send).into(), + ]; + let fee_asset_id = AssetId(Parent.into()); + let fee_asset_item = assets.iter().position(|a| a.id == fee_asset_id).unwrap() as u32; + + // Init Test + let test_args = TestContext { + sender: sender.clone(), + receiver: receiver.clone(), + args: TestArgs::new_para( + destination.clone(), + receiver.clone(), + native_amount_to_send, + assets.into(), + None, + fee_asset_item, + ), + }; + let mut test = ParaToSystemParaTest::new(test_args); + + // Query initial balances + let sender_native_before = PenpalA::execute_with(|| { + type ForeignAssets = ::ForeignAssets; + >::balance(native_asset_location.clone(), &sender) + }); + let sender_wnds_before = PenpalA::execute_with(|| { + type ForeignAssets = ::ForeignAssets; + >::balance(wnd_at_rococo_parachains.clone(), &sender) + }); + let receiver_native_before = test.receiver.balance; + let receiver_wnds_before = AssetHubKusama::execute_with(|| { + type ForeignAssets = ::ForeignAssets; + >::balance( + wnd_at_rococo_parachains.clone().try_into().unwrap(), + &receiver, + ) + }); + + // Set assertions and dispatchables + test.set_assertion::(para_to_system_para_sender_assertions); + test.set_assertion::(para_to_system_para_receiver_assertions); + test.set_dispatchable::(para_to_ah_transfer_assets); + test.assert(); + + // Query final balances + let sender_native_after = PenpalA::execute_with(|| { + type ForeignAssets = ::ForeignAssets; + >::balance(native_asset_location, &sender) + }); + let sender_wnds_after = PenpalA::execute_with(|| { + type ForeignAssets = ::ForeignAssets; + >::balance(wnd_at_rococo_parachains.clone(), &sender) + }); + let receiver_native_after = test.receiver.balance; + let receiver_wnds_after = AssetHubKusama::execute_with(|| { + type ForeignAssets = ::ForeignAssets; + >::balance( + wnd_at_rococo_parachains.try_into().unwrap(), + &receiver, + ) + }); + + // Sender's balance is reduced by amount sent plus delivery fees + assert!(sender_native_after < sender_native_before - native_amount_to_send); + // Sender's balance is reduced by foreign amount sent + assert_eq!(sender_wnds_after, sender_wnds_before - foreign_amount_to_send); + // Receiver's balance is increased + assert!(receiver_native_after > receiver_native_before); + // Receiver's balance increased by `amount_to_send - delivery_fees - bought_execution`; + // `delivery_fees` might be paid from transfer or JIT, also `bought_execution` is unknown but + // should be non-zero + assert!(receiver_native_after < receiver_native_before + native_amount_to_send); + // Receiver's balance is increased by foreign amount sent + assert_eq!(receiver_wnds_after, receiver_wnds_before + foreign_amount_to_send); +} + +// ============================================================================== +// ===== Transfer - Native + Bridged Assets - Parachain->AssetHub->Parachain ==== +// ============================================================================== +/// Transfers of native asset plus bridged asset from Parachain to Parachain +/// (through AssetHub reserve) with fees paid using native asset. +#[test] +fn transfer_foreign_assets_from_para_to_para_through_asset_hub() { + // Init values for Parachain Origin + let destination = PenpalA::sibling_location_of(PenpalB::para_id()); + let sender = PenpalASender::get(); + let roc_to_send: Balance = KUSAMA_ED * 10000; + let assets_owner = PenpalAssetOwner::get(); + let roc_location = KsmLocation::get(); + let sender_as_seen_by_ah = AssetHubKusama::sibling_location_of(PenpalA::para_id()); + let sov_of_sender_on_ah = AssetHubKusama::sovereign_account_id_of(sender_as_seen_by_ah); + let receiver_as_seen_by_ah = AssetHubKusama::sibling_location_of(PenpalB::para_id()); + let sov_of_receiver_on_ah = AssetHubKusama::sovereign_account_id_of(receiver_as_seen_by_ah); + let wnd_to_send = ASSET_HUB_KUSAMA_ED * 10_000_000; + + // Configure destination chain to trust AH as reserve of WND + PenpalB::execute_with(|| { + assert_ok!(::System::set_storage( + ::RuntimeOrigin::root(), + vec![( + CustomizableAssetFromSystemAssetHub::key().to_vec(), + Location::new(2, [GlobalConsensus(Westend)]).encode(), + )], + )); + }); + + // Register WND as foreign asset and transfer it around the Kusama ecosystem + let wnd_at_rococo_parachains = + Location::new(2, [Junction::GlobalConsensus(NetworkId::Westend)]); + AssetHubKusama::force_create_foreign_asset( + wnd_at_rococo_parachains.clone().try_into().unwrap(), + assets_owner.clone(), + false, + ASSET_MIN_BALANCE, + vec![], + ); + PenpalA::force_create_foreign_asset( + wnd_at_rococo_parachains.clone(), + assets_owner.clone(), + false, + ASSET_MIN_BALANCE, + vec![], + ); + PenpalB::force_create_foreign_asset( + wnd_at_rococo_parachains.clone(), + assets_owner.clone(), + false, + ASSET_MIN_BALANCE, + vec![], + ); + + // fund Parachain's sender account + PenpalA::mint_foreign_asset( + ::RuntimeOrigin::signed(assets_owner.clone()), + roc_location.clone(), + sender.clone(), + roc_to_send * 2, + ); + PenpalA::mint_foreign_asset( + ::RuntimeOrigin::signed(assets_owner.clone()), + wnd_at_rococo_parachains.clone(), + sender.clone(), + wnd_to_send * 2, + ); + // fund the Parachain Origin's SA on Asset Hub with the assets held in reserve + AssetHubKusama::fund_accounts(vec![(sov_of_sender_on_ah.clone(), roc_to_send * 2)]); + AssetHubKusama::mint_foreign_asset( + ::RuntimeOrigin::signed(assets_owner), + wnd_at_rococo_parachains.clone().try_into().unwrap(), + sov_of_sender_on_ah.clone(), + wnd_to_send * 2, + ); + + // Init values for Parachain Destination + let receiver = PenpalBReceiver::get(); + + // Assets to send + let assets: Vec = vec![ + (roc_location.clone(), roc_to_send).into(), + (wnd_at_rococo_parachains.clone(), wnd_to_send).into(), + ]; + let fee_asset_id: AssetId = roc_location.clone().into(); + let fee_asset_item = assets.iter().position(|a| a.id == fee_asset_id).unwrap() as u32; + + // Init Test + let test_args = TestContext { + sender: sender.clone(), + receiver: receiver.clone(), + args: TestArgs::new_para( + destination, + receiver.clone(), + roc_to_send, + assets.into(), + None, + fee_asset_item, + ), + }; + let mut test = ParaToParaThroughAHTest::new(test_args); + + // Query initial balances + let sender_rocs_before = PenpalA::execute_with(|| { + type ForeignAssets = ::ForeignAssets; + >::balance(roc_location.clone(), &sender) + }); + let sender_wnds_before = PenpalA::execute_with(|| { + type ForeignAssets = ::ForeignAssets; + >::balance(wnd_at_rococo_parachains.clone(), &sender) + }); + let rocs_in_sender_reserve_on_ahr_before = + ::account_data_of(sov_of_sender_on_ah.clone()).free; + let wnds_in_sender_reserve_on_ahr_before = AssetHubKusama::execute_with(|| { + type Assets = ::ForeignAssets; + >::balance( + wnd_at_rococo_parachains.clone().try_into().unwrap(), + &sov_of_sender_on_ah, + ) + }); + let rocs_in_receiver_reserve_on_ahr_before = + ::account_data_of(sov_of_receiver_on_ah.clone()).free; + let wnds_in_receiver_reserve_on_ahr_before = AssetHubKusama::execute_with(|| { + type Assets = ::ForeignAssets; + >::balance( + wnd_at_rococo_parachains.clone().try_into().unwrap(), + &sov_of_receiver_on_ah, + ) + }); + let receiver_rocs_before = PenpalB::execute_with(|| { + type ForeignAssets = ::ForeignAssets; + >::balance(roc_location.clone(), &receiver) + }); + let receiver_wnds_before = PenpalB::execute_with(|| { + type ForeignAssets = ::ForeignAssets; + >::balance(wnd_at_rococo_parachains.clone(), &receiver) + }); + + // Set assertions and dispatchables + test.set_assertion::(para_to_para_through_hop_sender_assertions); + test.set_assertion::(para_to_para_assethub_hop_assertions); + test.set_assertion::(para_to_para_through_hop_receiver_assertions); + test.set_dispatchable::(para_to_para_transfer_assets_through_ah); + test.assert(); + + // Query final balances + let sender_rocs_after = PenpalA::execute_with(|| { + type ForeignAssets = ::ForeignAssets; + >::balance(roc_location.clone(), &sender) + }); + let sender_wnds_after = PenpalA::execute_with(|| { + type ForeignAssets = ::ForeignAssets; + >::balance(wnd_at_rococo_parachains.clone(), &sender) + }); + let wnds_in_sender_reserve_on_ahr_after = AssetHubKusama::execute_with(|| { + type Assets = ::ForeignAssets; + >::balance( + wnd_at_rococo_parachains.clone().try_into().unwrap(), + &sov_of_sender_on_ah, + ) + }); + let rocs_in_sender_reserve_on_ahr_after = + ::account_data_of(sov_of_sender_on_ah).free; + let wnds_in_receiver_reserve_on_ahr_after = AssetHubKusama::execute_with(|| { + type Assets = ::ForeignAssets; + >::balance( + wnd_at_rococo_parachains.clone().try_into().unwrap(), + &sov_of_receiver_on_ah, + ) + }); + let rocs_in_receiver_reserve_on_ahr_after = + ::account_data_of(sov_of_receiver_on_ah).free; + let receiver_rocs_after = PenpalB::execute_with(|| { + type ForeignAssets = ::ForeignAssets; + >::balance(roc_location, &receiver) + }); + let receiver_wnds_after = PenpalB::execute_with(|| { + type ForeignAssets = ::ForeignAssets; + >::balance(wnd_at_rococo_parachains, &receiver) + }); + + // Sender's balance is reduced by amount sent plus delivery fees + assert!(sender_rocs_after < sender_rocs_before - roc_to_send); + assert_eq!(sender_wnds_after, sender_wnds_before - wnd_to_send); + // Sovereign accounts on reserve are changed accordingly + assert_eq!( + rocs_in_sender_reserve_on_ahr_after, + rocs_in_sender_reserve_on_ahr_before - roc_to_send + ); + assert_eq!( + wnds_in_sender_reserve_on_ahr_after, + wnds_in_sender_reserve_on_ahr_before - wnd_to_send + ); + assert!(rocs_in_receiver_reserve_on_ahr_after > rocs_in_receiver_reserve_on_ahr_before); + assert_eq!( + wnds_in_receiver_reserve_on_ahr_after, + wnds_in_receiver_reserve_on_ahr_before + wnd_to_send + ); + // Receiver's balance is increased + assert!(receiver_rocs_after > receiver_rocs_before); + assert_eq!(receiver_wnds_after, receiver_wnds_before + wnd_to_send); +} + +// ============================================================================================== +// ==== Bidirectional Transfer - Native + Teleportable Foreign Assets - Parachain<->AssetHub ==== +// ============================================================================================== +/// Transfers of native asset plus teleportable foreign asset from Parachain to AssetHub and back +/// with fees paid using native asset. +#[test] +fn bidirectional_teleport_foreign_asset_between_para_and_asset_hub_using_explicit_transfer_types() { + do_bidirectional_teleport_foreign_assets_between_para_and_asset_hub_using_xt( + para_to_asset_hub_teleport_foreign_assets, + asset_hub_to_para_teleport_foreign_assets, + ); +} + +// =============================================================== +// ===== Transfer - Native Asset - Relay->AssetHub->Parachain ==== +// =============================================================== +/// Transfers of native asset Relay to Parachain (using AssetHub reserve). Parachains want to avoid +/// managing SAs on all system chains, thus want all their DOT-in-reserve to be held in their +/// Sovereign Account on Asset Hub. +#[test] +fn transfer_native_asset_from_relay_to_para_through_asset_hub() { + // Init values for Relay + let destination = Kusama::child_location_of(PenpalA::para_id()); + let sender = KusamaSender::get(); + let amount_to_send: Balance = KUSAMA_ED * 1000; + + // Init values for Parachain + let relay_native_asset_location = KsmLocation::get(); + let receiver = PenpalAReceiver::get(); + + // Init Test + let test_args = TestContext { + sender, + receiver: receiver.clone(), + args: TestArgs::new_relay(destination.clone(), receiver.clone(), amount_to_send), + }; + let mut test = RelayToParaThroughAHTest::new(test_args); + + let sov_penpal_on_ah = AssetHubKusama::sovereign_account_id_of( + AssetHubKusama::sibling_location_of(PenpalA::para_id()), + ); + // Query initial balances + let sender_balance_before = test.sender.balance; + let sov_penpal_on_ah_before = AssetHubKusama::execute_with(|| { + ::Balances::free_balance(sov_penpal_on_ah.clone()) + }); + let receiver_assets_before = PenpalA::execute_with(|| { + type ForeignAssets = ::ForeignAssets; + >::balance(relay_native_asset_location.clone(), &receiver) + }); + + fn relay_assertions(t: RelayToParaThroughAHTest) { + type RuntimeEvent = ::RuntimeEvent; + Kusama::assert_xcm_pallet_attempted_complete(None); + assert_expected_events!( + Kusama, + vec![ + // Amount to teleport is withdrawn from Sender + RuntimeEvent::Balances(pallet_balances::Event::Burned { who, amount }) => { + who: *who == t.sender.account_id, + amount: *amount == t.args.amount, + }, + // Amount to teleport is deposited in Relay's `CheckAccount` + RuntimeEvent::Balances(pallet_balances::Event::Minted { who, amount }) => { + who: *who == ::XcmPallet::check_account(), + amount: *amount == t.args.amount, + }, + ] + ); + } + fn asset_hub_assertions(_: RelayToParaThroughAHTest) { + type RuntimeEvent = ::RuntimeEvent; + let sov_penpal_on_ah = AssetHubKusama::sovereign_account_id_of( + AssetHubKusama::sibling_location_of(PenpalA::para_id()), + ); + assert_expected_events!( + AssetHubKusama, + vec![ + // Deposited to receiver parachain SA + RuntimeEvent::Balances( + pallet_balances::Event::Minted { who, .. } + ) => { + who: *who == sov_penpal_on_ah, + }, + RuntimeEvent::MessageQueue( + pallet_message_queue::Event::Processed { success: true, .. } + ) => {}, + ] + ); + } + fn penpal_assertions(t: RelayToParaThroughAHTest) { + type RuntimeEvent = ::RuntimeEvent; + let expected_id = t.args.assets.into_inner().first().unwrap().id.0.clone(); + assert_expected_events!( + PenpalA, + vec![ + RuntimeEvent::ForeignAssets(pallet_assets::Event::Issued { asset_id, owner, .. }) => { + asset_id: *asset_id == expected_id, + owner: *owner == t.receiver.account_id, + }, + ] + ); + } + fn transfer_assets_dispatchable(t: RelayToParaThroughAHTest) -> DispatchResult { + let fee_idx = t.args.fee_asset_item as usize; + let fee: Asset = t.args.assets.inner().get(fee_idx).cloned().unwrap(); + let asset_hub_location = Kusama::child_location_of(AssetHubKusama::para_id()); + let context = KusamaUniversalLocation::get(); + + // reanchor fees to the view of destination (Penpal) + let mut remote_fees = fee.clone().reanchored(&t.args.dest, &context).unwrap(); + if let Fungible(ref mut amount) = remote_fees.fun { + // we already spent some fees along the way, just use half of what we started with + *amount /= 2; + } + let xcm_on_final_dest = Xcm::<()>(vec![ + BuyExecution { fees: remote_fees, weight_limit: t.args.weight_limit.clone() }, + DepositAsset { + assets: Wild(AllCounted(t.args.assets.len() as u32)), + beneficiary: t.args.beneficiary, + }, + ]); + + // reanchor final dest (Penpal) to the view of hop (Asset Hub) + let mut dest = t.args.dest.clone(); + dest.reanchor(&asset_hub_location, &context).unwrap(); + // on Asset Hub, forward assets to Penpal + let xcm_on_hop = Xcm::<()>(vec![DepositReserveAsset { + assets: Wild(AllCounted(t.args.assets.len() as u32)), + dest, + xcm: xcm_on_final_dest, + }]); + + // First leg is a teleport, from there a local-reserve-transfer to final dest + ::XcmPallet::transfer_assets_using_type_and_then( + t.signed_origin, + bx!(asset_hub_location.into()), + bx!(t.args.assets.into()), + bx!(TransferType::Teleport), + bx!(fee.id.into()), + bx!(TransferType::Teleport), + bx!(VersionedXcm::from(xcm_on_hop)), + t.args.weight_limit, + ) + } + + // Set assertions and dispatchables + test.set_assertion::(relay_assertions); + test.set_assertion::(asset_hub_assertions); + test.set_assertion::(penpal_assertions); + test.set_dispatchable::(transfer_assets_dispatchable); + test.assert(); + + // Query final balances + let sender_balance_after = test.sender.balance; + let sov_penpal_on_ah_after = AssetHubKusama::execute_with(|| { + ::Balances::free_balance(sov_penpal_on_ah) + }); + let receiver_assets_after = PenpalA::execute_with(|| { + type ForeignAssets = ::ForeignAssets; + >::balance(relay_native_asset_location, &receiver) + }); + + // Sender's balance is reduced by amount sent plus delivery fees + assert!(sender_balance_after < sender_balance_before - amount_to_send); + // SA on AH balance is increased + assert!(sov_penpal_on_ah_after > sov_penpal_on_ah_before); + // Receiver's asset balance is increased + assert!(receiver_assets_after > receiver_assets_before); + // Receiver's asset balance increased by `amount_to_send - delivery_fees - bought_execution`; + // `delivery_fees` might be paid from transfer or JIT, also `bought_execution` is unknown but + // should be non-zero + assert!(receiver_assets_after < receiver_assets_before + amount_to_send); +} diff --git a/integration-tests/emulated/tests/assets/asset-hub-kusama/src/tests/mod.rs b/integration-tests/emulated/tests/assets/asset-hub-kusama/src/tests/mod.rs index 7e60ad90b2..8fffec23d7 100644 --- a/integration-tests/emulated/tests/assets/asset-hub-kusama/src/tests/mod.rs +++ b/integration-tests/emulated/tests/assets/asset-hub-kusama/src/tests/mod.rs @@ -14,17 +14,10 @@ // limitations under the License. mod claim_assets; +mod hybrid_transfers; mod reserve_transfer; mod send; mod set_xcm_versions; mod swap; mod teleport; mod treasury; - -use crate::*; -emulated_integration_tests_common::include_penpal_create_foreign_asset_on_asset_hub!( - PenpalA, - AssetHubKusama, - KUSAMA_ED, - system_parachains_constants::kusama::fee::WeightToFee -); 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 38714e6d90..1c5b9b6d57 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 @@ -14,9 +14,8 @@ // limitations under the License. use crate::*; -use asset_hub_kusama_runtime::xcm_config::XcmConfig as AssetHubKusamaXcmConfig; -use kusama_runtime::xcm_config::XcmConfig as KusamaXcmConfig; -use kusama_system_emulated_network::penpal_emulated_chain::XcmConfig as PenpalKusamaXcmConfig; +use asset_hub_kusama_runtime::xcm_config::KsmLocation; +use kusama_system_emulated_network::penpal_emulated_chain::LocalReservableFromAssetHub as PenpalLocalReservableFromAssetHub; fn relay_to_para_sender_assertions(t: RelayToParaTest) { type RuntimeEvent = ::RuntimeEvent; @@ -39,7 +38,7 @@ fn relay_to_para_sender_assertions(t: RelayToParaTest) { ); } -fn system_para_to_para_sender_assertions(t: SystemParaToParaTest) { +pub fn system_para_to_para_sender_assertions(t: SystemParaToParaTest) { type RuntimeEvent = ::RuntimeEvent; AssetHubKusama::assert_xcm_pallet_attempted_complete(Some(Weight::from_parts( 864_610_000, @@ -63,12 +62,34 @@ fn system_para_to_para_sender_assertions(t: SystemParaToParaTest) { ); } -fn para_receiver_assertions(_: Test) { +pub fn system_para_to_para_receiver_assertions(t: SystemParaToParaTest) { type RuntimeEvent = ::RuntimeEvent; + + PenpalB::assert_xcmp_queue_success(None); + for asset in t.args.assets.into_inner().into_iter() { + let expected_id = asset.id.0; + assert_expected_events!( + PenpalB, + vec![ + RuntimeEvent::ForeignAssets(pallet_assets::Event::Issued { asset_id, owner, .. }) => { + asset_id: *asset_id == expected_id, + owner: *owner == t.receiver.account_id, + }, + ] + ); + } +} + +fn relay_to_para_assets_receiver_assertions(t: RelayToParaTest) { + type RuntimeEvent = ::RuntimeEvent; + assert_expected_events!( PenpalA, vec![ - RuntimeEvent::Balances(pallet_balances::Event::Deposit { .. }) => {}, + RuntimeEvent::ForeignAssets(pallet_assets::Event::Issued { asset_id, owner, .. }) => { + asset_id: *asset_id == KsmLocation::get(), + owner: *owner == t.receiver.account_id, + }, RuntimeEvent::MessageQueue( pallet_message_queue::Event::Processed { success: true, .. } ) => {}, @@ -76,25 +97,29 @@ fn para_receiver_assertions(_: Test) { ); } -fn para_to_system_para_sender_assertions(t: ParaToSystemParaTest) { +pub fn para_to_system_para_sender_assertions(t: ParaToSystemParaTest) { type RuntimeEvent = ::RuntimeEvent; - PenpalA::assert_xcm_pallet_attempted_complete(Some(Weight::from_parts(864_610_000, 8_799))); - assert_expected_events!( - PenpalA, - vec![ - // Amount to reserve transfer is transferred to Parachain's Sovereign account - RuntimeEvent::Balances( - pallet_balances::Event::Withdraw { who, amount } - ) => { - who: *who == t.sender.account_id, - amount: *amount == t.args.amount, - }, - ] - ); + PenpalA::assert_xcm_pallet_attempted_complete(None); + for asset in t.args.assets.into_inner().into_iter() { + let expected_id = asset.id.0; + let asset_amount = if let Fungible(a) = asset.fun { Some(a) } else { None }.unwrap(); + assert_expected_events!( + PenpalA, + vec![ + RuntimeEvent::ForeignAssets( + pallet_assets::Event::Burned { asset_id, owner, balance } + ) => { + asset_id: *asset_id == expected_id, + owner: *owner == t.sender.account_id, + balance: *balance == asset_amount, + }, + ] + ); + } } -fn para_to_system_para_receiver_assertions(t: ParaToSystemParaTest) { +pub fn para_to_system_para_receiver_assertions(t: ParaToSystemParaTest) { type RuntimeEvent = ::RuntimeEvent; let sov_penpal_on_ahk = AssetHubKusama::sovereign_account_id_of( AssetHubKusama::sibling_location_of(PenpalA::para_id()), @@ -124,7 +149,6 @@ fn system_para_to_para_assets_sender_assertions(t: SystemParaToParaTest) { 864_610_000, 8799, ))); - assert_expected_events!( AssetHubKusama, vec![ @@ -132,53 +156,72 @@ fn system_para_to_para_assets_sender_assertions(t: SystemParaToParaTest) { RuntimeEvent::Assets( pallet_assets::Event::Transferred { asset_id, from, to, amount } ) => { - asset_id: *asset_id == ASSET_ID, + asset_id: *asset_id == RESERVABLE_ASSET_ID, from: *from == t.sender.account_id, to: *to == AssetHubKusama::sovereign_account_id_of( t.args.dest.clone() ), amount: *amount == t.args.amount, }, + // Native asset to pay for fees is transferred to Parachain's Sovereign account + RuntimeEvent::Balances(pallet_balances::Event::Minted { who, .. }) => { + who: *who == AssetHubKusama::sovereign_account_id_of( + t.args.dest.clone() + ), + }, + // Transport fees are paid + RuntimeEvent::PolkadotXcm( + pallet_xcm::Event::FeesPaid { .. } + ) => {}, ] ); } -fn system_para_to_para_assets_receiver_assertions(_: Test) { +fn system_para_to_para_assets_receiver_assertions(t: SystemParaToParaTest) { type RuntimeEvent = ::RuntimeEvent; + + let system_para_asset_location = PenpalLocalReservableFromAssetHub::get(); + PenpalA::assert_xcmp_queue_success(None); assert_expected_events!( PenpalA, vec![ - RuntimeEvent::Balances(pallet_balances::Event::Deposit { .. }) => {}, - RuntimeEvent::Assets(pallet_assets::Event::Issued { .. }) => {}, - RuntimeEvent::MessageQueue( - pallet_message_queue::Event::Processed { success: true, .. } - ) => {}, + RuntimeEvent::ForeignAssets(pallet_assets::Event::Issued { asset_id, owner, .. }) => { + asset_id: *asset_id == KsmLocation::get(), + owner: *owner == t.receiver.account_id, + }, + RuntimeEvent::ForeignAssets(pallet_assets::Event::Issued { asset_id, owner, amount }) => { + asset_id: *asset_id == system_para_asset_location, + owner: *owner == t.receiver.account_id, + amount: *amount == t.args.amount, + }, ] ); } -fn para_to_para_sender_assertions(t: ParaToParaTest) { +pub fn para_to_para_through_hop_sender_assertions(t: Test) { type RuntimeEvent = ::RuntimeEvent; + PenpalA::assert_xcm_pallet_attempted_complete(None); - assert_expected_events!( - PenpalA, - vec![ - // Amount to reserve transfer is transferred to Parachain's Sovereign account - RuntimeEvent::Balances( - pallet_balances::Event::Withdraw { who, amount } - ) => { - who: *who == t.sender.account_id, - amount: *amount == t.args.amount, - }, - // XCM sent to relay reserve - RuntimeEvent::ParachainSystem( - cumulus_pallet_parachain_system::Event::UpwardMessageSent { .. } - ) => {}, - ] - ); + for asset in t.args.assets.into_inner() { + let expected_id = asset.id.0.clone(); + let amount = if let Fungible(a) = asset.fun { Some(a) } else { None }.unwrap(); + assert_expected_events!( + PenpalA, + vec![ + // Amount to reserve transfer is transferred to Parachain's Sovereign account + RuntimeEvent::ForeignAssets( + pallet_assets::Event::Burned { asset_id, owner, balance }, + ) => { + asset_id: *asset_id == expected_id, + owner: *owner == t.sender.account_id, + balance: *balance == amount, + }, + ] + ); + } } -fn para_to_para_relay_hop_assertions(t: ParaToParaTest) { +fn para_to_para_relay_hop_assertions(t: ParaToParaThroughRelayTest) { type RuntimeEvent = ::RuntimeEvent; let sov_penpal_a_on_kusama = Kusama::sovereign_account_id_of(Kusama::child_location_of(PenpalA::para_id())); @@ -207,17 +250,22 @@ fn para_to_para_relay_hop_assertions(t: ParaToParaTest) { ); } -fn para_to_para_receiver_assertions(_: ParaToParaTest) { +pub fn para_to_para_through_hop_receiver_assertions(t: Test) { type RuntimeEvent = ::RuntimeEvent; - assert_expected_events!( - PenpalB, - vec![ - RuntimeEvent::Balances(pallet_balances::Event::Deposit { .. }) => {}, - RuntimeEvent::MessageQueue( - pallet_message_queue::Event::Processed { success: true, .. } - ) => {}, - ] - ); + + PenpalB::assert_xcmp_queue_success(None); + for asset in t.args.assets.into_inner().into_iter() { + let expected_id = asset.id.0; + assert_expected_events!( + PenpalB, + vec![ + RuntimeEvent::ForeignAssets(pallet_assets::Event::Issued { asset_id, owner, .. }) => { + asset_id: *asset_id == expected_id, + owner: *owner == t.receiver.account_id, + }, + ] + ); + } } fn relay_to_para_reserve_transfer_assets(t: RelayToParaTest) -> DispatchResult { @@ -253,7 +301,9 @@ fn para_to_system_para_reserve_transfer_assets(t: ParaToSystemParaTest) -> Dispa ) } -fn para_to_para_limited_reserve_transfer_assets(t: ParaToParaTest) -> DispatchResult { +fn para_to_para_through_relay_limited_reserve_transfer_assets( + t: ParaToParaThroughRelayTest, +) -> DispatchResult { ::PolkadotXcm::limited_reserve_transfer_assets( t.signed_origin, bx!(t.args.dest.into()), @@ -338,42 +388,49 @@ fn reserve_transfer_native_asset_from_system_para_to_relay_fails() { fn reserve_transfer_native_asset_from_relay_to_para() { // Init values for Relay let destination = Kusama::child_location_of(PenpalA::para_id()); - let beneficiary_id = PenpalAReceiver::get(); + let sender = KusamaSender::get(); let amount_to_send: Balance = KUSAMA_ED * 1000; + // Init values for Parachain + let relay_native_asset_location = KsmLocation::get(); + let receiver = PenpalAReceiver::get(); + + // Init Test let test_args = TestContext { - sender: KusamaSender::get(), - receiver: PenpalAReceiver::get(), - args: TestArgs::new_relay(destination, beneficiary_id, amount_to_send), + sender, + receiver: receiver.clone(), + args: TestArgs::new_relay(destination.clone(), receiver.clone(), amount_to_send), }; - let mut test = RelayToParaTest::new(test_args); + // Query initial balances let sender_balance_before = test.sender.balance; - let receiver_balance_before = test.receiver.balance; + let receiver_assets_before = PenpalA::execute_with(|| { + type ForeignAssets = ::ForeignAssets; + >::balance(relay_native_asset_location.clone(), &receiver) + }); + // Set assertions and dispatchables test.set_assertion::(relay_to_para_sender_assertions); - test.set_assertion::(para_receiver_assertions); + test.set_assertion::(relay_to_para_assets_receiver_assertions); test.set_dispatchable::(relay_to_para_reserve_transfer_assets); test.assert(); - let delivery_fees = Kusama::execute_with(|| { - xcm_helpers::transfer_assets_delivery_fees::< - ::XcmSender, - >(test.args.assets.clone(), 0, test.args.weight_limit, test.args.beneficiary, test.args.dest) - }); - + // Query final balances let sender_balance_after = test.sender.balance; - let receiver_balance_after = test.receiver.balance; + let receiver_assets_after = PenpalA::execute_with(|| { + type ForeignAssets = ::ForeignAssets; + >::balance(relay_native_asset_location, &receiver) + }); - // Sender's balance is reduced - assert_eq!(sender_balance_before - amount_to_send - delivery_fees, sender_balance_after); - // Receiver's balance is increased - assert!(receiver_balance_after > receiver_balance_before); - // Receiver's balance increased by `amount_to_send - delivery_fees - bought_execution`; + // Sender's balance is reduced by amount sent plus delivery fees + assert!(sender_balance_after < sender_balance_before - amount_to_send); + // Receiver's asset balance is increased + assert!(receiver_assets_after > receiver_assets_before); + // Receiver's asset balance increased by `amount_to_send - delivery_fees - bought_execution`; // `delivery_fees` might be paid from transfer or JIT, also `bought_execution` is unknown but // should be non-zero - assert!(receiver_balance_after < receiver_balance_before + amount_to_send); + assert!(receiver_assets_after < receiver_assets_before + amount_to_send); } /// Reserve Transfers of native asset from System Parachain to Parachain should work @@ -381,87 +438,123 @@ fn reserve_transfer_native_asset_from_relay_to_para() { fn reserve_transfer_native_asset_from_system_para_to_para() { // Init values for System Parachain let destination = AssetHubKusama::sibling_location_of(PenpalA::para_id()); - let beneficiary_id = PenpalAReceiver::get(); - let amount_to_send: Balance = ASSET_HUB_KUSAMA_ED * 1000; - let assets = (Parent, amount_to_send).into(); + let sender = AssetHubKusamaSender::get(); + let amount_to_send: Balance = ASSET_HUB_KUSAMA_ED * 10000; + let assets: Assets = (Parent, amount_to_send).into(); + + // Init values for Parachain + let system_para_native_asset_location = KsmLocation::get(); + let receiver = PenpalAReceiver::get(); + // Init Test let test_args = TestContext { - sender: AssetHubKusamaSender::get(), - receiver: PenpalAReceiver::get(), - args: TestArgs::new_para(destination, beneficiary_id, amount_to_send, assets, None, 0), + sender, + receiver: receiver.clone(), + args: TestArgs::new_para( + destination.clone(), + receiver.clone(), + amount_to_send, + assets.clone(), + None, + 0, + ), }; - let mut test = SystemParaToParaTest::new(test_args); + // Query initial balances let sender_balance_before = test.sender.balance; - let receiver_balance_before = test.receiver.balance; + let receiver_assets_before = PenpalA::execute_with(|| { + type ForeignAssets = ::ForeignAssets; + >::balance(system_para_native_asset_location.clone(), &receiver) + }); + // Set assertions and dispatchables test.set_assertion::(system_para_to_para_sender_assertions); - test.set_assertion::(para_receiver_assertions); + test.set_assertion::(system_para_to_para_receiver_assertions); test.set_dispatchable::(system_para_to_para_reserve_transfer_assets); test.assert(); + // Query final balances let sender_balance_after = test.sender.balance; - let receiver_balance_after = test.receiver.balance; - - let delivery_fees = AssetHubKusama::execute_with(|| { - xcm_helpers::transfer_assets_delivery_fees::< - ::XcmSender, - >(test.args.assets.clone(), 0, test.args.weight_limit, test.args.beneficiary, test.args.dest) + let receiver_assets_after = PenpalA::execute_with(|| { + type ForeignAssets = ::ForeignAssets; + >::balance(system_para_native_asset_location, &receiver) }); - // Sender's balance is reduced - assert_eq!(sender_balance_before - amount_to_send - delivery_fees, sender_balance_after); - // Receiver's balance is increased - assert!(receiver_balance_after > receiver_balance_before); - // Receiver's balance increased by `amount_to_send - delivery_fees - bought_execution`; + // Sender's balance is reduced by amount sent plus delivery fees + assert!(sender_balance_after < sender_balance_before - amount_to_send); + // Receiver's assets is increased + assert!(receiver_assets_after > receiver_assets_before); + // Receiver's assets increased by `amount_to_send - delivery_fees - bought_execution`; // `delivery_fees` might be paid from transfer or JIT, also `bought_execution` is unknown but // should be non-zero - assert!(receiver_balance_after < receiver_balance_before + amount_to_send); + assert!(receiver_assets_after < receiver_assets_before + amount_to_send); } /// Reserve Transfers of native asset from Parachain to System Parachain should work #[test] fn reserve_transfer_native_asset_from_para_to_system_para() { - // Init values for Penpal Parachain + // Init values for Parachain let destination = PenpalA::sibling_location_of(AssetHubKusama::para_id()); - let beneficiary_id = AssetHubKusamaReceiver::get(); - let amount_to_send: Balance = ASSET_HUB_KUSAMA_ED * 1000; - let assets = (Parent, amount_to_send).into(); + let sender = PenpalASender::get(); + let amount_to_send: Balance = ASSET_HUB_KUSAMA_ED * 10000; + let assets: Assets = (Parent, amount_to_send).into(); + let system_para_native_asset_location = KsmLocation::get(); + let asset_owner = PenpalAssetOwner::get(); + + // fund Parachain's sender account + PenpalA::mint_foreign_asset( + ::RuntimeOrigin::signed(asset_owner), + system_para_native_asset_location.clone(), + sender.clone(), + amount_to_send * 2, + ); + + // Init values for System Parachain + let receiver = AssetHubKusamaReceiver::get(); + let penpal_location_as_seen_by_ahr = AssetHubKusama::sibling_location_of(PenpalA::para_id()); + let sov_penpal_on_ahr = AssetHubKusama::sovereign_account_id_of(penpal_location_as_seen_by_ahr); + // fund Parachain's SA on System Parachain with the native tokens held in reserve + AssetHubKusama::fund_accounts(vec![(sov_penpal_on_ahr, amount_to_send * 2)]); + + // Init Test let test_args = TestContext { - sender: PenpalASender::get(), - receiver: AssetHubKusamaReceiver::get(), - args: TestArgs::new_para(destination, beneficiary_id, amount_to_send, assets, None, 0), + sender: sender.clone(), + receiver: receiver.clone(), + args: TestArgs::new_para( + destination.clone(), + receiver.clone(), + amount_to_send, + assets.clone(), + None, + 0, + ), }; - let mut test = ParaToSystemParaTest::new(test_args); - let sender_balance_before = test.sender.balance; + // Query initial balances + let sender_assets_before = PenpalA::execute_with(|| { + type ForeignAssets = ::ForeignAssets; + >::balance(system_para_native_asset_location.clone(), &sender) + }); let receiver_balance_before = test.receiver.balance; - let penpal_location_as_seen_by_ahk = AssetHubKusama::sibling_location_of(PenpalA::para_id()); - let sov_penpal_on_ahk = AssetHubKusama::sovereign_account_id_of(penpal_location_as_seen_by_ahk); - - // fund the Penpal's SA on AHK with the native tokens held in reserve - AssetHubKusama::fund_accounts(vec![(sov_penpal_on_ahk, amount_to_send * 2)]); - + // Set assertions and dispatchables test.set_assertion::(para_to_system_para_sender_assertions); test.set_assertion::(para_to_system_para_receiver_assertions); test.set_dispatchable::(para_to_system_para_reserve_transfer_assets); test.assert(); - let sender_balance_after = test.sender.balance; - let receiver_balance_after = test.receiver.balance; - - let delivery_fees = PenpalA::execute_with(|| { - xcm_helpers::transfer_assets_delivery_fees::< - ::XcmSender, - >(test.args.assets.clone(), 0, test.args.weight_limit, test.args.beneficiary, test.args.dest) + // Query final balances + let sender_assets_after = PenpalA::execute_with(|| { + type ForeignAssets = ::ForeignAssets; + >::balance(system_para_native_asset_location, &sender) }); + let receiver_balance_after = test.receiver.balance; - // Sender's balance is reduced - assert_eq!(sender_balance_before - amount_to_send - delivery_fees, sender_balance_after); + // Sender's balance is reduced by amount sent plus delivery fees + assert!(sender_assets_after < sender_assets_before - amount_to_send); // Receiver's balance is increased assert!(receiver_balance_after > receiver_balance_before); // Receiver's balance increased by `amount_to_send - delivery_fees - bought_execution`; @@ -474,32 +567,20 @@ fn reserve_transfer_native_asset_from_para_to_system_para() { /// work #[test] fn reserve_transfer_assets_from_system_para_to_para() { - // Force create asset on AssetHubKusama and PenpalA from Relay Chain - AssetHubKusama::force_create_and_mint_asset( - ASSET_ID, - ASSET_MIN_BALANCE, - false, - AssetHubKusamaSender::get(), - Some(Weight::from_parts(1_019_445_000, 200_000)), - ASSET_MIN_BALANCE * 1_000_000, - ); - PenpalA::force_create_and_mint_asset( - ASSET_ID, - ASSET_MIN_BALANCE, - false, - PenpalASender::get(), - None, - 0, - ); - // Init values for System Parachain let destination = AssetHubKusama::sibling_location_of(PenpalA::para_id()); - let beneficiary_id = PenpalAReceiver::get(); - let fee_amount_to_send = ASSET_HUB_KUSAMA_ED * 1000; - let asset_amount_to_send = ASSET_MIN_BALANCE * 1000; + let sov_penpal_on_ahr = AssetHubKusama::sovereign_account_id_of(destination.clone()); + let sender = AssetHubKusamaSender::get(); + let fee_amount_to_send = ASSET_HUB_KUSAMA_ED * 10000; + let asset_amount_to_send = PENPAL_ED * 10000; + let asset_owner = AssetHubKusamaAssetOwner::get(); + let asset_owner_signer = ::RuntimeOrigin::signed(asset_owner.clone()); let assets: Assets = vec![ (Parent, fee_amount_to_send).into(), - ([PalletInstance(ASSETS_PALLET_ID), GeneralIndex(ASSET_ID.into())], asset_amount_to_send) + ( + [PalletInstance(ASSETS_PALLET_ID), GeneralIndex(RESERVABLE_ASSET_ID.into())], + asset_amount_to_send, + ) .into(), ] .into(); @@ -508,115 +589,160 @@ fn reserve_transfer_assets_from_system_para_to_para() { .iter() .position(|r| r == &(Parent, fee_amount_to_send).into()) .unwrap() as u32; + AssetHubKusama::mint_asset( + asset_owner_signer, + RESERVABLE_ASSET_ID, + asset_owner, + asset_amount_to_send * 2, + ); + + // Create SA-of-Penpal-on-AHR with ED. + AssetHubKusama::fund_accounts(vec![(sov_penpal_on_ahr, ASSET_HUB_KUSAMA_ED)]); + // Init values for Parachain + let receiver = PenpalAReceiver::get(); + let system_para_native_asset_location = KsmLocation::get(); + let system_para_foreign_asset_location = PenpalLocalReservableFromAssetHub::get(); + + // Init Test let para_test_args = TestContext { - sender: AssetHubKusamaSender::get(), - receiver: PenpalAReceiver::get(), + sender: sender.clone(), + receiver: receiver.clone(), args: TestArgs::new_para( destination, - beneficiary_id, + receiver.clone(), asset_amount_to_send, assets, None, fee_asset_index, ), }; - let mut test = SystemParaToParaTest::new(para_test_args); - // Create SA-of-Penpal-on-AHK with ED. - let penpal_location = AssetHubKusama::sibling_location_of(PenpalA::para_id()); - let sov_penpal_on_ahk = AssetHubKusama::sovereign_account_id_of(penpal_location); - AssetHubKusama::fund_accounts(vec![(sov_penpal_on_ahk, KUSAMA_ED)]); - + // Query initial balances let sender_balance_before = test.sender.balance; - let receiver_balance_before = test.receiver.balance; - let sender_assets_before = AssetHubKusama::execute_with(|| { type Assets = ::Assets; - >::balance(ASSET_ID, &AssetHubKusamaSender::get()) + >::balance(RESERVABLE_ASSET_ID, &sender) }); - let receiver_assets_before = PenpalA::execute_with(|| { - type Assets = ::Assets; - >::balance(ASSET_ID, &PenpalAReceiver::get()) + let receiver_system_native_assets_before = PenpalA::execute_with(|| { + type ForeignAssets = ::ForeignAssets; + >::balance(system_para_native_asset_location.clone(), &receiver) + }); + let receiver_foreign_assets_before = PenpalA::execute_with(|| { + type ForeignAssets = ::ForeignAssets; + >::balance( + system_para_foreign_asset_location.clone(), + &receiver, + ) }); + // Set assertions and dispatchables test.set_assertion::(system_para_to_para_assets_sender_assertions); test.set_assertion::(system_para_to_para_assets_receiver_assertions); test.set_dispatchable::(system_para_to_para_reserve_transfer_assets); test.assert(); + // Query final balances let sender_balance_after = test.sender.balance; - let receiver_balance_after = test.receiver.balance; - - // Sender's balance is reduced - assert!(sender_balance_after < sender_balance_before); - // Receiver's balance is increased - assert!(receiver_balance_after > receiver_balance_before); - // Receiver's balance increased by `amount_to_send - delivery_fees - bought_execution`; - // `delivery_fees` might be paid from transfer or JIT, also `bought_execution` is unknown but - // should be non-zero - assert!(receiver_balance_after < receiver_balance_before + fee_amount_to_send); - let sender_assets_after = AssetHubKusama::execute_with(|| { type Assets = ::Assets; - >::balance(ASSET_ID, &AssetHubKusamaSender::get()) + >::balance(RESERVABLE_ASSET_ID, &sender) }); - let receiver_assets_after = PenpalA::execute_with(|| { - type Assets = ::Assets; - >::balance(ASSET_ID, &PenpalAReceiver::get()) + let receiver_system_native_assets_after = PenpalA::execute_with(|| { + type ForeignAssets = ::ForeignAssets; + >::balance(system_para_native_asset_location.clone(), &receiver) }); + let receiver_foreign_assets_after = PenpalA::execute_with(|| { + type ForeignAssets = ::ForeignAssets; + >::balance(system_para_foreign_asset_location, &receiver) + }); + // Sender's balance is reduced + assert!(sender_balance_after < sender_balance_before); + // Receiver's foreign asset balance is increased + assert!(receiver_foreign_assets_after > receiver_foreign_assets_before); + // Receiver's system asset balance increased by `amount_to_send - delivery_fees - + // bought_execution`; `delivery_fees` might be paid from transfer or JIT, also + // `bought_execution` is unknown but should be non-zero + assert!( + receiver_system_native_assets_after < + receiver_system_native_assets_before + fee_amount_to_send + ); - // Sender's balance is reduced by exact amount + // Sender's asset balance is reduced by exact amount assert_eq!(sender_assets_before - asset_amount_to_send, sender_assets_after); - // Receiver's balance is increased by exact amount - assert_eq!(receiver_assets_after, receiver_assets_before + asset_amount_to_send); + // Receiver's foreign asset balance is increased by exact amount + assert_eq!( + receiver_foreign_assets_after, + receiver_foreign_assets_before + asset_amount_to_send + ); } /// Reserve Transfers of native asset from Parachain to Parachain (through Relay reserve) should /// work #[test] -fn reserve_transfer_native_asset_from_para_to_para() { - // Init values for Penpal Parachain +fn reserve_transfer_native_asset_from_para_to_para_through_relay() { + // Init values for Parachain Origin let destination = PenpalA::sibling_location_of(PenpalB::para_id()); - let beneficiary_id = PenpalBReceiver::get(); - let amount_to_send: Balance = ASSET_HUB_KUSAMA_ED * 10000; + let sender = PenpalASender::get(); + let amount_to_send: Balance = KUSAMA_ED * 10000; + let asset_owner = PenpalAssetOwner::get(); let assets = (Parent, amount_to_send).into(); + let relay_native_asset_location = KsmLocation::get(); + let sender_as_seen_by_relay = Kusama::child_location_of(PenpalA::para_id()); + let sov_of_sender_on_relay = Kusama::sovereign_account_id_of(sender_as_seen_by_relay); - let test_args = TestContext { - sender: PenpalASender::get(), - receiver: PenpalBReceiver::get(), - args: TestArgs::new_para(destination, beneficiary_id, amount_to_send, assets, None, 0), - }; + // fund Parachain's sender account + PenpalA::mint_foreign_asset( + ::RuntimeOrigin::signed(asset_owner), + relay_native_asset_location.clone(), + sender.clone(), + amount_to_send * 2, + ); - let mut test = ParaToParaTest::new(test_args); + // fund the Parachain Origin's SA on Relay Chain with the native tokens held in reserve + Kusama::fund_accounts(vec![(sov_of_sender_on_relay, amount_to_send * 2)]); - let sender_balance_before = test.sender.balance; - let receiver_balance_before = test.receiver.balance; + // Init values for Parachain Destination + let receiver = PenpalBReceiver::get(); - let sender_as_seen_by_relay = Kusama::child_location_of(PenpalA::para_id()); - let sov_of_sender_on_relay = Kusama::sovereign_account_id_of(sender_as_seen_by_relay); + // Init Test + let test_args = TestContext { + sender: sender.clone(), + receiver: receiver.clone(), + args: TestArgs::new_para(destination, receiver.clone(), amount_to_send, assets, None, 0), + }; + let mut test = ParaToParaThroughRelayTest::new(test_args); - // fund the PenpalA's SA on Kusama with the native tokens held in reserve - Kusama::fund_accounts(vec![(sov_of_sender_on_relay, amount_to_send * 2)]); + // Query initial balances + let sender_assets_before = PenpalA::execute_with(|| { + type ForeignAssets = ::ForeignAssets; + >::balance(relay_native_asset_location.clone(), &sender) + }); + let receiver_assets_before = PenpalB::execute_with(|| { + type ForeignAssets = ::ForeignAssets; + >::balance(relay_native_asset_location.clone(), &receiver) + }); - test.set_assertion::(para_to_para_sender_assertions); + // Set assertions and dispatchables + test.set_assertion::(para_to_para_through_hop_sender_assertions); test.set_assertion::(para_to_para_relay_hop_assertions); - test.set_assertion::(para_to_para_receiver_assertions); - test.set_dispatchable::(para_to_para_limited_reserve_transfer_assets); + test.set_assertion::(para_to_para_through_hop_receiver_assertions); + test.set_dispatchable::(para_to_para_through_relay_limited_reserve_transfer_assets); test.assert(); - let sender_balance_after = test.sender.balance; - let receiver_balance_after = test.receiver.balance; - - let delivery_fees = PenpalA::execute_with(|| { - xcm_helpers::transfer_assets_delivery_fees::< - ::XcmSender, - >(test.args.assets.clone(), 0, test.args.weight_limit, test.args.beneficiary, test.args.dest) + // Query final balances + let sender_assets_after = PenpalA::execute_with(|| { + type ForeignAssets = ::ForeignAssets; + >::balance(relay_native_asset_location.clone(), &sender) + }); + let receiver_assets_after = PenpalB::execute_with(|| { + type ForeignAssets = ::ForeignAssets; + >::balance(relay_native_asset_location, &receiver) }); - // Sender's balance is reduced - assert_eq!(sender_balance_before - amount_to_send - delivery_fees, sender_balance_after); + // Sender's balance is reduced by amount sent plus delivery fees + assert!(sender_assets_after < sender_assets_before - amount_to_send); // Receiver's balance is increased - assert!(receiver_balance_after > receiver_balance_before); + assert!(receiver_assets_after > receiver_assets_before); } diff --git a/integration-tests/emulated/tests/assets/asset-hub-kusama/src/tests/swap.rs b/integration-tests/emulated/tests/assets/asset-hub-kusama/src/tests/swap.rs index f0fb361b81..c963e32e19 100644 --- a/integration-tests/emulated/tests/assets/asset-hub-kusama/src/tests/swap.rs +++ b/integration-tests/emulated/tests/assets/asset-hub-kusama/src/tests/swap.rs @@ -123,40 +123,26 @@ fn swap_locally_on_chain_using_foreign_assets() { v3::Location::try_from(asset_hub_kusama_runtime::xcm_config::KsmLocation::get()) .expect("conversion works"), ); - - let ah_as_seen_by_penpal = PenpalA::sibling_location_of(AssetHubKusama::para_id()); let asset_location_on_penpal = v3::Location::try_from(PenpalLocalTeleportableToAssetHub::get()).expect("conversion works"); - let asset_id_on_penpal = match asset_location_on_penpal.last() { - Some(v3::Junction::GeneralIndex(id)) => *id as u32, - _ => unreachable!(), - }; - let asset_owner_on_penpal = PenpalASender::get(); let foreign_asset_at_asset_hub_kusama = v3::Location::new(1, [v3::Junction::Parachain(PenpalA::para_id().into())]) .appended_with(asset_location_on_penpal) .unwrap(); - // 1. Create asset on penpal and, 2. Create foreign asset on asset_hub_kusama - super::penpal_create_foreign_asset_on_asset_hub( - asset_id_on_penpal, - foreign_asset_at_asset_hub_kusama, - ah_as_seen_by_penpal, - true, - asset_owner_on_penpal, - ASSET_MIN_BALANCE * 1_000_000, - ); - let penpal_as_seen_by_ah = AssetHubKusama::sibling_location_of(PenpalA::para_id()); let sov_penpal_on_ahk = AssetHubKusama::sovereign_account_id_of(penpal_as_seen_by_ah); AssetHubKusama::fund_accounts(vec![ - (AssetHubKusamaSender::get(), 5_000_000 * ASSET_HUB_KUSAMA_ED), /* An account to swap - * ksm - * for something else. */ + // An account to swap ksmfor something else. + (AssetHubKusamaSender::get(), 5_000_000 * ASSET_HUB_KUSAMA_ED), + // Penpal's sovereign account in AH should have some balance + (sov_penpal_on_ahk.clone(), 100_000_000 * ASSET_HUB_KUSAMA_ED), ]); AssetHubKusama::execute_with(|| { - // 3: Mint foreign asset on asset_hub_kusama: + // 0: No need to create foreign asset as it exists in genesis. + // + // 1:: Mint foreign asset on asset_hub_kusama: // // (While it might be nice to use batch, // currently that's disabled due to safe call filters.) @@ -167,7 +153,7 @@ fn swap_locally_on_chain_using_foreign_assets() { ::RuntimeOrigin::signed(sov_penpal_on_ahk.clone()), foreign_asset_at_asset_hub_kusama, sov_penpal_on_ahk.clone().into(), - 3_000_000_000_000, + ASSET_HUB_KUSAMA_ED * 3_000_000_000_000, )); assert_expected_events!( @@ -219,8 +205,8 @@ fn swap_locally_on_chain_using_foreign_assets() { ::AssetConversion::swap_exact_tokens_for_tokens( ::RuntimeOrigin::signed(AssetHubKusamaSender::get()), path, - 100000, - 1000, + 100000 * ASSET_HUB_KUSAMA_ED, + 1000 * ASSET_HUB_KUSAMA_ED, AssetHubKusamaSender::get(), true ) @@ -230,8 +216,8 @@ fn swap_locally_on_chain_using_foreign_assets() { AssetHubKusama, vec![ RuntimeEvent::AssetConversion(pallet_asset_conversion::Event::SwapExecuted { amount_in, amount_out, .. },) => { - amount_in: *amount_in == 100000, - amount_out: *amount_out == 199399, + amount_in: *amount_in == 333333300000, + amount_out: *amount_out == 498874118173, }, ] ); @@ -241,7 +227,7 @@ fn swap_locally_on_chain_using_foreign_assets() { ::RuntimeOrigin::signed(sov_penpal_on_ahk.clone()), asset_native.clone(), Box::new(foreign_asset_at_asset_hub_kusama), - 1414213562273 - 2_000_000_000, // all but the 2 EDs can't be retrieved. + 1414213562273 / 2, // remove only half 0, 0, sov_penpal_on_ahk.clone(), diff --git a/integration-tests/emulated/tests/assets/asset-hub-kusama/src/tests/teleport.rs b/integration-tests/emulated/tests/assets/asset-hub-kusama/src/tests/teleport.rs index 540c25d376..a258f15371 100644 --- a/integration-tests/emulated/tests/assets/asset-hub-kusama/src/tests/teleport.rs +++ b/integration-tests/emulated/tests/assets/asset-hub-kusama/src/tests/teleport.rs @@ -14,7 +14,7 @@ // limitations under the License. use crate::*; -use asset_hub_kusama_runtime::xcm_config::XcmConfig as AssetHubKusamaXcmConfig; +use asset_hub_kusama_runtime::xcm_config::{KsmLocation, XcmConfig as AssetHubKusamaXcmConfig}; use emulated_integration_tests_common::xcm_helpers::non_fee_asset; use kusama_runtime::xcm_config::XcmConfig as KusamaXcmConfig; use kusama_system_emulated_network::penpal_emulated_chain::LocalTeleportableToAssetHub as PenpalLocalTeleportableToAssetHub; @@ -114,18 +114,20 @@ fn para_dest_assertions(t: RelayToSystemParaTest) { fn penpal_to_ah_foreign_assets_sender_assertions(t: ParaToSystemParaTest) { type RuntimeEvent = ::RuntimeEvent; - PenpalA::assert_xcm_pallet_attempted_complete(None); + let system_para_native_asset_location = KsmLocation::get(); let expected_asset_id = t.args.asset_id.unwrap(); let (_, expected_asset_amount) = non_fee_asset(&t.args.assets, t.args.fee_asset_item as usize).unwrap(); + + PenpalA::assert_xcm_pallet_attempted_complete(None); assert_expected_events!( PenpalA, vec![ - RuntimeEvent::Balances( - pallet_balances::Event::Withdraw { who, amount } + RuntimeEvent::ForeignAssets( + pallet_assets::Event::Burned { asset_id, owner, .. } ) => { - who: *who == t.sender.account_id, - amount: *amount == t.args.amount, + asset_id: *asset_id == system_para_native_asset_location, + owner: *owner == t.sender.account_id, }, RuntimeEvent::Assets(pallet_assets::Event::Burned { asset_id, owner, balance }) => { asset_id: *asset_id == expected_asset_id, @@ -144,6 +146,8 @@ fn penpal_to_ah_foreign_assets_receiver_assertions(t: ParaToSystemParaTest) { let (expected_foreign_asset_id, expected_foreign_asset_amount) = non_fee_asset(&t.args.assets, t.args.fee_asset_item as usize).unwrap(); let expected_foreign_asset_id_v3: v3::Location = expected_foreign_asset_id.try_into().unwrap(); + + AssetHubKusama::assert_xcmp_queue_success(None); assert_expected_events!( AssetHubKusama, vec![ @@ -163,9 +167,6 @@ fn penpal_to_ah_foreign_assets_receiver_assertions(t: ParaToSystemParaTest) { amount: *amount == expected_foreign_asset_amount, }, RuntimeEvent::Balances(pallet_balances::Event::Deposit { .. }) => {}, - RuntimeEvent::MessageQueue( - pallet_message_queue::Event::Processed { success: true, .. } - ) => {}, ] ); } @@ -205,6 +206,9 @@ fn ah_to_penpal_foreign_assets_receiver_assertions(t: SystemParaToParaTest) { let (_, expected_asset_amount) = non_fee_asset(&t.args.assets, t.args.fee_asset_item as usize).unwrap(); let checking_account = ::PolkadotXcm::check_account(); + let system_para_native_asset_location = KsmLocation::get(); + + PenpalA::assert_xcmp_queue_success(None); assert_expected_events!( PenpalA, vec![ @@ -221,12 +225,11 @@ fn ah_to_penpal_foreign_assets_receiver_assertions(t: SystemParaToParaTest) { amount: *amount == expected_asset_amount, }, // native asset for fee is deposited to receiver - RuntimeEvent::Balances(pallet_balances::Event::Deposit { who, .. }) => { - who: *who == t.receiver.account_id, + RuntimeEvent::ForeignAssets(pallet_assets::Event::Issued { asset_id, owner, amount }) => { + asset_id: *asset_id == system_para_native_asset_location, + owner: *owner == t.receiver.account_id, + amount: *amount == expected_asset_amount, }, - RuntimeEvent::MessageQueue( - pallet_message_queue::Event::Processed { success: true, .. } - ) => {}, ] ); } @@ -242,16 +245,6 @@ fn relay_limited_teleport_assets(t: RelayToSystemParaTest) -> DispatchResult { ) } -fn relay_teleport_assets(t: RelayToSystemParaTest) -> DispatchResult { - ::XcmPallet::teleport_assets( - t.signed_origin, - bx!(t.args.dest.into()), - bx!(t.args.beneficiary.into()), - bx!(t.args.assets.into()), - t.args.fee_asset_item, - ) -} - fn system_para_limited_teleport_assets(t: SystemParaToRelayTest) -> DispatchResult { ::PolkadotXcm::limited_teleport_assets( t.signed_origin, @@ -263,16 +256,6 @@ fn system_para_limited_teleport_assets(t: SystemParaToRelayTest) -> DispatchResu ) } -fn system_para_teleport_assets(t: SystemParaToRelayTest) -> DispatchResult { - ::PolkadotXcm::teleport_assets( - t.signed_origin, - bx!(t.args.dest.into()), - bx!(t.args.beneficiary.into()), - bx!(t.args.assets.into()), - t.args.fee_asset_item, - ) -} - fn para_to_system_para_transfer_assets(t: ParaToSystemParaTest) -> DispatchResult { ::PolkadotXcm::transfer_assets( t.signed_origin, @@ -319,7 +302,7 @@ fn limited_teleport_native_assets_from_relay_to_system_para_works() { test.assert(); let delivery_fees = Kusama::execute_with(|| { - xcm_helpers::transfer_assets_delivery_fees::< + xcm_helpers::teleport_assets_delivery_fees::< ::XcmSender, >(test.args.assets.clone(), 0, test.args.weight_limit, test.args.beneficiary, test.args.dest) }); @@ -366,7 +349,7 @@ fn limited_teleport_native_assets_back_from_system_para_to_relay_works() { let receiver_balance_after = test.receiver.balance; let delivery_fees = AssetHubKusama::execute_with(|| { - xcm_helpers::transfer_assets_delivery_fees::< + xcm_helpers::teleport_assets_delivery_fees::< ::XcmSender, >(test.args.assets.clone(), 0, test.args.weight_limit, test.args.beneficiary, test.args.dest) }); @@ -407,134 +390,11 @@ fn limited_teleport_native_assets_from_system_para_to_relay_fails() { let receiver_balance_after = test.receiver.balance; let delivery_fees = AssetHubKusama::execute_with(|| { - xcm_helpers::transfer_assets_delivery_fees::< - ::XcmSender, - >(test.args.assets.clone(), 0, test.args.weight_limit, test.args.beneficiary, test.args.dest) - }); - - // Sender's balance is reduced - assert_eq!(sender_balance_before - amount_to_send - delivery_fees, sender_balance_after); - // Receiver's balance does not change - assert_eq!(receiver_balance_after, receiver_balance_before); -} - -/// Teleport of native asset from Relay Chain to the System Parachain should work -#[test] -fn teleport_native_assets_from_relay_to_system_para_works() { - // Init values for Relay Chain - let amount_to_send: Balance = KUSAMA_ED * 1000; - let dest = Kusama::child_location_of(AssetHubKusama::para_id()); - let beneficiary_id = AssetHubKusamaReceiver::get(); - let test_args = TestContext { - sender: KusamaSender::get(), - receiver: AssetHubKusamaReceiver::get(), - args: TestArgs::new_relay(dest, beneficiary_id, amount_to_send), - }; - - let mut test = RelayToSystemParaTest::new(test_args); - - let sender_balance_before = test.sender.balance; - let receiver_balance_before = test.receiver.balance; - - test.set_assertion::(relay_origin_assertions); - test.set_assertion::(para_dest_assertions); - test.set_dispatchable::(relay_teleport_assets); - test.assert(); - - let delivery_fees = Kusama::execute_with(|| { - xcm_helpers::transfer_assets_delivery_fees::< - ::XcmSender, - >(test.args.assets.clone(), 0, test.args.weight_limit, test.args.beneficiary, test.args.dest) - }); - - let sender_balance_after = test.sender.balance; - let receiver_balance_after = test.receiver.balance; - - // Sender's balance is reduced - assert_eq!(sender_balance_before - amount_to_send - delivery_fees, sender_balance_after); - // Receiver's balance is increased - assert!(receiver_balance_after > receiver_balance_before); -} - -/// Teleport of native asset from System Parachains to the Relay Chain -/// should work when there is enough balance in Relay Chain's `CheckAccount` -#[test] -fn teleport_native_assets_back_from_system_para_to_relay_works() { - // Dependency - Relay Chain's `CheckAccount` should have enough balance - teleport_native_assets_from_relay_to_system_para_works(); - - // Init values for Relay Chain - let amount_to_send: Balance = ASSET_HUB_KUSAMA_ED * 1000; - let destination = AssetHubKusama::parent_location(); - let beneficiary_id = KusamaReceiver::get(); - let assets = (Parent, amount_to_send).into(); - - let test_args = TestContext { - sender: AssetHubKusamaSender::get(), - receiver: KusamaReceiver::get(), - args: TestArgs::new_para(destination, beneficiary_id, amount_to_send, assets, None, 0), - }; - - let mut test = SystemParaToRelayTest::new(test_args); - - let sender_balance_before = test.sender.balance; - let receiver_balance_before = test.receiver.balance; - - test.set_assertion::(para_origin_assertions); - test.set_assertion::(relay_dest_assertions); - test.set_dispatchable::(system_para_teleport_assets); - test.assert(); - - let sender_balance_after = test.sender.balance; - let receiver_balance_after = test.receiver.balance; - - let delivery_fees = AssetHubKusama::execute_with(|| { - xcm_helpers::transfer_assets_delivery_fees::< - ::XcmSender, - >(test.args.assets.clone(), 0, test.args.weight_limit, test.args.beneficiary, test.args.dest) - }); - - // Sender's balance is reduced - assert_eq!(sender_balance_before - amount_to_send - delivery_fees, sender_balance_after); - // Receiver's balance is increased - assert!(receiver_balance_after > receiver_balance_before); -} - -/// Teleport of native asset from System Parachain to Relay Chain -/// shouldn't work when there is not enough balance in Relay Chain's `CheckAccount` -#[test] -fn teleport_native_assets_from_system_para_to_relay_fails() { - // Init values for Relay Chain - let amount_to_send: Balance = ASSET_HUB_KUSAMA_ED * 1000; - let destination = AssetHubKusama::parent_location(); - let beneficiary_id = KusamaReceiver::get(); - let assets = (Parent, amount_to_send).into(); - - let test_args = TestContext { - sender: AssetHubKusamaSender::get(), - receiver: KusamaReceiver::get(), - args: TestArgs::new_para(destination, beneficiary_id, amount_to_send, assets, None, 0), - }; - - let mut test = SystemParaToRelayTest::new(test_args); - - let sender_balance_before = test.sender.balance; - let receiver_balance_before = test.receiver.balance; - - test.set_assertion::(para_origin_assertions); - test.set_assertion::(relay_dest_assertions_fail); - test.set_dispatchable::(system_para_teleport_assets); - test.assert(); - - let delivery_fees = AssetHubKusama::execute_with(|| { - xcm_helpers::transfer_assets_delivery_fees::< + xcm_helpers::teleport_assets_delivery_fees::< ::XcmSender, >(test.args.assets.clone(), 0, test.args.weight_limit, test.args.beneficiary, test.args.dest) }); - let sender_balance_after = test.sender.balance; - let receiver_balance_after = test.receiver.balance; - // Sender's balance is reduced assert_eq!(sender_balance_before - amount_to_send - delivery_fees, sender_balance_after); // Receiver's balance does not change @@ -546,7 +406,7 @@ fn teleport_to_other_system_parachains_works() { let amount = ASSET_HUB_KUSAMA_ED * 100; let native_asset: Assets = (Parent, amount).into(); - test_sibling_is_trusted_teleporter!( + test_parachain_is_trusted_teleporter!( AssetHubKusama, // Origin AssetHubKusamaXcmConfig, // XCM Configuration vec![BridgeHubKusama], // Destinations @@ -554,39 +414,28 @@ fn teleport_to_other_system_parachains_works() { ); } -/// Bidirectional teleports of local Penpal assets to Asset Hub as foreign assets should work -/// (using native reserve-based transfer for fees) -#[test] -fn bidirectional_teleport_foreign_assets_between_para_and_asset_hub() { - let ah_as_seen_by_penpal = PenpalA::sibling_location_of(AssetHubKusama::para_id()); - let asset_location_on_penpal = - v3::Location::try_from(PenpalLocalTeleportableToAssetHub::get()).expect("conversion works"); +/// Bidirectional teleports of local Penpal assets to Asset Hub as foreign assets while paying +/// fees using (reserve transferred) native asset. +pub fn do_bidirectional_teleport_foreign_assets_between_para_and_asset_hub_using_xt( + para_to_ah_dispatchable: fn(ParaToSystemParaTest) -> DispatchResult, + ah_to_para_dispatchable: fn(SystemParaToParaTest) -> DispatchResult, +) { + // Init values for Parachain + let fee_amount_to_send: Balance = ASSET_HUB_KUSAMA_ED * 10000; + let asset_location_on_penpal = PenpalLocalTeleportableToAssetHub::get(); let asset_id_on_penpal = match asset_location_on_penpal.last() { - Some(v3::Junction::GeneralIndex(id)) => *id as u32, + Some(Junction::GeneralIndex(id)) => *id as u32, _ => unreachable!(), }; - let asset_owner_on_penpal = PenpalASender::get(); - let foreign_asset_at_asset_hub_kusama = - v3::Location::new(1, [v3::Junction::Parachain(PenpalA::para_id().into())]) - .appended_with(asset_location_on_penpal) - .unwrap(); - super::penpal_create_foreign_asset_on_asset_hub( - asset_id_on_penpal, - foreign_asset_at_asset_hub_kusama, - ah_as_seen_by_penpal.clone(), - false, - asset_owner_on_penpal, - ASSET_MIN_BALANCE * 1_000_000, - ); - let penpal_to_ah_beneficiary_id = AssetHubKusamaReceiver::get(); - - let fee_amount_to_send = ASSET_HUB_KUSAMA_ED * 10_000; - let asset_amount_to_send = ASSET_MIN_BALANCE * 1000; - - let asset_location_on_penpal_latest: Location = asset_location_on_penpal.try_into().unwrap(); + let asset_amount_to_send = ASSET_HUB_KUSAMA_ED * 1000; + let asset_owner = PenpalAssetOwner::get(); + let system_para_native_asset_location = KsmLocation::get(); + let sender = PenpalASender::get(); + let penpal_check_account = ::PolkadotXcm::check_account(); + let ah_as_seen_by_penpal = PenpalA::sibling_location_of(AssetHubKusama::para_id()); let penpal_assets: Assets = vec![ (Parent, fee_amount_to_send).into(), - (asset_location_on_penpal_latest, asset_amount_to_send).into(), + (asset_location_on_penpal.clone(), asset_amount_to_send).into(), ] .into(); let fee_asset_index = penpal_assets @@ -595,6 +444,38 @@ fn bidirectional_teleport_foreign_assets_between_para_and_asset_hub() { .position(|r| r == &(Parent, fee_amount_to_send).into()) .unwrap() as u32; + // fund Parachain's sender account + PenpalA::mint_foreign_asset( + ::RuntimeOrigin::signed(asset_owner.clone()), + system_para_native_asset_location.clone(), + sender.clone(), + fee_amount_to_send * 2, + ); + // No need to create the asset (only mint) as it exists in genesis. + PenpalA::mint_asset( + ::RuntimeOrigin::signed(asset_owner.clone()), + asset_id_on_penpal, + sender.clone(), + asset_amount_to_send, + ); + // fund Parachain's check account to be able to teleport + PenpalA::fund_accounts(vec![(penpal_check_account.clone(), ASSET_HUB_KUSAMA_ED * 1000)]); + + // prefund SA of Penpal on AssetHub with enough native tokens to pay for fees + let penpal_as_seen_by_ah = AssetHubKusama::sibling_location_of(PenpalA::para_id()); + let sov_penpal_on_ah = AssetHubKusama::sovereign_account_id_of(penpal_as_seen_by_ah); + AssetHubKusama::fund_accounts(vec![( + sov_penpal_on_ah.clone(), + ASSET_HUB_KUSAMA_ED * 100_000_000_000, + )]); + + // Init values for System Parachain + let foreign_asset_at_asset_hub_kusama = + Location::new(1, [Junction::Parachain(PenpalA::para_id().into())]) + .appended_with(asset_location_on_penpal) + .unwrap(); + let penpal_to_ah_beneficiary_id = AssetHubKusamaReceiver::get(); + // Penpal to AH test args let penpal_to_ah_test_args = TestContext { sender: PenpalASender::get(), @@ -609,8 +490,14 @@ fn bidirectional_teleport_foreign_assets_between_para_and_asset_hub() { ), }; let mut penpal_to_ah = ParaToSystemParaTest::new(penpal_to_ah_test_args); + let penpal_sender_balance_before = PenpalA::execute_with(|| { + type ForeignAssets = ::ForeignAssets; + >::balance( + system_para_native_asset_location.clone(), + &PenpalASender::get(), + ) + }); - let penpal_sender_balance_before = penpal_to_ah.sender.balance; let ah_receiver_balance_before = penpal_to_ah.receiver.balance; let penpal_sender_assets_before = PenpalA::execute_with(|| { @@ -620,17 +507,24 @@ fn bidirectional_teleport_foreign_assets_between_para_and_asset_hub() { let ah_receiver_assets_before = AssetHubKusama::execute_with(|| { type Assets = ::ForeignAssets; >::balance( - foreign_asset_at_asset_hub_kusama, + foreign_asset_at_asset_hub_kusama.clone().try_into().unwrap(), &AssetHubKusamaReceiver::get(), ) }); penpal_to_ah.set_assertion::(penpal_to_ah_foreign_assets_sender_assertions); penpal_to_ah.set_assertion::(penpal_to_ah_foreign_assets_receiver_assertions); - penpal_to_ah.set_dispatchable::(para_to_system_para_transfer_assets); + penpal_to_ah.set_dispatchable::(para_to_ah_dispatchable); penpal_to_ah.assert(); - let penpal_sender_balance_after = penpal_to_ah.sender.balance; + let penpal_sender_balance_after = PenpalA::execute_with(|| { + type ForeignAssets = ::ForeignAssets; + >::balance( + system_para_native_asset_location.clone(), + &PenpalASender::get(), + ) + }); + let ah_receiver_balance_after = penpal_to_ah.receiver.balance; let penpal_sender_assets_after = PenpalA::execute_with(|| { @@ -640,7 +534,7 @@ fn bidirectional_teleport_foreign_assets_between_para_and_asset_hub() { let ah_receiver_assets_after = AssetHubKusama::execute_with(|| { type Assets = ::ForeignAssets; >::balance( - foreign_asset_at_asset_hub_kusama, + foreign_asset_at_asset_hub_kusama.clone().try_into().unwrap(), &AssetHubKusamaReceiver::get(), ) }); @@ -668,19 +562,17 @@ fn bidirectional_teleport_foreign_assets_between_para_and_asset_hub() { type ForeignAssets = ::ForeignAssets; assert_ok!(ForeignAssets::transfer( ::RuntimeOrigin::signed(AssetHubKusamaReceiver::get()), - foreign_asset_at_asset_hub_kusama, + foreign_asset_at_asset_hub_kusama.clone().try_into().unwrap(), AssetHubKusamaSender::get().into(), asset_amount_to_send, )); }); - let foreign_asset_at_asset_hub_kusama_latest: Location = - foreign_asset_at_asset_hub_kusama.try_into().unwrap(); let ah_to_penpal_beneficiary_id = PenpalAReceiver::get(); let penpal_as_seen_by_ah = AssetHubKusama::sibling_location_of(PenpalA::para_id()); let ah_assets: Assets = vec![ (Parent, fee_amount_to_send).into(), - (foreign_asset_at_asset_hub_kusama_latest, asset_amount_to_send).into(), + (foreign_asset_at_asset_hub_kusama.clone(), asset_amount_to_send).into(), ] .into(); let fee_asset_index = ah_assets @@ -705,12 +597,18 @@ fn bidirectional_teleport_foreign_assets_between_para_and_asset_hub() { let mut ah_to_penpal = SystemParaToParaTest::new(ah_to_penpal_test_args); let ah_sender_balance_before = ah_to_penpal.sender.balance; - let penpal_receiver_balance_before = ah_to_penpal.receiver.balance; + let penpal_receiver_balance_before = PenpalA::execute_with(|| { + type ForeignAssets = ::ForeignAssets; + >::balance( + system_para_native_asset_location.clone(), + &PenpalAReceiver::get(), + ) + }); let ah_sender_assets_before = AssetHubKusama::execute_with(|| { type ForeignAssets = ::ForeignAssets; >::balance( - foreign_asset_at_asset_hub_kusama, + foreign_asset_at_asset_hub_kusama.clone().try_into().unwrap(), &AssetHubKusamaSender::get(), ) }); @@ -721,16 +619,22 @@ fn bidirectional_teleport_foreign_assets_between_para_and_asset_hub() { ah_to_penpal.set_assertion::(ah_to_penpal_foreign_assets_sender_assertions); ah_to_penpal.set_assertion::(ah_to_penpal_foreign_assets_receiver_assertions); - ah_to_penpal.set_dispatchable::(system_para_to_para_transfer_assets); + ah_to_penpal.set_dispatchable::(ah_to_para_dispatchable); ah_to_penpal.assert(); let ah_sender_balance_after = ah_to_penpal.sender.balance; - let penpal_receiver_balance_after = ah_to_penpal.receiver.balance; + let penpal_receiver_balance_after = PenpalA::execute_with(|| { + type ForeignAssets = ::ForeignAssets; + >::balance( + system_para_native_asset_location, + &PenpalAReceiver::get(), + ) + }); let ah_sender_assets_after = AssetHubKusama::execute_with(|| { type ForeignAssets = ::ForeignAssets; >::balance( - foreign_asset_at_asset_hub_kusama, + foreign_asset_at_asset_hub_kusama.try_into().unwrap(), &AssetHubKusamaSender::get(), ) }); @@ -753,3 +657,13 @@ fn bidirectional_teleport_foreign_assets_between_para_and_asset_hub() { // Receiver's balance is increased by exact amount assert_eq!(penpal_receiver_assets_after, penpal_receiver_assets_before + asset_amount_to_send); } + +/// Bidirectional teleports of local Penpal assets to Asset Hub as foreign assets should work +/// (using native reserve-based transfer for fees) +#[test] +fn bidirectional_teleport_foreign_assets_between_para_and_asset_hub() { + do_bidirectional_teleport_foreign_assets_between_para_and_asset_hub_using_xt( + para_to_system_para_transfer_assets, + system_para_to_para_transfer_assets, + ); +} diff --git a/integration-tests/emulated/tests/assets/asset-hub-polkadot/Cargo.toml b/integration-tests/emulated/tests/assets/asset-hub-polkadot/Cargo.toml index d762ccc96d..3c15a06834 100644 --- a/integration-tests/emulated/tests/assets/asset-hub-polkadot/Cargo.toml +++ b/integration-tests/emulated/tests/assets/asset-hub-polkadot/Cargo.toml @@ -31,9 +31,7 @@ asset-test-utils = { workspace = true } emulated-integration-tests-common = { workspace = true } parachains-common = { workspace = true, default-features = true } cumulus-pallet-xcmp-queue = { workspace = true, default-features = true } -cumulus-pallet-parachain-system = { features = [ - "parameterized-consensus-hook", -], workspace = true, default-features = true } +cumulus-pallet-parachain-system = { workspace = true, default-features = true } # Local asset-hub-polkadot-runtime = { workspace = true } diff --git a/integration-tests/emulated/tests/assets/asset-hub-polkadot/src/lib.rs b/integration-tests/emulated/tests/assets/asset-hub-polkadot/src/lib.rs index 786d0b15f4..be401c5145 100644 --- a/integration-tests/emulated/tests/assets/asset-hub-polkadot/src/lib.rs +++ b/integration-tests/emulated/tests/assets/asset-hub-polkadot/src/lib.rs @@ -30,10 +30,12 @@ pub use xcm::{ prelude::{AccountId32 as AccountId32Junction, *}, v3::{self, Error, NetworkId::Polkadot as PolkadotId}, }; +pub use xcm_executor::traits::TransferType; // Cumulus pub use asset_test_utils::xcm_helpers; pub use emulated_integration_tests_common::{ + test_parachain_is_trusted_teleporter, xcm_emulator::{ assert_expected_events, bx, helpers::weight_within_threshold, Chain, Parachain as Para, RelayChain as Relay, Test, TestArgs, TestContext, TestExt, @@ -41,17 +43,21 @@ pub use emulated_integration_tests_common::{ xcm_helpers::{xcm_transact_paid_execution, xcm_transact_unpaid_execution}, PROOF_SIZE_THRESHOLD, REF_TIME_THRESHOLD, XCM_V3, }; -pub use integration_tests_helpers::test_sibling_is_trusted_teleporter; pub use parachains_common::{AccountId, Balance}; +pub use polkadot_runtime::xcm_config::UniversalLocation as PolkadotUniversalLocation; pub use polkadot_system_emulated_network::{ asset_hub_polkadot_emulated_chain::{ - genesis::ED as ASSET_HUB_POLKADOT_ED, AssetHubPolkadotParaPallet as AssetHubPolkadotPallet, + genesis::{AssetHubPolkadotAssetOwner, ED as ASSET_HUB_POLKADOT_ED}, + AssetHubPolkadotParaPallet as AssetHubPolkadotPallet, }, collectives_polkadot_emulated_chain::{ genesis::ED as COLLECTIVES_POLKADOT_ED, CollectivesPolkadotParaPallet as CollectivesPolkadotPallet, }, - penpal_emulated_chain::PenpalBParaPallet as PenpalBPallet, + penpal_emulated_chain::{ + CustomizableAssetFromSystemAssetHub, PenpalAParaPallet as PenpalAPallet, PenpalAssetOwner, + PenpalBParaPallet as PenpalBPallet, ED as PENPAL_ED, + }, polkadot_emulated_chain::{genesis::ED as POLKADOT_ED, PolkadotRelayPallet as PolkadotPallet}, AssetHubPolkadotPara as AssetHubPolkadot, AssetHubPolkadotParaReceiver as AssetHubPolkadotReceiver, @@ -65,7 +71,7 @@ pub use polkadot_system_emulated_network::{ PolkadotRelayReceiver as PolkadotReceiver, PolkadotRelaySender as PolkadotSender, }; -pub const ASSET_ID: u32 = 1; +pub const ASSET_ID: u32 = 3; pub const ASSET_MIN_BALANCE: u128 = 1000; // `Assets` pallet index pub const ASSETS_PALLET_ID: u8 = 50; @@ -75,7 +81,9 @@ pub type RelayToParaTest = Test; pub type SystemParaToRelayTest = Test; pub type SystemParaToParaTest = Test; pub type ParaToSystemParaTest = Test; -pub type ParaToParaTest = Test; +pub type ParaToParaThroughRelayTest = Test; +pub type ParaToParaThroughAHTest = Test; +pub type RelayToParaThroughAHTest = Test; #[cfg(test)] mod tests; 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 new file mode 100644 index 0000000000..42ce5d721c --- /dev/null +++ b/integration-tests/emulated/tests/assets/asset-hub-polkadot/src/tests/hybrid_transfers.rs @@ -0,0 +1,811 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +use super::reserve_transfer::*; +use crate::{ + tests::teleport::do_bidirectional_teleport_foreign_assets_between_para_and_asset_hub_using_xt, + *, +}; +use asset_hub_polkadot_runtime::xcm_config::DotLocation; + +fn para_to_para_assethub_hop_assertions(t: ParaToParaThroughAHTest) { + type RuntimeEvent = ::RuntimeEvent; + let sov_penpal_a_on_ah = AssetHubPolkadot::sovereign_account_id_of( + AssetHubPolkadot::sibling_location_of(PenpalB::para_id()), + ); + let sov_penpal_b_on_ah = AssetHubPolkadot::sovereign_account_id_of( + AssetHubPolkadot::sibling_location_of(PenpalA::para_id()), + ); + + assert_expected_events!( + AssetHubPolkadot, + vec![ + // Withdrawn from sender parachain SA + RuntimeEvent::Balances( + pallet_balances::Event::Burned { who, amount } + ) => { + who: *who == sov_penpal_a_on_ah, + amount: *amount == t.args.amount, + }, + // Deposited to receiver parachain SA + RuntimeEvent::Balances( + pallet_balances::Event::Minted { who, .. } + ) => { + who: *who == sov_penpal_b_on_ah, + }, + RuntimeEvent::MessageQueue( + pallet_message_queue::Event::Processed { success: true, .. } + ) => {}, + ] + ); +} + +fn ah_to_para_transfer_assets(t: SystemParaToParaTest) -> DispatchResult { + let fee_idx = t.args.fee_asset_item as usize; + let fee: Asset = t.args.assets.inner().get(fee_idx).cloned().unwrap(); + let custom_xcm_on_dest = Xcm::<()>(vec![DepositAsset { + assets: Wild(AllCounted(t.args.assets.len() as u32)), + beneficiary: t.args.beneficiary, + }]); + ::PolkadotXcm::transfer_assets_using_type_and_then( + t.signed_origin, + bx!(t.args.dest.into()), + bx!(t.args.assets.into()), + bx!(TransferType::LocalReserve), + bx!(fee.id.into()), + bx!(TransferType::LocalReserve), + bx!(VersionedXcm::from(custom_xcm_on_dest)), + t.args.weight_limit, + ) +} + +fn para_to_ah_transfer_assets(t: ParaToSystemParaTest) -> DispatchResult { + let fee_idx = t.args.fee_asset_item as usize; + let fee: Asset = t.args.assets.inner().get(fee_idx).cloned().unwrap(); + let custom_xcm_on_dest = Xcm::<()>(vec![DepositAsset { + assets: Wild(AllCounted(t.args.assets.len() as u32)), + beneficiary: t.args.beneficiary, + }]); + ::PolkadotXcm::transfer_assets_using_type_and_then( + t.signed_origin, + bx!(t.args.dest.into()), + bx!(t.args.assets.into()), + bx!(TransferType::DestinationReserve), + bx!(fee.id.into()), + bx!(TransferType::DestinationReserve), + bx!(VersionedXcm::from(custom_xcm_on_dest)), + t.args.weight_limit, + ) +} + +fn para_to_para_transfer_assets_through_ah(t: ParaToParaThroughAHTest) -> DispatchResult { + let fee_idx = t.args.fee_asset_item as usize; + let fee: Asset = t.args.assets.inner().get(fee_idx).cloned().unwrap(); + let asset_hub_location: Location = PenpalB::sibling_location_of(AssetHubPolkadot::para_id()); + let custom_xcm_on_dest = Xcm::<()>(vec![DepositAsset { + assets: Wild(AllCounted(t.args.assets.len() as u32)), + beneficiary: t.args.beneficiary, + }]); + ::PolkadotXcm::transfer_assets_using_type_and_then( + t.signed_origin, + bx!(t.args.dest.into()), + bx!(t.args.assets.into()), + bx!(TransferType::RemoteReserve(asset_hub_location.clone().into())), + bx!(fee.id.into()), + bx!(TransferType::RemoteReserve(asset_hub_location.into())), + bx!(VersionedXcm::from(custom_xcm_on_dest)), + t.args.weight_limit, + ) +} + +fn para_to_asset_hub_teleport_foreign_assets(t: ParaToSystemParaTest) -> DispatchResult { + let fee_idx = t.args.fee_asset_item as usize; + let fee: Asset = t.args.assets.inner().get(fee_idx).cloned().unwrap(); + let custom_xcm_on_dest = Xcm::<()>(vec![DepositAsset { + assets: Wild(AllCounted(t.args.assets.len() as u32)), + beneficiary: t.args.beneficiary, + }]); + ::PolkadotXcm::transfer_assets_using_type_and_then( + t.signed_origin, + bx!(t.args.dest.into()), + bx!(t.args.assets.into()), + bx!(TransferType::Teleport), + bx!(fee.id.into()), + bx!(TransferType::DestinationReserve), + bx!(VersionedXcm::from(custom_xcm_on_dest)), + t.args.weight_limit, + ) +} + +fn asset_hub_to_para_teleport_foreign_assets(t: SystemParaToParaTest) -> DispatchResult { + let fee_idx = t.args.fee_asset_item as usize; + let fee: Asset = t.args.assets.inner().get(fee_idx).cloned().unwrap(); + let custom_xcm_on_dest = Xcm::<()>(vec![DepositAsset { + assets: Wild(AllCounted(t.args.assets.len() as u32)), + beneficiary: t.args.beneficiary, + }]); + ::PolkadotXcm::transfer_assets_using_type_and_then( + t.signed_origin, + bx!(t.args.dest.into()), + bx!(t.args.assets.into()), + bx!(TransferType::Teleport), + bx!(fee.id.into()), + bx!(TransferType::LocalReserve), + bx!(VersionedXcm::from(custom_xcm_on_dest)), + t.args.weight_limit, + ) +} + +// =========================================================================== +// ======= Transfer - Native + Bridged Assets - AssetHub->Parachain ========== +// =========================================================================== +/// Transfers of native asset plus bridged asset from AssetHub to some Parachain +/// while paying fees using native asset. +#[test] +fn transfer_foreign_assets_from_asset_hub_to_para() { + let destination = AssetHubPolkadot::sibling_location_of(PenpalB::para_id()); + let sender = AssetHubPolkadotSender::get(); + let native_amount_to_send: Balance = ASSET_HUB_POLKADOT_ED * 10000; + let native_asset_location = DotLocation::get(); + let receiver = PenpalBReceiver::get(); + let assets_owner = PenpalAssetOwner::get(); + // Foreign asset used: bridged WND + let foreign_amount_to_send = ASSET_HUB_POLKADOT_ED * 10_000_000; + let wnd_at_rococo_parachains = + Location::new(2, [Junction::GlobalConsensus(NetworkId::Westend)]); + + // Configure destination chain to trust AH as reserve of WND + PenpalB::execute_with(|| { + assert_ok!(::System::set_storage( + ::RuntimeOrigin::root(), + vec![( + CustomizableAssetFromSystemAssetHub::key().to_vec(), + Location::new(2, [GlobalConsensus(Westend)]).encode(), + )], + )); + }); + PenpalB::force_create_foreign_asset( + wnd_at_rococo_parachains.clone(), + assets_owner.clone(), + false, + ASSET_MIN_BALANCE, + vec![], + ); + AssetHubPolkadot::force_create_foreign_asset( + wnd_at_rococo_parachains.clone().try_into().unwrap(), + assets_owner.clone(), + false, + ASSET_MIN_BALANCE, + vec![], + ); + AssetHubPolkadot::mint_foreign_asset( + ::RuntimeOrigin::signed(assets_owner), + wnd_at_rococo_parachains.clone().try_into().unwrap(), + sender.clone(), + foreign_amount_to_send * 2, + ); + + // Assets to send + let assets: Vec = vec![ + (Parent, native_amount_to_send).into(), + (wnd_at_rococo_parachains.clone(), foreign_amount_to_send).into(), + ]; + let fee_asset_id = AssetId(Parent.into()); + let fee_asset_item = assets.iter().position(|a| a.id == fee_asset_id).unwrap() as u32; + + // Init Test + let test_args = TestContext { + sender: sender.clone(), + receiver: receiver.clone(), + args: TestArgs::new_para( + destination.clone(), + receiver.clone(), + native_amount_to_send, + assets.into(), + None, + fee_asset_item, + ), + }; + let mut test = SystemParaToParaTest::new(test_args); + + // Query initial balances + let sender_balance_before = test.sender.balance; + let sender_wnds_before = AssetHubPolkadot::execute_with(|| { + type ForeignAssets = ::ForeignAssets; + >::balance( + wnd_at_rococo_parachains.clone().try_into().unwrap(), + &sender, + ) + }); + let receiver_assets_before = PenpalB::execute_with(|| { + type ForeignAssets = ::ForeignAssets; + >::balance(native_asset_location.clone(), &receiver) + }); + let receiver_wnds_before = PenpalB::execute_with(|| { + type ForeignAssets = ::ForeignAssets; + >::balance(wnd_at_rococo_parachains.clone(), &receiver) + }); + + // Set assertions and dispatchables + test.set_assertion::(system_para_to_para_sender_assertions); + test.set_assertion::(system_para_to_para_receiver_assertions); + test.set_dispatchable::(ah_to_para_transfer_assets); + test.assert(); + + // Query final balances + let sender_balance_after = test.sender.balance; + let sender_wnds_after = AssetHubPolkadot::execute_with(|| { + type ForeignAssets = ::ForeignAssets; + >::balance( + wnd_at_rococo_parachains.clone().try_into().unwrap(), + &sender, + ) + }); + let receiver_assets_after = PenpalB::execute_with(|| { + type ForeignAssets = ::ForeignAssets; + >::balance(native_asset_location, &receiver) + }); + let receiver_wnds_after = PenpalB::execute_with(|| { + type ForeignAssets = ::ForeignAssets; + >::balance(wnd_at_rococo_parachains, &receiver) + }); + + // Sender's balance is reduced by amount sent plus delivery fees + assert!(sender_balance_after < sender_balance_before - native_amount_to_send); + // Sender's balance is reduced by foreign amount sent + assert_eq!(sender_wnds_after, sender_wnds_before - foreign_amount_to_send); + // Receiver's assets is increased + assert!(receiver_assets_after > receiver_assets_before); + // Receiver's assets increased by `amount_to_send - delivery_fees - bought_execution`; + // `delivery_fees` might be paid from transfer or JIT, also `bought_execution` is unknown but + // should be non-zero + assert!(receiver_assets_after < receiver_assets_before + native_amount_to_send); + // Receiver's balance is increased by foreign amount sent + assert_eq!(receiver_wnds_after, receiver_wnds_before + foreign_amount_to_send); +} + +/// Reserve Transfers of native asset from Parachain to System Parachain should work +// =========================================================================== +// ======= Transfer - Native + Bridged Assets - Parachain->AssetHub ========== +// =========================================================================== +/// Transfers of native asset plus bridged asset from some Parachain to AssetHub +/// while paying fees using native asset. +#[test] +fn transfer_foreign_assets_from_para_to_asset_hub() { + // Init values for Parachain + let destination = PenpalB::sibling_location_of(AssetHubPolkadot::para_id()); + let sender = PenpalBSender::get(); + let native_amount_to_send: Balance = ASSET_HUB_POLKADOT_ED * 10000; + let native_asset_location = DotLocation::get(); + let assets_owner = PenpalAssetOwner::get(); + + // Foreign asset used: bridged WND + let foreign_amount_to_send = ASSET_HUB_POLKADOT_ED * 10_000_000; + let wnd_at_rococo_parachains = + Location::new(2, [Junction::GlobalConsensus(NetworkId::Westend)]); + + // Configure destination chain to trust AH as reserve of WND + PenpalB::execute_with(|| { + assert_ok!(::System::set_storage( + ::RuntimeOrigin::root(), + vec![( + CustomizableAssetFromSystemAssetHub::key().to_vec(), + Location::new(2, [GlobalConsensus(Westend)]).encode(), + )], + )); + }); + PenpalB::force_create_foreign_asset( + wnd_at_rococo_parachains.clone(), + assets_owner.clone(), + false, + ASSET_MIN_BALANCE, + vec![], + ); + AssetHubPolkadot::force_create_foreign_asset( + wnd_at_rococo_parachains.clone().try_into().unwrap(), + assets_owner.clone(), + false, + ASSET_MIN_BALANCE, + vec![], + ); + + // fund Parachain's sender account + PenpalB::mint_foreign_asset( + ::RuntimeOrigin::signed(assets_owner.clone()), + native_asset_location.clone(), + sender.clone(), + native_amount_to_send * 2, + ); + PenpalB::mint_foreign_asset( + ::RuntimeOrigin::signed(assets_owner.clone()), + wnd_at_rococo_parachains.clone(), + sender.clone(), + foreign_amount_to_send * 2, + ); + + // Init values for System Parachain + let receiver = AssetHubPolkadotReceiver::get(); + let penpal_location_as_seen_by_ahr = AssetHubPolkadot::sibling_location_of(PenpalB::para_id()); + let sov_penpal_on_ahr = + AssetHubPolkadot::sovereign_account_id_of(penpal_location_as_seen_by_ahr); + + // fund Parachain's SA on AssetHub with the assets held in reserve + AssetHubPolkadot::fund_accounts(vec![(sov_penpal_on_ahr.clone(), native_amount_to_send * 2)]); + AssetHubPolkadot::mint_foreign_asset( + ::RuntimeOrigin::signed(assets_owner), + wnd_at_rococo_parachains.clone().try_into().unwrap(), + sov_penpal_on_ahr, + foreign_amount_to_send * 2, + ); + + // Assets to send + let assets: Vec = vec![ + (Parent, native_amount_to_send).into(), + (wnd_at_rococo_parachains.clone(), foreign_amount_to_send).into(), + ]; + let fee_asset_id = AssetId(Parent.into()); + let fee_asset_item = assets.iter().position(|a| a.id == fee_asset_id).unwrap() as u32; + + // Init Test + let test_args = TestContext { + sender: sender.clone(), + receiver: receiver.clone(), + args: TestArgs::new_para( + destination.clone(), + receiver.clone(), + native_amount_to_send, + assets.into(), + None, + fee_asset_item, + ), + }; + let mut test = ParaToSystemParaTest::new(test_args); + + // Query initial balances + let sender_native_before = PenpalB::execute_with(|| { + type ForeignAssets = ::ForeignAssets; + >::balance(native_asset_location.clone(), &sender) + }); + let sender_wnds_before = PenpalB::execute_with(|| { + type ForeignAssets = ::ForeignAssets; + >::balance(wnd_at_rococo_parachains.clone(), &sender) + }); + let receiver_native_before = test.receiver.balance; + let receiver_wnds_before = AssetHubPolkadot::execute_with(|| { + type ForeignAssets = ::ForeignAssets; + >::balance( + wnd_at_rococo_parachains.clone().try_into().unwrap(), + &receiver, + ) + }); + + // Set assertions and dispatchables + test.set_assertion::(para_to_system_para_sender_assertions); + test.set_assertion::(para_to_system_para_receiver_assertions); + test.set_dispatchable::(para_to_ah_transfer_assets); + test.assert(); + + // Query final balances + let sender_native_after = PenpalB::execute_with(|| { + type ForeignAssets = ::ForeignAssets; + >::balance(native_asset_location, &sender) + }); + let sender_wnds_after = PenpalB::execute_with(|| { + type ForeignAssets = ::ForeignAssets; + >::balance(wnd_at_rococo_parachains.clone(), &sender) + }); + let receiver_native_after = test.receiver.balance; + let receiver_wnds_after = AssetHubPolkadot::execute_with(|| { + type ForeignAssets = ::ForeignAssets; + >::balance( + wnd_at_rococo_parachains.try_into().unwrap(), + &receiver, + ) + }); + + // Sender's balance is reduced by amount sent plus delivery fees + assert!(sender_native_after < sender_native_before - native_amount_to_send); + // Sender's balance is reduced by foreign amount sent + assert_eq!(sender_wnds_after, sender_wnds_before - foreign_amount_to_send); + // Receiver's balance is increased + assert!(receiver_native_after > receiver_native_before); + // Receiver's balance increased by `amount_to_send - delivery_fees - bought_execution`; + // `delivery_fees` might be paid from transfer or JIT, also `bought_execution` is unknown but + // should be non-zero + assert!(receiver_native_after < receiver_native_before + native_amount_to_send); + // Receiver's balance is increased by foreign amount sent + assert_eq!(receiver_wnds_after, receiver_wnds_before + foreign_amount_to_send); +} + +// ============================================================================== +// ===== Transfer - Native + Bridged Assets - Parachain->AssetHub->Parachain ==== +// ============================================================================== +/// Transfers of native asset plus bridged asset from Parachain to Parachain +/// (through AssetHub reserve) with fees paid using native asset. +#[test] +fn transfer_foreign_assets_from_para_to_para_through_asset_hub() { + // Init values for Parachain Origin + let destination = PenpalB::sibling_location_of(PenpalA::para_id()); + let sender = PenpalBSender::get(); + let roc_to_send: Balance = POLKADOT_ED * 10000; + let assets_owner = PenpalAssetOwner::get(); + let roc_location = DotLocation::get(); + let sender_as_seen_by_ah = AssetHubPolkadot::sibling_location_of(PenpalB::para_id()); + let sov_of_sender_on_ah = AssetHubPolkadot::sovereign_account_id_of(sender_as_seen_by_ah); + let receiver_as_seen_by_ah = AssetHubPolkadot::sibling_location_of(PenpalA::para_id()); + let sov_of_receiver_on_ah = AssetHubPolkadot::sovereign_account_id_of(receiver_as_seen_by_ah); + let wnd_to_send = ASSET_HUB_POLKADOT_ED * 10_000_000; + + // Configure destination chain to trust AH as reserve of WND + PenpalA::execute_with(|| { + assert_ok!(::System::set_storage( + ::RuntimeOrigin::root(), + vec![( + CustomizableAssetFromSystemAssetHub::key().to_vec(), + Location::new(2, [GlobalConsensus(Westend)]).encode(), + )], + )); + }); + + // Register WND as foreign asset and transfer it around the Polkadot ecosystem + let wnd_at_rococo_parachains = + Location::new(2, [Junction::GlobalConsensus(NetworkId::Westend)]); + AssetHubPolkadot::force_create_foreign_asset( + wnd_at_rococo_parachains.clone().try_into().unwrap(), + assets_owner.clone(), + false, + ASSET_MIN_BALANCE, + vec![], + ); + PenpalB::force_create_foreign_asset( + wnd_at_rococo_parachains.clone(), + assets_owner.clone(), + false, + ASSET_MIN_BALANCE, + vec![], + ); + PenpalA::force_create_foreign_asset( + wnd_at_rococo_parachains.clone(), + assets_owner.clone(), + false, + ASSET_MIN_BALANCE, + vec![], + ); + + // fund Parachain's sender account + PenpalB::mint_foreign_asset( + ::RuntimeOrigin::signed(assets_owner.clone()), + roc_location.clone(), + sender.clone(), + roc_to_send * 2, + ); + PenpalB::mint_foreign_asset( + ::RuntimeOrigin::signed(assets_owner.clone()), + wnd_at_rococo_parachains.clone(), + sender.clone(), + wnd_to_send * 2, + ); + // fund the Parachain Origin's SA on Asset Hub with the assets held in reserve + AssetHubPolkadot::fund_accounts(vec![(sov_of_sender_on_ah.clone(), roc_to_send * 2)]); + AssetHubPolkadot::mint_foreign_asset( + ::RuntimeOrigin::signed(assets_owner), + wnd_at_rococo_parachains.clone().try_into().unwrap(), + sov_of_sender_on_ah.clone(), + wnd_to_send * 2, + ); + + // Init values for Parachain Destination + let receiver = PenpalAReceiver::get(); + + // Assets to send + let assets: Vec = vec![ + (roc_location.clone(), roc_to_send).into(), + (wnd_at_rococo_parachains.clone(), wnd_to_send).into(), + ]; + let fee_asset_id: AssetId = roc_location.clone().into(); + let fee_asset_item = assets.iter().position(|a| a.id == fee_asset_id).unwrap() as u32; + + // Init Test + let test_args = TestContext { + sender: sender.clone(), + receiver: receiver.clone(), + args: TestArgs::new_para( + destination, + receiver.clone(), + roc_to_send, + assets.into(), + None, + fee_asset_item, + ), + }; + let mut test = ParaToParaThroughAHTest::new(test_args); + + // Query initial balances + let sender_rocs_before = PenpalB::execute_with(|| { + type ForeignAssets = ::ForeignAssets; + >::balance(roc_location.clone(), &sender) + }); + let sender_wnds_before = PenpalB::execute_with(|| { + type ForeignAssets = ::ForeignAssets; + >::balance(wnd_at_rococo_parachains.clone(), &sender) + }); + let rocs_in_sender_reserve_on_ahr_before = + ::account_data_of(sov_of_sender_on_ah.clone()).free; + let wnds_in_sender_reserve_on_ahr_before = AssetHubPolkadot::execute_with(|| { + type Assets = ::ForeignAssets; + >::balance( + wnd_at_rococo_parachains.clone().try_into().unwrap(), + &sov_of_sender_on_ah, + ) + }); + let rocs_in_receiver_reserve_on_ahr_before = + ::account_data_of(sov_of_receiver_on_ah.clone()).free; + let wnds_in_receiver_reserve_on_ahr_before = AssetHubPolkadot::execute_with(|| { + type Assets = ::ForeignAssets; + >::balance( + wnd_at_rococo_parachains.clone().try_into().unwrap(), + &sov_of_receiver_on_ah, + ) + }); + let receiver_rocs_before = PenpalA::execute_with(|| { + type ForeignAssets = ::ForeignAssets; + >::balance(roc_location.clone(), &receiver) + }); + let receiver_wnds_before = PenpalA::execute_with(|| { + type ForeignAssets = ::ForeignAssets; + >::balance(wnd_at_rococo_parachains.clone(), &receiver) + }); + + // Set assertions and dispatchables + test.set_assertion::(para_to_para_through_hop_sender_assertions); + test.set_assertion::(para_to_para_assethub_hop_assertions); + test.set_assertion::(para_to_para_through_hop_receiver_assertions); + test.set_dispatchable::(para_to_para_transfer_assets_through_ah); + test.assert(); + + // Query final balances + let sender_rocs_after = PenpalB::execute_with(|| { + type ForeignAssets = ::ForeignAssets; + >::balance(roc_location.clone(), &sender) + }); + let sender_wnds_after = PenpalB::execute_with(|| { + type ForeignAssets = ::ForeignAssets; + >::balance(wnd_at_rococo_parachains.clone(), &sender) + }); + let wnds_in_sender_reserve_on_ahr_after = AssetHubPolkadot::execute_with(|| { + type Assets = ::ForeignAssets; + >::balance( + wnd_at_rococo_parachains.clone().try_into().unwrap(), + &sov_of_sender_on_ah, + ) + }); + let rocs_in_sender_reserve_on_ahr_after = + ::account_data_of(sov_of_sender_on_ah).free; + let wnds_in_receiver_reserve_on_ahr_after = AssetHubPolkadot::execute_with(|| { + type Assets = ::ForeignAssets; + >::balance( + wnd_at_rococo_parachains.clone().try_into().unwrap(), + &sov_of_receiver_on_ah, + ) + }); + let rocs_in_receiver_reserve_on_ahr_after = + ::account_data_of(sov_of_receiver_on_ah).free; + let receiver_rocs_after = PenpalA::execute_with(|| { + type ForeignAssets = ::ForeignAssets; + >::balance(roc_location, &receiver) + }); + let receiver_wnds_after = PenpalA::execute_with(|| { + type ForeignAssets = ::ForeignAssets; + >::balance(wnd_at_rococo_parachains, &receiver) + }); + + // Sender's balance is reduced by amount sent plus delivery fees + assert!(sender_rocs_after < sender_rocs_before - roc_to_send); + assert_eq!(sender_wnds_after, sender_wnds_before - wnd_to_send); + // Sovereign accounts on reserve are changed accordingly + assert_eq!( + rocs_in_sender_reserve_on_ahr_after, + rocs_in_sender_reserve_on_ahr_before - roc_to_send + ); + assert_eq!( + wnds_in_sender_reserve_on_ahr_after, + wnds_in_sender_reserve_on_ahr_before - wnd_to_send + ); + assert!(rocs_in_receiver_reserve_on_ahr_after > rocs_in_receiver_reserve_on_ahr_before); + assert_eq!( + wnds_in_receiver_reserve_on_ahr_after, + wnds_in_receiver_reserve_on_ahr_before + wnd_to_send + ); + // Receiver's balance is increased + assert!(receiver_rocs_after > receiver_rocs_before); + assert_eq!(receiver_wnds_after, receiver_wnds_before + wnd_to_send); +} + +// ============================================================================================== +// ==== Bidirectional Transfer - Native + Teleportable Foreign Assets - Parachain<->AssetHub ==== +// ============================================================================================== +/// Transfers of native asset plus teleportable foreign asset from Parachain to AssetHub and back +/// with fees paid using native asset. +#[test] +fn bidirectional_teleport_foreign_asset_between_para_and_asset_hub_using_explicit_transfer_types() { + do_bidirectional_teleport_foreign_assets_between_para_and_asset_hub_using_xt( + para_to_asset_hub_teleport_foreign_assets, + asset_hub_to_para_teleport_foreign_assets, + ); +} + +// =============================================================== +// ===== Transfer - Native Asset - Relay->AssetHub->Parachain ==== +// =============================================================== +/// Transfers of native asset Relay to Parachain (using AssetHub reserve). Parachains want to avoid +/// managing SAs on all system chains, thus want all their DOT-in-reserve to be held in their +/// Sovereign Account on Asset Hub. +#[test] +fn transfer_native_asset_from_relay_to_para_through_asset_hub() { + // Init values for Relay + let destination = Polkadot::child_location_of(PenpalB::para_id()); + let sender = PolkadotSender::get(); + let amount_to_send: Balance = POLKADOT_ED * 1000; + + // Init values for Parachain + let relay_native_asset_location = DotLocation::get(); + let receiver = PenpalBReceiver::get(); + + // Init Test + let test_args = TestContext { + sender, + receiver: receiver.clone(), + args: TestArgs::new_relay(destination.clone(), receiver.clone(), amount_to_send), + }; + let mut test = RelayToParaThroughAHTest::new(test_args); + + let sov_penpal_on_ah = AssetHubPolkadot::sovereign_account_id_of( + AssetHubPolkadot::sibling_location_of(PenpalB::para_id()), + ); + // Query initial balances + let sender_balance_before = test.sender.balance; + let sov_penpal_on_ah_before = AssetHubPolkadot::execute_with(|| { + ::Balances::free_balance( + sov_penpal_on_ah.clone(), + ) + }); + let receiver_assets_before = PenpalB::execute_with(|| { + type ForeignAssets = ::ForeignAssets; + >::balance(relay_native_asset_location.clone(), &receiver) + }); + + fn relay_assertions(t: RelayToParaThroughAHTest) { + type RuntimeEvent = ::RuntimeEvent; + Polkadot::assert_xcm_pallet_attempted_complete(None); + assert_expected_events!( + Polkadot, + vec![ + // Amount to teleport is withdrawn from Sender + RuntimeEvent::Balances(pallet_balances::Event::Burned { who, amount }) => { + who: *who == t.sender.account_id, + amount: *amount == t.args.amount, + }, + // Amount to teleport is deposited in Relay's `CheckAccount` + RuntimeEvent::Balances(pallet_balances::Event::Minted { who, amount }) => { + who: *who == ::XcmPallet::check_account(), + amount: *amount == t.args.amount, + }, + ] + ); + } + fn asset_hub_assertions(_: RelayToParaThroughAHTest) { + type RuntimeEvent = ::RuntimeEvent; + let sov_penpal_on_ah = AssetHubPolkadot::sovereign_account_id_of( + AssetHubPolkadot::sibling_location_of(PenpalB::para_id()), + ); + assert_expected_events!( + AssetHubPolkadot, + vec![ + // Deposited to receiver parachain SA + RuntimeEvent::Balances( + pallet_balances::Event::Minted { who, .. } + ) => { + who: *who == sov_penpal_on_ah, + }, + RuntimeEvent::MessageQueue( + pallet_message_queue::Event::Processed { success: true, .. } + ) => {}, + ] + ); + } + fn penpal_assertions(t: RelayToParaThroughAHTest) { + type RuntimeEvent = ::RuntimeEvent; + let expected_id = t.args.assets.into_inner().first().unwrap().id.0.clone(); + assert_expected_events!( + PenpalB, + vec![ + RuntimeEvent::ForeignAssets(pallet_assets::Event::Issued { asset_id, owner, .. }) => { + asset_id: *asset_id == expected_id, + owner: *owner == t.receiver.account_id, + }, + ] + ); + } + fn transfer_assets_dispatchable(t: RelayToParaThroughAHTest) -> DispatchResult { + let fee_idx = t.args.fee_asset_item as usize; + let fee: Asset = t.args.assets.inner().get(fee_idx).cloned().unwrap(); + let asset_hub_location = Polkadot::child_location_of(AssetHubPolkadot::para_id()); + let context = PolkadotUniversalLocation::get(); + + // reanchor fees to the view of destination (Penpal) + let mut remote_fees = fee.clone().reanchored(&t.args.dest, &context).unwrap(); + if let Fungible(ref mut amount) = remote_fees.fun { + // we already spent some fees along the way, just use half of what we started with + *amount /= 2; + } + let xcm_on_final_dest = Xcm::<()>(vec![ + BuyExecution { fees: remote_fees, weight_limit: t.args.weight_limit.clone() }, + DepositAsset { + assets: Wild(AllCounted(t.args.assets.len() as u32)), + beneficiary: t.args.beneficiary, + }, + ]); + + // reanchor final dest (Penpal) to the view of hop (Asset Hub) + let mut dest = t.args.dest.clone(); + dest.reanchor(&asset_hub_location, &context).unwrap(); + // on Asset Hub, forward assets to Penpal + let xcm_on_hop = Xcm::<()>(vec![DepositReserveAsset { + assets: Wild(AllCounted(t.args.assets.len() as u32)), + dest, + xcm: xcm_on_final_dest, + }]); + + // First leg is a teleport, from there a local-reserve-transfer to final dest + ::XcmPallet::transfer_assets_using_type_and_then( + t.signed_origin, + bx!(asset_hub_location.into()), + bx!(t.args.assets.into()), + bx!(TransferType::Teleport), + bx!(fee.id.into()), + bx!(TransferType::Teleport), + bx!(VersionedXcm::from(xcm_on_hop)), + t.args.weight_limit, + ) + } + + // Set assertions and dispatchables + test.set_assertion::(relay_assertions); + test.set_assertion::(asset_hub_assertions); + test.set_assertion::(penpal_assertions); + test.set_dispatchable::(transfer_assets_dispatchable); + test.assert(); + + // Query final balances + let sender_balance_after = test.sender.balance; + let sov_penpal_on_ah_after = AssetHubPolkadot::execute_with(|| { + ::Balances::free_balance(sov_penpal_on_ah) + }); + let receiver_assets_after = PenpalB::execute_with(|| { + type ForeignAssets = ::ForeignAssets; + >::balance(relay_native_asset_location, &receiver) + }); + + // Sender's balance is reduced by amount sent plus delivery fees + assert!(sender_balance_after < sender_balance_before - amount_to_send); + // SA on AH balance is increased + assert!(sov_penpal_on_ah_after > sov_penpal_on_ah_before); + // Receiver's asset balance is increased + assert!(receiver_assets_after > receiver_assets_before); + // Receiver's asset balance increased by `amount_to_send - delivery_fees - bought_execution`; + // `delivery_fees` might be paid from transfer or JIT, also `bought_execution` is unknown but + // should be non-zero + assert!(receiver_assets_after < receiver_assets_before + amount_to_send); +} diff --git a/integration-tests/emulated/tests/assets/asset-hub-polkadot/src/tests/mod.rs b/integration-tests/emulated/tests/assets/asset-hub-polkadot/src/tests/mod.rs index a5dced4fcf..564257ab0d 100644 --- a/integration-tests/emulated/tests/assets/asset-hub-polkadot/src/tests/mod.rs +++ b/integration-tests/emulated/tests/assets/asset-hub-polkadot/src/tests/mod.rs @@ -15,17 +15,10 @@ mod claim_assets; mod fellowship_treasury; +mod hybrid_transfers; mod reserve_transfer; mod send; mod set_xcm_versions; mod swap; mod teleport; mod treasury; - -use crate::*; -emulated_integration_tests_common::include_penpal_create_foreign_asset_on_asset_hub!( - PenpalB, - AssetHubPolkadot, - POLKADOT_ED, - system_parachains_constants::polkadot::fee::WeightToFee -); diff --git a/integration-tests/emulated/tests/assets/asset-hub-polkadot/src/tests/reserve_transfer.rs b/integration-tests/emulated/tests/assets/asset-hub-polkadot/src/tests/reserve_transfer.rs index e7f094a4d9..7961e4c14f 100644 --- a/integration-tests/emulated/tests/assets/asset-hub-polkadot/src/tests/reserve_transfer.rs +++ b/integration-tests/emulated/tests/assets/asset-hub-polkadot/src/tests/reserve_transfer.rs @@ -14,9 +14,9 @@ // limitations under the License. use crate::*; -use asset_hub_polkadot_runtime::xcm_config::XcmConfig as AssetHubPolkadotXcmConfig; -use polkadot_runtime::xcm_config::XcmConfig as PolkadotXcmConfig; -use polkadot_system_emulated_network::penpal_emulated_chain::XcmConfig as PenpalPolkadotXcmConfig; +use asset_hub_polkadot_runtime::xcm_config::DotLocation; +use emulated_integration_tests_common::RESERVABLE_ASSET_ID; +use polkadot_system_emulated_network::penpal_emulated_chain::LocalReservableFromAssetHub as PenpalLocalReservableFromAssetHub; fn relay_to_para_sender_assertions(t: RelayToParaTest) { type RuntimeEvent = ::RuntimeEvent; @@ -39,7 +39,7 @@ fn relay_to_para_sender_assertions(t: RelayToParaTest) { ); } -fn system_para_to_para_sender_assertions(t: SystemParaToParaTest) { +pub fn system_para_to_para_sender_assertions(t: SystemParaToParaTest) { type RuntimeEvent = ::RuntimeEvent; AssetHubPolkadot::assert_xcm_pallet_attempted_complete(Some(Weight::from_parts( 676_119_000, @@ -63,12 +63,34 @@ fn system_para_to_para_sender_assertions(t: SystemParaToParaTest) { ); } -fn para_receiver_assertions(_: Test) { +pub fn system_para_to_para_receiver_assertions(t: SystemParaToParaTest) { type RuntimeEvent = ::RuntimeEvent; + + PenpalB::assert_xcmp_queue_success(None); + for asset in t.args.assets.into_inner().into_iter() { + let expected_id = asset.id.0; + assert_expected_events!( + PenpalB, + vec![ + RuntimeEvent::ForeignAssets(pallet_assets::Event::Issued { asset_id, owner, .. }) => { + asset_id: *asset_id == expected_id, + owner: *owner == t.receiver.account_id, + }, + ] + ); + } +} + +fn relay_to_para_assets_receiver_assertions(t: RelayToParaTest) { + type RuntimeEvent = ::RuntimeEvent; + assert_expected_events!( PenpalB, vec![ - RuntimeEvent::Balances(pallet_balances::Event::Deposit { .. }) => {}, + RuntimeEvent::ForeignAssets(pallet_assets::Event::Issued { asset_id, owner, .. }) => { + asset_id: *asset_id == DotLocation::get(), + owner: *owner == t.receiver.account_id, + }, RuntimeEvent::MessageQueue( pallet_message_queue::Event::Processed { success: true, .. } ) => {}, @@ -76,25 +98,29 @@ fn para_receiver_assertions(_: Test) { ); } -fn para_to_system_para_sender_assertions(t: ParaToSystemParaTest) { +pub fn para_to_system_para_sender_assertions(t: ParaToSystemParaTest) { type RuntimeEvent = ::RuntimeEvent; - PenpalB::assert_xcm_pallet_attempted_complete(Some(Weight::from_parts(864_610_000, 8_799))); - assert_expected_events!( - PenpalB, - vec![ - // Amount to reserve transfer is transferred to Parachain's Sovereign account - RuntimeEvent::Balances( - pallet_balances::Event::Withdraw { who, amount } - ) => { - who: *who == t.sender.account_id, - amount: *amount == t.args.amount, - }, - ] - ); + PenpalB::assert_xcm_pallet_attempted_complete(None); + for asset in t.args.assets.into_inner().into_iter() { + let expected_id = asset.id.0; + let asset_amount = if let Fungible(a) = asset.fun { Some(a) } else { None }.unwrap(); + assert_expected_events!( + PenpalA, + vec![ + RuntimeEvent::ForeignAssets( + pallet_assets::Event::Burned { asset_id, owner, balance } + ) => { + asset_id: *asset_id == expected_id, + owner: *owner == t.sender.account_id, + balance: *balance == asset_amount, + }, + ] + ); + } } -fn para_to_system_para_receiver_assertions(t: ParaToSystemParaTest) { +pub fn para_to_system_para_receiver_assertions(t: ParaToSystemParaTest) { type RuntimeEvent = ::RuntimeEvent; let sov_penpal_on_ahp = AssetHubPolkadot::sovereign_account_id_of( AssetHubPolkadot::sibling_location_of(PenpalB::para_id()), @@ -143,42 +169,51 @@ fn system_para_to_para_assets_sender_assertions(t: SystemParaToParaTest) { ); } -fn system_para_to_para_assets_receiver_assertions(_: Test) { +fn system_para_to_para_assets_receiver_assertions(t: SystemParaToParaTest) { type RuntimeEvent = ::RuntimeEvent; - assert_expected_events!( - PenpalB, - vec![ - RuntimeEvent::Balances(pallet_balances::Event::Deposit { .. }) => {}, - RuntimeEvent::Assets(pallet_assets::Event::Issued { .. }) => {}, - RuntimeEvent::MessageQueue( - pallet_message_queue::Event::Processed { success: true, .. } - ) => {}, - ] - ); -} -fn para_to_para_sender_assertions(t: ParaToParaTest) { - type RuntimeEvent = ::RuntimeEvent; - PenpalA::assert_xcm_pallet_attempted_complete(None); + let system_para_asset_location = PenpalLocalReservableFromAssetHub::get(); + PenpalB::assert_xcmp_queue_success(None); assert_expected_events!( PenpalB, vec![ - // Amount to reserve transfer is transferred to Parachain's Sovereign account - RuntimeEvent::Balances( - pallet_balances::Event::Withdraw { who, amount } - ) => { - who: *who == t.sender.account_id, + RuntimeEvent::ForeignAssets(pallet_assets::Event::Issued { asset_id, owner, .. }) => { + asset_id: *asset_id == DotLocation::get(), + owner: *owner == t.receiver.account_id, + }, + RuntimeEvent::ForeignAssets(pallet_assets::Event::Issued { asset_id, owner, amount }) => { + asset_id: *asset_id == system_para_asset_location, + owner: *owner == t.receiver.account_id, amount: *amount == t.args.amount, }, - // XCM sent to relay reserve - RuntimeEvent::ParachainSystem( - cumulus_pallet_parachain_system::Event::UpwardMessageSent { .. } - ) => {}, ] ); } -fn para_to_para_relay_hop_assertions(t: ParaToParaTest) { +pub fn para_to_para_through_hop_sender_assertions(t: Test) { + type RuntimeEvent = ::RuntimeEvent; + + PenpalB::assert_xcm_pallet_attempted_complete(None); + for asset in t.args.assets.into_inner() { + let expected_id = asset.id.0.clone(); + let amount = if let Fungible(a) = asset.fun { Some(a) } else { None }.unwrap(); + assert_expected_events!( + PenpalB, + vec![ + // Amount to reserve transfer is transferred to Parachain's Sovereign account + RuntimeEvent::ForeignAssets( + pallet_assets::Event::Burned { asset_id, owner, balance }, + ) => { + asset_id: *asset_id == expected_id, + owner: *owner == t.sender.account_id, + balance: *balance == amount, + }, + ] + ); + } +} + +fn para_to_para_relay_hop_assertions(t: ParaToParaThroughRelayTest) { type RuntimeEvent = ::RuntimeEvent; let sov_penpal_a_on_polkadot = Polkadot::sovereign_account_id_of(Polkadot::child_location_of(PenpalA::para_id())); @@ -207,17 +242,22 @@ fn para_to_para_relay_hop_assertions(t: ParaToParaTest) { ); } -fn para_to_para_receiver_assertions(_: ParaToParaTest) { +pub fn para_to_para_through_hop_receiver_assertions(t: Test) { type RuntimeEvent = ::RuntimeEvent; - assert_expected_events!( - PenpalA, - vec![ - RuntimeEvent::Balances(pallet_balances::Event::Deposit { .. }) => {}, - RuntimeEvent::MessageQueue( - pallet_message_queue::Event::Processed { success: true, .. } - ) => {}, - ] - ); + + PenpalA::assert_xcmp_queue_success(None); + for asset in t.args.assets.into_inner().into_iter() { + let expected_id = asset.id.0; + assert_expected_events!( + PenpalA, + vec![ + RuntimeEvent::ForeignAssets(pallet_assets::Event::Issued { asset_id, owner, .. }) => { + asset_id: *asset_id == expected_id, + owner: *owner == t.receiver.account_id, + }, + ] + ); + } } fn relay_to_para_reserve_transfer_assets(t: RelayToParaTest) -> DispatchResult { @@ -253,7 +293,9 @@ fn para_to_system_para_reserve_transfer_assets(t: ParaToSystemParaTest) -> Dispa ) } -fn para_to_para_limited_reserve_transfer_assets(t: ParaToParaTest) -> DispatchResult { +fn para_to_para_through_relay_limited_reserve_transfer_assets( + t: ParaToParaThroughRelayTest, +) -> DispatchResult { ::PolkadotXcm::limited_reserve_transfer_assets( t.signed_origin, bx!(t.args.dest.into()), @@ -338,42 +380,49 @@ fn reserve_transfer_native_asset_from_system_para_to_relay_fails() { fn reserve_transfer_native_asset_from_relay_to_para() { // Init values for Relay let destination = Polkadot::child_location_of(PenpalB::para_id()); - let beneficiary_id = PenpalBReceiver::get(); + let sender = PolkadotSender::get(); let amount_to_send: Balance = POLKADOT_ED * 1000; + // Init values for Parachain + let relay_native_asset_location = DotLocation::get(); + let receiver = PenpalBReceiver::get(); + + // Init Test let test_args = TestContext { - sender: PolkadotSender::get(), - receiver: PenpalBReceiver::get(), - args: TestArgs::new_relay(destination, beneficiary_id, amount_to_send), + sender, + receiver: receiver.clone(), + args: TestArgs::new_relay(destination.clone(), receiver.clone(), amount_to_send), }; - let mut test = RelayToParaTest::new(test_args); + // Query initial balances let sender_balance_before = test.sender.balance; - let receiver_balance_before = test.receiver.balance; + let receiver_assets_before = PenpalB::execute_with(|| { + type ForeignAssets = ::ForeignAssets; + >::balance(relay_native_asset_location.clone(), &receiver) + }); + // Set assertions and dispatchables test.set_assertion::(relay_to_para_sender_assertions); - test.set_assertion::(para_receiver_assertions); + test.set_assertion::(relay_to_para_assets_receiver_assertions); test.set_dispatchable::(relay_to_para_reserve_transfer_assets); test.assert(); - let delivery_fees = Polkadot::execute_with(|| { - xcm_helpers::transfer_assets_delivery_fees::< - ::XcmSender, - >(test.args.assets.clone(), 0, test.args.weight_limit, test.args.beneficiary, test.args.dest) - }); - + // Query final balances let sender_balance_after = test.sender.balance; - let receiver_balance_after = test.receiver.balance; + let receiver_assets_after = PenpalB::execute_with(|| { + type ForeignAssets = ::ForeignAssets; + >::balance(relay_native_asset_location, &receiver) + }); - // Sender's balance is reduced - assert_eq!(sender_balance_before - amount_to_send - delivery_fees, sender_balance_after); - // Receiver's balance is increased - assert!(receiver_balance_after > receiver_balance_before); - // Receiver's balance increased by `amount_to_send - delivery_fees - bought_execution`; + // Sender's balance is reduced by amount sent plus delivery fees + assert!(sender_balance_after < sender_balance_before - amount_to_send); + // Receiver's asset balance is increased + assert!(receiver_assets_after > receiver_assets_before); + // Receiver's asset balance increased by `amount_to_send - delivery_fees - bought_execution`; // `delivery_fees` might be paid from transfer or JIT, also `bought_execution` is unknown but // should be non-zero - assert!(receiver_balance_after < receiver_balance_before + amount_to_send); + assert!(receiver_assets_after < receiver_assets_before + amount_to_send); } /// Reserve Transfers of native asset from System Parachain to Parachain should work @@ -381,88 +430,125 @@ fn reserve_transfer_native_asset_from_relay_to_para() { fn reserve_transfer_native_asset_from_system_para_to_para() { // Init values for System Parachain let destination = AssetHubPolkadot::sibling_location_of(PenpalB::para_id()); - let beneficiary_id = PenpalBReceiver::get(); - let amount_to_send: Balance = ASSET_HUB_POLKADOT_ED * 1000; - let assets = (Parent, amount_to_send).into(); + let sender = AssetHubPolkadotSender::get(); + let amount_to_send: Balance = ASSET_HUB_POLKADOT_ED * 10000; + let assets: Assets = (Parent, amount_to_send).into(); + + // Init values for Parachain + let system_para_native_asset_location = DotLocation::get(); + let receiver = PenpalBReceiver::get(); + // Init Test let test_args = TestContext { - sender: AssetHubPolkadotSender::get(), - receiver: PenpalBReceiver::get(), - args: TestArgs::new_para(destination, beneficiary_id, amount_to_send, assets, None, 0), + sender, + receiver: receiver.clone(), + args: TestArgs::new_para( + destination.clone(), + receiver.clone(), + amount_to_send, + assets.clone(), + None, + 0, + ), }; - let mut test = SystemParaToParaTest::new(test_args); + // Query initial balances let sender_balance_before = test.sender.balance; - let receiver_balance_before = test.receiver.balance; + let receiver_assets_before = PenpalB::execute_with(|| { + type ForeignAssets = ::ForeignAssets; + >::balance(system_para_native_asset_location.clone(), &receiver) + }); + // Set assertions and dispatchables test.set_assertion::(system_para_to_para_sender_assertions); - test.set_assertion::(para_receiver_assertions); + test.set_assertion::(system_para_to_para_receiver_assertions); test.set_dispatchable::(system_para_to_para_reserve_transfer_assets); test.assert(); + // Query final balances let sender_balance_after = test.sender.balance; - let receiver_balance_after = test.receiver.balance; - - let delivery_fees = AssetHubPolkadot::execute_with(|| { - xcm_helpers::transfer_assets_delivery_fees::< - ::XcmSender, - >(test.args.assets.clone(), 0, test.args.weight_limit, test.args.beneficiary, test.args.dest) + let receiver_assets_after = PenpalB::execute_with(|| { + type ForeignAssets = ::ForeignAssets; + >::balance(system_para_native_asset_location, &receiver) }); - // Sender's balance is reduced - assert_eq!(sender_balance_before - amount_to_send - delivery_fees, sender_balance_after); - // Receiver's balance is increased - assert!(receiver_balance_after > receiver_balance_before); - // Receiver's balance increased by `amount_to_send - delivery_fees - bought_execution`; + // Sender's balance is reduced by amount sent plus delivery fees + assert!(sender_balance_after < sender_balance_before - amount_to_send); + // Receiver's assets is increased + assert!(receiver_assets_after > receiver_assets_before); + // Receiver's assets increased by `amount_to_send - delivery_fees - bought_execution`; + // `delivery_fees` might be paid from transfer or JIT, also `bought_execution` is unknown but // should be non-zero - assert!(receiver_balance_after < receiver_balance_before + amount_to_send); + assert!(receiver_assets_after < receiver_assets_before + amount_to_send); } /// Reserve Transfers of native asset from Parachain to System Parachain should work #[test] fn reserve_transfer_native_asset_from_para_to_system_para() { - // Init values for Penpal Parachain + // Init values for Parachain let destination = PenpalB::sibling_location_of(AssetHubPolkadot::para_id()); - let beneficiary_id = AssetHubPolkadotReceiver::get(); - let amount_to_send: Balance = ASSET_HUB_POLKADOT_ED * 1000; - let assets = (Parent, amount_to_send).into(); + let sender = PenpalBSender::get(); + let amount_to_send: Balance = ASSET_HUB_POLKADOT_ED * 10000; + let assets: Assets = (Parent, amount_to_send).into(); + let system_para_native_asset_location = DotLocation::get(); + let asset_owner = PenpalAssetOwner::get(); + + // fund Parachain's sender account + PenpalB::mint_foreign_asset( + ::RuntimeOrigin::signed(asset_owner), + system_para_native_asset_location.clone(), + sender.clone(), + amount_to_send * 2, + ); + // Init values for System Parachain + let receiver = AssetHubPolkadotReceiver::get(); + let penpal_location_as_seen_by_ahr = AssetHubPolkadot::sibling_location_of(PenpalB::para_id()); + let sov_penpal_on_ahr = + AssetHubPolkadot::sovereign_account_id_of(penpal_location_as_seen_by_ahr); + + // fund Parachain's SA on System Parachain with the native tokens held in reserve + AssetHubPolkadot::fund_accounts(vec![(sov_penpal_on_ahr, amount_to_send * 2)]); + + // Init Test let test_args = TestContext { - sender: PenpalBSender::get(), - receiver: AssetHubPolkadotReceiver::get(), - args: TestArgs::new_para(destination, beneficiary_id, amount_to_send, assets, None, 0), + sender: sender.clone(), + receiver: receiver.clone(), + args: TestArgs::new_para( + destination.clone(), + receiver.clone(), + amount_to_send, + assets.clone(), + None, + 0, + ), }; - let mut test = ParaToSystemParaTest::new(test_args); - let sender_balance_before = test.sender.balance; + // Query initial balances + let sender_assets_before = PenpalB::execute_with(|| { + type ForeignAssets = ::ForeignAssets; + >::balance(system_para_native_asset_location.clone(), &sender) + }); let receiver_balance_before = test.receiver.balance; - let penpal_location_as_seen_by_ahp = AssetHubPolkadot::sibling_location_of(PenpalB::para_id()); - let sov_penpal_on_ahp = - AssetHubPolkadot::sovereign_account_id_of(penpal_location_as_seen_by_ahp); - - // fund the Penpal's SA on AHP with the native tokens held in reserve - AssetHubPolkadot::fund_accounts(vec![(sov_penpal_on_ahp, amount_to_send * 2)]); - + // Set assertions and dispatchables test.set_assertion::(para_to_system_para_sender_assertions); test.set_assertion::(para_to_system_para_receiver_assertions); test.set_dispatchable::(para_to_system_para_reserve_transfer_assets); test.assert(); - let sender_balance_after = test.sender.balance; - let receiver_balance_after = test.receiver.balance; - - let delivery_fees = PenpalB::execute_with(|| { - xcm_helpers::transfer_assets_delivery_fees::< - ::XcmSender, - >(test.args.assets.clone(), 0, test.args.weight_limit, test.args.beneficiary, test.args.dest) + // Query final balances + let sender_assets_after = PenpalB::execute_with(|| { + type ForeignAssets = ::ForeignAssets; + >::balance(system_para_native_asset_location, &sender) }); + let receiver_balance_after = test.receiver.balance; - // Sender's balance is reduced - assert_eq!(sender_balance_before - amount_to_send - delivery_fees, sender_balance_after); + // Sender's balance is reduced by amount sent plus delivery fees + assert!(sender_assets_after < sender_assets_before - amount_to_send); // Receiver's balance is increased assert!(receiver_balance_after > receiver_balance_before); // Receiver's balance increased by `amount_to_send - delivery_fees - bought_execution`; @@ -475,32 +561,21 @@ fn reserve_transfer_native_asset_from_para_to_system_para() { /// work #[test] fn reserve_transfer_assets_from_system_para_to_para() { - // Force create asset on AssetHubPolkadot and PenpalB from Relay Chain - AssetHubPolkadot::force_create_and_mint_asset( - ASSET_ID, - ASSET_MIN_BALANCE, - true, - AssetHubPolkadotSender::get(), - Some(Weight::from_parts(1_019_445_000, 200_000)), - ASSET_MIN_BALANCE * 1_000_000, - ); - PenpalB::force_create_and_mint_asset( - ASSET_ID, - ASSET_MIN_BALANCE, - false, - PenpalBSender::get(), - None, - 0, - ); - // Init values for System Parachain let destination = AssetHubPolkadot::sibling_location_of(PenpalB::para_id()); - let beneficiary_id = PenpalBReceiver::get(); - let fee_amount_to_send = ASSET_HUB_POLKADOT_ED * 1000; - let asset_amount_to_send = ASSET_MIN_BALANCE * 1000; + let sov_penpal_on_ahr = AssetHubPolkadot::sovereign_account_id_of(destination.clone()); + let sender = AssetHubPolkadotSender::get(); + let fee_amount_to_send = ASSET_HUB_POLKADOT_ED * 10000; + let asset_amount_to_send = PENPAL_ED * 10000; + let asset_owner = AssetHubPolkadotAssetOwner::get(); + let asset_owner_signer = + ::RuntimeOrigin::signed(asset_owner.clone()); let assets: Assets = vec![ (Parent, fee_amount_to_send).into(), - ([PalletInstance(ASSETS_PALLET_ID), GeneralIndex(ASSET_ID.into())], asset_amount_to_send) + ( + [PalletInstance(ASSETS_PALLET_ID), GeneralIndex(RESERVABLE_ASSET_ID.into())], + asset_amount_to_send, + ) .into(), ] .into(); @@ -509,115 +584,160 @@ fn reserve_transfer_assets_from_system_para_to_para() { .iter() .position(|r| r == &(Parent, fee_amount_to_send).into()) .unwrap() as u32; + AssetHubPolkadot::mint_asset( + asset_owner_signer, + RESERVABLE_ASSET_ID, + asset_owner, + asset_amount_to_send * 2, + ); + + // Create SA-of-Penpal-on-AHR with ED. + AssetHubPolkadot::fund_accounts(vec![(sov_penpal_on_ahr, ASSET_HUB_POLKADOT_ED)]); + + // Init values for Parachain + let receiver = PenpalBReceiver::get(); + let system_para_native_asset_location = DotLocation::get(); + let system_para_foreign_asset_location = PenpalLocalReservableFromAssetHub::get(); + // Init Test let para_test_args = TestContext { - sender: AssetHubPolkadotSender::get(), - receiver: PenpalBReceiver::get(), + sender: sender.clone(), + receiver: receiver.clone(), args: TestArgs::new_para( destination, - beneficiary_id, + receiver.clone(), asset_amount_to_send, assets, None, fee_asset_index, ), }; - let mut test = SystemParaToParaTest::new(para_test_args); - // Create SA-of-Penpal-on-AHP with ED. - let penpal_location = AssetHubPolkadot::sibling_location_of(PenpalB::para_id()); - let sov_penpal_on_ahp = AssetHubPolkadot::sovereign_account_id_of(penpal_location); - AssetHubPolkadot::fund_accounts(vec![(sov_penpal_on_ahp, POLKADOT_ED)]); - + // Query initial balances let sender_balance_before = test.sender.balance; - let receiver_balance_before = test.receiver.balance; - let sender_assets_before = AssetHubPolkadot::execute_with(|| { type Assets = ::Assets; - >::balance(ASSET_ID, &AssetHubPolkadotSender::get()) + >::balance(RESERVABLE_ASSET_ID, &sender) }); - let receiver_assets_before = PenpalB::execute_with(|| { - type Assets = ::Assets; - >::balance(ASSET_ID, &PenpalBReceiver::get()) + let receiver_system_native_assets_before = PenpalB::execute_with(|| { + type ForeignAssets = ::ForeignAssets; + >::balance(system_para_native_asset_location.clone(), &receiver) + }); + let receiver_foreign_assets_before = PenpalB::execute_with(|| { + type ForeignAssets = ::ForeignAssets; + >::balance( + system_para_foreign_asset_location.clone(), + &receiver, + ) }); + // Set assertions and dispatchables test.set_assertion::(system_para_to_para_assets_sender_assertions); test.set_assertion::(system_para_to_para_assets_receiver_assertions); test.set_dispatchable::(system_para_to_para_reserve_transfer_assets); test.assert(); + // Query final balances let sender_balance_after = test.sender.balance; - let receiver_balance_after = test.receiver.balance; - - // Sender's balance is reduced - assert!(sender_balance_after < sender_balance_before); - // Receiver's balance is increased - assert!(receiver_balance_after > receiver_balance_before); - // Receiver's balance increased by `amount_to_send - delivery_fees - bought_execution`; - // `delivery_fees` might be paid from transfer or JIT, also `bought_execution` is unknown but - // should be non-zero - assert!(receiver_balance_after < receiver_balance_before + fee_amount_to_send); - let sender_assets_after = AssetHubPolkadot::execute_with(|| { type Assets = ::Assets; - >::balance(ASSET_ID, &AssetHubPolkadotSender::get()) + >::balance(RESERVABLE_ASSET_ID, &sender) }); - let receiver_assets_after = PenpalB::execute_with(|| { - type Assets = ::Assets; - >::balance(ASSET_ID, &PenpalBReceiver::get()) + let receiver_system_native_assets_after = PenpalB::execute_with(|| { + type ForeignAssets = ::ForeignAssets; + >::balance(system_para_native_asset_location.clone(), &receiver) + }); + let receiver_foreign_assets_after = PenpalB::execute_with(|| { + type ForeignAssets = ::ForeignAssets; + >::balance(system_para_foreign_asset_location, &receiver) }); + // Sender's balance is reduced + assert!(sender_balance_after < sender_balance_before); + // Receiver's foreign asset balance is increased + assert!(receiver_foreign_assets_after > receiver_foreign_assets_before); + // Receiver's system asset balance increased by `amount_to_send - delivery_fees - + // bought_execution`; `delivery_fees` might be paid from transfer or JIT, also + // `bought_execution` is unknown but should be non-zero + assert!( + receiver_system_native_assets_after < + receiver_system_native_assets_before + fee_amount_to_send + ); - // Sender's balance is reduced by exact amount + // Sender's asset balance is reduced by exact amount assert_eq!(sender_assets_before - asset_amount_to_send, sender_assets_after); - // Receiver's balance is increased by exact amount - assert_eq!(receiver_assets_after, receiver_assets_before + asset_amount_to_send); + // Receiver's foreign asset balance is increased by exact amount + assert_eq!( + receiver_foreign_assets_after, + receiver_foreign_assets_before + asset_amount_to_send + ); } /// Reserve Transfers of native asset from Parachain to Parachain (through Relay reserve) should /// work #[test] -fn reserve_transfer_native_asset_from_para_to_para() { - // Init values for Penpal Parachain +fn reserve_transfer_native_asset_from_para_to_para_through_relay() { + // Init values for Parachain Origin let destination = PenpalB::sibling_location_of(PenpalA::para_id()); - let beneficiary_id = PenpalAReceiver::get(); - let amount_to_send: Balance = ASSET_HUB_POLKADOT_ED * 10000; + let sender = PenpalBSender::get(); + let amount_to_send: Balance = POLKADOT_ED * 10000; + let asset_owner = PenpalAssetOwner::get(); let assets = (Parent, amount_to_send).into(); + let relay_native_asset_location = DotLocation::get(); + let sender_as_seen_by_relay = Polkadot::child_location_of(PenpalB::para_id()); + let sov_of_sender_on_relay = Polkadot::sovereign_account_id_of(sender_as_seen_by_relay); - let test_args = TestContext { - sender: PenpalBSender::get(), - receiver: PenpalAReceiver::get(), - args: TestArgs::new_para(destination, beneficiary_id, amount_to_send, assets, None, 0), - }; + // fund Parachain's sender account + PenpalB::mint_foreign_asset( + ::RuntimeOrigin::signed(asset_owner), + relay_native_asset_location.clone(), + sender.clone(), + amount_to_send * 2, + ); - let mut test = ParaToParaTest::new(test_args); + // fund the Parachain Origin's SA on Relay Chain with the native tokens held in reserve + Polkadot::fund_accounts(vec![(sov_of_sender_on_relay, amount_to_send * 2)]); - let sender_balance_before = test.sender.balance; - let receiver_balance_before = test.receiver.balance; + // Init values for Parachain Destination + let receiver = PenpalAReceiver::get(); - let sender_as_seen_by_relay = Polkadot::child_location_of(PenpalB::para_id()); - let sov_of_sender_on_relay = Polkadot::sovereign_account_id_of(sender_as_seen_by_relay); + // Init Test + let test_args = TestContext { + sender: sender.clone(), + receiver: receiver.clone(), + args: TestArgs::new_para(destination, receiver.clone(), amount_to_send, assets, None, 0), + }; + let mut test = ParaToParaThroughRelayTest::new(test_args); - // fund the PenpalB's SA on Polkadot with the native tokens held in reserve - Polkadot::fund_accounts(vec![(sov_of_sender_on_relay, amount_to_send * 2)]); + // Query initial balances + let sender_assets_before = PenpalB::execute_with(|| { + type ForeignAssets = ::ForeignAssets; + >::balance(relay_native_asset_location.clone(), &sender) + }); + let receiver_assets_before = PenpalA::execute_with(|| { + type ForeignAssets = ::ForeignAssets; + >::balance(relay_native_asset_location.clone(), &receiver) + }); - test.set_assertion::(para_to_para_sender_assertions); + // Set assertions and dispatchables + test.set_assertion::(para_to_para_through_hop_sender_assertions); test.set_assertion::(para_to_para_relay_hop_assertions); - test.set_assertion::(para_to_para_receiver_assertions); - test.set_dispatchable::(para_to_para_limited_reserve_transfer_assets); + test.set_assertion::(para_to_para_through_hop_receiver_assertions); + test.set_dispatchable::(para_to_para_through_relay_limited_reserve_transfer_assets); test.assert(); - let sender_balance_after = test.sender.balance; - let receiver_balance_after = test.receiver.balance; - - let delivery_fees = PenpalB::execute_with(|| { - xcm_helpers::transfer_assets_delivery_fees::< - ::XcmSender, - >(test.args.assets.clone(), 0, test.args.weight_limit, test.args.beneficiary, test.args.dest) + // Query final balances + let sender_assets_after = PenpalB::execute_with(|| { + type ForeignAssets = ::ForeignAssets; + >::balance(relay_native_asset_location.clone(), &sender) + }); + let receiver_assets_after = PenpalA::execute_with(|| { + type ForeignAssets = ::ForeignAssets; + >::balance(relay_native_asset_location, &receiver) }); - // Sender's balance is reduced - assert_eq!(sender_balance_before - amount_to_send - delivery_fees, sender_balance_after); + // Sender's balance is reduced by amount sent plus delivery fees + assert!(sender_assets_after < sender_assets_before - amount_to_send); // Receiver's balance is increased - assert!(receiver_balance_after > receiver_balance_before); + assert!(receiver_assets_after > receiver_assets_before); } diff --git a/integration-tests/emulated/tests/assets/asset-hub-polkadot/src/tests/swap.rs b/integration-tests/emulated/tests/assets/asset-hub-polkadot/src/tests/swap.rs index fa76779587..139bc70286 100644 --- a/integration-tests/emulated/tests/assets/asset-hub-polkadot/src/tests/swap.rs +++ b/integration-tests/emulated/tests/assets/asset-hub-polkadot/src/tests/swap.rs @@ -132,40 +132,26 @@ fn swap_locally_on_chain_using_foreign_assets() { v3::Location::try_from(asset_hub_polkadot_runtime::xcm_config::DotLocation::get()) .expect("conversion works"), ); - - let ah_as_seen_by_penpal = PenpalB::sibling_location_of(AssetHubPolkadot::para_id()); let asset_location_on_penpal = v3::Location::try_from(PenpalLocalTeleportableToAssetHub::get()).expect("conversion works"); - let asset_id_on_penpal = match asset_location_on_penpal.last() { - Some(v3::Junction::GeneralIndex(id)) => *id as u32, - _ => unreachable!(), - }; - let asset_owner_on_penpal = PenpalBSender::get(); let foreign_asset_at_asset_hub_polkadot = - v3::Location::new(1, [v3::Junction::Parachain(PenpalB::para_id().into())]) + v3::Location::new(1, [v3::Junction::Parachain(PenpalA::para_id().into())]) .appended_with(asset_location_on_penpal) .unwrap(); - // 1. Create asset on penpal and, 2. Create foreign asset on asset_hub_polkadot - super::penpal_create_foreign_asset_on_asset_hub( - asset_id_on_penpal, - foreign_asset_at_asset_hub_polkadot, - ah_as_seen_by_penpal, - true, - asset_owner_on_penpal, - ASSET_MIN_BALANCE * 1_000_000, - ); - - let penpal_as_seen_by_ah = AssetHubPolkadot::sibling_location_of(PenpalB::para_id()); - let sov_penpal_on_ahk = AssetHubPolkadot::sovereign_account_id_of(penpal_as_seen_by_ah); + let penpal_as_seen_by_ah = AssetHubPolkadot::sibling_location_of(PenpalA::para_id()); + let sov_penpal_on_ahp = AssetHubPolkadot::sovereign_account_id_of(penpal_as_seen_by_ah); AssetHubPolkadot::fund_accounts(vec![ - (AssetHubPolkadotSender::get(), 5_000_000 * POLKADOT_ED), /* An account to swap - * dot - * for something else. */ + // An account to swap dot for something else. + (AssetHubPolkadotSender::get(), 5_000_000 * ASSET_HUB_POLKADOT_ED), + // Penpal's sovereign account in AH should have some balance + (sov_penpal_on_ahp.clone(), 100_000_000 * ASSET_HUB_POLKADOT_ED), ]); AssetHubPolkadot::execute_with(|| { - // 3: Mint foreign asset on asset_hub_polkadot: + // 0: No need to create foreign asset as it exists in genesis. + // + // 1:: Mint foreign asset on asset_hub_polkadot: // // (While it might be nice to use batch, // currently that's disabled due to safe call filters.) @@ -173,10 +159,10 @@ fn swap_locally_on_chain_using_foreign_assets() { type RuntimeEvent = ::RuntimeEvent; // 3. Mint foreign asset (in reality this should be a teleport or some such) assert_ok!(::ForeignAssets::mint( - ::RuntimeOrigin::signed(sov_penpal_on_ahk.clone()), + ::RuntimeOrigin::signed(sov_penpal_on_ahp.clone()), foreign_asset_at_asset_hub_polkadot, - sov_penpal_on_ahk.clone().into(), - 3_000_000_000_000, + sov_penpal_on_ahp.clone().into(), + ASSET_HUB_POLKADOT_ED * 3_000_000_000_000, )); assert_expected_events!( @@ -202,14 +188,14 @@ fn swap_locally_on_chain_using_foreign_assets() { // 5. Add liquidity: assert_ok!(::AssetConversion::add_liquidity( - ::RuntimeOrigin::signed(sov_penpal_on_ahk.clone()), + ::RuntimeOrigin::signed(sov_penpal_on_ahp.clone()), asset_native.clone(), Box::new(foreign_asset_at_asset_hub_polkadot), 1_000_000_000_000, 2_000_000_000_000, 0, 0, - sov_penpal_on_ahk.clone() + sov_penpal_on_ahp.clone() )); assert_expected_events!( @@ -228,8 +214,8 @@ fn swap_locally_on_chain_using_foreign_assets() { ::AssetConversion::swap_exact_tokens_for_tokens( ::RuntimeOrigin::signed(AssetHubPolkadotSender::get()), path, - 100000, - 1000, + 100000 * ASSET_HUB_POLKADOT_ED, + 1000 * ASSET_HUB_POLKADOT_ED, AssetHubPolkadotSender::get(), true ) @@ -239,8 +225,8 @@ fn swap_locally_on_chain_using_foreign_assets() { AssetHubPolkadot, vec![ RuntimeEvent::AssetConversion(pallet_asset_conversion::Event::SwapExecuted { amount_in, amount_out, .. },) => { - amount_in: *amount_in == 100000, - amount_out: *amount_out == 199399, + amount_in: *amount_in == 10000000000000, + amount_out: *amount_out == 1817684594348, }, ] ); @@ -248,13 +234,13 @@ fn swap_locally_on_chain_using_foreign_assets() { // 7. Remove liquidity assert_ok!( ::AssetConversion::remove_liquidity( - ::RuntimeOrigin::signed(sov_penpal_on_ahk.clone()), + ::RuntimeOrigin::signed(sov_penpal_on_ahp.clone()), asset_native.clone(), Box::new(foreign_asset_at_asset_hub_polkadot), - 1414213562273 - 2_000_000_000, // all but the 2 EDs can't be retrieved. + 1414213562273 / 2, // remove only half 0, 0, - sov_penpal_on_ahk.clone(), + sov_penpal_on_ahp.clone(), ) ); }); diff --git a/integration-tests/emulated/tests/assets/asset-hub-polkadot/src/tests/teleport.rs b/integration-tests/emulated/tests/assets/asset-hub-polkadot/src/tests/teleport.rs index 8d1462e44f..2f87daa87e 100644 --- a/integration-tests/emulated/tests/assets/asset-hub-polkadot/src/tests/teleport.rs +++ b/integration-tests/emulated/tests/assets/asset-hub-polkadot/src/tests/teleport.rs @@ -14,7 +14,7 @@ // limitations under the License. use crate::*; -use asset_hub_polkadot_runtime::xcm_config::XcmConfig as AssetHubPolkadotXcmConfig; +use asset_hub_polkadot_runtime::xcm_config::{DotLocation, XcmConfig as AssetHubPolkadotXcmConfig}; use emulated_integration_tests_common::xcm_helpers::non_fee_asset; use polkadot_runtime::xcm_config::XcmConfig as PolkadotXcmConfig; use polkadot_system_emulated_network::penpal_emulated_chain::LocalTeleportableToAssetHub as PenpalLocalTeleportableToAssetHub; @@ -114,18 +114,20 @@ fn para_dest_assertions(t: RelayToSystemParaTest) { fn penpal_to_ah_foreign_assets_sender_assertions(t: ParaToSystemParaTest) { type RuntimeEvent = ::RuntimeEvent; - PenpalB::assert_xcm_pallet_attempted_complete(None); + let system_para_native_asset_location = DotLocation::get(); let expected_asset_id = t.args.asset_id.unwrap(); let (_, expected_asset_amount) = non_fee_asset(&t.args.assets, t.args.fee_asset_item as usize).unwrap(); + + PenpalB::assert_xcm_pallet_attempted_complete(None); assert_expected_events!( PenpalB, vec![ - RuntimeEvent::Balances( - pallet_balances::Event::Withdraw { who, amount } + RuntimeEvent::ForeignAssets( + pallet_assets::Event::Burned { asset_id, owner, .. } ) => { - who: *who == t.sender.account_id, - amount: *amount == t.args.amount, + asset_id: *asset_id == system_para_native_asset_location, + owner: *owner == t.sender.account_id, }, RuntimeEvent::Assets(pallet_assets::Event::Burned { asset_id, owner, balance }) => { asset_id: *asset_id == expected_asset_id, @@ -144,6 +146,7 @@ fn penpal_to_ah_foreign_assets_receiver_assertions(t: ParaToSystemParaTest) { let (expected_foreign_asset_id, expected_foreign_asset_amount) = non_fee_asset(&t.args.assets, t.args.fee_asset_item as usize).unwrap(); let expected_foreign_asset_id_v3: v3::Location = expected_foreign_asset_id.try_into().unwrap(); + AssetHubPolkadot::assert_xcmp_queue_success(None); assert_expected_events!( AssetHubPolkadot, vec![ @@ -163,9 +166,6 @@ fn penpal_to_ah_foreign_assets_receiver_assertions(t: ParaToSystemParaTest) { amount: *amount == expected_foreign_asset_amount, }, RuntimeEvent::Balances(pallet_balances::Event::Deposit { .. }) => {}, - RuntimeEvent::MessageQueue( - pallet_message_queue::Event::Processed { success: true, .. } - ) => {}, ] ); } @@ -205,6 +205,9 @@ fn ah_to_penpal_foreign_assets_receiver_assertions(t: SystemParaToParaTest) { let (_, expected_asset_amount) = non_fee_asset(&t.args.assets, t.args.fee_asset_item as usize).unwrap(); let checking_account = ::PolkadotXcm::check_account(); + let system_para_native_asset_location = DotLocation::get(); + + PenpalB::assert_xcmp_queue_success(None); assert_expected_events!( PenpalB, vec![ @@ -221,12 +224,11 @@ fn ah_to_penpal_foreign_assets_receiver_assertions(t: SystemParaToParaTest) { amount: *amount == expected_asset_amount, }, // native asset for fee is deposited to receiver - RuntimeEvent::Balances(pallet_balances::Event::Deposit { who, .. }) => { - who: *who == t.receiver.account_id, + RuntimeEvent::ForeignAssets(pallet_assets::Event::Issued { asset_id, owner, amount }) => { + asset_id: *asset_id == system_para_native_asset_location, + owner: *owner == t.receiver.account_id, + amount: *amount == expected_asset_amount, }, - RuntimeEvent::MessageQueue( - pallet_message_queue::Event::Processed { success: true, .. } - ) => {}, ] ); } @@ -242,16 +244,6 @@ fn relay_limited_teleport_assets(t: RelayToSystemParaTest) -> DispatchResult { ) } -fn relay_teleport_assets(t: RelayToSystemParaTest) -> DispatchResult { - ::XcmPallet::teleport_assets( - t.signed_origin, - bx!(t.args.dest.into()), - bx!(t.args.beneficiary.into()), - bx!(t.args.assets.into()), - t.args.fee_asset_item, - ) -} - fn system_para_limited_teleport_assets(t: SystemParaToRelayTest) -> DispatchResult { ::PolkadotXcm::limited_teleport_assets( t.signed_origin, @@ -263,16 +255,6 @@ fn system_para_limited_teleport_assets(t: SystemParaToRelayTest) -> DispatchResu ) } -fn system_para_teleport_assets(t: SystemParaToRelayTest) -> DispatchResult { - ::PolkadotXcm::teleport_assets( - t.signed_origin, - bx!(t.args.dest.into()), - bx!(t.args.beneficiary.into()), - bx!(t.args.assets.into()), - t.args.fee_asset_item, - ) -} - fn system_para_to_para_transfer_assets(t: SystemParaToParaTest) -> DispatchResult { ::PolkadotXcm::transfer_assets( t.signed_origin, @@ -319,7 +301,7 @@ fn limited_teleport_native_assets_from_relay_to_system_para_works() { test.assert(); let delivery_fees = Polkadot::execute_with(|| { - xcm_helpers::transfer_assets_delivery_fees::< + xcm_helpers::teleport_assets_delivery_fees::< ::XcmSender, >(test.args.assets.clone(), 0, test.args.weight_limit, test.args.beneficiary, test.args.dest) }); @@ -366,7 +348,7 @@ fn limited_teleport_native_assets_back_from_system_para_to_relay_works() { let receiver_balance_after = test.receiver.balance; let delivery_fees = AssetHubPolkadot::execute_with(|| { - xcm_helpers::transfer_assets_delivery_fees::< + xcm_helpers::teleport_assets_delivery_fees::< ::XcmSender, >(test.args.assets.clone(), 0, test.args.weight_limit, test.args.beneficiary, test.args.dest) }); @@ -407,7 +389,7 @@ fn limited_teleport_native_assets_from_system_para_to_relay_fails() { let receiver_balance_after = test.receiver.balance; let delivery_fees = AssetHubPolkadot::execute_with(|| { - xcm_helpers::transfer_assets_delivery_fees::< + xcm_helpers::teleport_assets_delivery_fees::< ::XcmSender, >(test.args.assets.clone(), 0, test.args.weight_limit, test.args.beneficiary, test.args.dest) }); @@ -418,135 +400,12 @@ fn limited_teleport_native_assets_from_system_para_to_relay_fails() { assert_eq!(receiver_balance_after, receiver_balance_before); } -/// Teleport of native asset from Relay Chain to the System Parachain should work -#[test] -fn teleport_native_assets_from_relay_to_system_para_works() { - // Init values for Relay Chain - let amount_to_send: Balance = POLKADOT_ED * 1000; - let dest = Polkadot::child_location_of(AssetHubPolkadot::para_id()); - let beneficiary = AssetHubPolkadotReceiver::get(); - let test_args = TestContext { - sender: PolkadotSender::get(), - receiver: beneficiary.clone(), - args: TestArgs::new_relay(dest, beneficiary, amount_to_send), - }; - - let mut test = RelayToSystemParaTest::new(test_args); - - let sender_balance_before = test.sender.balance; - let receiver_balance_before = test.receiver.balance; - - test.set_assertion::(relay_origin_assertions); - test.set_assertion::(para_dest_assertions); - test.set_dispatchable::(relay_teleport_assets); - test.assert(); - - let delivery_fees = Polkadot::execute_with(|| { - xcm_helpers::transfer_assets_delivery_fees::< - ::XcmSender, - >(test.args.assets.clone(), 0, test.args.weight_limit, test.args.beneficiary, test.args.dest) - }); - - let sender_balance_after = test.sender.balance; - let receiver_balance_after = test.receiver.balance; - - // Sender's balance is reduced - assert_eq!(sender_balance_before - amount_to_send - delivery_fees, sender_balance_after); - // Receiver's balance is increased - assert!(receiver_balance_after > receiver_balance_before); -} - -/// Teleport of native asset from System Parachains to the Relay Chain -/// should work when there is enough balance in Relay Chain's `CheckAccount` -#[test] -fn teleport_native_assets_back_from_system_para_to_relay_works() { - // Dependency - Relay Chain's `CheckAccount` should have enough balance - teleport_native_assets_from_relay_to_system_para_works(); - - // Init values for Relay Chain - let amount_to_send: Balance = ASSET_HUB_POLKADOT_ED * 1000; - let destination = AssetHubPolkadot::parent_location(); - let beneficiary_id = PolkadotReceiver::get(); - let assets = (Parent, amount_to_send).into(); - - let test_args = TestContext { - sender: AssetHubPolkadotSender::get(), - receiver: PolkadotReceiver::get(), - args: TestArgs::new_para(destination, beneficiary_id, amount_to_send, assets, None, 0), - }; - - let mut test = SystemParaToRelayTest::new(test_args); - - let sender_balance_before = test.sender.balance; - let receiver_balance_before = test.receiver.balance; - - test.set_assertion::(para_origin_assertions); - test.set_assertion::(relay_dest_assertions); - test.set_dispatchable::(system_para_teleport_assets); - test.assert(); - - let sender_balance_after = test.sender.balance; - let receiver_balance_after = test.receiver.balance; - - let delivery_fees = AssetHubPolkadot::execute_with(|| { - xcm_helpers::transfer_assets_delivery_fees::< - ::XcmSender, - >(test.args.assets.clone(), 0, test.args.weight_limit, test.args.beneficiary, test.args.dest) - }); - - // Sender's balance is reduced - assert_eq!(sender_balance_before - amount_to_send - delivery_fees, sender_balance_after); - // Receiver's balance is increased - assert!(receiver_balance_after > receiver_balance_before); -} - -/// Teleport of native asset from System Parachain to Relay Chain -/// shouldn't work when there is not enough balance in Relay Chain's `CheckAccount` -#[test] -fn teleport_native_assets_from_system_para_to_relay_fails() { - // Init values for Relay Chain - let amount_to_send: Balance = ASSET_HUB_POLKADOT_ED * 1000; - let destination = AssetHubPolkadot::parent_location(); - let beneficiary_id = PolkadotReceiver::get(); - let assets = (Parent, amount_to_send).into(); - - let test_args = TestContext { - sender: AssetHubPolkadotSender::get(), - receiver: PolkadotReceiver::get(), - args: TestArgs::new_para(destination, beneficiary_id, amount_to_send, assets, None, 0), - }; - - let mut test = SystemParaToRelayTest::new(test_args); - - let sender_balance_before = test.sender.balance; - let receiver_balance_before = test.receiver.balance; - - test.set_assertion::(para_origin_assertions); - test.set_assertion::(relay_dest_assertions_fail); - test.set_dispatchable::(system_para_teleport_assets); - test.assert(); - - let delivery_fees = AssetHubPolkadot::execute_with(|| { - xcm_helpers::transfer_assets_delivery_fees::< - ::XcmSender, - >(test.args.assets.clone(), 0, test.args.weight_limit, test.args.beneficiary, test.args.dest) - }); - - let sender_balance_after = test.sender.balance; - let receiver_balance_after = test.receiver.balance; - - // Sender's balance is reduced - assert_eq!(sender_balance_before - amount_to_send - delivery_fees, sender_balance_after); - // Receiver's balance does not change - assert_eq!(receiver_balance_after, receiver_balance_before); -} - #[test] fn teleport_to_other_system_parachains_works() { let amount = ASSET_HUB_POLKADOT_ED * 100; let native_asset: Assets = (Parent, amount).into(); - test_sibling_is_trusted_teleporter!( + test_parachain_is_trusted_teleporter!( AssetHubPolkadot, // Origin AssetHubPolkadotXcmConfig, // XCM Configuration vec![BridgeHubPolkadot], // Destinations @@ -554,39 +413,28 @@ fn teleport_to_other_system_parachains_works() { ); } -/// Bidirectional teleports of local Penpal assets to Asset Hub as foreign assets should work -/// (using native reserve-based transfer for fees) -#[test] -fn bidirectional_teleport_foreign_assets_between_para_and_asset_hub() { - let ah_as_seen_by_penpal = PenpalB::sibling_location_of(AssetHubPolkadot::para_id()); - let asset_location_on_penpal = - v3::Location::try_from(PenpalLocalTeleportableToAssetHub::get()).expect("conversion works"); +/// Bidirectional teleports of local Penpal assets to Asset Hub as foreign assets while paying +/// fees using (reserve transferred) native asset. +pub fn do_bidirectional_teleport_foreign_assets_between_para_and_asset_hub_using_xt( + para_to_ah_dispatchable: fn(ParaToSystemParaTest) -> DispatchResult, + ah_to_para_dispatchable: fn(SystemParaToParaTest) -> DispatchResult, +) { + // Init values for Parachain + let fee_amount_to_send: Balance = ASSET_HUB_POLKADOT_ED * 10000; + let asset_location_on_penpal = PenpalLocalTeleportableToAssetHub::get(); let asset_id_on_penpal = match asset_location_on_penpal.last() { - Some(v3::Junction::GeneralIndex(id)) => *id as u32, + Some(Junction::GeneralIndex(id)) => *id as u32, _ => unreachable!(), }; - let asset_owner_on_penpal = PenpalBSender::get(); - let foreign_asset_at_asset_hub_polkadot = - v3::Location::new(1, [v3::Junction::Parachain(PenpalB::para_id().into())]) - .appended_with(asset_location_on_penpal) - .unwrap(); - super::penpal_create_foreign_asset_on_asset_hub( - asset_id_on_penpal, - foreign_asset_at_asset_hub_polkadot, - ah_as_seen_by_penpal.clone(), - false, - asset_owner_on_penpal, - ASSET_MIN_BALANCE * 1_000_000, - ); - let penpal_to_ah_beneficiary_id = AssetHubPolkadotReceiver::get(); - - let fee_amount_to_send = ASSET_HUB_POLKADOT_ED * 1000; - let asset_amount_to_send = ASSET_MIN_BALANCE * 1000; - - let asset_location_on_penpal_latest: Location = asset_location_on_penpal.try_into().unwrap(); + let asset_amount_to_send = ASSET_HUB_POLKADOT_ED * 1000; + let asset_owner = PenpalAssetOwner::get(); + let system_para_native_asset_location = DotLocation::get(); + let sender = PenpalBSender::get(); + let penpal_check_account = ::PolkadotXcm::check_account(); + let ah_as_seen_by_penpal = PenpalB::sibling_location_of(AssetHubPolkadot::para_id()); let penpal_assets: Assets = vec![ (Parent, fee_amount_to_send).into(), - (asset_location_on_penpal_latest, asset_amount_to_send).into(), + (asset_location_on_penpal.clone(), asset_amount_to_send).into(), ] .into(); let fee_asset_index = penpal_assets @@ -595,6 +443,38 @@ fn bidirectional_teleport_foreign_assets_between_para_and_asset_hub() { .position(|r| r == &(Parent, fee_amount_to_send).into()) .unwrap() as u32; + // fund Parachain's sender account + PenpalB::mint_foreign_asset( + ::RuntimeOrigin::signed(asset_owner.clone()), + system_para_native_asset_location.clone(), + sender.clone(), + fee_amount_to_send * 2, + ); + // No need to create the asset (only mint) as it exists in genesis. + PenpalB::mint_asset( + ::RuntimeOrigin::signed(asset_owner.clone()), + asset_id_on_penpal, + sender.clone(), + asset_amount_to_send, + ); + // fund Parachain's check account to be able to teleport + PenpalB::fund_accounts(vec![(penpal_check_account.clone(), ASSET_HUB_POLKADOT_ED * 1000)]); + + // prefund SA of Penpal on AssetHub with enough native tokens to pay for fees + let penpal_as_seen_by_ah = AssetHubPolkadot::sibling_location_of(PenpalB::para_id()); + let sov_penpal_on_ah = AssetHubPolkadot::sovereign_account_id_of(penpal_as_seen_by_ah); + AssetHubPolkadot::fund_accounts(vec![( + sov_penpal_on_ah.clone(), + ASSET_HUB_POLKADOT_ED * 100_000_000_000, + )]); + + // Init values for System Parachain + let foreign_asset_at_asset_hub_polkadot = + Location::new(1, [Junction::Parachain(PenpalB::para_id().into())]) + .appended_with(asset_location_on_penpal) + .unwrap(); + let penpal_to_ah_beneficiary_id = AssetHubPolkadotReceiver::get(); + // Penpal to AH test args let penpal_to_ah_test_args = TestContext { sender: PenpalBSender::get(), @@ -609,8 +489,14 @@ fn bidirectional_teleport_foreign_assets_between_para_and_asset_hub() { ), }; let mut penpal_to_ah = ParaToSystemParaTest::new(penpal_to_ah_test_args); + let penpal_sender_balance_before = PenpalB::execute_with(|| { + type ForeignAssets = ::ForeignAssets; + >::balance( + system_para_native_asset_location.clone(), + &PenpalBSender::get(), + ) + }); - let penpal_sender_balance_before = penpal_to_ah.sender.balance; let ah_receiver_balance_before = penpal_to_ah.receiver.balance; let penpal_sender_assets_before = PenpalB::execute_with(|| { @@ -620,17 +506,24 @@ fn bidirectional_teleport_foreign_assets_between_para_and_asset_hub() { let ah_receiver_assets_before = AssetHubPolkadot::execute_with(|| { type Assets = ::ForeignAssets; >::balance( - foreign_asset_at_asset_hub_polkadot, + foreign_asset_at_asset_hub_polkadot.clone().try_into().unwrap(), &AssetHubPolkadotReceiver::get(), ) }); penpal_to_ah.set_assertion::(penpal_to_ah_foreign_assets_sender_assertions); penpal_to_ah.set_assertion::(penpal_to_ah_foreign_assets_receiver_assertions); - penpal_to_ah.set_dispatchable::(para_to_system_para_transfer_assets); + penpal_to_ah.set_dispatchable::(para_to_ah_dispatchable); penpal_to_ah.assert(); - let penpal_sender_balance_after = penpal_to_ah.sender.balance; + let penpal_sender_balance_after = PenpalB::execute_with(|| { + type ForeignAssets = ::ForeignAssets; + >::balance( + system_para_native_asset_location.clone(), + &PenpalBSender::get(), + ) + }); + let ah_receiver_balance_after = penpal_to_ah.receiver.balance; let penpal_sender_assets_after = PenpalB::execute_with(|| { @@ -640,7 +533,7 @@ fn bidirectional_teleport_foreign_assets_between_para_and_asset_hub() { let ah_receiver_assets_after = AssetHubPolkadot::execute_with(|| { type Assets = ::ForeignAssets; >::balance( - foreign_asset_at_asset_hub_polkadot, + foreign_asset_at_asset_hub_polkadot.clone().try_into().unwrap(), &AssetHubPolkadotReceiver::get(), ) }); @@ -668,19 +561,17 @@ fn bidirectional_teleport_foreign_assets_between_para_and_asset_hub() { type ForeignAssets = ::ForeignAssets; assert_ok!(ForeignAssets::transfer( ::RuntimeOrigin::signed(AssetHubPolkadotReceiver::get()), - foreign_asset_at_asset_hub_polkadot, + foreign_asset_at_asset_hub_polkadot.clone().try_into().unwrap(), AssetHubPolkadotSender::get().into(), asset_amount_to_send, )); }); - let foreign_asset_at_asset_hub_polkadot_latest: Location = - foreign_asset_at_asset_hub_polkadot.try_into().unwrap(); let ah_to_penpal_beneficiary_id = PenpalBReceiver::get(); let penpal_as_seen_by_ah = AssetHubPolkadot::sibling_location_of(PenpalB::para_id()); let ah_assets: Assets = vec![ (Parent, fee_amount_to_send).into(), - (foreign_asset_at_asset_hub_polkadot_latest, asset_amount_to_send).into(), + (foreign_asset_at_asset_hub_polkadot.clone(), asset_amount_to_send).into(), ] .into(); let fee_asset_index = ah_assets @@ -705,12 +596,18 @@ fn bidirectional_teleport_foreign_assets_between_para_and_asset_hub() { let mut ah_to_penpal = SystemParaToParaTest::new(ah_to_penpal_test_args); let ah_sender_balance_before = ah_to_penpal.sender.balance; - let penpal_receiver_balance_before = ah_to_penpal.receiver.balance; + let penpal_receiver_balance_before = PenpalB::execute_with(|| { + type ForeignAssets = ::ForeignAssets; + >::balance( + system_para_native_asset_location.clone(), + &PenpalBReceiver::get(), + ) + }); let ah_sender_assets_before = AssetHubPolkadot::execute_with(|| { type ForeignAssets = ::ForeignAssets; >::balance( - foreign_asset_at_asset_hub_polkadot, + foreign_asset_at_asset_hub_polkadot.clone().try_into().unwrap(), &AssetHubPolkadotSender::get(), ) }); @@ -721,16 +618,22 @@ fn bidirectional_teleport_foreign_assets_between_para_and_asset_hub() { ah_to_penpal.set_assertion::(ah_to_penpal_foreign_assets_sender_assertions); ah_to_penpal.set_assertion::(ah_to_penpal_foreign_assets_receiver_assertions); - ah_to_penpal.set_dispatchable::(system_para_to_para_transfer_assets); + ah_to_penpal.set_dispatchable::(ah_to_para_dispatchable); ah_to_penpal.assert(); let ah_sender_balance_after = ah_to_penpal.sender.balance; - let penpal_receiver_balance_after = ah_to_penpal.receiver.balance; + let penpal_receiver_balance_after = PenpalB::execute_with(|| { + type ForeignAssets = ::ForeignAssets; + >::balance( + system_para_native_asset_location, + &PenpalBReceiver::get(), + ) + }); let ah_sender_assets_after = AssetHubPolkadot::execute_with(|| { type ForeignAssets = ::ForeignAssets; >::balance( - foreign_asset_at_asset_hub_polkadot, + foreign_asset_at_asset_hub_polkadot.try_into().unwrap(), &AssetHubPolkadotSender::get(), ) }); @@ -753,3 +656,13 @@ fn bidirectional_teleport_foreign_assets_between_para_and_asset_hub() { // Receiver's balance is increased by exact amount assert_eq!(penpal_receiver_assets_after, penpal_receiver_assets_before + asset_amount_to_send); } + +/// Bidirectional teleports of local Penpal assets to Asset Hub as foreign assets should work +/// (using native reserve-based transfer for fees) +#[test] +fn bidirectional_teleport_foreign_assets_between_para_and_asset_hub() { + do_bidirectional_teleport_foreign_assets_between_para_and_asset_hub_using_xt( + para_to_system_para_transfer_assets, + system_para_to_para_transfer_assets, + ); +} 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 80351d89ff..c930e54f2c 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 @@ -34,6 +34,7 @@ pub use bp_messages::LaneId; pub use emulated_integration_tests_common::{ accounts::{ALICE, BOB}, impls::Inspect, + test_parachain_is_trusted_teleporter, xcm_emulator::{ assert_expected_events, bx, helpers::weight_within_threshold, Chain, Parachain as Para, RelayChain as Relay, Test, TestArgs, TestContext, TestExt, @@ -41,7 +42,6 @@ pub use emulated_integration_tests_common::{ xcm_helpers::{xcm_transact_paid_execution, xcm_transact_unpaid_execution}, PROOF_SIZE_THRESHOLD, REF_TIME_THRESHOLD, XCM_V3, }; -pub use integration_tests_helpers::test_sibling_is_trusted_teleporter; pub use kusama_polkadot_system_emulated_network::{ asset_hub_kusama_emulated_chain::{ genesis::ED as ASSET_HUB_KUSAMA_ED, AssetHubKusamaParaPallet as AssetHubKusamaPallet, diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/send_xcm.rs b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/send_xcm.rs index 757089282c..59eacd0517 100644 --- a/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/send_xcm.rs +++ b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/send_xcm.rs @@ -61,10 +61,13 @@ fn send_xcm_from_kusama_relay_to_polkadot_asset_hub_should_fail_on_not_applicabl #[test] fn send_xcm_through_opened_lane_with_different_xcm_version_on_hops_works() { // Initially set only default version on all runtimes - AssetHubKusama::force_default_xcm_version(Some(xcm::v2::prelude::XCM_VERSION)); - BridgeHubKusama::force_default_xcm_version(Some(xcm::v2::prelude::XCM_VERSION)); - BridgeHubPolkadot::force_default_xcm_version(Some(xcm::v2::prelude::XCM_VERSION)); - AssetHubPolkadot::force_default_xcm_version(Some(xcm::v2::prelude::XCM_VERSION)); + let newer_xcm_version = xcm::prelude::XCM_VERSION; + let older_xcm_version = newer_xcm_version - 1; + + AssetHubKusama::force_default_xcm_version(Some(older_xcm_version)); + BridgeHubKusama::force_default_xcm_version(Some(older_xcm_version)); + BridgeHubPolkadot::force_default_xcm_version(Some(older_xcm_version)); + AssetHubPolkadot::force_default_xcm_version(Some(older_xcm_version)); // prepare data let destination = asset_hub_polkadot_location(); @@ -87,42 +90,12 @@ fn send_xcm_through_opened_lane_with_different_xcm_version_on_hops_works() { ); // set destination version - AssetHubKusama::force_xcm_version(destination.clone(), xcm::v3::prelude::XCM_VERSION); - - // TODO: remove this block, when removing `xcm:v2` - { - // send XCM from AssetHubKusama - fails - AssetHubKusama is set to the default/safe `2` - // version, which does not have the `ExportMessage` instruction. If the default `2` is - // changed to `3`, then this assert can go away" - assert_err!( - send_asset_from_asset_hub_kusama(destination.clone(), (native_token.clone(), amount)), - DispatchError::Module(sp_runtime::ModuleError { - index: 31, - error: [1, 0, 0, 0], - message: Some("SendFailure") - }) - ); - - // set exact version for BridgeHubPolkadot to `2` without `ExportMessage` instruction - AssetHubKusama::force_xcm_version( - ParentThen(Parachain(BridgeHubKusama::para_id().into()).into()).into(), - xcm::v2::prelude::XCM_VERSION, - ); - // send XCM from AssetHubKusama - fails - `ExportMessage` is not in `2` - assert_err!( - send_asset_from_asset_hub_kusama(destination.clone(), (native_token.clone(), amount)), - DispatchError::Module(sp_runtime::ModuleError { - index: 31, - error: [1, 0, 0, 0], - message: Some("SendFailure") - }) - ); - } + AssetHubKusama::force_xcm_version(destination.clone(), newer_xcm_version); // set version with `ExportMessage` for BridgeHubKusama AssetHubKusama::force_xcm_version( ParentThen(Parachain(BridgeHubKusama::para_id().into()).into()).into(), - xcm::v3::prelude::XCM_VERSION, + newer_xcm_version, ); // send XCM from AssetHubKusama - ok assert_ok!(send_asset_from_asset_hub_kusama( @@ -134,14 +107,11 @@ fn send_xcm_through_opened_lane_with_different_xcm_version_on_hops_works() { assert_bridge_hub_kusama_message_accepted(false); // set version for remote BridgeHub on BridgeHubKusama - BridgeHubKusama::force_xcm_version( - bridge_hub_polkadot_location(), - xcm::v3::prelude::XCM_VERSION, - ); + BridgeHubKusama::force_xcm_version(bridge_hub_polkadot_location(), newer_xcm_version); // set version for AssetHubPolkadot on BridgeHubPolkadot BridgeHubPolkadot::force_xcm_version( ParentThen(Parachain(AssetHubPolkadot::para_id().into()).into()).into(), - xcm::v3::prelude::XCM_VERSION, + newer_xcm_version, ); // send XCM from AssetHubKusama - ok @@ -164,20 +134,4 @@ fn send_xcm_through_opened_lane_with_different_xcm_version_on_hops_works() { ] ); }); - - // TODO: remove this block, when removing `xcm:v2` - { - // set `2` version for remote BridgeHub on BridgeHubKusama, which does not have - // `UniversalOrigin` and `DescendOrigin` - BridgeHubKusama::force_xcm_version( - bridge_hub_polkadot_location(), - xcm::v2::prelude::XCM_VERSION, - ); - - // send XCM from AssetHubKusama - ok - assert_ok!(send_asset_from_asset_hub_kusama(destination, (native_token, amount))); - // message is not accepted on the local BridgeHub (`DestinationUnsupported`) because we - // cannot add `UniversalOrigin` and `DescendOrigin` - assert_bridge_hub_kusama_message_accepted(false); - } } diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs index 44bb7349ca..48cc61a0e9 100644 --- a/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs +++ b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/snowbridge.rs @@ -283,7 +283,7 @@ fn send_token_from_ethereum_to_penpal() { let weth_asset_location: Location = (Parent, Parent, EthereumNetwork::get(), AccountKey20 { network: None, key: WETH }).into(); // Converts the Weth asset location into an asset ID - let weth_asset_id: v3::Location = weth_asset_location.try_into().unwrap(); + let weth_asset_id: v3::Location = weth_asset_location.clone().try_into().unwrap(); // Fund ethereum sovereign on AssetHub AssetHubKusama::fund_accounts(vec![(ethereum_sovereign_account(), INITIAL_FUND)]); @@ -299,15 +299,14 @@ fn send_token_from_ethereum_to_penpal() { )], )); - // Create asset on the Penpal parachain. assert_ok!(::ForeignAssets::create( ::RuntimeOrigin::signed(PenpalASender::get()), - weth_asset_id, + weth_asset_location.clone(), asset_hub_sovereign.clone().into(), 1000, )); - assert!(::ForeignAssets::asset_exists(weth_asset_id)); + assert!(::ForeignAssets::asset_exists(weth_asset_location)); }); AssetHubKusama::execute_with(|| { diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/teleport.rs b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/teleport.rs index 9c17aa2108..c1aebaabfc 100644 --- a/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/teleport.rs +++ b/integration-tests/emulated/tests/bridges/bridge-hub-kusama/src/tests/teleport.rs @@ -21,7 +21,7 @@ fn teleport_to_other_system_parachains_works() { let amount = BRIDGE_HUB_KUSAMA_ED * 100; let native_asset: Assets = (Parent, amount).into(); - test_sibling_is_trusted_teleporter!( + test_parachain_is_trusted_teleporter!( BridgeHubKusama, // Origin XcmConfig, // XCM configuration vec![AssetHubKusama], // Destinations 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 febcff3c6c..9aefaed933 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 @@ -34,6 +34,7 @@ pub use bp_messages::LaneId; pub use emulated_integration_tests_common::{ accounts::{ALICE, BOB}, impls::Inspect, + test_parachain_is_trusted_teleporter, xcm_emulator::{ assert_expected_events, bx, helpers::weight_within_threshold, Chain, Parachain as Para, RelayChain as Relay, Test, TestArgs, TestContext, TestExt, @@ -41,7 +42,6 @@ pub use emulated_integration_tests_common::{ xcm_helpers::{xcm_transact_paid_execution, xcm_transact_unpaid_execution}, PROOF_SIZE_THRESHOLD, REF_TIME_THRESHOLD, XCM_V3, }; -pub use integration_tests_helpers::test_sibling_is_trusted_teleporter; pub use kusama_polkadot_system_emulated_network::{ asset_hub_kusama_emulated_chain::{ genesis::ED as ASSET_HUB_KUSAMA_ED, AssetHubKusamaParaPallet as AssetHubKusamaPallet, diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/send_xcm.rs b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/send_xcm.rs index 4102ddeb56..568fedece7 100644 --- a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/send_xcm.rs +++ b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/send_xcm.rs @@ -61,10 +61,13 @@ fn send_xcm_from_polkadot_relay_to_kusama_asset_hub_should_fail_on_not_applicabl #[test] fn send_xcm_through_opened_lane_with_different_xcm_version_on_hops_works() { // Initially set only default version on all runtimes - AssetHubKusama::force_default_xcm_version(Some(xcm::v2::prelude::XCM_VERSION)); - BridgeHubKusama::force_default_xcm_version(Some(xcm::v2::prelude::XCM_VERSION)); - BridgeHubPolkadot::force_default_xcm_version(Some(xcm::v2::prelude::XCM_VERSION)); - AssetHubPolkadot::force_default_xcm_version(Some(xcm::v2::prelude::XCM_VERSION)); + let newer_xcm_version = xcm::prelude::XCM_VERSION; + let older_xcm_version = newer_xcm_version - 1; + + AssetHubKusama::force_default_xcm_version(Some(older_xcm_version)); + BridgeHubKusama::force_default_xcm_version(Some(older_xcm_version)); + BridgeHubPolkadot::force_default_xcm_version(Some(older_xcm_version)); + AssetHubPolkadot::force_default_xcm_version(Some(older_xcm_version)); // prepare data let destination = asset_hub_kusama_location(); @@ -87,42 +90,12 @@ fn send_xcm_through_opened_lane_with_different_xcm_version_on_hops_works() { ); // set destination version - AssetHubPolkadot::force_xcm_version(destination.clone(), xcm::v3::prelude::XCM_VERSION); - - // TODO: remove this block, when removing `xcm:v2` - { - // send XCM from AssetHubKusama - fails - AssetHubKusama is set to the default/safe `2` - // version, which does not have the `ExportMessage` instruction. If the default `2` is - // changed to `3`, then this assert can go away" - assert_err!( - send_asset_from_asset_hub_polkadot(destination.clone(), (native_token.clone(), amount)), - DispatchError::Module(sp_runtime::ModuleError { - index: 31, - error: [1, 0, 0, 0], - message: Some("SendFailure") - }) - ); - - // set exact version for BridgeHubPolkadot to `2` without `ExportMessage` instruction - AssetHubPolkadot::force_xcm_version( - ParentThen(Parachain(BridgeHubPolkadot::para_id().into()).into()).into(), - xcm::v2::prelude::XCM_VERSION, - ); - // send XCM from AssetHubPolkadot - fails - `ExportMessage` is not in `2` - assert_err!( - send_asset_from_asset_hub_polkadot(destination.clone(), (native_token.clone(), amount)), - DispatchError::Module(sp_runtime::ModuleError { - index: 31, - error: [1, 0, 0, 0], - message: Some("SendFailure") - }) - ); - } + AssetHubPolkadot::force_xcm_version(destination.clone(), newer_xcm_version); // set version with `ExportMessage` for BridgeHubPolkadot AssetHubPolkadot::force_xcm_version( ParentThen(Parachain(BridgeHubPolkadot::para_id().into()).into()).into(), - xcm::v3::prelude::XCM_VERSION, + newer_xcm_version, ); // send XCM from AssetHubPolkadot - ok assert_ok!(send_asset_from_asset_hub_polkadot( @@ -134,14 +107,11 @@ fn send_xcm_through_opened_lane_with_different_xcm_version_on_hops_works() { assert_bridge_hub_polkadot_message_accepted(false); // set version for remote BridgeHub on BridgeHubPolkadot - BridgeHubPolkadot::force_xcm_version( - bridge_hub_kusama_location(), - xcm::v3::prelude::XCM_VERSION, - ); + BridgeHubPolkadot::force_xcm_version(bridge_hub_kusama_location(), newer_xcm_version); // set version for AssetHubKusama on BridgeHubKusama BridgeHubKusama::force_xcm_version( ParentThen(Parachain(AssetHubKusama::para_id().into()).into()).into(), - xcm::v3::prelude::XCM_VERSION, + newer_xcm_version, ); // send XCM from AssetHubPolkadot - ok @@ -164,20 +134,4 @@ fn send_xcm_through_opened_lane_with_different_xcm_version_on_hops_works() { ] ); }); - - // TODO: remove this block, when removing `xcm:v2` - { - // set `2` version for remote BridgeHub on BridgeHubKusama, which does not have - // `UniversalOrigin` and `DescendOrigin` - BridgeHubPolkadot::force_xcm_version( - bridge_hub_kusama_location(), - xcm::v2::prelude::XCM_VERSION, - ); - - // send XCM from AssetHubPolkadot - ok - assert_ok!(send_asset_from_asset_hub_polkadot(destination, (native_token, amount))); - // message is not accepted on the local BridgeHub (`DestinationUnsupported`) because we - // cannot add `UniversalOrigin` and `DescendOrigin` - assert_bridge_hub_polkadot_message_accepted(false); - } } 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 62ab5a6ab9..3c14e2cc57 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 @@ -283,7 +283,7 @@ fn send_token_from_ethereum_to_penpal() { let weth_asset_location: Location = (Parent, Parent, EthereumNetwork::get(), AccountKey20 { network: None, key: WETH }).into(); // Converts the Weth asset location into an asset ID - let weth_asset_id: v3::Location = weth_asset_location.try_into().unwrap(); + let weth_asset_id: v3::Location = weth_asset_location.clone().try_into().unwrap(); // Fund ethereum sovereign on AssetHub AssetHubPolkadot::fund_accounts(vec![(ethereum_sovereign_account(), INITIAL_FUND)]); @@ -301,12 +301,12 @@ fn send_token_from_ethereum_to_penpal() { assert_ok!(::ForeignAssets::create( ::RuntimeOrigin::signed(PenpalBSender::get()), - weth_asset_id, + weth_asset_location.clone(), asset_hub_sovereign.clone().into(), 1000, )); - assert!(::ForeignAssets::asset_exists(weth_asset_id)); + assert!(::ForeignAssets::asset_exists(weth_asset_location)); }); AssetHubPolkadot::execute_with(|| { diff --git a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/teleport.rs b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/teleport.rs index 4938576210..76eec63125 100644 --- a/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/teleport.rs +++ b/integration-tests/emulated/tests/bridges/bridge-hub-polkadot/src/tests/teleport.rs @@ -21,10 +21,10 @@ fn teleport_to_other_system_parachains_works() { let amount = BRIDGE_HUB_POLKADOT_ED * 100; let native_asset: Assets = (Parent, amount).into(); - test_sibling_is_trusted_teleporter!( + test_parachain_is_trusted_teleporter!( BridgeHubPolkadot, // Origin - XcmConfig, // XCM configuration - vec![AssetHubPolkadot], // Destinations + XcmConfig, // XCM Configuration + vec![AssetHubPolkadot], // Destination (native_asset, amount) ); } diff --git a/integration-tests/emulated/tests/collectives/collectives-polkadot/Cargo.toml b/integration-tests/emulated/tests/collectives/collectives-polkadot/Cargo.toml index 2735efd0b6..9888f770f9 100644 --- a/integration-tests/emulated/tests/collectives/collectives-polkadot/Cargo.toml +++ b/integration-tests/emulated/tests/collectives/collectives-polkadot/Cargo.toml @@ -34,9 +34,7 @@ asset-test-utils = { workspace = true } emulated-integration-tests-common = { workspace = true } parachains-common = { workspace = true, default-features = true } cumulus-pallet-xcmp-queue = { workspace = true, default-features = true } -cumulus-pallet-parachain-system = { features = [ - "parameterized-consensus-hook", -], workspace = true, default-features = true } +cumulus-pallet-parachain-system = { workspace = true, default-features = true } # Local asset-hub-polkadot-runtime = { workspace = true } diff --git a/integration-tests/emulated/tests/collectives/collectives-polkadot/src/lib.rs b/integration-tests/emulated/tests/collectives/collectives-polkadot/src/lib.rs index a2d6d55926..0cf2df8c40 100644 --- a/integration-tests/emulated/tests/collectives/collectives-polkadot/src/lib.rs +++ b/integration-tests/emulated/tests/collectives/collectives-polkadot/src/lib.rs @@ -19,6 +19,7 @@ pub use xcm::{prelude::*, v3}; // Cumulus pub use emulated_integration_tests_common::{ accounts::ALICE, + test_parachain_is_trusted_teleporter, xcm_emulator::{assert_expected_events, bx, Chain, Parachain, RelayChain as Relay, TestExt}, }; pub use polkadot_system_emulated_network::{ diff --git a/integration-tests/emulated/tests/collectives/collectives-polkadot/src/tests/teleport.rs b/integration-tests/emulated/tests/collectives/collectives-polkadot/src/tests/teleport.rs index 7d2b7a627e..27ccd27b55 100644 --- a/integration-tests/emulated/tests/collectives/collectives-polkadot/src/tests/teleport.rs +++ b/integration-tests/emulated/tests/collectives/collectives-polkadot/src/tests/teleport.rs @@ -18,8 +18,7 @@ use asset_hub_polkadot_runtime::xcm_config::XcmConfig as AssetHubPolkadotXcmConf use collectives_polkadot_runtime::xcm_config::XcmConfig as CollectivesPolkadotXcmConfig; use frame_support::assert_ok; use integration_tests_helpers::{ - test_parachain_is_trusted_teleporter, test_relay_is_trusted_teleporter, - test_sibling_is_trusted_teleporter, + test_parachain_is_trusted_teleporter_for_relay, test_relay_is_trusted_teleporter, }; use polkadot_runtime::xcm_config::XcmConfig as PolkadotXcmConfig; @@ -35,7 +34,7 @@ fn teleport_from_and_to_relay() { (native_asset, amount) ); - test_parachain_is_trusted_teleporter!( + test_parachain_is_trusted_teleporter_for_relay!( CollectivesPolkadot, // Origin CollectivesPolkadotXcmConfig, // XCM Configuration Polkadot, // Destination @@ -48,7 +47,7 @@ fn teleport_from_collectives_to_asset_hub() { let amount = ASSET_HUB_POLKADOT_ED * 100; let native_asset: Assets = (Parent, amount).into(); - test_sibling_is_trusted_teleporter!( + test_parachain_is_trusted_teleporter!( CollectivesPolkadot, // Origin CollectivesPolkadotXcmConfig, // XCM Configuration vec![AssetHubPolkadot], // Destinations @@ -61,7 +60,7 @@ fn teleport_from_asset_hub_to_collectives() { let amount = COLLECTIVES_POLKADOT_ED * 100; let native_asset: Assets = (Parent, amount).into(); - test_sibling_is_trusted_teleporter!( + test_parachain_is_trusted_teleporter!( AssetHubPolkadot, // Origin AssetHubPolkadotXcmConfig, // XCM Configuration vec![CollectivesPolkadot], // Destinations diff --git a/integration-tests/emulated/tests/people/people-kusama/Cargo.toml b/integration-tests/emulated/tests/people/people-kusama/Cargo.toml index 4b91b2b197..d14a9f43a9 100644 --- a/integration-tests/emulated/tests/people/people-kusama/Cargo.toml +++ b/integration-tests/emulated/tests/people/people-kusama/Cargo.toml @@ -26,9 +26,7 @@ xcm-executor = { workspace = true } parachains-common = { workspace = true, default-features = true } emulated-integration-tests-common = { workspace = true } asset-test-utils = { workspace = true } -cumulus-pallet-parachain-system = { features = [ - "parameterized-consensus-hook", -], workspace = true, default-features = true } +cumulus-pallet-parachain-system = { workspace = true, default-features = true } # Local kusama-runtime-constants = { workspace = true, default-features = true } diff --git a/integration-tests/emulated/tests/people/people-kusama/src/tests/teleport.rs b/integration-tests/emulated/tests/people/people-kusama/src/tests/teleport.rs index 141b2f31b5..33647a3c43 100644 --- a/integration-tests/emulated/tests/people/people-kusama/src/tests/teleport.rs +++ b/integration-tests/emulated/tests/people/people-kusama/src/tests/teleport.rs @@ -155,7 +155,7 @@ fn limited_teleport_native_assets_from_relay_to_system_para_works() { test.assert(); let delivery_fees = Kusama::execute_with(|| { - xcm_helpers::transfer_assets_delivery_fees::< + xcm_helpers::teleport_assets_delivery_fees::< ::XcmSender, >(test.args.assets.clone(), 0, test.args.weight_limit, test.args.beneficiary, test.args.dest) }); @@ -204,7 +204,7 @@ fn limited_teleport_native_assets_back_from_system_para_to_relay_works() { let receiver_balance_after = test.receiver.balance; let delivery_fees = PeopleKusama::execute_with(|| { - xcm_helpers::transfer_assets_delivery_fees::< + xcm_helpers::teleport_assets_delivery_fees::< ::XcmSender, >(test.args.assets.clone(), 0, test.args.weight_limit, test.args.beneficiary, test.args.dest) }); @@ -248,7 +248,7 @@ fn limited_teleport_native_assets_from_system_para_to_relay_fails() { let receiver_balance_after = test.receiver.balance; let delivery_fees = PeopleKusama::execute_with(|| { - xcm_helpers::transfer_assets_delivery_fees::< + xcm_helpers::teleport_assets_delivery_fees::< ::XcmSender, >(test.args.assets.clone(), 0, test.args.weight_limit, test.args.beneficiary, test.args.dest) }); diff --git a/integration-tests/emulated/tests/people/people-polkadot/Cargo.toml b/integration-tests/emulated/tests/people/people-polkadot/Cargo.toml index b880ee1f05..ed9fef5f81 100644 --- a/integration-tests/emulated/tests/people/people-polkadot/Cargo.toml +++ b/integration-tests/emulated/tests/people/people-polkadot/Cargo.toml @@ -26,9 +26,7 @@ xcm-executor = { workspace = true } parachains-common = { workspace = true, default-features = true } emulated-integration-tests-common = { workspace = true } asset-test-utils = { workspace = true } -cumulus-pallet-parachain-system = { features = [ - "parameterized-consensus-hook", -], workspace = true, default-features = true } +cumulus-pallet-parachain-system = { workspace = true, default-features = true } # Local polkadot-runtime-constants = { workspace = true, default-features = true } diff --git a/integration-tests/emulated/tests/people/people-polkadot/src/tests/teleport.rs b/integration-tests/emulated/tests/people/people-polkadot/src/tests/teleport.rs index 197979170c..3907a941a5 100644 --- a/integration-tests/emulated/tests/people/people-polkadot/src/tests/teleport.rs +++ b/integration-tests/emulated/tests/people/people-polkadot/src/tests/teleport.rs @@ -155,7 +155,7 @@ fn limited_teleport_native_assets_from_relay_to_system_para_works() { test.assert(); let delivery_fees = Polkadot::execute_with(|| { - xcm_helpers::transfer_assets_delivery_fees::< + xcm_helpers::teleport_assets_delivery_fees::< ::XcmSender, >(test.args.assets.clone(), 0, test.args.weight_limit, test.args.beneficiary, test.args.dest) }); @@ -204,7 +204,7 @@ fn limited_teleport_native_assets_back_from_system_para_to_relay_works() { let receiver_balance_after = test.receiver.balance; let delivery_fees = PeoplePolkadot::execute_with(|| { - xcm_helpers::transfer_assets_delivery_fees::< + xcm_helpers::teleport_assets_delivery_fees::< ::XcmSender, >(test.args.assets.clone(), 0, test.args.weight_limit, test.args.beneficiary, test.args.dest) }); @@ -248,7 +248,7 @@ fn limited_teleport_native_assets_from_system_para_to_relay_fails() { let receiver_balance_after = test.receiver.balance; let delivery_fees = PeoplePolkadot::execute_with(|| { - xcm_helpers::transfer_assets_delivery_fees::< + xcm_helpers::teleport_assets_delivery_fees::< ::XcmSender, >(test.args.assets.clone(), 0, test.args.weight_limit, test.args.beneficiary, test.args.dest) }); diff --git a/relay/kusama/src/governance/fellowship.rs b/relay/kusama/src/governance/fellowship.rs index 9427b135d5..2de35352b4 100644 --- a/relay/kusama/src/governance/fellowship.rs +++ b/relay/kusama/src/governance/fellowship.rs @@ -23,7 +23,7 @@ use frame_support::traits::{MapSuccess, TryMapSuccess}; use sp_arithmetic::traits::CheckedSub; use sp_runtime::{ morph_types, - traits::{Replace, TypedGet}, + traits::{Replace, ReplaceWithDefault, TypedGet}, }; use super::*; @@ -356,6 +356,8 @@ impl pallet_ranked_collective::Config for Runtime // - the Fellows origin type ExchangeOrigin = EitherOf>, Fellows>; + type AddOrigin = MapSuccess>; + type RemoveOrigin = Self::DemoteOrigin; type Polls = FellowshipReferenda; type MinRankOfClass = sp_runtime::traits::Identity; type MemberSwappedHandler = (); diff --git a/relay/kusama/src/lib.rs b/relay/kusama/src/lib.rs index a88ce457b8..a12e731104 100644 --- a/relay/kusama/src/lib.rs +++ b/relay/kusama/src/lib.rs @@ -21,29 +21,30 @@ #![recursion_limit = "512"] use codec::{Decode, Encode, MaxEncodedLen}; +use frame_support::weights::constants::{WEIGHT_PROOF_SIZE_PER_KB, WEIGHT_REF_TIME_PER_MICROS}; use pallet_nis::WithMaximumOf; use polkadot_primitives::{ - slashing, - vstaging::{ApprovalVotingParams, NodeFeatures}, - AccountId, AccountIndex, Balance, BlockNumber, CandidateEvent, CandidateHash, - CommittedCandidateReceipt, CoreState, DisputeState, ExecutorParams, GroupRotationInfo, Hash, - Id as ParaId, InboundDownwardMessage, InboundHrmpMessage, Moment, Nonce, - OccupiedCoreAssumption, PersistedValidationData, ScrapedOnChainVotes, SessionInfo, Signature, - ValidationCode, ValidationCodeHash, ValidatorId, ValidatorIndex, LOWEST_PUBLIC_ID, - PARACHAIN_KEY_TYPE_ID, + slashing, AccountId, AccountIndex, ApprovalVotingParams, Balance, BlockNumber, CandidateEvent, + CandidateHash, CommittedCandidateReceipt, CoreIndex, CoreState, DisputeState, ExecutorParams, + GroupRotationInfo, Hash, Id as ParaId, InboundDownwardMessage, InboundHrmpMessage, Moment, + NodeFeatures, Nonce, OccupiedCoreAssumption, PersistedValidationData, ScrapedOnChainVotes, + SessionInfo, Signature, ValidationCode, ValidationCodeHash, ValidatorId, ValidatorIndex, + LOWEST_PUBLIC_ID, PARACHAIN_KEY_TYPE_ID, }; use polkadot_runtime_common::{ auctions, claims, crowdloan, impl_runtime_weights, impls::{ DealWithFees, LocatableAssetConverter, VersionedLocatableAsset, VersionedLocationConverter, }, - paras_registrar, prod_or_fast, slots, - traits::Leaser, - BalanceToU256, BlockHashCount, BlockLength, CurrencyToVote, SlowAdjustingFeeUpdate, - U256ToBalance, + paras_registrar, prod_or_fast, slots, BalanceToU256, BlockHashCount, BlockLength, + CurrencyToVote, SlowAdjustingFeeUpdate, U256ToBalance, }; use scale_info::TypeInfo; -use sp_std::{cmp::Ordering, collections::btree_map::BTreeMap, prelude::*}; +use sp_std::{ + cmp::Ordering, + collections::{btree_map::BTreeMap, vec_deque::VecDeque}, + prelude::*, +}; use runtime_parachains::{ assigner_coretime as parachains_assigner_coretime, @@ -56,7 +57,7 @@ use runtime_parachains::{ initializer as parachains_initializer, origin as parachains_origin, paras as parachains_paras, paras_inherent as parachains_paras_inherent, reward_points as parachains_reward_points, runtime_api_impl::{ - v7 as parachains_runtime_api_impl, vstaging as parachains_vstaging_api_impl, + v10 as parachains_runtime_api_impl, vstaging as parachains_vstaging_api_impl, }, scheduler as parachains_scheduler, session_info as parachains_session_info, shared as parachains_shared, @@ -73,7 +74,7 @@ use frame_election_provider_support::{ }; use frame_support::{ construct_runtime, - genesis_builder_helper::{build_config, create_default_config}, + genesis_builder_helper::{build_state, get_preset}, parameter_types, traits::{ fungible::HoldConsideration, ConstU32, Contains, EitherOf, EitherOfDiverse, Everything, @@ -95,8 +96,7 @@ use sp_runtime::{ IdentityLookup, Keccak256, OpaqueKeys, SaturatedConversion, Verify, }, transaction_validity::{TransactionPriority, TransactionSource, TransactionValidity}, - ApplyExtrinsicResult, BoundToRuntimeAppPublic, FixedU128, KeyTypeId, Perbill, Percent, Permill, - RuntimeAppPublic, RuntimeDebug, + ApplyExtrinsicResult, FixedU128, KeyTypeId, Perbill, Percent, Permill, RuntimeDebug, }; use sp_staking::SessionIndex; #[cfg(any(feature = "std", test))] @@ -148,7 +148,6 @@ pub mod impls; #[cfg(test)] mod tests; -use polkadot_runtime_common as runtime_common; impl_runtime_weights!(kusama_runtime_constants); // Make the WASM binary available. @@ -211,6 +210,11 @@ impl frame_system::Config for Runtime { type SS58Prefix = SS58Prefix; type OnSetCode = (); type MaxConsumers = frame_support::traits::ConstU32<16>; + type SingleBlockMigrations = (); + type MultiBlockMigrator = (); + type PreInherents = (); + type PostInherents = (); + type PostTransactions = (); } parameter_types! { @@ -361,6 +365,7 @@ impl pallet_mmr::Config for Runtime { type OnNewRoot = pallet_beefy_mmr::DepositBeefyDigest; type WeightInfo = (); type LeafData = pallet_beefy_mmr::Pallet; + type BlockHashProvider = pallet_mmr::DefaultBlockHashProvider; } /// MMR helper types. @@ -395,9 +400,11 @@ parameter_types! { pub struct ParaHeadsRootProvider; impl BeefyDataProvider for ParaHeadsRootProvider { fn extra_data() -> H256 { - let mut para_heads: Vec<(u32, Vec)> = Paras::parachains() + let mut para_heads: Vec<(u32, Vec)> = parachains_paras::Parachains::::get() .into_iter() - .filter_map(|id| Paras::para_head(id).map(|head| (id.into(), head.0))) + .filter_map(|id| { + parachains_paras::Heads::::get(id).map(|head| (id.into(), head.0)) + }) .collect(); para_heads.sort_by_key(|k| k.0); binary_merkle_tree::merkle_root::( @@ -444,46 +451,6 @@ impl pallet_authorship::Config for Runtime { type EventHandler = Staking; } -#[derive(Clone, Debug, PartialEq, Eq, Encode, Decode)] -pub struct OldSessionKeys { - pub grandpa: ::Public, - pub babe: ::Public, - pub im_online: pallet_im_online::sr25519::AuthorityId, - pub para_validator: ::Public, - pub para_assignment: ::Public, - pub authority_discovery: ::Public, - pub beefy: ::Public, -} - -impl OpaqueKeys for OldSessionKeys { - type KeyTypeIdProviders = (); - fn key_ids() -> &'static [KeyTypeId] { - &[ - <::Public>::ID, - <::Public>::ID, - sp_core::crypto::key_types::IM_ONLINE, - <::Public>::ID, - <::Public>::ID, - <::Public>::ID, - <::Public>::ID, - ] - } - fn get_raw(&self, i: KeyTypeId) -> &[u8] { - match i { - <::Public>::ID => self.grandpa.as_ref(), - <::Public>::ID => self.babe.as_ref(), - sp_core::crypto::key_types::IM_ONLINE => self.im_online.as_ref(), - <::Public>::ID => self.para_validator.as_ref(), - <::Public>::ID => - self.para_assignment.as_ref(), - <::Public>::ID => - self.authority_discovery.as_ref(), - <::Public>::ID => self.beefy.as_ref(), - _ => &[], - } - } -} - impl_opaque_keys! { pub struct SessionKeys { pub grandpa: Grandpa, @@ -495,18 +462,6 @@ impl_opaque_keys! { } } -// remove this when removing `OldSessionKeys` -fn transform_session_keys(_val: AccountId, old: OldSessionKeys) -> SessionKeys { - SessionKeys { - grandpa: old.grandpa, - babe: old.babe, - para_validator: old.para_validator, - para_assignment: old.para_assignment, - authority_discovery: old.authority_discovery, - beefy: old.beefy, - } -} - impl pallet_session::Config for Runtime { type RuntimeEvent = RuntimeEvent; type ValidatorId = AccountId; @@ -672,7 +627,7 @@ impl pallet_staking::EraPayout for EraPayout { era_duration_millis: u64, ) -> (Balance, Balance) { // all para-ids that are currently active. - let auctioned_slots = Paras::parachains() + let auctioned_slots = parachains_paras::Parachains::::get() .into_iter() // all active para-ids that do not belong to a system chain is the number // of parachains that we should take into account for inflation. @@ -737,7 +692,6 @@ impl pallet_staking::Config for Runtime { type EraPayout = EraPayout; type NextNewSession = Session; type MaxExposurePageSize = MaxExposurePageSize; - type OffendingValidatorsThreshold = OffendingValidatorsThreshold; type VoterList = VoterList; type TargetList = UseValidatorsMap; type NominationsQuota = pallet_staking::FixedNominationsQuota<{ MaxNominations::get() }>; @@ -746,6 +700,7 @@ impl pallet_staking::Config for Runtime { type MaxControllersInDeprecationBatch = ConstU32<5169>; type BenchmarkingConfig = polkadot_runtime_common::StakingBenchmarkingConfig; type EventListeners = NominationPools; + type DisablingStrategy = pallet_staking::UpToLimitDisablingStrategy; type WeightInfo = weights::pallet_staking::WeightInfo; } @@ -1251,6 +1206,7 @@ parameter_types! { /// /// This is not a good value for para-chains since the `Scheduler` already uses up to 80% block weight. pub MessageQueueServiceWeight: Weight = Perbill::from_percent(20) * BlockWeights::get().max_block; + pub MessageQueueIdleServiceWeight: Weight = Perbill::from_percent(20) * BlockWeights::get().max_block; pub const MessageQueueHeapSize: u32 = 65_536; pub const MessageQueueMaxStale: u32 = 16; } @@ -1291,6 +1247,7 @@ impl pallet_message_queue::Config for Runtime { type QueueChangeHandler = ParaInclusion; type QueuePausedQuery = (); type WeightInfo = weights::pallet_message_queue::WeightInfo; + type IdleMaxServiceWeight = MessageQueueIdleServiceWeight; } impl parachains_dmp::Config for Runtime {} @@ -1312,6 +1269,7 @@ impl parachains_hrmp::Config for Runtime { HrmpChannelSizeAndCapacityWithSystemRatio, >; type WeightInfo = weights::runtime_parachains_hrmp::WeightInfo; + type VersionWrapper = XcmPallet; } impl parachains_paras_inherent::Config for Runtime { @@ -1326,6 +1284,10 @@ impl parachains_scheduler::Config for Runtime { parameter_types! { pub const BrokerId: u32 = system_parachain::BROKER_ID; + pub MaxXcmTransactWeight: Weight = Weight::from_parts( + 250 * WEIGHT_REF_TIME_PER_MICROS, + 20 * WEIGHT_PROOF_SIZE_PER_KB + ); } impl coretime::Config for Runtime { @@ -1335,6 +1297,7 @@ impl coretime::Config for Runtime { type BrokerId = BrokerId; type WeightInfo = weights::runtime_parachains_coretime::WeightInfo; type SendXcm = crate::xcm_config::XcmRouter; + type MaxXcmTransactWeight = MaxXcmTransactWeight; } parameter_types! { @@ -1504,6 +1467,8 @@ impl pallet_nis::Config for Runtime { type MaxIntakeWeight = MaxIntakeWeight; type ThawThrottle = ThawThrottle; type RuntimeHoldReason = RuntimeHoldReason; + #[cfg(feature = "runtime-benchmarks")] + type BenchmarkSetup = (); } parameter_types! { @@ -1519,13 +1484,14 @@ impl pallet_nomination_pools::Config for Runtime { type RewardCounter = FixedU128; type BalanceToU256 = BalanceToU256; type U256ToBalance = U256ToBalance; - type Staking = Staking; + type StakeAdapter = pallet_nomination_pools::adapter::TransferStake; type PostUnbondingPoolsWindow = ConstU32<4>; type MaxMetadataLen = ConstU32<256>; // we use the same number of allowed unlocking chunks as with staking. type MaxUnbonding = ::MaxUnlockingChunks; type PalletId = PoolsPalletId; type MaxPointsToBalance = MaxPointsToBalance; + type AdminOrigin = EitherOf, StakingAdmin>; } impl pallet_asset_rate::Config for Runtime { @@ -1762,415 +1728,13 @@ pub type Migrations = (migrations::Unreleased, migrations::Permanent); #[allow(deprecated, missing_docs)] pub mod migrations { use super::*; - use frame_support::traits::OnRuntimeUpgrade; - use frame_system::RawOrigin; - use pallet_scheduler::WeightInfo as SchedulerWeightInfo; - use polkadot_runtime_common::auctions::WeightInfo as AuctionsWeightInfo; - use runtime_parachains::configuration::WeightInfo; - #[cfg(feature = "try-runtime")] - use sp_core::crypto::ByteArray; - - pub struct GetLegacyLeaseImpl; - impl coretime::migration::GetLegacyLease for GetLegacyLeaseImpl { - fn get_parachain_lease_in_blocks(para: ParaId) -> Option { - let now = frame_system::Pallet::::block_number(); - let lease = slots::Pallet::::lease(para); - if lease.is_empty() { - return None - } - // Lease not yet started/or having holes, refund (coretime can't handle this): - if lease.iter().any(Option::is_none) { - if let Err(err) = slots::Pallet::::clear_all_leases( - frame_system::RawOrigin::Root.into(), - para, - ) { - log::error!( - target: "runtime", - "Clearing lease for para: {:?} failed, with error: {:?}", - para, - err - ); - }; - return None - } - let (index, _) = - as Leaser>::lease_period_index(now)?; - Some(index.saturating_add(lease.len() as u32).saturating_mul(LeasePeriod::get())) - } - } - - /// Enable the elastic scaling node side feature. - /// - /// This is required for Coretime to ensure the relay chain processes parachains that are - /// assigned to multiple cores. - pub struct EnableElasticScalingNodeFeature; - impl OnRuntimeUpgrade for EnableElasticScalingNodeFeature { - fn on_runtime_upgrade() -> Weight { - let _ = Configuration::set_node_feature(RawOrigin::Root.into(), 1, true); - weights::runtime_parachains_configuration::WeightInfo::::set_node_feature() - } - } - - parameter_types! { - pub const StateTrieMigrationName: &'static str = "StateTrieMigration"; - pub const ImOnlinePalletName: &'static str = "ImOnline"; - pub const IdentityPalletName: &'static str = "Identity"; - pub const IdentityMigratorPalletName: &'static str = "IdentityMigrator"; - } - - /// Upgrade Session keys to exclude `ImOnline` key. - /// When this is removed, should also remove `OldSessionKeys`. - pub struct UpgradeSessionKeys; - const UPGRADE_SESSION_KEYS_FROM_SPEC: u32 = 1001003; - - impl OnRuntimeUpgrade for UpgradeSessionKeys { - #[cfg(feature = "try-runtime")] - fn pre_upgrade() -> Result, sp_runtime::TryRuntimeError> { - if System::last_runtime_upgrade_spec_version() > UPGRADE_SESSION_KEYS_FROM_SPEC { - log::warn!(target: "runtime::session_keys", "Skipping session keys migration pre-upgrade check due to spec version (already applied?)"); - return Ok(Vec::new()) - } - - log::info!(target: "runtime::session_keys", "Collecting pre-upgrade session keys state"); - let key_ids = SessionKeys::key_ids(); - frame_support::ensure!( - !key_ids.iter().any(|k| *k == sp_core::crypto::key_types::IM_ONLINE), - "New session keys contain the ImOnline key that should have been removed", - ); - let storage_key = pallet_session::QueuedKeys::::hashed_key(); - let mut state: Vec = Vec::new(); - frame_support::storage::unhashed::get::>( - &storage_key, - ) - .ok_or::("Queued keys are not available".into())? - .into_iter() - .for_each(|(id, keys)| { - state.extend_from_slice(id.as_slice()); - for key_id in key_ids { - state.extend_from_slice(keys.get_raw(*key_id)); - } - }); - frame_support::ensure!(!state.is_empty(), "Queued keys are not empty before upgrade"); - Ok(state) - } - - fn on_runtime_upgrade() -> Weight { - if System::last_runtime_upgrade_spec_version() > UPGRADE_SESSION_KEYS_FROM_SPEC { - log::info!("Skipping session keys upgrade: already applied"); - return ::DbWeight::get().reads(1) - } - log::trace!("Upgrading session keys"); - Session::upgrade_keys::(transform_session_keys); - Perbill::from_percent(50) * BlockWeights::get().max_block - } - - #[cfg(feature = "try-runtime")] - fn post_upgrade( - old_state: sp_std::vec::Vec, - ) -> Result<(), sp_runtime::TryRuntimeError> { - if System::last_runtime_upgrade_spec_version() > UPGRADE_SESSION_KEYS_FROM_SPEC { - log::warn!(target: "runtime::session_keys", "Skipping session keys migration post-upgrade check due to spec version (already applied?)"); - return Ok(()) - } - - let key_ids = SessionKeys::key_ids(); - let mut new_state: Vec = Vec::new(); - pallet_session::QueuedKeys::::get().into_iter().for_each(|(id, keys)| { - new_state.extend_from_slice(id.as_slice()); - for key_id in key_ids { - new_state.extend_from_slice(keys.get_raw(*key_id)); - } - }); - frame_support::ensure!( - !new_state.is_empty(), - "Queued keys are not empty after upgrade" - ); - frame_support::ensure!( - old_state == new_state, - "Pre-upgrade and post-upgrade keys do not match!" - ); - log::info!(target: "runtime::session_keys", "Session keys migrated successfully"); - Ok(()) - } - } - - /// Cancel all ongoing auctions. - /// - /// Any leases that come into existence after coretime was launched will not be served. Yet, - /// any ongoing auctions must be cancelled. - /// - /// Safety: - /// - /// - After coretime is launched, there are no auctions anymore. So if this forgotten to - /// be removed after the runtime upgrade, running this again on the next one is harmless. - /// - I am assuming scheduler `TaskName`s are unique, so removal of the scheduled entry - /// multiple times should also be fine. - pub struct CancelAuctions; - impl OnRuntimeUpgrade for CancelAuctions { - fn on_runtime_upgrade() -> Weight { - if let Err(err) = Auctions::cancel_auction(frame_system::RawOrigin::Root.into()) { - log::debug!(target: "runtime", "Cancelling auctions failed: {:?}", err); - } - // Cancel scheduled auction as well: - if let Err(err) = Scheduler::cancel_named( - pallet_custom_origins::Origin::AuctionAdmin.into(), - [ - 0x5c, 0x68, 0xbf, 0x0c, 0x2d, 0x11, 0x04, 0x91, 0x6b, 0xa5, 0xa4, 0xde, 0xe6, - 0xb8, 0x14, 0xe8, 0x2b, 0x27, 0x93, 0x78, 0x4c, 0xb6, 0xe7, 0x69, 0x04, 0x00, - 0x1a, 0x59, 0x49, 0xc1, 0x63, 0xb1, - ], - ) { - log::debug!(target: "runtime", "Cancelling scheduled auctions failed: {:?}", err); - } - weights::polkadot_runtime_common_auctions::WeightInfo::::cancel_auction() - .saturating_add(weights::pallet_scheduler::WeightInfo::::cancel_named( - ::MaxScheduledPerBlock::get(), - )) - } - } - - /// Migration to remove deprecated judgement proxies. - mod clear_judgement_proxies { - use super::*; - - use frame_support::{ - pallet_prelude::ValueQuery, - storage_alias, - traits::{Currency, ReservableCurrency}, - Twox64Concat, - }; - use frame_system::pallet_prelude::BlockNumberFor; - use pallet_proxy::ProxyDefinition; - use sp_runtime::{BoundedVec, Saturating}; - - /// ProxyType including the deprecated `IdentityJudgement`. - #[derive( - Copy, - Clone, - Eq, - PartialEq, - Ord, - PartialOrd, - Encode, - Decode, - RuntimeDebug, - MaxEncodedLen, - TypeInfo, - )] - pub enum PrevProxyType { - Any, - NonTransfer, - Governance, - Staking, - IdentityJudgement, - CancelProxy, - Auction, - Society, - NominationPools, - } - - type BalanceOf = <::Currency as Currency< - ::AccountId, - >>::Balance; - - type PrevProxiesValue = ( - BoundedVec>, MaxProxies>, - BalanceOf, - ); - - /// Proxies including the deprecated `IdentityJudgement` type. - #[storage_alias] - pub type Proxies = StorageMap< - pallet_proxy::Pallet, - Twox64Concat, - AccountId, - PrevProxiesValue, - ValueQuery, - >; - - pub struct Migration; - impl OnRuntimeUpgrade for Migration { - /// Compute the expected post-upgrade state for Proxies stroage, and the reserved value - /// for all accounts with a proxy. - #[cfg(feature = "try-runtime")] - fn pre_upgrade() -> Result, sp_runtime::TryRuntimeError> { - let mut expected_proxies: BTreeMap> = - BTreeMap::new(); - let mut expected_reserved_amounts: BTreeMap = BTreeMap::new(); - - for (who, (mut proxies, old_deposit)) in - Proxies::::iter().collect::>() - { - let proxies_len_before = proxies.len() as u64; - proxies.retain(|proxy| proxy.proxy_type != PrevProxyType::IdentityJudgement); - let proxies_len_after = proxies.len() as u64; - - let new_deposit = - pallet_proxy::Pallet::::deposit(proxies.len() as u32); - - let current_reserved = - >::reserved_balance(&who); - - // Update the deposit only if proxies were removed and the deposit decreased. - if new_deposit < old_deposit && proxies_len_after < proxies_len_before { - // If there're no proxies left, they should be removed - if proxies.len() > 0 { - expected_proxies.insert(who.clone(), (proxies, new_deposit)); - } - expected_reserved_amounts.insert( - who, - current_reserved.saturating_sub(old_deposit - new_deposit), - ); - } else { - // Deposit should not change. If any proxies needed to be removed, this - // won't impact that. - expected_proxies.insert(who.clone(), (proxies, old_deposit)); - expected_reserved_amounts.insert(who, current_reserved); - } - } - - let pre_upgrade_state = (expected_proxies, expected_reserved_amounts); - Ok(pre_upgrade_state.encode()) - } - - fn on_runtime_upgrade() -> Weight { - let mut reads = 0u64; - let mut writes = 0u64; - let mut proxies_removed_total = 0u64; - - Proxies::::translate( - |who: AccountId, (mut proxies, old_deposit): PrevProxiesValue| { - // Remove filter out IdentityJudgement proxies. - let proxies_len_before = proxies.len() as u64; - proxies - .retain(|proxy| proxy.proxy_type != PrevProxyType::IdentityJudgement); - let proxies_len_after = proxies.len() as u64; - - let deposit = if proxies_len_before > proxies_len_after { - log::info!( - "Removing {} IdentityJudgement proxies for {:?}", - proxies_len_before - proxies_len_after, - &who - ); - proxies_removed_total - .saturating_accrue(proxies_len_before - proxies_len_after); - - let new_deposit = - pallet_proxy::Pallet::::deposit(proxies.len() as u32); - - // Be kind and don't increase the deposit in case it increased (can - // happen if param change). - let deposit = new_deposit.min(old_deposit); - if deposit < old_deposit { - writes.saturating_inc(); - >::unreserve( - &who, - old_deposit - deposit, - ); - } - - deposit - } else { - // Nothing to do, use the old deposit. - old_deposit - }; - - reads.saturating_accrue(proxies_len_before + 1); - writes.saturating_accrue(proxies_len_after + 1); - - // No need to keep the k/v around if there're no proxies left. - match proxies.is_empty() { - true => { - debug_assert_eq!(deposit, 0); - None - }, - false => Some((proxies, deposit)), - } - }, - ); - - log::info!("Removed {} IdentityJudgement proxies in total", proxies_removed_total); - ::DbWeight::get().reads_writes(reads, writes) - } - - #[cfg(feature = "try-runtime")] - fn post_upgrade(state: Vec) -> Result<(), sp_runtime::TryRuntimeError> { - use frame_support::ensure; - use sp_runtime::TryRuntimeError; - - let (expected_proxies, expected_total_reserved): ( - BTreeMap>, - BTreeMap, - ) = Decode::decode(&mut &state[..]).expect("Failed to decode pre-upgrade state"); - - // Check Proxies storage is as expected - for (who, (proxies, deposit)) in Proxies::::iter() { - match expected_proxies.get(&who) { - Some((expected_proxies, expected_deposit)) => { - ensure!(&proxies == expected_proxies, "Unexpected Proxy"); - ensure!(&deposit == expected_deposit, "Unexpected deposit"); - }, - None => { - return Err(TryRuntimeError::Other("Missing Proxy")); - }, - } - } - - // Check the total reserved amounts for every account is as expected - for (who, expected_reserved) in expected_total_reserved.iter() { - let current_reserved = - >::reserved_balance(who); - - ensure!(current_reserved == *expected_reserved, "Reserved balance mismatch"); - } - - // Check there are no extra entries in the expected state that are not in the - // current state - for (who, _) in expected_proxies.iter() { - if !Proxies::::contains_key(who) { - return Err(TryRuntimeError::Other("Extra entry in expected state")); - } - } - - Ok(()) - } - } - } /// Unreleased migrations. Add new ones here: pub type Unreleased = ( - frame_support::migrations::RemovePallet, - pallet_nomination_pools::migration::versioned::V7ToV8, - pallet_staking::migrations::v14::MigrateToV14, - parachains_configuration::migration::v10::MigrateToV10, - parachains_configuration::migration::v11::MigrateToV11, - pallet_grandpa::migrations::MigrateV4ToV5, - parachains_scheduler::migration::MigrateV1ToV2, - // Migrate from legacy lease to coretime. Needs to run after configuration v11 - coretime::migration::MigrateToCoretime< - Runtime, - crate::xcm_config::XcmRouter, - GetLegacyLeaseImpl, - >, - EnableElasticScalingNodeFeature, - // Upgrade `SessionKeys` to exclude `ImOnline` - UpgradeSessionKeys, - // Remove `im-online` pallet on-chain storage - frame_support::migrations::RemovePallet< - ImOnlinePalletName, - ::DbWeight, - >, - CancelAuctions, - // Remove `identity` and `identity-migrator`. - frame_support::migrations::RemovePallet< - IdentityPalletName, - ::DbWeight, - >, - frame_support::migrations::RemovePallet< - IdentityMigratorPalletName, - ::DbWeight, - >, - clear_judgement_proxies::Migration, + parachains_configuration::migration::v12::MigrateToV12, + pallet_staking::migrations::v15::MigrateV14ToV15, + parachains_inclusion::migration::MigrateToV1, + parachains_assigner_on_demand::migration::MigrateV0ToV1, ); /// Migrations/checks that do not need to be versioned and can run on every update. @@ -2262,7 +1826,7 @@ sp_api::impl_runtime_apis! { Executive::execute_block(block); } - fn initialize_block(header: &::Header) { + fn initialize_block(header: &::Header) -> sp_runtime::ExtrinsicInclusionMode { Executive::initialize_block(header) } } @@ -2318,7 +1882,7 @@ sp_api::impl_runtime_apis! { } } - #[api_version(10)] + #[api_version(11)] impl polkadot_primitives::runtime_api::ParachainHost for Runtime { fn validators() -> Vec { parachains_runtime_api_impl::validators::() @@ -2364,6 +1928,7 @@ sp_api::impl_runtime_apis! { } fn candidate_pending_availability(para_id: ParaId) -> Option> { + #[allow(deprecated)] parachains_runtime_api_impl::candidate_pending_availability::(para_id) } @@ -2463,21 +2028,29 @@ sp_api::impl_runtime_apis! { } fn disabled_validators() -> Vec { - parachains_vstaging_api_impl::disabled_validators::() + parachains_runtime_api_impl::disabled_validators::() } fn node_features() -> NodeFeatures { - parachains_vstaging_api_impl::node_features::() + parachains_runtime_api_impl::node_features::() } fn approval_voting_params() -> ApprovalVotingParams { - parachains_vstaging_api_impl::approval_voting_params::() + parachains_runtime_api_impl::approval_voting_params::() + } + + fn claim_queue() -> BTreeMap> { + parachains_vstaging_api_impl::claim_queue::() + } + + fn candidates_pending_availability(para_id: ParaId) -> Vec> { + parachains_vstaging_api_impl::candidates_pending_availability::(para_id) } } impl beefy_primitives::BeefyApi for Runtime { fn beefy_genesis() -> Option { - Beefy::genesis_block() + pallet_beefy::GenesisBlock::::get() } fn validator_set() -> Option> { @@ -2485,7 +2058,7 @@ sp_api::impl_runtime_apis! { } fn submit_report_equivocation_unsigned_extrinsic( - equivocation_proof: beefy_primitives::EquivocationProof< + equivocation_proof: beefy_primitives::DoubleVotingProof< BlockNumber, BeefyId, BeefySignature, @@ -2524,7 +2097,7 @@ sp_api::impl_runtime_apis! { fn generate_proof( block_numbers: Vec, best_known_block_number: Option, - ) -> Result<(Vec, mmr::Proof), mmr::Error> { + ) -> Result<(Vec, mmr::LeafProof), mmr::Error> { Mmr::generate_proof(block_numbers, best_known_block_number).map( |(leaves, proof)| { ( @@ -2538,7 +2111,7 @@ sp_api::impl_runtime_apis! { ) } - fn verify_proof(leaves: Vec, proof: mmr::Proof) + fn verify_proof(leaves: Vec, proof: mmr::LeafProof) -> Result<(), mmr::Error> { let leaves = leaves.into_iter().map(|leaf| @@ -2551,7 +2124,7 @@ sp_api::impl_runtime_apis! { fn verify_proof_stateless( root: mmr::Hash, leaves: Vec, - proof: mmr::Proof + proof: mmr::LeafProof ) -> Result<(), mmr::Error> { let nodes = leaves.into_iter().map(|leaf|mmr::DataOrHash::Data(leaf.into_opaque_leaf())).collect(); pallet_mmr::verify_leaves_proof::(root, nodes, proof) @@ -2728,6 +2301,22 @@ sp_api::impl_runtime_apis! { fn balance_to_points(pool_id: pallet_nomination_pools::PoolId, new_funds: Balance) -> Balance { NominationPools::api_balance_to_points(pool_id, new_funds) } + + fn pool_pending_slash(pool_id: pallet_nomination_pools::PoolId) -> Balance { + NominationPools::api_pool_pending_slash(pool_id) + } + + fn member_pending_slash(member: AccountId) -> Balance { + NominationPools::api_member_pending_slash(member) + } + + fn pool_needs_delegate_migration(pool_id: pallet_nomination_pools::PoolId) -> bool { + NominationPools::api_pool_needs_delegate_migration(pool_id) + } + + fn member_needs_delegate_migration(member: AccountId) -> bool { + NominationPools::api_member_needs_delegate_migration(member) + } } impl pallet_staking_runtime_api::StakingApi for Runtime { @@ -2745,12 +2334,16 @@ sp_api::impl_runtime_apis! { } impl sp_genesis_builder::GenesisBuilder for Runtime { - fn create_default_config() -> Vec { - create_default_config::() + fn build_state(config: Vec) -> sp_genesis_builder::Result { + build_state::(config) + } + + fn get_preset(id: &Option) -> Option> { + get_preset::(id, |_| None) } - fn build_config(config: Vec) -> sp_genesis_builder::Result { - build_config::(config) + fn preset_names() -> Vec { + vec![] } } diff --git a/relay/kusama/src/weights/pallet_balances_native.rs b/relay/kusama/src/weights/pallet_balances_native.rs index 053661f570..8414e82349 100644 --- a/relay/kusama/src/weights/pallet_balances_native.rs +++ b/relay/kusama/src/weights/pallet_balances_native.rs @@ -147,6 +147,23 @@ impl pallet_balances::WeightInfo for WeightInfo { .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(u.into()))) .saturating_add(Weight::from_parts(0, 2603).saturating_mul(u.into())) } + fn burn_allow_death() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 27_491_000 picoseconds. + Weight::from_parts(28_444_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + fn burn_keep_alive() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 18_290_000 picoseconds. + Weight::from_parts(19_227_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + fn force_adjust_total_issuance() -> Weight { // Proof Size summary in bytes: // Measured: `0` diff --git a/relay/kusama/src/weights/pallet_balances_nis_counterpart.rs b/relay/kusama/src/weights/pallet_balances_nis_counterpart.rs index b2353c0c05..c4278a2881 100644 --- a/relay/kusama/src/weights/pallet_balances_nis_counterpart.rs +++ b/relay/kusama/src/weights/pallet_balances_nis_counterpart.rs @@ -161,6 +161,23 @@ impl pallet_balances::WeightInfo for WeightInfo { .saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(u.into()))) .saturating_add(Weight::from_parts(0, 2603).saturating_mul(u.into())) } + fn burn_allow_death() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 27_491_000 picoseconds. + Weight::from_parts(28_444_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + fn burn_keep_alive() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 18_290_000 picoseconds. + Weight::from_parts(19_227_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + fn force_adjust_total_issuance() -> Weight { // Proof Size summary in bytes: // Measured: `0` @@ -169,4 +186,4 @@ impl pallet_balances::WeightInfo for WeightInfo { Weight::from_parts(5_772_000, 0) .saturating_add(Weight::from_parts(0, 0)) } -} \ No newline at end of file +} diff --git a/relay/kusama/src/weights/pallet_nomination_pools.rs b/relay/kusama/src/weights/pallet_nomination_pools.rs index 954dea53d7..0f8e6870b9 100644 --- a/relay/kusama/src/weights/pallet_nomination_pools.rs +++ b/relay/kusama/src/weights/pallet_nomination_pools.rs @@ -88,6 +88,46 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo .saturating_add(T::DbWeight::get().reads(20)) .saturating_add(T::DbWeight::get().writes(13)) } + fn apply_slash() -> Weight { + // Proof Size summary in bytes: + // Measured: `3328` + // Estimated: `4556` + // Minimum execution time: 99_605_000 picoseconds. + Weight::from_parts(101_986_000, 0) + .saturating_add(Weight::from_parts(0, 4556)) + .saturating_add(T::DbWeight::get().reads(9)) + .saturating_add(T::DbWeight::get().writes(4)) + } + fn apply_slash_fail() -> Weight { + // Proof Size summary in bytes: + // Measured: `3070` + // Estimated: `4556` + // Minimum execution time: 58_103_000 picoseconds. + Weight::from_parts(59_680_000, 0) + .saturating_add(Weight::from_parts(0, 4556)) + .saturating_add(T::DbWeight::get().reads(7)) + } + fn pool_migrate() -> Weight { + // Proof Size summary in bytes: + // Measured: `1359` + // Estimated: `6196` + // Minimum execution time: 144_098_000 picoseconds. + Weight::from_parts(146_590_000, 0) + .saturating_add(Weight::from_parts(0, 6196)) + .saturating_add(T::DbWeight::get().reads(16)) + .saturating_add(T::DbWeight::get().writes(11)) + } + fn migrate_delegation() -> Weight { + // Proof Size summary in bytes: + // Measured: `2275` + // Estimated: `6180` + // Minimum execution time: 148_594_000 picoseconds. + Weight::from_parts(152_119_000, 0) + .saturating_add(Weight::from_parts(0, 6180)) + .saturating_add(T::DbWeight::get().reads(15)) + .saturating_add(T::DbWeight::get().writes(6)) + } + /// Storage: `NominationPools::PoolMembers` (r:1 w:1) /// Proof: `NominationPools::PoolMembers` (`max_values`: None, `max_size`: Some(717), added: 3192, mode: `MaxEncodedLen`) /// Storage: `NominationPools::BondedPools` (r:1 w:1) diff --git a/relay/kusama/src/weights/pallet_scheduler.rs b/relay/kusama/src/weights/pallet_scheduler.rs index 23945b2f78..e61ab43af7 100644 --- a/relay/kusama/src/weights/pallet_scheduler.rs +++ b/relay/kusama/src/weights/pallet_scheduler.rs @@ -46,6 +46,73 @@ use core::marker::PhantomData; /// Weight functions for `pallet_scheduler`. pub struct WeightInfo(PhantomData); impl pallet_scheduler::WeightInfo for WeightInfo { +fn schedule_retry(s: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `159` + // Estimated: `110487` + // Minimum execution time: 14_155_000 picoseconds. + Weight::from_parts(16_447_031, 110487) + // Standard Error: 233 + .saturating_add(Weight::from_parts(8_424, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(4_u64)) + } + /// Storage: `Scheduler::Agenda` (r:1 w:0) + /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(107022), added: 109497, mode: `MaxEncodedLen`) + /// Storage: `Scheduler::Retries` (r:0 w:1) + /// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`) + fn set_retry() -> Weight { + // Proof Size summary in bytes: + // Measured: `81 + s * (177 ±0)` + // Estimated: `110487` + // Minimum execution time: 8_130_000 picoseconds. + Weight::from_parts(9_047_554, 110487) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } + /// Storage: `Scheduler::Lookup` (r:1 w:0) + /// Proof: `Scheduler::Lookup` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `Scheduler::Agenda` (r:1 w:0) + /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(107022), added: 109497, mode: `MaxEncodedLen`) + /// Storage: `Scheduler::Retries` (r:0 w:1) + /// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`) + fn set_retry_named() -> Weight { + // Proof Size summary in bytes: + // Measured: `647 + s * (178 ±0)` + // Estimated: `110487` + // Minimum execution time: 10_838_000 picoseconds. + Weight::from_parts(12_804_076, 110487) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } + /// Storage: `Scheduler::Agenda` (r:1 w:0) + /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(107022), added: 109497, mode: `MaxEncodedLen`) + /// Storage: `Scheduler::Retries` (r:0 w:1) + /// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`) + fn cancel_retry() -> Weight { + // Proof Size summary in bytes: + // Measured: `81 + s * (177 ±0)` + // Estimated: `110487` + // Minimum execution time: 8_130_000 picoseconds. + Weight::from_parts(9_047_554, 110487) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } + /// Storage: `Scheduler::Lookup` (r:1 w:0) + /// Proof: `Scheduler::Lookup` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `Scheduler::Agenda` (r:1 w:0) + /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(107022), added: 109497, mode: `MaxEncodedLen`) + /// Storage: `Scheduler::Retries` (r:0 w:1) + /// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`) + fn cancel_retry_named() -> Weight { + // Proof Size summary in bytes: + // Measured: `647 + s * (178 ±0)` + // Estimated: `110487` + // Minimum execution time: 10_838_000 picoseconds. + Weight::from_parts(12_804_076, 110487) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } /// Storage: `Scheduler::IncompleteSince` (r:1 w:1) /// Proof: `Scheduler::IncompleteSince` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) fn service_agendas_base() -> Weight { diff --git a/relay/kusama/src/weights/pallet_staking.rs b/relay/kusama/src/weights/pallet_staking.rs index 5cbee08766..2809b8bcfa 100644 --- a/relay/kusama/src/weights/pallet_staking.rs +++ b/relay/kusama/src/weights/pallet_staking.rs @@ -794,16 +794,7 @@ impl pallet_staking::WeightInfo for WeightInfo { .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: `Balances::Locks` (r:1 w:1) - /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) - /// Storage: `System::Account` (r:1 w:1) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - /// Storage: `Staking::Bonded` (r:1 w:1) - /// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`) - /// Storage: `Staking::Ledger` (r:1 w:1) - /// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`) - /// Storage: `Balances::Freezes` (r:1 w:0) - /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`) + fn restore_ledger() -> Weight { // Proof Size summary in bytes: // Measured: `1014` diff --git a/relay/kusama/src/weights/runtime_parachains_configuration.rs b/relay/kusama/src/weights/runtime_parachains_configuration.rs index 31c6e50524..9249e3ec1e 100644 --- a/relay/kusama/src/weights/runtime_parachains_configuration.rs +++ b/relay/kusama/src/weights/runtime_parachains_configuration.rs @@ -168,4 +168,15 @@ impl runtime_parachains::configuration::WeightInfo for .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) } + + fn set_config_with_scheduler_params() -> Weight { + // Proof Size summary in bytes: + // Measured: `151` + // Estimated: `1636` + // Minimum execution time: 7_913_000 picoseconds. + Weight::from_parts(8_338_000, 0) + .saturating_add(Weight::from_parts(0, 1636)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(1)) + } } diff --git a/relay/kusama/src/xcm_config.rs b/relay/kusama/src/xcm_config.rs index b7e5dd0599..e404ddf1c8 100644 --- a/relay/kusama/src/xcm_config.rs +++ b/relay/kusama/src/xcm_config.rs @@ -190,6 +190,7 @@ pub struct XcmConfig; impl xcm_executor::Config for XcmConfig { type RuntimeCall = RuntimeCall; type XcmSender = XcmRouter; + type XcmRecorder = (); type AssetTransactor = LocalAssetTransactor; type OriginConverter = LocalOriginConverter; type IsReserve = (); @@ -223,6 +224,9 @@ impl xcm_executor::Config for XcmConfig { type SafeCallFilter = Everything; type Aliasers = Nothing; type TransactionalProcessor = FrameTransactionalProcessor; + type HrmpNewChannelOpenRequestHandler = (); + type HrmpChannelAcceptedHandler = (); + type HrmpChannelClosingHandler = (); } parameter_types! { @@ -296,7 +300,7 @@ impl pallet_xcm::Config for Runtime { } #[test] -fn karura_liquid_staking_xcm_has_sane_weight_upper_limt() { +fn karura_liquid_staking_xcm_has_sane_weight_upper_limit() { use codec::Decode; use frame_support::dispatch::GetDispatchInfo; use xcm::VersionedXcm; @@ -304,9 +308,8 @@ fn karura_liquid_staking_xcm_has_sane_weight_upper_limt() { // should be [WithdrawAsset, BuyExecution, Transact, RefundSurplus, DepositAsset] let blob = hex_literal::hex!("02140004000000000700e40b540213000000000700e40b54020006010700c817a804341801000006010b00c490bf4302140d010003ffffffff000100411f"); - let Ok(VersionedXcm::V2(old_xcm_v2)) = - VersionedXcm::::decode(&mut &blob[..]) - else { + #[allow(deprecated)] // `xcm::v2` is deprecated + let Ok(VersionedXcm::V2(old_xcm_v2)) = VersionedXcm::::decode(&mut &blob[..]) else { panic!("can't decode XCM blob") }; let old_xcm_v3: xcm::v3::Xcm = diff --git a/relay/polkadot/src/lib.rs b/relay/polkadot/src/lib.rs index 396af8d122..fd36be70e1 100644 --- a/relay/polkadot/src/lib.rs +++ b/relay/polkadot/src/lib.rs @@ -41,7 +41,7 @@ use runtime_parachains::{ initializer as parachains_initializer, origin as parachains_origin, paras as parachains_paras, paras_inherent as parachains_paras_inherent, reward_points as parachains_reward_points, runtime_api_impl::{ - v7 as parachains_runtime_api_impl, vstaging as parachains_vstaging_api_impl, + v10 as parachains_runtime_api_impl, vstaging as parachains_vstaging_api_impl, }, scheduler as parachains_scheduler, session_info as parachains_session_info, shared as parachains_shared, @@ -58,7 +58,7 @@ use frame_election_provider_support::{ }; use frame_support::{ construct_runtime, - genesis_builder_helper::{build_config, create_default_config}, + genesis_builder_helper::{build_state, get_preset}, parameter_types, traits::{ fungible::HoldConsideration, ConstU32, Contains, EitherOf, EitherOfDiverse, EverythingBut, @@ -74,14 +74,12 @@ use pallet_identity::legacy::IdentityInfo; use pallet_session::historical as session_historical; use pallet_transaction_payment::{FeeDetails, RuntimeDispatchInfo}; use polkadot_primitives::{ - slashing, - vstaging::{ApprovalVotingParams, NodeFeatures}, - AccountId, AccountIndex, Balance, BlockNumber, CandidateEvent, CandidateHash, - CommittedCandidateReceipt, CoreState, DisputeState, ExecutorParams, GroupRotationInfo, Hash, - Id as ParaId, InboundDownwardMessage, InboundHrmpMessage, Moment, Nonce, - OccupiedCoreAssumption, PersistedValidationData, ScrapedOnChainVotes, SessionInfo, Signature, - ValidationCode, ValidationCodeHash, ValidatorId, ValidatorIndex, LOWEST_PUBLIC_ID, - PARACHAIN_KEY_TYPE_ID, + slashing, AccountId, AccountIndex, ApprovalVotingParams, Balance, BlockNumber, CandidateEvent, + CandidateHash, CommittedCandidateReceipt, CoreIndex, CoreState, DisputeState, ExecutorParams, + GroupRotationInfo, Hash, Id as ParaId, InboundDownwardMessage, InboundHrmpMessage, Moment, + NodeFeatures, Nonce, OccupiedCoreAssumption, PersistedValidationData, ScrapedOnChainVotes, + SessionInfo, Signature, ValidationCode, ValidationCodeHash, ValidatorId, ValidatorIndex, + LOWEST_PUBLIC_ID, PARACHAIN_KEY_TYPE_ID, }; use sp_core::{OpaqueMetadata, H256}; use sp_runtime::{ @@ -93,11 +91,14 @@ use sp_runtime::{ IdentityLookup, Keccak256, OpaqueKeys, SaturatedConversion, Verify, }, transaction_validity::{TransactionPriority, TransactionSource, TransactionValidity}, - ApplyExtrinsicResult, BoundToRuntimeAppPublic, FixedU128, KeyTypeId, Perbill, Percent, Permill, - RuntimeAppPublic, RuntimeDebug, + ApplyExtrinsicResult, FixedU128, KeyTypeId, Perbill, Percent, Permill, RuntimeDebug, }; use sp_staking::SessionIndex; -use sp_std::{cmp::Ordering, collections::btree_map::BTreeMap, prelude::*}; +use sp_std::{ + cmp::Ordering, + collections::{btree_map::BTreeMap, vec_deque::VecDeque}, + prelude::*, +}; #[cfg(any(feature = "std", test))] use sp_version::NativeVersion; use sp_version::RuntimeVersion; @@ -141,7 +142,6 @@ use frame_system::EnsureSigned; pub const LOG_TARGET: &str = "runtime::polkadot"; -use polkadot_runtime_common as runtime_common; impl_runtime_weights!(polkadot_runtime_constants); // Make the WASM binary available. @@ -216,6 +216,11 @@ impl frame_system::Config for Runtime { type SS58Prefix = SS58Prefix; type OnSetCode = (); type MaxConsumers = frame_support::traits::ConstU32<16>; + type SingleBlockMigrations = (); + type MultiBlockMigrator = (); + type PreInherents = (); + type PostInherents = (); + type PostTransactions = (); } parameter_types! { @@ -367,6 +372,7 @@ impl pallet_mmr::Config for Runtime { type OnNewRoot = pallet_beefy_mmr::DepositBeefyDigest; type WeightInfo = (); type LeafData = pallet_beefy_mmr::Pallet; + type BlockHashProvider = pallet_mmr::DefaultBlockHashProvider; } /// MMR helper types. @@ -401,9 +407,11 @@ parameter_types! { pub struct ParaHeadsRootProvider; impl BeefyDataProvider for ParaHeadsRootProvider { fn extra_data() -> H256 { - let mut para_heads: Vec<(u32, Vec)> = Paras::parachains() + let mut para_heads: Vec<(u32, Vec)> = parachains_paras::Parachains::::get() .into_iter() - .filter_map(|id| Paras::para_head(id).map(|head| (id.into(), head.0))) + .filter_map(|id| { + parachains_paras::Heads::::get(id).map(|head| (id.into(), head.0)) + }) .collect(); para_heads.sort_by_key(|k| k.0); binary_merkle_tree::merkle_root::( @@ -450,46 +458,6 @@ impl pallet_authorship::Config for Runtime { type EventHandler = Staking; } -#[derive(Clone, Debug, PartialEq, Eq, Encode, Decode)] -pub struct OldSessionKeys { - pub grandpa: ::Public, - pub babe: ::Public, - pub im_online: pallet_im_online::sr25519::AuthorityId, - pub para_validator: ::Public, - pub para_assignment: ::Public, - pub authority_discovery: ::Public, - pub beefy: ::Public, -} - -impl OpaqueKeys for OldSessionKeys { - type KeyTypeIdProviders = (); - fn key_ids() -> &'static [KeyTypeId] { - &[ - <::Public>::ID, - <::Public>::ID, - sp_core::crypto::key_types::IM_ONLINE, - <::Public>::ID, - <::Public>::ID, - <::Public>::ID, - <::Public>::ID, - ] - } - fn get_raw(&self, i: KeyTypeId) -> &[u8] { - match i { - <::Public>::ID => self.grandpa.as_ref(), - <::Public>::ID => self.babe.as_ref(), - sp_core::crypto::key_types::IM_ONLINE => self.im_online.as_ref(), - <::Public>::ID => self.para_validator.as_ref(), - <::Public>::ID => - self.para_assignment.as_ref(), - <::Public>::ID => - self.authority_discovery.as_ref(), - <::Public>::ID => self.beefy.as_ref(), - _ => &[], - } - } -} - impl_opaque_keys! { pub struct SessionKeys { pub grandpa: Grandpa, @@ -501,18 +469,6 @@ impl_opaque_keys! { } } -// remove this when removing `OldSessionKeys` -fn transform_session_keys(_v: AccountId, old: OldSessionKeys) -> SessionKeys { - SessionKeys { - grandpa: old.grandpa, - babe: old.babe, - para_validator: old.para_validator, - para_assignment: old.para_assignment, - authority_discovery: old.authority_discovery, - beefy: old.beefy, - } -} - impl pallet_session::Config for Runtime { type RuntimeEvent = RuntimeEvent; type ValidatorId = AccountId; @@ -767,7 +723,7 @@ impl pallet_staking::EraPayout for EraPayout { era_duration_millis: u64, ) -> (Balance, Balance) { // all para-ids that are not active. - let auctioned_slots = Paras::parachains() + let auctioned_slots = parachains_paras::Parachains::::get() .into_iter() // all active para-ids that do not belong to a system chain is the number // of parachains that we should take into account for inflation. @@ -803,7 +759,6 @@ impl pallet_staking::Config for Runtime { type SessionInterface = Self; type EraPayout = EraPayout; type MaxExposurePageSize = MaxExposurePageSize; - type OffendingValidatorsThreshold = OffendingValidatorsThreshold; type NextNewSession = Session; type ElectionProvider = ElectionProviderMultiPhase; type GenesisElectionProvider = onchain::OnChainExecution; @@ -815,6 +770,7 @@ impl pallet_staking::Config for Runtime { type MaxControllersInDeprecationBatch = ConstU32<5314>; type BenchmarkingConfig = polkadot_runtime_common::StakingBenchmarkingConfig; type EventListeners = NominationPools; + type DisablingStrategy = pallet_staking::UpToLimitDisablingStrategy; type WeightInfo = weights::pallet_staking::WeightInfo; } @@ -853,7 +809,7 @@ impl pallet_identity::Config for Runtime { type RegistrarOrigin = EitherOf, GeneralAdmin>; type OffchainSignature = Signature; type SigningPublicKey = ::Signer; - type UsernameAuthorityOrigin = EnsureRoot; + type UsernameAuthorityOrigin = EitherOf, GeneralAdmin>; type PendingUsernameExpiration = ConstU32<{ 7 * DAYS }>; type MaxSuffixLength = ConstU32<7>; type MaxUsernameLength = ConstU32<32>; @@ -1351,6 +1307,7 @@ parameter_types! { /// /// This is not a good value for para-chains since the `Scheduler` already uses up to 80% block weight. pub MessageQueueServiceWeight: Weight = Perbill::from_percent(20) * BlockWeights::get().max_block; + pub MessageQueueIdleServiceWeight: Weight = Perbill::from_percent(20) * BlockWeights::get().max_block; pub const MessageQueueHeapSize: u32 = 65_536; pub const MessageQueueMaxStale: u32 = 8; } @@ -1391,6 +1348,7 @@ impl pallet_message_queue::Config for Runtime { type QueueChangeHandler = ParaInclusion; type QueuePausedQuery = (); type WeightInfo = weights::pallet_message_queue::WeightInfo; + type IdleMaxServiceWeight = MessageQueueIdleServiceWeight; } impl parachains_dmp::Config for Runtime {} @@ -1412,6 +1370,7 @@ impl parachains_hrmp::Config for Runtime { HrmpChannelSizeAndCapacityWithSystemRatio, >; type WeightInfo = weights::runtime_parachains_hrmp::WeightInfo; + type VersionWrapper = XcmPallet; } impl parachains_paras_inherent::Config for Runtime { @@ -1549,7 +1508,7 @@ impl pallet_nomination_pools::Config for Runtime { type RewardCounter = FixedU128; type BalanceToU256 = polkadot_runtime_common::BalanceToU256; type U256ToBalance = polkadot_runtime_common::U256ToBalance; - type Staking = Staking; + type StakeAdapter = pallet_nomination_pools::adapter::TransferStake; 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. @@ -1557,6 +1516,7 @@ impl pallet_nomination_pools::Config for Runtime { type PalletId = PoolsPalletId; type MaxPointsToBalance = MaxPointsToBalance; type WeightInfo = weights::pallet_nomination_pools::WeightInfo; + type AdminOrigin = EitherOf, StakingAdmin>; } pub struct InitiateNominationPools; @@ -1825,110 +1785,21 @@ pub type Migrations = (migrations::Unreleased, migrations::Permanent); #[allow(deprecated, missing_docs)] pub mod migrations { use super::*; - #[cfg(feature = "try-runtime")] - use sp_core::crypto::ByteArray; parameter_types! { pub const ImOnlinePalletName: &'static str = "ImOnline"; } - /// Upgrade Session keys to exclude `ImOnline` key. - /// When this is removed, should also remove `OldSessionKeys`. - pub struct UpgradeSessionKeys; - const UPGRADE_SESSION_KEYS_FROM_SPEC: u32 = 1001003; - - impl frame_support::traits::OnRuntimeUpgrade for UpgradeSessionKeys { - #[cfg(feature = "try-runtime")] - fn pre_upgrade() -> Result, sp_runtime::TryRuntimeError> { - if System::last_runtime_upgrade_spec_version() > UPGRADE_SESSION_KEYS_FROM_SPEC { - log::warn!(target: "runtime::session_keys", "Skipping session keys migration pre-upgrade check due to spec version (already applied?)"); - return Ok(Vec::new()) - } - - log::info!(target: "runtime::session_keys", "Collecting pre-upgrade session keys state"); - let key_ids = SessionKeys::key_ids(); - frame_support::ensure!( - key_ids - .into_iter() - .find(|&k| *k == sp_core::crypto::key_types::IM_ONLINE) - .is_none(), - "New session keys contain the ImOnline key that should have been removed", - ); - let storage_key = pallet_session::QueuedKeys::::hashed_key(); - let mut state: Vec = Vec::new(); - frame_support::storage::unhashed::get::>( - &storage_key, - ) - .ok_or::("Queued keys are not available".into())? - .into_iter() - .for_each(|(id, keys)| { - state.extend_from_slice(id.as_slice()); - for key_id in key_ids { - state.extend_from_slice(keys.get_raw(*key_id)); - } - }); - frame_support::ensure!(state.len() > 0, "Queued keys are not empty before upgrade"); - Ok(state) - } - - fn on_runtime_upgrade() -> Weight { - if System::last_runtime_upgrade_spec_version() > UPGRADE_SESSION_KEYS_FROM_SPEC { - log::info!("Skipping session keys upgrade: already applied"); - return ::DbWeight::get().reads(1) - } - log::trace!("Upgrading session keys"); - Session::upgrade_keys::(transform_session_keys); - Perbill::from_percent(50) * BlockWeights::get().max_block - } - - #[cfg(feature = "try-runtime")] - fn post_upgrade( - old_state: sp_std::vec::Vec, - ) -> Result<(), sp_runtime::TryRuntimeError> { - if System::last_runtime_upgrade_spec_version() > UPGRADE_SESSION_KEYS_FROM_SPEC { - log::warn!(target: "runtime::session_keys", "Skipping session keys migration post-upgrade check due to spec version (already applied?)"); - return Ok(()) - } - - let key_ids = SessionKeys::key_ids(); - let mut new_state: Vec = Vec::new(); - pallet_session::QueuedKeys::::get().into_iter().for_each(|(id, keys)| { - new_state.extend_from_slice(id.as_slice()); - for key_id in key_ids { - new_state.extend_from_slice(keys.get_raw(*key_id)); - } - }); - frame_support::ensure!(new_state.len() > 0, "Queued keys are not empty after upgrade"); - frame_support::ensure!( - old_state == new_state, - "Pre-upgrade and post-upgrade keys do not match!" - ); - log::info!(target: "runtime::session_keys", "Session keys migrated successfully"); - Ok(()) - } - } - - // We don't have a limit in the Relay Chain. - const IDENTITY_MIGRATION_KEY_LIMIT: u64 = u64::MAX; - /// Unreleased migrations. Add new ones here: pub type Unreleased = ( - init_state_migration::InitMigrate, - // Upgrade SessionKeys to exclude ImOnline key - UpgradeSessionKeys, - pallet_nomination_pools::migration::versioned::V7ToV8, - pallet_staking::migrations::v14::MigrateToV14, - parachains_configuration::migration::v10::MigrateToV10, - parachains_configuration::migration::v11::MigrateToV11, - pallet_grandpa::migrations::MigrateV4ToV5, - // Migrate Identity pallet for Usernames - pallet_identity::migration::versioned::V0ToV1, - parachains_scheduler::migration::MigrateV1ToV2, // Remove `im-online` pallet on-chain storage frame_support::migrations::RemovePallet< ImOnlinePalletName, ::DbWeight, >, + parachains_configuration::migration::v12::MigrateToV12, + parachains_inclusion::migration::MigrateToV1, + pallet_staking::migrations::v15::MigrateV14ToV15, ); /// Migrations/checks that do not need to be versioned and can run on every update. @@ -2015,7 +1886,7 @@ sp_api::impl_runtime_apis! { Executive::execute_block(block); } - fn initialize_block(header: &::Header) { + fn initialize_block(header: &::Header) -> sp_runtime::ExtrinsicInclusionMode { Executive::initialize_block(header) } } @@ -2071,6 +1942,22 @@ sp_api::impl_runtime_apis! { fn balance_to_points(pool_id: pallet_nomination_pools::PoolId, new_funds: Balance) -> Balance { NominationPools::api_balance_to_points(pool_id, new_funds) } + + fn pool_pending_slash(pool_id: pallet_nomination_pools::PoolId) -> Balance { + NominationPools::api_pool_pending_slash(pool_id) + } + + fn member_pending_slash(member: AccountId) -> Balance { + NominationPools::api_member_pending_slash(member) + } + + fn pool_needs_delegate_migration(pool_id: pallet_nomination_pools::PoolId) -> bool { + NominationPools::api_pool_needs_delegate_migration(pool_id) + } + + fn member_needs_delegate_migration(member: AccountId) -> bool { + NominationPools::api_member_needs_delegate_migration(member) + } } impl pallet_staking_runtime_api::StakingApi for Runtime { @@ -2103,7 +1990,7 @@ sp_api::impl_runtime_apis! { } } - #[api_version(10)] + #[api_version(11)] impl polkadot_primitives::runtime_api::ParachainHost for Runtime { fn validators() -> Vec { parachains_runtime_api_impl::validators::() @@ -2149,6 +2036,7 @@ sp_api::impl_runtime_apis! { } fn candidate_pending_availability(para_id: ParaId) -> Option> { + #[allow(deprecated)] parachains_runtime_api_impl::candidate_pending_availability::(para_id) } @@ -2248,21 +2136,29 @@ sp_api::impl_runtime_apis! { } fn disabled_validators() -> Vec { - parachains_vstaging_api_impl::disabled_validators::() + parachains_runtime_api_impl::disabled_validators::() } fn node_features() -> NodeFeatures { - parachains_vstaging_api_impl::node_features::() + parachains_runtime_api_impl::node_features::() } fn approval_voting_params() -> ApprovalVotingParams { - parachains_vstaging_api_impl::approval_voting_params::() + parachains_runtime_api_impl::approval_voting_params::() + } + + fn claim_queue() -> BTreeMap> { + parachains_vstaging_api_impl::claim_queue::() + } + + fn candidates_pending_availability(para_id: ParaId) -> Vec> { + parachains_vstaging_api_impl::candidates_pending_availability::(para_id) } } impl beefy_primitives::BeefyApi for Runtime { fn beefy_genesis() -> Option { - Beefy::genesis_block() + pallet_beefy::GenesisBlock::::get() } fn validator_set() -> Option> { @@ -2270,7 +2166,7 @@ sp_api::impl_runtime_apis! { } fn submit_report_equivocation_unsigned_extrinsic( - equivocation_proof: beefy_primitives::EquivocationProof< + equivocation_proof: beefy_primitives::DoubleVotingProof< BlockNumber, BeefyId, BeefySignature, @@ -2309,7 +2205,7 @@ sp_api::impl_runtime_apis! { fn generate_proof( block_numbers: Vec, best_known_block_number: Option, - ) -> Result<(Vec, mmr::Proof), mmr::Error> { + ) -> Result<(Vec, mmr::LeafProof), mmr::Error> { Mmr::generate_proof(block_numbers, best_known_block_number).map( |(leaves, proof)| { ( @@ -2323,7 +2219,7 @@ sp_api::impl_runtime_apis! { ) } - fn verify_proof(leaves: Vec, proof: mmr::Proof) + fn verify_proof(leaves: Vec, proof: mmr::LeafProof) -> Result<(), mmr::Error> { let leaves = leaves.into_iter().map(|leaf| @@ -2336,7 +2232,7 @@ sp_api::impl_runtime_apis! { fn verify_proof_stateless( root: mmr::Hash, leaves: Vec, - proof: mmr::Proof + proof: mmr::LeafProof ) -> Result<(), mmr::Error> { let nodes = leaves.into_iter().map(|leaf|mmr::DataOrHash::Data(leaf.into_opaque_leaf())).collect(); pallet_mmr::verify_leaves_proof::(root, nodes, proof) @@ -2498,12 +2394,16 @@ sp_api::impl_runtime_apis! { } impl sp_genesis_builder::GenesisBuilder for Runtime { - fn create_default_config() -> Vec { - create_default_config::() + fn build_state(config: Vec) -> sp_genesis_builder::Result { + build_state::(config) + } + + fn get_preset(id: &Option) -> Option> { + get_preset::(id, |_| None) } - fn build_config(config: Vec) -> sp_genesis_builder::Result { - build_config::(config) + fn preset_names() -> Vec { + vec![] } } @@ -3227,65 +3127,3 @@ mod remote_tests { }); } } - -mod init_state_migration { - use super::Runtime; - use frame_support::traits::OnRuntimeUpgrade; - use pallet_state_trie_migration::{AutoLimits, MigrationLimits, MigrationProcess}; - #[cfg(not(feature = "std"))] - use sp_std::prelude::*; - - /// Initialize an automatic migration process. - pub struct InitMigrate; - impl OnRuntimeUpgrade for InitMigrate { - #[cfg(feature = "try-runtime")] - fn pre_upgrade() -> Result, sp_runtime::DispatchError> { - use codec::Encode; - let migration_should_start = AutoLimits::::get().is_none() && - MigrationProcess::::get() == Default::default(); - Ok(migration_should_start.encode()) - } - - fn on_runtime_upgrade() -> frame_support::weights::Weight { - if AutoLimits::::get().is_some() { - log::warn!("Automatic trie migration already started, not proceeding."); - return ::DbWeight::get().reads(1) - }; - - if MigrationProcess::::get() != Default::default() { - log::warn!("MigrationProcess is not Default. Not proceeding."); - return ::DbWeight::get().reads(2) - }; - - // Migration is not already running and `MigraitonProcess` is Default. Ready to run - // migrations. - // - // We use limits to target 600ko proofs per block and - // avg 800_000_000_000 of weight per block. - // See spreadsheet 4800_400 in - // https://raw.githubusercontent.com/cheme/substrate/try-runtime-mig/ksm.ods - AutoLimits::::put(Some(MigrationLimits { item: 4_800, size: 204800 * 2 })); - log::info!("Automatic trie migration started."); - ::DbWeight::get().reads_writes(2, 1) - } - - #[cfg(feature = "try-runtime")] - fn post_upgrade( - migration_should_start_bytes: Vec, - ) -> Result<(), sp_runtime::DispatchError> { - use codec::Decode; - let migration_should_start: bool = - Decode::decode(&mut migration_should_start_bytes.as_slice()) - .expect("failed to decode migration should start"); - - if migration_should_start { - frame_support::ensure!( - AutoLimits::::get().is_some(), - sp_runtime::DispatchError::Other("Automigration did not start as expected.") - ); - } - - Ok(()) - } - } -} diff --git a/relay/polkadot/src/weights/pallet_balances.rs b/relay/polkadot/src/weights/pallet_balances.rs index 171543e4c2..22ff501378 100644 --- a/relay/polkadot/src/weights/pallet_balances.rs +++ b/relay/polkadot/src/weights/pallet_balances.rs @@ -146,6 +146,23 @@ impl pallet_balances::WeightInfo for WeightInfo { .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(u.into()))) .saturating_add(Weight::from_parts(0, 2603).saturating_mul(u.into())) } + fn burn_allow_death() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 27_491_000 picoseconds. + Weight::from_parts(28_444_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + fn burn_keep_alive() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 18_290_000 picoseconds. + Weight::from_parts(19_227_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + fn force_adjust_total_issuance() -> Weight { // Proof Size summary in bytes: // Measured: `0` diff --git a/relay/polkadot/src/weights/pallet_nomination_pools.rs b/relay/polkadot/src/weights/pallet_nomination_pools.rs index 0d448c3bb7..4db6d97e54 100644 --- a/relay/polkadot/src/weights/pallet_nomination_pools.rs +++ b/relay/polkadot/src/weights/pallet_nomination_pools.rs @@ -88,6 +88,45 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo .saturating_add(T::DbWeight::get().reads(20)) .saturating_add(T::DbWeight::get().writes(13)) } + fn apply_slash() -> Weight { + // Proof Size summary in bytes: + // Measured: `3328` + // Estimated: `4556` + // Minimum execution time: 99_605_000 picoseconds. + Weight::from_parts(101_986_000, 0) + .saturating_add(Weight::from_parts(0, 4556)) + .saturating_add(T::DbWeight::get().reads(9)) + .saturating_add(T::DbWeight::get().writes(4)) + } + fn apply_slash_fail() -> Weight { + // Proof Size summary in bytes: + // Measured: `3070` + // Estimated: `4556` + // Minimum execution time: 58_103_000 picoseconds. + Weight::from_parts(59_680_000, 0) + .saturating_add(Weight::from_parts(0, 4556)) + .saturating_add(T::DbWeight::get().reads(7)) + } + fn pool_migrate() -> Weight { + // Proof Size summary in bytes: + // Measured: `1359` + // Estimated: `6196` + // Minimum execution time: 144_098_000 picoseconds. + Weight::from_parts(146_590_000, 0) + .saturating_add(Weight::from_parts(0, 6196)) + .saturating_add(T::DbWeight::get().reads(16)) + .saturating_add(T::DbWeight::get().writes(11)) + } + fn migrate_delegation() -> Weight { + // Proof Size summary in bytes: + // Measured: `2275` + // Estimated: `6180` + // Minimum execution time: 148_594_000 picoseconds. + Weight::from_parts(152_119_000, 0) + .saturating_add(Weight::from_parts(0, 6180)) + .saturating_add(T::DbWeight::get().reads(15)) + .saturating_add(T::DbWeight::get().writes(6)) + } /// Storage: `NominationPools::PoolMembers` (r:1 w:1) /// Proof: `NominationPools::PoolMembers` (`max_values`: None, `max_size`: Some(717), added: 3192, mode: `MaxEncodedLen`) /// Storage: `NominationPools::BondedPools` (r:1 w:1) diff --git a/relay/polkadot/src/weights/pallet_scheduler.rs b/relay/polkadot/src/weights/pallet_scheduler.rs index e2fed55924..68a44435d2 100644 --- a/relay/polkadot/src/weights/pallet_scheduler.rs +++ b/relay/polkadot/src/weights/pallet_scheduler.rs @@ -46,6 +46,73 @@ use core::marker::PhantomData; /// Weight functions for `pallet_scheduler`. pub struct WeightInfo(PhantomData); impl pallet_scheduler::WeightInfo for WeightInfo { +fn schedule_retry(s: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `159` + // Estimated: `110487` + // Minimum execution time: 14_155_000 picoseconds. + Weight::from_parts(16_447_031, 110487) + // Standard Error: 233 + .saturating_add(Weight::from_parts(8_424, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(4_u64)) + } + /// Storage: `Scheduler::Agenda` (r:1 w:0) + /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(107022), added: 109497, mode: `MaxEncodedLen`) + /// Storage: `Scheduler::Retries` (r:0 w:1) + /// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`) + fn set_retry() -> Weight { + // Proof Size summary in bytes: + // Measured: `81 + s * (177 ±0)` + // Estimated: `110487` + // Minimum execution time: 8_130_000 picoseconds. + Weight::from_parts(9_047_554, 110487) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } + /// Storage: `Scheduler::Lookup` (r:1 w:0) + /// Proof: `Scheduler::Lookup` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `Scheduler::Agenda` (r:1 w:0) + /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(107022), added: 109497, mode: `MaxEncodedLen`) + /// Storage: `Scheduler::Retries` (r:0 w:1) + /// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`) + fn set_retry_named() -> Weight { + // Proof Size summary in bytes: + // Measured: `647 + s * (178 ±0)` + // Estimated: `110487` + // Minimum execution time: 10_838_000 picoseconds. + Weight::from_parts(12_804_076, 110487) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } + /// Storage: `Scheduler::Agenda` (r:1 w:0) + /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(107022), added: 109497, mode: `MaxEncodedLen`) + /// Storage: `Scheduler::Retries` (r:0 w:1) + /// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`) + fn cancel_retry() -> Weight { + // Proof Size summary in bytes: + // Measured: `81 + s * (177 ±0)` + // Estimated: `110487` + // Minimum execution time: 8_130_000 picoseconds. + Weight::from_parts(9_047_554, 110487) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } + /// Storage: `Scheduler::Lookup` (r:1 w:0) + /// Proof: `Scheduler::Lookup` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `Scheduler::Agenda` (r:1 w:0) + /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(107022), added: 109497, mode: `MaxEncodedLen`) + /// Storage: `Scheduler::Retries` (r:0 w:1) + /// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`) + fn cancel_retry_named() -> Weight { + // Proof Size summary in bytes: + // Measured: `647 + s * (178 ±0)` + // Estimated: `110487` + // Minimum execution time: 10_838_000 picoseconds. + Weight::from_parts(12_804_076, 110487) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } /// Storage: `Scheduler::IncompleteSince` (r:1 w:1) /// Proof: `Scheduler::IncompleteSince` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) fn service_agendas_base() -> Weight { diff --git a/relay/polkadot/src/weights/pallet_staking.rs b/relay/polkadot/src/weights/pallet_staking.rs index d0906be2dc..0cd8e3dd14 100644 --- a/relay/polkadot/src/weights/pallet_staking.rs +++ b/relay/polkadot/src/weights/pallet_staking.rs @@ -45,7 +45,18 @@ use core::marker::PhantomData; /// Weight functions for `pallet_staking`. pub struct WeightInfo(PhantomData); -impl pallet_staking::WeightInfo for WeightInfo { +impl pallet_staking::WeightInfo for WeightInfo { + fn restore_ledger() -> Weight { + // Proof Size summary in bytes: + // Measured: `1014` + // Estimated: `4764` + // Minimum execution time: 40_258_000 picoseconds. + Weight::from_parts(41_210_000, 0) + .saturating_add(Weight::from_parts(0, 4764)) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(4)) + } + /// Storage: `Staking::Bonded` (r:1 w:1) /// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`) /// Storage: `Balances::Locks` (r:1 w:1) @@ -794,24 +805,4 @@ impl pallet_staking::WeightInfo for WeightInfo { .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: `Balances::Locks` (r:1 w:1) - /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1299), added: 3774, mode: `MaxEncodedLen`) - /// Storage: `System::Account` (r:1 w:1) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - /// Storage: `Staking::Bonded` (r:1 w:1) - /// Proof: `Staking::Bonded` (`max_values`: None, `max_size`: Some(72), added: 2547, mode: `MaxEncodedLen`) - /// Storage: `Staking::Ledger` (r:1 w:1) - /// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`) - /// Storage: `Balances::Freezes` (r:1 w:0) - /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(67), added: 2542, mode: `MaxEncodedLen`) - fn restore_ledger() -> Weight { - // Proof Size summary in bytes: - // Measured: `1014` - // Estimated: `4764` - // Minimum execution time: 40_258_000 picoseconds. - Weight::from_parts(41_210_000, 0) - .saturating_add(Weight::from_parts(0, 4764)) - .saturating_add(T::DbWeight::get().reads(5)) - .saturating_add(T::DbWeight::get().writes(4)) - } } diff --git a/relay/polkadot/src/weights/runtime_parachains_configuration.rs b/relay/polkadot/src/weights/runtime_parachains_configuration.rs index 4a11ee877a..367b1d260a 100644 --- a/relay/polkadot/src/weights/runtime_parachains_configuration.rs +++ b/relay/polkadot/src/weights/runtime_parachains_configuration.rs @@ -168,4 +168,15 @@ impl runtime_parachains::configuration::WeightInfo for .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) } + + fn set_config_with_scheduler_params() -> Weight { + // Proof Size summary in bytes: + // Measured: `151` + // Estimated: `1636` + // Minimum execution time: 7_913_000 picoseconds. + Weight::from_parts(8_338_000, 0) + .saturating_add(Weight::from_parts(0, 1636)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(1)) + } } diff --git a/relay/polkadot/src/xcm_config.rs b/relay/polkadot/src/xcm_config.rs index 33c9b56edd..2b1d9d8e54 100644 --- a/relay/polkadot/src/xcm_config.rs +++ b/relay/polkadot/src/xcm_config.rs @@ -205,6 +205,7 @@ pub struct XcmConfig; impl xcm_executor::Config for XcmConfig { type RuntimeCall = RuntimeCall; type XcmSender = XcmRouter; + type XcmRecorder = (); type AssetTransactor = LocalAssetTransactor; type OriginConverter = LocalOriginConverter; // Polkadot Relay recognises no chains which act as reserves. @@ -239,6 +240,9 @@ impl xcm_executor::Config for XcmConfig { type SafeCallFilter = Everything; type Aliasers = Nothing; type TransactionalProcessor = FrameTransactionalProcessor; + type HrmpNewChannelOpenRequestHandler = (); + type HrmpChannelAcceptedHandler = (); + type HrmpChannelClosingHandler = (); } parameter_types! { diff --git a/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml b/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml index d79bedb681..1184dfc2f2 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml +++ b/system-parachains/asset-hubs/asset-hub-kusama/Cargo.toml @@ -34,7 +34,7 @@ frame-try-runtime = { optional = true, workspace = true } pallet-asset-conversion-tx-payment = { workspace = true } pallet-assets = { workspace = true } pallet-asset-conversion = { workspace = true } -pallet-aura = { features = ["experimental"], workspace = true } +pallet-aura = { workspace = true } pallet-authorship = { workspace = true } pallet-balances = { workspace = true } pallet-message-queue = { workspace = true } @@ -85,14 +85,13 @@ xcm-executor = { workspace = true } # Cumulus cumulus-pallet-aura-ext = { workspace = true } cumulus-pallet-dmp-queue = { workspace = true } -cumulus-pallet-parachain-system = { features = [ - "parameterized-consensus-hook", -], workspace = true } +cumulus-pallet-parachain-system = { workspace = true } cumulus-pallet-session-benchmarking = { workspace = true } cumulus-pallet-xcm = { workspace = true } cumulus-pallet-xcmp-queue = { features = ["bridging"], workspace = true } cumulus-primitives-aura = { workspace = true } cumulus-primitives-core = { workspace = true } +cumulus-primitives-storage-weight-reclaim = { workspace = true } cumulus-primitives-utility = { workspace = true } pallet-collator-selection = { workspace = true } parachain-info = { workspace = true } @@ -209,6 +208,7 @@ std = [ "cumulus-pallet-xcmp-queue/std", "cumulus-primitives-aura/std", "cumulus-primitives-core/std", + "cumulus-primitives-storage-weight-reclaim/std", "cumulus-primitives-utility/std", "frame-benchmarking?/std", "frame-executive/std", 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 0c9d744316..09be6931df 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs @@ -56,7 +56,7 @@ use codec::{Decode, Encode, MaxEncodedLen}; use frame_support::{ construct_runtime, dispatch::DispatchClass, - genesis_builder_helper::{build_config, create_default_config}, + genesis_builder_helper::{build_state, get_preset}, ord_parameter_types, parameter_types, traits::{ fungible, fungibles, tokens::imbalance::ResolveAssetTo, AsEnsureOriginWithArg, ConstBool, @@ -192,6 +192,11 @@ impl frame_system::Config for Runtime { type SS58Prefix = SS58Prefix; type OnSetCode = cumulus_pallet_parachain_system::ParachainSetCode; type MaxConsumers = frame_support::traits::ConstU32<256>; + type SingleBlockMigrations = (); + type MultiBlockMigrator = (); + type PreInherents = (); + type PostInherents = (); + type PostTransactions = (); } impl pallet_timestamp::Config for Runtime { @@ -376,7 +381,7 @@ pub type LocalAndForeignAssets = fungibles::UnionOf< Assets, ForeignAssets, LocalFromLeft< - AssetIdForTrustBackedAssetsConvert, + AssetIdForTrustBackedAssetsConvert, AssetIdForTrustBackedAssets, xcm::v3::Location, >, @@ -393,6 +398,9 @@ pub type NativeAndAssets = fungible::UnionOf< AccountId, >; +pub type PoolIdToAccountId = + pallet_asset_conversion::AccountIdConverterNoSeed<(xcm::v3::Location, xcm::v3::Location)>; + impl pallet_asset_conversion::Config for Runtime { type RuntimeEvent = RuntimeEvent; type Balance = Balance; @@ -400,8 +408,12 @@ impl pallet_asset_conversion::Config for Runtime { type AssetKind = xcm::v3::Location; type Assets = NativeAndAssets; type PoolId = (Self::AssetKind, Self::AssetKind); - type PoolLocator = - pallet_asset_conversion::WithFirstAsset; + type PoolLocator = pallet_asset_conversion::WithFirstAsset< + KsmLocationV3, + AccountId, + Self::AssetKind, + PoolIdToAccountId, + >; type PoolAssetId = u32; type PoolAssets = PoolAssets; type PoolSetupFee = PoolSetupFee; @@ -707,6 +719,7 @@ impl parachain_info::Config for Runtime {} parameter_types! { pub MessageQueueServiceWeight: Weight = Perbill::from_percent(35) * RuntimeBlockWeights::get().max_block; + pub MessageQueueIdleServiceWeight: Weight = Perbill::from_percent(20) * RuntimeBlockWeights::get().max_block; } impl pallet_message_queue::Config for Runtime { @@ -729,6 +742,7 @@ impl pallet_message_queue::Config for Runtime { type HeapSize = sp_core::ConstU32<{ 64 * 1024 }>; type MaxStale = sp_core::ConstU32<8>; type ServiceWeight = MessageQueueServiceWeight; + type IdleMaxServiceWeight = MessageQueueIdleServiceWeight; } impl cumulus_pallet_aura_ext::Config for Runtime {} @@ -762,6 +776,10 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime { type VersionWrapper = PolkadotXcm; // Enqueue XCMP messages from siblings for later processing. type XcmpQueue = TransformOrigin; + type MaxActiveOutboundChannels = ConstU32<128>; + // Most on-chain HRMP channels are configured to use 102400 bytes of max message size, so we + // need to set the page size larger than that until we reduce the channel size on-chain. + type MaxPageSize = ConstU32<{ 103 * 1024 }>; type MaxInboundSuspended = sp_core::ConstU32<1_000>; type ControllerOrigin = EitherOfDiverse< EnsureRoot, @@ -772,6 +790,11 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime { type PriceForSiblingDelivery = PriceForSiblingParachainDelivery; } +impl cumulus_pallet_xcmp_queue::migration::v5::V5Config for Runtime { + // This must be the same as the `ChannelInfo` from the `Config`: + type ChannelList = ParachainSystem; +} + parameter_types! { pub const Period: u32 = 6 * HOURS; pub const Offset: u32 = 0; @@ -1033,6 +1056,7 @@ pub type SignedExtra = ( frame_system::CheckWeight, pallet_asset_conversion_tx_payment::ChargeAssetTxPayment, frame_metadata_hash_extension::CheckMetadataHash, + cumulus_primitives_storage_weight_reclaim::StorageWeightReclaim, ); /// Unchecked extrinsic type as expected by this runtime. pub type UncheckedExtrinsic = @@ -1046,6 +1070,7 @@ parameter_types! { pub type Migrations = ( frame_support::migrations::RemovePallet, pallet_collator_selection::migration::v2::MigrationToV2, + cumulus_pallet_xcmp_queue::migration::v5::MigrateV4ToV5, // permanent pallet_xcm::migration::MigrateToLatestXcmVersion, ); @@ -1099,7 +1124,7 @@ impl_runtime_apis! { } fn authorities() -> Vec { - Aura::authorities().into_inner() + pallet_aura::Authorities::::get().into_inner() } } @@ -1121,7 +1146,7 @@ impl_runtime_apis! { Executive::execute_block(block) } - fn initialize_block(header: &::Header) { + fn initialize_block(header: &::Header) -> sp_runtime::ExtrinsicInclusionMode { Executive::initialize_block(header) } } @@ -1305,12 +1330,16 @@ impl_runtime_apis! { } impl sp_genesis_builder::GenesisBuilder for Runtime { - fn create_default_config() -> Vec { - create_default_config::() + fn build_state(config: Vec) -> sp_genesis_builder::Result { + build_state::(config) } - fn build_config(config: Vec) -> sp_genesis_builder::Result { - build_config::(config) + fn get_preset(id: &Option) -> Option> { + get_preset::(id, |_| None) + } + + fn preset_names() -> Vec { + vec![] } } @@ -1376,7 +1405,7 @@ impl_runtime_apis! { use sp_storage::TrackedStorageKey; use xcm::latest::prelude::{ Asset, Fungible, Here, InteriorLocation, Junction, Junction::*, Location, NetworkId, - NonFungible, Parent, ParentThen, Response, XCM_VERSION, + NonFungible, Parent, ParentThen, Response, XCM_VERSION, Assets as XcmAssets, }; use frame_system_benchmarking::Pallet as SystemBench; @@ -1449,7 +1478,7 @@ impl_runtime_apis! { } fn set_up_complex_asset_transfer( - ) -> Option<(xcm::v4::Assets, u32, Location, Box)> { + ) -> Option<(XcmAssets, u32, Location, Box)> { // Transfer to Relay some local AH asset (local-reserve-transfer) while paying // fees using teleported native token. // (We don't care that Relay doesn't accept incoming unknown AH local asset) @@ -1480,7 +1509,7 @@ impl_runtime_apis! { ); let transfer_asset: Asset = (asset_location, asset_amount).into(); - let assets: xcm::v4::Assets = vec![fee_asset.clone(), transfer_asset].into(); + let assets: XcmAssets = vec![fee_asset.clone(), transfer_asset].into(); let fee_index = if assets.get(0).unwrap().eq(&fee_asset) { 0 } else { 1 }; // verify transferred successfully @@ -1516,30 +1545,26 @@ impl_runtime_apis! { fn valid_destination() -> Result { Ok(KsmLocation::get()) } - fn worst_case_holding(depositable_count: u32) -> xcm::v4::Assets { + fn worst_case_holding(depositable_count: u32) -> XcmAssets { // A mix of fungible, non-fungible, and concrete assets. let holding_non_fungibles = MaxAssetsIntoHolding::get() / 2 - depositable_count; - let holding_fungibles = holding_non_fungibles.saturating_sub(1); + let holding_fungibles = holding_non_fungibles.saturating_sub(2); // -2 for two `iter::once` bellow let fungibles_amount: u128 = 100; - let mut assets = (0..holding_fungibles) + (0..holding_fungibles) .map(|i| { Asset { id: AssetId(GeneralIndex(i as u128).into()), - fun: Fungible(fungibles_amount * i as u128), + fun: Fungible(fungibles_amount * (i + 1) as u128), // non-zero amount } }) .chain(core::iter::once(Asset { id: AssetId(Here.into()), fun: Fungible(u128::MAX) })) + .chain(core::iter::once(Asset { id: AssetId(KsmLocation::get()), fun: Fungible(1_000_000 * UNITS) })) .chain((0..holding_non_fungibles).map(|i| Asset { id: AssetId(GeneralIndex(i as u128).into()), fun: NonFungible(asset_instance_from(i)), })) - .collect::>(); - - assets.push(Asset { - id: AssetId(KsmLocation::get()), - fun: Fungible(1_000_000 * UNITS), - }); - assets.into() + .collect::>() + .into() } } @@ -1581,7 +1606,7 @@ impl_runtime_apis! { (0u64, Response::Version(Default::default())) } - fn worst_case_asset_exchange() -> Result<(xcm::v4::Assets, xcm::v4::Assets), BenchmarkError> { + fn worst_case_asset_exchange() -> Result<(XcmAssets, XcmAssets), BenchmarkError> { Err(BenchmarkError::Skip) } @@ -1598,9 +1623,9 @@ impl_runtime_apis! { Ok(KsmLocation::get()) } - fn claimable_asset() -> Result<(Location, Location, xcm::v4::Assets), BenchmarkError> { + fn claimable_asset() -> Result<(Location, Location, XcmAssets), BenchmarkError> { let origin = KsmLocation::get(); - let assets: xcm::v4::Assets = (AssetId(KsmLocation::get()), 1_000 * UNITS).into(); + let assets: XcmAssets = (AssetId(KsmLocation::get()), 1_000 * UNITS).into(); let ticket = Location { parents: 0, interior: Here }; Ok((origin, ticket, assets)) } diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_asset_conversion.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_asset_conversion.rs index b6211dcf42..4a987d8bac 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_asset_conversion.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_asset_conversion.rs @@ -46,6 +46,17 @@ use core::marker::PhantomData; /// Weight functions for `pallet_asset_conversion`. pub struct WeightInfo(PhantomData); impl pallet_asset_conversion::WeightInfo for WeightInfo { + fn touch(n: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `1571` + // Estimated: `6360` + // Minimum execution time: 381_000_000 picoseconds. + Weight::from_parts(398_540_909, 6360) + // Standard Error: 1_330_283 + .saturating_add(Weight::from_parts(209_463_636, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(7_u64)) + .saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(n.into()))) + } /// Storage: `AssetConversion::Pools` (r:1 w:1) /// Proof: `AssetConversion::Pools` (`max_values`: None, `max_size`: Some(1224), added: 3699, mode: `MaxEncodedLen`) /// Storage: `System::Account` (r:1 w:1) diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_balances.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_balances.rs index 5c69e7d951..b92b7690d9 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_balances.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_balances.rs @@ -148,6 +148,23 @@ impl pallet_balances::WeightInfo for WeightInfo { } /// Storage: `Balances::InactiveIssuance` (r:1 w:0) /// Proof: `Balances::InactiveIssuance` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) + fn burn_allow_death() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 27_491_000 picoseconds. + Weight::from_parts(28_444_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + fn burn_keep_alive() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 18_290_000 picoseconds. + Weight::from_parts(19_227_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + fn force_adjust_total_issuance() -> Weight { // Proof Size summary in bytes: // Measured: `0` 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 d852045290..3816c9d020 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 @@ -154,6 +154,7 @@ pub type ForeignAssetsConvertedConcreteId = assets_common::ForeignAssetsConverte StartsWithExplicitGlobalConsensus, ), Balance, + xcm::v3::Location, >; /// Means for transacting foreign assets from different global consensus. @@ -301,6 +302,7 @@ pub struct XcmConfig; impl xcm_executor::Config for XcmConfig { type RuntimeCall = RuntimeCall; type XcmSender = XcmRouter; + type XcmRecorder = (); type AssetTransactor = AssetTransactors; type OriginConverter = XcmOriginToTransactDispatchOrigin; // Asset Hub trusts only particular, pre-configured bridged locations from a different consensus @@ -335,7 +337,11 @@ impl xcm_executor::Config for XcmConfig { WeightToFee, NativeAndAssets, ( - TrustBackedAssetsAsLocation, + TrustBackedAssetsAsLocation< + TrustBackedAssetsPalletLocation, + Balance, + xcm::v3::Location, + >, ForeignAssetsConvertedConcreteId, ), ResolveAssetTo, @@ -387,6 +393,9 @@ impl xcm_executor::Config for XcmConfig { type SafeCallFilter = Everything; type Aliasers = Nothing; type TransactionalProcessor = FrameTransactionalProcessor; + type HrmpNewChannelOpenRequestHandler = (); + type HrmpChannelAcceptedHandler = (); + type HrmpChannelClosingHandler = (); } /// Converts a local signed origin into an XCM location. 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 e0d387532c..b839b1f5d3 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/tests/tests.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/tests/tests.rs @@ -43,14 +43,14 @@ use system_parachains_constants::kusama::{ consensus::RELAY_CHAIN_SLOT_DURATION_MILLIS, fee::WeightToFee, }; use xcm::latest::prelude::{Assets as XcmAssets, *}; -use xcm_builder::V4V3LocationConverter; +use xcm_builder::WithLatestLocationConverter; use xcm_executor::traits::{ConvertLocation, JustTry}; const ALICE: [u8; 32] = [1u8; 32]; const SOME_ASSET_ADMIN: [u8; 32] = [5u8; 32]; type AssetIdForTrustBackedAssetsConvertLatest = - assets_common::AssetIdForTrustBackedAssetsConvertLatest; + assets_common::AssetIdForTrustBackedAssetsConvert; type RuntimeHelper = asset_test_utils::RuntimeHelper; @@ -241,7 +241,7 @@ fn test_assets_balances_api_works() { .into()))); // check foreign asset assert!(result.inner().iter().any(|asset| asset.eq(&( - V4V3LocationConverter::convert_back(&foreign_asset_id_location).unwrap(), + WithLatestLocationConverter::convert_back(&foreign_asset_id_location).unwrap(), 6 * foreign_asset_minimum_asset_balance ) .into()))); @@ -354,7 +354,7 @@ asset_test_utils::include_create_and_manage_foreign_assets_for_local_consensus_p ForeignCreatorsSovereignAccountOf, ForeignAssetsInstance, xcm::v3::Location, - V4V3LocationConverter, + WithLatestLocationConverter, collator_session_keys(), ExistentialDeposit::get(), AssetDeposit::get(), diff --git a/system-parachains/asset-hubs/asset-hub-kusama/tests/weight_trader.rs b/system-parachains/asset-hubs/asset-hub-kusama/tests/weight_trader.rs index d6fefa1f27..dc79c0c4e8 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/tests/weight_trader.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/tests/weight_trader.rs @@ -54,7 +54,7 @@ const SOME_ASSET_ADMIN: [u8; 32] = [5u8; 32]; type RuntimeHelper = asset_test_utils::RuntimeHelper; type AssetIdForTrustBackedAssetsConvertLatest = - assets_common::AssetIdForTrustBackedAssetsConvertLatest; + assets_common::AssetIdForTrustBackedAssetsConvert; #[test] fn test_asset_xcm_trader() { @@ -469,6 +469,7 @@ fn test_buy_and_refund_weight_with_swap_local_asset_xcm_trader() { let native_location = KsmLocationV3::get(); let asset_1_location = AssetIdForTrustBackedAssetsConvert::< TrustBackedAssetsPalletLocationV3, + xcm::v3::Location, >::convert_back(&asset_1) .unwrap(); // bob's initial balance for native and `asset1` assets. diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml b/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml index 56aa03c2a9..4dce9f6a45 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml +++ b/system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml @@ -35,7 +35,7 @@ frame-try-runtime = { optional = true, workspace = true } pallet-asset-conversion-tx-payment = { workspace = true } pallet-asset-conversion = { workspace = true } pallet-assets = { workspace = true } -pallet-aura = { features = ["experimental"], workspace = true } +pallet-aura = { workspace = true } pallet-authorship = { workspace = true } pallet-balances = { workspace = true } pallet-message-queue = { workspace = true } @@ -84,9 +84,7 @@ xcm-executor = { workspace = true } # Cumulus cumulus-pallet-aura-ext = { workspace = true } -cumulus-pallet-parachain-system = { features = [ - "parameterized-consensus-hook", -], workspace = true } +cumulus-pallet-parachain-system = { workspace = true } cumulus-pallet-session-benchmarking = { workspace = true } cumulus-pallet-xcm = { workspace = true } cumulus-pallet-xcmp-queue = { features = ["bridging"], workspace = true } 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 e0bc895072..68a3bfb318 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/impls.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/impls.rs @@ -15,64 +15,6 @@ use crate::*; -// TODO: the types in the module copied from the PR: https://github.com/paritytech/polkadot-sdk/pull/3250 -// and should be removed when changes from the PR will get released. -pub(crate) mod pool { - use super::*; - use core::marker::PhantomData; - use pallet_asset_conversion::PoolLocator; - use sp_core::Get; - use sp_runtime::traits::{TrailingZeroInput, TryConvert}; - - /// Pool locator that mandates the inclusion of the specified `FirstAsset` in every asset pair. - /// - /// The `PoolId` is represented as a tuple of `AssetKind`s with `FirstAsset` always positioned - /// as the first element. - pub struct WithFirstAsset( - PhantomData<(FirstAsset, AccountId, AssetKind, AccountIdConverter)>, - ); - impl - PoolLocator - for WithFirstAsset - where - AssetKind: Eq + Clone + Encode, - AccountId: Decode, - FirstAsset: Get, - AccountIdConverter: for<'a> TryConvert<&'a (AssetKind, AssetKind), AccountId>, - { - fn pool_id(asset1: &AssetKind, asset2: &AssetKind) -> Result<(AssetKind, AssetKind), ()> { - if asset1 == asset2 { - return Err(()); - } - let first = FirstAsset::get(); - if first == *asset1 { - Ok((first, asset2.clone())) - } else if first == *asset2 { - Ok((first, asset1.clone())) - } else { - Err(()) - } - } - fn address(id: &(AssetKind, AssetKind)) -> Result { - AccountIdConverter::try_convert(id).map_err(|_| ()) - } - } - - /// `PoolId` to `AccountId` conversion. - pub struct AccountIdConverter(PhantomData<(Seed, PoolId)>); - impl TryConvert<&PoolId, AccountId> for AccountIdConverter - where - PoolId: Encode, - AccountId: Decode, - Seed: Get, - { - fn try_convert(id: &PoolId) -> Result { - sp_io::hashing::blake2_256(&Encode::encode(&(Seed::get(), id))[..]) - .using_encoded(|e| Decode::decode(&mut TrailingZeroInput::new(e)).map_err(|_| id)) - } - } -} - // TODO: move implementations to the polkadot-sdk. pub mod tx_payment { use super::*; 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 0a21b565b4..f163a6bcfa 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs @@ -90,7 +90,7 @@ use codec::{Decode, Encode, MaxEncodedLen}; use frame_support::{ construct_runtime, dispatch::DispatchClass, - genesis_builder_helper::{build_config, create_default_config}, + genesis_builder_helper::{build_state, get_preset}, parameter_types, traits::{ fungible, fungibles, tokens::imbalance::ResolveAssetTo, AsEnsureOriginWithArg, ConstBool, @@ -210,6 +210,11 @@ impl frame_system::Config for Runtime { type SS58Prefix = SS58Prefix; type OnSetCode = cumulus_pallet_parachain_system::ParachainSetCode; type MaxConsumers = frame_support::traits::ConstU32<64>; + type SingleBlockMigrations = (); + type MultiBlockMigrator = (); + type PreInherents = (); + type PostInherents = (); + type PostTransactions = (); } impl pallet_timestamp::Config for Runtime { @@ -633,6 +638,7 @@ impl parachain_info::Config for Runtime {} parameter_types! { pub MessageQueueServiceWeight: Weight = Perbill::from_percent(35) * RuntimeBlockWeights::get().max_block; + pub MessageQueueIdleServiceWeight: Weight = Perbill::from_percent(20) * RuntimeBlockWeights::get().max_block; } impl pallet_message_queue::Config for Runtime { @@ -655,6 +661,7 @@ impl pallet_message_queue::Config for Runtime { type HeapSize = sp_core::ConstU32<{ 64 * 1024 }>; type MaxStale = sp_core::ConstU32<8>; type ServiceWeight = MessageQueueServiceWeight; + type IdleMaxServiceWeight = MessageQueueIdleServiceWeight; } impl cumulus_pallet_aura_ext::Config for Runtime {} @@ -689,6 +696,10 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime { type VersionWrapper = PolkadotXcm; // Enqueue XCMP messages from siblings for later processing. type XcmpQueue = TransformOrigin; + type MaxActiveOutboundChannels = ConstU32<128>; + // Most on-chain HRMP channels are configured to use 102400 bytes of max message size, so we + // need to set the page size larger than that until we reduce the channel size on-chain. + type MaxPageSize = ConstU32<{ 103 * 1024 }>; type MaxInboundSuspended = sp_core::ConstU32<1_000>; type ControllerOrigin = EitherOfDiverse< EnsureRoot, @@ -698,6 +709,11 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime { type PriceForSiblingDelivery = PriceForSiblingParachainDelivery; } +impl cumulus_pallet_xcmp_queue::migration::v5::V5Config for Runtime { + // This must be the same as the `ChannelInfo` from the `Config`: + type ChannelList = ParachainSystem; +} + parameter_types! { pub const Period: u32 = 6 * HOURS; pub const Offset: u32 = 0; @@ -891,7 +907,7 @@ pub type LocalAndForeignAssets = fungibles::UnionOf< Assets, ForeignAssets, LocalFromLeft< - AssetIdForTrustBackedAssetsConvert, + AssetIdForTrustBackedAssetsConvert, AssetIdForTrustBackedAssets, xcm::v3::Location, >, @@ -916,6 +932,11 @@ parameter_types! { pub const PoolSetupFee: Balance = system_para_deposit(1, 4) + AssetDeposit::get(); } +pub type PoolIdToAccountId = pallet_asset_conversion::AccountIdConverter< + AssetConversionPalletId, + (xcm::v3::Location, xcm::v3::Location), +>; + impl pallet_asset_conversion::Config for Runtime { type RuntimeEvent = RuntimeEvent; type Balance = Balance; @@ -923,11 +944,11 @@ impl pallet_asset_conversion::Config for Runtime { type AssetKind = xcm::v3::Location; type Assets = NativeAndAssets; type PoolId = (Self::AssetKind, Self::AssetKind); - type PoolLocator = impls::pool::WithFirstAsset< + type PoolLocator = pallet_asset_conversion::WithFirstAsset< DotLocationV3, AccountId, Self::AssetKind, - impls::pool::AccountIdConverter, + PoolIdToAccountId, >; type PoolAssetId = u32; type PoolAssets = PoolAssets; @@ -1030,6 +1051,7 @@ pub type Migrations = ( frame_support::migrations::RemovePallet, cumulus_pallet_xcmp_queue::migration::v4::MigrationToV4, pallet_collator_selection::migration::v2::MigrationToV2, + cumulus_pallet_xcmp_queue::migration::v5::MigrateV4ToV5, // permanent pallet_xcm::migration::MigrateToLatestXcmVersion, ); @@ -1082,7 +1104,7 @@ impl_runtime_apis! { } fn authorities() -> Vec { - Aura::authorities().into_inner() + pallet_aura::Authorities::::get().into_inner() } } @@ -1104,7 +1126,7 @@ impl_runtime_apis! { Executive::execute_block(block) } - fn initialize_block(header: &::Header) { + fn initialize_block(header: &::Header) -> sp_runtime::ExtrinsicInclusionMode { Executive::initialize_block(header) } } @@ -1269,12 +1291,16 @@ impl_runtime_apis! { } impl sp_genesis_builder::GenesisBuilder for Runtime { - fn create_default_config() -> Vec { - create_default_config::() + fn build_state(config: Vec) -> sp_genesis_builder::Result { + build_state::(config) + } + + fn get_preset(id: &Option) -> Option> { + get_preset::(id, |_| None) } - fn build_config(config: Vec) -> sp_genesis_builder::Result { - build_config::(config) + fn preset_names() -> Vec { + vec![] } } @@ -1377,7 +1403,7 @@ impl_runtime_apis! { use sp_storage::TrackedStorageKey; use xcm::latest::prelude::{ Asset, Fungible, Here, InteriorLocation, Junction, Junction::*, Location, NetworkId, - NonFungible, Parent, ParentThen, Response, XCM_VERSION, + NonFungible, Parent, ParentThen, Response, XCM_VERSION, Assets as XcmAssets, }; use frame_system_benchmarking::Pallet as SystemBench; @@ -1450,7 +1476,7 @@ impl_runtime_apis! { } fn set_up_complex_asset_transfer( - ) -> Option<(xcm::v4::Assets, u32, Location, Box)> { + ) -> Option<(XcmAssets, u32, Location, Box)> { // Transfer to Relay some local AH asset (local-reserve-transfer) while paying // fees using teleported native token. // (We don't care that Relay doesn't accept incoming unknown AH local asset) @@ -1481,7 +1507,7 @@ impl_runtime_apis! { ); let transfer_asset: Asset = (asset_location, asset_amount).into(); - let assets: xcm::v4::Assets = vec![fee_asset.clone(), transfer_asset].into(); + let assets: XcmAssets = vec![fee_asset.clone(), transfer_asset].into(); let fee_index = if assets.get(0).unwrap().eq(&fee_asset) { 0 } else { 1 }; // verify transferred successfully @@ -1517,30 +1543,26 @@ impl_runtime_apis! { fn valid_destination() -> Result { Ok(DotLocation::get()) } - fn worst_case_holding(depositable_count: u32) -> xcm::v4::Assets { + fn worst_case_holding(depositable_count: u32) -> XcmAssets { // A mix of fungible, non-fungible, and concrete assets. let holding_non_fungibles = MaxAssetsIntoHolding::get() / 2 - depositable_count; - let holding_fungibles = holding_non_fungibles - 1; + let holding_fungibles = holding_non_fungibles.saturating_sub(2); // -2 for two `iter::once` bellow let fungibles_amount: u128 = 100; - let mut assets = (0..holding_fungibles) + (0..holding_fungibles) .map(|i| { Asset { id: AssetId(GeneralIndex(i as u128).into()), - fun: Fungible(fungibles_amount * i as u128), + fun: Fungible(fungibles_amount * (i + 1) as u128), // non-zero amount } }) .chain(core::iter::once(Asset { id: AssetId(Here.into()), fun: Fungible(u128::MAX) })) + .chain(core::iter::once(Asset { id: AssetId(DotLocation::get()), fun: Fungible(1_000_000 * UNITS) })) .chain((0..holding_non_fungibles).map(|i| Asset { id: AssetId(GeneralIndex(i as u128).into()), fun: NonFungible(asset_instance_from(i)), })) - .collect::>(); - - assets.push(Asset { - id: AssetId(DotLocation::get()), - fun: Fungible(1_000_000 * UNITS), - }); - assets.into() + .collect::>() + .into() } } @@ -1582,7 +1604,7 @@ impl_runtime_apis! { (0u64, Response::Version(Default::default())) } - fn worst_case_asset_exchange() -> Result<(xcm::v4::Assets, xcm::v4::Assets), BenchmarkError> { + fn worst_case_asset_exchange() -> Result<(XcmAssets, XcmAssets), BenchmarkError> { Err(BenchmarkError::Skip) } @@ -1599,9 +1621,9 @@ impl_runtime_apis! { Ok(DotLocation::get()) } - fn claimable_asset() -> Result<(Location, Location, xcm::v4::Assets), BenchmarkError> { + fn claimable_asset() -> Result<(Location, Location, XcmAssets), BenchmarkError> { let origin = DotLocation::get(); - let assets: xcm::v4::Assets = (AssetId(DotLocation::get()), 1_000 * UNITS).into(); + let assets: XcmAssets = (AssetId(DotLocation::get()), 1_000 * UNITS).into(); let ticket = Location { parents: 0, interior: Here }; Ok((origin, ticket, assets)) } diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_asset_conversion.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_asset_conversion.rs index fe5d1c6b08..150be5793b 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_asset_conversion.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_asset_conversion.rs @@ -46,6 +46,17 @@ use core::marker::PhantomData; /// Weight functions for `pallet_asset_conversion`. pub struct WeightInfo(PhantomData); impl pallet_asset_conversion::WeightInfo for WeightInfo { + fn touch(n: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `1571` + // Estimated: `6360` + // Minimum execution time: 381_000_000 picoseconds. + Weight::from_parts(398_540_909, 6360) + // Standard Error: 1_330_283 + .saturating_add(Weight::from_parts(209_463_636, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(7_u64)) + .saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(n.into()))) + } /// Storage: `AssetConversion::Pools` (r:1 w:1) /// Proof: `AssetConversion::Pools` (`max_values`: None, `max_size`: Some(1224), added: 3699, mode: `MaxEncodedLen`) /// Storage: `System::Account` (r:1 w:1) diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_balances.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_balances.rs index 655a620446..1eebeb4041 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_balances.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_balances.rs @@ -148,6 +148,23 @@ impl pallet_balances::WeightInfo for WeightInfo { } /// Storage: `Balances::InactiveIssuance` (r:1 w:0) /// Proof: `Balances::InactiveIssuance` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) + fn burn_allow_death() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 27_491_000 picoseconds. + Weight::from_parts(28_444_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + fn burn_keep_alive() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 18_290_000 picoseconds. + Weight::from_parts(19_227_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + fn force_adjust_total_issuance() -> Weight { // Proof Size summary in bytes: // Measured: `0` 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 dfce27d97a..66fbf44c88 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 @@ -153,6 +153,7 @@ pub type ForeignAssetsConvertedConcreteId = assets_common::ForeignAssetsConverte StartsWithExplicitGlobalConsensus, ), Balance, + xcm::v3::Location, >; /// Means for transacting foreign assets from different global consensus. @@ -363,6 +364,7 @@ pub struct XcmConfig; impl xcm_executor::Config for XcmConfig { type RuntimeCall = RuntimeCall; type XcmSender = XcmRouter; + type XcmRecorder = (); type AssetTransactor = AssetTransactors; type OriginConverter = XcmOriginToTransactDispatchOrigin; // Asset Hub trusts only particular, pre-configured bridged locations from a different consensus @@ -397,7 +399,11 @@ impl xcm_executor::Config for XcmConfig { WeightToFee, NativeAndAssets, ( - TrustBackedAssetsAsLocation, + TrustBackedAssetsAsLocation< + TrustBackedAssetsPalletLocation, + Balance, + xcm::v3::Location, + >, ForeignAssetsConvertedConcreteId, ), ResolveAssetTo, @@ -449,6 +455,9 @@ impl xcm_executor::Config for XcmConfig { type SafeCallFilter = Everything; type Aliasers = Nothing; type TransactionalProcessor = FrameTransactionalProcessor; + type HrmpNewChannelOpenRequestHandler = (); + type HrmpChannelAcceptedHandler = (); + type HrmpChannelClosingHandler = (); } /// Converts a local signed origin into an XCM location. 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 b561355149..7da4172102 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/tests/tests.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/tests/tests.rs @@ -45,14 +45,14 @@ use system_parachains_constants::{ kusama::consensus::RELAY_CHAIN_SLOT_DURATION_MILLIS, polkadot::fee::WeightToFee, }; use xcm::latest::prelude::{Assets as XcmAssets, *}; -use xcm_builder::V4V3LocationConverter; +use xcm_builder::WithLatestLocationConverter; use xcm_executor::traits::{ConvertLocation, JustTry}; const ALICE: [u8; 32] = [1u8; 32]; const SOME_ASSET_ADMIN: [u8; 32] = [5u8; 32]; type AssetIdForTrustBackedAssetsConvertLatest = - assets_common::AssetIdForTrustBackedAssetsConvertLatest; + assets_common::AssetIdForTrustBackedAssetsConvert; type RuntimeHelper = asset_test_utils::RuntimeHelper; @@ -243,7 +243,7 @@ fn test_assets_balances_api_works() { .into()))); // check foreign asset assert!(result.inner().iter().any(|asset| asset.eq(&( - V4V3LocationConverter::convert_back(&foreign_asset_id_location).unwrap(), + WithLatestLocationConverter::convert_back(&foreign_asset_id_location).unwrap(), 6 * foreign_asset_minimum_asset_balance ) .into()))); @@ -356,7 +356,7 @@ asset_test_utils::include_create_and_manage_foreign_assets_for_local_consensus_p ForeignCreatorsSovereignAccountOf, ForeignAssetsInstance, xcm::v3::Location, - V4V3LocationConverter, + WithLatestLocationConverter, collator_session_keys(), ExistentialDeposit::get(), AssetDeposit::get(), diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/tests/weight_trader.rs b/system-parachains/asset-hubs/asset-hub-polkadot/tests/weight_trader.rs index a7732b0812..2905aef046 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/tests/weight_trader.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/tests/weight_trader.rs @@ -46,7 +46,7 @@ const SOME_ASSET_ADMIN: [u8; 32] = [5u8; 32]; type RuntimeHelper = asset_test_utils::RuntimeHelper; type AssetIdForTrustBackedAssetsConvertLatest = - assets_common::AssetIdForTrustBackedAssetsConvertLatest; + assets_common::AssetIdForTrustBackedAssetsConvert; #[test] fn test_asset_xcm_trader() { @@ -473,6 +473,7 @@ fn test_buy_and_refund_weight_with_swap_local_asset_xcm_trader() { let native_location = DotLocationV3::get(); let asset_1_location = AssetIdForTrustBackedAssetsConvert::< TrustBackedAssetsPalletLocationV3, + xcm::v3::Location, >::convert_back(&asset_1) .unwrap(); // bob's initial balance for native and `asset1` assets. diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml b/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml index 410d201191..6eb8dea2a9 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/Cargo.toml @@ -17,6 +17,7 @@ hex-literal = { workspace = true } log = { workspace = true } scale-info = { features = ["derive"], workspace = true } serde = { optional = true, features = ["derive"], workspace = true } +tuplex = { workspace = true } # Local bp-asset-hub-kusama = { workspace = true } @@ -35,7 +36,7 @@ frame-system = { workspace = true } frame-system-benchmarking = { optional = true, workspace = true } frame-system-rpc-runtime-api = { workspace = true } frame-try-runtime = { optional = true, workspace = true } -pallet-aura = { features = ["experimental"], workspace = true } +pallet-aura = { workspace = true } pallet-authorship = { workspace = true } pallet-balances = { workspace = true } pallet-message-queue = { workspace = true } @@ -73,14 +74,13 @@ xcm-executor = { workspace = true } # Cumulus cumulus-pallet-aura-ext = { workspace = true } cumulus-pallet-dmp-queue = { workspace = true } -cumulus-pallet-parachain-system = { features = [ - "parameterized-consensus-hook", -], workspace = true } +cumulus-pallet-parachain-system = { workspace = true } cumulus-pallet-session-benchmarking = { workspace = true } cumulus-pallet-xcm = { workspace = true } cumulus-pallet-xcmp-queue = { features = ["bridging"], workspace = true } cumulus-primitives-aura = { workspace = true } cumulus-primitives-core = { workspace = true } +cumulus-primitives-storage-weight-reclaim = { workspace = true } cumulus-primitives-utility = { workspace = true } pallet-collator-selection = { workspace = true } parachain-info = { workspace = true } @@ -96,6 +96,7 @@ bp-relayers = { workspace = true } bp-runtime = { workspace = true } bp-kusama = { workspace = true } bp-polkadot = { workspace = true } +bp-polkadot-bulletin = { workspace = true } bridge-hub-common = { workspace = true } bridge-runtime-common = { workspace = true } pallet-bridge-grandpa = { workspace = true } @@ -152,6 +153,7 @@ std = [ "cumulus-pallet-xcmp-queue/std", "cumulus-primitives-aura/std", "cumulus-primitives-core/std", + "cumulus-primitives-storage-weight-reclaim/std", "cumulus-primitives-utility/std", "frame-benchmarking?/std", "frame-executive/std", @@ -218,6 +220,8 @@ std = [ "xcm-builder/std", "xcm-executor/std", "xcm/std", + "bp-polkadot-bulletin/std", + "tuplex/std" ] runtime-benchmarks = [ 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 917e9bf7e6..b3c243a732 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 @@ -61,6 +61,7 @@ impl Chain for BridgeHubKusama { impl Parachain for BridgeHubKusama { const PARACHAIN_ID: u32 = BRIDGE_HUB_KUSAMA_PARACHAIN_ID; + const MAX_HEADER_SIZE: u32 = MAX_BRIDGE_HUB_HEADER_SIZE; } impl ChainWithMessages for BridgeHubKusama { @@ -102,11 +103,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 = 56_375_433_121; + pub const BridgeHubKusamaBaseDeliveryFeeInKsms: u128 = 3_140_827_287; /// 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 = 53_809_198_573; + pub const BridgeHubKusamaBaseConfirmationFeeInKsms: u128 = 574_592_739; } /// 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 cfcb735c53..0c61f2f660 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 @@ -26,6 +26,10 @@ 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}, @@ -36,10 +40,6 @@ use bridge_runtime_common::{ SenderAndLane, XcmAsPlainPayload, XcmBlobHauler, XcmBlobHaulerAdapter, XcmBlobMessageDispatch, XcmVersionOfDestAndRemoteBridge, }, - refund_relayer_extension::{ - ActualFeeRefund, RefundBridgedParachainMessages, RefundSignedExtensionAdapter, - RefundableMessagesLane, RefundableParachain, - }, }; use frame_support::{parameter_types, traits::PalletInfoAccess}; use kusama_runtime_constants as constants; @@ -150,11 +150,12 @@ parameter_types! { pub const RelayerStakeReserveId: [u8; 8] = *b"brdgrlrs"; /// Minimal period of relayer registration. Roughly, it is the 1 hour of real time. pub const RelayerStakeLease: u32 = 300; - /// Priority boost that the registered relayer receives for every additional message in the message - /// delivery transaction. - /// - /// It is determined semi-automatically - see `FEE_BOOST_PER_MESSAGE` constant to get the - /// meaning of this value + + // see the `FEE_BOOST_PER_RELAY_HEADER` constant get the meaning of this value + pub PriorityBoostPerRelayHeader: u64 = 20_004_884_004_884; + // see the `FEE_BOOST_PER_PARACHAIN_HEADER` constant get the meaning of this value + pub PriorityBoostPerParachainHeader: u64 = 1_060_258_852_258_852; + // see the `FEE_BOOST_PER_MESSAGE` constant to get the meaning of this value pub PriorityBoostPerMessage: u64 = 182_044_444_444_444; } @@ -163,8 +164,9 @@ pub type BridgeGrandpaPolkadotInstance = pallet_bridge_grandpa::Instance1; impl pallet_bridge_grandpa::Config for Runtime { type RuntimeEvent = RuntimeEvent; type BridgedChain = bp_polkadot::Polkadot; - type MaxFreeMandatoryHeadersPerBlock = ConstU32<4>; type HeadersToKeep = RelayChainHeadersToKeep; + type MaxFreeHeadersPerBlock = ConstU32<4>; + type FreeHeadersInterval = ConstU32<5>; type WeightInfo = weights::pallet_bridge_grandpa::WeightInfo; } @@ -361,6 +363,10 @@ mod tests { /// We want this tip to be large enough (delivery transactions with more messages = less /// operational costs and a faster bridge), so this value should be significant. const FEE_BOOST_PER_MESSAGE: Balance = 2 * constants::currency::UNITS; + // see `FEE_BOOST_PER_MESSAGE` comment + const FEE_BOOST_PER_RELAY_HEADER: Balance = 2 * constants::currency::UNITS; + // see `FEE_BOOST_PER_MESSAGE` comment + const FEE_BOOST_PER_PARACHAIN_HEADER: Balance = 2 * constants::currency::UNITS; #[test] fn ensure_bridge_hub_kusama_message_lane_weights_are_correct() { @@ -414,7 +420,19 @@ mod tests { }, }); - bridge_runtime_common::priority_calculator::ensure_priority_boost_is_sane::< + bridge_runtime_common::extensions::priority_calculator::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::< + Runtime, + RefundableParachain, + PriorityBoostPerParachainHeader, + >(FEE_BOOST_PER_PARACHAIN_HEADER); + + bridge_runtime_common::extensions::priority_calculator::per_message::ensure_priority_boost_is_sane::< Runtime, WithBridgeHubPolkadotMessagesInstance, PriorityBoostPerMessage, 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 86863765d5..48fa7da454 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs @@ -41,7 +41,7 @@ use sp_api::impl_runtime_apis; use sp_core::{crypto::KeyTypeId, OpaqueMetadata}; use sp_runtime::{ create_runtime_str, generic, impl_opaque_keys, - traits::{AccountIdLookup, BlakeTwo256, Block as BlockT}, + traits::{AccountIdLookup, BlakeTwo256, Block as BlockT, Get}, transaction_validity::{TransactionSource, TransactionValidity}, ApplyExtrinsicResult, }; @@ -54,7 +54,7 @@ use sp_version::RuntimeVersion; use frame_support::{ construct_runtime, dispatch::DispatchClass, - genesis_builder_helper::{build_config, create_default_config}, + genesis_builder_helper::{build_state, get_preset}, parameter_types, traits::{ tokens::imbalance::ResolveTo, ConstBool, ConstU32, ConstU64, ConstU8, EitherOfDiverse, @@ -117,6 +117,7 @@ pub type SignedExtra = ( BridgeRejectObsoleteHeadersAndMessages, bridge_to_polkadot_config::RefundBridgeHubPolkadotMessages, frame_metadata_hash_extension::CheckMetadataHash, + cumulus_primitives_storage_weight_reclaim::StorageWeightReclaim, ); bridge_runtime_common::generate_bridge_reject_obsolete_headers_and_messages! { @@ -141,6 +142,7 @@ parameter_types! { pub type Migrations = ( frame_support::migrations::RemovePallet, pallet_collator_selection::migration::v2::MigrationToV2, + cumulus_pallet_xcmp_queue::migration::v5::MigrateV4ToV5, // permanent pallet_xcm::migration::MigrateToLatestXcmVersion, ); @@ -252,6 +254,11 @@ impl frame_system::Config for Runtime { /// The action to take on a Runtime Upgrade type OnSetCode = cumulus_pallet_parachain_system::ParachainSetCode; type MaxConsumers = ConstU32<16>; + type SingleBlockMigrations = (); + type MultiBlockMigrator = (); + type PreInherents = (); + type PostInherents = (); + type PostTransactions = (); } impl pallet_timestamp::Config for Runtime { @@ -339,6 +346,7 @@ parameter_types! { /// extrinsics. The `force_checkpoint` and `submit` extrinsics (for submit, optionally) includes /// the sync committee's pubkeys (512 x 48 bytes). pub MessageQueueServiceWeight: Weight = Perbill::from_percent(60) * RuntimeBlockWeights::get().max_block; + pub MessageQueueIdleServiceWeight: Weight = Perbill::from_percent(20) * RuntimeBlockWeights::get().max_block; } impl pallet_message_queue::Config for Runtime { @@ -367,6 +375,7 @@ impl pallet_message_queue::Config for Runtime { type HeapSize = sp_core::ConstU32<{ 64 * 1024 }>; type MaxStale = sp_core::ConstU32<8>; type ServiceWeight = MessageQueueServiceWeight; + type IdleMaxServiceWeight = MessageQueueIdleServiceWeight; } impl cumulus_pallet_aura_ext::Config for Runtime {} @@ -406,6 +415,10 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime { type VersionWrapper = PolkadotXcm; // Enqueue XCMP messages from siblings for later processing. type XcmpQueue = TransformOrigin; + type MaxActiveOutboundChannels = ConstU32<128>; + // Most on-chain HRMP channels are configured to use 102400 bytes of max message size, so we + // need to set the page size larger than that until we reduce the channel size on-chain. + type MaxPageSize = ConstU32<{ 103 * 1024 }>; type MaxInboundSuspended = sp_core::ConstU32<1_000>; type ControllerOrigin = RootOrFellows; type ControllerOriginConverter = XcmOriginToTransactDispatchOrigin; @@ -413,6 +426,11 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime { type PriceForSiblingDelivery = PriceForSiblingParachainDelivery; } +impl cumulus_pallet_xcmp_queue::migration::v5::V5Config for Runtime { + // This must be the same as the `ChannelInfo` from the `Config`: + type ChannelList = ParachainSystem; +} + pub const PERIOD: u32 = 6 * HOURS; pub const OFFSET: u32 = 0; @@ -581,7 +599,7 @@ impl_runtime_apis! { } fn authorities() -> Vec { - Aura::authorities().into_inner() + pallet_aura::Authorities::::get().into_inner() } } @@ -603,7 +621,7 @@ impl_runtime_apis! { Executive::execute_block(block) } - fn initialize_block(header: &::Header) { + fn initialize_block(header: &::Header) -> sp_runtime::ExtrinsicInclusionMode { Executive::initialize_block(header) } } @@ -728,12 +746,16 @@ impl_runtime_apis! { } impl sp_genesis_builder::GenesisBuilder for Runtime { - fn create_default_config() -> Vec { - create_default_config::() + fn build_state(config: Vec) -> sp_genesis_builder::Result { + build_state::(config) + } + + fn get_preset(id: &Option) -> Option> { + get_preset::(id, |_| None) } - fn build_config(config: Vec) -> sp_genesis_builder::Result { - build_config::(config) + fn preset_names() -> Vec { + vec![] } } @@ -742,6 +764,12 @@ impl_runtime_apis! { BridgePolkadotGrandpa::best_finalized() } + fn free_headers_interval() -> Option { + >::FreeHeadersInterval::get() + } + fn synced_headers_grandpa_info( ) -> Vec> { BridgePolkadotGrandpa::synced_headers_grandpa_info() @@ -754,6 +782,11 @@ impl_runtime_apis! { bp_bridge_hub_polkadot::BridgeHubPolkadot >().unwrap_or(None) } + + fn free_headers_interval() -> Option { + // "free interval" is not currently used for parachains + None + } } impl bp_bridge_hub_polkadot::FromBridgeHubPolkadotInboundLaneApi for Runtime { diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/mod.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/mod.rs index e5b39dbee8..7cf0227732 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/mod.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/mod.rs @@ -18,9 +18,10 @@ //! Expose the auto generated weight files. use crate::Runtime; +use ::pallet_bridge_grandpa::WeightInfoExt as GrandpaWeightInfoExt; use ::pallet_bridge_messages::WeightInfoExt as MessagesWeightInfoExt; use ::pallet_bridge_parachains::WeightInfoExt as ParachainsWeightInfoExt; -use ::pallet_bridge_relayers::WeightInfoExt as _; +use ::pallet_bridge_relayers::{WeightInfo as _, WeightInfoExt as _}; use frame_support::weights::Weight; pub mod block_weights; @@ -52,6 +53,16 @@ pub use block_weights::constants::BlockExecutionWeight; pub use extrinsic_weights::constants::ExtrinsicBaseWeight; pub use rocksdb_weights::constants::RocksDbWeight; +impl GrandpaWeightInfoExt for pallet_bridge_grandpa::WeightInfo { + fn submit_finality_proof_overhead_from_runtime() -> Weight { + // our signed extension: + // 1) checks whether relayer registration is active from validate/pre_dispatch; + // 2) may slash and deregister relayer from post_dispatch + // (2) includes (1), so (2) is the worst case + pallet_bridge_relayers::WeightInfo::::slash_and_deregister() + } +} + impl MessagesWeightInfoExt for pallet_bridge_messages::WeightInfo { fn expected_extra_storage_proof_size() -> u32 { bp_bridge_hub_polkadot::EXTRA_STORAGE_PROOF_SIZE @@ -71,4 +82,12 @@ impl ParachainsWeightInfoExt for pallet_bridge_parachains::WeightInfo { fn expected_extra_storage_proof_size() -> u32 { bp_bridge_hub_polkadot::EXTRA_STORAGE_PROOF_SIZE } + + fn submit_parachain_heads_overhead_from_runtime() -> Weight { + // our signed extension: + // 1) checks whether relayer registration is active from validate/pre_dispatch; + // 2) may slash and deregister relayer from post_dispatch + // (2) includes (1), so (2) is the worst case + pallet_bridge_relayers::WeightInfo::::slash_and_deregister() + } } diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_balances.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_balances.rs index a78b774ca8..c36d0c0ff8 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_balances.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_balances.rs @@ -148,6 +148,23 @@ impl pallet_balances::WeightInfo for WeightInfo { } /// Storage: `Balances::InactiveIssuance` (r:1 w:0) /// Proof: `Balances::InactiveIssuance` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) + fn burn_allow_death() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 27_491_000 picoseconds. + Weight::from_parts(28_444_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + fn burn_keep_alive() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 18_290_000 picoseconds. + Weight::from_parts(19_227_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + fn force_adjust_total_issuance() -> Weight { // Proof Size summary in bytes: // Measured: `0` diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_bridge_grandpa.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_bridge_grandpa.rs index 13eb4318da..a30aed8044 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_bridge_grandpa.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_bridge_grandpa.rs @@ -72,4 +72,15 @@ impl pallet_bridge_grandpa::WeightInfo for WeightInfo Weight { + // Proof Size summary in bytes: + // Measured: `452` + // Estimated: `51735` + // Minimum execution time: 62_232_000 picoseconds. + Weight::from_parts(78_755_000, 0) + .saturating_add(Weight::from_parts(0, 51735)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(6)) + } } 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 7ccde658c3..4308e55adc 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 @@ -176,6 +176,7 @@ 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 @@ -225,6 +226,9 @@ impl xcm_executor::Config for XcmConfig { type SafeCallFilter = Everything; type Aliasers = Nothing; type TransactionalProcessor = FrameTransactionalProcessor; + type HrmpNewChannelOpenRequestHandler = (); + type HrmpChannelAcceptedHandler = (); + type HrmpChannelClosingHandler = (); } /// Converts a local signed origin into an XCM location. diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/tests/snowbridge.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/tests/snowbridge.rs index 5521d341c7..20b3b28dbd 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/tests/snowbridge.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/tests/snowbridge.rs @@ -21,43 +21,25 @@ use bridge_hub_kusama_runtime::{ bridge_to_ethereum_config::{EthereumGatewayAddress, EthereumNetwork}, bridge_to_polkadot_config::RefundBridgeHubPolkadotMessages, xcm_config::{XcmConfig, XcmFeeManagerFromComponentsBridgeHub}, - BridgeRejectObsoleteHeadersAndMessages, Executive, MessageQueueServiceWeight, Runtime, - RuntimeCall, RuntimeEvent, SessionKeys, SignedExtra, UncheckedExtrinsic, + AllPalletsWithoutSystem, BridgeRejectObsoleteHeadersAndMessages, Executive, + MessageQueueServiceWeight, Runtime, RuntimeCall, RuntimeEvent, SessionKeys, SignedExtra, + UncheckedExtrinsic, }; -use bridge_hub_test_utils::ValidatorIdOf; use codec::{Decode, Encode}; -use cumulus_primitives_core::XcmError::{FailedToTransactAsset, NotHoldingFees}; -use frame_support::{ - assert_err, assert_ok, parameter_types, - traits::{Contains, OnFinalize, OnInitialize}, -}; -use frame_system::pallet_prelude::BlockNumberFor; -use kusama_runtime_constants::currency::UNITS; +use cumulus_primitives_core::XcmError::{FailedToTransactAsset, TooExpensive}; +use frame_support::{parameter_types, traits::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, CollatorSessionKeys, ExtBuilder, XcmReceivedFrom, -}; -use snowbridge_core::{gwei, meth, ChannelId, ParaId, Rewards}; use snowbridge_pallet_ethereum_client::WeightInfo; -use snowbridge_pallet_system::{PricingParametersOf, WeightInfo as EthereumSystemWeightInfo}; -use snowbridge_runtime_test_common::initial_fund; use sp_core::H160; use sp_keyring::AccountKeyring::Alice; use sp_runtime::{ generic::{Era, SignedPayload}, - traits::Header, - AccountId32, FixedU128, Saturating, + AccountId32, }; -use xcm::{latest::prelude::*, v3::Error}; +use xcm::latest::prelude::*; use xcm_builder::HandleFee; -use xcm_executor::{ - traits::{FeeManager, FeeReason}, - XcmExecutor, -}; - -type RuntimeHelper = - parachains_runtimes_test_utils::RuntimeHelper; +use xcm_executor::traits::{FeeManager, FeeReason}; parameter_types! { pub const DefaultBridgeHubEthereumBaseFee: Balance = 2_750_872_500_000; @@ -73,7 +55,8 @@ fn collator_session_keys() -> bridge_hub_test_utils::CollatorSessionKeys( + snowbridge_runtime_test_common::send_transfer_token_message_success::( + 1, collator_session_keys(), 1013, 1000, @@ -92,6 +75,7 @@ pub fn transfer_token_to_ethereum_works() { #[test] pub fn unpaid_transfer_token_to_ethereum_fails_with_barrier() { snowbridge_runtime_test_common::send_unpaid_transfer_token_message::( + 11155111, collator_session_keys(), 1013, 1000, @@ -102,7 +86,8 @@ pub fn unpaid_transfer_token_to_ethereum_fails_with_barrier() { #[test] pub fn transfer_token_to_ethereum_fee_not_enough() { - send_transfer_token_message_failure::( + snowbridge_runtime_test_common::send_transfer_token_message_failure::( + 1, collator_session_keys(), 1013, 1000, @@ -110,15 +95,15 @@ pub fn transfer_token_to_ethereum_fee_not_enough() { H160::random(), H160::random(), // fee not enough - 1_000_000_000, - Box::new(|call| RuntimeCall::EthereumSystem(call).encode()), - NotHoldingFees, + 1_000_000, + TooExpensive, ) } #[test] pub fn transfer_token_to_ethereum_insufficient_fund() { - send_transfer_token_message_failure::( + snowbridge_runtime_test_common::send_transfer_token_message_failure::( + 1, collator_session_keys(), 1013, 1000, @@ -126,7 +111,6 @@ pub fn transfer_token_to_ethereum_insufficient_fund() { H160::random(), H160::random(), DefaultBridgeHubEthereumBaseFee::get(), - Box::new(|call| RuntimeCall::EthereumSystem(call).encode()), FailedToTransactAsset("Funds are unavailable"), ) } @@ -201,81 +185,6 @@ impl HandleFee for MockFeeHandler { type TestXcmFeeManager = XcmFeeManagerFromComponentsBridgeHub; -#[allow(clippy::too_many_arguments)] -pub fn send_transfer_token_message_failure( - collator_session_key: CollatorSessionKeys, - runtime_para_id: u32, - assethub_parachain_id: u32, - initial_amount: u128, - weth_contract_address: H160, - destination_address: H160, - fee_amount: u128, - system_call_encode: Box) -> Vec>, - expected_error: Error, -) where - Runtime: frame_system::Config - + pallet_balances::Config - + pallet_session::Config - + pallet_xcm::Config - + parachain_info::Config - + pallet_collator_selection::Config - + cumulus_pallet_parachain_system::Config - + snowbridge_pallet_outbound_queue::Config - + snowbridge_pallet_system::Config, - XcmConfig: xcm_executor::Config, - ValidatorIdOf: From>, - <::Token as frame_support::traits::fungible::Inspect<::AccountId>>::Balance: 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(|| { - assert_ok!(>::initialize( - runtime_para_id.into(), - assethub_parachain_id.into(), - )); - - let require_weight_at_most = - ::WeightInfo::set_pricing_parameters(); - - let set_pricing_parameters_call = system_call_encode(snowbridge_pallet_system::Call::< - Runtime, - >::set_pricing_parameters { - params: { - PricingParametersOf:: { - exchange_rate: FixedU128::from_rational(1, 75), - fee_per_gas: gwei(20), - rewards: Rewards { - local: (UNITS / 100).into(), // 0.01 KSM - remote: meth(1), - }, - multiplier: FixedU128::from_rational(1, 1), - } - }, - }); - - assert_ok!(RuntimeHelper::::execute_as_governance( - set_pricing_parameters_call, - require_weight_at_most - ) - .ensure_complete()); - - // fund asset hub sovereign account enough so it can pay fees - initial_fund::(assethub_parachain_id, initial_amount); - - let outcome = send_transfer_token_message::( - assethub_parachain_id, - weth_contract_address, - destination_address, - fee_amount, - ); - assert_err!(outcome.ensure_complete(), expected_error); - }); -} - #[test] fn max_message_queue_service_weight_is_more_than_beacon_extrinsic_weights() { let max_message_queue_weight = MessageQueueServiceWeight::get(); @@ -307,7 +216,25 @@ fn ethereum_to_polkadot_message_extrinsics_work() { #[test] fn ethereum_outbound_queue_processes_messages_before_message_queue_works() { - // TODO: add test after dependencies are upgraded to >= 1.8 + snowbridge_runtime_test_common::ethereum_outbound_queue_processes_messages_before_message_queue_works::< + Runtime, + XcmConfig, + AllPalletsWithoutSystem, + >( + 1, + collator_session_keys(), + 1013, + 1000, + H160::random(), + H160::random(), + DefaultBridgeHubEthereumBaseFee::get(), + Box::new(|runtime_event_encoded: Vec| { + match RuntimeEvent::decode(&mut &runtime_event_encoded[..]) { + Ok(RuntimeEvent::EthereumOutboundQueue(event)) => Some(event), + _ => None, + } + }), + ) } fn construct_extrinsic( @@ -329,15 +256,11 @@ fn construct_extrinsic( BridgeRejectObsoleteHeadersAndMessages, (RefundBridgeHubPolkadotMessages::default()), frame_metadata_hash_extension::CheckMetadataHash::::new(false), + cumulus_primitives_storage_weight_reclaim::StorageWeightReclaim::::new(), ); let payload = SignedPayload::new(call.clone(), extra.clone()).unwrap(); let signature = payload.using_encoded(|e| sender.sign(e)); - UncheckedExtrinsic::new_signed( - call, - account_id.into(), - Signature::Sr25519(signature.clone()), - extra, - ) + UncheckedExtrinsic::new_signed(call, account_id.into(), Signature::Sr25519(signature), extra) } fn construct_and_apply_extrinsic( @@ -348,159 +271,3 @@ fn construct_and_apply_extrinsic( let r = Executive::apply_extrinsic(xt); r.unwrap() } - -// TODO remove when Ethereum network ID has been extracted as a param -pub fn send_transfer_token_message( - assethub_parachain_id: u32, - weth_contract_address: H160, - destination_address: H160, - fee_amount: u128, -) -> Outcome -where - Runtime: frame_system::Config - + pallet_balances::Config - + pallet_session::Config - + pallet_xcm::Config - + parachain_info::Config - + pallet_collator_selection::Config - + cumulus_pallet_parachain_system::Config - + snowbridge_pallet_outbound_queue::Config, - XcmConfig: xcm_executor::Config, -{ - let assethub_parachain_location = Location::new(1, Parachain(assethub_parachain_id)); - let asset = Asset { - id: AssetId(Location::new( - 0, - [AccountKey20 { network: None, key: weth_contract_address.into() }], - )), - fun: Fungible(1000000000), - }; - let assets = vec![asset.clone()]; - - let inner_xcm = Xcm(vec![ - WithdrawAsset(Assets::from(assets.clone())), - ClearOrigin, - BuyExecution { fees: asset, weight_limit: Unlimited }, - DepositAsset { - assets: Wild(All), - beneficiary: Location::new( - 0, - [AccountKey20 { network: None, key: destination_address.into() }], - ), - }, - SetTopic([0; 32]), - ]); - - let fee = - Asset { id: AssetId(Location { parents: 1, interior: Here }), fun: Fungible(fee_amount) }; - - // prepare transfer token message - let xcm = Xcm(vec![ - WithdrawAsset(Assets::from(vec![fee.clone()])), - BuyExecution { fees: fee, weight_limit: Unlimited }, - ExportMessage { network: Ethereum { chain_id: 1 }, destination: Here, xcm: inner_xcm }, - ]); - - // execute XCM - let mut hash = xcm.using_encoded(sp_io::hashing::blake2_256); - XcmExecutor::::prepare_and_execute( - assethub_parachain_location, - xcm, - &mut hash, - RuntimeHelper::::xcm_max_weight(XcmReceivedFrom::Sibling), - Weight::zero(), - ) -} - -pub fn send_transfer_token_message_success( - collator_session_key: CollatorSessionKeys, - runtime_para_id: u32, - assethub_parachain_id: u32, - weth_contract_address: H160, - destination_address: H160, - fee_amount: u128, - snowbridge_pallet_outbound_queue: Box< - dyn Fn(Vec) -> Option>, - >, -) where - Runtime: frame_system::Config - + pallet_balances::Config - + pallet_session::Config - + pallet_xcm::Config - + parachain_info::Config - + pallet_collator_selection::Config - + pallet_message_queue::Config - + cumulus_pallet_parachain_system::Config - + snowbridge_pallet_outbound_queue::Config - + snowbridge_pallet_system::Config, - XcmConfig: xcm_executor::Config, - ValidatorIdOf: From>, - ::AccountId: From + AsRef<[u8]>, -{ - 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(|| { - >::initialize( - runtime_para_id.into(), - assethub_parachain_id.into(), - ) - .unwrap(); - - // fund asset hub sovereign account enough so it can pay fees - initial_fund::(assethub_parachain_id, 5_000_000_000_000); - - let outcome = send_transfer_token_message::( - assethub_parachain_id, - weth_contract_address, - destination_address, - fee_amount, - ); - - assert_ok!(outcome.ensure_complete()); - - // check events - let mut events = >::events() - .into_iter() - .filter_map(|e| snowbridge_pallet_outbound_queue(e.event.encode())); - assert!(events.any(|e| matches!( - e, - snowbridge_pallet_outbound_queue::Event::MessageQueued { .. } - ))); - - let block_number = >::block_number(); - let next_block_number = >::block_number() - .saturating_add(BlockNumberFor::::from(1u32)); - - // finish current block - >::on_finalize(block_number); - >::on_finalize(block_number); - >::on_finalize(block_number); - - // start next block - >::set_block_number(next_block_number); - >::on_initialize(next_block_number); - >::on_initialize(next_block_number); - >::on_initialize(next_block_number); - - // finish next block - >::on_finalize(next_block_number); - >::on_finalize(next_block_number); - let included_head = >::finalize(); - - let origin: ParaId = assethub_parachain_id.into(); - let channel_id: ChannelId = origin.into(); - - let nonce = snowbridge_pallet_outbound_queue::Nonce::::try_get(channel_id); - assert_ok!(nonce); - assert_eq!(nonce.unwrap(), 1); - - let digest = included_head.digest(); - - let digest_items = digest.logs(); - assert!(digest_items.len() == 1 && digest_items[0].as_other().is_some()); - }); -} 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 e39745cb1a..5aaabf4380 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/tests/tests.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/tests/tests.rs @@ -39,7 +39,7 @@ use sp_consensus_aura::SlotDuration; use sp_keyring::AccountKeyring::Alice; use sp_runtime::{ generic::{Era, SignedPayload}, - AccountId32, + AccountId32, Perbill, }; use system_parachains_constants::kusama::{ consensus::RELAY_CHAIN_SLOT_DURATION_MILLIS, fee::WeightToFee, @@ -83,15 +83,11 @@ fn construct_extrinsic( BridgeRejectObsoleteHeadersAndMessages, (RefundBridgeHubPolkadotMessages::default()), frame_metadata_hash_extension::CheckMetadataHash::::new(false), + cumulus_primitives_storage_weight_reclaim::StorageWeightReclaim::::new(), ); let payload = SignedPayload::new(call.clone(), extra.clone()).unwrap(); let signature = payload.using_encoded(|e| sender.sign(e)); - UncheckedExtrinsic::new_signed( - call, - account_id.into(), - Signature::Sr25519(signature.clone()), - extra, - ) + UncheckedExtrinsic::new_signed(call, account_id.into(), Signature::Sr25519(signature), extra) } fn construct_and_apply_extrinsic( @@ -103,11 +99,10 @@ fn construct_and_apply_extrinsic( r.unwrap() } -fn construct_and_estimate_extrinsic_fee(batch: pallet_utility::Call) -> Balance { - let batch_call = RuntimeCall::Utility(batch); - let batch_info = batch_call.get_dispatch_info(); - let xt = construct_extrinsic(Alice, batch_call); - TransactionPayment::compute_fee(xt.encoded_size() as _, &batch_info, 0) +fn construct_and_estimate_extrinsic_fee(call: RuntimeCall) -> Balance { + let info = call.get_dispatch_info(); + let xt = construct_extrinsic(Alice, call); + TransactionPayment::compute_fee(xt.encoded_size() as _, &info, 0) } fn collator_session_keys() -> bridge_hub_test_utils::CollatorSessionKeys { @@ -291,24 +286,25 @@ fn relayed_incoming_message_works() { } #[test] -pub fn complex_relay_extrinsic_works() { - from_parachain::complex_relay_extrinsic_works::( +fn free_relay_extrinsic_works() { + // from Polkadot + from_parachain::free_relay_extrinsic_works::( collator_session_keys(), slot_durations(), bp_bridge_hub_kusama::BRIDGE_HUB_KUSAMA_PARACHAIN_ID, bp_bridge_hub_polkadot::BRIDGE_HUB_POLKADOT_PARACHAIN_ID, - SIBLING_PARACHAIN_ID, BridgeHubPolkadotChainId::get(), + SIBLING_PARACHAIN_ID, Kusama, XCM_LANE_FOR_ASSET_HUB_KUSAMA_TO_ASSET_HUB_POLKADOT, || (), construct_and_apply_extrinsic, - ); + ) } #[test] pub fn can_calculate_weight_for_paid_export_message_with_reserve_transfer() { - check_sane_fees_values( + bridge_hub_test_utils::check_sane_fees_values( "bp_bridge_hub_kusama::BridgeHubKusamaBaseXcmFeeInKsms", bp_bridge_hub_kusama::BridgeHubKusamaBaseXcmFeeInKsms::get(), || { @@ -328,12 +324,12 @@ pub fn can_calculate_weight_for_paid_export_message_with_reserve_transfer() { } #[test] -pub fn can_calculate_fee_for_complex_message_delivery_transaction() { - check_sane_fees_values( +pub fn can_calculate_fee_for_standalone_message_delivery_transaction() { + bridge_hub_test_utils::check_sane_fees_values( "bp_bridge_hub_kusama::BridgeHubKusamaBaseDeliveryFeeInKsms", bp_bridge_hub_kusama::BridgeHubKusamaBaseDeliveryFeeInKsms::get(), || { - from_parachain::can_calculate_fee_for_complex_message_delivery_transaction::< + from_parachain::can_calculate_fee_for_standalone_message_delivery_transaction::< RuntimeTestsAdapter, >(collator_session_keys(), construct_and_estimate_extrinsic_fee) }, @@ -347,12 +343,12 @@ pub fn can_calculate_fee_for_complex_message_delivery_transaction() { } #[test] -pub fn can_calculate_fee_for_complex_message_confirmation_transaction() { - check_sane_fees_values( +pub fn can_calculate_fee_for_standalone_message_confirmation_transaction() { + bridge_hub_test_utils::check_sane_fees_values( "bp_bridge_hub_kusama::BridgeHubKusamaBaseConfirmationFeeInKsms", bp_bridge_hub_kusama::BridgeHubKusamaBaseConfirmationFeeInKsms::get(), || { - from_parachain::can_calculate_fee_for_complex_message_confirmation_transaction::< + from_parachain::can_calculate_fee_for_standalone_message_confirmation_transaction::< RuntimeTestsAdapter, >(collator_session_keys(), construct_and_estimate_extrinsic_fee) }, @@ -372,55 +368,3 @@ fn treasury_pallet_account_not_none() { LocationToAccountId::convert_location(&RelayTreasuryLocation::get()).unwrap() ) } - -use sp_runtime::Perbill; - -// TODO:(PR#159): remove when `polkadot-sdk@1.8.0` bump (https://github.com/polkadot-fellows/runtimes/issues/186) -/// A helper function for comparing the actual value of a fee constant with its estimated value. The -/// estimated value can be overestimated (`overestimate_in_percent`), and if the difference to the -/// actual value is below `margin_overestimate_diff_in_percent_for_lowering`, we should lower the -/// actual value. -pub fn check_sane_fees_values( - const_name: &str, - actual: u128, - calculate_estimated_fee: fn() -> u128, - overestimate_in_percent: Perbill, - margin_overestimate_diff_in_percent_for_lowering: Option, - label: &str, -) { - let estimated = calculate_estimated_fee(); - let estimated_plus_overestimate = estimated + (overestimate_in_percent * estimated); - let diff_to_estimated = diff_as_percent(actual, estimated); - let diff_to_estimated_plus_overestimate = diff_as_percent(actual, estimated_plus_overestimate); - - log::error!( - target: "bridges::estimate", - "{label}:\nconstant: {const_name}\n[+] actual: {actual}\n[+] estimated: {estimated} ({diff_to_estimated:.2?})\n[+] estimated(+33%): {estimated_plus_overestimate} ({diff_to_estimated_plus_overestimate:.2?})", - ); - - // check if estimated value is sane - assert!( - estimated <= actual, - "estimated: {estimated}, actual: {actual}, please adjust `{const_name}` to the value: {estimated_plus_overestimate}", - ); - assert!( - estimated_plus_overestimate <= actual, - "estimated_plus_overestimate: {estimated_plus_overestimate}, actual: {actual}, please adjust `{const_name}` to the value: {estimated_plus_overestimate}", - ); - - if let Some(margin_overestimate_diff_in_percent_for_lowering) = - margin_overestimate_diff_in_percent_for_lowering - { - assert!( - diff_to_estimated_plus_overestimate > margin_overestimate_diff_in_percent_for_lowering as f64, - "diff_to_estimated_plus_overestimate: {diff_to_estimated_plus_overestimate:.2}, overestimate_diff_in_percent_for_lowering: {margin_overestimate_diff_in_percent_for_lowering}, please adjust `{const_name}` to the value: {estimated_plus_overestimate}", - ); - } -} - -// TODO:(PR#159): remove when `polkadot-sdk@1.8.0` bump (https://github.com/polkadot-fellows/runtimes/issues/186) -pub fn diff_as_percent(left: u128, right: u128) -> f64 { - let left = left as f64; - let right = right as f64; - ((left - right).abs() / left) * 100f64 * (if left >= right { -1 } else { 1 }) as f64 -} diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml b/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml index db4ad96b61..7ce786eb5b 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml @@ -17,6 +17,7 @@ hex-literal = { workspace = true } log = { workspace = true } scale-info = { features = ["derive"], workspace = true } serde = { optional = true, features = ["derive"], workspace = true } +tuplex = { workspace = true } # Local bp-asset-hub-kusama = { workspace = true } @@ -35,7 +36,7 @@ frame-system = { workspace = true } frame-system-benchmarking = { optional = true, workspace = true } frame-system-rpc-runtime-api = { workspace = true } frame-try-runtime = { optional = true, workspace = true } -pallet-aura = { features = ["experimental"], workspace = true } +pallet-aura = { workspace = true } pallet-authorship = { workspace = true } pallet-balances = { workspace = true } pallet-message-queue = { workspace = true } @@ -72,9 +73,7 @@ xcm-executor = { workspace = true } # Cumulus cumulus-pallet-aura-ext = { workspace = true } -cumulus-pallet-parachain-system = { features = [ - "parameterized-consensus-hook", -], workspace = true } +cumulus-pallet-parachain-system = { workspace = true } cumulus-pallet-session-benchmarking = { workspace = true } cumulus-pallet-xcm = { workspace = true } cumulus-pallet-xcmp-queue = { features = ["bridging"], workspace = true } @@ -95,6 +94,7 @@ bp-relayers = { workspace = true } bp-runtime = { workspace = true } bp-kusama = { workspace = true } bp-polkadot = { workspace = true } +bp-polkadot-bulletin = { workspace = true } bridge-hub-common = { workspace = true } bridge-runtime-common = { workspace = true } pallet-bridge-grandpa = { workspace = true } @@ -216,6 +216,8 @@ std = [ "xcm-builder/std", "xcm-executor/std", "xcm/std", + "bp-polkadot-bulletin/std", + "tuplex/std" ] runtime-benchmarks = [ diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/primitives/Cargo.toml b/system-parachains/bridge-hubs/bridge-hub-polkadot/primitives/Cargo.toml index 404058b1a8..833d4b1d27 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/primitives/Cargo.toml +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/primitives/Cargo.toml @@ -18,6 +18,7 @@ system-parachains-constants = { workspace = true } bp-bridge-hub-cumulus = { workspace = true } bp-runtime = { workspace = true } bp-messages = { workspace = true } +bp-polkadot-bulletin = { workspace = true } snowbridge-core = { workspace = true } # Substrate Based Dependencies @@ -44,4 +45,5 @@ std = [ "sp-std/std", "system-parachains-constants/std", "xcm/std", + "bp-polkadot-bulletin/std" ] 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 ac289f68c6..40947b410a 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 @@ -58,6 +58,7 @@ impl Chain for BridgeHubPolkadot { impl Parachain for BridgeHubPolkadot { const PARACHAIN_ID: u32 = BRIDGE_HUB_POLKADOT_PARACHAIN_ID; + const MAX_HEADER_SIZE: u32 = MAX_BRIDGE_HUB_HEADER_SIZE; } impl ChainWithMessages for BridgeHubPolkadot { @@ -92,12 +93,12 @@ frame_support::parameter_types! { pub const BridgeHubPolkadotBaseXcmFeeInDots: Balance = 177_594_900; /// Transaction fee that is paid at the Polkadot BridgeHub for delivering single inbound message. - /// (initially was calculated by test `BridgeHubPolkadot::can_calculate_fee_for_complex_message_delivery_transaction` + `33%`) - pub const BridgeHubPolkadotBaseDeliveryFeeInDots: Balance = 16_912_645_364; + /// (initially was calculated by test `BridgeHubPolkadot::can_calculate_fee_for_standalone_message_delivery_transaction` + `33%`) + pub const BridgeHubPolkadotBaseDeliveryFeeInDots: Balance = 942_248_365; /// 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_complex_message_confirmation_transaction` + `33%`) - pub const BridgeHubPolkadotBaseConfirmationFeeInDots: Balance = 16_142_774_864; + /// (initially was calculated by test `BridgeHubPolkadot::can_calculate_fee_for_standalone_message_confirmation_transaction` + `33%`) + pub const BridgeHubPolkadotBaseConfirmationFeeInDots: Balance = 172_377_865; } /// Compute the total estimated fee that needs to be paid in DOTs by the sender when sending 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 68480a4219..a478039bcc 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 @@ -26,6 +26,10 @@ 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}, @@ -36,10 +40,6 @@ use bridge_runtime_common::{ SenderAndLane, XcmAsPlainPayload, XcmBlobHauler, XcmBlobHaulerAdapter, XcmBlobMessageDispatch, XcmVersionOfDestAndRemoteBridge, }, - refund_relayer_extension::{ - ActualFeeRefund, RefundBridgedParachainMessages, RefundSignedExtensionAdapter, - RefundableMessagesLane, RefundableParachain, - }, }; use frame_support::{parameter_types, traits::PalletInfoAccess}; use polkadot_runtime_constants as constants; @@ -150,11 +150,12 @@ parameter_types! { pub const RelayerStakeReserveId: [u8; 8] = *b"brdgrlrs"; /// Minimal period of relayer registration. Roughly, it is the 1 hour of real time. pub const RelayerStakeLease: u32 = 300; - /// Priority boost that the registered relayer receives for every additional message in the message - /// delivery transaction. - /// - /// It is determined semi-automatically - see `FEE_BOOST_PER_MESSAGE` constant to get the - /// meaning of this value + + // see the `FEE_BOOST_PER_RELAY_HEADER` constant get the meaning of this value + pub PriorityBoostPerRelayHeader: u64 = 200_048_840_048; + // see the `FEE_BOOST_PER_PARACHAIN_HEADER` constant get the meaning of this value + pub PriorityBoostPerParachainHeader: u64 = 10_602_588_522_588; + // see the `FEE_BOOST_PER_MESSAGE` constant to get the meaning of this value pub PriorityBoostPerMessage: u64 = 1_820_444_444_444; } @@ -163,8 +164,9 @@ pub type BridgeGrandpaKusamaInstance = pallet_bridge_grandpa::Instance1; impl pallet_bridge_grandpa::Config for Runtime { type RuntimeEvent = RuntimeEvent; type BridgedChain = bp_kusama::Kusama; - type MaxFreeMandatoryHeadersPerBlock = ConstU32<4>; type HeadersToKeep = RelayChainHeadersToKeep; + type MaxFreeHeadersPerBlock = ConstU32<4>; + type FreeHeadersInterval = ConstU32<5>; type WeightInfo = weights::pallet_bridge_grandpa::WeightInfo; } @@ -357,6 +359,10 @@ mod tests { /// We want this tip to be large enough (delivery transactions with more messages = less /// operational costs and a faster bridge), so this value should be significant. const FEE_BOOST_PER_MESSAGE: Balance = 2 * constants::currency::UNITS; + // see `FEE_BOOST_PER_MESSAGE` comment + const FEE_BOOST_PER_RELAY_HEADER: Balance = 2 * constants::currency::UNITS; + // see `FEE_BOOST_PER_MESSAGE` comment + const FEE_BOOST_PER_PARACHAIN_HEADER: Balance = 2 * constants::currency::UNITS; #[test] fn ensure_bridge_hub_polkadot_message_lane_weights_are_correct() { @@ -409,7 +415,19 @@ mod tests { }, }); - bridge_runtime_common::priority_calculator::ensure_priority_boost_is_sane::< + bridge_runtime_common::extensions::priority_calculator::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::< + Runtime, + RefundableParachain, + PriorityBoostPerParachainHeader, + >(FEE_BOOST_PER_PARACHAIN_HEADER); + + bridge_runtime_common::extensions::priority_calculator::per_message::ensure_priority_boost_is_sane::< Runtime, WithBridgeHubKusamaMessagesInstance, PriorityBoostPerMessage, 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 f803329a17..7adceeecf3 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs @@ -41,7 +41,7 @@ use sp_api::impl_runtime_apis; use sp_core::{crypto::KeyTypeId, OpaqueMetadata}; use sp_runtime::{ create_runtime_str, generic, impl_opaque_keys, - traits::{AccountIdLookup, BlakeTwo256, Block as BlockT}, + traits::{AccountIdLookup, BlakeTwo256, Block as BlockT, Get}, transaction_validity::{TransactionSource, TransactionValidity}, ApplyExtrinsicResult, }; @@ -54,7 +54,7 @@ use sp_version::RuntimeVersion; use frame_support::{ construct_runtime, dispatch::DispatchClass, - genesis_builder_helper::{build_config, create_default_config}, + genesis_builder_helper::{build_state, get_preset}, parameter_types, traits::{ tokens::imbalance::ResolveTo, ConstBool, ConstU32, ConstU64, ConstU8, EitherOfDiverse, @@ -150,6 +150,7 @@ pub type Migrations = ( ConstU32, >, pallet_collator_selection::migration::v2::MigrationToV2, + cumulus_pallet_xcmp_queue::migration::v5::MigrateV4ToV5, // permanent pallet_xcm::migration::MigrateToLatestXcmVersion, ); @@ -261,6 +262,11 @@ impl frame_system::Config for Runtime { /// The action to take on a Runtime Upgrade type OnSetCode = cumulus_pallet_parachain_system::ParachainSetCode; type MaxConsumers = ConstU32<16>; + type SingleBlockMigrations = (); + type MultiBlockMigrator = (); + type PreInherents = (); + type PostInherents = (); + type PostTransactions = (); } impl pallet_timestamp::Config for Runtime { @@ -348,6 +354,7 @@ parameter_types! { /// extrinsics. The `force_checkpoint` and `submit` extrinsics (for submit, optionally) includes /// the sync committee's pubkeys (512 x 48 bytes). pub MessageQueueServiceWeight: Weight = Perbill::from_percent(60) * RuntimeBlockWeights::get().max_block; + pub MessageQueueIdleServiceWeight: Weight = Perbill::from_percent(20) * RuntimeBlockWeights::get().max_block; } impl pallet_message_queue::Config for Runtime { @@ -376,6 +383,7 @@ impl pallet_message_queue::Config for Runtime { type HeapSize = sp_core::ConstU32<{ 64 * 1024 }>; type MaxStale = sp_core::ConstU32<8>; type ServiceWeight = MessageQueueServiceWeight; + type IdleMaxServiceWeight = MessageQueueIdleServiceWeight; } impl cumulus_pallet_aura_ext::Config for Runtime {} @@ -415,6 +423,10 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime { type VersionWrapper = PolkadotXcm; // Enqueue XCMP messages from siblings for later processing. type XcmpQueue = TransformOrigin; + type MaxActiveOutboundChannels = ConstU32<128>; + // Most on-chain HRMP channels are configured to use 102400 bytes of max message size, so we + // need to set the page size larger than that until we reduce the channel size on-chain. + type MaxPageSize = ConstU32<{ 103 * 1024 }>; type MaxInboundSuspended = sp_core::ConstU32<1_000>; type ControllerOrigin = RootOrFellows; type ControllerOriginConverter = XcmOriginToTransactDispatchOrigin; @@ -422,6 +434,11 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime { type PriceForSiblingDelivery = PriceForSiblingParachainDelivery; } +impl cumulus_pallet_xcmp_queue::migration::v5::V5Config for Runtime { + // This must be the same as the `ChannelInfo` from the `Config`: + type ChannelList = ParachainSystem; +} + pub const PERIOD: u32 = 6 * HOURS; pub const OFFSET: u32 = 0; @@ -591,7 +608,7 @@ impl_runtime_apis! { } fn authorities() -> Vec { - Aura::authorities().into_inner() + pallet_aura::Authorities::::get().into_inner() } } @@ -613,7 +630,7 @@ impl_runtime_apis! { Executive::execute_block(block) } - fn initialize_block(header: &::Header) { + fn initialize_block(header: &::Header) -> sp_runtime::ExtrinsicInclusionMode { Executive::initialize_block(header) } } @@ -738,12 +755,16 @@ impl_runtime_apis! { } impl sp_genesis_builder::GenesisBuilder for Runtime { - fn create_default_config() -> Vec { - create_default_config::() + fn build_state(config: Vec) -> sp_genesis_builder::Result { + build_state::(config) + } + + fn get_preset(id: &Option) -> Option> { + get_preset::(id, |_| None) } - fn build_config(config: Vec) -> sp_genesis_builder::Result { - build_config::(config) + fn preset_names() -> Vec { + vec![] } } @@ -752,6 +773,12 @@ impl_runtime_apis! { BridgeKusamaGrandpa::best_finalized() } + fn free_headers_interval() -> Option { + >::FreeHeadersInterval::get() + } + fn synced_headers_grandpa_info( ) -> Vec> { BridgeKusamaGrandpa::synced_headers_grandpa_info() @@ -764,6 +791,11 @@ impl_runtime_apis! { bp_bridge_hub_kusama::BridgeHubKusama >().unwrap_or(None) } + + fn free_headers_interval() -> Option { + // "free interval" is not currently used for parachains + None + } } impl bp_bridge_hub_kusama::FromBridgeHubKusamaInboundLaneApi for Runtime { diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/mod.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/mod.rs index a1871c259d..f93d5f8bbc 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/mod.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/mod.rs @@ -18,9 +18,10 @@ //! Expose the auto generated weight files. use crate::Runtime; +use ::pallet_bridge_grandpa::WeightInfoExt as GrandpaWeightInfoExt; use ::pallet_bridge_messages::WeightInfoExt as MessagesWeightInfoExt; use ::pallet_bridge_parachains::WeightInfoExt as ParachainsWeightInfoExt; -use ::pallet_bridge_relayers::WeightInfoExt as _; +use ::pallet_bridge_relayers::{WeightInfo as _, WeightInfoExt as _}; use frame_support::weights::Weight; pub mod block_weights; @@ -52,6 +53,16 @@ pub use block_weights::constants::BlockExecutionWeight; pub use extrinsic_weights::constants::ExtrinsicBaseWeight; pub use rocksdb_weights::constants::RocksDbWeight; +impl GrandpaWeightInfoExt for pallet_bridge_grandpa::WeightInfo { + fn submit_finality_proof_overhead_from_runtime() -> Weight { + // our signed extension: + // 1) checks whether relayer registration is active from validate/pre_dispatch; + // 2) may slash and deregister relayer from post_dispatch + // (2) includes (1), so (2) is the worst case + pallet_bridge_relayers::WeightInfo::::slash_and_deregister() + } +} + impl MessagesWeightInfoExt for pallet_bridge_messages::WeightInfo { fn expected_extra_storage_proof_size() -> u32 { bp_bridge_hub_kusama::EXTRA_STORAGE_PROOF_SIZE @@ -71,4 +82,12 @@ impl ParachainsWeightInfoExt for pallet_bridge_parachains::WeightInfo { fn expected_extra_storage_proof_size() -> u32 { bp_bridge_hub_kusama::EXTRA_STORAGE_PROOF_SIZE } + + fn submit_parachain_heads_overhead_from_runtime() -> Weight { + // our signed extension: + // 1) checks whether relayer registration is active from validate/pre_dispatch; + // 2) may slash and deregister relayer from post_dispatch + // (2) includes (1), so (2) is the worst case + pallet_bridge_relayers::WeightInfo::::slash_and_deregister() + } } diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_balances.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_balances.rs index 5498809a2a..70cedbf30b 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_balances.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_balances.rs @@ -148,6 +148,23 @@ impl pallet_balances::WeightInfo for WeightInfo { } /// Storage: `Balances::InactiveIssuance` (r:1 w:0) /// Proof: `Balances::InactiveIssuance` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) + fn burn_allow_death() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 27_491_000 picoseconds. + Weight::from_parts(28_444_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + fn burn_keep_alive() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 18_290_000 picoseconds. + Weight::from_parts(19_227_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + fn force_adjust_total_issuance() -> Weight { // Proof Size summary in bytes: // Measured: `0` diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_bridge_grandpa.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_bridge_grandpa.rs index b0c2d020b2..97740e7241 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_bridge_grandpa.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_bridge_grandpa.rs @@ -74,4 +74,15 @@ impl pallet_bridge_grandpa::WeightInfo for WeightInfo Weight { + // Proof Size summary in bytes: + // Measured: `452` + // Estimated: `51735` + // Minimum execution time: 62_232_000 picoseconds. + Weight::from_parts(78_755_000, 0) + .saturating_add(Weight::from_parts(0, 51735)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(6)) + } } diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/snowbridge_pallet_ethereum_client.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/snowbridge_pallet_ethereum_client.rs index 4a2eeb7f3b..34e229cd89 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/snowbridge_pallet_ethereum_client.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/snowbridge_pallet_ethereum_client.rs @@ -116,4 +116,4 @@ impl snowbridge_pallet_ethereum_client::WeightInfo for .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(1)) } -} \ No newline at end of file +} 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 6c7ad9086f..4af51d0fdd 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 @@ -195,6 +195,7 @@ 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 @@ -244,6 +245,9 @@ impl xcm_executor::Config for XcmConfig { type SafeCallFilter = Everything; type Aliasers = Nothing; type TransactionalProcessor = FrameTransactionalProcessor; + type HrmpNewChannelOpenRequestHandler = (); + type HrmpChannelAcceptedHandler = (); + type HrmpChannelClosingHandler = (); } /// Converts a local signed origin into an XCM location. 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 552841e4af..b0a20a57fd 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/snowbridge.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/snowbridge.rs @@ -21,43 +21,25 @@ use bridge_hub_polkadot_runtime::{ bridge_to_ethereum_config::{EthereumGatewayAddress, EthereumNetwork}, bridge_to_kusama_config::RefundBridgeHubKusamaMessages, xcm_config::{XcmConfig, XcmFeeManagerFromComponentsBridgeHub}, - BridgeRejectObsoleteHeadersAndMessages, Executive, MessageQueueServiceWeight, Runtime, - RuntimeCall, RuntimeEvent, SessionKeys, SignedExtra, UncheckedExtrinsic, + AllPalletsWithoutSystem, BridgeRejectObsoleteHeadersAndMessages, Executive, + MessageQueueServiceWeight, Runtime, RuntimeCall, RuntimeEvent, SessionKeys, SignedExtra, + UncheckedExtrinsic, }; -use bridge_hub_test_utils::ValidatorIdOf; use codec::{Decode, Encode}; -use cumulus_primitives_core::XcmError::{FailedToTransactAsset, NotHoldingFees}; -use frame_support::{ - assert_err, assert_ok, parameter_types, - traits::{Contains, OnFinalize, OnInitialize}, -}; -use frame_system::pallet_prelude::BlockNumberFor; +use cumulus_primitives_core::XcmError::{FailedToTransactAsset, TooExpensive}; +use frame_support::{parameter_types, traits::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, CollatorSessionKeys, ExtBuilder, XcmReceivedFrom, -}; -use polkadot_runtime_constants::currency::UNITS; -use snowbridge_core::{gwei, meth, ChannelId, ParaId, Rewards}; use snowbridge_pallet_ethereum_client::WeightInfo; -use snowbridge_pallet_system::{PricingParametersOf, WeightInfo as EthereumSystemWeightInfo}; -use snowbridge_runtime_test_common::initial_fund; use sp_core::H160; use sp_keyring::AccountKeyring::Alice; use sp_runtime::{ generic::{Era, SignedPayload}, - traits::Header, - AccountId32, FixedU128, Saturating, + AccountId32, }; -use xcm::{latest::prelude::*, v3::Error}; +use xcm::latest::prelude::*; use xcm_builder::HandleFee; -use xcm_executor::{ - traits::{FeeManager, FeeReason}, - XcmExecutor, -}; - -type RuntimeHelper = - parachains_runtimes_test_utils::RuntimeHelper; +use xcm_executor::traits::{FeeManager, FeeReason}; parameter_types! { pub const DefaultBridgeHubEthereumBaseFee: Balance = 2_750_872_500_000; @@ -73,7 +55,8 @@ fn collator_session_keys() -> bridge_hub_test_utils::CollatorSessionKeys( + snowbridge_runtime_test_common::send_transfer_token_message_success::( + 1, collator_session_keys(), 1013, 1000, @@ -92,6 +75,7 @@ pub fn transfer_token_to_ethereum_works() { #[test] pub fn unpaid_transfer_token_to_ethereum_fails_with_barrier() { snowbridge_runtime_test_common::send_unpaid_transfer_token_message::( + 11155111, collator_session_keys(), 1013, 1000, @@ -102,7 +86,8 @@ pub fn unpaid_transfer_token_to_ethereum_fails_with_barrier() { #[test] pub fn transfer_token_to_ethereum_fee_not_enough() { - send_transfer_token_message_failure::( + snowbridge_runtime_test_common::send_transfer_token_message_failure::( + 1, collator_session_keys(), 1013, 1000, @@ -110,15 +95,15 @@ pub fn transfer_token_to_ethereum_fee_not_enough() { H160::random(), H160::random(), // fee not enough - 1_000_000_000, - Box::new(|call| RuntimeCall::EthereumSystem(call).encode()), - NotHoldingFees, + 1_000_000, + TooExpensive, ) } #[test] pub fn transfer_token_to_ethereum_insufficient_fund() { - send_transfer_token_message_failure::( + snowbridge_runtime_test_common::send_transfer_token_message_failure::( + 1, collator_session_keys(), 1013, 1000, @@ -126,7 +111,6 @@ pub fn transfer_token_to_ethereum_insufficient_fund() { H160::random(), H160::random(), DefaultBridgeHubEthereumBaseFee::get(), - Box::new(|call| RuntimeCall::EthereumSystem(call).encode()), FailedToTransactAsset("Funds are unavailable"), ) } @@ -201,81 +185,6 @@ impl HandleFee for MockFeeHandler { type TestXcmFeeManager = XcmFeeManagerFromComponentsBridgeHub; -#[allow(clippy::too_many_arguments)] -pub fn send_transfer_token_message_failure( - collator_session_key: CollatorSessionKeys, - runtime_para_id: u32, - assethub_parachain_id: u32, - initial_amount: u128, - weth_contract_address: H160, - destination_address: H160, - fee_amount: u128, - system_call_encode: Box) -> Vec>, - expected_error: Error, -) where - Runtime: frame_system::Config - + pallet_balances::Config - + pallet_session::Config - + pallet_xcm::Config - + parachain_info::Config - + pallet_collator_selection::Config - + cumulus_pallet_parachain_system::Config - + snowbridge_pallet_outbound_queue::Config - + snowbridge_pallet_system::Config, - XcmConfig: xcm_executor::Config, - ValidatorIdOf: From>, - <::Token as frame_support::traits::fungible::Inspect<::AccountId>>::Balance: 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(|| { - assert_ok!(>::initialize( - runtime_para_id.into(), - assethub_parachain_id.into(), - )); - - let require_weight_at_most = - ::WeightInfo::set_pricing_parameters(); - - let set_pricing_parameters_call = system_call_encode(snowbridge_pallet_system::Call::< - Runtime, - >::set_pricing_parameters { - params: { - PricingParametersOf:: { - exchange_rate: FixedU128::from_rational(1, 75), - fee_per_gas: gwei(20), - rewards: Rewards { - local: (UNITS / 100).into(), // 0.01 DOT - remote: meth(1), - }, - multiplier: FixedU128::from_rational(1, 1), - } - }, - }); - - assert_ok!(RuntimeHelper::::execute_as_governance( - set_pricing_parameters_call, - require_weight_at_most - ) - .ensure_complete()); - - // fund asset hub sovereign account enough so it can pay fees - initial_fund::(assethub_parachain_id, initial_amount); - - let outcome = send_transfer_token_message::( - assethub_parachain_id, - weth_contract_address, - destination_address, - fee_amount, - ); - assert_err!(outcome.ensure_complete(), expected_error); - }); -} - #[test] fn max_message_queue_service_weight_is_more_than_beacon_extrinsic_weights() { let max_message_queue_weight = MessageQueueServiceWeight::get(); @@ -307,7 +216,25 @@ fn ethereum_to_polkadot_message_extrinsics_work() { #[test] fn ethereum_outbound_queue_processes_messages_before_message_queue_works() { - // TODO: add test after dependencies are upgraded to >= 1.8 + snowbridge_runtime_test_common::ethereum_outbound_queue_processes_messages_before_message_queue_works::< + Runtime, + XcmConfig, + AllPalletsWithoutSystem, + >( + 1, + collator_session_keys(), + 1013, + 1000, + H160::random(), + H160::random(), + DefaultBridgeHubEthereumBaseFee::get(), + Box::new(|runtime_event_encoded: Vec| { + match RuntimeEvent::decode(&mut &runtime_event_encoded[..]) { + Ok(RuntimeEvent::EthereumOutboundQueue(event)) => Some(event), + _ => None, + } + }), + ) } fn construct_extrinsic( @@ -332,12 +259,7 @@ fn construct_extrinsic( ); let payload = SignedPayload::new(call.clone(), extra.clone()).unwrap(); let signature = payload.using_encoded(|e| sender.sign(e)); - UncheckedExtrinsic::new_signed( - call, - account_id.into(), - Signature::Sr25519(signature.clone()), - extra, - ) + UncheckedExtrinsic::new_signed(call, account_id.into(), Signature::Sr25519(signature), extra) } fn construct_and_apply_extrinsic( @@ -348,159 +270,3 @@ fn construct_and_apply_extrinsic( let r = Executive::apply_extrinsic(xt); r.unwrap() } - -// TODO remove when Ethereum network ID has been extracted as a param -pub fn send_transfer_token_message( - assethub_parachain_id: u32, - weth_contract_address: H160, - destination_address: H160, - fee_amount: u128, -) -> Outcome -where - Runtime: frame_system::Config - + pallet_balances::Config - + pallet_session::Config - + pallet_xcm::Config - + parachain_info::Config - + pallet_collator_selection::Config - + cumulus_pallet_parachain_system::Config - + snowbridge_pallet_outbound_queue::Config, - XcmConfig: xcm_executor::Config, -{ - let assethub_parachain_location = Location::new(1, Parachain(assethub_parachain_id)); - let asset = Asset { - id: AssetId(Location::new( - 0, - [AccountKey20 { network: None, key: weth_contract_address.into() }], - )), - fun: Fungible(1000000000), - }; - let assets = vec![asset.clone()]; - - let inner_xcm = Xcm(vec![ - WithdrawAsset(Assets::from(assets.clone())), - ClearOrigin, - BuyExecution { fees: asset, weight_limit: Unlimited }, - DepositAsset { - assets: Wild(All), - beneficiary: Location::new( - 0, - [AccountKey20 { network: None, key: destination_address.into() }], - ), - }, - SetTopic([0; 32]), - ]); - - let fee = - Asset { id: AssetId(Location { parents: 1, interior: Here }), fun: Fungible(fee_amount) }; - - // prepare transfer token message - let xcm = Xcm(vec![ - WithdrawAsset(Assets::from(vec![fee.clone()])), - BuyExecution { fees: fee, weight_limit: Unlimited }, - ExportMessage { network: Ethereum { chain_id: 1 }, destination: Here, xcm: inner_xcm }, - ]); - - // execute XCM - let mut hash = xcm.using_encoded(sp_io::hashing::blake2_256); - XcmExecutor::::prepare_and_execute( - assethub_parachain_location, - xcm, - &mut hash, - RuntimeHelper::::xcm_max_weight(XcmReceivedFrom::Sibling), - Weight::zero(), - ) -} - -pub fn send_transfer_token_message_success( - collator_session_key: CollatorSessionKeys, - runtime_para_id: u32, - assethub_parachain_id: u32, - weth_contract_address: H160, - destination_address: H160, - fee_amount: u128, - snowbridge_pallet_outbound_queue: Box< - dyn Fn(Vec) -> Option>, - >, -) where - Runtime: frame_system::Config - + pallet_balances::Config - + pallet_session::Config - + pallet_xcm::Config - + parachain_info::Config - + pallet_collator_selection::Config - + pallet_message_queue::Config - + cumulus_pallet_parachain_system::Config - + snowbridge_pallet_outbound_queue::Config - + snowbridge_pallet_system::Config, - XcmConfig: xcm_executor::Config, - ValidatorIdOf: From>, - ::AccountId: From + AsRef<[u8]>, -{ - 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(|| { - >::initialize( - runtime_para_id.into(), - assethub_parachain_id.into(), - ) - .unwrap(); - - // fund asset hub sovereign account enough so it can pay fees - initial_fund::(assethub_parachain_id, 5_000_000_000_000); - - let outcome = send_transfer_token_message::( - assethub_parachain_id, - weth_contract_address, - destination_address, - fee_amount, - ); - - assert_ok!(outcome.ensure_complete()); - - // check events - let mut events = >::events() - .into_iter() - .filter_map(|e| snowbridge_pallet_outbound_queue(e.event.encode())); - assert!(events.any(|e| matches!( - e, - snowbridge_pallet_outbound_queue::Event::MessageQueued { .. } - ))); - - let block_number = >::block_number(); - let next_block_number = >::block_number() - .saturating_add(BlockNumberFor::::from(1u32)); - - // finish current block - >::on_finalize(block_number); - >::on_finalize(block_number); - >::on_finalize(block_number); - - // start next block - >::set_block_number(next_block_number); - >::on_initialize(next_block_number); - >::on_initialize(next_block_number); - >::on_initialize(next_block_number); - - // finish next block - >::on_finalize(next_block_number); - >::on_finalize(next_block_number); - let included_head = >::finalize(); - - let origin: ParaId = assethub_parachain_id.into(); - let channel_id: ChannelId = origin.into(); - - let nonce = snowbridge_pallet_outbound_queue::Nonce::::try_get(channel_id); - assert_ok!(nonce); - assert_eq!(nonce.unwrap(), 1); - - let digest = included_head.digest(); - - let digest_items = digest.logs(); - assert!(digest_items.len() == 1 && digest_items[0].as_other().is_some()); - }); -} 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 a2b5628fdb..c3301047cd 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/tests.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/tests.rs @@ -87,12 +87,7 @@ fn construct_extrinsic( ); let payload = SignedPayload::new(call.clone(), extra.clone()).unwrap(); let signature = payload.using_encoded(|e| sender.sign(e)); - UncheckedExtrinsic::new_signed( - call, - account_id.into(), - Signature::Sr25519(signature.clone()), - extra, - ) + UncheckedExtrinsic::new_signed(call, account_id.into(), Signature::Sr25519(signature), extra) } fn construct_and_apply_extrinsic( @@ -104,11 +99,10 @@ fn construct_and_apply_extrinsic( r.unwrap() } -fn construct_and_estimate_extrinsic_fee(batch: pallet_utility::Call) -> Balance { - let batch_call = RuntimeCall::Utility(batch); - let batch_info = batch_call.get_dispatch_info(); - let xt = construct_extrinsic(Alice, batch_call); - TransactionPayment::compute_fee(xt.encoded_size() as _, &batch_info, 0) +fn construct_and_estimate_extrinsic_fee(call: RuntimeCall) -> Balance { + let info = call.get_dispatch_info(); + let xt = construct_extrinsic(Alice, call); + TransactionPayment::compute_fee(xt.encoded_size() as _, &info, 0) } fn collator_session_keys() -> bridge_hub_test_utils::CollatorSessionKeys { @@ -292,24 +286,25 @@ fn relayed_incoming_message_works() { } #[test] -pub fn complex_relay_extrinsic_works() { - from_parachain::complex_relay_extrinsic_works::( +fn free_relay_extrinsic_works() { + // from Polkadot + from_parachain::free_relay_extrinsic_works::( collator_session_keys(), slot_durations(), bp_bridge_hub_polkadot::BRIDGE_HUB_POLKADOT_PARACHAIN_ID, bp_bridge_hub_kusama::BRIDGE_HUB_KUSAMA_PARACHAIN_ID, - SIBLING_PARACHAIN_ID, BridgeHubKusamaChainId::get(), + SIBLING_PARACHAIN_ID, Polkadot, XCM_LANE_FOR_ASSET_HUB_POLKADOT_TO_ASSET_HUB_KUSAMA, || (), construct_and_apply_extrinsic, - ); + ) } #[test] pub fn can_calculate_weight_for_paid_export_message_with_reserve_transfer() { - check_sane_fees_values( + bridge_hub_test_utils::check_sane_fees_values( "bp_bridge_hub_polkadot::BridgeHubPolkadotBaseXcmFeeInDots", bp_bridge_hub_polkadot::BridgeHubPolkadotBaseXcmFeeInDots::get(), || { @@ -329,12 +324,12 @@ pub fn can_calculate_weight_for_paid_export_message_with_reserve_transfer() { } #[test] -pub fn can_calculate_fee_for_complex_message_delivery_transaction() { - check_sane_fees_values( +pub fn can_calculate_fee_for_standalone_message_delivery_transaction() { + bridge_hub_test_utils::check_sane_fees_values( "bp_bridge_hub_polkadot::BridgeHubPolkadotBaseDeliveryFeeInDots", bp_bridge_hub_polkadot::BridgeHubPolkadotBaseDeliveryFeeInDots::get(), || { - from_parachain::can_calculate_fee_for_complex_message_delivery_transaction::< + from_parachain::can_calculate_fee_for_standalone_message_delivery_transaction::< RuntimeTestsAdapter, >(collator_session_keys(), construct_and_estimate_extrinsic_fee) }, @@ -348,12 +343,12 @@ pub fn can_calculate_fee_for_complex_message_delivery_transaction() { } #[test] -pub fn can_calculate_fee_for_complex_message_confirmation_transaction() { - check_sane_fees_values( +pub fn can_calculate_fee_for_standalone_message_confirmation_transaction() { + bridge_hub_test_utils::check_sane_fees_values( "bp_bridge_hub_polkadot::BridgeHubPolkadotBaseConfirmationFeeInDots", bp_bridge_hub_polkadot::BridgeHubPolkadotBaseConfirmationFeeInDots::get(), || { - from_parachain::can_calculate_fee_for_complex_message_confirmation_transaction::< + from_parachain::can_calculate_fee_for_standalone_message_confirmation_transaction::< RuntimeTestsAdapter, >(collator_session_keys(), construct_and_estimate_extrinsic_fee) }, @@ -373,53 +368,3 @@ fn treasury_pallet_account_not_none() { LocationToAccountId::convert_location(&RelayTreasuryLocation::get()).unwrap() ) } - -// TODO:(PR#159): remove when `polkadot-sdk@1.8.0` bump (https://github.com/polkadot-fellows/runtimes/issues/186) -/// A helper function for comparing the actual value of a fee constant with its estimated value. The -/// estimated value can be overestimated (`overestimate_in_percent`), and if the difference to the -/// actual value is below `margin_overestimate_diff_in_percent_for_lowering`, we should lower the -/// actual value. -pub fn check_sane_fees_values( - const_name: &str, - actual: u128, - calculate_estimated_fee: fn() -> u128, - overestimate_in_percent: Perbill, - margin_overestimate_diff_in_percent_for_lowering: Option, - label: &str, -) { - let estimated = calculate_estimated_fee(); - let estimated_plus_overestimate = estimated + (overestimate_in_percent * estimated); - let diff_to_estimated = diff_as_percent(actual, estimated); - let diff_to_estimated_plus_overestimate = diff_as_percent(actual, estimated_plus_overestimate); - - log::error!( - target: "bridges::estimate", - "{label}:\nconstant: {const_name}\n[+] actual: {actual}\n[+] estimated: {estimated} ({diff_to_estimated:.2?})\n[+] estimated(+33%): {estimated_plus_overestimate} ({diff_to_estimated_plus_overestimate:.2?})", - ); - - // check if estimated value is sane - assert!( - estimated <= actual, - "estimated: {estimated}, actual: {actual}, please adjust `{const_name}` to the value: {estimated_plus_overestimate}", - ); - assert!( - estimated_plus_overestimate <= actual, - "estimated_plus_overestimate: {estimated_plus_overestimate}, actual: {actual}, please adjust `{const_name}` to the value: {estimated_plus_overestimate}", - ); - - if let Some(margin_overestimate_diff_in_percent_for_lowering) = - margin_overestimate_diff_in_percent_for_lowering - { - assert!( - diff_to_estimated_plus_overestimate > margin_overestimate_diff_in_percent_for_lowering as f64, - "diff_to_estimated_plus_overestimate: {diff_to_estimated_plus_overestimate:.2}, overestimate_diff_in_percent_for_lowering: {margin_overestimate_diff_in_percent_for_lowering}, please adjust `{const_name}` to the value: {estimated_plus_overestimate}", - ); - } -} - -// TODO:(PR#159): remove when `polkadot-sdk@1.8.0` bump (https://github.com/polkadot-fellows/runtimes/issues/186) -pub fn diff_as_percent(left: u128, right: u128) -> f64 { - let left = left as f64; - let right = right as f64; - ((left - right).abs() / left) * 100f64 * (if left >= right { -1 } else { 1 }) as f64 -} diff --git a/system-parachains/collectives/collectives-polkadot/Cargo.toml b/system-parachains/collectives/collectives-polkadot/Cargo.toml index dd9e812969..83d9d08b1c 100644 --- a/system-parachains/collectives/collectives-polkadot/Cargo.toml +++ b/system-parachains/collectives/collectives-polkadot/Cargo.toml @@ -25,7 +25,7 @@ frame-system-rpc-runtime-api = { workspace = true } frame-try-runtime = { optional = true, workspace = true } pallet-asset-rate = { workspace = true } pallet-alliance = { workspace = true } -pallet-aura = { features = ["experimental"], workspace = true } +pallet-aura = { workspace = true } pallet-authorship = { workspace = true } pallet-balances = { workspace = true } pallet-collective = { workspace = true } @@ -71,9 +71,7 @@ xcm-executor = { workspace = true } # Cumulus cumulus-pallet-aura-ext = { workspace = true } -cumulus-pallet-parachain-system = { features = [ - "parameterized-consensus-hook", -], workspace = true } +cumulus-pallet-parachain-system = { workspace = true } cumulus-pallet-session-benchmarking = { workspace = true } cumulus-pallet-xcm = { workspace = true } cumulus-pallet-xcmp-queue = { workspace = true } diff --git a/system-parachains/collectives/collectives-polkadot/src/ambassador/mod.rs b/system-parachains/collectives/collectives-polkadot/src/ambassador/mod.rs index 6786e7229c..6bef9702ef 100644 --- a/system-parachains/collectives/collectives-polkadot/src/ambassador/mod.rs +++ b/system-parachains/collectives/collectives-polkadot/src/ambassador/mod.rs @@ -47,7 +47,9 @@ use pallet_ranked_collective::{Rank, Votes}; use polkadot_runtime_common::impls::{LocatableAssetConverter, VersionedLocationConverter}; use sp_core::ConstU128; use sp_runtime::{ - traits::{CheckedReduceBy, Convert, ConvertToValue, IdentityLookup, Replace}, + traits::{ + CheckedReduceBy, Convert, ConvertToValue, IdentityLookup, Replace, ReplaceWithDefault, + }, Permill, }; use xcm::prelude::*; @@ -128,6 +130,8 @@ impl pallet_ranked_collective::Config for Runtime #[cfg(feature = "runtime-benchmarks")] type PromoteOrigin = EnsureRootWithSuccess>; type DemoteOrigin = DemoteOrigin; + type AddOrigin = MapSuccess>; + type RemoveOrigin = Self::DemoteOrigin; type Polls = AmbassadorReferenda; type MinRankOfClass = sp_runtime::traits::Identity; type VoteWeight = VoteWeight; @@ -208,6 +212,8 @@ impl pallet_core_fellowship::Config for Runtime { type ApproveOrigin = PromoteOrigin; type PromoteOrigin = PromoteOrigin; type EvidenceSize = ConstU32<65536>; + // TODO https://github.com/polkadot-fellows/runtimes/issues/370 + type MaxRank = ConstU32<9>; } parameter_types! { diff --git a/system-parachains/collectives/collectives-polkadot/src/fellowship/mod.rs b/system-parachains/collectives/collectives-polkadot/src/fellowship/mod.rs index 127afb2b66..c3db58188a 100644 --- a/system-parachains/collectives/collectives-polkadot/src/fellowship/mod.rs +++ b/system-parachains/collectives/collectives-polkadot/src/fellowship/mod.rs @@ -46,7 +46,9 @@ use polkadot_runtime_common::impls::{ use polkadot_runtime_constants::{currency::GRAND, time::HOURS, xcm::body::FELLOWSHIP_ADMIN_INDEX}; use sp_arithmetic::Permill; use sp_core::{ConstU128, ConstU32}; -use sp_runtime::traits::{ConstU16, ConvertToValue, IdentityLookup, Replace, TakeFirst}; +use sp_runtime::traits::{ + ConstU16, ConvertToValue, IdentityLookup, Replace, ReplaceWithDefault, TakeFirst, +}; use xcm_builder::{AliasesIntoAccountId32, PayOverXcm}; #[cfg(feature = "runtime-benchmarks")] @@ -143,6 +145,8 @@ impl pallet_ranked_collective::Config for Runtime // - the Fellows origin type ExchangeOrigin = EitherOf>, Fellows>; + type AddOrigin = MapSuccess>; + type RemoveOrigin = Self::DemoteOrigin; type Polls = FellowshipReferenda; type MinRankOfClass = tracks::MinRankOfClass; type MemberSwappedHandler = (crate::FellowshipCore, crate::FellowshipSalary); @@ -205,6 +209,7 @@ impl pallet_core_fellowship::Config for Runtime { EnsureCanPromoteTo, >; type EvidenceSize = ConstU32<65536>; + type MaxRank = ConstU32<9>; } pub type FellowshipSalaryInstance = pallet_salary::Instance1; diff --git a/system-parachains/collectives/collectives-polkadot/src/impls.rs b/system-parachains/collectives/collectives-polkadot/src/impls.rs index d3daea252c..a897e6b112 100644 --- a/system-parachains/collectives/collectives-polkadot/src/impls.rs +++ b/system-parachains/collectives/collectives-polkadot/src/impls.rs @@ -140,7 +140,7 @@ where } fn proposal_of(proposal_hash: HashOf) -> Option> { - pallet_collective::Pallet::::proposal_of(proposal_hash) + pallet_collective::ProposalOf::::get(proposal_hash) } } diff --git a/system-parachains/collectives/collectives-polkadot/src/lib.rs b/system-parachains/collectives/collectives-polkadot/src/lib.rs index 3791448114..e7b06c621f 100644 --- a/system-parachains/collectives/collectives-polkadot/src/lib.rs +++ b/system-parachains/collectives/collectives-polkadot/src/lib.rs @@ -67,7 +67,7 @@ use codec::{Decode, Encode, MaxEncodedLen}; use frame_support::{ construct_runtime, dispatch::DispatchClass, - genesis_builder_helper::{build_config, create_default_config}, + genesis_builder_helper::{build_state, get_preset}, parameter_types, traits::{ fungible::HoldConsideration, tokens::imbalance::ResolveTo, ConstBool, ConstU16, ConstU32, @@ -184,6 +184,11 @@ impl frame_system::Config for Runtime { type SS58Prefix = ConstU16<0>; type OnSetCode = cumulus_pallet_parachain_system::ParachainSetCode; type MaxConsumers = frame_support::traits::ConstU32<16>; + type SingleBlockMigrations = (); + type MultiBlockMigrator = (); + type PreInherents = (); + type PostInherents = (); + type PostTransactions = (); } impl pallet_timestamp::Config for Runtime { @@ -404,6 +409,7 @@ impl parachain_info::Config for Runtime {} parameter_types! { pub MessageQueueServiceWeight: Weight = Perbill::from_percent(35) * RuntimeBlockWeights::get().max_block; + pub MessageQueueIdleServiceWeight: Weight = Perbill::from_percent(20) * RuntimeBlockWeights::get().max_block; } impl pallet_message_queue::Config for Runtime { @@ -426,6 +432,7 @@ impl pallet_message_queue::Config for Runtime { type HeapSize = sp_core::ConstU32<{ 64 * 1024 }>; type MaxStale = sp_core::ConstU32<8>; type ServiceWeight = MessageQueueServiceWeight; + type IdleMaxServiceWeight = MessageQueueIdleServiceWeight; } impl cumulus_pallet_aura_ext::Config for Runtime {} @@ -458,6 +465,10 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime { type VersionWrapper = PolkadotXcm; // Enqueue XCMP messages from siblings for later processing. type XcmpQueue = TransformOrigin; + type MaxActiveOutboundChannels = ConstU32<128>; + // Most on-chain HRMP channels are configured to use 102400 bytes of max message size, so we + // need to set the page size larger than that until we reduce the channel size on-chain. + type MaxPageSize = ConstU32<{ 103 * 1024 }>; type MaxInboundSuspended = sp_core::ConstU32<1_000>; type ControllerOrigin = EitherOfDiverse, Fellows>; type ControllerOriginConverter = XcmOriginToTransactDispatchOrigin; @@ -465,6 +476,11 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime { type PriceForSiblingDelivery = PriceForSiblingParachainDelivery; } +impl cumulus_pallet_xcmp_queue::migration::v5::V5Config for Runtime { + // This must be the same as the `ChannelInfo` from the `Config`: + type ChannelList = ParachainSystem; +} + pub const PERIOD: u32 = 6 * HOURS; pub const OFFSET: u32 = 0; @@ -738,6 +754,9 @@ type Migrations = ( frame_support::migrations::RemovePallet, cumulus_pallet_xcmp_queue::migration::v4::MigrationToV4, pallet_collator_selection::migration::v2::MigrationToV2, + cumulus_pallet_xcmp_queue::migration::v5::MigrateV4ToV5, + pallet_core_fellowship::migration::MigrateV0ToV1, + pallet_core_fellowship::migration::MigrateV0ToV1, // permanent pallet_xcm::migration::MigrateToLatestXcmVersion, ); @@ -792,7 +811,7 @@ impl_runtime_apis! { } fn authorities() -> Vec { - Aura::authorities().into_inner() + pallet_aura::Authorities::::get().into_inner() } } @@ -814,7 +833,7 @@ impl_runtime_apis! { Executive::execute_block(block) } - fn initialize_block(header: &::Header) { + fn initialize_block(header: &::Header) -> sp_runtime::ExtrinsicInclusionMode { Executive::initialize_block(header) } } @@ -939,12 +958,16 @@ impl_runtime_apis! { } impl sp_genesis_builder::GenesisBuilder for Runtime { - fn create_default_config() -> Vec { - create_default_config::() + fn build_state(config: Vec) -> sp_genesis_builder::Result { + build_state::(config) + } + + fn get_preset(id: &Option) -> Option> { + get_preset::(id, |_| None) } - fn build_config(config: Vec) -> sp_genesis_builder::Result { - build_config::(config) + fn preset_names() -> Vec { + vec![] } } diff --git a/system-parachains/collectives/collectives-polkadot/src/weights/pallet_balances.rs b/system-parachains/collectives/collectives-polkadot/src/weights/pallet_balances.rs index 807972655b..3b3a73a8e6 100644 --- a/system-parachains/collectives/collectives-polkadot/src/weights/pallet_balances.rs +++ b/system-parachains/collectives/collectives-polkadot/src/weights/pallet_balances.rs @@ -148,6 +148,23 @@ impl pallet_balances::WeightInfo for WeightInfo { } /// Storage: `Balances::InactiveIssuance` (r:1 w:0) /// Proof: `Balances::InactiveIssuance` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) + fn burn_allow_death() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 27_491_000 picoseconds. + Weight::from_parts(28_444_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + fn burn_keep_alive() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 18_290_000 picoseconds. + Weight::from_parts(19_227_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + fn force_adjust_total_issuance() -> Weight { // Proof Size summary in bytes: // Measured: `0` diff --git a/system-parachains/collectives/collectives-polkadot/src/weights/pallet_scheduler.rs b/system-parachains/collectives/collectives-polkadot/src/weights/pallet_scheduler.rs index d15e52cce6..90dd85bd57 100644 --- a/system-parachains/collectives/collectives-polkadot/src/weights/pallet_scheduler.rs +++ b/system-parachains/collectives/collectives-polkadot/src/weights/pallet_scheduler.rs @@ -46,6 +46,73 @@ use core::marker::PhantomData; /// Weight functions for `pallet_scheduler`. pub struct WeightInfo(PhantomData); impl pallet_scheduler::WeightInfo for WeightInfo { +fn schedule_retry(s: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `159` + // Estimated: `110487` + // Minimum execution time: 14_155_000 picoseconds. + Weight::from_parts(16_447_031, 110487) + // Standard Error: 233 + .saturating_add(Weight::from_parts(8_424, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(4_u64)) + } + /// Storage: `Scheduler::Agenda` (r:1 w:0) + /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(107022), added: 109497, mode: `MaxEncodedLen`) + /// Storage: `Scheduler::Retries` (r:0 w:1) + /// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`) + fn set_retry() -> Weight { + // Proof Size summary in bytes: + // Measured: `81 + s * (177 ±0)` + // Estimated: `110487` + // Minimum execution time: 8_130_000 picoseconds. + Weight::from_parts(9_047_554, 110487) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } + /// Storage: `Scheduler::Lookup` (r:1 w:0) + /// Proof: `Scheduler::Lookup` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `Scheduler::Agenda` (r:1 w:0) + /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(107022), added: 109497, mode: `MaxEncodedLen`) + /// Storage: `Scheduler::Retries` (r:0 w:1) + /// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`) + fn set_retry_named() -> Weight { + // Proof Size summary in bytes: + // Measured: `647 + s * (178 ±0)` + // Estimated: `110487` + // Minimum execution time: 10_838_000 picoseconds. + Weight::from_parts(12_804_076, 110487) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } + /// Storage: `Scheduler::Agenda` (r:1 w:0) + /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(107022), added: 109497, mode: `MaxEncodedLen`) + /// Storage: `Scheduler::Retries` (r:0 w:1) + /// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`) + fn cancel_retry() -> Weight { + // Proof Size summary in bytes: + // Measured: `81 + s * (177 ±0)` + // Estimated: `110487` + // Minimum execution time: 8_130_000 picoseconds. + Weight::from_parts(9_047_554, 110487) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } + /// Storage: `Scheduler::Lookup` (r:1 w:0) + /// Proof: `Scheduler::Lookup` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `Scheduler::Agenda` (r:1 w:0) + /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(107022), added: 109497, mode: `MaxEncodedLen`) + /// Storage: `Scheduler::Retries` (r:0 w:1) + /// Proof: `Scheduler::Retries` (`max_values`: None, `max_size`: Some(30), added: 2505, mode: `MaxEncodedLen`) + fn cancel_retry_named() -> Weight { + // Proof Size summary in bytes: + // Measured: `647 + s * (178 ±0)` + // Estimated: `110487` + // Minimum execution time: 10_838_000 picoseconds. + Weight::from_parts(12_804_076, 110487) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } /// Storage: `Scheduler::IncompleteSince` (r:1 w:1) /// Proof: `Scheduler::IncompleteSince` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) fn service_agendas_base() -> Weight { diff --git a/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs b/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs index 29847a3fc0..08e48844b2 100644 --- a/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs +++ b/system-parachains/collectives/collectives-polkadot/src/xcm_config.rs @@ -202,6 +202,7 @@ pub struct XcmConfig; impl xcm_executor::Config for XcmConfig { type RuntimeCall = RuntimeCall; type XcmSender = XcmRouter; + type XcmRecorder = (); type AssetTransactor = FungibleTransactor; type OriginConverter = XcmOriginToTransactDispatchOrigin; // Collectives does not recognize a reserve location for any asset. Users must teleport DOT @@ -236,6 +237,9 @@ impl xcm_executor::Config for XcmConfig { type SafeCallFilter = Everything; type Aliasers = Nothing; type TransactionalProcessor = FrameTransactionalProcessor; + type HrmpNewChannelOpenRequestHandler = (); + type HrmpChannelAcceptedHandler = (); + type HrmpChannelClosingHandler = (); } /// Converts a local signed origin into an XCM location. diff --git a/system-parachains/coretime/coretime-kusama/Cargo.toml b/system-parachains/coretime/coretime-kusama/Cargo.toml index 27440eb04a..810e50bffd 100644 --- a/system-parachains/coretime/coretime-kusama/Cargo.toml +++ b/system-parachains/coretime/coretime-kusama/Cargo.toml @@ -28,7 +28,7 @@ frame-system = { workspace = true } frame-system-benchmarking = { optional = true, workspace = true } frame-system-rpc-runtime-api = { workspace = true } frame-try-runtime = { optional = true, workspace = true } -pallet-aura = { features = ["experimental"], workspace = true } +pallet-aura = { workspace = true } pallet-authorship = { workspace = true } pallet-balances = { workspace = true } pallet-message-queue = { workspace = true } @@ -66,14 +66,13 @@ xcm-executor = { workspace = true } # Cumulus cumulus-pallet-aura-ext = { workspace = true } -cumulus-pallet-parachain-system = { features = [ - "parameterized-consensus-hook", -], workspace = true } +cumulus-pallet-parachain-system = { workspace = true } cumulus-pallet-session-benchmarking = { workspace = true } cumulus-pallet-xcm = { workspace = true } cumulus-pallet-xcmp-queue = { workspace = true } cumulus-primitives-aura = { workspace = true } cumulus-primitives-core = { workspace = true } +cumulus-primitives-storage-weight-reclaim = { workspace = true } cumulus-primitives-utility = { workspace = true } pallet-collator-selection = { workspace = true } parachain-info = { workspace = true } @@ -96,6 +95,7 @@ std = [ "cumulus-pallet-xcmp-queue/std", "cumulus-primitives-aura/std", "cumulus-primitives-core/std", + "cumulus-primitives-storage-weight-reclaim/std", "cumulus-primitives-utility/std", "frame-benchmarking?/std", "frame-executive/std", @@ -204,8 +204,6 @@ try-runtime = [ "sp-runtime/try-runtime", ] -experimental = ["pallet-aura/experimental"] - fast-runtime = [] # Enable metadata hash generation at compile time for the `CheckMetadataHash` extension. diff --git a/system-parachains/coretime/coretime-kusama/src/coretime.rs b/system-parachains/coretime/coretime-kusama/src/coretime.rs index 6602f1c227..8c33500cd2 100644 --- a/system-parachains/coretime/coretime-kusama/src/coretime.rs +++ b/system-parachains/coretime/coretime-kusama/src/coretime.rs @@ -84,7 +84,7 @@ pub struct CoretimeAllocator; impl CoretimeInterface for CoretimeAllocator { type AccountId = AccountId; type Balance = Balance; - type RealyChainBlockNumberProvider = RelaychainDataProvider; + type RelayChainBlockNumberProvider = RelaychainDataProvider; fn request_core_count(count: CoreIndex) { use crate::coretime::CoretimeProviderCalls::RequestCoreCount; diff --git a/system-parachains/coretime/coretime-kusama/src/lib.rs b/system-parachains/coretime/coretime-kusama/src/lib.rs index 4df9a13435..aefd31d6f8 100644 --- a/system-parachains/coretime/coretime-kusama/src/lib.rs +++ b/system-parachains/coretime/coretime-kusama/src/lib.rs @@ -34,7 +34,7 @@ use cumulus_primitives_core::{AggregateMessageOrigin, ParaId}; use frame_support::{ construct_runtime, derive_impl, dispatch::DispatchClass, - genesis_builder_helper::{build_config, create_default_config}, + genesis_builder_helper::{build_state, get_preset}, parameter_types, traits::{ tokens::imbalance::ResolveTo, ConstBool, ConstU32, ConstU64, ConstU8, Contains, @@ -101,6 +101,7 @@ pub type SignedExtra = ( frame_system::CheckWeight, pallet_transaction_payment::ChargeTransactionPayment, frame_metadata_hash_extension::CheckMetadataHash, + cumulus_primitives_storage_weight_reclaim::StorageWeightReclaim, ); /// Unchecked extrinsic type as expected by this runtime. @@ -111,6 +112,9 @@ pub type UncheckedExtrinsic = pub type Migrations = ( pallet_xcm::migration::MigrateToLatestXcmVersion, pallet_collator_selection::migration::v2::MigrationToV2, + cumulus_pallet_xcmp_queue::migration::v5::MigrateV4ToV5, + pallet_broker::migration::MigrateV0ToV1, + pallet_broker::migration::MigrateV1ToV2, ); /// Executive: handles dispatch to the various modules. @@ -211,6 +215,11 @@ impl frame_system::Config for Runtime { /// The action to take on a Runtime Upgrade type OnSetCode = cumulus_pallet_parachain_system::ParachainSetCode; type MaxConsumers = ConstU32<16>; + type SingleBlockMigrations = (); + type MultiBlockMigrator = (); + type PreInherents = (); + type PostInherents = (); + type PostTransactions = (); } impl pallet_timestamp::Config for Runtime { @@ -290,6 +299,7 @@ type ConsensusHook = cumulus_pallet_aura_ext::FixedVelocityConsensusHook< parameter_types! { pub MessageQueueServiceWeight: Weight = Perbill::from_percent(35) * RuntimeBlockWeights::get().max_block; + pub MessageQueueIdleServiceWeight: Weight = Perbill::from_percent(20) * RuntimeBlockWeights::get().max_block; } impl pallet_message_queue::Config for Runtime { @@ -312,6 +322,7 @@ impl pallet_message_queue::Config for Runtime { type HeapSize = sp_core::ConstU32<{ 64 * 1024 }>; type MaxStale = sp_core::ConstU32<8>; type ServiceWeight = MessageQueueServiceWeight; + type IdleMaxServiceWeight = MessageQueueIdleServiceWeight; } impl parachain_info::Config for Runtime {} @@ -353,6 +364,10 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime { type ChannelInfo = ParachainSystem; type VersionWrapper = PolkadotXcm; type XcmpQueue = TransformOrigin; + type MaxActiveOutboundChannels = ConstU32<128>; + // Most on-chain HRMP channels are configured to use 102400 bytes of max message size, so we + // need to set the page size larger than that until we reduce the channel size on-chain. + type MaxPageSize = ConstU32<{ 103 * 1024 }>; type MaxInboundSuspended = sp_core::ConstU32<1_000>; type ControllerOrigin = RootOrFellows; type ControllerOriginConverter = XcmOriginToTransactDispatchOrigin; @@ -360,6 +375,11 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime { type PriceForSiblingDelivery = PriceForSiblingParachainDelivery; } +impl cumulus_pallet_xcmp_queue::migration::v5::V5Config for Runtime { + // This must be the same as the `ChannelInfo` from the `Config`: + type ChannelList = ParachainSystem; +} + pub const PERIOD: u32 = 6 * HOURS; pub const OFFSET: u32 = 0; @@ -636,7 +656,7 @@ impl_runtime_apis! { } fn authorities() -> Vec { - Aura::authorities().into_inner() + pallet_aura::Authorities::::get().into_inner() } } @@ -658,7 +678,7 @@ impl_runtime_apis! { Executive::execute_block(block) } - fn initialize_block(header: &::Header) { + fn initialize_block(header: &::Header) -> sp_runtime::ExtrinsicInclusionMode { Executive::initialize_block(header) } } @@ -1017,12 +1037,16 @@ impl_runtime_apis! { } impl sp_genesis_builder::GenesisBuilder for Runtime { - fn create_default_config() -> Vec { - create_default_config::() + fn build_state(config: Vec) -> sp_genesis_builder::Result { + build_state::(config) + } + + fn get_preset(id: &Option) -> Option> { + get_preset::(id, |_| None) } - fn build_config(config: Vec) -> sp_genesis_builder::Result { - build_config::(config) + fn preset_names() -> Vec { + vec![] } } } diff --git a/system-parachains/coretime/coretime-kusama/src/weights/pallet_balances.rs b/system-parachains/coretime/coretime-kusama/src/weights/pallet_balances.rs index dc51cb17bc..e96910c6df 100644 --- a/system-parachains/coretime/coretime-kusama/src/weights/pallet_balances.rs +++ b/system-parachains/coretime/coretime-kusama/src/weights/pallet_balances.rs @@ -149,6 +149,23 @@ impl pallet_balances::WeightInfo for WeightInfo { } /// Storage: `Balances::InactiveIssuance` (r:1 w:0) /// Proof: `Balances::InactiveIssuance` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) + fn burn_allow_death() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 27_491_000 picoseconds. + Weight::from_parts(28_444_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + fn burn_keep_alive() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 18_290_000 picoseconds. + Weight::from_parts(19_227_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + fn force_adjust_total_issuance() -> Weight { // Proof Size summary in bytes: // Measured: `0` 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 d0b4b1c09a..bc02a717e5 100644 --- a/system-parachains/coretime/coretime-kusama/src/weights/pallet_broker.rs +++ b/system-parachains/coretime/coretime-kusama/src/weights/pallet_broker.rs @@ -47,6 +47,17 @@ use core::marker::PhantomData; /// Weight functions for `pallet_broker`. pub struct WeightInfo(PhantomData); impl pallet_broker::WeightInfo for WeightInfo { + fn swap_leases() -> Weight { + // Proof Size summary in bytes: + // Measured: `470` + // Estimated: `1886` + // Minimum execution time: 6_597_000 picoseconds. + Weight::from_parts(6_969_000, 0) + .saturating_add(Weight::from_parts(0, 1886)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Broker::Configuration` (r:0 w:1) /// Proof: `Broker::Configuration` (`max_values`: Some(1), `max_size`: Some(31), added: 526, mode: `MaxEncodedLen`) fn configure() -> Weight { diff --git a/system-parachains/coretime/coretime-kusama/src/xcm_config.rs b/system-parachains/coretime/coretime-kusama/src/xcm_config.rs index a24a478e16..e16aa9f94b 100644 --- a/system-parachains/coretime/coretime-kusama/src/xcm_config.rs +++ b/system-parachains/coretime/coretime-kusama/src/xcm_config.rs @@ -187,6 +187,7 @@ pub struct XcmConfig; impl xcm_executor::Config for XcmConfig { type RuntimeCall = RuntimeCall; type XcmSender = XcmRouter; + type XcmRecorder = (); type AssetTransactor = AssetTransactors; type OriginConverter = XcmOriginToTransactDispatchOrigin; // Coretime chain does not recognize a reserve location for any asset. Users must teleport KSM @@ -226,6 +227,9 @@ impl xcm_executor::Config for XcmConfig { type SafeCallFilter = Everything; type Aliasers = Nothing; type TransactionalProcessor = FrameTransactionalProcessor; + type HrmpNewChannelOpenRequestHandler = (); + type HrmpChannelAcceptedHandler = (); + type HrmpChannelClosingHandler = (); } /// Converts a local signed origin into an XCM `Location``. Forms the basis for local origins diff --git a/system-parachains/encointer/Cargo.toml b/system-parachains/encointer/Cargo.toml index 1d44d5d5ff..0f75e3365b 100644 --- a/system-parachains/encointer/Cargo.toml +++ b/system-parachains/encointer/Cargo.toml @@ -50,7 +50,7 @@ frame-system-benchmarking = { optional = true, workspace = true } frame-system-rpc-runtime-api = { workspace = true } frame-try-runtime = { optional = true, workspace = true } pallet-asset-tx-payment = { workspace = true } -pallet-aura = { features = ["experimental"], workspace = true } +pallet-aura = { workspace = true } pallet-authorship = { workspace = true } pallet-balances = { workspace = true } pallet-collective = { workspace = true } @@ -87,9 +87,7 @@ xcm-executor = { workspace = true } # Cumulus dependencies cumulus-pallet-aura-ext = { workspace = true } -cumulus-pallet-parachain-system = { features = [ - "parameterized-consensus-hook", -], workspace = true } +cumulus-pallet-parachain-system = { workspace = true } cumulus-pallet-session-benchmarking = { optional = true, workspace = true } cumulus-pallet-xcm = { workspace = true } cumulus-pallet-xcmp-queue = { workspace = true } diff --git a/system-parachains/encointer/src/lib.rs b/system-parachains/encointer/src/lib.rs index 0bfa686116..0cce8191c3 100644 --- a/system-parachains/encointer/src/lib.rs +++ b/system-parachains/encointer/src/lib.rs @@ -53,7 +53,7 @@ pub use encointer_primitives::{ use frame_support::{ construct_runtime, dispatch::DispatchClass, - genesis_builder_helper::{build_config, create_default_config}, + genesis_builder_helper::{build_state, get_preset}, parameter_types, traits::{ fungibles::{Balanced, Credit}, @@ -277,6 +277,11 @@ impl frame_system::Config for Runtime { type SS58Prefix = SS58Prefix; type OnSetCode = cumulus_pallet_parachain_system::ParachainSetCode; type MaxConsumers = frame_support::traits::ConstU32<16>; + type SingleBlockMigrations = (); + type MultiBlockMigrator = (); + type PreInherents = (); + type PostInherents = (); + type PostTransactions = (); } parameter_types! { @@ -411,6 +416,10 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime { type ChannelInfo = ParachainSystem; type VersionWrapper = PolkadotXcm; type XcmpQueue = TransformOrigin; + type MaxActiveOutboundChannels = ConstU32<128>; + // Most on-chain HRMP channels are configured to use 102400 bytes of max message size, so we + // need to set the page size larger than that until we reduce the channel size on-chain. + type MaxPageSize = ConstU32<{ 103 * 1024 }>; type MaxInboundSuspended = sp_core::ConstU32<1_000>; type ControllerOrigin = EitherOfDiverse< EnsureRoot, @@ -421,8 +430,14 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime { type PriceForSiblingDelivery = PriceForSiblingParachainDelivery; } +impl cumulus_pallet_xcmp_queue::migration::v5::V5Config for Runtime { + // This must be the same as the `ChannelInfo` from the `Config`: + type ChannelList = ParachainSystem; +} + parameter_types! { pub MessageQueueServiceWeight: Weight = Perbill::from_percent(35) * RuntimeBlockWeights::get().max_block; + pub MessageQueueIdleServiceWeight: Weight = Perbill::from_percent(20) * RuntimeBlockWeights::get().max_block; } impl pallet_message_queue::Config for Runtime { @@ -445,6 +460,7 @@ impl pallet_message_queue::Config for Runtime { type HeapSize = sp_core::ConstU32<{ 64 * 1024 }>; type MaxStale = sp_core::ConstU32<8>; type ServiceWeight = MessageQueueServiceWeight; + type IdleMaxServiceWeight = MessageQueueIdleServiceWeight; } parameter_types! { @@ -737,6 +753,7 @@ parameter_types! { pub type Migrations = ( frame_support::migrations::RemovePallet, migrations_fix::collator_selection_init::v0::InitInvulnerables, + cumulus_pallet_xcmp_queue::migration::v5::MigrateV4ToV5, // permanent pallet_xcm::migration::MigrateToLatestXcmVersion, ); @@ -783,7 +800,7 @@ impl_runtime_apis! { } fn authorities() -> Vec { - Aura::authorities().into_inner() + pallet_aura::Authorities::::get().into_inner() } } @@ -805,7 +822,7 @@ impl_runtime_apis! { Executive::execute_block(block) } - fn initialize_block(header: &::Header) { + fn initialize_block(header: &::Header) -> sp_runtime::ExtrinsicInclusionMode { Executive::initialize_block(header) } } @@ -954,12 +971,16 @@ impl_runtime_apis! { } impl sp_genesis_builder::GenesisBuilder for Runtime { - fn create_default_config() -> Vec { - create_default_config::() + fn build_state(config: Vec) -> sp_genesis_builder::Result { + build_state::(config) + } + + fn get_preset(id: &Option) -> Option> { + get_preset::(id, |_| None) } - fn build_config(config: Vec) -> sp_genesis_builder::Result { - build_config::(config) + fn preset_names() -> Vec { + vec![] } } diff --git a/system-parachains/encointer/src/weights/pallet_balances.rs b/system-parachains/encointer/src/weights/pallet_balances.rs index a5ae1b6910..8fc054d81e 100644 --- a/system-parachains/encointer/src/weights/pallet_balances.rs +++ b/system-parachains/encointer/src/weights/pallet_balances.rs @@ -148,6 +148,23 @@ impl pallet_balances::WeightInfo for WeightInfo { } /// Storage: `Balances::InactiveIssuance` (r:1 w:0) /// Proof: `Balances::InactiveIssuance` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) + fn burn_allow_death() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 27_491_000 picoseconds. + Weight::from_parts(28_444_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + fn burn_keep_alive() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 18_290_000 picoseconds. + Weight::from_parts(19_227_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + fn force_adjust_total_issuance() -> Weight { // Proof Size summary in bytes: // Measured: `0` diff --git a/system-parachains/encointer/src/weights/pallet_membership.rs b/system-parachains/encointer/src/weights/pallet_membership.rs index f2e66edd6f..c79b52ca1c 100644 --- a/system-parachains/encointer/src/weights/pallet_membership.rs +++ b/system-parachains/encointer/src/weights/pallet_membership.rs @@ -46,6 +46,15 @@ use core::marker::PhantomData; /// Weight functions for `pallet_membership`. pub struct WeightInfo(PhantomData); impl pallet_membership::WeightInfo for WeightInfo { + fn reset_members(m: u32) -> Weight { + Weight::from_parts(10_462_422, 0) + .saturating_add(Weight::from_parts(0, 4687)) + // Standard Error: 247 + .saturating_add(Weight::from_parts(27_500, 0).saturating_mul(m.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(3)) + .saturating_add(Weight::from_parts(0, 64).saturating_mul(m.into())) + } /// Storage: `Membership::Members` (r:1 w:1) /// Proof: `Membership::Members` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`) /// Storage: `Collective::Proposals` (r:1 w:0) @@ -120,30 +129,6 @@ impl pallet_membership::WeightInfo for WeightInfo { /// Proof: `Membership::Members` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`) /// Storage: `Collective::Proposals` (r:1 w:0) /// Proof: `Collective::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `Membership::Prime` (r:1 w:0) - /// Proof: `Membership::Prime` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`) - /// Storage: `Collective::Members` (r:0 w:1) - /// Proof: `Collective::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `Collective::Prime` (r:0 w:1) - /// Proof: `Collective::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// The range of component `m` is `[1, 100]`. - fn reset_member(m: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `206 + m * (64 ±0)` - // Estimated: `4687 + m * (64 ±0)` - // Minimum execution time: 11_225_000 picoseconds. - Weight::from_parts(12_299_354, 0) - .saturating_add(Weight::from_parts(0, 4687)) - // Standard Error: 582 - .saturating_add(Weight::from_parts(130_831, 0).saturating_mul(m.into())) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(3)) - .saturating_add(Weight::from_parts(0, 64).saturating_mul(m.into())) - } - /// Storage: `Membership::Members` (r:1 w:1) - /// Proof: `Membership::Members` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`) - /// Storage: `Collective::Proposals` (r:1 w:0) - /// Proof: `Collective::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `Membership::Prime` (r:1 w:1) /// Proof: `Membership::Prime` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`) /// Storage: `Collective::Members` (r:0 w:1) @@ -189,7 +174,7 @@ impl pallet_membership::WeightInfo for WeightInfo { /// Storage: `Collective::Prime` (r:0 w:1) /// Proof: `Collective::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// The range of component `m` is `[1, 100]`. - fn clear_prime(_m: u32, ) -> Weight { + fn clear_prime() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` diff --git a/system-parachains/encointer/src/xcm_config.rs b/system-parachains/encointer/src/xcm_config.rs index dc91215ee9..ea6a44fd77 100644 --- a/system-parachains/encointer/src/xcm_config.rs +++ b/system-parachains/encointer/src/xcm_config.rs @@ -159,6 +159,7 @@ pub struct XcmConfig; impl xcm_executor::Config for XcmConfig { type RuntimeCall = RuntimeCall; type XcmSender = XcmRouter; + type XcmRecorder = (); type AssetTransactor = FungibleTransactor; type OriginConverter = XcmOriginToTransactDispatchOrigin; type IsReserve = NativeAsset; @@ -188,6 +189,9 @@ impl xcm_executor::Config for XcmConfig { type SafeCallFilter = Everything; type Aliasers = Nothing; type TransactionalProcessor = FrameTransactionalProcessor; + type HrmpNewChannelOpenRequestHandler = (); + type HrmpChannelAcceptedHandler = (); + type HrmpChannelClosingHandler = (); } /// Converts a local signed origin into an XCM location. diff --git a/system-parachains/gluttons/glutton-kusama/Cargo.toml b/system-parachains/gluttons/glutton-kusama/Cargo.toml index 192e6a9721..9886cf18e6 100644 --- a/system-parachains/gluttons/glutton-kusama/Cargo.toml +++ b/system-parachains/gluttons/glutton-kusama/Cargo.toml @@ -42,9 +42,7 @@ xcm-builder = { workspace = true } xcm-executor = { workspace = true } # Cumulus -cumulus-pallet-parachain-system = { features = [ - "parameterized-consensus-hook", -], workspace = true } +cumulus-pallet-parachain-system = { workspace = true } cumulus-pallet-xcm = { workspace = true } cumulus-primitives-core = { workspace = true } parachain-info = { workspace = true } diff --git a/system-parachains/gluttons/glutton-kusama/src/lib.rs b/system-parachains/gluttons/glutton-kusama/src/lib.rs index 82a33b746b..591157b7bb 100644 --- a/system-parachains/gluttons/glutton-kusama/src/lib.rs +++ b/system-parachains/gluttons/glutton-kusama/src/lib.rs @@ -64,7 +64,7 @@ use sp_version::RuntimeVersion; pub use frame_support::{ construct_runtime, dispatch::DispatchClass, - genesis_builder_helper::{build_config, create_default_config}, + genesis_builder_helper::{build_state, get_preset}, parameter_types, traits::{Everything, IsInVec, Randomness}, weights::{ @@ -165,6 +165,11 @@ impl frame_system::Config for Runtime { type SS58Prefix = SS58Prefix; type OnSetCode = cumulus_pallet_parachain_system::ParachainSetCode; type MaxConsumers = frame_support::traits::ConstU32<16>; + type SingleBlockMigrations = (); + type MultiBlockMigrator = (); + type PreInherents = (); + type PostInherents = (); + type PostTransactions = (); } parameter_types! { @@ -191,6 +196,7 @@ impl parachain_info::Config for Runtime {} parameter_types! { pub MessageQueueServiceWeight: Weight = Perbill::from_percent(35) * RuntimeBlockWeights::get().max_block; + pub MessageQueueIdleServiceWeight: Weight = Perbill::from_percent(20) * RuntimeBlockWeights::get().max_block; } impl pallet_message_queue::Config for Runtime { @@ -212,6 +218,7 @@ impl pallet_message_queue::Config for Runtime { type HeapSize = sp_core::ConstU32<{ 64 * 1024 }>; type MaxStale = sp_core::ConstU32<8>; type ServiceWeight = MessageQueueServiceWeight; + type IdleMaxServiceWeight = MessageQueueIdleServiceWeight; } impl pallet_glutton::Config for Runtime { @@ -303,7 +310,7 @@ impl_runtime_apis! { Executive::execute_block(block) } - fn initialize_block(header: &::Header) { + fn initialize_block(header: &::Header) -> sp_runtime::ExtrinsicInclusionMode { Executive::initialize_block(header) } } @@ -381,12 +388,16 @@ impl_runtime_apis! { } impl sp_genesis_builder::GenesisBuilder for Runtime { - fn create_default_config() -> Vec { - create_default_config::() + fn build_state(config: Vec) -> sp_genesis_builder::Result { + build_state::(config) } - fn build_config(config: Vec) -> sp_genesis_builder::Result { - build_config::(config) + fn get_preset(id: &Option) -> Option> { + get_preset::(id, |_| None) + } + + fn preset_names() -> Vec { + vec![] } } diff --git a/system-parachains/gluttons/glutton-kusama/src/xcm_config.rs b/system-parachains/gluttons/glutton-kusama/src/xcm_config.rs index 0c7f2cac18..00dbd9cea1 100644 --- a/system-parachains/gluttons/glutton-kusama/src/xcm_config.rs +++ b/system-parachains/gluttons/glutton-kusama/src/xcm_config.rs @@ -61,6 +61,7 @@ pub struct XcmConfig; impl xcm_executor::Config for XcmConfig { type RuntimeCall = RuntimeCall; type XcmSender = (); // sending XCM not supported + type XcmRecorder = (); type AssetTransactor = (); // balances not supported type OriginConverter = XcmOriginToTransactDispatchOrigin; type IsReserve = (); // balances not supported @@ -84,6 +85,9 @@ impl xcm_executor::Config for XcmConfig { type SafeCallFilter = Everything; type Aliasers = Nothing; type TransactionalProcessor = FrameTransactionalProcessor; + type HrmpNewChannelOpenRequestHandler = (); + type HrmpChannelAcceptedHandler = (); + type HrmpChannelClosingHandler = (); } impl cumulus_pallet_xcm::Config for Runtime { diff --git a/system-parachains/people/people-kusama/Cargo.toml b/system-parachains/people/people-kusama/Cargo.toml index 83b82c29c6..9ebd65ac38 100644 --- a/system-parachains/people/people-kusama/Cargo.toml +++ b/system-parachains/people/people-kusama/Cargo.toml @@ -25,7 +25,7 @@ frame-system = { workspace = true } frame-system-benchmarking = { optional = true, workspace = true } frame-system-rpc-runtime-api = { workspace = true } frame-try-runtime = { optional = true, workspace = true } -pallet-aura = { features = ["experimental"], workspace = true } +pallet-aura = { workspace = true } pallet-authorship = { workspace = true } pallet-balances = { workspace = true } pallet-identity = { workspace = true } @@ -65,13 +65,12 @@ xcm-executor = { workspace = true } # Cumulus cumulus-primitives-aura = { workspace = true } cumulus-pallet-aura-ext = { workspace = true } -cumulus-pallet-parachain-system = { features = [ - "parameterized-consensus-hook", -], workspace = true } +cumulus-pallet-parachain-system = { workspace = true } cumulus-pallet-session-benchmarking = { workspace = true } cumulus-pallet-xcm = { workspace = true } cumulus-pallet-xcmp-queue = { workspace = true } cumulus-primitives-core = { workspace = true } +cumulus-primitives-storage-weight-reclaim = { workspace = true } cumulus-primitives-utility = { workspace = true } pallet-collator-selection = { workspace = true } parachain-info = { workspace = true } @@ -93,6 +92,7 @@ std = [ "cumulus-primitives-aura/std", "cumulus-primitives-core/std", "cumulus-primitives-utility/std", + "cumulus-primitives-storage-weight-reclaim/std", "enumflags2/std", "frame-benchmarking?/std", "frame-executive/std", diff --git a/system-parachains/people/people-kusama/src/lib.rs b/system-parachains/people/people-kusama/src/lib.rs index 710fff6aa7..5e82749ca7 100644 --- a/system-parachains/people/people-kusama/src/lib.rs +++ b/system-parachains/people/people-kusama/src/lib.rs @@ -29,7 +29,7 @@ use cumulus_primitives_core::{AggregateMessageOrigin, ParaId}; use frame_support::{ construct_runtime, derive_impl, dispatch::DispatchClass, - genesis_builder_helper::{build_config, create_default_config}, + genesis_builder_helper::{build_state, get_preset}, parameter_types, traits::{ tokens::imbalance::ResolveTo, ConstBool, ConstU32, ConstU64, ConstU8, EitherOfDiverse, @@ -133,6 +133,7 @@ pub type SignedExtra = ( frame_system::CheckWeight, pallet_transaction_payment::ChargeTransactionPayment, frame_metadata_hash_extension::CheckMetadataHash, + cumulus_primitives_storage_weight_reclaim::StorageWeightReclaim, ); /// Unchecked extrinsic type as expected by this runtime. @@ -150,6 +151,7 @@ pub type Migrations = ( IdentityMigratorPalletName, ::DbWeight, >, + cumulus_pallet_xcmp_queue::migration::v5::MigrateV4ToV5, // permanent pallet_xcm::migration::MigrateToLatestXcmVersion, ); @@ -228,6 +230,11 @@ impl frame_system::Config for Runtime { type SS58Prefix = SS58Prefix; type OnSetCode = cumulus_pallet_parachain_system::ParachainSetCode; type MaxConsumers = ConstU32<16>; + type SingleBlockMigrations = (); + type MultiBlockMigrator = (); + type PreInherents = (); + type PostInherents = (); + type PostTransactions = (); } impl pallet_timestamp::Config for Runtime { @@ -306,8 +313,8 @@ type ConsensusHook = cumulus_pallet_aura_ext::FixedVelocityConsensusHook< >; parameter_types! { - pub MessageQueueServiceWeight: Weight = - Perbill::from_percent(35) * RuntimeBlockWeights::get().max_block; + pub MessageQueueServiceWeight: Weight = Perbill::from_percent(35) * RuntimeBlockWeights::get().max_block; + pub MessageQueueIdleServiceWeight: Weight = Perbill::from_percent(20) * RuntimeBlockWeights::get().max_block; } impl pallet_message_queue::Config for Runtime { @@ -330,6 +337,7 @@ impl pallet_message_queue::Config for Runtime { type MaxStale = sp_core::ConstU32<8>; type ServiceWeight = MessageQueueServiceWeight; type WeightInfo = weights::pallet_message_queue::WeightInfo; + type IdleMaxServiceWeight = MessageQueueIdleServiceWeight; } impl parachain_info::Config for Runtime {} @@ -352,6 +360,10 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime { type ChannelInfo = ParachainSystem; type VersionWrapper = PolkadotXcm; type XcmpQueue = TransformOrigin; + type MaxActiveOutboundChannels = ConstU32<128>; + // Most on-chain HRMP channels are configured to use 102400 bytes of max message size, so we + // need to set the page size larger than that until we reduce the channel size on-chain. + type MaxPageSize = ConstU32<{ 103 * 1024 }>; type MaxInboundSuspended = sp_core::ConstU32<1_000>; type ControllerOrigin = RootOrFellows; type ControllerOriginConverter = XcmOriginToTransactDispatchOrigin; @@ -359,6 +371,11 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime { type WeightInfo = weights::cumulus_pallet_xcmp_queue::WeightInfo; } +impl cumulus_pallet_xcmp_queue::migration::v5::V5Config for Runtime { + // This must be the same as the `ChannelInfo` from the `Config`: + type ChannelList = ParachainSystem; +} + pub const PERIOD: u32 = 6 * HOURS; pub const OFFSET: u32 = 0; @@ -626,7 +643,7 @@ impl_runtime_apis! { } fn authorities() -> Vec { - Aura::authorities().into_inner() + pallet_aura::Authorities::::get().into_inner() } } @@ -648,7 +665,7 @@ impl_runtime_apis! { Executive::execute_block(block) } - fn initialize_block(header: &::Header) { + fn initialize_block(header: &::Header) -> sp_runtime::ExtrinsicInclusionMode { Executive::initialize_block(header) } } @@ -1005,12 +1022,16 @@ impl_runtime_apis! { } impl sp_genesis_builder::GenesisBuilder for Runtime { - fn create_default_config() -> Vec { - create_default_config::() + fn build_state(config: Vec) -> sp_genesis_builder::Result { + build_state::(config) + } + + fn get_preset(id: &Option) -> Option> { + get_preset::(id, |_| None) } - fn build_config(config: Vec) -> sp_genesis_builder::Result { - build_config::(config) + fn preset_names() -> Vec { + vec![] } } } diff --git a/system-parachains/people/people-kusama/src/people.rs b/system-parachains/people/people-kusama/src/people.rs index 5f260c9a3d..dc2c708bce 100644 --- a/system-parachains/people/people-kusama/src/people.rs +++ b/system-parachains/people/people-kusama/src/people.rs @@ -39,8 +39,14 @@ parameter_types! { pub const SubAccountDeposit: Balance = system_para_deposit(1, 53); pub RelayTreasuryAccount: AccountId = parachains_common::TREASURY_PALLET_ID.into_account_truncating(); + pub const GeneralAdminBodyId: BodyId = BodyId::Administration; } +pub type IdentityAdminOrigin = EitherOfDiverse< + EnsureRoot, + EnsureXcm>, +>; + impl pallet_identity::Config for Runtime { type RuntimeEvent = RuntimeEvent; type Currency = Balances; @@ -52,10 +58,10 @@ impl pallet_identity::Config for Runtime { type MaxRegistrars = ConstU32<20>; type Slashed = ToParentTreasury; type ForceOrigin = EnsureRoot; - type RegistrarOrigin = EnsureRoot; + type RegistrarOrigin = IdentityAdminOrigin; type OffchainSignature = Signature; type SigningPublicKey = ::Signer; - type UsernameAuthorityOrigin = EnsureRoot; + type UsernameAuthorityOrigin = IdentityAdminOrigin; type PendingUsernameExpiration = ConstU32<{ 7 * DAYS }>; type MaxSuffixLength = ConstU32<7>; type MaxUsernameLength = ConstU32<32>; diff --git a/system-parachains/people/people-kusama/src/weights/pallet_balances.rs b/system-parachains/people/people-kusama/src/weights/pallet_balances.rs index 6997b05c00..bae88845e8 100644 --- a/system-parachains/people/people-kusama/src/weights/pallet_balances.rs +++ b/system-parachains/people/people-kusama/src/weights/pallet_balances.rs @@ -148,6 +148,23 @@ impl pallet_balances::WeightInfo for WeightInfo { } /// Storage: `Balances::InactiveIssuance` (r:1 w:0) /// Proof: `Balances::InactiveIssuance` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `MaxEncodedLen`) + fn burn_allow_death() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 27_491_000 picoseconds. + Weight::from_parts(28_444_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + fn burn_keep_alive() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 18_290_000 picoseconds. + Weight::from_parts(19_227_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + fn force_adjust_total_issuance() -> Weight { // Proof Size summary in bytes: // Measured: `0` diff --git a/system-parachains/people/people-kusama/src/xcm_config.rs b/system-parachains/people/people-kusama/src/xcm_config.rs index 8cffb3424f..2512cb7db1 100644 --- a/system-parachains/people/people-kusama/src/xcm_config.rs +++ b/system-parachains/people/people-kusama/src/xcm_config.rs @@ -190,6 +190,7 @@ pub struct XcmConfig; impl xcm_executor::Config for XcmConfig { type RuntimeCall = RuntimeCall; type XcmSender = XcmRouter; + type XcmRecorder = (); type AssetTransactor = FungibleTransactor; type OriginConverter = XcmOriginToTransactDispatchOrigin; // People chain does not recognize a reserve location for any asset. Users must teleport KSM @@ -229,6 +230,9 @@ impl xcm_executor::Config for XcmConfig { type SafeCallFilter = Everything; type Aliasers = Nothing; type TransactionalProcessor = FrameTransactionalProcessor; + type HrmpNewChannelOpenRequestHandler = (); + type HrmpChannelAcceptedHandler = (); + type HrmpChannelClosingHandler = (); } /// Converts a local signed origin into an XCM location. Forms the basis for local origins diff --git a/system-parachains/people/people-polkadot/Cargo.toml b/system-parachains/people/people-polkadot/Cargo.toml index 281c091473..5fbf1bc4d0 100644 --- a/system-parachains/people/people-polkadot/Cargo.toml +++ b/system-parachains/people/people-polkadot/Cargo.toml @@ -25,7 +25,7 @@ frame-system = { workspace = true } frame-system-benchmarking = { optional = true, workspace = true } frame-system-rpc-runtime-api = { workspace = true } frame-try-runtime = { optional = true, workspace = true } -pallet-aura = { features = ["experimental"], workspace = true } +pallet-aura = { workspace = true } pallet-authorship = { workspace = true } pallet-balances = { workspace = true } pallet-identity = { workspace = true } @@ -64,9 +64,7 @@ xcm-executor = { workspace = true } # Cumulus cumulus-primitives-aura = { workspace = true } cumulus-pallet-aura-ext = { workspace = true } -cumulus-pallet-parachain-system = { features = [ - "parameterized-consensus-hook", -], workspace = true } +cumulus-pallet-parachain-system = { workspace = true } cumulus-pallet-session-benchmarking = { workspace = true } cumulus-pallet-xcm = { workspace = true } cumulus-pallet-xcmp-queue = { workspace = true } diff --git a/system-parachains/people/people-polkadot/src/lib.rs b/system-parachains/people/people-polkadot/src/lib.rs index 717c1f7b91..001115df32 100644 --- a/system-parachains/people/people-polkadot/src/lib.rs +++ b/system-parachains/people/people-polkadot/src/lib.rs @@ -28,7 +28,7 @@ use cumulus_primitives_core::{AggregateMessageOrigin, ParaId}; use frame_support::{ construct_runtime, derive_impl, dispatch::DispatchClass, - genesis_builder_helper::{build_config, create_default_config}, + genesis_builder_helper::{build_state, get_preset}, parameter_types, traits::{ tokens::imbalance::ResolveTo, ConstBool, ConstU32, ConstU64, ConstU8, EitherOfDiverse, @@ -103,6 +103,7 @@ pub type UncheckedExtrinsic = /// Migrations to apply on runtime upgrade. pub type Migrations = ( + cumulus_pallet_xcmp_queue::migration::v5::MigrateV4ToV5, // permanent pallet_xcm::migration::MigrateToLatestXcmVersion, ); @@ -259,8 +260,8 @@ type ConsensusHook = cumulus_pallet_aura_ext::FixedVelocityConsensusHook< >; parameter_types! { - pub MessageQueueServiceWeight: Weight = - Perbill::from_percent(35) * RuntimeBlockWeights::get().max_block; + pub MessageQueueServiceWeight: Weight = Perbill::from_percent(35) * RuntimeBlockWeights::get().max_block; + pub MessageQueueIdleServiceWeight: Weight = Perbill::from_percent(20) * RuntimeBlockWeights::get().max_block; } impl pallet_message_queue::Config for Runtime { @@ -282,6 +283,7 @@ impl pallet_message_queue::Config for Runtime { type HeapSize = sp_core::ConstU32<{ 64 * 1024 }>; type MaxStale = sp_core::ConstU32<8>; type ServiceWeight = MessageQueueServiceWeight; + type IdleMaxServiceWeight = MessageQueueIdleServiceWeight; type WeightInfo = weights::pallet_message_queue::WeightInfo; } @@ -305,6 +307,10 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime { type ChannelInfo = ParachainSystem; type VersionWrapper = PolkadotXcm; type XcmpQueue = TransformOrigin; + type MaxActiveOutboundChannels = ConstU32<128>; + // Most on-chain HRMP channels are configured to use 102400 bytes of max message size, so we + // need to set the page size larger than that until we reduce the channel size on-chain. + type MaxPageSize = ConstU32<{ 103 * 1024 }>; type MaxInboundSuspended = sp_core::ConstU32<1_000>; type ControllerOrigin = RootOrFellows; type ControllerOriginConverter = XcmOriginToTransactDispatchOrigin; @@ -312,6 +318,11 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime { type WeightInfo = weights::cumulus_pallet_xcmp_queue::WeightInfo; } +impl cumulus_pallet_xcmp_queue::migration::v5::V5Config for Runtime { + // This must be the same as the `ChannelInfo` from the `Config`: + type ChannelList = ParachainSystem; +} + pub const PERIOD: u32 = 6 * HOURS; pub const OFFSET: u32 = 0; @@ -584,7 +595,7 @@ impl_runtime_apis! { } fn authorities() -> Vec { - Aura::authorities().into_inner() + pallet_aura::Authorities::::get().into_inner() } } @@ -606,7 +617,7 @@ impl_runtime_apis! { Executive::execute_block(block) } - fn initialize_block(header: &::Header) { + fn initialize_block(header: &::Header) -> sp_runtime::ExtrinsicInclusionMode { Executive::initialize_block(header) } } @@ -963,12 +974,16 @@ impl_runtime_apis! { } impl sp_genesis_builder::GenesisBuilder for Runtime { - fn create_default_config() -> Vec { - create_default_config::() + fn build_state(config: Vec) -> sp_genesis_builder::Result { + build_state::(config) + } + + fn get_preset(id: &Option) -> Option> { + get_preset::(id, |_| None) } - fn build_config(config: Vec) -> sp_genesis_builder::Result { - build_config::(config) + fn preset_names() -> Vec { + vec![] } } } diff --git a/system-parachains/people/people-polkadot/src/people.rs b/system-parachains/people/people-polkadot/src/people.rs index 5f260c9a3d..026ec0f881 100644 --- a/system-parachains/people/people-polkadot/src/people.rs +++ b/system-parachains/people/people-polkadot/src/people.rs @@ -28,6 +28,8 @@ use sp_runtime::{ RuntimeDebug, }; use sp_std::prelude::*; +use xcm::latest::prelude::BodyId; +use xcm_config::GovernanceLocation; parameter_types! { // 27 | Min encoded size of `Registration` @@ -39,8 +41,14 @@ parameter_types! { pub const SubAccountDeposit: Balance = system_para_deposit(1, 53); pub RelayTreasuryAccount: AccountId = parachains_common::TREASURY_PALLET_ID.into_account_truncating(); + pub const GeneralAdminBodyId: BodyId = BodyId::Administration; } +pub type IdentityAdminOrigin = EitherOfDiverse< + EnsureRoot, + EnsureXcm>, +>; + impl pallet_identity::Config for Runtime { type RuntimeEvent = RuntimeEvent; type Currency = Balances; @@ -52,10 +60,10 @@ impl pallet_identity::Config for Runtime { type MaxRegistrars = ConstU32<20>; type Slashed = ToParentTreasury; type ForceOrigin = EnsureRoot; - type RegistrarOrigin = EnsureRoot; + type RegistrarOrigin = IdentityAdminOrigin; type OffchainSignature = Signature; type SigningPublicKey = ::Signer; - type UsernameAuthorityOrigin = EnsureRoot; + type UsernameAuthorityOrigin = IdentityAdminOrigin; type PendingUsernameExpiration = ConstU32<{ 7 * DAYS }>; type MaxSuffixLength = ConstU32<7>; type MaxUsernameLength = ConstU32<32>; diff --git a/system-parachains/people/people-polkadot/src/weights/pallet_balances.rs b/system-parachains/people/people-polkadot/src/weights/pallet_balances.rs index d9709cf621..76d4178d88 100644 --- a/system-parachains/people/people-polkadot/src/weights/pallet_balances.rs +++ b/system-parachains/people/people-polkadot/src/weights/pallet_balances.rs @@ -131,6 +131,22 @@ impl pallet_balances::WeightInfo for WeightInfo { .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } + fn burn_allow_death() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 27_491_000 picoseconds. + Weight::from_parts(28_444_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + fn burn_keep_alive() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 18_290_000 picoseconds. + Weight::from_parts(19_227_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } /// Storage: `System::Account` (r:999 w:999) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// The range of component `u` is `[1, 1000]`. diff --git a/system-parachains/people/people-polkadot/src/xcm_config.rs b/system-parachains/people/people-polkadot/src/xcm_config.rs index 099c56e123..e3f1a6c245 100644 --- a/system-parachains/people/people-polkadot/src/xcm_config.rs +++ b/system-parachains/people/people-polkadot/src/xcm_config.rs @@ -252,6 +252,10 @@ impl xcm_executor::Config for XcmConfig { type SafeCallFilter = Everything; type Aliasers = Nothing; type TransactionalProcessor = FrameTransactionalProcessor; + type HrmpNewChannelOpenRequestHandler = (); + type HrmpChannelAcceptedHandler = (); + type HrmpChannelClosingHandler = (); + type XcmRecorder = (); } /// Converts a local signed origin into an XCM location. Forms the basis for local origins