From c6e1480d0b972f02ea4d6f7045d7a4aa7c255edb Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Mon, 23 Dec 2024 23:09:34 +0100 Subject: [PATCH 01/15] Update patched deps for Bridges TODOs --- Cargo.lock | 485 +++++++++++++++++++++++++++-------------------------- Cargo.toml | 16 +- 2 files changed, 253 insertions(+), 248 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 02c6d0e8ec..7ea01bc563 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -609,7 +609,7 @@ dependencies = [ "parachains-common", "parity-scale-codec", "polkadot-runtime-common", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "staging-kusama-runtime", "staging-xcm", "staging-xcm-executor", @@ -689,7 +689,7 @@ dependencies = [ "sp-inherents", "sp-io 38.0.0", "sp-offchain", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "sp-session", "sp-std", "sp-storage 21.0.0", @@ -745,7 +745,7 @@ dependencies = [ "polkadot-runtime", "polkadot-runtime-common", "polkadot-system-emulated-network", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "staging-xcm", "staging-xcm-executor", "system-parachains-constants", @@ -823,7 +823,7 @@ dependencies = [ "sp-inherents", "sp-io 38.0.0", "sp-offchain", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "sp-session", "sp-std", "sp-storage 21.0.0", @@ -841,15 +841,16 @@ dependencies = [ [[package]] name = "asset-test-utils" -version = "18.0.0" +version = "20.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0324df9ce91a9840632e865dd3272bd20162023856f1b189b7ae58afa5c6b61" +checksum = "9b0a99a8fa37a58ad868fca25530dde06b6582cb46b64bfae808f5b9b87e42ce" dependencies = [ "cumulus-pallet-parachain-system", "cumulus-pallet-xcmp-queue", "cumulus-primitives-core", "frame-support", "frame-system", + "pallet-asset-conversion", "pallet-assets", "pallet-balances", "pallet-collator-selection", @@ -861,12 +862,13 @@ dependencies = [ "parachains-runtimes-test-utils", "parity-scale-codec", "sp-io 38.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "staging-parachain-info", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", "substrate-wasm-builder", + "xcm-runtime-apis", ] [[package]] @@ -886,7 +888,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-api", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -1431,7 +1433,7 @@ dependencies = [ "kusama-runtime-constants", "polkadot-runtime-constants", "sp-api", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "sp-std", "system-parachains-constants", ] @@ -1449,7 +1451,7 @@ dependencies = [ "polkadot-runtime-constants", "snowbridge-core", "sp-api", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "sp-std", "staging-xcm", "system-parachains-constants", @@ -1469,7 +1471,7 @@ dependencies = [ "serde", "sp-consensus-grandpa", "sp-core 34.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "sp-std", ] @@ -1518,7 +1520,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-core 34.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "sp-std", ] @@ -1551,7 +1553,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-api", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "sp-std", ] @@ -1570,7 +1572,7 @@ dependencies = [ "scale-info", "serde", "sp-core 34.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "sp-std", ] @@ -1589,7 +1591,7 @@ dependencies = [ "pallet-utility", "parity-scale-codec", "scale-info", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "sp-std", ] @@ -1610,7 +1612,7 @@ dependencies = [ "serde", "sp-core 34.0.0", "sp-io 38.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "sp-state-machine 0.43.0", "sp-std", "sp-trie 37.0.0", @@ -1633,16 +1635,16 @@ dependencies = [ "sp-application-crypto 38.0.0", "sp-consensus-grandpa", "sp-core 34.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "sp-std", "sp-trie 37.0.0", ] [[package]] name = "bp-xcm-bridge-hub" -version = "0.4.0" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6909117ca87cb93703742939d5f0c4c93e9646d9cda22262e9709d68c929999b" +checksum = "0873c54562b3d492541cbc8a7974c6854a5157d07880a2a71f8ba888a69e17e9" dependencies = [ "bp-messages", "bp-runtime", @@ -1665,7 +1667,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-core 34.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "staging-xcm", ] @@ -1682,7 +1684,7 @@ dependencies = [ "scale-info", "snowbridge-core", "sp-core 34.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "sp-std", "staging-xcm", ] @@ -1732,7 +1734,7 @@ dependencies = [ "snowbridge-pallet-system", "snowbridge-router-primitives", "sp-core 34.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "staging-xcm", "staging-xcm-executor", "system-parachains-constants", @@ -1816,7 +1818,7 @@ dependencies = [ "sp-io 38.0.0", "sp-keyring", "sp-offchain", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "sp-session", "sp-std", "sp-storage 21.0.0", @@ -1878,7 +1880,7 @@ dependencies = [ "snowbridge-pallet-system", "snowbridge-router-primitives", "sp-core 34.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "staging-xcm", "staging-xcm-executor", "system-parachains-constants", @@ -1974,7 +1976,7 @@ dependencies = [ "sp-io 38.0.0", "sp-keyring", "sp-offchain", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "sp-session", "sp-std", "sp-storage 21.0.0", @@ -1993,9 +1995,9 @@ dependencies = [ [[package]] name = "bridge-hub-test-utils" -version = "0.18.0" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de0b3aa5fd8481a06ca16e47fd3d2d9c6abe76b27d922ec8980a853f242173b3" +checksum = "329b98c9cfa8a36beb65eebe197460e06dc3b041baf84d16c2c9862b99d1e7d2" dependencies = [ "asset-test-utils", "bp-header-chain", @@ -2028,7 +2030,7 @@ dependencies = [ "sp-core 34.0.0", "sp-io 38.0.0", "sp-keyring", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "sp-tracing 17.0.1", "staging-xcm", "staging-xcm-builder", @@ -2037,9 +2039,9 @@ dependencies = [ [[package]] name = "bridge-runtime-common" -version = "0.18.0" +version = "0.18.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c639aa22de6e904156a3e8b0e6b9e6af790cb27a1299688cc07997e1ffe5b648" +checksum = "86cf718057e18ce3e5f2c8e3fc318c38ad71d47ada91dc4b841c0f69c214ef04" dependencies = [ "bp-header-chain", "bp-messages", @@ -2060,7 +2062,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-io 38.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "sp-std", "sp-trie 37.0.0", "staging-xcm", @@ -2411,7 +2413,7 @@ dependencies = [ "polkadot-runtime-constants", "polkadot-system-emulated-network", "sp-core 34.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "staging-xcm", "staging-xcm-executor", "system-parachains-constants", @@ -2481,7 +2483,7 @@ dependencies = [ "sp-inherents", "sp-io 38.0.0", "sp-offchain", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "sp-session", "sp-std", "sp-storage 21.0.0", @@ -2665,7 +2667,7 @@ dependencies = [ "parity-scale-codec", "polkadot-runtime-common", "polkadot-runtime-parachains", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "staging-kusama-runtime", "staging-xcm", "staging-xcm-executor", @@ -2726,7 +2728,7 @@ dependencies = [ "sp-genesis-builder", "sp-inherents", "sp-offchain", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "sp-session", "sp-std", "sp-storage 21.0.0", @@ -2774,7 +2776,7 @@ dependencies = [ "polkadot-runtime-constants", "polkadot-runtime-parachains", "polkadot-system-emulated-network", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "staging-xcm", "staging-xcm-executor", "xcm-runtime-apis", @@ -2835,7 +2837,7 @@ dependencies = [ "sp-genesis-builder", "sp-inherents", "sp-offchain", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "sp-session", "sp-std", "sp-storage 21.0.0", @@ -3097,7 +3099,7 @@ dependencies = [ "scale-info", "sp-application-crypto 38.0.0", "sp-consensus-aura", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", ] [[package]] @@ -3127,7 +3129,7 @@ dependencies = [ "sp-externalities 0.29.0", "sp-inherents", "sp-io 38.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "sp-state-machine 0.43.0", "sp-std", "sp-trie 37.0.0", @@ -3160,7 +3162,7 @@ dependencies = [ "frame-system", "pallet-session", "parity-scale-codec", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", ] [[package]] @@ -3175,7 +3177,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-io 38.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "staging-xcm", ] @@ -3199,7 +3201,7 @@ dependencies = [ "scale-info", "sp-core 34.0.0", "sp-io 38.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -3216,7 +3218,7 @@ dependencies = [ "polkadot-primitives 15.0.0", "sp-api", "sp-consensus-aura", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", ] [[package]] @@ -3231,7 +3233,7 @@ dependencies = [ "polkadot-primitives 16.0.0", "scale-info", "sp-api", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "sp-trie 37.0.0", "staging-xcm", ] @@ -3274,7 +3276,7 @@ dependencies = [ "pallet-asset-conversion", "parity-scale-codec", "polkadot-runtime-common", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -3289,7 +3291,7 @@ dependencies = [ "cumulus-primitives-core", "parity-scale-codec", "polkadot-primitives 16.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "sp-state-machine 0.43.0", "sp-trie 37.0.0", ] @@ -3799,9 +3801,9 @@ dependencies = [ [[package]] name = "emulated-integration-tests-common" -version = "14.1.0" +version = "16.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e02f16722b84c80116230ed1eac5b49356bebeb0589786d9c651e010369f1c95" +checksum = "8a2fdb16bdf43492ecf4e8ac21efcf140bb9783dded06d33a3f330123301c25b" dependencies = [ "asset-test-utils", "bp-messages", @@ -3828,7 +3830,7 @@ dependencies = [ "sp-consensus-babe", "sp-consensus-beefy", "sp-core 34.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "staging-xcm", "xcm-emulator", ] @@ -3862,7 +3864,7 @@ dependencies = [ "pallet-encointer-balances", "pallet-encointer-ceremonies", "pallet-transaction-payment", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", ] [[package]] @@ -3886,7 +3888,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7d3890b05d20d81cd72e461b4e4a40e574f357bd8bd93095d60196bf85f0ca2b" dependencies = [ "encointer-primitives", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "sp-std", ] @@ -3963,7 +3965,7 @@ dependencies = [ "sp-genesis-builder", "sp-inherents", "sp-offchain", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "sp-session", "sp-std", "sp-transaction-pool", @@ -3987,7 +3989,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "sp-std", ] @@ -4007,7 +4009,7 @@ dependencies = [ "serde", "sp-core 34.0.0", "sp-io 38.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "sp-std", "substrate-geohash", ] @@ -4099,7 +4101,7 @@ dependencies = [ "serde", "sp-arithmetic 26.0.0", "sp-core 34.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "sp-std", "substrate-fixed", ] @@ -4406,7 +4408,7 @@ dependencies = [ "sp-application-crypto 38.0.0", "sp-core 34.0.0", "sp-io 38.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "sp-runtime-interface 28.0.0", "sp-storage 21.0.0", "static_assertions", @@ -4438,7 +4440,7 @@ dependencies = [ "sp-arithmetic 26.0.0", "sp-core 34.0.0", "sp-npos-elections", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", ] [[package]] @@ -4456,7 +4458,7 @@ dependencies = [ "scale-info", "sp-core 34.0.0", "sp-io 38.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "sp-tracing 17.0.1", ] @@ -4496,7 +4498,7 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", ] [[package]] @@ -4514,7 +4516,7 @@ dependencies = [ "sp-core 34.0.0", "sp-crypto-hashing", "sp-io 38.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "sp-state-machine 0.43.0", "spinners", "substrate-rpc-client", @@ -4524,9 +4526,9 @@ dependencies = [ [[package]] name = "frame-support" -version = "38.0.0" +version = "38.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e44af69fa61bc5005ffe0339e198957e77f0f255704a9bee720da18a733e3dc" +checksum = "f7dd8b9f161a8289e3b9fe6c1068519358dbff2270d38097a923d3d1b4459dca" dependencies = [ "aquamarine", "array-bytes", @@ -4554,7 +4556,7 @@ dependencies = [ "sp-inherents", "sp-io 38.0.0", "sp-metadata-ir", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "sp-staking 36.0.0", "sp-state-machine 0.43.0", "sp-std", @@ -4623,7 +4625,7 @@ dependencies = [ "serde", "sp-core 34.0.0", "sp-io 38.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "sp-std", "sp-version", "sp-weights 31.0.0", @@ -4641,7 +4643,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-core 34.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", ] [[package]] @@ -4664,7 +4666,7 @@ dependencies = [ "frame-support", "parity-scale-codec", "sp-api", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", ] [[package]] @@ -4919,7 +4921,7 @@ dependencies = [ "sp-genesis-builder", "sp-inherents", "sp-offchain", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "sp-session", "sp-std", "sp-storage 21.0.0", @@ -6121,7 +6123,7 @@ dependencies = [ "polkadot-runtime-common", "smallvec", "sp-core 34.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "sp-weights 31.0.0", "staging-xcm-builder", ] @@ -7639,7 +7641,7 @@ dependencies = [ "sp-core 34.0.0", "sp-crypto-hashing", "sp-io 38.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", ] [[package]] @@ -7658,7 +7660,7 @@ dependencies = [ "sp-arithmetic 26.0.0", "sp-core 34.0.0", "sp-io 38.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", ] [[package]] @@ -7673,7 +7675,7 @@ dependencies = [ "pallet-transaction-payment", "parity-scale-codec", "scale-info", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", ] [[package]] @@ -7688,7 +7690,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-core 34.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", ] [[package]] @@ -7706,7 +7708,7 @@ dependencies = [ "serde", "sp-core 34.0.0", "sp-io 38.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", ] [[package]] @@ -7723,7 +7725,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-core 34.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", ] [[package]] @@ -7740,7 +7742,7 @@ dependencies = [ "scale-info", "sp-application-crypto 38.0.0", "sp-consensus-aura", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", ] [[package]] @@ -7756,7 +7758,7 @@ dependencies = [ "scale-info", "sp-application-crypto 38.0.0", "sp-authority-discovery", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", ] [[package]] @@ -7770,7 +7772,7 @@ dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", "scale-info", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", ] [[package]] @@ -7792,7 +7794,7 @@ dependencies = [ "sp-consensus-babe", "sp-core 34.0.0", "sp-io 38.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "sp-session", "sp-staking 36.0.0", ] @@ -7815,7 +7817,7 @@ dependencies = [ "scale-info", "sp-core 34.0.0", "sp-io 38.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "sp-tracing 17.0.1", ] @@ -7832,7 +7834,7 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", ] [[package]] @@ -7850,7 +7852,7 @@ dependencies = [ "scale-info", "serde", "sp-consensus-beefy", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "sp-session", "sp-staking 36.0.0", ] @@ -7877,7 +7879,7 @@ dependencies = [ "sp-consensus-beefy", "sp-core 34.0.0", "sp-io 38.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "sp-state-machine 0.43.0", ] @@ -7896,7 +7898,7 @@ dependencies = [ "scale-info", "sp-core 34.0.0", "sp-io 38.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", ] [[package]] @@ -7915,7 +7917,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-consensus-grandpa", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "sp-std", ] @@ -7934,7 +7936,7 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "sp-std", "sp-trie 37.0.0", ] @@ -7956,15 +7958,15 @@ dependencies = [ "pallet-bridge-grandpa", "parity-scale-codec", "scale-info", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "sp-std", ] [[package]] name = "pallet-bridge-relayers" -version = "0.18.0" +version = "0.18.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2faead05455a965a0a0ec69ffa779933479b599e40bda809c0aa1efa72a39281" +checksum = "0fe3be7077b7ddee7178b1b12e9171435da73778d093788e10b1bdfad1e10962" dependencies = [ "bp-header-chain", "bp-messages", @@ -7981,7 +7983,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-arithmetic 26.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "sp-std", ] @@ -8001,7 +8003,7 @@ dependencies = [ "sp-api", "sp-arithmetic 26.0.0", "sp-core 34.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", ] [[package]] @@ -8020,7 +8022,7 @@ dependencies = [ "scale-info", "sp-core 34.0.0", "sp-io 38.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", ] [[package]] @@ -8039,7 +8041,7 @@ dependencies = [ "parity-scale-codec", "rand", "scale-info", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "sp-staking 36.0.0", ] @@ -8057,7 +8059,7 @@ dependencies = [ "scale-info", "sp-core 34.0.0", "sp-io 38.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", ] [[package]] @@ -8074,7 +8076,7 @@ dependencies = [ "scale-info", "serde", "sp-io 38.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", ] [[package]] @@ -8093,7 +8095,7 @@ dependencies = [ "sp-arithmetic 26.0.0", "sp-core 34.0.0", "sp-io 38.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", ] [[package]] @@ -8108,7 +8110,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-io 38.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "sp-staking 36.0.0", ] @@ -8131,7 +8133,7 @@ dependencies = [ "sp-core 34.0.0", "sp-io 38.0.0", "sp-npos-elections", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "strum 0.26.3", ] @@ -8146,7 +8148,7 @@ dependencies = [ "frame-system", "parity-scale-codec", "sp-npos-elections", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", ] [[package]] @@ -8165,7 +8167,7 @@ dependencies = [ "pallet-transaction-payment", "parity-scale-codec", "scale-info", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "sp-std", ] @@ -8222,7 +8224,7 @@ dependencies = [ "sp-application-crypto 38.0.0", "sp-core 34.0.0", "sp-io 38.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "sp-std", ] @@ -8255,7 +8257,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-io 38.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "sp-std", ] @@ -8293,7 +8295,7 @@ dependencies = [ "sp-application-crypto 38.0.0", "sp-core 34.0.0", "sp-io 38.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "sp-std", ] @@ -8314,7 +8316,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-core 34.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "sp-std", ] @@ -8337,7 +8339,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-core 34.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "sp-std", ] @@ -8356,7 +8358,7 @@ dependencies = [ "pallet-timestamp", "parity-scale-codec", "scale-info", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "sp-std", ] @@ -8377,7 +8379,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-core 34.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "sp-std", ] @@ -8410,7 +8412,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-io 38.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "sp-staking 36.0.0", ] @@ -8430,7 +8432,7 @@ dependencies = [ "sp-core 34.0.0", "sp-inherents", "sp-io 38.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", ] [[package]] @@ -8451,7 +8453,7 @@ dependencies = [ "sp-consensus-grandpa", "sp-core 34.0.0", "sp-io 38.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "sp-session", "sp-staking 36.0.0", ] @@ -8470,7 +8472,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-io 38.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", ] [[package]] @@ -8489,7 +8491,7 @@ dependencies = [ "sp-application-crypto 38.0.0", "sp-core 34.0.0", "sp-io 38.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "sp-staking 36.0.0", ] @@ -8507,7 +8509,7 @@ dependencies = [ "sp-core 34.0.0", "sp-io 38.0.0", "sp-keyring", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", ] [[package]] @@ -8521,7 +8523,7 @@ dependencies = [ "parity-scale-codec", "safe-mix", "scale-info", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", ] [[package]] @@ -8538,14 +8540,14 @@ dependencies = [ "scale-info", "sp-core 34.0.0", "sp-io 38.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", ] [[package]] name = "pallet-message-queue" -version = "41.0.1" +version = "41.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0faa48b29bf5a178580c164ef00de87319a37da7547a9cd6472dfd160092811a" +checksum = "983f7d1be18e9a089a3e23670918f5085705b4403acd3fdde31878d57b76a1a8" dependencies = [ "environmental", "frame-benchmarking", @@ -8557,7 +8559,7 @@ dependencies = [ "sp-arithmetic 26.0.0", "sp-core 34.0.0", "sp-io 38.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "sp-weights 31.0.0", ] @@ -8576,7 +8578,7 @@ dependencies = [ "sp-core 34.0.0", "sp-io 38.0.0", "sp-mmr-primitives", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", ] [[package]] @@ -8592,7 +8594,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-io 38.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", ] [[package]] @@ -8609,7 +8611,7 @@ dependencies = [ "pallet-nfts", "parity-scale-codec", "scale-info", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", ] [[package]] @@ -8627,7 +8629,7 @@ dependencies = [ "scale-info", "sp-core 34.0.0", "sp-io 38.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", ] [[package]] @@ -8654,7 +8656,7 @@ dependencies = [ "scale-info", "sp-arithmetic 26.0.0", "sp-core 34.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", ] [[package]] @@ -8671,7 +8673,7 @@ dependencies = [ "scale-info", "sp-core 34.0.0", "sp-io 38.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "sp-staking 36.0.0", "sp-tracing 17.0.1", ] @@ -8692,7 +8694,7 @@ dependencies = [ "pallet-staking", "parity-scale-codec", "scale-info", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "sp-runtime-interface 28.0.0", "sp-staking 36.0.0", ] @@ -8721,7 +8723,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "sp-staking 36.0.0", ] @@ -8745,7 +8747,7 @@ dependencies = [ "pallet-staking", "parity-scale-codec", "scale-info", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "sp-staking 36.0.0", ] @@ -8764,7 +8766,7 @@ dependencies = [ "scale-info", "serde", "sp-core 34.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", ] [[package]] @@ -8781,7 +8783,7 @@ dependencies = [ "scale-info", "sp-core 34.0.0", "sp-io 38.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", ] [[package]] @@ -8796,7 +8798,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-io 38.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", ] [[package]] @@ -8815,7 +8817,7 @@ dependencies = [ "sp-arithmetic 26.0.0", "sp-core 34.0.0", "sp-io 38.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", ] [[package]] @@ -8830,7 +8832,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-io 38.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", ] [[package]] @@ -8849,7 +8851,7 @@ dependencies = [ "serde", "sp-arithmetic 26.0.0", "sp-io 38.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", ] [[package]] @@ -8868,7 +8870,7 @@ dependencies = [ "sp-arithmetic 26.0.0", "sp-core 34.0.0", "sp-io 38.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", ] [[package]] @@ -8885,7 +8887,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-io 38.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "sp-weights 31.0.0", ] @@ -8904,7 +8906,7 @@ dependencies = [ "scale-info", "sp-core 34.0.0", "sp-io 38.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "sp-session", "sp-staking 36.0.0", "sp-state-machine 0.43.0", @@ -8924,7 +8926,7 @@ dependencies = [ "pallet-staking", "parity-scale-codec", "rand", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "sp-session", ] @@ -8943,7 +8945,7 @@ dependencies = [ "scale-info", "sp-arithmetic 26.0.0", "sp-io 38.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", ] [[package]] @@ -8965,7 +8967,7 @@ dependencies = [ "serde", "sp-application-crypto 38.0.0", "sp-io 38.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "sp-staking 36.0.0", ] @@ -9016,7 +9018,7 @@ dependencies = [ "scale-info", "sp-core 34.0.0", "sp-io 38.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", ] [[package]] @@ -9032,7 +9034,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-io 38.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", ] [[package]] @@ -9050,16 +9052,16 @@ dependencies = [ "scale-info", "sp-inherents", "sp-io 38.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "sp-storage 21.0.0", "sp-timestamp", ] [[package]] name = "pallet-transaction-payment" -version = "38.0.0" +version = "38.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47b1aa3498107a30237f941b0f02180db3b79012c3488878ff01a4ac3e8ee04e" +checksum = "6cdb86580c72b58145f9cddba21a0c1814742ca56abc9caac3c1ac72f6bde649" dependencies = [ "frame-support", "frame-system", @@ -9068,7 +9070,7 @@ dependencies = [ "serde", "sp-core 34.0.0", "sp-io 38.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", ] [[package]] @@ -9080,7 +9082,7 @@ dependencies = [ "pallet-transaction-payment", "parity-scale-codec", "sp-api", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "sp-weights 31.0.0", ] @@ -9100,7 +9102,7 @@ dependencies = [ "scale-info", "serde", "sp-core 34.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", ] [[package]] @@ -9115,7 +9117,7 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", ] [[package]] @@ -9131,7 +9133,7 @@ dependencies = [ "scale-info", "sp-core 34.0.0", "sp-io 38.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", ] [[package]] @@ -9146,7 +9148,7 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", ] [[package]] @@ -9161,14 +9163,14 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-api", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", ] [[package]] name = "pallet-xcm" -version = "17.0.0" +version = "17.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b1760b6589e53f4ad82216c72c0e38fcb4df149c37224ab3301dc240c85d1d4" +checksum = "989676964dbda5f5275650fbdcd3894fe7fac626d113abf89d572b4952adcc36" dependencies = [ "bounded-collections", "frame-benchmarking", @@ -9181,10 +9183,11 @@ dependencies = [ "serde", "sp-core 34.0.0", "sp-io 38.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", + "tracing", "xcm-runtime-apis", ] @@ -9201,7 +9204,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-io 38.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -9209,9 +9212,9 @@ dependencies = [ [[package]] name = "pallet-xcm-bridge-hub" -version = "0.13.0" +version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5f9670065b7cba92771060a4a3925b6650ff67611443ccfccd5aa356f7d5aac" +checksum = "f336403f9e9bf22a0e1fdb90aa5093c52599c9a0639591fbcc1e979b58862d1b" dependencies = [ "bp-messages", "bp-runtime", @@ -9223,7 +9226,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-core 34.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "sp-std", "staging-xcm", "staging-xcm-builder", @@ -9232,9 +9235,9 @@ dependencies = [ [[package]] name = "pallet-xcm-bridge-hub-router" -version = "0.15.1" +version = "0.15.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3b5347c826b721098ef39afb0d750e621c77538044fc1e865af1a8747824fdf" +checksum = "fabf1fdcf451ac79995f11cb9b6a0761924c57bb79442c2d91b3bbefe4dfa081" dependencies = [ "bp-xcm-bridge-hub-router", "frame-benchmarking", @@ -9244,7 +9247,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-core 34.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "sp-std", "staging-xcm", "staging-xcm-builder", @@ -9274,7 +9277,7 @@ dependencies = [ "sp-consensus-aura", "sp-core 34.0.0", "sp-io 38.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "staging-parachain-info", "staging-xcm", "staging-xcm-executor", @@ -9283,9 +9286,9 @@ dependencies = [ [[package]] name = "parachains-runtimes-test-utils" -version = "17.0.0" +version = "19.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "287d2db0a2d19466caa579a69f021bfdc6fa352f382c8395dade58d1d0c6adfe" +checksum = "d37c6a0fe791b244282e445c7ae2534217b05781a7e47ef9e391860cf3412210" dependencies = [ "cumulus-pallet-parachain-system", "cumulus-pallet-xcmp-queue", @@ -9299,17 +9302,19 @@ dependencies = [ "pallet-session", "pallet-timestamp", "pallet-xcm", + "parachains-common", "parity-scale-codec", "polkadot-parachain-primitives", "sp-consensus-aura", "sp-core 34.0.0", "sp-io 38.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "sp-tracing 17.0.1", "staging-parachain-info", "staging-xcm", "staging-xcm-executor", "substrate-wasm-builder", + "xcm-runtime-apis", ] [[package]] @@ -9565,7 +9570,7 @@ dependencies = [ "sp-genesis-builder", "sp-inherents", "sp-offchain", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "sp-session", "sp-storage 21.0.0", "sp-transaction-pool", @@ -9611,7 +9616,7 @@ dependencies = [ "parity-scale-codec", "people-kusama-runtime", "polkadot-runtime-common", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "staging-kusama-runtime", "staging-xcm", "staging-xcm-executor", @@ -9672,7 +9677,7 @@ dependencies = [ "sp-genesis-builder", "sp-inherents", "sp-offchain", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "sp-session", "sp-std", "sp-storage 21.0.0", @@ -9721,7 +9726,7 @@ dependencies = [ "polkadot-runtime-common", "polkadot-runtime-constants", "polkadot-system-emulated-network", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "staging-xcm", "staging-xcm-executor", "xcm-runtime-apis", @@ -9780,7 +9785,7 @@ dependencies = [ "sp-genesis-builder", "sp-inherents", "sp-offchain", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "sp-session", "sp-std", "sp-storage 21.0.0", @@ -9940,7 +9945,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-core 34.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", ] [[package]] @@ -9958,7 +9963,7 @@ dependencies = [ "sp-consensus-babe", "sp-consensus-beefy", "sp-core 34.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", ] [[package]] @@ -9974,7 +9979,7 @@ dependencies = [ "scale-info", "serde", "sp-core 34.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "sp-weights 31.0.0", ] @@ -10001,7 +10006,7 @@ dependencies = [ "sp-inherents", "sp-io 38.0.0", "sp-keystore 0.40.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "sp-staking 34.0.0", ] @@ -10028,7 +10033,7 @@ dependencies = [ "sp-inherents", "sp-io 38.0.0", "sp-keystore 0.40.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "sp-staking 36.0.0", ] @@ -10121,7 +10126,7 @@ dependencies = [ "sp-keyring", "sp-npos-elections", "sp-offchain", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "sp-session", "sp-staking 36.0.0", "sp-std", @@ -10181,7 +10186,7 @@ dependencies = [ "sp-inherents", "sp-io 38.0.0", "sp-npos-elections", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "sp-session", "sp-staking 36.0.0", "staging-xcm", @@ -10199,7 +10204,7 @@ dependencies = [ "polkadot-runtime-common", "smallvec", "sp-core 34.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "sp-weights 31.0.0", "staging-xcm-builder", ] @@ -10258,7 +10263,7 @@ dependencies = [ "sp-inherents", "sp-io 38.0.0", "sp-keystore 0.40.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "sp-session", "sp-staking 36.0.0", "sp-std", @@ -11150,7 +11155,7 @@ dependencies = [ "polkadot-primitives 16.0.0", "scale-info", "sp-api", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", ] [[package]] @@ -11631,7 +11636,7 @@ dependencies = [ "sp-blockchain", "sp-core 34.0.0", "sp-inherents", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "sp-trie 37.0.0", ] @@ -11658,7 +11663,7 @@ dependencies = [ "sp-crypto-hashing", "sp-genesis-builder", "sp-io 38.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "sp-state-machine 0.43.0", "sp-tracing 17.0.1", ] @@ -11695,7 +11700,7 @@ dependencies = [ "sp-core 34.0.0", "sp-database", "sp-externalities 0.29.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "sp-state-machine 0.43.0", "sp-statement-store", "sp-storage 21.0.0", @@ -11722,7 +11727,7 @@ dependencies = [ "sp-blockchain", "sp-consensus", "sp-core 34.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "sp-state-machine 0.43.0", "substrate-prometheus-endpoint", "thiserror", @@ -11768,7 +11773,7 @@ dependencies = [ "sp-core 34.0.0", "sp-crypto-hashing", "sp-keystore 0.40.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "substrate-prometheus-endpoint", "thiserror", ] @@ -11868,7 +11873,7 @@ dependencies = [ "sp-core 34.0.0", "sp-keystore 0.40.0", "sp-mixnet", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "thiserror", ] @@ -11913,7 +11918,7 @@ dependencies = [ "sp-arithmetic 26.0.0", "sp-blockchain", "sp-core 34.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "substrate-prometheus-endpoint", "thiserror", "tokio", @@ -11940,7 +11945,7 @@ dependencies = [ "sc-network-types", "sp-consensus", "sp-consensus-grandpa", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", ] [[package]] @@ -11958,7 +11963,7 @@ dependencies = [ "sc-network-sync", "sc-network-types", "schnellru", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "substrate-prometheus-endpoint", "tracing", ] @@ -11994,7 +11999,7 @@ dependencies = [ "sp-consensus", "sp-consensus-grandpa", "sp-core 34.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "substrate-prometheus-endpoint", "thiserror", "tokio", @@ -12035,7 +12040,7 @@ dependencies = [ "serde_json", "sp-core 34.0.0", "sp-rpc", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "sp-version", "thiserror", ] @@ -12074,7 +12079,7 @@ dependencies = [ "serde", "sp-blockchain", "sp-core 34.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "thiserror", ] @@ -12735,7 +12740,7 @@ dependencies = [ "enumn", "parity-scale-codec", "paste", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", ] [[package]] @@ -12896,7 +12901,7 @@ dependencies = [ "snowbridge-milagro-bls", "sp-core 34.0.0", "sp-io 38.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "sp-std", "ssz_rs", "ssz_rs_derive", @@ -12920,7 +12925,7 @@ dependencies = [ "sp-arithmetic 26.0.0", "sp-core 34.0.0", "sp-io 38.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "sp-std", "staging-xcm", "staging-xcm-builder", @@ -12943,7 +12948,7 @@ dependencies = [ "serde", "serde-big-array", "sp-io 38.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "sp-std", ] @@ -12971,7 +12976,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-core 34.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", ] [[package]] @@ -13009,7 +13014,7 @@ dependencies = [ "snowbridge-pallet-ethereum-client-fixtures", "sp-core 34.0.0", "sp-io 38.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "sp-std", "static_assertions", ] @@ -13050,7 +13055,7 @@ dependencies = [ "snowbridge-router-primitives", "sp-core 34.0.0", "sp-io 38.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "sp-std", "staging-xcm", "staging-xcm-executor", @@ -13088,7 +13093,7 @@ dependencies = [ "sp-arithmetic 26.0.0", "sp-core 34.0.0", "sp-io 38.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "sp-std", ] @@ -13107,7 +13112,7 @@ dependencies = [ "snowbridge-core", "sp-core 34.0.0", "sp-io 38.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "sp-std", "staging-xcm", "staging-xcm-executor", @@ -13127,7 +13132,7 @@ dependencies = [ "snowbridge-core", "sp-core 34.0.0", "sp-io 38.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "sp-std", "staging-xcm", "staging-xcm-executor", @@ -13152,9 +13157,9 @@ dependencies = [ [[package]] name = "snowbridge-runtime-test-common" -version = "0.10.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "893480d6cde2489051c65efb5d27fa87efe047b3b61216d8e27bb2f0509b7faf" +checksum = "242ad550a31ebd8e29a17beb89f1e5ddf4e657ebdf667fb9e4c0660428de4e9b" dependencies = [ "cumulus-pallet-parachain-system", "frame-support", @@ -13176,7 +13181,7 @@ dependencies = [ "sp-core 34.0.0", "sp-io 38.0.0", "sp-keyring", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "staging-parachain-info", "staging-xcm", "staging-xcm-executor", @@ -13260,7 +13265,7 @@ dependencies = [ "sp-core 34.0.0", "sp-externalities 0.29.0", "sp-metadata-ir", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "sp-runtime-interface 28.0.0", "sp-state-machine 0.43.0", "sp-trie 37.0.0", @@ -13351,7 +13356,7 @@ dependencies = [ "scale-info", "sp-api", "sp-application-crypto 38.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", ] [[package]] @@ -13362,7 +13367,7 @@ checksum = "74738809461e3d4bd707b5b94e0e0c064a623a74a6a8fe5c98514417a02858dd" dependencies = [ "sp-api", "sp-inherents", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", ] [[package]] @@ -13379,7 +13384,7 @@ dependencies = [ "sp-consensus", "sp-core 34.0.0", "sp-database", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "sp-state-machine 0.43.0", "thiserror", "tracing", @@ -13396,7 +13401,7 @@ dependencies = [ "log", "sp-core 34.0.0", "sp-inherents", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "sp-state-machine 0.43.0", "thiserror", ] @@ -13414,7 +13419,7 @@ dependencies = [ "sp-application-crypto 38.0.0", "sp-consensus-slots", "sp-inherents", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "sp-timestamp", ] @@ -13433,7 +13438,7 @@ dependencies = [ "sp-consensus-slots", "sp-core 34.0.0", "sp-inherents", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "sp-timestamp", ] @@ -13454,7 +13459,7 @@ dependencies = [ "sp-io 38.0.0", "sp-keystore 0.40.0", "sp-mmr-primitives", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "sp-weights 31.0.0", "strum 0.26.3", ] @@ -13474,7 +13479,7 @@ dependencies = [ "sp-application-crypto 38.0.0", "sp-core 34.0.0", "sp-keystore 0.40.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", ] [[package]] @@ -13662,7 +13667,7 @@ dependencies = [ "scale-info", "serde_json", "sp-api", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", ] [[package]] @@ -13675,7 +13680,7 @@ dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", "scale-info", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "thiserror", ] @@ -13740,7 +13745,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7c0e20624277f578b27f44ecfbe2ebc2e908488511ee2c900c5281599f700ab3" dependencies = [ "sp-core 34.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "strum 0.26.3", ] @@ -13815,7 +13820,7 @@ dependencies = [ "sp-api", "sp-core 34.0.0", "sp-debug-derive", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "thiserror", ] @@ -13830,7 +13835,7 @@ dependencies = [ "serde", "sp-arithmetic 26.0.0", "sp-core 34.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", ] [[package]] @@ -13841,7 +13846,7 @@ checksum = "2d9de237d72ecffd07f90826eef18360208b16d8de939d54e61591fac0fcbf99" dependencies = [ "sp-api", "sp-core 34.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", ] [[package]] @@ -13893,9 +13898,9 @@ dependencies = [ [[package]] name = "sp-runtime" -version = "39.0.2" +version = "39.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "658f23be7c79a85581029676a73265c107c5469157e3444c8c640fdbaa8bfed0" +checksum = "b1e00503b83cf48fffe48746b91b9b832d6785d4e2eeb0941558371eac6baac6" dependencies = [ "docify", "either", @@ -13983,7 +13988,7 @@ dependencies = [ "sp-api", "sp-core 34.0.0", "sp-keystore 0.40.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "sp-staking 36.0.0", ] @@ -13998,7 +14003,7 @@ dependencies = [ "scale-info", "serde", "sp-core 34.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", ] [[package]] @@ -14012,7 +14017,7 @@ dependencies = [ "scale-info", "serde", "sp-core 34.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", ] [[package]] @@ -14077,7 +14082,7 @@ dependencies = [ "sp-core 34.0.0", "sp-crypto-hashing", "sp-externalities 0.29.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "sp-runtime-interface 28.0.0", "thiserror", "x25519-dalek", @@ -14125,7 +14130,7 @@ dependencies = [ "async-trait", "parity-scale-codec", "sp-inherents", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "thiserror", ] @@ -14161,7 +14166,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc4bf251059485a7dd38fe4afeda8792983511cc47f342ff4695e2dcae6b5247" dependencies = [ "sp-api", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", ] [[package]] @@ -14225,7 +14230,7 @@ dependencies = [ "scale-info", "serde", "sp-crypto-hashing-proc-macro", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "sp-std", "sp-version-proc-macro", "thiserror", @@ -14466,7 +14471,7 @@ dependencies = [ "sp-keyring", "sp-npos-elections", "sp-offchain", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "sp-session", "sp-staking 36.0.0", "sp-std", @@ -14495,7 +14500,7 @@ dependencies = [ "frame-system", "parity-scale-codec", "scale-info", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", ] [[package]] @@ -14513,16 +14518,16 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "sp-weights 31.0.0", "xcm-procedural", ] [[package]] name = "staging-xcm-builder" -version = "17.0.1" +version = "17.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3746adbbae27b1e6763f0cca622e15482ebcb94835a9e078c212dd7be896e35" +checksum = "b6f7a92cfaec55a5ed0f9cbbb9076aa8ec0aff1ba90b9804cc5c8f2369fde59c" dependencies = [ "frame-support", "frame-system", @@ -14535,7 +14540,7 @@ dependencies = [ "scale-info", "sp-arithmetic 26.0.0", "sp-io 38.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "sp-weights 31.0.0", "staging-xcm", "staging-xcm-executor", @@ -14556,7 +14561,7 @@ dependencies = [ "sp-arithmetic 26.0.0", "sp-core 34.0.0", "sp-io 38.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "sp-weights 31.0.0", "staging-xcm", "tracing", @@ -14717,7 +14722,7 @@ dependencies = [ "log", "sc-rpc-api", "serde", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", ] [[package]] @@ -14996,7 +15001,7 @@ dependencies = [ "polkadot-runtime-constants", "smallvec", "sp-core 34.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "sp-std", "staging-xcm", ] @@ -16714,7 +16719,7 @@ dependencies = [ "sp-core 34.0.0", "sp-crypto-hashing", "sp-io 38.0.0", - "sp-runtime 39.0.2", + "sp-runtime 39.0.5", "sp-std", "sp-tracing 17.0.1", "staging-xcm", @@ -16735,9 +16740,9 @@ dependencies = [ [[package]] name = "xcm-runtime-apis" -version = "0.4.0" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69d4473a5d157e4d437d9ebcb1b99f9693a64983877ee57d97005f0167869935" +checksum = "2f3d96bd7362d9e6884ef6762f08737d89205a358d059a0451353f3e91985ca5" dependencies = [ "frame-support", "parity-scale-codec", diff --git a/Cargo.toml b/Cargo.toml index 3c91060a80..cce2296e27 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,7 +12,7 @@ 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 = "18.0.0" } +asset-test-utils = { version = "20.0.0" } assets-common = { version = "0.18.0", default-features = false } authority-discovery-primitives = { version = "34.0.0", default-features = false, package = "sp-authority-discovery" } babe-primitives = { version = "0.40.0", default-features = false, package = "sp-consensus-babe" } @@ -32,14 +32,14 @@ bp-polkadot-bulletin = { version = "0.15.0", default-features = false } bp-polkadot-core = { version = "0.18.0", default-features = false } bp-relayers = { version = "0.18.0", default-features = false } bp-runtime = { version = "0.18.0", default-features = false } -bp-xcm-bridge-hub = { version = "0.4.0", default-features = false } +bp-xcm-bridge-hub = { version = "0.4.2", default-features = false } bp-xcm-bridge-hub-router = { version = "0.14.1", default-features = false } bridge-hub-common = { version = "0.10.0", default-features = false } bridge-hub-kusama-emulated-chain = { path = "integration-tests/emulated/chains/parachains/bridges/bridge-hub-kusama" } bridge-hub-kusama-runtime = { path = "system-parachains/bridge-hubs/bridge-hub-kusama" } bridge-hub-polkadot-emulated-chain = { path = "integration-tests/emulated/chains/parachains/bridges/bridge-hub-polkadot" } bridge-hub-polkadot-runtime = { path = "system-parachains/bridge-hubs/bridge-hub-polkadot" } -bridge-hub-test-utils = { version = "0.18.0" } +bridge-hub-test-utils = { version = "0.20.0" } bridge-runtime-common = { version = "0.18.0", default-features = false } clap = { version = "4.5.0" } codec = { package = "parity-scale-codec", version = "3.6.9", default-features = false } @@ -58,7 +58,7 @@ cumulus-pallet-xcmp-queue = { version = "0.17.0", default-features = false } cumulus-primitives-aura = { version = "0.15.0", default-features = false } cumulus-primitives-core = { version = "0.16.0", default-features = false } cumulus-primitives-utility = { version = "0.17.0", default-features = false } -emulated-integration-tests-common = { version = "14.1.0" } +emulated-integration-tests-common = { version = "16.0.0" } encointer-balances-tx-payment = { version = "~14.1.0", default-features = false } encointer-balances-tx-payment-rpc-runtime-api = { version = "~14.1.0", default-features = false } encointer-kusama-runtime = { path = "system-parachains/encointer" } @@ -169,11 +169,11 @@ pallet-vesting = { version = "38.0.0", default-features = false } pallet-whitelist = { version = "37.0.0", default-features = false } pallet-xcm = { version = "17.0.0", default-features = false } pallet-xcm-benchmarks = { version = "17.0.0", default-features = false } -pallet-xcm-bridge-hub = { version = "0.13.0", default-features = false } -pallet-xcm-bridge-hub-router = { version = "0.15.1", default-features = false } +pallet-xcm-bridge-hub = { version = "0.13.2", default-features = false } +pallet-xcm-bridge-hub-router = { version = "0.15.3", default-features = false } parachain-info = { version = "0.17.0", default-features = false, package = "staging-parachain-info" } parachains-common = { version = "18.0.0", default-features = false } -parachains-runtimes-test-utils = { version = "17.0.0" } +parachains-runtimes-test-utils = { version = "19.0.0" } paste = { version = "1.0.14" } penpal-emulated-chain = { path = "integration-tests/emulated/chains/parachains/testing/penpal" } penpal-runtime = { version = "0.25.0" } @@ -211,7 +211,7 @@ snowbridge-pallet-outbound-queue = { version = "0.10.0", default-features = fals snowbridge-pallet-system = { version = "0.10.0", default-features = false } snowbridge-router-primitives = { version = "0.16.0", default-features = false } snowbridge-runtime-common = { version = "0.10.0", default-features = false } -snowbridge-runtime-test-common = { version = "0.10.0" } +snowbridge-runtime-test-common = { version = "0.12.0" } snowbridge-system-runtime-api = { version = "0.10.0", default-features = false } sp-api = { version = "34.0.0", default-features = false } sp-application-crypto = { version = "38.0.0", default-features = false } From 5240e81b84bcc867320573626301d062d24adaf1 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Mon, 23 Dec 2024 23:55:23 +0100 Subject: [PATCH 02/15] More updates --- .../asset-hubs/asset-hub-kusama/src/lib.rs | 10 +++++++--- .../src/weights/pallet_xcm_bridge_hub_router.rs | 13 +++++++++++++ .../asset-hubs/asset-hub-polkadot/src/lib.rs | 7 +++++-- .../src/weights/pallet_xcm_bridge_hub_router.rs | 13 +++++++++++++ .../src/bridge_to_polkadot_config.rs | 5 ++--- .../bridge-hubs/bridge-hub-kusama/tests/tests.rs | 15 +++++++++------ .../src/bridge_to_kusama_config.rs | 5 ++--- .../bridge-hub-polkadot/tests/tests.rs | 15 +++++++++------ 8 files changed, 60 insertions(+), 23 deletions(-) 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 97f62dbe5a..db0aaf230a 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs @@ -62,8 +62,8 @@ use frame_support::{ ord_parameter_types, parameter_types, traits::{ fungible, fungibles, tokens::imbalance::ResolveAssetTo, AsEnsureOriginWithArg, ConstBool, - ConstU128, ConstU32, ConstU64, ConstU8, EitherOfDiverse, InstanceFilter, TransformOrigin, - WithdrawReasons, + ConstU128, ConstU32, ConstU64, ConstU8, EitherOfDiverse, Equals, InstanceFilter, + TransformOrigin, WithdrawReasons, }, weights::{ConstantMultiplier, Weight, WeightToFee as _}, BoundedVec, PalletId, @@ -956,8 +956,12 @@ impl pallet_xcm_bridge_hub_router::Config for Runti type DestinationVersion = PolkadotXcm; type SiblingBridgeHubLocation = xcm_config::bridging::SiblingBridgeHub; - + type BridgeHubOrigin = EitherOfDiverse< + EnsureRoot, + EnsureXcm>, + >; type ToBridgeHubSender = XcmpQueue; + type ByteFee = xcm_config::bridging::XcmBridgeHubRouterByteFee; type FeeAsset = xcm_config::bridging::XcmBridgeHubRouterFeeAssetId; type LocalXcmChannelManager = diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_xcm_bridge_hub_router.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_xcm_bridge_hub_router.rs index b2756ced8c..36ae43d638 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_xcm_bridge_hub_router.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_xcm_bridge_hub_router.rs @@ -76,4 +76,17 @@ impl pallet_xcm_bridge_hub_router::WeightInfo for Weigh .saturating_add(Weight::from_parts(0, 5487)) .saturating_add(T::DbWeight::get().reads(2)) } + /// Storage: `ToPolkadotXcmRouter::Bridge` (r:1 w:1) + /// Proof: `ToPolkadotXcmRouter::Bridge` (`max_values`: Some(1), `max_size`: Some(17), added: 512, mode: `MaxEncodedLen`) + fn report_bridge_status() -> Weight { + // TODO: fresh weights + // Proof Size summary in bytes: + // Measured: `150` + // Estimated: `1502` + // Minimum execution time: 12_394_000 picoseconds. + Weight::from_parts(12_883_000, 0) + .saturating_add(Weight::from_parts(0, 1502)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } } diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs index c0898617be..664403aa27 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs @@ -100,7 +100,7 @@ use frame_support::{ parameter_types, traits::{ fungible, fungibles, tokens::imbalance::ResolveAssetTo, AsEnsureOriginWithArg, ConstBool, - ConstU32, ConstU64, ConstU8, EitherOfDiverse, InstanceFilter, NeverEnsureOrigin, + ConstU32, ConstU64, ConstU8, EitherOfDiverse, Equals, InstanceFilter, NeverEnsureOrigin, TransformOrigin, WithdrawReasons, }, weights::{ConstantMultiplier, Weight, WeightToFee as _}, @@ -855,7 +855,10 @@ impl pallet_xcm_bridge_hub_router::Config for Runtime type DestinationVersion = PolkadotXcm; type SiblingBridgeHubLocation = xcm_config::bridging::SiblingBridgeHub; - + type BridgeHubOrigin = EitherOfDiverse< + EnsureRoot, + EnsureXcm>, + >; type ToBridgeHubSender = XcmpQueue; type ByteFee = xcm_config::bridging::XcmBridgeHubRouterByteFee; diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_xcm_bridge_hub_router.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_xcm_bridge_hub_router.rs index 3f458272a9..5ae6613a4c 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_xcm_bridge_hub_router.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_xcm_bridge_hub_router.rs @@ -76,4 +76,17 @@ impl pallet_xcm_bridge_hub_router::WeightInfo for Weigh .saturating_add(Weight::from_parts(0, 5487)) .saturating_add(T::DbWeight::get().reads(2)) } + /// Storage: `ToKusamaXcmRouter::Bridge` (r:1 w:1) + /// Proof: `ToKusamaXcmRouter::Bridge` (`max_values`: Some(1), `max_size`: Some(17), added: 512, mode: `MaxEncodedLen`) + fn report_bridge_status() -> Weight { + // TODO: fresh weights + // Proof Size summary in bytes: + // Measured: `150` + // Estimated: `1502` + // Minimum execution time: 12_394_000 picoseconds. + Weight::from_parts(12_883_000, 0) + .saturating_add(Weight::from_parts(0, 1502)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } } 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 583053c990..fa0b9cb859 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 @@ -219,6 +219,7 @@ impl pallet_bridge_messages::Config for R type DeliveryConfirmationPayments = pallet_bridge_relayers::DeliveryConfirmationPaymentsAdapter< Runtime, WithBridgeHubPolkadotMessagesInstance, + RelayersForLegacyLaneIdsMessagesInstance, DeliveryRewardInBalance, >; type MessageDispatch = XcmOverBridgeHubPolkadot; @@ -488,7 +489,6 @@ mod tests { fn ensure_bridge_integrity() { assert_complete_bridge_types!( runtime: Runtime, - with_bridged_chain_grandpa_instance: BridgeGrandpaPolkadotInstance, with_bridged_chain_messages_instance: WithBridgeHubPolkadotMessagesInstance, this_chain: bp_bridge_hub_kusama::BridgeHubKusama, bridged_chain: bp_bridge_hub_polkadot::BridgeHubPolkadot, @@ -496,9 +496,8 @@ mod tests { assert_complete_with_parachain_bridge_constants::< Runtime, - BridgeGrandpaPolkadotInstance, + BridgeParachainPolkadotInstance, WithBridgeHubPolkadotMessagesInstance, - bp_polkadot::Polkadot, >(AssertCompleteBridgeConstants { this_chain_constants: AssertChainConstants { block_length: bp_bridge_hub_kusama::BlockLength::get(), 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 20b87d9756..db591cee00 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/tests/tests.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/tests/tests.rs @@ -255,11 +255,12 @@ fn handle_export_message_from_system_parachain_add_to_outbound_queue_works() { >( SiblingParachainLocation::get(), BridgedUniversalLocation::get(), - |locations, fee| { + false, + |locations, _fee| { bridge_hub_test_utils::open_bridge_with_storage::< Runtime, XcmOverBridgeHubPolkadotInstance - >(locations, fee, LegacyLaneId([0, 0, 0, 1])) + >(locations, LegacyLaneId([0, 0, 0, 1])) } ).1 }, @@ -317,11 +318,12 @@ fn relayed_incoming_message_works() { >( SiblingParachainLocation::get(), BridgedUniversalLocation::get(), - |locations, fee| { + false, + |locations, _fee| { bridge_hub_test_utils::open_bridge_with_storage::< Runtime, XcmOverBridgeHubPolkadotInstance, - >(locations, fee, LegacyLaneId([0, 0, 0, 1])) + >(locations, LegacyLaneId([0, 0, 0, 1])) }, ) .1 @@ -351,11 +353,12 @@ fn free_relay_extrinsic_works() { >( SiblingParachainLocation::get(), BridgedUniversalLocation::get(), - |locations, fee| { + false, + |locations, _fee| { bridge_hub_test_utils::open_bridge_with_storage::< Runtime, XcmOverBridgeHubPolkadotInstance, - >(locations, fee, LegacyLaneId([0, 0, 0, 1])) + >(locations, LegacyLaneId([0, 0, 0, 1])) }, ) .1 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 869972e9b1..0cdf0e43c7 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 @@ -220,6 +220,7 @@ impl pallet_bridge_messages::Config for Run type DeliveryConfirmationPayments = pallet_bridge_relayers::DeliveryConfirmationPaymentsAdapter< Runtime, WithBridgeHubKusamaMessagesInstance, + RelayersForLegacyLaneIdsMessagesInstance, DeliveryRewardInBalance, >; @@ -488,7 +489,6 @@ mod tests { fn ensure_bridge_integrity() { assert_complete_bridge_types!( runtime: Runtime, - with_bridged_chain_grandpa_instance: BridgeGrandpaKusamaInstance, with_bridged_chain_messages_instance: WithBridgeHubKusamaMessagesInstance, this_chain: bp_bridge_hub_polkadot::BridgeHubPolkadot, bridged_chain: bp_bridge_hub_kusama::BridgeHubKusama, @@ -496,9 +496,8 @@ mod tests { assert_complete_with_parachain_bridge_constants::< Runtime, - BridgeGrandpaKusamaInstance, + BridgeParachainKusamaInstance, WithBridgeHubKusamaMessagesInstance, - bp_kusama::Kusama, >(AssertCompleteBridgeConstants { this_chain_constants: AssertChainConstants { block_length: bp_bridge_hub_polkadot::BlockLength::get(), 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 30fc9dca59..bc7b2f50e1 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/tests.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/tests.rs @@ -256,11 +256,12 @@ fn handle_export_message_from_system_parachain_add_to_outbound_queue_works() { >( SiblingParachainLocation::get(), BridgedUniversalLocation::get(), - |locations, fee| { + false, + |locations, _fee| { bridge_hub_test_utils::open_bridge_with_storage::< Runtime, XcmOverBridgeHubKusamaInstance - >(locations, fee, LegacyLaneId([0, 0, 0, 1])) + >(locations, LegacyLaneId([0, 0, 0, 1])) } ).1 }, @@ -318,11 +319,12 @@ fn relayed_incoming_message_works() { >( SiblingParachainLocation::get(), BridgedUniversalLocation::get(), - |locations, fee| { + false, + |locations, _fee| { bridge_hub_test_utils::open_bridge_with_storage::< Runtime, XcmOverBridgeHubKusamaInstance, - >(locations, fee, LegacyLaneId([0, 0, 0, 1])) + >(locations, LegacyLaneId([0, 0, 0, 1])) }, ) .1 @@ -352,11 +354,12 @@ fn free_relay_extrinsic_works() { >( SiblingParachainLocation::get(), BridgedUniversalLocation::get(), - |locations, fee| { + false, + |locations, _fee| { bridge_hub_test_utils::open_bridge_with_storage::< Runtime, XcmOverBridgeHubKusamaInstance, - >(locations, fee, LegacyLaneId([0, 0, 0, 1])) + >(locations, LegacyLaneId([0, 0, 0, 1])) }, ) .1 From 01a1d2c08d5750abd302528eaf8ae138e744f8f5 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Tue, 24 Dec 2024 00:17:50 +0100 Subject: [PATCH 03/15] Fixed/removed TODO for bridges --- Cargo.lock | 4 +- .../asset-hub-kusama/primitives/Cargo.toml | 4 +- .../asset-hub-kusama/primitives/src/lib.rs | 26 ++- .../asset-hub-kusama/tests/tests.rs | 54 ++++++- .../asset-hub-polkadot/primitives/Cargo.toml | 4 +- .../asset-hub-polkadot/primitives/src/lib.rs | 26 ++- .../asset-hub-polkadot/tests/tests.rs | 52 +++++- .../src/bridge_to_polkadot_config.rs | 153 +++--------------- .../src/bridge_to_kusama_config.rs | 153 +++--------------- 9 files changed, 212 insertions(+), 264 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 7ea01bc563..b4d42fb04f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1388,7 +1388,7 @@ dependencies = [ "frame-support", "parity-scale-codec", "scale-info", - "sp-std", + "sp-core 34.0.0", "staging-xcm", "system-parachains-constants", ] @@ -1401,7 +1401,7 @@ dependencies = [ "frame-support", "parity-scale-codec", "scale-info", - "sp-std", + "sp-core 34.0.0", "staging-xcm", "system-parachains-constants", ] diff --git a/system-parachains/asset-hubs/asset-hub-kusama/primitives/Cargo.toml b/system-parachains/asset-hubs/asset-hub-kusama/primitives/Cargo.toml index 7f22310349..4784e1cc18 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/primitives/Cargo.toml +++ b/system-parachains/asset-hubs/asset-hub-kusama/primitives/Cargo.toml @@ -19,7 +19,7 @@ bp-xcm-bridge-hub-router = { workspace = true } # Substrate Based Dependencies frame-support = { workspace = true } -sp-std = { workspace = true } +sp-core = { workspace = true } # Polkadot xcm = { workspace = true } @@ -31,7 +31,7 @@ std = [ "codec/std", "frame-support/std", "scale-info/std", - "sp-std/std", + "sp-core/std", "system-parachains-constants/std", "xcm/std", ] diff --git a/system-parachains/asset-hubs/asset-hub-kusama/primitives/src/lib.rs b/system-parachains/asset-hubs/asset-hub-kusama/primitives/src/lib.rs index f2f0b89052..ad7d732102 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/primitives/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/primitives/src/lib.rs @@ -18,11 +18,13 @@ #![cfg_attr(not(feature = "std"), no_std)] +extern crate alloc; + use codec::{Decode, Encode}; use scale_info::TypeInfo; -use xcm::prelude::*; pub use bp_xcm_bridge_hub_router::XcmBridgeHubRouterCall; +use xcm::latest::prelude::*; use system_parachains_constants::kusama::currency::*; @@ -50,5 +52,27 @@ frame_support::parameter_types! { pub const CreateForeignAssetDeposit: u128 = system_para_deposit(1, 190); } +/// Builds an (un)congestion XCM program with the `report_bridge_status` call for +/// `ToPolkadotXcmRouter`. +pub fn build_congestion_message( + bridge_id: sp_core::H256, + is_congested: bool, +) -> alloc::vec::Vec> { + alloc::vec![ + UnpaidExecution { weight_limit: Unlimited, check_origin: None }, + Transact { + origin_kind: OriginKind::Xcm, + require_weight_at_most: XcmBridgeHubRouterTransactCallMaxWeight::get(), + call: Call::ToPolkadotXcmRouter(XcmBridgeHubRouterCall::report_bridge_status { + bridge_id, + is_congested, + }) + .encode() + .into(), + }, + ExpectTransactStatus(MaybeErrorCode::Success), + ] +} + /// Identifier of AssetHubKusama in the Kusama relay chain. pub const ASSET_HUB_KUSAMA_PARACHAIN_ID: u32 = 1000; diff --git a/system-parachains/asset-hubs/asset-hub-kusama/tests/tests.rs b/system-parachains/asset-hubs/asset-hub-kusama/tests/tests.rs index 7e44cb1944..d416683c58 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/tests/tests.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/tests/tests.rs @@ -27,7 +27,7 @@ use asset_hub_kusama_runtime::{ AllPalletsWithoutSystem, AssetConversion, AssetDeposit, Assets, Balances, ExistentialDeposit, ForeignAssets, ForeignAssetsInstance, MetadataDepositBase, MetadataDepositPerByte, ParachainSystem, PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, SessionKeys, - TrustBackedAssetsInstance, XcmpQueue, SLOT_DURATION, + ToPolkadotXcmRouterInstance, TrustBackedAssetsInstance, XcmpQueue, SLOT_DURATION, }; use asset_test_utils::{ test_cases_over_bridge::TestBridgingConfig, CollatorSessionKey, CollatorSessionKeys, ExtBuilder, @@ -588,6 +588,58 @@ fn reserve_transfer_native_asset_to_non_teleport_para_works() { ); } +#[test] +fn report_bridge_status_from_xcm_bridge_router_for_polkadot_works() { + asset_test_utils::test_cases_over_bridge::report_bridge_status_from_xcm_bridge_router_works::< + Runtime, + AllPalletsWithoutSystem, + XcmConfig, + LocationToAccountId, + ToPolkadotXcmRouterInstance, + >( + collator_session_keys(), + bridging_to_asset_hub_polkadot, + || bp_asset_hub_kusama::build_congestion_message(Default::default(), true).into(), + || bp_asset_hub_kusama::build_congestion_message(Default::default(), false).into(), + ) +} + +#[test] +fn test_report_bridge_status_call_compatibility() { + // if this test fails, make sure `bp_asset_hub_polkadot` has valid encoding + assert_eq!( + RuntimeCall::ToPolkadotXcmRouter( + pallet_xcm_bridge_hub_router::Call::report_bridge_status { + bridge_id: Default::default(), + is_congested: true, + } + ) + .encode(), + bp_asset_hub_kusama::Call::ToPolkadotXcmRouter( + bp_asset_hub_kusama::XcmBridgeHubRouterCall::report_bridge_status { + bridge_id: Default::default(), + is_congested: true, + } + ) + .encode() + ) +} + +#[test] +fn check_sane_weight_report_bridge_status() { + use pallet_xcm_bridge_hub_router::WeightInfo; + let actual = >::WeightInfo::report_bridge_status(); + let max_weight = bp_asset_hub_kusama::XcmBridgeHubRouterTransactCallMaxWeight::get(); + assert!( + actual.all_lte(max_weight), + "max_weight: {:?} should be adjusted to actual {:?}", + max_weight, + actual + ); +} + #[test] fn change_xcm_bridge_hub_router_base_fee_by_governance_works() { asset_test_utils::test_cases::change_storage_constant_by_governance_works::< diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/primitives/Cargo.toml b/system-parachains/asset-hubs/asset-hub-polkadot/primitives/Cargo.toml index 70382050d7..a5baf230ef 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/primitives/Cargo.toml +++ b/system-parachains/asset-hubs/asset-hub-polkadot/primitives/Cargo.toml @@ -19,7 +19,7 @@ bp-xcm-bridge-hub-router = { workspace = true } # Substrate Based Dependencies frame-support = { workspace = true } -sp-std = { workspace = true } +sp-core = { workspace = true } # Polkadot xcm = { workspace = true } @@ -31,7 +31,7 @@ std = [ "codec/std", "frame-support/std", "scale-info/std", - "sp-std/std", + "sp-core/std", "system-parachains-constants/std", "xcm/std", ] diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/primitives/src/lib.rs b/system-parachains/asset-hubs/asset-hub-polkadot/primitives/src/lib.rs index 8a8916a86f..08ecb00c67 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/primitives/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/primitives/src/lib.rs @@ -18,11 +18,13 @@ #![cfg_attr(not(feature = "std"), no_std)] +extern crate alloc; + use codec::{Decode, Encode}; use scale_info::TypeInfo; -use xcm::prelude::*; pub use bp_xcm_bridge_hub_router::XcmBridgeHubRouterCall; +use xcm::latest::prelude::*; use system_parachains_constants::polkadot::currency::*; @@ -50,5 +52,27 @@ frame_support::parameter_types! { pub const CreateForeignAssetDeposit: u128 = system_para_deposit(1, 190); } +/// Builds an (un)congestion XCM program with the `report_bridge_status` call for +/// `ToKusamaXcmRouter`. +pub fn build_congestion_message( + bridge_id: sp_core::H256, + is_congested: bool, +) -> alloc::vec::Vec> { + alloc::vec![ + UnpaidExecution { weight_limit: Unlimited, check_origin: None }, + Transact { + origin_kind: OriginKind::Xcm, + require_weight_at_most: XcmBridgeHubRouterTransactCallMaxWeight::get(), + call: Call::ToKusamaXcmRouter(XcmBridgeHubRouterCall::report_bridge_status { + bridge_id, + is_congested, + }) + .encode() + .into(), + }, + ExpectTransactStatus(MaybeErrorCode::Success), + ] +} + /// Identifier of AssetHubPolkadot in the Polkadot relay chain. pub const ASSET_HUB_POLKADOT_PARACHAIN_ID: u32 = 1000; diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/tests/tests.rs b/system-parachains/asset-hubs/asset-hub-polkadot/tests/tests.rs index b03bf05954..758e49fc20 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/tests/tests.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/tests/tests.rs @@ -27,7 +27,7 @@ use asset_hub_polkadot_runtime::{ AllPalletsWithoutSystem, AssetConversion, AssetDeposit, Assets, Balances, ExistentialDeposit, ForeignAssets, ForeignAssetsInstance, MetadataDepositBase, MetadataDepositPerByte, ParachainSystem, PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, SessionKeys, - TrustBackedAssetsInstance, XcmpQueue, SLOT_DURATION, + ToKusamaXcmRouterInstance, TrustBackedAssetsInstance, XcmpQueue, SLOT_DURATION, }; use asset_test_utils::{ test_cases_over_bridge::TestBridgingConfig, CollatorSessionKey, CollatorSessionKeys, ExtBuilder, @@ -585,6 +585,56 @@ fn reserve_transfer_native_asset_to_non_teleport_para_works() { ); } +#[test] +fn report_bridge_status_from_xcm_bridge_router_for_kusama_works() { + asset_test_utils::test_cases_over_bridge::report_bridge_status_from_xcm_bridge_router_works::< + Runtime, + AllPalletsWithoutSystem, + XcmConfig, + LocationToAccountId, + ToKusamaXcmRouterInstance, + >( + collator_session_keys(), + bridging_to_asset_hub_kusama, + || bp_asset_hub_polkadot::build_congestion_message(Default::default(), true).into(), + || bp_asset_hub_polkadot::build_congestion_message(Default::default(), false).into(), + ) +} + +#[test] +fn test_report_bridge_status_call_compatibility() { + // if this test fails, make sure `bp_asset_hub_kusama` has valid encoding + assert_eq!( + RuntimeCall::ToKusamaXcmRouter(pallet_xcm_bridge_hub_router::Call::report_bridge_status { + bridge_id: Default::default(), + is_congested: true, + }) + .encode(), + bp_asset_hub_polkadot::Call::ToKusamaXcmRouter( + bp_asset_hub_polkadot::XcmBridgeHubRouterCall::report_bridge_status { + bridge_id: Default::default(), + is_congested: true, + } + ) + .encode() + ) +} + +#[test] +fn check_sane_weight_report_bridge_status() { + use pallet_xcm_bridge_hub_router::WeightInfo; + let actual = >::WeightInfo::report_bridge_status(); + let max_weight = bp_asset_hub_polkadot::XcmBridgeHubRouterTransactCallMaxWeight::get(); + assert!( + actual.all_lte(max_weight), + "max_weight: {:?} should be adjusted to actual {:?}", + max_weight, + actual + ); +} + #[test] fn change_xcm_bridge_hub_router_base_fee_by_governance_works() { asset_test_utils::test_cases::change_storage_constant_by_governance_works::< diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/bridge_to_polkadot_config.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/bridge_to_polkadot_config.rs index fa0b9cb859..eba20eeda0 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/bridge_to_polkadot_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/bridge_to_polkadot_config.rs @@ -20,7 +20,7 @@ use crate::{ weights, xcm_config::{UniversalLocation, XcmRouter}, AccountId, Balance, Balances, BlockNumber, BridgePolkadotMessages, PolkadotXcm, Runtime, - RuntimeEvent, RuntimeHoldReason, XcmOverBridgeHubPolkadot, + RuntimeEvent, RuntimeHoldReason, XcmOverBridgeHubPolkadot, XcmpQueue, }; use bp_messages::{ source_chain::FromBridgedChainMessagesDeliveryProof, @@ -39,7 +39,7 @@ use pallet_bridge_messages::LaneIdOf; use pallet_bridge_relayers::extension::{ BridgeRelayersSignedExtension, WithMessagesExtensionConfig, }; -use pallet_xcm_bridge_hub::XcmAsPlainPayload; +use pallet_xcm_bridge_hub::{BridgeId, XcmAsPlainPayload}; use parachains_common::xcm_config::{AllSiblingSystemParachains, RelayOrOtherSystemParachains}; use polkadot_parachain_primitives::primitives::Sibling; use sp_runtime::traits::ConstU32; @@ -257,144 +257,43 @@ impl pallet_xcm_bridge_hub::Config for Runtime type AllowWithoutBridgeDeposit = RelayOrOtherSystemParachains; - type LocalXcmChannelManager = XcmpQueueChannelManager; + type LocalXcmChannelManager = CongestionManager; type BlobDispatcher = FromPolkadotMessageBlobDispatcher; } -/// Implementation `bp_xcm_bridge_hub::LocalXcmChannelManager`. -pub struct XcmpQueueChannelManager; -impl bp_xcm_bridge_hub::LocalXcmChannelManager for XcmpQueueChannelManager { - type Error = (); +/// Implementation of `bp_xcm_bridge_hub::LocalXcmChannelManager` for congestion management. +pub struct CongestionManager; +impl pallet_xcm_bridge_hub::LocalXcmChannelManager for CongestionManager { + type Error = SendError; fn is_congested(with: &Location) -> bool { - // This is used to check the inbound queue/messages to determine if they can be dispatched - // and sent to the sibling parachain. Therefore, checking `OutXcmp` is sufficient. + // This is used to check the inbound bridge queue/messages to determine if they can be + // dispatched and sent to the sibling parachain. Therefore, checking outbound `XcmpQueue` + // is sufficient here. use bp_xcm_bridge_hub_router::XcmChannelStatusProvider; cumulus_pallet_xcmp_queue::bridging::OutXcmpChannelStatusProvider::::is_congested( with, ) } - fn suspend_bridge( - _local_origin: &Location, - _: pallet_xcm_bridge_hub::BridgeId, - ) -> Result<(), Self::Error> { - // IMPORTANT NOTE: - // - // Unfortunately, `https://github.com/paritytech/polkadot-sdk/pull/6231` reworked congestion is not yet released. - // - // And unfortunately, we don't have access to `XcmpQueue::send_signal(para, - // ChannelSignal::Suspend)` here (which would require patch release), we can add this - // hacky workaround/tmp/implementation that should trigger `ChannelSignal::Suspend`, e.g.: - /* - use crate::{MessageQueue, XcmpQueue}; - use bridge_hub_common::message_queue::AggregateMessageOrigin; - use codec::{Decode, Encode, MaxEncodedLen}; - use frame_support::traits::EnqueueMessage; - use frame_support::pallet_prelude::OptionQuery; - use pallet_message_queue::OnQueueChanged; - use scale_info::TypeInfo; - - // get sibling para id - let local_origin_para_id: crate::ParaId = match local_origin.unpack() { - (1, [Parachain(id)]) => (*id).into(), - _ => return Err(()) - }; - - // read `suspend_threshold` from `XcmpQueue` storage - #[derive(Copy, Clone, Eq, PartialEq, Encode, Decode, TypeInfo, MaxEncodedLen)] - struct QueueConfigData { - suspend_threshold: u32, - drop_threshold: u32, - resume_threshold: u32, - } - #[frame_support::storage_alias] - type QueueConfig = StorageValue; - let suspend_threshold = match QueueConfig::get() { - Some(qc) => qc.suspend_threshold, - None => return Err(()) - }; - - // Now, this should trigger `XcmpQueue::send_signal(para, ChannelSignal::Suspend)` - let mut qf = MessageQueue::footprint(AggregateMessageOrigin::Sibling(local_origin_para_id)); - qf.ready_pages = suspend_threshold; - XcmpQueue::on_queue_changed(local_origin_para_id.into(), qf); - */ - - // IMPORTANT NOTE2: - // - // In the current setup, this code is likely triggered only for the hard-coded AHK<>AHP - // lane, as we do not support any other bridge lanes on BridgeHubs. It is triggered only - // when `pallet_bridge_messages::OutboundMessages` reaches 8,192 undelivered messages. The - // potential risk of keeping `Ok(())` or `Err(())` here is that - // `pallet_bridge_messages::OutboundMessages` may continue to grow: - // - // ``` - // #[pallet::storage] - // pub type OutboundMessages, I: 'static = ()> = - // StorageMap<_, Blake2_128Concat, MessageKey, StoredMessagePayload>; - // ``` - - // TODO: decide: - // 1. wait for patch-release stable2409-3 2024-12-12 - // 2. go with `Ok(())` / `Err(())` - // 3. go with `XcmpQueue::send_signal` temporary workaround till patch release - - Ok(()) + fn suspend_bridge(local_origin: &Location, bridge: BridgeId) -> Result<(), Self::Error> { + // This bridge is intended for AH<>AH communication with a hard-coded/static lane, + // so `local_origin` is expected to represent only the local AH. + send_xcm::( + local_origin.clone(), + bp_asset_hub_kusama::build_congestion_message(bridge.inner(), true).into(), + ) + .map(|_| ()) } - fn resume_bridge( - _local_origin: &Location, - _: pallet_xcm_bridge_hub::BridgeId, - ) -> Result<(), Self::Error> { - // IMPORTANT NOTE: - // - // Unfortunately, `https://github.com/paritytech/polkadot-sdk/pull/6231` reworked congestion is not yet released. - // - // And unfortunately, we don't have access to `XcmpQueue::send_signal(para, - // ChannelSignal::Resume)` here (which would require patch release), we can add this hacky - // workaround/tmp/implementation that should trigger `ChannelSignal::Resume`, e.g.: - /* - use crate::{MessageQueue, XcmpQueue}; - use bridge_hub_common::message_queue::AggregateMessageOrigin; - use codec::{Decode, Encode, MaxEncodedLen}; - use frame_support::traits::EnqueueMessage; - use frame_support::pallet_prelude::OptionQuery; - use pallet_message_queue::OnQueueChanged; - use scale_info::TypeInfo; - - // get sibling para id - let local_origin_para_id: crate::ParaId = match local_origin.unpack() { - (1, [Parachain(id)]) => (*id).into(), - _ => return Err(()) - }; - - // read `resume_threshold` from `XcmpQueue` storage - #[derive(Copy, Clone, Eq, PartialEq, Encode, Decode, TypeInfo, MaxEncodedLen)] - struct QueueConfigData { - suspend_threshold: u32, - drop_threshold: u32, - resume_threshold: u32, - } - #[frame_support::storage_alias] - type QueueConfig = StorageValue; - let resume_threshold = match QueueConfig::get() { - Some(qc) => qc.resume_threshold, - None => return Err(()) - }; - - // Now, this should trigger `XcmpQueue::send_signal(para, ChannelSignal::Resume)` - let mut qf = MessageQueue::footprint(AggregateMessageOrigin::Sibling(local_origin_para_id)); - qf.ready_pages = resume_threshold; - XcmpQueue::on_queue_changed(local_origin_para_id.into(), qf); - */ - - // TODO: decide: - // 1. wait for patch-release stable2409-3 2024-12-12 - // 2. go with `Ok(())` / `Err(())` - // 3. go with `XcmpQueue::send_signal` temporary workaround till patch release - - Ok(()) + fn resume_bridge(local_origin: &Location, bridge: BridgeId) -> Result<(), Self::Error> { + // This bridge is intended for AH<>AH communication with a hard-coded/static lane, + // so `local_origin` is expected to represent only the local AH. + send_xcm::( + local_origin.clone(), + bp_asset_hub_kusama::build_congestion_message(bridge.inner(), false).into(), + ) + .map(|_| ()) } } 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 0cdf0e43c7..fe3ac59b40 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/bridge_to_kusama_config.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/bridge_to_kusama_config.rs @@ -20,7 +20,7 @@ use crate::{ weights, xcm_config::{UniversalLocation, XcmRouter}, AccountId, Balance, Balances, BlockNumber, BridgeKusamaMessages, PolkadotXcm, Runtime, - RuntimeEvent, RuntimeHoldReason, XcmOverBridgeHubKusama, + RuntimeEvent, RuntimeHoldReason, XcmOverBridgeHubKusama, XcmpQueue, }; use bp_messages::{ @@ -39,7 +39,7 @@ use pallet_bridge_messages::LaneIdOf; use pallet_bridge_relayers::extension::{ BridgeRelayersSignedExtension, WithMessagesExtensionConfig, }; -use pallet_xcm_bridge_hub::XcmAsPlainPayload; +use pallet_xcm_bridge_hub::{BridgeId, XcmAsPlainPayload}; use parachains_common::xcm_config::{AllSiblingSystemParachains, RelayOrOtherSystemParachains}; use polkadot_parachain_primitives::primitives::Sibling; use polkadot_runtime_constants as constants; @@ -257,144 +257,43 @@ impl pallet_xcm_bridge_hub::Config for Runtime { type AllowWithoutBridgeDeposit = RelayOrOtherSystemParachains; - type LocalXcmChannelManager = XcmpQueueChannelManager; + type LocalXcmChannelManager = CongestionManager; type BlobDispatcher = FromKusamaMessageBlobDispatcher; } -/// Implementation `bp_xcm_bridge_hub::LocalXcmChannelManager`. -pub struct XcmpQueueChannelManager; -impl bp_xcm_bridge_hub::LocalXcmChannelManager for XcmpQueueChannelManager { - type Error = (); +/// Implementation of `bp_xcm_bridge_hub::LocalXcmChannelManager` for congestion management. +pub struct CongestionManager; +impl pallet_xcm_bridge_hub::LocalXcmChannelManager for CongestionManager { + type Error = SendError; fn is_congested(with: &Location) -> bool { - // This is used to check the inbound queue/messages to determine if they can be dispatched - // and sent to the sibling parachain. Therefore, checking `OutXcmp` is sufficient. + // This is used to check the inbound bridge queue/messages to determine if they can be + // dispatched and sent to the sibling parachain. Therefore, checking outbound `XcmpQueue` + // is sufficient here. use bp_xcm_bridge_hub_router::XcmChannelStatusProvider; cumulus_pallet_xcmp_queue::bridging::OutXcmpChannelStatusProvider::::is_congested( with, ) } - fn suspend_bridge( - _local_origin: &Location, - _: pallet_xcm_bridge_hub::BridgeId, - ) -> Result<(), Self::Error> { - // IMPORTANT NOTE: - // - // Unfortunately, `https://github.com/paritytech/polkadot-sdk/pull/6231` reworked congestion is not yet released. - // - // And unfortunately, we don't have access to `XcmpQueue::send_signal(para, - // ChannelSignal::Suspend)` here (which would require patch release), we can add this - // hacky workaround/tmp/implementation that should trigger `ChannelSignal::Suspend`, e.g.: - /* - use crate::{MessageQueue, XcmpQueue}; - use bridge_hub_common::message_queue::AggregateMessageOrigin; - use codec::{Decode, Encode, MaxEncodedLen}; - use frame_support::traits::EnqueueMessage; - use frame_support::pallet_prelude::OptionQuery; - use pallet_message_queue::OnQueueChanged; - use scale_info::TypeInfo; - - // get sibling para id - let local_origin_para_id: crate::ParaId = match _local_origin.unpack() { - (1, [Parachain(id)]) => (*id).into(), - _ => return Err(()) - }; - - // read `suspend_threshold` from `XcmpQueue` storage - #[derive(Copy, Clone, Eq, PartialEq, Encode, Decode, TypeInfo, MaxEncodedLen)] - struct QueueConfigData { - suspend_threshold: u32, - drop_threshold: u32, - resume_threshold: u32, - } - #[frame_support::storage_alias] - type QueueConfig = StorageValue; - let suspend_threshold = match QueueConfig::get() { - Some(qc) => qc.suspend_threshold, - None => return Err(()) - }; - - // Now, this should trigger `XcmpQueue::send_signal(para, ChannelSignal::Suspend)` - let mut qf = MessageQueue::footprint(AggregateMessageOrigin::Sibling(local_origin_para_id)); - qf.ready_pages = suspend_threshold; - XcmpQueue::on_queue_changed(local_origin_para_id.into(), qf); - */ - - // IMPORTANT NOTE2: - // - // In the current setup, this code is likely triggered only for the hard-coded AHK<>AHP - // lane, as we do not support any other bridge lanes on BridgeHubs. It is triggered only - // when `pallet_bridge_messages::OutboundMessages` reaches 8,192 undelivered messages. The - // potential risk of keeping `Ok(())` or `Err(())` here is that - // `pallet_bridge_messages::OutboundMessages` may continue to grow: - // - // ``` - // #[pallet::storage] - // pub type OutboundMessages, I: 'static = ()> = - // StorageMap<_, Blake2_128Concat, MessageKey, StoredMessagePayload>; - // ``` - - // TODO: decide: - // 1. wait for patch-release stable2409-3 2024-12-12 - // 2. go with `Ok(())` / `Err(())` - // 3. go with `XcmpQueue::send_signal` temporary workaround till patch release - - Ok(()) + fn suspend_bridge(local_origin: &Location, bridge: BridgeId) -> Result<(), Self::Error> { + // This bridge is intended for AH<>AH communication with a hard-coded/static lane, + // so `local_origin` is expected to represent only the local AH. + send_xcm::( + local_origin.clone(), + bp_asset_hub_kusama::build_congestion_message(bridge.inner(), true).into(), + ) + .map(|_| ()) } - fn resume_bridge( - _local_origin: &Location, - _: pallet_xcm_bridge_hub::BridgeId, - ) -> Result<(), Self::Error> { - // IMPORTANT NOTE: - // - // Unfortunately, `https://github.com/paritytech/polkadot-sdk/pull/6231` reworked congestion is not yet released. - // - // And unfortunately, we don't have access to `XcmpQueue::send_signal(para, - // ChannelSignal::Resume)` here (which would require patch release), we can add this hacky - // workaround/tmp/implementation that should trigger `ChannelSignal::Resume`, e.g.: - /* - use crate::{MessageQueue, XcmpQueue}; - use bridge_hub_common::message_queue::AggregateMessageOrigin; - use codec::{Decode, Encode, MaxEncodedLen}; - use frame_support::traits::EnqueueMessage; - use frame_support::pallet_prelude::OptionQuery; - use pallet_message_queue::OnQueueChanged; - use scale_info::TypeInfo; - - // get sibling para id - let local_origin_para_id: crate::ParaId = match _local_origin.unpack() { - (1, [Parachain(id)]) => (*id).into(), - _ => return Err(()) - }; - - // read `resume_threshold` from `XcmpQueue` storage - #[derive(Copy, Clone, Eq, PartialEq, Encode, Decode, TypeInfo, MaxEncodedLen)] - struct QueueConfigData { - suspend_threshold: u32, - drop_threshold: u32, - resume_threshold: u32, - } - #[frame_support::storage_alias] - type QueueConfig = StorageValue; - let resume_threshold = match QueueConfig::get() { - Some(qc) => qc.resume_threshold, - None => return Err(()) - }; - - // Now, this should trigger `XcmpQueue::send_signal(para, ChannelSignal::Resume)` - let mut qf = MessageQueue::footprint(AggregateMessageOrigin::Sibling(local_origin_para_id)); - qf.ready_pages = resume_threshold; - XcmpQueue::on_queue_changed(local_origin_para_id.into(), qf); - */ - - // TODO: decide: - // 1. wait for patch-release stable2409-3 2024-12-12 - // 2. go with `Ok(())` / `Err(())` - // 3. go with `XcmpQueue::send_signal` temporary workaround till patch release - - Ok(()) + fn resume_bridge(local_origin: &Location, bridge: BridgeId) -> Result<(), Self::Error> { + // This bridge is intended for AH<>AH communication with a hard-coded/static lane, + // so `local_origin` is expected to represent only the local AH. + send_xcm::( + local_origin.clone(), + bp_asset_hub_kusama::build_congestion_message(bridge.inner(), false).into(), + ) + .map(|_| ()) } } From 8ce2796d8d2565013784a9f2837cadc22818c338 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Tue, 24 Dec 2024 00:09:32 +0000 Subject: [PATCH 04/15] Update from bkontur running command 'fmt' --- .../asset-hubs/asset-hub-kusama/primitives/src/lib.rs | 4 ++-- system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs | 6 ++---- .../asset-hubs/asset-hub-kusama/tests/tests.rs | 4 ++-- .../asset-hubs/asset-hub-polkadot/primitives/src/lib.rs | 4 ++-- system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs | 6 ++---- .../asset-hubs/asset-hub-polkadot/tests/tests.rs | 4 ++-- .../bridge-hub-kusama/src/bridge_to_polkadot_config.rs | 4 ++-- .../bridge-hub-polkadot/src/bridge_to_kusama_config.rs | 4 ++-- 8 files changed, 16 insertions(+), 20 deletions(-) diff --git a/system-parachains/asset-hubs/asset-hub-kusama/primitives/src/lib.rs b/system-parachains/asset-hubs/asset-hub-kusama/primitives/src/lib.rs index ad7d732102..782868f8db 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/primitives/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/primitives/src/lib.rs @@ -67,8 +67,8 @@ pub fn build_congestion_message( bridge_id, is_congested, }) - .encode() - .into(), + .encode() + .into(), }, ExpectTransactStatus(MaybeErrorCode::Success), ] 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 db0aaf230a..41d4d5e79a 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs @@ -956,10 +956,8 @@ impl pallet_xcm_bridge_hub_router::Config for Runti type DestinationVersion = PolkadotXcm; type SiblingBridgeHubLocation = xcm_config::bridging::SiblingBridgeHub; - type BridgeHubOrigin = EitherOfDiverse< - EnsureRoot, - EnsureXcm>, - >; + type BridgeHubOrigin = + EitherOfDiverse, EnsureXcm>>; type ToBridgeHubSender = XcmpQueue; type ByteFee = xcm_config::bridging::XcmBridgeHubRouterByteFee; 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 d416683c58..5521f8e430 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/tests/tests.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/tests/tests.rs @@ -614,14 +614,14 @@ fn test_report_bridge_status_call_compatibility() { is_congested: true, } ) - .encode(), + .encode(), bp_asset_hub_kusama::Call::ToPolkadotXcmRouter( bp_asset_hub_kusama::XcmBridgeHubRouterCall::report_bridge_status { bridge_id: Default::default(), is_congested: true, } ) - .encode() + .encode() ) } diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/primitives/src/lib.rs b/system-parachains/asset-hubs/asset-hub-polkadot/primitives/src/lib.rs index 08ecb00c67..0150ef20a0 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/primitives/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/primitives/src/lib.rs @@ -67,8 +67,8 @@ pub fn build_congestion_message( bridge_id, is_congested, }) - .encode() - .into(), + .encode() + .into(), }, ExpectTransactStatus(MaybeErrorCode::Success), ] 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 664403aa27..a33da7bad6 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs @@ -855,10 +855,8 @@ impl pallet_xcm_bridge_hub_router::Config for Runtime type DestinationVersion = PolkadotXcm; type SiblingBridgeHubLocation = xcm_config::bridging::SiblingBridgeHub; - type BridgeHubOrigin = EitherOfDiverse< - EnsureRoot, - EnsureXcm>, - >; + type BridgeHubOrigin = + EitherOfDiverse, EnsureXcm>>; type ToBridgeHubSender = XcmpQueue; type ByteFee = xcm_config::bridging::XcmBridgeHubRouterByteFee; 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 758e49fc20..ca193927a2 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/tests/tests.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/tests/tests.rs @@ -609,14 +609,14 @@ fn test_report_bridge_status_call_compatibility() { bridge_id: Default::default(), is_congested: true, }) - .encode(), + .encode(), bp_asset_hub_polkadot::Call::ToKusamaXcmRouter( bp_asset_hub_polkadot::XcmBridgeHubRouterCall::report_bridge_status { bridge_id: Default::default(), is_congested: true, } ) - .encode() + .encode() ) } 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 eba20eeda0..0ea39936ac 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 @@ -283,7 +283,7 @@ impl pallet_xcm_bridge_hub::LocalXcmChannelManager for CongestionManager { local_origin.clone(), bp_asset_hub_kusama::build_congestion_message(bridge.inner(), true).into(), ) - .map(|_| ()) + .map(|_| ()) } fn resume_bridge(local_origin: &Location, bridge: BridgeId) -> Result<(), Self::Error> { @@ -293,7 +293,7 @@ impl pallet_xcm_bridge_hub::LocalXcmChannelManager for CongestionManager { local_origin.clone(), bp_asset_hub_kusama::build_congestion_message(bridge.inner(), false).into(), ) - .map(|_| ()) + .map(|_| ()) } } 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 fe3ac59b40..f9975ea649 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 @@ -283,7 +283,7 @@ impl pallet_xcm_bridge_hub::LocalXcmChannelManager for CongestionManager { local_origin.clone(), bp_asset_hub_kusama::build_congestion_message(bridge.inner(), true).into(), ) - .map(|_| ()) + .map(|_| ()) } fn resume_bridge(local_origin: &Location, bridge: BridgeId) -> Result<(), Self::Error> { @@ -293,7 +293,7 @@ impl pallet_xcm_bridge_hub::LocalXcmChannelManager for CongestionManager { local_origin.clone(), bp_asset_hub_kusama::build_congestion_message(bridge.inner(), false).into(), ) - .map(|_| ()) + .map(|_| ()) } } From 601970b2878e14a63712fb5783297be5cde4212a Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Sat, 28 Dec 2024 00:43:06 +0100 Subject: [PATCH 05/15] WIP: Fix bridges integration tests --- .../bridges_polkadot_kusama.sh | 4 +-- .../dot-reaches-kusama.zndsl | 2 +- .../ksm-reaches-polkadot.zndsl | 2 +- .../src/genesis_config_presets.rs | 28 ++++++++++++------- .../src/bridge_to_kusama_config.rs | 2 +- .../src/genesis_config_presets.rs | 25 ++++++++++------- 6 files changed, 38 insertions(+), 25 deletions(-) diff --git a/integration-tests/bridges/environments/polkadot-kusama/bridges_polkadot_kusama.sh b/integration-tests/bridges/environments/polkadot-kusama/bridges_polkadot_kusama.sh index 040db39db3..8d66d8241d 100755 --- a/integration-tests/bridges/environments/polkadot-kusama/bridges_polkadot_kusama.sh +++ b/integration-tests/bridges/environments/polkadot-kusama/bridges_polkadot_kusama.sh @@ -207,7 +207,7 @@ case "$1" in "//Alice" \ 1000 \ "ws://127.0.0.1:9910" \ - "$(jq --null-input '{ "parents": 2, "interior": { "X1": { "GlobalConsensus": "Kusama" } } }')" \ + "$(jq --null-input '{ "parents": 2, "interior": { "X1": [{ "GlobalConsensus": "Kusama" }] } }')" \ "$GLOBAL_CONSENSUS_KUSAMA_SOVEREIGN_ACCOUNT" \ $AHP_KSM_ED \ true @@ -266,7 +266,7 @@ case "$1" in "//Alice" \ 1000 \ "ws://127.0.0.1:9010" \ - "$(jq --null-input '{ "parents": 2, "interior": { "X1": { "GlobalConsensus": "Polkadot" } } }')" \ + "$(jq --null-input '{ "parents": 2, "interior": { "X1": [{ "GlobalConsensus": "Polkadot" }] } }')" \ "$GLOBAL_CONSENSUS_POLKADOT_SOVEREIGN_ACCOUNT" \ $AHK_DOT_ED \ true diff --git a/integration-tests/bridges/tests/0001-polkadot-kusama-asset-transfer/dot-reaches-kusama.zndsl b/integration-tests/bridges/tests/0001-polkadot-kusama-asset-transfer/dot-reaches-kusama.zndsl index 13db4cca35..5b3084275f 100644 --- a/integration-tests/bridges/tests/0001-polkadot-kusama-asset-transfer/dot-reaches-kusama.zndsl +++ b/integration-tests/bridges/tests/0001-polkadot-kusama-asset-transfer/dot-reaches-kusama.zndsl @@ -6,7 +6,7 @@ Creds: config asset-hub-kusama-collator-1: run {{ENV_PATH}}/helper.sh with "reserve-transfer-assets-from-asset-hub-polkadot-local 50000000000" within 120 seconds # check that //Alice received at least 4.8 DOT on Kusama AH -asset-hub-kusama-collator-1: js-script {{FRAMEWORK_PATH}}/js-helpers/wrapped-assets-balance.js with "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY,48000000000,Polkadot" within 300 seconds +asset-hub-kusama-collator-1: js-script {{FRAMEWORK_PATH}}/js-helpers/wrapped-assets-balance.js with '{ "accountAddress": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", "expectedAssetBalance": 48000000000, "expectedAssetId": { "parents": 2, "interior": { "X1": [{ "GlobalConsensus": "Polkadot" }] }}}' within 300 seconds # check that the relayer //Charlie is rewarded by Kusama AH bridge-hub-kusama-collator-1: js-script {{FRAMEWORK_PATH}}/js-helpers/relayer-rewards.js with "5FLSigC9HGRKVhB9FiEo4Y3koPsNmBmLJbpXg2mp1hXcS59Y,0x00000001,0x62687064,ThisChain,0" within 30 seconds diff --git a/integration-tests/bridges/tests/0001-polkadot-kusama-asset-transfer/ksm-reaches-polkadot.zndsl b/integration-tests/bridges/tests/0001-polkadot-kusama-asset-transfer/ksm-reaches-polkadot.zndsl index c07bfa9732..ec97ad3286 100644 --- a/integration-tests/bridges/tests/0001-polkadot-kusama-asset-transfer/ksm-reaches-polkadot.zndsl +++ b/integration-tests/bridges/tests/0001-polkadot-kusama-asset-transfer/ksm-reaches-polkadot.zndsl @@ -6,7 +6,7 @@ Creds: config asset-hub-polkadot-collator-1: run {{ENV_PATH}}/helper.sh with "reserve-transfer-assets-from-asset-hub-kusama-local 5000000000000" within 120 seconds # check that //Alice received at least 4.8 KSM on Polkadot AH -asset-hub-polkadot-collator-1: js-script {{FRAMEWORK_PATH}}/js-helpers/wrapped-assets-balance.js with "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY,4800000000000,Kusama" within 300 seconds +asset-hub-polkadot-collator-1: js-script {{FRAMEWORK_PATH}}/js-helpers/wrapped-assets-balance.js with '{ "accountAddress": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", "expectedAssetBalance": 4800000000000, "expectedAssetId": { "parents": 2, "interior": { "X1": [{ "GlobalConsensus": "Kusama" }] }}}' within 300 seconds # check that the relayer //Charlie is rewarded by Polkadot AH bridge-hub-polkadot-collator-1: js-script {{FRAMEWORK_PATH}}/js-helpers/relayer-rewards.js with "5FLSigC9HGRKVhB9FiEo4Y3koPsNmBmLJbpXg2mp1hXcS59Y,0x00000001,0x62686b73,ThisChain,0" within 30 seconds diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/genesis_config_presets.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/genesis_config_presets.rs index d40ff9e449..a05f4a4b51 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/genesis_config_presets.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/genesis_config_presets.rs @@ -27,6 +27,7 @@ fn bridge_hub_kusama_genesis( invulnerables: Vec<(AccountId, AuraId)>, endowed_accounts: Vec, id: ParaId, + opened_bridges: Vec<(Location, InteriorLocation, Option)>, ) -> serde_json::Value { serde_json::json!({ "balances": BalancesConfig { @@ -61,19 +62,12 @@ fn bridge_hub_kusama_genesis( "polkadotXcm": { "safeXcmVersion": Some(SAFE_XCM_VERSION), }, + "xcmOverBridgeHubPolkadot": XcmOverBridgeHubPolkadotConfig { opened_bridges, ..Default::default() }, // no need to pass anything to aura, in fact it will panic if we do. Session will take care // of this. `aura: Default::default()` }) } -pub fn bridge_hub_kusama_local_testnet_genesis(para_id: ParaId) -> serde_json::Value { - bridge_hub_kusama_genesis(invulnerables(), testnet_accounts(), para_id) -} - -fn bridge_hub_kusama_development_genesis(para_id: ParaId) -> serde_json::Value { - bridge_hub_kusama_local_testnet_genesis(para_id) -} - /// Provides the names of the predefined genesis configs for this runtime. pub fn preset_names() -> Vec { vec![PresetId::from("development"), PresetId::from("local_testnet")] @@ -82,8 +76,22 @@ pub fn preset_names() -> Vec { /// Provides the JSON representation of predefined genesis config for given `id`. pub fn get_preset(id: &sp_genesis_builder::PresetId) -> Option> { let patch = match id.try_into() { - Ok("development") => bridge_hub_kusama_development_genesis(1002.into()), - Ok("local_testnet") => bridge_hub_kusama_local_testnet_genesis(1002.into()), + Ok("development") => bridge_hub_kusama_genesis( + invulnerables(), + testnet_accounts(), + 1002.into(), + vec![] + ), + Ok("local_testnet") => bridge_hub_kusama_genesis( + invulnerables(), + testnet_accounts(), + 1002.into(), + vec![( + Location::new(1, [Parachain(1000)]), + Junctions::from([GlobalConsensus(Polkadot), Parachain(1000)]), + Some(bp_messages::LegacyLaneId([0, 0, 0, 1])), + )], + ), _ => return None, }; Some( 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 f9975ea649..639e120c70 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 @@ -93,7 +93,7 @@ parameter_types! { pub type RelayersForLegacyLaneIdsMessagesInstance = (); /// Allows collect and claim rewards for relayers. -impl pallet_bridge_relayers::Config for Runtime { +impl pallet_bridge_relayers::Config for Runtime { type RuntimeEvent = RuntimeEvent; type Reward = Balance; type PaymentProcedure = bp_relayers::PayRewardFromAccount< diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/genesis_config_presets.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/genesis_config_presets.rs index 20b5409148..eac1428a38 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/genesis_config_presets.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/genesis_config_presets.rs @@ -27,6 +27,7 @@ fn bridge_hub_polkadot_genesis( invulnerables: Vec<(AccountId, AuraId)>, endowed_accounts: Vec, id: ParaId, + opened_bridges: Vec<(Location, InteriorLocation, Option)>, ) -> serde_json::Value { serde_json::json!({ "balances": BalancesConfig { @@ -61,6 +62,7 @@ fn bridge_hub_polkadot_genesis( "polkadotXcm": { "safeXcmVersion": Some(SAFE_XCM_VERSION), }, + "xcmOverBridgeHubKusama": XcmOverBridgeHubKusamaConfig { opened_bridges, ..Default::default() }, "ethereumSystem": EthereumSystemConfig { para_id: id, asset_hub_para_id: polkadot_runtime_constants::system_parachain::ASSET_HUB_ID.into(), @@ -71,14 +73,6 @@ fn bridge_hub_polkadot_genesis( }) } -pub fn bridge_hub_polkadot_local_testnet_genesis(para_id: ParaId) -> serde_json::Value { - bridge_hub_polkadot_genesis(invulnerables(), testnet_accounts(), para_id) -} - -fn bridge_hub_polkadot_development_genesis(para_id: ParaId) -> serde_json::Value { - bridge_hub_polkadot_local_testnet_genesis(para_id) -} - /// Provides the names of the predefined genesis configs for this runtime. pub fn preset_names() -> Vec { vec![PresetId::from("development"), PresetId::from("local_testnet")] @@ -87,8 +81,19 @@ pub fn preset_names() -> Vec { /// Provides the JSON representation of predefined genesis config for given `id`. pub fn get_preset(id: &sp_genesis_builder::PresetId) -> Option> { let patch = match id.try_into() { - Ok("development") => bridge_hub_polkadot_development_genesis(1002.into()), - Ok("local_testnet") => bridge_hub_polkadot_local_testnet_genesis(1002.into()), + Ok("development") => { + bridge_hub_polkadot_genesis(invulnerables(), testnet_accounts(), 1002.into(), vec![]) + }, + Ok("local_testnet") => bridge_hub_polkadot_genesis( + invulnerables(), + testnet_accounts(), + 1002.into(), + vec![( + Location::new(1, [Parachain(1000)]), + Junctions::from([GlobalConsensus(Kusama), Parachain(1000)]), + Some(bp_messages::LegacyLaneId([0, 0, 0, 1])), + )], + ), _ => return None, }; Some( From ccdb9e68261a8b4107858d108b6da0fc40e0c2aa Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Sat, 28 Dec 2024 00:21:07 +0000 Subject: [PATCH 06/15] Update from bkontur running command 'fmt' --- .../bridge-hub-kusama/src/genesis_config_presets.rs | 8 ++------ .../bridge-hub-polkadot/src/genesis_config_presets.rs | 5 ++--- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/genesis_config_presets.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/genesis_config_presets.rs index a05f4a4b51..644c7baa43 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/genesis_config_presets.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/genesis_config_presets.rs @@ -76,12 +76,8 @@ pub fn preset_names() -> Vec { /// Provides the JSON representation of predefined genesis config for given `id`. pub fn get_preset(id: &sp_genesis_builder::PresetId) -> Option> { let patch = match id.try_into() { - Ok("development") => bridge_hub_kusama_genesis( - invulnerables(), - testnet_accounts(), - 1002.into(), - vec![] - ), + Ok("development") => + bridge_hub_kusama_genesis(invulnerables(), testnet_accounts(), 1002.into(), vec![]), Ok("local_testnet") => bridge_hub_kusama_genesis( invulnerables(), testnet_accounts(), diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/genesis_config_presets.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/genesis_config_presets.rs index eac1428a38..d346ef2562 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/genesis_config_presets.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/genesis_config_presets.rs @@ -81,9 +81,8 @@ pub fn preset_names() -> Vec { /// Provides the JSON representation of predefined genesis config for given `id`. pub fn get_preset(id: &sp_genesis_builder::PresetId) -> Option> { let patch = match id.try_into() { - Ok("development") => { - bridge_hub_polkadot_genesis(invulnerables(), testnet_accounts(), 1002.into(), vec![]) - }, + Ok("development") => + bridge_hub_polkadot_genesis(invulnerables(), testnet_accounts(), 1002.into(), vec![]), Ok("local_testnet") => bridge_hub_polkadot_genesis( invulnerables(), testnet_accounts(), From 1cefb536b3a1467d8cd2265aadf25f3eac650f88 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Sat, 28 Dec 2024 02:16:02 +0100 Subject: [PATCH 07/15] Fix bridges integration tests --- .../bridges_polkadot_kusama.sh | 90 +++++++++++++++++++ .../environments/polkadot-kusama/spawn.sh | 60 ++++++++----- .../polkadot-kusama/start_relayer.sh | 26 ++++-- .../dot-reaches-kusama.zndsl | 4 +- .../ksm-reaches-polkadot.zndsl | 4 +- .../run.sh | 2 +- 6 files changed, 154 insertions(+), 32 deletions(-) diff --git a/integration-tests/bridges/environments/polkadot-kusama/bridges_polkadot_kusama.sh b/integration-tests/bridges/environments/polkadot-kusama/bridges_polkadot_kusama.sh index 8d66d8241d..5ce804bebf 100755 --- a/integration-tests/bridges/environments/polkadot-kusama/bridges_polkadot_kusama.sh +++ b/integration-tests/bridges/environments/polkadot-kusama/bridges_polkadot_kusama.sh @@ -193,12 +193,99 @@ function run_relay() { --lane "${LANE_ID}" } +function run_finality_relay() { + local relayer_path=$(ensure_relayer) + + RUST_LOG=runtime=trace,rpc=trace,bridge=trace \ + $relayer_path relay-headers polkadot-to-bridge-hub-kusama \ + --only-free-headers \ + --source-uri ws://localhost:9942 \ + --source-version-mode Auto \ + --target-uri ws://localhost:8945 \ + --target-version-mode Auto \ + --target-signer //Charlie \ + --target-transactions-mortality 4& + + RUST_LOG=runtime=trace,rpc=trace,bridge=trace \ + $relayer_path relay-headers kusama-to-bridge-hub-polkadot \ + --only-free-headers \ + --source-uri ws://localhost:9945 \ + --source-version-mode Auto \ + --target-uri ws://localhost:8943 \ + --target-version-mode Auto \ + --target-signer //Charlie \ + --target-transactions-mortality 4 +} + +function run_parachains_relay() { + local relayer_path=$(ensure_relayer) + + RUST_LOG=runtime=trace,rpc=trace,bridge=trace \ + $relayer_path relay-parachains polkadot-to-bridge-hub-kusama \ + --only-free-headers \ + --source-uri ws://localhost:9942 \ + --source-version-mode Auto \ + --target-uri ws://localhost:8945 \ + --target-version-mode Auto \ + --target-signer //Dave \ + --target-transactions-mortality 4& + + RUST_LOG=runtime=trace,rpc=trace,bridge=trace \ + $relayer_path relay-parachains kusama-to-bridge-hub-polkadot \ + --only-free-headers \ + --source-uri ws://localhost:9945 \ + --source-version-mode Auto \ + --target-uri ws://localhost:8943 \ + --target-version-mode Auto \ + --target-signer //Dave \ + --target-transactions-mortality 4 +} + +function run_messages_relay() { + local relayer_path=$(ensure_relayer) + + RUST_LOG=runtime=trace,rpc=trace,bridge=trace \ + $relayer_path relay-messages bridge-hub-polkadot-to-bridge-hub-kusama \ + --source-uri ws://localhost:8943 \ + --source-version-mode Auto \ + --source-signer //Eve \ + --source-transactions-mortality 4 \ + --target-uri ws://localhost:8945 \ + --target-version-mode Auto \ + --target-signer //Eve \ + --target-transactions-mortality 4 \ + --lane $LANE_ID& + + RUST_LOG=runtime=trace,rpc=trace,bridge=trace \ + $relayer_path relay-messages bridge-hub-kusama-to-bridge-hub-polkadot \ + --source-uri ws://localhost:8945 \ + --source-version-mode Auto \ + --source-signer //Ferdie \ + --source-transactions-mortality 4 \ + --target-uri ws://localhost:8943 \ + --target-version-mode Auto \ + --target-signer //Ferdie \ + --target-transactions-mortality 4 \ + --lane $LANE_ID +} + case "$1" in run-relay) init_kusama_polkadot init_polkadot_kusama run_relay ;; + run-finality-relay) + init_kusama_polkadot + init_polkadot_kusama + run_finality_relay + ;; + run-parachains-relay) + run_parachains_relay + ;; + run-messages-relay) + run_messages_relay + ;; init-asset-hub-polkadot-local) ensure_polkadot_js_api # create foreign assets for native Kusama token (governance call on Polkadot) @@ -372,6 +459,9 @@ case "$1" in echo "A command is require. Supported commands for: Local (zombienet) run: - run-relay + - run-finality-relay + - run-parachains-relay + - run-messages-relay - init-asset-hub-polkadot-local - init-bridge-hub-polkadot-local - init-asset-hub-kusama-local diff --git a/integration-tests/bridges/environments/polkadot-kusama/spawn.sh b/integration-tests/bridges/environments/polkadot-kusama/spawn.sh index 3786ce1d4d..29b050ac2e 100755 --- a/integration-tests/bridges/environments/polkadot-kusama/spawn.sh +++ b/integration-tests/bridges/environments/polkadot-kusama/spawn.sh @@ -6,6 +6,23 @@ trap "trap - SIGTERM && kill -9 -$$" SIGINT SIGTERM EXIT source "$FRAMEWORK_PATH/utils/zombienet.sh" +# whether to init the chains (open HRMP channels, set XCM version, create reserve assets, etc) +init=0 +start_relayer=0 +while [ $# -ne 0 ] +do + arg="$1" + case "$arg" in + --init) + init=1 + ;; + --start-relayer) + start_relayer=1 + ;; + esac + shift +done + logs_dir=$TEST_DIR/logs helper_script="${BASH_SOURCE%/*}/helper.sh" @@ -17,33 +34,34 @@ kusama_def=${BASH_SOURCE%/*}/bridge_hub_kusama_local_network.toml start_zombienet $TEST_DIR $kusama_def kusama_dir kusama_pid echo -polkadot_init_log=$logs_dir/polkadot-init.log -echo -e "Setting up the polkadot side of the bridge. Logs available at: $polkadot_init_log\n" - -kusama_init_log=$logs_dir/kusama-init.log -echo -e "Setting up the kusama side of the bridge. Logs available at: $kusama_init_log\n" - -$helper_script init-asset-hub-polkadot-local >> $polkadot_init_log 2>&1 & -polkadot_init_pid=$! -$helper_script init-asset-hub-kusama-local >> $kusama_init_log 2>&1 & -kusama_init_pid=$! -wait -n $polkadot_init_pid $kusama_init_pid - +if [[ $init -eq 1 ]]; then + polkadot_init_log=$logs_dir/polkadot-init.log + echo -e "Setting up the polkadot side of the bridge. Logs available at: $polkadot_init_log\n" + kusama_init_log=$logs_dir/kusama-init.log + echo -e "Setting up the kusama side of the bridge. Logs available at: $kusama_init_log\n" + $helper_script init-asset-hub-polkadot-local >> $polkadot_init_log 2>&1 & + polkadot_init_pid=$! + $helper_script init-asset-hub-kusama-local >> $kusama_init_log 2>&1 & + kusama_init_pid=$! + wait -n $polkadot_init_pid $kusama_init_pid -$helper_script init-bridge-hub-polkadot-local >> $polkadot_init_log 2>&1 & -polkadot_init_pid=$! -$helper_script init-bridge-hub-kusama-local >> $kusama_init_log 2>&1 & -kusama_init_pid=$! -wait -n $polkadot_init_pid $kusama_init_pid + $helper_script init-bridge-hub-polkadot-local >> $polkadot_init_log 2>&1 & + polkadot_init_pid=$! + $helper_script init-bridge-hub-kusama-local >> $kusama_init_log 2>&1 & + kusama_init_pid=$! + wait -n $polkadot_init_pid $kusama_init_pid -run_zndsl ${BASH_SOURCE%/*}/polkadot-init.zndsl $polkadot_dir -run_zndsl ${BASH_SOURCE%/*}/kusama-init.zndsl $kusama_dir + run_zndsl ${BASH_SOURCE%/*}/polkadot-init.zndsl $polkadot_dir + run_zndsl ${BASH_SOURCE%/*}/kusama-init.zndsl $kusama_dir +fi -${BASH_SOURCE%/*}/start_relayer.sh $polkadot_dir $kusama_dir relayer_pid +if [[ $start_relayer -eq 1 ]]; then + ${BASH_SOURCE%/*}/start_relayer.sh $polkadot_dir $kusama_dir finality_relayer_pid parachains_relayer_pid messages_relayer_pid +fi echo $polkadot_dir > $TEST_DIR/polkadot.env echo $kusama_dir > $TEST_DIR/kusama.env echo -wait -n $polkadot_pid $kusama_pid $relayer_pid +wait -n $polkadot_pid $kusama_pid $finality_relayer_pid $parachains_relayer_pid $messages_relayer_pid kill -9 -$$ diff --git a/integration-tests/bridges/environments/polkadot-kusama/start_relayer.sh b/integration-tests/bridges/environments/polkadot-kusama/start_relayer.sh index 73e51f99a7..f2e36106ef 100755 --- a/integration-tests/bridges/environments/polkadot-kusama/start_relayer.sh +++ b/integration-tests/bridges/environments/polkadot-kusama/start_relayer.sh @@ -7,17 +7,31 @@ source "$FRAMEWORK_PATH/utils/zombienet.sh" polkadot_dir=$1 kusama_dir=$2 -__relayer_pid=$3 +__finality_relayer_pid=$3 +__parachains_relayer_pid=$4 +__messages_relayer_pid=$5 logs_dir=$TEST_DIR/logs helper_script="${BASH_SOURCE%/*}/helper.sh" -relayer_log=$logs_dir/relayer.log -echo -e "Starting polkadot-kusama relayer. Logs available at: $relayer_log\n" -start_background_process "$helper_script run-relay" $relayer_log relayer_pid +# start finality relayer +finality_relayer_log=$logs_dir/relayer_finality.log +echo -e "Starting polkadot-kusama finality relayer. Logs available at: $finality_relayer_log\n" +start_background_process "$helper_script run-finality-relay" $finality_relayer_log finality_relayer_pid + +# start parachains relayer +parachains_relayer_log=$logs_dir/relayer_parachains.log +echo -e "Starting polkadot-kusama parachains relayer. Logs available at: $parachains_relayer_log\n" +start_background_process "$helper_script run-parachains-relay" $parachains_relayer_log parachains_relayer_pid + +# start messages relayer +messages_relayer_log=$logs_dir/relayer_messages.log +echo -e "Starting polkadot-kusama messages relayer. Logs available at: $messages_relayer_log\n" +start_background_process "$helper_script run-messages-relay" $messages_relayer_log messages_relayer_pid run_zndsl ${BASH_SOURCE%/*}/polkadot-bridge.zndsl $polkadot_dir run_zndsl ${BASH_SOURCE%/*}/kusama-bridge.zndsl $kusama_dir -eval $__relayer_pid="'$relayer_pid'" - +eval $__finality_relayer_pid="'$finality_relayer_pid'" +eval $__parachains_relayer_pid="'$parachains_relayer_pid'" +eval $__messages_relayer_pid="'$messages_relayer_pid'" diff --git a/integration-tests/bridges/tests/0001-polkadot-kusama-asset-transfer/dot-reaches-kusama.zndsl b/integration-tests/bridges/tests/0001-polkadot-kusama-asset-transfer/dot-reaches-kusama.zndsl index 5b3084275f..d29f016d12 100644 --- a/integration-tests/bridges/tests/0001-polkadot-kusama-asset-transfer/dot-reaches-kusama.zndsl +++ b/integration-tests/bridges/tests/0001-polkadot-kusama-asset-transfer/dot-reaches-kusama.zndsl @@ -8,5 +8,5 @@ asset-hub-kusama-collator-1: run {{ENV_PATH}}/helper.sh with "reserve-transfer-a # check that //Alice received at least 4.8 DOT on Kusama AH asset-hub-kusama-collator-1: js-script {{FRAMEWORK_PATH}}/js-helpers/wrapped-assets-balance.js with '{ "accountAddress": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", "expectedAssetBalance": 48000000000, "expectedAssetId": { "parents": 2, "interior": { "X1": [{ "GlobalConsensus": "Polkadot" }] }}}' within 300 seconds -# check that the relayer //Charlie is rewarded by Kusama AH -bridge-hub-kusama-collator-1: js-script {{FRAMEWORK_PATH}}/js-helpers/relayer-rewards.js with "5FLSigC9HGRKVhB9FiEo4Y3koPsNmBmLJbpXg2mp1hXcS59Y,0x00000001,0x62687064,ThisChain,0" within 30 seconds +# check that the relayer //Eve is rewarded by Kusama AH +bridge-hub-kusama-collator-1: js-script {{FRAMEWORK_PATH}}/js-helpers/relayer-rewards.js with "5HGjWAeFDfFCWPsjFQdVV2Msvz2XtMktvgocEZcCj68kUMaw,0x00000001,0x62687064,ThisChain,0" within 30 seconds \ No newline at end of file diff --git a/integration-tests/bridges/tests/0001-polkadot-kusama-asset-transfer/ksm-reaches-polkadot.zndsl b/integration-tests/bridges/tests/0001-polkadot-kusama-asset-transfer/ksm-reaches-polkadot.zndsl index ec97ad3286..74af756f85 100644 --- a/integration-tests/bridges/tests/0001-polkadot-kusama-asset-transfer/ksm-reaches-polkadot.zndsl +++ b/integration-tests/bridges/tests/0001-polkadot-kusama-asset-transfer/ksm-reaches-polkadot.zndsl @@ -8,5 +8,5 @@ asset-hub-polkadot-collator-1: run {{ENV_PATH}}/helper.sh with "reserve-transfer # check that //Alice received at least 4.8 KSM on Polkadot AH asset-hub-polkadot-collator-1: js-script {{FRAMEWORK_PATH}}/js-helpers/wrapped-assets-balance.js with '{ "accountAddress": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", "expectedAssetBalance": 4800000000000, "expectedAssetId": { "parents": 2, "interior": { "X1": [{ "GlobalConsensus": "Kusama" }] }}}' within 300 seconds -# check that the relayer //Charlie is rewarded by Polkadot AH -bridge-hub-polkadot-collator-1: js-script {{FRAMEWORK_PATH}}/js-helpers/relayer-rewards.js with "5FLSigC9HGRKVhB9FiEo4Y3koPsNmBmLJbpXg2mp1hXcS59Y,0x00000001,0x62686b73,ThisChain,0" within 30 seconds +# check that the relayer //Ferdie is rewarded by Polkadot AH +bridge-hub-polkadot-collator-1: js-script {{FRAMEWORK_PATH}}/js-helpers/relayer-rewards.js with "5CiPPseXPECbkjWCa6MnjNokrgYjMqmKndv2rSnekmSK2DjL,0x00000001,0x62686b73,ThisChain,0" within 30 seconds \ No newline at end of file diff --git a/integration-tests/bridges/tests/0001-polkadot-kusama-asset-transfer/run.sh b/integration-tests/bridges/tests/0001-polkadot-kusama-asset-transfer/run.sh index 0cfc116119..886a9e1a4f 100755 --- a/integration-tests/bridges/tests/0001-polkadot-kusama-asset-transfer/run.sh +++ b/integration-tests/bridges/tests/0001-polkadot-kusama-asset-transfer/run.sh @@ -10,7 +10,7 @@ source "$FRAMEWORK_PATH/utils/zombienet.sh" export ENV_PATH=`realpath ${BASH_SOURCE%/*}/../../environments/polkadot-kusama` -$ENV_PATH/spawn.sh & +$ENV_PATH/spawn.sh --init --start-relayer & env_pid=$! ensure_process_file $env_pid $TEST_DIR/polkadot.env 600 From c046dd81626cfaba72a92053e2b4ec80960c0131 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Sat, 28 Dec 2024 12:32:19 +0100 Subject: [PATCH 08/15] Move bridges testing data to XCMv4 --- .../bridges_polkadot_kusama.sh | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/integration-tests/bridges/environments/polkadot-kusama/bridges_polkadot_kusama.sh b/integration-tests/bridges/environments/polkadot-kusama/bridges_polkadot_kusama.sh index 5ce804bebf..94fb354585 100755 --- a/integration-tests/bridges/environments/polkadot-kusama/bridges_polkadot_kusama.sh +++ b/integration-tests/bridges/environments/polkadot-kusama/bridges_polkadot_kusama.sh @@ -133,7 +133,7 @@ ON_BRIDGE_HUB_KUSAMA_SOVEREIGN_ACCOUNT_FOR_LANE_00000001_bhpd_ThisChain="EoQBtnw ON_BRIDGE_HUB_KUSAMA_SOVEREIGN_ACCOUNT_FOR_LANE_00000001_bhpd_BridgedChain="EoQBtnwp4jMtCEpV7CPsssT6bdDHuHZmf3aGXxHJiSA4Dz3" LANE_ID="00000001" -XCM_VERSION=3 +XCM_VERSION=4 AHK_DOT_ED=10000000 DOT=10000000000 @@ -294,7 +294,7 @@ case "$1" in "//Alice" \ 1000 \ "ws://127.0.0.1:9910" \ - "$(jq --null-input '{ "parents": 2, "interior": { "X1": [{ "GlobalConsensus": "Kusama" }] } }')" \ + "$(jq --null-input '{ "parents": 2, "interior": { "X1": [ { "GlobalConsensus": "Kusama" } ] } }')" \ "$GLOBAL_CONSENSUS_KUSAMA_SOVEREIGN_ACCOUNT" \ $AHP_KSM_ED \ true @@ -353,7 +353,7 @@ case "$1" in "//Alice" \ 1000 \ "ws://127.0.0.1:9010" \ - "$(jq --null-input '{ "parents": 2, "interior": { "X1": [{ "GlobalConsensus": "Polkadot" }] } }')" \ + "$(jq --null-input '{ "parents": 2, "interior": { "X1": [ { "GlobalConsensus": "Polkadot" } ] } }')" \ "$GLOBAL_CONSENSUS_POLKADOT_SOVEREIGN_ACCOUNT" \ $AHK_DOT_ED \ true @@ -410,9 +410,9 @@ case "$1" in limited_reserve_transfer_assets \ "ws://127.0.0.1:9910" \ "//Alice" \ - "$(jq --null-input '{ "V3": { "parents": 2, "interior": { "X2": [ { "GlobalConsensus": "Kusama" }, { "Parachain": 1000 } ] } } }')" \ - "$(jq --null-input '{ "V3": { "parents": 0, "interior": { "X1": { "AccountId32": { "id": [212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125] } } } } }')" \ - "$(jq --null-input '{ "V3": [ { "id": { "Concrete": { "parents": 1, "interior": "Here" } }, "fun": { "Fungible": '$amount' } } ] }')" \ + "$(jq --null-input '{ "V4": { "parents": 2, "interior": { "X2": [ { "GlobalConsensus": "Kusama" }, { "Parachain": 1000 } ] } } }')" \ + "$(jq --null-input '{ "V4": { "parents": 0, "interior": { "X1": [ { "AccountId32": { "id": [212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125] } } ] } } }')" \ + "$(jq --null-input '{ "V4": [ { "id": { "parents": 1, "interior": "Here" }, "fun": { "Fungible": '$amount' } } ] }')" \ 0 \ "Unlimited" ;; @@ -423,9 +423,9 @@ case "$1" in limited_reserve_transfer_assets \ "ws://127.0.0.1:9910" \ "//Alice" \ - "$(jq --null-input '{ "V3": { "parents": 2, "interior": { "X2": [ { "GlobalConsensus": "Kusama" }, { "Parachain": 1000 } ] } } }')" \ - "$(jq --null-input '{ "V3": { "parents": 0, "interior": { "X1": { "AccountId32": { "id": [212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125] } } } } }')" \ - "$(jq --null-input '{ "V3": [ { "id": { "Concrete": { "parents": 2, "interior": { "X1": { "GlobalConsensus": "Kusama" } } } }, "fun": { "Fungible": '$amount' } } ] }')" \ + "$(jq --null-input '{ "V4": { "parents": 2, "interior": { "X2": [ { "GlobalConsensus": "Kusama" }, { "Parachain": 1000 } ] } } }')" \ + "$(jq --null-input '{ "V4": { "parents": 0, "interior": { "X1": [ { "AccountId32": { "id": [212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125] } } ] } } }')" \ + "$(jq --null-input '{ "V4": [ { "id": { "parents": 2, "interior": { "X1": [ { "GlobalConsensus": "Kusama" } ] } }, "fun": { "Fungible": '$amount' } } ] }')" \ 0 \ "Unlimited" ;; @@ -436,9 +436,9 @@ case "$1" in limited_reserve_transfer_assets \ "ws://127.0.0.1:9010" \ "//Alice" \ - "$(jq --null-input '{ "V3": { "parents": 2, "interior": { "X2": [ { "GlobalConsensus": "Polkadot" }, { "Parachain": 1000 } ] } } }')" \ - "$(jq --null-input '{ "V3": { "parents": 0, "interior": { "X1": { "AccountId32": { "id": [212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125] } } } } }')" \ - "$(jq --null-input '{ "V3": [ { "id": { "Concrete": { "parents": 1, "interior": "Here" } }, "fun": { "Fungible": '$amount' } } ] }')" \ + "$(jq --null-input '{ "V4": { "parents": 2, "interior": { "X2": [ { "GlobalConsensus": "Polkadot" }, { "Parachain": 1000 } ] } } }')" \ + "$(jq --null-input '{ "V4": { "parents": 0, "interior": { "X1": [ { "AccountId32": { "id": [212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125] } } ] } } }')" \ + "$(jq --null-input '{ "V4": [ { "id": { "parents": 1, "interior": "Here" }, "fun": { "Fungible": '$amount' } } ] }')" \ 0 \ "Unlimited" ;; @@ -449,9 +449,9 @@ case "$1" in limited_reserve_transfer_assets \ "ws://127.0.0.1:9010" \ "//Alice" \ - "$(jq --null-input '{ "V3": { "parents": 2, "interior": { "X2": [ { "GlobalConsensus": "Polkadot" }, { "Parachain": 1000 } ] } } }')" \ - "$(jq --null-input '{ "V3": { "parents": 0, "interior": { "X1": { "AccountId32": { "id": [212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125] } } } } }')" \ - "$(jq --null-input '{ "V3": [ { "id": { "Concrete": { "parents": 2, "interior": { "X1": { "GlobalConsensus": "Polkadot" } } } }, "fun": { "Fungible": '$amount' } } ] }')" \ + "$(jq --null-input '{ "V4": { "parents": 2, "interior": { "X2": [ { "GlobalConsensus": "Polkadot" }, { "Parachain": 1000 } ] } } }')" \ + "$(jq --null-input '{ "V4": { "parents": 0, "interior": { "X1": [ { "AccountId32": { "id": [212, 53, 147, 199, 21, 253, 211, 28, 97, 20, 26, 189, 4, 169, 159, 214, 130, 44, 133, 88, 133, 76, 205, 227, 154, 86, 132, 231, 165, 109, 162, 125] } } ] } } }')" \ + "$(jq --null-input '{ "V4": [ { "id": { "parents": 2, "interior": { "X1": [ { "GlobalConsensus": "Polkadot" } ] } }, "fun": { "Fungible": '$amount' } } ] }')" \ 0 \ "Unlimited" ;; From ae408e3d13e4d96358dd553f7ff58e9cf902d388 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Sat, 4 Jan 2025 10:41:45 +0100 Subject: [PATCH 09/15] Nit --- system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs | 2 +- system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 f91f4dc3bc..12a8dc19cb 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs @@ -1241,7 +1241,7 @@ impl_runtime_apis! { let bench_lane_id = >::bench_lane_id(); use bp_runtime::Chain; let bridged_chain_id =>::BridgedChain::ID; - pallet_bridge_relayers::Pallet::::relayer_reward( + pallet_bridge_relayers::Pallet::::relayer_reward( relayer, bp_relayers::RewardsAccountParams::new( bench_lane_id, 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 db80a28e81..f1a7626ac0 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs @@ -1277,7 +1277,7 @@ impl_runtime_apis! { let bench_lane_id = >::bench_lane_id(); use bp_runtime::Chain; let bridged_chain_id =>::BridgedChain::ID; - pallet_bridge_relayers::Pallet::::relayer_reward( + pallet_bridge_relayers::Pallet::::relayer_reward( relayer, bp_relayers::RewardsAccountParams::new( bench_lane_id, From cbdfc721b6299a7c3bedec9f4fcd9b32b5e158bf Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Sat, 4 Jan 2025 22:41:07 +0100 Subject: [PATCH 10/15] Updated weights for pallet-xcm-bridge-hub-router --- .../src/weights/pallet_xcm_bridge_hub_router.rs | 17 ++++++++--------- .../src/weights/pallet_xcm_bridge_hub_router.rs | 15 +++++++-------- 2 files changed, 15 insertions(+), 17 deletions(-) diff --git a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_xcm_bridge_hub_router.rs b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_xcm_bridge_hub_router.rs index 36ae43d638..589d6bdcfe 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_xcm_bridge_hub_router.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/src/weights/pallet_xcm_bridge_hub_router.rs @@ -17,7 +17,7 @@ //! Autogenerated weights for `pallet_xcm_bridge_hub_router` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-14, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2025-01-04, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./asset-hub-kusama-chain-spec.json")`, DB CACHE: 1024 @@ -57,8 +57,8 @@ impl pallet_xcm_bridge_hub_router::WeightInfo for Weigh // Proof Size summary in bytes: // Measured: `159` // Estimated: `5487` - // Minimum execution time: 11_410_000 picoseconds. - Weight::from_parts(11_870_000, 0) + // Minimum execution time: 19_140_000 picoseconds. + Weight::from_parts(19_440_000, 0) .saturating_add(Weight::from_parts(0, 5487)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) @@ -71,20 +71,19 @@ impl pallet_xcm_bridge_hub_router::WeightInfo for Weigh // Proof Size summary in bytes: // Measured: `111` // Estimated: `5487` - // Minimum execution time: 5_300_000 picoseconds. - Weight::from_parts(5_510_000, 0) + // Minimum execution time: 8_770_000 picoseconds. + Weight::from_parts(9_110_000, 0) .saturating_add(Weight::from_parts(0, 5487)) .saturating_add(T::DbWeight::get().reads(2)) } /// Storage: `ToPolkadotXcmRouter::Bridge` (r:1 w:1) /// Proof: `ToPolkadotXcmRouter::Bridge` (`max_values`: Some(1), `max_size`: Some(17), added: 512, mode: `MaxEncodedLen`) fn report_bridge_status() -> Weight { - // TODO: fresh weights // Proof Size summary in bytes: - // Measured: `150` + // Measured: `83` // Estimated: `1502` - // Minimum execution time: 12_394_000 picoseconds. - Weight::from_parts(12_883_000, 0) + // Minimum execution time: 14_730_000 picoseconds. + Weight::from_parts(15_250_000, 0) .saturating_add(Weight::from_parts(0, 1502)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_xcm_bridge_hub_router.rs b/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_xcm_bridge_hub_router.rs index 5ae6613a4c..30f2301afa 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_xcm_bridge_hub_router.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/pallet_xcm_bridge_hub_router.rs @@ -17,7 +17,7 @@ //! Autogenerated weights for `pallet_xcm_bridge_hub_router` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-15, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2025-01-04, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./asset-hub-polkadot-chain-spec.json")`, DB CACHE: 1024 @@ -57,8 +57,8 @@ impl pallet_xcm_bridge_hub_router::WeightInfo for Weigh // Proof Size summary in bytes: // Measured: `226` // Estimated: `5487` - // Minimum execution time: 11_170_000 picoseconds. - Weight::from_parts(11_720_000, 0) + // Minimum execution time: 19_600_000 picoseconds. + Weight::from_parts(20_010_000, 0) .saturating_add(Weight::from_parts(0, 5487)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) @@ -71,20 +71,19 @@ impl pallet_xcm_bridge_hub_router::WeightInfo for Weigh // Proof Size summary in bytes: // Measured: `111` // Estimated: `5487` - // Minimum execution time: 5_310_000 picoseconds. - Weight::from_parts(5_410_000, 0) + // Minimum execution time: 8_771_000 picoseconds. + Weight::from_parts(8_930_000, 0) .saturating_add(Weight::from_parts(0, 5487)) .saturating_add(T::DbWeight::get().reads(2)) } /// Storage: `ToKusamaXcmRouter::Bridge` (r:1 w:1) /// Proof: `ToKusamaXcmRouter::Bridge` (`max_values`: Some(1), `max_size`: Some(17), added: 512, mode: `MaxEncodedLen`) fn report_bridge_status() -> Weight { - // TODO: fresh weights // Proof Size summary in bytes: // Measured: `150` // Estimated: `1502` - // Minimum execution time: 12_394_000 picoseconds. - Weight::from_parts(12_883_000, 0) + // Minimum execution time: 15_080_000 picoseconds. + Weight::from_parts(15_471_000, 0) .saturating_add(Weight::from_parts(0, 1502)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) From ecad255f0fb3e115777d669200e9ab43bc86734d Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Sun, 5 Jan 2025 15:16:25 +0100 Subject: [PATCH 11/15] Set `force_xcm_version` for receive message proof, because we have static lane here and opened HRMP --- .../bridge-hubs/bridge-hub-kusama/src/lib.rs | 13 +++++++++++++ .../bridge-hubs/bridge-hub-polkadot/src/lib.rs | 13 +++++++++++++ 2 files changed, 26 insertions(+) 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 12a8dc19cb..7d4fedb7d0 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs @@ -1257,6 +1257,19 @@ impl_runtime_apis! { use cumulus_primitives_core::XcmpMessageSource; assert!(XcmpQueue::take_outbound_messages(usize::MAX).is_empty()); ParachainSystem::open_outbound_hrmp_channel_for_benchmarks_or_tests(42.into()); + let _ = PolkadotXcm::force_xcm_version( + RuntimeOrigin::root(), + Box::new(Location::new(1, Parachain(42))), + XCM_VERSION, + ).map_err(|e| { + log::error!( + "Failed to dispatch `force_xcm_version({:?}, {:?}, {:?})`, error: {:?}", + RuntimeOrigin::root(), + Location::new(1, Parachain(42)), + XCM_VERSION, + e + ); + }).expect("XcmVersion stored!"); let universal_source = bridge_to_polkadot_config::open_bridge_for_benchmarks::< Runtime, bridge_to_polkadot_config::XcmOverBridgeHubPolkadotInstance, 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 f1a7626ac0..092a42c417 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs @@ -1293,6 +1293,19 @@ impl_runtime_apis! { use cumulus_primitives_core::XcmpMessageSource; assert!(XcmpQueue::take_outbound_messages(usize::MAX).is_empty()); ParachainSystem::open_outbound_hrmp_channel_for_benchmarks_or_tests(42.into()); + let _ = PolkadotXcm::force_xcm_version( + RuntimeOrigin::root(), + Box::new(Location::new(1, Parachain(42))), + XCM_VERSION, + ).map_err(|e| { + log::error!( + "Failed to dispatch `force_xcm_version({:?}, {:?}, {:?})`, error: {:?}", + RuntimeOrigin::root(), + Location::new(1, Parachain(42)), + XCM_VERSION, + e + ); + }).expect("XcmVersion stored!"); let universal_source = bridge_to_kusama_config::open_bridge_for_benchmarks::< Runtime, bridge_to_kusama_config::XcmOverBridgeHubKusamaInstance, From cddfbd38c78226d9d0de6c940d910596b73fa7b8 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Sun, 5 Jan 2025 15:48:42 +0100 Subject: [PATCH 12/15] Adjust fresh weights and consts --- .../bridge-hub-kusama/primitives/src/lib.rs | 6 +- .../src/bridge_to_polkadot_config.rs | 5 +- .../src/weights/pallet_bridge_messages.rs | 196 +++++++++-------- .../src/weights/pallet_bridge_relayers.rs | 22 +- .../xcm/pallet_xcm_benchmarks_generic.rs | 198 ++++++++--------- .../bridge-hub-polkadot/primitives/src/lib.rs | 8 +- .../src/bridge_to_kusama_config.rs | 5 +- .../src/weights/pallet_bridge_messages.rs | 182 +++++++++------- .../src/weights/pallet_bridge_relayers.rs | 32 +-- .../xcm/pallet_xcm_benchmarks_generic.rs | 202 ++++++++---------- 10 files changed, 437 insertions(+), 419 deletions(-) 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 714c92f985..1e4fc0e77f 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 @@ -70,8 +70,10 @@ impl ChainWithMessages for BridgeHubKusama { WITH_BRIDGE_HUB_KUSAMA_MESSAGES_PALLET_NAME; const MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX: MessageNonce = MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX; - const MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX: MessageNonce = - MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX; + /// This constant limits the maximum number of messages in `receive_messages_proof`. + /// We need to adjust it from 4096 to 2024 due to the actual weights identified by `check_message_lane_weights`. + /// A higher value can be set once we switch `max_extrinsic_weight` to `BlockWeightsForAsyncBacking`. + const MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX: MessageNonce = 2024; } /// Public key of the chain account that may be used to verify signatures. 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 0ea39936ac..d617017ca5 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 @@ -372,14 +372,15 @@ mod tests { #[test] fn ensure_bridge_hub_kusama_message_lane_weights_are_correct() { + use bp_messages::ChainWithMessages; check_message_lane_weights::< bp_bridge_hub_kusama::BridgeHubKusama, Runtime, WithBridgeHubPolkadotMessagesInstance, >( bp_bridge_hub_polkadot::EXTRA_STORAGE_PROOF_SIZE, - bp_bridge_hub_kusama::MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX, - bp_bridge_hub_kusama::MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX, + bp_bridge_hub_kusama::BridgeHubKusama::MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX, + bp_bridge_hub_kusama::BridgeHubKusama::MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX, true, ); } diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_bridge_messages.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_bridge_messages.rs index a69730a504..0e82b19c1a 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_bridge_messages.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_bridge_messages.rs @@ -17,7 +17,7 @@ //! Autogenerated weights for `pallet_bridge_messages` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-14, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2025-01-04, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./bridge-hub-kusama-chain-spec.json")`, DB CACHE: 1024 @@ -49,92 +49,104 @@ pub struct WeightInfo(PhantomData); impl pallet_bridge_messages::WeightInfo for WeightInfo { /// Storage: `BridgePolkadotMessages::PalletOperatingMode` (r:1 w:0) /// Proof: `BridgePolkadotMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`) - /// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:0) - /// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: Some(1282), added: 1777, mode: `MaxEncodedLen`) /// Storage: `BridgePolkadotParachains::ImportedParaHeads` (r:1 w:0) /// Proof: `BridgePolkadotParachains::ImportedParaHeads` (`max_values`: Some(600), `max_size`: Some(196), added: 1681, mode: `MaxEncodedLen`) /// Storage: `BridgePolkadotMessages::InboundLanes` (r:1 w:1) /// Proof: `BridgePolkadotMessages::InboundLanes` (`max_values`: None, `max_size`: Some(49180), added: 51655, mode: `MaxEncodedLen`) + /// Storage: `XcmOverBridgeHubPolkadot::LaneToBridge` (r:1 w:0) + /// Proof: `XcmOverBridgeHubPolkadot::LaneToBridge` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`) + /// Storage: `XcmOverBridgeHubPolkadot::Bridges` (r:1 w:0) + /// Proof: `XcmOverBridgeHubPolkadot::Bridges` (`max_values`: None, `max_size`: Some(1889), added: 4364, mode: `MaxEncodedLen`) + /// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:0) + /// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: Some(1282), added: 1777, mode: `MaxEncodedLen`) /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) fn receive_single_message_proof() -> Weight { // Proof Size summary in bytes: - // Measured: `489` + // Measured: `825` // Estimated: `52645` - // Minimum execution time: 54_361_000 picoseconds. - Weight::from_parts(55_341_000, 0) + // Minimum execution time: 82_550_000 picoseconds. + Weight::from_parts(83_341_000, 0) .saturating_add(Weight::from_parts(0, 52645)) - .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `BridgePolkadotMessages::PalletOperatingMode` (r:1 w:0) /// Proof: `BridgePolkadotMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`) /// Storage: `BridgePolkadotParachains::ImportedParaHeads` (r:1 w:0) - /// Proof: `BridgePolkadotParachains::ImportedParaHeads` (`max_values`: Some(64), `max_size`: Some(196), added: 1186, mode: `MaxEncodedLen`) + /// Proof: `BridgePolkadotParachains::ImportedParaHeads` (`max_values`: Some(600), `max_size`: Some(196), added: 1681, mode: `MaxEncodedLen`) /// Storage: `BridgePolkadotMessages::InboundLanes` (r:1 w:1) - /// Proof: `BridgePolkadotMessages::InboundLanes` (`max_values`: None, `max_size`: Some(49209), added: 51684, mode: `MaxEncodedLen`) - /// Storage: `XcmOverBridgeHubKusama::LaneToBridge` (r:1 w:0) - /// Proof: `XcmOverBridgeHubKusama::LaneToBridge` (`max_values`: None, `max_size`: Some(65), added: 2540, mode: `MaxEncodedLen`) - /// Storage: `XcmOverBridgeHubKusama::Bridges` (r:1 w:0) - /// Proof: `XcmOverBridgeHubKusama::Bridges` (`max_values`: None, `max_size`: Some(1918), added: 4393, mode: `MaxEncodedLen`) + /// Proof: `BridgePolkadotMessages::InboundLanes` (`max_values`: None, `max_size`: Some(49180), added: 51655, mode: `MaxEncodedLen`) + /// Storage: `XcmOverBridgeHubPolkadot::LaneToBridge` (r:1 w:0) + /// Proof: `XcmOverBridgeHubPolkadot::LaneToBridge` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`) + /// Storage: `XcmOverBridgeHubPolkadot::Bridges` (r:1 w:0) + /// Proof: `XcmOverBridgeHubPolkadot::Bridges` (`max_values`: None, `max_size`: Some(1889), added: 4364, mode: `MaxEncodedLen`) + /// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:0) + /// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: Some(1282), added: 1777, mode: `MaxEncodedLen`) /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 4076]`. fn receive_n_messages_proof(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `701` - // Estimated: `52674` - // Minimum execution time: 62_034_000 picoseconds. - Weight::from_parts(63_355_000, 0) - .saturating_add(Weight::from_parts(0, 52674)) - // Standard Error: 8_231 - .saturating_add(Weight::from_parts(14_096_117, 0).saturating_mul(n.into())) - .saturating_add(T::DbWeight::get().reads(6)) + // Measured: `825` + // Estimated: `52645` + // Minimum execution time: 82_480_000 picoseconds. + Weight::from_parts(83_071_000, 0) + .saturating_add(Weight::from_parts(0, 52645)) + // Standard Error: 14_245 + .saturating_add(Weight::from_parts(14_081_140, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `BridgePolkadotMessages::PalletOperatingMode` (r:1 w:0) /// Proof: `BridgePolkadotMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`) - /// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:0) - /// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: Some(1282), added: 1777, mode: `MaxEncodedLen`) /// Storage: `BridgePolkadotParachains::ImportedParaHeads` (r:1 w:0) /// Proof: `BridgePolkadotParachains::ImportedParaHeads` (`max_values`: Some(600), `max_size`: Some(196), added: 1681, mode: `MaxEncodedLen`) /// Storage: `BridgePolkadotMessages::InboundLanes` (r:1 w:1) /// Proof: `BridgePolkadotMessages::InboundLanes` (`max_values`: None, `max_size`: Some(49180), added: 51655, mode: `MaxEncodedLen`) + /// Storage: `XcmOverBridgeHubPolkadot::LaneToBridge` (r:1 w:0) + /// Proof: `XcmOverBridgeHubPolkadot::LaneToBridge` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`) + /// Storage: `XcmOverBridgeHubPolkadot::Bridges` (r:1 w:0) + /// Proof: `XcmOverBridgeHubPolkadot::Bridges` (`max_values`: None, `max_size`: Some(1889), added: 4364, mode: `MaxEncodedLen`) + /// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:0) + /// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: Some(1282), added: 1777, mode: `MaxEncodedLen`) /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) fn receive_single_message_proof_with_outbound_lane_state() -> Weight { // Proof Size summary in bytes: - // Measured: `489` + // Measured: `825` // Estimated: `52645` - // Minimum execution time: 61_031_000 picoseconds. - Weight::from_parts(62_040_000, 0) + // Minimum execution time: 84_281_000 picoseconds. + Weight::from_parts(85_210_000, 0) .saturating_add(Weight::from_parts(0, 52645)) - .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `BridgePolkadotMessages::PalletOperatingMode` (r:1 w:0) /// Proof: `BridgePolkadotMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`) /// Storage: `BridgePolkadotParachains::ImportedParaHeads` (r:1 w:0) - /// Proof: `BridgePolkadotParachains::ImportedParaHeads` (`max_values`: Some(64), `max_size`: Some(196), added: 1186, mode: `MaxEncodedLen`) + /// Proof: `BridgePolkadotParachains::ImportedParaHeads` (`max_values`: Some(600), `max_size`: Some(196), added: 1681, mode: `MaxEncodedLen`) /// Storage: `BridgePolkadotMessages::InboundLanes` (r:1 w:1) - /// Proof: `BridgePolkadotMessages::InboundLanes` (`max_values`: None, `max_size`: Some(49209), added: 51684, mode: `MaxEncodedLen`) - /// Storage: `XcmOverBridgeHubKusama::LaneToBridge` (r:1 w:0) - /// Proof: `XcmOverBridgeHubKusama::LaneToBridge` (`max_values`: None, `max_size`: Some(65), added: 2540, mode: `MaxEncodedLen`) - /// Storage: `XcmOverBridgeHubKusama::Bridges` (r:1 w:0) - /// Proof: `XcmOverBridgeHubKusama::Bridges` (`max_values`: None, `max_size`: Some(1918), added: 4393, mode: `MaxEncodedLen`) + /// Proof: `BridgePolkadotMessages::InboundLanes` (`max_values`: None, `max_size`: Some(49180), added: 51655, mode: `MaxEncodedLen`) + /// Storage: `XcmOverBridgeHubPolkadot::LaneToBridge` (r:1 w:0) + /// Proof: `XcmOverBridgeHubPolkadot::LaneToBridge` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`) + /// Storage: `XcmOverBridgeHubPolkadot::Bridges` (r:1 w:0) + /// Proof: `XcmOverBridgeHubPolkadot::Bridges` (`max_values`: None, `max_size`: Some(1889), added: 4364, mode: `MaxEncodedLen`) + /// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:0) + /// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: Some(1282), added: 1777, mode: `MaxEncodedLen`) /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 16384]`. fn receive_single_n_bytes_message_proof(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `701` - // Estimated: `52674` - // Minimum execution time: 58_688_000 picoseconds. - Weight::from_parts(61_404_716, 0) - .saturating_add(Weight::from_parts(0, 52674)) - // Standard Error: 7 - .saturating_add(Weight::from_parts(2_249, 0).saturating_mul(n.into())) - .saturating_add(T::DbWeight::get().reads(6)) + // Measured: `825` + // Estimated: `52645` + // Minimum execution time: 75_740_000 picoseconds. + Weight::from_parts(77_994_916, 0) + .saturating_add(Weight::from_parts(0, 52645)) + // Standard Error: 5 + .saturating_add(Weight::from_parts(2_071, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `BridgePolkadotMessages::PalletOperatingMode` (r:1 w:0) @@ -142,98 +154,112 @@ impl pallet_bridge_messages::WeightInfo for WeightInfo< /// Storage: `BridgePolkadotParachains::ImportedParaHeads` (r:1 w:0) /// Proof: `BridgePolkadotParachains::ImportedParaHeads` (`max_values`: Some(600), `max_size`: Some(196), added: 1681, mode: `MaxEncodedLen`) /// Storage: `BridgePolkadotMessages::OutboundLanes` (r:1 w:1) - /// Proof: `BridgePolkadotMessages::OutboundLanes` (`max_values`: Some(1), `max_size`: Some(44), added: 539, mode: `MaxEncodedLen`) + /// Proof: `BridgePolkadotMessages::OutboundLanes` (`max_values`: None, `max_size`: Some(45), added: 2520, mode: `MaxEncodedLen`) /// Storage: UNKNOWN KEY `0x6e0a18b62a1de81c5f519181cc611e18` (r:1 w:0) /// Proof: UNKNOWN KEY `0x6e0a18b62a1de81c5f519181cc611e18` (r:1 w:0) /// Storage: `BridgeRelayers::RelayerRewards` (r:1 w:1) /// Proof: `BridgeRelayers::RelayerRewards` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`) + /// Storage: `XcmOverBridgeHubPolkadot::LaneToBridge` (r:1 w:0) + /// Proof: `XcmOverBridgeHubPolkadot::LaneToBridge` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`) + /// Storage: `XcmOverBridgeHubPolkadot::Bridges` (r:1 w:0) + /// Proof: `XcmOverBridgeHubPolkadot::Bridges` (`max_values`: None, `max_size`: Some(1889), added: 4364, mode: `MaxEncodedLen`) + /// Storage: `BridgePolkadotMessages::OutboundMessages` (r:0 w:1) + /// Proof: `BridgePolkadotMessages::OutboundMessages` (`max_values`: None, `max_size`: Some(65568), added: 68043, mode: `MaxEncodedLen`) fn receive_delivery_proof_for_single_message() -> Weight { // Proof Size summary in bytes: - // Measured: `362` - // Estimated: `3827` - // Minimum execution time: 38_660_000 picoseconds. - Weight::from_parts(39_380_000, 0) - .saturating_add(Weight::from_parts(0, 3827)) - .saturating_add(T::DbWeight::get().reads(5)) - .saturating_add(T::DbWeight::get().writes(2)) + // Measured: `697` + // Estimated: `5354` + // Minimum execution time: 65_940_000 picoseconds. + Weight::from_parts(66_570_000, 0) + .saturating_add(Weight::from_parts(0, 5354)) + .saturating_add(T::DbWeight::get().reads(7)) + .saturating_add(T::DbWeight::get().writes(3)) } /// Storage: `BridgePolkadotMessages::PalletOperatingMode` (r:1 w:0) /// Proof: `BridgePolkadotMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`) /// Storage: `BridgePolkadotParachains::ImportedParaHeads` (r:1 w:0) /// Proof: `BridgePolkadotParachains::ImportedParaHeads` (`max_values`: Some(600), `max_size`: Some(196), added: 1681, mode: `MaxEncodedLen`) /// Storage: `BridgePolkadotMessages::OutboundLanes` (r:1 w:1) - /// Proof: `BridgePolkadotMessages::OutboundLanes` (`max_values`: Some(1), `max_size`: Some(44), added: 539, mode: `MaxEncodedLen`) + /// Proof: `BridgePolkadotMessages::OutboundLanes` (`max_values`: None, `max_size`: Some(45), added: 2520, mode: `MaxEncodedLen`) /// Storage: UNKNOWN KEY `0x6e0a18b62a1de81c5f519181cc611e18` (r:1 w:0) /// Proof: UNKNOWN KEY `0x6e0a18b62a1de81c5f519181cc611e18` (r:1 w:0) /// Storage: `BridgeRelayers::RelayerRewards` (r:1 w:1) /// Proof: `BridgeRelayers::RelayerRewards` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`) + /// Storage: `XcmOverBridgeHubPolkadot::LaneToBridge` (r:1 w:0) + /// Proof: `XcmOverBridgeHubPolkadot::LaneToBridge` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`) + /// Storage: `XcmOverBridgeHubPolkadot::Bridges` (r:1 w:0) + /// Proof: `XcmOverBridgeHubPolkadot::Bridges` (`max_values`: None, `max_size`: Some(1889), added: 4364, mode: `MaxEncodedLen`) + /// Storage: `BridgePolkadotMessages::OutboundMessages` (r:0 w:2) + /// Proof: `BridgePolkadotMessages::OutboundMessages` (`max_values`: None, `max_size`: Some(65568), added: 68043, mode: `MaxEncodedLen`) fn receive_delivery_proof_for_two_messages_by_single_relayer() -> Weight { // Proof Size summary in bytes: - // Measured: `362` - // Estimated: `3827` - // Minimum execution time: 38_521_000 picoseconds. - Weight::from_parts(39_290_000, 0) - .saturating_add(Weight::from_parts(0, 3827)) - .saturating_add(T::DbWeight::get().reads(5)) - .saturating_add(T::DbWeight::get().writes(2)) + // Measured: `697` + // Estimated: `5354` + // Minimum execution time: 67_271_000 picoseconds. + Weight::from_parts(68_090_000, 0) + .saturating_add(Weight::from_parts(0, 5354)) + .saturating_add(T::DbWeight::get().reads(7)) + .saturating_add(T::DbWeight::get().writes(4)) } /// Storage: `BridgePolkadotMessages::PalletOperatingMode` (r:1 w:0) /// Proof: `BridgePolkadotMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`) /// Storage: `BridgePolkadotParachains::ImportedParaHeads` (r:1 w:0) /// Proof: `BridgePolkadotParachains::ImportedParaHeads` (`max_values`: Some(600), `max_size`: Some(196), added: 1681, mode: `MaxEncodedLen`) /// Storage: `BridgePolkadotMessages::OutboundLanes` (r:1 w:1) - /// Proof: `BridgePolkadotMessages::OutboundLanes` (`max_values`: Some(1), `max_size`: Some(44), added: 539, mode: `MaxEncodedLen`) + /// Proof: `BridgePolkadotMessages::OutboundLanes` (`max_values`: None, `max_size`: Some(45), added: 2520, mode: `MaxEncodedLen`) /// Storage: UNKNOWN KEY `0x6e0a18b62a1de81c5f519181cc611e18` (r:1 w:0) /// Proof: UNKNOWN KEY `0x6e0a18b62a1de81c5f519181cc611e18` (r:1 w:0) /// Storage: `BridgeRelayers::RelayerRewards` (r:2 w:2) /// Proof: `BridgeRelayers::RelayerRewards` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`) + /// Storage: `XcmOverBridgeHubPolkadot::LaneToBridge` (r:1 w:0) + /// Proof: `XcmOverBridgeHubPolkadot::LaneToBridge` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`) + /// Storage: `XcmOverBridgeHubPolkadot::Bridges` (r:1 w:0) + /// Proof: `XcmOverBridgeHubPolkadot::Bridges` (`max_values`: None, `max_size`: Some(1889), added: 4364, mode: `MaxEncodedLen`) + /// Storage: `BridgePolkadotMessages::OutboundMessages` (r:0 w:2) + /// Proof: `BridgePolkadotMessages::OutboundMessages` (`max_values`: None, `max_size`: Some(65568), added: 68043, mode: `MaxEncodedLen`) fn receive_delivery_proof_for_two_messages_by_two_relayers() -> Weight { // Proof Size summary in bytes: - // Measured: `362` + // Measured: `697` // Estimated: `6086` - // Minimum execution time: 43_780_000 picoseconds. - Weight::from_parts(44_681_000, 0) + // Minimum execution time: 72_500_000 picoseconds. + Weight::from_parts(73_331_000, 0) .saturating_add(Weight::from_parts(0, 6086)) - .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().writes(3)) + .saturating_add(T::DbWeight::get().reads(8)) + .saturating_add(T::DbWeight::get().writes(5)) } /// Storage: `BridgePolkadotMessages::PalletOperatingMode` (r:1 w:0) /// Proof: `BridgePolkadotMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`) /// Storage: `BridgePolkadotParachains::ImportedParaHeads` (r:1 w:0) - /// Proof: `BridgePolkadotParachains::ImportedParaHeads` (`max_values`: Some(64), `max_size`: Some(196), added: 1186, mode: `MaxEncodedLen`) + /// Proof: `BridgePolkadotParachains::ImportedParaHeads` (`max_values`: Some(600), `max_size`: Some(196), added: 1681, mode: `MaxEncodedLen`) /// Storage: `BridgePolkadotMessages::InboundLanes` (r:1 w:1) - /// Proof: `BridgePolkadotMessages::InboundLanes` (`max_values`: None, `max_size`: Some(49209), added: 51684, mode: `MaxEncodedLen`) - /// Storage: `XcmOverBridgeHubKusama::LaneToBridge` (r:1 w:0) - /// Proof: `XcmOverBridgeHubKusama::LaneToBridge` (`max_values`: None, `max_size`: Some(65), added: 2540, mode: `MaxEncodedLen`) - /// Storage: `XcmOverBridgeHubKusama::Bridges` (r:1 w:0) - /// Proof: `XcmOverBridgeHubKusama::Bridges` (`max_values`: None, `max_size`: Some(1918), added: 4393, mode: `MaxEncodedLen`) + /// Proof: `BridgePolkadotMessages::InboundLanes` (`max_values`: None, `max_size`: Some(49180), added: 51655, mode: `MaxEncodedLen`) + /// Storage: `XcmOverBridgeHubPolkadot::LaneToBridge` (r:1 w:0) + /// Proof: `XcmOverBridgeHubPolkadot::LaneToBridge` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`) + /// Storage: `XcmOverBridgeHubPolkadot::Bridges` (r:1 w:0) + /// Proof: `XcmOverBridgeHubPolkadot::Bridges` (`max_values`: None, `max_size`: Some(1889), added: 4364, mode: `MaxEncodedLen`) + /// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:1) + /// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: Some(1282), added: 1777, mode: `MaxEncodedLen`) /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) /// Storage: `XcmpQueue::DeliveryFeeFactor` (r:1 w:0) /// Proof: `XcmpQueue::DeliveryFeeFactor` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) - /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) - /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `ParachainSystem::RelevantMessagingState` (r:1 w:0) /// Proof: `ParachainSystem::RelevantMessagingState` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:1) - /// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: Some(1282), added: 1777, mode: `MaxEncodedLen`) /// Storage: `XcmpQueue::OutboundXcmpMessages` (r:0 w:1) /// Proof: `XcmpQueue::OutboundXcmpMessages` (`max_values`: None, `max_size`: Some(105506), added: 107981, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 16384]`. fn receive_single_n_bytes_message_proof_with_dispatch(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `965` - // Estimated: `52674` - // Minimum execution time: 84_340_000 picoseconds. - Weight::from_parts(89_615_003, 0) - .saturating_add(Weight::from_parts(0, 52674)) - // Standard Error: 15 - .saturating_add(Weight::from_parts(7_574, 0).saturating_mul(n.into())) - .saturating_add(T::DbWeight::get().reads(12)) - .saturating_add(T::DbWeight::get().writes(4)) + // Measured: `948` + // Estimated: `52645` + // Minimum execution time: 96_271_000 picoseconds. + Weight::from_parts(100_814_545, 0) + .saturating_add(Weight::from_parts(0, 52645)) + // Standard Error: 8 + .saturating_add(Weight::from_parts(7_048, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(10)) + .saturating_add(T::DbWeight::get().writes(3)) } -} +} \ No newline at end of file diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_bridge_relayers.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_bridge_relayers.rs index 13951a45e8..3d1c19c754 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_bridge_relayers.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/pallet_bridge_relayers.rs @@ -17,7 +17,7 @@ //! Autogenerated weights for `pallet_bridge_relayers` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-14, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2025-01-04, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./bridge-hub-kusama-chain-spec.json")`, DB CACHE: 1024 @@ -55,8 +55,8 @@ impl pallet_bridge_relayers::WeightInfo for WeightInfo< // Proof Size summary in bytes: // Measured: `207` // Estimated: `3593` - // Minimum execution time: 53_330_000 picoseconds. - Weight::from_parts(53_911_000, 0) + // Minimum execution time: 62_111_000 picoseconds. + Weight::from_parts(62_761_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -71,8 +71,8 @@ impl pallet_bridge_relayers::WeightInfo for WeightInfo< // Proof Size summary in bytes: // Measured: `61` // Estimated: `4714` - // Minimum execution time: 28_741_000 picoseconds. - Weight::from_parts(29_300_000, 0) + // Minimum execution time: 33_541_000 picoseconds. + Weight::from_parts(34_210_000, 0) .saturating_add(Weight::from_parts(0, 4714)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) @@ -85,8 +85,8 @@ impl pallet_bridge_relayers::WeightInfo for WeightInfo< // Proof Size summary in bytes: // Measured: `160` // Estimated: `4714` - // Minimum execution time: 29_411_000 picoseconds. - Weight::from_parts(29_960_000, 0) + // Minimum execution time: 34_340_000 picoseconds. + Weight::from_parts(34_610_000, 0) .saturating_add(Weight::from_parts(0, 4714)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -101,8 +101,8 @@ impl pallet_bridge_relayers::WeightInfo for WeightInfo< // Proof Size summary in bytes: // Measured: `263` // Estimated: `4714` - // Minimum execution time: 32_400_000 picoseconds. - Weight::from_parts(32_750_000, 0) + // Minimum execution time: 37_930_000 picoseconds. + Weight::from_parts(38_491_000, 0) .saturating_add(Weight::from_parts(0, 4714)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) @@ -113,8 +113,8 @@ impl pallet_bridge_relayers::WeightInfo for WeightInfo< // Proof Size summary in bytes: // Measured: `6` // Estimated: `3538` - // Minimum execution time: 5_970_000 picoseconds. - Weight::from_parts(6_110_000, 0) + // Minimum execution time: 10_190_000 picoseconds. + Weight::from_parts(10_460_000, 0) .saturating_add(Weight::from_parts(0, 3538)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/xcm/pallet_xcm_benchmarks_generic.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/xcm/pallet_xcm_benchmarks_generic.rs index 084eb91ecf..1e370cc36f 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/xcm/pallet_xcm_benchmarks_generic.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/src/weights/xcm/pallet_xcm_benchmarks_generic.rs @@ -17,7 +17,7 @@ //! Autogenerated weights for `pallet_xcm_benchmarks::generic` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-14, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2025-01-04, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./bridge-hub-kusama-chain-spec.json")`, DB CACHE: 1024 @@ -53,10 +53,6 @@ impl WeightInfo { /// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) - /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) - /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `System::Account` (r:2 w:2) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) @@ -65,87 +61,87 @@ impl WeightInfo { /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) pub(crate) fn report_holding() -> Weight { // Proof Size summary in bytes: - // Measured: `260` + // Measured: `191` // Estimated: `6196` - // Minimum execution time: 75_981_000 picoseconds. - Weight::from_parts(76_811_000, 0) + // Minimum execution time: 86_330_000 picoseconds. + Weight::from_parts(87_251_000, 0) .saturating_add(Weight::from_parts(0, 6196)) - .saturating_add(T::DbWeight::get().reads(9)) - .saturating_add(T::DbWeight::get().writes(4)) + .saturating_add(T::DbWeight::get().reads(7)) + .saturating_add(T::DbWeight::get().writes(3)) } pub(crate) fn buy_execution() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 780_000 picoseconds. - Weight::from_parts(820_000, 0) + // Minimum execution time: 810_000 picoseconds. + Weight::from_parts(900_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// Storage: `PolkadotXcm::Queries` (r:1 w:0) /// Proof: `PolkadotXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`) pub(crate) fn query_response() -> Weight { // Proof Size summary in bytes: - // Measured: `69` - // Estimated: `3534` - // Minimum execution time: 8_030_000 picoseconds. - Weight::from_parts(8_330_000, 0) - .saturating_add(Weight::from_parts(0, 3534)) + // Measured: `0` + // Estimated: `3465` + // Minimum execution time: 7_710_000 picoseconds. + Weight::from_parts(8_020_000, 0) + .saturating_add(Weight::from_parts(0, 3465)) .saturating_add(T::DbWeight::get().reads(1)) } pub(crate) fn transact() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 7_420_000 picoseconds. - Weight::from_parts(7_580_000, 0) + // Minimum execution time: 8_980_000 picoseconds. + Weight::from_parts(9_270_000, 0) .saturating_add(Weight::from_parts(0, 0)) } pub(crate) fn refund_surplus() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_480_000 picoseconds. - Weight::from_parts(1_600_000, 0) + // Minimum execution time: 1_740_000 picoseconds. + Weight::from_parts(1_860_000, 0) .saturating_add(Weight::from_parts(0, 0)) } pub(crate) fn set_error_handler() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 800_000 picoseconds. - Weight::from_parts(850_000, 0) + // Minimum execution time: 820_000 picoseconds. + Weight::from_parts(920_000, 0) .saturating_add(Weight::from_parts(0, 0)) } pub(crate) fn set_appendix() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 770_000 picoseconds. - Weight::from_parts(820_000, 0) + // Minimum execution time: 870_000 picoseconds. + Weight::from_parts(920_000, 0) .saturating_add(Weight::from_parts(0, 0)) } pub(crate) fn clear_error() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 740_000 picoseconds. - Weight::from_parts(810_000, 0) + // Minimum execution time: 760_000 picoseconds. + Weight::from_parts(860_000, 0) .saturating_add(Weight::from_parts(0, 0)) } pub(crate) fn descend_origin() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 780_000 picoseconds. - Weight::from_parts(850_000, 0) + // Minimum execution time: 880_000 picoseconds. + Weight::from_parts(930_000, 0) .saturating_add(Weight::from_parts(0, 0)) } pub(crate) fn clear_origin() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 760_000 picoseconds. - Weight::from_parts(820_000, 0) + // Minimum execution time: 840_000 picoseconds. + Weight::from_parts(890_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) @@ -154,10 +150,6 @@ impl WeightInfo { /// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) - /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) - /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `System::Account` (r:2 w:2) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) @@ -166,23 +158,23 @@ impl WeightInfo { /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) pub(crate) fn report_error() -> Weight { // Proof Size summary in bytes: - // Measured: `260` + // Measured: `191` // Estimated: `6196` - // Minimum execution time: 71_730_000 picoseconds. - Weight::from_parts(72_841_000, 0) + // Minimum execution time: 81_941_000 picoseconds. + Weight::from_parts(82_471_000, 0) .saturating_add(Weight::from_parts(0, 6196)) - .saturating_add(T::DbWeight::get().reads(9)) - .saturating_add(T::DbWeight::get().writes(4)) + .saturating_add(T::DbWeight::get().reads(7)) + .saturating_add(T::DbWeight::get().writes(3)) } /// Storage: `PolkadotXcm::AssetTraps` (r:1 w:1) /// Proof: `PolkadotXcm::AssetTraps` (`max_values`: None, `max_size`: None, mode: `Measured`) pub(crate) fn claim_asset() -> Weight { // Proof Size summary in bytes: - // Measured: `126` - // Estimated: `3591` - // Minimum execution time: 11_550_000 picoseconds. - Weight::from_parts(11_880_000, 0) - .saturating_add(Weight::from_parts(0, 3591)) + // Measured: `23` + // Estimated: `3488` + // Minimum execution time: 13_891_000 picoseconds. + Weight::from_parts(14_270_000, 0) + .saturating_add(Weight::from_parts(0, 3488)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -191,7 +183,7 @@ impl WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 750_000 picoseconds. - Weight::from_parts(810_000, 0) + Weight::from_parts(840_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// Storage: `PolkadotXcm::VersionNotifyTargets` (r:1 w:1) @@ -200,23 +192,19 @@ impl WeightInfo { /// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) - /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) - /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) pub(crate) fn subscribe_version() -> Weight { // Proof Size summary in bytes: - // Measured: `75` - // Estimated: `3540` - // Minimum execution time: 25_420_000 picoseconds. - Weight::from_parts(26_091_000, 0) - .saturating_add(Weight::from_parts(0, 3540)) - .saturating_add(T::DbWeight::get().reads(7)) - .saturating_add(T::DbWeight::get().writes(3)) + // Measured: `6` + // Estimated: `3471` + // Minimum execution time: 29_500_000 picoseconds. + Weight::from_parts(29_861_000, 0) + .saturating_add(Weight::from_parts(0, 3471)) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(2)) } /// Storage: `PolkadotXcm::VersionNotifyTargets` (r:0 w:1) /// Proof: `PolkadotXcm::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`) @@ -224,8 +212,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_030_000 picoseconds. - Weight::from_parts(3_180_000, 0) + // Minimum execution time: 3_760_000 picoseconds. + Weight::from_parts(3_850_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -233,24 +221,24 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_310_000 picoseconds. - Weight::from_parts(1_430_000, 0) + // Minimum execution time: 1_400_000 picoseconds. + Weight::from_parts(1_520_000, 0) .saturating_add(Weight::from_parts(0, 0)) } pub(crate) fn expect_asset() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 840_000 picoseconds. - Weight::from_parts(960_000, 0) + // Minimum execution time: 960_000 picoseconds. + Weight::from_parts(1_040_000, 0) .saturating_add(Weight::from_parts(0, 0)) } pub(crate) fn expect_origin() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 800_000 picoseconds. - Weight::from_parts(830_000, 0) + // Minimum execution time: 810_000 picoseconds. + Weight::from_parts(860_000, 0) .saturating_add(Weight::from_parts(0, 0)) } pub(crate) fn expect_error() -> Weight { @@ -258,15 +246,15 @@ impl WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 780_000 picoseconds. - Weight::from_parts(820_000, 0) + Weight::from_parts(850_000, 0) .saturating_add(Weight::from_parts(0, 0)) } pub(crate) fn expect_transact_status() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 980_000 picoseconds. - Weight::from_parts(1_080_000, 0) + // Minimum execution time: 960_000 picoseconds. + Weight::from_parts(1_060_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) @@ -275,10 +263,6 @@ impl WeightInfo { /// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) - /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) - /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `System::Account` (r:2 w:2) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) @@ -287,20 +271,20 @@ impl WeightInfo { /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) pub(crate) fn query_pallet() -> Weight { // Proof Size summary in bytes: - // Measured: `260` + // Measured: `191` // Estimated: `6196` - // Minimum execution time: 76_500_000 picoseconds. - Weight::from_parts(77_481_000, 0) + // Minimum execution time: 87_931_000 picoseconds. + Weight::from_parts(88_701_000, 0) .saturating_add(Weight::from_parts(0, 6196)) - .saturating_add(T::DbWeight::get().reads(9)) - .saturating_add(T::DbWeight::get().writes(4)) + .saturating_add(T::DbWeight::get().reads(7)) + .saturating_add(T::DbWeight::get().writes(3)) } pub(crate) fn expect_pallet() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 4_160_000 picoseconds. - Weight::from_parts(4_230_000, 0) + // Minimum execution time: 4_740_000 picoseconds. + Weight::from_parts(4_941_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) @@ -309,10 +293,6 @@ impl WeightInfo { /// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) - /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) - /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `System::Account` (r:2 w:2) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) @@ -321,60 +301,60 @@ impl WeightInfo { /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) pub(crate) fn report_transact_status() -> Weight { // Proof Size summary in bytes: - // Measured: `260` + // Measured: `191` // Estimated: `6196` - // Minimum execution time: 72_011_000 picoseconds. - Weight::from_parts(72_640_000, 0) + // Minimum execution time: 82_001_000 picoseconds. + Weight::from_parts(82_920_000, 0) .saturating_add(Weight::from_parts(0, 6196)) - .saturating_add(T::DbWeight::get().reads(9)) - .saturating_add(T::DbWeight::get().writes(4)) + .saturating_add(T::DbWeight::get().reads(7)) + .saturating_add(T::DbWeight::get().writes(3)) } pub(crate) fn clear_transact_status() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 810_000 picoseconds. - Weight::from_parts(870_000, 0) + // Minimum execution time: 860_000 picoseconds. + Weight::from_parts(960_000, 0) .saturating_add(Weight::from_parts(0, 0)) } pub(crate) fn set_topic() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 740_000 picoseconds. - Weight::from_parts(800_000, 0) + // Minimum execution time: 770_000 picoseconds. + Weight::from_parts(841_000, 0) .saturating_add(Weight::from_parts(0, 0)) } pub(crate) fn clear_topic() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 730_000 picoseconds. - Weight::from_parts(790_000, 0) + // Minimum execution time: 780_000 picoseconds. + Weight::from_parts(830_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `XcmOverBridgeHubPolkadot::Bridges` (r:1 w:0) + /// Proof: `XcmOverBridgeHubPolkadot::Bridges` (`max_values`: None, `max_size`: Some(1889), added: 4364, mode: `MaxEncodedLen`) /// Storage: `PolkadotXcm::SupportedVersion` (r:2 w:0) /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `BridgePolkadotMessages::PalletOperatingMode` (r:1 w:0) /// Proof: `BridgePolkadotMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`) /// Storage: `BridgePolkadotMessages::OutboundLanes` (r:1 w:1) - /// Proof: `BridgePolkadotMessages::OutboundLanes` (`max_values`: Some(1), `max_size`: Some(44), added: 539, mode: `MaxEncodedLen`) - /// Storage: `BridgePolkadotMessages::OutboundLanesCongestedSignals` (r:1 w:0) - /// Proof: `BridgePolkadotMessages::OutboundLanesCongestedSignals` (`max_values`: Some(1), `max_size`: Some(21), added: 516, mode: `MaxEncodedLen`) + /// Proof: `BridgePolkadotMessages::OutboundLanes` (`max_values`: None, `max_size`: Some(45), added: 2520, mode: `MaxEncodedLen`) /// Storage: `BridgePolkadotMessages::OutboundMessages` (r:0 w:1) - /// Proof: `BridgePolkadotMessages::OutboundMessages` (`max_values`: None, `max_size`: Some(2621472), added: 2623947, mode: `MaxEncodedLen`) + /// Proof: `BridgePolkadotMessages::OutboundMessages` (`max_values`: None, `max_size`: Some(65568), added: 68043, mode: `MaxEncodedLen`) /// The range of component `x` is `[1, 1000]`. pub(crate) fn export_message(x: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `190` - // Estimated: `6130` - // Minimum execution time: 45_121_000 picoseconds. - Weight::from_parts(45_976_501, 0) - .saturating_add(Weight::from_parts(0, 6130)) - // Standard Error: 41 - .saturating_add(Weight::from_parts(54_514, 0).saturating_mul(x.into())) + // Measured: `433` + // Estimated: `6373` + // Minimum execution time: 66_121_000 picoseconds. + Weight::from_parts(66_848_907, 0) + .saturating_add(Weight::from_parts(0, 6373)) + // Standard Error: 40 + .saturating_add(Weight::from_parts(55_280, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -382,16 +362,16 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 720_000 picoseconds. - Weight::from_parts(800_000, 0) + // Minimum execution time: 740_000 picoseconds. + Weight::from_parts(850_000, 0) .saturating_add(Weight::from_parts(0, 0)) } pub(crate) fn unpaid_execution() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 780_000 picoseconds. - Weight::from_parts(820_000, 0) + // Minimum execution time: 850_000 picoseconds. + Weight::from_parts(920_000, 0) .saturating_add(Weight::from_parts(0, 0)) } } 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 2d97a220d5..43d58b114f 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 @@ -67,8 +67,10 @@ impl ChainWithMessages for BridgeHubPolkadot { WITH_BRIDGE_HUB_POLKADOT_MESSAGES_PALLET_NAME; const MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX: MessageNonce = MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX; - const MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX: MessageNonce = - MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX; + /// This constant limits the maximum number of messages in `receive_messages_proof`. + /// We need to adjust it from 4096 to 2024 due to the actual weights identified by `check_message_lane_weights`. + /// A higher value can be set once we switch `max_extrinsic_weight` to `BlockWeightsForAsyncBacking`. + const MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX: MessageNonce = 2024; } /// Identifier of BridgeHubPolkadot in the Polkadot relay chain. @@ -91,7 +93,7 @@ frame_support::parameter_types! { /// The XCM fee that is paid for executing XCM program (with `ExportMessage` instruction) at the Polkadot /// BridgeHub. /// (initially was calculated by test `BridgeHubPolkadot::can_calculate_weight_for_paid_export_message_with_reserve_transfer` + `33%`) - pub const BridgeHubPolkadotBaseXcmFeeInDots: Balance = 88_797_450; + pub const BridgeHubPolkadotBaseXcmFeeInDots: Balance = 90_433_350; /// Transaction fee that is paid at the Polkadot BridgeHub for delivering single inbound message. /// (initially was calculated by test `BridgeHubPolkadot::can_calculate_fee_for_standalone_message_delivery_transaction` + `33%`) 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 639e120c70..ed20540e6b 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 @@ -372,14 +372,15 @@ mod tests { #[test] fn ensure_bridge_hub_polkadot_message_lane_weights_are_correct() { + use bp_messages::ChainWithMessages; check_message_lane_weights::< bp_bridge_hub_polkadot::BridgeHubPolkadot, Runtime, WithBridgeHubKusamaMessagesInstance, >( bp_bridge_hub_kusama::EXTRA_STORAGE_PROOF_SIZE, - bp_bridge_hub_polkadot::MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX, - bp_bridge_hub_polkadot::MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX, + bp_bridge_hub_polkadot::BridgeHubPolkadot::MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX, + bp_bridge_hub_polkadot::BridgeHubPolkadot::MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX, true, ); } diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_bridge_messages.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_bridge_messages.rs index 982657940a..45959b7b9a 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_bridge_messages.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_bridge_messages.rs @@ -17,7 +17,7 @@ //! Autogenerated weights for `pallet_bridge_messages` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-14, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2025-01-04, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./bridge-hub-polkadot-chain-spec.json")`, DB CACHE: 1024 @@ -49,92 +49,104 @@ pub struct WeightInfo(PhantomData); impl pallet_bridge_messages::WeightInfo for WeightInfo { /// Storage: `BridgeKusamaMessages::PalletOperatingMode` (r:1 w:0) /// Proof: `BridgeKusamaMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`) - /// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:0) - /// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: Some(1282), added: 1777, mode: `MaxEncodedLen`) /// Storage: `BridgeKusamaParachains::ImportedParaHeads` (r:1 w:0) /// Proof: `BridgeKusamaParachains::ImportedParaHeads` (`max_values`: Some(600), `max_size`: Some(196), added: 1681, mode: `MaxEncodedLen`) /// Storage: `BridgeKusamaMessages::InboundLanes` (r:1 w:1) /// Proof: `BridgeKusamaMessages::InboundLanes` (`max_values`: None, `max_size`: Some(49180), added: 51655, mode: `MaxEncodedLen`) + /// Storage: `XcmOverBridgeHubKusama::LaneToBridge` (r:1 w:0) + /// Proof: `XcmOverBridgeHubKusama::LaneToBridge` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`) + /// Storage: `XcmOverBridgeHubKusama::Bridges` (r:1 w:0) + /// Proof: `XcmOverBridgeHubKusama::Bridges` (`max_values`: None, `max_size`: Some(1889), added: 4364, mode: `MaxEncodedLen`) + /// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:0) + /// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: Some(1282), added: 1777, mode: `MaxEncodedLen`) /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) fn receive_single_message_proof() -> Weight { // Proof Size summary in bytes: - // Measured: `595` + // Measured: `899` // Estimated: `52645` - // Minimum execution time: 55_650_000 picoseconds. - Weight::from_parts(56_750_000, 0) + // Minimum execution time: 82_741_000 picoseconds. + Weight::from_parts(83_821_000, 0) .saturating_add(Weight::from_parts(0, 52645)) - .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `BridgeKusamaMessages::PalletOperatingMode` (r:1 w:0) /// Proof: `BridgeKusamaMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`) /// Storage: `BridgeKusamaParachains::ImportedParaHeads` (r:1 w:0) - /// Proof: `BridgeKusamaParachains::ImportedParaHeads` (`max_values`: Some(64), `max_size`: Some(196), added: 1186, mode: `MaxEncodedLen`) + /// Proof: `BridgeKusamaParachains::ImportedParaHeads` (`max_values`: Some(600), `max_size`: Some(196), added: 1681, mode: `MaxEncodedLen`) /// Storage: `BridgeKusamaMessages::InboundLanes` (r:1 w:1) - /// Proof: `BridgeKusamaMessages::InboundLanes` (`max_values`: None, `max_size`: Some(49209), added: 51684, mode: `MaxEncodedLen`) + /// Proof: `BridgeKusamaMessages::InboundLanes` (`max_values`: None, `max_size`: Some(49180), added: 51655, mode: `MaxEncodedLen`) /// Storage: `XcmOverBridgeHubKusama::LaneToBridge` (r:1 w:0) - /// Proof: `XcmOverBridgeHubKusama::LaneToBridge` (`max_values`: None, `max_size`: Some(65), added: 2540, mode: `MaxEncodedLen`) + /// Proof: `XcmOverBridgeHubKusama::LaneToBridge` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`) /// Storage: `XcmOverBridgeHubKusama::Bridges` (r:1 w:0) - /// Proof: `XcmOverBridgeHubKusama::Bridges` (`max_values`: None, `max_size`: Some(1918), added: 4393, mode: `MaxEncodedLen`) + /// Proof: `XcmOverBridgeHubKusama::Bridges` (`max_values`: None, `max_size`: Some(1889), added: 4364, mode: `MaxEncodedLen`) + /// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:0) + /// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: Some(1282), added: 1777, mode: `MaxEncodedLen`) /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 4076]`. fn receive_n_messages_proof(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `701` - // Estimated: `52674` - // Minimum execution time: 62_034_000 picoseconds. - Weight::from_parts(63_355_000, 0) - .saturating_add(Weight::from_parts(0, 52674)) - // Standard Error: 8_231 - .saturating_add(Weight::from_parts(14_096_117, 0).saturating_mul(n.into())) - .saturating_add(T::DbWeight::get().reads(6)) + // Measured: `899` + // Estimated: `52645` + // Minimum execution time: 82_100_000 picoseconds. + Weight::from_parts(82_781_000, 0) + .saturating_add(Weight::from_parts(0, 52645)) + // Standard Error: 15_462 + .saturating_add(Weight::from_parts(14_282_274, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `BridgeKusamaMessages::PalletOperatingMode` (r:1 w:0) /// Proof: `BridgeKusamaMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`) - /// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:0) - /// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: Some(1282), added: 1777, mode: `MaxEncodedLen`) /// Storage: `BridgeKusamaParachains::ImportedParaHeads` (r:1 w:0) /// Proof: `BridgeKusamaParachains::ImportedParaHeads` (`max_values`: Some(600), `max_size`: Some(196), added: 1681, mode: `MaxEncodedLen`) /// Storage: `BridgeKusamaMessages::InboundLanes` (r:1 w:1) /// Proof: `BridgeKusamaMessages::InboundLanes` (`max_values`: None, `max_size`: Some(49180), added: 51655, mode: `MaxEncodedLen`) + /// Storage: `XcmOverBridgeHubKusama::LaneToBridge` (r:1 w:0) + /// Proof: `XcmOverBridgeHubKusama::LaneToBridge` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`) + /// Storage: `XcmOverBridgeHubKusama::Bridges` (r:1 w:0) + /// Proof: `XcmOverBridgeHubKusama::Bridges` (`max_values`: None, `max_size`: Some(1889), added: 4364, mode: `MaxEncodedLen`) + /// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:0) + /// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: Some(1282), added: 1777, mode: `MaxEncodedLen`) /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) fn receive_single_message_proof_with_outbound_lane_state() -> Weight { // Proof Size summary in bytes: - // Measured: `595` + // Measured: `899` // Estimated: `52645` - // Minimum execution time: 62_220_000 picoseconds. - Weight::from_parts(63_270_000, 0) + // Minimum execution time: 87_280_000 picoseconds. + Weight::from_parts(87_801_000, 0) .saturating_add(Weight::from_parts(0, 52645)) - .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `BridgeKusamaMessages::PalletOperatingMode` (r:1 w:0) /// Proof: `BridgeKusamaMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`) /// Storage: `BridgeKusamaParachains::ImportedParaHeads` (r:1 w:0) - /// Proof: `BridgeKusamaParachains::ImportedParaHeads` (`max_values`: Some(64), `max_size`: Some(196), added: 1186, mode: `MaxEncodedLen`) + /// Proof: `BridgeKusamaParachains::ImportedParaHeads` (`max_values`: Some(600), `max_size`: Some(196), added: 1681, mode: `MaxEncodedLen`) /// Storage: `BridgeKusamaMessages::InboundLanes` (r:1 w:1) - /// Proof: `BridgeKusamaMessages::InboundLanes` (`max_values`: None, `max_size`: Some(49209), added: 51684, mode: `MaxEncodedLen`) + /// Proof: `BridgeKusamaMessages::InboundLanes` (`max_values`: None, `max_size`: Some(49180), added: 51655, mode: `MaxEncodedLen`) /// Storage: `XcmOverBridgeHubKusama::LaneToBridge` (r:1 w:0) - /// Proof: `XcmOverBridgeHubKusama::LaneToBridge` (`max_values`: None, `max_size`: Some(65), added: 2540, mode: `MaxEncodedLen`) + /// Proof: `XcmOverBridgeHubKusama::LaneToBridge` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`) /// Storage: `XcmOverBridgeHubKusama::Bridges` (r:1 w:0) - /// Proof: `XcmOverBridgeHubKusama::Bridges` (`max_values`: None, `max_size`: Some(1918), added: 4393, mode: `MaxEncodedLen`) + /// Proof: `XcmOverBridgeHubKusama::Bridges` (`max_values`: None, `max_size`: Some(1889), added: 4364, mode: `MaxEncodedLen`) + /// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:0) + /// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: Some(1282), added: 1777, mode: `MaxEncodedLen`) /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 16384]`. fn receive_single_n_bytes_message_proof(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `701` - // Estimated: `52674` - // Minimum execution time: 58_688_000 picoseconds. - Weight::from_parts(61_404_716, 0) - .saturating_add(Weight::from_parts(0, 52674)) - // Standard Error: 7 - .saturating_add(Weight::from_parts(2_249, 0).saturating_mul(n.into())) - .saturating_add(T::DbWeight::get().reads(6)) + // Measured: `899` + // Estimated: `52645` + // Minimum execution time: 78_521_000 picoseconds. + Weight::from_parts(80_664_182, 0) + .saturating_add(Weight::from_parts(0, 52645)) + // Standard Error: 4 + .saturating_add(Weight::from_parts(2_232, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `BridgeKusamaMessages::PalletOperatingMode` (r:1 w:0) @@ -142,98 +154,112 @@ impl pallet_bridge_messages::WeightInfo for WeightInfo< /// Storage: `BridgeKusamaParachains::ImportedParaHeads` (r:1 w:0) /// Proof: `BridgeKusamaParachains::ImportedParaHeads` (`max_values`: Some(600), `max_size`: Some(196), added: 1681, mode: `MaxEncodedLen`) /// Storage: `BridgeKusamaMessages::OutboundLanes` (r:1 w:1) - /// Proof: `BridgeKusamaMessages::OutboundLanes` (`max_values`: Some(1), `max_size`: Some(44), added: 539, mode: `MaxEncodedLen`) + /// Proof: `BridgeKusamaMessages::OutboundLanes` (`max_values`: None, `max_size`: Some(45), added: 2520, mode: `MaxEncodedLen`) /// Storage: UNKNOWN KEY `0x6e0a18b62a1de81c5f519181cc611e18` (r:1 w:0) /// Proof: UNKNOWN KEY `0x6e0a18b62a1de81c5f519181cc611e18` (r:1 w:0) /// Storage: `BridgeRelayers::RelayerRewards` (r:1 w:1) /// Proof: `BridgeRelayers::RelayerRewards` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`) + /// Storage: `XcmOverBridgeHubKusama::LaneToBridge` (r:1 w:0) + /// Proof: `XcmOverBridgeHubKusama::LaneToBridge` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`) + /// Storage: `XcmOverBridgeHubKusama::Bridges` (r:1 w:0) + /// Proof: `XcmOverBridgeHubKusama::Bridges` (`max_values`: None, `max_size`: Some(1889), added: 4364, mode: `MaxEncodedLen`) + /// Storage: `BridgeKusamaMessages::OutboundMessages` (r:0 w:1) + /// Proof: `BridgeKusamaMessages::OutboundMessages` (`max_values`: None, `max_size`: Some(65568), added: 68043, mode: `MaxEncodedLen`) fn receive_delivery_proof_for_single_message() -> Weight { // Proof Size summary in bytes: - // Measured: `432` - // Estimated: `3897` - // Minimum execution time: 40_001_000 picoseconds. - Weight::from_parts(40_480_000, 0) - .saturating_add(Weight::from_parts(0, 3897)) - .saturating_add(T::DbWeight::get().reads(5)) - .saturating_add(T::DbWeight::get().writes(2)) + // Measured: `736` + // Estimated: `5354` + // Minimum execution time: 68_070_000 picoseconds. + Weight::from_parts(68_640_000, 0) + .saturating_add(Weight::from_parts(0, 5354)) + .saturating_add(T::DbWeight::get().reads(7)) + .saturating_add(T::DbWeight::get().writes(3)) } /// Storage: `BridgeKusamaMessages::PalletOperatingMode` (r:1 w:0) /// Proof: `BridgeKusamaMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`) /// Storage: `BridgeKusamaParachains::ImportedParaHeads` (r:1 w:0) /// Proof: `BridgeKusamaParachains::ImportedParaHeads` (`max_values`: Some(600), `max_size`: Some(196), added: 1681, mode: `MaxEncodedLen`) /// Storage: `BridgeKusamaMessages::OutboundLanes` (r:1 w:1) - /// Proof: `BridgeKusamaMessages::OutboundLanes` (`max_values`: Some(1), `max_size`: Some(44), added: 539, mode: `MaxEncodedLen`) + /// Proof: `BridgeKusamaMessages::OutboundLanes` (`max_values`: None, `max_size`: Some(45), added: 2520, mode: `MaxEncodedLen`) /// Storage: UNKNOWN KEY `0x6e0a18b62a1de81c5f519181cc611e18` (r:1 w:0) /// Proof: UNKNOWN KEY `0x6e0a18b62a1de81c5f519181cc611e18` (r:1 w:0) /// Storage: `BridgeRelayers::RelayerRewards` (r:1 w:1) /// Proof: `BridgeRelayers::RelayerRewards` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`) + /// Storage: `XcmOverBridgeHubKusama::LaneToBridge` (r:1 w:0) + /// Proof: `XcmOverBridgeHubKusama::LaneToBridge` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`) + /// Storage: `XcmOverBridgeHubKusama::Bridges` (r:1 w:0) + /// Proof: `XcmOverBridgeHubKusama::Bridges` (`max_values`: None, `max_size`: Some(1889), added: 4364, mode: `MaxEncodedLen`) + /// Storage: `BridgeKusamaMessages::OutboundMessages` (r:0 w:2) + /// Proof: `BridgeKusamaMessages::OutboundMessages` (`max_values`: None, `max_size`: Some(65568), added: 68043, mode: `MaxEncodedLen`) fn receive_delivery_proof_for_two_messages_by_single_relayer() -> Weight { // Proof Size summary in bytes: - // Measured: `432` - // Estimated: `3897` - // Minimum execution time: 39_841_000 picoseconds. - Weight::from_parts(40_431_000, 0) - .saturating_add(Weight::from_parts(0, 3897)) - .saturating_add(T::DbWeight::get().reads(5)) - .saturating_add(T::DbWeight::get().writes(2)) + // Measured: `736` + // Estimated: `5354` + // Minimum execution time: 69_661_000 picoseconds. + Weight::from_parts(70_140_000, 0) + .saturating_add(Weight::from_parts(0, 5354)) + .saturating_add(T::DbWeight::get().reads(7)) + .saturating_add(T::DbWeight::get().writes(4)) } /// Storage: `BridgeKusamaMessages::PalletOperatingMode` (r:1 w:0) /// Proof: `BridgeKusamaMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`) /// Storage: `BridgeKusamaParachains::ImportedParaHeads` (r:1 w:0) /// Proof: `BridgeKusamaParachains::ImportedParaHeads` (`max_values`: Some(600), `max_size`: Some(196), added: 1681, mode: `MaxEncodedLen`) /// Storage: `BridgeKusamaMessages::OutboundLanes` (r:1 w:1) - /// Proof: `BridgeKusamaMessages::OutboundLanes` (`max_values`: Some(1), `max_size`: Some(44), added: 539, mode: `MaxEncodedLen`) + /// Proof: `BridgeKusamaMessages::OutboundLanes` (`max_values`: None, `max_size`: Some(45), added: 2520, mode: `MaxEncodedLen`) /// Storage: UNKNOWN KEY `0x6e0a18b62a1de81c5f519181cc611e18` (r:1 w:0) /// Proof: UNKNOWN KEY `0x6e0a18b62a1de81c5f519181cc611e18` (r:1 w:0) /// Storage: `BridgeRelayers::RelayerRewards` (r:2 w:2) /// Proof: `BridgeRelayers::RelayerRewards` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`) + /// Storage: `XcmOverBridgeHubKusama::LaneToBridge` (r:1 w:0) + /// Proof: `XcmOverBridgeHubKusama::LaneToBridge` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`) + /// Storage: `XcmOverBridgeHubKusama::Bridges` (r:1 w:0) + /// Proof: `XcmOverBridgeHubKusama::Bridges` (`max_values`: None, `max_size`: Some(1889), added: 4364, mode: `MaxEncodedLen`) + /// Storage: `BridgeKusamaMessages::OutboundMessages` (r:0 w:2) + /// Proof: `BridgeKusamaMessages::OutboundMessages` (`max_values`: None, `max_size`: Some(65568), added: 68043, mode: `MaxEncodedLen`) fn receive_delivery_proof_for_two_messages_by_two_relayers() -> Weight { // Proof Size summary in bytes: - // Measured: `432` + // Measured: `736` // Estimated: `6086` - // Minimum execution time: 45_101_000 picoseconds. - Weight::from_parts(45_661_000, 0) + // Minimum execution time: 74_821_000 picoseconds. + Weight::from_parts(75_841_000, 0) .saturating_add(Weight::from_parts(0, 6086)) - .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().writes(3)) + .saturating_add(T::DbWeight::get().reads(8)) + .saturating_add(T::DbWeight::get().writes(5)) } /// Storage: `BridgeKusamaMessages::PalletOperatingMode` (r:1 w:0) /// Proof: `BridgeKusamaMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`) /// Storage: `BridgeKusamaParachains::ImportedParaHeads` (r:1 w:0) - /// Proof: `BridgeKusamaParachains::ImportedParaHeads` (`max_values`: Some(64), `max_size`: Some(196), added: 1186, mode: `MaxEncodedLen`) + /// Proof: `BridgeKusamaParachains::ImportedParaHeads` (`max_values`: Some(600), `max_size`: Some(196), added: 1681, mode: `MaxEncodedLen`) /// Storage: `BridgeKusamaMessages::InboundLanes` (r:1 w:1) - /// Proof: `BridgeKusamaMessages::InboundLanes` (`max_values`: None, `max_size`: Some(49209), added: 51684, mode: `MaxEncodedLen`) + /// Proof: `BridgeKusamaMessages::InboundLanes` (`max_values`: None, `max_size`: Some(49180), added: 51655, mode: `MaxEncodedLen`) /// Storage: `XcmOverBridgeHubKusama::LaneToBridge` (r:1 w:0) - /// Proof: `XcmOverBridgeHubKusama::LaneToBridge` (`max_values`: None, `max_size`: Some(65), added: 2540, mode: `MaxEncodedLen`) + /// Proof: `XcmOverBridgeHubKusama::LaneToBridge` (`max_values`: None, `max_size`: Some(36), added: 2511, mode: `MaxEncodedLen`) /// Storage: `XcmOverBridgeHubKusama::Bridges` (r:1 w:0) - /// Proof: `XcmOverBridgeHubKusama::Bridges` (`max_values`: None, `max_size`: Some(1918), added: 4393, mode: `MaxEncodedLen`) + /// Proof: `XcmOverBridgeHubKusama::Bridges` (`max_values`: None, `max_size`: Some(1889), added: 4364, mode: `MaxEncodedLen`) + /// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:1) + /// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: Some(1282), added: 1777, mode: `MaxEncodedLen`) /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) /// Storage: `XcmpQueue::DeliveryFeeFactor` (r:1 w:0) /// Proof: `XcmpQueue::DeliveryFeeFactor` (`max_values`: None, `max_size`: Some(28), added: 2503, mode: `MaxEncodedLen`) /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) - /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) - /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `ParachainSystem::RelevantMessagingState` (r:1 w:0) /// Proof: `ParachainSystem::RelevantMessagingState` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `XcmpQueue::OutboundXcmpStatus` (r:1 w:1) - /// Proof: `XcmpQueue::OutboundXcmpStatus` (`max_values`: Some(1), `max_size`: Some(1282), added: 1777, mode: `MaxEncodedLen`) /// Storage: `XcmpQueue::OutboundXcmpMessages` (r:0 w:1) /// Proof: `XcmpQueue::OutboundXcmpMessages` (`max_values`: None, `max_size`: Some(105506), added: 107981, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 16384]`. fn receive_single_n_bytes_message_proof_with_dispatch(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `965` - // Estimated: `52674` - // Minimum execution time: 84_340_000 picoseconds. - Weight::from_parts(89_615_003, 0) - .saturating_add(Weight::from_parts(0, 52674)) - // Standard Error: 15 - .saturating_add(Weight::from_parts(7_574, 0).saturating_mul(n.into())) - .saturating_add(T::DbWeight::get().reads(12)) - .saturating_add(T::DbWeight::get().writes(4)) + // Measured: `1022` + // Estimated: `52645` + // Minimum execution time: 98_430_000 picoseconds. + Weight::from_parts(103_905_453, 0) + .saturating_add(Weight::from_parts(0, 52645)) + // Standard Error: 7 + .saturating_add(Weight::from_parts(7_422, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(10)) + .saturating_add(T::DbWeight::get().writes(3)) } } diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_bridge_relayers.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_bridge_relayers.rs index aa5986ee0f..fcc78658c3 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_bridge_relayers.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/pallet_bridge_relayers.rs @@ -17,7 +17,7 @@ //! Autogenerated weights for `pallet_bridge_relayers` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-14, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2025-01-04, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./bridge-hub-polkadot-chain-spec.json")`, DB CACHE: 1024 @@ -53,10 +53,10 @@ impl pallet_bridge_relayers::WeightInfo for WeightInfo< /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn claim_rewards() -> Weight { // Proof Size summary in bytes: - // Measured: `278` + // Measured: `205` // Estimated: `3593` - // Minimum execution time: 52_900_000 picoseconds. - Weight::from_parts(53_890_000, 0) + // Minimum execution time: 61_060_000 picoseconds. + Weight::from_parts(61_590_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -69,10 +69,10 @@ impl pallet_bridge_relayers::WeightInfo for WeightInfo< /// Proof: `Balances::Reserves` (`max_values`: None, `max_size`: Some(1249), added: 3724, mode: `MaxEncodedLen`) fn register() -> Weight { // Proof Size summary in bytes: - // Measured: `115` + // Measured: `42` // Estimated: `4714` - // Minimum execution time: 29_010_000 picoseconds. - Weight::from_parts(29_490_000, 0) + // Minimum execution time: 33_050_000 picoseconds. + Weight::from_parts(33_500_000, 0) .saturating_add(Weight::from_parts(0, 4714)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) @@ -83,10 +83,10 @@ impl pallet_bridge_relayers::WeightInfo for WeightInfo< /// Proof: `Balances::Reserves` (`max_values`: None, `max_size`: Some(1249), added: 3724, mode: `MaxEncodedLen`) fn deregister() -> Weight { // Proof Size summary in bytes: - // Measured: `231` + // Measured: `158` // Estimated: `4714` - // Minimum execution time: 29_811_000 picoseconds. - Weight::from_parts(30_400_000, 0) + // Minimum execution time: 34_041_000 picoseconds. + Weight::from_parts(34_710_000, 0) .saturating_add(Weight::from_parts(0, 4714)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -99,10 +99,10 @@ impl pallet_bridge_relayers::WeightInfo for WeightInfo< /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn slash_and_deregister() -> Weight { // Proof Size summary in bytes: - // Measured: `334` + // Measured: `261` // Estimated: `4714` - // Minimum execution time: 32_641_000 picoseconds. - Weight::from_parts(33_221_000, 0) + // Minimum execution time: 38_080_000 picoseconds. + Weight::from_parts(38_470_000, 0) .saturating_add(Weight::from_parts(0, 4714)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) @@ -111,10 +111,10 @@ impl pallet_bridge_relayers::WeightInfo for WeightInfo< /// Proof: `BridgeRelayers::RelayerRewards` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`) fn register_relayer_reward() -> Weight { // Proof Size summary in bytes: - // Measured: `76` + // Measured: `3` // Estimated: `3538` - // Minimum execution time: 6_700_000 picoseconds. - Weight::from_parts(6_880_000, 0) + // Minimum execution time: 8_380_000 picoseconds. + Weight::from_parts(8_640_000, 0) .saturating_add(Weight::from_parts(0, 3538)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/xcm/pallet_xcm_benchmarks_generic.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/xcm/pallet_xcm_benchmarks_generic.rs index 4205afc0a0..89bb9721fd 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/xcm/pallet_xcm_benchmarks_generic.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/src/weights/xcm/pallet_xcm_benchmarks_generic.rs @@ -17,7 +17,7 @@ //! Autogenerated weights for `pallet_xcm_benchmarks::generic` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2024-08-14, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2025-01-04, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `ggwpez-ref-hw`, CPU: `AMD EPYC 7232P 8-Core Processor` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("./bridge-hub-polkadot-chain-spec.json")`, DB CACHE: 1024 @@ -53,10 +53,6 @@ impl WeightInfo { /// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) - /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) - /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `System::Account` (r:2 w:1) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) @@ -65,87 +61,87 @@ impl WeightInfo { /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) pub(crate) fn report_holding() -> Weight { // Proof Size summary in bytes: - // Measured: `208` + // Measured: `176` // Estimated: `6196` - // Minimum execution time: 58_621_000 picoseconds. - Weight::from_parts(59_751_000, 0) + // Minimum execution time: 66_301_000 picoseconds. + Weight::from_parts(67_010_000, 0) .saturating_add(Weight::from_parts(0, 6196)) - .saturating_add(T::DbWeight::get().reads(9)) - .saturating_add(T::DbWeight::get().writes(3)) + .saturating_add(T::DbWeight::get().reads(7)) + .saturating_add(T::DbWeight::get().writes(2)) } pub(crate) fn buy_execution() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_230_000 picoseconds. - Weight::from_parts(1_310_000, 0) + // Minimum execution time: 1_380_000 picoseconds. + Weight::from_parts(1_460_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// Storage: `PolkadotXcm::Queries` (r:1 w:0) /// Proof: `PolkadotXcm::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`) pub(crate) fn query_response() -> Weight { // Proof Size summary in bytes: - // Measured: `32` - // Estimated: `3497` - // Minimum execution time: 7_760_000 picoseconds. - Weight::from_parts(8_040_000, 0) - .saturating_add(Weight::from_parts(0, 3497)) + // Measured: `0` + // Estimated: `3465` + // Minimum execution time: 8_130_000 picoseconds. + Weight::from_parts(8_380_000, 0) + .saturating_add(Weight::from_parts(0, 3465)) .saturating_add(T::DbWeight::get().reads(1)) } pub(crate) fn transact() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 8_530_000 picoseconds. - Weight::from_parts(8_820_000, 0) + // Minimum execution time: 10_050_000 picoseconds. + Weight::from_parts(10_470_000, 0) .saturating_add(Weight::from_parts(0, 0)) } pub(crate) fn refund_surplus() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_120_000 picoseconds. - Weight::from_parts(2_270_000, 0) + // Minimum execution time: 2_380_000 picoseconds. + Weight::from_parts(2_500_000, 0) .saturating_add(Weight::from_parts(0, 0)) } pub(crate) fn set_error_handler() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_280_000 picoseconds. - Weight::from_parts(1_330_000, 0) + // Minimum execution time: 1_380_000 picoseconds. + Weight::from_parts(1_450_000, 0) .saturating_add(Weight::from_parts(0, 0)) } pub(crate) fn set_appendix() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_270_000 picoseconds. - Weight::from_parts(1_320_000, 0) + // Minimum execution time: 1_420_000 picoseconds. + Weight::from_parts(1_470_000, 0) .saturating_add(Weight::from_parts(0, 0)) } pub(crate) fn clear_error() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_220_000 picoseconds. - Weight::from_parts(1_280_000, 0) + // Minimum execution time: 1_360_000 picoseconds. + Weight::from_parts(1_420_000, 0) .saturating_add(Weight::from_parts(0, 0)) } pub(crate) fn descend_origin() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_290_000 picoseconds. - Weight::from_parts(1_350_000, 0) + // Minimum execution time: 1_430_000 picoseconds. + Weight::from_parts(1_500_000, 0) .saturating_add(Weight::from_parts(0, 0)) } pub(crate) fn clear_origin() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_240_000 picoseconds. - Weight::from_parts(1_270_000, 0) + // Minimum execution time: 1_340_000 picoseconds. + Weight::from_parts(1_430_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) @@ -154,10 +150,6 @@ impl WeightInfo { /// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) - /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) - /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `System::Account` (r:2 w:1) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) @@ -166,23 +158,23 @@ impl WeightInfo { /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) pub(crate) fn report_error() -> Weight { // Proof Size summary in bytes: - // Measured: `208` + // Measured: `176` // Estimated: `6196` - // Minimum execution time: 54_700_000 picoseconds. - Weight::from_parts(55_340_000, 0) + // Minimum execution time: 62_061_000 picoseconds. + Weight::from_parts(62_621_000, 0) .saturating_add(Weight::from_parts(0, 6196)) - .saturating_add(T::DbWeight::get().reads(9)) - .saturating_add(T::DbWeight::get().writes(3)) + .saturating_add(T::DbWeight::get().reads(7)) + .saturating_add(T::DbWeight::get().writes(2)) } /// Storage: `PolkadotXcm::AssetTraps` (r:1 w:1) /// Proof: `PolkadotXcm::AssetTraps` (`max_values`: None, `max_size`: None, mode: `Measured`) pub(crate) fn claim_asset() -> Weight { // Proof Size summary in bytes: - // Measured: `90` - // Estimated: `3555` - // Minimum execution time: 11_300_000 picoseconds. - Weight::from_parts(11_580_000, 0) - .saturating_add(Weight::from_parts(0, 3555)) + // Measured: `24` + // Estimated: `3489` + // Minimum execution time: 12_410_000 picoseconds. + Weight::from_parts(12_660_000, 0) + .saturating_add(Weight::from_parts(0, 3489)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -190,8 +182,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_240_000 picoseconds. - Weight::from_parts(1_270_000, 0) + // Minimum execution time: 1_340_000 picoseconds. + Weight::from_parts(1_440_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// Storage: `PolkadotXcm::VersionNotifyTargets` (r:1 w:1) @@ -200,23 +192,19 @@ impl WeightInfo { /// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) - /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) - /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) /// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1) /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) pub(crate) fn subscribe_version() -> Weight { // Proof Size summary in bytes: - // Measured: `75` - // Estimated: `3540` - // Minimum execution time: 25_720_000 picoseconds. - Weight::from_parts(26_510_000, 0) - .saturating_add(Weight::from_parts(0, 3540)) - .saturating_add(T::DbWeight::get().reads(7)) - .saturating_add(T::DbWeight::get().writes(3)) + // Measured: `43` + // Estimated: `3508` + // Minimum execution time: 29_131_000 picoseconds. + Weight::from_parts(29_740_000, 0) + .saturating_add(Weight::from_parts(0, 3508)) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(2)) } /// Storage: `PolkadotXcm::VersionNotifyTargets` (r:0 w:1) /// Proof: `PolkadotXcm::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`) @@ -224,8 +212,8 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_610_000 picoseconds. - Weight::from_parts(3_730_000, 0) + // Minimum execution time: 4_140_000 picoseconds. + Weight::from_parts(4_320_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -233,40 +221,40 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_730_000 picoseconds. - Weight::from_parts(1_820_000, 0) + // Minimum execution time: 2_030_000 picoseconds. + Weight::from_parts(2_150_000, 0) .saturating_add(Weight::from_parts(0, 0)) } pub(crate) fn expect_asset() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_300_000 picoseconds. - Weight::from_parts(1_410_000, 0) + // Minimum execution time: 1_540_000 picoseconds. + Weight::from_parts(1_600_000, 0) .saturating_add(Weight::from_parts(0, 0)) } pub(crate) fn expect_origin() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_240_000 picoseconds. - Weight::from_parts(1_320_000, 0) + // Minimum execution time: 1_350_000 picoseconds. + Weight::from_parts(1_450_000, 0) .saturating_add(Weight::from_parts(0, 0)) } pub(crate) fn expect_error() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_240_000 picoseconds. - Weight::from_parts(1_300_000, 0) + // Minimum execution time: 1_370_000 picoseconds. + Weight::from_parts(1_410_000, 0) .saturating_add(Weight::from_parts(0, 0)) } pub(crate) fn expect_transact_status() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_470_000 picoseconds. - Weight::from_parts(1_540_000, 0) + // Minimum execution time: 1_600_000 picoseconds. + Weight::from_parts(1_680_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) @@ -275,10 +263,6 @@ impl WeightInfo { /// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) - /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) - /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `System::Account` (r:2 w:1) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) @@ -287,20 +271,20 @@ impl WeightInfo { /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) pub(crate) fn query_pallet() -> Weight { // Proof Size summary in bytes: - // Measured: `208` + // Measured: `176` // Estimated: `6196` - // Minimum execution time: 59_871_000 picoseconds. - Weight::from_parts(61_230_000, 0) + // Minimum execution time: 67_980_000 picoseconds. + Weight::from_parts(68_651_000, 0) .saturating_add(Weight::from_parts(0, 6196)) - .saturating_add(T::DbWeight::get().reads(9)) - .saturating_add(T::DbWeight::get().writes(3)) + .saturating_add(T::DbWeight::get().reads(7)) + .saturating_add(T::DbWeight::get().writes(2)) } pub(crate) fn expect_pallet() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_030_000 picoseconds. - Weight::from_parts(5_110_000, 0) + // Minimum execution time: 5_800_000 picoseconds. + Weight::from_parts(5_940_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) @@ -309,10 +293,6 @@ impl WeightInfo { /// Proof: `ParachainSystem::UpwardDeliveryFeeFactor` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `PolkadotXcm::SupportedVersion` (r:1 w:0) /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::VersionDiscoveryQueue` (r:1 w:1) - /// Proof: `PolkadotXcm::VersionDiscoveryQueue` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `PolkadotXcm::SafeXcmVersion` (r:1 w:0) - /// Proof: `PolkadotXcm::SafeXcmVersion` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// Storage: `System::Account` (r:2 w:1) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0) @@ -321,60 +301,60 @@ impl WeightInfo { /// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) pub(crate) fn report_transact_status() -> Weight { // Proof Size summary in bytes: - // Measured: `208` + // Measured: `176` // Estimated: `6196` - // Minimum execution time: 54_591_000 picoseconds. - Weight::from_parts(55_350_000, 0) + // Minimum execution time: 62_230_000 picoseconds. + Weight::from_parts(62_791_000, 0) .saturating_add(Weight::from_parts(0, 6196)) - .saturating_add(T::DbWeight::get().reads(9)) - .saturating_add(T::DbWeight::get().writes(3)) + .saturating_add(T::DbWeight::get().reads(7)) + .saturating_add(T::DbWeight::get().writes(2)) } pub(crate) fn clear_transact_status() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_260_000 picoseconds. - Weight::from_parts(1_350_000, 0) + // Minimum execution time: 1_420_000 picoseconds. + Weight::from_parts(1_510_000, 0) .saturating_add(Weight::from_parts(0, 0)) } pub(crate) fn set_topic() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_220_000 picoseconds. - Weight::from_parts(1_260_000, 0) + // Minimum execution time: 1_290_000 picoseconds. + Weight::from_parts(1_390_000, 0) .saturating_add(Weight::from_parts(0, 0)) } pub(crate) fn clear_topic() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_210_000 picoseconds. - Weight::from_parts(1_270_000, 0) + // Minimum execution time: 1_360_000 picoseconds. + Weight::from_parts(1_420_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// Storage: `ParachainInfo::ParachainId` (r:1 w:0) /// Proof: `ParachainInfo::ParachainId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `XcmOverBridgeHubKusama::Bridges` (r:1 w:0) + /// Proof: `XcmOverBridgeHubKusama::Bridges` (`max_values`: None, `max_size`: Some(1889), added: 4364, mode: `MaxEncodedLen`) /// Storage: `PolkadotXcm::SupportedVersion` (r:2 w:0) /// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `BridgeKusamaMessages::PalletOperatingMode` (r:1 w:0) /// Proof: `BridgeKusamaMessages::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`) /// Storage: `BridgeKusamaMessages::OutboundLanes` (r:1 w:1) - /// Proof: `BridgeKusamaMessages::OutboundLanes` (`max_values`: Some(1), `max_size`: Some(44), added: 539, mode: `MaxEncodedLen`) - /// Storage: `BridgeKusamaMessages::OutboundLanesCongestedSignals` (r:1 w:0) - /// Proof: `BridgeKusamaMessages::OutboundLanesCongestedSignals` (`max_values`: Some(1), `max_size`: Some(21), added: 516, mode: `MaxEncodedLen`) + /// Proof: `BridgeKusamaMessages::OutboundLanes` (`max_values`: None, `max_size`: Some(45), added: 2520, mode: `MaxEncodedLen`) /// Storage: `BridgeKusamaMessages::OutboundMessages` (r:0 w:1) - /// Proof: `BridgeKusamaMessages::OutboundMessages` (`max_values`: None, `max_size`: Some(2621472), added: 2623947, mode: `MaxEncodedLen`) + /// Proof: `BridgeKusamaMessages::OutboundMessages` (`max_values`: None, `max_size`: Some(65568), added: 68043, mode: `MaxEncodedLen`) /// The range of component `x` is `[1, 1000]`. pub(crate) fn export_message(x: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `227` - // Estimated: `6167` - // Minimum execution time: 45_660_000 picoseconds. - Weight::from_parts(46_626_263, 0) - .saturating_add(Weight::from_parts(0, 6167)) - // Standard Error: 37 - .saturating_add(Weight::from_parts(51_861, 0).saturating_mul(x.into())) + // Measured: `473` + // Estimated: `6413` + // Minimum execution time: 66_221_000 picoseconds. + Weight::from_parts(66_556_981, 0) + .saturating_add(Weight::from_parts(0, 6413)) + // Standard Error: 334 + .saturating_add(Weight::from_parts(53_743, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -382,16 +362,16 @@ impl WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_200_000 picoseconds. - Weight::from_parts(1_250_000, 0) + // Minimum execution time: 1_370_000 picoseconds. + Weight::from_parts(1_440_000, 0) .saturating_add(Weight::from_parts(0, 0)) } pub(crate) fn unpaid_execution() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_270_000 picoseconds. - Weight::from_parts(1_300_000, 0) + // Minimum execution time: 1_390_000 picoseconds. + Weight::from_parts(1_490_000, 0) .saturating_add(Weight::from_parts(0, 0)) } } From cc9763e0df0194f5f63204cf13ee559a48207513 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Sun, 5 Jan 2025 15:57:13 +0100 Subject: [PATCH 13/15] Apply suggestions from code review --- .../bridge-hubs/bridge-hub-kusama/primitives/src/lib.rs | 5 +++-- .../bridge-hubs/bridge-hub-polkadot/primitives/src/lib.rs | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) 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 1e4fc0e77f..b082608727 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 @@ -71,8 +71,9 @@ impl ChainWithMessages for BridgeHubKusama { const MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX: MessageNonce = MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX; /// This constant limits the maximum number of messages in `receive_messages_proof`. - /// We need to adjust it from 4096 to 2024 due to the actual weights identified by `check_message_lane_weights`. - /// A higher value can be set once we switch `max_extrinsic_weight` to `BlockWeightsForAsyncBacking`. + /// We need to adjust it from 4096 to 2024 due to the actual weights identified by + /// `check_message_lane_weights`. A higher value can be set once we switch + /// `max_extrinsic_weight` to `BlockWeightsForAsyncBacking`. const MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX: MessageNonce = 2024; } 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 43d58b114f..1fce65e2fc 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 @@ -68,8 +68,9 @@ impl ChainWithMessages for BridgeHubPolkadot { const MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX: MessageNonce = MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX; /// This constant limits the maximum number of messages in `receive_messages_proof`. - /// We need to adjust it from 4096 to 2024 due to the actual weights identified by `check_message_lane_weights`. - /// A higher value can be set once we switch `max_extrinsic_weight` to `BlockWeightsForAsyncBacking`. + /// We need to adjust it from 4096 to 2024 due to the actual weights identified by + /// `check_message_lane_weights`. A higher value can be set once we switch + /// `max_extrinsic_weight` to `BlockWeightsForAsyncBacking`. const MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX: MessageNonce = 2024; } From c84c364726639a20b8b324395e7ae5e3899efc6b Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Sun, 5 Jan 2025 21:07:51 +0100 Subject: [PATCH 14/15] Last nit --- .../bridge-hubs/bridge-hub-kusama/primitives/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 b082608727..14d131f184 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 @@ -103,7 +103,7 @@ frame_support::parameter_types! { /// The XCM fee that is paid for executing XCM program (with `ExportMessage` instruction) at the Kusama /// BridgeHub. /// (initially was calculated by test `BridgeHubKusama::can_calculate_weight_for_paid_export_message_with_reserve_transfer` + `33%`) - pub const BridgeHubKusamaBaseXcmFeeInKsms: u128 = 590_387_000; + pub const BridgeHubKusamaBaseXcmFeeInKsms: u128 = 601_115_666; /// 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%`) From c6dade6a2c7ea023673ea4c11a748e053fdcb024 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Mon, 6 Jan 2025 15:08:32 +0100 Subject: [PATCH 15/15] Removed unused consts --- .../src/bridge_to_polkadot_config.rs | 21 ------------------- .../src/bridge_to_kusama_config.rs | 21 ------------------- 2 files changed, 42 deletions(-) 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 d617017ca5..6b595f523b 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 @@ -137,10 +137,6 @@ parameter_types! { /// Minimal period of relayer registration. Roughly, it is the 1 hour of real time. pub const RelayerStakeLease: u32 = 300; - // see the `FEE_BOOST_PER_RELAY_HEADER` constant get the meaning of this value - pub PriorityBoostPerRelayHeader: u64 = 22_005_372_405_372; - // see the `FEE_BOOST_PER_PARACHAIN_HEADER` constant get the meaning of this value - pub PriorityBoostPerParachainHeader: u64 = 920_224_664_224_664; // see the `FEE_BOOST_PER_MESSAGE` constant to get the meaning of this value pub PriorityBoostPerMessage: u64 = 182_044_444_444_444; } @@ -365,10 +361,6 @@ 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() { @@ -405,19 +397,6 @@ mod tests { }, }); - pallet_bridge_relayers::extension::per_relay_header::ensure_priority_boost_is_sane::< - Runtime, - BridgeGrandpaPolkadotInstance, - PriorityBoostPerRelayHeader, - >(FEE_BOOST_PER_RELAY_HEADER); - - pallet_bridge_relayers::extension::per_parachain_header::ensure_priority_boost_is_sane::< - Runtime, - WithBridgeHubPolkadotMessagesInstance, - bp_bridge_hub_polkadot::BridgeHubPolkadot, - PriorityBoostPerParachainHeader, - >(FEE_BOOST_PER_PARACHAIN_HEADER); - pallet_bridge_relayers::extension::per_message::ensure_priority_boost_is_sane::< Runtime, WithBridgeHubPolkadotMessagesInstance, 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 ed20540e6b..a1dd807558 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 @@ -138,10 +138,6 @@ parameter_types! { /// Minimal period of relayer registration. Roughly, it is the 1 hour of real time. pub const RelayerStakeLease: u32 = 300; - // see the `FEE_BOOST_PER_RELAY_HEADER` constant get the meaning of this value - pub PriorityBoostPerRelayHeader: u64 = 220_053_724_053; - // see the `FEE_BOOST_PER_PARACHAIN_HEADER` constant get the meaning of this value - pub PriorityBoostPerParachainHeader: u64 = 9_182_241_758_241; // see the `FEE_BOOST_PER_MESSAGE` constant to get the meaning of this value pub PriorityBoostPerMessage: u64 = 1_820_444_444_444; } @@ -365,10 +361,6 @@ 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() { @@ -405,19 +397,6 @@ mod tests { }, }); - pallet_bridge_relayers::extension::per_relay_header::ensure_priority_boost_is_sane::< - Runtime, - BridgeGrandpaKusamaInstance, - PriorityBoostPerRelayHeader, - >(FEE_BOOST_PER_RELAY_HEADER); - - pallet_bridge_relayers::extension::per_parachain_header::ensure_priority_boost_is_sane::< - Runtime, - WithBridgeHubKusamaMessagesInstance, - bp_bridge_hub_kusama::BridgeHubKusama, - PriorityBoostPerParachainHeader, - >(FEE_BOOST_PER_PARACHAIN_HEADER); - pallet_bridge_relayers::extension::per_message::ensure_priority_boost_is_sane::< Runtime, WithBridgeHubKusamaMessagesInstance,