diff --git a/.github/workflows/publish_draft_releases.yml b/.github/workflows/publish_draft_releases.yml index 0c42e2527..bcc5ce11f 100644 --- a/.github/workflows/publish_draft_releases.yml +++ b/.github/workflows/publish_draft_releases.yml @@ -232,7 +232,7 @@ jobs: if: ${{ needs.check-for-runtime-upgrade.outputs.do-versions-match == 'false' }} name: fetch and chmod polkadot run: | - curl -L -o $HOME/.local/bin/polkadot https://github.com/paritytech/polkadot/releases/download/v0.9.16/polkadot + curl -L -o $HOME/.local/bin/polkadot https://github.com/paritytech/polkadot/releases/download/v0.9.18/polkadot chmod +x $HOME/.local/bin/polkadot ls -ahl $HOME/.local/bin/ - @@ -441,7 +441,7 @@ jobs: - name: fetch and chmod polkadot run: | - curl -L -o $HOME/.local/bin/polkadot https://github.com/paritytech/polkadot/releases/download/v0.9.16/polkadot + curl -L -o $HOME/.local/bin/polkadot https://github.com/paritytech/polkadot/releases/download/v0.9.18/polkadot chmod +x $HOME/.local/bin/polkadot ls -ahl $HOME/.local/bin/ - diff --git a/CHANGELOG.md b/CHANGELOG.md index e3a27a050..8cc3df27e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ ### Features ### Improvements +[\#481](https://github.com/Manta-Network/Manta/pull/481) Update upstream dependencies to v0.9.18. ### Bug fixes diff --git a/Cargo.lock b/Cargo.lock index f40468942..73a11370f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -460,7 +460,6 @@ dependencies = [ "async-global-executor", "async-io", "async-lock", - "async-process", "crossbeam-utils", "futures-channel", "futures-core", @@ -582,6 +581,20 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +[[package]] +name = "backoff" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b62ddb9cb1ec0a098ad4bbf9344d0713fa193ae1a80af55febcff2627b6a00c1" +dependencies = [ + "futures-core", + "getrandom 0.2.6", + "instant", + "pin-project-lite 0.2.8", + "rand 0.8.5", + "tokio", +] + [[package]] name = "backtrace" version = "0.3.64" @@ -603,6 +616,12 @@ version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4521f3e3d031370679b3b140beb36dfe4801b09ac77e30c61941f97df3ef28b" +[[package]] +name = "base16ct" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "349a06037c7bf932dd7e7d1f653678b2038b9ad46a74102f1fc7bd7872678cce" + [[package]] name = "base58" version = "0.2.0" @@ -615,6 +634,12 @@ version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" +[[package]] +name = "base64ct" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dea908e7347a8c64e378c17e30ef880ad73e3b4498346b055c2c00ea342f3179" + [[package]] name = "beef" version = "0.5.1" @@ -627,14 +652,15 @@ dependencies = [ [[package]] name = "beefy-gadget" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "beefy-primitives", "fnv", "futures 0.3.21", + "hex", "log", "parity-scale-codec", - "parking_lot 0.11.2", + "parking_lot 0.12.0", "sc-chain-spec", "sc-client-api", "sc-keystore", @@ -656,11 +682,10 @@ dependencies = [ [[package]] name = "beefy-gadget-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "beefy-gadget", "beefy-primitives", - "derive_more", "futures 0.3.21", "jsonrpc-core", "jsonrpc-core-client", @@ -668,7 +693,7 @@ dependencies = [ "jsonrpc-pubsub", "log", "parity-scale-codec", - "parking_lot 0.11.2", + "parking_lot 0.12.0", "sc-rpc", "sc-utils", "serde", @@ -680,12 +705,12 @@ dependencies = [ [[package]] name = "beefy-merkle-tree" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" [[package]] name = "beefy-primitives" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "parity-scale-codec", "scale-info", @@ -744,9 +769,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitvec" -version = "0.20.4" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7774144344a4faa177370406a7ff5f1da24303817368584c6206c8303eb07848" +checksum = "1489fcb93a5bb47da0462ca93ad252ad6af2145cce58d10d46a83931ba9f016b" dependencies = [ "funty", "radium", @@ -907,7 +932,7 @@ dependencies = [ [[package]] name = "bp-header-chain" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111" dependencies = [ "finality-grandpa", "frame-support", @@ -923,7 +948,7 @@ dependencies = [ [[package]] name = "bp-message-dispatch" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111" dependencies = [ "bp-runtime", "frame-support", @@ -935,7 +960,7 @@ dependencies = [ [[package]] name = "bp-messages" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111" dependencies = [ "bitvec", "bp-runtime", @@ -951,7 +976,7 @@ dependencies = [ [[package]] name = "bp-polkadot-core" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111" dependencies = [ "bp-messages", "bp-runtime", @@ -969,7 +994,7 @@ dependencies = [ [[package]] name = "bp-rococo" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111" dependencies = [ "bp-messages", "bp-polkadot-core", @@ -986,7 +1011,7 @@ dependencies = [ [[package]] name = "bp-runtime" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111" dependencies = [ "frame-support", "hash-db", @@ -1004,7 +1029,7 @@ dependencies = [ [[package]] name = "bp-test-utils" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111" dependencies = [ "bp-header-chain", "ed25519-dalek", @@ -1019,7 +1044,7 @@ dependencies = [ [[package]] name = "bp-wococo" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111" dependencies = [ "bp-messages", "bp-polkadot-core", @@ -1034,7 +1059,7 @@ dependencies = [ [[package]] name = "bridge-runtime-common" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111" dependencies = [ "bp-message-dispatch", "bp-messages", @@ -1121,6 +1146,17 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c4872d67bab6358e59559027aa3b9157c53d9358c51423c17554809a8858e0f8" +[[package]] +name = "bzip2-sys" +version = "0.1.11+1.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "736a955f3fa7875102d57c82b8cac37ec45224a07fd32d58f9f7a186b6cd4cdc" +dependencies = [ + "cc", + "libc", + "pkg-config", +] + [[package]] name = "cache-padded" version = "1.2.0" @@ -1152,6 +1188,7 @@ dependencies = [ "log", "manta-collator-selection", "manta-primitives", + "orml-traits", "orml-xtokens", "pallet-asset-manager", "pallet-assets", @@ -1380,22 +1417,39 @@ version = "2.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c" dependencies = [ - "ansi_term", - "atty", "bitflags", - "strsim", - "textwrap", + "textwrap 0.11.0", "unicode-width", - "vec_map", ] [[package]] -name = "cloudabi" -version = "0.0.3" +name = "clap" +version = "3.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" +checksum = "71c47df61d9e16dc010b55dba1952a57d8c215dbb533fd13cdd13369aac73b1c" dependencies = [ + "atty", "bitflags", + "clap_derive", + "indexmap", + "lazy_static", + "os_str_bytes", + "strsim", + "termcolor", + "textwrap 0.15.0", +] + +[[package]] +name = "clap_derive" +version = "3.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3aab4734e083b809aaf5794e14e756d1c798d2c69c7f7de7a09a2f5214993c1" +dependencies = [ + "heck 0.4.0", + "proc-macro-error", + "proc-macro2", + "quote", + "syn", ] [[package]] @@ -1407,6 +1461,12 @@ dependencies = [ "cache-padded", ] +[[package]] +name = "const-oid" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4c78c047431fee22c1a7bb92e00ad095a02a983affe4d8a72e2a2c62c1b94f3" + [[package]] name = "constant_time_eq" version = "0.1.5" @@ -1568,7 +1628,7 @@ checksum = "1604dafd25fba2fe2d5895a9da139f8dc9b319a5fe5354ca137cbbce4e178d10" dependencies = [ "atty", "cast", - "clap", + "clap 2.34.0", "criterion-plot", "csv", "itertools", @@ -1647,6 +1707,18 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" +[[package]] +name = "crypto-bigint" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03c6a1d5fa1de37e071642dfa44ec552ca5b299adb128fab16138e24b548fd21" +dependencies = [ + "generic-array 0.14.5", + "rand_core 0.6.3", + "subtle", + "zeroize", +] + [[package]] name = "crypto-common" version = "0.1.3" @@ -1705,7 +1777,7 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c1a816186fa68d9e426e3cb4ae4dff1fcd8e4a2c34b781bf7a822574a0d0aac8" dependencies = [ - "sct", + "sct 0.6.1", ] [[package]] @@ -1741,17 +1813,18 @@ dependencies = [ [[package]] name = "cumulus-client-cli" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.16#86f76c5619c64d1300315612695ad4b4fcd0f562" +source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.18#b1e91afb7421309b203d7627b736d9bcf58260eb" dependencies = [ + "clap 3.1.8", "sc-cli", "sc-service", - "structopt", + "url 2.2.2", ] [[package]] name = "cumulus-client-collator" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.16#86f76c5619c64d1300315612695ad4b4fcd0f562" +source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.18#b1e91afb7421309b203d7627b736d9bcf58260eb" dependencies = [ "cumulus-client-consensus-common", "cumulus-client-network", @@ -1759,7 +1832,7 @@ dependencies = [ "cumulus-relay-chain-interface", "futures 0.3.21", "parity-scale-codec", - "parking_lot 0.10.2", + "parking_lot 0.12.0", "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-overseer", @@ -1775,7 +1848,7 @@ dependencies = [ [[package]] name = "cumulus-client-consensus-aura" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.16#86f76c5619c64d1300315612695ad4b4fcd0f562" +source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.18#b1e91afb7421309b203d7627b736d9bcf58260eb" dependencies = [ "async-trait", "cumulus-client-consensus-common", @@ -1804,7 +1877,7 @@ dependencies = [ [[package]] name = "cumulus-client-consensus-common" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.16#86f76c5619c64d1300315612695ad4b4fcd0f562" +source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.18#b1e91afb7421309b203d7627b736d9bcf58260eb" dependencies = [ "async-trait", "cumulus-relay-chain-interface", @@ -1825,14 +1898,14 @@ dependencies = [ [[package]] name = "cumulus-client-consensus-relay-chain" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.16#86f76c5619c64d1300315612695ad4b4fcd0f562" +source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.18#b1e91afb7421309b203d7627b736d9bcf58260eb" dependencies = [ "async-trait", "cumulus-client-consensus-common", "cumulus-primitives-core", "cumulus-relay-chain-interface", "futures 0.3.21", - "parking_lot 0.10.2", + "parking_lot 0.12.0", "sc-client-api", "sc-consensus", "sp-api", @@ -1849,7 +1922,7 @@ dependencies = [ [[package]] name = "cumulus-client-network" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.16#86f76c5619c64d1300315612695ad4b4fcd0f562" +source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.18#b1e91afb7421309b203d7627b736d9bcf58260eb" dependencies = [ "async-trait", "cumulus-relay-chain-interface", @@ -1857,7 +1930,7 @@ dependencies = [ "futures 0.3.21", "futures-timer", "parity-scale-codec", - "parking_lot 0.11.2", + "parking_lot 0.12.0", "polkadot-node-primitives", "polkadot-parachain", "polkadot-primitives", @@ -1874,7 +1947,7 @@ dependencies = [ [[package]] name = "cumulus-client-pov-recovery" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.16#86f76c5619c64d1300315612695ad4b4fcd0f562" +source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.18#b1e91afb7421309b203d7627b736d9bcf58260eb" dependencies = [ "cumulus-primitives-core", "cumulus-relay-chain-interface", @@ -1898,15 +1971,16 @@ dependencies = [ [[package]] name = "cumulus-client-service" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.16#86f76c5619c64d1300315612695ad4b4fcd0f562" +source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.18#b1e91afb7421309b203d7627b736d9bcf58260eb" dependencies = [ + "cumulus-client-cli", "cumulus-client-collator", "cumulus-client-consensus-common", "cumulus-client-pov-recovery", "cumulus-primitives-core", "cumulus-relay-chain-interface", "parity-scale-codec", - "parking_lot 0.10.2", + "parking_lot 0.12.0", "polkadot-overseer", "polkadot-primitives", "sc-chain-spec", @@ -1927,7 +2001,7 @@ dependencies = [ [[package]] name = "cumulus-pallet-aura-ext" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.16#86f76c5619c64d1300315612695ad4b4fcd0f562" +source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.18#b1e91afb7421309b203d7627b736d9bcf58260eb" dependencies = [ "frame-executive", "frame-support", @@ -1945,7 +2019,7 @@ dependencies = [ [[package]] name = "cumulus-pallet-dmp-queue" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.16#86f76c5619c64d1300315612695ad4b4fcd0f562" +source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.18#b1e91afb7421309b203d7627b736d9bcf58260eb" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -1963,7 +2037,7 @@ dependencies = [ [[package]] name = "cumulus-pallet-parachain-system" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.16#86f76c5619c64d1300315612695ad4b4fcd0f562" +source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.18#b1e91afb7421309b203d7627b736d9bcf58260eb" dependencies = [ "cumulus-pallet-parachain-system-proc-macro", "cumulus-primitives-core", @@ -1993,7 +2067,7 @@ dependencies = [ [[package]] name = "cumulus-pallet-parachain-system-proc-macro" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.16#86f76c5619c64d1300315612695ad4b4fcd0f562" +source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.18#b1e91afb7421309b203d7627b736d9bcf58260eb" dependencies = [ "proc-macro-crate 1.1.3", "proc-macro2", @@ -2004,7 +2078,7 @@ dependencies = [ [[package]] name = "cumulus-pallet-session-benchmarking" version = "3.0.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.16#86f76c5619c64d1300315612695ad4b4fcd0f562" +source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.18#b1e91afb7421309b203d7627b736d9bcf58260eb" dependencies = [ "frame-benchmarking", "frame-support", @@ -2018,7 +2092,7 @@ dependencies = [ [[package]] name = "cumulus-pallet-xcm" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.16#86f76c5619c64d1300315612695ad4b4fcd0f562" +source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.18#b1e91afb7421309b203d7627b736d9bcf58260eb" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -2035,7 +2109,7 @@ dependencies = [ [[package]] name = "cumulus-pallet-xcmp-queue" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.16#86f76c5619c64d1300315612695ad4b4fcd0f562" +source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.18#b1e91afb7421309b203d7627b736d9bcf58260eb" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -2053,7 +2127,7 @@ dependencies = [ [[package]] name = "cumulus-primitives-core" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.16#86f76c5619c64d1300315612695ad4b4fcd0f562" +source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.18#b1e91afb7421309b203d7627b736d9bcf58260eb" dependencies = [ "frame-support", "parity-scale-codec", @@ -2069,7 +2143,7 @@ dependencies = [ [[package]] name = "cumulus-primitives-parachain-inherent" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.16#86f76c5619c64d1300315612695ad4b4fcd0f562" +source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.18#b1e91afb7421309b203d7627b736d9bcf58260eb" dependencies = [ "async-trait", "cumulus-primitives-core", @@ -2092,9 +2166,11 @@ dependencies = [ [[package]] name = "cumulus-primitives-timestamp" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.16#86f76c5619c64d1300315612695ad4b4fcd0f562" +source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.18#b1e91afb7421309b203d7627b736d9bcf58260eb" dependencies = [ "cumulus-primitives-core", + "futures 0.3.21", + "parity-scale-codec", "sp-inherents", "sp-std", "sp-timestamp", @@ -2103,7 +2179,7 @@ dependencies = [ [[package]] name = "cumulus-primitives-utility" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.16#86f76c5619c64d1300315612695ad4b4fcd0f562" +source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.18#b1e91afb7421309b203d7627b736d9bcf58260eb" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -2117,17 +2193,48 @@ dependencies = [ "xcm", ] +[[package]] +name = "cumulus-relay-chain-inprocess-interface" +version = "0.1.0" +source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.18#b1e91afb7421309b203d7627b736d9bcf58260eb" +dependencies = [ + "async-trait", + "cumulus-primitives-core", + "cumulus-relay-chain-interface", + "futures 0.3.21", + "futures-timer", + "parking_lot 0.12.0", + "polkadot-client", + "polkadot-service", + "sc-client-api", + "sc-consensus-babe", + "sc-network", + "sc-service", + "sc-telemetry", + "sc-tracing", + "sp-api", + "sp-blockchain", + "sp-consensus", + "sp-core", + "sp-runtime", + "sp-state-machine", + "tracing", +] + [[package]] name = "cumulus-relay-chain-interface" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.16#86f76c5619c64d1300315612695ad4b4fcd0f562" +source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.18#b1e91afb7421309b203d7627b736d9bcf58260eb" dependencies = [ "async-trait", "cumulus-primitives-core", "derive_more", "futures 0.3.21", - "parking_lot 0.11.2", + "jsonrpsee-core 0.9.0", + "parity-scale-codec", + "parking_lot 0.12.0", "polkadot-overseer", + "polkadot-service", "sc-client-api", "sc-service", "sp-api", @@ -2139,37 +2246,35 @@ dependencies = [ ] [[package]] -name = "cumulus-relay-chain-local" +name = "cumulus-relay-chain-rpc-interface" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.16#86f76c5619c64d1300315612695ad4b4fcd0f562" +source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.18#b1e91afb7421309b203d7627b736d9bcf58260eb" dependencies = [ "async-trait", + "backoff", "cumulus-primitives-core", "cumulus-relay-chain-interface", "futures 0.3.21", "futures-timer", - "parking_lot 0.11.2", - "polkadot-client", + "jsonrpsee 0.9.0", + "parity-scale-codec", + "parking_lot 0.12.0", "polkadot-service", "sc-client-api", - "sc-consensus-babe", - "sc-network", - "sc-service", - "sc-telemetry", - "sc-tracing", + "sc-rpc-api", "sp-api", - "sp-blockchain", - "sp-consensus", "sp-core", "sp-runtime", "sp-state-machine", + "sp-storage", "tracing", + "url 2.2.2", ] [[package]] name = "cumulus-test-relay-sproof-builder" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.16#86f76c5619c64d1300315612695ad4b4fcd0f562" +source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.18#b1e91afb7421309b203d7627b736d9bcf58260eb" dependencies = [ "cumulus-primitives-core", "parity-scale-codec", @@ -2231,6 +2336,15 @@ dependencies = [ "syn", ] +[[package]] +name = "der" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6919815d73839e7ad218de758883aae3a257ba6759ce7a9992501efbb53d705c" +dependencies = [ + "const-oid", +] + [[package]] name = "derivative" version = "2.2.0" @@ -2359,6 +2473,7 @@ dependencies = [ "log", "manta-collator-selection", "manta-primitives", + "orml-traits", "orml-xtokens", "pallet-asset-manager", "pallet-assets", @@ -2449,6 +2564,17 @@ version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "21e50f3adc76d6a43f5ed73b698a87d0760ca74617f60f7c3b879003536fdd28" +[[package]] +name = "ecdsa" +version = "0.13.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0d69ae62e0ce582d56380743515fefaf1a8c70cec685d9677636d7e30ae9dc9" +dependencies = [ + "der", + "elliptic-curve", + "signature", +] + [[package]] name = "ed25519" version = "1.4.1" @@ -2478,6 +2604,24 @@ version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" +[[package]] +name = "elliptic-curve" +version = "0.11.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25b477563c2bfed38a3b7a60964c49e058b2510ad3f12ba3483fd8f62c2306d6" +dependencies = [ + "base16ct", + "crypto-bigint", + "der", + "ff", + "generic-array 0.14.5", + "group", + "rand_core 0.6.3", + "sec1", + "subtle", + "zeroize", +] + [[package]] name = "encoding_rs" version = "0.8.31" @@ -2571,45 +2715,42 @@ dependencies = [ ] [[package]] -name = "ethbloom" -version = "0.11.1" +name = "event-listener" +version = "2.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfb684ac8fa8f6c5759f788862bb22ec6fe3cb392f6bfd08e3c64b603661e3f8" -dependencies = [ - "crunchy", - "fixed-hash", - "impl-rlp", - "impl-serde", - "tiny-keccak", -] +checksum = "77f3309417938f28bf8228fcff79a4a37103981e3e186d2ccd19c74b38f4eb71" [[package]] -name = "ethereum-types" -version = "0.12.1" +name = "exit-future" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05136f7057fe789f06e6d41d07b34e6f70d8c86e5693b60f97aaa6553553bdaf" +checksum = "e43f2f1833d64e33f15592464d6fdd70f349dda7b1a53088eb83cd94014008c5" dependencies = [ - "ethbloom", - "fixed-hash", - "impl-rlp", - "impl-serde", - "primitive-types", - "uint", + "futures 0.3.21", ] [[package]] -name = "event-listener" -version = "2.5.2" +name = "expander" +version = "0.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77f3309417938f28bf8228fcff79a4a37103981e3e186d2ccd19c74b38f4eb71" +checksum = "a718c0675c555c5f976fff4ea9e2c150fa06cefa201cadef87cfbf9324075881" +dependencies = [ + "blake3 1.3.1", + "fs-err", + "proc-macro2", + "quote", +] [[package]] -name = "exit-future" -version = "0.2.0" +name = "expander" +version = "0.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e43f2f1833d64e33f15592464d6fdd70f349dda7b1a53088eb83cd94014008c5" +checksum = "309f21c39e8e38e4b6eda07e155bd7a4e5fc4d707cefd0402cc82a8b6bb65aaa" dependencies = [ - "futures 0.3.21", + "blake2 0.10.4", + "fs-err", + "proc-macro2", + "quote", ] [[package]] @@ -2633,6 +2774,31 @@ dependencies = [ "instant", ] +[[package]] +name = "fatality" +version = "0.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ad875162843b0d046276327afe0136e9ed3a23d5a754210fb6f1f33610d39ab" +dependencies = [ + "fatality-proc-macro", + "thiserror", +] + +[[package]] +name = "fatality-proc-macro" +version = "0.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f5aa1e3ae159e592ad222dc90c5acbad632b527779ba88486abe92782ab268bd" +dependencies = [ + "expander 0.0.4", + "indexmap", + "proc-macro-crate 1.1.3", + "proc-macro2", + "quote", + "syn", + "thiserror", +] + [[package]] name = "fdlimit" version = "0.2.1" @@ -2642,6 +2808,16 @@ dependencies = [ "libc", ] +[[package]] +name = "ff" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2958d04124b9f27f175eaeb9a9f383d026098aa837eadd8ba22c11f13a05b9e" +dependencies = [ + "rand_core 0.6.3", + "subtle", +] + [[package]] name = "file-per-thread-logger" version = "0.1.5" @@ -2654,9 +2830,9 @@ dependencies = [ [[package]] name = "finality-grandpa" -version = "0.14.4" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8ac3ff5224ef91f3c97e03eb1de2db82743427e91aaa5ac635f454f0b164f5a" +checksum = "d9def033d8505edf199f6a5d07aa7e6d2d6185b164293b77f0efd108f4f3e11d" dependencies = [ "either", "futures 0.3.21", @@ -2723,7 +2899,7 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "fork-tree" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "parity-scale-codec", ] @@ -2741,7 +2917,7 @@ dependencies = [ [[package]] name = "frame-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "frame-support", "frame-system", @@ -2750,6 +2926,7 @@ dependencies = [ "parity-scale-codec", "paste", "scale-info", + "serde", "sp-api", "sp-application-crypto", "sp-io", @@ -2762,33 +2939,48 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "Inflector", "chrono", + "clap 3.1.8", "frame-benchmarking", "frame-support", "handlebars", + "hash-db", + "hex", + "itertools", + "kvdb", "linked-hash-map", "log", + "memory-db", "parity-scale-codec", + "rand 0.8.5", "sc-cli", + "sc-client-api", "sc-client-db", "sc-executor", "sc-service", "serde", + "serde_json", + "serde_nanos", + "sp-api", + "sp-blockchain", "sp-core", + "sp-database", "sp-externalities", "sp-keystore", "sp-runtime", "sp-state-machine", - "structopt", + "sp-std", + "sp-storage", + "sp-trie", ] [[package]] name = "frame-election-provider-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "frame-support", "frame-system", @@ -2802,7 +2994,7 @@ dependencies = [ [[package]] name = "frame-executive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "frame-support", "frame-system", @@ -2817,9 +3009,9 @@ dependencies = [ [[package]] name = "frame-metadata" -version = "14.2.0" +version = "15.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37ed5e5c346de62ca5c184b4325a6600d1eaca210666e4606fe4e449574978d0" +checksum = "df6bb8542ef006ef0de09a5c4420787d79823c0ed7924225822362fd2bf2ff2d" dependencies = [ "cfg-if 1.0.0", "parity-scale-codec", @@ -2830,7 +3022,7 @@ dependencies = [ [[package]] name = "frame-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "bitflags", "frame-metadata", @@ -2859,7 +3051,7 @@ dependencies = [ [[package]] name = "frame-support-procedural" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "Inflector", "frame-support-procedural-tools", @@ -2871,7 +3063,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate 1.1.3", @@ -2883,7 +3075,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "proc-macro2", "quote", @@ -2893,7 +3085,7 @@ dependencies = [ [[package]] name = "frame-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "frame-support", "log", @@ -2910,7 +3102,7 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "frame-benchmarking", "frame-support", @@ -2925,7 +3117,7 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "parity-scale-codec", "sp-api", @@ -2934,7 +3126,7 @@ dependencies = [ [[package]] name = "frame-try-runtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "frame-support", "sp-api", @@ -2970,6 +3162,12 @@ dependencies = [ "winapi 0.3.9", ] +[[package]] +name = "fs_extra" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2022715d62ab30faffd124d40b76f4134a550a87792276512b18d63272333394" + [[package]] name = "fuchsia-zircon" version = "0.3.3" @@ -2988,9 +3186,9 @@ checksum = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" [[package]] name = "funty" -version = "1.1.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fed34cd105917e91daa4da6b3728c47b068749d6a62c59811f06ed2ac71d9da7" +checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" [[package]] name = "futures" @@ -3080,8 +3278,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3a1387e07917c711fb4ee4f48ea0adb04a3c9739e53ef85bf43ae1edc2937a8b" dependencies = [ "futures-io", - "rustls", - "webpki", + "rustls 0.19.1", + "webpki 0.21.4", ] [[package]] @@ -3216,6 +3414,17 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "group" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc5ac374b108929de78460075f3dc439fa66df9d8fc77e8f12caa5165fcf0c89" +dependencies = [ + "ff", + "rand_core 0.6.3", + "subtle", +] + [[package]] name = "h2" version = "0.3.13" @@ -3446,11 +3655,27 @@ dependencies = [ "futures-util", "hyper", "log", - "rustls", - "rustls-native-certs", + "rustls 0.19.1", + "rustls-native-certs 0.5.0", + "tokio", + "tokio-rustls 0.22.0", + "webpki 0.21.4", +] + +[[package]] +name = "hyper-rustls" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d87c48c02e0dc5e3b849a2041db3029fd066650f8f717c07bf8ed78ccb895cac" +dependencies = [ + "http", + "hyper", + "log", + "rustls 0.20.4", + "rustls-native-certs 0.6.1", "tokio", - "tokio-rustls", - "webpki", + "tokio-rustls 0.23.3", + "webpki-roots 0.22.3", ] [[package]] @@ -3527,22 +3752,13 @@ dependencies = [ [[package]] name = "impl-codec" -version = "0.5.1" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "161ebdfec3c8e3b52bf61c4f3550a1eea4f9579d10dc1b936f3171ebdcd6c443" +checksum = "ba6a270039626615617f3f36d15fc827041df3b78c439da2cadfa47455a77f2f" dependencies = [ "parity-scale-codec", ] -[[package]] -name = "impl-rlp" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f28220f89297a075ddc7245cd538076ee98b01f2a9c23a53a4f1105d5a322808" -dependencies = [ - "rlp", -] - [[package]] name = "impl-serde" version = "0.3.2" @@ -3788,57 +4004,186 @@ dependencies = [ ] [[package]] -name = "jsonrpc-server-utils" -version = "18.0.0" +name = "jsonrpc-server-utils" +version = "18.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa4fdea130485b572c39a460d50888beb00afb3e35de23ccd7fad8ff19f0e0d4" +dependencies = [ + "bytes 1.1.0", + "futures 0.3.21", + "globset", + "jsonrpc-core", + "lazy_static", + "log", + "tokio", + "tokio-stream", + "tokio-util 0.6.9", + "unicase", +] + +[[package]] +name = "jsonrpc-ws-server" +version = "18.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f892c7d766369475ab7b0669f417906302d7c0fb521285c0a0c92e52e7c8e946" +dependencies = [ + "futures 0.3.21", + "jsonrpc-core", + "jsonrpc-server-utils", + "log", + "parity-ws", + "parking_lot 0.11.2", + "slab", +] + +[[package]] +name = "jsonrpsee" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6373a33d987866ccfe1af4bc11b089dce941764313f9fd8b7cf13fcb51b72dc5" +dependencies = [ + "jsonrpsee-types 0.4.1", + "jsonrpsee-utils", + "jsonrpsee-ws-client 0.4.1", +] + +[[package]] +name = "jsonrpsee" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05fd8cd6c6b1bbd06881d2cf88f1fc83cc36c98f2219090f839115fb4a956cb9" +dependencies = [ + "jsonrpsee-core 0.8.0", + "jsonrpsee-proc-macros", + "jsonrpsee-types 0.8.0", + "jsonrpsee-ws-client 0.8.0", +] + +[[package]] +name = "jsonrpsee" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0d0b8cc1959f8c05256ace093b2317482da9127f1d9227564f47e7e6bf9bda8" +dependencies = [ + "jsonrpsee-core 0.9.0", + "jsonrpsee-http-client", + "jsonrpsee-types 0.9.0", + "jsonrpsee-ws-client 0.9.0", +] + +[[package]] +name = "jsonrpsee-client-transport" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3303cdf246e6ab76e2866fb3d9acb6c76a068b1b28bd923a1b7a8122257ad7b5" +dependencies = [ + "futures 0.3.21", + "http", + "jsonrpsee-core 0.8.0", + "jsonrpsee-types 0.8.0", + "pin-project 1.0.10", + "rustls-native-certs 0.6.1", + "soketto", + "thiserror", + "tokio", + "tokio-rustls 0.23.3", + "tokio-util 0.6.9", + "tracing", + "webpki-roots 0.22.3", +] + +[[package]] +name = "jsonrpsee-client-transport" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa370c2c717d798c3c0a315ae3f0a707a388c6963c11f9da7dbbe1d3f7392f5f" +dependencies = [ + "futures 0.3.21", + "http", + "jsonrpsee-core 0.9.0", + "jsonrpsee-types 0.9.0", + "pin-project 1.0.10", + "rustls-native-certs 0.6.1", + "soketto", + "thiserror", + "tokio", + "tokio-rustls 0.23.3", + "tokio-util 0.6.9", + "tracing", + "webpki-roots 0.22.3", +] + +[[package]] +name = "jsonrpsee-core" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa4fdea130485b572c39a460d50888beb00afb3e35de23ccd7fad8ff19f0e0d4" +checksum = "f220b5a238dc7992b90f1144fbf6eaa585872c9376afe6fe6863ffead6191bf3" dependencies = [ - "bytes 1.1.0", - "futures 0.3.21", - "globset", - "jsonrpc-core", - "lazy_static", - "log", + "anyhow", + "arrayvec 0.7.2", + "async-trait", + "beef", + "futures-channel", + "futures-util", + "hyper", + "jsonrpsee-types 0.8.0", + "rustc-hash", + "serde", + "serde_json", + "soketto", + "thiserror", "tokio", - "tokio-stream", - "tokio-util 0.6.9", - "unicase", + "tracing", ] [[package]] -name = "jsonrpc-ws-server" -version = "18.0.0" +name = "jsonrpsee-core" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f892c7d766369475ab7b0669f417906302d7c0fb521285c0a0c92e52e7c8e946" +checksum = "22abc3274b265dcefe2e26c4beecf9fda4fffa48cf94930443a6c73678f020d5" dependencies = [ - "futures 0.3.21", - "jsonrpc-core", - "jsonrpc-server-utils", - "log", - "parity-ws", - "parking_lot 0.11.2", - "slab", + "anyhow", + "arrayvec 0.7.2", + "async-trait", + "beef", + "futures-channel", + "futures-util", + "hyper", + "jsonrpsee-types 0.9.0", + "rustc-hash", + "serde", + "serde_json", + "soketto", + "thiserror", + "tokio", + "tracing", ] [[package]] -name = "jsonrpsee" -version = "0.4.1" +name = "jsonrpsee-http-client" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6373a33d987866ccfe1af4bc11b089dce941764313f9fd8b7cf13fcb51b72dc5" +checksum = "d31b837273d09dd80051eefa57d337769dff6c3266108c43a3544ac7ffed9d68" dependencies = [ - "jsonrpsee-proc-macros", - "jsonrpsee-types", - "jsonrpsee-utils", - "jsonrpsee-ws-client", + "async-trait", + "hyper", + "hyper-rustls 0.23.0", + "jsonrpsee-core 0.9.0", + "jsonrpsee-types 0.9.0", + "rustc-hash", + "serde", + "serde_json", + "thiserror", + "tokio", + "tracing", ] [[package]] name = "jsonrpsee-proc-macros" -version = "0.4.1" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d802063f7a3c867456955f9d2f15eb3ee0edb5ec9ec2b5526324756759221c0f" +checksum = "4299ebf790ea9de1cb72e73ff2ae44c723ef264299e5e2d5ef46a371eb3ac3d8" dependencies = [ - "log", "proc-macro-crate 1.1.3", "proc-macro2", "quote", @@ -3864,6 +4209,34 @@ dependencies = [ "thiserror", ] +[[package]] +name = "jsonrpsee-types" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1b3f601bbbe45cd63f5407b6f7d7950e08a7d4f82aa699ff41a4a5e9e54df58" +dependencies = [ + "anyhow", + "beef", + "serde", + "serde_json", + "thiserror", + "tracing", +] + +[[package]] +name = "jsonrpsee-types" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f4c45d2e2aa1db4c7d7d7dbaabc10a5b5258d99cd9d42fbfd5260b76f80c324" +dependencies = [ + "anyhow", + "beef", + "serde", + "serde_json", + "thiserror", + "tracing", +] + [[package]] name = "jsonrpsee-utils" version = "0.4.1" @@ -3872,7 +4245,7 @@ checksum = "0109c4f972058f3b1925b73a17210aff7b63b65967264d0045d15ee88fe84f0c" dependencies = [ "arrayvec 0.7.2", "beef", - "jsonrpsee-types", + "jsonrpsee-types 0.4.1", ] [[package]] @@ -3886,19 +4259,53 @@ dependencies = [ "fnv", "futures 0.3.21", "http", - "jsonrpsee-types", + "jsonrpsee-types 0.4.1", "log", "pin-project 1.0.10", - "rustls-native-certs", + "rustls-native-certs 0.5.0", "serde", "serde_json", "soketto", "thiserror", "tokio", - "tokio-rustls", + "tokio-rustls 0.22.0", "tokio-util 0.6.9", ] +[[package]] +name = "jsonrpsee-ws-client" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aff425cee7c779e33920913bc695447416078ee6d119f443f3060feffa4e86b5" +dependencies = [ + "jsonrpsee-client-transport 0.8.0", + "jsonrpsee-core 0.8.0", + "jsonrpsee-types 0.8.0", +] + +[[package]] +name = "jsonrpsee-ws-client" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31b58983485b2b626c276f1eb367d62dae82132451b281072a7bfa536a33ddf3" +dependencies = [ + "jsonrpsee-client-transport 0.9.0", + "jsonrpsee-core 0.9.0", + "jsonrpsee-types 0.9.0", +] + +[[package]] +name = "k256" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19c3a5e0a0b8450278feda242592512e09f61c72e018b8cd5c859482802daf2d" +dependencies = [ + "cfg-if 1.0.0", + "ecdsa", + "elliptic-curve", + "sec1", +] + [[package]] name = "keccak" version = "0.1.0" @@ -3917,8 +4324,8 @@ dependencies = [ [[package]] name = "kusama-runtime" -version = "0.9.16" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" +version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111" dependencies = [ "beefy-primitives", "bitvec", @@ -4005,8 +4412,8 @@ dependencies = [ [[package]] name = "kusama-runtime-constants" -version = "0.9.16" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" +version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111" dependencies = [ "frame-support", "polkadot-primitives", @@ -4026,9 +4433,9 @@ dependencies = [ [[package]] name = "kvdb" -version = "0.10.0" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45a3f58dc069ec0e205a27f5b45920722a46faed802a0541538241af6228f512" +checksum = "a301d8ecb7989d4a6e2c57a49baca77d353bdbf879909debe3f375fe25d61f86" dependencies = [ "parity-util-mem", "smallvec", @@ -4036,20 +4443,20 @@ dependencies = [ [[package]] name = "kvdb-memorydb" -version = "0.10.0" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3b6b85fc643f5acd0bffb2cc8a6d150209379267af0d41db72170021841f9f5" +checksum = "ece7e668abd21387aeb6628130a6f4c802787f014fa46bc83221448322250357" dependencies = [ "kvdb", "parity-util-mem", - "parking_lot 0.11.2", + "parking_lot 0.12.0", ] [[package]] name = "kvdb-rocksdb" -version = "0.14.0" +version = "0.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b1b6ea8f2536f504b645ad78419c8246550e19d2c3419a167080ce08edee35a" +checksum = "ca7fbdfd71cd663dceb0faf3367a99f8cf724514933e9867cec4995b6027cbc1" dependencies = [ "fs-swap", "kvdb", @@ -4057,7 +4464,7 @@ dependencies = [ "num_cpus", "owning_ref", "parity-util-mem", - "parking_lot 0.11.2", + "parking_lot 0.12.0", "regex", "rocksdb", "smallvec", @@ -4413,7 +4820,7 @@ dependencies = [ "pin-project 1.0.10", "rand 0.7.3", "salsa20", - "sha3", + "sha3 0.9.1", ] [[package]] @@ -4564,7 +4971,7 @@ dependencies = [ "rw-stream-sink", "soketto", "url 2.2.2", - "webpki-roots", + "webpki-roots 0.21.1", ] [[package]] @@ -4582,14 +4989,17 @@ dependencies = [ [[package]] name = "librocksdb-sys" -version = "6.20.3" +version = "0.6.1+6.28.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c309a9d2470844aceb9a4a098cf5286154d20596868b75a6b36357d2bb9ca25d" +checksum = "81bc587013734dadb7cf23468e531aa120788b87243648be42e2d3a072186291" dependencies = [ "bindgen", + "bzip2-sys", "cc", "glob", "libc", + "libz-sys", + "tikv-jemalloc-sys", ] [[package]] @@ -4682,15 +5092,6 @@ version = "0.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a261afc61b7a5e323933b402ca6a1765183687c614789b1e4db7762ed4230bca" -[[package]] -name = "lock_api" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4da24a77a3d8a6d4862d95f72e6fdb9c09a643ecdb402d754004a557f2bec75" -dependencies = [ - "scopeguard", -] - [[package]] name = "lock_api" version = "0.4.7" @@ -4774,6 +5175,7 @@ dependencies = [ "async-trait", "calamari-runtime", "cfg-if 1.0.0", + "clap 3.1.8", "cumulus-client-cli", "cumulus-client-consensus-aura", "cumulus-client-consensus-common", @@ -4782,8 +5184,9 @@ dependencies = [ "cumulus-client-service", "cumulus-primitives-core", "cumulus-primitives-parachain-inherent", + "cumulus-relay-chain-inprocess-interface", "cumulus-relay-chain-interface", - "cumulus-relay-chain-local", + "cumulus-relay-chain-rpc-interface", "dolphin-runtime", "frame-benchmarking", "frame-benchmarking-cli", @@ -4829,7 +5232,6 @@ dependencies = [ "sp-session", "sp-timestamp", "sp-transaction-pool", - "structopt", "substrate-build-script-utils", "substrate-frame-rpc-system", "substrate-prometheus-endpoint", @@ -4840,7 +5242,7 @@ dependencies = [ [[package]] name = "manta-accounting" version = "0.4.0" -source = "git+https://github.com/manta-network/manta-rs.git#0795efe8b779dab5e0e681c30a42a81545e3b509" +source = "git+https://github.com/manta-network/manta-rs.git#c6567af7e017a37c20b0f099993deb9f3227279c" dependencies = [ "derivative", "derive_more", @@ -4883,7 +5285,7 @@ dependencies = [ [[package]] name = "manta-crypto" version = "0.4.0" -source = "git+https://github.com/manta-network/manta-rs.git#0795efe8b779dab5e0e681c30a42a81545e3b509" +source = "git+https://github.com/manta-network/manta-rs.git#c6567af7e017a37c20b0f099993deb9f3227279c" dependencies = [ "derivative", "manta-util", @@ -4893,7 +5295,7 @@ dependencies = [ [[package]] name = "manta-pay" version = "0.4.0" -source = "git+https://github.com/manta-network/manta-rs.git#0795efe8b779dab5e0e681c30a42a81545e3b509" +source = "git+https://github.com/manta-network/manta-rs.git#c6567af7e017a37c20b0f099993deb9f3227279c" dependencies = [ "aes-gcm", "ark-bls12-381", @@ -5017,7 +5419,7 @@ dependencies = [ [[package]] name = "manta-util" version = "0.4.0" -source = "git+https://github.com/manta-network/manta-rs.git#0795efe8b779dab5e0e681c30a42a81545e3b509" +source = "git+https://github.com/manta-network/manta-rs.git#c6567af7e017a37c20b0f099993deb9f3227279c" [[package]] name = "maplit" @@ -5090,12 +5492,12 @@ dependencies = [ [[package]] name = "memory-db" -version = "0.28.0" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d505169b746dacf02f7d14d8c80b34edfd8212159c63d23c977739a0d960c626" +checksum = "6566c70c1016f525ced45d7b7f97730a2bafb037c788211d0c186ef5b2189f0a" dependencies = [ "hash-db", - "hashbrown 0.11.2", + "hashbrown 0.12.0", "parity-util-mem", ] @@ -5128,8 +5530,8 @@ dependencies = [ [[package]] name = "metered-channel" -version = "0.9.16" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" +version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111" dependencies = [ "derive_more", "futures 0.3.21", @@ -5294,7 +5696,7 @@ dependencies = [ "generic-array 0.14.5", "multihash-derive", "sha2 0.9.9", - "sha3", + "sha3 0.9.1", "unsigned-varint 0.5.1", ] @@ -5640,7 +6042,7 @@ dependencies = [ [[package]] name = "orml-traits" version = "0.4.1-dev" -source = "git+https://github.com/manta-network/open-runtime-module-library.git?rev=4a66b29#4a66b299037cc3997689538f82847785f9afa65d" +source = "git+https://github.com/manta-network/open-runtime-module-library.git?rev=7e2f985#7e2f985d8ed49fe0d243e7ec8eb864cd9cc91d2a" dependencies = [ "frame-support", "impl-trait-for-tuples", @@ -5658,7 +6060,7 @@ dependencies = [ [[package]] name = "orml-utilities" version = "0.4.1-dev" -source = "git+https://github.com/manta-network/open-runtime-module-library.git?rev=4a66b29#4a66b299037cc3997689538f82847785f9afa65d" +source = "git+https://github.com/manta-network/open-runtime-module-library.git?rev=7e2f985#7e2f985d8ed49fe0d243e7ec8eb864cd9cc91d2a" dependencies = [ "frame-support", "parity-scale-codec", @@ -5672,7 +6074,7 @@ dependencies = [ [[package]] name = "orml-xcm-support" version = "0.4.1-dev" -source = "git+https://github.com/manta-network/open-runtime-module-library.git?rev=4a66b29#4a66b299037cc3997689538f82847785f9afa65d" +source = "git+https://github.com/manta-network/open-runtime-module-library.git?rev=7e2f985#7e2f985d8ed49fe0d243e7ec8eb864cd9cc91d2a" dependencies = [ "frame-support", "orml-traits", @@ -5686,7 +6088,7 @@ dependencies = [ [[package]] name = "orml-xtokens" version = "0.4.1-dev" -source = "git+https://github.com/manta-network/open-runtime-module-library.git?rev=4a66b29#4a66b299037cc3997689538f82847785f9afa65d" +source = "git+https://github.com/manta-network/open-runtime-module-library.git?rev=7e2f985#7e2f985d8ed49fe0d243e7ec8eb864cd9cc91d2a" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -5703,6 +6105,15 @@ dependencies = [ "xcm-executor", ] +[[package]] +name = "os_str_bytes" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e22443d1643a904602595ba1cd8f7d896afe56d26712531c5ff73a15b2fbf64" +dependencies = [ + "memchr", +] + [[package]] name = "owning_ref" version = "0.4.1" @@ -5721,6 +6132,7 @@ dependencies = [ "frame-system", "log", "manta-primitives", + "orml-traits", "pallet-assets", "pallet-balances", "parity-scale-codec", @@ -5735,7 +6147,7 @@ dependencies = [ [[package]] name = "pallet-assets" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "frame-benchmarking", "frame-support", @@ -5749,7 +6161,7 @@ dependencies = [ [[package]] name = "pallet-aura" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "frame-support", "frame-system", @@ -5765,7 +6177,7 @@ dependencies = [ [[package]] name = "pallet-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "frame-support", "frame-system", @@ -5781,7 +6193,7 @@ dependencies = [ [[package]] name = "pallet-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "frame-support", "frame-system", @@ -5796,7 +6208,7 @@ dependencies = [ [[package]] name = "pallet-babe" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "frame-benchmarking", "frame-support", @@ -5820,7 +6232,7 @@ dependencies = [ [[package]] name = "pallet-bags-list" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5840,7 +6252,7 @@ dependencies = [ [[package]] name = "pallet-balances" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "frame-benchmarking", "frame-support", @@ -5855,7 +6267,7 @@ dependencies = [ [[package]] name = "pallet-beefy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "beefy-primitives", "frame-support", @@ -5871,14 +6283,14 @@ dependencies = [ [[package]] name = "pallet-beefy-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "beefy-merkle-tree", "beefy-primitives", "frame-support", "frame-system", "hex", - "libsecp256k1", + "k256", "log", "pallet-beefy", "pallet-mmr", @@ -5896,7 +6308,7 @@ dependencies = [ [[package]] name = "pallet-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "frame-benchmarking", "frame-support", @@ -5914,7 +6326,7 @@ dependencies = [ [[package]] name = "pallet-bridge-dispatch" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111" dependencies = [ "bp-message-dispatch", "bp-runtime", @@ -5931,7 +6343,7 @@ dependencies = [ [[package]] name = "pallet-bridge-grandpa" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111" dependencies = [ "bp-header-chain", "bp-runtime", @@ -5953,7 +6365,7 @@ dependencies = [ [[package]] name = "pallet-bridge-messages" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111" dependencies = [ "bitvec", "bp-message-dispatch", @@ -5974,7 +6386,7 @@ dependencies = [ [[package]] name = "pallet-collator-selection" version = "3.0.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.16#86f76c5619c64d1300315612695ad4b4fcd0f562" +source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.18#b1e91afb7421309b203d7627b736d9bcf58260eb" dependencies = [ "frame-benchmarking", "frame-support", @@ -5983,7 +6395,7 @@ dependencies = [ "pallet-authorship", "pallet-session", "parity-scale-codec", - "rand 0.7.3", + "rand 0.8.5", "scale-info", "serde", "sp-runtime", @@ -5994,7 +6406,7 @@ dependencies = [ [[package]] name = "pallet-collective" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "frame-benchmarking", "frame-support", @@ -6011,7 +6423,7 @@ dependencies = [ [[package]] name = "pallet-democracy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "frame-benchmarking", "frame-support", @@ -6027,7 +6439,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-multi-phase" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6044,14 +6456,13 @@ dependencies = [ "sp-runtime", "sp-std", "static_assertions", - "strum 0.22.0", - "strum_macros 0.23.1", + "strum 0.23.0", ] [[package]] name = "pallet-elections-phragmen" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "frame-benchmarking", "frame-support", @@ -6069,7 +6480,7 @@ dependencies = [ [[package]] name = "pallet-gilt" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "frame-benchmarking", "frame-support", @@ -6084,7 +6495,7 @@ dependencies = [ [[package]] name = "pallet-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "frame-benchmarking", "frame-support", @@ -6107,7 +6518,7 @@ dependencies = [ [[package]] name = "pallet-identity" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "enumflags2", "frame-benchmarking", @@ -6123,7 +6534,7 @@ dependencies = [ [[package]] name = "pallet-im-online" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "frame-benchmarking", "frame-support", @@ -6143,7 +6554,7 @@ dependencies = [ [[package]] name = "pallet-indices" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "frame-benchmarking", "frame-support", @@ -6192,7 +6603,7 @@ dependencies = [ [[package]] name = "pallet-membership" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "frame-benchmarking", "frame-support", @@ -6209,7 +6620,7 @@ dependencies = [ [[package]] name = "pallet-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "ckb-merkle-mountain-range", "frame-benchmarking", @@ -6227,7 +6638,7 @@ dependencies = [ [[package]] name = "pallet-mmr-primitives" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "frame-support", "frame-system", @@ -6243,7 +6654,7 @@ dependencies = [ [[package]] name = "pallet-mmr-rpc" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "jsonrpc-core", "jsonrpc-core-client", @@ -6260,7 +6671,7 @@ dependencies = [ [[package]] name = "pallet-multisig" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "frame-benchmarking", "frame-support", @@ -6275,7 +6686,7 @@ dependencies = [ [[package]] name = "pallet-nicks" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "frame-support", "frame-system", @@ -6289,7 +6700,7 @@ dependencies = [ [[package]] name = "pallet-offences" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "frame-support", "frame-system", @@ -6306,7 +6717,7 @@ dependencies = [ [[package]] name = "pallet-offences-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6329,7 +6740,7 @@ dependencies = [ [[package]] name = "pallet-preimage" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "frame-benchmarking", "frame-support", @@ -6345,7 +6756,7 @@ dependencies = [ [[package]] name = "pallet-proxy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "frame-benchmarking", "frame-support", @@ -6360,7 +6771,7 @@ dependencies = [ [[package]] name = "pallet-recovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "frame-support", "frame-system", @@ -6374,7 +6785,7 @@ dependencies = [ [[package]] name = "pallet-scheduler" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "frame-benchmarking", "frame-support", @@ -6390,7 +6801,7 @@ dependencies = [ [[package]] name = "pallet-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "frame-support", "frame-system", @@ -6411,7 +6822,7 @@ dependencies = [ [[package]] name = "pallet-session-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "frame-benchmarking", "frame-support", @@ -6427,7 +6838,7 @@ dependencies = [ [[package]] name = "pallet-society" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "frame-support", "frame-system", @@ -6441,7 +6852,7 @@ dependencies = [ [[package]] name = "pallet-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6464,7 +6875,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-curve" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "proc-macro-crate 1.1.3", "proc-macro2", @@ -6475,7 +6886,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-fn" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "log", "sp-arithmetic", @@ -6484,7 +6895,7 @@ dependencies = [ [[package]] name = "pallet-sudo" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "frame-support", "frame-system", @@ -6498,7 +6909,7 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "frame-benchmarking", "frame-support", @@ -6516,7 +6927,7 @@ dependencies = [ [[package]] name = "pallet-tips" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "frame-benchmarking", "frame-support", @@ -6535,7 +6946,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "frame-support", "frame-system", @@ -6552,7 +6963,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "jsonrpc-core", "jsonrpc-core-client", @@ -6569,7 +6980,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -6580,7 +6991,7 @@ dependencies = [ [[package]] name = "pallet-treasury" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "frame-benchmarking", "frame-support", @@ -6614,7 +7025,7 @@ dependencies = [ [[package]] name = "pallet-utility" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "frame-benchmarking", "frame-support", @@ -6630,7 +7041,7 @@ dependencies = [ [[package]] name = "pallet-vesting" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "frame-benchmarking", "frame-support", @@ -6644,8 +7055,8 @@ dependencies = [ [[package]] name = "pallet-xcm" -version = "0.9.16" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" +version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111" dependencies = [ "frame-support", "frame-system", @@ -6662,8 +7073,8 @@ dependencies = [ [[package]] name = "pallet-xcm-benchmarks" -version = "0.9.16" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" +version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111" dependencies = [ "frame-benchmarking", "frame-support", @@ -6680,7 +7091,7 @@ dependencies = [ [[package]] name = "parachain-info" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.16#86f76c5619c64d1300315612695ad4b4fcd0f562" +source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.18#b1e91afb7421309b203d7627b736d9bcf58260eb" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -6711,9 +7122,9 @@ dependencies = [ [[package]] name = "parity-scale-codec" -version = "2.3.1" +version = "3.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "373b1a4c1338d9cd3d1fa53b3a11bdab5ab6bd80a20f7f7becd76953ae2be909" +checksum = "e8b44461635bbb1a0300f100a841e571e7d919c81c73075ef5d152ffdb521066" dependencies = [ "arrayvec 0.7.2", "bitvec", @@ -6725,9 +7136,9 @@ dependencies = [ [[package]] name = "parity-scale-codec-derive" -version = "2.3.1" +version = "3.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1557010476e0595c9b568d16dcfb81b93cdeb157612726f5170d31aa707bed27" +checksum = "c45ed1f39709f5a89338fab50e59816b2e8815f5bb58276e7ddf9afd495f73f8" dependencies = [ "proc-macro-crate 1.1.3", "proc-macro2", @@ -6757,17 +7168,15 @@ dependencies = [ [[package]] name = "parity-util-mem" -version = "0.10.2" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f4cb4e169446179cbc6b8b6320cc9fca49bd2e94e8db25f25f200a8ea774770" +checksum = "c32561d248d352148124f036cac253a644685a21dc9fea383eb4907d7bd35a8f" dependencies = [ "cfg-if 1.0.0", - "ethereum-types", - "hashbrown 0.11.2", + "hashbrown 0.12.0", "impl-trait-for-tuples", - "lru 0.6.6", "parity-util-mem-derive", - "parking_lot 0.11.2", + "parking_lot 0.12.0", "primitive-types", "smallvec", "winapi 0.3.9", @@ -6823,16 +7232,6 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "427c3892f9e783d91cc128285287e70a59e206ca452770ece88a76f7a3eddd72" -[[package]] -name = "parking_lot" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3a704eb390aafdc107b0e392f56a82b668e3a71366993b5340f5833fd62505e" -dependencies = [ - "lock_api 0.3.4", - "parking_lot_core 0.7.2", -] - [[package]] name = "parking_lot" version = "0.11.2" @@ -6840,7 +7239,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" dependencies = [ "instant", - "lock_api 0.4.7", + "lock_api", "parking_lot_core 0.8.5", ] @@ -6850,24 +7249,10 @@ version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "87f5ec2493a61ac0506c0f4199f99070cbe83857b0337006a30f3e6719b8ef58" dependencies = [ - "lock_api 0.4.7", + "lock_api", "parking_lot_core 0.9.2", ] -[[package]] -name = "parking_lot_core" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d58c7c768d4ba344e3e8d72518ac13e259d7c7ade24167003b8488e10b6740a3" -dependencies = [ - "cfg-if 0.1.10", - "cloudabi", - "libc", - "redox_syscall 0.1.57", - "smallvec", - "winapi 0.3.9", -] - [[package]] name = "parking_lot_core" version = "0.8.5" @@ -6877,7 +7262,7 @@ dependencies = [ "cfg-if 1.0.0", "instant", "libc", - "redox_syscall 0.2.13", + "redox_syscall", "smallvec", "winapi 0.3.9", ] @@ -6890,7 +7275,7 @@ checksum = "995f667a6c822200b0433ac218e05582f0e2efa1b922a3fd2fbaadc5f87bab37" dependencies = [ "cfg-if 1.0.0", "libc", - "redox_syscall 0.2.13", + "redox_syscall", "smallvec", "windows-sys", ] @@ -7048,6 +7433,17 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" +[[package]] +name = "pkcs8" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cabda3fb821068a9a4fab19a683eac3af12edf0f34b94a8be53c4972b8149d0" +dependencies = [ + "der", + "spki", + "zeroize", +] + [[package]] name = "pkg-config" version = "0.3.25" @@ -7090,8 +7486,8 @@ dependencies = [ [[package]] name = "polkadot-approval-distribution" -version = "0.9.16" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" +version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111" dependencies = [ "futures 0.3.21", "polkadot-node-network-protocol", @@ -7104,8 +7500,8 @@ dependencies = [ [[package]] name = "polkadot-availability-bitfield-distribution" -version = "0.9.16" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" +version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111" dependencies = [ "futures 0.3.21", "polkadot-node-network-protocol", @@ -7117,10 +7513,11 @@ dependencies = [ [[package]] name = "polkadot-availability-distribution" -version = "0.9.16" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" +version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111" dependencies = [ "derive_more", + "fatality", "futures 0.3.21", "lru 0.7.5", "parity-scale-codec", @@ -7139,9 +7536,10 @@ dependencies = [ [[package]] name = "polkadot-availability-recovery" -version = "0.9.16" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" +version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111" dependencies = [ + "fatality", "futures 0.3.21", "lru 0.7.5", "parity-scale-codec", @@ -7159,9 +7557,10 @@ dependencies = [ [[package]] name = "polkadot-cli" -version = "0.9.16" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" +version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111" dependencies = [ + "clap 3.1.8", "frame-benchmarking-cli", "futures 0.3.21", "log", @@ -7174,7 +7573,6 @@ dependencies = [ "sc-tracing", "sp-core", "sp-trie", - "structopt", "substrate-build-script-utils", "thiserror", "try-runtime-cli", @@ -7182,8 +7580,8 @@ dependencies = [ [[package]] name = "polkadot-client" -version = "0.9.16" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" +version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111" dependencies = [ "beefy-primitives", "frame-benchmarking", @@ -7212,11 +7610,11 @@ dependencies = [ [[package]] name = "polkadot-collator-protocol" -version = "0.9.16" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" +version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111" dependencies = [ "always-assert", - "derive_more", + "fatality", "futures 0.3.21", "futures-timer", "polkadot-node-network-protocol", @@ -7233,8 +7631,8 @@ dependencies = [ [[package]] name = "polkadot-core-primitives" -version = "0.9.16" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" +version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111" dependencies = [ "parity-scale-codec", "parity-util-mem", @@ -7246,10 +7644,11 @@ dependencies = [ [[package]] name = "polkadot-dispute-distribution" -version = "0.9.16" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" +version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111" dependencies = [ "derive_more", + "fatality", "futures 0.3.21", "lru 0.7.5", "parity-scale-codec", @@ -7268,8 +7667,8 @@ dependencies = [ [[package]] name = "polkadot-erasure-coding" -version = "0.9.16" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" +version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111" dependencies = [ "parity-scale-codec", "polkadot-node-primitives", @@ -7282,8 +7681,8 @@ dependencies = [ [[package]] name = "polkadot-gossip-support" -version = "0.9.16" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" +version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111" dependencies = [ "futures 0.3.21", "futures-timer", @@ -7302,13 +7701,13 @@ dependencies = [ [[package]] name = "polkadot-network-bridge" -version = "0.9.16" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" +version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111" dependencies = [ "async-trait", "futures 0.3.21", "parity-scale-codec", - "parking_lot 0.11.2", + "parking_lot 0.12.0", "polkadot-node-network-protocol", "polkadot-node-subsystem", "polkadot-node-subsystem-util", @@ -7321,8 +7720,8 @@ dependencies = [ [[package]] name = "polkadot-node-collation-generation" -version = "0.9.16" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" +version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111" dependencies = [ "futures 0.3.21", "parity-scale-codec", @@ -7339,8 +7738,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-approval-voting" -version = "0.9.16" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" +version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111" dependencies = [ "bitvec", "derive_more", @@ -7367,8 +7766,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-av-store" -version = "0.9.16" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" +version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111" dependencies = [ "bitvec", "futures 0.3.21", @@ -7387,8 +7786,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-backing" -version = "0.9.16" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" +version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111" dependencies = [ "bitvec", "futures 0.3.21", @@ -7405,8 +7804,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-bitfield-signing" -version = "0.9.16" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" +version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111" dependencies = [ "futures 0.3.21", "polkadot-node-subsystem", @@ -7420,8 +7819,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-candidate-validation" -version = "0.9.16" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" +version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111" dependencies = [ "async-trait", "futures 0.3.21", @@ -7438,8 +7837,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-chain-api" -version = "0.9.16" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" +version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111" dependencies = [ "futures 0.3.21", "polkadot-node-subsystem", @@ -7453,8 +7852,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-chain-selection" -version = "0.9.16" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" +version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111" dependencies = [ "futures 0.3.21", "futures-timer", @@ -7470,9 +7869,10 @@ dependencies = [ [[package]] name = "polkadot-node-core-dispute-coordinator" -version = "0.9.16" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" +version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111" dependencies = [ + "fatality", "futures 0.3.21", "kvdb", "lru 0.7.5", @@ -7488,8 +7888,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-parachains-inherent" -version = "0.9.16" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" +version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111" dependencies = [ "async-trait", "futures 0.3.21", @@ -7505,8 +7905,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-provisioner" -version = "0.9.16" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" +version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111" dependencies = [ "bitvec", "futures 0.3.21", @@ -7522,8 +7922,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-pvf" -version = "0.9.16" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" +version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111" dependencies = [ "always-assert", "assert_matches", @@ -7552,8 +7952,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-pvf-checker" -version = "0.9.16" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" +version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111" dependencies = [ "futures 0.3.21", "polkadot-node-primitives", @@ -7568,8 +7968,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-runtime-api" -version = "0.9.16" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" +version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111" dependencies = [ "futures 0.3.21", "memory-lru", @@ -7586,15 +7986,15 @@ dependencies = [ [[package]] name = "polkadot-node-jaeger" -version = "0.9.16" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" +version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111" dependencies = [ "async-std", "lazy_static", "log", "mick-jaeger", "parity-scale-codec", - "parking_lot 0.11.2", + "parking_lot 0.12.0", "polkadot-node-primitives", "polkadot-primitives", "sc-network", @@ -7604,8 +8004,8 @@ dependencies = [ [[package]] name = "polkadot-node-metrics" -version = "0.9.16" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" +version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111" dependencies = [ "bs58", "futures 0.3.21", @@ -7623,11 +8023,11 @@ dependencies = [ [[package]] name = "polkadot-node-network-protocol" -version = "0.9.16" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" +version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111" dependencies = [ "async-trait", - "derive_more", + "fatality", "futures 0.3.21", "parity-scale-codec", "polkadot-node-jaeger", @@ -7635,14 +8035,14 @@ dependencies = [ "polkadot-primitives", "sc-authority-discovery", "sc-network", - "strum 0.23.0", + "strum 0.24.0", "thiserror", ] [[package]] name = "polkadot-node-primitives" -version = "0.9.16" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" +version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111" dependencies = [ "bounded-vec", "futures 0.3.21", @@ -7663,8 +8063,8 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem" -version = "0.9.16" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" +version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111" dependencies = [ "polkadot-node-jaeger", "polkadot-node-subsystem-types", @@ -7673,8 +8073,8 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem-types" -version = "0.9.16" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" +version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111" dependencies = [ "derive_more", "futures 0.3.21", @@ -7692,16 +8092,21 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem-util" -version = "0.9.16" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" +version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111" dependencies = [ "async-trait", "derive_more", + "fatality", "futures 0.3.21", "itertools", + "kvdb", "lru 0.7.5", "metered-channel", + "parity-db", "parity-scale-codec", + "parity-util-mem", + "parking_lot 0.11.2", "pin-project 1.0.10", "polkadot-node-jaeger", "polkadot-node-metrics", @@ -7720,14 +8125,14 @@ dependencies = [ [[package]] name = "polkadot-overseer" -version = "0.9.16" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" +version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111" dependencies = [ "futures 0.3.21", "futures-timer", "lru 0.7.5", "parity-util-mem", - "parking_lot 0.11.2", + "parking_lot 0.12.0", "polkadot-node-metrics", "polkadot-node-network-protocol", "polkadot-node-primitives", @@ -7741,8 +8146,8 @@ dependencies = [ [[package]] name = "polkadot-overseer-gen" -version = "0.9.16" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" +version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111" dependencies = [ "async-trait", "futures 0.3.21", @@ -7758,9 +8163,10 @@ dependencies = [ [[package]] name = "polkadot-overseer-gen-proc-macro" -version = "0.9.16" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" +version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111" dependencies = [ + "expander 0.0.5", "proc-macro-crate 1.1.3", "proc-macro2", "quote", @@ -7769,8 +8175,8 @@ dependencies = [ [[package]] name = "polkadot-parachain" -version = "0.9.16" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" +version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111" dependencies = [ "derive_more", "frame-support", @@ -7786,8 +8192,8 @@ dependencies = [ [[package]] name = "polkadot-performance-test" -version = "0.9.16" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" +version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111" dependencies = [ "env_logger", "kusama-runtime", @@ -7801,8 +8207,8 @@ dependencies = [ [[package]] name = "polkadot-primitives" -version = "0.9.16" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" +version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111" dependencies = [ "bitvec", "frame-system", @@ -7831,8 +8237,8 @@ dependencies = [ [[package]] name = "polkadot-rpc" -version = "0.9.16" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" +version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111" dependencies = [ "beefy-gadget", "beefy-gadget-rpc", @@ -7862,8 +8268,8 @@ dependencies = [ [[package]] name = "polkadot-runtime" -version = "0.9.16" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" +version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111" dependencies = [ "beefy-primitives", "bitvec", @@ -7946,8 +8352,8 @@ dependencies = [ [[package]] name = "polkadot-runtime-common" -version = "0.9.16" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" +version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111" dependencies = [ "beefy-primitives", "bitvec", @@ -7993,8 +8399,8 @@ dependencies = [ [[package]] name = "polkadot-runtime-constants" -version = "0.9.16" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" +version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111" dependencies = [ "frame-support", "polkadot-primitives", @@ -8005,8 +8411,8 @@ dependencies = [ [[package]] name = "polkadot-runtime-metrics" -version = "0.9.16" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" +version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111" dependencies = [ "bs58", "parity-scale-codec", @@ -8017,8 +8423,8 @@ dependencies = [ [[package]] name = "polkadot-runtime-parachains" -version = "0.9.16" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" +version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111" dependencies = [ "bitflags", "bitvec", @@ -8052,14 +8458,15 @@ dependencies = [ "sp-session", "sp-staking", "sp-std", + "static_assertions", "xcm", "xcm-executor", ] [[package]] name = "polkadot-service" -version = "0.9.16" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" +version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111" dependencies = [ "async-trait", "beefy-gadget", @@ -8076,6 +8483,7 @@ dependencies = [ "pallet-mmr-primitives", "pallet-staking", "pallet-transaction-payment-rpc-runtime-api", + "parity-db", "polkadot-approval-distribution", "polkadot-availability-bitfield-distribution", "polkadot-availability-distribution", @@ -8158,11 +8566,11 @@ dependencies = [ [[package]] name = "polkadot-statement-distribution" -version = "0.9.16" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" +version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111" dependencies = [ "arrayvec 0.5.2", - "derive_more", + "fatality", "futures 0.3.21", "indexmap", "parity-scale-codec", @@ -8179,8 +8587,8 @@ dependencies = [ [[package]] name = "polkadot-statement-table" -version = "0.9.16" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" +version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111" dependencies = [ "parity-scale-codec", "polkadot-primitives", @@ -8231,13 +8639,12 @@ checksum = "eb9f9e6e233e5c4a35559a617bf40a4ec447db2e84c20b55a6f83167b7e57872" [[package]] name = "primitive-types" -version = "0.10.1" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05e4722c697a58a99d5d06a08c30821d7c082a4632198de1eaa5a6c22ef42373" +checksum = "e28720988bff275df1f51b171e1b2a18c30d194c4d2b61defdacecd625a5d94a" dependencies = [ "fixed-hash", "impl-codec", - "impl-rlp", "impl-serde", "scale-info", "uint", @@ -8405,9 +8812,9 @@ dependencies = [ [[package]] name = "radium" -version = "0.6.2" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "643f8f41a8ebc4c5dc4515c82bb8abd397b527fc20fd681b7c011c2aee5d44fb" +checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" [[package]] name = "rand" @@ -8531,12 +8938,6 @@ dependencies = [ "num_cpus", ] -[[package]] -name = "redox_syscall" -version = "0.1.57" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" - [[package]] name = "redox_syscall" version = "0.2.13" @@ -8553,7 +8954,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" dependencies = [ "getrandom 0.2.6", - "redox_syscall 0.2.13", + "redox_syscall", "thiserror", ] @@ -8642,10 +9043,10 @@ dependencies = [ [[package]] name = "remote-externalities" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "env_logger", - "jsonrpsee", + "jsonrpsee 0.8.0", "log", "parity-scale-codec", "serde", @@ -8732,21 +9133,11 @@ dependencies = [ "winapi 0.3.9", ] -[[package]] -name = "rlp" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "999508abb0ae792aabed2460c45b89106d97fe4adac593bdaef433c2605847b5" -dependencies = [ - "bytes 1.1.0", - "rustc-hex", -] - [[package]] name = "rocksdb" -version = "0.17.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a62eca5cacf2c8261128631bed9f045598d40bfbe4b29f5163f0f802f8f44a7" +checksum = "620f4129485ff1a7128d184bc687470c21c7951b64779ebc9cfdad3dcd920290" dependencies = [ "libc", "librocksdb-sys", @@ -8754,8 +9145,8 @@ dependencies = [ [[package]] name = "rococo-runtime" -version = "0.9.16" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" +version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111" dependencies = [ "beefy-primitives", "bp-messages", @@ -8829,8 +9220,8 @@ dependencies = [ [[package]] name = "rococo-runtime-constants" -version = "0.9.16" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" +version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111" dependencies = [ "frame-support", "polkadot-primitives", @@ -8853,15 +9244,16 @@ dependencies = [ name = "runtime-common" version = "3.1.5" dependencies = [ + "cumulus-pallet-dmp-queue", + "cumulus-pallet-parachain-system", "cumulus-pallet-xcm", + "cumulus-pallet-xcmp-queue", "cumulus-primitives-parachain-inherent", "cumulus-test-relay-sproof-builder", - "frame-benchmarking", "frame-support", "frame-system", - "log", - "manta-accounting", "manta-primitives", + "orml-traits", "orml-xtokens", "pallet-asset-manager", "pallet-assets", @@ -8874,8 +9266,6 @@ dependencies = [ "polkadot-parachain", "polkadot-runtime-parachains", "scale-info", - "smallvec", - "sp-consensus-aura", "sp-core", "sp-io", "sp-runtime", @@ -8945,8 +9335,20 @@ dependencies = [ "base64", "log", "ring", - "sct", - "webpki", + "sct 0.6.1", + "webpki 0.21.4", +] + +[[package]] +name = "rustls" +version = "0.20.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fbfeb8d0ddb84706bc597a5574ab8912817c52a397f819e5b614e2265206921" +dependencies = [ + "log", + "ring", + "sct 0.7.0", + "webpki 0.22.0", ] [[package]] @@ -8956,11 +9358,32 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a07b7c1885bd8ed3831c289b7870b13ef46fe0e856d288c30d9cc17d75a2092" dependencies = [ "openssl-probe", - "rustls", + "rustls 0.19.1", "schannel", "security-framework", ] +[[package]] +name = "rustls-native-certs" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ca9ebdfa27d3fc180e42879037b5338ab1c040c06affd00d8338598e7800943" +dependencies = [ + "openssl-probe", + "rustls-pemfile", + "schannel", + "security-framework", +] + +[[package]] +name = "rustls-pemfile" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5eebeaeb360c87bfb72e84abdb3447159c0eaececf1bef2aecd65a8be949d1c9" +dependencies = [ + "base64", +] + [[package]] name = "rustversion" version = "1.0.6" @@ -9005,7 +9428,7 @@ dependencies = [ [[package]] name = "sc-allocator" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "log", "sp-core", @@ -9016,10 +9439,9 @@ dependencies = [ [[package]] name = "sc-authority-discovery" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "async-trait", - "derive_more", "futures 0.3.21", "futures-timer", "ip_network", @@ -9038,12 +9460,13 @@ dependencies = [ "sp-keystore", "sp-runtime", "substrate-prometheus-endpoint", + "thiserror", ] [[package]] name = "sc-basic-authorship" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "futures 0.3.21", "futures-timer", @@ -9066,7 +9489,7 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "parity-scale-codec", "sc-client-api", @@ -9082,7 +9505,7 @@ dependencies = [ [[package]] name = "sc-chain-spec" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "impl-trait-for-tuples", "memmap2 0.5.3", @@ -9099,7 +9522,7 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "proc-macro-crate 1.1.3", "proc-macro2", @@ -9110,9 +9533,10 @@ dependencies = [ [[package]] name = "sc-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "chrono", + "clap 3.1.8", "fdlimit", "futures 0.3.21", "hex", @@ -9139,7 +9563,6 @@ dependencies = [ "sp-panic-handler", "sp-runtime", "sp-version", - "structopt", "thiserror", "tiny-bip39", "tokio", @@ -9148,14 +9571,14 @@ dependencies = [ [[package]] name = "sc-client-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "fnv", "futures 0.3.21", "hash-db", "log", "parity-scale-codec", - "parking_lot 0.11.2", + "parking_lot 0.12.0", "sc-executor", "sc-transaction-pool-api", "sc-utils", @@ -9176,7 +9599,7 @@ dependencies = [ [[package]] name = "sc-client-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "hash-db", "kvdb", @@ -9186,7 +9609,7 @@ dependencies = [ "log", "parity-db", "parity-scale-codec", - "parking_lot 0.11.2", + "parking_lot 0.12.0", "sc-client-api", "sc-state-db", "sp-arithmetic", @@ -9201,14 +9624,14 @@ dependencies = [ [[package]] name = "sc-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "async-trait", "futures 0.3.21", "futures-timer", "libp2p", "log", - "parking_lot 0.11.2", + "parking_lot 0.12.0", "sc-client-api", "sc-utils", "serde", @@ -9225,10 +9648,9 @@ dependencies = [ [[package]] name = "sc-consensus-aura" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "async-trait", - "derive_more", "futures 0.3.21", "log", "parity-scale-codec", @@ -9249,15 +9671,15 @@ dependencies = [ "sp-keystore", "sp-runtime", "substrate-prometheus-endpoint", + "thiserror", ] [[package]] name = "sc-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "async-trait", - "derive_more", "fork-tree", "futures 0.3.21", "log", @@ -9266,7 +9688,7 @@ dependencies = [ "num-rational 0.2.4", "num-traits", "parity-scale-codec", - "parking_lot 0.11.2", + "parking_lot 0.12.0", "rand 0.7.3", "retain_mut", "sc-client-api", @@ -9292,14 +9714,14 @@ dependencies = [ "sp-runtime", "sp-version", "substrate-prometheus-endpoint", + "thiserror", ] [[package]] name = "sc-consensus-babe-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ - "derive_more", "futures 0.3.21", "jsonrpc-core", "jsonrpc-core-client", @@ -9316,12 +9738,13 @@ dependencies = [ "sp-core", "sp-keystore", "sp-runtime", + "thiserror", ] [[package]] name = "sc-consensus-epochs" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "fork-tree", "parity-scale-codec", @@ -9334,7 +9757,7 @@ dependencies = [ [[package]] name = "sc-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "async-trait", "futures 0.3.21", @@ -9359,7 +9782,7 @@ dependencies = [ [[package]] name = "sc-consensus-uncles" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "sc-client-api", "sp-authorship", @@ -9370,14 +9793,12 @@ dependencies = [ [[package]] name = "sc-executor" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "lazy_static", - "libsecp256k1", - "log", "lru 0.6.6", "parity-scale-codec", - "parking_lot 0.11.2", + "parking_lot 0.12.0", "sc-executor-common", "sc-executor-wasmi", "sc-executor-wasmtime", @@ -9392,15 +9813,15 @@ dependencies = [ "sp-trie", "sp-version", "sp-wasm-interface", + "tracing", "wasmi", ] [[package]] name = "sc-executor-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ - "derive_more", "environmental", "parity-scale-codec", "sc-allocator", @@ -9416,7 +9837,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmi" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "log", "parity-scale-codec", @@ -9432,7 +9853,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "cfg-if 1.0.0", "libc", @@ -9450,18 +9871,19 @@ dependencies = [ [[package]] name = "sc-finality-grandpa" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ + "ahash", "async-trait", - "derive_more", "dyn-clone", "finality-grandpa", "fork-tree", "futures 0.3.21", "futures-timer", + "hex", "log", "parity-scale-codec", - "parking_lot 0.11.2", + "parking_lot 0.12.0", "rand 0.8.5", "sc-block-builder", "sc-chain-spec", @@ -9483,14 +9905,14 @@ dependencies = [ "sp-keystore", "sp-runtime", "substrate-prometheus-endpoint", + "thiserror", ] [[package]] name = "sc-finality-grandpa-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ - "derive_more", "finality-grandpa", "futures 0.3.21", "jsonrpc-core", @@ -9507,12 +9929,13 @@ dependencies = [ "sp-blockchain", "sp-core", "sp-runtime", + "thiserror", ] [[package]] name = "sc-informant" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "ansi_term", "futures 0.3.21", @@ -9529,30 +9952,28 @@ dependencies = [ [[package]] name = "sc-keystore" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "async-trait", - "derive_more", "hex", - "parking_lot 0.11.2", + "parking_lot 0.12.0", "serde_json", "sp-application-crypto", "sp-core", "sp-keystore", + "thiserror", ] [[package]] name = "sc-network" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ - "async-std", "async-trait", "asynchronous-codec 0.5.0", "bitflags", "bytes 1.1.0", "cid", - "derive_more", "either", "fnv", "fork-tree", @@ -9566,7 +9987,7 @@ dependencies = [ "log", "lru 0.7.5", "parity-scale-codec", - "parking_lot 0.11.2", + "parking_lot 0.12.0", "pin-project 1.0.10", "prost", "prost-build", @@ -9595,8 +10016,9 @@ dependencies = [ [[package]] name = "sc-network-gossip" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ + "ahash", "futures 0.3.21", "futures-timer", "libp2p", @@ -9611,7 +10033,7 @@ dependencies = [ [[package]] name = "sc-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "bytes 1.1.0", "fnv", @@ -9619,11 +10041,11 @@ dependencies = [ "futures-timer", "hex", "hyper", - "hyper-rustls", + "hyper-rustls 0.22.1", "num_cpus", "once_cell", "parity-scale-codec", - "parking_lot 0.11.2", + "parking_lot 0.12.0", "rand 0.7.3", "sc-client-api", "sc-network", @@ -9639,7 +10061,7 @@ dependencies = [ [[package]] name = "sc-peerset" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "futures 0.3.21", "libp2p", @@ -9652,7 +10074,7 @@ dependencies = [ [[package]] name = "sc-proposer-metrics" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -9661,7 +10083,7 @@ dependencies = [ [[package]] name = "sc-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "futures 0.3.21", "hash-db", @@ -9669,7 +10091,7 @@ dependencies = [ "jsonrpc-pubsub", "log", "parity-scale-codec", - "parking_lot 0.11.2", + "parking_lot 0.12.0", "sc-block-builder", "sc-chain-spec", "sc-client-api", @@ -9692,7 +10114,7 @@ dependencies = [ [[package]] name = "sc-rpc-api" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "futures 0.3.21", "jsonrpc-core", @@ -9701,7 +10123,7 @@ dependencies = [ "jsonrpc-pubsub", "log", "parity-scale-codec", - "parking_lot 0.11.2", + "parking_lot 0.12.0", "sc-chain-spec", "sc-transaction-pool-api", "serde", @@ -9717,7 +10139,7 @@ dependencies = [ [[package]] name = "sc-rpc-server" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "futures 0.3.21", "jsonrpc-core", @@ -9734,7 +10156,7 @@ dependencies = [ [[package]] name = "sc-service" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "async-trait", "directories", @@ -9747,7 +10169,7 @@ dependencies = [ "log", "parity-scale-codec", "parity-util-mem", - "parking_lot 0.11.2", + "parking_lot 0.12.0", "pin-project 1.0.10", "rand 0.7.3", "sc-block-builder", @@ -9798,13 +10220,13 @@ dependencies = [ [[package]] name = "sc-state-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "log", "parity-scale-codec", "parity-util-mem", "parity-util-mem-derive", - "parking_lot 0.11.2", + "parking_lot 0.12.0", "sc-client-api", "sp-core", ] @@ -9812,7 +10234,7 @@ dependencies = [ [[package]] name = "sc-sync-state-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "jsonrpc-core", "jsonrpc-core-client", @@ -9823,7 +10245,6 @@ dependencies = [ "sc-consensus-babe", "sc-consensus-epochs", "sc-finality-grandpa", - "sc-rpc-api", "serde", "serde_json", "sp-blockchain", @@ -9834,13 +10255,13 @@ dependencies = [ [[package]] name = "sc-telemetry" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "chrono", "futures 0.3.21", "libp2p", "log", - "parking_lot 0.11.2", + "parking_lot 0.12.0", "pin-project 1.0.10", "rand 0.7.3", "serde", @@ -9852,7 +10273,7 @@ dependencies = [ [[package]] name = "sc-tracing" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "ansi_term", "atty", @@ -9861,7 +10282,7 @@ dependencies = [ "libc", "log", "once_cell", - "parking_lot 0.11.2", + "parking_lot 0.12.0", "regex", "rustc-hash", "sc-client-api", @@ -9883,7 +10304,7 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "proc-macro-crate 1.1.3", "proc-macro2", @@ -9894,7 +10315,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "futures 0.3.21", "futures-timer", @@ -9902,7 +10323,7 @@ dependencies = [ "log", "parity-scale-codec", "parity-util-mem", - "parking_lot 0.11.2", + "parking_lot 0.12.0", "retain_mut", "sc-client-api", "sc-transaction-pool-api", @@ -9921,9 +10342,8 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ - "derive_more", "futures 0.3.21", "log", "serde", @@ -9935,20 +10355,21 @@ dependencies = [ [[package]] name = "sc-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "futures 0.3.21", "futures-timer", "lazy_static", - "parking_lot 0.11.2", + "log", + "parking_lot 0.12.0", "prometheus", ] [[package]] name = "scale-info" -version = "1.0.0" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c55b744399c25532d63a0d2789b109df8d46fc93752d46b0782991a931a782f" +checksum = "21fe4ca2b2295d5519b364579162b8e18f4902f6c9e8a975e7d05e7ef63622f5" dependencies = [ "bitvec", "cfg-if 1.0.0", @@ -9960,9 +10381,9 @@ dependencies = [ [[package]] name = "scale-info-derive" -version = "1.0.0" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baeb2780690380592f86205aa4ee49815feb2acad8c2f59e6dd207148c3f1fcd" +checksum = "e767e52f2d5b2e71e86b1c82976bf4c3acdef88d72af7fa3498cef31cd9708cb" dependencies = [ "proc-macro-crate 1.1.3", "proc-macro2", @@ -10020,6 +10441,47 @@ dependencies = [ "untrusted", ] +[[package]] +name = "sct" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d53dcdb7c9f8158937a7981b48accfd39a43af418591a5d008c7b22b5e1b7ca4" +dependencies = [ + "ring", + "untrusted", +] + +[[package]] +name = "sec1" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08da66b8b0965a5555b6bd6639e68ccba85e1e2506f5fbb089e93f8a04e1a2d1" +dependencies = [ + "der", + "generic-array 0.14.5", + "pkcs8", + "subtle", + "zeroize", +] + +[[package]] +name = "secp256k1" +version = "0.21.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c42e6f1735c5f00f51e43e28d6634141f2bcad10931b2609ddd74a86d751260" +dependencies = [ + "secp256k1-sys", +] + +[[package]] +name = "secp256k1-sys" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "957da2573cde917463ece3570eab4a0b3f19de6f1646cde62e6fd3868f566036" +dependencies = [ + "cc", +] + [[package]] name = "secrecy" version = "0.8.0" @@ -10135,6 +10597,15 @@ dependencies = [ "serde", ] +[[package]] +name = "serde_nanos" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e44969a61f5d316be20a42ff97816efb3b407a924d06824c3d8a49fa8450de0e" +dependencies = [ + "serde", +] + [[package]] name = "serde_urlencoded" version = "0.7.1" @@ -10220,6 +10691,16 @@ dependencies = [ "opaque-debug 0.3.0", ] +[[package]] +name = "sha3" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "881bf8156c87b6301fc5ca6b27f11eeb2761224c7081e69b409d5a1951a70c86" +dependencies = [ + "digest 0.10.3", + "keccak", +] + [[package]] name = "sharded-slab" version = "0.1.4" @@ -10256,9 +10737,12 @@ dependencies = [ [[package]] name = "signature" -version = "1.5.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f054c6c1a6e95179d6f23ed974060dcefb2d9388bb7256900badad682c499de4" +checksum = "02658e48d89f2bec991f9a78e69cfa4c316f8d6a6c4ec12fae1aeb263d486788" +dependencies = [ + "rand_core 0.6.3", +] [[package]] name = "simba" @@ -10280,8 +10764,8 @@ checksum = "eb703cfe953bccee95685111adeedb76fabe4e97549a58d16f03ea7b9367bb32" [[package]] name = "slot-range-helper" -version = "0.9.16" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" +version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111" dependencies = [ "enumn", "parity-scale-codec", @@ -10369,7 +10853,7 @@ dependencies = [ [[package]] name = "sp-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "hash-db", "log", @@ -10386,9 +10870,9 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ - "blake2-rfc", + "blake2 0.10.4", "proc-macro-crate 1.1.3", "proc-macro2", "quote", @@ -10397,8 +10881,8 @@ dependencies = [ [[package]] name = "sp-application-crypto" -version = "4.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +version = "6.0.0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "parity-scale-codec", "scale-info", @@ -10410,8 +10894,8 @@ dependencies = [ [[package]] name = "sp-arithmetic" -version = "4.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +version = "5.0.0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "integer-sqrt", "num-traits", @@ -10426,7 +10910,7 @@ dependencies = [ [[package]] name = "sp-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "parity-scale-codec", "scale-info", @@ -10439,7 +10923,7 @@ dependencies = [ [[package]] name = "sp-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "async-trait", "parity-scale-codec", @@ -10451,7 +10935,7 @@ dependencies = [ [[package]] name = "sp-block-builder" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "parity-scale-codec", "sp-api", @@ -10463,13 +10947,13 @@ dependencies = [ [[package]] name = "sp-blockchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "futures 0.3.21", "log", "lru 0.7.5", "parity-scale-codec", - "parking_lot 0.11.2", + "parking_lot 0.12.0", "sp-api", "sp-consensus", "sp-database", @@ -10481,7 +10965,7 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "async-trait", "futures 0.3.21", @@ -10500,7 +10984,7 @@ dependencies = [ [[package]] name = "sp-consensus-aura" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "async-trait", "parity-scale-codec", @@ -10518,7 +11002,7 @@ dependencies = [ [[package]] name = "sp-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "async-trait", "merlin", @@ -10541,19 +11025,21 @@ dependencies = [ [[package]] name = "sp-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "parity-scale-codec", "scale-info", "serde", "sp-arithmetic", "sp-runtime", + "sp-std", + "sp-timestamp", ] [[package]] name = "sp-consensus-vrf" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "parity-scale-codec", "schnorrkel", @@ -10564,8 +11050,8 @@ dependencies = [ [[package]] name = "sp-core" -version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +version = "6.0.0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "base58", "bitflags", @@ -10585,15 +11071,15 @@ dependencies = [ "num-traits", "parity-scale-codec", "parity-util-mem", - "parking_lot 0.11.2", + "parking_lot 0.12.0", "primitive-types", "rand 0.7.3", "regex", "scale-info", "schnorrkel", + "secp256k1", "secrecy", "serde", - "sha2 0.10.2", "sp-core-hashing", "sp-debug-derive", "sp-externalities", @@ -10604,8 +11090,6 @@ dependencies = [ "substrate-bip39", "thiserror", "tiny-bip39", - "tiny-keccak", - "twox-hash", "wasmi", "zeroize", ] @@ -10613,20 +11097,21 @@ dependencies = [ [[package]] name = "sp-core-hashing" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ - "blake2-rfc", + "blake2 0.10.4", "byteorder", + "digest 0.10.3", "sha2 0.10.2", + "sha3 0.10.1", "sp-std", - "tiny-keccak", "twox-hash", ] [[package]] name = "sp-core-hashing-proc-macro" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +version = "5.0.0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "proc-macro2", "quote", @@ -10637,16 +11122,16 @@ dependencies = [ [[package]] name = "sp-database" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "kvdb", - "parking_lot 0.11.2", + "parking_lot 0.12.0", ] [[package]] name = "sp-debug-derive" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "proc-macro2", "quote", @@ -10655,8 +11140,8 @@ dependencies = [ [[package]] name = "sp-externalities" -version = "0.10.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +version = "0.12.0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "environmental", "parity-scale-codec", @@ -10667,7 +11152,7 @@ dependencies = [ [[package]] name = "sp-finality-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "finality-grandpa", "log", @@ -10685,7 +11170,7 @@ dependencies = [ [[package]] name = "sp-inherents" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -10698,15 +11183,16 @@ dependencies = [ [[package]] name = "sp-io" -version = "4.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +version = "6.0.0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "futures 0.3.21", "hash-db", "libsecp256k1", "log", "parity-scale-codec", - "parking_lot 0.11.2", + "parking_lot 0.12.0", + "secp256k1", "sp-core", "sp-externalities", "sp-keystore", @@ -10722,44 +11208,45 @@ dependencies = [ [[package]] name = "sp-keyring" -version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +version = "6.0.0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "lazy_static", "sp-core", "sp-runtime", - "strum 0.22.0", + "strum 0.23.0", ] [[package]] name = "sp-keystore" -version = "0.10.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +version = "0.12.0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "async-trait", - "derive_more", "futures 0.3.21", "merlin", "parity-scale-codec", - "parking_lot 0.11.2", + "parking_lot 0.12.0", "schnorrkel", "serde", "sp-core", "sp-externalities", + "thiserror", ] [[package]] name = "sp-maybe-compressed-blob" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ + "thiserror", "zstd", ] [[package]] name = "sp-npos-elections" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "parity-scale-codec", "scale-info", @@ -10774,7 +11261,7 @@ dependencies = [ [[package]] name = "sp-npos-elections-solution-type" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "proc-macro-crate 1.1.3", "proc-macro2", @@ -10785,7 +11272,7 @@ dependencies = [ [[package]] name = "sp-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "sp-api", "sp-core", @@ -10795,7 +11282,7 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "backtrace", "lazy_static", @@ -10804,8 +11291,8 @@ dependencies = [ [[package]] name = "sp-rpc" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +version = "6.0.0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "rustc-hash", "serde", @@ -10814,8 +11301,8 @@ dependencies = [ [[package]] name = "sp-runtime" -version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +version = "6.0.0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "either", "hash256-std-hasher", @@ -10836,8 +11323,8 @@ dependencies = [ [[package]] name = "sp-runtime-interface" -version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +version = "6.0.0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -10853,8 +11340,8 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" -version = "4.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +version = "5.0.0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "Inflector", "proc-macro-crate 1.1.3", @@ -10866,7 +11353,7 @@ dependencies = [ [[package]] name = "sp-serializer" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "serde", "serde_json", @@ -10875,7 +11362,7 @@ dependencies = [ [[package]] name = "sp-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "parity-scale-codec", "scale-info", @@ -10889,7 +11376,7 @@ dependencies = [ [[package]] name = "sp-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "parity-scale-codec", "scale-info", @@ -10899,14 +11386,14 @@ dependencies = [ [[package]] name = "sp-state-machine" -version = "0.10.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +version = "0.12.0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "hash-db", "log", "num-traits", "parity-scale-codec", - "parking_lot 0.11.2", + "parking_lot 0.12.0", "rand 0.7.3", "smallvec", "sp-core", @@ -10923,12 +11410,12 @@ dependencies = [ [[package]] name = "sp-std" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" [[package]] name = "sp-storage" -version = "4.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +version = "6.0.0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "impl-serde", "parity-scale-codec", @@ -10941,7 +11428,7 @@ dependencies = [ [[package]] name = "sp-tasks" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "log", "sp-core", @@ -10954,7 +11441,7 @@ dependencies = [ [[package]] name = "sp-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "async-trait", "futures-timer", @@ -10969,8 +11456,8 @@ dependencies = [ [[package]] name = "sp-tracing" -version = "4.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +version = "5.0.0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "parity-scale-codec", "sp-std", @@ -10982,7 +11469,7 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "sp-api", "sp-runtime", @@ -10991,7 +11478,7 @@ dependencies = [ [[package]] name = "sp-transaction-storage-proof" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "async-trait", "log", @@ -11006,8 +11493,8 @@ dependencies = [ [[package]] name = "sp-trie" -version = "4.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +version = "6.0.0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "hash-db", "memory-db", @@ -11015,14 +11502,15 @@ dependencies = [ "scale-info", "sp-core", "sp-std", + "thiserror", "trie-db", "trie-root", ] [[package]] name = "sp-version" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +version = "5.0.0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "impl-serde", "parity-scale-codec", @@ -11039,7 +11527,7 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "parity-scale-codec", "proc-macro2", @@ -11049,8 +11537,8 @@ dependencies = [ [[package]] name = "sp-wasm-interface" -version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +version = "6.0.0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "impl-trait-for-tuples", "log", @@ -11066,6 +11554,16 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" +[[package]] +name = "spki" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44d01ac02a6ccf3e07db148d2be087da624fea0221a16152ed01f0496a6b0a27" +dependencies = [ + "base64ct", + "der", +] + [[package]] name = "ss58-registry" version = "1.17.0" @@ -11133,71 +11631,48 @@ dependencies = [ [[package]] name = "strsim" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" - -[[package]] -name = "structopt" -version = "0.3.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c6b5c64445ba8094a6ab0c3cd2ad323e07171012d9c98b0b15651daf1787a10" -dependencies = [ - "clap", - "lazy_static", - "structopt-derive", -] - -[[package]] -name = "structopt-derive" -version = "0.4.18" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcb5ae327f9cc13b68763b5749770cb9e048a99bd9dfdfa58d0cf05d5f64afe0" -dependencies = [ - "heck 0.3.3", - "proc-macro-error", - "proc-macro2", - "quote", - "syn", -] +checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" [[package]] name = "strum" -version = "0.22.0" +version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7ac893c7d471c8a21f31cfe213ec4f6d9afeed25537c772e08ef3f005f8729e" +checksum = "cae14b91c7d11c9a851d3fbc80a963198998c2a64eec840477fa92d8ce9b70bb" dependencies = [ - "strum_macros 0.22.0", + "strum_macros 0.23.1", ] [[package]] name = "strum" -version = "0.23.0" +version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cae14b91c7d11c9a851d3fbc80a963198998c2a64eec840477fa92d8ce9b70bb" +checksum = "e96acfc1b70604b8b2f1ffa4c57e59176c7dbb05d556c71ecd2f5498a1dee7f8" dependencies = [ - "strum_macros 0.23.1", + "strum_macros 0.24.0", ] [[package]] name = "strum_macros" -version = "0.22.0" +version = "0.23.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "339f799d8b549e3744c7ac7feb216383e4005d94bdb22561b3ab8f3b808ae9fb" +checksum = "5bb0dc7ee9c15cea6199cde9a127fa16a4c5819af85395457ad72d68edc85a38" dependencies = [ "heck 0.3.3", "proc-macro2", "quote", + "rustversion", "syn", ] [[package]] name = "strum_macros" -version = "0.23.1" +version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bb0dc7ee9c15cea6199cde9a127fa16a4c5819af85395457ad72d68edc85a38" +checksum = "6878079b17446e4d3eba6192bb0a2950d5b14f0ed8424b852310e5a94345d0ef" dependencies = [ - "heck 0.3.3", + "heck 0.4.0", "proc-macro2", "quote", "rustversion", @@ -11220,7 +11695,7 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "platforms", ] @@ -11228,7 +11703,7 @@ dependencies = [ [[package]] name = "substrate-frame-rpc-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "frame-system-rpc-runtime-api", "futures 0.3.21", @@ -11250,26 +11725,26 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ - "async-std", - "derive_more", "futures-util", "hyper", "log", "prometheus", + "thiserror", "tokio", ] [[package]] name = "substrate-wasm-builder" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ "ansi_term", "build-helper", "cargo_metadata", "sp-maybe-compressed-blob", + "strum 0.23.0", "tempfile", "toml", "walkdir", @@ -11326,7 +11801,7 @@ dependencies = [ "cfg-if 1.0.0", "fastrand", "libc", - "redox_syscall 0.2.13", + "redox_syscall", "remove_dir_all", "winapi 0.3.9", ] @@ -11349,6 +11824,12 @@ dependencies = [ "unicode-width", ] +[[package]] +name = "textwrap" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1141d4d61095b28419e22cb0bbf02755f5e54e0526f97f1e3d1d160e60885fb" + [[package]] name = "thiserror" version = "1.0.30" @@ -11400,6 +11881,17 @@ dependencies = [ "threadpool", ] +[[package]] +name = "tikv-jemalloc-sys" +version = "0.4.3+5.2.1-patched.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1792ccb507d955b46af42c123ea8863668fae24d03721e40cad6a41773dbb49" +dependencies = [ + "cc", + "fs_extra", + "libc", +] + [[package]] name = "time" version = "0.1.44" @@ -11430,15 +11922,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "tiny-keccak" -version = "2.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" -dependencies = [ - "crunchy", -] - [[package]] name = "tinytemplate" version = "1.2.1" @@ -11476,6 +11959,7 @@ dependencies = [ "mio 0.8.2", "num_cpus", "once_cell", + "parking_lot 0.12.0", "pin-project-lite 0.2.8", "signal-hook-registry", "socket2 0.4.4", @@ -11510,9 +11994,20 @@ version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bc6844de72e57df1980054b38be3a9f4702aba4858be64dd700181a8a6d0e1b6" dependencies = [ - "rustls", + "rustls 0.19.1", "tokio", - "webpki", + "webpki 0.21.4", +] + +[[package]] +name = "tokio-rustls" +version = "0.23.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4151fda0cf2798550ad0b34bcfc9b9dcc2a9d2471c895c68f3a8818e54f2389e" +dependencies = [ + "rustls 0.20.4", + "tokio", + "webpki 0.22.0", ] [[package]] @@ -11731,9 +12226,10 @@ checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" [[package]] name = "try-runtime-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.16#19162e43be45817b44c7d48e50d03f074f60fbf4" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65" dependencies = [ - "jsonrpsee", + "clap 3.1.8", + "jsonrpsee 0.4.1", "log", "parity-scale-codec", "remote-externalities", @@ -11749,7 +12245,6 @@ dependencies = [ "sp-runtime", "sp-state-machine", "sp-version", - "structopt", "zstd", ] @@ -11766,6 +12261,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ee73e6e4924fe940354b8d4d98cad5231175d615cd855b758adc658c0aac6a0" dependencies = [ "cfg-if 1.0.0", + "digest 0.10.3", "rand 0.8.5", "static_assertions", ] @@ -11933,12 +12429,6 @@ version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" -[[package]] -name = "vec_map" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" - [[package]] name = "version_check" version = "0.9.4" @@ -12300,13 +12790,32 @@ dependencies = [ "untrusted", ] +[[package]] +name = "webpki" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f095d78192e208183081cc07bc5515ef55216397af48b873e5edcd72637fa1bd" +dependencies = [ + "ring", + "untrusted", +] + [[package]] name = "webpki-roots" version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aabe153544e473b775453675851ecc86863d2a81d786d741f6b76778f2a48940" dependencies = [ - "webpki", + "webpki 0.21.4", +] + +[[package]] +name = "webpki-roots" +version = "0.22.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44d8de8415c823c8abd270ad483c6feeac771fad964890779f9a8cb24fbbc1bf" +dependencies = [ + "webpki 0.22.0", ] [[package]] @@ -12320,8 +12829,8 @@ dependencies = [ [[package]] name = "westend-runtime" -version = "0.9.16" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" +version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111" dependencies = [ "beefy-primitives", "bitvec", @@ -12406,8 +12915,8 @@ dependencies = [ [[package]] name = "westend-runtime-constants" -version = "0.9.16" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" +version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111" dependencies = [ "frame-support", "polkadot-primitives", @@ -12555,9 +13064,12 @@ dependencies = [ [[package]] name = "wyz" -version = "0.2.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85e60b0d1b5f99db2556934e21937020776a5d31520bf169e851ac44e6420214" +checksum = "30b31594f29d27036c383b53b59ed3476874d518f0efb151b27a4c275141390e" +dependencies = [ + "tap", +] [[package]] name = "x25519-dalek" @@ -12572,8 +13084,8 @@ dependencies = [ [[package]] name = "xcm" -version = "0.9.16" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" +version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111" dependencies = [ "derivative", "impl-trait-for-tuples", @@ -12585,8 +13097,8 @@ dependencies = [ [[package]] name = "xcm-builder" -version = "0.9.16" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" +version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111" dependencies = [ "frame-support", "frame-system", @@ -12605,8 +13117,8 @@ dependencies = [ [[package]] name = "xcm-executor" -version = "0.9.16" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" +version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111" dependencies = [ "frame-benchmarking", "frame-support", @@ -12624,7 +13136,7 @@ dependencies = [ [[package]] name = "xcm-procedural" version = "0.1.0" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111" dependencies = [ "Inflector", "proc-macro2", @@ -12634,8 +13146,8 @@ dependencies = [ [[package]] name = "xcm-simulator" -version = "0.9.16" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.16#41ab002d7451766324a9f314fee11c9c53314350" +version = "0.9.18" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111" dependencies = [ "frame-support", "parity-scale-codec", diff --git a/node/Cargo.toml b/node/Cargo.toml index 78710c3ac..c7a8d88d5 100644 --- a/node/Cargo.toml +++ b/node/Cargo.toml @@ -14,77 +14,78 @@ version = '3.1.5' targets = ['x86_64-unknown-linux-gnu'] [dependencies] -log = "0.4.13" -codec = { package = 'parity-scale-codec', version = '2.3.1' } +clap = { version = "3.1", features = ["derive"] } +log = "0.4.16" +codec = { package = 'parity-scale-codec', version = '3.0.0' } cfg-if = "1.0.0" -structopt = "0.3.8" serde = { version = "1.0.137", features = ["derive"] } -hex-literal = "0.3.3" -async-trait = "0.1.42" -futures = "0.3.14" +hex-literal = "0.3.4" +async-trait = "0.1.52" +futures = "0.3.21" # Substrate frames -frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.16" } -frame-benchmarking-cli = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.16" } -try-runtime-cli = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.16", optional = true } +frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.18" } +frame-benchmarking-cli = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.18" } +try-runtime-cli = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18", optional = true } # RPC related dependencies jsonrpc-core = "18.0.0" -frame-rpc-system = { package = "substrate-frame-rpc-system", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.16" } -pallet-transaction-payment-rpc = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.16" } -sc-transaction-pool-api = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.16" } +frame-rpc-system = { package = "substrate-frame-rpc-system", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +pallet-transaction-payment-rpc = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.18" } +sc-transaction-pool-api = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } # Substrate client dependencies -sc-basic-authorship = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.16" } -sc-chain-spec = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.16" } -sc-cli = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.16" } -sc-consensus = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.16" } -sc-executor = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.16" } -sc-client-api = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.16" } -sc-keystore = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.16" } -sc-network = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.16" } -sc-rpc = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.16" } -sc-rpc-api = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.16" } -sc-service = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.16" } -sc-telemetry = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.16" } -sc-transaction-pool = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.16" } -sc-tracing = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.16" } +sc-basic-authorship = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.18" } +sc-chain-spec = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.18" } +sc-cli = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.18" } +sc-consensus = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.18" } +sc-executor = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.18" } +sc-client-api = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.18" } +sc-keystore = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.18" } +sc-network = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sc-rpc = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.18" } +sc-rpc-api = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.18" } +sc-service = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.18" } +sc-telemetry = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.18" } +sc-transaction-pool = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.18" } +sc-tracing = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.18" } # Substrate primitives -sp-api = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.16" } -sp-block-builder = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.16" } -sp-consensus = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.16" } -sp-consensus-aura = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.16" } -sp-blockchain = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.16" } -sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.16" } -sp-inherents = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.16" } -sp-keystore = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.16" } -sp-offchain = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.16" } -sp-io = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.16" } -sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.16" } -sp-session = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.16" } -sp-timestamp = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.16" } -sp-transaction-pool = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.16" } -substrate-prometheus-endpoint = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.16" } +sp-api = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.18" } +sp-block-builder = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.18" } +sp-consensus = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.18" } +sp-consensus-aura = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.18" } +sp-blockchain = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.18" } +sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.18" } +sp-inherents = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.18" } +sp-keystore = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-offchain = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.18" } +sp-io = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.18" } +sp-session = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.18" } +sp-timestamp = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.18" } +sp-transaction-pool = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.18" } +substrate-prometheus-endpoint = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } # Cumulus dependencies -cumulus-client-cli = { git = 'https://github.com/paritytech/cumulus.git', branch = "polkadot-v0.9.16" } -cumulus-client-consensus-common = { git = 'https://github.com/paritytech/cumulus.git', branch = "polkadot-v0.9.16" } -cumulus-client-consensus-aura = { git = 'https://github.com/paritytech/cumulus.git', branch = "polkadot-v0.9.16" } -cumulus-client-consensus-relay-chain = { git = 'https://github.com/paritytech/cumulus.git', branch = "polkadot-v0.9.16" } -cumulus-client-network = { git = 'https://github.com/paritytech/cumulus.git', branch = "polkadot-v0.9.16" } -cumulus-primitives-core = { git = 'https://github.com/paritytech/cumulus.git', branch = "polkadot-v0.9.16" } -cumulus-primitives-parachain-inherent = { git = 'https://github.com/paritytech/cumulus.git', branch = "polkadot-v0.9.16" } -cumulus-client-service = { git = 'https://github.com/paritytech/cumulus.git', branch = "polkadot-v0.9.16" } -cumulus-relay-chain-interface = { git = 'https://github.com/paritytech/cumulus.git', branch = "polkadot-v0.9.16" } -cumulus-relay-chain-local = { git = 'https://github.com/paritytech/cumulus.git', branch = "polkadot-v0.9.16" } +cumulus-client-cli = { git = 'https://github.com/paritytech/cumulus.git', branch = "polkadot-v0.9.18" } +cumulus-client-consensus-common = { git = 'https://github.com/paritytech/cumulus.git', branch = "polkadot-v0.9.18" } +cumulus-client-consensus-aura = { git = 'https://github.com/paritytech/cumulus.git', branch = "polkadot-v0.9.18" } +cumulus-client-consensus-relay-chain = { git = 'https://github.com/paritytech/cumulus.git', branch = "polkadot-v0.9.18" } +cumulus-client-network = { git = 'https://github.com/paritytech/cumulus.git', branch = "polkadot-v0.9.18" } +cumulus-primitives-core = { git = 'https://github.com/paritytech/cumulus.git', branch = "polkadot-v0.9.18" } +cumulus-primitives-parachain-inherent = { git = 'https://github.com/paritytech/cumulus.git', branch = "polkadot-v0.9.18" } +cumulus-client-service = { git = 'https://github.com/paritytech/cumulus.git', branch = "polkadot-v0.9.18" } +cumulus-relay-chain-interface = { git = 'https://github.com/paritytech/cumulus.git', branch = "polkadot-v0.9.18" } +cumulus-relay-chain-rpc-interface = { git = 'https://github.com/paritytech/cumulus.git', branch = "polkadot-v0.9.18" } +cumulus-relay-chain-inprocess-interface = { git = 'https://github.com/paritytech/cumulus.git', branch = "polkadot-v0.9.18" } # Polkadot dependencies -polkadot-cli = { git = 'https://github.com/paritytech/polkadot.git', branch = "release-v0.9.16" } -polkadot-parachain = { git = 'https://github.com/paritytech/polkadot.git', branch = "release-v0.9.16" } -polkadot-primitives = { git = 'https://github.com/paritytech/polkadot.git', branch = "release-v0.9.16" } -polkadot-service = { git = 'https://github.com/paritytech/polkadot.git', branch = "release-v0.9.16" } -xcm = { git = "https://github.com/paritytech/polkadot.git", branch = "release-v0.9.16" } +polkadot-cli = { git = 'https://github.com/paritytech/polkadot.git', branch = "release-v0.9.18" } +polkadot-parachain = { git = 'https://github.com/paritytech/polkadot.git', branch = "release-v0.9.18" } +polkadot-primitives = { git = 'https://github.com/paritytech/polkadot.git', branch = "release-v0.9.18" } +polkadot-service = { git = 'https://github.com/paritytech/polkadot.git', branch = "release-v0.9.18" } +xcm = { git = "https://github.com/paritytech/polkadot.git", branch = "release-v0.9.18" } # Self dependencies calamari-runtime = { path = '../runtime/calamari' } @@ -93,7 +94,7 @@ dolphin-runtime = { path = '../runtime/dolphin' } manta-primitives = { path = '../primitives' } [build-dependencies] -substrate-build-script-utils = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.16" } +substrate-build-script-utils = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.18" } [features] runtime-benchmarks = [ diff --git a/node/src/cli.rs b/node/src/cli.rs index 2b2f368e1..5d73e5964 100644 --- a/node/src/cli.rs +++ b/node/src/cli.rs @@ -15,18 +15,18 @@ // along with Manta. If not, see . use crate::chain_specs; +use clap::Parser; use std::path::PathBuf; -use structopt::StructOpt; /// Sub-commands supported by the collator. -#[derive(Debug, StructOpt)] +#[derive(Debug, clap::Subcommand)] pub enum Subcommand { /// Export the genesis state of the parachain. - #[structopt(name = "export-genesis-state")] + #[clap(name = "export-genesis-state")] ExportGenesisState(ExportGenesisStateCommand), /// Export the genesis wasm of the parachain. - #[structopt(name = "export-genesis-wasm")] + #[clap(name = "export-genesis-wasm")] ExportGenesisWasm(ExportGenesisWasmCommand), /// Build a chain specification. @@ -51,7 +51,7 @@ pub enum Subcommand { Revert(sc_cli::RevertCmd), /// The custom benchmark subcommmand benchmarking runtime pallets. - #[structopt(name = "benchmark", about = "Benchmark runtime pallets.")] + #[clap(name = "benchmark", about = "Benchmark runtime pallets.")] Benchmark(frame_benchmarking_cli::BenchmarkCmd), /// Try some command against runtime state. @@ -65,58 +65,58 @@ pub enum Subcommand { } /// Command for exporting the genesis state of the parachain -#[derive(Debug, StructOpt)] +#[derive(Debug, Parser)] pub struct ExportGenesisStateCommand { /// Output file name or stdout if unspecified. - #[structopt(parse(from_os_str))] + #[clap(parse(from_os_str))] pub output: Option, /// Id of the parachain this state is for. /// /// Default: 2084 - #[structopt(long)] + #[clap(long)] pub parachain_id: Option, /// Write output in binary. Default is to write in hex. - #[structopt(short, long)] + #[clap(short, long)] pub raw: bool, /// The name of the chain for that the genesis state should be exported. - #[structopt(long)] + #[clap(long)] pub chain: Option, } /// Command for exporting the genesis wasm file. -#[derive(Debug, StructOpt)] +#[derive(Debug, Parser)] pub struct ExportGenesisWasmCommand { /// Output file name or stdout if unspecified. - #[structopt(parse(from_os_str))] + #[clap(parse(from_os_str))] pub output: Option, /// Write output in binary. Default is to write in hex. - #[structopt(short, long)] + #[clap(short, long)] pub raw: bool, /// The name of the chain for that the genesis wasm file should be exported. - #[structopt(long)] + #[clap(long)] pub chain: Option, } -#[derive(Debug, StructOpt)] -#[structopt(settings = &[ - structopt::clap::AppSettings::GlobalVersion, - structopt::clap::AppSettings::ArgsNegateSubcommands, - structopt::clap::AppSettings::SubcommandsNegateReqs, -])] +#[derive(Debug, Parser)] +#[clap( + propagate_version = true, + args_conflicts_with_subcommands = true, + subcommand_negates_reqs = true +)] pub struct Cli { - #[structopt(subcommand)] + #[clap(subcommand)] pub subcommand: Option, - #[structopt(flatten)] + #[clap(flatten)] pub run: cumulus_client_cli::RunCmd, /// Relaychain arguments - #[structopt(raw = true)] + #[clap(raw = true)] pub relaychain_args: Vec, } @@ -147,7 +147,7 @@ impl RelayChainCli { Self { base_path, chain_id, - base: polkadot_cli::RunCmd::from_iter(relay_chain_args), + base: polkadot_cli::RunCmd::parse_from(relay_chain_args), } } } diff --git a/node/src/command.rs b/node/src/command.rs index 3299d9e7e..51ccb84fc 100644 --- a/node/src/command.rs +++ b/node/src/command.rs @@ -245,9 +245,7 @@ macro_rules! construct_async_run { } /// Parse command line arguments into service configuration. -pub fn run() -> Result<()> { - let cli = Cli::from_args(); - +pub fn run_with(cli: Cli) -> Result<()> { match &cli.subcommand { Some(Subcommand::BuildSpec(cmd)) => { let runner = cli.create_runner(cmd)?; @@ -390,6 +388,7 @@ pub fn run() -> Result<()> { .into()), None => { let runner = cli.create_runner(&cli.run.normalize())?; + let collator_options = cli.run.collator_options(); runner.run_node_until_exit(|config| async move { let para_id = crate::chain_specs::Extensions::try_get(&*config.chain_spec) @@ -438,7 +437,7 @@ pub fn run() -> Result<()> { manta_runtime::RuntimeApi, MantaRuntimeExecutor, AuraId, - >(config, polkadot_config, id) + >(config, polkadot_config, collator_options, id) .await .map(|r| r.0) .map_err(Into::into) @@ -447,7 +446,7 @@ pub fn run() -> Result<()> { calamari_runtime::RuntimeApi, CalamariRuntimeExecutor, AuraId, - >(config, polkadot_config, id) + >(config, polkadot_config, collator_options, id) .await .map(|r| r.0) .map_err(Into::into) @@ -456,7 +455,7 @@ pub fn run() -> Result<()> { dolphin_runtime::RuntimeApi, DolphinRuntimeExecutor, AuraId, - >(config, polkadot_config, id) + >(config, polkadot_config, collator_options, id) .await .map(|r| r.0) .map_err(Into::into) @@ -468,6 +467,11 @@ pub fn run() -> Result<()> { } } +/// Parse command line arguments into service configuration. +pub fn run() -> Result<()> { + run_with(Cli::from_args()) +} + impl DefaultConfigurationValues for RelayChainCli { fn p2p_listen_port() -> u16 { 30334 diff --git a/node/src/lib.rs b/node/src/lib.rs new file mode 100644 index 000000000..c3de5a567 --- /dev/null +++ b/node/src/lib.rs @@ -0,0 +1,25 @@ +// Copyright 2020-2022 Manta Network. +// This file is part of Manta. +// +// Manta is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Manta is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Manta. If not, see . + +//! Manta/Calamari Parachain CLI + +#![allow(missing_docs)] + +pub mod chain_specs; +pub mod cli; +pub mod command; +pub mod rpc; +pub mod service; diff --git a/node/src/main.rs b/node/src/main.rs index 4ebfa95b9..555fdcca3 100644 --- a/node/src/main.rs +++ b/node/src/main.rs @@ -15,14 +15,7 @@ // along with Manta. If not, see . //! Manta/Calamari Parachain CLI -#![warn(missing_docs)] - -mod chain_specs; -mod cli; -mod command; -mod rpc; -mod service; fn main() -> sc_cli::Result<()> { - command::run() + manta::command::run() } diff --git a/node/src/service.rs b/node/src/service.rs index 3332a2de1..0f65cd2dc 100644 --- a/node/src/service.rs +++ b/node/src/service.rs @@ -16,6 +16,7 @@ use codec::Codec; use core::marker::PhantomData; +use cumulus_client_cli::CollatorOptions; use cumulus_client_consensus_aura::{AuraConsensus, BuildAuraConsensusParams, SlotProportion}; use cumulus_client_consensus_common::{ ParachainBlockImport, ParachainCandidate, ParachainConsensus, @@ -28,9 +29,10 @@ use cumulus_primitives_core::{ relay_chain::v1::{Hash as PHash, PersistedValidationData}, ParaId, }; -use cumulus_relay_chain_interface::RelayChainInterface; -use cumulus_relay_chain_local::build_relay_chain_interface; -use polkadot_service::NativeExecutionDispatch; +use cumulus_relay_chain_inprocess_interface::build_inprocess_relay_chain; +use cumulus_relay_chain_interface::{RelayChainError, RelayChainInterface, RelayChainResult}; +use cumulus_relay_chain_rpc_interface::RelayChainRPCInterface; +use polkadot_service::{CollatorPair, NativeExecutionDispatch}; use crate::rpc; pub use manta_primitives::types::{AccountId, Balance, Block, Hash, Header, Index as Nonce}; @@ -47,7 +49,7 @@ use sc_network::NetworkService; use sc_service::{Configuration, PartialComponents, Role, TFullBackend, TFullClient, TaskManager}; use sc_telemetry::{Telemetry, TelemetryHandle, TelemetryWorker, TelemetryWorkerHandle}; use sp_api::{ApiExt, ConstructRuntimeApi}; -use sp_consensus::{CacheKeyId, SlotData}; +use sp_consensus::CacheKeyId; use sp_consensus_aura::AuraApi; use sp_core::crypto::Pair; use sp_keystore::SyncCryptoStorePtr; @@ -217,6 +219,30 @@ where Ok(params) } +async fn build_relay_chain_interface( + polkadot_config: Configuration, + parachain_config: &Configuration, + telemetry_worker_handle: Option, + task_manager: &mut TaskManager, + collator_options: CollatorOptions, +) -> RelayChainResult<( + Arc<(dyn RelayChainInterface + 'static)>, + Option, +)> { + match collator_options.relay_chain_rpc_url { + Some(relay_chain_url) => Ok(( + Arc::new(RelayChainRPCInterface::new(relay_chain_url).await?) as Arc<_>, + None, + )), + None => build_inprocess_relay_chain( + polkadot_config, + parachain_config, + telemetry_worker_handle, + task_manager, + ), + } +} + /// Start a node with the given parachain `Configuration` and relay chain `Configuration`. /// /// This is the actual implementation that is abstract over the executor and the runtime api. @@ -224,6 +250,7 @@ where async fn start_node_impl( parachain_config: Configuration, polkadot_config: Configuration, + collator_options: CollatorOptions, id: ParaId, _rpc_ext_builder: RB, build_import_queue: BIQ, @@ -294,12 +321,18 @@ where let (mut telemetry, telemetry_worker_handle) = params.other; let mut task_manager = params.task_manager; - let (relay_chain_interface, collator_key) = - build_relay_chain_interface(polkadot_config, telemetry_worker_handle, &mut task_manager) - .map_err(|e| match e { - polkadot_service::Error::Sub(x) => x, - s => format!("{}", s).into(), - })?; + let (relay_chain_interface, collator_key) = build_relay_chain_interface( + polkadot_config, + ¶chain_config, + telemetry_worker_handle, + &mut task_manager, + collator_options.clone(), + ) + .await + .map_err(|e| match e { + RelayChainError::ServiceError(polkadot_service::Error::Sub(x)) => x, + s => s.to_string().into(), + })?; let client = params.client.clone(); let backend = params.backend.clone(); @@ -382,7 +415,7 @@ where spawner, parachain_consensus, import_queue, - collator_key, + collator_key: collator_key.expect("Command line arguments do not allow this. qed"), relay_chain_slot_duration, }; @@ -396,6 +429,7 @@ where relay_chain_interface, relay_chain_slot_duration, import_queue, + collator_options, }; start_full_node(params)?; @@ -567,9 +601,9 @@ where let time = sp_timestamp::InherentDataProvider::from_system_time(); let slot = - sp_consensus_aura::inherents::InherentDataProvider::from_timestamp_and_duration( + sp_consensus_aura::inherents::InherentDataProvider::from_timestamp_and_slot_duration( *time, - slot_duration.slot_duration(), + slot_duration, ); Ok((time, slot)) @@ -608,6 +642,7 @@ where pub async fn start_parachain_node( parachain_config: Configuration, polkadot_config: Configuration, + collator_options: CollatorOptions, id: ParaId, ) -> sc_service::error::Result<( TaskManager, @@ -638,6 +673,7 @@ where start_node_impl::( parachain_config, polkadot_config, + collator_options, id, |_| Ok(Default::default()), parachain_build_import_queue::<_, _, AuraId>, @@ -687,9 +723,9 @@ where sp_timestamp::InherentDataProvider::from_system_time(); let slot = - sp_consensus_aura::inherents::InherentDataProvider::from_timestamp_and_duration( + sp_consensus_aura::inherents::InherentDataProvider::from_timestamp_and_slot_duration( *time, - slot_duration.slot_duration(), + slot_duration, ); let parachain_inherent = @@ -748,9 +784,9 @@ where sp_timestamp::InherentDataProvider::from_system_time(); let slot = - sp_consensus_aura::inherents::InherentDataProvider::from_timestamp_and_duration( + sp_consensus_aura::inherents::InherentDataProvider::from_timestamp_and_slot_duration( *time, - slot_duration.slot_duration(), + slot_duration, ); let parachain_inherent = diff --git a/pallets/asset-manager/Cargo.toml b/pallets/asset-manager/Cargo.toml index 39733d26c..322be9ac6 100644 --- a/pallets/asset-manager/Cargo.toml +++ b/pallets/asset-manager/Cargo.toml @@ -7,26 +7,26 @@ homepage = 'https://manta.network' license = 'GPL-3.0' repository = 'https://github.com/Manta-Network/Manta/' - [dependencies] -codec = { package = "parity-scale-codec", version = "2.3.1", default-features = false } -# scale-info has to be 1.0 for now -scale-info = { version = "1.0", default-features = false, features = ["derive"] } -sp-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.16", default-features = false } -frame-support = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.16", default-features = false } -frame-system = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.16", default-features = false } -sp-std = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.16", default-features = false } -frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.16", default-features = false, optional = true } -xcm = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.16", optional = true } +codec = { package = "parity-scale-codec", version = '3.0.0', default-features = false } +scale-info = { version = "2.0.0", default-features = false, features = ["derive"] } +sp-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18", default-features = false } +frame-support = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18", default-features = false } +frame-system = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18", default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18", default-features = false } +frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.18", default-features = false, optional = true } +xcm = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.18" } manta-primitives = { path = "../../primitives", default-features = false } log = { version = "0.4.0", default-features = false } +# 3rd party dependencies +orml-traits = { git = "https://github.com/manta-network/open-runtime-module-library.git", default-features = false, rev="7e2f985" } + [dev-dependencies] -sp-io = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.16" } -pallet-balances = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.16" } -pallet-assets = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.16" } -sp-core = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.16" } -xcm = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.16" } +sp-io = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +pallet-balances = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.18" } +pallet-assets = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.18" } +sp-core = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } [features] default = ["std"] @@ -38,17 +38,16 @@ std = [ "frame-system/std", "sp-std/std", "manta-primitives/std", + "orml-traits/std", 'log/std', + 'xcm/std', ] try-runtime = [ "frame-support/try-runtime", ] - runtime-benchmarks = [ 'frame-benchmarking', 'frame-support/runtime-benchmarks', 'frame-system/runtime-benchmarks', 'manta-primitives/runtime-benchmarks', - 'xcm', ] - diff --git a/pallets/asset-manager/src/benchmarking.rs b/pallets/asset-manager/src/benchmarking.rs index dac3ae3e4..78f68745a 100644 --- a/pallets/asset-manager/src/benchmarking.rs +++ b/pallets/asset-manager/src/benchmarking.rs @@ -131,6 +131,30 @@ benchmarks! { verify { assert_last_event::(Event::AssetMinted { asset_id: end, beneficiary, amount }.into()); } + + set_min_xcm_fee { + let start = >::StartNonNativeAssetId::get(); + let end = start + 1000; + for i in start..end { + + let location: MultiLocation = MultiLocation::new(0, X1(Parachain(i))); + let location = >::AssetLocation::from(location.clone()); + let metadata = >::AssetRegistrarMetadata::default(); + + Pallet::::register_asset(RawOrigin::Root.into(), location.clone(), metadata.clone())?; + Pallet::::set_units_per_second(RawOrigin::Root.into(), i, 0)?; + } + + // does not really matter what we register, as long as it is different than the previous + let location = >::AssetLocation::default(); + let metadata = >::AssetRegistrarMetadata::default(); + let min_xcm_fee = 10; + Pallet::::register_asset(RawOrigin::Root.into(), location.clone(), metadata.clone())?; + + }: _(RawOrigin::Root, location.clone(), min_xcm_fee) + verify { + assert_eq!(Pallet::::get_min_xcm_fee(location), Some(min_xcm_fee)); + } } impl_benchmark_test_suite!(Pallet, crate::mock::new_test_ext(), crate::mock::Runtime); diff --git a/pallets/asset-manager/src/lib.rs b/pallets/asset-manager/src/lib.rs index 384bf4397..94940ff7f 100644 --- a/pallets/asset-manager/src/lib.rs +++ b/pallets/asset-manager/src/lib.rs @@ -44,7 +44,7 @@ mod tests; pub mod pallet { use crate::weights::WeightInfo; - use frame_support::{pallet_prelude::*, transactional, PalletId}; + use frame_support::{pallet_prelude::*, traits::Contains, transactional, PalletId}; use frame_system::pallet_prelude::*; use manta_primitives::{ assets::{ @@ -53,7 +53,16 @@ pub mod pallet { }, types::{AssetId, Balance}, }; - use sp_runtime::{traits::AccountIdConversion, ArithmeticError}; + use orml_traits::GetByKey; + use sp_runtime::{ + traits::{AccountIdConversion, One}, + ArithmeticError, + }; + use xcm::latest::prelude::*; + + /// Alias for the junction Parachain(#[codec(compact)] u32), + pub(crate) type ParaId = u32; + pub(crate) type AssetCount = u32; #[pallet::pallet] #[pallet::generate_store(pub(super) trait Store)] @@ -162,6 +171,11 @@ pub mod pallet { beneficiary: T::AccountId, amount: Balance, }, + /// Update min xcm fee of an asset + MinXcmFeeUpdated { + reserve_chain: >::AssetLocation, + min_xcm_fee: u128, + }, } /// Error. @@ -179,6 +193,8 @@ pub mod pallet { AssetAlreadyRegistered, /// Error on minting asset. MintError, + /// Fail to update para id. + UpdateParaIdError, } /// AssetId to MultiLocation Map. @@ -214,6 +230,17 @@ pub mod pallet { #[pallet::storage] pub type UnitsPerSecond = StorageMap<_, Blake2_128Concat, AssetId, u128>; + /// Minimum xcm execution fee paid on destination chain. + #[pallet::storage] + #[pallet::getter(fn get_min_xcm_fee)] + pub type MinXcmFee = + StorageMap<_, Blake2_128Concat, >::AssetLocation, u128>; + + /// The count of associated assets for each para id except relaychain. + #[pallet::storage] + #[pallet::getter(fn get_para_id)] + pub type AllowedDestParaIds = StorageMap<_, Blake2_128Concat, ParaId, AssetCount>; + #[pallet::call] impl Pallet { /// Register a new asset in the asset manager. @@ -247,6 +274,15 @@ pub mod pallet { AssetIdLocation::::insert(&asset_id, &location); AssetIdMetadata::::insert(&asset_id, &metadata); LocationAssetId::::insert(&location, &asset_id); + + // If it's a new para id, which will be inserted with AssetCount as 1. + // If not, AssetCount will increased by 1. + if let Some(para_id) = + Self::get_para_id_from_multilocation(location.clone().into().as_ref()) + { + Self::increase_count_of_associated_assets(para_id)?; + } + Self::deposit_event(Event::::AssetRegistered { asset_id, asset_address: location, @@ -283,6 +319,34 @@ pub mod pallet { LocationAssetId::::remove(&old_location); LocationAssetId::::insert(&location, &asset_id); AssetIdLocation::::insert(&asset_id, &location); + + // 1. If the new location has new para id, insert the new para id, + // the old para id will be deleted if AssetCount <= 1, or decreased by 1. + // 2. If the new location doesn't contain a new para id, do nothing to AssetCount + if let Some(old_para_id) = + Self::get_para_id_from_multilocation(old_location.into().as_ref()) + { + if AllowedDestParaIds::::get(old_para_id) <= Some(::one()) { + AllowedDestParaIds::::remove(old_para_id); + } else { + AllowedDestParaIds::::try_mutate(old_para_id, |cnt| -> DispatchResult { + let new_cnt = cnt + .map(|c| c - ::one()) + .ok_or(Error::::UpdateParaIdError)?; + *cnt = Some(new_cnt); + Ok(()) + })?; + } + } + + // If it's a new para id, which will be inserted with AssetCount as 1. + // If not, AssetCount will increased by 1. + if let Some(para_id) = + Self::get_para_id_from_multilocation(location.clone().into().as_ref()) + { + Self::increase_count_of_associated_assets(para_id)?; + } + // deposit event. Self::deposit_event(Event::::AssetLocationUpdated { asset_id, location }); Ok(()) @@ -378,6 +442,27 @@ pub mod pallet { }); Ok(()) } + + /// Set min xcm fee for asset/s on their reserve chain. + /// + /// * `origin`: Caller of this extrinsic, the access control is specified by `ForceOrigin`. + /// * `reserve_chain`: Multilocation to be haven min xcm fee. + /// * `min_xcm_fee`: Amount of min_xcm_fee. + #[pallet::weight(T::WeightInfo::set_min_xcm_fee())] + #[transactional] + pub fn set_min_xcm_fee( + origin: OriginFor, + reserve_chain: >::AssetLocation, + #[pallet::compact] min_xcm_fee: u128, + ) -> DispatchResult { + T::ModifierOrigin::ensure_origin(origin)?; + MinXcmFee::::insert(&reserve_chain, &min_xcm_fee); + Self::deposit_event(Event::::MinXcmFeeUpdated { + reserve_chain, + min_xcm_fee, + }); + Ok(()) + } } impl Pallet { @@ -394,6 +479,101 @@ pub mod pallet { pub fn account_id() -> T::AccountId { T::PalletId::get().into_account() } + + /// Get para id from asset location + pub(crate) fn get_para_id_from_multilocation( + location: Option<&MultiLocation>, + ) -> Option { + if let Some(MultiLocation { interior, .. }) = location { + match interior { + Junctions::X1(Junction::Parachain(para_id)) + | Junctions::X2(Junction::Parachain(para_id), ..) + | Junctions::X3(Junction::Parachain(para_id), ..) + | Junctions::X4(Junction::Parachain(para_id), ..) + | Junctions::X5(Junction::Parachain(para_id), ..) + | Junctions::X6(Junction::Parachain(para_id), ..) + | Junctions::X7(Junction::Parachain(para_id), ..) + | Junctions::X8(Junction::Parachain(para_id), ..) => Some(*para_id), + _ => None, + } + } else { + None + } + } + + /// Increases the count of associated assets for the para id. + pub(crate) fn increase_count_of_associated_assets(para_id: ParaId) -> DispatchResult { + // If it's a new para id, which will be inserted with AssetCount as 1. + // If not, AssetCount will increased by 1. + if AllowedDestParaIds::::contains_key(para_id) { + AllowedDestParaIds::::try_mutate(para_id, |count| -> DispatchResult { + let new_count = count + .map(|c| c + ::one()) + .ok_or(Error::::UpdateParaIdError)?; + *count = Some(new_count); + Ok(()) + }) + } else { + AllowedDestParaIds::::insert(para_id, ::one()); + Ok(()) + } + } + } + + /// Check the multilocation is supported by calamari/manta. + impl Contains for Pallet { + fn contains(location: &MultiLocation) -> bool { + // check parents + if location.parents != 1 { + return false; + } + + match location.interior { + // Send tokens back to relaychain. + Junctions::X1(Junction::AccountId32 { .. }) => true, + // Send tokens to sibling chain. + Junctions::X2(Junction::Parachain(para_id), Junction::AccountId32 { .. }) => { + AllowedDestParaIds::::contains_key(para_id) + } + // We don't support X3 or longer Junctions. + _ => false, + } + } + } + + /// Get min-xcm-fee by multilocation. + impl GetByKey for Pallet { + fn get(location: &MultiLocation) -> u128 { + let location = + >::AssetLocation::from(location.clone()); + match MinXcmFee::::get(&location) { + Some(min_fee) => min_fee, + None => u128::MAX, + } + } + } + + #[pallet::hooks] + impl Hooks> for Pallet { + fn on_runtime_upgrade() -> Weight { + let mut reads: Weight = 0; + let mut writes: Weight = 0; + LocationAssetId::::iter().for_each(|(location, _asset_id)| { + reads += 1; + if let Some(para_id) = + Self::get_para_id_from_multilocation(location.into().as_ref()) + { + if para_id != 2084 { + Self::increase_count_of_associated_assets(para_id); + reads += 1; // There's one read in method increase_count_of_associated_assets. + writes += 1; // There's one write in method increase_count_of_associated_assets. + } + } + }); + T::DbWeight::get() + .reads(reads) + .saturating_add(T::DbWeight::get().writes(writes)) + } } #[cfg(feature = "std")] diff --git a/pallets/asset-manager/src/mock.rs b/pallets/asset-manager/src/mock.rs index 2068be032..8eb22a928 100644 --- a/pallets/asset-manager/src/mock.rs +++ b/pallets/asset-manager/src/mock.rs @@ -33,7 +33,7 @@ use manta_primitives::{ constants::{ASSET_MANAGER_PALLET_ID, ASSET_STRING_LIMIT}, types::{AccountId, AssetId, Balance}, }; -use sp_core::H256; +use sp_core::{H160, H256}; use sp_runtime::{ testing::Header, traits::{BlakeTwo256, IdentityLookup}, @@ -231,3 +231,23 @@ pub fn new_test_ext() -> sp_io::TestExternalities { .unwrap(); sp_io::TestExternalities::new(t) } + +pub(crate) fn create_asset_metadata( + name: &str, + symbol: &str, + decimals: u8, + min_balance: u128, + evm_address: Option, + is_frozen: bool, + is_sufficient: bool, +) -> AssetRegistrarMetadata { + AssetRegistrarMetadata { + name: name.as_bytes().to_vec(), + symbol: symbol.as_bytes().to_vec(), + decimals, + min_balance, + evm_address, + is_frozen, + is_sufficient, + } +} diff --git a/pallets/asset-manager/src/tests.rs b/pallets/asset-manager/src/tests.rs index 2999ad65e..7ffbc3088 100644 --- a/pallets/asset-manager/src/tests.rs +++ b/pallets/asset-manager/src/tests.rs @@ -20,10 +20,12 @@ use crate::{ self as asset_manager, AssetIdLocation, AssetIdMetadata, Error, LocationAssetId, UnitsPerSecond, }; use asset_manager::mock::*; -use frame_support::{assert_noop, assert_ok, traits::fungibles::InspectMetadata}; -use manta_primitives::assets::{ - AssetConfig, AssetLocation, AssetRegistrarMetadata, FungibleLedger, +use frame_support::{ + assert_noop, assert_ok, + traits::{fungibles::InspectMetadata, Contains}, }; +use manta_primitives::assets::{AssetConfig, AssetLocation, FungibleLedger}; +use orml_traits::GetByKey; use sp_runtime::traits::BadOrigin; use xcm::{latest::prelude::*, VersionedMultiLocation}; @@ -53,15 +55,7 @@ fn basic_setup_should_work() { #[test] fn wrong_modifier_origin_should_not_work() { new_test_ext().execute_with(|| { - let asset_metadata = AssetRegistrarMetadata { - name: b"Kusama".to_vec(), - symbol: b"KSM".to_vec(), - decimals: 12, - min_balance: 1u128, - evm_address: None, - is_frozen: false, - is_sufficient: true, - }; + let asset_metadata = create_asset_metadata("Kusama", "KSM", 12, 1u128, None, false, true); let source_location = AssetLocation(VersionedMultiLocation::V1(MultiLocation::parent())); assert_noop!( AssetManager::register_asset( @@ -96,19 +90,12 @@ fn wrong_modifier_origin_should_not_work() { #[test] fn register_asset_should_work() { - let asset_metadata = AssetRegistrarMetadata { - name: b"Kusama".to_vec(), - symbol: b"KSM".to_vec(), - decimals: 12, - min_balance: 1u128, - evm_address: None, - is_frozen: false, - is_sufficient: true, - }; + let para_id = 1; + let asset_metadata = create_asset_metadata("Kusama", "KSM", 12, 1u128, None, false, true); let source_location = AssetLocation(VersionedMultiLocation::V1(MultiLocation::parent())); let new_location = AssetLocation(VersionedMultiLocation::V1(MultiLocation::new( 1, - X2(Parachain(1), PalletInstance(PALLET_BALANCES_INDEX)), + X2(Parachain(para_id), PalletInstance(PALLET_BALANCES_INDEX)), ))); new_test_ext().execute_with(|| { let mut counter: u32 = @@ -123,6 +110,8 @@ fn register_asset_should_work() { AssetIdLocation::::get(counter), Some(source_location.clone()) ); + // relaychain has no para id. + assert!(!crate::AllowedDestParaIds::::contains_key(para_id)); counter += 1; // Register twice will fail assert_noop!( @@ -136,23 +125,24 @@ fn register_asset_should_work() { asset_metadata.clone() )); assert_eq!(AssetIdLocation::::get(counter), Some(new_location)); + // check para ids + assert!(crate::AllowedDestParaIds::::contains_key(para_id)); }) } #[test] fn update_asset() { - let original_name = b"Kusama".to_vec(); - let original_symbol = b"KSM".to_vec(); + let para_id = 1; let original_decimals = 12; - let asset_metadata = AssetRegistrarMetadata { - name: original_name, - symbol: original_symbol, - decimals: original_decimals, - min_balance: 1u128, - evm_address: None, - is_frozen: false, - is_sufficient: true, - }; + let asset_metadata = create_asset_metadata( + "Kusama", + "KSM", + original_decimals, + 1u128, + None, + false, + false, + ); let mut new_metadata = asset_metadata.clone(); let new_name = b"NotKusama".to_vec(); let new_symbol = b"NotKSM".to_vec(); @@ -163,7 +153,7 @@ fn update_asset() { let source_location = AssetLocation(VersionedMultiLocation::V1(MultiLocation::parent())); let new_location = AssetLocation(VersionedMultiLocation::V1(MultiLocation::new( 1, - X2(Parachain(1), PalletInstance(PALLET_BALANCES_INDEX)), + X2(Parachain(para_id), PalletInstance(PALLET_BALANCES_INDEX)), ))); new_test_ext().execute_with(|| { // Register relay chain native token @@ -238,9 +228,129 @@ fn update_asset() { AssetManager::update_asset_location(Origin::root(), next_asset_id, new_location), Error::::LocationAlreadyExists ); + + // If the existing asset location has been changed para id, the old para id should be + // deleted from `AllowedDestParaIds` and new one should be inserted. + let new_para_id = para_id + 1; + let new_location_2 = AssetLocation(VersionedMultiLocation::V1(MultiLocation::new( + 1, + X2( + Parachain(new_para_id), + PalletInstance(PALLET_BALANCES_INDEX), + ), + ))); + assert!(crate::AllowedDestParaIds::::contains_key(para_id)); + + assert_ok!(AssetManager::update_asset_location( + Origin::root(), + asset_id, + new_location_2, + )); + // Old para id should be deleted. + assert!(!crate::AllowedDestParaIds::::contains_key(para_id)); + assert!(crate::AllowedDestParaIds::::contains_key( + new_para_id + )); }) } +#[test] +fn check_para_id_info_when_update_asset_location() { + new_test_ext().execute_with(|| { + let manta_para_id = 2015; + let manta_asset_metadata = + create_asset_metadata("Manta", "MANTA", 18, 1u128, None, false, false); + let mut manta_native_location = AssetLocation(VersionedMultiLocation::V1( + MultiLocation::new(1, X1(Parachain(manta_para_id))), + )); + + // regitering manta native asset should work. + assert_ok!(AssetManager::register_asset( + Origin::root(), + manta_native_location, + manta_asset_metadata + )); + let manta_asset_id = crate::NextAssetId::::get() - 1; + // check para id + assert!(crate::AllowedDestParaIds::::contains_key( + manta_para_id + )); + assert_eq!( + crate::AllowedDestParaIds::::get(manta_para_id), + Some(1) + ); + + // create a non manta asset. + let manta_non_native_asset_metadata = + create_asset_metadata("Manta", "eMANTA", 18, 1u128, None, false, false); + let mut manta_non_native_location = + AssetLocation(VersionedMultiLocation::V1(MultiLocation::new( + 1, + X2(Parachain(manta_para_id), GeneralKey(b"eMANTA".to_vec())), + ))); + // regitering manta non native asset should work. + assert_ok!(AssetManager::register_asset( + Origin::root(), + manta_non_native_location, + manta_non_native_asset_metadata + )); + let manta_non_native_asset_id = crate::NextAssetId::::get() - 1; + // ParaId=manta_para_id should have 2 assets. + assert_eq!( + crate::AllowedDestParaIds::::get(manta_para_id), + Some(2) + ); + + // Update new para id for manta native location + let new_para_id = manta_para_id + 1; + manta_native_location = AssetLocation(VersionedMultiLocation::V1(MultiLocation::new( + 1, + X2(Parachain(new_para_id), GeneralKey(b"MANTA".to_vec())), + ))); + assert_ok!(AssetManager::update_asset_location( + Origin::root(), + manta_asset_id, + manta_native_location, + )); + // ParaId=manta_para_id should have 1 asset. + assert_eq!( + crate::AllowedDestParaIds::::get(manta_para_id), + Some(1) + ); + // ParaId=new_para_id should have 1 asset. + assert_eq!( + crate::AllowedDestParaIds::::get(new_para_id), + Some(1) + ); + + // Update para id for manta_non_native_location + let new_para_id_again = new_para_id + 1; + manta_non_native_location = AssetLocation(VersionedMultiLocation::V1(MultiLocation::new( + 1, + X2(Parachain(new_para_id_again), GeneralKey(b"eMANTA".to_vec())), + ))); + assert_ok!(AssetManager::update_asset_location( + Origin::root(), + manta_non_native_asset_id, + manta_non_native_location, + )); + // ParaId=manta_para_id should deleted. + assert!(!crate::AllowedDestParaIds::::contains_key( + manta_para_id + )); + // ParaId=new_para_id_again should have 1 asset. + assert_eq!( + crate::AllowedDestParaIds::::get(new_para_id_again), + Some(1) + ); + // ParaId=new_para_id should have 1 asset. + assert_eq!( + crate::AllowedDestParaIds::::get(new_para_id), + Some(1) + ); + }); +} + #[test] fn mint_asset() { new_test_ext().execute_with(|| { @@ -257,15 +367,7 @@ fn mint_asset() { // mint non-native asset let non_native_asset_id = >::StartNonNativeAssetId::get(); - let asset_metadata = AssetRegistrarMetadata { - name: b"Kusama".to_vec(), - symbol: b"KSM".to_vec(), - decimals: 12, - min_balance: 1u128, - evm_address: None, - is_frozen: false, - is_sufficient: true, - }; + let asset_metadata = create_asset_metadata("Kusama", "KSM", 12, 1u128, None, false, true); let source_location = AssetLocation(VersionedMultiLocation::V1(MultiLocation::parent())); assert_ok!(AssetManager::register_asset( Origin::root(), @@ -281,3 +383,143 @@ fn mint_asset() { ); }); } + +#[test] +fn filter_asset_location_should_work() { + let kusama_asset_metadata = + create_asset_metadata("Kusama", "KSM", 12, 1u128, None, false, false); + let kusama_location = AssetLocation(VersionedMultiLocation::V1(MultiLocation::parent())); + + let para_id = 2015; + let manta_asset_metadata = + create_asset_metadata("Manta", "MANTA", 18, 1u128, None, false, false); + let manta_location = AssetLocation(VersionedMultiLocation::V1(MultiLocation::new( + 1, + X1(Parachain(para_id)), + ))); + new_test_ext().execute_with(|| { + // Register relay chain native token + assert_ok!(AssetManager::register_asset( + Origin::root(), + kusama_location.clone(), + kusama_asset_metadata.clone() + )); + let kusama_asset_id = crate::NextAssetId::::get() - 1; + assert_eq!( + AssetIdLocation::::get(kusama_asset_id), + Some(kusama_location.clone()) + ); + + // Register manta para chain native token + assert_ok!(AssetManager::register_asset( + Origin::root(), + manta_location.clone(), + manta_asset_metadata.clone() + )); + + let manta_asset_id = crate::NextAssetId::::get() - 1; + assert_eq!( + AssetIdLocation::::get(manta_asset_id), + Some(manta_location.clone()) + ); + + // correct location should work + let relay_dest = MultiLocation { + parents: 1, + interior: X1(AccountId32 { + network: NetworkId::Any, + id: ALICE.into(), + }), + }; + let para_dest = MultiLocation { + parents: 1, + interior: X2( + Parachain(para_id), + AccountId32 { + network: NetworkId::Any, + id: ALICE.into(), + }, + ), + }; + assert!(crate::Pallet::::contains(¶_dest)); + assert!(crate::Pallet::::contains(&relay_dest)); + + // wrong location should be filtered + let wrong_relay_dest = MultiLocation { + parents: 1, + interior: Here, + }; + let wrong_para_dest = MultiLocation { + parents: 1, + interior: X2( + Parachain(para_id + 1), + AccountId32 { + network: NetworkId::Any, + id: ALICE.into(), + }, + ), + }; + assert!(!crate::Pallet::::contains(&wrong_relay_dest)); + assert!(!crate::Pallet::::contains(&wrong_para_dest)); + }) +} + +#[test] +fn set_min_xcm_fee_should_work() { + let manta_asset_metadata = + create_asset_metadata("Manta", "MANTA", 18, 1u128, None, false, false); + let manta_location = AssetLocation(VersionedMultiLocation::V1(MultiLocation::new( + 1, + X2(Parachain(2015), GeneralKey(b"MANTA".to_vec())), + ))); + new_test_ext().execute_with(|| { + // Register a non native token. + assert_ok!(AssetManager::register_asset( + Origin::root(), + manta_location.clone(), + manta_asset_metadata.clone() + )); + + let manta_asset_id = crate::NextAssetId::::get() - 1; + assert_eq!( + AssetIdLocation::::get(manta_asset_id), + Some(manta_location.clone()) + ); + + let min_xcm_fee = 100; + // normal account cannot set min xcm fee. + assert_noop!( + AssetManager::set_min_xcm_fee( + Origin::signed([2u8; 32].into()), + manta_location.clone(), + min_xcm_fee, + ), + BadOrigin + ); + + // only sudo can set it. + assert_ok!(AssetManager::set_min_xcm_fee( + Origin::root(), + manta_location.clone(), + min_xcm_fee, + )); + assert_eq!( + crate::MinXcmFee::::get(&manta_location), + Some(min_xcm_fee) + ); + + // u128::MAX will be returned if min-xcm-fee is not set, + // that means your crosschain transaction will fail due to no one can pay u128::MAX. + let calamari_location = AssetLocation(VersionedMultiLocation::V1(MultiLocation::new( + 1, + X2(Parachain(2084), GeneralKey(b"KMA".to_vec())), + ))); + + assert_eq!( + crate::Pallet::::get( + &Into::>::into(calamari_location).unwrap() + ), + u128::MAX + ); + }) +} diff --git a/pallets/asset-manager/src/weights.rs b/pallets/asset-manager/src/weights.rs index 035218b70..f76769d0e 100644 --- a/pallets/asset-manager/src/weights.rs +++ b/pallets/asset-manager/src/weights.rs @@ -51,6 +51,7 @@ pub trait WeightInfo { fn update_asset_location() -> Weight; fn update_asset_metadata() -> Weight; fn mint_asset() -> Weight; + fn set_min_xcm_fee() -> Weight; } /// Weights for pallet_asset_manager using the Substrate node and recommended hardware. @@ -98,6 +99,13 @@ impl WeightInfo for SubstrateWeight { .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } + // Storage: AssetManager AssetIdLocation (r:1 w:0) + // Storage: AssetManager MinXcmFee (r:0 w:1) + fn set_min_xcm_fee() -> Weight { + (31_000_000 as Weight) + .saturating_add(T::DbWeight::get().reads(1 as Weight)) + .saturating_add(T::DbWeight::get().writes(1 as Weight)) + } } // For backwards compatibility and tests @@ -144,4 +152,11 @@ impl WeightInfo for () { .saturating_add(RocksDbWeight::get().reads(3 as Weight)) .saturating_add(RocksDbWeight::get().writes(2 as Weight)) } + // Storage: AssetManager AssetIdLocation (r:1 w:0) + // Storage: AssetManager MinXcmFee (r:0 w:1) + fn set_min_xcm_fee() -> Weight { + (31_000_000 as Weight) + .saturating_add(RocksDbWeight::get().reads(1 as Weight)) + .saturating_add(RocksDbWeight::get().writes(1 as Weight)) + } } diff --git a/pallets/collator-selection/Cargo.toml b/pallets/collator-selection/Cargo.toml index eae4d0c89..20fe5ce9a 100644 --- a/pallets/collator-selection/Cargo.toml +++ b/pallets/collator-selection/Cargo.toml @@ -13,32 +13,32 @@ version = '3.1.5' targets = ['x86_64-unknown-linux-gnu'] [dependencies] -log = { version = "0.4.0", default-features = false } -codec = { version = '2.3.1', default-features = false, features = ['derive'], package = 'parity-scale-codec' } +log = { version = "0.4.16", default-features = false } +codec = { version = '3.0.0', default-features = false, features = ['derive'], package = 'parity-scale-codec' } rand = { version = "0.7.2", default-features = false } -scale-info = { version = "1.0.0", default-features = false, features = ["derive"] } +scale-info = { version = "2.0.0", default-features = false, features = ["derive"] } serde = { version = "1.0.137", default-features = false } -sp-std = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } -sp-runtime = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } -sp-staking = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } -sp-arithmetic = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } -frame-support = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } -frame-system = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } -pallet-authorship = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } -pallet-session = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } +sp-std = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.18" } +sp-runtime = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.18" } +sp-staking = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.18" } +sp-arithmetic = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.18" } +frame-support = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.18" } +frame-system = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.18" } +pallet-authorship = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.18" } +pallet-session = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.18" } -frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16", optional = true } +frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.18", optional = true } [dev-dependencies] -sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.16" } -sp-io = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.16" } -sp-tracing = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.16" } -sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.16" } -pallet-timestamp = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.16" } -sp-consensus-aura = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.16" } -pallet-balances = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.16" } -pallet-aura = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.16" } +sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.18" } +sp-io = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.18" } +sp-tracing = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.18" } +sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.18" } +pallet-timestamp = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.18" } +sp-consensus-aura = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.18" } +pallet-balances = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.18" } +pallet-aura = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.18" } [features] default = ['std'] diff --git a/pallets/manta-pay/Cargo.toml b/pallets/manta-pay/Cargo.toml index e1e089d01..4f3f3a03e 100644 --- a/pallets/manta-pay/Cargo.toml +++ b/pallets/manta-pay/Cargo.toml @@ -59,13 +59,13 @@ rand = { version = "0.8.4", default-features = false, optional = true } tempfile = { version = "3.3.0", optional = true } # substrate dependencies -frame-benchmarking = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.16", default-features = false, optional = true } -frame-support = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.16", default-features = false } -frame-system = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.16", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.16", default-features = false } -sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.16", default-features = false } -scale-codec = { package = "parity-scale-codec", version = "2.3.1", default-features = false, features = ["derive", "max-encoded-len"] } -scale-info = { version = "1.0.0", default-features = false, features = ["derive"] } +frame-benchmarking = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18", default-features = false, optional = true } +frame-support = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18", default-features = false } +frame-system = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18", default-features = false } +sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.18", default-features = false } +scale-codec = { package = "parity-scale-codec", version = '3.0.0', default-features = false, features = ["derive", "max-encoded-len"] } +scale-info = { version = "2.0.0", default-features = false, features = ["derive"] } # manta dependencies manta-accounting = { git = "https://github.com/manta-network/manta-rs.git", default-features = false } @@ -80,13 +80,12 @@ bencher = "0.1.5" criterion = "0.3.4" lazy_static = "1.4.0" manta-accounting = { git = "https://github.com/manta-network/manta-rs.git", features = ["test"] } -sp-core = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.16"} -sp-io = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.16"} -pallet-balances = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.16" } -pallet-assets = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.16" } +sp-core = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18"} +sp-io = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18"} +pallet-balances = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.18" } +pallet-assets = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.18" } pallet-asset-manager = { path = "../asset-manager"} manta-sdk = { git = "https://github.com/manta-network/sdk.git", features = ["download"] } tempfile = "3.3.0" rand = "0.8.4" -xcm = { git = 'https://github.com/paritytech/polkadot.git', branch = "release-v0.9.16" } - +xcm = { git = 'https://github.com/paritytech/polkadot.git', branch = "release-v0.9.18" } diff --git a/pallets/manta-pay/src/types.rs b/pallets/manta-pay/src/types.rs index 4f9976c97..6aafaafb4 100644 --- a/pallets/manta-pay/src/types.rs +++ b/pallets/manta-pay/src/types.rs @@ -19,6 +19,12 @@ use super::*; use manta_util::into_array_unchecked; +pub(crate) const CIPHER_TEXT_LENGTH: usize = 68; +pub(crate) const EPHEMERAL_PUBLIC_KEY_LENGTH: usize = 32; +pub(crate) const UTXO_ACCUMULATOR_OUTPUT_LENGTH: usize = 32; +pub(crate) const UTXO_LENGTH: usize = 32; +pub(crate) const VOID_NUMBER_LENGTH: usize = 32; + /// Encodes the SCALE encodable `value` into a byte array with the given length `N`. #[inline] pub(crate) fn encode(value: T) -> [u8; N] @@ -74,18 +80,18 @@ impl Asset { #[derive(Clone, Debug, Decode, Encode, Eq, Hash, MaxEncodedLen, PartialEq, TypeInfo)] pub struct EncryptedNote { /// Ephemeral Public Key - pub ephemeral_public_key: [u8; 32], + pub ephemeral_public_key: [u8; EPHEMERAL_PUBLIC_KEY_LENGTH], /// Ciphertext - pub ciphertext: [u8; 68], + pub ciphertext: [u8; CIPHER_TEXT_LENGTH], } impl Default for EncryptedNote { #[inline] fn default() -> Self { Self { - ephemeral_public_key: [0; 32], - ciphertext: [0; 68], + ephemeral_public_key: [0; EPHEMERAL_PUBLIC_KEY_LENGTH], + ciphertext: [0; CIPHER_TEXT_LENGTH], } } } @@ -116,10 +122,10 @@ impl TryFrom for config::EncryptedNote { #[derive(Clone, Debug, Decode, Encode, Eq, Hash, MaxEncodedLen, PartialEq, TypeInfo)] pub struct SenderPost { /// UTXO Accumulator Output - pub utxo_accumulator_output: [u8; 32], + pub utxo_accumulator_output: [u8; UTXO_ACCUMULATOR_OUTPUT_LENGTH], /// Void Number - pub void_number: [u8; 32], + pub void_number: [u8; VOID_NUMBER_LENGTH], } impl From for SenderPost { @@ -148,7 +154,7 @@ impl TryFrom for config::SenderPost { #[derive(Clone, Debug, Decode, Encode, Eq, Hash, MaxEncodedLen, PartialEq, TypeInfo)] pub struct ReceiverPost { /// Unspent Transaction Output - pub utxo: [u8; 32], + pub utxo: [u8; UTXO_LENGTH], /// Encrypted Note pub encrypted_note: EncryptedNote, diff --git a/pallets/tx-pause/Cargo.toml b/pallets/tx-pause/Cargo.toml index e71b5cfc9..cd95d5b8c 100644 --- a/pallets/tx-pause/Cargo.toml +++ b/pallets/tx-pause/Cargo.toml @@ -8,20 +8,18 @@ license = 'GPL-3.0' repository = 'https://github.com/Manta-Network/Manta/' [dependencies] -codec = { package = "parity-scale-codec", version = "2.3.1", default-features = false } -scale-info = { version = "1.0", default-features = false, features = ["derive"] } - -sp-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.16", default-features = false } -frame-support = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.16", default-features = false } -frame-system = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.16", default-features = false } -sp-std = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.16", default-features = false } -frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.16", default-features = false, optional = true } +codec = { package = "parity-scale-codec", version = '3.0.0', default-features = false } +scale-info = { version = "2.0.0", default-features = false, features = ["derive"] } +sp-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18", default-features = false } +frame-support = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18", default-features = false } +frame-system = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18", default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18", default-features = false } +frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.18", default-features = false, optional = true } [dev-dependencies] -sp-core = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.16" } -sp-io = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.16" } -pallet-balances = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.16" } - +sp-core = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +sp-io = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } +pallet-balances = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" } manta-primitives = { path = '../../primitives' } [features] @@ -36,7 +34,6 @@ std = [ try-runtime = [ "frame-support/try-runtime", ] - runtime-benchmarks = [ "frame-benchmarking", 'frame-support/runtime-benchmarks', diff --git a/pallets/vesting/Cargo.toml b/pallets/vesting/Cargo.toml index cd4e3125c..542a133c7 100644 --- a/pallets/vesting/Cargo.toml +++ b/pallets/vesting/Cargo.toml @@ -8,23 +8,23 @@ license = 'GPL-3.0' repository = 'https://github.com/Manta-Network/Manta/' [dependencies] -codec = { package = "parity-scale-codec", version = "2.3.1", default-features = false, features = ["derive", "max-encoded-len"] } -scale-info = { version = "1.0", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = '3.0.0', default-features = false, features = ["derive", "max-encoded-len"] } +scale-info = { version = "2.0.0", default-features = false, features = ["derive"] } -frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16", optional = true } -pallet-timestamp = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16", optional = true } -pallet-balances = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16", optional = true } -frame-support = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } -frame-system = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } -sp-runtime = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } -sp-std = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } +frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.18", optional = true } +pallet-timestamp = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.18", optional = true } +pallet-balances = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.18", optional = true } +frame-support = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.18" } +frame-system = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.18" } +sp-runtime = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.18" } +sp-std = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.18" } [dev-dependencies] chrono = "0.4" -pallet-balances = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.16" } -pallet-timestamp = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.16" } -sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.16" } -sp-io = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.16" } +pallet-balances = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.18" } +pallet-timestamp = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.18" } +sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.18" } +sp-io = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.18" } [features] default = ["std"] diff --git a/primitives/Cargo.toml b/primitives/Cargo.toml index 978eb5f3b..0a3e1b055 100644 --- a/primitives/Cargo.toml +++ b/primitives/Cargo.toml @@ -11,26 +11,26 @@ repository = 'https://github.com/Manta-Network/Manta/' targets = ['x86_64-unknown-linux-gnu'] [dependencies] -codec = { package = "parity-scale-codec", version = "2.3.1", default-features = false } -scale-info = { version = "1.0", default-features = false, features = [ "derive" ] } -smallvec = "1.6.1" -log = "0.4.14" +codec = { package = "parity-scale-codec", version = '3.0.0', default-features = false } +scale-info = { version = "2.0.0", default-features = false, features = [ "derive" ] } +smallvec = "1.8.0" +log = "0.4.16" # manta-rs dependencies manta-accounting = { git = "https://github.com/manta-network/manta-rs.git", default-features = false } # Substrate primitives -frame-support = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } -frame-system = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } -frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.16", default-features = false, optional = true } -sp-consensus-aura = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } -sp-core = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } -sp-std = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } -sp-io = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } -sp-runtime = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } -xcm-executor = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.16"} -xcm = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.16" } -xcm-builder = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.16"} +frame-support = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.18" } +frame-system = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.18" } +frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.18", default-features = false, optional = true } +sp-consensus-aura = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.18" } +sp-core = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.18" } +sp-std = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.18" } +sp-io = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.18" } +sp-runtime = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.18" } +xcm-executor = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.18" } +xcm = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.18" } +xcm-builder = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.18" } [features] default = ["std"] diff --git a/primitives/src/assets.rs b/primitives/src/assets.rs index 54db53f48..e21464d57 100644 --- a/primitives/src/assets.rs +++ b/primitives/src/assets.rs @@ -107,7 +107,12 @@ where type AssetRegistrarMetadata: Member + Parameter + Codec + Default + AssetMetadata; /// The AssetLocation type: could be just a thin wrapper of MultiLocation - type AssetLocation: Member + Parameter + Default + TypeInfo; + type AssetLocation: Member + + Parameter + + Default + + TypeInfo + + From + + Into>; /// The Fungible ledger implementation of this trait type FungibleLedger: FungibleLedger; diff --git a/runtime/calamari/Cargo.toml b/runtime/calamari/Cargo.toml index 303aa6181..c810cfe1f 100644 --- a/runtime/calamari/Cargo.toml +++ b/runtime/calamari/Cargo.toml @@ -8,78 +8,79 @@ repository = 'https://github.com/Manta-Network/Manta/' version = '3.1.5' [dependencies] -codec = { package = "parity-scale-codec", version = "2.3.1", default-features = false, features = ["derive", "max-encoded-len"] } -log = { version = "0.4.14", default-features = false } -hex-literal = { version = '0.3.3', optional = true } -scale-info = { version = "1.0.0", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = '3.0.0', default-features = false, features = ["derive", "max-encoded-len"] } +log = { version = "0.4.16", default-features = false } +hex-literal = { version = '0.3.4', optional = true } +scale-info = { version = "2.0.0", default-features = false, features = ["derive"] } serde = { version = '1.0.137', features = ['derive'], optional = true } -smallvec = "1.6.1" +smallvec = "1.8.0" # Substrate primitives -sp-api = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } -sp-arithmetic = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } -sp-block-builder = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } -sp-consensus-aura = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } -sp-core = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } -sp-inherents = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } -sp-io = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } -sp-offchain = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } -sp-runtime = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } -sp-session = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } -sp-std = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } -sp-transaction-pool = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } -sp-version = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } +sp-api = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.18" } +sp-arithmetic = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.18" } +sp-block-builder = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.18" } +sp-consensus-aura = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.18" } +sp-core = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.18" } +sp-inherents = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.18" } +sp-io = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.18" } +sp-offchain = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.18" } +sp-runtime = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.18" } +sp-session = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.18" } +sp-std = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.18" } +sp-transaction-pool = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.18" } +sp-version = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.18" } # Substrate frames -frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', default-features = false, optional = true, branch = "polkadot-v0.9.16" } -frame-system-benchmarking = { git = 'https://github.com/paritytech/substrate.git', default-features = false, optional = true, branch = "polkadot-v0.9.16" } -frame-executive = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } -frame-support = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } -frame-system = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } -frame-system-rpc-runtime-api = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } -frame-try-runtime = { git = "https://github.com/paritytech/substrate.git", default-features = false, optional = true, branch = "polkadot-v0.9.16" } +frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', default-features = false, optional = true, branch = "polkadot-v0.9.18" } +frame-system-benchmarking = { git = 'https://github.com/paritytech/substrate.git', default-features = false, optional = true, branch = "polkadot-v0.9.18" } +frame-executive = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.18" } +frame-support = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.18" } +frame-system = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.18" } +frame-system-rpc-runtime-api = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.18" } +frame-try-runtime = { git = "https://github.com/paritytech/substrate.git", default-features = false, optional = true, branch = "polkadot-v0.9.18" } # Substrate pallets -pallet-aura = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } -pallet-authorship = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } -pallet-balances = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } -pallet-preimage = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } -pallet-multisig = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } -pallet-session = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } -pallet-timestamp = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } -pallet-transaction-payment = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } -pallet-transaction-payment-rpc-runtime-api = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } -pallet-utility = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } -pallet-collective = { git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "polkadot-v0.9.16" } -pallet-democracy = { git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "polkadot-v0.9.16" } -pallet-scheduler = { git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "polkadot-v0.9.16" } -pallet-membership = { git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "polkadot-v0.9.16" } -pallet-treasury = { git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "polkadot-v0.9.16" } -pallet-assets = { git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "polkadot-v0.9.16" } +pallet-aura = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.18" } +pallet-authorship = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.18" } +pallet-balances = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.18" } +pallet-preimage = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.18" } +pallet-multisig = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.18" } +pallet-session = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.18" } +pallet-timestamp = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.18" } +pallet-transaction-payment = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.18" } +pallet-transaction-payment-rpc-runtime-api = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.18" } +pallet-utility = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.18" } +pallet-collective = { git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "polkadot-v0.9.18" } +pallet-democracy = { git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "polkadot-v0.9.18" } +pallet-scheduler = { git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "polkadot-v0.9.18" } +pallet-membership = { git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "polkadot-v0.9.18" } +pallet-treasury = { git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "polkadot-v0.9.18" } +pallet-assets = { git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "polkadot-v0.9.18" } # Cumulus dependencies -cumulus-pallet-aura-ext = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.16" } -cumulus-pallet-parachain-system = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.16" } -cumulus-primitives-core = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.16" } -cumulus-primitives-timestamp = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.16" } -cumulus-primitives-utility = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.16" } -cumulus-pallet-dmp-queue = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.16" } -cumulus-pallet-session-benchmarking = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, optional = true, branch = "polkadot-v0.9.16" } -cumulus-pallet-xcmp-queue = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.16" } -cumulus-pallet-xcm = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.16" } -parachain-info = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.16" } +cumulus-pallet-aura-ext = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.18" } +cumulus-pallet-parachain-system = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.18" } +cumulus-primitives-core = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.18" } +cumulus-primitives-timestamp = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.18" } +cumulus-primitives-utility = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.18" } +cumulus-pallet-dmp-queue = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.18" } +cumulus-pallet-session-benchmarking = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, optional = true, branch = "polkadot-v0.9.18" } +cumulus-pallet-xcmp-queue = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.18" } +cumulus-pallet-xcm = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.18" } +parachain-info = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.18" } # Polkadot dependencies -polkadot-primitives = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.16" } -polkadot-runtime-common = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.16" } -polkadot-parachain = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.16" } -xcm = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.16" } -xcm-builder = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.16" } -xcm-executor = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.16" } -pallet-xcm = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.16" } +polkadot-primitives = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.18" } +polkadot-runtime-common = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.18" } +polkadot-parachain = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.18" } +xcm = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.18" } +xcm-builder = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.18" } +xcm-executor = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.18" } +pallet-xcm = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.18" } # Third party (vendored) dependencies -orml-xtokens = { git = "https://github.com/manta-network/open-runtime-module-library.git", default-features = false, rev="4a66b29"} +orml-traits = { git = "https://github.com/manta-network/open-runtime-module-library.git", default-features = false, rev="7e2f985" } +orml-xtokens = { git = "https://github.com/manta-network/open-runtime-module-library.git", default-features = false, rev="7e2f985" } # Self dependencies manta-primitives = { path = '../../primitives', default-features = false } @@ -89,12 +90,11 @@ pallet-tx-pause = { path = '../../pallets/tx-pause', default-features = false } pallet-asset-manager = { path = '../../pallets/asset-manager', default-features = false } runtime-common = { path = '../common', default-features = false } - [package.metadata.docs.rs] targets = ['x86_64-unknown-linux-gnu'] [build-dependencies] -substrate-wasm-builder = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.16" } +substrate-wasm-builder = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.18" } [dev-dependencies] serde_json = "1.0" @@ -135,7 +135,6 @@ runtime-benchmarks = [ ] # Set timing constants (e.g. session period) to faster versions to speed up testing. fast-runtime = [] - std = [ 'codec/std', 'serde', @@ -194,5 +193,6 @@ std = [ 'pallet-treasury/std', 'pallet-assets/std', 'pallet-asset-manager/std', - 'orml-xtokens/std' + 'orml-traits/std', + 'orml-xtokens/std', ] diff --git a/runtime/calamari/src/lib.rs b/runtime/calamari/src/lib.rs index 4c33c8654..237baca7b 100644 --- a/runtime/calamari/src/lib.rs +++ b/runtime/calamari/src/lib.rs @@ -31,8 +31,6 @@ use sp_runtime::{ transaction_validity::{TransactionSource, TransactionValidity}, ApplyExtrinsicResult, }; - -use sp_core::u32_trait::{_1, _2, _3, _4, _5}; use sp_std::{cmp::Ordering, prelude::*}; #[cfg(feature = "std")] use sp_version::NativeVersion; @@ -62,7 +60,6 @@ use sp_runtime::{Perbill, Permill}; pub use sp_runtime::BuildStorage; // Polkadot imports - use polkadot_runtime_common::{BlockHashCount, RocksDbWeight, SlowAdjustingFeeUpdate}; use xcm::latest::prelude::*; @@ -162,7 +159,7 @@ impl pallet_tx_pause::Config for Runtime { type Event = Event; type UpdateOrigin = EnsureOneOf< EnsureRoot, - pallet_collective::EnsureProportionMoreThan<_1, _2, AccountId, TechnicalCollective>, + pallet_collective::EnsureProportionMoreThan, >; type WeightInfo = weights::pallet_tx_pause::SubstrateWeight; } @@ -374,30 +371,30 @@ impl pallet_democracy::Config for Runtime { type MinimumDeposit = MinimumDeposit; /// A straight majority of the council can decide what their next motion is. type ExternalOrigin = - pallet_collective::EnsureProportionAtLeast<_1, _2, AccountId, CouncilCollective>; + pallet_collective::EnsureProportionAtLeast; /// A super-majority can have the next scheduled referendum be a straight majority-carries vote. type ExternalMajorityOrigin = - pallet_collective::EnsureProportionAtLeast<_3, _4, AccountId, CouncilCollective>; + pallet_collective::EnsureProportionAtLeast; /// A unanimous council can have the next scheduled referendum be a straight default-carries /// (NTB) vote. type ExternalDefaultOrigin = - pallet_collective::EnsureProportionAtLeast<_1, _1, AccountId, CouncilCollective>; + pallet_collective::EnsureProportionAtLeast; /// Two thirds of the technical committee can have an ExternalMajority/ExternalDefault vote /// be tabled immediately and with a shorter voting/enactment period. type FastTrackOrigin = - pallet_collective::EnsureProportionAtLeast<_2, _3, AccountId, TechnicalCollective>; + pallet_collective::EnsureProportionAtLeast; type InstantOrigin = - pallet_collective::EnsureProportionAtLeast<_1, _1, AccountId, TechnicalCollective>; + pallet_collective::EnsureProportionAtLeast; type InstantAllowed = InstantAllowed; type FastTrackVotingPeriod = FastTrackVotingPeriod; // To cancel a proposal which has been passed, 2/3 of the council must agree to it. type CancellationOrigin = - pallet_collective::EnsureProportionAtLeast<_2, _3, AccountId, CouncilCollective>; + pallet_collective::EnsureProportionAtLeast; // To cancel a proposal before it has been passed, the technical committee must be unanimous or // Root must agree. type CancelProposalOrigin = EnsureOneOf< EnsureRoot, - pallet_collective::EnsureProportionAtLeast<_1, _1, AccountId, TechnicalCollective>, + pallet_collective::EnsureProportionAtLeast, >; type BlacklistOrigin = EnsureRoot; // Any single technical committee member may veto a coming council proposal, however they can @@ -434,7 +431,7 @@ impl pallet_collective::Config for Runtime { pub type EnsureRootOrThreeFourthsCouncil = EnsureOneOf< EnsureRoot, - pallet_collective::EnsureProportionAtLeast<_3, _4, AccountId, CouncilCollective>, + pallet_collective::EnsureProportionAtLeast, >; type CouncilMembershipInstance = pallet_membership::Instance1; @@ -492,12 +489,12 @@ parameter_types! { type EnsureRootOrThreeFifthsCouncil = EnsureOneOf< EnsureRoot, - pallet_collective::EnsureProportionAtLeast<_3, _5, AccountId, CouncilCollective>, + pallet_collective::EnsureProportionAtLeast, >; type EnsureRootOrMoreThanHalfCouncil = EnsureOneOf< EnsureRoot, - pallet_collective::EnsureProportionMoreThan<_1, _2, AccountId, CouncilCollective>, + pallet_collective::EnsureProportionMoreThan, >; impl pallet_treasury::Config for Runtime { @@ -619,7 +616,7 @@ parameter_types! { /// We allow root and the Relay Chain council to execute privileged collator selection operations. pub type CollatorSelectionUpdateOrigin = EnsureOneOf< EnsureRoot, - pallet_collective::EnsureProportionAtLeast<_1, _1, AccountId, CouncilCollective>, + pallet_collective::EnsureProportionAtLeast, >; impl manta_collator_selection::Config for Runtime { diff --git a/runtime/calamari/src/weights/calamari_vesting.rs b/runtime/calamari/src/weights/calamari_vesting.rs index a26607495..d0da52a9e 100644 --- a/runtime/calamari/src/weights/calamari_vesting.rs +++ b/runtime/calamari/src/weights/calamari_vesting.rs @@ -17,7 +17,7 @@ //! Autogenerated weights for calamari_vesting //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-04-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-05-09, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("calamari-dev"), DB CACHE: 1024 // Executed Command: @@ -54,7 +54,7 @@ impl calamari_vesting::WeightInfo for SubstrateWeight Weight { - (13_826_000 as Weight) + (13_618_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } @@ -64,7 +64,7 @@ impl calamari_vesting::WeightInfo for SubstrateWeight Weight { - (32_402_000 as Weight) + (34_115_000 as Weight) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } @@ -74,7 +74,7 @@ impl calamari_vesting::WeightInfo for SubstrateWeight Weight { - (56_163_000 as Weight) + (53_444_000 as Weight) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } @@ -85,7 +85,7 @@ impl WeightInfo for () { // Storage: CalamariVesting VestingSchedule (r:1 w:1) // Storage: Timestamp Now (r:1 w:0) fn update_vesting_schedule() -> Weight { - (13_826_000 as Weight) + (13_618_000 as Weight) .saturating_add(RocksDbWeight::get().reads(2 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } @@ -95,7 +95,7 @@ impl WeightInfo for () { // Storage: Balances Locks (r:1 w:1) // Storage: System Account (r:1 w:1) fn vest() -> Weight { - (32_402_000 as Weight) + (34_115_000 as Weight) .saturating_add(RocksDbWeight::get().reads(5 as Weight)) .saturating_add(RocksDbWeight::get().writes(3 as Weight)) } @@ -105,8 +105,8 @@ impl WeightInfo for () { // Storage: CalamariVesting VestingSchedule (r:1 w:0) // Storage: Balances Locks (r:1 w:1) fn vested_transfer() -> Weight { - (56_163_000 as Weight) + (53_444_000 as Weight) .saturating_add(RocksDbWeight::get().reads(5 as Weight)) .saturating_add(RocksDbWeight::get().writes(3 as Weight)) } -} +} \ No newline at end of file diff --git a/runtime/calamari/src/weights/frame_system.rs b/runtime/calamari/src/weights/frame_system.rs index d0b62943c..2535a6902 100644 --- a/runtime/calamari/src/weights/frame_system.rs +++ b/runtime/calamari/src/weights/frame_system.rs @@ -17,7 +17,7 @@ //! Autogenerated weights for frame_system //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-04-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-05-09, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("calamari-dev"), DB CACHE: 1024 // Executed Command: @@ -54,20 +54,18 @@ pub trait WeightInfo { /// Weights for frame_system using the Substrate node and recommended hardware. pub struct SubstrateWeight(PhantomData); impl frame_system::WeightInfo for SubstrateWeight { - fn remark(b: u32, ) -> Weight { - (6_759_000 as Weight) - // Standard Error: 0 - .saturating_add((1_000 as Weight).saturating_mul(b as Weight)) + fn remark(_b: u32, ) -> Weight { + (10_573_000 as Weight) } fn remark_with_event(b: u32, ) -> Weight { - (27_529_000 as Weight) + (22_916_000 as Weight) // Standard Error: 0 .saturating_add((2_000 as Weight).saturating_mul(b as Weight)) } // Storage: System Digest (r:1 w:1) // Storage: unknown [0x3a686561707061676573] (r:0 w:1) fn set_heap_pages() -> Weight { - (2_953_000 as Weight) + (3_018_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } @@ -75,41 +73,39 @@ impl frame_system::WeightInfo for SubstrateWeight { fn set_storage(i: u32, ) -> Weight { (0 as Weight) // Standard Error: 0 - .saturating_add((500_000 as Weight).saturating_mul(i as Weight)) + .saturating_add((489_000 as Weight).saturating_mul(i as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(i as Weight))) } // Storage: Skipped Metadata (r:0 w:0) fn kill_storage(i: u32, ) -> Weight { - (0 as Weight) + (197_000 as Weight) // Standard Error: 1_000 - .saturating_add((365_000 as Weight).saturating_mul(i as Weight)) + .saturating_add((352_000 as Weight).saturating_mul(i as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(i as Weight))) } // Storage: Skipped Metadata (r:0 w:0) fn kill_prefix(p: u32, ) -> Weight { (0 as Weight) // Standard Error: 1_000 - .saturating_add((827_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((825_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(p as Weight))) } } // For backwards compatibility and tests impl WeightInfo for () { - fn remark(b: u32, ) -> Weight { - (6_759_000 as Weight) - // Standard Error: 0 - .saturating_add((1_000 as Weight).saturating_mul(b as Weight)) + fn remark(_b: u32, ) -> Weight { + (10_573_000 as Weight) } fn remark_with_event(b: u32, ) -> Weight { - (27_529_000 as Weight) + (22_916_000 as Weight) // Standard Error: 0 .saturating_add((2_000 as Weight).saturating_mul(b as Weight)) } // Storage: System Digest (r:1 w:1) // Storage: unknown [0x3a686561707061676573] (r:0 w:1) fn set_heap_pages() -> Weight { - (2_953_000 as Weight) + (3_018_000 as Weight) .saturating_add(RocksDbWeight::get().reads(1 as Weight)) .saturating_add(RocksDbWeight::get().writes(2 as Weight)) } @@ -117,21 +113,21 @@ impl WeightInfo for () { fn set_storage(i: u32, ) -> Weight { (0 as Weight) // Standard Error: 0 - .saturating_add((500_000 as Weight).saturating_mul(i as Weight)) + .saturating_add((489_000 as Weight).saturating_mul(i as Weight)) .saturating_add(RocksDbWeight::get().writes((1 as Weight).saturating_mul(i as Weight))) } // Storage: Skipped Metadata (r:0 w:0) fn kill_storage(i: u32, ) -> Weight { - (0 as Weight) + (197_000 as Weight) // Standard Error: 1_000 - .saturating_add((365_000 as Weight).saturating_mul(i as Weight)) + .saturating_add((352_000 as Weight).saturating_mul(i as Weight)) .saturating_add(RocksDbWeight::get().writes((1 as Weight).saturating_mul(i as Weight))) } // Storage: Skipped Metadata (r:0 w:0) fn kill_prefix(p: u32, ) -> Weight { (0 as Weight) // Standard Error: 1_000 - .saturating_add((827_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((825_000 as Weight).saturating_mul(p as Weight)) .saturating_add(RocksDbWeight::get().writes((1 as Weight).saturating_mul(p as Weight))) } -} +} \ No newline at end of file diff --git a/runtime/calamari/src/weights/manta_collator_selection.rs b/runtime/calamari/src/weights/manta_collator_selection.rs index a5cf8b23c..16c4c0242 100644 --- a/runtime/calamari/src/weights/manta_collator_selection.rs +++ b/runtime/calamari/src/weights/manta_collator_selection.rs @@ -17,7 +17,7 @@ //! Autogenerated weights for manta_collator_selection //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-04-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-05-09, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("calamari-dev"), DB CACHE: 1024 // Executed Command: @@ -61,29 +61,29 @@ pub struct SubstrateWeight(PhantomData); impl manta_collator_selection::WeightInfo for SubstrateWeight { // Storage: CollatorSelection Invulnerables (r:0 w:1) fn set_invulnerables(b: u32, ) -> Weight { - (9_791_000 as Weight) - // Standard Error: 12_000 - .saturating_add((52_000 as Weight).saturating_mul(b as Weight)) + (9_489_000 as Weight) + // Standard Error: 13_000 + .saturating_add((109_000 as Weight).saturating_mul(b as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: CollatorSelection DesiredCandidates (r:0 w:1) fn set_desired_candidates() -> Weight { - (10_607_000 as Weight) + (10_700_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: CollatorSelection CandidacyBond (r:0 w:1) fn set_candidacy_bond() -> Weight { - (9_286_000 as Weight) + (9_243_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: CollatorSelection EvictionBaseline (r:0 w:1) fn set_eviction_baseline() -> Weight { - (8_750_000 as Weight) + (8_876_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: CollatorSelection EvictionTolerance (r:0 w:1) fn set_eviction_tolerance() -> Weight { - (8_753_000 as Weight) + (8_689_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: CollatorSelection Candidates (r:1 w:1) @@ -92,26 +92,26 @@ impl manta_collator_selection::WeightInfo for Substrate // Storage: Session NextKeys (r:1 w:0) // Storage: CollatorSelection CandidacyBond (r:1 w:0) fn register_as_candidate(c: u32, ) -> Weight { - (38_735_000 as Weight) - // Standard Error: 4_000 - .saturating_add((381_000 as Weight).saturating_mul(c as Weight)) + (38_628_000 as Weight) + // Standard Error: 6_000 + .saturating_add((277_000 as Weight).saturating_mul(c as Weight)) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: CollatorSelection Candidates (r:1 w:1) fn leave_intent(c: u32, ) -> Weight { - (26_690_000 as Weight) + (26_071_000 as Weight) // Standard Error: 4_000 - .saturating_add((308_000 as Weight).saturating_mul(c as Weight)) + .saturating_add((242_000 as Weight).saturating_mul(c as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: CollatorSelection Invulnerables (r:1 w:0) // Storage: CollatorSelection Candidates (r:1 w:1) fn remove_collator(c: u32, ) -> Weight { - (29_105_000 as Weight) + (28_379_000 as Weight) // Standard Error: 4_000 - .saturating_add((303_000 as Weight).saturating_mul(c as Weight)) + .saturating_add((262_000 as Weight).saturating_mul(c as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } @@ -121,9 +121,9 @@ impl manta_collator_selection::WeightInfo for Substrate // Storage: Session NextKeys (r:1 w:0) // Storage: CollatorSelection CandidacyBond (r:1 w:0) fn register_candidate(c: u32, ) -> Weight { - (38_248_000 as Weight) - // Standard Error: 4_000 - .saturating_add((372_000 as Weight).saturating_mul(c as Weight)) + (38_069_000 as Weight) + // Standard Error: 5_000 + .saturating_add((272_000 as Weight).saturating_mul(c as Weight)) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } @@ -131,7 +131,7 @@ impl manta_collator_selection::WeightInfo for Substrate // Storage: CollatorSelection BlocksPerCollatorThisSession (r:1 w:1) // Storage: System BlockWeight (r:1 w:1) fn note_author() -> Weight { - (35_325_000 as Weight) + (37_727_000 as Weight) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } @@ -144,9 +144,9 @@ impl manta_collator_selection::WeightInfo for Substrate // Storage: Session Validators (r:1 w:0) // Storage: System Account (r:1 w:1) fn new_session(c: u32, ) -> Weight { - (0 as Weight) - // Standard Error: 85_000 - .saturating_add((27_297_000 as Weight).saturating_mul(c as Weight)) + (1_918_000 as Weight) + // Standard Error: 86_000 + .saturating_add((25_519_000 as Weight).saturating_mul(c as Weight)) .saturating_add(T::DbWeight::get().reads(6 as Weight)) .saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(c as Weight))) .saturating_add(T::DbWeight::get().writes(2 as Weight)) @@ -158,29 +158,29 @@ impl manta_collator_selection::WeightInfo for Substrate impl WeightInfo for () { // Storage: CollatorSelection Invulnerables (r:0 w:1) fn set_invulnerables(b: u32, ) -> Weight { - (9_791_000 as Weight) - // Standard Error: 12_000 - .saturating_add((52_000 as Weight).saturating_mul(b as Weight)) + (9_489_000 as Weight) + // Standard Error: 13_000 + .saturating_add((109_000 as Weight).saturating_mul(b as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } // Storage: CollatorSelection DesiredCandidates (r:0 w:1) fn set_desired_candidates() -> Weight { - (10_607_000 as Weight) + (10_700_000 as Weight) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } // Storage: CollatorSelection CandidacyBond (r:0 w:1) fn set_candidacy_bond() -> Weight { - (9_286_000 as Weight) + (9_243_000 as Weight) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } // Storage: CollatorSelection EvictionBaseline (r:0 w:1) fn set_eviction_baseline() -> Weight { - (8_750_000 as Weight) + (8_876_000 as Weight) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } // Storage: CollatorSelection EvictionTolerance (r:0 w:1) fn set_eviction_tolerance() -> Weight { - (8_753_000 as Weight) + (8_689_000 as Weight) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } // Storage: CollatorSelection Candidates (r:1 w:1) @@ -189,26 +189,26 @@ impl WeightInfo for () { // Storage: Session NextKeys (r:1 w:0) // Storage: CollatorSelection CandidacyBond (r:1 w:0) fn register_as_candidate(c: u32, ) -> Weight { - (38_735_000 as Weight) - // Standard Error: 4_000 - .saturating_add((381_000 as Weight).saturating_mul(c as Weight)) + (38_628_000 as Weight) + // Standard Error: 6_000 + .saturating_add((277_000 as Weight).saturating_mul(c as Weight)) .saturating_add(RocksDbWeight::get().reads(5 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } // Storage: CollatorSelection Candidates (r:1 w:1) fn leave_intent(c: u32, ) -> Weight { - (26_690_000 as Weight) + (26_071_000 as Weight) // Standard Error: 4_000 - .saturating_add((308_000 as Weight).saturating_mul(c as Weight)) + .saturating_add((242_000 as Weight).saturating_mul(c as Weight)) .saturating_add(RocksDbWeight::get().reads(1 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } // Storage: CollatorSelection Invulnerables (r:1 w:0) // Storage: CollatorSelection Candidates (r:1 w:1) fn remove_collator(c: u32, ) -> Weight { - (29_105_000 as Weight) + (28_379_000 as Weight) // Standard Error: 4_000 - .saturating_add((303_000 as Weight).saturating_mul(c as Weight)) + .saturating_add((262_000 as Weight).saturating_mul(c as Weight)) .saturating_add(RocksDbWeight::get().reads(2 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } @@ -218,9 +218,9 @@ impl WeightInfo for () { // Storage: Session NextKeys (r:1 w:0) // Storage: CollatorSelection CandidacyBond (r:1 w:0) fn register_candidate(c: u32, ) -> Weight { - (38_248_000 as Weight) - // Standard Error: 4_000 - .saturating_add((372_000 as Weight).saturating_mul(c as Weight)) + (38_069_000 as Weight) + // Standard Error: 5_000 + .saturating_add((272_000 as Weight).saturating_mul(c as Weight)) .saturating_add(RocksDbWeight::get().reads(5 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } @@ -228,7 +228,7 @@ impl WeightInfo for () { // Storage: CollatorSelection BlocksPerCollatorThisSession (r:1 w:1) // Storage: System BlockWeight (r:1 w:1) fn note_author() -> Weight { - (35_325_000 as Weight) + (37_727_000 as Weight) .saturating_add(RocksDbWeight::get().reads(4 as Weight)) .saturating_add(RocksDbWeight::get().writes(4 as Weight)) } @@ -241,12 +241,12 @@ impl WeightInfo for () { // Storage: Session Validators (r:1 w:0) // Storage: System Account (r:1 w:1) fn new_session(c: u32, ) -> Weight { - (0 as Weight) - // Standard Error: 85_000 - .saturating_add((27_297_000 as Weight).saturating_mul(c as Weight)) + (1_918_000 as Weight) + // Standard Error: 86_000 + .saturating_add((25_519_000 as Weight).saturating_mul(c as Weight)) .saturating_add(RocksDbWeight::get().reads(6 as Weight)) .saturating_add(RocksDbWeight::get().reads((2 as Weight).saturating_mul(c as Weight))) .saturating_add(RocksDbWeight::get().writes(2 as Weight)) .saturating_add(RocksDbWeight::get().writes((2 as Weight).saturating_mul(c as Weight))) } -} +} \ No newline at end of file diff --git a/runtime/calamari/src/weights/pallet_asset_manager.rs b/runtime/calamari/src/weights/pallet_asset_manager.rs index f44aa907b..75b771d13 100644 --- a/runtime/calamari/src/weights/pallet_asset_manager.rs +++ b/runtime/calamari/src/weights/pallet_asset_manager.rs @@ -17,7 +17,7 @@ //! Autogenerated weights for pallet_asset_manager //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-04-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-05-09, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("calamari-dev"), DB CACHE: 1024 // Executed Command: @@ -48,6 +48,7 @@ pub trait WeightInfo { fn update_asset_location() -> Weight; fn update_asset_metadata() -> Weight; fn mint_asset() -> Weight; + fn set_min_xcm_fee() -> Weight; } /// Weights for pallet_asset_manager using the Substrate node and recommended hardware. @@ -60,21 +61,21 @@ impl pallet_asset_manager::WeightInfo for SubstrateWeig // Storage: AssetManager AssetIdMetadata (r:0 w:1) // Storage: AssetManager AssetIdLocation (r:0 w:1) fn register_asset() -> Weight { - (36_641_000 as Weight) + (37_499_000 as Weight) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(6 as Weight)) } // Storage: AssetManager AssetIdLocation (r:1 w:0) // Storage: AssetManager UnitsPerSecond (r:0 w:1) fn set_units_per_second() -> Weight { - (46_844_000 as Weight) + (45_117_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: AssetManager AssetIdLocation (r:1 w:1) // Storage: AssetManager LocationAssetId (r:1 w:2) fn update_asset_location() -> Weight { - (55_586_000 as Weight) + (52_417_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } @@ -83,7 +84,7 @@ impl pallet_asset_manager::WeightInfo for SubstrateWeig // Storage: Assets Metadata (r:1 w:1) // Storage: AssetManager AssetIdMetadata (r:0 w:1) fn update_asset_metadata() -> Weight { - (62_956_000 as Weight) + (59_235_000 as Weight) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } @@ -91,10 +92,17 @@ impl pallet_asset_manager::WeightInfo for SubstrateWeig // Storage: Assets Asset (r:1 w:1) // Storage: Assets Account (r:1 w:1) fn mint_asset() -> Weight { - (75_507_000 as Weight) + (69_572_000 as Weight) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } + // Storage: AssetManager AssetIdLocation (r:1 w:0) + // Storage: AssetManager MinXcmFee (r:0 w:1) + fn set_min_xcm_fee() -> Weight { + (45_288_000 as Weight) + .saturating_add(T::DbWeight::get().reads(1 as Weight)) + .saturating_add(T::DbWeight::get().writes(1 as Weight)) + } } // For backwards compatibility and tests @@ -106,21 +114,21 @@ impl WeightInfo for () { // Storage: AssetManager AssetIdMetadata (r:0 w:1) // Storage: AssetManager AssetIdLocation (r:0 w:1) fn register_asset() -> Weight { - (36_641_000 as Weight) + (37_499_000 as Weight) .saturating_add(RocksDbWeight::get().reads(4 as Weight)) .saturating_add(RocksDbWeight::get().writes(6 as Weight)) } // Storage: AssetManager AssetIdLocation (r:1 w:0) // Storage: AssetManager UnitsPerSecond (r:0 w:1) fn set_units_per_second() -> Weight { - (46_844_000 as Weight) + (45_117_000 as Weight) .saturating_add(RocksDbWeight::get().reads(1 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } // Storage: AssetManager AssetIdLocation (r:1 w:1) // Storage: AssetManager LocationAssetId (r:1 w:2) fn update_asset_location() -> Weight { - (55_586_000 as Weight) + (52_417_000 as Weight) .saturating_add(RocksDbWeight::get().reads(2 as Weight)) .saturating_add(RocksDbWeight::get().writes(3 as Weight)) } @@ -129,7 +137,7 @@ impl WeightInfo for () { // Storage: Assets Metadata (r:1 w:1) // Storage: AssetManager AssetIdMetadata (r:0 w:1) fn update_asset_metadata() -> Weight { - (62_956_000 as Weight) + (59_235_000 as Weight) .saturating_add(RocksDbWeight::get().reads(3 as Weight)) .saturating_add(RocksDbWeight::get().writes(2 as Weight)) } @@ -137,8 +145,15 @@ impl WeightInfo for () { // Storage: Assets Asset (r:1 w:1) // Storage: Assets Account (r:1 w:1) fn mint_asset() -> Weight { - (75_507_000 as Weight) + (69_572_000 as Weight) .saturating_add(RocksDbWeight::get().reads(3 as Weight)) .saturating_add(RocksDbWeight::get().writes(2 as Weight)) } -} + // Storage: AssetManager AssetIdLocation (r:1 w:0) + // Storage: AssetManager MinXcmFee (r:0 w:1) + fn set_min_xcm_fee() -> Weight { + (45_288_000 as Weight) + .saturating_add(RocksDbWeight::get().reads(1 as Weight)) + .saturating_add(RocksDbWeight::get().writes(1 as Weight)) + } +} \ No newline at end of file diff --git a/runtime/calamari/src/weights/pallet_assets.rs b/runtime/calamari/src/weights/pallet_assets.rs index f79048b44..4286f8fd9 100644 --- a/runtime/calamari/src/weights/pallet_assets.rs +++ b/runtime/calamari/src/weights/pallet_assets.rs @@ -17,7 +17,7 @@ //! Autogenerated weights for pallet_assets //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-04-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-05-09, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("calamari-dev"), DB CACHE: 1024 // Executed Command: @@ -73,13 +73,13 @@ pub struct SubstrateWeight(PhantomData); impl pallet_assets::WeightInfo for SubstrateWeight { // Storage: Assets Asset (r:1 w:1) fn create() -> Weight { - (13_468_000 as Weight) + (14_158_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Assets Asset (r:1 w:1) fn force_create() -> Weight { - (12_852_000 as Weight) + (12_910_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } @@ -90,12 +90,12 @@ impl pallet_assets::WeightInfo for SubstrateWeight { // Storage: Assets Approvals (r:501 w:500) fn destroy(c: u32, s: u32, a: u32, ) -> Weight { (0 as Weight) - // Standard Error: 49_000 - .saturating_add((16_774_000 as Weight).saturating_mul(c as Weight)) - // Standard Error: 49_000 - .saturating_add((19_880_000 as Weight).saturating_mul(s as Weight)) - // Standard Error: 498_000 - .saturating_add((13_750_000 as Weight).saturating_mul(a as Weight)) + // Standard Error: 50_000 + .saturating_add((16_884_000 as Weight).saturating_mul(c as Weight)) + // Standard Error: 50_000 + .saturating_add((19_626_000 as Weight).saturating_mul(s as Weight)) + // Standard Error: 507_000 + .saturating_add((14_619_000 as Weight).saturating_mul(a as Weight)) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(c as Weight))) .saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(s as Weight))) @@ -108,14 +108,14 @@ impl pallet_assets::WeightInfo for SubstrateWeight { // Storage: Assets Asset (r:1 w:1) // Storage: Assets Account (r:1 w:1) fn mint() -> Weight { - (28_686_000 as Weight) + (28_773_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Assets Asset (r:1 w:1) // Storage: Assets Account (r:1 w:1) fn burn() -> Weight { - (30_544_000 as Weight) + (33_665_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } @@ -123,7 +123,7 @@ impl pallet_assets::WeightInfo for SubstrateWeight { // Storage: Assets Account (r:2 w:2) // Storage: System Account (r:1 w:1) fn transfer() -> Weight { - (44_446_000 as Weight) + (45_884_000 as Weight) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } @@ -131,7 +131,7 @@ impl pallet_assets::WeightInfo for SubstrateWeight { // Storage: Assets Account (r:2 w:2) // Storage: System Account (r:1 w:1) fn transfer_keep_alive() -> Weight { - (39_838_000 as Weight) + (41_376_000 as Weight) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } @@ -139,91 +139,91 @@ impl pallet_assets::WeightInfo for SubstrateWeight { // Storage: Assets Account (r:2 w:2) // Storage: System Account (r:1 w:1) fn force_transfer() -> Weight { - (48_083_000 as Weight) + (49_408_000 as Weight) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } // Storage: Assets Asset (r:1 w:0) // Storage: Assets Account (r:1 w:1) fn freeze() -> Weight { - (17_492_000 as Weight) + (18_727_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Assets Asset (r:1 w:0) // Storage: Assets Account (r:1 w:1) fn thaw() -> Weight { - (17_736_000 as Weight) + (17_923_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Assets Asset (r:1 w:1) fn freeze_asset() -> Weight { - (13_890_000 as Weight) + (15_007_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Assets Asset (r:1 w:1) fn thaw_asset() -> Weight { - (14_212_000 as Weight) + (14_911_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Assets Asset (r:1 w:1) // Storage: Assets Metadata (r:1 w:0) fn transfer_ownership() -> Weight { - (15_716_000 as Weight) + (16_300_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Assets Asset (r:1 w:1) fn set_team() -> Weight { - (13_946_000 as Weight) + (14_470_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Assets Asset (r:1 w:0) // Storage: Assets Metadata (r:1 w:1) fn set_metadata(n: u32, s: u32, ) -> Weight { - (16_675_000 as Weight) - // Standard Error: 4_000 - .saturating_add((18_000 as Weight).saturating_mul(n as Weight)) - // Standard Error: 4_000 - .saturating_add((16_000 as Weight).saturating_mul(s as Weight)) + (17_992_000 as Weight) + // Standard Error: 1_000 + .saturating_add((3_000 as Weight).saturating_mul(n as Weight)) + // Standard Error: 1_000 + .saturating_add((1_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Assets Asset (r:1 w:0) // Storage: Assets Metadata (r:1 w:1) fn clear_metadata() -> Weight { - (17_805_000 as Weight) + (18_036_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Assets Asset (r:1 w:0) // Storage: Assets Metadata (r:1 w:1) fn force_set_metadata(_n: u32, _s: u32, ) -> Weight { - (15_168_000 as Weight) + (16_175_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Assets Asset (r:1 w:0) // Storage: Assets Metadata (r:1 w:1) fn force_clear_metadata() -> Weight { - (17_398_000 as Weight) + (17_795_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Assets Asset (r:1 w:1) fn force_asset_status() -> Weight { - (13_216_000 as Weight) + (13_710_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Assets Asset (r:1 w:1) // Storage: Assets Approvals (r:1 w:1) fn approve_transfer() -> Weight { - (19_761_000 as Weight) + (22_117_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } @@ -232,21 +232,21 @@ impl pallet_assets::WeightInfo for SubstrateWeight { // Storage: Assets Account (r:2 w:2) // Storage: System Account (r:1 w:1) fn transfer_approved() -> Weight { - (53_943_000 as Weight) + (51_194_000 as Weight) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(5 as Weight)) } // Storage: Assets Asset (r:1 w:1) // Storage: Assets Approvals (r:1 w:1) fn cancel_approval() -> Weight { - (20_648_000 as Weight) + (22_473_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Assets Asset (r:1 w:1) // Storage: Assets Approvals (r:1 w:1) fn force_cancel_approval() -> Weight { - (21_515_000 as Weight) + (23_566_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } @@ -256,13 +256,13 @@ impl pallet_assets::WeightInfo for SubstrateWeight { impl WeightInfo for () { // Storage: Assets Asset (r:1 w:1) fn create() -> Weight { - (13_468_000 as Weight) + (14_158_000 as Weight) .saturating_add(RocksDbWeight::get().reads(1 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } // Storage: Assets Asset (r:1 w:1) fn force_create() -> Weight { - (12_852_000 as Weight) + (12_910_000 as Weight) .saturating_add(RocksDbWeight::get().reads(1 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } @@ -273,12 +273,12 @@ impl WeightInfo for () { // Storage: Assets Approvals (r:501 w:500) fn destroy(c: u32, s: u32, a: u32, ) -> Weight { (0 as Weight) - // Standard Error: 49_000 - .saturating_add((16_774_000 as Weight).saturating_mul(c as Weight)) - // Standard Error: 49_000 - .saturating_add((19_880_000 as Weight).saturating_mul(s as Weight)) - // Standard Error: 498_000 - .saturating_add((13_750_000 as Weight).saturating_mul(a as Weight)) + // Standard Error: 50_000 + .saturating_add((16_884_000 as Weight).saturating_mul(c as Weight)) + // Standard Error: 50_000 + .saturating_add((19_626_000 as Weight).saturating_mul(s as Weight)) + // Standard Error: 507_000 + .saturating_add((14_619_000 as Weight).saturating_mul(a as Weight)) .saturating_add(RocksDbWeight::get().reads(5 as Weight)) .saturating_add(RocksDbWeight::get().reads((2 as Weight).saturating_mul(c as Weight))) .saturating_add(RocksDbWeight::get().reads((2 as Weight).saturating_mul(s as Weight))) @@ -291,14 +291,14 @@ impl WeightInfo for () { // Storage: Assets Asset (r:1 w:1) // Storage: Assets Account (r:1 w:1) fn mint() -> Weight { - (28_686_000 as Weight) + (28_773_000 as Weight) .saturating_add(RocksDbWeight::get().reads(2 as Weight)) .saturating_add(RocksDbWeight::get().writes(2 as Weight)) } // Storage: Assets Asset (r:1 w:1) // Storage: Assets Account (r:1 w:1) fn burn() -> Weight { - (30_544_000 as Weight) + (33_665_000 as Weight) .saturating_add(RocksDbWeight::get().reads(2 as Weight)) .saturating_add(RocksDbWeight::get().writes(2 as Weight)) } @@ -306,7 +306,7 @@ impl WeightInfo for () { // Storage: Assets Account (r:2 w:2) // Storage: System Account (r:1 w:1) fn transfer() -> Weight { - (44_446_000 as Weight) + (45_884_000 as Weight) .saturating_add(RocksDbWeight::get().reads(4 as Weight)) .saturating_add(RocksDbWeight::get().writes(4 as Weight)) } @@ -314,7 +314,7 @@ impl WeightInfo for () { // Storage: Assets Account (r:2 w:2) // Storage: System Account (r:1 w:1) fn transfer_keep_alive() -> Weight { - (39_838_000 as Weight) + (41_376_000 as Weight) .saturating_add(RocksDbWeight::get().reads(4 as Weight)) .saturating_add(RocksDbWeight::get().writes(4 as Weight)) } @@ -322,91 +322,91 @@ impl WeightInfo for () { // Storage: Assets Account (r:2 w:2) // Storage: System Account (r:1 w:1) fn force_transfer() -> Weight { - (48_083_000 as Weight) + (49_408_000 as Weight) .saturating_add(RocksDbWeight::get().reads(4 as Weight)) .saturating_add(RocksDbWeight::get().writes(4 as Weight)) } // Storage: Assets Asset (r:1 w:0) // Storage: Assets Account (r:1 w:1) fn freeze() -> Weight { - (17_492_000 as Weight) + (18_727_000 as Weight) .saturating_add(RocksDbWeight::get().reads(2 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } // Storage: Assets Asset (r:1 w:0) // Storage: Assets Account (r:1 w:1) fn thaw() -> Weight { - (17_736_000 as Weight) + (17_923_000 as Weight) .saturating_add(RocksDbWeight::get().reads(2 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } // Storage: Assets Asset (r:1 w:1) fn freeze_asset() -> Weight { - (13_890_000 as Weight) + (15_007_000 as Weight) .saturating_add(RocksDbWeight::get().reads(1 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } // Storage: Assets Asset (r:1 w:1) fn thaw_asset() -> Weight { - (14_212_000 as Weight) + (14_911_000 as Weight) .saturating_add(RocksDbWeight::get().reads(1 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } // Storage: Assets Asset (r:1 w:1) // Storage: Assets Metadata (r:1 w:0) fn transfer_ownership() -> Weight { - (15_716_000 as Weight) + (16_300_000 as Weight) .saturating_add(RocksDbWeight::get().reads(2 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } // Storage: Assets Asset (r:1 w:1) fn set_team() -> Weight { - (13_946_000 as Weight) + (14_470_000 as Weight) .saturating_add(RocksDbWeight::get().reads(1 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } // Storage: Assets Asset (r:1 w:0) // Storage: Assets Metadata (r:1 w:1) fn set_metadata(n: u32, s: u32, ) -> Weight { - (16_675_000 as Weight) - // Standard Error: 4_000 - .saturating_add((18_000 as Weight).saturating_mul(n as Weight)) - // Standard Error: 4_000 - .saturating_add((16_000 as Weight).saturating_mul(s as Weight)) + (17_992_000 as Weight) + // Standard Error: 1_000 + .saturating_add((3_000 as Weight).saturating_mul(n as Weight)) + // Standard Error: 1_000 + .saturating_add((1_000 as Weight).saturating_mul(s as Weight)) .saturating_add(RocksDbWeight::get().reads(2 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } // Storage: Assets Asset (r:1 w:0) // Storage: Assets Metadata (r:1 w:1) fn clear_metadata() -> Weight { - (17_805_000 as Weight) + (18_036_000 as Weight) .saturating_add(RocksDbWeight::get().reads(2 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } // Storage: Assets Asset (r:1 w:0) // Storage: Assets Metadata (r:1 w:1) fn force_set_metadata(_n: u32, _s: u32, ) -> Weight { - (15_168_000 as Weight) + (16_175_000 as Weight) .saturating_add(RocksDbWeight::get().reads(2 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } // Storage: Assets Asset (r:1 w:0) // Storage: Assets Metadata (r:1 w:1) fn force_clear_metadata() -> Weight { - (17_398_000 as Weight) + (17_795_000 as Weight) .saturating_add(RocksDbWeight::get().reads(2 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } // Storage: Assets Asset (r:1 w:1) fn force_asset_status() -> Weight { - (13_216_000 as Weight) + (13_710_000 as Weight) .saturating_add(RocksDbWeight::get().reads(1 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } // Storage: Assets Asset (r:1 w:1) // Storage: Assets Approvals (r:1 w:1) fn approve_transfer() -> Weight { - (19_761_000 as Weight) + (22_117_000 as Weight) .saturating_add(RocksDbWeight::get().reads(2 as Weight)) .saturating_add(RocksDbWeight::get().writes(2 as Weight)) } @@ -415,22 +415,22 @@ impl WeightInfo for () { // Storage: Assets Account (r:2 w:2) // Storage: System Account (r:1 w:1) fn transfer_approved() -> Weight { - (53_943_000 as Weight) + (51_194_000 as Weight) .saturating_add(RocksDbWeight::get().reads(5 as Weight)) .saturating_add(RocksDbWeight::get().writes(5 as Weight)) } // Storage: Assets Asset (r:1 w:1) // Storage: Assets Approvals (r:1 w:1) fn cancel_approval() -> Weight { - (20_648_000 as Weight) + (22_473_000 as Weight) .saturating_add(RocksDbWeight::get().reads(2 as Weight)) .saturating_add(RocksDbWeight::get().writes(2 as Weight)) } // Storage: Assets Asset (r:1 w:1) // Storage: Assets Approvals (r:1 w:1) fn force_cancel_approval() -> Weight { - (21_515_000 as Weight) + (23_566_000 as Weight) .saturating_add(RocksDbWeight::get().reads(2 as Weight)) .saturating_add(RocksDbWeight::get().writes(2 as Weight)) } -} +} \ No newline at end of file diff --git a/runtime/calamari/src/weights/pallet_balances.rs b/runtime/calamari/src/weights/pallet_balances.rs index 3bc656ccf..2926398ac 100644 --- a/runtime/calamari/src/weights/pallet_balances.rs +++ b/runtime/calamari/src/weights/pallet_balances.rs @@ -17,7 +17,7 @@ //! Autogenerated weights for pallet_balances //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-04-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-05-09, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("calamari-dev"), DB CACHE: 1024 // Executed Command: @@ -57,43 +57,43 @@ pub struct SubstrateWeight(PhantomData); impl pallet_balances::WeightInfo for SubstrateWeight { // Storage: System Account (r:1 w:1) fn transfer() -> Weight { - (42_645_000 as Weight) + (41_233_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: System Account (r:1 w:1) fn transfer_keep_alive() -> Weight { - (29_716_000 as Weight) + (28_667_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: System Account (r:1 w:1) fn set_balance_creating() -> Weight { - (18_590_000 as Weight) + (17_802_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: System Account (r:1 w:1) fn set_balance_killing() -> Weight { - (22_273_000 as Weight) + (21_459_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: System Account (r:2 w:2) fn force_transfer() -> Weight { - (42_302_000 as Weight) + (37_289_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: System Account (r:1 w:1) fn transfer_all() -> Weight { - (35_512_000 as Weight) + (37_186_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: System Account (r:1 w:1) fn force_unreserve() -> Weight { - (16_466_000 as Weight) + (16_095_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } @@ -103,44 +103,44 @@ impl pallet_balances::WeightInfo for SubstrateWeight impl WeightInfo for () { // Storage: System Account (r:1 w:1) fn transfer() -> Weight { - (42_645_000 as Weight) + (41_233_000 as Weight) .saturating_add(RocksDbWeight::get().reads(1 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } // Storage: System Account (r:1 w:1) fn transfer_keep_alive() -> Weight { - (29_716_000 as Weight) + (28_667_000 as Weight) .saturating_add(RocksDbWeight::get().reads(1 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } // Storage: System Account (r:1 w:1) fn set_balance_creating() -> Weight { - (18_590_000 as Weight) + (17_802_000 as Weight) .saturating_add(RocksDbWeight::get().reads(1 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } // Storage: System Account (r:1 w:1) fn set_balance_killing() -> Weight { - (22_273_000 as Weight) + (21_459_000 as Weight) .saturating_add(RocksDbWeight::get().reads(1 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } // Storage: System Account (r:2 w:2) fn force_transfer() -> Weight { - (42_302_000 as Weight) + (37_289_000 as Weight) .saturating_add(RocksDbWeight::get().reads(2 as Weight)) .saturating_add(RocksDbWeight::get().writes(2 as Weight)) } // Storage: System Account (r:1 w:1) fn transfer_all() -> Weight { - (35_512_000 as Weight) + (37_186_000 as Weight) .saturating_add(RocksDbWeight::get().reads(1 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } // Storage: System Account (r:1 w:1) fn force_unreserve() -> Weight { - (16_466_000 as Weight) + (16_095_000 as Weight) .saturating_add(RocksDbWeight::get().reads(1 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } -} +} \ No newline at end of file diff --git a/runtime/calamari/src/weights/pallet_collective.rs b/runtime/calamari/src/weights/pallet_collective.rs index 52891f1ad..310226ef6 100644 --- a/runtime/calamari/src/weights/pallet_collective.rs +++ b/runtime/calamari/src/weights/pallet_collective.rs @@ -17,7 +17,7 @@ //! Autogenerated weights for pallet_collective //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-04-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-05-09, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("calamari-dev"), DB CACHE: 1024 // Executed Command: @@ -62,14 +62,12 @@ impl pallet_collective::WeightInfo for SubstrateWeight< // Storage: Council Proposals (r:1 w:0) // Storage: Council Voting (r:100 w:100) // Storage: Council Prime (r:0 w:1) - fn set_members(m: u32, n: u32, p: u32, ) -> Weight { + fn set_members(m: u32, _n: u32, p: u32, ) -> Weight { (0 as Weight) - // Standard Error: 12_000 - .saturating_add((18_779_000 as Weight).saturating_mul(m as Weight)) - // Standard Error: 12_000 - .saturating_add((205_000 as Weight).saturating_mul(n as Weight)) - // Standard Error: 12_000 - .saturating_add((21_465_000 as Weight).saturating_mul(p as Weight)) + // Standard Error: 8_000 + .saturating_add((13_671_000 as Weight).saturating_mul(m as Weight)) + // Standard Error: 8_000 + .saturating_add((16_480_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(p as Weight))) .saturating_add(T::DbWeight::get().writes(2 as Weight)) @@ -77,21 +75,21 @@ impl pallet_collective::WeightInfo for SubstrateWeight< } // Storage: Council Members (r:1 w:0) fn execute(b: u32, m: u32, ) -> Weight { - (14_269_000 as Weight) + (13_866_000 as Weight) // Standard Error: 0 .saturating_add((2_000 as Weight).saturating_mul(b as Weight)) // Standard Error: 0 - .saturating_add((89_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((36_000 as Weight).saturating_mul(m as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) } // Storage: Council Members (r:1 w:0) // Storage: Council ProposalOf (r:1 w:0) fn propose_execute(b: u32, m: u32, ) -> Weight { - (17_661_000 as Weight) + (16_425_000 as Weight) // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(b as Weight)) - // Standard Error: 1_000 - .saturating_add((164_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((3_000 as Weight).saturating_mul(b as Weight)) + // Standard Error: 0 + .saturating_add((63_000 as Weight).saturating_mul(m as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) } // Storage: Council Members (r:1 w:0) @@ -100,22 +98,22 @@ impl pallet_collective::WeightInfo for SubstrateWeight< // Storage: Council ProposalCount (r:1 w:1) // Storage: Council Voting (r:0 w:1) fn propose_proposed(b: u32, m: u32, p: u32, ) -> Weight { - (19_591_000 as Weight) + (18_621_000 as Weight) // Standard Error: 0 - .saturating_add((8_000 as Weight).saturating_mul(b as Weight)) + .saturating_add((9_000 as Weight).saturating_mul(b as Weight)) // Standard Error: 1_000 - .saturating_add((100_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((48_000 as Weight).saturating_mul(m as Weight)) // Standard Error: 1_000 - .saturating_add((264_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((201_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } // Storage: Council Members (r:1 w:0) // Storage: Council Voting (r:1 w:1) fn vote(m: u32, ) -> Weight { - (29_195_000 as Weight) + (29_953_000 as Weight) // Standard Error: 2_000 - .saturating_add((210_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((101_000 as Weight).saturating_mul(m as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } @@ -124,11 +122,11 @@ impl pallet_collective::WeightInfo for SubstrateWeight< // Storage: Council Proposals (r:1 w:1) // Storage: Council ProposalOf (r:0 w:1) fn close_early_disapproved(m: u32, p: u32, ) -> Weight { - (28_836_000 as Weight) + (29_303_000 as Weight) // Standard Error: 2_000 - .saturating_add((153_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((50_000 as Weight).saturating_mul(m as Weight)) // Standard Error: 1_000 - .saturating_add((206_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((141_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } @@ -137,13 +135,13 @@ impl pallet_collective::WeightInfo for SubstrateWeight< // Storage: Council ProposalOf (r:1 w:1) // Storage: Council Proposals (r:1 w:1) fn close_early_approved(b: u32, m: u32, p: u32, ) -> Weight { - (28_169_000 as Weight) + (26_235_000 as Weight) // Standard Error: 0 .saturating_add((9_000 as Weight).saturating_mul(b as Weight)) // Standard Error: 1_000 - .saturating_add((184_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((95_000 as Weight).saturating_mul(m as Weight)) // Standard Error: 1_000 - .saturating_add((271_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((212_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } @@ -153,11 +151,11 @@ impl pallet_collective::WeightInfo for SubstrateWeight< // Storage: Council Proposals (r:1 w:1) // Storage: Council ProposalOf (r:0 w:1) fn close_disapproved(m: u32, p: u32, ) -> Weight { - (29_966_000 as Weight) + (31_348_000 as Weight) // Standard Error: 2_000 - .saturating_add((173_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((64_000 as Weight).saturating_mul(m as Weight)) // Standard Error: 1_000 - .saturating_add((215_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((141_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } @@ -167,13 +165,13 @@ impl pallet_collective::WeightInfo for SubstrateWeight< // Storage: Council ProposalOf (r:1 w:1) // Storage: Council Proposals (r:1 w:1) fn close_approved(b: u32, m: u32, p: u32, ) -> Weight { - (28_962_000 as Weight) + (31_885_000 as Weight) // Standard Error: 0 - .saturating_add((9_000 as Weight).saturating_mul(b as Weight)) + .saturating_add((7_000 as Weight).saturating_mul(b as Weight)) // Standard Error: 1_000 - .saturating_add((196_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((87_000 as Weight).saturating_mul(m as Weight)) // Standard Error: 1_000 - .saturating_add((279_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((204_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } @@ -181,9 +179,9 @@ impl pallet_collective::WeightInfo for SubstrateWeight< // Storage: Council Voting (r:0 w:1) // Storage: Council ProposalOf (r:0 w:1) fn disapprove_proposal(p: u32, ) -> Weight { - (16_278_000 as Weight) + (16_091_000 as Weight) // Standard Error: 1_000 - .saturating_add((258_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((199_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } @@ -195,14 +193,12 @@ impl WeightInfo for () { // Storage: Council Proposals (r:1 w:0) // Storage: Council Voting (r:100 w:100) // Storage: Council Prime (r:0 w:1) - fn set_members(m: u32, n: u32, p: u32, ) -> Weight { + fn set_members(m: u32, _n: u32, p: u32, ) -> Weight { (0 as Weight) - // Standard Error: 12_000 - .saturating_add((18_779_000 as Weight).saturating_mul(m as Weight)) - // Standard Error: 12_000 - .saturating_add((205_000 as Weight).saturating_mul(n as Weight)) - // Standard Error: 12_000 - .saturating_add((21_465_000 as Weight).saturating_mul(p as Weight)) + // Standard Error: 8_000 + .saturating_add((13_671_000 as Weight).saturating_mul(m as Weight)) + // Standard Error: 8_000 + .saturating_add((16_480_000 as Weight).saturating_mul(p as Weight)) .saturating_add(RocksDbWeight::get().reads(2 as Weight)) .saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(p as Weight))) .saturating_add(RocksDbWeight::get().writes(2 as Weight)) @@ -210,21 +206,21 @@ impl WeightInfo for () { } // Storage: Council Members (r:1 w:0) fn execute(b: u32, m: u32, ) -> Weight { - (14_269_000 as Weight) + (13_866_000 as Weight) // Standard Error: 0 .saturating_add((2_000 as Weight).saturating_mul(b as Weight)) // Standard Error: 0 - .saturating_add((89_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((36_000 as Weight).saturating_mul(m as Weight)) .saturating_add(RocksDbWeight::get().reads(1 as Weight)) } // Storage: Council Members (r:1 w:0) // Storage: Council ProposalOf (r:1 w:0) fn propose_execute(b: u32, m: u32, ) -> Weight { - (17_661_000 as Weight) + (16_425_000 as Weight) // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(b as Weight)) - // Standard Error: 1_000 - .saturating_add((164_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((3_000 as Weight).saturating_mul(b as Weight)) + // Standard Error: 0 + .saturating_add((63_000 as Weight).saturating_mul(m as Weight)) .saturating_add(RocksDbWeight::get().reads(2 as Weight)) } // Storage: Council Members (r:1 w:0) @@ -233,22 +229,22 @@ impl WeightInfo for () { // Storage: Council ProposalCount (r:1 w:1) // Storage: Council Voting (r:0 w:1) fn propose_proposed(b: u32, m: u32, p: u32, ) -> Weight { - (19_591_000 as Weight) + (18_621_000 as Weight) // Standard Error: 0 - .saturating_add((8_000 as Weight).saturating_mul(b as Weight)) + .saturating_add((9_000 as Weight).saturating_mul(b as Weight)) // Standard Error: 1_000 - .saturating_add((100_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((48_000 as Weight).saturating_mul(m as Weight)) // Standard Error: 1_000 - .saturating_add((264_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((201_000 as Weight).saturating_mul(p as Weight)) .saturating_add(RocksDbWeight::get().reads(4 as Weight)) .saturating_add(RocksDbWeight::get().writes(4 as Weight)) } // Storage: Council Members (r:1 w:0) // Storage: Council Voting (r:1 w:1) fn vote(m: u32, ) -> Weight { - (29_195_000 as Weight) + (29_953_000 as Weight) // Standard Error: 2_000 - .saturating_add((210_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((101_000 as Weight).saturating_mul(m as Weight)) .saturating_add(RocksDbWeight::get().reads(2 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } @@ -257,11 +253,11 @@ impl WeightInfo for () { // Storage: Council Proposals (r:1 w:1) // Storage: Council ProposalOf (r:0 w:1) fn close_early_disapproved(m: u32, p: u32, ) -> Weight { - (28_836_000 as Weight) + (29_303_000 as Weight) // Standard Error: 2_000 - .saturating_add((153_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((50_000 as Weight).saturating_mul(m as Weight)) // Standard Error: 1_000 - .saturating_add((206_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((141_000 as Weight).saturating_mul(p as Weight)) .saturating_add(RocksDbWeight::get().reads(3 as Weight)) .saturating_add(RocksDbWeight::get().writes(3 as Weight)) } @@ -270,13 +266,13 @@ impl WeightInfo for () { // Storage: Council ProposalOf (r:1 w:1) // Storage: Council Proposals (r:1 w:1) fn close_early_approved(b: u32, m: u32, p: u32, ) -> Weight { - (28_169_000 as Weight) + (26_235_000 as Weight) // Standard Error: 0 .saturating_add((9_000 as Weight).saturating_mul(b as Weight)) // Standard Error: 1_000 - .saturating_add((184_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((95_000 as Weight).saturating_mul(m as Weight)) // Standard Error: 1_000 - .saturating_add((271_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((212_000 as Weight).saturating_mul(p as Weight)) .saturating_add(RocksDbWeight::get().reads(4 as Weight)) .saturating_add(RocksDbWeight::get().writes(3 as Weight)) } @@ -286,11 +282,11 @@ impl WeightInfo for () { // Storage: Council Proposals (r:1 w:1) // Storage: Council ProposalOf (r:0 w:1) fn close_disapproved(m: u32, p: u32, ) -> Weight { - (29_966_000 as Weight) + (31_348_000 as Weight) // Standard Error: 2_000 - .saturating_add((173_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((64_000 as Weight).saturating_mul(m as Weight)) // Standard Error: 1_000 - .saturating_add((215_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((141_000 as Weight).saturating_mul(p as Weight)) .saturating_add(RocksDbWeight::get().reads(4 as Weight)) .saturating_add(RocksDbWeight::get().writes(3 as Weight)) } @@ -300,13 +296,13 @@ impl WeightInfo for () { // Storage: Council ProposalOf (r:1 w:1) // Storage: Council Proposals (r:1 w:1) fn close_approved(b: u32, m: u32, p: u32, ) -> Weight { - (28_962_000 as Weight) + (31_885_000 as Weight) // Standard Error: 0 - .saturating_add((9_000 as Weight).saturating_mul(b as Weight)) + .saturating_add((7_000 as Weight).saturating_mul(b as Weight)) // Standard Error: 1_000 - .saturating_add((196_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((87_000 as Weight).saturating_mul(m as Weight)) // Standard Error: 1_000 - .saturating_add((279_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((204_000 as Weight).saturating_mul(p as Weight)) .saturating_add(RocksDbWeight::get().reads(5 as Weight)) .saturating_add(RocksDbWeight::get().writes(3 as Weight)) } @@ -314,10 +310,10 @@ impl WeightInfo for () { // Storage: Council Voting (r:0 w:1) // Storage: Council ProposalOf (r:0 w:1) fn disapprove_proposal(p: u32, ) -> Weight { - (16_278_000 as Weight) + (16_091_000 as Weight) // Standard Error: 1_000 - .saturating_add((258_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((199_000 as Weight).saturating_mul(p as Weight)) .saturating_add(RocksDbWeight::get().reads(1 as Weight)) .saturating_add(RocksDbWeight::get().writes(3 as Weight)) } -} +} \ No newline at end of file diff --git a/runtime/calamari/src/weights/pallet_democracy.rs b/runtime/calamari/src/weights/pallet_democracy.rs index f6607e3af..48c5e7f1e 100644 --- a/runtime/calamari/src/weights/pallet_democracy.rs +++ b/runtime/calamari/src/weights/pallet_democracy.rs @@ -17,7 +17,7 @@ //! Autogenerated weights for pallet_democracy //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-04-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-05-09, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("calamari-dev"), DB CACHE: 1024 // Executed Command: @@ -79,15 +79,15 @@ impl pallet_democracy::WeightInfo for SubstrateWeight Weight { - (50_974_000 as Weight) + (49_415_000 as Weight) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } // Storage: Democracy DepositOf (r:1 w:1) fn second(s: u32, ) -> Weight { - (28_783_000 as Weight) + (27_983_000 as Weight) // Standard Error: 1_000 - .saturating_add((187_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((130_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } @@ -95,9 +95,9 @@ impl pallet_democracy::WeightInfo for SubstrateWeight Weight { - (36_746_000 as Weight) + (36_474_000 as Weight) // Standard Error: 2_000 - .saturating_add((198_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((165_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } @@ -105,16 +105,16 @@ impl pallet_democracy::WeightInfo for SubstrateWeight Weight { - (36_260_000 as Weight) + (35_969_000 as Weight) // Standard Error: 2_000 - .saturating_add((210_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((170_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } // Storage: Democracy ReferendumInfoOf (r:1 w:1) // Storage: Democracy Cancellations (r:1 w:1) fn emergency_cancel() -> Weight { - (16_033_000 as Weight) + (16_187_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } @@ -125,45 +125,45 @@ impl pallet_democracy::WeightInfo for SubstrateWeight Weight { - (47_890_000 as Weight) + (46_809_000 as Weight) // Standard Error: 3_000 - .saturating_add((332_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((222_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().writes(6 as Weight)) } // Storage: Democracy NextExternal (r:1 w:1) // Storage: Democracy Blacklist (r:1 w:0) fn external_propose(v: u32, ) -> Weight { - (8_511_000 as Weight) + (8_514_000 as Weight) // Standard Error: 0 - .saturating_add((88_000 as Weight).saturating_mul(v as Weight)) + .saturating_add((33_000 as Weight).saturating_mul(v as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Democracy NextExternal (r:0 w:1) fn external_propose_majority() -> Weight { - (1_438_000 as Weight) + (1_469_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Democracy NextExternal (r:0 w:1) fn external_propose_default() -> Weight { - (1_579_000 as Weight) + (1_546_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Democracy NextExternal (r:1 w:1) // Storage: Democracy ReferendumCount (r:1 w:1) // Storage: Democracy ReferendumInfoOf (r:0 w:1) fn fast_track() -> Weight { - (17_916_000 as Weight) + (16_667_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } // Storage: Democracy NextExternal (r:1 w:1) // Storage: Democracy Blacklist (r:1 w:1) fn veto_external(v: u32, ) -> Weight { - (18_842_000 as Weight) + (17_944_000 as Weight) // Standard Error: 1_000 - .saturating_add((106_000 as Weight).saturating_mul(v as Weight)) + .saturating_add((59_000 as Weight).saturating_mul(v as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } @@ -171,23 +171,23 @@ impl pallet_democracy::WeightInfo for SubstrateWeight Weight { - (31_621_000 as Weight) + (32_013_000 as Weight) // Standard Error: 2_000 - .saturating_add((320_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((188_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } // Storage: Democracy ReferendumInfoOf (r:0 w:1) fn cancel_referendum() -> Weight { - (10_564_000 as Weight) + (9_768_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Scheduler Lookup (r:1 w:1) // Storage: Scheduler Agenda (r:1 w:1) fn cancel_queued(r: u32, ) -> Weight { - (19_351_000 as Weight) - // Standard Error: 6_000 - .saturating_add((2_794_000 as Weight).saturating_mul(r as Weight)) + (22_127_000 as Weight) + // Standard Error: 4_000 + .saturating_add((1_722_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } @@ -195,9 +195,9 @@ impl pallet_democracy::WeightInfo for SubstrateWeight Weight { - (385_000 as Weight) - // Standard Error: 8_000 - .saturating_add((3_653_000 as Weight).saturating_mul(r as Weight)) + (4_479_000 as Weight) + // Standard Error: 6_000 + .saturating_add((3_435_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(r as Weight))) .saturating_add(T::DbWeight::get().writes(1 as Weight)) @@ -209,9 +209,9 @@ impl pallet_democracy::WeightInfo for SubstrateWeight Weight { - (5_034_000 as Weight) - // Standard Error: 8_000 - .saturating_add((3_670_000 as Weight).saturating_mul(r as Weight)) + (9_835_000 as Weight) + // Standard Error: 5_000 + .saturating_add((3_422_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(5 as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(r as Weight))) .saturating_add(T::DbWeight::get().writes(1 as Weight)) @@ -220,9 +220,9 @@ impl pallet_democracy::WeightInfo for SubstrateWeight Weight { - (30_684_000 as Weight) - // Standard Error: 10_000 - .saturating_add((4_694_000 as Weight).saturating_mul(r as Weight)) + (36_648_000 as Weight) + // Standard Error: 6_000 + .saturating_add((4_371_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(4 as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(r as Weight))) .saturating_add(T::DbWeight::get().writes(4 as Weight)) @@ -231,9 +231,9 @@ impl pallet_democracy::WeightInfo for SubstrateWeight Weight { - (12_638_000 as Weight) - // Standard Error: 10_000 - .saturating_add((4_724_000 as Weight).saturating_mul(r as Weight)) + (17_968_000 as Weight) + // Standard Error: 7_000 + .saturating_add((4_421_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(r as Weight))) .saturating_add(T::DbWeight::get().writes(2 as Weight)) @@ -241,12 +241,12 @@ impl pallet_democracy::WeightInfo for SubstrateWeight Weight { - (1_954_000 as Weight) + (1_637_000 as Weight) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Democracy Preimages (r:1 w:1) fn note_preimage(b: u32, ) -> Weight { - (26_347_000 as Weight) + (24_889_000 as Weight) // Standard Error: 0 .saturating_add((2_000 as Weight).saturating_mul(b as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) @@ -254,7 +254,7 @@ impl pallet_democracy::WeightInfo for SubstrateWeight Weight { - (17_183_000 as Weight) + (16_588_000 as Weight) // Standard Error: 0 .saturating_add((2_000 as Weight).saturating_mul(b as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) @@ -263,7 +263,7 @@ impl pallet_democracy::WeightInfo for SubstrateWeight Weight { - (25_939_000 as Weight) + (24_561_000 as Weight) // Standard Error: 0 .saturating_add((1_000 as Weight).saturating_mul(b as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) @@ -273,9 +273,9 @@ impl pallet_democracy::WeightInfo for SubstrateWeight Weight { - (23_954_000 as Weight) + (23_977_000 as Weight) // Standard Error: 1_000 - .saturating_add((57_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((46_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } @@ -283,27 +283,27 @@ impl pallet_democracy::WeightInfo for SubstrateWeight Weight { - (22_578_000 as Weight) + (22_927_000 as Weight) // Standard Error: 1_000 - .saturating_add((151_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((125_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } // Storage: Democracy ReferendumInfoOf (r:1 w:1) // Storage: Democracy VotingOf (r:1 w:1) fn remove_vote(r: u32, ) -> Weight { - (13_884_000 as Weight) + (13_669_000 as Weight) // Standard Error: 1_000 - .saturating_add((143_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((124_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Democracy ReferendumInfoOf (r:1 w:1) // Storage: Democracy VotingOf (r:1 w:1) fn remove_other_vote(r: u32, ) -> Weight { - (14_294_000 as Weight) + (13_714_000 as Weight) // Standard Error: 1_000 - .saturating_add((140_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((130_000 as Weight).saturating_mul(r as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } @@ -316,15 +316,15 @@ impl WeightInfo for () { // Storage: Democracy Blacklist (r:1 w:0) // Storage: Democracy DepositOf (r:0 w:1) fn propose() -> Weight { - (50_974_000 as Weight) + (49_415_000 as Weight) .saturating_add(RocksDbWeight::get().reads(3 as Weight)) .saturating_add(RocksDbWeight::get().writes(3 as Weight)) } // Storage: Democracy DepositOf (r:1 w:1) fn second(s: u32, ) -> Weight { - (28_783_000 as Weight) + (27_983_000 as Weight) // Standard Error: 1_000 - .saturating_add((187_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((130_000 as Weight).saturating_mul(s as Weight)) .saturating_add(RocksDbWeight::get().reads(1 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } @@ -332,9 +332,9 @@ impl WeightInfo for () { // Storage: Democracy VotingOf (r:1 w:1) // Storage: Balances Locks (r:1 w:1) fn vote_new(r: u32, ) -> Weight { - (36_746_000 as Weight) + (36_474_000 as Weight) // Standard Error: 2_000 - .saturating_add((198_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((165_000 as Weight).saturating_mul(r as Weight)) .saturating_add(RocksDbWeight::get().reads(3 as Weight)) .saturating_add(RocksDbWeight::get().writes(3 as Weight)) } @@ -342,16 +342,16 @@ impl WeightInfo for () { // Storage: Democracy VotingOf (r:1 w:1) // Storage: Balances Locks (r:1 w:1) fn vote_existing(r: u32, ) -> Weight { - (36_260_000 as Weight) + (35_969_000 as Weight) // Standard Error: 2_000 - .saturating_add((210_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((170_000 as Weight).saturating_mul(r as Weight)) .saturating_add(RocksDbWeight::get().reads(3 as Weight)) .saturating_add(RocksDbWeight::get().writes(3 as Weight)) } // Storage: Democracy ReferendumInfoOf (r:1 w:1) // Storage: Democracy Cancellations (r:1 w:1) fn emergency_cancel() -> Weight { - (16_033_000 as Weight) + (16_187_000 as Weight) .saturating_add(RocksDbWeight::get().reads(2 as Weight)) .saturating_add(RocksDbWeight::get().writes(2 as Weight)) } @@ -362,45 +362,45 @@ impl WeightInfo for () { // Storage: Democracy DepositOf (r:1 w:1) // Storage: System Account (r:1 w:1) fn blacklist(p: u32, ) -> Weight { - (47_890_000 as Weight) + (46_809_000 as Weight) // Standard Error: 3_000 - .saturating_add((332_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((222_000 as Weight).saturating_mul(p as Weight)) .saturating_add(RocksDbWeight::get().reads(5 as Weight)) .saturating_add(RocksDbWeight::get().writes(6 as Weight)) } // Storage: Democracy NextExternal (r:1 w:1) // Storage: Democracy Blacklist (r:1 w:0) fn external_propose(v: u32, ) -> Weight { - (8_511_000 as Weight) + (8_514_000 as Weight) // Standard Error: 0 - .saturating_add((88_000 as Weight).saturating_mul(v as Weight)) + .saturating_add((33_000 as Weight).saturating_mul(v as Weight)) .saturating_add(RocksDbWeight::get().reads(2 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } // Storage: Democracy NextExternal (r:0 w:1) fn external_propose_majority() -> Weight { - (1_438_000 as Weight) + (1_469_000 as Weight) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } // Storage: Democracy NextExternal (r:0 w:1) fn external_propose_default() -> Weight { - (1_579_000 as Weight) + (1_546_000 as Weight) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } // Storage: Democracy NextExternal (r:1 w:1) // Storage: Democracy ReferendumCount (r:1 w:1) // Storage: Democracy ReferendumInfoOf (r:0 w:1) fn fast_track() -> Weight { - (17_916_000 as Weight) + (16_667_000 as Weight) .saturating_add(RocksDbWeight::get().reads(2 as Weight)) .saturating_add(RocksDbWeight::get().writes(3 as Weight)) } // Storage: Democracy NextExternal (r:1 w:1) // Storage: Democracy Blacklist (r:1 w:1) fn veto_external(v: u32, ) -> Weight { - (18_842_000 as Weight) + (17_944_000 as Weight) // Standard Error: 1_000 - .saturating_add((106_000 as Weight).saturating_mul(v as Weight)) + .saturating_add((59_000 as Weight).saturating_mul(v as Weight)) .saturating_add(RocksDbWeight::get().reads(2 as Weight)) .saturating_add(RocksDbWeight::get().writes(2 as Weight)) } @@ -408,23 +408,23 @@ impl WeightInfo for () { // Storage: Democracy DepositOf (r:1 w:1) // Storage: System Account (r:1 w:1) fn cancel_proposal(p: u32, ) -> Weight { - (31_621_000 as Weight) + (32_013_000 as Weight) // Standard Error: 2_000 - .saturating_add((320_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((188_000 as Weight).saturating_mul(p as Weight)) .saturating_add(RocksDbWeight::get().reads(3 as Weight)) .saturating_add(RocksDbWeight::get().writes(3 as Weight)) } // Storage: Democracy ReferendumInfoOf (r:0 w:1) fn cancel_referendum() -> Weight { - (10_564_000 as Weight) + (9_768_000 as Weight) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } // Storage: Scheduler Lookup (r:1 w:1) // Storage: Scheduler Agenda (r:1 w:1) fn cancel_queued(r: u32, ) -> Weight { - (19_351_000 as Weight) - // Standard Error: 6_000 - .saturating_add((2_794_000 as Weight).saturating_mul(r as Weight)) + (22_127_000 as Weight) + // Standard Error: 4_000 + .saturating_add((1_722_000 as Weight).saturating_mul(r as Weight)) .saturating_add(RocksDbWeight::get().reads(2 as Weight)) .saturating_add(RocksDbWeight::get().writes(2 as Weight)) } @@ -432,9 +432,9 @@ impl WeightInfo for () { // Storage: Democracy ReferendumCount (r:1 w:0) // Storage: Democracy ReferendumInfoOf (r:1 w:0) fn on_initialize_base(r: u32, ) -> Weight { - (385_000 as Weight) - // Standard Error: 8_000 - .saturating_add((3_653_000 as Weight).saturating_mul(r as Weight)) + (4_479_000 as Weight) + // Standard Error: 6_000 + .saturating_add((3_435_000 as Weight).saturating_mul(r as Weight)) .saturating_add(RocksDbWeight::get().reads(2 as Weight)) .saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(r as Weight))) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) @@ -446,9 +446,9 @@ impl WeightInfo for () { // Storage: Democracy PublicProps (r:1 w:0) // Storage: Democracy ReferendumInfoOf (r:1 w:0) fn on_initialize_base_with_launch_period(r: u32, ) -> Weight { - (5_034_000 as Weight) - // Standard Error: 8_000 - .saturating_add((3_670_000 as Weight).saturating_mul(r as Weight)) + (9_835_000 as Weight) + // Standard Error: 5_000 + .saturating_add((3_422_000 as Weight).saturating_mul(r as Weight)) .saturating_add(RocksDbWeight::get().reads(5 as Weight)) .saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(r as Weight))) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) @@ -457,9 +457,9 @@ impl WeightInfo for () { // Storage: Democracy ReferendumInfoOf (r:1 w:1) // Storage: Balances Locks (r:1 w:1) fn delegate(r: u32, ) -> Weight { - (30_684_000 as Weight) - // Standard Error: 10_000 - .saturating_add((4_694_000 as Weight).saturating_mul(r as Weight)) + (36_648_000 as Weight) + // Standard Error: 6_000 + .saturating_add((4_371_000 as Weight).saturating_mul(r as Weight)) .saturating_add(RocksDbWeight::get().reads(4 as Weight)) .saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(r as Weight))) .saturating_add(RocksDbWeight::get().writes(4 as Weight)) @@ -468,9 +468,9 @@ impl WeightInfo for () { // Storage: Democracy VotingOf (r:2 w:2) // Storage: Democracy ReferendumInfoOf (r:1 w:1) fn undelegate(r: u32, ) -> Weight { - (12_638_000 as Weight) - // Standard Error: 10_000 - .saturating_add((4_724_000 as Weight).saturating_mul(r as Weight)) + (17_968_000 as Weight) + // Standard Error: 7_000 + .saturating_add((4_421_000 as Weight).saturating_mul(r as Weight)) .saturating_add(RocksDbWeight::get().reads(2 as Weight)) .saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(r as Weight))) .saturating_add(RocksDbWeight::get().writes(2 as Weight)) @@ -478,12 +478,12 @@ impl WeightInfo for () { } // Storage: Democracy PublicProps (r:0 w:1) fn clear_public_proposals() -> Weight { - (1_954_000 as Weight) + (1_637_000 as Weight) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } // Storage: Democracy Preimages (r:1 w:1) fn note_preimage(b: u32, ) -> Weight { - (26_347_000 as Weight) + (24_889_000 as Weight) // Standard Error: 0 .saturating_add((2_000 as Weight).saturating_mul(b as Weight)) .saturating_add(RocksDbWeight::get().reads(1 as Weight)) @@ -491,7 +491,7 @@ impl WeightInfo for () { } // Storage: Democracy Preimages (r:1 w:1) fn note_imminent_preimage(b: u32, ) -> Weight { - (17_183_000 as Weight) + (16_588_000 as Weight) // Standard Error: 0 .saturating_add((2_000 as Weight).saturating_mul(b as Weight)) .saturating_add(RocksDbWeight::get().reads(1 as Weight)) @@ -500,7 +500,7 @@ impl WeightInfo for () { // Storage: Democracy Preimages (r:1 w:1) // Storage: System Account (r:1 w:0) fn reap_preimage(b: u32, ) -> Weight { - (25_939_000 as Weight) + (24_561_000 as Weight) // Standard Error: 0 .saturating_add((1_000 as Weight).saturating_mul(b as Weight)) .saturating_add(RocksDbWeight::get().reads(2 as Weight)) @@ -510,9 +510,9 @@ impl WeightInfo for () { // Storage: Balances Locks (r:1 w:1) // Storage: System Account (r:1 w:1) fn unlock_remove(r: u32, ) -> Weight { - (23_954_000 as Weight) + (23_977_000 as Weight) // Standard Error: 1_000 - .saturating_add((57_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((46_000 as Weight).saturating_mul(r as Weight)) .saturating_add(RocksDbWeight::get().reads(3 as Weight)) .saturating_add(RocksDbWeight::get().writes(3 as Weight)) } @@ -520,28 +520,28 @@ impl WeightInfo for () { // Storage: Balances Locks (r:1 w:1) // Storage: System Account (r:1 w:1) fn unlock_set(r: u32, ) -> Weight { - (22_578_000 as Weight) + (22_927_000 as Weight) // Standard Error: 1_000 - .saturating_add((151_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((125_000 as Weight).saturating_mul(r as Weight)) .saturating_add(RocksDbWeight::get().reads(3 as Weight)) .saturating_add(RocksDbWeight::get().writes(3 as Weight)) } // Storage: Democracy ReferendumInfoOf (r:1 w:1) // Storage: Democracy VotingOf (r:1 w:1) fn remove_vote(r: u32, ) -> Weight { - (13_884_000 as Weight) + (13_669_000 as Weight) // Standard Error: 1_000 - .saturating_add((143_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((124_000 as Weight).saturating_mul(r as Weight)) .saturating_add(RocksDbWeight::get().reads(2 as Weight)) .saturating_add(RocksDbWeight::get().writes(2 as Weight)) } // Storage: Democracy ReferendumInfoOf (r:1 w:1) // Storage: Democracy VotingOf (r:1 w:1) fn remove_other_vote(r: u32, ) -> Weight { - (14_294_000 as Weight) + (13_714_000 as Weight) // Standard Error: 1_000 - .saturating_add((140_000 as Weight).saturating_mul(r as Weight)) + .saturating_add((130_000 as Weight).saturating_mul(r as Weight)) .saturating_add(RocksDbWeight::get().reads(2 as Weight)) .saturating_add(RocksDbWeight::get().writes(2 as Weight)) } -} +} \ No newline at end of file diff --git a/runtime/calamari/src/weights/pallet_membership.rs b/runtime/calamari/src/weights/pallet_membership.rs index 4d34ba528..37dbad706 100644 --- a/runtime/calamari/src/weights/pallet_membership.rs +++ b/runtime/calamari/src/weights/pallet_membership.rs @@ -17,7 +17,7 @@ //! Autogenerated weights for pallet_membership //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-04-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-05-09, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("calamari-dev"), DB CACHE: 1024 // Executed Command: @@ -60,9 +60,9 @@ impl pallet_membership::WeightInfo for SubstrateWeight< // Storage: Council Members (r:0 w:1) // Storage: Council Prime (r:0 w:1) fn add_member(m: u32, ) -> Weight { - (15_738_000 as Weight) - // Standard Error: 2_000 - .saturating_add((121_000 as Weight).saturating_mul(m as Weight)) + (15_063_000 as Weight) + // Standard Error: 1_000 + .saturating_add((61_000 as Weight).saturating_mul(m as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } @@ -72,9 +72,9 @@ impl pallet_membership::WeightInfo for SubstrateWeight< // Storage: Council Members (r:0 w:1) // Storage: Council Prime (r:0 w:1) fn remove_member(m: u32, ) -> Weight { - (18_819_000 as Weight) - // Standard Error: 1_000 - .saturating_add((106_000 as Weight).saturating_mul(m as Weight)) + (18_381_000 as Weight) + // Standard Error: 0 + .saturating_add((53_000 as Weight).saturating_mul(m as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } @@ -84,9 +84,9 @@ impl pallet_membership::WeightInfo for SubstrateWeight< // Storage: Council Members (r:0 w:1) // Storage: Council Prime (r:0 w:1) fn swap_member(m: u32, ) -> Weight { - (18_950_000 as Weight) - // Standard Error: 1_000 - .saturating_add((117_000 as Weight).saturating_mul(m as Weight)) + (18_574_000 as Weight) + // Standard Error: 0 + .saturating_add((63_000 as Weight).saturating_mul(m as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } @@ -96,9 +96,9 @@ impl pallet_membership::WeightInfo for SubstrateWeight< // Storage: Council Members (r:0 w:1) // Storage: Council Prime (r:0 w:1) fn reset_member(m: u32, ) -> Weight { - (18_671_000 as Weight) + (18_140_000 as Weight) // Standard Error: 1_000 - .saturating_add((250_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((190_000 as Weight).saturating_mul(m as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } @@ -108,9 +108,9 @@ impl pallet_membership::WeightInfo for SubstrateWeight< // Storage: Council Members (r:0 w:1) // Storage: Council Prime (r:0 w:1) fn change_key(m: u32, ) -> Weight { - (19_790_000 as Weight) + (19_393_000 as Weight) // Standard Error: 1_000 - .saturating_add((116_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((61_000 as Weight).saturating_mul(m as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } @@ -118,16 +118,16 @@ impl pallet_membership::WeightInfo for SubstrateWeight< // Storage: CouncilMembership Prime (r:0 w:1) // Storage: Council Prime (r:0 w:1) fn set_prime(m: u32, ) -> Weight { - (5_335_000 as Weight) + (5_208_000 as Weight) // Standard Error: 0 - .saturating_add((89_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((35_000 as Weight).saturating_mul(m as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: CouncilMembership Prime (r:0 w:1) // Storage: Council Prime (r:0 w:1) fn clear_prime(m: u32, ) -> Weight { - (1_793_000 as Weight) + (1_859_000 as Weight) // Standard Error: 0 .saturating_add((1_000 as Weight).saturating_mul(m as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) @@ -141,9 +141,9 @@ impl WeightInfo for () { // Storage: Council Members (r:0 w:1) // Storage: Council Prime (r:0 w:1) fn add_member(m: u32, ) -> Weight { - (15_738_000 as Weight) - // Standard Error: 2_000 - .saturating_add((121_000 as Weight).saturating_mul(m as Weight)) + (15_063_000 as Weight) + // Standard Error: 1_000 + .saturating_add((61_000 as Weight).saturating_mul(m as Weight)) .saturating_add(RocksDbWeight::get().reads(2 as Weight)) .saturating_add(RocksDbWeight::get().writes(3 as Weight)) } @@ -153,9 +153,9 @@ impl WeightInfo for () { // Storage: Council Members (r:0 w:1) // Storage: Council Prime (r:0 w:1) fn remove_member(m: u32, ) -> Weight { - (18_819_000 as Weight) - // Standard Error: 1_000 - .saturating_add((106_000 as Weight).saturating_mul(m as Weight)) + (18_381_000 as Weight) + // Standard Error: 0 + .saturating_add((53_000 as Weight).saturating_mul(m as Weight)) .saturating_add(RocksDbWeight::get().reads(3 as Weight)) .saturating_add(RocksDbWeight::get().writes(3 as Weight)) } @@ -165,9 +165,9 @@ impl WeightInfo for () { // Storage: Council Members (r:0 w:1) // Storage: Council Prime (r:0 w:1) fn swap_member(m: u32, ) -> Weight { - (18_950_000 as Weight) - // Standard Error: 1_000 - .saturating_add((117_000 as Weight).saturating_mul(m as Weight)) + (18_574_000 as Weight) + // Standard Error: 0 + .saturating_add((63_000 as Weight).saturating_mul(m as Weight)) .saturating_add(RocksDbWeight::get().reads(3 as Weight)) .saturating_add(RocksDbWeight::get().writes(3 as Weight)) } @@ -177,9 +177,9 @@ impl WeightInfo for () { // Storage: Council Members (r:0 w:1) // Storage: Council Prime (r:0 w:1) fn reset_member(m: u32, ) -> Weight { - (18_671_000 as Weight) + (18_140_000 as Weight) // Standard Error: 1_000 - .saturating_add((250_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((190_000 as Weight).saturating_mul(m as Weight)) .saturating_add(RocksDbWeight::get().reads(3 as Weight)) .saturating_add(RocksDbWeight::get().writes(3 as Weight)) } @@ -189,9 +189,9 @@ impl WeightInfo for () { // Storage: Council Members (r:0 w:1) // Storage: Council Prime (r:0 w:1) fn change_key(m: u32, ) -> Weight { - (19_790_000 as Weight) + (19_393_000 as Weight) // Standard Error: 1_000 - .saturating_add((116_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((61_000 as Weight).saturating_mul(m as Weight)) .saturating_add(RocksDbWeight::get().reads(3 as Weight)) .saturating_add(RocksDbWeight::get().writes(4 as Weight)) } @@ -199,18 +199,18 @@ impl WeightInfo for () { // Storage: CouncilMembership Prime (r:0 w:1) // Storage: Council Prime (r:0 w:1) fn set_prime(m: u32, ) -> Weight { - (5_335_000 as Weight) + (5_208_000 as Weight) // Standard Error: 0 - .saturating_add((89_000 as Weight).saturating_mul(m as Weight)) + .saturating_add((35_000 as Weight).saturating_mul(m as Weight)) .saturating_add(RocksDbWeight::get().reads(1 as Weight)) .saturating_add(RocksDbWeight::get().writes(2 as Weight)) } // Storage: CouncilMembership Prime (r:0 w:1) // Storage: Council Prime (r:0 w:1) fn clear_prime(m: u32, ) -> Weight { - (1_793_000 as Weight) + (1_859_000 as Weight) // Standard Error: 0 .saturating_add((1_000 as Weight).saturating_mul(m as Weight)) .saturating_add(RocksDbWeight::get().writes(2 as Weight)) } -} +} \ No newline at end of file diff --git a/runtime/calamari/src/weights/pallet_multisig.rs b/runtime/calamari/src/weights/pallet_multisig.rs index f3f4054ec..ede0d7304 100644 --- a/runtime/calamari/src/weights/pallet_multisig.rs +++ b/runtime/calamari/src/weights/pallet_multisig.rs @@ -17,7 +17,7 @@ //! Autogenerated weights for pallet_multisig //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-04-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-05-09, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("calamari-dev"), DB CACHE: 1024 // Executed Command: @@ -59,18 +59,18 @@ pub trait WeightInfo { pub struct SubstrateWeight(PhantomData); impl pallet_multisig::WeightInfo for SubstrateWeight { fn as_multi_threshold_1(z: u32, ) -> Weight { - (20_692_000 as Weight) + (14_245_000 as Weight) // Standard Error: 0 .saturating_add((1_000 as Weight).saturating_mul(z as Weight)) } // Storage: Multisig Multisigs (r:1 w:1) // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) fn as_multi_create(s: u32, z: u32, ) -> Weight { - (35_332_000 as Weight) - // Standard Error: 2_000 - .saturating_add((146_000 as Weight).saturating_mul(s as Weight)) + (33_898_000 as Weight) + // Standard Error: 1_000 + .saturating_add((99_000 as Weight).saturating_mul(s as Weight)) // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(z as Weight)) + .saturating_add((1_000 as Weight).saturating_mul(z as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } @@ -78,9 +78,9 @@ impl pallet_multisig::WeightInfo for SubstrateWeight // Storage: Multisig Calls (r:1 w:1) // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) fn as_multi_create_store(s: u32, z: u32, ) -> Weight { - (40_823_000 as Weight) + (37_644_000 as Weight) // Standard Error: 2_000 - .saturating_add((128_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((102_000 as Weight).saturating_mul(s as Weight)) // Standard Error: 0 .saturating_add((2_000 as Weight).saturating_mul(z as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) @@ -88,9 +88,9 @@ impl pallet_multisig::WeightInfo for SubstrateWeight } // Storage: Multisig Multisigs (r:1 w:1) fn as_multi_approve(s: u32, z: u32, ) -> Weight { - (24_666_000 as Weight) + (22_419_000 as Weight) // Standard Error: 1_000 - .saturating_add((124_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((91_000 as Weight).saturating_mul(s as Weight)) // Standard Error: 0 .saturating_add((1_000 as Weight).saturating_mul(z as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) @@ -99,9 +99,9 @@ impl pallet_multisig::WeightInfo for SubstrateWeight // Storage: Multisig Multisigs (r:1 w:1) // Storage: Multisig Calls (r:1 w:1) fn as_multi_approve_store(s: u32, z: u32, ) -> Weight { - (37_834_000 as Weight) - // Standard Error: 2_000 - .saturating_add((146_000 as Weight).saturating_mul(s as Weight)) + (34_817_000 as Weight) + // Standard Error: 1_000 + .saturating_add((113_000 as Weight).saturating_mul(s as Weight)) // Standard Error: 0 .saturating_add((2_000 as Weight).saturating_mul(z as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) @@ -111,9 +111,9 @@ impl pallet_multisig::WeightInfo for SubstrateWeight // Storage: Multisig Calls (r:1 w:1) // Storage: System Account (r:1 w:1) fn as_multi_complete(s: u32, z: u32, ) -> Weight { - (48_037_000 as Weight) + (45_667_000 as Weight) // Standard Error: 2_000 - .saturating_add((233_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((139_000 as Weight).saturating_mul(s as Weight)) // Standard Error: 0 .saturating_add((3_000 as Weight).saturating_mul(z as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) @@ -122,18 +122,18 @@ impl pallet_multisig::WeightInfo for SubstrateWeight // Storage: Multisig Multisigs (r:1 w:1) // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) fn approve_as_multi_create(s: u32, ) -> Weight { - (31_959_000 as Weight) + (30_341_000 as Weight) // Standard Error: 1_000 - .saturating_add((176_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((123_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Multisig Multisigs (r:1 w:1) // Storage: Multisig Calls (r:1 w:0) fn approve_as_multi_approve(s: u32, ) -> Weight { - (19_193_000 as Weight) + (17_895_000 as Weight) // Standard Error: 1_000 - .saturating_add((168_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((120_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } @@ -141,18 +141,18 @@ impl pallet_multisig::WeightInfo for SubstrateWeight // Storage: Multisig Calls (r:1 w:1) // Storage: System Account (r:1 w:1) fn approve_as_multi_complete(s: u32, ) -> Weight { - (70_658_000 as Weight) + (65_706_000 as Weight) // Standard Error: 2_000 - .saturating_add((272_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((161_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } // Storage: Multisig Multisigs (r:1 w:1) // Storage: Multisig Calls (r:1 w:1) fn cancel_as_multi(s: u32, ) -> Weight { - (54_062_000 as Weight) + (50_450_000 as Weight) // Standard Error: 2_000 - .saturating_add((173_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((123_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } @@ -161,18 +161,18 @@ impl pallet_multisig::WeightInfo for SubstrateWeight // For backwards compatibility and tests impl WeightInfo for () { fn as_multi_threshold_1(z: u32, ) -> Weight { - (20_692_000 as Weight) + (14_245_000 as Weight) // Standard Error: 0 .saturating_add((1_000 as Weight).saturating_mul(z as Weight)) } // Storage: Multisig Multisigs (r:1 w:1) // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) fn as_multi_create(s: u32, z: u32, ) -> Weight { - (35_332_000 as Weight) - // Standard Error: 2_000 - .saturating_add((146_000 as Weight).saturating_mul(s as Weight)) + (33_898_000 as Weight) + // Standard Error: 1_000 + .saturating_add((99_000 as Weight).saturating_mul(s as Weight)) // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(z as Weight)) + .saturating_add((1_000 as Weight).saturating_mul(z as Weight)) .saturating_add(RocksDbWeight::get().reads(2 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } @@ -180,9 +180,9 @@ impl WeightInfo for () { // Storage: Multisig Calls (r:1 w:1) // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) fn as_multi_create_store(s: u32, z: u32, ) -> Weight { - (40_823_000 as Weight) + (37_644_000 as Weight) // Standard Error: 2_000 - .saturating_add((128_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((102_000 as Weight).saturating_mul(s as Weight)) // Standard Error: 0 .saturating_add((2_000 as Weight).saturating_mul(z as Weight)) .saturating_add(RocksDbWeight::get().reads(3 as Weight)) @@ -190,9 +190,9 @@ impl WeightInfo for () { } // Storage: Multisig Multisigs (r:1 w:1) fn as_multi_approve(s: u32, z: u32, ) -> Weight { - (24_666_000 as Weight) + (22_419_000 as Weight) // Standard Error: 1_000 - .saturating_add((124_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((91_000 as Weight).saturating_mul(s as Weight)) // Standard Error: 0 .saturating_add((1_000 as Weight).saturating_mul(z as Weight)) .saturating_add(RocksDbWeight::get().reads(1 as Weight)) @@ -201,9 +201,9 @@ impl WeightInfo for () { // Storage: Multisig Multisigs (r:1 w:1) // Storage: Multisig Calls (r:1 w:1) fn as_multi_approve_store(s: u32, z: u32, ) -> Weight { - (37_834_000 as Weight) - // Standard Error: 2_000 - .saturating_add((146_000 as Weight).saturating_mul(s as Weight)) + (34_817_000 as Weight) + // Standard Error: 1_000 + .saturating_add((113_000 as Weight).saturating_mul(s as Weight)) // Standard Error: 0 .saturating_add((2_000 as Weight).saturating_mul(z as Weight)) .saturating_add(RocksDbWeight::get().reads(2 as Weight)) @@ -213,9 +213,9 @@ impl WeightInfo for () { // Storage: Multisig Calls (r:1 w:1) // Storage: System Account (r:1 w:1) fn as_multi_complete(s: u32, z: u32, ) -> Weight { - (48_037_000 as Weight) + (45_667_000 as Weight) // Standard Error: 2_000 - .saturating_add((233_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((139_000 as Weight).saturating_mul(s as Weight)) // Standard Error: 0 .saturating_add((3_000 as Weight).saturating_mul(z as Weight)) .saturating_add(RocksDbWeight::get().reads(3 as Weight)) @@ -224,18 +224,18 @@ impl WeightInfo for () { // Storage: Multisig Multisigs (r:1 w:1) // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) fn approve_as_multi_create(s: u32, ) -> Weight { - (31_959_000 as Weight) + (30_341_000 as Weight) // Standard Error: 1_000 - .saturating_add((176_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((123_000 as Weight).saturating_mul(s as Weight)) .saturating_add(RocksDbWeight::get().reads(2 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } // Storage: Multisig Multisigs (r:1 w:1) // Storage: Multisig Calls (r:1 w:0) fn approve_as_multi_approve(s: u32, ) -> Weight { - (19_193_000 as Weight) + (17_895_000 as Weight) // Standard Error: 1_000 - .saturating_add((168_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((120_000 as Weight).saturating_mul(s as Weight)) .saturating_add(RocksDbWeight::get().reads(1 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } @@ -243,19 +243,19 @@ impl WeightInfo for () { // Storage: Multisig Calls (r:1 w:1) // Storage: System Account (r:1 w:1) fn approve_as_multi_complete(s: u32, ) -> Weight { - (70_658_000 as Weight) + (65_706_000 as Weight) // Standard Error: 2_000 - .saturating_add((272_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((161_000 as Weight).saturating_mul(s as Weight)) .saturating_add(RocksDbWeight::get().reads(3 as Weight)) .saturating_add(RocksDbWeight::get().writes(3 as Weight)) } // Storage: Multisig Multisigs (r:1 w:1) // Storage: Multisig Calls (r:1 w:1) fn cancel_as_multi(s: u32, ) -> Weight { - (54_062_000 as Weight) + (50_450_000 as Weight) // Standard Error: 2_000 - .saturating_add((173_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((123_000 as Weight).saturating_mul(s as Weight)) .saturating_add(RocksDbWeight::get().reads(2 as Weight)) .saturating_add(RocksDbWeight::get().writes(2 as Weight)) } -} +} \ No newline at end of file diff --git a/runtime/calamari/src/weights/pallet_preimage.rs b/runtime/calamari/src/weights/pallet_preimage.rs index 3da433c8d..2c5752220 100644 --- a/runtime/calamari/src/weights/pallet_preimage.rs +++ b/runtime/calamari/src/weights/pallet_preimage.rs @@ -17,7 +17,7 @@ //! Autogenerated weights for pallet_preimage //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-04-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-05-09, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("calamari-dev"), DB CACHE: 1024 // Executed Command: @@ -63,7 +63,7 @@ impl pallet_preimage::WeightInfo for SubstrateWeight // Storage: Preimage PreimageFor (r:1 w:1) // Storage: Preimage StatusFor (r:1 w:1) fn note_preimage(s: u32, ) -> Weight { - (27_192_000 as Weight) + (26_540_000 as Weight) // Standard Error: 0 .saturating_add((2_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) @@ -72,7 +72,7 @@ impl pallet_preimage::WeightInfo for SubstrateWeight // Storage: Preimage PreimageFor (r:1 w:1) // Storage: Preimage StatusFor (r:1 w:0) fn note_requested_preimage(s: u32, ) -> Weight { - (8_205_000 as Weight) + (12_223_000 as Weight) // Standard Error: 0 .saturating_add((2_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) @@ -81,7 +81,7 @@ impl pallet_preimage::WeightInfo for SubstrateWeight // Storage: Preimage PreimageFor (r:1 w:1) // Storage: Preimage StatusFor (r:1 w:0) fn note_no_deposit_preimage(s: u32, ) -> Weight { - (5_667_000 as Weight) + (8_435_000 as Weight) // Standard Error: 0 .saturating_add((2_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) @@ -90,58 +90,58 @@ impl pallet_preimage::WeightInfo for SubstrateWeight // Storage: Preimage StatusFor (r:1 w:1) // Storage: Preimage PreimageFor (r:0 w:1) fn unnote_preimage() -> Weight { - (33_182_000 as Weight) + (31_896_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Preimage StatusFor (r:1 w:1) // Storage: Preimage PreimageFor (r:0 w:1) fn unnote_no_deposit_preimage() -> Weight { - (18_999_000 as Weight) + (18_034_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Preimage StatusFor (r:1 w:1) fn request_preimage() -> Weight { - (30_750_000 as Weight) + (29_506_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Preimage StatusFor (r:1 w:1) fn request_no_deposit_preimage() -> Weight { - (17_922_000 as Weight) + (17_422_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Preimage StatusFor (r:1 w:1) fn request_unnoted_preimage() -> Weight { - (13_344_000 as Weight) + (13_483_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Preimage StatusFor (r:1 w:1) fn request_requested_preimage() -> Weight { - (5_024_000 as Weight) + (4_837_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Preimage StatusFor (r:1 w:1) // Storage: Preimage PreimageFor (r:0 w:1) fn unrequest_preimage() -> Weight { - (18_933_000 as Weight) + (17_997_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Preimage StatusFor (r:1 w:1) // Storage: Preimage PreimageFor (r:0 w:1) fn unrequest_unnoted_preimage() -> Weight { - (14_542_000 as Weight) + (14_239_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Preimage StatusFor (r:1 w:1) fn unrequest_multi_referenced_preimage() -> Weight { - (5_051_000 as Weight) + (4_490_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } @@ -152,7 +152,7 @@ impl WeightInfo for () { // Storage: Preimage PreimageFor (r:1 w:1) // Storage: Preimage StatusFor (r:1 w:1) fn note_preimage(s: u32, ) -> Weight { - (27_192_000 as Weight) + (26_540_000 as Weight) // Standard Error: 0 .saturating_add((2_000 as Weight).saturating_mul(s as Weight)) .saturating_add(RocksDbWeight::get().reads(2 as Weight)) @@ -161,7 +161,7 @@ impl WeightInfo for () { // Storage: Preimage PreimageFor (r:1 w:1) // Storage: Preimage StatusFor (r:1 w:0) fn note_requested_preimage(s: u32, ) -> Weight { - (8_205_000 as Weight) + (12_223_000 as Weight) // Standard Error: 0 .saturating_add((2_000 as Weight).saturating_mul(s as Weight)) .saturating_add(RocksDbWeight::get().reads(2 as Weight)) @@ -170,7 +170,7 @@ impl WeightInfo for () { // Storage: Preimage PreimageFor (r:1 w:1) // Storage: Preimage StatusFor (r:1 w:0) fn note_no_deposit_preimage(s: u32, ) -> Weight { - (5_667_000 as Weight) + (8_435_000 as Weight) // Standard Error: 0 .saturating_add((2_000 as Weight).saturating_mul(s as Weight)) .saturating_add(RocksDbWeight::get().reads(2 as Weight)) @@ -179,59 +179,59 @@ impl WeightInfo for () { // Storage: Preimage StatusFor (r:1 w:1) // Storage: Preimage PreimageFor (r:0 w:1) fn unnote_preimage() -> Weight { - (33_182_000 as Weight) + (31_896_000 as Weight) .saturating_add(RocksDbWeight::get().reads(1 as Weight)) .saturating_add(RocksDbWeight::get().writes(2 as Weight)) } // Storage: Preimage StatusFor (r:1 w:1) // Storage: Preimage PreimageFor (r:0 w:1) fn unnote_no_deposit_preimage() -> Weight { - (18_999_000 as Weight) + (18_034_000 as Weight) .saturating_add(RocksDbWeight::get().reads(1 as Weight)) .saturating_add(RocksDbWeight::get().writes(2 as Weight)) } // Storage: Preimage StatusFor (r:1 w:1) fn request_preimage() -> Weight { - (30_750_000 as Weight) + (29_506_000 as Weight) .saturating_add(RocksDbWeight::get().reads(1 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } // Storage: Preimage StatusFor (r:1 w:1) fn request_no_deposit_preimage() -> Weight { - (17_922_000 as Weight) + (17_422_000 as Weight) .saturating_add(RocksDbWeight::get().reads(1 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } // Storage: Preimage StatusFor (r:1 w:1) fn request_unnoted_preimage() -> Weight { - (13_344_000 as Weight) + (13_483_000 as Weight) .saturating_add(RocksDbWeight::get().reads(1 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } // Storage: Preimage StatusFor (r:1 w:1) fn request_requested_preimage() -> Weight { - (5_024_000 as Weight) + (4_837_000 as Weight) .saturating_add(RocksDbWeight::get().reads(1 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } // Storage: Preimage StatusFor (r:1 w:1) // Storage: Preimage PreimageFor (r:0 w:1) fn unrequest_preimage() -> Weight { - (18_933_000 as Weight) + (17_997_000 as Weight) .saturating_add(RocksDbWeight::get().reads(1 as Weight)) .saturating_add(RocksDbWeight::get().writes(2 as Weight)) } // Storage: Preimage StatusFor (r:1 w:1) // Storage: Preimage PreimageFor (r:0 w:1) fn unrequest_unnoted_preimage() -> Weight { - (14_542_000 as Weight) + (14_239_000 as Weight) .saturating_add(RocksDbWeight::get().reads(1 as Weight)) .saturating_add(RocksDbWeight::get().writes(2 as Weight)) } // Storage: Preimage StatusFor (r:1 w:1) fn unrequest_multi_referenced_preimage() -> Weight { - (5_051_000 as Weight) + (4_490_000 as Weight) .saturating_add(RocksDbWeight::get().reads(1 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } -} +} \ No newline at end of file diff --git a/runtime/calamari/src/weights/pallet_scheduler.rs b/runtime/calamari/src/weights/pallet_scheduler.rs index d87da5ff8..043a2ae71 100644 --- a/runtime/calamari/src/weights/pallet_scheduler.rs +++ b/runtime/calamari/src/weights/pallet_scheduler.rs @@ -17,7 +17,7 @@ //! Autogenerated weights for pallet_scheduler //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-04-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-05-09, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("calamari-dev"), DB CACHE: 1024 // Executed Command: @@ -67,9 +67,9 @@ impl pallet_scheduler::WeightInfo for SubstrateWeight Weight { - (14_759_000 as Weight) - // Standard Error: 52_000 - .saturating_add((26_864_000 as Weight).saturating_mul(s as Weight)) + (14_067_000 as Weight) + // Standard Error: 49_000 + .saturating_add((23_843_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(s as Weight))) .saturating_add(T::DbWeight::get().writes(1 as Weight)) @@ -80,9 +80,9 @@ impl pallet_scheduler::WeightInfo for SubstrateWeight Weight { - (11_796_000 as Weight) - // Standard Error: 42_000 - .saturating_add((21_682_000 as Weight).saturating_mul(s as Weight)) + (12_490_000 as Weight) + // Standard Error: 43_000 + .saturating_add((18_882_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(s as Weight))) .saturating_add(T::DbWeight::get().writes(1 as Weight)) @@ -92,9 +92,9 @@ impl pallet_scheduler::WeightInfo for SubstrateWeight Weight { - (12_734_000 as Weight) - // Standard Error: 47_000 - .saturating_add((24_000_000 as Weight).saturating_mul(s as Weight)) + (9_206_000 as Weight) + // Standard Error: 50_000 + .saturating_add((21_052_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(s as Weight))) .saturating_add(T::DbWeight::get().writes(1 as Weight)) @@ -104,9 +104,9 @@ impl pallet_scheduler::WeightInfo for SubstrateWeight Weight { - (11_452_000 as Weight) - // Standard Error: 48_000 - .saturating_add((20_447_000 as Weight).saturating_mul(s as Weight)) + (7_756_000 as Weight) + // Standard Error: 45_000 + .saturating_add((17_829_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(s as Weight))) .saturating_add(T::DbWeight::get().writes(1 as Weight)) @@ -116,9 +116,9 @@ impl pallet_scheduler::WeightInfo for SubstrateWeight Weight { - (6_423_000 as Weight) - // Standard Error: 32_000 - .saturating_add((10_250_000 as Weight).saturating_mul(s as Weight)) + (6_868_000 as Weight) + // Standard Error: 26_000 + .saturating_add((8_546_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(s as Weight))) .saturating_add(T::DbWeight::get().writes(2 as Weight)) @@ -127,9 +127,9 @@ impl pallet_scheduler::WeightInfo for SubstrateWeight Weight { - (8_649_000 as Weight) - // Standard Error: 25_000 - .saturating_add((7_322_000 as Weight).saturating_mul(s as Weight)) + (8_425_000 as Weight) + // Standard Error: 20_000 + .saturating_add((5_799_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(s as Weight))) .saturating_add(T::DbWeight::get().writes(2 as Weight)) @@ -137,9 +137,9 @@ impl pallet_scheduler::WeightInfo for SubstrateWeight Weight { - (15_684_000 as Weight) - // Standard Error: 44_000 - .saturating_add((15_946_000 as Weight).saturating_mul(s as Weight)) + (13_940_000 as Weight) + // Standard Error: 40_000 + .saturating_add((13_216_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(s as Weight))) .saturating_add(T::DbWeight::get().writes(1 as Weight)) @@ -147,9 +147,9 @@ impl pallet_scheduler::WeightInfo for SubstrateWeight Weight { - (12_535_000 as Weight) - // Standard Error: 38_000 - .saturating_add((13_133_000 as Weight).saturating_mul(s as Weight)) + (13_371_000 as Weight) + // Standard Error: 33_000 + .saturating_add((10_306_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(s as Weight))) .saturating_add(T::DbWeight::get().writes(1 as Weight)) @@ -158,53 +158,53 @@ impl pallet_scheduler::WeightInfo for SubstrateWeight Weight { - (12_928_000 as Weight) - // Standard Error: 35_000 - .saturating_add((10_944_000 as Weight).saturating_mul(s as Weight)) + (12_697_000 as Weight) + // Standard Error: 27_000 + .saturating_add((8_431_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight))) } // Storage: Scheduler Agenda (r:1 w:1) fn on_initialize(s: u32, ) -> Weight { - (11_615_000 as Weight) - // Standard Error: 33_000 - .saturating_add((9_800_000 as Weight).saturating_mul(s as Weight)) + (12_782_000 as Weight) + // Standard Error: 25_000 + .saturating_add((7_265_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Scheduler Agenda (r:1 w:1) fn schedule(s: u32, ) -> Weight { - (17_491_000 as Weight) + (15_767_000 as Weight) // Standard Error: 2_000 - .saturating_add((84_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((94_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Scheduler Agenda (r:1 w:1) // Storage: Scheduler Lookup (r:0 w:1) fn cancel(s: u32, ) -> Weight { - (17_904_000 as Weight) - // Standard Error: 10_000 - .saturating_add((2_567_000 as Weight).saturating_mul(s as Weight)) + (15_360_000 as Weight) + // Standard Error: 7_000 + .saturating_add((1_725_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Scheduler Lookup (r:1 w:1) // Storage: Scheduler Agenda (r:1 w:1) fn schedule_named(s: u32, ) -> Weight { - (20_294_000 as Weight) + (18_789_000 as Weight) // Standard Error: 2_000 - .saturating_add((122_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((114_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Scheduler Lookup (r:1 w:1) // Storage: Scheduler Agenda (r:1 w:1) fn cancel_named(s: u32, ) -> Weight { - (19_031_000 as Weight) - // Standard Error: 10_000 - .saturating_add((2_591_000 as Weight).saturating_mul(s as Weight)) + (17_888_000 as Weight) + // Standard Error: 7_000 + .saturating_add((1_722_000 as Weight).saturating_mul(s as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } @@ -217,9 +217,9 @@ impl WeightInfo for () { // Storage: Preimage StatusFor (r:1 w:1) // Storage: Scheduler Lookup (r:0 w:1) fn on_initialize_periodic_named_resolved(s: u32, ) -> Weight { - (14_759_000 as Weight) - // Standard Error: 52_000 - .saturating_add((26_864_000 as Weight).saturating_mul(s as Weight)) + (14_067_000 as Weight) + // Standard Error: 49_000 + .saturating_add((23_843_000 as Weight).saturating_mul(s as Weight)) .saturating_add(RocksDbWeight::get().reads(1 as Weight)) .saturating_add(RocksDbWeight::get().reads((3 as Weight).saturating_mul(s as Weight))) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) @@ -230,9 +230,9 @@ impl WeightInfo for () { // Storage: Preimage StatusFor (r:1 w:1) // Storage: Scheduler Lookup (r:0 w:1) fn on_initialize_named_resolved(s: u32, ) -> Weight { - (11_796_000 as Weight) - // Standard Error: 42_000 - .saturating_add((21_682_000 as Weight).saturating_mul(s as Weight)) + (12_490_000 as Weight) + // Standard Error: 43_000 + .saturating_add((18_882_000 as Weight).saturating_mul(s as Weight)) .saturating_add(RocksDbWeight::get().reads(1 as Weight)) .saturating_add(RocksDbWeight::get().reads((2 as Weight).saturating_mul(s as Weight))) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) @@ -242,9 +242,9 @@ impl WeightInfo for () { // Storage: Preimage PreimageFor (r:1 w:1) // Storage: Preimage StatusFor (r:1 w:1) fn on_initialize_periodic_resolved(s: u32, ) -> Weight { - (12_734_000 as Weight) - // Standard Error: 47_000 - .saturating_add((24_000_000 as Weight).saturating_mul(s as Weight)) + (9_206_000 as Weight) + // Standard Error: 50_000 + .saturating_add((21_052_000 as Weight).saturating_mul(s as Weight)) .saturating_add(RocksDbWeight::get().reads(1 as Weight)) .saturating_add(RocksDbWeight::get().reads((3 as Weight).saturating_mul(s as Weight))) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) @@ -254,9 +254,9 @@ impl WeightInfo for () { // Storage: Preimage PreimageFor (r:1 w:1) // Storage: Preimage StatusFor (r:1 w:1) fn on_initialize_resolved(s: u32, ) -> Weight { - (11_452_000 as Weight) - // Standard Error: 48_000 - .saturating_add((20_447_000 as Weight).saturating_mul(s as Weight)) + (7_756_000 as Weight) + // Standard Error: 45_000 + .saturating_add((17_829_000 as Weight).saturating_mul(s as Weight)) .saturating_add(RocksDbWeight::get().reads(1 as Weight)) .saturating_add(RocksDbWeight::get().reads((2 as Weight).saturating_mul(s as Weight))) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) @@ -266,9 +266,9 @@ impl WeightInfo for () { // Storage: Preimage PreimageFor (r:1 w:0) // Storage: Scheduler Lookup (r:0 w:1) fn on_initialize_named_aborted(s: u32, ) -> Weight { - (6_423_000 as Weight) - // Standard Error: 32_000 - .saturating_add((10_250_000 as Weight).saturating_mul(s as Weight)) + (6_868_000 as Weight) + // Standard Error: 26_000 + .saturating_add((8_546_000 as Weight).saturating_mul(s as Weight)) .saturating_add(RocksDbWeight::get().reads(2 as Weight)) .saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(s as Weight))) .saturating_add(RocksDbWeight::get().writes(2 as Weight)) @@ -277,9 +277,9 @@ impl WeightInfo for () { // Storage: Scheduler Agenda (r:2 w:2) // Storage: Preimage PreimageFor (r:1 w:0) fn on_initialize_aborted(s: u32, ) -> Weight { - (8_649_000 as Weight) - // Standard Error: 25_000 - .saturating_add((7_322_000 as Weight).saturating_mul(s as Weight)) + (8_425_000 as Weight) + // Standard Error: 20_000 + .saturating_add((5_799_000 as Weight).saturating_mul(s as Weight)) .saturating_add(RocksDbWeight::get().reads(2 as Weight)) .saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(s as Weight))) .saturating_add(RocksDbWeight::get().writes(2 as Weight)) @@ -287,9 +287,9 @@ impl WeightInfo for () { // Storage: Scheduler Agenda (r:2 w:2) // Storage: Scheduler Lookup (r:0 w:1) fn on_initialize_periodic_named(s: u32, ) -> Weight { - (15_684_000 as Weight) - // Standard Error: 44_000 - .saturating_add((15_946_000 as Weight).saturating_mul(s as Weight)) + (13_940_000 as Weight) + // Standard Error: 40_000 + .saturating_add((13_216_000 as Weight).saturating_mul(s as Weight)) .saturating_add(RocksDbWeight::get().reads(1 as Weight)) .saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(s as Weight))) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) @@ -297,9 +297,9 @@ impl WeightInfo for () { } // Storage: Scheduler Agenda (r:2 w:2) fn on_initialize_periodic(s: u32, ) -> Weight { - (12_535_000 as Weight) - // Standard Error: 38_000 - .saturating_add((13_133_000 as Weight).saturating_mul(s as Weight)) + (13_371_000 as Weight) + // Standard Error: 33_000 + .saturating_add((10_306_000 as Weight).saturating_mul(s as Weight)) .saturating_add(RocksDbWeight::get().reads(1 as Weight)) .saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(s as Weight))) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) @@ -308,54 +308,54 @@ impl WeightInfo for () { // Storage: Scheduler Agenda (r:1 w:1) // Storage: Scheduler Lookup (r:0 w:1) fn on_initialize_named(s: u32, ) -> Weight { - (12_928_000 as Weight) - // Standard Error: 35_000 - .saturating_add((10_944_000 as Weight).saturating_mul(s as Weight)) + (12_697_000 as Weight) + // Standard Error: 27_000 + .saturating_add((8_431_000 as Weight).saturating_mul(s as Weight)) .saturating_add(RocksDbWeight::get().reads(1 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) .saturating_add(RocksDbWeight::get().writes((1 as Weight).saturating_mul(s as Weight))) } // Storage: Scheduler Agenda (r:1 w:1) fn on_initialize(s: u32, ) -> Weight { - (11_615_000 as Weight) - // Standard Error: 33_000 - .saturating_add((9_800_000 as Weight).saturating_mul(s as Weight)) + (12_782_000 as Weight) + // Standard Error: 25_000 + .saturating_add((7_265_000 as Weight).saturating_mul(s as Weight)) .saturating_add(RocksDbWeight::get().reads(1 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } // Storage: Scheduler Agenda (r:1 w:1) fn schedule(s: u32, ) -> Weight { - (17_491_000 as Weight) + (15_767_000 as Weight) // Standard Error: 2_000 - .saturating_add((84_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((94_000 as Weight).saturating_mul(s as Weight)) .saturating_add(RocksDbWeight::get().reads(1 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } // Storage: Scheduler Agenda (r:1 w:1) // Storage: Scheduler Lookup (r:0 w:1) fn cancel(s: u32, ) -> Weight { - (17_904_000 as Weight) - // Standard Error: 10_000 - .saturating_add((2_567_000 as Weight).saturating_mul(s as Weight)) + (15_360_000 as Weight) + // Standard Error: 7_000 + .saturating_add((1_725_000 as Weight).saturating_mul(s as Weight)) .saturating_add(RocksDbWeight::get().reads(1 as Weight)) .saturating_add(RocksDbWeight::get().writes(2 as Weight)) } // Storage: Scheduler Lookup (r:1 w:1) // Storage: Scheduler Agenda (r:1 w:1) fn schedule_named(s: u32, ) -> Weight { - (20_294_000 as Weight) + (18_789_000 as Weight) // Standard Error: 2_000 - .saturating_add((122_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((114_000 as Weight).saturating_mul(s as Weight)) .saturating_add(RocksDbWeight::get().reads(2 as Weight)) .saturating_add(RocksDbWeight::get().writes(2 as Weight)) } // Storage: Scheduler Lookup (r:1 w:1) // Storage: Scheduler Agenda (r:1 w:1) fn cancel_named(s: u32, ) -> Weight { - (19_031_000 as Weight) - // Standard Error: 10_000 - .saturating_add((2_591_000 as Weight).saturating_mul(s as Weight)) + (17_888_000 as Weight) + // Standard Error: 7_000 + .saturating_add((1_722_000 as Weight).saturating_mul(s as Weight)) .saturating_add(RocksDbWeight::get().reads(2 as Weight)) .saturating_add(RocksDbWeight::get().writes(2 as Weight)) } -} +} \ No newline at end of file diff --git a/runtime/calamari/src/weights/pallet_session.rs b/runtime/calamari/src/weights/pallet_session.rs index 7938fd8b6..e21e931fd 100644 --- a/runtime/calamari/src/weights/pallet_session.rs +++ b/runtime/calamari/src/weights/pallet_session.rs @@ -17,7 +17,7 @@ //! Autogenerated weights for pallet_session //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-04-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-05-09, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("calamari-dev"), DB CACHE: 1024 // Executed Command: @@ -53,14 +53,14 @@ impl pallet_session::WeightInfo for SubstrateWeight // Storage: Session NextKeys (r:1 w:1) // Storage: Session KeyOwner (r:1 w:1) fn set_keys() -> Weight { - (14_061_000 as Weight) + (14_144_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Session NextKeys (r:1 w:1) // Storage: Session KeyOwner (r:0 w:1) fn purge_keys() -> Weight { - (11_009_000 as Weight) + (10_668_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } @@ -71,15 +71,15 @@ impl WeightInfo for () { // Storage: Session NextKeys (r:1 w:1) // Storage: Session KeyOwner (r:1 w:1) fn set_keys() -> Weight { - (14_061_000 as Weight) + (14_144_000 as Weight) .saturating_add(RocksDbWeight::get().reads(2 as Weight)) .saturating_add(RocksDbWeight::get().writes(2 as Weight)) } // Storage: Session NextKeys (r:1 w:1) // Storage: Session KeyOwner (r:0 w:1) fn purge_keys() -> Weight { - (11_009_000 as Weight) + (10_668_000 as Weight) .saturating_add(RocksDbWeight::get().reads(1 as Weight)) .saturating_add(RocksDbWeight::get().writes(2 as Weight)) } -} +} \ No newline at end of file diff --git a/runtime/calamari/src/weights/pallet_timestamp.rs b/runtime/calamari/src/weights/pallet_timestamp.rs index f316ae977..8a29f6c8b 100644 --- a/runtime/calamari/src/weights/pallet_timestamp.rs +++ b/runtime/calamari/src/weights/pallet_timestamp.rs @@ -17,7 +17,7 @@ //! Autogenerated weights for pallet_timestamp //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-04-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-05-09, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("calamari-dev"), DB CACHE: 1024 // Executed Command: @@ -52,12 +52,12 @@ pub struct SubstrateWeight(PhantomData); impl pallet_timestamp::WeightInfo for SubstrateWeight { // Storage: Timestamp Now (r:1 w:1) fn set() -> Weight { - (5_124_000 as Weight) + (5_160_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } fn on_finalize() -> Weight { - (2_925_000 as Weight) + (2_962_000 as Weight) } } @@ -65,11 +65,11 @@ impl pallet_timestamp::WeightInfo for SubstrateWeight Weight { - (5_124_000 as Weight) + (5_160_000 as Weight) .saturating_add(RocksDbWeight::get().reads(1 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } fn on_finalize() -> Weight { - (2_925_000 as Weight) + (2_962_000 as Weight) } -} +} \ No newline at end of file diff --git a/runtime/calamari/src/weights/pallet_treasury.rs b/runtime/calamari/src/weights/pallet_treasury.rs index c74312215..96f691eb4 100644 --- a/runtime/calamari/src/weights/pallet_treasury.rs +++ b/runtime/calamari/src/weights/pallet_treasury.rs @@ -17,7 +17,7 @@ //! Autogenerated weights for pallet_treasury //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-04-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-05-09, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("calamari-dev"), DB CACHE: 1024 // Executed Command: @@ -55,23 +55,23 @@ impl pallet_treasury::WeightInfo for SubstrateWeight // Storage: Treasury ProposalCount (r:1 w:1) // Storage: Treasury Proposals (r:0 w:1) fn propose_spend() -> Weight { - (52_653_000 as Weight) + (25_229_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Treasury Proposals (r:1 w:1) // Storage: System Account (r:2 w:2) fn reject_proposal() -> Weight { - (48_150_000 as Weight) + (45_141_000 as Weight) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } // Storage: Treasury Proposals (r:1 w:0) // Storage: Treasury Approvals (r:1 w:1) fn approve_proposal(p: u32, ) -> Weight { - (10_420_000 as Weight) + (10_438_000 as Weight) // Standard Error: 1_000 - .saturating_add((66_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((63_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } @@ -79,9 +79,9 @@ impl pallet_treasury::WeightInfo for SubstrateWeight // Storage: Treasury Approvals (r:1 w:1) // Storage: Treasury Proposals (r:2 w:2) fn on_initialize_proposals(p: u32, ) -> Weight { - (22_252_000 as Weight) - // Standard Error: 34_000 - .saturating_add((34_210_000 as Weight).saturating_mul(p as Weight)) + (29_923_000 as Weight) + // Standard Error: 32_000 + .saturating_add((32_164_000 as Weight).saturating_mul(p as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(p as Weight))) .saturating_add(T::DbWeight::get().writes(2 as Weight)) @@ -94,23 +94,23 @@ impl WeightInfo for () { // Storage: Treasury ProposalCount (r:1 w:1) // Storage: Treasury Proposals (r:0 w:1) fn propose_spend() -> Weight { - (52_653_000 as Weight) + (25_229_000 as Weight) .saturating_add(RocksDbWeight::get().reads(1 as Weight)) .saturating_add(RocksDbWeight::get().writes(2 as Weight)) } // Storage: Treasury Proposals (r:1 w:1) // Storage: System Account (r:2 w:2) fn reject_proposal() -> Weight { - (48_150_000 as Weight) + (45_141_000 as Weight) .saturating_add(RocksDbWeight::get().reads(3 as Weight)) .saturating_add(RocksDbWeight::get().writes(3 as Weight)) } // Storage: Treasury Proposals (r:1 w:0) // Storage: Treasury Approvals (r:1 w:1) fn approve_proposal(p: u32, ) -> Weight { - (10_420_000 as Weight) + (10_438_000 as Weight) // Standard Error: 1_000 - .saturating_add((66_000 as Weight).saturating_mul(p as Weight)) + .saturating_add((63_000 as Weight).saturating_mul(p as Weight)) .saturating_add(RocksDbWeight::get().reads(2 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } @@ -118,12 +118,12 @@ impl WeightInfo for () { // Storage: Treasury Approvals (r:1 w:1) // Storage: Treasury Proposals (r:2 w:2) fn on_initialize_proposals(p: u32, ) -> Weight { - (22_252_000 as Weight) - // Standard Error: 34_000 - .saturating_add((34_210_000 as Weight).saturating_mul(p as Weight)) + (29_923_000 as Weight) + // Standard Error: 32_000 + .saturating_add((32_164_000 as Weight).saturating_mul(p as Weight)) .saturating_add(RocksDbWeight::get().reads(2 as Weight)) .saturating_add(RocksDbWeight::get().reads((3 as Weight).saturating_mul(p as Weight))) .saturating_add(RocksDbWeight::get().writes(2 as Weight)) .saturating_add(RocksDbWeight::get().writes((3 as Weight).saturating_mul(p as Weight))) } -} +} \ No newline at end of file diff --git a/runtime/calamari/src/weights/pallet_tx_pause.rs b/runtime/calamari/src/weights/pallet_tx_pause.rs index f31fb8281..f2901704e 100644 --- a/runtime/calamari/src/weights/pallet_tx_pause.rs +++ b/runtime/calamari/src/weights/pallet_tx_pause.rs @@ -17,7 +17,7 @@ //! Autogenerated weights for pallet_tx_pause //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-04-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-05-09, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("calamari-dev"), DB CACHE: 1024 // Executed Command: @@ -52,13 +52,13 @@ pub struct SubstrateWeight(PhantomData); impl pallet_tx_pause::WeightInfo for SubstrateWeight { // Storage: TransactionPause PausedTransactions (r:1 w:1) fn pause_transaction() -> Weight { - (11_969_000 as Weight) + (11_768_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: TransactionPause PausedTransactions (r:1 w:1) fn unpause_transaction() -> Weight { - (13_044_000 as Weight) + (12_584_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } @@ -68,14 +68,14 @@ impl pallet_tx_pause::WeightInfo for SubstrateWeight impl WeightInfo for () { // Storage: TransactionPause PausedTransactions (r:1 w:1) fn pause_transaction() -> Weight { - (11_969_000 as Weight) + (11_768_000 as Weight) .saturating_add(RocksDbWeight::get().reads(1 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } // Storage: TransactionPause PausedTransactions (r:1 w:1) fn unpause_transaction() -> Weight { - (13_044_000 as Weight) + (12_584_000 as Weight) .saturating_add(RocksDbWeight::get().reads(1 as Weight)) .saturating_add(RocksDbWeight::get().writes(1 as Weight)) } -} +} \ No newline at end of file diff --git a/runtime/calamari/src/weights/pallet_utility.rs b/runtime/calamari/src/weights/pallet_utility.rs index 2fd48a914..ab6d6e0e0 100644 --- a/runtime/calamari/src/weights/pallet_utility.rs +++ b/runtime/calamari/src/weights/pallet_utility.rs @@ -17,7 +17,7 @@ //! Autogenerated weights for pallet_utility //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-04-18, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-05-09, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("calamari-dev"), DB CACHE: 1024 // Executed Command: @@ -53,39 +53,39 @@ pub trait WeightInfo { pub struct SubstrateWeight(PhantomData); impl pallet_utility::WeightInfo for SubstrateWeight { fn batch(c: u32, ) -> Weight { - (30_252_000 as Weight) - // Standard Error: 4_000 - .saturating_add((4_237_000 as Weight).saturating_mul(c as Weight)) + (27_870_000 as Weight) + // Standard Error: 3_000 + .saturating_add((3_519_000 as Weight).saturating_mul(c as Weight)) } fn as_derivative() -> Weight { - (3_174_000 as Weight) + (2_243_000 as Weight) } fn batch_all(c: u32, ) -> Weight { - (33_570_000 as Weight) + (31_689_000 as Weight) // Standard Error: 4_000 - .saturating_add((4_516_000 as Weight).saturating_mul(c as Weight)) + .saturating_add((3_719_000 as Weight).saturating_mul(c as Weight)) } fn dispatch_as() -> Weight { - (10_245_000 as Weight) + (9_263_000 as Weight) } } // For backwards compatibility and tests impl WeightInfo for () { fn batch(c: u32, ) -> Weight { - (30_252_000 as Weight) - // Standard Error: 4_000 - .saturating_add((4_237_000 as Weight).saturating_mul(c as Weight)) + (27_870_000 as Weight) + // Standard Error: 3_000 + .saturating_add((3_519_000 as Weight).saturating_mul(c as Weight)) } fn as_derivative() -> Weight { - (3_174_000 as Weight) + (2_243_000 as Weight) } fn batch_all(c: u32, ) -> Weight { - (33_570_000 as Weight) + (31_689_000 as Weight) // Standard Error: 4_000 - .saturating_add((4_516_000 as Weight).saturating_mul(c as Weight)) + .saturating_add((3_719_000 as Weight).saturating_mul(c as Weight)) } fn dispatch_as() -> Weight { - (10_245_000 as Weight) + (9_263_000 as Weight) } -} +} \ No newline at end of file diff --git a/runtime/calamari/src/xcm_config.rs b/runtime/calamari/src/xcm_config.rs index be92aa67d..0fb5d6a3f 100644 --- a/runtime/calamari/src/xcm_config.rs +++ b/runtime/calamari/src/xcm_config.rs @@ -15,8 +15,9 @@ // along with Manta. If not, see . use super::{ - AssetManager, Assets, Balances, Call, DmpQueue, Event, Origin, ParachainInfo, ParachainSystem, - PolkadotXcm, Runtime, Treasury, XcmpQueue, MAXIMUM_BLOCK_WEIGHT, + AssetManager, Assets, Balances, Call, DmpQueue, EnsureRootOrMoreThanHalfCouncil, Event, Origin, + ParachainInfo, ParachainSystem, PolkadotXcm, Runtime, Treasury, XcmpQueue, + MAXIMUM_BLOCK_WEIGHT, }; use codec::{Decode, Encode}; @@ -39,6 +40,7 @@ use manta_primitives::{ #[cfg(any(feature = "std", test))] pub use sp_runtime::BuildStorage; +use orml_traits::location::AbsoluteReserveProvider; // Polkadot imports use pallet_xcm::XcmPassthrough; use polkadot_parachain::primitives::Sibling; @@ -48,7 +50,7 @@ use xcm_builder::{ AccountId32Aliases, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom, ConvertedConcreteAssetId, CurrencyAdapter as XcmCurrencyAdapter, EnsureXcmOrigin, FixedRateOfFungible, FixedWeightBounds, - FungiblesAdapter, LocationInverter, ParentAsSuperuser, ParentIsDefault, RelayChainAsNative, + FungiblesAdapter, LocationInverter, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SovereignSignedViaLocation, TakeWeightCredit, }; @@ -80,6 +82,7 @@ parameter_types! { pub RelayChainOrigin: Origin = cumulus_pallet_xcm::Origin::Relay.into(); pub Ancestry: MultiLocation = Parachain(ParachainInfo::parachain_id().into()).into(); pub SelfReserve: MultiLocation = MultiLocation::new(1, X1(Parachain(ParachainInfo::parachain_id().into()))); + pub CheckingAccount: AccountId = PolkadotXcm::check_account(); } /// Type for specifying how a `MultiLocation` can be converted into an `AccountId`. This is used @@ -87,7 +90,7 @@ parameter_types! { /// `Transact` in order to determine the dispatch Origin. pub type LocationToAccountId = ( // The parent (Relay-chain) origin converts to the default `AccountId`. - ParentIsDefault, + ParentIsPreset, // Sibling parachain origins convert to AccountId via the `ParaId::into`. SiblingParachainConvertsVia, // Straight up local `AccountId32` origins just alias directly to `AccountId`. @@ -158,7 +161,7 @@ pub type FungiblesTransactor = FungiblesAdapter< // No teleport support. Nothing, // No teleport tracking. - (), + CheckingAccount, >; match_type! { @@ -282,6 +285,9 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime { type ChannelInfo = ParachainSystem; type VersionWrapper = PolkadotXcm; type ExecuteOverweightOrigin = EnsureRoot; + type ControllerOrigin = EnsureRootOrMoreThanHalfCouncil; + type ControllerOriginConverter = XcmOriginToCallOrigin; + type WeightInfo = (); } impl cumulus_pallet_dmp_queue::Config for Runtime { @@ -334,4 +340,7 @@ impl orml_xtokens::Config for Runtime { type BaseXcmWeight = BaseXcmWeight; type LocationInverter = LocationInverter; type MaxAssetsForTransfer = MaxAssetsForTransfer; + type MinXcmFee = AssetManager; + type MultiLocationsFilter = AssetManager; + type ReserveProvider = AbsoluteReserveProvider; } diff --git a/runtime/calamari/tests/integration_tests.rs b/runtime/calamari/tests/integration_tests.rs index 95621f915..93c841e0d 100644 --- a/runtime/calamari/tests/integration_tests.rs +++ b/runtime/calamari/tests/integration_tests.rs @@ -64,7 +64,7 @@ use sp_core::{sr25519, H256}; use sp_runtime::{ generic::DigestItem, traits::{BlakeTwo256, Hash, Header as HeaderT, SignedExtension}, - DispatchError, Percent, + DispatchError, ModuleError, Percent, }; fn note_preimage(proposer: &AccountId, proposal_call: &Call) -> H256 { @@ -162,11 +162,11 @@ fn assert_proposal_is_filtered(proposer: &AccountId, motion: &Call) { last_event(), calamari_runtime::Event::Council(pallet_collective::Event::Executed { proposal_hash: council_motion_hash, - result: Err(DispatchError::Module { + result: Err(DispatchError::Module(ModuleError { index: 0, error: 5, message: None - }) + })) }) ); } @@ -993,14 +993,14 @@ fn concrete_fungible_ledger_transfers_work() { &charlie.clone(), INITIAL_BALANCE + 1, ), - FungibleLedgerError::InvalidTransfer(DispatchError::Module { + FungibleLedgerError::InvalidTransfer(DispatchError::Module(ModuleError { index: ::PalletInfo::index::< Balances, >() .unwrap() as u8, error: 2, message: Some("InsufficientBalance") - }) + })) ); assert_eq!(Balances::free_balance(alice.clone()), current_balance_alice); assert_eq!( @@ -1016,14 +1016,14 @@ fn concrete_fungible_ledger_transfers_work() { &charlie.clone(), INITIAL_BALANCE, ), - FungibleLedgerError::InvalidTransfer(DispatchError::Module { + FungibleLedgerError::InvalidTransfer(DispatchError::Module(ModuleError { index: ::PalletInfo::index::< Balances, >() .unwrap() as u8, error: 4, message: Some("KeepAlive") - }) + })) ); assert_eq!(Balances::free_balance(alice.clone()), current_balance_alice); assert_eq!( @@ -1055,14 +1055,14 @@ fn concrete_fungible_ledger_transfers_work() { &new_account.clone(), NativeTokenExistentialDeposit::get() - 1, ), - FungibleLedgerError::InvalidTransfer(DispatchError::Module { + FungibleLedgerError::InvalidTransfer(DispatchError::Module(ModuleError { index: ::PalletInfo::index::< Balances, >() .unwrap() as u8, error: 3, message: Some("ExistentialDeposit") - }) + })) ); // Should be able to create new account with enough balance @@ -1137,14 +1137,14 @@ fn concrete_fungible_ledger_transfers_work() { &bob.clone(), amount, ), - FungibleLedgerError::InvalidTransfer(DispatchError::Module { + FungibleLedgerError::InvalidTransfer(DispatchError::Module(ModuleError { index: ::PalletInfo::index::< Assets, >() .unwrap() as u8, error: 0, message: Some("BalanceLow") - }) + })) ); assert_eq!( Assets::balance( @@ -1219,14 +1219,14 @@ fn concrete_fungible_ledger_transfers_work() { &charlie.clone(), transfer_amount, ), - FungibleLedgerError::InvalidTransfer(DispatchError::Module { + FungibleLedgerError::InvalidTransfer(DispatchError::Module(ModuleError { index: ::PalletInfo::index::< Assets, >() .unwrap() as u8, error: 3, message: Some("Unknown") - }) + })) ); }); } diff --git a/runtime/common/Cargo.toml b/runtime/common/Cargo.toml index e242e1f6d..9279857e7 100644 --- a/runtime/common/Cargo.toml +++ b/runtime/common/Cargo.toml @@ -8,67 +8,50 @@ license = 'GPL-3.0' repository = 'https://github.com/Manta-Network/Manta/' [dependencies] -codec = { package = "parity-scale-codec", version = "2.3.1", default-features = false } -scale-info = { version = "1.0", default-features = false, features = [ "derive" ] } -smallvec = "1.6.1" -log = "0.4.14" -# manta-rs dependencies -manta-accounting = { git = "https://github.com/manta-network/manta-rs.git", default-features = false } +[dev-dependencies] +# 3rd dependencies +codec = { package = "parity-scale-codec", version = "3.0" } +scale-info = { version = "2.0", features = [ "derive" ] } -# Substrate primitives -frame-support = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } -frame-system = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } -frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.16", default-features = false, optional = true } -sp-consensus-aura = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } -sp-core = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } -sp-std = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } -sp-io = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } -sp-runtime = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } -xcm-executor = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.16"} -xcm = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.16" } -xcm-builder = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.16"} +# Substrate dependencies +frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.18" } +frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.18" } +sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.18" } +sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.18" } +sp-io = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.18" } +sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.18" } +pallet-balances = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.18" } +pallet-utility = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.18" } +pallet-assets = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.18" } -[dev-dependencies] -xcm-simulator = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.16"} -polkadot-runtime-parachains = { git = 'https://github.com/paritytech/polkadot.git', branch = "release-v0.9.16" } -polkadot-core-primitives = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.16" } -pallet-xcm = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.16" } -polkadot-parachain = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.16" } -pallet-balances = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } -pallet-utility = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } -pallet-assets = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } -cumulus-pallet-xcm = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.16" } -parachain-info = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.16" } -cumulus-primitives-parachain-inherent = { git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v0.9.16", default-features = false } -cumulus-test-relay-sproof-builder = { git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v0.9.16", default-features = false } -orml-xtokens = { git = "https://github.com/manta-network/open-runtime-module-library.git", default-features = false, rev="4a66b29"} +# Polkadot dependencies +polkadot-core-primitives = { git = 'https://github.com/paritytech/polkadot.git', branch = "release-v0.9.18" } +polkadot-runtime-parachains = { git = 'https://github.com/paritytech/polkadot.git', branch = "release-v0.9.18" } +polkadot-parachain = { git = 'https://github.com/paritytech/polkadot.git', branch = "release-v0.9.18" } +pallet-xcm = { git = 'https://github.com/paritytech/polkadot.git', branch = "release-v0.9.18" } +xcm = { git = 'https://github.com/paritytech/polkadot.git', branch = "release-v0.9.18" } +xcm-builder = { git = 'https://github.com/paritytech/polkadot.git', branch = "release-v0.9.18"} +xcm-executor = { git = 'https://github.com/paritytech/polkadot.git', branch = "release-v0.9.18"} +xcm-simulator = { git = 'https://github.com/paritytech/polkadot.git', branch = "release-v0.9.18"} + +# Cumulus dependencies +parachain-info = { git = 'https://github.com/paritytech/cumulus.git', branch = "polkadot-v0.9.18" } +cumulus-pallet-xcm = { git = 'https://github.com/paritytech/cumulus.git', branch = "polkadot-v0.9.18" } +cumulus-primitives-parachain-inherent = { git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v0.9.18" } +cumulus-test-relay-sproof-builder = { git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v0.9.18" } +cumulus-pallet-parachain-system = { git = 'https://github.com/paritytech/cumulus.git', branch = "polkadot-v0.9.18" } +cumulus-pallet-dmp-queue = { git = 'https://github.com/paritytech/cumulus.git', branch = "polkadot-v0.9.18" } +cumulus-pallet-xcmp-queue = { git = 'https://github.com/paritytech/cumulus.git', branch = "polkadot-v0.9.18" } + +# Orml dependencies +orml-traits = { git = "https://github.com/manta-network/open-runtime-module-library.git", rev="7e2f985" } +orml-xtokens = { git = "https://github.com/manta-network/open-runtime-module-library.git", rev="7e2f985" } -pallet-asset-manager = { path = '../../pallets/asset-manager', default-features = false } -manta-primitives = { path = '../../primitives', default-features = false } +# Self dependencies +pallet-asset-manager = { path = '../../pallets/asset-manager' } +manta-primitives = { path = '../../primitives' } [features] default = ["std"] -std = [ - 'codec/std', - 'sp-consensus-aura/std', - 'scale-info/std', - 'sp-io/std', - 'sp-std/std', - 'manta-accounting/std', - 'log/std', - 'frame-support/std', - 'frame-system/std', - 'sp-consensus-aura/std', - 'sp-core/std', - 'sp-runtime/std', - 'xcm-executor/std', - 'xcm-builder/std', - 'xcm/std', -] -runtime-benchmarks = [ - "frame-benchmarking", - 'frame-support/runtime-benchmarks', - 'frame-system/runtime-benchmarks', - 'xcm-builder/runtime-benchmarks', -] \ No newline at end of file +std = [] diff --git a/runtime/common/tests/xcm_mock/mod.rs b/runtime/common/tests/xcm_mock/mod.rs index a83bca6b1..5791e6089 100644 --- a/runtime/common/tests/xcm_mock/mod.rs +++ b/runtime/common/tests/xcm_mock/mod.rs @@ -27,7 +27,7 @@ pub const INITIAL_BALANCE: u128 = 10_000_000_000_000_000; decl_test_parachain! { pub struct ParaA { Runtime = parachain::Runtime, - XcmpMessageHandler = parachain::MsgQueue, + XcmpMessageHandler = parachain::XcmpQueue, DmpMessageHandler = parachain::MsgQueue, new_ext = para_ext(1), } @@ -36,7 +36,7 @@ decl_test_parachain! { decl_test_parachain! { pub struct ParaB { Runtime = parachain::Runtime, - XcmpMessageHandler = parachain::MsgQueue, + XcmpMessageHandler = parachain::XcmpQueue, DmpMessageHandler = parachain::MsgQueue, new_ext = para_ext(2), } @@ -45,7 +45,7 @@ decl_test_parachain! { decl_test_parachain! { pub struct ParaC { Runtime = parachain::Runtime, - XcmpMessageHandler = parachain::MsgQueue, + XcmpMessageHandler = parachain::XcmpQueue, DmpMessageHandler = parachain::MsgQueue, new_ext = para_ext(3), } diff --git a/runtime/common/tests/xcm_mock/parachain.rs b/runtime/common/tests/xcm_mock/parachain.rs index b5ae809d6..b81ad029d 100644 --- a/runtime/common/tests/xcm_mock/parachain.rs +++ b/runtime/common/tests/xcm_mock/parachain.rs @@ -18,22 +18,20 @@ use codec::{Decode, Encode}; use frame_support::{ - construct_runtime, - pallet_prelude::DispatchResult, - parameter_types, + assert_ok, construct_runtime, parameter_types, traits::{ConstU32, Everything, Nothing}, weights::{constants::WEIGHT_PER_SECOND, Weight}, PalletId, }; use frame_system::EnsureRoot; use scale_info::TypeInfo; -use sp_core::H256; +use sp_core::{H160, H256}; use sp_runtime::{ testing::Header, traits::{Hash, IdentityLookup}, AccountId32, }; -use sp_std::{convert::TryFrom, prelude::*}; +use sp_std::prelude::*; use pallet_xcm::XcmPassthrough; use polkadot_core_primitives::BlockNumber as RelayBlockNumber; @@ -44,11 +42,11 @@ use xcm::{latest::prelude::*, Version as XcmVersion, VersionedMultiLocation, Ver use xcm_builder::{ AccountId32Aliases, AllowUnpaidExecutionFrom, ConvertedConcreteAssetId, CurrencyAdapter as XcmCurrencyAdapter, EnsureXcmOrigin, FixedRateOfFungible, FixedWeightBounds, - FungiblesAdapter, LocationInverter, ParentIsDefault, SiblingParachainAsNative, + FungiblesAdapter, LocationInverter, ParentIsPreset, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SovereignSignedViaLocation, }; use xcm_executor::{traits::JustTry, Config, XcmExecutor}; -use xcm_simulator::Get; +use xcm_simulator::{DmpMessageHandlerT, Get, TestExt, XcmpMessageHandlerT}; use manta_primitives::{ assets::{ @@ -89,7 +87,7 @@ impl frame_system::Config for Runtime { type BaseCallFilter = Everything; type SystemWeightInfo = (); type SS58Prefix = (); - type OnSetCode = (); + type OnSetCode = cumulus_pallet_parachain_system::ParachainSetCode; type MaxConsumers = ConstU32<16>; } @@ -119,8 +117,9 @@ parameter_types! { parameter_types! { pub const KsmLocation: MultiLocation = MultiLocation::parent(); pub const RelayNetwork: NetworkId = NetworkId::Kusama; - pub Ancestry: MultiLocation = Parachain(MsgQueue::parachain_id().into()).into(); + pub Ancestry: MultiLocation = Parachain(ParachainInfo::parachain_id().into()).into(); pub SelfReserve: MultiLocation = MultiLocation::new(1, X1(Parachain(ParachainInfo::parachain_id().into()))); + pub CheckingAccount: AccountId = PolkadotXcm::check_account(); } parameter_types! { @@ -154,7 +153,7 @@ impl pallet_assets::Config for Runtime { /// `Transact` in order to determine the dispatch Origin. pub type LocationToAccountId = ( // The parent (Relay-chain) origin converts to the default `AccountId`. - ParentIsDefault, + ParentIsPreset, // Sibling parachain origins convert to AccountId via the `ParaId::into`. SiblingParachainConvertsVia, AccountId32Aliases, @@ -213,10 +212,10 @@ pub type FungiblesTransactor = FungiblesAdapter< // No teleport support. Nothing, // No teleport tracking. - (), + CheckingAccount, >; -pub type XcmRouter = super::ParachainXcmRouter; +pub type XcmRouter = super::ParachainXcmRouter; pub type Barrier = AllowUnpaidExecutionFrom; parameter_types! { @@ -268,48 +267,15 @@ impl Config for XcmExecutorConfig { type SubscriptionService = PolkadotXcm; } -// Pallet to provide the version, used to test runtime upgrade version changes -#[frame_support::pallet] -pub mod mock_version_changer { - use super::*; - use frame_support::pallet_prelude::*; - - #[pallet::config] - pub trait Config: frame_system::Config { - type Event: From> + IsType<::Event>; - } - - #[pallet::call] - impl Pallet {} - - #[pallet::pallet] - #[pallet::generate_store(pub(super) trait Store)] - pub struct Pallet(_); - - #[pallet::storage] - #[pallet::getter(fn current_version)] - pub(super) type CurrentVersion = StorageValue<_, XcmVersion, ValueQuery>; - - impl Get for Pallet { - fn get() -> XcmVersion { - Self::current_version() - } - } - - #[pallet::event] - #[pallet::generate_deposit(pub(super) fn deposit_event)] - pub enum Event { - // XCMP - /// Some XCM was executed OK. - VersionChanged(XcmVersion), - } - - impl Pallet { - pub fn set_version(version: XcmVersion) { - CurrentVersion::::put(version); - Self::deposit_event(Event::VersionChanged(version)); - } - } +impl cumulus_pallet_xcmp_queue::Config for Runtime { + type Event = Event; + type XcmExecutor = XcmExecutor; + type ChannelInfo = ParachainSystem; + type VersionWrapper = PolkadotXcm; + type ExecuteOverweightOrigin = EnsureRoot; + type ControllerOrigin = EnsureRoot; + type ControllerOriginConverter = XcmOriginToCallOrigin; + type WeightInfo = (); } #[frame_support::pallet] @@ -460,8 +426,15 @@ impl mock_msg_queue::Config for Runtime { type XcmExecutor = XcmExecutor; } -impl mock_version_changer::Config for Runtime { +impl cumulus_pallet_parachain_system::Config for Runtime { type Event = Event; + type SelfParaId = parachain_info::Pallet; + type DmpMessageHandler = MsgQueue; + type ReservedDmpWeight = ReservedDmpWeight; + type OutboundXcmpMessageSource = XcmpQueue; + type XcmpMessageHandler = XcmpQueue; + type ReservedXcmpWeight = ReservedXcmpWeight; + type OnSystemEvent = (); } pub type LocalOriginToLocation = (); @@ -481,10 +454,21 @@ impl pallet_xcm::Config for Runtime { type Origin = Origin; type Call = Call; const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100; - type AdvertisedXcmVersion = XcmVersioner; + type AdvertisedXcmVersion = CurrentXcmVersion; +} + +parameter_types! { + /// An implementation of `Get` which just returns the latest XCM version which we can + /// support. + pub static CurrentXcmVersion: u32 = 0; +} + +pub(crate) fn set_current_xcm_version(version: XcmVersion) { + CurrentXcmVersion::set(version); } pub struct CalamariAssetRegistrar; +use frame_support::pallet_prelude::DispatchResult; impl AssetRegistrar for CalamariAssetRegistrar { fn create_asset( asset_id: AssetId, @@ -593,7 +577,7 @@ where parameter_types! { pub const BaseXcmWeight: Weight = 100_000_000; - pub const MaxAssetsForTransfer: usize = 1; + pub const MaxAssetsForTransfer: usize = 2; } // The XCM message wrapper wrapper @@ -610,6 +594,9 @@ impl orml_xtokens::Config for Runtime { type BaseXcmWeight = BaseXcmWeight; type LocationInverter = LocationInverter; type MaxAssetsForTransfer = MaxAssetsForTransfer; + type MinXcmFee = AssetManager; + type MultiLocationsFilter = AssetManager; + type ReserveProvider = orml_traits::location::AbsoluteReserveProvider; } impl parachain_info::Config for Runtime {} @@ -633,8 +620,9 @@ construct_runtime!( PolkadotXcm: pallet_xcm::{Pallet, Call, Event, Origin} = 5, XTokens: orml_xtokens::{Pallet, Call, Event, Storage} = 6, CumulusXcm: cumulus_pallet_xcm::{Pallet, Event, Origin} = 7, - XcmVersioner: mock_version_changer::{Pallet, Storage, Event} = 8, - ParachainInfo: parachain_info::{Pallet, Storage, Config} = 9, + ParachainInfo: parachain_info::{Pallet, Storage, Config} = 8, + XcmpQueue: cumulus_pallet_xcmp_queue::{Pallet, Call, Storage, Event} = 9, + ParachainSystem: cumulus_pallet_parachain_system::{Pallet, Call, Config, Storage, Inherent, Event, ValidateUnsigned} = 10, } ); @@ -662,3 +650,78 @@ pub(crate) fn para_roll_to(n: u64) { PolkadotXcm::on_initialize(System::block_number()); } } + +pub(crate) fn create_asset_metadata( + name: &str, + symbol: &str, + decimals: u8, + min_balance: u128, + evm_address: Option, + is_frozen: bool, + is_sufficient: bool, +) -> AssetRegistrarMetadata { + AssetRegistrarMetadata { + name: name.as_bytes().to_vec(), + symbol: symbol.as_bytes().to_vec(), + decimals, + min_balance, + evm_address, + is_frozen, + is_sufficient, + } +} + +pub(crate) fn create_asset_location(parents: u8, para_id: u32) -> AssetLocation { + AssetLocation(VersionedMultiLocation::V1(MultiLocation::new( + parents, + X1(Parachain(para_id)), + ))) +} + +pub(crate) fn register_assets_on_parachain

( + source_location: &AssetLocation, + asset_metadata: &AssetRegistrarMetadata, + units_per_second: Option, + mint_asset: Option<(AccountId, Balance, bool, bool)>, +) -> AssetId +where + P: XcmpMessageHandlerT + DmpMessageHandlerT + TestExt, +{ + let mut currency_id = 0u32; + P::execute_with(|| { + currency_id = AssetManager::next_asset_id(); + assert_ok!(AssetManager::register_asset( + self::Origin::root(), + source_location.clone(), + asset_metadata.clone() + )); + + if let Some((owner, min_balance, is_sufficient, is_frozen)) = mint_asset { + assert_ok!(self::Assets::force_asset_status( + self::Origin::root(), + currency_id, + owner.clone().into(), + owner.clone().into(), + owner.clone().into(), + owner.into(), + min_balance, + is_sufficient, + is_frozen, + )); + } + + if let Some(ups) = units_per_second { + assert_ok!(AssetManager::set_units_per_second( + self::Origin::root(), + currency_id, + ups, + )); + } + + assert_eq!( + Some(currency_id), + AssetManager::location_asset_id(source_location.clone()) + ); + }); + currency_id +} diff --git a/runtime/common/tests/xcm_mock/relay_chain.rs b/runtime/common/tests/xcm_mock/relay_chain.rs index c990e9938..39b60bf52 100644 --- a/runtime/common/tests/xcm_mock/relay_chain.rs +++ b/runtime/common/tests/xcm_mock/relay_chain.rs @@ -189,6 +189,7 @@ impl ump::Config for Runtime { type UmpSink = ump::XcmSink, Runtime>; type FirstMessageFactorPercent = FirstMessageFactorPercent; type ExecuteOverweightOrigin = frame_system::EnsureRoot; + type WeightInfo = polkadot_runtime_parachains::ump::TestWeightInfo; } impl origin::Config for Runtime {} diff --git a/runtime/common/tests/xcm_tests.rs b/runtime/common/tests/xcm_tests.rs index d904522e9..2a2670d82 100644 --- a/runtime/common/tests/xcm_tests.rs +++ b/runtime/common/tests/xcm_tests.rs @@ -16,19 +16,21 @@ //! Simulation Tests for XCM +#![cfg(test)] + mod xcm_mock; use codec::Encode; -use frame_support::{assert_err, assert_ok, weights::constants::WEIGHT_PER_SECOND}; -use manta_primitives::{ - assets::{AssetLocation, AssetRegistrarMetadata}, - types::AssetId, -}; +use frame_support::{assert_err, assert_noop, assert_ok, weights::constants::WEIGHT_PER_SECOND}; +use manta_primitives::assets::AssetLocation; use xcm::{latest::prelude::*, v2::Response, VersionedMultiLocation, WrapVersion}; use xcm_mock::{parachain::PALLET_ASSET_INDEX, *}; use xcm_simulator::TestExt; -use crate::xcm_mock::parachain::{AssetManager, ParaTokenPerSecond}; +use crate::xcm_mock::parachain::{ + create_asset_location, create_asset_metadata, register_assets_on_parachain, AssetManager, + ParaTokenPerSecond, +}; // `reserved_transfer_asset` contains the following 4 instructions // 1. ReserveAssetDeposited(assets.clone()), @@ -141,33 +143,13 @@ fn xcmp() { fn reserve_transfer_relaychain_to_parachain_a() { MockNet::reset(); - let relay_asset_id: AssetId = 0; let source_location = AssetLocation(VersionedMultiLocation::V1(MultiLocation::parent())); - let asset_metadata = AssetRegistrarMetadata { - name: b"Kusama".to_vec(), - symbol: b"KSM".to_vec(), - decimals: 12, - min_balance: 1u128, - evm_address: None, - is_frozen: false, - is_sufficient: true, - }; + let asset_metadata = create_asset_metadata("Kusama", "KSM", 12, 1, None, false, true); // Register relay chain asset in parachain A - ParaA::execute_with(|| { - assert_ok!(parachain::AssetManager::register_asset( - parachain::Origin::root(), - source_location, - asset_metadata - )); - // we don't charge anything during test - assert_ok!(parachain::AssetManager::set_units_per_second( - parachain::Origin::root(), - relay_asset_id, - 0u128 - )); - }); + let relay_asset_id = + register_assets_on_parachain::(&source_location, &asset_metadata, Some(0u128), None); let withdraw_amount = 123; @@ -205,33 +187,12 @@ fn reserve_transfer_relaychain_to_parachain_a() { fn reserve_transfer_relaychain_to_parachain_a_then_back() { MockNet::reset(); - let relay_asset_id: AssetId = 0; let source_location = AssetLocation(VersionedMultiLocation::V1(MultiLocation::parent())); - - let asset_metadata = AssetRegistrarMetadata { - name: b"Kusama".to_vec(), - symbol: b"KSM".to_vec(), - decimals: 12, - min_balance: 1u128, - evm_address: None, - is_frozen: false, - is_sufficient: true, - }; + let asset_metadata = create_asset_metadata("Kusama", "KSM", 12, 1, None, false, true); // Register relay chain asset in parachain A - ParaA::execute_with(|| { - assert_ok!(parachain::AssetManager::register_asset( - parachain::Origin::root(), - source_location, - asset_metadata - )); - // we don't charge anything - assert_ok!(parachain::AssetManager::set_units_per_second( - parachain::Origin::root(), - relay_asset_id, - 0u128 - )); - }); + let relay_asset_id = + register_assets_on_parachain::(&source_location, &asset_metadata, Some(0u128), None); let amount = 123; @@ -310,58 +271,38 @@ fn send_para_a_native_asset_to_para_b() { // We use an opinionated source location here: // Ideally, we could use `here()`, however, we always prefer to use the location from // `root` when possible. - let source_location = AssetLocation(VersionedMultiLocation::V1(MultiLocation::new( - 1, - X1(Parachain(1)), - ))); - let a_currency_id = 0u32; + let para_a_id = 1; + let para_b_id = 2; + let para_a_source_location = create_asset_location(1, para_a_id); + let para_b_source_location = create_asset_location(1, para_b_id); let amount = 100u128; - let asset_metadata = AssetRegistrarMetadata { - name: b"ParaAToken".to_vec(), - symbol: b"ParaA".to_vec(), - decimals: 18, - evm_address: None, - min_balance: 1, - is_frozen: false, - is_sufficient: false, - }; + let para_a_asset_metadata = + create_asset_metadata("ParaAToken", "ParaA", 18, 1, None, false, false); + let para_b_asset_metadata = + create_asset_metadata("ParaBToken", "ParaB", 18, 1, None, false, false); // Register ParaA native asset in ParaB - ParaB::execute_with(|| { - assert_ok!(AssetManager::register_asset( - parachain::Origin::root(), - source_location.clone(), - asset_metadata.clone() - )); - assert_ok!(AssetManager::set_units_per_second( - parachain::Origin::root(), - a_currency_id, - 0u128 - )); - assert_eq!( - Some(a_currency_id), - AssetManager::location_asset_id(source_location.clone()) - ); - }); + let _ = register_assets_on_parachain::( + ¶_a_source_location, + ¶_a_asset_metadata, + Some(0u128), + None, + ); // Register ParaA native asset in ParaA - ParaA::execute_with(|| { - assert_ok!(AssetManager::register_asset( - parachain::Origin::root(), - source_location.clone(), - asset_metadata - )); - assert_ok!(AssetManager::set_units_per_second( - parachain::Origin::root(), - a_currency_id, - 0u128 - )); - assert_eq!( - Some(a_currency_id), - AssetManager::location_asset_id(source_location) - ); - }); + let a_currency_id = register_assets_on_parachain::( + ¶_a_source_location, + ¶_a_asset_metadata, + Some(0u128), + None, + ); + let _ = register_assets_on_parachain::( + ¶_b_source_location, + ¶_b_asset_metadata, + Some(0u128), + None, + ); let dest = MultiLocation { parents: 1, @@ -403,61 +344,42 @@ fn send_para_a_native_asset_to_para_b() { fn send_not_sufficient_asset_from_para_a_to_para_b() { MockNet::reset(); - let source_location = AssetLocation(VersionedMultiLocation::V1(MultiLocation::new( - 1, - X1(Parachain(1)), - ))); - let a_currency_id = 0u32; + let para_a_id = 1; + let para_b_id = 2; + let para_a_source_location = create_asset_location(1, para_a_id); + let para_b_source_location = create_asset_location(1, para_b_id); + let amount = 8888u128; let units_per_second_at_b = 1_250_000u128; let dest_weight = 1600_000u64; let fee_at_b = calculate_fee(units_per_second_at_b, dest_weight); - let asset_metadata = AssetRegistrarMetadata { - name: b"ParaAToken".to_vec(), - symbol: b"ParaA".to_vec(), - decimals: 18, - evm_address: None, - min_balance: 1, - is_frozen: false, - is_sufficient: false, - }; + let para_a_asset_metadata = + create_asset_metadata("ParaAToken", "ParaA", 18, 1, None, false, false); + let para_b_asset_metadata = + create_asset_metadata("ParaBToken", "ParaB", 18, 1, None, false, false); // Register ParaA native asset in ParaA - ParaA::execute_with(|| { - assert_ok!(AssetManager::register_asset( - parachain::Origin::root(), - source_location.clone(), - asset_metadata.clone() - )); - assert_ok!(AssetManager::set_units_per_second( - parachain::Origin::root(), - a_currency_id, - 0u128 - )); - assert_eq!( - Some(a_currency_id), - parachain::AssetManager::location_asset_id(source_location.clone()) - ); - }); + let a_currency_id = register_assets_on_parachain::( + ¶_a_source_location, + ¶_a_asset_metadata, + Some(0u128), + None, + ); + let _ = register_assets_on_parachain::( + ¶_b_source_location, + ¶_b_asset_metadata, + Some(0u128), + None, + ); // Register ParaA native asset in ParaB - ParaB::execute_with(|| { - assert_ok!(AssetManager::register_asset( - parachain::Origin::root(), - source_location.clone(), - asset_metadata.clone() - )); - assert_ok!(AssetManager::set_units_per_second( - parachain::Origin::root(), - a_currency_id, - units_per_second_at_b - )); - assert_eq!( - Some(a_currency_id), - parachain::AssetManager::location_asset_id(source_location.clone()) - ); - }); + let _ = register_assets_on_parachain::( + ¶_a_source_location, + ¶_a_asset_metadata, + Some(units_per_second_at_b), + None, + ); let dest = MultiLocation { parents: 1, @@ -543,20 +465,10 @@ fn send_not_sufficient_asset_from_para_a_to_para_b() { fn register_with_is_sufficient_false_and_zero_min_balance_should_fail() { MockNet::reset(); - let source_location = AssetLocation(VersionedMultiLocation::V1(MultiLocation::new( - 1, - X1(Parachain(1)), - ))); + let para_a_id = 1; + let source_location = create_asset_location(1, para_a_id); - let asset_metadata = AssetRegistrarMetadata { - name: b"ParaAToken".to_vec(), - symbol: b"ParaA".to_vec(), - decimals: 18, - evm_address: None, - min_balance: 0, - is_frozen: false, - is_sufficient: false, - }; + let asset_metadata = create_asset_metadata("ParaAToken", "ParaA", 18, 0, None, false, false); ParaB::execute_with(|| { assert_err!( @@ -572,73 +484,47 @@ fn register_with_is_sufficient_false_and_zero_min_balance_should_fail() { #[test] fn send_para_a_custom_asset_to_para_b() { - let a_currency_id: u32 = 0; let amount = 321; - let asset_metadata = AssetRegistrarMetadata { - name: b"ParaADoge".to_vec(), - symbol: b"Doge".to_vec(), - decimals: 18, - evm_address: None, - min_balance: 1, - is_frozen: false, - is_sufficient: true, - }; - let source_location = AssetLocation(VersionedMultiLocation::V1(MultiLocation::new( + let para_a_id = 1; + let para_b_id = 2; + let para_a_source_location = AssetLocation(VersionedMultiLocation::V1(MultiLocation::new( 1, X3( - Parachain(1), + Parachain(para_a_id), PalletInstance(PALLET_ASSET_INDEX), GeneralIndex(0), ), ))); + let para_b_source_location = create_asset_location(1, para_b_id); + + let para_a_doge_asset_metadata = + create_asset_metadata("ParaADoge", "Doge", 18, 1, None, false, true); + let para_b_asset_metadata = + create_asset_metadata("ParaBToken", "ParaB", 18, 1, None, false, false); + + // register doge in ParaA, ParaB + let doge_currency_id_on_a = register_assets_on_parachain::( + ¶_a_source_location, + ¶_a_doge_asset_metadata, + Some(0u128), + Some((ALICE, 1, true, false)), + ); + // register ParaB native asset on ParaA + let _ = register_assets_on_parachain::( + ¶_b_source_location, + ¶_b_asset_metadata, + Some(0u128), + None, + ); - // register a_currency in ParaA, ParaB - ParaA::execute_with(|| { - assert_ok!(parachain::AssetManager::register_asset( - parachain::Origin::root(), - source_location.clone(), - asset_metadata.clone() - )); - // we have to do this in order to mint asset to alice on A - assert_ok!(parachain::Assets::force_asset_status( - parachain::Origin::root(), - 0, - ALICE.into(), - ALICE.into(), - ALICE.into(), - ALICE.into(), - 1, - true, - false, - )); - assert_ok!(AssetManager::set_units_per_second( - parachain::Origin::root(), - a_currency_id, - 0u128 - )); - assert_eq!( - Some(a_currency_id), - parachain::AssetManager::location_asset_id(source_location.clone()) - ); - }); - - ParaB::execute_with(|| { - assert_ok!(parachain::AssetManager::register_asset( - parachain::Origin::root(), - source_location.clone(), - asset_metadata.clone() - )); - assert_ok!(AssetManager::set_units_per_second( - parachain::Origin::root(), - a_currency_id, - 0u128 - )); - assert_eq!( - Some(a_currency_id), - parachain::AssetManager::location_asset_id(source_location) - ); - }); + // register ParaA native asset on ParaB + let doge_currency_id_on_b = register_assets_on_parachain::( + ¶_a_source_location, + ¶_a_doge_asset_metadata, + Some(0u128), + None, + ); let alice_on_b = MultiLocation { parents: 1, @@ -655,28 +541,28 @@ fn send_para_a_custom_asset_to_para_b() { // Force customized asset balance for Alice assert_ok!(parachain::Assets::mint( parachain::Origin::signed(ALICE.into()), - 0, + doge_currency_id_on_a, ALICE.into(), INITIAL_BALANCE )); assert_ok!(parachain::XTokens::transfer( parachain::Origin::signed(ALICE.into()), - parachain::CurrencyId::MantaCurrency(a_currency_id), + parachain::CurrencyId::MantaCurrency(doge_currency_id_on_a), amount, Box::new(VersionedMultiLocation::V1(alice_on_b)), 800000 )); assert_eq!( - parachain::Assets::balance(a_currency_id, &ALICE.into()), + parachain::Assets::balance(doge_currency_id_on_a, &ALICE.into()), INITIAL_BALANCE - amount - ) + ); }); // Make sure B received the token ParaB::execute_with(|| { // free execution, full amount received assert_eq!( - parachain::Assets::balance(a_currency_id, &ALICE.into()), + parachain::Assets::balance(doge_currency_id_on_b, &ALICE.into()), amount ); }); @@ -687,61 +573,42 @@ fn send_para_a_native_asset_para_b_and_then_send_back() { MockNet::reset(); // para a native asset location - let source_location = AssetLocation(VersionedMultiLocation::V1(MultiLocation::new( - 1, - X1(Parachain(1)), - ))); + let para_a_id = 1; + let para_b_id = 2; + let para_a_source_location = create_asset_location(1, para_a_id); + let para_b_source_location = create_asset_location(1, para_b_id); // a's currency id in para a, para b, and para c - let a_currency_id = 0u32; let amount = 5000u128; let weight = 800000u64; let fee_on_b_when_send_back = calculate_fee(ParaTokenPerSecond::get().1, weight); assert!(fee_on_b_when_send_back < amount); - let asset_metadata = AssetRegistrarMetadata { - name: b"ParaAToken".to_vec(), - symbol: b"ParaA".to_vec(), - decimals: 18, - evm_address: None, - min_balance: 1, - is_frozen: false, - is_sufficient: true, - }; - - // register a_currency in ParaA, ParaB - ParaA::execute_with(|| { - assert_ok!(parachain::AssetManager::register_asset( - parachain::Origin::root(), - source_location.clone(), - asset_metadata.clone() - )); - assert_ok!(AssetManager::set_units_per_second( - parachain::Origin::root(), - a_currency_id, - 0u128 - )); - assert_eq!( - Some(a_currency_id), - parachain::AssetManager::location_asset_id(source_location.clone()) - ); - }); - - ParaB::execute_with(|| { - assert_ok!(parachain::AssetManager::register_asset( - parachain::Origin::root(), - source_location.clone(), - asset_metadata.clone() - )); - assert_ok!(AssetManager::set_units_per_second( - parachain::Origin::root(), - a_currency_id, - 0u128 - )); - assert_eq!( - Some(a_currency_id), - parachain::AssetManager::location_asset_id(source_location) - ); - }); + let para_a_asset_metadata = + create_asset_metadata("ParaAToken", "ParaA", 18, 1, None, false, false); + let para_b_asset_metadata = + create_asset_metadata("ParaBToken", "ParaB", 18, 1, None, false, false); + + // register ParaA native asset on ParaA + let a_currency_id = register_assets_on_parachain::( + ¶_a_source_location, + ¶_a_asset_metadata, + Some(0u128), + None, + ); + // register ParaB native asset on ParaA + let _ = register_assets_on_parachain::( + ¶_b_source_location, + ¶_b_asset_metadata, + Some(0u128), + None, + ); + // register ParaA native asset on ParaB + let _ = register_assets_on_parachain::( + ¶_a_source_location, + ¶_a_asset_metadata, + Some(0u128), + None, + ); let alice_on_b = MultiLocation { parents: 1, @@ -814,78 +681,63 @@ fn send_para_a_native_asset_from_para_b_to_para_c() { MockNet::reset(); // para a asset location - let source_location = AssetLocation(VersionedMultiLocation::V1(MultiLocation::new( - 1, - X1(Parachain(1)), - ))); - let a_currency_id = 0u32; + let para_a_id = 1; + let para_b_id = 2; + let para_c_id = 3; + let para_a_source_location = create_asset_location(1, para_a_id); + let para_b_source_location = create_asset_location(1, para_b_id); + let para_c_source_location = create_asset_location(1, para_c_id); + let amount = 8888u128; let weight = 800_000u64; let fee_at_reserve = calculate_fee(ParaTokenPerSecond::get().1, weight); assert!(amount >= fee_at_reserve * 2 as u128); - let asset_metadata = AssetRegistrarMetadata { - name: b"ParaAToken".to_vec(), - symbol: b"ParaA".to_vec(), - decimals: 18, - evm_address: None, - min_balance: 1, - is_frozen: false, - is_sufficient: false, - }; + let para_a_asset_metadata = + create_asset_metadata("ParaAToken", "ParaA", 18, 1, None, false, false); + let para_b_asset_metadata = + create_asset_metadata("ParaBToken", "ParaB", 18, 1, None, false, false); + let para_c_asset_metadata = + create_asset_metadata("ParaCToken", "ParaC", 18, 1, None, false, false); + + // register ParaA native asset on ParaA + let a_currency_id = register_assets_on_parachain::( + ¶_a_source_location, + ¶_a_asset_metadata, + Some(0u128), + None, + ); + // register ParaB native asset on ParaA + let _ = register_assets_on_parachain::( + ¶_b_source_location, + ¶_b_asset_metadata, + Some(0u128), + None, + ); - // register a_currency in ParaA, ParaB and ParaC - ParaA::execute_with(|| { - assert_ok!(parachain::AssetManager::register_asset( - parachain::Origin::root(), - // we need to change this on/after v0.9.16 - source_location.clone(), - asset_metadata.clone() - )); - assert_ok!(AssetManager::set_units_per_second( - parachain::Origin::root(), - a_currency_id, - 0u128 - )); - assert_eq!( - Some(a_currency_id), - parachain::AssetManager::location_asset_id(source_location.clone()) - ); - }); + // register ParaA native asset on ParaB + let _ = register_assets_on_parachain::( + ¶_a_source_location, + ¶_a_asset_metadata, + Some(0u128), + None, + ); - ParaB::execute_with(|| { - assert_ok!(parachain::AssetManager::register_asset( - parachain::Origin::root(), - source_location.clone(), - asset_metadata.clone() - )); - assert_ok!(AssetManager::set_units_per_second( - parachain::Origin::root(), - a_currency_id, - 0u128 - )); - assert_eq!( - Some(a_currency_id), - parachain::AssetManager::location_asset_id(source_location.clone()) - ); - }); + // register ParaC native asset on ParaB + let _ = register_assets_on_parachain::( + ¶_c_source_location, + ¶_c_asset_metadata, + Some(0u128), + None, + ); - ParaC::execute_with(|| { - assert_ok!(parachain::AssetManager::register_asset( - parachain::Origin::root(), - source_location.clone(), - asset_metadata.clone() - )); - assert_ok!(AssetManager::set_units_per_second( - parachain::Origin::root(), - a_currency_id, - 0u128 - )); - assert_eq!( - Some(a_currency_id), - parachain::AssetManager::location_asset_id(source_location.clone()) - ); - }); + // register ParaA native asset on ParaC + let _ = register_assets_on_parachain::( + ¶_a_source_location, + ¶_a_asset_metadata, + Some(0u128), + None, + ); // A send B some token let alice_on_b = MultiLocation { @@ -958,35 +810,22 @@ fn send_para_a_native_asset_from_para_b_to_para_c() { fn receive_relay_asset_with_trader() { MockNet::reset(); - let relay_asset_id: AssetId = 0; let source_location = AssetLocation(VersionedMultiLocation::V1(MultiLocation::parent())); - let asset_metadata = AssetRegistrarMetadata { - name: b"Kusama".to_vec(), - symbol: b"KSM".to_vec(), - decimals: 12, - min_balance: 1u128, - evm_address: None, - is_frozen: false, - is_sufficient: true, - }; + let asset_metadata = create_asset_metadata("Kusama", "KSM", 12, 1, None, false, true); + let amount = 666u128; // We charge 10^9 as units per second on ParaA let units_per_second = 1_000_000_000u128; let fee = calculate_fee(units_per_second, RESERVE_TRANSFER_WEIGHT); assert!(fee > 0); - ParaA::execute_with(|| { - assert_ok!(parachain::AssetManager::register_asset( - parachain::Origin::root(), - source_location, - asset_metadata - )); - assert_ok!(parachain::AssetManager::set_units_per_second( - parachain::Origin::root(), - relay_asset_id, - units_per_second - )); - }); + // Register relaychain native asset in ParaA + let relay_asset_id = register_assets_on_parachain::( + &source_location, + &asset_metadata, + Some(units_per_second), + None, + ); let dest: MultiLocation = AccountId32 { network: Any, @@ -1027,62 +866,43 @@ fn send_para_a_asset_to_para_b_with_trader_and_fee() { MockNet::reset(); // para a balance location - let source_location = AssetLocation(VersionedMultiLocation::V1(MultiLocation::new( - 1, - X1(Parachain(1)), - ))); - let a_currency_id = 0u32; + let para_a_id = 1; + let para_b_id = 2; + let para_a_source_location = create_asset_location(1, para_a_id); + let para_b_source_location = create_asset_location(1, para_b_id); + let amount = 222u128; let units_per_second = 1_250_000u128; let dest_weight = 800_000u64; let fee = calculate_fee(units_per_second, dest_weight); - let asset_metadata = AssetRegistrarMetadata { - name: b"ParaAToken".to_vec(), - symbol: b"ParaA".to_vec(), - decimals: 18, - evm_address: None, - min_balance: 1, - is_frozen: false, - is_sufficient: true, - }; + let para_a_asset_metadata = + create_asset_metadata("ParaAToken", "ParaA", 18, 1, None, false, true); + let para_b_asset_metadata = + create_asset_metadata("ParaBToken", "ParaB", 18, 1, None, false, true); // Register ParaA native asset in ParaA - ParaA::execute_with(|| { - assert_ok!(AssetManager::register_asset( - parachain::Origin::root(), - // This need to be changed starting from v0.9.16 - // need to use something like MultiLocation { parents: 0, interior: here} instead - source_location.clone(), - asset_metadata.clone() - )); - assert_ok!(AssetManager::set_units_per_second( - parachain::Origin::root(), - a_currency_id, - 0u128 - )); - assert_eq!( - Some(a_currency_id), - AssetManager::location_asset_id(source_location.clone()) - ); - }); + let a_currency_id = register_assets_on_parachain::( + ¶_a_source_location, + ¶_a_asset_metadata, + Some(0u128), + None, + ); + // register ParaB native asset on ParaA + let _ = register_assets_on_parachain::( + ¶_b_source_location, + ¶_b_asset_metadata, + Some(0u128), + None, + ); - ParaB::execute_with(|| { - assert_ok!(AssetManager::register_asset( - parachain::Origin::root(), - source_location.clone(), - asset_metadata.clone() - )); - assert_ok!(AssetManager::set_units_per_second( - parachain::Origin::root(), - a_currency_id, - units_per_second - )); - assert_eq!( - Some(a_currency_id), - AssetManager::location_asset_id(source_location.clone()) - ); - }); + // register ParaA native asset on ParaB + let _ = register_assets_on_parachain::( + ¶_a_source_location, + ¶_a_asset_metadata, + Some(units_per_second), + None, + ); let dest = MultiLocation { parents: 1, @@ -1124,80 +944,65 @@ fn send_para_a_asset_from_para_b_to_para_c_with_trader() { MockNet::reset(); // para a balance location - let source_location = AssetLocation(VersionedMultiLocation::V1(MultiLocation::new( - 1, - X1(Parachain(1)), - ))); - let a_currency_id = 0u32; + let para_a_id = 1; + let para_b_id = 2; + let para_c_id = 3; + let para_a_source_location = create_asset_location(1, para_a_id); + let para_b_source_location = create_asset_location(1, para_b_id); + let para_c_source_location = create_asset_location(1, para_c_id); + let mut amount = 8888u128; let units_per_second_at_b = 1_250_000u128; let dest_weight = 800_000u64; let fee_at_b = calculate_fee(units_per_second_at_b, dest_weight); let fee_at_a = calculate_fee(ParaTokenPerSecond::get().1, dest_weight); - let asset_metadata = AssetRegistrarMetadata { - name: b"ParaAToken".to_vec(), - symbol: b"ParaA".to_vec(), - decimals: 18, - evm_address: None, - min_balance: 1, - is_frozen: false, - is_sufficient: true, - }; + + let para_a_asset_metadata = + create_asset_metadata("ParaAToken", "ParaA", 18, 1, None, false, true); + let para_b_asset_metadata = + create_asset_metadata("ParaBToken", "ParaB", 18, 1, None, false, true); + let para_c_asset_metadata = + create_asset_metadata("ParaCToken", "ParaC", 18, 1, None, false, true); // register a_currency in ParaA, ParaB and ParaC // we don't charge any fee in A - ParaA::execute_with(|| { - assert_ok!(parachain::AssetManager::register_asset( - parachain::Origin::root(), - source_location.clone(), - asset_metadata.clone() - )); - assert_ok!(AssetManager::set_units_per_second( - parachain::Origin::root(), - a_currency_id, - 0u128 - )); - assert_eq!( - Some(a_currency_id), - parachain::AssetManager::location_asset_id(source_location.clone()) - ); - }); + // Register ParaA native asset in ParaA + let a_currency_id_on_a = register_assets_on_parachain::( + ¶_a_source_location, + ¶_a_asset_metadata, + Some(0u128), + None, + ); + // register ParaB native asset on ParaA + let _ = register_assets_on_parachain::( + ¶_b_source_location, + ¶_b_asset_metadata, + Some(0u128), + None, + ); // We set units_per_seconds on ParaB to 1_250_000, - ParaB::execute_with(|| { - assert_ok!(parachain::AssetManager::register_asset( - parachain::Origin::root(), - source_location.clone(), - asset_metadata.clone() - )); - assert_ok!(AssetManager::set_units_per_second( - parachain::Origin::root(), - a_currency_id, - units_per_second_at_b - )); - assert_eq!( - Some(a_currency_id), - parachain::AssetManager::location_asset_id(source_location.clone()) - ); - }); + // register ParaA native asset on ParaB + let _ = register_assets_on_parachain::( + ¶_c_source_location, + ¶_c_asset_metadata, + Some(units_per_second_at_b), + None, + ); + let a_currency_id_on_b = register_assets_on_parachain::( + ¶_a_source_location, + ¶_a_asset_metadata, + Some(units_per_second_at_b), + None, + ); - ParaC::execute_with(|| { - assert_ok!(parachain::AssetManager::register_asset( - parachain::Origin::root(), - source_location.clone(), - asset_metadata.clone() - )); - assert_ok!(AssetManager::set_units_per_second( - parachain::Origin::root(), - a_currency_id, - units_per_second_at_b - )); - assert_eq!( - Some(a_currency_id), - parachain::AssetManager::location_asset_id(source_location.clone()) - ); - }); + let a_currency_id_on_c = register_assets_on_parachain::( + ¶_a_source_location, + ¶_a_asset_metadata, + Some(units_per_second_at_b), + None, + ); // A send B some token let alice_on_b = MultiLocation { @@ -1215,7 +1020,7 @@ fn send_para_a_asset_from_para_b_to_para_c_with_trader() { ParaA::execute_with(|| { assert_ok!(parachain::XTokens::transfer( parachain::Origin::signed(ALICE.into()), - parachain::CurrencyId::MantaCurrency(a_currency_id), + parachain::CurrencyId::MantaCurrency(a_currency_id_on_a), amount, Box::new(VersionedMultiLocation::V1(alice_on_b.clone())), dest_weight @@ -1227,10 +1032,10 @@ fn send_para_a_asset_from_para_b_to_para_c_with_trader() { }); ParaB::execute_with(|| { - assert_eq!(parachain::Assets::total_supply(a_currency_id), amount); + assert_eq!(parachain::Assets::total_supply(a_currency_id_on_b), amount); amount = amount - fee_at_b; assert_eq!( - parachain::Assets::balance(a_currency_id, &ALICE.into()), + parachain::Assets::balance(a_currency_id_on_b, &ALICE.into()), amount ); }); @@ -1251,19 +1056,22 @@ fn send_para_a_asset_from_para_b_to_para_c_with_trader() { ParaB::execute_with(|| { assert_ok!(parachain::XTokens::transfer( parachain::Origin::signed(ALICE.into()), - parachain::CurrencyId::MantaCurrency(a_currency_id), + parachain::CurrencyId::MantaCurrency(a_currency_id_on_b), amount, Box::new(VersionedMultiLocation::V1(alice_on_c)), dest_weight )); - assert_eq!(parachain::Assets::balance(a_currency_id, &ALICE.into()), 0); + assert_eq!( + parachain::Assets::balance(a_currency_id_on_b, &ALICE.into()), + 0 + ); }); // Make sure C received the token ParaC::execute_with(|| { amount = amount - fee_at_b - fee_at_a; assert_eq!( - parachain::Assets::balance(a_currency_id, &ALICE.into()), + parachain::Assets::balance(a_currency_id_on_c, &ALICE.into()), amount ); }); @@ -1273,35 +1081,22 @@ fn send_para_a_asset_from_para_b_to_para_c_with_trader() { fn receive_relay_with_insufficient_fee_payment() { MockNet::reset(); - let relay_asset_id: AssetId = 0; let source_location = AssetLocation(VersionedMultiLocation::V1(MultiLocation::parent())); - let asset_metadata = AssetRegistrarMetadata { - name: b"Kusama".to_vec(), - symbol: b"KSM".to_vec(), - decimals: 12, - min_balance: 1u128, - evm_address: None, - is_frozen: false, - is_sufficient: true, - }; + let asset_metadata = create_asset_metadata("Kusama", "KSM", 12, 1, None, false, true); + let amount = 20u128; // We charge 2 x 10^10 as units per second on ParaA let units_per_second = 20_000_000_000u128; let fee = calculate_fee(units_per_second, RESERVE_TRANSFER_WEIGHT); assert!(fee > amount); - ParaA::execute_with(|| { - assert_ok!(parachain::AssetManager::register_asset( - parachain::Origin::root(), - source_location, - asset_metadata - )); - assert_ok!(parachain::AssetManager::set_units_per_second( - parachain::Origin::root(), - relay_asset_id, - units_per_second - )); - }); + // Register relaychain native asset in ParaA + let relay_asset_id = register_assets_on_parachain::( + &source_location, + &asset_metadata, + Some(units_per_second), + None, + ); let dest: MultiLocation = AccountId32 { network: Any, @@ -1338,26 +1133,13 @@ fn receive_relay_with_insufficient_fee_payment() { fn receive_relay_should_fail_without_specifying_units_per_second() { MockNet::reset(); - let relay_asset_id: AssetId = 0; let source_location = AssetLocation(VersionedMultiLocation::V1(MultiLocation::parent())); - let asset_metadata = AssetRegistrarMetadata { - name: b"Kusama".to_vec(), - symbol: b"KSM".to_vec(), - decimals: 12, - min_balance: 1u128, - evm_address: None, - is_frozen: false, - is_sufficient: true, - }; + let asset_metadata = create_asset_metadata("Kusama", "KSM", 12, 1, None, false, true); let amount = 333u128; - ParaA::execute_with(|| { - assert_ok!(parachain::AssetManager::register_asset( - parachain::Origin::root(), - source_location, - asset_metadata - )); - }); + // Register relaychain native asset in ParaA + let relay_asset_id = + register_assets_on_parachain::(&source_location, &asset_metadata, None, None); let dest: MultiLocation = AccountId32 { network: Any, @@ -1395,63 +1177,44 @@ fn send_para_a_asset_to_para_b_with_insufficient_fee() { MockNet::reset(); // para a balance location - let source_location = AssetLocation(VersionedMultiLocation::V1(MultiLocation::new( - 1, - X1(Parachain(1)), - ))); - let a_currency_id = 0u32; + let para_a_id = 1; + let para_b_id = 2; + let para_a_source_location = create_asset_location(1, para_a_id); + let para_b_source_location = create_asset_location(1, para_b_id); + let amount = 15u128; let units_per_second = 20_000_000u128; let dest_weight = 800_000u64; let fee = calculate_fee(units_per_second, dest_weight); assert!(fee > amount); - let asset_metadata = AssetRegistrarMetadata { - name: b"ParaAToken".to_vec(), - symbol: b"ParaA".to_vec(), - decimals: 18, - evm_address: None, - min_balance: 1, - is_frozen: false, - is_sufficient: true, - }; + let para_a_asset_metadata = + create_asset_metadata("ParaAToken", "ParaA", 18, 1, None, false, true); + let para_b_asset_metadata = + create_asset_metadata("ParaBToken", "ParaB", 18, 1, None, false, true); // Register ParaA native asset in ParaA - ParaA::execute_with(|| { - assert_ok!(AssetManager::register_asset( - parachain::Origin::root(), - // This need to be changed starting from v0.9.16 - // need to use something like MultiLocation { parents: 0, interior: here} instead - source_location.clone(), - asset_metadata.clone() - )); - assert_ok!(AssetManager::set_units_per_second( - parachain::Origin::root(), - a_currency_id, - 0u128 - )); - assert_eq!( - Some(a_currency_id), - AssetManager::location_asset_id(source_location.clone()) - ); - }); + let a_currency_id = register_assets_on_parachain::( + ¶_a_source_location, + ¶_a_asset_metadata, + Some(0u128), + None, + ); + // register ParaB native asset on ParaA + let _ = register_assets_on_parachain::( + ¶_b_source_location, + ¶_b_asset_metadata, + Some(0u128), + None, + ); - ParaB::execute_with(|| { - assert_ok!(AssetManager::register_asset( - parachain::Origin::root(), - source_location.clone(), - asset_metadata.clone() - )); - assert_ok!(AssetManager::set_units_per_second( - parachain::Origin::root(), - a_currency_id, - units_per_second - )); - assert_eq!( - Some(a_currency_id), - AssetManager::location_asset_id(source_location.clone()) - ); - }); + // register ParaA native asset on ParaB + let _ = register_assets_on_parachain::( + ¶_b_source_location, + ¶_b_asset_metadata, + Some(units_per_second), + None, + ); let dest = MultiLocation { parents: 1, @@ -1490,56 +1253,42 @@ fn send_para_a_asset_to_para_b_without_specifying_units_per_second() { MockNet::reset(); // para a balance location - let source_location = AssetLocation(VersionedMultiLocation::V1(MultiLocation::new( - 1, - X1(Parachain(1)), - ))); - let a_currency_id = 0u32; + let para_a_id = 1; + let para_b_id = 2; + let para_a_source_location = create_asset_location(1, para_a_id); + let para_b_source_location = create_asset_location(1, para_b_id); + let amount = 567u128; let dest_weight = 800_000u64; - let asset_metadata = AssetRegistrarMetadata { - name: b"ParaAToken".to_vec(), - symbol: b"ParaA".to_vec(), - decimals: 18, - evm_address: None, - min_balance: 1, - is_frozen: false, - is_sufficient: true, - }; + let para_a_asset_metadata = + create_asset_metadata("ParaAToken", "ParaA", 18, 1, None, false, true); + let para_b_asset_metadata = + create_asset_metadata("ParaBToken", "ParaB", 18, 1, None, false, true); // Register ParaA native asset in ParaA - ParaA::execute_with(|| { - assert_ok!(AssetManager::register_asset( - parachain::Origin::root(), - // This need to be changed starting from v0.9.16 - // need to use something like MultiLocation { parents: 0, interior: here} instead - source_location.clone(), - asset_metadata.clone() - )); - assert_ok!(AssetManager::set_units_per_second( - parachain::Origin::root(), - a_currency_id, - 0u128 - )); - assert_eq!( - Some(a_currency_id), - AssetManager::location_asset_id(source_location.clone()) - ); - }); + // Register ParaA native asset in ParaA + let a_currency_id = register_assets_on_parachain::( + ¶_a_source_location, + ¶_a_asset_metadata, + Some(0u128), + None, + ); + // register ParaB native asset on ParaA + let _ = register_assets_on_parachain::( + ¶_b_source_location, + ¶_b_asset_metadata, + Some(0u128), + None, + ); - // We don't specify units_per_second on B - ParaB::execute_with(|| { - assert_ok!(AssetManager::register_asset( - parachain::Origin::root(), - source_location.clone(), - asset_metadata.clone() - )); - assert_eq!( - Some(a_currency_id), - AssetManager::location_asset_id(source_location.clone()) - ); - }); + // register ParaA native asset on ParaB + let _ = register_assets_on_parachain::( + ¶_a_source_location, + ¶_a_asset_metadata, + None, + None, + ); let dest = MultiLocation { parents: 1, @@ -1578,33 +1327,13 @@ fn receive_asset_with_is_sufficient_false() { MockNet::reset(); let new_account = [5u8; 32]; - let relay_asset_id = 0u32; let source_location = AssetLocation(VersionedMultiLocation::V1(MultiLocation::parent())); - let asset_metadata = AssetRegistrarMetadata { - name: b"Kusama".to_vec(), - symbol: b"KSM".to_vec(), - decimals: 12, - min_balance: 1u128, - evm_address: None, - is_frozen: false, - is_sufficient: false, - }; + let asset_metadata = create_asset_metadata("Kusama", "KSM", 12, 1, None, false, false); let amount = 123u128; // register relay asset in parachain A - ParaA::execute_with(|| { - assert_ok!(parachain::AssetManager::register_asset( - parachain::Origin::root(), - source_location, - asset_metadata - )); - // we don't charge anything during test - assert_ok!(parachain::AssetManager::set_units_per_second( - parachain::Origin::root(), - relay_asset_id, - 0u128 - )); - }); + let relay_asset_id = + register_assets_on_parachain::(&source_location, &asset_metadata, Some(0u128), None); let dest: MultiLocation = AccountId32 { network: Any, @@ -1671,33 +1400,13 @@ fn receive_asset_with_is_sufficient_true() { MockNet::reset(); let new_account = [5u8; 32]; - let relay_asset_id = 0u32; let source_location = AssetLocation(VersionedMultiLocation::V1(MultiLocation::parent())); - let asset_metadata = AssetRegistrarMetadata { - name: b"Kusama".to_vec(), - symbol: b"KSM".to_vec(), - decimals: 12, - min_balance: 1u128, - evm_address: None, - is_frozen: false, - is_sufficient: true, - }; + let asset_metadata = create_asset_metadata("Kusama", "KSM", 12, 1, None, false, true); let amount = 123u128; // register relay asset in parachain A - ParaA::execute_with(|| { - assert_ok!(parachain::AssetManager::register_asset( - parachain::Origin::root(), - source_location, - asset_metadata - )); - // we don't charge anything during test - assert_ok!(parachain::AssetManager::set_units_per_second( - parachain::Origin::root(), - relay_asset_id, - 0u128 - )); - }); + let relay_asset_id = + register_assets_on_parachain::(&source_location, &asset_metadata, Some(0u128), None); let dest: MultiLocation = AccountId32 { network: Any, @@ -1828,33 +1537,16 @@ fn query_holding() { fn test_versioning_on_runtime_upgrade_with_relay() { MockNet::reset(); - let relay_asset_id: AssetId = 0; let source_location = AssetLocation(VersionedMultiLocation::V1(MultiLocation::parent())); - let asset_metadata = AssetRegistrarMetadata { - name: b"Kusama".to_vec(), - symbol: b"KSM".to_vec(), - decimals: 12, - min_balance: 1u128, - evm_address: None, - is_frozen: false, - is_sufficient: true, - }; + let asset_metadata = create_asset_metadata("Kusama", "KSM", 12, 1, None, false, true); // register relay asset in parachain A (XCM version 1) ParaA::execute_with(|| { - parachain::XcmVersioner::set_version(1); - assert_ok!(parachain::AssetManager::register_asset( - parachain::Origin::root(), - source_location, - asset_metadata - )); - // we don't charge anything during test - assert_ok!(parachain::AssetManager::set_units_per_second( - parachain::Origin::root(), - relay_asset_id, - 0u128 - )); + // SelfReserve + parachain::set_current_xcm_version(1); }); + let _ = + register_assets_on_parachain::(&source_location, &asset_metadata, Some(0u128), None); let response = Response::Version(2); @@ -1933,7 +1625,7 @@ fn test_versioning_on_runtime_upgrade_with_relay() { // of the new version change ParaA::execute_with(|| { // Set version - parachain::XcmVersioner::set_version(2); + parachain::set_current_xcm_version(2); // Do runtime upgrade parachain::on_runtime_upgrade(); // Initialize block, to call on_initialize and notify targets @@ -1964,21 +1656,15 @@ fn test_automatic_versioning_on_runtime_upgrade_with_para_b() { MockNet::reset(); // para a balance location - let source_location = AssetLocation(VersionedMultiLocation::V1(MultiLocation::new( - 1, - X1(Parachain(1)), - ))); - let a_currency_id = 0u32; - - let asset_metadata = AssetRegistrarMetadata { - name: b"ParaAToken".to_vec(), - symbol: b"ParaA".to_vec(), - decimals: 18, - evm_address: None, - min_balance: 1, - is_frozen: false, - is_sufficient: true, - }; + let para_a_id = 1; + let para_b_id = 2; + let para_a_source_location = create_asset_location(1, para_a_id); + let para_b_source_location = create_asset_location(1, para_b_id); + + let para_a_asset_metadata = + create_asset_metadata("ParaAToken", "ParaA", 18, 1, None, false, true); + let para_b_asset_metadata = + create_asset_metadata("ParaBToken", "ParaB", 18, 1, None, false, true); let response = Response::Version(2); // This is irrelevant, nothing will be done with this message, @@ -1991,42 +1677,38 @@ fn test_automatic_versioning_on_runtime_upgrade_with_para_b() { ParaA::execute_with(|| { // advertised version - parachain::XcmVersioner::set_version(2); - // Register ParaA native asset in ParaA - assert_ok!(AssetManager::register_asset( - parachain::Origin::root(), - // This need to be changed starting from v0.9.16 - // need to use something like MultiLocation { parents: 0, interior: here} instead - source_location.clone(), - asset_metadata.clone() - )); - assert_ok!(AssetManager::set_units_per_second( - parachain::Origin::root(), - a_currency_id, - 0u128 - )); - assert_eq!( - Some(a_currency_id), - AssetManager::location_asset_id(source_location.clone()) - ); + parachain::set_current_xcm_version(2); }); - ParaB::execute_with(|| { - // Let's try with v0 - parachain::XcmVersioner::set_version(0); + // Register ParaA native asset in ParaA + let a_currency_id = register_assets_on_parachain::( + ¶_a_source_location, + ¶_a_asset_metadata, + Some(0u128), + None, + ); - assert_ok!(AssetManager::register_asset( - parachain::Origin::root(), - source_location, - asset_metadata - )); - assert_ok!(AssetManager::set_units_per_second( - parachain::Origin::root(), - a_currency_id, - 0u128 - )); + // register ParaB native asset on ParaA + let _ = register_assets_on_parachain::( + ¶_b_source_location, + ¶_b_asset_metadata, + Some(0u128), + None, + ); + + ParaB::execute_with(|| { + // advertised version + parachain::set_current_xcm_version(0); }); + // register ParaA native asset on ParaB + let _ = register_assets_on_parachain::( + ¶_a_source_location, + ¶_a_asset_metadata, + Some(0u128), + None, + ); + ParaA::execute_with(|| { // This sets the default version, for not known destinations assert_ok!(ParachainPalletXcm::force_default_xcm_version( @@ -2108,7 +1790,7 @@ fn test_automatic_versioning_on_runtime_upgrade_with_para_b() { // of the new version change ParaB::execute_with(|| { // Set version - parachain::XcmVersioner::set_version(2); + parachain::set_current_xcm_version(2); // Do runtime upgrade parachain::on_runtime_upgrade(); // Initialize block, to call on_initialize and notify targets @@ -2134,3 +1816,361 @@ fn test_automatic_versioning_on_runtime_upgrade_with_para_b() { assert!(parachain::para_events().contains(&expected_supported_version_2)); }); } + +#[test] +fn filtered_multilocation_should_not_work() { + let para_a_id = 1; + let para_b_id = 2; + let para_a_source_location = create_asset_location(1, para_a_id); + let para_b_source_location = create_asset_location(1, para_b_id); + let para_a_asset_metadata = + create_asset_metadata("ParaAToken", "ParaA", 18, 1, None, false, true); + let para_b_asset_metadata = + create_asset_metadata("ParaBToken", "ParaB", 18, 1, None, false, true); + + // Register ParaA native asset in ParaA + let a_currency_id = register_assets_on_parachain::( + ¶_a_source_location, + ¶_a_asset_metadata, + Some(0u128), + None, + ); + // register ParaB native asset on ParaA + let _ = register_assets_on_parachain::( + ¶_b_source_location, + ¶_b_asset_metadata, + Some(0u128), + None, + ); + + // register ParaA native asset on ParaB + let _ = register_assets_on_parachain::( + ¶_a_source_location, + ¶_a_asset_metadata, + Some(0u128), + None, + ); + + let dest = MultiLocation { + parents: 1, + interior: X2( + Parachain(4), // set para id as 4 + AccountId32 { + network: NetworkId::Any, + id: ALICE.into(), + }, + ), + }; + + // Sending xcm to parachain 5 should not work + ParaA::execute_with(|| { + assert_noop!( + parachain::XTokens::transfer( + parachain::Origin::signed(ALICE.into()), + parachain::CurrencyId::MantaCurrency(a_currency_id), + 100, + Box::new(VersionedMultiLocation::V1(dest)), + 80 + ), + orml_xtokens::Error::::NotSupportedMultiLocation, + ); + }); + + let x3_dest = MultiLocation { + parents: 1, + interior: X3( + Parachain(2), + PalletInstance(PALLET_ASSET_INDEX), + AccountId32 { + network: NetworkId::Any, + id: ALICE.into(), + }, + ), + }; + // We don't support X3 or more longer Junctions. + ParaA::execute_with(|| { + assert_noop!( + parachain::XTokens::transfer( + parachain::Origin::signed(ALICE.into()), + parachain::CurrencyId::MantaCurrency(a_currency_id), + 100, + Box::new(VersionedMultiLocation::V1(x3_dest)), + 80 + ), + orml_xtokens::Error::::NotSupportedMultiLocation, + ); + }); + + let parents_as_2_relay_dest = MultiLocation { + parents: 2, + interior: X1(AccountId32 { + network: NetworkId::Any, + id: ALICE.into(), + }), + }; + // relaychain dest with wrong parents should not work. + ParaA::execute_with(|| { + assert_noop!( + parachain::XTokens::transfer( + parachain::Origin::signed(ALICE.into()), + parachain::CurrencyId::MantaCurrency(a_currency_id), + 100, + Box::new(VersionedMultiLocation::V1(parents_as_2_relay_dest)), + 80 + ), + orml_xtokens::Error::::NotSupportedMultiLocation, + ); + }); + + let parents_as_2_dest = MultiLocation { + parents: 2, + interior: X2( + Parachain(2), + AccountId32 { + network: NetworkId::Any, + id: ALICE.into(), + }, + ), + }; + // Wrong parents should not work. + ParaA::execute_with(|| { + assert_noop!( + parachain::XTokens::transfer( + parachain::Origin::signed(ALICE.into()), + parachain::CurrencyId::MantaCurrency(a_currency_id), + 100, + Box::new(VersionedMultiLocation::V1(parents_as_2_dest)), + 80 + ), + orml_xtokens::Error::::NotSupportedMultiLocation, + ); + }); + + let here_dest = MultiLocation { + parents: 1, + interior: Here, + }; + // The destination with no receiver should not work. + ParaA::execute_with(|| { + assert_noop!( + parachain::XTokens::transfer( + parachain::Origin::signed(ALICE.into()), + parachain::CurrencyId::MantaCurrency(a_currency_id), + 100, + Box::new(VersionedMultiLocation::V1(here_dest)), + 80 + ), + orml_xtokens::Error::::NotSupportedMultiLocation, + ); + }); + + // Correct relaychain location should work, (1, Here) + let relay_dest = MultiLocation { + parents: 1, + interior: X1(AccountId32 { + network: NetworkId::Any, + id: ALICE.into(), + }), + }; + ParaA::execute_with(|| { + assert_ok!(parachain::XTokens::transfer( + parachain::Origin::signed(ALICE.into()), + parachain::CurrencyId::MantaCurrency(a_currency_id), + 100, + Box::new(VersionedMultiLocation::V1(relay_dest)), + 80 + )); + }); + + // Correct sibling location should work + let sibling_chain_dest = MultiLocation { + parents: 1, + interior: X2( + Parachain(2), + AccountId32 { + network: NetworkId::Any, + id: ALICE.into(), + }, + ), + }; + ParaA::execute_with(|| { + assert_ok!(parachain::XTokens::transfer( + parachain::Origin::signed(ALICE.into()), + parachain::CurrencyId::MantaCurrency(a_currency_id), + 100, + Box::new(VersionedMultiLocation::V1(sibling_chain_dest)), + 80 + )); + }); +} + +#[test] +fn less_than_min_xcm_fee_should_not_work() { + MockNet::reset(); + + let para_a_id = 1; + let para_b_id = 2; + let para_a_source_location = create_asset_location(1, para_a_id); + let para_b_source_location = AssetLocation(VersionedMultiLocation::V1(MultiLocation::new( + 1, + X2(Parachain(para_b_id), GeneralKey(b"ParaBToken".to_vec())), + ))); + let para_b_as_reserve_chain = create_asset_location(1, para_b_id); + + let para_a_asset_metadata = + create_asset_metadata("ParaAToken", "ParaA", 18, 1, None, false, true); + let para_b_asset_metadata = + create_asset_metadata("ParaBToken", "ParaB", 18, 1, None, false, true); + + let relay_source_location = AssetLocation(VersionedMultiLocation::V1(MultiLocation::parent())); + let relay_asset_metadata = create_asset_metadata("Kusama", "KSM", 12, 1, None, false, true); + + // Register ParaA native asset in ParaA + let _a_currency_id_on_a = register_assets_on_parachain::( + ¶_a_source_location, + ¶_a_asset_metadata, + Some(0u128), + None, + ); + // Register relaychain native asset in ParaA + let relay_asset_id_on_a = register_assets_on_parachain::( + &relay_source_location, + &relay_asset_metadata, + Some(0u128), + None, + ); + // register ParaB native asset on ParaA + let b_currency_id_on_a = register_assets_on_parachain::( + ¶_b_source_location, + ¶_b_asset_metadata, + Some(0u128), + None, + ); + + // register ParaA native asset on ParaB + let _ = register_assets_on_parachain::( + ¶_a_source_location, + ¶_a_asset_metadata, + Some(0u128), + None, + ); + // Register relaychain native asset in ParaA + let _relay_asset_id_on_b = register_assets_on_parachain::( + &relay_source_location, + &relay_asset_metadata, + Some(0u128), + None, + ); + + // Initlize some tokens for alice + assert_ok!(ParaA::execute_with(|| { + parachain::Assets::mint( + parachain::Origin::signed(parachain::AssetManager::account_id()), + b_currency_id_on_a, + ALICE.into(), + 1000, + ) + })); + assert_ok!(ParaA::execute_with(|| { + parachain::Assets::mint( + parachain::Origin::signed(parachain::AssetManager::account_id()), + relay_asset_id_on_a, + ALICE.into(), + 1000, + ) + })); + + let dest = MultiLocation { + parents: 1, + interior: X2( + Parachain(2), + AccountId32 { + network: NetworkId::Any, + id: ALICE.into(), + }, + ), + }; + + let amount = 450; + let fee_amount: u128 = 200; + // Minimum xcm execution fee paid on destination chain. + // Current only support `ToReserve` with relay-chain asset as fee. other case + // like `NonReserve` or `SelfReserve` with relay-chain fee is not support. + // And our `MaxAssetsForTransfer` for xtokens is 1, + // so `transfer_multicurrencies` is not supported on calamari. + // If min-xcm-fee is not set, no one can pay xcm fee(u129::MAX). + ParaA::execute_with(|| { + assert_noop!( + parachain::XTokens::transfer_multicurrencies( + Some(ALICE).into(), + vec![ + ( + parachain::CurrencyId::MantaCurrency(b_currency_id_on_a), + amount + ), + ( + parachain::CurrencyId::MantaCurrency(relay_asset_id_on_a), + fee_amount + ) + ], + 1, + Box::new(VersionedMultiLocation::V1(dest.clone())), + 40, + ), + orml_xtokens::Error::::FeeNotEnough + ); + }); + + // set min xcm fee on ParaA + let min_xcm_fee = 40; + ParaA::execute_with(|| { + assert_ok!(AssetManager::set_min_xcm_fee( + parachain::Origin::root(), + para_b_as_reserve_chain, + min_xcm_fee, + )); + }); + + // fee is bigger than min-xcm-fee should work(39 < 40). + ParaA::execute_with(|| { + assert_noop!( + parachain::XTokens::transfer_multicurrencies( + Some(ALICE).into(), + vec![ + ( + parachain::CurrencyId::MantaCurrency(b_currency_id_on_a), + amount + ), + ( + parachain::CurrencyId::MantaCurrency(relay_asset_id_on_a), + 39 + ) + ], + 1, + Box::new(VersionedMultiLocation::V1(dest.clone())), + 40, + ), + orml_xtokens::Error::::FeeNotEnough + ); + }); + + // fee is bigger than min-xcm-fee should work + ParaA::execute_with(|| { + assert_ok!(parachain::XTokens::transfer_multicurrencies( + Some(ALICE).into(), + vec![ + ( + parachain::CurrencyId::MantaCurrency(b_currency_id_on_a), + amount + ), + ( + parachain::CurrencyId::MantaCurrency(relay_asset_id_on_a), + fee_amount + ) + ], + 1, + Box::new(VersionedMultiLocation::V1(dest.clone())), + 40, + )); + }); +} diff --git a/runtime/dolphin/Cargo.toml b/runtime/dolphin/Cargo.toml index d46f5a51c..c71e999fa 100644 --- a/runtime/dolphin/Cargo.toml +++ b/runtime/dolphin/Cargo.toml @@ -8,77 +8,77 @@ repository = 'https://github.com/Manta-Network/Manta/' version = '3.1.5' [dependencies] -codec = { package = "parity-scale-codec", version = "2.3.1", default-features = false, features = ["derive", "max-encoded-len"] } -log = { version = "0.4.14", default-features = false } -hex-literal = { version = '0.3.3', optional = true } -scale-info = { version = "1.0.0", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = '3.0.0', default-features = false, features = ["derive", "max-encoded-len"] } +log = { version = "0.4.16", default-features = false } +hex-literal = { version = '0.3.4', optional = true } +scale-info = { version = "2.0.0", default-features = false, features = ["derive"] } serde = { version = '1.0.137', features = ['derive'], optional = true } -smallvec = "1.6.1" +smallvec = "1.8.0" # Substrate primitives -sp-api = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } -sp-arithmetic = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } -sp-block-builder = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } -sp-consensus-aura = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } -sp-core = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } -sp-inherents = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } -sp-io = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } -sp-offchain = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } -sp-runtime = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } -sp-session = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } -sp-std = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } -sp-transaction-pool = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } -sp-version = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } +sp-api = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.18" } +sp-arithmetic = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.18" } +sp-block-builder = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.18" } +sp-consensus-aura = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.18" } +sp-core = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.18" } +sp-inherents = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.18" } +sp-io = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.18" } +sp-offchain = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.18" } +sp-runtime = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.18" } +sp-session = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.18" } +sp-std = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.18" } +sp-transaction-pool = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.18" } +sp-version = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.18" } # Substrate frames -frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', default-features = false, optional = true, branch = "polkadot-v0.9.16" } -frame-system-benchmarking = { git = 'https://github.com/paritytech/substrate.git', default-features = false, optional = true, branch = "polkadot-v0.9.16" } -frame-executive = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } -frame-support = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } -frame-system = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } -frame-system-rpc-runtime-api = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } -frame-try-runtime = { git = "https://github.com/paritytech/substrate.git", default-features = false, optional = true, branch = "polkadot-v0.9.16" } +frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', default-features = false, optional = true, branch = "polkadot-v0.9.18" } +frame-system-benchmarking = { git = 'https://github.com/paritytech/substrate.git', default-features = false, optional = true, branch = "polkadot-v0.9.18" } +frame-executive = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.18" } +frame-support = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.18" } +frame-system = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.18" } +frame-system-rpc-runtime-api = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.18" } +frame-try-runtime = { git = "https://github.com/paritytech/substrate.git", default-features = false, optional = true, branch = "polkadot-v0.9.18" } # Substrate pallets -pallet-assets = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } -pallet-aura = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } -pallet-authorship = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } -pallet-balances = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } -pallet-multisig = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } -pallet-session = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } -pallet-sudo = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } -pallet-timestamp = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } -pallet-transaction-payment = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } -pallet-transaction-payment-rpc-runtime-api = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } -pallet-utility = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } -pallet-collective = { git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "polkadot-v0.9.16" } -pallet-democracy = { git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "polkadot-v0.9.16" } -pallet-preimage = { git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "polkadot-v0.9.16" } -pallet-scheduler = { git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "polkadot-v0.9.16" } -pallet-membership = { git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "polkadot-v0.9.16" } -pallet-treasury = { git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "polkadot-v0.9.16" } +pallet-assets = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.18" } +pallet-aura = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.18" } +pallet-authorship = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.18" } +pallet-balances = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.18" } +pallet-multisig = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.18" } +pallet-session = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.18" } +pallet-sudo = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.18" } +pallet-timestamp = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.18" } +pallet-transaction-payment = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.18" } +pallet-transaction-payment-rpc-runtime-api = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.18" } +pallet-utility = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.18" } +pallet-collective = { git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "polkadot-v0.9.18" } +pallet-democracy = { git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "polkadot-v0.9.18" } +pallet-preimage = { git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "polkadot-v0.9.18" } +pallet-scheduler = { git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "polkadot-v0.9.18" } +pallet-membership = { git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "polkadot-v0.9.18" } +pallet-treasury = { git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "polkadot-v0.9.18" } # Cumulus dependencies -cumulus-pallet-aura-ext = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.16" } -cumulus-pallet-parachain-system = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.16" } -cumulus-primitives-core = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.16" } -cumulus-primitives-timestamp = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.16" } -cumulus-primitives-utility = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.16" } -cumulus-pallet-dmp-queue = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.16" } -cumulus-pallet-session-benchmarking = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, optional = true, branch = "polkadot-v0.9.16" } -cumulus-pallet-xcmp-queue = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.16" } -cumulus-pallet-xcm = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.16" } -parachain-info = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.16" } +cumulus-pallet-aura-ext = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.18" } +cumulus-pallet-parachain-system = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.18" } +cumulus-primitives-core = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.18" } +cumulus-primitives-timestamp = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.18" } +cumulus-primitives-utility = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.18" } +cumulus-pallet-dmp-queue = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.18" } +cumulus-pallet-session-benchmarking = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, optional = true, branch = "polkadot-v0.9.18" } +cumulus-pallet-xcmp-queue = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.18" } +cumulus-pallet-xcm = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.18" } +parachain-info = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.18" } # Polkadot dependencies -polkadot-primitives = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.16" } -polkadot-core-primitives = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.16" } -polkadot-runtime-common = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.16" } -polkadot-parachain = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.16" } -xcm = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.16" } -xcm-builder = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.16" } -xcm-executor = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.16" } -pallet-xcm = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.16" } +polkadot-primitives = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.18" } +polkadot-core-primitives = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.18" } +polkadot-runtime-common = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.18" } +polkadot-parachain = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.18" } +xcm = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.18" } +xcm-builder = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.18" } +xcm-executor = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.18" } +pallet-xcm = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.18" } # Self dependencies manta-primitives = { path = '../../primitives', default-features = false } @@ -89,13 +89,14 @@ pallet-manta-pay = { path='../../pallets/manta-pay', default-features = false } runtime-common = { path = '../common', default-features = false } # Third party (vendored) dependencies -orml-xtokens = { git = "https://github.com/manta-network/open-runtime-module-library.git", default-features = false, rev="4a66b29"} +orml-traits = { git = "https://github.com/manta-network/open-runtime-module-library.git", default-features = false, rev="7e2f985" } +orml-xtokens = { git = "https://github.com/manta-network/open-runtime-module-library.git", default-features = false, rev="7e2f985" } [package.metadata.docs.rs] targets = ['x86_64-unknown-linux-gnu'] [build-dependencies] -substrate-wasm-builder = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.16" } +substrate-wasm-builder = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.18" } [features] default = ['std'] @@ -183,6 +184,7 @@ std = [ 'xcm-executor/std', 'polkadot-runtime-common/std', 'polkadot-primitives/std', + 'orml-traits/std', 'orml-xtokens/std', 'pallet-asset-manager/std', 'manta-collator-selection/std', diff --git a/runtime/dolphin/src/lib.rs b/runtime/dolphin/src/lib.rs index 4fcd30529..7521288ba 100644 --- a/runtime/dolphin/src/lib.rs +++ b/runtime/dolphin/src/lib.rs @@ -32,7 +32,6 @@ use sp_runtime::{ ApplyExtrinsicResult, Perbill, Permill, }; -use sp_core::u32_trait::{_1, _2, _3, _4, _5}; use sp_std::{cmp::Ordering, prelude::*}; #[cfg(feature = "std")] use sp_version::NativeVersion; @@ -61,7 +60,6 @@ use runtime_common::prod_or_fast; pub use sp_runtime::BuildStorage; // Polkadot imports - use polkadot_runtime_common::{BlockHashCount, RocksDbWeight, SlowAdjustingFeeUpdate}; use xcm::latest::prelude::*; @@ -379,30 +377,30 @@ impl pallet_democracy::Config for Runtime { type MinimumDeposit = MinimumDeposit; /// A straight majority of the council can decide what their next motion is. type ExternalOrigin = - pallet_collective::EnsureProportionAtLeast<_1, _2, AccountId, CouncilCollective>; + pallet_collective::EnsureProportionAtLeast; /// A super-majority can have the next scheduled referendum be a straight majority-carries vote. type ExternalMajorityOrigin = - pallet_collective::EnsureProportionAtLeast<_3, _4, AccountId, CouncilCollective>; + pallet_collective::EnsureProportionAtLeast; /// A unanimous council can have the next scheduled referendum be a straight default-carries /// (NTB) vote. type ExternalDefaultOrigin = - pallet_collective::EnsureProportionAtLeast<_1, _1, AccountId, CouncilCollective>; + pallet_collective::EnsureProportionAtLeast; /// Two thirds of the technical committee can have an ExternalMajority/ExternalDefault vote /// be tabled immediately and with a shorter voting/enactment period. type FastTrackOrigin = - pallet_collective::EnsureProportionAtLeast<_2, _3, AccountId, TechnicalCollective>; + pallet_collective::EnsureProportionAtLeast; type InstantOrigin = - pallet_collective::EnsureProportionAtLeast<_1, _1, AccountId, TechnicalCollective>; + pallet_collective::EnsureProportionAtLeast; type InstantAllowed = InstantAllowed; type FastTrackVotingPeriod = FastTrackVotingPeriod; // To cancel a proposal which has been passed, 2/3 of the council must agree to it. type CancellationOrigin = - pallet_collective::EnsureProportionAtLeast<_2, _3, AccountId, CouncilCollective>; + pallet_collective::EnsureProportionAtLeast; // To cancel a proposal before it has been passed, the technical committee must be unanimous or // Root must agree. type CancelProposalOrigin = EnsureOneOf< EnsureRoot, - pallet_collective::EnsureProportionAtLeast<_1, _1, AccountId, TechnicalCollective>, + pallet_collective::EnsureProportionAtLeast, >; type BlacklistOrigin = EnsureRoot; // Any single technical committee member may veto a coming council proposal, however they can @@ -439,7 +437,7 @@ impl pallet_collective::Config for Runtime { pub type EnsureRootOrThreeFourthsCouncil = EnsureOneOf< EnsureRoot, - pallet_collective::EnsureProportionAtLeast<_3, _4, AccountId, CouncilCollective>, + pallet_collective::EnsureProportionAtLeast, >; type CouncilMembershipInstance = pallet_membership::Instance1; @@ -497,12 +495,12 @@ parameter_types! { type EnsureRootOrThreeFifthsCouncil = EnsureOneOf< EnsureRoot, - pallet_collective::EnsureProportionAtLeast<_3, _5, AccountId, CouncilCollective>, + pallet_collective::EnsureProportionAtLeast, >; type EnsureRootOrMoreThanHalfCouncil = EnsureOneOf< EnsureRoot, - pallet_collective::EnsureProportionMoreThan<_1, _2, AccountId, CouncilCollective>, + pallet_collective::EnsureProportionMoreThan, >; impl pallet_treasury::Config for Runtime { @@ -624,7 +622,7 @@ parameter_types! { /// We allow root and the Relay Chain council to execute privileged collator selection operations. pub type CollatorSelectionUpdateOrigin = EnsureOneOf< EnsureRoot, - pallet_collective::EnsureProportionAtLeast<_1, _1, AccountId, CouncilCollective>, + pallet_collective::EnsureProportionAtLeast, >; impl manta_collator_selection::Config for Runtime { diff --git a/runtime/dolphin/src/weights/pallet_asset_manager.rs b/runtime/dolphin/src/weights/pallet_asset_manager.rs index 6aedf5362..978a47666 100644 --- a/runtime/dolphin/src/weights/pallet_asset_manager.rs +++ b/runtime/dolphin/src/weights/pallet_asset_manager.rs @@ -48,6 +48,7 @@ pub trait WeightInfo { fn update_asset_location() -> Weight; fn update_asset_metadata() -> Weight; fn mint_asset() -> Weight; + fn set_min_xcm_fee() -> Weight; } /// Weights for pallet_asset_manager using the Substrate node and recommended hardware. @@ -95,6 +96,13 @@ impl pallet_asset_manager::WeightInfo for SubstrateWeig .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } + // Storage: AssetManager AssetIdLocation (r:1 w:0) + // Storage: AssetManager MinXcmFee (r:0 w:1) + fn set_min_xcm_fee() -> Weight { + (31_000_000 as Weight) + .saturating_add(RocksDbWeight::get().reads(1 as Weight)) + .saturating_add(RocksDbWeight::get().writes(1 as Weight)) + } } // For backwards compatibility and tests @@ -141,4 +149,11 @@ impl WeightInfo for () { .saturating_add(RocksDbWeight::get().reads(3 as Weight)) .saturating_add(RocksDbWeight::get().writes(2 as Weight)) } + // Storage: AssetManager AssetIdLocation (r:1 w:0) + // Storage: AssetManager MinXcmFee (r:0 w:1) + fn set_min_xcm_fee() -> Weight { + (31_000_000 as Weight) + .saturating_add(RocksDbWeight::get().reads(1 as Weight)) + .saturating_add(RocksDbWeight::get().writes(1 as Weight)) + } } diff --git a/runtime/dolphin/src/xcm_config.rs b/runtime/dolphin/src/xcm_config.rs index be92aa67d..4db7eb4e1 100644 --- a/runtime/dolphin/src/xcm_config.rs +++ b/runtime/dolphin/src/xcm_config.rs @@ -15,8 +15,9 @@ // along with Manta. If not, see . use super::{ - AssetManager, Assets, Balances, Call, DmpQueue, Event, Origin, ParachainInfo, ParachainSystem, - PolkadotXcm, Runtime, Treasury, XcmpQueue, MAXIMUM_BLOCK_WEIGHT, + AssetManager, Assets, Balances, Call, DmpQueue, EnsureRootOrMoreThanHalfCouncil, Event, Origin, + ParachainInfo, ParachainSystem, PolkadotXcm, Runtime, Treasury, XcmpQueue, + MAXIMUM_BLOCK_WEIGHT, }; use codec::{Decode, Encode}; @@ -48,7 +49,7 @@ use xcm_builder::{ AccountId32Aliases, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom, ConvertedConcreteAssetId, CurrencyAdapter as XcmCurrencyAdapter, EnsureXcmOrigin, FixedRateOfFungible, FixedWeightBounds, - FungiblesAdapter, LocationInverter, ParentAsSuperuser, ParentIsDefault, RelayChainAsNative, + FungiblesAdapter, LocationInverter, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SovereignSignedViaLocation, TakeWeightCredit, }; @@ -80,6 +81,7 @@ parameter_types! { pub RelayChainOrigin: Origin = cumulus_pallet_xcm::Origin::Relay.into(); pub Ancestry: MultiLocation = Parachain(ParachainInfo::parachain_id().into()).into(); pub SelfReserve: MultiLocation = MultiLocation::new(1, X1(Parachain(ParachainInfo::parachain_id().into()))); + pub CheckingAccount: AccountId = PolkadotXcm::check_account(); } /// Type for specifying how a `MultiLocation` can be converted into an `AccountId`. This is used @@ -87,7 +89,7 @@ parameter_types! { /// `Transact` in order to determine the dispatch Origin. pub type LocationToAccountId = ( // The parent (Relay-chain) origin converts to the default `AccountId`. - ParentIsDefault, + ParentIsPreset, // Sibling parachain origins convert to AccountId via the `ParaId::into`. SiblingParachainConvertsVia, // Straight up local `AccountId32` origins just alias directly to `AccountId`. @@ -158,7 +160,7 @@ pub type FungiblesTransactor = FungiblesAdapter< // No teleport support. Nothing, // No teleport tracking. - (), + CheckingAccount, >; match_type! { @@ -282,6 +284,9 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime { type ChannelInfo = ParachainSystem; type VersionWrapper = PolkadotXcm; type ExecuteOverweightOrigin = EnsureRoot; + type ControllerOrigin = EnsureRootOrMoreThanHalfCouncil; + type ControllerOriginConverter = XcmOriginToCallOrigin; + type WeightInfo = (); } impl cumulus_pallet_dmp_queue::Config for Runtime { @@ -334,4 +339,7 @@ impl orml_xtokens::Config for Runtime { type BaseXcmWeight = BaseXcmWeight; type LocationInverter = LocationInverter; type MaxAssetsForTransfer = MaxAssetsForTransfer; + type MinXcmFee = AssetManager; + type MultiLocationsFilter = AssetManager; + type ReserveProvider = orml_traits::location::AbsoluteReserveProvider; } diff --git a/runtime/manta/Cargo.toml b/runtime/manta/Cargo.toml index 4a377d905..12577e9d9 100644 --- a/runtime/manta/Cargo.toml +++ b/runtime/manta/Cargo.toml @@ -8,70 +8,70 @@ repository = 'https://github.com/Manta-Network/Manta/' version = '3.1.5' [dependencies] -smallvec = "1.6.1" -codec = { package = "parity-scale-codec", version = "2.3.1", default-features = false, features = ["derive", "max-encoded-len"] } -hex-literal = { version = '0.3.3', optional = true } -scale-info = { version = "1.0.0", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = '3.0.0', default-features = false, features = ["derive", "max-encoded-len"] } +hex-literal = { version = '0.3.4', optional = true } +scale-info = { version = "2.0.0", default-features = false, features = ["derive"] } serde = { version = '1.0.137', features = ['derive'], optional = true } +smallvec = "1.8.0" # Substrate primitives -sp-api = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } -sp-block-builder = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } -sp-consensus-aura = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } -sp-core = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } -sp-inherents = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } -sp-io = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } -sp-offchain = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } -sp-runtime = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } -sp-session = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } -sp-std = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } -sp-transaction-pool = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } -sp-version = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } +sp-api = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.18" } +sp-block-builder = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.18" } +sp-consensus-aura = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.18" } +sp-core = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.18" } +sp-inherents = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.18" } +sp-io = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.18" } +sp-offchain = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.18" } +sp-runtime = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.18" } +sp-session = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.18" } +sp-std = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.18" } +sp-transaction-pool = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.18" } +sp-version = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.18" } # Substrate frames -frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', default-features = false, optional = true, branch = "polkadot-v0.9.16" } -frame-system-benchmarking = { git = 'https://github.com/paritytech/substrate.git', default-features = false, optional = true, branch = "polkadot-v0.9.16" } -frame-executive = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } -frame-support = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } -frame-system = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } -frame-system-rpc-runtime-api = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } -frame-try-runtime = { git = "https://github.com/paritytech/substrate.git", default-features = false, optional = true, branch = "polkadot-v0.9.16" } +frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', default-features = false, optional = true, branch = "polkadot-v0.9.18" } +frame-system-benchmarking = { git = 'https://github.com/paritytech/substrate.git', default-features = false, optional = true, branch = "polkadot-v0.9.18" } +frame-executive = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.18" } +frame-support = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.18" } +frame-system = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.18" } +frame-system-rpc-runtime-api = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.18" } +frame-try-runtime = { git = "https://github.com/paritytech/substrate.git", default-features = false, optional = true, branch = "polkadot-v0.9.18" } # Substrate pallets -pallet-aura = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } -pallet-authorship = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } -pallet-balances = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } -pallet-multisig = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } -pallet-preimage = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } -pallet-scheduler = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.16" } -pallet-session = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } -pallet-sudo = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } -pallet-timestamp = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } -pallet-transaction-payment = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } -pallet-transaction-payment-rpc-runtime-api = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } -pallet-utility = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.16" } +pallet-aura = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.18" } +pallet-authorship = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.18" } +pallet-balances = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.18" } +pallet-multisig = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.18" } +pallet-preimage = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.18" } +pallet-scheduler = { git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "polkadot-v0.9.18" } +pallet-session = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.18" } +pallet-sudo = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.18" } +pallet-timestamp = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.18" } +pallet-transaction-payment = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.18" } +pallet-transaction-payment-rpc-runtime-api = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.18" } +pallet-utility = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.18" } # Cumulus dependencies -cumulus-pallet-aura-ext = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.16" } -cumulus-pallet-parachain-system = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.16" } -cumulus-primitives-core = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.16" } -cumulus-primitives-timestamp = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.16" } -cumulus-primitives-utility = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.16" } -cumulus-pallet-dmp-queue = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.16" } -cumulus-pallet-session-benchmarking = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, optional = true, branch = "polkadot-v0.9.16" } -cumulus-pallet-xcmp-queue = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.16" } -cumulus-pallet-xcm = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.16" } -pallet-collator-selection = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.16" } -parachain-info = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.16" } +cumulus-pallet-aura-ext = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.18" } +cumulus-pallet-parachain-system = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.18" } +cumulus-primitives-core = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.18" } +cumulus-primitives-timestamp = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.18" } +cumulus-primitives-utility = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.18" } +cumulus-pallet-dmp-queue = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.18" } +cumulus-pallet-session-benchmarking = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, optional = true, branch = "polkadot-v0.9.18" } +cumulus-pallet-xcmp-queue = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.18" } +cumulus-pallet-xcm = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.18" } +pallet-collator-selection = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.18" } +parachain-info = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.18" } # Polkadot dependencies -polkadot-primitives = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.16" } -polkadot-runtime-common = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.16" } -polkadot-parachain = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.16" } -xcm = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.16" } -xcm-builder = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.16" } -xcm-executor = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.16" } -pallet-xcm = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.16" } +polkadot-primitives = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.18" } +polkadot-runtime-common = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.18" } +polkadot-parachain = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.18" } +xcm = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.18" } +xcm-builder = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.18" } +xcm-executor = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.18" } +pallet-xcm = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.18" } # Self dependencies manta-primitives = { path = '../../primitives', default-features = false } @@ -82,7 +82,7 @@ runtime-common = { path = '../common', default-features = false } targets = ['x86_64-unknown-linux-gnu'] [build-dependencies] -substrate-wasm-builder = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.16" } +substrate-wasm-builder = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.18" } [features] default = ['std'] @@ -90,7 +90,6 @@ try-runtime = [ 'frame-executive/try-runtime', 'frame-try-runtime', ] - runtime-benchmarks = [ 'cumulus-pallet-session-benchmarking/runtime-benchmarks', 'hex-literal', @@ -112,7 +111,6 @@ runtime-benchmarks = [ ] # Set timing constants (e.g. session period) to faster versions to speed up testing. fast-runtime = [] - std = [ 'codec/std', 'serde', diff --git a/runtime/manta/src/lib.rs b/runtime/manta/src/lib.rs index 3fc19f2f1..c93eda131 100644 --- a/runtime/manta/src/lib.rs +++ b/runtime/manta/src/lib.rs @@ -69,7 +69,7 @@ use xcm_builder::{ AccountId32Aliases, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom, CurrencyAdapter, EnsureXcmOrigin, FixedWeightBounds, IsConcrete, LocationInverter, NativeAsset, ParentAsSuperuser, - ParentIsDefault, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, + ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SovereignSignedViaLocation, TakeWeightCredit, UsingComponents, }; use xcm_executor::{Config, XcmExecutor}; @@ -377,7 +377,7 @@ parameter_types! { /// `Transact` in order to determine the dispatch Origin. pub type LocationToAccountId = ( // The parent (Relay-chain) origin converts to the default `AccountId`. - ParentIsDefault, + ParentIsPreset, // Sibling parachain origins convert to AccountId via the `ParaId::into`. SiblingParachainConvertsVia, // Straight up local `AccountId32` origins just alias directly to `AccountId`. @@ -516,6 +516,9 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime { type ChannelInfo = ParachainSystem; type VersionWrapper = PolkadotXcm; type ExecuteOverweightOrigin = EnsureRoot; + type ControllerOrigin = CollatorSelectionUpdateOrigin; + type ControllerOriginConverter = XcmOriginToTransactDispatchOrigin; + type WeightInfo = (); } impl cumulus_pallet_dmp_queue::Config for Runtime {