From 1d8f646f5bb42ac8acd7373703756b0510cc6b46 Mon Sep 17 00:00:00 2001 From: Alexander Popiak Date: Fri, 20 Oct 2023 16:31:17 +0200 Subject: [PATCH] fix compile issues --- Cargo.lock | 50 +++++++++---------- .../parachain-runtime-mock/src/lib.rs | 1 + integration-tests/src/xcm_rate_limiter.rs | 4 ++ runtime/basilisk/src/weights/xcmp_queue.rs | 17 ++++++- runtime/basilisk/src/xcm.rs | 1 + 5 files changed, 47 insertions(+), 26 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f3f93b568e..7edb6cae7f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1636,7 +1636,7 @@ dependencies = [ [[package]] name = "cumulus-client-cli" version = "0.1.0" -source = "git+https://github.com/galacticcouncil/cumulus.git?branch=feat/xcmp-defer-xcm-v9-38#a03c6bd502c64900c29df35c76ba1504debc5169" +source = "git+https://github.com/galacticcouncil/cumulus.git?branch=feat/xcmp-defer-xcm-v9-38#bc34ec33523285a27e9b47775bd9dbea3a18276a" dependencies = [ "clap", "parity-scale-codec", @@ -1651,7 +1651,7 @@ dependencies = [ [[package]] name = "cumulus-client-collator" version = "0.1.0" -source = "git+https://github.com/galacticcouncil/cumulus.git?branch=feat/xcmp-defer-xcm-v9-38#a03c6bd502c64900c29df35c76ba1504debc5169" +source = "git+https://github.com/galacticcouncil/cumulus.git?branch=feat/xcmp-defer-xcm-v9-38#bc34ec33523285a27e9b47775bd9dbea3a18276a" dependencies = [ "cumulus-client-consensus-common", "cumulus-client-network", @@ -1674,7 +1674,7 @@ dependencies = [ [[package]] name = "cumulus-client-consensus-aura" version = "0.1.0" -source = "git+https://github.com/galacticcouncil/cumulus.git?branch=feat/xcmp-defer-xcm-v9-38#a03c6bd502c64900c29df35c76ba1504debc5169" +source = "git+https://github.com/galacticcouncil/cumulus.git?branch=feat/xcmp-defer-xcm-v9-38#bc34ec33523285a27e9b47775bd9dbea3a18276a" dependencies = [ "async-trait", "cumulus-client-consensus-common", @@ -1703,7 +1703,7 @@ dependencies = [ [[package]] name = "cumulus-client-consensus-common" version = "0.1.0" -source = "git+https://github.com/galacticcouncil/cumulus.git?branch=feat/xcmp-defer-xcm-v9-38#a03c6bd502c64900c29df35c76ba1504debc5169" +source = "git+https://github.com/galacticcouncil/cumulus.git?branch=feat/xcmp-defer-xcm-v9-38#bc34ec33523285a27e9b47775bd9dbea3a18276a" dependencies = [ "async-trait", "cumulus-client-pov-recovery", @@ -1726,7 +1726,7 @@ dependencies = [ [[package]] name = "cumulus-client-consensus-relay-chain" version = "0.1.0" -source = "git+https://github.com/galacticcouncil/cumulus.git?branch=feat/xcmp-defer-xcm-v9-38#a03c6bd502c64900c29df35c76ba1504debc5169" +source = "git+https://github.com/galacticcouncil/cumulus.git?branch=feat/xcmp-defer-xcm-v9-38#bc34ec33523285a27e9b47775bd9dbea3a18276a" dependencies = [ "async-trait", "cumulus-client-consensus-common", @@ -1749,7 +1749,7 @@ dependencies = [ [[package]] name = "cumulus-client-network" version = "0.1.0" -source = "git+https://github.com/galacticcouncil/cumulus.git?branch=feat/xcmp-defer-xcm-v9-38#a03c6bd502c64900c29df35c76ba1504debc5169" +source = "git+https://github.com/galacticcouncil/cumulus.git?branch=feat/xcmp-defer-xcm-v9-38#bc34ec33523285a27e9b47775bd9dbea3a18276a" dependencies = [ "async-trait", "cumulus-relay-chain-interface", @@ -1772,7 +1772,7 @@ dependencies = [ [[package]] name = "cumulus-client-pov-recovery" version = "0.1.0" -source = "git+https://github.com/galacticcouncil/cumulus.git?branch=feat/xcmp-defer-xcm-v9-38#a03c6bd502c64900c29df35c76ba1504debc5169" +source = "git+https://github.com/galacticcouncil/cumulus.git?branch=feat/xcmp-defer-xcm-v9-38#bc34ec33523285a27e9b47775bd9dbea3a18276a" dependencies = [ "cumulus-primitives-core", "cumulus-relay-chain-interface", @@ -1795,7 +1795,7 @@ dependencies = [ [[package]] name = "cumulus-client-service" version = "0.1.0" -source = "git+https://github.com/galacticcouncil/cumulus.git?branch=feat/xcmp-defer-xcm-v9-38#a03c6bd502c64900c29df35c76ba1504debc5169" +source = "git+https://github.com/galacticcouncil/cumulus.git?branch=feat/xcmp-defer-xcm-v9-38#bc34ec33523285a27e9b47775bd9dbea3a18276a" dependencies = [ "cumulus-client-cli", "cumulus-client-collator", @@ -1823,7 +1823,7 @@ dependencies = [ [[package]] name = "cumulus-pallet-aura-ext" version = "0.1.0" -source = "git+https://github.com/galacticcouncil/cumulus.git?branch=feat/xcmp-defer-xcm-v9-38#a03c6bd502c64900c29df35c76ba1504debc5169" +source = "git+https://github.com/galacticcouncil/cumulus.git?branch=feat/xcmp-defer-xcm-v9-38#bc34ec33523285a27e9b47775bd9dbea3a18276a" dependencies = [ "frame-support", "frame-system", @@ -1839,7 +1839,7 @@ dependencies = [ [[package]] name = "cumulus-pallet-dmp-queue" version = "0.1.0" -source = "git+https://github.com/galacticcouncil/cumulus.git?branch=feat/xcmp-defer-xcm-v9-38#a03c6bd502c64900c29df35c76ba1504debc5169" +source = "git+https://github.com/galacticcouncil/cumulus.git?branch=feat/xcmp-defer-xcm-v9-38#bc34ec33523285a27e9b47775bd9dbea3a18276a" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -1856,7 +1856,7 @@ dependencies = [ [[package]] name = "cumulus-pallet-parachain-system" version = "0.1.0" -source = "git+https://github.com/galacticcouncil/cumulus.git?branch=feat/xcmp-defer-xcm-v9-38#a03c6bd502c64900c29df35c76ba1504debc5169" +source = "git+https://github.com/galacticcouncil/cumulus.git?branch=feat/xcmp-defer-xcm-v9-38#bc34ec33523285a27e9b47775bd9dbea3a18276a" dependencies = [ "bytes", "cumulus-pallet-parachain-system-proc-macro", @@ -1885,7 +1885,7 @@ dependencies = [ [[package]] name = "cumulus-pallet-parachain-system-proc-macro" version = "0.1.0" -source = "git+https://github.com/galacticcouncil/cumulus.git?branch=feat/xcmp-defer-xcm-v9-38#a03c6bd502c64900c29df35c76ba1504debc5169" +source = "git+https://github.com/galacticcouncil/cumulus.git?branch=feat/xcmp-defer-xcm-v9-38#bc34ec33523285a27e9b47775bd9dbea3a18276a" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -1896,7 +1896,7 @@ dependencies = [ [[package]] name = "cumulus-pallet-xcm" version = "0.1.0" -source = "git+https://github.com/galacticcouncil/cumulus.git?branch=feat/xcmp-defer-xcm-v9-38#a03c6bd502c64900c29df35c76ba1504debc5169" +source = "git+https://github.com/galacticcouncil/cumulus.git?branch=feat/xcmp-defer-xcm-v9-38#bc34ec33523285a27e9b47775bd9dbea3a18276a" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -1912,7 +1912,7 @@ dependencies = [ [[package]] name = "cumulus-pallet-xcmp-queue" version = "0.2.0" -source = "git+https://github.com/galacticcouncil/cumulus.git?branch=feat/xcmp-defer-xcm-v9-38#a03c6bd502c64900c29df35c76ba1504debc5169" +source = "git+https://github.com/galacticcouncil/cumulus.git?branch=feat/xcmp-defer-xcm-v9-38#bc34ec33523285a27e9b47775bd9dbea3a18276a" dependencies = [ "cumulus-primitives-core", "frame-benchmarking", @@ -1934,7 +1934,7 @@ dependencies = [ [[package]] name = "cumulus-primitives-core" version = "0.1.0" -source = "git+https://github.com/galacticcouncil/cumulus.git?branch=feat/xcmp-defer-xcm-v9-38#a03c6bd502c64900c29df35c76ba1504debc5169" +source = "git+https://github.com/galacticcouncil/cumulus.git?branch=feat/xcmp-defer-xcm-v9-38#bc34ec33523285a27e9b47775bd9dbea3a18276a" dependencies = [ "parity-scale-codec", "polkadot-core-primitives", @@ -1950,7 +1950,7 @@ dependencies = [ [[package]] name = "cumulus-primitives-parachain-inherent" version = "0.1.0" -source = "git+https://github.com/galacticcouncil/cumulus.git?branch=feat/xcmp-defer-xcm-v9-38#a03c6bd502c64900c29df35c76ba1504debc5169" +source = "git+https://github.com/galacticcouncil/cumulus.git?branch=feat/xcmp-defer-xcm-v9-38#bc34ec33523285a27e9b47775bd9dbea3a18276a" dependencies = [ "async-trait", "cumulus-primitives-core", @@ -1973,7 +1973,7 @@ dependencies = [ [[package]] name = "cumulus-primitives-timestamp" version = "0.1.0" -source = "git+https://github.com/galacticcouncil/cumulus.git?branch=feat/xcmp-defer-xcm-v9-38#a03c6bd502c64900c29df35c76ba1504debc5169" +source = "git+https://github.com/galacticcouncil/cumulus.git?branch=feat/xcmp-defer-xcm-v9-38#bc34ec33523285a27e9b47775bd9dbea3a18276a" dependencies = [ "cumulus-primitives-core", "futures", @@ -1986,7 +1986,7 @@ dependencies = [ [[package]] name = "cumulus-primitives-utility" version = "0.1.0" -source = "git+https://github.com/galacticcouncil/cumulus.git?branch=feat/xcmp-defer-xcm-v9-38#a03c6bd502c64900c29df35c76ba1504debc5169" +source = "git+https://github.com/galacticcouncil/cumulus.git?branch=feat/xcmp-defer-xcm-v9-38#bc34ec33523285a27e9b47775bd9dbea3a18276a" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -2004,7 +2004,7 @@ dependencies = [ [[package]] name = "cumulus-relay-chain-inprocess-interface" version = "0.1.0" -source = "git+https://github.com/galacticcouncil/cumulus.git?branch=feat/xcmp-defer-xcm-v9-38#a03c6bd502c64900c29df35c76ba1504debc5169" +source = "git+https://github.com/galacticcouncil/cumulus.git?branch=feat/xcmp-defer-xcm-v9-38#bc34ec33523285a27e9b47775bd9dbea3a18276a" dependencies = [ "async-trait", "cumulus-primitives-core", @@ -2029,7 +2029,7 @@ dependencies = [ [[package]] name = "cumulus-relay-chain-interface" version = "0.1.0" -source = "git+https://github.com/galacticcouncil/cumulus.git?branch=feat/xcmp-defer-xcm-v9-38#a03c6bd502c64900c29df35c76ba1504debc5169" +source = "git+https://github.com/galacticcouncil/cumulus.git?branch=feat/xcmp-defer-xcm-v9-38#bc34ec33523285a27e9b47775bd9dbea3a18276a" dependencies = [ "async-trait", "cumulus-primitives-core", @@ -2048,7 +2048,7 @@ dependencies = [ [[package]] name = "cumulus-relay-chain-minimal-node" version = "0.1.0" -source = "git+https://github.com/galacticcouncil/cumulus.git?branch=feat/xcmp-defer-xcm-v9-38#a03c6bd502c64900c29df35c76ba1504debc5169" +source = "git+https://github.com/galacticcouncil/cumulus.git?branch=feat/xcmp-defer-xcm-v9-38#bc34ec33523285a27e9b47775bd9dbea3a18276a" dependencies = [ "array-bytes 6.1.0", "async-trait", @@ -2088,7 +2088,7 @@ dependencies = [ [[package]] name = "cumulus-relay-chain-rpc-interface" version = "0.1.0" -source = "git+https://github.com/galacticcouncil/cumulus.git?branch=feat/xcmp-defer-xcm-v9-38#a03c6bd502c64900c29df35c76ba1504debc5169" +source = "git+https://github.com/galacticcouncil/cumulus.git?branch=feat/xcmp-defer-xcm-v9-38#bc34ec33523285a27e9b47775bd9dbea3a18276a" dependencies = [ "async-trait", "cumulus-primitives-core", @@ -2117,7 +2117,7 @@ dependencies = [ [[package]] name = "cumulus-test-relay-sproof-builder" version = "0.1.0" -source = "git+https://github.com/galacticcouncil/cumulus.git?branch=feat/xcmp-defer-xcm-v9-38#a03c6bd502c64900c29df35c76ba1504debc5169" +source = "git+https://github.com/galacticcouncil/cumulus.git?branch=feat/xcmp-defer-xcm-v9-38#bc34ec33523285a27e9b47775bd9dbea3a18276a" dependencies = [ "cumulus-primitives-core", "parity-scale-codec", @@ -6210,7 +6210,7 @@ dependencies = [ [[package]] name = "pallet-collator-selection" version = "3.0.0" -source = "git+https://github.com/galacticcouncil/cumulus.git?branch=feat/xcmp-defer-xcm-v9-38#a03c6bd502c64900c29df35c76ba1504debc5169" +source = "git+https://github.com/galacticcouncil/cumulus.git?branch=feat/xcmp-defer-xcm-v9-38#bc34ec33523285a27e9b47775bd9dbea3a18276a" dependencies = [ "frame-benchmarking", "frame-support", @@ -7388,7 +7388,7 @@ dependencies = [ [[package]] name = "parachain-info" version = "0.1.0" -source = "git+https://github.com/galacticcouncil/cumulus.git?branch=feat/xcmp-defer-xcm-v9-38#a03c6bd502c64900c29df35c76ba1504debc5169" +source = "git+https://github.com/galacticcouncil/cumulus.git?branch=feat/xcmp-defer-xcm-v9-38#bc34ec33523285a27e9b47775bd9dbea3a18276a" dependencies = [ "cumulus-primitives-core", "frame-support", diff --git a/integration-tests/parachain-runtime-mock/src/lib.rs b/integration-tests/parachain-runtime-mock/src/lib.rs index d67c5b05d1..722c139896 100644 --- a/integration-tests/parachain-runtime-mock/src/lib.rs +++ b/integration-tests/parachain-runtime-mock/src/lib.rs @@ -231,6 +231,7 @@ impl cumulus_pallet_xcmp_queue::Config for ParachainRuntime { type WeightInfo = (); type ExecuteDeferredOrigin = EnsureRoot; type MaxDeferredMessages = ConstU32<100>; + type MaxDeferredBuckets = ConstU32<1000>; type RelayChainBlockNumberProvider = RelayChainBlockNumberProvider; type XcmDeferFilter = (); } diff --git a/integration-tests/src/xcm_rate_limiter.rs b/integration-tests/src/xcm_rate_limiter.rs index 99d4ef9b52..6de3dced77 100644 --- a/integration-tests/src/xcm_rate_limiter.rs +++ b/integration-tests/src/xcm_rate_limiter.rs @@ -88,6 +88,8 @@ fn xcm_rate_limiter_should_limit_aca_when_limit_is_exceeded() { sent_at: 3, deferred_to: basilisk_runtime::DeferDuration::get() + 4, message_hash, + index: (basilisk_runtime::DeferDuration::get() + 4, 0), + position: 0, } .into(), pallet_relaychain_info::Event::CurrentBlockNumbers { @@ -226,6 +228,8 @@ fn deferred_messages_should_be_executable_by_root() { sent_at: 3, deferred_to: basilisk_runtime::DeferDuration::get() + 4, message_hash, + index: (basilisk_runtime::DeferDuration::get() + 4, 0), + position: 0, } .into(), pallet_relaychain_info::Event::CurrentBlockNumbers { diff --git a/runtime/basilisk/src/weights/xcmp_queue.rs b/runtime/basilisk/src/weights/xcmp_queue.rs index 8f6af37080..89fafe2b08 100644 --- a/runtime/basilisk/src/weights/xcmp_queue.rs +++ b/runtime/basilisk/src/weights/xcmp_queue.rs @@ -85,7 +85,22 @@ impl WeightInfo for BasiliskWeight { } // Storage: XcmpQueue DeferredXcmMessages (r:1 w:1) // Proof Skipped: XcmpQueue DeferredXcmMessages (max_values: None, max_size: None, mode: Measured) - fn discard_deferred() -> Weight { + fn discard_deferred_bucket() -> Weight { + // Minimum execution time: 125_025_318 nanoseconds. + Weight::from_ref_time(125_304_870_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) + } + // Storage: XcmpQueue DeferredXcmMessages (r:1 w:1) + // Proof Skipped: XcmpQueue DeferredXcmMessages (max_values: None, max_size: None, mode: Measured) + fn discard_deferred_individual() -> Weight { + // Minimum execution time: 125_025_318 nanoseconds. + Weight::from_ref_time(125_304_870_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) + } + + fn try_place_in_deferred_queue() -> Weight { // Minimum execution time: 125_025_318 nanoseconds. Weight::from_ref_time(125_304_870_000 as u64) .saturating_add(T::DbWeight::get().reads(1 as u64)) diff --git a/runtime/basilisk/src/xcm.rs b/runtime/basilisk/src/xcm.rs index f828896300..8269fd3db1 100644 --- a/runtime/basilisk/src/xcm.rs +++ b/runtime/basilisk/src/xcm.rs @@ -188,6 +188,7 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime { type WeightInfo = weights::xcmp_queue::BasiliskWeight; type ExecuteDeferredOrigin = EnsureRoot; type MaxDeferredMessages = ConstU32<100>; + type MaxDeferredBuckets = ConstU32<1000>; type RelayChainBlockNumberProvider = RelayChainBlockNumberProvider; type XcmDeferFilter = XcmRateLimiter; }