diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 8affb0d66..6e034f9e7 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -25,7 +25,7 @@ jobs: - name: Free up disk space uses: jlumbroso/free-disk-space@main with: - tool-cache: false + tool-cache: true - name: Install rust toolchain run: rustup show diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index a814b4d88..c8fe30515 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -58,7 +58,7 @@ jobs: - name: Free up disk space uses: jlumbroso/free-disk-space@main with: - tool-cache: false + tool-cache: true - name: Install build tools run: ./scripts/init.sh @@ -84,7 +84,7 @@ jobs: - name: Free up disk space uses: jlumbroso/free-disk-space@main with: - tool-cache: false + tool-cache: true - name: Install build tools run: ./scripts/init.sh @@ -106,7 +106,7 @@ jobs: - name: Free up disk space uses: jlumbroso/free-disk-space@main with: - tool-cache: false + tool-cache: true - name: Install build tools run: ./scripts/init.sh @@ -132,7 +132,7 @@ jobs: - name: Free up disk space uses: jlumbroso/free-disk-space@main with: - tool-cache: false + tool-cache: true - name: Install build tools run: ./scripts/init.sh @@ -158,7 +158,7 @@ jobs: - name: Free up disk space uses: jlumbroso/free-disk-space@main with: - tool-cache: false + tool-cache: true - name: Install build tools run: ./scripts/init.sh diff --git a/Cargo.lock b/Cargo.lock index 1057c1dcf..432acaf5c 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.20.0" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4fa78e18c64fce05e902adecd7a5eed15a5e0a3439f7b0e169f0252214865e3" +checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" dependencies = [ - "gimli 0.27.3", + "gimli 0.28.1", ] [[package]] @@ -36,25 +36,6 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" -[[package]] -name = "aead" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fc95d1bdb8e6666b2b217308eeeb09f2d6728d104be3e31916cc74d15420331" -dependencies = [ - "generic-array 0.14.7", -] - -[[package]] -name = "aead" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b613b8e1e3cf911a086f53f03bf286f52fd7a7258e4fa606f0ef220d39d8877" -dependencies = [ - "generic-array 0.14.7", - "rand_core 0.6.4", -] - [[package]] name = "aead" version = "0.5.2" @@ -67,118 +48,68 @@ dependencies = [ [[package]] name = "aes" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "884391ef1066acaa41e766ba8f596341b96e93ce34f9a43e7d24bf0a0eaf0561" -dependencies = [ - "aes-soft", - "aesni", - "cipher 0.2.5", -] - -[[package]] -name = "aes" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e8b47f52ea9bae42228d07ec09eb676433d7c4ed1ebdf0f1d1c29ed446f1ab8" -dependencies = [ - "cfg-if", - "cipher 0.3.0", - "cpufeatures", - "opaque-debug 0.3.0", -] - -[[package]] -name = "aes" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac1f845298e95f983ff1944b728ae08b8cebab80d684f0a832ed0fc74dfa27e2" +checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" dependencies = [ "cfg-if", - "cipher 0.4.4", + "cipher", "cpufeatures", ] [[package]] name = "aes-gcm" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df5f85a83a7d8b0442b6aa7b504b8212c1733da07b98aae43d4bc21b2cb3cdf6" -dependencies = [ - "aead 0.4.3", - "aes 0.7.5", - "cipher 0.3.0", - "ctr 0.8.0", - "ghash 0.4.4", - "subtle", -] - -[[package]] -name = "aes-gcm" -version = "0.10.2" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "209b47e8954a928e1d72e86eca7000ebb6655fe1436d33eefc2201cad027e237" +checksum = "831010a0f742e1209b3bcea8fab6a8e149051ba6099432c8cb2cc117dec3ead1" dependencies = [ - "aead 0.5.2", - "aes 0.8.3", - "cipher 0.4.4", - "ctr 0.9.2", - "ghash 0.5.0", + "aead", + "aes", + "cipher", + "ctr", + "ghash", "subtle", ] -[[package]] -name = "aes-soft" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be14c7498ea50828a38d0e24a765ed2effe92a705885b57d029cd67d45744072" -dependencies = [ - "cipher 0.2.5", - "opaque-debug 0.3.0", -] - -[[package]] -name = "aesni" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea2e11f5e94c2f7d386164cc2aa1f97823fed6f259e486940a71c174dd01b0ce" -dependencies = [ - "cipher 0.2.5", - "opaque-debug 0.3.0", -] - [[package]] name = "ahash" -version = "0.7.6" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" +checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9" dependencies = [ - "getrandom 0.2.10", + "getrandom 0.2.14", "once_cell", "version_check", ] [[package]] name = "ahash" -version = "0.8.3" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" +checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" dependencies = [ "cfg-if", - "getrandom 0.2.10", + "getrandom 0.2.14", "once_cell", "version_check", + "zerocopy", ] [[package]] name = "aho-corasick" -version = "1.0.2" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43f6cb1bf222025340178f382c426f13757b2960e89779dfcb319c32542a5a41" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" dependencies = [ "memchr", ] +[[package]] +name = "allocator-api2" +version = "0.2.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" + [[package]] name = "always-assert" version = "0.1.3" @@ -211,58 +142,57 @@ dependencies = [ [[package]] name = "anstream" -version = "0.3.2" +version = "0.6.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ca84f3628370c59db74ee214b3263d58f9aadd9b4fe7e711fd87dc452b7f163" +checksum = "d96bd03f33fe50a863e394ee9718a706f988b9079b20c3784fb726e7678b62fb" dependencies = [ "anstyle", "anstyle-parse", "anstyle-query", "anstyle-wincon", "colorchoice", - "is-terminal", "utf8parse", ] [[package]] name = "anstyle" -version = "1.0.1" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a30da5c5f2d5e72842e00bcb57657162cdabef0931f40e2deb9b4140440cecd" +checksum = "8901269c6307e8d93993578286ac0edf7f195079ffff5ebdeea6a59ffb7e36bc" [[package]] name = "anstyle-parse" -version = "0.2.1" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "938874ff5980b03a87c5524b3ae5b59cf99b1d6bc836848df7bc5ada9643c333" +checksum = "c75ac65da39e5fe5ab759307499ddad880d724eed2f6ce5b5e8a26f4f387928c" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.0.0" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b" +checksum = "e28923312444cdd728e4738b3f9c9cac739500909bb3d3c94b43551b16517648" dependencies = [ - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] name = "anstyle-wincon" -version = "1.0.1" +version = "3.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "180abfa45703aebe0093f79badacc01b8fd4ea2e35118747e5811127f926e188" +checksum = "1cd54b81ec8d6180e24654d0b371ad22fc3dd083b6ff8ba325b72e00c87660a7" dependencies = [ "anstyle", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] name = "anyhow" -version = "1.0.72" +version = "1.0.82" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b13c32d80ecc7ab747b80c3784bce54ee8a7a0cc4fbda9bf4cda2cf6fe90854" +checksum = "f538837af36e6f6a9be0faa67f9a314f8119e4e4b5867c6ab40ed60360142519" [[package]] name = "approx" @@ -273,32 +203,219 @@ dependencies = [ "num-traits", ] +[[package]] +name = "aquamarine" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1da02abba9f9063d786eab1509833ebb2fac0f966862ca59439c76b9c566760" +dependencies = [ + "include_dir", + "itertools 0.10.5", + "proc-macro-error", + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "arbitrary" -version = "1.3.0" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2d098ff73c1ca148721f37baad5ea6a465a13f9573aba8641fbbbae8164a54e" +checksum = "7d5a26814d8dcb93b0e5a0ff3c6d80a8843bafb21b39e8e18a6f05471870e110" dependencies = [ "derive_arbitrary", ] [[package]] -name = "arc-swap" -version = "1.6.0" +name = "ark-bls12-381" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bddcadddf5e9015d310179a59bb28c4d4b9920ad0f11e8e14dbadf654890c9a6" +checksum = "c775f0d12169cba7aae4caeb547bb6a50781c7449a8aa53793827c9ec4abf488" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-serialize", + "ark-std", +] [[package]] -name = "array-bytes" -version = "4.2.0" +name = "ark-ec" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "defd9a439d56ac24968cca0571f598a61bc8c55f71d50a89cda591cb750670ba" +dependencies = [ + "ark-ff", + "ark-poly", + "ark-serialize", + "ark-std", + "derivative", + "hashbrown 0.13.2", + "itertools 0.10.5", + "num-traits", + "zeroize", +] + +[[package]] +name = "ark-ed-on-bls12-381-bandersnatch" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f52f63c5c1316a16a4b35eaac8b76a98248961a533f061684cb2a7cb0eafb6c6" +checksum = "f9cde0f2aa063a2a5c28d39b47761aa102bda7c13c84fc118a61b87c7b2f785c" +dependencies = [ + "ark-bls12-381", + "ark-ec", + "ark-ff", + "ark-std", +] + +[[package]] +name = "ark-ff" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec847af850f44ad29048935519032c33da8aa03340876d351dfab5660d2966ba" +dependencies = [ + "ark-ff-asm", + "ark-ff-macros", + "ark-serialize", + "ark-std", + "derivative", + "digest 0.10.7", + "itertools 0.10.5", + "num-bigint", + "num-traits", + "paste", + "rustc_version 0.4.0", + "zeroize", +] + +[[package]] +name = "ark-ff-asm" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ed4aa4fe255d0bc6d79373f7e31d2ea147bcf486cba1be5ba7ea85abdb92348" +dependencies = [ + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-ff-macros" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" +dependencies = [ + "num-bigint", + "num-traits", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-poly" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d320bfc44ee185d899ccbadfa8bc31aab923ce1558716e1997a1e74057fe86bf" +dependencies = [ + "ark-ff", + "ark-serialize", + "ark-std", + "derivative", + "hashbrown 0.13.2", +] + +[[package]] +name = "ark-scale" +version = "0.0.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49b08346a3e38e2be792ef53ee168623c9244d968ff00cd70fb9932f6fe36393" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-serialize", + "ark-std", + "parity-scale-codec", +] + +[[package]] +name = "ark-scale" +version = "0.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f69c00b3b529be29528a6f2fd5fa7b1790f8bed81b9cdca17e326538545a179" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-serialize", + "ark-std", + "parity-scale-codec", + "scale-info", +] + +[[package]] +name = "ark-secret-scalar" +version = "0.0.2" +source = "git+https://github.com/w3f/ring-vrf?rev=3119f51#3119f51b54b69308abfb0671f6176cb125ae1bf1" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-serialize", + "ark-std", + "ark-transcript", + "digest 0.10.7", + "rand_core 0.6.4", + "zeroize", +] + +[[package]] +name = "ark-serialize" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" +dependencies = [ + "ark-serialize-derive", + "ark-std", + "digest 0.10.7", + "num-bigint", +] + +[[package]] +name = "ark-serialize-derive" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae3281bc6d0fd7e549af32b52511e1302185bd688fd3359fa36423346ff682ea" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-std" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" +dependencies = [ + "num-traits", + "rand 0.8.5", +] + +[[package]] +name = "ark-transcript" +version = "0.0.2" +source = "git+https://github.com/w3f/ring-vrf?rev=3119f51#3119f51b54b69308abfb0671f6176cb125ae1bf1" +dependencies = [ + "ark-ff", + "ark-serialize", + "ark-std", + "digest 0.10.7", + "rand_core 0.6.4", + "sha3", +] [[package]] name = "array-bytes" -version = "6.1.0" +version = "6.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b1c5a481ec30a5abd8dfbd94ab5cf1bb4e9a66be7f1b3b322f2f1170c200fd" +checksum = "6f840fb7195bcfc5e17ea40c26e5ce6d5b9ce5d584466e17703209657e459ae0" [[package]] name = "arrayref" @@ -306,6 +423,15 @@ version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" +[[package]] +name = "arrayvec" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd9fd44efafa8690358b7408d253adf110036b88f55672a933f01d616ad9b1b9" +dependencies = [ + "nodrop", +] + [[package]] name = "arrayvec" version = "0.5.2" @@ -318,48 +444,20 @@ version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" -[[package]] -name = "asn1-rs" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30ff05a702273012438132f449575dbc804e27b2f3cbe3069aa237d26c98fa33" -dependencies = [ - "asn1-rs-derive 0.1.0", - "asn1-rs-impl", - "displaydoc", - "nom", - "num-traits", - "rusticata-macros", - "thiserror", - "time 0.3.24", -] - [[package]] name = "asn1-rs" version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f6fd5ddaf0351dff5b8da21b2fb4ff8e08ddd02857f0bf69c47639106c0fff0" dependencies = [ - "asn1-rs-derive 0.4.0", + "asn1-rs-derive", "asn1-rs-impl", "displaydoc", "nom", "num-traits", "rusticata-macros", "thiserror", - "time 0.3.24", -] - -[[package]] -name = "asn1-rs-derive" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db8b7511298d5b7784b40b092d9e9dcd3a627a5707e4b5e507931ab0d44eeebf" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", - "synstructure", + "time", ] [[package]] @@ -385,56 +483,192 @@ 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" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b34d609dfbaf33d6889b2b7106d3ca345eacad44200913df5ba02bfd31d2ba9" +[[package]] +name = "async-channel" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81953c529336010edd6d8e358f886d9581267795c61b19475b71314bffa46d35" +dependencies = [ + "concurrent-queue", + "event-listener 2.5.3", + "futures-core", +] + +[[package]] +name = "async-channel" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "136d4d23bcc79e27423727b36823d86233aad06dfea531837b038394d11e9928" +dependencies = [ + "concurrent-queue", + "event-listener 5.3.0", + "event-listener-strategy 0.5.2", + "futures-core", + "pin-project-lite 0.2.14", +] + +[[package]] +name = "async-executor" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b10202063978b3351199d68f8b22c4e47e4b1b822f8d43fd862d5ea8c006b29a" +dependencies = [ + "async-task", + "concurrent-queue", + "fastrand 2.1.0", + "futures-lite 2.3.0", + "slab", +] + +[[package]] +name = "async-fs" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "279cf904654eeebfa37ac9bb1598880884924aab82e290aa65c9e77a0e142e06" +dependencies = [ + "async-lock 2.8.0", + "autocfg", + "blocking", + "futures-lite 1.13.0", +] + [[package]] name = "async-io" version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fc5b45d93ef0529756f812ca52e44c221b35341892d3dcc34132ac02f3dd2af" dependencies = [ - "async-lock", + "async-lock 2.8.0", "autocfg", "cfg-if", "concurrent-queue", - "futures-lite", + "futures-lite 1.13.0", "log", "parking", - "polling", - "rustix 0.37.23", + "polling 2.8.0", + "rustix 0.37.27", "slab", - "socket2 0.4.9", + "socket2 0.4.10", "waker-fn", ] +[[package]] +name = "async-io" +version = "2.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dcccb0f599cfa2f8ace422d3555572f47424da5648a4382a9dd0310ff8210884" +dependencies = [ + "async-lock 3.3.0", + "cfg-if", + "concurrent-queue", + "futures-io", + "futures-lite 2.3.0", + "parking", + "polling 3.7.0", + "rustix 0.38.34", + "slab", + "tracing", + "windows-sys 0.52.0", +] + [[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", + "event-listener 2.5.3", ] +[[package]] +name = "async-lock" +version = "3.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d034b430882f8381900d3fe6f0aaa3ad94f2cb4ac519b429692a1bc2dda4ae7b" +dependencies = [ + "event-listener 4.0.3", + "event-listener-strategy 0.4.0", + "pin-project-lite 0.2.14", +] + +[[package]] +name = "async-net" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0434b1ed18ce1cf5769b8ac540e33f01fa9471058b5e89da9e06f3c882a8c12f" +dependencies = [ + "async-io 1.13.0", + "blocking", + "futures-lite 1.13.0", +] + +[[package]] +name = "async-process" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea6438ba0a08d81529c69b36700fa2f95837bfe3e776ab39cde9c14d9149da88" +dependencies = [ + "async-io 1.13.0", + "async-lock 2.8.0", + "async-signal", + "blocking", + "cfg-if", + "event-listener 3.1.0", + "futures-lite 1.13.0", + "rustix 0.38.34", + "windows-sys 0.48.0", +] + +[[package]] +name = "async-recursion" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.60", +] + +[[package]] +name = "async-signal" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "afe66191c335039c7bb78f99dc7520b0cbb166b3a1cb33a03f53d8a1c6f2afda" +dependencies = [ + "async-io 2.3.2", + "async-lock 3.3.0", + "atomic-waker", + "cfg-if", + "futures-core", + "futures-io", + "rustix 0.38.34", + "signal-hook-registry", + "slab", + "windows-sys 0.52.0", +] + +[[package]] +name = "async-task" +version = "4.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de" + [[package]] name = "async-trait" -version = "0.1.72" +version = "0.1.80" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc6dde6e4ed435a4c1ee4e73592f5ba9da2151af10076cc04858746af9352d09" +checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.60", ] [[package]] @@ -447,14 +681,20 @@ dependencies = [ "futures-sink", "futures-util", "memchr", - "pin-project-lite 0.2.10", + "pin-project-lite 0.2.14", ] +[[package]] +name = "atomic-take" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8ab6b55fe97976e46f91ddbed8d147d966475dc29b2032757ba47e02376fbc3" + [[package]] name = "atomic-waker" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1181e1e0d1fce796a03db1ae795d67167da795f9cf4a39c37589e85ef57f26d3" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" [[package]] name = "atty" @@ -469,9 +709,9 @@ dependencies = [ [[package]] name = "autocfg" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +checksum = "f1fdabc7756949593fe60f30ec81974b613357de856987752631dea1e3394c80" [[package]] name = "az" @@ -481,19 +721,41 @@ checksum = "7b7e4c2464d97fe331d41de9d5db0def0a96f4d823b8b32a2efd503578988973" [[package]] name = "backtrace" -version = "0.3.68" +version = "0.3.71" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4319208da049c43661739c5fade2ba182f09d1dc2299b32298d3a31692b17e12" +checksum = "26b05800d2e817c8b3b4b54abd461726265fa9789ae34330622f2db9ee696f9d" dependencies = [ - "addr2line 0.20.0", + "addr2line 0.21.0", "cc", "cfg-if", "libc", "miniz_oxide", - "object 0.31.1", + "object 0.32.2", "rustc-demangle", ] +[[package]] +name = "bandersnatch_vrfs" +version = "0.0.1" +source = "git+https://github.com/w3f/ring-vrf?rev=3119f51#3119f51b54b69308abfb0671f6176cb125ae1bf1" +dependencies = [ + "ark-bls12-381", + "ark-ec", + "ark-ed-on-bls12-381-bandersnatch", + "ark-ff", + "ark-scale 0.0.12", + "ark-serialize", + "ark-std", + "dleq_vrf", + "fflonk", + "merlin 3.0.0", + "rand_chacha 0.3.1", + "rand_core 0.6.4", + "ring 0.1.0", + "sha2 0.10.8", + "zeroize", +] + [[package]] name = "base-x" version = "0.2.11" @@ -502,15 +764,9 @@ checksum = "4cbbc9d0964165b47557570cce6c952866c2678457aca742aafc9fb771d30270" [[package]] name = "base16ct" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "349a06037c7bf932dd7e7d1f653678b2038b9ad46a74102f1fc7bd7872678cce" - -[[package]] -name = "base58" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6107fe1be6682a68940da878d9e9f5e90ca5745b3dec9fd1bb393c8777d4f581" +checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" [[package]] name = "base64" @@ -520,9 +776,9 @@ checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] name = "base64" -version = "0.21.2" +version = "0.21.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "604178f6c5c21f02dc555784810edfb88d34ac2c73b2eae109655649ee73ce3d" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" [[package]] name = "base64ct" @@ -543,6 +799,7 @@ dependencies = [ "cumulus-primitives-core", "cumulus-primitives-timestamp", "cumulus-primitives-utility", + "env_logger 0.10.2", "frame-benchmarking", "frame-executive", "frame-support", @@ -575,12 +832,14 @@ dependencies = [ "pallet-democracy", "pallet-grandpa", "pallet-identity", + "pallet-im-online", + "pallet-insecure-randomness-collective-flip", "pallet-membership", + "pallet-message-queue", "pallet-multisig", "pallet-parachain-staking", "pallet-preimage", "pallet-proxy", - "pallet-randomness-collective-flip", "pallet-scheduler", "pallet-sudo", "pallet-timestamp", @@ -592,33 +851,36 @@ dependencies = [ "pallet-xcm", "parachain-info", "parity-scale-codec", - "polkadot-parachain", + "polkadot-parachain-primitives", "polkadot-primitives", "polkadot-runtime-parachains", "rococo-runtime", "scale-info", "session-keys-primitives", "sp-api", + "sp-authority-discovery", "sp-block-builder", "sp-consensus-aura", + "sp-consensus-babe", + "sp-consensus-beefy", + "sp-consensus-grandpa", "sp-core", "sp-debug-derive", - "sp-finality-grandpa", "sp-inherents", "sp-io", "sp-offchain", "sp-runtime", "sp-session", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", "sp-transaction-pool", "sp-version", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", "substrate-fixed", "substrate-wasm-builder", "test-case", - "xcm", - "xcm-builder", "xcm-emulator", - "xcm-executor", "zeitgeist-primitives", "zrml-asset-router", "zrml-authorized", @@ -648,66 +910,12 @@ dependencies = [ ] [[package]] -name = "beefy-gadget" +name = "binary-merkle-tree" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ - "array-bytes 4.2.0", - "async-trait", - "fnv", - "futures 0.3.28", + "hash-db", "log", - "parity-scale-codec", - "parking_lot 0.12.1", - "sc-client-api", - "sc-consensus", - "sc-keystore", - "sc-network", - "sc-network-common", - "sc-network-gossip", - "sc-utils", - "sp-api", - "sp-application-crypto", - "sp-arithmetic", - "sp-beefy", - "sp-blockchain", - "sp-consensus", - "sp-core", - "sp-keystore", - "sp-mmr-primitives", - "sp-runtime", - "substrate-prometheus-endpoint", - "thiserror", - "wasm-timer", -] - -[[package]] -name = "beefy-gadget-rpc" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" -dependencies = [ - "beefy-gadget", - "futures 0.3.28", - "jsonrpsee", - "log", - "parity-scale-codec", - "parking_lot 0.12.1", - "sc-rpc", - "serde", - "sp-beefy", - "sp-core", - "sp-runtime", - "thiserror", -] - -[[package]] -name = "beefy-merkle-tree" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" -dependencies = [ - "sp-api", - "sp-beefy", - "sp-runtime", ] [[package]] @@ -721,9 +929,9 @@ 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 1.3.2", "cexpr", @@ -731,14 +939,30 @@ dependencies = [ "lazy_static", "lazycell", "peeking_take_while", + "prettyplease 0.2.19", "proc-macro2", "quote", "regex", "rustc-hash", "shlex", - "syn 1.0.109", + "syn 2.0.60", +] + +[[package]] +name = "bip39" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93f2635620bf0b9d4576eb7bb9a38a55df78bd1205d26fa994b25911a69f212f" +dependencies = [ + "bitcoin_hashes", ] +[[package]] +name = "bitcoin_hashes" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90064b8dee6815a6470d60bad07bbbaee885c0e12d04177138fa3291a01b7bc4" + [[package]] name = "bitflags" version = "1.3.2" @@ -747,9 +971,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.3.3" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "630be753d4e58660abd17930c71b647fe46c27ea6b63cc59e1e3851406972e42" +checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" [[package]] name = "bitvec" @@ -772,40 +996,49 @@ dependencies = [ "digest 0.10.7", ] +[[package]] +name = "blake2-rfc" +version = "0.2.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d6d530bdd2d52966a6d03b7a964add7ae1a288d25214066fd4b600f0f796400" +dependencies = [ + "arrayvec 0.4.12", + "constant_time_eq 0.1.5", +] + [[package]] name = "blake2b_simd" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c2f0dc9a68c6317d884f97cc36cf5a3d20ba14ce404227df55e1af708ab04bc" +checksum = "23285ad32269793932e830392f2fe2f83e26488fd3ec778883a93c8323735780" dependencies = [ "arrayref", "arrayvec 0.7.4", - "constant_time_eq 0.2.6", + "constant_time_eq 0.3.0", ] [[package]] name = "blake2s_simd" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6637f448b9e61dfadbdcbae9a885fadee1f3eaffb1f8d3c1965d3ade8bdfd44f" +checksum = "94230421e395b9920d23df13ea5d77a20e1725331f90fbbf6df6040b33f756ae" dependencies = [ "arrayref", "arrayvec 0.7.4", - "constant_time_eq 0.2.6", + "constant_time_eq 0.3.0", ] [[package]] name = "blake3" -version = "1.4.1" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "199c42ab6972d92c9f8995f086273d25c42fc0f7b2a1fcefba465c1352d25ba5" +checksum = "30cca6d3674597c30ddf2c587bf8d9d65c9a84d2326d941cc79c9842dfe0ef52" dependencies = [ "arrayref", "arrayvec 0.7.4", "cc", "cfg-if", "constant_time_eq 0.3.0", - "digest 0.10.7", ] [[package]] @@ -814,7 +1047,7 @@ version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b" dependencies = [ - "block-padding 0.1.5", + "block-padding", "byte-tools", "byteorder", "generic-array 0.12.4", @@ -839,35 +1072,45 @@ dependencies = [ ] [[package]] -name = "block-modes" -version = "0.7.0" +name = "block-padding" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57a0e8073e8baa88212fb5823574c02ebccb395136ba9a164ab89379ec6072f0" +checksum = "fa79dedbb091f449f1f39e53edf88d5dbe95f895dae6135a8d7b881fb5af73f5" dependencies = [ - "block-padding 0.2.1", - "cipher 0.2.5", + "byte-tools", ] [[package]] -name = "block-padding" -version = "0.1.5" +name = "blocking" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa79dedbb091f449f1f39e53edf88d5dbe95f895dae6135a8d7b881fb5af73f5" +checksum = "495f7104e962b7356f0aeb34247aca1fe7d2e783b346582db7f2904cb5717e88" dependencies = [ - "byte-tools", + "async-channel 2.2.1", + "async-lock 3.3.0", + "async-task", + "futures-io", + "futures-lite 2.3.0", + "piper", ] [[package]] -name = "block-padding" -version = "0.2.1" +name = "bounded-collections" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" +checksum = "ca548b6163b872067dc5eb82fd130c56881435e30367d2073594a3d9744120dd" +dependencies = [ + "log", + "parity-scale-codec", + "scale-info", + "serde", +] [[package]] name = "bounded-vec" -version = "0.6.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3372be4090bf9d4da36bd8ba7ce6ca1669503d0cf6e667236c6df7f053153eb6" +checksum = "68534a48cbf63a4b1323c433cf21238c9ec23711e0df13b08c33e5c2082663ce" dependencies = [ "thiserror", ] @@ -878,11 +1121,20 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" +[[package]] +name = "bs58" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf88ba1141d185c399bee5288d850d63b8369520c1eafc32a0430b5b6c287bf4" +dependencies = [ + "tinyvec", +] + [[package]] name = "bstr" -version = "1.6.0" +version = "1.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6798148dccfbff0fae41c7574d2fa8f1ef3492fba0face179de5d8d447d67b05" +checksum = "05efc5cfd9110c8416e471df0e96702d58690178e206e61b7173706673c93706" dependencies = [ "memchr", "serde", @@ -899,9 +1151,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.13.0" +version = "3.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1" +checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" [[package]] name = "byte-slice-cast" @@ -917,21 +1169,21 @@ checksum = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" [[package]] name = "bytemuck" -version = "1.13.1" +version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17febce684fd15d89027105661fec94afb475cb995fbc59d2865198446ba2eea" +checksum = "5d6d68c57235a3a081186990eca2867354726650f42f7516ca50c28d6281fd15" [[package]] name = "byteorder" -version = "1.4.3" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.4.0" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" +checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" [[package]] name = "bzip2-sys" @@ -955,45 +1207,36 @@ dependencies = [ [[package]] name = "cargo-platform" -version = "0.1.3" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cfa25e60aea747ec7e1124f238816749faa93759c6ff5b31f1ccdda137f4479" +checksum = "24b1f0365a6c6bb4020cd05806fd0d33c44d38046b8bd7f0e40814b9763cabfc" dependencies = [ "serde", ] [[package]] name = "cargo_metadata" -version = "0.14.2" +version = "0.15.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4acbb09d9ee8e23699b9634375c72795d095bf268439da88562cf9b501f181fa" +checksum = "eee4243f1f26fc7a42710e7439c149e2b10b05472f88090acce52632f231a73a" dependencies = [ "camino", "cargo-platform", - "semver 1.0.18", + "semver 1.0.22", "serde", "serde_json", + "thiserror", ] [[package]] name = "cc" -version = "1.0.80" +version = "1.0.96" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51f1226cd9da55587234753d1245dd5b132343ea240f26b6a9003d68706141ba" +checksum = "065a29261d53ba54260972629f9ca6bffa69bac13cd1fed61420f7fa68b9f8bd" dependencies = [ "jobserver", "libc", -] - -[[package]] -name = "ccm" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aca1a8fbc20b50ac9673ff014abfb2b5f4085ee1a850d408f14a159c5853ac7" -dependencies = [ - "aead 0.3.2", - "cipher 0.2.5", - "subtle", + "once_cell", ] [[package]] @@ -1007,9 +1250,9 @@ dependencies = [ [[package]] name = "cfg-expr" -version = "0.10.3" +version = "0.15.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0aacacf4d96c24b2ad6eb8ee6df040e4f27b0d0b39a5710c30091baa830485db" +checksum = "d067ad48b8650848b989a59a86c6c36a995d02d2bf778d45c3c5d57bc2718f02" dependencies = [ "smallvec", ] @@ -1028,75 +1271,55 @@ checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" [[package]] name = "chacha20" -version = "0.8.2" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c80e5460aa66fe3b91d40bcbdab953a597b60053e34d684ac6903f863b680a6" +checksum = "c3613f74bd2eac03dad61bd53dbe620703d4371614fe0bc3b9f04dd36fe4e818" dependencies = [ "cfg-if", - "cipher 0.3.0", + "cipher", "cpufeatures", - "zeroize", ] [[package]] name = "chacha20poly1305" -version = "0.9.1" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a18446b09be63d457bbec447509e85f662f32952b035ce892290396bc0b0cff5" +checksum = "10cd79432192d1c0f4e1a0fef9527696cc039165d729fb41b3f4f4f354c2dc35" dependencies = [ - "aead 0.4.3", + "aead", "chacha20", - "cipher 0.3.0", + "cipher", "poly1305", "zeroize", ] [[package]] name = "chrono" -version = "0.4.26" +version = "0.4.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec837a71355b28f6556dbd569b37b3f363091c0bd4b2e735674521b4c5fd9bc5" +checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" dependencies = [ "android-tzdata", "iana-time-zone", "js-sys", "num-traits", - "time 0.1.45", "wasm-bindgen", - "winapi", + "windows-targets 0.52.5", ] [[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", "multibase", - "multihash 0.16.3", + "multihash", "serde", "unsigned-varint", ] -[[package]] -name = "cipher" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12f8e7987cbd042a63249497f41aed09f8e65add917ea6566effbc56578d6801" -dependencies = [ - "generic-array 0.14.7", -] - -[[package]] -name = "cipher" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ee52072ec15386f770805afd189a01c8841be8696bed250fa2f13c4c0d6dfb7" -dependencies = [ - "generic-array 0.14.7", -] - [[package]] name = "cipher" version = "0.4.4" @@ -1105,6 +1328,7 @@ checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" dependencies = [ "crypto-common", "inout", + "zeroize", ] [[package]] @@ -1118,9 +1342,9 @@ dependencies = [ [[package]] name = "clang-sys" -version = "1.6.1" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c688fc74432808e3eb684cae8830a86be1d66a2bd58e1f248ed0960a590baf6f" +checksum = "67523a3b4be3ce1989d607a828d036249522dd9c1c8de7f4dd2dae43a37369d1" dependencies = [ "glob", "libc", @@ -1129,20 +1353,19 @@ dependencies = [ [[package]] name = "clap" -version = "4.3.19" +version = "4.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fd304a20bff958a57f04c4e96a2e7594cc4490a0e809cbd48bb6437edaa452d" +checksum = "90bc066a67923782aa8515dbaea16946c5bcc5addbd668bb80af688e53e548a0" dependencies = [ "clap_builder", "clap_derive", - "once_cell", ] [[package]] name = "clap_builder" -version = "4.3.19" +version = "4.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01c6a3f08f1fe5662a35cfe393aec09c4df95f60ee93b7556505260f75eee9e1" +checksum = "ae129e2e766ae0ec03484e609954119f123cc1fe650337e155d03b022f24f7b4" dependencies = [ "anstream", "anstyle", @@ -1152,31 +1375,30 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.3.12" +version = "4.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54a9bb5758fc5dfe728d1019941681eccaf0cf8a4189b692a0ee2f2ecf90a050" +checksum = "528131438037fd55894f62d6e9f068b8f45ac57ffa77517819645d10aed04f64" dependencies = [ - "heck", + "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.60", ] [[package]] name = "clap_lex" -version = "0.5.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2da6da31387c7e4ef160ffab6d5e7f00c42626fe39aea70a7b0f1773f7dd6c1b" +checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" [[package]] name = "coarsetime" -version = "0.1.23" +version = "0.1.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a90d114103adbc625300f346d4d09dfb4ab1c4a8df6868435dd903392ecf4354" +checksum = "13b3839cf01bb7960114be3ccf2340f541b6d0c81f8690b007b2b39f750f7e5d" dependencies = [ "libc", - "once_cell", - "wasi 0.11.0+wasi-snapshot-preview1", + "wasix", "wasm-bindgen", ] @@ -1197,15 +1419,35 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" [[package]] -name = "comfy-table" -version = "6.2.0" +name = "comfy-table" +version = "7.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b34115915337defe99b2aff5c2ce6771e5fbc4079f4b506301f5cf394c8452f7" +dependencies = [ + "strum 0.26.2", + "strum_macros 0.26.2", + "unicode-width", +] + +[[package]] +name = "common" +version = "0.1.0" +source = "git+https://github.com/w3f/ring-proof?rev=0e948f3#0e948f3c28cbacecdd3020403c4841c0eb339213" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-poly", + "ark-serialize", + "ark-std", + "fflonk", + "merlin 3.0.0", +] + +[[package]] +name = "common-path" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e959d788268e3bf9d35ace83e81b124190378e4c91c9067524675e33394b8ba" -dependencies = [ - "strum", - "strum_macros", - "unicode-width", -] +checksum = "2382f75942f4b3be3690fe4f86365e9c853c1587d6ee58212cebf6e2a9ccd101" [[package]] name = "common-runtime" @@ -1229,12 +1471,12 @@ dependencies = [ "pallet-contracts-primitives", "pallet-democracy", "pallet-identity", + "pallet-insecure-randomness-collective-flip", "pallet-membership", "pallet-multisig", "pallet-parachain-staking", "pallet-preimage", "pallet-proxy", - "pallet-randomness-collective-flip", "pallet-scheduler", "pallet-timestamp", "pallet-transaction-payment", @@ -1247,24 +1489,57 @@ dependencies = [ [[package]] name = "concurrent-queue" -version = "2.2.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62ec6771ecfa0762d24683ee5a32ad78487a3d3afdc0fb8cae19d2c5deb50b7c" +checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" dependencies = [ "crossbeam-utils", ] +[[package]] +name = "console" +version = "0.15.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e1f83fc076bd6dd27517eacdf25fef6c4dfe5f1d7448bafaaf3a26f13b5e4eb" +dependencies = [ + "encode_unicode", + "lazy_static", + "libc", + "unicode-width", + "windows-sys 0.52.0", +] + [[package]] name = "const-oid" -version = "0.9.4" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" + +[[package]] +name = "const-random" +version = "0.1.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87e00182fe74b066627d63b85fd550ac2998d4b0bd86bfed477a0ae4c7c71359" +dependencies = [ + "const-random-macro", +] + +[[package]] +name = "const-random-macro" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "795bc6e66a8e340f075fcf6227e417a2dc976b92b91f3cdc778bb858778b6747" +checksum = "f9d839f2a20b0aee515dc581a6172f2321f96cab76c1a38a4c584a194955390e" +dependencies = [ + "getrandom 0.2.14", + "once_cell", + "tiny-keccak", +] [[package]] name = "constant_time_eq" -version = "0.2.6" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21a53c0a4d288377e7415b53dcfc3c04da5cdc2cc95c8d5ac178b58f0b861ad6" +checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" [[package]] name = "constant_time_eq" @@ -1280,9 +1555,9 @@ checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" [[package]] name = "core-foundation" -version = "0.9.3" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" dependencies = [ "core-foundation-sys", "libc", @@ -1290,9 +1565,9 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.4" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" +checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" [[package]] name = "core2" @@ -1324,36 +1599,36 @@ dependencies = [ [[package]] name = "cpufeatures" -version = "0.2.9" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a17b76ff3a4162b0b27f354a0c87015ddad39d35f9c0c36607a3bdd175dde1f1" +checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" dependencies = [ "libc", ] [[package]] name = "cranelift-bforest" -version = "0.88.2" +version = "0.95.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52056f6d0584484b57fa6c1a65c1fcb15f3780d8b6a758426d9e3084169b2ddd" +checksum = "1277fbfa94bc82c8ec4af2ded3e639d49ca5f7f3c7eeab2c66accd135ece4e70" dependencies = [ "cranelift-entity", ] [[package]] name = "cranelift-codegen" -version = "0.88.2" +version = "0.95.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18fed94c8770dc25d01154c3ffa64ed0b3ba9d583736f305fed7beebe5d9cf74" +checksum = "c6e8c31ad3b2270e9aeec38723888fe1b0ace3bea2b06b3f749ccf46661d3220" dependencies = [ - "arrayvec 0.7.4", "bumpalo", "cranelift-bforest", "cranelift-codegen-meta", "cranelift-codegen-shared", "cranelift-entity", "cranelift-isle", - "gimli 0.26.2", + "gimli 0.27.3", + "hashbrown 0.13.2", "log", "regalloc2", "smallvec", @@ -1362,33 +1637,33 @@ dependencies = [ [[package]] name = "cranelift-codegen-meta" -version = "0.88.2" +version = "0.95.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c451b81faf237d11c7e4f3165eeb6bac61112762c5cfe7b4c0fb7241474358f" +checksum = "c8ac5ac30d62b2d66f12651f6b606dbdfd9c2cfd0908de6b387560a277c5c9da" dependencies = [ "cranelift-codegen-shared", ] [[package]] name = "cranelift-codegen-shared" -version = "0.88.2" +version = "0.95.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7c940133198426d26128f08be2b40b0bd117b84771fd36798969c4d712d81fc" +checksum = "dd82b8b376247834b59ed9bdc0ddeb50f517452827d4a11bccf5937b213748b8" [[package]] name = "cranelift-entity" -version = "0.88.2" +version = "0.95.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87a0f1b2fdc18776956370cf8d9b009ded3f855350c480c1c52142510961f352" +checksum = "40099d38061b37e505e63f89bab52199037a72b931ad4868d9089ff7268660b0" dependencies = [ "serde", ] [[package]] name = "cranelift-frontend" -version = "0.88.2" +version = "0.95.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34897538b36b216cc8dd324e73263596d51b8cf610da6498322838b2546baf8a" +checksum = "64a25d9d0a0ae3079c463c34115ec59507b4707175454f0eee0891e83e30e82d" dependencies = [ "cranelift-codegen", "log", @@ -1398,15 +1673,15 @@ dependencies = [ [[package]] name = "cranelift-isle" -version = "0.88.2" +version = "0.95.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b2629a569fae540f16a76b70afcc87ad7decb38dc28fa6c648ac73b51e78470" +checksum = "80de6a7d0486e4acbd5f9f87ec49912bf4c8fb6aea00087b989685460d4469ba" [[package]] name = "cranelift-native" -version = "0.88.2" +version = "0.95.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20937dab4e14d3e225c5adfc9c7106bafd4ac669bdb43027b911ff794c6fb318" +checksum = "bb6b03e0e03801c4b3fd8ce0758a94750c07a44e7944cc0ffbf0d3f2e7c79b00" dependencies = [ "cranelift-codegen", "libc", @@ -1415,96 +1690,62 @@ dependencies = [ [[package]] name = "cranelift-wasm" -version = "0.88.2" +version = "0.95.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80fc2288957a94fd342a015811479de1837850924166d1f1856d8406e6f3609b" +checksum = "ff3220489a3d928ad91e59dd7aeaa8b3de18afb554a6211213673a71c90737ac" dependencies = [ "cranelift-codegen", "cranelift-entity", "cranelift-frontend", - "itertools", + "itertools 0.10.5", "log", "smallvec", "wasmparser", "wasmtime-types", ] -[[package]] -name = "crc" -version = "3.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86ec7a15cbe22e59248fc7eadb1907dab5ba09372595da4d73dd805ed4417dfe" -dependencies = [ - "crc-catalog", -] - -[[package]] -name = "crc-catalog" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cace84e55f07e7301bae1c519df89cdad8cc3cd868413d3fdbdeca9ff3db484" - [[package]] name = "crc32fast" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "crossbeam-channel" -version = "0.5.8" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a33c2bf77f2df06183c3aa30d1e96c0695a313d4f9c453cc3762a6db39f99200" +checksum = "b3855a8a784b474f333699ef2bbca9db2c4a1f6d9088a90a2d25b1eb53111eaa" dependencies = [ "cfg-if", - "crossbeam-utils", ] [[package]] name = "crossbeam-deque" -version = "0.8.3" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce6fd6f855243022dcecf8702fef0c297d4338e226845fe067f6341ad9fa0cef" +checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" dependencies = [ - "cfg-if", "crossbeam-epoch", "crossbeam-utils", ] [[package]] name = "crossbeam-epoch" -version = "0.9.15" +version = "0.9.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae211234986c545741a7dc064309f67ee1e5ad243d0e48335adc0484d960bcc7" +checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" dependencies = [ - "autocfg", - "cfg-if", "crossbeam-utils", - "memoffset 0.9.0", - "scopeguard", ] [[package]] name = "crossbeam-queue" -version = "0.3.8" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1cfb3ea8a53f37c40dea2c7bedcbd88bdfae54f5e2175d6ecaff1c988353add" +checksum = "df0346b5d5e76ac2fe4e327c5fd1118d6be7c51dfb18f9b7922923f287471e35" dependencies = [ - "cfg-if", "crossbeam-utils", ] [[package]] name = "crossbeam-utils" -version = "0.8.16" +version = "0.8.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" -dependencies = [ - "cfg-if", -] +checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" [[package]] name = "crunchy" @@ -1514,9 +1755,9 @@ checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" [[package]] name = "crypto-bigint" -version = "0.4.9" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef2b4b23cddf68b89b8f8069890e8c270d54e2d5fe1b143820234805e4cb17ef" +checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" dependencies = [ "generic-array 0.14.7", "rand_core 0.6.4", @@ -1532,7 +1773,7 @@ checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" dependencies = [ "generic-array 0.14.7", "rand_core 0.6.4", - "typenum 1.16.0 (registry+https://github.com/rust-lang/crates.io-index)", + "typenum", ] [[package]] @@ -1555,33 +1796,25 @@ dependencies = [ "subtle", ] -[[package]] -name = "ctr" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "049bb91fb4aaf0e3c7efa6cd5ef877dbbbd15b39dad06d9948de4ec8a75761ea" -dependencies = [ - "cipher 0.3.0", -] - [[package]] name = "ctr" version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835" dependencies = [ - "cipher 0.4.4", + "cipher", ] [[package]] name = "cumulus-client-cli" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.38#9b4e0247137f158d1a35118197d34adfa58858b7" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "clap", "parity-scale-codec", "sc-chain-spec", "sc-cli", + "sc-client-api", "sc-service", "sp-core", "sp-runtime", @@ -1591,14 +1824,14 @@ dependencies = [ [[package]] name = "cumulus-client-collator" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.38#9b4e0247137f158d1a35118197d34adfa58858b7" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "cumulus-client-consensus-common", "cumulus-client-network", "cumulus-primitives-core", - "futures 0.3.28", + "futures 0.3.30", "parity-scale-codec", - "parking_lot 0.12.1", + "parking_lot 0.12.2", "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-overseer", @@ -1614,37 +1847,43 @@ dependencies = [ [[package]] name = "cumulus-client-consensus-common" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.38#9b4e0247137f158d1a35118197d34adfa58858b7" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "async-trait", "cumulus-client-pov-recovery", "cumulus-primitives-core", "cumulus-relay-chain-interface", "dyn-clone", - "futures 0.3.28", + "futures 0.3.30", "log", "parity-scale-codec", "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-relay-chain" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.38#9b4e0247137f158d1a35118197d34adfa58858b7" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "async-trait", "cumulus-client-consensus-common", "cumulus-primitives-core", "cumulus-relay-chain-interface", - "futures 0.3.28", - "parking_lot 0.12.1", + "futures 0.3.30", + "parking_lot 0.12.2", "sc-consensus", "sp-api", "sp-block-builder", @@ -1660,16 +1899,16 @@ dependencies = [ [[package]] name = "cumulus-client-network" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.38#9b4e0247137f158d1a35118197d34adfa58858b7" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "async-trait", "cumulus-relay-chain-interface", - "futures 0.3.28", + "futures 0.3.30", "futures-timer", "parity-scale-codec", - "parking_lot 0.12.1", + "parking_lot 0.12.2", "polkadot-node-primitives", - "polkadot-parachain", + "polkadot-parachain-primitives", "polkadot-primitives", "sc-client-api", "sp-blockchain", @@ -1683,11 +1922,12 @@ dependencies = [ [[package]] name = "cumulus-client-pov-recovery" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.38#9b4e0247137f158d1a35118197d34adfa58858b7" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ + "async-trait", "cumulus-primitives-core", "cumulus-relay-chain-interface", - "futures 0.3.28", + "futures 0.3.30", "futures-timer", "parity-scale-codec", "polkadot-node-primitives", @@ -1706,35 +1946,42 @@ dependencies = [ [[package]] name = "cumulus-client-service" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.38#9b4e0247137f158d1a35118197d34adfa58858b7" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "cumulus-client-cli", "cumulus-client-collator", "cumulus-client-consensus-common", + "cumulus-client-network", "cumulus-client-pov-recovery", "cumulus-primitives-core", "cumulus-relay-chain-inprocess-interface", "cumulus-relay-chain-interface", "cumulus-relay-chain-minimal-node", - "futures 0.3.28", - "parking_lot 0.12.1", + "futures 0.3.30", "polkadot-primitives", "sc-client-api", "sc-consensus", + "sc-network", + "sc-network-sync", + "sc-network-transactions", + "sc-rpc", "sc-service", "sc-sysinfo", "sc-telemetry", + "sc-transaction-pool", + "sc-utils", "sp-api", "sp-blockchain", "sp-consensus", "sp-core", "sp-runtime", + "sp-transaction-pool", ] [[package]] name = "cumulus-pallet-dmp-queue" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.38#9b4e0247137f158d1a35118197d34adfa58858b7" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -1744,14 +1991,14 @@ dependencies = [ "scale-info", "sp-io", "sp-runtime", - "sp-std", - "xcm", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", + "staging-xcm", ] [[package]] name = "cumulus-pallet-parachain-system" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.38#9b4e0247137f158d1a35118197d34adfa58858b7" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "bytes", "cumulus-pallet-parachain-system-proc-macro", @@ -1763,7 +2010,7 @@ dependencies = [ "impl-trait-for-tuples", "log", "parity-scale-codec", - "polkadot-parachain", + "polkadot-parachain-primitives", "scale-info", "sp-core", "sp-externalities", @@ -1771,27 +2018,28 @@ dependencies = [ "sp-io", "sp-runtime", "sp-state-machine", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", "sp-trie", "sp-version", - "xcm", + "staging-xcm", + "trie-db", ] [[package]] name = "cumulus-pallet-parachain-system-proc-macro" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.38#9b4e0247137f158d1a35118197d34adfa58858b7" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.60", ] [[package]] name = "cumulus-pallet-xcm" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.38#9b4e0247137f158d1a35118197d34adfa58858b7" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -1800,14 +2048,14 @@ dependencies = [ "scale-info", "sp-io", "sp-runtime", - "sp-std", - "xcm", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", + "staging-xcm", ] [[package]] name = "cumulus-pallet-xcmp-queue" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.38#9b4e0247137f158d1a35118197d34adfa58858b7" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "cumulus-primitives-core", "frame-benchmarking", @@ -1820,31 +2068,32 @@ dependencies = [ "scale-info", "sp-io", "sp-runtime", - "sp-std", - "xcm", - "xcm-executor", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", + "staging-xcm", + "staging-xcm-executor", ] [[package]] name = "cumulus-primitives-core" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.38#9b4e0247137f158d1a35118197d34adfa58858b7" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "parity-scale-codec", "polkadot-core-primitives", - "polkadot-parachain", + "polkadot-parachain-primitives", "polkadot-primitives", + "scale-info", "sp-api", "sp-runtime", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", "sp-trie", - "xcm", + "staging-xcm", ] [[package]] name = "cumulus-primitives-parachain-inherent" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.38#9b4e0247137f158d1a35118197d34adfa58858b7" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "async-trait", "cumulus-primitives-core", @@ -1858,7 +2107,7 @@ dependencies = [ "sp-inherents", "sp-runtime", "sp-state-machine", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", "sp-storage", "sp-trie", "tracing", @@ -1867,20 +2116,20 @@ dependencies = [ [[package]] name = "cumulus-primitives-timestamp" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.38#9b4e0247137f158d1a35118197d34adfa58858b7" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "cumulus-primitives-core", - "futures 0.3.28", + "futures 0.3.30", "parity-scale-codec", "sp-inherents", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", "sp-timestamp", ] [[package]] name = "cumulus-primitives-utility" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.38#9b4e0247137f158d1a35118197d34adfa58858b7" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -1889,24 +2138,23 @@ dependencies = [ "polkadot-runtime-common", "sp-io", "sp-runtime", - "sp-std", - "xcm", - "xcm-builder", - "xcm-executor", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", ] [[package]] name = "cumulus-relay-chain-inprocess-interface" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.38#9b4e0247137f158d1a35118197d34adfa58858b7" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "async-trait", "cumulus-primitives-core", "cumulus-relay-chain-interface", - "futures 0.3.28", + "futures 0.3.30", "futures-timer", "polkadot-cli", - "polkadot-client", "polkadot-service", "sc-cli", "sc-client-api", @@ -1923,11 +2171,11 @@ dependencies = [ [[package]] name = "cumulus-relay-chain-interface" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.38#9b4e0247137f158d1a35118197d34adfa58858b7" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "async-trait", "cumulus-primitives-core", - "futures 0.3.28", + "futures 0.3.30", "jsonrpsee-core", "parity-scale-codec", "polkadot-overseer", @@ -1936,74 +2184,77 @@ dependencies = [ "sp-blockchain", "sp-state-machine", "thiserror", - "tokio", ] [[package]] name = "cumulus-relay-chain-minimal-node" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.38#9b4e0247137f158d1a35118197d34adfa58858b7" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ - "array-bytes 6.1.0", + "array-bytes", "async-trait", "cumulus-primitives-core", "cumulus-relay-chain-interface", "cumulus-relay-chain-rpc-interface", - "futures 0.3.28", - "lru 0.9.0", + "futures 0.3.30", + "polkadot-availability-recovery", + "polkadot-collator-protocol", "polkadot-core-primitives", - "polkadot-network-bridge 0.9.38 (git+https://github.com/paritytech/polkadot?branch=release-v0.9.38)", + "polkadot-network-bridge", + "polkadot-node-collation-generation", + "polkadot-node-core-runtime-api", "polkadot-node-network-protocol", "polkadot-node-subsystem-util", "polkadot-overseer", "polkadot-primitives", - "polkadot-service", "sc-authority-discovery", - "sc-client-api", - "sc-consensus", - "sc-keystore", "sc-network", "sc-network-common", "sc-service", - "sc-telemetry", "sc-tracing", - "sc-transaction-pool", - "sc-transaction-pool-api", + "sc-utils", + "schnellru", "sp-api", - "sp-blockchain", "sp-consensus", "sp-consensus-babe", "sp-runtime", - "tokio", "tracing", - "url", ] [[package]] name = "cumulus-relay-chain-rpc-interface" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.38#9b4e0247137f158d1a35118197d34adfa58858b7" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "async-trait", "cumulus-primitives-core", "cumulus-relay-chain-interface", - "futures 0.3.28", + "either", + "futures 0.3.30", "futures-timer", "jsonrpsee", - "lru 0.9.0", "parity-scale-codec", - "polkadot-service", + "pin-project", + "polkadot-overseer", + "rand 0.8.5", "sc-client-api", "sc-rpc-api", + "sc-service", + "schnellru", "serde", "serde_json", + "smoldot", + "smoldot-light", "sp-api", "sp-authority-discovery", "sp-consensus-babe", "sp-core", + "sp-runtime", "sp-state-machine", "sp-storage", + "thiserror", "tokio", + "tokio-util", "tracing", "url", ] @@ -2011,14 +2262,15 @@ dependencies = [ [[package]] name = "cumulus-test-relay-sproof-builder" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.38#9b4e0247137f158d1a35118197d34adfa58858b7" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "cumulus-primitives-core", "parity-scale-codec", "polkadot-primitives", "sp-runtime", "sp-state-machine", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", + "sp-trie", ] [[package]] @@ -2049,23 +2301,50 @@ dependencies = [ [[package]] name = "curve25519-dalek" -version = "4.0.0-rc.1" +version = "4.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d4ba9852b42210c7538b75484f9daa0655e9a3ac04f693747bb0f02cf3cfe16" +checksum = "0a677b8922c94e01bdbb12126b0bc852f00447528dee1782229af9c720c3f348" dependencies = [ "cfg-if", + "cpufeatures", + "curve25519-dalek-derive", + "digest 0.10.7", "fiat-crypto", - "packed_simd_2", - "platforms 3.0.2", + "platforms", + "rustc_version 0.4.0", "subtle", "zeroize", ] +[[package]] +name = "curve25519-dalek-derive" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.60", +] + +[[package]] +name = "curve25519-dalek-ng" +version = "4.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c359b7249347e46fb28804470d071c921156ad62b3eef5d34e2ba867533dec8" +dependencies = [ + "byteorder", + "digest 0.9.0", + "rand_core 0.6.4", + "subtle-ng", + "zeroize", +] + [[package]] name = "cxx" -version = "1.0.102" +version = "1.0.121" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f68e12e817cb19eaab81aaec582b4052d07debd3c3c6b083b9d361db47c7dc9d" +checksum = "21db378d04296a84d8b7d047c36bb3954f0b46529db725d7e62fb02f9ba53ccc" dependencies = [ "cc", "cxxbridge-flags", @@ -2075,9 +2354,9 @@ dependencies = [ [[package]] name = "cxx-build" -version = "1.0.102" +version = "1.0.121" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e789217e4ab7cf8cc9ce82253180a9fe331f35f5d339f0ccfe0270b39433f397" +checksum = "3e5262a7fa3f0bae2a55b767c223ba98032d7c328f5c13fa5cdc980b77fc0658" dependencies = [ "cc", "codespan-reporting", @@ -2085,72 +2364,37 @@ dependencies = [ "proc-macro2", "quote", "scratch", - "syn 2.0.28", + "syn 2.0.60", ] [[package]] name = "cxxbridge-flags" -version = "1.0.102" +version = "1.0.121" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78a19f4c80fd9ab6c882286fa865e92e07688f4387370a209508014ead8751d0" +checksum = "be8dcadd2e2fb4a501e1d9e93d6e88e6ea494306d8272069c92d5a9edf8855c0" [[package]] name = "cxxbridge-macro" -version = "1.0.102" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8fcfa71f66c8563c4fa9dd2bb68368d50267856f831ac5d85367e0805f9606c" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.28", -] - -[[package]] -name = "darling" -version = "0.14.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b750cb3417fd1b327431a470f388520309479ab0bf5e323505daf0290cd3850" -dependencies = [ - "darling_core", - "darling_macro", -] - -[[package]] -name = "darling_core" -version = "0.14.4" +version = "1.0.121" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "109c1ca6e6b7f82cc233a97004ea8ed7ca123a9af07a8230878fcfda9b158bf0" +checksum = "ad08a837629ad949b73d032c637653d069e909cffe4ee7870b02301939ce39cc" dependencies = [ - "fnv", - "ident_case", "proc-macro2", "quote", - "strsim", - "syn 1.0.109", -] - -[[package]] -name = "darling_macro" -version = "0.14.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4aab4dbc9f7611d8b55048a3a16d2d010c2c8334e46304b40ac1cc14bf3b48e" -dependencies = [ - "darling_core", - "quote", - "syn 1.0.109", + "syn 2.0.60", ] [[package]] name = "data-encoding" -version = "2.4.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2e66c9d817f1720209181c316d28635c050fa304f9c79e47a520882661b7308" +checksum = "e8566979429cf69b49a5c740c60791108e86440e8be149bbea4fe54d2c32d6e2" [[package]] name = "data-encoding-macro" -version = "0.1.13" +version = "0.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c904b33cc60130e1aeea4956ab803d08a3f4a0ca82d64ed757afac3891f2bb99" +checksum = "f1559b6cba622276d6d63706db152618eeb15b89b3e4041446b05876e352e639" dependencies = [ "data-encoding", "data-encoding-macro-internal", @@ -2158,9 +2402,9 @@ dependencies = [ [[package]] name = "data-encoding-macro-internal" -version = "0.1.11" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fdf3fce3ce863539ec1d7fd1b6dcc3c645663376b43ed376bbf887733e4f772" +checksum = "332d754c0af53bc87c108fed664d121ecf59207ec4196041f04d6ab9002ad33f" dependencies = [ "data-encoding", "syn 1.0.109", @@ -2168,36 +2412,21 @@ dependencies = [ [[package]] name = "der" -version = "0.6.1" +version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1a467a65c5e759bce6e65eaf91cc29f466cdc57cb65777bd646872a8a1fd4de" +checksum = "f55bf8e7b65898637379c1b74eb1551107c8294ed26d855ceb9fd1a09cfc9bc0" dependencies = [ "const-oid", - "pem-rfc7468", "zeroize", ] -[[package]] -name = "der-parser" -version = "7.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe398ac75057914d7d07307bf67dc7f3f574a26783b4fc7805a20ffa9f506e82" -dependencies = [ - "asn1-rs 0.3.1", - "displaydoc", - "nom", - "num-bigint", - "num-traits", - "rusticata-macros", -] - [[package]] name = "der-parser" version = "8.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dbd676fbbab537128ef0278adb5576cf363cff6aa22a7b24effe97347cfab61e" dependencies = [ - "asn1-rs 0.5.2", + "asn1-rs", "displaydoc", "nom", "num-bigint", @@ -2207,9 +2436,12 @@ dependencies = [ [[package]] name = "deranged" -version = "0.3.6" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8810e7e2cf385b1e9b50d68264908ec367ba642c96d02edfe61c39e88e2a3c01" +checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" +dependencies = [ + "powerfmt", +] [[package]] name = "derivative" @@ -2234,45 +2466,25 @@ dependencies = [ ] [[package]] -name = "derive_arbitrary" -version = "1.3.1" +name = "derive-syn-parse" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53e0efad4403bfc52dc201159c4b842a246a14b98c64b55dfd0f2d89729dfeb8" +checksum = "d65d7ce8132b7c0e54497a4d9a55a1c2a0912a0d786cf894472ba818fba45762" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", -] - -[[package]] -name = "derive_builder" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d07adf7be193b71cc36b193d0f5fe60b918a3a9db4dad0449f57bcfd519704a3" -dependencies = [ - "derive_builder_macro", + "syn 2.0.60", ] [[package]] -name = "derive_builder_core" -version = "0.11.2" +name = "derive_arbitrary" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f91d4cfa921f1c05904dc3c57b4a32c38aed3340cce209f3a6fd1478babafc4" +checksum = "67e77553c4162a157adbf834ebae5b415acbecbeafc7a74b0e886657506a7611" dependencies = [ - "darling", "proc-macro2", "quote", - "syn 1.0.109", -] - -[[package]] -name = "derive_builder_macro" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f0314b72bed045f3a68671b3c86328386762c93f82d98c65c3cb5e5f573dd68" -dependencies = [ - "derive_builder_core", - "syn 1.0.109", + "syn 2.0.60", ] [[package]] @@ -2319,6 +2531,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ "block-buffer 0.10.4", + "const-oid", "crypto-common", "subtle", ] @@ -2372,7 +2585,51 @@ checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.60", +] + +[[package]] +name = "dleq_vrf" +version = "0.0.2" +source = "git+https://github.com/w3f/ring-vrf?rev=3119f51#3119f51b54b69308abfb0671f6176cb125ae1bf1" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-scale 0.0.10", + "ark-secret-scalar", + "ark-serialize", + "ark-std", + "ark-transcript", + "arrayvec 0.7.4", + "rand_core 0.6.4", + "zeroize", +] + +[[package]] +name = "docify" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43a2f138ad521dc4a2ced1a4576148a6a610b4c5923933b062a263130a6802ce" +dependencies = [ + "docify_macros", +] + +[[package]] +name = "docify_macros" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a081e51fb188742f5a7a1164ad752121abcb22874b21e2c3b0dd040c515fdad" +dependencies = [ + "common-path", + "derive-syn-parse 0.2.0", + "once_cell", + "proc-macro2", + "quote", + "regex", + "syn 2.0.60", + "termcolor", + "toml 0.8.2", + "walkdir", ] [[package]] @@ -2383,9 +2640,9 @@ checksum = "1435fa1053d8b2fbbe9be7e97eca7f33d37b28409959813daefc1446a14247f1" [[package]] name = "downcast-rs" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" +checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2" [[package]] name = "dtoa" @@ -2416,42 +2673,46 @@ dependencies = [ [[package]] name = "dyn-clone" -version = "1.0.12" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "304e6508efa593091e97a9abbc10f90aa7ca635b6d2784feff3c89d41dd12272" +checksum = "0d6ef0072f8a535281e4876be788938b528e9a1d43900b82c2569af7da799125" [[package]] name = "ecdsa" -version = "0.14.8" +version = "0.16.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "413301934810f597c1d19ca71c8710e99a3f1ba28a0d2ebc01551a2daeea3c5c" +checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" dependencies = [ "der", + "digest 0.10.7", "elliptic-curve", "rfc6979", "signature", + "spki", ] [[package]] name = "ed25519" -version = "1.5.3" +version = "2.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91cff35c70bba8a626e3185d8cd48cc11b5437e1a5bcd15b9b5fa3c64b6dfee7" +checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53" dependencies = [ + "pkcs8", "signature", ] [[package]] name = "ed25519-dalek" -version = "1.0.1" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c762bae6dcaf24c4c84667b8579785430908723d5c889f469d76a41d59cc7a9d" +checksum = "4a3daa8e81a3963a60642bcc1f90a670680bd4a77535faa384e9d1c79d620871" dependencies = [ - "curve25519-dalek 3.2.0", + "curve25519-dalek 4.1.2", "ed25519", - "rand 0.7.3", + "rand_core 0.6.4", "serde", - "sha2 0.9.9", + "sha2 0.10.8", + "subtle", "zeroize", ] @@ -2469,27 +2730,39 @@ dependencies = [ "zeroize", ] +[[package]] +name = "ed25519-zebra" +version = "4.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d9ce6874da5d4415896cd45ffbc4d1cfc0c4f9c079427bd870742c30f2f65a9" +dependencies = [ + "curve25519-dalek 4.1.2", + "ed25519", + "hashbrown 0.14.5", + "hex", + "rand_core 0.6.4", + "sha2 0.10.8", + "zeroize", +] + [[package]] name = "either" -version = "1.9.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" +checksum = "a47c1c47d2f5964e29c61246e81db715514cd532db6b5116a25ea3c03d6780a2" [[package]] name = "elliptic-curve" -version = "0.12.3" +version = "0.13.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7bb888ab5300a19b8e5bceef25ac745ad065f3c9f7efc6de1b91958110891d3" +checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" dependencies = [ "base16ct", "crypto-bigint", - "der", "digest 0.10.7", "ff", "generic-array 0.14.7", "group", - "hkdf", - "pem-rfc7468", "pkcs8", "rand_core 0.6.4", "sec1", @@ -2497,13 +2770,19 @@ dependencies = [ "zeroize", ] +[[package]] +name = "encode_unicode" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" + [[package]] name = "enum-as-inner" version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c9720bba047d567ffc8a3cba48bf19126600e249ab7f128e9233e6376976a116" dependencies = [ - "heck", + "heck 0.4.1", "proc-macro2", "quote", "syn 1.0.109", @@ -2511,33 +2790,33 @@ dependencies = [ [[package]] name = "enumflags2" -version = "0.7.7" +version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c041f5090df68b32bcd905365fd51769c8b9d553fe87fde0b683534f10c01bd2" +checksum = "3278c9d5fb675e0a51dabcf4c0d355f692b064171535ba72361be1528a9d8e8d" dependencies = [ "enumflags2_derive", ] [[package]] name = "enumflags2_derive" -version = "0.7.7" +version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e9a1f9f7d83e59740248a6e14ecf93929ade55027844dfcea78beafccc15745" +checksum = "5c785274071b1b420972453b306eeca06acf4633829db4223b58a2a8c5953bc4" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.60", ] [[package]] name = "enumn" -version = "0.1.11" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b893c4eb2dc092c811165f84dc7447fae16fb66521717968c34c509b39b1a5c5" +checksum = "6fd000fd6988e73bbe993ea3db9b1aa64906ab88766d654973924340c8cddb42" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.60", ] [[package]] @@ -2555,9 +2834,9 @@ dependencies = [ [[package]] name = "env_logger" -version = "0.10.1" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95b3f3e67048839cb0d0781f445682a35113da7121f7c949db0e2be96a4fbece" +checksum = "4cd405aab171cb85d6735e5c8d9db038c17d3ca007a4d2c25f337935c3d90580" dependencies = [ "humantime", "is-terminal", @@ -2580,41 +2859,72 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.2.8" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f639046355ee4f37944e44f60642c6f3a7efa3cf6b78c78a0d989a8ce6c396a1" +checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" dependencies = [ - "errno-dragonfly", "libc", - "winapi", + "windows-sys 0.52.0", ] [[package]] -name = "errno" -version = "0.3.2" +name = "event-listener" +version = "2.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" + +[[package]] +name = "event-listener" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b30f669a7961ef1631673d2766cc92f52d64f7ef354d4fe0ddfd30ed52f0f4f" +checksum = "d93877bcde0eb80ca09131a08d23f0a5c18a620b01db137dba666d18cd9b30c2" dependencies = [ - "errno-dragonfly", - "libc", - "windows-sys 0.48.0", + "concurrent-queue", + "parking", + "pin-project-lite 0.2.14", ] [[package]] -name = "errno-dragonfly" -version = "0.1.2" +name = "event-listener" +version = "4.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" +checksum = "67b215c49b2b248c855fb73579eb1f4f26c38ffdc12973e20e07b91d78d5646e" dependencies = [ - "cc", - "libc", + "concurrent-queue", + "parking", + "pin-project-lite 0.2.14", ] [[package]] name = "event-listener" -version = "2.5.3" +version = "5.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" +checksum = "6d9944b8ca13534cdfb2800775f8dd4902ff3fc75a50101466decadfdf322a24" +dependencies = [ + "concurrent-queue", + "parking", + "pin-project-lite 0.2.14", +] + +[[package]] +name = "event-listener-strategy" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "958e4d70b6d5e81971bebec42271ec641e7ff4e170a6fa605f2b8a8b65cb97d3" +dependencies = [ + "event-listener 4.0.3", + "pin-project-lite 0.2.14", +] + +[[package]] +name = "event-listener-strategy" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f214dc438f977e6d4e3500aaa277f5ad94ca83fbbd9b1a15713ce2344ccc5a1" +dependencies = [ + "event-listener 5.3.0", + "pin-project-lite 0.2.14", +] [[package]] name = "exit-future" @@ -2622,7 +2932,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e43f2f1833d64e33f15592464d6fdd70f349dda7b1a53088eb83cd94014008c5" dependencies = [ - "futures 0.3.28", + "futures 0.3.30", ] [[package]] @@ -2647,7 +2957,20 @@ dependencies = [ "fs-err", "proc-macro2", "quote", - "syn 1.0.109", +] + +[[package]] +name = "expander" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00e83c02035136f1592a47964ea60c05a50e4ed8b5892cfac197063850898d4d" +dependencies = [ + "blake2", + "fs-err", + "prettier-please", + "proc-macro2", + "quote", + "syn 2.0.60", ] [[package]] @@ -2673,9 +2996,9 @@ dependencies = [ [[package]] name = "fastrand" -version = "2.0.0" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6999dc1837253364c2ebb0704ba97994bd874e8f195d665c50b7548f6ea92764" +checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" [[package]] name = "fatality" @@ -2695,7 +3018,7 @@ checksum = "f5aa1e3ae159e592ad222dc90c5acbad632b527779ba88486abe92782ab268bd" dependencies = [ "expander 0.0.4", "indexmap 1.9.3", - "proc-macro-crate", + "proc-macro-crate 1.3.1", "proc-macro2", "quote", "syn 1.0.109", @@ -2713,19 +3036,32 @@ dependencies = [ [[package]] name = "ff" -version = "0.12.1" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d013fc25338cc558c5c2cfbad646908fb23591e2404481826742b651c9af7160" +checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" dependencies = [ "rand_core 0.6.4", "subtle", ] +[[package]] +name = "fflonk" +version = "0.1.0" +source = "git+https://github.com/w3f/fflonk#1e854f35e9a65d08b11a86291405cdc95baa0a35" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-poly", + "ark-serialize", + "ark-std", + "merlin 3.0.0", +] + [[package]] name = "fiat-crypto" -version = "0.1.20" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e825f6987101665dea6ec934c09ec6d721de7bc1bf92248e1d5810c8cd636b77" +checksum = "38793c55593b33412e3ae40c2c9781ffaa6f438f6f8c10f24e71846fbd7ae01e" [[package]] name = "file-per-thread-logger" @@ -2733,20 +3069,20 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "84f2e425d9790201ba4af4630191feac6dcc98765b118d4d18e91d23c2353866" dependencies = [ - "env_logger 0.10.1", + "env_logger 0.10.2", "log", ] [[package]] name = "filetime" -version = "0.2.21" +version = "0.2.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cbc844cecaee9d4443931972e1289c8ff485cb4cc2767cb03ca139ed6885153" +checksum = "1ee447700ac8aa0b2f2bd7bc4462ad686ba06baa6727ac149a2d6277f0d240fd" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.2.16", - "windows-sys 0.48.0", + "redox_syscall 0.4.1", + "windows-sys 0.52.0", ] [[package]] @@ -2756,12 +3092,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "36530797b9bf31cd4ff126dcfee8170f86b00cfdcea3269d73133cc0415945c3" dependencies = [ "either", - "futures 0.3.28", + "futures 0.3.30", "futures-timer", "log", "num-traits", "parity-scale-codec", - "parking_lot 0.12.1", + "parking_lot 0.12.2", "scale-info", ] @@ -2775,7 +3111,7 @@ dependencies = [ "bytemuck", "half", "num-traits", - "typenum 1.16.0 (registry+https://github.com/rust-lang/crates.io-index)", + "typenum", ] [[package]] @@ -2798,9 +3134,9 @@ checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" [[package]] name = "flate2" -version = "1.0.26" +version = "1.0.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b9429470923de8e8cbd4d2dc513535400b4b3fef0319fb5c4e1f520a7bef743" +checksum = "5f54427cfd1c7829e2a139fcefea601bf088ebca651d2bf53ebc600eac295dae" dependencies = [ "crc32fast", "libz-sys", @@ -2825,16 +3161,16 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "fork-tree" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "parity-scale-codec", ] [[package]] name = "form_urlencoded" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" dependencies = [ "percent-encoding", ] @@ -2848,7 +3184,7 @@ checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" [[package]] name = "frame-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-support", "frame-support-procedural", @@ -2865,7 +3201,7 @@ dependencies = [ "sp-io", "sp-runtime", "sp-runtime-interface", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", "sp-storage", "static_assertions", ] @@ -2873,10 +3209,10 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "Inflector", - "array-bytes 4.2.0", + "array-bytes", "chrono", "clap", "comfy-table", @@ -2885,7 +3221,7 @@ dependencies = [ "frame-system", "gethostname", "handlebars", - "itertools", + "itertools 0.10.5", "lazy_static", "linked-hash-map", "log", @@ -2907,12 +3243,13 @@ dependencies = [ "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", ] @@ -2920,53 +3257,54 @@ dependencies = [ [[package]] name = "frame-election-provider-solution-type" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.60", ] [[package]] name = "frame-election-provider-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-election-provider-solution-type", "frame-support", "frame-system", "parity-scale-codec", "scale-info", - "sp-arithmetic", + "sp-arithmetic 16.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", "sp-core", "sp-npos-elections", "sp-runtime", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", ] [[package]] name = "frame-executive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-support", "frame-system", "frame-try-runtime", + "log", "parity-scale-codec", "scale-info", "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", "sp-tracing", ] [[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", @@ -2977,93 +3315,111 @@ dependencies = [ [[package]] name = "frame-remote-externalities" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ - "futures 0.3.28", + "async-recursion", + "futures 0.3.30", + "indicatif", + "jsonrpsee", "log", "parity-scale-codec", "serde", "sp-core", "sp-io", "sp-runtime", + "sp-state-machine", + "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.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ + "aquamarine", "bitflags 1.3.2", + "docify", + "environmental", "frame-metadata", "frame-support-procedural", "impl-trait-for-tuples", "k256", "log", - "once_cell", + "macro_magic", "parity-scale-codec", "paste", "scale-info", "serde", + "serde_json", "smallvec", "sp-api", - "sp-arithmetic", + "sp-arithmetic 16.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", "sp-core", "sp-core-hashing-proc-macro", + "sp-debug-derive", + "sp-genesis-builder", "sp-inherents", "sp-io", + "sp-metadata-ir", "sp-runtime", "sp-staking", "sp-state-machine", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", "sp-tracing", "sp-weights", + "static_assertions", "tt-call", ] [[package]] name = "frame-support-procedural" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "Inflector", "cfg-expr", - "derive-syn-parse", + "derive-syn-parse 0.1.5", + "expander 2.1.0", "frame-support-procedural-tools", - "itertools", + "itertools 0.10.5", + "macro_magic", + "proc-macro-warning", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.60", ] [[package]] name = "frame-support-procedural-tools" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-support-procedural-tools-derive", - "proc-macro-crate", + "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.60", ] [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.60", ] [[package]] name = "frame-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ + "cfg-if", "frame-support", "log", "parity-scale-codec", @@ -3072,7 +3428,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", "sp-version", "sp-weights", ] @@ -3080,7 +3436,7 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-benchmarking", "frame-support", @@ -3089,13 +3445,13 @@ dependencies = [ "scale-info", "sp-core", "sp-runtime", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", ] [[package]] name = "frame-system-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "parity-scale-codec", "sp-api", @@ -3104,20 +3460,23 @@ dependencies = [ [[package]] name = "frame-try-runtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-support", "parity-scale-codec", "sp-api", "sp-runtime", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", ] [[package]] name = "fs-err" -version = "2.9.0" +version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0845fa252299212f0389d64ba26f34fa32cfe41588355f21ed507c59a0f64541" +checksum = "88a41f105fe1d5b6b34b2055e3dc59bb79b46b48b2040b9e6c7b4b5de097aa41" +dependencies = [ + "autocfg", +] [[package]] name = "fs2" @@ -3129,6 +3488,16 @@ dependencies = [ "winapi", ] +[[package]] +name = "fs4" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2eeb4ed9e12f43b7fa0baae3f9cdda28352770132ef2e09a23760c29cae8bd47" +dependencies = [ + "rustix 0.38.34", + "windows-sys 0.48.0", +] + [[package]] name = "funty" version = "2.0.0" @@ -3143,9 +3512,9 @@ checksum = "3a471a38ef8ed83cd6e40aa59c1ffe17db6855c18e3604d9c4ed8c08ebc28678" [[package]] name = "futures" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23342abe12aba583913b2e62f22225ff9c950774065e4bfb61a19cd9770fec40" +checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" dependencies = [ "futures-channel", "futures-core", @@ -3158,9 +3527,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2" +checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" dependencies = [ "futures-core", "futures-sink", @@ -3168,15 +3537,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" +checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" [[package]] name = "futures-executor" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccecee823288125bd88b4d7f565c9e58e41858e47ab72e8ea2d64e93624386e0" +checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" dependencies = [ "futures-core", "futures-task", @@ -3186,9 +3555,9 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" +checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" [[package]] name = "futures-lite" @@ -3201,19 +3570,32 @@ dependencies = [ "futures-io", "memchr", "parking", - "pin-project-lite 0.2.10", + "pin-project-lite 0.2.14", "waker-fn", ] +[[package]] +name = "futures-lite" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52527eb5074e35e9339c6b4e8d12600c7128b68fb25dcb9fa9dec18f7c25f3a5" +dependencies = [ + "fastrand 2.1.0", + "futures-core", + "futures-io", + "parking", + "pin-project-lite 0.2.14", +] + [[package]] name = "futures-macro" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" +checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.60", ] [[package]] @@ -3223,33 +3605,33 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2411eed028cdf8c8034eaf21f9915f956b6c3abec4d4c7949ee67f0721127bd" dependencies = [ "futures-io", - "rustls 0.20.8", - "webpki 0.22.0", + "rustls 0.20.9", + "webpki", ] [[package]] name = "futures-sink" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e" +checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" [[package]] name = "futures-task" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" +checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" [[package]] name = "futures-timer" -version = "3.0.2" +version = "3.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c" +checksum = "f288b0a4f20f9a56b5d1da57e2227c661b7b16168e2f72365f57b63326e29b24" [[package]] name = "futures-util" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" +checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" dependencies = [ "futures 0.1.31", "futures-channel", @@ -3259,7 +3641,7 @@ dependencies = [ "futures-sink", "futures-task", "memchr", - "pin-project-lite 0.2.10", + "pin-project-lite 0.2.14", "pin-utils", "slab", ] @@ -3279,7 +3661,7 @@ version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ffdf9f34f1447443d37393cc6c2b8313aebddcd96906caf34e54c68d8e57d7bd" dependencies = [ - "typenum 1.16.0 (registry+https://github.com/rust-lang/crates.io-index)", + "typenum", ] [[package]] @@ -3288,8 +3670,9 @@ version = "0.14.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" dependencies = [ - "typenum 1.16.0 (registry+https://github.com/rust-lang/crates.io-index)", + "typenum", "version_check", + "zeroize", ] [[package]] @@ -3315,9 +3698,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.10" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" +checksum = "94b22e06ecb0110981051723910cbf0b5f5e09a2062dd7663334ee79a9d1286c" dependencies = [ "cfg-if", "libc", @@ -3325,30 +3708,29 @@ dependencies = [ ] [[package]] -name = "ghash" -version = "0.4.4" +name = "getrandom_or_panic" +version = "0.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1583cc1656d7839fd3732b80cf4f38850336cdb9b8ded1cd399ca62958de3c99" +checksum = "6ea1015b5a70616b688dc230cfe50c8af89d972cb132d5a622814d29773b10b9" dependencies = [ - "opaque-debug 0.3.0", - "polyval 0.5.3", + "rand_core 0.6.4", ] [[package]] name = "ghash" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d930750de5717d2dd0b8c0d42c076c0e884c81a73e6cab859bbd2339c71e3e40" +checksum = "f0d8a4362ccb29cb0b265253fb0a2728f592895ee6854fd9bc13f2ffda266ff1" dependencies = [ - "opaque-debug 0.3.0", - "polyval 0.6.1", + "opaque-debug 0.3.1", + "polyval", ] [[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", @@ -3357,9 +3739,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.27.3" +version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6c80984affa11d98d1b88b66ac8853f143217b399d3c74116778ff8fdb4ed2e" +checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" [[package]] name = "glob" @@ -3369,22 +3751,22 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" [[package]] name = "globset" -version = "0.4.12" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aca8bbd8e0707c1887a8bbb7e6b40e228f251ff5d62c8220a4a7a53c73aff006" +checksum = "57da3b9b5b85bd66f31093f8c408b90a74431672542466497dcbdfdc02034be1" dependencies = [ "aho-corasick", "bstr", - "fnv", "log", - "regex", + "regex-automata 0.4.6", + "regex-syntax 0.8.3", ] [[package]] name = "group" -version = "0.12.1" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dfbfb3a6cfbd390d5c9564ab283a0349b9b9fcd46a706c1eb10e0db70bfbac7" +checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" dependencies = [ "ff", "rand_core 0.6.4", @@ -3393,9 +3775,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.20" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97ec8491ebaf99c8eaa73058b045fe58073cd6be7f596ac993ced0b0a0c01049" +checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" dependencies = [ "bytes", "fnv", @@ -3403,7 +3785,7 @@ dependencies = [ "futures-sink", "futures-util", "http", - "indexmap 1.9.3", + "indexmap 2.2.6", "slab", "tokio", "tokio-util", @@ -3412,15 +3794,15 @@ dependencies = [ [[package]] name = "half" -version = "1.8.2" +version = "1.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eabb4a44450da02c90444cf74558da904edde8fb4e9035a9a6a4e15445af0bd7" +checksum = "1b43ede17f21864e81be2fa654110bf1e793774238d86ef8555c37e6519c0403" [[package]] name = "handlebars" -version = "4.3.7" +version = "4.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83c3372087601b532857d332f5957cbae686da52bb7810bf038c3e3c3cc2fa0d" +checksum = "faa67bab9ff362228eb3d00bd024a4965d8231bbb7921167f0cfa66c6626b225" dependencies = [ "log", "pest", @@ -3432,9 +3814,9 @@ dependencies = [ [[package]] name = "hash-db" -version = "0.15.2" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d23bd4e7b5eda0d0f3a307e8b381fdc8ba9000f26fbe912250c0a4cc3956364a" +checksum = "8e7d7786361d7425ae2fe4f9e407eb0efaa0840f5212d109cc018c40c35c6ab4" [[package]] name = "hash256-std-hasher" @@ -3451,7 +3833,7 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" dependencies = [ - "ahash 0.7.6", + "ahash 0.7.8", ] [[package]] @@ -3460,14 +3842,19 @@ version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" dependencies = [ - "ahash 0.8.3", + "ahash 0.8.11", ] [[package]] name = "hashbrown" -version = "0.14.0" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" +dependencies = [ + "ahash 0.8.11", + "allocator-api2", + "serde", +] [[package]] name = "heck" @@ -3475,6 +3862,12 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + [[package]] name = "hermit-abi" version = "0.1.19" @@ -3486,9 +3879,9 @@ dependencies = [ [[package]] name = "hermit-abi" -version = "0.3.2" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "443144c8cdadd93ebf52ddb4056d257f5b52c04d3c804e657d19eb73fc33668b" +checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" [[package]] name = "hex" @@ -3498,15 +3891,15 @@ checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "hex-literal" -version = "0.3.4" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ebdb29d2ea9ed0083cd8cece49bbd968021bd99b0849edb4a9a7ee0fdf6a4e0" +checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" [[package]] name = "hkdf" -version = "0.12.3" +version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "791a029f6b9fc27657f6f188ec6e5e43f6911f6f878e0dc5501396e09809d437" +checksum = "7b5f8eb2ad728638ea2c7d47a21db23b7b58a72ed6a38256b8a1849f15fbbdf7" dependencies = [ "hmac 0.12.1", ] @@ -3551,6 +3944,15 @@ dependencies = [ "hmac 0.8.1", ] +[[package]] +name = "home" +version = "0.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" +dependencies = [ + "windows-sys 0.52.0", +] + [[package]] name = "hostname" version = "0.3.1" @@ -3564,9 +3966,9 @@ dependencies = [ [[package]] name = "http" -version = "0.2.9" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482" +checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" dependencies = [ "bytes", "fnv", @@ -3575,13 +3977,13 @@ dependencies = [ [[package]] name = "http-body" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" +checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" dependencies = [ "bytes", "http", - "pin-project-lite 0.2.10", + "pin-project-lite 0.2.14", ] [[package]] @@ -3598,9 +4000,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" @@ -3610,23 +4012,24 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hydra-dx-math" -version = "7.7.0" -source = "git+https://github.com/galacticcouncil/HydraDX-node?tag=v21.1.1#564553c30caa1eccfa1b6504ec8d5130201c8765" +version = "8.0.1" +source = "git+https://github.com/galacticcouncil/HydraDX-node?tag=v25.0.0#8abf856afa839b798c4e39e38af2b2901f55739b" dependencies = [ "fixed", "num-traits", "parity-scale-codec", "primitive-types", "scale-info", - "sp-arithmetic", - "sp-std", + "serde", + "sp-arithmetic 16.0.0 (git+https://github.com/paritytech/polkadot-sdk?rev=c8d2251cafadc108ba2f1f8a3208dc547ff38901)", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?rev=c8d2251cafadc108ba2f1f8a3208dc547ff38901)", ] [[package]] name = "hyper" -version = "0.14.27" +version = "0.14.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468" +checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80" dependencies = [ "bytes", "futures-channel", @@ -3638,8 +4041,8 @@ dependencies = [ "httparse", "httpdate", "itoa", - "pin-project-lite 0.2.10", - "socket2 0.4.9", + "pin-project-lite 0.2.14", + "socket2 0.5.7", "tokio", "tower-service", "tracing", @@ -3648,31 +4051,33 @@ dependencies = [ [[package]] name = "hyper-rustls" -version = "0.23.2" +version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1788965e61b367cd03a62950836d5cd41560c3577d90e40e0819373194d1661c" +checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" dependencies = [ + "futures-util", "http", "hyper", "log", - "rustls 0.20.8", + "rustls 0.21.12", "rustls-native-certs", "tokio", "tokio-rustls", + "webpki-roots 0.25.4", ] [[package]] name = "iana-time-zone" -version = "0.1.57" +version = "0.1.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fad5b825842d2b38bd206f3e81d6957625fd7f0a361e345c30e01a0ae2dd613" +checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" dependencies = [ "android_system_properties", "core-foundation-sys", "iana-time-zone-haiku", "js-sys", "wasm-bindgen", - "windows 0.48.0", + "windows-core 0.52.0", ] [[package]] @@ -3684,12 +4089,6 @@ dependencies = [ "cc", ] -[[package]] -name = "ident_case" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" - [[package]] name = "idna" version = "0.2.3" @@ -3703,9 +4102,9 @@ dependencies = [ [[package]] name = "idna" -version = "0.4.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" +checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" dependencies = [ "unicode-bidi", "unicode-normalization", @@ -3713,31 +4112,31 @@ dependencies = [ [[package]] name = "if-addrs" -version = "0.7.0" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbc0fa01ffc752e9dbc72818cdb072cd028b86be5e09dd04c5a643704fe101a9" +checksum = "cabb0019d51a643781ff15c9c8a3e5dedc365c47211270f4e8f82812fedd8f0a" dependencies = [ "libc", - "winapi", + "windows-sys 0.48.0", ] [[package]] name = "if-watch" -version = "3.0.1" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9465340214b296cd17a0009acdb890d6160010b8adf8f78a00d0d7ab270f79f" +checksum = "d6b0422c86d7ce0e97169cc42e04ae643caf278874a7a3c87b8150a220dc7e1e" dependencies = [ - "async-io", + "async-io 2.3.2", "core-foundation", "fnv", - "futures 0.3.28", + "futures 0.3.30", "if-addrs", "ipnet", "log", "rtnetlink", "system-configuration", "tokio", - "windows 0.34.0", + "windows", ] [[package]] @@ -3769,6 +4168,25 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "include_dir" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18762faeff7122e89e0857b02f7ce6fcc0d101d5e9ad2ad7846cc01d61b7f19e" +dependencies = [ + "include_dir_macros", +] + +[[package]] +name = "include_dir_macros" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b139284b5cf57ecfa712bcc66950bb635b31aff41c188e8a4cfc758eca374a3f" +dependencies = [ + "proc-macro2", + "quote", +] + [[package]] name = "indexmap" version = "1.9.3" @@ -3782,12 +4200,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.0.0" +version = "2.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" +checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" dependencies = [ "equivalent", - "hashbrown 0.14.0", + "hashbrown 0.14.5", ] [[package]] @@ -3796,6 +4214,19 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e04e2fd2b8188ea827b32ef11de88377086d690286ab35747ef7f9bf3ccb590" +[[package]] +name = "indicatif" +version = "0.17.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "763a5a8f45087d6bcea4222e7b72c291a054edf80e4ef6efd2a4979878c7bea3" +dependencies = [ + "console", + "instant", + "number_prefix", + "portable-atomic", + "unicode-width", +] + [[package]] name = "inout" version = "0.1.3" @@ -3829,38 +4260,13 @@ dependencies = [ "num-traits", ] -[[package]] -name = "interceptor" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e8a11ae2da61704edada656798b61c94b35ecac2c58eb955156987d5e6be90b" -dependencies = [ - "async-trait", - "bytes", - "log", - "rand 0.8.5", - "rtcp", - "rtp", - "thiserror", - "tokio", - "waitgroup", - "webrtc-srtp", - "webrtc-util", -] - -[[package]] -name = "io-lifetimes" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59ce5ef949d49ee85593fc4d3f3f95ad61657076395cbbce23e2121fc5542074" - [[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.2", + "hermit-abi 0.3.9", "libc", "windows-sys 0.48.0", ] @@ -3877,7 +4283,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b58db92f96b720de98181bbbe63c831e87005ab460c1bf306eb2622b4707997f" dependencies = [ - "socket2 0.5.3", + "socket2 0.5.7", "widestring", "windows-sys 0.48.0", "winreg", @@ -3885,19 +4291,28 @@ dependencies = [ [[package]] name = "ipnet" -version = "2.8.0" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28b29a3cd74f0f4598934efe3aeba42bae0eb4680554128851ebbecb02af14e6" +checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" [[package]] name = "is-terminal" -version = "0.4.9" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" +checksum = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b" dependencies = [ - "hermit-abi 0.3.2", - "rustix 0.38.4", - "windows-sys 0.48.0", + "hermit-abi 0.3.9", + "libc", + "windows-sys 0.52.0", +] + +[[package]] +name = "is_executable" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa9acdc6d67b75e626ad644734e8bc6df893d9cd2a834129065d3dd6158ea9c8" +dependencies = [ + "winapi", ] [[package]] @@ -3909,37 +4324,47 @@ dependencies = [ "either", ] +[[package]] +name = "itertools" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" +dependencies = [ + "either", +] + [[package]] name = "itoa" -version = "1.0.9" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" +checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" [[package]] name = "jobserver" -version = "0.1.26" +version = "0.1.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "936cfd212a0155903bcbc060e316fb6cc7cbf2e1907329391ebadc1fe0ce77c2" +checksum = "d2b099aaa34a9751c5bf0878add70444e1ed2dd73f347be99003d4577277de6e" dependencies = [ "libc", ] [[package]] name = "js-sys" -version = "0.3.64" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a" +checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" dependencies = [ "wasm-bindgen", ] [[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", "jsonrpsee-proc-macros", "jsonrpsee-server", "jsonrpsee-types", @@ -3949,9 +4374,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", @@ -3965,32 +4390,51 @@ dependencies = [ "tokio-rustls", "tokio-util", "tracing", - "webpki-roots", + "webpki-roots 0.25.4", ] [[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", - "async-lock", + "async-lock 2.8.0", + "async-trait", + "beef", + "futures-channel", + "futures-timer", + "futures-util", + "globset", + "hyper", + "jsonrpsee-types", + "parking_lot 0.12.2", + "rand 0.8.5", + "rustc-hash", + "serde", + "serde_json", + "soketto", + "thiserror", + "tokio", + "tracing", +] + +[[package]] +name = "jsonrpsee-http-client" +version = "0.16.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e5f9fabdd5d79344728521bb65e3106b49ec405a78b66fbff073b72b389fa43" +dependencies = [ "async-trait", - "beef", - "futures-channel", - "futures-timer", - "futures-util", - "globset", "hyper", + "hyper-rustls", + "jsonrpsee-core", "jsonrpsee-types", - "parking_lot 0.12.1", - "rand 0.8.5", "rustc-hash", "serde", "serde_json", - "soketto", "thiserror", "tokio", "tracing", @@ -3998,12 +4442,12 @@ 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", + "heck 0.4.1", + "proc-macro-crate 1.3.1", "proc-macro2", "quote", "syn 1.0.109", @@ -4011,9 +4455,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", @@ -4033,9 +4477,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", @@ -4047,9 +4491,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", @@ -4059,126 +4503,30 @@ dependencies = [ [[package]] name = "k256" -version = "0.11.6" +version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72c1e0b51e7ec0a97369623508396067a486bd0cbed95a2659a4b863d28cfc8b" +checksum = "956ff9b67e26e1a6a866cb758f12c6f8746208489e3e4a4b5580802f2f0a587b" dependencies = [ "cfg-if", "ecdsa", "elliptic-curve", - "sha2 0.10.7", + "once_cell", + "sha2 0.10.8", ] [[package]] name = "keccak" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f6d5ed8676d904364de097082f4e7d240b571b67989ced0240f08b7f966f940" +checksum = "ecc2af9a1119c51f12a14607e783cb977bde58bc069ff0c3da1095e635d70654" dependencies = [ "cpufeatures", ] -[[package]] -name = "kusama-runtime" -version = "0.9.38" -source = "git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes#20fcf6d7f070911b441925cb6f418b3d346af3a0" -dependencies = [ - "bitvec", - "frame-benchmarking", - "frame-election-provider-support", - "frame-executive", - "frame-support", - "frame-system", - "frame-system-benchmarking", - "frame-system-rpc-runtime-api", - "frame-try-runtime", - "hex-literal", - "kusama-runtime-constants", - "log", - "pallet-authority-discovery", - "pallet-authorship", - "pallet-babe", - "pallet-bags-list", - "pallet-balances", - "pallet-bounties", - "pallet-child-bounties", - "pallet-collective", - "pallet-conviction-voting", - "pallet-democracy", - "pallet-election-provider-multi-phase", - "pallet-election-provider-support-benchmarking", - "pallet-elections-phragmen", - "pallet-fast-unstake", - "pallet-grandpa", - "pallet-identity", - "pallet-im-online", - "pallet-indices", - "pallet-membership", - "pallet-multisig", - "pallet-nis", - "pallet-nomination-pools", - "pallet-nomination-pools-benchmarking", - "pallet-nomination-pools-runtime-api", - "pallet-offences", - "pallet-offences-benchmarking", - "pallet-preimage", - "pallet-proxy", - "pallet-ranked-collective", - "pallet-recovery", - "pallet-referenda", - "pallet-scheduler", - "pallet-session", - "pallet-session-benchmarking", - "pallet-society", - "pallet-staking", - "pallet-timestamp", - "pallet-tips", - "pallet-transaction-payment", - "pallet-transaction-payment-rpc-runtime-api", - "pallet-treasury", - "pallet-utility", - "pallet-vesting", - "pallet-whitelist", - "pallet-xcm", - "pallet-xcm-benchmarks", - "parity-scale-codec", - "polkadot-primitives", - "polkadot-runtime-common", - "polkadot-runtime-parachains", - "rustc-hex", - "scale-info", - "serde", - "serde_derive", - "smallvec", - "sp-api", - "sp-arithmetic", - "sp-authority-discovery", - "sp-beefy", - "sp-block-builder", - "sp-consensus-babe", - "sp-core", - "sp-inherents", - "sp-io", - "sp-mmr-primitives", - "sp-npos-elections", - "sp-offchain", - "sp-runtime", - "sp-session", - "sp-staking", - "sp-std", - "sp-transaction-pool", - "sp-version", - "static_assertions", - "substrate-wasm-builder", - "xcm", - "xcm-builder", - "xcm-executor", -] - [[package]] name = "kusama-runtime-constants" -version = "0.9.38" -source = "git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes#20fcf6d7f070911b441925cb6f418b3d346af3a0" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-support", "polkadot-primitives", @@ -4205,23 +4553,34 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bf7a85fe66f9ff9cd74e169fdd2c94c6e1e74c412c99a73b4df3200b5d3760b2" dependencies = [ "kvdb", - "parking_lot 0.12.1", + "parking_lot 0.12.2", ] [[package]] name = "kvdb-rocksdb" -version = "0.17.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2182b8219fee6bd83aacaab7344e840179ae079d5216aa4e249b4d704646a844" +checksum = "b644c70b92285f66bfc2032922a79000ea30af7bc2ab31902992a5dcb9b434f6" dependencies = [ "kvdb", "num_cpus", - "parking_lot 0.12.1", + "parking_lot 0.12.2", "regex", "rocksdb", "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" @@ -4236,9 +4595,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.147" +version = "0.2.154" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" +checksum = "ae743338b92ff9146ce83992f766a31066a91a8c84a45e0e9f21e7cf6de6d346" [[package]] name = "libfuzzer-sys" @@ -4253,44 +4612,40 @@ dependencies = [ [[package]] name = "libloading" -version = "0.7.4" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" +checksum = "0c2a198fb6b0eada2a8df47933734e6d35d350665a33a3593d7164fa52c75c19" dependencies = [ "cfg-if", - "winapi", + "windows-targets 0.52.5", ] [[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" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7012b1bbb0719e1097c47611d3898568c546d597c2e74d66f6087edd5233ff4" +checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" [[package]] name = "libp2p" -version = "0.50.1" +version = "0.51.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c7b0104790be871edcf97db9bd2356604984e623a08d825c3f27852290266b8" +checksum = "f35eae38201a993ece6bdc823292d6abd1bffed1c4d0f4a3517d2bd8e1d917fe" dependencies = [ "bytes", - "futures 0.3.28", + "futures 0.3.30", "futures-timer", - "getrandom 0.2.10", + "getrandom 0.2.14", "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", @@ -4298,47 +4653,34 @@ dependencies = [ "libp2p-swarm", "libp2p-tcp", "libp2p-wasm-ext", - "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 0.3.28", - "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", - "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]] @@ -4349,16 +4691,16 @@ checksum = "3c1df63c0b582aa434fb09b2d86897fa2b419ffeccf934b36f87fcedc8e835c2" dependencies = [ "either", "fnv", - "futures 0.3.28", + "futures 0.3.30", "futures-timer", "instant", "libp2p-identity", "log", - "multiaddr 0.17.1", - "multihash 0.17.0", + "multiaddr", + "multihash", "multistream-select", "once_cell", - "parking_lot 0.12.1", + "parking_lot 0.12.2", "pin-project", "quick-protobuf", "rand 0.8.5", @@ -4371,34 +4713,35 @@ 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 0.3.28", - "libp2p-core 0.38.0", + "futures 0.3.30", + "libp2p-core", "log", - "parking_lot 0.12.1", + "parking_lot 0.12.2", "smallvec", "trust-dns-resolver", ] [[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", - "futures 0.3.28", + "either", + "futures 0.3.30", "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", @@ -4406,43 +4749,43 @@ 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", + "bs58 0.4.0", "ed25519-dalek", "log", - "multiaddr 0.17.1", - "multihash 0.17.0", + "multiaddr", + "multihash", "quick-protobuf", "rand 0.8.5", - "sha2 0.10.7", + "sha2 0.10.8", "thiserror", "zeroize", ] [[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", "bytes", "either", "fnv", - "futures 0.3.28", + "futures 0.3.30", "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", + "sha2 0.10.8", "smallvec", "thiserror", "uint", @@ -4452,19 +4795,20 @@ 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 0.3.28", + "futures 0.3.30", "if-watch", - "libp2p-core 0.38.0", + "libp2p-core", + "libp2p-identity", "libp2p-swarm", "log", "rand 0.8.5", "smallvec", - "socket2 0.4.9", + "socket2 0.4.10", "tokio", "trust-dns-proto", "void", @@ -4472,11 +4816,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", @@ -4484,40 +4828,22 @@ 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 0.3.28", - "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 0.3.28", - "libp2p-core 0.38.0", + "futures 0.3.30", + "libp2p-core", + "libp2p-identity", "log", "once_cell", - "prost", - "prost-build", + "quick-protobuf", "rand 0.8.5", - "sha2 0.10.7", + "sha2 0.10.8", "snow", "static_assertions", "thiserror", @@ -4527,14 +4853,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 = [ - "futures 0.3.28", + "either", + "futures 0.3.30", "futures-timer", "instant", - "libp2p-core 0.38.0", + "libp2p-core", "libp2p-swarm", "log", "rand 0.8.5", @@ -4543,89 +4870,87 @@ 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 0.3.28", + "futures 0.3.30", "futures-timer", "if-watch", - "libp2p-core 0.38.0", + "libp2p-core", + "libp2p-identity", "libp2p-tls", "log", - "parking_lot 0.12.1", + "parking_lot 0.12.2", "quinn-proto", "rand 0.8.5", - "rustls 0.20.8", + "rustls 0.20.9", "thiserror", "tokio", ] [[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 0.3.28", + "futures 0.3.30", "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 0.3.28", + "futures 0.3.30", "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", + "heck 0.4.1", "quote", "syn 1.0.109", ] [[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 0.3.28", + "futures 0.3.30", "futures-timer", "if-watch", "libc", - "libp2p-core 0.38.0", + "libp2p-core", "log", - "socket2 0.4.9", + "socket2 0.4.10", "tokio", ] @@ -4635,102 +4960,80 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff08d13d0dc66e5e9ba6279c1de417b84fa0d0adc3b03e5732928c180ec02781" dependencies = [ - "futures 0.3.28", + "futures 0.3.30", "futures-rustls", - "libp2p-core 0.39.2", + "libp2p-core", "libp2p-identity", - "rcgen 0.10.0", - "ring", - "rustls 0.20.8", + "rcgen", + "ring 0.16.20", + "rustls 0.20.9", "thiserror", - "webpki 0.22.0", - "x509-parser 0.14.0", + "webpki", + "x509-parser", "yasna", ] [[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 0.3.28", + "futures 0.3.30", "js-sys", - "libp2p-core 0.38.0", + "libp2p-core", "parity-send-wrapper", "wasm-bindgen", "wasm-bindgen-futures", ] -[[package]] -name = "libp2p-webrtc" -version = "0.4.0-alpha" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdb6cd86dd68cba72308ea05de1cebf3ba0ae6e187c40548167955d4e3970f6a" -dependencies = [ - "async-trait", - "asynchronous-codec", - "bytes", - "futures 0.3.28", - "futures-timer", - "hex", - "if-watch", - "libp2p-core 0.38.0", - "libp2p-noise", - "log", - "multihash 0.16.3", - "prost", - "prost-build", - "prost-codec", - "rand 0.8.5", - "rcgen 0.9.3", - "serde", - "stun", - "thiserror", - "tinytemplate", - "tokio", - "tokio-util", - "webrtc", -] - [[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 0.3.28", + "futures 0.3.30", "futures-rustls", - "libp2p-core 0.38.0", + "libp2p-core", "log", - "parking_lot 0.12.1", + "parking_lot 0.12.2", "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 0.3.28", - "libp2p-core 0.38.0", + "futures 0.3.30", + "libp2p-core", "log", - "parking_lot 0.12.1", "thiserror", "yamux", ] +[[package]] +name = "libredox" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" +dependencies = [ + "bitflags 2.5.0", + "libc", +] + [[package]] name = "librocksdb-sys" -version = "0.8.3+7.4.4" +version = "0.11.0+8.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "557b255ff04123fcc176162f56ed0c9cd42d8f357cf55b3fabeb60f7413741b3" +checksum = "d3386f101bcb4bd252d8e9d2fb41ec3b0862a15a62b478c355b2982efa469e3e" dependencies = [ "bindgen", "bzip2-sys", @@ -4757,7 +5060,7 @@ dependencies = [ "rand 0.8.5", "serde", "sha2 0.9.9", - "typenum 1.16.0 (registry+https://github.com/rust-lang/crates.io-index)", + "typenum", ] [[package]] @@ -4791,9 +5094,9 @@ dependencies = [ [[package]] name = "libz-sys" -version = "1.1.12" +version = "1.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d97137b25e321a73eef1418d1d5d2eda4d77e12813f8e6dead84bc52c5870a7b" +checksum = "5e143b5e666b2695d28f6bca6497720813f699c9602dd7f5cac91008b8ada7f9" dependencies = [ "cc", "pkg-config", @@ -4826,19 +5129,18 @@ dependencies = [ [[package]] name = "linregress" -version = "0.4.4" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6c601a85f5ecd1aba625247bca0031585fb1c446461b142878a16f8245ddeb8" +checksum = "4de04dcecc58d366391f9920245b85ffa684558a5ef6e7736e754347c3aea9c2" dependencies = [ "nalgebra", - "statrs", ] [[package]] name = "linux-raw-sys" -version = "0.0.46" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4d2456c373231a208ad294c33dc5bff30051eafd954cd4caae83a712b12854d" +checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4" [[package]] name = "linux-raw-sys" @@ -4848,15 +5150,15 @@ checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" [[package]] name = "linux-raw-sys" -version = "0.4.5" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57bcfdad1b858c2db7c38303a6d2ad4dfaf5eb53dfeb0910128b2c26d6158503" +checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" [[package]] name = "lock_api" -version = "0.4.10" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1cc9717a20b1bb222f333e6a92fd32f7d8a18ddc5a3191a11af45dcbf4dcd16" +checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" dependencies = [ "autocfg", "scopeguard", @@ -4864,27 +5166,24 @@ dependencies = [ [[package]] name = "log" -version = "0.4.19" +version = "0.4.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b06a4cde4c0f271a446782e3eff8de789548ce57dbc8eca9292c27f4a42004b4" +checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" [[package]] name = "lru" -version = "0.8.1" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6e8aaa3f231bb4bd57b84b2d5dc3ae7f350265df8aa96492e0bc394a1571909" +checksum = "718e8fae447df0c7e1ba7f5189829e63fd536945c8988d61444c19039f16b670" dependencies = [ - "hashbrown 0.12.3", + "hashbrown 0.13.2", ] [[package]] name = "lru" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71e7d46de488603ffdd5f30afbc64fbba2378214a2c3a2fb83abf3d33126df17" -dependencies = [ - "hashbrown 0.13.2", -] +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4a83fb7698b3643a0e34f9ae6f2e8f0178c0fd42f8b59d493aa271ff3a5bf21" [[package]] name = "lru-cache" @@ -4924,6 +5223,60 @@ 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.60", +] + +[[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 0.1.5", + "macro_magic_core_macros", + "proc-macro2", + "quote", + "syn 2.0.60", +] + +[[package]] +name = "macro_magic_core_macros" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d710e1214dffbab3b5dacb21475dde7d6ed84c69ff722b3a47a782668d44fbac" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.60", +] + +[[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.60", +] + +[[package]] +name = "maplit" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e2e65a1a2e43cfcb47a895c4c8b10d1f4a61097f9f254f183aee60cad9c651d" + [[package]] name = "match_cfg" version = "0.1.0" @@ -4947,36 +5300,27 @@ checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5" [[package]] name = "matrixmultiply" -version = "0.3.7" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "090126dc04f95dc0d1c1c91f61bdd474b3930ca064c1edc8a849da2c6cbe1e77" +checksum = "7574c1cf36da4798ab73da5b215bbf444f50718207754cb522201d78d1cd0ff2" dependencies = [ "autocfg", "rawpointer", ] -[[package]] -name = "md-5" -version = "0.10.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6365506850d44bff6e2fbcb5176cf63650e48bd45ef2fe2665ae1570e0f4b9ca" -dependencies = [ - "digest 0.10.7", -] - [[package]] name = "memchr" -version = "2.5.0" +version = "2.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" +checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" [[package]] name = "memfd" -version = "0.6.3" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffc89ccdc6e10d6907450f753537ebc5c5d3460d2e4e62ea74bd571db62c0f9e" +checksum = "b2cffa4ad52c6f791f4f8b15f0c05f9824b2ced1160e88cc393d64fff9a8ac64" dependencies = [ - "rustix 0.37.23", + "rustix 0.38.34", ] [[package]] @@ -4990,47 +5334,22 @@ dependencies = [ [[package]] name = "memoffset" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" -dependencies = [ - "autocfg", -] - -[[package]] -name = "memoffset" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4" -dependencies = [ - "autocfg", -] - -[[package]] -name = "memoffset" -version = "0.9.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" +checksum = "d61c719bcfbcf5d62b3a09efa6088de8c54bc0bfcd3ea7ae39fcc186108b8de1" dependencies = [ "autocfg", ] [[package]] name = "memory-db" -version = "0.31.0" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e0c7cba9ce19ac7ffd2053ac9f49843bbd3f4318feedfd74e85c19d5fb0ba66" +checksum = "808b50db46293432a45e63bc15ea51e0ab4c0a1647b8eb114e31a3e698dd6fbe" dependencies = [ "hash-db", - "hashbrown 0.12.3", ] -[[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" @@ -5043,13 +5362,25 @@ dependencies = [ "zeroize", ] +[[package]] +name = "merlin" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58c38e2799fc0978b65dfff8023ec7843e2330bb462f19198840b34b6582397d" +dependencies = [ + "byteorder", + "keccak", + "rand_core 0.6.4", + "zeroize", +] + [[package]] name = "mick-jaeger" version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "69672161530e8aeca1d1400fbf3f1a1747ff60ea604265a4e906c2442df20532" dependencies = [ - "futures 0.3.28", + "futures 0.3.30", "rand 0.8.5", "thrift", ] @@ -5062,18 +5393,18 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" +checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7" dependencies = [ "adler", ] [[package]] name = "mio" -version = "0.8.8" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2" +checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" dependencies = [ "libc", "wasi 0.11.0+wasi-snapshot-preview1", @@ -5083,17 +5414,17 @@ dependencies = [ [[package]] name = "mmr-gadget" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ - "futures 0.3.28", + "futures 0.3.30", "log", "parity-scale-codec", "sc-client-api", "sc-offchain", "sp-api", - "sp-beefy", "sp-blockchain", "sp-consensus", + "sp-consensus-beefy", "sp-core", "sp-mmr-primitives", "sp-runtime", @@ -5102,7 +5433,7 @@ dependencies = [ [[package]] name = "mmr-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "anyhow", "jsonrpsee", @@ -5145,15 +5476,15 @@ dependencies = [ [[package]] name = "moonbeam-vrf" version = "0.1.0" -source = "git+https://github.com/zeitgeistpm/moonbeam?branch=polkadot-v0.9.38-use-paritytech-dependencies#095ddae0ea44d8385453091e5e11d475b3dbda1e" +source = "git+https://github.com/zeitgeistpm/moonbeam?branch=zeitgeist-polkadot-v1.1.0#1d73d545275971d360e98524a4ff72f71cd91596" dependencies = [ "nimbus-primitives", "parity-scale-codec", "polkadot-primitives", + "schnorrkel 0.9.1", "session-keys-primitives", "sp-api", "sp-application-crypto", - "sp-consensus-vrf", "sp-core", "sp-keystore", "sp-runtime", @@ -5165,24 +5496,6 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1fafa6961cabd9c63bcd77a45d7e3b7f3b552b70417831fb0f56db717e72407e" -[[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" @@ -5194,7 +5507,7 @@ dependencies = [ "data-encoding", "log", "multibase", - "multihash 0.17.0", + "multihash", "percent-encoding", "serde", "static_assertions", @@ -5215,9 +5528,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", @@ -5225,29 +5538,18 @@ dependencies = [ "core2", "digest 0.10.7", "multihash-derive", - "sha2 0.10.7", + "sha2 0.10.8", "sha3", "unsigned-varint", ] -[[package]] -name = "multihash" -version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "835d6ff01d610179fbce3de1694d007e500bf33a7f29689838941d6bf783ae40" -dependencies = [ - "core2", - "multihash-derive", - "unsigned-varint", -] - [[package]] name = "multihash-derive" version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc076939022111618a5026d3be019fd8b366e76314538ff9a1b59ffbcbf98bcd" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 1.3.1", "proc-macro-error", "proc-macro2", "quote", @@ -5268,7 +5570,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c8552ab875c1313b97b8d20cb857b9fd63e2d1d6a0a1b53ce9821e575405f27a" dependencies = [ "bytes", - "futures 0.3.28", + "futures 0.3.30", "log", "pin-project", "smallvec", @@ -5277,9 +5579,9 @@ dependencies = [ [[package]] name = "nalgebra" -version = "0.27.1" +version = "0.32.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "462fffe4002f4f2e1f6a9dcf12cc1a6fc0e15989014efc02a941d3e0f5dc2120" +checksum = "3ea4908d4f23254adda3daa60ffef0f1ac7b8c3e9a864cf3cc154b251908a2ef" dependencies = [ "approx", "matrixmultiply", @@ -5287,17 +5589,15 @@ dependencies = [ "num-complex", "num-rational", "num-traits", - "rand 0.8.5", - "rand_distr", "simba", - "typenum 1.16.0 (registry+https://github.com/rust-lang/crates.io-index)", + "typenum", ] [[package]] name = "nalgebra-macros" -version = "0.1.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01fcc0b8149b4632adc89ac3b7b31a12fb6099a0317a4eb2ebff574ef7de7218" +checksum = "91761aed67d03ad966ef783ae962ef9bbaca728d2dd7ceb7939ec110fffad998" dependencies = [ "proc-macro2", "quote", @@ -5364,7 +5664,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "65b4b14489ab424703c092062176d52ba55485a89c076b4f9db05092b7223aa6" dependencies = [ "bytes", - "futures 0.3.28", + "futures 0.3.30", "log", "netlink-packet-core", "netlink-sys", @@ -5374,12 +5674,12 @@ dependencies = [ [[package]] name = "netlink-sys" -version = "0.8.5" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6471bf08e7ac0135876a9581bf3217ef0333c191c128d34878079f42ee150411" +checksum = "416060d346fbaf1f23f9512963e3e878f1a78e707cb699ba9215761754244307" dependencies = [ "bytes", - "futures 0.3.28", + "futures 0.3.30", "libc", "log", "tokio", @@ -5388,18 +5688,17 @@ dependencies = [ [[package]] name = "nimbus-consensus" version = "0.9.0" -source = "git+https://github.com/zeitgeistpm/nimbus?branch=polkadot-v0.9.38-use-paritytech-dependencies#1c8ba39b656ec708bf7153a79987eba6e72ef9d6" +source = "git+https://github.com/zeitgeistpm/moonkit?branch=zeitgeist-polkadot-v1.1.0#34c21d6e4df607f80bf77eacc105bf83ea0b76b6" dependencies = [ "async-trait", "cumulus-client-consensus-common", "cumulus-primitives-core", "cumulus-primitives-parachain-inherent", - "futures 0.3.28", + "futures 0.3.30", "log", "nimbus-primitives", "parity-scale-codec", - "parking_lot 0.12.1", - "polkadot-client", + "parking_lot 0.12.2", "sc-client-api", "sc-consensus", "sc-consensus-manual-seal", @@ -5419,7 +5718,7 @@ dependencies = [ [[package]] name = "nimbus-primitives" version = "0.9.0" -source = "git+https://github.com/zeitgeistpm/nimbus?branch=polkadot-v0.9.38-use-paritytech-dependencies#1c8ba39b656ec708bf7153a79987eba6e72ef9d6" +source = "git+https://github.com/zeitgeistpm/moonkit?branch=zeitgeist-polkadot-v1.1.0#34c21d6e4df607f80bf77eacc105bf83ea0b76b6" dependencies = [ "async-trait", "frame-benchmarking", @@ -5431,7 +5730,7 @@ dependencies = [ "sp-application-crypto", "sp-inherents", "sp-runtime", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", ] [[package]] @@ -5443,22 +5742,19 @@ dependencies = [ "bitflags 1.3.2", "cfg-if", "libc", - "memoffset 0.6.5", ] [[package]] -name = "nix" -version = "0.26.2" +name = "no-std-net" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfdda3d196821d6af13126e40375cdf7da646a96114af134d5f417a9a1dc8e1a" -dependencies = [ - "bitflags 1.3.2", - "cfg-if", - "libc", - "memoffset 0.7.1", - "pin-utils", - "static_assertions", -] +checksum = "43794a0ace135be66a25d3ae77d41b91615fb68ae937f904090203e81f755b65" + +[[package]] +name = "nodrop" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb" [[package]] name = "nohash-hasher" @@ -5484,9 +5780,9 @@ checksum = "61807f77802ff30975e01f4f071c8ba10c022052f98b3294119f3e615d13e5be" [[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", "num-integer", @@ -5495,13 +5791,19 @@ dependencies = [ [[package]] name = "num-complex" -version = "0.4.3" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02e0d21255c828d6f128a1e41534206671e8c3ea0c62f32291e808dc82cff17d" +checksum = "23c6602fda94a57c990fe0df199a035d83576b496aa29f4e634a8ac6004e68a6" dependencies = [ "num-traits", ] +[[package]] +name = "num-conv" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" + [[package]] name = "num-format" version = "0.4.4" @@ -5514,11 +5816,10 @@ dependencies = [ [[package]] name = "num-integer" -version = "0.1.45" +version = "0.1.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" +checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" dependencies = [ - "autocfg", "num-traits", ] @@ -5536,12 +5837,11 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.16" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2" +checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a" dependencies = [ "autocfg", - "libm 0.2.7", ] [[package]] @@ -5550,54 +5850,51 @@ version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi 0.3.2", + "hermit-abi 0.3.9", "libc", ] +[[package]] +name = "number_prefix" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +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.31.1" +version = "0.32.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bda667d9f2b5051b8833f59f3bf748b28ef54f850f4fcb389a252aa383866d1" +checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" dependencies = [ "memchr", ] -[[package]] -name = "oid-registry" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38e20717fa0541f39bd146692035c37bedfa532b3e5071b35761082407546b2a" -dependencies = [ - "asn1-rs 0.3.1", -] - [[package]] name = "oid-registry" version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9bedf36ffb6ba96c2eb7144ef6270557b52e54b20c0a8e1eb2ff99a6c6959bff" dependencies = [ - "asn1-rs 0.5.2", + "asn1-rs", ] [[package]] name = "once_cell" -version = "1.18.0" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "opaque-debug" @@ -5607,9 +5904,9 @@ checksum = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c" [[package]] name = "opaque-debug" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" +checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" [[package]] name = "openssl-probe" @@ -5619,13 +5916,13 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "orchestra" -version = "0.0.4" +version = "0.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17e7d5b6bb115db09390bed8842c94180893dd83df3dfce7354f2a2aa090a4ee" +checksum = "227585216d05ba65c7ab0a0450a3cf2cbd81a98862a54c4df8e14d5ac6adb015" dependencies = [ "async-trait", "dyn-clonable", - "futures 0.3.28", + "futures 0.3.30", "futures-timer", "orchestra-proc-macro", "pin-project", @@ -5636,14 +5933,14 @@ dependencies = [ [[package]] name = "orchestra-proc-macro" -version = "0.0.4" +version = "0.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2af4dabb2286b0be0e9711d2d24e25f6217048b71210cffd3daddc3b5c84e1f" +checksum = "2871aadd82a2c216ee68a69837a526dfe788ecbe74c4c5038a6acdbff6653066" dependencies = [ "expander 0.0.6", - "itertools", + "itertools 0.10.5", "petgraph", - "proc-macro-crate", + "proc-macro-crate 1.3.1", "proc-macro2", "quote", "syn 1.0.109", @@ -5661,26 +5958,28 @@ dependencies = [ [[package]] name = "orml-asset-registry" version = "0.4.1-dev" -source = "git+https://github.com/open-web3-stack/open-runtime-module-library?branch=polkadot-v0.9.38#241d5cdc98cca53b8cf990853943c9ae1193a70e" +source = "git+https://github.com/open-web3-stack/open-runtime-module-library?branch=polkadot-v1.1.0#b3694e631df7f1ca16b1973122937753fcdee9d4" dependencies = [ "frame-support", "frame-system", + "log", "orml-traits", "pallet-xcm", "parity-scale-codec", "scale-info", "serde", + "sp-io", "sp-runtime", - "sp-std", - "xcm", - "xcm-builder", - "xcm-executor", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", ] [[package]] name = "orml-benchmarking" version = "0.4.1-dev" -source = "git+https://github.com/open-web3-stack/open-runtime-module-library?branch=polkadot-v0.9.38#241d5cdc98cca53b8cf990853943c9ae1193a70e" +source = "git+https://github.com/open-web3-stack/open-runtime-module-library?branch=polkadot-v1.1.0#b3694e631df7f1ca16b1973122937753fcdee9d4" dependencies = [ "frame-benchmarking", "frame-support", @@ -5693,14 +5992,14 @@ dependencies = [ "sp-io", "sp-runtime", "sp-runtime-interface", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", "sp-storage", ] [[package]] name = "orml-currencies" version = "0.4.1-dev" -source = "git+https://github.com/open-web3-stack/open-runtime-module-library?branch=polkadot-v0.9.38#241d5cdc98cca53b8cf990853943c9ae1193a70e" +source = "git+https://github.com/open-web3-stack/open-runtime-module-library?branch=polkadot-v1.1.0#b3694e631df7f1ca16b1973122937753fcdee9d4" dependencies = [ "frame-support", "frame-system", @@ -5711,47 +6010,50 @@ dependencies = [ "serde", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", ] [[package]] name = "orml-tokens" version = "0.4.1-dev" -source = "git+https://github.com/open-web3-stack/open-runtime-module-library?branch=polkadot-v0.9.38#241d5cdc98cca53b8cf990853943c9ae1193a70e" +source = "git+https://github.com/open-web3-stack/open-runtime-module-library?branch=polkadot-v1.1.0#b3694e631df7f1ca16b1973122937753fcdee9d4" dependencies = [ "frame-support", "frame-system", + "log", "orml-traits", "parity-scale-codec", "scale-info", "serde", + "sp-arithmetic 16.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", "sp-runtime", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", ] [[package]] name = "orml-traits" version = "0.4.1-dev" -source = "git+https://github.com/open-web3-stack/open-runtime-module-library?branch=polkadot-v0.9.38#241d5cdc98cca53b8cf990853943c9ae1193a70e" +source = "git+https://github.com/open-web3-stack/open-runtime-module-library?branch=polkadot-v1.1.0#b3694e631df7f1ca16b1973122937753fcdee9d4" dependencies = [ "frame-support", "impl-trait-for-tuples", "num-traits", "orml-utilities", "parity-scale-codec", + "paste", "scale-info", "serde", "sp-core", "sp-io", "sp-runtime", - "sp-std", - "xcm", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", + "staging-xcm", ] [[package]] name = "orml-unknown-tokens" version = "0.4.1-dev" -source = "git+https://github.com/open-web3-stack/open-runtime-module-library?branch=polkadot-v0.9.38#241d5cdc98cca53b8cf990853943c9ae1193a70e" +source = "git+https://github.com/open-web3-stack/open-runtime-module-library?branch=polkadot-v1.1.0#b3694e631df7f1ca16b1973122937753fcdee9d4" dependencies = [ "frame-support", "frame-system", @@ -5759,46 +6061,48 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-std", - "xcm", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", + "staging-xcm", ] [[package]] name = "orml-utilities" version = "0.4.1-dev" -source = "git+https://github.com/open-web3-stack/open-runtime-module-library?branch=polkadot-v0.9.38#241d5cdc98cca53b8cf990853943c9ae1193a70e" +source = "git+https://github.com/open-web3-stack/open-runtime-module-library?branch=polkadot-v1.1.0#b3694e631df7f1ca16b1973122937753fcdee9d4" dependencies = [ "frame-support", "parity-scale-codec", "scale-info", "serde", + "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", ] [[package]] name = "orml-xcm-support" version = "0.4.1-dev" -source = "git+https://github.com/open-web3-stack/open-runtime-module-library?branch=polkadot-v0.9.38#241d5cdc98cca53b8cf990853943c9ae1193a70e" +source = "git+https://github.com/open-web3-stack/open-runtime-module-library?branch=polkadot-v1.1.0#b3694e631df7f1ca16b1973122937753fcdee9d4" dependencies = [ "frame-support", "orml-traits", "parity-scale-codec", "sp-runtime", - "sp-std", - "xcm", - "xcm-executor", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", + "staging-xcm", + "staging-xcm-executor", ] [[package]] name = "orml-xtokens" version = "0.4.1-dev" -source = "git+https://github.com/open-web3-stack/open-runtime-module-library?branch=polkadot-v0.9.38#241d5cdc98cca53b8cf990853943c9ae1193a70e" +source = "git+https://github.com/open-web3-stack/open-runtime-module-library?branch=polkadot-v1.1.0#b3694e631df7f1ca16b1973122937753fcdee9d4" dependencies = [ "cumulus-primitives-core", "frame-support", "frame-system", + "log", "orml-traits", "orml-xcm-support", "pallet-xcm", @@ -5807,47 +6111,15 @@ dependencies = [ "serde", "sp-io", "sp-runtime", - "sp-std", - "xcm", - "xcm-executor", -] - -[[package]] -name = "p256" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51f44edd08f51e2ade572f141051021c5af22677e42b7dd28a88155151c33594" -dependencies = [ - "ecdsa", - "elliptic-curve", - "sha2 0.10.7", -] - -[[package]] -name = "p384" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc8c5bf642dde52bb9e87c0ecd8ca5a76faac2eeed98dedb7c717997e1080aa" -dependencies = [ - "ecdsa", - "elliptic-curve", - "sha2 0.10.7", -] - -[[package]] -name = "packed_simd_2" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1914cd452d8fccd6f9db48147b29fd4ae05bea9dc5d9ad578509f72415de282" -dependencies = [ - "cfg-if", - "libm 0.1.4", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", + "staging-xcm", + "staging-xcm-executor", ] [[package]] name = "pallet-asset-tx-payment" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-benchmarking", "frame-support", @@ -5859,44 +6131,46 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", ] [[package]] name = "pallet-assets" version = "4.0.0-dev" -source = "git+https://github.com/zeitgeistpm/substrate.git?branch=polkadot-v0.9.38-zeitgeist-adjustments#bd498817bb4479836a47231b4fc36831a19806ae" +source = "git+https://github.com/zeitgeistpm/polkadot-sdk?branch=zeitgeist-polkadot-v1.1.0#6dd8bed6e375b6310fb990b7baa5a30f5f7ccada" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", + "log", "parity-scale-codec", "scale-info", "sp-core", "sp-runtime", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", ] [[package]] name = "pallet-aura" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-support", "frame-system", + "log", "pallet-timestamp", "parity-scale-codec", "scale-info", "sp-application-crypto", "sp-consensus-aura", "sp-runtime", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", ] [[package]] name = "pallet-author-inherent" version = "0.9.0" -source = "git+https://github.com/zeitgeistpm/nimbus?branch=polkadot-v0.9.38-use-paritytech-dependencies#1c8ba39b656ec708bf7153a79987eba6e72ef9d6" +source = "git+https://github.com/zeitgeistpm/moonkit?branch=zeitgeist-polkadot-v1.1.0#34c21d6e4df607f80bf77eacc105bf83ea0b76b6" dependencies = [ "frame-benchmarking", "frame-support", @@ -5909,13 +6183,13 @@ dependencies = [ "sp-application-crypto", "sp-inherents", "sp-runtime", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", ] [[package]] name = "pallet-author-mapping" version = "2.0.5" -source = "git+https://github.com/zeitgeistpm/moonbeam?branch=polkadot-v0.9.38-use-paritytech-dependencies#095ddae0ea44d8385453091e5e11d475b3dbda1e" +source = "git+https://github.com/zeitgeistpm/moonkit?branch=zeitgeist-polkadot-v1.1.0#34c21d6e4df607f80bf77eacc105bf83ea0b76b6" dependencies = [ "frame-benchmarking", "frame-support", @@ -5927,13 +6201,13 @@ dependencies = [ "serde", "session-keys-primitives", "sp-runtime", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", ] [[package]] name = "pallet-author-slot-filter" version = "0.9.0" -source = "git+https://github.com/zeitgeistpm/nimbus?branch=polkadot-v0.9.38-use-paritytech-dependencies#1c8ba39b656ec708bf7153a79987eba6e72ef9d6" +source = "git+https://github.com/zeitgeistpm/moonkit?branch=zeitgeist-polkadot-v1.1.0#34c21d6e4df607f80bf77eacc105bf83ea0b76b6" dependencies = [ "frame-benchmarking", "frame-support", @@ -5945,13 +6219,13 @@ dependencies = [ "serde", "sp-core", "sp-runtime", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", ] [[package]] name = "pallet-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-support", "frame-system", @@ -5961,13 +6235,13 @@ dependencies = [ "sp-application-crypto", "sp-authority-discovery", "sp-runtime", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", ] [[package]] name = "pallet-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-support", "frame-system", @@ -5975,13 +6249,13 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-runtime", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", ] [[package]] name = "pallet-babe" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-benchmarking", "frame-support", @@ -5994,19 +6268,21 @@ dependencies = [ "scale-info", "sp-application-crypto", "sp-consensus-babe", - "sp-consensus-vrf", + "sp-core", "sp-io", "sp-runtime", "sp-session", "sp-staking", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", ] [[package]] name = "pallet-bags-list" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ + "aquamarine", + "docify", "frame-benchmarking", "frame-election-provider-support", "frame-support", @@ -6018,14 +6294,14 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", "sp-tracing", ] [[package]] name = "pallet-balances" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-benchmarking", "frame-support", @@ -6034,32 +6310,36 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-runtime", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", ] [[package]] name = "pallet-beefy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-support", "frame-system", + "log", + "pallet-authorship", "pallet-session", "parity-scale-codec", "scale-info", "serde", - "sp-beefy", + "sp-consensus-beefy", "sp-runtime", - "sp-std", + "sp-session", + "sp-staking", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", ] [[package]] name = "pallet-beefy-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ - "array-bytes 4.2.0", - "beefy-merkle-tree", + "array-bytes", + "binary-merkle-tree", "frame-support", "frame-system", "log", @@ -6069,17 +6349,19 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-beefy", + "sp-api", + "sp-consensus-beefy", "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-state-machine", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", ] [[package]] name = "pallet-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-benchmarking", "frame-support", @@ -6091,13 +6373,13 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", ] [[package]] name = "pallet-child-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-benchmarking", "frame-support", @@ -6110,13 +6392,32 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", +] + +[[package]] +name = "pallet-collator-selection" +version = "3.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +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 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", ] [[package]] name = "pallet-collective" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-benchmarking", "frame-support", @@ -6127,20 +6428,22 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", ] [[package]] name = "pallet-contracts" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "bitflags 1.3.2", + "environmental", "frame-benchmarking", "frame-support", "frame-system", "impl-trait-for-tuples", "log", + "pallet-balances", "pallet-contracts-primitives", "pallet-contracts-proc-macro", "parity-scale-codec", @@ -6153,38 +6456,38 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", "wasm-instrument 0.4.0", - "wasmi 0.20.0", - "wasmparser-nostd", + "wasmi", ] [[package]] name = "pallet-contracts-primitives" -version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +version = "24.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "bitflags 1.3.2", "parity-scale-codec", + "scale-info", "sp-runtime", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", "sp-weights", ] [[package]] name = "pallet-contracts-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.60", ] [[package]] name = "pallet-conviction-voting" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "assert_matches", "frame-benchmarking", @@ -6195,13 +6498,13 @@ dependencies = [ "serde", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", ] [[package]] name = "pallet-democracy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-benchmarking", "frame-support", @@ -6213,13 +6516,13 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", ] [[package]] name = "pallet-election-provider-multi-phase" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6230,19 +6533,19 @@ dependencies = [ "parity-scale-codec", "rand 0.8.5", "scale-info", - "sp-arithmetic", + "sp-arithmetic 16.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", "sp-core", "sp-io", "sp-npos-elections", "sp-runtime", - "sp-std", - "strum", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", + "strum 0.24.1", ] [[package]] name = "pallet-election-provider-support-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6250,12 +6553,13 @@ dependencies = [ "parity-scale-codec", "sp-npos-elections", "sp-runtime", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", ] [[package]] name = "pallet-elections-phragmen" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-benchmarking", "frame-support", @@ -6267,14 +6571,16 @@ dependencies = [ "sp-io", "sp-npos-elections", "sp-runtime", - "sp-std", + "sp-staking", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", ] [[package]] name = "pallet-fast-unstake" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ + "docify", "frame-benchmarking", "frame-election-provider-support", "frame-support", @@ -6285,89 +6591,120 @@ dependencies = [ "sp-io", "sp-runtime", "sp-staking", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", ] [[package]] name = "pallet-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "pallet-authorship", + "pallet-session", + "parity-scale-codec", + "scale-info", + "sp-application-crypto", + "sp-consensus-grandpa", + "sp-core", + "sp-io", + "sp-runtime", + "sp-session", + "sp-staking", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", +] + +[[package]] +name = "pallet-identity" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +dependencies = [ + "enumflags2", + "frame-benchmarking", + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "sp-io", + "sp-runtime", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", +] + +[[package]] +name = "pallet-im-online" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "log", "pallet-authorship", - "pallet-session", "parity-scale-codec", "scale-info", "sp-application-crypto", "sp-core", - "sp-finality-grandpa", "sp-io", "sp-runtime", - "sp-session", "sp-staking", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", ] [[package]] -name = "pallet-identity" +name = "pallet-indices" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ - "enumflags2", "frame-benchmarking", "frame-support", "frame-system", "parity-scale-codec", "scale-info", + "sp-core", "sp-io", + "sp-keyring", "sp-runtime", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", ] [[package]] -name = "pallet-im-online" +name = "pallet-insecure-randomness-collective-flip" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ - "frame-benchmarking", "frame-support", "frame-system", - "log", - "pallet-authorship", "parity-scale-codec", + "safe-mix", "scale-info", - "sp-application-crypto", - "sp-core", - "sp-io", "sp-runtime", - "sp-staking", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", ] [[package]] -name = "pallet-indices" +name = "pallet-membership" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", + "log", "parity-scale-codec", "scale-info", "sp-core", "sp-io", - "sp-keyring", "sp-runtime", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", ] [[package]] -name = "pallet-membership" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +name = "pallet-message-queue" +version = "7.0.0-dev" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-benchmarking", "frame-support", @@ -6375,33 +6712,36 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", + "sp-arithmetic 16.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", + "sp-weights", ] [[package]] name = "pallet-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", + "log", "parity-scale-codec", "scale-info", "sp-core", "sp-io", "sp-mmr-primitives", "sp-runtime", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", ] [[package]] name = "pallet-multisig" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-benchmarking", "frame-support", @@ -6411,46 +6751,48 @@ dependencies = [ "scale-info", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", ] [[package]] name = "pallet-nis" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "parity-scale-codec", "scale-info", - "sp-arithmetic", + "sp-arithmetic 16.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", "sp-core", "sp-runtime", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", ] [[package]] name = "pallet-nomination-pools" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-support", "frame-system", "log", + "pallet-balances", "parity-scale-codec", "scale-info", "sp-core", "sp-io", "sp-runtime", "sp-staking", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", + "sp-tracing", ] [[package]] name = "pallet-nomination-pools-benchmarking" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6464,23 +6806,24 @@ dependencies = [ "sp-runtime", "sp-runtime-interface", "sp-staking", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", ] [[package]] name = "pallet-nomination-pools-runtime-api" version = "1.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ + "pallet-nomination-pools", "parity-scale-codec", "sp-api", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", ] [[package]] name = "pallet-offences" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-support", "frame-system", @@ -6491,13 +6834,13 @@ dependencies = [ "serde", "sp-runtime", "sp-staking", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", ] [[package]] name = "pallet-offences-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6515,13 +6858,13 @@ dependencies = [ "scale-info", "sp-runtime", "sp-staking", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", ] [[package]] name = "pallet-parachain-staking" version = "3.0.0" -source = "git+https://github.com/zeitgeistpm/moonbeam?branch=polkadot-v0.9.38-use-paritytech-dependencies#095ddae0ea44d8385453091e5e11d475b3dbda1e" +source = "git+https://github.com/zeitgeistpm/moonbeam?branch=zeitgeist-polkadot-v1.1.0#1d73d545275971d360e98524a4ff72f71cd91596" dependencies = [ "frame-benchmarking", "frame-support", @@ -6532,14 +6875,14 @@ dependencies = [ "scale-info", "serde", "sp-runtime", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", "substrate-fixed", ] [[package]] name = "pallet-preimage" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-benchmarking", "frame-support", @@ -6550,13 +6893,13 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", ] [[package]] name = "pallet-proxy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-benchmarking", "frame-support", @@ -6565,27 +6908,13 @@ dependencies = [ "scale-info", "sp-io", "sp-runtime", - "sp-std", -] - -[[package]] -name = "pallet-randomness-collective-flip" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" -dependencies = [ - "frame-support", - "frame-system", - "parity-scale-codec", - "safe-mix", - "scale-info", - "sp-runtime", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", ] [[package]] name = "pallet-ranked-collective" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-benchmarking", "frame-support", @@ -6593,17 +6922,17 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-arithmetic", + "sp-arithmetic 16.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", ] [[package]] name = "pallet-recovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-benchmarking", "frame-support", @@ -6612,13 +6941,13 @@ dependencies = [ "scale-info", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", ] [[package]] name = "pallet-referenda" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "assert_matches", "frame-benchmarking", @@ -6628,17 +6957,18 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-arithmetic", + "sp-arithmetic 16.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", ] [[package]] name = "pallet-scheduler" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ + "docify", "frame-benchmarking", "frame-support", "frame-system", @@ -6647,14 +6977,14 @@ dependencies = [ "scale-info", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", "sp-weights", ] [[package]] name = "pallet-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-support", "frame-system", @@ -6668,44 +6998,50 @@ dependencies = [ "sp-runtime", "sp-session", "sp-staking", - "sp-std", + "sp-state-machine", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", "sp-trie", ] [[package]] name = "pallet-session-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "pallet-session", "pallet-staking", + "parity-scale-codec", "rand 0.8.5", "sp-runtime", "sp-session", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", ] [[package]] name = "pallet-society" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ + "frame-benchmarking", "frame-support", "frame-system", + "log", "parity-scale-codec", "rand_chacha 0.2.2", "scale-info", + "sp-arithmetic 16.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", + "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", ] [[package]] name = "pallet-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6722,33 +7058,42 @@ dependencies = [ "sp-io", "sp-runtime", "sp-staking", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", ] [[package]] name = "pallet-staking-reward-curve" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.60", ] [[package]] name = "pallet-staking-reward-fn" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "log", - "sp-arithmetic", + "sp-arithmetic 16.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", +] + +[[package]] +name = "pallet-staking-runtime-api" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +dependencies = [ + "parity-scale-codec", + "sp-api", ] [[package]] name = "pallet-state-trie-migration" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-benchmarking", "frame-support", @@ -6759,27 +7104,28 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", ] [[package]] name = "pallet-sudo" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ + "frame-benchmarking", "frame-support", "frame-system", "parity-scale-codec", "scale-info", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", ] [[package]] name = "pallet-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-benchmarking", "frame-support", @@ -6790,14 +7136,15 @@ dependencies = [ "sp-inherents", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", + "sp-storage", "sp-timestamp", ] [[package]] name = "pallet-tips" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-benchmarking", "frame-support", @@ -6810,13 +7157,13 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", ] [[package]] name = "pallet-transaction-payment" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-support", "frame-system", @@ -6826,13 +7173,13 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", ] [[package]] name = "pallet-transaction-payment-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "jsonrpsee", "pallet-transaction-payment-rpc-runtime-api", @@ -6848,7 +7195,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.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -6860,7 +7207,7 @@ dependencies = [ [[package]] name = "pallet-treasury" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-benchmarking", "frame-support", @@ -6871,13 +7218,13 @@ dependencies = [ "scale-info", "serde", "sp-runtime", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", ] [[package]] name = "pallet-utility" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-benchmarking", "frame-support", @@ -6887,13 +7234,13 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", ] [[package]] name = "pallet-vesting" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-benchmarking", "frame-support", @@ -6902,13 +7249,13 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-runtime", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", ] [[package]] name = "pallet-whitelist" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-benchmarking", "frame-support", @@ -6917,14 +7264,15 @@ dependencies = [ "scale-info", "sp-api", "sp-runtime", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", ] [[package]] name = "pallet-xcm" -version = "0.9.38" -source = "git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes#20fcf6d7f070911b441925cb6f418b3d346af3a0" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ + "bounded-collections", "frame-benchmarking", "frame-support", "frame-system", @@ -6935,15 +7283,15 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", - "xcm", - "xcm-executor", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", + "staging-xcm", + "staging-xcm-executor", ] [[package]] name = "pallet-xcm-benchmarks" -version = "0.9.38" -source = "git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes#20fcf6d7f070911b441925cb6f418b3d346af3a0" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-benchmarking", "frame-support", @@ -6953,29 +7301,67 @@ dependencies = [ "scale-info", "sp-io", "sp-runtime", - "sp-std", - "xcm", - "xcm-builder", - "xcm-executor", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", ] [[package]] name = "parachain-info" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.38#9b4e0247137f158d1a35118197d34adfa58858b7" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +dependencies = [ + "cumulus-primitives-core", + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "sp-runtime", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", +] + +[[package]] +name = "parachains-common" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "cumulus-primitives-core", + "cumulus-primitives-utility", "frame-support", "frame-system", + "kusama-runtime-constants", + "log", + "num-traits", + "pallet-asset-tx-payment", + "pallet-assets", + "pallet-authorship", + "pallet-balances", + "pallet-collator-selection", "parity-scale-codec", + "polkadot-core-primitives", + "polkadot-primitives", + "polkadot-runtime-constants", + "rococo-runtime-constants", "scale-info", + "smallvec", + "sp-consensus-aura", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", + "substrate-wasm-builder", + "westend-runtime-constants", ] [[package]] name = "parity-db" -version = "0.4.10" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78f19d20a0d2cc52327a88d131fa1c4ea81ea4a04714aedcfeca2dd410049cf8" +checksum = "592a28a24b09c9dc20ac8afaa6839abc417c720afe42c12e1e4a9d6aa2508d2e" dependencies = [ "blake2", "crc32fast", @@ -6985,17 +7371,18 @@ dependencies = [ "log", "lz4", "memmap2", - "parking_lot 0.12.1", + "parking_lot 0.12.2", "rand 0.8.5", "siphasher", "snap", + "winapi", ] [[package]] name = "parity-scale-codec" -version = "3.6.4" +version = "3.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd8e946cc0cc711189c0b0249fb8b599cbeeab9784d83c415719368bb8d4ac64" +checksum = "881331e34fa842a2fb61cc2db9643a8fedc615e47cfcc52597d1af0db9a7e8fe" dependencies = [ "arrayvec 0.7.4", "bitvec", @@ -7008,11 +7395,11 @@ dependencies = [ [[package]] name = "parity-scale-codec-derive" -version = "3.6.4" +version = "3.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a296c3079b5fefbc499e1de58dc26c09b1b9a5952d26694ee89f04a43ebbb3e" +checksum = "be30eaf4b0a9fba5336683b38de57bb86d179a35862ba6bfcf57625d006bde5b" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 2.0.2", "proc-macro2", "quote", "syn 1.0.109", @@ -7032,9 +7419,9 @@ checksum = "e1ad0aff30c1da14b1254fcb2af73e1fa9a28670e584a626f53a369d0e157304" [[package]] name = "parking" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14f2252c834a40ed9bb5422029649578e63aa341ac401f74e719dd1afda8394e" +checksum = "bb813b8af86854136c6922af0598d719255ecb2179515e6e7730d468f05c9cae" [[package]] name = "parking_lot" @@ -7049,12 +7436,12 @@ dependencies = [ [[package]] name = "parking_lot" -version = "0.12.1" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" +checksum = "7e4af0ca4f6caed20e900d564c242b8e5d4903fdacf31d3daf527b66fe6f42fb" dependencies = [ "lock_api", - "parking_lot_core 0.9.8", + "parking_lot_core 0.9.10", ] [[package]] @@ -7073,17 +7460,23 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.8" +version = "0.9.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93f00c865fe7cabf650081affecd3871070f26767e7b2070a3ffae14c654b447" +checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.3.5", + "redox_syscall 0.5.1", "smallvec", - "windows-targets", + "windows-targets 0.52.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.14" @@ -7108,6 +7501,15 @@ dependencies = [ "digest 0.10.7", ] +[[package]] +name = "pbkdf2" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" +dependencies = [ + "digest 0.10.7", +] + [[package]] name = "peeking_take_while" version = "0.1.2" @@ -7123,36 +7525,28 @@ dependencies = [ "base64 0.13.1", ] -[[package]] -name = "pem-rfc7468" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24d159833a9105500e0398934e205e0773f0b27529557134ecfc51c27646adac" -dependencies = [ - "base64ct", -] - [[package]] name = "percent-encoding" -version = "2.3.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pest" -version = "2.7.2" +version = "2.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1acb4a4365a13f749a93f1a094a7805e5cfa0955373a9de860d962eaa3a5fe5a" +checksum = "311fb059dee1a7b802f036316d790138c613a4e8b180c822e3925a662e9f0c95" dependencies = [ + "memchr", "thiserror", "ucd-trie", ] [[package]] name = "pest_derive" -version = "2.7.2" +version = "2.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "666d00490d4ac815001da55838c500eafb0320019bbaa44444137c48b443a853" +checksum = "f73541b156d32197eecda1a4014d7f868fd2bcb3c550d5386087cfba442bf69c" dependencies = [ "pest", "pest_generator", @@ -7160,56 +7554,56 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.7.2" +version = "2.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68ca01446f50dbda87c1786af8770d535423fa8a53aec03b8f4e3d7eb10e0929" +checksum = "c35eeed0a3fab112f75165fdc026b3913f4183133f19b49be773ac9ea966e8bd" dependencies = [ "pest", "pest_meta", "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.60", ] [[package]] name = "pest_meta" -version = "2.7.2" +version = "2.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56af0a30af74d0445c0bf6d9d051c979b516a1a5af790d251daee76005420a48" +checksum = "2adbf29bb9776f28caece835398781ab24435585fe0d4dc1374a61db5accedca" dependencies = [ "once_cell", "pest", - "sha2 0.10.7", + "sha2 0.10.8", ] [[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.2.6", ] [[package]] name = "pin-project" -version = "1.1.2" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "030ad2bc4db10a8944cb0d837f158bdfec4d4a4873ab701a95046770d11f8842" +checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.2" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec2e072ecce94ec471b13398d5402c188e76ac03cf74dd1a975161b23a3f6d9c" +checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.60", ] [[package]] @@ -7220,9 +7614,9 @@ checksum = "257b64915a082f7811703966789728173279bdebb956b143dbcd23f6f970a777" [[package]] name = "pin-project-lite" -version = "0.2.10" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c40d25201921e5ff0c862a505c6557ea88568a4e3ace775ab55e93f2f4f9d57" +checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" [[package]] name = "pin-utils" @@ -7230,11 +7624,22 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" +[[package]] +name = "piper" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "668d31b1c4eba19242f2088b2bf3316b82ca31082a8335764db4e083db7485d4" +dependencies = [ + "atomic-waker", + "fastrand 2.1.0", + "futures-io", +] + [[package]] name = "pkcs8" -version = "0.9.0" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9eca2c590a5f85da82668fa685c09ce2888b9430e83299debf1f34b65fd4a4ba" +checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" dependencies = [ "der", "spki", @@ -7242,60 +7647,58 @@ dependencies = [ [[package]] name = "pkg-config" -version = "0.3.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" - -[[package]] -name = "platforms" -version = "2.0.0" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8d0eef3571242013a0d5dc84861c3ae4a652e56e12adf8bdc26ff5f8cb34c94" +checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" [[package]] name = "platforms" -version = "3.0.2" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3d7ddaed09e0eb771a79ab0fd64609ba0afb0a8366421957936ad14cbd13630" +checksum = "db23d408679286588f4d4644f965003d056e3dd5abcaaa938116871d7ce2fee7" [[package]] name = "polkadot-approval-distribution" -version = "0.9.38" -source = "git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes#20fcf6d7f070911b441925cb6f418b3d346af3a0" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ - "futures 0.3.28", - "polkadot-node-metrics 0.9.38 (git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes)", + "futures 0.3.30", + "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 0.9.38 (git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes)", + "tracing-gum", ] [[package]] name = "polkadot-availability-bitfield-distribution" -version = "0.9.38" -source = "git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes#20fcf6d7f070911b441925cb6f418b3d346af3a0" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ - "futures 0.3.28", + "always-assert", + "futures 0.3.30", + "futures-timer", "polkadot-node-network-protocol", "polkadot-node-subsystem", "polkadot-node-subsystem-util", "polkadot-primitives", "rand 0.8.5", - "tracing-gum 0.9.38 (git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes)", + "tracing-gum", ] [[package]] name = "polkadot-availability-distribution" -version = "0.9.38" -source = "git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes#20fcf6d7f070911b441925cb6f418b3d346af3a0" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "derive_more", "fatality", - "futures 0.3.28", - "lru 0.9.0", + "futures 0.3.30", "parity-scale-codec", "polkadot-erasure-coding", "polkadot-node-network-protocol", @@ -7304,20 +7707,20 @@ dependencies = [ "polkadot-node-subsystem-util", "polkadot-primitives", "rand 0.8.5", + "schnellru", "sp-core", "sp-keystore", "thiserror", - "tracing-gum 0.9.38 (git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes)", + "tracing-gum", ] [[package]] name = "polkadot-availability-recovery" -version = "0.9.38" -source = "git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes#20fcf6d7f070911b441925cb6f418b3d346af3a0" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "fatality", - "futures 0.3.28", - "lru 0.9.0", + "futures 0.3.30", "parity-scale-codec", "polkadot-erasure-coding", "polkadot-node-network-protocol", @@ -7327,22 +7730,21 @@ dependencies = [ "polkadot-primitives", "rand 0.8.5", "sc-network", + "schnellru", "thiserror", - "tracing-gum 0.9.38 (git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes)", + "tracing-gum", ] [[package]] name = "polkadot-cli" -version = "0.9.38" -source = "git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes#20fcf6d7f070911b441925cb6f418b3d346af3a0" +version = "1.1.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "clap", "frame-benchmarking-cli", - "futures 0.3.28", + "futures 0.3.30", "log", - "polkadot-client", - "polkadot-node-core-pvf", - "polkadot-node-metrics 0.9.38 (git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes)", + "polkadot-node-metrics", "polkadot-performance-test", "polkadot-service", "sc-cli", @@ -7354,62 +7756,20 @@ dependencies = [ "sp-core", "sp-io", "sp-keyring", + "sp-maybe-compressed-blob", "substrate-build-script-utils", "thiserror", "try-runtime-cli", ] -[[package]] -name = "polkadot-client" -version = "0.9.38" -source = "git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes#20fcf6d7f070911b441925cb6f418b3d346af3a0" -dependencies = [ - "async-trait", - "frame-benchmarking", - "frame-benchmarking-cli", - "frame-system", - "frame-system-rpc-runtime-api", - "futures 0.3.28", - "pallet-transaction-payment", - "pallet-transaction-payment-rpc-runtime-api", - "polkadot-core-primitives", - "polkadot-node-core-parachains-inherent", - "polkadot-primitives", - "polkadot-runtime", - "polkadot-runtime-common", - "sc-client-api", - "sc-consensus", - "sc-executor", - "sc-service", - "sp-api", - "sp-authority-discovery", - "sp-beefy", - "sp-block-builder", - "sp-blockchain", - "sp-consensus", - "sp-consensus-babe", - "sp-core", - "sp-finality-grandpa", - "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.38" -source = "git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes#20fcf6d7f070911b441925cb6f418b3d346af3a0" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ - "always-assert", "bitvec", "fatality", - "futures 0.3.28", + "futures 0.3.30", "futures-timer", "polkadot-node-network-protocol", "polkadot-node-primitives", @@ -7420,32 +7780,32 @@ dependencies = [ "sp-keystore", "sp-runtime", "thiserror", - "tracing-gum 0.9.38 (git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes)", + "tokio-util", + "tracing-gum", ] [[package]] name = "polkadot-core-primitives" -version = "0.9.38" -source = "git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes#20fcf6d7f070911b441925cb6f418b3d346af3a0" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "parity-scale-codec", "scale-info", "sp-core", "sp-runtime", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", ] [[package]] name = "polkadot-dispute-distribution" -version = "0.9.38" -source = "git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes#20fcf6d7f070911b441925cb6f418b3d346af3a0" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "derive_more", "fatality", - "futures 0.3.28", + "futures 0.3.30", "futures-timer", "indexmap 1.9.3", - "lru 0.9.0", "parity-scale-codec", "polkadot-erasure-coding", "polkadot-node-network-protocol", @@ -7454,16 +7814,17 @@ dependencies = [ "polkadot-node-subsystem-util", "polkadot-primitives", "sc-network", + "schnellru", "sp-application-crypto", "sp-keystore", "thiserror", - "tracing-gum 0.9.38 (git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes)", + "tracing-gum", ] [[package]] name = "polkadot-erasure-coding" -version = "0.9.38" -source = "git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes#20fcf6d7f070911b441925cb6f418b3d346af3a0" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "parity-scale-codec", "polkadot-node-primitives", @@ -7476,10 +7837,10 @@ dependencies = [ [[package]] name = "polkadot-gossip-support" -version = "0.9.38" -source = "git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes#20fcf6d7f070911b441925cb6f418b3d346af3a0" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ - "futures 0.3.28", + "futures 0.3.30", "futures-timer", "polkadot-node-network-protocol", "polkadot-node-subsystem", @@ -7488,66 +7849,42 @@ dependencies = [ "rand 0.8.5", "rand_chacha 0.3.1", "sc-network", + "sc-network-common", "sp-application-crypto", "sp-core", "sp-keystore", - "tracing-gum 0.9.38 (git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes)", -] - -[[package]] -name = "polkadot-network-bridge" -version = "0.9.38" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.38#097ffd245c42aeff28cf80f8a3568e1bee2e7da7" -dependencies = [ - "always-assert", - "async-trait", - "bytes", - "fatality", - "futures 0.3.28", - "parity-scale-codec", - "parking_lot 0.12.1", - "polkadot-node-metrics 0.9.38 (git+https://github.com/paritytech/polkadot?branch=release-v0.9.38)", - "polkadot-node-network-protocol", - "polkadot-node-subsystem", - "polkadot-overseer", - "polkadot-primitives", - "sc-network", - "sc-network-common", - "sp-consensus", - "thiserror", - "tracing-gum 0.9.38 (git+https://github.com/paritytech/polkadot?branch=release-v0.9.38)", + "tracing-gum", ] [[package]] name = "polkadot-network-bridge" -version = "0.9.38" -source = "git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes#20fcf6d7f070911b441925cb6f418b3d346af3a0" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "always-assert", "async-trait", "bytes", "fatality", - "futures 0.3.28", + "futures 0.3.30", "parity-scale-codec", - "parking_lot 0.12.1", - "polkadot-node-metrics 0.9.38 (git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes)", + "parking_lot 0.12.2", + "polkadot-node-metrics", "polkadot-node-network-protocol", "polkadot-node-subsystem", "polkadot-overseer", "polkadot-primitives", "sc-network", - "sc-network-common", "sp-consensus", "thiserror", - "tracing-gum 0.9.38 (git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes)", + "tracing-gum", ] [[package]] name = "polkadot-node-collation-generation" -version = "0.9.38" -source = "git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes#20fcf6d7f070911b441925cb6f418b3d346af3a0" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ - "futures 0.3.28", + "futures 0.3.30", "parity-scale-codec", "polkadot-erasure-coding", "polkadot-node-primitives", @@ -7557,66 +7894,68 @@ dependencies = [ "sp-core", "sp-maybe-compressed-blob", "thiserror", - "tracing-gum 0.9.38 (git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes)", + "tracing-gum", ] [[package]] name = "polkadot-node-core-approval-voting" -version = "0.9.38" -source = "git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes#20fcf6d7f070911b441925cb6f418b3d346af3a0" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "bitvec", "derive_more", - "futures 0.3.28", + "futures 0.3.30", "futures-timer", "kvdb", - "lru 0.9.0", - "merlin", + "merlin 2.0.1", "parity-scale-codec", - "polkadot-node-jaeger 0.9.38 (git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes)", + "polkadot-node-jaeger", "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-util", "polkadot-overseer", "polkadot-primitives", "sc-keystore", - "schnorrkel", + "schnellru", + "schnorrkel 0.9.1", "sp-application-crypto", "sp-consensus", "sp-consensus-slots", "sp-runtime", "thiserror", - "tracing-gum 0.9.38 (git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes)", + "tracing-gum", ] [[package]] name = "polkadot-node-core-av-store" -version = "0.9.38" -source = "git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes#20fcf6d7f070911b441925cb6f418b3d346af3a0" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "bitvec", - "futures 0.3.28", + "futures 0.3.30", "futures-timer", "kvdb", "parity-scale-codec", "polkadot-erasure-coding", + "polkadot-node-jaeger", "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-util", "polkadot-overseer", "polkadot-primitives", + "sp-consensus", "thiserror", - "tracing-gum 0.9.38 (git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes)", + "tracing-gum", ] [[package]] name = "polkadot-node-core-backing" -version = "0.9.38" -source = "git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes#20fcf6d7f070911b441925cb6f418b3d346af3a0" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "bitvec", "fatality", - "futures 0.3.28", + "futures 0.3.30", "polkadot-erasure-coding", "polkadot-node-primitives", "polkadot-node-subsystem", @@ -7625,64 +7964,66 @@ dependencies = [ "polkadot-statement-table", "sp-keystore", "thiserror", - "tracing-gum 0.9.38 (git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes)", + "tracing-gum", ] [[package]] name = "polkadot-node-core-bitfield-signing" -version = "0.9.38" -source = "git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes#20fcf6d7f070911b441925cb6f418b3d346af3a0" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ - "futures 0.3.28", + "futures 0.3.30", "polkadot-node-subsystem", "polkadot-node-subsystem-util", "polkadot-primitives", "sp-keystore", "thiserror", - "tracing-gum 0.9.38 (git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes)", + "tracing-gum", "wasm-timer", ] [[package]] name = "polkadot-node-core-candidate-validation" -version = "0.9.38" -source = "git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes#20fcf6d7f070911b441925cb6f418b3d346af3a0" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "async-trait", - "futures 0.3.28", + "futures 0.3.30", "futures-timer", "parity-scale-codec", "polkadot-node-core-pvf", - "polkadot-node-metrics 0.9.38 (git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes)", + "polkadot-node-metrics", "polkadot-node-primitives", "polkadot-node-subsystem", - "polkadot-parachain", + "polkadot-node-subsystem-util", + "polkadot-overseer", + "polkadot-parachain-primitives", "polkadot-primitives", "sp-maybe-compressed-blob", - "tracing-gum 0.9.38 (git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes)", + "tracing-gum", ] [[package]] name = "polkadot-node-core-chain-api" -version = "0.9.38" -source = "git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes#20fcf6d7f070911b441925cb6f418b3d346af3a0" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ - "futures 0.3.28", - "polkadot-node-metrics 0.9.38 (git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes)", + "futures 0.3.30", + "polkadot-node-metrics", "polkadot-node-subsystem", "polkadot-primitives", "sc-client-api", "sc-consensus-babe", "sp-blockchain", - "tracing-gum 0.9.38 (git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes)", + "tracing-gum", ] [[package]] name = "polkadot-node-core-chain-selection" -version = "0.9.38" -source = "git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes#20fcf6d7f070911b441925cb6f418b3d346af3a0" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ - "futures 0.3.28", + "futures 0.3.30", "futures-timer", "kvdb", "parity-scale-codec", @@ -7691,35 +8032,35 @@ dependencies = [ "polkadot-node-subsystem-util", "polkadot-primitives", "thiserror", - "tracing-gum 0.9.38 (git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes)", + "tracing-gum", ] [[package]] name = "polkadot-node-core-dispute-coordinator" -version = "0.9.38" -source = "git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes#20fcf6d7f070911b441925cb6f418b3d346af3a0" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "fatality", - "futures 0.3.28", + "futures 0.3.30", "kvdb", - "lru 0.9.0", "parity-scale-codec", "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-util", "polkadot-primitives", "sc-keystore", + "schnellru", "thiserror", - "tracing-gum 0.9.38 (git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes)", + "tracing-gum", ] [[package]] name = "polkadot-node-core-parachains-inherent" -version = "0.9.38" -source = "git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes#20fcf6d7f070911b441925cb6f418b3d346af3a0" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "async-trait", - "futures 0.3.28", + "futures 0.3.30", "futures-timer", "polkadot-node-subsystem", "polkadot-overseer", @@ -7727,65 +8068,77 @@ dependencies = [ "sp-blockchain", "sp-inherents", "thiserror", - "tracing-gum 0.9.38 (git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes)", + "tracing-gum", +] + +[[package]] +name = "polkadot-node-core-prospective-parachains" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +dependencies = [ + "bitvec", + "fatality", + "futures 0.3.30", + "parity-scale-codec", + "polkadot-node-primitives", + "polkadot-node-subsystem", + "polkadot-node-subsystem-util", + "polkadot-primitives", + "thiserror", + "tracing-gum", ] [[package]] name = "polkadot-node-core-provisioner" -version = "0.9.38" -source = "git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes#20fcf6d7f070911b441925cb6f418b3d346af3a0" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "bitvec", "fatality", - "futures 0.3.28", + "futures 0.3.30", "futures-timer", "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-util", "polkadot-primitives", - "rand 0.8.5", "thiserror", - "tracing-gum 0.9.38 (git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes)", + "tracing-gum", ] [[package]] name = "polkadot-node-core-pvf" -version = "0.9.38" -source = "git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes#20fcf6d7f070911b441925cb6f418b3d346af3a0" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "always-assert", - "assert_matches", - "cpu-time", - "futures 0.3.28", + "futures 0.3.30", "futures-timer", + "libc", "parity-scale-codec", "pin-project", "polkadot-core-primitives", - "polkadot-node-metrics 0.9.38 (git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes)", - "polkadot-parachain", + "polkadot-node-core-pvf-common", + "polkadot-node-metrics", + "polkadot-node-primitives", + "polkadot-parachain-primitives", + "polkadot-primitives", "rand 0.8.5", - "rayon", - "sc-executor", - "sc-executor-common", - "sc-executor-wasmtime", "slotmap", "sp-core", - "sp-externalities", - "sp-io", "sp-maybe-compressed-blob", - "sp-tracing", "sp-wasm-interface", + "substrate-build-script-utils", "tempfile", "tokio", - "tracing-gum 0.9.38 (git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes)", + "tracing-gum", ] [[package]] name = "polkadot-node-core-pvf-checker" -version = "0.9.38" -source = "git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes#20fcf6d7f070911b441925cb6f418b3d346af3a0" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ - "futures 0.3.28", + "futures 0.3.30", "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-util", @@ -7793,52 +8146,80 @@ dependencies = [ "polkadot-primitives", "sp-keystore", "thiserror", - "tracing-gum 0.9.38 (git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes)", + "tracing-gum", ] [[package]] -name = "polkadot-node-core-runtime-api" -version = "0.9.38" -source = "git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes#20fcf6d7f070911b441925cb6f418b3d346af3a0" +name = "polkadot-node-core-pvf-common" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ - "futures 0.3.28", - "lru 0.9.0", - "polkadot-node-metrics 0.9.38 (git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes)", - "polkadot-node-subsystem", - "polkadot-node-subsystem-types", + "cpu-time", + "futures 0.3.30", + "landlock", + "libc", + "parity-scale-codec", + "polkadot-parachain-primitives", "polkadot-primitives", - "sp-consensus-babe", - "tracing-gum 0.9.38 (git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes)", + "sc-executor", + "sc-executor-common", + "sc-executor-wasmtime", + "sp-core", + "sp-externalities", + "sp-io", + "sp-tracing", + "tokio", + "tracing-gum", ] [[package]] -name = "polkadot-node-jaeger" -version = "0.9.38" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.38#097ffd245c42aeff28cf80f8a3568e1bee2e7da7" +name = "polkadot-node-core-pvf-prepare-worker" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ - "lazy_static", - "log", - "mick-jaeger", + "futures 0.3.30", + "libc", "parity-scale-codec", - "parking_lot 0.12.1", - "polkadot-node-primitives", + "polkadot-node-core-pvf-common", + "polkadot-parachain-primitives", "polkadot-primitives", - "sc-network", - "sp-core", - "thiserror", + "rayon", + "sc-executor", + "sc-executor-common", + "sc-executor-wasmtime", + "sp-io", + "sp-maybe-compressed-blob", + "sp-tracing", + "tikv-jemalloc-ctl", "tokio", + "tracing-gum", +] + +[[package]] +name = "polkadot-node-core-runtime-api" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +dependencies = [ + "futures 0.3.30", + "polkadot-node-metrics", + "polkadot-node-subsystem", + "polkadot-node-subsystem-types", + "polkadot-primitives", + "schnellru", + "sp-consensus-babe", + "tracing-gum", ] [[package]] name = "polkadot-node-jaeger" -version = "0.9.38" -source = "git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes#20fcf6d7f070911b441925cb6f418b3d346af3a0" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "lazy_static", "log", "mick-jaeger", "parity-scale-codec", - "parking_lot 0.12.1", + "parking_lot 0.12.2", "polkadot-node-primitives", "polkadot-primitives", "sc-network", @@ -7849,30 +8230,11 @@ dependencies = [ [[package]] name = "polkadot-node-metrics" -version = "0.9.38" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.38#097ffd245c42aeff28cf80f8a3568e1bee2e7da7" -dependencies = [ - "bs58", - "futures 0.3.28", - "futures-timer", - "log", - "parity-scale-codec", - "polkadot-primitives", - "prioritized-metered-channel", - "sc-cli", - "sc-service", - "sc-tracing", - "substrate-prometheus-endpoint", - "tracing-gum 0.9.38 (git+https://github.com/paritytech/polkadot?branch=release-v0.9.38)", -] - -[[package]] -name = "polkadot-node-metrics" -version = "0.9.38" -source = "git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes#20fcf6d7f070911b441925cb6f418b3d346af3a0" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ - "bs58", - "futures 0.3.28", + "bs58 0.5.1", + "futures 0.3.30", "futures-timer", "log", "parity-scale-codec", @@ -7882,79 +8244,81 @@ dependencies = [ "sc-service", "sc-tracing", "substrate-prometheus-endpoint", - "tracing-gum 0.9.38 (git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes)", + "tracing-gum", ] [[package]] name = "polkadot-node-network-protocol" -version = "0.9.38" -source = "git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes#20fcf6d7f070911b441925cb6f418b3d346af3a0" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ + "async-channel 1.9.0", "async-trait", + "bitvec", "derive_more", "fatality", - "futures 0.3.28", + "futures 0.3.30", "hex", "parity-scale-codec", - "polkadot-node-jaeger 0.9.38 (git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes)", + "polkadot-node-jaeger", "polkadot-node-primitives", "polkadot-primitives", "rand 0.8.5", "sc-authority-discovery", "sc-network", - "sc-network-common", - "strum", + "strum 0.24.1", "thiserror", - "tracing-gum 0.9.38 (git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes)", + "tracing-gum", ] [[package]] name = "polkadot-node-primitives" -version = "0.9.38" -source = "git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes#20fcf6d7f070911b441925cb6f418b3d346af3a0" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "bounded-vec", - "futures 0.3.28", + "futures 0.3.30", "parity-scale-codec", - "polkadot-parachain", + "polkadot-parachain-primitives", "polkadot-primitives", - "schnorrkel", + "schnorrkel 0.9.1", "serde", "sp-application-crypto", "sp-consensus-babe", - "sp-consensus-vrf", "sp-core", "sp-keystore", "sp-maybe-compressed-blob", + "sp-runtime", "thiserror", - "zstd", + "zstd 0.12.4", ] [[package]] name = "polkadot-node-subsystem" -version = "0.9.38" -source = "git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes#20fcf6d7f070911b441925cb6f418b3d346af3a0" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ - "polkadot-node-jaeger 0.9.38 (git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes)", + "polkadot-node-jaeger", "polkadot-node-subsystem-types", "polkadot-overseer", ] [[package]] name = "polkadot-node-subsystem-types" -version = "0.9.38" -source = "git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes#20fcf6d7f070911b441925cb6f418b3d346af3a0" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "async-trait", "derive_more", - "futures 0.3.28", + "futures 0.3.30", "orchestra", - "polkadot-node-jaeger 0.9.38 (git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes)", + "polkadot-node-jaeger", "polkadot-node-network-protocol", "polkadot-node-primitives", "polkadot-primitives", "polkadot-statement-table", "sc-network", + "sc-transaction-pool-api", "smallvec", "sp-api", "sp-authority-discovery", @@ -7965,23 +8329,22 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem-util" -version = "0.9.38" -source = "git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes#20fcf6d7f070911b441925cb6f418b3d346af3a0" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "async-trait", "derive_more", "fatality", - "futures 0.3.28", + "futures 0.3.30", "futures-channel", - "itertools", + "itertools 0.10.5", "kvdb", - "lru 0.9.0", "parity-db", "parity-scale-codec", "parking_lot 0.11.2", "pin-project", - "polkadot-node-jaeger 0.9.38 (git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes)", - "polkadot-node-metrics 0.9.38 (git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes)", + "polkadot-node-jaeger", + "polkadot-node-metrics", "polkadot-node-network-protocol", "polkadot-node-primitives", "polkadot-node-subsystem", @@ -7989,41 +8352,43 @@ dependencies = [ "polkadot-primitives", "prioritized-metered-channel", "rand 0.8.5", + "schnellru", "sp-application-crypto", "sp-core", "sp-keystore", "thiserror", - "tracing-gum 0.9.38 (git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes)", + "tracing-gum", ] [[package]] name = "polkadot-overseer" -version = "0.9.38" -source = "git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes#20fcf6d7f070911b441925cb6f418b3d346af3a0" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "async-trait", - "futures 0.3.28", + "futures 0.3.30", "futures-timer", - "lru 0.9.0", "orchestra", - "parking_lot 0.12.1", - "polkadot-node-metrics 0.9.38 (git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes)", + "parking_lot 0.12.2", + "polkadot-node-metrics", "polkadot-node-network-protocol", "polkadot-node-primitives", "polkadot-node-subsystem-types", "polkadot-primitives", "sc-client-api", + "schnellru", "sp-api", "sp-core", "tikv-jemalloc-ctl", - "tracing-gum 0.9.38 (git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes)", + "tracing-gum", ] [[package]] -name = "polkadot-parachain" -version = "0.9.38" -source = "git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes#20fcf6d7f070911b441925cb6f418b3d346af3a0" +name = "polkadot-parachain-primitives" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ + "bounded-collections", "derive_more", "frame-support", "parity-scale-codec", @@ -8032,39 +8397,42 @@ dependencies = [ "serde", "sp-core", "sp-runtime", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", ] [[package]] name = "polkadot-performance-test" -version = "0.9.38" -source = "git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes#20fcf6d7f070911b441925cb6f418b3d346af3a0" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "env_logger 0.9.3", - "kusama-runtime", "log", "polkadot-erasure-coding", - "polkadot-node-core-pvf", + "polkadot-node-core-pvf-prepare-worker", "polkadot-node-primitives", + "polkadot-primitives", "quote", + "sc-executor-common", + "sp-maybe-compressed-blob", + "staging-kusama-runtime", "thiserror", ] [[package]] name = "polkadot-primitives" -version = "0.9.38" -source = "git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes#20fcf6d7f070911b441925cb6f418b3d346af3a0" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "bitvec", "hex-literal", "parity-scale-codec", "polkadot-core-primitives", - "polkadot-parachain", + "polkadot-parachain-primitives", "scale-info", "serde", "sp-api", "sp-application-crypto", - "sp-arithmetic", + "sp-arithmetic 16.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", "sp-authority-discovery", "sp-consensus-slots", "sp-core", @@ -8073,16 +8441,14 @@ dependencies = [ "sp-keystore", "sp-runtime", "sp-staking", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", ] [[package]] name = "polkadot-rpc" -version = "0.9.38" -source = "git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes#20fcf6d7f070911b441925cb6f418b3d346af3a0" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ - "beefy-gadget", - "beefy-gadget-rpc", "jsonrpsee", "mmr-rpc", "pallet-transaction-payment-rpc", @@ -8091,9 +8457,11 @@ dependencies = [ "sc-client-api", "sc-consensus-babe", "sc-consensus-babe-rpc", + "sc-consensus-beefy", + "sc-consensus-beefy-rpc", "sc-consensus-epochs", - "sc-finality-grandpa", - "sc-finality-grandpa-rpc", + "sc-consensus-grandpa", + "sc-consensus-grandpa-rpc", "sc-rpc", "sc-sync-state-rpc", "sc-transaction-pool-api", @@ -8110,8 +8478,8 @@ dependencies = [ [[package]] name = "polkadot-runtime" -version = "0.9.38" -source = "git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes#20fcf6d7f070911b441925cb6f418b3d346af3a0" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "bitvec", "frame-benchmarking", @@ -8132,6 +8500,7 @@ dependencies = [ "pallet-bounties", "pallet-child-bounties", "pallet-collective", + "pallet-conviction-voting", "pallet-democracy", "pallet-election-provider-multi-phase", "pallet-election-provider-support-benchmarking", @@ -8142,6 +8511,7 @@ dependencies = [ "pallet-im-online", "pallet-indices", "pallet-membership", + "pallet-message-queue", "pallet-multisig", "pallet-nomination-pools", "pallet-nomination-pools-benchmarking", @@ -8150,11 +8520,13 @@ dependencies = [ "pallet-offences-benchmarking", "pallet-preimage", "pallet-proxy", + "pallet-referenda", "pallet-scheduler", "pallet-session", "pallet-session-benchmarking", "pallet-staking", "pallet-staking-reward-curve", + "pallet-staking-runtime-api", "pallet-timestamp", "pallet-tips", "pallet-transaction-payment", @@ -8162,7 +8534,9 @@ dependencies = [ "pallet-treasury", "pallet-utility", "pallet-vesting", + "pallet-whitelist", "pallet-xcm", + "pallet-xcm-benchmarks", "parity-scale-codec", "polkadot-primitives", "polkadot-runtime-common", @@ -8174,10 +8548,11 @@ dependencies = [ "serde_derive", "smallvec", "sp-api", + "sp-arithmetic 16.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", "sp-authority-discovery", - "sp-beefy", "sp-block-builder", "sp-consensus-babe", + "sp-consensus-beefy", "sp-core", "sp-inherents", "sp-io", @@ -8187,20 +8562,21 @@ dependencies = [ "sp-runtime", "sp-session", "sp-staking", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", + "sp-storage", "sp-transaction-pool", "sp-version", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", "static_assertions", "substrate-wasm-builder", - "xcm", - "xcm-builder", - "xcm-executor", ] [[package]] name = "polkadot-runtime-common" -version = "0.9.38" -source = "git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes#20fcf6d7f070911b441925cb6f418b3d346af3a0" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "bitvec", "frame-benchmarking", @@ -8212,9 +8588,7 @@ dependencies = [ "log", "pallet-authorship", "pallet-babe", - "pallet-bags-list", "pallet-balances", - "pallet-beefy-mmr", "pallet-election-provider-multi-phase", "pallet-fast-unstake", "pallet-session", @@ -8233,7 +8607,6 @@ dependencies = [ "serde_derive", "slot-range-helper", "sp-api", - "sp-beefy", "sp-core", "sp-inherents", "sp-io", @@ -8241,15 +8614,15 @@ dependencies = [ "sp-runtime", "sp-session", "sp-staking", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", + "staging-xcm", "static_assertions", - "xcm", ] [[package]] name = "polkadot-runtime-constants" -version = "0.9.38" -source = "git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes#20fcf6d7f070911b441925cb6f418b3d346af3a0" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-support", "polkadot-primitives", @@ -8262,20 +8635,21 @@ dependencies = [ [[package]] name = "polkadot-runtime-metrics" -version = "0.9.38" -source = "git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes#20fcf6d7f070911b441925cb6f418b3d346af3a0" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ - "bs58", + "bs58 0.5.1", + "frame-benchmarking", "parity-scale-codec", "polkadot-primitives", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", "sp-tracing", ] [[package]] name = "polkadot-runtime-parachains" -version = "0.9.38" -source = "git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes#20fcf6d7f070911b441925cb6f418b3d346af3a0" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "bitflags 1.3.2", "bitvec", @@ -8283,16 +8657,19 @@ dependencies = [ "frame-benchmarking", "frame-support", "frame-system", + "impl-trait-for-tuples", "log", "pallet-authority-discovery", "pallet-authorship", "pallet-babe", "pallet-balances", + "pallet-message-queue", "pallet-session", "pallet-staking", "pallet-timestamp", "pallet-vesting", "parity-scale-codec", + "polkadot-parachain-primitives", "polkadot-primitives", "polkadot-runtime-metrics", "rand 0.8.5", @@ -8309,44 +8686,46 @@ dependencies = [ "sp-runtime", "sp-session", "sp-staking", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", + "staging-xcm", + "staging-xcm-executor", "static_assertions", - "xcm", - "xcm-executor", ] [[package]] name = "polkadot-service" -version = "0.9.38" -source = "git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes#20fcf6d7f070911b441925cb6f418b3d346af3a0" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "async-trait", - "beefy-gadget", + "frame-benchmarking", "frame-benchmarking-cli", "frame-support", + "frame-system", "frame-system-rpc-runtime-api", - "futures 0.3.28", + "futures 0.3.30", "hex-literal", - "kusama-runtime", + "is_executable", "kvdb", "kvdb-rocksdb", "log", - "lru 0.9.0", "mmr-gadget", "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 0.9.38 (git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes)", + "polkadot-network-bridge", "polkadot-node-collation-generation", "polkadot-node-core-approval-voting", "polkadot-node-core-av-store", @@ -8357,7 +8736,9 @@ dependencies = [ "polkadot-node-core-chain-selection", "polkadot-node-core-dispute-coordinator", "polkadot-node-core-parachains-inherent", + "polkadot-node-core-prospective-parachains", "polkadot-node-core-provisioner", + "polkadot-node-core-pvf", "polkadot-node-core-pvf-checker", "polkadot-node-core-runtime-api", "polkadot-node-network-protocol", @@ -8366,11 +8747,11 @@ dependencies = [ "polkadot-node-subsystem-types", "polkadot-node-subsystem-util", "polkadot-overseer", - "polkadot-parachain", + "polkadot-parachain-primitives", "polkadot-primitives", "polkadot-rpc", "polkadot-runtime", - "polkadot-runtime-constants", + "polkadot-runtime-common", "polkadot-runtime-parachains", "polkadot-statement-distribution", "rococo-runtime", @@ -8382,31 +8763,36 @@ dependencies = [ "sc-client-db", "sc-consensus", "sc-consensus-babe", + "sc-consensus-beefy", + "sc-consensus-grandpa", "sc-consensus-slots", "sc-executor", - "sc-finality-grandpa", "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", + "schnellru", "serde", "serde_json", "sp-api", "sp-authority-discovery", - "sp-beefy", "sp-block-builder", "sp-blockchain", "sp-consensus", "sp-consensus-babe", + "sp-consensus-beefy", + "sp-consensus-grandpa", "sp-core", - "sp-finality-grandpa", "sp-inherents", "sp-io", + "sp-keyring", "sp-keystore", "sp-mmr-primitives", "sp-offchain", @@ -8416,38 +8802,43 @@ dependencies = [ "sp-storage", "sp-timestamp", "sp-transaction-pool", - "sp-trie", + "sp-version", + "sp-weights", + "staging-kusama-runtime", "substrate-prometheus-endpoint", "thiserror", - "tracing-gum 0.9.38 (git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes)", + "tracing-gum", "westend-runtime", ] [[package]] name = "polkadot-statement-distribution" -version = "0.9.38" -source = "git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes#20fcf6d7f070911b441925cb6f418b3d346af3a0" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ - "arrayvec 0.5.2", + "arrayvec 0.7.4", + "bitvec", "fatality", - "futures 0.3.28", + "futures 0.3.30", + "futures-timer", "indexmap 1.9.3", "parity-scale-codec", "polkadot-node-network-protocol", "polkadot-node-primitives", "polkadot-node-subsystem", + "polkadot-node-subsystem-types", "polkadot-node-subsystem-util", "polkadot-primitives", "sp-keystore", "sp-staking", "thiserror", - "tracing-gum 0.9.38 (git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes)", + "tracing-gum", ] [[package]] name = "polkadot-statement-table" -version = "0.9.38" -source = "git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes#20fcf6d7f070911b441925cb6f418b3d346af3a0" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "parity-scale-codec", "polkadot-primitives", @@ -8456,8 +8847,8 @@ dependencies = [ [[package]] name = "polkadot-test-runtime" -version = "0.9.38" -source = "git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes#20fcf6d7f070911b441925cb6f418b3d346af3a0" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "bitvec", "frame-election-provider-support", @@ -8483,7 +8874,7 @@ dependencies = [ "pallet-vesting", "pallet-xcm", "parity-scale-codec", - "polkadot-parachain", + "polkadot-parachain-primitives", "polkadot-primitives", "polkadot-runtime-common", "polkadot-runtime-parachains", @@ -8494,9 +8885,9 @@ dependencies = [ "smallvec", "sp-api", "sp-authority-discovery", - "sp-beefy", "sp-block-builder", "sp-consensus-babe", + "sp-consensus-beefy", "sp-core", "sp-inherents", "sp-io", @@ -8505,24 +8896,23 @@ dependencies = [ "sp-runtime", "sp-session", "sp-staking", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", "sp-transaction-pool", "sp-version", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", "substrate-wasm-builder", "test-runtime-constants", - "xcm", - "xcm-builder", - "xcm-executor", ] [[package]] name = "polkadot-test-service" -version = "0.9.38" -source = "git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes#20fcf6d7f070911b441925cb6f418b3d346af3a0" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ - "frame-benchmarking", "frame-system", - "futures 0.3.28", + "futures 0.3.30", "hex", "pallet-balances", "pallet-staking", @@ -8530,7 +8920,7 @@ dependencies = [ "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-overseer", - "polkadot-parachain", + "polkadot-parachain-primitives", "polkadot-primitives", "polkadot-rpc", "polkadot-runtime-common", @@ -8544,20 +8934,18 @@ dependencies = [ "sc-client-api", "sc-consensus", "sc-consensus-babe", - "sc-executor", - "sc-finality-grandpa", + "sc-consensus-grandpa", "sc-network", - "sc-network-common", "sc-service", "sc-tracing", "sc-transaction-pool", - "sp-arithmetic", + "sp-arithmetic 16.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", "sp-authority-discovery", "sp-blockchain", "sp-consensus", "sp-consensus-babe", + "sp-consensus-grandpa", "sp-core", - "sp-finality-grandpa", "sp-inherents", "sp-keyring", "sp-runtime", @@ -8566,7 +8954,7 @@ dependencies = [ "tempfile", "test-runtime-constants", "tokio", - "tracing-gum 0.9.38 (git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes)", + "tracing-gum", ] [[package]] @@ -8581,45 +8969,60 @@ dependencies = [ "concurrent-queue", "libc", "log", - "pin-project-lite 0.2.10", + "pin-project-lite 0.2.14", "windows-sys 0.48.0", ] [[package]] -name = "poly1305" -version = "0.7.2" +name = "polling" +version = "3.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "048aeb476be11a4b6ca432ca569e375810de9294ae78f4774e78ea98a9246ede" +checksum = "645493cf344456ef24219d02a768cf1fb92ddf8c92161679ae3d91b91a637be3" dependencies = [ - "cpufeatures", - "opaque-debug 0.3.0", - "universal-hash 0.4.1", + "cfg-if", + "concurrent-queue", + "hermit-abi 0.3.9", + "pin-project-lite 0.2.14", + "rustix 0.38.34", + "tracing", + "windows-sys 0.52.0", ] [[package]] -name = "polyval" -version = "0.5.3" +name = "poly1305" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8419d2b623c7c0896ff2d5d96e2cb4ede590fed28fcc34934f4c33c036e620a1" +checksum = "8159bd90725d2df49889a078b54f4f79e87f1f8a8444194cdca81d38f5393abf" dependencies = [ - "cfg-if", "cpufeatures", - "opaque-debug 0.3.0", - "universal-hash 0.4.1", + "opaque-debug 0.3.1", + "universal-hash", ] [[package]] name = "polyval" -version = "0.6.1" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d52cff9d1d4dee5fe6d03729099f4a310a41179e0a10dbf542039873f2e826fb" +checksum = "9d1fe60d06143b2430aa532c94cfe9e29783047f06c0d7fd359a9a51b729fa25" dependencies = [ "cfg-if", "cpufeatures", - "opaque-debug 0.3.0", - "universal-hash 0.5.1", + "opaque-debug 0.3.1", + "universal-hash", ] +[[package]] +name = "portable-atomic" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7170ef9988bc169ba16dd36a7fa041e5c4cbeb6a35b76d4c03daded371eae7c0" + +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + [[package]] name = "ppv-lite86" version = "0.2.17" @@ -8634,7 +9037,7 @@ checksum = "59230a63c37f3e18569bdb90e4a89cbf5bf8b06fea0b84e65ea10cc4df47addd" dependencies = [ "difflib", "float-cmp", - "itertools", + "itertools 0.10.5", "normalize-line-endings", "predicates-core", "regex", @@ -8656,21 +9059,41 @@ dependencies = [ "termtree", ] +[[package]] +name = "prettier-please" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22020dfcf177fcc7bf5deaf7440af371400c67c0de14c399938d8ed4fb4645d3" +dependencies = [ + "proc-macro2", + "syn 2.0.60", +] + [[package]] name = "prettyplease" -version = "0.1.25" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c8646e95016a7a6c4adea95bafa8a16baab64b583356217f2c85db4a39d9a86" +checksum = "f28f53e8b192565862cf99343194579a022eb9c7dd3a8d03134734803c7b3125" dependencies = [ "proc-macro2", "syn 1.0.109", ] +[[package]] +name = "prettyplease" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ac2cf0f2e4f42b49f5ffd07dae8d746508ef7526c13940e5f524012ae6c6550" +dependencies = [ + "proc-macro2", + "syn 2.0.60", +] + [[package]] name = "primitive-types" -version = "0.12.1" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f3486ccba82358b11a77516035647c34ba167dfa53312630de83b12bd4f3d66" +checksum = "0b34d9fd68ae0b74a41b21c03c2f62847aa0ffea044eee893b4c140b37e244e2" dependencies = [ "fixed-hash", "impl-codec", @@ -8688,7 +9111,7 @@ dependencies = [ "coarsetime", "crossbeam-queue", "derive_more", - "futures 0.3.28", + "futures 0.3.30", "futures-timer", "nanorand", "thiserror", @@ -8702,7 +9125,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" dependencies = [ "once_cell", - "toml_edit", + "toml_edit 0.19.15", +] + +[[package]] +name = "proc-macro-crate" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b00f26d3400549137f92511a46ac1cd8ce37cb5598a96d382381458b992a5d24" +dependencies = [ + "toml_datetime", + "toml_edit 0.20.2", ] [[package]] @@ -8729,11 +9162,22 @@ dependencies = [ "version_check", ] +[[package]] +name = "proc-macro-warning" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d1eaa7fa0aa1929ffdf7eeb6eac234dde6268914a14ad44d23521ab6a9b258e" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.60", +] + [[package]] name = "proc-macro2" -version = "1.0.66" +version = "1.0.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" +checksum = "3d1597b0c024618f09a9c3b8655b7e430397a36d23fdafec26d6965e9eec3eba" dependencies = [ "unicode-ident", ] @@ -8748,31 +9192,31 @@ dependencies = [ "fnv", "lazy_static", "memchr", - "parking_lot 0.12.1", + "parking_lot 0.12.2", "thiserror", ] [[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", + "parking_lot 0.12.2", + "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.60", ] [[package]] @@ -8792,13 +9236,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "119533552c9a7ffacc21e099c24a0ac8bb19c2a2a3f363de84cd9b844feab270" dependencies = [ "bytes", - "heck", - "itertools", + "heck 0.4.1", + "itertools 0.10.5", "lazy_static", "log", "multimap", "petgraph", - "prettyplease", + "prettyplease 0.1.11", "prost", "prost-types", "regex", @@ -8807,19 +9251,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" @@ -8827,7 +9258,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5d2d8d10f3c6ded6da8b05b5fb3b8a5082514344d56c9f871412d29b4e075b4" dependencies = [ "anyhow", - "itertools", + "itertools 0.10.5", "proc-macro2", "quote", "syn 1.0.109", @@ -8866,6 +9297,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" @@ -8879,27 +9323,27 @@ dependencies = [ [[package]] name = "quinn-proto" -version = "0.9.4" +version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f31999cfc7927c4e212e60fd50934ab40e8e8bfd2d493d6095d2d306bc0764d9" +checksum = "94b0b33c13a79f669c85defaf4c275dc86a0c0372807d0ca3d78e0bb87274863" dependencies = [ "bytes", "rand 0.8.5", - "ring", + "ring 0.16.20", "rustc-hash", - "rustls 0.20.8", + "rustls 0.20.9", "slab", "thiserror", "tinyvec", "tracing", - "webpki 0.22.0", + "webpki", ] [[package]] name = "quote" -version = "1.0.32" +version = "1.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50f3b39ccfb720540debaa0164757101c08ecb8d326b15358ce76a62c7e85965" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" dependencies = [ "proc-macro2", ] @@ -8969,17 +9413,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.10", -] - -[[package]] -name = "rand_distr" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32cb0b9bc82b0a0876c2dd994a7e7a2683d3e7390ca40e6886785ef0c7e3ee31" -dependencies = [ - "num-traits", - "rand 0.8.5", + "getrandom 0.2.14", ] [[package]] @@ -9008,9 +9442,9 @@ checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3" [[package]] name = "rayon" -version = "1.7.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d2df5196e37bcc87abebc0053e20787d73847bb33134a69841207dd0a47f03b" +checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" dependencies = [ "either", "rayon-core", @@ -9018,27 +9452,12 @@ dependencies = [ [[package]] name = "rayon-core" -version = "1.11.0" +version = "1.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b8f95bd6966f5c87776639160a66bd8ab9895d9d4ab01ddba9fc60661aebe8d" +checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" dependencies = [ - "crossbeam-channel", "crossbeam-deque", "crossbeam-utils", - "num_cpus", -] - -[[package]] -name = "rcgen" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6413f3de1edee53342e6138e75b56d32e7bc6e332b3bd62d497b1929d4cfbcdd" -dependencies = [ - "pem", - "ring", - "time 0.3.24", - "x509-parser 0.13.2", - "yasna", ] [[package]] @@ -9048,8 +9467,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ffbe84efe2f38dea12e9bfc1f65377fdf03e53a18cb3b995faedf7934c7e785b" dependencies = [ "pem", - "ring", - "time 0.3.24", + "ring 0.16.20", + "time", "yasna", ] @@ -9064,62 +9483,71 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.3.5" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" +checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" dependencies = [ "bitflags 1.3.2", ] +[[package]] +name = "redox_syscall" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "469052894dcb553421e483e4209ee581a45100d31b4018de03e5a7ad86374a7e" +dependencies = [ + "bitflags 2.5.0", +] + [[package]] name = "redox_users" -version = "0.4.3" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" +checksum = "bd283d9651eeda4b2a83a43c1c91b266c40fd76ecd39a50a8c630ae69dc72891" dependencies = [ - "getrandom 0.2.10", - "redox_syscall 0.2.16", + "getrandom 0.2.14", + "libredox", "thiserror", ] [[package]] name = "reed-solomon-novelpoly" -version = "1.0.0" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3bd8f48b2066e9f69ab192797d66da804d1935bf22763204ed3675740cb0f221" +checksum = "58130877ca403ab42c864fbac74bb319a0746c07a634a92a5cfc7f54af272582" dependencies = [ "derive_more", "fs-err", - "itertools", - "static_init 0.5.2", + "itertools 0.11.0", + "static_init", "thiserror", ] [[package]] name = "ref-cast" -version = "1.0.19" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61ef7e18e8841942ddb1cf845054f8008410030a3997875d9e49b7a363063df1" +checksum = "c4846d4c50d1721b1a3bef8af76924eef20d5e723647333798c1b519b3a9473f" dependencies = [ "ref-cast-impl", ] [[package]] name = "ref-cast-impl" -version = "1.0.19" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dfaf0c85b766276c797f3791f5bc6d5bd116b41d53049af2789666b0c0bc9fa" +checksum = "5fddb4f8d99b0a2ebafc65a87a69a7b9875e4b1ae1f00db265d300ef7f28bccc" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.60", ] [[package]] name = "regalloc2" -version = "0.3.2" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d43a209257d978ef079f3d446331d0f1794f5e0fc19b306a199983857833a779" +checksum = "80535183cae11b149d618fbd3c37e38d7cda589d82d7769e196ca9a9042d7621" dependencies = [ "fxhash", "log", @@ -9129,14 +9557,14 @@ dependencies = [ [[package]] name = "regex" -version = "1.9.1" +version = "1.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2eae68fc220f7cf2532e4494aded17545fce192d59cd996e0fe7887f4ceb575" +checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.3.4", - "regex-syntax 0.7.4", + "regex-automata 0.4.6", + "regex-syntax 0.8.3", ] [[package]] @@ -9150,13 +9578,13 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.3.4" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7b6d6190b7594385f61bd3911cd1be99dfddcfc365a4160cc2ab5bff4aed294" +checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.7.4", + "regex-syntax 0.8.3", ] [[package]] @@ -9167,9 +9595,9 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "regex-syntax" -version = "0.7.4" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5ea92a5b6195c6ef2a0295ea818b312502c6fc94dde986c5553242e18fd4ce2" +checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" [[package]] name = "resolv-conf" @@ -9183,13 +9611,27 @@ dependencies = [ [[package]] name = "rfc6979" -version = "0.3.1" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7743f17af12fa0b03b803ba12cd6a8d9483a587e89c69445e3909655c0b9fabb" +checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" +dependencies = [ + "hmac 0.12.1", + "subtle", +] + +[[package]] +name = "ring" +version = "0.1.0" +source = "git+https://github.com/w3f/ring-proof?rev=0e948f3#0e948f3c28cbacecdd3020403c4841c0eb339213" dependencies = [ - "crypto-bigint", - "hmac 0.12.1", - "zeroize", + "ark-ec", + "ark-ff", + "ark-poly", + "ark-serialize", + "ark-std", + "common", + "fflonk", + "merlin 3.0.0", ] [[package]] @@ -9202,16 +9644,31 @@ dependencies = [ "libc", "once_cell", "spin 0.5.2", - "untrusted", + "untrusted 0.7.1", "web-sys", "winapi", ] +[[package]] +name = "ring" +version = "0.17.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" +dependencies = [ + "cc", + "cfg-if", + "getrandom 0.2.14", + "libc", + "spin 0.9.8", + "untrusted 0.9.0", + "windows-sys 0.52.0", +] + [[package]] name = "rocksdb" -version = "0.19.0" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e9562ea1d70c0cc63a34a22d977753b50cca91cc6b6527750463bd5dd8697bc" +checksum = "bb6f170a4041d50a0ce04b0d2e14916d6ca863ea2e422689a5b694395d299ffe" dependencies = [ "libc", "librocksdb-sys", @@ -9219,10 +9676,10 @@ dependencies = [ [[package]] name = "rococo-runtime" -version = "0.9.38" -source = "git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes#20fcf6d7f070911b441925cb6f418b3d346af3a0" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ - "beefy-merkle-tree", + "binary-merkle-tree", "frame-benchmarking", "frame-executive", "frame-support", @@ -9248,6 +9705,7 @@ dependencies = [ "pallet-im-online", "pallet-indices", "pallet-membership", + "pallet-message-queue", "pallet-mmr", "pallet-multisig", "pallet-nis", @@ -9271,7 +9729,7 @@ dependencies = [ "pallet-xcm", "pallet-xcm-benchmarks", "parity-scale-codec", - "polkadot-parachain", + "polkadot-parachain-primitives", "polkadot-primitives", "polkadot-runtime-common", "polkadot-runtime-parachains", @@ -9282,9 +9740,9 @@ dependencies = [ "smallvec", "sp-api", "sp-authority-discovery", - "sp-beefy", "sp-block-builder", "sp-consensus-babe", + "sp-consensus-beefy", "sp-core", "sp-inherents", "sp-io", @@ -9293,20 +9751,21 @@ dependencies = [ "sp-runtime", "sp-session", "sp-staking", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", + "sp-storage", "sp-transaction-pool", "sp-version", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", "static_assertions", "substrate-wasm-builder", - "xcm", - "xcm-builder", - "xcm-executor", ] [[package]] name = "rococo-runtime-constants" -version = "0.9.38" -source = "git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes#20fcf6d7f070911b441925cb6f418b3d346af3a0" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-support", "polkadot-primitives", @@ -9319,24 +9778,13 @@ dependencies = [ [[package]] name = "rpassword" -version = "7.2.0" +version = "7.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6678cf63ab3491898c0d021b493c94c9b221d91295294a2a5746eacbe5928322" +checksum = "80472be3c897911d0137b2d2b9055faf6eeac5b14e324073d83bc17b191d7e3f" dependencies = [ "libc", "rtoolbox", - "winapi", -] - -[[package]] -name = "rtcp" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1919efd6d4a6a85d13388f9487549bb8e359f17198cc03ffd72f79b553873691" -dependencies = [ - "bytes", - "thiserror", - "webrtc-util", + "windows-sys 0.48.0", ] [[package]] @@ -9345,37 +9793,23 @@ version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "322c53fd76a18698f1c27381d58091de3a043d356aa5bd0d510608b565f469a0" dependencies = [ - "futures 0.3.28", + "futures 0.3.30", "log", "netlink-packet-route", "netlink-proto", - "nix 0.24.3", + "nix", "thiserror", "tokio", ] [[package]] name = "rtoolbox" -version = "0.0.1" +version = "0.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "034e22c514f5c0cb8a10ff341b9b048b5ceb21591f31c8f44c43b960f9b3524a" +checksum = "c247d24e63230cdb56463ae328478bd5eac8b8faa8c69461a77e8e323afac90e" dependencies = [ "libc", - "winapi", -] - -[[package]] -name = "rtp" -version = "0.6.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2a095411ff00eed7b12e4c6a118ba984d113e1079582570d56a5ee723f11f80" -dependencies = [ - "async-trait", - "bytes", - "rand 0.8.5", - "serde", - "thiserror", - "webrtc-util", + "windows-sys 0.48.0", ] [[package]] @@ -9411,7 +9845,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" dependencies = [ - "semver 1.0.18", + "semver 1.0.22", ] [[package]] @@ -9425,27 +9859,27 @@ dependencies = [ [[package]] name = "rustix" -version = "0.35.14" +version = "0.36.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6380889b07a03b5ecf1d44dc9ede6fd2145d84b502a2a9ca0b03c48e0cc3220f" +checksum = "305efbd14fde4139eb501df5f136994bb520b033fa9fbdce287507dc23b8c7ed" dependencies = [ "bitflags 1.3.2", - "errno 0.2.8", - "io-lifetimes 0.7.5", + "errno", + "io-lifetimes", "libc", - "linux-raw-sys 0.0.46", - "windows-sys 0.42.0", + "linux-raw-sys 0.1.4", + "windows-sys 0.45.0", ] [[package]] name = "rustix" -version = "0.37.23" +version = "0.37.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d69718bf81c6127a49dc64e44a742e8bb9213c0ff8869a22c308f84c1d4ab06" +checksum = "fea8ca367a3a01fe35e6943c400addf443c0f57670e6ec51196f71a4b8762dd2" dependencies = [ "bitflags 1.3.2", - "errno 0.3.2", - "io-lifetimes 1.0.11", + "errno", + "io-lifetimes", "libc", "linux-raw-sys 0.3.8", "windows-sys 0.48.0", @@ -9453,40 +9887,39 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.4" +version = "0.38.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a962918ea88d644592894bc6dc55acc6c0956488adcebbfb6e273506b7fd6e5" +checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" dependencies = [ - "bitflags 2.3.3", - "errno 0.3.2", + "bitflags 2.5.0", + "errno", "libc", - "linux-raw-sys 0.4.5", - "windows-sys 0.48.0", + "linux-raw-sys 0.4.13", + "windows-sys 0.52.0", ] [[package]] name = "rustls" -version = "0.19.1" +version = "0.20.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35edb675feee39aec9c99fa5ff985081995a06d594114ae14cbe797ad7b7a6d7" +checksum = "1b80e3dec595989ea8510028f30c408a4630db12c9cbb8de34203b89d6577e99" dependencies = [ - "base64 0.13.1", "log", - "ring", - "sct 0.6.1", - "webpki 0.21.4", + "ring 0.16.20", + "sct", + "webpki", ] [[package]] name = "rustls" -version = "0.20.8" +version = "0.21.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fff78fc74d175294f4e83b28343315ffcfb114b156f0185e9741cb5570f50e2f" +checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e" dependencies = [ "log", - "ring", - "sct 0.7.0", - "webpki 0.22.0", + "ring 0.17.8", + "rustls-webpki", + "sct", ] [[package]] @@ -9503,18 +9936,39 @@ dependencies = [ [[package]] name = "rustls-pemfile" -version = "1.0.3" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" +dependencies = [ + "base64 0.21.7", +] + +[[package]] +name = "rustls-webpki" +version = "0.101.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d3987094b1d07b653b7dfdc3f70ce9a1da9c51ac18c1b06b662e4f9a0e9f4b2" +checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" dependencies = [ - "base64 0.21.2", + "ring 0.17.8", + "untrusted 0.9.0", ] [[package]] name = "rustversion" -version = "1.0.14" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80af6f9131f277a45a3fba6ce8e2258037bb0477a67e610d3c1fe046ab31de47" + +[[package]] +name = "ruzstd" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" +checksum = "ac3ffab8f9715a0d455df4bbb9d21e91135aab3cd3ca187af0cd0c3c3f868fdc" +dependencies = [ + "byteorder", + "thiserror-core", + "twox-hash", +] [[package]] name = "rw-stream-sink" @@ -9522,16 +9976,16 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "26338f5e09bb721b85b135ea05af7767c90b52f6de4f087d4f4a3a9d64e7dc04" dependencies = [ - "futures 0.3.28", + "futures 0.3.30", "pin-project", "static_assertions", ] [[package]] name = "ryu" -version = "1.0.15" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" +checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1" [[package]] name = "safe-mix" @@ -9542,6 +9996,15 @@ dependencies = [ "rustc_version 0.2.3", ] +[[package]] +name = "safe_arch" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f398075ce1e6a179b46f51bd88d0598b92b00d3551f1a2d4ac49e771b56ac354" +dependencies = [ + "bytemuck", +] + [[package]] name = "same-file" version = "1.0.6" @@ -9554,7 +10017,7 @@ dependencies = [ [[package]] name = "sc-allocator" version = "4.1.0-dev" -source = "git+https://github.com/zeitgeistpm/substrate.git?branch=polkadot-v0.9.38-zeitgeist-adjustments#bd498817bb4479836a47231b4fc36831a19806ae" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "log", "sp-core", @@ -9565,20 +10028,21 @@ dependencies = [ [[package]] name = "sc-authority-discovery" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "async-trait", - "futures 0.3.28", + "futures 0.3.30", "futures-timer", "ip_network", "libp2p", "log", + "multihash", "parity-scale-codec", "prost", "prost-build", "rand 0.8.5", "sc-client-api", - "sc-network-common", + "sc-network", "sp-api", "sp-authority-discovery", "sp-blockchain", @@ -9592,9 +10056,9 @@ dependencies = [ [[package]] name = "sc-basic-authorship" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ - "futures 0.3.28", + "futures 0.3.30", "futures-timer", "log", "parity-scale-codec", @@ -9615,7 +10079,7 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "parity-scale-codec", "sc-client-api", @@ -9625,46 +10089,49 @@ dependencies = [ "sp-core", "sp-inherents", "sp-runtime", - "sp-state-machine", ] [[package]] name = "sc-chain-spec" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "memmap2", "sc-chain-spec-derive", - "sc-network-common", + "sc-client-api", + "sc-executor", + "sc-network", "sc-telemetry", "serde", "serde_json", + "sp-blockchain", "sp-core", "sp-runtime", + "sp-state-machine", ] [[package]] name = "sc-chain-spec-derive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.60", ] [[package]] name = "sc-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ - "array-bytes 4.2.0", + "array-bytes", "chrono", "clap", "fdlimit", - "futures 0.3.28", - "libp2p", + "futures 0.3.30", + "libp2p-identity", "log", "names", "parity-scale-codec", @@ -9675,7 +10142,6 @@ dependencies = [ "sc-client-db", "sc-keystore", "sc-network", - "sc-network-common", "sc-service", "sc-telemetry", "sc-tracing", @@ -9697,13 +10163,13 @@ dependencies = [ [[package]] name = "sc-client-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "fnv", - "futures 0.3.28", + "futures 0.3.30", "log", "parity-scale-codec", - "parking_lot 0.12.1", + "parking_lot 0.12.2", "sc-executor", "sc-transaction-pool-api", "sc-utils", @@ -9713,9 +10179,9 @@ dependencies = [ "sp-core", "sp-database", "sp-externalities", - "sp-keystore", "sp-runtime", "sp-state-machine", + "sp-statement-store", "sp-storage", "substrate-prometheus-endpoint", ] @@ -9723,7 +10189,7 @@ dependencies = [ [[package]] name = "sc-client-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "hash-db", "kvdb", @@ -9733,11 +10199,11 @@ dependencies = [ "log", "parity-db", "parity-scale-codec", - "parking_lot 0.12.1", + "parking_lot 0.12.2", "sc-client-api", "sc-state-db", "schnellru", - "sp-arithmetic", + "sp-arithmetic 16.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", "sp-blockchain", "sp-core", "sp-database", @@ -9749,15 +10215,15 @@ dependencies = [ [[package]] name = "sc-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "async-trait", - "futures 0.3.28", + "futures 0.3.30", "futures-timer", - "libp2p", + "libp2p-identity", "log", "mockall", - "parking_lot 0.12.1", + "parking_lot 0.12.2", "sc-client-api", "sc-utils", "serde", @@ -9774,10 +10240,10 @@ dependencies = [ [[package]] name = "sc-consensus-aura" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "async-trait", - "futures 0.3.28", + "futures 0.3.30", "log", "parity-scale-codec", "sc-block-builder", @@ -9803,25 +10269,24 @@ dependencies = [ [[package]] name = "sc-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "async-trait", "fork-tree", - "futures 0.3.28", + "futures 0.3.30", "log", - "merlin", "num-bigint", "num-rational", "num-traits", "parity-scale-codec", - "parking_lot 0.12.1", + "parking_lot 0.12.2", "sc-client-api", "sc-consensus", "sc-consensus-epochs", "sc-consensus-slots", - "sc-keystore", "sc-telemetry", - "schnorrkel", + "sc-transaction-pool-api", + "scale-info", "sp-api", "sp-application-crypto", "sp-block-builder", @@ -9829,7 +10294,6 @@ dependencies = [ "sp-consensus", "sp-consensus-babe", "sp-consensus-slots", - "sp-consensus-vrf", "sp-core", "sp-inherents", "sp-keystore", @@ -9841,9 +10305,9 @@ dependencies = [ [[package]] name = "sc-consensus-babe-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ - "futures 0.3.28", + "futures 0.3.30", "jsonrpsee", "sc-consensus-babe", "sc-consensus-epochs", @@ -9860,27 +10324,142 @@ dependencies = [ "thiserror", ] +[[package]] +name = "sc-consensus-beefy" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +dependencies = [ + "array-bytes", + "async-channel 1.9.0", + "async-trait", + "fnv", + "futures 0.3.30", + "log", + "parity-scale-codec", + "parking_lot 0.12.2", + "sc-client-api", + "sc-consensus", + "sc-network", + "sc-network-gossip", + "sc-network-sync", + "sc-utils", + "sp-api", + "sp-application-crypto", + "sp-arithmetic 16.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", + "sp-blockchain", + "sp-consensus", + "sp-consensus-beefy", + "sp-core", + "sp-keystore", + "sp-mmr-primitives", + "sp-runtime", + "substrate-prometheus-endpoint", + "thiserror", + "wasm-timer", +] + +[[package]] +name = "sc-consensus-beefy-rpc" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +dependencies = [ + "futures 0.3.30", + "jsonrpsee", + "log", + "parity-scale-codec", + "parking_lot 0.12.2", + "sc-consensus-beefy", + "sc-rpc", + "serde", + "sp-consensus-beefy", + "sp-core", + "sp-runtime", + "thiserror", +] + [[package]] name = "sc-consensus-epochs" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +dependencies = [ + "fork-tree", + "parity-scale-codec", + "sc-client-api", + "sc-consensus", + "sp-blockchain", + "sp-runtime", +] + +[[package]] +name = "sc-consensus-grandpa" +version = "0.10.0-dev" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ + "ahash 0.8.11", + "array-bytes", + "async-trait", + "dyn-clone", + "finality-grandpa", "fork-tree", + "futures 0.3.30", + "futures-timer", + "log", "parity-scale-codec", + "parking_lot 0.12.2", + "rand 0.8.5", + "sc-block-builder", + "sc-chain-spec", "sc-client-api", "sc-consensus", + "sc-network", + "sc-network-common", + "sc-network-gossip", + "sc-telemetry", + "sc-transaction-pool-api", + "sc-utils", + "serde_json", + "sp-api", + "sp-application-crypto", + "sp-arithmetic 16.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", + "sp-blockchain", + "sp-consensus", + "sp-consensus-grandpa", + "sp-core", + "sp-keystore", + "sp-runtime", + "substrate-prometheus-endpoint", + "thiserror", +] + +[[package]] +name = "sc-consensus-grandpa-rpc" +version = "0.10.0-dev" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +dependencies = [ + "finality-grandpa", + "futures 0.3.30", + "jsonrpsee", + "log", + "parity-scale-codec", + "sc-client-api", + "sc-consensus-grandpa", + "sc-rpc", + "serde", "sp-blockchain", + "sp-core", "sp-runtime", + "thiserror", ] [[package]] name = "sc-consensus-manual-seal" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "assert_matches", "async-trait", - "futures 0.3.28", + "futures 0.3.30", + "futures-timer", "jsonrpsee", "log", "parity-scale-codec", @@ -9910,17 +10489,17 @@ dependencies = [ [[package]] name = "sc-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "async-trait", - "futures 0.3.28", + "futures 0.3.30", "futures-timer", "log", "parity-scale-codec", "sc-client-api", "sc-consensus", "sc-telemetry", - "sp-arithmetic", + "sp-arithmetic 16.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", "sp-blockchain", "sp-consensus", "sp-consensus-slots", @@ -9933,14 +10512,13 @@ dependencies = [ [[package]] name = "sc-executor" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ - "lru 0.8.1", "parity-scale-codec", - "parking_lot 0.12.1", + "parking_lot 0.12.2", "sc-executor-common", - "sc-executor-wasmi", "sc-executor-wasmtime", + "schnellru", "sp-api", "sp-core", "sp-externalities", @@ -9951,45 +10529,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/zeitgeistpm/substrate.git?branch=polkadot-v0.9.38-zeitgeist-adjustments#bd498817bb4479836a47231b4fc36831a19806ae" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" 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.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" -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/zeitgeistpm/substrate.git?branch=polkadot-v0.9.38-zeitgeist-adjustments#bd498817bb4479836a47231b4fc36831a19806ae" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ + "anyhow", "cfg-if", "libc", "log", - "once_cell", - "rustix 0.35.14", + "rustix 0.36.17", "sc-allocator", "sc-executor-common", "sp-runtime-interface", @@ -9997,76 +10560,17 @@ dependencies = [ "wasmtime", ] -[[package]] -name = "sc-finality-grandpa" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" -dependencies = [ - "ahash 0.8.3", - "array-bytes 4.2.0", - "async-trait", - "dyn-clone", - "finality-grandpa", - "fork-tree", - "futures 0.3.28", - "futures-timer", - "log", - "parity-scale-codec", - "parking_lot 0.12.1", - "rand 0.8.5", - "sc-block-builder", - "sc-chain-spec", - "sc-client-api", - "sc-consensus", - "sc-network", - "sc-network-common", - "sc-network-gossip", - "sc-telemetry", - "sc-utils", - "serde_json", - "sp-api", - "sp-application-crypto", - "sp-arithmetic", - "sp-blockchain", - "sp-consensus", - "sp-core", - "sp-finality-grandpa", - "sp-keystore", - "sp-runtime", - "substrate-prometheus-endpoint", - "thiserror", -] - -[[package]] -name = "sc-finality-grandpa-rpc" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" -dependencies = [ - "finality-grandpa", - "futures 0.3.28", - "jsonrpsee", - "log", - "parity-scale-codec", - "sc-client-api", - "sc-finality-grandpa", - "sc-rpc", - "serde", - "sp-blockchain", - "sp-core", - "sp-runtime", - "thiserror", -] - [[package]] name = "sc-informant" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "ansi_term", - "futures 0.3.28", + "futures 0.3.30", "futures-timer", "log", "sc-client-api", + "sc-network", "sc-network-common", "sp-blockchain", "sp-runtime", @@ -10075,11 +10579,10 @@ dependencies = [ [[package]] name = "sc-keystore" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ - "array-bytes 4.2.0", - "async-trait", - "parking_lot 0.12.1", + "array-bytes", + "parking_lot 0.12.2", "serde_json", "sp-application-crypto", "sp-core", @@ -10090,58 +10593,58 @@ dependencies = [ [[package]] name = "sc-network" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ - "array-bytes 4.2.0", + "array-bytes", + "async-channel 1.9.0", "async-trait", "asynchronous-codec", - "backtrace", "bytes", "either", "fnv", - "futures 0.3.28", + "futures 0.3.30", "futures-timer", "ip_network", "libp2p", + "linked_hash_set", "log", - "lru 0.8.1", + "mockall", "parity-scale-codec", - "parking_lot 0.12.1", + "parking_lot 0.12.2", + "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", - "sp-arithmetic", + "sp-arithmetic 16.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", "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.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ + "async-channel 1.9.0", "cid", - "futures 0.3.28", - "libp2p", + "futures 0.3.30", + "libp2p-identity", "log", "prost", "prost-build", "sc-client-api", - "sc-network-common", + "sc-network", "sp-blockchain", "sp-runtime", "thiserror", @@ -10151,42 +10654,33 @@ dependencies = [ [[package]] name = "sc-network-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "async-trait", - "bitflags 1.3.2", - "bytes", - "futures 0.3.28", - "futures-timer", - "libp2p", - "linked_hash_set", + "bitflags 1.3.2", + "futures 0.3.30", + "libp2p-identity", "parity-scale-codec", "prost-build", "sc-consensus", - "sc-peerset", - "serde", - "smallvec", - "sp-blockchain", "sp-consensus", - "sp-finality-grandpa", + "sp-consensus-grandpa", "sp-runtime", - "substrate-prometheus-endpoint", - "thiserror", ] [[package]] name = "sc-network-gossip" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ - "ahash 0.8.3", - "futures 0.3.28", + "ahash 0.8.11", + "futures 0.3.30", "futures-timer", "libp2p", "log", - "lru 0.8.1", + "sc-network", "sc-network-common", - "sc-peerset", + "schnellru", "sp-runtime", "substrate-prometheus-endpoint", "tracing", @@ -10195,51 +10689,71 @@ dependencies = [ [[package]] name = "sc-network-light" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ - "array-bytes 4.2.0", - "futures 0.3.28", - "libp2p", + "array-bytes", + "async-channel 1.9.0", + "futures 0.3.30", + "libp2p-identity", "log", "parity-scale-codec", "prost", "prost-build", "sc-client-api", - "sc-network-common", - "sc-peerset", + "sc-network", "sp-blockchain", "sp-core", "sp-runtime", "thiserror", ] +[[package]] +name = "sc-network-statement" +version = "0.10.0-dev" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +dependencies = [ + "array-bytes", + "async-channel 1.9.0", + "futures 0.3.30", + "libp2p", + "log", + "parity-scale-codec", + "sc-network", + "sc-network-common", + "sp-consensus", + "sp-statement-store", + "substrate-prometheus-endpoint", +] + [[package]] name = "sc-network-sync" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ - "array-bytes 4.2.0", + "array-bytes", + "async-channel 1.9.0", "async-trait", "fork-tree", - "futures 0.3.28", + "futures 0.3.30", + "futures-timer", "libp2p", "log", - "lru 0.8.1", "mockall", "parity-scale-codec", "prost", "prost-build", "sc-client-api", "sc-consensus", + "sc-network", "sc-network-common", - "sc-peerset", "sc-utils", + "schnellru", "smallvec", - "sp-arithmetic", + "sp-arithmetic 16.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", "sp-blockchain", "sp-consensus", + "sp-consensus-grandpa", "sp-core", - "sp-finality-grandpa", "sp-runtime", "substrate-prometheus-endpoint", "thiserror", @@ -10248,16 +10762,15 @@ dependencies = [ [[package]] name = "sc-network-transactions" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ - "array-bytes 4.2.0", - "futures 0.3.28", + "array-bytes", + "futures 0.3.30", "libp2p", "log", "parity-scale-codec", - "pin-project", + "sc-network", "sc-network-common", - "sc-peerset", "sc-utils", "sp-consensus", "sp-runtime", @@ -10267,50 +10780,41 @@ dependencies = [ [[package]] name = "sc-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ - "array-bytes 4.2.0", + "array-bytes", "bytes", "fnv", - "futures 0.3.28", + "futures 0.3.30", "futures-timer", "hyper", "hyper-rustls", "libp2p", + "log", "num_cpus", "once_cell", "parity-scale-codec", - "parking_lot 0.12.1", + "parking_lot 0.12.2", "rand 0.8.5", "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.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" -dependencies = [ - "futures 0.3.28", - "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.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -10319,13 +10823,13 @@ dependencies = [ [[package]] name = "sc-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ - "futures 0.3.28", + "futures 0.3.30", "jsonrpsee", "log", "parity-scale-codec", - "parking_lot 0.12.1", + "parking_lot 0.12.2", "sc-block-builder", "sc-chain-spec", "sc-client-api", @@ -10342,6 +10846,7 @@ dependencies = [ "sp-rpc", "sp-runtime", "sp-session", + "sp-statement-store", "sp-version", "tokio", ] @@ -10349,7 +10854,7 @@ dependencies = [ [[package]] name = "sc-rpc-api" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -10368,7 +10873,7 @@ dependencies = [ [[package]] name = "sc-rpc-server" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "http", "jsonrpsee", @@ -10383,19 +10888,20 @@ dependencies = [ [[package]] name = "sc-rpc-spec-v2" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ - "array-bytes 4.2.0", - "futures 0.3.28", + "array-bytes", + "futures 0.3.30", "futures-util", "hex", "jsonrpsee", "log", "parity-scale-codec", - "parking_lot 0.12.1", + "parking_lot 0.12.2", "sc-chain-spec", "sc-client-api", "sc-transaction-pool-api", + "sc-utils", "serde", "sp-api", "sp-blockchain", @@ -10403,23 +10909,24 @@ dependencies = [ "sp-runtime", "sp-version", "thiserror", + "tokio", "tokio-stream", ] [[package]] name = "sc-service" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "async-trait", "directories", "exit-future", - "futures 0.3.28", + "futures 0.3.30", "futures-timer", "jsonrpsee", "log", "parity-scale-codec", - "parking_lot 0.12.1", + "parking_lot 0.12.2", "pin-project", "rand 0.8.5", "sc-block-builder", @@ -10436,11 +10943,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", @@ -10463,7 +10968,7 @@ dependencies = [ "sp-transaction-storage-proof", "sp-trie", "sp-version", - "static_init 1.0.3", + "static_init", "substrate-prometheus-endpoint", "tempfile", "thiserror", @@ -10475,25 +10980,23 @@ dependencies = [ [[package]] name = "sc-state-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "log", "parity-scale-codec", - "parking_lot 0.12.1", + "parking_lot 0.12.2", "sp-core", ] [[package]] name = "sc-storage-monitor" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "clap", - "futures 0.3.28", + "fs4", "log", - "nix 0.26.2", "sc-client-db", - "sc-utils", "sp-core", "thiserror", "tokio", @@ -10502,7 +11005,7 @@ dependencies = [ [[package]] name = "sc-sync-state-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -10510,7 +11013,7 @@ dependencies = [ "sc-client-api", "sc-consensus-babe", "sc-consensus-epochs", - "sc-finality-grandpa", + "sc-consensus-grandpa", "serde", "serde_json", "sp-blockchain", @@ -10521,9 +11024,9 @@ dependencies = [ [[package]] name = "sc-sysinfo" version = "6.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ - "futures 0.3.28", + "futures 0.3.30", "libc", "log", "rand 0.8.5", @@ -10534,19 +11037,19 @@ dependencies = [ "serde_json", "sp-core", "sp-io", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", ] [[package]] name = "sc-telemetry" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "chrono", - "futures 0.3.28", + "futures 0.3.30", "libp2p", "log", - "parking_lot 0.12.1", + "parking_lot 0.12.2", "pin-project", "rand 0.8.5", "sc-utils", @@ -10559,7 +11062,7 @@ dependencies = [ [[package]] name = "sc-tracing" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "ansi_term", "atty", @@ -10567,12 +11070,10 @@ dependencies = [ "lazy_static", "libc", "log", - "once_cell", - "parking_lot 0.12.1", + "parking_lot 0.12.2", "regex", "rustc-hash", "sc-client-api", - "sc-rpc-server", "sc-tracing-proc-macro", "serde", "sp-api", @@ -10590,27 +11091,26 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.60", ] [[package]] name = "sc-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "async-trait", - "futures 0.3.28", + "futures 0.3.30", "futures-timer", "linked-hash-map", "log", - "num-traits", "parity-scale-codec", - "parking_lot 0.12.1", + "parking_lot 0.12.2", "sc-client-api", "sc-transaction-pool-api", "sc-utils", @@ -10628,13 +11128,15 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "async-trait", - "futures 0.3.28", + "futures 0.3.30", "log", + "parity-scale-codec", "serde", "sp-blockchain", + "sp-core", "sp-runtime", "thiserror", ] @@ -10642,22 +11144,23 @@ dependencies = [ [[package]] name = "sc-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ - "backtrace", - "futures 0.3.28", + "async-channel 1.9.0", + "futures 0.3.30", "futures-timer", "lazy_static", "log", - "parking_lot 0.12.1", + "parking_lot 0.12.2", "prometheus", + "sp-arithmetic 16.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", ] [[package]] name = "scale-info" -version = "2.9.0" +version = "2.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35c0a159d0c45c12b20c5a844feb1fe4bea86e28f17b92a5f0c42193634d3782" +checksum = "7c453e59a955f81fb62ee5d596b450383d699f152d350e9d23a0db2adb78e4c0" dependencies = [ "bitvec", "cfg-if", @@ -10669,11 +11172,11 @@ dependencies = [ [[package]] name = "scale-info-derive" -version = "2.9.0" +version = "2.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "912e55f6d20e0e80d63733872b40e1227c0bce1e1ab81ba67d696339bfd7fd29" +checksum = "18cf6c6447f813ef19eb450e985bcce6705f9ce7660db221b59093d15c79c4b7" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 1.3.1", "proc-macro2", "quote", "syn 1.0.109", @@ -10681,11 +11184,11 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.22" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c3733bf4cf7ea0880754e19cb5a462007c4a8c1914bff372ccc95b464f1df88" +checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" dependencies = [ - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -10694,7 +11197,7 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "772575a524feeb803e5b0fcbc6dd9f367e579488197c94c6e4023aad2305774d" dependencies = [ - "ahash 0.8.3", + "ahash 0.8.11", "cfg-if", "hashbrown 0.13.2", ] @@ -10709,7 +11212,7 @@ dependencies = [ "arrayvec 0.5.2", "curve25519-dalek 2.1.3", "getrandom 0.1.16", - "merlin", + "merlin 2.0.1", "rand 0.7.3", "rand_core 0.5.1", "sha2 0.8.2", @@ -10717,6 +11220,39 @@ dependencies = [ "zeroize", ] +[[package]] +name = "schnorrkel" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "844b7645371e6ecdf61ff246ba1958c29e802881a749ae3fb1993675d210d28d" +dependencies = [ + "arrayref", + "arrayvec 0.7.4", + "curve25519-dalek-ng", + "merlin 3.0.0", + "rand_core 0.6.4", + "sha2 0.9.9", + "subtle-ng", + "zeroize", +] + +[[package]] +name = "schnorrkel" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8de18f6d8ba0aad7045f5feae07ec29899c1112584a38509a84ad7b04451eaa0" +dependencies = [ + "arrayref", + "arrayvec 0.7.4", + "curve25519-dalek 4.1.2", + "getrandom_or_panic", + "merlin 3.0.0", + "rand_core 0.6.4", + "sha2 0.10.8", + "subtle", + "zeroize", +] + [[package]] name = "scopeguard" version = "1.2.0" @@ -10731,41 +11267,19 @@ checksum = "a3cf7c11c38cb994f3d40e8a8cde3bbd1f72a435e4c49e85d6553d8312306152" [[package]] name = "sct" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b362b83898e0e69f38515b82ee15aa80636befe47c3b6d3d89a911e78fc228ce" -dependencies = [ - "ring", - "untrusted", -] - -[[package]] -name = "sct" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d53dcdb7c9f8158937a7981b48accfd39a43af418591a5d008c7b22b5e1b7ca4" -dependencies = [ - "ring", - "untrusted", -] - -[[package]] -name = "sdp" -version = "0.5.3" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d22a5ef407871893fd72b4562ee15e4742269b173959db4b8df6f538c414e13" +checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" dependencies = [ - "rand 0.8.5", - "substring", - "thiserror", - "url", + "ring 0.17.8", + "untrusted 0.9.0", ] [[package]] name = "sec1" -version = "0.3.0" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3be24c1842290c45df0a7bf069e0c268a747ad05a192f2fd7dcfdbc1cba40928" +checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" dependencies = [ "base16ct", "der", @@ -10804,9 +11318,9 @@ dependencies = [ [[package]] name = "security-framework" -version = "2.9.2" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de" +checksum = "770452e37cad93e0a50d5abc3990d2bc351c36d0328f86cefec2f2fb206eaef6" dependencies = [ "bitflags 1.3.2", "core-foundation", @@ -10817,9 +11331,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.9.1" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a" +checksum = "41f3cc463c0ef97e11c3461a9d3787412d30e8e7eb907c79180c4a57bf7c04ef" dependencies = [ "core-foundation-sys", "libc", @@ -10845,9 +11359,9 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.18" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0293b4b29daaf487284529cc2f5675b8e57c61f70167ba415a463651fd6a918" +checksum = "92d43fe69e652f3df9bdc2b85b2854a0825b86e4fb76bc44d945137d053639ca" dependencies = [ "serde", ] @@ -10860,39 +11374,48 @@ checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" [[package]] name = "serde" -version = "1.0.180" +version = "1.0.199" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ea67f183f058fe88a4e3ec6e2788e003840893b91bac4559cabedd00863b3ed" +checksum = "0c9f6e76df036c77cd94996771fb40db98187f096dd0b9af39c6c6e452ba966a" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.180" +version = "1.0.199" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24e744d7782b686ab3b73267ef05697159cc0e5abbed3f47f9933165e5219036" +checksum = "11bd257a6541e141e42ca6d24ae26f7714887b47e89aa739099104c7e4d3b7fc" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.60", ] [[package]] name = "serde_json" -version = "1.0.104" +version = "1.0.116" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "076066c5f1078eac5b722a31827a8832fe108bed65dfa75e233c89f8206e976c" +checksum = "3e17db7126d17feb94eb3fad46bf1a96b034e8aacbc2e775fe81505f8b0b2813" dependencies = [ "itoa", "ryu", "serde", ] +[[package]] +name = "serde_spanned" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb3622f419d1296904700073ea6cc23ad690adbd66f13ea683df73298736f0c1" +dependencies = [ + "serde", +] + [[package]] name = "session-keys-primitives" version = "0.1.0" -source = "git+https://github.com/zeitgeistpm/moonbeam?branch=polkadot-v0.9.38-use-paritytech-dependencies#095ddae0ea44d8385453091e5e11d475b3dbda1e" +source = "git+https://github.com/zeitgeistpm/moonkit?branch=zeitgeist-polkadot-v1.1.0#34c21d6e4df607f80bf77eacc105bf83ea0b76b6" dependencies = [ "async-trait", "frame-support", @@ -10902,12 +11425,11 @@ dependencies = [ "sp-api", "sp-application-crypto", "sp-consensus-babe", - "sp-consensus-vrf", "sp-core", "sp-inherents", "sp-keystore", "sp-runtime", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", ] [[package]] @@ -10920,18 +11442,7 @@ dependencies = [ "cfg-if", "cpufeatures", "digest 0.9.0", - "opaque-debug 0.3.0", -] - -[[package]] -name = "sha1" -version = "0.10.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest 0.10.7", + "opaque-debug 0.3.1", ] [[package]] @@ -10956,14 +11467,14 @@ dependencies = [ "cfg-if", "cpufeatures", "digest 0.9.0", - "opaque-debug 0.3.0", + "opaque-debug 0.3.1", ] [[package]] name = "sha2" -version = "0.10.7" +version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "479fb9d862239e610720565ca91403019f2f00410f1864c5aa7479b950a76ed8" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" dependencies = [ "cfg-if", "cpufeatures", @@ -10982,33 +11493,33 @@ dependencies = [ [[package]] name = "sharded-slab" -version = "0.1.4" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "900fba806f70c630b0a382d0d825e17a0f19fcd059a2ade1ff237bcddf446b31" +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" dependencies = [ "lazy_static", ] [[package]] name = "shlex" -version = "1.1.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43b2853a4d09f215c24cc5489c992ce46052d359b5109343cbafbf26bc62f8a3" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" [[package]] name = "signal-hook-registry" -version = "1.4.1" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" +checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1" dependencies = [ "libc", ] [[package]] name = "signature" -version = "1.6.4" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" +checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" dependencies = [ "digest 0.10.7", "rand_core 0.6.4", @@ -11016,27 +11527,28 @@ dependencies = [ [[package]] name = "simba" -version = "0.5.1" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e82063457853d00243beda9952e910b82593e4b07ae9f721b9278a99a0d3d5c" +checksum = "061507c94fc6ab4ba1c9a0305018408e312e17c041eb63bef8aa726fa33aceae" dependencies = [ "approx", "num-complex", "num-traits", "paste", + "wide", ] [[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", ] @@ -11049,59 +11561,166 @@ checksum = "826167069c09b99d56f31e9ae5c99049e932a98c9dc2dac47645b08dbbf76ba7" [[package]] name = "slot-range-helper" -version = "0.9.38" -source = "git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes#20fcf6d7f070911b441925cb6f418b3d346af3a0" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "enumn", "parity-scale-codec", "paste", "sp-runtime", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", ] [[package]] name = "slotmap" -version = "1.0.6" +version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1e08e261d0e8f5c43123b7adf3e4ca1690d655377ac93a03b2c9d3e98de1342" +checksum = "dbff4acf519f630b3a3ddcfaea6c06b42174d9a44bc70c620e9ed1649d58b82a" dependencies = [ "version_check", ] [[package]] name = "smallvec" -version = "1.11.0" +version = "1.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" + +[[package]] +name = "smol" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13f2b548cd8447f8de0fdf1c592929f70f4fc7039a05e47404b0d096ec6987a1" +dependencies = [ + "async-channel 1.9.0", + "async-executor", + "async-fs", + "async-io 1.13.0", + "async-lock 2.8.0", + "async-net", + "async-process", + "blocking", + "futures-lite 1.13.0", +] + +[[package]] +name = "smoldot" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0bb30cf57b7b5f6109ce17c3164445e2d6f270af2cb48f6e4d31c2967c9a9f5" +dependencies = [ + "arrayvec 0.7.4", + "async-lock 2.8.0", + "atomic-take", + "base64 0.21.7", + "bip39", + "blake2-rfc", + "bs58 0.5.1", + "chacha20", + "crossbeam-queue", + "derive_more", + "ed25519-zebra 4.0.3", + "either", + "event-listener 2.5.3", + "fnv", + "futures-lite 1.13.0", + "futures-util", + "hashbrown 0.14.5", + "hex", + "hmac 0.12.1", + "itertools 0.11.0", + "libsecp256k1", + "merlin 3.0.0", + "no-std-net", + "nom", + "num-bigint", + "num-rational", + "num-traits", + "pbkdf2 0.12.2", + "pin-project", + "poly1305", + "rand 0.8.5", + "rand_chacha 0.3.1", + "ruzstd", + "schnorrkel 0.10.2", + "serde", + "serde_json", + "sha2 0.10.8", + "sha3", + "siphasher", + "slab", + "smallvec", + "soketto", + "twox-hash", + "wasmi", + "x25519-dalek 2.0.1", + "zeroize", +] + +[[package]] +name = "smoldot-light" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62bb4feee49fdd9f707ef802e22365a35de4b7b299de4763d44bfea899442ff9" +checksum = "256b5bad1d6b49045e95fe87492ce73d5af81545d8b4d8318a872d2007024c33" +dependencies = [ + "async-channel 1.9.0", + "async-lock 2.8.0", + "base64 0.21.7", + "blake2-rfc", + "derive_more", + "either", + "event-listener 2.5.3", + "fnv", + "futures-channel", + "futures-lite 1.13.0", + "futures-util", + "hashbrown 0.14.5", + "hex", + "itertools 0.11.0", + "log", + "lru 0.11.1", + "no-std-net", + "parking_lot 0.12.2", + "pin-project", + "rand 0.8.5", + "rand_chacha 0.3.1", + "serde", + "serde_json", + "siphasher", + "slab", + "smol", + "smoldot", + "zeroize", +] [[package]] name = "snap" -version = "1.1.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e9f0ab6ef7eb7353d9119c170a436d1bf248eea575ac42d19d12f4e34130831" +checksum = "1b6b67fb9a61334225b5b790716f609cd58395f895b3fe8b328786812a40bc3b" [[package]] name = "snow" -version = "0.9.2" +version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ccba027ba85743e09d15c03296797cad56395089b832b48b5a5217880f57733" +checksum = "850948bee068e713b8ab860fe1adc4d109676ab4c3b621fd8147f06b261f2f85" dependencies = [ - "aes-gcm 0.9.4", + "aes-gcm", "blake2", "chacha20poly1305", - "curve25519-dalek 4.0.0-rc.1", + "curve25519-dalek 4.1.2", "rand_core 0.6.4", - "ring", + "ring 0.17.8", "rustc_version 0.4.0", - "sha2 0.10.7", + "sha2 0.10.8", "subtle", ] [[package]] name = "socket2" -version = "0.4.9" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" +checksum = "9f7916fc008ca5542385b89a3d3ce689953c143e9304a9bf8beec1de48994c0d" dependencies = [ "libc", "winapi", @@ -11109,12 +11728,12 @@ dependencies = [ [[package]] name = "socket2" -version = "0.5.3" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2538b18701741680e0322a2302176d3253a35388e2e62f172f64f4f16605f877" +checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" dependencies = [ "libc", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -11126,7 +11745,7 @@ dependencies = [ "base64 0.13.1", "bytes", "flate2", - "futures 0.3.28", + "futures 0.3.30", "http", "httparse", "log", @@ -11137,16 +11756,19 @@ dependencies = [ [[package]] name = "sp-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "hash-db", "log", "parity-scale-codec", + "scale-info", "sp-api-proc-macro", "sp-core", + "sp-externalities", + "sp-metadata-ir", "sp-runtime", "sp-state-machine", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", "sp-trie", "sp-version", "thiserror", @@ -11155,94 +11777,91 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ + "Inflector", "blake2", - "proc-macro-crate", + "expander 2.1.0", + "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.60", ] [[package]] name = "sp-application-crypto" -version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +version = "23.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "parity-scale-codec", "scale-info", "serde", "sp-core", "sp-io", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", ] [[package]] name = "sp-arithmetic" -version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +version = "16.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "integer-sqrt", "num-traits", "parity-scale-codec", "scale-info", "serde", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", "static_assertions", ] [[package]] -name = "sp-authority-discovery" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +name = "sp-arithmetic" +version = "16.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=c8d2251cafadc108ba2f1f8a3208dc547ff38901#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ + "integer-sqrt", + "num-traits", "parity-scale-codec", "scale-info", - "sp-api", - "sp-application-crypto", - "sp-runtime", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?rev=c8d2251cafadc108ba2f1f8a3208dc547ff38901)", + "static_assertions", ] [[package]] -name = "sp-beefy" +name = "sp-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "parity-scale-codec", "scale-info", - "serde", "sp-api", "sp-application-crypto", - "sp-core", - "sp-io", - "sp-mmr-primitives", "sp-runtime", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", ] [[package]] name = "sp-block-builder" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ - "parity-scale-codec", "sp-api", "sp-inherents", "sp-runtime", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", ] [[package]] name = "sp-blockchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ - "futures 0.3.28", + "futures 0.3.30", "log", - "lru 0.8.1", "parity-scale-codec", - "parking_lot 0.12.1", + "parking_lot 0.12.2", + "schnellru", "sp-api", "sp-consensus", "sp-database", @@ -11254,113 +11873,133 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "async-trait", - "futures 0.3.28", + "futures 0.3.30", "log", - "parity-scale-codec", "sp-core", "sp-inherents", "sp-runtime", "sp-state-machine", - "sp-std", - "sp-version", "thiserror", ] [[package]] name = "sp-consensus-aura" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "async-trait", "parity-scale-codec", "scale-info", "sp-api", "sp-application-crypto", - "sp-consensus", "sp-consensus-slots", "sp-inherents", "sp-runtime", - "sp-std", - "sp-timestamp", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", + "sp-timestamp", +] + +[[package]] +name = "sp-consensus-babe" +version = "0.10.0-dev" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +dependencies = [ + "async-trait", + "parity-scale-codec", + "scale-info", + "serde", + "sp-api", + "sp-application-crypto", + "sp-consensus-slots", + "sp-core", + "sp-inherents", + "sp-runtime", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", + "sp-timestamp", +] + +[[package]] +name = "sp-consensus-beefy" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +dependencies = [ + "lazy_static", + "parity-scale-codec", + "scale-info", + "serde", + "sp-api", + "sp-application-crypto", + "sp-core", + "sp-io", + "sp-mmr-primitives", + "sp-runtime", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", + "strum 0.24.1", ] [[package]] -name = "sp-consensus-babe" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +name = "sp-consensus-grandpa" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ - "async-trait", - "merlin", + "finality-grandpa", + "log", "parity-scale-codec", "scale-info", "serde", "sp-api", "sp-application-crypto", - "sp-consensus", - "sp-consensus-slots", - "sp-consensus-vrf", "sp-core", - "sp-inherents", "sp-keystore", "sp-runtime", - "sp-std", - "sp-timestamp", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", ] [[package]] name = "sp-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", "sp-timestamp", ] -[[package]] -name = "sp-consensus-vrf" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" -dependencies = [ - "parity-scale-codec", - "scale-info", - "schnorrkel", - "sp-core", - "sp-runtime", - "sp-std", -] - [[package]] name = "sp-core" -version = "7.0.0" -source = "git+https://github.com/zeitgeistpm/substrate.git?branch=polkadot-v0.9.38-zeitgeist-adjustments#bd498817bb4479836a47231b4fc36831a19806ae" +version = "21.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ - "array-bytes 4.2.0", - "base58", + "array-bytes", + "arrayvec 0.7.4", + "bandersnatch_vrfs", "bitflags 1.3.2", "blake2", + "bounded-collections", + "bs58 0.5.1", "dyn-clonable", - "ed25519-zebra", - "futures 0.3.28", + "ed25519-zebra 3.1.0", + "futures 0.3.30", "hash-db", "hash256-std-hasher", "impl-serde", "lazy_static", "libsecp256k1", "log", - "merlin", + "merlin 2.0.1", "parity-scale-codec", - "parking_lot 0.12.1", + "parking_lot 0.12.2", + "paste", "primitive-types", "rand 0.8.5", "regex", "scale-info", - "schnorrkel", + "schnorrkel 0.9.1", "secp256k1", "secrecy", "serde", @@ -11368,121 +12007,112 @@ dependencies = [ "sp-debug-derive", "sp-externalities", "sp-runtime-interface", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", "sp-storage", "ss58-registry", "substrate-bip39", "thiserror", "tiny-bip39", + "tracing", "zeroize", ] [[package]] name = "sp-core-hashing" -version = "5.0.0" -source = "git+https://github.com/zeitgeistpm/substrate.git?branch=polkadot-v0.9.38-zeitgeist-adjustments#bd498817bb4479836a47231b4fc36831a19806ae" +version = "9.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ - "blake2", + "blake2b_simd", "byteorder", "digest 0.10.7", - "sha2 0.10.7", + "sha2 0.10.8", "sha3", - "sp-std", "twox-hash", ] [[package]] name = "sp-core-hashing-proc-macro" -version = "5.0.0" -source = "git+https://github.com/zeitgeistpm/substrate.git?branch=polkadot-v0.9.38-zeitgeist-adjustments#bd498817bb4479836a47231b4fc36831a19806ae" +version = "9.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ - "proc-macro2", "quote", "sp-core-hashing", - "syn 1.0.109", + "syn 2.0.60", ] [[package]] name = "sp-database" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "kvdb", - "parking_lot 0.12.1", + "parking_lot 0.12.2", ] [[package]] name = "sp-debug-derive" -version = "5.0.0" -source = "git+https://github.com/zeitgeistpm/substrate.git?branch=polkadot-v0.9.38-zeitgeist-adjustments#bd498817bb4479836a47231b4fc36831a19806ae" +version = "8.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.60", ] [[package]] name = "sp-externalities" -version = "0.13.0" -source = "git+https://github.com/zeitgeistpm/substrate.git?branch=polkadot-v0.9.38-zeitgeist-adjustments#bd498817bb4479836a47231b4fc36831a19806ae" +version = "0.19.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "environmental", "parity-scale-codec", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", "sp-storage", ] [[package]] -name = "sp-finality-grandpa" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +name = "sp-genesis-builder" +version = "0.1.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ - "finality-grandpa", - "log", - "parity-scale-codec", - "scale-info", - "serde", + "serde_json", "sp-api", - "sp-application-crypto", - "sp-core", - "sp-keystore", "sp-runtime", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", ] [[package]] name = "sp-inherents" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "async-trait", "impl-trait-for-tuples", "parity-scale-codec", - "sp-core", + "scale-info", "sp-runtime", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", "thiserror", ] [[package]] name = "sp-io" -version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +version = "23.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "bytes", - "ed25519", "ed25519-dalek", - "futures 0.3.28", "libsecp256k1", "log", "parity-scale-codec", + "rustversion", "secp256k1", "sp-core", "sp-externalities", "sp-keystore", "sp-runtime-interface", "sp-state-machine", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", "sp-tracing", "sp-trie", "tracing", @@ -11491,27 +12121,22 @@ dependencies = [ [[package]] name = "sp-keyring" -version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +version = "24.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "lazy_static", "sp-core", "sp-runtime", - "strum", + "strum 0.24.1", ] [[package]] name = "sp-keystore" -version = "0.13.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +version = "0.27.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ - "async-trait", - "futures 0.3.28", - "merlin", "parity-scale-codec", - "parking_lot 0.12.1", - "schnorrkel", - "serde", + "parking_lot 0.12.2", "sp-core", "sp-externalities", "thiserror", @@ -11520,16 +12145,27 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" version = "4.1.0-dev" -source = "git+https://github.com/zeitgeistpm/substrate.git?branch=polkadot-v0.9.38-zeitgeist-adjustments#bd498817bb4479836a47231b4fc36831a19806ae" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "thiserror", - "zstd", + "zstd 0.12.4", +] + +[[package]] +name = "sp-metadata-ir" +version = "0.1.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +dependencies = [ + "frame-metadata", + "parity-scale-codec", + "scale-info", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", ] [[package]] name = "sp-mmr-primitives" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "ckb-merkle-mountain-range", "log", @@ -11540,28 +12176,28 @@ dependencies = [ "sp-core", "sp-debug-derive", "sp-runtime", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", "thiserror", ] [[package]] name = "sp-npos-elections" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-arithmetic", + "sp-arithmetic 16.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", "sp-core", "sp-runtime", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", ] [[package]] name = "sp-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "sp-api", "sp-core", @@ -11570,8 +12206,8 @@ dependencies = [ [[package]] name = "sp-panic-handler" -version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +version = "8.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "backtrace", "lazy_static", @@ -11581,7 +12217,7 @@ dependencies = [ [[package]] name = "sp-rpc" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "rustc-hash", "serde", @@ -11590,8 +12226,8 @@ dependencies = [ [[package]] name = "sp-runtime" -version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +version = "24.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "either", "hash256-std-hasher", @@ -11603,17 +12239,17 @@ dependencies = [ "scale-info", "serde", "sp-application-crypto", - "sp-arithmetic", + "sp-arithmetic 16.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", "sp-core", "sp-io", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", "sp-weights", ] [[package]] name = "sp-runtime-interface" -version = "7.0.0" -source = "git+https://github.com/zeitgeistpm/substrate.git?branch=polkadot-v0.9.38-zeitgeist-adjustments#bd498817bb4479836a47231b4fc36831a19806ae" +version = "17.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "bytes", "impl-trait-for-tuples", @@ -11621,7 +12257,7 @@ dependencies = [ "primitive-types", "sp-externalities", "sp-runtime-interface-proc-macro", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", "sp-storage", "sp-tracing", "sp-wasm-interface", @@ -11630,102 +12266,133 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" -version = "6.0.0" -source = "git+https://github.com/zeitgeistpm/substrate.git?branch=polkadot-v0.9.38-zeitgeist-adjustments#bd498817bb4479836a47231b4fc36831a19806ae" +version = "11.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "Inflector", - "proc-macro-crate", + "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.60", ] [[package]] name = "sp-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "parity-scale-codec", "scale-info", "sp-api", "sp-core", + "sp-keystore", "sp-runtime", "sp-staking", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", ] [[package]] name = "sp-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ + "impl-trait-for-tuples", "parity-scale-codec", "scale-info", + "serde", "sp-core", "sp-runtime", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", ] [[package]] name = "sp-state-machine" -version = "0.13.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +version = "0.28.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "hash-db", "log", "parity-scale-codec", - "parking_lot 0.12.1", + "parking_lot 0.12.2", "rand 0.8.5", "smallvec", "sp-core", "sp-externalities", "sp-panic-handler", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", "sp-trie", "thiserror", "tracing", + "trie-db", +] + +[[package]] +name = "sp-statement-store" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +dependencies = [ + "aes-gcm", + "curve25519-dalek 4.1.2", + "ed25519-dalek", + "hkdf", + "parity-scale-codec", + "rand 0.8.5", + "scale-info", + "sha2 0.10.8", + "sp-api", + "sp-application-crypto", + "sp-core", + "sp-externalities", + "sp-runtime", + "sp-runtime-interface", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", + "thiserror", + "x25519-dalek 2.0.1", ] [[package]] name = "sp-std" -version = "5.0.0" -source = "git+https://github.com/zeitgeistpm/substrate.git?branch=polkadot-v0.9.38-zeitgeist-adjustments#bd498817bb4479836a47231b4fc36831a19806ae" +version = "8.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" + +[[package]] +name = "sp-std" +version = "8.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?rev=c8d2251cafadc108ba2f1f8a3208dc547ff38901#c8d2251cafadc108ba2f1f8a3208dc547ff38901" [[package]] name = "sp-storage" -version = "7.0.0" -source = "git+https://github.com/zeitgeistpm/substrate.git?branch=polkadot-v0.9.38-zeitgeist-adjustments#bd498817bb4479836a47231b4fc36831a19806ae" +version = "13.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "impl-serde", "parity-scale-codec", "ref-cast", "serde", "sp-debug-derive", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", ] [[package]] name = "sp-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "async-trait", - "futures-timer", - "log", "parity-scale-codec", "sp-inherents", "sp-runtime", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", "thiserror", ] [[package]] name = "sp-tracing" -version = "6.0.0" -source = "git+https://github.com/zeitgeistpm/substrate.git?branch=polkadot-v0.9.38-zeitgeist-adjustments#bd498817bb4479836a47231b4fc36831a19806ae" +version = "10.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "parity-scale-codec", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", "tracing", "tracing-core", "tracing-subscriber", @@ -11734,7 +12401,7 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "sp-api", "sp-runtime", @@ -11743,36 +12410,35 @@ dependencies = [ [[package]] name = "sp-transaction-storage-proof" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "async-trait", - "log", "parity-scale-codec", "scale-info", "sp-core", "sp-inherents", "sp-runtime", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", "sp-trie", ] [[package]] name = "sp-trie" -version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +version = "22.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ - "ahash 0.8.3", + "ahash 0.8.11", "hash-db", - "hashbrown 0.12.3", + "hashbrown 0.13.2", "lazy_static", "memory-db", "nohash-hasher", "parity-scale-codec", - "parking_lot 0.12.1", + "parking_lot 0.12.2", "scale-info", "schnellru", "sp-core", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", "thiserror", "tracing", "trie-db", @@ -11781,8 +12447,8 @@ dependencies = [ [[package]] name = "sp-version" -version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +version = "22.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "impl-serde", "parity-scale-codec", @@ -11791,111 +12457,275 @@ dependencies = [ "serde", "sp-core-hashing-proc-macro", "sp-runtime", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", "sp-version-proc-macro", "thiserror", ] [[package]] name = "sp-version-proc-macro" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +version = "8.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "parity-scale-codec", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.60", +] + +[[package]] +name = "sp-wasm-interface" +version = "14.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +dependencies = [ + "anyhow", + "impl-trait-for-tuples", + "log", + "parity-scale-codec", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", + "wasmtime", +] + +[[package]] +name = "sp-weights" +version = "20.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +dependencies = [ + "parity-scale-codec", + "scale-info", + "serde", + "smallvec", + "sp-arithmetic 16.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", + "sp-core", + "sp-debug-derive", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", +] + +[[package]] +name = "spin" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" + +[[package]] +name = "spin" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" + +[[package]] +name = "spinners" +version = "4.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0ef947f358b9c238923f764c72a4a9d42f2d637c46e059dbd319d6e7cfb4f82" +dependencies = [ + "lazy_static", + "maplit", + "strum 0.24.1", +] + +[[package]] +name = "spki" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" +dependencies = [ + "base64ct", + "der", +] + +[[package]] +name = "ss58-registry" +version = "1.47.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4743ce898933fbff7bbf414f497c459a782d496269644b3d650a398ae6a487ba" +dependencies = [ + "Inflector", + "num-format", + "proc-macro2", + "quote", + "serde", + "serde_json", + "unicode-xid", +] + +[[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + +[[package]] +name = "staging-kusama-runtime" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +dependencies = [ + "binary-merkle-tree", + "bitvec", + "frame-benchmarking", + "frame-election-provider-support", + "frame-executive", + "frame-support", + "frame-system", + "frame-system-benchmarking", + "frame-system-rpc-runtime-api", + "frame-try-runtime", + "hex-literal", + "kusama-runtime-constants", + "log", + "pallet-authority-discovery", + "pallet-authorship", + "pallet-babe", + "pallet-bags-list", + "pallet-balances", + "pallet-beefy", + "pallet-beefy-mmr", + "pallet-bounties", + "pallet-child-bounties", + "pallet-collective", + "pallet-conviction-voting", + "pallet-democracy", + "pallet-election-provider-multi-phase", + "pallet-election-provider-support-benchmarking", + "pallet-elections-phragmen", + "pallet-fast-unstake", + "pallet-grandpa", + "pallet-identity", + "pallet-im-online", + "pallet-indices", + "pallet-membership", + "pallet-message-queue", + "pallet-mmr", + "pallet-multisig", + "pallet-nis", + "pallet-nomination-pools", + "pallet-nomination-pools-benchmarking", + "pallet-nomination-pools-runtime-api", + "pallet-offences", + "pallet-offences-benchmarking", + "pallet-preimage", + "pallet-proxy", + "pallet-ranked-collective", + "pallet-recovery", + "pallet-referenda", + "pallet-scheduler", + "pallet-session", + "pallet-session-benchmarking", + "pallet-society", + "pallet-staking", + "pallet-staking-runtime-api", + "pallet-state-trie-migration", + "pallet-timestamp", + "pallet-tips", + "pallet-transaction-payment", + "pallet-transaction-payment-rpc-runtime-api", + "pallet-treasury", + "pallet-utility", + "pallet-vesting", + "pallet-whitelist", + "pallet-xcm", + "pallet-xcm-benchmarks", + "parity-scale-codec", + "polkadot-primitives", + "polkadot-runtime-common", + "polkadot-runtime-parachains", + "rustc-hex", + "scale-info", + "serde", + "serde_derive", + "smallvec", + "sp-api", + "sp-application-crypto", + "sp-arithmetic 16.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", + "sp-authority-discovery", + "sp-block-builder", + "sp-consensus-babe", + "sp-consensus-beefy", + "sp-core", + "sp-inherents", + "sp-io", + "sp-mmr-primitives", + "sp-npos-elections", + "sp-offchain", + "sp-runtime", + "sp-session", + "sp-staking", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", + "sp-storage", + "sp-transaction-pool", + "sp-version", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", + "static_assertions", + "substrate-wasm-builder", ] [[package]] -name = "sp-wasm-interface" -version = "7.0.0" -source = "git+https://github.com/zeitgeistpm/substrate.git?branch=polkadot-v0.9.38-zeitgeist-adjustments#bd498817bb4479836a47231b4fc36831a19806ae" +name = "staging-xcm" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ + "bounded-collections", + "derivative", + "environmental", "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.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" -dependencies = [ "parity-scale-codec", "scale-info", "serde", - "smallvec", - "sp-arithmetic", - "sp-core", - "sp-debug-derive", - "sp-std", + "sp-weights", + "xcm-procedural", ] [[package]] -name = "spin" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" - -[[package]] -name = "spin" -version = "0.9.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" - -[[package]] -name = "spki" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67cf02bbac7a337dc36e4f5a693db6c21e7863f45070f7064577eb4367a3212b" +name = "staging-xcm-builder" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ - "base64ct", - "der", + "frame-support", + "frame-system", + "impl-trait-for-tuples", + "log", + "pallet-transaction-payment", + "parity-scale-codec", + "polkadot-parachain-primitives", + "scale-info", + "sp-arithmetic 16.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", + "sp-io", + "sp-runtime", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", + "sp-weights", + "staging-xcm", + "staging-xcm-executor", ] [[package]] -name = "ss58-registry" -version = "1.41.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfc443bad666016e012538782d9e3006213a7db43e9fb1dda91657dc06a6fa08" +name = "staging-xcm-executor" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ - "Inflector", - "num-format", - "proc-macro2", - "quote", - "serde", - "serde_json", - "unicode-xid", + "environmental", + "frame-benchmarking", + "frame-support", + "impl-trait-for-tuples", + "log", + "parity-scale-codec", + "sp-arithmetic 16.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", + "sp-weights", + "staging-xcm", ] -[[package]] -name = "stable_deref_trait" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" - [[package]] name = "static_assertions" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" -[[package]] -name = "static_init" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11b73400442027c4adedda20a9f9b7945234a5bd8d5f7e86da22bd5d0622369c" -dependencies = [ - "cfg_aliases", - "libc", - "parking_lot 0.11.2", - "static_init_macro 0.5.0", -] - [[package]] name = "static_init" version = "1.0.3" @@ -11907,23 +12737,10 @@ dependencies = [ "libc", "parking_lot 0.11.2", "parking_lot_core 0.8.6", - "static_init_macro 1.0.2", + "static_init_macro", "winapi", ] -[[package]] -name = "static_init_macro" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2261c91034a1edc3fc4d1b80e89d82714faede0515c14a75da10cb941546bbf" -dependencies = [ - "cfg_aliases", - "memchr", - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "static_init_macro" version = "1.0.2" @@ -11937,24 +12754,11 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "statrs" -version = "0.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05bdbb8e4e78216a85785a85d3ec3183144f98d0097b9281802c019bb07a6f05" -dependencies = [ - "approx", - "lazy_static", - "nalgebra", - "num-traits", - "rand 0.8.5", -] - [[package]] name = "strsim" -version = "0.10.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "strum" @@ -11962,16 +12766,22 @@ version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "063e6045c0e62079840579a7e47a355ae92f60eb74daaf156fb1e84ba164e63f" dependencies = [ - "strum_macros", + "strum_macros 0.24.3", ] +[[package]] +name = "strum" +version = "0.26.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d8cec3501a5194c432b2b7976db6b7d10ec95c253208b45f83f7136aa985e29" + [[package]] name = "strum_macros" version = "0.24.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e385be0d24f186b4ce2f9982191e7101bb737312ad61c1f2f984f34bcf85d59" dependencies = [ - "heck", + "heck 0.4.1", "proc-macro2", "quote", "rustversion", @@ -11979,33 +12789,27 @@ dependencies = [ ] [[package]] -name = "stun" -version = "0.4.4" +name = "strum_macros" +version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7e94b1ec00bad60e6410e058b52f1c66de3dc5fe4d62d09b3e52bb7d3b73e25" +checksum = "c6cf59daf282c0a494ba14fd21610a0325f9f90ec9d1231dea26bcb1d696c946" dependencies = [ - "base64 0.13.1", - "crc", - "lazy_static", - "md-5", - "rand 0.8.5", - "ring", - "subtle", - "thiserror", - "tokio", - "url", - "webrtc-util", + "heck 0.4.1", + "proc-macro2", + "quote", + "rustversion", + "syn 2.0.60", ] [[package]] name = "substrate-bip39" -version = "0.4.4" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49eee6965196b32f882dd2ee85a92b1dbead41b04e53907f269de3b0dc04733c" +checksum = "6a7590dc041b9bc2825e52ce5af8416c73dbe9d0654402bfd4b4941938b94d8f" dependencies = [ "hmac 0.11.0", "pbkdf2 0.8.0", - "schnorrkel", + "schnorrkel 0.11.4", "sha2 0.9.9", "zeroize", ] @@ -12013,29 +12817,26 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" -dependencies = [ - "platforms 2.0.0", -] +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" [[package]] name = "substrate-fixed" version = "0.5.9" -source = "git+https://github.com/encointer/substrate-fixed#df67f97a6db9b40215f105613b381ca82f1e2ff4" +source = "git+https://github.com/encointer/substrate-fixed#879c58bcc6fd676a74315dcd38b598f28708b0b5" dependencies = [ "parity-scale-codec", "scale-info", "serde", - "typenum 1.16.0 (git+https://github.com/encointer/typenum?tag=polkadot-v1.0.0)", + "substrate-typenum", ] [[package]] name = "substrate-frame-rpc-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-system-rpc-runtime-api", - "futures 0.3.28", + "futures 0.3.30", "jsonrpsee", "log", "parity-scale-codec", @@ -12051,7 +12852,7 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "hyper", "log", @@ -12063,7 +12864,7 @@ dependencies = [ [[package]] name = "substrate-rpc-client" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "async-trait", "jsonrpsee", @@ -12076,14 +12877,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.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "jsonrpsee", - "log", "parity-scale-codec", "sc-client-api", "sc-rpc-api", - "scale-info", "serde", "sp-core", "sp-runtime", @@ -12095,11 +12894,11 @@ dependencies = [ [[package]] name = "substrate-test-client" version = "2.0.1" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ - "array-bytes 4.2.0", + "array-bytes", "async-trait", - "futures 0.3.28", + "futures 0.3.30", "parity-scale-codec", "sc-client-api", "sc-client-db", @@ -12118,38 +12917,46 @@ dependencies = [ "sp-state-machine", ] +[[package]] +name = "substrate-typenum" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0f0091e93c2c75b233ae39424c52cb8a662c0811fb68add149e20e5d7e8a788" +dependencies = [ + "parity-scale-codec", + "scale-info", +] + [[package]] name = "substrate-wasm-builder" version = "5.0.0-dev" -source = "git+https://github.com/zeitgeistpm/substrate.git?branch=polkadot-v0.9.38-zeitgeist-adjustments#bd498817bb4479836a47231b4fc36831a19806ae" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "ansi_term", "build-helper", "cargo_metadata", "filetime", + "parity-wasm", "sp-maybe-compressed-blob", - "strum", + "strum 0.24.1", "tempfile", - "toml", + "toml 0.7.8", "walkdir", "wasm-opt", ] -[[package]] -name = "substring" -version = "1.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42ee6433ecef213b2e72f587ef64a2f5943e7cd16fbd82dbe8bc07486c534c86" -dependencies = [ - "autocfg", -] - [[package]] name = "subtle" version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" +[[package]] +name = "subtle-ng" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "734676eb262c623cec13c3155096e08d1f8f29adce39ba17948b18dad1e54142" + [[package]] name = "syn" version = "1.0.109" @@ -12163,9 +12970,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.28" +version = "2.0.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04361975b3f5e348b2189d8dc55bc942f278b2d482a6a0365de5bdd62d351567" +checksum = "909518bc7b1c9b779f1bbf07f2929d35af9f0f37e47c6e9ef7f9dddc1e1821f3" dependencies = [ "proc-macro2", "quote", @@ -12213,28 +13020,27 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "target-lexicon" -version = "0.12.11" +version = "0.12.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d0e916b1148c8e263850e1ebcbd046f333e0683c724876bb0da63ea4373dc8a" +checksum = "e1fc403891a21bcfb7c37834ba66a547a8f402146eba7265b5a6d88059c9ff2f" [[package]] name = "tempfile" -version = "3.7.0" +version = "3.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5486094ee78b2e5038a6382ed7645bc084dc2ec433426ca4c3cb61e2007b8998" +checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" dependencies = [ "cfg-if", - "fastrand 2.0.0", - "redox_syscall 0.3.5", - "rustix 0.38.4", - "windows-sys 0.48.0", + "fastrand 2.1.0", + "rustix 0.38.34", + "windows-sys 0.52.0", ] [[package]] name = "termcolor" -version = "1.2.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6" +checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" dependencies = [ "winapi-util", ] @@ -12247,43 +13053,41 @@ checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" [[package]] name = "test-case" -version = "3.1.0" +version = "3.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a1d6e7bde536b0412f20765b76e921028059adfd1b90d8974d33fd3c91b25df" +checksum = "eb2550dd13afcd286853192af8601920d959b14c401fcece38071d53bf0768a8" dependencies = [ "test-case-macros", ] [[package]] name = "test-case-core" -version = "3.1.0" +version = "3.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d10394d5d1e27794f772b6fc854c7e91a2dc26e2cbf807ad523370c2a59c0cee" +checksum = "adcb7fd841cd518e279be3d5a3eb0636409487998a4aff22f3de87b81e88384f" dependencies = [ "cfg-if", - "proc-macro-error", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.60", ] [[package]] name = "test-case-macros" -version = "3.1.0" +version = "3.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eeb9a44b1c6a54c1ba58b152797739dba2a83ca74e18168a68c980eb142f9404" +checksum = "5c89e72a01ed4c579669add59014b9a524d609c0c88c6a585ce37485879f6ffb" dependencies = [ - "proc-macro-error", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.60", "test-case-core", ] [[package]] name = "test-runtime-constants" -version = "0.9.38" -source = "git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes#20fcf6d7f070911b441925cb6f418b3d346af3a0" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-support", "polkadot-primitives", @@ -12296,22 +13100,42 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.44" +version = "1.0.59" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "611040a08a0439f8248d1990b111c95baa9c704c805fa1f62104b39655fd7f90" +checksum = "f0126ad08bff79f29fc3ae6a55cc72352056dfff61e3ff8bb7129476d44b23aa" dependencies = [ "thiserror-impl", ] +[[package]] +name = "thiserror-core" +version = "1.0.50" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c001ee18b7e5e3f62cbf58c7fe220119e68d902bb7443179c0c8aef30090e999" +dependencies = [ + "thiserror-core-impl", +] + +[[package]] +name = "thiserror-core-impl" +version = "1.0.50" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4c60d69f36615a077cc7663b9cb8e42275722d23e58a7fa3d2c7f2915d09d04" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.60", +] + [[package]] name = "thiserror-impl" -version = "1.0.44" +version = "1.0.59" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "090198534930841fab3a5d1bb637cde49e339654e606195f8d9c76eeb081dc96" +checksum = "d1cd413b5d558b4c5bf3680e324a6fa5014e7b7c067a51e69dbdf47eb7148b66" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.60", ] [[package]] @@ -12322,9 +13146,9 @@ checksum = "3bf63baf9f5039dadc247375c29eb13706706cfde997d0330d05aa63a77d8820" [[package]] name = "thread_local" -version = "1.1.7" +version = "1.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdd6f064ccff2d6567adcb3873ca630700f00b5ad3f060c25b5dcfd9a4ce152" +checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" dependencies = [ "cfg-if", "once_cell", @@ -12375,23 +13199,14 @@ dependencies = [ [[package]] name = "time" -version = "0.1.45" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b797afad3f312d1c66a56d11d0316f916356d11bd158fbc6ca6389ff6bf805a" -dependencies = [ - "libc", - "wasi 0.10.0+wasi-snapshot-preview1", - "winapi", -] - -[[package]] -name = "time" -version = "0.3.24" +version = "0.3.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b79eabcd964882a646b3584543ccabeae7869e9ac32a46f6f22b7a5bd405308b" +checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" dependencies = [ "deranged", "itoa", + "num-conv", + "powerfmt", "serde", "time-core", "time-macros", @@ -12399,16 +13214,17 @@ dependencies = [ [[package]] name = "time-core" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb" +checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.11" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb71511c991639bb078fd5bf97757e03914361c48100d52878b8e52b46fb92cd" +checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" dependencies = [ + "num-conv", "time-core", ] @@ -12424,7 +13240,7 @@ dependencies = [ "pbkdf2 0.11.0", "rand 0.8.5", "rustc-hash", - "sha2 0.10.7", + "sha2 0.10.8", "thiserror", "unicode-normalization", "wasm-bindgen", @@ -12432,13 +13248,12 @@ dependencies = [ ] [[package]] -name = "tinytemplate" -version = "1.2.1" +name = "tiny-keccak" +version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be4d6b5f19ff7664e8c98d03e2139cb510db9b0a60b55f8e8709b689d939b6bc" +checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" dependencies = [ - "serde", - "serde_json", + "crunchy", ] [[package]] @@ -12458,69 +13273,78 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.29.1" +version = "1.37.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "532826ff75199d5833b9d2c5fe410f29235e25704ee5f0ef599fb51c21f4a4da" +checksum = "1adbebffeca75fcfd058afa480fb6c0b81e165a0323f9c9d39c9697e37c46787" dependencies = [ - "autocfg", "backtrace", "bytes", "libc", "mio", "num_cpus", - "parking_lot 0.12.1", - "pin-project-lite 0.2.10", + "parking_lot 0.12.2", + "pin-project-lite 0.2.14", "signal-hook-registry", - "socket2 0.4.9", + "socket2 0.5.7", "tokio-macros", "windows-sys 0.48.0", ] [[package]] name = "tokio-macros" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" +checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.60", +] + +[[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.12", "tokio", - "webpki 0.22.0", ] [[package]] name = "tokio-stream" -version = "0.1.14" +version = "0.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842" +checksum = "267ac89e0bec6e691e5813911606935d77c476ff49024f98abcea3e7b15e37af" dependencies = [ "futures-core", - "pin-project-lite 0.2.10", + "pin-project-lite 0.2.14", "tokio", "tokio-util", ] [[package]] name = "tokio-util" -version = "0.7.8" +version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "806fe8c2c87eccc8b3267cbae29ed3ab2d0bd37fca70ab622e46aaa9375ddb7d" +checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" dependencies = [ "bytes", "futures-core", "futures-io", "futures-sink", - "pin-project-lite 0.2.10", + "pin-project-lite 0.2.14", "tokio", "tracing", ] @@ -12534,19 +13358,61 @@ dependencies = [ "serde", ] +[[package]] +name = "toml" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd79e69d3b627db300ff956027cc6c3798cef26d22526befdfcd12feeb6d2257" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit 0.19.15", +] + +[[package]] +name = "toml" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "185d8ab0dfbb35cf1399a6344d8484209c088f75f8f68230da55d48d95d43e3d" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit 0.20.2", +] + [[package]] name = "toml_datetime" version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" +dependencies = [ + "serde", +] + +[[package]] +name = "toml_edit" +version = "0.19.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" +dependencies = [ + "indexmap 2.2.6", + "serde", + "serde_spanned", + "toml_datetime", + "winnow", +] [[package]] name = "toml_edit" -version = "0.19.14" +version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8123f27e969974a3dfba720fdb560be359f57b44302d280ba72e76a74480e8a" +checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" dependencies = [ - "indexmap 2.0.0", + "indexmap 2.2.6", + "serde", + "serde_spanned", "toml_datetime", "winnow", ] @@ -12564,18 +13430,18 @@ dependencies = [ [[package]] name = "tower-http" -version = "0.3.5" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f873044bf02dd1e8239e9c1293ea39dad76dc594ec16185d0a1bf31d8dc8d858" +checksum = "61c5bb1d698276a2443e5ecfabc1008bf15a36c12e6a7176e7bf089ea9131140" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.5.0", "bytes", "futures-core", "futures-util", "http", "http-body", "http-range-header", - "pin-project-lite 0.2.10", + "pin-project-lite 0.2.14", "tower-layer", "tower-service", ] @@ -12594,33 +13460,32 @@ checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" [[package]] name = "tracing" -version = "0.1.37" +version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" dependencies = [ - "cfg-if", "log", - "pin-project-lite 0.2.10", + "pin-project-lite 0.2.14", "tracing-attributes", "tracing-core", ] [[package]] name = "tracing-attributes" -version = "0.1.26" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" +checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.60", ] [[package]] name = "tracing-core" -version = "0.1.31" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0955b8137a1df6f1a2e9a37d8a6656291ff0297c1a97c24e0d8425fe2312f79a" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" dependencies = [ "once_cell", "valuable", @@ -12638,58 +13503,36 @@ dependencies = [ [[package]] name = "tracing-gum" -version = "0.9.38" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.38#097ffd245c42aeff28cf80f8a3568e1bee2e7da7" -dependencies = [ - "polkadot-node-jaeger 0.9.38 (git+https://github.com/paritytech/polkadot?branch=release-v0.9.38)", - "polkadot-primitives", - "tracing", - "tracing-gum-proc-macro 0.9.38 (git+https://github.com/paritytech/polkadot?branch=release-v0.9.38)", -] - -[[package]] -name = "tracing-gum" -version = "0.9.38" -source = "git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes#20fcf6d7f070911b441925cb6f418b3d346af3a0" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ - "polkadot-node-jaeger 0.9.38 (git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes)", + "coarsetime", + "polkadot-node-jaeger", "polkadot-primitives", "tracing", - "tracing-gum-proc-macro 0.9.38 (git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes)", -] - -[[package]] -name = "tracing-gum-proc-macro" -version = "0.9.38" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.38#097ffd245c42aeff28cf80f8a3568e1bee2e7da7" -dependencies = [ - "expander 0.0.6", - "proc-macro-crate", - "proc-macro2", - "quote", - "syn 1.0.109", + "tracing-gum-proc-macro", ] [[package]] name = "tracing-gum-proc-macro" -version = "0.9.38" -source = "git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes#20fcf6d7f070911b441925cb6f418b3d346af3a0" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ - "expander 0.0.6", - "proc-macro-crate", + "expander 2.1.0", + "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.60", ] [[package]] name = "tracing-log" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78ddad33d2d10b1ed7eb9d1f518a5674713876e97e5bb9b7345a7984fbb4f922" +checksum = "f751112709b4e791d8ce53e32c4ed2d353565a795ce84da2285393f41557bdf2" dependencies = [ - "lazy_static", "log", + "once_cell", "tracing-core", ] @@ -12728,12 +13571,12 @@ dependencies = [ [[package]] name = "trie-db" -version = "0.24.0" +version = "0.27.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "004e1e8f92535694b4cb1444dc5a8073ecf0815e3357f729638b9f8fc4062908" +checksum = "767abe6ffed88a1889671a102c2861ae742726f52e0a5a425b92c9fbfa7e9c85" dependencies = [ "hash-db", - "hashbrown 0.12.3", + "hashbrown 0.13.2", "log", "rustc-hex", "smallvec", @@ -12741,9 +13584,9 @@ dependencies = [ [[package]] name = "trie-root" -version = "0.17.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a36c5ca3911ed3c9a5416ee6c679042064b93fc637ded67e25f92e68d783891" +checksum = "d4ed310ef5ab98f5fa467900ed906cb9232dd5376597e00fd4cba2a449d06c0b" dependencies = [ "hash-db", ] @@ -12766,7 +13609,7 @@ dependencies = [ "lazy_static", "rand 0.8.5", "smallvec", - "socket2 0.4.9", + "socket2 0.4.10", "thiserror", "tinyvec", "tokio", @@ -12785,7 +13628,7 @@ dependencies = [ "ipconfig", "lazy_static", "lru-cache", - "parking_lot 0.12.1", + "parking_lot 0.12.2", "resolv-conf", "smallvec", "thiserror", @@ -12796,15 +13639,16 @@ dependencies = [ [[package]] name = "try-lock" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] name = "try-runtime-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ + "async-trait", "clap", "frame-remote-externalities", "frame-try-runtime", @@ -12813,22 +13657,26 @@ dependencies = [ "parity-scale-codec", "sc-cli", "sc-executor", - "sc-service", "serde", "serde_json", "sp-api", + "sp-consensus-aura", + "sp-consensus-babe", "sp-core", "sp-debug-derive", "sp-externalities", + "sp-inherents", "sp-io", "sp-keystore", "sp-rpc", "sp-runtime", "sp-state-machine", + "sp-timestamp", + "sp-transaction-storage-proof", "sp-version", "sp-weights", "substrate-rpc-client", - "zstd", + "zstd 0.12.4", ] [[package]] @@ -12837,25 +13685,6 @@ version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f4f195fd851901624eee5a58c4bb2b4f06399148fcd0ed336e6f1cb60a9881df" -[[package]] -name = "turn" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4712ee30d123ec7ae26d1e1b218395a16c87cdbaf4b3925d170d684af62ea5e8" -dependencies = [ - "async-trait", - "base64 0.13.1", - "futures 0.3.28", - "log", - "md-5", - "rand 0.8.5", - "ring", - "stun", - "thiserror", - "tokio", - "webrtc-util", -] - [[package]] name = "twox-hash" version = "1.6.3" @@ -12870,18 +13699,9 @@ dependencies = [ [[package]] name = "typenum" -version = "1.16.0" +version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" - -[[package]] -name = "typenum" -version = "1.16.0" -source = "git+https://github.com/encointer/typenum?tag=polkadot-v1.0.0#4cba9a73f7e94ba38c824616efab93f177c9a556" -dependencies = [ - "parity-scale-codec", - "scale-info", -] +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "ucd-trie" @@ -12903,30 +13723,30 @@ dependencies = [ [[package]] name = "unicode-bidi" -version = "0.3.13" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" +checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" [[package]] name = "unicode-ident" -version = "1.0.11" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "unicode-normalization" -version = "0.1.22" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" +checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" dependencies = [ "tinyvec", ] [[package]] name = "unicode-width" -version = "0.1.10" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" +checksum = "68f5e5f3158ecfd4b8ff6fe086db7c8467a2dfdac97fe420f2b7c4aa97af66d6" [[package]] name = "unicode-xid" @@ -12934,16 +13754,6 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" -[[package]] -name = "universal-hash" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f214e8f697e925001e66ec2c6e37a4ef93f0f78c2eed7814394e10c62025b05" -dependencies = [ - "generic-array 0.14.7", - "subtle", -] - [[package]] name = "universal-hash" version = "0.5.1" @@ -12956,9 +13766,9 @@ dependencies = [ [[package]] name = "unsigned-varint" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d86a8dc7f45e4c1b0d30e43038c38f274e77af056aa5f74b93c2cf9eb3c1c836" +checksum = "6889a77d49f1f013504cec6bf97a2c730394adedaeb1deb5ea08949a50541105" dependencies = [ "asynchronous-codec", "bytes", @@ -12972,14 +13782,20 @@ version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" +[[package]] +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + [[package]] name = "url" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50bff7831e19200a85b17131d085c25d7811bc4e186efdaf54bbd132994a88cb" +checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" dependencies = [ "form_urlencoded", - "idna 0.4.0", + "idna 0.5.0", "percent-encoding", ] @@ -12989,15 +13805,6 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" -[[package]] -name = "uuid" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79daa5ed5740825c40b389c5e50312b9c86df53fccd33f281df655642b43869d" -dependencies = [ - "getrandom 0.2.10", -] - [[package]] name = "valuable" version = "0.1.0" @@ -13022,26 +13829,17 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" -[[package]] -name = "waitgroup" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1f50000a783467e6c0200f9d10642f4bc424e39efc1b770203e88b488f79292" -dependencies = [ - "atomic-waker", -] - [[package]] name = "waker-fn" -version = "1.1.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d5b2c62b4012a3e1eca5a7e077d13b3bf498c4073e33ccd58626607748ceeca" +checksum = "f3c4517f54858c779bbcbf228f4fca63d121bf85fbecb2dc578cdf4a39395690" [[package]] name = "walkdir" -version = "2.3.3" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36df944cda56c7d8d8b7496af378e6b16de9284591917d307c9b4d313c44e698" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" dependencies = [ "same-file", "winapi-util", @@ -13064,21 +13862,24 @@ checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" [[package]] name = "wasi" -version = "0.10.0+wasi-snapshot-preview1" +version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] -name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" +name = "wasix" +version = "0.12.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +checksum = "c1fbb4ef9bbca0c1170e0b00dd28abc9e3b68669821600cad1caaed606583c6d" +dependencies = [ + "wasi 0.11.0+wasi-snapshot-preview1", +] [[package]] name = "wasm-bindgen" -version = "0.2.87" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342" +checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -13086,24 +13887,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.87" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd" +checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.60", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.37" +version = "0.4.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c02dbc21516f9f1f04f187958890d7e6026df8d16540b7ad9492bc34a67cea03" +checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" dependencies = [ "cfg-if", "js-sys", @@ -13113,9 +13914,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.87" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d" +checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -13123,22 +13924,22 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.87" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" +checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.60", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.87" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" +checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" [[package]] name = "wasm-instrument" @@ -13160,14 +13961,14 @@ dependencies = [ [[package]] name = "wasm-opt" -version = "0.111.0" +version = "0.114.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84a303793cbc01fb96551badfc7367db6007396bba6bac97936b3c8b6f7fdb41" +checksum = "effbef3bd1dde18acb401f73e740a6f3d4a1bc651e9773bddc512fe4d8d68f67" dependencies = [ "anyhow", "libc", - "strum", - "strum_macros", + "strum 0.24.1", + "strum_macros 0.24.3", "tempfile", "thiserror", "wasm-opt-cxx-sys", @@ -13176,9 +13977,9 @@ dependencies = [ [[package]] name = "wasm-opt-cxx-sys" -version = "0.111.0" +version = "0.114.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9c9deb56f8a9f2ec177b3bd642a8205621835944ed5da55f2388ef216aca5a4" +checksum = "c09e24eb283919ace2ed5733bda4842a59ce4c8de110ef5c6d98859513d17047" dependencies = [ "anyhow", "cxx", @@ -13188,15 +13989,14 @@ dependencies = [ [[package]] name = "wasm-opt-sys" -version = "0.111.0" +version = "0.114.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4432e28b542738a9776cedf92e8a99d8991c7b4667ee2c7ccddfb479dd2856a7" +checksum = "36f2f817bed2e8d65eb779fa37317e74de15585751f903c9118342d1970703a4" dependencies = [ "anyhow", "cc", "cxx", "cxx-build", - "regex", ] [[package]] @@ -13205,7 +14005,7 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "be0ecb0db480561e9a7642b5d3e4187c128914e58aa84330b9493e3eb68c5e7f" dependencies = [ - "futures 0.3.28", + "futures 0.3.30", "js-sys", "parking_lot 0.11.2", "pin-utils", @@ -13216,89 +14016,59 @@ 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.20.0" +version = "0.31.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01bf50edb2ea9d922aa75a7bf3c15e26a6c9e2d18c56e862b49737a582901729" +checksum = "77a8281d1d660cdf54c76a3efa9ddd0c270cada1383a995db3ccb43d166456c7" dependencies = [ + "smallvec", "spin 0.9.8", "wasmi_arena", - "wasmi_core 0.5.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.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1ea379cbb0b41f3a9f0bf7b47036d036aae7f43383d8cc487d4deccf40dee0a" - -[[package]] -name = "wasmi_core" -version = "0.2.1" +version = "0.4.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", -] +checksum = "104a7f73be44570cac297b3035d76b169d6599637631cf37a1703326a0727073" [[package]] name = "wasmi_core" -version = "0.5.0" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5bf998ab792be85e20e771fe14182b4295571ad1d4f89d3da521c1bef5f597a" +checksum = "dcf1a7db34bff95b85c261002720c00c3a6168256dcb93041d3fa2054d19856a" dependencies = [ "downcast-rs", - "libm 0.2.7", + "libm", "num-traits", + "paste", ] [[package]] name = "wasmparser" -version = "0.89.1" +version = "0.102.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab5d3e08b13876f96dd55608d03cd4883a0545884932d5adf11925876c96daef" +checksum = "48134de3d7598219ab9eaf6b91b15d8e50d31da76b8519fe4ecfcec2cf35104b" dependencies = [ "indexmap 1.9.3", + "url", ] [[package]] name = "wasmparser-nostd" -version = "0.91.0" +version = "0.100.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c37f310b5a62bfd5ae7c0f1d8e6f98af16a5d6d84ba764e9c36439ec14e318b" +checksum = "d5a015fe95f3504a94bb1462c717aae75253e39b9dd6c3fb1062c934535c64aa" dependencies = [ "indexmap-nostd", ] [[package]] name = "wasmtime" -version = "1.0.2" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ad5af6ba38311282f2a21670d96e78266e8c8e2f38cbcd52c254df6ccbc7731" +checksum = "f907fdead3153cb9bfb7a93bbd5b62629472dc06dee83605358c64c52ed3dda9" dependencies = [ "anyhow", "bincode", @@ -13306,7 +14076,7 @@ dependencies = [ "indexmap 1.9.3", "libc", "log", - "object 0.29.0", + "object 0.30.4", "once_cell", "paste", "psm", @@ -13319,43 +14089,43 @@ dependencies = [ "wasmtime-environ", "wasmtime-jit", "wasmtime-runtime", - "windows-sys 0.36.1", + "windows-sys 0.45.0", ] [[package]] name = "wasmtime-asm-macros" -version = "1.0.2" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45de63ddfc8b9223d1adc8f7b2ee5f35d1f6d112833934ad7ea66e4f4339e597" +checksum = "d3b9daa7c14cd4fa3edbf69de994408d5f4b7b0959ac13fa69d465f6597f810d" dependencies = [ "cfg-if", ] [[package]] name = "wasmtime-cache" -version = "1.0.2" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcd849399d17d2270141cfe47fa0d91ee52d5f8ea9b98cf7ddde0d53e5f79882" +checksum = "c86437fa68626fe896e5afc69234bb2b5894949083586535f200385adfd71213" dependencies = [ "anyhow", - "base64 0.13.1", + "base64 0.21.7", "bincode", "directories-next", "file-per-thread-logger", "log", - "rustix 0.35.14", + "rustix 0.36.17", "serde", - "sha2 0.9.9", - "toml", - "windows-sys 0.36.1", - "zstd", + "sha2 0.10.8", + "toml 0.5.11", + "windows-sys 0.45.0", + "zstd 0.11.2+zstd.1.5.2", ] [[package]] name = "wasmtime-cranelift" -version = "1.0.2" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bd91339b742ff20bfed4532a27b73c86b5bcbfedd6bea2dcdf2d64471e1b5c6" +checksum = "b1cefde0cce8cb700b1b21b6298a3837dba46521affd7b8c38a9ee2c869eee04" dependencies = [ "anyhow", "cranelift-codegen", @@ -13363,27 +14133,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 = "1.0.2" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebb881c61f4f627b5d45c54e629724974f8a8890d455bcbe634330cc27309644" +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", @@ -13393,330 +14179,127 @@ dependencies = [ [[package]] name = "wasmtime-jit" -version = "1.0.2" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1985c628011fe26adf5e23a5301bdc79b245e0e338f14bb58b39e4e25e4d8681" +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", - "rustix 0.35.14", "serde", "target-lexicon", - "thiserror", "wasmtime-environ", "wasmtime-jit-debug", + "wasmtime-jit-icache-coherence", "wasmtime-runtime", - "windows-sys 0.36.1", + "windows-sys 0.45.0", ] [[package]] name = "wasmtime-jit-debug" -version = "1.0.2" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f671b588486f5ccec8c5a3dba6b4c07eac2e66ab8c60e6f4e53717c77f709731" +checksum = "6e0554b84c15a27d76281d06838aed94e13a77d7bf604bbbaf548aa20eb93846" dependencies = [ - "object 0.29.0", + "object 0.30.4", "once_cell", - "rustix 0.35.14", + "rustix 0.36.17", ] [[package]] -name = "wasmtime-runtime" -version = "1.0.2" +name = "wasmtime-jit-icache-coherence" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee8f92ad4b61736339c29361da85769ebc200f184361959d1792832e592a1afd" +checksum = "aecae978b13f7f67efb23bd827373ace4578f2137ec110bbf6a4a7cde4121bbd" dependencies = [ - "anyhow", - "cc", "cfg-if", - "indexmap 1.9.3", "libc", - "log", - "mach", - "memfd", - "memoffset 0.6.5", - "paste", - "rand 0.8.5", - "rustix 0.35.14", - "thiserror", - "wasmtime-asm-macros", - "wasmtime-environ", - "wasmtime-jit-debug", - "windows-sys 0.36.1", -] - -[[package]] -name = "wasmtime-types" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d23d61cb4c46e837b431196dd06abb11731541021916d03476a178b54dc07aeb" -dependencies = [ - "cranelift-entity", - "serde", - "thiserror", - "wasmparser", -] - -[[package]] -name = "web-sys" -version = "0.3.64" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b85cbef8c220a6abc02aefd892dfc0fc23afb1c6a426316ec33253a3877249b" -dependencies = [ - "js-sys", - "wasm-bindgen", -] - -[[package]] -name = "webpki" -version = "0.21.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8e38c0608262c46d4a56202ebabdeb094cef7e560ca7a226c6bf055188aa4ea" -dependencies = [ - "ring", - "untrusted", -] - -[[package]] -name = "webpki" -version = "0.22.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f095d78192e208183081cc07bc5515ef55216397af48b873e5edcd72637fa1bd" -dependencies = [ - "ring", - "untrusted", -] - -[[package]] -name = "webpki-roots" -version = "0.22.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6c71e40d7d2c34a5106301fb632274ca37242cd0c9d3e64dbece371a40a2d87" -dependencies = [ - "webpki 0.22.0", -] - -[[package]] -name = "webrtc" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d3bc9049bdb2cea52f5fd4f6f728184225bdb867ed0dc2410eab6df5bdd67bb" -dependencies = [ - "arc-swap", - "async-trait", - "bytes", - "hex", - "interceptor", - "lazy_static", - "log", - "rand 0.8.5", - "rcgen 0.9.3", - "regex", - "ring", - "rtcp", - "rtp", - "rustls 0.19.1", - "sdp", - "serde", - "serde_json", - "sha2 0.10.7", - "stun", - "thiserror", - "time 0.3.24", - "tokio", - "turn", - "url", - "waitgroup", - "webrtc-data", - "webrtc-dtls", - "webrtc-ice", - "webrtc-mdns", - "webrtc-media", - "webrtc-sctp", - "webrtc-srtp", - "webrtc-util", -] - -[[package]] -name = "webrtc-data" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ef36a4d12baa6e842582fe9ec16a57184ba35e1a09308307b67d43ec8883100" -dependencies = [ - "bytes", - "derive_builder", - "log", - "thiserror", - "tokio", - "webrtc-sctp", - "webrtc-util", -] - -[[package]] -name = "webrtc-dtls" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "942be5bd85f072c3128396f6e5a9bfb93ca8c1939ded735d177b7bcba9a13d05" -dependencies = [ - "aes 0.6.0", - "aes-gcm 0.10.2", - "async-trait", - "bincode", - "block-modes", - "byteorder", - "ccm", - "curve25519-dalek 3.2.0", - "der-parser 8.2.0", - "elliptic-curve", - "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", - "ring", - "rustls 0.19.1", - "sec1", - "serde", - "sha1", - "sha2 0.10.7", - "signature", - "subtle", - "thiserror", - "tokio", - "webpki 0.21.4", - "webrtc-util", - "x25519-dalek 2.0.0-pre.1", - "x509-parser 0.13.2", + "windows-sys 0.45.0", ] [[package]] -name = "webrtc-ice" -version = "0.9.1" +name = "wasmtime-runtime" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "465a03cc11e9a7d7b4f9f99870558fe37a102b65b93f8045392fef7c67b39e80" +checksum = "658cf6f325232b6760e202e5255d823da5e348fdea827eff0a2a22319000b441" dependencies = [ - "arc-swap", - "async-trait", - "crc", + "anyhow", + "cc", + "cfg-if", + "indexmap 1.9.3", + "libc", "log", + "mach", + "memfd", + "memoffset", + "paste", "rand 0.8.5", - "serde", - "serde_json", - "stun", - "thiserror", - "tokio", - "turn", - "url", - "uuid", - "waitgroup", - "webrtc-mdns", - "webrtc-util", + "rustix 0.36.17", + "wasmtime-asm-macros", + "wasmtime-environ", + "wasmtime-jit-debug", + "windows-sys 0.45.0", ] [[package]] -name = "webrtc-mdns" -version = "0.5.2" +name = "wasmtime-types" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f08dfd7a6e3987e255c4dbe710dde5d94d0f0574f8a21afa95d171376c143106" +checksum = "a4f6fffd2a1011887d57f07654dd112791e872e3ff4a2e626aee8059ee17f06f" dependencies = [ - "log", - "socket2 0.4.9", + "cranelift-entity", + "serde", "thiserror", - "tokio", - "webrtc-util", + "wasmparser", ] [[package]] -name = "webrtc-media" -version = "0.5.1" +name = "web-sys" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f72e1650a8ae006017d1a5280efb49e2610c19ccc3c0905b03b648aee9554991" +checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" dependencies = [ - "byteorder", - "bytes", - "rand 0.8.5", - "rtp", - "thiserror", + "js-sys", + "wasm-bindgen", ] [[package]] -name = "webrtc-sctp" -version = "0.7.0" +name = "webpki" +version = "0.22.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d47adcd9427eb3ede33d5a7f3424038f63c965491beafcc20bc650a2f6679c0" +checksum = "ed63aea5ce73d0ff405984102c42de94fc55a6b75765d621c65262469b3c9b53" dependencies = [ - "arc-swap", - "async-trait", - "bytes", - "crc", - "log", - "rand 0.8.5", - "thiserror", - "tokio", - "webrtc-util", + "ring 0.17.8", + "untrusted 0.9.0", ] [[package]] -name = "webrtc-srtp" -version = "0.9.1" +name = "webpki-roots" +version = "0.22.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6183edc4c1c6c0175f8812eefdce84dfa0aea9c3ece71c2bf6ddd3c964de3da5" +checksum = "b6c71e40d7d2c34a5106301fb632274ca37242cd0c9d3e64dbece371a40a2d87" dependencies = [ - "aead 0.4.3", - "aes 0.7.5", - "aes-gcm 0.9.4", - "async-trait", - "byteorder", - "bytes", - "ctr 0.8.0", - "hmac 0.11.0", - "log", - "rtcp", - "rtp", - "sha-1", - "subtle", - "thiserror", - "tokio", - "webrtc-util", + "webpki", ] [[package]] -name = "webrtc-util" -version = "0.7.0" +name = "webpki-roots" +version = "0.25.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93f1db1727772c05cf7a2cfece52c3aca8045ca1e176cd517d323489aa3c6d87" -dependencies = [ - "async-trait", - "bitflags 1.3.2", - "bytes", - "cc", - "ipnet", - "lazy_static", - "libc", - "log", - "nix 0.24.3", - "rand 0.8.5", - "thiserror", - "tokio", - "winapi", -] +checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" [[package]] name = "westend-runtime" -version = "0.9.38" -source = "git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes#20fcf6d7f070911b441925cb6f418b3d346af3a0" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ + "binary-merkle-tree", "bitvec", "frame-benchmarking", "frame-election-provider-support", @@ -13733,6 +14316,8 @@ dependencies = [ "pallet-babe", "pallet-bags-list", "pallet-balances", + "pallet-beefy", + "pallet-beefy-mmr", "pallet-collective", "pallet-democracy", "pallet-election-provider-multi-phase", @@ -13744,6 +14329,8 @@ dependencies = [ "pallet-im-online", "pallet-indices", "pallet-membership", + "pallet-message-queue", + "pallet-mmr", "pallet-multisig", "pallet-nomination-pools", "pallet-nomination-pools-benchmarking", @@ -13759,6 +14346,7 @@ dependencies = [ "pallet-society", "pallet-staking", "pallet-staking-reward-curve", + "pallet-staking-runtime-api", "pallet-state-trie-migration", "pallet-sudo", "pallet-timestamp", @@ -13770,7 +14358,7 @@ dependencies = [ "pallet-xcm", "pallet-xcm-benchmarks", "parity-scale-codec", - "polkadot-parachain", + "polkadot-parachain-primitives", "polkadot-primitives", "polkadot-runtime-common", "polkadot-runtime-parachains", @@ -13780,10 +14368,11 @@ dependencies = [ "serde_derive", "smallvec", "sp-api", + "sp-application-crypto", "sp-authority-discovery", - "sp-beefy", "sp-block-builder", "sp-consensus-babe", + "sp-consensus-beefy", "sp-core", "sp-inherents", "sp-io", @@ -13793,20 +14382,21 @@ dependencies = [ "sp-runtime", "sp-session", "sp-staking", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", + "sp-storage", "sp-transaction-pool", "sp-version", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", "substrate-wasm-builder", "westend-runtime-constants", - "xcm", - "xcm-builder", - "xcm-executor", ] [[package]] name = "westend-runtime-constants" -version = "0.9.38" -source = "git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes#20fcf6d7f070911b441925cb6f418b3d346af3a0" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "frame-support", "polkadot-primitives", @@ -13819,20 +14409,31 @@ dependencies = [ [[package]] name = "which" -version = "4.4.0" +version = "4.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2441c784c52b289a054b7201fc93253e288f094e2f4be9058343127c4226a269" +checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" dependencies = [ "either", - "libc", + "home", "once_cell", + "rustix 0.38.34", +] + +[[package]] +name = "wide" +version = "0.7.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f0e39d2c603fdc0504b12b458cf1f34e0b937ed2f4f2dc20796e3e86f34e11f" +dependencies = [ + "bytemuck", + "safe_arch", ] [[package]] name = "widestring" -version = "1.0.2" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "653f141f39ec16bba3c5abe400a0c60da7468261cc2cbf36805022876bc721a8" +checksum = "7219d36b6eac893fa81e84ebe06485e7dcbb616177469b142df14f1f4deb1311" [[package]] name = "winapi" @@ -13852,11 +14453,11 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.5" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" +checksum = "4d4cc384e1e73b93bafa6fb4f1df8c41695c8a91cf9c4c64358067d15a7b6c6b" dependencies = [ - "winapi", + "windows-sys 0.52.0", ] [[package]] @@ -13867,44 +14468,64 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windows" -version = "0.34.0" +version = "0.51.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45296b64204227616fdbf2614cefa4c236b98ee64dfaaaa435207ed99fe7829f" +checksum = "ca229916c5ee38c2f2bc1e9d8f04df975b4bd93f9955dc69fabb5d91270045c9" dependencies = [ - "windows_aarch64_msvc 0.34.0", - "windows_i686_gnu 0.34.0", - "windows_i686_msvc 0.34.0", - "windows_x86_64_gnu 0.34.0", - "windows_x86_64_msvc 0.34.0", + "windows-core 0.51.1", + "windows-targets 0.48.5", ] [[package]] -name = "windows" -version = "0.48.0" +name = "windows-core" +version = "0.51.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1f8cf84f35d2db49a46868f947758c7a1138116f7fac3bc844f43ade1292e64" +dependencies = [ + "windows-targets 0.48.5", +] + +[[package]] +name = "windows-core" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" +checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-targets", + "windows-targets 0.52.5", ] [[package]] name = "windows-sys" -version = "0.36.1" +version = "0.45.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2" +checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" dependencies = [ - "windows_aarch64_msvc 0.36.1", - "windows_i686_gnu 0.36.1", - "windows_i686_msvc 0.36.1", - "windows_x86_64_gnu 0.36.1", - "windows_x86_64_msvc 0.36.1", + "windows-targets 0.42.2", ] [[package]] name = "windows-sys" -version = "0.42.0" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets 0.48.5", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.5", +] + +[[package]] +name = "windows-targets" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" +checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" dependencies = [ "windows_aarch64_gnullvm 0.42.2", "windows_aarch64_msvc 0.42.2", @@ -13916,27 +14537,34 @@ dependencies = [ ] [[package]] -name = "windows-sys" -version = "0.48.0" +name = "windows-targets" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" dependencies = [ - "windows-targets", + "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]] name = "windows-targets" -version = "0.48.1" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05d4b17490f70499f20b9e791dcf6a299785ce8af4d709018206dc5b4953e95f" +checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" 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.52.5", + "windows_aarch64_msvc 0.52.5", + "windows_i686_gnu 0.52.5", + "windows_i686_gnullvm", + "windows_i686_msvc 0.52.5", + "windows_x86_64_gnu 0.52.5", + "windows_x86_64_gnullvm 0.52.5", + "windows_x86_64_msvc 0.52.5", ] [[package]] @@ -13947,21 +14575,15 @@ checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.34.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17cffbe740121affb56fad0fc0e421804adf0ae00891205213b5cecd30db881d" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] -name = "windows_aarch64_msvc" -version = "0.36.1" +name = "windows_aarch64_gnullvm" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" +checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" [[package]] name = "windows_aarch64_msvc" @@ -13971,21 +14593,15 @@ checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" [[package]] name = "windows_aarch64_msvc" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" - -[[package]] -name = "windows_i686_gnu" -version = "0.34.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2564fde759adb79129d9b4f54be42b32c89970c18ebf93124ca8870a498688ed" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] -name = "windows_i686_gnu" -version = "0.36.1" +name = "windows_aarch64_msvc" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" +checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" [[package]] name = "windows_i686_gnu" @@ -13995,21 +14611,21 @@ 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" -version = "0.34.0" +name = "windows_i686_gnu" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cd9d32ba70453522332c14d38814bceeb747d80b3958676007acadd7e166956" +checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" [[package]] -name = "windows_i686_msvc" -version = "0.36.1" +name = "windows_i686_gnullvm" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" +checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" [[package]] name = "windows_i686_msvc" @@ -14019,33 +14635,33 @@ 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" -version = "0.34.0" +name = "windows_i686_msvc" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfce6deae227ee8d356d19effc141a509cc503dfd1f850622ec4b0f84428e1f4" +checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" [[package]] name = "windows_x86_64_gnu" -version = "0.36.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" +checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" [[package]] name = "windows_x86_64_gnu" -version = "0.42.2" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.48.0" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" +checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" [[package]] name = "windows_x86_64_gnullvm" @@ -14055,39 +14671,39 @@ 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" -version = "0.34.0" +name = "windows_x86_64_gnullvm" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d19538ccc21819d01deaf88d6a17eae6596a12e9aafdbb97916fb49896d89de9" +checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" [[package]] name = "windows_x86_64_msvc" -version = "0.36.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" +checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" [[package]] name = "windows_x86_64_msvc" -version = "0.42.2" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" -version = "0.48.0" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" +checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" [[package]] name = "winnow" -version = "0.5.3" +version = "0.5.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f46aab759304e4d7b2075a9aecba26228bb073ee8c50db796b2c72c676b5d807" +checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" dependencies = [ "memchr", ] @@ -14124,144 +14740,75 @@ dependencies = [ [[package]] name = "x25519-dalek" -version = "2.0.0-pre.1" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5da623d8af10a62342bcbbb230e33e58a63255a58012f8653c578e54bab48df" +checksum = "c7e468321c81fb07fa7f4c636c3972b9100f0346e5b6a9f2bd0603a52f7ed277" dependencies = [ - "curve25519-dalek 3.2.0", + "curve25519-dalek 4.1.2", "rand_core 0.6.4", + "serde", "zeroize", ] -[[package]] -name = "x509-parser" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fb9bace5b5589ffead1afb76e43e34cff39cd0f3ce7e170ae0c29e53b88eb1c" -dependencies = [ - "asn1-rs 0.3.1", - "base64 0.13.1", - "data-encoding", - "der-parser 7.0.0", - "lazy_static", - "nom", - "oid-registry 0.4.0", - "ring", - "rusticata-macros", - "thiserror", - "time 0.3.24", -] - [[package]] name = "x509-parser" version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e0ecbeb7b67ce215e40e3cc7f2ff902f94a223acf44995934763467e7b1febc8" dependencies = [ - "asn1-rs 0.5.2", + "asn1-rs", "base64 0.13.1", "data-encoding", - "der-parser 8.2.0", + "der-parser", "lazy_static", "nom", - "oid-registry 0.6.1", + "oid-registry", "rusticata-macros", "thiserror", - "time 0.3.24", -] - -[[package]] -name = "xcm" -version = "0.9.38" -source = "git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes#20fcf6d7f070911b441925cb6f418b3d346af3a0" -dependencies = [ - "derivative", - "impl-trait-for-tuples", - "log", - "parity-scale-codec", - "scale-info", - "serde", - "sp-core", - "sp-weights", - "xcm-procedural", -] - -[[package]] -name = "xcm-builder" -version = "0.9.38" -source = "git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes#20fcf6d7f070911b441925cb6f418b3d346af3a0" -dependencies = [ - "frame-support", - "frame-system", - "impl-trait-for-tuples", - "log", - "pallet-transaction-payment", - "parity-scale-codec", - "polkadot-parachain", - "scale-info", - "sp-arithmetic", - "sp-io", - "sp-runtime", - "sp-std", - "xcm", - "xcm-executor", + "time", ] [[package]] name = "xcm-emulator" version = "0.1.0" -source = "git+https://github.com/shaunxw/xcm-simulator?rev=92d371839f6d5c52dd35b7e3d61cbdefc792cc42#92d371839f6d5c52dd35b7e3d61cbdefc792cc42" +source = "git+https://github.com/zeitgeistpm/polkadot-sdk?branch=release-polkadot-v1.1.0-xcm-emulator-type-fix#84163279ce450f608de56b9d5151e65fe4bec51a" dependencies = [ - "cumulus-pallet-dmp-queue", "cumulus-pallet-parachain-system", - "cumulus-pallet-xcmp-queue", "cumulus-primitives-core", "cumulus-primitives-parachain-inherent", "cumulus-test-relay-sproof-builder", "frame-support", "frame-system", - "parachain-info", + "impl-trait-for-tuples", + "lazy_static", + "log", + "pallet-balances", + "pallet-message-queue", + "parachains-common", "parity-scale-codec", "paste", + "polkadot-parachain-primitives", "polkadot-primitives", "polkadot-runtime-parachains", - "quote", - "sp-arithmetic", - "sp-io", - "sp-std", - "xcm", - "xcm-executor", -] - -[[package]] -name = "xcm-executor" -version = "0.9.38" -source = "git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes#20fcf6d7f070911b441925cb6f418b3d346af3a0" -dependencies = [ - "environmental", - "frame-benchmarking", - "frame-support", - "impl-trait-for-tuples", - "log", - "parity-scale-codec", - "sp-arithmetic", + "sp-arithmetic 16.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", "sp-core", "sp-io", "sp-runtime", - "sp-std", - "sp-weights", - "xcm", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", + "sp-tracing", + "staging-xcm", + "staging-xcm-executor", ] [[package]] name = "xcm-procedural" -version = "0.9.38" -source = "git+https://github.com/zeitgeistpm/polkadot.git?branch=v0.9.38-recent-bootnodes#20fcf6d7f070911b441925cb6f418b3d346af3a0" +version = "1.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" dependencies = [ "Inflector", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.60", ] [[package]] @@ -14270,10 +14817,10 @@ version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5d9ba232399af1783a58d8eb26f6b5006fbefe2dc9ef36bd283324792d03ea5" dependencies = [ - "futures 0.3.28", + "futures 0.3.30", "log", "nohash-hasher", - "parking_lot 0.12.1", + "parking_lot 0.12.2", "rand 0.8.5", "static_assertions", ] @@ -14284,7 +14831,7 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e17bb3549cc1321ae1296b9cdc2698e2b6cb1992adfa19a8c72e5b7a738f44cd" dependencies = [ - "time 0.3.24", + "time", ] [[package]] @@ -14312,7 +14859,7 @@ dependencies = [ "cumulus-relay-chain-rpc-interface", "frame-benchmarking", "frame-benchmarking-cli", - "futures 0.3.28", + "futures 0.3.30", "hex-literal", "jsonrpsee", "log", @@ -14327,7 +14874,7 @@ dependencies = [ "pallet-transaction-payment-rpc-runtime-api", "parity-scale-codec", "polkadot-cli", - "polkadot-parachain", + "polkadot-parachain-primitives", "polkadot-primitives", "polkadot-service", "polkadot-test-service", @@ -14338,11 +14885,13 @@ dependencies = [ "sc-client-db", "sc-consensus", "sc-consensus-aura", + "sc-consensus-grandpa", "sc-executor", - "sc-finality-grandpa", "sc-keystore", "sc-network", - "sc-network-common", + "sc-network-statement", + "sc-network-sync", + "sc-offchain", "sc-rpc", "sc-rpc-api", "sc-service", @@ -14359,8 +14908,8 @@ dependencies = [ "sp-blockchain", "sp-consensus", "sp-consensus-aura", + "sp-consensus-grandpa", "sp-core", - "sp-finality-grandpa", "sp-inherents", "sp-io", "sp-keyring", @@ -14400,11 +14949,11 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-arithmetic", + "sp-arithmetic 16.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", "sp-core", "sp-runtime", "test-case", - "typenum 1.16.0 (registry+https://github.com/rust-lang/crates.io-index)", + "typenum", ] [[package]] @@ -14420,6 +14969,7 @@ dependencies = [ "cumulus-primitives-core", "cumulus-primitives-timestamp", "cumulus-primitives-utility", + "env_logger 0.10.2", "frame-benchmarking", "frame-executive", "frame-support", @@ -14452,12 +15002,14 @@ dependencies = [ "pallet-democracy", "pallet-grandpa", "pallet-identity", + "pallet-im-online", + "pallet-insecure-randomness-collective-flip", "pallet-membership", + "pallet-message-queue", "pallet-multisig", "pallet-parachain-staking", "pallet-preimage", "pallet-proxy", - "pallet-randomness-collective-flip", "pallet-scheduler", "pallet-timestamp", "pallet-transaction-payment", @@ -14468,33 +15020,35 @@ dependencies = [ "pallet-xcm", "parachain-info", "parity-scale-codec", - "polkadot-parachain", + "polkadot-parachain-primitives", "polkadot-primitives", "polkadot-runtime", "polkadot-runtime-parachains", "scale-info", "session-keys-primitives", "sp-api", + "sp-authority-discovery", "sp-block-builder", "sp-consensus-aura", + "sp-consensus-babe", + "sp-consensus-grandpa", "sp-core", "sp-debug-derive", - "sp-finality-grandpa", "sp-inherents", "sp-io", "sp-offchain", "sp-runtime", "sp-session", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", "sp-transaction-pool", "sp-version", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", "substrate-fixed", "substrate-wasm-builder", "test-case", - "xcm", - "xcm-builder", "xcm-emulator", - "xcm-executor", "zeitgeist-primitives", "zrml-asset-router", "zrml-authorized", @@ -14514,11 +15068,31 @@ dependencies = [ "zrml-swaps-runtime-api", ] +[[package]] +name = "zerocopy" +version = "0.7.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.60", +] + [[package]] name = "zeroize" -version = "1.6.0" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a0956f1ba7c7909bfb66c2e9e4124ab6f6482560f6628b5aaeba39207c9aad9" +checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" dependencies = [ "zeroize_derive", ] @@ -14531,7 +15105,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.60", ] [[package]] @@ -14558,7 +15132,7 @@ dependencies = [ name = "zrml-authorized" version = "0.5.2" dependencies = [ - "env_logger 0.10.1", + "env_logger 0.10.2", "frame-benchmarking", "frame-support", "frame-system", @@ -14577,19 +15151,20 @@ name = "zrml-court" version = "0.5.2" dependencies = [ "arrayvec 0.7.4", - "env_logger 0.10.1", + "env_logger 0.10.2", "frame-benchmarking", "frame-support", "frame-system", + "log", "pallet-balances", - "pallet-randomness-collective-flip", + "pallet-insecure-randomness-collective-flip", "pallet-timestamp", "pallet-treasury", "parity-scale-codec", "rand 0.8.5", "rand_chacha 0.3.1", "scale-info", - "sp-arithmetic", + "sp-arithmetic 16.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", "sp-io", "sp-runtime", "test-case", @@ -14602,10 +15177,11 @@ dependencies = [ name = "zrml-global-disputes" version = "0.5.2" dependencies = [ - "env_logger 0.10.1", + "env_logger 0.10.2", "frame-benchmarking", "frame-support", "frame-system", + "log", "num-traits", "pallet-balances", "pallet-timestamp", @@ -14613,7 +15189,7 @@ dependencies = [ "scale-info", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", "test-case", "zeitgeist-primitives", "zrml-market-commons", @@ -14623,7 +15199,8 @@ dependencies = [ name = "zrml-hybrid-router" version = "0.5.2" dependencies = [ - "env_logger 0.10.1", + "cfg-if", + "env_logger 0.10.2", "frame-benchmarking", "frame-support", "frame-system", @@ -14633,7 +15210,7 @@ dependencies = [ "orml-traits", "pallet-assets", "pallet-balances", - "pallet-randomness-collective-flip", + "pallet-insecure-randomness-collective-flip", "pallet-timestamp", "pallet-treasury", "pallet-xcm", @@ -14642,9 +15219,9 @@ dependencies = [ "serde", "sp-io", "sp-runtime", + "staging-xcm", + "staging-xcm-builder", "test-case", - "xcm", - "xcm-builder", "zeitgeist-primitives", "zrml-asset-router", "zrml-authorized", @@ -14663,10 +15240,11 @@ dependencies = [ name = "zrml-liquidity-mining" version = "0.5.2" dependencies = [ - "env_logger 0.10.1", + "env_logger 0.10.2", "frame-benchmarking", "frame-support", "frame-system", + "log", "pallet-balances", "pallet-timestamp", "parity-scale-codec", @@ -14682,14 +15260,15 @@ dependencies = [ name = "zrml-market-commons" version = "0.5.2" dependencies = [ - "env_logger 0.10.1", + "env_logger 0.10.2", "frame-support", "frame-system", + "log", "pallet-balances", "pallet-timestamp", "parity-scale-codec", "scale-info", - "sp-arithmetic", + "sp-arithmetic 16.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", "sp-io", "sp-runtime", "test-case", @@ -14701,12 +15280,13 @@ name = "zrml-neo-swaps" version = "0.5.2" dependencies = [ "cfg-if", - "env_logger 0.10.1", + "env_logger 0.10.2", "fixed", "frame-benchmarking", "frame-support", "frame-system", "hydra-dx-math", + "log", "more-asserts", "orml-asset-registry", "orml-currencies", @@ -14714,7 +15294,7 @@ dependencies = [ "orml-traits", "pallet-assets", "pallet-balances", - "pallet-randomness-collective-flip", + "pallet-insecure-randomness-collective-flip", "pallet-timestamp", "pallet-treasury", "pallet-xcm", @@ -14724,10 +15304,10 @@ dependencies = [ "sp-api", "sp-io", "sp-runtime", + "staging-xcm", + "staging-xcm-builder", "test-case", - "typenum 1.16.0 (registry+https://github.com/rust-lang/crates.io-index)", - "xcm", - "xcm-builder", + "typenum", "zeitgeist-primitives", "zrml-asset-router", "zrml-authorized", @@ -14745,7 +15325,7 @@ dependencies = [ name = "zrml-orderbook" version = "0.5.2" dependencies = [ - "env_logger 0.10.1", + "env_logger 0.10.2", "frame-benchmarking", "frame-support", "frame-system", @@ -14783,10 +15363,11 @@ dependencies = [ name = "zrml-parimutuel" version = "0.5.2" dependencies = [ - "env_logger 0.10.1", + "env_logger 0.10.2", "frame-benchmarking", "frame-support", "frame-system", + "log", "orml-currencies", "orml-tokens", "orml-traits", @@ -14808,10 +15389,12 @@ dependencies = [ name = "zrml-prediction-markets" version = "0.5.2" dependencies = [ - "env_logger 0.10.1", + "cfg-if", + "env_logger 0.10.2", "frame-benchmarking", "frame-support", "frame-system", + "log", "more-asserts", "orml-asset-registry", "orml-currencies", @@ -14819,18 +15402,18 @@ dependencies = [ "orml-traits", "pallet-assets", "pallet-balances", - "pallet-randomness-collective-flip", + "pallet-insecure-randomness-collective-flip", "pallet-timestamp", "pallet-treasury", "parity-scale-codec", "scale-info", "serde", "sp-api", - "sp-arithmetic", + "sp-arithmetic 16.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", "sp-io", "sp-runtime", + "staging-xcm", "test-case", - "xcm", "zeitgeist-primitives", "zrml-asset-router", "zrml-authorized", @@ -14850,7 +15433,7 @@ dependencies = [ "arbitrary", "frame-support", "libfuzzer-sys", - "sp-arithmetic", + "sp-arithmetic 16.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", "zeitgeist-primitives", "zrml-prediction-markets", "zrml-simple-disputes", @@ -14871,10 +15454,10 @@ version = "0.5.2" dependencies = [ "arbitrary", "cfg-if", - "env_logger 0.10.1", + "env_logger 0.10.2", "frame-support", "frame-system", - "hashbrown 0.12.3", + "hashbrown 0.14.5", "pallet-balances", "pallet-timestamp", "parity-scale-codec", @@ -14903,7 +15486,7 @@ dependencies = [ name = "zrml-simple-disputes" version = "0.5.2" dependencies = [ - "env_logger 0.10.1", + "env_logger 0.10.2", "frame-benchmarking", "frame-support", "frame-system", @@ -14924,7 +15507,7 @@ dependencies = [ name = "zrml-styx" version = "0.5.2" dependencies = [ - "env_logger 0.10.1", + "env_logger 0.10.2", "frame-benchmarking", "frame-support", "frame-system", @@ -14941,7 +15524,7 @@ dependencies = [ name = "zrml-swaps" version = "0.5.2" dependencies = [ - "env_logger 0.10.1", + "env_logger 0.10.2", "frame-benchmarking", "frame-support", "frame-system", @@ -14955,7 +15538,7 @@ dependencies = [ "scale-info", "serde", "sp-api", - "sp-arithmetic", + "sp-arithmetic 16.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", "sp-io", "sp-runtime", "test-case", @@ -15000,7 +15583,7 @@ dependencies = [ "parity-scale-codec", "sp-api", "sp-runtime", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0)", "zeitgeist-primitives", ] @@ -15010,7 +15593,16 @@ version = "0.11.2+zstd.1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "20cc960326ece64f010d2d2107537f26dc589a6573a316bd5b1dba685fa5fde4" dependencies = [ - "zstd-safe", + "zstd-safe 5.0.2+zstd.1.5.2", +] + +[[package]] +name = "zstd" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a27595e173641171fc74a1232b7b1c7a7cb6e18222c11e9dfb9888fa424c53c" +dependencies = [ + "zstd-safe 6.0.6", ] [[package]] @@ -15023,13 +15615,22 @@ dependencies = [ "zstd-sys", ] +[[package]] +name = "zstd-safe" +version = "6.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee98ffd0b48ee95e6c5168188e44a54550b1564d9d530ee21d5f0eaed1069581" +dependencies = [ + "libc", + "zstd-sys", +] + [[package]] name = "zstd-sys" -version = "2.0.8+zstd.1.5.5" +version = "2.0.10+zstd.1.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5556e6ee25d32df2586c098bbfa278803692a20d0ab9565e049480d52707ec8c" +checksum = "c253a4914af5bafc8fa8c86ee400827e83cf6ec01195ec1f1ed8441bf00d65aa" dependencies = [ "cc", - "libc", "pkg-config", ] diff --git a/Cargo.toml b/Cargo.toml index 3f94c60a9..c8deb0325 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,3 +1,10 @@ +[workspace.package] +authors = ["Zeitgeist PM "] +edition = "2021" +homepage = "https://zeitgeist.pm/" +license = "GPL-3.0" +repository = "https://github.com/zeitgeistpm/zeitgeist" + [workspace] default-members = [ "macros", @@ -75,155 +82,165 @@ resolver = "2" # - "client" dependencies are only used in the client, and thus don't need to be no_std compatible. # Cumulus / Nimbus (client) -cumulus-client-cli = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.38" } -cumulus-client-collator = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.38" } -cumulus-client-consensus-common = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.38" } -cumulus-client-consensus-relay-chain = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.38" } -cumulus-client-network = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.38" } -cumulus-client-service = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.38" } -cumulus-primitives-parachain-inherent = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.38" } -cumulus-relay-chain-inprocess-interface = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.38" } -cumulus-relay-chain-interface = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.38" } -cumulus-relay-chain-minimal-node = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.38" } -cumulus-relay-chain-rpc-interface = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.38" } -nimbus-consensus = { git = "https://github.com/zeitgeistpm/nimbus", branch = "polkadot-v0.9.38-use-paritytech-dependencies" } +cumulus-client-cli = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +cumulus-client-collator = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +cumulus-client-consensus-common = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +cumulus-client-consensus-relay-chain = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +cumulus-client-network = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +cumulus-client-service = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +cumulus-primitives-parachain-inherent = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +cumulus-relay-chain-inprocess-interface = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +cumulus-relay-chain-interface = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +cumulus-relay-chain-minimal-node = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +cumulus-relay-chain-rpc-interface = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +nimbus-consensus = { git = "https://github.com/zeitgeistpm/moonkit", branch = "zeitgeist-polkadot-v1.1.0" } # Cumulus / Nimbus (wasm) -cumulus-pallet-dmp-queue = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.38", default-features = false } -cumulus-pallet-parachain-system = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.38", default-features = false } -cumulus-pallet-xcm = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.38", default-features = false } -cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.38", default-features = false } -cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.38", default-features = false } -cumulus-primitives-timestamp = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.38", default-features = false } -cumulus-primitives-utility = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.38", default-features = false } -nimbus-primitives = { git = "https://github.com/zeitgeistpm/nimbus", branch = "polkadot-v0.9.38-use-paritytech-dependencies", default-features = false } -pallet-author-inherent = { git = "https://github.com/zeitgeistpm/nimbus", branch = "polkadot-v0.9.38-use-paritytech-dependencies", default-features = false } -pallet-author-slot-filter = { git = "https://github.com/zeitgeistpm/nimbus", branch = "polkadot-v0.9.38-use-paritytech-dependencies", default-features = false } -parachain-info = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.38", default-features = false } +cumulus-pallet-dmp-queue = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +cumulus-pallet-parachain-system = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +cumulus-pallet-xcm = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +cumulus-primitives-core = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +cumulus-primitives-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +cumulus-primitives-utility = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +nimbus-primitives = { git = "https://github.com/zeitgeistpm/moonkit", branch = "zeitgeist-polkadot-v1.1.0", default-features = false } +pallet-author-inherent = { git = "https://github.com/zeitgeistpm/moonkit", branch = "zeitgeist-polkadot-v1.1.0", default-features = false } +pallet-author-mapping = { git = "https://github.com/zeitgeistpm/moonkit", branch = "zeitgeist-polkadot-v1.1.0", default-features = false } +pallet-author-slot-filter = { git = "https://github.com/zeitgeistpm/moonkit", branch = "zeitgeist-polkadot-v1.1.0", default-features = false } +parachain-info = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +session-keys-primitives = { git = "https://github.com/zeitgeistpm/moonkit", branch = "zeitgeist-polkadot-v1.1.0", default-features = false } + +# HydraDX (wasm) +hydra-dx-math = { git = "https://github.com/galacticcouncil/HydraDX-node", package = "hydra-dx-math", tag = "v25.0.0", default-features = false } # Moonbeam (client) -moonbeam-vrf = { git = "https://github.com/zeitgeistpm/moonbeam", branch = "polkadot-v0.9.38-use-paritytech-dependencies" } +moonbeam-vrf = { git = "https://github.com/zeitgeistpm/moonbeam", branch = "zeitgeist-polkadot-v1.1.0" } # Moonbeam (wasm) -pallet-author-mapping = { git = "https://github.com/zeitgeistpm/moonbeam", branch = "polkadot-v0.9.38-use-paritytech-dependencies", default-features = false } -pallet-parachain-staking = { git = "https://github.com/zeitgeistpm/moonbeam", branch = "polkadot-v0.9.38-use-paritytech-dependencies", default-features = false } -session-keys-primitives = { git = "https://github.com/zeitgeistpm/moonbeam", branch = "polkadot-v0.9.38-use-paritytech-dependencies", default-features = false } +pallet-parachain-staking = { git = "https://github.com/zeitgeistpm/moonbeam", branch = "zeitgeist-polkadot-v1.1.0", default-features = false } # ORML (wasm) -orml-asset-registry = { git = "https://github.com/open-web3-stack/open-runtime-module-library", branch = "polkadot-v0.9.38", default-features = false } -orml-benchmarking = { git = "https://github.com/open-web3-stack/open-runtime-module-library", branch = "polkadot-v0.9.38", default-features = false } -orml-currencies = { git = "https://github.com/open-web3-stack/open-runtime-module-library", branch = "polkadot-v0.9.38", default-features = false } -orml-tokens = { git = "https://github.com/open-web3-stack/open-runtime-module-library", branch = "polkadot-v0.9.38", default-features = false } -orml-traits = { git = "https://github.com/open-web3-stack/open-runtime-module-library", branch = "polkadot-v0.9.38", default-features = false } -orml-unknown-tokens = { git = "https://github.com/open-web3-stack/open-runtime-module-library", branch = "polkadot-v0.9.38", default-features = false } -orml-xcm-support = { git = "https://github.com/open-web3-stack/open-runtime-module-library", branch = "polkadot-v0.9.38", default-features = false } -orml-xtokens = { git = "https://github.com/open-web3-stack/open-runtime-module-library", branch = "polkadot-v0.9.38", default-features = false } +orml-asset-registry = { git = "https://github.com/open-web3-stack/open-runtime-module-library", branch = "polkadot-v1.1.0", default-features = false } +orml-benchmarking = { git = "https://github.com/open-web3-stack/open-runtime-module-library", branch = "polkadot-v1.1.0", default-features = false } +orml-currencies = { git = "https://github.com/open-web3-stack/open-runtime-module-library", branch = "polkadot-v1.1.0", default-features = false } +orml-tokens = { git = "https://github.com/open-web3-stack/open-runtime-module-library", branch = "polkadot-v1.1.0", default-features = false } +orml-traits = { git = "https://github.com/open-web3-stack/open-runtime-module-library", branch = "polkadot-v1.1.0", default-features = false } +orml-unknown-tokens = { git = "https://github.com/open-web3-stack/open-runtime-module-library", branch = "polkadot-v1.1.0", default-features = false } +orml-xcm-support = { git = "https://github.com/open-web3-stack/open-runtime-module-library", branch = "polkadot-v1.1.0", default-features = false } +orml-xtokens = { git = "https://github.com/open-web3-stack/open-runtime-module-library", branch = "polkadot-v1.1.0", default-features = false } # Substrate (client) -frame-benchmarking-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38" } -futures = { version = "0.3.21" } -pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38" } -sc-basic-authorship = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38" } -sc-chain-spec = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38" } -sc-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38" } -sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38" } -sc-client-db = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38" } -sc-consensus = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38" } -sc-consensus-aura = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38" } -sc-executor = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38" } -sc-finality-grandpa = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38" } -sc-keystore = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38" } -sc-network = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38" } -sc-network-common = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38" } -sc-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38" } -sc-rpc-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38" } -sc-service = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38" } -sc-storage-monitor = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38" } -sc-sysinfo = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38" } -sc-telemetry = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38" } -sc-tracing = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38" } -sc-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38" } -sc-transaction-pool-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38" } -sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38" } -sp-consensus = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38" } -sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38" } -sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38" } -sp-storage = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38" } -sp-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38" } -sp-trie = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38" } -substrate-build-script-utils = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38" } -substrate-frame-rpc-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38" } -substrate-prometheus-endpoint = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38" } -substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38" } -try-runtime-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38" } -xcm-emulator = { rev = "92d371839f6d5c52dd35b7e3d61cbdefc792cc42", git = "https://github.com/shaunxw/xcm-simulator" } +frame-benchmarking-cli = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sc-basic-authorship = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sc-chain-spec = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sc-cli = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sc-client-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sc-client-db = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sc-consensus = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sc-consensus-aura = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sc-consensus-grandpa = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sc-executor = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sc-keystore = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sc-network = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sc-network-statement = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sc-network-sync = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sc-offchain = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sc-rpc = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sc-rpc-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sc-service = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sc-storage-monitor = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sc-sysinfo = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sc-telemetry = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sc-tracing = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sc-transaction-pool = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sc-transaction-pool-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sp-blockchain = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sp-consensus = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sp-keyring = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sp-keystore = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sp-storage = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sp-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sp-trie = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +substrate-build-script-utils = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +substrate-frame-rpc-system = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +substrate-prometheus-endpoint = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +substrate-wasm-builder = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +try-runtime-cli = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } # Substrate (wasm) -frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38", default-features = false } -frame-executive = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38", default-features = false } -frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38", default-features = false } -frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38", default-features = false } -frame-system-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38", default-features = false } -frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38", default-features = false } -frame-try-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38", default-features = false } -pallet-asset-tx-payment = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38", default-features = false } -pallet-assets = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38", default-features = false } -pallet-aura = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38", default-features = false } -pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38", default-features = false } -pallet-bounties = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38", default-features = false } -pallet-collective = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38", default-features = false } -pallet-contracts = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38", default-features = false } -pallet-contracts-primitives = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38", default-features = false } -pallet-democracy = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38", default-features = false } -pallet-grandpa = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38", default-features = false } -pallet-identity = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38", default-features = false } -pallet-membership = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38", default-features = false } -pallet-multisig = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38", default-features = false } -pallet-preimage = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38", default-features = false } -pallet-proxy = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38", default-features = false } -pallet-randomness-collective-flip = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38", default-features = false } -pallet-scheduler = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38", default-features = false } -pallet-sudo = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38", default-features = false } -pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38", default-features = false } -pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38", default-features = false } -pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38", default-features = false } -pallet-treasury = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38", default-features = false } -pallet-utility = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38", default-features = false } -pallet-vesting = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38", default-features = false } -parity-scale-codec = { version = "3.2.2", default-features = false } -scale-info = { version = "2.3.1", default-features = false } -sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38", default-features = false } -sp-arithmetic = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38", default-features = false } -sp-block-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38", default-features = false } -sp-consensus-aura = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38", default-features = false } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38", default-features = false } -sp-debug-derive = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38", default-features = false } -sp-finality-grandpa = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38", default-features = false } -sp-inherents = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38", default-features = false } -sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38", default-features = false } -sp-offchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38", default-features = false } -sp-session = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38", default-features = false } -sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38", default-features = false } -sp-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38", default-features = false } -sp-version = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38", default-features = false } +frame-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +frame-executive = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +frame-support = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +frame-system = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +frame-system-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +frame-try-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +pallet-asset-tx-payment = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +pallet-assets = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +pallet-aura = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +pallet-balances = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +pallet-bounties = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +pallet-collective = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +pallet-contracts = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +pallet-contracts-primitives = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +pallet-democracy = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +pallet-grandpa = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +pallet-identity = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +pallet-im-online = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +pallet-insecure-randomness-collective-flip = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +pallet-membership = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +pallet-multisig = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +pallet-preimage = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +pallet-proxy = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +pallet-scheduler = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +pallet-sudo = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +pallet-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +pallet-transaction-payment = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +pallet-treasury = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +pallet-utility = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +pallet-vesting = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +parity-scale-codec = { version = "3.6.9", default-features = false } +scale-info = { version = "2.11.1", default-features = false } +sp-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +sp-arithmetic = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +sp-authority-discovery = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +sp-block-builder = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +sp-consensus-aura = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +sp-consensus-babe = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +sp-consensus-beefy = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +sp-consensus-grandpa = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +sp-core = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +sp-debug-derive = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +sp-inherents = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +sp-io = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +sp-offchain = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +sp-session = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +sp-std = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +sp-transaction-pool = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +sp-version = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } substrate-fixed = { git = "https://github.com/encointer/substrate-fixed", default-features = false } # Polkadot / XCM (client) -polkadot-cli = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.38" } -polkadot-service = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.38" } -polkadot-test-service = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.38" } +polkadot-cli = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +polkadot-service = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +polkadot-test-service = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +xcm-emulator = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } # Polkadot / XCM (wasm) -pallet-xcm = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.38", default-features = false } -polkadot-parachain = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.38", default-features = false } -polkadot-primitives = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.38", default-features = false } -polkadot-runtime = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.38", default-features = false } -polkadot-runtime-parachains = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.38", default-features = false } -rococo-runtime = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.38", default-features = false } -xcm = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.38", default-features = false } -xcm-builder = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.38", default-features = false } -xcm-executor = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.38", default-features = false } +pallet-message-queue = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +pallet-xcm = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +polkadot-parachain-primitives = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +polkadot-primitives = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +polkadot-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +polkadot-runtime-parachains = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +rococo-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +rococo-runtime-constants = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +xcm = { package = "staging-xcm", git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +xcm-builder = { package = "staging-xcm-builder", git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } +xcm-executor = { package = "staging-xcm-executor", git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } # Zeitgeist (client) battery-station-runtime = { path = "runtime/battery-station" } @@ -256,31 +273,30 @@ zrml-swaps = { path = "zrml/swaps", default-features = false } zrml-swaps-runtime-api = { path = "zrml/swaps/runtime-api", default-features = false } # Other (client) -clap = "4.0.32" +clap = "4.5.4" env_logger = "0.10.1" -jsonrpsee = "0.16.2" +futures = "0.3.30" +jsonrpsee = "0.16.3" libfuzzer-sys = "0.4.7" more-asserts = "0.3.1" -test-case = "3.1.0" -url = "2.2.2" +test-case = "3.3.1" +url = "2.5.0" # Other (wasm) -arbitrary = { version = "1.3.0", default-features = false } +arbitrary = { version = "1.3.2", default-features = false } arrayvec = { version = "0.7.4", default-features = false } cfg-if = { version = "1.0.0" } fixed = { version = "=1.15.0", default-features = false, features = ["num-traits"] } impl-trait-for-tuples = { version = "0.2.2" } -# Using math code directly from the HydraDX node repository as https://github.com/galacticcouncil/hydradx-math is outdated and has been archived in May 2023. -hydra-dx-math = { git = "https://github.com/galacticcouncil/HydraDX-node", package = "hydra-dx-math", tag = "v21.1.1", default-features = false } # Hashbrown works in no_std by default and default features are used in Rikiddo -hashbrown = { version = "0.12.3", default-features = true } -hex-literal = { version = "0.3.4", default-features = false } -log = { version = "0.4.17", default-features = false } -num-traits = { version = "0.2.15", default-features = false } +hashbrown = { version = "0.14.3", default-features = true } +hex-literal = { version = "0.4.1", default-features = false } +log = { version = "0.4.21", default-features = false } +num-traits = { version = "0.2.18", default-features = false } rand = { version = "0.8.5", default-features = false } rand_chacha = { version = "0.3.1", default-features = false } -serde = { version = "1.0.152", default-features = false } -typenum = { version = "1.15.0", default-features = false } +serde = { version = "1.0.198", default-features = false } +typenum = { version = "1.17.0", default-features = false } [profile.dev.package] blake2 = { opt-level = 3 } @@ -338,47 +354,17 @@ opt-level = 3 # Zeitgeist runtime requires unwinding. panic = "unwind" -[patch."https://github.com/paritytech/substrate"] +[patch."https://github.com/paritytech/polkadot-sdk"] # pallet-asset adjustments (managed asset destruction) -pallet-assets = { git = "https://github.com/zeitgeistpm/substrate.git", branch = "polkadot-v0.9.38-zeitgeist-adjustments" } - -# fix that allow to build with recent rustc -substrate-wasm-builder = { git = "https://github.com/zeitgeistpm/substrate.git", branch = "polkadot-v0.9.38-zeitgeist-adjustments" } - -# increase wasm instance limit (otherwise benchmarks fail) -sc-allocator = { git = "https://github.com/zeitgeistpm/substrate.git", branch = "polkadot-v0.9.38-zeitgeist-adjustments" } -sc-executor-common = { git = "https://github.com/zeitgeistpm/substrate.git", branch = "polkadot-v0.9.38-zeitgeist-adjustments" } -sc-executor-wasmtime = { git = "https://github.com/zeitgeistpm/substrate.git", branch = "polkadot-v0.9.38-zeitgeist-adjustments" } -sp-core = { git = "https://github.com/zeitgeistpm/substrate.git", branch = "polkadot-v0.9.38-zeitgeist-adjustments" } -sp-core-hashing-proc-macro = { git = "https://github.com/zeitgeistpm/substrate.git", branch = "polkadot-v0.9.38-zeitgeist-adjustments" } -sp-debug-derive = { git = "https://github.com/zeitgeistpm/substrate.git", branch = "polkadot-v0.9.38-zeitgeist-adjustments" } -sp-externalities = { git = "https://github.com/zeitgeistpm/substrate.git", branch = "polkadot-v0.9.38-zeitgeist-adjustments" } -sp-maybe-compressed-blob = { git = "https://github.com/zeitgeistpm/substrate.git", branch = "polkadot-v0.9.38-zeitgeist-adjustments" } -sp-runtime-interface = { git = "https://github.com/zeitgeistpm/substrate.git", branch = "polkadot-v0.9.38-zeitgeist-adjustments" } -sp-std = { git = "https://github.com/zeitgeistpm/substrate.git", branch = "polkadot-v0.9.38-zeitgeist-adjustments" } -sp-storage = { git = "https://github.com/zeitgeistpm/substrate.git", branch = "polkadot-v0.9.38-zeitgeist-adjustments" } -sp-tracing = { git = "https://github.com/zeitgeistpm/substrate.git", branch = "polkadot-v0.9.38-zeitgeist-adjustments" } -sp-wasm-interface = { git = "https://github.com/zeitgeistpm/substrate.git", branch = "polkadot-v0.9.38-zeitgeist-adjustments" } +# Commits: +# - cb803be8cdc52d020890308a2076d752a8c4ce5c +pallet-assets = { git = "https://github.com/zeitgeistpm/polkadot-sdk", branch = "zeitgeist-polkadot-v1.1.0" } +# xcm-emulator incompatible block number type fixed +# Commits: +# - +xcm-emulator = { git = "https://github.com/zeitgeistpm/polkadot-sdk", branch = "release-polkadot-v1.1.0-xcm-emulator-type-fix" } -[patch."https://github.com/paritytech/polkadot"] -pallet-xcm = { git = "https://github.com/zeitgeistpm/polkadot.git", branch = "v0.9.38-recent-bootnodes" } -polkadot-cli = { git = "https://github.com/zeitgeistpm/polkadot.git", branch = "v0.9.38-recent-bootnodes" } -polkadot-client = { git = "https://github.com/zeitgeistpm/polkadot.git", branch = "v0.9.38-recent-bootnodes" } -polkadot-core-primitives = { git = "https://github.com/zeitgeistpm/polkadot.git", branch = "v0.9.38-recent-bootnodes" } -polkadot-node-core-av-store = { git = "https://github.com/zeitgeistpm/polkadot.git", branch = "v0.9.38-recent-bootnodes" } -polkadot-node-network-protocol = { git = "https://github.com/zeitgeistpm/polkadot.git", branch = "v0.9.38-recent-bootnodes" } -polkadot-node-primitives = { git = "https://github.com/zeitgeistpm/polkadot.git", branch = "v0.9.38-recent-bootnodes" } -polkadot-node-subsystem = { git = "https://github.com/zeitgeistpm/polkadot.git", branch = "v0.9.38-recent-bootnodes" } -polkadot-node-subsystem-util = { git = "https://github.com/zeitgeistpm/polkadot.git", branch = "v0.9.38-recent-bootnodes" } -polkadot-overseer = { git = "https://github.com/zeitgeistpm/polkadot.git", branch = "v0.9.38-recent-bootnodes" } -polkadot-parachain = { git = "https://github.com/zeitgeistpm/polkadot.git", branch = "v0.9.38-recent-bootnodes" } -polkadot-primitives = { git = "https://github.com/zeitgeistpm/polkadot.git", branch = "v0.9.38-recent-bootnodes" } -polkadot-runtime = { git = "https://github.com/zeitgeistpm/polkadot.git", branch = "v0.9.38-recent-bootnodes" } -polkadot-runtime-common = { git = "https://github.com/zeitgeistpm/polkadot.git", branch = "v0.9.38-recent-bootnodes" } -polkadot-runtime-parachains = { git = "https://github.com/zeitgeistpm/polkadot.git", branch = "v0.9.38-recent-bootnodes" } -polkadot-service = { git = "https://github.com/zeitgeistpm/polkadot.git", branch = "v0.9.38-recent-bootnodes" } -polkadot-test-service = { git = "https://github.com/zeitgeistpm/polkadot.git", branch = "v0.9.38-recent-bootnodes" } -rococo-runtime = { git = "https://github.com/zeitgeistpm/polkadot.git", branch = "v0.9.38-recent-bootnodes" } -xcm = { git = "https://github.com/zeitgeistpm/polkadot.git", branch = "v0.9.38-recent-bootnodes" } -xcm-builder = { git = "https://github.com/zeitgeistpm/polkadot.git", branch = "v0.9.38-recent-bootnodes" } -xcm-executor = { git = "https://github.com/zeitgeistpm/polkadot.git", branch = "v0.9.38-recent-bootnodes" } +[patch."https://github.com/galacticcouncil/HydraDX-node"] +# Ensure same Substrate dependencies are used everywhere +sp-arithmetic = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } +sp-std = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } diff --git a/Makefile b/Makefile index 537b0b49c..feb781af6 100644 --- a/Makefile +++ b/Makefile @@ -16,32 +16,27 @@ check-dummy: BUILD_DUMMY_WASM_BINARY= cargo check # Pseudo private target is invoked by public targets for different chains ---try-runtime: - RUST_LOG=runtime=trace,try-runtime::cli=trace,executor=trace \ - cargo run \ - --bin=zeitgeist \ - --features=parachain,try-runtime \ - try-runtime \ - --chain=${TRYRUNTIME_CHAIN} \ - --runtime=${RUNTIME_PATH} \ - on-runtime-upgrade \ - --checks=all \ - live \ - --uri=${TRYRUNTIME_URL} +--execute-try-runtime: + RUST_LOG=runtime=trace,try-runtime::cli=trace,executor=info \ + cargo build --release --features=parachain,try-runtime,force-debug + try-runtime \ + --runtime=${RUNTIME_PATH} \ + on-runtime-upgrade \ + --checks=all \ + live \ + --uri=${TRYRUNTIME_URL} try-runtime-upgrade-battery-station: - @$(MAKE) TRYRUNTIME_CHAIN="battery_station_staging" \ - TRYRUNTIME_URL="wss://bsr.zeitgeist.pm:443" \ - RUNTIME_PATH="./target/debug/wbuild/battery-station-runtime/battery_station_runtime.compact.compressed.wasm" \ - -- \ - --try-runtime + @$(MAKE) TRYRUNTIME_URL="wss://bsr.zeitgeist.pm:443" \ + RUNTIME_PATH="./target/release/wbuild/battery-station-runtime/battery_station_runtime.compact.compressed.wasm" \ + -- \ + --execute-try-runtime try-runtime-upgrade-zeitgeist: - @$(MAKE) TRYRUNTIME_CHAIN="zeitgeist_staging" \ - TRYRUNTIME_URL="wss://zeitgeist-rpc.dwellir.com:443" \ - RUNTIME_PATH="./target/debug/wbuild/zeitgeist-runtime/zeitgeist_runtime.compact.compressed.wasm" \ - -- \ - --try-runtime + @$(MAKE) TRYRUNTIME_URL="wss://zeitgeist-rpc.dwellir.com:443" \ + RUNTIME_PATH="./target/release/wbuild/zeitgeist-runtime/zeitgeist_runtime.compact.compressed.wasm" \ + -- \ + -execute--try-runtime build: SKIP_WASM_BUILD= cargo build diff --git a/macros/Cargo.toml b/macros/Cargo.toml index 39397744a..903bd3b33 100644 --- a/macros/Cargo.toml +++ b/macros/Cargo.toml @@ -1,5 +1,5 @@ [package] authors = ["Zeitgeist PM "] -edition = "2021" +edition.workspace = true name = "zeitgeist-macros" version = "0.5.2" diff --git a/node/Cargo.toml b/node/Cargo.toml index 1b81fe5ef..22907791d 100644 --- a/node/Cargo.toml +++ b/node/Cargo.toml @@ -17,6 +17,9 @@ sc-client-db = { workspace = true } sc-consensus = { workspace = true } sc-executor = { workspace = true } sc-keystore = { workspace = true } +sc-network = { workspace = true } +sc-network-statement = { workspace = true } +sc-offchain = { workspace = true } sc-rpc = { workspace = true } sc-rpc-api = { workspace = true } sc-service = { workspace = true } @@ -75,8 +78,7 @@ pallet-author-inherent = { workspace = true, features = ["default"], optional = pallet-parachain-staking = { workspace = true, features = ["default"], optional = true } parity-scale-codec = { workspace = true, features = ["default"], optional = true } sc-chain-spec = { workspace = true, optional = true } -sc-network = { workspace = true, optional = true } -sc-network-common = { workspace = true, optional = true } +sc-network-sync = { workspace = true, optional = true } sc-tracing = { workspace = true, optional = true } serde = { workspace = true, features = ["default"], optional = true } session-keys-primitives = { workspace = true, features = ["default"], optional = true } @@ -86,7 +88,7 @@ substrate-prometheus-endpoint = { workspace = true, optional = true } # Polkadot polkadot-cli = { workspace = true, optional = true } -polkadot-parachain = { workspace = true, features = ["default"], optional = true } +polkadot-parachain-primitives = { workspace = true, features = ["default"], optional = true } polkadot-primitives = { workspace = true, features = ["default"], optional = true } polkadot-service = { workspace = true, optional = true } polkadot-test-service = { workspace = true, optional = true } @@ -94,9 +96,9 @@ polkadot-test-service = { workspace = true, optional = true } # Standalone sc-consensus-aura = { workspace = true } -sc-finality-grandpa = { workspace = true } +sc-consensus-grandpa = { workspace = true } sp-consensus-aura = { workspace = true } -sp-finality-grandpa = { workspace = true, features = ["default"] } +sp-consensus-grandpa = { workspace = true, features = ["default"] } # Utility cfg-if = { workspace = true } @@ -148,8 +150,7 @@ parachain = [ "parity-scale-codec", "session-keys-primitives", "sc-chain-spec", - "sc-network", - "sc-network-common", + "sc-network-sync", "sc-tracing", "serde", "sp-keystore", @@ -158,7 +159,7 @@ parachain = [ # Polkadot "polkadot-cli", - "polkadot-parachain", + "polkadot-parachain-primitives", "polkadot-primitives", "polkadot-service", "polkadot-test-service", @@ -184,7 +185,7 @@ with-zeitgeist-runtime = ["zeitgeist-runtime"] authors = ["Zeitgeist PM "] build = "build.rs" description = "An evolving blockchain for prediction markets and futarchy." -edition = "2021" +edition.workspace = true homepage = "https://zeitgeist.pm" name = "zeitgeist-node" version = "0.5.2" diff --git a/node/src/chain_spec/additional_chain_spec.rs b/node/src/chain_spec/additional_chain_spec.rs index b7d39e7ae..002e94dd8 100644 --- a/node/src/chain_spec/additional_chain_spec.rs +++ b/node/src/chain_spec/additional_chain_spec.rs @@ -1,4 +1,4 @@ -// Copyright 2022-2023 Forecasting Technologies LTD. +// Copyright 2022-2024 Forecasting Technologies LTD. // Copyright 2021-2022 Zeitgeist PM LLC. // // This file is part of Zeitgeist. @@ -40,5 +40,5 @@ pub struct AdditionalChainSpec { #[cfg(not(feature = "parachain"))] pub struct AdditionalChainSpec { pub initial_authorities: - Vec<(sp_consensus_aura::sr25519::AuthorityId, sp_finality_grandpa::AuthorityId)>, + Vec<(sp_consensus_aura::sr25519::AuthorityId, sp_consensus_grandpa::AuthorityId)>, } diff --git a/node/src/chain_spec/battery_station.rs b/node/src/chain_spec/battery_station.rs index 058222791..9d8a2e8f1 100644 --- a/node/src/chain_spec/battery_station.rs +++ b/node/src/chain_spec/battery_station.rs @@ -1,4 +1,4 @@ -// Copyright 2022-2023 Forecasting Technologies LTD. +// Copyright 2022-2024 Forecasting Technologies LTD. // Copyright 2021-2022 Zeitgeist PM LLC. // // This file is part of Zeitgeist. @@ -48,10 +48,10 @@ cfg_if::cfg_if! { pub(super) const DEFAULT_STAKING_AMOUNT_BATTERY_STATION: u128 = 2_000 * BASE; const DEFAULT_COLLATOR_BALANCE_BATTERY_STATION: Option = DEFAULT_STAKING_AMOUNT_BATTERY_STATION.checked_add(CollatorDeposit::get()); - pub type BatteryStationChainSpec = sc_service::GenericChainSpec; + pub type BatteryStationChainSpec = sc_service::GenericChainSpec; const NUM_SELECTED_CANDIDATES: u32 = 8; } else { - pub type BatteryStationChainSpec = sc_service::GenericChainSpec; + pub type BatteryStationChainSpec = sc_service::GenericChainSpec; } } diff --git a/node/src/chain_spec/dev.rs b/node/src/chain_spec/dev.rs index 75782f73b..4acb1d5eb 100644 --- a/node/src/chain_spec/dev.rs +++ b/node/src/chain_spec/dev.rs @@ -1,4 +1,4 @@ -// Copyright 2022-2023 Forecasting Technologies LTD. +// Copyright 2022-2024 Forecasting Technologies LTD. // Copyright 2021-2022 Zeitgeist PM LLC. // // This file is part of Zeitgeist. @@ -49,10 +49,10 @@ const INITIAL_BALANCE: Balance = Balance::MAX >> 4; #[cfg(not(feature = "parachain"))] fn authority_keys_from_seed( s: &str, -) -> (sp_consensus_aura::sr25519::AuthorityId, sp_finality_grandpa::AuthorityId) { +) -> (sp_consensus_aura::sr25519::AuthorityId, sp_consensus_grandpa::AuthorityId) { ( get_from_seed::(s), - get_from_seed::(s), + get_from_seed::(s), ) } diff --git a/node/src/chain_spec/mod.rs b/node/src/chain_spec/mod.rs index 4d9849948..28a40c705 100644 --- a/node/src/chain_spec/mod.rs +++ b/node/src/chain_spec/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2022-2023 Forecasting Technologies LTD. +// Copyright 2022-2024 Forecasting Technologies LTD. // Copyright 2021-2022 Zeitgeist PM LLC. // // This file is part of Zeitgeist. @@ -108,8 +108,8 @@ macro_rules! generate_generic_genesis_function { acs: AdditionalChainSpec, endowed_accounts: Vec, wasm_binary: &[u8], - ) -> $runtime::GenesisConfig { - $runtime::GenesisConfig { + ) -> $runtime::RuntimeGenesisConfig { + $runtime::RuntimeGenesisConfig { // Common genesis advisory_committee: Default::default(), advisory_committee_membership: $runtime::AdvisoryCommitteeMembershipConfig { @@ -125,6 +125,7 @@ macro_rules! generate_generic_genesis_function { #[cfg(feature = "parachain")] author_filter: $runtime::AuthorFilterConfig { eligible_count: EligibilityValue::new_unchecked(1), + ..Default::default() }, #[cfg(feature = "parachain")] author_mapping: $runtime::AuthorMappingConfig { @@ -147,13 +148,17 @@ macro_rules! generate_generic_genesis_function { #[cfg(not(feature = "parachain"))] grandpa: $runtime::GrandpaConfig { authorities: acs.initial_authorities.iter().map(|x| (x.1.clone(), 1)).collect(), + ..Default::default() }, liquidity_mining: $runtime::LiquidityMiningConfig { initial_balance: LIQUIDITY_MINING, per_block_distribution: LIQUIDITY_MINING_PTD.mul_ceil(LIQUIDITY_MINING), }, #[cfg(feature = "parachain")] - parachain_info: $runtime::ParachainInfoConfig { parachain_id: acs.parachain_id }, + parachain_info: $runtime::ParachainInfoConfig { + parachain_id: acs.parachain_id, + ..Default::default() + }, #[cfg(feature = "parachain")] parachain_staking: $runtime::ParachainStakingConfig { blocks_per_round: acs.blocks_per_round, @@ -174,7 +179,7 @@ macro_rules! generate_generic_genesis_function { #[cfg(feature = "parachain")] // Default should use the pallet configuration polkadot_xcm: PolkadotXcmConfig::default(), - system: $runtime::SystemConfig { code: wasm_binary.to_vec() }, + system: $runtime::SystemConfig { code: wasm_binary.to_vec(), ..Default::default() }, technical_committee: Default::default(), technical_committee_membership: $runtime::TechnicalCommitteeMembershipConfig { members: vec![].try_into().unwrap(), @@ -230,7 +235,7 @@ pub struct Extensions { /// The relay chain of the Parachain. pub relay_chain: String, /// Known bad block hashes. - pub bad_blocks: sc_client_api::BadBlocks, + pub bad_blocks: sc_client_api::BadBlocks, } #[cfg(feature = "parachain")] diff --git a/node/src/chain_spec/zeitgeist.rs b/node/src/chain_spec/zeitgeist.rs index c98d38a26..6d056113b 100644 --- a/node/src/chain_spec/zeitgeist.rs +++ b/node/src/chain_spec/zeitgeist.rs @@ -1,4 +1,4 @@ -// Copyright 2022-2023 Forecasting Technologies LTD. +// Copyright 2022-2024 Forecasting Technologies LTD. // Copyright 2021-2022 Zeitgeist PM LLC. // // This file is part of Zeitgeist. @@ -36,19 +36,19 @@ use { zeitgeist_primitives::constants::ztg::{STAKING_PTD, TOTAL_INITIAL_ZTG}, zeitgeist_runtime::{ CollatorDeposit, DefaultBlocksPerRound, DefaultCollatorCommission, - DefaultParachainBondReservePercent, EligibilityValue, MinCollatorStk, PolkadotXcmConfig, + DefaultParachainBondReservePercent, EligibilityValue, MinCandidateStk, PolkadotXcmConfig, }, }; cfg_if::cfg_if! { if #[cfg(feature = "parachain")] { - const DEFAULT_STAKING_AMOUNT_ZEITGEIST: u128 = MinCollatorStk::get(); + const DEFAULT_STAKING_AMOUNT_ZEITGEIST: u128 = MinCandidateStk::get(); const DEFAULT_COLLATOR_BALANCE_ZEITGEIST: Option = DEFAULT_STAKING_AMOUNT_ZEITGEIST.checked_add(CollatorDeposit::get()); const NUM_SELECTED_CANDIDATES: u32 = 8; - pub type ZeitgeistChainSpec = sc_service::GenericChainSpec; + pub type ZeitgeistChainSpec = sc_service::GenericChainSpec; } else { - pub type ZeitgeistChainSpec = sc_service::GenericChainSpec; + pub type ZeitgeistChainSpec = sc_service::GenericChainSpec; } } diff --git a/node/src/cli.rs b/node/src/cli.rs index 31c9dffda..299e80c21 100644 --- a/node/src/cli.rs +++ b/node/src/cli.rs @@ -20,22 +20,15 @@ #[cfg(feature = "parachain")] mod cli_parachain; -use super::service::{ - AdditionalRuntimeApiCollection, FullBackend, FullClient, IdentifyVariant, RuntimeApiCollection, -}; +use super::service::{FullBackend, FullClient, IdentifyVariant}; use clap::Parser; #[cfg(feature = "parachain")] pub use cli_parachain::RelayChainCli; -use sc_cli::{ChainSpec, RuntimeVersion, SubstrateCli}; -use sc_client_api::{Backend as BackendT, BlockchainEvents, KeyIterator}; -use sp_api::{CallApiAt, NumberFor, ProvideRuntimeApi}; -use sp_blockchain::HeaderBackend; +use sc_cli::{ChainSpec, SubstrateCli}; +use sc_client_api::{KeysIter, PairsIter}; +use sp_api::NumberFor; use sp_consensus::BlockStatus; -use sp_runtime::{ - generic::SignedBlock, - traits::{BlakeTwo256, Block as BlockT}, - Justifications, -}; +use sp_runtime::{generic::SignedBlock, traits::Block as BlockT, Justifications}; use sp_storage::{ChildInfo, StorageData, StorageKey}; use std::sync::Arc; use zeitgeist_primitives::types::{Block, Header}; @@ -115,6 +108,7 @@ pub fn load_spec(id: &str) -> Result, String> { } #[derive(Debug, clap::Subcommand)] +#[allow(clippy::large_enum_variant)] pub enum Subcommand { /// The custom benchmark subcommmand benchmarking runtime pallets. #[clap(subcommand)] @@ -166,11 +160,6 @@ pub enum Subcommand { Revert(sc_cli::RevertCmd), /// Try some command against runtime state. - #[cfg(feature = "try-runtime")] - TryRuntime(try_runtime_cli::TryRuntimeCmd), - - /// Try some command against runtime state. Note: `try-runtime` feature must be enabled. - #[cfg(not(feature = "try-runtime"))] TryRuntime, } @@ -212,6 +201,21 @@ pub struct Cli { pub storage_monitor: sc_storage_monitor::StorageMonitorParams, } +#[cfg(feature = "parachain")] +impl Cli { + #[allow(clippy::borrowed_box)] + pub(crate) fn runtime_version(spec: &Box) -> sc_cli::RuntimeVersion { + match spec { + #[cfg(feature = "with-zeitgeist-runtime")] + spec if spec.is_zeitgeist() => zeitgeist_runtime::VERSION, + #[cfg(feature = "with-battery-station-runtime")] + _ => battery_station_runtime::VERSION, + #[cfg(not(feature = "with-battery-station-runtime"))] + _ => panic!("{}", crate::BATTERY_STATION_RUNTIME_NOT_AVAILABLE), + } + } +} + impl SubstrateCli for Cli { fn author() -> String { env!("CARGO_PKG_AUTHORS").into() @@ -237,105 +241,11 @@ impl SubstrateCli for Cli { load_spec(id) } - fn native_runtime_version(spec: &Box) -> &'static RuntimeVersion { - match spec { - spec if spec.is_zeitgeist() => { - #[cfg(feature = "with-zeitgeist-runtime")] - return &zeitgeist_runtime::VERSION; - #[cfg(not(feature = "with-zeitgeist-runtime"))] - panic!("{}", crate::ZEITGEIST_RUNTIME_NOT_AVAILABLE); - } - _spec => { - #[cfg(feature = "with-battery-station-runtime")] - return &battery_station_runtime::VERSION; - #[cfg(not(feature = "with-battery-station-runtime"))] - panic!("{}", crate::BATTERY_STATION_RUNTIME_NOT_AVAILABLE); - } - } - } - fn support_url() -> String { SUPPORT_URL.into() } } -/// Config that abstracts over all available client implementations. -/// -/// For a concrete type there exists [`Client`]. -pub trait AbstractClient: - BlockchainEvents - + Sized - + Send - + Sync - + ProvideRuntimeApi - + HeaderBackend - + CallApiAt -where - Block: BlockT, - Backend: BackendT, - Backend::State: sp_api::StateBackend, - Self::Api: RuntimeApiCollection - + AdditionalRuntimeApiCollection, -{ -} - -impl AbstractClient for Client -where - Block: BlockT, - Backend: BackendT, - Backend::State: sp_api::StateBackend, - Client: BlockchainEvents - + ProvideRuntimeApi - + HeaderBackend - + Sized - + Send - + Sync - + CallApiAt, - Client::Api: RuntimeApiCollection - + AdditionalRuntimeApiCollection, -{ -} - -/// Execute something with the client instance. -/// -/// As there exist multiple chains inside Zeitgeist, like Zeitgeist itself, -/// Battery Station etc., there can exist different kinds of client types. As these -/// client types differ in the generics that are being used, we can not easily -/// return them from a function. For returning them from a function there exists -/// [`Client`]. However, the problem on how to use this client instance still -/// exists. This trait "solves" it in a dirty way. It requires a type to -/// implement this trait and than the [`execute_with_client`](ExecuteWithClient::execute_with_client) -/// function can be called with any possible client -/// instance. -/// -/// In a perfect world, we could make a closure work in this way. -pub trait ExecuteWithClient { - /// The return type when calling this instance. - type Output; - - /// Execute whatever should be executed with the given client instance. - fn execute_with_client(self, client: Arc) -> Self::Output - where - >::StateBackend: sp_api::StateBackend, - Backend: sc_client_api::Backend, - Backend::State: sp_api::StateBackend, - Api: RuntimeApiCollection - + AdditionalRuntimeApiCollection, - Client: AbstractClient + 'static; -} - -/// A handle to a Zeitgeist client instance. -/// -/// The Zeitgeist service supports multiple different runtimes (Zeitgeist, Battery -/// Station, etc.). As each runtime has a specialized client, we need to hide them -/// behind a trait. This is this trait. -/// -/// When wanting to work with the inner client, you need to use `execute_with`. -pub trait ClientHandle { - /// Execute the given something with the client. - fn execute_with(&self, t: T) -> T::Output; -} - /// A client instance of Zeitgeist. #[derive(Clone)] pub enum Client { @@ -359,21 +269,6 @@ impl From>> for Client { } } -impl ClientHandle for Client { - fn execute_with(&self, t: T) -> T::Output { - match self { - #[cfg(feature = "with-battery-station-runtime")] - Self::BatteryStation(client) => { - T::execute_with_client::<_, _, FullBackend>(t, client.clone()) - } - #[cfg(feature = "with-zeitgeist-runtime")] - Self::Zeitgeist(client) => { - T::execute_with_client::<_, _, FullBackend>(t, client.clone()) - } - } - } -} - macro_rules! match_client { ($self:ident, $method:ident($($param:ident),*)) => { match $self { @@ -459,14 +354,6 @@ impl sc_client_api::StorageProvider for Client { match_client!(self, storage(hash, key)) } - fn storage_keys( - &self, - hash: ::Hash, - key_prefix: &StorageKey, - ) -> sp_blockchain::Result> { - match_client!(self, storage_keys(hash, key_prefix)) - } - fn storage_hash( &self, hash: ::Hash, @@ -475,23 +362,25 @@ impl sc_client_api::StorageProvider for Client { match_client!(self, storage_hash(hash, key)) } - fn storage_pairs( + fn storage_keys( &self, hash: ::Hash, - key_prefix: &StorageKey, - ) -> sp_blockchain::Result> { - match_client!(self, storage_pairs(hash, key_prefix)) + prefix: Option<&StorageKey>, + start_key: Option<&StorageKey>, + ) -> sp_blockchain::Result>::State, Block>> + { + match_client!(self, storage_keys(hash, prefix, start_key)) } - fn storage_keys_iter( + fn storage_pairs( &self, hash: ::Hash, - prefix: Option<&StorageKey>, + key_prefix: Option<&StorageKey>, start_key: Option<&StorageKey>, ) -> sp_blockchain::Result< - KeyIterator<>::State, Block>, + PairsIter<>::State, Block>, > { - match_client!(self, storage_keys_iter(hash, prefix, start_key)) + match_client!(self, storage_pairs(hash, key_prefix, start_key)) } fn child_storage( @@ -504,24 +393,14 @@ impl sc_client_api::StorageProvider for Client { } fn child_storage_keys( - &self, - hash: ::Hash, - child_info: &ChildInfo, - key_prefix: &StorageKey, - ) -> sp_blockchain::Result> { - match_client!(self, child_storage_keys(hash, child_info, key_prefix)) - } - - fn child_storage_keys_iter( &self, hash: ::Hash, child_info: ChildInfo, prefix: Option<&StorageKey>, start_key: Option<&StorageKey>, - ) -> sp_blockchain::Result< - KeyIterator<>::State, Block>, - > { - match_client!(self, child_storage_keys_iter(hash, child_info, prefix, start_key)) + ) -> sp_blockchain::Result>::State, Block>> + { + match_client!(self, child_storage_keys(hash, child_info, prefix, start_key)) } fn child_storage_hash( diff --git a/node/src/cli/cli_parachain.rs b/node/src/cli/cli_parachain.rs index 9b7810f18..b28fb6862 100644 --- a/node/src/cli/cli_parachain.rs +++ b/node/src/cli/cli_parachain.rs @@ -1,4 +1,4 @@ -// Copyright 2022-2023 Forecasting Technologies LTD. +// Copyright 2022-2024 Forecasting Technologies LTD. // Copyright 2021-2022 Zeitgeist PM LLC. // // This file is part of Zeitgeist. @@ -18,11 +18,10 @@ use clap::Parser; use sc_cli::{ - self, ChainSpec, ImportParams, KeystoreParams, NetworkParams, RuntimeVersion, SharedParams, - SubstrateCli, + self, ChainSpec, ImportParams, KeystoreParams, NetworkParams, SharedParams, SubstrateCli, }; use sc_service::config::{BasePath, PrometheusConfig}; -use std::{net::SocketAddr, path::PathBuf}; +use std::path::PathBuf; const BATTERY_STATION_RELAY_ID: &str = "battery_station_relay_v3"; @@ -46,12 +45,13 @@ impl RelayChainCli { ) -> Self { let extension = crate::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(chain_id.clone().unwrap_or_else(|| "polkadot".into()))); + let base_path = para_config.base_path.path().join("polkadot"); - Self { base_path, chain_id, base: clap::Parser::parse_from(relay_chain_args) } + Self { + base_path: Some(base_path), + chain_id, + base: polkadot_cli::RunCmd::parse_from(relay_chain_args), + } } } @@ -127,24 +127,12 @@ impl sc_cli::CliConfiguration for RelayChainCli { self.base.base.rpc_cors(is_dev) } - fn rpc_http(&self, default_listen_port: u16) -> sc_cli::Result> { - self.base.base.rpc_http(default_listen_port) - } - - fn rpc_ipc(&self) -> sc_cli::Result> { - self.base.base.rpc_ipc() - } - fn rpc_methods(&self) -> sc_cli::Result { self.base.base.rpc_methods() } - fn rpc_ws(&self, default_listen_port: u16) -> sc_cli::Result> { - self.base.base.rpc_ws(default_listen_port) - } - - fn rpc_ws_max_connections(&self) -> sc_cli::Result> { - self.base.base.rpc_ws_max_connections() + fn rpc_max_connections(&self) -> sc_cli::Result { + self.base.base.rpc_max_connections() } fn shared_params(&self) -> &SharedParams { @@ -168,11 +156,7 @@ impl sc_cli::DefaultConfigurationValues for RelayChainCli { 9616 } - fn rpc_http_listen_port() -> u16 { - 9934 - } - - fn rpc_ws_listen_port() -> u16 { + fn rpc_listen_port() -> u16 { 9945 } } @@ -211,10 +195,6 @@ impl sc_cli::SubstrateCli for RelayChainCli { } } - fn native_runtime_version(chain_spec: &Box) -> &'static RuntimeVersion { - polkadot_cli::Cli::native_runtime_version(chain_spec) - } - fn support_url() -> String { crate::cli::SUPPORT_URL.into() } diff --git a/node/src/command.rs b/node/src/command.rs index 2491aa822..b0fb1a1a7 100644 --- a/node/src/command.rs +++ b/node/src/command.rs @@ -1,4 +1,4 @@ -// Copyright 2022-2023 Forecasting Technologies LTD. +// Copyright 2022-2024 Forecasting Technologies LTD. // Copyright 2021-2022 Zeitgeist PM LLC. // Copyright 2019-2022 PureStake Inc. // @@ -20,7 +20,7 @@ use super::{ benchmarking::{inherent_benchmark_data, RemarksExtrinsicBuilder, TransferKeepAliveBuilder}, cli::{Cli, Subcommand}, - service::{new_chain_ops, new_full, IdentifyVariant}, + service::{new_chain_ops, new_full, HostFunctions, IdentifyVariant}, }; use frame_benchmarking_cli::{BenchmarkCmd, ExtrinsicFactory, SUBSTRATE_REFERENCE_HARDWARE}; use sc_cli::SubstrateCli; @@ -68,25 +68,23 @@ pub fn run() -> sc_cli::Result<()> { // This switch needs to be in the client, since the client decides // which sub-commands it wants to support. BenchmarkCmd::Pallet(cmd) => { - if !cfg!(feature = "runtime-benchmarks") { - return Err("Runtime benchmarking wasn't enabled when building the node. \ - You can enable it with `--features runtime-benchmarks`." - .into()); - } - - match chain_spec { - #[cfg(feature = "with-zeitgeist-runtime")] - spec if spec.is_zeitgeist() => runner.sync_run(|config| { - cmd.run::(config) - }), - #[cfg(feature = "with-battery-station-runtime")] - _ => runner.sync_run(|config| { - cmd.run::( - config, - ) - }), - #[cfg(not(feature = "with-battery-station-runtime"))] - _ => panic!("{}", crate::BATTERY_STATION_RUNTIME_NOT_AVAILABLE), + if cfg!(feature = "runtime-benchmarks") { + match chain_spec { + #[cfg(feature = "with-zeitgeist-runtime")] + spec if spec.is_zeitgeist() => runner.sync_run(|config| { + cmd.run::(config) + }), + #[cfg(feature = "with-battery-station-runtime")] + _ => runner.sync_run(|config| { + cmd.run::(config) + }), + #[cfg(not(feature = "with-battery-station-runtime"))] + _ => panic!("{}", crate::BATTERY_STATION_RUNTIME_NOT_AVAILABLE), + } + } else { + Err("Runtime benchmarking wasn't enabled when building the node. \ + You can enable it with `--features runtime-benchmarks`." + .into()) } } BenchmarkCmd::Block(cmd) => match chain_spec { @@ -320,7 +318,7 @@ pub fn run() -> sc_cli::Result<()> { let _ = builder.init(); let chain_spec = &crate::cli::load_spec(¶ms.shared_params.chain.clone().unwrap_or_default())?; - let state_version = Cli::native_runtime_version(chain_spec).state_version(); + let state_version = Cli::runtime_version(chain_spec).state_version(); let buf = match chain_spec { #[cfg(feature = "with-zeitgeist-runtime")] @@ -432,57 +430,10 @@ pub fn run() -> sc_cli::Result<()> { Ok((cmd.run(client, backend, None), task_manager)) }) } - #[cfg(feature = "try-runtime")] - Some(Subcommand::TryRuntime(cmd)) => { - use sc_executor::{sp_wasm_interface::ExtendedHostFunctions, NativeExecutionDispatch}; - - let runner = cli.create_runner(cmd)?; - let chain_spec = &runner.config().chain_spec; - - match chain_spec { - #[cfg(feature = "with-zeitgeist-runtime")] - spec if spec.is_zeitgeist() => { - runner.async_run(|config| { - // we don't need any of the components of new_partial, just a runtime, or a task - // manager to do `async_run`. - let registry = config.prometheus_config.as_ref().map(|cfg| &cfg.registry); - let task_manager = - sc_service::TaskManager::new(config.tokio_handle.clone(), registry) - .map_err(|e| { - sc_cli::Error::Service(sc_service::Error::Prometheus(e)) - })?; - return Ok(( - cmd.run::::ExtendHostFunctions, - >>(), - task_manager, - )); - }) - } - #[cfg(feature = "with-battery-station-runtime")] - _ => runner.async_run(|config| { - let registry = config.prometheus_config.as_ref().map(|cfg| &cfg.registry); - let task_manager = - sc_service::TaskManager::new(config.tokio_handle.clone(), registry) - .map_err(|e| { - sc_cli::Error::Service(sc_service::Error::Prometheus(e)) - })?; - return Ok(( - cmd.run::::ExtendHostFunctions, - >>(), - task_manager, - )); - }), - #[cfg(not(feature = "with-battery-station-runtime"))] - _ => Err("Invalid chain spec"), - } - } - #[cfg(not(feature = "try-runtime"))] - Some(Subcommand::TryRuntime) => Err("TryRuntime wasn't enabled when building the node. \ - You can enable it with `--features try-runtime`." + Some(Subcommand::TryRuntime) => Err("The `try-runtime` subcommand has been migrated to a \ + standalone CLI (https://github.com/paritytech/try-runtime-cli). It is no longer \ + being maintained here and will be removed entirely some time after January 2024. \ + Please remove this subcommand from your runtime and use the standalone CLI." .into()), None => none_command(cli), } @@ -515,10 +466,10 @@ fn none_command(cli: Cli) -> sc_cli::Result<()> { cli.parachain_id.or(parachain_id_extension).unwrap_or(super::POLKADOT_PARACHAIN_ID), ); let parachain_account = - AccountIdConversion::::into_account_truncating( + AccountIdConversion::::into_account_truncating( ¶chain_id, ); - let state_version = Cli::native_runtime_version(chain_spec).state_version(); + let state_version = Cli::runtime_version(chain_spec).state_version(); let block: zeitgeist_runtime::Block = cumulus_client_cli::generate_genesis_block(&**chain_spec, state_version) .map_err(|e| format!("{:?}", e))?; @@ -545,7 +496,7 @@ fn none_command(cli: Cli) -> sc_cli::Result<()> { if parachain_config.role.is_authority() { "yes" } else { "no" } ); - if !collator_options.relay_chain_rpc_urls.is_empty() && !cli.relaychain_args.is_empty() { + if !cli.run.relay_chain_rpc_urls.is_empty() && !cli.relaychain_args.is_empty() { log::warn!( "Detected relay chain node arguments together with --relay-chain-rpc-url. This \ command starts a minimal Polkadot node that only uses a network-related subset \ diff --git a/node/src/rpc.rs b/node/src/rpc.rs index ffa85bead..b880a6ae0 100644 --- a/node/src/rpc.rs +++ b/node/src/rpc.rs @@ -1,4 +1,4 @@ -// Copyright 2022 Forecasting Technologies LTD. +// Copyright 2022, 2024 Forecasting Technologies LTD. // Copyright 2021-2022 Zeitgeist PM LLC. // // This file is part of Zeitgeist. @@ -29,7 +29,7 @@ use sp_api::ProvideRuntimeApi; use sp_block_builder::BlockBuilder; use sp_blockchain::{Error as BlockChainError, HeaderBackend, HeaderMetadata}; use std::sync::Arc; -use zeitgeist_primitives::types::{AccountId, Balance, Block, Index as Nonce, MarketId, PoolId}; +use zeitgeist_primitives::types::{AccountId, Balance, Block, MarketId, Nonce, PoolId}; /// Full client dependencies. pub struct FullDeps { diff --git a/node/src/service.rs b/node/src/service.rs index dd9f57b4b..6e832325f 100644 --- a/node/src/service.rs +++ b/node/src/service.rs @@ -21,8 +21,7 @@ mod service_parachain; #[cfg(not(feature = "parachain"))] mod service_standalone; -use sp_runtime::traits::BlakeTwo256; -use zeitgeist_primitives::types::{AccountId, Balance, Block, Index, MarketId, PoolId}; +use zeitgeist_primitives::types::{AccountId, Balance, Block, MarketId, Nonce, PoolId}; use super::cli::Client; use sc_executor::NativeExecutionDispatch; @@ -34,18 +33,20 @@ pub use service_parachain::{new_full, new_partial, FullBackend, FullClient}; #[cfg(not(feature = "parachain"))] pub use service_standalone::{new_full, new_partial, FullBackend, FullClient}; use sp_api::ConstructRuntimeApi; -use sp_trie::PrefixedMemoryDB; use std::sync::Arc; +#[cfg(feature = "runtime-benchmarks")] +pub type HostFunctions = + (frame_benchmarking::benchmarking::HostFunctions, sp_io::SubstrateHostFunctions); +#[cfg(not(feature = "runtime-benchmarks"))] +pub type HostFunctions = (sp_io::SubstrateHostFunctions,); + #[cfg(feature = "with-battery-station-runtime")] pub struct BatteryStationExecutor; #[cfg(feature = "with-battery-station-runtime")] impl sc_executor::NativeExecutionDispatch for BatteryStationExecutor { - #[cfg(feature = "runtime-benchmarks")] - type ExtendHostFunctions = frame_benchmarking::benchmarking::HostFunctions; - #[cfg(not(feature = "runtime-benchmarks"))] - type ExtendHostFunctions = (); + type ExtendHostFunctions = HostFunctions; fn dispatch(method: &str, data: &[u8]) -> Option> { battery_station_runtime::api::dispatch(method, data) @@ -61,10 +62,7 @@ pub struct ZeitgeistExecutor; #[cfg(feature = "with-zeitgeist-runtime")] impl sc_executor::NativeExecutionDispatch for ZeitgeistExecutor { - #[cfg(feature = "runtime-benchmarks")] - type ExtendHostFunctions = frame_benchmarking::benchmarking::HostFunctions; - #[cfg(not(feature = "runtime-benchmarks"))] - type ExtendHostFunctions = (); + type ExtendHostFunctions = HostFunctions; fn dispatch(method: &str, data: &[u8]) -> Option> { zeitgeist_runtime::api::dispatch(method, data) @@ -78,18 +76,11 @@ impl sc_executor::NativeExecutionDispatch for ZeitgeistExecutor { /// Can be called for a `Configuration` to check if it is a configuration for /// the `Zeitgeist` network. pub trait IdentifyVariant { - /// Returns `true` if this is a configuration for the `Battery Station` network. - fn is_battery_station(&self) -> bool; - /// Returns `true` if this is a configuration for the `Zeitgeist` network. fn is_zeitgeist(&self) -> bool; } impl IdentifyVariant for Box { - fn is_battery_station(&self) -> bool { - self.id().starts_with("battery_station") - } - fn is_zeitgeist(&self) -> bool { self.id().starts_with("zeitgeist") } @@ -100,29 +91,25 @@ pub trait RuntimeApiCollection: sp_transaction_pool::runtime_api::TaggedTransactionQueue + sp_api::ApiExt + sp_block_builder::BlockBuilder - + substrate_frame_rpc_system::AccountNonceApi + + substrate_frame_rpc_system::AccountNonceApi + pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi + sp_api::Metadata + sp_offchain::OffchainWorkerApi + sp_session::SessionKeys + zrml_swaps_rpc::SwapsRuntimeApi -where - >::StateBackend: sp_api::StateBackend, { } -impl RuntimeApiCollection for Api -where +impl RuntimeApiCollection for Api where Api: sp_transaction_pool::runtime_api::TaggedTransactionQueue + sp_api::ApiExt + sp_block_builder::BlockBuilder - + substrate_frame_rpc_system::AccountNonceApi + + substrate_frame_rpc_system::AccountNonceApi + pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi + sp_api::Metadata + sp_offchain::OffchainWorkerApi + sp_session::SessionKeys - + zrml_swaps_rpc::SwapsRuntimeApi, - >::StateBackend: sp_api::StateBackend, + + zrml_swaps_rpc::SwapsRuntimeApi { } @@ -134,8 +121,6 @@ cfg_if::cfg_if! { + nimbus_primitives::NimbusApi + cumulus_primitives_core::CollectCollationInfo + session_keys_primitives::VrfApi - where - >::StateBackend: sp_api::StateBackend, { } @@ -145,26 +130,23 @@ cfg_if::cfg_if! { + nimbus_primitives::NimbusApi + cumulus_primitives_core::CollectCollationInfo + session_keys_primitives::VrfApi, - >::StateBackend: sp_api::StateBackend, { } } else { /// Additional APIs for standalone runtimes pub trait AdditionalRuntimeApiCollection: sp_api::ApiExt - + sp_finality_grandpa::GrandpaApi + + sp_consensus_grandpa::GrandpaApi + sp_consensus_aura::AuraApi where - >::StateBackend: sp_api::StateBackend, { } impl AdditionalRuntimeApiCollection for Api where Api: sp_api::ApiExt - + sp_finality_grandpa::GrandpaApi + + sp_consensus_grandpa::GrandpaApi + sp_consensus_aura::AuraApi, - >::StateBackend: sp_api::StateBackend, { } } @@ -175,12 +157,7 @@ cfg_if::cfg_if! { pub fn new_chain_ops( config: &mut Configuration, ) -> Result< - ( - Arc, - Arc, - sc_consensus::BasicQueue>, - TaskManager, - ), + (Arc, Arc, sc_consensus::BasicQueue, TaskManager), ServiceError, > { match &config.chain_spec { @@ -201,22 +178,14 @@ pub fn new_chain_ops( fn new_chain_ops_inner( config: &mut Configuration, ) -> Result< - ( - Arc, - Arc, - sc_consensus::BasicQueue>, - TaskManager, - ), + (Arc, Arc, sc_consensus::BasicQueue, TaskManager), ServiceError, > where Client: From>>, RuntimeApi: ConstructRuntimeApi> + Send + Sync + 'static, - RuntimeApi::RuntimeApi: RuntimeApiCollection> - + AdditionalRuntimeApiCollection< - StateBackend = sc_client_api::StateBackendFor, - >, + RuntimeApi::RuntimeApi: RuntimeApiCollection + AdditionalRuntimeApiCollection, Executor: NativeExecutionDispatch + 'static, { config.keystore = sc_service::config::KeystoreConfig::InMemory; diff --git a/node/src/service/service_parachain.rs b/node/src/service/service_parachain.rs index 2a3db0ca2..0a86b6cac 100644 --- a/node/src/service/service_parachain.rs +++ b/node/src/service/service_parachain.rs @@ -1,4 +1,4 @@ -// Copyright 2022-2023 Forecasting Technologies LTD. +// Copyright 2022-2024 Forecasting Technologies LTD. // Copyright 2021-2022 Zeitgeist PM LLC. // // This file is part of Zeitgeist. @@ -24,26 +24,34 @@ use cumulus_client_cli::CollatorOptions; use cumulus_client_consensus_common::{ ParachainBlockImport as TParachainBlockImport, ParachainConsensus, }; -use cumulus_client_network::BlockAnnounceValidator; +use cumulus_client_service::{build_network, BuildNetworkParams, CollatorSybilResistance}; +#[allow(deprecated)] +// TODO(#1326): Resolve deprecation after upgrade to polkadot-v1.3.0 use cumulus_client_service::{ build_relay_chain_interface, prepare_node_config, start_collator, start_full_node, StartCollatorParams, StartFullNodeParams, }; use cumulus_primitives_core::ParaId; use cumulus_relay_chain_interface::RelayChainInterface; +use futures::FutureExt; use nimbus_consensus::{BuildNimbusConsensusParams, NimbusConsensus}; use nimbus_primitives::NimbusId; +use sc_client_api::Backend; use sc_consensus::ImportQueue; -use sc_executor::{NativeElseWasmExecutor, NativeExecutionDispatch}; -use sc_network::NetworkService; -use sc_network_common::service::NetworkBlock; +use sc_executor::{ + HeapAllocStrategy, NativeElseWasmExecutor, NativeExecutionDispatch, WasmExecutor, + DEFAULT_HEAP_ALLOC_STRATEGY, +}; +use sc_network::{config::FullNetworkConfiguration, NetworkBlock}; +use sc_network_sync::SyncingService; use sc_service::{ error::{Error as ServiceError, Result as ServiceResult}, Configuration, PartialComponents, TFullBackend, TFullClient, TaskManager, }; use sc_telemetry::{Telemetry, TelemetryHandle, TelemetryWorker, TelemetryWorkerHandle}; +use sc_transaction_pool_api::OffchainTransactionPoolFactory; use sp_api::ConstructRuntimeApi; -use sp_keystore::SyncCryptoStorePtr; +use sp_keystore::KeystorePtr; use std::sync::Arc; use substrate_prometheus_endpoint::Registry; use zeitgeist_primitives::types::{Block, Hash}; @@ -55,7 +63,7 @@ pub type ParachainPartialComponents = PartialComponents< FullClient, FullBackend, (), - sc_consensus::DefaultImportQueue>, + sc_consensus::DefaultImportQueue, sc_transaction_pool::FullPool>, (ParachainBlockImport, Option, Option), >; @@ -73,10 +81,7 @@ pub async fn new_full( where RuntimeApi: ConstructRuntimeApi> + Send + Sync + 'static, - RuntimeApi::RuntimeApi: RuntimeApiCollection> - + AdditionalRuntimeApiCollection< - StateBackend = sc_client_api::StateBackendFor, - >, + RuntimeApi::RuntimeApi: RuntimeApiCollection + AdditionalRuntimeApiCollection, Executor: NativeExecutionDispatch + 'static, { do_new_full( @@ -172,10 +177,7 @@ pub fn new_partial( where RuntimeApi: ConstructRuntimeApi> + Send + Sync + 'static, - RuntimeApi::RuntimeApi: RuntimeApiCollection> - + AdditionalRuntimeApiCollection< - StateBackend = sc_client_api::StateBackendFor, - >, + RuntimeApi::RuntimeApi: RuntimeApiCollection + AdditionalRuntimeApiCollection, Executor: NativeExecutionDispatch + 'static, { let telemetry = config @@ -189,29 +191,32 @@ where }) .transpose()?; - let executor = NativeElseWasmExecutor::::new( - config.wasm_method, - config.default_heap_pages, - config.max_runtime_instances, - config.runtime_cache_size, - ); + let heap_pages = config + .default_heap_pages + .map_or(DEFAULT_HEAP_ALLOC_STRATEGY, |h| HeapAllocStrategy::Static { extra_pages: h as _ }); + + let wasm_builder = WasmExecutor::builder() + .with_execution_method(config.wasm_method) + .with_onchain_heap_alloc_strategy(heap_pages) + .with_offchain_heap_alloc_strategy(heap_pages) + .with_ignore_onchain_heap_pages(true) + .with_max_runtime_instances(config.max_runtime_instances) + .with_runtime_cache_size(config.runtime_cache_size); + let wasm_executor = wasm_builder.build(); + let executor = NativeElseWasmExecutor::::new_with_wasm_executor(wasm_executor); let (client, backend, keystore_container, task_manager) = sc_service::new_full_parts::( config, telemetry.as_ref().map(|(_, telemetry)| telemetry.handle()), executor, )?; - let client = Arc::new(client); - let telemetry_worker_handle = telemetry.as_ref().map(|(worker, _)| worker.handle()); - let telemetry = telemetry.map(|(worker, telemetry)| { task_manager.spawn_handle().spawn("telemetry", None, worker.run()); telemetry }); - let transaction_pool = sc_transaction_pool::BasicPool::new_full( config.transaction_pool.clone(), config.role.is_authority().into(), @@ -219,7 +224,6 @@ where task_manager.spawn_essential_handle(), client.clone(), ); - let block_import = ParachainBlockImport::::new(client.clone(), backend.clone()); let import_queue = nimbus_consensus::import_queue( @@ -253,7 +257,7 @@ where async fn do_new_full( parachain_config: Configuration, polkadot_config: Configuration, - id: polkadot_primitives::v2::Id, + id: polkadot_primitives::Id, build_consensus: BIC, hwbench: Option, collator_options: CollatorOptions, @@ -261,10 +265,7 @@ async fn do_new_full( where RuntimeApi: ConstructRuntimeApi> + Send + Sync + 'static, - RuntimeApi::RuntimeApi: RuntimeApiCollection> - + AdditionalRuntimeApiCollection< - StateBackend = sc_client_api::StateBackendFor, - >, + RuntimeApi::RuntimeApi: RuntimeApiCollection + AdditionalRuntimeApiCollection, Executor: NativeExecutionDispatch + 'static, BIC: FnOnce( Arc>, @@ -274,8 +275,8 @@ where &TaskManager, Arc, Arc>>, - Arc>, - SyncCryptoStorePtr, + Arc>, + KeystorePtr, bool, ) -> Result>, ServiceError>, { @@ -299,31 +300,44 @@ where .await .map_err(|e| ServiceError::Application(Box::new(e) as Box<_>))?; - let block_announce_validator = BlockAnnounceValidator::new(relay_chain_interface.clone(), id); let force_authoring = parachain_config.force_authoring; let collator = parachain_config.role.is_authority(); let prometheus_registry = parachain_config.prometheus_registry().cloned(); let transaction_pool = params.transaction_pool.clone(); let import_queue_service = params.import_queue.service(); - let (network, system_rpc_tx, tx_handler_controller, start_network) = - sc_service::build_network(sc_service::BuildNetworkParams { - config: ¶chain_config, + let net_config = FullNetworkConfiguration::new(¶chain_config.network); + let (network, system_rpc_tx, tx_handler_controller, start_network, sync_service) = + build_network(BuildNetworkParams { + parachain_config: ¶chain_config, client: client.clone(), transaction_pool: transaction_pool.clone(), spawn_handle: task_manager.spawn_handle(), import_queue: params.import_queue, - block_announce_validator_builder: Some(Box::new(|_| { - Box::new(block_announce_validator) - })), - warp_sync: None, - })?; + para_id: id, + relay_chain_interface: relay_chain_interface.clone(), + net_config, + sybil_resistance_level: CollatorSybilResistance::Resistant, + }) + .await?; if parachain_config.offchain_worker.enabled { - sc_service::build_offchain_workers( - ¶chain_config, - task_manager.spawn_handle(), - client.clone(), - network.clone(), + 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(), ); } @@ -343,10 +357,11 @@ where backend: backend.clone(), client: client.clone(), config: parachain_config, - keystore: params.keystore_container.sync_keystore(), + keystore: params.keystore_container.keystore(), network: network.clone(), rpc_builder, tx_handler_controller, + sync_service: sync_service.clone(), system_rpc_tx, task_manager: &mut task_manager, telemetry: telemetry.as_mut(), @@ -367,11 +382,13 @@ where } let announce_block = { - let network = network.clone(); - Arc::new(move |hash, data| network.announce_block(hash, data)) + let sync_service = sync_service.clone(); + Arc::new(move |hash, data| sync_service.announce_block(hash, data)) }; - let relay_chain_slot_duration = POLKADOT_BLOCK_DURATION; + let overseer_handle = relay_chain_interface + .overseer_handle() + .map_err(|e| sc_service::Error::Application(Box::new(e)))?; if collator { let parachain_consensus = build_consensus( @@ -382,8 +399,8 @@ where &task_manager, relay_chain_interface.clone(), transaction_pool, - network, - params.keystore_container.sync_keystore(), + sync_service.clone(), + params.keystore_container.keystore(), force_authoring, )?; @@ -399,11 +416,15 @@ where spawner, parachain_consensus, import_queue: import_queue_service, + recovery_handle: Box::new(overseer_handle), collator_key: collator_key .ok_or_else(|| ServiceError::Other("Collator Key is None".to_string()))?, relay_chain_slot_duration, + sync_service, }; + #[allow(deprecated)] + // TODO(#1326): Resolve deprecation after upgrade to polkadot-v1.3.0 start_collator(params).await?; } else { let params = StartFullNodeParams { @@ -411,11 +432,15 @@ where announce_block, task_manager: &mut task_manager, para_id: id, + recovery_handle: Box::new(overseer_handle), relay_chain_interface, relay_chain_slot_duration, import_queue: import_queue_service, + sync_service, }; + #[allow(deprecated)] + // TODO(#1326): Resolve deprecation after upgrade to polkadot-v1.3.0 start_full_node(params)?; } diff --git a/node/src/service/service_standalone.rs b/node/src/service/service_standalone.rs index 28b8dc043..4f8ba0508 100644 --- a/node/src/service/service_standalone.rs +++ b/node/src/service/service_standalone.rs @@ -1,4 +1,4 @@ -// Copyright 2022-2023 Forecasting Technologies LTD. +// Copyright 2022-2024 Forecasting Technologies LTD. // Copyright 2021-2022 Zeitgeist PM LLC. // // This file is part of Zeitgeist. @@ -22,15 +22,16 @@ use crate::{ cli::Cli, service::{AdditionalRuntimeApiCollection, RuntimeApiCollection}, }; -use sc_client_api::BlockBackend; +use futures::FutureExt; +use sc_client_api::{Backend, BlockBackend}; use sc_consensus_aura::{ImportQueueParams, SlotProportion, StartAuraParams}; +use sc_consensus_grandpa::{protocol_standard_name, SharedVoterState}; use sc_executor::{NativeElseWasmExecutor, NativeExecutionDispatch}; -use sc_finality_grandpa::{grandpa_peers_set_config, protocol_standard_name, SharedVoterState}; -use sc_keystore::LocalKeystore; use sc_service::{ error::Error as ServiceError, Configuration, TFullBackend, TFullClient, TaskManager, }; use sc_telemetry::{Telemetry, TelemetryWorker}; +use sc_transaction_pool_api::OffchainTransactionPoolFactory; use sp_api::ConstructRuntimeApi; use sp_consensus_aura::sr25519::AuthorityPair as AuraPair; use std::{sync::Arc, time::Duration}; @@ -41,18 +42,19 @@ pub type FullClient = pub type FullBackend = TFullBackend; type FullSelectChain = sc_consensus::LongestChain; +/// The minimum period of blocks on which justifications will be +/// imported and generated. +const GRANDPA_JUSTIFICATION_PERIOD: u32 = 512; + /// Builds a new service for a full client. pub fn new_full( - mut config: Configuration, + config: Configuration, cli: Cli, ) -> Result where RuntimeApi: ConstructRuntimeApi> + Send + Sync + 'static, - RuntimeApi::RuntimeApi: RuntimeApiCollection> - + AdditionalRuntimeApiCollection< - StateBackend = sc_client_api::StateBackendFor, - >, + RuntimeApi::RuntimeApi: RuntimeApiCollection + AdditionalRuntimeApiCollection, Executor: NativeExecutionDispatch + 'static, { let hwbench = (cli.no_hardware_benchmarks) @@ -67,56 +69,47 @@ where backend, mut task_manager, import_queue, - mut keystore_container, + keystore_container, select_chain, transaction_pool, other: (block_import, grandpa_link, mut telemetry), } = new_partial::(&config)?; - if let Some(url) = &config.keystore_remote { - match remote_keystore(url) { - Ok(k) => keystore_container.set_remote_keystore(k), - Err(e) => { - return Err(ServiceError::Other(format!( - "Error hooking up remote keystore for {}: {}", - url, e - ))); - } - }; - } + let mut net_config = sc_network::config::FullNetworkConfiguration::new(&config.network); let grandpa_protocol_name = protocol_standard_name( &client.block_hash(0).ok().flatten().expect("Genesis block exists; qed"), &config.chain_spec, ); - config.network.extra_sets.push(grandpa_peers_set_config(grandpa_protocol_name.clone())); - let warp_sync = Arc::new(sc_finality_grandpa::warp_proof::NetworkProvider::new( + net_config.add_notification_protocol(sc_consensus_grandpa::grandpa_peers_set_config( + grandpa_protocol_name.clone(), + )); + + let statement_handler_proto = sc_network_statement::StatementHandlerPrototype::new( + client.block_hash(0u32.into()).ok().flatten().expect("Genesis block exists; qed"), + config.chain_spec.fork_id(), + ); + net_config.add_notification_protocol(statement_handler_proto.set_config()); + + let warp_sync = Arc::new(sc_consensus_grandpa::warp_proof::NetworkProvider::new( backend.clone(), grandpa_link.shared_authority_set().clone(), Vec::default(), )); - let (network, system_rpc_tx, tx_handler_controller, network_starter) = + 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(), import_queue, block_announce_validator_builder: None, - warp_sync: Some(warp_sync), + warp_sync_params: Some(sc_service::WarpSyncParams::WithProvider(warp_sync)), })?; - if config.offchain_worker.enabled { - sc_service::build_offchain_workers( - &config, - task_manager.spawn_handle(), - client.clone(), - network.clone(), - ); - } - let role = config.role.clone(); let force_authoring = config.force_authoring; let backoff_authoring_blocks: Option<()> = None; @@ -124,6 +117,7 @@ where let enable_grandpa = !config.disable_grandpa; let prometheus_registry = config.prometheus_registry().cloned(); let database = config.database.clone(); + let enable_offchain_worker = config.offchain_worker.enabled; let rpc_builder = { let client = client.clone(); @@ -140,14 +134,15 @@ where let _rpc_handlers = sc_service::spawn_tasks(sc_service::SpawnTasksParams { network: network.clone(), client: client.clone(), - keystore: keystore_container.sync_keystore(), + keystore: keystore_container.keystore(), task_manager: &mut task_manager, transaction_pool: transaction_pool.clone(), rpc_builder: rpc_builder, tx_handler_controller: tx_handler_controller, - backend, + backend: backend.clone(), system_rpc_tx, config: config, + sync_service: sync_service.clone(), telemetry: telemetry.as_mut(), })?; @@ -168,7 +163,7 @@ where let proposer_factory = sc_basic_authorship::ProposerFactory::new( task_manager.spawn_handle(), client.clone(), - transaction_pool, + transaction_pool.clone(), prometheus_registry.as_ref(), telemetry.as_ref().map(|x| x.handle()), ); @@ -178,7 +173,7 @@ where let aura = sc_consensus_aura::start_aura::( StartAuraParams { slot_duration, - client, + client: client.clone(), select_chain, block_import, proposer_factory, @@ -195,9 +190,9 @@ where }, force_authoring, backoff_authoring_blocks, - keystore: keystore_container.sync_keystore(), - sync_oracle: network.clone(), - justification_sync_link: network.clone(), + keystore: keystore_container.keystore(), + sync_oracle: sync_service.clone(), + justification_sync_link: sync_service.clone(), block_proposal_slot_portion: SlotProportion::new(2f32 / 3f32), max_block_proposal_slot_portion: None, telemetry: telemetry.as_ref().map(|x| x.handle()), @@ -209,7 +204,8 @@ where cli.storage_monitor, database, &task_manager.spawn_essential_handle(), - )?; + ) + .map_err(|e| ServiceError::Application(e.into()))?; // the AURA authoring task is considered essential, i.e. if it // fails we take down the service with it. @@ -218,16 +214,15 @@ where // if the node isn't actively participating in consensus then it doesn't // need a keystore, regardless of which protocol we use below. - let keystore = - if role.is_authority() { Some(keystore_container.sync_keystore()) } else { None }; + let keystore = if role.is_authority() { Some(keystore_container.keystore()) } else { None }; - let grandpa_config = sc_finality_grandpa::Config { + let grandpa_config = sc_consensus_grandpa::Config { gossip_duration: Duration::from_millis(333), - justification_period: 512, + justification_generation_period: GRANDPA_JUSTIFICATION_PERIOD, name: Some(name), observer_enabled: false, keystore, - local_role: role, + local_role: role.clone(), telemetry: telemetry.as_ref().map(|x| x.handle()), protocol_name: grandpa_protocol_name, }; @@ -239,14 +234,16 @@ where // and vote data availability than the observer. The observer has not // been tested extensively yet and having most nodes in a network run it // could lead to finality stalls. - let grandpa_config = sc_finality_grandpa::GrandpaParams { + let grandpa_config = sc_consensus_grandpa::GrandpaParams { config: grandpa_config, link: grandpa_link, - network, - voting_rule: sc_finality_grandpa::VotingRulesBuilder::default().build(), + network: network.clone(), + sync: Arc::new(sync_service), + voting_rule: sc_consensus_grandpa::VotingRulesBuilder::default().build(), prometheus_registry, shared_voter_state: SharedVoterState::empty(), telemetry: telemetry.as_ref().map(|x| x.handle()), + offchain_tx_pool_factory: OffchainTransactionPoolFactory::new(transaction_pool.clone()), }; // the GRANDPA voter task is considered infallible, i.e. @@ -254,7 +251,26 @@ where task_manager.spawn_essential_handle().spawn_blocking( "grandpa-voter", None, - sc_finality_grandpa::run_grandpa_voter(grandpa_config)?, + sc_consensus_grandpa::run_grandpa_voter(grandpa_config)?, + ); + } + + if enable_offchain_worker { + task_manager.spawn_handle().spawn( + "offchain-workers-runner", + "offchain-work", + sc_offchain::OffchainWorkers::new(sc_offchain::OffchainWorkerOptions { + runtime_api_provider: client.clone(), + keystore: Some(keystore_container.keystore()), + offchain_db: backend.offchain_storage(), + transaction_pool: Some(OffchainTransactionPoolFactory::new(transaction_pool)), + network_provider: network.clone(), + is_validator: role.is_authority(), + enable_http_requests: true, + custom_extensions: move |_| vec![], + }) + .run(client.clone(), task_manager.spawn_handle()) + .boxed(), ); } @@ -269,16 +285,20 @@ pub fn new_partial( FullClient, FullBackend, FullSelectChain, - sc_consensus::DefaultImportQueue>, + sc_consensus::DefaultImportQueue, sc_transaction_pool::FullPool>, ( - sc_finality_grandpa::GrandpaBlockImport< + sc_consensus_grandpa::GrandpaBlockImport< FullBackend, Block, FullClient, FullSelectChain, >, - sc_finality_grandpa::LinkHalf, FullSelectChain>, + sc_consensus_grandpa::LinkHalf< + Block, + FullClient, + FullSelectChain, + >, Option, ), >, @@ -287,16 +307,9 @@ pub fn new_partial( where RuntimeApi: ConstructRuntimeApi> + Send + Sync + 'static, - RuntimeApi::RuntimeApi: RuntimeApiCollection> - + AdditionalRuntimeApiCollection< - StateBackend = sc_client_api::StateBackendFor, - >, + RuntimeApi::RuntimeApi: RuntimeApiCollection + AdditionalRuntimeApiCollection, Executor: NativeExecutionDispatch + 'static, { - if config.keystore_remote.is_some() { - return Err(ServiceError::Other(format!("Remote Keystores are not supported."))); - } - let telemetry = config .telemetry_endpoints .clone() @@ -308,12 +321,7 @@ where }) .transpose()?; - let executor = NativeElseWasmExecutor::::new( - config.wasm_method, - config.default_heap_pages, - config.max_runtime_instances, - config.runtime_cache_size, - ); + let executor = sc_service::new_native_or_wasm_executor(&config); let (client, backend, keystore_container, task_manager) = sc_service::new_full_parts::( @@ -338,15 +346,15 @@ where client.clone(), ); - let (grandpa_block_import, grandpa_link) = sc_finality_grandpa::block_import( + let (grandpa_block_import, grandpa_link) = sc_consensus_grandpa::block_import( client.clone(), + GRANDPA_JUSTIFICATION_PERIOD, &(client.clone() as Arc<_>), select_chain.clone(), telemetry.as_ref().map(|x| x.handle()), )?; let slot_duration = sc_consensus_aura::slot_duration(&*client)?; - let import_queue = sc_consensus_aura::import_queue::( ImportQueueParams { block_import: grandpa_block_import.clone(), @@ -382,10 +390,3 @@ where other: (grandpa_block_import, grandpa_link, telemetry), }) } - -fn remote_keystore(_url: &String) -> Result, &'static str> { - // FIXME: here would the concrete keystore be built, - // must return a concrete type (NOT `LocalKeystore`) that - // implements `CryptoStore` and `SyncCryptoStore` - Err("Remote Keystore not supported.") -} diff --git a/primitives/Cargo.toml b/primitives/Cargo.toml index 689562b82..55040397a 100644 --- a/primitives/Cargo.toml +++ b/primitives/Cargo.toml @@ -9,8 +9,8 @@ orml-currencies = { workspace = true } orml-tokens = { workspace = true } orml-traits = { workspace = true } parity-scale-codec = { workspace = true, features = ["derive", "max-encoded-len"] } -scale-info = { workspace = true, features = ["derive"] } -serde = { workspace = true, features = ["derive"], optional = true } +scale-info = { workspace = true, features = ["derive", "serde"] } +serde = { workspace = true, features = ["alloc", "derive", "rc"] } sp-arithmetic = { workspace = true } sp-core = { workspace = true } sp-runtime = { workspace = true } @@ -38,6 +38,6 @@ std = [ [package] authors = ["Zeitgeist PM "] -edition = "2021" +edition.workspace = true name = "zeitgeist-primitives" version = "0.5.2" diff --git a/primitives/src/assets.rs b/primitives/src/assets.rs index 7de237bb8..a32f7c4cf 100644 --- a/primitives/src/assets.rs +++ b/primitives/src/assets.rs @@ -45,11 +45,22 @@ mod tests; /// meaning that they think the outcome will be closer to the upper bound /// or a `Short` position meaning that they think the outcome will be closer /// to the lower bound. -#[cfg_attr(feature = "std", derive(serde::Deserialize, serde::Serialize))] -#[cfg_attr(feature = "std", serde(rename_all = "camelCase"))] #[derive( - Clone, Copy, Debug, Decode, Eq, Encode, MaxEncodedLen, Ord, PartialEq, PartialOrd, TypeInfo, + Clone, + Copy, + Debug, + Decode, + Eq, + Encode, + MaxEncodedLen, + Ord, + PartialEq, + PartialOrd, + TypeInfo, + serde::Deserialize, + serde::Serialize, )] +#[serde(rename_all = "camelCase")] pub enum ScalarPosition { Long, Short, diff --git a/primitives/src/assets/all_assets.rs b/primitives/src/assets/all_assets.rs index 012486af9..a14acc5b7 100644 --- a/primitives/src/assets/all_assets.rs +++ b/primitives/src/assets/all_assets.rs @@ -37,8 +37,6 @@ use super::*; /// # Types /// /// * `MI`: Market Id -#[cfg_attr(feature = "std", derive(serde::Deserialize, serde::Serialize))] -#[cfg_attr(feature = "std", serde(rename_all = "camelCase"))] #[derive( Clone, Copy, @@ -52,7 +50,10 @@ use super::*; PartialEq, PartialOrd, TypeInfo, + serde::Deserialize, + serde::Serialize, )] +#[serde(rename_all = "camelCase")] pub enum Asset { #[codec(index = 0)] CategoricalOutcome(MI, CategoryIndex), diff --git a/primitives/src/assets/campaign_assets.rs b/primitives/src/assets/campaign_assets.rs index dcf912a77..9461f369e 100644 --- a/primitives/src/assets/campaign_assets.rs +++ b/primitives/src/assets/campaign_assets.rs @@ -20,11 +20,23 @@ use super::*; /// The `CampaignAsset` tuple struct represents all campaign assets. /// Campaign assets can have special properties, such as the capability /// to pay fees. -#[cfg_attr(feature = "std", derive(serde::Deserialize, serde::Serialize))] -#[cfg_attr(feature = "std", serde(rename_all = "camelCase"))] #[derive( - Clone, CompactAs, Copy, Debug, Decode, Default, Eq, Encode, MaxEncodedLen, PartialEq, TypeInfo, + Clone, + CompactAs, + Copy, + Debug, + Decode, + Eq, + Encode, + MaxEncodedLen, + Ord, + PartialEq, + PartialOrd, + TypeInfo, + serde::Deserialize, + serde::Serialize, )] +#[serde(rename_all = "camelCase")] pub struct CampaignAssetClass(#[codec(compact)] pub CampaignAssetId); impl From> for CampaignAssetClass { diff --git a/primitives/src/assets/currencies.rs b/primitives/src/assets/currencies.rs index d29359d43..a432d657d 100644 --- a/primitives/src/assets/currencies.rs +++ b/primitives/src/assets/currencies.rs @@ -19,11 +19,22 @@ use super::*; /// The `CurrencyClass` enum represents all non-ztg currencies // used in orml-tokens -#[cfg_attr(feature = "std", derive(serde::Deserialize, serde::Serialize))] -#[cfg_attr(feature = "std", serde(rename_all = "camelCase"))] #[derive( - Clone, Copy, Debug, Decode, Eq, Encode, MaxEncodedLen, Ord, PartialEq, PartialOrd, TypeInfo, + Clone, + Copy, + Debug, + Decode, + Eq, + Encode, + MaxEncodedLen, + Ord, + PartialEq, + PartialOrd, + TypeInfo, + serde::Deserialize, + serde::Serialize, )] +#[serde(rename_all = "camelCase")] pub enum CurrencyClass { // All Outcome and Share variants will be removed once the lazy migration from // orml-tokens to pallet-assets is complete diff --git a/primitives/src/assets/custom_assets.rs b/primitives/src/assets/custom_assets.rs index b5f8339ec..65398c526 100644 --- a/primitives/src/assets/custom_assets.rs +++ b/primitives/src/assets/custom_assets.rs @@ -18,11 +18,23 @@ use super::*; /// The `CustomAsset` tuple struct represents all custom assets. -#[cfg_attr(feature = "std", derive(serde::Deserialize, serde::Serialize))] -#[cfg_attr(feature = "std", serde(rename_all = "camelCase"))] #[derive( - Clone, CompactAs, Copy, Debug, Decode, Default, Eq, Encode, MaxEncodedLen, PartialEq, TypeInfo, + Clone, + CompactAs, + Copy, + Debug, + Decode, + Eq, + Encode, + MaxEncodedLen, + Ord, + PartialEq, + PartialOrd, + TypeInfo, + serde::Deserialize, + serde::Serialize, )] +#[serde(rename_all = "camelCase")] pub struct CustomAssetClass(#[codec(compact)] pub CustomAssetId); impl From> for CustomAssetClass { diff --git a/primitives/src/assets/market_assets.rs b/primitives/src/assets/market_assets.rs index 7573cf74a..e675f7c67 100644 --- a/primitives/src/assets/market_assets.rs +++ b/primitives/src/assets/market_assets.rs @@ -23,11 +23,22 @@ use super::*; /// # Types /// /// * `MI`: Market Id -#[cfg_attr(feature = "std", derive(serde::Deserialize, serde::Serialize))] -#[cfg_attr(feature = "std", serde(rename_all = "camelCase"))] #[derive( - Clone, Copy, Debug, Decode, Eq, Encode, MaxEncodedLen, PartialEq, PartialOrd, Ord, TypeInfo, + Clone, + Copy, + Debug, + Decode, + Eq, + Encode, + MaxEncodedLen, + Ord, + PartialEq, + PartialOrd, + TypeInfo, + serde::Deserialize, + serde::Serialize, )] +#[serde(rename_all = "camelCase")] pub enum MarketAssetClass { #[codec(index = 0)] CategoricalOutcome(MI, CategoryIndex), diff --git a/primitives/src/assets/subsets/base_assets.rs b/primitives/src/assets/subsets/base_assets.rs index 041d0b10c..393a1ab8f 100644 --- a/primitives/src/assets/subsets/base_assets.rs +++ b/primitives/src/assets/subsets/base_assets.rs @@ -19,9 +19,23 @@ use super::*; /// The `BaseAssetClass` enum represents all assets that can be used as collateral in /// prediction markets. -#[cfg_attr(feature = "std", derive(serde::Deserialize, serde::Serialize))] -#[cfg_attr(feature = "std", serde(rename_all = "camelCase"))] -#[derive(Clone, Copy, Debug, Decode, Default, Eq, Encode, MaxEncodedLen, PartialEq, TypeInfo)] +#[derive( + Clone, + Copy, + Debug, + Decode, + Default, + Eq, + Encode, + MaxEncodedLen, + Ord, + PartialEq, + PartialOrd, + TypeInfo, + serde::Deserialize, + serde::Serialize, +)] +#[serde(rename_all = "camelCase")] pub enum BaseAssetClass { #[codec(index = 4)] #[default] diff --git a/primitives/src/assets/subsets/parimutuel.rs b/primitives/src/assets/subsets/parimutuel.rs index 26d412a4e..5135db646 100644 --- a/primitives/src/assets/subsets/parimutuel.rs +++ b/primitives/src/assets/subsets/parimutuel.rs @@ -18,9 +18,22 @@ use super::*; /// The `ParimutuelAssetClass` enum represents all assets that are specific to parimutuel markets. -#[cfg_attr(feature = "std", derive(serde::Deserialize, serde::Serialize))] -#[cfg_attr(feature = "std", serde(rename_all = "camelCase"))] -#[derive(Clone, Copy, Debug, Decode, Eq, Encode, MaxEncodedLen, PartialEq, TypeInfo)] +#[derive( + Clone, + Copy, + Debug, + Decode, + Eq, + Encode, + MaxEncodedLen, + Ord, + PartialEq, + PartialOrd, + TypeInfo, + serde::Deserialize, + serde::Serialize, +)] +#[serde(rename_all = "camelCase")] pub enum ParimutuelAssetClass { #[codec(index = 6)] Share(MI, CategoryIndex), diff --git a/primitives/src/assets/subsets/xcm_assets.rs b/primitives/src/assets/subsets/xcm_assets.rs index bbad9de08..4b03ecf33 100644 --- a/primitives/src/assets/subsets/xcm_assets.rs +++ b/primitives/src/assets/subsets/xcm_assets.rs @@ -18,9 +18,23 @@ use super::*; /// The `XcmAssetClass` enum represents all assets that can be transferred via XCM. -#[cfg_attr(feature = "std", derive(serde::Deserialize, serde::Serialize))] -#[cfg_attr(feature = "std", serde(rename_all = "camelCase"))] -#[derive(Clone, Copy, Debug, Decode, Default, Eq, Encode, MaxEncodedLen, PartialEq, TypeInfo)] +#[derive( + Clone, + Copy, + Debug, + Decode, + Default, + Eq, + Encode, + MaxEncodedLen, + Ord, + PartialEq, + PartialOrd, + TypeInfo, + serde::Deserialize, + serde::Serialize, +)] +#[serde(rename_all = "camelCase")] pub enum XcmAssetClass { #[codec(index = 4)] #[default] diff --git a/primitives/src/constants/mock.rs b/primitives/src/constants/mock.rs index 47530ebea..e38b7b97e 100644 --- a/primitives/src/constants/mock.rs +++ b/primitives/src/constants/mock.rs @@ -164,7 +164,7 @@ parameter_types! { // Shared within tests // Balance parameter_types! { - pub const ExistentialDeposit: u128 = CENT; + pub const ExistentialDeposit: u128 = 2; pub const MaxLocks: u32 = 50; pub const MaxReserves: u32 = 50; } @@ -191,7 +191,7 @@ parameter_type_with_key! { // System parameter_types! { - pub const BlockHashCount: u64 = 250; + pub const BlockHashCount: u32 = 250; } // Time diff --git a/primitives/src/math/checked_ops_res.rs b/primitives/src/math/checked_ops_res.rs index 1265a6b2b..13cd420a6 100644 --- a/primitives/src/math/checked_ops_res.rs +++ b/primitives/src/math/checked_ops_res.rs @@ -15,12 +15,12 @@ // You should have received a copy of the GNU General Public License // along with Zeitgeist. If not, see . -use frame_support::dispatch::DispatchError; use num_traits::{checked_pow, One}; use sp_arithmetic::{ traits::{CheckedAdd, CheckedDiv, CheckedMul, CheckedRem, CheckedSub}, ArithmeticError, }; +use sp_runtime::DispatchError; pub trait CheckedAddRes where diff --git a/primitives/src/math/fixed.rs b/primitives/src/math/fixed.rs index cf9f5e942..930a26b43 100644 --- a/primitives/src/math/fixed.rs +++ b/primitives/src/math/fixed.rs @@ -31,11 +31,12 @@ use alloc::{ }; use core::{cmp::Ordering, convert::TryFrom, marker::PhantomData}; use fixed::{traits::Fixed, ParseFixedError}; -use frame_support::{dispatch::DispatchError, ensure}; +use frame_support::ensure; use sp_arithmetic::{ traits::{AtLeast32BitUnsigned, Zero}, ArithmeticError, }; +use sp_runtime::DispatchError; /// Trait for safely obtaining constants converted to generic types in a Substrate context. pub trait BaseProvider { @@ -329,6 +330,9 @@ where #[cfg(test)] mod tests { + // TODO(#1328): Remove after rustc nightly-2024-04-22 + #![allow(clippy::duplicated_attributes)] + use super::*; use crate::assert_approx; use fixed::{traits::ToFixed, FixedU128}; diff --git a/primitives/src/math/root.rs b/primitives/src/math/root.rs index 2479e1ab4..22de3a7f5 100644 --- a/primitives/src/math/root.rs +++ b/primitives/src/math/root.rs @@ -156,6 +156,9 @@ fn dist(x: T, y: T) -> T { #[cfg(test)] mod tests { + // TODO(#1328): Remove after rustc nightly-2024-04-22 + #![allow(clippy::duplicated_attributes)] + use super::*; use crate::{constants::BASE, math::fixed::FixedMul}; use test_case::test_case; diff --git a/primitives/src/traits.rs b/primitives/src/traits.rs index 7d7bde094..d4e987ce8 100644 --- a/primitives/src/traits.rs +++ b/primitives/src/traits.rs @@ -27,7 +27,6 @@ mod market_commons_pallet_api; mod market_id; mod market_transition_api; mod swaps; -mod weights; mod zeitgeist_asset; pub use complete_set_operations_api::*; @@ -41,5 +40,4 @@ pub use market_commons_pallet_api::*; pub use market_id::*; pub use market_transition_api::*; pub use swaps::*; -pub use weights::*; pub use zeitgeist_asset::*; diff --git a/primitives/src/traits/hybrid_router_amm_api.rs b/primitives/src/traits/hybrid_router_amm_api.rs index 50e6a7b05..677278e57 100644 --- a/primitives/src/traits/hybrid_router_amm_api.rs +++ b/primitives/src/traits/hybrid_router_amm_api.rs @@ -16,7 +16,7 @@ // along with Zeitgeist. If not, see . use crate::hybrid_router_api_types::{AmmSoftFail, AmmTrade, ApiError}; -use frame_support::dispatch::DispatchError; +use sp_runtime::DispatchError; /// A type alias for the return struct of AMM buy and sell. type AmmTradeOf = AmmTrade<::Balance>; diff --git a/primitives/src/traits/hybrid_router_orderbook_api.rs b/primitives/src/traits/hybrid_router_orderbook_api.rs index 9af727631..968dcd31c 100644 --- a/primitives/src/traits/hybrid_router_orderbook_api.rs +++ b/primitives/src/traits/hybrid_router_orderbook_api.rs @@ -15,7 +15,7 @@ // You should have received a copy of the GNU General Public License // along with Zeitgeist. If not, see . -use frame_support::dispatch::DispatchError; +use sp_runtime::DispatchError; use crate::hybrid_router_api_types::{ApiError, OrderbookSoftFail, OrderbookTrade}; diff --git a/primitives/src/traits/market_commons_pallet_api.rs b/primitives/src/traits/market_commons_pallet_api.rs index 3b5293d38..77e347d87 100644 --- a/primitives/src/traits/market_commons_pallet_api.rs +++ b/primitives/src/traits/market_commons_pallet_api.rs @@ -22,14 +22,18 @@ use crate::{ traits::MarketBuilderTrait, types::{BaseAsset, Market, PoolId}, }; +use alloc::fmt::Debug; use frame_support::{ - dispatch::{fmt::Debug, DispatchError, DispatchResult}, + dispatch::DispatchResult, pallet_prelude::{MaybeSerializeDeserialize, Member}, storage::PrefixIterator, Parameter, }; use parity_scale_codec::{FullCodec, HasCompact, MaxEncodedLen}; -use sp_runtime::traits::{AtLeast32Bit, AtLeast32BitUnsigned}; +use sp_runtime::{ + traits::{AtLeast32Bit, AtLeast32BitUnsigned}, + DispatchError, +}; // Abstraction of the market type, which is not a part of `MarketCommonsPalletApi` because Rust // doesn't support type aliases in traits. diff --git a/primitives/src/traits/swaps.rs b/primitives/src/traits/swaps.rs index 415c163bd..3a9093ee4 100644 --- a/primitives/src/traits/swaps.rs +++ b/primitives/src/traits/swaps.rs @@ -18,8 +18,9 @@ use crate::types::PoolId; use alloc::vec::Vec; -use frame_support::dispatch::{DispatchError, DispatchResult, Weight}; +use frame_support::{dispatch::DispatchResult, weights::Weight}; use parity_scale_codec::{HasCompact, MaxEncodedLen}; +use sp_runtime::DispatchError; pub trait Swaps { type Asset: MaxEncodedLen; diff --git a/primitives/src/traits/weights.rs b/primitives/src/traits/weights.rs deleted file mode 100644 index 8cc25046b..000000000 --- a/primitives/src/traits/weights.rs +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright 2024 Forecasting Technologies LTD. -// Copyright 2023 Parity Technologies (UK) Ltd. - -// This file is part of Zeitgeist. -// -// Zeitgeist is free software: you can redistribute it and/or modify it -// under the terms of the GNU General Public License as published by the -// Free Software Foundation, either version 3 of the License, or (at -// your option) any later version. -// -// Zeitgeist is distributed in the hope that it will be useful, but -// WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with Zeitgeist. If not, see . - -/// Provides `checked_div_per_component` implementation to determine the -/// smallest division result between two `ref_time` and `proof_size`. -/// To be removed once sp-weights is upgraded to polkadot-v0.9.39 -use frame_support::pallet_prelude::Weight; - -pub trait CheckedDivPerComponent { - /// Calculates how many `other` fit into `self`. - /// - /// Divides each component of `self` against the same component of `other`. Returns the minimum - /// of all those divisions. Returns `None` in case **all** components of `other` are zero. - /// - /// This returns `Some` even if some components of `other` are zero as long as there is at least - /// one non-zero component in `other`. The division for this particular component will then - /// yield the maximum value (e.g u64::MAX). This is because we assume not every operation and - /// hence each `Weight` will necessarily use each resource. - fn checked_div_per_component(self, other: &Self) -> Option; -} - -impl CheckedDivPerComponent for Weight { - fn checked_div_per_component(self, other: &Self) -> Option { - let mut all_zero = true; - let ref_time = match self.ref_time().checked_div(other.ref_time()) { - Some(ref_time) => { - all_zero = false; - ref_time - } - None => u64::MAX, - }; - let proof_size = match self.proof_size().checked_div(other.proof_size()) { - Some(proof_size) => { - all_zero = false; - proof_size - } - None => u64::MAX, - }; - if all_zero { - None - } else { - Some(if ref_time < proof_size { ref_time } else { proof_size }) - } - } -} diff --git a/primitives/src/types.rs b/primitives/src/types.rs index 68ce0b1c1..a48a5b00d 100644 --- a/primitives/src/types.rs +++ b/primitives/src/types.rs @@ -21,7 +21,7 @@ pub use crate::{ }; #[cfg(feature = "arbitrary")] use arbitrary::{Arbitrary, Result, Unstructured}; -use frame_support::dispatch::Weight; +use frame_support::weights::Weight; use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; use scale_info::TypeInfo; use sp_runtime::{ @@ -117,7 +117,7 @@ pub type XcmAsset = XcmAssetClass; pub type TxPaymentAssetId = u32; /// Index of a transaction in the chain. -pub type Index = u64; +pub type Nonce = u64; /// A hash of some data used by the chain. pub type Hash = sp_core::H256; diff --git a/runtime/battery-station/Cargo.toml b/runtime/battery-station/Cargo.toml index 7350447ee..417f6bd41 100644 --- a/runtime/battery-station/Cargo.toml +++ b/runtime/battery-station/Cargo.toml @@ -19,11 +19,11 @@ pallet-contracts = { workspace = true } pallet-contracts-primitives = { workspace = true } pallet-democracy = { workspace = true } pallet-identity = { workspace = true } +pallet-insecure-randomness-collective-flip = { workspace = true } pallet-membership = { workspace = true } pallet-multisig = { workspace = true } pallet-preimage = { workspace = true } pallet-proxy = { workspace = true } -pallet-randomness-collective-flip = { workspace = true } pallet-scheduler = { workspace = true } pallet-sudo = { workspace = true } pallet-timestamp = { workspace = true } @@ -79,14 +79,14 @@ session-keys-primitives = { workspace = true, optional = true } # Polkadot -polkadot-parachain = { workspace = true, optional = true } +polkadot-parachain-primitives = { workspace = true, optional = true } # Standalone pallet-aura = { workspace = true } pallet-grandpa = { workspace = true } sp-consensus-aura = { workspace = true } -sp-finality-grandpa = { workspace = true } +sp-consensus-grandpa = { workspace = true } # Utility cfg-if = { workspace = true } @@ -98,6 +98,7 @@ orml-asset-registry = { workspace = true, optional = true } orml-unknown-tokens = { workspace = true, optional = true } orml-xcm-support = { workspace = true, optional = true } orml-xtokens = { workspace = true, optional = true } +pallet-message-queue = { workspace = true, optional = true } pallet-xcm = { workspace = true, optional = true } polkadot-runtime-parachains = { workspace = true, optional = true } rococo-runtime = { workspace = true, optional = true } @@ -127,6 +128,11 @@ zrml-swaps = { workspace = true } zrml-swaps-runtime-api = { workspace = true } [dev-dependencies] +env_logger = { workspace = true } +pallet-im-online = { workspace = true, features = ["default"] } +sp-authority-discovery = { workspace = true, features = ["default"] } +sp-consensus-babe = { workspace = true, features = ["default"] } +sp-consensus-beefy = { workspace = true, features = ["default"] } sp-io = { workspace = true, features = ["default"] } test-case = { workspace = true } xcm-emulator = { workspace = true } @@ -153,7 +159,7 @@ parachain = [ "pallet-author-mapping", "pallet-author-slot-filter", "pallet-parachain-staking", - "polkadot-parachain", + "polkadot-parachain-primitives", "session-keys-primitives", # XCM @@ -162,6 +168,7 @@ parachain = [ "orml-unknown-tokens", "orml-xcm-support", "orml-xtokens", + "pallet-message-queue", "pallet-xcm", "polkadot-runtime-parachains", "rococo-runtime", @@ -250,7 +257,7 @@ std = [ "pallet-multisig/std", "pallet-preimage/std", "pallet-proxy/std", - "pallet-randomness-collective-flip/std", + "pallet-insecure-randomness-collective-flip/std", "pallet-scheduler/std", "pallet-sudo/std", "pallet-timestamp/std", @@ -304,14 +311,14 @@ std = [ # Polkadot "pallet-xcm?/std", - "polkadot-parachain?/std", + "polkadot-parachain-primitives?/std", # Standalone "pallet-aura/std", "pallet-grandpa/std", "sp-consensus-aura/std", - "sp-finality-grandpa/std", + "sp-consensus-grandpa/std", # XCM @@ -319,6 +326,7 @@ std = [ "orml-unknown-tokens?/std", "orml-xcm-support?/std", "orml-xtokens?/std", + "pallet-message-queue?/std", "pallet-xcm?/std", "polkadot-runtime-parachains?/std", "rococo-runtime?/std", @@ -329,6 +337,7 @@ std = [ # Zeitgeist "zeitgeist-primitives/std", + "zrml-asset-router/std", "zrml-authorized/std", "zrml-court/std", "zrml-hybrid-router/std", @@ -355,7 +364,7 @@ try-runtime = [ "frame-system/try-runtime", "frame-support/try-runtime", "pallet-timestamp/try-runtime", - "pallet-randomness-collective-flip/try-runtime", + "pallet-insecure-randomness-collective-flip/try-runtime", "pallet-scheduler/try-runtime", "pallet-preimage/try-runtime", @@ -428,7 +437,7 @@ force-debug = ["sp-debug-derive/force-debug"] [package] authors = ["Zeitgeist PM "] -edition = "2021" +edition.workspace = true name = "battery-station-runtime" version = "0.5.2" diff --git a/runtime/battery-station/src/integration_tests/xcm/genesis/battery_station.rs b/runtime/battery-station/src/integration_tests/xcm/genesis/battery_station.rs new file mode 100644 index 000000000..139765e7d --- /dev/null +++ b/runtime/battery-station/src/integration_tests/xcm/genesis/battery_station.rs @@ -0,0 +1,78 @@ +// Copyright 2024 Forecasting Technologies LTD. +// +// This file is part of Zeitgeist. +// +// Zeitgeist is free software: you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by the +// Free Software Foundation, either version 3 of the License, or (at +// your option) any later version. +// +// Zeitgeist is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Zeitgeist. If not, see . + +use crate::{ + integration_tests::xcm::setup::{ + accounts, ztg, BTC_ID, FOREIGN_PARENT_ID, FOREIGN_SIBLING_ID, FOREIGN_ZTG_ID, + }, + parachain_params::MinCandidateStk, + parameters::ZeitgeistTreasuryAccount, + Asset, +}; +use nimbus_primitives::NimbusId; +use sp_core::storage::Storage; +use sp_runtime::BuildStorage; + +const ENDOWMENT: u128 = ztg(1_000_000); +const SAFE_XCM_VERSION: u32 = 2; + +pub(crate) fn genesis(parachain_id: u32) -> Storage { + let genesis_config = crate::RuntimeGenesisConfig { + author_mapping: crate::AuthorMappingConfig { + mappings: vec![( + accounts::get_from_seed::(accounts::ALICE), + accounts::alice(), + )], + }, + balances: crate::BalancesConfig { + balances: accounts::init_balances().iter().map(|k| (k.clone(), ENDOWMENT)).collect(), + }, + parachain_info: crate::ParachainInfoConfig { + parachain_id: parachain_id.into(), + ..Default::default() + }, + parachain_staking: crate::ParachainStakingConfig { + candidates: vec![(accounts::alice(), MinCandidateStk::get())], + ..Default::default() + }, + polkadot_xcm: crate::PolkadotXcmConfig { + safe_xcm_version: Some(SAFE_XCM_VERSION), + ..Default::default() + }, + system: crate::SystemConfig { + code: crate::WASM_BINARY.unwrap().to_vec(), + ..Default::default() + }, + tokens: crate::TokensConfig { + balances: accounts::init_balances() + .iter() + .chain([(ZeitgeistTreasuryAccount::get())].iter()) + .flat_map(|k| { + vec![ + (k.clone(), Asset::from(FOREIGN_PARENT_ID).try_into().unwrap(), ENDOWMENT), + (k.clone(), Asset::from(FOREIGN_SIBLING_ID).try_into().unwrap(), ENDOWMENT), + (k.clone(), Asset::from(FOREIGN_ZTG_ID).try_into().unwrap(), ENDOWMENT), + (k.clone(), Asset::from(BTC_ID).try_into().unwrap(), ENDOWMENT), + ] + }) + .collect::>(), + }, + ..Default::default() + }; + + genesis_config.build_storage().unwrap() +} diff --git a/runtime/battery-station/src/integration_tests/xcm/genesis/mod.rs b/runtime/battery-station/src/integration_tests/xcm/genesis/mod.rs new file mode 100644 index 000000000..1f5a5cdbe --- /dev/null +++ b/runtime/battery-station/src/integration_tests/xcm/genesis/mod.rs @@ -0,0 +1,19 @@ +// Copyright 2024 Forecasting Technologies LTD. +// +// This file is part of Zeitgeist. +// +// Zeitgeist is free software: you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by the +// Free Software Foundation, either version 3 of the License, or (at +// your option) any later version. +// +// Zeitgeist is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Zeitgeist. If not, see . + +pub(super) mod battery_station; +pub(super) mod rococo; diff --git a/runtime/battery-station/src/integration_tests/xcm/genesis/rococo.rs b/runtime/battery-station/src/integration_tests/xcm/genesis/rococo.rs new file mode 100644 index 000000000..5c7330213 --- /dev/null +++ b/runtime/battery-station/src/integration_tests/xcm/genesis/rococo.rs @@ -0,0 +1,150 @@ +// Copyright 2024 Forecasting Technologies LTD. +// +// Copyright (C) Parity Technologies (UK) Ltd. +// +// This file is part of Zeitgeist. +// +// Zeitgeist is free software: you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by the +// Free Software Foundation, either version 3 of the License, or (at +// your option) any later version. +// +// Zeitgeist is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Zeitgeist. If not, see . + +// TODO(#1325): Replace with crate "rococo-emulated-chain" from Cumulus starting from polkadot-v1.4.0 + +use crate::integration_tests::xcm::setup::{accounts, accounts::get_from_seed, roc}; +use pallet_im_online::sr25519::AuthorityId as ImOnlineId; +use polkadot_primitives::{AccountId, AssignmentId, BlockNumber, ValidatorId}; +use polkadot_runtime_parachains::configuration::HostConfiguration; +use sp_authority_discovery::AuthorityId as AuthorityDiscoveryId; +use sp_consensus_babe::AuthorityId as BabeId; +use sp_consensus_beefy::ecdsa_crypto::AuthorityId as BeefyId; +use sp_consensus_grandpa::AuthorityId as GrandpaId; +use sp_core::{sr25519, storage::Storage}; +use sp_runtime::BuildStorage; +use xcm_emulator::helpers::get_account_id_from_seed; + +const ENDOWMENT: u128 = roc(1_000_000); + +fn session_keys( + grandpa: GrandpaId, + babe: BabeId, + im_online: ImOnlineId, + para_validator: ValidatorId, + para_assignment: AssignmentId, + authority_discovery: AuthorityDiscoveryId, + beefy: BeefyId, +) -> rococo_runtime::SessionKeys { + rococo_runtime::SessionKeys { + grandpa, + babe, + im_online, + para_validator, + para_assignment, + authority_discovery, + beefy, + } +} + +fn get_host_config() -> HostConfiguration { + HostConfiguration { + max_upward_queue_count: 10, + max_upward_queue_size: 51200, + max_upward_message_size: 51200, + max_upward_message_num_per_candidate: 10, + max_downward_message_size: 51200, + hrmp_sender_deposit: 0, + hrmp_recipient_deposit: 0, + hrmp_channel_max_capacity: 1000, + hrmp_channel_max_message_size: 102400, + hrmp_channel_max_total_size: 102400, + hrmp_max_parachain_outbound_channels: 30, + hrmp_max_parachain_inbound_channels: 30, + ..Default::default() + } +} + +mod validators { + use super::*; + + #[allow(clippy::type_complexity)] + pub fn initial_authorities() -> Vec<( + AccountId, + AccountId, + GrandpaId, + BabeId, + ImOnlineId, + ValidatorId, + AssignmentId, + AuthorityDiscoveryId, + BeefyId, + )> { + let seed = "Alice"; + vec![( + get_account_id_from_seed::(&format!("{}//stash", seed)), + get_account_id_from_seed::(seed), + get_from_seed::(seed), + get_from_seed::(seed), + get_from_seed::(seed), + get_from_seed::(seed), + get_from_seed::(seed), + get_from_seed::(seed), + get_from_seed::(seed), + )] + } +} + +pub(crate) fn genesis() -> Storage { + let genesis_config = rococo_runtime::RuntimeGenesisConfig { + system: rococo_runtime::SystemConfig { + code: rococo_runtime::WASM_BINARY.unwrap().to_vec(), + ..Default::default() + }, + balances: rococo_runtime::BalancesConfig { + balances: accounts::init_balances().iter().map(|k| (k.clone(), ENDOWMENT)).collect(), + }, + session: rococo_runtime::SessionConfig { + keys: validators::initial_authorities() + .iter() + .map(|x| { + ( + x.0.clone(), + x.0.clone(), + session_keys( + x.2.clone(), + x.3.clone(), + x.4.clone(), + x.5.clone(), + x.6.clone(), + x.7.clone(), + x.8.clone(), + ), + ) + }) + .collect::>(), + }, + babe: rococo_runtime::BabeConfig { + authorities: Default::default(), + epoch_config: Some(rococo_runtime::BABE_GENESIS_EPOCH_CONFIG), + ..Default::default() + }, + sudo: rococo_runtime::SudoConfig { + key: Some(get_account_id_from_seed::("Alice")), + }, + configuration: rococo_runtime::ConfigurationConfig { config: get_host_config() }, + registrar: rococo_runtime::RegistrarConfig { + next_free_para_id: polkadot_primitives::LOWEST_PUBLIC_ID, + ..Default::default() + }, + ..Default::default() + }; + + genesis_config.build_storage().unwrap() +} diff --git a/runtime/battery-station/src/integration_tests/xcm/mod.rs b/runtime/battery-station/src/integration_tests/xcm/mod.rs index d37a62036..9ba9a1de3 100644 --- a/runtime/battery-station/src/integration_tests/xcm/mod.rs +++ b/runtime/battery-station/src/integration_tests/xcm/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2022 Forecasting Technologies LTD. +// Copyright 2022-2024 Forecasting Technologies LTD. // // This file is part of Zeitgeist. // @@ -17,6 +17,7 @@ #![cfg(all(feature = "parachain", test))] +mod genesis; mod setup; mod test_net; mod tests; diff --git a/runtime/battery-station/src/integration_tests/xcm/setup.rs b/runtime/battery-station/src/integration_tests/xcm/setup.rs index 092184ade..7c54fc5e5 100644 --- a/runtime/battery-station/src/integration_tests/xcm/setup.rs +++ b/runtime/battery-station/src/integration_tests/xcm/setup.rs @@ -1,5 +1,4 @@ // Copyright 2022-2024 Forecasting Technologies LTD. -// Copyright 2021 Centrifuge Foundation (centrifuge.io). // // This file is part of Zeitgeist. // @@ -18,92 +17,70 @@ use crate::{ xcm_config::config::{battery_station, general_key}, - AccountId, AssetRegistry, Assets, Balance, ExistentialDeposit, Runtime, RuntimeOrigin, System, + AccountId, AssetRegistry, AssetRegistryStringLimit, Balance, ExistentialDeposit, RuntimeOrigin, }; -use frame_support::{assert_ok, traits::GenesisBuild}; +use frame_support::assert_ok; use orml_traits::asset_registry::AssetMetadata; -use sp_runtime::AccountId32; +use sp_core::{sr25519, Pair, Public}; use xcm::{ latest::{Junction::Parachain, Junctions::X2, MultiLocation}, VersionedMultiLocation, }; +use xcm_emulator::helpers::get_account_id_from_seed; use zeitgeist_primitives::types::{CustomMetadata, XcmAsset}; -pub(super) struct ExtBuilder { - balances: Vec<(AccountId, Assets, Balance)>, - parachain_id: u32, -} - -impl Default for ExtBuilder { - fn default() -> Self { - Self { balances: vec![], parachain_id: battery_station::ID } +pub(super) mod accounts { + use super::*; + pub const ALICE: &str = "Alice"; + pub const BOB: &str = "Bob"; + pub const CHARLIE: &str = "Charlie"; + pub const DAVE: &str = "Dave"; + pub const EVE: &str = "Eve"; + pub const FERDIE: &str = "Ferdie"; + pub const ALICE_STASH: &str = "Alice//stash"; + pub const BOB_STASH: &str = "Bob//stash"; + pub const CHARLIE_STASH: &str = "Charlie//stash"; + pub const DAVE_STASH: &str = "Dave//stash"; + pub const EVE_STASH: &str = "Eve//stash"; + pub const FERDIE_STASH: &str = "Ferdie//stash"; + + pub fn init_balances() -> Vec { + vec![ + get_account_id_from_seed::(ALICE), + get_account_id_from_seed::(BOB), + get_account_id_from_seed::(CHARLIE), + get_account_id_from_seed::(DAVE), + get_account_id_from_seed::(EVE), + get_account_id_from_seed::(FERDIE), + get_account_id_from_seed::(ALICE_STASH), + get_account_id_from_seed::(BOB_STASH), + get_account_id_from_seed::(CHARLIE_STASH), + get_account_id_from_seed::(DAVE_STASH), + get_account_id_from_seed::(EVE_STASH), + get_account_id_from_seed::(FERDIE_STASH), + ] } -} -impl ExtBuilder { - pub fn set_balances(mut self, balances: Vec<(AccountId, Assets, Balance)>) -> Self { - self.balances = balances; - self + pub fn alice() -> AccountId { + get_account_id_from_seed::(ALICE) } - pub fn set_parachain_id(mut self, parachain_id: u32) -> Self { - self.parachain_id = parachain_id; - self + pub fn bob() -> AccountId { + get_account_id_from_seed::(BOB) } - pub fn build(self) -> sp_io::TestExternalities { - let mut t = frame_system::GenesisConfig::default().build_storage::().unwrap(); - let native_currency_id = Assets::Ztg; - pallet_balances::GenesisConfig:: { - balances: self - .balances - .clone() - .into_iter() - .filter(|(_, currency_id, _)| *currency_id == native_currency_id) - .map(|(account_id, _, initial_balance)| (account_id, initial_balance)) - .collect::>(), - } - .assimilate_storage(&mut t) - .unwrap(); - - orml_tokens::GenesisConfig:: { - balances: self - .balances - .into_iter() - .filter(|(_, currency_id, _)| *currency_id != native_currency_id) - .map(|(account_id, currency_id, initial_balance)| { - (account_id, currency_id.try_into().unwrap(), initial_balance) - }) - .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)); - ext + /// Helper function to generate a crypto pair from seed + pub fn get_from_seed(seed: &str) -> ::Public { + TPublic::Pair::from_string(&format!("//{}", seed), None) + .expect("static values are valid; qed") + .public() } } -/// Accounts -pub const ALICE: AccountId32 = AccountId32::new([0u8; 32]); -pub const BOB: AccountId32 = AccountId32::new([1u8; 32]); - /// A PARA ID used for a sibling parachain. /// It must be one that doesn't collide with any other in use. pub const PARA_ID_SIBLING: u32 = 3000; +pub const PARA_ID_BATTERY_STATION: u32 = battery_station::ID; /// IDs that are used to represent tokens from other chains pub const FOREIGN_ZTG_ID: XcmAsset = XcmAsset::ForeignAsset(0); @@ -148,7 +125,7 @@ pub(super) const fn adjusted_balance(foreign_base: Balance, amount: Balance) -> // Multilocations that are used to represent tokens from other chains #[inline] pub(super) fn foreign_ztg_multilocation() -> MultiLocation { - MultiLocation::new(1, X2(Parachain(battery_station::ID), general_key(battery_station::KEY))) + MultiLocation::new(1, X2(Parachain(PARA_ID_BATTERY_STATION), general_key(battery_station::KEY))) } #[inline] @@ -163,10 +140,10 @@ pub(super) fn foreign_parent_multilocation() -> MultiLocation { pub(super) fn register_foreign_ztg(additional_meta: Option) { // Register ZTG as foreign asset. - let meta: AssetMetadata = AssetMetadata { + let meta: AssetMetadata = AssetMetadata { decimals: 10, - name: "Zeitgeist".into(), - symbol: "ZTG".into(), + name: "Zeitgeist".as_bytes().to_vec().try_into().unwrap(), + symbol: "ZTG".as_bytes().to_vec().try_into().unwrap(), existential_deposit: ExistentialDeposit::get(), location: Some(VersionedMultiLocation::V3(foreign_ztg_multilocation())), additional: additional_meta.unwrap_or_default(), @@ -176,10 +153,10 @@ pub(super) fn register_foreign_ztg(additional_meta: Option) { } pub(super) fn register_btc(additional_meta: Option) { - let meta: AssetMetadata = AssetMetadata { + let meta: AssetMetadata = AssetMetadata { decimals: 8, - name: "Bitcoin".into(), - symbol: "BTC".into(), + name: "Bitcoin".as_bytes().to_vec().try_into().unwrap(), + symbol: "BTC".as_bytes().to_vec().try_into().unwrap(), existential_deposit: ExistentialDeposit::get(), location: Some(VersionedMultiLocation::V3(foreign_sibling_multilocation())), additional: additional_meta.unwrap_or_default(), @@ -190,10 +167,10 @@ pub(super) fn register_btc(additional_meta: Option) { pub(super) fn register_foreign_sibling(additional_meta: Option) { // Register native Sibling token as foreign asset. - let meta: AssetMetadata = AssetMetadata { + let meta: AssetMetadata = AssetMetadata { decimals: 10, - name: "Sibling".into(), - symbol: "SBL".into(), + name: "Sibling".as_bytes().to_vec().try_into().unwrap(), + symbol: "SBL".as_bytes().to_vec().try_into().unwrap(), existential_deposit: ExistentialDeposit::get(), location: Some(VersionedMultiLocation::V3(foreign_sibling_multilocation())), additional: additional_meta.unwrap_or_default(), @@ -208,10 +185,10 @@ pub(super) fn register_foreign_sibling(additional_meta: Option) pub(super) fn register_foreign_parent(additional_meta: Option) { // Register roc as foreign asset in the sibling parachain - let meta: AssetMetadata = AssetMetadata { + let meta: AssetMetadata = AssetMetadata { decimals: 12, - name: "Rococo".into(), - symbol: "ROC".into(), + name: "Rococo".as_bytes().to_vec().try_into().unwrap(), + symbol: "ROC".as_bytes().to_vec().try_into().unwrap(), existential_deposit: 33_333_333, // 0.0033333333 location: Some(VersionedMultiLocation::V3(foreign_parent_multilocation())), additional: additional_meta.unwrap_or_default(), @@ -227,12 +204,12 @@ pub(super) fn sibling_parachain_account() -> AccountId { #[inline] pub(super) fn zeitgeist_parachain_account() -> AccountId { - parachain_account(battery_station::ID) + parachain_account(PARA_ID_BATTERY_STATION) } #[inline] fn parachain_account(id: u32) -> AccountId { use sp_runtime::traits::AccountIdConversion; - polkadot_parachain::primitives::Sibling::from(id).into_account_truncating() + polkadot_parachain_primitives::primitives::Sibling::from(id).into_account_truncating() } diff --git a/runtime/battery-station/src/integration_tests/xcm/test_net.rs b/runtime/battery-station/src/integration_tests/xcm/test_net.rs index 2ee922bc5..8b11bc5ef 100644 --- a/runtime/battery-station/src/integration_tests/xcm/test_net.rs +++ b/runtime/battery-station/src/integration_tests/xcm/test_net.rs @@ -1,5 +1,4 @@ // Copyright 2022-2024 Forecasting Technologies LTD. -// Copyright 2021-2022 Centrifuge GmbH (centrifuge.io). // // This file is part of Zeitgeist. // @@ -16,134 +15,80 @@ // You should have received a copy of the GNU General Public License // along with Zeitgeist. If not, see . +use super::{ + genesis::{battery_station, rococo}, + setup::{PARA_ID_BATTERY_STATION, PARA_ID_SIBLING}, +}; use crate::{ - parameters::ZeitgeistTreasuryAccount, xcm_config::config::battery_station, Assets, DmpQueue, - Runtime, RuntimeOrigin, XcmpQueue, + xcm_config::config::LocationToAccountId, AssetManager, Balances, DmpQueue, ParachainInfo, + PolkadotXcm, XTokens, XcmpQueue, }; -use frame_support::{traits::GenesisBuild, weights::Weight}; -use polkadot_primitives::{ - runtime_api::runtime_decl_for_ParachainHost::ParachainHostV3, - v2::{BlockNumber, MAX_CODE_SIZE, MAX_POV_SIZE}, +use xcm_emulator::{ + decl_test_networks, decl_test_parachains, decl_test_relay_chains, DefaultMessageProcessor, }; -use polkadot_runtime_parachains::configuration::HostConfiguration; -use xcm_emulator::{decl_test_network, decl_test_parachain, decl_test_relay_chain}; - -use super::setup::{roc, ztg, ExtBuilder, ALICE, FOREIGN_PARENT_ID, PARA_ID_SIBLING}; - -decl_test_relay_chain! { - pub struct RococoNet { - Runtime = rococo_runtime::Runtime, - XcmConfig = rococo_runtime::xcm_config::XcmConfig, - new_ext = relay_ext(), - } -} -decl_test_parachain! { - pub struct Zeitgeist { - Runtime = Runtime, - RuntimeOrigin = RuntimeOrigin, - XcmpMessageHandler = XcmpQueue, - DmpMessageHandler = DmpQueue, - new_ext = para_ext(battery_station::ID), - } +decl_test_relay_chains! { + #[api_version(5)] + pub struct Rococo { + genesis = rococo::genesis(), + on_init = (), + runtime = rococo_runtime, + core = { + MessageProcessor: DefaultMessageProcessor, + SovereignAccountOf: rococo_runtime::xcm_config::LocationConverter, + }, + pallets = { + XcmPallet: rococo_runtime::XcmPallet, + Sudo: rococo_runtime::Sudo, + Balances: rococo_runtime::Balances, + } + }, } -decl_test_parachain! { +decl_test_parachains! { + pub struct BatteryStation { + genesis = battery_station::genesis(PARA_ID_BATTERY_STATION), + on_init = (), + runtime = crate, + core = { + XcmpMessageHandler: XcmpQueue, + DmpMessageHandler: DmpQueue, + LocationToAccountId: LocationToAccountId, + ParachainInfo: ParachainInfo, + }, + pallets = { + PolkadotXcm: PolkadotXcm, + AssetManager: AssetManager, + Balances: Balances, + XTokens: XTokens, + } + }, pub struct Sibling { - Runtime = Runtime, - RuntimeOrigin = RuntimeOrigin, - XcmpMessageHandler = XcmpQueue, - DmpMessageHandler = DmpQueue, - new_ext = para_ext(PARA_ID_SIBLING), - } + genesis = battery_station::genesis(PARA_ID_SIBLING), + on_init = (), + runtime = crate, + core = { + XcmpMessageHandler: XcmpQueue, + DmpMessageHandler: DmpQueue, + LocationToAccountId: LocationToAccountId, + ParachainInfo: ParachainInfo, + }, + pallets = { + PolkadotXcm: PolkadotXcm, + AssetManager: AssetManager, + Balances: Balances, + XTokens: XTokens, + } + }, } -decl_test_network! { +decl_test_networks! { pub struct TestNet { - relay_chain = RococoNet, + relay_chain = Rococo, parachains = vec![ - // N.B: Ideally, we could use the defined para id constants but doing so - // fails with: "error: arbitrary expressions aren't allowed in patterns" - - // Be sure to use `xcm_config::config::battery_station::ID` - (2101, Zeitgeist), - // Be sure to use `PARA_ID_SIBLING` - (3000, Sibling), + BatteryStation, + Sibling, ], - } -} - -pub(super) fn relay_ext() -> sp_io::TestExternalities { - use rococo_runtime::{Runtime, System}; - - let mut t = frame_system::GenesisConfig::default().build_storage::().unwrap(); - - pallet_balances::GenesisConfig:: { balances: vec![(ALICE, roc(2002))] } - .assimilate_storage(&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(2) }, - &mut t, - ) - .unwrap(); - - let mut ext = sp_io::TestExternalities::new(t); - ext.execute_with(|| System::set_block_number(1)); - ext -} - -pub(super) fn para_ext(parachain_id: u32) -> sp_io::TestExternalities { - ExtBuilder::default() - .set_balances(vec![ - (ALICE, Assets::Ztg, ztg(10)), - (ALICE, FOREIGN_PARENT_ID.into(), roc(10)), - (ZeitgeistTreasuryAccount::get(), FOREIGN_PARENT_ID.into(), roc(1)), - ]) - .set_parachain_id(parachain_id) - .build() -} - -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_ref_time(4_u64 * 1_000_000_000_u64), - max_upward_message_size: 50 * 1024, - max_upward_message_num_per_candidate: 5, - hrmp_sender_deposit: 0, - hrmp_recipient_deposit: 0, - hrmp_channel_max_capacity: 8, - hrmp_channel_max_total_size: 8 * 1024, - hrmp_max_parachain_inbound_channels: 4, - hrmp_max_parathread_inbound_channels: 4, - hrmp_channel_max_message_size: 1024 * 1024, - 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() + bridge = () } } diff --git a/runtime/battery-station/src/integration_tests/xcm/tests/currency_id_convert.rs b/runtime/battery-station/src/integration_tests/xcm/tests/currency_id_convert.rs index e28c94407..c568b95a1 100644 --- a/runtime/battery-station/src/integration_tests/xcm/tests/currency_id_convert.rs +++ b/runtime/battery-station/src/integration_tests/xcm/tests/currency_id_convert.rs @@ -21,37 +21,41 @@ use crate::{ setup::{ foreign_parent_multilocation, foreign_sibling_multilocation, foreign_ztg_multilocation, register_foreign_parent, register_foreign_sibling, FOREIGN_PARENT_ID, - FOREIGN_SIBLING_ID, + FOREIGN_SIBLING_ID, PARA_ID_BATTERY_STATION, }, - test_net::Zeitgeist, + test_net::BatteryStation, }, xcm_config::config::{battery_station, general_key, AssetConvert}, Assets, CustomMetadata, ScalarPosition, XcmAsset, }; use core::fmt::Debug; -use frame_support::assert_err; -use sp_runtime::traits::Convert as C2; +use sp_runtime::traits::{Convert, MaybeEquivalence}; use test_case::test_case; use xcm::latest::{Junction::*, Junctions::*, MultiLocation}; use xcm_emulator::TestExt; -use xcm_executor::traits::Convert as C1; fn convert_common_native(expected: T) where T: Copy + Debug + PartialEq, - AssetConvert: C1 + C2>, + AssetConvert: MaybeEquivalence + Convert>, { assert_eq!(battery_station::KEY.to_vec(), vec![0, 1]); - // The way Ztg is represented relative within the Zeitgeist runtime + // The way Ztg is represented relative within the Battery Station runtime let ztg_location_inner: MultiLocation = MultiLocation::new(0, X1(general_key(battery_station::KEY))); - assert_eq!(>::convert(ztg_location_inner), Ok(expected)); + assert_eq!( + >::convert(&ztg_location_inner), + Some(expected) + ); // The canonical way Ztg is represented out in the wild - Zeitgeist::execute_with(|| { - assert_eq!(>::convert(expected), Some(foreign_ztg_multilocation())) + BatteryStation::execute_with(|| { + assert_eq!( + >::convert(expected), + Some(foreign_ztg_multilocation()) + ) }); } @@ -61,15 +65,18 @@ fn convert_common_non_native( register: fn(Option), ) where T: Copy + Debug + PartialEq, - AssetConvert: C1 + C2>, + AssetConvert: MaybeEquivalence + Convert>, { - Zeitgeist::execute_with(|| { - assert_err!(>::convert(multilocation), multilocation); - assert_eq!(>::convert(expected), None); - // Register parent as foreign asset in the Zeitgeist parachain + BatteryStation::execute_with(|| { + assert_eq!(>::convert(&multilocation), None); + assert_eq!(>::convert(expected), None); + // Register parent as foreign asset in the BatteryStation parachain register(None); - assert_eq!(>::convert(multilocation), Ok(expected)); - assert_eq!(>::convert(expected), Some(multilocation)); + assert_eq!( + >::convert(&multilocation), + Some(expected) + ); + assert_eq!(>::convert(expected), Some(multilocation)); }); } @@ -122,10 +129,12 @@ fn convert_any_registered_sibling_multilocation_xcm_assets() { #[test] fn convert_unkown_multilocation() { let unknown_location: MultiLocation = - MultiLocation::new(1, X2(Parachain(battery_station::ID), general_key(&[42]))); + MultiLocation::new(1, X2(Parachain(PARA_ID_BATTERY_STATION), general_key(&[42]))); - Zeitgeist::execute_with(|| { - assert!(>::convert(unknown_location).is_err()); + BatteryStation::execute_with(|| { + assert!( + >::convert(&unknown_location).is_none() + ); }); } @@ -164,7 +173,9 @@ fn convert_unkown_multilocation() { fn convert_unsupported_asset(asset: T) where T: Copy + Debug + PartialEq, - AssetConvert: C2>, + AssetConvert: Convert>, { - Zeitgeist::execute_with(|| assert_eq!(>::convert(asset), None)); + BatteryStation::execute_with(|| { + assert_eq!(>::convert(asset), None) + }); } diff --git a/runtime/battery-station/src/integration_tests/xcm/tests/transfers.rs b/runtime/battery-station/src/integration_tests/xcm/tests/transfers.rs index 109a388dd..825bbdbc1 100644 --- a/runtime/battery-station/src/integration_tests/xcm/tests/transfers.rs +++ b/runtime/battery-station/src/integration_tests/xcm/tests/transfers.rs @@ -19,21 +19,21 @@ use crate::{ integration_tests::xcm::{ setup::{ + accounts::{alice, bob}, adjusted_balance, btc, register_btc, register_foreign_parent, register_foreign_ztg, - roc, sibling_parachain_account, zeitgeist_parachain_account, ztg, ALICE, BOB, BTC_ID, - FOREIGN_PARENT_ID, FOREIGN_ZTG_ID, PARA_ID_SIBLING, + roc, sibling_parachain_account, zeitgeist_parachain_account, ztg, BTC_ID, + FOREIGN_PARENT_ID, FOREIGN_ZTG_ID, PARA_ID_BATTERY_STATION, PARA_ID_SIBLING, }, - test_net::{RococoNet, Sibling, TestNet, Zeitgeist}, + test_net::{BatteryStation, Rococo, Sibling}, }, - xcm_config::{config::battery_station, fees::default_per_second}, - AssetManager, AssetRegistry, Balance, Balances, RuntimeOrigin, XTokens, - ZeitgeistTreasuryAccount, + xcm_config::fees::default_per_second, + AssetManager, Balance, Balances, RuntimeOrigin, XTokens, ZeitgeistTreasuryAccount, }; -use frame_support::assert_ok; +use frame_support::{assert_ok, traits::tokens::fungible::Mutate}; use orml_traits::MultiCurrency; use xcm::latest::{Junction, Junction::*, Junctions::*, MultiLocation, WeightLimit}; -use xcm_emulator::TestExt; +use xcm_emulator::{RelayChain, TestExt}; use zeitgeist_primitives::{ constants::{BalanceFractionalDecimals, BASE}, types::{CustomMetadata, XcmAsset, XcmMetadata}, @@ -41,24 +41,23 @@ use zeitgeist_primitives::{ #[test] fn transfer_ztg_to_sibling() { - TestNet::reset(); - - let alice_initial_balance = ztg(10); + let mut alice_initial_balance = 0; + let mut bob_initial_balance = 0; let transfer_amount = ztg(5); let mut treasury_initial_balance = 0; Sibling::execute_with(|| { treasury_initial_balance = AssetManager::free_balance(FOREIGN_ZTG_ID.into(), &ZeitgeistTreasuryAccount::get()); - assert_eq!(AssetManager::free_balance(FOREIGN_ZTG_ID.into(), &BOB), 0); + bob_initial_balance = AssetManager::free_balance(FOREIGN_ZTG_ID.into(), &bob()); register_foreign_ztg(None); }); - Zeitgeist::execute_with(|| { - assert_eq!(Balances::free_balance(&ALICE), alice_initial_balance); + BatteryStation::execute_with(|| { + alice_initial_balance = Balances::free_balance(alice()); assert_eq!(Balances::free_balance(sibling_parachain_account()), 0); assert_ok!(XTokens::transfer( - RuntimeOrigin::signed(ALICE), + RuntimeOrigin::signed(alice()), XcmAsset::Ztg, transfer_amount, Box::new( @@ -66,7 +65,7 @@ fn transfer_ztg_to_sibling() { 1, X2( Parachain(PARA_ID_SIBLING), - Junction::AccountId32 { network: None, id: BOB.into() } + Junction::AccountId32 { network: None, id: bob().into() } ) ) .into() @@ -75,92 +74,140 @@ fn transfer_ztg_to_sibling() { )); // Confirm that Alice's balance is initial_balance - amount_transferred - assert_eq!(Balances::free_balance(&ALICE), alice_initial_balance - transfer_amount); - + assert_eq!(Balances::free_balance(alice()), alice_initial_balance - transfer_amount); // Verify that the amount transferred is now part of the sibling account here assert_eq!(Balances::free_balance(sibling_parachain_account()), transfer_amount); }); Sibling::execute_with(|| { - let current_balance = AssetManager::free_balance(FOREIGN_ZTG_ID.into(), &BOB); - - // Verify that BOB now has (amount transferred - fee) - assert_eq!(current_balance, transfer_amount - ztg_fee()); + let current_balance = AssetManager::free_balance(FOREIGN_ZTG_ID.into(), &bob()); + let bob_expected = bob_initial_balance + transfer_amount - ztg_fee(); + let treasury_expected = treasury_initial_balance + ztg_fee(); + // Verify that bob() now has (amount transferred - fee) + assert_eq!(current_balance, bob_expected); // Verify that fees (of foreign currency) have been put into treasury assert_eq!( AssetManager::free_balance(FOREIGN_ZTG_ID.into(), &ZeitgeistTreasuryAccount::get()), - treasury_initial_balance + ztg_fee() + treasury_expected ) }); } #[test] -fn transfer_ztg_sibling_to_zeitgeist() { - TestNet::reset(); +fn transfer_ztg_to_sibling_with_custom_fee() { + // 10x fee factor, so ZTG has 10x the worth of sibling currency. + let fee_factor = 100_000_000_000; + let transfer_amount = ztg(5); + let mut treasury_initial_balance = 0; + let mut bob_initial_balance = 0; - // In order to be able to transfer ZTG from Sibling to Zeitgeist, we need to first send - // ZTG from Zeitgeist to Sibling, or else it fails since it'd be like Sibling had minted - // ZTG on their side. - transfer_ztg_to_sibling(); + Sibling::execute_with(|| { + treasury_initial_balance = + AssetManager::free_balance(FOREIGN_ZTG_ID.into(), &ZeitgeistTreasuryAccount::get()); + bob_initial_balance = AssetManager::free_balance(FOREIGN_ZTG_ID.into(), &bob()); + let custom_metadata = CustomMetadata { + xcm: XcmMetadata { fee_factor: Some(fee_factor) }, + ..Default::default() + }; + register_foreign_ztg(Some(custom_metadata)); + }); - let alice_initial_balance = ztg(5); - let bob_initial_balance = ztg(5) - ztg_fee(); + BatteryStation::execute_with(|| { + let alice_initial_balance = Balances::free_balance(alice()); + assert_eq!(Balances::free_balance(sibling_parachain_account()), 0); + assert_ok!(XTokens::transfer( + RuntimeOrigin::signed(alice()), + XcmAsset::Ztg, + transfer_amount, + Box::new( + MultiLocation::new( + 1, + X2( + Parachain(PARA_ID_SIBLING), + Junction::AccountId32 { network: None, id: bob().into() } + ) + ) + .into() + ), + WeightLimit::Limited(4_000_000_000.into()), + )); + // Confirm that Alice's balance is initial_balance - amount_transferred + assert_eq!(Balances::free_balance(alice()), alice_initial_balance - transfer_amount); + // Verify that the amount transferred is now part of the sibling account here + assert_eq!(Balances::free_balance(sibling_parachain_account()), transfer_amount); + }); + + Sibling::execute_with(|| { + let current_balance = AssetManager::free_balance(FOREIGN_ZTG_ID.into(), &bob()); + let custom_fee = ztg_fee() * fee_factor / BASE; + let bob_expected = bob_initial_balance + transfer_amount - custom_fee; + let treasury_expected = treasury_initial_balance + custom_fee; + + // Verify that bob() now has (amount transferred - fee) + assert_eq!(current_balance, bob_expected); + // Verify that fees (of foreign currency) have been put into treasury + assert_eq!( + AssetManager::free_balance(FOREIGN_ZTG_ID.into(), &ZeitgeistTreasuryAccount::get()), + treasury_expected + ) + }); +} + +#[test] +fn transfer_ztg_sibling_to_zeitgeist() { + let mut alice_initial_balance = 0; let mut treasury_initial_balance = 0; - let sibling_sovereign_initial_balance = ztg(5); let transfer_amount = ztg(1); - // Note: This asset was registered in `transfer_ztg_to_sibling` + let sibling_initial_balance = transfer_amount; - Zeitgeist::execute_with(|| { + BatteryStation::execute_with(|| { treasury_initial_balance = Balances::free_balance(ZeitgeistTreasuryAccount::get()); - - assert_eq!(Balances::free_balance(&ALICE), alice_initial_balance); + alice_initial_balance = Balances::free_balance(alice()); assert_eq!( - Balances::free_balance(sibling_parachain_account()), - sibling_sovereign_initial_balance + Balances::set_balance(&sibling_parachain_account(), sibling_initial_balance), + sibling_initial_balance ); }); Sibling::execute_with(|| { - assert_eq!(Balances::free_balance(zeitgeist_parachain_account()), 0); - assert_eq!(AssetManager::free_balance(FOREIGN_ZTG_ID.into(), &BOB), bob_initial_balance); + register_foreign_ztg(None); + let bob_initial_balance = AssetManager::free_balance(FOREIGN_ZTG_ID.into(), &bob()); + assert_ok!(XTokens::transfer( - RuntimeOrigin::signed(BOB), + RuntimeOrigin::signed(bob()), FOREIGN_ZTG_ID, transfer_amount, Box::new( MultiLocation::new( 1, X2( - Parachain(battery_station::ID), - Junction::AccountId32 { network: None, id: ALICE.into() } + Parachain(PARA_ID_BATTERY_STATION), + Junction::AccountId32 { network: None, id: alice().into() } ) ) .into() ), WeightLimit::Limited(4_000_000_000.into()), )); - // Confirm that Bobs's balance is initial balance - amount transferred assert_eq!( - AssetManager::free_balance(FOREIGN_ZTG_ID.into(), &BOB), + AssetManager::free_balance(FOREIGN_ZTG_ID.into(), &bob()), bob_initial_balance - transfer_amount ); }); - Zeitgeist::execute_with(|| { - // Verify that ALICE now has initial balance + amount transferred - fee + BatteryStation::execute_with(|| { + // Verify that alice() now has initial balance + amount transferred - fee assert_eq!( - Balances::free_balance(&ALICE), + Balances::free_balance(alice()), alice_initial_balance + transfer_amount - ztg_fee(), ); - // Verify that the reserve has been adjusted properly assert_eq!( Balances::free_balance(sibling_parachain_account()), - sibling_sovereign_initial_balance - transfer_amount + sibling_initial_balance - transfer_amount ); - // Verify that fees (of native currency) have been put into treasury assert_eq!( Balances::free_balance(ZeitgeistTreasuryAccount::get()), @@ -171,35 +218,28 @@ fn transfer_ztg_sibling_to_zeitgeist() { #[test] fn transfer_btc_sibling_to_zeitgeist() { - TestNet::reset(); - - let sibling_alice_initial_balance = ztg(10); - let zeitgeist_alice_initial_balance = btc(0); - let initial_sovereign_balance = btc(100); + let mut zeitgeist_alice_initial_balance = 0; let transfer_amount = btc(100); let mut treasury_initial_balance = 0; - Zeitgeist::execute_with(|| { + BatteryStation::execute_with(|| { register_btc(None); treasury_initial_balance = AssetManager::free_balance(BTC_ID.into(), &ZeitgeistTreasuryAccount::get()); - assert_eq!( - AssetManager::free_balance(BTC_ID.into(), &ALICE), - zeitgeist_alice_initial_balance, - ); + zeitgeist_alice_initial_balance = AssetManager::free_balance(BTC_ID.into(), &alice()); }); Sibling::execute_with(|| { - assert_eq!(Balances::free_balance(&ALICE), sibling_alice_initial_balance); + let alice_initial_balance = Balances::free_balance(alice()); + let initial_sovereign_balance = transfer_amount; + // Set the sovereign balance such that it is not subject to dust collection - assert_ok!(Balances::set_balance( - RuntimeOrigin::root(), - zeitgeist_parachain_account().into(), - initial_sovereign_balance, - 0 - )); + assert_eq!( + Balances::set_balance(&zeitgeist_parachain_account(), initial_sovereign_balance,), + initial_sovereign_balance + ); assert_ok!(XTokens::transfer( - RuntimeOrigin::signed(ALICE), + RuntimeOrigin::signed(alice()), // Target chain will interpret XcmAsset::Ztg as BTC in this context. XcmAsset::Ztg, transfer_amount, @@ -207,18 +247,16 @@ fn transfer_btc_sibling_to_zeitgeist() { MultiLocation::new( 1, X2( - Parachain(battery_station::ID), - Junction::AccountId32 { network: None, id: ALICE.into() } + Parachain(PARA_ID_BATTERY_STATION), + Junction::AccountId32 { network: None, id: alice().into() } ) ) .into() ), WeightLimit::Limited(4_000_000_000.into()), )); - // Confirm that Alice's balance is initial_balance - amount_transferred - assert_eq!(Balances::free_balance(&ALICE), sibling_alice_initial_balance - transfer_amount); - + assert_eq!(Balances::free_balance(alice()), alice_initial_balance - transfer_amount); // Verify that the amount transferred is now part of the zeitgeist account here assert_eq!( Balances::free_balance(zeitgeist_parachain_account()), @@ -226,42 +264,46 @@ fn transfer_btc_sibling_to_zeitgeist() { ); }); - Zeitgeist::execute_with(|| { + BatteryStation::execute_with(|| { let expected = transfer_amount - btc_fee(); let expected_adjusted = adjusted_balance(btc(1), expected); + let expected_treasury = treasury_initial_balance + adjusted_balance(btc(1), btc_fee()); // Verify that remote Alice now has initial balance + amount transferred - fee assert_eq!( - AssetManager::free_balance(BTC_ID.into(), &ALICE), + AssetManager::free_balance(BTC_ID.into(), &alice()), zeitgeist_alice_initial_balance + expected_adjusted, ); - // Verify that fees (of foreign currency) have been put into treasury assert_eq!( AssetManager::free_balance(BTC_ID.into(), &ZeitgeistTreasuryAccount::get()), // Align decimal fractional places - treasury_initial_balance + adjusted_balance(btc(1), btc_fee()) + expected_treasury ) }); } #[test] fn transfer_btc_zeitgeist_to_sibling() { - TestNet::reset(); - - let transfer_amount = btc(100) - btc_fee(); - let initial_sovereign_balance = 2 * btc(100); - let sibling_bob_initial_balance = btc(0); - - transfer_btc_sibling_to_zeitgeist(); + let transfer_amount = btc(100); + let initial_sovereign_balance = transfer_amount; + let mut bob_initial_balance = 0; Sibling::execute_with(|| { - assert_eq!(AssetManager::free_balance(BTC_ID.into(), &BOB), sibling_bob_initial_balance,); + bob_initial_balance = Balances::free_balance(bob()); + // Set the sovereign balance such that it is not subject to dust collection + assert_eq!( + Balances::set_balance(&zeitgeist_parachain_account(), initial_sovereign_balance,), + initial_sovereign_balance + ); }); - Zeitgeist::execute_with(|| { + BatteryStation::execute_with(|| { + register_btc(None); + let alice_initial_balance = AssetManager::free_balance(BTC_ID.into(), &alice()); + assert_ok!(XTokens::transfer( - RuntimeOrigin::signed(ALICE), + RuntimeOrigin::signed(alice()), BTC_ID, transfer_amount, Box::new( @@ -269,7 +311,7 @@ fn transfer_btc_zeitgeist_to_sibling() { 1, X2( Parachain(PARA_ID_SIBLING), - Junction::AccountId32 { network: None, id: BOB.into() } + Junction::AccountId32 { network: None, id: bob().into() } ) ) .into() @@ -278,201 +320,141 @@ fn transfer_btc_zeitgeist_to_sibling() { )); // Confirm that Alice's balance is initial_balance - amount_transferred - assert_eq!(AssetManager::free_balance(BTC_ID.into(), &ALICE), 0); + let alice_balance = AssetManager::free_balance(BTC_ID.into(), &alice()); + let alice_expected = alice_initial_balance - adjusted_balance(btc(1), transfer_amount); + assert_eq!(alice_balance, alice_expected); }); Sibling::execute_with(|| { - let fee_adjusted = adjusted_balance(btc(1), btc_fee()); - let expected = transfer_amount - fee_adjusted; + let expected = bob_initial_balance + transfer_amount - adjusted_balance(btc(1), btc_fee()); + let expected_sovereign = initial_sovereign_balance - transfer_amount; // Verify that Bob now has initial balance + amount transferred - fee - assert_eq!(Balances::free_balance(&BOB), sibling_bob_initial_balance + expected,); - + assert_eq!(Balances::free_balance(bob()), expected); // Verify that the amount transferred is now subtracted from the zeitgeist account at sibling - assert_eq!( - Balances::free_balance(zeitgeist_parachain_account()), - initial_sovereign_balance - transfer_amount - ); + assert_eq!(Balances::free_balance(zeitgeist_parachain_account()), expected_sovereign); }); } #[test] fn transfer_roc_from_relay_chain() { - TestNet::reset(); - let transfer_amount: Balance = roc(1); let mut treasury_initial_balance = 0; + let mut bob_initial_balance = 0; - Zeitgeist::execute_with(|| { + BatteryStation::execute_with(|| { register_foreign_parent(None); treasury_initial_balance = AssetManager::free_balance(FOREIGN_PARENT_ID.into(), &ZeitgeistTreasuryAccount::get()); + bob_initial_balance = AssetManager::free_balance(FOREIGN_PARENT_ID.into(), &bob()); }); - RococoNet::execute_with(|| { - let initial_balance = rococo_runtime::Balances::free_balance(&ALICE); + Rococo::execute_with(|| { + let initial_balance = rococo_runtime::Balances::free_balance(alice()); assert!(initial_balance >= transfer_amount); assert_ok!(rococo_runtime::XcmPallet::reserve_transfer_assets( - rococo_runtime::RuntimeOrigin::signed(ALICE), - Box::new(Parachain(battery_station::ID).into()), - Box::new(Junction::AccountId32 { network: None, id: BOB.into() }.into()), + rococo_runtime::RuntimeOrigin::signed(alice()), + Box::new(Parachain(PARA_ID_BATTERY_STATION).into()), + Box::new(Junction::AccountId32 { network: None, id: bob().into() }.into()), Box::new((Here, transfer_amount).into()), 0 )); }); - Zeitgeist::execute_with(|| { + BatteryStation::execute_with(|| { let expected = transfer_amount - roc_fee(); - let expected_adjusted = adjusted_balance(roc(1), expected); - assert_eq!(AssetManager::free_balance(FOREIGN_PARENT_ID.into(), &BOB), expected_adjusted); + let bob_expected = bob_initial_balance + adjusted_balance(roc(1), expected); + let treasury_expected = treasury_initial_balance + adjusted_balance(roc(1), roc_fee()); + + assert_eq!(AssetManager::free_balance(FOREIGN_PARENT_ID.into(), &bob()), bob_expected); // Verify that fees (of foreign currency) have been put into treasury assert_eq!( AssetManager::free_balance(FOREIGN_PARENT_ID.into(), &ZeitgeistTreasuryAccount::get()), - // Align decimal fractional places - treasury_initial_balance + adjusted_balance(roc(1), roc_fee()) + treasury_expected ) }); } #[test] fn transfer_roc_to_relay_chain() { - TestNet::reset(); - let transfer_amount: Balance = roc(1); let transfer_amount_local: Balance = adjusted_balance(roc(1), transfer_amount); - transfer_roc_from_relay_chain(); - - Zeitgeist::execute_with(|| { - let initial_balance = AssetManager::free_balance(FOREIGN_PARENT_ID.into(), &ALICE); - assert!(initial_balance >= transfer_amount); - - assert_ok!(XTokens::transfer( - RuntimeOrigin::signed(ALICE), - FOREIGN_PARENT_ID, - transfer_amount, - Box::new( - MultiLocation::new(1, X1(Junction::AccountId32 { id: BOB.into(), network: None })) - .into() - ), - WeightLimit::Limited(4_000_000_000.into()) - )); + let mut initial_balance_bob = 0; + Rococo::execute_with(|| { + initial_balance_bob = rococo_runtime::Balances::free_balance(bob()); + let bs_acc = Rococo::sovereign_account_id_of_child_para(PARA_ID_BATTERY_STATION.into()); assert_eq!( - AssetManager::free_balance(FOREIGN_PARENT_ID.into(), &ALICE), - initial_balance - transfer_amount_local - ) - }); - - RococoNet::execute_with(|| { - assert_eq!(rococo_runtime::Balances::free_balance(&BOB), 999_990_415_728); + rococo_runtime::Balances::set_balance(&bs_acc, transfer_amount), + transfer_amount + ); }); -} - -#[test] -fn transfer_ztg_to_sibling_with_custom_fee() { - TestNet::reset(); - - let alice_initial_balance = ztg(10); - // 10x fee factor, so ZTG has 10x the worth of sibling currency. - let fee_factor = 100_000_000_000; - let transfer_amount = ztg(5); - let mut treasury_initial_balance = 0; - Sibling::execute_with(|| { - treasury_initial_balance = - AssetManager::free_balance(FOREIGN_ZTG_ID.into(), &ZeitgeistTreasuryAccount::get()); - assert_eq!(AssetManager::free_balance(FOREIGN_ZTG_ID.into(), &BOB), 0); - - register_foreign_ztg(None); - let custom_metadata = CustomMetadata { - xcm: XcmMetadata { fee_factor: Some(fee_factor) }, - ..Default::default() - }; - assert_ok!(AssetRegistry::do_update_asset( - FOREIGN_ZTG_ID, - None, - None, - None, - None, - None, - Some(custom_metadata) - )); - }); + BatteryStation::execute_with(|| { + register_foreign_parent(None); + let initial_balance = AssetManager::free_balance(FOREIGN_PARENT_ID.into(), &alice()); + assert!(initial_balance >= transfer_amount_local); - Zeitgeist::execute_with(|| { - assert_eq!(Balances::free_balance(&ALICE), alice_initial_balance); - assert_eq!(Balances::free_balance(sibling_parachain_account()), 0); assert_ok!(XTokens::transfer( - RuntimeOrigin::signed(ALICE), - XcmAsset::Ztg, + RuntimeOrigin::signed(alice()), + FOREIGN_PARENT_ID, transfer_amount, Box::new( MultiLocation::new( 1, - X2( - Parachain(PARA_ID_SIBLING), - Junction::AccountId32 { network: None, id: BOB.into() } - ) + X1(Junction::AccountId32 { id: bob().into(), network: None }) ) .into() ), - WeightLimit::Limited(4_000_000_000.into()), + WeightLimit::Limited(4_000_000_000.into()) )); - // Confirm that Alice's balance is initial_balance - amount_transferred - assert_eq!(Balances::free_balance(&ALICE), alice_initial_balance - transfer_amount); - - // Verify that the amount transferred is now part of the sibling account here - assert_eq!(Balances::free_balance(sibling_parachain_account()), transfer_amount); - }); - - Sibling::execute_with(|| { - let current_balance = AssetManager::free_balance(FOREIGN_ZTG_ID.into(), &BOB); - let custom_fee = calc_fee(default_per_second(10) * 10); - - // Verify that BOB now has (amount transferred - fee) - assert_eq!(current_balance, transfer_amount - ztg_fee() * fee_factor / BASE); - - // Verify that fees (of foreign currency) have been put into treasury assert_eq!( - AssetManager::free_balance(FOREIGN_ZTG_ID.into(), &ZeitgeistTreasuryAccount::get()), - treasury_initial_balance + custom_fee + AssetManager::free_balance(FOREIGN_PARENT_ID.into(), &alice()), + initial_balance - transfer_amount_local ) }); + + #[cfg(not(feature = "runtime-benchmarks"))] + // rococo-runtime does not process messages when runtime-benchmarks is enabled: + // https://github.com/paritytech/polkadot-sdk/blob/release-polkadot-v1.1.0/polkadot/runtime/rococo/src/lib.rs#L1078-L1080 + Rococo::execute_with(|| { + let expected_fee = 10_454_619; + let expected_balance_bob = initial_balance_bob + transfer_amount - expected_fee; + assert_eq!(rococo_runtime::Balances::free_balance(&bob()), expected_balance_bob); + }); } #[test] fn test_total_fee() { - assert_eq!(ztg_fee(), 80_128_000); - assert_eq!(roc_fee(), 8_012_800_000); + assert_eq!(btc_fee(), 642_960); + assert_eq!(roc_fee(), 8_037_000_000); + assert_eq!(ztg_fee(), 64_296_000); } #[inline] fn ztg_fee() -> Balance { - fee(BalanceFractionalDecimals::get().into()) + fee(BalanceFractionalDecimals::get().into(), 8) } #[inline] -fn fee(decimals: u32) -> Balance { - calc_fee(default_per_second(decimals)) +fn fee(decimals: u32, multiplier: Balance) -> Balance { + calc_fee(default_per_second(decimals), multiplier) } -// The fee associated with transferring roc tokens #[inline] fn roc_fee() -> Balance { - fee(12) + fee(12, 10) } #[inline] fn btc_fee() -> Balance { - fee(8) + fee(8, 8) } #[inline] -const fn calc_fee(fee_per_second: Balance) -> Balance { - // We divide the fee to align its unit and multiply by 8 as that seems to be the unit of - // time the tests take. - // NOTE: it is possible that in different machines this value may differ. We shall see. - fee_per_second / 10_000 * 8 +const fn calc_fee(fee_per_second: Balance, multiplier: Balance) -> Balance { + // Adjust fee per second to actual test execution time + fee_per_second / 10_000 * multiplier } diff --git a/runtime/battery-station/src/lib.rs b/runtime/battery-station/src/lib.rs index 2393a7634..51bab0a57 100644 --- a/runtime/battery-station/src/lib.rs +++ b/runtime/battery-station/src/lib.rs @@ -17,7 +17,7 @@ // along with Zeitgeist. If not, see . #![cfg_attr(not(feature = "std"), no_std)] -#![recursion_limit = "512"] +#![recursion_limit = "1024"] extern crate alloc; @@ -79,11 +79,10 @@ use { use frame_support::construct_runtime; -use sp_api::impl_runtime_apis; +use sp_api::{impl_runtime_apis, BlockT}; use sp_core::{crypto::KeyTypeId, OpaqueMetadata}; use sp_runtime::{ create_runtime_str, - traits::Block as BlockT, transaction_validity::{TransactionSource, TransactionValidity}, ApplyExtrinsicResult, }; @@ -105,8 +104,8 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("zeitgeist"), impl_name: create_runtime_str!("zeitgeist"), authoring_version: 1, - spec_version: 55, - impl_version: 1, + spec_version: 56, + impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 29, state_version: 1, @@ -224,6 +223,7 @@ create_runtime_with_additional_pallets!( impl pallet_sudo::Config for Runtime { type RuntimeCall = RuntimeCall; type RuntimeEvent = RuntimeEvent; + type WeightInfo = (); } impl_config_traits!(); diff --git a/runtime/battery-station/src/parachain_params.rs b/runtime/battery-station/src/parachain_params.rs index 3038cbd6d..7312994c4 100644 --- a/runtime/battery-station/src/parachain_params.rs +++ b/runtime/battery-station/src/parachain_params.rs @@ -1,4 +1,4 @@ -// Copyright 2022-2023 Forecasting Technologies LTD. +// Copyright 2022-2024 Forecasting Technologies LTD. // Copyright 2021-2022 Zeitgeist PM LLC. // // This file is part of Zeitgeist. @@ -38,6 +38,9 @@ use zeitgeist_primitives::{ }; parameter_types! { + // Asset registry + pub const AssetRegistryStringLimit: u32 = 1024; + // Author-Mapping /// The amount that should be taken as a security deposit when registering a NimbusId. pub const CollatorDeposit: Balance = 2 * BASE; @@ -66,16 +69,20 @@ parameter_types! { pub const LeaveDelegatorsDelay: u32 = 2; /// Maximum bottom delegations per candidate pub const MaxBottomDelegationsPerCandidate: u32 = 50; + /// Maximum number of collator candidates + pub const MaxCandidates: u32 = 200; /// Maximum delegations per delegator pub const MaxDelegationsPerDelegator: u32 = 100; /// Maximum top delegations per candidate pub const MaxTopDelegationsPerCandidate: u32 = 300; + /// Number of rounds until a collator not producing blocks is marked as inactive. + pub const MaxOfflineRounds: u32 = 1; /// Minimum round length is 2 minutes pub const MinBlocksPerRound: u32 = 2 * BLOCKS_PER_MINUTE as u32; /// Minimum stake required to become a collator - pub const MinCollatorStk: u128 = 64 * BASE; + pub const MinCandidateStk: u128 = 64 * BASE; /// Minimum stake required to be reserved to be a delegator - pub const MinDelegatorStk: u128 = BASE / 2; + pub const MinDelegation: u128 = BASE / 2; /// Minimum collators selected per round, default at genesis and minimum forever after pub const MinSelectedCandidates: u32 = 8; /// Rounds before the delegator revocation can be executed @@ -93,6 +100,10 @@ parameter_types! { pub const MaxAssetsIntoHolding: u32 = 64; /// Max instructions per XCM pub const MaxInstructions: u32 = 100; + /// The maximum number of local XCM locks that a single account may have. + pub const MaxLockers: u32 = 8; + /// The maximum number of consumers a single remote lock may have. + pub const MaxRemoteLockConsumers: u32 = 0; /// Relative self location pub SelfLocation: MultiLocation = MultiLocation::new(1, X1(Parachain(ParachainInfo::parachain_id().into()))); diff --git a/runtime/battery-station/src/parameters.rs b/runtime/battery-station/src/parameters.rs index 2cf328b9c..9b06c07b8 100644 --- a/runtime/battery-station/src/parameters.rs +++ b/runtime/battery-station/src/parameters.rs @@ -47,7 +47,7 @@ use zeitgeist_primitives::{constants::*, types::*}; pub(crate) const AVERAGE_ON_INITIALIZE_RATIO: Perbill = Perbill::from_percent(10); pub(crate) const MAXIMUM_BLOCK_WEIGHT: Weight = Weight::from_parts( WEIGHT_REF_TIME_PER_SECOND.saturating_div(2), - polkadot_primitives::v2::MAX_POV_SIZE as u64, + polkadot_primitives::MAX_POV_SIZE as u64, ); pub(crate) const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(75); pub(crate) const FEES_AND_TIPS_TREASURY_PERCENTAGE: u32 = 100; @@ -56,11 +56,12 @@ pub(crate) const FEES_AND_TIPS_BURN_PERCENTAGE: u32 = 0; #[cfg(not(feature = "parachain"))] parameter_types! { // Aura + pub const AllowMultipleBlocksPerSlot: bool = false; pub const MaxAuthorities: u32 = 32; // Grandpa - // Can be 0, as equivocation handling is not enabled (HandleEquivocation = ()) pub const MaxSetIdSessionEntries: u32 = 0; + pub const MaxNominators: u32 = 0; } parameter_types! { @@ -110,6 +111,8 @@ parameter_types! { // Balance pub const ExistentialDeposit: u128 = 5 * MILLI; + pub const MaxHolds: u32 = 1; + pub const MaxFreezes: u32 = 1; pub const MaxLocks: u32 = 50; pub const MaxReserves: u32 = 50; @@ -122,22 +125,19 @@ parameter_types! { pub const CouncilMaxMembers: u32 = 100; pub const CouncilMaxProposals: u32 = 100; pub const CouncilMotionDuration: BlockNumber = 7 * BLOCKS_PER_DAY; + pub MaxProposalWeight: Weight = Perbill::from_percent(50) * RuntimeBlockWeights::get().max_block; pub const TechnicalCommitteeMaxMembers: u32 = 100; pub const TechnicalCommitteeMaxProposals: u32 = 64; pub const TechnicalCommitteeMotionDuration: BlockNumber = 7 * BLOCKS_PER_DAY; // Contracts - pub const ContractsDeletionQueueDepth: u32 = 128; - pub ContractsDeletionWeightLimit: Weight = Perbill::from_percent(10) - * RuntimeBlockWeights::get() - .per_class - .get(DispatchClass::Normal) - .max_total - .unwrap_or(RuntimeBlockWeights::get().max_block); + pub const ContractsCodeHashLockupDepositPercent: Perbill = Perbill::from_percent(10); + pub const ContractsDefaultDepositLimit: Balance = deposit(16, 16 * 1024 * 1024); pub const ContractsDepositPerByte: Balance = deposit(0,1); pub const ContractsDepositPerItem: Balance = deposit(1,0); pub const ContractsMaxCodeLen: u32 = 123 * 1024; pub const ContractsMaxDebugBufferLen: u32 = 2 * 1024 * 1024; + pub const ContractsMaxDelegateDependencies: u32 = 32; pub const ContractsMaxStorageKeyLen: u32 = 128; pub const ContractsUnsafeUnstableInterface: bool = true; pub ContractsSchedule: pallet_contracts::Schedule = Default::default(); @@ -429,7 +429,7 @@ parameter_types! { /// The maximum number of approvals that can wait in the spending queue. pub const MaxApprovals: u32 = 100; /// Maximum amount a verified origin can spend - pub const MaxTreasurySpend: Balance = Balance::max_value(); + pub const MaxTreasurySpend: Balance = Balance::MAX; /// Fraction of a proposal's value that should be bonded in order to place the proposal. /// An accepted proposal gets these back. A rejected proposal does not. pub const ProposalBond: Permill = Permill::from_percent(5); diff --git a/runtime/battery-station/src/xcm_config/asset_registry.rs b/runtime/battery-station/src/xcm_config/asset_registry.rs index 9deb85aa0..ab6c618a4 100644 --- a/runtime/battery-station/src/xcm_config/asset_registry.rs +++ b/runtime/battery-station/src/xcm_config/asset_registry.rs @@ -15,7 +15,7 @@ // You should have received a copy of the GNU General Public License // along with Zeitgeist. If not, see . -use crate::{Balance, XcmAsset}; +use crate::{AssetRegistryStringLimit, Balance, XcmAsset}; use orml_traits::asset_registry::{AssetMetadata, AssetProcessor}; use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; use scale_info::TypeInfo; @@ -29,11 +29,16 @@ use zeitgeist_primitives::types::CustomMetadata; /// Only pre check is to ensure an asset id was passed. pub struct CustomAssetProcessor; -impl AssetProcessor> for CustomAssetProcessor { +impl AssetProcessor> + for CustomAssetProcessor +{ fn pre_register( id: Option, - metadata: AssetMetadata, - ) -> Result<(XcmAsset, AssetMetadata), DispatchError> { + metadata: AssetMetadata, + ) -> Result< + (XcmAsset, AssetMetadata), + DispatchError, + > { match id { Some(id) => Ok((id, metadata)), None => Err(DispatchError::Other("asset-registry: AssetId is required")), @@ -42,7 +47,7 @@ impl AssetProcessor> for Custom fn post_register( _id: XcmAsset, - _asset_metadata: AssetMetadata, + _asset_metadata: AssetMetadata, ) -> Result<(), DispatchError> { Ok(()) } diff --git a/runtime/battery-station/src/xcm_config/config.rs b/runtime/battery-station/src/xcm_config/config.rs index c68d81f3d..f9008fea9 100644 --- a/runtime/battery-station/src/xcm_config/config.rs +++ b/runtime/battery-station/src/xcm_config/config.rs @@ -34,8 +34,8 @@ use orml_xcm_support::{ DepositToAlternative, IsNativeConcrete, MultiCurrencyAdapter, MultiNativeAsset, }; use pallet_xcm::XcmPassthrough; -use polkadot_parachain::primitives::Sibling; -use sp_runtime::traits::Convert; +use polkadot_parachain_primitives::primitives::Sibling; +use sp_runtime::traits::{ConstU32, Convert, MaybeEquivalence}; use xcm::{ latest::{ prelude::{AccountId32, AssetId, Concrete, GeneralKey, MultiAsset, XcmContext, X1, X2}, @@ -48,13 +48,13 @@ use xcm_builder::{ AllowTopLevelPaidExecutionFrom, FixedRateOfFungible, FixedWeightBounds, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeRevenue, - TakeWeightCredit, + TakeWeightCredit, WithComputedOrigin, }; -use xcm_executor::{traits::TransactAsset, Assets as ExecutorAssets, Config}; +use xcm_executor::{traits::TransactAsset, Assets as ExecutorAssets}; use zeitgeist_primitives::{constants::BalanceFractionalDecimals, types::XcmAsset}; pub mod battery_station { - #[cfg(test)] + #[cfg(any(test, feature = "runtime-benchmarks"))] pub const ID: u32 = 2101; pub const KEY: &[u8] = &[0, 1]; } @@ -64,7 +64,10 @@ pub struct XcmConfig; /// The main XCM config /// This is where we configure the core of our XCM integrations: how tokens are transferred, /// how fees are calculated, what barriers we impose on incoming XCM messages, etc. -impl Config for XcmConfig { +impl xcm_executor::Config for XcmConfig { + /// A list of (Origin, Target) pairs allowing a given Origin to be substituted with its + /// corresponding Target pair. + type Aliasers = Nothing; /// Handler for exchanging assets. type AssetExchanger = (); /// The handler for when there is an instruction to claim assets. @@ -122,12 +125,18 @@ impl Config for XcmConfig { pub type Barrier = ( // Execution barrier that just takes max_weight from weight_credit TakeWeightCredit, - // Ensures that execution time is bought with BuyExecution instruction - AllowTopLevelPaidExecutionFrom, // Expected responses are OK. AllowKnownQueryResponses, - // Subscriptions for version tracking are OK. - AllowSubscriptionsFrom, + WithComputedOrigin< + ( + // If the message is one that immediately attemps to pay for execution, then allow it. + AllowTopLevelPaidExecutionFrom, + // Subscriptions for version tracking are OK. + AllowSubscriptionsFrom, + ), + UniversalLocation, + ConstU32<8>, + >, ); /// The means of purchasing weight credit for XCM execution. @@ -151,11 +160,10 @@ pub struct ToTreasury; impl TakeRevenue for ToTreasury { fn take_revenue(revenue: MultiAsset) { use orml_traits::MultiCurrency; - use xcm_executor::traits::Convert; if let MultiAsset { id: Concrete(location), fun: Fungible(_amount) } = revenue { - if let Ok(asset_id) = - >::convert(location) + if let Some(asset_id) = + >::convert(&location) { let adj_am = AlignedFractionalMultiAssetTransactor::adjust_fractional_places(&revenue).fun; @@ -346,88 +354,96 @@ pub struct AssetConvert; /// handle it on their side. impl Convert> for AssetConvert { fn convert(id: Assets) -> Option { - match id { - Assets::Ztg => Some(MultiLocation::new( - 1, - X2( - Junction::Parachain(ParachainInfo::parachain_id().into()), - general_key(battery_station::KEY), - ), - )), - Assets::ForeignAsset(_) => { - let asset = XcmAsset::try_from(id).ok()?; - AssetRegistry::multilocation(&asset).ok()? - } - _ => None, - } + >::convert_back(&id) + } +} + +impl Convert> for AssetConvert { + fn convert(location: MultiLocation) -> Option { + >::convert(&location) } } impl Convert> for AssetConvert { fn convert(id: XcmAsset) -> Option { - >>::convert(id.into()) + >::convert_back(&id) } } /// Convert an incoming `MultiLocation` into a `Asset` if possible. /// Here we need to know the canonical representation of all the tokens we handle in order to /// correctly convert their `MultiLocation` representation into our internal `Asset` type. -impl xcm_executor::traits::Convert for AssetConvert { - fn convert(location: MultiLocation) -> Result { +impl MaybeEquivalence for AssetConvert { + fn convert(location: &MultiLocation) -> Option { match location { MultiLocation { parents: 0, interior: X1(GeneralKey { data, length }) } => { - let key = &data[..data.len().min(length as usize)]; + let key = &data[..data.len().min(*length as usize)]; if key == battery_station::KEY { - return Ok(Assets::Ztg); + return Some(Assets::Ztg); } - Err(location) + None } MultiLocation { parents: 1, interior: X2(Junction::Parachain(para_id), GeneralKey { data, length }), } => { - let key = &data[..data.len().min(length as usize)]; + let key = &data[..data.len().min(*length as usize)]; - if para_id == u32::from(ParachainInfo::parachain_id()) { + if *para_id == u32::from(ParachainInfo::parachain_id()) { if key == battery_station::KEY { - return Ok(Assets::Ztg); + return Some(Assets::Ztg); } - return Err(location); + return None; } - AssetRegistry::location_to_asset_id(location).ok_or(location).map(|a| a.into()) + AssetRegistry::location_to_asset_id(location).map(|a| a.into()) + } + _ => AssetRegistry::location_to_asset_id(location).map(|a| a.into()), + } + } + + fn convert_back(id: &Assets) -> Option { + match id { + Assets::Ztg => Some(MultiLocation::new( + 1, + X2( + Junction::Parachain(ParachainInfo::parachain_id().into()), + general_key(battery_station::KEY), + ), + )), + Assets::ForeignAsset(_) => { + let asset = XcmAsset::try_from(*id).ok()?; + AssetRegistry::multilocation(&asset).ok()? } - _ => AssetRegistry::location_to_asset_id(location).ok_or(location).map(|a| a.into()), + _ => None, } } } -impl xcm_executor::traits::Convert for AssetConvert { - fn convert(location: MultiLocation) -> Result { - >::convert(location) - .and_then(|asset| asset.try_into().map_err(|_| location)) +impl MaybeEquivalence for AssetConvert { + fn convert(location: &MultiLocation) -> Option { + >::convert(location) + .and_then(|asset| asset.try_into().ok()) + } + + fn convert_back(id: &XcmAsset) -> Option { + >::convert_back(&Assets::from(*id)) } } impl Convert> for AssetConvert { fn convert(asset: MultiAsset) -> Option { if let MultiAsset { id: Concrete(location), .. } = asset { - >::convert(location).ok() + >::convert(&location) } else { None } } } -impl Convert> for AssetConvert { - fn convert(location: MultiLocation) -> Option { - >::convert(location).ok() - } -} - pub struct AccountIdToMultiLocation; impl Convert for AccountIdToMultiLocation { diff --git a/runtime/common/Cargo.toml b/runtime/common/Cargo.toml index 8925275e6..7cc61bdc0 100644 --- a/runtime/common/Cargo.toml +++ b/runtime/common/Cargo.toml @@ -17,12 +17,12 @@ pallet-contracts = { workspace = true } pallet-contracts-primitives = { workspace = true } pallet-democracy = { workspace = true } pallet-identity = { workspace = true } +pallet-insecure-randomness-collective-flip = { workspace = true } pallet-membership = { workspace = true } pallet-multisig = { workspace = true } pallet-parachain-staking = { workspace = true, optional = true } pallet-preimage = { workspace = true } pallet-proxy = { workspace = true } -pallet-randomness-collective-flip = { workspace = true } pallet-scheduler = { workspace = true } pallet-timestamp = { workspace = true } pallet-transaction-payment = { workspace = true } @@ -66,7 +66,7 @@ std = [ "pallet-multisig/std", "pallet-preimage/std", "pallet-proxy/std", - "pallet-randomness-collective-flip/std", + "pallet-insecure-randomness-collective-flip/std", "pallet-scheduler/std", "pallet-timestamp/std", "pallet-transaction-payment-rpc-runtime-api/std", @@ -80,7 +80,7 @@ std = [ [package] authors = ["Zeitgeist PM "] -edition = "2021" +edition.workspace = true name = "common-runtime" version = "0.5.2" diff --git a/runtime/common/src/fees.rs b/runtime/common/src/fees.rs index ce52cdac5..ffa268f68 100644 --- a/runtime/common/src/fees.rs +++ b/runtime/common/src/fees.rs @@ -40,8 +40,8 @@ macro_rules! impl_fee_types { } pub struct DealWithForeignFees; - impl OnUnbalanced> for DealWithForeignFees { - fn on_unbalanced(fees_and_tips: CreditOf) { + impl OnUnbalanced> for DealWithForeignFees { + fn on_unbalanced(fees_and_tips: Credit) { // We have to manage the mint / burn ratio on the Zeitgeist chain, // but we do not have the responsibility and necessary knowledge to // manage the mint / burn ratio for any other chain. @@ -68,9 +68,10 @@ macro_rules! impl_foreign_fees { use frame_support::{ pallet_prelude::InvalidTransaction, traits::{ - fungibles::{CreditOf, Inspect}, + fungibles::{Credit, Inspect}, tokens::{ - fungibles::Balanced, BalanceConversion, WithdrawConsequence, WithdrawReasons, + fungibles::Balanced, ConversionToAssetBalance, Fortitude, Precision, + Preservation, WithdrawConsequence, WithdrawReasons, }, ExistenceRequirement, }, @@ -202,7 +203,7 @@ macro_rules! impl_foreign_fees { } pub struct TTCBalanceToAssetBalance; - impl BalanceConversion for TTCBalanceToAssetBalance { + impl ConversionToAssetBalance for TTCBalanceToAssetBalance { type Error = TransactionValidityError; fn to_asset_balance( @@ -217,7 +218,7 @@ macro_rules! impl_foreign_fees { pub struct TTCHandleCredit; impl HandleCredit for TTCHandleCredit { - fn handle_credit(final_fee: CreditOf) { + fn handle_credit(final_fee: Credit) { let asset = final_fee.asset(); if CampaignAsset::try_from(asset).is_ok() { @@ -232,7 +233,7 @@ macro_rules! impl_foreign_fees { impl pallet_asset_tx_payment::OnChargeAssetTransaction for TxCharger { type AssetId = Assets; type Balance = Balance; - type LiquidityInfo = CreditOf; + type LiquidityInfo = Credit; fn withdraw_fee( who: &AccountId, @@ -256,8 +257,15 @@ macro_rules! impl_foreign_fees { if can_withdraw != WithdrawConsequence::Success { return Err(InvalidTransaction::Payment.into()); } - >::withdraw(asset_id, who, converted_fee) - .map_err(|_| TransactionValidityError::from(InvalidTransaction::Payment)) + >::withdraw( + asset_id, + who, + converted_fee, + Precision::Exact, + Preservation::Expendable, + Fortitude::Force, + ) + .map_err(|_| TransactionValidityError::from(InvalidTransaction::Payment)) } fn correct_and_deposit_fee( @@ -265,9 +273,9 @@ macro_rules! impl_foreign_fees { _dispatch_info: &DispatchInfoOf, _post_info: &PostDispatchInfoOf, corrected_native_fee: Self::Balance, - _tip: Self::Balance, + tip: Self::Balance, paid: Self::LiquidityInfo, - ) -> Result<(), TransactionValidityError> { + ) -> Result<(Self::Balance, Self::Balance), TransactionValidityError> { let min_converted_fee = if corrected_native_fee.is_zero() { Zero::zero() } else { One::one() }; @@ -281,8 +289,9 @@ macro_rules! impl_foreign_fees { // below the existential balance. In that case we don't refund anything. let (final_fee, refund) = paid.split(converted_fee); let _ = AssetRouter::resolve(who, refund); + let final_fee_raw = final_fee.peek(); TTCHandleCredit::handle_credit(final_fee); - Ok(()) + Ok((final_fee_raw, tip)) } } }; @@ -357,7 +366,7 @@ macro_rules! fee_tests { use orml_traits::MultiCurrency; use pallet_asset_tx_payment::OnChargeAssetTransaction; use sp_core::H256; - use sp_runtime::traits::Convert; + use sp_runtime::{traits::Convert, BuildStorage}; use zeitgeist_primitives::constants::BASE; fn run_with_system_weight(w: Weight, mut assertions: F) @@ -365,7 +374,7 @@ macro_rules! fee_tests { F: FnMut(), { let mut t: sp_io::TestExternalities = - frame_system::GenesisConfig::default().build_storage::().unwrap().into(); + frame_system::GenesisConfig::::default().build_storage().unwrap().into(); t.execute_with(|| { System::set_block_consumed_resources(w, 0); assertions() @@ -375,7 +384,7 @@ macro_rules! fee_tests { #[test] fn treasury_receives_correct_amount_of_native_fees_and_tips() { let mut t: sp_io::TestExternalities = - frame_system::GenesisConfig::default().build_storage::().unwrap().into(); + frame_system::GenesisConfig::::default().build_storage().unwrap().into(); t.execute_with(|| { let fee_balance = 3 * ExistentialDeposit::get(); let fee_imbalance = Balances::issue(fee_balance); @@ -393,7 +402,7 @@ macro_rules! fee_tests { #[test] fn treasury_receives_correct_amount_of_foreign_fees_and_tips() { let mut t: sp_io::TestExternalities = - frame_system::GenesisConfig::default().build_storage::().unwrap().into(); + frame_system::GenesisConfig::::default().build_storage().unwrap().into(); t.execute_with(|| { let fee_and_tip_balance = 10 * ExistentialDeposit::get(); let fees_and_tips = AssetRouter::issue(Asset::ForeignAsset(0), fee_and_tip_balance); @@ -412,7 +421,7 @@ macro_rules! fee_tests { #[test] fn fee_payment_campaign_assets_withdraws_correct_amount() { let mut t: sp_io::TestExternalities = - frame_system::GenesisConfig::default().build_storage::().unwrap().into(); + frame_system::GenesisConfig::::default().build_storage().unwrap().into(); t.execute_with(|| { let asset = Asset::CampaignAsset(0); let alice = AccountId::from([0u8; 32]); @@ -450,7 +459,7 @@ macro_rules! fee_tests { }); } - fn campaign_asset_throttled_fee_common() -> CreditOf { + fn campaign_asset_throttled_fee_common() -> Credit { let asset = Asset::CampaignAsset(0); let alice = AccountId::from([0u8; 32]); let initial_balance: Balance = 1_000_000_000_000; @@ -482,7 +491,7 @@ macro_rules! fee_tests { #[test] fn fee_payment_campaign_assets_withdraws_correct_amount_throttled() { let mut t: sp_io::TestExternalities = - frame_system::GenesisConfig::default().build_storage::().unwrap().into(); + frame_system::GenesisConfig::::default().build_storage().unwrap().into(); t.execute_with(|| { let _ = campaign_asset_throttled_fee_common(); }); @@ -491,7 +500,7 @@ macro_rules! fee_tests { #[test] fn fee_payment_campaign_assets_corrects_reimburses_and_burns_fees_properly() { let mut t: sp_io::TestExternalities = - frame_system::GenesisConfig::default().build_storage::().unwrap().into(); + frame_system::GenesisConfig::::default().build_storage().unwrap().into(); t.execute_with(|| { let asset = Asset::CampaignAsset(0); let withdrawn = campaign_asset_throttled_fee_common(); @@ -536,10 +545,11 @@ macro_rules! fee_tests { #[test] fn correct_and_deposit_fee_dot_foreign_asset() { - let mut t: sp_io::TestExternalities = frame_system::GenesisConfig::default() - .build_storage::() - .unwrap() - .into(); + let mut t: sp_io::TestExternalities = + frame_system::GenesisConfig::::default() + .build_storage() + .unwrap() + .into(); t.execute_with(|| { let alice = AccountId::from([0u8; 32]); let fee_factor = 143_120_520; @@ -547,16 +557,17 @@ macro_rules! fee_tests { xcm: XcmMetadata { fee_factor: Some(fee_factor) }, ..Default::default() }; - let meta: AssetMetadata = AssetMetadata { - decimals: 10, - name: "Polkadot".into(), - symbol: "DOT".into(), - existential_deposit: ExistentialDeposit::get(), - location: Some(xcm::VersionedMultiLocation::V3( - xcm::latest::MultiLocation::parent(), - )), - additional: custom_metadata, - }; + let meta: AssetMetadata = + AssetMetadata { + decimals: 10, + name: "Polkadot".as_bytes().to_vec().try_into().unwrap(), + symbol: "DOT".as_bytes().to_vec().try_into().unwrap(), + existential_deposit: ExistentialDeposit::get(), + location: Some(xcm::VersionedMultiLocation::V3( + xcm::latest::MultiLocation::parent(), + )), + additional: custom_metadata, + }; let dot = Asset::ForeignAsset(0); assert_ok!(AssetRegistry::register_asset( @@ -599,25 +610,27 @@ macro_rules! fee_tests { #[test] fn get_fee_factor_works() { - let mut t: sp_io::TestExternalities = frame_system::GenesisConfig::default() - .build_storage::() - .unwrap() - .into(); + let mut t: sp_io::TestExternalities = + frame_system::GenesisConfig::::default() + .build_storage() + .unwrap() + .into(); t.execute_with(|| { let custom_metadata = CustomMetadata { xcm: XcmMetadata { fee_factor: Some(143_120_520u128) }, ..Default::default() }; - let meta: AssetMetadata = AssetMetadata { - decimals: 10, - name: "Polkadot".into(), - symbol: "DOT".into(), - existential_deposit: ExistentialDeposit::get(), - location: Some(xcm::VersionedMultiLocation::V3( - xcm::latest::MultiLocation::parent(), - )), - additional: custom_metadata, - }; + let meta: AssetMetadata = + AssetMetadata { + decimals: 10, + name: "Polkadot".as_bytes().to_vec().try_into().unwrap(), + symbol: "DOT".as_bytes().to_vec().try_into().unwrap(), + existential_deposit: ExistentialDeposit::get(), + location: Some(xcm::VersionedMultiLocation::V3( + xcm::latest::MultiLocation::parent(), + )), + additional: custom_metadata, + }; let dot_asset_id = 0u32; let dot = XcmAsset::ForeignAsset(dot_asset_id); @@ -633,10 +646,11 @@ macro_rules! fee_tests { #[test] fn get_fee_factor_metadata_not_found() { - let mut t: sp_io::TestExternalities = frame_system::GenesisConfig::default() - .build_storage::() - .unwrap() - .into(); + let mut t: sp_io::TestExternalities = + frame_system::GenesisConfig::::default() + .build_storage() + .unwrap() + .into(); t.execute_with(|| { { // no registering of dot @@ -650,25 +664,27 @@ macro_rules! fee_tests { #[test] fn get_fee_factor_fee_factor_not_found() { - let mut t: sp_io::TestExternalities = frame_system::GenesisConfig::default() - .build_storage::() - .unwrap() - .into(); + let mut t: sp_io::TestExternalities = + frame_system::GenesisConfig::::default() + .build_storage() + .unwrap() + .into(); t.execute_with(|| { let custom_metadata = CustomMetadata { xcm: XcmMetadata { fee_factor: None }, ..Default::default() }; - let meta: AssetMetadata = AssetMetadata { - decimals: 10, - name: "Polkadot".into(), - symbol: "DOT".into(), - existential_deposit: ExistentialDeposit::get(), - location: Some(xcm::VersionedMultiLocation::V3( - xcm::latest::MultiLocation::parent(), - )), - additional: custom_metadata, - }; + let meta: AssetMetadata = + AssetMetadata { + decimals: 10, + name: "Polkadot".as_bytes().to_vec().try_into().unwrap(), + symbol: "DOT".as_bytes().to_vec().try_into().unwrap(), + existential_deposit: ExistentialDeposit::get(), + location: Some(xcm::VersionedMultiLocation::V3( + xcm::latest::MultiLocation::parent(), + )), + additional: custom_metadata, + }; let dot_asset_id = 0u32; let dot = XcmAsset::ForeignAsset(dot_asset_id); @@ -687,23 +703,25 @@ macro_rules! fee_tests { #[test] fn get_fee_factor_none_location() { - let mut t: sp_io::TestExternalities = frame_system::GenesisConfig::default() - .build_storage::() - .unwrap() - .into(); + let mut t: sp_io::TestExternalities = + frame_system::GenesisConfig::::default() + .build_storage() + .unwrap() + .into(); t.execute_with(|| { let custom_metadata = CustomMetadata { xcm: XcmMetadata { fee_factor: Some(10_393) }, ..Default::default() }; - let meta: AssetMetadata = AssetMetadata { - decimals: 10, - name: "NoneLocationToken".into(), - symbol: "NONE".into(), - existential_deposit: ExistentialDeposit::get(), - location: None, - additional: custom_metadata, - }; + let meta: AssetMetadata = + AssetMetadata { + decimals: 10, + name: "NoneLocationToken".as_bytes().to_vec().try_into().unwrap(), + symbol: "NONE".as_bytes().to_vec().try_into().unwrap(), + existential_deposit: ExistentialDeposit::get(), + location: None, + additional: custom_metadata, + }; let non_location_token = XcmAsset::ForeignAsset(1); assert_ok!(AssetRegistry::register_asset( @@ -718,26 +736,28 @@ macro_rules! fee_tests { #[test] fn withdraws_correct_dot_foreign_asset_fee() { - let mut t: sp_io::TestExternalities = frame_system::GenesisConfig::default() - .build_storage::() - .unwrap() - .into(); + let mut t: sp_io::TestExternalities = + frame_system::GenesisConfig::::default() + .build_storage() + .unwrap() + .into(); t.execute_with(|| { let fee_factor = 143_120_520; let custom_metadata = CustomMetadata { xcm: XcmMetadata { fee_factor: Some(fee_factor) }, ..Default::default() }; - let meta: AssetMetadata = AssetMetadata { - decimals: 10, - name: "Polkadot".into(), - symbol: "DOT".into(), - existential_deposit: ExistentialDeposit::get(), - location: Some(xcm::VersionedMultiLocation::V3( - xcm::latest::MultiLocation::parent(), - )), - additional: custom_metadata, - }; + let meta: AssetMetadata = + AssetMetadata { + decimals: 10, + name: "Polkadot".as_bytes().to_vec().try_into().unwrap(), + symbol: "DOT".as_bytes().to_vec().try_into().unwrap(), + existential_deposit: ExistentialDeposit::get(), + location: Some(xcm::VersionedMultiLocation::V3( + xcm::latest::MultiLocation::parent(), + )), + additional: custom_metadata, + }; let dot_asset_id = 0u32; let dot = Asset::ForeignAsset(dot_asset_id); diff --git a/runtime/common/src/lib.rs b/runtime/common/src/lib.rs index eff5c92c0..4efb91c1b 100644 --- a/runtime/common/src/lib.rs +++ b/runtime/common/src/lib.rs @@ -35,6 +35,24 @@ // // You should have received a copy of the GNU General Public License // along with this program. If not, see . +// +// This file incorporates work covered by the following copyright and +// permission notice: +// +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. #![cfg_attr(not(feature = "std"), no_std)] #![recursion_limit = "512"] @@ -47,13 +65,24 @@ pub mod weights; macro_rules! decl_common_types { () => { use core::marker::PhantomData; - use frame_support::traits::{ - Currency, Imbalance, NeverEnsureOrigin, OnRuntimeUpgrade, OnUnbalanced, + use frame_support::{ + migration::storage_key_iter, + migrations::RemovePallet, + pallet_prelude::StorageVersion, + parameter_types, + storage::child, + traits::{Currency, Get, Imbalance, NeverEnsureOrigin, OnRuntimeUpgrade, OnUnbalanced}, + BoundedVec, Twox64Concat, }; #[cfg(feature = "try-runtime")] use frame_try_runtime::{TryStateSelect, UpgradeCheckSelect}; use orml_traits::MultiCurrency; - use sp_runtime::{generic, DispatchError, DispatchResult, SaturatedConversion}; + use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; + use scale_info::TypeInfo; + use sp_core::storage::ChildInfo; + use sp_runtime::{ + generic, DispatchError, DispatchResult, RuntimeDebug, SaturatedConversion, + }; use zeitgeist_primitives::traits::{DeployPoolApi, DistributeFees, MarketCommonsPalletApi}; use zrml_market_commons::migrations::MigrateScoringRuleAmmCdaHybridAndMarketId; use zrml_neo_swaps::migration::MigratePoolReservesToBoundedBTreeMap; @@ -62,10 +91,100 @@ macro_rules! decl_common_types { type Address = sp_runtime::MultiAddress; - type Migrations = ( - MigrateScoringRuleAmmCdaHybridAndMarketId, - MigratePoolReservesToBoundedBTreeMap, - ); + struct FixStorageVersions; + + impl OnRuntimeUpgrade for FixStorageVersions { + fn on_runtime_upgrade() -> frame_support::weights::Weight { + log::info!("FixStorageVersions: Starting..."); + StorageVersion::new(4).put::(); + StorageVersion::new(4).put::(); + StorageVersion::new(1).put::(); + StorageVersion::new(4).put::(); + StorageVersion::new(4).put::(); + StorageVersion::new(4).put::(); + StorageVersion::new(4).put::(); + StorageVersion::new(4).put::(); + StorageVersion::new(1).put::(); + StorageVersion::new(1).put::(); + StorageVersion::new(1).put::(); + StorageVersion::new(15).put::(); + log::info!("FixStorageVersions: Done!"); + ::DbWeight::get().writes(12) + } + + #[cfg(feature = "try-runtime")] + fn pre_upgrade() -> Result, DispatchError> { + Ok(vec![]) + } + + #[cfg(feature = "try-runtime")] + fn post_upgrade(_: Vec) -> Result<(), DispatchError> { + Ok(()) + } + } + + type TrieId = BoundedVec>; + + // `ContractInfo` struct that we need for `ClearContractsChildTries` but pallet-contracts + // doesn't expose publicly. + #[derive(Encode, Decode, Clone, PartialEq, Eq, RuntimeDebug, TypeInfo, MaxEncodedLen)] + pub struct ContractInfo { + pub trie_id: TrieId, + pub code_hash: ::Hash, + pub storage_bytes: u32, + pub storage_items: u32, + pub storage_byte_deposit: Balance, + pub storage_item_deposit: Balance, + pub storage_base_deposit: Balance, + } + + struct ClearContractsChildTries; + + impl OnRuntimeUpgrade for ClearContractsChildTries { + fn on_runtime_upgrade() -> frame_support::weights::Weight { + log::info!("ClearContractsChildTries: Starting..."); + let mut total_reads = 0u64; + let mut total_writes = 0u64; + for (_, contract_info) in storage_key_iter::( + b"Contracts", + b"ContractInfoOf", + ) { + let trie_id = contract_info.trie_id; + let inner_trie_id = trie_id.into_inner(); + let child_info = ChildInfo::new_default(&inner_trie_id); + let multi_removal_result = child::clear_storage(&child_info, None, None); + let writes = multi_removal_result.loops as u64; + log::info!( + "ClearContractsChildTries: Cleared trie {:?} in {:?} loops", + inner_trie_id, + writes + ); + total_reads = total_reads.saturating_add(1); + total_writes = total_writes.saturating_add(writes); + } + log::info!("ClearContractsChildTries: Done!"); + ::DbWeight::get() + .reads_writes(total_reads, total_writes) + } + + #[cfg(feature = "try-runtime")] + fn pre_upgrade() -> Result, DispatchError> { + Ok(vec![]) + } + + #[cfg(feature = "try-runtime")] + fn post_upgrade(_: Vec) -> Result<(), DispatchError> { + Ok(()) + } + } + + parameter_types! { + pub const ContractsPalletStr: &'static str = "Contracts"; + } + + type ResetContracts = RemovePallet; + + type Migrations = (ClearContractsChildTries, ResetContracts, FixStorageVersions); pub type Executive = frame_executive::Executive< Runtime, @@ -90,6 +209,10 @@ macro_rules! decl_common_types { // https://docs.rs/pallet-asset-tx-payment/latest/src/pallet_asset_tx_payment/lib.rs.html#32-34 pallet_asset_tx_payment::ChargeAssetTxPayment, ); + pub type EventRecord = frame_system::EventRecord< + ::RuntimeEvent, + ::Hash, + >; pub type SignedPayload = generic::SignedPayload; pub type UncheckedExtrinsic = generic::UncheckedExtrinsic; @@ -265,22 +388,18 @@ macro_rules! create_runtime { // `PredictionMarkets` depends on `SimpleDisputes`. construct_runtime!( - pub enum Runtime where - Block = crate::Block, - NodeBlock = crate::NodeBlock, - UncheckedExtrinsic = crate::UncheckedExtrinsic, - { + pub enum Runtime { // System - System: frame_system::{Call, Config, Event, Pallet, Storage} = 0, + System: frame_system::{Call, Config, Event, Pallet, Storage} = 0, Timestamp: pallet_timestamp::{Call, Pallet, Storage, Inherent} = 1, - RandomnessCollectiveFlip: pallet_randomness_collective_flip::{Pallet, Storage} = 2, + RandomnessCollectiveFlip: pallet_insecure_randomness_collective_flip::{Pallet, Storage} = 2, Scheduler: pallet_scheduler::{Pallet, Call, Storage, Event} = 3, Preimage: pallet_preimage::{Pallet, Call, Storage, Event} = 4, // Money Balances: pallet_balances::{Call, Config, Event, Pallet, Storage} = 10, - TransactionPayment: pallet_transaction_payment::{Config, Event, Pallet, Storage} = 11, - Treasury: pallet_treasury::{Call, Config, Event, Pallet, Storage} = 12, + TransactionPayment: pallet_transaction_payment::{Config, Event, Pallet, Storage} = 11, + Treasury: pallet_treasury::{Call, Config, Event, Pallet, Storage} = 12, Vesting: pallet_vesting::{Call, Config, Event, Pallet, Storage} = 13, Multisig: pallet_multisig::{Call, Event, Pallet, Storage} = 14, Bounties: pallet_bounties::{Call, Event, Pallet, Storage} = 15, @@ -337,19 +456,19 @@ macro_rules! create_runtime_with_additional_pallets { #[cfg(feature = "parachain")] create_runtime!( // System - ParachainSystem: cumulus_pallet_parachain_system::{Call, Config, Event, Inherent, Pallet, Storage, ValidateUnsigned} = 100, - ParachainInfo: parachain_info::{Config, Pallet, Storage} = 101, + ParachainSystem: cumulus_pallet_parachain_system::{Call, Config, Event, Inherent, Pallet, Storage, ValidateUnsigned} = 100, + ParachainInfo: parachain_info::{Config, Pallet, Storage} = 101, // Consensus ParachainStaking: pallet_parachain_staking::{Call, Config, Event, Pallet, Storage} = 110, AuthorInherent: pallet_author_inherent::{Call, Inherent, Pallet, Storage} = 111, - AuthorFilter: pallet_author_slot_filter::{Call, Config, Event, Pallet, Storage} = 112, + AuthorFilter: pallet_author_slot_filter::{Call, Config, Event, Pallet, Storage} = 112, AuthorMapping: pallet_author_mapping::{Call, Config, Event, Pallet, Storage} = 113, // XCM CumulusXcm: cumulus_pallet_xcm::{Event, Origin, Pallet} = 120, DmpQueue: cumulus_pallet_dmp_queue::{Call, Event, Pallet, Storage} = 121, - PolkadotXcm: pallet_xcm::{Call, Config, Event, Origin, Pallet, Storage} = 122, + PolkadotXcm: pallet_xcm::{Call, Config, Event, Origin, Pallet, Storage} = 122, XcmpQueue: cumulus_pallet_xcmp_queue::{Call, Event, Pallet, Storage} = 123, AssetRegistry: orml_asset_registry::{Call, Config, Event, Pallet, Storage} = 124, UnknownTokens: orml_unknown_tokens::{Pallet, Storage, Event} = 125, @@ -363,7 +482,7 @@ macro_rules! create_runtime_with_additional_pallets { create_runtime!( // Consensus Aura: pallet_aura::{Config, Pallet, Storage} = 100, - Grandpa: pallet_grandpa::{Call, Config, Event, Pallet, Storage} = 101, + Grandpa: pallet_grandpa::{Call, Config, Event, Pallet, Storage} = 101, // Others $($additional_pallets)* @@ -423,18 +542,17 @@ macro_rules! impl_config_traits { type AccountData = pallet_balances::AccountData; type AccountId = AccountId; type BaseCallFilter = IsCallable; + type Block = Block; type BlockHashCount = BlockHashCount; type BlockLength = RuntimeBlockLength; - type BlockNumber = BlockNumber; type BlockWeights = RuntimeBlockWeights; type RuntimeCall = RuntimeCall; type DbWeight = RocksDbWeight; type RuntimeEvent = RuntimeEvent; type Hash = Hash; type Hashing = BlakeTwo256; - type Header = generic::Header; - type Index = Index; type Lookup = AccountIdLookup; + type Nonce = Nonce; type MaxConsumers = ConstU32<16>; type OnKilledAccount = (); type OnNewAccount = (); @@ -451,6 +569,7 @@ macro_rules! impl_config_traits { #[cfg(not(feature = "parachain"))] impl pallet_aura::Config for Runtime { + type AllowMultipleBlocksPerSlot = AllowMultipleBlocksPerSlot; type AuthorityId = sp_consensus_aura::sr25519::AuthorityId; type DisabledValidators = (); type MaxAuthorities = MaxAuthorities; @@ -459,8 +578,9 @@ macro_rules! impl_config_traits { #[cfg(feature = "parachain")] impl pallet_author_inherent::Config for Runtime { type AccountLookup = AuthorMapping; + type AuthorId = AccountId; type CanAuthor = AuthorFilter; - type SlotBeacon = cumulus_pallet_parachain_system::RelaychainBlockNumberProvider; + type SlotBeacon = cumulus_pallet_parachain_system::RelaychainDataProvider; type WeightInfo = weights::pallet_author_inherent::WeightInfo; } @@ -487,21 +607,12 @@ macro_rules! impl_config_traits { #[cfg(not(feature = "parachain"))] impl pallet_grandpa::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type KeyOwnerProofSystem = (); - type KeyOwnerProof = - >::Proof; - type KeyOwnerIdentification = - >::IdentificationTuple; - type HandleEquivocation = (); + type EquivocationReportSystem = (); + type KeyOwnerProof = sp_core::Void; type MaxAuthorities = MaxAuthorities; + type MaxNominators = MaxNominators; type MaxSetIdSessionEntries = MaxSetIdSessionEntries; + type RuntimeEvent = RuntimeEvent; // Currently the benchmark does yield an invalid weight implementation // type WeightInfo = weights::pallet_grandpa::WeightInfo; type WeightInfo = (); @@ -509,6 +620,7 @@ macro_rules! impl_config_traits { #[cfg(feature = "parachain")] impl pallet_xcm::Config for Runtime { + type AdminOrigin = EnsureRoot; type ExecuteXcmOrigin = EnsureXcmOrigin; type RuntimeCall = RuntimeCall; type RuntimeEvent = RuntimeEvent; @@ -528,16 +640,43 @@ macro_rules! impl_config_traits { type CurrencyMatcher = (); type TrustedLockers = (); type SovereignAccountOf = LocationToAccountId; - type MaxLockers = ConstU32<8>; + type MaxLockers = MaxLockers; + type MaxRemoteLockConsumers = MaxRemoteLockConsumers; type WeightInfo = pallet_xcm::TestWeightInfo; #[cfg(feature = "runtime-benchmarks")] type ReachableDest = ReachableDest; + type RemoteLockConsumerIdentifier = (); const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100; // ^ Override for AdvertisedXcmVersion default type AdvertisedXcmVersion = pallet_xcm::CurrentXcmVersion; } + #[cfg(feature = "parachain")] + pub struct OnInactiveCollator; + #[cfg(feature = "parachain")] + impl pallet_parachain_staking::OnInactiveCollator for OnInactiveCollator { + fn on_inactive_collator( + collator_id: AccountId, + round: pallet_parachain_staking::RoundIndex, + ) -> Result< + Weight, + sp_runtime::DispatchErrorWithPostInfo, + > { + use pallet_parachain_staking::WeightInfo; + + ParachainStaking::go_offline_inner(collator_id)?; + let extra_weight = + ::WeightInfo::go_offline( + pallet_parachain_staking::MAX_CANDIDATES, + ); + + Ok(::DbWeight::get() + .reads(1) + .saturating_add(extra_weight)) + } + } + #[cfg(feature = "parachain")] impl pallet_parachain_staking::Config for Runtime { type BlockAuthor = AuthorInherent; @@ -548,16 +687,17 @@ macro_rules! impl_config_traits { type LeaveCandidatesDelay = LeaveCandidatesDelay; type LeaveDelegatorsDelay = LeaveDelegatorsDelay; type MaxBottomDelegationsPerCandidate = MaxBottomDelegationsPerCandidate; - type MaxTopDelegationsPerCandidate = MaxTopDelegationsPerCandidate; + type MaxCandidates = MaxCandidates; type MaxDelegationsPerDelegator = MaxDelegationsPerDelegator; + type MaxTopDelegationsPerCandidate = MaxTopDelegationsPerCandidate; + type MaxOfflineRounds = MaxOfflineRounds; type MinBlocksPerRound = MinBlocksPerRound; - type MinCandidateStk = MinCollatorStk; - type MinCollatorStk = MinCollatorStk; - type MinDelegation = MinDelegatorStk; - type MinDelegatorStk = MinDelegatorStk; + type MinCandidateStk = MinCandidateStk; + type MinDelegation = MinDelegation; type MinSelectedCandidates = MinSelectedCandidates; type MonetaryGovernanceOrigin = EnsureRoot; type OnCollatorPayout = (); + type OnInactiveCollator = OnInactiveCollator; type PayoutCollatorReward = (); type OnNewRound = (); type RevokeDelegationDelay = RevokeDelegationDelay; @@ -573,6 +713,7 @@ macro_rules! impl_config_traits { type Balance = Balance; type CustomMetadata = CustomMetadata; type RuntimeEvent = RuntimeEvent; + type StringLimit = AssetRegistryStringLimit; type WeightInfo = (); } @@ -738,15 +879,30 @@ macro_rules! impl_config_traits { type WeightInfo = weights::pallet_assets::WeightInfo; } + pub struct DustIntoTreasury; + type CreditOfBalances = pallet_balances::CreditOf; + impl OnUnbalanced for DustIntoTreasury { + fn on_nonzero_unbalanced(mut dust: CreditOfBalances) { + let imbalance = NegativeImbalance::new(dust.peek()); + Treasury::on_nonzero_unbalanced(imbalance); + // Ensure issuance is not reduced via OnDrop + core::mem::forget(dust); + } + } + impl pallet_balances::Config for Runtime { type AccountStore = System; type Balance = Balance; - type DustRemoval = Treasury; - type RuntimeEvent = RuntimeEvent; + type DustRemoval = DustIntoTreasury; type ExistentialDeposit = ExistentialDeposit; + type FreezeIdentifier = (); + type MaxFreezes = MaxFreezes; + type MaxHolds = MaxHolds; type MaxLocks = MaxLocks; type MaxReserves = MaxReserves; type ReserveIdentifier = [u8; 8]; + type RuntimeEvent = RuntimeEvent; + type RuntimeHoldReason = RuntimeHoldReason; type WeightInfo = weights::pallet_balances::WeightInfo; } @@ -755,8 +911,10 @@ macro_rules! impl_config_traits { type RuntimeEvent = RuntimeEvent; type MaxMembers = AdvisoryCommitteeMaxMembers; type MaxProposals = AdvisoryCommitteeMaxProposals; + type MaxProposalWeight = MaxProposalWeight; type MotionDuration = AdvisoryCommitteeMotionDuration; type RuntimeOrigin = RuntimeOrigin; + type SetMembersOrigin = EnsureRoot; type Proposal = RuntimeCall; type WeightInfo = weights::pallet_collective::WeightInfo; } @@ -766,8 +924,10 @@ macro_rules! impl_config_traits { type RuntimeEvent = RuntimeEvent; type MaxMembers = CouncilMaxMembers; type MaxProposals = CouncilMaxProposals; + type MaxProposalWeight = MaxProposalWeight; type MotionDuration = CouncilMotionDuration; type RuntimeOrigin = RuntimeOrigin; + type SetMembersOrigin = EnsureRoot; type Proposal = RuntimeCall; type WeightInfo = weights::pallet_collective::WeightInfo; } @@ -777,8 +937,10 @@ macro_rules! impl_config_traits { type RuntimeEvent = RuntimeEvent; type MaxMembers = TechnicalCommitteeMaxMembers; type MaxProposals = TechnicalCommitteeMaxProposals; + type MaxProposalWeight = MaxProposalWeight; type MotionDuration = TechnicalCommitteeMotionDuration; type RuntimeOrigin = RuntimeOrigin; + type SetMembersOrigin = EnsureRoot; type Proposal = RuntimeCall; type WeightInfo = weights::pallet_collective::WeightInfo; } @@ -788,17 +950,25 @@ macro_rules! impl_config_traits { type CallFilter = ContractsCallfilter; type CallStack = [pallet_contracts::Frame; 5]; type ChainExtension = (); + type Debug = (); + type DefaultDepositLimit = ContractsDefaultDepositLimit; + type CodeHashLockupDepositPercent = ContractsCodeHashLockupDepositPercent; type Currency = Balances; - type DeletionQueueDepth = ContractsDeletionQueueDepth; - type DeletionWeightLimit = ContractsDeletionWeightLimit; type DepositPerItem = ContractsDepositPerItem; type DepositPerByte = ContractsDepositPerByte; + type Environment = (); type MaxCodeLen = ContractsMaxCodeLen; type MaxDebugBufferLen = ContractsMaxDebugBufferLen; + type MaxDelegateDependencies = ContractsMaxDelegateDependencies; type MaxStorageKeyLen = ContractsMaxStorageKeyLen; + #[cfg(not(feature = "runtime-benchmarks"))] + type Migrations = (); + #[cfg(feature = "runtime-benchmarks")] + type Migrations = pallet_contracts::migration::codegen::BenchMigrations; type Randomness = RandomnessCollectiveFlip; - type RuntimeEvent = RuntimeEvent; type RuntimeCall = RuntimeCall; + type RuntimeEvent = RuntimeEvent; + type RuntimeHoldReason = RuntimeHoldReason; type Schedule = ContractsSchedule; type Time = Timestamp; type UnsafeUnstableInterface = ContractsUnsafeUnstableInterface; @@ -841,6 +1011,7 @@ macro_rules! impl_config_traits { type CooloffPeriod = CooloffPeriod; type Slash = Treasury; type Scheduler = Scheduler; + type SubmitOrigin = EnsureSigned; type PalletsOrigin = OriginCaller; type MaxVotes = MaxVotes; type WeightInfo = weights::pallet_democracy::WeightInfo; @@ -1034,7 +1205,7 @@ macro_rules! impl_config_traits { type AnnouncementDepositFactor = AnnouncementDepositFactor; } - impl pallet_randomness_collective_flip::Config for Runtime {} + impl pallet_insecure_randomness_collective_flip::Config for Runtime {} impl pallet_scheduler::Config for Runtime { type RuntimeEvent = RuntimeEvent; @@ -1043,6 +1214,9 @@ macro_rules! impl_config_traits { type RuntimeCall = RuntimeCall; type MaximumWeight = MaximumSchedulerWeight; type ScheduleOrigin = EnsureRoot; + #[cfg(feature = "runtime-benchmarks")] + type MaxScheduledPerBlock = ConstU32<512>; + #[cfg(not(feature = "runtime-benchmarks"))] type MaxScheduledPerBlock = MaxScheduledPerBlock; type WeightInfo = weights::pallet_scheduler::WeightInfo; type OriginPrivilegeCmp = EqualPrivilegeOnly; @@ -1484,12 +1658,21 @@ macro_rules! create_runtime_api { // return false if author mapping not registered like in can_author impl return false }; + + let candidates = pallet_parachain_staking::Pallet::::compute_top_candidates(); + if candidates.is_empty() { + // If there are zero selected candidates, we use the same eligibility + // as the previous round + return AuthorInherent::can_author(&author, &slot); + } + // predict eligibility post-selection by computing selection results now let (eligible, _) = pallet_author_slot_filter::compute_pseudo_random_subset::( - pallet_parachain_staking::Pallet::::compute_top_candidates(), + candidates, &slot ); + eligible.contains(&author_account_id) } else { AuthorInherent::can_author(&author, &slot) @@ -1503,6 +1686,7 @@ macro_rules! create_runtime_api { Vec, Vec, ) { + use alloc::vec::Vec; use frame_benchmarking::{list_benchmark, baseline::Pallet as BaselineBench, Benchmarking, BenchmarkList}; use frame_support::traits::StorageInfoTrait; use frame_system_benchmarking::Pallet as SystemBench; @@ -1563,39 +1747,24 @@ macro_rules! create_runtime_api { config: frame_benchmarking::BenchmarkConfig, ) -> Result, sp_runtime::RuntimeString> { use frame_benchmarking::{ - add_benchmark, baseline::{Pallet as BaselineBench, Config as BaselineConfig}, vec, BenchmarkBatch, Benchmarking, TrackedStorageKey, Vec + add_benchmark, + baseline::{ + Pallet as BaselineBench, Config as BaselineConfig + }, + BenchmarkBatch, Benchmarking }; + use alloc::{vec, vec::Vec}; + use frame_support::traits::{TrackedStorageKey, WhitelistedStorageKeys}; use frame_system_benchmarking::Pallet as SystemBench; use orml_benchmarking::{add_benchmark as orml_add_benchmark}; + #[allow(non_local_definitions)] impl frame_system_benchmarking::Config for Runtime {} + #[allow(non_local_definitions)] impl BaselineConfig for Runtime {} - let whitelist: Vec = vec![ - // Block Number - hex_literal::hex!( "26aa394eea5630e07c48ae0c9558cef7" - "02a5c1b19ab7a04f536c519aca4983ac") - .to_vec().into(), - // Total Issuance - hex_literal::hex!( "c2261276cc9d1f8598ea4b6a74b15c2f" - "57c875e4cff74148e4628f264b974c80") - .to_vec().into(), - // Execution Phase - hex_literal::hex!( "26aa394eea5630e07c48ae0c9558cef7" - "ff553b5a9862a516939d82b3d3d8661a") - .to_vec().into(), - // Event Count - hex_literal::hex!( "26aa394eea5630e07c48ae0c9558cef7" - "0a98fdbe9ce6c55837576c60c7af3850") - .to_vec().into(), - // System Events - hex_literal::hex!( "26aa394eea5630e07c48ae0c9558cef7" - "80d41e5e16056765bc8461851072c9d7") - .to_vec().into(), - // System BlockWeight - hex_literal::hex!( "26aa394eea5630e07c48ae0c9558cef7" - "34abf5cb34d6244378cddbf18e849d96") - .to_vec().into(), + let mut whitelist: Vec = AllPalletsWithSystem::whitelisted_storage_keys(); + let additional_whitelist: Vec = vec![ // ParachainStaking Round hex_literal::hex!( "a686a3043d0adcf2fa655e57bc595a78" "13792e785168f725b60e2969c7fc2552") @@ -1612,6 +1781,7 @@ macro_rules! create_runtime_api { "04a74d81251e398fd8a0a4d55023bb3f") .to_vec().into(), ]; + whitelist.extend(additional_whitelist.into_iter()); let mut batches = Vec::::new(); let params = (&config, &whitelist); @@ -1665,21 +1835,26 @@ macro_rules! create_runtime_api { } if batches.is_empty() { - return Err("Benchmark not found for this pallet.".into()); + return Err("Benchmark not found for this module.".into()); } Ok(batches) } } - impl frame_system_rpc_runtime_api::AccountNonceApi for Runtime { - fn account_nonce(account: AccountId) -> Index { + impl frame_system_rpc_runtime_api::AccountNonceApi for Runtime { + fn account_nonce(account: AccountId) -> Nonce { System::account_nonce(account) } } - impl pallet_contracts::ContractsApi - for Runtime - { + impl pallet_contracts::ContractsApi< + Block, + AccountId, + Balance, + BlockNumber, + Hash, + EventRecord + > for Runtime { fn call( origin: AccountId, dest: AccountId, @@ -1687,7 +1862,7 @@ macro_rules! create_runtime_api { gas_limit: Option, storage_deposit_limit: Option, input_data: Vec, - ) -> pallet_contracts_primitives::ContractExecResult { + ) -> pallet_contracts_primitives::ContractExecResult { let gas_limit = gas_limit.unwrap_or(RuntimeBlockWeights::get().max_block); Contracts::bare_call( origin, @@ -1696,8 +1871,9 @@ macro_rules! create_runtime_api { gas_limit, storage_deposit_limit, input_data, - CONTRACTS_DEBUG_OUTPUT, - pallet_contracts::Determinism::Deterministic, + pallet_contracts::DebugInfo::UnsafeDebug, + pallet_contracts::CollectEvents::UnsafeCollect, + pallet_contracts::Determinism::Enforced, ) } @@ -1709,8 +1885,7 @@ macro_rules! create_runtime_api { code: pallet_contracts_primitives::Code, data: Vec, salt: Vec, - ) -> pallet_contracts_primitives::ContractInstantiateResult - { + ) -> pallet_contracts_primitives::ContractInstantiateResult { let gas_limit = gas_limit.unwrap_or(RuntimeBlockWeights::get().max_block); Contracts::bare_instantiate( origin, @@ -1720,7 +1895,8 @@ macro_rules! create_runtime_api { code, data, salt, - CONTRACTS_DEBUG_OUTPUT, + pallet_contracts::DebugInfo::UnsafeDebug, + pallet_contracts::CollectEvents::UnsafeCollect, ) } @@ -1731,12 +1907,7 @@ macro_rules! create_runtime_api { determinism: pallet_contracts::Determinism, ) -> pallet_contracts_primitives::CodeUploadResult { - Contracts::bare_upload_code( - origin, - code, - storage_deposit_limit, - determinism, - ) + Contracts::bare_upload_code(origin, code, storage_deposit_limit, determinism) } fn get_storage( @@ -1828,6 +1999,14 @@ macro_rules! create_runtime_api { fn metadata() -> OpaqueMetadata { OpaqueMetadata::new(Runtime::metadata().into()) } + + fn metadata_at_version(version: u32) -> Option { + Runtime::metadata_at_version(version) + } + + fn metadata_versions() -> Vec { + Runtime::metadata_versions() + } } impl sp_block_builder::BlockBuilder for Runtime { @@ -1863,31 +2042,34 @@ macro_rules! create_runtime_api { } #[cfg(not(feature = "parachain"))] - impl sp_finality_grandpa::GrandpaApi for Runtime { - fn current_set_id() -> pallet_grandpa::fg_primitives::SetId { - Grandpa::current_set_id() - } - - fn generate_key_ownership_proof( - _set_id: pallet_grandpa::fg_primitives::SetId, - _authority_id: pallet_grandpa::AuthorityId, - ) -> Option { - None + impl sp_consensus_grandpa::GrandpaApi for Runtime { + fn grandpa_authorities() -> sp_consensus_grandpa::AuthorityList { + Grandpa::grandpa_authorities() } - fn grandpa_authorities() -> pallet_grandpa::AuthorityList { - Grandpa::grandpa_authorities() + fn current_set_id() -> sp_consensus_grandpa::SetId { + Grandpa::current_set_id() } fn submit_report_equivocation_unsigned_extrinsic( - _equivocation_proof: pallet_grandpa::fg_primitives::EquivocationProof< + _equivocation_proof: sp_consensus_grandpa::EquivocationProof< ::Hash, - sp_runtime::traits::NumberFor, + sp_api::NumberFor, >, - _key_owner_proof: pallet_grandpa::fg_primitives::OpaqueKeyOwnershipProof, + _key_owner_proof: sp_consensus_grandpa::OpaqueKeyOwnershipProof, ) -> Option<()> { None } + + fn generate_key_ownership_proof( + _set_id: sp_consensus_grandpa::SetId, + _authority_id: sp_consensus_grandpa::AuthorityId, + ) -> Option { + // NOTE: this is the only implementation possible since we've + // defined our key owner proof type as a bottom type (i.e. a type + // with no values). + None + } } impl sp_offchain::OffchainWorkerApi for Runtime { @@ -2012,7 +2194,8 @@ macro_rules! create_common_benchmark_logic { AccountId, Amount, AssetManager, Balance, Assets, ExistentialDeposit, GetNativeCurrencyId, Runtime }; - use frame_benchmarking::{account, vec, whitelisted_caller}; + use alloc::vec; + use frame_benchmarking::{account, whitelisted_caller}; use frame_system::RawOrigin; use sp_runtime::traits::UniqueSaturatedInto; use orml_benchmarking::runtime_benchmarks; @@ -2125,7 +2308,8 @@ macro_rules! create_common_benchmark_logic { pub(crate) mod tokens { use super::utils::{lookup_of_account, set_balance as update_balance}; use crate::{AccountId, Balance, Tokens, Runtime}; - use frame_benchmarking::{account, vec, whitelisted_caller}; + use alloc::vec; + use frame_benchmarking::{account, whitelisted_caller}; use frame_system::RawOrigin; use orml_benchmarking::runtime_benchmarks; use orml_traits::MultiCurrency; @@ -2229,8 +2413,11 @@ macro_rules! create_common_benchmark_logic { #[cfg(test)] pub mod tests { + use crate::Runtime; + use sp_runtime::BuildStorage; + pub fn new_test_ext() -> sp_io::TestExternalities { - frame_system::GenesisConfig::default().build_storage::().unwrap().into() + frame_system::GenesisConfig::::default().build_storage().unwrap().into() } } } @@ -2249,6 +2436,7 @@ macro_rules! create_common_tests { use crate::*; use frame_support::PalletId; use test_case::test_case; + use sp_runtime::BuildStorage; #[test_case(AuthorizedPalletId::get(); "authorized")] #[test_case(CourtPalletId::get(); "court")] @@ -2259,7 +2447,7 @@ macro_rules! create_common_tests { #[test_case(TreasuryPalletId::get(); "treasury")] fn whitelisted_pallet_accounts_dont_get_reaped(pallet_id: PalletId) { let mut t: sp_io::TestExternalities = - frame_system::GenesisConfig::default().build_storage::().unwrap().into(); + frame_system::GenesisConfig::::default().build_storage().unwrap().into(); t.execute_with(|| { let pallet_main_account: AccountId = pallet_id.into_account_truncating(); let pallet_sub_account: AccountId = pallet_id.into_sub_account_truncating(42); @@ -2271,7 +2459,7 @@ macro_rules! create_common_tests { #[test] fn non_whitelisted_accounts_get_reaped() { let mut t: sp_io::TestExternalities = - frame_system::GenesisConfig::default().build_storage::().unwrap().into(); + frame_system::GenesisConfig::::default().build_storage().unwrap().into(); t.execute_with(|| { let not_whitelisted = AccountId::from([0u8; 32]); assert!(!DustRemovalWhitelist::contains(¬_whitelisted)) diff --git a/runtime/common/src/weights/frame_system.rs b/runtime/common/src/weights/frame_system.rs index 02094be2c..743242b1f 100644 --- a/runtime/common/src/weights/frame_system.rs +++ b/runtime/common/src/weights/frame_system.rs @@ -85,6 +85,19 @@ impl frame_system::weights::WeightInfo for WeightInfo Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `1485` + // Minimum execution time: 84_000_503_000 picoseconds. + Weight::from_parts(87_586_619_000, 1485) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(2_u64)) + } /// Storage: Skipped Metadata (r:0 w:0) /// Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Measured) /// The range of component `i` is `[0, 1000]`. diff --git a/runtime/common/src/weights/pallet_assets.rs b/runtime/common/src/weights/pallet_assets.rs index 421d14405..0dafad365 100644 --- a/runtime/common/src/weights/pallet_assets.rs +++ b/runtime/common/src/weights/pallet_assets.rs @@ -52,370 +52,440 @@ use frame_support::{ /// Weight functions for pallet_assets (automatically generated) pub struct WeightInfo(PhantomData); impl pallet_assets::weights::WeightInfo for WeightInfo { - /// Storage: CustomAssets Asset (r:1 w:1) - /// Proof: CustomAssets Asset (max_values: None, max_size: Some(222), added: 2697, mode: MaxEncodedLen) + /// Storage: Assets Asset (r:1 w:1) + /// Proof: Assets Asset (max_values: None, max_size: Some(210), added: 2685, mode: MaxEncodedLen) /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: MaxEncodedLen) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) fn create() -> Weight { // Proof Size summary in bytes: - // Measured: `285` - // Estimated: `5304` - // Minimum execution time: 45_580 nanoseconds. - Weight::from_parts(46_600_000, 5304) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(2)) + // Measured: `293` + // Estimated: `3675` + // Minimum execution time: 31_340_000 picoseconds. + Weight::from_parts(31_977_000, 3675) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(2_u64)) } - /// Storage: CustomAssets Asset (r:1 w:1) - /// Proof: CustomAssets Asset (max_values: None, max_size: Some(222), added: 2697, mode: MaxEncodedLen) + /// Storage: Assets Asset (r:1 w:1) + /// Proof: Assets Asset (max_values: None, max_size: Some(210), added: 2685, mode: MaxEncodedLen) fn force_create() -> Weight { // Proof Size summary in bytes: - // Measured: `109` - // Estimated: `2697` - // Minimum execution time: 24_880 nanoseconds. - Weight::from_parts(25_780_000, 2697) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: AssetRouter DestroyAssets (r:1 w:1) - /// Proof: AssetRouter DestroyAssets (max_values: Some(1), max_size: Some(40962), added: 41457, mode: MaxEncodedLen) - /// Storage: CustomAssets Asset (r:1 w:1) - /// Proof: CustomAssets Asset (max_values: None, max_size: Some(222), added: 2697, mode: MaxEncodedLen) - /// Storage: AssetRouter IndestructibleAssets (r:1 w:0) - /// Proof: AssetRouter IndestructibleAssets (max_values: Some(1), max_size: Some(38914), added: 39409, mode: MaxEncodedLen) + // Measured: `153` + // Estimated: `3675` + // Minimum execution time: 13_342_000 picoseconds. + Weight::from_parts(13_782_000, 3675) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } + /// Storage: Assets Asset (r:1 w:1) + /// Proof: Assets Asset (max_values: None, max_size: Some(210), added: 2685, mode: MaxEncodedLen) fn start_destroy() -> Weight { // Proof Size summary in bytes: - // Measured: `452` - // Estimated: `83563` - // Minimum execution time: 37_170 nanoseconds. - Weight::from_parts(38_891_000, 83563) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(2)) - } - /// Storage: CustomAssets Asset (r:1 w:1) - /// Proof: CustomAssets Asset (max_values: None, max_size: Some(222), added: 2697, mode: MaxEncodedLen) - /// Storage: CustomAssets Account (r:51 w:50) - /// Proof: CustomAssets Account (max_values: None, max_size: Some(114), added: 2589, mode: MaxEncodedLen) - /// Storage: System Account (r:50 w:50) - /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: MaxEncodedLen) - /// The range of component `c` is `[0, 50]`. + // Measured: `385` + // Estimated: `3675` + // Minimum execution time: 14_437_000 picoseconds. + Weight::from_parts(14_833_000, 3675) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } + /// Storage: Assets Asset (r:1 w:1) + /// Proof: Assets Asset (max_values: None, max_size: Some(210), added: 2685, mode: MaxEncodedLen) + /// Storage: Assets Account (r:1001 w:1000) + /// Proof: Assets Account (max_values: None, max_size: Some(134), added: 2609, mode: MaxEncodedLen) + /// Storage: System Account (r:1000 w:1000) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// The range of component `c` is `[0, 1000]`. fn destroy_accounts(c: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `413 + c * (241 ±0)` - // Estimated: `5286 + c * (5196 ±0)` - // Minimum execution time: 35_950 nanoseconds. - Weight::from_parts(27_443_769, 5286) - // Standard Error: 187_706 - .saturating_add(Weight::from_parts(27_794_683, 0).saturating_mul(c.into())) - .saturating_add(T::DbWeight::get().reads(2)) + // Measured: `0 + c * (208 ±0)` + // Estimated: `3675 + c * (2609 ±0)` + // Minimum execution time: 18_728_000 picoseconds. + Weight::from_parts(18_982_000, 3675) + // Standard Error: 11_708 + .saturating_add(Weight::from_parts(14_363_570, 0).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(c.into()))) - .saturating_add(T::DbWeight::get().writes(1)) + .saturating_add(T::DbWeight::get().writes(1_u64)) .saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(c.into()))) - .saturating_add(Weight::from_parts(0, 5196).saturating_mul(c.into())) + .saturating_add(Weight::from_parts(0, 2609).saturating_mul(c.into())) } - /// Storage: CustomAssets Asset (r:1 w:1) - /// Proof: CustomAssets Asset (max_values: None, max_size: Some(222), added: 2697, mode: MaxEncodedLen) - /// Storage: CustomAssets Approvals (r:51 w:50) - /// Proof: CustomAssets Approvals (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) - /// The range of component `a` is `[0, 50]`. + /// Storage: Assets Asset (r:1 w:1) + /// Proof: Assets Asset (max_values: None, max_size: Some(210), added: 2685, mode: MaxEncodedLen) + /// Storage: Assets Approvals (r:1001 w:1000) + /// Proof: Assets Approvals (max_values: None, max_size: Some(148), added: 2623, mode: MaxEncodedLen) + /// The range of component `a` is `[0, 1000]`. fn destroy_approvals(a: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `499 + a * (86 ±0)` - // Estimated: `5332 + a * (2635 ±0)` - // Minimum execution time: 29_050 nanoseconds. - Weight::from_parts(47_517_757, 5332) - // Standard Error: 73_418 - .saturating_add(Weight::from_parts(24_955_809, 0).saturating_mul(a.into())) - .saturating_add(T::DbWeight::get().reads(2)) + // Measured: `522 + a * (86 ±0)` + // Estimated: `3675 + a * (2623 ±0)` + // Minimum execution time: 18_611_000 picoseconds. + Weight::from_parts(18_970_000, 3675) + // Standard Error: 13_224 + .saturating_add(Weight::from_parts(16_397_299, 0).saturating_mul(a.into())) + .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(a.into()))) - .saturating_add(T::DbWeight::get().writes(1)) + .saturating_add(T::DbWeight::get().writes(1_u64)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(a.into()))) - .saturating_add(Weight::from_parts(0, 2635).saturating_mul(a.into())) + .saturating_add(Weight::from_parts(0, 2623).saturating_mul(a.into())) } - /// Storage: CustomAssets Asset (r:1 w:1) - /// Proof: CustomAssets Asset (max_values: None, max_size: Some(222), added: 2697, mode: MaxEncodedLen) - /// Storage: CustomAssets Metadata (r:1 w:0) - /// Proof: CustomAssets Metadata (max_values: None, max_size: Some(152), added: 2627, mode: MaxEncodedLen) + /// Storage: Assets Asset (r:1 w:1) + /// Proof: Assets Asset (max_values: None, max_size: Some(210), added: 2685, mode: MaxEncodedLen) + /// Storage: Assets Metadata (r:1 w:0) + /// Proof: Assets Metadata (max_values: None, max_size: Some(140), added: 2615, mode: MaxEncodedLen) fn finish_destroy() -> Weight { // Proof Size summary in bytes: - // Measured: `376` - // Estimated: `5324` - // Minimum execution time: 27_720 nanoseconds. - Weight::from_parts(29_560_000, 5324) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: CustomAssets Asset (r:1 w:1) - /// Proof: CustomAssets Asset (max_values: None, max_size: Some(222), added: 2697, mode: MaxEncodedLen) - /// Storage: CustomAssets Account (r:1 w:1) - /// Proof: CustomAssets Account (max_values: None, max_size: Some(114), added: 2589, mode: MaxEncodedLen) + // Measured: `351` + // Estimated: `3675` + // Minimum execution time: 14_504_000 picoseconds. + Weight::from_parts(14_906_000, 3675) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } + /// Storage: Assets Asset (r:1 w:1) + /// Proof: Assets Asset (max_values: None, max_size: Some(210), added: 2685, mode: MaxEncodedLen) + /// Storage: Assets Account (r:1 w:1) + /// Proof: Assets Account (max_values: None, max_size: Some(134), added: 2609, mode: MaxEncodedLen) fn mint() -> Weight { // Proof Size summary in bytes: - // Measured: `376` - // Estimated: `5286` - // Minimum execution time: 47_300 nanoseconds. - Weight::from_parts(48_191_000, 5286) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(2)) - } - /// Storage: CustomAssets Asset (r:1 w:1) - /// Proof: CustomAssets Asset (max_values: None, max_size: Some(222), added: 2697, mode: MaxEncodedLen) - /// Storage: CustomAssets Account (r:1 w:1) - /// Proof: CustomAssets Account (max_values: None, max_size: Some(114), added: 2589, mode: MaxEncodedLen) + // Measured: `351` + // Estimated: `3675` + // Minimum execution time: 26_653_000 picoseconds. + Weight::from_parts(27_260_000, 3675) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(2_u64)) + } + /// Storage: Assets Asset (r:1 w:1) + /// Proof: Assets Asset (max_values: None, max_size: Some(210), added: 2685, mode: MaxEncodedLen) + /// Storage: Assets Account (r:1 w:1) + /// Proof: Assets Account (max_values: None, max_size: Some(134), added: 2609, mode: MaxEncodedLen) fn burn() -> Weight { // Proof Size summary in bytes: - // Measured: `481` - // Estimated: `5286` - // Minimum execution time: 56_541 nanoseconds. - Weight::from_parts(57_720_000, 5286) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(2)) - } - /// Storage: CustomAssets Asset (r:1 w:1) - /// Proof: CustomAssets Asset (max_values: None, max_size: Some(222), added: 2697, mode: MaxEncodedLen) - /// Storage: CustomAssets Account (r:2 w:2) - /// Proof: CustomAssets Account (max_values: None, max_size: Some(114), added: 2589, mode: MaxEncodedLen) + // Measured: `459` + // Estimated: `3675` + // Minimum execution time: 33_625_000 picoseconds. + Weight::from_parts(34_474_000, 3675) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(2_u64)) + } + /// Storage: Assets Asset (r:1 w:1) + /// Proof: Assets Asset (max_values: None, max_size: Some(210), added: 2685, mode: MaxEncodedLen) + /// Storage: Assets Account (r:2 w:2) + /// Proof: Assets Account (max_values: None, max_size: Some(134), added: 2609, mode: MaxEncodedLen) /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: MaxEncodedLen) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) fn transfer() -> Weight { // Proof Size summary in bytes: - // Measured: `520` - // Estimated: `10482` - // Minimum execution time: 66_921 nanoseconds. - Weight::from_parts(81_670_000, 10482) - .saturating_add(T::DbWeight::get().reads(4)) - .saturating_add(T::DbWeight::get().writes(4)) - } - /// Storage: CustomAssets Asset (r:1 w:1) - /// Proof: CustomAssets Asset (max_values: None, max_size: Some(222), added: 2697, mode: MaxEncodedLen) - /// Storage: CustomAssets Account (r:2 w:2) - /// Proof: CustomAssets Account (max_values: None, max_size: Some(114), added: 2589, mode: MaxEncodedLen) + // Measured: `498` + // Estimated: `6208` + // Minimum execution time: 47_609_000 picoseconds. + Weight::from_parts(48_476_000, 6208) + .saturating_add(T::DbWeight::get().reads(4_u64)) + .saturating_add(T::DbWeight::get().writes(4_u64)) + } + /// Storage: Assets Asset (r:1 w:1) + /// Proof: Assets Asset (max_values: None, max_size: Some(210), added: 2685, mode: MaxEncodedLen) + /// Storage: Assets Account (r:2 w:2) + /// Proof: Assets Account (max_values: None, max_size: Some(134), added: 2609, mode: MaxEncodedLen) /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: MaxEncodedLen) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) fn transfer_keep_alive() -> Weight { // Proof Size summary in bytes: - // Measured: `520` - // Estimated: `10482` - // Minimum execution time: 70_230 nanoseconds. - Weight::from_parts(71_750_000, 10482) - .saturating_add(T::DbWeight::get().reads(4)) - .saturating_add(T::DbWeight::get().writes(4)) - } - /// Storage: CustomAssets Asset (r:1 w:1) - /// Proof: CustomAssets Asset (max_values: None, max_size: Some(222), added: 2697, mode: MaxEncodedLen) - /// Storage: CustomAssets Account (r:2 w:2) - /// Proof: CustomAssets Account (max_values: None, max_size: Some(114), added: 2589, mode: MaxEncodedLen) + // Measured: `498` + // Estimated: `6208` + // Minimum execution time: 41_625_000 picoseconds. + Weight::from_parts(43_030_000, 6208) + .saturating_add(T::DbWeight::get().reads(4_u64)) + .saturating_add(T::DbWeight::get().writes(4_u64)) + } + /// Storage: Assets Asset (r:1 w:1) + /// Proof: Assets Asset (max_values: None, max_size: Some(210), added: 2685, mode: MaxEncodedLen) + /// Storage: Assets Account (r:2 w:2) + /// Proof: Assets Account (max_values: None, max_size: Some(134), added: 2609, mode: MaxEncodedLen) /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: MaxEncodedLen) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) fn force_transfer() -> Weight { // Proof Size summary in bytes: - // Measured: `520` - // Estimated: `10482` - // Minimum execution time: 81_470 nanoseconds. - Weight::from_parts(83_780_000, 10482) - .saturating_add(T::DbWeight::get().reads(4)) - .saturating_add(T::DbWeight::get().writes(4)) - } - /// Storage: CustomAssets Asset (r:1 w:0) - /// Proof: CustomAssets Asset (max_values: None, max_size: Some(222), added: 2697, mode: MaxEncodedLen) - /// Storage: CustomAssets Account (r:1 w:1) - /// Proof: CustomAssets Account (max_values: None, max_size: Some(114), added: 2589, mode: MaxEncodedLen) + // Measured: `498` + // Estimated: `6208` + // Minimum execution time: 47_661_000 picoseconds. + Weight::from_parts(48_469_000, 6208) + .saturating_add(T::DbWeight::get().reads(4_u64)) + .saturating_add(T::DbWeight::get().writes(4_u64)) + } + /// Storage: Assets Asset (r:1 w:0) + /// Proof: Assets Asset (max_values: None, max_size: Some(210), added: 2685, mode: MaxEncodedLen) + /// Storage: Assets Account (r:1 w:1) + /// Proof: Assets Account (max_values: None, max_size: Some(134), added: 2609, mode: MaxEncodedLen) fn freeze() -> Weight { // Proof Size summary in bytes: - // Measured: `481` - // Estimated: `5286` - // Minimum execution time: 31_790 nanoseconds. - Weight::from_parts(32_470_000, 5286) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: CustomAssets Asset (r:1 w:0) - /// Proof: CustomAssets Asset (max_values: None, max_size: Some(222), added: 2697, mode: MaxEncodedLen) - /// Storage: CustomAssets Account (r:1 w:1) - /// Proof: CustomAssets Account (max_values: None, max_size: Some(114), added: 2589, mode: MaxEncodedLen) + // Measured: `459` + // Estimated: `3675` + // Minimum execution time: 17_727_000 picoseconds. + Weight::from_parts(18_384_000, 3675) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } + /// Storage: Assets Asset (r:1 w:0) + /// Proof: Assets Asset (max_values: None, max_size: Some(210), added: 2685, mode: MaxEncodedLen) + /// Storage: Assets Account (r:1 w:1) + /// Proof: Assets Account (max_values: None, max_size: Some(134), added: 2609, mode: MaxEncodedLen) fn thaw() -> Weight { // Proof Size summary in bytes: - // Measured: `481` - // Estimated: `5286` - // Minimum execution time: 31_250 nanoseconds. - Weight::from_parts(32_661_000, 5286) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(1)) + // Measured: `459` + // Estimated: `3675` + // Minimum execution time: 17_657_000 picoseconds. + Weight::from_parts(18_282_000, 3675) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) } - /// Storage: CustomAssets Asset (r:1 w:1) - /// Proof: CustomAssets Asset (max_values: None, max_size: Some(222), added: 2697, mode: MaxEncodedLen) + /// Storage: Assets Asset (r:1 w:1) + /// Proof: Assets Asset (max_values: None, max_size: Some(210), added: 2685, mode: MaxEncodedLen) fn freeze_asset() -> Weight { // Proof Size summary in bytes: - // Measured: `410` - // Estimated: `2697` - // Minimum execution time: 24_740 nanoseconds. - Weight::from_parts(25_781_000, 2697) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) + // Measured: `385` + // Estimated: `3675` + // Minimum execution time: 13_743_000 picoseconds. + Weight::from_parts(14_193_000, 3675) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) } - /// Storage: CustomAssets Asset (r:1 w:1) - /// Proof: CustomAssets Asset (max_values: None, max_size: Some(222), added: 2697, mode: MaxEncodedLen) + /// Storage: Assets Asset (r:1 w:1) + /// Proof: Assets Asset (max_values: None, max_size: Some(210), added: 2685, mode: MaxEncodedLen) fn thaw_asset() -> Weight { // Proof Size summary in bytes: - // Measured: `410` - // Estimated: `2697` - // Minimum execution time: 23_900 nanoseconds. - Weight::from_parts(25_160_000, 2697) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: CustomAssets Asset (r:1 w:1) - /// Proof: CustomAssets Asset (max_values: None, max_size: Some(222), added: 2697, mode: MaxEncodedLen) - /// Storage: CustomAssets Metadata (r:1 w:0) - /// Proof: CustomAssets Metadata (max_values: None, max_size: Some(152), added: 2627, mode: MaxEncodedLen) + // Measured: `385` + // Estimated: `3675` + // Minimum execution time: 13_653_000 picoseconds. + Weight::from_parts(14_263_000, 3675) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } + /// Storage: Assets Asset (r:1 w:1) + /// Proof: Assets Asset (max_values: None, max_size: Some(210), added: 2685, mode: MaxEncodedLen) + /// Storage: Assets Metadata (r:1 w:0) + /// Proof: Assets Metadata (max_values: None, max_size: Some(140), added: 2615, mode: MaxEncodedLen) fn transfer_ownership() -> Weight { // Proof Size summary in bytes: - // Measured: `376` - // Estimated: `5324` - // Minimum execution time: 29_690 nanoseconds. - Weight::from_parts(30_700_000, 5324) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(1)) + // Measured: `351` + // Estimated: `3675` + // Minimum execution time: 15_328_000 picoseconds. + Weight::from_parts(16_042_000, 3675) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) } - /// Storage: CustomAssets Asset (r:1 w:1) - /// Proof: CustomAssets Asset (max_values: None, max_size: Some(222), added: 2697, mode: MaxEncodedLen) + /// Storage: Assets Asset (r:1 w:1) + /// Proof: Assets Asset (max_values: None, max_size: Some(210), added: 2685, mode: MaxEncodedLen) fn set_team() -> Weight { // Proof Size summary in bytes: - // Measured: `376` - // Estimated: `2697` - // Minimum execution time: 26_960 nanoseconds. - Weight::from_parts(28_210_000, 2697) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: CustomAssets Asset (r:1 w:0) - /// Proof: CustomAssets Asset (max_values: None, max_size: Some(222), added: 2697, mode: MaxEncodedLen) - /// Storage: CustomAssets Metadata (r:1 w:1) - /// Proof: CustomAssets Metadata (max_values: None, max_size: Some(152), added: 2627, mode: MaxEncodedLen) + // Measured: `351` + // Estimated: `3675` + // Minimum execution time: 14_097_000 picoseconds. + Weight::from_parts(14_641_000, 3675) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } + /// Storage: Assets Asset (r:1 w:0) + /// Proof: Assets Asset (max_values: None, max_size: Some(210), added: 2685, mode: MaxEncodedLen) + /// Storage: Assets Metadata (r:1 w:1) + /// Proof: Assets Metadata (max_values: None, max_size: Some(140), added: 2615, mode: MaxEncodedLen) /// The range of component `n` is `[0, 50]`. /// The range of component `s` is `[0, 50]`. - fn set_metadata(n: u32, s: u32) -> Weight { - // Proof Size summary in bytes: - // Measured: `376` - // Estimated: `5324` - // Minimum execution time: 35_650 nanoseconds. - Weight::from_parts(44_501_301, 5324) - // Standard Error: 2_153 - .saturating_add(Weight::from_parts(14_080, 0).saturating_mul(n.into())) - // Standard Error: 2_153 - .saturating_add(Weight::from_parts(8_285, 0).saturating_mul(s.into())) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: CustomAssets Asset (r:1 w:0) - /// Proof: CustomAssets Asset (max_values: None, max_size: Some(222), added: 2697, mode: MaxEncodedLen) - /// Storage: CustomAssets Metadata (r:1 w:1) - /// Proof: CustomAssets Metadata (max_values: None, max_size: Some(152), added: 2627, mode: MaxEncodedLen) + fn set_metadata(_n: u32, _s: u32) -> Weight { + // Proof Size summary in bytes: + // Measured: `351` + // Estimated: `3675` + // Minimum execution time: 29_535_000 picoseconds. + Weight::from_parts(31_456_892, 3675) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } + /// Storage: Assets Asset (r:1 w:0) + /// Proof: Assets Asset (max_values: None, max_size: Some(210), added: 2685, mode: MaxEncodedLen) + /// Storage: Assets Metadata (r:1 w:1) + /// Proof: Assets Metadata (max_values: None, max_size: Some(140), added: 2615, mode: MaxEncodedLen) fn clear_metadata() -> Weight { // Proof Size summary in bytes: - // Measured: `569` - // Estimated: `5324` - // Minimum execution time: 45_190 nanoseconds. - Weight::from_parts(45_860_000, 5324) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: CustomAssets Asset (r:1 w:0) - /// Proof: CustomAssets Asset (max_values: None, max_size: Some(222), added: 2697, mode: MaxEncodedLen) - /// Storage: CustomAssets Metadata (r:1 w:1) - /// Proof: CustomAssets Metadata (max_values: None, max_size: Some(152), added: 2627, mode: MaxEncodedLen) + // Measured: `515` + // Estimated: `3675` + // Minimum execution time: 30_680_000 picoseconds. + Weight::from_parts(31_930_000, 3675) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } + /// Storage: Assets Asset (r:1 w:0) + /// Proof: Assets Asset (max_values: None, max_size: Some(210), added: 2685, mode: MaxEncodedLen) + /// Storage: Assets Metadata (r:1 w:1) + /// Proof: Assets Metadata (max_values: None, max_size: Some(140), added: 2615, mode: MaxEncodedLen) /// The range of component `n` is `[0, 50]`. /// The range of component `s` is `[0, 50]`. - fn force_set_metadata(n: u32, s: u32) -> Weight { - // Proof Size summary in bytes: - // Measured: `183` - // Estimated: `5324` - // Minimum execution time: 23_380 nanoseconds. - Weight::from_parts(29_007_377, 5324) - // Standard Error: 1_825 - .saturating_add(Weight::from_parts(5_450, 0).saturating_mul(n.into())) - // Standard Error: 1_825 - .saturating_add(Weight::from_parts(9_969, 0).saturating_mul(s.into())) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: CustomAssets Asset (r:1 w:0) - /// Proof: CustomAssets Asset (max_values: None, max_size: Some(222), added: 2697, mode: MaxEncodedLen) - /// Storage: CustomAssets Metadata (r:1 w:1) - /// Proof: CustomAssets Metadata (max_values: None, max_size: Some(152), added: 2627, mode: MaxEncodedLen) + fn force_set_metadata(_n: u32, s: u32) -> Weight { + // Proof Size summary in bytes: + // Measured: `190` + // Estimated: `3675` + // Minimum execution time: 14_660_000 picoseconds. + Weight::from_parts(15_718_387, 3675) + // Standard Error: 622 + .saturating_add(Weight::from_parts(2_640, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } + /// Storage: Assets Asset (r:1 w:0) + /// Proof: Assets Asset (max_values: None, max_size: Some(210), added: 2685, mode: MaxEncodedLen) + /// Storage: Assets Metadata (r:1 w:1) + /// Proof: Assets Metadata (max_values: None, max_size: Some(140), added: 2615, mode: MaxEncodedLen) fn force_clear_metadata() -> Weight { // Proof Size summary in bytes: - // Measured: `569` - // Estimated: `5324` - // Minimum execution time: 36_830 nanoseconds. - Weight::from_parts(44_640_000, 5324) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(1)) + // Measured: `515` + // Estimated: `3675` + // Minimum execution time: 30_853_000 picoseconds. + Weight::from_parts(31_483_000, 3675) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) } - /// Storage: CustomAssets Asset (r:1 w:1) - /// Proof: CustomAssets Asset (max_values: None, max_size: Some(222), added: 2697, mode: MaxEncodedLen) + /// Storage: Assets Asset (r:1 w:1) + /// Proof: Assets Asset (max_values: None, max_size: Some(210), added: 2685, mode: MaxEncodedLen) fn force_asset_status() -> Weight { // Proof Size summary in bytes: - // Measured: `376` - // Estimated: `2697` - // Minimum execution time: 22_220 nanoseconds. - Weight::from_parts(26_050_000, 2697) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: CustomAssets Asset (r:1 w:1) - /// Proof: CustomAssets Asset (max_values: None, max_size: Some(222), added: 2697, mode: MaxEncodedLen) - /// Storage: CustomAssets Approvals (r:1 w:1) - /// Proof: CustomAssets Approvals (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) + // Measured: `351` + // Estimated: `3675` + // Minimum execution time: 13_632_000 picoseconds. + Weight::from_parts(14_077_000, 3675) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } + /// Storage: Assets Asset (r:1 w:1) + /// Proof: Assets Asset (max_values: None, max_size: Some(210), added: 2685, mode: MaxEncodedLen) + /// Storage: Assets Approvals (r:1 w:1) + /// Proof: Assets Approvals (max_values: None, max_size: Some(148), added: 2623, mode: MaxEncodedLen) fn approve_transfer() -> Weight { // Proof Size summary in bytes: - // Measured: `410` - // Estimated: `5332` - // Minimum execution time: 40_120 nanoseconds. - Weight::from_parts(49_370_000, 5332) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(2)) - } - /// Storage: CustomAssets Asset (r:1 w:1) - /// Proof: CustomAssets Asset (max_values: None, max_size: Some(222), added: 2697, mode: MaxEncodedLen) - /// Storage: CustomAssets Approvals (r:1 w:1) - /// Proof: CustomAssets Approvals (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) - /// Storage: CustomAssets Account (r:2 w:2) - /// Proof: CustomAssets Account (max_values: None, max_size: Some(114), added: 2589, mode: MaxEncodedLen) + // Measured: `385` + // Estimated: `3675` + // Minimum execution time: 33_780_000 picoseconds. + Weight::from_parts(34_533_000, 3675) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(2_u64)) + } + /// Storage: Assets Asset (r:1 w:1) + /// Proof: Assets Asset (max_values: None, max_size: Some(210), added: 2685, mode: MaxEncodedLen) + /// Storage: Assets Approvals (r:1 w:1) + /// Proof: Assets Approvals (max_values: None, max_size: Some(148), added: 2623, mode: MaxEncodedLen) + /// Storage: Assets Account (r:2 w:2) + /// Proof: Assets Account (max_values: None, max_size: Some(134), added: 2609, mode: MaxEncodedLen) /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: MaxEncodedLen) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) fn transfer_approved() -> Weight { // Proof Size summary in bytes: - // Measured: `687` - // Estimated: `13117` - // Minimum execution time: 95_171 nanoseconds. - Weight::from_parts(106_670_000, 13117) - .saturating_add(T::DbWeight::get().reads(5)) - .saturating_add(T::DbWeight::get().writes(5)) - } - /// Storage: CustomAssets Asset (r:1 w:1) - /// Proof: CustomAssets Asset (max_values: None, max_size: Some(222), added: 2697, mode: MaxEncodedLen) - /// Storage: CustomAssets Approvals (r:1 w:1) - /// Proof: CustomAssets Approvals (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) + // Measured: `668` + // Estimated: `6208` + // Minimum execution time: 67_712_000 picoseconds. + Weight::from_parts(69_946_000, 6208) + .saturating_add(T::DbWeight::get().reads(5_u64)) + .saturating_add(T::DbWeight::get().writes(5_u64)) + } + /// Storage: Assets Asset (r:1 w:1) + /// Proof: Assets Asset (max_values: None, max_size: Some(210), added: 2685, mode: MaxEncodedLen) + /// Storage: Assets Approvals (r:1 w:1) + /// Proof: Assets Approvals (max_values: None, max_size: Some(148), added: 2623, mode: MaxEncodedLen) fn cancel_approval() -> Weight { // Proof Size summary in bytes: - // Measured: `577` - // Estimated: `5332` - // Minimum execution time: 52_550 nanoseconds. - Weight::from_parts(54_550_000, 5332) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(2)) - } - /// Storage: CustomAssets Asset (r:1 w:1) - /// Proof: CustomAssets Asset (max_values: None, max_size: Some(222), added: 2697, mode: MaxEncodedLen) - /// Storage: CustomAssets Approvals (r:1 w:1) - /// Proof: CustomAssets Approvals (max_values: None, max_size: Some(160), added: 2635, mode: MaxEncodedLen) + // Measured: `555` + // Estimated: `3675` + // Minimum execution time: 36_668_000 picoseconds. + Weight::from_parts(37_637_000, 3675) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(2_u64)) + } + /// Storage: Assets Asset (r:1 w:1) + /// Proof: Assets Asset (max_values: None, max_size: Some(210), added: 2685, mode: MaxEncodedLen) + /// Storage: Assets Approvals (r:1 w:1) + /// Proof: Assets Approvals (max_values: None, max_size: Some(148), added: 2623, mode: MaxEncodedLen) fn force_cancel_approval() -> Weight { // Proof Size summary in bytes: - // Measured: `577` - // Estimated: `5332` - // Minimum execution time: 53_511 nanoseconds. - Weight::from_parts(55_160_000, 5332) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(2)) + // Measured: `555` + // Estimated: `3675` + // Minimum execution time: 36_685_000 picoseconds. + Weight::from_parts(37_950_000, 3675) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(2_u64)) + } + /// Storage: Assets Asset (r:1 w:1) + /// Proof: Assets Asset (max_values: None, max_size: Some(210), added: 2685, mode: MaxEncodedLen) + fn set_min_balance() -> Weight { + // Proof Size summary in bytes: + // Measured: `351` + // Estimated: `3675` + // Minimum execution time: 14_466_000 picoseconds. + Weight::from_parts(14_924_000, 3675) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } + /// Storage: Assets Account (r:1 w:1) + /// Proof: Assets Account (max_values: None, max_size: Some(134), added: 2609, mode: MaxEncodedLen) + /// Storage: Assets Asset (r:1 w:1) + /// Proof: Assets Asset (max_values: None, max_size: Some(210), added: 2685, mode: MaxEncodedLen) + /// Storage: System Account (r:1 w:1) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + fn touch() -> Weight { + // Proof Size summary in bytes: + // Measured: `453` + // Estimated: `3675` + // Minimum execution time: 34_874_000 picoseconds. + Weight::from_parts(36_330_000, 3675) + .saturating_add(T::DbWeight::get().reads(3_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) + } + /// Storage: Assets Account (r:1 w:1) + /// Proof: Assets Account (max_values: None, max_size: Some(134), added: 2609, mode: MaxEncodedLen) + /// Storage: Assets Asset (r:1 w:1) + /// Proof: Assets Asset (max_values: None, max_size: Some(210), added: 2685, mode: MaxEncodedLen) + fn touch_other() -> Weight { + // Proof Size summary in bytes: + // Measured: `351` + // Estimated: `3675` + // Minimum execution time: 33_278_000 picoseconds. + Weight::from_parts(34_104_000, 3675) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(2_u64)) + } + /// Storage: Assets Account (r:1 w:1) + /// Proof: Assets Account (max_values: None, max_size: Some(134), added: 2609, mode: MaxEncodedLen) + /// Storage: Assets Asset (r:1 w:1) + /// Proof: Assets Asset (max_values: None, max_size: Some(210), added: 2685, mode: MaxEncodedLen) + /// Storage: System Account (r:1 w:1) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + fn refund() -> Weight { + // Proof Size summary in bytes: + // Measured: `579` + // Estimated: `3675` + // Minimum execution time: 32_898_000 picoseconds. + Weight::from_parts(33_489_000, 3675) + .saturating_add(T::DbWeight::get().reads(3_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) + } + /// Storage: Assets Account (r:1 w:1) + /// Proof: Assets Account (max_values: None, max_size: Some(134), added: 2609, mode: MaxEncodedLen) + /// Storage: Assets Asset (r:1 w:1) + /// Proof: Assets Asset (max_values: None, max_size: Some(210), added: 2685, mode: MaxEncodedLen) + fn refund_other() -> Weight { + // Proof Size summary in bytes: + // Measured: `510` + // Estimated: `3675` + // Minimum execution time: 31_243_000 picoseconds. + Weight::from_parts(31_909_000, 3675) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(2_u64)) + } + /// Storage: Assets Asset (r:1 w:0) + /// Proof: Assets Asset (max_values: None, max_size: Some(210), added: 2685, mode: MaxEncodedLen) + /// Storage: Assets Account (r:1 w:1) + /// Proof: Assets Account (max_values: None, max_size: Some(134), added: 2609, mode: MaxEncodedLen) + fn block() -> Weight { + // Proof Size summary in bytes: + // Measured: `459` + // Estimated: `3675` + // Minimum execution time: 17_692_000 picoseconds. + Weight::from_parts(18_253_000, 3675) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) } } diff --git a/runtime/common/src/weights/pallet_balances.rs b/runtime/common/src/weights/pallet_balances.rs index 5e2f6c805..012c55b91 100644 --- a/runtime/common/src/weights/pallet_balances.rs +++ b/runtime/common/src/weights/pallet_balances.rs @@ -52,81 +52,96 @@ use frame_support::{ /// Weight functions for pallet_balances (automatically generated) pub struct WeightInfo(PhantomData); impl pallet_balances::weights::WeightInfo for WeightInfo { - /// Storage: System Account (r:2 w:2) - /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: MaxEncodedLen) - fn transfer() -> Weight { + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + fn transfer_allow_death() -> Weight { // Proof Size summary in bytes: - // Measured: `1585` - // Estimated: `5214` - // Minimum execution time: 109_871 nanoseconds. - Weight::from_parts(111_051_000, 5214) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(2)) + // Measured: `0` + // Estimated: `3593` + // Minimum execution time: 58_474_000 picoseconds. + Weight::from_parts(59_117_000, 3593) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) } - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: MaxEncodedLen) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn transfer_keep_alive() -> Weight { // Proof Size summary in bytes: - // Measured: `1409` - // Estimated: `2607` - // Minimum execution time: 60_490 nanoseconds. - Weight::from_parts(73_760_000, 2607) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) + // Measured: `0` + // Estimated: `3593` + // Minimum execution time: 44_629_000 picoseconds. + Weight::from_parts(45_798_000, 3593) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) } - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: MaxEncodedLen) - fn set_balance_creating() -> Weight { + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + fn force_set_balance_creating() -> Weight { // Proof Size summary in bytes: - // Measured: `1559` - // Estimated: `2607` - // Minimum execution time: 46_650 nanoseconds. - Weight::from_parts(57_640_000, 2607) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) + // Measured: `174` + // Estimated: `3593` + // Minimum execution time: 16_483_000 picoseconds. + Weight::from_parts(16_939_000, 3593) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) } - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: MaxEncodedLen) - fn set_balance_killing() -> Weight { + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + fn force_set_balance_killing() -> Weight { // Proof Size summary in bytes: - // Measured: `1559` - // Estimated: `2607` - // Minimum execution time: 63_361 nanoseconds. - Weight::from_parts(64_691_000, 2607) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) + // Measured: `174` + // Estimated: `3593` + // Minimum execution time: 24_638_000 picoseconds. + Weight::from_parts(25_487_000, 3593) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) } - /// Storage: System Account (r:3 w:3) - /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: MaxEncodedLen) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn force_transfer() -> Weight { // Proof Size summary in bytes: - // Measured: `1581` - // Estimated: `7821` - // Minimum execution time: 108_390 nanoseconds. - Weight::from_parts(109_831_000, 7821) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(3)) + // Measured: `103` + // Estimated: `6196` + // Minimum execution time: 60_041_000 picoseconds. + Weight::from_parts(63_365_000, 6196) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(2_u64)) } - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: MaxEncodedLen) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn transfer_all() -> Weight { // Proof Size summary in bytes: - // Measured: `1409` - // Estimated: `2607` - // Minimum execution time: 69_251 nanoseconds. - Weight::from_parts(85_261_000, 2607) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) + // Measured: `0` + // Estimated: `3593` + // Minimum execution time: 54_445_000 picoseconds. + Weight::from_parts(55_623_000, 3593) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) } - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: MaxEncodedLen) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) fn force_unreserve() -> Weight { // Proof Size summary in bytes: - // Measured: `1443` - // Estimated: `2607` - // Minimum execution time: 49_440 nanoseconds. - Weight::from_parts(50_850_000, 2607) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) + // Measured: `174` + // Estimated: `3593` + // Minimum execution time: 19_309_000 picoseconds. + Weight::from_parts(19_953_000, 3593) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } + /// Storage: `System::Account` (r:999 w:999) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// The range of component `u` is `[1, 1000]`. + fn upgrade_accounts(u: u32) -> Weight { + // Proof Size summary in bytes: + // Measured: `0 + u * (135 ±0)` + // Estimated: `990 + u * (2603 ±0)` + // Minimum execution time: 19_362_000 picoseconds. + Weight::from_parts(19_612_000, 990) + // Standard Error: 13_108 + .saturating_add(Weight::from_parts(16_444_591, 0).saturating_mul(u.into())) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(u.into()))) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(u.into()))) + .saturating_add(Weight::from_parts(0, 2603).saturating_mul(u.into())) } } diff --git a/runtime/common/src/weights/pallet_contracts.rs b/runtime/common/src/weights/pallet_contracts.rs index e8bb96b42..2671199f1 100644 --- a/runtime/common/src/weights/pallet_contracts.rs +++ b/runtime/common/src/weights/pallet_contracts.rs @@ -52,1902 +52,1891 @@ use frame_support::{ /// Weight functions for pallet_contracts (automatically generated) pub struct WeightInfo(PhantomData); impl pallet_contracts::weights::WeightInfo for WeightInfo { - /// Storage: Contracts DeletionQueue (r:1 w:0) - /// Proof: Contracts DeletionQueue (max_values: Some(1), max_size: Some(16642), added: 17137, mode: Ignored) + /// Storage: `Contracts::DeletionQueueCounter` (r:1 w:0) + /// Proof: `Contracts::DeletionQueueCounter` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) fn on_process_deletion_queue_batch() -> Weight { // Proof Size summary in bytes: - // Measured: `42` - // Estimated: `0` - // Minimum execution time: 7_430 nanoseconds. - Weight::from_parts(7_771_000, 0).saturating_add(T::DbWeight::get().reads(1)) + // Measured: `142` + // Estimated: `1627` + // Minimum execution time: 2_548_000 picoseconds. + Weight::from_parts(2_670_000, 1627).saturating_add(T::DbWeight::get().reads(1_u64)) } - /// Storage: Skipped Metadata (r:0 w:0) - /// Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Ignored) + /// Storage: `Skipped::Metadata` (r:0 w:0) + /// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `k` is `[0, 1024]`. fn on_initialize_per_trie_key(k: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `414 + k * (69 ±0)` - // Estimated: `0` - // Minimum execution time: 19_010 nanoseconds. - Weight::from_parts(231_178, 0) - // Standard Error: 7_979 - .saturating_add(Weight::from_parts(2_022_917, 0).saturating_mul(k.into())) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) + // Measured: `451 + k * (69 ±0)` + // Estimated: `441 + k * (70 ±0)` + // Minimum execution time: 13_526_000 picoseconds. + Weight::from_parts(13_902_000, 441) + // Standard Error: 1_058 + .saturating_add(Weight::from_parts(1_274_724, 0).saturating_mul(k.into())) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(k.into()))) + .saturating_add(T::DbWeight::get().writes(2_u64)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(k.into()))) + .saturating_add(Weight::from_parts(0, 70).saturating_mul(k.into())) } - /// Storage: Contracts DeletionQueue (r:1 w:1) - /// Proof: Contracts DeletionQueue (max_values: Some(1), max_size: Some(16642), added: 17137, mode: Ignored) - /// The range of component `q` is `[0, 128]`. - fn on_initialize_per_queue_item(q: u32) -> Weight { - // Proof Size summary in bytes: - // Measured: `214 + q * (33 ±0)` - // Estimated: `0` - // Minimum execution time: 7_500 nanoseconds. - Weight::from_parts(27_206_849, 0) - // Standard Error: 16_209 - .saturating_add(Weight::from_parts(2_358_921, 0).saturating_mul(q.into())) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: Contracts PristineCode (r:1 w:0) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Ignored) - /// Storage: Contracts CodeStorage (r:0 w:1) - /// Proof: Contracts CodeStorage (max_values: None, max_size: Some(126001), added: 128476, mode: Ignored) - /// The range of component `c` is `[0, 61717]`. - fn reinstrument(c: u32) -> Weight { - // Proof Size summary in bytes: - // Measured: `203 + c * (1 ±0)` - // Estimated: `0` - // Minimum execution time: 60_631 nanoseconds. - Weight::from_parts(96_254_618, 0) - // Standard Error: 269 - .saturating_add(Weight::from_parts(112_614, 0).saturating_mul(c.into())) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(258), added: 2733, mode: Ignored) - /// Storage: Contracts CodeStorage (r:1 w:0) - /// Proof: Contracts CodeStorage (max_values: None, max_size: Some(126001), added: 128476, mode: Ignored) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Ignored) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: Ignored) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Ignored) + /// Storage: UNKNOWN KEY `0x4342193e496fab7ec59d615ed0dc553022fca90611ba8b7942f8bdb3b97f6580` (r:2 w:1) + /// Proof: UNKNOWN KEY `0x4342193e496fab7ec59d615ed0dc553022fca90611ba8b7942f8bdb3b97f6580` (r:2 w:1) + /// The range of component `c` is `[0, 125952]`. + fn v9_migration_step(c: u32) -> Weight { + // Proof Size summary in bytes: + // Measured: `211 + c * (1 ±0)` + // Estimated: `6149 + c * (1 ±0)` + // Minimum execution time: 8_426_000 picoseconds. + Weight::from_parts(8_591_621, 6149) + // Standard Error: 1 + .saturating_add(Weight::from_parts(1_203, 0).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + .saturating_add(Weight::from_parts(0, 1).saturating_mul(c.into())) + } + /// Storage: `Contracts::ContractInfoOf` (r:2 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1795), added: 4270, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + fn v10_migration_step() -> Weight { + // Proof Size summary in bytes: + // Measured: `510` + // Estimated: `6450` + // Minimum execution time: 17_008_000 picoseconds. + Weight::from_parts(17_742_000, 6450) + .saturating_add(T::DbWeight::get().reads(3_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } + /// Storage: `Contracts::DeletionQueue` (r:1 w:1025) + /// Proof: `Contracts::DeletionQueue` (`max_values`: None, `max_size`: Some(142), added: 2617, mode: `Measured`) + /// Storage: `Contracts::DeletionQueueCounter` (r:0 w:1) + /// Proof: `Contracts::DeletionQueueCounter` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// The range of component `k` is `[0, 1024]`. + fn v11_migration_step(k: u32) -> Weight { + // Proof Size summary in bytes: + // Measured: `171 + k * (1 ±0)` + // Estimated: `3635 + k * (1 ±0)` + // Minimum execution time: 3_949_000 picoseconds. + Weight::from_parts(4_062_000, 3635) + // Standard Error: 1_983 + .saturating_add(Weight::from_parts(1_173_197, 0).saturating_mul(k.into())) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(2_u64)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(k.into()))) + .saturating_add(Weight::from_parts(0, 1).saturating_mul(k.into())) + } + /// Storage: UNKNOWN KEY `0x4342193e496fab7ec59d615ed0dc553053f13fd319a03c211337c76e0fe776df` (r:2 w:0) + /// Proof: UNKNOWN KEY `0x4342193e496fab7ec59d615ed0dc553053f13fd319a03c211337c76e0fe776df` (r:2 w:0) + /// Storage: UNKNOWN KEY `0x4342193e496fab7ec59d615ed0dc553022fca90611ba8b7942f8bdb3b97f6580` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x4342193e496fab7ec59d615ed0dc553022fca90611ba8b7942f8bdb3b97f6580` (r:1 w:1) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:0 w:1) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// The range of component `c` is `[0, 125952]`. + fn v12_migration_step(c: u32) -> Weight { + // Proof Size summary in bytes: + // Measured: `325 + c * (1 ±0)` + // Estimated: `6263 + c * (1 ±0)` + // Minimum execution time: 17_094_000 picoseconds. + Weight::from_parts(17_338_591, 6263) + // Standard Error: 1 + .saturating_add(Weight::from_parts(436, 0).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(4_u64)) + .saturating_add(T::DbWeight::get().writes(2_u64)) + .saturating_add(Weight::from_parts(0, 1).saturating_mul(c.into())) + } + /// Storage: `Contracts::ContractInfoOf` (r:2 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1795), added: 4270, mode: `Measured`) + fn v13_migration_step() -> Weight { + // Proof Size summary in bytes: + // Measured: `440` + // Estimated: `6380` + // Minimum execution time: 12_704_000 picoseconds. + Weight::from_parts(13_147_000, 6380) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } + /// Storage: `Contracts::CodeInfoOf` (r:2 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Balances::Holds` (r:1 w:0) + /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(85), added: 2560, mode: `Measured`) + fn v14_migration_step() -> Weight { + // Proof Size summary in bytes: + // Measured: `360` + // Estimated: `6300` + // Minimum execution time: 48_387_000 picoseconds. + Weight::from_parts(50_024_000, 6300) + .saturating_add(T::DbWeight::get().reads(4_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } + /// Storage: `Contracts::ContractInfoOf` (r:2 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1795), added: 4270, mode: `Measured`) + /// Storage: `System::Account` (r:2 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + fn v15_migration_step() -> Weight { + // Proof Size summary in bytes: + // Measured: `594` + // Estimated: `6534` + // Minimum execution time: 59_300_000 picoseconds. + Weight::from_parts(61_805_000, 6534) + .saturating_add(T::DbWeight::get().reads(4_u64)) + .saturating_add(T::DbWeight::get().writes(2_u64)) + } + /// Storage: `Contracts::MigrationInProgress` (r:1 w:1) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + fn migration_noop() -> Weight { + // Proof Size summary in bytes: + // Measured: `142` + // Estimated: `1627` + // Minimum execution time: 3_327_000 picoseconds. + Weight::from_parts(3_502_000, 1627) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } + /// Storage: `Contracts::MigrationInProgress` (r:1 w:1) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: UNKNOWN KEY `0x4342193e496fab7ec59d615ed0dc55304e7b9012096b41c4eb3aaf947f6ea429` (r:1 w:1) + /// Proof: UNKNOWN KEY `0x4342193e496fab7ec59d615ed0dc55304e7b9012096b41c4eb3aaf947f6ea429` (r:1 w:1) + fn migrate() -> Weight { + // Proof Size summary in bytes: + // Measured: `166` + // Estimated: `3631` + // Minimum execution time: 12_759_000 picoseconds. + Weight::from_parts(13_134_000, 3631) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(2_u64)) + } + /// Storage: UNKNOWN KEY `0x4342193e496fab7ec59d615ed0dc55304e7b9012096b41c4eb3aaf947f6ea429` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x4342193e496fab7ec59d615ed0dc55304e7b9012096b41c4eb3aaf947f6ea429` (r:1 w:0) + fn on_runtime_upgrade_noop() -> Weight { + // Proof Size summary in bytes: + // Measured: `142` + // Estimated: `3607` + // Minimum execution time: 4_775_000 picoseconds. + Weight::from_parts(5_084_000, 3607).saturating_add(T::DbWeight::get().reads(1_u64)) + } + /// Storage: UNKNOWN KEY `0x4342193e496fab7ec59d615ed0dc55304e7b9012096b41c4eb3aaf947f6ea429` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x4342193e496fab7ec59d615ed0dc55304e7b9012096b41c4eb3aaf947f6ea429` (r:1 w:0) + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + fn on_runtime_upgrade_in_progress() -> Weight { + // Proof Size summary in bytes: + // Measured: `167` + // Estimated: `3632` + // Minimum execution time: 6_663_000 picoseconds. + Weight::from_parts(6_855_000, 3632).saturating_add(T::DbWeight::get().reads(2_u64)) + } + /// Storage: UNKNOWN KEY `0x4342193e496fab7ec59d615ed0dc55304e7b9012096b41c4eb3aaf947f6ea429` (r:1 w:0) + /// Proof: UNKNOWN KEY `0x4342193e496fab7ec59d615ed0dc55304e7b9012096b41c4eb3aaf947f6ea429` (r:1 w:0) + /// Storage: `Contracts::MigrationInProgress` (r:1 w:1) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + fn on_runtime_upgrade() -> Weight { + // Proof Size summary in bytes: + // Measured: `142` + // Estimated: `3607` + // Minimum execution time: 7_212_000 picoseconds. + Weight::from_parts(7_426_000, 3607) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1795), added: 4270, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `c` is `[0, 125952]`. fn call_with_code_per_byte(c: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `675` - // Estimated: `0` - // Minimum execution time: 489_121 nanoseconds. - Weight::from_parts(665_502_356, 0) - // Standard Error: 129 - .saturating_add(Weight::from_parts(64_354, 0).saturating_mul(c.into())) - .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().writes(4)) - } - /// Storage: Contracts CodeStorage (r:1 w:1) - /// Proof: Contracts CodeStorage (max_values: None, max_size: Some(126001), added: 128476, mode: Ignored) - /// Storage: Contracts Nonce (r:1 w:1) - /// Proof: Contracts Nonce (max_values: Some(1), max_size: Some(8), added: 503, mode: Ignored) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(258), added: 2733, mode: Ignored) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Ignored) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: Ignored) - /// Storage: System EventTopics (r:3 w:3) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Ignored) - /// Storage: Contracts PristineCode (r:0 w:1) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Ignored) - /// Storage: Contracts OwnerInfoOf (r:0 w:1) - /// Proof: Contracts OwnerInfoOf (max_values: None, max_size: Some(88), added: 2563, mode: Ignored) - /// The range of component `c` is `[0, 61717]`. + // Measured: `792` + // Estimated: `6743 + c * (1 ±0)` + // Minimum execution time: 289_557_000 picoseconds. + Weight::from_parts(272_895_652, 6743) + // Standard Error: 80 + .saturating_add(Weight::from_parts(39_917, 0).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(8_u64)) + .saturating_add(T::DbWeight::get().writes(4_u64)) + .saturating_add(Weight::from_parts(0, 1).saturating_mul(c.into())) + } + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:1) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Balances::Holds` (r:2 w:2) + /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(85), added: 2560, mode: `Measured`) + /// Storage: `System::EventTopics` (r:3 w:3) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Contracts::Nonce` (r:1 w:1) + /// Proof: `Contracts::Nonce` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1795), added: 4270, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:0 w:1) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// The range of component `c` is `[0, 125952]`. /// The range of component `i` is `[0, 1048576]`. /// The range of component `s` is `[0, 1048576]`. fn instantiate_with_code(c: u32, i: u32, s: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `157` - // Estimated: `0` - // Minimum execution time: 7_344_163 nanoseconds. - Weight::from_parts(1_338_150_199, 0) - // Standard Error: 519 - .saturating_add(Weight::from_parts(203_646, 0).saturating_mul(c.into())) - // Standard Error: 30 - .saturating_add(Weight::from_parts(2_832, 0).saturating_mul(i.into())) - // Standard Error: 30 - .saturating_add(Weight::from_parts(3_129, 0).saturating_mul(s.into())) - .saturating_add(T::DbWeight::get().reads(8)) - .saturating_add(T::DbWeight::get().writes(9)) - } - /// Storage: Contracts CodeStorage (r:1 w:1) - /// Proof: Contracts CodeStorage (max_values: None, max_size: Some(126001), added: 128476, mode: Ignored) - /// Storage: Contracts Nonce (r:1 w:1) - /// Proof: Contracts Nonce (max_values: Some(1), max_size: Some(8), added: 503, mode: Ignored) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(258), added: 2733, mode: Ignored) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Ignored) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: Ignored) - /// Storage: Contracts OwnerInfoOf (r:1 w:1) - /// Proof: Contracts OwnerInfoOf (max_values: None, max_size: Some(88), added: 2563, mode: Ignored) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Ignored) + // Measured: `323` + // Estimated: `8747` + // Minimum execution time: 4_671_359_000 picoseconds. + Weight::from_parts(586_523_882, 8747) + // Standard Error: 206 + .saturating_add(Weight::from_parts(115_402, 0).saturating_mul(c.into())) + // Standard Error: 24 + .saturating_add(Weight::from_parts(1_797, 0).saturating_mul(i.into())) + // Standard Error: 24 + .saturating_add(Weight::from_parts(2_046, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(11_u64)) + .saturating_add(T::DbWeight::get().writes(10_u64)) + } + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:1) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Contracts::Nonce` (r:1 w:1) + /// Proof: `Contracts::Nonce` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1795), added: 4270, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Balances::Holds` (r:1 w:1) + /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(85), added: 2560, mode: `Measured`) /// The range of component `i` is `[0, 1048576]`. /// The range of component `s` is `[0, 1048576]`. fn instantiate(i: u32, s: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `433` - // Estimated: `0` - // Minimum execution time: 2_937_909 nanoseconds. - Weight::from_parts(891_169_449, 0) - // Standard Error: 44 - .saturating_add(Weight::from_parts(2_010, 0).saturating_mul(i.into())) - // Standard Error: 44 - .saturating_add(Weight::from_parts(3_159, 0).saturating_mul(s.into())) - .saturating_add(T::DbWeight::get().reads(8)) - .saturating_add(T::DbWeight::get().writes(7)) - } - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(258), added: 2733, mode: Ignored) - /// Storage: Contracts CodeStorage (r:1 w:0) - /// Proof: Contracts CodeStorage (max_values: None, max_size: Some(126001), added: 128476, mode: Ignored) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Ignored) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: Ignored) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Ignored) + // Measured: `560` + // Estimated: `6504` + // Minimum execution time: 2_170_657_000 picoseconds. + Weight::from_parts(369_331_405, 6504) + // Standard Error: 7 + .saturating_add(Weight::from_parts(1_940, 0).saturating_mul(i.into())) + // Standard Error: 7 + .saturating_add(Weight::from_parts(1_858, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(10_u64)) + .saturating_add(T::DbWeight::get().writes(7_u64)) + } + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1795), added: 4270, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) fn call() -> Weight { // Proof Size summary in bytes: - // Measured: `727` - // Estimated: `0` - // Minimum execution time: 227_451 nanoseconds. - Weight::from_parts(280_790_000, 0) - .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().writes(4)) - } - /// Storage: Contracts CodeStorage (r:1 w:1) - /// Proof: Contracts CodeStorage (max_values: None, max_size: Some(126001), added: 128476, mode: Ignored) - /// Storage: System EventTopics (r:1 w:1) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Ignored) - /// Storage: Contracts PristineCode (r:0 w:1) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Ignored) - /// Storage: Contracts OwnerInfoOf (r:0 w:1) - /// Proof: Contracts OwnerInfoOf (max_values: None, max_size: Some(88), added: 2563, mode: Ignored) - /// The range of component `c` is `[0, 61717]`. + // Measured: `826` + // Estimated: `6766` + // Minimum execution time: 204_287_000 picoseconds. + Weight::from_parts(213_239_000, 6766) + .saturating_add(T::DbWeight::get().reads(8_u64)) + .saturating_add(T::DbWeight::get().writes(4_u64)) + } + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:1) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Balances::Holds` (r:1 w:1) + /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(85), added: 2560, mode: `Measured`) + /// Storage: `System::EventTopics` (r:1 w:1) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:0 w:1) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// The range of component `c` is `[0, 125952]`. fn upload_code(c: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `42` - // Estimated: `0` - // Minimum execution time: 471_521 nanoseconds. - Weight::from_parts(687_711_884, 0) - // Standard Error: 394 - .saturating_add(Weight::from_parts(200_341, 0).saturating_mul(c.into())) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(4)) - } - /// Storage: Contracts OwnerInfoOf (r:1 w:1) - /// Proof: Contracts OwnerInfoOf (max_values: None, max_size: Some(88), added: 2563, mode: Ignored) - /// Storage: System EventTopics (r:1 w:1) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Ignored) - /// Storage: Contracts CodeStorage (r:0 w:1) - /// Proof: Contracts CodeStorage (max_values: None, max_size: Some(126001), added: 128476, mode: Ignored) - /// Storage: Contracts PristineCode (r:0 w:1) - /// Proof: Contracts PristineCode (max_values: None, max_size: Some(125988), added: 128463, mode: Ignored) + // Measured: `142` + // Estimated: `3607` + // Minimum execution time: 285_434_000 picoseconds. + Weight::from_parts(242_697_648, 3607) + // Standard Error: 128 + .saturating_add(Weight::from_parts(76_087, 0).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(4_u64)) + .saturating_add(T::DbWeight::get().writes(4_u64)) + } + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:1) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Balances::Holds` (r:1 w:1) + /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(85), added: 2560, mode: `Measured`) + /// Storage: `System::EventTopics` (r:1 w:1) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:0 w:1) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) fn remove_code() -> Weight { // Proof Size summary in bytes: - // Measured: `218` - // Estimated: `0` - // Minimum execution time: 36_600 nanoseconds. - Weight::from_parts(44_600_000, 0) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(4)) - } - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(258), added: 2733, mode: Ignored) - /// Storage: Contracts OwnerInfoOf (r:2 w:2) - /// Proof: Contracts OwnerInfoOf (max_values: None, max_size: Some(88), added: 2563, mode: Ignored) - /// Storage: System EventTopics (r:3 w:3) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Ignored) + // Measured: `315` + // Estimated: `3780` + // Minimum execution time: 46_486_000 picoseconds. + Weight::from_parts(48_422_000, 3780) + .saturating_add(T::DbWeight::get().reads(4_u64)) + .saturating_add(T::DbWeight::get().writes(4_u64)) + } + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1795), added: 4270, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:2 w:2) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `System::EventTopics` (r:3 w:3) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) fn set_code() -> Weight { // Proof Size summary in bytes: - // Measured: `567` - // Estimated: `0` - // Minimum execution time: 48_240 nanoseconds. - Weight::from_parts(58_330_000, 0) - .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().writes(6)) - } - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: Ignored) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(258), added: 2733, mode: Ignored) - /// Storage: Contracts CodeStorage (r:1 w:0) - /// Proof: Contracts CodeStorage (max_values: None, max_size: Some(126001), added: 128476, mode: Ignored) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Ignored) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Ignored) - /// The range of component `r` is `[0, 20]`. + // Measured: `552` + // Estimated: `8967` + // Minimum execution time: 37_568_000 picoseconds. + Weight::from_parts(38_589_000, 8967) + .saturating_add(T::DbWeight::get().reads(7_u64)) + .saturating_add(T::DbWeight::get().writes(6_u64)) + } + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1795), added: 4270, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `r` is `[0, 1600]`. fn seal_caller(r: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `697 + r * (480 ±0)` - // Estimated: `0` - // Minimum execution time: 431_852 nanoseconds. - Weight::from_parts(517_954_911, 0) - // Standard Error: 272_523 - .saturating_add(Weight::from_parts(41_775_023, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().writes(3)) - } - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: Ignored) - /// Storage: Contracts ContractInfoOf (r:1601 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(258), added: 2733, mode: Ignored) - /// Storage: Contracts CodeStorage (r:1 w:0) - /// Proof: Contracts CodeStorage (max_values: None, max_size: Some(126001), added: 128476, mode: Ignored) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Ignored) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Ignored) - /// The range of component `r` is `[0, 20]`. + // Measured: `866 + r * (6 ±0)` + // Estimated: `6806 + r * (6 ±0)` + // Minimum execution time: 274_513_000 picoseconds. + Weight::from_parts(288_793_403, 6806) + // Standard Error: 650 + .saturating_add(Weight::from_parts(339_309, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(8_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) + .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) + } + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1601 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1795), added: 4270, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `r` is `[0, 1600]`. fn seal_is_contract(r: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `749 + r * (19218 ±0)` - // Estimated: `0` - // Minimum execution time: 370_081 nanoseconds. - Weight::from_parts(208_937_394, 0) - // Standard Error: 1_926_054 - .saturating_add(Weight::from_parts(539_165_423, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().reads((80_u64).saturating_mul(r.into()))) - .saturating_add(T::DbWeight::get().writes(3)) - } - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: Ignored) - /// Storage: Contracts ContractInfoOf (r:1601 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(258), added: 2733, mode: Ignored) - /// Storage: Contracts CodeStorage (r:1 w:0) - /// Proof: Contracts CodeStorage (max_values: None, max_size: Some(126001), added: 128476, mode: Ignored) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Ignored) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Ignored) - /// The range of component `r` is `[0, 20]`. + // Measured: `922 + r * (209 ±0)` + // Estimated: `6826 + r * (2684 ±0)` + // Minimum execution time: 260_096_000 picoseconds. + Weight::from_parts(149_954_322, 6826) + // Standard Error: 5_713 + .saturating_add(Weight::from_parts(3_788_924, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(8_u64)) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) + .saturating_add(T::DbWeight::get().writes(3_u64)) + .saturating_add(Weight::from_parts(0, 2684).saturating_mul(r.into())) + } + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1601 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1795), added: 4270, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `r` is `[0, 1600]`. fn seal_code_hash(r: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `741 + r * (19539 ±0)` - // Estimated: `0` - // Minimum execution time: 373_452 nanoseconds. - Weight::from_parts(227_921_076, 0) - // Standard Error: 1_913_473 - .saturating_add(Weight::from_parts(631_118_111, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().reads((80_u64).saturating_mul(r.into()))) - .saturating_add(T::DbWeight::get().writes(3)) - } - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: Ignored) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(258), added: 2733, mode: Ignored) - /// Storage: Contracts CodeStorage (r:1 w:0) - /// Proof: Contracts CodeStorage (max_values: None, max_size: Some(126001), added: 128476, mode: Ignored) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Ignored) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Ignored) - /// The range of component `r` is `[0, 20]`. + // Measured: `921 + r * (213 ±0)` + // Estimated: `6830 + r * (2688 ±0)` + // Minimum execution time: 277_496_000 picoseconds. + Weight::from_parts(285_839_000, 6830) + // Standard Error: 10_076 + .saturating_add(Weight::from_parts(4_720_110, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(8_u64)) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) + .saturating_add(T::DbWeight::get().writes(3_u64)) + .saturating_add(Weight::from_parts(0, 2688).saturating_mul(r.into())) + } + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1795), added: 4270, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `r` is `[0, 1600]`. fn seal_own_code_hash(r: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `704 + r * (480 ±0)` - // Estimated: `0` - // Minimum execution time: 379_931 nanoseconds. - Weight::from_parts(528_666_677, 0) - // Standard Error: 374_987 - .saturating_add(Weight::from_parts(50_992_877, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().writes(3)) - } - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: Ignored) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(258), added: 2733, mode: Ignored) - /// Storage: Contracts CodeStorage (r:1 w:0) - /// Proof: Contracts CodeStorage (max_values: None, max_size: Some(126001), added: 128476, mode: Ignored) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Ignored) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Ignored) - /// The range of component `r` is `[0, 20]`. + // Measured: `873 + r * (6 ±0)` + // Estimated: `6815 + r * (6 ±0)` + // Minimum execution time: 275_655_000 picoseconds. + Weight::from_parts(291_386_528, 6815) + // Standard Error: 898 + .saturating_add(Weight::from_parts(428_765, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(8_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) + .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) + } + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1795), added: 4270, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `r` is `[0, 1600]`. fn seal_caller_is_origin(r: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `694 + r * (240 ±0)` - // Estimated: `0` - // Minimum execution time: 373_091 nanoseconds. - Weight::from_parts(502_021_184, 0) - // Standard Error: 406_594 - .saturating_add(Weight::from_parts(27_810_692, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().writes(3)) - } - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: Ignored) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(258), added: 2733, mode: Ignored) - /// Storage: Contracts CodeStorage (r:1 w:0) - /// Proof: Contracts CodeStorage (max_values: None, max_size: Some(126001), added: 128476, mode: Ignored) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Ignored) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Ignored) - /// The range of component `r` is `[0, 20]`. + // Measured: `863 + r * (3 ±0)` + // Estimated: `6804 + r * (3 ±0)` + // Minimum execution time: 260_323_000 picoseconds. + Weight::from_parts(286_371_403, 6804) + // Standard Error: 451 + .saturating_add(Weight::from_parts(183_053, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(8_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) + .saturating_add(Weight::from_parts(0, 3).saturating_mul(r.into())) + } + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1795), added: 4270, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `r` is `[0, 1600]`. + fn seal_caller_is_root(r: u32) -> Weight { + // Proof Size summary in bytes: + // Measured: `753 + r * (3 ±0)` + // Estimated: `6693 + r * (3 ±0)` + // Minimum execution time: 262_974_000 picoseconds. + Weight::from_parts(276_571_502, 6693) + // Standard Error: 527 + .saturating_add(Weight::from_parts(165_364, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(7_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) + .saturating_add(Weight::from_parts(0, 3).saturating_mul(r.into())) + } + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1795), added: 4270, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `r` is `[0, 1600]`. fn seal_address(r: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `698 + r * (480 ±0)` - // Estimated: `0` - // Minimum execution time: 383_501 nanoseconds. - Weight::from_parts(541_475_815, 0) - // Standard Error: 379_203 - .saturating_add(Weight::from_parts(39_598_712, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().writes(3)) - } - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: Ignored) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(258), added: 2733, mode: Ignored) - /// Storage: Contracts CodeStorage (r:1 w:0) - /// Proof: Contracts CodeStorage (max_values: None, max_size: Some(126001), added: 128476, mode: Ignored) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Ignored) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Ignored) - /// The range of component `r` is `[0, 20]`. + // Measured: `867 + r * (6 ±0)` + // Estimated: `6807 + r * (6 ±0)` + // Minimum execution time: 272_826_000 picoseconds. + Weight::from_parts(290_963_001, 6807) + // Standard Error: 810 + .saturating_add(Weight::from_parts(343_762, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(8_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) + .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) + } + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1795), added: 4270, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `r` is `[0, 1600]`. fn seal_gas_left(r: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `699 + r * (480 ±0)` - // Estimated: `0` - // Minimum execution time: 387_450 nanoseconds. - Weight::from_parts(529_951_635, 0) - // Standard Error: 392_749 - .saturating_add(Weight::from_parts(40_284_485, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().writes(3)) - } - /// Storage: System Account (r:2 w:0) - /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: Ignored) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(258), added: 2733, mode: Ignored) - /// Storage: Contracts CodeStorage (r:1 w:0) - /// Proof: Contracts CodeStorage (max_values: None, max_size: Some(126001), added: 128476, mode: Ignored) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Ignored) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Ignored) - /// The range of component `r` is `[0, 20]`. + // Measured: `863 + r * (6 ±0)` + // Estimated: `6806 + r * (6 ±0)` + // Minimum execution time: 277_324_000 picoseconds. + Weight::from_parts(290_872_814, 6806) + // Standard Error: 766 + .saturating_add(Weight::from_parts(371_542, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(8_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) + .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) + } + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:2 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1795), added: 4270, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `r` is `[0, 1600]`. fn seal_balance(r: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `873 + r * (480 ±0)` - // Estimated: `0` - // Minimum execution time: 412_591 nanoseconds. - Weight::from_parts(571_653_506, 0) - // Standard Error: 470_423 - .saturating_add(Weight::from_parts(179_738_554, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(7)) - .saturating_add(T::DbWeight::get().writes(3)) - } - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: Ignored) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(258), added: 2733, mode: Ignored) - /// Storage: Contracts CodeStorage (r:1 w:0) - /// Proof: Contracts CodeStorage (max_values: None, max_size: Some(126001), added: 128476, mode: Ignored) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Ignored) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Ignored) - /// The range of component `r` is `[0, 20]`. + // Measured: `1007 + r * (6 ±0)` + // Estimated: `6931 + r * (6 ±0)` + // Minimum execution time: 274_460_000 picoseconds. + Weight::from_parts(285_748_025, 6931) + // Standard Error: 1_570 + .saturating_add(Weight::from_parts(1_656_237, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(9_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) + .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) + } + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1795), added: 4270, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `r` is `[0, 1600]`. fn seal_value_transferred(r: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `708 + r * (480 ±0)` - // Estimated: `0` - // Minimum execution time: 395_131 nanoseconds. - Weight::from_parts(527_037_547, 0) - // Standard Error: 354_055 - .saturating_add(Weight::from_parts(40_615_465, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().writes(3)) - } - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: Ignored) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(258), added: 2733, mode: Ignored) - /// Storage: Contracts CodeStorage (r:1 w:0) - /// Proof: Contracts CodeStorage (max_values: None, max_size: Some(126001), added: 128476, mode: Ignored) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Ignored) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Ignored) - /// The range of component `r` is `[0, 20]`. + // Measured: `877 + r * (6 ±0)` + // Estimated: `6823 + r * (6 ±0)` + // Minimum execution time: 278_254_000 picoseconds. + Weight::from_parts(283_893_525, 6823) + // Standard Error: 726 + .saturating_add(Weight::from_parts(347_368, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(8_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) + .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) + } + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1795), added: 4270, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `r` is `[0, 1600]`. fn seal_minimum_balance(r: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `706 + r * (480 ±0)` - // Estimated: `0` - // Minimum execution time: 380_230 nanoseconds. - Weight::from_parts(531_816_816, 0) - // Standard Error: 333_964 - .saturating_add(Weight::from_parts(37_754_742, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().writes(3)) - } - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: Ignored) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(258), added: 2733, mode: Ignored) - /// Storage: Contracts CodeStorage (r:1 w:0) - /// Proof: Contracts CodeStorage (max_values: None, max_size: Some(126001), added: 128476, mode: Ignored) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Ignored) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Ignored) - /// The range of component `r` is `[0, 20]`. + // Measured: `875 + r * (6 ±0)` + // Estimated: `6816 + r * (6 ±0)` + // Minimum execution time: 279_646_000 picoseconds. + Weight::from_parts(292_505_446, 6816) + // Standard Error: 867 + .saturating_add(Weight::from_parts(337_202, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(8_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) + .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) + } + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1795), added: 4270, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `r` is `[0, 1600]`. fn seal_block_number(r: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `703 + r * (480 ±0)` - // Estimated: `0` - // Minimum execution time: 390_151 nanoseconds. - Weight::from_parts(577_277_614, 0) - // Standard Error: 503_035 - .saturating_add(Weight::from_parts(36_413_279, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().writes(3)) - } - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: Ignored) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(258), added: 2733, mode: Ignored) - /// Storage: Contracts CodeStorage (r:1 w:0) - /// Proof: Contracts CodeStorage (max_values: None, max_size: Some(126001), added: 128476, mode: Ignored) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Ignored) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Ignored) - /// The range of component `r` is `[0, 20]`. + // Measured: `872 + r * (6 ±0)` + // Estimated: `6819 + r * (6 ±0)` + // Minimum execution time: 274_522_000 picoseconds. + Weight::from_parts(295_135_659, 6819) + // Standard Error: 1_052 + .saturating_add(Weight::from_parts(330_788, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(8_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) + .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) + } + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1795), added: 4270, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `r` is `[0, 1600]`. fn seal_now(r: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `694 + r * (480 ±0)` - // Estimated: `0` - // Minimum execution time: 376_551 nanoseconds. - Weight::from_parts(535_008_554, 0) - // Standard Error: 353_325 - .saturating_add(Weight::from_parts(38_594_722, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().writes(3)) - } - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: Ignored) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(258), added: 2733, mode: Ignored) - /// Storage: Contracts CodeStorage (r:1 w:0) - /// Proof: Contracts CodeStorage (max_values: None, max_size: Some(126001), added: 128476, mode: Ignored) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Ignored) - /// Storage: TransactionPayment NextFeeMultiplier (r:1 w:0) - /// Proof: TransactionPayment NextFeeMultiplier (max_values: Some(1), max_size: Some(16), added: 511, mode: Ignored) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Ignored) - /// The range of component `r` is `[0, 20]`. + // Measured: `863 + r * (6 ±0)` + // Estimated: `6804 + r * (6 ±0)` + // Minimum execution time: 274_228_000 picoseconds. + Weight::from_parts(289_201_593, 6804) + // Standard Error: 752 + .saturating_add(Weight::from_parts(337_860, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(8_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) + .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) + } + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1795), added: 4270, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `TransactionPayment::NextFeeMultiplier` (r:1 w:0) + /// Proof: `TransactionPayment::NextFeeMultiplier` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `r` is `[0, 1600]`. fn seal_weight_to_fee(r: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `809 + r * (800 ±0)` - // Estimated: `0` - // Minimum execution time: 397_911 nanoseconds. - Weight::from_parts(528_491_853, 0) - // Standard Error: 429_636 - .saturating_add(Weight::from_parts(134_755_404, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(7)) - .saturating_add(T::DbWeight::get().writes(3)) - } - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: Ignored) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(258), added: 2733, mode: Ignored) - /// Storage: Contracts CodeStorage (r:1 w:0) - /// Proof: Contracts CodeStorage (max_values: None, max_size: Some(126001), added: 128476, mode: Ignored) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Ignored) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Ignored) - /// The range of component `r` is `[0, 20]`. - fn seal_gas(r: u32) -> Weight { - // Proof Size summary in bytes: - // Measured: `661 + r * (320 ±0)` - // Estimated: `0` - // Minimum execution time: 214_380 nanoseconds. - Weight::from_parts(260_658_643, 0) - // Standard Error: 160_864 - .saturating_add(Weight::from_parts(18_814_649, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().writes(3)) - } - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: Ignored) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(258), added: 2733, mode: Ignored) - /// Storage: Contracts CodeStorage (r:1 w:0) - /// Proof: Contracts CodeStorage (max_values: None, max_size: Some(126001), added: 128476, mode: Ignored) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Ignored) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Ignored) - /// The range of component `r` is `[0, 20]`. + // Measured: `937 + r * (14 ±0)` + // Estimated: `6872 + r * (14 ±0)` + // Minimum execution time: 277_142_000 picoseconds. + Weight::from_parts(296_736_114, 6872) + // Standard Error: 1_502 + .saturating_add(Weight::from_parts(1_446_663, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(9_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) + .saturating_add(Weight::from_parts(0, 14).saturating_mul(r.into())) + } + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1795), added: 4270, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `r` is `[0, 1600]`. fn seal_input(r: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `696 + r * (480 ±0)` - // Estimated: `0` - // Minimum execution time: 403_660 nanoseconds. - Weight::from_parts(545_823_848, 0) - // Standard Error: 357_639 - .saturating_add(Weight::from_parts(32_529_346, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().writes(3)) - } - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: Ignored) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(258), added: 2733, mode: Ignored) - /// Storage: Contracts CodeStorage (r:1 w:0) - /// Proof: Contracts CodeStorage (max_values: None, max_size: Some(126001), added: 128476, mode: Ignored) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Ignored) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Ignored) - /// The range of component `n` is `[0, 1024]`. - fn seal_input_per_kb(n: u32) -> Weight { - // Proof Size summary in bytes: - // Measured: `1176` - // Estimated: `0` - // Minimum execution time: 486_961 nanoseconds. - Weight::from_parts(420_704_430, 0) - // Standard Error: 126_136 - .saturating_add(Weight::from_parts(18_130_065, 0).saturating_mul(n.into())) - .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().writes(3)) - } - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: Ignored) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(258), added: 2733, mode: Ignored) - /// Storage: Contracts CodeStorage (r:1 w:0) - /// Proof: Contracts CodeStorage (max_values: None, max_size: Some(126001), added: 128476, mode: Ignored) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Ignored) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Ignored) + // Measured: `865 + r * (6 ±0)` + // Estimated: `6807 + r * (6 ±0)` + // Minimum execution time: 276_087_000 picoseconds. + Weight::from_parts(287_863_377, 6807) + // Standard Error: 495 + .saturating_add(Weight::from_parts(282_718, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(8_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) + .saturating_add(Weight::from_parts(0, 6).saturating_mul(r.into())) + } + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1795), added: 4270, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `n` is `[0, 1048576]`. + fn seal_input_per_byte(n: u32) -> Weight { + // Proof Size summary in bytes: + // Measured: `869` + // Estimated: `6809` + // Minimum execution time: 277_128_000 picoseconds. + Weight::from_parts(234_478_674, 6809) + // Standard Error: 23 + .saturating_add(Weight::from_parts(1_052, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(8_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) + } + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1795), added: 4270, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `r` is `[0, 1]`. fn seal_return(r: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `684 + r * (8 ±0)` - // Estimated: `0` - // Minimum execution time: 367_101 nanoseconds. - Weight::from_parts(508_054_206, 0) - // Standard Error: 9_076_081 - .saturating_add(Weight::from_parts(100_993, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().writes(3)) - } - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: Ignored) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(258), added: 2733, mode: Ignored) - /// Storage: Contracts CodeStorage (r:1 w:0) - /// Proof: Contracts CodeStorage (max_values: None, max_size: Some(126001), added: 128476, mode: Ignored) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Ignored) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Ignored) - /// The range of component `n` is `[0, 1024]`. - fn seal_return_per_kb(n: u32) -> Weight { - // Proof Size summary in bytes: - // Measured: `694` - // Estimated: `0` - // Minimum execution time: 417_570 nanoseconds. - Weight::from_parts(486_804_833, 0) - // Standard Error: 8_373 - .saturating_add(Weight::from_parts(411_815, 0).saturating_mul(n.into())) - .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().writes(3)) - } - /// Storage: System Account (r:3 w:3) - /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: Ignored) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(258), added: 2733, mode: Ignored) - /// Storage: Contracts CodeStorage (r:1 w:0) - /// Proof: Contracts CodeStorage (max_values: None, max_size: Some(126001), added: 128476, mode: Ignored) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Ignored) - /// Storage: Contracts DeletionQueue (r:1 w:1) - /// Proof: Contracts DeletionQueue (max_values: Some(1), max_size: Some(16642), added: 17137, mode: Ignored) - /// Storage: Contracts OwnerInfoOf (r:1 w:1) - /// Proof: Contracts OwnerInfoOf (max_values: None, max_size: Some(88), added: 2563, mode: Ignored) - /// Storage: System EventTopics (r:3 w:3) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Ignored) + // Measured: `853 + r * (45 ±0)` + // Estimated: `6793 + r * (45 ±0)` + // Minimum execution time: 251_983_000 picoseconds. + Weight::from_parts(277_986_885, 6793) + .saturating_add(T::DbWeight::get().reads(8_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) + .saturating_add(Weight::from_parts(0, 45).saturating_mul(r.into())) + } + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1795), added: 4270, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `n` is `[0, 1048576]`. + fn seal_return_per_byte(n: u32) -> Weight { + // Proof Size summary in bytes: + // Measured: `863` + // Estimated: `6810` + // Minimum execution time: 275_108_000 picoseconds. + Weight::from_parts(284_552_708, 6810) + // Standard Error: 0 + .saturating_add(Weight::from_parts(391, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(8_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) + } + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:3 w:3) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1795), added: 4270, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:2 w:2) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `Contracts::DeletionQueueCounter` (r:1 w:1) + /// Proof: `Contracts::DeletionQueueCounter` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:4 w:4) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Balances::Holds` (r:1 w:1) + /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(85), added: 2560, mode: `Measured`) + /// Storage: `Contracts::DeletionQueue` (r:0 w:1) + /// Proof: `Contracts::DeletionQueue` (`max_values`: None, `max_size`: Some(142), added: 2617, mode: `Measured`) /// The range of component `r` is `[0, 1]`. fn seal_terminate(r: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `726 + r * (285 ±0)` - // Estimated: `0` - // Minimum execution time: 370_770 nanoseconds. - Weight::from_parts(515_893_028, 0) - // Standard Error: 9_505_249 - .saturating_add(Weight::from_parts(191_277_471, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().reads((5_u64).saturating_mul(r.into()))) - .saturating_add(T::DbWeight::get().writes(3)) - .saturating_add(T::DbWeight::get().writes((6_u64).saturating_mul(r.into()))) - } - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: Ignored) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(258), added: 2733, mode: Ignored) - /// Storage: Contracts CodeStorage (r:1 w:0) - /// Proof: Contracts CodeStorage (max_values: None, max_size: Some(126001), added: 128476, mode: Ignored) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Ignored) - /// Storage: RandomnessCollectiveFlip RandomMaterial (r:1 w:0) - /// Proof: RandomnessCollectiveFlip RandomMaterial (max_values: Some(1), max_size: Some(2594), added: 3089, mode: Ignored) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Ignored) - /// The range of component `r` is `[0, 20]`. + // Measured: `2972 + r * (316 ±0)` + // Estimated: `8912 + r * (5266 ±0)` + // Minimum execution time: 281_278_000 picoseconds. + Weight::from_parts(306_800_667, 8912) + // Standard Error: 855_257 + .saturating_add(Weight::from_parts(126_508_132, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(8_u64)) + .saturating_add(T::DbWeight::get().reads((7_u64).saturating_mul(r.into()))) + .saturating_add(T::DbWeight::get().writes(3_u64)) + .saturating_add(T::DbWeight::get().writes((10_u64).saturating_mul(r.into()))) + .saturating_add(Weight::from_parts(0, 5266).saturating_mul(r.into())) + } + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1795), added: 4270, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `RandomnessCollectiveFlip::RandomMaterial` (r:1 w:0) + /// Proof: `RandomnessCollectiveFlip::RandomMaterial` (`max_values`: Some(1), `max_size`: Some(2594), added: 3089, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `r` is `[0, 1600]`. fn seal_random(r: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `775 + r * (800 ±0)` - // Estimated: `0` - // Minimum execution time: 389_531 nanoseconds. - Weight::from_parts(506_659_987, 0) - // Standard Error: 438_015 - .saturating_add(Weight::from_parts(222_549_692, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(7)) - .saturating_add(T::DbWeight::get().writes(3)) - } - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: Ignored) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(258), added: 2733, mode: Ignored) - /// Storage: Contracts CodeStorage (r:1 w:0) - /// Proof: Contracts CodeStorage (max_values: None, max_size: Some(126001), added: 128476, mode: Ignored) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Ignored) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Ignored) - /// The range of component `r` is `[0, 20]`. + // Measured: `944 + r * (10 ±0)` + // Estimated: `6885 + r * (10 ±0)` + // Minimum execution time: 260_609_000 picoseconds. + Weight::from_parts(287_385_076, 6885) + // Standard Error: 2_754 + .saturating_add(Weight::from_parts(2_057_388, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(9_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) + .saturating_add(Weight::from_parts(0, 10).saturating_mul(r.into())) + } + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1795), added: 4270, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `r` is `[0, 1600]`. fn seal_deposit_event(r: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `694 + r * (800 ±0)` - // Estimated: `0` - // Minimum execution time: 419_771 nanoseconds. - Weight::from_parts(556_814_111, 0) - // Standard Error: 666_560 - .saturating_add(Weight::from_parts(423_936_920, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().writes(3)) - } - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: Ignored) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(258), added: 2733, mode: Ignored) - /// Storage: Contracts CodeStorage (r:1 w:0) - /// Proof: Contracts CodeStorage (max_values: None, max_size: Some(126001), added: 128476, mode: Ignored) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Ignored) - /// Storage: System EventTopics (r:322 w:322) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Ignored) + // Measured: `863 + r * (10 ±0)` + // Estimated: `6805 + r * (10 ±0)` + // Minimum execution time: 254_770_000 picoseconds. + Weight::from_parts(255_105_647, 6805) + // Standard Error: 5_707 + .saturating_add(Weight::from_parts(3_808_788, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(8_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) + .saturating_add(Weight::from_parts(0, 10).saturating_mul(r.into())) + } + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1795), added: 4270, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:6 w:6) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `t` is `[0, 4]`. - /// The range of component `n` is `[0, 16]`. - fn seal_deposit_event_per_topic_and_kb(t: u32, n: u32) -> Weight { - // Proof Size summary in bytes: - // Measured: `1630 + t * (2608 ±0) + n * (8 ±0)` - // Estimated: `0` - // Minimum execution time: 1_916_644 nanoseconds. - Weight::from_parts(876_255_548, 0) - // Standard Error: 2_998_126 - .saturating_add(Weight::from_parts(365_874_853, 0).saturating_mul(t.into())) - // Standard Error: 823_430 - .saturating_add(Weight::from_parts(120_543_255, 0).saturating_mul(n.into())) - .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().reads((80_u64).saturating_mul(t.into()))) - .saturating_add(T::DbWeight::get().writes(3)) - .saturating_add(T::DbWeight::get().writes((80_u64).saturating_mul(t.into()))) - } - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: Ignored) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(258), added: 2733, mode: Ignored) - /// Storage: Contracts CodeStorage (r:1 w:0) - /// Proof: Contracts CodeStorage (max_values: None, max_size: Some(126001), added: 128476, mode: Ignored) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Ignored) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Ignored) - /// The range of component `r` is `[0, 20]`. + /// The range of component `n` is `[0, 16384]`. + fn seal_deposit_event_per_topic_and_byte(t: u32, n: u32) -> Weight { + // Proof Size summary in bytes: + // Measured: `880 + t * (32 ±0)` + // Estimated: `6825 + t * (2508 ±0)` + // Minimum execution time: 278_200_000 picoseconds. + Weight::from_parts(288_081_493, 6825) + // Standard Error: 97_535 + .saturating_add(Weight::from_parts(3_683_455, 0).saturating_mul(t.into())) + // Standard Error: 27 + .saturating_add(Weight::from_parts(731, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(8_u64)) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(t.into()))) + .saturating_add(T::DbWeight::get().writes(3_u64)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(t.into()))) + .saturating_add(Weight::from_parts(0, 2508).saturating_mul(t.into())) + } + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1795), added: 4270, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `r` is `[0, 1600]`. fn seal_debug_message(r: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `693 + r * (800 ±0)` - // Estimated: `0` - // Minimum execution time: 211_061 nanoseconds. - Weight::from_parts(291_579_010, 0) - // Standard Error: 162_749 - .saturating_add(Weight::from_parts(27_900_831, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().writes(3)) - } - /// Storage: Skipped Metadata (r:0 w:0) - /// Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Ignored) - /// The range of component `r` is `[0, 10]`. + // Measured: `862 + r * (7 ±0)` + // Estimated: `6807 + r * (7 ±0)` + // Minimum execution time: 167_181_000 picoseconds. + Weight::from_parts(178_433_475, 6807) + // Standard Error: 374 + .saturating_add(Weight::from_parts(241_240, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(8_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) + .saturating_add(Weight::from_parts(0, 7).saturating_mul(r.into())) + } + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1795), added: 4270, mode: `MaxEncodedLen`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `MaxEncodedLen`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `MaxEncodedLen`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `i` is `[0, 1048576]`. + fn seal_debug_message_per_byte(i: u32) -> Weight { + // Proof Size summary in bytes: + // Measured: `125813` + // Estimated: `131755` + // Minimum execution time: 434_456_000 picoseconds. + Weight::from_parts(400_940_450, 131755) + // Standard Error: 13 + .saturating_add(Weight::from_parts(1_102, 0).saturating_mul(i.into())) + .saturating_add(T::DbWeight::get().reads(8_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) + } + /// Storage: `Skipped::Metadata` (r:0 w:0) + /// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `r` is `[0, 800]`. fn seal_set_storage(r: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `720 + r * (23420 ±0)` - // Estimated: `0` - // Minimum execution time: 374_560 nanoseconds. - Weight::from_parts(334_860_847, 0) - // Standard Error: 3_068_197 - .saturating_add(Weight::from_parts(978_042_416, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().reads((80_u64).saturating_mul(r.into()))) - .saturating_add(T::DbWeight::get().writes(3)) - .saturating_add(T::DbWeight::get().writes((80_u64).saturating_mul(r.into()))) - } - /// Storage: Skipped Metadata (r:0 w:0) - /// Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Ignored) - /// The range of component `n` is `[0, 8]`. - fn seal_set_storage_per_new_kb(n: u32) -> Weight { - // Proof Size summary in bytes: - // Measured: `12402 + n * (12006 ±0)` - // Estimated: `0` - // Minimum execution time: 683_562 nanoseconds. - Weight::from_parts(1_224_575_174, 0) - // Standard Error: 3_929_725 - .saturating_add(Weight::from_parts(196_261_071, 0).saturating_mul(n.into())) - .saturating_add(T::DbWeight::get().reads(52)) - .saturating_add(T::DbWeight::get().reads((7_u64).saturating_mul(n.into()))) - .saturating_add(T::DbWeight::get().writes(50)) - .saturating_add(T::DbWeight::get().writes((7_u64).saturating_mul(n.into()))) - } - /// Storage: Skipped Metadata (r:0 w:0) - /// Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Ignored) - /// The range of component `n` is `[0, 8]`. - fn seal_set_storage_per_old_kb(n: u32) -> Weight { - // Proof Size summary in bytes: - // Measured: `14990 + n * (175775 ±0)` - // Estimated: `0` - // Minimum execution time: 597_481 nanoseconds. - Weight::from_parts(1_153_785_439, 0) - // Standard Error: 3_312_108 - .saturating_add(Weight::from_parts(128_606_117, 0).saturating_mul(n.into())) - .saturating_add(T::DbWeight::get().reads(51)) - .saturating_add(T::DbWeight::get().reads((7_u64).saturating_mul(n.into()))) - .saturating_add(T::DbWeight::get().writes(49)) - .saturating_add(T::DbWeight::get().writes((7_u64).saturating_mul(n.into()))) - } - /// Storage: Skipped Metadata (r:0 w:0) - /// Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Ignored) - /// The range of component `r` is `[0, 10]`. + // Measured: `924 + r * (292 ±0)` + // Estimated: `925 + r * (293 ±0)` + // Minimum execution time: 277_825_000 picoseconds. + Weight::from_parts(159_688_263, 925) + // Standard Error: 13_610 + .saturating_add(Weight::from_parts(7_145_641, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(8_u64)) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) + .saturating_add(T::DbWeight::get().writes(3_u64)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(r.into()))) + .saturating_add(Weight::from_parts(0, 293).saturating_mul(r.into())) + } + /// Storage: `Skipped::Metadata` (r:0 w:0) + /// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `n` is `[0, 16384]`. + fn seal_set_storage_per_new_byte(n: u32) -> Weight { + // Proof Size summary in bytes: + // Measured: `1446` + // Estimated: `1429` + // Minimum execution time: 284_745_000 picoseconds. + Weight::from_parts(345_928_316, 1429) + // Standard Error: 70 + .saturating_add(Weight::from_parts(547, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(12_u64)) + .saturating_add(T::DbWeight::get().writes(8_u64)) + } + /// Storage: `Skipped::Metadata` (r:0 w:0) + /// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `n` is `[0, 16384]`. + fn seal_set_storage_per_old_byte(n: u32) -> Weight { + // Proof Size summary in bytes: + // Measured: `1252 + n * (1 ±0)` + // Estimated: `1252 + n * (1 ±0)` + // Minimum execution time: 275_328_000 picoseconds. + Weight::from_parts(300_037_010, 1252) + // Standard Error: 32 + .saturating_add(Weight::from_parts(558, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(9_u64)) + .saturating_add(T::DbWeight::get().writes(4_u64)) + .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) + } + /// Storage: `Skipped::Metadata` (r:0 w:0) + /// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `r` is `[0, 800]`. fn seal_clear_storage(r: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `720 + r * (23100 ±0)` - // Estimated: `0` - // Minimum execution time: 441_841 nanoseconds. - Weight::from_parts(479_192_193, 0) - // Standard Error: 2_871_558 - .saturating_add(Weight::from_parts(916_912_022, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().reads((80_u64).saturating_mul(r.into()))) - .saturating_add(T::DbWeight::get().writes(3)) - .saturating_add(T::DbWeight::get().writes((80_u64).saturating_mul(r.into()))) - } - /// Storage: Skipped Metadata (r:0 w:0) - /// Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Ignored) - /// The range of component `n` is `[0, 8]`. - fn seal_clear_storage_per_kb(n: u32) -> Weight { - // Proof Size summary in bytes: - // Measured: `14670 + n * (175775 ±0)` - // Estimated: `0` - // Minimum execution time: 625_381 nanoseconds. - Weight::from_parts(1_137_973_256, 0) - // Standard Error: 3_381_124 - .saturating_add(Weight::from_parts(130_713_708, 0).saturating_mul(n.into())) - .saturating_add(T::DbWeight::get().reads(51)) - .saturating_add(T::DbWeight::get().reads((7_u64).saturating_mul(n.into()))) - .saturating_add(T::DbWeight::get().writes(48)) - .saturating_add(T::DbWeight::get().writes((7_u64).saturating_mul(n.into()))) - } - /// Storage: Skipped Metadata (r:0 w:0) - /// Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Ignored) - /// The range of component `r` is `[0, 10]`. + // Measured: `920 + r * (288 ±0)` + // Estimated: `926 + r * (289 ±0)` + // Minimum execution time: 273_742_000 picoseconds. + Weight::from_parts(169_430_806, 926) + // Standard Error: 11_821 + .saturating_add(Weight::from_parts(6_927_074, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(8_u64)) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) + .saturating_add(T::DbWeight::get().writes(3_u64)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(r.into()))) + .saturating_add(Weight::from_parts(0, 289).saturating_mul(r.into())) + } + /// Storage: `Skipped::Metadata` (r:0 w:0) + /// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `n` is `[0, 16384]`. + fn seal_clear_storage_per_byte(n: u32) -> Weight { + // Proof Size summary in bytes: + // Measured: `1248 + n * (1 ±0)` + // Estimated: `1248 + n * (1 ±0)` + // Minimum execution time: 275_167_000 picoseconds. + Weight::from_parts(301_883_655, 1248) + // Standard Error: 35 + .saturating_add(Weight::from_parts(4, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(9_u64)) + .saturating_add(T::DbWeight::get().writes(4_u64)) + .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) + } + /// Storage: `Skipped::Metadata` (r:0 w:0) + /// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `r` is `[0, 800]`. fn seal_get_storage(r: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `730 + r * (23740 ±0)` - // Estimated: `0` - // Minimum execution time: 392_901 nanoseconds. - Weight::from_parts(479_938_978, 0) - // Standard Error: 1_934_626 - .saturating_add(Weight::from_parts(754_683_224, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().reads((80_u64).saturating_mul(r.into()))) - .saturating_add(T::DbWeight::get().writes(3)) - } - /// Storage: Skipped Metadata (r:0 w:0) - /// Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Ignored) - /// The range of component `n` is `[0, 8]`. - fn seal_get_storage_per_kb(n: u32) -> Weight { - // Proof Size summary in bytes: - // Measured: `15321 + n * (175775 ±0)` - // Estimated: `0` - // Minimum execution time: 509_251 nanoseconds. - Weight::from_parts(1_059_139_703, 0) - // Standard Error: 3_539_218 - .saturating_add(Weight::from_parts(303_187_136, 0).saturating_mul(n.into())) - .saturating_add(T::DbWeight::get().reads(51)) - .saturating_add(T::DbWeight::get().reads((7_u64).saturating_mul(n.into()))) - .saturating_add(T::DbWeight::get().writes(3)) - } - /// Storage: Skipped Metadata (r:0 w:0) - /// Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Ignored) - /// The range of component `r` is `[0, 10]`. + // Measured: `920 + r * (296 ±0)` + // Estimated: `922 + r * (297 ±0)` + // Minimum execution time: 274_628_000 picoseconds. + Weight::from_parts(195_255_092, 922) + // Standard Error: 9_109 + .saturating_add(Weight::from_parts(5_707_060, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(8_u64)) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) + .saturating_add(T::DbWeight::get().writes(3_u64)) + .saturating_add(Weight::from_parts(0, 297).saturating_mul(r.into())) + } + /// Storage: `Skipped::Metadata` (r:0 w:0) + /// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `n` is `[0, 16384]`. + fn seal_get_storage_per_byte(n: u32) -> Weight { + // Proof Size summary in bytes: + // Measured: `1264 + n * (1 ±0)` + // Estimated: `1264 + n * (1 ±0)` + // Minimum execution time: 274_202_000 picoseconds. + Weight::from_parts(296_440_752, 1264) + // Standard Error: 38 + .saturating_add(Weight::from_parts(1_010, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(9_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) + .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) + } + /// Storage: `Skipped::Metadata` (r:0 w:0) + /// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `r` is `[0, 800]`. fn seal_contains_storage(r: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `723 + r * (23100 ±0)` - // Estimated: `0` - // Minimum execution time: 458_631 nanoseconds. - Weight::from_parts(506_503_466, 0) - // Standard Error: 1_926_675 - .saturating_add(Weight::from_parts(728_611_813, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().reads((80_u64).saturating_mul(r.into()))) - .saturating_add(T::DbWeight::get().writes(3)) - } - /// Storage: Skipped Metadata (r:0 w:0) - /// Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Ignored) - /// The range of component `n` is `[0, 8]`. - fn seal_contains_storage_per_kb(n: u32) -> Weight { - // Proof Size summary in bytes: - // Measured: `14673 + n * (175775 ±0)` - // Estimated: `0` - // Minimum execution time: 525_181 nanoseconds. - Weight::from_parts(1_030_715_942, 0) - // Standard Error: 3_301_932 - .saturating_add(Weight::from_parts(122_011_584, 0).saturating_mul(n.into())) - .saturating_add(T::DbWeight::get().reads(51)) - .saturating_add(T::DbWeight::get().reads((7_u64).saturating_mul(n.into()))) - .saturating_add(T::DbWeight::get().writes(3)) - } - /// Storage: Skipped Metadata (r:0 w:0) - /// Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Ignored) - /// The range of component `r` is `[0, 10]`. + // Measured: `931 + r * (288 ±0)` + // Estimated: `928 + r * (289 ±0)` + // Minimum execution time: 274_123_000 picoseconds. + Weight::from_parts(193_280_535, 928) + // Standard Error: 9_264 + .saturating_add(Weight::from_parts(5_548_039, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(8_u64)) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) + .saturating_add(T::DbWeight::get().writes(3_u64)) + .saturating_add(Weight::from_parts(0, 289).saturating_mul(r.into())) + } + /// Storage: `Skipped::Metadata` (r:0 w:0) + /// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `n` is `[0, 16384]`. + fn seal_contains_storage_per_byte(n: u32) -> Weight { + // Proof Size summary in bytes: + // Measured: `1251 + n * (1 ±0)` + // Estimated: `1251 + n * (1 ±0)` + // Minimum execution time: 276_425_000 picoseconds. + Weight::from_parts(300_521_806, 1251) + // Standard Error: 36 + .saturating_add(Weight::from_parts(83, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(9_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) + .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) + } + /// Storage: `Skipped::Metadata` (r:0 w:0) + /// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `r` is `[0, 800]`. fn seal_take_storage(r: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `731 + r * (23740 ±0)` - // Estimated: `0` - // Minimum execution time: 414_821 nanoseconds. - Weight::from_parts(357_950_744, 0) - // Standard Error: 3_475_365 - .saturating_add(Weight::from_parts(981_471_555, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().reads((80_u64).saturating_mul(r.into()))) - .saturating_add(T::DbWeight::get().writes(3)) - .saturating_add(T::DbWeight::get().writes((80_u64).saturating_mul(r.into()))) - } - /// Storage: Skipped Metadata (r:0 w:0) - /// Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Ignored) - /// The range of component `n` is `[0, 8]`. - fn seal_take_storage_per_kb(n: u32) -> Weight { - // Proof Size summary in bytes: - // Measured: `15322 + n * (175775 ±0)` - // Estimated: `0` - // Minimum execution time: 638_781 nanoseconds. - Weight::from_parts(1_188_783_395, 0) - // Standard Error: 3_951_294 - .saturating_add(Weight::from_parts(314_100_376, 0).saturating_mul(n.into())) - .saturating_add(T::DbWeight::get().reads(51)) - .saturating_add(T::DbWeight::get().reads((7_u64).saturating_mul(n.into()))) - .saturating_add(T::DbWeight::get().writes(48)) - .saturating_add(T::DbWeight::get().writes((7_u64).saturating_mul(n.into()))) - } - /// Storage: System Account (r:1602 w:1601) - /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: Ignored) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(258), added: 2733, mode: Ignored) - /// Storage: Contracts CodeStorage (r:1 w:0) - /// Proof: Contracts CodeStorage (max_values: None, max_size: Some(126001), added: 128476, mode: Ignored) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Ignored) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Ignored) - /// The range of component `r` is `[0, 20]`. + // Measured: `913 + r * (296 ±0)` + // Estimated: `918 + r * (297 ±0)` + // Minimum execution time: 264_860_000 picoseconds. + Weight::from_parts(191_561_777, 918) + // Standard Error: 10_678 + .saturating_add(Weight::from_parts(6_895_457, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(8_u64)) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) + .saturating_add(T::DbWeight::get().writes(3_u64)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(r.into()))) + .saturating_add(Weight::from_parts(0, 297).saturating_mul(r.into())) + } + /// Storage: `Skipped::Metadata` (r:0 w:0) + /// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `n` is `[0, 16384]`. + fn seal_take_storage_per_byte(n: u32) -> Weight { + // Proof Size summary in bytes: + // Measured: `1265 + n * (1 ±0)` + // Estimated: `1265 + n * (1 ±0)` + // Minimum execution time: 282_501_000 picoseconds. + Weight::from_parts(303_351_919, 1265) + // Standard Error: 37 + .saturating_add(Weight::from_parts(643, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(9_u64)) + .saturating_add(T::DbWeight::get().writes(4_u64)) + .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) + } + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1602 w:1601) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1795), added: 4270, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `r` is `[0, 1600]`. fn seal_transfer(r: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `1322 + r * (3601 ±0)` - // Estimated: `0` - // Minimum execution time: 389_761 nanoseconds. - Weight::from_parts(387_985_694, 0) - // Standard Error: 2_529_933 - .saturating_add(Weight::from_parts(2_615_792_463, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(7)) - .saturating_add(T::DbWeight::get().reads((80_u64).saturating_mul(r.into()))) - .saturating_add(T::DbWeight::get().writes(4)) - .saturating_add(T::DbWeight::get().writes((80_u64).saturating_mul(r.into()))) - } - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: Ignored) - /// Storage: Contracts ContractInfoOf (r:1601 w:1601) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(258), added: 2733, mode: Ignored) - /// Storage: Contracts CodeStorage (r:2 w:0) - /// Proof: Contracts CodeStorage (max_values: None, max_size: Some(126001), added: 128476, mode: Ignored) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Ignored) - /// Storage: System EventTopics (r:1602 w:1602) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Ignored) - /// The range of component `r` is `[0, 20]`. + // Measured: `1415 + r * (45 ±0)` + // Estimated: `7307 + r * (2520 ±0)` + // Minimum execution time: 273_198_000 picoseconds. + Weight::from_parts(179_673_238, 7307) + // Standard Error: 34_990 + .saturating_add(Weight::from_parts(38_468_091, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(9_u64)) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) + .saturating_add(T::DbWeight::get().writes(4_u64)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(r.into()))) + .saturating_add(Weight::from_parts(0, 2520).saturating_mul(r.into())) + } + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:801 w:801) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1795), added: 4270, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:2 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:2 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:803 w:803) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `r` is `[0, 800]`. fn seal_call(r: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `948 + r * (20495 ±0)` - // Estimated: `0` - // Minimum execution time: 435_761 nanoseconds. - Weight::from_parts(68_471_501, 0) - // Standard Error: 94_851_428 - .saturating_add(Weight::from_parts(38_479_425_365, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(7)) - .saturating_add(T::DbWeight::get().reads((160_u64).saturating_mul(r.into()))) - .saturating_add(T::DbWeight::get().writes(3)) - .saturating_add(T::DbWeight::get().writes((160_u64).saturating_mul(r.into()))) - } - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: Ignored) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(258), added: 2733, mode: Ignored) - /// Storage: Contracts CodeStorage (r:1536 w:0) - /// Proof: Contracts CodeStorage (max_values: None, max_size: Some(126001), added: 128476, mode: Ignored) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Ignored) - /// Storage: System EventTopics (r:1537 w:1537) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Ignored) - /// The range of component `r` is `[0, 20]`. + // Measured: `1260 + r * (245 ±0)` + // Estimated: `9440 + r * (2721 ±0)` + // Minimum execution time: 283_869_000 picoseconds. + Weight::from_parts(288_374_000, 9440) + // Standard Error: 137_512 + .saturating_add(Weight::from_parts(248_206_665, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(11_u64)) + .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(r.into()))) + .saturating_add(T::DbWeight::get().writes(4_u64)) + .saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(r.into()))) + .saturating_add(Weight::from_parts(0, 2721).saturating_mul(r.into())) + } + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1795), added: 4270, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:736 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:736 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:737 w:737) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `r` is `[0, 800]`. fn seal_delegate_call(r: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `0 + r * (71670 ±0)` - // Estimated: `0` - // Minimum execution time: 382_431 nanoseconds. - Weight::from_parts(477_811_000, 0) - // Standard Error: 42_244_071 - .saturating_add(Weight::from_parts(36_082_816_111, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().reads((150_u64).saturating_mul(r.into()))) - .saturating_add(T::DbWeight::get().writes(3)) - .saturating_add(T::DbWeight::get().writes((75_u64).saturating_mul(r.into()))) - } - /// Storage: System Account (r:82 w:81) - /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: Ignored) - /// Storage: Contracts ContractInfoOf (r:81 w:81) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(258), added: 2733, mode: Ignored) - /// Storage: Contracts CodeStorage (r:2 w:0) - /// Proof: Contracts CodeStorage (max_values: None, max_size: Some(126001), added: 128476, mode: Ignored) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Ignored) - /// Storage: System EventTopics (r:82 w:82) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Ignored) + // Measured: `0 + r * (576 ±0)` + // Estimated: `6812 + r * (2637 ±3)` + // Minimum execution time: 257_577_000 picoseconds. + Weight::from_parts(277_310_000, 6812) + // Standard Error: 150_204 + .saturating_add(Weight::from_parts(249_943_483, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(8_u64)) + .saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(r.into()))) + .saturating_add(T::DbWeight::get().writes(3_u64)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(r.into()))) + .saturating_add(Weight::from_parts(0, 2637).saturating_mul(r.into())) + } + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:3 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:2 w:2) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1795), added: 4270, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:2 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:2 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:4 w:4) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `t` is `[0, 1]`. - /// The range of component `c` is `[0, 1024]`. - fn seal_call_per_transfer_clone_kb(t: u32, c: u32) -> Weight { - // Proof Size summary in bytes: - // Measured: `21128 + t * (15897 ±0)` - // Estimated: `0` - // Minimum execution time: 18_273_642 nanoseconds. - Weight::from_parts(17_523_937_499, 0) - // Standard Error: 89_878_407 - .saturating_add(Weight::from_parts(2_045_724_783, 0).saturating_mul(t.into())) - // Standard Error: 134_767 - .saturating_add(Weight::from_parts(18_073_327, 0).saturating_mul(c.into())) - .saturating_add(T::DbWeight::get().reads(167)) - .saturating_add(T::DbWeight::get().reads((81_u64).saturating_mul(t.into()))) - .saturating_add(T::DbWeight::get().writes(163)) - .saturating_add(T::DbWeight::get().writes((81_u64).saturating_mul(t.into()))) - } - /// Storage: System Account (r:1602 w:1602) - /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: Ignored) - /// Storage: Contracts ContractInfoOf (r:1601 w:1601) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(258), added: 2733, mode: Ignored) - /// Storage: Contracts CodeStorage (r:1601 w:1600) - /// Proof: Contracts CodeStorage (max_values: None, max_size: Some(126001), added: 128476, mode: Ignored) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Ignored) - /// Storage: Contracts Nonce (r:1 w:1) - /// Proof: Contracts Nonce (max_values: Some(1), max_size: Some(8), added: 503, mode: Ignored) - /// Storage: Contracts OwnerInfoOf (r:1600 w:1600) - /// Proof: Contracts OwnerInfoOf (max_values: None, max_size: Some(88), added: 2563, mode: Ignored) - /// Storage: System EventTopics (r:1602 w:1602) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Ignored) - /// The range of component `r` is `[0, 20]`. + /// The range of component `c` is `[0, 1048576]`. + fn seal_call_per_transfer_clone_byte(t: u32, c: u32) -> Weight { + // Proof Size summary in bytes: + // Measured: `1307 + t * (277 ±0)` + // Estimated: `12197 + t * (5227 ±0)` + // Minimum execution time: 471_081_000 picoseconds. + Weight::from_parts(79_081_122, 12197) + // Standard Error: 11_777_790 + .saturating_add(Weight::from_parts(357_425_411, 0).saturating_mul(t.into())) + // Standard Error: 17 + .saturating_add(Weight::from_parts(1_111, 0).saturating_mul(c.into())) + .saturating_add(T::DbWeight::get().reads(13_u64)) + .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(t.into()))) + .saturating_add(T::DbWeight::get().writes(6_u64)) + .saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(t.into()))) + .saturating_add(Weight::from_parts(0, 5227).saturating_mul(t.into())) + } + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:802 w:802) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:801 w:801) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1795), added: 4270, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:801 w:800) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:801 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `Contracts::Nonce` (r:1 w:1) + /// Proof: `Contracts::Nonce` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:803 w:803) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Balances::Holds` (r:800 w:800) + /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(85), added: 2560, mode: `Measured`) + /// The range of component `r` is `[1, 800]`. fn seal_instantiate(r: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `1512 + r * (25573 ±0)` - // Estimated: `0` - // Minimum execution time: 376_711 nanoseconds. - Weight::from_parts(455_542_000, 0) - // Standard Error: 114_095_743 - .saturating_add(Weight::from_parts(50_953_615_612, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(8)) - .saturating_add(T::DbWeight::get().reads((400_u64).saturating_mul(r.into()))) - .saturating_add(T::DbWeight::get().writes(5)) - .saturating_add(T::DbWeight::get().writes((400_u64).saturating_mul(r.into()))) - } - /// Storage: System Account (r:82 w:82) - /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: Ignored) - /// Storage: Contracts ContractInfoOf (r:81 w:81) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(258), added: 2733, mode: Ignored) - /// Storage: Contracts CodeStorage (r:2 w:1) - /// Proof: Contracts CodeStorage (max_values: None, max_size: Some(126001), added: 128476, mode: Ignored) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Ignored) - /// Storage: Contracts Nonce (r:1 w:1) - /// Proof: Contracts Nonce (max_values: Some(1), max_size: Some(8), added: 503, mode: Ignored) - /// Storage: Contracts OwnerInfoOf (r:1 w:1) - /// Proof: Contracts OwnerInfoOf (max_values: None, max_size: Some(88), added: 2563, mode: Ignored) - /// Storage: System EventTopics (r:82 w:82) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Ignored) + // Measured: `1278 + r * (255 ±0)` + // Estimated: `9620 + r * (2731 ±0)` + // Minimum execution time: 672_742_000 picoseconds. + Weight::from_parts(680_025_000, 9620) + // Standard Error: 313_642 + .saturating_add(Weight::from_parts(388_311_259, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(11_u64)) + .saturating_add(T::DbWeight::get().reads((6_u64).saturating_mul(r.into()))) + .saturating_add(T::DbWeight::get().writes(7_u64)) + .saturating_add(T::DbWeight::get().writes((5_u64).saturating_mul(r.into()))) + .saturating_add(Weight::from_parts(0, 2731).saturating_mul(r.into())) + } + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:3 w:3) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:2 w:2) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1795), added: 4270, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:2 w:1) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:2 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `Contracts::Nonce` (r:1 w:1) + /// Proof: `Contracts::Nonce` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:4 w:4) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Balances::Holds` (r:1 w:1) + /// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(85), added: 2560, mode: `Measured`) /// The range of component `t` is `[0, 1]`. - /// The range of component `i` is `[0, 960]`. - /// The range of component `s` is `[0, 960]`. - fn seal_instantiate_per_transfer_input_salt_kb(t: u32, i: u32, s: u32) -> Weight { - // Proof Size summary in bytes: - // Measured: `5505 + t * (68 ±0)` - // Estimated: `0` - // Minimum execution time: 210_322_618 nanoseconds. - Weight::from_parts(31_023_451_273, 0) - // Standard Error: 648_986 - .saturating_add(Weight::from_parts(213_692_481, 0).saturating_mul(i.into())) - // Standard Error: 648_986 - .saturating_add(Weight::from_parts(217_643_843, 0).saturating_mul(s.into())) - .saturating_add(T::DbWeight::get().reads(249)) + /// The range of component `i` is `[0, 983040]`. + /// The range of component `s` is `[0, 983040]`. + fn seal_instantiate_per_transfer_input_salt_byte(t: u32, i: u32, s: u32) -> Weight { + // Proof Size summary in bytes: + // Measured: `1303 + t * (104 ±0)` + // Estimated: `12211 + t * (2549 ±1)` + // Minimum execution time: 2_733_870_000 picoseconds. + Weight::from_parts(1_001_793_458, 12211) + // Standard Error: 12 + .saturating_add(Weight::from_parts(1_963, 0).saturating_mul(i.into())) + // Standard Error: 12 + .saturating_add(Weight::from_parts(2_060, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(16_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(t.into()))) - .saturating_add(T::DbWeight::get().writes(247)) + .saturating_add(T::DbWeight::get().writes(11_u64)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(t.into()))) - } - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: Ignored) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(258), added: 2733, mode: Ignored) - /// Storage: Contracts CodeStorage (r:1 w:0) - /// Proof: Contracts CodeStorage (max_values: None, max_size: Some(126001), added: 128476, mode: Ignored) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Ignored) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Ignored) - /// The range of component `r` is `[0, 1]`. + .saturating_add(Weight::from_parts(0, 2549).saturating_mul(t.into())) + } + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1795), added: 4270, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `r` is `[0, 1600]`. fn seal_hash_sha2_256(r: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `691 + r * (642 ±0)` - // Estimated: `0` - // Minimum execution time: 370_871 nanoseconds. - Weight::from_parts(517_046_881, 0) - // Standard Error: 9_392_544 - .saturating_add(Weight::from_parts(1_484_618, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().writes(3)) - } - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: Ignored) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(258), added: 2733, mode: Ignored) - /// Storage: Contracts CodeStorage (r:1 w:0) - /// Proof: Contracts CodeStorage (max_values: None, max_size: Some(126001), added: 128476, mode: Ignored) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Ignored) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Ignored) - /// The range of component `n` is `[0, 1024]`. - fn seal_hash_sha2_256_per_kb(n: u32) -> Weight { - // Proof Size summary in bytes: - // Measured: `1493` - // Estimated: `0` - // Minimum execution time: 435_121 nanoseconds. - Weight::from_parts(502_631_000, 0) - // Standard Error: 81_123 - .saturating_add(Weight::from_parts(94_181_133, 0).saturating_mul(n.into())) - .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().writes(3)) - } - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: Ignored) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(258), added: 2733, mode: Ignored) - /// Storage: Contracts CodeStorage (r:1 w:0) - /// Proof: Contracts CodeStorage (max_values: None, max_size: Some(126001), added: 128476, mode: Ignored) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Ignored) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Ignored) - /// The range of component `r` is `[0, 1]`. + // Measured: `862 + r * (8 ±0)` + // Estimated: `6801 + r * (8 ±0)` + // Minimum execution time: 272_658_000 picoseconds. + Weight::from_parts(282_717_645, 6801) + // Standard Error: 517 + .saturating_add(Weight::from_parts(400_604, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(8_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) + .saturating_add(Weight::from_parts(0, 8).saturating_mul(r.into())) + } + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1795), added: 4270, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `n` is `[0, 1048576]`. + fn seal_hash_sha2_256_per_byte(n: u32) -> Weight { + // Proof Size summary in bytes: + // Measured: `870` + // Estimated: `6808` + // Minimum execution time: 260_969_000 picoseconds. + Weight::from_parts(265_206_847, 6808) + // Standard Error: 2 + .saturating_add(Weight::from_parts(1_134, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(8_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) + } + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1795), added: 4270, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `r` is `[0, 1600]`. fn seal_hash_keccak_256(r: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `693 + r * (642 ±0)` - // Estimated: `0` - // Minimum execution time: 372_401 nanoseconds. - Weight::from_parts(558_599_716, 0) - // Standard Error: 10_105_961 - .saturating_add(Weight::from_parts(103_731_083, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().writes(3)) - } - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: Ignored) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(258), added: 2733, mode: Ignored) - /// Storage: Contracts CodeStorage (r:1 w:0) - /// Proof: Contracts CodeStorage (max_values: None, max_size: Some(126001), added: 128476, mode: Ignored) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Ignored) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Ignored) - /// The range of component `n` is `[0, 1024]`. - fn seal_hash_keccak_256_per_kb(n: u32) -> Weight { - // Proof Size summary in bytes: - // Measured: `1495` - // Estimated: `0` - // Minimum execution time: 537_732 nanoseconds. - Weight::from_parts(579_512_000, 0) - // Standard Error: 208_304 - .saturating_add(Weight::from_parts(369_317_236, 0).saturating_mul(n.into())) - .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().writes(3)) - } - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: Ignored) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(258), added: 2733, mode: Ignored) - /// Storage: Contracts CodeStorage (r:1 w:0) - /// Proof: Contracts CodeStorage (max_values: None, max_size: Some(126001), added: 128476, mode: Ignored) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Ignored) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Ignored) - /// The range of component `r` is `[0, 1]`. + // Measured: `864 + r * (8 ±0)` + // Estimated: `6806 + r * (8 ±0)` + // Minimum execution time: 262_351_000 picoseconds. + Weight::from_parts(286_974_296, 6806) + // Standard Error: 514 + .saturating_add(Weight::from_parts(802_363, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(8_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) + .saturating_add(Weight::from_parts(0, 8).saturating_mul(r.into())) + } + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1795), added: 4270, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `n` is `[0, 1048576]`. + fn seal_hash_keccak_256_per_byte(n: u32) -> Weight { + // Proof Size summary in bytes: + // Measured: `872` + // Estimated: `6814` + // Minimum execution time: 276_907_000 picoseconds. + Weight::from_parts(277_928_418, 6814) + // Standard Error: 1 + .saturating_add(Weight::from_parts(3_410, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(8_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) + } + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1795), added: 4270, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `r` is `[0, 1600]`. fn seal_hash_blake2_256(r: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `693 + r * (642 ±0)` - // Estimated: `0` - // Minimum execution time: 368_311 nanoseconds. - Weight::from_parts(507_392_248, 0) - // Standard Error: 8_916_313 - .saturating_add(Weight::from_parts(108_580_551, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().writes(3)) - } - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: Ignored) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(258), added: 2733, mode: Ignored) - /// Storage: Contracts CodeStorage (r:1 w:0) - /// Proof: Contracts CodeStorage (max_values: None, max_size: Some(126001), added: 128476, mode: Ignored) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Ignored) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Ignored) - /// The range of component `n` is `[0, 1024]`. - fn seal_hash_blake2_256_per_kb(n: u32) -> Weight { - // Proof Size summary in bytes: - // Measured: `1495` - // Estimated: `0` - // Minimum execution time: 522_392 nanoseconds. - Weight::from_parts(567_922_000, 0) - // Standard Error: 111_886 - .saturating_add(Weight::from_parts(163_798_185, 0).saturating_mul(n.into())) - .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().writes(3)) - } - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: Ignored) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(258), added: 2733, mode: Ignored) - /// Storage: Contracts CodeStorage (r:1 w:0) - /// Proof: Contracts CodeStorage (max_values: None, max_size: Some(126001), added: 128476, mode: Ignored) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Ignored) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Ignored) - /// The range of component `r` is `[0, 1]`. + // Measured: `864 + r * (8 ±0)` + // Estimated: `6808 + r * (8 ±0)` + // Minimum execution time: 263_660_000 picoseconds. + Weight::from_parts(285_665_916, 6808) + // Standard Error: 527 + .saturating_add(Weight::from_parts(480_457, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(8_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) + .saturating_add(Weight::from_parts(0, 8).saturating_mul(r.into())) + } + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1795), added: 4270, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `n` is `[0, 1048576]`. + fn seal_hash_blake2_256_per_byte(n: u32) -> Weight { + // Proof Size summary in bytes: + // Measured: `872` + // Estimated: `6813` + // Minimum execution time: 262_071_000 picoseconds. + Weight::from_parts(270_115_341, 6813) + // Standard Error: 1 + .saturating_add(Weight::from_parts(1_254, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(8_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) + } + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1795), added: 4270, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `r` is `[0, 1600]`. fn seal_hash_blake2_128(r: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `693 + r * (642 ±0)` - // Estimated: `0` - // Minimum execution time: 366_951 nanoseconds. - Weight::from_parts(500_280_304, 0) - // Standard Error: 9_646_663 - .saturating_add(Weight::from_parts(51_759_095, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().writes(3)) - } - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: Ignored) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(258), added: 2733, mode: Ignored) - /// Storage: Contracts CodeStorage (r:1 w:0) - /// Proof: Contracts CodeStorage (max_values: None, max_size: Some(126001), added: 128476, mode: Ignored) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Ignored) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Ignored) - /// The range of component `n` is `[0, 1024]`. - fn seal_hash_blake2_128_per_kb(n: u32) -> Weight { - // Proof Size summary in bytes: - // Measured: `1495` - // Estimated: `0` - // Minimum execution time: 540_452 nanoseconds. - Weight::from_parts(603_082_000, 0) - // Standard Error: 162_534 - .saturating_add(Weight::from_parts(166_126_166, 0).saturating_mul(n.into())) - .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().writes(3)) - } - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: Ignored) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(258), added: 2733, mode: Ignored) - /// Storage: Contracts CodeStorage (r:1 w:0) - /// Proof: Contracts CodeStorage (max_values: None, max_size: Some(126001), added: 128476, mode: Ignored) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Ignored) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Ignored) - /// The range of component `r` is `[0, 1]`. + // Measured: `864 + r * (8 ±0)` + // Estimated: `6805 + r * (8 ±0)` + // Minimum execution time: 265_568_000 picoseconds. + Weight::from_parts(285_791_811, 6805) + // Standard Error: 559 + .saturating_add(Weight::from_parts(505_330, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(8_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) + .saturating_add(Weight::from_parts(0, 8).saturating_mul(r.into())) + } + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1795), added: 4270, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `n` is `[0, 1048576]`. + fn seal_hash_blake2_128_per_byte(n: u32) -> Weight { + // Proof Size summary in bytes: + // Measured: `872` + // Estimated: `6811` + // Minimum execution time: 271_336_000 picoseconds. + Weight::from_parts(272_829_313, 6811) + // Standard Error: 0 + .saturating_add(Weight::from_parts(1_252, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(8_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) + } + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1795), added: 4270, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `n` is `[0, 125697]`. + fn seal_sr25519_verify_per_byte(n: u32) -> Weight { + // Proof Size summary in bytes: + // Measured: `997 + n * (1 ±0)` + // Estimated: `6934 + n * (1 ±0)` + // Minimum execution time: 351_146_000 picoseconds. + Weight::from_parts(355_368_323, 6934) + // Standard Error: 14 + .saturating_add(Weight::from_parts(6_155, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(8_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) + .saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into())) + } + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1795), added: 4270, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `r` is `[0, 160]`. + fn seal_sr25519_verify(r: u32) -> Weight { + // Proof Size summary in bytes: + // Measured: `807 + r * (112 ±0)` + // Estimated: `6748 + r * (112 ±0)` + // Minimum execution time: 277_250_000 picoseconds. + Weight::from_parts(346_490_114, 6748) + // Standard Error: 14_654 + .saturating_add(Weight::from_parts(56_127_492, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(8_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) + .saturating_add(Weight::from_parts(0, 112).saturating_mul(r.into())) + } + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1795), added: 4270, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `r` is `[0, 160]`. fn seal_ecdsa_recover(r: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `737 + r * (6083 ±0)` - // Estimated: `0` - // Minimum execution time: 372_331 nanoseconds. - Weight::from_parts(500_234_279, 0) - // Standard Error: 9_708_530 - .saturating_add(Weight::from_parts(6_049_554_620, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().writes(3)) - } - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: Ignored) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(258), added: 2733, mode: Ignored) - /// Storage: Contracts CodeStorage (r:1 w:0) - /// Proof: Contracts CodeStorage (max_values: None, max_size: Some(126001), added: 128476, mode: Ignored) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Ignored) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Ignored) - /// The range of component `r` is `[0, 1]`. + // Measured: `907 + r * (76 ±0)` + // Estimated: `6801 + r * (77 ±0)` + // Minimum execution time: 272_697_000 picoseconds. + Weight::from_parts(345_385_667, 6801) + // Standard Error: 14_226 + .saturating_add(Weight::from_parts(46_037_637, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(8_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) + .saturating_add(Weight::from_parts(0, 77).saturating_mul(r.into())) + } + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1795), added: 4270, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `r` is `[0, 160]`. fn seal_ecdsa_to_eth_address(r: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `706 + r * (3362 ±0)` - // Estimated: `0` - // Minimum execution time: 370_281 nanoseconds. - Weight::from_parts(487_345_571, 0) - // Standard Error: 8_255_395 - .saturating_add(Weight::from_parts(1_383_599_828, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().writes(3)) - } - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: Ignored) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(258), added: 2733, mode: Ignored) - /// Storage: Contracts CodeStorage (r:1536 w:0) - /// Proof: Contracts CodeStorage (max_values: None, max_size: Some(126001), added: 128476, mode: Ignored) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Ignored) - /// Storage: Contracts OwnerInfoOf (r:1536 w:1536) - /// Proof: Contracts OwnerInfoOf (max_values: None, max_size: Some(88), added: 2563, mode: Ignored) - /// Storage: System EventTopics (r:1538 w:1538) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Ignored) - /// The range of component `r` is `[0, 20]`. + // Measured: `877 + r * (42 ±0)` + // Estimated: `6816 + r * (42 ±0)` + // Minimum execution time: 271_800_000 picoseconds. + Weight::from_parts(314_891_136, 6816) + // Standard Error: 9_762 + .saturating_add(Weight::from_parts(11_949_979, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(8_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) + .saturating_add(Weight::from_parts(0, 42).saturating_mul(r.into())) + } + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1795), added: 4270, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1536 w:1536) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1536 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:1538 w:1538) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `r` is `[0, 1600]`. fn seal_set_code_hash(r: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `0 + r * (79300 ±0)` - // Estimated: `0` - // Minimum execution time: 468_402 nanoseconds. - Weight::from_parts(491_662_000, 0) - // Standard Error: 11_442_378 - .saturating_add(Weight::from_parts(3_208_414_115, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().reads((225_u64).saturating_mul(r.into()))) - .saturating_add(T::DbWeight::get().writes(3)) - .saturating_add(T::DbWeight::get().writes((150_u64).saturating_mul(r.into()))) - } - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: Ignored) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(258), added: 2733, mode: Ignored) - /// Storage: Contracts CodeStorage (r:1 w:0) - /// Proof: Contracts CodeStorage (max_values: None, max_size: Some(126001), added: 128476, mode: Ignored) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Ignored) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Ignored) - /// The range of component `r` is `[0, 20]`. + // Measured: `0 + r * (965 ±0)` + // Estimated: `6807 + r * (3090 ±10)` + // Minimum execution time: 274_238_000 picoseconds. + Weight::from_parts(278_034_000, 6807) + // Standard Error: 77_011 + .saturating_add(Weight::from_parts(27_627_005, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(8_u64)) + .saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(r.into()))) + .saturating_add(T::DbWeight::get().writes(3_u64)) + .saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(r.into()))) + .saturating_add(Weight::from_parts(0, 3090).saturating_mul(r.into())) + } + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1795), added: 4270, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:33 w:32) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `r` is `[0, 32]`. + fn add_delegate_dependency(r: u32) -> Weight { + // Proof Size summary in bytes: + // Measured: `928 + r * (131 ±0)` + // Estimated: `6878 + r * (2606 ±0)` + // Minimum execution time: 271_519_000 picoseconds. + Weight::from_parts(292_726_476, 6878) + // Standard Error: 23_870 + .saturating_add(Weight::from_parts(6_695_172, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(8_u64)) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) + .saturating_add(T::DbWeight::get().writes(3_u64)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(r.into()))) + .saturating_add(Weight::from_parts(0, 2606).saturating_mul(r.into())) + } + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1795), added: 4270, mode: `MaxEncodedLen`) + /// Storage: `Contracts::CodeInfoOf` (r:33 w:32) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `MaxEncodedLen`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `MaxEncodedLen`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `r` is `[0, 32]`. + fn remove_delegate_dependency(r: u32) -> Weight { + // Proof Size summary in bytes: + // Measured: `969 + r * (183 ±0)` + // Estimated: `129453 + r * (2568 ±0)` + // Minimum execution time: 274_675_000 picoseconds. + Weight::from_parts(293_727_489, 129453) + // Standard Error: 23_160 + .saturating_add(Weight::from_parts(5_895_043, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(8_u64)) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) + .saturating_add(T::DbWeight::get().writes(3_u64)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(r.into()))) + .saturating_add(Weight::from_parts(0, 2568).saturating_mul(r.into())) + } + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1795), added: 4270, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `r` is `[0, 1600]`. fn seal_reentrance_count(r: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `689 + r * (240 ±0)` - // Estimated: `0` - // Minimum execution time: 418_421 nanoseconds. - Weight::from_parts(536_436_097, 0) - // Standard Error: 310_626 - .saturating_add(Weight::from_parts(20_913_646, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().writes(3)) - } - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: Ignored) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(258), added: 2733, mode: Ignored) - /// Storage: Contracts CodeStorage (r:1 w:0) - /// Proof: Contracts CodeStorage (max_values: None, max_size: Some(126001), added: 128476, mode: Ignored) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Ignored) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Ignored) - /// The range of component `r` is `[0, 20]`. + // Measured: `858 + r * (3 ±0)` + // Estimated: `6804 + r * (3 ±0)` + // Minimum execution time: 253_330_000 picoseconds. + Weight::from_parts(281_079_564, 6804) + // Standard Error: 378 + .saturating_add(Weight::from_parts(180_655, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(8_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) + .saturating_add(Weight::from_parts(0, 3).saturating_mul(r.into())) + } + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1795), added: 4270, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `r` is `[0, 1600]`. fn seal_account_reentrance_count(r: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `1387 + r * (3140 ±0)` - // Estimated: `0` - // Minimum execution time: 397_661 nanoseconds. - Weight::from_parts(613_318_772, 0) - // Standard Error: 378_470 - .saturating_add(Weight::from_parts(29_430_515, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().writes(3)) - } - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: Ignored) - /// Storage: Contracts ContractInfoOf (r:1 w:1) - /// Proof: Contracts ContractInfoOf (max_values: None, max_size: Some(258), added: 2733, mode: Ignored) - /// Storage: Contracts CodeStorage (r:1 w:0) - /// Proof: Contracts CodeStorage (max_values: None, max_size: Some(126001), added: 128476, mode: Ignored) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: Ignored) - /// Storage: Contracts Nonce (r:1 w:1) - /// Proof: Contracts Nonce (max_values: Some(1), max_size: Some(8), added: 503, mode: Ignored) - /// Storage: System EventTopics (r:2 w:2) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Ignored) - /// The range of component `r` is `[0, 20]`. + // Measured: `2109 + r * (39 ±0)` + // Estimated: `7899 + r * (40 ±0)` + // Minimum execution time: 276_552_000 picoseconds. + Weight::from_parts(368_521_088, 7899) + // Standard Error: 2_310 + .saturating_add(Weight::from_parts(318_129, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(8_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) + .saturating_add(Weight::from_parts(0, 40).saturating_mul(r.into())) + } + /// Storage: `Contracts::MigrationInProgress` (r:1 w:0) + /// Proof: `Contracts::MigrationInProgress` (`max_values`: Some(1), `max_size`: Some(1026), added: 1521, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `Measured`) + /// Storage: `Contracts::ContractInfoOf` (r:1 w:1) + /// Proof: `Contracts::ContractInfoOf` (`max_values`: None, `max_size`: Some(1795), added: 4270, mode: `Measured`) + /// Storage: `Contracts::CodeInfoOf` (r:1 w:0) + /// Proof: `Contracts::CodeInfoOf` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `Measured`) + /// Storage: `Contracts::PristineCode` (r:1 w:0) + /// Proof: `Contracts::PristineCode` (`max_values`: None, `max_size`: Some(125988), added: 128463, mode: `Measured`) + /// Storage: `Timestamp::Now` (r:1 w:0) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `Contracts::Nonce` (r:1 w:1) + /// Proof: `Contracts::Nonce` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `Measured`) + /// Storage: `System::EventTopics` (r:2 w:2) + /// Proof: `System::EventTopics` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `r` is `[0, 1600]`. fn seal_instantiation_nonce(r: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `692 + r * (240 ±0)` - // Estimated: `0` - // Minimum execution time: 369_881 nanoseconds. - Weight::from_parts(476_815_394, 0) - // Standard Error: 269_936 - .saturating_add(Weight::from_parts(18_315_800, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(7)) - .saturating_add(T::DbWeight::get().writes(4)) - } - /// The range of component `r` is `[0, 50]`. + // Measured: `861 + r * (3 ±0)` + // Estimated: `6801 + r * (3 ±0)` + // Minimum execution time: 258_953_000 picoseconds. + Weight::from_parts(288_222_836, 6801) + // Standard Error: 367 + .saturating_add(Weight::from_parts(152_842, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(9_u64)) + .saturating_add(T::DbWeight::get().writes(4_u64)) + .saturating_add(Weight::from_parts(0, 3).saturating_mul(r.into())) + } + /// The range of component `r` is `[0, 5000]`. fn instr_i64const(r: u32) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_780 nanoseconds. - Weight::from_parts(3_136_743, 0) - // Standard Error: 4_188 - .saturating_add(Weight::from_parts(621_351, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i64load(r: u32) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 1_770 nanoseconds. - Weight::from_parts(9_352_462, 0) - // Standard Error: 15_166 - .saturating_add(Weight::from_parts(1_557_402, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i64store(r: u32) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 1_860 nanoseconds. - Weight::from_parts(8_180_062, 0) - // Standard Error: 13_817 - .saturating_add(Weight::from_parts(1_622_066, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_select(r: u32) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 1_460 nanoseconds. - Weight::from_parts(2_551_334, 0) - // Standard Error: 11_841 - .saturating_add(Weight::from_parts(1_665_255, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_if(r: u32) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 1_480 nanoseconds. - Weight::from_parts(2_191_446, 0) - // Standard Error: 12_533 - .saturating_add(Weight::from_parts(2_098_157, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_br(r: u32) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 1_630 nanoseconds. - Weight::from_parts(1_945_536, 0) - // Standard Error: 6_420 - .saturating_add(Weight::from_parts(984_796, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_br_if(r: u32) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 1_520 nanoseconds. - Weight::from_parts(1_854_661, 0) - // Standard Error: 7_036 - .saturating_add(Weight::from_parts(1_381_991, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_br_table(r: u32) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 1_531 nanoseconds. - Weight::from_parts(1_429_591, 0) - // Standard Error: 8_514 - .saturating_add(Weight::from_parts(1_816_297, 0).saturating_mul(r.into())) - } - /// The range of component `e` is `[1, 256]`. - fn instr_br_table_per_entry(e: u32) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 5_630 nanoseconds. - Weight::from_parts(7_467_038, 0) - // Standard Error: 333 - .saturating_add(Weight::from_parts(4_907, 0).saturating_mul(e.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_call(r: u32) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 1_560 nanoseconds. - Weight::from_parts(1_650_551, 0) - // Standard Error: 35_615 - .saturating_add(Weight::from_parts(5_246_652, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_call_indirect(r: u32) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 1_790 nanoseconds. - Weight::from_parts(8_229_172, 0) - // Standard Error: 36_662 - .saturating_add(Weight::from_parts(5_895_045, 0).saturating_mul(r.into())) - } - /// The range of component `p` is `[0, 128]`. - fn instr_call_indirect_per_param(p: u32) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 7_690 nanoseconds. - Weight::from_parts(13_888_593, 0) - // Standard Error: 3_490 - .saturating_add(Weight::from_parts(312_955, 0).saturating_mul(p.into())) - } - /// The range of component `l` is `[0, 1024]`. - fn instr_call_per_local(l: u32) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 7_050 nanoseconds. - Weight::from_parts(8_811_701, 0) - // Standard Error: 656 - .saturating_add(Weight::from_parts(93_440, 0).saturating_mul(l.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_local_get(r: u32) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 3_840 nanoseconds. - Weight::from_parts(5_853_123, 0) - // Standard Error: 6_625 - .saturating_add(Weight::from_parts(765_633, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_local_set(r: u32) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 3_340 nanoseconds. - Weight::from_parts(4_113_945, 0) - // Standard Error: 8_909 - .saturating_add(Weight::from_parts(1_198_001, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_local_tee(r: u32) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 3_970 nanoseconds. - Weight::from_parts(4_643_752, 0) - // Standard Error: 9_875 - .saturating_add(Weight::from_parts(1_463_310, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_global_get(r: u32) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 1_620 nanoseconds. - Weight::from_parts(2_315_667, 0) - // Standard Error: 13_076 - .saturating_add(Weight::from_parts(2_015_150, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_global_set(r: u32) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 1_600 nanoseconds. - Weight::from_parts(1_483_134, 0) - // Standard Error: 11_873 - .saturating_add(Weight::from_parts(2_058_012, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_memory_current(r: u32) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 1_990 nanoseconds. - Weight::from_parts(3_095_465, 0) - // Standard Error: 10_245 - .saturating_add(Weight::from_parts(1_332_117, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 1]`. - fn instr_memory_grow(r: u32) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 1_480 nanoseconds. - Weight::from_parts(1_934_187, 0) - // Standard Error: 1_165_957 - .saturating_add(Weight::from_parts(352_987_712, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i64clz(r: u32) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 1_830 nanoseconds. - Weight::from_parts(3_764_219, 0) - // Standard Error: 7_276 - .saturating_add(Weight::from_parts(908_339, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i64ctz(r: u32) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 1_440 nanoseconds. - Weight::from_parts(2_932_299, 0) - // Standard Error: 6_288 - .saturating_add(Weight::from_parts(927_100, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i64popcnt(r: u32) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 1_810 nanoseconds. - Weight::from_parts(3_383_481, 0) - // Standard Error: 6_988 - .saturating_add(Weight::from_parts(911_269, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i64eqz(r: u32) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 1_690 nanoseconds. - Weight::from_parts(2_921_686, 0) - // Standard Error: 5_839 - .saturating_add(Weight::from_parts(943_173, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i64extendsi32(r: u32) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 1_500 nanoseconds. - Weight::from_parts(2_623_859, 0) - // Standard Error: 6_524 - .saturating_add(Weight::from_parts(928_298, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i64extendui32(r: u32) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 1_550 nanoseconds. - Weight::from_parts(4_627_690, 0) - // Standard Error: 8_179 - .saturating_add(Weight::from_parts(863_051, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i32wrapi64(r: u32) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 1_550 nanoseconds. - Weight::from_parts(2_595_110, 0) - // Standard Error: 6_474 - .saturating_add(Weight::from_parts(928_065, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i64eq(r: u32) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 1_510 nanoseconds. - Weight::from_parts(3_894_235, 0) - // Standard Error: 8_463 - .saturating_add(Weight::from_parts(1_219_500, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i64ne(r: u32) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 1_460 nanoseconds. - Weight::from_parts(2_563_440, 0) - // Standard Error: 8_687 - .saturating_add(Weight::from_parts(1_247_172, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i64lts(r: u32) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 1_740 nanoseconds. - Weight::from_parts(3_152_891, 0) - // Standard Error: 8_071 - .saturating_add(Weight::from_parts(1_248_541, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i64ltu(r: u32) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 1_520 nanoseconds. - Weight::from_parts(3_388_594, 0) - // Standard Error: 9_001 - .saturating_add(Weight::from_parts(1_217_995, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i64gts(r: u32) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 1_740 nanoseconds. - Weight::from_parts(1_635_986, 0) - // Standard Error: 6_243 - .saturating_add(Weight::from_parts(1_305_180, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i64gtu(r: u32) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 1_710 nanoseconds. - Weight::from_parts(2_638_243, 0) - // Standard Error: 5_966 - .saturating_add(Weight::from_parts(1_275_338, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i64les(r: u32) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 1_450 nanoseconds. - Weight::from_parts(3_146_830, 0) - // Standard Error: 8_968 - .saturating_add(Weight::from_parts(1_227_357, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i64leu(r: u32) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 1_460 nanoseconds. - Weight::from_parts(3_252_838, 0) - // Standard Error: 7_613 - .saturating_add(Weight::from_parts(1_246_230, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i64ges(r: u32) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 1_530 nanoseconds. - Weight::from_parts(2_491_422, 0) - // Standard Error: 7_290 - .saturating_add(Weight::from_parts(1_279_578, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i64geu(r: u32) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 1_480 nanoseconds. - Weight::from_parts(1_696_914, 0) - // Standard Error: 7_284 - .saturating_add(Weight::from_parts(1_291_501, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i64add(r: u32) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 1_720 nanoseconds. - Weight::from_parts(3_244_000, 0) - // Standard Error: 8_247 - .saturating_add(Weight::from_parts(1_223_730, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i64sub(r: u32) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 1_740 nanoseconds. - Weight::from_parts(2_339_735, 0) - // Standard Error: 6_588 - .saturating_add(Weight::from_parts(1_275_672, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i64mul(r: u32) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 1_760 nanoseconds. - Weight::from_parts(3_085_111, 0) - // Standard Error: 7_619 - .saturating_add(Weight::from_parts(1_248_370, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i64divs(r: u32) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 1_490 nanoseconds. - Weight::from_parts(2_468_536, 0) - // Standard Error: 9_812 - .saturating_add(Weight::from_parts(1_454_375, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i64divu(r: u32) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 1_520 nanoseconds. - Weight::from_parts(3_650_517, 0) - // Standard Error: 9_928 - .saturating_add(Weight::from_parts(1_207_003, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i64rems(r: u32) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 1_470 nanoseconds. - Weight::from_parts(1_449_755, 0) - // Standard Error: 9_386 - .saturating_add(Weight::from_parts(1_576_210, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i64remu(r: u32) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 1_530 nanoseconds. - Weight::from_parts(3_604_036, 0) - // Standard Error: 9_582 - .saturating_add(Weight::from_parts(1_387_067, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i64and(r: u32) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 1_450 nanoseconds. - Weight::from_parts(3_741_153, 0) - // Standard Error: 9_330 - .saturating_add(Weight::from_parts(1_187_944, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i64or(r: u32) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 1_550 nanoseconds. - Weight::from_parts(1_900_000, 0) - // Standard Error: 23_251 - .saturating_add(Weight::from_parts(1_513_468, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i64xor(r: u32) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 1_510 nanoseconds. - Weight::from_parts(2_921_475, 0) - // Standard Error: 7_444 - .saturating_add(Weight::from_parts(1_249_617, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i64shl(r: u32) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 1_780 nanoseconds. - Weight::from_parts(3_548_981, 0) - // Standard Error: 7_767 - .saturating_add(Weight::from_parts(1_242_323, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i64shrs(r: u32) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 1_710 nanoseconds. - Weight::from_parts(1_904_247, 0) - // Standard Error: 7_361 - .saturating_add(Weight::from_parts(1_279_805, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i64shru(r: u32) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 1_450 nanoseconds. - Weight::from_parts(1_679_219, 0) - // Standard Error: 6_529 - .saturating_add(Weight::from_parts(1_291_802, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i64rotl(r: u32) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 1_720 nanoseconds. - Weight::from_parts(3_744_484, 0) - // Standard Error: 8_338 - .saturating_add(Weight::from_parts(1_227_022, 0).saturating_mul(r.into())) - } - /// The range of component `r` is `[0, 50]`. - fn instr_i64rotr(r: u32) -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 1_500 nanoseconds. - Weight::from_parts(3_433_997, 0) - // Standard Error: 8_899 - .saturating_add(Weight::from_parts(1_211_884, 0).saturating_mul(r.into())) + // Minimum execution time: 1_476_000 picoseconds. + Weight::from_parts(2_119_717, 0) + // Standard Error: 28 + .saturating_add(Weight::from_parts(9_805, 0).saturating_mul(r.into())) } } diff --git a/runtime/common/src/weights/pallet_democracy.rs b/runtime/common/src/weights/pallet_democracy.rs index 81df45f93..78f1f7ee1 100644 --- a/runtime/common/src/weights/pallet_democracy.rs +++ b/runtime/common/src/weights/pallet_democracy.rs @@ -57,105 +57,113 @@ impl pallet_democracy::weights::WeightInfo for WeightIn /// Storage: Democracy PublicProps (r:1 w:1) /// Proof: Democracy PublicProps (max_values: Some(1), max_size: Some(16702), added: 17197, mode: MaxEncodedLen) /// Storage: Democracy Blacklist (r:1 w:0) - /// Proof: Democracy Blacklist (max_values: None, max_size: Some(3242), added: 5717, mode: MaxEncodedLen) + /// Proof: Democracy Blacklist (max_values: None, max_size: Some(3238), added: 5713, mode: MaxEncodedLen) /// Storage: Democracy DepositOf (r:0 w:1) /// Proof: Democracy DepositOf (max_values: None, max_size: Some(3230), added: 5705, mode: MaxEncodedLen) fn propose() -> Weight { // Proof Size summary in bytes: - // Measured: `4835` - // Estimated: `23413` - // Minimum execution time: 50_690 nanoseconds. - Weight::from_parts(63_110_000, 23413) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(3)) + // Measured: `4801` + // Estimated: `18187` + // Minimum execution time: 49_339_000 picoseconds. + Weight::from_parts(50_942_000, 18187) + .saturating_add(T::DbWeight::get().reads(3_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) } /// Storage: Democracy DepositOf (r:1 w:1) /// Proof: Democracy DepositOf (max_values: None, max_size: Some(3230), added: 5705, mode: MaxEncodedLen) fn second() -> Weight { // Proof Size summary in bytes: - // Measured: `3591` - // Estimated: `5705` - // Minimum execution time: 43_520 nanoseconds. - Weight::from_parts(45_040_000, 5705) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) + // Measured: `3556` + // Estimated: `6695` + // Minimum execution time: 43_291_000 picoseconds. + Weight::from_parts(44_856_000, 6695) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: Democracy ReferendumInfoOf (r:1 w:1) - /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(209), added: 2684, mode: MaxEncodedLen) + /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen) /// Storage: Democracy VotingOf (r:1 w:1) - /// Proof: Democracy VotingOf (max_values: None, max_size: Some(3799), added: 6274, mode: MaxEncodedLen) + /// Proof: Democracy VotingOf (max_values: None, max_size: Some(3795), added: 6270, mode: MaxEncodedLen) /// Storage: Balances Locks (r:1 w:1) /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) + /// Storage: Balances Freezes (r:1 w:0) + /// Proof: Balances Freezes (max_values: None, max_size: Some(49), added: 2524, mode: MaxEncodedLen) fn vote_new() -> Weight { // Proof Size summary in bytes: - // Measured: `3500` - // Estimated: `12732` - // Minimum execution time: 59_010 nanoseconds. - Weight::from_parts(72_290_000, 12732) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(3)) + // Measured: `3470` + // Estimated: `7260` + // Minimum execution time: 61_890_000 picoseconds. + Weight::from_parts(63_626_000, 7260) + .saturating_add(T::DbWeight::get().reads(4_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) } /// Storage: Democracy ReferendumInfoOf (r:1 w:1) - /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(209), added: 2684, mode: MaxEncodedLen) + /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen) /// Storage: Democracy VotingOf (r:1 w:1) - /// Proof: Democracy VotingOf (max_values: None, max_size: Some(3799), added: 6274, mode: MaxEncodedLen) + /// Proof: Democracy VotingOf (max_values: None, max_size: Some(3795), added: 6270, mode: MaxEncodedLen) /// Storage: Balances Locks (r:1 w:1) /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) + /// Storage: Balances Freezes (r:1 w:0) + /// Proof: Balances Freezes (max_values: None, max_size: Some(49), added: 2524, mode: MaxEncodedLen) fn vote_existing() -> Weight { // Proof Size summary in bytes: - // Measured: `3522` - // Estimated: `12732` - // Minimum execution time: 59_810 nanoseconds. - Weight::from_parts(72_890_000, 12732) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(3)) + // Measured: `3492` + // Estimated: `7260` + // Minimum execution time: 67_802_000 picoseconds. + Weight::from_parts(69_132_000, 7260) + .saturating_add(T::DbWeight::get().reads(4_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) } /// Storage: Democracy ReferendumInfoOf (r:1 w:1) - /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(209), added: 2684, mode: MaxEncodedLen) + /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen) /// Storage: Democracy Cancellations (r:1 w:1) /// Proof: Democracy Cancellations (max_values: None, max_size: Some(33), added: 2508, mode: MaxEncodedLen) + /// Storage: Democracy MetadataOf (r:1 w:1) + /// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen) fn emergency_cancel() -> Weight { // Proof Size summary in bytes: - // Measured: `295` - // Estimated: `5192` - // Minimum execution time: 26_390 nanoseconds. - Weight::from_parts(32_000_000, 5192) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(2)) + // Measured: `366` + // Estimated: `3666` + // Minimum execution time: 25_757_000 picoseconds. + Weight::from_parts(27_226_000, 3666) + .saturating_add(T::DbWeight::get().reads(3_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) } /// Storage: Democracy PublicProps (r:1 w:1) /// Proof: Democracy PublicProps (max_values: Some(1), max_size: Some(16702), added: 17197, mode: MaxEncodedLen) /// Storage: Democracy DepositOf (r:1 w:1) /// Proof: Democracy DepositOf (max_values: None, max_size: Some(3230), added: 5705, mode: MaxEncodedLen) - /// Storage: System Account (r:2 w:2) - /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: MaxEncodedLen) + /// Storage: System Account (r:1 w:1) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: Democracy MetadataOf (r:3 w:1) + /// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen) /// Storage: Democracy NextExternal (r:1 w:1) /// Proof: Democracy NextExternal (max_values: Some(1), max_size: Some(132), added: 627, mode: MaxEncodedLen) /// Storage: Democracy ReferendumInfoOf (r:1 w:1) - /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(209), added: 2684, mode: MaxEncodedLen) + /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen) /// Storage: Democracy Blacklist (r:0 w:1) - /// Proof: Democracy Blacklist (max_values: None, max_size: Some(3242), added: 5717, mode: MaxEncodedLen) + /// Proof: Democracy Blacklist (max_values: None, max_size: Some(3238), added: 5713, mode: MaxEncodedLen) fn blacklist() -> Weight { // Proof Size summary in bytes: - // Measured: `6251` - // Estimated: `31427` - // Minimum execution time: 112_670 nanoseconds. - Weight::from_parts(139_060_000, 31427) - .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().writes(7)) + // Measured: `5910` + // Estimated: `18187` + // Minimum execution time: 113_060_000 picoseconds. + Weight::from_parts(114_813_000, 18187) + .saturating_add(T::DbWeight::get().reads(8_u64)) + .saturating_add(T::DbWeight::get().writes(7_u64)) } /// Storage: Democracy NextExternal (r:1 w:1) /// Proof: Democracy NextExternal (max_values: Some(1), max_size: Some(132), added: 627, mode: MaxEncodedLen) /// Storage: Democracy Blacklist (r:1 w:0) - /// Proof: Democracy Blacklist (max_values: None, max_size: Some(3242), added: 5717, mode: MaxEncodedLen) + /// Proof: Democracy Blacklist (max_values: None, max_size: Some(3238), added: 5713, mode: MaxEncodedLen) fn external_propose() -> Weight { // Proof Size summary in bytes: - // Measured: `3419` - // Estimated: `6344` - // Minimum execution time: 28_210 nanoseconds. - Weight::from_parts(28_970_000, 6344) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(1)) + // Measured: `3416` + // Estimated: `6703` + // Minimum execution time: 13_413_000 picoseconds. + Weight::from_parts(13_794_000, 6703) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: Democracy NextExternal (r:0 w:1) /// Proof: Democracy NextExternal (max_values: Some(1), max_size: Some(132), added: 627, mode: MaxEncodedLen) @@ -163,8 +171,8 @@ impl pallet_democracy::weights::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 6_060 nanoseconds. - Weight::from_parts(6_540_000, 0).saturating_add(T::DbWeight::get().writes(1)) + // Minimum execution time: 3_213_000 picoseconds. + Weight::from_parts(3_429_000, 0).saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: Democracy NextExternal (r:0 w:1) /// Proof: Democracy NextExternal (max_values: Some(1), max_size: Some(132), added: 627, mode: MaxEncodedLen) @@ -172,80 +180,90 @@ impl pallet_democracy::weights::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 6_150 nanoseconds. - Weight::from_parts(6_650_000, 0).saturating_add(T::DbWeight::get().writes(1)) + // Minimum execution time: 3_280_000 picoseconds. + Weight::from_parts(3_389_000, 0).saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: Democracy NextExternal (r:1 w:1) /// Proof: Democracy NextExternal (max_values: Some(1), max_size: Some(132), added: 627, mode: MaxEncodedLen) /// Storage: Democracy ReferendumCount (r:1 w:1) /// Proof: Democracy ReferendumCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: Democracy MetadataOf (r:1 w:2) + /// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen) /// Storage: Democracy ReferendumInfoOf (r:0 w:1) - /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(209), added: 2684, mode: MaxEncodedLen) + /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen) fn fast_track() -> Weight { // Proof Size summary in bytes: - // Measured: `179` - // Estimated: `1126` - // Minimum execution time: 28_070 nanoseconds. - Weight::from_parts(34_820_000, 1126) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(3)) + // Measured: `286` + // Estimated: `3518` + // Minimum execution time: 28_142_000 picoseconds. + Weight::from_parts(28_862_000, 3518) + .saturating_add(T::DbWeight::get().reads(3_u64)) + .saturating_add(T::DbWeight::get().writes(5_u64)) } /// Storage: Democracy NextExternal (r:1 w:1) /// Proof: Democracy NextExternal (max_values: Some(1), max_size: Some(132), added: 627, mode: MaxEncodedLen) /// Storage: Democracy Blacklist (r:1 w:1) - /// Proof: Democracy Blacklist (max_values: None, max_size: Some(3242), added: 5717, mode: MaxEncodedLen) + /// Proof: Democracy Blacklist (max_values: None, max_size: Some(3238), added: 5713, mode: MaxEncodedLen) + /// Storage: Democracy MetadataOf (r:1 w:1) + /// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen) fn veto_external() -> Weight { // Proof Size summary in bytes: - // Measured: `3448` - // Estimated: `6344` - // Minimum execution time: 36_350 nanoseconds. - Weight::from_parts(44_300_000, 6344) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(2)) + // Measured: `3519` + // Estimated: `6703` + // Minimum execution time: 32_395_000 picoseconds. + Weight::from_parts(33_617_000, 6703) + .saturating_add(T::DbWeight::get().reads(3_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) } /// Storage: Democracy PublicProps (r:1 w:1) /// Proof: Democracy PublicProps (max_values: Some(1), max_size: Some(16702), added: 17197, mode: MaxEncodedLen) /// Storage: Democracy DepositOf (r:1 w:1) /// Proof: Democracy DepositOf (max_values: None, max_size: Some(3230), added: 5705, mode: MaxEncodedLen) - /// Storage: System Account (r:2 w:2) - /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: MaxEncodedLen) + /// Storage: System Account (r:1 w:1) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + /// Storage: Democracy MetadataOf (r:1 w:1) + /// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen) fn cancel_proposal() -> Weight { // Proof Size summary in bytes: - // Measured: `6122` - // Estimated: `28116` - // Minimum execution time: 94_210 nanoseconds. - Weight::from_parts(115_161_000, 28116) - .saturating_add(T::DbWeight::get().reads(4)) - .saturating_add(T::DbWeight::get().writes(4)) + // Measured: `5821` + // Estimated: `18187` + // Minimum execution time: 92_255_000 picoseconds. + Weight::from_parts(93_704_000, 18187) + .saturating_add(T::DbWeight::get().reads(4_u64)) + .saturating_add(T::DbWeight::get().writes(4_u64)) } + /// Storage: Democracy MetadataOf (r:1 w:1) + /// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen) /// Storage: Democracy ReferendumInfoOf (r:0 w:1) - /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(209), added: 2684, mode: MaxEncodedLen) + /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen) fn cancel_referendum() -> Weight { // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 11_520 nanoseconds. - Weight::from_parts(13_900_000, 0).saturating_add(T::DbWeight::get().writes(1)) + // Measured: `271` + // Estimated: `3518` + // Minimum execution time: 19_623_000 picoseconds. + Weight::from_parts(20_545_000, 3518) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(2_u64)) } /// Storage: Democracy LowestUnbaked (r:1 w:1) /// Proof: Democracy LowestUnbaked (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) /// Storage: Democracy ReferendumCount (r:1 w:0) /// Proof: Democracy ReferendumCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) /// Storage: Democracy ReferendumInfoOf (r:99 w:0) - /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(209), added: 2684, mode: MaxEncodedLen) + /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen) /// The range of component `r` is `[0, 99]`. fn on_initialize_base(r: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `174 + r * (125 ±0)` - // Estimated: `998 + r * (2684 ±0)` - // Minimum execution time: 14_730 nanoseconds. - Weight::from_parts(28_833_321, 998) - // Standard Error: 37_839 - .saturating_add(Weight::from_parts(4_701_815, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(2)) + // Measured: `244 + r * (86 ±0)` + // Estimated: `1489 + r * (2676 ±0)` + // Minimum execution time: 7_032_000 picoseconds. + Weight::from_parts(7_931_421, 1489) + // Standard Error: 7_395 + .saturating_add(Weight::from_parts(3_236_964, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) - .saturating_add(T::DbWeight::get().writes(1)) - .saturating_add(Weight::from_parts(0, 2684).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().writes(1_u64)) + .saturating_add(Weight::from_parts(0, 2676).saturating_mul(r.into())) } /// Storage: Democracy LowestUnbaked (r:1 w:1) /// Proof: Democracy LowestUnbaked (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) @@ -258,60 +276,62 @@ impl pallet_democracy::weights::WeightInfo for WeightIn /// Storage: Democracy PublicProps (r:1 w:0) /// Proof: Democracy PublicProps (max_values: Some(1), max_size: Some(16702), added: 17197, mode: MaxEncodedLen) /// Storage: Democracy ReferendumInfoOf (r:99 w:0) - /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(209), added: 2684, mode: MaxEncodedLen) + /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen) /// The range of component `r` is `[0, 99]`. fn on_initialize_base_with_launch_period(r: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `174 + r * (125 ±0)` - // Estimated: `19318 + r * (2684 ±0)` - // Minimum execution time: 18_190 nanoseconds. - Weight::from_parts(29_838_845, 19318) - // Standard Error: 39_893 - .saturating_add(Weight::from_parts(4_571_724, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(5)) + // Measured: `244 + r * (86 ±0)` + // Estimated: `18187 + r * (2676 ±0)` + // Minimum execution time: 10_524_000 picoseconds. + Weight::from_parts(10_369_064, 18187) + // Standard Error: 8_385 + .saturating_add(Weight::from_parts(3_242_334, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) - .saturating_add(T::DbWeight::get().writes(1)) - .saturating_add(Weight::from_parts(0, 2684).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().writes(1_u64)) + .saturating_add(Weight::from_parts(0, 2676).saturating_mul(r.into())) } /// Storage: Democracy VotingOf (r:3 w:3) - /// Proof: Democracy VotingOf (max_values: None, max_size: Some(3799), added: 6274, mode: MaxEncodedLen) + /// Proof: Democracy VotingOf (max_values: None, max_size: Some(3795), added: 6270, mode: MaxEncodedLen) /// Storage: Democracy ReferendumInfoOf (r:99 w:99) - /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(209), added: 2684, mode: MaxEncodedLen) + /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen) /// Storage: Balances Locks (r:1 w:1) /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) + /// Storage: Balances Freezes (r:1 w:0) + /// Proof: Balances Freezes (max_values: None, max_size: Some(49), added: 2524, mode: MaxEncodedLen) /// The range of component `r` is `[0, 99]`. fn delegate(r: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `897 + r * (147 ±0)` - // Estimated: `22596 + r * (2684 ±0)` - // Minimum execution time: 55_960 nanoseconds. - Weight::from_parts(72_937_258, 22596) - // Standard Error: 49_578 - .saturating_add(Weight::from_parts(6_045_111, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(4)) + // Measured: `830 + r * (108 ±0)` + // Estimated: `19800 + r * (2676 ±0)` + // Minimum execution time: 46_106_000 picoseconds. + Weight::from_parts(48_936_654, 19800) + // Standard Error: 8_879 + .saturating_add(Weight::from_parts(4_708_141, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(5_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) - .saturating_add(T::DbWeight::get().writes(4)) + .saturating_add(T::DbWeight::get().writes(4_u64)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(r.into()))) - .saturating_add(Weight::from_parts(0, 2684).saturating_mul(r.into())) + .saturating_add(Weight::from_parts(0, 2676).saturating_mul(r.into())) } /// Storage: Democracy VotingOf (r:2 w:2) - /// Proof: Democracy VotingOf (max_values: None, max_size: Some(3799), added: 6274, mode: MaxEncodedLen) + /// Proof: Democracy VotingOf (max_values: None, max_size: Some(3795), added: 6270, mode: MaxEncodedLen) /// Storage: Democracy ReferendumInfoOf (r:99 w:99) - /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(209), added: 2684, mode: MaxEncodedLen) + /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen) /// The range of component `r` is `[0, 99]`. fn undelegate(r: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `522 + r * (147 ±0)` - // Estimated: `12548 + r * (2684 ±0)` - // Minimum execution time: 33_530 nanoseconds. - Weight::from_parts(45_434_419, 12548) - // Standard Error: 48_431 - .saturating_add(Weight::from_parts(6_200_443, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(2)) + // Measured: `493 + r * (108 ±0)` + // Estimated: `13530 + r * (2676 ±0)` + // Minimum execution time: 21_078_000 picoseconds. + Weight::from_parts(22_732_737, 13530) + // Standard Error: 7_969 + .saturating_add(Weight::from_parts(4_626_458, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) - .saturating_add(T::DbWeight::get().writes(2)) + .saturating_add(T::DbWeight::get().writes(2_u64)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(r.into()))) - .saturating_add(Weight::from_parts(0, 2684).saturating_mul(r.into())) + .saturating_add(Weight::from_parts(0, 2676).saturating_mul(r.into())) } /// Storage: Democracy PublicProps (r:0 w:1) /// Proof: Democracy PublicProps (max_values: Some(1), max_size: Some(16702), added: 17197, mode: MaxEncodedLen) @@ -319,73 +339,161 @@ impl pallet_democracy::weights::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 4_870 nanoseconds. - Weight::from_parts(7_050_000, 0).saturating_add(T::DbWeight::get().writes(1)) + // Minimum execution time: 3_229_000 picoseconds. + Weight::from_parts(3_415_000, 0).saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: Democracy VotingOf (r:1 w:1) - /// Proof: Democracy VotingOf (max_values: None, max_size: Some(3799), added: 6274, mode: MaxEncodedLen) + /// Proof: Democracy VotingOf (max_values: None, max_size: Some(3795), added: 6270, mode: MaxEncodedLen) /// Storage: Balances Locks (r:1 w:1) /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) + /// Storage: Balances Freezes (r:1 w:0) + /// Proof: Balances Freezes (max_values: None, max_size: Some(49), added: 2524, mode: MaxEncodedLen) /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: MaxEncodedLen) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) /// The range of component `r` is `[0, 99]`. - fn unlock_remove(_r: u32) -> Weight { + fn unlock_remove(r: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `554` - // Estimated: `12655` - // Minimum execution time: 31_950 nanoseconds. - Weight::from_parts(46_451_047, 12655) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(3)) + // Measured: `563` + // Estimated: `7260` + // Minimum execution time: 25_735_000 picoseconds. + Weight::from_parts(41_341_468, 7260) + // Standard Error: 3_727 + .saturating_add(Weight::from_parts(94_755, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(4_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) } /// Storage: Democracy VotingOf (r:1 w:1) - /// Proof: Democracy VotingOf (max_values: None, max_size: Some(3799), added: 6274, mode: MaxEncodedLen) + /// Proof: Democracy VotingOf (max_values: None, max_size: Some(3795), added: 6270, mode: MaxEncodedLen) /// Storage: Balances Locks (r:1 w:1) /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) + /// Storage: Balances Freezes (r:1 w:0) + /// Proof: Balances Freezes (max_values: None, max_size: Some(49), added: 2524, mode: MaxEncodedLen) /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: MaxEncodedLen) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) /// The range of component `r` is `[0, 99]`. fn unlock_set(r: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `555 + r * (22 ±0)` - // Estimated: `12655` - // Minimum execution time: 34_100 nanoseconds. - Weight::from_parts(44_669_466, 12655) - // Standard Error: 5_077 - .saturating_add(Weight::from_parts(42_607, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(3)) + // Measured: `564 + r * (22 ±0)` + // Estimated: `7260` + // Minimum execution time: 36_233_000 picoseconds. + Weight::from_parts(39_836_017, 7260) + // Standard Error: 1_791 + .saturating_add(Weight::from_parts(132_158, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(4_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) } /// Storage: Democracy ReferendumInfoOf (r:1 w:1) - /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(209), added: 2684, mode: MaxEncodedLen) + /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen) /// Storage: Democracy VotingOf (r:1 w:1) - /// Proof: Democracy VotingOf (max_values: None, max_size: Some(3799), added: 6274, mode: MaxEncodedLen) + /// Proof: Democracy VotingOf (max_values: None, max_size: Some(3795), added: 6270, mode: MaxEncodedLen) /// The range of component `r` is `[1, 100]`. fn remove_vote(r: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `760 + r * (26 ±0)` - // Estimated: `8958` - // Minimum execution time: 26_160 nanoseconds. - Weight::from_parts(34_737_151, 8958) - // Standard Error: 4_560 - .saturating_add(Weight::from_parts(64_111, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(2)) + // Measured: `728 + r * (26 ±0)` + // Estimated: `7260` + // Minimum execution time: 16_081_000 picoseconds. + Weight::from_parts(19_624_101, 7260) + // Standard Error: 1_639 + .saturating_add(Weight::from_parts(133_630, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(2_u64)) } /// Storage: Democracy ReferendumInfoOf (r:1 w:1) - /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(209), added: 2684, mode: MaxEncodedLen) + /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen) /// Storage: Democracy VotingOf (r:1 w:1) - /// Proof: Democracy VotingOf (max_values: None, max_size: Some(3799), added: 6274, mode: MaxEncodedLen) + /// Proof: Democracy VotingOf (max_values: None, max_size: Some(3795), added: 6270, mode: MaxEncodedLen) /// The range of component `r` is `[1, 100]`. fn remove_other_vote(r: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `760 + r * (26 ±0)` - // Estimated: `8958` - // Minimum execution time: 25_821 nanoseconds. - Weight::from_parts(32_571_293, 8958) - // Standard Error: 3_984 - .saturating_add(Weight::from_parts(94_520, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(2)) + // Measured: `728 + r * (26 ±0)` + // Estimated: `7260` + // Minimum execution time: 15_634_000 picoseconds. + Weight::from_parts(19_573_407, 7260) + // Standard Error: 1_790 + .saturating_add(Weight::from_parts(139_707, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(2_u64)) + } + /// Storage: Democracy NextExternal (r:1 w:0) + /// Proof: Democracy NextExternal (max_values: Some(1), max_size: Some(132), added: 627, mode: MaxEncodedLen) + /// Storage: Preimage StatusFor (r:1 w:0) + /// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) + /// Storage: Democracy MetadataOf (r:0 w:1) + /// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen) + fn set_external_metadata() -> Weight { + // Proof Size summary in bytes: + // Measured: `356` + // Estimated: `3556` + // Minimum execution time: 18_344_000 picoseconds. + Weight::from_parts(18_727_000, 3556) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } + /// Storage: Democracy NextExternal (r:1 w:0) + /// Proof: Democracy NextExternal (max_values: Some(1), max_size: Some(132), added: 627, mode: MaxEncodedLen) + /// Storage: Democracy MetadataOf (r:1 w:1) + /// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen) + fn clear_external_metadata() -> Weight { + // Proof Size summary in bytes: + // Measured: `286` + // Estimated: `3518` + // Minimum execution time: 16_497_000 picoseconds. + Weight::from_parts(16_892_000, 3518) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } + /// Storage: Democracy PublicProps (r:1 w:0) + /// Proof: Democracy PublicProps (max_values: Some(1), max_size: Some(16702), added: 17197, mode: MaxEncodedLen) + /// Storage: Preimage StatusFor (r:1 w:0) + /// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) + /// Storage: Democracy MetadataOf (r:0 w:1) + /// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen) + fn set_proposal_metadata() -> Weight { + // Proof Size summary in bytes: + // Measured: `4888` + // Estimated: `18187` + // Minimum execution time: 39_517_000 picoseconds. + Weight::from_parts(40_632_000, 18187) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } + /// Storage: Democracy PublicProps (r:1 w:0) + /// Proof: Democracy PublicProps (max_values: Some(1), max_size: Some(16702), added: 17197, mode: MaxEncodedLen) + /// Storage: Democracy MetadataOf (r:1 w:1) + /// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen) + fn clear_proposal_metadata() -> Weight { + // Proof Size summary in bytes: + // Measured: `4822` + // Estimated: `18187` + // Minimum execution time: 37_108_000 picoseconds. + Weight::from_parts(37_599_000, 18187) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } + /// Storage: Preimage StatusFor (r:1 w:0) + /// Proof: Preimage StatusFor (max_values: None, max_size: Some(91), added: 2566, mode: MaxEncodedLen) + /// Storage: Democracy MetadataOf (r:0 w:1) + /// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen) + fn set_referendum_metadata() -> Weight { + // Proof Size summary in bytes: + // Measured: `144` + // Estimated: `3556` + // Minimum execution time: 13_997_000 picoseconds. + Weight::from_parts(14_298_000, 3556) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } + /// Storage: Democracy ReferendumInfoOf (r:1 w:0) + /// Proof: Democracy ReferendumInfoOf (max_values: None, max_size: Some(201), added: 2676, mode: MaxEncodedLen) + /// Storage: Democracy MetadataOf (r:1 w:1) + /// Proof: Democracy MetadataOf (max_values: None, max_size: Some(53), added: 2528, mode: MaxEncodedLen) + fn clear_referendum_metadata() -> Weight { + // Proof Size summary in bytes: + // Measured: `302` + // Estimated: `3666` + // Minimum execution time: 18_122_000 picoseconds. + Weight::from_parts(18_655_000, 3666) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) } } diff --git a/runtime/common/src/weights/pallet_parachain_staking.rs b/runtime/common/src/weights/pallet_parachain_staking.rs index 0ff678f08..788b12083 100644 --- a/runtime/common/src/weights/pallet_parachain_staking.rs +++ b/runtime/common/src/weights/pallet_parachain_staking.rs @@ -56,67 +56,67 @@ impl pallet_parachain_staking::weights::WeightInfo for /// Proof Skipped: ParachainStaking InflationConfig (max_values: Some(1), max_size: None, mode: Measured) fn set_staking_expectations() -> Weight { // Proof Size summary in bytes: - // Measured: `119` - // Estimated: `614` - // Minimum execution time: 21_650 nanoseconds. - Weight::from_parts(22_480_000, 614) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) + // Measured: `88` + // Estimated: `1573` + // Minimum execution time: 15_889_000 picoseconds. + Weight::from_parts(16_404_000, 1573) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: ParachainStaking InflationConfig (r:1 w:1) /// Proof Skipped: ParachainStaking InflationConfig (max_values: Some(1), max_size: None, mode: Measured) fn set_inflation() -> Weight { // Proof Size summary in bytes: - // Measured: `119` - // Estimated: `614` - // Minimum execution time: 76_630 nanoseconds. - Weight::from_parts(77_480_000, 614) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) + // Measured: `88` + // Estimated: `1573` + // Minimum execution time: 44_509_000 picoseconds. + Weight::from_parts(45_011_000, 1573) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: ParachainStaking ParachainBondInfo (r:1 w:1) /// Proof Skipped: ParachainStaking ParachainBondInfo (max_values: Some(1), max_size: None, mode: Measured) fn set_parachain_bond_account() -> Weight { // Proof Size summary in bytes: - // Measured: `52` - // Estimated: `547` - // Minimum execution time: 19_300 nanoseconds. - Weight::from_parts(19_930_000, 547) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) + // Measured: `6` + // Estimated: `1491` + // Minimum execution time: 14_675_000 picoseconds. + Weight::from_parts(15_094_000, 1491) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: ParachainStaking ParachainBondInfo (r:1 w:1) /// Proof Skipped: ParachainStaking ParachainBondInfo (max_values: Some(1), max_size: None, mode: Measured) fn set_parachain_bond_reserve_percent() -> Weight { // Proof Size summary in bytes: - // Measured: `52` - // Estimated: `547` - // Minimum execution time: 18_880 nanoseconds. - Weight::from_parts(19_530_000, 547) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) + // Measured: `6` + // Estimated: `1491` + // Minimum execution time: 13_898_000 picoseconds. + Weight::from_parts(14_492_000, 1491) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: ParachainStaking TotalSelected (r:1 w:1) /// Proof Skipped: ParachainStaking TotalSelected (max_values: Some(1), max_size: None, mode: Measured) fn set_total_selected() -> Weight { // Proof Size summary in bytes: // Measured: `28` - // Estimated: `523` - // Minimum execution time: 20_290 nanoseconds. - Weight::from_parts(20_680_000, 523) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) + // Estimated: `1513` + // Minimum execution time: 15_666_000 picoseconds. + Weight::from_parts(15_939_000, 1513) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: ParachainStaking CollatorCommission (r:1 w:1) /// Proof Skipped: ParachainStaking CollatorCommission (max_values: Some(1), max_size: None, mode: Measured) fn set_collator_commission() -> Weight { // Proof Size summary in bytes: // Measured: `27` - // Estimated: `522` - // Minimum execution time: 17_990 nanoseconds. - Weight::from_parts(19_230_000, 522) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) + // Estimated: `1512` + // Minimum execution time: 13_997_000 picoseconds. + Weight::from_parts(14_320_000, 1512) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: ParachainStaking TotalSelected (r:1 w:0) /// Proof Skipped: ParachainStaking TotalSelected (max_values: Some(1), max_size: None, mode: Measured) @@ -124,12 +124,12 @@ impl pallet_parachain_staking::weights::WeightInfo for /// Proof Skipped: ParachainStaking InflationConfig (max_values: Some(1), max_size: None, mode: Measured) fn set_blocks_per_round() -> Weight { // Proof Size summary in bytes: - // Measured: `147` - // Estimated: `1284` - // Minimum execution time: 81_350 nanoseconds. - Weight::from_parts(82_360_000, 1284) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(1)) + // Measured: `116` + // Estimated: `1601` + // Minimum execution time: 48_389_000 picoseconds. + Weight::from_parts(49_554_000, 1601) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: ParachainStaking CandidateInfo (r:1 w:1) /// Proof Skipped: ParachainStaking CandidateInfo (max_values: None, max_size: None, mode: Measured) @@ -138,183 +138,255 @@ impl pallet_parachain_staking::weights::WeightInfo for /// Storage: ParachainStaking CandidatePool (r:1 w:1) /// Proof Skipped: ParachainStaking CandidatePool (max_values: Some(1), max_size: None, mode: Measured) /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: MaxEncodedLen) + /// Proof: System Account (max_values: None, max_size: Some(116), added: 2591, mode: MaxEncodedLen) /// Storage: Balances Locks (r:1 w:1) - /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) + /// Proof: Balances Locks (max_values: None, max_size: Some(1287), added: 3762, mode: MaxEncodedLen) + /// Storage: Balances Freezes (r:1 w:0) + /// Proof: Balances Freezes (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) /// Storage: ParachainStaking Total (r:1 w:1) /// Proof Skipped: ParachainStaking Total (max_values: Some(1), max_size: None, mode: Measured) /// Storage: ParachainStaking TopDelegations (r:0 w:1) /// Proof Skipped: ParachainStaking TopDelegations (max_values: None, max_size: None, mode: Measured) /// Storage: ParachainStaking BottomDelegations (r:0 w:1) /// Proof Skipped: ParachainStaking BottomDelegations (max_values: None, max_size: None, mode: Measured) - /// The range of component `x` is `[3, 1000]`. + /// The range of component `x` is `[3, 200]`. fn join_candidates(x: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `1898 + x * (49 ±0)` - // Estimated: `22371 + x * (300 ±0)` - // Minimum execution time: 66_890 nanoseconds. - Weight::from_parts(96_425_237, 22371) - // Standard Error: 2_143 - .saturating_add(Weight::from_parts(185_610, 0).saturating_mul(x.into())) - .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().writes(7)) - .saturating_add(Weight::from_parts(0, 300).saturating_mul(x.into())) + // Measured: `1421 + x * (38 ±0)` + // Estimated: `4752 + x * (41 ±0)` + // Minimum execution time: 76_742_000 picoseconds. + Weight::from_parts(88_864_511, 4752) + // Standard Error: 2_004 + .saturating_add(Weight::from_parts(88_538, 0).saturating_mul(x.into())) + .saturating_add(T::DbWeight::get().reads(7_u64)) + .saturating_add(T::DbWeight::get().writes(7_u64)) + .saturating_add(Weight::from_parts(0, 41).saturating_mul(x.into())) } /// Storage: ParachainStaking CandidateInfo (r:1 w:1) /// Proof Skipped: ParachainStaking CandidateInfo (max_values: None, max_size: None, mode: Measured) /// Storage: ParachainStaking CandidatePool (r:1 w:1) /// Proof Skipped: ParachainStaking CandidatePool (max_values: Some(1), max_size: None, mode: Measured) - /// The range of component `x` is `[3, 1000]`. + /// The range of component `x` is `[3, 200]`. fn schedule_leave_candidates(x: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `990 + x * (48 ±0)` - // Estimated: `4794 + x * (98 ±0)` - // Minimum execution time: 31_150 nanoseconds. - Weight::from_parts(45_204_630, 4794) - // Standard Error: 1_892 - .saturating_add(Weight::from_parts(159_930, 0).saturating_mul(x.into())) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(2)) - .saturating_add(Weight::from_parts(0, 98).saturating_mul(x.into())) + // Measured: `702 + x * (37 ±0)` + // Estimated: `4060 + x * (38 ±0)` + // Minimum execution time: 27_238_000 picoseconds. + Weight::from_parts(34_109_750, 4060) + // Standard Error: 1_116 + .saturating_add(Weight::from_parts(62_292, 0).saturating_mul(x.into())) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(2_u64)) + .saturating_add(Weight::from_parts(0, 38).saturating_mul(x.into())) } /// Storage: ParachainStaking CandidateInfo (r:1 w:1) /// Proof Skipped: ParachainStaking CandidateInfo (max_values: None, max_size: None, mode: Measured) + /// Storage: ParachainStaking AutoCompoundingDelegations (r:1 w:1) + /// Proof Skipped: ParachainStaking AutoCompoundingDelegations (max_values: None, max_size: None, mode: Measured) /// Storage: ParachainStaking TopDelegations (r:1 w:1) /// Proof Skipped: ParachainStaking TopDelegations (max_values: None, max_size: None, mode: Measured) /// Storage: ParachainStaking DelegatorState (r:349 w:349) /// Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) /// Storage: Balances Locks (r:350 w:350) - /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) + /// Proof: Balances Locks (max_values: None, max_size: Some(1287), added: 3762, mode: MaxEncodedLen) + /// Storage: Balances Freezes (r:350 w:0) + /// Proof: Balances Freezes (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) /// Storage: System Account (r:350 w:350) - /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: MaxEncodedLen) + /// Proof: System Account (max_values: None, max_size: Some(116), added: 2591, mode: MaxEncodedLen) /// Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) /// Proof Skipped: ParachainStaking DelegationScheduledRequests (max_values: None, max_size: None, mode: Measured) + /// Storage: ParachainStaking BottomDelegations (r:1 w:1) + /// Proof Skipped: ParachainStaking BottomDelegations (max_values: None, max_size: None, mode: Measured) + /// Storage: ParachainStaking Total (r:1 w:1) + /// Proof Skipped: ParachainStaking Total (max_values: Some(1), max_size: None, mode: Measured) + /// The range of component `x` is `[2, 350]`. + fn execute_leave_candidates_worst_case(x: u32) -> Weight { + // Proof Size summary in bytes: + // Measured: `1157 + x * (431 ±0)` + // Estimated: `4696 + x * (3762 ±0)` + // Minimum execution time: 141_946_000 picoseconds. + Weight::from_parts(144_961_000, 4696) + // Standard Error: 79_832 + .saturating_add(Weight::from_parts(49_060_154, 0).saturating_mul(x.into())) + .saturating_add(T::DbWeight::get().reads(5_u64)) + .saturating_add(T::DbWeight::get().reads((4_u64).saturating_mul(x.into()))) + .saturating_add(T::DbWeight::get().writes(5_u64)) + .saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(x.into()))) + .saturating_add(Weight::from_parts(0, 3762).saturating_mul(x.into())) + } + /// Storage: ParachainStaking CandidateInfo (r:1 w:1) + /// Proof Skipped: ParachainStaking CandidateInfo (max_values: None, max_size: None, mode: Measured) /// Storage: ParachainStaking AutoCompoundingDelegations (r:1 w:1) /// Proof Skipped: ParachainStaking AutoCompoundingDelegations (max_values: None, max_size: None, mode: Measured) + /// Storage: ParachainStaking TopDelegations (r:1 w:1) + /// Proof Skipped: ParachainStaking TopDelegations (max_values: None, max_size: None, mode: Measured) + /// Storage: ParachainStaking DelegatorState (r:349 w:349) + /// Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) + /// Storage: Balances Locks (r:350 w:350) + /// Proof: Balances Locks (max_values: None, max_size: Some(1287), added: 3762, mode: MaxEncodedLen) + /// Storage: Balances Freezes (r:350 w:0) + /// Proof: Balances Freezes (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) + /// Storage: System Account (r:350 w:350) + /// Proof: System Account (max_values: None, max_size: Some(116), added: 2591, mode: MaxEncodedLen) + /// Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) + /// Proof Skipped: ParachainStaking DelegationScheduledRequests (max_values: None, max_size: None, mode: Measured) /// Storage: ParachainStaking BottomDelegations (r:1 w:1) /// Proof Skipped: ParachainStaking BottomDelegations (max_values: None, max_size: None, mode: Measured) /// Storage: ParachainStaking Total (r:1 w:1) /// Proof Skipped: ParachainStaking Total (max_values: Some(1), max_size: None, mode: Measured) /// The range of component `x` is `[2, 350]`. - fn execute_leave_candidates(x: u32) -> Weight { - // Proof Size summary in bytes: - // Measured: `238 + x * (595 ±0)` - // Estimated: `18229 + x * (12995 ±0)` - // Minimum execution time: 121_740 nanoseconds. - Weight::from_parts(137_141_000, 18229) - // Standard Error: 158_049 - .saturating_add(Weight::from_parts(46_465_017, 0).saturating_mul(x.into())) - .saturating_add(T::DbWeight::get().reads(5)) - .saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(x.into()))) - .saturating_add(T::DbWeight::get().writes(5)) + /// The range of component `y` is `[2, 350]`. + fn execute_leave_candidates_ideal(x: u32, _y: u32) -> Weight { + // Proof Size summary in bytes: + // Measured: `1149 + x * (431 ±0)` + // Estimated: `4696 + x * (3762 ±0)` + // Minimum execution time: 133_121_000 picoseconds. + Weight::from_parts(134_388_000, 4696) + // Standard Error: 34_256 + .saturating_add(Weight::from_parts(50_828_386, 0).saturating_mul(x.into())) + .saturating_add(T::DbWeight::get().reads(5_u64)) + .saturating_add(T::DbWeight::get().reads((4_u64).saturating_mul(x.into()))) + .saturating_add(T::DbWeight::get().writes(5_u64)) .saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(x.into()))) - .saturating_add(Weight::from_parts(0, 12995).saturating_mul(x.into())) + .saturating_add(Weight::from_parts(0, 3762).saturating_mul(x.into())) } /// Storage: ParachainStaking CandidateInfo (r:1 w:1) /// Proof Skipped: ParachainStaking CandidateInfo (max_values: None, max_size: None, mode: Measured) /// Storage: ParachainStaking CandidatePool (r:1 w:1) /// Proof Skipped: ParachainStaking CandidatePool (max_values: Some(1), max_size: None, mode: Measured) - /// The range of component `x` is `[3, 1000]`. + /// The range of component `x` is `[3, 200]`. fn cancel_leave_candidates(x: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `946 + x * (48 ±0)` - // Estimated: `4704 + x * (98 ±0)` - // Minimum execution time: 31_720 nanoseconds. - Weight::from_parts(41_148_720, 4704) - // Standard Error: 1_807 - .saturating_add(Weight::from_parts(174_213, 0).saturating_mul(x.into())) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(2)) - .saturating_add(Weight::from_parts(0, 98).saturating_mul(x.into())) + // Measured: `670 + x * (37 ±0)` + // Estimated: `4028 + x * (38 ±0)` + // Minimum execution time: 25_910_000 picoseconds. + Weight::from_parts(32_465_127, 4028) + // Standard Error: 1_064 + .saturating_add(Weight::from_parts(60_655, 0).saturating_mul(x.into())) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(2_u64)) + .saturating_add(Weight::from_parts(0, 38).saturating_mul(x.into())) } /// Storage: ParachainStaking CandidateInfo (r:1 w:1) /// Proof Skipped: ParachainStaking CandidateInfo (max_values: None, max_size: None, mode: Measured) /// Storage: ParachainStaking CandidatePool (r:1 w:1) /// Proof Skipped: ParachainStaking CandidatePool (max_values: Some(1), max_size: None, mode: Measured) - fn go_offline() -> Weight { - // Proof Size summary in bytes: - // Measured: `371` - // Estimated: `3712` - // Minimum execution time: 34_840 nanoseconds. - Weight::from_parts(35_820_000, 3712) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(2)) + /// The range of component `x` is `[1, 200]`. + fn go_offline(x: u32) -> Weight { + // Proof Size summary in bytes: + // Measured: `567 + x * (38 ±0)` + // Estimated: `3968 + x * (39 ±0)` + // Minimum execution time: 24_471_000 picoseconds. + Weight::from_parts(30_875_133, 3968) + // Standard Error: 1_124 + .saturating_add(Weight::from_parts(66_032, 0).saturating_mul(x.into())) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(2_u64)) + .saturating_add(Weight::from_parts(0, 39).saturating_mul(x.into())) } /// Storage: ParachainStaking CandidateInfo (r:1 w:1) /// Proof Skipped: ParachainStaking CandidateInfo (max_values: None, max_size: None, mode: Measured) /// Storage: ParachainStaking CandidatePool (r:1 w:1) /// Proof Skipped: ParachainStaking CandidatePool (max_values: Some(1), max_size: None, mode: Measured) - fn go_online() -> Weight { - // Proof Size summary in bytes: - // Measured: `322` - // Estimated: `3614` - // Minimum execution time: 34_860 nanoseconds. - Weight::from_parts(36_040_000, 3614) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(2)) + /// The range of component `x` is `[1, 200]`. + fn go_online(x: u32) -> Weight { + // Proof Size summary in bytes: + // Measured: `531 + x * (38 ±0)` + // Estimated: `3932 + x * (39 ±0)` + // Minimum execution time: 24_249_000 picoseconds. + Weight::from_parts(30_765_292, 3932) + // Standard Error: 1_181 + .saturating_add(Weight::from_parts(65_935, 0).saturating_mul(x.into())) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(2_u64)) + .saturating_add(Weight::from_parts(0, 39).saturating_mul(x.into())) } /// Storage: ParachainStaking CandidateInfo (r:1 w:1) /// Proof Skipped: ParachainStaking CandidateInfo (max_values: None, max_size: None, mode: Measured) + /// Storage: ParachainStaking CandidatePool (r:1 w:1) + /// Proof Skipped: ParachainStaking CandidatePool (max_values: Some(1), max_size: None, mode: Measured) /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: MaxEncodedLen) + /// Proof: System Account (max_values: None, max_size: Some(116), added: 2591, mode: MaxEncodedLen) /// Storage: ParachainStaking Total (r:1 w:1) /// Proof Skipped: ParachainStaking Total (max_values: Some(1), max_size: None, mode: Measured) /// Storage: Balances Locks (r:1 w:1) - /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) - /// Storage: ParachainStaking CandidatePool (r:1 w:1) - /// Proof Skipped: ParachainStaking CandidatePool (max_values: Some(1), max_size: None, mode: Measured) - fn candidate_bond_more() -> Weight { - // Proof Size summary in bytes: - // Measured: `650` - // Estimated: `11796` - // Minimum execution time: 61_311 nanoseconds. - Weight::from_parts(75_650_000, 11796) - .saturating_add(T::DbWeight::get().reads(5)) - .saturating_add(T::DbWeight::get().writes(5)) + /// Proof: Balances Locks (max_values: None, max_size: Some(1287), added: 3762, mode: MaxEncodedLen) + /// Storage: Balances Freezes (r:1 w:0) + /// Proof: Balances Freezes (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) + /// The range of component `x` is `[1, 200]`. + fn candidate_bond_more(x: u32) -> Weight { + // Proof Size summary in bytes: + // Measured: `1270 + x * (42 ±0)` + // Estimated: `4752 + x * (44 ±0)` + // Minimum execution time: 68_720_000 picoseconds. + Weight::from_parts(79_722_709, 4752) + // Standard Error: 2_059 + .saturating_add(Weight::from_parts(113_832, 0).saturating_mul(x.into())) + .saturating_add(T::DbWeight::get().reads(6_u64)) + .saturating_add(T::DbWeight::get().writes(5_u64)) + .saturating_add(Weight::from_parts(0, 44).saturating_mul(x.into())) } /// Storage: ParachainStaking CandidateInfo (r:1 w:1) /// Proof Skipped: ParachainStaking CandidateInfo (max_values: None, max_size: None, mode: Measured) fn schedule_candidate_bond_less() -> Weight { // Proof Size summary in bytes: - // Measured: `216` - // Estimated: `2691` - // Minimum execution time: 29_000 nanoseconds. - Weight::from_parts(29_870_000, 2691) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) + // Measured: `171` + // Estimated: `3636` + // Minimum execution time: 21_049_000 picoseconds. + Weight::from_parts(21_735_000, 3636) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: ParachainStaking CandidateInfo (r:1 w:1) /// Proof Skipped: ParachainStaking CandidateInfo (max_values: None, max_size: None, mode: Measured) + /// Storage: ParachainStaking CandidatePool (r:1 w:1) + /// Proof Skipped: ParachainStaking CandidatePool (max_values: Some(1), max_size: None, mode: Measured) /// Storage: ParachainStaking Total (r:1 w:1) /// Proof Skipped: ParachainStaking Total (max_values: Some(1), max_size: None, mode: Measured) /// Storage: Balances Locks (r:1 w:1) - /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) + /// Proof: Balances Locks (max_values: None, max_size: Some(1287), added: 3762, mode: MaxEncodedLen) + /// Storage: Balances Freezes (r:1 w:0) + /// Proof: Balances Freezes (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: MaxEncodedLen) - /// Storage: ParachainStaking CandidatePool (r:1 w:1) - /// Proof Skipped: ParachainStaking CandidatePool (max_values: Some(1), max_size: None, mode: Measured) - fn execute_candidate_bond_less() -> Weight { - // Proof Size summary in bytes: - // Measured: `670` - // Estimated: `11856` - // Minimum execution time: 65_100 nanoseconds. - Weight::from_parts(66_880_000, 11856) - .saturating_add(T::DbWeight::get().reads(5)) - .saturating_add(T::DbWeight::get().writes(5)) + /// Proof: System Account (max_values: None, max_size: Some(116), added: 2591, mode: MaxEncodedLen) + /// The range of component `x` is `[1, 200]`. + fn execute_candidate_bond_less(x: u32) -> Weight { + // Proof Size summary in bytes: + // Measured: `1322 + x * (42 ±0)` + // Estimated: `4752 + x * (43 ±0)` + // Minimum execution time: 71_996_000 picoseconds. + Weight::from_parts(80_620_929, 4752) + // Standard Error: 1_363 + .saturating_add(Weight::from_parts(94_580, 0).saturating_mul(x.into())) + .saturating_add(T::DbWeight::get().reads(6_u64)) + .saturating_add(T::DbWeight::get().writes(5_u64)) + .saturating_add(Weight::from_parts(0, 43).saturating_mul(x.into())) } /// Storage: ParachainStaking CandidateInfo (r:1 w:1) /// Proof Skipped: ParachainStaking CandidateInfo (max_values: None, max_size: None, mode: Measured) fn cancel_candidate_bond_less() -> Weight { // Proof Size summary in bytes: - // Measured: `236` - // Estimated: `2711` - // Minimum execution time: 22_170 nanoseconds. - Weight::from_parts(27_290_000, 2711) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) + // Measured: `191` + // Estimated: `3656` + // Minimum execution time: 18_991_000 picoseconds. + Weight::from_parts(19_491_000, 3656) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } + fn set_candidate_bond_to_zero(x: u32) -> Weight { + // Proof Size summary in bytes: + // Measured: `1322 + x * (42 ±0)` + // Estimated: `4752 + x * (43 ±0)` + // Minimum execution time: 71_996_000 picoseconds. + Weight::from_parts(80_620_929, 4752) + // Standard Error: 1_363 + .saturating_add(Weight::from_parts(94_580, 0).saturating_mul(x.into())) + .saturating_add(T::DbWeight::get().reads(6_u64)) + .saturating_add(T::DbWeight::get().writes(5_u64)) + .saturating_add(Weight::from_parts(0, 43).saturating_mul(x.into())) } /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: MaxEncodedLen) + /// Proof: System Account (max_values: None, max_size: Some(116), added: 2591, mode: MaxEncodedLen) /// Storage: ParachainStaking DelegatorState (r:1 w:1) /// Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) /// Storage: ParachainStaking CandidateInfo (r:1 w:1) @@ -324,106 +396,105 @@ impl pallet_parachain_staking::weights::WeightInfo for /// Storage: ParachainStaking CandidatePool (r:1 w:1) /// Proof Skipped: ParachainStaking CandidatePool (max_values: Some(1), max_size: None, mode: Measured) /// Storage: Balances Locks (r:1 w:1) - /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) + /// Proof: Balances Locks (max_values: None, max_size: Some(1287), added: 3762, mode: MaxEncodedLen) + /// Storage: Balances Freezes (r:1 w:0) + /// Proof: Balances Freezes (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) /// Storage: ParachainStaking Total (r:1 w:1) /// Proof Skipped: ParachainStaking Total (max_values: Some(1), max_size: None, mode: Measured) /// The range of component `x` is `[3, 100]`. /// The range of component `y` is `[2, 300]`. fn delegate(x: u32, y: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `2374 + x * (103 ±0) + y * (52 ±0)` - // Estimated: `25391 + x * (530 ±0) + y * (265 ±0)` - // Minimum execution time: 125_490 nanoseconds. - Weight::from_parts(135_398_832, 25391) - // Standard Error: 6_396 - .saturating_add(Weight::from_parts(265_077, 0).saturating_mul(x.into())) - // Standard Error: 2_098 - .saturating_add(Weight::from_parts(138_672, 0).saturating_mul(y.into())) - .saturating_add(T::DbWeight::get().reads(7)) - .saturating_add(T::DbWeight::get().writes(7)) - .saturating_add(Weight::from_parts(0, 530).saturating_mul(x.into())) - .saturating_add(Weight::from_parts(0, 265).saturating_mul(y.into())) + // Measured: `2479 + x * (79 ±0) + y * (38 ±0)` + // Estimated: `5723 + x * (81 ±0) + y * (39 ±0)` + // Minimum execution time: 120_061_000 picoseconds. + Weight::from_parts(111_894_468, 5723) + // Standard Error: 1_320 + .saturating_add(Weight::from_parts(135_446, 0).saturating_mul(x.into())) + // Standard Error: 433 + .saturating_add(Weight::from_parts(41_110, 0).saturating_mul(y.into())) + .saturating_add(T::DbWeight::get().reads(8_u64)) + .saturating_add(T::DbWeight::get().writes(7_u64)) + .saturating_add(Weight::from_parts(0, 81).saturating_mul(x.into())) + .saturating_add(Weight::from_parts(0, 39).saturating_mul(y.into())) } /// Storage: ParachainStaking DelegatorState (r:1 w:1) /// Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) /// Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) /// Proof Skipped: ParachainStaking DelegationScheduledRequests (max_values: None, max_size: None, mode: Measured) - fn schedule_leave_delegators() -> Weight { - // Proof Size summary in bytes: - // Measured: `176` - // Estimated: `5302` - // Minimum execution time: 32_930 nanoseconds. - Weight::from_parts(33_951_000, 5302) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(2)) + /// The range of component `x` is `[0, 349]`. + fn schedule_revoke_delegation(x: u32) -> Weight { + // Proof Size summary in bytes: + // Measured: `566 + x * (42 ±0)` + // Estimated: `4012 + x * (43 ±0)` + // Minimum execution time: 25_479_000 picoseconds. + Weight::from_parts(35_344_986, 4012) + // Standard Error: 803 + .saturating_add(Weight::from_parts(60_212, 0).saturating_mul(x.into())) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(2_u64)) + .saturating_add(Weight::from_parts(0, 43).saturating_mul(x.into())) } /// Storage: ParachainStaking DelegatorState (r:1 w:1) /// Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) - /// Storage: ParachainStaking DelegationScheduledRequests (r:99 w:99) + /// Storage: ParachainStaking DelegationScheduledRequests (r:1 w:0) /// Proof Skipped: ParachainStaking DelegationScheduledRequests (max_values: None, max_size: None, mode: Measured) - /// Storage: ParachainStaking CandidateInfo (r:99 w:99) + /// Storage: System Account (r:1 w:1) + /// Proof: System Account (max_values: None, max_size: Some(116), added: 2591, mode: MaxEncodedLen) + /// Storage: Balances Locks (r:1 w:1) + /// Proof: Balances Locks (max_values: None, max_size: Some(1287), added: 3762, mode: MaxEncodedLen) + /// Storage: Balances Freezes (r:1 w:0) + /// Proof: Balances Freezes (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) + /// Storage: ParachainStaking CandidateInfo (r:1 w:1) /// Proof Skipped: ParachainStaking CandidateInfo (max_values: None, max_size: None, mode: Measured) - /// Storage: ParachainStaking TopDelegations (r:99 w:99) + /// Storage: ParachainStaking TopDelegations (r:1 w:1) /// Proof Skipped: ParachainStaking TopDelegations (max_values: None, max_size: None, mode: Measured) /// Storage: ParachainStaking CandidatePool (r:1 w:1) /// Proof Skipped: ParachainStaking CandidatePool (max_values: Some(1), max_size: None, mode: Measured) /// Storage: ParachainStaking Total (r:1 w:1) /// Proof Skipped: ParachainStaking Total (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: ParachainStaking AutoCompoundingDelegations (r:99 w:0) - /// Proof Skipped: ParachainStaking AutoCompoundingDelegations (max_values: None, max_size: None, mode: Measured) - /// Storage: Balances Locks (r:1 w:1) - /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: MaxEncodedLen) - /// The range of component `x` is `[2, 100]`. - fn execute_leave_delegators(x: u32) -> Weight { - // Proof Size summary in bytes: - // Measured: `755 + x * (558 ±0)` - // Estimated: `26542 + x * (13492 ±2)` - // Minimum execution time: 105_910 nanoseconds. - Weight::from_parts(108_141_000, 26542) - // Standard Error: 76_935 - .saturating_add(Weight::from_parts(37_566_563, 0).saturating_mul(x.into())) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().reads((4_u64).saturating_mul(x.into()))) - .saturating_add(T::DbWeight::get().writes(2)) - .saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(x.into()))) - .saturating_add(Weight::from_parts(0, 13492).saturating_mul(x.into())) + /// The range of component `x` is `[0, 349]`. + fn delegator_bond_more(x: u32) -> Weight { + // Proof Size summary in bytes: + // Measured: `1996 + x * (79 ±0)` + // Estimated: `5428 + x * (79 ±0)` + // Minimum execution time: 90_985_000 picoseconds. + Weight::from_parts(111_258_553, 5428) + // Standard Error: 1_580 + .saturating_add(Weight::from_parts(109_354, 0).saturating_mul(x.into())) + .saturating_add(T::DbWeight::get().reads(9_u64)) + .saturating_add(T::DbWeight::get().writes(7_u64)) + .saturating_add(Weight::from_parts(0, 79).saturating_mul(x.into())) } /// Storage: ParachainStaking DelegatorState (r:1 w:1) /// Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) /// Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) /// Proof Skipped: ParachainStaking DelegationScheduledRequests (max_values: None, max_size: None, mode: Measured) - fn cancel_leave_delegators() -> Weight { - // Proof Size summary in bytes: - // Measured: `298` - // Estimated: `5546` - // Minimum execution time: 36_750 nanoseconds. - Weight::from_parts(38_090_000, 5546) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(2)) + /// The range of component `x` is `[0, 349]`. + fn schedule_delegator_bond_less(x: u32) -> Weight { + // Proof Size summary in bytes: + // Measured: `566 + x * (42 ±0)` + // Estimated: `4012 + x * (43 ±0)` + // Minimum execution time: 25_784_000 picoseconds. + Weight::from_parts(35_792_924, 4012) + // Standard Error: 793 + .saturating_add(Weight::from_parts(60_874, 0).saturating_mul(x.into())) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(2_u64)) + .saturating_add(Weight::from_parts(0, 43).saturating_mul(x.into())) } /// Storage: ParachainStaking DelegatorState (r:1 w:1) /// Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) /// Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) /// Proof Skipped: ParachainStaking DelegationScheduledRequests (max_values: None, max_size: None, mode: Measured) - fn schedule_revoke_delegation() -> Weight { - // Proof Size summary in bytes: - // Measured: `176` - // Estimated: `5302` - // Minimum execution time: 27_410 nanoseconds. - Weight::from_parts(33_560_000, 5302) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(2)) - } - /// Storage: ParachainStaking DelegationScheduledRequests (r:1 w:0) - /// Proof Skipped: ParachainStaking DelegationScheduledRequests (max_values: None, max_size: None, mode: Measured) - /// Storage: ParachainStaking DelegatorState (r:1 w:1) - /// Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: MaxEncodedLen) /// Storage: Balances Locks (r:1 w:1) - /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) + /// Proof: Balances Locks (max_values: None, max_size: Some(1287), added: 3762, mode: MaxEncodedLen) + /// Storage: Balances Freezes (r:1 w:0) + /// Proof: Balances Freezes (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) + /// Storage: System Account (r:1 w:1) + /// Proof: System Account (max_values: None, max_size: Some(116), added: 2591, mode: MaxEncodedLen) + /// Storage: ParachainStaking AutoCompoundingDelegations (r:1 w:0) + /// Proof Skipped: ParachainStaking AutoCompoundingDelegations (max_values: None, max_size: None, mode: Measured) /// Storage: ParachainStaking CandidateInfo (r:1 w:1) /// Proof Skipped: ParachainStaking CandidateInfo (max_values: None, max_size: None, mode: Measured) /// Storage: ParachainStaking TopDelegations (r:1 w:1) @@ -432,54 +503,45 @@ impl pallet_parachain_staking::weights::WeightInfo for /// Proof Skipped: ParachainStaking CandidatePool (max_values: Some(1), max_size: None, mode: Measured) /// Storage: ParachainStaking Total (r:1 w:1) /// Proof Skipped: ParachainStaking Total (max_values: Some(1), max_size: None, mode: Measured) - fn delegator_bond_more() -> Weight { - // Proof Size summary in bytes: - // Measured: `1066` - // Estimated: `23667` - // Minimum execution time: 103_840 nanoseconds. - Weight::from_parts(105_370_000, 23667) - .saturating_add(T::DbWeight::get().reads(8)) - .saturating_add(T::DbWeight::get().writes(7)) - } - /// Storage: ParachainStaking DelegatorState (r:1 w:1) - /// Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) - /// Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) - /// Proof Skipped: ParachainStaking DelegationScheduledRequests (max_values: None, max_size: None, mode: Measured) - fn schedule_delegator_bond_less() -> Weight { + fn execute_revoke_delegation() -> Weight { // Proof Size summary in bytes: - // Measured: `176` - // Estimated: `5302` - // Minimum execution time: 28_110 nanoseconds. - Weight::from_parts(34_080_000, 5302) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(2)) + // Measured: `964` + // Estimated: `4752` + // Minimum execution time: 113_086_000 picoseconds. + Weight::from_parts(115_421_000, 4752) + .saturating_add(T::DbWeight::get().reads(10_u64)) + .saturating_add(T::DbWeight::get().writes(8_u64)) } /// Storage: ParachainStaking DelegatorState (r:1 w:1) /// Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) /// Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) /// Proof Skipped: ParachainStaking DelegationScheduledRequests (max_values: None, max_size: None, mode: Measured) /// Storage: Balances Locks (r:1 w:1) - /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) + /// Proof: Balances Locks (max_values: None, max_size: Some(1287), added: 3762, mode: MaxEncodedLen) + /// Storage: Balances Freezes (r:1 w:0) + /// Proof: Balances Freezes (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: MaxEncodedLen) - /// Storage: ParachainStaking AutoCompoundingDelegations (r:1 w:0) + /// Proof: System Account (max_values: None, max_size: Some(116), added: 2591, mode: MaxEncodedLen) + /// Storage: ParachainStaking AutoCompoundingDelegations (r:1 w:1) /// Proof Skipped: ParachainStaking AutoCompoundingDelegations (max_values: None, max_size: None, mode: Measured) /// Storage: ParachainStaking CandidateInfo (r:1 w:1) /// Proof Skipped: ParachainStaking CandidateInfo (max_values: None, max_size: None, mode: Measured) /// Storage: ParachainStaking TopDelegations (r:1 w:1) /// Proof Skipped: ParachainStaking TopDelegations (max_values: None, max_size: None, mode: Measured) + /// Storage: ParachainStaking BottomDelegations (r:1 w:1) + /// Proof Skipped: ParachainStaking BottomDelegations (max_values: None, max_size: None, mode: Measured) /// Storage: ParachainStaking CandidatePool (r:1 w:1) /// Proof Skipped: ParachainStaking CandidatePool (max_values: Some(1), max_size: None, mode: Measured) /// Storage: ParachainStaking Total (r:1 w:1) /// Proof Skipped: ParachainStaking Total (max_values: Some(1), max_size: None, mode: Measured) - fn execute_revoke_delegation() -> Weight { + fn execute_delegator_revoke_delegation_worst() -> Weight { // Proof Size summary in bytes: - // Measured: `1243` - // Estimated: `28447` - // Minimum execution time: 103_180 nanoseconds. - Weight::from_parts(126_781_000, 28447) - .saturating_add(T::DbWeight::get().reads(9)) - .saturating_add(T::DbWeight::get().writes(8)) + // Measured: `37308` + // Estimated: `40773` + // Minimum execution time: 179_325_000 picoseconds. + Weight::from_parts(182_100_000, 40773) + .saturating_add(T::DbWeight::get().reads(11_u64)) + .saturating_add(T::DbWeight::get().writes(10_u64)) } /// Storage: ParachainStaking DelegatorState (r:1 w:1) /// Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) @@ -488,49 +550,44 @@ impl pallet_parachain_staking::weights::WeightInfo for /// Storage: ParachainStaking CandidateInfo (r:1 w:1) /// Proof Skipped: ParachainStaking CandidateInfo (max_values: None, max_size: None, mode: Measured) /// Storage: Balances Locks (r:1 w:1) - /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) + /// Proof: Balances Locks (max_values: None, max_size: Some(1287), added: 3762, mode: MaxEncodedLen) + /// Storage: Balances Freezes (r:1 w:0) + /// Proof: Balances Freezes (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: MaxEncodedLen) + /// Proof: System Account (max_values: None, max_size: Some(116), added: 2591, mode: MaxEncodedLen) /// Storage: ParachainStaking TopDelegations (r:1 w:1) /// Proof Skipped: ParachainStaking TopDelegations (max_values: None, max_size: None, mode: Measured) + /// Storage: ParachainStaking BottomDelegations (r:1 w:1) + /// Proof Skipped: ParachainStaking BottomDelegations (max_values: None, max_size: None, mode: Measured) /// Storage: ParachainStaking CandidatePool (r:1 w:1) /// Proof Skipped: ParachainStaking CandidatePool (max_values: Some(1), max_size: None, mode: Measured) /// Storage: ParachainStaking Total (r:1 w:1) /// Proof Skipped: ParachainStaking Total (max_values: Some(1), max_size: None, mode: Measured) - fn execute_delegator_bond_less() -> Weight { + fn execute_delegator_bond_less_worst() -> Weight { // Proof Size summary in bytes: - // Measured: `1188` - // Estimated: `24399` - // Minimum execution time: 80_960 nanoseconds. - Weight::from_parts(95_831_000, 24399) - .saturating_add(T::DbWeight::get().reads(8)) - .saturating_add(T::DbWeight::get().writes(8)) + // Measured: `29930` + // Estimated: `33395` + // Minimum execution time: 150_818_000 picoseconds. + Weight::from_parts(152_294_000, 33395) + .saturating_add(T::DbWeight::get().reads(10_u64)) + .saturating_add(T::DbWeight::get().writes(9_u64)) } /// Storage: ParachainStaking DelegatorState (r:1 w:1) /// Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) /// Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) /// Proof Skipped: ParachainStaking DelegationScheduledRequests (max_values: None, max_size: None, mode: Measured) - fn cancel_revoke_delegation() -> Weight { - // Proof Size summary in bytes: - // Measured: `298` - // Estimated: `5546` - // Minimum execution time: 27_681 nanoseconds. - Weight::from_parts(34_100_000, 5546) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(2)) - } - /// Storage: ParachainStaking DelegatorState (r:1 w:1) - /// Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) - /// Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) - /// Proof Skipped: ParachainStaking DelegationScheduledRequests (max_values: None, max_size: None, mode: Measured) - fn cancel_delegator_bond_less() -> Weight { - // Proof Size summary in bytes: - // Measured: `298` - // Estimated: `5546` - // Minimum execution time: 34_470 nanoseconds. - Weight::from_parts(35_990_000, 5546) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(2)) + /// The range of component `x` is `[0, 349]`. + fn cancel_delegation_request(x: u32) -> Weight { + // Proof Size summary in bytes: + // Measured: `663 + x * (42 ±0)` + // Estimated: `4092 + x * (43 ±0)` + // Minimum execution time: 30_062_000 picoseconds. + Weight::from_parts(37_242_991, 4092) + // Standard Error: 767 + .saturating_add(Weight::from_parts(62_995, 0).saturating_mul(x.into())) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(2_u64)) + .saturating_add(Weight::from_parts(0, 43).saturating_mul(x.into())) } /// Storage: ParachainStaking Points (r:1 w:0) /// Proof Skipped: ParachainStaking Points (max_values: None, max_size: None, mode: Measured) @@ -541,19 +598,19 @@ impl pallet_parachain_staking::weights::WeightInfo for /// Storage: ParachainStaking ParachainBondInfo (r:1 w:0) /// Proof Skipped: ParachainStaking ParachainBondInfo (max_values: Some(1), max_size: None, mode: Measured) /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: MaxEncodedLen) + /// Proof: System Account (max_values: None, max_size: Some(116), added: 2591, mode: MaxEncodedLen) /// Storage: ParachainStaking CollatorCommission (r:1 w:0) /// Proof Skipped: ParachainStaking CollatorCommission (max_values: Some(1), max_size: None, mode: Measured) /// Storage: ParachainStaking DelayedPayouts (r:0 w:1) /// Proof Skipped: ParachainStaking DelayedPayouts (max_values: None, max_size: None, mode: Measured) fn prepare_staking_payouts() -> Weight { // Proof Size summary in bytes: - // Measured: `438` - // Estimated: `11670` - // Minimum execution time: 57_220 nanoseconds. - Weight::from_parts(58_131_000, 11670) - .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().writes(3)) + // Measured: `380` + // Estimated: `3845` + // Minimum execution time: 48_260_000 picoseconds. + Weight::from_parts(49_856_000, 3845) + .saturating_add(T::DbWeight::get().reads(6_u64)) + .saturating_add(T::DbWeight::get().writes(3_u64)) } /// Storage: ParachainStaking DelegationScheduledRequests (r:1 w:0) /// Proof Skipped: ParachainStaking DelegationScheduledRequests (max_values: None, max_size: None, mode: Measured) @@ -562,14 +619,14 @@ impl pallet_parachain_staking::weights::WeightInfo for /// The range of component `y` is `[0, 100]`. fn get_rewardable_delegators(y: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `118 + y * (48 ±0)` - // Estimated: `5180 + y * (96 ±0)` - // Minimum execution time: 9_370 nanoseconds. - Weight::from_parts(11_359_043, 5180) - // Standard Error: 1_783 - .saturating_add(Weight::from_parts(143_685, 0).saturating_mul(y.into())) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(Weight::from_parts(0, 96).saturating_mul(y.into())) + // Measured: `73 + y * (36 ±0)` + // Estimated: `3537 + y * (36 ±0)` + // Minimum execution time: 8_183_000 picoseconds. + Weight::from_parts(10_416_160, 3537) + // Standard Error: 780 + .saturating_add(Weight::from_parts(44_865, 0).saturating_mul(y.into())) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(Weight::from_parts(0, 36).saturating_mul(y.into())) } /// Storage: ParachainStaking TotalSelected (r:1 w:0) /// Proof Skipped: ParachainStaking TotalSelected (max_values: Some(1), max_size: None, mode: Measured) @@ -591,20 +648,61 @@ impl pallet_parachain_staking::weights::WeightInfo for /// The range of component `y` is `[0, 100]`. fn select_top_candidates(x: u32, y: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `0 + x * (5122 ±0) + y * (2400 ±0)` - // Estimated: `13898 + x * (26124 ±53) + y * (6816 ±26)` - // Minimum execution time: 37_410 nanoseconds. - Weight::from_parts(37_950_000, 13898) - // Standard Error: 177_349 - .saturating_add(Weight::from_parts(30_156_055, 0).saturating_mul(x.into())) - // Standard Error: 88_439 - .saturating_add(Weight::from_parts(2_943_699, 0).saturating_mul(y.into())) - .saturating_add(T::DbWeight::get().reads(6)) + // Measured: `0 + x * (3816 ±0) + y * (1800 ±0)` + // Estimated: `3730 + x * (3975 ±39) + y * (639 ±19)` + // Minimum execution time: 31_870_000 picoseconds. + Weight::from_parts(32_158_000, 3730) + // Standard Error: 51_554 + .saturating_add(Weight::from_parts(22_540_635, 0).saturating_mul(x.into())) + // Standard Error: 25_709 + .saturating_add(Weight::from_parts(957_745, 0).saturating_mul(y.into())) + .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().reads((4_u64).saturating_mul(x.into()))) - .saturating_add(T::DbWeight::get().writes(2)) + .saturating_add(T::DbWeight::get().writes(2_u64)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(x.into()))) - .saturating_add(Weight::from_parts(0, 26124).saturating_mul(x.into())) - .saturating_add(Weight::from_parts(0, 6816).saturating_mul(y.into())) + .saturating_add(Weight::from_parts(0, 3975).saturating_mul(x.into())) + .saturating_add(Weight::from_parts(0, 639).saturating_mul(y.into())) + } + /// Storage: System Account (r:349 w:349) + /// Proof: System Account (max_values: None, max_size: Some(116), added: 2591, mode: MaxEncodedLen) + /// Storage: ParachainStaking DelegatorState (r:349 w:349) + /// Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) + /// Storage: ParachainStaking DelegationScheduledRequests (r:1 w:0) + /// Proof Skipped: ParachainStaking DelegationScheduledRequests (max_values: None, max_size: None, mode: Measured) + /// Storage: Balances Locks (r:349 w:349) + /// Proof: Balances Locks (max_values: None, max_size: Some(1287), added: 3762, mode: MaxEncodedLen) + /// Storage: Balances Freezes (r:349 w:0) + /// Proof: Balances Freezes (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) + /// Storage: ParachainStaking CandidateInfo (r:1 w:1) + /// Proof Skipped: ParachainStaking CandidateInfo (max_values: None, max_size: None, mode: Measured) + /// Storage: ParachainStaking TopDelegations (r:1 w:1) + /// Proof Skipped: ParachainStaking TopDelegations (max_values: None, max_size: None, mode: Measured) + /// Storage: ParachainStaking CandidatePool (r:1 w:1) + /// Proof Skipped: ParachainStaking CandidatePool (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ParachainStaking Total (r:1 w:1) + /// Proof Skipped: ParachainStaking Total (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ParachainStaking BottomDelegations (r:1 w:1) + /// Proof Skipped: ParachainStaking BottomDelegations (max_values: None, max_size: None, mode: Measured) + /// The range of component `x` is `[0, 349]`. + /// The range of component `y` is `[0, 349]`. + /// The range of component `z` is `[0, 349]`. + fn pay_one_collator_reward_best(x: u32, y: u32, z: u32) -> Weight { + // Proof Size summary in bytes: + // Measured: `0 + x * (395 ±0) + y * (156 ±0) + z * (41 ±0)` + // Estimated: `125757 + x * (2591 ±19) + y * (2234 ±19) + z * (28 ±0)` + // Minimum execution time: 459_000 picoseconds. + Weight::from_parts(472_000, 125757) + // Standard Error: 685_607 + .saturating_add(Weight::from_parts(74_007_162, 0).saturating_mul(x.into())) + // Standard Error: 685_607 + .saturating_add(Weight::from_parts(43_825_857, 0).saturating_mul(y.into())) + .saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(x.into()))) + .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(y.into()))) + .saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(x.into()))) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(y.into()))) + .saturating_add(Weight::from_parts(0, 2591).saturating_mul(x.into())) + .saturating_add(Weight::from_parts(0, 2234).saturating_mul(y.into())) + .saturating_add(Weight::from_parts(0, 28).saturating_mul(z.into())) } /// Storage: ParachainStaking DelayedPayouts (r:1 w:0) /// Proof Skipped: ParachainStaking DelayedPayouts (max_values: None, max_size: None, mode: Measured) @@ -614,29 +712,33 @@ impl pallet_parachain_staking::weights::WeightInfo for /// Proof Skipped: ParachainStaking AtStake (max_values: None, max_size: None, mode: Measured) /// Storage: ParachainStaking AwardedPts (r:1 w:1) /// Proof Skipped: ParachainStaking AwardedPts (max_values: None, max_size: None, mode: Measured) + /// Storage: ParachainStaking DelegationScheduledRequests (r:1 w:0) + /// Proof Skipped: ParachainStaking DelegationScheduledRequests (max_values: None, max_size: None, mode: Measured) + /// Storage: MoonbeamOrbiters OrbiterPerRound (r:1 w:0) + /// Proof Skipped: MoonbeamOrbiters OrbiterPerRound (max_values: None, max_size: None, mode: Measured) /// Storage: System Account (r:301 w:301) - /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: MaxEncodedLen) + /// Proof: System Account (max_values: None, max_size: Some(116), added: 2591, mode: MaxEncodedLen) /// The range of component `y` is `[0, 300]`. fn pay_one_collator_reward(y: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `485 + y * (219 ±0)` - // Estimated: `16898 + y * (3483 ±0)` - // Minimum execution time: 67_041 nanoseconds. - Weight::from_parts(50_795_146, 16898) - // Standard Error: 39_567 - .saturating_add(Weight::from_parts(21_634_242, 0).saturating_mul(y.into())) - .saturating_add(T::DbWeight::get().reads(6)) + // Measured: `1208 + y * (160 ±0)` + // Estimated: `6978 + y * (2591 ±0)` + // Minimum execution time: 65_428_000 picoseconds. + Weight::from_parts(68_535_135, 6978) + // Standard Error: 6_093 + .saturating_add(Weight::from_parts(25_186_464, 0).saturating_mul(y.into())) + .saturating_add(T::DbWeight::get().reads(8_u64)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(y.into()))) - .saturating_add(T::DbWeight::get().writes(3)) + .saturating_add(T::DbWeight::get().writes(3_u64)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(y.into()))) - .saturating_add(Weight::from_parts(0, 3483).saturating_mul(y.into())) + .saturating_add(Weight::from_parts(0, 2591).saturating_mul(y.into())) } fn base_on_initialize() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_940 nanoseconds. - Weight::from_parts(2_240_000, 0) + // Minimum execution time: 2_024_000 picoseconds. + Weight::from_parts(2_168_000, 0) } /// Storage: ParachainStaking DelegatorState (r:1 w:0) /// Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) @@ -646,21 +748,21 @@ impl pallet_parachain_staking::weights::WeightInfo for /// The range of component `y` is `[0, 100]`. fn set_auto_compound(x: u32, y: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `718 + x * (34 ±0) + y * (48 ±0)` - // Estimated: `6134 + x * (70 ±0) + y * (98 ±0)` - // Minimum execution time: 45_920 nanoseconds. - Weight::from_parts(57_096_271, 6134) - // Standard Error: 899 - .saturating_add(Weight::from_parts(84_579, 0).saturating_mul(x.into())) - // Standard Error: 2_691 - .saturating_add(Weight::from_parts(64_670, 0).saturating_mul(y.into())) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(1)) - .saturating_add(Weight::from_parts(0, 70).saturating_mul(x.into())) - .saturating_add(Weight::from_parts(0, 98).saturating_mul(y.into())) + // Measured: `671 + x * (22 ±0) + y * (36 ±0)` + // Estimated: `4027 + x * (23 ±0) + y * (36 ±0)` + // Minimum execution time: 34_494_000 picoseconds. + Weight::from_parts(33_677_881, 4027) + // Standard Error: 278 + .saturating_add(Weight::from_parts(45_734, 0).saturating_mul(x.into())) + // Standard Error: 833 + .saturating_add(Weight::from_parts(39_753, 0).saturating_mul(y.into())) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + .saturating_add(Weight::from_parts(0, 23).saturating_mul(x.into())) + .saturating_add(Weight::from_parts(0, 36).saturating_mul(y.into())) } /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: MaxEncodedLen) + /// Proof: System Account (max_values: None, max_size: Some(116), added: 2591, mode: MaxEncodedLen) /// Storage: ParachainStaking DelegatorState (r:1 w:1) /// Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) /// Storage: ParachainStaking CandidateInfo (r:1 w:1) @@ -674,7 +776,9 @@ impl pallet_parachain_staking::weights::WeightInfo for /// Storage: ParachainStaking CandidatePool (r:1 w:1) /// Proof Skipped: ParachainStaking CandidatePool (max_values: Some(1), max_size: None, mode: Measured) /// Storage: Balances Locks (r:1 w:1) - /// Proof: Balances Locks (max_values: None, max_size: Some(1299), added: 3774, mode: MaxEncodedLen) + /// Proof: Balances Locks (max_values: None, max_size: Some(1287), added: 3762, mode: MaxEncodedLen) + /// Storage: Balances Freezes (r:1 w:0) + /// Proof: Balances Freezes (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) /// Storage: ParachainStaking Total (r:1 w:1) /// Proof Skipped: ParachainStaking Total (max_values: Some(1), max_size: None, mode: Measured) /// The range of component `x` is `[0, 350]`. @@ -682,31 +786,86 @@ impl pallet_parachain_staking::weights::WeightInfo for /// The range of component `z` is `[0, 99]`. fn delegate_with_auto_compound(x: u32, y: u32, z: u32) -> Weight { // Proof Size summary in bytes: - // Measured: `0 + x * (84 ±0) + y * (33 ±0) + z * (114 ±0)` - // Estimated: `127262 + x * (367 ±0) + y * (73 ±0) + z * (230 ±1)` - // Minimum execution time: 120_201 nanoseconds. - Weight::from_parts(118_425_126, 127262) - // Standard Error: 2_407 - .saturating_add(Weight::from_parts(242_420, 0).saturating_mul(x.into())) - // Standard Error: 2_413 - .saturating_add(Weight::from_parts(48_797, 0).saturating_mul(y.into())) - // Standard Error: 8_501 - .saturating_add(Weight::from_parts(281_230, 0).saturating_mul(z.into())) - .saturating_add(T::DbWeight::get().reads(8)) - .saturating_add(T::DbWeight::get().writes(8)) - .saturating_add(Weight::from_parts(0, 367).saturating_mul(x.into())) - .saturating_add(Weight::from_parts(0, 73).saturating_mul(y.into())) - .saturating_add(Weight::from_parts(0, 230).saturating_mul(z.into())) + // Measured: `0 + x * (60 ±0) + y * (21 ±0) + z * (78 ±0)` + // Estimated: `26253 + x * (44 ±0) + y * (19 ±0) + z * (76 ±1)` + // Minimum execution time: 130_103_000 picoseconds. + Weight::from_parts(116_616_415, 26253) + // Standard Error: 1_141 + .saturating_add(Weight::from_parts(117_041, 0).saturating_mul(x.into())) + // Standard Error: 4_030 + .saturating_add(Weight::from_parts(178_483, 0).saturating_mul(z.into())) + .saturating_add(T::DbWeight::get().reads(9_u64)) + .saturating_add(T::DbWeight::get().writes(8_u64)) + .saturating_add(Weight::from_parts(0, 44).saturating_mul(x.into())) + .saturating_add(Weight::from_parts(0, 19).saturating_mul(y.into())) + .saturating_add(Weight::from_parts(0, 76).saturating_mul(z.into())) + } + /// Storage: System Account (r:2 w:2) + /// Proof: System Account (max_values: None, max_size: Some(116), added: 2591, mode: MaxEncodedLen) + /// Storage: ParachainStaking DelegatorState (r:2 w:2) + /// Proof Skipped: ParachainStaking DelegatorState (max_values: None, max_size: None, mode: Measured) + /// Storage: ParachainStaking CandidateInfo (r:1 w:1) + /// Proof Skipped: ParachainStaking CandidateInfo (max_values: None, max_size: None, mode: Measured) + /// Storage: ParachainStaking AutoCompoundingDelegations (r:1 w:1) + /// Proof Skipped: ParachainStaking AutoCompoundingDelegations (max_values: None, max_size: None, mode: Measured) + /// Storage: ParachainStaking TopDelegations (r:1 w:1) + /// Proof Skipped: ParachainStaking TopDelegations (max_values: None, max_size: None, mode: Measured) + /// Storage: ParachainStaking BottomDelegations (r:1 w:1) + /// Proof Skipped: ParachainStaking BottomDelegations (max_values: None, max_size: None, mode: Measured) + /// Storage: Balances Locks (r:2 w:2) + /// Proof: Balances Locks (max_values: None, max_size: Some(1287), added: 3762, mode: MaxEncodedLen) + /// Storage: Balances Freezes (r:2 w:0) + /// Proof: Balances Freezes (max_values: None, max_size: Some(37), added: 2512, mode: MaxEncodedLen) + /// Storage: ParachainStaking DelegationScheduledRequests (r:1 w:1) + /// Proof Skipped: ParachainStaking DelegationScheduledRequests (max_values: None, max_size: None, mode: Measured) + /// Storage: ParachainStaking CandidatePool (r:1 w:1) + /// Proof Skipped: ParachainStaking CandidatePool (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ParachainStaking Total (r:1 w:1) + /// Proof Skipped: ParachainStaking Total (max_values: Some(1), max_size: None, mode: Measured) + fn delegate_with_auto_compound_worst() -> Weight { + // Proof Size summary in bytes: + // Measured: `48167` + // Estimated: `54107` + // Minimum execution time: 276_584_000 picoseconds. + Weight::from_parts(279_594_000, 54107) + .saturating_add(T::DbWeight::get().reads(15_u64)) + .saturating_add(T::DbWeight::get().writes(13_u64)) } /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(132), added: 2607, mode: MaxEncodedLen) + /// Proof: System Account (max_values: None, max_size: Some(116), added: 2591, mode: MaxEncodedLen) fn mint_collator_reward() -> Weight { // Proof Size summary in bytes: - // Measured: `139` - // Estimated: `2607` - // Minimum execution time: 23_320 nanoseconds. - Weight::from_parts(28_710_000, 2607) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) + // Measured: `128` + // Estimated: `3581` + // Minimum execution time: 28_741_000 picoseconds. + Weight::from_parts(29_344_000, 3581) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } + /// Storage: ParachainStaking EnableMarkingOffline (r:1 w:0) + /// Proof Skipped: ParachainStaking EnableMarkingOffline (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ParachainStaking TotalSelected (r:1 w:0) + /// Proof Skipped: ParachainStaking TotalSelected (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ParachainStaking SelectedCandidates (r:1 w:0) + /// Proof Skipped: ParachainStaking SelectedCandidates (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ParachainStaking AtStake (r:2 w:0) + /// Proof Skipped: ParachainStaking AtStake (max_values: None, max_size: None, mode: Measured) + /// Storage: ParachainStaking AwardedPts (r:2 w:0) + /// Proof Skipped: ParachainStaking AwardedPts (max_values: None, max_size: None, mode: Measured) + /// Storage: MoonbeamOrbiters OrbiterPerRound (r:1 w:0) + /// Proof Skipped: MoonbeamOrbiters OrbiterPerRound (max_values: None, max_size: None, mode: Measured) + /// Storage: ParachainStaking CandidateInfo (r:1 w:1) + /// Proof Skipped: ParachainStaking CandidateInfo (max_values: None, max_size: None, mode: Measured) + /// Storage: ParachainStaking CandidatePool (r:1 w:1) + /// Proof Skipped: ParachainStaking CandidatePool (max_values: Some(1), max_size: None, mode: Measured) + fn notify_inactive_collator() -> Weight { + // Proof Size summary in bytes: + // Measured: `11494` + // Estimated: `17434` + // Minimum execution time: 41_130_000 picoseconds. + Weight::from_parts(41_130_000, 0) + .saturating_add(Weight::from_parts(0, 17434)) + .saturating_add(T::DbWeight::get().reads(10_u64)) + .saturating_add(T::DbWeight::get().writes(2_u64)) } } diff --git a/runtime/zeitgeist/Cargo.toml b/runtime/zeitgeist/Cargo.toml index f2a25adea..4a3b046f8 100644 --- a/runtime/zeitgeist/Cargo.toml +++ b/runtime/zeitgeist/Cargo.toml @@ -19,11 +19,11 @@ pallet-contracts = { workspace = true } pallet-contracts-primitives = { workspace = true } pallet-democracy = { workspace = true } pallet-identity = { workspace = true } +pallet-insecure-randomness-collective-flip = { workspace = true } pallet-membership = { workspace = true } pallet-multisig = { workspace = true } pallet-preimage = { workspace = true } pallet-proxy = { workspace = true } -pallet-randomness-collective-flip = { workspace = true } pallet-scheduler = { workspace = true } pallet-timestamp = { workspace = true } pallet-transaction-payment = { workspace = true } @@ -78,14 +78,14 @@ session-keys-primitives = { workspace = true, optional = true } # Polkadot -polkadot-parachain = { workspace = true, optional = true } +polkadot-parachain-primitives = { workspace = true, optional = true } # Standalone pallet-aura = { workspace = true } pallet-grandpa = { workspace = true } sp-consensus-aura = { workspace = true } -sp-finality-grandpa = { workspace = true } +sp-consensus-grandpa = { workspace = true } # Utility cfg-if = { workspace = true } @@ -97,6 +97,7 @@ orml-asset-registry = { workspace = true, optional = true } orml-unknown-tokens = { workspace = true, optional = true } orml-xcm-support = { workspace = true, optional = true } orml-xtokens = { workspace = true, optional = true } +pallet-message-queue = { workspace = true, optional = true } pallet-xcm = { workspace = true, optional = true } polkadot-runtime = { workspace = true, optional = true } polkadot-runtime-parachains = { workspace = true, optional = true } @@ -126,6 +127,10 @@ zrml-swaps = { workspace = true } zrml-swaps-runtime-api = { workspace = true } [dev-dependencies] +env_logger = { workspace = true } +pallet-im-online = { workspace = true, features = ["default"] } +sp-authority-discovery = { workspace = true, features = ["default"] } +sp-consensus-babe = { workspace = true, features = ["default"] } sp-io = { workspace = true, features = ["default"] } test-case = { workspace = true } xcm-emulator = { workspace = true } @@ -152,7 +157,7 @@ parachain = [ "pallet-author-mapping", "pallet-author-slot-filter", "pallet-parachain-staking", - "polkadot-parachain", + "polkadot-parachain-primitives", "session-keys-primitives", # XCM @@ -163,6 +168,7 @@ parachain = [ "orml-unknown-tokens", "orml-xcm-support", "orml-xtokens", + "pallet-message-queue", "pallet-xcm", "xcm-builder", "xcm-executor", @@ -246,10 +252,11 @@ std = [ "pallet-democracy/std", "pallet-identity/std", "pallet-membership/std", + "pallet-message-queue?/std", "pallet-multisig/std", "pallet-preimage/std", "pallet-proxy/std", - "pallet-randomness-collective-flip/std", + "pallet-insecure-randomness-collective-flip/std", "pallet-scheduler/std", "pallet-timestamp/std", "pallet-transaction-payment-rpc-runtime-api/std", @@ -314,11 +321,12 @@ std = [ "pallet-aura/std", "pallet-grandpa/std", "sp-consensus-aura/std", - "sp-finality-grandpa/std", + "sp-consensus-grandpa/std", # Zeitgeist "zeitgeist-primitives/std", + "zrml-asset-router/std", "zrml-authorized/std", "zrml-court/std", "zrml-hybrid-router/std", @@ -340,12 +348,11 @@ try-runtime = [ "frame-try-runtime/try-runtime", # For every pallet in the runtime include try-runtime - # System runtime pallets "frame-support/try-runtime", "frame-system/try-runtime", "pallet-timestamp/try-runtime", - "pallet-randomness-collective-flip/try-runtime", + "pallet-insecure-randomness-collective-flip/try-runtime", "pallet-scheduler/try-runtime", "pallet-preimage/try-runtime", @@ -411,13 +418,16 @@ try-runtime = [ "cumulus-pallet-xcm?/try-runtime", "cumulus-pallet-xcmp-queue?/try-runtime", "parachain-info?/try-runtime", + + # Polkadot + "polkadot-runtime?/try-runtime", ] # Allow to print logs details (no wasm:stripped) force-debug = ["sp-debug-derive/force-debug"] [package] authors = ["Zeitgeist PM "] -edition = "2021" +edition.workspace = true name = "zeitgeist-runtime" version = "0.5.2" diff --git a/runtime/zeitgeist/src/integration_tests/xcm/genesis/mod.rs b/runtime/zeitgeist/src/integration_tests/xcm/genesis/mod.rs new file mode 100644 index 000000000..5b5ed972a --- /dev/null +++ b/runtime/zeitgeist/src/integration_tests/xcm/genesis/mod.rs @@ -0,0 +1,19 @@ +// Copyright 2024 Forecasting Technologies LTD. +// +// This file is part of Zeitgeist. +// +// Zeitgeist is free software: you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by the +// Free Software Foundation, either version 3 of the License, or (at +// your option) any later version. +// +// Zeitgeist is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Zeitgeist. If not, see . + +pub(super) mod polkadot; +pub(super) mod zeitgeist; diff --git a/runtime/zeitgeist/src/integration_tests/xcm/genesis/polkadot.rs b/runtime/zeitgeist/src/integration_tests/xcm/genesis/polkadot.rs new file mode 100644 index 000000000..99e61bc08 --- /dev/null +++ b/runtime/zeitgeist/src/integration_tests/xcm/genesis/polkadot.rs @@ -0,0 +1,135 @@ +// Copyright 2024 Forecasting Technologies LTD. +// +// Copyright (C) Parity Technologies (UK) Ltd. +// +// This file is part of Zeitgeist. +// +// Zeitgeist is free software: you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by the +// Free Software Foundation, either version 3 of the License, or (at +// your option) any later version. +// +// Zeitgeist is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Zeitgeist. If not, see . + +use crate::integration_tests::xcm::setup::{accounts, accounts::get_from_seed, dot}; +use pallet_im_online::sr25519::AuthorityId as ImOnlineId; +use polkadot_primitives::{AccountId, AssignmentId, BlockNumber, ValidatorId}; +use polkadot_runtime_parachains::configuration::HostConfiguration; +use sp_authority_discovery::AuthorityId as AuthorityDiscoveryId; +use sp_consensus_babe::AuthorityId as BabeId; +use sp_consensus_grandpa::AuthorityId as GrandpaId; +use sp_core::{sr25519, storage::Storage}; +use sp_runtime::BuildStorage; +use xcm_emulator::helpers::get_account_id_from_seed; + +const ENDOWMENT: u128 = dot(1_000_000); + +fn session_keys( + grandpa: GrandpaId, + babe: BabeId, + im_online: ImOnlineId, + para_validator: ValidatorId, + para_assignment: AssignmentId, + authority_discovery: AuthorityDiscoveryId, +) -> polkadot_runtime::SessionKeys { + polkadot_runtime::SessionKeys { + grandpa, + babe, + im_online, + para_validator, + para_assignment, + authority_discovery, + } +} + +fn get_host_config() -> HostConfiguration { + HostConfiguration { + max_upward_queue_count: 10, + max_upward_queue_size: 51200, + max_upward_message_size: 51200, + max_upward_message_num_per_candidate: 10, + max_downward_message_size: 51200, + hrmp_sender_deposit: 0, + hrmp_recipient_deposit: 0, + hrmp_channel_max_capacity: 1000, + hrmp_channel_max_message_size: 102400, + hrmp_channel_max_total_size: 102400, + hrmp_max_parachain_outbound_channels: 30, + hrmp_max_parachain_inbound_channels: 30, + ..Default::default() + } +} + +mod validators { + use super::*; + + #[allow(clippy::type_complexity)] + pub fn initial_authorities() -> Vec<( + AccountId, + AccountId, + GrandpaId, + BabeId, + ImOnlineId, + ValidatorId, + AssignmentId, + AuthorityDiscoveryId, + )> { + let seed = "Alice"; + vec![( + get_account_id_from_seed::(&format!("{}//stash", seed)), + get_account_id_from_seed::(seed), + get_from_seed::(seed), + get_from_seed::(seed), + get_from_seed::(seed), + get_from_seed::(seed), + get_from_seed::(seed), + get_from_seed::(seed), + )] + } +} + +pub(crate) fn genesis() -> Storage { + let genesis_config = polkadot_runtime::RuntimeGenesisConfig { + system: polkadot_runtime::SystemConfig { + code: polkadot_runtime::WASM_BINARY.unwrap().to_vec(), + ..Default::default() + }, + balances: polkadot_runtime::BalancesConfig { + balances: accounts::init_balances().iter().map(|k| (k.clone(), ENDOWMENT)).collect(), + }, + session: polkadot_runtime::SessionConfig { + keys: validators::initial_authorities() + .iter() + .map(|x| { + ( + x.0.clone(), + x.0.clone(), + session_keys( + x.2.clone(), + x.3.clone(), + x.4.clone(), + x.5.clone(), + x.6.clone(), + x.7.clone(), + ), + ) + }) + .collect::>(), + }, + babe: polkadot_runtime::BabeConfig { + authorities: Default::default(), + epoch_config: Some(polkadot_runtime::BABE_GENESIS_EPOCH_CONFIG), + ..Default::default() + }, + configuration: polkadot_runtime::ConfigurationConfig { config: get_host_config() }, + ..Default::default() + }; + + genesis_config.build_storage().unwrap() +} diff --git a/runtime/zeitgeist/src/integration_tests/xcm/genesis/zeitgeist.rs b/runtime/zeitgeist/src/integration_tests/xcm/genesis/zeitgeist.rs new file mode 100644 index 000000000..39cf5a6f9 --- /dev/null +++ b/runtime/zeitgeist/src/integration_tests/xcm/genesis/zeitgeist.rs @@ -0,0 +1,82 @@ +// Copyright 2024 Forecasting Technologies LTD. +// +// This file is part of Zeitgeist. +// +// Zeitgeist is free software: you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by the +// Free Software Foundation, either version 3 of the License, or (at +// your option) any later version. +// +// Zeitgeist is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Zeitgeist. If not, see . + +use crate::{ + integration_tests::xcm::setup::{ + accounts, ztg, BTC_ID, ETH_ID, FOREIGN_PARENT_ID, FOREIGN_SIBLING_ID, FOREIGN_ZTG_ID, + }, + parachain_params::MinCandidateStk, + parameters::ZeitgeistTreasuryAccount, + Asset, +}; +use nimbus_primitives::NimbusId; +use sp_core::storage::Storage; +use sp_runtime::BuildStorage; + +const ENDOWMENT: u128 = ztg(1_000_000_000_000_000); +const SAFE_XCM_VERSION: u32 = 2; + +pub(crate) fn genesis(parachain_id: u32) -> Storage { + let genesis_config = crate::RuntimeGenesisConfig { + author_mapping: crate::AuthorMappingConfig { + mappings: vec![( + accounts::get_from_seed::(accounts::ALICE), + accounts::alice(), + )], + }, + balances: crate::BalancesConfig { + balances: accounts::init_balances() + .iter() + .map(|k| (k.clone(), ztg(ENDOWMENT))) + .collect(), + }, + parachain_info: crate::ParachainInfoConfig { + parachain_id: parachain_id.into(), + ..Default::default() + }, + parachain_staking: crate::ParachainStakingConfig { + candidates: vec![(accounts::alice(), MinCandidateStk::get())], + ..Default::default() + }, + polkadot_xcm: crate::PolkadotXcmConfig { + safe_xcm_version: Some(SAFE_XCM_VERSION), + ..Default::default() + }, + system: crate::SystemConfig { + code: crate::WASM_BINARY.unwrap().to_vec(), + ..Default::default() + }, + tokens: crate::TokensConfig { + balances: accounts::init_balances() + .iter() + .chain([(ZeitgeistTreasuryAccount::get())].iter()) + .flat_map(|k| { + vec![ + (k.clone(), Asset::from(FOREIGN_PARENT_ID).try_into().unwrap(), ENDOWMENT), + (k.clone(), Asset::from(FOREIGN_SIBLING_ID).try_into().unwrap(), ENDOWMENT), + (k.clone(), Asset::from(FOREIGN_ZTG_ID).try_into().unwrap(), ENDOWMENT), + (k.clone(), Asset::from(BTC_ID).try_into().unwrap(), ENDOWMENT), + (k.clone(), Asset::from(ETH_ID).try_into().unwrap(), ENDOWMENT), + ] + }) + .collect::>(), + }, + ..Default::default() + }; + + genesis_config.build_storage().unwrap() +} diff --git a/runtime/zeitgeist/src/integration_tests/xcm/mod.rs b/runtime/zeitgeist/src/integration_tests/xcm/mod.rs index d37a62036..9ba9a1de3 100644 --- a/runtime/zeitgeist/src/integration_tests/xcm/mod.rs +++ b/runtime/zeitgeist/src/integration_tests/xcm/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2022 Forecasting Technologies LTD. +// Copyright 2022-2024 Forecasting Technologies LTD. // // This file is part of Zeitgeist. // @@ -17,6 +17,7 @@ #![cfg(all(feature = "parachain", test))] +mod genesis; mod setup; mod test_net; mod tests; diff --git a/runtime/zeitgeist/src/integration_tests/xcm/setup.rs b/runtime/zeitgeist/src/integration_tests/xcm/setup.rs index 525a2e369..3a35b1042 100644 --- a/runtime/zeitgeist/src/integration_tests/xcm/setup.rs +++ b/runtime/zeitgeist/src/integration_tests/xcm/setup.rs @@ -1,5 +1,4 @@ // Copyright 2022-2024 Forecasting Technologies LTD. -// Copyright 2021 Centrifuge Foundation (centrifuge.io). // // This file is part of Zeitgeist. // @@ -18,92 +17,70 @@ use crate::{ xcm_config::config::{general_key, zeitgeist}, - AccountId, AssetRegistry, Assets, Balance, ExistentialDeposit, Runtime, RuntimeOrigin, System, + AccountId, AssetRegistry, AssetRegistryStringLimit, Balance, ExistentialDeposit, RuntimeOrigin, }; -use frame_support::{assert_ok, traits::GenesisBuild}; +use frame_support::assert_ok; use orml_traits::asset_registry::AssetMetadata; -use sp_runtime::AccountId32; +use sp_core::{sr25519, Pair, Public}; use xcm::{ latest::{Junction::Parachain, Junctions::X2, MultiLocation}, VersionedMultiLocation, }; +use xcm_emulator::helpers::get_account_id_from_seed; use zeitgeist_primitives::types::{CustomMetadata, XcmAsset}; -pub(super) struct ExtBuilder { - balances: Vec<(AccountId, Assets, Balance)>, - parachain_id: u32, -} - -impl Default for ExtBuilder { - fn default() -> Self { - Self { balances: vec![], parachain_id: zeitgeist::ID } +pub(super) mod accounts { + use super::*; + pub const ALICE: &str = "Alice"; + pub const BOB: &str = "Bob"; + pub const CHARLIE: &str = "Charlie"; + pub const DAVE: &str = "Dave"; + pub const EVE: &str = "Eve"; + pub const FERDIE: &str = "Ferdie"; + pub const ALICE_STASH: &str = "Alice//stash"; + pub const BOB_STASH: &str = "Bob//stash"; + pub const CHARLIE_STASH: &str = "Charlie//stash"; + pub const DAVE_STASH: &str = "Dave//stash"; + pub const EVE_STASH: &str = "Eve//stash"; + pub const FERDIE_STASH: &str = "Ferdie//stash"; + + pub fn init_balances() -> Vec { + vec![ + get_account_id_from_seed::(ALICE), + get_account_id_from_seed::(BOB), + get_account_id_from_seed::(CHARLIE), + get_account_id_from_seed::(DAVE), + get_account_id_from_seed::(EVE), + get_account_id_from_seed::(FERDIE), + get_account_id_from_seed::(ALICE_STASH), + get_account_id_from_seed::(BOB_STASH), + get_account_id_from_seed::(CHARLIE_STASH), + get_account_id_from_seed::(DAVE_STASH), + get_account_id_from_seed::(EVE_STASH), + get_account_id_from_seed::(FERDIE_STASH), + ] } -} -impl ExtBuilder { - pub fn set_balances(mut self, balances: Vec<(AccountId, Assets, Balance)>) -> Self { - self.balances = balances; - self + pub fn alice() -> AccountId { + get_account_id_from_seed::(ALICE) } - pub fn set_parachain_id(mut self, parachain_id: u32) -> Self { - self.parachain_id = parachain_id; - self + pub fn bob() -> AccountId { + get_account_id_from_seed::(BOB) } - pub fn build(self) -> sp_io::TestExternalities { - let mut t = frame_system::GenesisConfig::default().build_storage::().unwrap(); - let native_currency_id = Assets::Ztg; - pallet_balances::GenesisConfig:: { - balances: self - .balances - .clone() - .into_iter() - .filter(|(_, currency_id, _)| *currency_id == native_currency_id) - .map(|(account_id, _, initial_balance)| (account_id, initial_balance)) - .collect::>(), - } - .assimilate_storage(&mut t) - .unwrap(); - - orml_tokens::GenesisConfig:: { - balances: self - .balances - .into_iter() - .filter(|(_, currency_id, _)| *currency_id != native_currency_id) - .map(|(account_id, currency_id, initial_balance)| { - (account_id, currency_id.try_into().unwrap(), initial_balance) - }) - .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)); - ext + /// Helper function to generate a crypto pair from seed + pub fn get_from_seed(seed: &str) -> ::Public { + TPublic::Pair::from_string(&format!("//{}", seed), None) + .expect("static values are valid; qed") + .public() } } -/// Accounts -pub const ALICE: AccountId32 = AccountId32::new([0u8; 32]); -pub const BOB: AccountId32 = AccountId32::new([1u8; 32]); - /// A PARA ID used for a sibling parachain. /// It must be one that doesn't collide with any other in use. pub const PARA_ID_SIBLING: u32 = 3000; +pub const PARA_ID_ZEITGEIST: u32 = zeitgeist::ID; /// IDs that are used to represent tokens from other chains pub const FOREIGN_ZTG_ID: XcmAsset = XcmAsset::ForeignAsset(0); @@ -154,7 +131,7 @@ pub(super) const fn adjusted_balance(foreign_base: Balance, amount: Balance) -> // Multilocations that are used to represent tokens from other chains #[inline] pub(super) fn foreign_ztg_multilocation() -> MultiLocation { - MultiLocation::new(1, X2(Parachain(zeitgeist::ID), general_key(zeitgeist::KEY))) + MultiLocation::new(1, X2(Parachain(PARA_ID_ZEITGEIST), general_key(zeitgeist::KEY))) } #[inline] @@ -169,10 +146,10 @@ pub(super) fn foreign_parent_multilocation() -> MultiLocation { pub(super) fn register_foreign_ztg(additional_meta: Option) { // Register ZTG as foreign asset. - let meta: AssetMetadata = AssetMetadata { + let meta: AssetMetadata = AssetMetadata { decimals: 10, - name: "Zeitgeist".into(), - symbol: "ZTG".into(), + name: "Zeitgeist".as_bytes().to_vec().try_into().unwrap(), + symbol: "ZTG".as_bytes().to_vec().try_into().unwrap(), existential_deposit: ExistentialDeposit::get(), location: Some(VersionedMultiLocation::V3(foreign_ztg_multilocation())), additional: additional_meta.unwrap_or_default(), @@ -182,10 +159,10 @@ pub(super) fn register_foreign_ztg(additional_meta: Option) { } pub(super) fn register_btc(additional_meta: Option) { - let meta: AssetMetadata = AssetMetadata { + let meta: AssetMetadata = AssetMetadata { decimals: 8, - name: "Bitcoin".into(), - symbol: "BTC".into(), + name: "Bitcoin".as_bytes().to_vec().try_into().unwrap(), + symbol: "BTC".as_bytes().to_vec().try_into().unwrap(), existential_deposit: ExistentialDeposit::get(), location: Some(VersionedMultiLocation::V3(foreign_sibling_multilocation())), additional: additional_meta.unwrap_or_default(), @@ -195,10 +172,10 @@ pub(super) fn register_btc(additional_meta: Option) { } pub(super) fn register_eth(additional_meta: Option) { - let meta: AssetMetadata = AssetMetadata { + let meta: AssetMetadata = AssetMetadata { decimals: 18, - name: "Ethereum".into(), - symbol: "ETH".into(), + name: "Ethereum".as_bytes().to_vec().try_into().unwrap(), + symbol: "ETH".as_bytes().to_vec().try_into().unwrap(), existential_deposit: ExistentialDeposit::get(), location: Some(VersionedMultiLocation::V3(foreign_sibling_multilocation())), additional: additional_meta.unwrap_or_default(), @@ -209,10 +186,10 @@ pub(super) fn register_eth(additional_meta: Option) { pub(super) fn register_foreign_sibling(additional_meta: Option) { // Register native Sibling token as foreign asset. - let meta: AssetMetadata = AssetMetadata { + let meta: AssetMetadata = AssetMetadata { decimals: 10, - name: "Sibling".into(), - symbol: "SBL".into(), + name: "Sibling".as_bytes().to_vec().try_into().unwrap(), + symbol: "SBL".as_bytes().to_vec().try_into().unwrap(), existential_deposit: ExistentialDeposit::get(), location: Some(VersionedMultiLocation::V3(foreign_sibling_multilocation())), additional: additional_meta.unwrap_or_default(), @@ -227,10 +204,10 @@ pub(super) fn register_foreign_sibling(additional_meta: Option) pub(super) fn register_foreign_parent(additional_meta: Option) { // Register dot as foreign asset in the sibling parachain - let meta: AssetMetadata = AssetMetadata { + let meta: AssetMetadata = AssetMetadata { decimals: 10, - name: "Polkadot".into(), - symbol: "DOT".into(), + name: "Polkadot".as_bytes().to_vec().try_into().unwrap(), + symbol: "DOT".as_bytes().to_vec().try_into().unwrap(), existential_deposit: 10_000_000_000, // 1 location: Some(VersionedMultiLocation::V3(foreign_parent_multilocation())), additional: additional_meta.unwrap_or_default(), @@ -246,12 +223,12 @@ pub(super) fn sibling_parachain_account() -> AccountId { #[inline] pub(super) fn zeitgeist_parachain_account() -> AccountId { - parachain_account(zeitgeist::ID) + parachain_account(PARA_ID_ZEITGEIST) } #[inline] fn parachain_account(id: u32) -> AccountId { use sp_runtime::traits::AccountIdConversion; - polkadot_parachain::primitives::Sibling::from(id).into_account_truncating() + polkadot_parachain_primitives::primitives::Sibling::from(id).into_account_truncating() } diff --git a/runtime/zeitgeist/src/integration_tests/xcm/test_net.rs b/runtime/zeitgeist/src/integration_tests/xcm/test_net.rs index c8f212d12..a70900558 100644 --- a/runtime/zeitgeist/src/integration_tests/xcm/test_net.rs +++ b/runtime/zeitgeist/src/integration_tests/xcm/test_net.rs @@ -1,5 +1,4 @@ // Copyright 2022-2024 Forecasting Technologies LTD. -// Copyright 2021-2022 Centrifuge GmbH (centrifuge.io). // // This file is part of Zeitgeist. // @@ -16,131 +15,79 @@ // You should have received a copy of the GNU General Public License // along with Zeitgeist. If not, see . +use super::{ + genesis::{polkadot, zeitgeist}, + setup::{PARA_ID_SIBLING, PARA_ID_ZEITGEIST}, +}; use crate::{ - parameters::ZeitgeistTreasuryAccount, xcm_config::config::zeitgeist, Assets, DmpQueue, Runtime, - RuntimeOrigin, XcmpQueue, + xcm_config::config::LocationToAccountId, AssetManager, Balances, DmpQueue, ParachainInfo, + PolkadotXcm, XTokens, XcmpQueue, +}; +use xcm_emulator::{ + decl_test_networks, decl_test_parachains, decl_test_relay_chains, DefaultMessageProcessor, }; -use frame_support::{traits::GenesisBuild, weights::Weight}; -use polkadot_primitives::v2::{BlockNumber, MAX_CODE_SIZE, MAX_POV_SIZE}; -use polkadot_runtime_parachains::configuration::HostConfiguration; -use xcm_emulator::{decl_test_network, decl_test_parachain, decl_test_relay_chain}; - -use super::setup::{dot, ztg, ExtBuilder, ALICE, FOREIGN_PARENT_ID, PARA_ID_SIBLING}; -decl_test_relay_chain! { - pub struct PolkadotNet { - Runtime = polkadot_runtime::Runtime, - XcmConfig = polkadot_runtime::xcm_config::XcmConfig, - new_ext = relay_ext(), - } +decl_test_relay_chains! { + #[api_version(5)] + pub struct Polkadot { + genesis = polkadot::genesis(), + on_init = (), + runtime = polkadot_runtime, + core = { + MessageProcessor: DefaultMessageProcessor, + SovereignAccountOf: polkadot_runtime::xcm_config::SovereignAccountOf, + }, + pallets = { + XcmPallet: polkadot_runtime::XcmPallet, + Balances: polkadot_runtime::Balances, + } + }, } -decl_test_parachain! { +decl_test_parachains! { pub struct Zeitgeist { - Runtime = Runtime, - RuntimeOrigin = RuntimeOrigin, - XcmpMessageHandler = XcmpQueue, - DmpMessageHandler = DmpQueue, - new_ext = para_ext(zeitgeist::ID), - } -} - -decl_test_parachain! { + genesis = zeitgeist::genesis(PARA_ID_ZEITGEIST), + on_init = (), + runtime = crate, + core = { + XcmpMessageHandler: XcmpQueue, + DmpMessageHandler: DmpQueue, + LocationToAccountId: LocationToAccountId, + ParachainInfo: ParachainInfo, + }, + pallets = { + PolkadotXcm: PolkadotXcm, + AssetManager: AssetManager, + Balances: Balances, + XTokens: XTokens, + } + }, pub struct Sibling { - Runtime = Runtime, - RuntimeOrigin = RuntimeOrigin, - XcmpMessageHandler = XcmpQueue, - DmpMessageHandler = DmpQueue, - new_ext = para_ext(PARA_ID_SIBLING), - } + genesis = zeitgeist::genesis(PARA_ID_SIBLING), + on_init = (), + runtime = crate, + core = { + XcmpMessageHandler: XcmpQueue, + DmpMessageHandler: DmpQueue, + LocationToAccountId: LocationToAccountId, + ParachainInfo: ParachainInfo, + }, + pallets = { + PolkadotXcm: PolkadotXcm, + AssetManager: AssetManager, + Balances: Balances, + XTokens: XTokens, + } + }, } -decl_test_network! { +decl_test_networks! { pub struct TestNet { - relay_chain = PolkadotNet, + relay_chain = Polkadot, parachains = vec![ - // N.B: Ideally, we could use the defined para id constants but doing so - // fails with: "error: arbitrary expressions aren't allowed in patterns" - - // Be sure to use `xcm_config::config::zeitgeist::ID` - (2092, Zeitgeist), - // Be sure to use `PARA_ID_SIBLING` - (3000, Sibling), + Zeitgeist, + Sibling, ], - } -} - -pub(super) fn relay_ext() -> sp_io::TestExternalities { - use polkadot_runtime::{Runtime, System}; - - let mut t = frame_system::GenesisConfig::default().build_storage::().unwrap(); - - pallet_balances::GenesisConfig:: { balances: vec![(ALICE, dot(2002))] } - .assimilate_storage(&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(2) }, - &mut t, - ) - .unwrap(); - - let mut ext = sp_io::TestExternalities::new(t); - ext.execute_with(|| System::set_block_number(1)); - ext -} - -pub(super) fn para_ext(parachain_id: u32) -> sp_io::TestExternalities { - ExtBuilder::default() - .set_balances(vec![ - (ALICE, Assets::Ztg, ztg(10)), - (ALICE, FOREIGN_PARENT_ID.into(), dot(10)), - (ZeitgeistTreasuryAccount::get(), FOREIGN_PARENT_ID.into(), dot(10)), - ]) - .set_parachain_id(parachain_id) - .build() -} - -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_ref_time(4_u64 * 1_000_000_000_u64), - max_upward_message_size: 50 * 1024, - max_upward_message_num_per_candidate: 5, - hrmp_sender_deposit: 0, - hrmp_recipient_deposit: 0, - hrmp_channel_max_capacity: 8, - hrmp_channel_max_total_size: 8 * 1024, - hrmp_max_parachain_inbound_channels: 4, - hrmp_max_parathread_inbound_channels: 4, - hrmp_channel_max_message_size: 1024 * 1024, - 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() + bridge = () } } diff --git a/runtime/zeitgeist/src/integration_tests/xcm/tests/currency_id_convert.rs b/runtime/zeitgeist/src/integration_tests/xcm/tests/currency_id_convert.rs index d23021334..38d443dee 100644 --- a/runtime/zeitgeist/src/integration_tests/xcm/tests/currency_id_convert.rs +++ b/runtime/zeitgeist/src/integration_tests/xcm/tests/currency_id_convert.rs @@ -21,7 +21,7 @@ use crate::{ setup::{ foreign_parent_multilocation, foreign_sibling_multilocation, foreign_ztg_multilocation, register_foreign_parent, register_foreign_sibling, FOREIGN_PARENT_ID, - FOREIGN_SIBLING_ID, + FOREIGN_SIBLING_ID, PARA_ID_ZEITGEIST, }, test_net::Zeitgeist, }, @@ -29,28 +29,32 @@ use crate::{ Assets, CustomMetadata, ScalarPosition, XcmAsset, }; use core::fmt::Debug; -use frame_support::assert_err; -use sp_runtime::traits::Convert as C2; +use sp_runtime::traits::{Convert, MaybeEquivalence}; use test_case::test_case; use xcm::latest::{Junction::*, Junctions::*, MultiLocation}; use xcm_emulator::TestExt; -use xcm_executor::traits::Convert as C1; fn convert_common_native(expected: T) where T: Copy + Debug + PartialEq, - AssetConvert: C1 + C2>, + AssetConvert: MaybeEquivalence + Convert>, { assert_eq!(zeitgeist::KEY.to_vec(), vec![0, 1]); // The way Ztg is represented relative within the Zeitgeist runtime let ztg_location_inner: MultiLocation = MultiLocation::new(0, X1(general_key(zeitgeist::KEY))); - assert_eq!(>::convert(ztg_location_inner), Ok(expected)); + assert_eq!( + >::convert(&ztg_location_inner), + Some(expected) + ); // The canonical way Ztg is represented out in the wild Zeitgeist::execute_with(|| { - assert_eq!(>::convert(expected), Some(foreign_ztg_multilocation())) + assert_eq!( + >::convert(expected), + Some(foreign_ztg_multilocation()) + ) }); } @@ -60,15 +64,18 @@ fn convert_common_non_native( register: fn(Option), ) where T: Copy + Debug + PartialEq, - AssetConvert: C1 + C2>, + AssetConvert: MaybeEquivalence + Convert>, { Zeitgeist::execute_with(|| { - assert_err!(>::convert(multilocation), multilocation); - assert_eq!(>::convert(expected), None); + assert_eq!(>::convert(&multilocation), None); + assert_eq!(>::convert(expected), None); // Register parent as foreign asset in the Zeitgeist parachain register(None); - assert_eq!(>::convert(multilocation), Ok(expected)); - assert_eq!(>::convert(expected), Some(multilocation)); + assert_eq!( + >::convert(&multilocation), + Some(expected) + ); + assert_eq!(>::convert(expected), Some(multilocation)); }); } @@ -121,10 +128,12 @@ fn convert_any_registered_sibling_multilocation_xcm_assets() { #[test] fn convert_unkown_multilocation() { let unknown_location: MultiLocation = - MultiLocation::new(1, X2(Parachain(zeitgeist::ID), general_key(&[42]))); + MultiLocation::new(1, X2(Parachain(PARA_ID_ZEITGEIST), general_key(&[42]))); Zeitgeist::execute_with(|| { - assert!(>::convert(unknown_location).is_err()); + assert!( + >::convert(&unknown_location).is_none() + ); }); } @@ -163,7 +172,7 @@ fn convert_unkown_multilocation() { fn convert_unsupported_asset(asset: T) where T: Copy + Debug + PartialEq, - AssetConvert: C2>, + AssetConvert: Convert>, { - Zeitgeist::execute_with(|| assert_eq!(>::convert(asset), None)); + Zeitgeist::execute_with(|| assert_eq!(>::convert(asset), None)); } diff --git a/runtime/zeitgeist/src/integration_tests/xcm/tests/transfers.rs b/runtime/zeitgeist/src/integration_tests/xcm/tests/transfers.rs index bb5d66e3a..834120424 100644 --- a/runtime/zeitgeist/src/integration_tests/xcm/tests/transfers.rs +++ b/runtime/zeitgeist/src/integration_tests/xcm/tests/transfers.rs @@ -19,21 +19,21 @@ use crate::{ integration_tests::xcm::{ setup::{ + accounts::{alice, bob}, adjusted_balance, btc, dot, eth, register_btc, register_eth, register_foreign_parent, register_foreign_ztg, sibling_parachain_account, zeitgeist_parachain_account, ztg, - ALICE, BOB, BTC_ID, ETH_ID, FOREIGN_PARENT_ID, FOREIGN_ZTG_ID, PARA_ID_SIBLING, + BTC_ID, ETH_ID, FOREIGN_PARENT_ID, FOREIGN_ZTG_ID, PARA_ID_SIBLING, PARA_ID_ZEITGEIST, }, - test_net::{PolkadotNet, Sibling, TestNet, Zeitgeist}, + test_net::{Polkadot, Sibling, Zeitgeist}, }, - xcm_config::{config::zeitgeist, fees::default_per_second}, - AssetManager, AssetRegistry, Balance, Balances, RuntimeOrigin, XTokens, - ZeitgeistTreasuryAccount, + xcm_config::fees::default_per_second, + AssetManager, Balance, Balances, RuntimeOrigin, XTokens, ZeitgeistTreasuryAccount, }; -use frame_support::assert_ok; +use frame_support::{assert_ok, traits::tokens::fungible::Mutate}; use orml_traits::MultiCurrency; use xcm::latest::{Junction, Junction::*, Junctions::*, MultiLocation, WeightLimit}; -use xcm_emulator::TestExt; +use xcm_emulator::{RelayChain, TestExt}; use zeitgeist_primitives::{ constants::{BalanceFractionalDecimals, BASE}, types::{CustomMetadata, XcmAsset, XcmMetadata}, @@ -41,24 +41,23 @@ use zeitgeist_primitives::{ #[test] fn transfer_ztg_to_sibling() { - TestNet::reset(); - - let alice_initial_balance = ztg(10); + let mut alice_initial_balance = 0; + let mut bob_initial_balance = 0; let transfer_amount = ztg(5); let mut treasury_initial_balance = 0; Sibling::execute_with(|| { treasury_initial_balance = AssetManager::free_balance(FOREIGN_ZTG_ID.into(), &ZeitgeistTreasuryAccount::get()); - assert_eq!(AssetManager::free_balance(FOREIGN_ZTG_ID.into(), &BOB), 0); + bob_initial_balance = AssetManager::free_balance(FOREIGN_ZTG_ID.into(), &bob()); register_foreign_ztg(None); }); Zeitgeist::execute_with(|| { - assert_eq!(Balances::free_balance(&ALICE), alice_initial_balance); + alice_initial_balance = Balances::free_balance(alice()); assert_eq!(Balances::free_balance(sibling_parachain_account()), 0); assert_ok!(XTokens::transfer( - RuntimeOrigin::signed(ALICE), + RuntimeOrigin::signed(alice()), XcmAsset::Ztg, transfer_amount, Box::new( @@ -66,7 +65,7 @@ fn transfer_ztg_to_sibling() { 1, X2( Parachain(PARA_ID_SIBLING), - Junction::AccountId32 { network: None, id: BOB.into() } + Junction::AccountId32 { network: None, id: bob().into() } ) ) .into() @@ -75,92 +74,140 @@ fn transfer_ztg_to_sibling() { )); // Confirm that Alice's balance is initial_balance - amount_transferred - assert_eq!(Balances::free_balance(&ALICE), alice_initial_balance - transfer_amount); - + assert_eq!(Balances::free_balance(alice()), alice_initial_balance - transfer_amount); // Verify that the amount transferred is now part of the sibling account here assert_eq!(Balances::free_balance(sibling_parachain_account()), transfer_amount); }); Sibling::execute_with(|| { - let current_balance = AssetManager::free_balance(FOREIGN_ZTG_ID.into(), &BOB); - - // Verify that BOB now has (amount transferred - fee) - assert_eq!(current_balance, transfer_amount - ztg_fee()); + let current_balance = AssetManager::free_balance(FOREIGN_ZTG_ID.into(), &bob()); + let bob_expected = bob_initial_balance + transfer_amount - ztg_fee(); + let treasury_expected = treasury_initial_balance + ztg_fee(); + // Verify that bob() now has (amount transferred - fee) + assert_eq!(current_balance, bob_expected); // Verify that fees (of foreign currency) have been put into treasury assert_eq!( AssetManager::free_balance(FOREIGN_ZTG_ID.into(), &ZeitgeistTreasuryAccount::get()), - treasury_initial_balance + ztg_fee() + treasury_expected ) }); } #[test] -fn transfer_ztg_sibling_to_zeitgeist() { - TestNet::reset(); +fn transfer_ztg_to_sibling_with_custom_fee() { + // 10x fee factor, so ZTG has 10x the worth of sibling currency. + let fee_factor = 100_000_000_000; + let transfer_amount = ztg(5); + let mut treasury_initial_balance = 0; + let mut bob_initial_balance = 0; + + Sibling::execute_with(|| { + treasury_initial_balance = + AssetManager::free_balance(FOREIGN_ZTG_ID.into(), &ZeitgeistTreasuryAccount::get()); + bob_initial_balance = AssetManager::free_balance(FOREIGN_ZTG_ID.into(), &bob()); + let custom_metadata = CustomMetadata { + xcm: XcmMetadata { fee_factor: Some(fee_factor) }, + ..Default::default() + }; + register_foreign_ztg(Some(custom_metadata)); + }); - // In order to be able to transfer ZTG from Sibling to Zeitgeist, we need to first send - // ZTG from Zeitgeist to Sibling, or else it fails since it'd be like Sibling had minted - // ZTG on their side. - transfer_ztg_to_sibling(); + Zeitgeist::execute_with(|| { + let alice_initial_balance = Balances::free_balance(alice()); + assert_eq!(Balances::free_balance(sibling_parachain_account()), 0); + assert_ok!(XTokens::transfer( + RuntimeOrigin::signed(alice()), + XcmAsset::Ztg, + transfer_amount, + Box::new( + MultiLocation::new( + 1, + X2( + Parachain(PARA_ID_SIBLING), + Junction::AccountId32 { network: None, id: bob().into() } + ) + ) + .into() + ), + WeightLimit::Limited(4_000_000_000.into()), + )); + // Confirm that Alice's balance is initial_balance - amount_transferred + assert_eq!(Balances::free_balance(alice()), alice_initial_balance - transfer_amount); + // Verify that the amount transferred is now part of the sibling account here + assert_eq!(Balances::free_balance(sibling_parachain_account()), transfer_amount); + }); + + Sibling::execute_with(|| { + let current_balance = AssetManager::free_balance(FOREIGN_ZTG_ID.into(), &bob()); + let custom_fee = ztg_fee() * fee_factor / BASE; + let bob_expected = bob_initial_balance + transfer_amount - custom_fee; + let treasury_expected = treasury_initial_balance + custom_fee; + + // Verify that bob() now has (amount transferred - fee) + assert_eq!(current_balance, bob_expected); + // Verify that fees (of foreign currency) have been put into treasury + assert_eq!( + AssetManager::free_balance(FOREIGN_ZTG_ID.into(), &ZeitgeistTreasuryAccount::get()), + treasury_expected + ) + }); +} - let alice_initial_balance = ztg(5); - let bob_initial_balance = ztg(5) - ztg_fee(); +#[test] +fn transfer_ztg_sibling_to_zeitgeist() { + let mut alice_initial_balance = 0; let mut treasury_initial_balance = 0; - let sibling_sovereign_initial_balance = ztg(5); let transfer_amount = ztg(1); - // Note: This asset was registered in `transfer_ztg_to_sibling` + let sibling_initial_balance = transfer_amount; Zeitgeist::execute_with(|| { treasury_initial_balance = Balances::free_balance(ZeitgeistTreasuryAccount::get()); - - assert_eq!(Balances::free_balance(&ALICE), alice_initial_balance); + alice_initial_balance = Balances::free_balance(alice()); assert_eq!( - Balances::free_balance(sibling_parachain_account()), - sibling_sovereign_initial_balance + Balances::set_balance(&sibling_parachain_account(), sibling_initial_balance), + sibling_initial_balance ); }); Sibling::execute_with(|| { - assert_eq!(Balances::free_balance(zeitgeist_parachain_account()), 0); - assert_eq!(AssetManager::free_balance(FOREIGN_ZTG_ID.into(), &BOB), bob_initial_balance); + register_foreign_ztg(None); + let bob_initial_balance = AssetManager::free_balance(FOREIGN_ZTG_ID.into(), &bob()); + assert_ok!(XTokens::transfer( - RuntimeOrigin::signed(BOB), + RuntimeOrigin::signed(bob()), FOREIGN_ZTG_ID, transfer_amount, Box::new( MultiLocation::new( 1, X2( - Parachain(zeitgeist::ID), - Junction::AccountId32 { network: None, id: ALICE.into() } + Parachain(PARA_ID_ZEITGEIST), + Junction::AccountId32 { network: None, id: alice().into() } ) ) .into() ), WeightLimit::Limited(4_000_000_000.into()), )); - // Confirm that Bobs's balance is initial balance - amount transferred assert_eq!( - AssetManager::free_balance(FOREIGN_ZTG_ID.into(), &BOB), + AssetManager::free_balance(FOREIGN_ZTG_ID.into(), &bob()), bob_initial_balance - transfer_amount ); }); Zeitgeist::execute_with(|| { - // Verify that ALICE now has initial balance + amount transferred - fee + // Verify that alice() now has initial balance + amount transferred - fee assert_eq!( - Balances::free_balance(&ALICE), + Balances::free_balance(alice()), alice_initial_balance + transfer_amount - ztg_fee(), ); - // Verify that the reserve has been adjusted properly assert_eq!( Balances::free_balance(sibling_parachain_account()), - sibling_sovereign_initial_balance - transfer_amount + sibling_initial_balance - transfer_amount ); - // Verify that fees (of native currency) have been put into treasury assert_eq!( Balances::free_balance(ZeitgeistTreasuryAccount::get()), @@ -171,11 +218,7 @@ fn transfer_ztg_sibling_to_zeitgeist() { #[test] fn transfer_btc_sibling_to_zeitgeist() { - TestNet::reset(); - - let sibling_alice_initial_balance = ztg(10); - let zeitgeist_alice_initial_balance = btc(0); - let initial_sovereign_balance = btc(100); + let mut zeitgeist_alice_initial_balance = 0; let transfer_amount = btc(100); let mut treasury_initial_balance = 0; @@ -183,23 +226,20 @@ fn transfer_btc_sibling_to_zeitgeist() { register_btc(None); treasury_initial_balance = AssetManager::free_balance(BTC_ID.into(), &ZeitgeistTreasuryAccount::get()); - assert_eq!( - AssetManager::free_balance(BTC_ID.into(), &ALICE), - zeitgeist_alice_initial_balance, - ); + zeitgeist_alice_initial_balance = AssetManager::free_balance(BTC_ID.into(), &alice()); }); Sibling::execute_with(|| { - assert_eq!(Balances::free_balance(&ALICE), sibling_alice_initial_balance); + let alice_initial_balance = Balances::free_balance(alice()); + let initial_sovereign_balance = transfer_amount; + // Set the sovereign balance such that it is not subject to dust collection - assert_ok!(Balances::set_balance( - RuntimeOrigin::root(), - zeitgeist_parachain_account().into(), - initial_sovereign_balance, - 0 - )); + assert_eq!( + Balances::set_balance(&zeitgeist_parachain_account(), initial_sovereign_balance,), + initial_sovereign_balance + ); assert_ok!(XTokens::transfer( - RuntimeOrigin::signed(ALICE), + RuntimeOrigin::signed(alice()), // Target chain will interpret XcmAsset::Ztg as BTC in this context. XcmAsset::Ztg, transfer_amount, @@ -207,18 +247,16 @@ fn transfer_btc_sibling_to_zeitgeist() { MultiLocation::new( 1, X2( - Parachain(zeitgeist::ID), - Junction::AccountId32 { network: None, id: ALICE.into() } + Parachain(PARA_ID_ZEITGEIST), + Junction::AccountId32 { network: None, id: alice().into() } ) ) .into() ), WeightLimit::Limited(4_000_000_000.into()), )); - // Confirm that Alice's balance is initial_balance - amount_transferred - assert_eq!(Balances::free_balance(&ALICE), sibling_alice_initial_balance - transfer_amount); - + assert_eq!(Balances::free_balance(alice()), alice_initial_balance - transfer_amount); // Verify that the amount transferred is now part of the zeitgeist account here assert_eq!( Balances::free_balance(zeitgeist_parachain_account()), @@ -229,39 +267,43 @@ fn transfer_btc_sibling_to_zeitgeist() { Zeitgeist::execute_with(|| { let expected = transfer_amount - btc_fee(); let expected_adjusted = adjusted_balance(btc(1), expected); + let expected_treasury = treasury_initial_balance + adjusted_balance(btc(1), btc_fee()); // Verify that remote Alice now has initial balance + amount transferred - fee assert_eq!( - AssetManager::free_balance(BTC_ID.into(), &ALICE), + AssetManager::free_balance(BTC_ID.into(), &alice()), zeitgeist_alice_initial_balance + expected_adjusted, ); - // Verify that fees (of foreign currency) have been put into treasury assert_eq!( AssetManager::free_balance(BTC_ID.into(), &ZeitgeistTreasuryAccount::get()), // Align decimal fractional places - treasury_initial_balance + adjusted_balance(btc(1), btc_fee()) + expected_treasury ) }); } #[test] fn transfer_btc_zeitgeist_to_sibling() { - TestNet::reset(); - - let transfer_amount = btc(100) - btc_fee(); - let initial_sovereign_balance = 2 * btc(100); - let sibling_bob_initial_balance = btc(0); - - transfer_btc_sibling_to_zeitgeist(); + let transfer_amount = btc(100); + let initial_sovereign_balance = transfer_amount; + let mut bob_initial_balance = 0; Sibling::execute_with(|| { - assert_eq!(AssetManager::free_balance(BTC_ID.into(), &BOB), sibling_bob_initial_balance,); + bob_initial_balance = Balances::free_balance(bob()); + // Set the sovereign balance such that it is not subject to dust collection + assert_eq!( + Balances::set_balance(&zeitgeist_parachain_account(), initial_sovereign_balance,), + initial_sovereign_balance + ); }); Zeitgeist::execute_with(|| { + register_btc(None); + let alice_initial_balance = AssetManager::free_balance(BTC_ID.into(), &alice()); + assert_ok!(XTokens::transfer( - RuntimeOrigin::signed(ALICE), + RuntimeOrigin::signed(alice()), BTC_ID, transfer_amount, Box::new( @@ -269,7 +311,7 @@ fn transfer_btc_zeitgeist_to_sibling() { 1, X2( Parachain(PARA_ID_SIBLING), - Junction::AccountId32 { network: None, id: BOB.into() } + Junction::AccountId32 { network: None, id: bob().into() } ) ) .into() @@ -278,61 +320,46 @@ fn transfer_btc_zeitgeist_to_sibling() { )); // Confirm that Alice's balance is initial_balance - amount_transferred - assert_eq!(AssetManager::free_balance(BTC_ID.into(), &ALICE), 0); + let alice_balance = AssetManager::free_balance(BTC_ID.into(), &alice()); + let alice_expected = alice_initial_balance - adjusted_balance(btc(1), transfer_amount); + assert_eq!(alice_balance, alice_expected); }); Sibling::execute_with(|| { - let fee_adjusted = adjusted_balance(btc(1), btc_fee()); - let expected = transfer_amount - fee_adjusted; + let expected = bob_initial_balance + transfer_amount - adjusted_balance(btc(1), btc_fee()); + let expected_sovereign = initial_sovereign_balance - transfer_amount; // Verify that Bob now has initial balance + amount transferred - fee - assert_eq!(Balances::free_balance(&BOB), sibling_bob_initial_balance + expected,); - + assert_eq!(Balances::free_balance(bob()), expected); // Verify that the amount transferred is now subtracted from the zeitgeist account at sibling - assert_eq!( - Balances::free_balance(zeitgeist_parachain_account()), - initial_sovereign_balance - transfer_amount - ); + assert_eq!(Balances::free_balance(zeitgeist_parachain_account()), expected_sovereign); }); } #[test] fn transfer_eth_sibling_to_zeitgeist() { - TestNet::reset(); - - let sibling_alice_initial_balance = ztg(10) + eth(1); - let zeitgeist_alice_initial_balance = eth(0); - let initial_sovereign_balance = eth(1); - let transfer_amount = eth(1); + let mut zeitgeist_alice_initial_balance = 0; + let transfer_amount = eth(100); let mut treasury_initial_balance = 0; Zeitgeist::execute_with(|| { register_eth(None); treasury_initial_balance = AssetManager::free_balance(ETH_ID.into(), &ZeitgeistTreasuryAccount::get()); - assert_eq!( - AssetManager::free_balance(ETH_ID.into(), &ALICE), - zeitgeist_alice_initial_balance, - ); + zeitgeist_alice_initial_balance = AssetManager::free_balance(ETH_ID.into(), &alice()); }); Sibling::execute_with(|| { + let alice_initial_balance = Balances::free_balance(alice()); + let initial_sovereign_balance = transfer_amount; + // Set the sovereign balance such that it is not subject to dust collection - assert_ok!(Balances::set_balance( - RuntimeOrigin::root(), - zeitgeist_parachain_account().into(), - initial_sovereign_balance, - 0 - )); - // Add 1 "fake" ETH to Alice's balance - assert_ok!(Balances::set_balance( - RuntimeOrigin::root(), - ALICE.into(), - sibling_alice_initial_balance, - 0 - )); + assert_eq!( + Balances::set_balance(&zeitgeist_parachain_account(), initial_sovereign_balance,), + initial_sovereign_balance + ); assert_ok!(XTokens::transfer( - RuntimeOrigin::signed(ALICE), + RuntimeOrigin::signed(alice()), // Target chain will interpret XcmAsset::Ztg as ETH in this context. XcmAsset::Ztg, transfer_amount, @@ -340,18 +367,16 @@ fn transfer_eth_sibling_to_zeitgeist() { MultiLocation::new( 1, X2( - Parachain(zeitgeist::ID), - Junction::AccountId32 { network: None, id: ALICE.into() } + Parachain(PARA_ID_ZEITGEIST), + Junction::AccountId32 { network: None, id: alice().into() } ) ) .into() ), WeightLimit::Limited(4_000_000_000.into()), )); - // Confirm that Alice's balance is initial_balance - amount_transferred - assert_eq!(Balances::free_balance(&ALICE), sibling_alice_initial_balance - transfer_amount); - + assert_eq!(Balances::free_balance(alice()), alice_initial_balance - transfer_amount); // Verify that the amount transferred is now part of the zeitgeist account here assert_eq!( Balances::free_balance(zeitgeist_parachain_account()), @@ -362,39 +387,43 @@ fn transfer_eth_sibling_to_zeitgeist() { Zeitgeist::execute_with(|| { let expected = transfer_amount - eth_fee(); let expected_adjusted = adjusted_balance(eth(1), expected); + let expected_treasury = treasury_initial_balance + adjusted_balance(eth(1), eth_fee()); // Verify that remote Alice now has initial balance + amount transferred - fee assert_eq!( - AssetManager::free_balance(ETH_ID.into(), &ALICE), + AssetManager::free_balance(ETH_ID.into(), &alice()), zeitgeist_alice_initial_balance + expected_adjusted, ); - // Verify that fees (of foreign currency) have been put into treasury assert_eq!( AssetManager::free_balance(ETH_ID.into(), &ZeitgeistTreasuryAccount::get()), // Align decimal fractional places - treasury_initial_balance + adjusted_balance(eth(1), eth_fee()) + expected_treasury ) }); } #[test] fn transfer_eth_zeitgeist_to_sibling() { - TestNet::reset(); - - let transfer_amount = eth(1) - eth_fee(); - let initial_sovereign_balance = 2 * eth(1); - let sibling_bob_initial_balance = eth(0); - - transfer_eth_sibling_to_zeitgeist(); + let transfer_amount = eth(100); + let initial_sovereign_balance = transfer_amount; + let mut bob_initial_balance = 0; Sibling::execute_with(|| { - assert_eq!(AssetManager::free_balance(ETH_ID.into(), &BOB), sibling_bob_initial_balance,); + bob_initial_balance = Balances::free_balance(bob()); + // Set the sovereign balance such that it is not subject to dust collection + assert_eq!( + Balances::set_balance(&zeitgeist_parachain_account(), initial_sovereign_balance,), + initial_sovereign_balance + ); }); Zeitgeist::execute_with(|| { + register_eth(None); + let alice_initial_balance = AssetManager::free_balance(ETH_ID.into(), &alice()); + assert_ok!(XTokens::transfer( - RuntimeOrigin::signed(ALICE), + RuntimeOrigin::signed(alice()), ETH_ID, transfer_amount, Box::new( @@ -402,7 +431,7 @@ fn transfer_eth_zeitgeist_to_sibling() { 1, X2( Parachain(PARA_ID_SIBLING), - Junction::AccountId32 { network: None, id: BOB.into() } + Junction::AccountId32 { network: None, id: bob().into() } ) ) .into() @@ -411,200 +440,147 @@ fn transfer_eth_zeitgeist_to_sibling() { )); // Confirm that Alice's balance is initial_balance - amount_transferred - assert_eq!(AssetManager::free_balance(ETH_ID.into(), &ALICE), 0); + let alice_balance = AssetManager::free_balance(ETH_ID.into(), &alice()); + let alice_expected = alice_initial_balance - adjusted_balance(eth(1), transfer_amount); + assert_eq!(alice_balance, alice_expected); }); Sibling::execute_with(|| { - let fee_adjusted = adjusted_balance(eth(1), eth_fee()); - let expected = transfer_amount - fee_adjusted; + let expected = bob_initial_balance + transfer_amount - adjusted_balance(eth(1), eth_fee()); + let expected_sovereign = initial_sovereign_balance - transfer_amount; // Verify that Bob now has initial balance + amount transferred - fee - assert_eq!(Balances::free_balance(&BOB), sibling_bob_initial_balance + expected,); - + assert_eq!(Balances::free_balance(bob()), expected); // Verify that the amount transferred is now subtracted from the zeitgeist account at sibling - assert_eq!( - Balances::free_balance(zeitgeist_parachain_account()), - initial_sovereign_balance - transfer_amount - ); + assert_eq!(Balances::free_balance(zeitgeist_parachain_account()), expected_sovereign); }); } #[test] fn transfer_dot_from_relay_chain() { - TestNet::reset(); - - let transfer_amount: Balance = dot(2); + let transfer_amount: Balance = dot(1); + let mut treasury_initial_balance = 0; + let mut bob_initial_balance = 0; Zeitgeist::execute_with(|| { register_foreign_parent(None); + treasury_initial_balance = + AssetManager::free_balance(FOREIGN_PARENT_ID.into(), &ZeitgeistTreasuryAccount::get()); + bob_initial_balance = AssetManager::free_balance(FOREIGN_PARENT_ID.into(), &bob()); }); - PolkadotNet::execute_with(|| { - let initial_balance = polkadot_runtime::Balances::free_balance(&ALICE); + Polkadot::execute_with(|| { + let initial_balance = polkadot_runtime::Balances::free_balance(alice()); assert!(initial_balance >= transfer_amount); assert_ok!(polkadot_runtime::XcmPallet::reserve_transfer_assets( - polkadot_runtime::RuntimeOrigin::signed(ALICE), - Box::new(Parachain(zeitgeist::ID).into()), - Box::new(Junction::AccountId32 { network: None, id: BOB.into() }.into()), + polkadot_runtime::RuntimeOrigin::signed(alice()), + Box::new(Parachain(PARA_ID_ZEITGEIST).into()), + Box::new(Junction::AccountId32 { network: None, id: bob().into() }.into()), Box::new((Here, transfer_amount).into()), 0 )); }); Zeitgeist::execute_with(|| { - assert_eq!( - AssetManager::free_balance(FOREIGN_PARENT_ID.into(), &BOB), - transfer_amount - dot_fee() - ); - }); -} - -#[test] -fn transfer_dot_to_relay_chain() { - TestNet::reset(); - - let transfer_amount: Balance = dot(2); - transfer_dot_from_relay_chain(); - - Zeitgeist::execute_with(|| { - let initial_balance = AssetManager::free_balance(FOREIGN_PARENT_ID.into(), &ALICE); - assert!(initial_balance >= transfer_amount); - - assert_ok!(XTokens::transfer( - RuntimeOrigin::signed(ALICE), - FOREIGN_PARENT_ID, - transfer_amount, - Box::new( - MultiLocation::new(1, X1(Junction::AccountId32 { id: BOB.into(), network: None })) - .into() - ), - WeightLimit::Unlimited, - )); + let expected = transfer_amount - dot_fee(); + let bob_expected = bob_initial_balance + adjusted_balance(dot(1), expected); + let treasury_expected = treasury_initial_balance + adjusted_balance(dot(1), dot_fee()); + assert_eq!(AssetManager::free_balance(FOREIGN_PARENT_ID.into(), &bob()), bob_expected); + // Verify that fees (of foreign currency) have been put into treasury assert_eq!( - AssetManager::free_balance(FOREIGN_PARENT_ID.into(), &ALICE), - initial_balance - transfer_amount + AssetManager::free_balance(FOREIGN_PARENT_ID.into(), &ZeitgeistTreasuryAccount::get()), + treasury_expected ) }); - - PolkadotNet::execute_with(|| { - assert_eq!(polkadot_runtime::Balances::free_balance(&BOB), 19_637_471_000); - }); } #[test] -fn transfer_ztg_to_sibling_with_custom_fee() { - TestNet::reset(); - - let alice_initial_balance = ztg(10); - // 10x fee factor, so ZTG has 10x the worth of sibling currency. - let fee_factor = 100_000_000_000; - let transfer_amount = ztg(5); - let mut treasury_initial_balance = 0; - - Sibling::execute_with(|| { - treasury_initial_balance = - AssetManager::free_balance(FOREIGN_ZTG_ID.into(), &ZeitgeistTreasuryAccount::get()); - assert_eq!(AssetManager::free_balance(FOREIGN_ZTG_ID.into(), &BOB), 0); +fn transfer_dot_to_relay_chain() { + let transfer_amount: Balance = dot(1); + let transfer_amount_local: Balance = adjusted_balance(dot(1), transfer_amount); + let mut initial_balance_bob = 0; - register_foreign_ztg(None); - let custom_metadata = CustomMetadata { - xcm: XcmMetadata { fee_factor: Some(fee_factor) }, - ..Default::default() - }; - assert_ok!(AssetRegistry::do_update_asset( - FOREIGN_ZTG_ID, - None, - None, - None, - None, - None, - Some(custom_metadata) - )); + Polkadot::execute_with(|| { + initial_balance_bob = polkadot_runtime::Balances::free_balance(bob()); + let bs_acc = Polkadot::sovereign_account_id_of_child_para(PARA_ID_ZEITGEIST.into()); + assert_eq!( + polkadot_runtime::Balances::set_balance(&bs_acc, transfer_amount), + transfer_amount + ); }); Zeitgeist::execute_with(|| { - assert_eq!(Balances::free_balance(&ALICE), alice_initial_balance); - assert_eq!(Balances::free_balance(sibling_parachain_account()), 0); + register_foreign_parent(None); + let initial_balance = AssetManager::free_balance(FOREIGN_PARENT_ID.into(), &alice()); + assert!(initial_balance >= transfer_amount_local); + assert_ok!(XTokens::transfer( - RuntimeOrigin::signed(ALICE), - XcmAsset::Ztg, + RuntimeOrigin::signed(alice()), + FOREIGN_PARENT_ID, transfer_amount, Box::new( MultiLocation::new( 1, - X2( - Parachain(PARA_ID_SIBLING), - Junction::AccountId32 { network: None, id: BOB.into() } - ) + X1(Junction::AccountId32 { id: bob().into(), network: None }) ) .into() ), - WeightLimit::Limited(4_000_000_000.into()), + WeightLimit::Limited(4_000_000_000.into()) )); - // Confirm that Alice's balance is initial_balance - amount_transferred - assert_eq!(Balances::free_balance(&ALICE), alice_initial_balance - transfer_amount); - - // Verify that the amount transferred is now part of the sibling account here - assert_eq!(Balances::free_balance(sibling_parachain_account()), transfer_amount); - }); - - Sibling::execute_with(|| { - let current_balance = AssetManager::free_balance(FOREIGN_ZTG_ID.into(), &BOB); - let custom_fee = calc_fee(default_per_second(10) * 10); - - // Verify that BOB now has (amount transferred - fee) - assert_eq!(current_balance, transfer_amount - custom_fee); - - // Sanity check for the actual amount BOB ends up with - assert_eq!(current_balance, transfer_amount - ztg_fee() * fee_factor / BASE); - - // Verify that fees (of foreign currency) have been put into treasury assert_eq!( - AssetManager::free_balance(FOREIGN_ZTG_ID.into(), &ZeitgeistTreasuryAccount::get()), - treasury_initial_balance + custom_fee + AssetManager::free_balance(FOREIGN_PARENT_ID.into(), &alice()), + initial_balance - transfer_amount_local ) }); + + #[cfg(not(feature = "runtime-benchmarks"))] + // polkadot-runtime does not process messages when runtime-benchmarks is enabled: + // https://github.com/paritytech/polkadot-sdk/blob/release-polkadot-v1.1.0/polkadot/runtime/polkadot/src/lib.rs#L1138-L1140 + Polkadot::execute_with(|| { + let expected_fee = 21_062_795; + let expected_balance_bob = initial_balance_bob + transfer_amount - expected_fee; + assert_eq!(polkadot_runtime::Balances::free_balance(&bob()), expected_balance_bob); + }); } #[test] fn test_total_fee() { - assert_eq!(ztg_fee(), 80_128_000); - assert_eq!(dot_fee(), ztg_fee()); + assert_eq!(btc_fee(), 642_960); + assert_eq!(dot_fee(), 80_370_000); + assert_eq!(ztg_fee(), 64_296_000); + assert_eq!(eth_fee(), 6_429_600_000_000_000); } #[inline] fn ztg_fee() -> Balance { - fee(BalanceFractionalDecimals::get().into()) + fee(BalanceFractionalDecimals::get().into(), 8) } #[inline] -fn fee(decimals: u32) -> Balance { - calc_fee(default_per_second(decimals)) +fn fee(decimals: u32, multiplier: Balance) -> Balance { + calc_fee(default_per_second(decimals), multiplier) } -// The fee associated with transferring dot tokens #[inline] fn dot_fee() -> Balance { - fee(10) + fee(10, 10) } #[inline] fn btc_fee() -> Balance { - fee(8) + fee(8, 8) } #[inline] fn eth_fee() -> Balance { - fee(18) + fee(18, 8) } #[inline] -const fn calc_fee(fee_per_second: Balance) -> Balance { - // We divide the fee to align its unit and multiply by 8 as that seems to be the unit of - // time the tests take. - // NOTE: it is possible that in different machines this value may differ. We shall see. - fee_per_second / 10_000 * 8 +const fn calc_fee(fee_per_second: Balance, multiplier: Balance) -> Balance { + // Adjust fee per second to actual test execution time + fee_per_second / 10_000 * multiplier } diff --git a/runtime/zeitgeist/src/lib.rs b/runtime/zeitgeist/src/lib.rs index 4fcde1f80..9887d9ccc 100644 --- a/runtime/zeitgeist/src/lib.rs +++ b/runtime/zeitgeist/src/lib.rs @@ -17,7 +17,7 @@ // along with Zeitgeist. If not, see . #![cfg_attr(not(feature = "std"), no_std)] -#![recursion_limit = "512"] +#![recursion_limit = "1024"] extern crate alloc; @@ -68,11 +68,10 @@ use { use frame_support::construct_runtime; -use sp_api::impl_runtime_apis; +use sp_api::{impl_runtime_apis, BlockT}; use sp_core::{crypto::KeyTypeId, OpaqueMetadata}; use sp_runtime::{ create_runtime_str, - traits::Block as BlockT, transaction_validity::{TransactionSource, TransactionValidity}, ApplyExtrinsicResult, }; @@ -94,8 +93,8 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("zeitgeist"), impl_name: create_runtime_str!("zeitgeist"), authoring_version: 1, - spec_version: 55, - impl_version: 1, + spec_version: 56, + impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 29, state_version: 1, @@ -117,7 +116,7 @@ impl Contains for IsCallable { }; use orml_currencies::Call::update_balance; use pallet_assets::Call::{destroy_accounts, destroy_approvals, finish_destroy}; - use pallet_balances::Call::{force_transfer, set_balance}; + use pallet_balances::Call::{force_set_balance, force_transfer}; use pallet_collective::Call::set_members; use pallet_contracts::Call::{ call, call_old_weight, instantiate, instantiate_old_weight, remove_code, @@ -144,7 +143,7 @@ impl Contains for IsCallable { // in case something goes terribly wrong (like a hack that draws the funds // from such an account, see Maganta hack). Invoking this function one can // also easily mess up consistency in regards to reserved tokens and locks. - set_balance { .. } => false, + force_set_balance { .. } => false, // There should be no reason to force an account to transfer funds. force_transfer { .. } => false, _ => true, diff --git a/runtime/zeitgeist/src/parachain_params.rs b/runtime/zeitgeist/src/parachain_params.rs index c08bd8549..55bf67d07 100644 --- a/runtime/zeitgeist/src/parachain_params.rs +++ b/runtime/zeitgeist/src/parachain_params.rs @@ -1,4 +1,4 @@ -// Copyright 2022-2023 Forecasting Technologies LTD. +// Copyright 2022-2024 Forecasting Technologies LTD. // Copyright 2021-2022 Zeitgeist PM LLC. // // This file is part of Zeitgeist. @@ -38,6 +38,9 @@ use zeitgeist_primitives::{ }; parameter_types! { + // Asset registry + pub const AssetRegistryStringLimit: u32 = 1024; + // Author-Mapping /// The amount that should be taken as a security deposit when registering a NimbusId pub const CollatorDeposit: Balance = 2 * BASE; @@ -67,22 +70,30 @@ parameter_types! { pub const LeaveDelegatorsDelay: u32 = 2; /// Maximum bottom delegations per candidate pub const MaxBottomDelegationsPerCandidate: u32 = 50; + /// Maximum number of collator candidates + pub const MaxCandidates: u32 = 200; /// Maximum delegations per delegator pub const MaxDelegationsPerDelegator: u32 = 100; /// Maximum top delegations per candidate pub const MaxTopDelegationsPerCandidate: u32 = 300; + /// Number of rounds until a collator not producing blocks is marked as inactive. + pub const MaxOfflineRounds: u32 = 1; /// Minimum round length is 2 minutes pub const MinBlocksPerRound: u32 = 2 * BLOCKS_PER_MINUTE as u32; /// Minimum stake required to become a collator - pub const MinCollatorStk: u128 = 64 * BASE; + pub const MinCandidateStk: u128 = 64 * BASE; /// Minimum stake required to be reserved to be a delegator - pub const MinDelegatorStk: u128 = BASE / 2; + pub const MinDelegation: u128 = BASE / 2; /// Minimum collators selected per round, default at genesis and minimum forever after pub const MinSelectedCandidates: u32 = 8; /// Rounds before the delegator revocation can be executed pub const RevokeDelegationDelay: u32 = 2; /// Rounds before the reward is paid pub const RewardPaymentDelay: u32 = 2; + /// The maximum number of local XCM locks that a single account may have. + pub const MaxLockers: u32 = 8; + /// The maximum number of consumers a single remote lock may have. + pub const MaxRemoteLockConsumers: u32 = 0; // XCM /// Base weight for XCM execution diff --git a/runtime/zeitgeist/src/parameters.rs b/runtime/zeitgeist/src/parameters.rs index a5c1eacf8..5c8fade66 100644 --- a/runtime/zeitgeist/src/parameters.rs +++ b/runtime/zeitgeist/src/parameters.rs @@ -47,7 +47,7 @@ use zeitgeist_primitives::{constants::*, types::*}; pub(crate) const AVERAGE_ON_INITIALIZE_RATIO: Perbill = Perbill::from_percent(10); pub(crate) const MAXIMUM_BLOCK_WEIGHT: Weight = Weight::from_parts( WEIGHT_REF_TIME_PER_SECOND.saturating_div(2), - polkadot_primitives::v2::MAX_POV_SIZE as u64, + polkadot_primitives::MAX_POV_SIZE as u64, ); pub(crate) const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(75); pub(crate) const FEES_AND_TIPS_TREASURY_PERCENTAGE: u32 = 100; @@ -56,11 +56,12 @@ pub(crate) const FEES_AND_TIPS_BURN_PERCENTAGE: u32 = 0; #[cfg(not(feature = "parachain"))] parameter_types! { // Aura + pub const AllowMultipleBlocksPerSlot: bool = false; pub const MaxAuthorities: u32 = 32; // Grandpa - // Can be 0, as equivocation handling is not enabled (HandleEquivocation = ()) pub const MaxSetIdSessionEntries: u32 = 0; + pub const MaxNominators: u32 = 0; } parameter_types! { @@ -108,6 +109,8 @@ parameter_types! { // Balance pub const ExistentialDeposit: u128 = 5 * MILLI; + pub const MaxHolds: u32 = 1; + pub const MaxFreezes: u32 = 1; pub const MaxLocks: u32 = 50; pub const MaxReserves: u32 = 50; @@ -120,23 +123,20 @@ parameter_types! { pub const CouncilMaxMembers: u32 = 100; pub const CouncilMaxProposals: u32 = 100; pub const CouncilMotionDuration: BlockNumber = 7 * BLOCKS_PER_DAY; + pub MaxProposalWeight: Weight = Perbill::from_percent(50) * RuntimeBlockWeights::get().max_block; pub const TechnicalCommitteeMaxMembers: u32 = 100; pub const TechnicalCommitteeMaxProposals: u32 = 64; pub const TechnicalCommitteeMotionDuration: BlockNumber = 7 * BLOCKS_PER_DAY; // Contracts - pub const ContractsDeletionQueueDepth: u32 = 128; - pub ContractsDeletionWeightLimit: Weight = Perbill::from_percent(10) - * RuntimeBlockWeights::get() - .per_class - .get(DispatchClass::Normal) - .max_total - .unwrap_or(RuntimeBlockWeights::get().max_block); + pub const ContractsCodeHashLockupDepositPercent: Perbill = Perbill::from_percent(10); + pub const ContractsDefaultDepositLimit: Balance = deposit(16, 16 * 1024 * 1024); pub const ContractsDepositPerByte: Balance = deposit(0,1); pub const ContractsDepositPerItem: Balance = deposit(1,0); pub const ContractsMaxCodeLen: u32 = 123 * 1024; pub const ContractsMaxStorageKeyLen: u32 = 128; pub const ContractsMaxDebugBufferLen: u32 = 2 * 1024 * 1024; + pub const ContractsMaxDelegateDependencies: u32 = 32; pub const ContractsUnsafeUnstableInterface: bool = false; pub ContractsSchedule: pallet_contracts::Schedule = Default::default(); @@ -431,7 +431,7 @@ parameter_types! { /// The maximum number of approvals that can wait in the spending queue. pub const MaxApprovals: u32 = 100; /// Maximum amount a verified origin can spend - pub const MaxTreasurySpend: Balance = Balance::max_value(); + pub const MaxTreasurySpend: Balance = Balance::MAX; /// Fraction of a proposal's value that should be bonded in order to place the proposal. /// An accepted proposal gets these back. A rejected proposal does not. pub const ProposalBond: Permill = Permill::from_percent(5); diff --git a/runtime/zeitgeist/src/xcm_config/asset_registry.rs b/runtime/zeitgeist/src/xcm_config/asset_registry.rs index 9deb85aa0..ab6c618a4 100644 --- a/runtime/zeitgeist/src/xcm_config/asset_registry.rs +++ b/runtime/zeitgeist/src/xcm_config/asset_registry.rs @@ -15,7 +15,7 @@ // You should have received a copy of the GNU General Public License // along with Zeitgeist. If not, see . -use crate::{Balance, XcmAsset}; +use crate::{AssetRegistryStringLimit, Balance, XcmAsset}; use orml_traits::asset_registry::{AssetMetadata, AssetProcessor}; use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; use scale_info::TypeInfo; @@ -29,11 +29,16 @@ use zeitgeist_primitives::types::CustomMetadata; /// Only pre check is to ensure an asset id was passed. pub struct CustomAssetProcessor; -impl AssetProcessor> for CustomAssetProcessor { +impl AssetProcessor> + for CustomAssetProcessor +{ fn pre_register( id: Option, - metadata: AssetMetadata, - ) -> Result<(XcmAsset, AssetMetadata), DispatchError> { + metadata: AssetMetadata, + ) -> Result< + (XcmAsset, AssetMetadata), + DispatchError, + > { match id { Some(id) => Ok((id, metadata)), None => Err(DispatchError::Other("asset-registry: AssetId is required")), @@ -42,7 +47,7 @@ impl AssetProcessor> for Custom fn post_register( _id: XcmAsset, - _asset_metadata: AssetMetadata, + _asset_metadata: AssetMetadata, ) -> Result<(), DispatchError> { Ok(()) } diff --git a/runtime/zeitgeist/src/xcm_config/config.rs b/runtime/zeitgeist/src/xcm_config/config.rs index 27d6c1e54..c86c0feba 100644 --- a/runtime/zeitgeist/src/xcm_config/config.rs +++ b/runtime/zeitgeist/src/xcm_config/config.rs @@ -36,8 +36,8 @@ use orml_xcm_support::{ DepositToAlternative, IsNativeConcrete, MultiCurrencyAdapter, MultiNativeAsset, }; use pallet_xcm::XcmPassthrough; -use polkadot_parachain::primitives::Sibling; -use sp_runtime::traits::Convert; +use polkadot_parachain_primitives::primitives::Sibling; +use sp_runtime::traits::{ConstU32, Convert, MaybeEquivalence}; use xcm::{ latest::{ prelude::{AccountId32, AssetId, Concrete, GeneralKey, MultiAsset, XcmContext, X1, X2}, @@ -50,13 +50,13 @@ use xcm_builder::{ AllowTopLevelPaidExecutionFrom, FixedRateOfFungible, FixedWeightBounds, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeRevenue, - TakeWeightCredit, + TakeWeightCredit, WithComputedOrigin, }; -use xcm_executor::{traits::TransactAsset, Assets as ExecutorAssets, Config}; +use xcm_executor::{traits::TransactAsset, Assets as ExecutorAssets}; use zeitgeist_primitives::{constants::BalanceFractionalDecimals, types::XcmAsset}; pub mod zeitgeist { - #[cfg(test)] + #[cfg(any(test, feature = "runtime-benchmarks"))] pub const ID: u32 = 2092; pub const KEY: &[u8] = &[0, 1]; } @@ -66,7 +66,10 @@ pub struct XcmConfig; /// The main XCM config /// This is where we configure the core of our XCM integrations: how tokens are transferred, /// how fees are calculated, what barriers we impose on incoming XCM messages, etc. -impl Config for XcmConfig { +impl xcm_executor::Config for XcmConfig { + /// A list of (Origin, Target) pairs allowing a given Origin to be substituted with its + /// corresponding Target pair. + type Aliasers = Nothing; /// Handler for exchanging assets. type AssetExchanger = (); /// The handler for when there is an instruction to claim assets. @@ -124,12 +127,18 @@ impl Config for XcmConfig { pub type Barrier = ( // Execution barrier that just takes max_weight from weight_credit TakeWeightCredit, - // Ensures that execution time is bought with BuyExecution instruction - AllowTopLevelPaidExecutionFrom, // Expected responses are OK. AllowKnownQueryResponses, - // Subscriptions for version tracking are OK. - AllowSubscriptionsFrom, + WithComputedOrigin< + ( + // If the message is one that immediately attemps to pay for execution, then allow it. + AllowTopLevelPaidExecutionFrom, + // Subscriptions for version tracking are OK. + AllowSubscriptionsFrom, + ), + UniversalLocation, + ConstU32<8>, + >, ); /// The means of purchasing weight credit for XCM execution. @@ -153,11 +162,10 @@ pub struct ToTreasury; impl TakeRevenue for ToTreasury { fn take_revenue(revenue: MultiAsset) { use orml_traits::MultiCurrency; - use xcm_executor::traits::Convert; if let MultiAsset { id: Concrete(location), fun: Fungible(_amount) } = revenue { - if let Ok(asset_id) = - >::convert(location) + if let Some(asset_id) = + >::convert(&location) { let adj_am = AlignedFractionalMultiAssetTransactor::adjust_fractional_places(&revenue).fun; @@ -348,88 +356,96 @@ pub struct AssetConvert; /// handle it on their side. impl Convert> for AssetConvert { fn convert(id: Assets) -> Option { - match id { - Assets::Ztg => Some(MultiLocation::new( - 1, - X2( - Junction::Parachain(ParachainInfo::parachain_id().into()), - general_key(zeitgeist::KEY), - ), - )), - Assets::ForeignAsset(_) => { - let asset = XcmAsset::try_from(id).ok()?; - AssetRegistry::multilocation(&asset).ok()? - } - _ => None, - } + >::convert_back(&id) + } +} + +impl Convert> for AssetConvert { + fn convert(location: MultiLocation) -> Option { + >::convert(&location) } } impl Convert> for AssetConvert { fn convert(id: XcmAsset) -> Option { - >>::convert(id.into()) + >::convert_back(&id) } } /// Convert an incoming `MultiLocation` into a `Asset` if possible. /// Here we need to know the canonical representation of all the tokens we handle in order to /// correctly convert their `MultiLocation` representation into our internal `Asset` type. -impl xcm_executor::traits::Convert for AssetConvert { - fn convert(location: MultiLocation) -> Result { +impl MaybeEquivalence for AssetConvert { + fn convert(location: &MultiLocation) -> Option { match location { MultiLocation { parents: 0, interior: X1(GeneralKey { data, length }) } => { - let key = &data[..data.len().min(length as usize)]; + let key = &data[..data.len().min(*length as usize)]; if key == zeitgeist::KEY { - return Ok(Assets::Ztg); + return Some(Assets::Ztg); } - Err(location) + None } MultiLocation { parents: 1, interior: X2(Junction::Parachain(para_id), GeneralKey { data, length }), } => { - let key = &data[..data.len().min(length as usize)]; + let key = &data[..data.len().min(*length as usize)]; - if para_id == u32::from(ParachainInfo::parachain_id()) { + if *para_id == u32::from(ParachainInfo::parachain_id()) { if key == zeitgeist::KEY { - return Ok(Assets::Ztg); + return Some(Assets::Ztg); } - return Err(location); + return None; } - AssetRegistry::location_to_asset_id(location).ok_or(location).map(|a| a.into()) + AssetRegistry::location_to_asset_id(location).map(|a| a.into()) + } + _ => AssetRegistry::location_to_asset_id(location).map(|a| a.into()), + } + } + + fn convert_back(id: &Assets) -> Option { + match id { + Assets::Ztg => Some(MultiLocation::new( + 1, + X2( + Junction::Parachain(ParachainInfo::parachain_id().into()), + general_key(zeitgeist::KEY), + ), + )), + Assets::ForeignAsset(_) => { + let asset = XcmAsset::try_from(*id).ok()?; + AssetRegistry::multilocation(&asset).ok()? } - _ => AssetRegistry::location_to_asset_id(location).ok_or(location).map(|a| a.into()), + _ => None, } } } -impl xcm_executor::traits::Convert for AssetConvert { - fn convert(location: MultiLocation) -> Result { - >::convert(location) - .and_then(|asset| asset.try_into().map_err(|_| location)) +impl MaybeEquivalence for AssetConvert { + fn convert(location: &MultiLocation) -> Option { + >::convert(location) + .and_then(|asset| asset.try_into().ok()) + } + + fn convert_back(id: &XcmAsset) -> Option { + >::convert_back(&Assets::from(*id)) } } impl Convert> for AssetConvert { fn convert(asset: MultiAsset) -> Option { if let MultiAsset { id: Concrete(location), .. } = asset { - >::convert(location).ok() + >::convert(&location) } else { None } } } -impl Convert> for AssetConvert { - fn convert(location: MultiLocation) -> Option { - >::convert(location).ok() - } -} - pub struct AccountIdToMultiLocation; impl Convert for AccountIdToMultiLocation { diff --git a/rust-toolchain b/rust-toolchain index 79f0cd6f9..00cf94259 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -1,5 +1,5 @@ [toolchain] -channel = "nightly-2024-01-31" +channel = "nightly-2024-04-15" components = ["clippy", "rustfmt", "llvm-tools-preview"] profile = "minimal" targets = ["wasm32-unknown-unknown"] diff --git a/zrml/asset-router/Cargo.toml b/zrml/asset-router/Cargo.toml index 3a264a4d2..c37c1f494 100644 --- a/zrml/asset-router/Cargo.toml +++ b/zrml/asset-router/Cargo.toml @@ -34,6 +34,6 @@ try-runtime = [ [package] authors = ["Zeitgeist PM "] -edition = "2021" +edition.workspace = true name = "zrml-asset-router" version = "0.4.1" diff --git a/zrml/asset-router/src/lib.rs b/zrml/asset-router/src/lib.rs index ec97b3937..802a2406f 100644 --- a/zrml/asset-router/src/lib.rs +++ b/zrml/asset-router/src/lib.rs @@ -38,18 +38,21 @@ pub mod pallet { pub(crate) use alloc::collections::BTreeMap; pub(crate) use core::{fmt::Debug, marker::PhantomData}; pub(crate) use frame_support::{ - ensure, log, - pallet_prelude::{DispatchError, DispatchResult, Hooks, StorageValue, ValueQuery, Weight}, + ensure, + pallet_prelude::{DispatchResult, Hooks, StorageValue, ValueQuery, Weight}, require_transactional, traits::{ tokens::{ - fungibles::{Create, Destroy, Inspect, Mutate, Transfer, Unbalanced}, - DepositConsequence, WithdrawConsequence, + fungibles::{Create, Destroy, Inspect, Mutate, Unbalanced}, + DepositConsequence, Fortitude, Precision, Preservation, Provenance, + WithdrawConsequence, }, BalanceStatus as Status, ConstU32, }, BoundedVec, Parameter, }; + pub(crate) use frame_system::pallet_prelude::BlockNumberFor; + use log; pub(crate) use orml_traits::{ arithmetic::Signed, currency::{ @@ -62,13 +65,10 @@ pub mod pallet { use parity_scale_codec::{FullCodec, MaxEncodedLen}; use scale_info::TypeInfo; pub(crate) use sp_runtime::{ - traits::{ - AtLeast32BitUnsigned, Bounded, Get, MaybeSerializeDeserialize, Member, Saturating, Zero, - }, - FixedPointOperand, SaturatedConversion, + traits::{AtLeast32BitUnsigned, Bounded, Get, MaybeSerializeDeserialize, Member, Zero}, + DispatchError, FixedPointOperand, SaturatedConversion, }; use zeitgeist_macros::unreachable_non_terminating; - pub(crate) use zeitgeist_primitives::traits::CheckedDivPerComponent; pub(crate) const LOG_TARGET: &str = "runtime::asset-router"; pub(crate) const MAX_ASSET_DESTRUCTIONS_PER_BLOCK: u8 = 128; @@ -81,7 +81,6 @@ pub mod pallet { Create + Destroy + Inspect - + Transfer + Mutate + Unbalanced { @@ -92,7 +91,6 @@ pub mod pallet { G: Create + Destroy + Inspect - + Transfer + Mutate + Unbalanced, T: Config, @@ -216,14 +214,16 @@ pub mod pallet { UnknownAsset, /// Operation is not supported for given asset Unsupported, + /// Only a partial amount was deposited + DepositOnlyPartial, } #[pallet::pallet] pub struct Pallet(PhantomData); #[pallet::hooks] - impl Hooks for Pallet { - fn on_idle(_: T::BlockNumber, mut remaining_weight: Weight) -> Weight { + impl Hooks> for Pallet { + fn on_idle(_: BlockNumberFor, mut remaining_weight: Weight) -> Weight { let max_extra_weight = Self::on_idle_max_extra_weight(); if !remaining_weight diff --git a/zrml/asset-router/src/mock.rs b/zrml/asset-router/src/mock.rs index 716142b96..0b9486104 100644 --- a/zrml/asset-router/src/mock.rs +++ b/zrml/asset-router/src/mock.rs @@ -26,20 +26,19 @@ use frame_support::{ pallet_prelude::{DispatchResult, Weight}, traits::{AsEnsureOriginWithArg, Everything}, }; -use frame_system::EnsureSigned; +use frame_system::{mocking::MockBlock, EnsureSigned}; use orml_traits::parameter_type_with_key; use pallet_assets::ManagedDestroy; use parity_scale_codec::Compact; use sp_runtime::{ - testing::Header, traits::{parameter_types, BlakeTwo256, ConstU128, ConstU32, IdentityLookup}, + BuildStorage, }; use zeitgeist_primitives::{ constants::mock::{BlockHashCount, ExistentialDeposit, MaxLocks, MaxReserves, BASE}, types::{ - AccountIdTest, Amount, Assets, Balance, BlockNumber, BlockTest, CampaignAsset, - CampaignAssetClass, CampaignAssetId, Currencies, CustomAsset, CustomAssetClass, - CustomAssetId, Hash, Index, MarketAsset, UncheckedExtrinsicTest, + AccountIdTest, Amount, Assets, Balance, CampaignAsset, CampaignAssetClass, CampaignAssetId, + Currencies, CustomAsset, CustomAssetClass, CustomAssetId, Hash, MarketAsset, }, }; @@ -79,19 +78,14 @@ parameter_types! { } construct_runtime!( - pub enum Runtime - where - Block = BlockTest, - NodeBlock = BlockTest, - UncheckedExtrinsic = UncheckedExtrinsicTest, - { - AssetRouter: zrml_asset_router::{Pallet}, - Balances: pallet_balances::{Call, Config, Event, Pallet, Storage}, - CustomAssets: pallet_assets::::{Call, Pallet, Storage, Event}, - CampaignAssets: pallet_assets::::{Call, Pallet, Storage, Event}, - MarketAssets: pallet_assets::::{Call, Pallet, Storage, Event}, - System: frame_system::{Call, Config, Event, Pallet, Storage}, - Tokens: orml_tokens::{Config, Event, Pallet, Storage}, + pub enum Runtime { + AssetRouter: zrml_asset_router, + Balances: pallet_balances, + CustomAssets: pallet_assets::, + CampaignAssets: pallet_assets::, + MarketAssets: pallet_assets::, + System: frame_system, + Tokens: orml_tokens, } ); @@ -115,18 +109,17 @@ impl frame_system::Config for Runtime { type AccountData = pallet_balances::AccountData; type AccountId = AccountIdTest; type BaseCallFilter = Everything; + type Block = MockBlock; type BlockHashCount = BlockHashCount; type BlockLength = (); - type BlockNumber = BlockNumber; type BlockWeights = (); type RuntimeCall = RuntimeCall; type DbWeight = (); type RuntimeEvent = RuntimeEvent; type Hash = Hash; type Hashing = BlakeTwo256; - type Header = Header; - type Index = Index; type Lookup = IdentityLookup; + type Nonce = u64; type MaxConsumers = frame_support::traits::ConstU32<16>; type OnKilledAccount = (); type OnNewAccount = (); @@ -264,8 +257,12 @@ impl pallet_balances::Config for Runtime { type AccountStore = System; type Balance = Balance; type DustRemoval = (); + type FreezeIdentifier = (); + type RuntimeHoldReason = (); type RuntimeEvent = RuntimeEvent; type ExistentialDeposit = ExistentialDeposit; + type MaxHolds = (); + type MaxFreezes = (); type MaxLocks = MaxLocks; type MaxReserves = MaxReserves; type ReserveIdentifier = [u8; 8]; @@ -284,7 +281,7 @@ impl Default for ExtBuilder { impl ExtBuilder { pub fn build(self) -> 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: self.balances } .assimilate_storage(&mut t) diff --git a/zrml/asset-router/src/pallet_impl/balanced.rs b/zrml/asset-router/src/pallet_impl/balanced.rs new file mode 100644 index 000000000..2a55f30bc --- /dev/null +++ b/zrml/asset-router/src/pallet_impl/balanced.rs @@ -0,0 +1,24 @@ +// Copyright 2024 Forecasting Technologies LTD. +// +// This file is part of Zeitgeist. +// +// Zeitgeist is free software: you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by the +// Free Software Foundation, either version 3 of the License, or (at +// your option) any later version. +// +// Zeitgeist is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Zeitgeist. If not, see . + +use crate::pallet::*; +use frame_support::traits::tokens::fungibles::{Balanced, DecreaseIssuance, IncreaseIssuance}; + +impl Balanced for Pallet { + type OnDropCredit = DecreaseIssuance; + type OnDropDebt = IncreaseIssuance; +} diff --git a/zrml/asset-router/src/pallet_impl/inspect.rs b/zrml/asset-router/src/pallet_impl/inspect.rs index 1c19338d4..22e441e98 100644 --- a/zrml/asset-router/src/pallet_impl/inspect.rs +++ b/zrml/asset-router/src/pallet_impl/inspect.rs @@ -23,55 +23,43 @@ impl Inspect for Pallet { type Balance = T::Balance; fn total_issuance(asset: Self::AssetId) -> Self::Balance { - route_call!(asset, total_issuance, total_issuance,).unwrap_or(Zero::zero()) + route_call_with_trait!(asset, Inspect, total_issuance,).unwrap_or(Zero::zero()) + } + + fn active_issuance(asset: Self::AssetId) -> Self::Balance { + route_call_with_trait!(asset, Inspect, active_issuance,).unwrap_or(Zero::zero()) } fn minimum_balance(asset: Self::AssetId) -> Self::Balance { - route_call!(asset, minimum_balance, minimum_balance,).unwrap_or(Zero::zero()) + route_call_with_trait!(asset, Inspect, minimum_balance,).unwrap_or(Zero::zero()) } fn balance(asset: Self::AssetId, who: &T::AccountId) -> Self::Balance { - route_call!(asset, total_balance, balance, who).unwrap_or(Zero::zero()) + route_call_with_trait!(asset, Inspect, balance, who).unwrap_or(Zero::zero()) + } + + fn total_balance(asset: Self::AssetId, who: &T::AccountId) -> Self::Balance { + route_call_with_trait!(asset, Inspect, total_balance, who).unwrap_or(Zero::zero()) } fn reducible_balance( asset: Self::AssetId, who: &T::AccountId, - keep_alive: bool, + preservation: Preservation, + force: Fortitude, ) -> Self::Balance { - if T::CurrencyType::try_from(asset).is_ok() { - >::free_balance(asset, who) - } else { - only_asset!(asset, Zero::zero(), Inspect, reducible_balance, who, keep_alive) - } + route_call_with_trait!(asset, Inspect, reducible_balance, who, preservation, force) + .unwrap_or(Zero::zero()) } fn can_deposit( asset: Self::AssetId, who: &T::AccountId, amount: Self::Balance, - mint: bool, + provenance: Provenance, ) -> DepositConsequence { - if T::CurrencyType::try_from(asset).is_err() { - return only_asset!( - asset, - DepositConsequence::UnknownAsset, - Inspect, - can_deposit, - who, - amount, - mint - ); - } - - let total_balance = >::total_balance(asset, who); - let min_balance = >::minimum_balance(asset); - - if total_balance.saturating_add(amount) < min_balance { - DepositConsequence::BelowMinimum - } else { - DepositConsequence::Success - } + route_call_with_trait!(asset, Inspect, can_deposit, who, amount, provenance) + .unwrap_or(DepositConsequence::UnknownAsset) } fn can_withdraw( @@ -79,46 +67,11 @@ impl Inspect for Pallet { who: &T::AccountId, amount: Self::Balance, ) -> WithdrawConsequence { - if T::CurrencyType::try_from(asset).is_err() { - return only_asset!( - asset, - WithdrawConsequence::UnknownAsset, - Inspect, - can_withdraw, - who, - amount - ); - } - - let can_withdraw = - >::ensure_can_withdraw(asset, who, amount); - - if let Err(_e) = can_withdraw { - return WithdrawConsequence::NoFunds; - } - - let total_balance = >::total_balance(asset, who); - let min_balance = >::minimum_balance(asset); - let remainder = total_balance.saturating_sub(amount); - - if remainder < min_balance { - WithdrawConsequence::ReducedToZero(remainder) - } else { - WithdrawConsequence::Success - } + route_call_with_trait!(asset, Inspect, can_withdraw, who, amount) + .unwrap_or(WithdrawConsequence::UnknownAsset) } fn asset_exists(asset: Self::AssetId) -> bool { - if let Ok(currency) = T::CurrencyType::try_from(asset) { - if >::total_issuance(currency) - > Zero::zero() - { - true - } else { - only_asset!(asset, false, Inspect, asset_exists,) - } - } else { - only_asset!(asset, false, Inspect, asset_exists,) - } + route_call_with_trait!(asset, Inspect, asset_exists,).unwrap_or(false) } } diff --git a/zrml/asset-router/src/pallet_impl/mod.rs b/zrml/asset-router/src/pallet_impl/mod.rs index d0a94a1c7..6e6928d8c 100644 --- a/zrml/asset-router/src/pallet_impl/mod.rs +++ b/zrml/asset-router/src/pallet_impl/mod.rs @@ -15,6 +15,7 @@ // You should have received a copy of the GNU General Public License // along with Zeitgeist. If not, see . +pub mod balanced; pub mod create; pub mod destroy; pub mod inspect; diff --git a/zrml/asset-router/src/pallet_impl/multi_currency.rs b/zrml/asset-router/src/pallet_impl/multi_currency.rs index 77a87d3a8..6d812aca9 100644 --- a/zrml/asset-router/src/pallet_impl/multi_currency.rs +++ b/zrml/asset-router/src/pallet_impl/multi_currency.rs @@ -49,16 +49,36 @@ impl MultiCurrency for Pallet { if let Ok(asset) = T::MarketAssetType::try_from(currency_id) { // Route "pre new asset system" market assets to `CurrencyType` if T::MarketAssets::asset_exists(asset) { - T::MarketAssets::reducible_balance(asset, who, false) + T::MarketAssets::reducible_balance( + asset, + who, + Preservation::Expendable, + Fortitude::Polite, + ) } else if let Ok(currency) = T::CurrencyType::try_from(currency_id) { T::Currencies::free_balance(currency, who) } else { - T::MarketAssets::reducible_balance(asset, who, false) + T::MarketAssets::reducible_balance( + asset, + who, + Preservation::Expendable, + Fortitude::Polite, + ) } } else if let Ok(asset) = T::CampaignAssetType::try_from(currency_id) { - T::CampaignAssets::reducible_balance(asset, who, false) + T::CampaignAssets::reducible_balance( + asset, + who, + Preservation::Expendable, + Fortitude::Polite, + ) } else if let Ok(asset) = T::CustomAssetType::try_from(currency_id) { - T::CustomAssets::reducible_balance(asset, who, false) + T::CustomAssets::reducible_balance( + asset, + who, + Preservation::Expendable, + Fortitude::Polite, + ) } else if let Ok(currency) = T::CurrencyType::try_from(currency_id) { T::Currencies::free_balance(currency, who) } else { @@ -91,7 +111,7 @@ impl MultiCurrency for Pallet { return Err(Error::::UnknownAsset.into()); }; - withdraw_consequence.into_result().map(|_| ()) + withdraw_consequence.into_result(false).map(|_| ()) } fn transfer( @@ -103,16 +123,19 @@ impl MultiCurrency for Pallet { if let Ok(asset) = T::MarketAssetType::try_from(currency_id) { // Route "pre new asset system" market assets to `CurrencyType` if T::MarketAssets::asset_exists(asset) { - T::MarketAssets::transfer(asset, from, to, amount, false).map(|_| ()) + T::MarketAssets::transfer(asset, from, to, amount, Preservation::Expendable) + .map(|_| ()) } else if let Ok(currency) = T::CurrencyType::try_from(currency_id) { T::Currencies::transfer(currency, from, to, amount) } else { - T::MarketAssets::transfer(asset, from, to, amount, false).map(|_| ()) + T::MarketAssets::transfer(asset, from, to, amount, Preservation::Expendable) + .map(|_| ()) } } else if let Ok(asset) = T::CampaignAssetType::try_from(currency_id) { - T::CampaignAssets::transfer(asset, from, to, amount, false).map(|_| ()) + T::CampaignAssets::transfer(asset, from, to, amount, Preservation::Expendable) + .map(|_| ()) } else if let Ok(asset) = T::CustomAssetType::try_from(currency_id) { - T::CustomAssets::transfer(asset, from, to, amount, false).map(|_| ()) + T::CustomAssets::transfer(asset, from, to, amount, Preservation::Expendable).map(|_| ()) } else if let Ok(currency) = T::CurrencyType::try_from(currency_id) { T::Currencies::transfer(currency, from, to, amount) } else { @@ -125,7 +148,28 @@ impl MultiCurrency for Pallet { who: &T::AccountId, amount: Self::Balance, ) -> DispatchResult { - route_call!(currency_id, deposit, mint_into, who, amount)? + let eval_fungible_result = |b: Self::Balance| { + if b != amount { Err(Error::::DepositOnlyPartial.into()) } else { Ok(()) } + }; + + if let Ok(asset) = T::MarketAssetType::try_from(currency_id) { + // Route "pre new asset system" market assets to `CurrencyType` + if T::MarketAssets::asset_exists(asset) { + T::MarketAssets::mint_into(asset, who, amount).and_then(eval_fungible_result) + } else if let Ok(currency) = T::CurrencyType::try_from(currency_id) { + T::Currencies::deposit(currency, who, amount) + } else { + T::MarketAssets::mint_into(asset, who, amount).and_then(eval_fungible_result) + } + } else if let Ok(asset) = T::CampaignAssetType::try_from(currency_id) { + T::CampaignAssets::mint_into(asset, who, amount).and_then(eval_fungible_result) + } else if let Ok(asset) = T::CustomAssetType::try_from(currency_id) { + T::CustomAssets::mint_into(asset, who, amount).and_then(eval_fungible_result) + } else if let Ok(currency) = T::CurrencyType::try_from(currency_id) { + T::Currencies::deposit(currency, who, amount) + } else { + Err(Error::::UnknownAsset.into()) + } } fn withdraw( @@ -138,16 +182,20 @@ impl MultiCurrency for Pallet { if T::MarketAssets::asset_exists(asset) { // Resulting balance can be ignored as `burn_from` ensures that the // requested amount can be burned. - T::MarketAssets::burn_from(asset, who, amount).map(|_| ()) + T::MarketAssets::burn_from(asset, who, amount, Precision::Exact, Fortitude::Force) + .map(|_| ()) } else if let Ok(currency) = T::CurrencyType::try_from(currency_id) { T::Currencies::withdraw(currency, who, amount) } else { - T::MarketAssets::burn_from(asset, who, amount).map(|_| ()) + T::MarketAssets::burn_from(asset, who, amount, Precision::Exact, Fortitude::Force) + .map(|_| ()) } } else if let Ok(asset) = T::CampaignAssetType::try_from(currency_id) { - T::CampaignAssets::burn_from(asset, who, amount).map(|_| ()) + T::CampaignAssets::burn_from(asset, who, amount, Precision::Exact, Fortitude::Force) + .map(|_| ()) } else if let Ok(asset) = T::CustomAssetType::try_from(currency_id) { - T::CustomAssets::burn_from(asset, who, amount).map(|_| ()) + T::CustomAssets::burn_from(asset, who, amount, Precision::Exact, Fortitude::Force) + .map(|_| ()) } else if let Ok(currency) = T::CurrencyType::try_from(currency_id) { T::Currencies::withdraw(currency, who, amount) } else { @@ -161,16 +209,36 @@ impl MultiCurrency for Pallet { if T::MarketAssets::asset_exists(asset) { // Resulting balance can be ignored as `burn_from` ensures that the // requested amount can be burned. - T::MarketAssets::reducible_balance(asset, who, false) >= value + T::MarketAssets::reducible_balance( + asset, + who, + Preservation::Expendable, + Fortitude::Force, + ) >= value } else if let Ok(currency) = T::CurrencyType::try_from(currency_id) { T::Currencies::can_slash(currency, who, value) } else { - T::MarketAssets::reducible_balance(asset, who, false) >= value + T::MarketAssets::reducible_balance( + asset, + who, + Preservation::Expendable, + Fortitude::Force, + ) >= value } } else if let Ok(asset) = T::CampaignAssetType::try_from(currency_id) { - T::CampaignAssets::reducible_balance(asset, who, false) >= value + T::CampaignAssets::reducible_balance( + asset, + who, + Preservation::Expendable, + Fortitude::Force, + ) >= value } else if let Ok(asset) = T::CustomAssetType::try_from(currency_id) { - T::CustomAssets::reducible_balance(asset, who, false) >= value + T::CustomAssets::reducible_balance( + asset, + who, + Preservation::Expendable, + Fortitude::Force, + ) >= value } else if let Ok(currency) = T::CurrencyType::try_from(currency_id) { T::Currencies::can_slash(currency, who, value) } else { @@ -189,24 +257,16 @@ impl MultiCurrency for Pallet { if T::MarketAssets::asset_exists(asset) { // Resulting balance can be ignored as `burn_from` ensures that the // requested amount can be burned. - T::MarketAssets::slash(asset, who, amount) - .map(|b| amount.saturating_sub(b)) - .unwrap_or_else(|_| amount) + Self::withdraw(currency_id, who, amount).map(|_| Zero::zero()).unwrap_or(amount) } else if let Ok(currency) = T::CurrencyType::try_from(currency_id) { T::Currencies::slash(currency, who, amount) } else { - T::MarketAssets::slash(asset, who, amount) - .map(|b| amount.saturating_sub(b)) - .unwrap_or_else(|_| amount) + Self::withdraw(currency_id, who, amount).map(|_| Zero::zero()).unwrap_or(amount) } - } else if let Ok(asset) = T::CampaignAssetType::try_from(currency_id) { - T::CampaignAssets::slash(asset, who, amount) - .map(|b| amount.saturating_sub(b)) - .unwrap_or_else(|_| amount) - } else if let Ok(asset) = T::CustomAssetType::try_from(currency_id) { - T::CustomAssets::slash(asset, who, amount) - .map(|b| amount.saturating_sub(b)) - .unwrap_or_else(|_| amount) + } else if T::CampaignAssetType::try_from(currency_id).is_ok() { + Self::withdraw(currency_id, who, amount).map(|_| Zero::zero()).unwrap_or(amount) + } else if T::CustomAssetType::try_from(currency_id).is_ok() { + Self::withdraw(currency_id, who, amount).map(|_| Zero::zero()).unwrap_or(amount) } else if let Ok(currency) = T::CurrencyType::try_from(currency_id) { T::Currencies::slash(currency, who, amount) } else { diff --git a/zrml/asset-router/src/pallet_impl/multi_lockable_currency.rs b/zrml/asset-router/src/pallet_impl/multi_lockable_currency.rs index 55e9d5779..8a1fb832c 100644 --- a/zrml/asset-router/src/pallet_impl/multi_lockable_currency.rs +++ b/zrml/asset-router/src/pallet_impl/multi_lockable_currency.rs @@ -18,7 +18,7 @@ use crate::pallet::*; impl MultiLockableCurrency for Pallet { - type Moment = T::BlockNumber; + type Moment = BlockNumberFor; fn set_lock( lock_id: LockIdentifier, diff --git a/zrml/asset-router/src/pallet_impl/unbalanced.rs b/zrml/asset-router/src/pallet_impl/unbalanced.rs index fc91c047a..ecffc76c2 100644 --- a/zrml/asset-router/src/pallet_impl/unbalanced.rs +++ b/zrml/asset-router/src/pallet_impl/unbalanced.rs @@ -16,15 +16,40 @@ // along with Zeitgeist. If not, see . use crate::pallet::*; -use frame_support::traits::tokens::fungibles::Unbalanced; +use frame_support::traits::tokens::fungibles::{Dust, Unbalanced}; impl Unbalanced for Pallet { - fn set_balance( + fn handle_raw_dust(asset: Self::AssetId, amount: Self::Balance) { + let _ = route_call_with_trait!(asset, Unbalanced, handle_raw_dust, amount); + } + + fn handle_dust(dust: Dust) { + let Dust(currency_id, amount) = dust; + + if let Ok(asset) = T::MarketAssetType::try_from(currency_id) { + // Route "pre new asset system" market assets to `CurrencyType` + if T::MarketAssets::asset_exists(asset) { + T::MarketAssets::handle_dust(Dust(asset, amount)); + } else if let Ok(currency) = T::CurrencyType::try_from(currency_id) { + T::Currencies::handle_dust(Dust(currency, amount)); + } else { + T::MarketAssets::handle_dust(Dust(asset, amount)); + } + } else if let Ok(asset) = T::CampaignAssetType::try_from(currency_id) { + T::CampaignAssets::handle_dust(Dust(asset, amount)); + } else if let Ok(asset) = T::CustomAssetType::try_from(currency_id) { + T::CustomAssets::handle_dust(Dust(asset, amount)); + } else if let Ok(currency) = T::CurrencyType::try_from(currency_id) { + T::Currencies::handle_dust(Dust(currency, amount)); + } + } + + fn write_balance( asset: Self::AssetId, who: &T::AccountId, amount: Self::Balance, - ) -> DispatchResult { - route_call_with_trait!(asset, Unbalanced, set_balance, who, amount)? + ) -> Result, DispatchError> { + route_call_with_trait!(asset, Unbalanced, write_balance, who, amount)? } fn set_total_issuance(asset: Self::AssetId, amount: Self::Balance) { @@ -35,33 +60,36 @@ impl Unbalanced for Pallet { asset: Self::AssetId, who: &T::AccountId, amount: Self::Balance, + precision: Precision, + preservation: Preservation, + force: Fortitude, ) -> Result { - route_call_with_trait!(asset, Unbalanced, decrease_balance, who, amount)? - } - - fn decrease_balance_at_most( - asset: Self::AssetId, - who: &T::AccountId, - amount: Self::Balance, - ) -> Self::Balance { - route_call_with_trait!(asset, Unbalanced, decrease_balance_at_most, who, amount) - .unwrap_or(Zero::zero()) + route_call_with_trait!( + asset, + Unbalanced, + decrease_balance, + who, + amount, + precision, + preservation, + force + )? } fn increase_balance( asset: Self::AssetId, who: &T::AccountId, amount: Self::Balance, + precision: Precision, ) -> Result { - route_call_with_trait!(asset, Unbalanced, increase_balance, who, amount)? + route_call_with_trait!(asset, Unbalanced, increase_balance, who, amount, precision)? } - fn increase_balance_at_most( - asset: Self::AssetId, - who: &T::AccountId, - amount: Self::Balance, - ) -> Self::Balance { - route_call_with_trait!(asset, Unbalanced, increase_balance_at_most, who, amount) - .unwrap_or(Zero::zero()) + fn deactivate(asset: Self::AssetId, amount: Self::Balance) { + let _ = route_call_with_trait!(asset, Unbalanced, deactivate, amount); + } + + fn reactivate(asset: Self::AssetId, amount: Self::Balance) { + let _ = route_call_with_trait!(asset, Unbalanced, reactivate, amount); } } diff --git a/zrml/asset-router/src/tests/inspect.rs b/zrml/asset-router/src/tests/inspect.rs index e762a3115..ea71939c2 100644 --- a/zrml/asset-router/src/tests/inspect.rs +++ b/zrml/asset-router/src/tests/inspect.rs @@ -18,23 +18,36 @@ #![cfg(test)] use super::*; +use crate::*; use frame_support::traits::tokens::fungibles::Inspect; -fn test_helper(asset: Assets, initial_amount: ::Balance) { +fn test_helper( + asset: Assets, + initial_amount: ::Balance, + min_balance: ::Balance, +) { assert_ok!(>::deposit( asset, &ALICE, initial_amount )); assert!(AssetRouter::asset_exists(asset)); - assert_eq!(AssetRouter::total_issuance(asset), initial_amount); + assert_eq!(>::total_issuance(asset), initial_amount); + assert_eq!(AssetRouter::active_issuance(asset), initial_amount); assert_eq!(AssetRouter::balance(asset, &ALICE), initial_amount); - assert_eq!(AssetRouter::reducible_balance(asset, &ALICE, false), initial_amount); + assert_eq!(AssetRouter::free_balance(asset, &ALICE), initial_amount); + assert_eq!( + AssetRouter::reducible_balance(asset, &ALICE, Preservation::Protect, Fortitude::Force), + initial_amount - min_balance + ); assert_eq!( AssetRouter::can_withdraw(asset, &ALICE, initial_amount), WithdrawConsequence::ReducedToZero(0) ); - assert_eq!(AssetRouter::can_deposit(asset, &ALICE, 1, true), DepositConsequence::Success); + assert_eq!( + AssetRouter::can_deposit(asset, &ALICE, 1, Provenance::Minted), + DepositConsequence::Success + ); } #[test] @@ -47,7 +60,7 @@ fn routes_campaign_assets_correctly() { >::minimum_balance(CAMPAIGN_ASSET), CAMPAIGN_ASSET_MIN_BALANCE ); - test_helper(CAMPAIGN_ASSET, CAMPAIGN_ASSET_INITIAL_AMOUNT); + test_helper(CAMPAIGN_ASSET, CAMPAIGN_ASSET_INITIAL_AMOUNT, CAMPAIGN_ASSET_MIN_BALANCE); assert_eq!(>::total_issuance(CUSTOM_ASSET_INTERNAL), 0); assert_eq!(>::total_issuance(MARKET_ASSET_INTERNAL), 0); assert_eq!(>::total_issuance(CURRENCY_INTERNAL), 0); @@ -64,7 +77,7 @@ fn routes_custom_assets_correctly() { >::minimum_balance(CUSTOM_ASSET), CUSTOM_ASSET_MIN_BALANCE ); - test_helper(CUSTOM_ASSET, CUSTOM_ASSET_INITIAL_AMOUNT); + test_helper(CUSTOM_ASSET, CUSTOM_ASSET_INITIAL_AMOUNT, CUSTOM_ASSET_MIN_BALANCE); assert_eq!( >::total_issuance(CAMPAIGN_ASSET_INTERNAL), 0 @@ -84,7 +97,7 @@ fn routes_market_assets_correctly() { >::minimum_balance(MARKET_ASSET), MARKET_ASSET_MIN_BALANCE ); - test_helper(MARKET_ASSET, MARKET_ASSET_INITIAL_AMOUNT); + test_helper(MARKET_ASSET, MARKET_ASSET_INITIAL_AMOUNT, MARKET_ASSET_MIN_BALANCE); assert_eq!( >::total_issuance(CAMPAIGN_ASSET_INTERNAL), 0 @@ -97,11 +110,17 @@ fn routes_market_assets_correctly() { #[test] fn routes_currencies_correctly() { ExtBuilder::default().build().execute_with(|| { - assert_eq!(AssetRouter::minimum_balance(CURRENCY), CURRENCY_MIN_BALANCE); - assert_eq!(AssetRouter::minimum_balance(CURRENCY_OLD_OUTCOME), CURRENCY_MIN_BALANCE); + assert_eq!( + >::minimum_balance(CURRENCY), + CURRENCY_MIN_BALANCE + ); + assert_eq!( + >::minimum_balance(CURRENCY_OLD_OUTCOME), + CURRENCY_MIN_BALANCE + ); - test_helper(CURRENCY, CURRENCY_INITIAL_AMOUNT); - test_helper(CURRENCY_OLD_OUTCOME, CURRENCY_INITIAL_AMOUNT); + test_helper(CURRENCY, CURRENCY_INITIAL_AMOUNT, CURRENCY_MIN_BALANCE); + test_helper(CURRENCY_OLD_OUTCOME, CURRENCY_INITIAL_AMOUNT, CURRENCY_MIN_BALANCE); assert_eq!( >::total_issuance(CAMPAIGN_ASSET_INTERNAL), diff --git a/zrml/asset-router/src/tests/multi_currency.rs b/zrml/asset-router/src/tests/multi_currency.rs index 0e6802305..ddc0f7233 100644 --- a/zrml/asset-router/src/tests/multi_currency.rs +++ b/zrml/asset-router/src/tests/multi_currency.rs @@ -120,15 +120,15 @@ fn routes_currencies_correctly() { } #[test_case(0, Some(0); "zero")] -#[test_case(Amount::max_value(), Some(Amount::max_value().unsigned_abs() as Balance); "max")] -#[test_case(Amount::min_value(), None; "min")] -#[test_case(Amount::min_value() + 1, Some((Amount::min_value() + 1).unsigned_abs() as Balance); "min_plus_one")] +#[test_case(Amount::MAX, Some(Amount::MAX.unsigned_abs() as Balance); "max")] +#[test_case(Amount::MIN, None; "min")] +#[test_case(Amount::MIN + 1, Some((Amount::MIN + 1).unsigned_abs() as Balance); "min_plus_one")] fn update_balance_handles_overflows_correctly(update: Amount, expected: Option) { ExtBuilder::default().build().execute_with(|| { assert_ok!(AssetRouter::create(CAMPAIGN_ASSET, ALICE, true, CAMPAIGN_ASSET_MIN_BALANCE)); if update.is_negative() { - assert_ok!(AssetRouter::update_balance(CAMPAIGN_ASSET, &ALICE, Amount::max_value())); + assert_ok!(AssetRouter::update_balance(CAMPAIGN_ASSET, &ALICE, Amount::MAX)); } if let Some(expected_inner) = expected { @@ -137,7 +137,7 @@ fn update_balance_handles_overflows_correctly(update: Amount, expected: Option::Balance, - min_balance: ::Balance, -) { - assert_eq!(AssetRouter::total_balance(asset, &ALICE), initial_amount); - assert_ok!(AssetRouter::increase_balance(asset, &ALICE, 1)); - assert_eq!(AssetRouter::total_balance(asset, &ALICE), initial_amount + 1); - assert_ok!(AssetRouter::decrease_balance(asset, &ALICE, 1)); - assert_eq!(AssetRouter::total_balance(asset, &ALICE), initial_amount); - assert_eq!(AssetRouter::increase_balance_at_most(asset, &ALICE, 1), 1); - assert_eq!(AssetRouter::total_balance(asset, &ALICE), initial_amount + 1); - let to_decrease = initial_amount + 2 - min_balance; +fn test_helper(asset: Assets, initial_amount: ::Balance) { assert_eq!( - AssetRouter::decrease_balance_at_most(asset, &ALICE, to_decrease), + >::total_balance(asset, &ALICE), + initial_amount + ); + assert_ok!(AssetRouter::increase_balance(asset, &ALICE, 1, Precision::Exact)); + assert_eq!( + >::total_balance(asset, &ALICE), initial_amount + 1 ); - assert_eq!(AssetRouter::total_balance(asset, &ALICE), 0); + assert_ok!(AssetRouter::decrease_balance( + asset, + &ALICE, + 1, + Precision::Exact, + Preservation::Expendable, + Fortitude::Polite + )); + assert_eq!( + >::total_balance(asset, &ALICE), + initial_amount + ); AssetRouter::set_total_issuance(asset, 1337); - assert_eq!(AssetRouter::total_issuance(asset), 1337); + assert_eq!(>::total_issuance(asset), 1337); + assert_storage_noop!(AssetRouter::deactivate(asset, 1)); + assert_storage_noop!(AssetRouter::reactivate(asset, 1)); + assert_storage_noop!(AssetRouter::handle_raw_dust(asset, 1)); } #[test] @@ -49,20 +60,29 @@ fn routes_campaign_assets_correctly() { assert_ok!(AssetRouter::create(CAMPAIGN_ASSET, ALICE, true, CAMPAIGN_ASSET_MIN_BALANCE)); assert_ok!(AssetRouter::deposit(CAMPAIGN_ASSET, &ALICE, CAMPAIGN_ASSET_INITIAL_AMOUNT)); - test_helper(CAMPAIGN_ASSET, CAMPAIGN_ASSET_INITIAL_AMOUNT, CAMPAIGN_ASSET_MIN_BALANCE); + test_helper(CAMPAIGN_ASSET, CAMPAIGN_ASSET_INITIAL_AMOUNT); - assert_eq!(AssetRouter::total_issuance(CUSTOM_ASSET), 0); - assert_eq!(AssetRouter::total_issuance(MARKET_ASSET), 0); - assert_eq!(AssetRouter::total_issuance(CURRENCY), 0); + assert_eq!(>::total_issuance(CUSTOM_ASSET), 0); + assert_eq!(>::total_issuance(MARKET_ASSET), 0); + assert_eq!(>::total_issuance(CURRENCY), 0); }); } #[test] #[should_panic] -fn campaign_assets_panic_on_set_balance() { +fn campaign_assets_panic_on_write_balance() { ExtBuilder::default().build().execute_with(|| { assert_ok!(AssetRouter::create(CAMPAIGN_ASSET, ALICE, true, CAMPAIGN_ASSET_MIN_BALANCE)); - let _ = AssetRouter::set_balance(CAMPAIGN_ASSET, &ALICE, 42); + let _ = AssetRouter::write_balance(CAMPAIGN_ASSET, &ALICE, 42); + }); +} + +#[test] +#[should_panic] +fn campaign_assets_panic_on_handle_dust() { + ExtBuilder::default().build().execute_with(|| { + assert_ok!(AssetRouter::create(CAMPAIGN_ASSET, ALICE, true, CAMPAIGN_ASSET_MIN_BALANCE)); + AssetRouter::handle_dust(Dust(CAMPAIGN_ASSET, 1)); }); } @@ -72,20 +92,29 @@ fn routes_custom_assets_correctly() { assert_ok!(AssetRouter::create(CUSTOM_ASSET, ALICE, true, CUSTOM_ASSET_MIN_BALANCE)); assert_ok!(AssetRouter::deposit(CUSTOM_ASSET, &ALICE, CUSTOM_ASSET_INITIAL_AMOUNT)); - test_helper(CUSTOM_ASSET, CUSTOM_ASSET_INITIAL_AMOUNT, CUSTOM_ASSET_MIN_BALANCE); + test_helper(CUSTOM_ASSET, CUSTOM_ASSET_INITIAL_AMOUNT); + + assert_eq!(>::total_issuance(CAMPAIGN_ASSET), 0); + assert_eq!(>::total_issuance(MARKET_ASSET), 0); + assert_eq!(>::total_issuance(CURRENCY), 0); + }); +} - assert_eq!(AssetRouter::total_issuance(CAMPAIGN_ASSET), 0); - assert_eq!(AssetRouter::total_issuance(MARKET_ASSET), 0); - assert_eq!(AssetRouter::total_issuance(CURRENCY), 0); +#[test] +#[should_panic] +fn custom_assets_panic_on_write_balance() { + ExtBuilder::default().build().execute_with(|| { + assert_ok!(AssetRouter::create(CUSTOM_ASSET, ALICE, true, CUSTOM_ASSET_MIN_BALANCE)); + let _ = AssetRouter::write_balance(CUSTOM_ASSET, &ALICE, 42); }); } #[test] #[should_panic] -fn custom_assets_panic_on_set_balance() { +fn custom_assets_panic_on_handle_dust() { ExtBuilder::default().build().execute_with(|| { assert_ok!(AssetRouter::create(CUSTOM_ASSET, ALICE, true, CUSTOM_ASSET_MIN_BALANCE)); - let _ = AssetRouter::set_balance(CUSTOM_ASSET, &ALICE, 42); + AssetRouter::handle_dust(Dust(CUSTOM_ASSET, 1)); }); } @@ -95,31 +124,43 @@ fn routes_market_assets_correctly() { assert_ok!(AssetRouter::create(MARKET_ASSET, ALICE, true, MARKET_ASSET_MIN_BALANCE)); assert_ok!(AssetRouter::deposit(MARKET_ASSET, &ALICE, MARKET_ASSET_INITIAL_AMOUNT)); - test_helper(MARKET_ASSET, MARKET_ASSET_INITIAL_AMOUNT, MARKET_ASSET_MIN_BALANCE); + test_helper(MARKET_ASSET, MARKET_ASSET_INITIAL_AMOUNT); - assert_eq!(AssetRouter::total_issuance(CAMPAIGN_ASSET), 0); - assert_eq!(AssetRouter::total_issuance(CUSTOM_ASSET), 0); - assert_eq!(AssetRouter::total_issuance(CURRENCY), 0); + assert_eq!(>::total_issuance(CAMPAIGN_ASSET), 0); + assert_eq!(>::total_issuance(CUSTOM_ASSET), 0); + assert_eq!(>::total_issuance(CURRENCY), 0); }); } #[test] #[should_panic] -fn market_assets_panic_on_set_balance() { +fn market_assets_panic_on_write_balance() { ExtBuilder::default().build().execute_with(|| { assert_ok!(AssetRouter::create(MARKET_ASSET, ALICE, true, MARKET_ASSET_MIN_BALANCE)); - let _ = AssetRouter::set_balance(MARKET_ASSET, &ALICE, 42); + let _ = AssetRouter::write_balance(MARKET_ASSET, &ALICE, 42); }); } #[test] -fn routes_currencies_correctly() { +#[should_panic] +fn market_assets_panic_on_handle_dust() { ExtBuilder::default().build().execute_with(|| { - assert_ok!(AssetRouter::set_balance(CURRENCY, &ALICE, CURRENCY_INITIAL_AMOUNT)); - test_helper(CURRENCY, CURRENCY_INITIAL_AMOUNT, CURRENCY_MIN_BALANCE); + assert_ok!(AssetRouter::create(MARKET_ASSET, ALICE, true, MARKET_ASSET_MIN_BALANCE)); + AssetRouter::handle_dust(Dust(MARKET_ASSET, 1)); + }); +} - assert_eq!(AssetRouter::total_issuance(CAMPAIGN_ASSET), 0); - assert_eq!(AssetRouter::total_issuance(CUSTOM_ASSET), 0); - assert_eq!(AssetRouter::total_issuance(MARKET_ASSET), 0); +#[test] +fn routes_currencies_correctly() { + ExtBuilder::default().build().execute_with(|| { + assert_ok!(AssetRouter::write_balance(CURRENCY, &ALICE, CURRENCY_INITIAL_AMOUNT)); + test_helper(CURRENCY, CURRENCY_INITIAL_AMOUNT); + assert_storage_noop!(AssetRouter::handle_dust(Dust(CURRENCY, 1))); + assert_ok!(AssetRouter::write_balance(CURRENCY, &ALICE, CURRENCY_MIN_BALANCE)); + assert_eq!(AssetRouter::free_balance(CURRENCY, &ALICE), CURRENCY_MIN_BALANCE); + + assert_eq!(>::total_issuance(CAMPAIGN_ASSET), 0); + assert_eq!(>::total_issuance(CUSTOM_ASSET), 0); + assert_eq!(>::total_issuance(MARKET_ASSET), 0); }); } diff --git a/zrml/authorized/Cargo.toml b/zrml/authorized/Cargo.toml index c25afbea9..aa6655625 100644 --- a/zrml/authorized/Cargo.toml +++ b/zrml/authorized/Cargo.toml @@ -37,6 +37,6 @@ try-runtime = [ [package] authors = ["Zeitgeist PM "] -edition = "2021" +edition.workspace = true name = "zrml-authorized" version = "0.5.2" diff --git a/zrml/authorized/src/benchmarks.rs b/zrml/authorized/src/benchmarks.rs index db649941b..658df6bc6 100644 --- a/zrml/authorized/src/benchmarks.rs +++ b/zrml/authorized/src/benchmarks.rs @@ -1,4 +1,4 @@ -// Copyright 2022-2023 Forecasting Technologies LTD. +// Copyright 2022-2024 Forecasting Technologies LTD. // Copyright 2021-2022 Zeitgeist PM LLC. // // This file is part of Zeitgeist. @@ -27,10 +27,7 @@ use crate::{ Pallet, }; use frame_benchmarking::benchmarks; -use frame_support::{ - dispatch::UnfilteredDispatchable, - traits::{EnsureOrigin, Get, Imbalance}, -}; +use frame_support::traits::{EnsureOrigin, Get, Imbalance, UnfilteredDispatchable}; use sp_runtime::traits::Saturating; use zeitgeist_primitives::{ traits::{DisputeApi, DisputeResolutionApi}, diff --git a/zrml/authorized/src/lib.rs b/zrml/authorized/src/lib.rs index 1e5644cb6..cef2b7483 100644 --- a/zrml/authorized/src/lib.rs +++ b/zrml/authorized/src/lib.rs @@ -44,7 +44,7 @@ mod pallet { traits::{Currency, Get, Hooks, IsType, StorageVersion}, PalletId, Twox64Concat, }; - use frame_system::pallet_prelude::OriginFor; + use frame_system::pallet_prelude::{BlockNumberFor, OriginFor}; use sp_runtime::{traits::Saturating, DispatchError, DispatchResult}; use zeitgeist_primitives::{ traits::{DisputeApi, DisputeMaxWeightApi, DisputeResolutionApi}, @@ -70,7 +70,7 @@ mod pallet { pub(crate) type MarketOf = Market< ::AccountId, BalanceOf, - ::BlockNumber, + BlockNumberFor, MomentOf, BaseAsset, MarketIdOf, @@ -134,18 +134,18 @@ mod pallet { /// The period, in which the authority can correct the outcome of a market. /// This value must not be zero. #[pallet::constant] - type CorrectionPeriod: Get; + type CorrectionPeriod: Get>; type DisputeResolution: DisputeResolutionApi< AccountId = Self::AccountId, - BlockNumber = Self::BlockNumber, + BlockNumber = BlockNumberFor, MarketId = MarketIdOf, Moment = MomentOf, >; type MarketCommons: MarketCommonsPalletApi< AccountId = Self::AccountId, - BlockNumber = Self::BlockNumber, + BlockNumber = BlockNumberFor, Balance = BalanceOf, >; @@ -181,7 +181,7 @@ mod pallet { } #[pallet::hooks] - impl Hooks for Pallet {} + impl Hooks> for Pallet {} #[pallet::pallet] #[pallet::storage_version(STORAGE_VERSION)] @@ -192,7 +192,7 @@ mod pallet { T: Config, { /// Return the resolution block number for the given market. - fn get_auto_resolve(market_id: &MarketIdOf) -> Option { + fn get_auto_resolve(market_id: &MarketIdOf) -> Option> { AuthorizedOutcomeReports::::get(market_id).map(|report| report.resolve_at) } @@ -246,7 +246,7 @@ mod pallet { type AccountId = T::AccountId; type Balance = BalanceOf; type NegativeImbalance = NegativeImbalanceOf; - type BlockNumber = T::BlockNumber; + type BlockNumber = BlockNumberFor; type MarketId = MarketIdOf; type Moment = MomentOf; type Origin = T::RuntimeOrigin; @@ -361,7 +361,7 @@ mod pallet { #[pallet::storage] #[pallet::getter(fn outcomes)] pub type AuthorizedOutcomeReports = - StorageMap<_, Twox64Concat, MarketIdOf, AuthorityReport, OptionQuery>; + StorageMap<_, Twox64Concat, MarketIdOf, AuthorityReport>, OptionQuery>; } #[cfg(any(feature = "runtime-benchmarks", test))] diff --git a/zrml/authorized/src/mock.rs b/zrml/authorized/src/mock.rs index 5669d8096..a3df02779 100644 --- a/zrml/authorized/src/mock.rs +++ b/zrml/authorized/src/mock.rs @@ -22,25 +22,19 @@ extern crate alloc; use crate::{self as zrml_authorized, mock_storage::pallet as mock_storage}; use alloc::{vec, vec::Vec}; -use frame_support::{ - construct_runtime, ord_parameter_types, - pallet_prelude::{DispatchError, Weight}, - traits::Everything, -}; -use frame_system::EnsureSignedBy; +use frame_support::{construct_runtime, ord_parameter_types, traits::Everything, weights::Weight}; +use frame_system::{mocking::MockBlock, EnsureSignedBy}; use sp_runtime::{ - testing::Header, traits::{BlakeTwo256, IdentityLookup}, + BuildStorage, DispatchError, }; use zeitgeist_primitives::{ constants::mock::{ - AuthorizedPalletId, BlockHashCount, CorrectionPeriod, MaxReserves, MinimumPeriod, BASE, + AuthorizedPalletId, BlockHashCount, CorrectionPeriod, ExistentialDeposit, MaxLocks, + MaxReserves, MinimumPeriod, BASE, }, traits::{DisputeResolutionApi, MarketOfDisputeResolutionApi}, - types::{ - AccountIdTest, Balance, BlockNumber, BlockTest, Hash, Index, MarketId, Moment, - UncheckedExtrinsicTest, - }, + types::{AccountIdTest, Balance, BlockNumber, Hash, MarketId, Moment}, }; pub const ALICE: AccountIdTest = 0; @@ -48,19 +42,14 @@ pub const BOB: AccountIdTest = 1; pub const CHARLIE: AccountIdTest = 2; construct_runtime!( - pub enum Runtime - where - Block = BlockTest, - NodeBlock = BlockTest, - UncheckedExtrinsic = UncheckedExtrinsicTest, - { - Authorized: zrml_authorized::{Event, Pallet, Storage}, - Balances: pallet_balances::{Call, Config, Event, Pallet, Storage}, - MarketCommons: zrml_market_commons::{Pallet, Storage}, - System: frame_system::{Call, Config, Event, Pallet, Storage}, - Timestamp: pallet_timestamp::{Pallet}, + pub enum Runtime { + Authorized: zrml_authorized, + Balances: pallet_balances, + MarketCommons: zrml_market_commons, + System: frame_system, + Timestamp: pallet_timestamp, // Just a mock storage for testing. - MockStorage: mock_storage::{Storage}, + MockStorage: mock_storage, } ); @@ -113,7 +102,7 @@ impl DisputeResolutionApi for MockResolution { impl crate::Config for Runtime { type Currency = Balances; - type RuntimeEvent = (); + type RuntimeEvent = RuntimeEvent; type CorrectionPeriod = CorrectionPeriod; type DisputeResolution = MockResolution; type MarketCommons = MarketCommons; @@ -131,18 +120,17 @@ impl frame_system::Config for Runtime { type AccountData = pallet_balances::AccountData; type AccountId = AccountIdTest; type BaseCallFilter = Everything; + type Block = MockBlock; type BlockHashCount = BlockHashCount; type BlockLength = (); - type BlockNumber = BlockNumber; type BlockWeights = (); type RuntimeCall = RuntimeCall; type DbWeight = (); - type RuntimeEvent = (); + type RuntimeEvent = RuntimeEvent; type Hash = Hash; type Hashing = BlakeTwo256; - type Header = Header; - type Index = Index; type Lookup = IdentityLookup; + type Nonce = u64; type MaxConsumers = frame_support::traits::ConstU32<16>; type OnKilledAccount = (); type OnNewAccount = (); @@ -158,9 +146,13 @@ impl pallet_balances::Config for Runtime { type AccountStore = System; type Balance = Balance; type DustRemoval = (); - type RuntimeEvent = (); - type ExistentialDeposit = (); - type MaxLocks = (); + type FreezeIdentifier = (); + type RuntimeHoldReason = (); + type RuntimeEvent = RuntimeEvent; + type ExistentialDeposit = ExistentialDeposit; + type MaxHolds = (); + type MaxFreezes = (); + type MaxLocks = MaxLocks; type MaxReserves = MaxReserves; type ReserveIdentifier = [u8; 8]; type WeightInfo = (); @@ -191,7 +183,7 @@ impl Default for ExtBuilder { impl ExtBuilder { pub fn build(self) -> sp_io::TestExternalities { - let mut t = frame_system::GenesisConfig::default().build_storage::().unwrap(); + let mut t = frame_system::GenesisConfig::::default().build_storage().unwrap(); // see the logs in tests when using `RUST_LOG=debug cargo test -- --nocapture` let _ = env_logger::builder().is_test(true).try_init(); diff --git a/zrml/authorized/src/mock_storage.rs b/zrml/authorized/src/mock_storage.rs index a58bb2748..cacbc6926 100644 --- a/zrml/authorized/src/mock_storage.rs +++ b/zrml/authorized/src/mock_storage.rs @@ -23,6 +23,7 @@ pub(crate) mod pallet { use core::marker::PhantomData; use frame_support::pallet_prelude::*; + use frame_system::pallet_prelude::BlockNumberFor; use zrml_market_commons::MarketCommonsPalletApi; pub(crate) type MarketIdOf = @@ -32,7 +33,7 @@ pub(crate) mod pallet { #[pallet::config] pub trait Config: frame_system::Config { - type MarketCommons: MarketCommonsPalletApi; + type MarketCommons: MarketCommonsPalletApi>; } #[pallet::pallet] @@ -43,7 +44,7 @@ pub(crate) mod pallet { pub(crate) type MarketIdsPerDisputeBlock = StorageMap< _, Twox64Concat, - T::BlockNumber, + BlockNumberFor, BoundedVec, CacheSize>, ValueQuery, >; diff --git a/zrml/authorized/src/tests.rs b/zrml/authorized/src/tests.rs index 81192a638..8780673ae 100644 --- a/zrml/authorized/src/tests.rs +++ b/zrml/authorized/src/tests.rs @@ -1,4 +1,4 @@ -// Copyright 2022-2023 Forecasting Technologies LTD. +// Copyright 2022-2024 Forecasting Technologies LTD. // Copyright 2021-2022 Zeitgeist PM LLC. // // This file is part of Zeitgeist. @@ -24,7 +24,8 @@ use crate::{ mock_storage::pallet as mock_storage, AuthorizedOutcomeReports, Error, }; -use frame_support::{assert_noop, assert_ok, dispatch::DispatchError}; +use frame_support::{assert_noop, assert_ok}; +use sp_runtime::DispatchError; use zeitgeist_primitives::{ traits::DisputeApi, types::{AuthorityReport, MarketDisputeMechanism, MarketStatus, OutcomeReport}, diff --git a/zrml/court/Cargo.toml b/zrml/court/Cargo.toml index 1920b8b65..cc79a5433 100644 --- a/zrml/court/Cargo.toml +++ b/zrml/court/Cargo.toml @@ -3,6 +3,7 @@ arrayvec = { workspace = true } frame-benchmarking = { workspace = true, optional = true } frame-support = { workspace = true } frame-system = { workspace = true } +log = { workspace = true } parity-scale-codec = { workspace = true, features = ["derive", "max-encoded-len"] } rand = { workspace = true, features = ["alloc", "std_rng"] } rand_chacha = { workspace = true } @@ -16,7 +17,7 @@ zrml-market-commons = { workspace = true } [dev-dependencies] env_logger = { workspace = true } pallet-balances = { workspace = true, features = ["default"] } -pallet-randomness-collective-flip = { workspace = true, features = ["default"] } +pallet-insecure-randomness-collective-flip = { workspace = true, features = ["default"] } pallet-timestamp = { workspace = true, features = ["default"] } pallet-treasury = { workspace = true, features = ["default"] } sp-io = { workspace = true, features = ["default"] } @@ -46,6 +47,6 @@ try-runtime = [ [package] authors = ["Zeitgeist PM "] -edition = "2021" +edition.workspace = true name = "zrml-court" version = "0.5.2" diff --git a/zrml/court/src/benchmarks.rs b/zrml/court/src/benchmarks.rs index f463facfc..ace5d2ce1 100644 --- a/zrml/court/src/benchmarks.rs +++ b/zrml/court/src/benchmarks.rs @@ -31,8 +31,8 @@ use crate::{ }; use alloc::{vec, vec::Vec}; use frame_benchmarking::{account, benchmarks, whitelisted_caller}; -use frame_support::traits::{Currency, Get, NamedReservableCurrency}; -use frame_system::RawOrigin; +use frame_support::traits::{Currency, Get, Imbalance, NamedReservableCurrency}; +use frame_system::{pallet_prelude::BlockNumberFor, RawOrigin}; use sp_arithmetic::Perbill; use sp_runtime::{ traits::{Bounded, Hash, Saturating, StaticLookup, Zero}, @@ -64,15 +64,16 @@ where metadata: vec![], oracle: account("oracle", 0, 0), period: MarketPeriod::Block( - 0u64.saturated_into::()..100u64.saturated_into::(), + 0u64.saturated_into::>() + ..100u64.saturated_into::>(), ), deadlines: Deadlines { - grace_period: 1_u64.saturated_into::(), - oracle_duration: 1_u64.saturated_into::(), - dispute_duration: 1_u64.saturated_into::(), + grace_period: 1_u64.saturated_into::>(), + oracle_duration: 1_u64.saturated_into::>(), + dispute_duration: 1_u64.saturated_into::>(), }, report: Some(Report { - at: 1u64.saturated_into::(), + at: 1u64.saturated_into::>(), by: account("oracle", 0, 0), outcome: ORACLE_REPORT, }), @@ -128,7 +129,7 @@ where court_participant: juror.clone(), consumed_stake, joined_at, - uneligible_index: 0u64.saturated_into::(), + uneligible_index: 0u64.saturated_into::>(), uneligible_stake: BalanceOf::::zero(), }; match pool.binary_search_by_key(&(stake, &juror), |pool_item| { @@ -178,10 +179,10 @@ fn setup_court() -> Result<(crate::MarketIdOf, CourtId), &'static str> where T: Config, { - >::set_block_number(1u64.saturated_into::()); + >::set_block_number(1u64.saturated_into::>()); let now = >::block_number(); - >::put(now + 1u64.saturated_into::()); + >::put(now + 1u64.saturated_into::>()); let market_id = T::MarketCommons::push_market(get_market::()).unwrap(); Court::::on_dispute(&market_id, &get_market::()).unwrap(); @@ -262,7 +263,7 @@ benchmarks! { joined_at_before, ); >::set_block_number( - joined_at_before + 1u64.saturated_into::(), + joined_at_before + 1u64.saturated_into::>(), ); let new_stake = T::MinJurorStake::get() @@ -298,7 +299,7 @@ benchmarks! { joined_at_before, ); >::set_block_number( - joined_at_before + 1u64.saturated_into::(), + joined_at_before + 1u64.saturated_into::>(), ); let juror_pool = >::get(); @@ -411,7 +412,7 @@ benchmarks! { >::insert(court_id, draws); >::set_block_number( - pre_vote + 1u64.saturated_into::(), + pre_vote + 1u64.saturated_into::>(), ); let commitment_vote = Default::default(); @@ -466,7 +467,7 @@ benchmarks! { >::insert(court_id, draws); >::set_block_number( - pre_vote + 1u64.saturated_into::(), + pre_vote + 1u64.saturated_into::>(), ); }: _(RawOrigin::Signed(caller), court_id, denounced_juror_unlookup, vote_item.clone(), salt) verify { @@ -515,7 +516,7 @@ benchmarks! { >::insert(court_id, draws); >::set_block_number( - vote_end + 1u64.saturated_into::() + vote_end + 1u64.saturated_into::>() ); }: _(RawOrigin::Signed(caller.clone()), court_id, vote_item.clone(), salt) verify { @@ -587,9 +588,9 @@ benchmarks! { } >::insert(court_id, draws); - >::set_block_number(aggregation + 1u64.saturated_into::()); + >::set_block_number(aggregation + 1u64.saturated_into::>()); let now = >::block_number(); - >::put(now + 1u64.saturated_into::()); + >::put(now + 1u64.saturated_into::>()); let new_resolve_at = >::get() + T::VotePeriod::get() @@ -699,7 +700,7 @@ benchmarks! { let r in 0..62; let now = >::block_number(); - let pre_vote_end = now + 1u64.saturated_into::(); + let pre_vote_end = now + 1u64.saturated_into::>(); >::put(pre_vote_end); let appeal_end = pre_vote_end @@ -763,7 +764,8 @@ benchmarks! { for i in 0..a { let backer = account("backer", i, 0); let bond = T::MinJurorStake::get(); - let _ = T::Currency::deposit_creating(&backer, bond); + let deposit = bond.saturating_add(T::Currency::minimum_balance()); + assert_eq!(T::Currency::deposit_creating(&backer, deposit).peek(), deposit); T::Currency::reserve_named(&Court::::reserve_id(), &backer, bond).unwrap(); let appeal_info = AppealInfo { backer, @@ -813,7 +815,8 @@ benchmarks! { for i in 0..a { let backer = account("backer", i, 0); let bond = T::MinJurorStake::get(); - let _ = T::Currency::deposit_creating(&backer, bond); + let deposit = bond.saturating_add(T::Currency::minimum_balance()); + assert_eq!(T::Currency::deposit_creating(&backer, deposit).peek(), deposit); T::Currency::reserve_named(&Court::::reserve_id(), &backer, bond).unwrap(); let appeal_info = AppealInfo { backer, diff --git a/zrml/court/src/lib.rs b/zrml/court/src/lib.rs index d3c83f8c2..7e6b8b8f4 100644 --- a/zrml/court/src/lib.rs +++ b/zrml/court/src/lib.rs @@ -34,17 +34,19 @@ use alloc::{ use core::marker::PhantomData; use frame_support::{ dispatch::DispatchResult, - ensure, log, + ensure, pallet_prelude::{ ConstU32, Decode, DispatchResultWithPostInfo, Encode, EnsureOrigin, Hooks, OptionQuery, - StorageMap, StorageValue, TypeInfo, ValueQuery, Weight, + StorageMap, StorageValue, TypeInfo, ValueQuery, }, traits::{ Currency, Get, Imbalance, IsType, LockIdentifier, LockableCurrency, NamedReservableCurrency, OnUnbalanced, Randomness, ReservableCurrency, StorageVersion, WithdrawReasons, }, - transactional, Blake2_128Concat, BoundedVec, PalletId, RuntimeDebug, Twox64Concat, + transactional, + weights::Weight, + Blake2_128Concat, BoundedVec, PalletId, Twox64Concat, }; use frame_system::{ ensure_signed, @@ -58,7 +60,7 @@ use sp_arithmetic::{ }; use sp_runtime::{ traits::{AccountIdConversion, CheckedDiv, Hash, Saturating, StaticLookup, Zero}, - DispatchError, Perbill, SaturatedConversion, + DispatchError, Perbill, RuntimeDebug, SaturatedConversion, }; use zeitgeist_macros::unreachable_non_terminating; use zeitgeist_primitives::{ @@ -97,19 +99,19 @@ mod pallet { /// The expected blocks per year to calculate the inflation emission. #[pallet::constant] - type BlocksPerYear: Get; + type BlocksPerYear: Get>; /// The time in which the jurors can cast their commitment vote. #[pallet::constant] - type VotePeriod: Get; + type VotePeriod: Get>; /// The time in which the jurors should reveal their commitment vote. #[pallet::constant] - type AggregationPeriod: Get; + type AggregationPeriod: Get>; /// The time in which a court case can get appealed. #[pallet::constant] - type AppealPeriod: Get; + type AppealPeriod: Get>; /// The court lock identifier. #[pallet::constant] @@ -122,12 +124,12 @@ mod pallet { /// The currency implementation used to transfer, lock and reserve tokens. type Currency: Currency + NamedReservableCurrency - + LockableCurrency; + + LockableCurrency>; /// The functionality to allow controlling the markets resolution time. type DisputeResolution: DisputeResolutionApi< AccountId = Self::AccountId, - BlockNumber = Self::BlockNumber, + BlockNumber = BlockNumberFor, MarketId = MarketIdOf, Moment = MomentOf, >; @@ -137,12 +139,12 @@ mod pallet { /// The inflation period in which new tokens are minted. #[pallet::constant] - type InflationPeriod: Get; + type InflationPeriod: Get>; /// Market commons type MarketCommons: MarketCommonsPalletApi< AccountId = Self::AccountId, - BlockNumber = Self::BlockNumber, + BlockNumber = BlockNumberFor, Balance = BalanceOf, >; @@ -184,11 +186,11 @@ mod pallet { type MonetaryGovernanceOrigin: EnsureOrigin; /// Randomness source - type Random: Randomness; + type Random: Randomness>; /// The global interval which schedules the start of new court vote periods. #[pallet::constant] - type RequestInterval: Get; + type RequestInterval: Get>; /// Handler for slashed funds. type Slash: OnUnbalanced>; @@ -222,7 +224,7 @@ mod pallet { pub(crate) type MarketOf = Market< AccountIdOf, BalanceOf, - ::BlockNumber, + BlockNumberFor, MomentOf, BaseAsset, MarketIdOf, @@ -230,7 +232,7 @@ mod pallet { pub(crate) type HashOf = ::Hash; pub(crate) type AccountIdLookupOf = <::Lookup as StaticLookup>::Source; - pub(crate) type CourtOf = CourtInfo<::BlockNumber, AppealsOf>; + pub(crate) type CourtOf = CourtInfo, AppealsOf>; pub(crate) type DelegatedStakesOf = BoundedVec<(AccountIdOf, BalanceOf), ::MaxDelegations>; pub(crate) type SelectionValueOf = SelectionValue, DelegatedStakesOf>; @@ -296,7 +298,7 @@ mod pallet { /// The future block number when jurors should start voting. /// This is useful for the user experience of the jurors to vote for multiple courts at once. #[pallet::storage] - pub type RequestBlock = StorageValue<_, T::BlockNumber, ValueQuery>; + pub type RequestBlock = StorageValue<_, BlockNumberFor, ValueQuery>; #[pallet::type_value] pub fn DefaultYearlyInflation() -> Perbill { @@ -489,8 +491,8 @@ 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 { let mut total_weight: Weight = Weight::zero(); total_weight = total_weight.saturating_add(Self::handle_inflation(now)); total_weight = total_weight.saturating_add(T::DbWeight::get().reads(1)); @@ -1363,7 +1365,7 @@ mod pallet { } // Handle the external incentivisation of the court system. - pub(crate) fn handle_inflation(now: T::BlockNumber) -> Weight { + pub(crate) fn handle_inflation(now: BlockNumberFor) -> Weight { let inflation_period = T::InflationPeriod::get(); match now.checked_rem(&inflation_period) { Some(rem) if rem.is_zero() => (), @@ -1968,7 +1970,7 @@ mod pallet { pub(crate) fn check_appealable_market( court_id: CourtId, court: &CourtOf, - now: T::BlockNumber, + now: BlockNumberFor, ) -> Result<(), DispatchError> { if let Some(market_id) = >::get(court_id) { let market = T::MarketCommons::market(&market_id)?; @@ -2308,7 +2310,7 @@ mod pallet { type AccountId = T::AccountId; type Balance = BalanceOf; type NegativeImbalance = NegativeImbalanceOf; - type BlockNumber = T::BlockNumber; + type BlockNumber = BlockNumberFor; type MarketId = MarketIdOf; type Moment = MomentOf; type Origin = T::RuntimeOrigin; diff --git a/zrml/court/src/mock.rs b/zrml/court/src/mock.rs index 6af67d134..ccfba25a7 100644 --- a/zrml/court/src/mock.rs +++ b/zrml/court/src/mock.rs @@ -26,23 +26,20 @@ use frame_support::{ traits::{Everything, Hooks, NeverEnsureOrigin}, PalletId, }; -use frame_system::{EnsureRoot, EnsureSignedBy}; +use frame_system::{mocking::MockBlock, EnsureRoot, EnsureSignedBy}; use sp_runtime::{ - testing::Header, traits::{BlakeTwo256, IdentityLookup}, + BuildStorage, }; use zeitgeist_primitives::{ constants::mock::{ AggregationPeriod, AppealBond, AppealPeriod, BlockHashCount, BlocksPerYear, CourtPalletId, - InflationPeriod, LockId, MaxAppeals, MaxApprovals, MaxCourtParticipants, MaxDelegations, - MaxReserves, MaxSelectedDraws, MaxYearlyInflation, MinJurorStake, MinimumPeriod, - RequestInterval, VotePeriod, BASE, + ExistentialDeposit, InflationPeriod, LockId, MaxAppeals, MaxApprovals, + MaxCourtParticipants, MaxDelegations, MaxLocks, MaxReserves, MaxSelectedDraws, + MaxYearlyInflation, MinJurorStake, MinimumPeriod, RequestInterval, VotePeriod, BASE, }, traits::{DisputeResolutionApi, MarketOfDisputeResolutionApi}, - types::{ - AccountIdTest, Balance, BlockNumber, BlockTest, Hash, Index, MarketId, Moment, - UncheckedExtrinsicTest, - }, + types::{AccountIdTest, Balance, BlockNumber, Hash, MarketId, Moment}, }; pub const ALICE: AccountIdTest = 0; @@ -63,20 +60,15 @@ parameter_types! { } construct_runtime!( - pub enum Runtime - where - Block = BlockTest, - NodeBlock = BlockTest, - UncheckedExtrinsic = UncheckedExtrinsicTest, - { - Balances: pallet_balances::{Call, Config, Event, Pallet, Storage}, - Court: zrml_court::{Event, Pallet, Storage}, - MarketCommons: zrml_market_commons::{Pallet, Storage}, - System: frame_system::{Call, Config, Event, Pallet, Storage}, - Timestamp: pallet_timestamp::{Pallet}, - Treasury: pallet_treasury::{Call, Event, Pallet, Storage}, + pub enum Runtime { + Balances: pallet_balances, + Court: zrml_court, + MarketCommons: zrml_market_commons, + System: frame_system, + Timestamp: pallet_timestamp, + Treasury: pallet_treasury, // Just a mock storage for testing. - MockStorage: mock_storage::{Storage}, + MockStorage: mock_storage, } ); @@ -161,18 +153,17 @@ impl frame_system::Config for Runtime { type AccountData = pallet_balances::AccountData; type AccountId = AccountIdTest; type BaseCallFilter = Everything; + type Block = MockBlock; type BlockHashCount = BlockHashCount; type BlockLength = (); - type BlockNumber = BlockNumber; type BlockWeights = (); type RuntimeCall = RuntimeCall; type DbWeight = (); type RuntimeEvent = RuntimeEvent; type Hash = Hash; type Hashing = BlakeTwo256; - type Header = Header; - type Index = Index; type Lookup = IdentityLookup; + type Nonce = u64; type MaxConsumers = frame_support::traits::ConstU32<16>; type OnKilledAccount = (); type OnNewAccount = (); @@ -188,9 +179,13 @@ impl pallet_balances::Config for Runtime { type AccountStore = System; type Balance = Balance; type DustRemoval = (); + type FreezeIdentifier = (); + type RuntimeHoldReason = (); type RuntimeEvent = RuntimeEvent; - type ExistentialDeposit = (); - type MaxLocks = (); + type ExistentialDeposit = ExistentialDeposit; + type MaxHolds = (); + type MaxFreezes = (); + type MaxLocks = MaxLocks; type MaxReserves = MaxReserves; type ReserveIdentifier = [u8; 8]; type WeightInfo = (); @@ -249,7 +244,7 @@ impl Default for ExtBuilder { impl ExtBuilder { pub fn build(self) -> sp_io::TestExternalities { - let mut t = frame_system::GenesisConfig::default().build_storage::().unwrap(); + let mut t = frame_system::GenesisConfig::::default().build_storage().unwrap(); // see the logs in tests when using `RUST_LOG=debug cargo test -- --nocapture` let _ = env_logger::builder().is_test(true).try_init(); diff --git a/zrml/court/src/mock_storage.rs b/zrml/court/src/mock_storage.rs index 296766ea7..5d5599a28 100644 --- a/zrml/court/src/mock_storage.rs +++ b/zrml/court/src/mock_storage.rs @@ -19,6 +19,7 @@ #![allow(dead_code)] #![allow(unused_imports)] +use frame_system::pallet_prelude::BlockNumberFor; pub use pallet::*; use parity_scale_codec::Encode; use sp_runtime::traits::Hash; @@ -27,6 +28,7 @@ use sp_runtime::traits::Hash; pub(crate) mod pallet { use core::marker::PhantomData; use frame_support::pallet_prelude::*; + use frame_system::pallet_prelude::BlockNumberFor; use zrml_market_commons::MarketCommonsPalletApi; pub(crate) type MarketIdOf = @@ -36,7 +38,7 @@ pub(crate) mod pallet { #[pallet::config] pub trait Config: frame_system::Config { - type MarketCommons: MarketCommonsPalletApi; + type MarketCommons: MarketCommonsPalletApi>; } #[pallet::pallet] @@ -47,14 +49,14 @@ pub(crate) mod pallet { pub(crate) type MarketIdsPerDisputeBlock = StorageMap< _, Twox64Concat, - T::BlockNumber, + BlockNumberFor, BoundedVec, CacheSize>, ValueQuery, >; } -impl frame_support::traits::Randomness for Pallet { - fn random(subject: &[u8]) -> (T::Hash, T::BlockNumber) { +impl frame_support::traits::Randomness> for Pallet { + fn random(subject: &[u8]) -> (T::Hash, BlockNumberFor) { let block_number = >::block_number(); let seed = subject.using_encoded(T::Hashing::hash); diff --git a/zrml/court/src/tests.rs b/zrml/court/src/tests.rs index b0c80d6dc..3ac398a58 100644 --- a/zrml/court/src/tests.rs +++ b/zrml/court/src/tests.rs @@ -33,12 +33,18 @@ use crate::{ }; use alloc::collections::BTreeMap; use frame_support::{ - assert_noop, assert_ok, storage_root, - traits::{fungible::Balanced, tokens::imbalance::Imbalance, Currency, NamedReservableCurrency}, - StateVersion, + assert_noop, assert_ok, + storage::child::StateVersion, + traits::{ + fungible::Balanced, + tokens::{imbalance::Imbalance, Precision}, + Currency, NamedReservableCurrency, + }, }; +use frame_system::pallet_prelude::BlockNumberFor; use pallet_balances::{BalanceLock, NegativeImbalance}; use rand::seq::SliceRandom; +use sp_io::storage::root as storage_root; use sp_runtime::{ traits::{BlakeTwo256, Hash, Zero}, Perbill, Perquintill, @@ -61,8 +67,6 @@ use zeitgeist_primitives::{ }; use zrml_market_commons::{Error as MError, MarketCommonsPalletApi}; -type BlockNumberOf = ::BlockNumber; - const ORACLE_REPORT: OutcomeReport = OutcomeReport::Scalar(u128::MAX); const DEFAULT_MARKET: MarketOf = Market { @@ -119,7 +123,7 @@ fn fill_juror_pool(jurors_len: u32) { for i in 0..jurors_len { let amount = MinJurorStake::get() + i as u128; let juror = (i + 1000) as u128; - let _ = Balances::deposit(&juror, amount).unwrap(); + let _ = Balances::deposit(&juror, amount, Precision::Exact).unwrap(); assert_ok!(Court::join_court(RuntimeOrigin::signed(juror), amount)); } } @@ -467,7 +471,7 @@ fn join_court_fails_amount_below_lowest_juror() { let max_amount = min_amount + max_accounts as u128; for i in 1..=max_accounts { let amount = max_amount - i as u128; - let _ = Balances::deposit(&(i as u128), amount).unwrap(); + let _ = Balances::deposit(&(i as u128), amount, Precision::Exact).unwrap(); assert_ok!(Court::join_court(RuntimeOrigin::signed(i as u128), amount)); } @@ -513,7 +517,7 @@ fn prepare_exit_court_removes_lowest_staked_juror() { for i in 0..CourtPoolOf::::bound() { let amount = min_amount + i as u128; let juror = i as u128; - let _ = Balances::deposit(&juror, amount).unwrap(); + let _ = Balances::deposit(&juror, amount, Precision::Exact).unwrap(); assert_ok!(Court::join_court(RuntimeOrigin::signed(juror), amount)); } @@ -541,7 +545,7 @@ fn prepare_exit_court_removes_middle_staked_juror() { for i in 0..CourtPoolOf::::bound() { let amount = min_amount + i as u128; let juror = i as u128; - let _ = Balances::deposit(&juror, amount).unwrap(); + let _ = Balances::deposit(&juror, amount, Precision::Exact).unwrap(); assert_ok!(Court::join_court(RuntimeOrigin::signed(juror), amount)); } @@ -571,7 +575,7 @@ fn prepare_exit_court_removes_highest_staked_juror() { for i in 0..CourtPoolOf::::bound() { let amount = min_amount + i as u128; let juror = i as u128; - let _ = Balances::deposit(&juror, amount).unwrap(); + let _ = Balances::deposit(&juror, amount, Precision::Exact).unwrap(); assert_ok!(Court::join_court(RuntimeOrigin::signed(juror), amount)); } @@ -606,7 +610,7 @@ fn join_court_binary_search_sorted_insert_works() { for i in random_numbers { let amount = max_amount - i as u128; let juror = i as u128; - let _ = Balances::deposit(&juror, amount).unwrap(); + let _ = Balances::deposit(&juror, amount, Precision::Exact).unwrap(); assert_ok!(Court::join_court(RuntimeOrigin::signed(juror), amount)); } @@ -2179,7 +2183,7 @@ fn reassign_court_stakes_slashes_loosers_and_awards_winners() { let reward_pot = Court::reward_pot(court_id); let tardy_or_denounced_value = 5 * MinJurorStake::get(); - let _ = Balances::deposit(&reward_pot, tardy_or_denounced_value).unwrap(); + let _ = Balances::deposit(&reward_pot, tardy_or_denounced_value, Precision::Exact).unwrap(); assert_ok!(Court::reassign_court_stakes(RuntimeOrigin::signed(EVE), court_id)); @@ -2298,7 +2302,7 @@ fn reassign_court_stakes_works_for_delegations() { let reward_pot = Court::reward_pot(court_id); let tardy_or_denounced_value = 5 * MinJurorStake::get(); - let _ = Balances::deposit(&reward_pot, tardy_or_denounced_value).unwrap(); + let _ = Balances::deposit(&reward_pot, tardy_or_denounced_value, Precision::Exact).unwrap(); assert_ok!(Court::reassign_court_stakes(RuntimeOrigin::signed(EVE), court_id)); @@ -2534,7 +2538,7 @@ fn exchange_slashes_unjustified_and_unreserves_justified_appealers() { }; let backer = number; - let _ = Balances::deposit(&backer, bond).unwrap(); + let _ = Balances::deposit(&backer, bond, Precision::Exact).unwrap(); assert_ok!(Balances::reserve_named(&Court::reserve_id(), &backer, bond)); let free_balance = Balances::free_balance(backer); free_balances_before.insert(backer, free_balance); @@ -2680,7 +2684,7 @@ fn choose_multiple_weighted_works() { for i in 0..necessary_draws_weight { let amount = MinJurorStake::get() + i as u128; let juror = i as u128; - let _ = Balances::deposit(&juror, amount).unwrap(); + let _ = Balances::deposit(&juror, amount, Precision::Exact).unwrap(); assert_ok!(Court::join_court(RuntimeOrigin::signed(juror), amount)); } let random_jurors = Court::choose_multiple_weighted(necessary_draws_weight).unwrap(); @@ -2723,7 +2727,7 @@ fn select_participants_fails_if_not_enough_jurors(appeal_number: usize) { for i in 0..(necessary_draws_weight - 1usize) { let amount = MinJurorStake::get() + i as u128; let juror = (i + 1000) as u128; - let _ = Balances::deposit(&juror, amount).unwrap(); + let _ = Balances::deposit(&juror, amount, Precision::Exact).unwrap(); assert_ok!(Court::join_court(RuntimeOrigin::signed(juror), amount)); } @@ -3106,7 +3110,7 @@ fn handle_inflation_works() { for number in jurors_list.iter() { let stake = *number; let juror = *number; - let _ = Balances::deposit(&juror, stake).unwrap(); + let _ = Balances::deposit(&juror, stake, Precision::Exact).unwrap(); free_balances_before.insert(juror, stake); jurors .try_push(CourtPoolItem { @@ -3211,7 +3215,7 @@ fn gain_equal( struct Params { stake: BalanceOf, - uneligible_index: BlockNumberOf, + uneligible_index: BlockNumberFor, uneligible_stake: BalanceOf, } @@ -3424,7 +3428,7 @@ fn handle_inflation_without_waiting_one_inflation_period() { for number in jurors_list.iter() { let stake = *number; let juror = *number; - let _ = Balances::deposit(&juror, stake).unwrap(); + let _ = Balances::deposit(&juror, stake, Precision::Exact).unwrap(); free_balances_before.insert(juror, stake); jurors .try_push(CourtPoolItem { diff --git a/zrml/global-disputes/Cargo.toml b/zrml/global-disputes/Cargo.toml index 797dba502..b828dc30e 100644 --- a/zrml/global-disputes/Cargo.toml +++ b/zrml/global-disputes/Cargo.toml @@ -2,6 +2,7 @@ frame-benchmarking = { workspace = true, optional = true } frame-support = { workspace = true } frame-system = { workspace = true } +log = { workspace = true } parity-scale-codec = { workspace = true, features = ["derive", "max-encoded-len"] } scale-info = { workspace = true, features = ["derive"] } sp-runtime = { workspace = true } @@ -15,7 +16,7 @@ num-traits = { workspace = true, optional = true } [dev-dependencies] env_logger = { workspace = true } -pallet-balances = { workspace = true, features = ["default"] } +pallet-balances = { workspace = true, features = ["default", "insecure_zero_ed"] } pallet-timestamp = { workspace = true, features = ["default"] } sp-io = { workspace = true, features = ["default"] } zeitgeist-primitives = { workspace = true, features = ["mock", "default"] } @@ -44,6 +45,6 @@ try-runtime = [ [package] authors = ["Zeitgeist PM "] -edition = "2021" +edition.workspace = true name = "zrml-global-disputes" version = "0.5.2" diff --git a/zrml/global-disputes/src/lib.rs b/zrml/global-disputes/src/lib.rs index 4ac07e4c0..4449880b4 100644 --- a/zrml/global-disputes/src/lib.rs +++ b/zrml/global-disputes/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2022-2023 Forecasting Technologies LTD. +// Copyright 2022-2024 Forecasting Technologies LTD. // // This file is part of Zeitgeist. // @@ -40,7 +40,7 @@ mod pallet { use crate::{types::*, weights::WeightInfoZeitgeist, GlobalDisputesPalletApi, InitialItemOf}; use core::marker::PhantomData; use frame_support::{ - ensure, log, + ensure, pallet_prelude::{ DispatchResultWithPostInfo, OptionQuery, StorageDoubleMap, StorageMap, ValueQuery, }, @@ -51,7 +51,10 @@ mod pallet { }, Blake2_128Concat, BoundedVec, PalletId, Twox64Concat, }; - use frame_system::{ensure_signed, pallet_prelude::OriginFor}; + use frame_system::{ + ensure_signed, + pallet_prelude::{BlockNumberFor, OriginFor}, + }; use sp_runtime::{ traits::{AccountIdConversion, CheckedDiv, Saturating, Zero}, DispatchError, DispatchResult, @@ -69,12 +72,8 @@ mod pallet { pub(crate) type OwnerInfoOf = BoundedVec, ::MaxOwners>; pub type OutcomeInfoOf = OutcomeInfo, BalanceOf, OwnerInfoOf>; - pub type GlobalDisputeInfoOf = GlobalDisputeInfo< - AccountIdOf, - BalanceOf, - OwnerInfoOf, - ::BlockNumber, - >; + pub type GlobalDisputeInfoOf = + GlobalDisputeInfo, BalanceOf, OwnerInfoOf, BlockNumberFor>; type AccountIdLookupOf = <::Lookup as StaticLookup>::Source; pub type LockInfoOf = @@ -91,16 +90,16 @@ mod pallet { pub trait Config: frame_system::Config { /// The time period in which the addition of new outcomes are allowed. #[pallet::constant] - type AddOutcomePeriod: Get; + type AddOutcomePeriod: Get>; /// The currency implementation used to lock tokens for voting. - type Currency: LockableCurrency; + type Currency: LockableCurrency>; type RuntimeEvent: From> + IsType<::RuntimeEvent>; type DisputeResolution: DisputeResolutionApi< AccountId = Self::AccountId, - BlockNumber = Self::BlockNumber, + BlockNumber = BlockNumberFor, MarketId = MarketIdOf, Moment = MomentOf, >; @@ -117,7 +116,7 @@ mod pallet { type MarketCommons: MarketCommonsPalletApi< AccountId = Self::AccountId, Balance = BalanceOf, - BlockNumber = Self::BlockNumber, + BlockNumber = BlockNumberFor, >; /// The maximum numbers of distinct markets @@ -142,7 +141,7 @@ mod pallet { /// The time period in which votes are allowed. #[pallet::constant] - type GdVotingPeriod: Get; + type GdVotingPeriod: Get>; /// The fee required to add a voting outcome. #[pallet::constant] @@ -764,16 +763,16 @@ mod pallet { } } - impl GlobalDisputesPalletApi, AccountIdOf, BalanceOf, T::BlockNumber> + impl GlobalDisputesPalletApi, AccountIdOf, BalanceOf, BlockNumberFor> for Pallet where T: Config, { - fn get_add_outcome_period() -> T::BlockNumber { + fn get_add_outcome_period() -> BlockNumberFor { T::AddOutcomePeriod::get() } - fn get_vote_period() -> T::BlockNumber { + fn get_vote_period() -> BlockNumberFor { T::GdVotingPeriod::get() } diff --git a/zrml/global-disputes/src/mock.rs b/zrml/global-disputes/src/mock.rs index 25132468a..796eea66e 100644 --- a/zrml/global-disputes/src/mock.rs +++ b/zrml/global-disputes/src/mock.rs @@ -24,21 +24,19 @@ use frame_support::{ parameter_types, traits::Everything, }; +use frame_system::mocking::MockBlock; use sp_runtime::{ - testing::Header, traits::{BlakeTwo256, IdentityLookup}, + BuildStorage, }; use zeitgeist_primitives::{ constants::mock::{ AddOutcomePeriod, BlockHashCount, GdVotingPeriod, GlobalDisputeLockId, - GlobalDisputesPalletId, MaxReserves, MinOutcomeVoteAmount, MinimumPeriod, RemoveKeysLimit, - VotingOutcomeFee, BASE, + GlobalDisputesPalletId, MaxLocks, MaxReserves, MinOutcomeVoteAmount, MinimumPeriod, + RemoveKeysLimit, VotingOutcomeFee, BASE, }, traits::{DisputeResolutionApi, MarketOfDisputeResolutionApi}, - types::{ - AccountIdTest, Balance, BlockNumber, BlockTest, Hash, Index, MarketId, Moment, - UncheckedExtrinsicTest, - }, + types::{AccountIdTest, Balance, BlockNumber, Hash, MarketId, Moment}, }; pub const ALICE: AccountIdTest = 0; @@ -49,17 +47,12 @@ pub const POOR_PAUL: AccountIdTest = 4; pub const DAVE: AccountIdTest = 5; construct_runtime!( - pub enum Runtime - where - Block = BlockTest, - NodeBlock = BlockTest, - UncheckedExtrinsic = UncheckedExtrinsicTest, - { - Balances: pallet_balances::{Call, Config, Event, Pallet, Storage}, - MarketCommons: zrml_market_commons::{Pallet, Storage}, - GlobalDisputes: zrml_global_disputes::{Event, Pallet, Storage}, - System: frame_system::{Call, Config, Event, Pallet, Storage}, - Timestamp: pallet_timestamp::{Pallet}, + pub enum Runtime { + Balances: pallet_balances, + MarketCommons: zrml_market_commons, + GlobalDisputes: zrml_global_disputes, + System: frame_system, + Timestamp: pallet_timestamp, } ); @@ -122,18 +115,17 @@ impl frame_system::Config for Runtime { type AccountData = pallet_balances::AccountData; type AccountId = AccountIdTest; type BaseCallFilter = Everything; + type Block = MockBlock; type BlockHashCount = BlockHashCount; type BlockLength = (); - type BlockNumber = BlockNumber; type BlockWeights = (); type RuntimeCall = RuntimeCall; type DbWeight = (); type RuntimeEvent = RuntimeEvent; type Hash = Hash; type Hashing = BlakeTwo256; - type Header = Header; - type Index = Index; type Lookup = IdentityLookup; + type Nonce = u64; type MaxConsumers = frame_support::traits::ConstU32<16>; type OnKilledAccount = (); type OnNewAccount = (); @@ -149,9 +141,13 @@ impl pallet_balances::Config for Runtime { type AccountStore = System; type Balance = Balance; type DustRemoval = (); + type FreezeIdentifier = (); + type RuntimeHoldReason = (); type RuntimeEvent = RuntimeEvent; type ExistentialDeposit = (); - type MaxLocks = (); + type MaxHolds = (); + type MaxFreezes = (); + type MaxLocks = MaxLocks; type MaxReserves = MaxReserves; type ReserveIdentifier = [u8; 8]; type WeightInfo = (); @@ -190,7 +186,7 @@ impl Default for ExtBuilder { impl ExtBuilder { pub fn build(self) -> sp_io::TestExternalities { - let mut t = frame_system::GenesisConfig::default().build_storage::().unwrap(); + let mut t = frame_system::GenesisConfig::::default().build_storage().unwrap(); // see the logs in tests when using `RUST_LOG=debug cargo test -- --nocapture` let _ = env_logger::builder().is_test(true).try_init(); diff --git a/zrml/global-disputes/src/tests.rs b/zrml/global-disputes/src/tests.rs index 78b3ff94a..2c6951833 100644 --- a/zrml/global-disputes/src/tests.rs +++ b/zrml/global-disputes/src/tests.rs @@ -29,8 +29,8 @@ use frame_support::{ traits::{Currency, ReservableCurrency}, BoundedVec, }; -use pallet_balances::{BalanceLock, Error as BalancesError}; -use sp_runtime::{traits::Zero, SaturatedConversion}; +use pallet_balances::BalanceLock; +use sp_runtime::{traits::Zero, DispatchError, SaturatedConversion, TokenError}; use test_case::test_case; use zeitgeist_primitives::{ constants::mock::{ @@ -479,7 +479,7 @@ fn add_vote_outcome_fails_if_balance_too_low() { market_id, OutcomeReport::Scalar(80), ), - BalancesError::::InsufficientBalance + DispatchError::Token(TokenError::FundsUnavailable) ); }); } @@ -846,7 +846,7 @@ fn transfer_fails_with_fully_locked_balance() { assert_noop!( Balances::transfer(RuntimeOrigin::signed(*disputor), BOB, arbitrary_amount + 1), - pallet_balances::Error::::LiquidityRestrictions + DispatchError::Token(TokenError::Frozen) ); assert_ok!(Balances::transfer(RuntimeOrigin::signed(*disputor), BOB, arbitrary_amount)); }); diff --git a/zrml/global-disputes/src/utils.rs b/zrml/global-disputes/src/utils.rs index dabebc965..c26bd8865 100644 --- a/zrml/global-disputes/src/utils.rs +++ b/zrml/global-disputes/src/utils.rs @@ -18,11 +18,12 @@ #![cfg(any(feature = "runtime-benchmarks", test))] use crate::*; +use frame_system::pallet_prelude::BlockNumberFor; type MarketOf = zeitgeist_primitives::types::Market< ::AccountId, BalanceOf, - ::BlockNumber, + BlockNumberFor, MomentOf, zeitgeist_primitives::types::BaseAsset, MarketIdOf, diff --git a/zrml/hybrid-router/Cargo.toml b/zrml/hybrid-router/Cargo.toml index 8c4c2b95f..07d238d0d 100644 --- a/zrml/hybrid-router/Cargo.toml +++ b/zrml/hybrid-router/Cargo.toml @@ -9,13 +9,13 @@ sp-runtime = { workspace = true } zeitgeist-primitives = { workspace = true } zrml-market-commons = { workspace = true } - +cfg-if = { workspace = true, optional = true } orml-asset-registry = { workspace = true, optional = true } orml-currencies = { workspace = true, optional = true } orml-tokens = { workspace = true, optional = true } pallet-assets = { workspace = true, optional = true } pallet-balances = { workspace = true, optional = true } -pallet-randomness-collective-flip = { workspace = true, optional = true } +pallet-insecure-randomness-collective-flip = { workspace = true, optional = true } pallet-timestamp = { workspace = true, optional = true } pallet-treasury = { workspace = true, optional = true } pallet-xcm = { workspace = true, optional = true } @@ -41,12 +41,13 @@ zrml-hybrid-router = { workspace = true, features = ["mock"] } [features] default = ["std"] mock = [ + "cfg-if", "orml-asset-registry/default", "orml-currencies/default", "orml-tokens/default", "pallet-assets/default", "pallet-balances/default", - "pallet-randomness-collective-flip/default", + "pallet-insecure-randomness-collective-flip/default", "pallet-timestamp/default", "pallet-treasury/default", "pallet-xcm/default", @@ -96,6 +97,6 @@ try-runtime = [ [package] authors = ["Zeitgeist PM "] -edition = "2021" +edition.workspace = true name = "zrml-hybrid-router" version = "0.5.2" diff --git a/zrml/hybrid-router/src/benchmarking.rs b/zrml/hybrid-router/src/benchmarking.rs index 24e7f5c7d..f94fb75db 100644 --- a/zrml/hybrid-router/src/benchmarking.rs +++ b/zrml/hybrid-router/src/benchmarking.rs @@ -25,6 +25,7 @@ use crate::Pallet as HybridRouter; use crate::*; +use alloc::{vec, vec::Vec}; use frame_benchmarking::v2::*; use frame_support::{ assert_ok, @@ -68,14 +69,11 @@ fn create_spot_prices(asset_count: u16) -> Vec> { amounts } -fn create_market( +fn create_market( caller: T::AccountId, base_asset: BaseAssetClass, asset_count: u16, -) -> MarketIdOf -where - T: Config, -{ +) -> MarketIdOf { let market = Market { market_id: 0u8.into(), base_asset, @@ -104,10 +102,7 @@ fn create_market_and_deploy_pool( base_asset: BaseAssetClass, asset_count: u16, amount: BalanceOf, -) -> MarketIdOf -where - T: Config, -{ +) -> MarketIdOf { let market_id = create_market::(caller.clone(), base_asset, asset_count); let total_cost = amount + T::AssetManager::minimum_balance(base_asset.into()); assert_ok!(T::AssetManager::deposit(base_asset.into(), &caller, total_cost)); diff --git a/zrml/hybrid-router/src/lib.rs b/zrml/hybrid-router/src/lib.rs index 1155ee832..d04f9476b 100644 --- a/zrml/hybrid-router/src/lib.rs +++ b/zrml/hybrid-router/src/lib.rs @@ -40,17 +40,18 @@ mod pallet { use alloc::{vec, vec::Vec}; use core::marker::PhantomData; use frame_support::{ - ensure, - pallet_prelude::DispatchError, - require_transactional, + ensure, require_transactional, traits::{IsType, StorageVersion}, PalletId, }; - use frame_system::{ensure_signed, pallet_prelude::OriginFor}; + use frame_system::{ + ensure_signed, + pallet_prelude::{BlockNumberFor, OriginFor}, + }; use orml_traits::MultiCurrency; use sp_runtime::{ traits::{Get, Zero}, - DispatchResult, SaturatedConversion, Saturating, + DispatchError, DispatchResult, SaturatedConversion, Saturating, }; #[cfg(feature = "runtime-benchmarks")] use zeitgeist_primitives::traits::{CompleteSetOperationsApi, DeployPoolApi}; @@ -90,7 +91,7 @@ mod pallet { /// The identifier of individual markets. type MarketCommons: MarketCommonsPalletApi< AccountId = Self::AccountId, - BlockNumber = Self::BlockNumber, + BlockNumber = BlockNumberFor, Balance = BalanceOf, >; diff --git a/zrml/hybrid-router/src/mock.rs b/zrml/hybrid-router/src/mock.rs index feb7f3718..c6195e160 100644 --- a/zrml/hybrid-router/src/mock.rs +++ b/zrml/hybrid-router/src/mock.rs @@ -29,18 +29,13 @@ use frame_support::{ construct_runtime, ord_parameter_types, parameter_types, traits::{AsEnsureOriginWithArg, Contains, Everything, NeverEnsureOrigin}, }; -use frame_system::{EnsureRoot, EnsureSigned, EnsureSignedBy}; -#[cfg(feature = "parachain")] -use orml_asset_registry::AssetMetadata; +use frame_system::{mocking::MockBlock, EnsureRoot, EnsureSigned, EnsureSignedBy}; use orml_traits::MultiCurrency; use parity_scale_codec::Compact; use sp_runtime::{ - testing::Header, traits::{BlakeTwo256, ConstU32, Get, IdentityLookup, Zero}, - Perbill, Percent, SaturatedConversion, + BuildStorage, Perbill, Percent, SaturatedConversion, }; -#[cfg(feature = "parachain")] -use zeitgeist_primitives::types::Asset; use zeitgeist_primitives::{ constants::mock::{ AddOutcomePeriod, AggregationPeriod, AppealBond, AppealPeriod, AssetsAccountDeposit, @@ -64,11 +59,19 @@ use zeitgeist_primitives::{ }, traits::DistributeFees, types::{ - AccountIdTest, Amount, Assets, Balance, BasicCurrencyAdapter, BlockNumber, BlockTest, - CampaignAsset, CampaignAssetId, Currencies, CustomAsset, CustomAssetId, Hash, Index, - MarketAsset, MarketId, Moment, UncheckedExtrinsicTest, + AccountIdTest, Amount, Assets, Balance, BasicCurrencyAdapter, CampaignAsset, + CampaignAssetId, Currencies, CustomAsset, CustomAssetId, Hash, MarketAsset, MarketId, + Moment, }, }; +#[cfg(feature = "parachain")] +use { + orml_traits::asset_registry::AssetProcessor, + parity_scale_codec::Encode, + sp_runtime::DispatchError, + zeitgeist_primitives::types::Asset, + zeitgeist_primitives::types::{CustomMetadata, XcmAsset}, +}; pub const ALICE: AccountIdTest = 0; #[allow(unused)] @@ -143,8 +146,6 @@ where } } -pub type UncheckedExtrinsic = UncheckedExtrinsicTest; - pub struct DustRemovalWhitelist; impl Contains for DustRemovalWhitelist { @@ -158,33 +159,30 @@ pub(super) type CampaignAssetsInstance = pallet_assets::Instance2; pub(super) type MarketAssetsInstance = pallet_assets::Instance3; construct_runtime!( - pub enum Runtime - where - Block = BlockTest, - NodeBlock = BlockTest, - UncheckedExtrinsic = UncheckedExtrinsic, - { - HybridRouter: zrml_hybrid_router::{Pallet, Call, Storage, Event}, - Orderbook: zrml_orderbook::{Call, Event, Pallet, Storage}, - AssetRouter: zrml_asset_router::{Pallet}, - NeoSwaps: zrml_neo_swaps::{Call, Event, Pallet}, - Authorized: zrml_authorized::{Event, Pallet, Storage}, - Balances: pallet_balances::{Call, Config, Event, Pallet, Storage}, - Court: zrml_court::{Event, Pallet, Storage}, - CampaignAssets: pallet_assets::::{Call, Pallet, Storage, Event}, - CustomAssets: pallet_assets::::{Call, Pallet, Storage, Event}, - MarketAssets: pallet_assets::::{Call, Pallet, Storage, Event}, - AssetManager: orml_currencies::{Call, Pallet, Storage}, - LiquidityMining: zrml_liquidity_mining::{Config, Event, Pallet}, - MarketCommons: zrml_market_commons::{Pallet, Storage}, - PredictionMarkets: zrml_prediction_markets::{Event, Pallet, Storage}, - RandomnessCollectiveFlip: pallet_randomness_collective_flip::{Pallet, Storage}, - SimpleDisputes: zrml_simple_disputes::{Event, Pallet, Storage}, - GlobalDisputes: zrml_global_disputes::{Event, Pallet, Storage}, - System: frame_system::{Call, Config, Event, Pallet, Storage}, - Timestamp: pallet_timestamp::{Pallet}, - Tokens: orml_tokens::{Config, Event, Pallet, Storage}, - Treasury: pallet_treasury::{Call, Event, Pallet, Storage}, + pub enum Runtime { + HybridRouter: zrml_hybrid_router, + Orderbook: zrml_orderbook, + AssetRouter: zrml_asset_router, + NeoSwaps: zrml_neo_swaps, + #[cfg(feature = "parachain")] + AssetRegistry: orml_asset_registry, + Authorized: zrml_authorized, + Balances: pallet_balances, + Court: zrml_court, + CampaignAssets: pallet_assets::, + CustomAssets: pallet_assets::, + MarketAssets: pallet_assets::, + AssetManager: orml_currencies, + LiquidityMining: zrml_liquidity_mining, + MarketCommons: zrml_market_commons, + PredictionMarkets: zrml_prediction_markets, + RandomnessCollectiveFlip: pallet_insecure_randomness_collective_flip, + SimpleDisputes: zrml_simple_disputes, + GlobalDisputes: zrml_global_disputes, + System: frame_system, + Timestamp: pallet_timestamp, + Tokens: orml_tokens, + Treasury: pallet_treasury, } ); @@ -340,7 +338,7 @@ impl zrml_neo_swaps::Config for Runtime { type WeightInfo = zrml_neo_swaps::weights::WeightInfo; } -impl pallet_randomness_collective_flip::Config for Runtime {} +impl pallet_insecure_randomness_collective_flip::Config for Runtime {} impl zrml_prediction_markets::Config for Runtime { type AdvisoryBond = AdvisoryBond; @@ -349,7 +347,7 @@ impl zrml_prediction_markets::Config for Runtime { type AssetCreator = AssetRouter; type AssetDestroyer = AssetRouter; #[cfg(feature = "parachain")] - type AssetRegistry = MockRegistry; + type AssetRegistry = AssetRegistry; type Authorized = Authorized; type CloseEarlyBlockPeriod = CloseEarlyBlockPeriod; type CloseEarlyDisputeBond = CloseEarlyDisputeBond; @@ -444,29 +442,57 @@ impl frame_system::Config for Runtime { type AccountData = pallet_balances::AccountData; type AccountId = AccountIdTest; type BaseCallFilter = Everything; + type Block = MockBlock; type BlockHashCount = BlockHashCount; type BlockLength = (); - type BlockNumber = BlockNumber; type BlockWeights = (); type RuntimeCall = RuntimeCall; type DbWeight = (); type RuntimeEvent = RuntimeEvent; type Hash = Hash; type Hashing = BlakeTwo256; - type Header = Header; - type Index = Index; type Lookup = IdentityLookup; + type Nonce = u64; type MaxConsumers = frame_support::traits::ConstU32<16>; type OnKilledAccount = (); type OnNewAccount = (); - type OnSetCode = (); type RuntimeOrigin = RuntimeOrigin; type PalletInfo = PalletInfo; type SS58Prefix = (); type SystemWeightInfo = (); type Version = (); + type OnSetCode = (); } +cfg_if::cfg_if!( + if #[cfg(feature = "parachain")] { + type AssetMetadata = orml_traits::asset_registry::AssetMetadata< + Balance, + CustomMetadata, + ConstU32<1024> + >; + pub struct NoopAssetProcessor {} + + impl AssetProcessor for NoopAssetProcessor { + fn pre_register(id: Option, asset_metadata: AssetMetadata) + -> Result<(XcmAsset, AssetMetadata), DispatchError> { + Ok((id.unwrap(), asset_metadata)) + } + } + + impl orml_asset_registry::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type CustomMetadata = CustomMetadata; + type AssetId = XcmAsset; + type AuthorityOrigin = EnsureRoot; + type AssetProcessor = NoopAssetProcessor; + type Balance = Balance; + type StringLimit = ConstU32<1024>; + type WeightInfo = (); + } + } +); + impl orml_currencies::Config for Runtime { type GetNativeCurrencyId = GetNativeCurrencyId; type MultiCurrency = AssetRouter; @@ -492,8 +518,12 @@ impl pallet_balances::Config for Runtime { type AccountStore = System; type Balance = Balance; type DustRemoval = (); + type FreezeIdentifier = (); + type RuntimeHoldReason = (); type RuntimeEvent = RuntimeEvent; type ExistentialDeposit = ExistentialDeposit; + type MaxHolds = (); + type MaxFreezes = (); type MaxLocks = MaxLocks; type MaxReserves = MaxReserves; type ReserveIdentifier = [u8; 8]; @@ -561,14 +591,6 @@ impl pallet_treasury::Config for Runtime { type WeightInfo = (); } -#[cfg(feature = "parachain")] -zrml_prediction_markets::impl_mock_registry! { - MockRegistry, - zeitgeist_primitives::types::XcmAsset, - Balance, - zeitgeist_primitives::types::CustomMetadata -} - #[allow(unused)] pub struct ExtBuilder { balances: Vec<(AccountIdTest, Balance)>, @@ -593,7 +615,7 @@ impl Default for ExtBuilder { #[allow(unused)] impl ExtBuilder { pub fn build(self) -> sp_io::TestExternalities { - let mut t = frame_system::GenesisConfig::default().build_storage::().unwrap(); + let mut t = frame_system::GenesisConfig::::default().build_storage().unwrap(); // see the logs in tests when using `RUST_LOG=debug cargo test -- --nocapture` let _ = env_logger::builder().is_test(true).try_init(); pallet_balances::GenesisConfig:: { balances: self.balances } @@ -601,7 +623,6 @@ impl ExtBuilder { .unwrap(); #[cfg(feature = "parachain")] { - use frame_support::traits::GenesisBuild; orml_tokens::GenesisConfig:: { balances: vec![ (ALICE, FOREIGN_ASSET.try_into().unwrap(), INITIAL_BALANCE), @@ -614,18 +635,20 @@ impl ExtBuilder { allow_as_base_asset: true, ..Default::default() }; - orml_asset_registry_mock::GenesisConfig { - metadata: vec![( + orml_asset_registry::GenesisConfig:: { + assets: vec![( FOREIGN_ASSET.try_into().unwrap(), AssetMetadata { decimals: 18, - name: "MKL".as_bytes().to_vec(), - symbol: "MKL".as_bytes().to_vec(), + name: "MKL".as_bytes().to_vec().try_into().unwrap(), + symbol: "MKL".as_bytes().to_vec().try_into().unwrap(), existential_deposit: 0, location: None, additional: custom_metadata, - }, + } + .encode(), )], + last_asset_id: FOREIGN_ASSET.try_into().unwrap(), } .assimilate_storage(&mut t) .unwrap(); diff --git a/zrml/hybrid-router/src/tests/buy.rs b/zrml/hybrid-router/src/tests/buy.rs index fb3630b5c..e3da80452 100644 --- a/zrml/hybrid-router/src/tests/buy.rs +++ b/zrml/hybrid-router/src/tests/buy.rs @@ -673,7 +673,7 @@ fn buy_fails_if_balance_too_low() { let asset = Assets::CategoricalOutcome(market_id, 0); let amount = 10 * BASE; - assert_ok!(Balances::set_balance(RuntimeOrigin::root(), ALICE, amount - 1, 0)); + assert_eq!(Balances::set_balance(&ALICE, amount - 1), amount - 1); let max_price = (BASE / 2).saturated_into::>(); let orders = vec![]; let strategy = Strategy::LimitOrder; diff --git a/zrml/hybrid-router/src/tests/mod.rs b/zrml/hybrid-router/src/tests/mod.rs index 1abce4120..da55d7ba8 100644 --- a/zrml/hybrid-router/src/tests/mod.rs +++ b/zrml/hybrid-router/src/tests/mod.rs @@ -18,7 +18,10 @@ #![cfg(all(feature = "mock", test))] use crate::{mock::*, types::*, utils::*, AccountIdOf, BalanceOf, MarketIdOf, *}; -use frame_support::{assert_noop, assert_ok}; +use frame_support::{ + assert_noop, assert_ok, + traits::{fungible::Mutate, tokens::Precision}, +}; use orml_currencies::Error as CurrenciesError; use orml_tokens::Error as TokensError; use orml_traits::MultiCurrency; diff --git a/zrml/hybrid-router/src/tests/sell.rs b/zrml/hybrid-router/src/tests/sell.rs index a1c383945..030daf36d 100644 --- a/zrml/hybrid-router/src/tests/sell.rs +++ b/zrml/hybrid-router/src/tests/sell.rs @@ -52,7 +52,7 @@ fn sell_to_amm_and_then_fill_specified_order() { let order_ids = Orders::::iter().map(|(k, _)| k).collect::>(); - assert_ok!(AssetRouter::increase_balance(asset, &ALICE, amount_in,)); + assert_ok!(AssetRouter::increase_balance(asset, &ALICE, amount_in, Precision::Exact)); let min_price = _1_4.saturated_into::>(); let strategy = Strategy::LimitOrder; @@ -135,7 +135,7 @@ fn sell_to_amm_if_specified_order_has_lower_prices_than_the_amm() { let order_ids = Orders::::iter().map(|(k, _)| k).collect::>(); - assert_ok!(AssetRouter::increase_balance(asset, &ALICE, amount,)); + assert_ok!(AssetRouter::increase_balance(asset, &ALICE, amount, Precision::Exact)); let min_price = _1_4.saturated_into::>(); let strategy = Strategy::LimitOrder; @@ -210,7 +210,7 @@ fn sell_fill_multiple_orders_if_amm_spot_price_lower_than_order_prices() { let order_ids = Orders::::iter().map(|(k, _)| k).collect::>(); - assert_ok!(AssetRouter::increase_balance(asset, &ALICE, amount_in,)); + assert_ok!(AssetRouter::increase_balance(asset, &ALICE, amount_in, Precision::Exact)); let min_price = _1_4.saturated_into::>(); let strategy = Strategy::LimitOrder; @@ -265,7 +265,7 @@ fn sell_fill_specified_order_partially_if_amm_spot_price_lower() { assert_eq!(order_ids.len(), 1); let order_id = order_ids[0]; - assert_ok!(AssetRouter::increase_balance(asset, &ALICE, amount,)); + assert_ok!(AssetRouter::increase_balance(asset, &ALICE, amount, Precision::Exact)); let min_price = _1_4.saturated_into::>(); let orders = vec![order_id]; @@ -316,7 +316,7 @@ fn sell_fails_if_asset_not_equal_to_order_book_taker_asset() { let amount_in = _2; let maker_amount = _1; - assert_ok!(AssetRouter::increase_balance(asset, &CHARLIE, maker_amount,)); + assert_ok!(AssetRouter::increase_balance(asset, &CHARLIE, maker_amount, Precision::Exact)); assert_ok!(Orderbook::place_order( RuntimeOrigin::signed(CHARLIE), @@ -331,7 +331,7 @@ fn sell_fails_if_asset_not_equal_to_order_book_taker_asset() { assert_eq!(order_ids.len(), 1); let order_id = order_ids[0]; - assert_ok!(AssetRouter::increase_balance(asset, &ALICE, amount_in,)); + assert_ok!(AssetRouter::increase_balance(asset, &ALICE, amount_in, Precision::Exact)); let min_price = _1_4.saturated_into::>(); let orders = vec![order_id]; @@ -386,7 +386,7 @@ fn sell_fails_if_order_price_below_min_price() { assert_eq!(order_ids.len(), 1); let order_id = order_ids[0]; - assert_ok!(AssetRouter::increase_balance(asset, &ALICE, 5 * amount,)); + assert_ok!(AssetRouter::increase_balance(asset, &ALICE, 5 * amount, Precision::Exact)); let min_price = _3_4.saturated_into::>(); let orders = vec![order_id]; @@ -426,7 +426,7 @@ fn sell_to_amm() { let asset = Assets::CategoricalOutcome(market_id, 0); let amount = _2; - assert_ok!(AssetRouter::increase_balance(asset, &ALICE, amount,)); + assert_ok!(AssetRouter::increase_balance(asset, &ALICE, amount, Precision::Exact)); let min_price = _1_4.saturated_into::>(); let orders = vec![]; @@ -478,7 +478,7 @@ fn sell_min_price_higher_than_amm_spot_price_results_in_place_order() { let asset = Assets::CategoricalOutcome(market_id, 0); let amount = _2; - assert_ok!(AssetRouter::increase_balance(asset, &ALICE, amount,)); + assert_ok!(AssetRouter::increase_balance(asset, &ALICE, amount, Precision::Exact)); //* spot price of the AMM is 1 smaller than the min_price //* this results in no sell on the AMM, but places an order on the order book @@ -535,7 +535,7 @@ fn sell_to_amm_but_low_amount() { let asset = Assets::CategoricalOutcome(market_id, 0); let amount_in = _2; - assert_ok!(AssetRouter::increase_balance(asset, &ALICE, amount_in,)); + assert_ok!(AssetRouter::increase_balance(asset, &ALICE, amount_in, Precision::Exact)); //* min_price is just 1 smaller than the spot price of the AMM //* this results in a low sell amount_in on the AMM @@ -605,7 +605,7 @@ fn sell_succeeds_for_numerical_soft_failure() { // increase_balance does not set total issuance AssetRouter::set_total_issuance(asset, amount_in); - assert_ok!(AssetRouter::increase_balance(asset, &ALICE, amount_in,)); + assert_ok!(AssetRouter::increase_balance(asset, &ALICE, amount_in, Precision::Exact)); let min_price = (_1_100 / 1000).saturated_into::>(); let orders = vec![]; @@ -655,7 +655,7 @@ fn sell_to_amm_only() { let asset = Assets::CategoricalOutcome(market_id, 0); let amount = _2; - assert_ok!(AssetRouter::increase_balance(asset, &ALICE, amount,)); + assert_ok!(AssetRouter::increase_balance(asset, &ALICE, amount, Precision::Exact)); let min_price = _1_4.saturated_into::>(); let orders = vec![]; @@ -706,7 +706,7 @@ fn sell_places_limit_order_no_pool() { let asset = Assets::CategoricalOutcome(market_id, 0); let amount = 10 * BASE; - assert_ok!(AssetRouter::increase_balance(asset, &ALICE, amount,)); + assert_ok!(AssetRouter::increase_balance(asset, &ALICE, amount, Precision::Exact)); let min_price = (BASE / 2).saturated_into::>(); let orders = vec![]; @@ -756,7 +756,7 @@ fn sell_fails_if_balance_too_low() { let asset = Assets::CategoricalOutcome(market_id, 0); let amount = 10 * BASE; - assert_ok!(AssetRouter::increase_balance(asset, &ALICE, amount - 1,)); + assert_ok!(AssetRouter::increase_balance(asset, &ALICE, amount - 1, Precision::Exact)); let min_price = (BASE / 2).saturated_into::>(); let orders = vec![]; @@ -822,7 +822,7 @@ fn sell_emits_event() { // increase_balance does not set total issuance AssetRouter::set_total_issuance(asset, amount_in); - assert_ok!(AssetRouter::increase_balance(asset, &ALICE, amount_in,)); + assert_ok!(AssetRouter::increase_balance(asset, &ALICE, amount_in, Precision::Exact)); let strategy = Strategy::LimitOrder; assert_ok!(HybridRouter::sell( @@ -871,7 +871,7 @@ fn sell_fails_if_asset_count_mismatch() { let asset = Assets::CategoricalOutcome(market_id, 0); let amount_in = 2 * BASE; - assert_ok!(AssetRouter::increase_balance(asset, &ALICE, amount_in,)); + assert_ok!(AssetRouter::increase_balance(asset, &ALICE, amount_in, Precision::Exact)); let max_price = (BASE / 2).saturated_into::>(); let orders = vec![]; @@ -941,7 +941,7 @@ fn sell_fails_if_cancel_strategy_applied() { let asset_count = required_asset_count; let asset = Assets::CategoricalOutcome(market_id, 0); let amount_in = 10 * BASE; - assert_ok!(AssetRouter::increase_balance(asset, &ALICE, amount_in,)); + assert_ok!(AssetRouter::increase_balance(asset, &ALICE, amount_in, Precision::Exact)); let max_price = (BASE / 2).saturated_into::>(); let orders = vec![]; let strategy = Strategy::ImmediateOrCancel; @@ -968,7 +968,7 @@ fn sell_fails_if_market_does_not_exist() { let asset_count = 2; let asset = Assets::CategoricalOutcome(market_id, 0); let amount_in = 10 * BASE; - assert_ok!(AssetRouter::increase_balance(asset, &ALICE, amount_in,)); + assert_ok!(AssetRouter::increase_balance(asset, &ALICE, amount_in, Precision::Exact)); let max_price = (BASE / 2).saturated_into::>(); let orders = vec![]; let strategy = Strategy::ImmediateOrCancel; diff --git a/zrml/hybrid-router/src/types.rs b/zrml/hybrid-router/src/types.rs index 03296651e..2d6a1d2fc 100644 --- a/zrml/hybrid-router/src/types.rs +++ b/zrml/hybrid-router/src/types.rs @@ -19,7 +19,7 @@ use crate::{AmmTradeOf, BalanceOf, Config, OrderTradeOf}; use alloc::vec::Vec; use frame_support::pallet_prelude::*; use scale_info::TypeInfo; -use sp_runtime::traits::Zero; +use sp_runtime::{traits::Zero, DispatchError}; use zeitgeist_primitives::math::checked_ops_res::{CheckedAddRes, CheckedSubRes}; /// Represents the strategy used when placing an order in a trading environment. diff --git a/zrml/liquidity-mining/Cargo.toml b/zrml/liquidity-mining/Cargo.toml index cecf83500..9f6886add 100644 --- a/zrml/liquidity-mining/Cargo.toml +++ b/zrml/liquidity-mining/Cargo.toml @@ -2,6 +2,7 @@ frame-benchmarking = { workspace = true, optional = true } frame-support = { workspace = true } frame-system = { workspace = true } +log = { workspace = true } parity-scale-codec = { workspace = true, features = ["derive", "max-encoded-len"] } scale-info = { workspace = true, features = ["derive"] } serde = { workspace = true, optional = true } @@ -39,6 +40,6 @@ try-runtime = [ [package] authors = ["Zeitgeist PM "] -edition = "2021" +edition.workspace = true name = "zrml-liquidity-mining" version = "0.5.2" diff --git a/zrml/liquidity-mining/src/lib.rs b/zrml/liquidity-mining/src/lib.rs index a2346ebfa..ad96e8317 100644 --- a/zrml/liquidity-mining/src/lib.rs +++ b/zrml/liquidity-mining/src/lib.rs @@ -51,21 +51,22 @@ mod pallet { }; use alloc::vec::Vec; use core::marker::PhantomData; - #[cfg(feature = "std")] - use frame_support::traits::GenesisBuild; use frame_support::{ dispatch::DispatchResult, - log, storage::{ types::{StorageDoubleMap, StorageValue, ValueQuery}, with_transaction, }, traits::{ - Currency, ExistenceRequirement, Get, Hooks, IsType, StorageVersion, WithdrawReasons, + BuildGenesisConfig, Currency, ExistenceRequirement, Get, Hooks, IsType, StorageVersion, + WithdrawReasons, }, Blake2_128Concat, PalletId, Twox64Concat, }; - use frame_system::{ensure_root, pallet_prelude::OriginFor}; + use frame_system::{ + ensure_root, + pallet_prelude::{BlockNumberFor, OriginFor}, + }; use sp_runtime::{ traits::{AccountIdConversion, Saturating}, TransactionOutcome, @@ -107,7 +108,7 @@ mod pallet { type MarketCommons: MarketCommonsPalletApi< AccountId = Self::AccountId, - BlockNumber = Self::BlockNumber, + BlockNumber = BlockNumberFor, MarketId = Self::MarketId, Balance = BalanceOf, >; @@ -141,9 +142,8 @@ mod pallet { FundDoesNotHaveEnoughBalance, } - #[cfg(feature = "std")] #[pallet::genesis_build] - impl GenesisBuild for GenesisConfig { + impl BuildGenesisConfig for GenesisConfig { fn build(&self) { let _ = T::Currency::deposit_creating( &Pallet::::pallet_account_id(), @@ -153,7 +153,6 @@ mod pallet { } } - #[cfg(feature = "std")] #[derive(scale_info::TypeInfo, Debug)] #[pallet::genesis_config] pub struct GenesisConfig { @@ -161,7 +160,6 @@ mod pallet { pub per_block_distribution: BalanceOf, } - #[cfg(feature = "std")] impl Default for GenesisConfig where T: Config, @@ -176,9 +174,9 @@ mod pallet { } #[pallet::hooks] - impl Hooks for Pallet { + impl Hooks> for Pallet { // Manages incentives on each block finalization. - fn on_finalize(block: T::BlockNumber) { + fn on_finalize(block: BlockNumberFor) { let fun = || { let added_len = TrackIncentivesBasedOnBoughtShares::::exec(block)?; if added_len > 0 { @@ -221,7 +219,7 @@ mod pallet { { type AccountId = T::AccountId; type Balance = BalanceOf; - type BlockNumber = T::BlockNumber; + type BlockNumber = BlockNumberFor; type MarketId = T::MarketId; fn add_shares( @@ -339,7 +337,7 @@ mod pallet { T::MarketId, Twox64Concat, T::AccountId, - OwnedValuesParams, T::BlockNumber>, + OwnedValuesParams, BlockNumberFor>, ValueQuery, >; diff --git a/zrml/liquidity-mining/src/mock.rs b/zrml/liquidity-mining/src/mock.rs index b4fa05cbc..6cd49ddc1 100644 --- a/zrml/liquidity-mining/src/mock.rs +++ b/zrml/liquidity-mining/src/mock.rs @@ -19,46 +19,36 @@ #![cfg(test)] use crate as zrml_liquidity_mining; -use frame_support::{ - construct_runtime, - traits::{Everything, GenesisBuild}, -}; +use frame_support::{construct_runtime, traits::Everything}; +use frame_system::mocking::MockBlock; use sp_runtime::{ - testing::Header, traits::{BlakeTwo256, IdentityLookup}, + BuildStorage, }; use zeitgeist_primitives::{ constants::mock::{ BlockHashCount, ExistentialDeposit, LiquidityMiningPalletId, MaxLocks, MaxReserves, MinimumPeriod, BASE, }, - types::{ - AccountIdTest, Balance, BlockNumber, BlockTest, Hash, Index, MarketId, Moment, - UncheckedExtrinsicTest, - }, + types::{AccountIdTest, Balance, Hash, MarketId, Moment}, }; pub const ALICE: AccountIdTest = 0; pub const BOB: AccountIdTest = 1; construct_runtime!( - pub enum Runtime - where - Block = BlockTest, - NodeBlock = BlockTest, - UncheckedExtrinsic = UncheckedExtrinsicTest, - { - Balances: pallet_balances::{Call, Config, Event, Pallet, Storage}, - LiquidityMining: zrml_liquidity_mining::{Config, Event, Pallet}, - MarketCommons: zrml_market_commons::{Pallet, Storage}, - System: frame_system::{Call, Config, Event, Pallet, Storage}, - Timestamp: pallet_timestamp::{Pallet}, + pub enum Runtime { + Balances: pallet_balances, + LiquidityMining: zrml_liquidity_mining, + MarketCommons: zrml_market_commons, + System: frame_system, + Timestamp: pallet_timestamp, } ); impl crate::Config for Runtime { type Currency = Balances; - type RuntimeEvent = (); + type RuntimeEvent = RuntimeEvent; type MarketCommons = MarketCommons; type MarketId = MarketId; type PalletId = LiquidityMiningPalletId; @@ -69,18 +59,17 @@ impl frame_system::Config for Runtime { type AccountData = pallet_balances::AccountData; type AccountId = AccountIdTest; type BaseCallFilter = Everything; + type Block = MockBlock; type BlockHashCount = BlockHashCount; type BlockLength = (); - type BlockNumber = BlockNumber; type BlockWeights = (); type RuntimeCall = RuntimeCall; type DbWeight = (); - type RuntimeEvent = (); + type RuntimeEvent = RuntimeEvent; type Hash = Hash; type Hashing = BlakeTwo256; - type Header = Header; - type Index = Index; type Lookup = IdentityLookup; + type Nonce = u64; type MaxConsumers = frame_support::traits::ConstU32<16>; type OnKilledAccount = (); type OnNewAccount = (); @@ -96,11 +85,15 @@ impl pallet_balances::Config for Runtime { type AccountStore = System; type Balance = Balance; type DustRemoval = (); - type ReserveIdentifier = [u8; 8]; - type RuntimeEvent = (); + type FreezeIdentifier = (); + type RuntimeHoldReason = (); + type RuntimeEvent = RuntimeEvent; type ExistentialDeposit = ExistentialDeposit; + type MaxHolds = (); + type MaxFreezes = (); type MaxLocks = MaxLocks; type MaxReserves = MaxReserves; + type ReserveIdentifier = [u8; 8]; type WeightInfo = (); } @@ -135,7 +128,7 @@ impl Default for ExtBuilder { impl ExtBuilder { pub fn build(self) -> sp_io::TestExternalities { - let mut t = frame_system::GenesisConfig::default().build_storage::().unwrap(); + let mut t = frame_system::GenesisConfig::::default().build_storage().unwrap(); // see the logs in tests when using `RUST_LOG=debug cargo test -- --nocapture` let _ = env_logger::builder().is_test(true).try_init(); diff --git a/zrml/liquidity-mining/src/tests.rs b/zrml/liquidity-mining/src/tests.rs index 68363ff8c..1ec6f0387 100644 --- a/zrml/liquidity-mining/src/tests.rs +++ b/zrml/liquidity-mining/src/tests.rs @@ -27,10 +27,10 @@ use crate::{ use core::ops::Range; use frame_support::{ assert_err, assert_ok, - dispatch::DispatchError, traits::{Currency, OnFinalize}, }; use frame_system::RawOrigin; +use sp_runtime::DispatchError; use zeitgeist_primitives::types::{ BaseAsset, Deadlines, Market, MarketBonds, MarketCreation, MarketDisputeMechanism, MarketPeriod, MarketStatus, MarketType, ScoringRule, diff --git a/zrml/liquidity-mining/src/track_incentives_based_on_bought_shares.rs b/zrml/liquidity-mining/src/track_incentives_based_on_bought_shares.rs index b62893e30..208189b20 100644 --- a/zrml/liquidity-mining/src/track_incentives_based_on_bought_shares.rs +++ b/zrml/liquidity-mining/src/track_incentives_based_on_bought_shares.rs @@ -1,4 +1,4 @@ -// Copyright 2022 Forecasting Technologies LTD. +// Copyright 2022-2024 Forecasting Technologies LTD. // Copyright 2021-2022 Zeitgeist PM LLC. // // This file is part of Zeitgeist. @@ -22,6 +22,7 @@ use crate::{ }; use alloc::{collections::BTreeSet, vec::Vec}; use core::marker::PhantomData; +use frame_system::pallet_prelude::BlockNumberFor; use sp_runtime::traits::{CheckedDiv, Saturating}; use zeitgeist_primitives::types::MarketPeriod; use zrml_market_commons::MarketCommonsPalletApi; @@ -37,7 +38,7 @@ impl TrackIncentivesBasedOnBoughtShares where T: crate::Config, { - pub(crate) fn exec(curr_block: T::BlockNumber) -> Option { + pub(crate) fn exec(curr_block: BlockNumberFor) -> Option { let per_block_incentives = >::get(); let market_incentives = Self::markets_incentives(per_block_incentives, curr_block)?; let market_incentives_len = market_incentives.len(); @@ -59,7 +60,7 @@ where let perpetual_incentives = calculate_perthousand_value(ppb, raw_incentives); let incentives = raw_incentives.saturating_sub(perpetual_incentives); >::mutate(market_id, account_id, |values| { - let one = T::BlockNumber::from(1u8); + let one = BlockNumberFor::::from(1u8); values.perpetual_incentives = values.perpetual_incentives.saturating_add(perpetual_incentives); @@ -70,7 +71,7 @@ where } } - let _ = >::clear(u32::max_value(), None); + let _ = >::clear(u32::MAX, None); Some(market_incentives_len) } @@ -94,7 +95,7 @@ where )] fn markets_incentives( per_block_incentives: BalanceOf, - curr_block: T::BlockNumber, + curr_block: BlockNumberFor, ) -> Option)>> { let mut normalized_total = BalanceOf::::from(0u8); let markets_periods: BTreeSet<_> = >::iter().map(|el| el.0).collect(); @@ -141,9 +142,9 @@ where // // The greater the output, the more incentives the market will receive fn normalize_market( - curr_block: T::BlockNumber, + curr_block: BlockNumberFor, now: MomentOf, - period: &MarketPeriod>, + period: &MarketPeriod, MomentOf>, ) -> BalanceOf { let opt = match period { MarketPeriod::Block(range) => { diff --git a/zrml/liquidity-mining/src/track_incentives_based_on_sold_shares.rs b/zrml/liquidity-mining/src/track_incentives_based_on_sold_shares.rs index 1efbacf0d..d6cf15628 100644 --- a/zrml/liquidity-mining/src/track_incentives_based_on_sold_shares.rs +++ b/zrml/liquidity-mining/src/track_incentives_based_on_sold_shares.rs @@ -1,4 +1,4 @@ -// Copyright 2022 Forecasting Technologies LTD. +// Copyright 2022, 2024 Forecasting Technologies LTD. // Copyright 2021-2022 Zeitgeist PM LLC. // // This file is part of Zeitgeist. @@ -58,7 +58,7 @@ where }); counter = counter.saturating_add(1); } - let _ = >::clear(u32::max_value(), None); + let _ = >::clear(u32::MAX, None); counter } } diff --git a/zrml/liquidity-mining/src/utils.rs b/zrml/liquidity-mining/src/utils.rs index f05276dd3..eb5523c52 100644 --- a/zrml/liquidity-mining/src/utils.rs +++ b/zrml/liquidity-mining/src/utils.rs @@ -1,3 +1,4 @@ +// Copyright 2024 Forecasting Technologies LTD. // Copyright 2021-2022 Zeitgeist PM LLC. // // This file is part of Zeitgeist. @@ -17,6 +18,7 @@ use crate::MomentOf; use core::ops::{Div, Range}; +use frame_system::pallet_prelude::BlockNumberFor; use sp_runtime::{ traits::{CheckedDiv, Saturating, UniqueSaturatedInto}, SaturatedConversion, @@ -29,7 +31,7 @@ use zeitgeist_primitives::constants::MILLISECS_PER_BLOCK; // To convert the block number type to the moment type, is is necessary to first convert the // block number value to `u32`, which caps the maximum output to `u32::MAX`. Since this function // is only used to evaluate perpetual balances, such limitation shouldn't be a problem. -pub fn calculate_average_blocks_of_a_time_period(range: &Range>) -> T::BlockNumber +pub fn calculate_average_blocks_of_a_time_period(range: &Range>) -> BlockNumberFor where T: crate::Config, { diff --git a/zrml/market-commons/Cargo.toml b/zrml/market-commons/Cargo.toml index f25f7154f..5ce9fd31d 100644 --- a/zrml/market-commons/Cargo.toml +++ b/zrml/market-commons/Cargo.toml @@ -1,6 +1,7 @@ [dependencies] frame-support = { workspace = true } frame-system = { workspace = true } +log = { workspace = true } parity-scale-codec = { workspace = true, features = ["derive", "max-encoded-len"] } scale-info = { workspace = true, features = ["derive"] } sp-arithmetic = { workspace = true } @@ -31,6 +32,6 @@ try-runtime = [ [package] authors = ["Zeitgeist PM "] -edition = "2021" +edition.workspace = true name = "zrml-market-commons" version = "0.5.2" diff --git a/zrml/market-commons/src/lib.rs b/zrml/market-commons/src/lib.rs index 3b2e1af6c..73deadb4a 100644 --- a/zrml/market-commons/src/lib.rs +++ b/zrml/market-commons/src/lib.rs @@ -42,6 +42,7 @@ mod pallet { traits::{Hooks, StorageVersion, Time}, Blake2_128Concat, Parameter, }; + use frame_system::pallet_prelude::BlockNumberFor; use parity_scale_codec::{FullCodec, HasCompact, MaxEncodedLen}; use sp_runtime::{ traits::{ @@ -62,22 +63,21 @@ mod pallet { pub(crate) type AccountIdOf = ::AccountId; pub(crate) type BalanceOf = ::Balance; - pub(crate) type BlockNumberOf = ::BlockNumber; pub(crate) type MarketIdOf = ::MarketId; pub(crate) type MarketOf = Market< AccountIdOf, BalanceOf, - BlockNumberOf, + BlockNumberFor, MomentOf, BaseAsset, MarketIdOf, >; pub(crate) type MomentOf = <::Timestamp as frame_support::traits::Time>::Moment; - pub(crate) type DeadlinesOf = Deadlines>; - pub(crate) type EarlyCloseOf = EarlyClose, MomentOf>; + pub(crate) type DeadlinesOf = Deadlines>; + pub(crate) type EarlyCloseOf = EarlyClose, MomentOf>; pub(crate) type MarketBondsOf = MarketBonds, BalanceOf>; - pub(crate) type MarketPeriodOf = MarketPeriod, MomentOf>; - pub(crate) type ReportOf = Report, BlockNumberOf>; + pub(crate) type MarketPeriodOf = MarketPeriod, MomentOf>; + pub(crate) type ReportOf = Report, BlockNumberFor>; #[pallet::call] impl Pallet {} @@ -125,7 +125,7 @@ mod pallet { } #[pallet::hooks] - impl Hooks for Pallet {} + impl Hooks> for Pallet {} #[pallet::pallet] #[pallet::storage_version(STORAGE_VERSION)] @@ -155,7 +155,7 @@ mod pallet { ::Timestamp: Time, { type AccountId = AccountIdOf; - type BlockNumber = T::BlockNumber; + type BlockNumber = BlockNumberFor; type Balance = T::Balance; type MarketId = T::MarketId; type Moment = MomentOf; diff --git a/zrml/market-commons/src/migrations.rs b/zrml/market-commons/src/migrations.rs index 2569b4a79..6fc68013b 100644 --- a/zrml/market-commons/src/migrations.rs +++ b/zrml/market-commons/src/migrations.rs @@ -16,14 +16,15 @@ // You should have received a copy of the GNU General Public License // along with Zeitgeist. If not, see . -use crate::{AccountIdOf, BalanceOf, BlockNumberOf, Config, MomentOf, Pallet as MarketCommons}; +use crate::{AccountIdOf, BalanceOf, Config, MomentOf, Pallet as MarketCommons}; use alloc::vec::Vec; use core::marker::PhantomData; use frame_support::{ - dispatch::Weight, - log, traits::{Get, OnRuntimeUpgrade, StorageVersion}, + weights::Weight, }; +use frame_system::pallet_prelude::BlockNumberFor; +use log; use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; use scale_info::TypeInfo; use sp_runtime::{Perbill, RuntimeDebug, Saturating}; @@ -37,6 +38,7 @@ use { crate::MarketIdOf, alloc::{collections::BTreeMap, format}, frame_support::migration::storage_key_iter, + sp_runtime::DispatchError, }; #[cfg(any(feature = "try-runtime", feature = "test"))] @@ -68,7 +70,7 @@ pub struct OldMarket { } type OldMarketOf = - OldMarket, BalanceOf, BlockNumberOf, MomentOf, BaseAsset>; + OldMarket, BalanceOf, BlockNumberFor, MomentOf, BaseAsset>; #[derive(TypeInfo, Clone, Copy, Encode, Eq, Decode, MaxEncodedLen, PartialEq, RuntimeDebug)] pub enum OldScoringRule { @@ -147,7 +149,7 @@ where } #[cfg(feature = "try-runtime")] - fn pre_upgrade() -> Result, &'static str> { + fn pre_upgrade() -> Result, DispatchError> { let old_markets = storage_key_iter::, OldMarketOf, Blake2_128Concat>( MARKET_COMMONS, MARKETS, @@ -169,7 +171,7 @@ where } #[cfg(feature = "try-runtime")] - fn post_upgrade(previous_state: Vec) -> Result<(), &'static str> { + fn post_upgrade(previous_state: Vec) -> Result<(), DispatchError> { let old_markets: BTreeMap, OldMarketOf> = Decode::decode(&mut &previous_state[..]).unwrap(); let old_market_count = old_markets.len(); @@ -212,10 +214,9 @@ mod tests { MarketOf, }; use alloc::fmt::Debug; - use frame_support::{ - migration::put_storage_value, storage_root, Blake2_128Concat, StorageHasher, - }; + use frame_support::{migration::put_storage_value, Blake2_128Concat, StorageHasher}; use parity_scale_codec::Encode; + use sp_io::storage::root as storage_root; use sp_runtime::{Perbill, StateVersion}; use test_case::test_case; use zeitgeist_primitives::types::{BaseAssetClass, Bond, EarlyCloseState, MarketId}; @@ -269,7 +270,7 @@ mod tests { oracle: 4, metadata: vec![0x05; 50], market_type: MarketType::Categorical(999), - period: MarketPeriod::, MomentOf>::Block(6..7), + period: MarketPeriod::, MomentOf>::Block(6..7), deadlines: Deadlines { grace_period: 7, oracle_duration: 8, dispute_duration: 9 }, scoring_rule: ScoringRule::AmmCdaHybrid, status: MarketStatus::Active, diff --git a/zrml/market-commons/src/mock.rs b/zrml/market-commons/src/mock.rs index bf692a1a8..ebc14469b 100644 --- a/zrml/market-commons/src/mock.rs +++ b/zrml/market-commons/src/mock.rs @@ -20,29 +20,22 @@ use crate::{self as zrml_market_commons}; use frame_support::{construct_runtime, traits::Everything}; +use frame_system::mocking::MockBlock; use sp_runtime::{ - testing::Header, traits::{BlakeTwo256, IdentityLookup}, + BuildStorage, }; use zeitgeist_primitives::{ - constants::mock::{BlockHashCount, MaxReserves, MinimumPeriod}, - types::{ - AccountIdTest, Balance, BlockNumber, BlockTest, Hash, Index, MarketId, Moment, - UncheckedExtrinsicTest, - }, + constants::mock::{BlockHashCount, ExistentialDeposit, MaxLocks, MaxReserves, MinimumPeriod}, + types::{AccountIdTest, Balance, Hash, MarketId, Moment}, }; construct_runtime!( - pub enum Runtime - where - Block = BlockTest, - NodeBlock = BlockTest, - UncheckedExtrinsic = UncheckedExtrinsicTest, - { - Balances: pallet_balances::{Call, Config, Event, Pallet, Storage}, - MarketCommons: zrml_market_commons::{Pallet, Storage}, - System: frame_system::{Call, Config,Event, Pallet, Storage}, - Timestamp: pallet_timestamp::{Pallet}, + pub enum Runtime { + Balances: pallet_balances, + MarketCommons: zrml_market_commons, + System: frame_system, + Timestamp: pallet_timestamp, } ); @@ -56,18 +49,17 @@ impl frame_system::Config for Runtime { type AccountData = pallet_balances::AccountData; type AccountId = AccountIdTest; type BaseCallFilter = Everything; + type Block = MockBlock; type BlockHashCount = BlockHashCount; type BlockLength = (); - type BlockNumber = BlockNumber; type BlockWeights = (); type RuntimeCall = RuntimeCall; type DbWeight = (); - type RuntimeEvent = (); + type RuntimeEvent = RuntimeEvent; type Hash = Hash; type Hashing = BlakeTwo256; - type Header = Header; - type Index = Index; type Lookup = IdentityLookup; + type Nonce = u64; type MaxConsumers = frame_support::traits::ConstU32<16>; type OnKilledAccount = (); type OnNewAccount = (); @@ -83,9 +75,13 @@ impl pallet_balances::Config for Runtime { type AccountStore = System; type Balance = Balance; type DustRemoval = (); - type RuntimeEvent = (); - type ExistentialDeposit = (); - type MaxLocks = (); + type FreezeIdentifier = (); + type RuntimeHoldReason = (); + type RuntimeEvent = RuntimeEvent; + type ExistentialDeposit = ExistentialDeposit; + type MaxHolds = (); + type MaxFreezes = (); + type MaxLocks = MaxLocks; type MaxReserves = MaxReserves; type ReserveIdentifier = [u8; 8]; type WeightInfo = (); @@ -103,7 +99,7 @@ pub struct ExtBuilder {} impl ExtBuilder { pub fn build(self) -> sp_io::TestExternalities { - let mut t = frame_system::GenesisConfig::default().build_storage::().unwrap(); + let mut t = frame_system::GenesisConfig::::default().build_storage().unwrap(); // see the logs in tests when using `RUST_LOG=debug cargo test -- --nocapture` let _ = env_logger::builder().is_test(true).try_init(); diff --git a/zrml/market-commons/src/types/market_builder.rs b/zrml/market-commons/src/types/market_builder.rs index c121f19e0..537cc9eb7 100644 --- a/zrml/market-commons/src/types/market_builder.rs +++ b/zrml/market-commons/src/types/market_builder.rs @@ -16,10 +16,11 @@ // along with Zeitgeist. If not, see . use crate::{ - AccountIdOf, BalanceOf, BlockNumberOf, Config, DeadlinesOf, EarlyCloseOf, Error, MarketBondsOf, - MarketIdOf, MarketOf, MarketPeriodOf, MomentOf, ReportOf, + AccountIdOf, BalanceOf, Config, DeadlinesOf, EarlyCloseOf, Error, MarketBondsOf, MarketIdOf, + MarketOf, MarketPeriodOf, MomentOf, ReportOf, }; use alloc::vec::Vec; +use frame_system::pallet_prelude::BlockNumberFor; use sp_runtime::{DispatchError, Perbill}; use zeitgeist_primitives::{ traits::MarketBuilderTrait, @@ -115,7 +116,7 @@ impl MarketBuilderTrait< AccountIdOf, BalanceOf, - BlockNumberOf, + BlockNumberFor, MomentOf, BaseAsset, MarketIdOf, diff --git a/zrml/neo-swaps/Cargo.toml b/zrml/neo-swaps/Cargo.toml index 85e982808..241e008fd 100644 --- a/zrml/neo-swaps/Cargo.toml +++ b/zrml/neo-swaps/Cargo.toml @@ -5,6 +5,7 @@ frame-benchmarking = { workspace = true, optional = true } frame-support = { workspace = true } frame-system = { workspace = true } hydra-dx-math = { workspace = true } +log = { workspace = true } orml-traits = { workspace = true } parity-scale-codec = { workspace = true, features = ["derive", "max-encoded-len"] } scale-info = { workspace = true, features = ["derive"] } @@ -21,7 +22,7 @@ orml-currencies = { workspace = true, optional = true } orml-tokens = { workspace = true, optional = true } pallet-assets = { workspace = true, optional = true } pallet-balances = { workspace = true, optional = true } -pallet-randomness-collective-flip = { workspace = true, optional = true } +pallet-insecure-randomness-collective-flip = { workspace = true, optional = true } pallet-timestamp = { workspace = true, optional = true } pallet-treasury = { workspace = true, optional = true } pallet-xcm = { workspace = true, optional = true } @@ -50,7 +51,7 @@ mock = [ "orml-currencies/default", "orml-tokens/default", "pallet-balances", - "pallet-randomness-collective-flip/default", + "pallet-insecure-randomness-collective-flip/default", "pallet-timestamp/default", "pallet-treasury/default", "sp-api/default", @@ -106,6 +107,6 @@ try-runtime = [ [package] authors = ["Zeitgeist PM "] -edition = "2021" +edition.workspace = true name = "zrml-neo-swaps" version = "0.5.2" diff --git a/zrml/neo-swaps/src/benchmarking.rs b/zrml/neo-swaps/src/benchmarking.rs index ad55064b0..89d896f36 100644 --- a/zrml/neo-swaps/src/benchmarking.rs +++ b/zrml/neo-swaps/src/benchmarking.rs @@ -23,6 +23,7 @@ use crate::{ traits::{liquidity_shares_manager::LiquiditySharesManager, pool_operations::PoolOperations}, AssetOf, BalanceOf, MarketIdOf, Pallet as NeoSwaps, Pools, MIN_SPOT_PRICE, }; +use alloc::{vec, vec::Vec}; use core::{cell::Cell, iter, marker::PhantomData}; use frame_benchmarking::v2::*; use frame_support::{ @@ -31,7 +32,10 @@ use frame_support::{ }; use frame_system::RawOrigin; use orml_traits::MultiCurrency; -use sp_runtime::{traits::Get, Perbill, SaturatedConversion}; +use sp_runtime::{ + traits::{Get, Zero}, + Perbill, SaturatedConversion, +}; use zeitgeist_primitives::{ constants::{base_multiples::*, CENT}, math::fixed::{BaseProvider, FixedDiv, FixedMul, ZeitgeistBase}, @@ -52,10 +56,7 @@ macro_rules! assert_ok_with_transaction { }}; } -trait LiquidityTreeBenchmarkHelper -where - T: Config, -{ +trait LiquidityTreeBenchmarkHelper { fn calculate_min_pool_shares_amount(&self) -> BalanceOf; } @@ -79,10 +80,7 @@ struct BenchmarkHelper { _marker: PhantomData, } -impl BenchmarkHelper -where - T: Config, -{ +impl BenchmarkHelper { fn new() -> Self { BenchmarkHelper { current_id: Cell::new(0), _marker: PhantomData } } @@ -171,14 +169,11 @@ where } } -fn create_market( +fn create_market( caller: T::AccountId, base_asset: AssetOf, asset_count: AssetIndexType, -) -> MarketIdOf -where - T: Config, -{ +) -> MarketIdOf { let market = Market { market_id: 0u8.into(), base_asset: base_asset.try_into().unwrap(), @@ -215,10 +210,7 @@ fn create_market_and_deploy_pool( base_asset: AssetOf, asset_count: AssetIndexType, amount: BalanceOf, -) -> MarketIdOf -where - T: Config, -{ +) -> MarketIdOf { let market_id = create_market::(caller.clone(), base_asset, asset_count); let total_cost = amount + T::MultiCurrency::minimum_balance(base_asset); assert_ok!(T::MultiCurrency::deposit(base_asset, &caller, total_cost)); @@ -237,10 +229,7 @@ where market_id } -fn deposit_fees(market_id: MarketIdOf, amount: BalanceOf) -where - T: Config, -{ +fn deposit_fees(market_id: MarketIdOf, amount: BalanceOf) { let mut pool = Pools::::get(market_id).unwrap(); assert_ok!(T::MultiCurrency::deposit(pool.collateral, &pool.account_id, amount)); assert_ok!(pool.liquidity_shares_manager.deposit_fees(amount)); @@ -248,10 +237,7 @@ where } // Let `caller` join the pool of `market_id` after adding the required funds to their account. -fn add_liquidity_provider_to_market(market_id: MarketIdOf, caller: AccountIdOf) -where - T: Config, -{ +fn add_liquidity_provider_to_market(market_id: MarketIdOf, caller: AccountIdOf) { let pool = Pools::::get(market_id).unwrap(); // Buy a little more to account for rounding. let pool_shares_amount = @@ -472,7 +458,6 @@ mod benchmarks { // Mock up some fees. Needs to be large enough to ensure that Bob's share is not smaller // than the existential deposit. - let pool = Pools::::get(market_id).unwrap(); let max_node_count = LiquidityTreeOf::::max_node_count() as u128; let fee_amount = (max_node_count * _10).saturated_into(); deposit_fees::(market_id, fee_amount); diff --git a/zrml/neo-swaps/src/lib.rs b/zrml/neo-swaps/src/lib.rs index 6519c130c..8b2e5bad0 100644 --- a/zrml/neo-swaps/src/lib.rs +++ b/zrml/neo-swaps/src/lib.rs @@ -53,15 +53,18 @@ mod pallet { pallet_prelude::StorageMap, require_transactional, traits::{Get, IsType, StorageVersion}, - transactional, PalletError, PalletId, RuntimeDebug, Twox64Concat, + transactional, PalletError, PalletId, Twox64Concat, + }; + use frame_system::{ + ensure_signed, + pallet_prelude::{BlockNumberFor, OriginFor}, }; - use frame_system::{ensure_signed, pallet_prelude::OriginFor}; use orml_traits::MultiCurrency; use parity_scale_codec::{Decode, Encode}; use scale_info::TypeInfo; use sp_runtime::{ traits::{AccountIdConversion, CheckedSub, Saturating, Zero}, - DispatchError, DispatchResult, Perbill, SaturatedConversion, + DispatchError, DispatchResult, Perbill, RuntimeDebug, SaturatedConversion, }; use zeitgeist_primitives::{ constants::{BASE, CENT}, @@ -120,7 +123,7 @@ mod pallet { MarketId = MarketIdOf, >; - type MarketCommons: MarketCommonsPalletApi; + type MarketCommons: MarketCommonsPalletApi>; type MultiCurrency: MultiCurrency>; @@ -142,7 +145,6 @@ mod pallet { #[pallet::pallet] #[pallet::storage_version(STORAGE_VERSION)] - #[pallet::generate_store(pub(super) trait Store)] pub struct Pallet(PhantomData); #[pallet::storage] diff --git a/zrml/neo-swaps/src/liquidity_tree/traits/liquidity_tree_helper.rs b/zrml/neo-swaps/src/liquidity_tree/traits/liquidity_tree_helper.rs index e73073d08..8ec63ad2f 100644 --- a/zrml/neo-swaps/src/liquidity_tree/traits/liquidity_tree_helper.rs +++ b/zrml/neo-swaps/src/liquidity_tree/traits/liquidity_tree_helper.rs @@ -1,4 +1,4 @@ -// Copyright 2023 Forecasting Technologies LTD. +// Copyright 2023-2024 Forecasting Technologies LTD. // // This file is part of Zeitgeist. // @@ -84,11 +84,6 @@ where op: UpdateDescendantStakeOperation, ) -> DispatchResult; - /// Mutate each child of the node at `index` using `mutator`. - fn mutate_each_child(&mut self, index: u32, mutator: F) -> DispatchResult - where - F: FnMut(&mut Self::Node) -> DispatchResult; - /// Return the number of nodes in the tree. Note that abandoned nodes are counted. fn node_count(&self) -> u32; diff --git a/zrml/neo-swaps/src/liquidity_tree/types/liquidity_tree.rs b/zrml/neo-swaps/src/liquidity_tree/types/liquidity_tree.rs index 5986b85f2..c95a5d996 100644 --- a/zrml/neo-swaps/src/liquidity_tree/types/liquidity_tree.rs +++ b/zrml/neo-swaps/src/liquidity_tree/types/liquidity_tree.rs @@ -1,4 +1,4 @@ -// Copyright 2023 Forecasting Technologies LTD. +// Copyright 2023-2024 Forecasting Technologies LTD. // // This file is part of Zeitgeist. // @@ -377,18 +377,6 @@ where Ok(()) } - fn mutate_each_child(&mut self, index: u32, mut mutator: F) -> DispatchResult - where - F: FnMut(&mut Self::Node) -> DispatchResult, - { - let child_indices = self.children(index)?; - child_indices.apply(|index| { - self.mutate_node(index, |node| mutator(node))?; - Ok(()) - })?; - Ok(()) - } - fn node_count(&self) -> u32 { self.nodes.len() as u32 } diff --git a/zrml/neo-swaps/src/liquidity_tree/types/liquidity_tree_child_indices.rs b/zrml/neo-swaps/src/liquidity_tree/types/liquidity_tree_child_indices.rs index 4a4d47cad..55e4c51b4 100644 --- a/zrml/neo-swaps/src/liquidity_tree/types/liquidity_tree_child_indices.rs +++ b/zrml/neo-swaps/src/liquidity_tree/types/liquidity_tree_child_indices.rs @@ -1,4 +1,4 @@ -// Copyright 2023 Forecasting Technologies LTD. +// Copyright 2023-2024 Forecasting Technologies LTD. // // This file is part of Zeitgeist. // @@ -15,8 +15,6 @@ // You should have received a copy of the GNU General Public License // along with Zeitgeist. If not, see . -use sp_runtime::DispatchError; - /// Structure for managing children in a liquidity tree. pub(crate) struct LiquidityTreeChildIndices { /// Left-hand side child; `None` if there's no left-hand side child (the node is either empty or @@ -27,22 +25,6 @@ pub(crate) struct LiquidityTreeChildIndices { pub(crate) rhs: Option, } -impl LiquidityTreeChildIndices { - /// Applies a `mutator` function to each child if it exists. - pub fn apply(&self, mut mutator: F) -> Result<(), DispatchError> - where - F: FnMut(u32) -> Result<(), DispatchError>, - { - if let Some(lhs) = self.lhs { - mutator(lhs)?; - } - if let Some(rhs) = self.rhs { - mutator(rhs)?; - } - Ok(()) - } -} - // Implement `From` for destructuring impl From for (Option, Option) { fn from(child_indices: LiquidityTreeChildIndices) -> (Option, Option) { diff --git a/zrml/neo-swaps/src/math.rs b/zrml/neo-swaps/src/math.rs index 92aa104be..401dfb8be 100644 --- a/zrml/neo-swaps/src/math.rs +++ b/zrml/neo-swaps/src/math.rs @@ -423,6 +423,7 @@ mod transcendental { #[cfg(test)] mod tests { + use super::*; use alloc::str::FromStr; use fixed::types::U64F64; @@ -504,6 +505,9 @@ mod transcendental { #[cfg(test)] mod tests { + // TODO(#1328): Remove after rustc nightly-2024-04-22 + #![allow(clippy::duplicated_attributes)] + use super::*; use crate::{mock::Runtime as MockRuntime, MAX_SPOT_PRICE, MIN_SPOT_PRICE}; use alloc::str::FromStr; diff --git a/zrml/neo-swaps/src/migration.rs b/zrml/neo-swaps/src/migration.rs index 2aa4996f9..8650ec124 100644 --- a/zrml/neo-swaps/src/migration.rs +++ b/zrml/neo-swaps/src/migration.rs @@ -22,20 +22,20 @@ use crate::{ use alloc::collections::BTreeMap; use core::marker::PhantomData; use frame_support::{ - dispatch::Weight, - log, traits::{Get, OnRuntimeUpgrade, StorageVersion}, - RuntimeDebug, + weights::Weight, }; +use log; use parity_scale_codec::{Decode, Encode}; use scale_info::TypeInfo; -use sp_runtime::Saturating; +use sp_runtime::{RuntimeDebug, Saturating}; cfg_if::cfg_if! { if #[cfg(feature = "try-runtime")] { use crate::{MarketIdOf}; use alloc::{format, vec::Vec}; use frame_support::{migration::storage_key_iter, pallet_prelude::Twox64Concat}; + use sp_runtime::DispatchError; } } @@ -111,7 +111,7 @@ where } #[cfg(feature = "try-runtime")] - fn pre_upgrade() -> Result, &'static str> { + fn pre_upgrade() -> Result, DispatchError> { let old_pools = storage_key_iter::, OldPoolOf, Twox64Concat>(NEO_SWAPS, POOLS) .collect::>(); @@ -119,7 +119,7 @@ where } #[cfg(feature = "try-runtime")] - fn post_upgrade(previous_state: Vec) -> Result<(), &'static str> { + fn post_upgrade(previous_state: Vec) -> Result<(), DispatchError> { let old_pools: BTreeMap, OldPoolOf> = Decode::decode(&mut &previous_state[..]) .map_err(|_| "Failed to decode state: Invalid state")?; @@ -152,11 +152,11 @@ mod tests { MarketIdOf, PoolOf, Pools, }; use alloc::collections::BTreeMap; - use frame_support::{ - dispatch::fmt::Debug, migration::put_storage_value, storage_root, StateVersion, - StorageHasher, Twox64Concat, - }; + use core::fmt::Debug; + use frame_support::{migration::put_storage_value, StorageHasher, Twox64Concat}; use parity_scale_codec::Encode; + use sp_io::storage::root as storage_root; + use sp_runtime::StateVersion; use zeitgeist_primitives::types::Asset; #[test] diff --git a/zrml/neo-swaps/src/mock.rs b/zrml/neo-swaps/src/mock.rs index 610bc955f..35f3f52fb 100644 --- a/zrml/neo-swaps/src/mock.rs +++ b/zrml/neo-swaps/src/mock.rs @@ -30,15 +30,12 @@ use frame_support::{ construct_runtime, ord_parameter_types, parameter_types, traits::{AsEnsureOriginWithArg, Contains, Everything, NeverEnsureOrigin}, }; -use frame_system::{EnsureRoot, EnsureSigned, EnsureSignedBy}; -#[cfg(feature = "parachain")] -use orml_asset_registry::AssetMetadata; +use frame_system::{mocking::MockBlock, EnsureRoot, EnsureSigned, EnsureSignedBy}; use orml_traits::MultiCurrency; use parity_scale_codec::Compact; use sp_runtime::{ - testing::Header, traits::{BlakeTwo256, ConstU32, Get, IdentityLookup, Zero}, - DispatchResult, Perbill, Percent, SaturatedConversion, + BuildStorage, DispatchResult, Perbill, Percent, SaturatedConversion, }; use zeitgeist_primitives::{ constants::{ @@ -66,12 +63,19 @@ use zeitgeist_primitives::{ math::fixed::FixedMul, traits::{DeployPoolApi, DistributeFees}, types::{ - AccountIdTest, Amount, Assets, Balance, BasicCurrencyAdapter, BlockNumber, BlockTest, - CampaignAsset, CampaignAssetId, Currencies, CustomAsset, CustomAssetId, Hash, Index, - MarketAsset, MarketId, Moment, UncheckedExtrinsicTest, + AccountIdTest, Amount, Assets, Balance, BasicCurrencyAdapter, CampaignAsset, + CampaignAssetId, Currencies, CustomAsset, CustomAssetId, Hash, MarketAsset, MarketId, + Moment, }, }; use zrml_neo_swaps::BalanceOf; +#[cfg(feature = "parachain")] +use { + orml_traits::asset_registry::AssetProcessor, + parity_scale_codec::Encode, + sp_runtime::DispatchError, + zeitgeist_primitives::types::{CustomMetadata, XcmAsset}, +}; pub const ALICE: AccountIdTest = 0; #[allow(unused)] @@ -154,8 +158,6 @@ where } } -pub type UncheckedExtrinsic = UncheckedExtrinsicTest; - pub struct DustRemovalWhitelist; impl Contains for DustRemovalWhitelist { @@ -169,31 +171,28 @@ pub(super) type CampaignAssetsInstance = pallet_assets::Instance2; pub(super) type MarketAssetsInstance = pallet_assets::Instance3; construct_runtime!( - pub enum Runtime - where - Block = BlockTest, - NodeBlock = BlockTest, - UncheckedExtrinsic = UncheckedExtrinsic, - { - NeoSwaps: zrml_neo_swaps::{Call, Event, Pallet}, - AssetManager: orml_currencies::{Call, Pallet, Storage}, - AssetRouter: zrml_asset_router::{Pallet}, - Authorized: zrml_authorized::{Event, Pallet, Storage}, - Balances: pallet_balances::{Call, Config, Event, Pallet, Storage}, - CampaignAssets: pallet_assets::::{Call, Pallet, Storage, Event}, - Court: zrml_court::{Event, Pallet, Storage}, - CustomAssets: pallet_assets::::{Call, Pallet, Storage, Event}, - LiquidityMining: zrml_liquidity_mining::{Config, Event, Pallet}, - MarketAssets: pallet_assets::::{Call, Pallet, Storage, Event}, - MarketCommons: zrml_market_commons::{Pallet, Storage}, - PredictionMarkets: zrml_prediction_markets::{Event, Pallet, Storage}, - RandomnessCollectiveFlip: pallet_randomness_collective_flip::{Pallet, Storage}, - SimpleDisputes: zrml_simple_disputes::{Event, Pallet, Storage}, - GlobalDisputes: zrml_global_disputes::{Event, Pallet, Storage}, - System: frame_system::{Call, Config, Event, Pallet, Storage}, - Timestamp: pallet_timestamp::{Pallet}, - Tokens: orml_tokens::{Config, Event, Pallet, Storage}, - Treasury: pallet_treasury::{Call, Event, Pallet, Storage}, + pub enum Runtime { + NeoSwaps: zrml_neo_swaps, + AssetManager: orml_currencies, + #[cfg(feature = "parachain")] + AssetRegistry: orml_asset_registry, + AssetRouter: zrml_asset_router, + Authorized: zrml_authorized, + Balances: pallet_balances, + CampaignAssets: pallet_assets::, + Court: zrml_court, + CustomAssets: pallet_assets::, + LiquidityMining: zrml_liquidity_mining, + MarketAssets: pallet_assets::, + MarketCommons: zrml_market_commons, + PredictionMarkets: zrml_prediction_markets, + RandomnessCollectiveFlip: pallet_insecure_randomness_collective_flip, + SimpleDisputes: zrml_simple_disputes, + GlobalDisputes: zrml_global_disputes, + System: frame_system, + Timestamp: pallet_timestamp, + Tokens: orml_tokens, + Treasury: pallet_treasury, } ); @@ -325,7 +324,7 @@ impl zrml_asset_router::Config for Runtime { type MarketAssets = MarketAssets; } -impl pallet_randomness_collective_flip::Config for Runtime {} +impl pallet_insecure_randomness_collective_flip::Config for Runtime {} impl zrml_prediction_markets::Config for Runtime { type AdvisoryBond = AdvisoryBond; @@ -334,7 +333,7 @@ impl zrml_prediction_markets::Config for Runtime { type AssetCreator = AssetRouter; type AssetDestroyer = AssetRouter; #[cfg(feature = "parachain")] - type AssetRegistry = MockRegistry; + type AssetRegistry = AssetRegistry; type Authorized = Authorized; type CloseEarlyBlockPeriod = CloseEarlyBlockPeriod; type CloseEarlyDisputeBond = CloseEarlyDisputeBond; @@ -429,27 +428,26 @@ impl frame_system::Config for Runtime { type AccountData = pallet_balances::AccountData; type AccountId = AccountIdTest; type BaseCallFilter = Everything; + type Block = MockBlock; type BlockHashCount = BlockHashCount; type BlockLength = (); - type BlockNumber = BlockNumber; type BlockWeights = (); type RuntimeCall = RuntimeCall; type DbWeight = (); type RuntimeEvent = RuntimeEvent; type Hash = Hash; type Hashing = BlakeTwo256; - type Header = Header; - type Index = Index; type Lookup = IdentityLookup; + type Nonce = u64; type MaxConsumers = frame_support::traits::ConstU32<16>; type OnKilledAccount = (); type OnNewAccount = (); - type OnSetCode = (); type RuntimeOrigin = RuntimeOrigin; type PalletInfo = PalletInfo; type SS58Prefix = (); type SystemWeightInfo = (); type Version = (); + type OnSetCode = (); } impl orml_currencies::Config for Runtime { @@ -477,8 +475,12 @@ impl pallet_balances::Config for Runtime { type AccountStore = System; type Balance = Balance; type DustRemoval = (); + type FreezeIdentifier = (); + type RuntimeHoldReason = (); type RuntimeEvent = RuntimeEvent; type ExistentialDeposit = ExistentialDeposit; + type MaxHolds = (); + type MaxFreezes = (); type MaxLocks = MaxLocks; type MaxReserves = MaxReserves; type ReserveIdentifier = [u8; 8]; @@ -546,13 +548,34 @@ impl pallet_treasury::Config for Runtime { type WeightInfo = (); } -#[cfg(feature = "parachain")] -zrml_prediction_markets::impl_mock_registry! { - MockRegistry, - zeitgeist_primitives::types::XcmAsset, - Balance, - zeitgeist_primitives::types::CustomMetadata -} +cfg_if::cfg_if!( + if #[cfg(feature = "parachain")] { + type AssetMetadata = orml_traits::asset_registry::AssetMetadata< + Balance, + CustomMetadata, + ConstU32<1024> + >; + pub struct NoopAssetProcessor {} + + impl AssetProcessor for NoopAssetProcessor { + fn pre_register(id: Option, asset_metadata: AssetMetadata) + -> Result<(XcmAsset, AssetMetadata), DispatchError> { + Ok((id.unwrap(), asset_metadata)) + } + } + + impl orml_asset_registry::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type CustomMetadata = CustomMetadata; + type AssetId = XcmAsset; + type AuthorityOrigin = EnsureRoot; + type AssetProcessor = NoopAssetProcessor; + type Balance = Balance; + type StringLimit = ConstU32<1024>; + type WeightInfo = (); + } + } +); #[allow(unused)] pub struct ExtBuilder { @@ -570,7 +593,7 @@ impl Default for ExtBuilder { #[allow(unused)] impl ExtBuilder { pub fn build(self) -> sp_io::TestExternalities { - let mut t = frame_system::GenesisConfig::default().build_storage::().unwrap(); + let mut t = frame_system::GenesisConfig::::default().build_storage().unwrap(); // see the logs in tests when using `RUST_LOG=debug cargo test -- --nocapture` let _ = env_logger::builder().is_test(true).try_init(); pallet_balances::GenesisConfig:: { balances: self.balances } @@ -578,7 +601,6 @@ impl ExtBuilder { .unwrap(); #[cfg(feature = "parachain")] { - use frame_support::traits::GenesisBuild; orml_tokens::GenesisConfig:: { balances: vec![(ALICE, FOREIGN_ASSET.try_into().unwrap(), 100_000_000_001 * _1)], } @@ -588,18 +610,20 @@ impl ExtBuilder { allow_as_base_asset: true, ..Default::default() }; - orml_asset_registry_mock::GenesisConfig { - metadata: vec![( + orml_asset_registry::GenesisConfig:: { + assets: vec![( FOREIGN_ASSET.try_into().unwrap(), AssetMetadata { decimals: 18, - name: "MKL".as_bytes().to_vec(), - symbol: "MKL".as_bytes().to_vec(), + name: "MKL".as_bytes().to_vec().try_into().unwrap(), + symbol: "MKL".as_bytes().to_vec().try_into().unwrap(), existential_deposit: 0, location: None, additional: custom_metadata, - }, + } + .encode(), )], + last_asset_id: FOREIGN_ASSET.try_into().unwrap(), } .assimilate_storage(&mut t) .unwrap(); diff --git a/zrml/neo-swaps/src/tests/buy.rs b/zrml/neo-swaps/src/tests/buy.rs index 799549c69..9ecd703bb 100644 --- a/zrml/neo-swaps/src/tests/buy.rs +++ b/zrml/neo-swaps/src/tests/buy.rs @@ -299,7 +299,7 @@ fn buy_fails_on_insufficient_funds() { ); let amount_in = _10; #[cfg(not(feature = "parachain"))] - let expected_error = pallet_balances::Error::::InsufficientBalance; + let expected_error = DispatchError::Token(TokenError::FundsUnavailable); #[cfg(feature = "parachain")] let expected_error = orml_tokens::Error::::BalanceTooLow; assert_ok!(AssetManager::deposit(BASE_ASSET, &BOB, amount_in - 1)); diff --git a/zrml/neo-swaps/src/tests/deploy_pool.rs b/zrml/neo-swaps/src/tests/deploy_pool.rs index ac02e5955..df7b8202a 100644 --- a/zrml/neo-swaps/src/tests/deploy_pool.rs +++ b/zrml/neo-swaps/src/tests/deploy_pool.rs @@ -429,7 +429,7 @@ fn deploy_pool_fails_on_insufficient_funds() { vec![_3_4, _1_4], CENT ), - pallet_assets::Error::::BalanceLow + DispatchError::Arithmetic(ArithmeticError::Underflow) ); }); } diff --git a/zrml/neo-swaps/src/tests/join.rs b/zrml/neo-swaps/src/tests/join.rs index a230bef0b..866c0b8e3 100644 --- a/zrml/neo-swaps/src/tests/join.rs +++ b/zrml/neo-swaps/src/tests/join.rs @@ -216,7 +216,7 @@ fn join_fails_on_insufficient_funds() { _100, vec![u128::MAX, u128::MAX] ), - pallet_assets::Error::::NoAccount + DispatchError::Arithmetic(ArithmeticError::Underflow) ); }); } diff --git a/zrml/neo-swaps/src/tests/mod.rs b/zrml/neo-swaps/src/tests/mod.rs index 6c8f9c98c..dc172faaf 100644 --- a/zrml/neo-swaps/src/tests/mod.rs +++ b/zrml/neo-swaps/src/tests/mod.rs @@ -29,7 +29,7 @@ mod withdraw_fees; use crate::{consts::*, mock::*, traits::*, *}; use frame_support::{assert_noop, assert_ok}; use orml_traits::MultiCurrency; -use sp_runtime::Perbill; +use sp_runtime::{ArithmeticError, DispatchError, Perbill, TokenError}; use zeitgeist_primitives::{ constants::{base_multiples::*, CENT}, math::fixed::{FixedDiv, FixedMul}, diff --git a/zrml/neo-swaps/src/tests/sell.rs b/zrml/neo-swaps/src/tests/sell.rs index dfbd415c8..b4a688b33 100644 --- a/zrml/neo-swaps/src/tests/sell.rs +++ b/zrml/neo-swaps/src/tests/sell.rs @@ -352,7 +352,7 @@ fn sell_fails_on_insufficient_funds() { amount_in, u128::MAX, ), - pallet_assets::Error::::BalanceLow, + DispatchError::Token(TokenError::FundsUnavailable), ); }); } diff --git a/zrml/orderbook/Cargo.toml b/zrml/orderbook/Cargo.toml index 0fe4dcc09..300476788 100644 --- a/zrml/orderbook/Cargo.toml +++ b/zrml/orderbook/Cargo.toml @@ -61,6 +61,6 @@ try-runtime = [ [package] authors = ["Zeitgeist PM "] -edition = "2021" +edition.workspace = true name = "zrml-orderbook" version = "0.5.2" diff --git a/zrml/orderbook/fuzz/Cargo.toml b/zrml/orderbook/fuzz/Cargo.toml index 4daed00cc..9c5071779 100644 --- a/zrml/orderbook/fuzz/Cargo.toml +++ b/zrml/orderbook/fuzz/Cargo.toml @@ -13,7 +13,7 @@ zrml-orderbook = { workspace = true, features = ["default", "mock"] } [package] authors = ["Automatically generated"] -edition = "2021" +edition.workspace = true name = "zrml-orderbook-fuzz" publish = false version = "0.0.0" diff --git a/zrml/orderbook/src/benchmarks.rs b/zrml/orderbook/src/benchmarks.rs index 751f990aa..920a3f2e3 100644 --- a/zrml/orderbook/src/benchmarks.rs +++ b/zrml/orderbook/src/benchmarks.rs @@ -26,7 +26,7 @@ use super::*; use crate::{utils::market_mock, Pallet as Orderbook}; use frame_benchmarking::{account, benchmarks, whitelisted_caller}; -use frame_support::dispatch::UnfilteredDispatchable; +use frame_support::traits::UnfilteredDispatchable; use frame_system::RawOrigin; use orml_traits::MultiCurrency; use sp_runtime::SaturatedConversion; diff --git a/zrml/orderbook/src/lib.rs b/zrml/orderbook/src/lib.rs index e2cc1c892..29e3a3094 100644 --- a/zrml/orderbook/src/lib.rs +++ b/zrml/orderbook/src/lib.rs @@ -32,7 +32,10 @@ use frame_support::{ traits::{IsType, StorageVersion}, transactional, PalletId, Twox64Concat, }; -use frame_system::{ensure_signed, pallet_prelude::OriginFor}; +use frame_system::{ + ensure_signed, + pallet_prelude::{BlockNumberFor, OriginFor}, +}; use orml_traits::{ BalanceStatus, MultiCurrency, MultiReservableCurrency, NamedMultiReservableCurrency, }; @@ -84,7 +87,7 @@ mod pallet { type MarketCommons: MarketCommonsPalletApi< AccountId = Self::AccountId, - BlockNumber = Self::BlockNumber, + BlockNumber = BlockNumberFor, Balance = BalanceOf, >; diff --git a/zrml/orderbook/src/mock.rs b/zrml/orderbook/src/mock.rs index 83f33231c..70b670927 100644 --- a/zrml/orderbook/src/mock.rs +++ b/zrml/orderbook/src/mock.rs @@ -27,13 +27,12 @@ use frame_support::{ parameter_types, traits::{AsEnsureOriginWithArg, Everything}, }; -use frame_system::{EnsureRoot, EnsureSigned}; +use frame_system::{mocking::MockBlock, EnsureRoot, EnsureSigned}; use orml_traits::MultiCurrency; use parity_scale_codec::Compact; use sp_runtime::{ - testing::Header, traits::{BlakeTwo256, ConstU32, IdentityLookup, Zero}, - Perbill, SaturatedConversion, + BuildStorage, Perbill, SaturatedConversion, }; use zeitgeist_primitives::{ constants::mock::{ @@ -44,19 +43,16 @@ use zeitgeist_primitives::{ }, traits::DistributeFees, types::{ - AccountIdTest, Amount, Assets, Balance, BasicCurrencyAdapter, BlockNumber, BlockTest, - CampaignAsset, CampaignAssetId, Currencies, CustomAsset, CustomAssetId, Hash, Index, - MarketAsset, MarketId, Moment, UncheckedExtrinsicTest, + AccountIdTest, Amount, Assets, Balance, BasicCurrencyAdapter, CampaignAsset, + CampaignAssetId, Currencies, CustomAsset, CustomAssetId, Hash, MarketAsset, MarketId, + Moment, }, }; pub const ALICE: AccountIdTest = 0; pub const BOB: AccountIdTest = 1; - pub const MARKET_CREATOR: AccountIdTest = 42; - pub const INITIAL_BALANCE: Balance = 100 * BASE; - pub const EXTERNAL_FEES: Balance = CENT; parameter_types! { @@ -105,23 +101,18 @@ where } construct_runtime!( - pub enum Runtime - where - Block = BlockTest, - NodeBlock = BlockTest, - UncheckedExtrinsic = UncheckedExtrinsicTest, - { - AssetManager: orml_currencies::{Call, Pallet, Storage}, - AssetRouter: zrml_asset_router::{Pallet}, - Balances: pallet_balances::{Call, Config, Event, Pallet, Storage}, - CampaignAssets: pallet_assets::::{Call, Pallet, Storage, Event}, - CustomAssets: pallet_assets::::{Call, Pallet, Storage, Event}, - MarketAssets: pallet_assets::::{Call, Pallet, Storage, Event}, - MarketCommons: zrml_market_commons::{Pallet, Storage}, - Orderbook: orderbook::{Call, Event, Pallet}, - System: frame_system::{Call, Config, Event, Pallet, Storage}, - Timestamp: pallet_timestamp::{Pallet}, - Tokens: orml_tokens::{Config, Event, Pallet, Storage}, + pub enum Runtime { + AssetManager: orml_currencies, + AssetRouter: zrml_asset_router, + Balances: pallet_balances, + CampaignAssets: pallet_assets::, + CustomAssets: pallet_assets::, + MarketAssets: pallet_assets::, + MarketCommons: zrml_market_commons, + Orderbook: orderbook, + System: frame_system, + Timestamp: pallet_timestamp, + Tokens: orml_tokens, } ); @@ -138,18 +129,17 @@ impl frame_system::Config for Runtime { type AccountData = pallet_balances::AccountData; type AccountId = AccountIdTest; type BaseCallFilter = Everything; + type Block = MockBlock; type BlockHashCount = BlockHashCount; type BlockLength = (); - type BlockNumber = BlockNumber; type BlockWeights = (); type RuntimeCall = RuntimeCall; type DbWeight = (); type RuntimeEvent = RuntimeEvent; type Hash = Hash; type Hashing = BlakeTwo256; - type Header = Header; - type Index = Index; type Lookup = IdentityLookup; + type Nonce = u64; type MaxConsumers = frame_support::traits::ConstU32<16>; type OnKilledAccount = (); type OnNewAccount = (); @@ -286,8 +276,12 @@ impl pallet_balances::Config for Runtime { type AccountStore = System; type Balance = Balance; type DustRemoval = (); + type FreezeIdentifier = (); + type RuntimeHoldReason = (); type RuntimeEvent = RuntimeEvent; type ExistentialDeposit = ExistentialDeposit; + type MaxHolds = (); + type MaxFreezes = (); type MaxLocks = MaxLocks; type MaxReserves = MaxReserves; type ReserveIdentifier = [u8; 8]; @@ -334,7 +328,7 @@ impl Default for ExtBuilder { } impl ExtBuilder { pub fn build(self) -> sp_io::TestExternalities { - let mut t = frame_system::GenesisConfig::default().build_storage::().unwrap(); + let mut t = frame_system::GenesisConfig::::default().build_storage().unwrap(); // see the logs in tests when using `RUST_LOG=debug cargo test -- --nocapture` let _ = env_logger::builder().is_test(true).try_init(); diff --git a/zrml/orderbook/src/tests.rs b/zrml/orderbook/src/tests.rs index f037b408f..5061b7c16 100644 --- a/zrml/orderbook/src/tests.rs +++ b/zrml/orderbook/src/tests.rs @@ -20,8 +20,7 @@ use crate::{mock::*, utils::market_mock, Error, Event, Order, Orders}; use frame_support::{assert_noop, assert_ok, traits::fungibles::Create}; use orml_tokens::Error as AError; use orml_traits::{MultiCurrency, MultiReservableCurrency}; -use pallet_balances::Error as BError; -use sp_runtime::{Perbill, Perquintill}; +use sp_runtime::{DispatchError, Perbill, Perquintill, TokenError}; use test_case::test_case; use zeitgeist_primitives::{ constants::BASE, @@ -495,7 +494,7 @@ fn place_order_fails_if_maker_has_insufficient_funds() { taker_asset, 25 * BASE, ), - BError::::InsufficientBalance, + DispatchError::Token(TokenError::FundsUnavailable) ); }); } diff --git a/zrml/orderbook/src/utils.rs b/zrml/orderbook/src/utils.rs index 6504fa01f..e378d7aac 100644 --- a/zrml/orderbook/src/utils.rs +++ b/zrml/orderbook/src/utils.rs @@ -18,6 +18,7 @@ #![cfg(any(feature = "runtime-benchmarks", test))] use crate::*; +use frame_system::pallet_prelude::BlockNumberFor; use sp_runtime::traits::AccountIdConversion; use zeitgeist_primitives::types::{ BaseAsset, Deadlines, Market, MarketCreation, MarketDisputeMechanism, MarketPeriod, @@ -29,7 +30,7 @@ type MomentOf = <::MarketCommons as MarketCommonsPalletApi>::Mom type MarketOf = Market< ::AccountId, BalanceOf, - ::BlockNumber, + BlockNumberFor, MomentOf, BaseAsset, MarketIdOf, diff --git a/zrml/parimutuel/Cargo.toml b/zrml/parimutuel/Cargo.toml index 6c0721295..548f0d880 100644 --- a/zrml/parimutuel/Cargo.toml +++ b/zrml/parimutuel/Cargo.toml @@ -2,6 +2,7 @@ frame-benchmarking = { workspace = true, optional = true } frame-support = { workspace = true } frame-system = { workspace = true } +log = { workspace = true } orml-traits = { workspace = true } pallet-assets = { workspace = true } parity-scale-codec = { workspace = true, features = ["derive", "max-encoded-len"] } @@ -15,7 +16,7 @@ zrml-market-commons = { workspace = true } env_logger = { workspace = true } orml-currencies = { workspace = true, features = ["default"] } orml-tokens = { workspace = true, features = ["default"] } -pallet-balances = { workspace = true, features = ["default"] } +pallet-balances = { workspace = true, features = ["default", "insecure_zero_ed"] } pallet-timestamp = { workspace = true, features = ["default"] } sp-io = { workspace = true, features = ["default"] } zeitgeist-primitives = { workspace = true, features = ["mock", "default"] } @@ -48,6 +49,6 @@ try-runtime = [ [package] authors = ["Zeitgeist PM "] -edition = "2021" +edition.workspace = true name = "zrml-parimutuel" version = "0.5.2" diff --git a/zrml/parimutuel/src/benchmarking.rs b/zrml/parimutuel/src/benchmarking.rs index b45816e8c..097d7ebc6 100644 --- a/zrml/parimutuel/src/benchmarking.rs +++ b/zrml/parimutuel/src/benchmarking.rs @@ -29,7 +29,7 @@ use frame_support::{ }; use frame_system::RawOrigin; use orml_traits::MultiCurrency; -use sp_runtime::{SaturatedConversion, Saturating}; +use sp_runtime::{traits::Zero, SaturatedConversion, Saturating}; use zeitgeist_primitives::{ traits::MarketTransitionApi, types::{MarketStatus, MarketType, OutcomeReport}, @@ -60,6 +60,7 @@ fn buy_asset( #[benchmarks] mod benchmarks { use super::*; + use alloc::vec; #[benchmark] fn buy() { @@ -95,11 +96,11 @@ mod benchmarks { T::MinBetSize::get().saturating_mul(10u128.saturated_into::>()); buy_asset::(market_id, loser_asset, &loser, loser_amount); - T::MarketCommons::mutate_market(&market_id, |market| { + assert_ok!(T::MarketCommons::mutate_market(&market_id, |market| { market.status = MarketStatus::Resolved; market.resolved_outcome = Some(OutcomeReport::Categorical(0u16)); Ok(()) - })?; + })); #[extrinsic_call] claim_rewards(RawOrigin::Signed(winner), market_id); @@ -125,7 +126,7 @@ mod benchmarks { T::MinBetSize::get().saturating_mul(10u128.saturated_into::>()); buy_asset::(market_id, loser_1_asset, &loser_1, loser_1_amount); - T::MarketCommons::mutate_market(&market_id, |market| { + assert_ok!(T::MarketCommons::mutate_market(&market_id, |market| { market.status = MarketStatus::Resolved; let resolved_index = 9u16; let resolved_outcome = OutcomeReport::Categorical(resolved_index); @@ -136,7 +137,7 @@ mod benchmarks { assert!(resolved_issuance_asset.is_zero()); market.resolved_outcome = Some(resolved_outcome); Ok(()) - })?; + })); #[extrinsic_call] claim_refunds(RawOrigin::Signed(loser_0), loser_0_asset); @@ -167,12 +168,12 @@ mod benchmarks { assert!(T::AssetCreator::asset_exists(asset)); } - T::MarketCommons::mutate_market(&market_id, |market| { + assert_ok!(T::MarketCommons::mutate_market(&market_id, |market| { market.status = MarketStatus::Resolved; let resolved_outcome = OutcomeReport::Categorical(0u16); market.resolved_outcome = Some(resolved_outcome); Ok(()) - })?; + })); #[block] { diff --git a/zrml/parimutuel/src/lib.rs b/zrml/parimutuel/src/lib.rs index c04b70900..824a92f35 100644 --- a/zrml/parimutuel/src/lib.rs +++ b/zrml/parimutuel/src/lib.rs @@ -34,14 +34,14 @@ mod pallet { use alloc::collections::BTreeMap; use core::marker::PhantomData; use frame_support::{ - ensure, log, - pallet_prelude::{Decode, DispatchError, Encode, TypeInfo}, + ensure, + pallet_prelude::{Decode, Encode, TypeInfo}, require_transactional, traits::{ fungibles::{Create, Inspect}, Get, IsType, StorageVersion, }, - PalletId, RuntimeDebug, + PalletId, }; use frame_system::{ ensure_signed, @@ -51,7 +51,7 @@ mod pallet { use pallet_assets::ManagedDestroy; use sp_runtime::{ traits::{AccountIdConversion, CheckedSub, Zero}, - DispatchResult, + DispatchError, DispatchResult, RuntimeDebug, }; use zeitgeist_macros::unreachable_non_terminating; use zeitgeist_primitives::{ @@ -85,7 +85,7 @@ mod pallet { type MarketCommons: MarketCommonsPalletApi< AccountId = Self::AccountId, - BlockNumber = Self::BlockNumber, + BlockNumber = BlockNumberFor, Balance = BalanceOf, >; diff --git a/zrml/parimutuel/src/mock.rs b/zrml/parimutuel/src/mock.rs index 0d8fab509..44403f38b 100644 --- a/zrml/parimutuel/src/mock.rs +++ b/zrml/parimutuel/src/mock.rs @@ -29,26 +29,25 @@ use frame_support::{ parameter_types, traits::{AsEnsureOriginWithArg, Everything}, }; -use frame_system::{EnsureRoot, EnsureSigned}; +use frame_system::{mocking::MockBlock, EnsureRoot, EnsureSigned}; use orml_traits::MultiCurrency; use parity_scale_codec::Compact; use sp_runtime::{ - testing::Header, traits::{BlakeTwo256, IdentityLookup}, - Perbill, SaturatedConversion, + BuildStorage, Perbill, SaturatedConversion, }; use zeitgeist_primitives::{ constants::mock::{ AssetsAccountDeposit, AssetsApprovalDeposit, AssetsDeposit, AssetsMetadataDepositBase, AssetsMetadataDepositPerByte, AssetsStringLimit, BlockHashCount, DestroyAccountWeight, DestroyApprovalWeight, DestroyFinishWeight, ExistentialDeposits, GetNativeCurrencyId, - MaxReserves, MinBetSize, MinimumPeriod, ParimutuelPalletId, BASE, CENT, + MaxLocks, MaxReserves, MinBetSize, MinimumPeriod, ParimutuelPalletId, BASE, CENT, }, traits::DistributeFees, types::{ - AccountIdTest, Amount, Assets, Balance, BasicCurrencyAdapter, BlockNumber, BlockTest, - CampaignAsset, CampaignAssetId, Currencies, CustomAsset, CustomAssetId, Hash, Index, - MarketAsset, MarketId, Moment, UncheckedExtrinsicTest, + AccountIdTest, Amount, Assets, Balance, BasicCurrencyAdapter, CampaignAsset, + CampaignAssetId, Currencies, CustomAsset, CustomAssetId, Hash, MarketAsset, MarketId, + Moment, }, }; @@ -106,23 +105,18 @@ type CampaignAssetsInstance = pallet_assets::Instance2; type MarketAssetsInstance = pallet_assets::Instance3; construct_runtime!( - pub enum Runtime - where - Block = BlockTest, - NodeBlock = BlockTest, - UncheckedExtrinsic = UncheckedExtrinsicTest, - { - AssetManager: orml_currencies::{Call, Pallet, Storage}, - AssetRouter: zrml_asset_router::{Pallet}, - Balances: pallet_balances::{Call, Config, Event, Pallet, Storage}, - CampaignAssets: pallet_assets::::{Call, Pallet, Storage, Event}, - CustomAssets: pallet_assets::::{Call, Pallet, Storage, Event}, - MarketAssets: pallet_assets::::{Call, Pallet, Storage, Event}, - MarketCommons: zrml_market_commons::{Pallet, Storage}, - Parimutuel: zrml_parimutuel::{Event, Pallet, Storage}, - System: frame_system::{Call, Config, Event, Pallet, Storage}, - Timestamp: pallet_timestamp::{Pallet}, - Tokens: orml_tokens::{Config, Event, Pallet, Storage}, + pub enum Runtime { + AssetManager: orml_currencies, + AssetRouter: zrml_asset_router, + Balances: pallet_balances, + CampaignAssets: pallet_assets::, + CustomAssets: pallet_assets::, + MarketAssets: pallet_assets::, + MarketCommons: zrml_market_commons, + Parimutuel: zrml_parimutuel, + System: frame_system, + Timestamp: pallet_timestamp, + Tokens: orml_tokens, } ); @@ -142,18 +136,17 @@ impl frame_system::Config for Runtime { type AccountData = pallet_balances::AccountData; type AccountId = AccountIdTest; type BaseCallFilter = Everything; + type Block = MockBlock; type BlockHashCount = BlockHashCount; type BlockLength = (); - type BlockNumber = BlockNumber; type BlockWeights = (); type RuntimeCall = RuntimeCall; type DbWeight = (); type RuntimeEvent = RuntimeEvent; type Hash = Hash; type Hashing = BlakeTwo256; - type Header = Header; - type Index = Index; type Lookup = IdentityLookup; + type Nonce = u64; type MaxConsumers = frame_support::traits::ConstU32<16>; type OnKilledAccount = (); type OnNewAccount = (); @@ -269,9 +262,13 @@ impl pallet_balances::Config for Runtime { type AccountStore = System; type Balance = Balance; type DustRemoval = (); + type FreezeIdentifier = (); + type RuntimeHoldReason = (); type RuntimeEvent = RuntimeEvent; type ExistentialDeposit = (); - type MaxLocks = (); + type MaxHolds = (); + type MaxFreezes = (); + type MaxLocks = MaxLocks; type MaxReserves = MaxReserves; type ReserveIdentifier = [u8; 8]; type WeightInfo = (); @@ -345,7 +342,7 @@ impl Default for ExtBuilder { impl ExtBuilder { pub fn build(self) -> sp_io::TestExternalities { - let mut t = frame_system::GenesisConfig::default().build_storage::().unwrap(); + let mut t = frame_system::GenesisConfig::::default().build_storage().unwrap(); // see the logs in tests when using `RUST_LOG=debug cargo test -- --nocapture` let _ = env_logger::builder().is_test(true).try_init(); diff --git a/zrml/prediction-markets/Cargo.toml b/zrml/prediction-markets/Cargo.toml index a2a8121cb..170205d39 100644 --- a/zrml/prediction-markets/Cargo.toml +++ b/zrml/prediction-markets/Cargo.toml @@ -2,6 +2,7 @@ frame-benchmarking = { workspace = true, optional = true } frame-support = { workspace = true } frame-system = { workspace = true } +log = { workspace = true } orml-traits = { workspace = true } pallet-assets = { workspace = true } parity-scale-codec = { workspace = true, features = ["derive", "max-encoded-len"] } @@ -19,12 +20,13 @@ zrml-simple-disputes = { workspace = true } # Mock +cfg-if = { workspace = true, optional = true } env_logger = { workspace = true, optional = true } orml-asset-registry = { workspace = true, optional = true } orml-currencies = { workspace = true, optional = true } orml-tokens = { workspace = true, optional = true } pallet-balances = { workspace = true, optional = true } -pallet-randomness-collective-flip = { workspace = true, optional = true } +pallet-insecure-randomness-collective-flip = { workspace = true, optional = true } pallet-timestamp = { workspace = true, optional = true } pallet-treasury = { workspace = true, optional = true } sp-api = { workspace = true, optional = true } @@ -41,13 +43,14 @@ zrml-prediction-markets = { workspace = true, features = ["mock", "default"] } [features] default = ["std"] mock = [ + "cfg-if", "env_logger/default", "orml-asset-registry/default", "orml-currencies/default", "orml-tokens/default", "pallet-assets/default", "pallet-balances/default", - "pallet-randomness-collective-flip/default", + "pallet-insecure-randomness-collective-flip/default", "pallet-timestamp/default", "pallet-treasury/default", "serde/default", @@ -95,6 +98,6 @@ try-runtime = [ [package] authors = ["Zeitgeist PM "] -edition = "2021" +edition.workspace = true name = "zrml-prediction-markets" version = "0.5.2" diff --git a/zrml/prediction-markets/fuzz/Cargo.toml b/zrml/prediction-markets/fuzz/Cargo.toml index 4f88a31d2..703a2f229 100644 --- a/zrml/prediction-markets/fuzz/Cargo.toml +++ b/zrml/prediction-markets/fuzz/Cargo.toml @@ -15,7 +15,7 @@ zrml-simple-disputes = { workspace = true, features = ["default"] } [package] authors = ["Automatically generated"] -edition = "2021" +edition.workspace = true name = "zrml-prediction-markets-fuzz" publish = false version = "0.0.0" diff --git a/zrml/prediction-markets/runtime-api/Cargo.toml b/zrml/prediction-markets/runtime-api/Cargo.toml index 16d8f1b48..4e914db2e 100644 --- a/zrml/prediction-markets/runtime-api/Cargo.toml +++ b/zrml/prediction-markets/runtime-api/Cargo.toml @@ -13,6 +13,6 @@ std = [ [package] authors = ["Zeitgeist PM "] -edition = "2021" +edition.workspace = true name = "zrml-prediction-markets-runtime-api" version = "0.5.2" diff --git a/zrml/prediction-markets/src/benchmarks.rs b/zrml/prediction-markets/src/benchmarks.rs index 01903a795..7fccef713 100644 --- a/zrml/prediction-markets/src/benchmarks.rs +++ b/zrml/prediction-markets/src/benchmarks.rs @@ -26,13 +26,13 @@ use super::*; #[cfg(test)] use crate::Pallet as PredictionMarket; -use alloc::vec::Vec; -use frame_benchmarking::{account, benchmarks, vec, whitelisted_caller}; +use alloc::{vec, vec::Vec}; +use frame_benchmarking::{account, benchmarks, whitelisted_caller}; use frame_support::{ - dispatch::UnfilteredDispatchable, - traits::{EnsureOrigin, Get}, + traits::{EnsureOrigin, Get, Hooks, UnfilteredDispatchable}, + BoundedVec, }; -use frame_system::RawOrigin; +use frame_system::{pallet_prelude::BlockNumberFor, RawOrigin}; use orml_traits::MultiCurrency; use sp_runtime::{ traits::{SaturatedConversion, Saturating, Zero}, @@ -54,8 +54,6 @@ use zrml_authorized::Pallet as AuthorizedPallet; use zrml_global_disputes::GlobalDisputesPalletApi; use zrml_market_commons::MarketCommonsPalletApi; -use frame_support::{traits::Hooks, BoundedVec}; - fn assert_last_event(generic_event: ::RuntimeEvent) { frame_system::Pallet::::assert_last_event(generic_event.into()); } @@ -66,11 +64,11 @@ const LIQUIDITY: u128 = 100 * BASE; // amount of native currency fn create_market_common_parameters( is_disputable: bool, -) -> Result<(T::AccountId, T::AccountId, Deadlines, MultiHash), &'static str> { +) -> Result<(T::AccountId, T::AccountId, Deadlines>, MultiHash), &'static str> { let caller: T::AccountId = whitelisted_caller(); T::AssetManager::deposit(Asset::Ztg, &caller, (100u128 * LIQUIDITY).saturated_into()).unwrap(); let oracle = caller.clone(); - let deadlines = Deadlines:: { + let deadlines = Deadlines::> { grace_period: 1_u32.into(), oracle_duration: T::MinOracleDuration::get(), dispute_duration: if is_disputable { T::MinDisputeDuration::get() } else { Zero::zero() }, @@ -86,7 +84,7 @@ fn create_market_common( creation: MarketCreation, options: MarketType, scoring_rule: ScoringRule, - period: Option>>, + period: Option, MomentOf>>, dispute_mechanism: Option, ) -> Result<(T::AccountId, MarketIdOf), &'static str> { pallet_timestamp::Pallet::::set_timestamp(0u32.into()); @@ -540,7 +538,7 @@ benchmarks! { |ids| ids.try_push(i.into()), ).unwrap(); } - let new_deadlines = Deadlines:: { + let new_deadlines = Deadlines::> { grace_period: 2_u32.into(), oracle_duration: T::MinOracleDuration::get(), dispute_duration: T::MinDisputeDuration::get(), @@ -620,7 +618,7 @@ benchmarks! { } MarketIdsPerDisputeBlock::::insert(appeal_end, market_ids_2); - frame_system::Pallet::::set_block_number(appeal_end - 1u64.saturated_into::()); + frame_system::Pallet::::set_block_number(appeal_end - 1u64.saturated_into::>()); let now = frame_system::Pallet::::block_number(); @@ -760,7 +758,7 @@ benchmarks! { on_initialize_resolve_overhead { // wait for timestamp to get initialized (that's why block 2) - let now = 2u64.saturated_into::(); + let now = 2u64.saturated_into::>(); }: { Pallet::::on_initialize(now) } redeem_shares_categorical { @@ -860,7 +858,7 @@ benchmarks! { creator_fee: Perbill::zero(), oracle: caller.clone(), period: MarketPeriod::Timestamp(start..end), - deadlines: Deadlines:: { + deadlines: Deadlines::> { grace_period: 0u8.into(), oracle_duration: T::MinOracleDuration::get(), dispute_duration: 0u8.into(), @@ -906,8 +904,8 @@ benchmarks! { let f in 1..31; // ensure markets exist - let start_block: T::BlockNumber = 100_000u64.saturated_into(); - let end_block: T::BlockNumber = 1_000_000u64.saturated_into(); + let start_block: BlockNumberFor = 100_000u64.saturated_into(); + let end_block: BlockNumberFor = 1_000_000u64.saturated_into(); for _ in 0..31 { create_market_common::( MarketCreation::Permissionless, @@ -930,7 +928,7 @@ benchmarks! { ).unwrap(); } - let block_number: T::BlockNumber = Zero::zero(); + let block_number: BlockNumberFor = Zero::zero(); for i in 1..=b { MarketIdsPerCloseBlock::::try_mutate(block_number, |ids| { ids.try_push(i.into()) @@ -986,7 +984,7 @@ benchmarks! { })?; } - let block_number: T::BlockNumber = Zero::zero(); + let block_number: BlockNumberFor = Zero::zero(); let mut r_ids_vec = Vec::new(); for i in 1..=r { diff --git a/zrml/prediction-markets/src/lib.rs b/zrml/prediction-markets/src/lib.rs index abefb9275..0e825cc06 100644 --- a/zrml/prediction-markets/src/lib.rs +++ b/zrml/prediction-markets/src/lib.rs @@ -26,7 +26,6 @@ extern crate alloc; mod benchmarks; pub mod migrations; pub mod mock; -pub mod orml_asset_registry; mod tests; pub mod weights; @@ -38,8 +37,8 @@ mod pallet { use alloc::{collections::BTreeMap, format, vec, vec::Vec}; use core::{cmp, marker::PhantomData}; use frame_support::{ - dispatch::{DispatchResultWithPostInfo, Pays, Weight}, - ensure, log, + dispatch::{DispatchResultWithPostInfo, Pays}, + ensure, pallet_prelude::{ConstU32, StorageMap, StorageValue, ValueQuery}, require_transactional, storage::{with_transaction, TransactionOutcome}, @@ -49,7 +48,9 @@ mod pallet { Currency, EnsureOrigin, Get, Hooks, Imbalance, IsType, NamedReservableCurrency, OnUnbalanced, StorageVersion, }, - transactional, Blake2_128Concat, BoundedVec, PalletId, Twox64Concat, + transactional, + weights::Weight, + Blake2_128Concat, BoundedVec, PalletId, Twox64Concat, }; use frame_system::{ensure_signed, pallet_prelude::OriginFor}; use pallet_assets::ManagedDestroy; @@ -61,6 +62,7 @@ mod pallet { zeitgeist_primitives::types::{CustomMetadata, XcmAsset}, }; + use frame_system::pallet_prelude::BlockNumberFor; use orml_traits::{MultiCurrency, NamedMultiReservableCurrency}; use sp_arithmetic::per_things::{Perbill, Percent}; use sp_runtime::{ @@ -95,9 +97,8 @@ mod pallet { pub(crate) type AccountIdOf = ::AccountId; pub(crate) type AssetOf = Asset>; pub(crate) type BalanceOf = ::Balance; - pub(crate) type BlockNumberOf = ::BlockNumber; pub(crate) type CacheSize = ConstU32<64>; - pub(crate) type DeadlinesOf = Deadlines>; + pub(crate) type DeadlinesOf = Deadlines>; pub(crate) type EditReason = BoundedVec::MaxEditReasonLen>; pub(crate) type InitialItemOf = InitialItem, BalanceOf>; pub(crate) type MarketBondsOf = MarketBonds, BalanceOf>; @@ -105,18 +106,18 @@ mod pallet { pub(crate) type MarketOf = Market< AccountIdOf, BalanceOf, - BlockNumberOf, + BlockNumberFor, MomentOf, BaseAsset, MarketIdOf, >; - pub(crate) type MarketPeriodOf = MarketPeriod, MomentOf>; + pub(crate) type MarketPeriodOf = MarketPeriod, MomentOf>; pub(crate) type MomentOf = <::Timestamp as frame_support::traits::Time>::Moment; pub(crate) type NegativeImbalanceOf = <::Currency as Currency>>::NegativeImbalance; pub(crate) type RejectReason = BoundedVec::MaxRejectReasonLen>; - pub(crate) type ReportOf = Report, BlockNumberOf>; + pub(crate) type ReportOf = Report, BlockNumberFor>; pub(crate) type TimeFrame = u64; macro_rules! impl_unreserve_bond { @@ -1574,7 +1575,7 @@ mod pallet { AccountId = Self::AccountId, Balance = BalanceOf, NegativeImbalance = NegativeImbalanceOf, - BlockNumber = Self::BlockNumber, + BlockNumber = BlockNumberFor, MarketId = MarketIdOf, Moment = MomentOf, Origin = Self::RuntimeOrigin, @@ -1605,7 +1606,7 @@ mod pallet { /// The block time to wait for the `CloseMarketsEarlyOrigin` /// before the early market close actually happens (fat-finger protection). #[pallet::constant] - type CloseEarlyProtectionBlockPeriod: Get; + type CloseEarlyProtectionBlockPeriod: Get>; /// The base amount of currency that must be bonded /// by the market creator in order to schedule an early market closure. @@ -1617,7 +1618,7 @@ mod pallet { AccountId = Self::AccountId, Balance = BalanceOf, NegativeImbalance = NegativeImbalanceOf, - BlockNumber = Self::BlockNumber, + BlockNumber = BlockNumberFor, MarketId = MarketIdOf, Moment = MomentOf, Origin = Self::RuntimeOrigin, @@ -1642,13 +1643,13 @@ mod pallet { MarketIdOf, Self::AccountId, BalanceOf, - Self::BlockNumber, + BlockNumberFor, >; type LiquidityMining: LiquidityMiningPalletApi< AccountId = Self::AccountId, Balance = BalanceOf, - BlockNumber = Self::BlockNumber, + BlockNumber = BlockNumberFor, MarketId = MarketIdOf, >; @@ -1671,27 +1672,27 @@ mod pallet { /// The minimum number of blocks allowed to be specified as dispute_duration /// in create_market. #[pallet::constant] - type MinDisputeDuration: Get; + type MinDisputeDuration: Get>; /// The minimum number of blocks allowed to be specified as oracle_duration /// in create_market. #[pallet::constant] - type MinOracleDuration: Get; + type MinOracleDuration: Get>; /// The maximum number of blocks allowed to be specified as grace_period /// in create_market. #[pallet::constant] - type MaxGracePeriod: Get; + type MaxGracePeriod: Get>; /// The maximum number of blocks allowed to be specified as oracle_duration /// in create_market. #[pallet::constant] - type MaxOracleDuration: Get; + type MaxOracleDuration: Get>; /// The maximum number of blocks allowed to be specified as dispute_duration /// in create_market. #[pallet::constant] - type MaxDisputeDuration: Get; + type MaxDisputeDuration: Get>; /// The maximum length of reject reason string. #[pallet::constant] @@ -1699,7 +1700,7 @@ mod pallet { /// The maximum allowed duration of a market from creation to market close in blocks. #[pallet::constant] - type MaxMarketLifetime: Get; + type MaxMarketLifetime: Get>; /// The maximum number of bytes allowed as edit reason. #[pallet::constant] @@ -1715,7 +1716,7 @@ mod pallet { /// The block time to wait for the market creator /// before the early market close actually happens. #[pallet::constant] - type CloseEarlyBlockPeriod: Get; + type CloseEarlyBlockPeriod: Get>; /// The milliseconds to wait for the market creator /// before the early market close actually happens. @@ -1744,7 +1745,7 @@ mod pallet { AccountId = Self::AccountId, Balance = BalanceOf, NegativeImbalance = NegativeImbalanceOf, - BlockNumber = Self::BlockNumber, + BlockNumber = BlockNumberFor, MarketId = MarketIdOf, Moment = MomentOf, Origin = Self::RuntimeOrigin, @@ -1911,7 +1912,7 @@ mod pallet { /// A market has been scheduled to close early. MarketEarlyCloseScheduled { market_id: MarketIdOf, - new_period: MarketPeriod>, + new_period: MarketPeriod, MomentOf>, state: EarlyCloseState, }, /// A market early close request has been disputed. @@ -1945,8 +1946,8 @@ 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 { let mut total_weight: Weight = Weight::zero(); // If we are at genesis or the first block the timestamp is be undefined. No @@ -2043,7 +2044,7 @@ mod pallet { pub type MarketIdsPerCloseBlock = StorageMap< _, Blake2_128Concat, - T::BlockNumber, + BlockNumberFor, BoundedVec, CacheSize>, ValueQuery, >; @@ -2068,7 +2069,7 @@ mod pallet { pub type MarketIdsPerDisputeBlock = StorageMap< _, Twox64Concat, - T::BlockNumber, + BlockNumberFor, BoundedVec, CacheSize>, ValueQuery, >; @@ -2078,7 +2079,7 @@ mod pallet { pub type MarketIdsPerReportBlock = StorageMap< _, Twox64Concat, - T::BlockNumber, + BlockNumberFor, BoundedVec, CacheSize>, ValueQuery, >; @@ -2846,7 +2847,7 @@ mod pallet { } pub(crate) fn market_status_manager( - block_number: T::BlockNumber, + block_number: BlockNumberFor, last_time_frame: TimeFrame, current_time_frame: TimeFrame, mut mutation: F, @@ -2854,7 +2855,7 @@ mod pallet { where F: FnMut(&MarketIdOf, MarketOf) -> DispatchResult, MarketIdsPerBlock: frame_support::StorageMap< - T::BlockNumber, + BlockNumberFor, BoundedVec, CacheSize>, Query = BoundedVec, CacheSize>, >, @@ -2908,7 +2909,7 @@ mod pallet { } pub(crate) fn resolution_manager( - now: T::BlockNumber, + now: BlockNumberFor, mut cb: F, ) -> Result where @@ -3116,7 +3117,7 @@ mod pallet { fn remove_auto_resolve( market_id: &MarketIdOf, - resolve_at: T::BlockNumber, + resolve_at: BlockNumberFor, ) -> u32 { MarketIdsPerDisputeBlock::::mutate(resolve_at, |ids| -> u32 { let ids_len = ids.len() as u32; @@ -3131,7 +3132,7 @@ mod pallet { { type AccountId = T::AccountId; type Balance = BalanceOf; - type BlockNumber = T::BlockNumber; + type BlockNumber = BlockNumberFor; type MarketId = MarketIdOf; type Moment = MomentOf; diff --git a/zrml/prediction-markets/src/mock.rs b/zrml/prediction-markets/src/mock.rs index 392a7d2df..13e383350 100644 --- a/zrml/prediction-markets/src/mock.rs +++ b/zrml/prediction-markets/src/mock.rs @@ -29,17 +29,15 @@ use frame_support::{ parameter_types, storage::unhashed::put, traits::{ - AsEnsureOriginWithArg, Everything, GenesisBuild, NeverEnsureOrigin, OnFinalize, OnIdle, - OnInitialize, + AsEnsureOriginWithArg, Everything, NeverEnsureOrigin, OnFinalize, OnIdle, OnInitialize, }, }; -use frame_system::{EnsureRoot, EnsureSigned, EnsureSignedBy}; +use frame_system::{mocking::MockBlock, EnsureRoot, EnsureSigned, EnsureSignedBy}; use parity_scale_codec::Compact; use sp_arithmetic::per_things::Percent; use sp_runtime::{ - testing::Header, traits::{BlakeTwo256, ConstU32, IdentityLookup}, - DispatchError, DispatchResult, + BuildStorage, DispatchError, DispatchResult, }; use std::cell::RefCell; use zeitgeist_primitives::{ @@ -55,7 +53,7 @@ use zeitgeist_primitives::{ GlobalDisputesPalletId, InflationPeriod, LiquidityMiningPalletId, LockId, MaxAppeals, MaxApprovals, MaxCategories, MaxCourtParticipants, MaxCreatorFee, MaxDelegations, MaxDisputeDuration, MaxDisputes, MaxEditReasonLen, MaxGlobalDisputeVotes, MaxGracePeriod, - MaxMarketLifetime, MaxOracleDuration, MaxOwners, MaxRejectReasonLen, MaxReserves, + MaxLocks, MaxMarketLifetime, MaxOracleDuration, MaxOwners, MaxRejectReasonLen, MaxReserves, MaxSelectedDraws, MaxYearlyInflation, MinCategories, MinDisputeDuration, MinJurorStake, MinOracleDuration, MinOutcomeVoteAmount, MinimumPeriod, OutcomeBond, OutcomeFactor, OutsiderBond, PmPalletId, RemoveKeysLimit, RequestInterval, SimpleDisputesPalletId, @@ -65,12 +63,15 @@ use zeitgeist_primitives::{ types::{ AccountIdTest, Amount, Assets, Balance, BasicCurrencyAdapter, BlockNumber, BlockTest, CampaignAsset, CampaignAssetClass, CampaignAssetId, Currencies, CustomAsset, CustomAssetId, - Hash, Index, MarketAsset, MarketId, Moment, ResultWithWeightInfo, UncheckedExtrinsicTest, + Hash, MarketAsset, MarketId, Moment, ResultWithWeightInfo, }, }; #[cfg(feature = "parachain")] -use {orml_asset_registry::AssetMetadata, zeitgeist_primitives::types::XcmAsset}; +use { + orml_traits::asset_registry::AssetProcessor, parity_scale_codec::Encode, + zeitgeist_primitives::types::CustomMetadata, zeitgeist_primitives::types::XcmAsset, +}; pub(super) const ON_PROPOSAL_STORAGE: [u8; 4] = [0x09, 0x09, 0x00, 0x00]; pub(super) const ON_ACTIVATION_STORAGE: [u8; 4] = [0x09, 0x09, 0x00, 0x01]; @@ -217,30 +218,27 @@ type CampaignAssetsInstance = pallet_assets::Instance2; type MarketAssetsInstance = pallet_assets::Instance3; construct_runtime!( - pub enum Runtime - where - Block = BlockTest, - NodeBlock = BlockTest, - UncheckedExtrinsic = UncheckedExtrinsicTest, - { - AssetRouter: zrml_asset_router::{Pallet}, - Authorized: zrml_authorized::{Event, Pallet, Storage}, - Balances: pallet_balances::{Call, Config, Event, Pallet, Storage}, - CampaignAssets: pallet_assets::::{Call, Pallet, Storage, Event}, - CustomAssets: pallet_assets::::{Call, Pallet, Storage, Event}, - Court: zrml_court::{Event, Pallet, Storage}, - AssetManager: orml_currencies::{Call, Pallet, Storage}, - LiquidityMining: zrml_liquidity_mining::{Config, Event, Pallet}, - MarketAssets: pallet_assets::::{Call, Pallet, Storage, Event}, - MarketCommons: zrml_market_commons::{Pallet, Storage}, - PredictionMarkets: prediction_markets::{Event, Pallet, Storage}, - RandomnessCollectiveFlip: pallet_randomness_collective_flip::{Pallet, Storage}, - SimpleDisputes: zrml_simple_disputes::{Event, Pallet, Storage}, - GlobalDisputes: zrml_global_disputes::{Event, Pallet, Storage}, - System: frame_system::{Call, Config, Event, Pallet, Storage}, - Timestamp: pallet_timestamp::{Pallet}, - Tokens: orml_tokens::{Config, Event, Pallet, Storage}, - Treasury: pallet_treasury::{Call, Event, Pallet, Storage}, + pub enum Runtime { + #[cfg(feature = "parachain")] + AssetRegistry: orml_asset_registry, + AssetRouter: zrml_asset_router, + Authorized: zrml_authorized, + Balances: pallet_balances, + CampaignAssets: pallet_assets::, + CustomAssets: pallet_assets::, + Court: zrml_court, + AssetManager: orml_currencies, + LiquidityMining: zrml_liquidity_mining, + MarketAssets: pallet_assets::, + MarketCommons: zrml_market_commons, + PredictionMarkets: prediction_markets, + RandomnessCollectiveFlip: pallet_insecure_randomness_collective_flip, + SimpleDisputes: zrml_simple_disputes, + GlobalDisputes: zrml_global_disputes, + System: frame_system, + Timestamp: pallet_timestamp, + Tokens: orml_tokens, + Treasury: pallet_treasury, } ); @@ -252,7 +250,7 @@ impl crate::Config for Runtime { type AssetDestroyer = AssetRouter; type AssetManager = AssetManager; #[cfg(feature = "parachain")] - type AssetRegistry = MockRegistry; + type AssetRegistry = AssetRegistry; type Authorized = Authorized; type CloseEarlyDisputeBond = CloseEarlyDisputeBond; type CloseMarketEarlyOrigin = EnsureSignedBy; @@ -298,27 +296,26 @@ impl frame_system::Config for Runtime { type AccountData = pallet_balances::AccountData; type AccountId = AccountIdTest; type BaseCallFilter = Everything; + type Block = MockBlock; type BlockHashCount = BlockHashCount; type BlockLength = (); - type BlockNumber = BlockNumber; type BlockWeights = (); type RuntimeCall = RuntimeCall; type DbWeight = (); type RuntimeEvent = RuntimeEvent; type Hash = Hash; type Hashing = BlakeTwo256; - type Header = Header; - type Index = Index; type Lookup = IdentityLookup; + type Nonce = u64; type MaxConsumers = frame_support::traits::ConstU32<16>; type OnKilledAccount = (); type OnNewAccount = (); - type OnSetCode = (); type RuntimeOrigin = RuntimeOrigin; type PalletInfo = PalletInfo; type SS58Prefix = (); type SystemWeightInfo = (); type Version = (); + type OnSetCode = (); } impl orml_currencies::Config for Runtime { @@ -328,6 +325,35 @@ impl orml_currencies::Config for Runtime { type WeightInfo = (); } +cfg_if::cfg_if!( + if #[cfg(feature = "parachain")] { + type AssetMetadata = orml_traits::asset_registry::AssetMetadata< + Balance, + CustomMetadata, + ConstU32<1024> + >; + pub struct NoopAssetProcessor {} + + impl AssetProcessor for NoopAssetProcessor { + fn pre_register(id: Option, asset_metadata: AssetMetadata) + -> Result<(XcmAsset, AssetMetadata), DispatchError> { + Ok((id.unwrap(), asset_metadata)) + } + } + + impl orml_asset_registry::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type CustomMetadata = CustomMetadata; + type AssetId = XcmAsset; + type AuthorityOrigin = EnsureRoot; + type AssetProcessor = NoopAssetProcessor; + type Balance = Balance; + type StringLimit = ConstU32<1024>; + type WeightInfo = (); + } + } +); + impl orml_tokens::Config for Runtime { type Amount = Amount; type Balance = Balance; @@ -342,27 +368,23 @@ impl orml_tokens::Config for Runtime { type WeightInfo = (); } -#[cfg(feature = "parachain")] -crate::orml_asset_registry::impl_mock_registry! { - MockRegistry, - XcmAsset, - Balance, - zeitgeist_primitives::types::CustomMetadata -} - impl pallet_balances::Config for Runtime { type AccountStore = System; type Balance = Balance; type DustRemoval = (); + type FreezeIdentifier = (); + type RuntimeHoldReason = (); type RuntimeEvent = RuntimeEvent; type ExistentialDeposit = ExistentialDeposit; - type MaxLocks = (); + type MaxHolds = (); + type MaxFreezes = (); + type MaxLocks = MaxLocks; type MaxReserves = MaxReserves; type ReserveIdentifier = [u8; 8]; type WeightInfo = (); } -impl pallet_randomness_collective_flip::Config for Runtime {} +impl pallet_insecure_randomness_collective_flip::Config for Runtime {} impl pallet_timestamp::Config for Runtime { type MinimumPeriod = MinimumPeriod; @@ -616,7 +638,7 @@ impl Default for ExtBuilder { impl ExtBuilder { pub fn build(self) -> sp_io::TestExternalities { - let mut t = frame_system::GenesisConfig::default().build_storage::().unwrap(); + let mut t = frame_system::GenesisConfig::::default().build_storage().unwrap(); // see the logs in tests when using `RUST_LOG=debug cargo test -- --nocapture` let _ = env_logger::builder().is_test(true).try_init(); @@ -638,49 +660,52 @@ impl ExtBuilder { .unwrap(); #[cfg(feature = "parachain")] - orml_tokens::GenesisConfig:: { - balances: (0..69) - .map(|idx| (idx, Currencies::ForeignAsset(100), INITIAL_BALANCE)) - .collect(), - } - .assimilate_storage(&mut t) - .unwrap(); - - #[cfg(feature = "parachain")] - let custom_metadata = zeitgeist_primitives::types::CustomMetadata { - allow_as_base_asset: true, - ..Default::default() - }; + { + orml_tokens::GenesisConfig:: { + balances: (0..69) + .map(|idx| (idx, Currencies::ForeignAsset(100), INITIAL_BALANCE)) + .collect(), + } + .assimilate_storage(&mut t) + .unwrap(); - #[cfg(feature = "parachain")] - orml_asset_registry_mock::GenesisConfig { - metadata: vec![ - ( - XcmAsset::ForeignAsset(100), - AssetMetadata { - decimals: 18, - name: "ACALA USD".as_bytes().to_vec(), - symbol: "AUSD".as_bytes().to_vec(), - existential_deposit: 0, - location: None, - additional: custom_metadata, - }, - ), - ( - XcmAsset::ForeignAsset(420), - AssetMetadata { - decimals: 18, - name: "FANCY_TOKEN".as_bytes().to_vec(), - symbol: "FTK".as_bytes().to_vec(), - existential_deposit: 0, - location: None, - additional: zeitgeist_primitives::types::CustomMetadata::default(), - }, - ), - ], + let custom_metadata = zeitgeist_primitives::types::CustomMetadata { + allow_as_base_asset: true, + ..Default::default() + }; + + orml_asset_registry::GenesisConfig:: { + assets: vec![ + ( + XcmAsset::ForeignAsset(100), + AssetMetadata { + decimals: 18, + name: "ACALA USD".as_bytes().to_vec().try_into().unwrap(), + symbol: "AUSD".as_bytes().to_vec().try_into().unwrap(), + existential_deposit: 0, + location: None, + additional: custom_metadata, + } + .encode(), + ), + ( + XcmAsset::ForeignAsset(420), + AssetMetadata { + decimals: 18, + name: "FANCY_TOKEN".as_bytes().to_vec().try_into().unwrap(), + symbol: "FTK".as_bytes().to_vec().try_into().unwrap(), + existential_deposit: 0, + location: None, + additional: zeitgeist_primitives::types::CustomMetadata::default(), + } + .encode(), + ), + ], + last_asset_id: XcmAsset::ForeignAsset(420), + } + .assimilate_storage(&mut t) + .unwrap(); } - .assimilate_storage(&mut t) - .unwrap(); let mut test_ext: sp_io::TestExternalities = t.into(); test_ext.execute_with(|| System::set_block_number(1)); @@ -714,6 +739,8 @@ pub fn set_timestamp_for_on_initialize(time: Moment) { Timestamp::set_timestamp(time - MILLISECS_PER_BLOCK as u64); } +type Block = MockBlock; + sp_api::mock_impl_runtime_apis! { impl zrml_prediction_markets_runtime_api::PredictionMarketsApi, MarketId, Hash> for Runtime { fn market_outcome_share_id(_: MarketId, _: u16) -> Assets { diff --git a/zrml/prediction-markets/src/orml_asset_registry.rs b/zrml/prediction-markets/src/orml_asset_registry.rs deleted file mode 100644 index ebabafa10..000000000 --- a/zrml/prediction-markets/src/orml_asset_registry.rs +++ /dev/null @@ -1,257 +0,0 @@ -// Copyright 2023 Forecasting Technologies Ltd. -// Copyright 2021 Centrifuge Foundation (centrifuge.io). -// -// This file is part of Zeitgeist. -// -// Zeitgeist is free software: you can redistribute it and/or modify it -// under the terms of the GNU General Public License as published by the -// Free Software Foundation, either version 3 of the License, or (at -// your option) any later version. -// -// Zeitgeist is distributed in the hope that it will be useful, but -// WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with Zeitgeist. If not, see . - -#![cfg(all(feature = "mock", feature = "parachain"))] - -#[macro_export] -macro_rules! impl_mock_registry { - ($name:ident, $asset_id:ty, $balance:ty, $custom_metadata:ty) => { - pub use orml_asset_registry_mock::$name; - - mod orml_asset_registry_mock { - use frame_support::{ - dispatch::{DispatchError, DispatchResult}, - traits::GenesisBuild, - }; - use orml_traits::asset_registry::{AssetMetadata, Inspect, Mutate}; - use xcm::{latest::prelude::MultiLocation, VersionedMultiLocation}; - - use super::*; - - pub struct $name; - - impl Inspect for $name { - type AssetId = $asset_id; - type Balance = $balance; - type CustomMetadata = $custom_metadata; - - fn asset_id(location: &MultiLocation) -> Option { - __private::STATE.with(|s| s.borrow().get_asset_from_location(location)) - } - - fn metadata( - asset_id: &Self::AssetId, - ) -> Option> { - __private::STATE.with(|s| s.borrow().get_meta(asset_id)) - } - - fn metadata_by_location( - location: &MultiLocation, - ) -> Option> { - __private::STATE.with(|s| s.borrow().get_meta_from_location(location)) - } - - fn location( - asset_id: &Self::AssetId, - ) -> Result, DispatchError> { - let maybe_location = - __private::STATE.with(|s| s.borrow().get_location(asset_id)); - - Ok(maybe_location) - } - } - - impl Mutate for $name { - fn register_asset( - asset_id: Option, - metadata: AssetMetadata, - ) -> DispatchResult { - if let Some(asset_id) = asset_id { - __private::STATE.with(|s| s.borrow_mut().insert_meta(&asset_id, metadata)) - } else { - Err(DispatchError::Other("Mock can only register metadata with asset_id")) - } - } - - fn update_asset( - asset_id: Self::AssetId, - decimals: Option, - name: Option>, - symbol: Option>, - existential_deposit: Option, - location: Option>, - additional: Option, - ) -> DispatchResult { - __private::STATE.with(|s| { - s.borrow_mut().update_asset( - asset_id, - decimals, - name, - symbol, - existential_deposit, - location, - additional, - ) - }) - } - } - - #[derive(Default)] - pub struct GenesisConfig { - pub metadata: Vec<($asset_id, AssetMetadata<$balance, $custom_metadata>)>, - } - - use serde::{ - de::{Deserialize, Deserializer}, - ser::{Serialize, SerializeStruct, Serializer}, - }; - - impl GenesisBuild<()> for GenesisConfig { - fn build(&self) { - for (asset, metadata) in &self.metadata { - __private::STATE - .with(|s| s.borrow_mut().insert_meta(asset, metadata.clone())) - .expect("Genesis must not fail") - } - } - } - - // NOTE: We need this dummy impl as `AssetMetadata` does NOT derive - // serialize in std - impl Serialize for GenesisConfig { - fn serialize(&self, serializer: S) -> Result - where - S: Serializer, - { - let state = serializer.serialize_struct("GenesisConfig", 1)?; - state.end() - } - } - - // NOTE: We need this dummy impl as `AssetMetadata` does NOT derive - // deserialize in std - impl<'de> Deserialize<'de> for GenesisConfig { - fn deserialize(_deserializer: D) -> Result - where - D: Deserializer<'de>, - { - Ok(GenesisConfig::default()) - } - } - - mod __private { - use std::{cell::RefCell, vec::Vec}; - - use super::*; - - // TODO(#936): This will not be required post polkadot v0.9.29 upgrade. - pub struct RegistryState { - pub location_to_asset: Vec<(MultiLocation, $asset_id)>, - pub metadata: Vec<($asset_id, AssetMetadata<$balance, $custom_metadata>)>, - } - - impl RegistryState { - pub fn get_meta( - &self, - asset_id: &$asset_id, - ) -> Option> { - for (curr_id, meta) in &self.metadata { - if curr_id == asset_id { - return Some(meta.clone()); - } - } - - None - } - - pub fn insert_meta( - &mut self, - asset_id: &$asset_id, - meta: AssetMetadata<$balance, $custom_metadata>, - ) -> DispatchResult { - for (curr_id, curr_meta) in &mut self.metadata { - if curr_id == asset_id { - *curr_meta = meta; - return Ok(()); - } - } - - self.metadata.push((asset_id.clone(), meta)); - Ok(()) - } - - pub fn get_location(&self, asset_id: &$asset_id) -> Option { - for (curr_id, meta) in &self.metadata { - if curr_id == asset_id { - return meta - .location - .as_ref() - .map(|versioned| versioned.clone().try_into().ok()) - .flatten(); - } - } - - None - } - - pub fn get_asset_from_location( - &self, - location: &MultiLocation, - ) -> Option<$asset_id> { - for (curr_location, asset_id) in &self.location_to_asset { - if curr_location == location { - return Some(asset_id.clone()); - } - } - - None - } - - pub fn get_meta_from_location( - &self, - location: &MultiLocation, - ) -> Option> { - let asset_id = self.get_asset_from_location(location)?; - self.get_meta(&asset_id) - } - - pub fn update_asset( - &mut self, - asset_id: $asset_id, - _decimals: Option, - _name: Option>, - _symbol: Option>, - _existential_deposit: Option<$balance>, - _location: Option>, - _additional: Option<$custom_metadata>, - ) -> DispatchResult { - if let Some(_meta) = self.get_meta(&asset_id) { - Ok(()) - } else { - Err(DispatchError::Other("Asset not registered")) - } - } - } - - impl RegistryState { - fn new() -> Self { - Self { location_to_asset: Vec::new(), metadata: Vec::new() } - } - } - - thread_local! { - pub static STATE: RefCell< - RegistryState, - > = RefCell::new(RegistryState::new()); - } - } - } - }; -} - -pub use impl_mock_registry; diff --git a/zrml/prediction-markets/src/tests/mod.rs b/zrml/prediction-markets/src/tests/mod.rs index 662ff84f8..da264b1f9 100644 --- a/zrml/prediction-markets/src/tests/mod.rs +++ b/zrml/prediction-markets/src/tests/mod.rs @@ -47,6 +47,7 @@ use core::ops::Range; use frame_support::{ assert_noop, assert_ok, storage::unhashed::get_or, traits::NamedReservableCurrency, }; +use frame_system::pallet_prelude::BlockNumberFor; use orml_traits::MultiCurrency; use sp_arithmetic::Perbill; use sp_runtime::traits::{BlakeTwo256, Hash, Zero}; @@ -91,7 +92,7 @@ impl StateTransitionMock { } } -fn get_deadlines() -> Deadlines<::BlockNumber> { +fn get_deadlines() -> Deadlines> { Deadlines { grace_period: 1_u32.into(), oracle_duration: ::MinOracleDuration::get(), diff --git a/zrml/rikiddo/Cargo.toml b/zrml/rikiddo/Cargo.toml index 64947e298..f6187b517 100644 --- a/zrml/rikiddo/Cargo.toml +++ b/zrml/rikiddo/Cargo.toml @@ -42,6 +42,6 @@ try-runtime = [ [package] authors = ["Zeitgeist PM "] -edition = "2021" +edition.workspace = true name = "zrml-rikiddo" version = "0.5.2" diff --git a/zrml/rikiddo/fuzz/Cargo.toml b/zrml/rikiddo/fuzz/Cargo.toml index 0f9f597bc..aa397bbac 100644 --- a/zrml/rikiddo/fuzz/Cargo.toml +++ b/zrml/rikiddo/fuzz/Cargo.toml @@ -80,7 +80,7 @@ zrml-rikiddo = { workspace = true, features = ["arbitrary", "mock", "default"] } [package] authors = ["Automatically generated"] -edition = "2021" +edition.workspace = true name = "zrml-rikiddo-fuzz" publish = false version = "0.0.0" diff --git a/zrml/rikiddo/src/lib.rs b/zrml/rikiddo/src/lib.rs index be7f94817..049885acd 100644 --- a/zrml/rikiddo/src/lib.rs +++ b/zrml/rikiddo/src/lib.rs @@ -1,3 +1,4 @@ +// Copyright 2024 Forecasting Technologies LTD. // Copyright 2021-2022 Zeitgeist PM LLC. // // This file is part of Zeitgeist. @@ -72,6 +73,7 @@ pub mod pallet { traits::{Get, Hooks, StorageVersion, Time}, Twox64Concat, }; + use frame_system::pallet_prelude::BlockNumberFor; use parity_scale_codec::{Decode, Encode, FullCodec, FullEncode, MaxEncodedLen}; use scale_info::TypeInfo; use sp_runtime::DispatchError; @@ -150,7 +152,7 @@ pub mod pallet { StorageMap<_, Twox64Concat, T::PoolId, T::Rikiddo>; #[pallet::hooks] - impl, I: 'static> Hooks for Pallet {} + impl, I: 'static> Hooks> for Pallet {} #[pallet::pallet] #[pallet::storage_version(STORAGE_VERSION)] diff --git a/zrml/rikiddo/src/mock.rs b/zrml/rikiddo/src/mock.rs index 970a89d40..40a1431e3 100644 --- a/zrml/rikiddo/src/mock.rs +++ b/zrml/rikiddo/src/mock.rs @@ -1,4 +1,4 @@ -// Copyright 2023 Forecasting Technologies LTD. +// Copyright 2023-2024 Forecasting Technologies LTD. // Copyright 2021-2022 Zeitgeist PM LLC. // // This file is part of Zeitgeist. @@ -26,17 +26,15 @@ use crate::types::{EmaMarketVolume, FeeSigmoid, RikiddoSigmoidMV}; use frame_support::{construct_runtime, parameter_types, traits::Everything}; +use frame_system::mocking::MockBlock; use sp_runtime::{ - testing::Header, traits::{BlakeTwo256, IdentityLookup}, + BuildStorage, }; use substrate_fixed::{types::extra::U33, FixedI128, FixedU128}; use zeitgeist_primitives::{ - constants::mock::{BlockHashCount, ExistentialDeposit, MaxReserves, BASE}, - types::{ - AccountIdTest, Balance, BlockNumber, BlockTest, Hash, Index, Moment, PoolId, - UncheckedExtrinsicTest, - }, + constants::mock::{BlockHashCount, ExistentialDeposit, MaxLocks, MaxReserves, BASE}, + types::{AccountIdTest, Balance, Hash, Moment, PoolId}, }; pub const ALICE: AccountIdTest = 0; @@ -52,16 +50,11 @@ parameter_types! { } construct_runtime!( - pub enum Runtime - where - Block = BlockTest, - NodeBlock = BlockTest, - UncheckedExtrinsic = UncheckedExtrinsicTest, - { - Balances: pallet_balances::{Call, Config, Event, Pallet, Storage}, - Rikiddo: crate::{Pallet, Storage}, - System: frame_system::{Call, Config, Event, Pallet, Storage}, - Timestamp: pallet_timestamp::{Call, Pallet, Storage, Inherent}, + pub enum Runtime { + Balances: pallet_balances, + Rikiddo: crate, + System: frame_system, + Timestamp: pallet_timestamp, } ); @@ -84,37 +77,40 @@ impl frame_system::Config for Runtime { type AccountData = pallet_balances::AccountData; type AccountId = AccountIdTest; type BaseCallFilter = Everything; + type Block = MockBlock; type BlockHashCount = BlockHashCount; type BlockLength = (); - type BlockNumber = BlockNumber; type BlockWeights = (); type RuntimeCall = RuntimeCall; type DbWeight = (); type RuntimeEvent = RuntimeEvent; type Hash = Hash; type Hashing = BlakeTwo256; - type Header = Header; - type Index = Index; type Lookup = IdentityLookup; + type Nonce = u64; type MaxConsumers = frame_support::traits::ConstU32<16>; type OnKilledAccount = (); type OnNewAccount = (); - type OnSetCode = (); type RuntimeOrigin = RuntimeOrigin; type PalletInfo = PalletInfo; type SS58Prefix = (); type SystemWeightInfo = (); type Version = (); + type OnSetCode = (); } impl pallet_balances::Config for Runtime { type AccountStore = System; type Balance = Balance; type DustRemoval = (); + type FreezeIdentifier = (); + type RuntimeHoldReason = (); type RuntimeEvent = RuntimeEvent; - type MaxReserves = MaxReserves; type ExistentialDeposit = ExistentialDeposit; - type MaxLocks = (); + type MaxHolds = (); + type MaxFreezes = (); + type MaxLocks = MaxLocks; + type MaxReserves = MaxReserves; type ReserveIdentifier = [u8; 8]; type WeightInfo = (); } @@ -147,7 +143,7 @@ impl Default for ExtBuilder { impl ExtBuilder { pub fn build(self) -> sp_io::TestExternalities { - let mut t = frame_system::GenesisConfig::default().build_storage::().unwrap(); + let mut t = frame_system::GenesisConfig::::default().build_storage().unwrap(); // see the logs in tests when using `RUST_LOG=debug cargo test -- --nocapture` let _ = env_logger::builder().is_test(true).try_init(); diff --git a/zrml/rikiddo/src/types.rs b/zrml/rikiddo/src/types.rs index cff58f86b..5a5858e1e 100644 --- a/zrml/rikiddo/src/types.rs +++ b/zrml/rikiddo/src/types.rs @@ -1,3 +1,4 @@ +// Copyright 2024 Forecasting Technologies LTD. // Copyright 2021-2022 Zeitgeist PM LLC. // // This file is part of Zeitgeist. @@ -23,8 +24,7 @@ extern crate alloc; use arbitrary::{Arbitrary, Result as ArbiraryResult, Unstructured}; #[cfg(feature = "arbitrary")] use core::mem; -use frame_support::dispatch::{Decode, Encode}; -use parity_scale_codec::MaxEncodedLen; +use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; use scale_info::TypeInfo; use sp_core::RuntimeDebug; use substrate_fixed::traits::Fixed; diff --git a/zrml/rikiddo/src/types/ema_market_volume.rs b/zrml/rikiddo/src/types/ema_market_volume.rs index a6d49cd27..847f1dbc5 100644 --- a/zrml/rikiddo/src/types/ema_market_volume.rs +++ b/zrml/rikiddo/src/types/ema_market_volume.rs @@ -1,3 +1,4 @@ +// Copyright 2024 Forecasting Technologies LTD. // Copyright 2021-2022 Zeitgeist PM LLC. // // This file is part of Zeitgeist. @@ -25,8 +26,7 @@ use crate::{ use arbitrary::{Arbitrary, Result as ArbitraryResult, Unstructured}; #[cfg(feature = "arbitrary")] use core::mem; -use frame_support::dispatch::{Decode, Encode}; -use parity_scale_codec::MaxEncodedLen; +use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; use scale_info::TypeInfo; use sp_core::RuntimeDebug; use substrate_fixed::{ diff --git a/zrml/rikiddo/src/types/rikiddo_sigmoid_mv.rs b/zrml/rikiddo/src/types/rikiddo_sigmoid_mv.rs index 65e355b5d..eba866310 100644 --- a/zrml/rikiddo/src/types/rikiddo_sigmoid_mv.rs +++ b/zrml/rikiddo/src/types/rikiddo_sigmoid_mv.rs @@ -1,3 +1,4 @@ +// Copyright 2024 Forecasting Technologies LTD. // Copyright 2021-2022 Zeitgeist PM LLC. // // This file is part of Zeitgeist. @@ -28,9 +29,8 @@ use alloc::vec::Vec; #[cfg(feature = "arbitrary")] use arbitrary::{Arbitrary, Result as ArbiraryResult, Unstructured}; use core::ops::{AddAssign, BitOrAssign, ShlAssign}; -use frame_support::dispatch::{Decode, Encode}; use hashbrown::HashMap; -use parity_scale_codec::MaxEncodedLen; +use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; use scale_info::TypeInfo; use sp_core::RuntimeDebug; use substrate_fixed::{ diff --git a/zrml/rikiddo/src/types/sigmoid_fee.rs b/zrml/rikiddo/src/types/sigmoid_fee.rs index d122c64ec..97640057a 100644 --- a/zrml/rikiddo/src/types/sigmoid_fee.rs +++ b/zrml/rikiddo/src/types/sigmoid_fee.rs @@ -1,3 +1,4 @@ +// Copyright 2024 Forecasting Technologies LTD. // Copyright 2021-2022 Zeitgeist PM LLC. // // This file is part of Zeitgeist. @@ -26,8 +27,7 @@ use crate::{ use arbitrary::{Arbitrary, Result as ArbiraryResult, Unstructured}; #[cfg(feature = "arbitrary")] use core::mem; -use frame_support::dispatch::{Decode, Encode}; -use parity_scale_codec::MaxEncodedLen; +use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; use scale_info::TypeInfo; use sp_core::RuntimeDebug; use substrate_fixed::{ diff --git a/zrml/simple-disputes/Cargo.toml b/zrml/simple-disputes/Cargo.toml index 75265192f..271a019f4 100644 --- a/zrml/simple-disputes/Cargo.toml +++ b/zrml/simple-disputes/Cargo.toml @@ -13,7 +13,7 @@ zrml-market-commons = { workspace = true } env_logger = { workspace = true } orml-currencies = { workspace = true, features = ["default"] } orml-tokens = { workspace = true, features = ["default"] } -pallet-balances = { workspace = true, features = ["default"] } +pallet-balances = { workspace = true, features = ["default", "insecure_zero_ed"] } pallet-timestamp = { workspace = true, features = ["default"] } sp-io = { workspace = true, features = ["default"] } zeitgeist-primitives = { workspace = true, features = ["mock", "default"] } @@ -40,6 +40,6 @@ try-runtime = [ [package] authors = ["Zeitgeist PM "] -edition = "2021" +edition.workspace = true name = "zrml-simple-disputes" version = "0.5.2" diff --git a/zrml/simple-disputes/src/benchmarks.rs b/zrml/simple-disputes/src/benchmarks.rs index 2f06b5652..8df924268 100644 --- a/zrml/simple-disputes/src/benchmarks.rs +++ b/zrml/simple-disputes/src/benchmarks.rs @@ -1,4 +1,4 @@ -// Copyright 2023 Forecasting Technologies LTD. +// Copyright 2023-2024 Forecasting Technologies LTD. // Copyright 2021-2022 Zeitgeist PM LLC. // // This file is part of Zeitgeist. @@ -31,6 +31,7 @@ use frame_support::{ dispatch::RawOrigin, traits::{Currency, Get, Imbalance}, }; +use frame_system::pallet_prelude::BlockNumberFor; use sp_runtime::traits::{One, Saturating}; use zrml_market_commons::MarketCommonsPalletApi; @@ -47,7 +48,7 @@ fn fill_disputes(market_id: MarketIdOf, d: u32) { outcome, ) .unwrap(); - >::set_block_number(now.saturating_add(T::BlockNumber::one())); + >::set_block_number(now.saturating_add(BlockNumberFor::::one())); } } diff --git a/zrml/simple-disputes/src/lib.rs b/zrml/simple-disputes/src/lib.rs index ba02d764b..dd45645bd 100644 --- a/zrml/simple-disputes/src/lib.rs +++ b/zrml/simple-disputes/src/lib.rs @@ -53,12 +53,11 @@ mod pallet { traits::{Currency, Get, Hooks, Imbalance, IsType, NamedReservableCurrency}, transactional, BoundedVec, PalletId, }; - use frame_system::pallet_prelude::*; + use frame_system::pallet_prelude::{BlockNumberFor, *}; use sp_runtime::{ traits::{CheckedDiv, Saturating, Zero}, DispatchError, SaturatedConversion, }; - use zrml_market_commons::MarketCommonsPalletApi; #[pallet::config] @@ -74,7 +73,7 @@ mod pallet { type DisputeResolution: DisputeResolutionApi< AccountId = Self::AccountId, - BlockNumber = Self::BlockNumber, + BlockNumber = BlockNumberFor, MarketId = MarketIdOf, Moment = MomentOf, >; @@ -87,7 +86,7 @@ mod pallet { /// The identifier of individual markets. type MarketCommons: MarketCommonsPalletApi< AccountId = Self::AccountId, - BlockNumber = Self::BlockNumber, + BlockNumber = BlockNumberFor, Balance = BalanceOf, >; @@ -113,17 +112,13 @@ mod pallet { pub(crate) type MarketOf = Market< ::AccountId, BalanceOf, - ::BlockNumber, + BlockNumberFor, MomentOf, BaseAsset, MarketIdOf, >; pub(crate) type DisputesOf = BoundedVec< - MarketDispute< - ::AccountId, - ::BlockNumber, - BalanceOf, - >, + MarketDispute<::AccountId, BlockNumberFor, BalanceOf>, ::MaxDisputes, >; pub type CacheSize = ConstU32<64>; @@ -145,7 +140,7 @@ mod pallet { { OutcomeReserved { market_id: MarketIdOf, - dispute: MarketDispute>, + dispute: MarketDispute, BalanceOf>, }, } @@ -165,7 +160,7 @@ mod pallet { } #[pallet::hooks] - impl Hooks for Pallet {} + impl Hooks> for Pallet {} #[pallet::call] impl Pallet { @@ -224,8 +219,8 @@ mod pallet { } fn ensure_can_not_dispute_the_same_outcome( - disputes: &[MarketDispute>], - report: &Report, + disputes: &[MarketDispute, BalanceOf>], + report: &Report>, outcome: &OutcomeReport, ) -> DispatchResult { if let Some(last_dispute) = disputes.last() { @@ -253,16 +248,16 @@ mod pallet { } fn get_auto_resolve( - disputes: &[MarketDispute>], + disputes: &[MarketDispute, BalanceOf>], market: &MarketOf, - ) -> Option { + ) -> Option> { disputes.last().map(|last_dispute| { last_dispute.at.saturating_add(market.deadlines.dispute_duration) }) } fn remove_auto_resolve( - disputes: &[MarketDispute>], + disputes: &[MarketDispute, BalanceOf>], market_id: &MarketIdOf, market: &MarketOf, ) -> u32 { @@ -316,7 +311,7 @@ mod pallet { type AccountId = T::AccountId; type Balance = BalanceOf; type NegativeImbalance = NegativeImbalanceOf; - type BlockNumber = T::BlockNumber; + type BlockNumber = BlockNumberFor; type MarketId = MarketIdOf; type Moment = MomentOf; type Origin = T::RuntimeOrigin; diff --git a/zrml/simple-disputes/src/mock.rs b/zrml/simple-disputes/src/mock.rs index b74e497f0..8b61bd18e 100644 --- a/zrml/simple-disputes/src/mock.rs +++ b/zrml/simple-disputes/src/mock.rs @@ -24,19 +24,20 @@ use frame_support::{ pallet_prelude::{DispatchError, Weight}, traits::Everything, }; +use frame_system::mocking::MockBlock; use sp_runtime::{ - testing::Header, traits::{BlakeTwo256, IdentityLookup}, + BuildStorage, }; use zeitgeist_primitives::{ constants::mock::{ - BlockHashCount, ExistentialDepositsAssets, GetNativeCurrencyId, MaxDisputes, MaxReserves, - MinimumPeriod, OutcomeBond, OutcomeFactor, SimpleDisputesPalletId, BASE, + BlockHashCount, ExistentialDepositsAssets, GetNativeCurrencyId, MaxDisputes, MaxLocks, + MaxReserves, MinimumPeriod, OutcomeBond, OutcomeFactor, SimpleDisputesPalletId, BASE, }, traits::{DisputeResolutionApi, MarketOfDisputeResolutionApi}, types::{ - AccountIdTest, Amount, Assets, Balance, BasicCurrencyAdapter, BlockNumber, BlockTest, Hash, - Index, MarketId, Moment, UncheckedExtrinsicTest, + AccountIdTest, Amount, Assets, Balance, BasicCurrencyAdapter, BlockNumber, Hash, MarketId, + Moment, }, }; @@ -55,19 +56,14 @@ ord_parameter_types! { } construct_runtime!( - pub enum Runtime - where - Block = BlockTest, - NodeBlock = BlockTest, - UncheckedExtrinsic = UncheckedExtrinsicTest, - { - AssetManager: orml_currencies::{Call, Pallet, Storage}, - Balances: pallet_balances::{Call, Config, Event, Pallet, Storage}, - MarketCommons: zrml_market_commons::{Pallet, Storage}, - SimpleDisputes: zrml_simple_disputes::{Event, Pallet, Storage}, - System: frame_system::{Call, Config, Event, Pallet, Storage}, - Timestamp: pallet_timestamp::{Pallet}, - Tokens: orml_tokens::{Config, Event, Pallet, Storage}, + pub enum Runtime { + AssetManager: orml_currencies, + Balances: pallet_balances, + MarketCommons: zrml_market_commons, + SimpleDisputes: zrml_simple_disputes, + System: frame_system, + Timestamp: pallet_timestamp, + Tokens: orml_tokens, } ); @@ -106,7 +102,7 @@ impl DisputeResolutionApi for NoopResolution { impl crate::Config for Runtime { type Currency = Balances; - type RuntimeEvent = (); + type RuntimeEvent = RuntimeEvent; type DisputeResolution = NoopResolution; type MarketCommons = MarketCommons; type MaxDisputes = MaxDisputes; @@ -120,18 +116,17 @@ impl frame_system::Config for Runtime { type AccountData = pallet_balances::AccountData; type AccountId = AccountIdTest; type BaseCallFilter = Everything; + type Block = MockBlock; type BlockHashCount = BlockHashCount; type BlockLength = (); - type BlockNumber = BlockNumber; type BlockWeights = (); type RuntimeCall = RuntimeCall; type DbWeight = (); - type RuntimeEvent = (); + type RuntimeEvent = RuntimeEvent; type Hash = Hash; type Hashing = BlakeTwo256; - type Header = Header; - type Index = Index; type Lookup = IdentityLookup; + type Nonce = u64; type MaxConsumers = frame_support::traits::ConstU32<16>; type OnKilledAccount = (); type OnNewAccount = (); @@ -147,9 +142,13 @@ impl pallet_balances::Config for Runtime { type AccountStore = System; type Balance = Balance; type DustRemoval = (); - type RuntimeEvent = (); + type FreezeIdentifier = (); + type RuntimeHoldReason = (); + type RuntimeEvent = RuntimeEvent; type ExistentialDeposit = (); - type MaxLocks = (); + type MaxHolds = (); + type MaxFreezes = (); + type MaxLocks = MaxLocks; type MaxReserves = MaxReserves; type ReserveIdentifier = [u8; 8]; type WeightInfo = (); @@ -167,7 +166,7 @@ impl orml_tokens::Config for Runtime { type Balance = Balance; type CurrencyId = Assets; type DustRemovalWhitelist = Everything; - type RuntimeEvent = (); + type RuntimeEvent = RuntimeEvent; type ExistentialDeposits = ExistentialDepositsAssets; type MaxLocks = (); type MaxReserves = MaxReserves; @@ -211,7 +210,7 @@ impl Default for ExtBuilder { impl ExtBuilder { pub fn build(self) -> sp_io::TestExternalities { - let mut t = frame_system::GenesisConfig::default().build_storage::().unwrap(); + let mut t = frame_system::GenesisConfig::::default().build_storage().unwrap(); // see the logs in tests when using `RUST_LOG=debug cargo test -- --nocapture` let _ = env_logger::builder().is_test(true).try_init(); diff --git a/zrml/simple-disputes/src/weights.rs b/zrml/simple-disputes/src/weights.rs index bfbc6cc8c..4bc89e83a 100644 --- a/zrml/simple-disputes/src/weights.rs +++ b/zrml/simple-disputes/src/weights.rs @@ -1,4 +1,4 @@ -// Copyright 2023 Forecasting Technologies LTD. +// Copyright 2023-2024 Forecasting Technologies LTD. // Copyright 2021-2022 Zeitgeist PM LLC. // // This file is part of Zeitgeist. @@ -64,34 +64,34 @@ impl WeightInfoZeitgeist for WeightInfo { // Storage: Balances Reserves (r:1 w:1) // Storage: PredictionMarkets MarketIdsPerDisputeBlock (r:2 w:2) fn suggest_outcome(d: u32, r: u32, e: u32) -> Weight { - Weight::from_ref_time(400_160_000) + Weight::from_parts(400_160_000, 0) // Standard Error: 1_302_000 - .saturating_add(Weight::from_ref_time(3_511_000).saturating_mul(d.into())) + .saturating_add(Weight::from_parts(3_511_000, 0).saturating_mul(d.into())) // Standard Error: 69_000 - .saturating_add(Weight::from_ref_time(324_000).saturating_mul(r.into())) + .saturating_add(Weight::from_parts(324_000, 0).saturating_mul(r.into())) // Standard Error: 69_000 - .saturating_add(Weight::from_ref_time(311_000).saturating_mul(e.into())) + .saturating_add(Weight::from_parts(311_000, 0).saturating_mul(e.into())) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(4)) } fn on_dispute_weight() -> Weight { - Weight::from_ref_time(0) + Weight::from_all(0) } // Storage: SimpleDisputes Disputes (r:1 w:0) fn on_resolution_weight(d: u32) -> Weight { - Weight::from_ref_time(5_464_000) + Weight::from_parts(5_464_000, 0) // Standard Error: 3_000 - .saturating_add(Weight::from_ref_time(210_000).saturating_mul(d.into())) + .saturating_add(Weight::from_parts(210_000, 0).saturating_mul(d.into())) .saturating_add(T::DbWeight::get().reads(1)) } // Storage: SimpleDisputes Disputes (r:1 w:1) // Storage: Balances Reserves (r:1 w:1) // Storage: System Account (r:1 w:1) fn exchange_weight(d: u32) -> Weight { - Weight::from_ref_time(18_573_000) + Weight::from_parts(18_573_000, 0) // Standard Error: 14_000 - .saturating_add(Weight::from_ref_time(19_710_000).saturating_mul(d.into())) + .saturating_add(Weight::from_parts(19_710_000, 0).saturating_mul(d.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(d.into()))) .saturating_add(T::DbWeight::get().writes(1)) @@ -99,32 +99,32 @@ impl WeightInfoZeitgeist for WeightInfo { } // Storage: SimpleDisputes Disputes (r:1 w:0) fn get_auto_resolve_weight(d: u32) -> Weight { - Weight::from_ref_time(5_535_000) + Weight::from_parts(5_535_000, 0) // Standard Error: 3_000 - .saturating_add(Weight::from_ref_time(145_000).saturating_mul(d.into())) + .saturating_add(Weight::from_parts(145_000, 0).saturating_mul(d.into())) .saturating_add(T::DbWeight::get().reads(1)) } // Storage: SimpleDisputes Disputes (r:1 w:0) fn has_failed_weight(d: u32) -> Weight { - Weight::from_ref_time(5_685_000) + Weight::from_parts(5_685_000, 0) // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(117_000).saturating_mul(d.into())) + .saturating_add(Weight::from_parts(117_000, 0).saturating_mul(d.into())) .saturating_add(T::DbWeight::get().reads(1)) } // Storage: SimpleDisputes Disputes (r:1 w:0) fn on_global_dispute_weight(d: u32) -> Weight { - Weight::from_ref_time(5_815_000) + Weight::from_parts(5_815_000, 0) // Standard Error: 2_000 - .saturating_add(Weight::from_ref_time(66_000).saturating_mul(d.into())) + .saturating_add(Weight::from_parts(66_000, 0).saturating_mul(d.into())) .saturating_add(T::DbWeight::get().reads(1)) } // Storage: SimpleDisputes Disputes (r:1 w:1) // Storage: Balances Reserves (r:1 w:1) // Storage: System Account (r:1 w:1) fn clear_weight(d: u32) -> Weight { - Weight::from_ref_time(15_958_000) + Weight::from_parts(15_958_000, 0) // Standard Error: 17_000 - .saturating_add(Weight::from_ref_time(13_085_000).saturating_mul(d.into())) + .saturating_add(Weight::from_parts(13_085_000, 0).saturating_mul(d.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(d.into()))) .saturating_add(T::DbWeight::get().writes(1)) diff --git a/zrml/styx/Cargo.toml b/zrml/styx/Cargo.toml index 22c701802..f2c45f4c2 100644 --- a/zrml/styx/Cargo.toml +++ b/zrml/styx/Cargo.toml @@ -9,7 +9,7 @@ zeitgeist-primitives = { workspace = true } [dev-dependencies] env_logger = { workspace = true } -pallet-balances = { workspace = true, features = ["default"] } +pallet-balances = { workspace = true, features = ["default", "insecure_zero_ed"] } pallet-timestamp = { workspace = true, features = ["default"] } sp-io = { workspace = true, features = ["default"] } zeitgeist-primitives = { workspace = true, features = ["mock", "default"] } @@ -35,6 +35,6 @@ try-runtime = [ [package] authors = ["Zeitgeist PM "] -edition = "2021" +edition.workspace = true name = "zrml-styx" version = "0.5.2" diff --git a/zrml/styx/src/benchmarks.rs b/zrml/styx/src/benchmarks.rs index 86d1dd06a..da88151b8 100644 --- a/zrml/styx/src/benchmarks.rs +++ b/zrml/styx/src/benchmarks.rs @@ -28,10 +28,7 @@ use crate::Config; #[cfg(test)] use crate::Pallet as Styx; use frame_benchmarking::{benchmarks, whitelisted_caller}; -use frame_support::{ - dispatch::UnfilteredDispatchable, - traits::{Currency, EnsureOrigin}, -}; +use frame_support::traits::{Currency, EnsureOrigin, UnfilteredDispatchable}; use frame_system::RawOrigin; use sp_runtime::SaturatedConversion; use zeitgeist_primitives::constants::BASE; diff --git a/zrml/styx/src/lib.rs b/zrml/styx/src/lib.rs index ab86b6baf..300e3b3ed 100644 --- a/zrml/styx/src/lib.rs +++ b/zrml/styx/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2022-2023 Forecasting Technologies LTD. +// Copyright 2022-2024 Forecasting Technologies LTD. // Copyright 2021-2022 Zeitgeist PM LLC. // // This file is part of Zeitgeist. @@ -49,7 +49,6 @@ pub mod pallet { } #[pallet::pallet] - #[pallet::generate_store(pub(super) trait Store)] pub struct Pallet(_); /// Keep track of crossings. Accounts are only able to cross once. diff --git a/zrml/styx/src/mock.rs b/zrml/styx/src/mock.rs index 263c25712..307964602 100644 --- a/zrml/styx/src/mock.rs +++ b/zrml/styx/src/mock.rs @@ -1,4 +1,4 @@ -// Copyright 2023 Forecasting Technologies LTD. +// Copyright 2023-2024 Forecasting Technologies LTD. // Copyright 2021-2022 Zeitgeist PM LLC. // // This file is part of Zeitgeist. @@ -20,14 +20,14 @@ use crate::{self as zrml_styx}; use frame_support::{construct_runtime, ord_parameter_types, traits::Everything}; -use frame_system::EnsureSignedBy; +use frame_system::{mocking::MockBlock, EnsureSignedBy}; use sp_runtime::{ - testing::Header, traits::{BlakeTwo256, IdentityLookup}, + BuildStorage, }; use zeitgeist_primitives::{ - constants::mock::{BlockHashCount, MaxReserves, BASE}, - types::{AccountIdTest, Balance, BlockNumber, BlockTest, Hash, Index, UncheckedExtrinsicTest}, + constants::mock::{BlockHashCount, MaxLocks, MaxReserves, BASE}, + types::{AccountIdTest, Balance, Hash}, }; pub const ALICE: AccountIdTest = 0; @@ -40,15 +40,10 @@ ord_parameter_types! { } construct_runtime!( - pub enum Runtime - where - Block = BlockTest, - NodeBlock = BlockTest, - UncheckedExtrinsic = UncheckedExtrinsicTest, - { - Balances: pallet_balances::{Call, Config, Event, Pallet, Storage}, - Styx: zrml_styx::{Event, Pallet, Storage}, - System: frame_system::{Call, Config, Event, Pallet, Storage}, + pub enum Runtime { + Balances: pallet_balances, + Styx: zrml_styx, + System: frame_system, } ); @@ -63,18 +58,17 @@ impl frame_system::Config for Runtime { type AccountData = pallet_balances::AccountData; type AccountId = AccountIdTest; type BaseCallFilter = Everything; + type Block = MockBlock; type BlockHashCount = BlockHashCount; type BlockLength = (); - type BlockNumber = BlockNumber; type BlockWeights = (); type RuntimeCall = RuntimeCall; type DbWeight = (); type RuntimeEvent = RuntimeEvent; type Hash = Hash; type Hashing = BlakeTwo256; - type Header = Header; - type Index = Index; type Lookup = IdentityLookup; + type Nonce = u64; type MaxConsumers = frame_support::traits::ConstU32<16>; type OnKilledAccount = (); type OnNewAccount = (); @@ -90,9 +84,13 @@ impl pallet_balances::Config for Runtime { type AccountStore = System; type Balance = Balance; type DustRemoval = (); + type FreezeIdentifier = (); + type RuntimeHoldReason = (); type RuntimeEvent = RuntimeEvent; type ExistentialDeposit = (); - type MaxLocks = (); + type MaxHolds = (); + type MaxFreezes = (); + type MaxLocks = MaxLocks; type MaxReserves = MaxReserves; type ReserveIdentifier = [u8; 8]; type WeightInfo = (); @@ -110,7 +108,7 @@ impl Default for ExtBuilder { impl ExtBuilder { pub fn build(self) -> sp_io::TestExternalities { - let mut t = frame_system::GenesisConfig::default().build_storage::().unwrap(); + let mut t = frame_system::GenesisConfig::::default().build_storage().unwrap(); // see the logs in tests when using `RUST_LOG=debug cargo test -- --nocapture` let _ = env_logger::builder().is_test(true).try_init(); diff --git a/zrml/styx/src/tests.rs b/zrml/styx/src/tests.rs index dfcc0bf1a..309abcc83 100644 --- a/zrml/styx/src/tests.rs +++ b/zrml/styx/src/tests.rs @@ -1,3 +1,4 @@ +// Copyright 2024 Forecasting Technologies LTD. // Copyright 2021-2022 Zeitgeist PM LLC. // // This file is part of Zeitgeist. @@ -18,7 +19,7 @@ #![cfg(test)] use crate::{mock::*, Crossings, Error, Event}; -use frame_support::{assert_noop, assert_ok, error::BadOrigin}; +use frame_support::{assert_noop, assert_ok, error::BadOrigin, traits::fungible::Mutate}; #[test] fn cross_slashes_funds_and_stores_crossing() { @@ -68,7 +69,7 @@ fn set_burn_amount_should_fail_with_unathorized_caller() { fn account_should_not_cross_without_sufficient_funds() { ExtBuilder::default().build().execute_with(|| { frame_system::Pallet::::set_block_number(1); - assert_ok!(Balances::set_balance(RuntimeOrigin::root(), ALICE, 0, 0)); + assert_eq!(Balances::set_balance(&ALICE, 0), 0); assert_noop!( Styx::cross(RuntimeOrigin::signed(ALICE)), Error::::FundDoesNotHaveEnoughFreeBalance diff --git a/zrml/swaps/Cargo.toml b/zrml/swaps/Cargo.toml index 2437f503c..a92d3b7df 100644 --- a/zrml/swaps/Cargo.toml +++ b/zrml/swaps/Cargo.toml @@ -63,6 +63,6 @@ try-runtime = [ [package] authors = ["Zeitgeist PM "] -edition = "2021" +edition.workspace = true name = "zrml-swaps" version = "0.5.2" diff --git a/zrml/swaps/fuzz/Cargo.toml b/zrml/swaps/fuzz/Cargo.toml index 9490975ad..a7819b250 100644 --- a/zrml/swaps/fuzz/Cargo.toml +++ b/zrml/swaps/fuzz/Cargo.toml @@ -64,7 +64,7 @@ zrml-swaps = { workspace = true, features = ["mock", "default"] } [package] authors = ["Automatically generated"] -edition = "2021" +edition.workspace = true name = "zrml-swaps-fuzz" publish = false version = "0.0.0" diff --git a/zrml/swaps/rpc/Cargo.toml b/zrml/swaps/rpc/Cargo.toml index 178f5ddd5..ec05f2a59 100644 --- a/zrml/swaps/rpc/Cargo.toml +++ b/zrml/swaps/rpc/Cargo.toml @@ -9,6 +9,6 @@ zrml-swaps-runtime-api = { workspace = true, features = ["default"] } [package] authors = ["Zeitgeist PM "] -edition = "2021" +edition.workspace = true name = "zrml-swaps-rpc" version = "0.5.2" diff --git a/zrml/swaps/rpc/src/lib.rs b/zrml/swaps/rpc/src/lib.rs index 5591fb2f9..7de3901ef 100644 --- a/zrml/swaps/rpc/src/lib.rs +++ b/zrml/swaps/rpc/src/lib.rs @@ -30,10 +30,7 @@ use jsonrpsee::{ use parity_scale_codec::{Codec, HasCompact, MaxEncodedLen}; use sp_api::ProvideRuntimeApi; use sp_blockchain::HeaderBackend; -use sp_runtime::{ - generic::BlockId, - traits::{Block as BlockT, MaybeDisplay, MaybeFromStr, NumberFor}, -}; +use sp_runtime::traits::{Block as BlockT, MaybeDisplay, MaybeFromStr, NumberFor}; use zeitgeist_primitives::types::Asset; pub use zrml_swaps_runtime_api::SwapsApi as SwapsRuntimeApi; @@ -133,11 +130,8 @@ where at: Option<::Hash>, ) -> RpcResult> { let api = self.client.runtime_api(); - let at = BlockId::hash(at.unwrap_or_else(|| - //if the block hash is not supplied assume the best block - self.client.info().best_hash)); - - let res = api.pool_shares_id(&at, pool_id).map_err(|e| { + let hash = at.unwrap_or_else(|| self.client.info().best_hash); + let res = api.pool_shares_id(hash, pool_id).map_err(|e| { CallError::Custom(ErrorObject::owned( Error::RuntimeError.into(), "Unable to get pool shares identifier.", @@ -153,11 +147,8 @@ where at: Option<::Hash>, ) -> RpcResult { let api = self.client.runtime_api(); - let at = BlockId::hash(at.unwrap_or_else(|| - //if the block hash is not supplied assume the best block - self.client.info().best_hash)); - - let res = api.pool_account_id(&at, &pool_id).map_err(|e| { + let hash = at.unwrap_or_else(|| self.client.info().best_hash); + let res = api.pool_account_id(hash, &pool_id).map_err(|e| { CallError::Custom(ErrorObject::owned( Error::RuntimeError.into(), "Unable to get pool account identifier.", @@ -177,9 +168,9 @@ where at: Option<::Hash>, ) -> RpcResult { let api = self.client.runtime_api(); - let at = BlockId::hash(at.unwrap_or_else(|| self.client.info().best_hash)); + let hash = at.unwrap_or_else(|| self.client.info().best_hash); let res = - api.get_spot_price(&at, &pool_id, &asset_in, &asset_out, with_fees).map_err(|e| { + api.get_spot_price(hash, &pool_id, &asset_in, &asset_out, with_fees).map_err(|e| { CallError::Custom(ErrorObject::owned( Error::RuntimeError.into(), "Unable to get spot price.", @@ -200,10 +191,14 @@ where let api = self.client.runtime_api(); blocks .into_iter() - .map(|block| { - let hash = BlockId::number(block); + .map(|block_number| { + let hash = self + .client + .hash(block_number) + .unwrap_or(Some(self.client.info().best_hash)) + .unwrap_or(self.client.info().best_hash); let res = api - .get_spot_price(&hash, &pool_id, &asset_in, &asset_out, with_fees) + .get_spot_price(hash, &pool_id, &asset_in, &asset_out, with_fees) .map_err(|e| { CallError::Custom(ErrorObject::owned( Error::RuntimeError.into(), diff --git a/zrml/swaps/runtime-api/Cargo.toml b/zrml/swaps/runtime-api/Cargo.toml index cd99f4a9d..2e102db34 100644 --- a/zrml/swaps/runtime-api/Cargo.toml +++ b/zrml/swaps/runtime-api/Cargo.toml @@ -16,6 +16,6 @@ std = [ [package] authors = ["Zeitgeist PM "] -edition = "2021" +edition.workspace = true name = "zrml-swaps-runtime-api" version = "0.5.2" diff --git a/zrml/swaps/src/benchmarks.rs b/zrml/swaps/src/benchmarks.rs index c7442491a..69bc5fc22 100644 --- a/zrml/swaps/src/benchmarks.rs +++ b/zrml/swaps/src/benchmarks.rs @@ -30,7 +30,8 @@ use super::*; #[cfg(test)] use crate::Pallet as Swaps; use crate::{types::PoolStatus, AssetOf, Config, Event, MAX_IN_RATIO, MAX_OUT_RATIO}; -use frame_benchmarking::{benchmarks, vec, whitelisted_caller, Vec}; +use alloc::{vec, vec::Vec}; +use frame_benchmarking::{benchmarks, whitelisted_caller}; use frame_support::traits::Get; use frame_system::RawOrigin; use orml_traits::MultiCurrency; diff --git a/zrml/swaps/src/fixed.rs b/zrml/swaps/src/fixed.rs index aa1aec648..607155a87 100644 --- a/zrml/swaps/src/fixed.rs +++ b/zrml/swaps/src/fixed.rs @@ -22,7 +22,7 @@ // balancer-core repository // . -use frame_support::dispatch::DispatchError; +use sp_runtime::DispatchError; use zeitgeist_primitives::{ constants::BASE, math::{ @@ -175,8 +175,9 @@ pub fn bpow_approx(base: u128, exp: u128) -> Result { #[cfg(test)] mod tests { use super::*; - use frame_support::{assert_err, dispatch::DispatchError}; + use frame_support::assert_err; use more_asserts::assert_le; + use sp_runtime::DispatchError; #[test] fn bpow_has_minimum_set_of_correct_values() { diff --git a/zrml/swaps/src/lib.rs b/zrml/swaps/src/lib.rs index 17e2e0132..54f55e4b3 100644 --- a/zrml/swaps/src/lib.rs +++ b/zrml/swaps/src/lib.rs @@ -58,12 +58,13 @@ mod pallet { use alloc::{collections::btree_map::BTreeMap, vec, vec::Vec}; use core::marker::PhantomData; use frame_support::{ - dispatch::Weight, ensure, pallet_prelude::{OptionQuery, StorageMap, StorageValue, ValueQuery}, require_transactional, traits::{Get, IsType, StorageVersion}, - transactional, Blake2_128Concat, PalletError, PalletId, Parameter, + transactional, + weights::Weight, + Blake2_128Concat, PalletError, PalletId, Parameter, }; use frame_system::{ensure_signed, pallet_prelude::OriginFor}; use orml_traits::MultiCurrency; @@ -564,7 +565,6 @@ mod pallet { #[pallet::pallet] #[pallet::storage_version(STORAGE_VERSION)] - #[pallet::generate_store(pub(super) trait Store)] pub struct Pallet(PhantomData); #[pallet::storage] diff --git a/zrml/swaps/src/math.rs b/zrml/swaps/src/math.rs index 64b4d9606..8abf6b4d4 100644 --- a/zrml/swaps/src/math.rs +++ b/zrml/swaps/src/math.rs @@ -25,7 +25,7 @@ #![allow(clippy::let_and_return)] use crate::fixed::bpow; -use frame_support::dispatch::DispatchError; +use sp_runtime::DispatchError; use zeitgeist_primitives::{ constants::BASE, math::{ diff --git a/zrml/swaps/src/mock.rs b/zrml/swaps/src/mock.rs index de0c3fa27..12450ed6e 100644 --- a/zrml/swaps/src/mock.rs +++ b/zrml/swaps/src/mock.rs @@ -33,10 +33,11 @@ use frame_support::{ construct_runtime, parameter_types, traits::{Contains, Everything}, }; +use frame_system::mocking::MockBlock; use orml_traits::parameter_type_with_key; use sp_runtime::{ - testing::Header, traits::{AccountIdConversion, BlakeTwo256, IdentityLookup}, + BuildStorage, }; use zeitgeist_primitives::{ constants::mock::{ @@ -45,8 +46,8 @@ use zeitgeist_primitives::{ BASE, }, types::{ - AccountIdTest, Amount, Asset, Assets, Balance, BasicCurrencyAdapter, BlockNumber, - BlockTest, Hash, Index, MarketId, Moment, PoolId, UncheckedExtrinsicTest, + AccountIdTest, Amount, Asset, Assets, Balance, BasicCurrencyAdapter, Hash, MarketId, + Moment, PoolId, UncheckedExtrinsicTest, }, }; @@ -77,18 +78,13 @@ parameter_types! { } construct_runtime!( - pub enum Runtime - where - Block = BlockTest, - NodeBlock = BlockTest, - UncheckedExtrinsic = UncheckedExtrinsic, - { - Balances: pallet_balances::{Call, Config, Event, Pallet, Storage}, - Currencies: orml_currencies::{Pallet}, - Swaps: zrml_swaps::{Call, Event, Pallet}, - System: frame_system::{Call, Config, Event, Pallet, Storage}, - Timestamp: pallet_timestamp::{Pallet}, - Tokens: orml_tokens::{Config, Event, Pallet, Storage}, + pub enum Runtime { + Balances: pallet_balances, + Currencies: orml_currencies, + Swaps: zrml_swaps, + System: frame_system, + Timestamp: pallet_timestamp, + Tokens: orml_tokens, } ); @@ -113,27 +109,26 @@ impl frame_system::Config for Runtime { type AccountData = pallet_balances::AccountData; type AccountId = AccountIdTest; type BaseCallFilter = Everything; + type Block = MockBlock; type BlockHashCount = BlockHashCount; type BlockLength = (); - type BlockNumber = BlockNumber; type BlockWeights = (); type RuntimeCall = RuntimeCall; type DbWeight = (); type RuntimeEvent = RuntimeEvent; type Hash = Hash; type Hashing = BlakeTwo256; - type Header = Header; - type Index = Index; type Lookup = IdentityLookup; + type Nonce = u64; type MaxConsumers = frame_support::traits::ConstU32<16>; type OnKilledAccount = (); type OnNewAccount = (); - type OnSetCode = (); type RuntimeOrigin = RuntimeOrigin; type PalletInfo = PalletInfo; type SS58Prefix = (); type SystemWeightInfo = (); type Version = (); + type OnSetCode = (); } impl orml_currencies::Config for Runtime { @@ -196,8 +191,12 @@ impl pallet_balances::Config for Runtime { type AccountStore = System; type Balance = Balance; type DustRemoval = (); + type FreezeIdentifier = (); + type RuntimeHoldReason = (); type RuntimeEvent = RuntimeEvent; type ExistentialDeposit = ExistentialDeposit; + type MaxHolds = (); + type MaxFreezes = (); type MaxLocks = MaxLocks; type MaxReserves = MaxReserves; type ReserveIdentifier = [u8; 8]; @@ -232,7 +231,7 @@ impl Default for ExtBuilder { impl ExtBuilder { pub fn build(self) -> sp_io::TestExternalities { let mut storage = - frame_system::GenesisConfig::default().build_storage::().unwrap(); + frame_system::GenesisConfig::::default().build_storage().unwrap(); // see the logs in tests when using `RUST_LOG=debug cargo test -- --nocapture` let _ = env_logger::builder().is_test(true).try_init(); @@ -245,8 +244,10 @@ impl ExtBuilder { } } +type Block = MockBlock; + sp_api::mock_impl_runtime_apis! { - impl zrml_swaps_runtime_api::SwapsApi, PoolId, AccountIdTest, Balance, MarketId> + impl zrml_swaps_runtime_api::SwapsApi, PoolId, AccountIdTest, Balance, MarketId> for Runtime { fn get_spot_price( diff --git a/zrml/swaps/src/tests.rs b/zrml/swaps/src/tests.rs index b5e3e264e..ef05cb25f 100644 --- a/zrml/swaps/src/tests.rs +++ b/zrml/swaps/src/tests.rs @@ -24,6 +24,8 @@ #![cfg(all(feature = "mock", test))] #![allow(clippy::too_many_arguments)] +// TODO(#1328): Remove after rustc nightly-2024-04-22 +#![allow(clippy::duplicated_attributes)] use crate::{ events::{CommonPoolEventParams, PoolAssetEvent, PoolAssetsEvent, SwapEvent},