diff --git a/.github/workflows/release-02_create-draft.yml b/.github/workflows/release-02_create-draft.yml index e81d46798fe..8f795f609e8 100644 --- a/.github/workflows/release-02_create-draft.yml +++ b/.github/workflows/release-02_create-draft.yml @@ -184,7 +184,7 @@ jobs: with: name: release-notes-context path: | - context.json + cumulus/scripts/ci/changelog/context.json - name: Create draft release id: create-release diff --git a/.gitignore b/.gitignore index 24eaf986813..58abcc32cc5 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ polkadot_argument_parsing *.iml .env bin +**/._* diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4d70121703a..1476f03a8e5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -276,7 +276,7 @@ benchmarks-build: <<: *benchmarks-manual-refs script: - time cargo build --profile production --locked --features runtime-benchmarks - - mkdir artifacts + - mkdir -p artifacts - cp target/production/polkadot-parachain ./artifacts/ benchmarks: diff --git a/Cargo.lock b/Cargo.lock index 46446b56b0f..cf8b5c802ba 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -165,6 +165,25 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b34d609dfbaf33d6889b2b7106d3ca345eacad44200913df5ba02bfd31d2ba9" +[[package]] +name = "asset-test-utils" +version = "1.0.0" +dependencies = [ + "frame-support", + "frame-system", + "hex-literal", + "pallet-balances", + "pallet-collator-selection", + "pallet-session", + "parachains-common", + "sp-consensus-aura", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", + "substrate-wasm-builder", +] + [[package]] name = "async-attributes" version = "1.1.2" @@ -293,7 +312,7 @@ dependencies = [ "memchr", "num_cpus", "once_cell", - "pin-project-lite 0.2.7", + "pin-project-lite 0.2.9", "pin-utils", "slab", "wasm-bindgen-futures", @@ -322,9 +341,9 @@ checksum = "e91831deabf0d6d7ec49552e489aed63b7456a7a3c46cff62adad428110b0af0" [[package]] name = "async-trait" -version = "0.1.56" +version = "0.1.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96cf8829f67d2eab0b2dfa42c5d0ef737e0724e4a82b01b3e292456202b19716" +checksum = "76464446b8bc32758d7e88ee1a804d9914cd9b1cb264c029899680b0be29826f" dependencies = [ "proc-macro2", "quote", @@ -341,7 +360,7 @@ dependencies = [ "futures-sink", "futures-util", "memchr", - "pin-project-lite 0.2.7", + "pin-project-lite 0.2.9", ] [[package]] @@ -376,7 +395,7 @@ dependencies = [ "futures-core", "getrandom 0.2.3", "instant", - "pin-project-lite 0.2.7", + "pin-project-lite 0.2.9", "rand 0.8.5", "tokio", ] @@ -432,7 +451,7 @@ dependencies = [ [[package]] name = "beefy-gadget" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "async-trait", "beefy-primitives", @@ -468,7 +487,7 @@ dependencies = [ [[package]] name = "beefy-gadget-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "beefy-gadget", "beefy-primitives", @@ -488,7 +507,7 @@ dependencies = [ [[package]] name = "beefy-merkle-tree" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "beefy-primitives", "sp-api", @@ -497,7 +516,7 @@ dependencies = [ [[package]] name = "beefy-primitives" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "parity-scale-codec", "scale-info", @@ -737,9 +756,9 @@ checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" [[package]] name = "bytes" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0b3de4a0c5e67e16066a0715723abd91edc2f9001d09c46e1dca929351e130e" +checksum = "ec8a7b6a70fde80372154c65702f00a0f56f3e1c36abbc6c440484be248856db" [[package]] name = "bzip2-sys" @@ -933,9 +952,9 @@ dependencies = [ [[package]] name = "clap" -version = "3.2.15" +version = "3.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44bbe24bbd31a185bc2c4f7c2abe80bea13a20d57ee4e55be70ac512bdc76417" +checksum = "a3dbbb6653e7c55cc8595ad3e1f7be8f32aba4eb7ff7f0fd1163d4f3d137c0a9" dependencies = [ "atty", "bitflags", @@ -1140,18 +1159,18 @@ dependencies = [ [[package]] name = "cranelift-bforest" -version = "0.85.1" +version = "0.85.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7901fbba05decc537080b07cb3f1cadf53be7b7602ca8255786288a8692ae29a" +checksum = "749d0d6022c9038dccf480bdde2a38d435937335bf2bb0f14e815d94517cdce8" dependencies = [ "cranelift-entity", ] [[package]] name = "cranelift-codegen" -version = "0.85.1" +version = "0.85.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37ba1b45d243a4a28e12d26cd5f2507da74e77c45927d40de8b6ffbf088b46b5" +checksum = "e94370cc7b37bf652ccd8bb8f09bd900997f7ccf97520edfc75554bb5c4abbea" dependencies = [ "cranelift-bforest", "cranelift-codegen-meta", @@ -1167,24 +1186,24 @@ dependencies = [ [[package]] name = "cranelift-codegen-meta" -version = "0.85.1" +version = "0.85.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54cc30032171bf230ce22b99c07c3a1de1221cb5375bd6dbe6dbe77d0eed743c" +checksum = "e0a3cea8fdab90e44018c5b9a1dfd460d8ee265ac354337150222a354628bdb6" dependencies = [ "cranelift-codegen-shared", ] [[package]] name = "cranelift-codegen-shared" -version = "0.85.1" +version = "0.85.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a23f2672426d2bb4c9c3ef53e023076cfc4d8922f0eeaebaf372c92fae8b5c69" +checksum = "5ac72f76f2698598951ab26d8c96eaa854810e693e7dd52523958b5909fde6b2" [[package]] name = "cranelift-entity" -version = "0.85.1" +version = "0.85.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "886c59a5e0de1f06dbb7da80db149c75de10d5e2caca07cdd9fef8a5918a6336" +checksum = "09eaeacfcd2356fe0e66b295e8f9d59fdd1ac3ace53ba50de14d628ec902f72d" dependencies = [ "serde", ] @@ -1203,9 +1222,9 @@ dependencies = [ [[package]] name = "cranelift-isle" -version = "0.85.1" +version = "0.85.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db1ae52a5cc2cad0d86fdd3dcb16b7217d2f1e65ab4f5814aa4f014ad335fa43" +checksum = "d2920dc1e05cac40304456ed3301fde2c09bd6a9b0210bcfa2f101398d628d5b" [[package]] name = "cranelift-native" @@ -1439,7 +1458,7 @@ dependencies = [ name = "cumulus-client-cli" version = "0.1.0" dependencies = [ - "clap 3.2.15", + "clap 3.2.16", "parity-scale-codec", "sc-chain-spec", "sc-cli", @@ -1872,6 +1891,7 @@ version = "0.1.0" dependencies = [ "cumulus-primitives-core", "frame-support", + "log", "parity-scale-codec", "polkadot-core-primitives", "polkadot-parachain 0.9.27", @@ -1880,6 +1900,8 @@ dependencies = [ "sp-std", "sp-trie", "xcm", + "xcm-builder", + "xcm-executor", ] [[package]] @@ -1957,6 +1979,7 @@ dependencies = [ "sp-runtime", "sp-state-machine", "sp-storage", + "tokio", "tracing", "url", ] @@ -2049,7 +2072,7 @@ name = "cumulus-test-service" version = "0.1.0" dependencies = [ "async-trait", - "clap 3.2.15", + "clap 3.2.16", "criterion", "cumulus-client-cli", "cumulus-client-consensus-common", @@ -2333,9 +2356,9 @@ dependencies = [ [[package]] name = "dyn-clone" -version = "1.0.8" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d07a982d1fb29db01e5a59b1918e03da4df7297eaeee7686ac45542fd4e59c8" +checksum = "4f94fa09c2aeea5b8839e414b7b841bf429fd25b9c522116ac97ee87856d88b2" [[package]] name = "ecdsa" @@ -2675,7 +2698,7 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "fork-tree" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "parity-scale-codec", ] @@ -2693,7 +2716,7 @@ dependencies = [ [[package]] name = "frame-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "frame-support", "frame-system", @@ -2715,11 +2738,11 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "Inflector", "chrono", - "clap 3.2.15", + "clap 3.2.16", "comfy-table", "frame-benchmarking", "frame-support", @@ -2766,7 +2789,7 @@ dependencies = [ [[package]] name = "frame-election-provider-solution-type" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -2777,7 +2800,7 @@ dependencies = [ [[package]] name = "frame-election-provider-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "frame-election-provider-solution-type", "frame-support", @@ -2793,7 +2816,7 @@ dependencies = [ [[package]] name = "frame-executive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "frame-support", "frame-system", @@ -2821,7 +2844,7 @@ dependencies = [ [[package]] name = "frame-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "bitflags", "frame-metadata", @@ -2851,7 +2874,7 @@ dependencies = [ [[package]] name = "frame-support-procedural" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "Inflector", "frame-support-procedural-tools", @@ -2863,7 +2886,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate", @@ -2875,7 +2898,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "proc-macro2", "quote", @@ -2885,7 +2908,7 @@ dependencies = [ [[package]] name = "frame-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "frame-support", "log", @@ -2902,7 +2925,7 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "frame-benchmarking", "frame-support", @@ -2917,7 +2940,7 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "parity-scale-codec", "sp-api", @@ -2926,7 +2949,7 @@ dependencies = [ [[package]] name = "frame-try-runtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "frame-support", "sp-api", @@ -3034,7 +3057,7 @@ dependencies = [ "futures-io", "memchr", "parking", - "pin-project-lite 0.2.7", + "pin-project-lite 0.2.9", "waker-fn", ] @@ -3091,7 +3114,7 @@ dependencies = [ "futures-sink", "futures-task", "memchr", - "pin-project-lite 0.2.7", + "pin-project-lite 0.2.9", "pin-utils", "slab", ] @@ -3371,13 +3394,13 @@ dependencies = [ [[package]] name = "http" -version = "0.2.5" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1323096b05d41827dadeaee54c9981958c0f94e670bc94ed80037d1a7b8b186b" +checksum = "75f43d41e26995c17e71ee126451dd3941010b0514a81a9d11f3b341debc2399" dependencies = [ "bytes", "fnv", - "itoa 0.4.8", + "itoa 1.0.1", ] [[package]] @@ -3388,7 +3411,7 @@ checksum = "1ff4f84919677303da5f147645dbea6b1881f368d03ac84e1dc09031ebd7b2c6" dependencies = [ "bytes", "http", - "pin-project-lite 0.2.7", + "pin-project-lite 0.2.9", ] [[package]] @@ -3434,7 +3457,7 @@ dependencies = [ "httparse", "httpdate", "itoa 0.4.8", - "pin-project-lite 0.2.7", + "pin-project-lite 0.2.9", "socket2", "tokio", "tower-service", @@ -3637,9 +3660,9 @@ dependencies = [ [[package]] name = "jsonrpsee" -version = "0.14.0" +version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11e017217fcd18da0a25296d3693153dd19c8a6aadab330b3595285d075385d1" +checksum = "8bd0d559d5e679b1ab2f869b486a11182923863b1b3ee8b421763cdd707b783a" dependencies = [ "jsonrpsee-core", "jsonrpsee-http-server", @@ -3652,9 +3675,9 @@ dependencies = [ [[package]] name = "jsonrpsee-client-transport" -version = "0.14.0" +version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce395539a14d3ad4ec1256fde105abd36a2da25d578a291cabe98f45adfdb111" +checksum = "8752740ecd374bcbf8b69f3e80b0327942df76f793f8d4e60d3355650c31fb74" dependencies = [ "futures-util", "http", @@ -3673,9 +3696,9 @@ dependencies = [ [[package]] name = "jsonrpsee-core" -version = "0.14.0" +version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16efcd4477de857d4a2195a45769b2fe9ebb54f3ef5a4221d3b014a4fe33ec0b" +checksum = "f3dc3e9cf2ba50b7b1d7d76a667619f82846caa39e8e8daa8a4962d74acaddca" dependencies = [ "anyhow", "arrayvec 0.7.2", @@ -3686,6 +3709,7 @@ dependencies = [ "futures-timer", "futures-util", "globset", + "http", "hyper", "jsonrpsee-types", "lazy_static", @@ -3698,14 +3722,15 @@ dependencies = [ "thiserror", "tokio", "tracing", + "tracing-futures", "unicase", ] [[package]] name = "jsonrpsee-http-server" -version = "0.14.0" +version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdd69efeb3ce2cba767f126872f4eeb4624038a29098e75d77608b2b4345ad03" +checksum = "03802f0373a38c2420c70b5144742d800b509e2937edc4afb116434f07120117" dependencies = [ "futures-channel", "futures-util", @@ -3716,13 +3741,14 @@ dependencies = [ "serde_json", "tokio", "tracing", + "tracing-futures", ] [[package]] name = "jsonrpsee-proc-macros" -version = "0.14.0" +version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "874cf3f6a027cebf36cae767feca9aa2e8a8f799880e49eb5540819fcbd8eada" +checksum = "bd67957d4280217247588ac86614ead007b301ca2fa9f19c19f880a536f029e3" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -3732,9 +3758,9 @@ dependencies = [ [[package]] name = "jsonrpsee-types" -version = "0.14.0" +version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3bcf76cd316f5d3ad48138085af1f45e2c58c98e02f0779783dbb034d43f7c86" +checksum = "e290bba767401b646812f608c099b922d8142603c9e73a50fb192d3ac86f4a0d" dependencies = [ "anyhow", "beef", @@ -3746,10 +3772,11 @@ dependencies = [ [[package]] name = "jsonrpsee-ws-client" -version = "0.14.0" +version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee043cb5dd0d51d3eb93432e998d5bae797691a7b10ec4a325e036bcdb48c48a" +checksum = "6ee5feddd5188e62ac08fcf0e56478138e581509d4730f3f7be9b57dd402a4ff" dependencies = [ + "http", "jsonrpsee-client-transport", "jsonrpsee-core", "jsonrpsee-types", @@ -3757,12 +3784,13 @@ dependencies = [ [[package]] name = "jsonrpsee-ws-server" -version = "0.14.0" +version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bd2e4d266774a671f8def3794255b28eddd09b18d76e0b913fa439f34588c0a" +checksum = "d488ba74fb369e5ab68926feb75a483458b88e768d44319f37e4ecad283c7325" dependencies = [ "futures-channel", "futures-util", + "http", "jsonrpsee-core", "jsonrpsee-types", "serde_json", @@ -3771,6 +3799,7 @@ dependencies = [ "tokio-stream", "tokio-util 0.7.1", "tracing", + "tracing-futures", ] [[package]] @@ -3794,7 +3823,7 @@ checksum = "67c21572b4949434e4fc1e1978b99c5f77064153c59d998bf13ecd96fb5ecba7" [[package]] name = "kusama-runtime" version = "0.9.27" -source = "git+https://github.com/paritytech/polkadot?branch=master#e7461a6bd020250fed010ba56b78b854ad463064" +source = "git+https://github.com/paritytech/polkadot?branch=master#b4d48428d676b614203d2d1deb6bc6b58f93559b" dependencies = [ "beefy-primitives", "bitvec", @@ -3887,7 +3916,7 @@ dependencies = [ [[package]] name = "kusama-runtime-constants" version = "0.9.27" -source = "git+https://github.com/paritytech/polkadot?branch=master#e7461a6bd020250fed010ba56b78b854ad463064" +source = "git+https://github.com/paritytech/polkadot?branch=master#b4d48428d676b614203d2d1deb6bc6b58f93559b" dependencies = [ "frame-support", "polkadot-primitives", @@ -5172,9 +5201,9 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290" +checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" dependencies = [ "autocfg", "libm", @@ -5213,9 +5242,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.12.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7709cef83f0c1f58f666e746a08b21e0085f7440fa6a29cc194d68aac97a4225" +checksum = "18a6dbe30758c9f83eb00cbea4ac95966305f5a7772f3f42ebfc7fc7eddbd8e1" [[package]] name = "oorandom" @@ -5244,7 +5273,7 @@ checksum = "28988d872ab76095a6e6ac88d99b54fd267702734fd7ffe610ca27f533ddb95a" [[package]] name = "orchestra" version = "0.0.1" -source = "git+https://github.com/paritytech/polkadot?branch=master#e7461a6bd020250fed010ba56b78b854ad463064" +source = "git+https://github.com/paritytech/polkadot?branch=master#b4d48428d676b614203d2d1deb6bc6b58f93559b" dependencies = [ "async-trait", "dyn-clonable", @@ -5260,7 +5289,7 @@ dependencies = [ [[package]] name = "orchestra-proc-macro" version = "0.0.1" -source = "git+https://github.com/paritytech/polkadot?branch=master#e7461a6bd020250fed010ba56b78b854ad463064" +source = "git+https://github.com/paritytech/polkadot?branch=master#b4d48428d676b614203d2d1deb6bc6b58f93559b" dependencies = [ "expander 0.0.6", "itertools", @@ -5298,7 +5327,7 @@ dependencies = [ [[package]] name = "pallet-asset-tx-payment" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "frame-support", "frame-system", @@ -5315,7 +5344,7 @@ dependencies = [ [[package]] name = "pallet-assets" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "frame-benchmarking", "frame-support", @@ -5329,7 +5358,7 @@ dependencies = [ [[package]] name = "pallet-aura" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "frame-support", "frame-system", @@ -5345,7 +5374,7 @@ dependencies = [ [[package]] name = "pallet-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "frame-support", "frame-system", @@ -5361,7 +5390,7 @@ dependencies = [ [[package]] name = "pallet-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "frame-support", "frame-system", @@ -5376,7 +5405,7 @@ dependencies = [ [[package]] name = "pallet-babe" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "frame-benchmarking", "frame-support", @@ -5400,7 +5429,7 @@ dependencies = [ [[package]] name = "pallet-bags-list" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5420,7 +5449,7 @@ dependencies = [ [[package]] name = "pallet-balances" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "frame-benchmarking", "frame-support", @@ -5435,7 +5464,7 @@ dependencies = [ [[package]] name = "pallet-beefy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "beefy-primitives", "frame-support", @@ -5451,7 +5480,7 @@ dependencies = [ [[package]] name = "pallet-beefy-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "beefy-merkle-tree", "beefy-primitives", @@ -5474,7 +5503,7 @@ dependencies = [ [[package]] name = "pallet-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "frame-benchmarking", "frame-support", @@ -5492,7 +5521,7 @@ dependencies = [ [[package]] name = "pallet-child-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "frame-benchmarking", "frame-support", @@ -5537,7 +5566,7 @@ dependencies = [ [[package]] name = "pallet-collective" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "frame-benchmarking", "frame-support", @@ -5554,7 +5583,7 @@ dependencies = [ [[package]] name = "pallet-contracts" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "bitflags", "frame-benchmarking", @@ -5582,7 +5611,7 @@ dependencies = [ [[package]] name = "pallet-contracts-primitives" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "bitflags", "parity-scale-codec", @@ -5597,7 +5626,7 @@ dependencies = [ [[package]] name = "pallet-contracts-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "proc-macro2", "quote", @@ -5607,7 +5636,7 @@ dependencies = [ [[package]] name = "pallet-contracts-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "jsonrpsee", "pallet-contracts-primitives", @@ -5624,7 +5653,7 @@ dependencies = [ [[package]] name = "pallet-contracts-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "pallet-contracts-primitives", "parity-scale-codec", @@ -5637,7 +5666,7 @@ dependencies = [ [[package]] name = "pallet-democracy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "frame-benchmarking", "frame-support", @@ -5653,7 +5682,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-multi-phase" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5676,7 +5705,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-support-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5689,7 +5718,7 @@ dependencies = [ [[package]] name = "pallet-elections-phragmen" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "frame-benchmarking", "frame-support", @@ -5707,7 +5736,7 @@ dependencies = [ [[package]] name = "pallet-gilt" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "frame-benchmarking", "frame-support", @@ -5722,7 +5751,7 @@ dependencies = [ [[package]] name = "pallet-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "frame-benchmarking", "frame-support", @@ -5745,7 +5774,7 @@ dependencies = [ [[package]] name = "pallet-identity" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "enumflags2", "frame-benchmarking", @@ -5761,7 +5790,7 @@ dependencies = [ [[package]] name = "pallet-im-online" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "frame-benchmarking", "frame-support", @@ -5781,7 +5810,7 @@ dependencies = [ [[package]] name = "pallet-indices" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "frame-benchmarking", "frame-support", @@ -5798,7 +5827,7 @@ dependencies = [ [[package]] name = "pallet-membership" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "frame-benchmarking", "frame-support", @@ -5815,7 +5844,7 @@ dependencies = [ [[package]] name = "pallet-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "ckb-merkle-mountain-range", "frame-benchmarking", @@ -5833,7 +5862,7 @@ dependencies = [ [[package]] name = "pallet-mmr-rpc" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -5848,7 +5877,7 @@ dependencies = [ [[package]] name = "pallet-multisig" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "frame-benchmarking", "frame-support", @@ -5863,7 +5892,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "frame-support", "frame-system", @@ -5880,7 +5909,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-benchmarking" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5899,7 +5928,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-runtime-api" version = "1.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "parity-scale-codec", "sp-api", @@ -5909,7 +5938,7 @@ dependencies = [ [[package]] name = "pallet-offences" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "frame-support", "frame-system", @@ -5926,7 +5955,7 @@ dependencies = [ [[package]] name = "pallet-offences-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5949,7 +5978,7 @@ dependencies = [ [[package]] name = "pallet-preimage" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "frame-benchmarking", "frame-support", @@ -5965,7 +5994,7 @@ dependencies = [ [[package]] name = "pallet-proxy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "frame-benchmarking", "frame-support", @@ -5980,7 +6009,7 @@ dependencies = [ [[package]] name = "pallet-randomness-collective-flip" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "frame-support", "frame-system", @@ -5994,7 +6023,7 @@ dependencies = [ [[package]] name = "pallet-recovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "frame-benchmarking", "frame-support", @@ -6009,7 +6038,7 @@ dependencies = [ [[package]] name = "pallet-scheduler" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "frame-benchmarking", "frame-support", @@ -6025,7 +6054,7 @@ dependencies = [ [[package]] name = "pallet-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "frame-support", "frame-system", @@ -6046,7 +6075,7 @@ dependencies = [ [[package]] name = "pallet-session-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "frame-benchmarking", "frame-support", @@ -6062,7 +6091,7 @@ dependencies = [ [[package]] name = "pallet-society" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "frame-support", "frame-system", @@ -6076,7 +6105,7 @@ dependencies = [ [[package]] name = "pallet-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6099,7 +6128,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-curve" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -6110,7 +6139,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-fn" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "log", "sp-arithmetic", @@ -6119,7 +6148,7 @@ dependencies = [ [[package]] name = "pallet-sudo" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "frame-support", "frame-system", @@ -6148,7 +6177,7 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "frame-benchmarking", "frame-support", @@ -6166,7 +6195,7 @@ dependencies = [ [[package]] name = "pallet-tips" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "frame-benchmarking", "frame-support", @@ -6185,7 +6214,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "frame-support", "frame-system", @@ -6201,7 +6230,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "jsonrpsee", "pallet-transaction-payment-rpc-runtime-api", @@ -6216,7 +6245,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -6227,7 +6256,7 @@ dependencies = [ [[package]] name = "pallet-treasury" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "frame-benchmarking", "frame-support", @@ -6244,7 +6273,7 @@ dependencies = [ [[package]] name = "pallet-uniques" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "frame-benchmarking", "frame-support", @@ -6259,7 +6288,7 @@ dependencies = [ [[package]] name = "pallet-utility" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "frame-benchmarking", "frame-support", @@ -6275,7 +6304,7 @@ dependencies = [ [[package]] name = "pallet-vesting" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "frame-benchmarking", "frame-support", @@ -6290,7 +6319,7 @@ dependencies = [ [[package]] name = "pallet-xcm" version = "0.9.27" -source = "git+https://github.com/paritytech/polkadot?branch=master#e7461a6bd020250fed010ba56b78b854ad463064" +source = "git+https://github.com/paritytech/polkadot?branch=master#b4d48428d676b614203d2d1deb6bc6b58f93559b" dependencies = [ "frame-support", "frame-system", @@ -6308,7 +6337,7 @@ dependencies = [ [[package]] name = "pallet-xcm-benchmarks" version = "0.9.27" -source = "git+https://github.com/paritytech/polkadot?branch=master#e7461a6bd020250fed010ba56b78b854ad463064" +source = "git+https://github.com/paritytech/polkadot?branch=master#b4d48428d676b614203d2d1deb6bc6b58f93559b" dependencies = [ "frame-benchmarking", "frame-support", @@ -6338,7 +6367,7 @@ dependencies = [ name = "parachain-template-node" version = "0.1.0" dependencies = [ - "clap 3.2.15", + "clap 3.2.16", "cumulus-client-cli", "cumulus-client-collator", "cumulus-client-consensus-aura", @@ -6463,6 +6492,7 @@ dependencies = [ name = "parachains-common" version = "1.0.0" dependencies = [ + "cumulus-primitives-utility", "frame-executive", "frame-support", "frame-system", @@ -6482,6 +6512,7 @@ dependencies = [ "sp-std", "substrate-wasm-builder", "xcm", + "xcm-builder", "xcm-executor", ] @@ -6810,9 +6841,9 @@ checksum = "257b64915a082f7811703966789728173279bdebb956b143dbcd23f6f970a777" [[package]] name = "pin-project-lite" -version = "0.2.7" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d31d11c69a6b52a174b42bdc0c30e5e11670f90788b2c471c31c1d17d449443" +checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" [[package]] name = "pin-utils" @@ -6863,7 +6894,7 @@ dependencies = [ [[package]] name = "polkadot-approval-distribution" version = "0.9.27" -source = "git+https://github.com/paritytech/polkadot?branch=master#e7461a6bd020250fed010ba56b78b854ad463064" +source = "git+https://github.com/paritytech/polkadot?branch=master#b4d48428d676b614203d2d1deb6bc6b58f93559b" dependencies = [ "futures", "polkadot-node-network-protocol", @@ -6878,7 +6909,7 @@ dependencies = [ [[package]] name = "polkadot-availability-bitfield-distribution" version = "0.9.27" -source = "git+https://github.com/paritytech/polkadot?branch=master#e7461a6bd020250fed010ba56b78b854ad463064" +source = "git+https://github.com/paritytech/polkadot?branch=master#b4d48428d676b614203d2d1deb6bc6b58f93559b" dependencies = [ "futures", "polkadot-node-network-protocol", @@ -6892,7 +6923,7 @@ dependencies = [ [[package]] name = "polkadot-availability-distribution" version = "0.9.27" -source = "git+https://github.com/paritytech/polkadot?branch=master#e7461a6bd020250fed010ba56b78b854ad463064" +source = "git+https://github.com/paritytech/polkadot?branch=master#b4d48428d676b614203d2d1deb6bc6b58f93559b" dependencies = [ "derive_more", "fatality", @@ -6915,7 +6946,7 @@ dependencies = [ [[package]] name = "polkadot-availability-recovery" version = "0.9.27" -source = "git+https://github.com/paritytech/polkadot?branch=master#e7461a6bd020250fed010ba56b78b854ad463064" +source = "git+https://github.com/paritytech/polkadot?branch=master#b4d48428d676b614203d2d1deb6bc6b58f93559b" dependencies = [ "fatality", "futures", @@ -6936,9 +6967,9 @@ dependencies = [ [[package]] name = "polkadot-cli" version = "0.9.27" -source = "git+https://github.com/paritytech/polkadot?branch=master#e7461a6bd020250fed010ba56b78b854ad463064" +source = "git+https://github.com/paritytech/polkadot?branch=master#b4d48428d676b614203d2d1deb6bc6b58f93559b" dependencies = [ - "clap 3.2.15", + "clap 3.2.16", "frame-benchmarking-cli", "futures", "log", @@ -6962,7 +6993,7 @@ dependencies = [ [[package]] name = "polkadot-client" version = "0.9.27" -source = "git+https://github.com/paritytech/polkadot?branch=master#e7461a6bd020250fed010ba56b78b854ad463064" +source = "git+https://github.com/paritytech/polkadot?branch=master#b4d48428d676b614203d2d1deb6bc6b58f93559b" dependencies = [ "beefy-primitives", "frame-benchmarking", @@ -7002,7 +7033,7 @@ dependencies = [ [[package]] name = "polkadot-collator-protocol" version = "0.9.27" -source = "git+https://github.com/paritytech/polkadot?branch=master#e7461a6bd020250fed010ba56b78b854ad463064" +source = "git+https://github.com/paritytech/polkadot?branch=master#b4d48428d676b614203d2d1deb6bc6b58f93559b" dependencies = [ "always-assert", "fatality", @@ -7023,7 +7054,7 @@ dependencies = [ [[package]] name = "polkadot-core-primitives" version = "0.9.27" -source = "git+https://github.com/paritytech/polkadot?branch=master#e7461a6bd020250fed010ba56b78b854ad463064" +source = "git+https://github.com/paritytech/polkadot?branch=master#b4d48428d676b614203d2d1deb6bc6b58f93559b" dependencies = [ "parity-scale-codec", "parity-util-mem", @@ -7036,7 +7067,7 @@ dependencies = [ [[package]] name = "polkadot-dispute-distribution" version = "0.9.27" -source = "git+https://github.com/paritytech/polkadot?branch=master#e7461a6bd020250fed010ba56b78b854ad463064" +source = "git+https://github.com/paritytech/polkadot?branch=master#b4d48428d676b614203d2d1deb6bc6b58f93559b" dependencies = [ "derive_more", "fatality", @@ -7059,7 +7090,7 @@ dependencies = [ [[package]] name = "polkadot-erasure-coding" version = "0.9.27" -source = "git+https://github.com/paritytech/polkadot?branch=master#e7461a6bd020250fed010ba56b78b854ad463064" +source = "git+https://github.com/paritytech/polkadot?branch=master#b4d48428d676b614203d2d1deb6bc6b58f93559b" dependencies = [ "parity-scale-codec", "polkadot-node-primitives", @@ -7073,7 +7104,7 @@ dependencies = [ [[package]] name = "polkadot-gossip-support" version = "0.9.27" -source = "git+https://github.com/paritytech/polkadot?branch=master#e7461a6bd020250fed010ba56b78b854ad463064" +source = "git+https://github.com/paritytech/polkadot?branch=master#b4d48428d676b614203d2d1deb6bc6b58f93559b" dependencies = [ "futures", "futures-timer", @@ -7093,7 +7124,7 @@ dependencies = [ [[package]] name = "polkadot-network-bridge" version = "0.9.27" -source = "git+https://github.com/paritytech/polkadot?branch=master#e7461a6bd020250fed010ba56b78b854ad463064" +source = "git+https://github.com/paritytech/polkadot?branch=master#b4d48428d676b614203d2d1deb6bc6b58f93559b" dependencies = [ "always-assert", "async-trait", @@ -7117,7 +7148,7 @@ dependencies = [ [[package]] name = "polkadot-node-collation-generation" version = "0.9.27" -source = "git+https://github.com/paritytech/polkadot?branch=master#e7461a6bd020250fed010ba56b78b854ad463064" +source = "git+https://github.com/paritytech/polkadot?branch=master#b4d48428d676b614203d2d1deb6bc6b58f93559b" dependencies = [ "futures", "parity-scale-codec", @@ -7135,7 +7166,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-approval-voting" version = "0.9.27" -source = "git+https://github.com/paritytech/polkadot?branch=master#e7461a6bd020250fed010ba56b78b854ad463064" +source = "git+https://github.com/paritytech/polkadot?branch=master#b4d48428d676b614203d2d1deb6bc6b58f93559b" dependencies = [ "bitvec", "derive_more", @@ -7164,7 +7195,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-av-store" version = "0.9.27" -source = "git+https://github.com/paritytech/polkadot?branch=master#e7461a6bd020250fed010ba56b78b854ad463064" +source = "git+https://github.com/paritytech/polkadot?branch=master#b4d48428d676b614203d2d1deb6bc6b58f93559b" dependencies = [ "bitvec", "futures", @@ -7184,7 +7215,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-backing" version = "0.9.27" -source = "git+https://github.com/paritytech/polkadot?branch=master#e7461a6bd020250fed010ba56b78b854ad463064" +source = "git+https://github.com/paritytech/polkadot?branch=master#b4d48428d676b614203d2d1deb6bc6b58f93559b" dependencies = [ "bitvec", "fatality", @@ -7203,7 +7234,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-bitfield-signing" version = "0.9.27" -source = "git+https://github.com/paritytech/polkadot?branch=master#e7461a6bd020250fed010ba56b78b854ad463064" +source = "git+https://github.com/paritytech/polkadot?branch=master#b4d48428d676b614203d2d1deb6bc6b58f93559b" dependencies = [ "futures", "polkadot-node-subsystem", @@ -7218,7 +7249,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-candidate-validation" version = "0.9.27" -source = "git+https://github.com/paritytech/polkadot?branch=master#e7461a6bd020250fed010ba56b78b854ad463064" +source = "git+https://github.com/paritytech/polkadot?branch=master#b4d48428d676b614203d2d1deb6bc6b58f93559b" dependencies = [ "async-trait", "futures", @@ -7236,7 +7267,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-chain-api" version = "0.9.27" -source = "git+https://github.com/paritytech/polkadot?branch=master#e7461a6bd020250fed010ba56b78b854ad463064" +source = "git+https://github.com/paritytech/polkadot?branch=master#b4d48428d676b614203d2d1deb6bc6b58f93559b" dependencies = [ "futures", "polkadot-node-subsystem", @@ -7251,7 +7282,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-chain-selection" version = "0.9.27" -source = "git+https://github.com/paritytech/polkadot?branch=master#e7461a6bd020250fed010ba56b78b854ad463064" +source = "git+https://github.com/paritytech/polkadot?branch=master#b4d48428d676b614203d2d1deb6bc6b58f93559b" dependencies = [ "futures", "futures-timer", @@ -7268,7 +7299,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-dispute-coordinator" version = "0.9.27" -source = "git+https://github.com/paritytech/polkadot?branch=master#e7461a6bd020250fed010ba56b78b854ad463064" +source = "git+https://github.com/paritytech/polkadot?branch=master#b4d48428d676b614203d2d1deb6bc6b58f93559b" dependencies = [ "fatality", "futures", @@ -7287,7 +7318,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-parachains-inherent" version = "0.9.27" -source = "git+https://github.com/paritytech/polkadot?branch=master#e7461a6bd020250fed010ba56b78b854ad463064" +source = "git+https://github.com/paritytech/polkadot?branch=master#b4d48428d676b614203d2d1deb6bc6b58f93559b" dependencies = [ "async-trait", "futures", @@ -7304,7 +7335,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-provisioner" version = "0.9.27" -source = "git+https://github.com/paritytech/polkadot?branch=master#e7461a6bd020250fed010ba56b78b854ad463064" +source = "git+https://github.com/paritytech/polkadot?branch=master#b4d48428d676b614203d2d1deb6bc6b58f93559b" dependencies = [ "bitvec", "fatality", @@ -7322,7 +7353,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-pvf" version = "0.9.27" -source = "git+https://github.com/paritytech/polkadot?branch=master#e7461a6bd020250fed010ba56b78b854ad463064" +source = "git+https://github.com/paritytech/polkadot?branch=master#b4d48428d676b614203d2d1deb6bc6b58f93559b" dependencies = [ "always-assert", "assert_matches", @@ -7354,7 +7385,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-pvf-checker" version = "0.9.27" -source = "git+https://github.com/paritytech/polkadot?branch=master#e7461a6bd020250fed010ba56b78b854ad463064" +source = "git+https://github.com/paritytech/polkadot?branch=master#b4d48428d676b614203d2d1deb6bc6b58f93559b" dependencies = [ "futures", "polkadot-node-primitives", @@ -7370,7 +7401,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-runtime-api" version = "0.9.27" -source = "git+https://github.com/paritytech/polkadot?branch=master#e7461a6bd020250fed010ba56b78b854ad463064" +source = "git+https://github.com/paritytech/polkadot?branch=master#b4d48428d676b614203d2d1deb6bc6b58f93559b" dependencies = [ "futures", "memory-lru", @@ -7386,7 +7417,7 @@ dependencies = [ [[package]] name = "polkadot-node-jaeger" version = "0.9.27" -source = "git+https://github.com/paritytech/polkadot?branch=master#e7461a6bd020250fed010ba56b78b854ad463064" +source = "git+https://github.com/paritytech/polkadot?branch=master#b4d48428d676b614203d2d1deb6bc6b58f93559b" dependencies = [ "async-std", "lazy_static", @@ -7404,7 +7435,7 @@ dependencies = [ [[package]] name = "polkadot-node-metrics" version = "0.9.27" -source = "git+https://github.com/paritytech/polkadot?branch=master#e7461a6bd020250fed010ba56b78b854ad463064" +source = "git+https://github.com/paritytech/polkadot?branch=master#b4d48428d676b614203d2d1deb6bc6b58f93559b" dependencies = [ "bs58", "futures", @@ -7423,7 +7454,7 @@ dependencies = [ [[package]] name = "polkadot-node-network-protocol" version = "0.9.27" -source = "git+https://github.com/paritytech/polkadot?branch=master#e7461a6bd020250fed010ba56b78b854ad463064" +source = "git+https://github.com/paritytech/polkadot?branch=master#b4d48428d676b614203d2d1deb6bc6b58f93559b" dependencies = [ "async-trait", "derive_more", @@ -7444,7 +7475,7 @@ dependencies = [ [[package]] name = "polkadot-node-primitives" version = "0.9.27" -source = "git+https://github.com/paritytech/polkadot?branch=master#e7461a6bd020250fed010ba56b78b854ad463064" +source = "git+https://github.com/paritytech/polkadot?branch=master#b4d48428d676b614203d2d1deb6bc6b58f93559b" dependencies = [ "bounded-vec", "futures", @@ -7466,7 +7497,7 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem" version = "0.9.27" -source = "git+https://github.com/paritytech/polkadot?branch=master#e7461a6bd020250fed010ba56b78b854ad463064" +source = "git+https://github.com/paritytech/polkadot?branch=master#b4d48428d676b614203d2d1deb6bc6b58f93559b" dependencies = [ "polkadot-node-jaeger", "polkadot-node-subsystem-types", @@ -7476,7 +7507,7 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem-test-helpers" version = "0.9.27" -source = "git+https://github.com/paritytech/polkadot?branch=master#e7461a6bd020250fed010ba56b78b854ad463064" +source = "git+https://github.com/paritytech/polkadot?branch=master#b4d48428d676b614203d2d1deb6bc6b58f93559b" dependencies = [ "async-trait", "futures", @@ -7494,7 +7525,7 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem-types" version = "0.9.27" -source = "git+https://github.com/paritytech/polkadot?branch=master#e7461a6bd020250fed010ba56b78b854ad463064" +source = "git+https://github.com/paritytech/polkadot?branch=master#b4d48428d676b614203d2d1deb6bc6b58f93559b" dependencies = [ "async-trait", "derive_more", @@ -7517,7 +7548,7 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem-util" version = "0.9.27" -source = "git+https://github.com/paritytech/polkadot?branch=master#e7461a6bd020250fed010ba56b78b854ad463064" +source = "git+https://github.com/paritytech/polkadot?branch=master#b4d48428d676b614203d2d1deb6bc6b58f93559b" dependencies = [ "async-trait", "derive_more", @@ -7550,7 +7581,7 @@ dependencies = [ [[package]] name = "polkadot-overseer" version = "0.9.27" -source = "git+https://github.com/paritytech/polkadot?branch=master#e7461a6bd020250fed010ba56b78b854ad463064" +source = "git+https://github.com/paritytech/polkadot?branch=master#b4d48428d676b614203d2d1deb6bc6b58f93559b" dependencies = [ "async-trait", "futures", @@ -7573,7 +7604,7 @@ dependencies = [ [[package]] name = "polkadot-parachain" version = "0.9.27" -source = "git+https://github.com/paritytech/polkadot?branch=master#e7461a6bd020250fed010ba56b78b854ad463064" +source = "git+https://github.com/paritytech/polkadot?branch=master#b4d48428d676b614203d2d1deb6bc6b58f93559b" dependencies = [ "derive_more", "frame-support", @@ -7589,11 +7620,11 @@ dependencies = [ [[package]] name = "polkadot-parachain" -version = "0.9.220" +version = "0.9.230" dependencies = [ "assert_cmd", "async-trait", - "clap 3.2.15", + "clap 3.2.16", "contracts-rococo-runtime", "cumulus-client-cli", "cumulus-client-consensus-aura", @@ -7669,7 +7700,7 @@ dependencies = [ [[package]] name = "polkadot-performance-test" version = "0.9.27" -source = "git+https://github.com/paritytech/polkadot?branch=master#e7461a6bd020250fed010ba56b78b854ad463064" +source = "git+https://github.com/paritytech/polkadot?branch=master#b4d48428d676b614203d2d1deb6bc6b58f93559b" dependencies = [ "env_logger 0.9.0", "kusama-runtime", @@ -7684,7 +7715,7 @@ dependencies = [ [[package]] name = "polkadot-primitives" version = "0.9.27" -source = "git+https://github.com/paritytech/polkadot?branch=master#e7461a6bd020250fed010ba56b78b854ad463064" +source = "git+https://github.com/paritytech/polkadot?branch=master#b4d48428d676b614203d2d1deb6bc6b58f93559b" dependencies = [ "bitvec", "frame-system", @@ -7714,7 +7745,7 @@ dependencies = [ [[package]] name = "polkadot-rpc" version = "0.9.27" -source = "git+https://github.com/paritytech/polkadot?branch=master#e7461a6bd020250fed010ba56b78b854ad463064" +source = "git+https://github.com/paritytech/polkadot?branch=master#b4d48428d676b614203d2d1deb6bc6b58f93559b" dependencies = [ "beefy-gadget", "beefy-gadget-rpc", @@ -7746,7 +7777,7 @@ dependencies = [ [[package]] name = "polkadot-runtime" version = "0.9.27" -source = "git+https://github.com/paritytech/polkadot?branch=master#e7461a6bd020250fed010ba56b78b854ad463064" +source = "git+https://github.com/paritytech/polkadot?branch=master#b4d48428d676b614203d2d1deb6bc6b58f93559b" dependencies = [ "beefy-primitives", "bitvec", @@ -7831,7 +7862,7 @@ dependencies = [ [[package]] name = "polkadot-runtime-common" version = "0.9.27" -source = "git+https://github.com/paritytech/polkadot?branch=master#e7461a6bd020250fed010ba56b78b854ad463064" +source = "git+https://github.com/paritytech/polkadot?branch=master#b4d48428d676b614203d2d1deb6bc6b58f93559b" dependencies = [ "beefy-primitives", "bitvec", @@ -7878,7 +7909,7 @@ dependencies = [ [[package]] name = "polkadot-runtime-constants" version = "0.9.27" -source = "git+https://github.com/paritytech/polkadot?branch=master#e7461a6bd020250fed010ba56b78b854ad463064" +source = "git+https://github.com/paritytech/polkadot?branch=master#b4d48428d676b614203d2d1deb6bc6b58f93559b" dependencies = [ "frame-support", "polkadot-primitives", @@ -7890,7 +7921,7 @@ dependencies = [ [[package]] name = "polkadot-runtime-metrics" version = "0.9.27" -source = "git+https://github.com/paritytech/polkadot?branch=master#e7461a6bd020250fed010ba56b78b854ad463064" +source = "git+https://github.com/paritytech/polkadot?branch=master#b4d48428d676b614203d2d1deb6bc6b58f93559b" dependencies = [ "bs58", "parity-scale-codec", @@ -7902,7 +7933,7 @@ dependencies = [ [[package]] name = "polkadot-runtime-parachains" version = "0.9.27" -source = "git+https://github.com/paritytech/polkadot?branch=master#e7461a6bd020250fed010ba56b78b854ad463064" +source = "git+https://github.com/paritytech/polkadot?branch=master#b4d48428d676b614203d2d1deb6bc6b58f93559b" dependencies = [ "bitflags", "bitvec", @@ -7945,7 +7976,7 @@ dependencies = [ [[package]] name = "polkadot-service" version = "0.9.27" -source = "git+https://github.com/paritytech/polkadot?branch=master#e7461a6bd020250fed010ba56b78b854ad463064" +source = "git+https://github.com/paritytech/polkadot?branch=master#b4d48428d676b614203d2d1deb6bc6b58f93559b" dependencies = [ "async-trait", "beefy-gadget", @@ -8048,7 +8079,7 @@ dependencies = [ [[package]] name = "polkadot-statement-distribution" version = "0.9.27" -source = "git+https://github.com/paritytech/polkadot?branch=master#e7461a6bd020250fed010ba56b78b854ad463064" +source = "git+https://github.com/paritytech/polkadot?branch=master#b4d48428d676b614203d2d1deb6bc6b58f93559b" dependencies = [ "arrayvec 0.5.2", "fatality", @@ -8069,7 +8100,7 @@ dependencies = [ [[package]] name = "polkadot-statement-table" version = "0.9.27" -source = "git+https://github.com/paritytech/polkadot?branch=master#e7461a6bd020250fed010ba56b78b854ad463064" +source = "git+https://github.com/paritytech/polkadot?branch=master#b4d48428d676b614203d2d1deb6bc6b58f93559b" dependencies = [ "parity-scale-codec", "polkadot-primitives", @@ -8079,7 +8110,7 @@ dependencies = [ [[package]] name = "polkadot-test-client" version = "0.9.27" -source = "git+https://github.com/paritytech/polkadot?branch=master#e7461a6bd020250fed010ba56b78b854ad463064" +source = "git+https://github.com/paritytech/polkadot?branch=master#b4d48428d676b614203d2d1deb6bc6b58f93559b" dependencies = [ "parity-scale-codec", "polkadot-node-subsystem", @@ -8104,7 +8135,7 @@ dependencies = [ [[package]] name = "polkadot-test-runtime" version = "0.9.27" -source = "git+https://github.com/paritytech/polkadot?branch=master#e7461a6bd020250fed010ba56b78b854ad463064" +source = "git+https://github.com/paritytech/polkadot?branch=master#b4d48428d676b614203d2d1deb6bc6b58f93559b" dependencies = [ "beefy-primitives", "bitvec", @@ -8165,7 +8196,7 @@ dependencies = [ [[package]] name = "polkadot-test-service" version = "0.9.27" -source = "git+https://github.com/paritytech/polkadot?branch=master#e7461a6bd020250fed010ba56b78b854ad463064" +source = "git+https://github.com/paritytech/polkadot?branch=master#b4d48428d676b614203d2d1deb6bc6b58f93559b" dependencies = [ "frame-benchmarking", "frame-system", @@ -8310,7 +8341,7 @@ dependencies = [ [[package]] name = "prioritized-metered-channel" version = "0.2.0" -source = "git+https://github.com/paritytech/polkadot?branch=master#e7461a6bd020250fed010ba56b78b854ad463064" +source = "git+https://github.com/paritytech/polkadot?branch=master#b4d48428d676b614203d2d1deb6bc6b58f93559b" dependencies = [ "coarsetime", "crossbeam-queue", @@ -8753,7 +8784,7 @@ dependencies = [ [[package]] name = "remote-externalities" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "env_logger 0.9.0", "jsonrpsee", @@ -8875,7 +8906,7 @@ dependencies = [ [[package]] name = "rococo-runtime" version = "0.9.27" -source = "git+https://github.com/paritytech/polkadot?branch=master#e7461a6bd020250fed010ba56b78b854ad463064" +source = "git+https://github.com/paritytech/polkadot?branch=master#b4d48428d676b614203d2d1deb6bc6b58f93559b" dependencies = [ "beefy-merkle-tree", "beefy-primitives", @@ -8944,7 +8975,7 @@ dependencies = [ [[package]] name = "rococo-runtime-constants" version = "0.9.27" -source = "git+https://github.com/paritytech/polkadot?branch=master#e7461a6bd020250fed010ba56b78b854ad463064" +source = "git+https://github.com/paritytech/polkadot?branch=master#b4d48428d676b614203d2d1deb6bc6b58f93559b" dependencies = [ "frame-support", "polkadot-primitives", @@ -9128,7 +9159,7 @@ dependencies = [ [[package]] name = "sc-allocator" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "log", "sp-core", @@ -9139,7 +9170,7 @@ dependencies = [ [[package]] name = "sc-authority-discovery" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "futures", "futures-timer", @@ -9166,7 +9197,7 @@ dependencies = [ [[package]] name = "sc-basic-authorship" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "futures", "futures-timer", @@ -9189,7 +9220,7 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "parity-scale-codec", "sc-client-api", @@ -9205,7 +9236,7 @@ dependencies = [ [[package]] name = "sc-chain-spec" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "impl-trait-for-tuples", "memmap2 0.5.0", @@ -9222,7 +9253,7 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -9233,10 +9264,10 @@ dependencies = [ [[package]] name = "sc-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "chrono", - "clap 3.2.15", + "clap 3.2.16", "fdlimit", "futures", "hex", @@ -9272,7 +9303,7 @@ dependencies = [ [[package]] name = "sc-client-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "fnv", "futures", @@ -9300,7 +9331,7 @@ dependencies = [ [[package]] name = "sc-client-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "hash-db", "kvdb", @@ -9325,7 +9356,7 @@ dependencies = [ [[package]] name = "sc-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "async-trait", "futures", @@ -9349,7 +9380,7 @@ dependencies = [ [[package]] name = "sc-consensus-aura" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "async-trait", "futures", @@ -9378,7 +9409,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "async-trait", "fork-tree", @@ -9420,7 +9451,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "futures", "jsonrpsee", @@ -9442,7 +9473,7 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "fork-tree", "parity-scale-codec", @@ -9455,7 +9486,7 @@ dependencies = [ [[package]] name = "sc-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "async-trait", "futures", @@ -9480,7 +9511,7 @@ dependencies = [ [[package]] name = "sc-executor" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "lazy_static", "lru 0.7.7", @@ -9507,7 +9538,7 @@ dependencies = [ [[package]] name = "sc-executor-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "environmental", "parity-scale-codec", @@ -9524,7 +9555,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmi" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "log", "parity-scale-codec", @@ -9539,7 +9570,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "cfg-if 1.0.0", "libc", @@ -9559,7 +9590,7 @@ dependencies = [ [[package]] name = "sc-finality-grandpa" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "ahash", "async-trait", @@ -9600,7 +9631,7 @@ dependencies = [ [[package]] name = "sc-finality-grandpa-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "finality-grandpa", "futures", @@ -9621,7 +9652,7 @@ dependencies = [ [[package]] name = "sc-informant" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "ansi_term", "futures", @@ -9638,7 +9669,7 @@ dependencies = [ [[package]] name = "sc-keystore" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "async-trait", "hex", @@ -9653,7 +9684,7 @@ dependencies = [ [[package]] name = "sc-network" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "async-trait", "asynchronous-codec", @@ -9702,7 +9733,7 @@ dependencies = [ [[package]] name = "sc-network-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "async-trait", "bitflags", @@ -9723,7 +9754,7 @@ dependencies = [ [[package]] name = "sc-network-gossip" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "ahash", "futures", @@ -9741,9 +9772,10 @@ dependencies = [ [[package]] name = "sc-network-light" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "futures", + "hex", "libp2p", "log", "parity-scale-codec", @@ -9761,10 +9793,11 @@ dependencies = [ [[package]] name = "sc-network-sync" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "fork-tree", "futures", + "hex", "libp2p", "log", "lru 0.7.7", @@ -9788,7 +9821,7 @@ dependencies = [ [[package]] name = "sc-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "bytes", "fnv", @@ -9817,7 +9850,7 @@ dependencies = [ [[package]] name = "sc-peerset" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "futures", "libp2p", @@ -9830,7 +9863,7 @@ dependencies = [ [[package]] name = "sc-proposer-metrics" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -9839,7 +9872,7 @@ dependencies = [ [[package]] name = "sc-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "futures", "hash-db", @@ -9869,7 +9902,7 @@ dependencies = [ [[package]] name = "sc-rpc-api" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "futures", "jsonrpsee", @@ -9892,7 +9925,7 @@ dependencies = [ [[package]] name = "sc-rpc-server" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "futures", "jsonrpsee", @@ -9905,7 +9938,7 @@ dependencies = [ [[package]] name = "sc-service" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "async-trait", "directories", @@ -9972,7 +10005,7 @@ dependencies = [ [[package]] name = "sc-state-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "log", "parity-scale-codec", @@ -9986,7 +10019,7 @@ dependencies = [ [[package]] name = "sc-sync-state-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -10005,7 +10038,7 @@ dependencies = [ [[package]] name = "sc-sysinfo" version = "6.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "futures", "libc", @@ -10024,7 +10057,7 @@ dependencies = [ [[package]] name = "sc-telemetry" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "chrono", "futures", @@ -10042,7 +10075,7 @@ dependencies = [ [[package]] name = "sc-tracing" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "ansi_term", "atty", @@ -10073,7 +10106,7 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -10084,7 +10117,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "futures", "futures-timer", @@ -10110,7 +10143,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "futures", "log", @@ -10123,7 +10156,7 @@ dependencies = [ [[package]] name = "sc-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "futures", "futures-timer", @@ -10331,9 +10364,9 @@ checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" [[package]] name = "serde" -version = "1.0.140" +version = "1.0.141" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc855a42c7967b7c369eb5860f7164ef1f6f81c20c7cc1141f2a604e18723b03" +checksum = "7af873f2c95b99fcb0bd0fe622a43e29514658873c8ceba88c4cb88833a22500" dependencies = [ "serde_derive", ] @@ -10350,9 +10383,9 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.140" +version = "1.0.141" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f2122636b9fe3b81f1cb25099fcf2d3f542cdb1d45940d56c713158884a05da" +checksum = "75743a150d003dd863b51dc809bcad0d73f2102c53632f1e954e738192a3413f" dependencies = [ "proc-macro2", "quote", @@ -10568,7 +10601,7 @@ checksum = "03b634d87b960ab1a38c4fe143b508576f075e7c978bfad18217645ebfdfa2ec" [[package]] name = "slot-range-helper" version = "0.9.27" -source = "git+https://github.com/paritytech/polkadot?branch=master#e7461a6bd020250fed010ba56b78b854ad463064" +source = "git+https://github.com/paritytech/polkadot?branch=master#b4d48428d676b614203d2d1deb6bc6b58f93559b" dependencies = [ "enumn", "parity-scale-codec", @@ -10644,7 +10677,7 @@ dependencies = [ [[package]] name = "sp-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "hash-db", "log", @@ -10661,7 +10694,7 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "blake2", "proc-macro-crate", @@ -10673,7 +10706,7 @@ dependencies = [ [[package]] name = "sp-application-crypto" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "parity-scale-codec", "scale-info", @@ -10686,7 +10719,7 @@ dependencies = [ [[package]] name = "sp-arithmetic" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "integer-sqrt", "num-traits", @@ -10701,7 +10734,7 @@ dependencies = [ [[package]] name = "sp-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "parity-scale-codec", "scale-info", @@ -10714,7 +10747,7 @@ dependencies = [ [[package]] name = "sp-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "async-trait", "parity-scale-codec", @@ -10726,7 +10759,7 @@ dependencies = [ [[package]] name = "sp-block-builder" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "parity-scale-codec", "sp-api", @@ -10738,7 +10771,7 @@ dependencies = [ [[package]] name = "sp-blockchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "futures", "log", @@ -10756,7 +10789,7 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "async-trait", "futures", @@ -10775,7 +10808,7 @@ dependencies = [ [[package]] name = "sp-consensus-aura" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "async-trait", "parity-scale-codec", @@ -10793,7 +10826,7 @@ dependencies = [ [[package]] name = "sp-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "async-trait", "merlin", @@ -10816,7 +10849,7 @@ dependencies = [ [[package]] name = "sp-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "parity-scale-codec", "scale-info", @@ -10830,7 +10863,7 @@ dependencies = [ [[package]] name = "sp-consensus-vrf" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "parity-scale-codec", "scale-info", @@ -10843,7 +10876,7 @@ dependencies = [ [[package]] name = "sp-core" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "base58", "bitflags", @@ -10889,7 +10922,7 @@ dependencies = [ [[package]] name = "sp-core-hashing" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "blake2", "byteorder", @@ -10903,7 +10936,7 @@ dependencies = [ [[package]] name = "sp-core-hashing-proc-macro" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "proc-macro2", "quote", @@ -10914,7 +10947,7 @@ dependencies = [ [[package]] name = "sp-database" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "kvdb", "parking_lot 0.12.1", @@ -10923,7 +10956,7 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "proc-macro2", "quote", @@ -10933,7 +10966,7 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.12.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "environmental", "parity-scale-codec", @@ -10944,7 +10977,7 @@ dependencies = [ [[package]] name = "sp-finality-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "finality-grandpa", "log", @@ -10962,7 +10995,7 @@ dependencies = [ [[package]] name = "sp-inherents" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -10976,7 +11009,7 @@ dependencies = [ [[package]] name = "sp-io" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "bytes", "futures", @@ -11002,7 +11035,7 @@ dependencies = [ [[package]] name = "sp-keyring" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "lazy_static", "sp-core", @@ -11013,7 +11046,7 @@ dependencies = [ [[package]] name = "sp-keystore" version = "0.12.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "async-trait", "futures", @@ -11030,7 +11063,7 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "thiserror", "zstd", @@ -11039,7 +11072,7 @@ dependencies = [ [[package]] name = "sp-mmr-primitives" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "log", "parity-scale-codec", @@ -11054,7 +11087,7 @@ dependencies = [ [[package]] name = "sp-npos-elections" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "parity-scale-codec", "scale-info", @@ -11068,7 +11101,7 @@ dependencies = [ [[package]] name = "sp-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "sp-api", "sp-core", @@ -11078,7 +11111,7 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "backtrace", "lazy_static", @@ -11088,7 +11121,7 @@ dependencies = [ [[package]] name = "sp-rpc" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "rustc-hash", "serde", @@ -11098,7 +11131,7 @@ dependencies = [ [[package]] name = "sp-runtime" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "either", "hash256-std-hasher", @@ -11120,7 +11153,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "bytes", "impl-trait-for-tuples", @@ -11138,7 +11171,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "Inflector", "proc-macro-crate", @@ -11150,7 +11183,7 @@ dependencies = [ [[package]] name = "sp-sandbox" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "log", "parity-scale-codec", @@ -11164,7 +11197,7 @@ dependencies = [ [[package]] name = "sp-serializer" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "serde", "serde_json", @@ -11173,7 +11206,7 @@ dependencies = [ [[package]] name = "sp-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "parity-scale-codec", "scale-info", @@ -11187,7 +11220,7 @@ dependencies = [ [[package]] name = "sp-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "parity-scale-codec", "scale-info", @@ -11198,7 +11231,7 @@ dependencies = [ [[package]] name = "sp-state-machine" version = "0.12.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "hash-db", "log", @@ -11220,12 +11253,12 @@ dependencies = [ [[package]] name = "sp-std" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" [[package]] name = "sp-storage" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "impl-serde", "parity-scale-codec", @@ -11238,7 +11271,7 @@ dependencies = [ [[package]] name = "sp-tasks" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "log", "sp-core", @@ -11251,7 +11284,7 @@ dependencies = [ [[package]] name = "sp-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "async-trait", "futures-timer", @@ -11267,7 +11300,7 @@ dependencies = [ [[package]] name = "sp-tracing" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "parity-scale-codec", "sp-std", @@ -11279,7 +11312,7 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "sp-api", "sp-runtime", @@ -11288,7 +11321,7 @@ dependencies = [ [[package]] name = "sp-transaction-storage-proof" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "async-trait", "log", @@ -11304,7 +11337,7 @@ dependencies = [ [[package]] name = "sp-trie" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "hash-db", "memory-db", @@ -11320,7 +11353,7 @@ dependencies = [ [[package]] name = "sp-version" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "impl-serde", "parity-scale-codec", @@ -11337,7 +11370,7 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "parity-scale-codec", "proc-macro2", @@ -11348,7 +11381,7 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "impl-trait-for-tuples", "log", @@ -11389,6 +11422,7 @@ checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" name = "statemine-runtime" version = "2.0.0" dependencies = [ + "asset-test-utils", "cumulus-pallet-aura-ext", "cumulus-pallet-dmp-queue", "cumulus-pallet-parachain-system", @@ -11455,6 +11489,7 @@ dependencies = [ name = "statemint-runtime" version = "1.0.0" dependencies = [ + "asset-test-utils", "cumulus-pallet-aura-ext", "cumulus-pallet-dmp-queue", "cumulus-pallet-parachain-system", @@ -11605,7 +11640,7 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "platforms", ] @@ -11613,7 +11648,7 @@ dependencies = [ [[package]] name = "substrate-frame-rpc-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "frame-system-rpc-runtime-api", "futures", @@ -11634,7 +11669,7 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "futures-util", "hyper", @@ -11647,7 +11682,7 @@ dependencies = [ [[package]] name = "substrate-state-trie-migration-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "jsonrpsee", "log", @@ -11668,7 +11703,7 @@ dependencies = [ [[package]] name = "substrate-test-client" version = "2.0.1" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "async-trait", "futures", @@ -11694,7 +11729,7 @@ dependencies = [ [[package]] name = "substrate-test-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "futures", "substrate-test-utils-derive", @@ -11704,7 +11739,7 @@ dependencies = [ [[package]] name = "substrate-test-utils-derive" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -11715,7 +11750,7 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ "ansi_term", "build-helper", @@ -11823,7 +11858,7 @@ checksum = "13a4ec180a2de59b57434704ccfad967f789b12737738798fa08798cd5824c16" [[package]] name = "test-runtime-constants" version = "0.9.27" -source = "git+https://github.com/paritytech/polkadot?branch=master#e7461a6bd020250fed010ba56b78b854ad463064" +source = "git+https://github.com/paritytech/polkadot?branch=master#b4d48428d676b614203d2d1deb6bc6b58f93559b" dependencies = [ "frame-support", "polkadot-primitives", @@ -11983,7 +12018,7 @@ dependencies = [ "num_cpus", "once_cell", "parking_lot 0.12.1", - "pin-project-lite 0.2.7", + "pin-project-lite 0.2.9", "signal-hook-registry", "socket2", "tokio-macros", @@ -12019,7 +12054,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df54d54117d6fdc4e4fea40fe1e4e566b3505700e148a6827e59b34b0d2600d9" dependencies = [ "futures-core", - "pin-project-lite 0.2.7", + "pin-project-lite 0.2.9", "tokio", ] @@ -12033,7 +12068,7 @@ dependencies = [ "futures-core", "futures-sink", "log", - "pin-project-lite 0.2.7", + "pin-project-lite 0.2.9", "tokio", ] @@ -12047,7 +12082,7 @@ dependencies = [ "futures-core", "futures-io", "futures-sink", - "pin-project-lite 0.2.7", + "pin-project-lite 0.2.9", "tokio", ] @@ -12068,21 +12103,21 @@ checksum = "360dfd1d6d30e05fda32ace2c8c70e9c0a9da713275777f5a4dbb8a1893930c6" [[package]] name = "tracing" -version = "0.1.34" +version = "0.1.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d0ecdcb44a79f0fe9844f0c4f33a342cbcbb5117de8001e6ba0dc2351327d09" +checksum = "2fce9567bd60a67d08a16488756721ba392f24f29006402881e43b19aac64307" dependencies = [ "cfg-if 1.0.0", - "pin-project-lite 0.2.7", + "pin-project-lite 0.2.9", "tracing-attributes", "tracing-core", ] [[package]] name = "tracing-attributes" -version = "0.1.20" +version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e65ce065b4b5c53e73bb28912318cb8c9e9ad3921f1d669eb0e68b4c8143a2b" +checksum = "11c75893af559bc8e10716548bdef5cb2b983f8e637db9d0e15126b61b484ee2" dependencies = [ "proc-macro2", "quote", @@ -12091,9 +12126,9 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.28" +version = "0.1.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b7358be39f2f274f322d2aaed611acc57f382e8eb1e5b48cb9ae30933495ce7" +checksum = "5aeea4303076558a00714b823f9ad67d58a3bbda1df83d8827d21193156e22f7" dependencies = [ "once_cell", "valuable", @@ -12112,7 +12147,7 @@ dependencies = [ [[package]] name = "tracing-gum" version = "0.9.27" -source = "git+https://github.com/paritytech/polkadot?branch=master#e7461a6bd020250fed010ba56b78b854ad463064" +source = "git+https://github.com/paritytech/polkadot?branch=master#b4d48428d676b614203d2d1deb6bc6b58f93559b" dependencies = [ "polkadot-node-jaeger", "polkadot-primitives", @@ -12123,7 +12158,7 @@ dependencies = [ [[package]] name = "tracing-gum-proc-macro" version = "0.9.27" -source = "git+https://github.com/paritytech/polkadot?branch=master#e7461a6bd020250fed010ba56b78b854ad463064" +source = "git+https://github.com/paritytech/polkadot?branch=master#b4d48428d676b614203d2d1deb6bc6b58f93559b" dependencies = [ "expander 0.0.6", "proc-macro-crate", @@ -12250,9 +12285,9 @@ checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" [[package]] name = "try-runtime-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#3e0554a94193c1221c6bf12c7efabc25e2d63404" +source = "git+https://github.com/paritytech/substrate?branch=master#ef890f5598e0d3fd1b6a5fcc8c3322f7570089d1" dependencies = [ - "clap 3.2.15", + "clap 3.2.16", "jsonrpsee", "log", "parity-scale-codec", @@ -12828,7 +12863,7 @@ dependencies = [ [[package]] name = "westend-runtime" version = "0.9.27" -source = "git+https://github.com/paritytech/polkadot?branch=master#e7461a6bd020250fed010ba56b78b854ad463064" +source = "git+https://github.com/paritytech/polkadot?branch=master#b4d48428d676b614203d2d1deb6bc6b58f93559b" dependencies = [ "beefy-primitives", "bitvec", @@ -12917,7 +12952,7 @@ dependencies = [ [[package]] name = "westend-runtime-constants" version = "0.9.27" -source = "git+https://github.com/paritytech/polkadot?branch=master#e7461a6bd020250fed010ba56b78b854ad463064" +source = "git+https://github.com/paritytech/polkadot?branch=master#b4d48428d676b614203d2d1deb6bc6b58f93559b" dependencies = [ "frame-support", "polkadot-primitives", @@ -12930,6 +12965,7 @@ dependencies = [ name = "westmint-runtime" version = "1.0.0" dependencies = [ + "asset-test-utils", "cumulus-pallet-aura-ext", "cumulus-pallet-dmp-queue", "cumulus-pallet-parachain-system", @@ -13201,7 +13237,7 @@ dependencies = [ [[package]] name = "xcm" version = "0.9.27" -source = "git+https://github.com/paritytech/polkadot?branch=master#e7461a6bd020250fed010ba56b78b854ad463064" +source = "git+https://github.com/paritytech/polkadot?branch=master#b4d48428d676b614203d2d1deb6bc6b58f93559b" dependencies = [ "derivative", "impl-trait-for-tuples", @@ -13215,7 +13251,7 @@ dependencies = [ [[package]] name = "xcm-builder" version = "0.9.27" -source = "git+https://github.com/paritytech/polkadot?branch=master#e7461a6bd020250fed010ba56b78b854ad463064" +source = "git+https://github.com/paritytech/polkadot?branch=master#b4d48428d676b614203d2d1deb6bc6b58f93559b" dependencies = [ "frame-support", "frame-system", @@ -13235,7 +13271,7 @@ dependencies = [ [[package]] name = "xcm-executor" version = "0.9.27" -source = "git+https://github.com/paritytech/polkadot?branch=master#e7461a6bd020250fed010ba56b78b854ad463064" +source = "git+https://github.com/paritytech/polkadot?branch=master#b4d48428d676b614203d2d1deb6bc6b58f93559b" dependencies = [ "frame-benchmarking", "frame-support", @@ -13253,7 +13289,7 @@ dependencies = [ [[package]] name = "xcm-procedural" version = "0.9.27" -source = "git+https://github.com/paritytech/polkadot?branch=master#e7461a6bd020250fed010ba56b78b854ad463064" +source = "git+https://github.com/paritytech/polkadot?branch=master#b4d48428d676b614203d2d1deb6bc6b58f93559b" dependencies = [ "Inflector", "proc-macro2", diff --git a/client/cli/Cargo.toml b/client/cli/Cargo.toml index 686a0b8dab3..6745fef4732 100644 --- a/client/cli/Cargo.toml +++ b/client/cli/Cargo.toml @@ -5,7 +5,7 @@ authors = ["Parity Technologies "] edition = "2021" [dependencies] -clap = { version = "3.2.15", features = ["derive", "deprecated"] } +clap = { version = "3.2.16", features = ["derive", "deprecated"] } codec = { package = "parity-scale-codec", version = "3.0.0" } url = "2.2.2" diff --git a/client/consensus/aura/Cargo.toml b/client/consensus/aura/Cargo.toml index c493595e5da..29d2976a7e8 100644 --- a/client/consensus/aura/Cargo.toml +++ b/client/consensus/aura/Cargo.toml @@ -6,10 +6,10 @@ authors = ["Parity Technologies "] edition = "2021" [dependencies] -async-trait = "0.1.56" +async-trait = "0.1.57" codec = { package = "parity-scale-codec", version = "3.0.0", features = [ "derive" ] } futures = "0.3.21" -tracing = "0.1.34" +tracing = "0.1.36" # Substrate sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "master" } diff --git a/client/consensus/common/Cargo.toml b/client/consensus/common/Cargo.toml index e2af49ac5cb..2b93f0d826f 100644 --- a/client/consensus/common/Cargo.toml +++ b/client/consensus/common/Cargo.toml @@ -6,11 +6,11 @@ authors = ["Parity Technologies "] edition = "2021" [dependencies] -async-trait = "0.1.56" +async-trait = "0.1.57" codec = { package = "parity-scale-codec", version = "3.0.0", features = [ "derive" ] } -dyn-clone = "1.0.8" +dyn-clone = "1.0.9" futures = "0.3.21" -tracing = "0.1.34" +tracing = "0.1.36" # Substrate sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "master" } diff --git a/client/consensus/relay-chain/Cargo.toml b/client/consensus/relay-chain/Cargo.toml index 6fc1e8aa790..5288b14d6a2 100644 --- a/client/consensus/relay-chain/Cargo.toml +++ b/client/consensus/relay-chain/Cargo.toml @@ -6,10 +6,10 @@ authors = ["Parity Technologies "] edition = "2021" [dependencies] -async-trait = "0.1.56" +async-trait = "0.1.57" futures = "0.3.21" parking_lot = "0.12.1" -tracing = "0.1.34" +tracing = "0.1.36" # Substrate sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "master" } diff --git a/client/network/Cargo.toml b/client/network/Cargo.toml index 4f82906d4f7..d78969ce957 100644 --- a/client/network/Cargo.toml +++ b/client/network/Cargo.toml @@ -6,13 +6,13 @@ description = "Cumulus-specific networking protocol" edition = "2021" [dependencies] -async-trait = "0.1.56" +async-trait = "0.1.57" codec = { package = "parity-scale-codec", version = "3.0.0", features = [ "derive" ] } derive_more = "0.99.2" futures = "0.3.21" futures-timer = "3.0.2" parking_lot = "0.12.1" -tracing = "0.1.34" +tracing = "0.1.36" # Substrate sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "master" } diff --git a/client/pov-recovery/Cargo.toml b/client/pov-recovery/Cargo.toml index ea937ef5b1f..f585f572eab 100644 --- a/client/pov-recovery/Cargo.toml +++ b/client/pov-recovery/Cargo.toml @@ -10,7 +10,7 @@ codec = { package = "parity-scale-codec", version = "3.0.0", features = [ "deriv futures = "0.3.21" futures-timer = "3.0.2" rand = "0.8.5" -tracing = "0.1.34" +tracing = "0.1.36" # Substrate sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "master" } diff --git a/client/relay-chain-inprocess-interface/Cargo.toml b/client/relay-chain-inprocess-interface/Cargo.toml index 44c14034266..28e1f749bf2 100644 --- a/client/relay-chain-inprocess-interface/Cargo.toml +++ b/client/relay-chain-inprocess-interface/Cargo.toml @@ -5,10 +5,10 @@ version = "0.1.0" edition = "2021" [dependencies] -async-trait = "0.1.56" +async-trait = "0.1.57" futures = "0.3.21" futures-timer = "3.0.2" -tracing = "0.1.34" +tracing = "0.1.36" # Substrate sc-cli = { git = "https://github.com/paritytech/substrate", branch = "master" } @@ -26,7 +26,7 @@ sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master sp-state-machine = { git = "https://github.com/paritytech/substrate", branch = "master" } # Polkadot -polkadot-cli = { git = "https://github.com/paritytech/polkadot", branch = "master" } +polkadot-cli = { git = "https://github.com/paritytech/polkadot", branch = "master", default-features = false } polkadot-client = { git = "https://github.com/paritytech/polkadot", branch = "master" } polkadot-service = { git = "https://github.com/paritytech/polkadot", branch = "master" } diff --git a/client/relay-chain-interface/Cargo.toml b/client/relay-chain-interface/Cargo.toml index efa5472ebc1..7ba95839335 100644 --- a/client/relay-chain-interface/Cargo.toml +++ b/client/relay-chain-interface/Cargo.toml @@ -20,7 +20,7 @@ sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "mas futures = "0.3.21" parking_lot = "0.12.1" derive_more = "0.99.2" -async-trait = "0.1.56" +async-trait = "0.1.57" thiserror = "1.0.31" -jsonrpsee-core = "0.14.0" +jsonrpsee-core = "0.15.1" parity-scale-codec = "3.1.5" diff --git a/client/relay-chain-interface/src/lib.rs b/client/relay-chain-interface/src/lib.rs index 119721adec1..91cfb531b73 100644 --- a/client/relay-chain-interface/src/lib.rs +++ b/client/relay-chain-interface/src/lib.rs @@ -29,7 +29,7 @@ use sc_client_api::StorageProof; use futures::Stream; use async_trait::async_trait; -use jsonrpsee_core::Error as JsonRPSeeError; +use jsonrpsee_core::Error as JsonRpcError; use parity_scale_codec::Error as CodecError; use sp_api::ApiError; use sp_state_machine::StorageValue; @@ -51,9 +51,11 @@ pub enum RelayChainError { #[error("State machine error occured: {0}")] StateMachineError(Box), #[error("Unable to call RPC method '{0}' due to error: {1}")] - RPCCallError(String, JsonRPSeeError), + RpcCallError(String, JsonRpcError), #[error("RPC Error: '{0}'")] - JsonRPCError(#[from] JsonRPSeeError), + JsonRpcError(#[from] JsonRpcError), + #[error("Unable to reach RpcStreamWorker: {0}")] + WorkerCommunicationError(String), #[error("Scale codec deserialization error: {0}")] DeserializationError(CodecError), #[error("Scale codec deserialization error: {0}")] diff --git a/client/relay-chain-rpc-interface/Cargo.toml b/client/relay-chain-rpc-interface/Cargo.toml index d7b6009dc97..acd44853429 100644 --- a/client/relay-chain-rpc-interface/Cargo.toml +++ b/client/relay-chain-rpc-interface/Cargo.toml @@ -18,13 +18,14 @@ sp-state-machine = { git = "https://github.com/paritytech/substrate", branch = " sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "master" } sp-storage = { git = "https://github.com/paritytech/substrate", branch = "master" } sc-rpc-api = { git = "https://github.com/paritytech/substrate", branch = "master" } +tokio = { version = "1.19.2", features = ["sync"] } futures = "0.3.21" futures-timer = "3.0.2" parity-scale-codec = "3.1.5" parking_lot = "0.12.1" -jsonrpsee = { version = "0.14.0", features = ["ws-client"] } -tracing = "0.1.34" -async-trait = "0.1.56" +jsonrpsee = { version = "0.15.1", features = ["ws-client"] } +tracing = "0.1.36" +async-trait = "0.1.57" url = "2.2.2" backoff = { version = "0.4.0", features = ["tokio"] } diff --git a/client/relay-chain-rpc-interface/src/lib.rs b/client/relay-chain-rpc-interface/src/lib.rs index 9f84e437699..f295c693ecd 100644 --- a/client/relay-chain-rpc-interface/src/lib.rs +++ b/client/relay-chain-rpc-interface/src/lib.rs @@ -15,7 +15,6 @@ // along with Cumulus. If not, see . use async_trait::async_trait; -use backoff::{future::retry_notify, ExponentialBackoff}; use core::time::Duration; use cumulus_primitives_core::{ relay_chain::{ @@ -26,274 +25,35 @@ use cumulus_primitives_core::{ }; use cumulus_relay_chain_interface::{RelayChainError, RelayChainInterface, RelayChainResult}; use futures::{FutureExt, Stream, StreamExt}; -use jsonrpsee::{ - core::{ - client::{Client as JsonRPCClient, ClientT, Subscription, SubscriptionClientT}, - Error as JsonRpseeError, - }, - rpc_params, - types::ParamsSer, - ws_client::WsClientBuilder, -}; -use parity_scale_codec::{Decode, Encode}; use polkadot_service::Handle; -use sc_client_api::{StorageData, StorageProof}; -use sc_rpc_api::{state::ReadProof, system::Health}; +use sc_client_api::StorageProof; use sp_core::sp_std::collections::btree_map::BTreeMap; -use sp_runtime::DeserializeOwned; use sp_state_machine::StorageValue; use sp_storage::StorageKey; -use std::{pin::Pin, sync::Arc}; +use std::pin::Pin; pub use url::Url; -const LOG_TARGET: &str = "relay-chain-rpc-interface"; -const TIMEOUT_IN_SECONDS: u64 = 6; - -/// Client that maps RPC methods and deserializes results -#[derive(Clone)] -struct RelayChainRPCClient { - /// Websocket client to make calls - ws_client: Arc, - - /// Retry strategy that should be used for requests and subscriptions - retry_strategy: ExponentialBackoff, -} - -impl RelayChainRPCClient { - pub async fn new(url: Url) -> RelayChainResult { - tracing::info!(target: LOG_TARGET, url = %url.to_string(), "Initializing RPC Client"); - let ws_client = WsClientBuilder::default().build(url.as_str()).await?; - - Ok(RelayChainRPCClient { - ws_client: Arc::new(ws_client), - retry_strategy: ExponentialBackoff::default(), - }) - } - - /// Call a call to `state_call` rpc method. - async fn call_remote_runtime_function( - &self, - method_name: &str, - hash: PHash, - payload: Option, - ) -> RelayChainResult { - let payload_bytes = - payload.map_or(sp_core::Bytes(Vec::new()), |v| sp_core::Bytes(v.encode())); - let params = rpc_params! { - method_name, - payload_bytes, - hash - }; - let res = self - .request_tracing::("state_call", params, |err| { - tracing::trace!( - target: LOG_TARGET, - %method_name, - %hash, - error = %err, - "Error during call to 'state_call'.", - ); - }) - .await?; - Decode::decode(&mut &*res.0).map_err(Into::into) - } - - /// Subscribe to a notification stream via RPC - async fn subscribe<'a, R>( - &self, - sub_name: &'a str, - unsub_name: &'a str, - params: Option>, - ) -> RelayChainResult> - where - R: DeserializeOwned, - { - self.ws_client - .subscribe::(sub_name, params, unsub_name) - .await - .map_err(|err| RelayChainError::RPCCallError(sub_name.to_string(), err)) - } - - /// Perform RPC request - async fn request<'a, R>( - &self, - method: &'a str, - params: Option>, - ) -> Result - where - R: DeserializeOwned + std::fmt::Debug, - { - self.request_tracing( - method, - params, - |e| tracing::trace!(target:LOG_TARGET, error = %e, %method, "Unable to complete RPC request"), - ) - .await - } - - /// Perform RPC request - async fn request_tracing<'a, R, OR>( - &self, - method: &'a str, - params: Option>, - trace_error: OR, - ) -> Result - where - R: DeserializeOwned + std::fmt::Debug, - OR: Fn(&jsonrpsee::core::Error), - { - retry_notify( - self.retry_strategy.clone(), - || async { - self.ws_client.request(method, params.clone()).await.map_err(|err| match err { - JsonRpseeError::Transport(_) => - backoff::Error::Transient { err, retry_after: None }, - _ => backoff::Error::Permanent(err), - }) - }, - |error, dur| tracing::trace!(target: LOG_TARGET, %error, ?dur, "Encountered transport error, retrying."), - ) - .await - .map_err(|err| { - trace_error(&err); - RelayChainError::RPCCallError(method.to_string(), err)}) - } - - async fn system_health(&self) -> Result { - self.request("system_health", None).await - } - - async fn state_get_read_proof( - &self, - storage_keys: Vec, - at: Option, - ) -> Result, RelayChainError> { - let params = rpc_params!(storage_keys, at); - self.request("state_getReadProof", params).await - } - - async fn state_get_storage( - &self, - storage_key: StorageKey, - at: Option, - ) -> Result, RelayChainError> { - let params = rpc_params!(storage_key, at); - self.request("state_getStorage", params).await - } - - async fn chain_get_head(&self) -> Result { - self.request("chain_getHead", None).await - } - - async fn chain_get_header( - &self, - hash: Option, - ) -> Result, RelayChainError> { - let params = rpc_params!(hash); - self.request("chain_getHeader", params).await - } - - async fn parachain_host_candidate_pending_availability( - &self, - at: PHash, - para_id: ParaId, - ) -> Result, RelayChainError> { - self.call_remote_runtime_function( - "ParachainHost_candidate_pending_availability", - at, - Some(para_id), - ) - .await - } - - async fn parachain_host_session_index_for_child( - &self, - at: PHash, - ) -> Result { - self.call_remote_runtime_function("ParachainHost_session_index_for_child", at, None::<()>) - .await - } +mod rpc_client; +pub use rpc_client::{create_client_and_start_worker, RelayChainRpcClient}; - async fn parachain_host_validators( - &self, - at: PHash, - ) -> Result, RelayChainError> { - self.call_remote_runtime_function("ParachainHost_validators", at, None::<()>) - .await - } - - async fn parachain_host_persisted_validation_data( - &self, - at: PHash, - para_id: ParaId, - occupied_core_assumption: OccupiedCoreAssumption, - ) -> Result, RelayChainError> { - self.call_remote_runtime_function( - "ParachainHost_persisted_validation_data", - at, - Some((para_id, occupied_core_assumption)), - ) - .await - } - - async fn parachain_host_inbound_hrmp_channels_contents( - &self, - para_id: ParaId, - at: PHash, - ) -> Result>, RelayChainError> { - self.call_remote_runtime_function( - "ParachainHost_inbound_hrmp_channels_contents", - at, - Some(para_id), - ) - .await - } - - async fn parachain_host_dmq_contents( - &self, - para_id: ParaId, - at: PHash, - ) -> Result, RelayChainError> { - self.call_remote_runtime_function("ParachainHost_dmq_contents", at, Some(para_id)) - .await - } - - async fn subscribe_all_heads(&self) -> Result, RelayChainError> { - self.subscribe::("chain_subscribeAllHeads", "chain_unsubscribeAllHeads", None) - .await - } - - async fn subscribe_new_best_heads(&self) -> Result, RelayChainError> { - self.subscribe::("chain_subscribeNewHeads", "chain_unsubscribeNewHeads", None) - .await - } - - async fn subscribe_finalized_heads(&self) -> Result, RelayChainError> { - self.subscribe::( - "chain_subscribeFinalizedHeads", - "chain_unsubscribeFinalizedHeads", - None, - ) - .await - } -} +const TIMEOUT_IN_SECONDS: u64 = 6; -/// RelayChainRPCInterface is used to interact with a full node that is running locally +/// RelayChainRpcInterface is used to interact with a full node that is running locally /// in the same process. #[derive(Clone)] -pub struct RelayChainRPCInterface { - rpc_client: RelayChainRPCClient, +pub struct RelayChainRpcInterface { + rpc_client: RelayChainRpcClient, } -impl RelayChainRPCInterface { - pub async fn new(url: Url) -> RelayChainResult { - Ok(Self { rpc_client: RelayChainRPCClient::new(url).await? }) +impl RelayChainRpcInterface { + pub fn new(rpc_client: RelayChainRpcClient) -> Self { + Self { rpc_client } } } #[async_trait] -impl RelayChainInterface for RelayChainRPCInterface { +impl RelayChainInterface for RelayChainRpcInterface { async fn retrieve_dmq_contents( &self, para_id: ParaId, @@ -344,17 +104,7 @@ impl RelayChainInterface for RelayChainRPCInterface { async fn import_notification_stream( &self, ) -> RelayChainResult + Send>>> { - let imported_headers_stream = - self.rpc_client.subscribe_all_heads().await?.filter_map(|item| async move { - item.map_err(|err| { - tracing::error!( - target: LOG_TARGET, - "Encountered error in import notification stream: {}", - err - ) - }) - .ok() - }); + let imported_headers_stream = self.rpc_client.get_imported_heads_stream().await?; Ok(imported_headers_stream.boxed()) } @@ -362,20 +112,7 @@ impl RelayChainInterface for RelayChainRPCInterface { async fn finality_notification_stream( &self, ) -> RelayChainResult + Send>>> { - let imported_headers_stream = self - .rpc_client - .subscribe_finalized_heads() - .await? - .filter_map(|item| async move { - item.map_err(|err| { - tracing::error!( - target: LOG_TARGET, - "Encountered error in finality notification stream: {}", - err - ) - }) - .ok() - }); + let imported_headers_stream = self.rpc_client.get_finalized_heads_stream().await?; Ok(imported_headers_stream.boxed()) } @@ -430,7 +167,7 @@ impl RelayChainInterface for RelayChainRPCInterface { /// 3. Wait for the block to be imported via subscription. /// 4. If timeout is reached, we return an error. async fn wait_for_block(&self, wait_for_hash: PHash) -> RelayChainResult<()> { - let mut head_stream = self.rpc_client.subscribe_all_heads().await?; + let mut head_stream = self.rpc_client.get_imported_heads_stream().await?; if self.rpc_client.chain_get_header(Some(wait_for_hash)).await?.is_some() { return Ok(()) @@ -442,7 +179,7 @@ impl RelayChainInterface for RelayChainRPCInterface { futures::select! { _ = timeout => return Err(RelayChainError::WaitTimeout(wait_for_hash)), evt = head_stream.next().fuse() => match evt { - Some(Ok(evt)) if evt.hash() == wait_for_hash => return Ok(()), + Some(evt) if evt.hash() == wait_for_hash => return Ok(()), // Not the event we waited on. Some(_) => continue, None => return Err(RelayChainError::ImportListenerClosed(wait_for_hash)), @@ -454,18 +191,7 @@ impl RelayChainInterface for RelayChainRPCInterface { async fn new_best_notification_stream( &self, ) -> RelayChainResult + Send>>> { - let imported_headers_stream = - self.rpc_client.subscribe_new_best_heads().await?.filter_map(|item| async move { - item.map_err(|err| { - tracing::error!( - target: LOG_TARGET, - "Error in best block notification stream: {}", - err - ) - }) - .ok() - }); - + let imported_headers_stream = self.rpc_client.get_best_heads_stream().await?; Ok(imported_headers_stream.boxed()) } } diff --git a/client/relay-chain-rpc-interface/src/rpc_client.rs b/client/relay-chain-rpc-interface/src/rpc_client.rs new file mode 100644 index 00000000000..71014b18e0e --- /dev/null +++ b/client/relay-chain-rpc-interface/src/rpc_client.rs @@ -0,0 +1,466 @@ +// Copyright 2022 Parity Technologies (UK) Ltd. +// This file is part of Cumulus. + +// Cumulus 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. + +// Cumulus 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 Cumulus. If not, see . + +use backoff::{future::retry_notify, ExponentialBackoff}; +use cumulus_primitives_core::{ + relay_chain::{ + v2::{CommittedCandidateReceipt, OccupiedCoreAssumption, SessionIndex, ValidatorId}, + Hash as PHash, Header as PHeader, InboundHrmpMessage, + }, + InboundDownwardMessage, ParaId, PersistedValidationData, +}; +use cumulus_relay_chain_interface::{RelayChainError, RelayChainResult}; +use futures::{ + channel::mpsc::{Receiver, Sender}, + StreamExt, +}; +use jsonrpsee::{ + core::{ + client::{Client as JsonRpcClient, ClientT, Subscription, SubscriptionClientT}, + Error as JsonRpseeError, + }, + rpc_params, + types::ParamsSer, + ws_client::WsClientBuilder, +}; +use parity_scale_codec::{Decode, Encode}; +use polkadot_service::TaskManager; +use sc_client_api::StorageData; +use sc_rpc_api::{state::ReadProof, system::Health}; +use sp_core::sp_std::collections::btree_map::BTreeMap; +use sp_runtime::DeserializeOwned; +use sp_storage::StorageKey; +use std::sync::Arc; +use tokio::sync::mpsc::{ + channel as tokio_channel, Receiver as TokioReceiver, Sender as TokioSender, +}; + +pub use url::Url; + +const LOG_TARGET: &str = "relay-chain-rpc-client"; + +const NOTIFICATION_CHANNEL_SIZE_LIMIT: usize = 20; + +/// Client that maps RPC methods and deserializes results +#[derive(Clone)] +pub struct RelayChainRpcClient { + /// Websocket client to make calls + ws_client: Arc, + + /// Retry strategy that should be used for requests and subscriptions + retry_strategy: ExponentialBackoff, + + /// Channel to communicate with the RPC worker + to_worker_channel: TokioSender, +} + +/// Worker messages to register new notification listeners +#[derive(Clone, Debug)] +pub enum NotificationRegisterMessage { + RegisterBestHeadListener(Sender), + RegisterImportListener(Sender), + RegisterFinalizationListener(Sender), +} + +/// Worker that should be used in combination with [`RelayChainRpcClient`]. Must be polled to distribute header notifications to listeners. +struct RpcStreamWorker { + // Communication channel with the RPC client + client_receiver: TokioReceiver, + + // Senders to distribute incoming header notifications to + imported_header_listeners: Vec>, + finalized_header_listeners: Vec>, + best_header_listeners: Vec>, + + // Incoming notification subscriptions + rpc_imported_header_subscription: Subscription, + rpc_finalized_header_subscription: Subscription, + rpc_best_header_subscription: Subscription, +} + +/// Entry point to create [`RelayChainRpcClient`] and start a worker that distributes notifications. +pub async fn create_client_and_start_worker( + url: Url, + task_manager: &mut TaskManager, +) -> RelayChainResult { + tracing::info!(target: LOG_TARGET, url = %url.to_string(), "Initializing RPC Client"); + let ws_client = WsClientBuilder::default().build(url.as_str()).await?; + + let best_head_stream = RelayChainRpcClient::subscribe_new_best_heads(&ws_client).await?; + let finalized_head_stream = RelayChainRpcClient::subscribe_finalized_heads(&ws_client).await?; + let imported_head_stream = RelayChainRpcClient::subscribe_imported_heads(&ws_client).await?; + + let (worker, sender) = + RpcStreamWorker::new(imported_head_stream, best_head_stream, finalized_head_stream); + let client = RelayChainRpcClient::new(ws_client, sender).await?; + + task_manager + .spawn_essential_handle() + .spawn("relay-chain-rpc-worker", None, worker.run()); + + Ok(client) +} + +fn handle_event_distribution( + event: Option>, + senders: &mut Vec>, +) -> Result<(), String> { + match event { + Some(Ok(header)) => { + senders.retain_mut(|e| { + match e.try_send(header.clone()) { + // Receiver has been dropped, remove Sender from list. + Err(error) if error.is_disconnected() => false, + // Channel is full. This should not happen. + // TODO: Improve error handling here + // https://github.com/paritytech/cumulus/issues/1482 + Err(error) => { + tracing::error!(target: LOG_TARGET, ?error, "Event distribution channel has reached its limit. This can lead to missed notifications."); + true + }, + _ => true, + } + }); + Ok(()) + }, + None => Err("RPC Subscription closed.".to_string()), + Some(Err(err)) => Err(format!("Error in RPC subscription: {}", err)), + } +} + +impl RpcStreamWorker { + /// Create new worker. Returns the worker and a channel to register new listeners. + fn new( + import_sub: Subscription, + best_sub: Subscription, + finalized_sub: Subscription, + ) -> (RpcStreamWorker, TokioSender) { + let (tx, rx) = tokio_channel(100); + let worker = RpcStreamWorker { + client_receiver: rx, + imported_header_listeners: Vec::new(), + finalized_header_listeners: Vec::new(), + best_header_listeners: Vec::new(), + rpc_imported_header_subscription: import_sub, + rpc_best_header_subscription: best_sub, + rpc_finalized_header_subscription: finalized_sub, + }; + (worker, tx) + } + + /// Run this worker to drive notification streams. + /// The worker does two things: + /// 1. Listen for `NotificationRegisterMessage` and register new listeners for the notification streams + /// 2. Distribute incoming import, best head and finalization notifications to registered listeners. + /// If an error occurs during sending, the receiver has been closed and we remove the sender from the list. + pub async fn run(mut self) { + let mut import_sub = self.rpc_imported_header_subscription.fuse(); + let mut best_head_sub = self.rpc_best_header_subscription.fuse(); + let mut finalized_sub = self.rpc_finalized_header_subscription.fuse(); + loop { + tokio::select! { + evt = self.client_receiver.recv() => match evt { + Some(NotificationRegisterMessage::RegisterBestHeadListener(tx)) => { + self.best_header_listeners.push(tx); + }, + Some(NotificationRegisterMessage::RegisterImportListener(tx)) => { + self.imported_header_listeners.push(tx) + }, + Some(NotificationRegisterMessage::RegisterFinalizationListener(tx)) => { + self.finalized_header_listeners.push(tx) + }, + None => { + tracing::error!(target: LOG_TARGET, "RPC client receiver closed. Stopping RPC Worker."); + return; + } + }, + import_event = import_sub.next() => { + if let Err(err) = handle_event_distribution(import_event, &mut self.imported_header_listeners) { + tracing::error!(target: LOG_TARGET, err, "Encountered error while processing imported header notification. Stopping RPC Worker."); + return; + } + }, + best_header_event = best_head_sub.next() => { + if let Err(err) = handle_event_distribution(best_header_event, &mut self.best_header_listeners) { + tracing::error!(target: LOG_TARGET, err, "Encountered error while processing best header notification. Stopping RPC Worker."); + return; + } + } + finalized_event = finalized_sub.next() => { + if let Err(err) = handle_event_distribution(finalized_event, &mut self.finalized_header_listeners) { + tracing::error!(target: LOG_TARGET, err, "Encountered error while processing finalized header notification. Stopping RPC Worker."); + return; + } + } + } + } + } +} + +impl RelayChainRpcClient { + /// Initialize new RPC Client. + async fn new( + ws_client: JsonRpcClient, + sender: TokioSender, + ) -> RelayChainResult { + let client = RelayChainRpcClient { + to_worker_channel: sender, + ws_client: Arc::new(ws_client), + retry_strategy: ExponentialBackoff::default(), + }; + + Ok(client) + } + + /// Call a call to `state_call` rpc method. + pub async fn call_remote_runtime_function( + &self, + method_name: &str, + hash: PHash, + payload: Option, + ) -> RelayChainResult { + let payload_bytes = + payload.map_or(sp_core::Bytes(Vec::new()), |v| sp_core::Bytes(v.encode())); + let params = rpc_params! { + method_name, + payload_bytes, + hash + }; + let res = self + .request_tracing::("state_call", params, |err| { + tracing::trace!( + target: LOG_TARGET, + %method_name, + %hash, + error = %err, + "Error during call to 'state_call'.", + ); + }) + .await?; + Decode::decode(&mut &*res.0).map_err(Into::into) + } + + /// Subscribe to a notification stream via RPC + + /// Perform RPC request + async fn request<'a, R>( + &self, + method: &'a str, + params: Option>, + ) -> Result + where + R: DeserializeOwned + std::fmt::Debug, + { + self.request_tracing( + method, + params, + |e| tracing::trace!(target:LOG_TARGET, error = %e, %method, "Unable to complete RPC request"), + ) + .await + } + + /// Perform RPC request + async fn request_tracing<'a, R, OR>( + &self, + method: &'a str, + params: Option>, + trace_error: OR, + ) -> Result + where + R: DeserializeOwned + std::fmt::Debug, + OR: Fn(&jsonrpsee::core::Error), + { + retry_notify( + self.retry_strategy.clone(), + || async { + self.ws_client.request(method, params.clone()).await.map_err(|err| match err { + JsonRpseeError::Transport(_) => + backoff::Error::Transient { err, retry_after: None }, + _ => backoff::Error::Permanent(err), + }) + }, + |error, dur| tracing::trace!(target: LOG_TARGET, %error, ?dur, "Encountered transport error, retrying."), + ) + .await + .map_err(|err| { + trace_error(&err); + RelayChainError::RpcCallError(method.to_string(), err)}) + } + + pub async fn system_health(&self) -> Result { + self.request("system_health", None).await + } + + pub async fn state_get_read_proof( + &self, + storage_keys: Vec, + at: Option, + ) -> Result, RelayChainError> { + let params = rpc_params!(storage_keys, at); + self.request("state_getReadProof", params).await + } + + pub async fn state_get_storage( + &self, + storage_key: StorageKey, + at: Option, + ) -> Result, RelayChainError> { + let params = rpc_params!(storage_key, at); + self.request("state_getStorage", params).await + } + + pub async fn chain_get_head(&self) -> Result { + self.request("chain_getHead", None).await + } + + pub async fn chain_get_header( + &self, + hash: Option, + ) -> Result, RelayChainError> { + let params = rpc_params!(hash); + self.request("chain_getHeader", params).await + } + + pub async fn parachain_host_candidate_pending_availability( + &self, + at: PHash, + para_id: ParaId, + ) -> Result, RelayChainError> { + self.call_remote_runtime_function( + "ParachainHost_candidate_pending_availability", + at, + Some(para_id), + ) + .await + } + + pub async fn parachain_host_session_index_for_child( + &self, + at: PHash, + ) -> Result { + self.call_remote_runtime_function("ParachainHost_session_index_for_child", at, None::<()>) + .await + } + + pub async fn parachain_host_validators( + &self, + at: PHash, + ) -> Result, RelayChainError> { + self.call_remote_runtime_function("ParachainHost_validators", at, None::<()>) + .await + } + + pub async fn parachain_host_persisted_validation_data( + &self, + at: PHash, + para_id: ParaId, + occupied_core_assumption: OccupiedCoreAssumption, + ) -> Result, RelayChainError> { + self.call_remote_runtime_function( + "ParachainHost_persisted_validation_data", + at, + Some((para_id, occupied_core_assumption)), + ) + .await + } + + pub async fn parachain_host_inbound_hrmp_channels_contents( + &self, + para_id: ParaId, + at: PHash, + ) -> Result>, RelayChainError> { + self.call_remote_runtime_function( + "ParachainHost_inbound_hrmp_channels_contents", + at, + Some(para_id), + ) + .await + } + + pub async fn parachain_host_dmq_contents( + &self, + para_id: ParaId, + at: PHash, + ) -> Result, RelayChainError> { + self.call_remote_runtime_function("ParachainHost_dmq_contents", at, Some(para_id)) + .await + } + + fn send_register_message_to_worker( + &self, + message: NotificationRegisterMessage, + ) -> Result<(), RelayChainError> { + self.to_worker_channel + .try_send(message) + .map_err(|e| RelayChainError::WorkerCommunicationError(e.to_string())) + } + + pub async fn get_imported_heads_stream(&self) -> Result, RelayChainError> { + let (tx, rx) = futures::channel::mpsc::channel::(NOTIFICATION_CHANNEL_SIZE_LIMIT); + self.send_register_message_to_worker(NotificationRegisterMessage::RegisterImportListener( + tx, + ))?; + Ok(rx) + } + + pub async fn get_best_heads_stream(&self) -> Result, RelayChainError> { + let (tx, rx) = futures::channel::mpsc::channel::(NOTIFICATION_CHANNEL_SIZE_LIMIT); + self.send_register_message_to_worker( + NotificationRegisterMessage::RegisterBestHeadListener(tx), + )?; + Ok(rx) + } + + pub async fn get_finalized_heads_stream(&self) -> Result, RelayChainError> { + let (tx, rx) = futures::channel::mpsc::channel::(NOTIFICATION_CHANNEL_SIZE_LIMIT); + self.send_register_message_to_worker( + NotificationRegisterMessage::RegisterFinalizationListener(tx), + )?; + Ok(rx) + } + + async fn subscribe_imported_heads( + ws_client: &JsonRpcClient, + ) -> Result, RelayChainError> { + Ok(ws_client + .subscribe::("chain_subscribeAllHeads", None, "chain_unsubscribeAllHeads") + .await?) + } + + async fn subscribe_finalized_heads( + ws_client: &JsonRpcClient, + ) -> Result, RelayChainError> { + Ok(ws_client + .subscribe::( + "chain_subscribeFinalizedHeads", + None, + "chain_unsubscribeFinalizedHeads", + ) + .await?) + } + + async fn subscribe_new_best_heads( + ws_client: &JsonRpcClient, + ) -> Result, RelayChainError> { + Ok(ws_client + .subscribe::( + "chain_subscribeNewHeads", + None, + "chain_unsubscribeFinalizedHeads", + ) + .await?) + } +} diff --git a/client/service/Cargo.toml b/client/service/Cargo.toml index 687aa0f95ac..63b1d25a9fc 100644 --- a/client/service/Cargo.toml +++ b/client/service/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" [dependencies] parking_lot = "0.12.1" -tracing = "0.1.34" +tracing = "0.1.36" # Substrate sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "master" } diff --git a/docs/release.md b/docs/release.md index a5adc21b387..9bd5895c83a 100644 --- a/docs/release.md +++ b/docs/release.md @@ -1,6 +1,6 @@ # Releases -## Versionning +## Versioning ### Example #1 @@ -8,7 +8,7 @@ | Polkadot | v 0. 9.22 | | Client | v 0. 9.22 0 | | Runtime | v 9 22 0 | => 9220 -| senmver | 0. 9.22 0 | +| semver | 0. 9.22 0 | ``` ### Example #2 @@ -17,7 +17,7 @@ | Polkadot | v 0.10.42 | | Client | v 0.10.42 0 | | Runtime | v 10.42 0 | => 10420 -| senmver | 0.10.42 0 | +| semver | 0.10.42 0 | ``` ### Example #3 @@ -26,7 +26,7 @@ | Polkadot | v 1. 2.18 | | Client | v 1. 2.18 0 | | Runtime | v 1 2 18 0 | => 102180 -| senmver | 1. 2.18 0 | +| semver | 1. 2.18 0 | ``` diff --git a/pallets/aura-ext/Cargo.toml b/pallets/aura-ext/Cargo.toml index 31609ada32e..45076708340 100644 --- a/pallets/aura-ext/Cargo.toml +++ b/pallets/aura-ext/Cargo.toml @@ -8,7 +8,7 @@ description = "AURA consensus extension pallet for parachains" [dependencies] codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } scale-info = { version = "2.1.1", default-features = false, features = ["derive"] } -serde = { version = "1.0.140", optional = true, features = ["derive"] } +serde = { version = "1.0.141", optional = true, features = ["derive"] } # Substrate frame-executive = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } diff --git a/pallets/collator-selection/Cargo.toml b/pallets/collator-selection/Cargo.toml index 91b3c400a0b..d3f4625b8e8 100644 --- a/pallets/collator-selection/Cargo.toml +++ b/pallets/collator-selection/Cargo.toml @@ -17,7 +17,7 @@ log = { version = "0.4.17", default-features = false } codec = { default-features = false, features = ["derive"], package = "parity-scale-codec", version = "3.0.0" } rand = { version = "0.8.5", features = ["std_rng"], default-features = false } scale-info = { version = "2.1.1", default-features = false, features = ["derive"] } -serde = { version = "1.0.140", default-features = false } +serde = { version = "1.0.141", default-features = false } sp-std = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "master" } sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "master" } diff --git a/pallets/parachain-system/Cargo.toml b/pallets/parachain-system/Cargo.toml index e115eb88b35..341f76c8726 100644 --- a/pallets/parachain-system/Cargo.toml +++ b/pallets/parachain-system/Cargo.toml @@ -6,13 +6,13 @@ edition = "2021" description = "Base pallet for cumulus-based parachains" [dependencies] -bytes = { version = "1.2.0", default-features = false } +bytes = { version = "1.2.1", default-features = false } codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } environmental = { version = "1.1.2", default-features = false } impl-trait-for-tuples = "0.2.1" log = { version = "0.4.17", default-features = false } scale-info = { version = "2.1.1", default-features = false, features = ["derive"] } -serde = { version = "1.0.140", optional = true, features = ["derive"] } +serde = { version = "1.0.141", optional = true, features = ["derive"] } # Substrate frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } diff --git a/pallets/xcm/Cargo.toml b/pallets/xcm/Cargo.toml index dda57828460..db199bd5ea6 100644 --- a/pallets/xcm/Cargo.toml +++ b/pallets/xcm/Cargo.toml @@ -7,7 +7,7 @@ version = "0.1.0" [dependencies] codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } scale-info = { version = "2.1.1", default-features = false, features = ["derive"] } -serde = { version = "1.0.140", optional = true, features = ["derive"] } +serde = { version = "1.0.141", optional = true, features = ["derive"] } sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } sp-io = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } diff --git a/parachain-template/node/Cargo.toml b/parachain-template/node/Cargo.toml index 5aff8e02c54..ff95f0eeabc 100644 --- a/parachain-template/node/Cargo.toml +++ b/parachain-template/node/Cargo.toml @@ -10,13 +10,13 @@ edition = "2021" build = "build.rs" [dependencies] -clap = { version = "3.2.15", features = ["derive"] } +clap = { version = "3.2.16", features = ["derive"] } derive_more = "0.99.2" log = "0.4.17" codec = { package = "parity-scale-codec", version = "3.0.0" } -serde = { version = "1.0.140", features = ["derive"] } +serde = { version = "1.0.141", features = ["derive"] } hex-literal = "0.3.4" -jsonrpsee = { version = "0.14.0", features = ["server"] } +jsonrpsee = { version = "0.15.1", features = ["server"] } # Local parachain-template-runtime = { path = "../runtime" } diff --git a/parachain-template/node/src/service.rs b/parachain-template/node/src/service.rs index e9f187a8543..9ad3c38e1ac 100644 --- a/parachain-template/node/src/service.rs +++ b/parachain-template/node/src/service.rs @@ -22,7 +22,7 @@ use cumulus_client_service::{ use cumulus_primitives_core::ParaId; 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 cumulus_relay_chain_rpc_interface::{create_client_and_start_worker, RelayChainRpcInterface}; // Substrate Imports use sc_client_api::ExecutorProvider; @@ -177,8 +177,10 @@ async fn build_relay_chain_interface( hwbench: Option, ) -> 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)), + Some(relay_chain_url) => { + let client = create_client_and_start_worker(relay_chain_url, task_manager).await?; + Ok((Arc::new(RelayChainRpcInterface::new(client)) as Arc<_>, None)) + }, None => build_inprocess_relay_chain( polkadot_config, parachain_config, diff --git a/parachain-template/runtime/Cargo.toml b/parachain-template/runtime/Cargo.toml index 792c238e815..a1a480a5c3e 100644 --- a/parachain-template/runtime/Cargo.toml +++ b/parachain-template/runtime/Cargo.toml @@ -19,7 +19,7 @@ codec = { package = "parity-scale-codec", version = "3.0.0", default-features = hex-literal = { version = "0.3.4", optional = true } log = { version = "0.4.17", default-features = false } scale-info = { version = "2.1.1", default-features = false, features = ["derive"] } -serde = { version = "1.0.140", optional = true, features = ["derive"] } +serde = { version = "1.0.141", optional = true, features = ["derive"] } smallvec = "1.9.0" # Local diff --git a/parachains/common/Cargo.toml b/parachains/common/Cargo.toml index 57a1eaa6ce5..dd70f4436aa 100644 --- a/parachains/common/Cargo.toml +++ b/parachains/common/Cargo.toml @@ -31,9 +31,11 @@ polkadot-primitives = { git = "https://github.com/paritytech/polkadot", default- polkadot-runtime-common = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "master" } xcm = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "master" } xcm-executor = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "master" } +xcm-builder = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "master" } # Cumulus pallet-collator-selection = { path = "../../pallets/collator-selection", default-features = false } +cumulus-primitives-utility = { path = "../../primitives/utility", default-features = false } [dev-dependencies] pallet-authorship = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } @@ -60,4 +62,6 @@ std = [ "sp-io/std", "sp-std/std", "pallet-collator-selection/std", + "cumulus-primitives-utility/std", + "xcm-builder/std" ] diff --git a/parachains/common/src/xcm_config.rs b/parachains/common/src/xcm_config.rs index d2444282175..d56876d60ca 100644 --- a/parachains/common/src/xcm_config.rs +++ b/parachains/common/src/xcm_config.rs @@ -1,5 +1,10 @@ +use crate::impls::AccountIdOf; use core::marker::PhantomData; -use frame_support::{log, weights::Weight}; +use frame_support::{ + log, + traits::{fungibles::Inspect, tokens::BalanceConversion}, + weights::{Weight, WeightToFee, WeightToFeePolynomial}, +}; use xcm::latest::prelude::*; use xcm_executor::traits::ShouldExecute; @@ -66,3 +71,39 @@ impl ShouldExecute for DenyReserveTransferToRelayChain { Ok(()) } } + +/// A `ChargeFeeInFungibles` implementation that converts the output of +/// a given WeightToFee implementation an amount charged in +/// a particular assetId from pallet-assets +pub struct AssetFeeAsExistentialDepositMultiplier( + PhantomData<(Runtime, WeightToFee, BalanceConverter)>, +); +impl + cumulus_primitives_utility::ChargeWeightInFungibles< + AccountIdOf, + pallet_assets::Pallet, + > for AssetFeeAsExistentialDepositMultiplier +where + Runtime: pallet_assets::Config, + WeightToFee: WeightToFeePolynomial, + BalanceConverter: BalanceConversion< + CurrencyBalance, + ::AssetId, + ::Balance, + >, + AccountIdOf: + From + Into, +{ + fn charge_weight_in_fungibles( + asset_id: as Inspect>>::AssetId, + weight: Weight, + ) -> Result< as Inspect>>::Balance, XcmError> + { + let amount = WeightToFee::weight_to_fee(&weight); + // If the amount gotten is not at least the ED, then make it be the ED of the asset + // This is to avoid burning assets and decreasing the supply + let asset_amount = BalanceConverter::to_asset_balance(amount, asset_id) + .map_err(|_| XcmError::TooExpensive)?; + Ok(asset_amount) + } +} diff --git a/parachains/pallets/parachain-info/Cargo.toml b/parachains/pallets/parachain-info/Cargo.toml index 9c44da7e742..da22f19a5cb 100644 --- a/parachains/pallets/parachain-info/Cargo.toml +++ b/parachains/pallets/parachain-info/Cargo.toml @@ -7,7 +7,7 @@ version = "0.1.0" [dependencies] codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } scale-info = { version = "2.1.1", default-features = false, features = ["derive"] } -serde = { version = "1.0.140", optional = true, features = ["derive"] } +serde = { version = "1.0.141", optional = true, features = ["derive"] } frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } frame-system = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } diff --git a/parachains/pallets/ping/Cargo.toml b/parachains/pallets/ping/Cargo.toml index 960e7563e51..3ce4e37963f 100644 --- a/parachains/pallets/ping/Cargo.toml +++ b/parachains/pallets/ping/Cargo.toml @@ -7,7 +7,7 @@ version = "0.1.0" [dependencies] codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } scale-info = { version = "2.1.1", default-features = false, features = ["derive"] } -serde = { version = "1.0.140", optional = true, features = ["derive"] } +serde = { version = "1.0.141", optional = true, features = ["derive"] } sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } diff --git a/parachains/runtimes/assets/statemine/Cargo.toml b/parachains/runtimes/assets/statemine/Cargo.toml index 5f450ba3b6b..8f8e3e98901 100644 --- a/parachains/runtimes/assets/statemine/Cargo.toml +++ b/parachains/runtimes/assets/statemine/Cargo.toml @@ -10,7 +10,7 @@ codec = { package = "parity-scale-codec", version = "3.0.0", default-features = hex-literal = { version = "0.3.4", optional = true } log = { version = "0.4.17", default-features = false } scale-info = { version = "2.1.1", default-features = false, features = ["derive"] } -serde = { version = "1.0.140", optional = true, features = ["derive"] } +serde = { version = "1.0.141", optional = true, features = ["derive"] } smallvec = "1.9.0" # Substrate @@ -75,6 +75,7 @@ parachains-common = { path = "../../../common", default-features = false } [dev-dependencies] hex-literal = "0.3.4" +asset-test-utils = { path = "../test-utils"} [build-dependencies] substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "master" } diff --git a/parachains/runtimes/assets/statemine/src/lib.rs b/parachains/runtimes/assets/statemine/src/lib.rs index 6d86288ce33..1312b06c6d6 100644 --- a/parachains/runtimes/assets/statemine/src/lib.rs +++ b/parachains/runtimes/assets/statemine/src/lib.rs @@ -85,10 +85,10 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("statemine"), impl_name: create_runtime_str!("statemine"), authoring_version: 1, - spec_version: 9220, + spec_version: 9230, impl_version: 0, apis: RUNTIME_API_VERSIONS, - transaction_version: 6, + transaction_version: 7, state_version: 0, }; diff --git a/parachains/runtimes/assets/statemine/src/weights/pallet_uniques.rs b/parachains/runtimes/assets/statemine/src/weights/pallet_uniques.rs index 6dd19eebae1..376a44ab79f 100644 --- a/parachains/runtimes/assets/statemine/src/weights/pallet_uniques.rs +++ b/parachains/runtimes/assets/statemine/src/weights/pallet_uniques.rs @@ -17,23 +17,25 @@ //! Autogenerated weights for `pallet_uniques` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-25, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-07-23, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm3`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("statemine-dev"), DB CACHE: 1024 // Executed Command: -// ./target/production/polkadot-parachain +// /home/benchbot/cargo_target_dir/production/polkadot-parachain // benchmark // pallet -// --chain=statemine-dev +// --steps=50 +// --repeat=20 +// --extrinsic=* // --execution=wasm // --wasm-execution=compiled +// --heap-pages=4096 // --pallet=pallet_uniques -// --extrinsic=* -// --steps=50 -// --repeat=20 -// --json-file=./bench-statemine.json +// --chain=statemine-dev +// --json-file=/var/lib/gitlab-runner/builds/zyw4fam_/0/parity/mirrors/cumulus/.git/.artifacts/bench.json // --header=./file_header.txt -// --output=./parachains/runtimes/assets/statemine/src/weights +// --output=./parachains/runtimes/assets/statemine/src/weights/pallet_uniques.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -45,19 +47,21 @@ use sp_std::marker::PhantomData; /// Weight functions for `pallet_uniques`. pub struct WeightInfo(PhantomData); impl pallet_uniques::WeightInfo for WeightInfo { + // Storage: Uniques NextCollectionId (r:1 w:1) // Storage: Uniques Class (r:1 w:1) // Storage: Uniques ClassAccount (r:0 w:1) fn create() -> Weight { - (23_692_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + (30_418_000 as Weight) + .saturating_add(T::DbWeight::get().reads(2 as Weight)) + .saturating_add(T::DbWeight::get().writes(3 as Weight)) } + // Storage: Uniques NextCollectionId (r:1 w:1) // Storage: Uniques Class (r:1 w:1) // Storage: Uniques ClassAccount (r:0 w:1) fn force_create() -> Weight { - (13_308_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + (19_165_000 as Weight) + .saturating_add(T::DbWeight::get().reads(2 as Weight)) + .saturating_add(T::DbWeight::get().writes(3 as Weight)) } // Storage: Uniques Class (r:1 w:1) // Storage: Uniques Asset (r:1 w:0) @@ -65,18 +69,22 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Storage: Uniques Attribute (r:0 w:1000) // Storage: Uniques ClassMetadataOf (r:0 w:1) // Storage: Uniques InstanceMetadataOf (r:0 w:1000) + // Storage: Uniques CollectionMaxSupply (r:0 w:1) // Storage: Uniques Account (r:0 w:20) + /// The range of component `n` is `[0, 1000]`. + /// The range of component `m` is `[0, 1000]`. + /// The range of component `a` is `[0, 1000]`. fn destroy(n: u32, m: u32, a: u32, ) -> Weight { (0 as Weight) - // Standard Error: 17_000 - .saturating_add((9_675_000 as Weight).saturating_mul(n as Weight)) - // Standard Error: 17_000 - .saturating_add((975_000 as Weight).saturating_mul(m as Weight)) - // Standard Error: 17_000 - .saturating_add((860_000 as Weight).saturating_mul(a as Weight)) + // Standard Error: 19_000 + .saturating_add((11_040_000 as Weight).saturating_mul(n as Weight)) + // Standard Error: 19_000 + .saturating_add((1_591_000 as Weight).saturating_mul(m as Weight)) + // Standard Error: 19_000 + .saturating_add((1_553_000 as Weight).saturating_mul(a as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(n as Weight))) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + .saturating_add(T::DbWeight::get().writes(4 as Weight)) .saturating_add(T::DbWeight::get().writes((2 as Weight).saturating_mul(n as Weight))) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(m as Weight))) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(a as Weight))) @@ -86,32 +94,35 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Storage: Uniques CollectionMaxSupply (r:1 w:0) // Storage: Uniques Account (r:0 w:1) fn mint() -> Weight { - (31_547_000 as Weight) + (37_027_000 as Weight) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } // Storage: Uniques Class (r:1 w:1) // Storage: Uniques Asset (r:1 w:1) // Storage: Uniques Account (r:0 w:1) + // Storage: Uniques ItemPriceOf (r:0 w:1) fn burn() -> Weight { - (30_845_000 as Weight) + (37_408_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + .saturating_add(T::DbWeight::get().writes(4 as Weight)) } // Storage: Uniques Class (r:1 w:0) // Storage: Uniques Asset (r:1 w:1) // Storage: Uniques Account (r:0 w:2) + // Storage: Uniques ItemPriceOf (r:0 w:1) fn transfer() -> Weight { - (23_188_000 as Weight) + (29_003_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + .saturating_add(T::DbWeight::get().writes(4 as Weight)) } // Storage: Uniques Class (r:1 w:1) // Storage: Uniques Asset (r:100 w:100) + /// The range of component `i` is `[0, 5000]`. fn redeposit(i: u32, ) -> Weight { (0 as Weight) - // Standard Error: 13_000 - .saturating_add((12_385_000 as Weight).saturating_mul(i as Weight)) + // Standard Error: 17_000 + .saturating_add((13_243_000 as Weight).saturating_mul(i as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(i as Weight))) .saturating_add(T::DbWeight::get().writes(1 as Weight)) @@ -120,26 +131,26 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Storage: Uniques Asset (r:1 w:1) // Storage: Uniques Class (r:1 w:0) fn freeze() -> Weight { - (18_475_000 as Weight) + (22_186_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Uniques Asset (r:1 w:1) // Storage: Uniques Class (r:1 w:0) fn thaw() -> Weight { - (18_166_000 as Weight) + (22_351_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Uniques Class (r:1 w:1) fn freeze_collection() -> Weight { - (13_385_000 as Weight) + (17_528_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Uniques Class (r:1 w:1) fn thaw_collection() -> Weight { - (13_377_000 as Weight) + (17_530_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } @@ -147,20 +158,20 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Storage: Uniques Class (r:1 w:1) // Storage: Uniques ClassAccount (r:0 w:2) fn transfer_ownership() -> Weight { - (20_471_000 as Weight) + (25_794_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } // Storage: Uniques Class (r:1 w:1) fn set_team() -> Weight { - (13_902_000 as Weight) + (18_102_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Uniques Class (r:1 w:1) // Storage: Uniques ClassAccount (r:0 w:1) fn force_item_status() -> Weight { - (16_642_000 as Weight) + (21_774_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } @@ -168,7 +179,7 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Storage: Uniques InstanceMetadataOf (r:1 w:0) // Storage: Uniques Attribute (r:1 w:1) fn set_attribute() -> Weight { - (37_957_000 as Weight) + (42_889_000 as Weight) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } @@ -176,77 +187,86 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Storage: Uniques InstanceMetadataOf (r:1 w:0) // Storage: Uniques Attribute (r:1 w:1) fn clear_attribute() -> Weight { - (35_937_000 as Weight) + (41_233_000 as Weight) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Uniques Class (r:1 w:1) // Storage: Uniques InstanceMetadataOf (r:1 w:1) fn set_metadata() -> Weight { - (30_125_000 as Weight) + (34_201_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Uniques Class (r:1 w:1) // Storage: Uniques InstanceMetadataOf (r:1 w:1) fn clear_metadata() -> Weight { - (29_919_000 as Weight) + (35_387_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Uniques Class (r:1 w:1) // Storage: Uniques ClassMetadataOf (r:1 w:1) fn set_collection_metadata() -> Weight { - (28_912_000 as Weight) + (34_499_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Uniques Class (r:1 w:0) // Storage: Uniques ClassMetadataOf (r:1 w:1) fn clear_collection_metadata() -> Weight { - (26_897_000 as Weight) + (32_426_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Uniques Class (r:1 w:0) // Storage: Uniques Asset (r:1 w:1) fn approve_transfer() -> Weight { - (19_927_000 as Weight) + (23_660_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Uniques Class (r:1 w:0) // Storage: Uniques Asset (r:1 w:1) fn cancel_approval() -> Weight { - (19_894_000 as Weight) + (23_711_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Uniques OwnershipAcceptance (r:1 w:1) fn set_accept_ownership() -> Weight { - (17_053_000 as Weight) + (21_147_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Uniques CollectionMaxSupply (r:1 w:1) // Storage: Uniques Class (r:1 w:0) fn set_collection_max_supply() -> Weight { - (16_929_000 as Weight) + (20_939_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } - // Storage: Uniques CollectionMaxSupply (r:1 w:1) + // Storage: Uniques NextCollectionId (r:1 w:1) // Storage: Uniques Class (r:1 w:0) - fn set_price() -> Weight { - (16_929_000 as Weight) + fn try_increment_id() -> Weight { + (19_318_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } - // Storage: Uniques CollectionMaxSupply (r:1 w:1) + // Storage: Uniques Asset (r:1 w:0) + // Storage: Uniques ItemPriceOf (r:0 w:1) + fn set_price() -> Weight { + (20_073_000 as Weight) + .saturating_add(T::DbWeight::get().reads(1 as Weight)) + .saturating_add(T::DbWeight::get().writes(1 as Weight)) + } + // Storage: Uniques Asset (r:1 w:1) + // Storage: Uniques ItemPriceOf (r:1 w:1) // Storage: Uniques Class (r:1 w:0) + // Storage: Uniques Account (r:0 w:2) fn buy_item() -> Weight { - (16_929_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + (39_849_000 as Weight) + .saturating_add(T::DbWeight::get().reads(3 as Weight)) + .saturating_add(T::DbWeight::get().writes(4 as Weight)) } } diff --git a/parachains/runtimes/assets/statemine/src/xcm_config.rs b/parachains/runtimes/assets/statemine/src/xcm_config.rs index ce6fd18f91d..3875cf7901b 100644 --- a/parachains/runtimes/assets/statemine/src/xcm_config.rs +++ b/parachains/runtimes/assets/statemine/src/xcm_config.rs @@ -14,7 +14,7 @@ // limitations under the License. use super::{ - AccountId, AssetId, Assets, Balance, Balances, Call, Event, Origin, ParachainInfo, + AccountId, AssetId, Assets, Authorship, Balance, Balances, Call, Event, Origin, ParachainInfo, ParachainSystem, PolkadotXcm, Runtime, WeightToFee, XcmpQueue, }; use frame_support::{ @@ -25,9 +25,12 @@ use frame_support::{ use pallet_xcm::XcmPassthrough; use parachains_common::{ impls::ToStakingPot, - xcm_config::{DenyReserveTransferToRelayChain, DenyThenTry}, + xcm_config::{ + AssetFeeAsExistentialDepositMultiplier, DenyReserveTransferToRelayChain, DenyThenTry, + }, }; use polkadot_parachain::primitives::Sibling; +use sp_runtime::traits::ConvertInto; use xcm::latest::prelude::*; use xcm_builder::{ AccountId32Aliases, AllowKnownQueryResponses, AllowSubscriptionsFrom, @@ -129,6 +132,7 @@ parameter_types! { // One XCM operation is 1_000_000_000 weight - almost certainly a conservative estimate. pub UnitWeightCost: Weight = 1_000_000_000; pub const MaxInstructions: u32 = 100; + pub XcmAssetFeesReceiver: Option = Authorship::author(); } match_types! { @@ -170,8 +174,29 @@ impl xcm_executor::Config for XcmConfig { type LocationInverter = LocationInverter; type Barrier = Barrier; type Weigher = FixedWeightBounds; - type Trader = - UsingComponents>; + type Trader = ( + UsingComponents>, + cumulus_primitives_utility::TakeFirstAssetTrader< + AccountId, + AssetFeeAsExistentialDepositMultiplier< + Runtime, + WeightToFee, + pallet_assets::BalanceToAssetBalance, + >, + ConvertedConcreteAssetId< + AssetId, + Balance, + AsPrefixedGeneralIndex, + JustTry, + >, + Assets, + cumulus_primitives_utility::XcmFeesTo32ByteAccount< + FungiblesTransactor, + AccountId, + XcmAssetFeesReceiver, + >, + >, + ); type ResponseHandler = PolkadotXcm; type AssetTrap = PolkadotXcm; type AssetClaims = PolkadotXcm; diff --git a/parachains/runtimes/assets/statemine/tests/tests.rs b/parachains/runtimes/assets/statemine/tests/tests.rs new file mode 100644 index 00000000000..c99debbced4 --- /dev/null +++ b/parachains/runtimes/assets/statemine/tests/tests.rs @@ -0,0 +1,301 @@ +use asset_test_utils::{ExtBuilder, RuntimeHelper}; +use frame_support::{ + assert_noop, assert_ok, traits::PalletInfo, weights::WeightToFee as WeightToFeeT, +}; +use parachains_common::{AccountId, AuraId}; +pub use statemine_runtime::{ + constants::fee::WeightToFee, xcm_config::XcmConfig, Assets, Balances, ExistentialDeposit, + Runtime, SessionKeys, System, +}; +use xcm::latest::prelude::*; +use xcm_executor::traits::WeightTrader; +pub const ALICE: [u8; 32] = [1u8; 32]; + +#[test] +fn test_asset_xcm_trader() { + ExtBuilder::::default() + .with_collators(vec![AccountId::from(ALICE)]) + .with_session_keys(vec![( + AccountId::from(ALICE), + AccountId::from(ALICE), + SessionKeys { aura: AuraId::from(sp_core::sr25519::Public::from_raw(ALICE)) }, + )]) + .build() + .execute_with(|| { + // We need root origin to create a sufficient asset + // We set existential deposit to be identical to the one for Balances first + assert_ok!(Assets::force_create( + RuntimeHelper::::root_origin(), + 1, + AccountId::from(ALICE).into(), + true, + ExistentialDeposit::get() + )); + + // We first mint enough asset for the account to exist for assets + assert_ok!(Assets::mint( + RuntimeHelper::::origin_of(AccountId::from(ALICE)), + 1, + AccountId::from(ALICE).into(), + ExistentialDeposit::get() + )); + + let mut trader = ::Trader::new(); + + // Set Alice as block author, who will receive fees + RuntimeHelper::::run_to_block(2, Some(AccountId::from(ALICE))); + + // We are going to buy 4e9 weight + let bought = 4_000_000_000u64; + + // lets calculate amount needed + let amount_needed = WeightToFee::weight_to_fee(&bought); + + let asset_multilocation = MultiLocation::new( + 0, + X2( + PalletInstance( + ::PalletInfo::index::().unwrap() + as u8, + ), + GeneralIndex(1), + ), + ); + + let asset: MultiAsset = (asset_multilocation, amount_needed).into(); + + // Make sure buy_weight does not return an error + assert_ok!(trader.buy_weight(bought, asset.into())); + + // Drop trader + drop(trader); + + // Make sure author(Alice) has received the amount + assert_eq!( + Assets::balance(1, AccountId::from(ALICE)), + ExistentialDeposit::get() + amount_needed + ); + + // We also need to ensure the total supply increased + assert_eq!(Assets::total_supply(1), ExistentialDeposit::get() + amount_needed); + }); +} + +#[test] +fn test_asset_xcm_trader_with_refund() { + ExtBuilder::::default() + .with_collators(vec![AccountId::from(ALICE)]) + .with_session_keys(vec![( + AccountId::from(ALICE), + AccountId::from(ALICE), + SessionKeys { aura: AuraId::from(sp_core::sr25519::Public::from_raw(ALICE)) }, + )]) + .build() + .execute_with(|| { + // We need root origin to create a sufficient asset + // We set existential deposit to be identical to the one for Balances first + assert_ok!(Assets::force_create( + RuntimeHelper::::root_origin(), + 1, + AccountId::from(ALICE).into(), + true, + ExistentialDeposit::get() + )); + + // We first mint enough asset for the account to exist for assets + assert_ok!(Assets::mint( + RuntimeHelper::::origin_of(AccountId::from(ALICE)), + 1, + AccountId::from(ALICE).into(), + ExistentialDeposit::get() + )); + + let mut trader = ::Trader::new(); + + // Set Alice as block author, who will receive fees + RuntimeHelper::::run_to_block(2, Some(AccountId::from(ALICE))); + + // We are going to buy 4e9 weight + let bought = 4_000_000_000u64; + + let asset_multilocation = MultiLocation::new( + 0, + X2( + PalletInstance( + ::PalletInfo::index::().unwrap() + as u8, + ), + GeneralIndex(1), + ), + ); + + // lets calculate amount needed + let amount_bought = WeightToFee::weight_to_fee(&bought); + + let asset: MultiAsset = (asset_multilocation.clone(), amount_bought).into(); + + // Make sure buy_weight does not return an error + assert_ok!(trader.buy_weight(bought, asset.clone().into())); + + // Make sure again buy_weight does return an error + assert_noop!(trader.buy_weight(bought, asset.into()), XcmError::NotWithdrawable); + + // We actually use half of the weight + let weight_used = bought / 2; + + // Make sure refurnd works. + let amount_refunded = WeightToFee::weight_to_fee(&(bought - weight_used)); + + assert_eq!( + trader.refund_weight(bought - weight_used), + Some((asset_multilocation, amount_refunded).into()) + ); + + // Drop trader + drop(trader); + + // We only should have paid for half of the bought weight + let fees_paid = WeightToFee::weight_to_fee(&weight_used); + + assert_eq!( + Assets::balance(1, AccountId::from(ALICE)), + ExistentialDeposit::get() + fees_paid + ); + + // We also need to ensure the total supply increased + assert_eq!(Assets::total_supply(1), ExistentialDeposit::get() + fees_paid); + }); +} + +#[test] +fn test_asset_xcm_trader_refund_not_possible_since_amount_less_than_ed() { + ExtBuilder::::default() + .with_collators(vec![AccountId::from(ALICE)]) + .with_session_keys(vec![( + AccountId::from(ALICE), + AccountId::from(ALICE), + SessionKeys { aura: AuraId::from(sp_core::sr25519::Public::from_raw(ALICE)) }, + )]) + .build() + .execute_with(|| { + // We need root origin to create a sufficient asset + // We set existential deposit to be identical to the one for Balances first + assert_ok!(Assets::force_create( + RuntimeHelper::::root_origin(), + 1, + AccountId::from(ALICE).into(), + true, + ExistentialDeposit::get() + )); + + let mut trader = ::Trader::new(); + + // Set Alice as block author, who will receive fees + RuntimeHelper::::run_to_block(2, Some(AccountId::from(ALICE))); + + // We are going to buy small amount + let bought = 500_000_000u64; + + let asset_multilocation = MultiLocation::new( + 0, + X2( + PalletInstance( + ::PalletInfo::index::().unwrap() + as u8, + ), + GeneralIndex(1), + ), + ); + + let amount_bought = WeightToFee::weight_to_fee(&bought); + + assert!( + amount_bought < ExistentialDeposit::get(), + "we are testing what happens when the amount does not exceed ED" + ); + + let asset: MultiAsset = (asset_multilocation.clone(), amount_bought).into(); + + // Buy weight should return an error + assert_noop!(trader.buy_weight(bought, asset.into()), XcmError::TooExpensive); + + // not credited since the ED is higher than this value + assert_eq!(Assets::balance(1, AccountId::from(ALICE)), 0); + + // We also need to ensure the total supply did not increase + assert_eq!(Assets::total_supply(1), 0); + }); +} + +#[test] +fn test_that_buying_ed_refund_does_not_refund() { + ExtBuilder::::default() + .with_collators(vec![AccountId::from(ALICE)]) + .with_session_keys(vec![( + AccountId::from(ALICE), + AccountId::from(ALICE), + SessionKeys { aura: AuraId::from(sp_core::sr25519::Public::from_raw(ALICE)) }, + )]) + .build() + .execute_with(|| { + // We need root origin to create a sufficient asset + // We set existential deposit to be identical to the one for Balances first + assert_ok!(Assets::force_create( + RuntimeHelper::::root_origin(), + 1, + AccountId::from(ALICE).into(), + true, + ExistentialDeposit::get() + )); + + let mut trader = ::Trader::new(); + + // Set Alice as block author, who will receive fees + RuntimeHelper::::run_to_block(2, Some(AccountId::from(ALICE))); + + // We are gonna buy ED + let bought: u64 = ExistentialDeposit::get().try_into().unwrap(); + + let asset_multilocation = MultiLocation::new( + 0, + X2( + PalletInstance( + ::PalletInfo::index::().unwrap() + as u8, + ), + GeneralIndex(1), + ), + ); + + let amount_bought = WeightToFee::weight_to_fee(&bought); + + assert!( + amount_bought < ExistentialDeposit::get(), + "we are testing what happens when the amount does not exceed ED" + ); + + // We know we will have to buy at least ED, so lets make sure first it will + // fail with a payment of less than ED + let asset: MultiAsset = (asset_multilocation.clone(), amount_bought).into(); + assert_noop!(trader.buy_weight(bought, asset.into()), XcmError::TooExpensive); + + // Now lets buy ED at least + let asset: MultiAsset = (asset_multilocation.clone(), ExistentialDeposit::get()).into(); + + // Buy weight should work + assert_ok!(trader.buy_weight(bought, asset.into())); + + // Should return None. We have a specific check making sure we dont go below ED for + // drop payment + assert_eq!(trader.refund_weight(bought), None); + + // Drop trader + drop(trader); + + // Make sure author(Alice) has received the amount + assert_eq!(Assets::balance(1, AccountId::from(ALICE)), ExistentialDeposit::get()); + + // We also need to ensure the total supply increased + assert_eq!(Assets::total_supply(1), ExistentialDeposit::get()); + }); +} diff --git a/parachains/runtimes/assets/statemint/Cargo.toml b/parachains/runtimes/assets/statemint/Cargo.toml index bbbe2890326..2e713322de6 100644 --- a/parachains/runtimes/assets/statemint/Cargo.toml +++ b/parachains/runtimes/assets/statemint/Cargo.toml @@ -9,7 +9,7 @@ description = "Statemint parachain runtime" 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 } log = { version = "0.4.17", default-features = false } -serde = { version = "1.0.140", optional = true, features = ["derive"] } +serde = { version = "1.0.141", optional = true, features = ["derive"] } scale-info = { version = "2.1.1", default-features = false, features = ["derive"] } smallvec = "1.9.0" @@ -74,6 +74,7 @@ parachains-common = { path = "../../../common", default-features = false } [dev-dependencies] hex-literal = "0.3.4" +asset-test-utils = { path = "../test-utils"} [build-dependencies] substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "master" } diff --git a/parachains/runtimes/assets/statemint/src/lib.rs b/parachains/runtimes/assets/statemint/src/lib.rs index 0033e6b5f0c..099fe4e4bb8 100644 --- a/parachains/runtimes/assets/statemint/src/lib.rs +++ b/parachains/runtimes/assets/statemint/src/lib.rs @@ -115,10 +115,10 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("statemint"), impl_name: create_runtime_str!("statemint"), authoring_version: 1, - spec_version: 9220, + spec_version: 9230, impl_version: 0, apis: RUNTIME_API_VERSIONS, - transaction_version: 6, + transaction_version: 7, state_version: 0, }; diff --git a/parachains/runtimes/assets/statemint/src/weights/pallet_uniques.rs b/parachains/runtimes/assets/statemint/src/weights/pallet_uniques.rs index ca35bdf945d..340d2a967fd 100644 --- a/parachains/runtimes/assets/statemint/src/weights/pallet_uniques.rs +++ b/parachains/runtimes/assets/statemint/src/weights/pallet_uniques.rs @@ -17,23 +17,25 @@ //! Autogenerated weights for `pallet_uniques` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-25, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-07-23, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm3`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("statemint-dev"), DB CACHE: 1024 // Executed Command: -// ./target/production/polkadot-parachain +// /home/benchbot/cargo_target_dir/production/polkadot-parachain // benchmark // pallet -// --chain=statemint-dev +// --steps=50 +// --repeat=20 +// --extrinsic=* // --execution=wasm // --wasm-execution=compiled +// --heap-pages=4096 // --pallet=pallet_uniques -// --extrinsic=* -// --steps=50 -// --repeat=20 -// --json-file=./bench-statemint.json +// --chain=statemint-dev +// --json-file=/var/lib/gitlab-runner/builds/zyw4fam_/0/parity/mirrors/cumulus/.git/.artifacts/bench.json // --header=./file_header.txt -// --output=./parachains/runtimes/assets/statemint/src/weights +// --output=./parachains/runtimes/assets/statemint/src/weights/pallet_uniques.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -45,19 +47,21 @@ use sp_std::marker::PhantomData; /// Weight functions for `pallet_uniques`. pub struct WeightInfo(PhantomData); impl pallet_uniques::WeightInfo for WeightInfo { + // Storage: Uniques NextCollectionId (r:1 w:1) // Storage: Uniques Class (r:1 w:1) // Storage: Uniques ClassAccount (r:0 w:1) fn create() -> Weight { - (22_749_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + (29_281_000 as Weight) + .saturating_add(T::DbWeight::get().reads(2 as Weight)) + .saturating_add(T::DbWeight::get().writes(3 as Weight)) } + // Storage: Uniques NextCollectionId (r:1 w:1) // Storage: Uniques Class (r:1 w:1) // Storage: Uniques ClassAccount (r:0 w:1) fn force_create() -> Weight { - (13_806_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + (18_557_000 as Weight) + .saturating_add(T::DbWeight::get().reads(2 as Weight)) + .saturating_add(T::DbWeight::get().writes(3 as Weight)) } // Storage: Uniques Class (r:1 w:1) // Storage: Uniques Asset (r:1 w:0) @@ -65,18 +69,22 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Storage: Uniques Attribute (r:0 w:1000) // Storage: Uniques ClassMetadataOf (r:0 w:1) // Storage: Uniques InstanceMetadataOf (r:0 w:1000) + // Storage: Uniques CollectionMaxSupply (r:0 w:1) // Storage: Uniques Account (r:0 w:20) + /// The range of component `n` is `[0, 1000]`. + /// The range of component `m` is `[0, 1000]`. + /// The range of component `a` is `[0, 1000]`. fn destroy(n: u32, m: u32, a: u32, ) -> Weight { (0 as Weight) - // Standard Error: 16_000 - .saturating_add((9_523_000 as Weight).saturating_mul(n as Weight)) - // Standard Error: 16_000 - .saturating_add((1_015_000 as Weight).saturating_mul(m as Weight)) - // Standard Error: 16_000 - .saturating_add((957_000 as Weight).saturating_mul(a as Weight)) + // Standard Error: 18_000 + .saturating_add((10_816_000 as Weight).saturating_mul(n as Weight)) + // Standard Error: 18_000 + .saturating_add((1_732_000 as Weight).saturating_mul(m as Weight)) + // Standard Error: 18_000 + .saturating_add((1_442_000 as Weight).saturating_mul(a as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(n as Weight))) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + .saturating_add(T::DbWeight::get().writes(4 as Weight)) .saturating_add(T::DbWeight::get().writes((2 as Weight).saturating_mul(n as Weight))) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(m as Weight))) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(a as Weight))) @@ -86,32 +94,35 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Storage: Uniques CollectionMaxSupply (r:1 w:0) // Storage: Uniques Account (r:0 w:1) fn mint() -> Weight { - (31_084_000 as Weight) + (35_779_000 as Weight) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } // Storage: Uniques Class (r:1 w:1) // Storage: Uniques Asset (r:1 w:1) // Storage: Uniques Account (r:0 w:1) + // Storage: Uniques ItemPriceOf (r:0 w:1) fn burn() -> Weight { - (30_007_000 as Weight) + (36_526_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + .saturating_add(T::DbWeight::get().writes(4 as Weight)) } // Storage: Uniques Class (r:1 w:0) // Storage: Uniques Asset (r:1 w:1) // Storage: Uniques Account (r:0 w:2) + // Storage: Uniques ItemPriceOf (r:0 w:1) fn transfer() -> Weight { - (23_247_000 as Weight) + (28_542_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + .saturating_add(T::DbWeight::get().writes(4 as Weight)) } // Storage: Uniques Class (r:1 w:1) // Storage: Uniques Asset (r:100 w:100) + /// The range of component `i` is `[0, 5000]`. fn redeposit(i: u32, ) -> Weight { (0 as Weight) - // Standard Error: 12_000 - .saturating_add((12_143_000 as Weight).saturating_mul(i as Weight)) + // Standard Error: 17_000 + .saturating_add((12_725_000 as Weight).saturating_mul(i as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(i as Weight))) .saturating_add(T::DbWeight::get().writes(1 as Weight)) @@ -120,26 +131,26 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Storage: Uniques Asset (r:1 w:1) // Storage: Uniques Class (r:1 w:0) fn freeze() -> Weight { - (17_750_000 as Weight) + (21_639_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Uniques Asset (r:1 w:1) // Storage: Uniques Class (r:1 w:0) fn thaw() -> Weight { - (17_991_000 as Weight) + (21_492_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Uniques Class (r:1 w:1) fn freeze_collection() -> Weight { - (13_329_000 as Weight) + (16_979_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Uniques Class (r:1 w:1) fn thaw_collection() -> Weight { - (13_084_000 as Weight) + (17_112_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } @@ -147,20 +158,20 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Storage: Uniques Class (r:1 w:1) // Storage: Uniques ClassAccount (r:0 w:2) fn transfer_ownership() -> Weight { - (20_520_000 as Weight) + (25_141_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } // Storage: Uniques Class (r:1 w:1) fn set_team() -> Weight { - (13_873_000 as Weight) + (17_566_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Uniques Class (r:1 w:1) // Storage: Uniques ClassAccount (r:0 w:1) fn force_item_status() -> Weight { - (15_979_000 as Weight) + (20_435_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } @@ -168,7 +179,7 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Storage: Uniques InstanceMetadataOf (r:1 w:0) // Storage: Uniques Attribute (r:1 w:1) fn set_attribute() -> Weight { - (37_161_000 as Weight) + (42_154_000 as Weight) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } @@ -176,77 +187,86 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Storage: Uniques InstanceMetadataOf (r:1 w:0) // Storage: Uniques Attribute (r:1 w:1) fn clear_attribute() -> Weight { - (35_578_000 as Weight) + (40_247_000 as Weight) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Uniques Class (r:1 w:1) // Storage: Uniques InstanceMetadataOf (r:1 w:1) fn set_metadata() -> Weight { - (29_693_000 as Weight) + (34_154_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Uniques Class (r:1 w:1) // Storage: Uniques InstanceMetadataOf (r:1 w:1) fn clear_metadata() -> Weight { - (29_248_000 as Weight) + (34_669_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Uniques Class (r:1 w:1) // Storage: Uniques ClassMetadataOf (r:1 w:1) fn set_collection_metadata() -> Weight { - (28_479_000 as Weight) + (33_074_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Uniques Class (r:1 w:0) // Storage: Uniques ClassMetadataOf (r:1 w:1) fn clear_collection_metadata() -> Weight { - (26_495_000 as Weight) + (31_386_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Uniques Class (r:1 w:0) // Storage: Uniques Asset (r:1 w:1) fn approve_transfer() -> Weight { - (19_533_000 as Weight) + (23_487_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Uniques Class (r:1 w:0) // Storage: Uniques Asset (r:1 w:1) fn cancel_approval() -> Weight { - (19_479_000 as Weight) + (23_421_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Uniques OwnershipAcceptance (r:1 w:1) fn set_accept_ownership() -> Weight { - (16_551_000 as Weight) + (20_865_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Uniques CollectionMaxSupply (r:1 w:1) // Storage: Uniques Class (r:1 w:0) fn set_collection_max_supply() -> Weight { - (16_254_000 as Weight) + (20_451_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } - // Storage: Uniques CollectionMaxSupply (r:1 w:1) + // Storage: Uniques NextCollectionId (r:1 w:1) // Storage: Uniques Class (r:1 w:0) - fn set_price() -> Weight { - (16_254_000 as Weight) + fn try_increment_id() -> Weight { + (18_496_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } - // Storage: Uniques CollectionMaxSupply (r:1 w:1) + // Storage: Uniques Asset (r:1 w:0) + // Storage: Uniques ItemPriceOf (r:0 w:1) + fn set_price() -> Weight { + (19_952_000 as Weight) + .saturating_add(T::DbWeight::get().reads(1 as Weight)) + .saturating_add(T::DbWeight::get().writes(1 as Weight)) + } + // Storage: Uniques Asset (r:1 w:1) + // Storage: Uniques ItemPriceOf (r:1 w:1) // Storage: Uniques Class (r:1 w:0) + // Storage: Uniques Account (r:0 w:2) fn buy_item() -> Weight { - (16_254_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + (39_750_000 as Weight) + .saturating_add(T::DbWeight::get().reads(3 as Weight)) + .saturating_add(T::DbWeight::get().writes(4 as Weight)) } } diff --git a/parachains/runtimes/assets/statemint/src/xcm_config.rs b/parachains/runtimes/assets/statemint/src/xcm_config.rs index a8c652588cb..abfe9bb9865 100644 --- a/parachains/runtimes/assets/statemint/src/xcm_config.rs +++ b/parachains/runtimes/assets/statemint/src/xcm_config.rs @@ -14,7 +14,7 @@ // limitations under the License. use super::{ - AccountId, AssetId, Assets, Balance, Balances, Call, Event, Origin, ParachainInfo, + AccountId, AssetId, Assets, Authorship, Balance, Balances, Call, Event, Origin, ParachainInfo, ParachainSystem, PolkadotXcm, Runtime, WeightToFee, XcmpQueue, }; use frame_support::{ @@ -129,6 +129,7 @@ parameter_types! { // One XCM operation is 1_000_000_000 weight - almost certainly a conservative estimate. pub UnitWeightCost: Weight = 1_000_000_000; pub const MaxInstructions: u32 = 100; + pub XcmAssetFeesReceiver: Option = Authorship::author(); } match_types! { diff --git a/parachains/runtimes/assets/statemint/tests/tests.rs b/parachains/runtimes/assets/statemint/tests/tests.rs new file mode 100644 index 00000000000..518936210f2 --- /dev/null +++ b/parachains/runtimes/assets/statemint/tests/tests.rs @@ -0,0 +1,71 @@ +use asset_test_utils::{ExtBuilder, RuntimeHelper}; +use frame_support::{ + assert_noop, assert_ok, traits::PalletInfo, weights::WeightToFee as WeightToFeeT, +}; +use parachains_common::{AccountId, StatemintAuraId as AuraId}; +pub use statemint_runtime::{ + constants::fee::WeightToFee, xcm_config::XcmConfig, Assets, Balances, ExistentialDeposit, + Runtime, SessionKeys, System, +}; +use xcm::latest::prelude::*; +use xcm_executor::traits::WeightTrader; +pub const ALICE: [u8; 32] = [1u8; 32]; + +#[test] +fn test_asset_xcm_trader_does_not_work_in_statemine() { + ExtBuilder::::default() + .with_collators(vec![AccountId::from(ALICE)]) + .with_session_keys(vec![( + AccountId::from(ALICE), + AccountId::from(ALICE), + SessionKeys { aura: AuraId::from(sp_core::ed25519::Public::from_raw(ALICE)) }, + )]) + .build() + .execute_with(|| { + // We need root origin to create a sufficient asset + // We set existential deposit to be identical to the one for Balances first + assert_ok!(Assets::force_create( + RuntimeHelper::::root_origin(), + 1, + AccountId::from(ALICE).into(), + true, + ExistentialDeposit::get() + )); + + let mut trader = ::Trader::new(); + + // Set Alice as block author, who will receive fees + RuntimeHelper::::run_to_block(2, Some(AccountId::from(ALICE))); + + // We are going to buy 400e9 weight + // Because of the ED being higher in statemine + // and not to complicate things, we use a little + // bit more of weight + let bought = 400_000_000_000u64; + + // lets calculate amount needed + let amount_needed = WeightToFee::weight_to_fee(&bought); + + let asset_multilocation = MultiLocation::new( + 0, + X2( + PalletInstance( + ::PalletInfo::index::().unwrap() + as u8, + ), + GeneralIndex(1), + ), + ); + + let asset: MultiAsset = (asset_multilocation, amount_needed).into(); + + // Buy weight should return an error, since asset trader not installed + assert_noop!(trader.buy_weight(bought, asset.into()), XcmError::TooExpensive); + + // not credited since the ED is higher than this value + assert_eq!(Assets::balance(1, AccountId::from(ALICE)), 0); + + // We also need to ensure the total supply did not increase + assert_eq!(Assets::total_supply(1), 0); + }); +} diff --git a/parachains/runtimes/assets/test-utils/Cargo.toml b/parachains/runtimes/assets/test-utils/Cargo.toml new file mode 100644 index 00000000000..52ce1d2d9a8 --- /dev/null +++ b/parachains/runtimes/assets/test-utils/Cargo.toml @@ -0,0 +1,45 @@ +[package] +name = "asset-test-utils" +version = "1.0.0" +authors = ["Parity Technologies "] +edition = "2021" +description = "Statemint parachain runtime" + +[dependencies] + +# Substrate + +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } +pallet-balances = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } +pallet-session = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } +sp-consensus-aura = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } +sp-core = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } + +# Cumulus +pallet-collator-selection = { path = "../../../../pallets/collator-selection", default-features = false } +parachains-common = { path = "../../../common", default-features = false } + +[dev-dependencies] +hex-literal = "0.3.4" + +[build-dependencies] +substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "master" } + +[features] +default = [ "std" ] +std = [ + "frame-support/std", + "frame-system/std", + "pallet-balances/std", + "pallet-collator-selection/std", + "pallet-session/std", + "parachains-common/std", + "sp-consensus-aura/std", + "sp-io/std", + "sp-runtime/std", + "sp-std/std", +] diff --git a/parachains/runtimes/assets/test-utils/src/lib.rs b/parachains/runtimes/assets/test-utils/src/lib.rs new file mode 100644 index 00000000000..f37465e5bd6 --- /dev/null +++ b/parachains/runtimes/assets/test-utils/src/lib.rs @@ -0,0 +1,134 @@ +use frame_support::traits::GenesisBuild; +use sp_std::marker::PhantomData; + +use frame_support::traits::OriginTrait; +use parachains_common::AccountId; +use sp_consensus_aura::AURA_ENGINE_ID; +use sp_core::Encode; +use sp_runtime::{Digest, DigestItem}; + +pub type BalanceOf = ::Balance; +pub type AccountIdOf = ::AccountId; +pub type ValidatorIdOf = ::ValidatorId; +pub type SessionKeysOf = ::Keys; + +// Basic builder based on balances, collators and pallet_sessopm +pub struct ExtBuilder< + Runtime: frame_system::Config + pallet_balances::Config + pallet_session::Config, +> { + // endowed accounts with balances + balances: Vec<(AccountIdOf, BalanceOf)>, + // collators to test block prod + collators: Vec>, + // keys added to pallet session + keys: Vec<(AccountIdOf, ValidatorIdOf, SessionKeysOf)>, + _runtime: PhantomData, +} + +impl Default + for ExtBuilder +{ + fn default() -> ExtBuilder { + ExtBuilder { balances: vec![], collators: vec![], keys: vec![], _runtime: PhantomData } + } +} + +impl + ExtBuilder +{ + pub fn with_balances( + mut self, + balances: Vec<(AccountIdOf, BalanceOf)>, + ) -> Self { + self.balances = balances; + self + } + pub fn with_collators(mut self, collators: Vec>) -> Self { + self.collators = collators; + self + } + + pub fn with_session_keys( + mut self, + keys: Vec<(AccountIdOf, ValidatorIdOf, SessionKeysOf)>, + ) -> Self { + self.keys = keys; + self + } + + pub fn build(self) -> sp_io::TestExternalities + where + Runtime: + pallet_collator_selection::Config + pallet_balances::Config + pallet_session::Config, + ValidatorIdOf: From>, + { + let mut t = frame_system::GenesisConfig::default().build_storage::().unwrap(); + + pallet_balances::GenesisConfig:: { balances: self.balances.into() } + .assimilate_storage(&mut t) + .unwrap(); + + pallet_collator_selection::GenesisConfig:: { + invulnerables: self.collators.clone().into(), + candidacy_bond: Default::default(), + desired_candidates: Default::default(), + } + .assimilate_storage(&mut t) + .unwrap(); + + pallet_session::GenesisConfig:: { keys: self.keys } + .assimilate_storage(&mut t) + .unwrap(); + + let mut ext = sp_io::TestExternalities::new(t); + + ext.execute_with(|| { + frame_system::Pallet::::set_block_number(1u32.into()); + }); + + ext + } +} + +pub struct RuntimeHelper(PhantomData); +/// Utility function that advances the chain to the desired block number. +/// If an author is provided, that author information is injected to all the blocks in the meantime. +impl RuntimeHelper +where + AccountIdOf: + Into<<::Origin as OriginTrait>::AccountId>, +{ + pub fn run_to_block(n: u32, author: Option) { + while frame_system::Pallet::::block_number() < n.into() { + // Set the new block number and author + match author { + Some(ref author) => { + let pre_digest = Digest { + logs: vec![DigestItem::PreRuntime(AURA_ENGINE_ID, author.encode())], + }; + frame_system::Pallet::::reset_events(); + frame_system::Pallet::::initialize( + &(frame_system::Pallet::::block_number() + 1u32.into()), + &frame_system::Pallet::::parent_hash(), + &pre_digest, + ); + }, + None => { + frame_system::Pallet::::set_block_number( + frame_system::Pallet::::block_number() + 1u32.into(), + ); + }, + } + } + } + + pub fn root_origin() -> ::Origin { + ::Origin::root() + } + + pub fn origin_of( + account_id: AccountIdOf, + ) -> ::Origin { + ::Origin::signed(account_id.into()) + } +} diff --git a/parachains/runtimes/assets/westmint/Cargo.toml b/parachains/runtimes/assets/westmint/Cargo.toml index 06058937fd1..4a06a86fac6 100644 --- a/parachains/runtimes/assets/westmint/Cargo.toml +++ b/parachains/runtimes/assets/westmint/Cargo.toml @@ -10,7 +10,7 @@ codec = { package = "parity-scale-codec", version = "3.0.0", default-features = hex-literal = { version = "0.3.4", optional = true } log = { version = "0.4.17", default-features = false } scale-info = { version = "2.1.1", default-features = false, features = ["derive"] } -serde = { version = "1.0.140", optional = true, features = ["derive"] } +serde = { version = "1.0.141", optional = true, features = ["derive"] } smallvec = "1.9.0" # Substrate @@ -74,6 +74,7 @@ parachains-common = { path = "../../../common", default-features = false } [dev-dependencies] hex-literal = "0.3.4" +asset-test-utils = { path = "../test-utils"} [build-dependencies] substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "master" } diff --git a/parachains/runtimes/assets/westmint/src/lib.rs b/parachains/runtimes/assets/westmint/src/lib.rs index 494c0cc38c3..dfcfc8ffa18 100644 --- a/parachains/runtimes/assets/westmint/src/lib.rs +++ b/parachains/runtimes/assets/westmint/src/lib.rs @@ -83,10 +83,10 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("westmint"), impl_name: create_runtime_str!("westmint"), authoring_version: 1, - spec_version: 9220, + spec_version: 9230, impl_version: 0, apis: RUNTIME_API_VERSIONS, - transaction_version: 6, + transaction_version: 7, state_version: 0, }; diff --git a/parachains/runtimes/assets/westmint/src/weights/pallet_uniques.rs b/parachains/runtimes/assets/westmint/src/weights/pallet_uniques.rs index ab14a7b7fc6..fcdccf6df22 100644 --- a/parachains/runtimes/assets/westmint/src/weights/pallet_uniques.rs +++ b/parachains/runtimes/assets/westmint/src/weights/pallet_uniques.rs @@ -17,23 +17,25 @@ //! Autogenerated weights for `pallet_uniques` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-25, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2022-07-23, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! HOSTNAME: `bm3`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westmint-dev"), DB CACHE: 1024 // Executed Command: -// ./target/production/polkadot-parachain +// /home/benchbot/cargo_target_dir/production/polkadot-parachain // benchmark // pallet -// --chain=westmint-dev +// --steps=50 +// --repeat=20 +// --extrinsic=* // --execution=wasm // --wasm-execution=compiled +// --heap-pages=4096 // --pallet=pallet_uniques -// --extrinsic=* -// --steps=50 -// --repeat=20 -// --json-file=./bench-westmint.json +// --chain=westmint-dev +// --json-file=/var/lib/gitlab-runner/builds/zyw4fam_/0/parity/mirrors/cumulus/.git/.artifacts/bench.json // --header=./file_header.txt -// --output=./parachains/runtimes/assets/westmint/src/weights +// --output=./parachains/runtimes/assets/westmint/src/weights/pallet_uniques.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -45,19 +47,21 @@ use sp_std::marker::PhantomData; /// Weight functions for `pallet_uniques`. pub struct WeightInfo(PhantomData); impl pallet_uniques::WeightInfo for WeightInfo { + // Storage: Uniques NextCollectionId (r:1 w:1) // Storage: Uniques Class (r:1 w:1) // Storage: Uniques ClassAccount (r:0 w:1) fn create() -> Weight { - (23_011_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + (30_771_000 as Weight) + .saturating_add(T::DbWeight::get().reads(2 as Weight)) + .saturating_add(T::DbWeight::get().writes(3 as Weight)) } + // Storage: Uniques NextCollectionId (r:1 w:1) // Storage: Uniques Class (r:1 w:1) // Storage: Uniques ClassAccount (r:0 w:1) fn force_create() -> Weight { - (12_898_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + (18_993_000 as Weight) + .saturating_add(T::DbWeight::get().reads(2 as Weight)) + .saturating_add(T::DbWeight::get().writes(3 as Weight)) } // Storage: Uniques Class (r:1 w:1) // Storage: Uniques Asset (r:1 w:0) @@ -65,18 +69,22 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Storage: Uniques Attribute (r:0 w:1000) // Storage: Uniques ClassMetadataOf (r:0 w:1) // Storage: Uniques InstanceMetadataOf (r:0 w:1000) + // Storage: Uniques CollectionMaxSupply (r:0 w:1) // Storage: Uniques Account (r:0 w:20) + /// The range of component `n` is `[0, 1000]`. + /// The range of component `m` is `[0, 1000]`. + /// The range of component `a` is `[0, 1000]`. fn destroy(n: u32, m: u32, a: u32, ) -> Weight { (0 as Weight) - // Standard Error: 15_000 - .saturating_add((9_683_000 as Weight).saturating_mul(n as Weight)) - // Standard Error: 15_000 - .saturating_add((921_000 as Weight).saturating_mul(m as Weight)) - // Standard Error: 15_000 - .saturating_add((800_000 as Weight).saturating_mul(a as Weight)) + // Standard Error: 17_000 + .saturating_add((10_708_000 as Weight).saturating_mul(n as Weight)) + // Standard Error: 17_000 + .saturating_add((1_670_000 as Weight).saturating_mul(m as Weight)) + // Standard Error: 17_000 + .saturating_add((1_553_000 as Weight).saturating_mul(a as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(n as Weight))) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + .saturating_add(T::DbWeight::get().writes(4 as Weight)) .saturating_add(T::DbWeight::get().writes((2 as Weight).saturating_mul(n as Weight))) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(m as Weight))) .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(a as Weight))) @@ -86,32 +94,35 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Storage: Uniques CollectionMaxSupply (r:1 w:0) // Storage: Uniques Account (r:0 w:1) fn mint() -> Weight { - (31_760_000 as Weight) + (36_089_000 as Weight) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight)) } // Storage: Uniques Class (r:1 w:1) // Storage: Uniques Asset (r:1 w:1) // Storage: Uniques Account (r:0 w:1) + // Storage: Uniques ItemPriceOf (r:0 w:1) fn burn() -> Weight { - (30_857_000 as Weight) + (37_263_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + .saturating_add(T::DbWeight::get().writes(4 as Weight)) } // Storage: Uniques Class (r:1 w:0) // Storage: Uniques Asset (r:1 w:1) // Storage: Uniques Account (r:0 w:2) + // Storage: Uniques ItemPriceOf (r:0 w:1) fn transfer() -> Weight { - (23_536_000 as Weight) + (28_354_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + .saturating_add(T::DbWeight::get().writes(4 as Weight)) } // Storage: Uniques Class (r:1 w:1) // Storage: Uniques Asset (r:100 w:100) + /// The range of component `i` is `[0, 5000]`. fn redeposit(i: u32, ) -> Weight { (0 as Weight) - // Standard Error: 12_000 - .saturating_add((12_171_000 as Weight).saturating_mul(i as Weight)) + // Standard Error: 17_000 + .saturating_add((12_931_000 as Weight).saturating_mul(i as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(i as Weight))) .saturating_add(T::DbWeight::get().writes(1 as Weight)) @@ -120,26 +131,26 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Storage: Uniques Asset (r:1 w:1) // Storage: Uniques Class (r:1 w:0) fn freeze() -> Weight { - (18_224_000 as Weight) + (21_319_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Uniques Asset (r:1 w:1) // Storage: Uniques Class (r:1 w:0) fn thaw() -> Weight { - (17_667_000 as Weight) + (21_919_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Uniques Class (r:1 w:1) fn freeze_collection() -> Weight { - (13_398_000 as Weight) + (17_073_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Uniques Class (r:1 w:1) fn thaw_collection() -> Weight { - (13_278_000 as Weight) + (17_076_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } @@ -147,20 +158,20 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Storage: Uniques Class (r:1 w:1) // Storage: Uniques ClassAccount (r:0 w:2) fn transfer_ownership() -> Weight { - (20_275_000 as Weight) + (25_188_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(4 as Weight)) } // Storage: Uniques Class (r:1 w:1) fn set_team() -> Weight { - (13_910_000 as Weight) + (17_702_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Uniques Class (r:1 w:1) // Storage: Uniques ClassAccount (r:0 w:1) fn force_item_status() -> Weight { - (16_235_000 as Weight) + (20_148_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } @@ -168,7 +179,7 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Storage: Uniques InstanceMetadataOf (r:1 w:0) // Storage: Uniques Attribute (r:1 w:1) fn set_attribute() -> Weight { - (36_968_000 as Weight) + (40_678_000 as Weight) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } @@ -176,77 +187,86 @@ impl pallet_uniques::WeightInfo for WeightInfo { // Storage: Uniques InstanceMetadataOf (r:1 w:0) // Storage: Uniques Attribute (r:1 w:1) fn clear_attribute() -> Weight { - (34_767_000 as Weight) + (38_881_000 as Weight) .saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Uniques Class (r:1 w:1) // Storage: Uniques InstanceMetadataOf (r:1 w:1) fn set_metadata() -> Weight { - (29_045_000 as Weight) + (33_625_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Uniques Class (r:1 w:1) // Storage: Uniques InstanceMetadataOf (r:1 w:1) fn clear_metadata() -> Weight { - (29_331_000 as Weight) + (34_391_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Uniques Class (r:1 w:1) // Storage: Uniques ClassMetadataOf (r:1 w:1) fn set_collection_metadata() -> Weight { - (28_240_000 as Weight) + (33_073_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight)) } // Storage: Uniques Class (r:1 w:0) // Storage: Uniques ClassMetadataOf (r:1 w:1) fn clear_collection_metadata() -> Weight { - (26_270_000 as Weight) + (31_404_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Uniques Class (r:1 w:0) // Storage: Uniques Asset (r:1 w:1) fn approve_transfer() -> Weight { - (19_122_000 as Weight) + (22_265_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Uniques Class (r:1 w:0) // Storage: Uniques Asset (r:1 w:1) fn cancel_approval() -> Weight { - (18_930_000 as Weight) + (23_219_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Uniques OwnershipAcceptance (r:1 w:1) fn set_accept_ownership() -> Weight { - (16_708_000 as Weight) + (20_645_000 as Weight) .saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } // Storage: Uniques CollectionMaxSupply (r:1 w:1) // Storage: Uniques Class (r:1 w:0) fn set_collection_max_supply() -> Weight { - (16_300_000 as Weight) + (20_020_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } - // Storage: Uniques CollectionMaxSupply (r:1 w:1) + // Storage: Uniques NextCollectionId (r:1 w:1) // Storage: Uniques Class (r:1 w:0) - fn set_price() -> Weight { - (16_300_000 as Weight) + fn try_increment_id() -> Weight { + (18_647_000 as Weight) .saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight)) } - // Storage: Uniques CollectionMaxSupply (r:1 w:1) + // Storage: Uniques Asset (r:1 w:0) + // Storage: Uniques ItemPriceOf (r:0 w:1) + fn set_price() -> Weight { + (19_627_000 as Weight) + .saturating_add(T::DbWeight::get().reads(1 as Weight)) + .saturating_add(T::DbWeight::get().writes(1 as Weight)) + } + // Storage: Uniques Asset (r:1 w:1) + // Storage: Uniques ItemPriceOf (r:1 w:1) // Storage: Uniques Class (r:1 w:0) + // Storage: Uniques Account (r:0 w:2) fn buy_item() -> Weight { - (16_300_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + (39_671_000 as Weight) + .saturating_add(T::DbWeight::get().reads(3 as Weight)) + .saturating_add(T::DbWeight::get().writes(4 as Weight)) } } diff --git a/parachains/runtimes/assets/westmint/src/xcm_config.rs b/parachains/runtimes/assets/westmint/src/xcm_config.rs index 6aec071de0f..4a2daa3380e 100644 --- a/parachains/runtimes/assets/westmint/src/xcm_config.rs +++ b/parachains/runtimes/assets/westmint/src/xcm_config.rs @@ -14,7 +14,7 @@ // limitations under the License. use super::{ - AccountId, AssetId, Assets, Balance, Balances, Call, Event, Origin, ParachainInfo, + AccountId, AssetId, Assets, Authorship, Balance, Balances, Call, Event, Origin, ParachainInfo, ParachainSystem, PolkadotXcm, Runtime, WeightToFee, XcmpQueue, }; use frame_support::{ @@ -25,9 +25,12 @@ use frame_support::{ use pallet_xcm::XcmPassthrough; use parachains_common::{ impls::ToStakingPot, - xcm_config::{DenyReserveTransferToRelayChain, DenyThenTry}, + xcm_config::{ + AssetFeeAsExistentialDepositMultiplier, DenyReserveTransferToRelayChain, DenyThenTry, + }, }; use polkadot_parachain::primitives::Sibling; +use sp_runtime::traits::ConvertInto; use xcm::latest::prelude::*; use xcm_builder::{ AccountId32Aliases, AllowKnownQueryResponses, AllowSubscriptionsFrom, @@ -130,6 +133,7 @@ parameter_types! { // One XCM operation is 1_000_000_000 weight - almost certainly a conservative estimate. pub UnitWeightCost: Weight = 1_000_000_000; pub const MaxInstructions: u32 = 100; + pub XcmAssetFeesReceiver: Option = Authorship::author(); } match_types! { @@ -167,8 +171,29 @@ impl xcm_executor::Config for XcmConfig { type LocationInverter = LocationInverter; type Barrier = Barrier; type Weigher = FixedWeightBounds; - type Trader = - UsingComponents>; + type Trader = ( + UsingComponents>, + cumulus_primitives_utility::TakeFirstAssetTrader< + AccountId, + AssetFeeAsExistentialDepositMultiplier< + Runtime, + WeightToFee, + pallet_assets::BalanceToAssetBalance, + >, + ConvertedConcreteAssetId< + AssetId, + Balance, + AsPrefixedGeneralIndex, + JustTry, + >, + Assets, + cumulus_primitives_utility::XcmFeesTo32ByteAccount< + FungiblesTransactor, + AccountId, + XcmAssetFeesReceiver, + >, + >, + ); type ResponseHandler = PolkadotXcm; type AssetTrap = PolkadotXcm; type AssetClaims = PolkadotXcm; diff --git a/parachains/runtimes/assets/westmint/tests/tests.rs b/parachains/runtimes/assets/westmint/tests/tests.rs new file mode 100644 index 00000000000..a967c85add3 --- /dev/null +++ b/parachains/runtimes/assets/westmint/tests/tests.rs @@ -0,0 +1,300 @@ +use asset_test_utils::{ExtBuilder, RuntimeHelper}; +use frame_support::{ + assert_noop, assert_ok, traits::PalletInfo, weights::WeightToFee as WeightToFeeT, +}; +use parachains_common::{AccountId, AuraId}; +pub use westmint_runtime::{ + constants::fee::WeightToFee, xcm_config::XcmConfig, Assets, Balances, ExistentialDeposit, + Runtime, SessionKeys, System, +}; +use xcm::latest::prelude::*; +use xcm_executor::traits::WeightTrader; + +pub const ALICE: [u8; 32] = [1u8; 32]; + +#[test] +fn test_asset_xcm_trader() { + ExtBuilder::::default() + .with_collators(vec![AccountId::from(ALICE)]) + .with_session_keys(vec![( + AccountId::from(ALICE), + AccountId::from(ALICE), + SessionKeys { aura: AuraId::from(sp_core::sr25519::Public::from_raw(ALICE)) }, + )]) + .build() + .execute_with(|| { + // We need root origin to create a sufficient asset + // We set existential deposit to be identical to the one for Balances first + assert_ok!(Assets::force_create( + RuntimeHelper::::root_origin(), + 1, + AccountId::from(ALICE).into(), + true, + ExistentialDeposit::get() + )); + + // We first mint enough asset for the account to exist for assets + assert_ok!(Assets::mint( + RuntimeHelper::::origin_of(AccountId::from(ALICE)), + 1, + AccountId::from(ALICE).into(), + ExistentialDeposit::get() + )); + + let mut trader = ::Trader::new(); + + // Set Alice as block author, who will receive fees + RuntimeHelper::::run_to_block(2, Some(AccountId::from(ALICE))); + + // We are going to buy 4e9 weight + let bought = 4_000_000_000u64; + + // lets calculate amount needed + let amount_needed = WeightToFee::weight_to_fee(&bought); + + let asset_multilocation = MultiLocation::new( + 0, + X2( + PalletInstance( + ::PalletInfo::index::().unwrap() + as u8, + ), + GeneralIndex(1), + ), + ); + + let asset: MultiAsset = (asset_multilocation, amount_needed).into(); + + // Make sure buy_weight does not return an error + assert_ok!(trader.buy_weight(bought, asset.into())); + + // Drop trader + drop(trader); + + // Make sure author(Alice) has received the amount + assert_eq!( + Assets::balance(1, AccountId::from(ALICE)), + ExistentialDeposit::get() + amount_needed + ); + + // We also need to ensure the total supply increased + assert_eq!(Assets::total_supply(1), ExistentialDeposit::get() + amount_needed); + }); +} + +#[test] +fn test_asset_xcm_trader_with_refund() { + ExtBuilder::::default() + .with_collators(vec![AccountId::from(ALICE)]) + .with_session_keys(vec![( + AccountId::from(ALICE), + AccountId::from(ALICE), + SessionKeys { aura: AuraId::from(sp_core::sr25519::Public::from_raw(ALICE)) }, + )]) + .build() + .execute_with(|| { + // We need root origin to create a sufficient asset + // We set existential deposit to be identical to the one for Balances first + assert_ok!(Assets::force_create( + RuntimeHelper::::root_origin(), + 1, + AccountId::from(ALICE).into(), + true, + ExistentialDeposit::get() + )); + + // We first mint enough asset for the account to exist for assets + assert_ok!(Assets::mint( + RuntimeHelper::::origin_of(AccountId::from(ALICE)), + 1, + AccountId::from(ALICE).into(), + ExistentialDeposit::get() + )); + + let mut trader = ::Trader::new(); + + // Set Alice as block author, who will receive fees + RuntimeHelper::::run_to_block(2, Some(AccountId::from(ALICE))); + + // We are going to buy 4e9 weight + let bought = 4_000_000_000u64; + let asset_multilocation = MultiLocation::new( + 0, + X2( + PalletInstance( + ::PalletInfo::index::().unwrap() + as u8, + ), + GeneralIndex(1), + ), + ); + + // lets calculate amount needed + let amount_bought = WeightToFee::weight_to_fee(&bought); + + let asset: MultiAsset = (asset_multilocation.clone(), amount_bought).into(); + + // Make sure buy_weight does not return an error + assert_ok!(trader.buy_weight(bought, asset.clone().into())); + + // Make sure again buy_weight does return an error + assert_noop!(trader.buy_weight(bought, asset.into()), XcmError::NotWithdrawable); + + // We actually use half of the weight + let weight_used = bought / 2; + + // Make sure refurnd works. + let amount_refunded = WeightToFee::weight_to_fee(&(bought - weight_used)); + + assert_eq!( + trader.refund_weight(bought - weight_used), + Some((asset_multilocation, amount_refunded).into()) + ); + + // Drop trader + drop(trader); + + // We only should have paid for half of the bought weight + let fees_paid = WeightToFee::weight_to_fee(&weight_used); + + assert_eq!( + Assets::balance(1, AccountId::from(ALICE)), + ExistentialDeposit::get() + fees_paid + ); + + // We also need to ensure the total supply increased + assert_eq!(Assets::total_supply(1), ExistentialDeposit::get() + fees_paid); + }); +} + +#[test] +fn test_asset_xcm_trader_refund_not_possible_since_amount_less_than_ed() { + ExtBuilder::::default() + .with_collators(vec![AccountId::from(ALICE)]) + .with_session_keys(vec![( + AccountId::from(ALICE), + AccountId::from(ALICE), + SessionKeys { aura: AuraId::from(sp_core::sr25519::Public::from_raw(ALICE)) }, + )]) + .build() + .execute_with(|| { + // We need root origin to create a sufficient asset + // We set existential deposit to be identical to the one for Balances first + assert_ok!(Assets::force_create( + RuntimeHelper::::root_origin(), + 1, + AccountId::from(ALICE).into(), + true, + ExistentialDeposit::get() + )); + + let mut trader = ::Trader::new(); + + // Set Alice as block author, who will receive fees + RuntimeHelper::::run_to_block(2, Some(AccountId::from(ALICE))); + + // We are going to buy 4e9 weight + let bought = 500_000_000u64; + + let asset_multilocation = MultiLocation::new( + 0, + X2( + PalletInstance( + ::PalletInfo::index::().unwrap() + as u8, + ), + GeneralIndex(1), + ), + ); + + let amount_bought = WeightToFee::weight_to_fee(&bought); + + assert!( + amount_bought < ExistentialDeposit::get(), + "we are testing what happens when the amount does not exceed ED" + ); + + let asset: MultiAsset = (asset_multilocation.clone(), amount_bought).into(); + + // Buy weight should return an error + assert_noop!(trader.buy_weight(bought, asset.into()), XcmError::TooExpensive); + + // not credited since the ED is higher than this value + assert_eq!(Assets::balance(1, AccountId::from(ALICE)), 0); + + // We also need to ensure the total supply did not increase + assert_eq!(Assets::total_supply(1), 0); + }); +} + +#[test] +fn test_that_buying_ed_refund_does_not_refund() { + ExtBuilder::::default() + .with_collators(vec![AccountId::from(ALICE)]) + .with_session_keys(vec![( + AccountId::from(ALICE), + AccountId::from(ALICE), + SessionKeys { aura: AuraId::from(sp_core::sr25519::Public::from_raw(ALICE)) }, + )]) + .build() + .execute_with(|| { + // We need root origin to create a sufficient asset + // We set existential deposit to be identical to the one for Balances first + assert_ok!(Assets::force_create( + RuntimeHelper::::root_origin(), + 1, + AccountId::from(ALICE).into(), + true, + ExistentialDeposit::get() + )); + + let mut trader = ::Trader::new(); + + // Set Alice as block author, who will receive fees + RuntimeHelper::::run_to_block(2, Some(AccountId::from(ALICE))); + + let bought = 500_000_000u64; + + let asset_multilocation = MultiLocation::new( + 0, + X2( + PalletInstance( + ::PalletInfo::index::().unwrap() + as u8, + ), + GeneralIndex(1), + ), + ); + + let amount_bought = WeightToFee::weight_to_fee(&bought); + + assert!( + amount_bought < ExistentialDeposit::get(), + "we are testing what happens when the amount does not exceed ED" + ); + + // We know we will have to buy at least ED, so lets make sure first it will + // fail with a payment of less than ED + let asset: MultiAsset = (asset_multilocation.clone(), amount_bought).into(); + assert_noop!(trader.buy_weight(bought, asset.into()), XcmError::TooExpensive); + + // Now lets buy ED at least + let asset: MultiAsset = (asset_multilocation.clone(), ExistentialDeposit::get()).into(); + + // Buy weight should work + assert_ok!(trader.buy_weight(bought, asset.into())); + + // Should return None. We have a specific check making sure we dont go below ED for + // drop payment + assert_eq!(trader.refund_weight(bought), None); + + // Drop trader + drop(trader); + + // Make sure author(Alice) has received the amount + assert_eq!(Assets::balance(1, AccountId::from(ALICE)), ExistentialDeposit::get()); + + // We also need to ensure the total supply increased + assert_eq!(Assets::total_supply(1), ExistentialDeposit::get()); + }); +} diff --git a/parachains/runtimes/contracts/contracts-rococo/Cargo.toml b/parachains/runtimes/contracts/contracts-rococo/Cargo.toml index 0a1278b3225..b4172e817b9 100644 --- a/parachains/runtimes/contracts/contracts-rococo/Cargo.toml +++ b/parachains/runtimes/contracts/contracts-rococo/Cargo.toml @@ -15,7 +15,7 @@ codec = { package = "parity-scale-codec", version = "3.0.0", default-features = hex-literal = { version = "0.3.4", optional = true } log = { version = "0.4.17", default-features = false } scale-info = { version = "2.1.1", default-features = false, features = ["derive"] } -serde = { version = "1.0.140", optional = true, features = ["derive"] } +serde = { version = "1.0.141", optional = true, features = ["derive"] } smallvec = "1.9.0" # Substrate diff --git a/parachains/runtimes/contracts/contracts-rococo/src/lib.rs b/parachains/runtimes/contracts/contracts-rococo/src/lib.rs index edd2905c9b5..7483fb780fa 100644 --- a/parachains/runtimes/contracts/contracts-rococo/src/lib.rs +++ b/parachains/runtimes/contracts/contracts-rococo/src/lib.rs @@ -116,7 +116,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("contracts-rococo"), impl_name: create_runtime_str!("contracts-rococo"), authoring_version: 1, - spec_version: 9220, + spec_version: 9230, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 1, diff --git a/parachains/runtimes/starters/seedling/Cargo.toml b/parachains/runtimes/starters/seedling/Cargo.toml index 86933c6e564..dba67f7f376 100644 --- a/parachains/runtimes/starters/seedling/Cargo.toml +++ b/parachains/runtimes/starters/seedling/Cargo.toml @@ -8,7 +8,7 @@ edition = "2021" codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } log = { version = "0.4.14", default-features = false } scale-info = { version = "2.0.0", default-features = false, features = ["derive"] } -serde = { version = "1.0.140", optional = true, features = ["derive"] } +serde = { version = "1.0.141", optional = true, features = ["derive"] } # Substrate frame-executive = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } diff --git a/parachains/runtimes/starters/seedling/src/lib.rs b/parachains/runtimes/starters/seedling/src/lib.rs index 146a769fd5a..850f6bab34c 100644 --- a/parachains/runtimes/starters/seedling/src/lib.rs +++ b/parachains/runtimes/starters/seedling/src/lib.rs @@ -62,7 +62,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("seedling"), impl_name: create_runtime_str!("seedling"), authoring_version: 1, - spec_version: 9220, + spec_version: 9230, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 1, diff --git a/parachains/runtimes/starters/shell/Cargo.toml b/parachains/runtimes/starters/shell/Cargo.toml index 26b319f0d00..14aec72d882 100644 --- a/parachains/runtimes/starters/shell/Cargo.toml +++ b/parachains/runtimes/starters/shell/Cargo.toml @@ -8,7 +8,7 @@ edition = "2021" codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } log = { version = "0.4.17", default-features = false } scale-info = { version = "2.1.1", default-features = false, features = ["derive"] } -serde = { version = "1.0.140", optional = true, features = ["derive"] } +serde = { version = "1.0.141", optional = true, features = ["derive"] } # Substrate frame-executive = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } diff --git a/parachains/runtimes/testing/penpal/Cargo.toml b/parachains/runtimes/testing/penpal/Cargo.toml index 4143e070670..a31111f1b38 100644 --- a/parachains/runtimes/testing/penpal/Cargo.toml +++ b/parachains/runtimes/testing/penpal/Cargo.toml @@ -19,7 +19,7 @@ codec = { package = "parity-scale-codec", version = "3.0.0", default-features = hex-literal = { version = "0.3.4", optional = true } log = { version = "0.4.16", default-features = false } scale-info = { version = "2.1.1", default-features = false, features = ["derive"] } -serde = { version = "1.0.140", optional = true, features = ["derive"] } +serde = { version = "1.0.141", optional = true, features = ["derive"] } smallvec = "1.9.0" # Substrate diff --git a/parachains/runtimes/testing/rococo-parachain/Cargo.toml b/parachains/runtimes/testing/rococo-parachain/Cargo.toml index dd221d83223..8cf3aab02cd 100644 --- a/parachains/runtimes/testing/rococo-parachain/Cargo.toml +++ b/parachains/runtimes/testing/rococo-parachain/Cargo.toml @@ -9,7 +9,7 @@ description = "Simple runtime used by the rococo parachain(s)" codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } log = { version = "0.4.17", default-features = false } scale-info = { version = "2.1.1", default-features = false, features = ["derive"] } -serde = { version = "1.0.140", optional = true, features = ["derive"] } +serde = { version = "1.0.141", optional = true, features = ["derive"] } # Substrate frame-executive = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } diff --git a/parachains/runtimes/testing/rococo-parachain/src/lib.rs b/parachains/runtimes/testing/rococo-parachain/src/lib.rs index 05837b4464f..98f53af1968 100644 --- a/parachains/runtimes/testing/rococo-parachain/src/lib.rs +++ b/parachains/runtimes/testing/rococo-parachain/src/lib.rs @@ -94,7 +94,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("test-parachain"), impl_name: create_runtime_str!("test-parachain"), authoring_version: 1, - spec_version: 9220, + spec_version: 9230, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 1, diff --git a/polkadot-parachain/Cargo.toml b/polkadot-parachain/Cargo.toml index 0c160303240..f266da2f9c0 100644 --- a/polkadot-parachain/Cargo.toml +++ b/polkadot-parachain/Cargo.toml @@ -1,19 +1,19 @@ [package] name = "polkadot-parachain" -version = "0.9.220" +version = "0.9.230" authors = ["Parity Technologies "] build = "build.rs" edition = "2021" description = "Runs a polkadot parachain node which could be a collator." [dependencies] -async-trait = "0.1.56" -clap = { version = "3.2.15", features = ["derive", "deprecated"] } +async-trait = "0.1.57" +clap = { version = "3.2.16", features = ["derive", "deprecated"] } codec = { package = "parity-scale-codec", version = "3.0.0" } futures = "0.3.21" hex-literal = "0.3.4" log = "0.4.17" -serde = { version = "1.0.140", features = ["derive"] } +serde = { version = "1.0.141", features = ["derive"] } # Local rococo-parachain-runtime = { path = "../parachains/runtimes/testing/rococo-parachain" } @@ -24,7 +24,7 @@ statemine-runtime = { path = "../parachains/runtimes/assets/statemine" } westmint-runtime = { path = "../parachains/runtimes/assets/westmint" } contracts-rococo-runtime = { path = "../parachains/runtimes/contracts/contracts-rococo" } penpal-runtime = { path = "../parachains/runtimes/testing/penpal" } -jsonrpsee = { version = "0.14.0", features = ["server"] } +jsonrpsee = { version = "0.15.1", features = ["server"] } parachains-common = { path = "../parachains/common" } # Substrate diff --git a/polkadot-parachain/src/service.rs b/polkadot-parachain/src/service.rs index 3a01d8cb4e1..7cecaa807bd 100644 --- a/polkadot-parachain/src/service.rs +++ b/polkadot-parachain/src/service.rs @@ -30,7 +30,7 @@ use cumulus_primitives_core::{ }; 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 cumulus_relay_chain_rpc_interface::{create_client_and_start_worker, RelayChainRpcInterface}; use polkadot_service::CollatorPair; use sp_core::Pair; @@ -297,8 +297,10 @@ async fn build_relay_chain_interface( hwbench: Option, ) -> 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)), + Some(relay_chain_url) => { + let client = create_client_and_start_worker(relay_chain_url, task_manager).await?; + Ok((Arc::new(RelayChainRpcInterface::new(client)) as Arc<_>, None)) + }, None => build_inprocess_relay_chain( polkadot_config, parachain_config, diff --git a/primitives/parachain-inherent/Cargo.toml b/primitives/parachain-inherent/Cargo.toml index e033ff664f5..e3fc81dec09 100644 --- a/primitives/parachain-inherent/Cargo.toml +++ b/primitives/parachain-inherent/Cargo.toml @@ -5,10 +5,10 @@ authors = ["Parity Technologies "] edition = "2021" [dependencies] -async-trait = { version = "0.1.56", optional = true } +async-trait = { version = "0.1.57", optional = true } codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = [ "derive" ] } scale-info = { version = "2.1.1", default-features = false, features = ["derive"] } -tracing = { version = "0.1.34", optional = true } +tracing = { version = "0.1.36", optional = true } # Substrate sc-client-api = { git = "https://github.com/paritytech/substrate", optional = true, branch = "master" } diff --git a/primitives/utility/Cargo.toml b/primitives/utility/Cargo.toml index 74cb8a3eb52..6a76740bde1 100644 --- a/primitives/utility/Cargo.toml +++ b/primitives/utility/Cargo.toml @@ -6,6 +6,7 @@ edition = "2021" [dependencies] codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = [ "derive" ] } +log = { version = "0.4.17", default-features = false } # Substrate frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } @@ -18,6 +19,9 @@ polkadot-core-primitives = { git = "https://github.com/paritytech/polkadot", def polkadot-parachain = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "master" } polkadot-primitives = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "master" } xcm = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "master" } +xcm-executor = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "master" } +xcm-builder = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "master" } + # Cumulus cumulus-primitives-core = { path = "../core", default-features = false } @@ -34,4 +38,5 @@ std = [ "polkadot-parachain/std", "polkadot-primitives/std", "cumulus-primitives-core/std", + "xcm-executor/std", ] diff --git a/primitives/utility/src/lib.rs b/primitives/utility/src/lib.rs index 69397247a39..ea7a81f327d 100644 --- a/primitives/utility/src/lib.rs +++ b/primitives/utility/src/lib.rs @@ -21,9 +21,16 @@ use codec::Encode; use cumulus_primitives_core::UpwardMessageSender; +use frame_support::{ + traits::tokens::{fungibles, fungibles::Inspect}, + weights::Weight, +}; +use sp_runtime::{traits::Saturating, SaturatedConversion}; + use sp_std::marker::PhantomData; use xcm::{latest::prelude::*, WrapVersion}; - +use xcm_builder::TakeRevenue; +use xcm_executor::traits::{MatchesFungibles, TransactAsset, WeightTrader}; /// Xcm router which recognises the `Parent` destination and handles it by sending the message into /// the given UMP `UpwardMessageSender` implementation. Thus this essentially adapts an /// `UpwardMessageSender` trait impl into a `SendXcm` trait impl. @@ -51,3 +58,212 @@ impl SendXcm for ParentAsUmp { } } } + +/// Contains information to handle refund/payment for xcm-execution +#[derive(Clone, Eq, PartialEq, Debug)] +struct AssetTraderRefunder { + // The amount of weight bought minus the weigh already refunded + weight_outstanding: Weight, + // The concrete asset containing the asset location and outstanding balance + outstanding_concrete_asset: MultiAsset, +} + +/// Charges for exercution in the first multiasset of those selected for fee payment +/// Only succeeds for Concrete Fungible Assets +/// First tries to convert the this MultiAsset into a local assetId +/// Then charges for this assetId as described by FeeCharger +/// Weight, paid balance, local asset Id and the multilocation is stored for +/// later refund purposes +/// Important: Errors if the Trader is being called twice by 2 BuyExecution instructions +/// Alternatively we could just return payment in the aforementioned case +pub struct TakeFirstAssetTrader< + AccountId, + FeeCharger: ChargeWeightInFungibles, + Matcher: MatchesFungibles, + ConcreteAssets: fungibles::Mutate + fungibles::Transfer + fungibles::Balanced, + HandleRefund: TakeRevenue, +>( + Option, + PhantomData<(AccountId, FeeCharger, Matcher, ConcreteAssets, HandleRefund)>, +); +impl< + AccountId, + FeeCharger: ChargeWeightInFungibles, + Matcher: MatchesFungibles, + ConcreteAssets: fungibles::Mutate + + fungibles::Transfer + + fungibles::Balanced, + HandleRefund: TakeRevenue, + > WeightTrader + for TakeFirstAssetTrader +{ + fn new() -> Self { + Self(None, PhantomData) + } + // We take first multiasset + // Check whether we can convert fee to asset_fee (is_sufficient, min_deposit) + // If everything goes well, we charge. + fn buy_weight( + &mut self, + weight: Weight, + payment: xcm_executor::Assets, + ) -> Result { + log::trace!(target: "xcm::weight", "TakeFirstAssetTrader::buy_weight weight: {:?}, payment: {:?}", weight, payment); + + // Make sure we dont enter twice + if self.0.is_some() { + return Err(XcmError::NotWithdrawable) + } + + // We take the very first multiasset from payment + let multiassets: MultiAssets = payment.clone().into(); + + // Take the first multiasset from the selected MultiAssets + let first = multiassets.get(0).ok_or(XcmError::AssetNotFound)?; + + // Get the local asset id in which we can pay for fees + let (local_asset_id, _) = + Matcher::matches_fungibles(&first).map_err(|_| XcmError::AssetNotFound)?; + + // Calculate how much we should charge in the asset_id for such amount of weight + // Require at least a payment of minimum_balance + // Necessary for fully collateral-backed assets + let asset_balance: u128 = FeeCharger::charge_weight_in_fungibles(local_asset_id, weight) + .map(|amount| { + let minimum_balance = ConcreteAssets::minimum_balance(local_asset_id); + if amount < minimum_balance { + minimum_balance + } else { + amount + } + })? + .try_into() + .map_err(|_| XcmError::Overflow)?; + + // Convert to the same kind of multiasset, with the required fungible balance + let required = first.id.clone().into_multiasset(asset_balance.into()); + + // Substract payment + let unused = payment.checked_sub(required.clone()).map_err(|_| XcmError::TooExpensive)?; + + // record weight and multiasset + self.0 = Some(AssetTraderRefunder { + weight_outstanding: weight, + outstanding_concrete_asset: required, + }); + + Ok(unused) + } + + fn refund_weight(&mut self, weight: Weight) -> Option { + log::trace!(target: "xcm::weight", "TakeFirstAssetTrader::refund_weight weight: {:?}", weight); + if let Some(AssetTraderRefunder { + mut weight_outstanding, + outstanding_concrete_asset: MultiAsset { id, fun }, + }) = self.0.clone() + { + let weight = weight.min(weight_outstanding); + + // Get the local asset id in which we can refund fees + let (local_asset_id, outstanding_balance) = + Matcher::matches_fungibles(&(id.clone(), fun).into()).ok()?; + + let minimum_balance = ConcreteAssets::minimum_balance(local_asset_id); + + // Calculate asset_balance + // This read should have already be cached in buy_weight + let (asset_balance, outstanding_minus_substracted) = + FeeCharger::charge_weight_in_fungibles(local_asset_id, weight).ok().map( + |asset_balance| { + // Require at least a drop of minimum_balance + // Necessary for fully collateral-backed assets + if outstanding_balance.saturating_sub(asset_balance) > minimum_balance { + (asset_balance, outstanding_balance.saturating_sub(asset_balance)) + } + // If the amount to be refunded leaves the remaining balance below ED, + // we just refund the exact amount that guarantees at least ED will be + // dropped + else { + (outstanding_balance.saturating_sub(minimum_balance), minimum_balance) + } + }, + )?; + + // Convert balances into u128 + let outstanding_minus_substracted: u128 = + outstanding_minus_substracted.saturated_into(); + let asset_balance: u128 = asset_balance.saturated_into(); + + // Construct outstanding_concrete_asset with the same location id and substracted balance + let outstanding_concrete_asset: MultiAsset = + (id.clone(), outstanding_minus_substracted).into(); + + // Substract from existing weight and balance + weight_outstanding = weight_outstanding.saturating_sub(weight); + + // Override AssetTraderRefunder + self.0 = Some(AssetTraderRefunder { weight_outstanding, outstanding_concrete_asset }); + + // Only refund if positive + if asset_balance > 0 { + Some((id, asset_balance).into()) + } else { + None + } + } else { + None + } + } +} + +impl< + AccountId, + FeeCharger: ChargeWeightInFungibles, + Matcher: MatchesFungibles, + ConcreteAssets: fungibles::Mutate + + fungibles::Transfer + + fungibles::Balanced, + HandleRefund: TakeRevenue, + > Drop for TakeFirstAssetTrader +{ + fn drop(&mut self) { + if let Some(asset_trader) = self.0.clone() { + HandleRefund::take_revenue(asset_trader.outstanding_concrete_asset); + } + } +} + +/// XCM fee depositor to which we implement the TakeRevenue trait +/// It receives a Transact implemented argument, a 32 byte convertible acocuntId, and the fee receiver account +/// FungiblesMutateAdapter should be identical to that implemented by WithdrawAsset +pub struct XcmFeesTo32ByteAccount( + PhantomData<(FungiblesMutateAdapter, AccountId, ReceiverAccount)>, +); +impl< + FungiblesMutateAdapter: TransactAsset, + AccountId: Clone + Into<[u8; 32]>, + ReceiverAccount: frame_support::traits::Get>, + > TakeRevenue for XcmFeesTo32ByteAccount +{ + fn take_revenue(revenue: MultiAsset) { + if let Some(receiver) = ReceiverAccount::get() { + let ok = FungiblesMutateAdapter::deposit_asset( + &revenue, + &(X1(AccountId32 { network: Any, id: receiver.into() }).into()), + ) + .is_ok(); + + debug_assert!(ok, "`deposit_asset` cannot generally fail; qed"); + } + } +} + +/// ChargeWeightInFungibles trait, which converts a given amount of weight +/// and an assetId, and it returns the balance amount that should be charged +/// in such assetId for that amount of weight +pub trait ChargeWeightInFungibles> { + fn charge_weight_in_fungibles( + asset_id: >::AssetId, + weight: Weight, + ) -> Result<>::Balance, XcmError>; +} diff --git a/scripts/ci/changelog/templates/runtime.md.tera b/scripts/ci/changelog/templates/runtime.md.tera index 2027ca78c1e..9e7e04b5c63 100644 --- a/scripts/ci/changelog/templates/runtime.md.tera +++ b/scripts/ci/changelog/templates/runtime.md.tera @@ -19,7 +19,7 @@ ``` šŸ‹ļø Runtime Size: {{ runtime.data.runtimes.compressed.subwasm.size | filesizeformat }} ({{ runtime.data.runtimes.compressed.subwasm.size }} bytes) -šŸ”„ Core Version: {{ runtime.data.runtimes.compressed.subwasm.core_version }} +šŸ”„ Core Version: {{ runtime.data.runtimes.compressed.subwasm.core_version.specName }}-{{ runtime.data.runtimes.compressed.subwasm.core_version.specVersion }} ({{ runtime.data.runtimes.compressed.subwasm.core_version.implName }}-{{ runtime.data.runtimes.compressed.subwasm.core_version.implVersion }}.tx{{ runtime.data.runtimes.compressed.subwasm.core_version.transactionVersion }}.au{{ runtime.data.runtimes.compressed.subwasm.core_version.authoringVersion }}) šŸ—œ Compressed: {{ compressed }}: {{ comp_ratio | round(method="ceil", precision=2) }}% šŸŽ Metadata version: V{{ runtime.data.runtimes.compressed.subwasm.metadata_version }} šŸ—³ļø Blake2-256 hash: {{ runtime.data.runtimes.compressed.subwasm.blake2_256 }} diff --git a/scripts/parachains_integration_tests.sh b/scripts/parachains_integration_tests.sh new file mode 100755 index 00000000000..ed920f430fc --- /dev/null +++ b/scripts/parachains_integration_tests.sh @@ -0,0 +1,32 @@ +#!/usr/bin/env bash + +tests=( + statemine + statemint +) + +rm -R logs &> /dev/null + +for t in ${tests[@]} +do + printf "\nšŸ” Running $t tests...\n\n" + + mkdir -p logs/$t + + parachains-integration-tests \ + -m zombienet \ + -c ./parachains/integration-tests/$t/config.toml \ + -cl ./logs/$t/chains.log 2> /dev/null & + + parachains-integration-tests \ + -m test \ + -t ./parachains/integration-tests/$t \ + -tl ./logs/$t/tests.log & tests=$! + + wait $tests + + pkill -f polkadot + pkill -f parachain + + printf "\nšŸŽ‰ $t integration tests finished! \n\n" +done diff --git a/test/runtime/Cargo.toml b/test/runtime/Cargo.toml index 73c8e591360..789bc3de4b2 100644 --- a/test/runtime/Cargo.toml +++ b/test/runtime/Cargo.toml @@ -7,7 +7,7 @@ edition = "2021" [dependencies] codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } scale-info = { version = "2.1.1", default-features = false, features = ["derive"] } -serde = { version = "1.0.140", optional = true, features = ["derive"] } +serde = { version = "1.0.141", optional = true, features = ["derive"] } # Substrate frame-executive = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } diff --git a/test/service/Cargo.toml b/test/service/Cargo.toml index 3c6ade15d41..9c5974f74d2 100644 --- a/test/service/Cargo.toml +++ b/test/service/Cargo.toml @@ -9,15 +9,15 @@ name = "test-parachain" path = "src/main.rs" [dependencies] -async-trait = "0.1.56" -clap = { version = "3.2.15", features = ["derive", "deprecated"] } +async-trait = "0.1.57" +clap = { version = "3.2.16", features = ["derive", "deprecated"] } codec = { package = "parity-scale-codec", version = "3.0.0" } criterion = { version = "0.3.6", features = [ "async_tokio" ] } -jsonrpsee = { version = "0.14.0", features = ["server"] } +jsonrpsee = { version = "0.15.1", features = ["server"] } rand = "0.8.5" -serde = { version = "1.0.140", features = ["derive"] } +serde = { version = "1.0.141", features = ["derive"] } tokio = { version = "1.19.2", features = ["macros"] } -tracing = "0.1.25" +tracing = "0.1.36" url = "2.2.2" # Substrate diff --git a/test/service/src/lib.rs b/test/service/src/lib.rs index 479b325ee43..d21d2de1b4e 100644 --- a/test/service/src/lib.rs +++ b/test/service/src/lib.rs @@ -37,7 +37,7 @@ use cumulus_client_service::{ use cumulus_primitives_core::ParaId; use cumulus_relay_chain_inprocess_interface::RelayChainInProcessInterface; use cumulus_relay_chain_interface::{RelayChainError, RelayChainInterface, RelayChainResult}; -use cumulus_relay_chain_rpc_interface::RelayChainRPCInterface; +use cumulus_relay_chain_rpc_interface::{create_client_and_start_worker, RelayChainRpcInterface}; use cumulus_test_runtime::{Hash, Header, NodeBlock as Block, RuntimeApi}; use frame_system_rpc_runtime_api::AccountNonceApi; @@ -48,7 +48,7 @@ use sc_network::{config::TransportConfig, multiaddr, NetworkService}; use sc_network_common::service::{NetworkBlock, NetworkStateInfo}; use sc_service::{ config::{ - DatabaseSource, KeepBlocks, KeystoreConfig, MultiaddrWithPeerId, NetworkConfiguration, + BlocksPruning, DatabaseSource, KeystoreConfig, MultiaddrWithPeerId, NetworkConfiguration, OffchainWorkerConfig, PruningMode, WasmExecutionMethod, }, BasePath, ChainSpec, Configuration, Error as ServiceError, PartialComponents, Role, @@ -182,7 +182,8 @@ async fn build_relay_chain_interface( task_manager: &mut TaskManager, ) -> RelayChainResult> { if let Some(relay_chain_url) = collator_options.relay_chain_rpc_url { - return Ok(Arc::new(RelayChainRPCInterface::new(relay_chain_url).await?) as Arc<_>); + let client = create_client_and_start_worker(relay_chain_url, task_manager).await?; + return Ok(Arc::new(RelayChainRpcInterface::new(client)) as Arc<_>); } let relay_chain_full_node = polkadot_test_service::new_full( @@ -652,7 +653,7 @@ pub fn node_config( state_cache_size: 67108864, state_cache_child_ratio: None, state_pruning: Some(PruningMode::ArchiveAll), - keep_blocks: KeepBlocks::All, + blocks_pruning: BlocksPruning::All, chain_spec: spec, wasm_method: WasmExecutionMethod::Interpreted, // NOTE: we enforce the use of the native runtime to make the errors more debuggable