diff --git a/.github/workflows/cargo-test.yml b/.github/workflows/cargo-test.yml index 1c1d1f294d..043939ca04 100644 --- a/.github/workflows/cargo-test.yml +++ b/.github/workflows/cargo-test.yml @@ -12,6 +12,8 @@ jobs: steps: - uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.sha }} - run: git fetch --prune --unshallow - name: Install System Dependencies run: | @@ -47,7 +49,6 @@ jobs: ./target/release/interbtc-parachain benchmark pallet \ --pallet '*' \ --extrinsic '*' \ - --execution=wasm \ --wasm-execution=compiled \ --steps 2 --repeat 1 \ --template .deploy/runtime-weight-template.hbs \ @@ -55,7 +56,6 @@ jobs: ./target/release/interbtc-parachain benchmark pallet \ --pallet '*' \ --extrinsic '*' \ - --execution=wasm \ --wasm-execution=compiled \ --steps 2 --repeat 1 \ --template .deploy/runtime-weight-template.hbs \ diff --git a/Cargo.lock b/Cargo.lock index 6f88e07a41..47622b6483 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -14,20 +14,20 @@ dependencies = [ [[package]] name = "addr2line" -version = "0.17.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9ecd88a8c8378ca913a680cd98f0f13ac67383d35993f86c90a70e3f137816b" +checksum = "a76fd60b23679b7d19bd066031410fb7e458ccc5e958eb5c325888ce4baedc97" dependencies = [ - "gimli 0.26.2", + "gimli 0.27.3", ] [[package]] name = "addr2line" -version = "0.19.0" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a76fd60b23679b7d19bd066031410fb7e458ccc5e958eb5c325888ce4baedc97" +checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" dependencies = [ - "gimli 0.27.3", + "gimli 0.28.0", ] [[package]] @@ -172,18 +172,9 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "0.7.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc936419f96fa211c1b9166887b38e5e40b19958e5b895be7c1f93adec7071ac" -dependencies = [ - "memchr", -] - -[[package]] -name = "aho-corasick" -version = "1.0.2" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43f6cb1bf222025340178f382c426f13757b2960e89779dfcb319c32542a5a41" +checksum = "6748e8def348ed4d14996fa801f4122cd763fff530258cdc03f64b25f89d3a5a" dependencies = [ "memchr", ] @@ -215,6 +206,12 @@ dependencies = [ "libc", ] +[[package]] +name = "anes" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299" + [[package]] name = "annuity" version = "1.0.0" @@ -263,9 +260,9 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a30da5c5f2d5e72842e00bcb57657162cdabef0931f40e2deb9b4140440cecd" +checksum = "15c4c2c83f81532e5845a733998b6971faca23490340a418e9b72a3ec9de12ea" [[package]] name = "anstyle-parse" @@ -287,9 +284,9 @@ dependencies = [ [[package]] name = "anstyle-wincon" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "180abfa45703aebe0093f79badacc01b8fd4ea2e35118747e5811127f926e188" +checksum = "c677ab05e09154296dd37acecd46420c17b9713e8366facafa8fc0885167cf4c" dependencies = [ "anstyle", "windows-sys 0.48.0", @@ -297,9 +294,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.71" +version = "1.0.75" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c7d0618f0e0b7e8ff11427422b64564d5fb0be1940354bfe2e0529b18a9d9b8" +checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" [[package]] name = "approx" @@ -316,12 +313,6 @@ version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bddcadddf5e9015d310179a59bb28c4d4b9920ad0f11e8e14dbadf654890c9a6" -[[package]] -name = "array-bytes" -version = "4.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f52f63c5c1316a16a4b35eaac8b76a98248961a533f061684cb2a7cb0eafb6c6" - [[package]] name = "array-bytes" version = "6.1.0" @@ -359,7 +350,7 @@ dependencies = [ "num-traits", "rusticata-macros", "thiserror", - "time 0.3.22", + "time 0.3.27", ] [[package]] @@ -375,7 +366,7 @@ dependencies = [ "num-traits", "rusticata-macros", "thiserror", - "time 0.3.22", + "time 0.3.27", ] [[package]] @@ -413,12 +404,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "asn1_der" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "155a5a185e42c6b77ac7b88a15143d930a9e9727a5b7b77eed417404ab15c247" - [[package]] name = "assert_matches" version = "1.5.0" @@ -427,9 +412,9 @@ checksum = "9b34d609dfbaf33d6889b2b7106d3ca345eacad44200913df5ba02bfd31d2ba9" [[package]] name = "async-channel" -version = "1.8.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf46fee83e5ccffc220104713af3292ff9bc7c64c7de289f66dae8e38d826833" +checksum = "81953c529336010edd6d8e358f886d9581267795c61b19475b71314bffa46d35" dependencies = [ "concurrent-queue", "event-listener", @@ -450,7 +435,7 @@ dependencies = [ "log", "parking", "polling", - "rustix 0.37.20", + "rustix 0.37.23", "slab", "socket2 0.4.9", "waker-fn", @@ -458,9 +443,9 @@ dependencies = [ [[package]] name = "async-lock" -version = "2.7.0" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa24f727524730b077666307f2734b4a1a1c57acb79193127dcc8914d5242dd7" +checksum = "287272293e9d8c41773cec55e365490fe034813a2f172f502d6ddcf75b2f582b" dependencies = [ "event-listener", ] @@ -473,31 +458,31 @@ checksum = "0e97ce7de6cf12de5d7226c73f5ba9811622f4db3a5b91b55c53e987e5f91cba" dependencies = [ "proc-macro2", "quote", - "syn 2.0.22", + "syn 2.0.29", ] [[package]] name = "async-trait" -version = "0.1.68" +version = "0.1.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9ccdd8f2a161be9bd5c023df56f1b2a0bd1d83872ae53b71a84a12c9bf6e842" +checksum = "bc00ceb34980c03614e35a3a4e218276a0a824e911d07651cd0d858a51e8c0f0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.22", + "syn 2.0.29", ] [[package]] name = "asynchronous-codec" -version = "0.6.1" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06a0daa378f5fd10634e44b0a29b2a87b890657658e072a30d6f26e57ddee182" +checksum = "4057f2c32adbb2fc158e22fb38433c8e9bbf76b75a4732c7c0cbaf695fb65568" dependencies = [ "bytes", "futures-sink", "futures-util", "memchr", - "pin-project-lite 0.2.9", + "pin-project-lite 0.2.12", ] [[package]] @@ -555,16 +540,16 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "backtrace" -version = "0.3.67" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "233d376d6d185f2a3093e58f283f60f880315b6c60075b01f36b3b85154564ca" +checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" dependencies = [ - "addr2line 0.19.0", + "addr2line 0.21.0", "cc", "cfg-if", "libc", - "miniz_oxide 0.6.2", - "object 0.30.4", + "miniz_oxide", + "object 0.32.0", "rustc-demangle", ] @@ -628,7 +613,7 @@ dependencies = [ [[package]] name = "binary-merkle-tree" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "hash-db 0.16.0", "log", @@ -645,22 +630,23 @@ dependencies = [ [[package]] name = "bindgen" -version = "0.64.0" +version = "0.65.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4243e6031260db77ede97ad86c27e501d646a27ab57b59a574f725d98ab1fb4" +checksum = "cfdf7b466f9a4903edc73f95d6d2bcd5baf8ae620638762244d3f60143643cc5" dependencies = [ - "bitflags", + "bitflags 1.3.2", "cexpr", "clang-sys", "lazy_static", "lazycell", "peeking_take_while", + "prettyplease 0.2.12", "proc-macro2", "quote", "regex", "rustc-hash", "shlex", - "syn 1.0.109", + "syn 2.0.29", ] [[package]] @@ -739,6 +725,12 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" +[[package]] +name = "bitflags" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4682ae6287fcf752ecaabbfcc7b6f9b72aa33933dc23a554d853aea8eea8635" + [[package]] name = "bitvec" version = "1.0.1" @@ -768,7 +760,7 @@ checksum = "3c2f0dc9a68c6317d884f97cc36cf5a3d20ba14ce404227df55e1af708ab04bc" dependencies = [ "arrayref", "arrayvec 0.7.4", - "constant_time_eq", + "constant_time_eq 0.2.6", ] [[package]] @@ -779,20 +771,20 @@ checksum = "6637f448b9e61dfadbdcbae9a885fadee1f3eaffb1f8d3c1965d3ade8bdfd44f" dependencies = [ "arrayref", "arrayvec 0.7.4", - "constant_time_eq", + "constant_time_eq 0.2.6", ] [[package]] name = "blake3" -version = "1.4.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "729b71f35bd3fa1a4c86b85d32c8b9069ea7fe14f7a53cfabb65f62d4265b888" +checksum = "199c42ab6972d92c9f8995f086273d25c42fc0f7b2a1fcefba465c1352d25ba5" dependencies = [ "arrayref", "arrayvec 0.7.4", "cc", "cfg-if", - "constant_time_eq", + "constant_time_eq 0.3.0", "digest 0.10.7", ] @@ -880,9 +872,9 @@ checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" [[package]] name = "bstr" -version = "1.5.0" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a246e68bb43f6cd9db24bea052a53e40405417c5fb372e3d1a8a7f770a564ef5" +checksum = "6798148dccfbff0fae41c7574d2fa8f1ef3492fba0face179de5d8d447d67b05" dependencies = [ "memchr", "serde", @@ -996,18 +988,18 @@ dependencies = [ [[package]] name = "camino" -version = "1.1.4" +version = "1.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c530edf18f37068ac2d977409ed5cd50d53d73bc653c7647b48eb78976ac9ae2" +checksum = "c59e92b5a388f549b863a7bea62612c09f24c8393560709a54558a9abdfb3b9c" dependencies = [ "serde", ] [[package]] name = "cargo-platform" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbdb825da8a5df079a43676dbe042702f1707b1109f713a01420fbb4cc71fa27" +checksum = "2cfa25e60aea747ec7e1124f238816749faa93759c6ff5b31f1ccdda137f4479" dependencies = [ "serde", ] @@ -1020,19 +1012,35 @@ checksum = "eee4243f1f26fc7a42710e7439c149e2b10b05472f88090acce52632f231a73a" dependencies = [ "camino", "cargo-platform", - "semver 1.0.17", + "semver 1.0.18", "serde", "serde_json", "thiserror", ] +[[package]] +name = "casey" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "614586263949597dcc18675da12ef9b429135e13628d92eb8b8c6fa50ca5656b" +dependencies = [ + "syn 1.0.109", +] + +[[package]] +name = "cast" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" + [[package]] name = "cc" -version = "1.0.79" +version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" +checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" dependencies = [ "jobserver", + "libc", ] [[package]] @@ -1057,9 +1065,9 @@ dependencies = [ [[package]] name = "cfg-expr" -version = "0.10.3" +version = "0.15.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0aacacf4d96c24b2ad6eb8ee6df040e4f27b0d0b39a5710c30091baa830485db" +checksum = "b40ccee03b5175c18cde8f37e7d2a33bcef6f8ec8f7cc0d81090d1bb380949c9" dependencies = [ "smallvec", ] @@ -1116,15 +1124,42 @@ dependencies = [ "winapi", ] +[[package]] +name = "ciborium" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "effd91f6c78e5a4ace8a5d3c0b6bfaec9e2baaef55f3efc00e45fb2e477ee926" +dependencies = [ + "ciborium-io", + "ciborium-ll", + "serde", +] + +[[package]] +name = "ciborium-io" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdf919175532b369853f5d5e20b26b43112613fd6fe7aee757e35f7a44642656" + +[[package]] +name = "ciborium-ll" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "defaa24ecc093c77630e6c15e17c51f5e187bf35ee514f4e2d67baaa96dae22b" +dependencies = [ + "ciborium-io", + "half", +] + [[package]] name = "cid" -version = "0.8.6" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6ed9c8b2d17acb8110c46f1da5bf4a696d745e1474a16db0cd2b49cd0249bf2" +checksum = "b9b68e3193982cd54187d71afdb2a271ad4cf8af157858e9cb911b91321de143" dependencies = [ "core2 0.4.0", "multibase", - "multihash 0.16.3", + "multihash", "serde", "unsigned-varint", ] @@ -1179,9 +1214,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.3.9" +version = "4.3.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bba77a07e4489fb41bd90e8d4201c3eb246b3c2c9ea2ba0bddd6c1d1df87db7d" +checksum = "fb690e81c7840c0d7aade59f242ea3b41b9bc27bcd5997890e7702ae4b32e487" dependencies = [ "clap_builder", "clap_derive", @@ -1190,27 +1225,26 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.3.9" +version = "4.3.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c9b4a88bb4bc35d3d6f65a21b0f0bafe9c894fa00978de242c555ec28bea1c0" +checksum = "5ed2e96bc16d8d740f6f48d663eddf4b8a0983e79210fd55479b7bcd0a69860e" dependencies = [ "anstream", "anstyle", - "bitflags", "clap_lex", "strsim", ] [[package]] name = "clap_derive" -version = "4.3.2" +version = "4.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8cd2b2a819ad6eec39e8f1d6b53001af1e5469f8c177579cdaeb313115b825f" +checksum = "54a9bb5758fc5dfe728d1019941681eccaf0cf8a4189b692a0ee2f2ecf90a050" dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.22", + "syn 2.0.29", ] [[package]] @@ -1245,7 +1279,7 @@ version = "0.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" dependencies = [ - "bitflags", + "bitflags 1.3.2", ] [[package]] @@ -1304,15 +1338,21 @@ checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" [[package]] name = "comfy-table" -version = "6.2.0" +version = "7.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e959d788268e3bf9d35ace83e81b124190378e4c91c9067524675e33394b8ba" +checksum = "9ab77dbd8adecaf3f0db40581631b995f312a8a5ae3aa9993188bb8f23d83a5b" dependencies = [ "strum", "strum_macros", "unicode-width", ] +[[package]] +name = "common-path" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2382f75942f4b3be3690fe4f86365e9c853c1587d6ee58212cebf6e2a9ccd101" + [[package]] name = "concurrent-queue" version = "2.2.0" @@ -1337,9 +1377,31 @@ dependencies = [ [[package]] name = "const-oid" -version = "0.9.2" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28c122c3980598d243d63d9a704629a2d748d101f278052ff068be5a4423ab6f" + +[[package]] +name = "const-random" +version = "0.1.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "368a7a772ead6ce7e1de82bfb04c485f3db8ec744f72925af5735e29a22cc18e" +dependencies = [ + "const-random-macro", + "proc-macro-hack", +] + +[[package]] +name = "const-random-macro" +version = "0.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "520fbf3c07483f94e3e3ca9d0cfd913d7718ef2483d2cfd91c0d9e91474ab913" +checksum = "9d7d6ab3c3a2282db210df5f02c4dab6e0a7057af0fb7ebd4070f30fe05c0ddb" +dependencies = [ + "getrandom 0.2.10", + "once_cell", + "proc-macro-hack", + "tiny-keccak", +] [[package]] name = "constant_time_eq" @@ -1347,6 +1409,12 @@ version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "21a53c0a4d288377e7415b53dcfc3c04da5cdc2cc95c8d5ac178b58f0b861ad6" +[[package]] +name = "constant_time_eq" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" + [[package]] name = "convert_case" version = "0.4.0" @@ -1408,37 +1476,36 @@ dependencies = [ [[package]] name = "cpufeatures" -version = "0.2.8" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03e69e28e9f7f77debdedbaafa2866e1de9ba56df55a8bd7cfc724c25a09987c" +checksum = "a17b76ff3a4162b0b27f354a0c87015ddad39d35f9c0c36607a3bdd175dde1f1" dependencies = [ "libc", ] [[package]] name = "cranelift-bforest" -version = "0.93.2" +version = "0.95.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bc42ba2e232e5b20ff7dc299a812d53337dadce9a7e39a238e6a5cb82d2e57b" +checksum = "1277fbfa94bc82c8ec4af2ded3e639d49ca5f7f3c7eeab2c66accd135ece4e70" dependencies = [ "cranelift-entity", ] [[package]] name = "cranelift-codegen" -version = "0.93.2" +version = "0.95.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "253531aca9b6f56103c9420369db3263e784df39aa1c90685a1f69cfbba0623e" +checksum = "c6e8c31ad3b2270e9aeec38723888fe1b0ace3bea2b06b3f749ccf46661d3220" dependencies = [ - "arrayvec 0.7.4", "bumpalo", "cranelift-bforest", "cranelift-codegen-meta", "cranelift-codegen-shared", "cranelift-entity", "cranelift-isle", - "gimli 0.26.2", - "hashbrown 0.12.3", + "gimli 0.27.3", + "hashbrown 0.13.2", "log", "regalloc2", "smallvec", @@ -1447,33 +1514,33 @@ dependencies = [ [[package]] name = "cranelift-codegen-meta" -version = "0.93.2" +version = "0.95.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72f2154365e2bff1b1b8537a7181591fdff50d8e27fa6e40d5c69c3bad0ca7c8" +checksum = "c8ac5ac30d62b2d66f12651f6b606dbdfd9c2cfd0908de6b387560a277c5c9da" dependencies = [ "cranelift-codegen-shared", ] [[package]] name = "cranelift-codegen-shared" -version = "0.93.2" +version = "0.95.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "687e14e3f5775248930e0d5a84195abef8b829958e9794bf8d525104993612b4" +checksum = "dd82b8b376247834b59ed9bdc0ddeb50f517452827d4a11bccf5937b213748b8" [[package]] name = "cranelift-entity" -version = "0.93.2" +version = "0.95.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f42ea692c7b450ad18b8c9889661505d51c09ec4380cf1c2d278dbb2da22cae1" +checksum = "40099d38061b37e505e63f89bab52199037a72b931ad4868d9089ff7268660b0" dependencies = [ "serde", ] [[package]] name = "cranelift-frontend" -version = "0.93.2" +version = "0.95.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8483c2db6f45fe9ace984e5adc5d058102227e4c62e5aa2054e16b0275fd3a6e" +checksum = "64a25d9d0a0ae3079c463c34115ec59507b4707175454f0eee0891e83e30e82d" dependencies = [ "cranelift-codegen", "log", @@ -1483,15 +1550,15 @@ dependencies = [ [[package]] name = "cranelift-isle" -version = "0.93.2" +version = "0.95.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9793158837678902446c411741d87b43f57dadfb944f2440db4287cda8cbd59" +checksum = "80de6a7d0486e4acbd5f9f87ec49912bf4c8fb6aea00087b989685460d4469ba" [[package]] name = "cranelift-native" -version = "0.93.2" +version = "0.95.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72668c7755f2b880665cb422c8ad2d56db58a88b9bebfef0b73edc2277c13c49" +checksum = "bb6b03e0e03801c4b3fd8ce0758a94750c07a44e7944cc0ffbf0d3f2e7c79b00" dependencies = [ "cranelift-codegen", "libc", @@ -1500,9 +1567,9 @@ dependencies = [ [[package]] name = "cranelift-wasm" -version = "0.93.2" +version = "0.95.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3852ce4b088b44ac4e29459573943009a70d1b192c8d77ef949b4e814f656fc1" +checksum = "ff3220489a3d928ad91e59dd7aeaa8b3de18afb554a6211213673a71c90737ac" dependencies = [ "cranelift-codegen", "cranelift-entity", @@ -1538,6 +1605,44 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "criterion" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2b12d017a929603d80db1831cd3a24082f8137ce19c69e6447f54f5fc8d692f" +dependencies = [ + "anes", + "cast", + "ciborium", + "clap", + "criterion-plot", + "futures", + "is-terminal", + "itertools", + "num-traits", + "once_cell", + "oorandom", + "plotters", + "rayon", + "regex", + "serde", + "serde_derive", + "serde_json", + "tinytemplate", + "tokio", + "walkdir", +] + +[[package]] +name = "criterion-plot" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b50826342786a51a89e2da3a28f1c32b06e387201bc2d19791f622c673706b1" +dependencies = [ + "cast", + "itertools", +] + [[package]] name = "crossbeam-channel" version = "0.5.8" @@ -1683,12 +1788,13 @@ dependencies = [ [[package]] name = "cumulus-client-cli" version = "0.1.0" -source = "git+https://github.com/paritytech//cumulus?branch=polkadot-v0.9.42#f603a61ff370fc33740c9373833c3c6ba1486846" +source = "git+https://github.com/paritytech//cumulus?branch=polkadot-v1.0.0#0d17cf6bef320f156f2859d6d2b0abd4154ae1d5" dependencies = [ "clap", "parity-scale-codec", "sc-chain-spec", "sc-cli", + "sc-client-api", "sc-service", "sp-core", "sp-runtime", @@ -1698,7 +1804,7 @@ dependencies = [ [[package]] name = "cumulus-client-collator" version = "0.1.0" -source = "git+https://github.com/paritytech//cumulus?branch=polkadot-v0.9.42#f603a61ff370fc33740c9373833c3c6ba1486846" +source = "git+https://github.com/paritytech//cumulus?branch=polkadot-v1.0.0#0d17cf6bef320f156f2859d6d2b0abd4154ae1d5" dependencies = [ "cumulus-client-consensus-common", "cumulus-client-network", @@ -1721,16 +1827,26 @@ dependencies = [ [[package]] name = "cumulus-client-consensus-aura" version = "0.1.0" -source = "git+https://github.com/paritytech//cumulus?branch=polkadot-v0.9.42#f603a61ff370fc33740c9373833c3c6ba1486846" +source = "git+https://github.com/paritytech//cumulus?branch=polkadot-v1.0.0#0d17cf6bef320f156f2859d6d2b0abd4154ae1d5" dependencies = [ "async-trait", + "cumulus-client-collator", "cumulus-client-consensus-common", + "cumulus-client-consensus-proposer", + "cumulus-primitives-aura", "cumulus-primitives-core", + "cumulus-primitives-parachain-inherent", + "cumulus-relay-chain-interface", "futures", + "lru 0.10.1", "parity-scale-codec", + "polkadot-node-primitives", + "polkadot-overseer", + "polkadot-primitives", "sc-client-api", "sc-consensus", "sc-consensus-aura", + "sc-consensus-babe", "sc-consensus-slots", "sc-telemetry", "sp-api", @@ -1743,6 +1859,8 @@ dependencies = [ "sp-inherents", "sp-keystore", "sp-runtime", + "sp-state-machine", + "sp-timestamp", "substrate-prometheus-endpoint", "tracing", ] @@ -1750,7 +1868,7 @@ dependencies = [ [[package]] name = "cumulus-client-consensus-common" version = "0.1.0" -source = "git+https://github.com/paritytech//cumulus?branch=polkadot-v0.9.42#f603a61ff370fc33740c9373833c3c6ba1486846" +source = "git+https://github.com/paritytech//cumulus?branch=polkadot-v1.0.0#0d17cf6bef320f156f2859d6d2b0abd4154ae1d5" dependencies = [ "async-trait", "cumulus-client-pov-recovery", @@ -1763,18 +1881,38 @@ dependencies = [ "polkadot-primitives", "sc-client-api", "sc-consensus", + "sc-consensus-babe", "schnellru", "sp-blockchain", "sp-consensus", + "sp-consensus-slots", + "sp-core", "sp-runtime", + "sp-timestamp", "sp-trie", + "substrate-prometheus-endpoint", "tracing", ] +[[package]] +name = "cumulus-client-consensus-proposer" +version = "0.1.0" +source = "git+https://github.com/paritytech//cumulus?branch=polkadot-v1.0.0#0d17cf6bef320f156f2859d6d2b0abd4154ae1d5" +dependencies = [ + "anyhow", + "async-trait", + "cumulus-primitives-parachain-inherent", + "sp-consensus", + "sp-inherents", + "sp-runtime", + "sp-state-machine", + "thiserror", +] + [[package]] name = "cumulus-client-consensus-relay-chain" version = "0.1.0" -source = "git+https://github.com/paritytech//cumulus?branch=polkadot-v0.9.42#f603a61ff370fc33740c9373833c3c6ba1486846" +source = "git+https://github.com/paritytech//cumulus?branch=polkadot-v1.0.0#0d17cf6bef320f156f2859d6d2b0abd4154ae1d5" dependencies = [ "async-trait", "cumulus-client-consensus-common", @@ -1797,7 +1935,7 @@ dependencies = [ [[package]] name = "cumulus-client-network" version = "0.1.0" -source = "git+https://github.com/paritytech//cumulus?branch=polkadot-v0.9.42#f603a61ff370fc33740c9373833c3c6ba1486846" +source = "git+https://github.com/paritytech//cumulus?branch=polkadot-v1.0.0#0d17cf6bef320f156f2859d6d2b0abd4154ae1d5" dependencies = [ "async-trait", "cumulus-relay-chain-interface", @@ -1820,7 +1958,7 @@ dependencies = [ [[package]] name = "cumulus-client-pov-recovery" version = "0.1.0" -source = "git+https://github.com/paritytech//cumulus?branch=polkadot-v0.9.42#f603a61ff370fc33740c9373833c3c6ba1486846" +source = "git+https://github.com/paritytech//cumulus?branch=polkadot-v1.0.0#0d17cf6bef320f156f2859d6d2b0abd4154ae1d5" dependencies = [ "async-trait", "cumulus-primitives-core", @@ -1844,7 +1982,7 @@ dependencies = [ [[package]] name = "cumulus-client-service" version = "0.1.0" -source = "git+https://github.com/paritytech//cumulus?branch=polkadot-v0.9.42#f603a61ff370fc33740c9373833c3c6ba1486846" +source = "git+https://github.com/paritytech//cumulus?branch=polkadot-v1.0.0#0d17cf6bef320f156f2859d6d2b0abd4154ae1d5" dependencies = [ "cumulus-client-cli", "cumulus-client-collator", @@ -1879,7 +2017,7 @@ dependencies = [ [[package]] name = "cumulus-pallet-aura-ext" version = "0.1.0" -source = "git+https://github.com/paritytech//cumulus?branch=polkadot-v0.9.42#f603a61ff370fc33740c9373833c3c6ba1486846" +source = "git+https://github.com/paritytech//cumulus?branch=polkadot-v1.0.0#0d17cf6bef320f156f2859d6d2b0abd4154ae1d5" dependencies = [ "frame-support", "frame-system", @@ -1895,7 +2033,7 @@ dependencies = [ [[package]] name = "cumulus-pallet-dmp-queue" version = "0.1.0" -source = "git+https://github.com/paritytech//cumulus?branch=polkadot-v0.9.42#f603a61ff370fc33740c9373833c3c6ba1486846" +source = "git+https://github.com/paritytech//cumulus?branch=polkadot-v1.0.0#0d17cf6bef320f156f2859d6d2b0abd4154ae1d5" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -1912,7 +2050,7 @@ dependencies = [ [[package]] name = "cumulus-pallet-parachain-system" version = "0.1.0" -source = "git+https://github.com/paritytech//cumulus?branch=polkadot-v0.9.42#f603a61ff370fc33740c9373833c3c6ba1486846" +source = "git+https://github.com/paritytech//cumulus?branch=polkadot-v1.0.0#0d17cf6bef320f156f2859d6d2b0abd4154ae1d5" dependencies = [ "bytes", "cumulus-pallet-parachain-system-proc-macro", @@ -1941,18 +2079,18 @@ dependencies = [ [[package]] name = "cumulus-pallet-parachain-system-proc-macro" version = "0.1.0" -source = "git+https://github.com/paritytech//cumulus?branch=polkadot-v0.9.42#f603a61ff370fc33740c9373833c3c6ba1486846" +source = "git+https://github.com/paritytech//cumulus?branch=polkadot-v1.0.0#0d17cf6bef320f156f2859d6d2b0abd4154ae1d5" dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.22", + "syn 2.0.29", ] [[package]] name = "cumulus-pallet-xcm" version = "0.1.0" -source = "git+https://github.com/paritytech//cumulus?branch=polkadot-v0.9.42#f603a61ff370fc33740c9373833c3c6ba1486846" +source = "git+https://github.com/paritytech//cumulus?branch=polkadot-v1.0.0#0d17cf6bef320f156f2859d6d2b0abd4154ae1d5" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -1968,7 +2106,7 @@ dependencies = [ [[package]] name = "cumulus-pallet-xcmp-queue" version = "0.1.0" -source = "git+https://github.com/paritytech//cumulus?branch=polkadot-v0.9.42#f603a61ff370fc33740c9373833c3c6ba1486846" +source = "git+https://github.com/paritytech//cumulus?branch=polkadot-v1.0.0#0d17cf6bef320f156f2859d6d2b0abd4154ae1d5" dependencies = [ "cumulus-primitives-core", "frame-benchmarking", @@ -1986,10 +2124,24 @@ dependencies = [ "xcm-executor", ] +[[package]] +name = "cumulus-primitives-aura" +version = "0.1.0" +source = "git+https://github.com/paritytech//cumulus?branch=polkadot-v1.0.0#0d17cf6bef320f156f2859d6d2b0abd4154ae1d5" +dependencies = [ + "parity-scale-codec", + "polkadot-core-primitives", + "polkadot-primitives", + "sp-api", + "sp-consensus-aura", + "sp-runtime", + "sp-std", +] + [[package]] name = "cumulus-primitives-core" version = "0.1.0" -source = "git+https://github.com/paritytech//cumulus?branch=polkadot-v0.9.42#f603a61ff370fc33740c9373833c3c6ba1486846" +source = "git+https://github.com/paritytech//cumulus?branch=polkadot-v1.0.0#0d17cf6bef320f156f2859d6d2b0abd4154ae1d5" dependencies = [ "parity-scale-codec", "polkadot-core-primitives", @@ -2006,7 +2158,7 @@ dependencies = [ [[package]] name = "cumulus-primitives-parachain-inherent" version = "0.1.0" -source = "git+https://github.com/paritytech//cumulus?branch=polkadot-v0.9.42#f603a61ff370fc33740c9373833c3c6ba1486846" +source = "git+https://github.com/paritytech//cumulus?branch=polkadot-v1.0.0#0d17cf6bef320f156f2859d6d2b0abd4154ae1d5" dependencies = [ "async-trait", "cumulus-primitives-core", @@ -2029,7 +2181,7 @@ dependencies = [ [[package]] name = "cumulus-primitives-timestamp" version = "0.1.0" -source = "git+https://github.com/paritytech//cumulus?branch=polkadot-v0.9.42#f603a61ff370fc33740c9373833c3c6ba1486846" +source = "git+https://github.com/paritytech//cumulus?branch=polkadot-v1.0.0#0d17cf6bef320f156f2859d6d2b0abd4154ae1d5" dependencies = [ "cumulus-primitives-core", "futures", @@ -2042,7 +2194,7 @@ dependencies = [ [[package]] name = "cumulus-primitives-utility" version = "0.1.0" -source = "git+https://github.com/paritytech//cumulus?branch=polkadot-v0.9.42#f603a61ff370fc33740c9373833c3c6ba1486846" +source = "git+https://github.com/paritytech//cumulus?branch=polkadot-v1.0.0#0d17cf6bef320f156f2859d6d2b0abd4154ae1d5" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -2060,7 +2212,7 @@ dependencies = [ [[package]] name = "cumulus-relay-chain-inprocess-interface" version = "0.1.0" -source = "git+https://github.com/paritytech//cumulus?branch=polkadot-v0.9.42#f603a61ff370fc33740c9373833c3c6ba1486846" +source = "git+https://github.com/paritytech//cumulus?branch=polkadot-v1.0.0#0d17cf6bef320f156f2859d6d2b0abd4154ae1d5" dependencies = [ "async-trait", "cumulus-primitives-core", @@ -2068,7 +2220,6 @@ dependencies = [ "futures", "futures-timer", "polkadot-cli", - "polkadot-client", "polkadot-service", "sc-cli", "sc-client-api", @@ -2085,7 +2236,7 @@ dependencies = [ [[package]] name = "cumulus-relay-chain-interface" version = "0.1.0" -source = "git+https://github.com/paritytech//cumulus?branch=polkadot-v0.9.42#f603a61ff370fc33740c9373833c3c6ba1486846" +source = "git+https://github.com/paritytech//cumulus?branch=polkadot-v1.0.0#0d17cf6bef320f156f2859d6d2b0abd4154ae1d5" dependencies = [ "async-trait", "cumulus-primitives-core", @@ -2103,9 +2254,9 @@ dependencies = [ [[package]] name = "cumulus-relay-chain-minimal-node" version = "0.1.0" -source = "git+https://github.com/paritytech//cumulus?branch=polkadot-v0.9.42#f603a61ff370fc33740c9373833c3c6ba1486846" +source = "git+https://github.com/paritytech//cumulus?branch=polkadot-v1.0.0#0d17cf6bef320f156f2859d6d2b0abd4154ae1d5" dependencies = [ - "array-bytes 6.1.0", + "array-bytes", "async-trait", "cumulus-primitives-core", "cumulus-relay-chain-interface", @@ -2141,7 +2292,7 @@ dependencies = [ [[package]] name = "cumulus-relay-chain-rpc-interface" version = "0.1.0" -source = "git+https://github.com/paritytech//cumulus?branch=polkadot-v0.9.42#f603a61ff370fc33740c9373833c3c6ba1486846" +source = "git+https://github.com/paritytech//cumulus?branch=polkadot-v1.0.0#0d17cf6bef320f156f2859d6d2b0abd4154ae1d5" dependencies = [ "async-trait", "cumulus-primitives-core", @@ -2171,7 +2322,7 @@ dependencies = [ [[package]] name = "cumulus-test-relay-sproof-builder" version = "0.1.0" -source = "git+https://github.com/paritytech//cumulus?branch=polkadot-v0.9.42#f603a61ff370fc33740c9373833c3c6ba1486846" +source = "git+https://github.com/paritytech//cumulus?branch=polkadot-v1.0.0#0d17cf6bef320f156f2859d6d2b0abd4154ae1d5" dependencies = [ "cumulus-primitives-core", "parity-scale-codec", @@ -2182,84 +2333,211 @@ dependencies = [ ] [[package]] -name = "currency" -version = "1.2.0" +name = "cumulus-test-relay-validation-worker-provider" +version = "0.1.0" +source = "git+https://github.com/paritytech//cumulus?branch=polkadot-v1.0.0#0d17cf6bef320f156f2859d6d2b0abd4154ae1d5" +dependencies = [ + "polkadot-node-core-pvf", + "toml 0.7.6", +] + +[[package]] +name = "cumulus-test-runtime" +version = "0.1.0" +source = "git+https://github.com/paritytech//cumulus?branch=polkadot-v1.0.0#0d17cf6bef320f156f2859d6d2b0abd4154ae1d5" dependencies = [ + "cumulus-pallet-parachain-system", + "cumulus-primitives-core", + "cumulus-primitives-timestamp", + "frame-executive", "frame-support", "frame-system", - "interbtc-primitives", - "mocktopus", - "orml-tokens", - "orml-traits", + "frame-system-rpc-runtime-api", + "pallet-balances", + "pallet-glutton", + "pallet-sudo", + "pallet-timestamp", "pallet-transaction-payment", "parity-scale-codec", "scale-info", - "serde", - "sp-arithmetic", + "sp-api", + "sp-block-builder", "sp-core", + "sp-inherents", "sp-io", + "sp-offchain", "sp-runtime", + "sp-session", "sp-std", - "traits", -] - -[[package]] -name = "curve25519-dalek" -version = "2.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a9b85542f99a2dfa2a1b8e192662741c9859a846b296bef1c92ef9b58b5a216" -dependencies = [ - "byteorder", - "digest 0.8.1", - "rand_core 0.5.1", - "subtle", - "zeroize", -] - -[[package]] -name = "curve25519-dalek" -version = "3.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b9fdf9972b2bd6af2d913799d9ebc165ea4d2e65878e329d9c6b372c4491b61" -dependencies = [ - "byteorder", - "digest 0.9.0", - "rand_core 0.5.1", - "subtle", - "zeroize", -] - -[[package]] -name = "curve25519-dalek" -version = "4.0.0-rc.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d4ba9852b42210c7538b75484f9daa0655e9a3ac04f693747bb0f02cf3cfe16" -dependencies = [ - "cfg-if", - "fiat-crypto", - "packed_simd_2", - "platforms 3.0.2", - "subtle", - "zeroize", + "sp-transaction-pool", + "sp-version", + "substrate-wasm-builder", ] [[package]] -name = "cxx" -version = "1.0.97" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e88abab2f5abbe4c56e8f1fb431b784d710b709888f35755a160e62e33fe38e8" +name = "cumulus-test-service" +version = "0.1.0" +source = "git+https://github.com/paritytech//cumulus?branch=polkadot-v1.0.0#0d17cf6bef320f156f2859d6d2b0abd4154ae1d5" dependencies = [ - "cc", - "cxxbridge-flags", - "cxxbridge-macro", + "async-trait", + "clap", + "criterion", + "cumulus-client-cli", + "cumulus-client-consensus-common", + "cumulus-client-consensus-relay-chain", + "cumulus-client-pov-recovery", + "cumulus-client-service", + "cumulus-pallet-parachain-system", + "cumulus-primitives-core", + "cumulus-primitives-parachain-inherent", + "cumulus-relay-chain-inprocess-interface", + "cumulus-relay-chain-interface", + "cumulus-relay-chain-minimal-node", + "cumulus-test-relay-sproof-builder", + "cumulus-test-relay-validation-worker-provider", + "cumulus-test-runtime", + "frame-system", + "frame-system-rpc-runtime-api", + "jsonrpsee", + "pallet-timestamp", + "pallet-transaction-payment", + "parachains-common", + "parity-scale-codec", + "polkadot-cli", + "polkadot-node-subsystem", + "polkadot-overseer", + "polkadot-primitives", + "polkadot-service", + "polkadot-test-service", + "rand 0.8.5", + "sc-basic-authorship", + "sc-block-builder", + "sc-chain-spec", + "sc-cli", + "sc-client-api", + "sc-consensus", + "sc-executor", + "sc-executor-common", + "sc-executor-wasmtime", + "sc-network", + "sc-service", + "sc-telemetry", + "sc-tracing", + "sc-transaction-pool", + "sc-transaction-pool-api", + "serde", + "sp-api", + "sp-arithmetic", + "sp-blockchain", + "sp-consensus", + "sp-core", + "sp-io", + "sp-keyring", + "sp-runtime", + "sp-state-machine", + "sp-timestamp", + "sp-tracing", + "sp-trie", + "substrate-test-client", + "tempfile", + "tokio", + "tracing", + "url", +] + +[[package]] +name = "currency" +version = "1.2.0" +dependencies = [ + "frame-support", + "frame-system", + "interbtc-primitives", + "mocktopus", + "orml-tokens", + "orml-traits", + "pallet-transaction-payment", + "parity-scale-codec", + "scale-info", + "serde", + "sp-arithmetic", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", + "traits", +] + +[[package]] +name = "curve25519-dalek" +version = "2.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a9b85542f99a2dfa2a1b8e192662741c9859a846b296bef1c92ef9b58b5a216" +dependencies = [ + "byteorder", + "digest 0.8.1", + "rand_core 0.5.1", + "subtle", + "zeroize", +] + +[[package]] +name = "curve25519-dalek" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b9fdf9972b2bd6af2d913799d9ebc165ea4d2e65878e329d9c6b372c4491b61" +dependencies = [ + "byteorder", + "digest 0.9.0", + "rand_core 0.5.1", + "subtle", + "zeroize", +] + +[[package]] +name = "curve25519-dalek" +version = "4.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f711ade317dd348950a9910f81c5947e3d8907ebd2b83f76203ff1807e6a2bc2" +dependencies = [ + "cfg-if", + "cpufeatures", + "curve25519-dalek-derive", + "digest 0.10.7", + "fiat-crypto", + "platforms", + "rustc_version", + "subtle", + "zeroize", +] + +[[package]] +name = "curve25519-dalek-derive" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83fdaf97f4804dcebfa5862639bc9ce4121e82140bec2a987ac5140294865b5b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.29", +] + +[[package]] +name = "cxx" +version = "1.0.106" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28403c86fc49e3401fdf45499ba37fad6493d9329449d6449d7f0e10f4654d28" +dependencies = [ + "cc", + "cxxbridge-flags", + "cxxbridge-macro", "link-cplusplus", ] [[package]] name = "cxx-build" -version = "1.0.97" +version = "1.0.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c0c11acd0e63bae27dcd2afced407063312771212b7a823b4fd72d633be30fb" +checksum = "78da94fef01786dc3e0c76eafcd187abcaa9972c78e05ff4041e24fdf059c285" dependencies = [ "cc", "codespan-reporting", @@ -2267,24 +2545,24 @@ dependencies = [ "proc-macro2", "quote", "scratch", - "syn 2.0.22", + "syn 2.0.29", ] [[package]] name = "cxxbridge-flags" -version = "1.0.97" +version = "1.0.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d3816ed957c008ccd4728485511e3d9aaf7db419aa321e3d2c5a2f3411e36c8" +checksum = "e2a6f5e1dfb4b34292ad4ea1facbfdaa1824705b231610087b00b17008641809" [[package]] name = "cxxbridge-macro" -version = "1.0.97" +version = "1.0.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a26acccf6f445af85ea056362561a24ef56cdc15fcc685f03aec50b9c702cb6d" +checksum = "50c49547d73ba8dcfd4ad7325d64c6d5391ff4224d498fc39a6f3f49825a530d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.22", + "syn 2.0.29", ] [[package]] @@ -2383,9 +2661,9 @@ dependencies = [ [[package]] name = "der" -version = "0.7.6" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56acb310e15652100da43d130af8d97b509e95af61aab1c5a7939ef24337ee17" +checksum = "fffa369a668c8af7dbf8b5e56c9f744fbd399949ed171606040001947de40b1c" dependencies = [ "const-oid", "zeroize", @@ -2419,6 +2697,12 @@ dependencies = [ "rusticata-macros", ] +[[package]] +name = "deranged" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2696e8a945f658fd14dc3b87242e6b80cd0f36ff04ea560fa39082368847946" + [[package]] name = "derivative" version = "2.2.0" @@ -2692,7 +2976,33 @@ checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.22", + "syn 2.0.29", +] + +[[package]] +name = "docify" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af1b04e6ef3d21119d3eb7b032bca17f99fe041e9c072f30f32cc0e1a2b1f3c4" +dependencies = [ + "docify_macros", +] + +[[package]] +name = "docify_macros" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b5610df7f2acf89a1bb5d1a66ae56b1c7fcdcfe3948856fb3ace3f644d70eb7" +dependencies = [ + "common-path", + "derive-syn-parse", + "lazy_static", + "proc-macro2", + "quote", + "regex", + "syn 2.0.29", + "termcolor", + "walkdir", ] [[package]] @@ -2715,9 +3025,9 @@ checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" [[package]] name = "dtoa" -version = "1.0.6" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65d09067bfacaa79114679b279d7f5885b53295b1e2cfb4e79c8e4bd3d633169" +checksum = "dcbb2bf8e87535c23f7a8a321e364ce21462d0ff10cb6407820e8e96dfff6653" [[package]] name = "dyn-clonable" @@ -2742,9 +3052,9 @@ dependencies = [ [[package]] name = "dyn-clone" -version = "1.0.11" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68b0cf012f1230e43cd00ebb729c6bb58707ecfa8ad08b52ef3a4ccd2697fc30" +checksum = "bbfc4744c1b8f2a09adc0e55242f60b1af195d88596bd8700be74418c056c555" [[package]] name = "ecdsa" @@ -2760,11 +3070,11 @@ dependencies = [ [[package]] name = "ecdsa" -version = "0.16.7" +version = "0.16.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0997c976637b606099b9985693efa3581e84e41f5c11ba5255f88711058ad428" +checksum = "a4b1e0c257a9e9f25f90ff76d7a68360ed497ee519c8e428d1825ef0000799d4" dependencies = [ - "der 0.7.6", + "der 0.7.8", "digest 0.10.7", "elliptic-curve 0.13.5", "rfc6979 0.4.0", @@ -2781,6 +3091,16 @@ dependencies = [ "signature 1.6.4", ] +[[package]] +name = "ed25519" +version = "2.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60f6d271ca33075c88028be6f04d502853d63a5ece419d269c15315d4fc1cf1d" +dependencies = [ + "pkcs8 0.10.2", + "signature 2.1.0", +] + [[package]] name = "ed25519-dalek" version = "1.0.1" @@ -2788,13 +3108,25 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c762bae6dcaf24c4c84667b8579785430908723d5c889f469d76a41d59cc7a9d" dependencies = [ "curve25519-dalek 3.2.0", - "ed25519", - "rand 0.7.3", - "serde", + "ed25519 1.5.3", "sha2 0.9.9", "zeroize", ] +[[package]] +name = "ed25519-dalek" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7277392b266383ef8396db7fdeb1e77b6c52fed775f5df15bb24f35b72156980" +dependencies = [ + "curve25519-dalek 4.0.0", + "ed25519 2.2.2", + "rand_core 0.6.4", + "serde", + "sha2 0.10.7", + "zeroize", +] + [[package]] name = "ed25519-zebra" version = "3.1.0" @@ -2811,9 +3143,9 @@ dependencies = [ [[package]] name = "either" -version = "1.8.1" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" +checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" dependencies = [ "serde", ] @@ -2854,7 +3186,7 @@ dependencies = [ "group 0.13.0", "pkcs8 0.10.2", "rand_core 0.6.4", - "sec1 0.7.2", + "sec1 0.7.3", "subtle", "zeroize", ] @@ -2894,18 +3226,18 @@ checksum = "5e9a1f9f7d83e59740248a6e14ecf93929ade55027844dfcea78beafccc15745" dependencies = [ "proc-macro2", "quote", - "syn 2.0.22", + "syn 2.0.29", ] [[package]] name = "enumn" -version = "0.1.8" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48016319042fb7c87b78d2993084a831793a897a5cd1a2a67cab9d1eeb4b7d76" +checksum = "b893c4eb2dc092c811165f84dc7447fae16fb66521717968c34c509b39b1a5c5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.22", + "syn 2.0.29", ] [[package]] @@ -2942,15 +3274,15 @@ checksum = "e48c92028aaa870e83d51c64e5d4e0b6981b360c522198c23959f219a4e1b15b" [[package]] name = "equivalent" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88bffebc5d80432c9b140ee17875ff173a8ab62faad5b257da912bd2f6c1c0a1" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a" +checksum = "6b30f669a7961ef1631673d2766cc92f52d64f7ef354d4fe0ddfd30ed52f0f4f" dependencies = [ "errno-dragonfly", "libc", @@ -3153,19 +3485,6 @@ dependencies = [ "quote", ] -[[package]] -name = "expander" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f360349150728553f92e4c997a16af8915f418d3a0f21b440d34c5632f16ed84" -dependencies = [ - "blake2", - "fs-err", - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "expander" version = "2.0.0" @@ -3176,7 +3495,7 @@ dependencies = [ "fs-err", "proc-macro2", "quote", - "syn 2.0.22", + "syn 2.0.29", ] [[package]] @@ -3224,6 +3543,12 @@ dependencies = [ "instant", ] +[[package]] +name = "fastrand" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6999dc1837253364c2ebb0704ba97994bd874e8f195d665c50b7548f6ea92764" + [[package]] name = "fatality" version = "0.0.6" @@ -3252,7 +3577,7 @@ dependencies = [ [[package]] name = "fc-consensus" version = "2.0.0-dev" -source = "git+https://github.com/paritytech//frontier?branch=polkadot-v0.9.42#1a718546085be20ce381b70e1f9e4c8b4d4b1f03" +source = "git+https://github.com/paritytech//frontier?branch=polkadot-v1.0.0#b520b749eb90df15177144dbece3fbd3622a2b19" dependencies = [ "async-trait", "fp-consensus", @@ -3268,7 +3593,7 @@ dependencies = [ [[package]] name = "fc-db" version = "2.0.0-dev" -source = "git+https://github.com/paritytech//frontier?branch=polkadot-v0.9.42#1a718546085be20ce381b70e1f9e4c8b4d4b1f03" +source = "git+https://github.com/paritytech//frontier?branch=polkadot-v1.0.0#b520b749eb90df15177144dbece3fbd3622a2b19" dependencies = [ "async-trait", "ethereum", @@ -3288,7 +3613,7 @@ dependencies = [ "sp-api", "sp-blockchain", "sp-core", - "sp-database 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42)", + "sp-database", "sp-runtime", "sp-storage", "sqlx", @@ -3298,7 +3623,7 @@ dependencies = [ [[package]] name = "fc-mapping-sync" version = "2.0.0-dev" -source = "git+https://github.com/paritytech//frontier?branch=polkadot-v0.9.42#1a718546085be20ce381b70e1f9e4c8b4d4b1f03" +source = "git+https://github.com/paritytech//frontier?branch=polkadot-v1.0.0#b520b749eb90df15177144dbece3fbd3622a2b19" dependencies = [ "fc-db", "fc-storage", @@ -3321,7 +3646,7 @@ dependencies = [ [[package]] name = "fc-rpc" version = "2.0.0-dev" -source = "git+https://github.com/paritytech//frontier?branch=polkadot-v0.9.42#1a718546085be20ce381b70e1f9e4c8b4d4b1f03" +source = "git+https://github.com/paritytech//frontier?branch=polkadot-v1.0.0#b520b749eb90df15177144dbece3fbd3622a2b19" dependencies = [ "ethereum", "ethereum-types", @@ -3339,7 +3664,6 @@ dependencies = [ "jsonrpsee", "libsecp256k1 0.7.1", "log", - "lru 0.8.1", "pallet-evm", "parity-scale-codec", "prometheus", @@ -3354,6 +3678,7 @@ dependencies = [ "sc-transaction-pool", "sc-transaction-pool-api", "sc-utils", + "schnellru", "serde", "sp-api", "sp-block-builder", @@ -3371,7 +3696,7 @@ dependencies = [ [[package]] name = "fc-rpc-core" version = "1.1.0-dev" -source = "git+https://github.com/paritytech//frontier?branch=polkadot-v0.9.42#1a718546085be20ce381b70e1f9e4c8b4d4b1f03" +source = "git+https://github.com/paritytech//frontier?branch=polkadot-v1.0.0#b520b749eb90df15177144dbece3fbd3622a2b19" dependencies = [ "ethereum", "ethereum-types", @@ -3384,7 +3709,7 @@ dependencies = [ [[package]] name = "fc-storage" version = "1.0.0-dev" -source = "git+https://github.com/paritytech//frontier?branch=polkadot-v0.9.42#1a718546085be20ce381b70e1f9e4c8b4d4b1f03" +source = "git+https://github.com/paritytech//frontier?branch=polkadot-v1.0.0#b520b749eb90df15177144dbece3fbd3622a2b19" dependencies = [ "ethereum", "ethereum-types", @@ -3474,13 +3799,13 @@ dependencies = [ [[package]] name = "filetime" -version = "0.2.21" +version = "0.2.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cbc844cecaee9d4443931972e1289c8ff485cb4cc2767cb03ca139ed6885153" +checksum = "d4029edd3e734da6fe05b6cd7bd2960760a616bd2ddd0d59a0124746d6272af0" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.2.16", + "redox_syscall 0.3.5", "windows-sys 0.48.0", ] @@ -3530,13 +3855,13 @@ checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" [[package]] name = "flate2" -version = "1.0.26" +version = "1.0.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b9429470923de8e8cbd4d2dc513535400b4b3fef0319fb5c4e1f520a7bef743" +checksum = "c6c98ee8095e9d1dcbf2fcc6d95acccb90d1c81db1e44725c6a984b1dbdfb010" dependencies = [ "crc32fast", "libz-sys", - "miniz_oxide 0.7.1", + "miniz_oxide", ] [[package]] @@ -3584,7 +3909,7 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "fork-tree" version = "3.0.0" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "parity-scale-codec", ] @@ -3601,7 +3926,7 @@ dependencies = [ [[package]] name = "fp-account" version = "1.0.0-dev" -source = "git+https://github.com/paritytech//frontier?branch=polkadot-v0.9.42#1a718546085be20ce381b70e1f9e4c8b4d4b1f03" +source = "git+https://github.com/paritytech//frontier?branch=polkadot-v1.0.0#b520b749eb90df15177144dbece3fbd3622a2b19" dependencies = [ "hex", "impl-serde 0.4.0", @@ -3620,7 +3945,7 @@ dependencies = [ [[package]] name = "fp-consensus" version = "2.0.0-dev" -source = "git+https://github.com/paritytech//frontier?branch=polkadot-v0.9.42#1a718546085be20ce381b70e1f9e4c8b4d4b1f03" +source = "git+https://github.com/paritytech//frontier?branch=polkadot-v1.0.0#b520b749eb90df15177144dbece3fbd3622a2b19" dependencies = [ "ethereum", "parity-scale-codec", @@ -3632,7 +3957,7 @@ dependencies = [ [[package]] name = "fp-ethereum" version = "1.0.0-dev" -source = "git+https://github.com/paritytech//frontier?branch=polkadot-v0.9.42#1a718546085be20ce381b70e1f9e4c8b4d4b1f03" +source = "git+https://github.com/paritytech//frontier?branch=polkadot-v1.0.0#b520b749eb90df15177144dbece3fbd3622a2b19" dependencies = [ "ethereum", "ethereum-types", @@ -3646,7 +3971,7 @@ dependencies = [ [[package]] name = "fp-evm" version = "3.0.0-dev" -source = "git+https://github.com/paritytech//frontier?branch=polkadot-v0.9.42#1a718546085be20ce381b70e1f9e4c8b4d4b1f03" +source = "git+https://github.com/paritytech//frontier?branch=polkadot-v1.0.0#b520b749eb90df15177144dbece3fbd3622a2b19" dependencies = [ "evm", "frame-support", @@ -3661,7 +3986,7 @@ dependencies = [ [[package]] name = "fp-rpc" version = "3.0.0-dev" -source = "git+https://github.com/paritytech//frontier?branch=polkadot-v0.9.42#1a718546085be20ce381b70e1f9e4c8b4d4b1f03" +source = "git+https://github.com/paritytech//frontier?branch=polkadot-v1.0.0#b520b749eb90df15177144dbece3fbd3622a2b19" dependencies = [ "ethereum", "ethereum-types", @@ -3678,7 +4003,7 @@ dependencies = [ [[package]] name = "fp-self-contained" version = "1.0.0-dev" -source = "git+https://github.com/paritytech//frontier?branch=polkadot-v0.9.42#1a718546085be20ce381b70e1f9e4c8b4d4b1f03" +source = "git+https://github.com/paritytech//frontier?branch=polkadot-v1.0.0#b520b749eb90df15177144dbece3fbd3622a2b19" dependencies = [ "frame-support", "parity-scale-codec", @@ -3690,7 +4015,7 @@ dependencies = [ [[package]] name = "fp-storage" version = "2.0.0" -source = "git+https://github.com/paritytech//frontier?branch=polkadot-v0.9.42#1a718546085be20ce381b70e1f9e4c8b4d4b1f03" +source = "git+https://github.com/paritytech//frontier?branch=polkadot-v1.0.0#b520b749eb90df15177144dbece3fbd3622a2b19" dependencies = [ "parity-scale-codec", "serde", @@ -3705,7 +4030,7 @@ checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" [[package]] name = "frame-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-support", "frame-support-procedural", @@ -3730,10 +4055,10 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "Inflector", - "array-bytes 4.2.0", + "array-bytes", "chrono", "clap", "comfy-table", @@ -3761,15 +4086,16 @@ dependencies = [ "sp-api", "sp-blockchain", "sp-core", - "sp-database 4.0.0-dev (git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42)", + "sp-database", "sp-externalities", "sp-inherents", + "sp-io", "sp-keystore", "sp-runtime", "sp-state-machine", - "sp-std", "sp-storage", "sp-trie", + "sp-wasm-interface", "thiserror", "thousands", ] @@ -3777,18 +4103,18 @@ dependencies = [ [[package]] name = "frame-election-provider-solution-type" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.22", + "syn 2.0.29", ] [[package]] name = "frame-election-provider-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-election-provider-solution-type", "frame-support", @@ -3805,7 +4131,7 @@ dependencies = [ [[package]] name = "frame-executive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-support", "frame-system", @@ -3821,9 +4147,9 @@ dependencies = [ [[package]] name = "frame-metadata" -version = "15.1.0" +version = "16.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "878babb0b136e731cc77ec2fd883ff02745ff21e6fb662729953d44923df009c" +checksum = "87cf1549fba25a6fcac22785b61698317d958e96cac72a59102ea45b9ae64692" dependencies = [ "cfg-if", "parity-scale-codec", @@ -3834,7 +4160,7 @@ dependencies = [ [[package]] name = "frame-remote-externalities" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "async-recursion", "futures", @@ -3849,21 +4175,22 @@ dependencies = [ "spinners", "substrate-rpc-client", "tokio", + "tokio-retry", ] [[package]] name = "frame-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ - "bitflags", + "bitflags 1.3.2", "environmental", "frame-metadata", "frame-support-procedural", "impl-trait-for-tuples", "k256", "log", - "once_cell", + "macro_magic", "parity-scale-codec", "paste", "scale-info", @@ -3873,6 +4200,7 @@ dependencies = [ "sp-arithmetic", "sp-core", "sp-core-hashing-proc-macro", + "sp-debug-derive", "sp-inherents", "sp-io", "sp-runtime", @@ -3887,46 +4215,49 @@ dependencies = [ [[package]] name = "frame-support-procedural" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "Inflector", "cfg-expr", "derive-syn-parse", + "expander 2.0.0", "frame-support-procedural-tools", "itertools", + "macro_magic", "proc-macro-warning", "proc-macro2", "quote", - "syn 2.0.22", + "syn 2.0.29", ] [[package]] name = "frame-support-procedural-tools" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.22", + "syn 2.0.29", ] [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.22", + "syn 2.0.29", ] [[package]] name = "frame-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ + "cfg-if", "frame-support", "log", "parity-scale-codec", @@ -3943,7 +4274,7 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-benchmarking", "frame-support", @@ -3958,7 +4289,7 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "parity-scale-codec", "sp-api", @@ -3967,7 +4298,7 @@ dependencies = [ [[package]] name = "frame-try-runtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-support", "parity-scale-codec", @@ -3994,11 +4325,11 @@ dependencies = [ [[package]] name = "fs4" -version = "0.6.5" +version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7672706608ecb74ab2e055c68327ffc25ae4cac1e12349204fd5fb0f3487cce2" +checksum = "2eeb4ed9e12f43b7fa0baae3f9cdda28352770132ef2e09a23760c29cae8bd47" dependencies = [ - "rustix 0.37.20", + "rustix 0.38.8", "windows-sys 0.48.0", ] @@ -4080,12 +4411,12 @@ version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49a9d51ce47660b1e808d3c990b4709f2f415d928835a17dfd16991515c46bce" dependencies = [ - "fastrand", + "fastrand 1.9.0", "futures-core", "futures-io", "memchr", "parking", - "pin-project-lite 0.2.9", + "pin-project-lite 0.2.12", "waker-fn", ] @@ -4097,7 +4428,7 @@ checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", - "syn 2.0.22", + "syn 2.0.29", ] [[package]] @@ -4142,7 +4473,7 @@ dependencies = [ "futures-sink", "futures-task", "memchr", - "pin-project-lite 0.2.9", + "pin-project-lite 0.2.12", "pin-utils", "slab", ] @@ -4230,9 +4561,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.26.2" +version = "0.27.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22030e2c5a68ec659fde1e949a745124b48e6fa8b045b7ed5bd1fe4ccc5c4e5d" +checksum = "b6c80984affa11d98d1b88b66ac8853f143217b399d3c74116778ff8fdb4ed2e" dependencies = [ "fallible-iterator", "indexmap 1.9.3", @@ -4241,9 +4572,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.27.3" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6c80984affa11d98d1b88b66ac8853f143217b399d3c74116778ff8fdb4ed2e" +checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0" [[package]] name = "glob" @@ -4253,11 +4584,11 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" [[package]] name = "globset" -version = "0.4.10" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "029d74589adefde59de1a0c4f4732695c32805624aec7b68d91503d4dba79afc" +checksum = "759c97c1e17c55525b57192c06a267cda0ac5210b222d6b82189a2338fa1c13d" dependencies = [ - "aho-corasick 0.7.20", + "aho-corasick", "bstr", "fnv", "log", @@ -4288,9 +4619,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.20" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97ec8491ebaf99c8eaa73058b045fe58073cd6be7f596ac993ced0b0a0c01049" +checksum = "91fc23aa11be92976ef4729127f1a74adf36d8436f7816b185d18df956790833" dependencies = [ "bytes", "fnv", @@ -4305,6 +4636,12 @@ dependencies = [ "tracing", ] +[[package]] +name = "half" +version = "1.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eabb4a44450da02c90444cf74558da904edde8fb4e9035a9a6a4e15445af0bd7" + [[package]] name = "handlebars" version = "4.3.7" @@ -4397,18 +4734,9 @@ dependencies = [ [[package]] name = "hermit-abi" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7" -dependencies = [ - "libc", -] - -[[package]] -name = "hermit-abi" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286" +checksum = "443144c8cdadd93ebf52ddb4056d257f5b52c04d3c804e657d19eb73fc33668b" [[package]] name = "hex" @@ -4532,14 +4860,14 @@ checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" dependencies = [ "bytes", "http", - "pin-project-lite 0.2.9", + "pin-project-lite 0.2.12", ] [[package]] name = "http-range-header" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bfe8eed0a9285ef776bb792479ea3834e8b94e13d615c2f66d03dd50a435a29" +checksum = "add0ab9360ddbd88cfeb3bd9574a1d85cfdfa14db10b3e21d3700dbc4328758f" [[package]] name = "httparse" @@ -4549,9 +4877,9 @@ checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" [[package]] name = "httpdate" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "humantime" @@ -4575,7 +4903,7 @@ dependencies = [ "httparse", "httpdate", "itoa", - "pin-project-lite 0.2.9", + "pin-project-lite 0.2.12", "socket2 0.4.9", "tokio", "tower-service", @@ -4585,18 +4913,19 @@ dependencies = [ [[package]] name = "hyper-rustls" -version = "0.23.2" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1788965e61b367cd03a62950836d5cd41560c3577d90e40e0819373194d1661c" +checksum = "8d78e1e73ec14cf7375674f74d7dde185c8206fd9dea6fb6295e8a98098aaa97" dependencies = [ + "futures-util", "http", "hyper", "log", - "rustls 0.20.8", + "rustls 0.21.6", "rustls-native-certs", "tokio", "tokio-rustls", - "webpki-roots", + "webpki-roots 0.23.1", ] [[package]] @@ -4754,9 +5083,9 @@ checksum = "8e04e2fd2b8188ea827b32ef11de88377086d690286ab35747ef7f9bf3ccb590" [[package]] name = "indicatif" -version = "0.17.5" +version = "0.17.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ff8cc23a7393a397ed1d7f56e6365cba772aba9f9912ab968b03043c395d057" +checksum = "0b297dc40733f23a0e52728a58fa9489a5b7638a324932de16b41adc3ef80730" dependencies = [ "console", "instant", @@ -4870,11 +5199,13 @@ dependencies = [ "sc-executor", "sc-network", "sc-network-sync", + "sc-offchain", "sc-rpc", "sc-service", "sc-telemetry", "sc-tracing", "sc-transaction-pool", + "sc-transaction-pool-api", "serde", "serde_json", "sp-api", @@ -5098,13 +5429,19 @@ dependencies = [ "xcm-executor", ] +[[package]] +name = "intx" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6f38a50a899dc47a6d0ed5508e7f601a2e34c3a85303514b5d137f3c10a0c75" + [[package]] name = "io-lifetimes" version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" dependencies = [ - "hermit-abi 0.3.1", + "hermit-abi 0.3.2", "libc", "windows-sys 0.48.0", ] @@ -5135,13 +5472,12 @@ checksum = "28b29a3cd74f0f4598934efe3aeba42bae0eb4680554128851ebbecb02af14e6" [[package]] name = "is-terminal" -version = "0.4.7" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adcf93614601c8129ddf72e2d5633df827ba6551541c6d8c59520a371475be1f" +checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" dependencies = [ - "hermit-abi 0.3.1", - "io-lifetimes", - "rustix 0.37.20", + "hermit-abi 0.3.2", + "rustix 0.38.8", "windows-sys 0.48.0", ] @@ -5212,9 +5548,9 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.6" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" +checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" [[package]] name = "jobserver" @@ -5236,9 +5572,9 @@ dependencies = [ [[package]] name = "jsonrpsee" -version = "0.16.2" +version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d291e3a5818a2384645fd9756362e6d89cf0541b0b916fa7702ea4a9833608e" +checksum = "367a292944c07385839818bb71c8d76611138e2dedb0677d035b8da21d29c78b" dependencies = [ "jsonrpsee-core", "jsonrpsee-http-client", @@ -5251,9 +5587,9 @@ dependencies = [ [[package]] name = "jsonrpsee-client-transport" -version = "0.16.2" +version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "965de52763f2004bc91ac5bcec504192440f0b568a5d621c59d9dbd6f886c3fb" +checksum = "c8b3815d9f5d5de348e5f162b316dc9cdf4548305ebb15b4eb9328e66cf27d7a" dependencies = [ "futures-util", "http", @@ -5267,14 +5603,14 @@ dependencies = [ "tokio-rustls", "tokio-util", "tracing", - "webpki-roots", + "webpki-roots 0.25.2", ] [[package]] name = "jsonrpsee-core" -version = "0.16.2" +version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4e70b4439a751a5de7dd5ed55eacff78ebf4ffe0fc009cb1ebb11417f5b536b" +checksum = "2b5dde66c53d6dcdc8caea1874a45632ec0fcf5b437789f1e45766a1512ce803" dependencies = [ "anyhow", "arrayvec 0.7.4", @@ -5300,9 +5636,9 @@ dependencies = [ [[package]] name = "jsonrpsee-http-client" -version = "0.16.2" +version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc345b0a43c6bc49b947ebeb936e886a419ee3d894421790c969cc56040542ad" +checksum = "7e5f9fabdd5d79344728521bb65e3106b49ec405a78b66fbff073b72b389fa43" dependencies = [ "async-trait", "hyper", @@ -5319,9 +5655,9 @@ dependencies = [ [[package]] name = "jsonrpsee-proc-macros" -version = "0.16.2" +version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baa6da1e4199c10d7b1d0a6e5e8bd8e55f351163b6f4b3cbb044672a69bd4c1c" +checksum = "44e8ab85614a08792b9bff6c8feee23be78c98d0182d4c622c05256ab553892a" dependencies = [ "heck", "proc-macro-crate", @@ -5332,9 +5668,9 @@ dependencies = [ [[package]] name = "jsonrpsee-server" -version = "0.16.2" +version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fb69dad85df79527c019659a992498d03f8495390496da2f07e6c24c2b356fc" +checksum = "cf4d945a6008c9b03db3354fb3c83ee02d2faa9f2e755ec1dfb69c3551b8f4ba" dependencies = [ "futures-channel", "futures-util", @@ -5354,9 +5690,9 @@ dependencies = [ [[package]] name = "jsonrpsee-types" -version = "0.16.2" +version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bd522fe1ce3702fd94812965d7bb7a3364b1c9aba743944c5a00529aae80f8c" +checksum = "245ba8e5aa633dd1c1e4fae72bce06e71f42d34c14a2767c6b4d173b57bee5e5" dependencies = [ "anyhow", "beef", @@ -5368,9 +5704,9 @@ dependencies = [ [[package]] name = "jsonrpsee-ws-client" -version = "0.16.2" +version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b83daeecfc6517cfe210df24e570fb06213533dfb990318fae781f4c7119dd9" +checksum = "4e1b3975ed5d73f456478681a417128597acd6a2487855fdb7b4a3d4d195bf5e" dependencies = [ "http", "jsonrpsee-client-transport", @@ -5385,7 +5721,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cadb76004ed8e97623117f3df85b17aaa6626ab0b0831e6573f104df16cd1bcc" dependencies = [ "cfg-if", - "ecdsa 0.16.7", + "ecdsa 0.16.8", "elliptic-curve 0.13.5", "once_cell", "sha2 0.10.7", @@ -5526,8 +5862,8 @@ dependencies = [ [[package]] name = "kusama-runtime" -version = "0.9.42" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech//polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "bitvec", "frame-benchmarking", @@ -5560,6 +5896,7 @@ dependencies = [ "pallet-im-online", "pallet-indices", "pallet-membership", + "pallet-message-queue", "pallet-multisig", "pallet-nis", "pallet-nomination-pools", @@ -5578,6 +5915,7 @@ dependencies = [ "pallet-society", "pallet-staking", "pallet-staking-runtime-api", + "pallet-state-trie-migration", "pallet-timestamp", "pallet-tips", "pallet-transaction-payment", @@ -5624,8 +5962,8 @@ dependencies = [ [[package]] name = "kusama-runtime-constants" -version = "0.9.42" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech//polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "frame-support", "polkadot-primitives", @@ -5657,9 +5995,9 @@ dependencies = [ [[package]] name = "kvdb-rocksdb" -version = "0.18.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe7a749456510c45f795e8b04a6a3e0976d0139213ecbf465843830ad55e2217" +checksum = "b644c70b92285f66bfc2032922a79000ea30af7bc2ab31902992a5dcb9b434f6" dependencies = [ "kvdb", "num_cpus", @@ -5669,6 +6007,17 @@ dependencies = [ "smallvec", ] +[[package]] +name = "landlock" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "520baa32708c4e957d2fc3a186bc5bd8d26637c33137f399ddfc202adb240068" +dependencies = [ + "enumflags2", + "libc", + "thiserror", +] + [[package]] name = "lazy_static" version = "1.4.0" @@ -5697,12 +6046,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "libm" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fc7aa29613bd6a620df431842069224d8bc9011086b1db4c0e0cd47fa03ec9a" - [[package]] name = "libm" version = "0.2.7" @@ -5711,22 +6054,24 @@ checksum = "f7012b1bbb0719e1097c47611d3898568c546d597c2e74d66f6087edd5233ff4" [[package]] name = "libp2p" -version = "0.50.1" +version = "0.51.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c7b0104790be871edcf97db9bd2356604984e623a08d825c3f27852290266b8" +checksum = "f210d259724eae82005b5c48078619b7745edb7b76de370b03f8ba59ea103097" dependencies = [ "bytes", "futures", "futures-timer", "getrandom 0.2.10", "instant", - "libp2p-core 0.38.0", + "libp2p-allow-block-list", + "libp2p-connection-limits", + "libp2p-core", "libp2p-dns", "libp2p-identify", + "libp2p-identity", "libp2p-kad", "libp2p-mdns", "libp2p-metrics", - "libp2p-mplex", "libp2p-noise", "libp2p-ping", "libp2p-quic", @@ -5737,44 +6082,32 @@ dependencies = [ "libp2p-webrtc", "libp2p-websocket", "libp2p-yamux", - "multiaddr 0.16.0", - "parking_lot 0.12.1", + "multiaddr", "pin-project", - "smallvec", ] [[package]] -name = "libp2p-core" -version = "0.38.0" +name = "libp2p-allow-block-list" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6a8fcd392ff67af6cc3f03b1426c41f7f26b6b9aff2dc632c1c56dd649e571f" +checksum = "510daa05efbc25184458db837f6f9a5143888f1caa742426d92e1833ddd38a50" dependencies = [ - "asn1_der", - "bs58", - "ed25519-dalek", - "either", - "fnv", - "futures", - "futures-timer", - "instant", - "log", - "multiaddr 0.16.0", - "multihash 0.16.3", - "multistream-select", - "once_cell", - "parking_lot 0.12.1", - "pin-project", - "prost", - "prost-build", - "rand 0.8.5", - "rw-stream-sink", - "sec1 0.3.0", - "sha2 0.10.7", - "smallvec", - "thiserror", - "unsigned-varint", + "libp2p-core", + "libp2p-identity", + "libp2p-swarm", + "void", +] + +[[package]] +name = "libp2p-connection-limits" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4caa33f1d26ed664c4fe2cca81a08c8e07d4c1c04f2f4ac7655c2dd85467fda0" +dependencies = [ + "libp2p-core", + "libp2p-identity", + "libp2p-swarm", "void", - "zeroize", ] [[package]] @@ -5790,8 +6123,8 @@ dependencies = [ "instant", "libp2p-identity", "log", - "multiaddr 0.17.1", - "multihash 0.17.0", + "multiaddr", + "multihash", "multistream-select", "once_cell", "parking_lot 0.12.1", @@ -5807,12 +6140,12 @@ dependencies = [ [[package]] name = "libp2p-dns" -version = "0.38.0" +version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e42a271c1b49f789b92f7fc87749fa79ce5c7bdc88cbdfacb818a4bca47fec5" +checksum = "146ff7034daae62077c415c2376b8057368042df6ab95f5432ad5e88568b1554" dependencies = [ "futures", - "libp2p-core 0.38.0", + "libp2p-core", "log", "parking_lot 0.12.1", "smallvec", @@ -5821,20 +6154,21 @@ dependencies = [ [[package]] name = "libp2p-identify" -version = "0.41.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c052d0026f4817b44869bfb6810f4e1112f43aec8553f2cb38881c524b563abf" +checksum = "5455f472243e63b9c497ff320ded0314254a9eb751799a39c283c6f20b793f3c" dependencies = [ "asynchronous-codec", + "either", "futures", "futures-timer", - "libp2p-core 0.38.0", + "libp2p-core", + "libp2p-identity", "libp2p-swarm", "log", - "lru 0.8.1", - "prost", - "prost-build", - "prost-codec", + "lru 0.10.1", + "quick-protobuf", + "quick-protobuf-codec", "smallvec", "thiserror", "void", @@ -5842,15 +6176,15 @@ dependencies = [ [[package]] name = "libp2p-identity" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e2d584751cecb2aabaa56106be6be91338a60a0f4e420cf2af639204f596fc1" +checksum = "276bb57e7af15d8f100d3c11cbdd32c6752b7eef4ba7a18ecf464972c07abcce" dependencies = [ "bs58", - "ed25519-dalek", + "ed25519-dalek 2.0.0", "log", - "multiaddr 0.17.1", - "multihash 0.17.0", + "multiaddr", + "multihash", "quick-protobuf", "rand 0.8.5", "sha2 0.10.7", @@ -5860,9 +6194,9 @@ dependencies = [ [[package]] name = "libp2p-kad" -version = "0.42.1" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2766dcd2be8c87d5e1f35487deb22d765f49c6ae1251b3633efe3b25698bd3d2" +checksum = "39d5ef876a2b2323d63c258e63c2f8e36f205fe5a11f0b3095d59635650790ff" dependencies = [ "arrayvec 0.7.4", "asynchronous-codec", @@ -5872,11 +6206,11 @@ dependencies = [ "futures", "futures-timer", "instant", - "libp2p-core 0.38.0", + "libp2p-core", + "libp2p-identity", "libp2p-swarm", "log", - "prost", - "prost-build", + "quick-protobuf", "rand 0.8.5", "sha2 0.10.7", "smallvec", @@ -5888,14 +6222,15 @@ dependencies = [ [[package]] name = "libp2p-mdns" -version = "0.42.0" +version = "0.43.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04f378264aade9872d6ccd315c0accc18be3a35d15fc1b9c36e5b6f983b62b5b" +checksum = "19983e1f949f979a928f2c603de1cf180cc0dc23e4ac93a62651ccb18341460b" dependencies = [ "data-encoding", "futures", "if-watch", - "libp2p-core 0.38.0", + "libp2p-core", + "libp2p-identity", "libp2p-swarm", "log", "rand 0.8.5", @@ -5908,11 +6243,11 @@ dependencies = [ [[package]] name = "libp2p-metrics" -version = "0.11.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ad8a64f29da86005c86a4d2728b8a0719e9b192f4092b609fd8790acb9dec55" +checksum = "a42ec91e227d7d0dafa4ce88b333cdf5f277253873ab087555c92798db2ddd46" dependencies = [ - "libp2p-core 0.38.0", + "libp2p-core", "libp2p-identify", "libp2p-kad", "libp2p-ping", @@ -5920,38 +6255,20 @@ dependencies = [ "prometheus-client", ] -[[package]] -name = "libp2p-mplex" -version = "0.38.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03805b44107aa013e7cbbfa5627b31c36cbedfdfb00603c0311998882bc4bace" -dependencies = [ - "asynchronous-codec", - "bytes", - "futures", - "libp2p-core 0.38.0", - "log", - "nohash-hasher", - "parking_lot 0.12.1", - "rand 0.8.5", - "smallvec", - "unsigned-varint", -] - [[package]] name = "libp2p-noise" -version = "0.41.0" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a978cb57efe82e892ec6f348a536bfbd9fee677adbe5689d7a93ad3a9bffbf2e" +checksum = "9c3673da89d29936bc6435bafc638e2f184180d554ce844db65915113f86ec5e" dependencies = [ "bytes", "curve25519-dalek 3.2.0", "futures", - "libp2p-core 0.38.0", + "libp2p-core", + "libp2p-identity", "log", "once_cell", - "prost", - "prost-build", + "quick-protobuf", "rand 0.8.5", "sha2 0.10.7", "snow", @@ -5963,14 +6280,15 @@ dependencies = [ [[package]] name = "libp2p-ping" -version = "0.41.0" +version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "929fcace45a112536e22b3dcfd4db538723ef9c3cb79f672b98be2cc8e25f37f" +checksum = "3e57759c19c28a73ef1eb3585ca410cefb72c1a709fcf6de1612a378e4219202" dependencies = [ + "either", "futures", "futures-timer", "instant", - "libp2p-core 0.38.0", + "libp2p-core", "libp2p-swarm", "log", "rand 0.8.5", @@ -5979,15 +6297,16 @@ dependencies = [ [[package]] name = "libp2p-quic" -version = "0.7.0-alpha" +version = "0.7.0-alpha.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01e7c867e95c8130667b24409d236d37598270e6da69b3baf54213ba31ffca59" +checksum = "c6b26abd81cd2398382a1edfe739b539775be8a90fa6914f39b2ab49571ec735" dependencies = [ "bytes", "futures", "futures-timer", "if-watch", - "libp2p-core 0.38.0", + "libp2p-core", + "libp2p-identity", "libp2p-tls", "log", "parking_lot 0.12.1", @@ -6000,49 +6319,46 @@ dependencies = [ [[package]] name = "libp2p-request-response" -version = "0.23.0" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3236168796727bfcf4927f766393415361e2c644b08bedb6a6b13d957c9a4884" +checksum = "7ffdb374267d42dc5ed5bc53f6e601d4a64ac5964779c6e40bb9e4f14c1e30d5" dependencies = [ "async-trait", - "bytes", "futures", "instant", - "libp2p-core 0.38.0", + "libp2p-core", + "libp2p-identity", "libp2p-swarm", - "log", "rand 0.8.5", "smallvec", - "unsigned-varint", ] [[package]] name = "libp2p-swarm" -version = "0.41.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2a35472fe3276b3855c00f1c032ea8413615e030256429ad5349cdf67c6e1a0" +checksum = "903b3d592d7694e56204d211f29d31bc004be99386644ba8731fc3e3ef27b296" dependencies = [ "either", "fnv", "futures", "futures-timer", "instant", - "libp2p-core 0.38.0", + "libp2p-core", + "libp2p-identity", "libp2p-swarm-derive", "log", - "pin-project", "rand 0.8.5", "smallvec", - "thiserror", "tokio", "void", ] [[package]] name = "libp2p-swarm-derive" -version = "0.31.0" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d527d5827582abd44a6d80c07ff8b50b4ee238a8979e05998474179e79dc400" +checksum = "0fba456131824ab6acd4c7bf61e9c0f0a3014b5fc9868ccb8e10d344594cdc4f" dependencies = [ "heck", "quote", @@ -6051,15 +6367,15 @@ dependencies = [ [[package]] name = "libp2p-tcp" -version = "0.38.0" +version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4b257baf6df8f2df39678b86c578961d48cc8b68642a12f0f763f56c8e5858d" +checksum = "33d33698596d7722d85d3ab0c86c2c322254fce1241e91208e3679b4eb3026cf" dependencies = [ "futures", "futures-timer", "if-watch", "libc", - "libp2p-core 0.38.0", + "libp2p-core", "log", "socket2 0.4.9", "tokio", @@ -6073,7 +6389,7 @@ checksum = "ff08d13d0dc66e5e9ba6279c1de417b84fa0d0adc3b03e5732928c180ec02781" dependencies = [ "futures", "futures-rustls", - "libp2p-core 0.39.2", + "libp2p-core", "libp2p-identity", "rcgen 0.10.0", "ring", @@ -6086,13 +6402,13 @@ dependencies = [ [[package]] name = "libp2p-wasm-ext" -version = "0.38.0" +version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bb1a35299860e0d4b3c02a3e74e3b293ad35ae0cee8a056363b0c862d082069" +checksum = "77dff9d32353a5887adb86c8afc1de1a94d9e8c3bc6df8b2201d7cdf5c848f43" dependencies = [ "futures", "js-sys", - "libp2p-core 0.38.0", + "libp2p-core", "parity-send-wrapper", "wasm-bindgen", "wasm-bindgen-futures", @@ -6100,9 +6416,9 @@ dependencies = [ [[package]] name = "libp2p-webrtc" -version = "0.4.0-alpha" +version = "0.4.0-alpha.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdb6cd86dd68cba72308ea05de1cebf3ba0ae6e187c40548167955d4e3970f6a" +checksum = "dba48592edbc2f60b4bc7c10d65445b0c3964c07df26fdf493b6880d33be36f8" dependencies = [ "async-trait", "asynchronous-codec", @@ -6111,13 +6427,13 @@ dependencies = [ "futures-timer", "hex", "if-watch", - "libp2p-core 0.38.0", + "libp2p-core", + "libp2p-identity", "libp2p-noise", "log", - "multihash 0.16.3", - "prost", - "prost-build", - "prost-codec", + "multihash", + "quick-protobuf", + "quick-protobuf-codec", "rand 0.8.5", "rcgen 0.9.3", "serde", @@ -6131,42 +6447,41 @@ dependencies = [ [[package]] name = "libp2p-websocket" -version = "0.40.0" +version = "0.41.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d705506030d5c0aaf2882437c70dab437605f21c5f9811978f694e6917a3b54" +checksum = "111273f7b3d3510524c752e8b7a5314b7f7a1fee7e68161c01a7d72cbb06db9f" dependencies = [ "either", "futures", "futures-rustls", - "libp2p-core 0.38.0", + "libp2p-core", "log", "parking_lot 0.12.1", "quicksink", "rw-stream-sink", "soketto", "url", - "webpki-roots", + "webpki-roots 0.22.6", ] [[package]] name = "libp2p-yamux" -version = "0.42.0" +version = "0.43.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f63594a0aa818642d9d4915c791945053877253f08a3626f13416b5cd928a29" +checksum = "4dcd21d950662700a385d4c6d68e2f5f54d778e97068cdd718522222ef513bda" dependencies = [ "futures", - "libp2p-core 0.38.0", + "libp2p-core", "log", - "parking_lot 0.12.1", "thiserror", "yamux", ] [[package]] name = "librocksdb-sys" -version = "0.10.0+7.9.2" +version = "0.11.0+8.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fe4d5874f5ff2bc616e55e8c6086d478fcda13faf9495768a4aa1c22042d30b" +checksum = "d3386f101bcb4bd252d8e9d2fb41ec3b0862a15a62b478c355b2982efa469e3e" dependencies = [ "bindgen", "bzip2-sys", @@ -6286,9 +6601,9 @@ dependencies = [ [[package]] name = "libz-sys" -version = "1.1.9" +version = "1.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56ee889ecc9568871456d42f603d6a0ce59ff328d291063a45cbdf0036baf6db" +checksum = "d97137b25e321a73eef1418d1d5d2eda4d77e12813f8e6dead84bc52c5870a7b" dependencies = [ "cc", "pkg-config", @@ -6297,9 +6612,9 @@ dependencies = [ [[package]] name = "link-cplusplus" -version = "1.0.8" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecd207c9c713c34f95a097a5b029ac2ce6010530c7b49d7fea24d977dede04f5" +checksum = "9d240c6f7e1ba3a28b0249f774e6a9dd0175054b52dfbb61b16eb8505c3785c9" dependencies = [ "cc", ] @@ -6321,9 +6636,9 @@ dependencies = [ [[package]] name = "linregress" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "475015a7f8f017edb28d2e69813be23500ad4b32cfe3421c4148efc97324ee52" +checksum = "4de0b5f52a9f84544d268f5fabb71b38962d6aa3c6600b8bcd27d44ccf9c9c45" dependencies = [ "nalgebra", ] @@ -6340,6 +6655,12 @@ version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" +[[package]] +name = "linux-raw-sys" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57bcfdad1b858c2db7c38303a6d2ad4dfaf5eb53dfeb0910128b2c26d6158503" + [[package]] name = "loans" version = "1.9.3" @@ -6409,24 +6730,24 @@ dependencies = [ [[package]] name = "log" -version = "0.4.19" +version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b06a4cde4c0f271a446782e3eff8de789548ce57dbc8eca9292c27f4a42004b4" +checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" [[package]] name = "lru" -version = "0.8.1" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6e8aaa3f231bb4bd57b84b2d5dc3ae7f350265df8aa96492e0bc394a1571909" +checksum = "71e7d46de488603ffdd5f30afbc64fbba2378214a2c3a2fb83abf3d33126df17" dependencies = [ - "hashbrown 0.12.3", + "hashbrown 0.13.2", ] [[package]] name = "lru" -version = "0.9.0" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71e7d46de488603ffdd5f30afbc64fbba2378214a2c3a2fb83abf3d33126df17" +checksum = "718e8fae447df0c7e1ba7f5189829e63fd536945c8988d61444c19039f16b670" dependencies = [ "hashbrown 0.13.2", ] @@ -6469,6 +6790,54 @@ dependencies = [ "libc", ] +[[package]] +name = "macro_magic" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aee866bfee30d2d7e83835a4574aad5b45adba4cc807f2a3bbba974e5d4383c9" +dependencies = [ + "macro_magic_core", + "macro_magic_macros", + "quote", + "syn 2.0.29", +] + +[[package]] +name = "macro_magic_core" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e766a20fd9c72bab3e1e64ed63f36bd08410e75803813df210d1ce297d7ad00" +dependencies = [ + "const-random", + "derive-syn-parse", + "macro_magic_core_macros", + "proc-macro2", + "quote", + "syn 2.0.29", +] + +[[package]] +name = "macro_magic_core_macros" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c12469fc165526520dff2807c2975310ab47cf7190a45b99b49a7dc8befab17b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.29", +] + +[[package]] +name = "macro_magic_macros" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8fb85ec1620619edf2984a7693497d4ec88a9665d8b87e942856884c92dbf2a" +dependencies = [ + "macro_magic_core", + "quote", + "syn 2.0.29", +] + [[package]] name = "maplit" version = "1.0.2" @@ -6487,7 +6856,7 @@ version = "0.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f099785f7595cc4b4553a174ce30dd7589ef93391ff414dbb67f62392b9e0ce1" dependencies = [ - "regex-automata", + "regex-automata 0.1.10", ] [[package]] @@ -6527,7 +6896,7 @@ version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ffc89ccdc6e10d6907450f753537ebc5c5d3460d2e4e62ea74bd571db62c0f9e" dependencies = [ - "rustix 0.37.20", + "rustix 0.37.23", ] [[package]] @@ -6548,6 +6917,15 @@ dependencies = [ "autocfg 1.1.0", ] +[[package]] +name = "memoffset" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d61c719bcfbcf5d62b3a09efa6088de8c54bc0bfcd3ea7ae39fcc186108b8de1" +dependencies = [ + "autocfg 1.1.0", +] + [[package]] name = "memoffset" version = "0.9.0" @@ -6566,12 +6944,6 @@ dependencies = [ "hash-db 0.16.0", ] -[[package]] -name = "memory_units" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8452105ba047068f40ff7093dd1d9da90898e63dd61736462e9cdda6a90ad3c3" - [[package]] name = "merlin" version = "2.0.1" @@ -6601,15 +6973,6 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" -[[package]] -name = "miniz_oxide" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b275950c28b37e794e8c55d88aeb5e139d0ce23fdbbeda68f8d7174abdf9e8fa" -dependencies = [ - "adler", -] - [[package]] name = "miniz_oxide" version = "0.7.1" @@ -6633,7 +6996,7 @@ dependencies = [ [[package]] name = "mmr-gadget" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "futures", "log", @@ -6652,7 +7015,7 @@ dependencies = [ [[package]] name = "mmr-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "anyhow", "jsonrpsee", @@ -6736,24 +7099,6 @@ dependencies = [ "traits", ] -[[package]] -name = "multiaddr" -version = "0.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4aebdb21e90f81d13ed01dc84123320838e53963c2ca94b60b305d3fa64f31e" -dependencies = [ - "arrayref", - "byteorder", - "data-encoding", - "multibase", - "multihash 0.16.3", - "percent-encoding", - "serde", - "static_assertions", - "unsigned-varint", - "url", -] - [[package]] name = "multiaddr" version = "0.17.1" @@ -6765,7 +7110,7 @@ dependencies = [ "data-encoding", "log", "multibase", - "multihash 0.17.0", + "multihash", "percent-encoding", "serde", "static_assertions", @@ -6786,9 +7131,9 @@ dependencies = [ [[package]] name = "multihash" -version = "0.16.3" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c346cf9999c631f002d8f977c4eaeaa0e6386f16007202308d0b3757522c2cc" +checksum = "835d6ff01d610179fbce3de1694d007e500bf33a7f29689838941d6bf783ae40" dependencies = [ "blake2b_simd", "blake2s_simd", @@ -6801,17 +7146,6 @@ dependencies = [ "unsigned-varint", ] -[[package]] -name = "multihash" -version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "835d6ff01d610179fbce3de1694d007e500bf33a7f29689838941d6bf783ae40" -dependencies = [ - "core2 0.4.0", - "multihash-derive", - "unsigned-varint", -] - [[package]] name = "multihash-derive" version = "0.8.0" @@ -6848,9 +7182,9 @@ dependencies = [ [[package]] name = "nalgebra" -version = "0.32.2" +version = "0.32.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d68d47bba83f9e2006d117a9a33af1524e655516b8919caac694427a6fb1e511" +checksum = "307ed9b18cc2423f29e83f84fd23a8e73628727990181f18641a8b5dc2ab1caa" dependencies = [ "approx", "matrixmultiply", @@ -6864,9 +7198,9 @@ dependencies = [ [[package]] name = "nalgebra-macros" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d232c68884c0c99810a5a4d333ef7e47689cfd0edc85efc9e54e1e6bf5212766" +checksum = "91761aed67d03ad966ef783ae962ef9bbaca728d2dd7ceb7939ec110fffad998" dependencies = [ "proc-macro2", "quote", @@ -6925,7 +7259,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9ea4302b9759a7a88242299225ea3688e63c85ea136371bb6cf94fd674efaab" dependencies = [ "anyhow", - "bitflags", + "bitflags 1.3.2", "byteorder", "libc", "netlink-packet-core", @@ -6978,7 +7312,7 @@ version = "0.24.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fa52e972a9a719cecb6864fb88568781eb706bac2cd1d4f04a648542dbf78069" dependencies = [ - "bitflags", + "bitflags 1.3.2", "cfg-if", "libc", "memoffset 0.6.5", @@ -7053,9 +7387,9 @@ dependencies = [ [[package]] name = "num-bigint" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f93ab6289c7b344a8a9f60f88d80aa20032336fe78da341afc91c8a2341fc75f" +checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" dependencies = [ "autocfg 1.1.0", "num-integer", @@ -7064,9 +7398,9 @@ dependencies = [ [[package]] name = "num-complex" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02e0d21255c828d6f128a1e41534206671e8c3ea0c62f32291e808dc82cff17d" +checksum = "1ba157ca0885411de85d6ca030ba7e2a83a28636056c7c699b07c8b6f7383214" dependencies = [ "num-traits", ] @@ -7116,21 +7450,21 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.15" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" +checksum = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2" dependencies = [ "autocfg 1.1.0", - "libm 0.2.7", + "libm", ] [[package]] name = "num_cpus" -version = "1.15.0" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi 0.2.6", + "hermit-abi 0.3.2", "libc", ] @@ -7152,7 +7486,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.22", + "syn 2.0.29", ] [[package]] @@ -7163,21 +7497,21 @@ checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" [[package]] name = "object" -version = "0.29.0" +version = "0.30.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21158b2c33aa6d4561f1c0a6ea283ca92bc54802a93b263e910746d679a7eb53" +checksum = "03b4680b86d9cfafba8fc491dc9b6df26b68cf40e9e6cd73909194759a63c385" dependencies = [ "crc32fast", - "hashbrown 0.12.3", + "hashbrown 0.13.2", "indexmap 1.9.3", "memchr", ] [[package]] name = "object" -version = "0.30.4" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03b4680b86d9cfafba8fc491dc9b6df26b68cf40e9e6cd73909194759a63c385" +checksum = "77ac5bbd07aea88c60a577a1ce218075ffd59208b2d7ca97adf9bfc5aeb21ebe" dependencies = [ "memchr", ] @@ -7206,6 +7540,12 @@ version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" +[[package]] +name = "oorandom" +version = "11.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ab1bc2a289d34bd04a330323ac98a1b4bc82c9d9fcb1e66b63caa84da26b575" + [[package]] name = "opaque-debug" version = "0.2.3" @@ -7220,11 +7560,11 @@ checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" [[package]] name = "openssl" -version = "0.10.55" +version = "0.10.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "345df152bc43501c5eb9e4654ff05f794effb78d4efe3d53abc158baddc0703d" +checksum = "729b745ad4a5575dd06a3e1af1414bd330ee561c01b3899eb584baeaa8def17e" dependencies = [ - "bitflags", + "bitflags 1.3.2", "cfg-if", "foreign-types", "libc", @@ -7241,7 +7581,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.22", + "syn 2.0.29", ] [[package]] @@ -7252,9 +7592,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.90" +version = "0.9.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "374533b0e45f3a7ced10fcaeccca020e66656bc03dac384f852e4e5a7a8104a6" +checksum = "866b5f16f90776b9bb8dc1e1802ac6f0513de3a7a7465867bfbc563dc737faac" dependencies = [ "cc", "libc", @@ -7354,7 +7694,7 @@ dependencies = [ [[package]] name = "orml-asset-registry" version = "0.4.1-dev" -source = "git+https://github.com/open-web3-stack//open-runtime-module-library?rev=ca05423f4f32be1d30765caacdc7d90130f5554a#ca05423f4f32be1d30765caacdc7d90130f5554a" +source = "git+https://github.com/open-web3-stack//open-runtime-module-library?rev=f7c8b38cdc0fa6dddf915a20d2ccf6ae4ad5cac5#f7c8b38cdc0fa6dddf915a20d2ccf6ae4ad5cac5" dependencies = [ "frame-support", "frame-system", @@ -7373,7 +7713,7 @@ dependencies = [ [[package]] name = "orml-oracle" version = "0.4.1-dev" -source = "git+https://github.com/open-web3-stack//open-runtime-module-library?rev=ca05423f4f32be1d30765caacdc7d90130f5554a#ca05423f4f32be1d30765caacdc7d90130f5554a" +source = "git+https://github.com/open-web3-stack//open-runtime-module-library?rev=f7c8b38cdc0fa6dddf915a20d2ccf6ae4ad5cac5#f7c8b38cdc0fa6dddf915a20d2ccf6ae4ad5cac5" dependencies = [ "frame-support", "frame-system", @@ -7391,7 +7731,7 @@ dependencies = [ [[package]] name = "orml-tokens" version = "0.4.1-dev" -source = "git+https://github.com/open-web3-stack//open-runtime-module-library?rev=ca05423f4f32be1d30765caacdc7d90130f5554a#ca05423f4f32be1d30765caacdc7d90130f5554a" +source = "git+https://github.com/open-web3-stack//open-runtime-module-library?rev=f7c8b38cdc0fa6dddf915a20d2ccf6ae4ad5cac5#f7c8b38cdc0fa6dddf915a20d2ccf6ae4ad5cac5" dependencies = [ "frame-support", "frame-system", @@ -7407,7 +7747,7 @@ dependencies = [ [[package]] name = "orml-traits" version = "0.4.1-dev" -source = "git+https://github.com/open-web3-stack//open-runtime-module-library?rev=ca05423f4f32be1d30765caacdc7d90130f5554a#ca05423f4f32be1d30765caacdc7d90130f5554a" +source = "git+https://github.com/open-web3-stack//open-runtime-module-library?rev=f7c8b38cdc0fa6dddf915a20d2ccf6ae4ad5cac5#f7c8b38cdc0fa6dddf915a20d2ccf6ae4ad5cac5" dependencies = [ "frame-support", "impl-trait-for-tuples", @@ -7426,7 +7766,7 @@ dependencies = [ [[package]] name = "orml-unknown-tokens" version = "0.4.1-dev" -source = "git+https://github.com/open-web3-stack//open-runtime-module-library?rev=ca05423f4f32be1d30765caacdc7d90130f5554a#ca05423f4f32be1d30765caacdc7d90130f5554a" +source = "git+https://github.com/open-web3-stack//open-runtime-module-library?rev=f7c8b38cdc0fa6dddf915a20d2ccf6ae4ad5cac5#f7c8b38cdc0fa6dddf915a20d2ccf6ae4ad5cac5" dependencies = [ "frame-support", "frame-system", @@ -7441,12 +7781,13 @@ dependencies = [ [[package]] name = "orml-utilities" version = "0.4.1-dev" -source = "git+https://github.com/open-web3-stack//open-runtime-module-library?rev=ca05423f4f32be1d30765caacdc7d90130f5554a#ca05423f4f32be1d30765caacdc7d90130f5554a" +source = "git+https://github.com/open-web3-stack//open-runtime-module-library?rev=f7c8b38cdc0fa6dddf915a20d2ccf6ae4ad5cac5#f7c8b38cdc0fa6dddf915a20d2ccf6ae4ad5cac5" dependencies = [ "frame-support", "parity-scale-codec", "scale-info", "serde", + "sp-core", "sp-io", "sp-runtime", "sp-std", @@ -7455,7 +7796,7 @@ dependencies = [ [[package]] name = "orml-vesting" version = "0.4.1-dev" -source = "git+https://github.com/open-web3-stack//open-runtime-module-library?rev=ca05423f4f32be1d30765caacdc7d90130f5554a#ca05423f4f32be1d30765caacdc7d90130f5554a" +source = "git+https://github.com/open-web3-stack//open-runtime-module-library?rev=f7c8b38cdc0fa6dddf915a20d2ccf6ae4ad5cac5#f7c8b38cdc0fa6dddf915a20d2ccf6ae4ad5cac5" dependencies = [ "frame-support", "frame-system", @@ -7470,7 +7811,7 @@ dependencies = [ [[package]] name = "orml-xcm" version = "0.4.1-dev" -source = "git+https://github.com/open-web3-stack//open-runtime-module-library?rev=ca05423f4f32be1d30765caacdc7d90130f5554a#ca05423f4f32be1d30765caacdc7d90130f5554a" +source = "git+https://github.com/open-web3-stack//open-runtime-module-library?rev=f7c8b38cdc0fa6dddf915a20d2ccf6ae4ad5cac5#f7c8b38cdc0fa6dddf915a20d2ccf6ae4ad5cac5" dependencies = [ "frame-support", "frame-system", @@ -7484,7 +7825,7 @@ dependencies = [ [[package]] name = "orml-xcm-support" version = "0.4.1-dev" -source = "git+https://github.com/open-web3-stack//open-runtime-module-library?rev=ca05423f4f32be1d30765caacdc7d90130f5554a#ca05423f4f32be1d30765caacdc7d90130f5554a" +source = "git+https://github.com/open-web3-stack//open-runtime-module-library?rev=f7c8b38cdc0fa6dddf915a20d2ccf6ae4ad5cac5#f7c8b38cdc0fa6dddf915a20d2ccf6ae4ad5cac5" dependencies = [ "frame-support", "orml-traits", @@ -7498,7 +7839,7 @@ dependencies = [ [[package]] name = "orml-xtokens" version = "0.4.1-dev" -source = "git+https://github.com/open-web3-stack//open-runtime-module-library?rev=ca05423f4f32be1d30765caacdc7d90130f5554a#ca05423f4f32be1d30765caacdc7d90130f5554a" +source = "git+https://github.com/open-web3-stack//open-runtime-module-library?rev=f7c8b38cdc0fa6dddf915a20d2ccf6ae4ad5cac5#f7c8b38cdc0fa6dddf915a20d2ccf6ae4ad5cac5" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -7548,19 +7889,40 @@ dependencies = [ ] [[package]] -name = "packed_simd_2" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1914cd452d8fccd6f9db48147b29fd4ae05bea9dc5d9ad578509f72415de282" +name = "pallet-asset-tx-payment" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ - "cfg-if", - "libm 0.1.4", + "frame-support", + "frame-system", + "pallet-transaction-payment", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "pallet-assets" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-runtime", + "sp-std", ] [[package]] name = "pallet-aura" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-support", "frame-system", @@ -7576,7 +7938,7 @@ dependencies = [ [[package]] name = "pallet-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-support", "frame-system", @@ -7592,7 +7954,7 @@ dependencies = [ [[package]] name = "pallet-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-support", "frame-system", @@ -7606,7 +7968,7 @@ dependencies = [ [[package]] name = "pallet-babe" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-benchmarking", "frame-support", @@ -7630,7 +7992,7 @@ dependencies = [ [[package]] name = "pallet-bags-list" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -7650,7 +8012,7 @@ dependencies = [ [[package]] name = "pallet-balances" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-benchmarking", "frame-support", @@ -7665,7 +8027,7 @@ dependencies = [ [[package]] name = "pallet-base-fee" version = "1.0.0" -source = "git+https://github.com/paritytech//frontier?branch=polkadot-v0.9.42#1a718546085be20ce381b70e1f9e4c8b4d4b1f03" +source = "git+https://github.com/paritytech//frontier?branch=polkadot-v1.0.0#b520b749eb90df15177144dbece3fbd3622a2b19" dependencies = [ "fp-evm", "frame-support", @@ -7679,7 +8041,7 @@ dependencies = [ [[package]] name = "pallet-beefy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-support", "frame-system", @@ -7698,9 +8060,9 @@ dependencies = [ [[package]] name = "pallet-beefy-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ - "array-bytes 4.2.0", + "array-bytes", "binary-merkle-tree", "frame-support", "frame-system", @@ -7722,7 +8084,7 @@ dependencies = [ [[package]] name = "pallet-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-benchmarking", "frame-support", @@ -7740,7 +8102,7 @@ dependencies = [ [[package]] name = "pallet-child-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-benchmarking", "frame-support", @@ -7756,10 +8118,29 @@ dependencies = [ "sp-std", ] +[[package]] +name = "pallet-collator-selection" +version = "3.0.0" +source = "git+https://github.com/paritytech//cumulus?branch=polkadot-v1.0.0#0d17cf6bef320f156f2859d6d2b0abd4154ae1d5" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "pallet-authorship", + "pallet-session", + "parity-scale-codec", + "rand 0.8.5", + "scale-info", + "sp-runtime", + "sp-staking", + "sp-std", +] + [[package]] name = "pallet-collective" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-benchmarking", "frame-support", @@ -7776,9 +8157,9 @@ dependencies = [ [[package]] name = "pallet-contracts" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ - "bitflags", + "bitflags 1.3.2", "environmental", "frame-benchmarking", "frame-support", @@ -7798,16 +8179,15 @@ dependencies = [ "sp-runtime", "sp-std", "wasm-instrument 0.4.0", - "wasmi 0.28.0", - "wasmparser-nostd", + "wasmi", ] [[package]] name = "pallet-contracts-primitives" -version = "7.0.0" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +version = "24.0.0" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ - "bitflags", + "bitflags 1.3.2", "parity-scale-codec", "scale-info", "sp-runtime", @@ -7818,17 +8198,17 @@ dependencies = [ [[package]] name = "pallet-contracts-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.22", + "syn 2.0.29", ] [[package]] name = "pallet-conviction-voting" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "assert_matches", "frame-benchmarking", @@ -7845,7 +8225,7 @@ dependencies = [ [[package]] name = "pallet-democracy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-benchmarking", "frame-support", @@ -7863,7 +8243,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-multi-phase" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -7886,7 +8266,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-support-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -7899,7 +8279,7 @@ dependencies = [ [[package]] name = "pallet-elections-phragmen" version = "5.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-benchmarking", "frame-support", @@ -7911,13 +8291,14 @@ dependencies = [ "sp-io", "sp-npos-elections", "sp-runtime", + "sp-staking", "sp-std", ] [[package]] name = "pallet-ethereum" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//frontier?branch=polkadot-v0.9.42#1a718546085be20ce381b70e1f9e4c8b4d4b1f03" +source = "git+https://github.com/paritytech//frontier?branch=polkadot-v1.0.0#b520b749eb90df15177144dbece3fbd3622a2b19" dependencies = [ "ethereum", "ethereum-types", @@ -7940,7 +8321,7 @@ dependencies = [ [[package]] name = "pallet-evm" version = "6.0.0-dev" -source = "git+https://github.com/paritytech//frontier?branch=polkadot-v0.9.42#1a718546085be20ce381b70e1f9e4c8b4d4b1f03" +source = "git+https://github.com/paritytech//frontier?branch=polkadot-v1.0.0#b520b749eb90df15177144dbece3fbd3622a2b19" dependencies = [ "environmental", "evm", @@ -7965,18 +8346,19 @@ dependencies = [ [[package]] name = "pallet-evm-chain-id" version = "1.0.0-dev" -source = "git+https://github.com/paritytech//frontier?branch=polkadot-v0.9.42#1a718546085be20ce381b70e1f9e4c8b4d4b1f03" +source = "git+https://github.com/paritytech//frontier?branch=polkadot-v1.0.0#b520b749eb90df15177144dbece3fbd3622a2b19" dependencies = [ "frame-support", "frame-system", "parity-scale-codec", "scale-info", + "sp-runtime", ] [[package]] name = "pallet-evm-precompile-dispatch" version = "2.0.0-dev" -source = "git+https://github.com/paritytech//frontier?branch=polkadot-v0.9.42#1a718546085be20ce381b70e1f9e4c8b4d4b1f03" +source = "git+https://github.com/paritytech/frontier?branch=polkadot-v0.9.42#2499d18c936edbcb7fcb711827db7abb9b4f4da4" dependencies = [ "fp-evm", "frame-support", @@ -7986,7 +8368,7 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-modexp" version = "2.0.0-dev" -source = "git+https://github.com/paritytech/frontier?branch=polkadot-v0.9.42#1a718546085be20ce381b70e1f9e4c8b4d4b1f03" +source = "git+https://github.com/paritytech//frontier?branch=polkadot-v1.0.0#b520b749eb90df15177144dbece3fbd3622a2b19" dependencies = [ "fp-evm", "num", @@ -7995,7 +8377,7 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-sha3fips" version = "2.0.0-dev" -source = "git+https://github.com/paritytech/frontier?branch=polkadot-v0.9.42#1a718546085be20ce381b70e1f9e4c8b4d4b1f03" +source = "git+https://github.com/paritytech//frontier?branch=polkadot-v1.0.0#b520b749eb90df15177144dbece3fbd3622a2b19" dependencies = [ "fp-evm", "tiny-keccak", @@ -8004,7 +8386,7 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-simple" version = "2.0.0-dev" -source = "git+https://github.com/paritytech/frontier?branch=polkadot-v0.9.42#1a718546085be20ce381b70e1f9e4c8b4d4b1f03" +source = "git+https://github.com/paritytech//frontier?branch=polkadot-v1.0.0#b520b749eb90df15177144dbece3fbd3622a2b19" dependencies = [ "fp-evm", "ripemd", @@ -8014,8 +8396,9 @@ dependencies = [ [[package]] name = "pallet-fast-unstake" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ + "docify", "frame-benchmarking", "frame-election-provider-support", "frame-support", @@ -8029,10 +8412,28 @@ dependencies = [ "sp-std", ] +[[package]] +name = "pallet-glutton" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +dependencies = [ + "blake2", + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", +] + [[package]] name = "pallet-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-benchmarking", "frame-support", @@ -8055,7 +8456,7 @@ dependencies = [ [[package]] name = "pallet-identity" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "enumflags2", "frame-benchmarking", @@ -8071,7 +8472,7 @@ dependencies = [ [[package]] name = "pallet-im-online" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-benchmarking", "frame-support", @@ -8091,7 +8492,7 @@ dependencies = [ [[package]] name = "pallet-indices" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-benchmarking", "frame-support", @@ -8108,7 +8509,24 @@ dependencies = [ [[package]] name = "pallet-membership" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "pallet-message-queue" +version = "7.0.0-dev" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-benchmarking", "frame-support", @@ -8116,16 +8534,18 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", + "sp-arithmetic", "sp-core", "sp-io", "sp-runtime", "sp-std", + "sp-weights", ] [[package]] name = "pallet-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-benchmarking", "frame-support", @@ -8142,7 +8562,7 @@ dependencies = [ [[package]] name = "pallet-multisig" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-benchmarking", "frame-support", @@ -8158,7 +8578,7 @@ dependencies = [ [[package]] name = "pallet-nis" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-benchmarking", "frame-support", @@ -8174,7 +8594,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools" version = "1.0.0" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-support", "frame-system", @@ -8191,7 +8611,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-benchmarking" version = "1.0.0" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -8211,7 +8631,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-runtime-api" version = "1.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "pallet-nomination-pools", "parity-scale-codec", @@ -8222,7 +8642,7 @@ dependencies = [ [[package]] name = "pallet-offences" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-support", "frame-system", @@ -8239,7 +8659,7 @@ dependencies = [ [[package]] name = "pallet-offences-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -8263,7 +8683,7 @@ dependencies = [ [[package]] name = "pallet-preimage" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-benchmarking", "frame-support", @@ -8280,7 +8700,7 @@ dependencies = [ [[package]] name = "pallet-proxy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-benchmarking", "frame-support", @@ -8295,7 +8715,7 @@ dependencies = [ [[package]] name = "pallet-ranked-collective" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-benchmarking", "frame-support", @@ -8313,7 +8733,7 @@ dependencies = [ [[package]] name = "pallet-recovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-benchmarking", "frame-support", @@ -8328,7 +8748,7 @@ dependencies = [ [[package]] name = "pallet-referenda" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "assert_matches", "frame-benchmarking", @@ -8347,7 +8767,7 @@ dependencies = [ [[package]] name = "pallet-scheduler" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-benchmarking", "frame-support", @@ -8364,7 +8784,7 @@ dependencies = [ [[package]] name = "pallet-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-support", "frame-system", @@ -8385,7 +8805,7 @@ dependencies = [ [[package]] name = "pallet-session-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-benchmarking", "frame-support", @@ -8401,13 +8821,18 @@ dependencies = [ [[package]] name = "pallet-society" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ + "frame-benchmarking", "frame-support", "frame-system", + "hex-literal 0.3.4", + "log", "parity-scale-codec", "rand_chacha 0.2.2", "scale-info", + "sp-arithmetic", + "sp-io", "sp-runtime", "sp-std", ] @@ -8415,7 +8840,7 @@ dependencies = [ [[package]] name = "pallet-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -8438,18 +8863,18 @@ dependencies = [ [[package]] name = "pallet-staking-reward-curve" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.22", + "syn 2.0.29", ] [[package]] name = "pallet-staking-reward-fn" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "log", "sp-arithmetic", @@ -8458,7 +8883,7 @@ dependencies = [ [[package]] name = "pallet-staking-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "parity-scale-codec", "sp-api", @@ -8467,7 +8892,7 @@ dependencies = [ [[package]] name = "pallet-state-trie-migration" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-benchmarking", "frame-support", @@ -8484,8 +8909,9 @@ dependencies = [ [[package]] name = "pallet-sudo" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ + "frame-benchmarking", "frame-support", "frame-system", "parity-scale-codec", @@ -8498,7 +8924,7 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-benchmarking", "frame-support", @@ -8516,7 +8942,7 @@ dependencies = [ [[package]] name = "pallet-tips" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-benchmarking", "frame-support", @@ -8535,7 +8961,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-support", "frame-system", @@ -8551,7 +8977,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "jsonrpsee", "pallet-transaction-payment-rpc-runtime-api", @@ -8567,7 +8993,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -8579,7 +9005,7 @@ dependencies = [ [[package]] name = "pallet-treasury" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-benchmarking", "frame-support", @@ -8596,7 +9022,7 @@ dependencies = [ [[package]] name = "pallet-utility" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-benchmarking", "frame-support", @@ -8612,7 +9038,7 @@ dependencies = [ [[package]] name = "pallet-vesting" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-benchmarking", "frame-support", @@ -8627,7 +9053,7 @@ dependencies = [ [[package]] name = "pallet-whitelist" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-benchmarking", "frame-support", @@ -8641,8 +9067,8 @@ dependencies = [ [[package]] name = "pallet-xcm" -version = "0.9.42" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech//polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "bounded-collections", "frame-benchmarking", @@ -8662,8 +9088,8 @@ dependencies = [ [[package]] name = "pallet-xcm-benchmarks" -version = "0.9.42" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech//polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "frame-benchmarking", "frame-support", @@ -8682,13 +9108,15 @@ dependencies = [ [[package]] name = "parachain-info" version = "0.1.0" -source = "git+https://github.com/paritytech//cumulus?branch=polkadot-v0.9.42#f603a61ff370fc33740c9373833c3c6ba1486846" +source = "git+https://github.com/paritytech//cumulus?branch=polkadot-v1.0.0#0d17cf6bef320f156f2859d6d2b0abd4154ae1d5" dependencies = [ "cumulus-primitives-core", "frame-support", "frame-system", "parity-scale-codec", "scale-info", + "sp-runtime", + "sp-std", ] [[package]] @@ -8782,6 +9210,7 @@ dependencies = [ "polkadot-primitives", "polkadot-runtime", "polkadot-runtime-parachains", + "polkadot-test-runtime", "pretty_assertions", "rand 0.8.5", "redeem", @@ -8807,6 +9236,7 @@ dependencies = [ "sp-session", "sp-std", "sp-timestamp", + "sp-tracing", "sp-transaction-pool", "sp-version", "staking", @@ -8822,11 +9252,40 @@ dependencies = [ "xcm-simulator", ] +[[package]] +name = "parachains-common" +version = "1.0.0" +source = "git+https://github.com/paritytech//cumulus?branch=polkadot-v1.0.0#0d17cf6bef320f156f2859d6d2b0abd4154ae1d5" +dependencies = [ + "cumulus-primitives-core", + "cumulus-primitives-utility", + "frame-support", + "frame-system", + "num-traits", + "pallet-asset-tx-payment", + "pallet-assets", + "pallet-authorship", + "pallet-balances", + "pallet-collator-selection", + "parity-scale-codec", + "polkadot-primitives", + "scale-info", + "sp-consensus-aura", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", + "substrate-wasm-builder", + "xcm", + "xcm-builder", + "xcm-executor", +] + [[package]] name = "parity-db" -version = "0.4.8" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4890dcb9556136a4ec2b0c51fa4a08c8b733b829506af8fff2e853f3a065985b" +checksum = "78f19d20a0d2cc52327a88d131fa1c4ea81ea4a04714aedcfeca2dd410049cf8" dependencies = [ "blake2", "crc32fast", @@ -8844,9 +9303,9 @@ dependencies = [ [[package]] name = "parity-scale-codec" -version = "3.6.1" +version = "3.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2287753623c76f953acd29d15d8100bcab84d29db78fb6f352adb3c53e83b967" +checksum = "dd8e946cc0cc711189c0b0249fb8b599cbeeab9784d83c415719368bb8d4ac64" dependencies = [ "arrayvec 0.7.4", "bitvec", @@ -8859,9 +9318,9 @@ dependencies = [ [[package]] name = "parity-scale-codec-derive" -version = "3.6.1" +version = "3.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b6937b5e67bfba3351b87b040d48352a2fcb6ad72f81855412ce97b45c8f110" +checksum = "2a296c3079b5fefbc499e1de58dc26c09b1b9a5952d26694ee89f04a43ebbb3e" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -8932,14 +9391,20 @@ dependencies = [ "libc", "redox_syscall 0.3.5", "smallvec", - "windows-targets 0.48.0", + "windows-targets 0.48.5", ] +[[package]] +name = "partial_sort" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7924d1d0ad836f665c9065e26d016c673ece3993f30d340068b16f282afc1156" + [[package]] name = "paste" -version = "1.0.12" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f746c4065a8fa3fe23974dd82f15431cc8d40779821001404d10d2e79ca7d79" +checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" [[package]] name = "pbkdf2" @@ -8991,9 +9456,9 @@ checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" [[package]] name = "pest" -version = "2.7.0" +version = "2.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f73935e4d55e2abf7f130186537b19e7a4abc886a0252380b59248af473a3fc9" +checksum = "1acb4a4365a13f749a93f1a094a7805e5cfa0955373a9de860d962eaa3a5fe5a" dependencies = [ "thiserror", "ucd-trie", @@ -9001,9 +9466,9 @@ dependencies = [ [[package]] name = "pest_derive" -version = "2.7.0" +version = "2.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aef623c9bbfa0eedf5a0efba11a5ee83209c326653ca31ff019bec3a95bfff2b" +checksum = "666d00490d4ac815001da55838c500eafb0320019bbaa44444137c48b443a853" dependencies = [ "pest", "pest_generator", @@ -9011,22 +9476,22 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.7.0" +version = "2.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3e8cba4ec22bada7fc55ffe51e2deb6a0e0db2d0b7ab0b103acc80d2510c190" +checksum = "68ca01446f50dbda87c1786af8770d535423fa8a53aec03b8f4e3d7eb10e0929" dependencies = [ "pest", "pest_meta", "proc-macro2", "quote", - "syn 2.0.22", + "syn 2.0.29", ] [[package]] name = "pest_meta" -version = "2.7.0" +version = "2.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a01f71cb40bd8bb94232df14b946909e14660e33fc05db3e50ae2a82d7ea0ca0" +checksum = "56af0a30af74d0445c0bf6d9d051c979b516a1a5af790d251daee76005420a48" dependencies = [ "once_cell", "pest", @@ -9035,32 +9500,32 @@ dependencies = [ [[package]] name = "petgraph" -version = "0.6.3" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dd7d28ee937e54fe3080c91faa1c3a46c06de6252988a7f4592ba2310ef22a4" +checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" dependencies = [ "fixedbitset", - "indexmap 1.9.3", + "indexmap 2.0.0", ] [[package]] name = "pin-project" -version = "1.1.0" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c95a7476719eab1e366eaf73d0260af3021184f18177925b07f54b30089ceead" +checksum = "fda4ed1c6c173e3fc7a83629421152e01d7b1f9b7f65fb301e490e8cfc656422" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.0" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39407670928234ebc5e6e580247dd567ad73a3578460c5990f9503df207e8f07" +checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" dependencies = [ "proc-macro2", "quote", - "syn 2.0.22", + "syn 2.0.29", ] [[package]] @@ -9071,9 +9536,9 @@ checksum = "257b64915a082f7811703966789728173279bdebb956b143dbcd23f6f970a777" [[package]] name = "pin-project-lite" -version = "0.2.9" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" +checksum = "12cc1b0bf1727a77a54b6654e7b5f1af8604923edc8b81885f8ec92f9e3f0a05" [[package]] name = "pin-utils" @@ -9097,7 +9562,7 @@ version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" dependencies = [ - "der 0.7.6", + "der 0.7.8", "spki 0.7.2", ] @@ -9109,27 +9574,51 @@ checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" [[package]] name = "platforms" -version = "2.0.0" +version = "3.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8d0eef3571242013a0d5dc84861c3ae4a652e56e12adf8bdc26ff5f8cb34c94" +checksum = "e3d7ddaed09e0eb771a79ab0fd64609ba0afb0a8366421957936ad14cbd13630" [[package]] -name = "platforms" -version = "3.0.2" +name = "plotters" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3d7ddaed09e0eb771a79ab0fd64609ba0afb0a8366421957936ad14cbd13630" +checksum = "d2c224ba00d7cadd4d5c660deaf2098e5e80e07846537c51f9cfa4be50c1fd45" +dependencies = [ + "num-traits", + "plotters-backend", + "plotters-svg", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "plotters-backend" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e76628b4d3a7581389a35d5b6e2139607ad7c75b17aed325f210aa91f4a9609" + +[[package]] +name = "plotters-svg" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38f6d39893cca0701371e3c27294f09797214b86f1fb951b89ade8ec04e2abab" +dependencies = [ + "plotters-backend", +] [[package]] name = "polkadot-approval-distribution" -version = "0.9.42" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech//polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "futures", + "futures-timer", "polkadot-node-jaeger", "polkadot-node-metrics", "polkadot-node-network-protocol", "polkadot-node-primitives", "polkadot-node-subsystem", + "polkadot-node-subsystem-util", "polkadot-primitives", "rand 0.8.5", "tracing-gum", @@ -9137,10 +9626,11 @@ dependencies = [ [[package]] name = "polkadot-availability-bitfield-distribution" -version = "0.9.42" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech//polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "futures", + "futures-timer", "polkadot-node-network-protocol", "polkadot-node-subsystem", "polkadot-node-subsystem-util", @@ -9151,8 +9641,8 @@ dependencies = [ [[package]] name = "polkadot-availability-distribution" -version = "0.9.42" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech//polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "derive_more", "fatality", @@ -9174,8 +9664,8 @@ dependencies = [ [[package]] name = "polkadot-availability-recovery" -version = "0.9.42" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech//polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "fatality", "futures", @@ -9195,15 +9685,15 @@ dependencies = [ [[package]] name = "polkadot-cli" -version = "0.9.42" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech//polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "clap", "frame-benchmarking-cli", "futures", "log", - "polkadot-client", - "polkadot-node-core-pvf-worker", + "polkadot-node-core-pvf-execute-worker", + "polkadot-node-core-pvf-prepare-worker", "polkadot-node-metrics", "polkadot-performance-test", "polkadot-service", @@ -9222,53 +9712,10 @@ dependencies = [ "try-runtime-cli", ] -[[package]] -name = "polkadot-client" -version = "0.9.42" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" -dependencies = [ - "async-trait", - "frame-benchmarking", - "frame-benchmarking-cli", - "frame-system", - "frame-system-rpc-runtime-api", - "futures", - "pallet-transaction-payment", - "pallet-transaction-payment-rpc-runtime-api", - "polkadot-core-primitives", - "polkadot-node-core-parachains-inherent", - "polkadot-primitives", - "polkadot-runtime", - "polkadot-runtime-common", - "rococo-runtime", - "sc-client-api", - "sc-consensus", - "sc-executor", - "sc-service", - "sp-api", - "sp-authority-discovery", - "sp-block-builder", - "sp-blockchain", - "sp-consensus", - "sp-consensus-babe", - "sp-consensus-beefy", - "sp-consensus-grandpa", - "sp-core", - "sp-inherents", - "sp-keyring", - "sp-mmr-primitives", - "sp-offchain", - "sp-runtime", - "sp-session", - "sp-storage", - "sp-timestamp", - "sp-transaction-pool", -] - [[package]] name = "polkadot-collator-protocol" -version = "0.9.42" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech//polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "always-assert", "bitvec", @@ -9289,8 +9736,8 @@ dependencies = [ [[package]] name = "polkadot-core-primitives" -version = "0.9.42" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech//polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "parity-scale-codec", "scale-info", @@ -9301,8 +9748,8 @@ dependencies = [ [[package]] name = "polkadot-dispute-distribution" -version = "0.9.42" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech//polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "derive_more", "fatality", @@ -9326,8 +9773,8 @@ dependencies = [ [[package]] name = "polkadot-erasure-coding" -version = "0.9.42" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech//polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "parity-scale-codec", "polkadot-node-primitives", @@ -9340,8 +9787,8 @@ dependencies = [ [[package]] name = "polkadot-gossip-support" -version = "0.9.42" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech//polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "futures", "futures-timer", @@ -9360,8 +9807,8 @@ dependencies = [ [[package]] name = "polkadot-network-bridge" -version = "0.9.42" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech//polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "always-assert", "async-trait", @@ -9383,8 +9830,8 @@ dependencies = [ [[package]] name = "polkadot-node-collation-generation" -version = "0.9.42" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech//polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "futures", "parity-scale-codec", @@ -9401,8 +9848,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-approval-voting" -version = "0.9.42" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech//polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "bitvec", "derive_more", @@ -9430,8 +9877,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-av-store" -version = "0.9.42" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech//polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "bitvec", "futures", @@ -9439,6 +9886,7 @@ dependencies = [ "kvdb", "parity-scale-codec", "polkadot-erasure-coding", + "polkadot-node-jaeger", "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-util", @@ -9451,8 +9899,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-backing" -version = "0.9.42" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech//polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "bitvec", "fatality", @@ -9470,8 +9918,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-bitfield-signing" -version = "0.9.42" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech//polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "futures", "polkadot-node-subsystem", @@ -9485,8 +9933,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-candidate-validation" -version = "0.9.42" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech//polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "async-trait", "futures", @@ -9505,8 +9953,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-chain-api" -version = "0.9.42" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech//polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "futures", "polkadot-node-metrics", @@ -9520,8 +9968,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-chain-selection" -version = "0.9.42" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech//polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "futures", "futures-timer", @@ -9537,8 +9985,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-dispute-coordinator" -version = "0.9.42" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech//polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "fatality", "futures", @@ -9556,8 +10004,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-parachains-inherent" -version = "0.9.42" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech//polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "async-trait", "futures", @@ -9573,8 +10021,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-provisioner" -version = "0.9.42" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech//polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "bitvec", "fatality", @@ -9591,8 +10039,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-pvf" -version = "0.9.42" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech//polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "always-assert", "futures", @@ -9601,6 +10049,9 @@ dependencies = [ "parity-scale-codec", "pin-project", "polkadot-core-primitives", + "polkadot-node-core-pvf-common", + "polkadot-node-core-pvf-execute-worker", + "polkadot-node-core-pvf-prepare-worker", "polkadot-node-metrics", "polkadot-node-primitives", "polkadot-parachain", @@ -9612,14 +10063,15 @@ dependencies = [ "sp-tracing", "sp-wasm-interface", "substrate-build-script-utils", + "tempfile", "tokio", "tracing-gum", ] [[package]] name = "polkadot-node-core-pvf-checker" -version = "0.9.42" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech//polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "futures", "polkadot-node-primitives", @@ -9633,29 +10085,67 @@ dependencies = [ ] [[package]] -name = "polkadot-node-core-pvf-worker" -version = "0.9.42" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +name = "polkadot-node-core-pvf-common" +version = "1.0.0" +source = "git+https://github.com/paritytech//polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ - "assert_matches", "cpu-time", "futures", + "landlock", "libc", "parity-scale-codec", - "polkadot-node-core-pvf", "polkadot-parachain", "polkadot-primitives", - "rayon", "sc-executor", "sc-executor-common", "sc-executor-wasmtime", "sp-core", "sp-externalities", "sp-io", - "sp-maybe-compressed-blob", "sp-tracing", "substrate-build-script-utils", - "tempfile", + "tokio", + "tracing-gum", +] + +[[package]] +name = "polkadot-node-core-pvf-execute-worker" +version = "1.0.0" +source = "git+https://github.com/paritytech//polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" +dependencies = [ + "cpu-time", + "futures", + "parity-scale-codec", + "polkadot-node-core-pvf-common", + "polkadot-parachain", + "polkadot-primitives", + "rayon", + "sp-core", + "sp-maybe-compressed-blob", + "sp-tracing", + "tikv-jemalloc-ctl", + "tokio", + "tracing-gum", +] + +[[package]] +name = "polkadot-node-core-pvf-prepare-worker" +version = "1.0.0" +source = "git+https://github.com/paritytech//polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" +dependencies = [ + "futures", + "libc", + "parity-scale-codec", + "polkadot-node-core-pvf-common", + "polkadot-parachain", + "polkadot-primitives", + "rayon", + "sc-executor", + "sc-executor-common", + "sc-executor-wasmtime", + "sp-io", + "sp-maybe-compressed-blob", + "sp-tracing", "tikv-jemalloc-ctl", "tokio", "tracing-gum", @@ -9663,8 +10153,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-runtime-api" -version = "0.9.42" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech//polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "futures", "lru 0.9.0", @@ -9678,8 +10168,8 @@ dependencies = [ [[package]] name = "polkadot-node-jaeger" -version = "0.9.42" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech//polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "lazy_static", "log", @@ -9696,8 +10186,8 @@ dependencies = [ [[package]] name = "polkadot-node-metrics" -version = "0.9.42" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech//polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "bs58", "futures", @@ -9715,9 +10205,10 @@ dependencies = [ [[package]] name = "polkadot-node-network-protocol" -version = "0.9.42" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech//polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ + "async-channel", "async-trait", "derive_more", "fatality", @@ -9737,8 +10228,8 @@ dependencies = [ [[package]] name = "polkadot-node-primitives" -version = "0.9.42" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech//polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "bounded-vec", "futures", @@ -9759,8 +10250,8 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem" -version = "0.9.42" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech//polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "polkadot-node-jaeger", "polkadot-node-subsystem-types", @@ -9769,8 +10260,8 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem-types" -version = "0.9.42" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech//polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "async-trait", "derive_more", @@ -9782,6 +10273,7 @@ dependencies = [ "polkadot-primitives", "polkadot-statement-table", "sc-network", + "sc-transaction-pool-api", "smallvec", "sp-api", "sp-authority-discovery", @@ -9792,8 +10284,8 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem-util" -version = "0.9.42" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech//polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "async-trait", "derive_more", @@ -9825,8 +10317,8 @@ dependencies = [ [[package]] name = "polkadot-overseer" -version = "0.9.42" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech//polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "async-trait", "futures", @@ -9848,8 +10340,8 @@ dependencies = [ [[package]] name = "polkadot-parachain" -version = "0.9.42" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech//polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "bounded-collections", "derive_more", @@ -9865,14 +10357,14 @@ dependencies = [ [[package]] name = "polkadot-performance-test" -version = "0.9.42" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech//polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "env_logger 0.9.3", "kusama-runtime", "log", "polkadot-erasure-coding", - "polkadot-node-core-pvf-worker", + "polkadot-node-core-pvf-prepare-worker", "polkadot-node-primitives", "polkadot-primitives", "quote", @@ -9883,8 +10375,8 @@ dependencies = [ [[package]] name = "polkadot-primitives" -version = "0.9.42" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech//polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "bitvec", "hex-literal 0.4.1", @@ -9909,8 +10401,8 @@ dependencies = [ [[package]] name = "polkadot-rpc" -version = "0.9.42" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech//polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "jsonrpsee", "mmr-rpc", @@ -9941,8 +10433,8 @@ dependencies = [ [[package]] name = "polkadot-runtime" -version = "0.9.42" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech//polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "bitvec", "frame-benchmarking", @@ -9974,6 +10466,7 @@ dependencies = [ "pallet-im-online", "pallet-indices", "pallet-membership", + "pallet-message-queue", "pallet-multisig", "pallet-nomination-pools", "pallet-nomination-pools-benchmarking", @@ -10035,8 +10528,8 @@ dependencies = [ [[package]] name = "polkadot-runtime-common" -version = "0.9.42" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech//polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "bitvec", "frame-benchmarking", @@ -10081,8 +10574,8 @@ dependencies = [ [[package]] name = "polkadot-runtime-constants" -version = "0.9.42" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech//polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "frame-support", "polkadot-primitives", @@ -10095,8 +10588,8 @@ dependencies = [ [[package]] name = "polkadot-runtime-metrics" -version = "0.9.42" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech//polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "bs58", "parity-scale-codec", @@ -10107,10 +10600,10 @@ dependencies = [ [[package]] name = "polkadot-runtime-parachains" -version = "0.9.42" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech//polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ - "bitflags", + "bitflags 1.3.2", "bitvec", "derive_more", "frame-benchmarking", @@ -10121,6 +10614,7 @@ dependencies = [ "pallet-authorship", "pallet-babe", "pallet-balances", + "pallet-message-queue", "pallet-session", "pallet-staking", "pallet-timestamp", @@ -10151,12 +10645,14 @@ dependencies = [ [[package]] name = "polkadot-service" -version = "0.9.42" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech//polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "async-trait", + "frame-benchmarking", "frame-benchmarking-cli", "frame-support", + "frame-system", "frame-system-rpc-runtime-api", "futures", "hex-literal 0.4.1", @@ -10169,14 +10665,16 @@ dependencies = [ "pallet-babe", "pallet-im-online", "pallet-staking", + "pallet-transaction-payment", "pallet-transaction-payment-rpc-runtime-api", "parity-db", + "parity-scale-codec", "polkadot-approval-distribution", "polkadot-availability-bitfield-distribution", "polkadot-availability-distribution", "polkadot-availability-recovery", - "polkadot-client", "polkadot-collator-protocol", + "polkadot-core-primitives", "polkadot-dispute-distribution", "polkadot-gossip-support", "polkadot-network-bridge", @@ -10203,93 +10701,210 @@ dependencies = [ "polkadot-primitives", "polkadot-rpc", "polkadot-runtime", - "polkadot-runtime-constants", + "polkadot-runtime-common", "polkadot-runtime-parachains", "polkadot-statement-distribution", "rococo-runtime", "rococo-runtime-constants", "sc-authority-discovery", - "sc-basic-authorship", - "sc-block-builder", + "sc-basic-authorship", + "sc-block-builder", + "sc-chain-spec", + "sc-client-api", + "sc-client-db", + "sc-consensus", + "sc-consensus-babe", + "sc-consensus-beefy", + "sc-consensus-grandpa", + "sc-consensus-slots", + "sc-executor", + "sc-keystore", + "sc-network", + "sc-network-common", + "sc-network-sync", + "sc-offchain", + "sc-service", + "sc-sync-state-rpc", + "sc-sysinfo", + "sc-telemetry", + "sc-transaction-pool", + "sc-transaction-pool-api", + "serde", + "serde_json", + "sp-api", + "sp-authority-discovery", + "sp-block-builder", + "sp-blockchain", + "sp-consensus", + "sp-consensus-babe", + "sp-consensus-beefy", + "sp-consensus-grandpa", + "sp-core", + "sp-inherents", + "sp-io", + "sp-keyring", + "sp-keystore", + "sp-mmr-primitives", + "sp-offchain", + "sp-runtime", + "sp-session", + "sp-state-machine", + "sp-storage", + "sp-timestamp", + "sp-transaction-pool", + "sp-trie", + "sp-version", + "sp-weights", + "substrate-prometheus-endpoint", + "thiserror", + "tracing-gum", + "westend-runtime", +] + +[[package]] +name = "polkadot-statement-distribution" +version = "1.0.0" +source = "git+https://github.com/paritytech//polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" +dependencies = [ + "arrayvec 0.5.2", + "fatality", + "futures", + "futures-timer", + "indexmap 1.9.3", + "parity-scale-codec", + "polkadot-node-network-protocol", + "polkadot-node-primitives", + "polkadot-node-subsystem", + "polkadot-node-subsystem-util", + "polkadot-primitives", + "sp-keystore", + "sp-staking", + "thiserror", + "tracing-gum", +] + +[[package]] +name = "polkadot-statement-table" +version = "1.0.0" +source = "git+https://github.com/paritytech//polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" +dependencies = [ + "parity-scale-codec", + "polkadot-primitives", + "sp-core", +] + +[[package]] +name = "polkadot-test-runtime" +version = "1.0.0" +source = "git+https://github.com/paritytech//polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" +dependencies = [ + "bitvec", + "frame-election-provider-support", + "frame-executive", + "frame-support", + "frame-system", + "frame-system-rpc-runtime-api", + "log", + "pallet-authority-discovery", + "pallet-authorship", + "pallet-babe", + "pallet-balances", + "pallet-grandpa", + "pallet-indices", + "pallet-offences", + "pallet-session", + "pallet-staking", + "pallet-staking-reward-curve", + "pallet-sudo", + "pallet-timestamp", + "pallet-transaction-payment", + "pallet-transaction-payment-rpc-runtime-api", + "pallet-vesting", + "pallet-xcm", + "parity-scale-codec", + "polkadot-parachain", + "polkadot-primitives", + "polkadot-runtime-common", + "polkadot-runtime-parachains", + "rustc-hex", + "scale-info", + "serde", + "serde_derive", + "smallvec", + "sp-api", + "sp-authority-discovery", + "sp-block-builder", + "sp-consensus-babe", + "sp-consensus-beefy", + "sp-core", + "sp-inherents", + "sp-io", + "sp-mmr-primitives", + "sp-offchain", + "sp-runtime", + "sp-session", + "sp-staking", + "sp-std", + "sp-transaction-pool", + "sp-version", + "substrate-wasm-builder", + "test-runtime-constants", + "xcm", + "xcm-builder", + "xcm-executor", +] + +[[package]] +name = "polkadot-test-service" +version = "1.0.0" +source = "git+https://github.com/paritytech//polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" +dependencies = [ + "frame-system", + "futures", + "hex", + "pallet-balances", + "pallet-staking", + "pallet-transaction-payment", + "polkadot-node-primitives", + "polkadot-node-subsystem", + "polkadot-overseer", + "polkadot-parachain", + "polkadot-primitives", + "polkadot-rpc", + "polkadot-runtime-common", + "polkadot-runtime-parachains", + "polkadot-service", + "polkadot-test-runtime", + "rand 0.8.5", + "sc-authority-discovery", "sc-chain-spec", + "sc-cli", "sc-client-api", - "sc-client-db", "sc-consensus", "sc-consensus-babe", - "sc-consensus-beefy", "sc-consensus-grandpa", - "sc-consensus-slots", - "sc-executor", - "sc-keystore", "sc-network", - "sc-network-common", - "sc-network-sync", - "sc-offchain", "sc-service", - "sc-sync-state-rpc", - "sc-sysinfo", - "sc-telemetry", + "sc-tracing", "sc-transaction-pool", - "serde", - "serde_json", - "sp-api", + "sp-arithmetic", "sp-authority-discovery", - "sp-block-builder", "sp-blockchain", "sp-consensus", "sp-consensus-babe", - "sp-consensus-beefy", "sp-consensus-grandpa", "sp-core", "sp-inherents", - "sp-io", - "sp-keystore", - "sp-mmr-primitives", - "sp-offchain", + "sp-keyring", "sp-runtime", - "sp-session", "sp-state-machine", - "sp-storage", - "sp-timestamp", - "sp-transaction-pool", - "sp-trie", - "substrate-prometheus-endpoint", - "thiserror", - "tracing-gum", - "westend-runtime", -] - -[[package]] -name = "polkadot-statement-distribution" -version = "0.9.42" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" -dependencies = [ - "arrayvec 0.5.2", - "fatality", - "futures", - "indexmap 1.9.3", - "parity-scale-codec", - "polkadot-node-network-protocol", - "polkadot-node-primitives", - "polkadot-node-subsystem", - "polkadot-node-subsystem-util", - "polkadot-primitives", - "sp-keystore", - "sp-staking", - "thiserror", + "substrate-test-client", + "tempfile", + "test-runtime-constants", + "tokio", "tracing-gum", ] -[[package]] -name = "polkadot-statement-table" -version = "0.9.42" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" -dependencies = [ - "parity-scale-codec", - "polkadot-primitives", - "sp-core", -] - [[package]] name = "polling" version = "2.8.0" @@ -10297,12 +10912,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4b2d323e8ca7996b3e23126511a523f7e62924d93ecd5ae73b333815b0eb3dce" dependencies = [ "autocfg 1.1.0", - "bitflags", + "bitflags 1.3.2", "cfg-if", "concurrent-queue", "libc", "log", - "pin-project-lite 0.2.9", + "pin-project-lite 0.2.12", "windows-sys 0.48.0", ] @@ -10343,9 +10958,9 @@ dependencies = [ [[package]] name = "portable-atomic" -version = "1.3.3" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "767eb9f07d4a5ebcb39bbf2d452058a93c011373abf6832e24194a1c3f004794" +checksum = "f32154ba0af3a075eefa1eda8bb414ee928f62303a54ea85b8d6638ff1a6ee9e" [[package]] name = "ppv-lite86" @@ -10405,6 +11020,16 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "prettyplease" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c64d9ba0963cdcea2e1b2230fbae2bab30eb25a174be395c41e764bfb65dd62" +dependencies = [ + "proc-macro2", + "syn 2.0.29", +] + [[package]] name = "primitive-types" version = "0.12.1" @@ -10477,20 +11102,20 @@ checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" [[package]] name = "proc-macro-warning" -version = "0.3.1" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e99670bafb56b9a106419397343bdbc8b8742c3cc449fec6345f86173f47cd4" +checksum = "70550716265d1ec349c41f70dd4f964b4fd88394efe4405f0c1da679c4799a07" dependencies = [ "proc-macro2", "quote", - "syn 2.0.22", + "syn 2.0.29", ] [[package]] name = "proc-macro2" -version = "1.0.63" +version = "1.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b368fba921b0dce7e60f5e04ec15e565b3303972b42bcfde1d0713b881959eb" +checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" dependencies = [ "unicode-ident", ] @@ -10511,25 +11136,25 @@ dependencies = [ [[package]] name = "prometheus-client" -version = "0.18.1" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83cd1b99916654a69008fd66b4f9397fbe08e6e51dfe23d4417acf5d3b8cb87c" +checksum = "5d6fa99d535dd930d1249e6c79cb3c2915f9172a540fe2b02a4c8f9ca954721e" dependencies = [ "dtoa", "itoa", "parking_lot 0.12.1", - "prometheus-client-derive-text-encode", + "prometheus-client-derive-encode", ] [[package]] -name = "prometheus-client-derive-text-encode" -version = "0.3.0" +name = "prometheus-client-derive-encode" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66a455fbcb954c1a7decf3c586e860fd7889cddf4b8e164be736dbac95a953cd" +checksum = "440f724eba9f6996b75d63681b0a92b06947f1457076d503a4d2e2c8f56442b8" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.29", ] [[package]] @@ -10539,7 +11164,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4e35c06b98bf36aba164cc17cb25f7e232f5c4aeea73baa14b8a9f0d92dbfa65" dependencies = [ "bit-set", - "bitflags", + "bitflags 1.3.2", "byteorder", "lazy_static", "num-traits", @@ -10575,7 +11200,7 @@ dependencies = [ "log", "multimap", "petgraph", - "prettyplease", + "prettyplease 0.1.25", "prost", "prost-types", "regex", @@ -10584,19 +11209,6 @@ dependencies = [ "which", ] -[[package]] -name = "prost-codec" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dc34979ff898b6e141106178981ce2596c387ea6e62533facfc61a37fc879c0" -dependencies = [ - "asynchronous-codec", - "bytes", - "prost", - "thiserror", - "unsigned-varint", -] - [[package]] name = "prost-derive" version = "0.11.9" @@ -10643,6 +11255,19 @@ dependencies = [ "byteorder", ] +[[package]] +name = "quick-protobuf-codec" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1693116345026436eb2f10b677806169c1a1260c1c60eaaffe3fb5a29ae23d8b" +dependencies = [ + "asynchronous-codec", + "bytes", + "quick-protobuf", + "thiserror", + "unsigned-varint", +] + [[package]] name = "quicksink" version = "0.1.2" @@ -10656,9 +11281,9 @@ dependencies = [ [[package]] name = "quinn-proto" -version = "0.9.3" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67c10f662eee9c94ddd7135043e544f3c82fa839a1e7b865911331961b53186c" +checksum = "f31999cfc7927c4e212e60fd50934ab40e8e8bfd2d493d6095d2d306bc0764d9" dependencies = [ "bytes", "rand 0.8.5", @@ -10674,9 +11299,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.28" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b9ab9c7eadfd8df19006f1cf1a4aed13540ed5cbc047010ece5826e10825488" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" dependencies = [ "proc-macro2", ] @@ -10918,7 +11543,7 @@ checksum = "6413f3de1edee53342e6138e75b56d32e7bc6e332b3bd62d497b1929d4cfbcdd" dependencies = [ "pem", "ring", - "time 0.3.22", + "time 0.3.27", "x509-parser 0.13.2", "yasna", ] @@ -10931,7 +11556,7 @@ checksum = "ffbe84efe2f38dea12e9bfc1f65377fdf03e53a18cb3b995faedf7934c7e785b" dependencies = [ "pem", "ring", - "time 0.3.22", + "time 0.3.27", "yasna", ] @@ -11005,7 +11630,7 @@ version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" dependencies = [ - "bitflags", + "bitflags 1.3.2", ] [[package]] @@ -11014,7 +11639,7 @@ version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" dependencies = [ - "bitflags", + "bitflags 1.3.2", ] [[package]] @@ -11043,29 +11668,29 @@ dependencies = [ [[package]] name = "ref-cast" -version = "1.0.16" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f43faa91b1c8b36841ee70e97188a869d37ae21759da6846d4be66de5bf7b12c" +checksum = "acde58d073e9c79da00f2b5b84eed919c8326832648a5b109b3fce1bb1175280" dependencies = [ "ref-cast-impl", ] [[package]] name = "ref-cast-impl" -version = "1.0.16" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d2275aab483050ab2a7364c1a46604865ee7d6906684e08db0f090acf74f9e7" +checksum = "7f7473c2cfcf90008193dd0e3e16599455cb601a9fce322b5bb55de799664925" dependencies = [ "proc-macro2", "quote", - "syn 2.0.22", + "syn 2.0.29", ] [[package]] name = "regalloc2" -version = "0.5.1" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "300d4fbfb40c1c66a78ba3ddd41c1110247cf52f97b87d0f2fc9209bd49b030c" +checksum = "80535183cae11b149d618fbd3c37e38d7cda589d82d7769e196ca9a9042d7621" dependencies = [ "fxhash", "log", @@ -11075,13 +11700,14 @@ dependencies = [ [[package]] name = "regex" -version = "1.8.4" +version = "1.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0ab3ca65655bb1e41f2a8c8cd662eb4fb035e67c3f78da1d61dffe89d07300f" +checksum = "81bc1d4caf89fac26a70747fe603c130093b53c773888797a6329091246d651a" dependencies = [ - "aho-corasick 1.0.2", + "aho-corasick", "memchr", - "regex-syntax 0.7.2", + "regex-automata 0.3.6", + "regex-syntax 0.7.4", ] [[package]] @@ -11094,28 +11720,27 @@ dependencies = [ ] [[package]] -name = "regex-syntax" -version = "0.6.29" +name = "regex-automata" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" +checksum = "fed1ceff11a1dddaee50c9dc8e4938bd106e9d89ae372f192311e7da498e3b69" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax 0.7.4", +] [[package]] name = "regex-syntax" -version = "0.7.2" +version = "0.6.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "436b050e76ed2903236f032a59761c1eb99e1b0aead2c257922771dab1fc8c78" +checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] -name = "region" -version = "3.0.0" +name = "regex-syntax" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76e189c2369884dce920945e2ddf79b3dff49e071a167dd1817fa9c4c00d512e" -dependencies = [ - "bitflags", - "libc", - "mach", - "winapi", -] +checksum = "e5ea92a5b6195c6ef2a0295ea818b312502c6fc94dde986c5553242e18fd4ce2" [[package]] name = "replace" @@ -11295,9 +11920,9 @@ dependencies = [ [[package]] name = "rocksdb" -version = "0.20.1" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "015439787fce1e75d55f279078d33ff14b4af5d93d995e8838ee4631301c8a99" +checksum = "bb6f170a4041d50a0ce04b0d2e14916d6ca863ea2e422689a5b694395d299ffe" dependencies = [ "libc", "librocksdb-sys", @@ -11305,8 +11930,8 @@ dependencies = [ [[package]] name = "rococo-runtime" -version = "0.9.42" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech//polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "binary-merkle-tree", "frame-benchmarking", @@ -11334,6 +11959,7 @@ dependencies = [ "pallet-im-online", "pallet-indices", "pallet-membership", + "pallet-message-queue", "pallet-mmr", "pallet-multisig", "pallet-nis", @@ -11391,8 +12017,8 @@ dependencies = [ [[package]] name = "rococo-runtime-constants" -version = "0.9.42" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech//polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "frame-support", "polkadot-primitives", @@ -11539,7 +12165,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" dependencies = [ - "semver 1.0.17", + "semver 1.0.18", ] [[package]] @@ -11553,11 +12179,11 @@ dependencies = [ [[package]] name = "rustix" -version = "0.36.14" +version = "0.36.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14e4d67015953998ad0eb82887a0eb0129e18a7e2f3b7b0f6c422fddcd503d62" +checksum = "c37f1bd5ef1b5422177b7646cba67430579cfe2ace80f284fee876bca52ad941" dependencies = [ - "bitflags", + "bitflags 1.3.2", "errno", "io-lifetimes", "libc", @@ -11567,11 +12193,11 @@ dependencies = [ [[package]] name = "rustix" -version = "0.37.20" +version = "0.37.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b96e891d04aa506a6d1f318d2771bcb1c7dfda84e126660ace067c9b474bb2c0" +checksum = "4d69718bf81c6127a49dc64e44a742e8bb9213c0ff8869a22c308f84c1d4ab06" dependencies = [ - "bitflags", + "bitflags 1.3.2", "errno", "io-lifetimes", "libc", @@ -11579,6 +12205,19 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "rustix" +version = "0.38.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19ed4fa021d81c8392ce04db050a3da9a60299050b7ae1cf482d862b54a7218f" +dependencies = [ + "bitflags 2.4.0", + "errno", + "libc", + "linux-raw-sys 0.4.5", + "windows-sys 0.48.0", +] + [[package]] name = "rustls" version = "0.19.1" @@ -11604,6 +12243,18 @@ dependencies = [ "webpki 0.22.0", ] +[[package]] +name = "rustls" +version = "0.21.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d1feddffcfcc0b33f5c6ce9a29e341e4cd59c3f78e7ee45f4a40c038b1d6cbb" +dependencies = [ + "log", + "ring", + "rustls-webpki 0.101.4", + "sct 0.7.0", +] + [[package]] name = "rustls-native-certs" version = "0.6.3" @@ -11625,11 +12276,31 @@ dependencies = [ "base64 0.21.2", ] +[[package]] +name = "rustls-webpki" +version = "0.100.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e98ff011474fa39949b7e5c0428f9b4937eda7da7848bbb947786b7be0b27dab" +dependencies = [ + "ring", + "untrusted", +] + +[[package]] +name = "rustls-webpki" +version = "0.101.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d93931baf2d282fff8d3a532bbfd7653f734643161b87e3e01e59a04439bf0d" +dependencies = [ + "ring", + "untrusted", +] + [[package]] name = "rustversion" -version = "1.0.12" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f3208ce4d8448b3f3e7d168a73f5e0c43a61e32930de3bceeccedb388b6bf06" +checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" [[package]] name = "rusty-fork" @@ -11656,15 +12327,15 @@ dependencies = [ [[package]] name = "ryu" -version = "1.0.13" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" +checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" [[package]] name = "safe_arch" -version = "0.7.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62a7484307bd40f8f7ccbacccac730108f2cae119a3b11c74485b48aa9ea650f" +checksum = "f398075ce1e6a179b46f51bd88d0598b92b00d3551f1a2d4ac49e771b56ac354" dependencies = [ "bytemuck", ] @@ -11681,7 +12352,7 @@ dependencies = [ [[package]] name = "sc-allocator" version = "4.1.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "log", "sp-core", @@ -11692,7 +12363,7 @@ dependencies = [ [[package]] name = "sc-authority-discovery" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "async-trait", "futures", @@ -11700,13 +12371,13 @@ dependencies = [ "ip_network", "libp2p", "log", + "multihash", "parity-scale-codec", "prost", "prost-build", "rand 0.8.5", "sc-client-api", "sc-network", - "sc-network-common", "sp-api", "sp-authority-discovery", "sp-blockchain", @@ -11720,7 +12391,7 @@ dependencies = [ [[package]] name = "sc-basic-authorship" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "futures", "futures-timer", @@ -11743,7 +12414,7 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "parity-scale-codec", "sc-client-api", @@ -11758,7 +12429,7 @@ dependencies = [ [[package]] name = "sc-chain-spec" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "memmap2", "sc-chain-spec-derive", @@ -11777,25 +12448,25 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.22", + "syn 2.0.29", ] [[package]] name = "sc-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ - "array-bytes 4.2.0", + "array-bytes", "chrono", "clap", "fdlimit", "futures", - "libp2p", + "libp2p-identity", "log", "names", "parity-scale-codec", @@ -11806,7 +12477,6 @@ dependencies = [ "sc-client-db", "sc-keystore", "sc-network", - "sc-network-common", "sc-service", "sc-telemetry", "sc-tracing", @@ -11828,7 +12498,7 @@ dependencies = [ [[package]] name = "sc-client-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "fnv", "futures", @@ -11842,11 +12512,11 @@ dependencies = [ "sp-blockchain", "sp-consensus", "sp-core", - "sp-database 4.0.0-dev (git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42)", + "sp-database", "sp-externalities", - "sp-keystore", "sp-runtime", "sp-state-machine", + "sp-statement-store", "sp-storage", "substrate-prometheus-endpoint", ] @@ -11854,7 +12524,7 @@ dependencies = [ [[package]] name = "sc-client-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "hash-db 0.16.0", "kvdb", @@ -11871,7 +12541,7 @@ dependencies = [ "sp-arithmetic", "sp-blockchain", "sp-core", - "sp-database 4.0.0-dev (git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42)", + "sp-database", "sp-runtime", "sp-state-machine", "sp-trie", @@ -11880,12 +12550,12 @@ dependencies = [ [[package]] name = "sc-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "async-trait", "futures", "futures-timer", - "libp2p", + "libp2p-identity", "log", "mockall", "parking_lot 0.12.1", @@ -11905,7 +12575,7 @@ dependencies = [ [[package]] name = "sc-consensus-aura" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "async-trait", "futures", @@ -11934,7 +12604,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "async-trait", "fork-tree", @@ -11949,8 +12619,8 @@ dependencies = [ "sc-consensus", "sc-consensus-epochs", "sc-consensus-slots", - "sc-keystore", "sc-telemetry", + "sc-transaction-pool-api", "scale-info", "sp-api", "sp-application-crypto", @@ -11970,7 +12640,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "futures", "jsonrpsee", @@ -11992,9 +12662,10 @@ dependencies = [ [[package]] name = "sc-consensus-beefy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ - "array-bytes 4.2.0", + "array-bytes", + "async-channel", "async-trait", "fnv", "futures", @@ -12003,9 +12674,7 @@ dependencies = [ "parking_lot 0.12.1", "sc-client-api", "sc-consensus", - "sc-keystore", "sc-network", - "sc-network-common", "sc-network-gossip", "sc-network-sync", "sc-utils", @@ -12027,7 +12696,7 @@ dependencies = [ [[package]] name = "sc-consensus-beefy-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "futures", "jsonrpsee", @@ -12046,7 +12715,7 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "fork-tree", "parity-scale-codec", @@ -12059,10 +12728,10 @@ dependencies = [ [[package]] name = "sc-consensus-grandpa" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "ahash 0.8.3", - "array-bytes 4.2.0", + "array-bytes", "async-trait", "dyn-clone", "finality-grandpa", @@ -12081,6 +12750,7 @@ dependencies = [ "sc-network-common", "sc-network-gossip", "sc-telemetry", + "sc-transaction-pool-api", "sc-utils", "serde_json", "sp-api", @@ -12099,7 +12769,7 @@ dependencies = [ [[package]] name = "sc-consensus-grandpa-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "finality-grandpa", "futures", @@ -12119,11 +12789,12 @@ dependencies = [ [[package]] name = "sc-consensus-manual-seal" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "assert_matches", "async-trait", "futures", + "futures-timer", "jsonrpsee", "log", "parity-scale-codec", @@ -12153,7 +12824,7 @@ dependencies = [ [[package]] name = "sc-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "async-trait", "futures", @@ -12176,14 +12847,13 @@ dependencies = [ [[package]] name = "sc-executor" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ - "lru 0.8.1", "parity-scale-codec", "parking_lot 0.12.1", "sc-executor-common", - "sc-executor-wasmi", "sc-executor-wasmtime", + "schnellru", "sp-api", "sp-core", "sp-externalities", @@ -12194,46 +12864,30 @@ dependencies = [ "sp-version", "sp-wasm-interface", "tracing", - "wasmi 0.13.2", ] [[package]] name = "sc-executor-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "sc-allocator", "sp-maybe-compressed-blob", "sp-wasm-interface", "thiserror", "wasm-instrument 0.3.0", - "wasmi 0.13.2", -] - -[[package]] -name = "sc-executor-wasmi" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" -dependencies = [ - "log", - "sc-allocator", - "sc-executor-common", - "sp-runtime-interface", - "sp-wasm-interface", - "wasmi 0.13.2", ] [[package]] name = "sc-executor-wasmtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "anyhow", "cfg-if", "libc", "log", - "once_cell", - "rustix 0.36.14", + "rustix 0.36.15", "sc-allocator", "sc-executor-common", "sp-runtime-interface", @@ -12244,7 +12898,7 @@ dependencies = [ [[package]] name = "sc-informant" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "ansi_term", "futures", @@ -12260,10 +12914,9 @@ dependencies = [ [[package]] name = "sc-keystore" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ - "array-bytes 4.2.0", - "async-trait", + "array-bytes", "parking_lot 0.12.1", "serde_json", "sp-application-crypto", @@ -12275,9 +12928,9 @@ dependencies = [ [[package]] name = "sc-network" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ - "array-bytes 4.2.0", + "array-bytes", "async-channel", "async-trait", "asynchronous-codec", @@ -12290,47 +12943,43 @@ dependencies = [ "libp2p", "linked_hash_set", "log", - "lru 0.8.1", "mockall", "parity-scale-codec", "parking_lot 0.12.1", + "partial_sort", "pin-project", "rand 0.8.5", - "sc-block-builder", "sc-client-api", - "sc-consensus", "sc-network-common", - "sc-peerset", "sc-utils", "serde", "serde_json", "smallvec", - "snow", "sp-arithmetic", "sp-blockchain", - "sp-consensus", "sp-core", "sp-runtime", "substrate-prometheus-endpoint", "thiserror", "unsigned-varint", + "wasm-timer", "zeroize", ] [[package]] name = "sc-network-bitswap" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ + "async-channel", "cid", "futures", - "libp2p", + "libp2p-identity", "log", "prost", "prost-build", "sc-client-api", "sc-network", - "sc-network-common", "sp-blockchain", "sp-runtime", "thiserror", @@ -12340,45 +12989,33 @@ dependencies = [ [[package]] name = "sc-network-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ - "array-bytes 4.2.0", "async-trait", - "bitflags", - "bytes", + "bitflags 1.3.2", "futures", - "futures-timer", - "libp2p", + "libp2p-identity", "parity-scale-codec", "prost-build", "sc-consensus", - "sc-peerset", - "sc-utils", - "serde", - "smallvec", - "sp-blockchain", "sp-consensus", "sp-consensus-grandpa", "sp-runtime", - "substrate-prometheus-endpoint", - "thiserror", - "zeroize", ] [[package]] name = "sc-network-gossip" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "ahash 0.8.3", "futures", "futures-timer", "libp2p", "log", - "lru 0.8.1", "sc-network", "sc-network-common", - "sc-peerset", + "schnellru", "sp-runtime", "substrate-prometheus-endpoint", "tracing", @@ -12387,19 +13024,18 @@ dependencies = [ [[package]] name = "sc-network-light" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ - "array-bytes 4.2.0", + "array-bytes", + "async-channel", "futures", - "libp2p", + "libp2p-identity", "log", "parity-scale-codec", "prost", "prost-build", "sc-client-api", "sc-network", - "sc-network-common", - "sc-peerset", "sp-blockchain", "sp-core", "sp-runtime", @@ -12409,16 +13045,16 @@ dependencies = [ [[package]] name = "sc-network-sync" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ - "array-bytes 4.2.0", + "array-bytes", + "async-channel", "async-trait", "fork-tree", "futures", "futures-timer", "libp2p", "log", - "lru 0.8.1", "mockall", "parity-scale-codec", "prost", @@ -12427,8 +13063,8 @@ dependencies = [ "sc-consensus", "sc-network", "sc-network-common", - "sc-peerset", "sc-utils", + "schnellru", "smallvec", "sp-arithmetic", "sp-blockchain", @@ -12443,17 +13079,15 @@ dependencies = [ [[package]] name = "sc-network-transactions" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ - "array-bytes 4.2.0", + "array-bytes", "futures", "libp2p", "log", "parity-scale-codec", - "pin-project", "sc-network", "sc-network-common", - "sc-peerset", "sc-utils", "sp-consensus", "sp-runtime", @@ -12463,9 +13097,9 @@ dependencies = [ [[package]] name = "sc-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ - "array-bytes 4.2.0", + "array-bytes", "bytes", "fnv", "futures", @@ -12473,6 +13107,7 @@ dependencies = [ "hyper", "hyper-rustls", "libp2p", + "log", "num_cpus", "once_cell", "parity-scale-codec", @@ -12481,33 +13116,22 @@ dependencies = [ "sc-client-api", "sc-network", "sc-network-common", - "sc-peerset", + "sc-transaction-pool-api", "sc-utils", "sp-api", "sp-core", + "sp-externalities", + "sp-keystore", "sp-offchain", "sp-runtime", "threadpool", "tracing", ] -[[package]] -name = "sc-peerset" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" -dependencies = [ - "futures", - "libp2p", - "log", - "sc-utils", - "serde_json", - "wasm-timer", -] - [[package]] name = "sc-proposer-metrics" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -12516,7 +13140,7 @@ dependencies = [ [[package]] name = "sc-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "futures", "jsonrpsee", @@ -12539,6 +13163,7 @@ dependencies = [ "sp-rpc", "sp-runtime", "sp-session", + "sp-statement-store", "sp-version", "tokio", ] @@ -12546,7 +13171,7 @@ dependencies = [ [[package]] name = "sc-rpc-api" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -12565,7 +13190,7 @@ dependencies = [ [[package]] name = "sc-rpc-server" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "http", "jsonrpsee", @@ -12580,9 +13205,9 @@ dependencies = [ [[package]] name = "sc-rpc-spec-v2" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ - "array-bytes 4.2.0", + "array-bytes", "futures", "futures-util", "hex", @@ -12606,7 +13231,7 @@ dependencies = [ [[package]] name = "sc-service" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "async-trait", "directories", @@ -12633,11 +13258,9 @@ dependencies = [ "sc-network-light", "sc-network-sync", "sc-network-transactions", - "sc-offchain", "sc-rpc", "sc-rpc-server", "sc-rpc-spec-v2", - "sc-storage-monitor", "sc-sysinfo", "sc-telemetry", "sc-tracing", @@ -12672,7 +13295,7 @@ dependencies = [ [[package]] name = "sc-state-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "log", "parity-scale-codec", @@ -12683,14 +13306,12 @@ dependencies = [ [[package]] name = "sc-storage-monitor" version = "0.1.0" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "clap", "fs4", - "futures", "log", "sc-client-db", - "sc-utils", "sp-core", "thiserror", "tokio", @@ -12699,7 +13320,7 @@ dependencies = [ [[package]] name = "sc-sync-state-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -12718,7 +13339,7 @@ dependencies = [ [[package]] name = "sc-sysinfo" version = "6.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "futures", "libc", @@ -12737,7 +13358,7 @@ dependencies = [ [[package]] name = "sc-telemetry" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "chrono", "futures", @@ -12756,7 +13377,7 @@ dependencies = [ [[package]] name = "sc-tracing" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "ansi_term", "atty", @@ -12764,12 +13385,10 @@ dependencies = [ "lazy_static", "libc", "log", - "once_cell", "parking_lot 0.12.1", "regex", "rustc-hash", "sc-client-api", - "sc-rpc-server", "sc-tracing-proc-macro", "serde", "sp-api", @@ -12787,25 +13406,24 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.22", + "syn 2.0.29", ] [[package]] name = "sc-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "async-trait", "futures", "futures-timer", "linked-hash-map", "log", - "num-traits", "parity-scale-codec", "parking_lot 0.12.1", "sc-client-api", @@ -12825,13 +13443,15 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "async-trait", "futures", "log", + "parity-scale-codec", "serde", "sp-blockchain", + "sp-core", "sp-runtime", "thiserror", ] @@ -12839,7 +13459,7 @@ dependencies = [ [[package]] name = "sc-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "async-channel", "futures", @@ -12916,9 +13536,9 @@ dependencies = [ [[package]] name = "scale-info" -version = "2.8.0" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad560913365790f17cbf12479491169f01b9d46d29cfc7422bf8c64bdc61b731" +checksum = "35c0a159d0c45c12b20c5a844feb1fe4bea86e28f17b92a5f0c42193634d3782" dependencies = [ "bitvec", "cfg-if", @@ -12930,9 +13550,9 @@ dependencies = [ [[package]] name = "scale-info-derive" -version = "2.8.0" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19df9bd9ace6cc2fe19387c96ce677e823e07d017ceed253e7bb3d1d1bd9c73b" +checksum = "912e55f6d20e0e80d63733872b40e1227c0bce1e1ab81ba67d696339bfd7fd29" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -12942,11 +13562,11 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.21" +version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "713cfb06c7059f3588fb8044c0fad1d09e3c01d225e25b9220dbfdcf16dbb1b3" +checksum = "0c3733bf4cf7ea0880754e19cb5a462007c4a8c1914bff372ccc95b464f1df88" dependencies = [ - "windows-sys 0.42.0", + "windows-sys 0.48.0", ] [[package]] @@ -12980,15 +13600,15 @@ dependencies = [ [[package]] name = "scopeguard" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "scratch" -version = "1.0.5" +version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1792db035ce95be60c3f8853017b3999209281c24e2ba5bc8e59bf97a0c590c1" +checksum = "a3cf7c11c38cb994f3d40e8a8cde3bbd1f72a435e4c49e85d6553d8312306152" [[package]] name = "sct" @@ -13038,12 +13658,12 @@ dependencies = [ [[package]] name = "sec1" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0aec48e813d6b90b15f0b8948af3c63483992dee44c03e9930b3eebdabe046e" +checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" dependencies = [ "base16ct 0.2.0", - "der 0.7.6", + "der 0.7.8", "generic-array 0.14.7", "pkcs8 0.10.2", "subtle", @@ -13133,11 +13753,11 @@ dependencies = [ [[package]] name = "security-framework" -version = "2.9.1" +version = "2.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fc758eb7bffce5b308734e9b0c1468893cae9ff70ebf13e7090be8dcbcc83a8" +checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de" dependencies = [ - "bitflags", + "bitflags 1.3.2", "core-foundation", "core-foundation-sys", "libc", @@ -13146,9 +13766,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.9.0" +version = "2.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f51d0c0d83bec45f16480d0ce0058397a69e48fcdc52d1dc8855fb68acbd31a7" +checksum = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a" dependencies = [ "core-foundation-sys", "libc", @@ -13165,9 +13785,9 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.17" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bebd363326d05ec3e2f532ab7660680f3b02130d780c299bca73469d521bc0ed" +checksum = "b0293b4b29daaf487284529cc2f5675b8e57c61f70167ba415a463651fd6a918" dependencies = [ "serde", ] @@ -13180,29 +13800,29 @@ checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" [[package]] name = "serde" -version = "1.0.164" +version = "1.0.186" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e8c8cf938e98f769bc164923b06dce91cea1751522f46f8466461af04c9027d" +checksum = "9f5db24220c009de9bd45e69fb2938f4b6d2df856aa9304ce377b3180f83b7c1" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.164" +version = "1.0.186" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9735b638ccc51c28bf6914d90a2e9725b377144fc612c49a611fddd1b631d68" +checksum = "5ad697f7e0b65af4983a4ce8f56ed5b357e8d3c36651bf6a7e13639c17b8e670" dependencies = [ "proc-macro2", "quote", - "syn 2.0.22", + "syn 2.0.29", ] [[package]] name = "serde_json" -version = "1.0.99" +version = "1.0.105" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46266871c240a00b8f503b877622fe33430b3c7d963bdc0f2adc511e54a1eae3" +checksum = "693151e1ac27563d6dbcec9dee9fbd5da8539b20fa14ad3752b2e6d363ace360" dependencies = [ "itoa", "ryu", @@ -13347,15 +13967,15 @@ dependencies = [ [[package]] name = "siphasher" -version = "0.3.10" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7bd3e3206899af3f8b12af284fafc038cc1dc2b41d1b89dd17297221c5d225de" +checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" [[package]] name = "slab" -version = "0.4.8" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6528351c9bc8ab22353f9d776db39a20288e8d6c37ef8cfe3317cf875eecfc2d" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" dependencies = [ "autocfg 1.1.0", ] @@ -13368,8 +13988,8 @@ checksum = "826167069c09b99d56f31e9ae5c99049e932a98c9dc2dac47645b08dbbf76ba7" [[package]] name = "slot-range-helper" -version = "0.9.42" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech//polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "enumn", "parity-scale-codec", @@ -13389,9 +14009,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.10.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" +checksum = "62bb4feee49fdd9f707ef802e22365a35de4b7b299de4763d44bfea899442ff9" [[package]] name = "snap" @@ -13401,14 +14021,14 @@ checksum = "5e9f0ab6ef7eb7353d9119c170a436d1bf248eea575ac42d19d12f4e34130831" [[package]] name = "snow" -version = "0.9.2" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ccba027ba85743e09d15c03296797cad56395089b832b48b5a5217880f57733" +checksum = "0c9d1425eb528a21de2755c75af4c9b5d57f50a0d4c3b7f1828a4cd03f8ba155" dependencies = [ "aes-gcm 0.9.4", "blake2", "chacha20poly1305", - "curve25519-dalek 4.0.0-rc.1", + "curve25519-dalek 4.0.0", "rand_core 0.6.4", "ring", "rustc_version", @@ -13456,7 +14076,7 @@ dependencies = [ [[package]] name = "sp-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "hash-db 0.16.0", "log", @@ -13464,6 +14084,7 @@ dependencies = [ "scale-info", "sp-api-proc-macro", "sp-core", + "sp-externalities", "sp-metadata-ir", "sp-runtime", "sp-state-machine", @@ -13476,21 +14097,21 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "Inflector", "blake2", - "expander 1.0.0", + "expander 2.0.0", "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.22", + "syn 2.0.29", ] [[package]] name = "sp-application-crypto" -version = "7.0.0" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +version = "23.0.0" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "parity-scale-codec", "scale-info", @@ -13502,8 +14123,8 @@ dependencies = [ [[package]] name = "sp-arithmetic" -version = "6.0.0" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +version = "16.0.0" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "integer-sqrt", "num-traits", @@ -13517,7 +14138,7 @@ dependencies = [ [[package]] name = "sp-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "parity-scale-codec", "scale-info", @@ -13530,9 +14151,8 @@ dependencies = [ [[package]] name = "sp-block-builder" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ - "parity-scale-codec", "sp-api", "sp-inherents", "sp-runtime", @@ -13542,16 +14162,16 @@ dependencies = [ [[package]] name = "sp-blockchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "futures", "log", - "lru 0.8.1", "parity-scale-codec", "parking_lot 0.12.1", + "schnellru", "sp-api", "sp-consensus", - "sp-database 4.0.0-dev (git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42)", + "sp-database", "sp-runtime", "sp-state-machine", "thiserror", @@ -13560,7 +14180,7 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "async-trait", "futures", @@ -13575,14 +14195,13 @@ dependencies = [ [[package]] name = "sp-consensus-aura" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "async-trait", "parity-scale-codec", "scale-info", "sp-api", "sp-application-crypto", - "sp-consensus", "sp-consensus-slots", "sp-inherents", "sp-runtime", @@ -13593,7 +14212,7 @@ dependencies = [ [[package]] name = "sp-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "async-trait", "parity-scale-codec", @@ -13601,11 +14220,9 @@ dependencies = [ "serde", "sp-api", "sp-application-crypto", - "sp-consensus", "sp-consensus-slots", "sp-core", "sp-inherents", - "sp-keystore", "sp-runtime", "sp-std", "sp-timestamp", @@ -13614,7 +14231,7 @@ dependencies = [ [[package]] name = "sp-consensus-beefy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "lazy_static", "parity-scale-codec", @@ -13633,7 +14250,7 @@ dependencies = [ [[package]] name = "sp-consensus-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "finality-grandpa", "log", @@ -13651,7 +14268,7 @@ dependencies = [ [[package]] name = "sp-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "parity-scale-codec", "scale-info", @@ -13662,11 +14279,11 @@ dependencies = [ [[package]] name = "sp-core" -version = "7.0.0" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +version = "21.0.0" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ - "array-bytes 4.2.0", - "bitflags", + "array-bytes", + "bitflags 1.3.2", "blake2", "bounded-collections", "bs58", @@ -13701,47 +14318,37 @@ dependencies = [ "substrate-bip39", "thiserror", "tiny-bip39", + "tracing", "zeroize", ] [[package]] name = "sp-core-hashing" -version = "5.0.0" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +version = "9.0.0" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "blake2b_simd", "byteorder", "digest 0.10.7", "sha2 0.10.7", "sha3", - "sp-std", "twox-hash", ] [[package]] name = "sp-core-hashing-proc-macro" -version = "5.0.0" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +version = "9.0.0" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ - "proc-macro2", "quote", "sp-core-hashing", - "syn 2.0.22", -] - -[[package]] -name = "sp-database" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" -dependencies = [ - "kvdb", - "parking_lot 0.12.1", + "syn 2.0.29", ] [[package]] name = "sp-database" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "kvdb", "parking_lot 0.12.1", @@ -13749,18 +14356,18 @@ dependencies = [ [[package]] name = "sp-debug-derive" -version = "5.0.0" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +version = "8.0.0" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.22", + "syn 2.0.29", ] [[package]] name = "sp-externalities" -version = "0.13.0" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +version = "0.19.0" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "environmental", "parity-scale-codec", @@ -13771,13 +14378,12 @@ dependencies = [ [[package]] name = "sp-inherents" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "async-trait", "impl-trait-for-tuples", "parity-scale-codec", "scale-info", - "sp-core", "sp-runtime", "sp-std", "thiserror", @@ -13785,13 +14391,12 @@ dependencies = [ [[package]] name = "sp-io" -version = "7.0.0" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +version = "23.0.0" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "bytes", - "ed25519", - "ed25519-dalek", - "futures", + "ed25519 1.5.3", + "ed25519-dalek 1.0.1", "libsecp256k1 0.7.1", "log", "parity-scale-codec", @@ -13811,8 +14416,8 @@ dependencies = [ [[package]] name = "sp-keyring" -version = "7.0.0" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +version = "24.0.0" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "lazy_static", "sp-core", @@ -13822,13 +14427,11 @@ dependencies = [ [[package]] name = "sp-keystore" -version = "0.13.0" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +version = "0.27.0" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ - "futures", "parity-scale-codec", "parking_lot 0.12.1", - "serde", "sp-core", "sp-externalities", "thiserror", @@ -13837,16 +14440,16 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" version = "4.1.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "thiserror", - "zstd 0.12.3+zstd.1.5.2", + "zstd 0.12.4", ] [[package]] name = "sp-metadata-ir" version = "0.1.0" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-metadata", "parity-scale-codec", @@ -13857,7 +14460,7 @@ dependencies = [ [[package]] name = "sp-mmr-primitives" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "ckb-merkle-mountain-range", "log", @@ -13875,7 +14478,7 @@ dependencies = [ [[package]] name = "sp-npos-elections" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "parity-scale-codec", "scale-info", @@ -13889,7 +14492,7 @@ dependencies = [ [[package]] name = "sp-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "sp-api", "sp-core", @@ -13898,8 +14501,8 @@ dependencies = [ [[package]] name = "sp-panic-handler" -version = "5.0.0" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +version = "8.0.0" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "backtrace", "lazy_static", @@ -13909,7 +14512,7 @@ dependencies = [ [[package]] name = "sp-rpc" version = "6.0.0" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "rustc-hash", "serde", @@ -13918,8 +14521,8 @@ dependencies = [ [[package]] name = "sp-runtime" -version = "7.0.0" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +version = "24.0.0" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "either", "hash256-std-hasher", @@ -13940,8 +14543,8 @@ dependencies = [ [[package]] name = "sp-runtime-interface" -version = "7.0.0" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +version = "17.0.0" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "bytes", "impl-trait-for-tuples", @@ -13958,25 +14561,26 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" -version = "6.0.0" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +version = "11.0.0" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "Inflector", "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.22", + "syn 2.0.29", ] [[package]] name = "sp-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "parity-scale-codec", "scale-info", "sp-api", "sp-core", + "sp-keystore", "sp-runtime", "sp-staking", "sp-std", @@ -13985,8 +14589,9 @@ dependencies = [ [[package]] name = "sp-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ + "impl-trait-for-tuples", "parity-scale-codec", "scale-info", "serde", @@ -13997,8 +14602,8 @@ dependencies = [ [[package]] name = "sp-state-machine" -version = "0.13.0" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +version = "0.28.0" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "hash-db 0.16.0", "log", @@ -14013,17 +14618,35 @@ dependencies = [ "sp-trie", "thiserror", "tracing", + "trie-db", +] + +[[package]] +name = "sp-statement-store" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +dependencies = [ + "parity-scale-codec", + "scale-info", + "sp-api", + "sp-application-crypto", + "sp-core", + "sp-externalities", + "sp-runtime", + "sp-runtime-interface", + "sp-std", + "thiserror", ] [[package]] name = "sp-std" -version = "5.0.0" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +version = "8.0.0" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" [[package]] name = "sp-storage" -version = "7.0.0" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +version = "13.0.0" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "impl-serde 0.4.0", "parity-scale-codec", @@ -14036,11 +14659,9 @@ dependencies = [ [[package]] name = "sp-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "async-trait", - "futures-timer", - "log", "parity-scale-codec", "sp-inherents", "sp-runtime", @@ -14050,8 +14671,8 @@ dependencies = [ [[package]] name = "sp-tracing" -version = "6.0.0" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +version = "10.0.0" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "parity-scale-codec", "sp-std", @@ -14063,7 +14684,7 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "sp-api", "sp-runtime", @@ -14072,10 +14693,9 @@ dependencies = [ [[package]] name = "sp-transaction-storage-proof" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "async-trait", - "log", "parity-scale-codec", "scale-info", "sp-core", @@ -14087,8 +14707,8 @@ dependencies = [ [[package]] name = "sp-trie" -version = "7.0.0" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +version = "22.0.0" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "ahash 0.8.3", "hash-db 0.16.0", @@ -14110,8 +14730,8 @@ dependencies = [ [[package]] name = "sp-version" -version = "5.0.0" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +version = "22.0.0" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "impl-serde 0.4.0", "parity-scale-codec", @@ -14127,33 +14747,32 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +version = "8.0.0" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "parity-scale-codec", "proc-macro2", "quote", - "syn 2.0.22", + "syn 2.0.29", ] [[package]] name = "sp-wasm-interface" -version = "7.0.0" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +version = "14.0.0" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "anyhow", "impl-trait-for-tuples", "log", "parity-scale-codec", "sp-std", - "wasmi 0.13.2", "wasmtime", ] [[package]] name = "sp-weights" -version = "4.0.0" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +version = "20.0.0" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "parity-scale-codec", "scale-info", @@ -14214,7 +14833,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d1e996ef02c474957d681f1b05213dfb0abab947b446a62d37770b23500184a" dependencies = [ "base64ct", - "der 0.7.6", + "der 0.7.8", ] [[package]] @@ -14340,9 +14959,9 @@ dependencies = [ [[package]] name = "ss58-registry" -version = "1.40.0" +version = "1.43.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb47a8ad42e5fc72d5b1eb104a5546937eaf39843499948bb666d6e93c62423b" +checksum = "5e6915280e2d0db8911e5032a5c275571af6bdded2916abd691a659be25d3439" dependencies = [ "Inflector", "num-format", @@ -14407,7 +15026,7 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a2a1c578e98c1c16fc3b8ec1328f7659a500737d7a0c6d625e73e830ff9c1f6" dependencies = [ - "bitflags", + "bitflags 1.3.2", "cfg_aliases", "libc", "parking_lot 0.11.2", @@ -14505,15 +15124,12 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" version = "3.0.0" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" -dependencies = [ - "platforms 2.0.0", -] +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" [[package]] name = "substrate-frame-rpc-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "frame-system-rpc-runtime-api", "futures", @@ -14532,7 +15148,7 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "hyper", "log", @@ -14544,7 +15160,7 @@ dependencies = [ [[package]] name = "substrate-rpc-client" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "async-trait", "jsonrpsee", @@ -14557,14 +15173,12 @@ dependencies = [ [[package]] name = "substrate-state-trie-migration-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "jsonrpsee", - "log", "parity-scale-codec", "sc-client-api", "sc-rpc-api", - "scale-info", "serde", "sp-core", "sp-runtime", @@ -14573,19 +15187,46 @@ dependencies = [ "trie-db", ] +[[package]] +name = "substrate-test-client" +version = "2.0.1" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" +dependencies = [ + "array-bytes", + "async-trait", + "futures", + "parity-scale-codec", + "sc-client-api", + "sc-client-db", + "sc-consensus", + "sc-executor", + "sc-offchain", + "sc-service", + "serde", + "serde_json", + "sp-blockchain", + "sp-consensus", + "sp-core", + "sp-keyring", + "sp-keystore", + "sp-runtime", + "sp-state-machine", +] + [[package]] name = "substrate-wasm-builder" version = "5.0.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "ansi_term", "build-helper", "cargo_metadata", "filetime", + "parity-wasm", "sp-maybe-compressed-blob", "strum", "tempfile", - "toml 0.7.5", + "toml 0.7.6", "walkdir", "wasm-opt", ] @@ -14639,9 +15280,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.22" +version = "2.0.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2efbeae7acf4eabd6bcdcbd11c92f45231ddda7539edc7806bd1a04a03b24616" +checksum = "c324c494eba9d92503e6f1ef2e6df781e78f6a7705a0202d9801b198807d518a" dependencies = [ "proc-macro2", "quote", @@ -14666,7 +15307,7 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" dependencies = [ - "bitflags", + "bitflags 1.3.2", "core-foundation", "system-configuration-sys", ] @@ -14689,21 +15330,20 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "target-lexicon" -version = "0.12.8" +version = "0.12.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b1c7f239eb94671427157bd93b3694320f3668d4e1eff08c7285366fd777fac" +checksum = "9d0e916b1148c8e263850e1ebcbd046f333e0683c724876bb0da63ea4373dc8a" [[package]] name = "tempfile" -version = "3.6.0" +version = "3.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31c0432476357e58790aaa47a8efb0c5138f137343f3b5f23bd36a27e3b0a6d6" +checksum = "cb94d2f3cc536af71caac6b6fcebf65860b347e7ce0cc9ebe8f70d3e521054ef" dependencies = [ - "autocfg 1.1.0", "cfg-if", - "fastrand", + "fastrand 2.0.0", "redox_syscall 0.3.5", - "rustix 0.37.20", + "rustix 0.38.8", "windows-sys 0.48.0", ] @@ -14722,24 +15362,38 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" +[[package]] +name = "test-runtime-constants" +version = "1.0.0" +source = "git+https://github.com/paritytech//polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" +dependencies = [ + "frame-support", + "polkadot-primitives", + "polkadot-runtime-common", + "smallvec", + "sp-core", + "sp-runtime", + "sp-weights", +] + [[package]] name = "thiserror" -version = "1.0.40" +version = "1.0.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac" +checksum = "97a802ec30afc17eee47b2855fc72e0c4cd62be9b4efe6591edde0ec5bd68d8f" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.40" +version = "1.0.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" +checksum = "6bb623b56e39ab7dcd4b1b98bb6c8f8d907ed255b18de254088016b27a8ee19b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.22", + "syn 2.0.29", ] [[package]] @@ -14782,9 +15436,9 @@ dependencies = [ [[package]] name = "tikv-jemalloc-ctl" -version = "0.5.0" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e37706572f4b151dff7a0146e040804e9c26fe3a3118591112f05cf12a4216c1" +checksum = "619bfed27d807b54f7f776b9430d4f8060e66ee138a28632ca898584d462c31c" dependencies = [ "libc", "paste", @@ -14793,9 +15447,9 @@ dependencies = [ [[package]] name = "tikv-jemalloc-sys" -version = "0.5.3+5.3.0-patched" +version = "0.5.4+5.3.0-patched" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a678df20055b43e57ef8cddde41cdfda9a3c1a060b67f4c5836dfb1d78543ba8" +checksum = "9402443cb8fd499b6f327e40565234ff34dbda27460c5b47db0db77443dd85d1" dependencies = [ "cc", "libc", @@ -14814,10 +15468,11 @@ dependencies = [ [[package]] name = "time" -version = "0.3.22" +version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea9e1b3cf1243ae005d9e74085d4d542f3125458f3a81af210d901dcd7411efd" +checksum = "0bb39ee79a6d8de55f48f2293a830e040392f1c5f16e336bdd1788cd0aadce07" dependencies = [ + "deranged", "itoa", "serde", "time-core", @@ -14832,9 +15487,9 @@ checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb" [[package]] name = "time-macros" -version = "0.2.9" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "372950940a5f07bf38dbe211d7283c9e6d7327df53794992d293e534c733d09b" +checksum = "733d258752e9303d392b94b75230d07b0b9c489350c69b851fc6c065fde3e8f9" dependencies = [ "time-core", ] @@ -14894,20 +15549,19 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.29.0" +version = "1.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "374442f06ee49c3a28a8fc9f01a2596fed7559c6b99b31279c3261778e77d84f" +checksum = "17ed6077ed6cd6c74735e21f37eb16dc3935f96878b1fe961074089cc80893f9" dependencies = [ - "autocfg 1.1.0", "backtrace", "bytes", "libc", "mio", "num_cpus", "parking_lot 0.12.1", - "pin-project-lite 0.2.9", + "pin-project-lite 0.2.12", "signal-hook-registry", - "socket2 0.4.9", + "socket2 0.5.3", "tokio-macros", "windows-sys 0.48.0", ] @@ -14920,18 +15574,28 @@ checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.22", + "syn 2.0.29", +] + +[[package]] +name = "tokio-retry" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f57eb36ecbe0fc510036adff84824dd3c24bb781e21bfa67b69d556aa85214f" +dependencies = [ + "pin-project", + "rand 0.8.5", + "tokio", ] [[package]] name = "tokio-rustls" -version = "0.23.4" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c43ee83903113e03984cb9e5cebe6c04a5116269e900e3ddba8f068a62adda59" +checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" dependencies = [ - "rustls 0.20.8", + "rustls 0.21.6", "tokio", - "webpki 0.22.0", ] [[package]] @@ -14941,7 +15605,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842" dependencies = [ "futures-core", - "pin-project-lite 0.2.9", + "pin-project-lite 0.2.12", "tokio", "tokio-util", ] @@ -14956,7 +15620,7 @@ dependencies = [ "futures-core", "futures-io", "futures-sink", - "pin-project-lite 0.2.9", + "pin-project-lite 0.2.12", "tokio", "tracing", ] @@ -14972,9 +15636,9 @@ dependencies = [ [[package]] name = "toml" -version = "0.7.5" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ebafdf5ad1220cb59e7d17cf4d2c72015297b75b19a10472f99b89225089240" +checksum = "c17e963a819c331dcacd7ab957d80bc2b9a9c1e71c804826d2f283dd65306542" dependencies = [ "serde", "serde_spanned", @@ -14993,9 +15657,9 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.19.11" +version = "0.19.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "266f016b7f039eec8a1a80dfe6156b633d208b9fccca5e4db1d6775b0c4e34a7" +checksum = "f8123f27e969974a3dfba720fdb560be359f57b44302d280ba72e76a74480e8a" dependencies = [ "indexmap 2.0.0", "serde", @@ -15017,18 +15681,18 @@ dependencies = [ [[package]] name = "tower-http" -version = "0.3.5" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f873044bf02dd1e8239e9c1293ea39dad76dc594ec16185d0a1bf31d8dc8d858" +checksum = "55ae70283aba8d2a8b411c695c437fe25b8b5e44e23e780662002fc72fb47a82" dependencies = [ - "bitflags", + "bitflags 2.4.0", "bytes", "futures-core", "futures-util", "http", "http-body", "http-range-header", - "pin-project-lite 0.2.9", + "pin-project-lite 0.2.12", "tower-layer", "tower-service", ] @@ -15053,7 +15717,7 @@ checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" dependencies = [ "cfg-if", "log", - "pin-project-lite 0.2.9", + "pin-project-lite 0.2.12", "tracing-attributes", "tracing-core", ] @@ -15066,7 +15730,7 @@ checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" dependencies = [ "proc-macro2", "quote", - "syn 2.0.22", + "syn 2.0.29", ] [[package]] @@ -15091,8 +15755,8 @@ dependencies = [ [[package]] name = "tracing-gum" -version = "0.9.42" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech//polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "polkadot-node-jaeger", "polkadot-primitives", @@ -15102,14 +15766,14 @@ dependencies = [ [[package]] name = "tracing-gum-proc-macro" -version = "0.9.42" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech//polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "expander 2.0.0", "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.22", + "syn 2.0.29", ] [[package]] @@ -15263,7 +15927,7 @@ checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" [[package]] name = "try-runtime-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech//substrate?branch=polkadot-v0.9.42#ff24c60ac7d9f87727ecdd0ded9a80c56e4f4b65" +source = "git+https://github.com/paritytech//substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" dependencies = [ "async-trait", "clap", @@ -15274,7 +15938,6 @@ dependencies = [ "parity-scale-codec", "sc-cli", "sc-executor", - "sc-service", "serde", "serde_json", "sp-api", @@ -15294,7 +15957,7 @@ dependencies = [ "sp-version", "sp-weights", "substrate-rpc-client", - "zstd 0.12.3+zstd.1.5.2", + "zstd 0.12.4", ] [[package]] @@ -15360,9 +16023,9 @@ checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" [[package]] name = "ucd-trie" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e79c4d996edb816c91e4308506774452e55e95c3c9de07b6729e17e15a5ef81" +checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9" [[package]] name = "uint" @@ -15390,9 +16053,9 @@ checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" [[package]] name = "unicode-ident" -version = "1.0.9" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b15811caf2415fb889178633e7724bad2509101cde276048e013b9def5e51fa0" +checksum = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c" [[package]] name = "unicode-normalization" @@ -15484,9 +16147,9 @@ checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" [[package]] name = "uuid" -version = "1.4.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d023da39d1fde5a8a3fe1f3e01ca9632ada0a63e9797de55a879d6e2236277be" +checksum = "79daa5ed5740825c40b389c5e50312b9c86df53fccd33f281df655642b43869d" dependencies = [ "getrandom 0.2.10", ] @@ -15667,7 +16330,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.22", + "syn 2.0.29", "wasm-bindgen-shared", ] @@ -15701,7 +16364,7 @@ checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.22", + "syn 2.0.29", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -15732,9 +16395,9 @@ dependencies = [ [[package]] name = "wasm-opt" -version = "0.111.0" +version = "0.112.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84a303793cbc01fb96551badfc7367db6007396bba6bac97936b3c8b6f7fdb41" +checksum = "87fef6d0d508f08334e0ab0e6877feb4c0ecb3956bcf2cb950699b22fedf3e9c" dependencies = [ "anyhow", "libc", @@ -15748,9 +16411,9 @@ dependencies = [ [[package]] name = "wasm-opt-cxx-sys" -version = "0.111.0" +version = "0.112.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9c9deb56f8a9f2ec177b3bd642a8205621835944ed5da55f2388ef216aca5a4" +checksum = "bc816bbc1596c8f2e8127e137a760c798023ef3d378f2ae51f0f1840e2dfa445" dependencies = [ "anyhow", "cxx", @@ -15760,15 +16423,14 @@ dependencies = [ [[package]] name = "wasm-opt-sys" -version = "0.111.0" +version = "0.112.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4432e28b542738a9776cedf92e8a99d8991c7b4667ee2c7ccddfb479dd2856a7" +checksum = "40199e4f68ef1071b3c6d0bd8026a12b481865d4b9e49c156932ea9a6234dd14" dependencies = [ "anyhow", "cc", "cxx", "cxx-build", - "regex", ] [[package]] @@ -15788,56 +16450,24 @@ dependencies = [ [[package]] name = "wasmi" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06c326c93fbf86419608361a2c925a31754cf109da1b8b55737070b4d6669422" -dependencies = [ - "parity-wasm", - "wasmi-validation", - "wasmi_core 0.2.1", -] - -[[package]] -name = "wasmi" -version = "0.28.0" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e61a7006b0fdf24f6bbe8dcfdad5ca1b350de80061fb2827f31c82fbbb9565a" +checksum = "e51fb5c61993e71158abf5bb863df2674ca3ec39ed6471c64f07aeaf751d67b4" dependencies = [ + "intx", + "smallvec", "spin 0.9.8", "wasmi_arena", - "wasmi_core 0.12.0", + "wasmi_core", "wasmparser-nostd", ] -[[package]] -name = "wasmi-validation" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91ff416ad1ff0c42e5a926ed5d5fab74c0f098749aa0ad8b2a34b982ce0e867b" -dependencies = [ - "parity-wasm", -] - [[package]] name = "wasmi_arena" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "401c1f35e413fac1846d4843745589d9ec678977ab35a384db8ae7830525d468" -[[package]] -name = "wasmi_core" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57d20cb3c59b788653d99541c646c561c9dd26506f25c0cebfe810659c54c6d7" -dependencies = [ - "downcast-rs", - "libm 0.2.7", - "memory_units", - "num-rational", - "num-traits", - "region", -] - [[package]] name = "wasmi_core" version = "0.12.0" @@ -15845,16 +16475,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "624e6333e861ef49095d2d678b76ebf30b06bf37effca845be7e5b87c90071b7" dependencies = [ "downcast-rs", - "libm 0.2.7", + "libm", "num-traits", "paste", ] [[package]] name = "wasmparser" -version = "0.100.0" +version = "0.102.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64b20236ab624147dfbb62cf12a19aaf66af0e41b8398838b66e997d07d269d4" +checksum = "48134de3d7598219ab9eaf6b91b15d8e50d31da76b8519fe4ecfcec2cf35104b" dependencies = [ "indexmap 1.9.3", "url", @@ -15871,9 +16501,9 @@ dependencies = [ [[package]] name = "wasmtime" -version = "6.0.2" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76a222f5fa1e14b2cefc286f1b68494d7a965f4bf57ec04c59bb62673d639af6" +checksum = "f907fdead3153cb9bfb7a93bbd5b62629472dc06dee83605358c64c52ed3dda9" dependencies = [ "anyhow", "bincode", @@ -15881,7 +16511,7 @@ dependencies = [ "indexmap 1.9.3", "libc", "log", - "object 0.29.0", + "object 0.30.4", "once_cell", "paste", "psm", @@ -15894,43 +16524,43 @@ dependencies = [ "wasmtime-environ", "wasmtime-jit", "wasmtime-runtime", - "windows-sys 0.42.0", + "windows-sys 0.45.0", ] [[package]] name = "wasmtime-asm-macros" -version = "6.0.2" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4407a7246e7d2f3d8fb1cf0c72fda8dbafdb6dd34d555ae8bea0e5ae031089cc" +checksum = "d3b9daa7c14cd4fa3edbf69de994408d5f4b7b0959ac13fa69d465f6597f810d" dependencies = [ "cfg-if", ] [[package]] name = "wasmtime-cache" -version = "6.0.2" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ceb3adf61d654be0be67fffdce42447b0880481348785be5fe40b5dd7663a4c" +checksum = "c86437fa68626fe896e5afc69234bb2b5894949083586535f200385adfd71213" dependencies = [ "anyhow", - "base64 0.13.1", + "base64 0.21.2", "bincode", "directories-next", "file-per-thread-logger", "log", - "rustix 0.36.14", + "rustix 0.36.15", "serde", "sha2 0.10.7", "toml 0.5.11", - "windows-sys 0.42.0", + "windows-sys 0.45.0", "zstd 0.11.2+zstd.1.5.2", ] [[package]] name = "wasmtime-cranelift" -version = "6.0.2" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c366bb8647e01fd08cb5589976284b00abfded5529b33d7e7f3f086c68304a4" +checksum = "b1cefde0cce8cb700b1b21b6298a3837dba46521affd7b8c38a9ee2c869eee04" dependencies = [ "anyhow", "cranelift-codegen", @@ -15938,27 +16568,43 @@ dependencies = [ "cranelift-frontend", "cranelift-native", "cranelift-wasm", - "gimli 0.26.2", + "gimli 0.27.3", "log", - "object 0.29.0", + "object 0.30.4", "target-lexicon", "thiserror", "wasmparser", + "wasmtime-cranelift-shared", + "wasmtime-environ", +] + +[[package]] +name = "wasmtime-cranelift-shared" +version = "8.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd041e382ef5aea1b9fc78442394f1a4f6d676ce457e7076ca4cb3f397882f8b" +dependencies = [ + "anyhow", + "cranelift-codegen", + "cranelift-native", + "gimli 0.27.3", + "object 0.30.4", + "target-lexicon", "wasmtime-environ", ] [[package]] name = "wasmtime-environ" -version = "6.0.2" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47b8b50962eae38ee319f7b24900b7cf371f03eebdc17400c1dc8575fc10c9a7" +checksum = "a990198cee4197423045235bf89d3359e69bd2ea031005f4c2d901125955c949" dependencies = [ "anyhow", "cranelift-entity", - "gimli 0.26.2", + "gimli 0.27.3", "indexmap 1.9.3", "log", - "object 0.29.0", + "object 0.30.4", "serde", "target-lexicon", "thiserror", @@ -15968,18 +16614,18 @@ dependencies = [ [[package]] name = "wasmtime-jit" -version = "6.0.2" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffaed4f9a234ba5225d8e64eac7b4a5d13b994aeb37353cde2cbeb3febda9eaa" +checksum = "0de48df552cfca1c9b750002d3e07b45772dd033b0b206d5c0968496abf31244" dependencies = [ - "addr2line 0.17.0", + "addr2line 0.19.0", "anyhow", "bincode", "cfg-if", "cpp_demangle", - "gimli 0.26.2", + "gimli 0.27.3", "log", - "object 0.29.0", + "object 0.30.4", "rustc-demangle", "serde", "target-lexicon", @@ -15987,36 +16633,36 @@ dependencies = [ "wasmtime-jit-debug", "wasmtime-jit-icache-coherence", "wasmtime-runtime", - "windows-sys 0.42.0", + "windows-sys 0.45.0", ] [[package]] name = "wasmtime-jit-debug" -version = "6.0.2" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eed41cbcbf74ce3ff6f1d07d1b707888166dc408d1a880f651268f4f7c9194b2" +checksum = "6e0554b84c15a27d76281d06838aed94e13a77d7bf604bbbaf548aa20eb93846" dependencies = [ - "object 0.29.0", + "object 0.30.4", "once_cell", - "rustix 0.36.14", + "rustix 0.36.15", ] [[package]] name = "wasmtime-jit-icache-coherence" -version = "6.0.2" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a28ae1e648461bfdbb79db3efdaee1bca5b940872e4175390f465593a2e54c" +checksum = "aecae978b13f7f67efb23bd827373ace4578f2137ec110bbf6a4a7cde4121bbd" dependencies = [ "cfg-if", "libc", - "windows-sys 0.42.0", + "windows-sys 0.45.0", ] [[package]] name = "wasmtime-runtime" -version = "6.0.2" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e704b126e4252788ccfc3526d4d4511d4b23c521bf123e447ac726c14545217b" +checksum = "658cf6f325232b6760e202e5255d823da5e348fdea827eff0a2a22319000b441" dependencies = [ "anyhow", "cc", @@ -16026,21 +16672,21 @@ dependencies = [ "log", "mach", "memfd", - "memoffset 0.6.5", + "memoffset 0.8.0", "paste", "rand 0.8.5", - "rustix 0.36.14", + "rustix 0.36.15", "wasmtime-asm-macros", "wasmtime-environ", "wasmtime-jit-debug", - "windows-sys 0.42.0", + "windows-sys 0.45.0", ] [[package]] name = "wasmtime-types" -version = "6.0.2" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83e5572c5727c1ee7e8f28717aaa8400e4d22dcbd714ea5457d85b5005206568" +checksum = "a4f6fffd2a1011887d57f07654dd112791e872e3ff4a2e626aee8059ee17f06f" dependencies = [ "cranelift-entity", "serde", @@ -16087,6 +16733,21 @@ dependencies = [ "webpki 0.22.0", ] +[[package]] +name = "webpki-roots" +version = "0.23.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b03058f88386e5ff5310d9111d53f48b17d732b401aeb83a8d5190f2ac459338" +dependencies = [ + "rustls-webpki 0.100.2", +] + +[[package]] +name = "webpki-roots" +version = "0.25.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14247bb57be4f377dfb94c72830b8ce8fc6beac03cf4bf7b9732eadd414123fc" + [[package]] name = "webrtc" version = "0.6.0" @@ -16113,7 +16774,7 @@ dependencies = [ "sha2 0.10.7", "stun", "thiserror", - "time 0.3.22", + "time 0.3.27", "tokio", "turn", "url", @@ -16145,9 +16806,9 @@ dependencies = [ [[package]] name = "webrtc-dtls" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "942be5bd85f072c3128396f6e5a9bfb93ca8c1939ded735d177b7bcba9a13d05" +checksum = "c4a00f4242f2db33307347bd5be53263c52a0331c96c14292118c9a6bb48d267" dependencies = [ "aes 0.6.0", "aes-gcm 0.10.2", @@ -16162,12 +16823,11 @@ dependencies = [ "hkdf", "hmac 0.12.1", "log", - "oid-registry 0.6.1", "p256", "p384", "rand 0.8.5", "rand_core 0.6.4", - "rcgen 0.9.3", + "rcgen 0.10.0", "ring", "rustls 0.19.1", "sec1 0.3.0", @@ -16180,7 +16840,7 @@ dependencies = [ "tokio", "webpki 0.21.4", "webrtc-util", - "x25519-dalek 2.0.0-pre.1", + "x25519-dalek 2.0.0", "x509-parser 0.13.2", ] @@ -16282,7 +16942,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "93f1db1727772c05cf7a2cfece52c3aca8045ca1e176cd517d323489aa3c6d87" dependencies = [ "async-trait", - "bitflags", + "bitflags 1.3.2", "bytes", "cc", "ipnet", @@ -16298,8 +16958,8 @@ dependencies = [ [[package]] name = "westend-runtime" -version = "0.9.42" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech//polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "bitvec", "frame-benchmarking", @@ -16328,6 +16988,7 @@ dependencies = [ "pallet-im-online", "pallet-indices", "pallet-membership", + "pallet-message-queue", "pallet-multisig", "pallet-nomination-pools", "pallet-nomination-pools-benchmarking", @@ -16390,8 +17051,8 @@ dependencies = [ [[package]] name = "westend-runtime-constants" -version = "0.9.42" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech//polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "frame-support", "polkadot-primitives", @@ -16415,9 +17076,9 @@ dependencies = [ [[package]] name = "wide" -version = "0.7.10" +version = "0.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40018623e2dba2602a9790faba8d33f2ebdebf4b86561b83928db735f8784728" +checksum = "aa469ffa65ef7e0ba0f164183697b89b854253fd31aeb92358b7b6155177d62f" dependencies = [ "bytemuck", "safe_arch", @@ -16479,22 +17140,7 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" dependencies = [ - "windows-targets 0.48.0", -] - -[[package]] -name = "windows-sys" -version = "0.42.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" -dependencies = [ - "windows_aarch64_gnullvm 0.42.2", - "windows_aarch64_msvc 0.42.2", - "windows_i686_gnu 0.42.2", - "windows_i686_msvc 0.42.2", - "windows_x86_64_gnu 0.42.2", - "windows_x86_64_gnullvm 0.42.2", - "windows_x86_64_msvc 0.42.2", + "windows-targets 0.48.5", ] [[package]] @@ -16512,7 +17158,7 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ - "windows-targets 0.48.0", + "windows-targets 0.48.5", ] [[package]] @@ -16532,17 +17178,17 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" dependencies = [ - "windows_aarch64_gnullvm 0.48.0", - "windows_aarch64_msvc 0.48.0", - "windows_i686_gnu 0.48.0", - "windows_i686_msvc 0.48.0", - "windows_x86_64_gnu 0.48.0", - "windows_x86_64_gnullvm 0.48.0", - "windows_x86_64_msvc 0.48.0", + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", ] [[package]] @@ -16553,9 +17199,9 @@ checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_msvc" @@ -16571,9 +17217,9 @@ checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" [[package]] name = "windows_aarch64_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_i686_gnu" @@ -16589,9 +17235,9 @@ checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" [[package]] name = "windows_i686_gnu" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_msvc" @@ -16607,9 +17253,9 @@ checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" [[package]] name = "windows_i686_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_x86_64_gnu" @@ -16625,9 +17271,9 @@ checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" [[package]] name = "windows_x86_64_gnu" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnullvm" @@ -16637,9 +17283,9 @@ checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" [[package]] name = "windows_x86_64_gnullvm" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_msvc" @@ -16655,15 +17301,15 @@ checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" [[package]] name = "windows_x86_64_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "winnow" -version = "0.4.7" +version = "0.5.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca0ace3845f0d96209f0375e6d367e3eb87eb65d27d445bdc9f1843a26f39448" +checksum = "d09770118a7eb1ccaf4a594a221334119a44a814fcb0d31c5b85e83e97227a97" dependencies = [ "memchr", ] @@ -16700,12 +17346,13 @@ dependencies = [ [[package]] name = "x25519-dalek" -version = "2.0.0-pre.1" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5da623d8af10a62342bcbbb230e33e58a63255a58012f8653c578e54bab48df" +checksum = "fb66477291e7e8d2b0ff1bcb900bf29489a9692816d79874bea351e7a8b6de96" dependencies = [ - "curve25519-dalek 3.2.0", + "curve25519-dalek 4.0.0", "rand_core 0.6.4", + "serde", "zeroize", ] @@ -16725,7 +17372,7 @@ dependencies = [ "ring", "rusticata-macros", "thiserror", - "time 0.3.22", + "time 0.3.27", ] [[package]] @@ -16743,13 +17390,13 @@ dependencies = [ "oid-registry 0.6.1", "rusticata-macros", "thiserror", - "time 0.3.22", + "time 0.3.27", ] [[package]] name = "xcm" -version = "0.9.42" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech//polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "bounded-collections", "derivative", @@ -16764,8 +17411,8 @@ dependencies = [ [[package]] name = "xcm-builder" -version = "0.9.42" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech//polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "frame-support", "frame-system", @@ -16779,6 +17426,7 @@ dependencies = [ "sp-io", "sp-runtime", "sp-std", + "sp-weights", "xcm", "xcm-executor", ] @@ -16786,33 +17434,40 @@ dependencies = [ [[package]] name = "xcm-emulator" version = "0.1.0" -source = "git+https://github.com/shaunxw/xcm-simulator?rev=d011e5ca62b93e8f688c2042c1f92cdbafc5d1d0#d011e5ca62b93e8f688c2042c1f92cdbafc5d1d0" +source = "git+https://github.com/paritytech//cumulus?branch=polkadot-v1.0.0#0d17cf6bef320f156f2859d6d2b0abd4154ae1d5" dependencies = [ + "casey", "cumulus-pallet-dmp-queue", "cumulus-pallet-parachain-system", "cumulus-pallet-xcmp-queue", "cumulus-primitives-core", "cumulus-primitives-parachain-inherent", "cumulus-test-relay-sproof-builder", + "cumulus-test-service", "frame-support", "frame-system", + "log", + "pallet-balances", + "pallet-message-queue", "parachain-info", + "parachains-common", "parity-scale-codec", "paste", "polkadot-primitives", "polkadot-runtime-parachains", "quote", "sp-arithmetic", + "sp-core", "sp-io", "sp-std", + "sp-trie", "xcm", - "xcm-executor", ] [[package]] name = "xcm-executor" -version = "0.9.42" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech//polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "environmental", "frame-benchmarking", @@ -16831,19 +17486,19 @@ dependencies = [ [[package]] name = "xcm-procedural" -version = "0.9.42" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech//polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "Inflector", "proc-macro2", "quote", - "syn 2.0.22", + "syn 2.0.29", ] [[package]] name = "xcm-simulator" -version = "0.9.42" -source = "git+https://github.com/paritytech//polkadot?branch=release-v0.9.42#6f991987c0b4cbbd7d4badc9ef08d83da5fefbfd" +version = "1.0.0" +source = "git+https://github.com/paritytech//polkadot?branch=release-v1.0.0#c9ec8c5a15959ce711bb60aa79add58f560d61e9" dependencies = [ "frame-support", "parity-scale-codec", @@ -16854,6 +17509,7 @@ dependencies = [ "sp-io", "sp-std", "xcm", + "xcm-builder", "xcm-executor", ] @@ -16877,7 +17533,7 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e17bb3549cc1321ae1296b9cdc2698e2b6cb1992adfa19a8c72e5b7a738f44cd" dependencies = [ - "time 0.3.22", + "time 0.3.27", ] [[package]] @@ -16897,7 +17553,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.22", + "syn 2.0.29", ] [[package]] @@ -16911,11 +17567,11 @@ dependencies = [ [[package]] name = "zstd" -version = "0.12.3+zstd.1.5.2" +version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76eea132fb024e0e13fd9c2f5d5d595d8a967aa72382ac2f9d39fcc95afd0806" +checksum = "1a27595e173641171fc74a1232b7b1c7a7cb6e18222c11e9dfb9888fa424c53c" dependencies = [ - "zstd-safe 6.0.5+zstd.1.5.4", + "zstd-safe 6.0.6", ] [[package]] @@ -16930,9 +17586,9 @@ dependencies = [ [[package]] name = "zstd-safe" -version = "6.0.5+zstd.1.5.4" +version = "6.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d56d9e60b4b1758206c238a10165fbcae3ca37b01744e394c463463f6529d23b" +checksum = "ee98ffd0b48ee95e6c5168188e44a54550b1564d9d530ee21d5f0eaed1069581" dependencies = [ "libc", "zstd-sys", diff --git a/Cargo.toml b/Cargo.toml index 8d79b83b4d..32c9e02ea0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,260 +20,272 @@ incremental = false [profile.release] incremental = false - [patch."https://github.com/paritytech/substrate"] -frame-benchmarking = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -frame-benchmarking-cli = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -frame-election-provider-support = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -frame-executive = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -frame-support = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -frame-support-procedural = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -frame-support-procedural-tools = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -frame-support-procedural-tools-derive = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -frame-system = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -frame-system-benchmarking = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -frame-system-rpc-runtime-api = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -frame-try-runtime = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -pallet-aura = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -pallet-authority-discovery = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -pallet-authorship = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -pallet-babe = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -pallet-balances = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -pallet-bounties = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -pallet-collective = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -pallet-democracy = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -pallet-election-provider-multi-phase = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -pallet-elections-phragmen = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -pallet-grandpa = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -pallet-identity = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -pallet-im-online = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -pallet-indices = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -pallet-membership = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -pallet-mmr = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -mmr-rpc = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -pallet-nis = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -pallet-state-trie-migration = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -pallet-multisig = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -pallet-offences = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -pallet-offences-benchmarking = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -pallet-proxy = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -pallet-recovery = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -pallet-scheduler = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -pallet-session = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -pallet-session-benchmarking = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -pallet-society = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -pallet-staking = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -pallet-staking-reward-curve = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -pallet-staking-reward-fn = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -pallet-sudo = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -pallet-timestamp = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -pallet-tips = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -pallet-transaction-payment = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -pallet-transaction-payment-rpc = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -pallet-treasury = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -pallet-utility = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -pallet-vesting = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -sc-authority-discovery = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -sc-basic-authorship = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -sc-block-builder = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -sc-chain-spec = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -sc-cli = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -sc-client-api = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -sc-client-db = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -sc-consensus = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -sc-consensus-aura = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -sc-consensus-babe = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -sc-consensus-babe-rpc = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -sc-consensus-epochs = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -sc-consensus-slots = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -sc-executor = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -sc-executor-common = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -sc-executor-wasmtime = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -sc-informant = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -sc-keystore = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -sc-network = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -sc-network-gossip = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -sc-network-common = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -sc-offchain = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -sc-peerset = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -sc-rpc = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -sc-rpc-api = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -sc-rpc-server = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -sc-service = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -sc-sync-state-rpc = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -sc-telemetry = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -sc-tracing = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -sc-transaction-pool = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -sc-transaction-pool-api = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -sc-utils = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -sp-api = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -sp-application-crypto = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -sp-arithmetic = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -sp-authority-discovery = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -sp-block-builder = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -sp-blockchain = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -sp-consensus = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -sp-consensus-aura = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -sp-consensus-babe = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -sp-consensus-slots = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -sp-core = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -sp-debug-derive = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -sp-externalities = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -sp-inherents = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -sp-io = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -sp-keyring = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -sp-keystore = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -sp-maybe-compressed-blob = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -sp-mmr-primitives = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -sp-npos-elections = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -sp-offchain = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -sp-rpc = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -sp-runtime = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -sp-runtime-interface = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -sp-runtime-interface-proc-macro = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -sp-session = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -sp-staking = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -sp-state-machine = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -sp-std = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -sp-storage = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -sp-timestamp = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -sp-tracing = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -sp-transaction-pool = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -sp-trie = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -sp-version = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -sp-wasm-interface = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -sp-weights = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -substrate-build-script-utils = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -substrate-frame-rpc-system = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -substrate-prometheus-endpoint = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -substrate-wasm-builder = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -try-runtime-cli = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -sc-consensus-manual-seal = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -sc-sysinfo = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -substrate-state-trie-migration-rpc = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -pallet-bags-list = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -pallet-beefy = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -pallet-beefy-mmr = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -pallet-child-bounties = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -pallet-election-provider-support-benchmarking = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -pallet-nomination-pools = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -pallet-nomination-pools-benchmarking = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -pallet-nomination-pools-runtime-api = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -pallet-preimage = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -pallet-conviction-voting = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -pallet-fast-unstake = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -pallet-ranked-collective = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -pallet-referenda = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -pallet-whitelist = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -sc-network-light = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -sc-network-sync = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -fork-tree = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -mmr-gadget = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -sc-storage-monitor = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -binary-merkle-tree = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -pallet-staking-runtime-api = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -sc-consensus-beefy = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -sc-consensus-beefy-rpc = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -sc-consensus-grandpa = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -sc-consensus-grandpa-rpc = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -sc-network-transactions = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -sp-consensus-beefy = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -sp-consensus-grandpa = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -pallet-contracts = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } -pallet-contracts-primitives = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v0.9.42" } +binary-merkle-tree = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +frame-benchmarking = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +frame-benchmarking-cli = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +frame-election-provider-support = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +frame-executive = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +frame-remote-externalities = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +frame-support = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +frame-support-procedural = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +frame-support-procedural-tools = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +frame-support-procedural-tools-derive = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +frame-system = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +frame-system-benchmarking = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +frame-system-rpc-runtime-api = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +frame-try-runtime = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +mmr-gadget = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +mmr-rpc = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +pallet-asset-tx-payment = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +pallet-assets = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +pallet-aura = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +pallet-authority-discovery = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +pallet-authorship = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +pallet-babe = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +pallet-bags-list = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +pallet-balances = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +pallet-beefy = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +pallet-beefy-mmr = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +pallet-bounties = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +pallet-child-bounties = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +pallet-collective = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +pallet-conviction-voting = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +pallet-democracy = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +pallet-election-provider-multi-phase = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +pallet-election-provider-support-benchmarking = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +pallet-elections-phragmen = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +pallet-fast-unstake = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +pallet-grandpa = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +pallet-identity = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +pallet-im-online = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +pallet-indices = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +pallet-membership = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +pallet-mmr = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +pallet-multisig = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +pallet-nis = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +pallet-nomination-pools = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +pallet-nomination-pools-benchmarking = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +pallet-nomination-pools-runtime-api = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +pallet-offences = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +pallet-offences-benchmarking = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +pallet-preimage = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +pallet-proxy = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +pallet-ranked-collective = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +pallet-recovery = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +pallet-referenda = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +pallet-scheduler = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +pallet-session = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +pallet-session-benchmarking = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +pallet-society = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +pallet-staking = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +pallet-staking-reward-curve = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +pallet-staking-reward-fn = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +pallet-staking-runtime-api = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +pallet-state-trie-migration = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +pallet-sudo = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +pallet-timestamp = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +pallet-tips = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +pallet-transaction-payment = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +pallet-transaction-payment-rpc = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +pallet-treasury = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +pallet-utility = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +pallet-vesting = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +pallet-whitelist = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +sc-authority-discovery = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +sc-basic-authorship = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +sc-block-builder = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +sc-chain-spec = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +sc-cli = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +sc-client-api = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +sc-client-db = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +sc-consensus = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +sc-consensus-aura = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +sc-consensus-babe = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +sc-consensus-babe-rpc = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +sc-consensus-beefy = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +sc-consensus-epochs = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +sc-consensus-grandpa = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +sc-consensus-grandpa-rpc = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +sc-consensus-manual-seal = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +sc-consensus-slots = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +sc-executor = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +sc-executor-common = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +sc-executor-wasmtime = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +sc-informant = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +sc-keystore = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +sc-network = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +sc-network-common = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +sc-network-gossip = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +sc-network-light = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +sc-network-sync = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +sc-network-transactions = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +sc-offchain = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +sc-rpc = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +sc-rpc-api = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +sc-rpc-server = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +sc-service = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +sc-storage-monitor = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +sc-sync-state-rpc = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +sc-sysinfo = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +sc-telemetry = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +sc-tracing = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +sc-transaction-pool = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +sc-transaction-pool-api = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +sc-utils = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +sp-api = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +sp-application-crypto = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +sp-arithmetic = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +sp-authority-discovery = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +sp-block-builder = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +sc-consensus-beefy-rpc = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +sp-blockchain = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +sp-consensus = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +sp-consensus-aura = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +sp-consensus-babe = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +sp-consensus-beefy = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +sp-consensus-grandpa = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +sp-consensus-slots = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +sp-core = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +sp-debug-derive = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +sp-externalities = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +sp-inherents = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +sp-io = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +sp-keyring = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +sp-keystore = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +sp-maybe-compressed-blob = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +sp-mmr-primitives = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +sp-npos-elections = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +sp-offchain = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +sp-rpc = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +sp-runtime = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +sp-runtime-interface = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +sp-runtime-interface-proc-macro = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +sp-session = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +sp-staking = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +sp-state-machine = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +sp-std = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +sp-storage = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +sp-timestamp = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +sp-tracing = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +sp-transaction-pool = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +sp-trie = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +sp-version = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +sp-wasm-interface = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +sp-weights = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +substrate-build-script-utils = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +substrate-frame-rpc-system = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +substrate-prometheus-endpoint = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +substrate-state-trie-migration-rpc = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +substrate-test-client = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +substrate-wasm-builder = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +try-runtime-cli = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +pallet-glutton = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +sp-database = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +pallet-message-queue = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +pallet-contracts = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } +pallet-contracts-primitives = { git = "https://github.com/paritytech//substrate", branch = "polkadot-v1.0.0" } [patch."https://github.com/paritytech/polkadot"] -kusama-runtime = { git = "https://github.com/paritytech//polkadot", branch = "release-v0.9.42" } -pallet-xcm = { git = "https://github.com/paritytech//polkadot", branch = "release-v0.9.42" } -polkadot-cli = { git = "https://github.com/paritytech//polkadot", branch = "release-v0.9.42" } -polkadot-client = { git = "https://github.com/paritytech//polkadot", branch = "release-v0.9.42" } -polkadot-core-primitives = { git = "https://github.com/paritytech//polkadot", branch = "release-v0.9.42" } -polkadot-node-core-av-store = { git = "https://github.com/paritytech//polkadot", branch = "release-v0.9.42" } -polkadot-node-core-pvf = { git = "https://github.com/paritytech//polkadot", branch = "release-v0.9.42" } -polkadot-node-network-protocol = { git = "https://github.com/paritytech//polkadot", branch = "release-v0.9.42" } -polkadot-node-primitives = { git = "https://github.com/paritytech//polkadot", branch = "release-v0.9.42" } -polkadot-node-subsystem = { git = "https://github.com/paritytech//polkadot", branch = "release-v0.9.42" } -polkadot-node-subsystem-util = { git = "https://github.com/paritytech//polkadot", branch = "release-v0.9.42" } -polkadot-overseer = { git = "https://github.com/paritytech//polkadot", branch = "release-v0.9.42" } -polkadot-parachain = { git = "https://github.com/paritytech//polkadot", branch = "release-v0.9.42" } -polkadot-primitives = { git = "https://github.com/paritytech//polkadot", branch = "release-v0.9.42" } -polkadot-runtime = { git = "https://github.com/paritytech//polkadot", branch = "release-v0.9.42" } -polkadot-runtime-common = { git = "https://github.com/paritytech//polkadot", branch = "release-v0.9.42" } -polkadot-runtime-parachains = { git = "https://github.com/paritytech//polkadot", branch = "release-v0.9.42" } -polkadot-service = { git = "https://github.com/paritytech//polkadot", branch = "release-v0.9.42" } -polkadot-statement-table = { git = "https://github.com/paritytech//polkadot", branch = "release-v0.9.42" } -rococo-runtime = { git = "https://github.com/paritytech//polkadot", branch = "release-v0.9.42" } -westend-runtime = { git = "https://github.com/paritytech//polkadot", branch = "release-v0.9.42" } -xcm = { git = "https://github.com/paritytech//polkadot", branch = "release-v0.9.42" } -xcm-builder = { git = "https://github.com/paritytech//polkadot", branch = "release-v0.9.42" } -xcm-executor = { git = "https://github.com/paritytech//polkadot", branch = "release-v0.9.42" } -xcm-simulator = { git = "https://github.com/paritytech//polkadot", branch = "release-v0.9.42" } -pallet-xcm-benchmarks = { git = "https://github.com/paritytech//polkadot", branch = "release-v0.9.42" } -polkadot-availability-distribution = { git = "https://github.com/paritytech//polkadot", branch = "release-v0.9.42" } -polkadot-erasure-coding = { git = "https://github.com/paritytech//polkadot", branch = "release-v0.9.42" } -polkadot-network-bridge = { git = "https://github.com/paritytech//polkadot", branch = "release-v0.9.42" } -polkadot-node-jaeger = { git = "https://github.com/paritytech//polkadot", branch = "release-v0.9.42" } -tracing-gum = { git = "https://github.com/paritytech//polkadot", branch = "release-v0.9.42" } -tracing-gum-proc-macro = { git = "https://github.com/paritytech//polkadot", branch = "release-v0.9.42" } -polkadot-availability-recovery = { git = "https://github.com/paritytech//polkadot", branch = "release-v0.9.42" } -polkadot-collator-protocol = { git = "https://github.com/paritytech//polkadot", branch = "release-v0.9.42" } -polkadot-node-collation-generation = { git = "https://github.com/paritytech//polkadot", branch = "release-v0.9.42" } -polkadot-node-core-runtime-api = { git = "https://github.com/paritytech//polkadot", branch = "release-v0.9.42" } -polkadot-node-metrics = { git = "https://github.com/paritytech//polkadot", branch = "release-v0.9.42" } -polkadot-node-subsystem-types = { git = "https://github.com/paritytech//polkadot", branch = "release-v0.9.42" } +kusama-runtime = { git = "https://github.com/paritytech//polkadot", branch = "release-v1.0.0" } +kusama-runtime-constants = { git = "https://github.com/paritytech//polkadot", branch = "release-v1.0.0" } +pallet-xcm = { git = "https://github.com/paritytech//polkadot", branch = "release-v1.0.0" } +pallet-xcm-benchmarks = { git = "https://github.com/paritytech//polkadot", branch = "release-v1.0.0" } +polkadot-cli = { git = "https://github.com/paritytech//polkadot", branch = "release-v1.0.0" } +polkadot-core-primitives = { git = "https://github.com/paritytech//polkadot", branch = "release-v1.0.0" } +polkadot-network-bridge = { git = "https://github.com/paritytech//polkadot", branch = "release-v1.0.0" } +polkadot-node-core-av-store = { git = "https://github.com/paritytech//polkadot", branch = "release-v1.0.0" } +polkadot-node-core-pvf = { git = "https://github.com/paritytech//polkadot", branch = "release-v1.0.0" } +polkadot-node-metrics = { git = "https://github.com/paritytech//polkadot", branch = "release-v1.0.0" } +polkadot-node-network-protocol = { git = "https://github.com/paritytech//polkadot", branch = "release-v1.0.0" } +polkadot-node-primitives = { git = "https://github.com/paritytech//polkadot", branch = "release-v1.0.0" } +polkadot-node-subsystem = { git = "https://github.com/paritytech//polkadot", branch = "release-v1.0.0" } +polkadot-node-subsystem-util= { git = "https://github.com/paritytech//polkadot", branch = "release-v1.0.0" } +polkadot-overseer = { git = "https://github.com/paritytech//polkadot", branch = "release-v1.0.0" } +polkadot-parachain = { git = "https://github.com/paritytech//polkadot", branch = "release-v1.0.0" } +polkadot-primitives = { git = "https://github.com/paritytech//polkadot", branch = "release-v1.0.0" } +polkadot-rpc = { git = "https://github.com/paritytech//polkadot", branch = "release-v1.0.0" } +polkadot-runtime = { git = "https://github.com/paritytech//polkadot", branch = "release-v1.0.0" } +polkadot-runtime-common = { git = "https://github.com/paritytech//polkadot", branch = "release-v1.0.0" } +polkadot-runtime-constants = { git = "https://github.com/paritytech//polkadot", branch = "release-v1.0.0" } +polkadot-runtime-parachains = { git = "https://github.com/paritytech//polkadot", branch = "release-v1.0.0" } +polkadot-service = { git = "https://github.com/paritytech//polkadot", branch = "release-v1.0.0" } +polkadot-statement-table = { git = "https://github.com/paritytech//polkadot", branch = "release-v1.0.0" } +polkadot-test-runtime = { git = "https://github.com/paritytech//polkadot", branch = "release-v1.0.0" } +polkadot-test-service = { git = "https://github.com/paritytech//polkadot", branch = "release-v1.0.0" } +rococo-runtime = { git = "https://github.com/paritytech//polkadot", branch = "release-v1.0.0" } +test-runtime-constants = { git = "https://github.com/paritytech//polkadot", branch = "release-v1.0.0" } +tracing-gum = { git = "https://github.com/paritytech//polkadot", branch = "release-v1.0.0" } +westend-runtime = { git = "https://github.com/paritytech//polkadot", branch = "release-v1.0.0" } +xcm = { git = "https://github.com/paritytech//polkadot", branch = "release-v1.0.0" } +xcm-builder = { git = "https://github.com/paritytech//polkadot", branch = "release-v1.0.0" } +xcm-executor = { git = "https://github.com/paritytech//polkadot", branch = "release-v1.0.0" } +xcm-simulator = { git = "https://github.com/paritytech//polkadot", branch = "release-v1.0.0" } +polkadot-node-core-runtime-api = { git = "https://github.com/paritytech//polkadot", branch = "release-v1.0.0" } +polkadot-node-collation-generation = { git = "https://github.com/paritytech//polkadot", branch = "release-v1.0.0" } +polkadot-collator-protocol = { git = "https://github.com/paritytech//polkadot", branch = "release-v1.0.0" } +polkadot-availability-recovery = { git = "https://github.com/paritytech//polkadot", branch = "release-v1.0.0" } [patch."https://github.com/paritytech/cumulus"] -cumulus-client-cli = { git = "https://github.com/paritytech//cumulus", branch = "polkadot-v0.9.42" } -cumulus-client-consensus-aura = { git = "https://github.com/paritytech//cumulus", branch = "polkadot-v0.9.42" } -cumulus-client-consensus-common = { git = "https://github.com/paritytech//cumulus", branch = "polkadot-v0.9.42" } -cumulus-client-consensus-relay-chain = { git = "https://github.com/paritytech//cumulus", branch = "polkadot-v0.9.42" } -cumulus-client-network = { git = "https://github.com/paritytech//cumulus", branch = "polkadot-v0.9.42" } -cumulus-client-service = { git = "https://github.com/paritytech//cumulus", branch = "polkadot-v0.9.42" } -cumulus-pallet-aura-ext = { git = "https://github.com/paritytech//cumulus", branch = "polkadot-v0.9.42" } -cumulus-pallet-dmp-queue = { git = "https://github.com/paritytech//cumulus", branch = "polkadot-v0.9.42" } -cumulus-pallet-parachain-system = { git = "https://github.com/paritytech//cumulus", branch = "polkadot-v0.9.42" } -cumulus-pallet-xcm = { git = "https://github.com/paritytech//cumulus", branch = "polkadot-v0.9.42" } -cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech//cumulus", branch = "polkadot-v0.9.42" } -cumulus-primitives-core = { git = "https://github.com/paritytech//cumulus", branch = "polkadot-v0.9.42" } -cumulus-primitives-parachain-inherent = { git = "https://github.com/paritytech//cumulus", branch = "polkadot-v0.9.42" } -cumulus-primitives-timestamp = { git = "https://github.com/paritytech//cumulus", branch = "polkadot-v0.9.42" } -cumulus-primitives-utility = { git = "https://github.com/paritytech//cumulus", branch = "polkadot-v0.9.42" } -cumulus-relay-chain-interface = { git = "https://github.com/paritytech//cumulus", branch = "polkadot-v0.9.42" } -cumulus-test-relay-sproof-builder = { git = "https://github.com/paritytech//cumulus", branch = "polkadot-v0.9.42" } -parachain-info = { git = "https://github.com/paritytech//cumulus", branch = "polkadot-v0.9.42" } -cumulus-relay-chain-inprocess-interface = { git = "https://github.com/paritytech//cumulus", branch = "polkadot-v0.9.42" } -cumulus-relay-chain-rpc-interface = { git = "https://github.com/paritytech//cumulus", branch = "polkadot-v0.9.42" } -cumulus-client-collator = { git = "https://github.com/paritytech//cumulus", branch = "polkadot-v0.9.42" } -cumulus-relay-chain-minimal-node = { git = "https://github.com/paritytech//cumulus", branch = "polkadot-v0.9.42" } +cumulus-client-collator = { git = "https://github.com/paritytech//cumulus", branch = "polkadot-v1.0.0" } +cumulus-client-cli = { git = "https://github.com/paritytech//cumulus", branch = "polkadot-v1.0.0" } +cumulus-client-consensus-aura = { git = "https://github.com/paritytech//cumulus", branch = "polkadot-v1.0.0" } +cumulus-client-consensus-common = { git = "https://github.com/paritytech//cumulus", branch = "polkadot-v1.0.0" } +cumulus-client-consensus-relay-chain = { git = "https://github.com/paritytech//cumulus", branch = "polkadot-v1.0.0" } +cumulus-client-network = { git = "https://github.com/paritytech//cumulus", branch = "polkadot-v1.0.0" } +cumulus-client-service = { git = "https://github.com/paritytech//cumulus", branch = "polkadot-v1.0.0" } +cumulus-pallet-aura-ext = { git = "https://github.com/paritytech//cumulus", branch = "polkadot-v1.0.0" } +cumulus-pallet-dmp-queue = { git = "https://github.com/paritytech//cumulus", branch = "polkadot-v1.0.0" } +cumulus-pallet-parachain-system = { git = "https://github.com/paritytech//cumulus", branch = "polkadot-v1.0.0" } +cumulus-pallet-xcm = { git = "https://github.com/paritytech//cumulus", branch = "polkadot-v1.0.0" } +cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech//cumulus", branch = "polkadot-v1.0.0" } +cumulus-primitives-core = { git = "https://github.com/paritytech//cumulus", branch = "polkadot-v1.0.0" } +cumulus-primitives-parachain-inherent = { git = "https://github.com/paritytech//cumulus", branch = "polkadot-v1.0.0" } +cumulus-primitives-timestamp = { git = "https://github.com/paritytech//cumulus", branch = "polkadot-v1.0.0" } +cumulus-primitives-utility = { git = "https://github.com/paritytech//cumulus", branch = "polkadot-v1.0.0" } +cumulus-relay-chain-inprocess-interface = { git = "https://github.com/paritytech//cumulus", branch = "polkadot-v1.0.0" } +cumulus-relay-chain-interface = { git = "https://github.com/paritytech//cumulus", branch = "polkadot-v1.0.0" } +cumulus-relay-chain-minimal-node = { git = "https://github.com/paritytech//cumulus", branch = "polkadot-v1.0.0" } +cumulus-relay-chain-rpc-interface = { git = "https://github.com/paritytech//cumulus", branch = "polkadot-v1.0.0" } +cumulus-test-relay-sproof-builder = { git = "https://github.com/paritytech//cumulus", branch = "polkadot-v1.0.0" } +cumulus-test-relay-validation-worker-provider = { git = "https://github.com/paritytech//cumulus", branch = "polkadot-v1.0.0" } +parachain-info = { git = "https://github.com/paritytech//cumulus", branch = "polkadot-v1.0.0" } +parachains-common = { git = "https://github.com/paritytech//cumulus", branch = "polkadot-v1.0.0" } +xcm-emulator = { git = "https://github.com/paritytech//cumulus", branch = "polkadot-v1.0.0" } [patch."https://github.com/open-web3-stack/open-runtime-module-library"] -orml-asset-registry = { git = "https://github.com/open-web3-stack//open-runtime-module-library", rev = "ca05423f4f32be1d30765caacdc7d90130f5554a" } -orml-oracle = { git = "https://github.com/open-web3-stack//open-runtime-module-library", rev = "ca05423f4f32be1d30765caacdc7d90130f5554a" } -orml-tokens = { git = "https://github.com/open-web3-stack//open-runtime-module-library", rev = "ca05423f4f32be1d30765caacdc7d90130f5554a" } -orml-traits = { git = "https://github.com/open-web3-stack//open-runtime-module-library", rev = "ca05423f4f32be1d30765caacdc7d90130f5554a" } -orml-unknown-tokens = { git = "https://github.com/open-web3-stack//open-runtime-module-library", rev = "ca05423f4f32be1d30765caacdc7d90130f5554a" } -orml-utilities = { git = "https://github.com/open-web3-stack//open-runtime-module-library", rev = "ca05423f4f32be1d30765caacdc7d90130f5554a" } -orml-vesting = { git = "https://github.com/open-web3-stack//open-runtime-module-library", rev = "ca05423f4f32be1d30765caacdc7d90130f5554a" } -orml-xcm-support = { git = "https://github.com/open-web3-stack//open-runtime-module-library", rev = "ca05423f4f32be1d30765caacdc7d90130f5554a" } -orml-xcm = { git = "https://github.com/open-web3-stack//open-runtime-module-library", rev = "ca05423f4f32be1d30765caacdc7d90130f5554a" } -orml-xtokens = { git = "https://github.com/open-web3-stack//open-runtime-module-library", rev = "ca05423f4f32be1d30765caacdc7d90130f5554a" } +orml-asset-registry = { git = "https://github.com/open-web3-stack//open-runtime-module-library", rev = "f7c8b38cdc0fa6dddf915a20d2ccf6ae4ad5cac5" } +orml-oracle = { git = "https://github.com/open-web3-stack//open-runtime-module-library", rev = "f7c8b38cdc0fa6dddf915a20d2ccf6ae4ad5cac5" } +orml-tokens = { git = "https://github.com/open-web3-stack//open-runtime-module-library", rev = "f7c8b38cdc0fa6dddf915a20d2ccf6ae4ad5cac5" } +orml-traits = { git = "https://github.com/open-web3-stack//open-runtime-module-library", rev = "f7c8b38cdc0fa6dddf915a20d2ccf6ae4ad5cac5" } +orml-unknown-tokens = { git = "https://github.com/open-web3-stack//open-runtime-module-library", rev = "f7c8b38cdc0fa6dddf915a20d2ccf6ae4ad5cac5" } +orml-utilities = { git = "https://github.com/open-web3-stack//open-runtime-module-library", rev = "f7c8b38cdc0fa6dddf915a20d2ccf6ae4ad5cac5" } +orml-vesting = { git = "https://github.com/open-web3-stack//open-runtime-module-library", rev = "f7c8b38cdc0fa6dddf915a20d2ccf6ae4ad5cac5" } +orml-xcm-support = { git = "https://github.com/open-web3-stack//open-runtime-module-library", rev = "f7c8b38cdc0fa6dddf915a20d2ccf6ae4ad5cac5" } +orml-xcm = { git = "https://github.com/open-web3-stack//open-runtime-module-library", rev = "f7c8b38cdc0fa6dddf915a20d2ccf6ae4ad5cac5" } +orml-xtokens = { git = "https://github.com/open-web3-stack//open-runtime-module-library", rev = "f7c8b38cdc0fa6dddf915a20d2ccf6ae4ad5cac5" } [patch."https://github.com/paritytech/frontier"] -fc-consensus = { git = "https://github.com/paritytech//frontier", branch = "polkadot-v0.9.42" } -fc-db = { git = "https://github.com/paritytech//frontier", branch = "polkadot-v0.9.42" } -fc-mapping-sync = { git = "https://github.com/paritytech//frontier", branch = "polkadot-v0.9.42" } -fc-rpc = { git = "https://github.com/paritytech//frontier", branch = "polkadot-v0.9.42" } -fc-rpc-core = { git = "https://github.com/paritytech//frontier", branch = "polkadot-v0.9.42" } -fc-storage = { git = "https://github.com/paritytech//frontier", branch = "polkadot-v0.9.42" } - -fp-ethereum = { git = "https://github.com/paritytech//frontier", branch = "polkadot-v0.9.42" } -fp-evm = { git = "https://github.com/paritytech//frontier", branch = "polkadot-v0.9.42" } -fp-rpc = { git = "https://github.com/paritytech//frontier", branch = "polkadot-v0.9.42" } -fp-self-contained = { git = "https://github.com/paritytech//frontier", branch = "polkadot-v0.9.42" } - -pallet-base-fee = { git = "https://github.com/paritytech//frontier", branch = "polkadot-v0.9.42" } -pallet-ethereum = { git = "https://github.com/paritytech//frontier", branch = "polkadot-v0.9.42" } -pallet-evm = { git = "https://github.com/paritytech//frontier", branch = "polkadot-v0.9.42" } -pallet-evm-chain-id = { git = "https://github.com/paritytech//frontier", branch = "polkadot-v0.9.42" } -pallet-evm-precompile-dispatch = { git = "https://github.com/paritytech//frontier", branch = "polkadot-v0.9.42" } +fc-consensus = { git = "https://github.com/paritytech//frontier", branch = "polkadot-v1.0.0" } +fc-db = { git = "https://github.com/paritytech//frontier", branch = "polkadot-v1.0.0" } +fc-mapping-sync = { git = "https://github.com/paritytech//frontier", branch = "polkadot-v1.0.0" } +fc-rpc = { git = "https://github.com/paritytech//frontier", branch = "polkadot-v1.0.0" } +fc-rpc-core = { git = "https://github.com/paritytech//frontier", branch = "polkadot-v1.0.0" } +fc-storage = { git = "https://github.com/paritytech//frontier", branch = "polkadot-v1.0.0" } +# Frontier Primitive +fp-account = { git = "https://github.com/paritytech//frontier", branch = "polkadot-v1.0.0" } +fp-consensus = { git = "https://github.com/paritytech//frontier", branch = "polkadot-v1.0.0" } +fp-ethereum = { git = "https://github.com/paritytech//frontier", branch = "polkadot-v1.0.0" } +fp-evm = { git = "https://github.com/paritytech//frontier", branch = "polkadot-v1.0.0" } +fp-rpc = { git = "https://github.com/paritytech//frontier", branch = "polkadot-v1.0.0" } +fp-self-contained = { git = "https://github.com/paritytech//frontier", branch = "polkadot-v1.0.0" } +fp-storage = { git = "https://github.com/paritytech//frontier", branch = "polkadot-v1.0.0" } +# Frontier FRAME +pallet-base-fee = { git = "https://github.com/paritytech//frontier", branch = "polkadot-v1.0.0" } +pallet-ethereum = { git = "https://github.com/paritytech//frontier", branch = "polkadot-v1.0.0" } +pallet-evm = { git = "https://github.com/paritytech//frontier", branch = "polkadot-v1.0.0" } +pallet-evm-chain-id = { git = "https://github.com/paritytech//frontier", branch = "polkadot-v1.0.0" } +pallet-evm-precompile-modexp = { git = "https://github.com/paritytech//frontier", branch = "polkadot-v1.0.0" } +pallet-evm-precompile-sha3fips = { git = "https://github.com/paritytech//frontier", branch = "polkadot-v1.0.0" } +pallet-evm-precompile-simple = { git = "https://github.com/paritytech//frontier", branch = "polkadot-v1.0.0" } diff --git a/crates/annuity/Cargo.toml b/crates/annuity/Cargo.toml index 3e5b48dbe1..3e7d3f60ce 100644 --- a/crates/annuity/Cargo.toml +++ b/crates/annuity/Cargo.toml @@ -6,7 +6,7 @@ name = "annuity" version = "1.0.0" [dependencies] -serde = { version = "1.0.130", default-features = false, features = ["derive"], optional = true } +serde = { version = "1.0.130", default-features = false, features = ["derive"] } codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false, features = ["derive", "max-encoded-len"] } scale-info = { version = "2.2.0", default-features = false, features = ["derive"] } @@ -35,7 +35,7 @@ reward = { path = "../reward", default-features = false } [features] default = ["std"] std = [ - "serde", + "serde/std", "codec/std", "scale-info/std", diff --git a/crates/annuity/src/lib.rs b/crates/annuity/src/lib.rs index da6110ea49..e44db09987 100644 --- a/crates/annuity/src/lib.rs +++ b/crates/annuity/src/lib.rs @@ -24,6 +24,7 @@ use frame_support::{ weights::Weight, PalletId, }; +use frame_system::pallet_prelude::BlockNumberFor; use sp_runtime::traits::{AccountIdConversion, CheckedDiv, Convert, Saturating}; use sp_std::cmp::min; @@ -55,11 +56,11 @@ pub mod pallet { type BlockRewardProvider: BlockRewardProvider; /// Convert the block number into a balance. - type BlockNumberToBalance: Convert>; + type BlockNumberToBalance: Convert, BalanceOf>; /// The emission period for block rewards. #[pallet::constant] - type EmissionPeriod: Get; + type EmissionPeriod: Get>; /// The total amount of the wrapped asset. type TotalWrapped: Get>; @@ -79,8 +80,8 @@ pub mod pallet { pub enum Error {} #[pallet::hooks] - impl, I: 'static> Hooks for Pallet { - fn on_initialize(n: T::BlockNumber) -> Weight { + impl, I: 'static> Hooks> for Pallet { + fn on_initialize(n: BlockNumberFor) -> Weight { if let Err(e) = Self::begin_block(n) { sp_runtime::print(e); } @@ -154,7 +155,7 @@ impl, I: 'static> Pallet { } } - pub(crate) fn begin_block(_height: T::BlockNumber) -> DispatchResult { + pub(crate) fn begin_block(_height: BlockNumberFor) -> DispatchResult { let reward_per_block = Self::min_reward_per_block(); Self::deposit_event(Event::::BlockReward(reward_per_block)); T::BlockRewardProvider::distribute_block_reward(&Self::account_id(), reward_per_block) diff --git a/crates/annuity/src/mock.rs b/crates/annuity/src/mock.rs index 60f8094d72..a3855b4f42 100644 --- a/crates/annuity/src/mock.rs +++ b/crates/annuity/src/mock.rs @@ -1,4 +1,4 @@ -use crate::{self as annuity, BlockRewardProvider, Config}; +use crate::{self as annuity, BlockRewardProvider, Config, Convert}; use frame_support::{ parameter_types, traits::{ConstU32, Everything}, @@ -7,24 +7,17 @@ use frame_support::{ pub use primitives::{CurrencyId, CurrencyId::Token, SignedFixedPoint, TokenSymbol::*}; use sp_core::H256; use sp_runtime::{ - generic::Header as GenericHeader, - traits::{BlakeTwo256, Identity, IdentityLookup}, - DispatchError, DispatchResult, + traits::{BlakeTwo256, IdentityLookup}, + BuildStorage, DispatchError, DispatchResult, }; -type Header = GenericHeader; - -type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; type Block = frame_system::mocking::MockBlock; // Configure a mock runtime to test the pallet. frame_support::construct_runtime!( - pub enum Test where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, + pub enum Test { - System: frame_system::{Pallet, Call, Storage, Config, Event}, + System: frame_system::{Pallet, Call, Storage, Config, Event}, Balances: pallet_balances::{Pallet, Call, Storage, Event}, Rewards: reward::{Pallet, Call, Storage, Event}, Annuity: annuity::{Pallet, Call, Storage, Event}, @@ -33,8 +26,8 @@ frame_support::construct_runtime!( pub type AccountId = u64; pub type Balance = u128; -pub type BlockNumber = u128; -pub type Index = u64; +pub type BlockNumber = u64; +pub type Nonce = u64; parameter_types! { pub const BlockHashCount: u64 = 250; @@ -48,13 +41,12 @@ impl frame_system::Config for Test { type DbWeight = (); type RuntimeOrigin = RuntimeOrigin; type RuntimeCall = RuntimeCall; - type Index = Index; - type BlockNumber = BlockNumber; + type Nonce = Nonce; + type Block = Block; type Hash = H256; type Hashing = BlakeTwo256; type AccountId = AccountId; type Lookup = IdentityLookup; - type Header = Header; type RuntimeEvent = RuntimeEvent; type BlockHashCount = BlockHashCount; type Version = (); @@ -82,7 +74,7 @@ impl pallet_balances::Config for Test { type MaxLocks = (); type MaxReserves = (); type ReserveIdentifier = [u8; 8]; - type HoldIdentifier = (); + type RuntimeHoldReason = (); type FreezeIdentifier = (); type MaxFreezes = (); type MaxHolds = (); @@ -133,12 +125,19 @@ parameter_types! { pub const TotalWrapped: Balance = 100000000; // 1 BTC } +pub struct BlockNumberToBalance; +impl Convert for BlockNumberToBalance { + fn convert(a: BlockNumber) -> Balance { + a.into() + } +} + impl Config for Test { type AnnuityPalletId = AnnuityPalletId; type RuntimeEvent = RuntimeEvent; type Currency = Balances; type BlockRewardProvider = MockBlockRewardProvider; - type BlockNumberToBalance = Identity; + type BlockNumberToBalance = BlockNumberToBalance; type EmissionPeriod = EmissionPeriod; type TotalWrapped = TotalWrapped; type WeightInfo = (); @@ -148,7 +147,7 @@ pub struct ExtBuilder; impl ExtBuilder { pub fn build() -> sp_io::TestExternalities { - let storage = frame_system::GenesisConfig::default().build_storage::().unwrap(); + let storage = frame_system::GenesisConfig::::default().build_storage().unwrap(); storage.into() } diff --git a/crates/annuity/src/tests.rs b/crates/annuity/src/tests.rs index fde7d27ffc..0d79c1c0d3 100644 --- a/crates/annuity/src/tests.rs +++ b/crates/annuity/src/tests.rs @@ -8,19 +8,31 @@ fn should_calculate_emission_rewards() { run_test(|| { >::make_free_balance_be(&Annuity::account_id(), YEAR_1_REWARDS); Annuity::update_reward_per_block(); - assert_eq!(Annuity::reward_per_block(), YEAR_1_REWARDS / EmissionPeriod::get()); + assert_eq!( + Annuity::reward_per_block(), + YEAR_1_REWARDS / EmissionPeriod::get() as u128 + ); >::make_free_balance_be(&Annuity::account_id(), YEAR_2_REWARDS); Annuity::update_reward_per_block(); - assert_eq!(Annuity::reward_per_block(), YEAR_2_REWARDS / EmissionPeriod::get()); + assert_eq!( + Annuity::reward_per_block(), + YEAR_2_REWARDS / EmissionPeriod::get() as u128 + ); >::make_free_balance_be(&Annuity::account_id(), YEAR_3_REWARDS); Annuity::update_reward_per_block(); - assert_eq!(Annuity::reward_per_block(), YEAR_3_REWARDS / EmissionPeriod::get()); + assert_eq!( + Annuity::reward_per_block(), + YEAR_3_REWARDS / EmissionPeriod::get() as u128 + ); >::make_free_balance_be(&Annuity::account_id(), YEAR_4_REWARDS); Annuity::update_reward_per_block(); - assert_eq!(Annuity::reward_per_block(), YEAR_4_REWARDS / EmissionPeriod::get()); + assert_eq!( + Annuity::reward_per_block(), + YEAR_4_REWARDS / EmissionPeriod::get() as u128 + ); }) } @@ -29,7 +41,10 @@ fn should_set_reward_per_wrapped() { run_test(|| { >::make_free_balance_be(&Annuity::account_id(), YEAR_1_REWARDS); Annuity::update_reward_per_block(); - assert_eq!(Annuity::min_reward_per_block(), YEAR_1_REWARDS / EmissionPeriod::get()); + assert_eq!( + Annuity::min_reward_per_block(), + YEAR_1_REWARDS / EmissionPeriod::get() as u128 + ); let reward_per_wrapped = 100; assert_ok!(Annuity::set_reward_per_wrapped( RuntimeOrigin::root(), diff --git a/crates/bitcoin/Cargo.toml b/crates/bitcoin/Cargo.toml index 24ead977cc..da67ab2d75 100644 --- a/crates/bitcoin/Cargo.toml +++ b/crates/bitcoin/Cargo.toml @@ -7,8 +7,8 @@ edition = "2021" [dependencies] codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false, features = ["derive", "max-encoded-len"] } scale-info = { version = "2.2.0", default-features = false, features = ["derive"] } -serde = { version = "1.0.130", default-features = false, features = ["derive"], optional = true } -impl-serde = { version = "0.3.1", default-features = false, optional = true } +serde = { version = "1.0.130", default-features = false, features = ["derive"] } +impl-serde = { version = "0.3.1", default-features = false } sha2 = { version = "0.8.2", default-features = false } hex = { version = "0.4.2", default-features = false } spin = { version = "0.7.1", default-features = false } @@ -26,13 +26,12 @@ frame-support = { git = "https://github.com/paritytech/substrate", branch = "pol default = ["std"] std = [ "codec/std", + "impl-serde/std", "scale-info/std", - "serde", - "impl-serde", + "serde/std", "sha2/std", "hex/alloc", "primitive-types/std", - "primitive-types/serde", "secp256k1/std", "rust-bitcoin?/std" ] diff --git a/crates/bitcoin/src/address.rs b/crates/bitcoin/src/address.rs index 28809257cd..43edece67d 100644 --- a/crates/bitcoin/src/address.rs +++ b/crates/bitcoin/src/address.rs @@ -3,6 +3,7 @@ use bitcoin_hashes::{hash160::Hash as Hash160, Hash}; use codec::{Decode, Encode, MaxEncodedLen}; use primitive_types::{H160, H256}; use scale_info::TypeInfo; +use serde::{Deserialize, Serialize}; use sha2::{Digest, Sha256}; #[cfg(not(feature = "std"))] @@ -13,8 +14,10 @@ use secp256k1::{constants::PUBLIC_KEY_SIZE, Error as Secp256k1Error, PublicKey a /// A Bitcoin address is a serialized identifier that represents the destination for a payment. /// Address prefixes are used to indicate the network as well as the format. Since the Parachain /// follows SPV assumptions we do not need to know which network a payment is included in. -#[derive(Encode, Decode, Clone, Ord, PartialOrd, PartialEq, Eq, Debug, Copy, TypeInfo, MaxEncodedLen)] -#[cfg_attr(feature = "std", derive(serde::Serialize, serde::Deserialize, std::hash::Hash))] +#[derive( + Serialize, Deserialize, Encode, Decode, Clone, Ord, PartialOrd, PartialEq, Eq, Debug, Copy, TypeInfo, MaxEncodedLen, +)] +#[cfg_attr(feature = "std", derive(std::hash::Hash))] pub enum Address { // input: {signature} {pubkey} // output: OP_DUP OP_HASH160 {hash160(pubkey)} OP_EQUALVERIFY OP_CHECKSIG @@ -150,7 +153,6 @@ impl From<[u8; PUBLIC_KEY_SIZE]> for PublicKey { } } -#[cfg(feature = "std")] impl serde::Serialize for PublicKey { fn serialize(&self, serializer: S) -> Result where @@ -161,7 +163,6 @@ impl serde::Serialize for PublicKey { } } -#[cfg(feature = "std")] impl<'de> serde::Deserialize<'de> for PublicKey { fn deserialize(deserializer: D) -> Result where diff --git a/crates/bitcoin/src/formatter.rs b/crates/bitcoin/src/formatter.rs index 5987d64535..e7ad33b5a4 100644 --- a/crates/bitcoin/src/formatter.rs +++ b/crates/bitcoin/src/formatter.rs @@ -103,10 +103,10 @@ impl TryFormat for CompactUint { fn try_format(&self, w: &mut W) -> Result<(), Error> { if self.value < 0xfd { (self.value as u8).try_format(w)?; - } else if self.value < u16::max_value() as u64 { + } else if self.value < u16::MAX as u64 { 0xfd_u8.try_format(w)?; (self.value as u16).try_format(w)?; - } else if self.value < u32::max_value() as u64 { + } else if self.value < u32::MAX as u64 { 0xfe_u8.try_format(w)?; (self.value as u32).try_format(w)?; } else { @@ -136,7 +136,7 @@ where impl TryFormat for TransactionInput { fn try_format(&self, w: &mut W) -> Result<(), Error> { let (previous_hash, previous_index) = match self.source { - TransactionInputSource::Coinbase(_) => (H256Le::zero(), u32::max_value()), + TransactionInputSource::Coinbase(_) => (H256Le::zero(), u32::MAX), TransactionInputSource::FromOutput(hash, index) => (hash, index), }; previous_hash.try_format(w)?; @@ -304,7 +304,7 @@ mod tests { assert_eq!(try_format(256u16), [0, 1]); assert_eq!(try_format(0xffffu32 + 1), [0, 0, 1, 0]); assert_eq!(try_format(0xffffffu32 + 1), [0, 0, 0, 1]); - assert_eq!(try_format(u64::max_value()), [0xff].repeat(8)); + assert_eq!(try_format(u64::MAX), [0xff].repeat(8)); } #[test] @@ -313,9 +313,7 @@ mod tests { assert_eq!(try_format(CompactUint { value: 0xff }), [0xfd, 0xff, 0]); let u32_cuint = CompactUint { value: 0xffff + 1 }; assert_eq!(try_format(u32_cuint), [0xfe, 0, 0, 1, 0]); - let u64_cuint = CompactUint { - value: u64::max_value(), - }; + let u64_cuint = CompactUint { value: u64::MAX }; assert_eq!(try_format(u64_cuint), [0xff].repeat(9)); } diff --git a/crates/bitcoin/src/parser.rs b/crates/bitcoin/src/parser.rs index 4fd031e8c0..e684e66db7 100644 --- a/crates/bitcoin/src/parser.rs +++ b/crates/bitcoin/src/parser.rs @@ -346,7 +346,7 @@ fn parse_transaction_input(raw_input: &[u8], version: i32) -> Result<(Transactio // fail if transaction is coinbase and previous index is not 0xffffffff // previous_hash - if is_coinbase && previous_index != u32::max_value() { + if is_coinbase && previous_index != u32::MAX { return Err(Error::MalformedTransaction); } @@ -559,7 +559,7 @@ pub(crate) mod tests { let previous_hash = H256Le::from_hex_le("7b1eabe0209b1fe794124575ef807057c77ada2138ae4fa8d6c4de0398a14f3f"); assert!(matches!(input.source, TransactionInputSource::FromOutput(hash, 0) if hash == previous_hash)); - assert_eq!(input.sequence, u32::max_value()); + assert_eq!(input.sequence, u32::MAX); assert_eq!(input.script.len(), 73); } diff --git a/crates/bitcoin/src/pow.rs b/crates/bitcoin/src/pow.rs index f0727cedeb..4159731662 100644 --- a/crates/bitcoin/src/pow.rs +++ b/crates/bitcoin/src/pow.rs @@ -10,12 +10,7 @@ pub const TARGET_TIMESPAN_DIVISOR: u64 = 4; /// Unrounded Maximum Target /// 0x00000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF -pub const UNROUNDED_MAX_TARGET: U256 = U256([ - ::max_value(), - ::max_value(), - ::max_value(), - 0x0000_0000_ffff_ffffu64, -]); +pub const UNROUNDED_MAX_TARGET: U256 = U256([::MAX, ::MAX, ::MAX, 0x0000_0000_ffff_ffffu64]); // https://github.com/bitcoin/bitcoin/blob/89b910711c004c21b7d67baa888073742f7f94f0/src/pow.cpp#L49-L72 pub fn calculate_next_work_required( diff --git a/crates/bitcoin/src/types.rs b/crates/bitcoin/src/types.rs index 42e9f01dfc..1fa46b57e6 100644 --- a/crates/bitcoin/src/types.rs +++ b/crates/bitcoin/src/types.rs @@ -19,7 +19,6 @@ use alloc::{vec, vec::Vec}; #[cfg(feature = "std")] use codec::alloc::string::String; -#[cfg(feature = "std")] use serde::{Deserialize, Serialize}; /// We also check the coinbase proof in order to defend against the 'leaf-node weakness'. @@ -565,7 +564,7 @@ fn generate_coinbase_transaction( input_builder .with_source(TransactionInputSource::Coinbase(Some(height))) .add_witness(&[0; 32]) - .with_sequence(u32::max_value()); + .with_sequence(u32::MAX); if let Some(script) = input_script { input_builder.with_script(&script); } @@ -591,8 +590,9 @@ pub struct BlockChain { } /// Represents a bitcoin 32 bytes hash digest encoded in little-endian -#[derive(Encode, Decode, Default, PartialEq, Eq, Clone, Copy, Debug, TypeInfo, MaxEncodedLen)] -#[cfg_attr(feature = "std", derive(Serialize, Deserialize))] +#[derive( + Serialize, Deserialize, Encode, Decode, Default, PartialEq, Eq, Clone, Copy, Debug, TypeInfo, MaxEncodedLen, +)] pub struct H256Le { content: [u8; 32], } diff --git a/crates/btc-relay/src/ext.rs b/crates/btc-relay/src/ext.rs index 09afc87679..861698c88d 100644 --- a/crates/btc-relay/src/ext.rs +++ b/crates/btc-relay/src/ext.rs @@ -4,19 +4,20 @@ use mocktopus::macros::mockable; #[cfg_attr(test, mockable)] pub(crate) mod security { use frame_support::dispatch::DispatchError; + use frame_system::pallet_prelude::BlockNumberFor; #[cfg(feature = "runtime-benchmarks")] - pub fn set_active_block_number(n: T::BlockNumber) { + pub fn set_active_block_number(n: BlockNumberFor) { >::set_active_block_number(n) } - pub fn active_block_number() -> T::BlockNumber { + pub fn active_block_number() -> BlockNumberFor { >::active_block_number() } pub fn parachain_block_expired( - opentime: T::BlockNumber, - period: T::BlockNumber, + opentime: BlockNumberFor, + period: BlockNumberFor, ) -> Result { >::parachain_block_expired(opentime, period) } diff --git a/crates/btc-relay/src/lib.rs b/crates/btc-relay/src/lib.rs index 9844414331..c2937d26d4 100644 --- a/crates/btc-relay/src/lib.rs +++ b/crates/btc-relay/src/lib.rs @@ -64,7 +64,7 @@ use frame_support::{ traits::Get, transactional, }; -use frame_system::ensure_signed; +use frame_system::{ensure_signed, pallet_prelude::BlockNumberFor}; use sp_core::{H256, U256}; use sp_runtime::traits::{CheckedAdd, CheckedDiv, CheckedSub, One}; use sp_std::{ @@ -99,11 +99,11 @@ pub mod pallet { type WeightInfo: WeightInfo; #[pallet::constant] - type ParachainBlocksPerBitcoinBlock: Get<::BlockNumber>; + type ParachainBlocksPerBitcoinBlock: Get>; } #[pallet::hooks] - impl Hooks for Pallet {} + impl Hooks> for Pallet {} #[pallet::call] impl Pallet { @@ -323,7 +323,7 @@ pub mod pallet { /// Store Bitcoin block headers #[pallet::storage] pub(super) type BlockHeaders = - StorageMap<_, Blake2_128Concat, H256Le, RichBlockHeader, ValueQuery>; + StorageMap<_, Blake2_128Concat, H256Le, RichBlockHeader>, ValueQuery>; /// Priority queue of BlockChain elements, ordered by the maximum height (descending). /// The first index into this mapping (0) is considered to be the longest chain. The value @@ -366,7 +366,7 @@ pub mod pallet { /// Global security parameter k for stable Parachain transactions #[pallet::storage] #[pallet::getter(fn parachain_confirmations)] - pub(super) type StableParachainConfirmations = StorageValue<_, T::BlockNumber, ValueQuery>; + pub(super) type StableParachainConfirmations = StorageValue<_, BlockNumberFor, ValueQuery>; /// Whether the module should perform difficulty checks. #[pallet::storage] @@ -379,31 +379,20 @@ pub mod pallet { pub(super) type DisableInclusionCheck = StorageValue<_, bool, ValueQuery>; #[pallet::genesis_config] + #[derive(frame_support::DefaultNoBound)] pub struct GenesisConfig { /// Global security parameter k for stable Bitcoin transactions pub bitcoin_confirmations: u32, /// Global security parameter k for stable Parachain transactions - pub parachain_confirmations: T::BlockNumber, + pub parachain_confirmations: BlockNumberFor, /// Whether the module should perform difficulty checks. pub disable_difficulty_check: bool, /// Whether the module should perform inclusion checks. pub disable_inclusion_check: bool, } - #[cfg(feature = "std")] - impl Default for GenesisConfig { - fn default() -> Self { - Self { - bitcoin_confirmations: Default::default(), - parachain_confirmations: Default::default(), - disable_difficulty_check: Default::default(), - disable_inclusion_check: Default::default(), - } - } - } - #[pallet::genesis_build] - impl GenesisBuild for GenesisConfig { + impl BuildGenesisConfig for GenesisConfig { fn build(&self) { StableBitcoinConfirmations::::put(self.bitcoin_confirmations); StableParachainConfirmations::::put(self.parachain_confirmations); @@ -426,12 +415,7 @@ pub const ACCEPTED_MAX_TRANSACTION_OUTPUTS: usize = 3; /// Unrounded Maximum Target /// 0x00000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF -pub const UNROUNDED_MAX_TARGET: U256 = U256([ - ::max_value(), - ::max_value(), - ::max_value(), - 0x0000_0000_ffff_ffffu64, -]); +pub const UNROUNDED_MAX_TARGET: U256 = U256([::MAX, ::MAX, ::MAX, 0x0000_0000_ffff_ffffu64]); /// Main chain id pub const MAIN_CHAIN_ID: u32 = 0; @@ -706,20 +690,20 @@ impl Pallet { } pub fn has_request_expired( - opentime: T::BlockNumber, + opentime: BlockNumberFor, btc_open_height: u32, - period: T::BlockNumber, + period: BlockNumberFor, ) -> Result { Ok(ext::security::parachain_block_expired::(opentime, period)? && Self::bitcoin_block_expired(btc_open_height, period)?) } - pub fn bitcoin_expiry_height(btc_open_height: u32, period: T::BlockNumber) -> Result { + pub fn bitcoin_expiry_height(btc_open_height: u32, period: BlockNumberFor) -> Result { // calculate num_bitcoin_blocks as ceil(period / ParachainBlocksPerBitcoinBlock) let num_bitcoin_blocks: u32 = period .checked_add(&T::ParachainBlocksPerBitcoinBlock::get()) .ok_or(Error::::ArithmeticOverflow)? - .checked_sub(&T::BlockNumber::one()) + .checked_sub(&BlockNumberFor::::one()) .ok_or(Error::::ArithmeticUnderflow)? .checked_div(&T::ParachainBlocksPerBitcoinBlock::get()) .ok_or(Error::::ArithmeticUnderflow)? @@ -731,7 +715,7 @@ impl Pallet { .ok_or(Error::::ArithmeticOverflow)?) } - pub fn bitcoin_block_expired(btc_open_height: u32, period: T::BlockNumber) -> Result { + pub fn bitcoin_block_expired(btc_open_height: u32, period: BlockNumberFor) -> Result { let expiration_height = Self::bitcoin_expiry_height(btc_open_height, period)?; // Note that we check stictly greater than. This ensures that at least @@ -797,7 +781,7 @@ impl Pallet { } /// Get a block header from its hash - fn get_block_header_from_hash(block_hash: H256Le) -> Result, DispatchError> { + fn get_block_header_from_hash(block_hash: H256Le) -> Result>, DispatchError> { BlockHeaders::::try_get(block_hash).or(Err(Error::::BlockNotFound.into())) } @@ -810,7 +794,7 @@ impl Pallet { fn get_block_header_from_height( blockchain: &BlockChain, block_height: u32, - ) -> Result, DispatchError> { + ) -> Result>, DispatchError> { let block_hash = Self::get_block_hash(blockchain.chain_id, block_height)?; Self::get_block_header_from_hash(block_hash) } @@ -838,7 +822,7 @@ impl Pallet { } /// Set a new block header - fn set_block_header_from_hash(hash: H256Le, header: &RichBlockHeader) { + fn set_block_header_from_hash(hash: H256Le, header: &RichBlockHeader>) { BlockHeaders::::insert(hash, header); } @@ -952,7 +936,7 @@ impl Pallet { fn verify_block_header( block_header: &BlockHeader, block_height: u32, - prev_block_header: RichBlockHeader, + prev_block_header: RichBlockHeader>, ) -> Result<(), DispatchError> { // Check that the block header is not yet stored in BTC-Relay ensure!( @@ -986,7 +970,7 @@ impl Pallet { /// * `prev_block_header`: previous block header /// * `block_height` : block height of new target fn compute_new_target( - prev_block_header: &RichBlockHeader, + prev_block_header: &RichBlockHeader>, block_height: u32, ) -> Result { // time of last retarget (first block in current difficulty period) @@ -1110,7 +1094,7 @@ impl Pallet { /// Transfers the given block to the main chain. If this would overwrite a block already in the /// main chain, then the overwritten block is moved to to `chain_id_for_old_main_blocks`. fn swap_block_to_mainchain( - block: RichBlockHeader, + block: RichBlockHeader>, chain_id_for_old_main_blocks: u32, ) -> Result<(), DispatchError> { let block_height = block.block_height; @@ -1139,7 +1123,7 @@ impl Pallet { // returns (child, parent) fn enumerate_chain_links( start: H256Le, - ) -> impl Iterator, RichBlockHeader), DispatchError>> + ) -> impl Iterator>, RichBlockHeader>), DispatchError>> { let child = Self::get_block_header_from_hash(start); @@ -1317,7 +1301,7 @@ impl Pallet { /// # Arguments /// /// * `para_height` - height of the parachain when the block was stored - pub fn check_parachain_confirmations(para_height: T::BlockNumber) -> Result<(), DispatchError> { + pub fn check_parachain_confirmations(para_height: BlockNumberFor) -> Result<(), DispatchError> { let current_height = ext::security::active_block_number::(); ensure!( diff --git a/crates/btc-relay/src/mock.rs b/crates/btc-relay/src/mock.rs index e8f28cd2bc..ab620a61e0 100644 --- a/crates/btc-relay/src/mock.rs +++ b/crates/btc-relay/src/mock.rs @@ -2,29 +2,25 @@ use crate as btc_relay; use crate::{Config, Error}; use frame_support::{ parameter_types, - traits::{ConstU32, Everything, GenesisBuild}, + traits::{ConstU32, Everything}, }; use mocktopus::mocking::clear_mocks; use sp_core::H256; use sp_runtime::{ - testing::Header, traits::{BlakeTwo256, IdentityLookup}, + BuildStorage, }; pub const BITCOIN_CONFIRMATIONS: u32 = 6; pub const PARACHAIN_CONFIRMATIONS: u64 = 20; -type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; type Block = frame_system::mocking::MockBlock; // Configure a mock runtime to test the pallet. frame_support::construct_runtime!( - pub enum Test where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, + pub enum Test { - System: frame_system::{Pallet, Call, Storage, Config, Event}, + System: frame_system::{Pallet, Call, Storage, Config, Event}, Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent}, // Operational @@ -36,7 +32,7 @@ frame_support::construct_runtime!( pub type AccountId = u64; pub type BlockNumber = u64; pub type Moment = u64; -pub type Index = u64; +pub type Nonce = u64; parameter_types! { pub const BlockHashCount: u64 = 250; @@ -50,13 +46,12 @@ impl frame_system::Config for Test { type DbWeight = (); type RuntimeOrigin = RuntimeOrigin; type RuntimeCall = RuntimeCall; - type Index = Index; - type BlockNumber = BlockNumber; + type Nonce = Nonce; + type Block = Block; type Hash = H256; type Hashing = BlakeTwo256; type AccountId = AccountId; type Lookup = IdentityLookup; - type Header = Header; type RuntimeEvent = RuntimeEvent; type BlockHashCount = BlockHashCount; type Version = (); @@ -103,7 +98,7 @@ pub struct ExtBuilder; impl ExtBuilder { pub fn build() -> sp_io::TestExternalities { - let mut storage = frame_system::GenesisConfig::default().build_storage::().unwrap(); + let mut storage = frame_system::GenesisConfig::::default().build_storage().unwrap(); btc_relay::GenesisConfig:: { bitcoin_confirmations: BITCOIN_CONFIRMATIONS, diff --git a/crates/clients-info/Cargo.toml b/crates/clients-info/Cargo.toml index 3166db3ab8..ca11399468 100644 --- a/crates/clients-info/Cargo.toml +++ b/crates/clients-info/Cargo.toml @@ -5,7 +5,7 @@ authors = ["Interlay Ltd"] edition = "2021" [dependencies] -serde = { version = "1.0.130", default-features = false, features = ["derive"], optional = true } +serde = { version = "1.0.130", default-features = false, features = ["derive"] } codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false, features = ["derive", "max-encoded-len"] } scale-info = { version = "2.2.0", default-features = false, features = ["derive"] } @@ -28,7 +28,7 @@ frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = [features] default = ["std"] std = [ - "serde", + "serde/std", "codec/std", "scale-info/std", diff --git a/crates/clients-info/src/mock.rs b/crates/clients-info/src/mock.rs index 9cedd6a2ac..540bb8c563 100644 --- a/crates/clients-info/src/mock.rs +++ b/crates/clients-info/src/mock.rs @@ -6,29 +6,23 @@ use frame_support::{ }; use sp_core::H256; use sp_runtime::{ - generic::Header as GenericHeader, traits::{BlakeTwo256, IdentityLookup}, + BuildStorage, }; -type Header = GenericHeader; -type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; type Block = frame_system::mocking::MockBlock; // Configure a mock runtime to test the pallet. frame_support::construct_runtime!( - pub enum Test where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, + pub enum Test { - System: frame_system::{Pallet, Call, Storage, Config, Event}, + System: frame_system::{Pallet, Call, Storage, Config, Event}, ClientsInfo: clients_info::{Pallet, Call, Storage, Event} } ); pub type AccountId = u64; -pub type BlockNumber = u64; -pub type Index = u64; +pub type Nonce = u64; parameter_types! { pub const BlockHashCount: u64 = 250; @@ -42,13 +36,12 @@ impl frame_system::Config for Test { type DbWeight = (); type RuntimeOrigin = RuntimeOrigin; type RuntimeCall = RuntimeCall; - type Index = Index; - type BlockNumber = BlockNumber; + type Nonce = Nonce; + type Block = Block; type Hash = H256; type Hashing = BlakeTwo256; type AccountId = AccountId; type Lookup = IdentityLookup; - type Header = Header; type RuntimeEvent = RuntimeEvent; type BlockHashCount = BlockHashCount; type Version = (); @@ -73,7 +66,7 @@ pub struct ExtBuilder; impl ExtBuilder { pub fn build() -> sp_io::TestExternalities { - let storage = frame_system::GenesisConfig::default().build_storage::().unwrap(); + let storage = frame_system::GenesisConfig::::default().build_storage().unwrap(); storage.into() } diff --git a/crates/collator-selection/src/benchmarking.rs b/crates/collator-selection/src/benchmarking.rs index d112c83dd7..ded7bbcb3e 100644 --- a/crates/collator-selection/src/benchmarking.rs +++ b/crates/collator-selection/src/benchmarking.rs @@ -101,6 +101,7 @@ fn register_candidates(count: u32) { )] pub mod benchmarks { use super::*; + use frame_system::pallet_prelude::BlockNumberFor; #[benchmark] fn set_invulnerables(b: Linear<1, 100>) { @@ -202,7 +203,7 @@ pub mod benchmarks { >::put(BalanceOf::::max_value() / 4u32.into()); T::RewardsCurrency::make_free_balance_be(&>::account_id(), 2000u32.into()); let author = account("author", 0, SEED); - let new_block: T::BlockNumber = 10u32.into(); + let new_block: BlockNumberFor = 10u32.into(); frame_system::Pallet::::set_block_number(new_block); assert!(T::RewardsCurrency::free_balance(&author) == 0u32.into()); @@ -226,8 +227,8 @@ pub mod benchmarks { register_validators::(c); register_candidates::(c); - let new_block: T::BlockNumber = 1800u32.into(); - let zero_block: T::BlockNumber = 0u32.into(); + let new_block: BlockNumberFor = 1800u32.into(); + let zero_block: BlockNumberFor = 0u32.into(); let candidates = >::get(); let non_removals = c.saturating_sub(r); diff --git a/crates/collator-selection/src/lib.rs b/crates/collator-selection/src/lib.rs index d9062960bd..7a801ccd23 100644 --- a/crates/collator-selection/src/lib.rs +++ b/crates/collator-selection/src/lib.rs @@ -61,7 +61,6 @@ pub mod pallet { use core::ops::Div; use frame_support::{ dispatch::{DispatchClass, DispatchResultWithPostInfo}, - inherent::Vec, pallet_prelude::*, sp_runtime::{ traits::{AccountIdConversion, CheckedSub, Saturating, Zero}, @@ -74,6 +73,7 @@ pub mod pallet { use pallet_session::SessionManager; use sp_runtime::traits::Convert; use sp_staking::SessionIndex; + use sp_std::prelude::*; type BalanceOf = <::StakingCurrency as Currency<::AccountId>>::Balance; @@ -118,7 +118,7 @@ pub mod pallet { type MaxInvulnerables: Get; // Will be kicked if block is not produced in threshold. - type KickThreshold: Get; + type KickThreshold: Get>; /// A stable ID for a validator. type ValidatorId: Member + Parameter; @@ -161,7 +161,7 @@ pub mod pallet { /// Last block authored by collator. #[pallet::storage] #[pallet::getter(fn last_authored_block)] - pub type LastAuthoredBlock = StorageMap<_, Twox64Concat, T::AccountId, T::BlockNumber, ValueQuery>; + pub type LastAuthoredBlock = StorageMap<_, Twox64Concat, T::AccountId, BlockNumberFor, ValueQuery>; /// Desired number of candidates. /// @@ -178,27 +178,20 @@ pub mod pallet { pub type CandidacyBond = StorageValue<_, BalanceOf, ValueQuery>; #[pallet::genesis_config] + #[derive(frame_support::DefaultNoBound)] pub struct GenesisConfig { pub invulnerables: Vec, pub candidacy_bond: BalanceOf, pub desired_candidates: u32, } - #[cfg(feature = "std")] - impl Default for GenesisConfig { - fn default() -> Self { - Self { - invulnerables: Default::default(), - candidacy_bond: Default::default(), - desired_candidates: Default::default(), - } - } - } - #[pallet::genesis_build] - impl GenesisBuild for GenesisConfig { + impl BuildGenesisConfig for GenesisConfig { fn build(&self) { - let duplicate_invulnerables = self.invulnerables.iter().collect::>(); + let duplicate_invulnerables = self + .invulnerables + .iter() + .collect::>(); assert!( duplicate_invulnerables.len() == self.invulnerables.len(), "duplicate invulnerables in genesis." @@ -466,7 +459,7 @@ pub mod pallet { /// Keep track of number of authored blocks per authority, uncles are counted as well since /// they're a valid proof of being online. - impl pallet_authorship::EventHandler + impl pallet_authorship::EventHandler> for Pallet { fn note_author(author: T::AccountId) { diff --git a/crates/collator-selection/src/mock.rs b/crates/collator-selection/src/mock.rs index 4997a5ecc0..9fef536aad 100644 --- a/crates/collator-selection/src/mock.rs +++ b/crates/collator-selection/src/mock.rs @@ -17,29 +17,25 @@ use super::*; use crate as collator_selection; use frame_support::{ ord_parameter_types, parameter_types, - traits::{FindAuthor, GenesisBuild, ValidatorRegistration}, + traits::{FindAuthor, ValidatorRegistration}, PalletId, }; use frame_system as system; use frame_system::EnsureSignedBy; use sp_core::H256; use sp_runtime::{ - testing::{Header, UintAuthorityId}, - traits::{BlakeTwo256, IdentityLookup, OpaqueKeys}, - RuntimeAppPublic, + testing::UintAuthorityId, + traits::{BlakeTwo256, ConstBool, IdentityLookup, OpaqueKeys}, + BuildStorage, RuntimeAppPublic, }; -type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; type Block = frame_system::mocking::MockBlock; // Configure a mock runtime to test the pallet. frame_support::construct_runtime!( - pub enum Test where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, + pub enum Test { - System: frame_system::{Pallet, Call, Config, Storage, Event}, + System: frame_system::{Pallet, Call, Storage, Config, Event}, Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent}, Session: pallet_session::{Pallet, Call, Storage, Event, Config}, Aura: pallet_aura::{Pallet, Storage, Config}, @@ -61,13 +57,12 @@ impl system::Config for Test { type DbWeight = (); type RuntimeOrigin = RuntimeOrigin; type RuntimeCall = RuntimeCall; - type Index = u64; - type BlockNumber = u64; + type Nonce = u64; + type Block = Block; type Hash = H256; type Hashing = BlakeTwo256; type AccountId = u64; type Lookup = IdentityLookup; - type Header = Header; type RuntimeEvent = RuntimeEvent; type BlockHashCount = BlockHashCount; type Version = (); @@ -96,7 +91,7 @@ impl pallet_balances::Config for Test { type MaxLocks = (); type MaxReserves = MaxReserves; type ReserveIdentifier = [u8; 8]; - type HoldIdentifier = (); + type RuntimeHoldReason = (); type FreezeIdentifier = (); type MaxFreezes = (); type MaxHolds = (); @@ -132,6 +127,7 @@ impl pallet_aura::Config for Test { type AuthorityId = sp_consensus_aura::sr25519::AuthorityId; type MaxAuthorities = MaxAuthorities; type DisabledValidators = (); + type AllowMultipleBlocksPerSlot = ConstBool; } sp_runtime::impl_opaque_keys! { @@ -226,7 +222,7 @@ impl Config for Test { pub fn new_test_ext() -> sp_io::TestExternalities { sp_tracing::try_init_simple(); - let mut t = frame_system::GenesisConfig::default().build_storage::().unwrap(); + let mut t = frame_system::GenesisConfig::::default().build_storage().unwrap(); let invulnerables = vec![1, 2]; let balances = vec![(1, 100), (2, 100), (3, 100), (4, 100), (5, 100)]; diff --git a/crates/collator-selection/src/tests.rs b/crates/collator-selection/src/tests.rs index 71e6e62c06..d7d79bc246 100644 --- a/crates/collator-selection/src/tests.rs +++ b/crates/collator-selection/src/tests.rs @@ -16,10 +16,10 @@ use crate::{self as collator_selection, mock::*, CandidateInfo, Error}; use frame_support::{ assert_noop, assert_ok, - traits::{Currency, GenesisBuild, OnInitialize}, + traits::{Currency, OnInitialize}, }; use pallet_balances::Error as BalancesError; -use sp_runtime::traits::BadOrigin; +use sp_runtime::{traits::BadOrigin, BuildStorage}; #[test] fn basic_setup_works() { @@ -425,7 +425,7 @@ fn should_kick_mechanism_below_balance() { #[should_panic = "duplicate invulnerables in genesis."] fn cannot_set_genesis_value_twice() { sp_tracing::try_init_simple(); - let mut t = frame_system::GenesisConfig::default().build_storage::().unwrap(); + let mut t = frame_system::GenesisConfig::::default().build_storage().unwrap(); let invulnerables = vec![1, 1]; let collator_selection = collator_selection::GenesisConfig:: { diff --git a/crates/currency/Cargo.toml b/crates/currency/Cargo.toml index 617d2f461f..8acf8b3612 100644 --- a/crates/currency/Cargo.toml +++ b/crates/currency/Cargo.toml @@ -7,7 +7,7 @@ name = "currency" version = "1.2.0" [dependencies] -serde = { version = "1.0.130", default-features = false, features = ["derive"], optional = true } +serde = { version = "1.0.130", default-features = false, features = ["derive"] } codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false, features = ["derive", "max-encoded-len"] } scale-info = { version = "2.2.0", default-features = false, features = ["derive"] } @@ -38,7 +38,7 @@ sp-arithmetic = { git = "https://github.com/paritytech/substrate", branch = "pol [features] default = ["std"] std = [ - "serde", + "serde/std", "codec/std", "scale-info/std", diff --git a/crates/currency/src/mock.rs b/crates/currency/src/mock.rs index 63073c6277..bac9d6d523 100644 --- a/crates/currency/src/mock.rs +++ b/crates/currency/src/mock.rs @@ -7,22 +7,18 @@ pub use primitives::{CurrencyId::Token, TokenSymbol::*}; use sp_arithmetic::{FixedI128, FixedU128}; use sp_core::H256; use sp_runtime::{ - testing::Header, traits::{BlakeTwo256, IdentityLookup}, + BuildStorage, }; -type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; type Block = frame_system::mocking::MockBlock; // Configure a mock runtime to test the pallet. frame_support::construct_runtime!( - pub enum Test where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, + pub enum Test { // substrate pallets - System: frame_system::{Pallet, Call, Storage, Config, Event}, + System: frame_system::{Pallet, Call, Storage, Config, Event}, Tokens: orml_tokens::{Pallet, Storage, Config, Event}, // Operational @@ -32,13 +28,12 @@ frame_support::construct_runtime!( pub type AccountId = u64; pub type Balance = u128; -pub type BlockNumber = u64; pub type UnsignedFixedPoint = FixedU128; pub type SignedFixedPoint = FixedI128; pub type SignedInner = i128; pub type CurrencyId = primitives::CurrencyId; pub type Moment = u64; -pub type Index = u64; +pub type Nonce = u64; parameter_types! { pub const BlockHashCount: u64 = 250; @@ -52,13 +47,12 @@ impl frame_system::Config for Test { type DbWeight = (); type RuntimeOrigin = RuntimeOrigin; type RuntimeCall = RuntimeCall; - type Index = Index; - type BlockNumber = BlockNumber; + type Nonce = Nonce; + type Block = Block; type Hash = H256; type Hashing = BlakeTwo256; type AccountId = AccountId; type Lookup = IdentityLookup; - type Header = Header; type RuntimeEvent = RuntimeEvent; type BlockHashCount = BlockHashCount; type Version = (); @@ -128,8 +122,7 @@ pub struct ExtBuilder; impl ExtBuilder { pub fn build() -> sp_io::TestExternalities { - let storage = frame_system::GenesisConfig::default().build_storage::().unwrap(); - + let storage = frame_system::GenesisConfig::::default().build_storage().unwrap(); sp_io::TestExternalities::from(storage) } } diff --git a/crates/democracy/Cargo.toml b/crates/democracy/Cargo.toml index 8b394b80e2..3e5c600181 100644 --- a/crates/democracy/Cargo.toml +++ b/crates/democracy/Cargo.toml @@ -14,7 +14,7 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] log = { version = "0.4.17", default-features = false } -serde = { version = "1.0.130", default-features = false, features = ["derive"], optional = true } +serde = { version = "1.0.130", default-features = false, features = ["derive"] } codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false, features = ["derive", "max-encoded-len"] } scale-info = { version = "2.2.0", default-features = false, features = ["derive"] } @@ -36,7 +36,7 @@ pallet-preimage = { git = "https://github.com/paritytech/substrate", branch = "p [features] default = ["std"] std = [ - "serde", + "serde/std", "codec/std", "scale-info/std", "sp-core/std", diff --git a/crates/democracy/src/lib.rs b/crates/democracy/src/lib.rs index 81a6ee50fc..ceb7c6355f 100644 --- a/crates/democracy/src/lib.rs +++ b/crates/democracy/src/lib.rs @@ -78,6 +78,7 @@ use frame_support::{ transactional, weights::Weight, }; +use frame_system::pallet_prelude::BlockNumberFor; use sp_runtime::{ traits::{One, Saturating, Zero}, ArithmeticError, DispatchError, DispatchResult, @@ -138,7 +139,7 @@ pub mod pallet { type RuntimeEvent: From> + IsType<::RuntimeEvent>; /// The Scheduler. - type Scheduler: ScheduleNamed, Self::PalletsOrigin>; + type Scheduler: ScheduleNamed, CallOf, Self::PalletsOrigin>; /// The Preimage provider. type Preimages: QueryPreimage + StorePreimage; @@ -152,15 +153,15 @@ pub mod pallet { /// voting stakers have an opportunity to remove themselves from the system in the case /// where they are on the losing side of a vote. #[pallet::constant] - type EnactmentPeriod: Get; + type EnactmentPeriod: Get>; /// How often (in blocks) to check for new votes. #[pallet::constant] - type VotingPeriod: Get; + type VotingPeriod: Get>; /// Minimum voting period allowed for a fast-track referendum. #[pallet::constant] - type FastTrackVotingPeriod: Get; + type FastTrackVotingPeriod: Get>; /// The minimum amount to be used as a deposit for a public referendum proposal. #[pallet::constant] @@ -241,7 +242,7 @@ pub mod pallet { #[pallet::storage] #[pallet::getter(fn referendum_info)] pub type ReferendumInfoOf = - StorageMap<_, Twox64Concat, ReferendumIndex, ReferendumInfo, BalanceOf>>; + StorageMap<_, Twox64Concat, ReferendumIndex, ReferendumInfo, BoundedCallOf, BalanceOf>>; /// All votes for a particular voter. We store the balance for the number of votes that we /// have recorded. @@ -255,23 +256,14 @@ pub mod pallet { pub type NextLaunchTimestamp = StorageValue<_, u64, ValueQuery>; #[pallet::genesis_config] + #[derive(frame_support::DefaultNoBound)] pub struct GenesisConfig { _phantom: sp_std::marker::PhantomData, next_launch_timestamp: u64, } - #[cfg(feature = "std")] - impl Default for GenesisConfig { - fn default() -> Self { - GenesisConfig { - _phantom: Default::default(), - next_launch_timestamp: 0, - } - } - } - #[pallet::genesis_build] - impl GenesisBuild for GenesisConfig { + impl BuildGenesisConfig for GenesisConfig { fn build(&self) { PublicPropCount::::put(0 as PropIndex); ReferendumCount::::put(0 as ReferendumIndex); @@ -358,7 +350,7 @@ pub mod pallet { #[pallet::hooks] impl Hooks> for Pallet { /// Weight: see `begin_block` - fn on_initialize(n: T::BlockNumber) -> Weight { + fn on_initialize(n: BlockNumberFor) -> Weight { Self::begin_block(n).unwrap_or_else(|e| { sp_runtime::print(e); Weight::from_parts(0 as u64, 0u64) @@ -473,7 +465,7 @@ pub mod pallet { pub fn fast_track( origin: OriginFor, #[pallet::compact] prop_index: PropIndex, - delay: T::BlockNumber, + delay: BlockNumberFor, ) -> DispatchResult { T::FastTrackOrigin::ensure_origin(origin)?; Self::fast_track_with_voting_period(prop_index, delay, T::FastTrackVotingPeriod::get()) @@ -495,7 +487,7 @@ pub mod pallet { pub fn table_proposal( origin: OriginFor, #[pallet::compact] prop_index: PropIndex, - delay: T::BlockNumber, + delay: BlockNumberFor, ) -> DispatchResult { T::FastTrackOrigin::ensure_origin(origin)?; Self::fast_track_with_voting_period(prop_index, delay, T::VotingPeriod::get()) @@ -658,10 +650,10 @@ impl Pallet { /// Get all referenda ready for tally at block `n`. pub fn maturing_referenda_at( - n: T::BlockNumber, + n: BlockNumberFor, ) -> Vec<( ReferendumIndex, - ReferendumStatus, BalanceOf>, + ReferendumStatus, BoundedCallOf, BalanceOf>, )> { let next = Self::lowest_unbaked(); let last = Self::referendum_count(); @@ -669,11 +661,11 @@ impl Pallet { } fn maturing_referenda_at_inner( - n: T::BlockNumber, + n: BlockNumberFor, range: core::ops::Range, ) -> Vec<( ReferendumIndex, - ReferendumStatus, BalanceOf>, + ReferendumStatus, BoundedCallOf, BalanceOf>, )> { range .into_iter() @@ -692,7 +684,7 @@ impl Pallet { pub fn internal_start_referendum( proposal: BoundedCallOf, threshold: VoteThreshold, - delay: T::BlockNumber, + delay: BlockNumberFor, ) -> ReferendumIndex { >::inject_referendum( >::block_number().saturating_add(T::VotingPeriod::get()), @@ -716,8 +708,8 @@ impl Pallet { fn fast_track_with_voting_period( prop_index: PropIndex, - delay: T::BlockNumber, - voting_period: T::BlockNumber, + delay: BlockNumberFor, + voting_period: BlockNumberFor, ) -> DispatchResult { let mut public_props = Self::public_props(); let (winner_index, _) = public_props @@ -749,8 +741,8 @@ impl Pallet { /// Ok if the given referendum is active, Err otherwise fn ensure_ongoing( - r: ReferendumInfo, BalanceOf>, - ) -> Result, BalanceOf>, DispatchError> { + r: ReferendumInfo, BoundedCallOf, BalanceOf>, + ) -> Result, BoundedCallOf, BalanceOf>, DispatchError> { match r { ReferendumInfo::Ongoing(s) => Ok(s), _ => Err(Error::::ReferendumInvalid.into()), @@ -759,7 +751,7 @@ impl Pallet { fn referendum_status( ref_index: ReferendumIndex, - ) -> Result, BalanceOf>, DispatchError> { + ) -> Result, BoundedCallOf, BalanceOf>, DispatchError> { let info = ReferendumInfoOf::::get(ref_index).ok_or(Error::::ReferendumInvalid)?; Self::ensure_ongoing(info) } @@ -822,10 +814,10 @@ impl Pallet { /// Start a referendum fn inject_referendum( - end: T::BlockNumber, + end: BlockNumberFor, proposal: BoundedCallOf, threshold: VoteThreshold, - delay: T::BlockNumber, + delay: BlockNumberFor, ) -> ReferendumIndex { let ref_index = Self::referendum_count(); ReferendumCount::::put(ref_index + 1); @@ -843,12 +835,12 @@ impl Pallet { } /// Table the next waiting proposal for a vote. - fn launch_next(now: T::BlockNumber) -> DispatchResult { + fn launch_next(now: BlockNumberFor) -> DispatchResult { Self::launch_public(now).map_err(|_| Error::::NoneWaiting.into()) } /// Table the waiting public proposal with the highest backing for a vote. - fn launch_public(now: T::BlockNumber) -> DispatchResult { + fn launch_public(now: BlockNumberFor) -> DispatchResult { let mut public_props = Self::public_props(); if let Some((winner_index, _)) = public_props.iter().enumerate().max_by_key( // defensive only: All current public proposals have an amount locked @@ -880,9 +872,9 @@ impl Pallet { } fn bake_referendum( - now: T::BlockNumber, + now: BlockNumberFor, index: ReferendumIndex, - status: ReferendumStatus, BalanceOf>, + status: ReferendumStatus, BoundedCallOf, BalanceOf>, ) -> Result { let total_issuance = T::Currency::total_issuance(); let approved = status.threshold.approved(status.tally, total_issuance); @@ -925,7 +917,7 @@ impl Pallet { /// - Db writes: `PublicProps`, `account`, `ReferendumCount`, `DepositOf`, `ReferendumInfoOf` /// - Db reads per R: `DepositOf`, `ReferendumInfoOf` /// # - fn begin_block(now: T::BlockNumber) -> Result { + fn begin_block(now: BlockNumberFor) -> Result { let max_block_weight = T::BlockWeights::get().max_block; let mut weight = Weight::from_parts(0 as u64, 0u64); diff --git a/crates/democracy/src/migrations.rs b/crates/democracy/src/migrations.rs index b2b18544d4..1a8c98a35d 100644 --- a/crates/democracy/src/migrations.rs +++ b/crates/democracy/src/migrations.rs @@ -40,7 +40,7 @@ mod v0 { Pallet, Identity, ::Hash, - PreimageStatus<::AccountId, BalanceOf, ::BlockNumber>, + PreimageStatus<::AccountId, BalanceOf, BlockNumberFor>, >; #[cfg(feature = "try-runtime")] @@ -49,19 +49,22 @@ mod v0 { Pallet, frame_support::Twox64Concat, ReferendumIndex, - ReferendumInfo<::BlockNumber, ::Hash, BalanceOf>, + ReferendumInfo, ::Hash, BalanceOf>, >; } pub mod v1 { use super::*; + use frame_system::pallet_prelude::BlockNumberFor; + #[cfg(feature = "try-runtime")] + use sp_runtime::TryRuntimeError; /// Migration for translating bare `Hash`es into `Bounded`s. pub struct Migration(sp_std::marker::PhantomData); impl> OnRuntimeUpgrade for Migration { #[cfg(feature = "try-runtime")] - fn pre_upgrade() -> Result, &'static str> { + fn pre_upgrade() -> Result, TryRuntimeError> { assert_eq!(StorageVersion::get::>(), 0, "can only upgrade from version 0"); let props_count = v0::PublicProps::::get().len(); @@ -86,7 +89,7 @@ pub mod v1 { return weight; } - ReferendumInfoOf::::translate(|index, old: ReferendumInfo>| { + ReferendumInfoOf::::translate(|index, old: ReferendumInfo, T::Hash, BalanceOf>| { weight.saturating_accrue(T::DbWeight::get().reads_writes(1, 1)); log::info!(target: TARGET, "migrating referendum #{:?}", &index); Some(match old { @@ -154,7 +157,7 @@ pub mod v1 { } #[cfg(feature = "try-runtime")] - fn post_upgrade(state: Vec) -> Result<(), &'static str> { + fn post_upgrade(state: Vec) -> Result<(), TryRuntimeError> { assert_eq!(StorageVersion::get::>(), 1, "must upgrade"); let (old_props_count, old_ref_count): (u32, u32) = diff --git a/crates/democracy/src/tests.rs b/crates/democracy/src/tests.rs index aa18c16601..1494e29318 100644 --- a/crates/democracy/src/tests.rs +++ b/crates/democracy/src/tests.rs @@ -4,16 +4,15 @@ use super::*; use crate as pallet_democracy; use frame_support::{ assert_noop, assert_ok, ord_parameter_types, parameter_types, - traits::{ConstU32, ConstU64, Contains, EqualPrivilegeOnly, GenesisBuild, OnInitialize, SortedMembers}, + traits::{ConstU32, ConstU64, Contains, EqualPrivilegeOnly, OnInitialize, SortedMembers}, weights::Weight, }; use frame_system::{EnsureRoot, EnsureSignedBy}; use pallet_balances::Error as BalancesError; use sp_core::H256; use sp_runtime::{ - testing::Header, traits::{BadOrigin, BlakeTwo256, IdentityLookup}, - Perbill, + BuildStorage, Perbill, }; mod cancellation; @@ -25,16 +24,12 @@ mod voting; const MAX_PROPOSALS: u32 = 100; -type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; type Block = frame_system::mocking::MockBlock; frame_support::construct_runtime!( - pub enum Test where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, + pub enum Test { - System: frame_system::{Pallet, Call, Config, Storage, Event}, + System: frame_system::{Pallet, Call, Storage, Config, Event}, Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, Preimage: pallet_preimage, Scheduler: pallet_scheduler::{Pallet, Call, Storage, Event}, @@ -70,14 +65,13 @@ impl frame_system::Config for Test { type BlockLength = (); type DbWeight = (); type RuntimeOrigin = RuntimeOrigin; - type Index = u64; - type BlockNumber = u64; + type Nonce = u64; + type Block = Block; type RuntimeCall = RuntimeCall; type Hash = H256; type Hashing = BlakeTwo256; type AccountId = u64; type Lookup = IdentityLookup; - type Header = Header; type RuntimeEvent = RuntimeEvent; type BlockHashCount = BlockHashCount; type Version = (); @@ -142,7 +136,7 @@ impl pallet_balances::Config for Test { type ExistentialDeposit = ExistentialDeposit; type AccountStore = System; type WeightInfo = (); - type HoldIdentifier = (); + type RuntimeHoldReason = (); type FreezeIdentifier = (); type MaxFreezes = (); type MaxHolds = (); @@ -197,7 +191,7 @@ impl Config for Test { } pub fn new_test_ext() -> sp_io::TestExternalities { - let mut t = frame_system::GenesisConfig::default().build_storage::().unwrap(); + let mut t = frame_system::GenesisConfig::::default().build_storage().unwrap(); pallet_balances::GenesisConfig:: { balances: vec![(1, 10), (2, 20), (3, 30), (4, 40), (5, 50), (6, 60)], } diff --git a/crates/democracy/src/vote_threshold.rs b/crates/democracy/src/vote_threshold.rs index 354bb125b7..ce948acbeb 100644 --- a/crates/democracy/src/vote_threshold.rs +++ b/crates/democracy/src/vote_threshold.rs @@ -3,14 +3,24 @@ use crate::Tally; use codec::{Decode, Encode, MaxEncodedLen}; use scale_info::TypeInfo; -#[cfg(feature = "std")] use serde::{Deserialize, Serialize}; use sp_runtime::traits::{IntegerSquareRoot, Zero}; use sp_std::ops::{Add, Div, Mul, Rem}; /// A means of determining if a vote is past pass threshold. -#[derive(Clone, Copy, PartialEq, Eq, Encode, Decode, sp_runtime::RuntimeDebug, TypeInfo, MaxEncodedLen)] -#[cfg_attr(feature = "std", derive(Serialize, Deserialize))] +#[derive( + Serialize, + Deserialize, + Clone, + Copy, + PartialEq, + Eq, + Encode, + Decode, + sp_runtime::RuntimeDebug, + TypeInfo, + MaxEncodedLen, +)] pub enum VoteThreshold { /// A supermajority of approvals is needed to pass this vote. SuperMajorityApprove, diff --git a/crates/dex-general/Cargo.toml b/crates/dex-general/Cargo.toml index e5bfccfe3f..aca6443c40 100644 --- a/crates/dex-general/Cargo.toml +++ b/crates/dex-general/Cargo.toml @@ -7,7 +7,7 @@ license = "Apache 2.0" [dependencies] log = { version = "0.4.14", default-features = false } -serde = { version = "1.0.119", optional = true } +serde = { version = "1.0.119", default-features = false } # alias "parity-scale-code" to "codec" codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false } scale-info = { version = "2.1.1", default-features = false, features = ["derive"] } @@ -35,7 +35,7 @@ proptest = "1.1.0" default = ["std"] std = [ "log/std", - "serde", + "serde/std", "codec/std", "scale-info/std", "sp-core/std", diff --git a/crates/dex-general/rpc/Cargo.toml b/crates/dex-general/rpc/Cargo.toml index 1d783e010d..05d1969a8b 100644 --- a/crates/dex-general/rpc/Cargo.toml +++ b/crates/dex-general/rpc/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" license = "Apache 2.0" [dependencies] -serde = { version = "1.0.119", features = ["derive"], optional = true } +serde = { version = "1.0.119", features = ["derive"] , default-features = false} # alias "parity-scale-code" to "codec" codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false } diff --git a/crates/dex-general/src/fee/mock.rs b/crates/dex-general/src/fee/mock.rs index f521906be5..16e565a5bb 100644 --- a/crates/dex-general/src/fee/mock.rs +++ b/crates/dex-general/src/fee/mock.rs @@ -5,26 +5,36 @@ use codec::{Decode, Encode, MaxEncodedLen}; use scale_info::TypeInfo; -#[cfg(feature = "std")] use serde::{Deserialize, Serialize}; use frame_support::{parameter_types, traits::Contains, PalletId}; use orml_traits::parameter_type_with_key; use sp_core::{ConstU32, H256}; use sp_runtime::{ - testing::Header, traits::{BlakeTwo256, IdentityLookup}, - RuntimeDebug, + BuildStorage, RuntimeDebug, }; use crate as pallet_dex_general; pub use crate::{AssetBalance, Config, GenerateLpAssetId, Pallet, ValidateAsset}; -type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; type Block = frame_system::mocking::MockBlock; -#[derive(Encode, Decode, Eq, PartialEq, Copy, Clone, RuntimeDebug, PartialOrd, Ord, TypeInfo, MaxEncodedLen)] -#[cfg_attr(feature = "std", derive(Serialize, Deserialize))] +#[derive( + Serialize, + Deserialize, + Encode, + Decode, + Eq, + PartialEq, + Copy, + Clone, + RuntimeDebug, + PartialOrd, + Ord, + TypeInfo, + MaxEncodedLen, +)] pub enum CurrencyId { Token(u8), LpToken(u8, u8), @@ -68,12 +78,9 @@ impl From for CurrencyId { } frame_support::construct_runtime!( - pub enum Test where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, + pub enum Test { - System: frame_system::{Pallet, Call, Config, Storage, Event}, + System: frame_system::{Pallet, Call, Storage, Config, Event}, DexGeneral: pallet_dex_general::{Pallet, Call, Storage, Event}, Tokens: orml_tokens::{Pallet, Storage, Event, Config}, } @@ -91,14 +98,13 @@ parameter_types! { impl frame_system::Config for Test { type BaseCallFilter = frame_support::traits::Everything; type RuntimeOrigin = RuntimeOrigin; - type Index = u64; type RuntimeCall = RuntimeCall; - type BlockNumber = u64; + type Nonce = u64; + type Block = Block; type Hash = H256; type Hashing = BlakeTwo256; type AccountId = u128; type Lookup = IdentityLookup; - type Header = Header; type RuntimeEvent = RuntimeEvent; type BlockHashCount = BlockHashCount; type DbWeight = (); @@ -165,7 +171,7 @@ pub struct ExtBuilder; impl ExtBuilder { pub fn build() -> sp_io::TestExternalities { - let storage = frame_system::GenesisConfig::default().build_storage::().unwrap(); + let storage = frame_system::GenesisConfig::::default().build_storage().unwrap(); storage.into() } @@ -174,10 +180,7 @@ impl ExtBuilder { pub type DexPallet = Pallet; pub fn new_test_ext() -> sp_io::TestExternalities { - let mut t = frame_system::GenesisConfig::default() - .build_storage::() - .unwrap() - .into(); + let mut t = frame_system::GenesisConfig::::default().build_storage().unwrap(); pallet_dex_general::GenesisConfig:: { fee_receiver: None, diff --git a/crates/dex-general/src/lib.rs b/crates/dex-general/src/lib.rs index df5b377330..3547be2259 100644 --- a/crates/dex-general/src/lib.rs +++ b/crates/dex-general/src/lib.rs @@ -22,7 +22,7 @@ pub use pallet::*; use codec::{Decode, Encode, FullCodec}; use frame_support::{ - inherent::Vec, pallet_prelude::*, storage::bounded_btree_map::BoundedBTreeMap, traits::Get, PalletId, RuntimeDebug, + pallet_prelude::*, storage::bounded_btree_map::BoundedBTreeMap, traits::Get, PalletId, RuntimeDebug, }; use orml_traits::MultiCurrency; use sp_core::U256; @@ -126,7 +126,7 @@ pub mod pallet { _, Twox64Concat, (T::AssetId, T::AssetId), - PairStatus, + PairStatus, T::AccountId>, ValueQuery, >; @@ -149,7 +149,7 @@ pub mod pallet { _, Twox64Concat, (T::AssetId, T::AssetId), - PairStatus, + PairStatus, T::AccountId>, ValueQuery, >; @@ -174,6 +174,7 @@ pub mod pallet { >; #[pallet::genesis_config] + #[derive(frame_support::DefaultNoBound)] /// Refer: https://github.com/Uniswap/uniswap-v2-core/blob/master/contracts/UniswapV2Pair.sol#L88 pub struct GenesisConfig { /// The receiver of the protocol fee. @@ -183,40 +184,13 @@ pub mod pallet { pub fee_point: u8, } - #[cfg(feature = "std")] - impl Default for GenesisConfig { - fn default() -> Self { - Self { - fee_receiver: None, - fee_point: 5, - } - } - } - #[pallet::genesis_build] - impl GenesisBuild for GenesisConfig { + impl BuildGenesisConfig for GenesisConfig { fn build(&self) { >::put((&self.fee_receiver, &self.fee_point)); } } - #[cfg(feature = "std")] - impl GenesisConfig { - /// Direct implementation of `GenesisBuild::build_storage`. - /// - /// Kept in order not to break dependency. - pub fn build_storage(&self) -> Result { - >::build_storage(self) - } - - /// Direct implementation of `GenesisBuild::assimilate_storage`. - /// - /// Kept in order not to break dependency. - pub fn assimilate_storage(&self, storage: &mut sp_runtime::Storage) -> Result<(), String> { - >::assimilate_storage(self, storage) - } - } - #[pallet::event] #[pallet::generate_deposit(pub(super) fn deposit_event)] pub enum Event { @@ -285,7 +259,7 @@ pub mod pallet { total_supply_1: AssetBalance, capacity_supply_0: AssetBalance, capacity_supply_1: AssetBalance, - end: T::BlockNumber, + end: BlockNumberFor, }, /// Claim a bootstrap pair. @@ -309,7 +283,7 @@ pub mod pallet { total_supply_1: AssetBalance, capacity_supply_0: AssetBalance, capacity_supply_1: AssetBalance, - end: T::BlockNumber, + end: BlockNumberFor, }, /// Refund from disable bootstrap pair. @@ -611,7 +585,7 @@ pub mod pallet { #[pallet::compact] amount_1_desired: AssetBalance, #[pallet::compact] amount_0_min: AssetBalance, #[pallet::compact] amount_1_min: AssetBalance, - #[pallet::compact] deadline: T::BlockNumber, + #[pallet::compact] deadline: BlockNumberFor, ) -> DispatchResult { ensure!( T::EnsurePairAsset::validate_asset(&asset_0) && T::EnsurePairAsset::validate_asset(&asset_1), @@ -656,7 +630,7 @@ pub mod pallet { #[pallet::compact] amount_0_min: AssetBalance, #[pallet::compact] amount_1_min: AssetBalance, recipient: ::Source, - #[pallet::compact] deadline: T::BlockNumber, + #[pallet::compact] deadline: BlockNumberFor, ) -> DispatchResult { ensure!( T::EnsurePairAsset::validate_asset(&asset_0) && T::EnsurePairAsset::validate_asset(&asset_1), @@ -696,7 +670,7 @@ pub mod pallet { #[pallet::compact] amount_out_min: AssetBalance, path: Vec, recipient: ::Source, - #[pallet::compact] deadline: T::BlockNumber, + #[pallet::compact] deadline: BlockNumberFor, ) -> DispatchResult { let who = ensure_signed(origin)?; let recipient = T::Lookup::lookup(recipient)?; @@ -728,7 +702,7 @@ pub mod pallet { #[pallet::compact] amount_in_max: AssetBalance, path: Vec, recipient: ::Source, - #[pallet::compact] deadline: T::BlockNumber, + #[pallet::compact] deadline: BlockNumberFor, ) -> DispatchResult { let who = ensure_signed(origin)?; let recipient = T::Lookup::lookup(recipient)?; @@ -763,7 +737,7 @@ pub mod pallet { #[pallet::compact] target_supply_1: AssetBalance, #[pallet::compact] capacity_supply_0: AssetBalance, #[pallet::compact] capacity_supply_1: AssetBalance, - #[pallet::compact] end: T::BlockNumber, + #[pallet::compact] end: BlockNumberFor, rewards: Vec, limits: Vec<(T::AssetId, AssetBalance)>, ) -> DispatchResult { @@ -884,7 +858,7 @@ pub mod pallet { asset_1: T::AssetId, #[pallet::compact] amount_0_contribute: AssetBalance, #[pallet::compact] amount_1_contribute: AssetBalance, - #[pallet::compact] deadline: T::BlockNumber, + #[pallet::compact] deadline: BlockNumberFor, ) -> DispatchResult { let who = ensure_signed(who)?; @@ -914,7 +888,7 @@ pub mod pallet { recipient: ::Source, asset_0: T::AssetId, asset_1: T::AssetId, - #[pallet::compact] deadline: T::BlockNumber, + #[pallet::compact] deadline: BlockNumberFor, ) -> DispatchResult { let who = ensure_signed(origin)?; let recipient = T::Lookup::lookup(recipient)?; @@ -966,7 +940,7 @@ pub mod pallet { #[pallet::compact] target_supply_1: AssetBalance, #[pallet::compact] capacity_supply_0: AssetBalance, #[pallet::compact] capacity_supply_1: AssetBalance, - #[pallet::compact] end: T::BlockNumber, + #[pallet::compact] end: BlockNumberFor, rewards: Vec, limits: Vec<(T::AssetId, AssetBalance)>, ) -> DispatchResult { diff --git a/crates/dex-general/src/rpc.rs b/crates/dex-general/src/rpc.rs index b19ed2cd5f..59a9616f7f 100644 --- a/crates/dex-general/src/rpc.rs +++ b/crates/dex-general/src/rpc.rs @@ -5,14 +5,12 @@ use codec::{Decode, Encode}; use scale_info::TypeInfo; -#[cfg(feature = "std")] use serde::{Deserialize, Serialize}; use super::*; -#[derive(Encode, Decode, Eq, PartialEq, Copy, Clone, PartialOrd, Ord, TypeInfo)] -#[cfg_attr(feature = "std", derive(Serialize, Deserialize))] -#[cfg_attr(feature = "std", serde(rename_all = "camelCase"))] +#[derive(Serialize, Deserialize, Encode, Decode, Eq, PartialEq, Copy, Clone, PartialOrd, Ord, TypeInfo)] +#[serde(rename_all = "camelCase")] pub struct PairInfo { pub asset_0: AssetId, pub asset_1: AssetId, diff --git a/crates/dex-general/src/swap/mock.rs b/crates/dex-general/src/swap/mock.rs index eefe481467..65d58d77c8 100644 --- a/crates/dex-general/src/swap/mock.rs +++ b/crates/dex-general/src/swap/mock.rs @@ -11,19 +11,30 @@ use frame_support::{parameter_types, traits::Contains, PalletId}; use orml_traits::parameter_type_with_key; use sp_core::{ConstU32, H256}; use sp_runtime::{ - testing::Header, traits::{BlakeTwo256, IdentityLookup}, - RuntimeDebug, + BuildStorage, RuntimeDebug, }; use crate as pallet_dex_general; pub use crate::{AssetBalance, Config, GenerateLpAssetId, Pallet, ValidateAsset}; -type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; type Block = frame_system::mocking::MockBlock; -#[derive(Encode, Decode, Eq, PartialEq, Copy, Clone, RuntimeDebug, PartialOrd, MaxEncodedLen, Ord, TypeInfo)] -#[cfg_attr(feature = "std", derive(Serialize, Deserialize))] +#[derive( + Serialize, + Deserialize, + Encode, + Decode, + Eq, + PartialEq, + Copy, + Clone, + RuntimeDebug, + PartialOrd, + MaxEncodedLen, + Ord, + TypeInfo, +)] pub enum CurrencyId { Token(u8), LpToken(u8, u8), @@ -55,12 +66,9 @@ impl ValidateAsset for EnsurePairAssetImpl { } frame_support::construct_runtime!( - pub enum Test where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, + pub enum Test { - System: frame_system::{Pallet, Call, Config, Storage, Event}, + System: frame_system::{Pallet, Call, Storage, Config, Event}, DexGeneral: pallet_dex_general::{Pallet, Call, Storage, Event}, Tokens: orml_tokens::{Pallet, Storage, Event, Config}, } @@ -78,14 +86,13 @@ parameter_types! { impl frame_system::Config for Test { type BaseCallFilter = frame_support::traits::Everything; type RuntimeOrigin = RuntimeOrigin; - type Index = u64; + type Nonce = u64; + type Block = Block; type RuntimeCall = RuntimeCall; - type BlockNumber = u64; type Hash = H256; type Hashing = BlakeTwo256; type AccountId = u128; type Lookup = IdentityLookup; - type Header = Header; type RuntimeEvent = RuntimeEvent; type BlockHashCount = BlockHashCount; type DbWeight = (); @@ -151,10 +158,7 @@ impl Config for Test { pub type DexPallet = Pallet; pub fn new_test_ext() -> sp_io::TestExternalities { - let mut t = frame_system::GenesisConfig::default() - .build_storage::() - .unwrap() - .into(); + let mut t = frame_system::GenesisConfig::::default().build_storage().unwrap(); pallet_dex_general::GenesisConfig:: { fee_receiver: None, diff --git a/crates/dex-general/src/swap/mod.rs b/crates/dex-general/src/swap/mod.rs index 842fbac661..ddddf6c854 100644 --- a/crates/dex-general/src/swap/mod.rs +++ b/crates/dex-general/src/swap/mod.rs @@ -9,6 +9,7 @@ //! mechanism refers to the design of Uniswap V2. use super::*; +use frame_system::pallet_prelude::BlockNumberFor; #[cfg(test)] mod mock; @@ -922,7 +923,9 @@ impl Pallet { } // After end block, bootstrap has not enough asset. Is will become disable. - pub(crate) fn bootstrap_disable(params: &BootstrapParameter) -> bool { + pub(crate) fn bootstrap_disable( + params: &BootstrapParameter, T::AccountId>, + ) -> bool { let now = frame_system::Pallet::::block_number(); if now > params.end_block_number && (params.accumulated_supply.0 < params.target_supply.0 diff --git a/crates/dex-stable/Cargo.toml b/crates/dex-stable/Cargo.toml index c51b52cac5..29849eebdf 100644 --- a/crates/dex-stable/Cargo.toml +++ b/crates/dex-stable/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" license = "Apache 2.0" [dependencies] -serde = { version = "1.0.119", optional = true } +serde = { version = "1.0.119", default-features = false } codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false } scale-info = { version = "2.1.1", default-features = false, features = ["derive"] } @@ -32,7 +32,7 @@ sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0 [features] default = ["std"] std = [ - "serde", + "serde/std", "codec/std", "scale-info/std", "sp-core/std", diff --git a/crates/dex-stable/rpc/Cargo.toml b/crates/dex-stable/rpc/Cargo.toml index bfe10058dd..1604360545 100644 --- a/crates/dex-stable/rpc/Cargo.toml +++ b/crates/dex-stable/rpc/Cargo.toml @@ -5,7 +5,7 @@ authors = ["Zenlink Developers", "Interlay Ltd"] edition = "2021" [dependencies] -serde = { version = "1.0.119", features = ["derive"], optional = true } +serde = { version = "1.0.119", features = ["derive"] , default-features = false} codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false } jsonrpsee = { version = "0.16.2", features = ["server", "macros"] } diff --git a/crates/dex-stable/src/lib.rs b/crates/dex-stable/src/lib.rs index a0c47c60b0..18cfb5f4f9 100644 --- a/crates/dex-stable/src/lib.rs +++ b/crates/dex-stable/src/lib.rs @@ -479,7 +479,7 @@ pub mod pallet { amounts: Vec, min_mint_amount: Balance, to: T::AccountId, - deadline: T::BlockNumber, + deadline: BlockNumberFor, ) -> DispatchResult { let who = ensure_signed(origin)?; @@ -512,7 +512,7 @@ pub mod pallet { in_amount: Balance, min_out_amount: Balance, to: T::AccountId, - deadline: T::BlockNumber, + deadline: BlockNumberFor, ) -> DispatchResult { let who = ensure_signed(origin)?; @@ -549,7 +549,7 @@ pub mod pallet { lp_amount: Balance, min_amounts: Vec, to: T::AccountId, - deadline: T::BlockNumber, + deadline: BlockNumberFor, ) -> DispatchResult { let who = ensure_signed(origin)?; @@ -580,7 +580,7 @@ pub mod pallet { index: u32, min_amount: Balance, to: T::AccountId, - deadline: T::BlockNumber, + deadline: BlockNumberFor, ) -> DispatchResult { let who = ensure_signed(origin)?; @@ -609,7 +609,7 @@ pub mod pallet { amounts: Vec, max_burn_amount: Balance, to: T::AccountId, - deadline: T::BlockNumber, + deadline: BlockNumberFor, ) -> DispatchResult { let who = ensure_signed(origin)?; @@ -646,7 +646,7 @@ pub mod pallet { base_amounts: Vec, min_to_mint: Balance, to: T::AccountId, - deadline: T::BlockNumber, + deadline: BlockNumberFor, ) -> DispatchResult { let who = ensure_signed(origin)?; let now = frame_system::Pallet::::block_number(); @@ -689,7 +689,7 @@ pub mod pallet { min_amounts_meta: Vec, min_amounts_base: Vec, to: T::AccountId, - deadline: T::BlockNumber, + deadline: BlockNumberFor, ) -> DispatchResult { let who = ensure_signed(origin)?; let now = frame_system::Pallet::::block_number(); @@ -730,7 +730,7 @@ pub mod pallet { i: u32, min_amount: Balance, to: T::AccountId, - deadline: T::BlockNumber, + deadline: BlockNumberFor, ) -> DispatchResult { let who = ensure_signed(origin)?; let now = frame_system::Pallet::::block_number(); @@ -773,7 +773,7 @@ pub mod pallet { dx: Balance, min_dy: Balance, to: T::AccountId, - deadline: T::BlockNumber, + deadline: BlockNumberFor, ) -> DispatchResult { let who = ensure_signed(origin)?; let now = frame_system::Pallet::::block_number(); @@ -808,7 +808,7 @@ pub mod pallet { dx: Balance, min_dy: Balance, to: T::AccountId, - deadline: T::BlockNumber, + deadline: BlockNumberFor, ) -> DispatchResult { let who = ensure_signed(origin)?; let now = frame_system::Pallet::::block_number(); @@ -830,7 +830,7 @@ pub mod pallet { dx: Balance, min_dy: Balance, to: T::AccountId, - deadline: T::BlockNumber, + deadline: BlockNumberFor, ) -> DispatchResult { let who = ensure_signed(origin)?; let now = frame_system::Pallet::::block_number(); diff --git a/crates/dex-stable/src/mock.rs b/crates/dex-stable/src/mock.rs index 06b2929b1a..c63754e813 100644 --- a/crates/dex-stable/src/mock.rs +++ b/crates/dex-stable/src/mock.rs @@ -10,13 +10,12 @@ use scale_info::TypeInfo; use serde::{Deserialize, Serialize}; use std::time::SystemTime; -use frame_support::{assert_ok, pallet_prelude::GenesisBuild, parameter_types, traits::Contains, PalletId}; +use frame_support::{assert_ok, parameter_types, traits::Contains, PalletId}; use frame_system::RawOrigin; use sp_core::H256; use sp_runtime::{ - testing::Header, traits::{BlakeTwo256, IdentityLookup, Zero}, - RuntimeDebug, + BuildStorage, RuntimeDebug, }; use crate as dex_stable; @@ -26,7 +25,6 @@ use crate::{ }; use orml_traits::{parameter_type_with_key, MultiCurrency}; -type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; type Block = frame_system::mocking::MockBlock; parameter_types! { @@ -58,8 +56,21 @@ impl Contains for MockDustRemovalWhitelist { } } -#[derive(Encode, Decode, Eq, PartialEq, Copy, Clone, RuntimeDebug, PartialOrd, MaxEncodedLen, Ord, TypeInfo)] -#[cfg_attr(feature = "std", derive(Serialize, Deserialize))] +#[derive( + Serialize, + Deserialize, + Encode, + Decode, + Eq, + PartialEq, + Copy, + Clone, + RuntimeDebug, + PartialOrd, + MaxEncodedLen, + Ord, + TypeInfo, +)] pub enum CurrencyId { Forbidden(TokenSymbol), Token(TokenSymbol), @@ -78,15 +89,41 @@ impl From for CurrencyId { } } -#[derive(Encode, Decode, Eq, PartialEq, Copy, Clone, RuntimeDebug, PartialOrd, MaxEncodedLen, Ord, TypeInfo)] -#[cfg_attr(feature = "std", derive(Serialize, Deserialize))] +#[derive( + Serialize, + Deserialize, + Encode, + Decode, + Eq, + PartialEq, + Copy, + Clone, + RuntimeDebug, + PartialOrd, + MaxEncodedLen, + Ord, + TypeInfo, +)] pub enum PoolToken { Token(TokenSymbol), StablePoolLp(PoolId), } -#[derive(Encode, Decode, Eq, PartialEq, Copy, Clone, RuntimeDebug, PartialOrd, MaxEncodedLen, Ord, TypeInfo)] -#[cfg_attr(feature = "std", derive(Serialize, Deserialize))] +#[derive( + Serialize, + Deserialize, + Encode, + Decode, + Eq, + PartialEq, + Copy, + Clone, + RuntimeDebug, + PartialOrd, + MaxEncodedLen, + Ord, + TypeInfo, +)] pub enum PoolType { P2(PoolToken, PoolToken), P3(PoolToken, PoolToken, PoolToken), @@ -98,14 +135,13 @@ pub enum PoolType { impl frame_system::Config for Test { type BaseCallFilter = frame_support::traits::Everything; type RuntimeOrigin = RuntimeOrigin; - type Index = u64; + type Nonce = u64; + type Block = Block; type RuntimeCall = RuntimeCall; - type BlockNumber = u64; type Hash = H256; type Hashing = BlakeTwo256; type AccountId = u128; type Lookup = IdentityLookup; - type Header = Header; type RuntimeEvent = RuntimeEvent; type BlockHashCount = BlockHashCount; type DbWeight = (); @@ -146,7 +182,7 @@ impl pallet_balances::Config for Test { type MaxLocks = (); type MaxReserves = MaxReserves; type ReserveIdentifier = [u8; 8]; - type HoldIdentifier = (); + type RuntimeHoldReason = (); type FreezeIdentifier = (); type MaxFreezes = (); type MaxHolds = (); @@ -181,8 +217,7 @@ pub struct ExtBuilder; impl ExtBuilder { pub fn build() -> sp_io::TestExternalities { - let storage = frame_system::GenesisConfig::default().build_storage::().unwrap(); - + let storage = frame_system::GenesisConfig::::default().build_storage().unwrap(); storage.into() } } @@ -223,12 +258,9 @@ where } frame_support::construct_runtime!( - pub enum Test where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, + pub enum Test { - System: frame_system::{Pallet, Call, Config, Storage, Event} = 0, + System: frame_system::{Pallet, Call, Storage, Config, Event} = 0, Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent} = 1, Balances: pallet_balances::{Pallet, Call, Storage, Config, Event} = 8, @@ -259,10 +291,7 @@ pub const TOKEN3_UNIT: u128 = 1_000_000; pub const TOKEN4_UNIT: u128 = 1_000_000; pub fn new_test_ext() -> sp_io::TestExternalities { - let mut t = frame_system::GenesisConfig::default() - .build_storage::() - .unwrap() - .into(); + let mut t = frame_system::GenesisConfig::::default().build_storage().unwrap(); pallet_balances::GenesisConfig:: { balances: vec![(ALICE, u128::MAX)], } diff --git a/crates/dex-swap-router/Cargo.toml b/crates/dex-swap-router/Cargo.toml index 36feb8e937..37b4c0ffcc 100644 --- a/crates/dex-swap-router/Cargo.toml +++ b/crates/dex-swap-router/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" license = "Apache 2.0" [dependencies] -serde = { version = "1.0.119", optional = true } +serde = { version = "1.0.119", default-features = false } codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false } scale-info = { version = "2.1.1", default-features = false, features = ["derive"] } @@ -36,7 +36,7 @@ pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = " [features] default = ["std"] std = [ - "serde", + "serde/std", "codec/std", "scale-info/std", "sp-core/std", diff --git a/crates/dex-swap-router/src/lib.rs b/crates/dex-swap-router/src/lib.rs index eaf7fa08b4..017c7183b1 100644 --- a/crates/dex-swap-router/src/lib.rs +++ b/crates/dex-swap-router/src/lib.rs @@ -156,7 +156,7 @@ pub mod pallet { amount_out_min: T::Balance, routes: Vec>, to: T::AccountId, - deadline: T::BlockNumber, + deadline: BlockNumberFor, ) -> DispatchResult { let who = ensure_signed(origin)?; diff --git a/crates/dex-swap-router/src/mock.rs b/crates/dex-swap-router/src/mock.rs index 7ee24cdd6c..25d015f842 100644 --- a/crates/dex-swap-router/src/mock.rs +++ b/crates/dex-swap-router/src/mock.rs @@ -2,14 +2,13 @@ // Licensed under Apache 2.0. use codec::{Decode, Encode, MaxEncodedLen}; -use frame_support::{pallet_prelude::GenesisBuild, parameter_types, traits::Contains, PalletId}; +use frame_support::{parameter_types, traits::Contains, PalletId}; use scale_info::TypeInfo; use serde::{Deserialize, Serialize}; use sp_core::H256; use sp_runtime::{ - testing::Header, traits::{BlakeTwo256, IdentityLookup}, - RuntimeDebug, + BuildStorage, RuntimeDebug, }; use crate as dex_swap_router; @@ -18,7 +17,6 @@ use dex_general::{GenerateLpAssetId, ValidateAsset}; use dex_stable::traits::{StablePoolLpCurrencyIdGenerate, ValidateCurrency}; use orml_traits::parameter_type_with_key; -type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; type Block = frame_system::mocking::MockBlock; parameter_types! { @@ -51,8 +49,21 @@ impl Contains for MockDustRemovalWhitelist { } } -#[derive(Encode, Decode, Eq, PartialEq, Copy, Clone, RuntimeDebug, PartialOrd, MaxEncodedLen, Ord, TypeInfo)] -#[cfg_attr(feature = "std", derive(Serialize, Deserialize))] +#[derive( + Serialize, + Deserialize, + Encode, + Decode, + Eq, + PartialEq, + Copy, + Clone, + RuntimeDebug, + PartialOrd, + MaxEncodedLen, + Ord, + TypeInfo, +)] pub enum CurrencyId { Forbidden(TokenSymbol), Token(TokenSymbol), @@ -88,15 +99,41 @@ impl From for CurrencyId { } } -#[derive(Encode, Decode, Eq, PartialEq, Copy, Clone, RuntimeDebug, PartialOrd, MaxEncodedLen, Ord, TypeInfo)] -#[cfg_attr(feature = "std", derive(Serialize, Deserialize))] +#[derive( + Serialize, + Deserialize, + Encode, + Decode, + Eq, + PartialEq, + Copy, + Clone, + RuntimeDebug, + PartialOrd, + MaxEncodedLen, + Ord, + TypeInfo, +)] pub enum PoolToken { Token(TokenSymbol), StablePoolLp(PoolId), } -#[derive(Encode, Decode, Eq, PartialEq, Copy, Clone, RuntimeDebug, PartialOrd, MaxEncodedLen, Ord, TypeInfo)] -#[cfg_attr(feature = "std", derive(Serialize, Deserialize))] +#[derive( + Serialize, + Deserialize, + Encode, + Decode, + Eq, + PartialEq, + Copy, + Clone, + RuntimeDebug, + PartialOrd, + MaxEncodedLen, + Ord, + TypeInfo, +)] pub enum PoolType { P2(PoolToken, PoolToken), P3(PoolToken, PoolToken, PoolToken), @@ -108,14 +145,13 @@ pub enum PoolType { impl frame_system::Config for Test { type BaseCallFilter = frame_support::traits::Everything; type RuntimeOrigin = RuntimeOrigin; - type Index = u64; + type Nonce = u64; + type Block = Block; type RuntimeCall = RuntimeCall; - type BlockNumber = u64; type Hash = H256; type Hashing = BlakeTwo256; type AccountId = u128; type Lookup = IdentityLookup; - type Header = Header; type RuntimeEvent = RuntimeEvent; type BlockHashCount = BlockHashCount; type DbWeight = (); @@ -249,19 +285,16 @@ pub struct ExtBuilder; impl ExtBuilder { pub fn build() -> sp_io::TestExternalities { - let storage = frame_system::GenesisConfig::default().build_storage::().unwrap(); + let storage = frame_system::GenesisConfig::::default().build_storage().unwrap(); storage.into() } } frame_support::construct_runtime!( - pub enum Test where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, + pub enum Test { - System: frame_system::{Pallet, Call, Config, Storage, Event} = 0, + System: frame_system::{Pallet, Call, Storage, Config, Event} = 0, Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent} = 1, Tokens: orml_tokens::{Pallet, Storage, Event, Config} = 10, @@ -294,10 +327,7 @@ pub const TOKEN1_ASSET_ID: CurrencyId = CurrencyId::Token(1); pub const TOKEN2_ASSET_ID: CurrencyId = CurrencyId::Token(2); pub fn new_test_ext() -> sp_io::TestExternalities { - let mut t = frame_system::GenesisConfig::default() - .build_storage::() - .unwrap() - .into(); + let mut t = frame_system::GenesisConfig::::default().build_storage().unwrap(); orml_tokens::GenesisConfig:: { balances: vec![ diff --git a/crates/escrow/Cargo.toml b/crates/escrow/Cargo.toml index 33ad23596b..443d365948 100644 --- a/crates/escrow/Cargo.toml +++ b/crates/escrow/Cargo.toml @@ -6,7 +6,7 @@ name = "escrow" version = "1.0.0" [dependencies] -serde = { version = "1.0.130", default-features = false, features = ["derive"], optional = true } +serde = { version = "1.0.130", default-features = false, features = ["derive"] } codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false, features = ["derive", "max-encoded-len"] } scale-info = { version = "2.2.0", default-features = false, features = ["derive"] } @@ -34,7 +34,7 @@ pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "p [features] default = ["std"] std = [ - "serde", + "serde/std", "codec/std", "scale-info/std", diff --git a/crates/escrow/src/lib.rs b/crates/escrow/src/lib.rs index 4351c69290..31cbf2bfb2 100644 --- a/crates/escrow/src/lib.rs +++ b/crates/escrow/src/lib.rs @@ -37,6 +37,7 @@ use frame_support::{ }, transactional, }; +use frame_system::pallet_prelude::BlockNumberFor; use reward::RewardsApi; use scale_info::TypeInfo; use sp_runtime::{ @@ -140,18 +141,18 @@ pub mod pallet { type RuntimeEvent: From> + IsType<::RuntimeEvent>; /// Convert the block number into a balance. - type BlockNumberToBalance: Convert>; + type BlockNumberToBalance: Convert, BalanceOf>; /// The currency trait. - type Currency: LockableCurrency; + type Currency: LockableCurrency>; /// All future times are rounded by this. #[pallet::constant] - type Span: Get; + type Span: Get>; /// The maximum time for locks. #[pallet::constant] - type MaxPeriod: Get; + type MaxPeriod: Get>; /// Escrow reward pool. type EscrowRewards: reward::RewardsApi<(), Self::AccountId, BalanceOf>; @@ -167,7 +168,7 @@ pub mod pallet { Deposit { who: T::AccountId, amount: BalanceOf, - unlock_height: T::BlockNumber, + unlock_height: BlockNumberFor, }, Withdraw { who: T::AccountId, @@ -206,7 +207,7 @@ pub mod pallet { } #[pallet::hooks] - impl Hooks for Pallet {} + impl Hooks> for Pallet {} #[pallet::storage] #[pallet::getter(fn reserved_balance)] @@ -215,14 +216,14 @@ pub mod pallet { #[pallet::storage] #[pallet::getter(fn locked_balance)] pub type Locked = - StorageMap<_, Blake2_128Concat, T::AccountId, LockedBalance, T::BlockNumber>, ValueQuery>; + StorageMap<_, Blake2_128Concat, T::AccountId, LockedBalance, BlockNumberFor>, ValueQuery>; #[pallet::storage] - pub type Epoch = StorageValue<_, T::Index, ValueQuery>; + pub type Epoch = StorageValue<_, T::Nonce, ValueQuery>; #[pallet::storage] pub type PointHistory = - StorageMap<_, Identity, T::Index, Point, T::BlockNumber>, ValueQuery>; + StorageMap<_, Identity, T::Nonce, Point, BlockNumberFor>, ValueQuery>; #[pallet::storage] pub type UserPointHistory = StorageDoubleMap< @@ -230,20 +231,20 @@ pub mod pallet { Blake2_128Concat, T::AccountId, Identity, - T::Index, - Point, T::BlockNumber>, + T::Nonce, + Point, BlockNumberFor>, ValueQuery, >; #[pallet::storage] - pub type UserPointEpoch = StorageMap<_, Blake2_128Concat, T::AccountId, T::Index, ValueQuery>; + pub type UserPointEpoch = StorageMap<_, Blake2_128Concat, T::AccountId, T::Nonce, ValueQuery>; #[pallet::storage] - pub type SlopeChanges = StorageMap<_, Blake2_128Concat, T::BlockNumber, BalanceOf, ValueQuery>; + pub type SlopeChanges = StorageMap<_, Blake2_128Concat, BlockNumberFor, BalanceOf, ValueQuery>; // Accounts that are limited in how much they can mint. #[pallet::storage] - pub type Limits = StorageMap<_, Blake2_128Concat, T::AccountId, (T::BlockNumber, T::BlockNumber)>; + pub type Limits = StorageMap<_, Blake2_128Concat, T::AccountId, (BlockNumberFor, BlockNumberFor)>; // Accounts that are prohibited from locking tokens for voting. #[pallet::storage] @@ -261,7 +262,7 @@ pub mod pallet { pub fn create_lock( origin: OriginFor, #[pallet::compact] amount: BalanceOf, - unlock_height: T::BlockNumber, + unlock_height: BlockNumberFor, ) -> DispatchResult { let who = ensure_signed(origin)?; let now = Self::current_height(); @@ -309,7 +310,7 @@ pub mod pallet { #[pallet::call_index(2)] #[pallet::weight(::WeightInfo::increase_unlock_height())] #[transactional] - pub fn increase_unlock_height(origin: OriginFor, unlock_height: T::BlockNumber) -> DispatchResult { + pub fn increase_unlock_height(origin: OriginFor, unlock_height: BlockNumberFor) -> DispatchResult { let who = ensure_signed(origin)?; let locked_balance = Self::locked_balance(&who); let now = Self::current_height(); @@ -348,8 +349,8 @@ pub mod pallet { pub fn set_account_limit( origin: OriginFor, who: T::AccountId, - start: T::BlockNumber, - end: T::BlockNumber, + start: BlockNumberFor, + end: BlockNumberFor, ) -> DispatchResultWithPostInfo { ensure_root(origin)?; >::insert(&who, (start, end)); @@ -382,16 +383,16 @@ pub mod pallet { } } -type DefaultPoint = Point, ::BlockNumber>; -type DefaultLockedBalance = LockedBalance, ::BlockNumber>; +type DefaultPoint = Point, BlockNumberFor>; +type DefaultLockedBalance = LockedBalance, BlockNumberFor>; // "Internal" functions, callable by code. impl Pallet { - fn current_height() -> T::BlockNumber { + fn current_height() -> BlockNumberFor { frame_system::Pallet::::block_number() } - fn round_height(height: T::BlockNumber) -> T::BlockNumber { + fn round_height(height: BlockNumberFor) -> BlockNumberFor { let span = T::Span::get(); (height / span) * span } @@ -508,7 +509,7 @@ impl Pallet { total_stakable.saturating_sub(used) } - fn deposit_for(who: &T::AccountId, amount: BalanceOf, unlock_height: T::BlockNumber) -> DispatchResult { + fn deposit_for(who: &T::AccountId, amount: BalanceOf, unlock_height: BlockNumberFor) -> DispatchResult { let old_locked = Self::locked_balance(who); let mut new_locked = old_locked.clone(); new_locked.amount.saturating_accrue(amount); @@ -548,7 +549,7 @@ impl Pallet { pub fn round_height_and_deposit_for( who: &T::AccountId, amount: BalanceOf, - unlock_height: T::BlockNumber, + unlock_height: BlockNumberFor, ) -> DispatchResult { Self::deposit_for(who, amount, Self::round_height(unlock_height)) } @@ -567,7 +568,7 @@ impl Pallet { Self::checkpoint(who, old_locked, Default::default()); T::Currency::remove_lock(LOCK_ID, &who); - let _ = >::clear_prefix(who, u32::max_value(), None); + let _ = >::clear_prefix(who, u32::MAX, None); Self::deposit_event(Event::::Withdraw { who: who.clone(), @@ -578,13 +579,13 @@ impl Pallet { } /// vKINT/vINTR balance at given height - pub fn balance_at(who: &T::AccountId, height: Option) -> BalanceOf { + pub fn balance_at(who: &T::AccountId, height: Option>) -> BalanceOf { let height = height.unwrap_or(Self::current_height()); let last_point = >::get(who, >::get(who)); last_point.balance_at::(height) } - pub fn supply_at(point: DefaultPoint, height: T::BlockNumber) -> BalanceOf { + pub fn supply_at(point: DefaultPoint, height: BlockNumberFor) -> BalanceOf { let mut last_point = point; let mut t_i = Self::round_height(last_point.ts); @@ -612,7 +613,7 @@ impl Pallet { last_point.bias } - pub fn total_supply(height: Option) -> BalanceOf { + pub fn total_supply(height: Option>) -> BalanceOf { let height = height.unwrap_or(Self::current_height()); let last_point = >::get(>::get()); Self::supply_at(last_point, height) diff --git a/crates/escrow/src/mock.rs b/crates/escrow/src/mock.rs index 32cebfcbaa..20de95ca02 100644 --- a/crates/escrow/src/mock.rs +++ b/crates/escrow/src/mock.rs @@ -1,5 +1,5 @@ use crate as escrow; -use crate::{Config, Error}; +use crate::{Config, Convert, Error}; use frame_support::{ parameter_types, traits::{ConstU32, Everything}, @@ -8,23 +8,17 @@ pub use primitives::{CurrencyId, CurrencyId::Token, TokenSymbol::*}; use sp_arithmetic::FixedI128; use sp_core::H256; use sp_runtime::{ - generic::Header as GenericHeader, - traits::{BlakeTwo256, Identity, IdentityLookup}, + traits::{BlakeTwo256, IdentityLookup}, + BuildStorage, }; -type Header = GenericHeader; - -type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; type Block = frame_system::mocking::MockBlock; // Configure a mock runtime to test the pallet. frame_support::construct_runtime!( - pub enum Test where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, + pub enum Test { - System: frame_system::{Pallet, Call, Storage, Config, Event}, + System: frame_system::{Pallet, Call, Storage, Config, Event}, Balances: pallet_balances::{Pallet, Call, Storage, Event}, Rewards: reward::{Pallet, Call, Storage, Event}, Escrow: escrow::{Pallet, Call, Storage, Event}, @@ -33,8 +27,8 @@ frame_support::construct_runtime!( pub type AccountId = u64; pub type Balance = u128; -pub type BlockNumber = u128; -pub type Index = u64; +pub type BlockNumber = u64; +pub type Nonce = u64; pub type SignedFixedPoint = FixedI128; parameter_types! { @@ -49,13 +43,12 @@ impl frame_system::Config for Test { type DbWeight = (); type RuntimeOrigin = RuntimeOrigin; type RuntimeCall = RuntimeCall; - type Index = Index; - type BlockNumber = BlockNumber; + type Nonce = Nonce; + type Block = Block; type Hash = H256; type Hashing = BlakeTwo256; type AccountId = AccountId; type Lookup = IdentityLookup; - type Header = Header; type RuntimeEvent = RuntimeEvent; type BlockHashCount = BlockHashCount; type Version = (); @@ -83,7 +76,7 @@ impl pallet_balances::Config for Test { type MaxLocks = (); type MaxReserves = (); type ReserveIdentifier = [u8; 8]; - type HoldIdentifier = (); + type RuntimeHoldReason = (); type FreezeIdentifier = (); type MaxFreezes = (); type MaxHolds = (); @@ -103,9 +96,17 @@ parameter_types! { pub const MaxPeriod: BlockNumber = 100; } +pub struct BlockNumberToBalance; + +impl Convert for BlockNumberToBalance { + fn convert(a: BlockNumber) -> Balance { + a.into() + } +} + impl Config for Test { type RuntimeEvent = RuntimeEvent; - type BlockNumberToBalance = Identity; + type BlockNumberToBalance = BlockNumberToBalance; type Currency = Balances; type Span = Span; type MaxPeriod = MaxPeriod; @@ -121,7 +122,7 @@ pub const BOB: AccountId = 2; pub struct ExtBuilder; impl ExtBuilder { pub fn build() -> sp_io::TestExternalities { - let storage = frame_system::GenesisConfig::default().build_storage::().unwrap(); + let storage = frame_system::GenesisConfig::::default().build_storage().unwrap(); storage.into() } } diff --git a/crates/escrow/src/tests.rs b/crates/escrow/src/tests.rs index d909d5ff00..4054698ead 100644 --- a/crates/escrow/src/tests.rs +++ b/crates/escrow/src/tests.rs @@ -29,11 +29,11 @@ fn should_lock_and_degrade_power() { let slope = amount / max_time; let bias = slope * (end_time - start_time); - create_lock(ALICE, amount, end_time); + create_lock(ALICE, amount.into(), end_time); for current_time in [0, 50, 100] { let balance = bias - (slope * (current_time - start_time)); - assert_eq!(Escrow::balance_at(&ALICE, Some(current_time)), balance); + assert_eq!(Escrow::balance_at(&ALICE, Some(current_time)), balance.into()); } }) } @@ -92,18 +92,18 @@ fn should_increase_unlock_height() { TestError::LockHasExpired ); - create_lock(ALICE, amount, max_time); + create_lock(ALICE, amount.into(), max_time); let half_time = max_time / 2; System::set_block_number(half_time); - assert_eq!(Escrow::balance_at(&ALICE, Some(half_time)), amount / 2); + assert_eq!(Escrow::balance_at(&ALICE, Some(half_time)), (amount / 2).into()); assert_ok!(Escrow::increase_unlock_height( RuntimeOrigin::signed(ALICE), half_time + max_time )); - assert_eq!(Escrow::balance_at(&ALICE, Some(half_time)), amount); + assert_eq!(Escrow::balance_at(&ALICE, Some(half_time)), amount.into()); }) } @@ -225,9 +225,9 @@ fn should_not_allow_amount_smaller_than_max_period() { let end_time = MaxPeriod::get(); let amount = end_time / 2; - >::make_free_balance_be(&ALICE, amount); + >::make_free_balance_be(&ALICE, amount.into()); assert_err!( - Escrow::create_lock(RuntimeOrigin::signed(ALICE), amount, end_time), + Escrow::create_lock(RuntimeOrigin::signed(ALICE), amount.into(), end_time), TestError::LockAmountTooLow ); }) diff --git a/crates/farming/Cargo.toml b/crates/farming/Cargo.toml index 26f9a00303..df71a96bc6 100644 --- a/crates/farming/Cargo.toml +++ b/crates/farming/Cargo.toml @@ -6,7 +6,7 @@ name = "farming" version = "1.0.0" [dependencies] -serde = { version = "1.0.130", default-features = false, features = ["derive"], optional = true } +serde = { version = "1.0.130", default-features = false, features = ["derive"] } codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false, features = ["derive", "max-encoded-len"] } scale-info = { version = "2.2.0", default-features = false, features = ["derive"] } @@ -38,7 +38,7 @@ pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "p [features] default = ["std"] std = [ - "serde", + "serde/std", "codec/std", "scale-info/std", diff --git a/crates/farming/src/lib.rs b/crates/farming/src/lib.rs index b44ee808a3..17afa325bd 100644 --- a/crates/farming/src/lib.rs +++ b/crates/farming/src/lib.rs @@ -108,7 +108,7 @@ pub mod pallet { /// The period to accrue rewards. #[pallet::constant] - type RewardPeriod: Get; + type RewardPeriod: Get>; /// Reward pools to track stake. type RewardPools: RewardsApi< @@ -155,8 +155,8 @@ pub mod pallet { } #[pallet::hooks] - impl Hooks for Pallet { - fn on_initialize(now: T::BlockNumber) -> Weight { + impl Hooks> for Pallet { + fn on_initialize(now: BlockNumberFor) -> Weight { if now % T::RewardPeriod::get() == Zero::zero() { let mut count: u32 = 0; // collect first to avoid modifying in-place diff --git a/crates/farming/src/mock.rs b/crates/farming/src/mock.rs index add5686f41..177771aee5 100644 --- a/crates/farming/src/mock.rs +++ b/crates/farming/src/mock.rs @@ -9,23 +9,17 @@ pub use primitives::{CurrencyId, CurrencyId::Token, LpToken, TokenSymbol::*}; use sp_arithmetic::FixedI128; use sp_core::H256; use sp_runtime::{ - generic::Header as GenericHeader, traits::{AccountIdConversion, BlakeTwo256, IdentityLookup}, + BuildStorage, }; -type Header = GenericHeader; - -type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; type Block = frame_system::mocking::MockBlock; // Configure a mock runtime to test the pallet. frame_support::construct_runtime!( - pub enum Test where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, + pub enum Test { - System: frame_system::{Pallet, Call, Storage, Config, Event}, + System: frame_system::{Pallet, Call, Storage, Config, Event}, Tokens: orml_tokens::{Pallet, Storage, Config, Event}, Rewards: reward::{Pallet, Call, Storage, Event}, Farming: farming::{Pallet, Call, Storage, Event}, @@ -34,8 +28,7 @@ frame_support::construct_runtime!( pub type AccountId = u64; pub type Balance = u128; -pub type BlockNumber = u128; -pub type Index = u64; +pub type Nonce = u64; pub type SignedFixedPoint = FixedI128; parameter_types! { @@ -50,13 +43,12 @@ impl frame_system::Config for Test { type DbWeight = (); type RuntimeOrigin = RuntimeOrigin; type RuntimeCall = RuntimeCall; - type Index = Index; - type BlockNumber = BlockNumber; + type Nonce = Nonce; + type Block = Block; type Hash = H256; type Hashing = BlakeTwo256; type AccountId = AccountId; type Lookup = IdentityLookup; - type Header = Header; type RuntimeEvent = RuntimeEvent; type BlockHashCount = BlockHashCount; type Version = (); @@ -106,7 +98,7 @@ impl reward::Config for Test { parameter_types! { pub const FarmingPalletId: PalletId = PalletId(*b"farmings"); pub TreasuryAccountId: AccountId = PalletId(*b"treasury").into_account_truncating(); - pub const RewardPeriod: BlockNumber = 10; + pub const RewardPeriod: u64 = 10; } impl Config for Test { @@ -126,7 +118,7 @@ pub struct ExtBuilder; impl ExtBuilder { pub fn build() -> sp_io::TestExternalities { - let storage = frame_system::GenesisConfig::default().build_storage::().unwrap(); + let storage = frame_system::GenesisConfig::::default().build_storage().unwrap(); storage.into() } diff --git a/crates/fee/Cargo.toml b/crates/fee/Cargo.toml index b1c91e3c7e..dec346570e 100644 --- a/crates/fee/Cargo.toml +++ b/crates/fee/Cargo.toml @@ -6,7 +6,7 @@ name = "fee" version = "1.2.0" [dependencies] -serde = { version = "1.0.130", default-features = false, features = ["derive"], optional = true } +serde = { version = "1.0.130", default-features = false, features = ["derive"] } codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false, features = ["derive", "max-encoded-len"] } scale-info = { version = "2.2.0", default-features = false, features = ["derive"] } @@ -47,7 +47,7 @@ orml-traits = { git = "https://github.com/open-web3-stack/open-runtime-module-li [features] default = ["std"] std = [ - "serde", + "serde/std", "codec/std", "scale-info/std", diff --git a/crates/fee/src/lib.rs b/crates/fee/src/lib.rs index f068593be3..321efd28d4 100644 --- a/crates/fee/src/lib.rs +++ b/crates/fee/src/lib.rs @@ -86,9 +86,9 @@ pub mod pallet { >; /// Vault staking pool. - type VaultStaking: StakingApi, Self::Index, BalanceOf> + type VaultStaking: StakingApi, Self::Nonce, BalanceOf> + RewardsApi< - (Option, DefaultVaultId), + (Option, DefaultVaultId), Self::AccountId, BalanceOf, CurrencyId = CurrencyId, @@ -176,6 +176,7 @@ pub mod pallet { StorageMap<_, Blake2_128Concat, DefaultVaultId, UnsignedFixedPoint, OptionQuery>; #[pallet::genesis_config] + #[derive(frame_support::DefaultNoBound)] pub struct GenesisConfig { pub issue_fee: UnsignedFixedPoint, pub issue_griefing_collateral: UnsignedFixedPoint, @@ -185,22 +186,8 @@ pub mod pallet { pub replace_griefing_collateral: UnsignedFixedPoint, } - #[cfg(feature = "std")] - impl Default for GenesisConfig { - fn default() -> Self { - Self { - issue_fee: Default::default(), - issue_griefing_collateral: Default::default(), - redeem_fee: Default::default(), - premium_redeem_fee: Default::default(), - punishment_fee: Default::default(), - replace_griefing_collateral: Default::default(), - } - } - } - #[pallet::genesis_build] - impl GenesisBuild for GenesisConfig { + impl BuildGenesisConfig for GenesisConfig { fn build(&self) { IssueFee::::put(self.issue_fee); IssueGriefingCollateral::::put(self.issue_griefing_collateral); @@ -228,7 +215,7 @@ pub mod pallet { pub fn withdraw_rewards( origin: OriginFor, vault_id: DefaultVaultId, - index: Option, + index: Option, ) -> DispatchResultWithPostInfo { let nominator_id = ensure_signed(origin)?; for currency_id in [vault_id.wrapped_currency(), T::GetNativeCurrencyId::get()] { @@ -490,7 +477,7 @@ impl Pallet { fn withdraw_vault_rewards( vault_id: &DefaultVaultId, nominator_id: &T::AccountId, - index: Option, + index: Option, currency_id: CurrencyId, ) -> Result, DispatchError> { Self::distribute_vault_rewards(&vault_id, currency_id)?; diff --git a/crates/fee/src/mock.rs b/crates/fee/src/mock.rs index 4b91c2520e..e34a60288a 100644 --- a/crates/fee/src/mock.rs +++ b/crates/fee/src/mock.rs @@ -12,22 +12,17 @@ pub use primitives::{CurrencyId, CurrencyId::Token, TokenSymbol::*}; use sp_arithmetic::{FixedI128, FixedU128}; use sp_core::H256; use sp_runtime::{ - testing::Header, traits::{BlakeTwo256, IdentityLookup, Zero}, - DispatchError, FixedPointNumber, + BuildStorage, DispatchError, FixedPointNumber, }; -type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; type Block = frame_system::mocking::MockBlock; // Configure a mock runtime to test the pallet. frame_support::construct_runtime!( - pub enum Test where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, + pub enum Test { - System: frame_system::{Pallet, Call, Storage, Config, Event}, + System: frame_system::{Pallet, Call, Storage, Config, Event}, Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent}, // Tokens & Balances @@ -46,9 +41,8 @@ frame_support::construct_runtime!( pub type AccountId = u64; pub type Balance = u128; pub type RawAmount = i128; -pub type BlockNumber = u64; pub type Moment = u64; -pub type Index = u64; +pub type Nonce = u64; pub type SignedFixedPoint = FixedI128; pub type SignedInner = i128; pub type UnsignedFixedPoint = FixedU128; @@ -65,13 +59,12 @@ impl frame_system::Config for Test { type DbWeight = (); type RuntimeOrigin = RuntimeOrigin; type RuntimeCall = RuntimeCall; - type Index = Index; - type BlockNumber = BlockNumber; + type Nonce = Nonce; + type Block = Block; type Hash = H256; type Hashing = BlakeTwo256; type AccountId = AccountId; type Lookup = IdentityLookup; - type Header = Header; type RuntimeEvent = RuntimeEvent; type BlockHashCount = BlockHashCount; type Version = (); @@ -221,7 +214,7 @@ pub struct ExtBuilder; impl ExtBuilder { pub fn build() -> sp_io::TestExternalities { - let storage = frame_system::GenesisConfig::default().build_storage::().unwrap(); + let storage = frame_system::GenesisConfig::::default().build_storage().unwrap(); storage.into() } diff --git a/crates/issue/Cargo.toml b/crates/issue/Cargo.toml index c43ffd3a35..fa5138c380 100644 --- a/crates/issue/Cargo.toml +++ b/crates/issue/Cargo.toml @@ -6,7 +6,7 @@ name = "issue" version = "1.2.0" [dependencies] -serde = { version = "1.0.130", default-features = false, features = ['derive'], optional = true } +serde = { version = "1.0.130", default-features = false, features = ['derive'] } codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false, features = ["derive", "max-encoded-len"] } scale-info = { version = "2.2.0", default-features = false, features = ["derive"] } log = { version = "0.4.14", default-features = false } @@ -55,7 +55,7 @@ orml-traits = { git = "https://github.com/open-web3-stack/open-runtime-module-li [features] default = ["std"] std = [ - "serde", + "serde/std", "codec/std", "sp-io/std", diff --git a/crates/issue/src/ext.rs b/crates/issue/src/ext.rs index 69ed75a1a5..d548bb6b9f 100644 --- a/crates/issue/src/ext.rs +++ b/crates/issue/src/ext.rs @@ -6,6 +6,7 @@ pub(crate) mod btc_relay { use bitcoin::types::{FullTransactionProof, Value}; use btc_relay::BtcAddress; use frame_support::dispatch::DispatchError; + use frame_system::pallet_prelude::BlockNumberFor; use sp_std::convert::TryFrom; pub fn get_and_verify_issue_payment>( @@ -24,9 +25,9 @@ pub(crate) mod btc_relay { } pub fn has_request_expired( - opentime: T::BlockNumber, + opentime: BlockNumberFor, btc_open_height: u32, - period: T::BlockNumber, + period: BlockNumberFor, ) -> Result { >::has_request_expired(opentime, btc_open_height, period) } @@ -115,13 +116,14 @@ pub(crate) mod vault_registry { #[cfg_attr(test, mockable)] pub(crate) mod security { + use frame_system::pallet_prelude::BlockNumberFor; use sp_core::H256; pub fn get_secure_id(id: &T::AccountId) -> H256 { >::get_secure_id(id) } - pub fn active_block_number() -> T::BlockNumber { + pub fn active_block_number() -> BlockNumberFor { >::active_block_number() } } diff --git a/crates/issue/src/lib.rs b/crates/issue/src/lib.rs index 509422f5ca..f5a9af1a44 100644 --- a/crates/issue/src/lib.rs +++ b/crates/issue/src/lib.rs @@ -90,7 +90,7 @@ pub mod pallet { type RuntimeEvent: From> + IsType<::RuntimeEvent>; /// Convert the block number into a balance. - type BlockNumberToBalance: Convert>; + type BlockNumberToBalance: Convert, BalanceOf>; /// Weight information for the extrinsics in this module. type WeightInfo: WeightInfo; @@ -129,7 +129,7 @@ pub mod pallet { griefing_collateral: BalanceOf, }, IssuePeriodChange { - period: T::BlockNumber, + period: BlockNumberFor, }, } @@ -167,7 +167,7 @@ pub mod pallet { /// to prevent griefing of vault collateral. #[pallet::storage] #[pallet::getter(fn issue_period)] - pub(super) type IssuePeriod = StorageValue<_, T::BlockNumber, ValueQuery>; + pub(super) type IssuePeriod = StorageValue<_, BlockNumberFor, ValueQuery>; /// The minimum amount of btc that is required for issue requests; lower values would /// risk the rejection of payment on Bitcoin. @@ -185,23 +185,14 @@ pub mod pallet { pub(super) type StorageVersion = StorageValue<_, Version, ValueQuery, DefaultForStorageVersion>; #[pallet::genesis_config] + #[derive(frame_support::DefaultNoBound)] pub struct GenesisConfig { - pub issue_period: T::BlockNumber, + pub issue_period: BlockNumberFor, pub issue_btc_dust_value: BalanceOf, } - #[cfg(feature = "std")] - impl Default for GenesisConfig { - fn default() -> Self { - Self { - issue_period: Default::default(), - issue_btc_dust_value: Default::default(), - } - } - } - #[pallet::genesis_build] - impl GenesisBuild for GenesisConfig { + impl BuildGenesisConfig for GenesisConfig { fn build(&self) { IssuePeriod::::put(self.issue_period); IssueBtcDustValue::::put(self.issue_btc_dust_value); @@ -285,7 +276,7 @@ pub mod pallet { #[pallet::call_index(3)] #[pallet::weight(::WeightInfo::set_issue_period())] #[transactional] - pub fn set_issue_period(origin: OriginFor, period: T::BlockNumber) -> DispatchResultWithPostInfo { + pub fn set_issue_period(origin: OriginFor, period: BlockNumberFor) -> DispatchResultWithPostInfo { ensure_root(origin)?; >::set(period); Self::deposit_event(Event::IssuePeriodChange { period }); diff --git a/crates/issue/src/migration.rs b/crates/issue/src/migration.rs index 216916123c..201e2cbdfa 100644 --- a/crates/issue/src/migration.rs +++ b/crates/issue/src/migration.rs @@ -8,6 +8,7 @@ const TARGET: &'static str = "runtime::issue::migration::v1"; /// The original data layout of the democracy pallet without a specific version number. mod v0 { use super::*; + use frame_system::pallet_prelude::BlockNumberFor; #[frame_support::storage_alias] pub(super) type IssueRequests = @@ -42,7 +43,7 @@ mod v0 { pub type DefaultIssueRequest = IssueRequest< ::AccountId, - ::BlockNumber, + BlockNumberFor, ::Balance, vault_registry::types::CurrencyId, >; @@ -51,11 +52,14 @@ mod v0 { pub mod v1 { use super::*; + #[cfg(feature = "try-runtime")] + use sp_runtime::TryRuntimeError; + pub struct Migration(sp_std::marker::PhantomData); impl> OnRuntimeUpgrade for Migration { #[cfg(feature = "try-runtime")] - fn pre_upgrade() -> Result, &'static str> { + fn pre_upgrade() -> Result, TryRuntimeError> { assert_eq!(StorageVersion::get::>(), 0, "can only upgrade from version 0"); let issue_count = v0::IssueRequests::::iter().count(); @@ -101,7 +105,7 @@ pub mod v1 { } #[cfg(feature = "try-runtime")] - fn post_upgrade(state: Vec) -> Result<(), &'static str> { + fn post_upgrade(state: Vec) -> Result<(), TryRuntimeError> { assert_eq!(StorageVersion::get::>(), 1, "must upgrade"); let old_issue_count: u32 = diff --git a/crates/issue/src/mock.rs b/crates/issue/src/mock.rs index b045e5bb67..8f48313256 100644 --- a/crates/issue/src/mock.rs +++ b/crates/issue/src/mock.rs @@ -3,7 +3,7 @@ use crate::{ext, Config, Error}; use currency::Amount; use frame_support::{ assert_ok, parameter_types, - traits::{ConstU32, Everything, GenesisBuild}, + traits::{ConstU32, Everything}, PalletId, }; use mocktopus::{macros::mockable, mocking::*}; @@ -13,22 +13,19 @@ use primitives::{VaultCurrencyPair, VaultId}; use sp_arithmetic::{FixedI128, FixedPointNumber, FixedU128}; use sp_core::H256; use sp_runtime::{ - testing::{Header, TestXt}, + testing::TestXt, traits::{BlakeTwo256, Convert, IdentityLookup, One, Zero}, + BuildStorage, }; type TestExtrinsic = TestXt; -type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; type Block = frame_system::mocking::MockBlock; // Configure a mock runtime to test the pallet. frame_support::construct_runtime!( - pub enum Test where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, + pub enum Test { - System: frame_system::{Pallet, Call, Storage, Config, Event}, + System: frame_system::{Pallet, Call, Storage, Config, Event}, Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent}, // Tokens & Balances @@ -46,7 +43,7 @@ frame_support::construct_runtime!( Issue: issue::{Pallet, Call, Config, Storage, Event}, Fee: fee::{Pallet, Call, Config, Storage}, Currency: currency::{Pallet}, - Nomination: nomination::{Pallet, Call, Config, Storage, Event}, + Nomination: nomination::{Pallet, Call, Storage, Config, Event}, } ); @@ -55,7 +52,7 @@ pub type Balance = u128; pub type RawAmount = i128; pub type BlockNumber = u64; pub type Moment = u64; -pub type Index = u64; +pub type Nonce = u64; pub type SignedFixedPoint = FixedI128; pub type SignedInner = i128; pub type UnsignedFixedPoint = FixedU128; @@ -72,13 +69,12 @@ impl frame_system::Config for Test { type DbWeight = (); type RuntimeOrigin = RuntimeOrigin; type RuntimeCall = RuntimeCall; - type Index = Index; - type BlockNumber = BlockNumber; + type Nonce = Nonce; + type Block = Block; type Hash = H256; type Hashing = BlakeTwo256; type AccountId = AccountId; type Lookup = IdentityLookup; - type Header = Header; type RuntimeEvent = RuntimeEvent; type BlockHashCount = BlockHashCount; type Version = (); @@ -294,7 +290,7 @@ pub struct ExtBuilder; impl ExtBuilder { pub fn build_with(balances: orml_tokens::GenesisConfig) -> sp_io::TestExternalities { - let mut storage = frame_system::GenesisConfig::default().build_storage::().unwrap(); + let mut storage = frame_system::GenesisConfig::::default().build_storage().unwrap(); balances.assimilate_storage(&mut storage).unwrap(); @@ -309,6 +305,13 @@ impl ExtBuilder { .assimilate_storage(&mut storage) .unwrap(); + nomination::GenesisConfig:: { + is_nomination_enabled: true, + _marker: Default::default(), + } + .assimilate_storage(&mut storage) + .unwrap(); + issue::GenesisConfig:: { issue_period: 10, issue_btc_dust_value: 0, diff --git a/crates/issue/src/types.rs b/crates/issue/src/types.rs index d1d1cadb2c..851cb7aa5a 100644 --- a/crates/issue/src/types.rs +++ b/crates/issue/src/types.rs @@ -1,5 +1,6 @@ use codec::{Decode, Encode, MaxEncodedLen}; use currency::Amount; +use frame_system::pallet_prelude::BlockNumberFor; pub use primitives::issue::{IssueRequest, IssueRequestStatus}; use primitives::VaultId; use scale_info::TypeInfo; @@ -26,12 +27,8 @@ pub(crate) type BalanceOf = ::Balance; pub(crate) type DefaultVaultId = VaultId<::AccountId, CurrencyId>; -pub type DefaultIssueRequest = IssueRequest< - ::AccountId, - ::BlockNumber, - BalanceOf, - CurrencyId, ->; +pub type DefaultIssueRequest = + IssueRequest<::AccountId, BlockNumberFor, BalanceOf, CurrencyId>; pub trait IssueRequestExt { fn amount(&self) -> Amount; diff --git a/crates/loans/Cargo.toml b/crates/loans/Cargo.toml index 288434c9d9..9852952375 100644 --- a/crates/loans/Cargo.toml +++ b/crates/loans/Cargo.toml @@ -8,7 +8,7 @@ version = "1.9.3" targets = ["x86_64-unknown-linux-gnu"] [dependencies] -serde = { version = "1.0.136", default-features = false, features = ["derive"], optional = true } +serde = { version = "1.0.136", default-features = false, features = ["derive"] } codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false } scale-info = { version = "2.2.0", default-features = false, features = ["derive"] } num-traits = { default-features = false, version = "0.2" } diff --git a/crates/loans/rpc/Cargo.toml b/crates/loans/rpc/Cargo.toml index 3bb933800c..bebce86fcf 100644 --- a/crates/loans/rpc/Cargo.toml +++ b/crates/loans/rpc/Cargo.toml @@ -8,7 +8,7 @@ version = "1.9.3" codec = { package = "parity-scale-codec", version = "3.1.5" } jsonrpsee = { version = "0.16.2", features = ["server", "macros"] } primitives = { package = "interbtc-primitives", path = "../../../primitives" } -serde = { version = "1.0.136", features = ["derive"] } +serde = { version = "1.0.136", features = ["derive"], default-features = false } sp-api = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } sp-blockchain = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } sp-core = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } diff --git a/crates/loans/src/farming.rs b/crates/loans/src/farming.rs index 59225496b1..3738b71610 100644 --- a/crates/loans/src/farming.rs +++ b/crates/loans/src/farming.rs @@ -29,7 +29,7 @@ impl Pallet { } fn calculate_reward_delta_index( - delta_block: T::BlockNumber, + delta_block: BlockNumberFor, reward_speed: BalanceOf, total_share: BalanceOf, ) -> Result { diff --git a/crates/loans/src/lib.rs b/crates/loans/src/lib.rs index 61e859ff58..e1f4d83227 100644 --- a/crates/loans/src/lib.rs +++ b/crates/loans/src/lib.rs @@ -531,13 +531,13 @@ pub mod pallet { #[pallet::storage] #[pallet::getter(fn reward_supply_state)] pub type RewardSupplyState = - StorageMap<_, Blake2_128Concat, CurrencyId, RewardMarketState>, ValueQuery>; + StorageMap<_, Blake2_128Concat, CurrencyId, RewardMarketState, BalanceOf>, ValueQuery>; /// The Reward market borrow state for each market #[pallet::storage] #[pallet::getter(fn reward_borrow_state)] pub type RewardBorrowState = - StorageMap<_, Blake2_128Concat, CurrencyId, RewardMarketState>, ValueQuery>; + StorageMap<_, Blake2_128Concat, CurrencyId, RewardMarketState, BalanceOf>, ValueQuery>; /// The incentive reward index for each market for each supplier as of the last time they accrued Reward #[pallet::storage] @@ -577,23 +577,15 @@ pub mod pallet { pub(crate) type StorageVersion = StorageValue<_, Versions, ValueQuery, DefaultVersion>; #[pallet::genesis_config] - pub struct GenesisConfig { + #[derive(frame_support::DefaultNoBound)] + pub struct GenesisConfig { pub max_exchange_rate: Rate, pub min_exchange_rate: Rate, - } - - #[cfg(feature = "std")] - impl Default for GenesisConfig { - fn default() -> Self { - Self { - max_exchange_rate: Rate::from_inner(DEFAULT_MAX_EXCHANGE_RATE), - min_exchange_rate: Rate::from_inner(DEFAULT_MIN_EXCHANGE_RATE), - } - } + pub _marker: PhantomData, } #[pallet::genesis_build] - impl GenesisBuild for GenesisConfig { + impl BuildGenesisConfig for GenesisConfig { fn build(&self) { MaxExchangeRate::::put(&self.max_exchange_rate); MinExchangeRate::::put(&self.min_exchange_rate); diff --git a/crates/loans/src/mock.rs b/crates/loans/src/mock.rs index b84f9d102a..d65ba061ed 100644 --- a/crates/loans/src/mock.rs +++ b/crates/loans/src/mock.rs @@ -34,21 +34,16 @@ use primitives::{ DOT, IBTC, INTR, KBTC, KINT, KSM, }; use sp_core::H256; -use sp_runtime::{testing::Header, traits::IdentityLookup, AccountId32, FixedI128}; -use sp_std::vec::Vec; +use sp_runtime::{traits::IdentityLookup, AccountId32, BuildStorage, FixedI128}; use traits::OracleApi; -type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; type Block = frame_system::mocking::MockBlock; construct_runtime!( - pub enum Test where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, + pub enum Test { - System: frame_system::{Pallet, Call, Storage, Config, Event}, - Loans: loans::{Pallet, Storage, Call, Event, Config}, + System: frame_system::{Pallet, Call, Storage, Config, Event}, + Loans: loans::{Pallet, Call, Storage, Event, Config}, TimestampPallet: pallet_timestamp::{Pallet, Call, Storage, Inherent}, Tokens: orml_tokens::{Pallet, Call, Storage, Config, Event}, Currency: currency::{Pallet}, @@ -71,13 +66,12 @@ impl frame_system::Config for Test { type DbWeight = (); type RuntimeOrigin = RuntimeOrigin; type RuntimeCall = RuntimeCall; - type Index = u64; - type BlockNumber = BlockNumber; + type Nonce = u64; + type Block = Block; type Hash = H256; type Hashing = ::sp_runtime::traits::BlakeTwo256; type AccountId = AccountId; type Lookup = IdentityLookup; - type Header = Header; type RuntimeEvent = RuntimeEvent; type BlockHashCount = BlockHashCount; type Version = (); @@ -313,15 +307,14 @@ pub(crate) fn set_mock_balances() { pub(crate) fn new_test_ext() -> sp_io::TestExternalities { use mocktopus::mocking::Mockable; - let mut t = frame_system::GenesisConfig::default().build_storage::().unwrap(); + let mut t = frame_system::GenesisConfig::::default().build_storage().unwrap(); - GenesisBuild::::assimilate_storage( - &loans::GenesisConfig { - max_exchange_rate: Rate::from_inner(DEFAULT_MAX_EXCHANGE_RATE), - min_exchange_rate: Rate::from_inner(DEFAULT_MIN_EXCHANGE_RATE), - }, - &mut t, - ) + loans::GenesisConfig:: { + max_exchange_rate: Rate::from_inner(DEFAULT_MAX_EXCHANGE_RATE), + min_exchange_rate: Rate::from_inner(DEFAULT_MIN_EXCHANGE_RATE), + _marker: Default::default(), + } + .assimilate_storage(&mut t) .unwrap(); let mut ext = sp_io::TestExternalities::new(t); @@ -354,15 +347,14 @@ pub(crate) fn new_test_ext() -> sp_io::TestExternalities { pub(crate) fn new_test_ext_no_markets() -> sp_io::TestExternalities { use mocktopus::mocking::Mockable; - let mut t = frame_system::GenesisConfig::default().build_storage::().unwrap(); + let mut t = frame_system::GenesisConfig::::default().build_storage().unwrap(); - GenesisBuild::::assimilate_storage( - &loans::GenesisConfig { - max_exchange_rate: Rate::from_inner(DEFAULT_MAX_EXCHANGE_RATE), - min_exchange_rate: Rate::from_inner(DEFAULT_MIN_EXCHANGE_RATE), - }, - &mut t, - ) + loans::GenesisConfig:: { + max_exchange_rate: Rate::from_inner(DEFAULT_MAX_EXCHANGE_RATE), + min_exchange_rate: Rate::from_inner(DEFAULT_MIN_EXCHANGE_RATE), + _marker: Default::default(), + } + .assimilate_storage(&mut t) .unwrap(); let mut ext = sp_io::TestExternalities::new(t); diff --git a/crates/loans/src/rate_model.rs b/crates/loans/src/rate_model.rs index cc17bb45f5..0e95e3cd6a 100644 --- a/crates/loans/src/rate_model.rs +++ b/crates/loans/src/rate_model.rs @@ -23,8 +23,19 @@ use sp_runtime::traits::{CheckedAdd, CheckedDiv, CheckedSub, Saturating}; use crate::*; /// Parallel interest rate model -#[cfg_attr(feature = "std", derive(serde::Deserialize, serde::Serialize))] -#[derive(Encode, Decode, Eq, PartialEq, Copy, Clone, RuntimeDebug, TypeInfo, MaxEncodedLen)] +#[derive( + serde::Deserialize, + serde::Serialize, + Encode, + Decode, + Eq, + PartialEq, + Copy, + Clone, + RuntimeDebug, + TypeInfo, + MaxEncodedLen, +)] pub enum InterestRateModel { Jump(JumpModel), Curve(CurveModel), @@ -76,8 +87,19 @@ impl InterestRateModel { } /// The jump interest rate model -#[cfg_attr(feature = "std", derive(serde::Deserialize, serde::Serialize))] -#[derive(Encode, Decode, Eq, PartialEq, Copy, Clone, RuntimeDebug, Default, TypeInfo, MaxEncodedLen)] +#[derive( + serde::Deserialize, + serde::Serialize, + Encode, + Decode, + Eq, + PartialEq, + Copy, + Clone, + RuntimeDebug, + TypeInfo, + MaxEncodedLen, +)] pub struct JumpModel { /// The base interest rate when utilization rate is 0 pub base_rate: Rate, @@ -147,8 +169,19 @@ impl JumpModel { } /// The curve interest rate model -#[cfg_attr(feature = "std", derive(serde::Deserialize, serde::Serialize))] -#[derive(Encode, Decode, Eq, PartialEq, Copy, Clone, RuntimeDebug, Default, TypeInfo, MaxEncodedLen)] +#[derive( + serde::Deserialize, + serde::Serialize, + Encode, + Decode, + Eq, + PartialEq, + Copy, + Clone, + RuntimeDebug, + TypeInfo, + MaxEncodedLen, +)] pub struct CurveModel { pub base_rate: Rate, } diff --git a/crates/loans/src/types.rs b/crates/loans/src/types.rs index 871ab6765d..afc4b870ff 100644 --- a/crates/loans/src/types.rs +++ b/crates/loans/src/types.rs @@ -76,8 +76,19 @@ pub struct EarnedSnapshot { } /// The current state of a market. For more information, see [Market]. -#[cfg_attr(feature = "std", derive(serde::Deserialize, serde::Serialize))] -#[derive(Clone, Copy, PartialEq, Eq, codec::Decode, codec::Encode, RuntimeDebug, TypeInfo, MaxEncodedLen)] +#[derive( + serde::Deserialize, + serde::Serialize, + Encode, + Decode, + Eq, + PartialEq, + Copy, + Clone, + RuntimeDebug, + TypeInfo, + MaxEncodedLen, +)] pub enum MarketState { Active, Pending, @@ -89,8 +100,19 @@ pub enum MarketState { /// Market. /// /// A large pool of liquidity where accounts can lend and borrow. -#[cfg_attr(feature = "std", derive(serde::Deserialize, serde::Serialize))] -#[derive(Clone, PartialEq, Eq, codec::Decode, codec::Encode, RuntimeDebug, TypeInfo, MaxEncodedLen)] +#[derive( + serde::Deserialize, + serde::Serialize, + Encode, + Decode, + Eq, + PartialEq, + Copy, + Clone, + RuntimeDebug, + TypeInfo, + MaxEncodedLen, +)] pub struct Market { /// The secure collateral ratio pub collateral_factor: Ratio, diff --git a/crates/multi-transaction-payment/Cargo.toml b/crates/multi-transaction-payment/Cargo.toml index 10d7b91b0e..e96fa59ce1 100644 --- a/crates/multi-transaction-payment/Cargo.toml +++ b/crates/multi-transaction-payment/Cargo.toml @@ -7,7 +7,7 @@ name = "multi-transaction-payment" version = "1.2.0" [dependencies] -serde = { version = "1.0.130", default-features = false, features = ["derive"], optional = true } +serde = { version = "1.0.130", default-features = false, features = ["derive"] } codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false, features = ["derive", "max-encoded-len"] } scale-info = { version = "2.2.0", default-features = false, features = ["derive"] } @@ -39,7 +39,7 @@ sp-arithmetic = { git = "https://github.com/paritytech/substrate", branch = "pol [features] default = ["std"] std = [ - "serde", + "serde/std", "codec/std", "scale-info/std", diff --git a/crates/multi-transaction-payment/src/mock.rs b/crates/multi-transaction-payment/src/mock.rs index deb13e842f..15bcae177a 100644 --- a/crates/multi-transaction-payment/src/mock.rs +++ b/crates/multi-transaction-payment/src/mock.rs @@ -19,11 +19,10 @@ pub use primitives::{CurrencyId, CurrencyId::*, TokenSymbol::*}; use sp_arithmetic::{FixedI128, FixedPointNumber, FixedU128, Perquintill}; use sp_core::{ConstU32, Get, H256}; use sp_runtime::{ - testing::Header, traits::{AccountIdConversion, BlakeTwo256, Bounded, IdentityLookup}, + BuildStorage, }; -type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; type Block = frame_system::mocking::MockBlock; pub type NativeCurrency = CurrencyAdapter; pub type SlowAdjustingFeeUpdate = @@ -35,12 +34,9 @@ pub type SignedInner = i128; pub type UnsignedFixedPoint = FixedU128; frame_support::construct_runtime!( - pub enum Test where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, + pub enum Test { - System: frame_system::{Pallet, Call, Config, Storage, Event}, + System: frame_system::{Pallet, Call, Storage, Config, Event}, DexGeneral: dex_general::{Pallet, Call, Storage, Event}, Currency: currency::{Pallet}, Tokens: orml_tokens::{Pallet, Storage, Event, Config}, @@ -176,14 +172,13 @@ impl testing_helpers::Config for Test {} impl frame_system::Config for Test { type BaseCallFilter = frame_support::traits::Everything; type RuntimeOrigin = RuntimeOrigin; - type Index = u64; + type Nonce = u64; + type Block = Block; type RuntimeCall = RuntimeCall; - type BlockNumber = u64; type Hash = H256; type Hashing = BlakeTwo256; type AccountId = u128; type Lookup = IdentityLookup; - type Header = Header; type RuntimeEvent = RuntimeEvent; type BlockHashCount = BlockHashCount; type DbWeight = (); @@ -251,11 +246,7 @@ impl dex_general::Config for Test { } pub fn new_test_ext() -> sp_io::TestExternalities { - let mut t = frame_system::GenesisConfig::default() - .build_storage::() - .unwrap() - .into(); - + let mut t = frame_system::GenesisConfig::::default().build_storage().unwrap(); dex_general::GenesisConfig:: { fee_receiver: None, fee_point: 5, diff --git a/crates/nomination/Cargo.toml b/crates/nomination/Cargo.toml index afeb13d1a3..aede9a3131 100644 --- a/crates/nomination/Cargo.toml +++ b/crates/nomination/Cargo.toml @@ -5,7 +5,7 @@ authors = ["Interlay Ltd"] edition = "2021" [dependencies] -serde = { version = "1.0.130", default-features = false, features = ["derive"], optional = true } +serde = { version = "1.0.130", default-features = false, features = ["derive"] } codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false, features = ["derive", "max-encoded-len"] } scale-info = { version = "2.2.0", default-features = false, features = ["derive"] } @@ -49,7 +49,7 @@ orml-traits = { git = "https://github.com/open-web3-stack/open-runtime-module-li [features] default = ["std"] std = [ - "serde", + "serde/std", "codec/std", "sp-runtime/std", diff --git a/crates/nomination/src/ext.rs b/crates/nomination/src/ext.rs index 5124274e3f..5bd0a522e7 100644 --- a/crates/nomination/src/ext.rs +++ b/crates/nomination/src/ext.rs @@ -56,7 +56,7 @@ pub(crate) mod vault_registry { vault_id: &DefaultVaultId, nominator_id: &T::AccountId, maybe_amount: Option>, - nonce: Option<::Index>, + nonce: Option<::Nonce>, ) -> Result, DispatchError> { >::withdraw_collateral(vault_id, nominator_id, maybe_amount, nonce) } @@ -74,7 +74,7 @@ pub(crate) mod staking { use staking::{RewardsApi, StakingApi}; use vault_registry::DefaultVaultId; - pub fn nonce(vault_id: &DefaultVaultId) -> T::Index { + pub fn nonce(vault_id: &DefaultVaultId) -> T::Nonce { T::VaultStaking::nonce(vault_id) } diff --git a/crates/nomination/src/lib.rs b/crates/nomination/src/lib.rs index 2dfe9a2a05..843afb24a0 100644 --- a/crates/nomination/src/lib.rs +++ b/crates/nomination/src/lib.rs @@ -95,7 +95,7 @@ pub mod pallet { } #[pallet::hooks] - impl Hooks for Pallet {} + impl Hooks> for Pallet {} /// Flag indicating whether this feature is enabled #[pallet::storage] @@ -112,21 +112,14 @@ pub mod pallet { StorageMap<_, Blake2_128Concat, DefaultVaultId, BalanceOf, ValueQuery>; #[pallet::genesis_config] - pub struct GenesisConfig { + #[derive(frame_support::DefaultNoBound)] + pub struct GenesisConfig { pub is_nomination_enabled: bool, - } - - #[cfg(feature = "std")] - impl Default for GenesisConfig { - fn default() -> Self { - Self { - is_nomination_enabled: Default::default(), - } - } + pub _marker: PhantomData, } #[pallet::genesis_build] - impl GenesisBuild for GenesisConfig { + impl BuildGenesisConfig for GenesisConfig { fn build(&self) { { NominationEnabled::::put(self.is_nomination_enabled); @@ -198,7 +191,7 @@ pub mod pallet { origin: OriginFor, vault_id: DefaultVaultId, amount: Option>, - index: Option, + index: Option, ) -> DispatchResultWithPostInfo { let nominator_id = ensure_signed(origin)?; Self::_withdraw_collateral(&vault_id, &nominator_id, amount, index.unwrap_or_default())?; @@ -229,7 +222,7 @@ impl Pallet { vault_id: &DefaultVaultId, nominator_id: &T::AccountId, maybe_amount: Option>, - index: T::Index, + index: T::Nonce, ) -> DispatchResult { let nonce = ext::staking::nonce::(vault_id); let index = sp_std::cmp::min(index, nonce); diff --git a/crates/nomination/src/mock.rs b/crates/nomination/src/mock.rs index c1e00c0811..20c2c4b3c2 100644 --- a/crates/nomination/src/mock.rs +++ b/crates/nomination/src/mock.rs @@ -3,7 +3,7 @@ use crate::{Config, Error}; use currency::Amount; use frame_support::{ assert_ok, parameter_types, - traits::{ConstU32, Everything, GenesisBuild}, + traits::{ConstU32, Everything}, PalletId, }; use frame_system::EnsureRoot; @@ -14,23 +14,19 @@ use primitives::{VaultCurrencyPair, VaultId}; use sp_arithmetic::{FixedI128, FixedU128}; use sp_core::H256; use sp_runtime::{ - testing::{Header, TestXt}, + testing::TestXt, traits::{BlakeTwo256, IdentityLookup, One, Zero}, - FixedPointNumber, + BuildStorage, FixedPointNumber, }; type TestExtrinsic = TestXt; -type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; type Block = frame_system::mocking::MockBlock; // Configure a mock runtime to test the pallet. frame_support::construct_runtime!( - pub enum Test where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, + pub enum Test { - System: frame_system::{Pallet, Call, Storage, Config, Event}, + System: frame_system::{Pallet, Call, Storage, Config, Event}, Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent}, // Tokens & Balances @@ -45,18 +41,17 @@ frame_support::construct_runtime!( VaultRegistry: vault_registry::{Pallet, Call, Config, Storage, Event}, Fee: fee::{Pallet, Call, Config, Storage}, Oracle: oracle::{Pallet, Call, Config, Storage, Event}, - Nomination: nomination::{Pallet, Call, Config, Storage, Event}, + Nomination: nomination::{Pallet, Call, Storage, Config, Event}, Currency: currency::{Pallet}, - Loans: loans::{Pallet, Storage, Call, Event, Config}, + Loans: loans::{Pallet, Call, Storage, Event, Config}, } ); pub type AccountId = u64; pub type Balance = u128; pub type RawAmount = i128; -pub type BlockNumber = u64; pub type Moment = u64; -pub type Index = u64; +pub type Nonce = u64; pub type SignedFixedPoint = FixedI128; pub type SignedInner = i128; pub type UnsignedFixedPoint = FixedU128; @@ -73,13 +68,12 @@ impl frame_system::Config for Test { type DbWeight = (); type RuntimeOrigin = RuntimeOrigin; type RuntimeCall = RuntimeCall; - type Index = Index; - type BlockNumber = BlockNumber; + type Nonce = Nonce; + type Block = Block; type Hash = H256; type Hashing = BlakeTwo256; type AccountId = AccountId; type Lookup = IdentityLookup; - type Header = Header; type RuntimeEvent = RuntimeEvent; type BlockHashCount = BlockHashCount; type Version = (); @@ -294,16 +288,15 @@ pub struct ExtBuilder; impl ExtBuilder { pub fn build_with(balances: orml_tokens::GenesisConfig) -> sp_io::TestExternalities { - let mut storage = frame_system::GenesisConfig::default().build_storage::().unwrap(); + let mut storage = frame_system::GenesisConfig::::default().build_storage().unwrap(); balances.assimilate_storage(&mut storage).unwrap(); - frame_support::traits::GenesisBuild::::assimilate_storage( - &nomination::GenesisConfig { - is_nomination_enabled: true, - }, - &mut storage, - ) + nomination::GenesisConfig:: { + is_nomination_enabled: true, + _marker: Default::default(), + } + .assimilate_storage(&mut storage) .unwrap(); fee::GenesisConfig:: { diff --git a/crates/oracle/src/lib.rs b/crates/oracle/src/lib.rs index a9abc3e2cb..3af135edb9 100644 --- a/crates/oracle/src/lib.rs +++ b/crates/oracle/src/lib.rs @@ -36,7 +36,7 @@ use frame_support::{ weights::Weight, BoundedVec, }; -use frame_system::{ensure_root, ensure_signed}; +use frame_system::{ensure_root, ensure_signed, pallet_prelude::BlockNumberFor}; use scale_info::TypeInfo; use sp_runtime::traits::*; use sp_std::{convert::TryInto, vec::Vec}; @@ -111,8 +111,8 @@ pub mod pallet { } #[pallet::hooks] - impl Hooks for Pallet { - fn on_initialize(n: T::BlockNumber) -> Weight { + impl Hooks> for Pallet { + fn on_initialize(n: BlockNumberFor) -> Weight { let iterations = Self::begin_block(n); ::WeightInfo::on_initialize(iterations) } @@ -161,23 +161,14 @@ pub mod pallet { pub(super) type StorageVersion = StorageValue<_, Version, ValueQuery, DefaultForStorageVersion>; #[pallet::genesis_config] + #[derive(frame_support::DefaultNoBound)] pub struct GenesisConfig { pub max_delay: u32, pub authorized_oracles: Vec<(T::AccountId, NameOf)>, } - #[cfg(feature = "std")] - impl Default for GenesisConfig { - fn default() -> Self { - Self { - max_delay: Default::default(), - authorized_oracles: Default::default(), - } - } - } - #[pallet::genesis_build] - impl GenesisBuild for GenesisConfig { + impl BuildGenesisConfig for GenesisConfig { fn build(&self) { // T::Moment doesn't implement serialize so we use // From as bound by AtLeast32Bit @@ -257,7 +248,7 @@ pub mod pallet { #[cfg_attr(test, mockable)] impl Pallet { // public only for testing purposes - pub fn begin_block(_height: T::BlockNumber) -> u32 { + pub fn begin_block(_height: BlockNumberFor) -> u32 { // read to a temporary value, because we can't alter the map while we iterate over it let raw_values_updated: Vec<_> = RawValuesUpdated::::iter().collect(); diff --git a/crates/oracle/src/mock.rs b/crates/oracle/src/mock.rs index 16a74ebbec..12e35597f0 100644 --- a/crates/oracle/src/mock.rs +++ b/crates/oracle/src/mock.rs @@ -2,7 +2,7 @@ use crate as oracle; use crate::{Config, Error}; use frame_support::{ parameter_types, - traits::{ConstU32, Everything, GenesisBuild}, + traits::{ConstU32, Everything}, BoundedVec, }; use mocktopus::mocking::clear_mocks; @@ -11,22 +11,18 @@ pub use primitives::{CurrencyId::Token, TokenSymbol::*}; use sp_arithmetic::{FixedI128, FixedU128}; use sp_core::H256; use sp_runtime::{ - testing::Header, traits::{BlakeTwo256, IdentityLookup}, + BuildStorage, }; -type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; type Block = frame_system::mocking::MockBlock; // Configure a mock runtime to test the pallet. frame_support::construct_runtime!( - pub enum Test where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, + pub enum Test { // substrate pallets - System: frame_system::{Pallet, Call, Storage, Config, Event}, + System: frame_system::{Pallet, Call, Storage, Config, Event}, Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent}, Tokens: orml_tokens::{Pallet, Storage, Config, Event}, @@ -40,13 +36,12 @@ frame_support::construct_runtime!( pub type AccountId = u64; pub type Balance = u128; -pub type BlockNumber = u64; pub type UnsignedFixedPoint = FixedU128; pub type SignedFixedPoint = FixedI128; pub type SignedInner = i128; pub type CurrencyId = primitives::CurrencyId; pub type Moment = u64; -pub type Index = u64; +pub type Nonce = u64; parameter_types! { pub const BlockHashCount: u64 = 250; @@ -60,13 +55,12 @@ impl frame_system::Config for Test { type DbWeight = (); type RuntimeOrigin = RuntimeOrigin; type RuntimeCall = RuntimeCall; - type Index = Index; - type BlockNumber = BlockNumber; + type Nonce = Nonce; + type Block = Block; type Hash = H256; type Hashing = BlakeTwo256; type AccountId = AccountId; type Lookup = IdentityLookup; - type Header = Header; type RuntimeEvent = RuntimeEvent; type BlockHashCount = BlockHashCount; type Version = (); @@ -170,7 +164,7 @@ pub struct ExtBuilder; impl ExtBuilder { pub fn build() -> sp_io::TestExternalities { - let mut storage = frame_system::GenesisConfig::default().build_storage::().unwrap(); + let mut storage = frame_system::GenesisConfig::::default().build_storage().unwrap(); oracle::GenesisConfig:: { authorized_oracles: vec![(0, BoundedVec::try_from("test".as_bytes().to_vec()).unwrap())], diff --git a/crates/redeem/Cargo.toml b/crates/redeem/Cargo.toml index 4853f80647..fb47125adb 100644 --- a/crates/redeem/Cargo.toml +++ b/crates/redeem/Cargo.toml @@ -6,7 +6,7 @@ name = "redeem" version = "1.2.0" [dependencies] -serde = { version = "1.0.130", default-features = false, features = ['derive'], optional = true } +serde = { version = "1.0.130", default-features = false, features = ['derive'] } codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false, features = ["derive", "max-encoded-len"] } scale-info = { version = "2.2.0", default-features = false, features = ["derive"] } @@ -54,7 +54,7 @@ orml-traits = { git = "https://github.com/open-web3-stack/open-runtime-module-li [features] default = ["std"] std = [ - "serde", + "serde/std", "codec/std", "sp-io/std", diff --git a/crates/redeem/src/ext.rs b/crates/redeem/src/ext.rs index a1156eb7e9..eb82f90acf 100644 --- a/crates/redeem/src/ext.rs +++ b/crates/redeem/src/ext.rs @@ -6,6 +6,7 @@ pub(crate) mod btc_relay { use bitcoin::types::{FullTransactionProof, Value}; use btc_relay::BtcAddress; use frame_support::dispatch::DispatchError; + use frame_system::pallet_prelude::BlockNumberFor; use sp_core::H256; use sp_std::convert::TryInto; @@ -28,9 +29,9 @@ pub(crate) mod btc_relay { } pub fn has_request_expired( - opentime: T::BlockNumber, + opentime: BlockNumberFor, btc_open_height: u32, - period: T::BlockNumber, + period: BlockNumberFor, ) -> Result { >::has_request_expired(opentime, btc_open_height, period) } @@ -180,13 +181,14 @@ pub(crate) mod treasury { #[cfg_attr(test, mockable)] pub(crate) mod security { + use frame_system::pallet_prelude::BlockNumberFor; use sp_core::H256; pub fn get_secure_id(id: &T::AccountId) -> H256 { >::get_secure_id(id) } - pub fn active_block_number() -> T::BlockNumber { + pub fn active_block_number() -> BlockNumberFor { >::active_block_number() } } diff --git a/crates/redeem/src/lib.rs b/crates/redeem/src/lib.rs index ffd3acc3f3..2cbccaf2ec 100644 --- a/crates/redeem/src/lib.rs +++ b/crates/redeem/src/lib.rs @@ -130,7 +130,7 @@ pub mod pallet { amount: BalanceOf, }, RedeemPeriodChange { - period: T::BlockNumber, + period: BlockNumberFor, }, SelfRedeem { vault_id: DefaultVaultId, @@ -166,7 +166,7 @@ pub mod pallet { /// punish a vault for inactivity or stealing BTC. #[pallet::storage] #[pallet::getter(fn redeem_period)] - pub(super) type RedeemPeriod = StorageValue<_, T::BlockNumber, ValueQuery>; + pub(super) type RedeemPeriod = StorageValue<_, BlockNumberFor, ValueQuery>; /// Users create redeem requests to receive BTC in return for their previously issued tokens. /// This mapping provides access from a unique hash redeemId to a Redeem struct. @@ -197,25 +197,15 @@ pub mod pallet { pub(super) type StorageVersion = StorageValue<_, Version, ValueQuery, DefaultForStorageVersion>; #[pallet::genesis_config] + #[derive(frame_support::DefaultNoBound)] pub struct GenesisConfig { - pub redeem_period: T::BlockNumber, + pub redeem_period: BlockNumberFor, pub redeem_btc_dust_value: BalanceOf, pub redeem_transaction_size: u32, } - #[cfg(feature = "std")] - impl Default for GenesisConfig { - fn default() -> Self { - Self { - redeem_period: Default::default(), - redeem_btc_dust_value: Default::default(), - redeem_transaction_size: Default::default(), - } - } - } - #[pallet::genesis_build] - impl GenesisBuild for GenesisConfig { + impl BuildGenesisConfig for GenesisConfig { fn build(&self) { RedeemPeriod::::put(self.redeem_period); RedeemBtcDustValue::::put(self.redeem_btc_dust_value); @@ -224,7 +214,7 @@ pub mod pallet { } #[pallet::hooks] - impl Hooks for Pallet {} + impl Hooks> for Pallet {} #[pallet::pallet] pub struct Pallet(_); @@ -338,7 +328,7 @@ pub mod pallet { #[pallet::call_index(4)] #[pallet::weight(::WeightInfo::set_redeem_period())] #[transactional] - pub fn set_redeem_period(origin: OriginFor, period: T::BlockNumber) -> DispatchResultWithPostInfo { + pub fn set_redeem_period(origin: OriginFor, period: BlockNumberFor) -> DispatchResultWithPostInfo { ensure_root(origin)?; >::set(period); Self::deposit_event(Event::RedeemPeriodChange { period }); diff --git a/crates/redeem/src/mock.rs b/crates/redeem/src/mock.rs index 1f1294819d..8a5fd6bbe5 100644 --- a/crates/redeem/src/mock.rs +++ b/crates/redeem/src/mock.rs @@ -2,7 +2,7 @@ use crate as redeem; use crate::{Config, Error}; use frame_support::{ assert_ok, parameter_types, - traits::{ConstU32, Everything, GenesisBuild}, + traits::{ConstU32, Everything}, BoundedVec, PalletId, }; use frame_system::EnsureRoot; @@ -14,22 +14,19 @@ use primitives::{Rate, VaultCurrencyPair, VaultId}; pub use sp_arithmetic::{FixedI128, FixedPointNumber, FixedU128}; use sp_core::H256; use sp_runtime::{ - testing::{Header, TestXt}, + testing::TestXt, traits::{BlakeTwo256, IdentityLookup, Zero}, + BuildStorage, }; type TestExtrinsic = TestXt; -type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; type Block = frame_system::mocking::MockBlock; // Configure a mock runtime to test the pallet. frame_support::construct_runtime!( - pub enum Test where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, + pub enum Test { - System: frame_system::{Pallet, Call, Storage, Config, Event}, + System: frame_system::{Pallet, Call, Storage, Config, Event}, Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent}, // Tokens & Balances @@ -47,8 +44,8 @@ frame_support::construct_runtime!( Redeem: redeem::{Pallet, Call, Config, Storage, Event}, Fee: fee::{Pallet, Call, Config, Storage}, Currency: currency::{Pallet}, - Nomination: nomination::{Pallet, Call, Config, Storage, Event}, - Loans: loans::{Pallet, Storage, Call, Event, Config}, + Nomination: nomination::{Pallet, Call, Storage, Config, Event}, + Loans: loans::{Pallet, Call, Storage, Event, Config}, } ); @@ -57,7 +54,7 @@ pub type Balance = u128; pub type RawAmount = i128; pub type BlockNumber = u64; pub type Moment = u64; -pub type Index = u64; +pub type Nonce = u64; pub type SignedFixedPoint = FixedI128; pub type SignedInner = i128; pub type UnsignedFixedPoint = FixedU128; @@ -74,13 +71,12 @@ impl frame_system::Config for Test { type DbWeight = (); type RuntimeOrigin = RuntimeOrigin; type RuntimeCall = RuntimeCall; - type Index = Index; - type BlockNumber = BlockNumber; + type Nonce = Nonce; + type Block = Block; type Hash = H256; type Hashing = BlakeTwo256; type AccountId = AccountId; type Lookup = IdentityLookup; - type Header = Header; type RuntimeEvent = RuntimeEvent; type BlockHashCount = BlockHashCount; type Version = (); @@ -296,7 +292,7 @@ pub struct ExtBuilder; impl ExtBuilder { pub fn build_with(balances: orml_tokens::GenesisConfig) -> sp_io::TestExternalities { - let mut storage = frame_system::GenesisConfig::default().build_storage::().unwrap(); + let mut storage = frame_system::GenesisConfig::::default().build_storage().unwrap(); balances.assimilate_storage(&mut storage).unwrap(); @@ -346,13 +342,19 @@ impl ExtBuilder { .assimilate_storage(&mut storage) .unwrap(); - GenesisBuild::::assimilate_storage( - &loans::GenesisConfig { - max_exchange_rate: Rate::from_inner(DEFAULT_MAX_EXCHANGE_RATE), - min_exchange_rate: Rate::from_inner(DEFAULT_MIN_EXCHANGE_RATE), - }, - &mut storage, - ) + loans::GenesisConfig:: { + max_exchange_rate: Rate::from_inner(DEFAULT_MAX_EXCHANGE_RATE), + min_exchange_rate: Rate::from_inner(DEFAULT_MIN_EXCHANGE_RATE), + _marker: Default::default(), + } + .assimilate_storage(&mut storage) + .unwrap(); + + nomination::GenesisConfig:: { + is_nomination_enabled: true, + _marker: Default::default(), + } + .assimilate_storage(&mut storage) .unwrap(); storage.into() diff --git a/crates/redeem/src/types.rs b/crates/redeem/src/types.rs index c14ddc4c6a..74f3d4b7f6 100644 --- a/crates/redeem/src/types.rs +++ b/crates/redeem/src/types.rs @@ -7,6 +7,7 @@ use vault_registry::types::CurrencyId; use crate::Config; use codec::{Decode, Encode, MaxEncodedLen}; use currency::Amount; +use frame_system::pallet_prelude::BlockNumberFor; /// Storage version. #[derive(Encode, Decode, Eq, PartialEq, TypeInfo, MaxEncodedLen)] @@ -19,12 +20,8 @@ pub(crate) type BalanceOf = ::Balance; pub(crate) type DefaultVaultId = VaultId<::AccountId, CurrencyId>; -pub type DefaultRedeemRequest = RedeemRequest< - ::AccountId, - ::BlockNumber, - BalanceOf, - CurrencyId, ->; +pub type DefaultRedeemRequest = + RedeemRequest<::AccountId, BlockNumberFor, BalanceOf, CurrencyId>; pub trait RedeemRequestExt { fn amount_btc(&self) -> Amount; @@ -33,7 +30,7 @@ pub trait RedeemRequestExt { fn transfer_fee_btc(&self) -> Amount; } -impl RedeemRequestExt for RedeemRequest, CurrencyId> { +impl RedeemRequestExt for RedeemRequest, BalanceOf, CurrencyId> { fn amount_btc(&self) -> Amount { Amount::new(self.amount_btc, self.vault.wrapped_currency()) } diff --git a/crates/replace/Cargo.toml b/crates/replace/Cargo.toml index 0ec5e8595f..18e8cf9da7 100644 --- a/crates/replace/Cargo.toml +++ b/crates/replace/Cargo.toml @@ -6,7 +6,7 @@ name = "replace" version = "1.2.0" [dependencies] -serde = { version = "1.0.130", default-features = false, features = ['derive'], optional = true } +serde = { version = "1.0.130", default-features = false, features = ['derive'] } codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false, features = ["derive", "max-encoded-len"] } scale-info = { version = "2.2.0", default-features = false, features = ["derive"] } @@ -53,7 +53,7 @@ orml-traits = { git = "https://github.com/open-web3-stack/open-runtime-module-li [features] default = ["std"] std = [ - "serde", + "serde/std", "codec/std", "sp-io/std", diff --git a/crates/replace/src/ext.rs b/crates/replace/src/ext.rs index dc8d2a77d2..730d59c8cb 100644 --- a/crates/replace/src/ext.rs +++ b/crates/replace/src/ext.rs @@ -6,6 +6,7 @@ pub(crate) mod btc_relay { use bitcoin::types::{FullTransactionProof, Value}; use btc_relay::BtcAddress; use frame_support::dispatch::DispatchError; + use frame_system::pallet_prelude::BlockNumberFor; use sp_core::H256; use sp_std::convert::TryInto; @@ -28,9 +29,9 @@ pub(crate) mod btc_relay { } pub fn has_request_expired( - opentime: T::BlockNumber, + opentime: BlockNumberFor, btc_open_height: u32, - period: T::BlockNumber, + period: BlockNumberFor, ) -> Result { >::has_request_expired(opentime, btc_open_height, period) } @@ -149,13 +150,14 @@ pub(crate) mod vault_registry { #[cfg_attr(test, mockable)] pub(crate) mod security { + use frame_system::pallet_prelude::BlockNumberFor; use sp_core::H256; pub fn get_secure_id(id: &T::AccountId) -> H256 { >::get_secure_id(id) } - pub fn active_block_number() -> T::BlockNumber { + pub fn active_block_number() -> BlockNumberFor { >::active_block_number() } } diff --git a/crates/replace/src/lib.rs b/crates/replace/src/lib.rs index 3187c8d4a3..d3a1c9020f 100644 --- a/crates/replace/src/lib.rs +++ b/crates/replace/src/lib.rs @@ -130,7 +130,7 @@ pub mod pallet { griefing_collateral: BalanceOf, }, ReplacePeriodChange { - period: T::BlockNumber, + period: BlockNumberFor, }, } @@ -171,7 +171,7 @@ pub mod pallet { /// to prevent griefing of vault collateral. #[pallet::storage] #[pallet::getter(fn replace_period)] - pub(super) type ReplacePeriod = StorageValue<_, T::BlockNumber, ValueQuery>; + pub(super) type ReplacePeriod = StorageValue<_, BlockNumberFor, ValueQuery>; /// The minimum amount of btc that is accepted for replace requests; any lower values would /// risk the bitcoin client to reject the payment @@ -190,23 +190,14 @@ pub mod pallet { pub(super) type StorageVersion = StorageValue<_, Version, ValueQuery, DefaultForStorageVersion>; #[pallet::genesis_config] + #[derive(frame_support::DefaultNoBound)] pub struct GenesisConfig { - pub replace_period: T::BlockNumber, + pub replace_period: BlockNumberFor, pub replace_btc_dust_value: BalanceOf, } - #[cfg(feature = "std")] - impl Default for GenesisConfig { - fn default() -> Self { - Self { - replace_period: Default::default(), - replace_btc_dust_value: Default::default(), - } - } - } - #[pallet::genesis_build] - impl GenesisBuild for GenesisConfig { + impl BuildGenesisConfig for GenesisConfig { fn build(&self) { ReplacePeriod::::put(self.replace_period); ReplaceBtcDustValue::::put(self.replace_btc_dust_value); @@ -214,7 +205,7 @@ pub mod pallet { } #[pallet::hooks] - impl Hooks for Pallet {} + impl Hooks> for Pallet {} #[pallet::pallet] pub struct Pallet(_); @@ -332,7 +323,7 @@ pub mod pallet { #[pallet::call_index(5)] #[pallet::weight(::WeightInfo::set_replace_period())] #[transactional] - pub fn set_replace_period(origin: OriginFor, period: T::BlockNumber) -> DispatchResultWithPostInfo { + pub fn set_replace_period(origin: OriginFor, period: BlockNumberFor) -> DispatchResultWithPostInfo { ensure_root(origin)?; >::set(period); Self::deposit_event(Event::ReplacePeriodChange { period }); diff --git a/crates/replace/src/mock.rs b/crates/replace/src/mock.rs index ad728c297d..b77eb99db7 100644 --- a/crates/replace/src/mock.rs +++ b/crates/replace/src/mock.rs @@ -3,7 +3,7 @@ use crate::{Config, Error}; use currency::Amount; use frame_support::{ assert_ok, parameter_types, - traits::{ConstU32, Everything, GenesisBuild}, + traits::{ConstU32, Everything}, PalletId, }; use mocktopus::{macros::mockable, mocking::clear_mocks}; @@ -13,22 +13,19 @@ use primitives::{VaultCurrencyPair, VaultId}; use sp_arithmetic::{FixedI128, FixedPointNumber, FixedU128}; use sp_core::H256; use sp_runtime::{ - testing::{Header, TestXt}, + testing::TestXt, traits::{BlakeTwo256, IdentityLookup, One, Zero}, + BuildStorage, }; type TestExtrinsic = TestXt; -type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; type Block = frame_system::mocking::MockBlock; // Configure a mock runtime to test the pallet. frame_support::construct_runtime!( - pub enum Test where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, + pub enum Test { - System: frame_system::{Pallet, Call, Storage, Config, Event}, + System: frame_system::{Pallet, Call, Storage, Config, Event}, Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent}, // Tokens & Balances @@ -45,7 +42,7 @@ frame_support::construct_runtime!( Oracle: oracle::{Pallet, Call, Config, Storage, Event}, Replace: replace::{Pallet, Call, Config, Storage, Event}, Fee: fee::{Pallet, Call, Config, Storage}, - Nomination: nomination::{Pallet, Call, Config, Storage, Event}, + Nomination: nomination::{Pallet, Call, Storage, Config, Event}, Currency: currency::{Pallet}, } ); @@ -55,7 +52,7 @@ pub type Balance = u128; pub type RawAmount = i128; pub type BlockNumber = u64; pub type Moment = u64; -pub type Index = u64; +pub type Nonce = u64; pub type SignedFixedPoint = FixedI128; pub type SignedInner = i128; pub type UnsignedFixedPoint = FixedU128; @@ -72,13 +69,12 @@ impl frame_system::Config for Test { type DbWeight = (); type RuntimeOrigin = RuntimeOrigin; type RuntimeCall = RuntimeCall; - type Index = Index; - type BlockNumber = BlockNumber; + type Nonce = Nonce; + type Block = Block; type Hash = H256; type Hashing = BlakeTwo256; type AccountId = AccountId; type Lookup = IdentityLookup; - type Header = Header; type RuntimeEvent = RuntimeEvent; type BlockHashCount = BlockHashCount; type Version = (); @@ -284,7 +280,7 @@ pub struct ExtBuilder; impl ExtBuilder { pub fn build_with(balances: orml_tokens::GenesisConfig) -> sp_io::TestExternalities { - let mut storage = frame_system::GenesisConfig::default().build_storage::().unwrap(); + let mut storage = frame_system::GenesisConfig::::default().build_storage().unwrap(); balances.assimilate_storage(&mut storage).unwrap(); @@ -299,6 +295,13 @@ impl ExtBuilder { .assimilate_storage(&mut storage) .unwrap(); + nomination::GenesisConfig:: { + is_nomination_enabled: true, + _marker: Default::default(), + } + .assimilate_storage(&mut storage) + .unwrap(); + const PAIR: VaultCurrencyPair = VaultCurrencyPair { collateral: DEFAULT_COLLATERAL_CURRENCY, wrapped: DEFAULT_WRAPPED_CURRENCY, diff --git a/crates/replace/src/types.rs b/crates/replace/src/types.rs index 849151a643..bb4e2da672 100644 --- a/crates/replace/src/types.rs +++ b/crates/replace/src/types.rs @@ -2,6 +2,7 @@ use crate::Config; use codec::{Decode, Encode, MaxEncodedLen}; use currency::Amount; use frame_support::traits::Get; +use frame_system::pallet_prelude::BlockNumberFor; pub use primitives::replace::{ReplaceRequest, ReplaceRequestStatus}; use primitives::VaultId; use scale_info::TypeInfo; @@ -33,12 +34,8 @@ pub(crate) struct ReplaceRequestV0 { pub completed: bool, } -pub type DefaultReplaceRequest = ReplaceRequest< - ::AccountId, - ::BlockNumber, - BalanceOf, - CurrencyId, ->; +pub type DefaultReplaceRequest = + ReplaceRequest<::AccountId, BlockNumberFor, BalanceOf, CurrencyId>; pub trait ReplaceRequestExt { fn amount(&self) -> Amount; diff --git a/crates/reward/Cargo.toml b/crates/reward/Cargo.toml index 61cd3cb286..a3a2d99812 100644 --- a/crates/reward/Cargo.toml +++ b/crates/reward/Cargo.toml @@ -7,7 +7,7 @@ version = "1.2.0" [dependencies] log = { version = "0.4.17", default-features = false } -serde = { version = "1.0.130", default-features = false, features = ["derive"], optional = true } +serde = { version = "1.0.130", default-features = false, features = ["derive"] } codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false, features = ["derive", "max-encoded-len"] } scale-info = { version = "2.2.0", default-features = false, features = ["derive"] } @@ -35,7 +35,7 @@ pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = " default = ["std"] std = [ "log/std", - "serde", + "serde/std", "codec/std", "primitives/std", diff --git a/crates/reward/src/lib.rs b/crates/reward/src/lib.rs index a66614a21a..f64eac3f09 100644 --- a/crates/reward/src/lib.rs +++ b/crates/reward/src/lib.rs @@ -28,8 +28,8 @@ use sp_std::{cmp::PartialOrd, convert::TryInto, fmt::Debug}; pub(crate) type SignedFixedPoint = >::SignedFixedPoint; +use frame_system::pallet_prelude::*; pub use pallet::*; - #[frame_support::pallet] pub mod pallet { use super::*; @@ -104,7 +104,7 @@ pub mod pallet { } #[pallet::hooks] - impl, I: 'static> Hooks for Pallet {} + impl, I: 'static> Hooks> for Pallet {} /// The total stake deposited to this reward pool. #[pallet::storage] diff --git a/crates/reward/src/mock.rs b/crates/reward/src/mock.rs index b446ba208b..3782f0b775 100644 --- a/crates/reward/src/mock.rs +++ b/crates/reward/src/mock.rs @@ -13,29 +13,24 @@ pub use primitives::{ use sp_arithmetic::FixedI128; use sp_core::H256; use sp_runtime::{ - testing::Header, traits::{BlakeTwo256, IdentityLookup}, + BuildStorage, }; -type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; type Block = frame_system::mocking::MockBlock; // Configure a mock runtime to test the pallet. frame_support::construct_runtime!( - pub enum Test where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, + pub enum Test { - System: frame_system::{Pallet, Call, Storage, Config, Event}, + System: frame_system::{Pallet, Call, Storage, Config, Event}, Reward: reward::{Pallet, Call, Storage, Event}, } ); pub type AccountId = u64; -pub type BlockNumber = u64; -pub type Index = u64; pub type SignedFixedPoint = FixedI128; +pub type Nonce = u64; parameter_types! { pub const BlockHashCount: u64 = 250; @@ -49,13 +44,12 @@ impl frame_system::Config for Test { type DbWeight = (); type RuntimeOrigin = RuntimeOrigin; type RuntimeCall = RuntimeCall; - type Index = Index; - type BlockNumber = BlockNumber; + type Nonce = Nonce; + type Block = Block; type Hash = H256; type Hashing = BlakeTwo256; type AccountId = AccountId; type Lookup = IdentityLookup; - type Header = Header; type RuntimeEvent = RuntimeEvent; type BlockHashCount = BlockHashCount; type Version = (); @@ -87,7 +81,7 @@ pub struct ExtBuilder; impl ExtBuilder { pub fn build() -> sp_io::TestExternalities { - let storage = frame_system::GenesisConfig::default().build_storage::().unwrap(); + let storage = frame_system::GenesisConfig::::default().build_storage().unwrap(); storage.into() } diff --git a/crates/security/Cargo.toml b/crates/security/Cargo.toml index a2031bcb98..8c03d11627 100644 --- a/crates/security/Cargo.toml +++ b/crates/security/Cargo.toml @@ -7,7 +7,7 @@ edition = "2021" [dependencies] codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false, features = ["derive", "max-encoded-len"] } sha2 = { version = "0.8.2", default-features = false } -serde = { version = "1.0.130", default-features = false, features = ["derive"], optional = true } +serde = { version = "1.0.130", default-features = false, features = ["derive"] } scale-info = { version = "2.2.0", default-features = false, features = ["derive"] } # Substrate dependencies @@ -25,7 +25,7 @@ sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0 [features] default = ["std"] std = [ - "serde", + "serde/std", "codec/std", "sha2/std", diff --git a/crates/security/src/lib.rs b/crates/security/src/lib.rs index 5b5cc402bd..dd9592cf9b 100644 --- a/crates/security/src/lib.rs +++ b/crates/security/src/lib.rs @@ -28,6 +28,7 @@ use mocktopus::macros::mockable; use codec::Encode; use frame_support::{dispatch::DispatchError, weights::Weight}; +use frame_system::pallet_prelude::BlockNumberFor; pub use pallet::*; use sha2::{Digest, Sha256}; use sp_core::{H256, U256}; @@ -53,7 +54,7 @@ pub mod pallet { #[pallet::event] #[pallet::generate_deposit(pub(super) fn deposit_event)] pub enum Event { - UpdateActiveBlock { block_number: T::BlockNumber }, + UpdateActiveBlock { block_number: BlockNumberFor }, Activated, Deactivated, } @@ -62,8 +63,8 @@ pub mod pallet { pub enum Error {} #[pallet::hooks] - impl Hooks for Pallet { - fn on_initialize(_n: T::BlockNumber) -> Weight { + impl Hooks> for Pallet { + fn on_initialize(_n: BlockNumberFor) -> Weight { Self::increment_active_block(); ::WeightInfo::on_initialize() } @@ -81,7 +82,7 @@ pub mod pallet { /// proof. #[pallet::storage] #[pallet::getter(fn active_block_number)] - pub type ActiveBlockCount = StorageValue<_, T::BlockNumber, ValueQuery>; + pub type ActiveBlockCount = StorageValue<_, BlockNumberFor, ValueQuery>; #[pallet::storage] pub type IsDeactivated = StorageValue<_, bool, ValueQuery>; @@ -110,11 +111,13 @@ pub mod pallet { } } } - // "Internal" functions, callable by code. #[cfg_attr(test, mockable)] impl Pallet { - pub fn parachain_block_expired(opentime: T::BlockNumber, period: T::BlockNumber) -> Result { + pub fn parachain_block_expired( + opentime: BlockNumberFor, + period: BlockNumberFor, + ) -> Result { let expiration_block = opentime.checked_add(&period).ok_or(ArithmeticError::Overflow)?; Ok(Self::active_block_number() > expiration_block) } @@ -159,7 +162,7 @@ impl Pallet { } /// for testing purposes only! - pub fn set_active_block_number(n: T::BlockNumber) { + pub fn set_active_block_number(n: BlockNumberFor) { ActiveBlockCount::::set(n); } } diff --git a/crates/security/src/mock.rs b/crates/security/src/mock.rs index a864b9ba31..dbb9250f19 100644 --- a/crates/security/src/mock.rs +++ b/crates/security/src/mock.rs @@ -5,28 +5,23 @@ use frame_support::{parameter_types, traits::ConstU32}; use mocktopus::mocking::clear_mocks; use sp_core::H256; use sp_runtime::{ - testing::Header, traits::{BlakeTwo256, IdentityLookup}, + BuildStorage, }; -type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; type Block = frame_system::mocking::MockBlock; // Configure a mock runtime to test the pallet. frame_support::construct_runtime!( - pub enum Test where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, + pub enum Test { - System: frame_system::{Pallet, Call, Storage, Config, Event}, + System: frame_system::{Pallet, Call, Storage, Config, Event}, Security: security::{Pallet, Call, Storage, Event}, } ); pub type AccountId = u64; -pub type BlockNumber = u64; -pub type Index = u64; +pub type Nonce = u64; parameter_types! { pub const BlockHashCount: u64 = 250; @@ -39,13 +34,12 @@ impl frame_system::Config for Test { type DbWeight = (); type RuntimeOrigin = RuntimeOrigin; type RuntimeCall = RuntimeCall; - type Index = Index; - type BlockNumber = BlockNumber; + type Nonce = Nonce; + type Block = Block; type Hash = H256; type Hashing = BlakeTwo256; type AccountId = AccountId; type Lookup = IdentityLookup; - type Header = Header; type RuntimeEvent = RuntimeEvent; type BlockHashCount = BlockHashCount; type Version = (); @@ -68,7 +62,7 @@ pub struct ExtBuilder; impl ExtBuilder { pub fn build() -> sp_io::TestExternalities { - let storage = frame_system::GenesisConfig::default().build_storage::().unwrap(); + let storage = frame_system::GenesisConfig::::default().build_storage().unwrap(); storage.into() } diff --git a/crates/staking/Cargo.toml b/crates/staking/Cargo.toml index bb5584d8b2..8bd37e2ad5 100644 --- a/crates/staking/Cargo.toml +++ b/crates/staking/Cargo.toml @@ -6,7 +6,7 @@ name = "staking" version = "1.2.0" [dependencies] -serde = { version = "1.0.130", default-features = false, features = ["derive"], optional = true } +serde = { version = "1.0.130", default-features = false, features = ["derive"] } codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false, features = ["derive", "max-encoded-len"] } scale-info = { version = "2.2.0", default-features = false, features = ["derive"] } @@ -38,8 +38,10 @@ pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = " [features] default = ["std"] std = [ - "serde", + "serde/std", "codec/std", + "orml-tokens/std", + "orml-traits/std", "primitives/std", "reward/std", diff --git a/crates/staking/src/lib.rs b/crates/staking/src/lib.rs index 9183b6880b..61a758313e 100644 --- a/crates/staking/src/lib.rs +++ b/crates/staking/src/lib.rs @@ -133,7 +133,7 @@ pub mod pallet { amount: T::SignedFixedPoint, }, WithdrawReward { - nonce: T::Index, + nonce: T::Nonce, currency_id: T::CurrencyId, vault_id: DefaultVaultId, nominator_id: T::AccountId, @@ -144,7 +144,7 @@ pub mod pallet { }, IncreaseNonce { vault_id: DefaultVaultId, - new_nonce: T::Index, + new_nonce: T::Nonce, }, } @@ -158,8 +158,9 @@ pub mod pallet { SlashZeroTotalStake, } + use frame_system::pallet_prelude::BlockNumberFor; #[pallet::hooks] - impl Hooks for Pallet {} + impl Hooks> for Pallet {} /// The total stake - this will increase on deposit and decrease on withdrawal. #[pallet::storage] @@ -167,7 +168,7 @@ pub mod pallet { pub type TotalStake = StorageDoubleMap< _, Blake2_128Concat, - T::Index, + T::Nonce, Blake2_128Concat, DefaultVaultId, SignedFixedPoint, @@ -180,7 +181,7 @@ pub mod pallet { pub type TotalCurrentStake = StorageDoubleMap< _, Blake2_128Concat, - T::Index, + T::Nonce, Blake2_128Concat, DefaultVaultId, SignedFixedPoint, @@ -197,7 +198,7 @@ pub mod pallet { Blake2_128Concat, T::CurrencyId, Blake2_128Concat, - (T::Index, DefaultVaultId), + (T::Nonce, DefaultVaultId), SignedFixedPoint, ValueQuery, >; @@ -210,7 +211,7 @@ pub mod pallet { Blake2_128Concat, T::CurrencyId, Blake2_128Concat, - (T::Index, DefaultVaultId), + (T::Nonce, DefaultVaultId), SignedFixedPoint, ValueQuery, >; @@ -220,7 +221,7 @@ pub mod pallet { pub type SlashPerToken = StorageDoubleMap< _, Blake2_128Concat, - T::Index, + T::Nonce, Blake2_128Concat, DefaultVaultId, SignedFixedPoint, @@ -232,7 +233,7 @@ pub mod pallet { pub type Stake = StorageDoubleMap< _, Blake2_128Concat, - T::Index, + T::Nonce, Blake2_128Concat, (DefaultVaultId, T::AccountId), SignedFixedPoint, @@ -246,7 +247,7 @@ pub mod pallet { Blake2_128Concat, T::CurrencyId, Blake2_128Concat, - (T::Index, DefaultVaultId, T::AccountId), + (T::Nonce, DefaultVaultId, T::AccountId), SignedFixedPoint, ValueQuery, >; @@ -256,7 +257,7 @@ pub mod pallet { pub type SlashTally = StorageDoubleMap< _, Blake2_128Concat, - T::Index, + T::Nonce, Blake2_128Concat, (DefaultVaultId, T::AccountId), SignedFixedPoint, @@ -266,7 +267,7 @@ pub mod pallet { /// The nonce of the current staking pool, used in force refunds. /// This is a strictly increasing value. #[pallet::storage] - pub type Nonce = StorageMap<_, Blake2_128Concat, DefaultVaultId, T::Index, ValueQuery>; + pub type Nonce = StorageMap<_, Blake2_128Concat, DefaultVaultId, T::Nonce, ValueQuery>; #[pallet::pallet] pub struct Pallet(_); @@ -315,7 +316,7 @@ impl Pallet { } fn stake_at_index( - nonce: T::Index, + nonce: T::Nonce, vault_id: &DefaultVaultId, nominator_id: &T::AccountId, ) -> SignedFixedPoint { @@ -332,7 +333,7 @@ impl Pallet { } fn reward_tally( - nonce: T::Index, + nonce: T::Nonce, currency_id: T::CurrencyId, vault_id: &DefaultVaultId, nominator_id: &T::AccountId, @@ -347,7 +348,7 @@ impl Pallet { } fn slash_tally_at_index( - nonce: T::Index, + nonce: T::Nonce, vault_id: &DefaultVaultId, nominator_id: &T::AccountId, ) -> SignedFixedPoint { @@ -355,7 +356,7 @@ impl Pallet { } /// Get the newest nonce for the staking pool. - pub fn nonce(vault_id: &DefaultVaultId) -> T::Index { + pub fn nonce(vault_id: &DefaultVaultId) -> T::Nonce { >::get(vault_id) } @@ -365,7 +366,7 @@ impl Pallet { Self::slash_per_token_at_index(nonce, vault_id) } - fn slash_per_token_at_index(nonce: T::Index, vault_id: &DefaultVaultId) -> SignedFixedPoint { + fn slash_per_token_at_index(nonce: T::Nonce, vault_id: &DefaultVaultId) -> SignedFixedPoint { >::get(nonce, vault_id) } @@ -499,7 +500,7 @@ impl Pallet { /// Compute the stake in `vault_id` owned by `nominator_id`. pub fn compute_stake_at_index( - nonce: T::Index, + nonce: T::Nonce, vault_id: &DefaultVaultId, nominator_id: &T::AccountId, ) -> Result< as FixedPointNumber>::Inner, DispatchError> { @@ -509,7 +510,7 @@ impl Pallet { } pub fn compute_precise_stake_at_index( - nonce: T::Index, + nonce: T::Nonce, vault_id: &DefaultVaultId, nominator_id: &T::AccountId, ) -> Result, DispatchError> { @@ -523,7 +524,7 @@ impl Pallet { } fn increase_rewards( - nonce: T::Index, + nonce: T::Nonce, currency_id: T::CurrencyId, vault_id: &DefaultVaultId, reward: SignedFixedPoint, @@ -580,7 +581,7 @@ impl Pallet { /// Compute the expected reward for `nominator_id` who is nominating `vault_id`. fn compute_reward_at_index( - nonce: T::Index, + nonce: T::Nonce, currency_id: T::CurrencyId, vault_id: &DefaultVaultId, nominator_id: &T::AccountId, @@ -626,7 +627,7 @@ impl Pallet { vault_id: &DefaultVaultId, nominator_id: &T::AccountId, amount: SignedFixedPoint, - index: Option, + index: Option, ) -> DispatchResult { let nonce = index.unwrap_or(Self::nonce(vault_id)); let stake = Self::apply_slash(vault_id, nominator_id)?; @@ -690,7 +691,7 @@ impl Pallet { /// Withdraw all rewards earned by `vault_id` for the `nominator_id`. fn withdraw_reward_at_index( - nonce: T::Index, + nonce: T::Nonce, currency_id: T::CurrencyId, vault_id: &DefaultVaultId, nominator_id: &T::AccountId, @@ -754,7 +755,7 @@ impl Pallet { fn increment_nonce(vault_id: &DefaultVaultId) -> DispatchResult { >::mutate(vault_id, |nonce| { - *nonce = nonce.checked_add(&T::Index::one()).ok_or(ArithmeticError::Overflow)?; + *nonce = nonce.checked_add(&T::Nonce::one()).ok_or(ArithmeticError::Overflow)?; Ok::<_, DispatchError>(()) })?; Self::deposit_event(Event::::IncreaseNonce { @@ -775,7 +776,7 @@ impl Pallet { } } -impl RewardsApi<(Option, DefaultVaultId), T::AccountId, Balance> for Pallet +impl RewardsApi<(Option, DefaultVaultId), T::AccountId, Balance> for Pallet where T: Config, Balance: BalanceToFixedPoint> + Saturating + PartialOrd + Copy, @@ -783,12 +784,12 @@ where { type CurrencyId = T::CurrencyId; - fn reward_currencies_len(_: &(Option, DefaultVaultId)) -> u32 { + fn reward_currencies_len(_: &(Option, DefaultVaultId)) -> u32 { 2 } fn distribute_reward( - (_, vault_id): &(Option, DefaultVaultId), + (_, vault_id): &(Option, DefaultVaultId), currency_id: T::CurrencyId, amount: Balance, ) -> DispatchResult { @@ -805,7 +806,7 @@ where } fn compute_reward( - (nonce, vault_id): &(Option, DefaultVaultId), + (nonce, vault_id): &(Option, DefaultVaultId), nominator_id: &T::AccountId, currency_id: T::CurrencyId, ) -> Result { @@ -816,7 +817,7 @@ where } fn withdraw_reward( - (nonce, vault_id): &(Option, DefaultVaultId), + (nonce, vault_id): &(Option, DefaultVaultId), nominator_id: &T::AccountId, currency_id: T::CurrencyId, ) -> Result { @@ -827,7 +828,7 @@ where } fn deposit_stake( - (_, vault_id): &(Option, DefaultVaultId), + (_, vault_id): &(Option, DefaultVaultId), nominator_id: &T::AccountId, amount: Balance, ) -> DispatchResult { @@ -839,7 +840,7 @@ where } fn withdraw_stake( - (nonce, vault_id): &(Option, DefaultVaultId), + (nonce, vault_id): &(Option, DefaultVaultId), nominator_id: &T::AccountId, amount: Balance, ) -> DispatchResult { @@ -852,7 +853,7 @@ where } fn withdraw_all_stake( - (nonce, vault_id): &(Option, DefaultVaultId), + (nonce, vault_id): &(Option, DefaultVaultId), nominator_id: &T::AccountId, ) -> Result { let nonce = nonce.unwrap_or(Pallet::::nonce(vault_id)); @@ -866,14 +867,14 @@ where .map_err(|_| Error::::TryIntoIntError.into()) } - fn get_total_stake((_, vault_id): &(Option, DefaultVaultId)) -> Result { + fn get_total_stake((_, vault_id): &(Option, DefaultVaultId)) -> Result { Pallet::::total_current_stake(vault_id)? .try_into() .map_err(|_| Error::::TryIntoIntError.into()) } fn get_stake( - (nonce, vault_id): &(Option, DefaultVaultId), + (nonce, vault_id): &(Option, DefaultVaultId), nominator_id: &T::AccountId, ) -> Result { let nonce = nonce.unwrap_or(Pallet::::nonce(vault_id)); @@ -894,13 +895,13 @@ pub trait StakingApi { fn force_refund(pool_id: &PoolId) -> Result; } -impl StakingApi, T::Index, Balance> for Pallet +impl StakingApi, T::Nonce, Balance> for Pallet where T: Config, Balance: BalanceToFixedPoint>, ::Inner: TryInto, { - fn nonce(vault_id: &DefaultVaultId) -> T::Index { + fn nonce(vault_id: &DefaultVaultId) -> T::Nonce { Pallet::::nonce(vault_id) } @@ -928,7 +929,7 @@ pub mod migration { /// The code as implemented befor the fix fn legacy_withdraw_reward_at_index( - nonce: T::Index, + nonce: T::Nonce, currency_id: T::CurrencyId, vault_id: &DefaultVaultId, nominator_id: &T::AccountId, diff --git a/crates/staking/src/mock.rs b/crates/staking/src/mock.rs index 9e12aeb8ed..fa9f6beb31 100644 --- a/crates/staking/src/mock.rs +++ b/crates/staking/src/mock.rs @@ -10,31 +10,26 @@ use primitives::{VaultCurrencyPair, VaultId}; use sp_arithmetic::FixedI128; use sp_core::H256; use sp_runtime::{ - testing::Header, traits::{BlakeTwo256, IdentityLookup}, + BuildStorage, }; -type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; type Block = frame_system::mocking::MockBlock; // Configure a mock runtime to test the pallet. frame_support::construct_runtime!( - pub enum Test where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, + pub enum Test { - System: frame_system::{Pallet, Call, Storage, Config, Event}, + System: frame_system::{Pallet, Call, Storage, Config, Event}, Staking: staking::{Pallet, Call, Storage, Event}, Tokens: orml_tokens::{Pallet, Call, Storage, Event}, } ); pub type AccountId = u64; -pub type BlockNumber = u64; -pub type Index = u64; pub type SignedFixedPoint = FixedI128; pub type SignedInner = i128; +pub type Nonce = u64; parameter_types! { pub const BlockHashCount: u64 = 250; @@ -48,13 +43,12 @@ impl frame_system::Config for Test { type DbWeight = (); type RuntimeOrigin = RuntimeOrigin; type RuntimeCall = RuntimeCall; - type Index = Index; - type BlockNumber = BlockNumber; + type Nonce = Nonce; + type Block = Block; type Hash = H256; type Hashing = BlakeTwo256; type AccountId = AccountId; type Lookup = IdentityLookup; - type Header = Header; type RuntimeEvent = RuntimeEvent; type BlockHashCount = BlockHashCount; type Version = (); @@ -132,7 +126,7 @@ pub struct ExtBuilder; impl ExtBuilder { pub fn build() -> sp_io::TestExternalities { - let storage = frame_system::GenesisConfig::default().build_storage::().unwrap(); + let storage = frame_system::GenesisConfig::::default().build_storage().unwrap(); storage.into() } diff --git a/crates/supply/Cargo.toml b/crates/supply/Cargo.toml index dd39af06c3..8e40ef8895 100644 --- a/crates/supply/Cargo.toml +++ b/crates/supply/Cargo.toml @@ -6,12 +6,12 @@ name = "supply" version = "1.2.0" [dependencies] -serde = { version = "1.0.130", default-features = false, features = ["derive"], optional = true } +serde = { version = "1.0.130", default-features = false, features = ["derive"] } codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false, features = ["derive", "max-encoded-len"] } scale-info = { version = "2.2.0", default-features = false, features = ["derive"] } # Parachain dependencies -primitives = { package = "interbtc-primitives", path = "../../primitives", default-features = false } +primitives = { package = "interbtc-primitives", path = "../../primitives", default-features = false, features = ["substrate-compat"] } # Substrate dependencies sp-arithmetic = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31", default-features = false } @@ -33,7 +33,7 @@ pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "p [features] default = ["std"] std = [ - "serde", + "serde/std", "codec/std", "primitives/std", diff --git a/crates/supply/src/lib.rs b/crates/supply/src/lib.rs index 68ab198559..60d9a64f8d 100644 --- a/crates/supply/src/lib.rs +++ b/crates/supply/src/lib.rs @@ -22,7 +22,7 @@ use frame_support::{ weights::Weight, PalletId, }; -use frame_system::ensure_root; +use frame_system::{ensure_root, pallet_prelude::BlockNumberFor}; use primitives::TruncateFixedPointToInt; use scale_info::TypeInfo; use sp_arithmetic::ArithmeticError; @@ -67,7 +67,7 @@ pub mod pallet { /// The period between inflation updates. #[pallet::constant] - type InflationPeriod: Get; + type InflationPeriod: Get>; /// Handler for when the total supply has inflated. type OnInflation: OnInflation; @@ -87,8 +87,8 @@ pub mod pallet { pub enum Error {} #[pallet::hooks] - impl Hooks for Pallet { - fn on_initialize(n: T::BlockNumber) -> Weight { + impl Hooks> for Pallet { + fn on_initialize(n: BlockNumberFor) -> Weight { if let Err(e) = Self::begin_block(n) { sp_runtime::print(e); } @@ -99,7 +99,7 @@ pub mod pallet { #[pallet::storage] #[pallet::whitelist_storage] #[pallet::getter(fn start_height)] - pub type StartHeight = StorageValue<_, T::BlockNumber, OptionQuery>; + pub type StartHeight = StorageValue<_, BlockNumberFor, OptionQuery>; #[pallet::storage] #[pallet::getter(fn last_emission)] @@ -110,25 +110,15 @@ pub mod pallet { pub type Inflation = StorageValue<_, T::UnsignedFixedPoint, ValueQuery>; #[pallet::genesis_config] + #[derive(frame_support::DefaultNoBound)] pub struct GenesisConfig { pub initial_supply: BalanceOf, - pub start_height: T::BlockNumber, + pub start_height: BlockNumberFor, pub inflation: T::UnsignedFixedPoint, } - #[cfg(feature = "std")] - impl Default for GenesisConfig { - fn default() -> Self { - Self { - initial_supply: Default::default(), - start_height: Default::default(), - inflation: Default::default(), - } - } - } - #[pallet::genesis_build] - impl GenesisBuild for GenesisConfig { + impl BuildGenesisConfig for GenesisConfig { fn build(&self) { T::Currency::deposit_creating(&T::SupplyPalletId::get().into_account_truncating(), self.initial_supply); StartHeight::::put(self.start_height); @@ -147,7 +137,7 @@ pub mod pallet { #[transactional] pub fn set_start_height_and_inflation( origin: OriginFor, - start_height: T::BlockNumber, + start_height: BlockNumberFor, inflation: T::UnsignedFixedPoint, ) -> DispatchResultWithPostInfo { ensure_root(origin)?; @@ -164,7 +154,7 @@ impl Pallet { T::SupplyPalletId::get().into_account_truncating() } - pub(crate) fn begin_block(height: T::BlockNumber) -> DispatchResult { + pub(crate) fn begin_block(height: BlockNumberFor) -> DispatchResult { // ignore if uninitialized or not start height if let Some(start_height) = >::get().filter(|&start_height| height == start_height) { let end_height = start_height + T::InflationPeriod::get(); diff --git a/crates/supply/src/mock.rs b/crates/supply/src/mock.rs index f280f90007..c9cfcdd11c 100644 --- a/crates/supply/src/mock.rs +++ b/crates/supply/src/mock.rs @@ -1,28 +1,20 @@ use crate::{self as supply, Config, OnInflation}; -use frame_support::{ - parameter_types, - traits::{Everything, GenesisBuild}, - PalletId, -}; +use frame_support::{parameter_types, traits::Everything, PalletId}; pub use primitives::{CurrencyId, UnsignedFixedPoint}; use sp_core::H256; pub use sp_runtime::FixedPointNumber; use sp_runtime::{ - testing::Header, traits::{BlakeTwo256, IdentityLookup}, + BuildStorage, }; -type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; type Block = frame_system::mocking::MockBlock; // Configure a mock runtime to test the pallet. frame_support::construct_runtime!( - pub enum Test where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, + pub enum Test { - System: frame_system::{Pallet, Call, Storage, Config, Event}, + System: frame_system::{Pallet, Call, Storage, Config, Event}, Balances: pallet_balances::{Pallet, Call, Storage, Event}, Supply: supply::{Pallet, Call, Storage, Config, Event}, } @@ -31,7 +23,7 @@ frame_support::construct_runtime!( pub type AccountId = u64; pub type Balance = u128; pub type BlockNumber = u64; -pub type Index = u64; +pub type Nonce = u64; parameter_types! { pub const BlockHashCount: u64 = 250; @@ -45,13 +37,12 @@ impl frame_system::Config for Test { type DbWeight = (); type RuntimeOrigin = RuntimeOrigin; type RuntimeCall = RuntimeCall; - type Index = Index; - type BlockNumber = BlockNumber; + type Nonce = Nonce; + type Block = Block; type Hash = H256; type Hashing = BlakeTwo256; type AccountId = AccountId; type Lookup = IdentityLookup; - type Header = Header; type RuntimeEvent = RuntimeEvent; type BlockHashCount = BlockHashCount; type Version = (); @@ -79,7 +70,7 @@ impl pallet_balances::Config for Test { type MaxLocks = (); type MaxReserves = (); type ReserveIdentifier = [u8; 8]; - type HoldIdentifier = (); + type RuntimeHoldReason = (); type FreezeIdentifier = (); type MaxFreezes = (); type MaxHolds = (); @@ -118,7 +109,7 @@ pub struct ExtBuilder; impl ExtBuilder { pub fn build() -> sp_io::TestExternalities { - let mut storage = frame_system::GenesisConfig::default().build_storage::().unwrap(); + let mut storage = frame_system::GenesisConfig::::default().build_storage().unwrap(); supply::GenesisConfig:: { initial_supply: 10_000_000, diff --git a/crates/traits/Cargo.toml b/crates/traits/Cargo.toml index 134bacfca4..375f192448 100644 --- a/crates/traits/Cargo.toml +++ b/crates/traits/Cargo.toml @@ -10,7 +10,7 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] serde = { version = "1.0.136", default-features = false, features = [ "derive", -], optional = true } +] } codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false } scale-info = { version = "2.2.0", default-features = false, features = [ "derive", diff --git a/crates/tx-pause/src/lib.rs b/crates/tx-pause/src/lib.rs index 3d892fb89a..037daef470 100644 --- a/crates/tx-pause/src/lib.rs +++ b/crates/tx-pause/src/lib.rs @@ -190,26 +190,15 @@ pub mod pallet { /// Configure the initial state of this pallet in the genesis block. #[pallet::genesis_config] + #[derive(frame_support::DefaultNoBound)] pub struct GenesisConfig { /// The initially paused calls. pub paused: Vec>, pub _phantom: PhantomData, } - #[cfg(feature = "std")] - impl Default for GenesisConfig { - // NOTE: `derive(Default)` does not work together with `#[pallet::genesis_config]`. - // We therefore need to add a trivial default impl. - fn default() -> Self { - Self { - paused: Default::default(), - _phantom: PhantomData, - } - } - } - #[pallet::genesis_build] - impl GenesisBuild for GenesisConfig { + impl BuildGenesisConfig for GenesisConfig { fn build(&self) { for (pallet_name, maybe_call_name) in &self.paused { PausedCalls::::insert((pallet_name, maybe_call_name), ()); diff --git a/crates/tx-pause/src/mock.rs b/crates/tx-pause/src/mock.rs index 1a51eb0fca..db6f237ae6 100644 --- a/crates/tx-pause/src/mock.rs +++ b/crates/tx-pause/src/mock.rs @@ -27,8 +27,8 @@ use frame_support::{ use frame_system::{EnsureRoot, EnsureSignedBy}; use sp_core::H256; use sp_runtime::{ - testing::Header, traits::{BlakeTwo256, IdentityLookup}, + BuildStorage, }; parameter_types! { @@ -40,13 +40,12 @@ impl frame_system::Config for Test { type BlockLength = (); type RuntimeOrigin = RuntimeOrigin; type RuntimeCall = RuntimeCall; - type Index = u64; - type BlockNumber = u64; + type Nonce = u64; + type Block = Block; type Hash = H256; type Hashing = BlakeTwo256; type AccountId = u64; type Lookup = IdentityLookup; - type Header = Header; type RuntimeEvent = RuntimeEvent; type BlockHashCount = BlockHashCount; type DbWeight = (); @@ -75,7 +74,7 @@ impl pallet_balances::Config for Test { type MaxLocks = MaxLocks; type MaxReserves = (); type ReserveIdentifier = [u8; 8]; - type HoldIdentifier = (); + type RuntimeHoldReason = (); type FreezeIdentifier = (); type MaxFreezes = (); type MaxHolds = (); @@ -194,14 +193,10 @@ impl Config for Test { type WeightInfo = (); } -type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; type Block = frame_system::mocking::MockBlock; frame_support::construct_runtime!( - pub enum Test where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, + pub enum Test { System: frame_system, Balances: pallet_balances, @@ -210,9 +205,8 @@ frame_support::construct_runtime!( TxPause: pallet_tx_pause, } ); - pub fn new_test_ext() -> sp_io::TestExternalities { - let mut t = frame_system::GenesisConfig::default().build_storage::().unwrap(); + let mut t = frame_system::GenesisConfig::::default().build_storage().unwrap(); pallet_balances::GenesisConfig:: { // The 0 account is NOT a special origin. The rest may be: @@ -221,13 +215,11 @@ pub fn new_test_ext() -> sp_io::TestExternalities { .assimilate_storage(&mut t) .unwrap(); - GenesisBuild::::assimilate_storage( - &pallet_tx_pause::GenesisConfig { - paused: vec![], - _phantom: Default::default(), - }, - &mut t, - ) + pallet_tx_pause::GenesisConfig:: { + paused: vec![], + _phantom: Default::default(), + } + .assimilate_storage(&mut t) .unwrap(); let mut ext = sp_io::TestExternalities::new(t); diff --git a/crates/vault-registry/Cargo.toml b/crates/vault-registry/Cargo.toml index ce4757dd24..c40a558ccf 100644 --- a/crates/vault-registry/Cargo.toml +++ b/crates/vault-registry/Cargo.toml @@ -5,7 +5,7 @@ authors = ["Interlay Ltd"] edition = "2021" [dependencies] -serde = { version = "1.0.130", default-features = false, features = ["derive"], optional = true } +serde = { version = "1.0.130", default-features = false, features = ["derive"] } codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false, features = ["derive", "max-encoded-len"] } scale-info = { version = "2.2.0", default-features = false, features = ["derive"] } @@ -52,7 +52,7 @@ visibility = { version = "0.0.1" } [features] default = ["std"] std = [ - "serde", + "serde/std", "codec/std", "sp-runtime/std", diff --git a/crates/vault-registry/src/ext.rs b/crates/vault-registry/src/ext.rs index 299c0acdc7..72a3571cf4 100644 --- a/crates/vault-registry/src/ext.rs +++ b/crates/vault-registry/src/ext.rs @@ -17,7 +17,9 @@ pub(crate) mod currency { #[cfg_attr(test, mockable)] pub(crate) mod security { - pub fn active_block_number() -> T::BlockNumber { + use frame_system::pallet_prelude::BlockNumberFor; + + pub fn active_block_number() -> BlockNumberFor { >::active_block_number() } } @@ -41,7 +43,7 @@ pub(crate) mod staking { vault_id: &DefaultVaultId, nominator_id: &T::AccountId, maybe_amount: Option>, - nonce: Option<::Index>, + nonce: Option<::Nonce>, ) -> Result, DispatchError> { if let Some(amount) = maybe_amount { T::VaultStaking::withdraw_stake(&(nonce, vault_id.clone()), nominator_id, amount.amount())?; diff --git a/crates/vault-registry/src/lib.rs b/crates/vault-registry/src/lib.rs index c6321504d0..e6359400da 100644 --- a/crates/vault-registry/src/lib.rs +++ b/crates/vault-registry/src/lib.rs @@ -105,7 +105,7 @@ pub mod pallet { #[pallet::hooks] impl Hooks> for Pallet { - fn offchain_worker(n: T::BlockNumber) { + fn offchain_worker(n: BlockNumberFor) { log::info!("Off-chain worker started on block {:?}", n); Self::_offchain_worker(); } @@ -486,7 +486,7 @@ pub mod pallet { }, BanVault { vault_id: DefaultVaultId, - banned_until: T::BlockNumber, + banned_until: BlockNumberFor, }, SetAcceptNewIssues { vault_id: DefaultVaultId, @@ -579,7 +579,7 @@ pub mod pallet { /// of this ban (in number of blocks) . #[pallet::storage] #[pallet::getter(fn punishment_delay)] - pub(super) type PunishmentDelay = StorageValue<_, T::BlockNumber, ValueQuery>; + pub(super) type PunishmentDelay = StorageValue<_, BlockNumberFor, ValueQuery>; /// Determines the over-collateralization rate for collateral locked by Vaults, necessary for /// wrapped tokens. This threshold should be greater than the LiquidationCollateralThreshold. @@ -643,31 +643,18 @@ pub mod pallet { pub(super) type StorageVersion = StorageValue<_, Version, ValueQuery, DefaultForStorageVersion>; #[pallet::genesis_config] + #[derive(frame_support::DefaultNoBound)] pub struct GenesisConfig { pub minimum_collateral_vault: Vec<(CurrencyId, BalanceOf)>, - pub punishment_delay: T::BlockNumber, + pub punishment_delay: BlockNumberFor, pub system_collateral_ceiling: Vec<(DefaultVaultCurrencyPair, BalanceOf)>, pub secure_collateral_threshold: Vec<(DefaultVaultCurrencyPair, UnsignedFixedPoint)>, pub premium_redeem_threshold: Vec<(DefaultVaultCurrencyPair, UnsignedFixedPoint)>, pub liquidation_collateral_threshold: Vec<(DefaultVaultCurrencyPair, UnsignedFixedPoint)>, } - #[cfg(feature = "std")] - impl Default for GenesisConfig { - fn default() -> Self { - Self { - minimum_collateral_vault: Default::default(), - punishment_delay: Default::default(), - system_collateral_ceiling: Default::default(), - secure_collateral_threshold: Default::default(), - premium_redeem_threshold: Default::default(), - liquidation_collateral_threshold: Default::default(), - } - } - } - #[pallet::genesis_build] - impl GenesisBuild for GenesisConfig { + impl BuildGenesisConfig for GenesisConfig { fn build(&self) { PunishmentDelay::::put(self.punishment_delay); for (currency_id, minimum) in self.minimum_collateral_vault.iter() { diff --git a/crates/vault-registry/src/mock.rs b/crates/vault-registry/src/mock.rs index dbe11826e1..885ee3e8f8 100644 --- a/crates/vault-registry/src/mock.rs +++ b/crates/vault-registry/src/mock.rs @@ -3,7 +3,7 @@ use crate::{Config, Error}; use currency::CurrencyConversion; use frame_support::{ parameter_types, - traits::{ConstU32, Everything, GenesisBuild}, + traits::{ConstU32, Everything}, PalletId, }; use frame_system::EnsureRoot; @@ -14,23 +14,19 @@ use primitives::{Rate, VaultCurrencyPair, VaultId}; use sp_arithmetic::{FixedI128, FixedPointNumber, FixedU128}; use sp_core::H256; use sp_runtime::{ - testing::{Header, TestXt}, + testing::TestXt, traits::{BlakeTwo256, IdentityLookup, One, Zero}, - DispatchError, + BuildStorage, DispatchError, }; pub(crate) type Extrinsic = TestXt; -type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; type Block = frame_system::mocking::MockBlock; // Configure a mock runtime to test the pallet. frame_support::construct_runtime!( - pub enum Test where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, + pub enum Test { - System: frame_system::{Pallet, Call, Storage, Config, Event}, + System: frame_system::{Pallet, Call, Storage, Config, Event}, Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent}, // Tokens & Balances @@ -46,7 +42,7 @@ frame_support::construct_runtime!( Oracle: oracle::{Pallet, Call, Config, Storage, Event}, Fee: fee::{Pallet, Call, Config, Storage}, Currency: currency::{Pallet}, - Loans: loans::{Pallet, Storage, Call, Event, Config}, + Loans: loans::{Pallet, Call, Storage, Event, Config}, } ); @@ -55,7 +51,7 @@ pub type Balance = u128; pub type RawAmount = i128; pub type BlockNumber = u64; pub type Moment = u64; -pub type Index = u64; +pub type Nonce = u64; pub type SignedFixedPoint = FixedI128; pub type SignedInner = i128; pub type UnsignedFixedPoint = FixedU128; @@ -72,13 +68,12 @@ impl frame_system::Config for Test { type DbWeight = (); type RuntimeOrigin = RuntimeOrigin; type RuntimeCall = RuntimeCall; - type Index = Index; - type BlockNumber = BlockNumber; + type Nonce = Nonce; + type Block = Block; type Hash = H256; type Hashing = BlakeTwo256; type AccountId = AccountId; type Lookup = IdentityLookup; - type Header = Header; type RuntimeEvent = RuntimeEvent; type BlockHashCount = BlockHashCount; type Version = (); @@ -269,7 +264,7 @@ impl traits::NominationApi, currency::Amount) -> Result<(), DispatchError> { + fn ensure_opted_in_to_nomination(_vault_id: &VaultId) -> Result<(), DispatchError> { Ok(()) } #[cfg(any(feature = "runtime-benchmarks", test))] @@ -330,19 +325,10 @@ pub const MULTI_VAULT_TEST_COLLATERAL: u128 = 100000; impl ExtBuilder { pub fn build_with(conf: orml_tokens::GenesisConfig) -> sp_io::TestExternalities { - let mut storage = frame_system::GenesisConfig::default().build_storage::().unwrap(); + let mut storage = frame_system::GenesisConfig::::default().build_storage().unwrap(); conf.assimilate_storage(&mut storage).unwrap(); - GenesisBuild::::assimilate_storage( - &loans::GenesisConfig { - max_exchange_rate: Rate::from_inner(DEFAULT_MAX_EXCHANGE_RATE), - min_exchange_rate: Rate::from_inner(DEFAULT_MIN_EXCHANGE_RATE), - }, - &mut storage, - ) - .unwrap(); - // Parameters to be set in tests vault_registry::GenesisConfig:: { minimum_collateral_vault: vec![(DEFAULT_COLLATERAL_CURRENCY, 0), (WORST_CASE_COLLATERAL_CURRENCY, 0)], @@ -367,6 +353,14 @@ impl ExtBuilder { .assimilate_storage(&mut storage) .unwrap(); + loans::GenesisConfig:: { + max_exchange_rate: Rate::from_inner(DEFAULT_MAX_EXCHANGE_RATE), + min_exchange_rate: Rate::from_inner(DEFAULT_MIN_EXCHANGE_RATE), + _marker: Default::default(), + } + .assimilate_storage(&mut storage) + .unwrap(); + sp_io::TestExternalities::from(storage) } pub fn build() -> sp_io::TestExternalities { diff --git a/crates/vault-registry/src/pool_manager.rs b/crates/vault-registry/src/pool_manager.rs index 09bb0597bd..3cce4e1c41 100644 --- a/crates/vault-registry/src/pool_manager.rs +++ b/crates/vault-registry/src/pool_manager.rs @@ -20,7 +20,7 @@ impl PoolManager { vault_id: &DefaultVaultId, nominator_id: &T::AccountId, maybe_amount: Option>, - nonce: Option<::Index>, + nonce: Option<::Nonce>, ) -> Result, DispatchError> { ext::fee::distribute_all_vault_rewards::(vault_id)?; let amount = ext::staking::withdraw_stake(vault_id, nominator_id, maybe_amount, nonce)?; diff --git a/crates/vault-registry/src/types.rs b/crates/vault-registry/src/types.rs index 7570ac6c6f..d96a7760f3 100644 --- a/crates/vault-registry/src/types.rs +++ b/crates/vault-registry/src/types.rs @@ -6,6 +6,7 @@ use frame_support::{ ensure, traits::Get, }; +use frame_system::pallet_prelude::BlockNumberFor; pub use primitives::{VaultCurrencyPair, VaultId}; use scale_info::TypeInfo; use sp_core::H256; @@ -170,8 +171,8 @@ pub struct Vault { // Number of tokens pending issue pub to_be_issued_tokens: Balance, @@ -223,7 +224,7 @@ impl< pub type DefaultVault = Vault< ::AccountId, - ::BlockNumber, + BlockNumberFor, BalanceOf, CurrencyId, UnsignedFixedPoint, @@ -640,7 +641,7 @@ impl RichVault { } } - pub fn ban_until(&mut self, height: T::BlockNumber) { + pub fn ban_until(&mut self, height: BlockNumberFor) { let _ = self.update(|v| { v.banned_until = Some(height); Ok(()) diff --git a/parachain/Cargo.toml b/parachain/Cargo.toml index 29e46babfc..8bdc336c87 100644 --- a/parachain/Cargo.toml +++ b/parachain/Cargo.toml @@ -19,7 +19,7 @@ async-trait = "0.1" clap = { version = "4.0.9", features = [ "derive" ] } log = "0.4.8" codec = { package = "parity-scale-codec", version = "3.1.5" } -serde = { version = "1.0.130", features = ["derive"] } +serde = { version = "1.0.130", features = ["derive"], default-features = false } hex-literal = "0.2.1" futures = "0.3.15" jsonrpsee = { version = "0.16.2", features = ["server", "macros"] } @@ -48,6 +48,8 @@ dex-general-rpc-runtime-api = { path = "../crates/dex-general/rpc/runtime-api" } dex-stable-rpc-runtime-api = { path = "../crates/dex-stable/rpc/runtime-api" } # Substrate dependencies +sc-transaction-pool-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } +sc-offchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } sc-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } sc-consensus = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } diff --git a/parachain/runtime/common/src/benchmarking/orml_vesting.rs b/parachain/runtime/common/src/benchmarking/orml_vesting.rs index 050110bdc9..af275a7b3b 100644 --- a/parachain/runtime/common/src/benchmarking/orml_vesting.rs +++ b/parachain/runtime/common/src/benchmarking/orml_vesting.rs @@ -3,7 +3,7 @@ use frame_support::{ assert_ok, traits::{Currency, Get}, }; -use frame_system::RawOrigin; +use frame_system::{pallet_prelude::BlockNumberFor, RawOrigin}; use orml_traits::MultiCurrency; use orml_vesting::VestingSchedule; use primitives::CurrencyId; @@ -22,7 +22,7 @@ pub fn lookup_of_account( pub(crate) type BalanceOf = <::Currency as Currency<::AccountId>>::Balance; -pub(crate) type VestingScheduleOf = VestingSchedule<::BlockNumber, BalanceOf>; +pub(crate) type VestingScheduleOf = VestingSchedule, BalanceOf>; fn dummy_schedule() -> VestingScheduleOf { VestingSchedule { diff --git a/parachain/runtime/common/src/evm/mod.rs b/parachain/runtime/common/src/evm/mod.rs index 92787363c5..2e15d72fa2 100644 --- a/parachain/runtime/common/src/evm/mod.rs +++ b/parachain/runtime/common/src/evm/mod.rs @@ -5,6 +5,8 @@ use frame_support::{ use pallet_ethereum::{Transaction, TransactionAction}; use sp_core::Get; use sp_runtime::Permill; +#[cfg(feature = "try-runtime")] +use sp_runtime::TryRuntimeError; use sp_std::marker::PhantomData; pub mod precompiles; @@ -60,12 +62,12 @@ where } #[cfg(feature = "try-runtime")] - fn pre_upgrade() -> Result, &'static str> { + fn pre_upgrade() -> Result, TryRuntimeError> { Ok(Default::default()) } #[cfg(feature = "try-runtime")] - fn post_upgrade(_: sp_std::vec::Vec) -> Result<(), &'static str> { + fn post_upgrade(_: sp_std::vec::Vec) -> Result<(), TryRuntimeError> { Ok(()) } } diff --git a/parachain/runtime/common/src/lib.rs b/parachain/runtime/common/src/lib.rs index a39590d6bb..5ab23e127f 100644 --- a/parachain/runtime/common/src/lib.rs +++ b/parachain/runtime/common/src/lib.rs @@ -9,6 +9,7 @@ use frame_support::{ use primitives::{BlockNumber, UnsignedFixedPoint}; use sp_runtime::{DispatchError, FixedPointNumber}; use sp_std::prelude::*; +use xcm_executor::traits::Properties; #[cfg(feature = "runtime-benchmarks")] pub mod benchmarking; @@ -41,7 +42,7 @@ pub fn estimate_escrow_reward_rate Result where T: currency::Config - + escrow::Config + + escrow::Config + annuity::Config, EscrowAnnuityInstance: 'static, EscrowRewardsApi: reward::RewardsApi<(), AccountId, Balance, CurrencyId = CurrencyId>, @@ -54,7 +55,7 @@ where escrow::Pallet::::round_height_and_deposit_for( &account_id, amount.unwrap_or_default(), - lock_time.unwrap_or_default(), + lock_time.unwrap_or_default().into(), )?; // distribute rewards accrued over block count let reward = annuity::Pallet::::min_reward_per_block().saturating_mul(YEARS.into()); @@ -96,16 +97,15 @@ where } pub struct AndBarrier(PhantomData<(T, U)>); - impl ShouldExecute for AndBarrier { fn should_execute( origin: &MultiLocation, instructions: &mut [Instruction], max_weight: Weight, - weight_credit: &mut Weight, + properties: &mut Properties, ) -> Result<(), ProcessMessageError> { - T::should_execute(origin, instructions, max_weight, weight_credit)?; - U::should_execute(origin, instructions, max_weight, weight_credit)?; + T::should_execute(origin, instructions, max_weight, properties)?; + U::should_execute(origin, instructions, max_weight, properties)?; // only if both returned ok, we return ok Ok(()) } @@ -118,7 +118,7 @@ impl ShouldExecute for Transactless { origin: &MultiLocation, instructions: &mut [Instruction], max_weight: Weight, - weight_credit: &mut Weight, + properties: &mut Properties, ) -> Result<(), ProcessMessageError> { // filter any outer-level Transacts. Any Transact calls sent to other chain should still work. let has_transact = instructions.iter().any(|x| matches!(x, Instruction::Transact { .. })); @@ -126,7 +126,7 @@ impl ShouldExecute for Transactless { return Err(ProcessMessageError::Unsupported); } // No transact - return result of the wrapped barrier - T::should_execute(origin, instructions, max_weight, weight_credit) + T::should_execute(origin, instructions, max_weight, properties) } } diff --git a/parachain/runtime/interlay/Cargo.toml b/parachain/runtime/interlay/Cargo.toml index 43d729e0d2..c3ef365255 100644 --- a/parachain/runtime/interlay/Cargo.toml +++ b/parachain/runtime/interlay/Cargo.toml @@ -8,7 +8,7 @@ version = "1.2.0" targets = ['x86_64-unknown-linux-gnu'] [dependencies] -serde = { version = "1.0.130", default-features = false, features = ["derive"], optional = true } +serde = { version = "1.0.130", default-features = false, features = ["derive"] } codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false, features = ["derive", "max-encoded-len"] } hex-literal = { version = "0.3.1" } scale-info = { version = "2.2.0", default-features = false, features = ["derive"] } @@ -133,7 +133,7 @@ orml-unknown-tokens = { git = "https://github.com/open-web3-stack/open-runtime-m # Frontier dependencies fp-rpc = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v0.9.42", default-features = false } -fp-self-contained = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v0.9.42", default-features = false } +fp-self-contained = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v0.9.42", default-features = false, features = ["serde"] } pallet-base-fee = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v0.9.42", default-features = false } pallet-ethereum = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v0.9.42", default-features = false } pallet-evm = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v0.9.42", default-features = false } @@ -155,7 +155,7 @@ default = ["std"] disable-runtime-api = [] vesting-any = [] std = [ - "serde", + "serde/std", "codec/std", "sp-std/std", @@ -294,6 +294,7 @@ runtime-benchmarks = [ "pallet-society/runtime-benchmarks", "cumulus-pallet-xcmp-queue/runtime-benchmarks", + "cumulus-pallet-parachain-system/runtime-benchmarks", "pallet-xcm/runtime-benchmarks", "pallet-xcm-benchmarks/runtime-benchmarks", diff --git a/parachain/runtime/interlay/src/dex.rs b/parachain/runtime/interlay/src/dex.rs index 0b240d8a7d..3e1b67cfe6 100644 --- a/parachain/runtime/interlay/src/dex.rs +++ b/parachain/runtime/interlay/src/dex.rs @@ -6,6 +6,8 @@ use sp_runtime::traits::Zero; #[cfg(feature = "try-runtime")] use frame_support::ensure; +#[cfg(feature = "try-runtime")] +use sp_runtime::TryRuntimeError; pub use dex_general::{AssetBalance, GenerateLpAssetId, PairInfo, ValidateAsset}; pub use dex_stable::traits::{StablePoolLpCurrencyIdGenerate, ValidateCurrency}; @@ -107,7 +109,7 @@ impl OnRuntimeUpgrade for SetLoansExchangeRates { } #[cfg(feature = "try-runtime")] - fn post_upgrade(_state: sp_std::vec::Vec) -> Result<(), &'static str> { + fn post_upgrade(_state: sp_std::vec::Vec) -> Result<(), TryRuntimeError> { let min_exchange_rate = loans::MinExchangeRate::::get(); let max_exchange_rate = loans::MaxExchangeRate::::get(); ensure!( diff --git a/parachain/runtime/interlay/src/lib.rs b/parachain/runtime/interlay/src/lib.rs index ab935702a2..04a38c600e 100644 --- a/parachain/runtime/interlay/src/lib.rs +++ b/parachain/runtime/interlay/src/lib.rs @@ -1,8 +1,8 @@ //! The interlay runtime. This can be compiled with `#[no_std]`, ready for Wasm. #![cfg_attr(not(feature = "std"), no_std)] -// `construct_runtime!` does a lot of recursion and requires us to increase the limit to 256. -#![recursion_limit = "256"] +// `construct_runtime!` does a lot of recursion and requires us to increase the limit to 512. +#![recursion_limit = "512"] // Make the WASM binary available. #[cfg(feature = "std")] @@ -15,7 +15,7 @@ use currency::Amount; use frame_support::{ dispatch::{DispatchError, DispatchResult}, traits::{ - ConstU32, Contains, Currency as PalletCurrency, EitherOfDiverse, EnsureOrigin, EnsureOriginWithArg, + ConstBool, ConstU32, Contains, Currency as PalletCurrency, EitherOfDiverse, EnsureOrigin, EnsureOriginWithArg, EqualPrivilegeOnly, ExistenceRequirement, Imbalance, InstanceFilter, OnUnbalanced, }, weights::ConstantMultiplier, @@ -217,6 +217,7 @@ impl Contains for BaseCallFilter { } impl frame_system::Config for Runtime { + type Block = Block; /// The identifier used to distinguish between accounts. type AccountId = AccountId; /// The aggregated dispatch type that is available for extrinsics. @@ -224,15 +225,11 @@ impl frame_system::Config for Runtime { /// The lookup mechanism to get account ID from whatever is passed in dispatchers. type Lookup = IdentityLookup; /// The index type for storing how many extrinsics an account has signed. - type Index = Nonce; - /// The index type for blocks. - type BlockNumber = BlockNumber; + type Nonce = Nonce; /// The type for hashing blocks and tries. type Hash = Hash; /// The hashing algorithm used. type Hashing = BlakeTwo256; - /// The header type. - type Header = Header; /// The ubiquitous event type. type RuntimeEvent = RuntimeEvent; /// The ubiquitous origin type. @@ -322,6 +319,7 @@ impl pallet_aura::Config for Runtime { type AuthorityId = AuraId; type DisabledValidators = (); type MaxAuthorities = MaxAuthorities; + type AllowMultipleBlocksPerSlot = ConstBool; } parameter_types! { @@ -394,6 +392,7 @@ impl pallet_transaction_payment::Config for Runtime { impl pallet_sudo::Config for Runtime { type RuntimeCall = RuntimeCall; type RuntimeEvent = RuntimeEvent; + type WeightInfo = (); } impl pallet_utility::Config for Runtime { @@ -728,12 +727,12 @@ impl EnsureOriginWithArg> for AssetAuthority { type Success = (); fn try_origin(origin: RuntimeOrigin, _asset_id: &Option) -> Result { - EnsureRoot::try_origin(origin) + as EnsureOrigin>::try_origin(origin) } #[cfg(feature = "runtime-benchmarks")] fn try_successful_origin(_: &Option) -> Result { - EnsureRoot::try_successful_origin() + as EnsureOrigin>::try_successful_origin() } } @@ -1205,12 +1204,9 @@ impl loans::Config for Runtime { } construct_runtime! { - pub enum Runtime where - Block = Block, - NodeBlock = primitives::Block, - UncheckedExtrinsic = UncheckedExtrinsic + pub enum Runtime { - System: frame_system::{Pallet, Call, Storage, Config, Event} = 0, + System: frame_system::{Pallet, Call, Config, Storage, Event} = 0, Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent} = 1, Sudo: pallet_sudo::{Pallet, Call, Storage, Config, Event} = 2, Utility: pallet_utility::{Pallet, Call, Event} = 3, @@ -1255,7 +1251,7 @@ construct_runtime! { Replace: replace::{Pallet, Call, Config, Storage, Event} = 65, Fee: fee::{Pallet, Call, Config, Storage} = 66, // Refund: 67 - Nomination: nomination::{Pallet, Call, Config, Storage, Event} = 68, + Nomination: nomination::{Pallet, Call, Storage, Config, Event} = 68, ClientsInfo: clients_info::{Pallet, Call, Storage, Event} = 69, // # Governance @@ -1268,13 +1264,13 @@ construct_runtime! { CollatorSelection: collator_selection::{Pallet, Call, Storage, Event, Config} = 81, Session: pallet_session::{Pallet, Call, Storage, Event, Config} = 82, Aura: pallet_aura::{Pallet, Storage, Config} = 83, - AuraExt: cumulus_pallet_aura_ext::{Pallet, Storage, Config} = 84, - ParachainSystem: cumulus_pallet_parachain_system::{Pallet, Call, Config, Storage, Inherent, Event} = 85, - ParachainInfo: parachain_info::{Pallet, Storage, Config} = 86, + AuraExt: cumulus_pallet_aura_ext::{Pallet, Storage, Config} = 84, + ParachainSystem: cumulus_pallet_parachain_system::{Pallet, Call, Config, Storage, Inherent, Event} = 85, + ParachainInfo: parachain_info::{Pallet, Storage, Config} = 86, // # XCM Helpers XcmpQueue: cumulus_pallet_xcmp_queue::{Pallet, Call, Storage, Event} = 90, - PolkadotXcm: pallet_xcm::{Pallet, Call, Storage, Event, Origin, Config} = 91, + PolkadotXcm: pallet_xcm::{Pallet, Call, Storage, Event, Origin, Config} = 91, CumulusXcm: cumulus_pallet_xcm::{Pallet, Call, Event, Origin} = 92, DmpQueue: cumulus_pallet_dmp_queue::{Pallet, Call, Storage, Event} = 93, @@ -1282,16 +1278,16 @@ construct_runtime! { UnknownTokens: orml_unknown_tokens::{Pallet, Storage, Event} = 95, // # Lending & AMM - Loans: loans::{Pallet, Call, Storage, Event, Config} = 100, + Loans: loans::{Pallet, Call, Storage, Event, Config} = 100, DexGeneral: dex_general::{Pallet, Call, Storage, Event} = 101, DexStable: dex_stable::{Pallet, Call, Storage, Event} = 102, DexSwapRouter: dex_swap_router::{Pallet, Call, Event} = 103, // # Smart contracts - BaseFee: pallet_base_fee::{Pallet, Call, Storage, Event, Config} = 111, - Ethereum: pallet_ethereum::{Pallet, Call, Storage, Event, Config, Origin} = 112, - EVM: pallet_evm::{Pallet, Call, Storage, Event, Config} = 113, - EVMChainId: pallet_evm_chain_id::{Pallet, Storage, Config} = 114, + BaseFee: pallet_base_fee::{Pallet, Call, Storage, Event,Config } = 111, + Ethereum: pallet_ethereum::{Pallet, Call, Storage, Event,Config, Origin} = 112, + EVM: pallet_evm::{Pallet, Call, Storage, Event, Config} = 113, + EVMChainId: pallet_evm_chain_id::{Pallet, Storage, Config} = 114, } } @@ -1739,8 +1735,16 @@ impl_runtime_apis! { fn dispatch_benchmark( config: frame_benchmarking::BenchmarkConfig ) -> Result, sp_runtime::RuntimeString> { - use frame_benchmarking::{Benchmarking, BenchmarkBatch, TrackedStorageKey}; - impl frame_system_benchmarking::Config for Runtime {} + use frame_benchmarking::{Benchmarking, BenchmarkBatch, TrackedStorageKey, BenchmarkError}; + impl frame_system_benchmarking::Config for Runtime { + fn setup_set_code_requirements(code: &sp_std::vec::Vec) -> Result<(), BenchmarkError> { + ParachainSystem::initialize_for_set_code_benchmark(code.len() as u32); + Ok(()) + } + fn verify_set_code() { + System::assert_last_event(cumulus_pallet_parachain_system::Event::::ValidationFunctionStored.into()); + } + } impl runtime_common::benchmarking::orml_tokens::Config for Runtime {} impl runtime_common::benchmarking::orml_vesting::Config for Runtime {} impl runtime_common::benchmarking::orml_asset_registry::Config for Runtime {} diff --git a/parachain/runtime/interlay/src/weights/frame_system.rs b/parachain/runtime/interlay/src/weights/frame_system.rs index adcc70b9c8..7d467eb326 100644 --- a/parachain/runtime/interlay/src/weights/frame_system.rs +++ b/parachain/runtime/interlay/src/weights/frame_system.rs @@ -114,4 +114,18 @@ impl frame_system::WeightInfo for WeightInfo { .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into()))) .saturating_add(Weight::from_parts(0, 70).saturating_mul(p.into())) } + /// Storage: System Digest (r:1 w:1) + /// Proof Skipped: System Digest (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: unknown `0x3a636f6465` (r:0 w:1) + /// Proof Skipped: unknown `0x3a636f6465` (r:0 w:1) + fn set_code() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `1485` + // Minimum execution time: 93_052_017_000 picoseconds. + Weight::from_parts(98_271_042_000, 0) + .saturating_add(Weight::from_parts(0, 1485)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) + } } \ No newline at end of file diff --git a/parachain/runtime/interlay/src/xcm_config.rs b/parachain/runtime/interlay/src/xcm_config.rs index 1cb0f0e598..0baafddf3f 100644 --- a/parachain/runtime/interlay/src/xcm_config.rs +++ b/parachain/runtime/interlay/src/xcm_config.rs @@ -217,6 +217,7 @@ impl xcm_executor::Config for XcmConfig { type SafeCallFilter = SafeCallFilter; type CallDispatcher = WithOriginFilter; type UniversalLocation = UniversalLocation; + type Aliasers = Nothing; } /// No local origins on this chain are allowed to dispatch XCM sends/executions. @@ -261,6 +262,8 @@ impl pallet_xcm::Config for Runtime { #[cfg(feature = "runtime-benchmarks")] type ReachableDest = ReachableDest; type AdminOrigin = EnsureRoot; + type MaxRemoteLockConsumers = ConstU32<0>; + type RemoteLockConsumerIdentifier = (); } impl cumulus_pallet_xcm::Config for Runtime { @@ -587,6 +590,11 @@ mod benchmark_impls { // We don't support exporting messages Err(BenchmarkError::Skip) } + + fn alias_origin() -> Result<(MultiLocation, MultiLocation), BenchmarkError> { + // The XCM executor of Polkadot doesn't have a configured `Aliasers` + Err(BenchmarkError::Skip) + } } } diff --git a/parachain/runtime/kintsugi/Cargo.toml b/parachain/runtime/kintsugi/Cargo.toml index 2ef39bee03..6f75eafa70 100644 --- a/parachain/runtime/kintsugi/Cargo.toml +++ b/parachain/runtime/kintsugi/Cargo.toml @@ -9,7 +9,7 @@ targets = ['x86_64-unknown-linux-gnu'] [dependencies] log = { version = "0.4.17", default-features = false } -serde = { version = "1.0.130", default-features = false, features = ["derive"], optional = true } +serde = { version = "1.0.130", default-features = false, features = ["derive"] } codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false, features = ["derive", "max-encoded-len"] } hex-literal = { version = "0.3.1" } scale-info = { version = "2.2.0", default-features = false, features = ["derive"] } @@ -32,7 +32,7 @@ sp-weights = { git = "https://github.com/paritytech/substrate", branch = "polkad frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31", default-features = false } frame-executive = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31", default-features = false } frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31", default-features = false } -frame-system-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31", default-features = false, optional = true } +frame-system-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31", default-features = false, optional = true} frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31", default-features = false, optional = true } pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31", default-features = false } pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31", default-features = false } @@ -137,7 +137,7 @@ orml-asset-registry= { git = "https://github.com/open-web3-stack/open-runtime-mo # Frontier dependencies fp-rpc = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v0.9.42", default-features = false } -fp-self-contained = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v0.9.42", default-features = false } +fp-self-contained = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v0.9.42", default-features = false, features = ["serde"] } pallet-base-fee = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v0.9.42", default-features = false } pallet-ethereum = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v0.9.42", default-features = false } pallet-evm = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v0.9.42", default-features = false } @@ -162,7 +162,7 @@ disable-runtime-api = [] vesting-any = [] std = [ "log/std", - "serde", + "serde/std", "codec/std", "sp-std/std", @@ -304,6 +304,7 @@ runtime-benchmarks = [ "pallet-society/runtime-benchmarks", "cumulus-pallet-xcmp-queue/runtime-benchmarks", + "cumulus-pallet-parachain-system/runtime-benchmarks", "pallet-xcm/runtime-benchmarks", "pallet-xcm-benchmarks/runtime-benchmarks", diff --git a/parachain/runtime/kintsugi/src/contracts.rs b/parachain/runtime/kintsugi/src/contracts.rs index 182e941ea9..0c5d778970 100644 --- a/parachain/runtime/kintsugi/src/contracts.rs +++ b/parachain/runtime/kintsugi/src/contracts.rs @@ -35,7 +35,6 @@ impl Convert for DummyWeightPrice { // contracts parameter_types! { pub const DeletionQueueDepth: u32 = 10; - pub const DeletionWeightLimit: Weight = Weight::from_parts(100000000, 0); pub const DepositPerByte: Balance = 1; pub const DepositPerItem: Balance = 1; // can't increase much beyond 400k unless we decrease max call stack height @@ -277,4 +276,5 @@ impl pallet_contracts::Config for Runtime { type MaxStorageKeyLen = MaxStorageKeyLen; type UnsafeUnstableInterface = UnsafeUnstableInterface; type MaxDebugBufferLen = MaxDebugBufferLen; + type Migrations = (); } diff --git a/parachain/runtime/kintsugi/src/lib.rs b/parachain/runtime/kintsugi/src/lib.rs index 44761fc66c..5c92592bbe 100644 --- a/parachain/runtime/kintsugi/src/lib.rs +++ b/parachain/runtime/kintsugi/src/lib.rs @@ -1,8 +1,8 @@ //! The kintsugi runtime. This can be compiled with `#[no_std]`, ready for Wasm. #![cfg_attr(not(feature = "std"), no_std)] -// `construct_runtime!` does a lot of recursion and requires us to increase the limit to 256. -#![recursion_limit = "256"] +// `construct_runtime!` does a lot of recursion and requires us to increase the limit to 512. +#![recursion_limit = "512"] // Make the WASM binary available. #[cfg(feature = "std")] @@ -61,7 +61,7 @@ pub use frame_support::{ construct_runtime, dispatch::DispatchClass, parameter_types, - traits::{Everything, Get, KeyOwnerProofSystem, LockIdentifier, Nothing}, + traits::{ConstBool, Everything, Get, KeyOwnerProofSystem, LockIdentifier, Nothing}, weights::{ constants::{RocksDbWeight, WEIGHT_REF_TIME_PER_SECOND}, IdentityFee, Weight, @@ -101,6 +101,9 @@ pub mod evm; type VaultId = primitives::VaultId; +type EventRecord = + frame_system::EventRecord<::RuntimeEvent, ::Hash>; + impl_opaque_keys! { pub struct SessionKeys { pub aura: Aura, @@ -217,6 +220,7 @@ impl Contains for BaseCallFilter { } impl frame_system::Config for Runtime { + type Block = Block; /// The identifier used to distinguish between accounts. type AccountId = AccountId; /// The aggregated dispatch type that is available for extrinsics. @@ -224,15 +228,11 @@ impl frame_system::Config for Runtime { /// The lookup mechanism to get account ID from whatever is passed in dispatchers. type Lookup = IdentityLookup; /// The index type for storing how many extrinsics an account has signed. - type Index = Nonce; - /// The index type for blocks. - type BlockNumber = BlockNumber; + type Nonce = Nonce; /// The type for hashing blocks and tries. type Hash = Hash; /// The hashing algorithm used. type Hashing = BlakeTwo256; - /// The header type. - type Header = Header; /// The ubiquitous event type. type RuntimeEvent = RuntimeEvent; /// The ubiquitous origin type. @@ -322,6 +322,7 @@ impl pallet_aura::Config for Runtime { type AuthorityId = AuraId; type DisabledValidators = (); type MaxAuthorities = MaxAuthorities; + type AllowMultipleBlocksPerSlot = ConstBool; } parameter_types! { @@ -394,6 +395,7 @@ impl pallet_transaction_payment::Config for Runtime { impl pallet_sudo::Config for Runtime { type RuntimeCall = RuntimeCall; type RuntimeEvent = RuntimeEvent; + type WeightInfo = (); } impl pallet_utility::Config for Runtime { @@ -729,12 +731,12 @@ impl EnsureOriginWithArg> for AssetAuthority { type Success = (); fn try_origin(origin: RuntimeOrigin, _asset_id: &Option) -> Result { - EnsureRoot::try_origin(origin) + as EnsureOrigin>::try_origin(origin) } #[cfg(feature = "runtime-benchmarks")] fn try_successful_origin(_: &Option) -> Result { - EnsureRoot::try_successful_origin() + as EnsureOrigin>::try_successful_origin() } } @@ -1206,12 +1208,9 @@ impl loans::Config for Runtime { } construct_runtime! { - pub enum Runtime where - Block = Block, - NodeBlock = primitives::Block, - UncheckedExtrinsic = UncheckedExtrinsic + pub enum Runtime { - System: frame_system::{Pallet, Call, Storage, Config, Event} = 0, + System: frame_system::{Pallet, Call, Config, Storage, Event} = 0, Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent} = 1, Utility: pallet_utility::{Pallet, Call, Event} = 2, TransactionPayment: pallet_transaction_payment::{Pallet, Storage, Event} = 3, @@ -1257,7 +1256,7 @@ construct_runtime! { Replace: replace::{Pallet, Call, Config, Storage, Event} = 65, Fee: fee::{Pallet, Call, Config, Storage} = 66, // Refund: 67 - Nomination: nomination::{Pallet, Call, Config, Storage, Event} = 68, + Nomination: nomination::{Pallet, Call, Storage, Config, Event} = 68, ClientsInfo: clients_info::{Pallet, Call, Storage, Event} = 69, // # Governance @@ -1270,13 +1269,13 @@ construct_runtime! { CollatorSelection: collator_selection::{Pallet, Call, Storage, Event, Config} = 81, Session: pallet_session::{Pallet, Call, Storage, Event, Config} = 82, Aura: pallet_aura::{Pallet, Storage, Config} = 83, - AuraExt: cumulus_pallet_aura_ext::{Pallet, Storage, Config} = 84, - ParachainSystem: cumulus_pallet_parachain_system::{Pallet, Call, Config, Storage, Inherent, Event} = 85, - ParachainInfo: parachain_info::{Pallet, Storage, Config} = 86, + AuraExt: cumulus_pallet_aura_ext::{Pallet, Storage, Config} = 84, + ParachainSystem: cumulus_pallet_parachain_system::{Pallet, Call, Config, Storage, Inherent, Event} = 85, + ParachainInfo: parachain_info::{Pallet, Storage, Config} = 86, // # XCM helpers. XcmpQueue: cumulus_pallet_xcmp_queue::{Pallet, Call, Storage, Event} = 90, - PolkadotXcm: pallet_xcm::{Pallet, Call, Storage, Event, Origin, Config} = 91, + PolkadotXcm: pallet_xcm::{Pallet, Call, Storage, Event, Origin, Config} = 91, CumulusXcm: cumulus_pallet_xcm::{Pallet, Call, Event, Origin} = 92, DmpQueue: cumulus_pallet_dmp_queue::{Pallet, Call, Storage, Event} = 93, @@ -1284,7 +1283,7 @@ construct_runtime! { UnknownTokens: orml_unknown_tokens::{Pallet, Storage, Event} = 95, // # Lending & AMM - Loans: loans::{Pallet, Call, Storage, Event, Config} = 100, + Loans: loans::{Pallet, Call, Storage, Event, Config} = 100, DexGeneral: dex_general::{Pallet, Call, Storage, Event} = 101, DexStable: dex_stable::{Pallet, Call, Storage, Event} = 102, DexSwapRouter: dex_swap_router::{Pallet, Call, Event} = 103, @@ -1292,9 +1291,9 @@ construct_runtime! { // # Smart contracts Contracts: pallet_contracts::{Pallet, Call, Storage, Event} = 110, BaseFee: pallet_base_fee::{Pallet, Call, Storage, Event, Config} = 111, - Ethereum: pallet_ethereum::{Pallet, Call, Storage, Event, Config, Origin} = 112, - EVM: pallet_evm::{Pallet, Call, Storage, Event, Config} = 113, - EVMChainId: pallet_evm_chain_id::{Pallet, Storage, Config} = 114, + Ethereum: pallet_ethereum::{Pallet, Call, Storage, Event, Config, Origin} = 112, + EVM: pallet_evm::{Pallet, Call, Storage, Event, Config} = 113, + EVMChainId: pallet_evm_chain_id::{Pallet, Storage, Config} = 114, } } @@ -1607,8 +1606,16 @@ impl_runtime_apis! { fn dispatch_benchmark( config: frame_benchmarking::BenchmarkConfig ) -> Result, sp_runtime::RuntimeString> { - use frame_benchmarking::{Benchmarking, BenchmarkBatch, TrackedStorageKey}; - impl frame_system_benchmarking::Config for Runtime {} + use frame_benchmarking::{Benchmarking, BenchmarkBatch, TrackedStorageKey, BenchmarkError}; + impl frame_system_benchmarking::Config for Runtime { + fn setup_set_code_requirements(code: &sp_std::vec::Vec) -> Result<(), BenchmarkError> { + ParachainSystem::initialize_for_set_code_benchmark(code.len() as u32); + Ok(()) + } + fn verify_set_code() { + System::assert_last_event(cumulus_pallet_parachain_system::Event::::ValidationFunctionStored.into()); + } + } impl runtime_common::benchmarking::orml_tokens::Config for Runtime {} impl runtime_common::benchmarking::orml_vesting::Config for Runtime {} impl runtime_common::benchmarking::orml_asset_registry::Config for Runtime {} @@ -2158,7 +2165,7 @@ impl_runtime_apis! { } } - impl pallet_contracts::ContractsApi for Runtime { + impl pallet_contracts::ContractsApi for Runtime { fn call( origin: AccountId, dest: AccountId, @@ -2166,13 +2173,14 @@ impl_runtime_apis! { gas_limit: Option, storage_deposit_limit: Option, input_data: Vec, - ) -> pallet_contracts_primitives::ContractExecResult { + ) -> pallet_contracts_primitives::ContractExecResult { if !contracts::EnableContracts::get() { return ContractResult { gas_consumed: Default::default(), gas_required: Default::default(), storage_deposit: Default::default(), debug_message: Default::default(), + events: Default::default(), result: Err(sp_runtime::DispatchError::Other("pallet_contracts is disabled")), }; } @@ -2185,7 +2193,8 @@ impl_runtime_apis! { gas_limit, storage_deposit_limit, input_data, - true, + pallet_contracts::DebugInfo::UnsafeDebug, + pallet_contracts::CollectEvents::UnsafeCollect, pallet_contracts::Determinism::Enforced, ) } @@ -2198,13 +2207,15 @@ impl_runtime_apis! { code: pallet_contracts_primitives::Code, data: Vec, salt: Vec, - ) -> pallet_contracts_primitives::ContractInstantiateResult { + ) -> pallet_contracts_primitives::ContractInstantiateResult + { if !contracts::EnableContracts::get() { return ContractResult { gas_consumed: Default::default(), gas_required: Default::default(), storage_deposit: Default::default(), debug_message: Default::default(), + events: Default::default(), result: Err(sp_runtime::DispatchError::Other("pallet_contracts is disabled")), }; } @@ -2218,7 +2229,8 @@ impl_runtime_apis! { code, data, salt, - true, + pallet_contracts::DebugInfo::UnsafeDebug, + pallet_contracts::CollectEvents::UnsafeCollect, ) } @@ -2232,14 +2244,22 @@ impl_runtime_apis! { if !contracts::EnableContracts::get() { return Err(sp_runtime::DispatchError::Other("pallet_contracts is disabled")); } - Contracts::bare_upload_code(origin, code, storage_deposit_limit, determinism) + Contracts::bare_upload_code( + origin, + code, + storage_deposit_limit, + determinism, + ) } fn get_storage( address: AccountId, key: Vec, ) -> pallet_contracts_primitives::GetStorageResult { - Contracts::get_storage(address, key) + Contracts::get_storage( + address, + key + ) } } diff --git a/parachain/runtime/kintsugi/src/weights/frame_system.rs b/parachain/runtime/kintsugi/src/weights/frame_system.rs index 8c038c2c74..3d55f7f149 100644 --- a/parachain/runtime/kintsugi/src/weights/frame_system.rs +++ b/parachain/runtime/kintsugi/src/weights/frame_system.rs @@ -114,4 +114,19 @@ impl frame_system::WeightInfo for WeightInfo { .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into()))) .saturating_add(Weight::from_parts(0, 70).saturating_mul(p.into())) } + /// Storage: System Digest (r:1 w:1) + /// Proof Skipped: System Digest (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: unknown `0x3a636f6465` (r:0 w:1) + /// Proof Skipped: unknown `0x3a636f6465` (r:0 w:1) + fn set_code() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `1485` + // Minimum execution time: 93_052_017_000 picoseconds. + Weight::from_parts(98_271_042_000, 0) + .saturating_add(Weight::from_parts(0, 1485)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) + } + } \ No newline at end of file diff --git a/parachain/runtime/kintsugi/src/xcm_config.rs b/parachain/runtime/kintsugi/src/xcm_config.rs index b625e7c8e6..d853546525 100644 --- a/parachain/runtime/kintsugi/src/xcm_config.rs +++ b/parachain/runtime/kintsugi/src/xcm_config.rs @@ -211,6 +211,7 @@ impl xcm_executor::Config for XcmConfig { type SafeCallFilter = SafeCallFilter; type CallDispatcher = WithOriginFilter; type UniversalLocation = UniversalLocation; + type Aliasers = Nothing; } /// No local origins on this chain are allowed to dispatch XCM sends/executions. @@ -255,6 +256,8 @@ impl pallet_xcm::Config for Runtime { #[cfg(feature = "runtime-benchmarks")] type ReachableDest = ReachableDest; type AdminOrigin = EnsureRoot; + type MaxRemoteLockConsumers = ConstU32<0>; + type RemoteLockConsumerIdentifier = (); } impl cumulus_pallet_xcm::Config for Runtime { @@ -581,6 +584,11 @@ mod benchmark_impls { // We don't support exporting messages Err(BenchmarkError::Skip) } + + fn alias_origin() -> Result<(MultiLocation, MultiLocation), BenchmarkError> { + // The XCM executor of Polkadot doesn't have a configured `Aliasers` + Err(BenchmarkError::Skip) + } } } diff --git a/parachain/runtime/runtime-tests/Cargo.toml b/parachain/runtime/runtime-tests/Cargo.toml index c03780f265..0131c1c797 100644 --- a/parachain/runtime/runtime-tests/Cargo.toml +++ b/parachain/runtime/runtime-tests/Cargo.toml @@ -10,7 +10,7 @@ targets = ['x86_64-unknown-linux-gnu'] [dependencies] env_logger = { version = "0.9.1" } log = { version = "0.4.14" } -serde = { version = "1.0.130", features = ["derive"] } +serde = { version = "1.0.130", features = ["derive"], default-features = false } codec = { package = "parity-scale-codec", version = "3.1.5", features = ["derive", "max-encoded-len"] } hex-literal = { version = "0.3.1" } scale-info = { version = "2.2.0", features = ["derive"] } @@ -21,75 +21,76 @@ flate2 = "1.0" rand = "0.8.5" # Substrate dependencies -sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } -sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } -sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } -sp-version = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } -sp-session = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } -sp-offchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } -sp-block-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } -sp-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } -sp-inherents = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } -sp-arithmetic = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } -sp-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } - -frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } -frame-executive = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } -frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } -frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31", optional = true } -frame-system-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31", optional = true } -pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } -pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } -pallet-utility = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } -pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } -pallet-scheduler = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } -pallet-multisig = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } -pallet-sudo = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } -pallet-preimage = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } -pallet-contracts = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31", default-features = false } -pallet-contracts-primitives = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31", default-features = false } - -frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } -pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } +sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sp-version = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sp-session = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sp-offchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sp-block-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sp-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sp-inherents = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sp-arithmetic = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sp-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sp-tracing = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } + +frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +frame-executive = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", optional = true } +frame-system-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", optional = true } +pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +pallet-utility = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +pallet-scheduler = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +pallet-multisig = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +pallet-sudo = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +pallet-preimage = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +pallet-contracts = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +pallet-contracts-primitives = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false } +frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } ## Governance -pallet-collective = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } -pallet-membership = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } -pallet-society = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } +pallet-collective = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +pallet-membership = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +pallet-society = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } # Aura dependencies -pallet-authorship = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } -pallet-aura = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } -sp-consensus-aura = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } -pallet-session = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } +pallet-authorship = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +pallet-aura = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +sp-consensus-aura = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } +pallet-session = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" } # Cumulus dependencies -cumulus-pallet-aura-ext = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.31" } -cumulus-pallet-parachain-system = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.31" } -cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.31" } -cumulus-primitives-timestamp = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.31" } -cumulus-primitives-utility = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.31" } -cumulus-pallet-dmp-queue = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.31" } -cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.31" } -cumulus-pallet-xcm = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.31" } -cumulus-test-relay-sproof-builder = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.31" } -cumulus-primitives-parachain-inherent = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.31" } -parachain-info = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.31" } +cumulus-pallet-aura-ext = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v1.0.0" } +cumulus-pallet-parachain-system = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v1.0.0" } +cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v1.0.0" } +cumulus-primitives-timestamp = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v1.0.0" } +cumulus-primitives-utility = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v1.0.0" } +cumulus-pallet-dmp-queue = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v1.0.0" } +cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v1.0.0" } +cumulus-pallet-xcm = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v1.0.0" } +cumulus-test-relay-sproof-builder = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v1.0.0" } +cumulus-primitives-parachain-inherent = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v1.0.0" } +parachain-info = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v1.0.0" } +xcm-emulator = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v1.0.0" } # Polkadot dependencies -polkadot-parachain = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.31" } -polkadot-primitives = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.31" } -polkadot-runtime-parachains = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.31" } -kusama-runtime = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.31" } -polkadot-runtime = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.31" } -xcm = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.31" } -xcm-builder = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.31" } -xcm-executor = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.31" } -xcm-simulator = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.31" } -pallet-xcm = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.31" } -xcm-emulator = { git = "https://github.com/shaunxw/xcm-simulator", rev = "d011e5ca62b93e8f688c2042c1f92cdbafc5d1d0" } +polkadot-parachain = { git = "https://github.com/paritytech//polkadot", branch = "release-v1.0.0" } +polkadot-primitives = { git = "https://github.com/paritytech//polkadot", branch = "release-v1.0.0" } +polkadot-runtime-parachains = { git = "https://github.com/paritytech//polkadot", branch = "release-v1.0.0" } +kusama-runtime = { git = "https://github.com/paritytech//polkadot", branch = "release-v1.0.0" } +polkadot-runtime = { git = "https://github.com/paritytech//polkadot", branch = "release-v1.0.0" } +xcm = { git = "https://github.com/paritytech//polkadot", branch = "release-v1.0.0" } +xcm-builder = { git = "https://github.com/paritytech//polkadot", branch = "release-v1.0.0" } +xcm-executor = { git = "https://github.com/paritytech//polkadot", branch = "release-v1.0.0" } +xcm-simulator = { git = "https://github.com/paritytech//polkadot", branch = "release-v1.0.0" } +pallet-xcm = { git = "https://github.com/paritytech//polkadot", branch = "release-v1.0.0" } +polkadot-test-runtime = { git = "https://github.com/paritytech/polkadot", branch = "release-v1.0.0" } # Parachain dependencies runtime-common = { path = "../common" } @@ -185,5 +186,6 @@ runtime-benchmarks = [ "kusama-runtime/runtime-benchmarks", "polkadot-runtime/runtime-benchmarks", + "polkadot-test-runtime/runtime-benchmarks", ] with-interlay-runtime = [] diff --git a/parachain/runtime/runtime-tests/src/lib.rs b/parachain/runtime/runtime-tests/src/lib.rs index bfed5e8af5..99f6eb6d88 100644 --- a/parachain/runtime/runtime-tests/src/lib.rs +++ b/parachain/runtime/runtime-tests/src/lib.rs @@ -4,6 +4,5 @@ mod bitcoin_data; mod parachain; -mod relaychain; mod setup; mod utils; diff --git a/parachain/runtime/runtime-tests/src/parachain/contracts.rs b/parachain/runtime/runtime-tests/src/parachain/contracts.rs index 0e1672390e..bcf8bddcc6 100644 --- a/parachain/runtime/runtime-tests/src/parachain/contracts.rs +++ b/parachain/runtime/runtime-tests/src/parachain/contracts.rs @@ -1,5 +1,5 @@ use crate::setup::{assert_eq, *}; -use pallet_contracts::Determinism; +use pallet_contracts::{CollectEvents, DebugInfo, Determinism}; use pallet_contracts_primitives::Code; use sp_runtime::traits::Hash; @@ -66,7 +66,8 @@ fn test_basic_contract() { Code::Existing(blob_hash), input, vec![], - true, + DebugInfo::Skip, + CollectEvents::Skip, ); let result = ret.result.unwrap(); @@ -97,7 +98,8 @@ fn test_basic_contract() { GAS_LIMIT, None, do_something_on_runtime_selector, - false, + DebugInfo::Skip, + CollectEvents::Skip, Determinism::Enforced, ); assert_ok!(result.result); @@ -138,7 +140,8 @@ fn test_btc_swap_contract() { Code::Existing(blob_hash), input, vec![], - true, + DebugInfo::Skip, + CollectEvents::Skip, ); let result = ret.result.unwrap(); @@ -160,7 +163,8 @@ fn test_btc_swap_contract() { GAS_LIMIT, None, create_trade, - false, + DebugInfo::Skip, + CollectEvents::Skip, Determinism::Enforced, ); assert_ok!(result.result); @@ -180,7 +184,8 @@ fn test_btc_swap_contract() { GAS_LIMIT, None, execute_trade, - false, + DebugInfo::Skip, + CollectEvents::Skip, Determinism::Enforced, ); assert_eq!(result.result.unwrap().flags.bits(), 0); // checks that result is ok, and no error flags are set @@ -198,7 +203,8 @@ fn test_btc_swap_contract() { GAS_LIMIT, None, execute_trade, - false, + DebugInfo::Skip, + CollectEvents::Skip, Determinism::Enforced, ); assert_err!(result.result, ContractsError::ContractTrapped); diff --git a/parachain/runtime/runtime-tests/src/relaychain/kusama_cross_chain_transfer.rs b/parachain/runtime/runtime-tests/src/relaychain/kusama_cross_chain_transfer.rs deleted file mode 100644 index 0880a03e06..0000000000 --- a/parachain/runtime/runtime-tests/src/relaychain/kusama_cross_chain_transfer.rs +++ /dev/null @@ -1,693 +0,0 @@ -use crate::relaychain::kusama_test_net::*; -use codec::Encode; -use frame_support::assert_ok; -use orml_traits::MultiCurrency; -use primitives::{ - CurrencyId::{ForeignAsset, Token}, - CustomMetadata, TokenSymbol, -}; -use sp_runtime::{FixedPointNumber, FixedU128}; -use xcm::latest::{prelude::*, Weight}; -use xcm_builder::ParentIsPreset; -use xcm_emulator::{TestExt, XcmExecutor}; -use xcm_executor::traits::Convert; - -mod fees { - use super::*; - - // N * unit_weight * (weight/10^12) * token_per_second - fn weight_calculation(instruction_count: u32, unit_weight: Weight, per_second: u128) -> u128 { - let weight = unit_weight.saturating_mul(instruction_count as u64); - let weight_ratio = - FixedU128::saturating_from_rational(weight.ref_time() as u128, WEIGHT_REF_TIME_PER_SECOND as u128); - weight_ratio.saturating_mul_int(per_second) - } - - fn native_unit_cost(instruction_count: u32, per_second: u128) -> u128 { - let unit_weight: Weight = kintsugi_runtime_parachain::xcm_config::UnitWeightCost::get(); - assert_eq!(unit_weight.ref_time(), 200_000_000); - assert_eq!(unit_weight.proof_size(), 0); - - weight_calculation(instruction_count, unit_weight, per_second) - } - - pub fn ksm_per_second_as_fee(instruction_count: u32) -> u128 { - let ksm_per_second = kintsugi_runtime_parachain::xcm_config::ksm_per_second(); - - // check ksm per second. It's by no means essential - it's just useful to be forced to check the - // change after polkadot updates - assert!(ksm_per_second < 210000000000); - - native_unit_cost(instruction_count, ksm_per_second) - } - - pub fn kint_per_second_as_fee(instruction_count: u32) -> u128 { - let kint_per_second = kintsugi_runtime_parachain::xcm_config::kint_per_second(); - - native_unit_cost(instruction_count, kint_per_second) - } -} - -mod hrmp { - use super::*; - - use polkadot_runtime_parachains::hrmp; - fn construct_xcm(call: hrmp::Call) -> Xcm<()> { - Xcm(vec![ - WithdrawAsset((Here, 410000000000u128).into()), - BuyExecution { - fees: (Here, 400000000000u128).into(), - weight_limit: Unlimited, - }, - Transact { - require_weight_at_most: Weight::from_parts(10000000000, 1_000_000u64), // actual pov size = 31015 - origin_kind: OriginKind::Native, - call: kusama_runtime::RuntimeCall::Hrmp(call).encode().into(), - }, - RefundSurplus, - DepositAsset { - assets: All.into(), - beneficiary: Junction::AccountId32 { id: BOB, network: None }.into(), - }, - ]) - } - - fn has_open_channel_requested_event(sender: u32, recipient: u32) -> bool { - KusamaNet::execute_with(|| { - kusama_runtime::System::events().iter().any(|r| { - matches!( - r.event, - kusama_runtime::RuntimeEvent::Hrmp(hrmp::Event::OpenChannelRequested( - actual_sender, - actual_recipient, - 1000, - 102400 - )) if actual_sender == sender.into() && actual_recipient == recipient.into() - ) - }) - }) - } - - fn has_open_channel_accepted_event(sender: u32, recipient: u32) -> bool { - KusamaNet::execute_with(|| { - kusama_runtime::System::events().iter().any(|r| { - matches!( - r.event, - kusama_runtime::RuntimeEvent::Hrmp(hrmp::Event::OpenChannelAccepted( - actual_sender, - actual_recipient - )) if actual_sender == sender.into() && actual_recipient == recipient.into() - ) - }) - }) - } - - fn init_open_channel(sender: u32, recipient: u32) - where - T: TestExt, - { - // do hrmp_init_open_channel - assert!(!has_open_channel_requested_event(sender, recipient)); // just a sanity check - T::execute_with(|| { - let message = construct_xcm(hrmp::Call::::hrmp_init_open_channel { - recipient: recipient.into(), - proposed_max_capacity: 1000, - proposed_max_message_size: 102400, - }); - assert_ok!(pallet_xcm::Pallet::::send_xcm( - Here, Parent, message - )); - }); - assert!(has_open_channel_requested_event(sender, recipient)); - } - - fn accept_open_channel(sender: u32, recipient: u32) - where - T: TestExt, - { - // do hrmp_accept_open_channel - assert!(!has_open_channel_accepted_event(sender, recipient)); // just a sanity check - T::execute_with(|| { - let message = construct_xcm(hrmp::Call::::hrmp_accept_open_channel { - sender: sender.into(), - }); - assert_ok!(pallet_xcm::Pallet::::send_xcm( - Here, Parent, message - )); - }); - assert!(has_open_channel_accepted_event(sender, recipient)); - } - #[test] - fn open_hrmp_channel() { - // setup sovereign account balances - KusamaNet::execute_with(|| { - // transfer the required funds, and make sure that the account remains above the existential deposit - // afterwards - assert_ok!(kusama_runtime::Balances::transfer( - kusama_runtime::RuntimeOrigin::signed(ALICE.into()), - sp_runtime::MultiAddress::Id(kintsugi_sovereign_account_on_kusama()), - 10_820_000_000_000 + kusama_runtime::ExistentialDeposit::get() - )); - assert_ok!(kusama_runtime::Balances::transfer( - kusama_runtime::RuntimeOrigin::signed(ALICE.into()), - sp_runtime::MultiAddress::Id(sibling_sovereign_account_on_kusama()), - 10_820_000_000_000 + kusama_runtime::ExistentialDeposit::get() - )); - }); - // open channel kintsugi -> sibling - init_open_channel::(KINTSUGI_PARA_ID, SIBLING_PARA_ID); - accept_open_channel::(KINTSUGI_PARA_ID, SIBLING_PARA_ID); - - // open channel sibling -> kintsugi - init_open_channel::(SIBLING_PARA_ID, KINTSUGI_PARA_ID); - accept_open_channel::(SIBLING_PARA_ID, KINTSUGI_PARA_ID); - - // check that Bob received left-over funds (from both Kintsugi and Sibling). - // We expect slightly less than 4 * 0.41 KSM - KusamaNet::execute_with(|| { - let free_balance = kusama_runtime::Balances::free_balance(&AccountId::from(BOB)); - assert!(free_balance > 1_600_000_000_000 && free_balance < 1_640_000_000_000); - }); - } -} - -#[test] -fn test_transact_barrier() { - let call = orml_tokens::Call::::transfer_all { - dest: ALICE.into(), - currency_id: Token(KSM), - keep_alive: false, - }; - let message = Xcm(vec![ - WithdrawAsset((Here, 410000000000u128).into()), - BuyExecution { - fees: (Here, 400000000000u128).into(), - weight_limit: Unlimited, - }, - Transact { - require_weight_at_most: Weight::from_parts(10000000000, 0u64), - origin_kind: OriginKind::Native, - call: kintsugi_runtime_parachain::RuntimeCall::Tokens(call).encode().into(), - }, - RefundSurplus, - DepositAsset { - assets: All.into(), - beneficiary: Junction::AccountId32 { id: BOB, network: None }.into(), - }, - ]); - - KusamaNet::execute_with(|| { - assert_ok!(pallet_xcm::Pallet::::send_xcm( - Here, - X1(Parachain(2092)), - message - )); - }); - - Kintsugi::execute_with(|| { - assert!(System::events().iter().any(|r| matches!( - r.event, - RuntimeEvent::DmpQueue(cumulus_pallet_dmp_queue::Event::ExecutedDownward { - outcome: Outcome::Error(XcmError::Barrier), - .. - }) - ))); - }); -} - -#[test] -fn transfer_from_relay_chain() { - KusamaNet::execute_with(|| { - assert_ok!(kusama_runtime::XcmPallet::reserve_transfer_assets( - kusama_runtime::RuntimeOrigin::signed(ALICE.into()), - Box::new(Parachain(KINTSUGI_PARA_ID).into_versioned()), - Box::new(Junction::AccountId32 { id: BOB, network: None }.into_versioned()), - Box::new((Here, KSM.one()).into()), - 0 - )); - }); - - Kintsugi::execute_with(|| { - let xcm_fee = KSM.one() - Tokens::free_balance(Token(KSM), &AccountId::from(BOB)); - - assert!(xcm_fee < 1000000000); // fees are set to 1000000000 in ui - make sure it's enough - assert!(xcm_fee > 0); // check that some fees are taken - - // check that fees go to treasury - assert_eq!(Tokens::free_balance(Token(KSM), &TreasuryAccount::get()), xcm_fee); - }); -} - -#[test] -fn transfer_to_relay_chain() { - KusamaNet::execute_with(|| { - assert_ok!(kusama_runtime::Balances::transfer( - kusama_runtime::RuntimeOrigin::signed(ALICE.into()), - sp_runtime::MultiAddress::Id(kintsugi_sovereign_account_on_kusama()), - 2 * KSM.one() - )); - }); - - Kintsugi::execute_with(|| { - assert_ok!(XTokens::transfer( - RuntimeOrigin::signed(ALICE.into()), - Token(KSM), - KSM.one(), - Box::new(MultiLocation::new(1, X1(Junction::AccountId32 { id: BOB, network: None })).into()), - WeightLimit::Unlimited - )); - }); - - KusamaNet::execute_with(|| { - let fee = KSM.one() - kusama_runtime::Balances::free_balance(&AccountId::from(BOB)); - - // UI uses 165940672 - make sure that that's an overestimation - assert!(fee < 165940672); - }); -} - -/// Send KINT to sibling. On the sibling, it will be registered as a foreign asset. -/// By also transferring it back, we test that the asset-registry has been properly -/// integrated. -#[test] -fn transfer_to_sibling_and_back() { - fn sibling_sovereign_account() -> AccountId { - use sp_runtime::traits::AccountIdConversion; - polkadot_parachain::primitives::Sibling::from(SIBLING_PARA_ID).into_account_truncating() - } - - Sibling::execute_with(|| { - register_kint_as_foreign_asset(); - }); - - Kintsugi::execute_with(|| { - assert_ok!(Tokens::deposit( - Token(KINT), - &AccountId::from(ALICE), - 100_000_000_000_000 - )); - }); - - Kintsugi::execute_with(|| { - assert_ok!(XTokens::transfer( - RuntimeOrigin::signed(ALICE.into()), - Token(KINT), - 10_000_000_000_000, - Box::new( - MultiLocation::new( - 1, - X2( - Parachain(SIBLING_PARA_ID), - Junction::AccountId32 { - network: None, - id: BOB.into(), - } - ) - ) - .into() - ), - WeightLimit::Unlimited, - )); - - assert_eq!( - Tokens::free_balance(Token(KINT), &AccountId::from(ALICE)), - 90_000_000_000_000 - ); - - assert_eq!( - Tokens::free_balance(Token(KINT), &sibling_sovereign_account()), - 10_000_000_000_000 - ); - }); - - Sibling::execute_with(|| { - let xcm_fee = 800_000_000; - - // check reception - assert_eq!( - Tokens::free_balance(ForeignAsset(1), &AccountId::from(BOB)), - 10_000_000_000_000 - xcm_fee - ); - - // return some back to kintsugi - assert_ok!(XTokens::transfer( - RuntimeOrigin::signed(BOB.into()), - ForeignAsset(1), - 5_000_000_000_000, - Box::new( - MultiLocation::new( - 1, - X2( - Parachain(KINTSUGI_PARA_ID), - Junction::AccountId32 { - network: None, - id: ALICE.into(), - } - ) - ) - .into() - ), - WeightLimit::Unlimited, - )); - }); - - // check reception - Kintsugi::execute_with(|| { - let xcm_fee = fees::kint_per_second_as_fee(4); - assert_eq!( - Tokens::free_balance(Token(KINT), &AccountId::from(ALICE)), - 95_000_000_000_000 - xcm_fee - ); - - assert_eq!(Tokens::free_balance(Token(KINT), &TreasuryAccount::get()), xcm_fee); - - assert_eq!( - Tokens::free_balance(Token(KINT), &sibling_sovereign_account()), - 5_000_000_000_000 - ); - }); -} - -#[test] -fn xcm_transfer_execution_barrier_trader_works() { - let unit_instruction_weight: Weight = kintsugi_runtime_parachain::xcm_config::UnitWeightCost::get(); - let message_weight = unit_instruction_weight.saturating_mul(3); - let xcm_fee = fees::ksm_per_second_as_fee(3); - - // relay-chain use normal account to send xcm, destination parachain can't pass Barrier check - let message = Xcm(vec![ - ReserveAssetDeposited((Parent, 100).into()), - BuyExecution { - fees: (Parent, 100).into(), - weight_limit: Unlimited, - }, - DepositAsset { - assets: All.into(), - beneficiary: Here.into(), - }, - ]); - KusamaNet::execute_with(|| { - // Kusama effectively disabled the `send` extrinsic in 0.9.19, so use send_xcm - assert_ok!(pallet_xcm::Pallet::::send_xcm( - X1(Junction::AccountId32 { - network: None, - id: ALICE.into(), - }), - Parachain(KINTSUGI_PARA_ID), - message - )); - }); - Kintsugi::execute_with(|| { - assert!(System::events().iter().any(|r| matches!( - r.event, - RuntimeEvent::DmpQueue(cumulus_pallet_dmp_queue::Event::ExecutedDownward { - outcome: Outcome::Error(XcmError::Barrier), - .. - }) - ))); - }); - - // AllowTopLevelPaidExecutionFrom barrier test case: - // para-chain use XcmExecutor `execute_xcm()` method to execute xcm. - // if `weight_limit` in BuyExecution is less than `xcm_weight(max_weight)`, then Barrier can't pass. - // other situation when `weight_limit` is `Unlimited` or large than `xcm_weight`, then it's ok. - let message = Xcm::(vec![ - ReserveAssetDeposited((Parent, 100).into()), - BuyExecution { - fees: (Parent, 100).into(), - weight_limit: Limited(message_weight - Weight::from_parts(1, 0u64)), - }, - DepositAsset { - assets: All.into(), - beneficiary: Here.into(), - }, - ]); - Kintsugi::execute_with(|| { - let hash = message.using_encoded(sp_io::hashing::blake2_256); - let r = XcmExecutor::::execute_xcm(Parent, message, hash, message_weight); - assert_eq!(r, Outcome::Error(XcmError::Barrier)); - }); - - // trader inside BuyExecution have TooExpensive error if payment less than calculated weight amount. - // the minimum of calculated weight amount(`FixedRateOfFungible`). - let message = Xcm::(vec![ - ReserveAssetDeposited((Parent, xcm_fee - 1).into()), - BuyExecution { - fees: (Parent, xcm_fee - 1).into(), - weight_limit: Limited(message_weight), - }, - DepositAsset { - assets: All.into(), - beneficiary: Here.into(), - }, - ]); - Kintsugi::execute_with(|| { - let hash = message.using_encoded(sp_io::hashing::blake2_256); - let r = XcmExecutor::::execute_xcm(Parent, message, hash, message_weight); - assert_eq!( - r, - Outcome::Incomplete(message_weight - unit_instruction_weight, XcmError::TooExpensive) - ); - }); - - // all situation fulfilled, execute success - let message = Xcm::(vec![ - ReserveAssetDeposited((Parent, xcm_fee).into()), - BuyExecution { - fees: (Parent, xcm_fee).into(), - weight_limit: Limited(message_weight), - }, - DepositAsset { - assets: All.into(), - beneficiary: Here.into(), - }, - ]); - Kintsugi::execute_with(|| { - let hash = message.using_encoded(sp_io::hashing::blake2_256); - let r = XcmExecutor::::execute_xcm(Parent, message, hash, message_weight); - assert_eq!(r, Outcome::Complete(message_weight)); - }); -} - -#[test] -fn subscribe_version_notify_works() { - // relay chain subscribe version notify of para chain - KusamaNet::execute_with(|| { - let r = pallet_xcm::Pallet::::force_subscribe_version_notify( - kusama_runtime::RuntimeOrigin::root(), - Box::new(Parachain(KINTSUGI_PARA_ID).into_versioned()), - ); - assert_ok!(r); - }); - KusamaNet::execute_with(|| { - kusama_runtime::System::assert_has_event(kusama_runtime::RuntimeEvent::XcmPallet( - pallet_xcm::Event::SupportedVersionChanged( - MultiLocation { - parents: 0, - interior: X1(Parachain(KINTSUGI_PARA_ID)), - }, - 3, - ), - )); - }); - - // para chain subscribe version notify of relay chain - Kintsugi::execute_with(|| { - let r = pallet_xcm::Pallet::::force_subscribe_version_notify( - RuntimeOrigin::root(), - Box::new(Parent.into()), - ); - assert_ok!(r); - }); - Kintsugi::execute_with(|| { - System::assert_has_event(kintsugi_runtime_parachain::RuntimeEvent::PolkadotXcm( - pallet_xcm::Event::SupportedVersionChanged( - MultiLocation { - parents: 1, - interior: Here, - }, - 3, - ), - )); - }); - - // para chain subscribe version notify of sibling chain - Kintsugi::execute_with(|| { - let r = pallet_xcm::Pallet::::force_subscribe_version_notify( - RuntimeOrigin::root(), - Box::new((Parent, Parachain(SIBLING_PARA_ID)).into()), - ); - assert_ok!(r); - }); - Kintsugi::execute_with(|| { - assert!(kintsugi_runtime_parachain::System::events().iter().any(|r| matches!( - r.event, - kintsugi_runtime_parachain::RuntimeEvent::XcmpQueue(cumulus_pallet_xcmp_queue::Event::XcmpMessageSent { - message_hash: Some(_) - }) - ))); - }); - Sibling::execute_with(|| { - assert!(kintsugi_runtime_parachain::System::events().iter().any(|r| matches!( - r.event, - kintsugi_runtime_parachain::RuntimeEvent::XcmpQueue(cumulus_pallet_xcmp_queue::Event::XcmpMessageSent { - message_hash: Some(_) - }) | kintsugi_runtime_parachain::RuntimeEvent::XcmpQueue(cumulus_pallet_xcmp_queue::Event::Success { - message_hash: Some(_), - weight: _, - }) - ))); - }); -} - -fn general_key_of(token_symbol: TokenSymbol) -> Junction { - let id = Token(token_symbol); - let encoded = id.encode(); - let mut data = [0u8; 32]; - if encoded.len() > 32 { - // we are not returning result, so panic is inevitable. Let's make it explicit. - panic!("Currency ID was too long to be encoded"); - } - data[..encoded.len()].copy_from_slice(&encoded[..]); - GeneralKey { - length: encoded.len() as u8, - data, - } -} - -#[test] -fn trap_assets_works() { - let mut kint_treasury_amount = 0; - let mut ksm_treasury_amount = 0; - let (ksm_asset_amount, kint_asset_amount) = (KSM.one(), KINT.one()); - let trader_weight_to_treasury = fees::ksm_per_second_as_fee(3); - - let parent_account: AccountId = ParentIsPreset::::convert(Parent.into()).unwrap(); - - Kintsugi::execute_with(|| { - assert_ok!(Tokens::deposit(Token(KSM), &parent_account, 100 * KSM.one())); - assert_ok!(Tokens::deposit(Token(KINT), &parent_account, 100 * KINT.one())); - - kint_treasury_amount = Tokens::free_balance(Token(KINT), &TreasuryAccount::get()); - ksm_treasury_amount = Tokens::free_balance(Token(KSM), &TreasuryAccount::get()); - }); - - let assets: MultiAsset = (Parent, ksm_asset_amount).into(); - // Withdraw kint and ksm on kintsugi but don't deposit it - KusamaNet::execute_with(|| { - let xcm = vec![ - WithdrawAsset(assets.clone().into()), - BuyExecution { - fees: assets, - weight_limit: Limited(Weight::from_parts(KSM.one() as u64, 0u64)), - }, - WithdrawAsset( - ( - (Parent, X2(Parachain(KINTSUGI_PARA_ID), general_key_of(KINT))), - kint_asset_amount, - ) - .into(), - ), - ]; - assert_ok!(pallet_xcm::Pallet::::send_xcm( - Here, - Parachain(KINTSUGI_PARA_ID), - Xcm(xcm), - )); - }); - - let mut trapped_assets: Option = None; - // verify that the assets got trapped (i.e. didn't get burned) - Kintsugi::execute_with(|| { - assert!(System::events().iter().any(|r| matches!( - r.event, - RuntimeEvent::PolkadotXcm(pallet_xcm::Event::AssetsTrapped(_, _, _)) - ))); - - let event = System::events() - .iter() - .find(|r| { - matches!( - r.event, - RuntimeEvent::PolkadotXcm(pallet_xcm::Event::AssetsTrapped(_, _, _)) - ) - }) - .cloned() - .unwrap(); - - use std::convert::TryFrom; - use xcm::VersionedMultiAssets; - trapped_assets = match event.event { - RuntimeEvent::PolkadotXcm(pallet_xcm::Event::AssetsTrapped(_, _, ticket)) => { - Some(TryFrom::::try_from(ticket).unwrap()) - } - _ => panic!("event not found"), - }; - - // unchanged treasury amounts - assert_eq!( - trader_weight_to_treasury, - Tokens::free_balance(Token(KSM), &TreasuryAccount::get()) - ); - assert_eq!( - kint_treasury_amount, - Tokens::free_balance(Token(KINT), &TreasuryAccount::get()) - ); - }); - - // Now reclaim trapped assets - KusamaNet::execute_with(|| { - let xcm = vec![ - ClaimAsset { - assets: trapped_assets.unwrap(), - ticket: Here.into(), - }, - BuyExecution { - fees: ( - (Parent, X2(Parachain(KINTSUGI_PARA_ID), general_key_of(KINT))), - kint_asset_amount / 2, - ) - .into(), - weight_limit: Limited(Weight::from_parts(KSM.one() as u64, 0u64)), - }, - DepositAsset { - assets: All.into(), - beneficiary: Junction::AccountId32 { id: BOB, network: None }.into(), - }, - ]; - assert_ok!(pallet_xcm::Pallet::::send_xcm( - Here, - Parachain(KINTSUGI_PARA_ID), - Xcm(xcm), - )); - }); - - // verify that assets were claimed successfully (deposited into Bob's account) - Kintsugi::execute_with(|| { - let kint_xcm_fee = fees::kint_per_second_as_fee(3); - let ksm_xcm_fee = fees::ksm_per_second_as_fee(3); - assert_eq!( - Tokens::free_balance(Token(KINT), &AccountId::from(BOB)), - kint_asset_amount - kint_xcm_fee - ); - assert_eq!( - Tokens::free_balance(Token(KSM), &AccountId::from(BOB)), - ksm_asset_amount - ksm_xcm_fee - ); - }); -} - -fn register_kint_as_foreign_asset() { - let metadata = AssetMetadata { - decimals: 12, - name: "Kintsugi native".as_bytes().to_vec(), - symbol: "extKINT".as_bytes().to_vec(), - existential_deposit: 0, - location: Some(MultiLocation::new(1, X2(Parachain(KINTSUGI_PARA_ID), general_key_of(KINT))).into()), - additional: CustomMetadata { - fee_per_second: 1_000_000_000_000, - coingecko_id: "kint-sugi".as_bytes().to_vec(), - }, - }; - AssetRegistry::register_asset(RuntimeOrigin::root(), metadata, None).unwrap(); -} diff --git a/parachain/runtime/runtime-tests/src/relaychain/kusama_test_net.rs b/parachain/runtime/runtime-tests/src/relaychain/kusama_test_net.rs deleted file mode 100644 index 8e68f57efb..0000000000 --- a/parachain/runtime/runtime-tests/src/relaychain/kusama_test_net.rs +++ /dev/null @@ -1,242 +0,0 @@ -use cumulus_primitives_core::MultiLocation; -use frame_support::{traits::GenesisBuild, weights::Weight}; -pub use kintsugi_runtime_parachain::{xcm_config::*, *}; -use polkadot_primitives::{BlockNumber, MAX_CODE_SIZE, MAX_POV_SIZE}; -use polkadot_runtime_parachains::{configuration::HostConfiguration, paras::ParaKind}; -pub use primitives::{ - CurrencyId::Token, - TokenSymbol::{KINT, KSM}, -}; -use sp_runtime::traits::AccountIdConversion; -use xcm_emulator::{decl_test_network, decl_test_parachain, decl_test_relay_chain}; - -pub const KINTSUGI_PARA_ID: u32 = 2092; -pub const SIBLING_PARA_ID: u32 = 2001; - -decl_test_relay_chain! { - pub struct KusamaNet { - Runtime = kusama_runtime::Runtime, - XcmConfig = kusama_runtime::xcm_config::XcmConfig, - new_ext = kusama_ext(), - } -} - -decl_test_parachain! { - pub struct Kintsugi { - Runtime = Runtime, - RuntimeOrigin = RuntimeOrigin, - XcmpMessageHandler = kintsugi_runtime_parachain::XcmpQueue, - DmpMessageHandler = kintsugi_runtime_parachain::DmpQueue, - new_ext = para_ext(KINTSUGI_PARA_ID), - } -} - -decl_test_parachain! { - pub struct Sibling { - Runtime = kintsugi_runtime_parachain::Runtime, - RuntimeOrigin = kintsugi_runtime_parachain::RuntimeOrigin, - XcmpMessageHandler = kintsugi_runtime_parachain::XcmpQueue, - DmpMessageHandler = kintsugi_runtime_parachain::DmpQueue, - new_ext = para_ext(SIBLING_PARA_ID), - } -} - -// note: can't use SIBLING_PARA_ID and KINTSUGI_PARA_ID in this macro - we are forced to use raw numbers -decl_test_network! { - pub struct TestNet { - relay_chain = KusamaNet, - parachains = vec![ - (2092, Kintsugi), - (2001, Sibling), - ], - } -} - -fn default_parachains_host_configuration() -> HostConfiguration { - HostConfiguration { - minimum_validation_upgrade_delay: 5, - validation_upgrade_cooldown: 5u32, - validation_upgrade_delay: 5, - code_retention_period: 1200, - max_code_size: MAX_CODE_SIZE, - max_pov_size: MAX_POV_SIZE, - max_head_data_size: 32 * 1024, - group_rotation_frequency: 20, - chain_availability_period: 4, - thread_availability_period: 4, - max_upward_queue_count: 8, - max_upward_queue_size: 1024 * 1024, - max_downward_message_size: 1024, - ump_service_total_weight: Weight::from_parts(4 * 1_000_000_000 as u64, 0u64), - max_upward_message_size: 50 * 1024, - max_upward_message_num_per_candidate: 5, - hrmp_sender_deposit: 5_000_000_000_000, - hrmp_recipient_deposit: 5_000_000_000_000, - hrmp_channel_max_capacity: 1000, - hrmp_channel_max_total_size: 8 * 1024, - hrmp_max_parachain_inbound_channels: 4, - hrmp_max_parathread_inbound_channels: 4, - hrmp_channel_max_message_size: 102400, - hrmp_max_parachain_outbound_channels: 4, - hrmp_max_parathread_outbound_channels: 4, - hrmp_max_message_num_per_candidate: 5, - dispute_period: 6, - no_show_slots: 2, - n_delay_tranches: 25, - needed_approvals: 2, - relay_vrf_modulo_samples: 2, - zeroth_delay_tranche_width: 0, - ..Default::default() - } -} - -pub fn kusama_ext() -> sp_io::TestExternalities { - use kusama_runtime::{Runtime, System}; - use polkadot_parachain::primitives::{HeadData, ValidationCode}; - - let mut t = frame_system::GenesisConfig::default() - .build_storage::() - .unwrap(); - - pallet_balances::GenesisConfig:: { - balances: vec![ - (AccountId::from(ALICE), 2002 * KSM.one()), - // (ParaId::from(KINTSUGI_PARA_ID).into_account_truncating(), 2 * KSM.one()), - ], - } - .assimilate_storage(&mut t) - .unwrap(); - - // register a parachain so that we can test opening hrmp channel - let fake_para = polkadot_runtime_parachains::paras::ParaGenesisArgs { - genesis_head: HeadData(vec![]), - para_kind: ParaKind::Parachain, - validation_code: ValidationCode(vec![0]), - }; - >::assimilate_storage( - &polkadot_runtime_parachains::paras::GenesisConfig { - paras: vec![ - (KINTSUGI_PARA_ID.into(), fake_para.clone()), - (SIBLING_PARA_ID.into(), fake_para.clone()), - ], - }, - &mut t, - ) - .unwrap(); - - polkadot_runtime_parachains::configuration::GenesisConfig:: { - config: default_parachains_host_configuration(), - } - .assimilate_storage(&mut t) - .unwrap(); - - >::assimilate_storage( - &pallet_xcm::GenesisConfig { - safe_xcm_version: Some(3), - }, - &mut t, - ) - .unwrap(); - - let mut ext = sp_io::TestExternalities::new(t); - ext.execute_with(|| System::set_block_number(1)); - ext -} - -pub fn para_ext(parachain_id: u32) -> sp_io::TestExternalities { - ExtBuilder::default() - .balances(vec![ - (AccountId::from(ALICE), Token(KSM), 10 * KSM.one()), - // (kintsugi_runtime_parachain::TreasuryAccount::get(), Token(KSM), KSM.one()), - ]) - .parachain_id(parachain_id) - .build() -} - -#[allow(dead_code)] -pub const DEFAULT: [u8; 32] = [0u8; 32]; -#[allow(dead_code)] -pub const ALICE: [u8; 32] = [4u8; 32]; -#[allow(dead_code)] -pub const BOB: [u8; 32] = [5u8; 32]; - -pub struct ExtBuilder { - balances: Vec<(AccountId, CurrencyId, Balance)>, - parachain_id: u32, -} - -impl Default for ExtBuilder { - fn default() -> Self { - Self { - balances: vec![], - parachain_id: 2000, - } - } -} - -impl ExtBuilder { - pub fn balances(mut self, balances: Vec<(AccountId, CurrencyId, Balance)>) -> Self { - self.balances = balances; - self - } - - #[allow(dead_code)] - pub fn parachain_id(mut self, parachain_id: u32) -> Self { - self.parachain_id = parachain_id; - self - } - - pub fn build(self) -> sp_io::TestExternalities { - let mut t = frame_system::GenesisConfig::default() - .build_storage::() - .unwrap(); - - let native_currency_id = GetNativeCurrencyId::get(); - - orml_tokens::GenesisConfig:: { - balances: self - .balances - .into_iter() - .filter(|(_, currency_id, _)| *currency_id != native_currency_id) - .collect::>(), - } - .assimilate_storage(&mut t) - .unwrap(); - - >::assimilate_storage( - ¶chain_info::GenesisConfig { - parachain_id: self.parachain_id.into(), - }, - &mut t, - ) - .unwrap(); - - >::assimilate_storage( - &pallet_xcm::GenesisConfig { - safe_xcm_version: Some(2), // NOTE! if this was required for tests we may need it on mainnet - }, - &mut t, - ) - .unwrap(); - - let mut ext = sp_io::TestExternalities::new(t); - ext.execute_with(|| { - System::set_block_number(1); - PolkadotXcm::force_xcm_version( - kintsugi_runtime_parachain::RuntimeOrigin::root(), - Box::new(MultiLocation::parent()), - 3, - ) - .unwrap(); - }); - ext - } -} - -pub(crate) fn kintsugi_sovereign_account_on_kusama() -> AccountId { - polkadot_parachain::primitives::Id::from(KINTSUGI_PARA_ID).into_account_truncating() -} - -pub(crate) fn sibling_sovereign_account_on_kusama() -> AccountId { - polkadot_parachain::primitives::Id::from(SIBLING_PARA_ID).into_account_truncating() -} diff --git a/parachain/runtime/runtime-tests/src/relaychain/mod.rs b/parachain/runtime/runtime-tests/src/relaychain/mod.rs deleted file mode 100644 index 5f90377e51..0000000000 --- a/parachain/runtime/runtime-tests/src/relaychain/mod.rs +++ /dev/null @@ -1,4 +0,0 @@ -mod kusama_cross_chain_transfer; -pub mod kusama_test_net; -mod polkadot_cross_chain_transfer; -pub mod polkadot_test_net; diff --git a/parachain/runtime/runtime-tests/src/relaychain/polkadot_cross_chain_transfer.rs b/parachain/runtime/runtime-tests/src/relaychain/polkadot_cross_chain_transfer.rs deleted file mode 100644 index dc7fd3efe9..0000000000 --- a/parachain/runtime/runtime-tests/src/relaychain/polkadot_cross_chain_transfer.rs +++ /dev/null @@ -1,736 +0,0 @@ -use crate::relaychain::polkadot_test_net::*; -use codec::Encode; -use frame_support::{ - assert_ok, - weights::{Weight as FrameWeight, WeightToFee}, -}; -use orml_traits::MultiCurrency; -use primitives::{ - CurrencyId::{ForeignAsset, Token}, - CustomMetadata, TokenSymbol, -}; -use xcm::latest::{prelude::*, Weight}; -use xcm_builder::ParentIsPreset; -use xcm_emulator::{TestExt, XcmExecutor}; -use xcm_executor::traits::{Convert, WeightBounds}; - -mod hrmp { - use super::*; - - use polkadot_runtime_parachains::hrmp; - fn construct_xcm(call: hrmp::Call, xcm_fee: u128, transact_weight: Weight) -> Xcm<()> { - Xcm(vec![ - WithdrawAsset((Here, xcm_fee).into()), - BuyExecution { - fees: (Here, xcm_fee).into(), - weight_limit: Unlimited, /* Let polkadot weigh the message. Weight will include the - * `transact.require_weight_at_most` */ - }, - Transact { - require_weight_at_most: transact_weight, - origin_kind: OriginKind::Native, - call: polkadot_runtime::RuntimeCall::Hrmp(call).encode().into(), - }, - RefundSurplus, - DepositAsset { - assets: All.into(), - beneficiary: Junction::AccountId32 { id: BOB, network: None }.into(), - }, - ]) - } - - fn has_open_channel_requested_event(sender: u32, recipient: u32) -> bool { - PolkadotNet::execute_with(|| { - polkadot_runtime::System::events().iter().any(|r| { - matches!( - r.event, - polkadot_runtime::RuntimeEvent::Hrmp(hrmp::Event::OpenChannelRequested( - actual_sender, - actual_recipient, - 1000, - 102400 - )) if actual_sender == sender.into() && actual_recipient == recipient.into() - ) - }) - }) - } - - fn has_open_channel_accepted_event(sender: u32, recipient: u32) -> bool { - PolkadotNet::execute_with(|| { - polkadot_runtime::System::events().iter().any(|r| { - matches!( - r.event, - polkadot_runtime::RuntimeEvent::Hrmp(hrmp::Event::OpenChannelAccepted( - actual_sender, - actual_recipient - )) if actual_sender == sender.into() && actual_recipient == recipient.into() - ) - }) - }) - } - - fn init_open_channel(sender: u32, recipient: u32, xcm_fee: u128, transact_weight: Weight) - where - T: TestExt, - { - // do hrmp_init_open_channel - assert!(!has_open_channel_requested_event(sender, recipient)); // just a sanity check - T::execute_with(|| { - let message = construct_xcm( - hrmp::Call::::hrmp_init_open_channel { - recipient: recipient.into(), - proposed_max_capacity: 1000, - proposed_max_message_size: 102400, - }, - xcm_fee, - transact_weight, - ); - assert_ok!(pallet_xcm::Pallet::::send_xcm( - Here, Parent, message - )); - }); - assert!(has_open_channel_requested_event(sender, recipient)); - } - - fn accept_open_channel(sender: u32, recipient: u32, xcm_fee: u128, transact_weight: Weight) - where - T: TestExt, - { - // do hrmp_accept_open_channel - assert!(!has_open_channel_accepted_event(sender, recipient)); // just a sanity check - T::execute_with(|| { - let message = construct_xcm( - hrmp::Call::::hrmp_accept_open_channel { sender: sender.into() }, - xcm_fee, - transact_weight, - ); - assert_ok!(pallet_xcm::Pallet::::send_xcm( - Here, Parent, message - )); - }); - assert!(has_open_channel_accepted_event(sender, recipient)); - } - - #[test] - fn open_hrmp_channel_cheaply() { - // check that 0.25 DOT is enough - let xcm_fee = DOT.one() / 4; - let transact_weight = Weight::from_parts(10_000_000_000, 100_000_000); - let deposit = 2 * (10 * DOT.one() + xcm_fee) + polkadot_runtime::ExistentialDeposit::get(); - open_hrmp_channel(deposit, xcm_fee, transact_weight); - } - - #[test] - fn test_required_transact_weight() { - // actual minimum transact weight at time of writing is < 700_000_000. Use - // 800_000_000 so tests don't break every polkadot upgrade - let xcm_fee = DOT.one() / 5; - let transact_weight = Weight::from_parts(800_000_000, 50_000_000); - let deposit = 2 * (10 * DOT.one() + xcm_fee) + polkadot_runtime::ExistentialDeposit::get(); - open_hrmp_channel(deposit, xcm_fee, transact_weight); - } - - #[test] - fn open_hrmp_channel_with_buffer() { - // the actual values used in production: about twice the minimum amounts - let xcm_fee = DOT.one() / 2; - let transact_weight = Weight::from_parts(10_000_000_000, 100_000_000); - let deposit = 2 * (10 * DOT.one() + xcm_fee) + polkadot_runtime::ExistentialDeposit::get(); - open_hrmp_channel(deposit, xcm_fee, transact_weight); - } - - fn open_hrmp_channel(initial_balance: u128, xcm_fee: u128, transact_weight: Weight) { - let existential_deposit = DOT.one(); - - // setup sovereign account balances - PolkadotNet::execute_with(|| { - assert_ok!(polkadot_runtime::Balances::transfer( - polkadot_runtime::RuntimeOrigin::signed(ALICE.into()), - sp_runtime::MultiAddress::Id(interlay_sovereign_account_on_polkadot()), - initial_balance - )); - assert_ok!(polkadot_runtime::Balances::transfer( - polkadot_runtime::RuntimeOrigin::signed(ALICE.into()), - sp_runtime::MultiAddress::Id(sibling_sovereign_account_on_polkadot()), - initial_balance - )); - assert_ok!(polkadot_runtime::Balances::transfer( - polkadot_runtime::RuntimeOrigin::signed(ALICE.into()), - sp_runtime::MultiAddress::Id(BOB.into()), - existential_deposit - )); - }); - - // open channel interlay -> sibling - init_open_channel::(INTERLAY_PARA_ID, SIBLING_PARA_ID, xcm_fee, transact_weight); - accept_open_channel::(INTERLAY_PARA_ID, SIBLING_PARA_ID, xcm_fee, transact_weight); - - // open channel sibling -> interlay - init_open_channel::(SIBLING_PARA_ID, INTERLAY_PARA_ID, xcm_fee, transact_weight); - accept_open_channel::(SIBLING_PARA_ID, INTERLAY_PARA_ID, xcm_fee, transact_weight); - - // check that Bob received left-over funds (from both Interlay and Sibling). - PolkadotNet::execute_with(|| { - let free_balance = polkadot_runtime::Balances::free_balance(&AccountId::from(BOB)); - assert!(free_balance > existential_deposit); - }); - } -} - -#[test] -fn test_transact_barrier() { - let call = orml_tokens::Call::::transfer_all { - dest: ALICE.into(), - currency_id: Token(DOT), - keep_alive: false, - }; - let message = Xcm(vec![ - WithdrawAsset((Here, 410000000000u128).into()), - BuyExecution { - fees: (Here, 400000000000u128).into(), - weight_limit: Unlimited, - }, - Transact { - require_weight_at_most: Weight::from_parts(10000000000, 0u64), - origin_kind: OriginKind::Native, - call: interlay_runtime_parachain::RuntimeCall::Tokens(call).encode().into(), - }, - RefundSurplus, - DepositAsset { - assets: All.into(), - beneficiary: Junction::AccountId32 { id: BOB, network: None }.into(), - }, - ]); - - PolkadotNet::execute_with(|| { - assert_ok!(pallet_xcm::Pallet::::send_xcm( - Here, - X1(Parachain(2032)), - message - )); - }); - - Interlay::execute_with(|| { - assert!(System::events().iter().any(|r| matches!( - r.event, - RuntimeEvent::DmpQueue(cumulus_pallet_dmp_queue::Event::ExecutedDownward { - outcome: Outcome::Error(XcmError::Barrier), - .. - }) - ))); - }); -} - -#[test] -fn transfer_from_relay_chain() { - PolkadotNet::execute_with(|| { - assert_ok!(polkadot_runtime::XcmPallet::reserve_transfer_assets( - polkadot_runtime::RuntimeOrigin::signed(ALICE.into()), - Box::new(Parachain(INTERLAY_PARA_ID).into_versioned()), - Box::new(Junction::AccountId32 { id: BOB, network: None }.into_versioned()), - Box::new((Here, DOT.one()).into()), - 0 - )); - }); - - Interlay::execute_with(|| { - // use an upperbound rather than an exact value so this check doesn't break at each minor update - let xcm_fee_over_estimation = 20_000_000; - - assert!(Tokens::free_balance(Token(DOT), &AccountId::from(BOB)) > DOT.one() - xcm_fee_over_estimation); - // rest should go to treasury: - assert_eq!( - Tokens::free_balance(Token(DOT), &TreasuryAccount::get()), - DOT.one() - Tokens::free_balance(Token(DOT), &AccountId::from(BOB)) - ); - }); -} - -#[test] -fn transfer_to_relay_chain() { - PolkadotNet::execute_with(|| { - assert_ok!(polkadot_runtime::Balances::transfer( - polkadot_runtime::RuntimeOrigin::signed(ALICE.into()), - sp_runtime::MultiAddress::Id(interlay_sovereign_account_on_polkadot()), - 2 * DOT.one() - )); - }); - - let used_weight = FrameWeight::from_parts(4_000_000_000 as u64, 0u64); // The value used in UI - very conservative: actually used at time of writing = 298_368_000 - - Interlay::execute_with(|| { - assert_ok!(XTokens::transfer( - RuntimeOrigin::signed(ALICE.into()), - Token(DOT), - 2 * DOT.one(), - Box::new(MultiLocation::new(1, X1(Junction::AccountId32 { id: BOB, network: None })).into()), - WeightLimit::Unlimited - )); - }); - - PolkadotNet::execute_with(|| { - let fee = - ::WeightToFee::weight_to_fee(&used_weight); - assert_eq!( - polkadot_runtime::Balances::free_balance(&AccountId::from(BOB)), - 2 * DOT.one() - fee - ); - - // UI uses 482771107 - make sure that that's an overestimation - assert!(fee < 482771107); - }); -} - -/// Send INTR to sibling. On the sibling, it will be registered as a foreign asset. -/// By also transferring it back, we test that the asset-registry has been properly -/// integrated. -#[test] -fn transfer_to_sibling_and_back() { - fn sibling_sovereign_account() -> AccountId { - use sp_runtime::traits::AccountIdConversion; - polkadot_parachain::primitives::Sibling::from(SIBLING_PARA_ID).into_account_truncating() - } - - Sibling::execute_with(|| { - register_intr_as_foreign_asset(); - }); - - Interlay::execute_with(|| { - assert_ok!(Tokens::deposit( - Token(INTR), - &AccountId::from(ALICE), - 100_000_000_000_000 - )); - }); - - Interlay::execute_with(|| { - assert_ok!(XTokens::transfer( - RuntimeOrigin::signed(ALICE.into()), - Token(INTR), - 10_000_000_000_000, - Box::new( - MultiLocation::new( - 1, - X2( - Parachain(SIBLING_PARA_ID), - Junction::AccountId32 { - network: None, - id: BOB.into(), - } - ) - ) - .into() - ), - WeightLimit::Unlimited, - )); - - assert_eq!( - Tokens::free_balance(Token(INTR), &AccountId::from(ALICE)), - 90_000_000_000_000 - ); - - assert_eq!( - Tokens::free_balance(Token(INTR), &sibling_sovereign_account()), - 10_000_000_000_000 - ); - }); - - Sibling::execute_with(|| { - let xcm_fee = 800_000_000; - - // check reception - assert_eq!( - Tokens::free_balance(ForeignAsset(1), &AccountId::from(BOB)), - 10_000_000_000_000 - xcm_fee - ); - - // return some back to interlay - assert_ok!(XTokens::transfer( - RuntimeOrigin::signed(BOB.into()), - ForeignAsset(1), - 5_000_000_000_000, - Box::new( - MultiLocation::new( - 1, - X2( - Parachain(INTERLAY_PARA_ID), - Junction::AccountId32 { - network: None, - id: ALICE.into(), - } - ) - ) - .into() - ), - WeightLimit::Unlimited, - )); - }); - - // check reception - Interlay::execute_with(|| { - let used_weight = 800_000_000; // empirically determined in test - weight is decreased in AllowTopLevelPaidExecutionFrom - let intr_per_second = interlay_runtime_parachain::xcm_config::CanonicalizedIntrPerSecond::get().1; - let xcm_fee = (intr_per_second * used_weight) / WEIGHT_REF_TIME_PER_SECOND as u128; - - assert_eq!( - Tokens::free_balance(Token(INTR), &AccountId::from(ALICE)), - 95_000_000_000_000 - xcm_fee - ); - - assert_eq!(Tokens::free_balance(Token(INTR), &TreasuryAccount::get()), xcm_fee); - - assert_eq!( - Tokens::free_balance(Token(INTR), &sibling_sovereign_account()), - 5_000_000_000_000 - ); - }); -} - -#[test] -fn xcm_transfer_execution_barrier_trader_works() { - fn construct_xcm(amount: u128, limit: WeightLimit) -> Xcm { - Xcm(vec![ - ReserveAssetDeposited((Parent, amount).into()), - BuyExecution { - fees: (Parent, amount).into(), - weight_limit: limit, - }, - DepositAsset { - assets: All.into(), - beneficiary: Here.into(), - }, - ]) - } - - let expect_weight_limit = ::Weigher::weight( - &mut construct_xcm(100, Unlimited)).unwrap(); - let weight_limit_too_low = Weight::from_parts(500_000_000, 0u64); - let unit_instruction_weight = Weight::from_parts(200_000_000, 0u64); - let minimum_fee = (interlay_runtime_parachain::xcm_config::DotPerSecond::get().1 - * expect_weight_limit.ref_time() as u128) - / WEIGHT_REF_TIME_PER_SECOND as u128; - - // relay-chain use normal account to send xcm, destination parachain can't pass Barrier check - let message = construct_xcm(100, Unlimited); - PolkadotNet::execute_with(|| { - // Polkadot effectively disabled the `send` extrinsic in 0.9.19, so use send_xcm - assert_ok!(pallet_xcm::Pallet::::send_xcm( - X1(Junction::AccountId32 { - network: None, - id: ALICE.into(), - }), - Parachain(INTERLAY_PARA_ID), - message - )); - }); - Interlay::execute_with(|| { - assert!(System::events().iter().any(|r| matches!( - r.event, - RuntimeEvent::DmpQueue(cumulus_pallet_dmp_queue::Event::ExecutedDownward { - outcome: Outcome::Error(XcmError::Barrier), - .. - }) - ))); - }); - - // AllowTopLevelPaidExecutionFrom barrier test case: - // para-chain use XcmExecutor `execute_xcm()` method to execute xcm. - // if `weight_limit` in BuyExecution is less than `xcm_weight(max_weight)`, then Barrier can't pass. - // other situation when `weight_limit` is `Unlimited` or large than `xcm_weight`, then it's ok. - let message = construct_xcm(100, Limited(weight_limit_too_low)); - Interlay::execute_with(|| { - let hash = message.using_encoded(sp_io::hashing::blake2_256); - let r = XcmExecutor::::execute_xcm(Parent, message, hash, expect_weight_limit); - assert_eq!(r, Outcome::Error(XcmError::Barrier)); - }); - - // trader inside BuyExecution have TooExpensive error if payment less than calculated weight amount. - // the minimum of calculated weight amount(`FixedRateOfFungible`) is 96_000_000 - - let message = construct_xcm(minimum_fee - 1, Limited(expect_weight_limit)); - Interlay::execute_with(|| { - let hash = message.using_encoded(sp_io::hashing::blake2_256); - let r = XcmExecutor::::execute_xcm(Parent, message, hash, expect_weight_limit); - assert_eq!( - r, - Outcome::Incomplete(expect_weight_limit - unit_instruction_weight, XcmError::TooExpensive) - ); - }); - - // all situation fulfilled, execute success - let message = construct_xcm(minimum_fee, Limited(expect_weight_limit)); - Interlay::execute_with(|| { - let hash = message.using_encoded(sp_io::hashing::blake2_256); - let r = XcmExecutor::::execute_xcm(Parent, message, hash, expect_weight_limit); - assert_eq!(r, Outcome::Complete(expect_weight_limit)); - }); -} - -#[test] -fn subscribe_version_notify_works() { - // relay chain subscribe version notify of para chain - PolkadotNet::execute_with(|| { - let r = pallet_xcm::Pallet::::force_subscribe_version_notify( - polkadot_runtime::RuntimeOrigin::root(), - Box::new(Parachain(INTERLAY_PARA_ID).into_versioned()), - ); - assert_ok!(r); - }); - PolkadotNet::execute_with(|| { - polkadot_runtime::System::assert_has_event(polkadot_runtime::RuntimeEvent::XcmPallet( - pallet_xcm::Event::SupportedVersionChanged( - MultiLocation { - parents: 0, - interior: X1(Parachain(INTERLAY_PARA_ID)), - }, - 3, - ), - )); - }); - - // para chain subscribe version notify of relay chain - Interlay::execute_with(|| { - let r = pallet_xcm::Pallet::::force_subscribe_version_notify( - RuntimeOrigin::root(), - Box::new(Parent.into()), - ); - assert_ok!(r); - }); - Interlay::execute_with(|| { - System::assert_has_event(interlay_runtime_parachain::RuntimeEvent::PolkadotXcm( - pallet_xcm::Event::SupportedVersionChanged( - MultiLocation { - parents: 1, - interior: Here, - }, - 3, - ), - )); - }); - - // para chain subscribe version notify of sibling chain - Interlay::execute_with(|| { - let r = pallet_xcm::Pallet::::force_subscribe_version_notify( - RuntimeOrigin::root(), - Box::new((Parent, Parachain(SIBLING_PARA_ID)).into()), - ); - assert_ok!(r); - }); - Interlay::execute_with(|| { - assert!(interlay_runtime_parachain::System::events().iter().any(|r| matches!( - r.event, - interlay_runtime_parachain::RuntimeEvent::XcmpQueue(cumulus_pallet_xcmp_queue::Event::XcmpMessageSent { - message_hash: Some(_) - }) - ))); - }); - Sibling::execute_with(|| { - assert!(interlay_runtime_parachain::System::events().iter().any(|r| matches!( - r.event, - interlay_runtime_parachain::RuntimeEvent::XcmpQueue(cumulus_pallet_xcmp_queue::Event::XcmpMessageSent { - message_hash: Some(_) - }) | interlay_runtime_parachain::RuntimeEvent::XcmpQueue(cumulus_pallet_xcmp_queue::Event::Success { - message_hash: Some(_), - weight: _ - }) - ))); - }); -} - -fn weigh_xcm(mut message: Xcm, fee_per_second: u128) -> u128 { - let trapped_xcm_message_weight = ::Weigher::weight( - &mut message).unwrap(); - (fee_per_second * trapped_xcm_message_weight.ref_time() as u128) / WEIGHT_REF_TIME_PER_SECOND as u128 -} - -fn general_key_of(token_symbol: TokenSymbol) -> Junction { - let id = Token(token_symbol); - let encoded = id.encode(); - let mut data = [0u8; 32]; - if encoded.len() > 32 { - // we are not returning result, so panic is inevitable. Let's make it explicit. - panic!("Currency ID was too long to be encoded"); - } - data[..encoded.len()].copy_from_slice(&encoded[..]); - GeneralKey { - length: encoded.len() as u8, - data, - } -} - -#[test] -fn trap_assets_works() { - let mut intr_treasury_amount = 0; - let (ksm_asset_amount, intr_asset_amount) = (10 * DOT.one(), 10 * INTR.one()); - - let parent_account: AccountId = ParentIsPreset::::convert(Parent.into()).unwrap(); - - Interlay::execute_with(|| { - assert_ok!(Tokens::deposit(Token(DOT), &parent_account, 100 * DOT.one())); - assert_ok!(Tokens::deposit(Token(INTR), &parent_account, 100 * INTR.one())); - - intr_treasury_amount = Tokens::free_balance(Token(INTR), &TreasuryAccount::get()); - }); - - let assets: MultiAsset = (Parent, ksm_asset_amount).into(); - - fn construct_xcm(assets: MultiAsset, intr_asset_amount: Balance) -> Xcm { - Xcm(vec![ - WithdrawAsset(assets.clone().into()), - BuyExecution { - fees: assets, - weight_limit: Limited(Weight::from_parts(DOT.one() as u64, 0u64)), - }, - WithdrawAsset( - ( - (Parent, X2(Parachain(INTERLAY_PARA_ID), general_key_of(INTR))), - intr_asset_amount, - ) - .into(), - ), - ]) - } - - let trapped_xcm_message_fee = weigh_xcm( - construct_xcm(assets.clone(), intr_asset_amount), - interlay_runtime_parachain::xcm_config::DotPerSecond::get().1, - ); - - // Withdraw intr and ksm on interlay but don't deposit it - PolkadotNet::execute_with(|| { - assert_ok!(pallet_xcm::Pallet::::send_xcm( - Here, - Parachain(INTERLAY_PARA_ID), - construct_xcm(assets.clone(), intr_asset_amount), - )); - }); - - let mut trapped_assets: Option = None; - // verify that the assets got trapped (i.e. didn't get burned) - Interlay::execute_with(|| { - assert!(System::events().iter().any(|r| matches!( - r.event, - RuntimeEvent::PolkadotXcm(pallet_xcm::Event::AssetsTrapped(_, _, _)) - ))); - - let event = System::events() - .iter() - .find(|r| { - matches!( - r.event, - RuntimeEvent::PolkadotXcm(pallet_xcm::Event::AssetsTrapped(_, _, _)) - ) - }) - .cloned() - .unwrap(); - - use std::convert::TryFrom; - use xcm::VersionedMultiAssets; - trapped_assets = match event.event { - RuntimeEvent::PolkadotXcm(pallet_xcm::Event::AssetsTrapped(_, _, ticket)) => { - Some(TryFrom::::try_from(ticket).unwrap()) - } - _ => panic!("event not found"), - }; - - // unchanged treasury amounts - assert_eq!( - trapped_xcm_message_fee, - Tokens::free_balance(Token(DOT), &TreasuryAccount::get()) - ); - assert_eq!( - intr_treasury_amount, - Tokens::free_balance(Token(INTR), &TreasuryAccount::get()) - ); - }); - - let trapped_intr_amount = trapped_assets - .clone() - .unwrap() - .into_inner() - .into_iter() - .find_map(|x| match x { - MultiAsset { - id: AssetId::Concrete(location), - fun: Fungibility::Fungible(amount), - } if location == (Parent, X2(Parachain(INTERLAY_PARA_ID), general_key_of(INTR))).into() => Some(amount), - _ => None, - }) - .unwrap(); - - let trapped_dot_amount = trapped_assets - .clone() - .unwrap() - .into_inner() - .into_iter() - .find_map(|x| match x { - MultiAsset { - id: AssetId::Concrete(location), - fun: Fungibility::Fungible(amount), - } if location == Parent.into() => Some(amount), - _ => None, - }) - .unwrap(); - - fn construct_reclaiming_xcm(trapped_assets: Option, intr_asset_amount: Balance) -> Xcm { - Xcm(vec![ - ClaimAsset { - assets: trapped_assets.unwrap(), - ticket: Here.into(), - }, - BuyExecution { - fees: ( - (Parent, X2(Parachain(INTERLAY_PARA_ID), general_key_of(INTR))), - intr_asset_amount / 4, - ) - .into(), - weight_limit: Limited(Weight::from_parts(4_000_000_000_000, 0u64)), - }, - DepositAsset { - assets: All.into(), - beneficiary: Junction::AccountId32 { id: BOB, network: None }.into(), - }, - ]) - } - - // Now reclaim trapped assets - PolkadotNet::execute_with(|| { - assert_ok!(pallet_xcm::Pallet::::send_xcm( - Here, - Parachain(INTERLAY_PARA_ID), - construct_reclaiming_xcm(trapped_assets.clone(), intr_asset_amount), - )); - }); - - // verify that assets were claimed successfully (deposited into Bob's account) - Interlay::execute_with(|| { - let reclaim_xcm_fee = weigh_xcm( - construct_reclaiming_xcm(trapped_assets, intr_asset_amount), - interlay_runtime_parachain::xcm_config::IntrPerSecond::get().1, - ); - assert_eq!( - Tokens::free_balance(Token(INTR), &AccountId::from(BOB)), - trapped_intr_amount - reclaim_xcm_fee - ); - assert!(trapped_dot_amount > 0); - assert_eq!( - Tokens::free_balance(Token(DOT), &AccountId::from(BOB)), - trapped_dot_amount - ); - }); -} - -fn register_intr_as_foreign_asset() { - let metadata = AssetMetadata { - decimals: 12, - name: "Interlay native".as_bytes().to_vec(), - symbol: "extINTR".as_bytes().to_vec(), - existential_deposit: 0, - location: Some(MultiLocation::new(1, X2(Parachain(INTERLAY_PARA_ID), general_key_of(INTR))).into()), - additional: CustomMetadata { - fee_per_second: 1_000_000_000_000, - coingecko_id: "interlay".as_bytes().to_vec(), - }, - }; - AssetRegistry::register_asset(RuntimeOrigin::root(), metadata, None).unwrap(); -} diff --git a/parachain/runtime/runtime-tests/src/relaychain/polkadot_test_net.rs b/parachain/runtime/runtime-tests/src/relaychain/polkadot_test_net.rs deleted file mode 100644 index 5dc47c6831..0000000000 --- a/parachain/runtime/runtime-tests/src/relaychain/polkadot_test_net.rs +++ /dev/null @@ -1,245 +0,0 @@ -use cumulus_primitives_core::MultiLocation; -use frame_support::traits::GenesisBuild; -pub use interlay_runtime_parachain::{xcm_config::*, *}; -use polkadot_primitives::v4::{BlockNumber, MAX_CODE_SIZE, MAX_POV_SIZE}; -use polkadot_runtime_parachains::{configuration::HostConfiguration, paras::ParaKind}; -pub use primitives::{ - CurrencyId::Token, - TokenSymbol::{DOT, INTR}, -}; -use sp_runtime::traits::AccountIdConversion; -use xcm_emulator::{decl_test_network, decl_test_parachain, decl_test_relay_chain}; - -pub const INTERLAY_PARA_ID: u32 = 2032; -pub const SIBLING_PARA_ID: u32 = 2001; - -decl_test_relay_chain! { - pub struct PolkadotNet { - Runtime = polkadot_runtime::Runtime, - XcmConfig = polkadot_runtime::xcm_config::XcmConfig, - new_ext = polkadot_ext(), - } -} - -decl_test_parachain! { - pub struct Interlay { - Runtime = Runtime, - RuntimeOrigin = RuntimeOrigin, - XcmpMessageHandler = interlay_runtime_parachain::XcmpQueue, - DmpMessageHandler = interlay_runtime_parachain::DmpQueue, - new_ext = para_ext(INTERLAY_PARA_ID), - } -} - -decl_test_parachain! { - pub struct Sibling { - Runtime = interlay_runtime_parachain::Runtime, - RuntimeOrigin = interlay_runtime_parachain::RuntimeOrigin, - XcmpMessageHandler = interlay_runtime_parachain::XcmpQueue, - DmpMessageHandler = interlay_runtime_parachain::DmpQueue, - new_ext = para_ext(SIBLING_PARA_ID), - } -} - -// note: can't use SIBLING_PARA_ID and INTERLAY_PARA_ID in this macro - we are forced to use raw numbers -decl_test_network! { - pub struct TestNet { - relay_chain = PolkadotNet, - parachains = vec![ - (2032, Interlay), - (2001, Sibling), - ], - } -} - -fn default_parachains_host_configuration() -> HostConfiguration { - HostConfiguration { - max_code_size: MAX_CODE_SIZE, - max_pov_size: MAX_POV_SIZE, - max_head_data_size: 20_480, - max_upward_queue_count: 10, - max_upward_queue_size: 51_200, - max_upward_message_size: 51_200, - max_upward_message_num_per_candidate: 10, - hrmp_max_message_num_per_candidate: 10, - validation_upgrade_cooldown: 14_400, - validation_upgrade_delay: 600, - max_downward_message_size: 51_200, - ump_service_total_weight: Weight::from_parts(100_000_000_000 as u64, 0u64), - hrmp_max_parachain_outbound_channels: 10, - hrmp_max_parathread_outbound_channels: 0, - hrmp_sender_deposit: 100_000_000_000, - hrmp_recipient_deposit: 100_000_000_000, - hrmp_channel_max_capacity: 1_000, - hrmp_channel_max_total_size: 102_400, - hrmp_max_parachain_inbound_channels: 10, - hrmp_max_parathread_inbound_channels: 0, - hrmp_channel_max_message_size: 102_400, - code_retention_period: 14_400, - parathread_cores: 0, - parathread_retries: 0, - group_rotation_frequency: 10, - chain_availability_period: 10, - thread_availability_period: 10, - scheduling_lookahead: 1, - max_validators_per_core: Some(5), - max_validators: Some(200), - dispute_period: 6, - dispute_post_conclusion_acceptance_period: 600, - no_show_slots: 2, - n_delay_tranches: 89, - zeroth_delay_tranche_width: 0, - needed_approvals: 30, - relay_vrf_modulo_samples: 40, - ump_max_individual_weight: Weight::from_parts(20_000_000_000 as u64, 0u64), - pvf_checking_enabled: false, - pvf_voting_ttl: 2, - minimum_validation_upgrade_delay: 20, - ..Default::default() - } -} - -pub fn polkadot_ext() -> sp_io::TestExternalities { - use polkadot_parachain::primitives::{HeadData, ValidationCode}; - use polkadot_runtime::{Runtime, System}; - - let mut t = frame_system::GenesisConfig::default() - .build_storage::() - .unwrap(); - - pallet_balances::GenesisConfig:: { - balances: vec![(AccountId::from(ALICE), 100_000_000 * DOT.one())], - } - .assimilate_storage(&mut t) - .unwrap(); - - // register a parachain so that we can test opening hrmp channel - let fake_para = polkadot_runtime_parachains::paras::ParaGenesisArgs { - genesis_head: HeadData(vec![]), - para_kind: ParaKind::Parachain, - validation_code: ValidationCode(vec![0]), - }; - >::assimilate_storage( - &polkadot_runtime_parachains::paras::GenesisConfig { - paras: vec![ - (INTERLAY_PARA_ID.into(), fake_para.clone()), - (SIBLING_PARA_ID.into(), fake_para.clone()), - ], - }, - &mut t, - ) - .unwrap(); - - polkadot_runtime_parachains::configuration::GenesisConfig:: { - config: default_parachains_host_configuration(), - } - .assimilate_storage(&mut t) - .unwrap(); - - >::assimilate_storage( - &pallet_xcm::GenesisConfig { - safe_xcm_version: Some(3), - }, - &mut t, - ) - .unwrap(); - - let mut ext = sp_io::TestExternalities::new(t); - ext.execute_with(|| System::set_block_number(1)); - ext -} - -pub fn para_ext(parachain_id: u32) -> sp_io::TestExternalities { - ExtBuilder::default() - .balances(vec![(AccountId::from(ALICE), Token(DOT), 10 * DOT.one())]) - .parachain_id(parachain_id) - .build() -} - -#[allow(dead_code)] -pub const DEFAULT: [u8; 32] = [0u8; 32]; -#[allow(dead_code)] -pub const ALICE: [u8; 32] = [4u8; 32]; -#[allow(dead_code)] -pub const BOB: [u8; 32] = [5u8; 32]; - -pub struct ExtBuilder { - balances: Vec<(AccountId, CurrencyId, Balance)>, - parachain_id: u32, -} - -impl Default for ExtBuilder { - fn default() -> Self { - Self { - balances: vec![], - parachain_id: 2000, - } - } -} - -impl ExtBuilder { - pub fn balances(mut self, balances: Vec<(AccountId, CurrencyId, Balance)>) -> Self { - self.balances = balances; - self - } - - #[allow(dead_code)] - pub fn parachain_id(mut self, parachain_id: u32) -> Self { - self.parachain_id = parachain_id; - self - } - - pub fn build(self) -> sp_io::TestExternalities { - let mut t = frame_system::GenesisConfig::default() - .build_storage::() - .unwrap(); - - let native_currency_id = GetNativeCurrencyId::get(); - - orml_tokens::GenesisConfig:: { - balances: self - .balances - .into_iter() - .filter(|(_, currency_id, _)| *currency_id != native_currency_id) - .collect::>(), - } - .assimilate_storage(&mut t) - .unwrap(); - - >::assimilate_storage( - ¶chain_info::GenesisConfig { - parachain_id: self.parachain_id.into(), - }, - &mut t, - ) - .unwrap(); - - >::assimilate_storage( - &pallet_xcm::GenesisConfig { - safe_xcm_version: Some(2), - }, - &mut t, - ) - .unwrap(); - - let mut ext = sp_io::TestExternalities::new(t); - ext.execute_with(|| { - System::set_block_number(1); - PolkadotXcm::force_xcm_version( - interlay_runtime_parachain::RuntimeOrigin::root(), - Box::new(MultiLocation::parent()), - 3, - ) - .unwrap(); - }); - ext - } -} - -pub(crate) fn interlay_sovereign_account_on_polkadot() -> AccountId { - polkadot_parachain::primitives::Id::from(INTERLAY_PARA_ID).into_account_truncating() -} - -pub(crate) fn sibling_sovereign_account_on_polkadot() -> AccountId { - polkadot_parachain::primitives::Id::from(SIBLING_PARA_ID).into_account_truncating() -} diff --git a/parachain/runtime/runtime-tests/src/setup.rs b/parachain/runtime/runtime-tests/src/setup.rs index 018643e590..aecb9308bd 100644 --- a/parachain/runtime/runtime-tests/src/setup.rs +++ b/parachain/runtime/runtime-tests/src/setup.rs @@ -1,7 +1,6 @@ pub use crate::utils::*; use bitcoin::merkle::PartialTransactionProof; pub use codec::Encode; -use frame_support::traits::GenesisBuild; pub use frame_support::{assert_noop, assert_ok, traits::Currency, BoundedVec}; pub use frame_system::RawOrigin; pub use orml_traits::{location::RelativeLocations, Change, GetByKey, MultiCurrency}; @@ -12,7 +11,6 @@ pub use sp_runtime::{ AccountId32, DispatchError, DispatchResult, FixedPointNumber, MultiAddress, Perbill, Permill, }; pub use xcm::latest::prelude::*; -pub use xcm_emulator::XcmExecutor; #[cfg(not(feature = "with-interlay-runtime"))] pub use kintsugi_imports::*; @@ -63,8 +61,8 @@ pub struct ExtBuilder { impl ExtBuilder { pub fn build() -> Self { - let mut storage = frame_system::GenesisConfig::default() - .build_storage::() + let mut storage = frame_system::GenesisConfig::::default() + .build_storage() .unwrap(); let balances = vec![ @@ -180,6 +178,14 @@ impl ExtBuilder { .assimilate_storage(&mut storage) .unwrap(); + loans::GenesisConfig:: { + max_exchange_rate: Rate::from_inner(DEFAULT_MAX_EXCHANGE_RATE), + min_exchange_rate: Rate::from_inner(DEFAULT_MIN_EXCHANGE_RATE), + _marker: Default::default(), + } + .assimilate_storage(&mut storage) + .unwrap(); + supply::GenesisConfig:: { initial_supply: token_distribution::INITIAL_ALLOCATION, start_height: YEARS * 5, @@ -187,22 +193,11 @@ impl ExtBuilder { } .assimilate_storage(&mut storage) .unwrap(); - - GenesisBuild::::assimilate_storage( - &loans::GenesisConfig { - max_exchange_rate: Rate::from_inner(DEFAULT_MAX_EXCHANGE_RATE), - min_exchange_rate: Rate::from_inner(DEFAULT_MIN_EXCHANGE_RATE), - }, - &mut storage, - ) - .unwrap(); - - >::assimilate_storage( - &pallet_xcm::GenesisConfig { - safe_xcm_version: Some(2), - }, - &mut storage, - ) + pallet_xcm::GenesisConfig:: { + safe_xcm_version: Some(2), + _config: Default::default(), + } + .assimilate_storage(&mut storage) .unwrap(); Self { diff --git a/parachain/src/chain_spec/interlay.rs b/parachain/src/chain_spec/interlay.rs index 827bf39191..88dda47848 100644 --- a/parachain/src/chain_spec/interlay.rs +++ b/parachain/src/chain_spec/interlay.rs @@ -3,7 +3,7 @@ use super::*; pub const PARA_ID: u32 = 2032; /// Specialized `ChainSpec` for the interlay parachain runtime. -pub type InterlayChainSpec = sc_service::GenericChainSpec; +pub type InterlayChainSpec = sc_service::GenericChainSpec; /// Specialized `ChainSpec` for interlay development. pub type InterlayDevChainSpec = sc_service::GenericChainSpec; @@ -12,7 +12,7 @@ pub type InterlayDevChainSpec = sc_service::GenericChainSpec interlay_runtime::GenesisConfig { +) -> interlay_runtime::RuntimeGenesisConfig { let chain_id: u32 = id.into(); endowed_accounts.extend( endowed_evm_accounts .into_iter() .map(|addr| interlay_runtime::evm::AccountConverter::into_account_id(H160::from(addr))), ); - interlay_runtime::GenesisConfig { + interlay_runtime::RuntimeGenesisConfig { system: interlay_runtime::SystemConfig { + _config: Default::default(), code: interlay_runtime::WASM_BINARY .expect("WASM binary was not build, please build it!") .to_vec(), }, parachain_system: Default::default(), - parachain_info: interlay_runtime::ParachainInfoConfig { parachain_id: id }, + parachain_info: interlay_runtime::ParachainInfoConfig { + _config: Default::default(), + parachain_id: id, + }, collator_selection: interlay_runtime::CollatorSelectionConfig { invulnerables: invulnerables.iter().cloned().map(|(acc, _)| acc).collect(), candidacy_bond: Zero::zero(), @@ -262,6 +266,7 @@ pub fn interlay_genesis( replace_griefing_collateral: FixedU128::checked_from_rational(1, 10).unwrap(), // 10% }, nomination: interlay_runtime::NominationConfig { + _marker: Default::default(), is_nomination_enabled: false, }, technical_committee: Default::default(), @@ -274,16 +279,19 @@ pub fn interlay_genesis( inflation: FixedU128::checked_from_rational(2, 100).unwrap(), // 2% }, polkadot_xcm: interlay_runtime::PolkadotXcmConfig { + _config: Default::default(), safe_xcm_version: Some(3), }, sudo: interlay_runtime::SudoConfig { key: root_key }, loans: interlay_runtime::LoansConfig { + _marker: Default::default(), max_exchange_rate: Rate::from_inner(loans::DEFAULT_MAX_EXCHANGE_RATE), min_exchange_rate: Rate::from_inner(loans::DEFAULT_MIN_EXCHANGE_RATE), }, base_fee: Default::default(), ethereum: Default::default(), - evm: kintsugi_runtime::EVMConfig { + evm: interlay_runtime::EVMConfig { + _marker: Default::default(), // we need _some_ code inserted at the precompile address so that // the evm will actually call the address. accounts: interlay_runtime::evm::Precompiles::used_addresses() @@ -301,7 +309,8 @@ pub fn interlay_genesis( }) .collect(), }, - evm_chain_id: kintsugi_runtime::EVMChainIdConfig { + evm_chain_id: interlay_runtime::EVMChainIdConfig { + _marker: Default::default(), chain_id: chain_id.into(), }, } diff --git a/parachain/src/chain_spec/kintsugi.rs b/parachain/src/chain_spec/kintsugi.rs index 822389f282..9c467e5e15 100644 --- a/parachain/src/chain_spec/kintsugi.rs +++ b/parachain/src/chain_spec/kintsugi.rs @@ -3,7 +3,7 @@ use super::*; pub const PARA_ID: u32 = 2092; /// Specialized `ChainSpec` for the kintsugi parachain runtime. -pub type KintsugiChainSpec = sc_service::GenericChainSpec; +pub type KintsugiChainSpec = sc_service::GenericChainSpec; /// Specialized `ChainSpec` for kintsugi development. pub type KintsugiDevChainSpec = sc_service::GenericChainSpec; @@ -12,7 +12,7 @@ pub type KintsugiDevChainSpec = sc_service::GenericChainSpec kintsugi_runtime::GenesisConfig { +) -> kintsugi_runtime::RuntimeGenesisConfig { let chain_id: u32 = id.into(); endowed_accounts.extend( endowed_evm_accounts .into_iter() .map(|addr| kintsugi_runtime::evm::AccountConverter::into_account_id(H160::from(addr))), ); - kintsugi_runtime::GenesisConfig { + kintsugi_runtime::RuntimeGenesisConfig { system: kintsugi_runtime::SystemConfig { + _config: Default::default(), code: kintsugi_runtime::WASM_BINARY .expect("WASM binary was not build, please build it!") .to_vec(), }, parachain_system: Default::default(), - parachain_info: kintsugi_runtime::ParachainInfoConfig { parachain_id: id }, + parachain_info: kintsugi_runtime::ParachainInfoConfig { + _config: Default::default(), + parachain_id: id, + }, collator_selection: kintsugi_runtime::CollatorSelectionConfig { invulnerables: invulnerables.iter().cloned().map(|(acc, _)| acc).collect(), candidacy_bond: Zero::zero(), @@ -294,6 +298,7 @@ pub fn kintsugi_genesis( replace_griefing_collateral: FixedU128::checked_from_rational(1, 10).unwrap(), // 10% }, nomination: kintsugi_runtime::NominationConfig { + _marker: Default::default(), is_nomination_enabled: false, }, technical_committee: Default::default(), @@ -306,16 +311,19 @@ pub fn kintsugi_genesis( inflation: FixedU128::checked_from_rational(2, 100).unwrap(), // 2% }, polkadot_xcm: kintsugi_runtime::PolkadotXcmConfig { + _config: Default::default(), safe_xcm_version: Some(3), }, sudo: kintsugi_runtime::SudoConfig { key: root_key }, loans: kintsugi_runtime::LoansConfig { + _marker: Default::default(), max_exchange_rate: Rate::from_inner(loans::DEFAULT_MAX_EXCHANGE_RATE), min_exchange_rate: Rate::from_inner(loans::DEFAULT_MIN_EXCHANGE_RATE), }, base_fee: Default::default(), ethereum: Default::default(), evm: kintsugi_runtime::EVMConfig { + _marker: Default::default(), // we need _some_ code inserted at the precompile address so that // the evm will actually call the address. accounts: kintsugi_runtime::evm::Precompiles::used_addresses() @@ -334,6 +342,7 @@ pub fn kintsugi_genesis( .collect(), }, evm_chain_id: kintsugi_runtime::EVMChainIdConfig { + _marker: Default::default(), chain_id: chain_id.into(), }, } diff --git a/parachain/src/cli.rs b/parachain/src/cli.rs index f6aaad6011..58c5ab078e 100644 --- a/parachain/src/cli.rs +++ b/parachain/src/cli.rs @@ -122,11 +122,11 @@ impl RelayChainCli { ) -> Self { let extension = chain_spec::Extensions::try_get(&*para_config.chain_spec); let chain_id = extension.map(|e| e.relay_chain.clone()); - let base_path = para_config.base_path.as_ref().map(|x| x.path().join("polkadot")); + let base_path = para_config.base_path.path().join("polkadot"); Self { - base_path, + base_path: Some(base_path), chain_id, - base: polkadot_cli::RunCmd::parse_from(relay_chain_args), + base: clap::Parser::parse_from(relay_chain_args), } } } diff --git a/parachain/src/command.rs b/parachain/src/command.rs index e3aa51ec4e..f65cc7e8c3 100644 --- a/parachain/src/command.rs +++ b/parachain/src/command.rs @@ -25,15 +25,16 @@ use log::info; use primitives::Block; use sc_cli::{ ChainSpec, CliConfiguration, DefaultConfigurationValues, ImportParams, KeystoreParams, NetworkParams, Result, - RuntimeVersion, SharedParams, SubstrateCli, + SharedParams, SubstrateCli, }; +use sc_executor::{sp_wasm_interface::ExtendedHostFunctions, NativeExecutionDispatch}; use sc_service::{ config::{BasePath, PrometheusConfig}, Configuration, TaskManager, }; use sp_core::hexdisplay::HexDisplay; use sp_runtime::traits::AccountIdConversion; -use std::{io::Write, net::SocketAddr, path::PathBuf}; +use std::{io::Write, path::PathBuf}; #[cfg(feature = "runtime-benchmarks")] use crate::benchmarking::*; @@ -156,16 +157,6 @@ impl SubstrateCli for Cli { fn load_spec(&self, id: &str) -> std::result::Result, String> { load_spec(id, self.instant_seal) } - - fn native_runtime_version(chain_spec: &Box) -> &'static RuntimeVersion { - if chain_spec.is_interlay() { - &interlay_runtime::VERSION - } else if chain_spec.is_kintsugi() { - &kintsugi_runtime::VERSION - } else { - panic!("Chain should be either kintsugi or interlay"); - } - } } impl SubstrateCli for RelayChainCli { @@ -202,10 +193,6 @@ impl SubstrateCli for RelayChainCli { fn load_spec(&self, id: &str) -> std::result::Result, String> { polkadot_cli::Cli::from_iter([RelayChainCli::executable_name().to_string()].iter()).load_spec(id) } - - fn native_runtime_version(chain_spec: &Box) -> &'static RuntimeVersion { - polkadot_cli::Cli::native_runtime_version(chain_spec) - } } fn write_to_file_or_stdout(raw: bool, output: &Option, raw_bytes: Vec) -> Result<()> { @@ -319,9 +306,19 @@ pub fn run() -> Result<()> { BenchmarkCmd::Pallet(cmd) => { if cfg!(feature = "runtime-benchmarks") { if runner.config().chain_spec.is_interlay() { - runner.sync_run(|config| cmd.run::(config)) + runner.sync_run(|config| { + cmd.run::::ExtendHostFunctions, + >>(config) + }) } else if runner.config().chain_spec.is_kintsugi() { - runner.sync_run(|config| cmd.run::(config)) + runner.sync_run(|config| { + cmd.run::::ExtendHostFunctions, + >>(config) + }) } else { Err("Chain doesn't support benchmarking".into()) } @@ -406,10 +403,9 @@ pub fn run() -> Result<()> { let chain_spec = &runner.config().chain_spec; with_runtime_or_err!(chain_spec, { - return runner.sync_run(|_config| { - let spec = cli.load_spec(&cmd.shared_params.chain.clone().unwrap_or_default())?; - let state_version = Cli::native_runtime_version(&spec).state_version(); - cmd.run::(&*spec, state_version) + return runner.sync_run(|config| { + let partials = new_partial::(&config, &cli.eth, false)?; + cmd.run::(&*config.chain_spec, &*partials.client) }); }) } @@ -437,7 +433,6 @@ pub fn run() -> Result<()> { } #[cfg(feature = "try-runtime")] Some(Subcommand::TryRuntime(cmd)) => { - use sc_executor::{sp_wasm_interface::ExtendedHostFunctions, NativeExecutionDispatch}; use try_runtime_cli::block_building_info::timestamp_with_aura_info; let runner = cli.create_runner(cmd)?; let chain_spec = &runner.config().chain_spec; @@ -504,7 +499,7 @@ async fn start_node(cli: Cli, config: Configuration) -> sc_service::error::Resul let id = ParaId::from(para_id.unwrap_or(DEFAULT_PARA_ID)); - let parachain_account = AccountIdConversion::::into_account_truncating(&id); + let parachain_account = AccountIdConversion::::into_account_truncating(&id); let tokio_handle = config.tokio_handle.clone(); let polkadot_config = SubstrateCli::create_configuration(&polkadot_cli, &polkadot_cli, tokio_handle) @@ -540,14 +535,6 @@ impl DefaultConfigurationValues for RelayChainCli { 30334 } - fn rpc_ws_listen_port() -> u16 { - 9945 - } - - fn rpc_http_listen_port() -> u16 { - 9934 - } - fn prometheus_listen_port() -> u16 { 9616 } @@ -577,18 +564,6 @@ impl CliConfiguration for RelayChainCli { .or_else(|| self.base_path.clone().map(Into::into))) } - fn rpc_http(&self, default_listen_port: u16) -> Result> { - self.base.base.rpc_http(default_listen_port) - } - - fn rpc_ipc(&self) -> Result> { - self.base.base.rpc_ipc() - } - - fn rpc_ws(&self, default_listen_port: u16) -> Result> { - self.base.base.rpc_ws(default_listen_port) - } - fn prometheus_config( &self, default_listen_port: u16, @@ -632,10 +607,6 @@ impl CliConfiguration for RelayChainCli { self.base.base.rpc_methods() } - fn rpc_ws_max_connections(&self) -> Result> { - self.base.base.rpc_ws_max_connections() - } - fn rpc_cors(&self, is_dev: bool) -> Result>> { self.base.base.rpc_cors(is_dev) } diff --git a/parachain/src/eth.rs b/parachain/src/eth.rs index e80159bd39..27d6f4081c 100644 --- a/parachain/src/eth.rs +++ b/parachain/src/eth.rs @@ -8,7 +8,7 @@ use primitives::Block; use sc_client_api::{BlockchainEvents, StateBackendFor}; use sc_executor::NativeExecutionDispatch; use sc_network_sync::SyncingService; -use sc_service::{error::Error as ServiceError, BasePath, Configuration, TaskManager}; +use sc_service::{error::Error as ServiceError, Configuration, TaskManager}; use sc_transaction_pool::{ChainApi, Pool}; use sp_api::{ConstructRuntimeApi, ProvideRuntimeApi}; use sp_runtime::traits::{BlakeTwo256, Block as BlockT}; @@ -23,12 +23,7 @@ use std::{ pub type FrontierBackend = fc_db::Backend; pub fn db_config_dir(config: &Configuration) -> PathBuf { - let application = &config.impl_name; - config - .base_path - .as_ref() - .map(|base_path| base_path.config_dir(config.chain_spec.id())) - .unwrap_or_else(|| BasePath::from_project("", "", application).config_dir(config.chain_spec.id())) + config.base_path.config_dir(config.chain_spec.id()) } pub fn open_frontier_backend( diff --git a/parachain/src/service.rs b/parachain/src/service.rs index b9ada299ea..13eb51c1ca 100644 --- a/parachain/src/service.rs +++ b/parachain/src/service.rs @@ -1,7 +1,7 @@ use cumulus_client_cli::CollatorOptions; use cumulus_client_consensus_aura::{AuraConsensus, BuildAuraConsensusParams, SlotProportion}; use cumulus_client_consensus_common::{ParachainBlockImport as TParachainBlockImport, ParachainConsensus}; -use cumulus_client_network::BlockAnnounceValidator; +use cumulus_client_network::RequireSecondedInBlockAnnounce; use cumulus_client_service::{ prepare_node_config, start_collator, start_full_node, StartCollatorParams, StartFullNodeParams, }; @@ -13,13 +13,14 @@ use cumulus_relay_chain_minimal_node::build_minimal_relay_chain_node; use futures::StreamExt; use polkadot_service::CollatorPair; use primitives::*; -use sc_client_api::{HeaderBackend, StateBackendFor}; +use sc_client_api::{Backend, HeaderBackend, StateBackendFor}; use sc_consensus::{ImportQueue, LongestChain}; use sc_executor::{HeapAllocStrategy, NativeElseWasmExecutor, WasmExecutor, DEFAULT_HEAP_ALLOC_STRATEGY}; use sc_network::NetworkBlock; use sc_network_sync::SyncingService; use sc_service::{Configuration, PartialComponents, RpcHandlers, TFullBackend, TFullClient, TaskManager}; use sc_telemetry::{Telemetry, TelemetryHandle, TelemetryWorker, TelemetryWorkerHandle}; +use sc_transaction_pool_api::OffchainTransactionPoolFactory; use sp_api::ConstructRuntimeApi; use sp_consensus_aura::{ sr25519::{AuthorityId as AuraId, AuthorityPair as AuraPair}, @@ -310,7 +311,6 @@ where let overrides = interbtc_rpc::overrides_handle(client.clone()); let frontier_backend = open_frontier_backend(client.clone(), config, eth_config, overrides.clone())?; - let parachain_block_import = ParachainBlockImport::new(client.clone(), backend.clone()); let import_queue = if instant_seal { @@ -419,6 +419,7 @@ where let params = new_partial(¶chain_config, ð_config, false)?; let (parachain_block_import, mut telemetry, telemetry_worker_handle, frontier_backend, overrides) = params.other; + let net_config = sc_network::config::FullNetworkConfiguration::new(¶chain_config.network); let client = params.client.clone(); let backend = params.backend.clone(); @@ -434,7 +435,7 @@ where .await .map_err(|e| sc_service::Error::Application(Box::new(e) as Box<_>))?; - let block_announce_validator = BlockAnnounceValidator::new(relay_chain_interface.clone(), id); + let block_announce_validator = RequireSecondedInBlockAnnounce::new(relay_chain_interface.clone(), id); let force_authoring = parachain_config.force_authoring; let validator = parachain_config.role.is_authority(); @@ -444,6 +445,7 @@ where let (network, system_rpc_tx, tx_handler_controller, start_network, sync_service) = sc_service::build_network(sc_service::BuildNetworkParams { config: ¶chain_config, + net_config, client: client.clone(), transaction_pool: transaction_pool.clone(), spawn_handle: task_manager.spawn_handle(), @@ -499,11 +501,23 @@ where }; if parachain_config.offchain_worker.enabled { - sc_service::build_offchain_workers( - ¶chain_config, - task_manager.spawn_handle(), - client.clone(), - network.clone(), + use futures::FutureExt; + + task_manager.spawn_handle().spawn( + "offchain-workers-runner", + "offchain-work", + sc_offchain::OffchainWorkers::new(sc_offchain::OffchainWorkerOptions { + runtime_api_provider: client.clone(), + keystore: Some(params.keystore_container.keystore()), + offchain_db: backend.offchain_storage(), + transaction_pool: Some(OffchainTransactionPoolFactory::new(transaction_pool.clone())), + network_provider: network.clone(), + is_validator: parachain_config.role.is_authority(), + enable_http_requests: false, + custom_extensions: move |_| vec![], + }) + .run(client.clone(), task_manager.spawn_handle()) + .boxed(), ); }; @@ -716,10 +730,12 @@ where transaction_pool, other: (_, mut telemetry, _telemetry_worker_handle, frontier_backend, overrides), } = new_partial::(&config, ð_config, true)?; + let net_config = sc_network::config::FullNetworkConfiguration::new(&config.network); let (network, system_rpc_tx, tx_handler_controller, network_starter, sync_service) = sc_service::build_network(sc_service::BuildNetworkParams { config: &config, + net_config, client: client.clone(), transaction_pool: transaction_pool.clone(), spawn_handle: task_manager.spawn_handle(), @@ -729,7 +745,24 @@ where })?; if config.offchain_worker.enabled { - sc_service::build_offchain_workers(&config, task_manager.spawn_handle(), client.clone(), network.clone()); + use futures::FutureExt; + + task_manager.spawn_handle().spawn( + "offchain-workers-runner", + "offchain-work", + sc_offchain::OffchainWorkers::new(sc_offchain::OffchainWorkerOptions { + runtime_api_provider: client.clone(), + keystore: None, + offchain_db: backend.offchain_storage(), + transaction_pool: Some(OffchainTransactionPoolFactory::new(transaction_pool.clone())), + network_provider: network.clone(), + is_validator: config.role.is_authority(), + enable_http_requests: false, + custom_extensions: move |_| vec![], + }) + .run(client.clone(), task_manager.spawn_handle()) + .boxed(), + ); }; let prometheus_registry = config.prometheus_registry().cloned(); diff --git a/primitives/Cargo.toml b/primitives/Cargo.toml index 16c7c432a8..52fc16caea 100644 --- a/primitives/Cargo.toml +++ b/primitives/Cargo.toml @@ -6,7 +6,7 @@ version = "1.2.0" [dependencies] bstringify = "0.1.2" -serde = { version = "1.0.130", optional = true } +serde = { version = "1.0.130", default-features = false } codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false } primitive-types = { version = "0.12.1", default-features = false, features = ["codec", "scale-info"] } scale-info = { version = "2.2.0", default-features = false, features = ["derive"] } @@ -22,10 +22,9 @@ bitcoin = { path = "../crates/bitcoin", default-features = false } [features] default = ["std", "substrate-compat"] std = [ - "serde", + "serde/std", "codec/std", "primitive-types/std", - "primitive-types/serde", "scale-decode", "scale-encode", diff --git a/primitives/src/lib.rs b/primitives/src/lib.rs index 293e2e10ad..73e9fa2a4e 100644 --- a/primitives/src/lib.rs +++ b/primitives/src/lib.rs @@ -17,7 +17,6 @@ use scale_decode::DecodeAsType; #[cfg(feature = "std")] use scale_encode::EncodeAsType; use scale_info::TypeInfo; -#[cfg(feature = "std")] use serde::{Deserialize, Deserializer, Serialize, Serializer}; pub use bitcoin::types::H256Le; @@ -77,15 +76,19 @@ mod arithmetic { } } -#[derive(Encode, Decode, Clone, PartialEq, Eq, Debug, PartialOrd, Ord, TypeInfo, MaxEncodedLen)] -#[cfg_attr(feature = "std", derive(Serialize, Deserialize, std::hash::Hash))] +#[derive( + Serialize, Deserialize, Encode, Decode, Clone, PartialEq, Eq, Debug, PartialOrd, Ord, TypeInfo, MaxEncodedLen, +)] +#[cfg_attr(feature = "std", derive(std::hash::Hash))] pub struct VaultCurrencyPair { pub collateral: CurrencyId, pub wrapped: CurrencyId, } -#[derive(Encode, Decode, Clone, PartialEq, Eq, Debug, PartialOrd, Ord, TypeInfo, MaxEncodedLen)] -#[cfg_attr(feature = "std", derive(Serialize, Deserialize, std::hash::Hash))] +#[derive( + Serialize, Deserialize, Encode, Decode, Clone, PartialEq, Eq, Debug, PartialOrd, Ord, TypeInfo, MaxEncodedLen, +)] +#[cfg_attr(feature = "std", derive(std::hash::Hash))] pub struct VaultId { pub account_id: AccountId, pub currencies: VaultCurrencyPair, @@ -124,9 +127,9 @@ impl From<(AccountId, VaultCurrencyPair pub mod issue { use super::*; - #[derive(Encode, Decode, Clone, PartialEq, TypeInfo, MaxEncodedLen)] - #[cfg_attr(feature = "std", derive(Debug, Serialize, Deserialize))] - #[cfg_attr(feature = "std", serde(rename_all = "camelCase"))] + #[derive(Serialize, Deserialize, Encode, Decode, Clone, PartialEq, TypeInfo, MaxEncodedLen)] + #[cfg_attr(feature = "std", derive(Debug))] + #[serde(rename_all = "camelCase")] pub enum IssueRequestStatus { /// opened, but not yet executed or cancelled Pending, @@ -144,8 +147,8 @@ pub mod issue { // Due to a known bug in serde we need to specify how u128 is (de)serialized. // See https://github.com/paritytech/substrate/issues/4641 - #[derive(Encode, Decode, Clone, PartialEq, TypeInfo, MaxEncodedLen)] - #[cfg_attr(feature = "std", derive(Debug, Serialize, Deserialize))] + #[derive(Serialize, Deserialize, Encode, Decode, Clone, PartialEq, TypeInfo, MaxEncodedLen)] + #[cfg_attr(feature = "std", derive(Debug))] pub struct IssueRequest { /// the vault associated with this issue request pub vault: VaultId, @@ -186,9 +189,8 @@ pub mod issue { } } -#[derive(Eq, PartialEq, Encode, Decode, Default, TypeInfo)] -#[cfg_attr(feature = "std", derive(Debug, Serialize, Deserialize))] -#[cfg_attr(feature = "std", serde(rename_all = "camelCase"))] +#[derive(Serialize, Deserialize, Eq, PartialEq, Encode, Decode, Default, TypeInfo)] +#[serde(rename_all = "camelCase")] /// a wrapper around a balance, used in RPC to workaround a bug where using u128 /// in runtime-apis fails. See pub struct BalanceWrapper { @@ -214,9 +216,9 @@ fn deserialize_from_string<'de, D: Deserializer<'de>, T: std::str::FromStr>(dese pub mod redeem { use super::*; - #[derive(Encode, Decode, Clone, Eq, PartialEq, TypeInfo, MaxEncodedLen)] - #[cfg_attr(feature = "std", derive(Debug, Serialize, Deserialize))] - #[cfg_attr(feature = "std", serde(rename_all = "camelCase"))] + #[derive(Serialize, Deserialize, Encode, Decode, Clone, Eq, PartialEq, TypeInfo, MaxEncodedLen)] + #[cfg_attr(feature = "std", derive(Debug))] + #[serde(rename_all = "camelCase")] pub enum RedeemRequestStatus { /// opened, but not yet executed or cancelled Pending, @@ -236,8 +238,8 @@ pub mod redeem { // Due to a known bug in serde we need to specify how u128 is (de)serialized. // See https://github.com/paritytech/substrate/issues/4641 - #[derive(Encode, Decode, Clone, PartialEq, TypeInfo, MaxEncodedLen)] - #[cfg_attr(feature = "std", derive(Debug, Serialize, Deserialize))] + #[derive(Serialize, Deserialize, Encode, Decode, Clone, PartialEq, TypeInfo, MaxEncodedLen)] + #[cfg_attr(feature = "std", derive(Debug))] pub struct RedeemRequest { /// the vault associated with this redeem request pub vault: VaultId, @@ -283,9 +285,9 @@ pub mod redeem { pub mod replace { use super::*; - #[derive(Encode, Decode, Clone, PartialEq, TypeInfo, MaxEncodedLen)] - #[cfg_attr(feature = "std", derive(Debug, Serialize, Deserialize, Eq))] - #[cfg_attr(feature = "std", serde(rename_all = "camelCase"))] + #[derive(Serialize, Deserialize, Encode, Decode, Clone, PartialEq, TypeInfo, MaxEncodedLen)] + #[cfg_attr(feature = "std", derive(Debug, Eq))] + #[serde(rename_all = "camelCase")] pub enum ReplaceRequestStatus { /// accepted, but not yet executed or cancelled Pending, @@ -303,8 +305,8 @@ pub mod replace { // Due to a known bug in serde we need to specify how u128 is (de)serialized. // See https://github.com/paritytech/substrate/issues/4641 - #[derive(Encode, Decode, Clone, PartialEq, TypeInfo, MaxEncodedLen)] - #[cfg_attr(feature = "std", derive(Debug, Serialize, Deserialize, Eq))] + #[derive(Serialize, Deserialize, Encode, Decode, Clone, PartialEq, TypeInfo, MaxEncodedLen)] + #[cfg_attr(feature = "std", derive(Eq, Debug))] pub struct ReplaceRequest { /// the vault which has requested to be replaced pub old_vault: VaultId, @@ -344,9 +346,8 @@ pub mod replace { pub mod oracle { use super::*; - #[derive(Encode, Decode, Clone, Eq, PartialEq, Debug, TypeInfo, MaxEncodedLen)] - #[cfg_attr(feature = "std", derive(Serialize, Deserialize))] - #[cfg_attr(feature = "std", serde(rename_all = "camelCase"))] + #[derive(Serialize, Deserialize, Encode, Decode, Clone, Eq, PartialEq, Debug, TypeInfo, MaxEncodedLen)] + #[serde(rename_all = "camelCase")] pub enum Key { ExchangeRate(CurrencyId), FeeEstimation, @@ -503,8 +504,7 @@ macro_rules! create_currency_id { } create_currency_id! { - #[derive(Encode, Decode, Eq, Hash, PartialEq, Copy, Clone, Debug, PartialOrd, Ord, TypeInfo, MaxEncodedLen)] - #[cfg_attr(feature = "std", derive(Serialize, Deserialize))] + #[derive(Serialize, Deserialize,Encode, Decode, Eq, Hash, PartialEq, Copy, Clone, Debug, PartialOrd, Ord, TypeInfo, MaxEncodedLen)] #[cfg_attr(feature = "std", derive(EncodeAsType,DecodeAsType))] #[repr(u8)] pub enum TokenSymbol { @@ -518,9 +518,23 @@ create_currency_id! { } } -#[derive(Encode, Decode, Eq, Hash, PartialEq, Copy, Clone, Debug, PartialOrd, Ord, TypeInfo, MaxEncodedLen)] -#[cfg_attr(feature = "std", derive(Serialize, Deserialize))] -#[cfg_attr(feature = "std", serde(rename_all = "camelCase"))] +#[derive( + Serialize, + Deserialize, + Encode, + Decode, + Eq, + Hash, + PartialEq, + Copy, + Clone, + Debug, + PartialOrd, + Ord, + TypeInfo, + MaxEncodedLen, +)] +#[serde(rename_all = "camelCase")] #[cfg_attr(feature = "std", derive(EncodeAsType, DecodeAsType))] pub enum LpToken { Token(TokenSymbol), @@ -528,9 +542,23 @@ pub enum LpToken { StableLpToken(StablePoolId), } -#[derive(Encode, Decode, Eq, Hash, PartialEq, Copy, Clone, Debug, PartialOrd, Ord, TypeInfo, MaxEncodedLen)] -#[cfg_attr(feature = "std", derive(Serialize, Deserialize))] -#[cfg_attr(feature = "std", serde(rename_all = "camelCase"))] +#[derive( + Serialize, + Deserialize, + Encode, + Decode, + Eq, + Hash, + PartialEq, + Copy, + Clone, + Debug, + PartialOrd, + Ord, + TypeInfo, + MaxEncodedLen, +)] +#[serde(rename_all = "camelCase")] #[cfg_attr(feature = "std", derive(EncodeAsType, DecodeAsType))] pub enum CurrencyId { Token(TokenSymbol), diff --git a/rpc/Cargo.toml b/rpc/Cargo.toml index f09ee2ea4d..b821854c0a 100644 --- a/rpc/Cargo.toml +++ b/rpc/Cargo.toml @@ -44,10 +44,9 @@ sc-network = { git = "https://github.com/paritytech/substrate", branch = "polkad sc-network-sync = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } sc-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } - fc-db = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v0.9.42" } fc-mapping-sync = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v0.9.42" } -fc-rpc = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v0.9.42" } +fc-rpc = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v0.9.42", features = ["txpool"] } fc-rpc-core = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v0.9.42" } fc-storage = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v0.9.42" } fp-rpc = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v0.9.42" } \ No newline at end of file diff --git a/rpc/src/eth.rs b/rpc/src/eth.rs index 5e264624eb..40b56bdf70 100644 --- a/rpc/src/eth.rs +++ b/rpc/src/eth.rs @@ -153,13 +153,12 @@ where .into_rpc(), )?; - let tx_pool = TxPool::new(client.clone(), graph); if let Some(filter_pool) = filter_pool { io.merge( EthFilter::new( client.clone(), frontier_backend, - tx_pool.clone(), + graph.clone(), filter_pool, 500_usize, // max stored filters max_past_logs, @@ -191,7 +190,8 @@ where .into_rpc(), )?; - io.merge(Web3::new(client).into_rpc())?; + io.merge(Web3::new(client.clone()).into_rpc())?; + let tx_pool = TxPool::new(client, graph.clone()); io.merge(tx_pool.into_rpc())?; Ok(io) diff --git a/rust-toolchain.toml b/rust-toolchain.toml index d25de7b7ec..4316bc9d61 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,4 +1,4 @@ [toolchain] -channel = "nightly-2023-03-01" +channel = "nightly-2023-04-01" components = [ "rustfmt", "rls" ] targets = [ "wasm32-unknown-unknown" ]