diff --git a/Cargo.lock b/Cargo.lock index 27af27b793e4d87e4a1e29e2b49b0379f73ebbca..bb540fd999861a3bd668308e4e5927e1250c64fc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -14,11 +14,11 @@ 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]] @@ -27,7 +27,7 @@ version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" dependencies = [ - "gimli 0.28.0", + "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" @@ -65,29 +46,6 @@ dependencies = [ "generic-array 0.14.7", ] -[[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 1.0.0", - "cipher 0.3.0", - "cpufeatures", - "opaque-debug 0.3.0", -] - [[package]] name = "aes" version = "0.8.3" @@ -99,52 +57,18 @@ dependencies = [ "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.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "831010a0f742e1209b3bcea8fab6a8e149051ba6099432c8cb2cc117dec3ead1" dependencies = [ - "aead 0.5.2", - "aes 0.8.3", + "aead", + "aes", "cipher 0.4.4", - "ctr 0.9.2", - "ghash 0.5.0", - "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", + "ctr", + "ghash", + "subtle 2.5.0", ] [[package]] @@ -153,19 +77,19 @@ version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a824f2aa7e75a0c98c5a504fceb80649e9c35265d44525b5f94de4771a395cd" dependencies = [ - "getrandom 0.2.11", + "getrandom 0.2.12", "once_cell", "version_check", ] [[package]] name = "ahash" -version = "0.8.6" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91429305e9f0a25f6205c5b8e0d2db09e0708a7a6df0f42212bb56c32c8ac97a" +checksum = "77c3a9648d43b9cd48db467b3f87fdd6e146bcc88ab0180006cef2179fe11d01" dependencies = [ "cfg-if 1.0.0", - "getrandom 0.2.11", + "getrandom 0.2.12", "once_cell", "version_check", "zerocopy", @@ -180,6 +104,12 @@ dependencies = [ "memchr", ] +[[package]] +name = "allocator-api2" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5" + [[package]] name = "android-tzdata" version = "0.1.1" @@ -206,9 +136,9 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.4" +version = "0.6.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ab91ebe16eb252986481c5b62f6098f3b698a45e34b5b98200cf20dd2484a44" +checksum = "6e2e1ebcb11de5c03c67de28a7df593d32191b44939c482e97702baaaa6ab6a5" dependencies = [ "anstyle", "anstyle-parse", @@ -220,43 +150,43 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.4" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7079075b41f533b8c61d2a4d073c4676e1f8b249ff94a393b0595db304e0dd87" +checksum = "2faccea4cc4ab4a667ce676a30e8ec13922a692c99bb8f5b11f1502c72e04220" [[package]] name = "anstyle-parse" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "317b9a89c1868f5ea6ff1d9539a69f45dffc21ce321ac1fd1160dfa48c8e2140" +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 = "3.0.1" +version = "3.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0699d10d2f4d628a98ee7b57b289abbc98ff3bad977cb3152709d4bf2330628" +checksum = "1cd54b81ec8d6180e24654d0b371ad22fc3dd083b6ff8ba325b72e00c87660a7" dependencies = [ "anstyle", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] name = "anyhow" -version = "1.0.75" +version = "1.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" +checksum = "080e9890a082662b09c1ad45f567faeeb47f22b5fb23895fbe1e651e718e25ca" [[package]] name = "approx" @@ -264,14 +194,309 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cab112f0a86d568ea0e627cc1d6be74a1e9cd55214684db5561995f6dad897c6" dependencies = [ - "num-traits 0.2.17", + "num-traits", ] [[package]] -name = "arc-swap" -version = "1.6.0" +name = "aquamarine" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21cc1548309245035eb18aa7f0967da6bc65587005170c56e6ef2788a4cf3f4e" +dependencies = [ + "include_dir", + "itertools 0.10.5", + "proc-macro-error", + "proc-macro2", + "quote", + "syn 2.0.48", +] + +[[package]] +name = "ark-bls12-377" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb00293ba84f51ce3bd026bd0de55899c4e68f0a39a5728cebae3a73ffdc0a4f" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-std", +] + +[[package]] +name = "ark-bls12-377-ext" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20c7021f180a0cbea0380eba97c2af3c57074cdaffe0eef7e840e1c9f2841e55" +dependencies = [ + "ark-bls12-377", + "ark-ec", + "ark-models-ext", + "ark-std", +] + +[[package]] +name = "ark-bls12-381" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c775f0d12169cba7aae4caeb547bb6a50781c7449a8aa53793827c9ec4abf488" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-serialize", + "ark-std", +] + +[[package]] +name = "ark-bls12-381-ext" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1dc4b3d08f19e8ec06e949712f95b8361e43f1391d94f65e4234df03480631c" +dependencies = [ + "ark-bls12-381", + "ark-ec", + "ark-ff", + "ark-models-ext", + "ark-serialize", + "ark-std", +] + +[[package]] +name = "ark-bw6-761" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e0605daf0cc5aa2034b78d008aaf159f56901d92a52ee4f6ecdfdac4f426700" +dependencies = [ + "ark-bls12-377", + "ark-ec", + "ark-ff", + "ark-std", +] + +[[package]] +name = "ark-bw6-761-ext" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccee5fba47266f460067588ee1bf070a9c760bf2050c1c509982c5719aadb4f2" +dependencies = [ + "ark-bw6-761", + "ark-ec", + "ark-ff", + "ark-models-ext", + "ark-std", +] + +[[package]] +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", + "rayon", + "zeroize", +] + +[[package]] +name = "ark-ed-on-bls12-377" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b10d901b9ac4b38f9c32beacedfadcdd64e46f8d7f8e88c1ae1060022cf6f6c6" +dependencies = [ + "ark-bls12-377", + "ark-ec", + "ark-ff", + "ark-std", +] + +[[package]] +name = "ark-ed-on-bls12-377-ext" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bddcadddf5e9015d310179a59bb28c4d4b9920ad0f11e8e14dbadf654890c9a6" +checksum = "524a4fb7540df2e1a8c2e67a83ba1d1e6c3947f4f9342cc2359fc2e789ad731d" +dependencies = [ + "ark-ec", + "ark-ed-on-bls12-377", + "ark-ff", + "ark-models-ext", + "ark-std", +] + +[[package]] +name = "ark-ed-on-bls12-381-bandersnatch" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9cde0f2aa063a2a5c28d39b47761aa102bda7c13c84fc118a61b87c7b2f785c" +dependencies = [ + "ark-bls12-381", + "ark-ec", + "ark-ff", + "ark-std", +] + +[[package]] +name = "ark-ed-on-bls12-381-bandersnatch-ext" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d15185f1acb49a07ff8cbe5f11a1adc5a93b19e211e325d826ae98e98e124346" +dependencies = [ + "ark-ec", + "ark-ed-on-bls12-381-bandersnatch", + "ark-ff", + "ark-models-ext", + "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", + "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-models-ext" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e9eab5d4b5ff2f228b763d38442adc9b084b0a465409b059fac5c2308835ec2" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-serialize", + "ark-std", + "derivative", +] + +[[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.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=e9782f9#e9782f938629c90f3adb3fff2358bc8d1386af3e" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-serialize", + "ark-std", + "ark-transcript", + "digest 0.10.7", + "getrandom_or_panic", + "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", + "rayon", +] + +[[package]] +name = "ark-transcript" +version = "0.0.2" +source = "git+https://github.com/w3f/ring-vrf?rev=e9782f9#e9782f938629c90f3adb3fff2358bc8d1386af3e" +dependencies = [ + "ark-ff", + "ark-serialize", + "ark-std", + "digest 0.10.7", + "rand_core 0.6.4", + "sha3", +] [[package]] name = "array-bytes" @@ -279,12 +504,27 @@ version = "4.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f52f63c5c1316a16a4b35eaac8b76a98248961a533f061684cb2a7cb0eafb6c6" +[[package]] +name = "array-bytes" +version = "6.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f840fb7195bcfc5e17ea40c26e5ce6d5b9ce5d584466e17703209657e459ae0" + [[package]] name = "arrayref" 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" @@ -303,50 +543,22 @@ version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eab1c04a571841102f5345a8fc0f6bb3d31c315dec879b5c6e42e40ce7ffa34e" -[[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 0.2.17", - "rusticata-macros", - "thiserror", - "time", -] - [[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 0.2.17", + "num-traits", "rusticata-macros", "thiserror", "time", ] -[[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", -] - [[package]] name = "asn1-rs-derive" version = "0.4.0" @@ -370,12 +582,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "asn1_der" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "155a5a185e42c6b77ac7b88a15143d930a9e9727a5b7b77eed417404ab15c247" - [[package]] name = "assert_matches" version = "1.5.0" @@ -394,43 +600,60 @@ dependencies = [ ] [[package]] -name = "async-io" -version = "1.13.0" +name = "async-channel" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fc5b45d93ef0529756f812ca52e44c221b35341892d3dcc34132ac02f3dd2af" +checksum = "1ca33f4bc4ed1babef42cad36cc1f51fa88be00420404e5b1e80ab1b18f7678c" dependencies = [ - "async-lock 2.8.0", - "autocfg", - "cfg-if 1.0.0", "concurrent-queue", - "futures-lite 1.13.0", - "log", - "parking", - "polling 2.8.0", - "rustix 0.37.27", + "event-listener 4.0.3", + "event-listener-strategy", + "futures-core", + "pin-project-lite 0.2.13", +] + +[[package]] +name = "async-executor" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17ae5ebefcc48e7452b4987947920dac9450be1110cadf34d1b8c116bdbaf97c" +dependencies = [ + "async-lock 3.3.0", + "async-task", + "concurrent-queue", + "fastrand", + "futures-lite", "slab", - "socket2 0.4.10", - "waker-fn", +] + +[[package]] +name = "async-fs" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd1f344136bad34df1f83a47f3fd7f2ab85d75cb8a940af4ccf6d482a84ea01b" +dependencies = [ + "async-lock 3.3.0", + "blocking", + "futures-lite", ] [[package]] name = "async-io" -version = "2.2.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41ed9d5715c2d329bf1b4da8d60455b99b187f27ba726df2883799af9af60997" +checksum = "8f97ab0c5b00a7cdbe5a371b9a782ee7be1316095885c8a4ea1daf490eb0ef65" dependencies = [ - "async-lock 3.1.1", + "async-lock 3.3.0", "cfg-if 1.0.0", "concurrent-queue", "futures-io", - "futures-lite 2.0.1", + "futures-lite", "parking", - "polling 3.3.0", - "rustix 0.38.25", + "polling", + "rustix 0.38.30", "slab", "tracing", - "waker-fn", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -444,35 +667,77 @@ dependencies = [ [[package]] name = "async-lock" -version = "3.1.1" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "655b9c7fe787d3b25cc0f804a1a8401790f0c5bc395beb5a64dc77d8de079105" +checksum = "d034b430882f8381900d3fe6f0aaa3ad94f2cb4ac519b429692a1bc2dda4ae7b" dependencies = [ - "event-listener 3.1.0", + "event-listener 4.0.3", "event-listener-strategy", "pin-project-lite 0.2.13", ] [[package]] -name = "async-recursion" -version = "1.0.5" +name = "async-net" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fd55a5ba1179988837d24ab4c7cc8ed6efdeff578ede0416b4225a5fca35bd0" +checksum = "b948000fad4873c1c9339d60f2623323a0cfd3816e5181033c6a5cb68b2accf7" dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.39", + "async-io", + "blocking", + "futures-lite", +] + +[[package]] +name = "async-process" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15c1cd5d253ecac3d3cf15e390fd96bd92a13b1d14497d81abf077304794fb04" +dependencies = [ + "async-channel 2.1.1", + "async-io", + "async-lock 3.3.0", + "async-signal", + "blocking", + "cfg-if 1.0.0", + "event-listener 4.0.3", + "futures-lite", + "rustix 0.38.30", + "windows-sys 0.52.0", +] + +[[package]] +name = "async-signal" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e47d90f65a225c4527103a8d747001fc56e375203592b25ad103e1ca13124c5" +dependencies = [ + "async-io", + "async-lock 2.8.0", + "atomic-waker", + "cfg-if 1.0.0", + "futures-core", + "futures-io", + "rustix 0.38.30", + "signal-hook-registry", + "slab", + "windows-sys 0.48.0", ] +[[package]] +name = "async-task" +version = "4.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbb36e985947064623dbd357f727af08ffd077f93d696782f3c56365fa2e2799" + [[package]] name = "async-trait" -version = "0.1.74" +version = "0.1.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a66537f1bb974b254c98ed142ff995236e81b9d0fe4db0575f46612cb15eb0f9" +checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] @@ -488,6 +753,12 @@ dependencies = [ "pin-project-lite 0.2.13", ] +[[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.2" @@ -522,22 +793,39 @@ dependencies = [ "cfg-if 1.0.0", "libc", "miniz_oxide", - "object 0.32.1", + "object 0.32.2", "rustc-demangle", ] +[[package]] +name = "bandersnatch_vrfs" +version = "0.0.4" +source = "git+https://github.com/w3f/ring-vrf?rev=e9782f9#e9782f938629c90f3adb3fff2358bc8d1386af3e" +dependencies = [ + "ark-bls12-381", + "ark-ec", + "ark-ed-on-bls12-381-bandersnatch", + "ark-ff", + "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", + "sp-ark-bls12-381", + "sp-ark-ed-on-bls12-381-bandersnatch", + "zeroize", +] + [[package]] name = "base-x" version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4cbbc9d0964165b47557570cce6c952866c2678457aca742aafc9fb771d30270" -[[package]] -name = "base16ct" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "349a06037c7bf932dd7e7d1f653678b2038b9ad46a74102f1fc7bd7872678cce" - [[package]] name = "base16ct" version = "0.2.0" @@ -558,9 +846,9 @@ checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] name = "base64" -version = "0.21.5" +version = "0.21.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" [[package]] name = "base64ct" @@ -586,6 +874,40 @@ dependencies = [ "serde", ] +[[package]] +name = "bindgen" +version = "0.65.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfdf7b466f9a4903edc73f95d6d2bcd5baf8ae620638762244d3f60143643cc5" +dependencies = [ + "bitflags 1.3.2", + "cexpr", + "clang-sys", + "lazy_static", + "lazycell", + "peeking_take_while", + "prettyplease 0.2.16", + "proc-macro2", + "quote", + "regex", + "rustc-hash", + "shlex", + "syn 2.0.48", +] + +[[package]] +name = "bip39" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93f2635620bf0b9d4576eb7bb9a38a55df78bd1205d26fa994b25911a69f212f" +dependencies = [ + "bitcoin_hashes", + "rand 0.8.5", + "rand_core 0.6.4", + "serde", + "unicode-normalization", +] + [[package]] name = "bit-set" version = "0.5.3" @@ -601,6 +923,12 @@ version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" +[[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" @@ -609,9 +937,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.4.1" +version = "2.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" +checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" [[package]] name = "bitvec" @@ -625,6 +953,18 @@ dependencies = [ "wyz", ] +[[package]] +name = "blake2" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94cb07b0da6a73955f8fb85d24c466778e70cda767a568229b104f0264089330" +dependencies = [ + "byte-tools", + "crypto-mac 0.7.0", + "digest 0.8.1", + "opaque-debug 0.2.3", +] + [[package]] name = "blake2" version = "0.10.6" @@ -634,6 +974,16 @@ 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.2" @@ -642,7 +992,7 @@ checksum = "23285ad32269793932e830392f2fe2f83e26488fd3ec778883a93c8323735780" dependencies = [ "arrayref", "arrayvec 0.7.4", - "constant_time_eq", + "constant_time_eq 0.3.0", ] [[package]] @@ -653,7 +1003,7 @@ checksum = "94230421e395b9920d23df13ea5d77a20e1725331f90fbbf6df6040b33f756ae" dependencies = [ "arrayref", "arrayvec 0.7.4", - "constant_time_eq", + "constant_time_eq 0.3.0", ] [[package]] @@ -666,7 +1016,7 @@ dependencies = [ "arrayvec 0.7.4", "cc", "cfg-if 1.0.0", - "constant_time_eq", + "constant_time_eq 0.3.0", ] [[package]] @@ -675,7 +1025,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", @@ -699,16 +1049,6 @@ dependencies = [ "generic-array 0.14.7", ] -[[package]] -name = "block-modes" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57a0e8073e8baa88212fb5823574c02ebccb395136ba9a164ab89379ec6072f0" -dependencies = [ - "block-padding 0.2.1", - "cipher 0.2.5", -] - [[package]] name = "block-padding" version = "0.1.5" @@ -719,10 +1059,20 @@ dependencies = [ ] [[package]] -name = "block-padding" -version = "0.2.1" +name = "blocking" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" +checksum = "6a37913e8dc4ddcc604f0c6d3bf2887c995153af3611de9e23c352b44c1b9118" +dependencies = [ + "async-channel 2.1.1", + "async-lock 3.3.0", + "async-task", + "fastrand", + "futures-io", + "futures-lite", + "piper", + "tracing", +] [[package]] name = "bounded-collections" @@ -753,9 +1103,9 @@ dependencies = [ [[package]] name = "bstr" -version = "1.8.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "542f33a8835a0884b006a0c3df3dadd99c0c3f296ed26c2fdc8028e01ad6230c" +checksum = "c48f0051a4b4c5e0b6d365cd04af53aeaa209e3cc15ec2cdb69e73cc87fbd0dc" dependencies = [ "memchr", "serde", @@ -796,9 +1146,9 @@ checksum = "e1e5f035d16fc623ae5f74981db80a439803888314e3a555fd6f04acd51a3205" [[package]] name = "bytemuck" -version = "1.14.0" +version = "1.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "374d28ec25809ee0e23827c2ab573d729e293f281dfe393500e7ad618baa61c6" +checksum = "ed2490600f404f2b94c167e31d3ed1d5f3c225a0f3b80230053b3e0b7b962bd9" [[package]] name = "byteorder" @@ -812,6 +1162,27 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" +[[package]] +name = "bzip2-sys" +version = "0.1.11+1.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "736a955f3fa7875102d57c82b8cac37ec45224a07fd32d58f9f7a186b6cd4cdc" +dependencies = [ + "cc", + "libc", + "pkg-config", +] + +[[package]] +name = "c2-chacha" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d27dae93fe7b1e0424dc57179ac396908c26b035a87234809f5c4dfd1b47dc80" +dependencies = [ + "cipher 0.2.5", + "ppv-lite86", +] + [[package]] name = "camino" version = "1.1.6" @@ -823,9 +1194,9 @@ dependencies = [ [[package]] name = "cargo-platform" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e34637b3140142bdf929fb439e8aa4ebad7651ebf7b1080b3930aa16ac1459ff" +checksum = "ceed8ef69d8518a5dda55c07425450b58a4e1946f4951eab6d7191ee86c2443d" dependencies = [ "serde", ] @@ -838,7 +1209,7 @@ checksum = "eee4243f1f26fc7a42710e7439c149e2b10b05472f88090acce52632f231a73a" dependencies = [ "camino", "cargo-platform", - "semver 1.0.20", + "semver 1.0.21", "serde", "serde_json", "thiserror", @@ -855,21 +1226,19 @@ dependencies = [ ] [[package]] -name = "ccm" -version = "0.3.0" +name = "cexpr" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aca1a8fbc20b50ac9673ff014abfb2b5f4085ee1a850d408f14a159c5853ac7" +checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" dependencies = [ - "aead 0.3.2", - "cipher 0.2.5", - "subtle", + "nom", ] [[package]] name = "cfg-expr" -version = "0.10.3" +version = "0.15.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0aacacf4d96c24b2ad6eb8ee6df040e4f27b0d0b39a5710c30091baa830485db" +checksum = "6100bc57b6209840798d95cb2775684849d332f7bd788db2a8c8caf7ef82a41a" dependencies = [ "smallvec", ] @@ -892,6 +1261,16 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" +[[package]] +name = "chacha" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddf3c081b5fba1e5615640aae998e0fbd10c24cbd897ee39ed754a77601a4862" +dependencies = [ + "byteorder", + "keystream", +] + [[package]] name = "chacha20" version = "0.9.1" @@ -909,7 +1288,7 @@ version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "10cd79432192d1c0f4e1a0fef9527696cc039165d729fb41b3f4f4f354c2dc35" dependencies = [ - "aead 0.5.2", + "aead", "chacha20", "cipher 0.4.4", "poly1305", @@ -918,16 +1297,16 @@ dependencies = [ [[package]] name = "chrono" -version = "0.4.31" +version = "0.4.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38" +checksum = "9f13690e35a5e4ace198e7beea2895d29f3a9cc55015fcebe6336bd2010af9eb" dependencies = [ "android-tzdata", "iana-time-zone", "js-sys", - "num-traits 0.2.17", + "num-traits", "wasm-bindgen", - "windows-targets 0.48.5", + "windows-targets 0.52.0", ] [[package]] @@ -941,13 +1320,13 @@ dependencies = [ [[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", ] @@ -961,15 +1340,6 @@ 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" @@ -981,6 +1351,17 @@ dependencies = [ "zeroize", ] +[[package]] +name = "clang-sys" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67523a3b4be3ce1989d607a828d036249522dd9c1c8de7f4dd2dae43a37369d1" +dependencies = [ + "glob", + "libc", + "libloading", +] + [[package]] name = "clap" version = "3.2.25" @@ -1000,9 +1381,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.4.11" +version = "4.4.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfaff671f6b22ca62406885ece523383b9b64022e341e53e009a62ebc47a45f2" +checksum = "1e578d6ec4194633722ccf9544794b71b1385c3c027efe0c55db226fc880865c" dependencies = [ "clap_builder", "clap_derive 4.4.7", @@ -1010,23 +1391,24 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.4.11" +version = "4.4.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a216b506622bb1d316cd51328dce24e07bdff4a6128a47c7e7fad11878d5adbb" +checksum = "4df4df40ec50c46000231c914968278b1eb05098cf8f1b3a518a95030e71d1c7" dependencies = [ "anstream", "anstyle", "clap_lex 0.6.0", "strsim", + "terminal_size", ] [[package]] name = "clap_complete" -version = "4.4.4" +version = "4.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bffe91f06a11b4b9420f62103854e90867812cd5d01557f853c5ee8e791b12ae" +checksum = "df631ae429f6613fcd3a7c1adbdb65f637271e561b03680adaa6573015dfb106" dependencies = [ - "clap 4.4.11", + "clap 4.4.18", ] [[package]] @@ -1051,7 +1433,7 @@ dependencies = [ "heck 0.4.1", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] @@ -1096,11 +1478,10 @@ checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" [[package]] name = "colored" -version = "2.0.4" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2674ec482fbc38012cf31e6c42ba0177b431a0cb6f15fe40efa5aab1bda516f6" +checksum = "cbf2150cce219b664a8a70df7a1f933836724b503f8a413af9365b4dcc4d90b8" dependencies = [ - "is-terminal", "lazy_static", "windows-sys 0.48.0", ] @@ -1120,15 +1501,37 @@ dependencies = [ [[package]] name = "comfy-table" -version = "6.2.0" +version = "7.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e959d788268e3bf9d35ace83e81b124190378e4c91c9067524675e33394b8ba" +checksum = "7c64043d6c7b7a4c58e39e7efccfdea7b93d885a795d0c054a69dbbf4dd52686" dependencies = [ - "strum", - "strum_macros", + "strum 0.25.0", + "strum_macros 0.25.3", "unicode-width", ] +[[package]] +name = "common" +version = "0.1.0" +source = "git+https://github.com/w3f/ring-proof#b273d33f9981e2bb3375ab45faeb537f7ee35224" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-poly", + "ark-serialize", + "ark-std", + "fflonk", + "getrandom_or_panic", + "merlin 3.0.0", + "rand_chacha 0.3.1", +] + +[[package]] +name = "common-path" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2382f75942f4b3be3690fe4f86365e9c853c1587d6ee58212cebf6e2a9ccd101" + [[package]] name = "common-runtime" version = "0.8.0-dev" @@ -1138,7 +1541,7 @@ dependencies = [ "frame-support", "frame-system", "frame-system-benchmarking", - "log", + "node-primitives", "pallet-authority-members", "pallet-babe", "pallet-balances", @@ -1152,6 +1555,7 @@ dependencies = [ "pallet-im-online", "pallet-membership", "pallet-multisig", + "pallet-offences", "pallet-oneshot-account", "pallet-preimage", "pallet-provide-randomness", @@ -1159,8 +1563,8 @@ dependencies = [ "pallet-quota", "pallet-scheduler", "pallet-session", - "pallet-session-benchmarking", "pallet-smith-members", + "pallet-sudo", "pallet-timestamp", "pallet-treasury", "pallet-universal-dividend", @@ -1169,47 +1573,70 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "serde_derive", "smallvec", "sp-arithmetic", "sp-consensus-babe", - "sp-consensus-grandpa", "sp-core", - "sp-distance", "sp-membership", "sp-runtime", "sp-staking", - "sp-std 5.0.0", + "sp-std 8.0.0", "sp-weights", ] [[package]] name = "concurrent-queue" -version = "2.3.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f057a694a54f12365049b0958a1685bb52d567f5593b355fbf685838e873d400" +checksum = "d16048cd947b08fa32c24458a22f5dc5e835264f689f4f5653210c69fd107363" dependencies = [ "crossbeam-utils", ] [[package]] name = "console" -version = "0.15.7" +version = "0.15.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c926e00cc70edefdc64d3a5ff31cc65bb97a3460097762bd23afb4d8145fccf8" +checksum = "0e1f83fc076bd6dd27517eacdf25fef6c4dfe5f1d7448bafaaf3a26f13b5e4eb" dependencies = [ "encode_unicode", "lazy_static", "libc", "unicode-width", - "windows-sys 0.45.0", + "windows-sys 0.52.0", ] [[package]] name = "const-oid" -version = "0.9.5" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" + +[[package]] +name = "const-random" +version = "0.1.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5aaf16c9c2c612020bcfd042e170f6e32de9b9d75adb5277cdbbd2e2c8c8299a" +dependencies = [ + "const-random-macro", +] + +[[package]] +name = "const-random-macro" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9d839f2a20b0aee515dc581a6172f2321f96cab76c1a38a4c584a194955390e" +dependencies = [ + "getrandom 0.2.12", + "once_cell", + "tiny-keccak", +] + +[[package]] +name = "constant_time_eq" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28c122c3980598d243d63d9a704629a2d748d101f278052ff068be5a4423ab6f" +checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" [[package]] name = "constant_time_eq" @@ -1217,6 +1644,18 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" +[[package]] +name = "constcat" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd7e35aee659887cbfb97aaf227ac12cad1a9d7c71e55ff3376839ed4e282d08" + +[[package]] +name = "convert_case" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" + [[package]] name = "convert_case" version = "0.6.0" @@ -1228,9 +1667,9 @@ dependencies = [ [[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", @@ -1238,9 +1677,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" @@ -1251,15 +1690,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "countmap" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ef2a403c4af585607826502480ab6e453f320c230ef67255eee21f0cc72c0a6" -dependencies = [ - "num-traits 0.1.43", -] - [[package]] name = "cpp_demangle" version = "0.3.5" @@ -1271,37 +1701,36 @@ dependencies = [ [[package]] name = "cpufeatures" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce420fe07aecd3e67c5f910618fe65e94158f6dcc0adf44e00d69ce2bdfe0fd0" +checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" dependencies = [ "libc", ] [[package]] name = "cranelift-bforest" -version = "0.93.2" +version = "0.95.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bc42ba2e232e5b20ff7dc299a812d53337dadce9a7e39a238e6a5cb82d2e57b" +checksum = "1277fbfa94bc82c8ec4af2ded3e639d49ca5f7f3c7eeab2c66accd135ece4e70" dependencies = [ "cranelift-entity", ] [[package]] name = "cranelift-codegen" -version = "0.93.2" +version = "0.95.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "253531aca9b6f56103c9420369db3263e784df39aa1c90685a1f69cfbba0623e" +checksum = "c6e8c31ad3b2270e9aeec38723888fe1b0ace3bea2b06b3f749ccf46661d3220" dependencies = [ - "arrayvec 0.7.4", "bumpalo", "cranelift-bforest", "cranelift-codegen-meta", "cranelift-codegen-shared", "cranelift-entity", "cranelift-isle", - "gimli 0.26.2", - "hashbrown 0.12.3", + "gimli 0.27.3", + "hashbrown 0.13.2", "log", "regalloc2", "smallvec", @@ -1310,33 +1739,33 @@ dependencies = [ [[package]] name = "cranelift-codegen-meta" -version = "0.93.2" +version = "0.95.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72f2154365e2bff1b1b8537a7181591fdff50d8e27fa6e40d5c69c3bad0ca7c8" +checksum = "c8ac5ac30d62b2d66f12651f6b606dbdfd9c2cfd0908de6b387560a277c5c9da" dependencies = [ "cranelift-codegen-shared", ] [[package]] name = "cranelift-codegen-shared" -version = "0.93.2" +version = "0.95.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "687e14e3f5775248930e0d5a84195abef8b829958e9794bf8d525104993612b4" +checksum = "dd82b8b376247834b59ed9bdc0ddeb50f517452827d4a11bccf5937b213748b8" [[package]] name = "cranelift-entity" -version = "0.93.2" +version = "0.95.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f42ea692c7b450ad18b8c9889661505d51c09ec4380cf1c2d278dbb2da22cae1" +checksum = "40099d38061b37e505e63f89bab52199037a72b931ad4868d9089ff7268660b0" dependencies = [ "serde", ] [[package]] name = "cranelift-frontend" -version = "0.93.2" +version = "0.95.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8483c2db6f45fe9ace984e5adc5d058102227e4c62e5aa2054e16b0275fd3a6e" +checksum = "64a25d9d0a0ae3079c463c34115ec59507b4707175454f0eee0891e83e30e82d" dependencies = [ "cranelift-codegen", "log", @@ -1346,15 +1775,15 @@ dependencies = [ [[package]] name = "cranelift-isle" -version = "0.93.2" +version = "0.95.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9793158837678902446c411741d87b43f57dadfb944f2440db4287cda8cbd59" +checksum = "80de6a7d0486e4acbd5f9f87ec49912bf4c8fb6aea00087b989685460d4469ba" [[package]] name = "cranelift-native" -version = "0.93.2" +version = "0.95.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72668c7755f2b880665cb422c8ad2d56db58a88b9bebfef0b73edc2277c13c49" +checksum = "bb6b03e0e03801c4b3fd8ce0758a94750c07a44e7944cc0ffbf0d3f2e7c79b00" dependencies = [ "cranelift-codegen", "libc", @@ -1363,35 +1792,20 @@ dependencies = [ [[package]] name = "cranelift-wasm" -version = "0.93.2" +version = "0.95.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3852ce4b088b44ac4e29459573943009a70d1b192c8d77ef949b4e814f656fc1" +checksum = "ff3220489a3d928ad91e59dd7aeaa8b3de18afb554a6211213673a71c90737ac" dependencies = [ "cranelift-codegen", "cranelift-entity", "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.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5" - [[package]] name = "crc32fast" version = "1.3.2" @@ -1403,54 +1817,43 @@ dependencies = [ [[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 1.0.0", "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 1.0.0", "crossbeam-utils", - "memoffset 0.9.0", - "scopeguard", ] [[package]] -name = "crossbeam-utils" -version = "0.8.17" +name = "crossbeam-queue" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06d96137f14f244c37f989d9fff8f95e6c18b918e71f36638f8c49112e4c78f" +checksum = "df0346b5d5e76ac2fe4e327c5fd1118d6be7c51dfb18f9b7922923f287471e35" dependencies = [ - "cfg-if 1.0.0", + "crossbeam-utils", ] [[package]] -name = "crunchy" -version = "0.2.2" +name = "crossbeam-utils" +version = "0.8.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" +checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" [[package]] -name = "crypto-bigint" -version = "0.4.9" +name = "crunchy" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef2b4b23cddf68b89b8f8069890e8c270d54e2d5fe1b143820234805e4cb17ef" -dependencies = [ - "generic-array 0.14.7", - "rand_core 0.6.4", - "subtle", - "zeroize", -] +checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" [[package]] name = "crypto-bigint" @@ -1460,7 +1863,7 @@ checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" dependencies = [ "generic-array 0.14.7", "rand_core 0.6.4", - "subtle", + "subtle 2.5.0", "zeroize", ] @@ -1475,6 +1878,16 @@ dependencies = [ "typenum", ] +[[package]] +name = "crypto-mac" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4434400df11d95d556bac068ddfedd482915eb18fe8bea89bc80b6e4b1c179e5" +dependencies = [ + "generic-array 0.12.4", + "subtle 1.0.0", +] + [[package]] name = "crypto-mac" version = "0.8.0" @@ -1482,17 +1895,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" dependencies = [ "generic-array 0.14.7", - "subtle", + "subtle 2.5.0", ] [[package]] name = "crypto-mac" -version = "0.11.1" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1d1a86f49236c215f271d40892d5fc950490551400b02ef360692c29815c714" +checksum = "25fab6889090c8133f3deb8f73ba3c65a7f456f66436fc012a1b1e272b1e103e" dependencies = [ "generic-array 0.14.7", - "subtle", + "subtle 2.5.0", ] [[package]] @@ -1505,15 +1918,6 @@ dependencies = [ "syn 1.0.109", ] -[[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" @@ -1525,12 +1929,12 @@ dependencies = [ [[package]] name = "ctrlc" -version = "3.4.1" +version = "3.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82e95fbd621905b854affdc67943b043a0fbb6ed7385fd5a25650d19a8a6cfdf" +checksum = "b467862cc8610ca6fc9a1532d7777cee0804e678ab45410897b9396495994a0b" dependencies = [ "nix 0.27.1", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -1547,11 +1951,11 @@ dependencies = [ "cucumber-expressions", "derive_more", "either", - "futures 0.3.29", + "futures 0.3.30", "gherkin", "globwalk", "inventory", - "itertools", + "itertools 0.10.5", "linked-hash-map", "once_cell", "regex", @@ -1566,7 +1970,7 @@ checksum = "57569af2742cb38e213e8cc686fffc76e0ee4119cad3a122753c27107dc26e58" dependencies = [ "cucumber-expressions", "inflections", - "itertools", + "itertools 0.10.5", "proc-macro2", "quote", "regex", @@ -1596,7 +2000,7 @@ dependencies = [ "byteorder", "digest 0.8.1", "rand_core 0.5.1", - "subtle", + "subtle 2.5.0", "zeroize", ] @@ -1609,7 +2013,7 @@ dependencies = [ "byteorder", "digest 0.9.0", "rand_core 0.5.1", - "subtle", + "subtle 2.5.0", "zeroize", ] @@ -1624,9 +2028,9 @@ dependencies = [ "curve25519-dalek-derive", "digest 0.10.7", "fiat-crypto", - "platforms 3.2.0", + "platforms", "rustc_version", - "subtle", + "subtle 2.5.0", "zeroize", ] @@ -1638,14 +2042,14 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] name = "cxx" -version = "1.0.110" +version = "1.0.115" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7129e341034ecb940c9072817cd9007974ea696844fc4dd582dc1653a7fbe2e8" +checksum = "8de00f15a6fa069c99b88c5c78c4541d0e7899a33b86f7480e23df2431fce0bc" dependencies = [ "cc", "cxxbridge-flags", @@ -1655,9 +2059,9 @@ dependencies = [ [[package]] name = "cxx-build" -version = "1.0.110" +version = "1.0.115" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2a24f3f5f8eed71936f21e570436f024f5c2e25628f7496aa7ccd03b90109d5" +checksum = "0a71e1e631fa2f2f5f92e8b0d860a00c198c6771623a6cefcc863e3554f0d8d6" dependencies = [ "cc", "codespan-reporting", @@ -1665,24 +2069,24 @@ dependencies = [ "proc-macro2", "quote", "scratch", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] name = "cxxbridge-flags" -version = "1.0.110" +version = "1.0.115" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06fdd177fc61050d63f67f5bd6351fac6ab5526694ea8e359cd9cd3b75857f44" +checksum = "6f3fed61d56ba497c4efef9144dfdbaa25aa58f2f6b3a7cf441d4591c583745c" [[package]] name = "cxxbridge-macro" -version = "1.0.110" +version = "1.0.115" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "587663dd5fb3d10932c8aecfe7c844db1bcf0aee93eeab08fac13dc1212c2e7f" +checksum = "8908e380a8efd42150c017b0cfa31509fc49b6d47f7cb6b33e93ffb8f4e3661e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] @@ -1691,8 +2095,18 @@ version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7b750cb3417fd1b327431a470f388520309479ab0bf5e323505daf0290cd3850" dependencies = [ - "darling_core", - "darling_macro", + "darling_core 0.14.4", + "darling_macro 0.14.4", +] + +[[package]] +name = "darling" +version = "0.20.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da01daa5f6d41c91358398e8db4dde38e292378da1f28300b59ef4732b879454" +dependencies = [ + "darling_core 0.20.4", + "darling_macro 0.20.4", ] [[package]] @@ -1709,17 +2123,42 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "darling_core" +version = "0.20.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f44f6238b948a3c6c3073cdf53bb0c2d5e024ee27e0f35bfe9d556a12395808a" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn 2.0.48", +] + [[package]] name = "darling_macro" version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4aab4dbc9f7611d8b55048a3a16d2d010c2c8334e46304b40ac1cc14bf3b48e" dependencies = [ - "darling_core", + "darling_core 0.14.4", "quote", "syn 1.0.109", ] +[[package]] +name = "darling_macro" +version = "0.20.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d2d88bd93979b1feb760a6b5c531ac5ba06bd63e74894c377af02faee07b9cd" +dependencies = [ + "darling_core 0.20.4", + "quote", + "syn 2.0.48", +] + [[package]] name = "data-encoding" version = "2.5.0" @@ -1763,17 +2202,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "der" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1a467a65c5e759bce6e65eaf91cc29f466cdc57cb65777bd646872a8a1fd4de" -dependencies = [ - "const-oid", - "pem-rfc7468", - "zeroize", -] - [[package]] name = "der" version = "0.7.8" @@ -1786,30 +2214,25 @@ dependencies = [ [[package]] name = "der-parser" -version = "7.0.0" +version = "8.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe398ac75057914d7d07307bf67dc7f3f574a26783b4fc7805a20ffa9f506e82" +checksum = "dbd676fbbab537128ef0278adb5576cf363cff6aa22a7b24effe97347cfab61e" dependencies = [ - "asn1-rs 0.3.1", + "asn1-rs", "displaydoc", "nom", "num-bigint", - "num-traits 0.2.17", + "num-traits", "rusticata-macros", ] [[package]] -name = "der-parser" -version = "8.2.0" +name = "deranged" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbd676fbbab537128ef0278adb5576cf363cff6aa22a7b24effe97347cfab61e" +checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" dependencies = [ - "asn1-rs 0.5.2", - "displaydoc", - "nom", - "num-bigint", - "num-traits 0.2.17", - "rusticata-macros", + "powerfmt", ] [[package]] @@ -1834,45 +2257,16 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "derive_builder" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d07adf7be193b71cc36b193d0f5fe60b918a3a9db4dad0449f57bcfd519704a3" -dependencies = [ - "derive_builder_macro", -] - -[[package]] -name = "derive_builder_core" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f91d4cfa921f1c05904dc3c57b4a32c38aed3340cce209f3a6fd1478babafc4" -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", -] - [[package]] name = "derive_more" version = "0.99.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" dependencies = [ + "convert_case 0.4.0", "proc-macro2", "quote", + "rustc_version", "syn 1.0.109", ] @@ -1909,14 +2303,14 @@ dependencies = [ "block-buffer 0.10.4", "const-oid", "crypto-common", - "subtle", + "subtle 2.5.0", ] [[package]] name = "directories" -version = "4.0.1" +version = "5.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f51c5d4ddabd36886dd3e1438cb358cdcb0d7c499cb99cb4ac2e38e18b5cb210" +checksum = "9a49173b84e034382284f27f1af4dcbbd231ffa358c0fe316541a7337f376a35" dependencies = [ "dirs-sys", ] @@ -1933,13 +2327,14 @@ dependencies = [ [[package]] name = "dirs-sys" -version = "0.3.7" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6" +checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" dependencies = [ "libc", + "option-ext", "redox_users", - "winapi 0.3.9", + "windows-sys 0.48.0", ] [[package]] @@ -1961,7 +2356,7 @@ checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] @@ -1969,12 +2364,13 @@ name = "distance-oracle" version = "0.1.0" dependencies = [ "bincode", - "clap 4.4.11", + "clap 4.4.18", "dubp-wot", "flate2", "fnv", + "hex", "log", - "num-traits 0.2.17", + "num-traits", "parity-scale-codec", "rayon", "simple_logger", @@ -1987,6 +2383,49 @@ dependencies = [ "tokio", ] +[[package]] +name = "dleq_vrf" +version = "0.0.2" +source = "git+https://github.com/w3f/ring-vrf?rev=e9782f9#e9782f938629c90f3adb3fff2358bc8d1386af3e" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-scale", + "ark-secret-scalar", + "ark-serialize", + "ark-std", + "ark-transcript", + "arrayvec 0.7.4", + "zeroize", +] + +[[package]] +name = "docify" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cc4fd38aaa9fb98ac70794c82a00360d1e165a87fbf96a8a91f9dfc602aaee2" +dependencies = [ + "docify_macros", +] + +[[package]] +name = "docify_macros" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63fa215f3a0d40fb2a221b3aa90d8e1fbb8379785a990cb60d62ac71ebdc6460" +dependencies = [ + "common-path", + "derive-syn-parse", + "once_cell", + "proc-macro2", + "quote", + "regex", + "syn 2.0.48", + "termcolor", + "toml 0.8.8", + "walkdir", +] + [[package]] name = "downcast" version = "0.11.0" @@ -2022,9 +2461,9 @@ dependencies = [ name = "duniter" version = "0.7.1" dependencies = [ - "async-io 1.13.0", + "async-io", "bs58 0.5.0", - "clap 4.4.11", + "clap 4.4.18", "clap_complete", "common-runtime", "dc-distance", @@ -2033,16 +2472,16 @@ dependencies = [ "frame-benchmarking", "frame-benchmarking-cli", "frame-system", - "futures 0.3.29", + "futures 0.3.30", "g1-runtime", "gdev-runtime", "gtest-runtime", "hex", - "jsonrpsee", + "jsonrpsee 0.16.3", "lazy_static", "log", "maplit", - "memmap2", + "memmap2 0.9.4", "num-format", "pallet-certification", "pallet-grandpa", @@ -2067,6 +2506,7 @@ dependencies = [ "sc-keystore", "sc-network", "sc-network-common", + "sc-offchain", "sc-rpc-api", "sc-service", "sc-telemetry", @@ -2092,7 +2532,7 @@ dependencies = [ "sp-offchain", "sp-runtime", "sp-session", - "sp-storage", + "sp-storage 13.0.0", "sp-timestamp", "sp-transaction-pool", "sp-transaction-storage-proof", @@ -2119,21 +2559,9 @@ dependencies = [ "parity-scale-codec", "portpicker", "serde_json", - "sp-keyring", - "sp-runtime", - "subxt", - "tokio", -] - -[[package]] -name = "duniter-live-tests" -version = "3.0.0" -dependencies = [ - "anyhow", - "countmap", - "hex-literal", - "parity-scale-codec", "sp-core", + "sp-core-hashing", + "sp-keyring", "sp-runtime", "subxt", "tokio", @@ -2147,7 +2575,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-runtime", - "sp-std 5.0.0", + "sp-std 8.0.0", ] [[package]] @@ -2177,39 +2605,18 @@ version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "545b22097d44f8a9581187cdf93de7a71e4722bf51200cfaba810865b49a495d" -[[package]] -name = "ecdsa" -version = "0.14.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "413301934810f597c1d19ca71c8710e99a3f1ba28a0d2ebc01551a2daeea3c5c" -dependencies = [ - "der 0.6.1", - "elliptic-curve 0.12.3", - "rfc6979 0.3.1", - "signature 1.6.4", -] - [[package]] name = "ecdsa" version = "0.16.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" dependencies = [ - "der 0.7.8", + "der", "digest 0.10.7", - "elliptic-curve 0.13.8", - "rfc6979 0.4.0", - "signature 2.2.0", - "spki 0.7.2", -] - -[[package]] -name = "ed25519" -version = "1.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91cff35c70bba8a626e3185d8cd48cc11b5437e1a5bcd15b9b5fa3c64b6dfee7" -dependencies = [ - "signature 1.6.4", + "elliptic-curve", + "rfc6979", + "signature", + "spki", ] [[package]] @@ -2218,22 +2625,8 @@ version = "2.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53" dependencies = [ - "pkcs8 0.10.2", - "signature 2.2.0", -] - -[[package]] -name = "ed25519-dalek" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c762bae6dcaf24c4c84667b8579785430908723d5c889f469d76a41d59cc7a9d" -dependencies = [ - "curve25519-dalek 3.2.0", - "ed25519 1.5.3", - "rand 0.7.3", - "serde", - "sha2 0.9.9", - "zeroize", + "pkcs8", + "signature", ] [[package]] @@ -2243,11 +2636,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1f628eaec48bfd21b865dc2950cfa014450c01d2fa2b69a86c2fd5844ec523c0" dependencies = [ "curve25519-dalek 4.1.1", - "ed25519 2.2.3", + "ed25519", "rand_core 0.6.4", "serde", "sha2 0.10.8", - "subtle", + "subtle 2.5.0", "zeroize", ] @@ -2266,49 +2659,42 @@ dependencies = [ ] [[package]] -name = "either" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" - -[[package]] -name = "elliptic-curve" -version = "0.12.3" +name = "ed25519-zebra" +version = "4.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7bb888ab5300a19b8e5bceef25ac745ad065f3c9f7efc6de1b91958110891d3" +checksum = "7d9ce6874da5d4415896cd45ffbc4d1cfc0c4f9c079427bd870742c30f2f65a9" dependencies = [ - "base16ct 0.1.1", - "crypto-bigint 0.4.9", - "der 0.6.1", - "digest 0.10.7", - "ff 0.12.1", - "generic-array 0.14.7", - "group 0.12.1", - "hkdf", - "pem-rfc7468", - "pkcs8 0.9.0", + "curve25519-dalek 4.1.1", + "ed25519", + "hashbrown 0.14.3", + "hex", "rand_core 0.6.4", - "sec1 0.3.0", - "subtle", + "sha2 0.10.8", "zeroize", ] +[[package]] +name = "either" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" + [[package]] name = "elliptic-curve" version = "0.13.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" dependencies = [ - "base16ct 0.2.0", - "crypto-bigint 0.5.5", + "base16ct", + "crypto-bigint", "digest 0.10.7", - "ff 0.13.0", + "ff", "generic-array 0.14.7", - "group 0.13.0", - "pkcs8 0.10.2", + "group", + "pkcs8", "rand_core 0.6.4", - "sec1 0.7.3", - "subtle", + "sec1", + "subtle 2.5.0", "zeroize", ] @@ -2354,9 +2740,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", @@ -2389,12 +2775,12 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.7" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f258a7194e7f7c2a7837a8913aeab7fd8c383457034fa20ce4dd3dcb813e8eb8" +checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" dependencies = [ "libc", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -2405,9 +2791,9 @@ checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" [[package]] name = "event-listener" -version = "3.1.0" +version = "4.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d93877bcde0eb80ca09131a08d23f0a5c18a620b01db137dba666d18cd9b30c2" +checksum = "67b215c49b2b248c855fb73579eb1f4f26c38ffdc12973e20e07b91d78d5646e" dependencies = [ "concurrent-queue", "parking", @@ -2416,11 +2802,11 @@ dependencies = [ [[package]] name = "event-listener-strategy" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d96b852f1345da36d551b9473fa1e2b1eb5c5195585c6c018118bc92a8d91160" +checksum = "958e4d70b6d5e81971bebec42271ec641e7ff4e170a6fa605f2b8a8b65cb97d3" dependencies = [ - "event-listener 3.1.0", + "event-listener 4.0.3", "pin-project-lite 0.2.13", ] @@ -2430,20 +2816,20 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e43f2f1833d64e33f15592464d6fdd70f349dda7b1a53088eb83cd94014008c5" dependencies = [ - "futures 0.3.29", + "futures 0.3.30", ] [[package]] name = "expander" -version = "1.0.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f360349150728553f92e4c997a16af8915f418d3a0f21b440d34c5632f16ed84" +checksum = "5f86a749cf851891866c10515ef6c299b5c69661465e9c3bbe7e07a2b77fb0f7" dependencies = [ - "blake2", + "blake2 0.10.6", "fs-err", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.48", ] [[package]] @@ -2490,15 +2876,6 @@ dependencies = [ "regex", ] -[[package]] -name = "fastrand" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" -dependencies = [ - "instant", -] - [[package]] name = "fastrand" version = "2.0.1" @@ -2507,31 +2884,35 @@ checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" [[package]] name = "fdlimit" -version = "0.2.1" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c4c9e43643f5a3be4ca5b67d26b98031ff9db6806c3440ae32e02e3ceac3f1b" +checksum = "e182f7dbc2ef73d9ef67351c5fbbea084729c48362d3ce9dd44c28e32e277fe5" dependencies = [ "libc", + "thiserror", ] [[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", + "subtle 2.5.0", ] [[package]] -name = "ff" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" +name = "fflonk" +version = "0.1.0" +source = "git+https://github.com/w3f/fflonk#1e854f35e9a65d08b11a86291405cdc95baa0a35" dependencies = [ - "rand_core 0.6.4", - "subtle", + "ark-ec", + "ark-ff", + "ark-poly", + "ark-serialize", + "ark-std", + "merlin 3.0.0", ] [[package]] @@ -2546,20 +2927,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.22" +version = "0.2.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4029edd3e734da6fe05b6cd7bd2960760a616bd2ddd0d59a0124746d6272af0" +checksum = "1ee447700ac8aa0b2f2bd7bc4462ad686ba06baa6727ac149a2d6277f0d240fd" dependencies = [ "cfg-if 1.0.0", "libc", - "redox_syscall 0.3.5", - "windows-sys 0.48.0", + "redox_syscall 0.4.1", + "windows-sys 0.52.0", ] [[package]] @@ -2569,10 +2950,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "36530797b9bf31cd4ff126dcfee8170f86b00cfdcea3269d73133cc0415945c3" dependencies = [ "either", - "futures 0.3.29", + "futures 0.3.30", "futures-timer", "log", - "num-traits 0.2.17", + "num-traits", "parity-scale-codec", "parking_lot 0.12.1", "scale-info", @@ -2613,7 +2994,7 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "98de4bbd547a563b716d8dfa9aad1cb19bfab00f4fa09a6a4ed21dbcf44ce9c4" dependencies = [ - "num-traits 0.2.17", + "num-traits", ] [[package]] @@ -2640,16 +3021,16 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "fork-tree" version = "3.0.0" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" 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", ] @@ -2663,7 +3044,7 @@ checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" [[package]] name = "frame-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ "frame-support", "frame-support-procedural", @@ -2679,28 +3060,28 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-runtime-interface", - "sp-std 5.0.0", - "sp-storage", + "sp-runtime-interface 17.0.0", + "sp-std 8.0.0", + "sp-storage 13.0.0", "static_assertions", ] [[package]] name = "frame-benchmarking-cli" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ "Inflector", - "array-bytes", + "array-bytes 6.2.2", "chrono", - "clap 4.4.11", + "clap 4.4.18", "comfy-table", "frame-benchmarking", "frame-support", "frame-system", "gethostname", "handlebars", - "itertools", + "itertools 0.10.5", "lazy_static", "linked-hash-map", "log", @@ -2720,14 +3101,15 @@ dependencies = [ "sp-blockchain", "sp-core", "sp-database", - "sp-externalities", + "sp-externalities 0.19.0", "sp-inherents", + "sp-io", "sp-keystore", "sp-runtime", "sp-state-machine", - "sp-std 5.0.0", - "sp-storage", + "sp-storage 13.0.0", "sp-trie", + "sp-wasm-interface 14.0.0", "thiserror", "thousands", ] @@ -2735,18 +3117,19 @@ dependencies = [ [[package]] name = "frame-executive" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ "frame-support", "frame-system", "frame-try-runtime", + "log", "parity-scale-codec", "scale-info", "sp-core", "sp-io", "sp-runtime", - "sp-std 5.0.0", - "sp-tracing", + "sp-std 8.0.0", + "sp-tracing 10.0.0", ] [[package]] @@ -2754,6 +3137,17 @@ name = "frame-metadata" version = "15.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "878babb0b136e731cc77ec2fd883ff02745ff21e6fb662729953d44923df009c" +dependencies = [ + "cfg-if 1.0.0", + "parity-scale-codec", + "scale-info", +] + +[[package]] +name = "frame-metadata" +version = "16.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87cf1549fba25a6fcac22785b61698317d958e96cac72a59102ea45b9ae64692" dependencies = [ "cfg-if 1.0.0", "parity-scale-codec", @@ -2764,97 +3158,113 @@ dependencies = [ [[package]] name = "frame-remote-externalities" version = "0.10.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ - "async-recursion", - "futures 0.3.29", - "jsonrpsee", + "futures 0.3.30", + "indicatif", + "jsonrpsee 0.16.3", "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/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ + "aquamarine", + "array-bytes 6.2.2", "bitflags 1.3.2", + "docify", "environmental", - "frame-metadata", + "frame-metadata 16.0.0", "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-core", "sp-core-hashing-proc-macro", + "sp-debug-derive 8.0.0", + "sp-genesis-builder", "sp-inherents", "sp-io", + "sp-metadata-ir", "sp-runtime", "sp-staking", "sp-state-machine", - "sp-std 5.0.0", - "sp-tracing", + "sp-std 8.0.0", + "sp-tracing 10.0.0", "sp-weights", + "static_assertions", "tt-call", ] [[package]] name = "frame-support-procedural" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ "Inflector", "cfg-expr", "derive-syn-parse", + "expander", "frame-support-procedural-tools", - "itertools", + "itertools 0.10.5", + "macro_magic", "proc-macro-warning", "proc-macro2", "quote", - "syn 2.0.39", + "sp-core-hashing", + "syn 2.0.48", ] [[package]] name = "frame-support-procedural-tools" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ "frame-support-procedural-tools-derive", - "proc-macro-crate", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] name = "frame-system" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ + "cfg-if 1.0.0", + "docify", "frame-support", "log", "parity-scale-codec", @@ -2863,7 +3273,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 5.0.0", + "sp-std 8.0.0", "sp-version", "sp-weights", ] @@ -2871,7 +3281,7 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ "frame-benchmarking", "frame-support", @@ -2880,13 +3290,13 @@ dependencies = [ "scale-info", "sp-core", "sp-runtime", - "sp-std 5.0.0", + "sp-std 8.0.0", ] [[package]] name = "frame-system-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ "parity-scale-codec", "sp-api", @@ -2895,13 +3305,13 @@ dependencies = [ [[package]] name = "frame-try-runtime" version = "0.10.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ "frame-support", "parity-scale-codec", "sp-api", "sp-runtime", - "sp-std 5.0.0", + "sp-std 8.0.0", ] [[package]] @@ -2923,16 +3333,6 @@ dependencies = [ "winapi 0.3.9", ] -[[package]] -name = "fs4" -version = "0.6.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2eeb4ed9e12f43b7fa0baae3f9cdda28352770132ef2e09a23760c29cae8bd47" -dependencies = [ - "rustix 0.38.25", - "windows-sys 0.48.0", -] - [[package]] name = "fsevent" version = "0.4.0" @@ -2992,9 +3392,9 @@ checksum = "3a471a38ef8ed83cd6e40aa59c1ffe17db6855c18e3604d9c4ed8c08ebc28678" [[package]] name = "futures" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da0290714b38af9b4a7b094b8a37086d1b4e61f2df9122c3cad2577669145335" +checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" dependencies = [ "futures-channel", "futures-core", @@ -3007,9 +3407,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff4dd66668b557604244583e3e1e1eada8c5c2e96a6d0d6653ede395b78bbacb" +checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" dependencies = [ "futures-core", "futures-sink", @@ -3017,15 +3417,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb1d22c66e66d9d72e1758f0bd7d4fd0bee04cad842ee34587d68c07e45d088c" +checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" [[package]] name = "futures-executor" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f4fb8693db0cf099eadcca0efe2a5a22e4550f98ed16aba6c48700da29597bc" +checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" dependencies = [ "futures-core", "futures-task", @@ -3035,44 +3435,32 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bf34a163b5c4c52d0478a4d757da8fb65cabef42ba90515efee0f6f9fa45aaa" +checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" [[package]] name = "futures-lite" -version = "1.13.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49a9d51ce47660b1e808d3c990b4709f2f415d928835a17dfd16991515c46bce" +checksum = "445ba825b27408685aaecefd65178908c36c6e96aaf6d8599419d46e624192ba" dependencies = [ - "fastrand 1.9.0", + "fastrand", "futures-core", "futures-io", - "memchr", "parking", "pin-project-lite 0.2.13", - "waker-fn", -] - -[[package]] -name = "futures-lite" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3831c2651acb5177cbd83943f3d9c8912c5ad03c76afcc0e9511ba568ec5ebb" -dependencies = [ - "futures-core", - "pin-project-lite 0.2.13", ] [[package]] name = "futures-macro" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53b153fd91e4b0147f4aced87be237c98248656bb01050b96bf3ee89220a8ddb" +checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] @@ -3083,20 +3471,20 @@ checksum = "d2411eed028cdf8c8034eaf21f9915f956b6c3abec4d4c7949ee67f0721127bd" dependencies = [ "futures-io", "rustls 0.20.9", - "webpki 0.22.4", + "webpki", ] [[package]] name = "futures-sink" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e36d3378ee38c2a36ad710c5d30c2911d752cb941c00c72dbabfb786a7970817" +checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" [[package]] name = "futures-task" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efd193069b0ddadc69c46389b740bbccdd97203899b48d09c5f7969591d6bae2" +checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" [[package]] name = "futures-timer" @@ -3106,9 +3494,9 @@ checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c" [[package]] name = "futures-util" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a19526d624e703a3179b3d322efec918b6246ea0fa51d41124525f00f1cc8104" +checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" dependencies = [ "futures 0.1.31", "futures-channel", @@ -3146,6 +3534,7 @@ dependencies = [ "frame-try-runtime", "hex-literal", "log", + "node-primitives", "pallet-atomic-swap", "pallet-authority-discovery", "pallet-authority-members", @@ -3184,20 +3573,23 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", + "serde_derive", "sp-api", "sp-arithmetic", "sp-authority-discovery", "sp-block-builder", "sp-consensus-babe", + "sp-consensus-grandpa", "sp-core", + "sp-distance", "sp-inherents", - "sp-io", "sp-keyring", "sp-membership", "sp-offchain", "sp-runtime", "sp-session", - "sp-std 5.0.0", + "sp-staking", + "sp-std 8.0.0", "sp-transaction-pool", "sp-version", "substrate-wasm-builder", @@ -3217,6 +3609,7 @@ dependencies = [ "frame-try-runtime", "hex-literal", "log", + "node-primitives", "pallet-atomic-swap", "pallet-authority-discovery", "pallet-authority-members", @@ -3272,7 +3665,7 @@ dependencies = [ "sp-runtime", "sp-session", "sp-staking", - "sp-std 5.0.0", + "sp-std 8.0.0", "sp-transaction-pool", "sp-version", "substrate-wasm-builder", @@ -3330,9 +3723,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f" +checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" dependencies = [ "cfg-if 1.0.0", "js-sys", @@ -3342,13 +3735,13 @@ 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 0.8.5", + "rand_core 0.6.4", ] [[package]] @@ -3358,7 +3751,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d930750de5717d2dd0b8c0d42c076c0e884c81a73e6cab859bbd2339c71e3e40" dependencies = [ "opaque-debug 0.3.0", - "polyval 0.6.1", + "polyval", ] [[package]] @@ -3380,20 +3773,20 @@ dependencies = [ [[package]] name = "ghost" -version = "0.1.16" +version = "0.1.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef81e7cedce6ab54cd5dc7b3400c442c8d132fe03200a1be0637db7ef308ff17" +checksum = "b0e085ded9f1267c32176b40921b9754c474f7dd96f7e808d4a982e48aa1e854" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[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", @@ -3402,9 +3795,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.28.0" +version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0" +checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" [[package]] name = "git-version" @@ -3423,7 +3816,7 @@ checksum = "53010ccb100b96a67bc32c0175f0ed1426b31b655d562898e57325f81c023ac0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] @@ -3434,15 +3827,15 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" [[package]] name = "globset" -version = "0.4.13" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "759c97c1e17c55525b57192c06a267cda0ac5210b222d6b82189a2338fa1c13d" +checksum = "57da3b9b5b85bd66f31093f8c408b90a74431672542466497dcbdfdc02034be1" dependencies = [ "aho-corasick", "bstr", - "fnv", "log", - "regex", + "regex-automata 0.4.5", + "regex-syntax 0.8.2", ] [[package]] @@ -3514,26 +3907,15 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "group" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dfbfb3a6cfbd390d5c9564ab283a0349b9b9fcd46a706c1eb10e0db70bfbac7" -dependencies = [ - "ff 0.12.1", - "rand_core 0.6.4", - "subtle", -] - [[package]] name = "group" version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" dependencies = [ - "ff 0.13.0", + "ff", "rand_core 0.6.4", - "subtle", + "subtle 2.5.0", ] [[package]] @@ -3550,6 +3932,7 @@ dependencies = [ "frame-try-runtime", "hex-literal", "log", + "node-primitives", "pallet-atomic-swap", "pallet-authority-discovery", "pallet-authority-members", @@ -3560,6 +3943,7 @@ dependencies = [ "pallet-collective", "pallet-distance", "pallet-duniter-account", + "pallet-duniter-test-parameters", "pallet-duniter-wot", "pallet-grandpa", "pallet-identity", @@ -3593,16 +3977,17 @@ dependencies = [ "sp-authority-discovery", "sp-block-builder", "sp-consensus-babe", + "sp-consensus-grandpa", "sp-core", "sp-distance", "sp-inherents", - "sp-io", "sp-keyring", "sp-membership", "sp-offchain", "sp-runtime", "sp-session", - "sp-std 5.0.0", + "sp-staking", + "sp-std 8.0.0", "sp-transaction-pool", "sp-version", "substrate-wasm-builder", @@ -3610,9 +3995,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.22" +version = "0.3.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d6250322ef6e60f93f9a2162799302cd6f68f79f6e5d85c8c16f14d1d958178" +checksum = "bb2c4422095b67ee78da96fbb51a4cc413b3b25883c7717ff7ca1ab31022c9c9" dependencies = [ "bytes", "fnv", @@ -3620,7 +4005,7 @@ dependencies = [ "futures-sink", "futures-util", "http", - "indexmap 2.1.0", + "indexmap 2.2.1", "slab", "tokio", "tokio-util", @@ -3671,14 +4056,28 @@ version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" dependencies = [ - "ahash 0.8.6", + "ahash 0.8.7", ] [[package]] name = "hashbrown" -version = "0.14.2" +version = "0.14.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" +dependencies = [ + "ahash 0.8.7", + "allocator-api2", + "serde", +] + +[[package]] +name = "hashlink" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f93e7192158dbcda357bdec5fb5788eebf8bbac027f3f33e719d29135ae84156" +checksum = "e8094feaf31ff591f651a2664fb9cfd92bba7a60ce3197265e9482ebe753c8f7" +dependencies = [ + "hashbrown 0.14.3", +] [[package]] name = "heck" @@ -3706,9 +4105,9 @@ dependencies = [ [[package]] name = "hermit-abi" -version = "0.3.3" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7" +checksum = "5d3d0e0f38255e7fa3cf31335b3a56f05febd18025f4db5ef7a0cfb4f8da651f" [[package]] name = "hex" @@ -3724,9 +4123,9 @@ 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", ] @@ -3747,7 +4146,7 @@ version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2a2a2320eb7ec0ebe8da8f744d7812d9fc4cb4d09344ac01898dbcb6a20ae69b" dependencies = [ - "crypto-mac 0.11.1", + "crypto-mac 0.11.0", "digest 0.9.0", ] @@ -3773,11 +4172,11 @@ dependencies = [ [[package]] name = "home" -version = "0.5.5" +version = "0.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5444c27eef6923071f7ebcc33e3444508466a76f7a2b93da00ed6e19f30c1ddb" +checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" dependencies = [ - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -3804,9 +4203,9 @@ 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", @@ -3839,9 +4238,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[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", @@ -3854,28 +4253,13 @@ dependencies = [ "httpdate", "itoa", "pin-project-lite 0.2.13", - "socket2 0.4.10", + "socket2 0.5.5", "tokio", "tower-service", "tracing", "want", ] -[[package]] -name = "hyper-rustls" -version = "0.23.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1788965e61b367cd03a62950836d5cd41560c3577d90e40e0819373194d1661c" -dependencies = [ - "http", - "hyper", - "log", - "rustls 0.20.9", - "rustls-native-certs", - "tokio", - "tokio-rustls 0.23.4", -] - [[package]] name = "hyper-rustls" version = "0.24.2" @@ -3886,11 +4270,11 @@ dependencies = [ "http", "hyper", "log", - "rustls 0.21.9", - "rustls-native-certs", + "rustls 0.21.10", + "rustls-native-certs 0.6.3", "tokio", "tokio-rustls 0.24.1", - "webpki-roots 0.25.2", + "webpki-roots 0.25.3", ] [[package]] @@ -3908,16 +4292,16 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.58" +version = "0.1.59" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8326b86b6cff230b97d0d312a6c40a60726df3332e721f72a1b035f451663b20" +checksum = "b6a67363e2aa4443928ce15e57ebae94fd8949958fd1223c4cfc0cd473ad7539" dependencies = [ "android_system_properties", "core-foundation-sys", "iana-time-zone-haiku", "js-sys", "wasm-bindgen", - "windows-core", + "windows-core 0.52.0", ] [[package]] @@ -3948,9 +4332,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", @@ -3972,10 +4356,10 @@ version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6b0422c86d7ce0e97169cc42e04ae643caf278874a7a3c87b8150a220dc7e1e" dependencies = [ - "async-io 2.2.0", + "async-io", "core-foundation", "fnv", - "futures 0.3.29", + "futures 0.3.30", "if-addrs", "ipnet", "log", @@ -3987,17 +4371,16 @@ dependencies = [ [[package]] name = "ignore" -version = "0.4.20" +version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbe7873dab538a9a44ad79ede1faf5f30d49f9a5c883ddbab48bce81b64b7492" +checksum = "b46810df39e66e925525d6e38ce1e7f6e1d208f72dc39757880fcb66e2c58af1" dependencies = [ + "crossbeam-deque", "globset", - "lazy_static", "log", "memchr", - "regex", + "regex-automata 0.4.5", "same-file", - "thread_local", "walkdir", "winapi-util", ] @@ -4031,6 +4414,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" @@ -4044,12 +4446,31 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.1.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" +checksum = "433de089bd45971eecf4668ee0ee8f4cec17db4f8bd8f7bc3197a6ce37aa7d9b" dependencies = [ "equivalent", - "hashbrown 0.14.2", + "hashbrown 0.14.3", +] + +[[package]] +name = "indexmap-nostd" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e04e2fd2b8188ea827b32ef11de88377086d690286ab35747ef7f9bf3ccb590" + +[[package]] +name = "indicatif" +version = "0.17.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb28741c9db9a713d93deb3bb9515c20788cef5815265bee4980e87bde7e0f25" +dependencies = [ + "console", + "instant", + "number_prefix", + "portable-atomic", + "unicode-width", ] [[package]] @@ -4102,26 +4523,7 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "276ec31bcb4a9ee45f58bec6f9ec700ae4cf4f4f8f2fa7e06cb406bd5ffdd770" dependencies = [ - "num-traits 0.2.17", -] - -[[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", + "num-traits", ] [[package]] @@ -4140,7 +4542,7 @@ version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" dependencies = [ - "hermit-abi 0.3.3", + "hermit-abi 0.3.4", "libc", "windows-sys 0.48.0", ] @@ -4180,13 +4582,13 @@ checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" [[package]] name = "is-terminal" -version = "0.4.9" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" +checksum = "0bad00257d07be169d870ab665980b06cdb366d792ad690bf2e76876dc503455" dependencies = [ - "hermit-abi 0.3.3", - "rustix 0.38.25", - "windows-sys 0.48.0", + "hermit-abi 0.3.4", + "rustix 0.38.30", + "windows-sys 0.52.0", ] [[package]] @@ -4198,11 +4600,20 @@ dependencies = [ "either", ] +[[package]] +name = "itertools" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" +dependencies = [ + "either", +] + [[package]] name = "itoa" -version = "1.0.9" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" +checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" [[package]] name = "jobserver" @@ -4215,9 +4626,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.65" +version = "0.3.67" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54c0c35952f67de54bb584e9fd912b3023117cbafc0a77d8f3dee1fb5f572fe8" +checksum = "9a1d36f1235bc969acba30b7f5990b864423a6068a10f7c90ae8f0112e3a59d1" dependencies = [ "wasm-bindgen", ] @@ -4228,16 +4639,27 @@ version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "367a292944c07385839818bb71c8d76611138e2dedb0677d035b8da21d29c78b" dependencies = [ - "jsonrpsee-client-transport", - "jsonrpsee-core", - "jsonrpsee-http-client", + "jsonrpsee-core 0.16.3", + "jsonrpsee-http-client 0.16.3", "jsonrpsee-proc-macros", "jsonrpsee-server", - "jsonrpsee-types", + "jsonrpsee-types 0.16.3", "jsonrpsee-ws-client", "tracing", ] +[[package]] +name = "jsonrpsee" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9579d0ca9fb30da026bac2f0f7d9576ec93489aeb7cd4971dd5b4617d82c79b2" +dependencies = [ + "jsonrpsee-client-transport 0.21.0", + "jsonrpsee-core 0.21.0", + "jsonrpsee-http-client 0.21.0", + "jsonrpsee-types 0.21.0", +] + [[package]] name = "jsonrpsee-client-transport" version = "0.16.3" @@ -4246,17 +4668,38 @@ checksum = "c8b3815d9f5d5de348e5f162b316dc9cdf4548305ebb15b4eb9328e66cf27d7a" dependencies = [ "futures-util", "http", - "jsonrpsee-core", - "jsonrpsee-types", + "jsonrpsee-core 0.16.3", + "jsonrpsee-types 0.16.3", "pin-project", - "rustls-native-certs", + "rustls-native-certs 0.6.3", "soketto", "thiserror", "tokio", "tokio-rustls 0.24.1", "tokio-util", "tracing", - "webpki-roots 0.25.2", + "webpki-roots 0.25.3", +] + +[[package]] +name = "jsonrpsee-client-transport" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9f9ed46590a8d5681975f126e22531698211b926129a40a2db47cbca429220" +dependencies = [ + "futures-util", + "http", + "jsonrpsee-core 0.21.0", + "pin-project", + "rustls-native-certs 0.7.0", + "rustls-pki-types", + "soketto", + "thiserror", + "tokio", + "tokio-rustls 0.25.0", + "tokio-util", + "tracing", + "url", ] [[package]] @@ -4275,13 +4718,56 @@ dependencies = [ "futures-util", "globset", "hyper", - "jsonrpsee-types", - "parking_lot 0.12.1", - "rand 0.8.5", + "jsonrpsee-types 0.16.3", + "parking_lot 0.12.1", + "rand 0.8.5", + "rustc-hash", + "serde", + "serde_json", + "soketto", + "thiserror", + "tokio", + "tracing", +] + +[[package]] +name = "jsonrpsee-core" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "776d009e2f591b78c038e0d053a796f94575d66ca4e77dd84bfc5e81419e436c" +dependencies = [ + "anyhow", + "async-lock 3.3.0", + "async-trait", + "beef", + "futures-timer", + "futures-util", + "hyper", + "jsonrpsee-types 0.21.0", + "pin-project", + "rustc-hash", + "serde", + "serde_json", + "thiserror", + "tokio", + "tokio-stream", + "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", + "hyper", + "hyper-rustls", + "jsonrpsee-core 0.16.3", + "jsonrpsee-types 0.16.3", "rustc-hash", "serde", "serde_json", - "soketto", "thiserror", "tokio", "tracing", @@ -4289,21 +4775,22 @@ dependencies = [ [[package]] name = "jsonrpsee-http-client" -version = "0.16.3" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e5f9fabdd5d79344728521bb65e3106b49ec405a78b66fbff073b72b389fa43" +checksum = "78b7de9f3219d95985eb77fd03194d7c1b56c19bce1abfcc9d07462574b15572" dependencies = [ "async-trait", "hyper", - "hyper-rustls 0.24.2", - "jsonrpsee-core", - "jsonrpsee-types", - "rustc-hash", + "hyper-rustls", + "jsonrpsee-core 0.21.0", + "jsonrpsee-types 0.21.0", "serde", "serde_json", "thiserror", "tokio", + "tower", "tracing", + "url", ] [[package]] @@ -4313,7 +4800,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "44e8ab85614a08792b9bff6c8feee23be78c98d0182d4c622c05256ab553892a" dependencies = [ "heck 0.4.1", - "proc-macro-crate", + "proc-macro-crate 1.1.3", "proc-macro2", "quote", "syn 1.0.109", @@ -4329,8 +4816,8 @@ dependencies = [ "futures-util", "http", "hyper", - "jsonrpsee-core", - "jsonrpsee-types", + "jsonrpsee-core 0.16.3", + "jsonrpsee-types 0.16.3", "serde", "serde_json", "soketto", @@ -4355,6 +4842,19 @@ dependencies = [ "tracing", ] +[[package]] +name = "jsonrpsee-types" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3266dfb045c9174b24c77c2dfe0084914bb23a6b2597d70c9dc6018392e1cd1b" +dependencies = [ + "anyhow", + "beef", + "serde", + "serde_json", + "thiserror", +] + [[package]] name = "jsonrpsee-ws-client" version = "0.16.3" @@ -4362,29 +4862,29 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4e1b3975ed5d73f456478681a417128597acd6a2487855fdb7b4a3d4d195bf5e" dependencies = [ "http", - "jsonrpsee-client-transport", - "jsonrpsee-core", - "jsonrpsee-types", + "jsonrpsee-client-transport 0.16.3", + "jsonrpsee-core 0.16.3", + "jsonrpsee-types 0.16.3", ] [[package]] name = "k256" -version = "0.13.2" +version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f01b677d82ef7a676aa37e099defd83a28e15687112cafdd112d60236b6115b" +checksum = "956ff9b67e26e1a6a866cb758f12c6f8746208489e3e4a4b5580802f2f0a587b" dependencies = [ "cfg-if 1.0.0", - "ecdsa 0.16.9", - "elliptic-curve 0.13.8", + "ecdsa", + "elliptic-curve", "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", ] @@ -4399,6 +4899,12 @@ dependencies = [ "winapi-build", ] +[[package]] +name = "keystream" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c33070833c9ee02266356de0c43f723152bd38bd96ddf52c82b3af10c9138b28" + [[package]] name = "kvdb" version = "0.13.0" @@ -4418,6 +4924,20 @@ dependencies = [ "parking_lot 0.12.1", ] +[[package]] +name = "kvdb-rocksdb" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b644c70b92285f66bfc2032922a79000ea30af7bc2ab31902992a5dcb9b434f6" +dependencies = [ + "kvdb", + "num_cpus", + "parking_lot 0.12.1", + "regex", + "rocksdb", + "smallvec", +] + [[package]] name = "lazy_static" version = "1.4.0" @@ -4432,9 +4952,19 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.150" +version = "0.2.152" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13e3bf6590cbc649f4d1a3eefc9d5d6eb746f5200ffb04e5e142700b8faa56e7" + +[[package]] +name = "libloading" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c" +checksum = "c571b676ddfc9a8c12f1f3d3085a7b163966a8fd8098a90640953ce5f6170161" +dependencies = [ + "cfg-if 1.0.0", + "windows-sys 0.48.0", +] [[package]] name = "libm" @@ -4444,22 +4974,24 @@ 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.29", + "futures 0.3.30", "futures-timer", - "getrandom 0.2.11", + "getrandom 0.2.12", "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", @@ -4467,47 +4999,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 0.4.0", - "ed25519-dalek 1.0.1", - "either", - "fnv", - "futures 0.3.29", - "futures-timer", - "instant", - "log", - "multiaddr 0.16.0", - "multihash 0.16.3", - "multistream-select", - "once_cell", - "parking_lot 0.12.1", - "pin-project", - "prost", - "prost-build", - "rand 0.8.5", - "rw-stream-sink", - "sec1 0.3.0", - "sha2 0.10.8", - "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]] @@ -4518,13 +5037,13 @@ checksum = "3c1df63c0b582aa434fb09b2d86897fa2b419ffeccf934b36f87fcedc8e835c2" dependencies = [ "either", "fnv", - "futures 0.3.29", + "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", @@ -4540,12 +5059,12 @@ dependencies = [ [[package]] name = "libp2p-dns" -version = "0.38.0" +version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e42a271c1b49f789b92f7fc87749fa79ce5c7bdc88cbdfacb818a4bca47fec5" +checksum = "146ff7034daae62077c415c2376b8057368042df6ab95f5432ad5e88568b1554" dependencies = [ - "futures 0.3.29", - "libp2p-core 0.38.0", + "futures 0.3.30", + "libp2p-core", "log", "parking_lot 0.12.1", "smallvec", @@ -4554,20 +5073,21 @@ dependencies = [ [[package]] name = "libp2p-identify" -version = "0.41.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c052d0026f4817b44869bfb6810f4e1112f43aec8553f2cb38881c524b563abf" +checksum = "5455f472243e63b9c497ff320ded0314254a9eb751799a39c283c6f20b793f3c" dependencies = [ "asynchronous-codec", - "futures 0.3.29", + "either", + "futures 0.3.30", "futures-timer", - "libp2p-core 0.38.0", + "libp2p-core", + "libp2p-identity", "libp2p-swarm", "log", - "lru", - "prost", - "prost-build", - "prost-codec", + "lru 0.10.1", + "quick-protobuf", + "quick-protobuf-codec", "smallvec", "thiserror", "void", @@ -4580,10 +5100,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "276bb57e7af15d8f100d3c11cbdd32c6752b7eef4ba7a18ecf464972c07abcce" dependencies = [ "bs58 0.4.0", - "ed25519-dalek 2.1.0", + "ed25519-dalek", "log", - "multiaddr 0.17.1", - "multihash 0.17.0", + "multiaddr", + "multihash", "quick-protobuf", "rand 0.8.5", "sha2 0.10.8", @@ -4593,23 +5113,23 @@ dependencies = [ [[package]] name = "libp2p-kad" -version = "0.42.1" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2766dcd2be8c87d5e1f35487deb22d765f49c6ae1251b3633efe3b25698bd3d2" +checksum = "39d5ef876a2b2323d63c258e63c2f8e36f205fe5a11f0b3095d59635650790ff" dependencies = [ "arrayvec 0.7.4", "asynchronous-codec", "bytes", "either", "fnv", - "futures 0.3.29", + "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.8", "smallvec", @@ -4621,14 +5141,15 @@ dependencies = [ [[package]] name = "libp2p-mdns" -version = "0.42.0" +version = "0.43.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04f378264aade9872d6ccd315c0accc18be3a35d15fc1b9c36e5b6f983b62b5b" +checksum = "19983e1f949f979a928f2c603de1cf180cc0dc23e4ac93a62651ccb18341460b" dependencies = [ "data-encoding", - "futures 0.3.29", + "futures 0.3.30", "if-watch", - "libp2p-core 0.38.0", + "libp2p-core", + "libp2p-identity", "libp2p-swarm", "log", "rand 0.8.5", @@ -4641,11 +5162,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", @@ -4653,38 +5174,20 @@ dependencies = [ "prometheus-client", ] -[[package]] -name = "libp2p-mplex" -version = "0.38.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03805b44107aa013e7cbbfa5627b31c36cbedfdfb00603c0311998882bc4bace" -dependencies = [ - "asynchronous-codec", - "bytes", - "futures 0.3.29", - "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.29", - "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.8", "snow", @@ -4696,14 +5199,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.29", + "either", + "futures 0.3.30", "futures-timer", "instant", - "libp2p-core 0.38.0", + "libp2p-core", "libp2p-swarm", "log", "rand 0.8.5", @@ -4712,15 +5216,16 @@ dependencies = [ [[package]] name = "libp2p-quic" -version = "0.7.0-alpha" +version = "0.7.0-alpha.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01e7c867e95c8130667b24409d236d37598270e6da69b3baf54213ba31ffca59" +checksum = "c6b26abd81cd2398382a1edfe739b539775be8a90fa6914f39b2ab49571ec735" dependencies = [ "bytes", - "futures 0.3.29", + "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", @@ -4733,49 +5238,46 @@ dependencies = [ [[package]] name = "libp2p-request-response" -version = "0.23.0" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3236168796727bfcf4927f766393415361e2c644b08bedb6a6b13d957c9a4884" +checksum = "7ffdb374267d42dc5ed5bc53f6e601d4a64ac5964779c6e40bb9e4f14c1e30d5" dependencies = [ "async-trait", - "bytes", - "futures 0.3.29", + "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.29", + "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 0.4.1", "quote", @@ -4784,15 +5286,15 @@ dependencies = [ [[package]] name = "libp2p-tcp" -version = "0.38.0" +version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4b257baf6df8f2df39678b86c578961d48cc8b68642a12f0f763f56c8e5858d" +checksum = "33d33698596d7722d85d3ab0c86c2c322254fce1241e91208e3679b4eb3026cf" dependencies = [ - "futures 0.3.29", + "futures 0.3.30", "futures-timer", "if-watch", "libc", - "libp2p-core 0.38.0", + "libp2p-core", "log", "socket2 0.4.10", "tokio", @@ -4804,74 +5306,43 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff08d13d0dc66e5e9ba6279c1de417b84fa0d0adc3b03e5732928c180ec02781" dependencies = [ - "futures 0.3.29", + "futures 0.3.30", "futures-rustls", - "libp2p-core 0.39.2", + "libp2p-core", "libp2p-identity", - "rcgen 0.10.0", + "rcgen", "ring 0.16.20", "rustls 0.20.9", "thiserror", - "webpki 0.22.4", - "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.29", + "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.29", - "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.29", + "futures 0.3.30", "futures-rustls", - "libp2p-core 0.38.0", + "libp2p-core", "log", "parking_lot 0.12.1", "quicksink", @@ -4883,14 +5354,13 @@ dependencies = [ [[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.29", - "libp2p-core 0.38.0", + "futures 0.3.30", + "libp2p-core", "log", - "parking_lot 0.12.1", "thiserror", "yamux", ] @@ -4901,11 +5371,26 @@ version = "0.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "85c833ca1e66078851dba29046874e38f08b2c883700aa29a03ddd3b23814ee8" dependencies = [ - "bitflags 2.4.1", + "bitflags 2.4.2", "libc", "redox_syscall 0.4.1", ] +[[package]] +name = "librocksdb-sys" +version = "0.11.0+8.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3386f101bcb4bd252d8e9d2fb41ec3b0862a15a62b478c355b2982efa469e3e" +dependencies = [ + "bindgen", + "bzip2-sys", + "cc", + "glob", + "libc", + "libz-sys", + "tikv-jemalloc-sys", +] + [[package]] name = "libsecp256k1" version = "0.7.1" @@ -4933,7 +5418,7 @@ checksum = "5be9b9bb642d8522a44d533eab56c16c738301965504753b03ad1de3425d5451" dependencies = [ "crunchy", "digest 0.9.0", - "subtle", + "subtle 2.5.0", ] [[package]] @@ -4956,9 +5441,9 @@ dependencies = [ [[package]] name = "libz-sys" -version = "1.1.12" +version = "1.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d97137b25e321a73eef1418d1d5d2eda4d77e12813f8e6dead84bc52c5870a7b" +checksum = "037731f5d3aaa87a5675e895b63ddff1a87624bc29f77004ea829809654e48f6" dependencies = [ "cc", "cmake", @@ -5008,15 +5493,21 @@ checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4" [[package]] name = "linux-raw-sys" -version = "0.3.8" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" +checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" [[package]] -name = "linux-raw-sys" -version = "0.4.11" +name = "lioness" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "969488b55f8ac402214f3f5fd243ebb7206cf82de60d3172994707a4bcc2b829" +checksum = "4ae926706ba42c425c9457121178330d75e273df2e82e28b758faf3de3a9acb9" +dependencies = [ + "arrayref", + "blake2 0.8.1", + "chacha", + "keystream", +] [[package]] name = "lock_api" @@ -5036,11 +5527,20 @@ checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" [[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.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db2c024b41519440580066ba82aab04092b333e09066a5eb86c7c4890df31f22" +dependencies = [ + "hashbrown 0.14.3", ] [[package]] @@ -5081,6 +5581,54 @@ dependencies = [ "libc", ] +[[package]] +name = "macro_magic" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e03844fc635e92f3a0067e25fa4bf3e3dbf3f2927bf3aa01bb7bc8f1c428949d" +dependencies = [ + "macro_magic_core", + "macro_magic_macros", + "quote", + "syn 2.0.48", +] + +[[package]] +name = "macro_magic_core" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "468155613a44cfd825f1fb0ffa532b018253920d404e6fca1e8d43155198a46d" +dependencies = [ + "const-random", + "derive-syn-parse", + "macro_magic_core_macros", + "proc-macro2", + "quote", + "syn 2.0.48", +] + +[[package]] +name = "macro_magic_core_macros" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ea73aa640dc01d62a590d48c0c3521ed739d53b27f919b25c3551e233481654" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.48", +] + +[[package]] +name = "macro_magic_macros" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef9d79ae96aaba821963320eb2b6e34d17df1e5a83d8a1985c29cc5be59577b3" +dependencies = [ + "macro_magic_core", + "quote", + "syn 2.0.48", +] + [[package]] name = "maplit" version = "1.0.2" @@ -5118,21 +5666,11 @@ dependencies = [ "rawpointer", ] -[[package]] -name = "md-5" -version = "0.10.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" -dependencies = [ - "cfg-if 1.0.0", - "digest 0.10.7", -] - [[package]] name = "memchr" -version = "2.6.4" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" +checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" [[package]] name = "memfd" @@ -5140,7 +5678,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b2cffa4ad52c6f791f4f8b15f0c05f9824b2ced1160e88cc393d64fff9a8ac64" dependencies = [ - "rustix 0.38.25", + "rustix 0.38.30", ] [[package]] @@ -5153,19 +5691,19 @@ dependencies = [ ] [[package]] -name = "memoffset" -version = "0.6.5" +name = "memmap2" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" +checksum = "fe751422e4a8caa417e13c3ea66452215d7d63e19e604f4980461212f3ae1322" dependencies = [ - "autocfg", + "libc", ] [[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", ] @@ -5179,12 +5717,6 @@ dependencies = [ "hash-db", ] -[[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" @@ -5197,6 +5729,18 @@ 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 = "mime" version = "0.3.17" @@ -5239,9 +5783,9 @@ dependencies = [ [[package]] name = "mio" -version = "0.8.9" +version = "0.8.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3dce281c5e46beae905d4de1870d8b1509a9142b62eedf18b443b011ca8343d0" +checksum = "8f3d0b296e374a4e6f3c7b0a1f5a51d748a0d34c85e7dc48fc3fa9a87657fe09" dependencies = [ "libc", "wasi 0.11.0+wasi-snapshot-preview1", @@ -5272,6 +5816,31 @@ dependencies = [ "ws2_32-sys", ] +[[package]] +name = "mixnet" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "daa3eb39495d8e2e2947a1d862852c90cc6a4a8845f8b41c8829cb9fcc047f4a" +dependencies = [ + "arrayref", + "arrayvec 0.7.4", + "bitflags 1.3.2", + "blake2 0.10.6", + "c2-chacha", + "curve25519-dalek 4.1.1", + "either", + "hashlink", + "lioness", + "log", + "parking_lot 0.12.1", + "rand 0.8.5", + "rand_chacha 0.3.1", + "rand_distr", + "subtle 2.5.0", + "thiserror", + "zeroize", +] + [[package]] name = "mockall" version = "0.11.4" @@ -5299,24 +5868,6 @@ dependencies = [ "syn 1.0.109", ] -[[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" @@ -5328,7 +5879,7 @@ dependencies = [ "data-encoding", "log", "multibase", - "multihash 0.17.0", + "multihash", "percent-encoding", "serde", "static_assertions", @@ -5349,9 +5900,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", @@ -5364,24 +5915,13 @@ dependencies = [ "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.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d6d4752e6230d8ef7adf7bd5d8c4b1f6561c1014c5ba9a37445ccefe18aa1db" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 1.1.3", "proc-macro-error", "proc-macro2", "quote", @@ -5402,7 +5942,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c8552ab875c1313b97b8d20cb857b9fd63e2d1d6a0a1b53ce9821e575405f27a" dependencies = [ "bytes", - "futures 0.3.29", + "futures 0.3.30", "log", "pin-project", "smallvec", @@ -5420,7 +5960,7 @@ dependencies = [ "nalgebra-macros", "num-complex", "num-rational", - "num-traits 0.2.17", + "num-traits", "simba", "typenum", ] @@ -5438,9 +5978,9 @@ dependencies = [ [[package]] name = "names" -version = "0.13.0" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7d66043b25d4a6cccb23619d10c19c25304b355a7dccd4a8e11423dd2382146" +checksum = "7bddcd3bf5144b6392de80e04c347cd7fab2508f6df16a85fc496ecd5cec39bc" dependencies = [ "rand 0.8.5", ] @@ -5519,7 +6059,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "65b4b14489ab424703c092062176d52ba55485a89c076b4f9db05092b7223aa6" dependencies = [ "bytes", - "futures 0.3.29", + "futures 0.3.30", "log", "netlink-packet-core", "netlink-sys", @@ -5534,7 +6074,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6471bf08e7ac0135876a9581bf3217ef0333c191c128d34878079f42ee150411" dependencies = [ "bytes", - "futures 0.3.29", + "futures 0.3.30", "libc", "log", "tokio", @@ -5555,7 +6095,6 @@ dependencies = [ "bitflags 1.3.2", "cfg-if 1.0.0", "libc", - "memoffset 0.6.5", ] [[package]] @@ -5564,11 +6103,32 @@ version = "0.27.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2eb04e9c688eff1c89d72b407f168cf79bb9e867a9d3323ed6c01519eb9cc053" dependencies = [ - "bitflags 2.4.1", + "bitflags 2.4.2", "cfg-if 1.0.0", "libc", ] +[[package]] +name = "no-std-net" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43794a0ace135be66a25d3ae77d41b91615fb68ae937f904090203e81f755b65" + +[[package]] +name = "node-primitives" +version = "2.0.0" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" +dependencies = [ + "sp-core", + "sp-runtime", +] + +[[package]] +name = "nodrop" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb" + [[package]] name = "nohash-hasher" version = "0.2.0" @@ -5628,7 +6188,7 @@ checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" dependencies = [ "autocfg", "num-integer", - "num-traits 0.2.17", + "num-traits", ] [[package]] @@ -5637,7 +6197,7 @@ version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1ba157ca0885411de85d6ca030ba7e2a83a28636056c7c699b07c8b6f7383214" dependencies = [ - "num-traits 0.2.17", + "num-traits", ] [[package]] @@ -5657,7 +6217,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" dependencies = [ "autocfg", - "num-traits 0.2.17", + "num-traits", ] [[package]] @@ -5669,16 +6229,7 @@ dependencies = [ "autocfg", "num-bigint", "num-integer", - "num-traits 0.2.17", -] - -[[package]] -name = "num-traits" -version = "0.1.43" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92e5113e9fd4cc14ded8e499429f396a20f98c772a47cc8622a736e1ec843c31" -dependencies = [ - "num-traits 0.2.17", + "num-traits", ] [[package]] @@ -5688,6 +6239,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" dependencies = [ "autocfg", + "libm", ] [[package]] @@ -5696,28 +6248,28 @@ version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi 0.3.3", + "hermit-abi 0.3.4", "libc", ] [[package]] name = "num_enum" -version = "0.5.11" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f646caf906c20226733ed5b1374287eb97e3c2a5c227ce668c1f2ce20ae57c9" +checksum = "02339744ee7253741199f897151b38e72257d13802d4ee837285cc2990a90845" dependencies = [ "num_enum_derive", ] [[package]] name = "num_enum_derive" -version = "0.5.11" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcbff9bc912032c62bf65ef1d5aea88983b420f4f839db1e9b0c281a25c9c799" +checksum = "681030a937600a36906c185595136d26abfebb4aa9c65701cefcaf8578bb982b" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.48", ] [[package]] @@ -5729,50 +6281,47 @@ dependencies = [ "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.32.1" +version = "0.32.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cf5f9dd3933bd50a9e1f149ec995f39ae2c496d31fd772c1fd45ebc27e902b0" +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" dependencies = [ "parking_lot_core 0.9.9", ] @@ -5791,11 +6340,11 @@ checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" [[package]] name = "openssl" -version = "0.10.59" +version = "0.10.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a257ad03cd8fb16ad4172fedf8094451e1af1c4b70097636ef2eac9a5f0cc33" +checksum = "15c9d69dd87a29568d4d017cfe8ec518706046a05184e5aea92d0af890b803c8" dependencies = [ - "bitflags 2.4.1", + "bitflags 2.4.2", "cfg-if 1.0.0", "foreign-types", "libc", @@ -5812,7 +6361,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] @@ -5823,9 +6372,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.95" +version = "0.9.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40a4130519a360279579c2053038317e40eff64d13fd3f004f9e1b72b8a6aaf9" +checksum = "22e1bf214306098e4832460f797824c05d25aacdf896f64a985fb0fd992454ae" dependencies = [ "cc", "libc", @@ -5834,37 +6383,21 @@ dependencies = [ ] [[package]] -name = "os_str_bytes" -version = "6.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2355d85b9a3786f481747ced0e0ff2ba35213a1f9bd406ed906554d7af805a1" - -[[package]] -name = "p256" -version = "0.11.1" +name = "option-ext" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51f44edd08f51e2ade572f141051021c5af22677e42b7dd28a88155151c33594" -dependencies = [ - "ecdsa 0.14.8", - "elliptic-curve 0.12.3", - "sha2 0.10.8", -] +checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" [[package]] -name = "p384" -version = "0.11.2" +name = "os_str_bytes" +version = "6.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc8c5bf642dde52bb9e87c0ecd8ca5a76faac2eeed98dedb7c717997e1080aa" -dependencies = [ - "ecdsa 0.14.8", - "elliptic-curve 0.12.3", - "sha2 0.10.8", -] +checksum = "e2355d85b9a3786f481747ced0e0ff2ba35213a1f9bd406ed906554d7af805a1" [[package]] name = "pallet-atomic-swap" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ "frame-support", "frame-system", @@ -5873,13 +6406,13 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 5.0.0", + "sp-std 8.0.0", ] [[package]] name = "pallet-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ "frame-support", "frame-system", @@ -5889,7 +6422,7 @@ dependencies = [ "sp-application-crypto", "sp-authority-discovery", "sp-runtime", - "sp-std 5.0.0", + "sp-std 8.0.0", ] [[package]] @@ -5908,16 +6441,16 @@ dependencies = [ "serde", "sp-core", "sp-io", - "sp-membership", "sp-runtime", "sp-staking", - "sp-std 5.0.0", + "sp-state-machine", + "sp-std 8.0.0", ] [[package]] name = "pallet-authorship" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ "frame-support", "frame-system", @@ -5925,13 +6458,13 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-runtime", - "sp-std 5.0.0", + "sp-std 8.0.0", ] [[package]] name = "pallet-babe" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ "frame-benchmarking", "frame-support", @@ -5949,13 +6482,13 @@ dependencies = [ "sp-runtime", "sp-session", "sp-staking", - "sp-std 5.0.0", + "sp-std 8.0.0", ] [[package]] name = "pallet-balances" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ "frame-benchmarking", "frame-support", @@ -5964,7 +6497,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-runtime", - "sp-std 5.0.0", + "sp-std 8.0.0", ] [[package]] @@ -5978,17 +6511,16 @@ dependencies = [ "maplit", "parity-scale-codec", "scale-info", - "serde", "sp-core", "sp-io", "sp-runtime", - "sp-std 5.0.0", + "sp-std 8.0.0", ] [[package]] name = "pallet-collective" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ "frame-benchmarking", "frame-support", @@ -5999,7 +6531,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 5.0.0", + "sp-std 8.0.0", ] [[package]] @@ -6009,7 +6541,7 @@ dependencies = [ "frame-benchmarking", "frame-support", "frame-system", - "getrandom 0.2.11", + "getrandom 0.2.12", "pallet-authority-members", "pallet-authorship", "pallet-balances", @@ -6025,7 +6557,7 @@ dependencies = [ "sp-io", "sp-keystore", "sp-runtime", - "sp-std 5.0.0", + "sp-std 8.0.0", ] [[package]] @@ -6049,7 +6581,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 5.0.0", + "sp-std 8.0.0", ] [[package]] @@ -6065,7 +6597,7 @@ dependencies = [ "serde", "sp-io", "sp-runtime", - "sp-std 5.0.0", + "sp-std 8.0.0", ] [[package]] @@ -6075,7 +6607,7 @@ dependencies = [ "num_enum", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.48", ] [[package]] @@ -6091,18 +6623,18 @@ dependencies = [ "pallet-membership", "parity-scale-codec", "scale-info", - "serde", "sp-core", "sp-io", "sp-membership", "sp-runtime", - "sp-std 5.0.0", + "sp-state-machine", + "sp-std 8.0.0", ] [[package]] name = "pallet-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ "frame-benchmarking", "frame-support", @@ -6119,7 +6651,7 @@ dependencies = [ "sp-runtime", "sp-session", "sp-staking", - "sp-std 5.0.0", + "sp-std 8.0.0", ] [[package]] @@ -6138,13 +6670,15 @@ dependencies = [ "sp-io", "sp-keystore", "sp-runtime", - "sp-std 5.0.0", + "sp-state-machine", + "sp-std 8.0.0", + "substrate-wasm-builder", ] [[package]] name = "pallet-im-online" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ "frame-benchmarking", "frame-support", @@ -6158,7 +6692,7 @@ dependencies = [ "sp-io", "sp-runtime", "sp-staking", - "sp-std 5.0.0", + "sp-std 8.0.0", ] [[package]] @@ -6171,18 +6705,17 @@ dependencies = [ "maplit", "parity-scale-codec", "scale-info", - "serde", "sp-core", "sp-io", "sp-membership", "sp-runtime", - "sp-std 5.0.0", + "sp-std 8.0.0", ] [[package]] name = "pallet-multisig" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ "frame-benchmarking", "frame-support", @@ -6192,7 +6725,7 @@ dependencies = [ "scale-info", "sp-io", "sp-runtime", - "sp-std 5.0.0", + "sp-std 8.0.0", ] [[package]] @@ -6205,12 +6738,11 @@ dependencies = [ "pallet-balances", "parity-scale-codec", "scale-info", - "serde", "sp-core", "sp-io", "sp-runtime", "sp-staking", - "sp-std 5.0.0", + "sp-std 8.0.0", ] [[package]] @@ -6228,13 +6760,13 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 5.0.0", + "sp-std 8.0.0", ] [[package]] name = "pallet-preimage" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ "frame-benchmarking", "frame-support", @@ -6245,7 +6777,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 5.0.0", + "sp-std 8.0.0", ] [[package]] @@ -6261,13 +6793,13 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 5.0.0", + "sp-std 8.0.0", ] [[package]] name = "pallet-proxy" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ "frame-benchmarking", "frame-support", @@ -6276,7 +6808,7 @@ dependencies = [ "scale-info", "sp-io", "sp-runtime", - "sp-std 5.0.0", + "sp-std 8.0.0", ] [[package]] @@ -6293,14 +6825,15 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 5.0.0", + "sp-std 8.0.0", ] [[package]] name = "pallet-scheduler" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ + "docify", "frame-benchmarking", "frame-support", "frame-system", @@ -6309,14 +6842,14 @@ dependencies = [ "scale-info", "sp-io", "sp-runtime", - "sp-std 5.0.0", + "sp-std 8.0.0", "sp-weights", ] [[package]] name = "pallet-session" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ "frame-support", "frame-system", @@ -6330,7 +6863,8 @@ dependencies = [ "sp-runtime", "sp-session", "sp-staking", - "sp-std 5.0.0", + "sp-state-machine", + "sp-std 8.0.0", "sp-trie", ] @@ -6351,7 +6885,7 @@ dependencies = [ "sp-io", "sp-runtime", "sp-session", - "sp-std 5.0.0", + "sp-std 8.0.0", ] [[package]] @@ -6367,33 +6901,35 @@ dependencies = [ "pallet-balances", "parity-scale-codec", "scale-info", - "serde", "sp-core", "sp-io", "sp-runtime", "sp-staking", - "sp-std 5.0.0", + "sp-std 8.0.0", ] [[package]] name = "pallet-sudo" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ + "docify", + "frame-benchmarking", "frame-support", "frame-system", "parity-scale-codec", "scale-info", "sp-io", "sp-runtime", - "sp-std 5.0.0", + "sp-std 8.0.0", ] [[package]] name = "pallet-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ + "docify", "frame-benchmarking", "frame-support", "frame-system", @@ -6403,14 +6939,15 @@ dependencies = [ "sp-inherents", "sp-io", "sp-runtime", - "sp-std 5.0.0", + "sp-std 8.0.0", + "sp-storage 13.0.0", "sp-timestamp", ] [[package]] name = "pallet-transaction-payment" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ "frame-support", "frame-system", @@ -6420,15 +6957,15 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 5.0.0", + "sp-std 8.0.0", ] [[package]] name = "pallet-transaction-payment-rpc" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ - "jsonrpsee", + "jsonrpsee 0.16.3", "pallet-transaction-payment-rpc-runtime-api", "parity-scale-codec", "sp-api", @@ -6442,7 +6979,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -6454,8 +6991,9 @@ dependencies = [ [[package]] name = "pallet-treasury" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ + "docify", "frame-benchmarking", "frame-support", "frame-system", @@ -6464,8 +7002,9 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", + "sp-core", "sp-runtime", - "sp-std 5.0.0", + "sp-std 8.0.0", ] [[package]] @@ -6484,7 +7023,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 5.0.0", + "sp-std 8.0.0", ] [[package]] @@ -6498,13 +7037,13 @@ dependencies = [ "scale-info", "sp-io", "sp-runtime", - "sp-std 5.0.0", + "sp-std 8.0.0", ] [[package]] name = "pallet-utility" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ "frame-benchmarking", "frame-support", @@ -6514,34 +7053,35 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 5.0.0", + "sp-std 8.0.0", ] [[package]] name = "parity-db" -version = "0.4.12" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59e9ab494af9e6e813c72170f0d3c1de1500990d62c97cc05cc7576f91aa402f" +checksum = "592a28a24b09c9dc20ac8afaa6839abc417c720afe42c12e1e4a9d6aa2508d2e" dependencies = [ - "blake2", + "blake2 0.10.6", "crc32fast", "fs2", "hex", "libc", "log", "lz4", - "memmap2", + "memmap2 0.5.10", "parking_lot 0.12.1", "rand 0.8.5", - "siphasher", + "siphasher 0.3.11", "snap", + "winapi 0.3.9", ] [[package]] name = "parity-scale-codec" -version = "3.6.5" +version = "3.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dec8a8073036902368c2cdc0387e85ff9a37054d7e7c98e592145e0c92cd4fb" +checksum = "881331e34fa842a2fb61cc2db9643a8fedc615e47cfcc52597d1af0db9a7e8fe" dependencies = [ "arrayvec 0.7.4", "bitvec", @@ -6554,11 +7094,11 @@ dependencies = [ [[package]] name = "parity-scale-codec-derive" -version = "3.6.5" +version = "3.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "312270ee71e1cd70289dacf597cab7b207aa107d2f28191c2ae45b2ece18a260" +checksum = "be30eaf4b0a9fba5336683b38de57bb86d179a35862ba6bfcf57625d006bde5b" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 2.0.0", "proc-macro2", "quote", "syn 1.0.109", @@ -6630,6 +7170,12 @@ dependencies = [ "windows-targets 0.48.5", ] +[[package]] +name = "partial_sort" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7924d1d0ad836f665c9065e26d016c673ece3993f30d340068b16f282afc1156" + [[package]] name = "paste" version = "1.0.14" @@ -6642,18 +7188,24 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d95f5254224e617595d2cc3cc73ff0a5eaf2637519e25f03388154e9378b6ffa" dependencies = [ - "crypto-mac 0.11.1", + "crypto-mac 0.11.0", ] [[package]] name = "pbkdf2" -version = "0.11.0" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" +checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" dependencies = [ "digest 0.10.7", ] +[[package]] +name = "peeking_take_while" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" + [[package]] name = "peg" version = "0.6.3" @@ -6690,26 +7242,17 @@ 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.5" +version = "2.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae9cee2a55a544be8b89dc6848072af97a20f2422603c10865be2a42b580fff5" +checksum = "1f200d8d83c44a45b21764d1916299752ca035d15ecd46faca3e9a2a2bf6ad06" dependencies = [ "memchr", "thiserror", @@ -6718,9 +7261,9 @@ dependencies = [ [[package]] name = "pest_derive" -version = "2.7.5" +version = "2.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81d78524685f5ef2a3b3bd1cafbc9fcabb036253d9b1463e726a91cd16e2dfc2" +checksum = "bcd6ab1236bbdb3a49027e920e693192ebfe8913f6d60e294de57463a493cfde" dependencies = [ "pest", "pest_generator", @@ -6728,22 +7271,22 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.7.5" +version = "2.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68bd1206e71118b5356dae5ddc61c8b11e28b09ef6a31acbd15ea48a28e0c227" +checksum = "2a31940305ffc96863a735bef7c7994a00b325a7138fdbc5bda0f1a0476d3275" dependencies = [ "pest", "pest_meta", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] name = "pest_meta" -version = "2.7.5" +version = "2.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c747191d4ad9e4a4ab9c8798f1e82a39affe7ef9648390b7e5548d18e099de6" +checksum = "a7ff62f5259e53b78d1af898941cdcdccfae7385cf7d793a6e55de5d05bb4b7d" dependencies = [ "once_cell", "pest", @@ -6757,27 +7300,27 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" dependencies = [ "fixedbitset", - "indexmap 2.1.0", + "indexmap 2.2.1", ] [[package]] name = "pin-project" -version = "1.1.3" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fda4ed1c6c173e3fc7a83629421152e01d7b1f9b7f65fb301e490e8cfc656422" +checksum = "0302c4a0442c456bd56f841aee5c3bfd17967563f6fadc9ceb9f9c23cf3807e0" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.3" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" +checksum = "266c042b60c9c76b8d53061e52b2e0d1116abc57cefc8c5cd671619a56ac3690" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] @@ -6799,13 +7342,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] -name = "pkcs8" -version = "0.9.0" +name = "piper" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9eca2c590a5f85da82668fa685c09ce2888b9430e83299debf1f34b65fd4a4ba" +checksum = "668d31b1c4eba19242f2088b2bf3316b82ca31082a8335764db4e083db7485d4" dependencies = [ - "der 0.6.1", - "spki 0.6.0", + "atomic-waker", + "fastrand", + "futures-io", ] [[package]] @@ -6814,15 +7358,15 @@ version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" dependencies = [ - "der 0.7.8", - "spki 0.7.2", + "der", + "spki", ] [[package]] name = "pkg-config" -version = "0.3.27" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" +checksum = "2900ede94e305130c13ddd391e0ab7cbaeb783945ae07a279c268cb05109c6cb" [[package]] name = "placeholder" @@ -6836,44 +7380,22 @@ dependencies = [ [[package]] name = "platforms" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8d0eef3571242013a0d5dc84861c3ae4a652e56e12adf8bdc26ff5f8cb34c94" - -[[package]] -name = "platforms" -version = "3.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14e6ab3f592e6fb464fc9712d8d6e6912de6473954635fd76a589d832cffcbb0" - -[[package]] -name = "polling" -version = "2.8.0" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b2d323e8ca7996b3e23126511a523f7e62924d93ecd5ae73b333815b0eb3dce" -dependencies = [ - "autocfg", - "bitflags 1.3.2", - "cfg-if 1.0.0", - "concurrent-queue", - "libc", - "log", - "pin-project-lite 0.2.13", - "windows-sys 0.48.0", -] +checksum = "626dec3cac7cc0e1577a2ec3fc496277ec2baa084bebad95bb6fdbfae235f84c" [[package]] name = "polling" -version = "3.3.0" +version = "3.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e53b6af1f60f36f8c2ac2aad5459d75a5a9b4be1e8cdd40264f315d78193e531" +checksum = "545c980a3880efd47b2e262f6a4bb6daad6555cf3367aa9c4e52895f69537a41" dependencies = [ "cfg-if 1.0.0", "concurrent-queue", "pin-project-lite 0.2.13", - "rustix 0.38.25", + "rustix 0.38.30", "tracing", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -6884,32 +7406,26 @@ checksum = "8159bd90725d2df49889a078b54f4f79e87f1f8a8444194cdca81d38f5393abf" dependencies = [ "cpufeatures", "opaque-debug 0.3.0", - "universal-hash 0.5.1", + "universal-hash", ] [[package]] name = "polyval" -version = "0.5.3" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8419d2b623c7c0896ff2d5d96e2cb4ede590fed28fcc34934f4c33c036e620a1" +checksum = "d52cff9d1d4dee5fe6d03729099f4a310a41179e0a10dbf542039873f2e826fb" dependencies = [ "cfg-if 1.0.0", "cpufeatures", "opaque-debug 0.3.0", - "universal-hash 0.4.1", + "universal-hash", ] [[package]] -name = "polyval" -version = "0.6.1" +name = "portable-atomic" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d52cff9d1d4dee5fe6d03729099f4a310a41179e0a10dbf542039873f2e826fb" -dependencies = [ - "cfg-if 1.0.0", - "cpufeatures", - "opaque-debug 0.3.0", - "universal-hash 0.5.1", -] +checksum = "7170ef9988bc169ba16dd36a7fa041e5c4cbeb6a35b76d4c03daded371eae7c0" [[package]] name = "portpicker" @@ -6920,6 +7436,12 @@ dependencies = [ "rand 0.8.5", ] +[[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" @@ -6934,7 +7456,7 @@ checksum = "59230a63c37f3e18569bdb90e4a89cbf5bf8b06fea0b84e65ea10cc4df47addd" dependencies = [ "difflib", "float-cmp", - "itertools", + "itertools 0.10.5", "normalize-line-endings", "predicates-core", "regex", @@ -6966,6 +7488,16 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "prettyplease" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a41cf62165e97c7f814d2221421dbb9afcbcdb0a88068e5ea206e19951c2cbb5" +dependencies = [ + "proc-macro2", + "syn 2.0.48", +] + [[package]] name = "primitive-types" version = "0.12.2" @@ -6989,6 +7521,24 @@ dependencies = [ "toml 0.5.11", ] +[[package]] +name = "proc-macro-crate" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e8366a6159044a37876a2b9817124296703c586a5c92e2c53751fa06d8d43e8" +dependencies = [ + "toml_edit 0.20.7", +] + +[[package]] +name = "proc-macro-crate" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" +dependencies = [ + "toml_edit 0.21.0", +] + [[package]] name = "proc-macro-error" version = "1.0.4" @@ -7015,20 +7565,20 @@ dependencies = [ [[package]] name = "proc-macro-warning" -version = "0.3.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e99670bafb56b9a106419397343bdbc8b8742c3cc449fec6345f86173f47cd4" +checksum = "834da187cfe638ae8abb0203f0b33e5ccdb02a28e7199f2f47b3e2754f50edca" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] name = "proc-macro2" -version = "1.0.70" +version = "1.0.78" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39278fbbf5fb4f646ce651690877f89d1c5811a3d4acb27700c1cb3cdb78fd3b" +checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" dependencies = [ "unicode-ident", ] @@ -7049,25 +7599,25 @@ dependencies = [ [[package]] name = "prometheus-client" -version = "0.18.1" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83cd1b99916654a69008fd66b4f9397fbe08e6e51dfe23d4417acf5d3b8cb87c" +checksum = "5d6fa99d535dd930d1249e6c79cb3c2915f9172a540fe2b02a4c8f9ca954721e" dependencies = [ "dtoa", "itoa", "parking_lot 0.12.1", - "prometheus-client-derive-text-encode", + "prometheus-client-derive-encode", ] [[package]] -name = "prometheus-client-derive-text-encode" -version = "0.3.0" +name = "prometheus-client-derive-encode" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66a455fbcb954c1a7decf3c586e860fd7889cddf4b8e164be736dbac95a953cd" +checksum = "440f724eba9f6996b75d63681b0a92b06947f1457076d503a4d2e2c8f56442b8" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.48", ] [[package]] @@ -7088,12 +7638,12 @@ checksum = "119533552c9a7ffacc21e099c24a0ac8bb19c2a2a3f363de84cd9b844feab270" dependencies = [ "bytes", "heck 0.4.1", - "itertools", + "itertools 0.10.5", "lazy_static", "log", "multimap", "petgraph", - "prettyplease", + "prettyplease 0.1.25", "prost", "prost-types", "regex", @@ -7102,19 +7652,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" @@ -7122,7 +7659,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", @@ -7161,6 +7698,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" @@ -7187,14 +7737,14 @@ dependencies = [ "thiserror", "tinyvec", "tracing", - "webpki 0.22.4", + "webpki", ] [[package]] name = "quote" -version = "1.0.33" +version = "1.0.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" +checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" dependencies = [ "proc-macro2", ] @@ -7264,7 +7814,17 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.11", + "getrandom 0.2.12", +] + +[[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", ] [[package]] @@ -7293,9 +7853,9 @@ checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3" [[package]] name = "rayon" -version = "1.8.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c27db03db7734835b3f53954b534c91069375ce6ccaa2e065441e07d9b6cdb1" +checksum = "fa7237101a77a10773db45d62004a272517633fbcc3df19d96455ede1122e051" dependencies = [ "either", "rayon-core", @@ -7303,27 +7863,14 @@ dependencies = [ [[package]] name = "rayon-core" -version = "1.12.0" +version = "1.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ce3fb6ad83f861aac485e76e1985cd109d9a3713802152be56c3b1f0e0658ed" +checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" dependencies = [ "crossbeam-deque", "crossbeam-utils", ] -[[package]] -name = "rcgen" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6413f3de1edee53342e6138e75b56d32e7bc6e332b3bd62d497b1929d4cfbcdd" -dependencies = [ - "pem", - "ring 0.16.20", - "time", - "x509-parser 0.13.2", - "yasna", -] - [[package]] name = "rcgen" version = "0.10.0" @@ -7338,18 +7885,9 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" -dependencies = [ - "bitflags 1.3.2", -] - -[[package]] -name = "redox_syscall" -version = "0.3.5" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" +checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" dependencies = [ "bitflags 1.3.2", ] @@ -7369,36 +7907,36 @@ version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a18479200779601e498ada4e8c1e1f50e3ee19deb0259c25825a98b5603b2cb4" dependencies = [ - "getrandom 0.2.11", + "getrandom 0.2.12", "libredox", "thiserror", ] [[package]] name = "ref-cast" -version = "1.0.20" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acde58d073e9c79da00f2b5b84eed919c8326832648a5b109b3fce1bb1175280" +checksum = "c4846d4c50d1721b1a3bef8af76924eef20d5e723647333798c1b519b3a9473f" dependencies = [ "ref-cast-impl", ] [[package]] name = "ref-cast-impl" -version = "1.0.20" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f7473c2cfcf90008193dd0e3e16599455cb601a9fce322b5bb55de799664925" +checksum = "5fddb4f8d99b0a2ebafc65a87a69a7b9875e4b1ae1f00db265d300ef7f28bccc" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] name = "regalloc2" -version = "0.5.1" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "300d4fbfb40c1c66a78ba3ddd41c1110247cf52f97b87d0f2fc9209bd49b030c" +checksum = "80535183cae11b149d618fbd3c37e38d7cda589d82d7769e196ca9a9042d7621" dependencies = [ "fxhash", "log", @@ -7408,13 +7946,13 @@ dependencies = [ [[package]] name = "regex" -version = "1.10.2" +version = "1.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" +checksum = "b62dbe01f0b06f9d8dc7d49e05a0785f153b00b2c227856282f671e0318c9b15" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.3", + "regex-automata 0.4.5", "regex-syntax 0.8.2", ] @@ -7429,9 +7967,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.3" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" +checksum = "5bb987efffd3c6d0d8f5f89510bb458559eab11e4f869acb20bf845e016259cd" dependencies = [ "aho-corasick", "memchr", @@ -7450,25 +7988,13 @@ version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" -[[package]] -name = "region" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76e189c2369884dce920945e2ddf79b3dff49e071a167dd1817fa9c4c00d512e" -dependencies = [ - "bitflags 1.3.2", - "libc", - "mach", - "winapi 0.3.9", -] - [[package]] name = "reqwest" -version = "0.11.22" +version = "0.11.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "046cd98826c46c2ac8ddecae268eb5c2e58628688a5fc7a2643704a73faba95b" +checksum = "37b1ae8d9ac08420c66222fb9096fc5de435c3c48542bc5336c51892cffafb41" dependencies = [ - "base64 0.21.5", + "base64 0.21.7", "bytes", "encoding_rs", "futures-core", @@ -7512,23 +8038,28 @@ 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 = [ - "crypto-bigint 0.4.9", "hmac 0.12.1", - "zeroize", + "subtle 2.5.0", ] [[package]] -name = "rfc6979" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" +name = "ring" +version = "0.1.0" +source = "git+https://github.com/w3f/ring-proof#b273d33f9981e2bb3375ab45faeb537f7ee35224" dependencies = [ - "hmac 0.12.1", - "subtle", + "ark-ec", + "ark-ff", + "ark-poly", + "ark-serialize", + "ark-std", + "blake2 0.10.6", + "common", + "fflonk", + "merlin 3.0.0", ] [[package]] @@ -7548,12 +8079,12 @@ dependencies = [ [[package]] name = "ring" -version = "0.17.5" +version = "0.17.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb0205304757e5d899b9c2e448b867ffd03ae7f988002e47cd24954391394d0b" +checksum = "688c63d65483050968b2a8937f7995f443e27041a0f7700aa59b0822aedebb74" dependencies = [ "cc", - "getrandom 0.2.11", + "getrandom 0.2.12", "libc", "spin 0.9.8", "untrusted 0.9.0", @@ -7561,25 +8092,24 @@ dependencies = [ ] [[package]] -name = "rpassword" -version = "7.3.1" +name = "rocksdb" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80472be3c897911d0137b2d2b9055faf6eeac5b14e324073d83bc17b191d7e3f" +checksum = "bb6f170a4041d50a0ce04b0d2e14916d6ca863ea2e422689a5b694395d299ffe" dependencies = [ "libc", - "rtoolbox", - "windows-sys 0.48.0", + "librocksdb-sys", ] [[package]] -name = "rtcp" -version = "0.7.2" +name = "rpassword" +version = "7.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1919efd6d4a6a85d13388f9487549bb8e359f17198cc03ffd72f79b553873691" +checksum = "80472be3c897911d0137b2d2b9055faf6eeac5b14e324073d83bc17b191d7e3f" dependencies = [ - "bytes", - "thiserror", - "webrtc-util", + "libc", + "rtoolbox", + "windows-sys 0.48.0", ] [[package]] @@ -7588,7 +8118,7 @@ version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "322c53fd76a18698f1c27381d58091de3a043d356aa5bd0d510608b565f469a0" dependencies = [ - "futures 0.3.29", + "futures 0.3.30", "log", "netlink-packet-route", "netlink-proto", @@ -7607,20 +8137,6 @@ dependencies = [ "windows-sys 0.48.0", ] -[[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", -] - [[package]] name = "run_script" version = "0.6.4" @@ -7654,7 +8170,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" dependencies = [ - "semver 1.0.20", + "semver 1.0.21", ] [[package]] @@ -7682,66 +8198,53 @@ dependencies = [ [[package]] name = "rustix" -version = "0.37.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fea8ca367a3a01fe35e6943c400addf443c0f57670e6ec51196f71a4b8762dd2" -dependencies = [ - "bitflags 1.3.2", - "errno", - "io-lifetimes", - "libc", - "linux-raw-sys 0.3.8", - "windows-sys 0.48.0", -] - -[[package]] -name = "rustix" -version = "0.38.25" +version = "0.38.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc99bc2d4f1fed22595588a013687477aedf3cdcfb26558c559edb67b4d9b22e" +checksum = "322394588aaf33c24007e8bb3238ee3e4c5c09c084ab32bc73890b99ff326bca" dependencies = [ - "bitflags 2.4.1", + "bitflags 2.4.2", "errno", "libc", - "linux-raw-sys 0.4.11", - "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 0.16.20", - "sct 0.6.1", - "webpki 0.21.4", + "sct", + "webpki", ] [[package]] name = "rustls" -version = "0.20.9" +version = "0.21.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b80e3dec595989ea8510028f30c408a4630db12c9cbb8de34203b89d6577e99" +checksum = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba" dependencies = [ "log", - "ring 0.16.20", - "sct 0.7.1", - "webpki 0.22.4", + "ring 0.17.7", + "rustls-webpki 0.101.7", + "sct", ] [[package]] name = "rustls" -version = "0.21.9" +version = "0.22.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "629648aced5775d558af50b2b4c7b02983a04b312126d45eeead26e7caa498b9" +checksum = "e87c9956bd9807afa1f77e0f7594af32566e830e088a5576d27c5b6f30f49d41" dependencies = [ "log", - "ring 0.17.5", - "rustls-webpki", - "sct 0.7.1", + "ring 0.17.7", + "rustls-pki-types", + "rustls-webpki 0.102.1", + "subtle 2.5.0", + "zeroize", ] [[package]] @@ -7751,7 +8254,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00" dependencies = [ "openssl-probe", - "rustls-pemfile", + "rustls-pemfile 1.0.4", + "schannel", + "security-framework", +] + +[[package]] +name = "rustls-native-certs" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f1fb85efa936c42c6d5fc28d2629bb51e4b2f4b8a5211e297d599cc5a093792" +dependencies = [ + "openssl-probe", + "rustls-pemfile 2.0.0", + "rustls-pki-types", "schannel", "security-framework", ] @@ -7762,16 +8278,43 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" dependencies = [ - "base64 0.21.5", + "base64 0.21.7", +] + +[[package]] +name = "rustls-pemfile" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35e4980fa29e4c4b212ffb3db068a564cbf560e51d3944b7c88bd8bf5bec64f4" +dependencies = [ + "base64 0.21.7", + "rustls-pki-types", ] +[[package]] +name = "rustls-pki-types" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e9d979b3ce68192e42760c7810125eb6cf2ea10efae545a156063e61f314e2a" + [[package]] name = "rustls-webpki" version = "0.101.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" dependencies = [ - "ring 0.17.5", + "ring 0.17.7", + "untrusted 0.9.0", +] + +[[package]] +name = "rustls-webpki" +version = "0.102.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef4ca26037c909dedb327b48c3327d0ba91d3dd3c4e05dad328f210ffb68e95b" +dependencies = [ + "ring 0.17.7", + "rustls-pki-types", "untrusted 0.9.0", ] @@ -7793,22 +8336,33 @@ dependencies = [ "toml 0.5.11", ] +[[package]] +name = "ruzstd" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58c4eb8a81997cf040a091d1f7e1938aeab6749d3a0dfa73af43cdc32393483d" +dependencies = [ + "byteorder", + "derive_more", + "twox-hash", +] + [[package]] name = "rw-stream-sink" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "26338f5e09bb721b85b135ea05af7767c90b52f6de4f087d4f4a3a9d64e7dc04" dependencies = [ - "futures 0.3.29", + "futures 0.3.30", "pin-project", "static_assertions", ] [[package]] name = "ryu" -version = "1.0.15" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" +checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c" [[package]] name = "safe_arch" @@ -7831,25 +8385,24 @@ dependencies = [ [[package]] name = "sc-allocator" version = "4.1.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ "log", "sp-core", - "sp-wasm-interface", + "sp-wasm-interface 14.0.0", "thiserror", ] [[package]] name = "sc-basic-authorship" version = "0.10.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ - "futures 0.3.29", + "futures 0.3.30", "futures-timer", "log", "parity-scale-codec", "sc-block-builder", - "sc-client-api", "sc-proposer-metrics", "sc-telemetry", "sc-transaction-pool-api", @@ -7865,24 +8418,28 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.10.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ "parity-scale-codec", - "sc-client-api", "sp-api", "sp-block-builder", "sp-blockchain", "sp-core", "sp-inherents", "sp-runtime", + "sp-trie", ] [[package]] name = "sc-chain-spec" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ - "memmap2", + "array-bytes 6.2.2", + "docify", + "log", + "memmap2 0.5.10", + "parity-scale-codec", "sc-chain-spec-derive", "sc-client-api", "sc-executor", @@ -7892,6 +8449,8 @@ dependencies = [ "serde_json", "sp-blockchain", "sp-core", + "sp-genesis-builder", + "sp-io", "sp-runtime", "sp-state-machine", ] @@ -7899,25 +8458,27 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] name = "sc-cli" version = "0.10.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ - "array-bytes", + "array-bytes 6.2.2", + "bip39", "chrono", - "clap 4.4.11", + "clap 4.4.18", "fdlimit", - "futures 0.3.29", - "libp2p", + "futures 0.3.30", + "itertools 0.10.5", + "libp2p-identity", "log", "names", "parity-scale-codec", @@ -7927,8 +8488,8 @@ dependencies = [ "sc-client-api", "sc-client-db", "sc-keystore", + "sc-mixnet", "sc-network", - "sc-network-common", "sc-service", "sc-telemetry", "sc-tracing", @@ -7943,17 +8504,16 @@ dependencies = [ "sp-runtime", "sp-version", "thiserror", - "tiny-bip39", "tokio", ] [[package]] name = "sc-client-api" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ "fnv", - "futures 0.3.29", + "futures 0.3.30", "log", "parity-scale-codec", "parking_lot 0.12.1", @@ -7965,22 +8525,24 @@ dependencies = [ "sp-consensus", "sp-core", "sp-database", - "sp-externalities", - "sp-keystore", + "sp-externalities 0.19.0", "sp-runtime", "sp-state-machine", - "sp-storage", + "sp-statement-store", + "sp-storage 13.0.0", + "sp-trie", "substrate-prometheus-endpoint", ] [[package]] name = "sc-client-db" version = "0.10.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ "hash-db", "kvdb", "kvdb-memorydb", + "kvdb-rocksdb", "linked-hash-map", "log", "parity-db", @@ -8001,12 +8563,12 @@ dependencies = [ [[package]] name = "sc-consensus" version = "0.10.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ "async-trait", - "futures 0.3.29", + "futures 0.3.30", "futures-timer", - "libp2p", + "libp2p-identity", "log", "mockall", "parking_lot 0.12.1", @@ -8026,10 +8588,10 @@ dependencies = [ [[package]] name = "sc-consensus-aura" version = "0.10.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ "async-trait", - "futures 0.3.29", + "futures 0.3.30", "log", "parity-scale-codec", "sc-block-builder", @@ -8055,24 +8617,23 @@ dependencies = [ [[package]] name = "sc-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ "async-trait", "fork-tree", - "futures 0.3.29", + "futures 0.3.30", "log", "num-bigint", "num-rational", - "num-traits 0.2.17", + "num-traits", "parity-scale-codec", "parking_lot 0.12.1", "sc-client-api", "sc-consensus", "sc-consensus-epochs", "sc-consensus-slots", - "sc-keystore", "sc-telemetry", - "scale-info", + "sc-transaction-pool-api", "sp-api", "sp-application-crypto", "sp-block-builder", @@ -8091,10 +8652,10 @@ dependencies = [ [[package]] name = "sc-consensus-babe-rpc" version = "0.10.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ - "futures 0.3.29", - "jsonrpsee", + "futures 0.3.30", + "jsonrpsee 0.16.3", "sc-consensus-babe", "sc-consensus-epochs", "sc-rpc-api", @@ -8113,7 +8674,7 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" version = "0.10.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ "fork-tree", "parity-scale-codec", @@ -8126,15 +8687,15 @@ dependencies = [ [[package]] name = "sc-consensus-grandpa" version = "0.10.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ - "ahash 0.8.6", - "array-bytes", + "ahash 0.8.7", + "array-bytes 6.2.2", "async-trait", "dyn-clone", "finality-grandpa", "fork-tree", - "futures 0.3.29", + "futures 0.3.30", "futures-timer", "log", "parity-scale-codec", @@ -8147,7 +8708,9 @@ dependencies = [ "sc-network", "sc-network-common", "sc-network-gossip", + "sc-network-sync", "sc-telemetry", + "sc-transaction-pool-api", "sc-utils", "serde_json", "sp-api", @@ -8166,12 +8729,13 @@ dependencies = [ [[package]] name = "sc-consensus-manual-seal" version = "0.10.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ "assert_matches", "async-trait", - "futures 0.3.29", - "jsonrpsee", + "futures 0.3.30", + "futures-timer", + "jsonrpsee 0.16.3", "log", "parity-scale-codec", "sc-client-api", @@ -8200,10 +8764,10 @@ dependencies = [ [[package]] name = "sc-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ "async-trait", - "futures 0.3.29", + "futures 0.3.30", "futures-timer", "log", "parity-scale-codec", @@ -8223,83 +8787,68 @@ dependencies = [ [[package]] name = "sc-executor" version = "0.10.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ - "lru", "parity-scale-codec", "parking_lot 0.12.1", "sc-executor-common", - "sc-executor-wasmi", "sc-executor-wasmtime", + "schnellru", "sp-api", "sp-core", - "sp-externalities", + "sp-externalities 0.19.0", "sp-io", "sp-panic-handler", - "sp-runtime-interface", + "sp-runtime-interface 17.0.0", "sp-trie", "sp-version", - "sp-wasm-interface", + "sp-wasm-interface 14.0.0", "tracing", - "wasmi", ] [[package]] name = "sc-executor-common" version = "0.10.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ "sc-allocator", "sp-maybe-compressed-blob", - "sp-wasm-interface", + "sp-wasm-interface 14.0.0", "thiserror", "wasm-instrument", - "wasmi", -] - -[[package]] -name = "sc-executor-wasmi" -version = "0.10.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" -dependencies = [ - "log", - "sc-allocator", - "sc-executor-common", - "sp-runtime-interface", - "sp-wasm-interface", - "wasmi", ] [[package]] name = "sc-executor-wasmtime" version = "0.10.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ "anyhow", "cfg-if 1.0.0", "libc", "log", - "once_cell", + "parking_lot 0.12.1", "rustix 0.36.17", "sc-allocator", "sc-executor-common", - "sp-runtime-interface", - "sp-wasm-interface", + "sp-runtime-interface 17.0.0", + "sp-wasm-interface 14.0.0", "wasmtime", ] [[package]] name = "sc-informant" version = "0.10.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ "ansi_term", - "futures 0.3.29", + "futures 0.3.30", "futures-timer", "log", "sc-client-api", "sc-network", "sc-network-common", + "sc-network-sync", "sp-blockchain", "sp-runtime", ] @@ -8307,10 +8856,9 @@ dependencies = [ [[package]] name = "sc-keystore" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ - "array-bytes", - "async-trait", + "array-bytes 6.2.2", "parking_lot 0.12.1", "serde_json", "sp-application-crypto", @@ -8319,65 +8867,92 @@ dependencies = [ "thiserror", ] +[[package]] +name = "sc-mixnet" +version = "0.1.0-dev" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" +dependencies = [ + "array-bytes 4.2.0", + "arrayvec 0.7.4", + "blake2 0.10.6", + "bytes", + "futures 0.3.30", + "futures-timer", + "libp2p-identity", + "log", + "mixnet", + "multiaddr", + "parity-scale-codec", + "parking_lot 0.12.1", + "sc-client-api", + "sc-network", + "sc-transaction-pool-api", + "sp-api", + "sp-consensus", + "sp-core", + "sp-keystore", + "sp-mixnet", + "sp-runtime", + "thiserror", +] + [[package]] name = "sc-network" version = "0.10.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ - "array-bytes", - "async-channel", + "array-bytes 6.2.2", + "async-channel 1.9.0", "async-trait", "asynchronous-codec", "bytes", "either", "fnv", - "futures 0.3.29", + "futures 0.3.30", "futures-timer", "ip_network", "libp2p", "linked_hash_set", "log", - "lru", "mockall", "parity-scale-codec", "parking_lot 0.12.1", + "partial_sort", "pin-project", "rand 0.8.5", - "sc-block-builder", "sc-client-api", - "sc-consensus", "sc-network-common", - "sc-peerset", "sc-utils", "serde", "serde_json", "smallvec", - "snow", "sp-arithmetic", "sp-blockchain", - "sp-consensus", "sp-core", "sp-runtime", "substrate-prometheus-endpoint", "thiserror", + "tokio", + "tokio-stream", "unsigned-varint", + "wasm-timer", "zeroize", ] [[package]] name = "sc-network-bitswap" version = "0.10.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ + "async-channel 1.9.0", "cid", - "futures 0.3.29", - "libp2p", + "futures 0.3.30", + "libp2p-identity", "log", "prost", "prost-build", "sc-client-api", "sc-network", - "sc-network-common", "sp-blockchain", "sp-runtime", "thiserror", @@ -8387,45 +8962,34 @@ dependencies = [ [[package]] name = "sc-network-common" version = "0.10.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ - "array-bytes", "async-trait", "bitflags 1.3.2", - "bytes", - "futures 0.3.29", - "futures-timer", - "libp2p", + "futures 0.3.30", + "libp2p-identity", "parity-scale-codec", "prost-build", "sc-consensus", - "sc-peerset", - "sc-utils", - "serde", - "smallvec", - "sp-blockchain", "sp-consensus", "sp-consensus-grandpa", "sp-runtime", - "substrate-prometheus-endpoint", - "thiserror", - "zeroize", ] [[package]] name = "sc-network-gossip" version = "0.10.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ - "ahash 0.8.6", - "futures 0.3.29", + "ahash 0.8.7", + "futures 0.3.30", "futures-timer", "libp2p", "log", - "lru", "sc-network", "sc-network-common", - "sc-peerset", + "sc-network-sync", + "schnellru", "sp-runtime", "substrate-prometheus-endpoint", "tracing", @@ -8434,19 +8998,18 @@ dependencies = [ [[package]] name = "sc-network-light" version = "0.10.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ - "array-bytes", - "futures 0.3.29", - "libp2p", + "array-bytes 6.2.2", + "async-channel 1.9.0", + "futures 0.3.30", + "libp2p-identity", "log", "parity-scale-codec", "prost", "prost-build", "sc-client-api", "sc-network", - "sc-network-common", - "sc-peerset", "sp-blockchain", "sp-core", "sp-runtime", @@ -8456,16 +9019,16 @@ dependencies = [ [[package]] name = "sc-network-sync" version = "0.10.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ - "array-bytes", + "array-bytes 6.2.2", + "async-channel 1.9.0", "async-trait", "fork-tree", - "futures 0.3.29", + "futures 0.3.30", "futures-timer", "libp2p", "log", - "lru", "mockall", "parity-scale-codec", "prost", @@ -8474,8 +9037,8 @@ dependencies = [ "sc-consensus", "sc-network", "sc-network-common", - "sc-peerset", "sc-utils", + "schnellru", "smallvec", "sp-arithmetic", "sp-blockchain", @@ -8485,22 +9048,23 @@ dependencies = [ "sp-runtime", "substrate-prometheus-endpoint", "thiserror", + "tokio", + "tokio-stream", ] [[package]] name = "sc-network-transactions" version = "0.10.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ - "array-bytes", - "futures 0.3.29", + "array-bytes 6.2.2", + "futures 0.3.30", "libp2p", "log", "parity-scale-codec", - "pin-project", "sc-network", "sc-network-common", - "sc-peerset", + "sc-network-sync", "sc-utils", "sp-consensus", "sp-runtime", @@ -8510,16 +9074,17 @@ dependencies = [ [[package]] name = "sc-offchain" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ - "array-bytes", + "array-bytes 6.2.2", "bytes", "fnv", - "futures 0.3.29", + "futures 0.3.30", "futures-timer", "hyper", - "hyper-rustls 0.23.2", + "hyper-rustls", "libp2p", + "log", "num_cpus", "once_cell", "parity-scale-codec", @@ -8528,33 +9093,22 @@ dependencies = [ "sc-client-api", "sc-network", "sc-network-common", - "sc-peerset", + "sc-transaction-pool-api", "sc-utils", "sp-api", "sp-core", + "sp-externalities 0.19.0", + "sp-keystore", "sp-offchain", "sp-runtime", "threadpool", "tracing", ] -[[package]] -name = "sc-peerset" -version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" -dependencies = [ - "futures 0.3.29", - "libp2p", - "log", - "sc-utils", - "serde_json", - "wasm-timer", -] - [[package]] name = "sc-proposer-metrics" version = "0.10.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -8563,16 +9117,17 @@ dependencies = [ [[package]] name = "sc-rpc" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ - "futures 0.3.29", - "jsonrpsee", + "futures 0.3.30", + "jsonrpsee 0.16.3", "log", "parity-scale-codec", "parking_lot 0.12.1", "sc-block-builder", "sc-chain-spec", "sc-client-api", + "sc-mixnet", "sc-rpc-api", "sc-tracing", "sc-transaction-pool-api", @@ -8586,6 +9141,7 @@ dependencies = [ "sp-rpc", "sp-runtime", "sp-session", + "sp-statement-store", "sp-version", "tokio", ] @@ -8593,11 +9149,12 @@ dependencies = [ [[package]] name = "sc-rpc-api" version = "0.10.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ - "jsonrpsee", + "jsonrpsee 0.16.3", "parity-scale-codec", "sc-chain-spec", + "sc-mixnet", "sc-transaction-pool-api", "scale-info", "serde", @@ -8612,10 +9169,10 @@ dependencies = [ [[package]] name = "sc-rpc-server" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ "http", - "jsonrpsee", + "jsonrpsee 0.16.3", "log", "serde_json", "substrate-prometheus-endpoint", @@ -8627,46 +9184,48 @@ dependencies = [ [[package]] name = "sc-rpc-spec-v2" version = "0.10.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ - "array-bytes", - "futures 0.3.29", + "array-bytes 6.2.2", + "futures 0.3.30", "futures-util", "hex", - "jsonrpsee", + "jsonrpsee 0.16.3", "log", "parity-scale-codec", "parking_lot 0.12.1", "sc-chain-spec", "sc-client-api", "sc-transaction-pool-api", + "sc-utils", "serde", "sp-api", "sp-blockchain", "sp-core", + "sp-rpc", "sp-runtime", "sp-version", "thiserror", + "tokio", "tokio-stream", ] [[package]] name = "sc-service" version = "0.10.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ "async-trait", "directories", "exit-future", - "futures 0.3.29", + "futures 0.3.30", "futures-timer", - "jsonrpsee", + "jsonrpsee 0.16.3", "log", "parity-scale-codec", "parking_lot 0.12.1", "pin-project", "rand 0.8.5", - "sc-block-builder", "sc-chain-spec", "sc-client-api", "sc-client-db", @@ -8680,11 +9239,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", @@ -8697,12 +9254,12 @@ dependencies = [ "sp-blockchain", "sp-consensus", "sp-core", - "sp-externalities", + "sp-externalities 0.19.0", "sp-keystore", "sp-runtime", "sp-session", "sp-state-machine", - "sp-storage", + "sp-storage 13.0.0", "sp-transaction-pool", "sp-transaction-storage-proof", "sp-trie", @@ -8719,7 +9276,7 @@ dependencies = [ [[package]] name = "sc-state-db" version = "0.10.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ "log", "parity-scale-codec", @@ -8727,28 +9284,13 @@ dependencies = [ "sp-core", ] -[[package]] -name = "sc-storage-monitor" -version = "0.1.0" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" -dependencies = [ - "clap 4.4.11", - "fs4", - "futures 0.3.29", - "log", - "sc-client-db", - "sc-utils", - "sp-core", - "thiserror", - "tokio", -] - [[package]] name = "sc-sysinfo" version = "6.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ - "futures 0.3.29", + "derive_more", + "futures 0.3.30", "libc", "log", "rand 0.8.5", @@ -8759,16 +9301,16 @@ dependencies = [ "serde_json", "sp-core", "sp-io", - "sp-std 5.0.0", + "sp-std 8.0.0", ] [[package]] name = "sc-telemetry" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ "chrono", - "futures 0.3.29", + "futures 0.3.30", "libp2p", "log", "parking_lot 0.12.1", @@ -8784,20 +9326,19 @@ dependencies = [ [[package]] name = "sc-tracing" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ "ansi_term", - "atty", "chrono", + "is-terminal", "lazy_static", "libc", "log", - "once_cell", + "parity-scale-codec", "parking_lot 0.12.1", "regex", "rustc-hash", "sc-client-api", - "sc-rpc-server", "sc-tracing-proc-macro", "serde", "sp-api", @@ -8805,7 +9346,7 @@ dependencies = [ "sp-core", "sp-rpc", "sp-runtime", - "sp-tracing", + "sp-tracing 10.0.0", "thiserror", "tracing", "tracing-log", @@ -8815,25 +9356,24 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] name = "sc-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ "async-trait", - "futures 0.3.29", + "futures 0.3.30", "futures-timer", "linked-hash-map", "log", - "num-traits 0.2.17", "parity-scale-codec", "parking_lot 0.12.1", "sc-client-api", @@ -8844,7 +9384,7 @@ dependencies = [ "sp-blockchain", "sp-core", "sp-runtime", - "sp-tracing", + "sp-tracing 10.0.0", "sp-transaction-pool", "substrate-prometheus-endpoint", "thiserror", @@ -8853,13 +9393,15 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ "async-trait", - "futures 0.3.29", + "futures 0.3.30", "log", + "parity-scale-codec", "serde", "sp-blockchain", + "sp-core", "sp-runtime", "thiserror", ] @@ -8867,10 +9409,10 @@ dependencies = [ [[package]] name = "sc-utils" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ - "async-channel", - "futures 0.3.29", + "async-channel 1.9.0", + "futures 0.3.30", "futures-timer", "lazy_static", "log", @@ -8879,40 +9421,15 @@ dependencies = [ "sp-arithmetic", ] -[[package]] -name = "scale-bits" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8dd7aca73785181cc41f0bbe017263e682b585ca660540ba569133901d013ecf" -dependencies = [ - "parity-scale-codec", - "scale-info", - "serde", -] - [[package]] name = "scale-bits" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "036575c29af9b6e4866ffb7fa055dbf623fe7a9cc159b33786de6013a6969d89" dependencies = [ - "parity-scale-codec", - "scale-info", - "serde", -] - -[[package]] -name = "scale-decode" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7e5527e4b3bf079d4c0b2f253418598c380722ba37ef20fac9088081407f2b6" -dependencies = [ - "parity-scale-codec", - "primitive-types", - "scale-bits 0.3.0", - "scale-decode-derive", + "parity-scale-codec", "scale-info", - "thiserror", + "serde", ] [[package]] @@ -8923,38 +9440,26 @@ checksum = "7caaf753f8ed1ab4752c6afb20174f03598c664724e0e32628e161c21000ff76" dependencies = [ "derive_more", "parity-scale-codec", - "scale-bits 0.4.0", + "primitive-types", + "scale-bits", + "scale-decode-derive", "scale-info", "smallvec", ] [[package]] name = "scale-decode-derive" -version = "0.5.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b38741b2f78e4391b94eac6b102af0f6ea2b0f7fe65adb55d7f4004f507854db" +checksum = "d3475108a1b62c7efd1b5c65974f30109a598b2f45f23c9ae030acb9686966db" dependencies = [ - "darling", - "proc-macro-crate", + "darling 0.14.4", + "proc-macro-crate 1.1.3", "proc-macro2", "quote", "syn 1.0.109", ] -[[package]] -name = "scale-encode" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15546e5efbb45f0fc2291f7e202dee8623274c5d8bbfdf9c6886cc8b44a7ced3" -dependencies = [ - "parity-scale-codec", - "primitive-types", - "scale-bits 0.3.0", - "scale-encode-derive", - "scale-info", - "thiserror", -] - [[package]] name = "scale-encode" version = "0.5.0" @@ -8963,19 +9468,21 @@ checksum = "6d70cb4b29360105483fac1ed567ff95d65224a14dd275b6303ed0a654c78de5" dependencies = [ "derive_more", "parity-scale-codec", - "scale-bits 0.4.0", + "primitive-types", + "scale-bits", + "scale-encode-derive", "scale-info", "smallvec", ] [[package]] name = "scale-encode-derive" -version = "0.1.2" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd983cf0a9effd76138554ead18a6de542d1af175ac12fd5e91836c5c0268082" +checksum = "995491f110efdc6bea96d6a746140e32bfceb4ea47510750a5467295a4707a25" dependencies = [ - "darling", - "proc-macro-crate", + "darling 0.14.4", + "proc-macro-crate 1.1.3", "proc-macro2", "quote", "syn 1.0.109", @@ -9001,28 +9508,23 @@ version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "abf2c68b89cafb3b8d918dd07b42be0da66ff202cf1155c5739a4e0c1ea0dc19" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 1.1.3", "proc-macro2", "quote", "syn 1.0.109", ] [[package]] -name = "scale-value" -version = "0.7.0" +name = "scale-typegen" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11f549769261561e6764218f847e500588f9a79a289de49ce92f9e26642a3574" +checksum = "00860983481ac590ac87972062909bef0d6a658013b592ccc0f2feb272feab11" dependencies = [ - "either", - "frame-metadata", - "parity-scale-codec", - "scale-bits 0.3.0", - "scale-decode 0.5.0", - "scale-encode 0.1.2", + "proc-macro2", + "quote", "scale-info", - "serde", + "syn 2.0.48", "thiserror", - "yap 0.10.0", ] [[package]] @@ -9032,26 +9534,26 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "58223c7691bf0bd46b43c9aea6f0472d1067f378d574180232358d7c6e0a8089" dependencies = [ "base58", - "blake2", + "blake2 0.10.6", "derive_more", "either", - "frame-metadata", + "frame-metadata 15.1.0", "parity-scale-codec", - "scale-bits 0.4.0", - "scale-decode 0.10.0", - "scale-encode 0.5.0", + "scale-bits", + "scale-decode", + "scale-encode", "scale-info", "serde", - "yap 0.11.0", + "yap", ] [[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]] @@ -9060,7 +9562,7 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "772575a524feeb803e5b0fcbc6dd9f367e579488197c94c6e4023aad2305774d" dependencies = [ - "ahash 0.8.6", + "ahash 0.8.7", "cfg-if 1.0.0", "hashbrown 0.13.2", ] @@ -9074,12 +9576,29 @@ dependencies = [ "arrayref", "arrayvec 0.5.2", "curve25519-dalek 2.1.3", - "getrandom 0.1.16", - "merlin", - "rand 0.7.3", + "merlin 2.0.1", "rand_core 0.5.1", "sha2 0.8.2", - "subtle", + "subtle 2.5.0", + "zeroize", +] + +[[package]] +name = "schnorrkel" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8de18f6d8ba0aad7045f5feae07ec29899c1112584a38509a84ad7b04451eaa0" +dependencies = [ + "aead", + "arrayref", + "arrayvec 0.7.4", + "curve25519-dalek 4.1.1", + "getrandom_or_panic", + "merlin 3.0.0", + "rand_core 0.6.4", + "serde_bytes", + "sha2 0.10.8", + "subtle 2.5.0", "zeroize", ] @@ -9095,38 +9614,16 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a3cf7c11c38cb994f3d40e8a8cde3bbd1f72a435e4c49e85d6553d8312306152" -[[package]] -name = "sct" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b362b83898e0e69f38515b82ee15aa80636befe47c3b6d3d89a911e78fc228ce" -dependencies = [ - "ring 0.16.20", - "untrusted 0.7.1", -] - [[package]] name = "sct" version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" dependencies = [ - "ring 0.17.5", + "ring 0.17.7", "untrusted 0.9.0", ] -[[package]] -name = "sdp" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d22a5ef407871893fd72b4562ee15e4742269b173959db4b8df6f538c414e13" -dependencies = [ - "rand 0.8.5", - "substring", - "thiserror", - "url", -] - [[package]] name = "sealed" version = "0.3.0" @@ -9151,48 +9648,34 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "sec1" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3be24c1842290c45df0a7bf069e0c268a747ad05a192f2fd7dcfdbc1cba40928" -dependencies = [ - "base16ct 0.1.1", - "der 0.6.1", - "generic-array 0.14.7", - "pkcs8 0.9.0", - "subtle", - "zeroize", -] - [[package]] name = "sec1" version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" dependencies = [ - "base16ct 0.2.0", - "der 0.7.8", + "base16ct", + "der", "generic-array 0.14.7", - "pkcs8 0.10.2", - "subtle", + "pkcs8", + "subtle 2.5.0", "zeroize", ] [[package]] name = "secp256k1" -version = "0.24.3" +version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b1629c9c557ef9b293568b338dddfc8208c98a18c59d722a9d53f859d9c9b62" +checksum = "3f622567e3b4b38154fb8190bcf6b160d7a4301d70595a49195b48c116007a27" dependencies = [ "secp256k1-sys", ] [[package]] name = "secp256k1-sys" -version = "0.6.1" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83080e2c2fc1006e625be82e5d1eb6a43b7fd9578b617fcc55814daf286bba4b" +checksum = "e5d1746aae42c19d583c3c1a8c646bfad910498e2051c551a7f2e3c0c9fbb7eb" dependencies = [ "cc", ] @@ -9240,9 +9723,9 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.20" +version = "1.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090" +checksum = "b97ed7a9823b74f99c7742f5336af7be5ecd3eeafcb1507d1fa93347b1d589b0" dependencies = [ "serde", ] @@ -9255,29 +9738,38 @@ checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" [[package]] name = "serde" -version = "1.0.193" +version = "1.0.196" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25dd9975e68d0cb5aa1120c288333fc98731bd1dd12f561e468ea4728c042b89" +checksum = "870026e60fa08c69f064aa766c10f10b1d62db9ccd4d0abb206472bee0ce3b32" dependencies = [ "serde_derive", ] +[[package]] +name = "serde_bytes" +version = "0.11.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b8497c313fd43ab992087548117643f6fcd935cbf36f176ffda0aacf9591734" +dependencies = [ + "serde", +] + [[package]] name = "serde_derive" -version = "1.0.193" +version = "1.0.196" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3" +checksum = "33c85360c95e7d137454dc81d9a4ed2b8efd8fbe19cee57357b32b9771fccb67" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] name = "serde_json" -version = "1.0.108" +version = "1.0.113" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b" +checksum = "69801b70b1c3dac963ecb03a364ba0ceda9cf60c71cfe475e99864759c8b8a79" dependencies = [ "itoa", "ryu", @@ -9286,9 +9778,9 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "0.6.4" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12022b835073e5b11e90a14f86838ceb1c8fb0325b72416845c487ac0fa95e80" +checksum = "eb3622f419d1296904700073ea6cc23ad690adbd66f13ea683df73298736f0c1" dependencies = [ "serde", ] @@ -9307,11 +9799,11 @@ dependencies = [ [[package]] name = "serde_yaml" -version = "0.9.27" +version = "0.9.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3cc7a1570e38322cfe4154732e5110f887ea57e22b76f4bfd32b5bdd3368666c" +checksum = "adf8a49373e98a4c5f0ceb5d05aa7c648d75f63774981ed95b7c7443bbd50c6e" dependencies = [ - "indexmap 2.1.0", + "indexmap 2.2.1", "itoa", "ryu", "serde", @@ -9331,17 +9823,6 @@ dependencies = [ "opaque-debug 0.3.0", ] -[[package]] -name = "sha1" -version = "0.10.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" -dependencies = [ - "cfg-if 1.0.0", - "cpufeatures", - "digest 0.10.7", -] - [[package]] name = "sha2" version = "0.8.2" @@ -9397,6 +9878,12 @@ dependencies = [ "lazy_static", ] +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + [[package]] name = "signal-hook-registry" version = "1.4.1" @@ -9406,16 +9893,6 @@ dependencies = [ "libc", ] -[[package]] -name = "signature" -version = "1.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" -dependencies = [ - "digest 0.10.7", - "rand_core 0.6.4", -] - [[package]] name = "signature" version = "2.2.0" @@ -9434,21 +9911,26 @@ checksum = "061507c94fc6ab4ba1c9a0305018408e312e17c041eb63bef8aa726fa33aceae" dependencies = [ "approx", "num-complex", - "num-traits 0.2.17", + "num-traits", "paste", "wide", ] +[[package]] +name = "simple-mermaid" +version = "0.1.0" +source = "git+https://github.com/kianenigma/simple-mermaid.git?rev=e48b187bcfd5cc75111acd9d241f1bd36604344b#e48b187bcfd5cc75111acd9d241f1bd36604344b" + [[package]] name = "simple_logger" -version = "4.2.0" +version = "4.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2230cd5c29b815c9b699fb610b49a5ed65588f3509d9f0108be3a885da629333" +checksum = "8e7e46c8c90251d47d08b28b8a419ffb4aede0f87c2eea95e17d1d5bacbf3ef1" dependencies = [ "colored", "log", "time", - "windows-sys 0.42.0", + "windows-sys 0.48.0", ] [[package]] @@ -9457,6 +9939,12 @@ version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" +[[package]] +name = "siphasher" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54ac45299ccbd390721be55b412d41931911f654fa99e2cb8bfb57184b2061fe" + [[package]] name = "slab" version = "0.4.9" @@ -9474,31 +9962,139 @@ checksum = "826167069c09b99d56f31e9ae5c99049e932a98c9dc2dac47645b08dbbf76ba7" [[package]] name = "smallvec" -version = "1.11.2" +version = "1.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7" + +[[package]] +name = "smol" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e635339259e51ef85ac7aa29a1cd991b957047507288697a690e80ab97d07cad" +dependencies = [ + "async-channel 2.1.1", + "async-executor", + "async-fs", + "async-io", + "async-lock 3.3.0", + "async-net", + "async-process", + "blocking", + "futures-lite", +] + +[[package]] +name = "smoldot" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" +checksum = "e6d1eaa97d77be4d026a1e7ffad1bb3b78448763b357ea6f8188d3e6f736a9b9" +dependencies = [ + "arrayvec 0.7.4", + "async-lock 3.3.0", + "atomic-take", + "base64 0.21.7", + "bip39", + "blake2-rfc", + "bs58 0.5.0", + "chacha20", + "crossbeam-queue", + "derive_more", + "ed25519-zebra 4.0.3", + "either", + "event-listener 4.0.3", + "fnv", + "futures-lite", + "futures-util", + "hashbrown 0.14.3", + "hex", + "hmac 0.12.1", + "itertools 0.12.1", + "libm", + "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.11.4", + "serde", + "serde_json", + "sha2 0.10.8", + "sha3", + "siphasher 1.0.0", + "slab", + "smallvec", + "soketto", + "twox-hash", + "wasmi", + "x25519-dalek 2.0.0", + "zeroize", +] + +[[package]] +name = "smoldot-light" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5496f2d116b7019a526b1039ec2247dd172b8670633b1a64a614c9ea12c9d8c7" +dependencies = [ + "async-channel 2.1.1", + "async-lock 3.3.0", + "base64 0.21.7", + "blake2-rfc", + "derive_more", + "either", + "event-listener 4.0.3", + "fnv", + "futures-channel", + "futures-lite", + "futures-util", + "hashbrown 0.14.3", + "hex", + "itertools 0.12.1", + "log", + "lru 0.12.2", + "no-std-net", + "parking_lot 0.12.1", + "pin-project", + "rand 0.8.5", + "rand_chacha 0.3.1", + "serde", + "serde_json", + "siphasher 1.0.0", + "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.4" +version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58021967fd0a5eeeb23b08df6cc244a4d4a5b4aec1d27c9e02fad1a58b4cd74e" +checksum = "850948bee068e713b8ab860fe1adc4d109676ab4c3b621fd8147f06b261f2f85" dependencies = [ - "aes-gcm 0.10.3", - "blake2", + "aes-gcm", + "blake2 0.10.6", "chacha20poly1305", "curve25519-dalek 4.1.1", "rand_core 0.6.4", - "ring 0.17.5", + "ring 0.17.7", "rustc_version", "sha2 0.10.8", - "subtle", + "subtle 2.5.0", ] [[package]] @@ -9530,7 +10126,7 @@ dependencies = [ "base64 0.13.1", "bytes", "flate2", - "futures 0.3.29", + "futures 0.3.30", "http", "httparse", "log", @@ -9541,7 +10137,7 @@ dependencies = [ [[package]] name = "sp-api" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ "hash-db", "log", @@ -9549,10 +10145,11 @@ dependencies = [ "scale-info", "sp-api-proc-macro", "sp-core", + "sp-externalities 0.19.0", "sp-metadata-ir", "sp-runtime", "sp-state-machine", - "sp-std 5.0.0", + "sp-std 8.0.0", "sp-trie", "sp-version", "thiserror", @@ -9561,79 +10158,96 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ "Inflector", - "blake2", + "blake2 0.10.6", "expander", - "proc-macro-crate", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] name = "sp-application-crypto" -version = "7.0.0" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +version = "23.0.0" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ "parity-scale-codec", "scale-info", "serde", "sp-core", "sp-io", - "sp-std 5.0.0", + "sp-std 8.0.0", ] [[package]] name = "sp-arithmetic" -version = "6.0.0" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +version = "16.0.0" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ "integer-sqrt", - "num-traits 0.2.17", + "num-traits", "parity-scale-codec", "scale-info", "serde", - "sp-std 5.0.0", + "sp-std 8.0.0", "static_assertions", ] +[[package]] +name = "sp-ark-bls12-381" +version = "0.4.2" +source = "git+https://github.com/paritytech/arkworks-substrate#caa2eed74beb885dd07c7db5f916f2281dad818f" +dependencies = [ + "ark-bls12-381-ext", + "sp-crypto-ec-utils", +] + +[[package]] +name = "sp-ark-ed-on-bls12-381-bandersnatch" +version = "0.4.2" +source = "git+https://github.com/paritytech/arkworks-substrate#caa2eed74beb885dd07c7db5f916f2281dad818f" +dependencies = [ + "ark-ed-on-bls12-381-bandersnatch-ext", + "sp-crypto-ec-utils", +] + [[package]] name = "sp-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ "parity-scale-codec", "scale-info", "sp-api", "sp-application-crypto", "sp-runtime", - "sp-std 5.0.0", + "sp-std 8.0.0", ] [[package]] name = "sp-block-builder" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ - "parity-scale-codec", "sp-api", "sp-inherents", "sp-runtime", - "sp-std 5.0.0", + "sp-std 8.0.0", ] [[package]] name = "sp-blockchain" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ - "futures 0.3.29", + "futures 0.3.30", "log", - "lru", "parity-scale-codec", "parking_lot 0.12.1", + "schnellru", "sp-api", "sp-consensus", "sp-database", @@ -9645,10 +10259,10 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.10.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ "async-trait", - "futures 0.3.29", + "futures 0.3.30", "log", "sp-core", "sp-inherents", @@ -9660,25 +10274,24 @@ dependencies = [ [[package]] name = "sp-consensus-aura" version = "0.10.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ "async-trait", "parity-scale-codec", "scale-info", "sp-api", "sp-application-crypto", - "sp-consensus", "sp-consensus-slots", "sp-inherents", "sp-runtime", - "sp-std 5.0.0", + "sp-std 8.0.0", "sp-timestamp", ] [[package]] name = "sp-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ "async-trait", "parity-scale-codec", @@ -9686,20 +10299,18 @@ dependencies = [ "serde", "sp-api", "sp-application-crypto", - "sp-consensus", "sp-consensus-slots", "sp-core", "sp-inherents", - "sp-keystore", "sp-runtime", - "sp-std 5.0.0", + "sp-std 8.0.0", "sp-timestamp", ] [[package]] name = "sp-consensus-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ "finality-grandpa", "log", @@ -9711,109 +10322,115 @@ dependencies = [ "sp-core", "sp-keystore", "sp-runtime", - "sp-std 5.0.0", + "sp-std 8.0.0", ] [[package]] name = "sp-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-std 5.0.0", + "sp-std 8.0.0", "sp-timestamp", ] [[package]] name = "sp-core" -version = "7.0.0" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +version = "21.0.0" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ - "array-bytes", + "array-bytes 6.2.2", + "bandersnatch_vrfs", + "bip39", "bitflags 1.3.2", - "blake2", + "blake2 0.10.6", "bounded-collections", - "bs58 0.4.0", + "bs58 0.5.0", "dyn-clonable", - "ed25519-zebra", - "futures 0.3.29", + "ed25519-zebra 3.1.0", + "futures 0.3.30", "hash-db", "hash256-std-hasher", "impl-serde", - "lazy_static", + "itertools 0.10.5", "libsecp256k1", "log", - "merlin", + "merlin 3.0.0", "parity-scale-codec", "parking_lot 0.12.1", "paste", "primitive-types", "rand 0.8.5", - "regex", "scale-info", - "schnorrkel", + "schnorrkel 0.11.4", "secp256k1", "secrecy", "serde", - "sp-core-hashing 5.0.0", - "sp-debug-derive", - "sp-externalities", - "sp-runtime-interface", - "sp-std 5.0.0", - "sp-storage", + "sp-core-hashing", + "sp-debug-derive 8.0.0", + "sp-externalities 0.19.0", + "sp-runtime-interface 17.0.0", + "sp-std 8.0.0", + "sp-storage 13.0.0", "ss58-registry", "substrate-bip39", "thiserror", - "tiny-bip39", + "tracing", + "w3f-bls", "zeroize", ] [[package]] name = "sp-core-hashing" -version = "5.0.0" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +version = "9.0.0" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ "blake2b_simd", "byteorder", "digest 0.10.7", "sha2 0.10.8", "sha3", - "sp-std 5.0.0", "twox-hash", ] [[package]] -name = "sp-core-hashing" -version = "8.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27449abdfbe41b473e625bce8113745e81d65777dd1d5a8462cf24137930dad8" +name = "sp-core-hashing-proc-macro" +version = "9.0.0" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ - "blake2b_simd", - "byteorder", - "digest 0.10.7", - "sha2 0.10.8", - "sha3", - "sp-std 7.0.0", - "twox-hash", + "quote", + "sp-core-hashing", + "syn 2.0.48", ] [[package]] -name = "sp-core-hashing-proc-macro" -version = "5.0.0" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +name = "sp-crypto-ec-utils" +version = "0.10.0" +source = "git+https://github.com/paritytech/polkadot-sdk#a190e0e9253562fdca9c1b6e9541a7ea0a50c018" dependencies = [ - "proc-macro2", - "quote", - "sp-core-hashing 5.0.0", - "syn 2.0.39", + "ark-bls12-377", + "ark-bls12-377-ext", + "ark-bls12-381", + "ark-bls12-381-ext", + "ark-bw6-761", + "ark-bw6-761-ext", + "ark-ec", + "ark-ed-on-bls12-377", + "ark-ed-on-bls12-377-ext", + "ark-ed-on-bls12-381-bandersnatch", + "ark-ed-on-bls12-381-bandersnatch-ext", + "ark-scale", + "sp-runtime-interface 24.0.0", + "sp-std 14.0.0", ] [[package]] name = "sp-database" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ "kvdb", "parking_lot 0.12.1", @@ -9821,12 +10438,22 @@ dependencies = [ [[package]] name = "sp-debug-derive" -version = "5.0.0" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +version = "8.0.0" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.48", +] + +[[package]] +name = "sp-debug-derive" +version = "14.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk#a190e0e9253562fdca9c1b6e9541a7ea0a50c018" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] @@ -9840,57 +10467,76 @@ dependencies = [ "serde", "sp-inherents", "sp-runtime", - "sp-std 5.0.0", + "sp-std 8.0.0", "thiserror", ] [[package]] name = "sp-externalities" -version = "0.13.0" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +version = "0.19.0" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" +dependencies = [ + "environmental", + "parity-scale-codec", + "sp-std 8.0.0", + "sp-storage 13.0.0", +] + +[[package]] +name = "sp-externalities" +version = "0.25.0" +source = "git+https://github.com/paritytech/polkadot-sdk#a190e0e9253562fdca9c1b6e9541a7ea0a50c018" dependencies = [ "environmental", "parity-scale-codec", - "sp-std 5.0.0", - "sp-storage", + "sp-std 14.0.0", + "sp-storage 19.0.0", +] + +[[package]] +name = "sp-genesis-builder" +version = "0.1.0" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" +dependencies = [ + "serde_json", + "sp-api", + "sp-runtime", + "sp-std 8.0.0", ] [[package]] name = "sp-inherents" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ "async-trait", "impl-trait-for-tuples", "parity-scale-codec", "scale-info", - "sp-core", "sp-runtime", - "sp-std 5.0.0", + "sp-std 8.0.0", "thiserror", ] [[package]] name = "sp-io" -version = "7.0.0" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +version = "23.0.0" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ "bytes", - "ed25519 1.5.3", - "ed25519-dalek 1.0.1", - "futures 0.3.29", + "ed25519-dalek", "libsecp256k1", "log", "parity-scale-codec", "rustversion", "secp256k1", "sp-core", - "sp-externalities", + "sp-externalities 0.19.0", "sp-keystore", - "sp-runtime-interface", + "sp-runtime-interface 17.0.0", "sp-state-machine", - "sp-std 5.0.0", - "sp-tracing", + "sp-std 8.0.0", + "sp-tracing 10.0.0", "sp-trie", "tracing", "tracing-core", @@ -9898,33 +10544,30 @@ dependencies = [ [[package]] name = "sp-keyring" -version = "7.0.0" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +version = "24.0.0" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" 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/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +version = "0.27.0" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ - "futures 0.3.29", "parity-scale-codec", "parking_lot 0.12.1", - "serde", "sp-core", - "sp-externalities", + "sp-externalities 0.19.0", "thiserror", ] [[package]] name = "sp-maybe-compressed-blob" version = "4.1.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ "thiserror", "zstd 0.12.4", @@ -9940,24 +10583,36 @@ dependencies = [ "scale-info", "serde", "sp-runtime", - "sp-std 5.0.0", + "sp-std 8.0.0", ] [[package]] name = "sp-metadata-ir" version = "0.1.0" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ - "frame-metadata", + "frame-metadata 16.0.0", "parity-scale-codec", "scale-info", - "sp-std 5.0.0", + "sp-std 8.0.0", +] + +[[package]] +name = "sp-mixnet" +version = "0.1.0-dev" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" +dependencies = [ + "parity-scale-codec", + "scale-info", + "sp-api", + "sp-application-crypto", + "sp-std 8.0.0", ] [[package]] name = "sp-offchain" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ "sp-api", "sp-core", @@ -9966,8 +10621,8 @@ dependencies = [ [[package]] name = "sp-panic-handler" -version = "5.0.0" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +version = "8.0.0" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ "backtrace", "lazy_static", @@ -9977,7 +10632,7 @@ dependencies = [ [[package]] name = "sp-rpc" version = "6.0.0" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ "rustc-hash", "serde", @@ -9986,9 +10641,10 @@ dependencies = [ [[package]] name = "sp-runtime" -version = "7.0.0" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +version = "24.0.0" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ + "docify", "either", "hash256-std-hasher", "impl-trait-for-tuples", @@ -9998,75 +10654,110 @@ dependencies = [ "rand 0.8.5", "scale-info", "serde", + "simple-mermaid", "sp-application-crypto", "sp-arithmetic", "sp-core", "sp-io", - "sp-std 5.0.0", + "sp-std 8.0.0", "sp-weights", ] [[package]] name = "sp-runtime-interface" -version = "7.0.0" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +version = "17.0.0" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" +dependencies = [ + "bytes", + "impl-trait-for-tuples", + "parity-scale-codec", + "primitive-types", + "sp-externalities 0.19.0", + "sp-runtime-interface-proc-macro 11.0.0", + "sp-std 8.0.0", + "sp-storage 13.0.0", + "sp-tracing 10.0.0", + "sp-wasm-interface 14.0.0", + "static_assertions", +] + +[[package]] +name = "sp-runtime-interface" +version = "24.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk#a190e0e9253562fdca9c1b6e9541a7ea0a50c018" dependencies = [ "bytes", "impl-trait-for-tuples", "parity-scale-codec", "primitive-types", - "sp-externalities", - "sp-runtime-interface-proc-macro", - "sp-std 5.0.0", - "sp-storage", - "sp-tracing", - "sp-wasm-interface", + "sp-externalities 0.25.0", + "sp-runtime-interface-proc-macro 17.0.0", + "sp-std 14.0.0", + "sp-storage 19.0.0", + "sp-tracing 16.0.0", + "sp-wasm-interface 20.0.0", "static_assertions", ] [[package]] name = "sp-runtime-interface-proc-macro" -version = "6.0.0" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +version = "11.0.0" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" +dependencies = [ + "Inflector", + "expander", + "proc-macro-crate 3.1.0", + "proc-macro2", + "quote", + "syn 2.0.48", +] + +[[package]] +name = "sp-runtime-interface-proc-macro" +version = "17.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk#a190e0e9253562fdca9c1b6e9541a7ea0a50c018" dependencies = [ "Inflector", - "proc-macro-crate", + "expander", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] name = "sp-session" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ "parity-scale-codec", "scale-info", "sp-api", "sp-core", + "sp-keystore", "sp-runtime", "sp-staking", - "sp-std 5.0.0", + "sp-std 8.0.0", ] [[package]] name = "sp-staking" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ + "impl-trait-for-tuples", "parity-scale-codec", "scale-info", "serde", "sp-core", "sp-runtime", - "sp-std 5.0.0", + "sp-std 8.0.0", ] [[package]] name = "sp-state-machine" -version = "0.13.0" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +version = "0.28.0" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ "hash-db", "log", @@ -10075,60 +10766,107 @@ dependencies = [ "rand 0.8.5", "smallvec", "sp-core", - "sp-externalities", + "sp-externalities 0.19.0", "sp-panic-handler", - "sp-std 5.0.0", + "sp-std 8.0.0", "sp-trie", "thiserror", "tracing", + "trie-db", +] + +[[package]] +name = "sp-statement-store" +version = "4.0.0-dev" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" +dependencies = [ + "aes-gcm", + "curve25519-dalek 4.1.1", + "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 0.19.0", + "sp-runtime", + "sp-runtime-interface 17.0.0", + "sp-std 8.0.0", + "thiserror", + "x25519-dalek 2.0.0", ] [[package]] name = "sp-std" -version = "5.0.0" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +version = "8.0.0" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" [[package]] name = "sp-std" -version = "7.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1de8eef39962b5b97478719c493bed2926cf70cb621005bbf68ebe58252ff986" +version = "14.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk#a190e0e9253562fdca9c1b6e9541a7ea0a50c018" + +[[package]] +name = "sp-storage" +version = "13.0.0" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" +dependencies = [ + "impl-serde", + "parity-scale-codec", + "ref-cast", + "serde", + "sp-debug-derive 8.0.0", + "sp-std 8.0.0", +] [[package]] name = "sp-storage" -version = "7.0.0" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +version = "19.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk#a190e0e9253562fdca9c1b6e9541a7ea0a50c018" dependencies = [ "impl-serde", "parity-scale-codec", "ref-cast", "serde", - "sp-debug-derive", - "sp-std 5.0.0", + "sp-debug-derive 14.0.0", + "sp-std 14.0.0", ] [[package]] name = "sp-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ "async-trait", - "futures-timer", - "log", "parity-scale-codec", "sp-inherents", "sp-runtime", - "sp-std 5.0.0", + "sp-std 8.0.0", "thiserror", ] [[package]] name = "sp-tracing" -version = "6.0.0" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +version = "10.0.0" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" +dependencies = [ + "parity-scale-codec", + "sp-std 8.0.0", + "tracing", + "tracing-core", + "tracing-subscriber", +] + +[[package]] +name = "sp-tracing" +version = "16.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk#a190e0e9253562fdca9c1b6e9541a7ea0a50c018" dependencies = [ "parity-scale-codec", - "sp-std 5.0.0", + "sp-std 14.0.0", "tracing", "tracing-core", "tracing-subscriber", @@ -10137,7 +10875,7 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ "sp-api", "sp-runtime", @@ -10146,36 +10884,36 @@ dependencies = [ [[package]] name = "sp-transaction-storage-proof" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ "async-trait", - "log", "parity-scale-codec", "scale-info", "sp-core", "sp-inherents", "sp-runtime", - "sp-std 5.0.0", + "sp-std 8.0.0", "sp-trie", ] [[package]] name = "sp-trie" -version = "7.0.0" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +version = "22.0.0" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ - "ahash 0.8.6", + "ahash 0.8.7", "hash-db", - "hashbrown 0.13.2", "lazy_static", "memory-db", "nohash-hasher", "parity-scale-codec", "parking_lot 0.12.1", + "rand 0.8.5", "scale-info", "schnellru", "sp-core", - "sp-std 5.0.0", + "sp-externalities 0.19.0", + "sp-std 8.0.0", "thiserror", "tracing", "trie-db", @@ -10184,8 +10922,8 @@ dependencies = [ [[package]] name = "sp-version" -version = "5.0.0" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +version = "22.0.0" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ "impl-serde", "parity-scale-codec", @@ -10194,49 +10932,61 @@ dependencies = [ "serde", "sp-core-hashing-proc-macro", "sp-runtime", - "sp-std 5.0.0", + "sp-std 8.0.0", "sp-version-proc-macro", "thiserror", ] [[package]] name = "sp-version-proc-macro" -version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +version = "8.0.0" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ "parity-scale-codec", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] name = "sp-wasm-interface" -version = "7.0.0" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +version = "14.0.0" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ "anyhow", "impl-trait-for-tuples", "log", "parity-scale-codec", - "sp-std 5.0.0", - "wasmi", + "sp-std 8.0.0", + "wasmtime", +] + +[[package]] +name = "sp-wasm-interface" +version = "20.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk#a190e0e9253562fdca9c1b6e9541a7ea0a50c018" +dependencies = [ + "anyhow", + "impl-trait-for-tuples", + "log", + "parity-scale-codec", + "sp-std 14.0.0", "wasmtime", ] [[package]] name = "sp-weights" -version = "4.0.0" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +version = "20.0.0" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ + "bounded-collections", "parity-scale-codec", "scale-info", "serde", "smallvec", "sp-arithmetic", - "sp-core", - "sp-debug-derive", - "sp-std 5.0.0", + "sp-debug-derive 8.0.0", + "sp-std 8.0.0", ] [[package]] @@ -10252,30 +11002,31 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" [[package]] -name = "spki" -version = "0.6.0" +name = "spinners" +version = "4.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67cf02bbac7a337dc36e4f5a693db6c21e7863f45070f7064577eb4367a3212b" +checksum = "a0ef947f358b9c238923f764c72a4a9d42f2d637c46e059dbd319d6e7cfb4f82" dependencies = [ - "base64ct", - "der 0.6.1", + "lazy_static", + "maplit", + "strum 0.24.1", ] [[package]] name = "spki" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d1e996ef02c474957d681f1b05213dfb0abab947b446a62d37770b23500184a" +checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" dependencies = [ "base64ct", - "der 0.7.8", + "der", ] [[package]] name = "ss58-registry" -version = "1.44.0" +version = "1.46.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35935738370302d5e33963665b77541e4b990a3e919ec904c837a56cfc891de1" +checksum = "b1114ee5900b8569bbc8b1a014a942f937b752af4b44f4607430b5f86cedaac0" dependencies = [ "Inflector", "num-format", @@ -10338,9 +11089,15 @@ 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.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "290d54ea6f91c969195bdbcd7442c8c2a2ba87da8bf60a7ee86a235d4bc1e125" + [[package]] name = "strum_macros" version = "0.24.3" @@ -10355,22 +11112,16 @@ dependencies = [ ] [[package]] -name = "stun" -version = "0.4.4" +name = "strum_macros" +version = "0.25.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7e94b1ec00bad60e6410e058b52f1c66de3dc5fe4d62d09b3e52bb7d3b73e25" +checksum = "23dc1fa9ac9c169a78ba62f0b841814b7abae11bdd047b9c58f893439e309ea0" dependencies = [ - "base64 0.13.1", - "crc", - "lazy_static", - "md-5", - "rand 0.8.5", - "ring 0.16.20", - "subtle", - "thiserror", - "tokio", - "url", - "webrtc-util", + "heck 0.4.1", + "proc-macro2", + "quote", + "rustversion", + "syn 2.0.48", ] [[package]] @@ -10381,7 +11132,7 @@ checksum = "e620c7098893ba667438b47169c00aacdd9e7c10e042250ce2b60b087ec97328" dependencies = [ "hmac 0.11.0", "pbkdf2 0.8.0", - "schnorrkel", + "schnorrkel 0.9.1", "sha2 0.9.9", "zeroize", ] @@ -10389,19 +11140,16 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" version = "3.0.0" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" -dependencies = [ - "platforms 2.0.0", -] +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" [[package]] name = "substrate-frame-rpc-system" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ "frame-system-rpc-runtime-api", - "futures 0.3.29", - "jsonrpsee", + "futures 0.3.30", + "jsonrpsee 0.16.3", "log", "parity-scale-codec", "sc-rpc-api", @@ -10416,7 +11164,7 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.10.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ "hyper", "log", @@ -10428,10 +11176,10 @@ dependencies = [ [[package]] name = "substrate-rpc-client" version = "0.10.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ "async-trait", - "jsonrpsee", + "jsonrpsee 0.16.3", "log", "sc-rpc-api", "serde", @@ -10441,34 +11189,32 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" version = "5.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ "ansi_term", "build-helper", "cargo_metadata", "filetime", + "parity-wasm", "sp-maybe-compressed-blob", - "strum", + "strum 0.24.1", "tempfile", - "toml 0.7.8", + "toml 0.8.8", "walkdir", "wasm-opt", ] [[package]] -name = "substring" -version = "1.4.5" +name = "subtle" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42ee6433ecef213b2e72f587ef64a2f5943e7cd16fbd82dbe8bc07486c534c86" -dependencies = [ - "autocfg", -] +checksum = "2d67a5a62ba6e01cb2192ff309324cb4875d0c451d55fe2319433abe7a05a8ee" [[package]] name = "subtle" -version = "2.4.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" +checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" [[package]] name = "subweight-core" @@ -10476,93 +11222,116 @@ version = "3.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ee5751d8385836e91a9b7c613e1e7e11f97a4c8a867d6f45f556497d2cfb53c1" dependencies = [ - "clap 4.4.11", + "clap 4.4.18", "fancy-regex", "git-version", "glob", "lazy_static", "log", "proc-macro2", - "semver 1.0.20", + "semver 1.0.21", "serde", "serde_json", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] name = "subxt" -version = "0.28.0" -source = "git+https://github.com/duniter/subxt.git?branch=duniter-substrate-v0.9.42#64bde2b02a30e619b8efede5eec46104c600e15c" +version = "0.34.0" +source = "git+https://github.com/duniter/subxt?branch=subxt-v0.34.0-duniter-substrate-v1.6.0#b648c5e3a260d4e7d47df42d784ad4c723637411" dependencies = [ + "async-trait", "base58", - "blake2", + "blake2 0.10.6", "derivative", "either", - "frame-metadata", - "futures 0.3.29", - "getrandom 0.2.11", + "frame-metadata 16.0.0", + "futures 0.3.30", "hex", "impl-serde", - "jsonrpsee", + "instant", + "jsonrpsee 0.21.0", "parity-scale-codec", - "parking_lot 0.12.1", "primitive-types", - "scale-bits 0.3.0", - "scale-decode 0.5.0", - "scale-encode 0.1.2", + "scale-bits", + "scale-decode", + "scale-encode", "scale-info", - "scale-value 0.7.0", + "scale-value", "serde", "serde_json", "sp-core", - "sp-core-hashing 8.0.0", + "sp-core-hashing", "sp-runtime", + "subxt-lightclient", "subxt-macro", "subxt-metadata", "thiserror", + "tokio-util", "tracing", + "url", ] [[package]] name = "subxt-codegen" -version = "0.28.0" -source = "git+https://github.com/duniter/subxt.git?branch=duniter-substrate-v0.9.42#64bde2b02a30e619b8efede5eec46104c600e15c" +version = "0.34.0" +source = "git+https://github.com/duniter/subxt?branch=subxt-v0.34.0-duniter-substrate-v1.6.0#b648c5e3a260d4e7d47df42d784ad4c723637411" dependencies = [ - "darling", - "frame-metadata", + "frame-metadata 16.0.0", "heck 0.4.1", "hex", - "jsonrpsee", + "jsonrpsee 0.21.0", "parity-scale-codec", "proc-macro2", "quote", "scale-info", + "scale-typegen", "subxt-metadata", - "syn 1.0.109", + "syn 2.0.48", + "thiserror", + "tokio", +] + +[[package]] +name = "subxt-lightclient" +version = "0.34.0" +source = "git+https://github.com/duniter/subxt?branch=subxt-v0.34.0-duniter-substrate-v1.6.0#b648c5e3a260d4e7d47df42d784ad4c723637411" +dependencies = [ + "futures 0.3.30", + "futures-util", + "serde", + "serde_json", + "smoldot-light", "thiserror", "tokio", + "tokio-stream", + "tracing", ] [[package]] name = "subxt-macro" -version = "0.28.0" -source = "git+https://github.com/duniter/subxt.git?branch=duniter-substrate-v0.9.42#64bde2b02a30e619b8efede5eec46104c600e15c" +version = "0.34.0" +source = "git+https://github.com/duniter/subxt?branch=subxt-v0.34.0-duniter-substrate-v1.6.0#b648c5e3a260d4e7d47df42d784ad4c723637411" dependencies = [ - "darling", + "darling 0.20.4", + "parity-scale-codec", "proc-macro-error", + "quote", + "scale-typegen", "subxt-codegen", - "syn 1.0.109", + "syn 2.0.48", ] [[package]] name = "subxt-metadata" -version = "0.28.0" -source = "git+https://github.com/duniter/subxt.git?branch=duniter-substrate-v0.9.42#64bde2b02a30e619b8efede5eec46104c600e15c" +version = "0.34.0" +source = "git+https://github.com/duniter/subxt?branch=subxt-v0.34.0-duniter-substrate-v1.6.0#b648c5e3a260d4e7d47df42d784ad4c723637411" dependencies = [ - "frame-metadata", + "frame-metadata 16.0.0", "parity-scale-codec", "scale-info", - "sp-core-hashing 8.0.0", + "sp-core-hashing", + "thiserror", ] [[package]] @@ -10578,9 +11347,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.39" +version = "2.0.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23e78b90f2fcf45d3e842032ce32e3f2d1545ba6636271dcbf24fa306d87be7a" +checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" dependencies = [ "proc-macro2", "quote", @@ -10661,21 +11430,21 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "target-lexicon" -version = "0.12.12" +version = "0.12.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14c39fd04924ca3a864207c66fc2cd7d22d7c016007f9ce846cbb9326331930a" +checksum = "69758bda2e78f098e4ccb393021a0963bb3442eac05f135c30f61b7370bbafae" [[package]] name = "tempfile" -version = "3.8.1" +version = "3.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ef1adac450ad7f4b3c28589471ade84f25f731a7a0fe30d71dfa9f60fd808e5" +checksum = "01ce4141aa927a6d1bd34a041795abd0db1cccba5d5f24b009f694bdf3a1f3fa" dependencies = [ "cfg-if 1.0.0", - "fastrand 2.0.1", + "fastrand", "redox_syscall 0.4.1", - "rustix 0.38.25", - "windows-sys 0.48.0", + "rustix 0.38.30", + "windows-sys 0.52.0", ] [[package]] @@ -10696,13 +11465,23 @@ dependencies = [ [[package]] name = "termcolor" -version = "1.4.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff1bc3d3f05aff0403e8ac0d92ced918ec05b666a43f83297ccef5bea8a3d449" +checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" dependencies = [ "winapi-util", ] +[[package]] +name = "terminal_size" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21bebf2b7c9e0a515f6e0f8c51dc0f8e4696391e6f1ff30379559f8365fb0df7" +dependencies = [ + "rustix 0.38.30", + "windows-sys 0.48.0", +] + [[package]] name = "termtree" version = "0.4.1" @@ -10726,22 +11505,22 @@ checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d" [[package]] name = "thiserror" -version = "1.0.50" +version = "1.0.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9a7210f5c9a7156bb50aa36aed4c95afb51df0df00713949448cf9e97d382d2" +checksum = "d54378c645627613241d077a3a79db965db602882668f9136ac42af9ecb730ad" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.50" +version = "1.0.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8" +checksum = "fa0faa943b50f3db30a20aa7e265dbc66076993efed8463e8de414e5d06d3471" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] @@ -10769,15 +11548,27 @@ dependencies = [ "num_cpus", ] +[[package]] +name = "tikv-jemalloc-sys" +version = "0.5.4+5.3.0-patched" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9402443cb8fd499b6f327e40565234ff34dbda27460c5b47db0db77443dd85d1" +dependencies = [ + "cc", + "libc", +] + [[package]] name = "time" -version = "0.3.23" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59e399c068f43a5d116fedaf73b203fa4f9c519f17e2b34f63221d3792f81446" +checksum = "f657ba42c3f86e7680e53c8cd3af8abbe56b5491790b46e22e19c0d57463583e" dependencies = [ + "deranged", "itoa", "libc", "num_threads", + "powerfmt", "serde", "time-core", "time-macros", @@ -10785,46 +11576,26 @@ 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.10" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96ba15a897f3c86766b757e5ac7221554c6750054d74d5b28844fce5fb36a6c4" +checksum = "26197e33420244aeb70c3e8c78376ca46571bc4e701e4791c2cd9f57dcb3a43f" dependencies = [ "time-core", ] [[package]] -name = "tiny-bip39" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62cc94d358b5a1e84a5cb9109f559aa3c4d634d2b1b4de3d0fa4adc7c78e2861" -dependencies = [ - "anyhow", - "hmac 0.12.1", - "once_cell", - "pbkdf2 0.11.0", - "rand 0.8.5", - "rustc-hash", - "sha2 0.10.8", - "thiserror", - "unicode-normalization", - "wasm-bindgen", - "zeroize", -] - -[[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]] @@ -10844,14 +11615,14 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.34.0" +version = "1.35.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0c014766411e834f7af5b8f4cf46257aab4036ca95e9d2c144a10f59ad6f5b9" +checksum = "c89b4efa943be685f629b149f53829423f8f5531ea21249408e8e2f8671ec104" dependencies = [ "backtrace", "bytes", "libc", - "mio 0.8.9", + "mio 0.8.10", "num_cpus", "parking_lot 0.12.1", "pin-project-lite 0.2.13", @@ -10869,7 +11640,7 @@ checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] @@ -10883,14 +11654,14 @@ dependencies = [ ] [[package]] -name = "tokio-rustls" -version = "0.23.4" +name = "tokio-retry" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c43ee83903113e03984cb9e5cebe6c04a5116269e900e3ddba8f068a62adda59" +checksum = "7f57eb36ecbe0fc510036adff84824dd3c24bb781e21bfa67b69d556aa85214f" dependencies = [ - "rustls 0.20.9", + "pin-project", + "rand 0.8.5", "tokio", - "webpki 0.22.4", ] [[package]] @@ -10899,7 +11670,18 @@ version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" dependencies = [ - "rustls 0.21.9", + "rustls 0.21.10", + "tokio", +] + +[[package]] +name = "tokio-rustls" +version = "0.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "775e0c0f0adb3a2f22a00c4745d728b479985fc15ee7ca6a2608388c5569860f" +dependencies = [ + "rustls 0.22.2", + "rustls-pki-types", "tokio", ] @@ -10941,14 +11723,14 @@ dependencies = [ [[package]] name = "toml" -version = "0.7.8" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd79e69d3b627db300ff956027cc6c3798cef26d22526befdfcd12feeb6d2257" +checksum = "a1a195ec8c9da26928f773888e0742ca3ca1040c6cd859c919c9f59c1954ab35" dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit", + "toml_edit 0.21.0", ] [[package]] @@ -10962,11 +11744,22 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.19.15" +version = "0.20.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70f427fce4d84c72b5b732388bf4a9f4531b53f74e2887e3ecb2481f68f66d81" +dependencies = [ + "indexmap 2.2.1", + "toml_datetime", + "winnow", +] + +[[package]] +name = "toml_edit" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" +checksum = "d34d383cd00a163b4a5b85053df514d45bc330f6de7737edfe0a93311d1eaa03" dependencies = [ - "indexmap 2.1.0", + "indexmap 2.2.1", "serde", "serde_spanned", "toml_datetime", @@ -10979,6 +11772,10 @@ version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" dependencies = [ + "futures-core", + "futures-util", + "pin-project", + "pin-project-lite 0.2.13", "tower-layer", "tower-service", "tracing", @@ -10986,11 +11783,11 @@ 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.4.2", "bytes", "futures-core", "futures-util", @@ -11034,7 +11831,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] @@ -11103,9 +11900,9 @@ dependencies = [ [[package]] name = "trie-db" -version = "0.27.1" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "767abe6ffed88a1889671a102c2861ae742726f52e0a5a425b92c9fbfa7e9c85" +checksum = "ff28e0f815c2fea41ebddf148e008b077d2faddb026c9555b29696114d602642" dependencies = [ "hash-db", "hashbrown 0.13.2", @@ -11171,32 +11968,31 @@ 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/duniter/substrate?branch=duniter-substrate-v0.9.42#f1c396107a2312e5e029a5fe8e36f05234fc2511" +source = "git+https://github.com/duniter/duniter-polkadot-sdk?branch=duniter-substrate-v1.6.0#c84530c57a6f9ab808a92f6b5d29338acf1c6e4f" dependencies = [ "async-trait", - "clap 4.4.11", + "clap 4.4.18", "frame-remote-externalities", "hex", "log", "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-debug-derive 8.0.0", + "sp-externalities 0.19.0", "sp-inherents", "sp-io", "sp-keystore", @@ -11217,25 +12013,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.29", - "log", - "md-5", - "rand 0.8.5", - "ring 0.16.20", - "stun", - "thiserror", - "tokio", - "webrtc-util", -] - [[package]] name = "twox-hash" version = "1.6.3" @@ -11335,9 +12112,9 @@ 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" @@ -11372,16 +12149,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" @@ -11389,7 +12156,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea" dependencies = [ "crypto-common", - "subtle", + "subtle 2.5.0", ] [[package]] @@ -11403,9 +12170,9 @@ dependencies = [ [[package]] name = "unsafe-libyaml" -version = "0.2.9" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f28467d3e1d3c6586d8f25fa243f544f5800fec42d97032474e17222c2b75cfa" +checksum = "ab4c90930b95a82d00dc9e9ac071b4991924390d46cbd0dfe566148667605e4b" [[package]] name = "unsigned-varint" @@ -11433,12 +12200,12 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.4.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "143b538f18257fac9cad154828a57c6bf5157e1aa604d4816b5995bf6de87ae5" +checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" dependencies = [ "form_urlencoded", - "idna 0.4.0", + "idna 0.5.0", "percent-encoding", ] @@ -11458,15 +12225,6 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" -[[package]] -name = "uuid" -version = "1.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e395fcf16a7a3d8127ec99782007af141946b4795001f876d54fb0d55978560" -dependencies = [ - "getrandom 0.2.11", -] - [[package]] name = "valuable" version = "0.1.0" @@ -11498,19 +12256,28 @@ 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.1" +name = "w3f-bls" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3c4517f54858c779bbcbf228f4fca63d121bf85fbecb2dc578cdf4a39395690" +checksum = "7335e4c132c28cc43caef6adb339789e599e39adbe78da0c4d547fad48cbc331" +dependencies = [ + "ark-bls12-377", + "ark-bls12-381", + "ark-ec", + "ark-ff", + "ark-serialize", + "ark-serialize-derive", + "arrayref", + "constcat", + "digest 0.10.7", + "rand 0.8.5", + "rand_chacha 0.3.1", + "rand_core 0.6.4", + "sha2 0.10.8", + "sha3", + "thiserror", + "zeroize", +] [[package]] name = "walkdir" @@ -11545,9 +12312,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.88" +version = "0.2.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7daec296f25a1bae309c0cd5c29c4b260e510e6d813c286b19eaadf409d40fce" +checksum = "b1223296a201415c7fad14792dbefaace9bd52b62d33453ade1c5b5f07555406" dependencies = [ "cfg-if 1.0.0", "wasm-bindgen-macro", @@ -11555,24 +12322,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.88" +version = "0.2.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e397f4664c0e4e428e8313a469aaa58310d302159845980fd23b0f22a847f217" +checksum = "fcdc935b63408d58a32f8cc9738a0bffd8f05cc7c002086c6ef20b7312ad9dcd" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.38" +version = "0.4.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9afec9963e3d0994cac82455b2b3502b81a7f40f9a0d32181f7528d9f4b43e02" +checksum = "bde2032aeb86bdfaecc8b261eef3cba735cc426c1f3a3416d1e0791be95fc461" dependencies = [ "cfg-if 1.0.0", "js-sys", @@ -11582,9 +12349,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.88" +version = "0.2.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5961017b3b08ad5f3fe39f1e79877f8ee7c23c5e5fd5eb80de95abc41f1f16b2" +checksum = "3e4c238561b2d428924c49815533a8b9121c664599558a5d9ec51f8a1740a999" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -11592,22 +12359,22 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.88" +version = "0.2.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5353b8dab669f5e10f5bd76df26a9360c748f054f862ff5f3f8aae0c7fb3907" +checksum = "bae1abb6806dc1ad9e560ed242107c0f6c84335f1749dd4e8ddb012ebd5e25a7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.88" +version = "0.2.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d046c5d029ba91a1ed14da14dca44b68bf2f124cfbaf741c54151fdb3e0750b" +checksum = "4d91413b1c31d7539ba5ef2451af3f0b833a005eb27a631cec32bc0635a8602b" [[package]] name = "wasm-instrument" @@ -11620,14 +12387,14 @@ dependencies = [ [[package]] name = "wasm-opt" -version = "0.111.0" +version = "0.116.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84a303793cbc01fb96551badfc7367db6007396bba6bac97936b3c8b6f7fdb41" +checksum = "fc942673e7684671f0c5708fc18993569d184265fd5223bb51fc8e5b9b6cfd52" dependencies = [ "anyhow", "libc", - "strum", - "strum_macros", + "strum 0.24.1", + "strum_macros 0.24.3", "tempfile", "thiserror", "wasm-opt-cxx-sys", @@ -11636,9 +12403,9 @@ dependencies = [ [[package]] name = "wasm-opt-cxx-sys" -version = "0.111.0" +version = "0.116.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9c9deb56f8a9f2ec177b3bd642a8205621835944ed5da55f2388ef216aca5a4" +checksum = "8c57b28207aa724318fcec6575fe74803c23f6f266fce10cbc9f3f116762f12e" dependencies = [ "anyhow", "cxx", @@ -11648,15 +12415,14 @@ dependencies = [ [[package]] name = "wasm-opt-sys" -version = "0.111.0" +version = "0.116.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4432e28b542738a9776cedf92e8a99d8991c7b4667ee2c7ccddfb479dd2856a7" +checksum = "8a1cce564dc768dacbdb718fc29df2dba80bd21cb47d8f77ae7e3d95ceb98cbe" dependencies = [ "anyhow", "cc", "cxx", "cxx-build", - "regex", ] [[package]] @@ -11665,7 +12431,7 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "be0ecb0db480561e9a7642b5d3e4187c128914e58aa84330b9493e3eb68c5e7f" dependencies = [ - "futures 0.3.29", + "futures 0.3.30", "js-sys", "parking_lot 0.11.2", "pin-utils", @@ -11676,53 +12442,59 @@ dependencies = [ [[package]] name = "wasmi" -version = "0.13.2" +version = "0.31.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06c326c93fbf86419608361a2c925a31754cf109da1b8b55737070b4d6669422" +checksum = "77a8281d1d660cdf54c76a3efa9ddd0c270cada1383a995db3ccb43d166456c7" dependencies = [ - "parity-wasm", - "wasmi-validation", + "smallvec", + "spin 0.9.8", + "wasmi_arena", "wasmi_core", + "wasmparser-nostd", ] [[package]] -name = "wasmi-validation" -version = "0.5.0" +name = "wasmi_arena" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91ff416ad1ff0c42e5a926ed5d5fab74c0f098749aa0ad8b2a34b982ce0e867b" -dependencies = [ - "parity-wasm", -] +checksum = "104a7f73be44570cac297b3035d76b169d6599637631cf37a1703326a0727073" [[package]] name = "wasmi_core" -version = "0.2.1" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57d20cb3c59b788653d99541c646c561c9dd26506f25c0cebfe810659c54c6d7" +checksum = "dcf1a7db34bff95b85c261002720c00c3a6168256dcb93041d3fa2054d19856a" dependencies = [ "downcast-rs", "libm", - "memory_units", - "num-rational", - "num-traits 0.2.17", - "region", + "num-traits", + "paste", ] [[package]] name = "wasmparser" -version = "0.100.0" +version = "0.102.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64b20236ab624147dfbb62cf12a19aaf66af0e41b8398838b66e997d07d269d4" +checksum = "48134de3d7598219ab9eaf6b91b15d8e50d31da76b8519fe4ecfcec2cf35104b" dependencies = [ "indexmap 1.9.3", "url", ] +[[package]] +name = "wasmparser-nostd" +version = "0.100.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9157cab83003221bfd385833ab587a039f5d6fa7304854042ba358a3b09e0724" +dependencies = [ + "indexmap-nostd", +] + [[package]] name = "wasmtime" -version = "6.0.2" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76a222f5fa1e14b2cefc286f1b68494d7a965f4bf57ec04c59bb62673d639af6" +checksum = "f907fdead3153cb9bfb7a93bbd5b62629472dc06dee83605358c64c52ed3dda9" dependencies = [ "anyhow", "bincode", @@ -11730,7 +12502,7 @@ dependencies = [ "indexmap 1.9.3", "libc", "log", - "object 0.29.0", + "object 0.30.4", "once_cell", "paste", "psm", @@ -11743,26 +12515,26 @@ dependencies = [ "wasmtime-environ", "wasmtime-jit", "wasmtime-runtime", - "windows-sys 0.42.0", + "windows-sys 0.45.0", ] [[package]] name = "wasmtime-asm-macros" -version = "6.0.2" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4407a7246e7d2f3d8fb1cf0c72fda8dbafdb6dd34d555ae8bea0e5ae031089cc" +checksum = "d3b9daa7c14cd4fa3edbf69de994408d5f4b7b0959ac13fa69d465f6597f810d" dependencies = [ "cfg-if 1.0.0", ] [[package]] name = "wasmtime-cache" -version = "6.0.2" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ceb3adf61d654be0be67fffdce42447b0880481348785be5fe40b5dd7663a4c" +checksum = "c86437fa68626fe896e5afc69234bb2b5894949083586535f200385adfd71213" dependencies = [ "anyhow", - "base64 0.13.1", + "base64 0.21.7", "bincode", "directories-next", "file-per-thread-logger", @@ -11771,15 +12543,15 @@ dependencies = [ "serde", "sha2 0.10.8", "toml 0.5.11", - "windows-sys 0.42.0", + "windows-sys 0.45.0", "zstd 0.11.2+zstd.1.5.2", ] [[package]] name = "wasmtime-cranelift" -version = "6.0.2" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c366bb8647e01fd08cb5589976284b00abfded5529b33d7e7f3f086c68304a4" +checksum = "b1cefde0cce8cb700b1b21b6298a3837dba46521affd7b8c38a9ee2c869eee04" dependencies = [ "anyhow", "cranelift-codegen", @@ -11787,27 +12559,43 @@ dependencies = [ "cranelift-frontend", "cranelift-native", "cranelift-wasm", - "gimli 0.26.2", + "gimli 0.27.3", "log", - "object 0.29.0", + "object 0.30.4", "target-lexicon", "thiserror", "wasmparser", + "wasmtime-cranelift-shared", + "wasmtime-environ", +] + +[[package]] +name = "wasmtime-cranelift-shared" +version = "8.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd041e382ef5aea1b9fc78442394f1a4f6d676ce457e7076ca4cb3f397882f8b" +dependencies = [ + "anyhow", + "cranelift-codegen", + "cranelift-native", + "gimli 0.27.3", + "object 0.30.4", + "target-lexicon", "wasmtime-environ", ] [[package]] name = "wasmtime-environ" -version = "6.0.2" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47b8b50962eae38ee319f7b24900b7cf371f03eebdc17400c1dc8575fc10c9a7" +checksum = "a990198cee4197423045235bf89d3359e69bd2ea031005f4c2d901125955c949" dependencies = [ "anyhow", "cranelift-entity", - "gimli 0.26.2", + "gimli 0.27.3", "indexmap 1.9.3", "log", - "object 0.29.0", + "object 0.30.4", "serde", "target-lexicon", "thiserror", @@ -11817,18 +12605,18 @@ dependencies = [ [[package]] name = "wasmtime-jit" -version = "6.0.2" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffaed4f9a234ba5225d8e64eac7b4a5d13b994aeb37353cde2cbeb3febda9eaa" +checksum = "0de48df552cfca1c9b750002d3e07b45772dd033b0b206d5c0968496abf31244" dependencies = [ - "addr2line 0.17.0", + "addr2line 0.19.0", "anyhow", "bincode", "cfg-if 1.0.0", "cpp_demangle", - "gimli 0.26.2", + "gimli 0.27.3", "log", - "object 0.29.0", + "object 0.30.4", "rustc-demangle", "serde", "target-lexicon", @@ -11836,36 +12624,36 @@ dependencies = [ "wasmtime-jit-debug", "wasmtime-jit-icache-coherence", "wasmtime-runtime", - "windows-sys 0.42.0", + "windows-sys 0.45.0", ] [[package]] name = "wasmtime-jit-debug" -version = "6.0.2" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eed41cbcbf74ce3ff6f1d07d1b707888166dc408d1a880f651268f4f7c9194b2" +checksum = "6e0554b84c15a27d76281d06838aed94e13a77d7bf604bbbaf548aa20eb93846" dependencies = [ - "object 0.29.0", + "object 0.30.4", "once_cell", "rustix 0.36.17", ] [[package]] name = "wasmtime-jit-icache-coherence" -version = "6.0.2" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a28ae1e648461bfdbb79db3efdaee1bca5b940872e4175390f465593a2e54c" +checksum = "aecae978b13f7f67efb23bd827373ace4578f2137ec110bbf6a4a7cde4121bbd" dependencies = [ "cfg-if 1.0.0", "libc", - "windows-sys 0.42.0", + "windows-sys 0.45.0", ] [[package]] name = "wasmtime-runtime" -version = "6.0.2" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e704b126e4252788ccfc3526d4d4511d4b23c521bf123e447ac726c14545217b" +checksum = "658cf6f325232b6760e202e5255d823da5e348fdea827eff0a2a22319000b441" dependencies = [ "anyhow", "cc", @@ -11875,21 +12663,21 @@ dependencies = [ "log", "mach", "memfd", - "memoffset 0.6.5", + "memoffset", "paste", "rand 0.8.5", "rustix 0.36.17", "wasmtime-asm-macros", "wasmtime-environ", "wasmtime-jit-debug", - "windows-sys 0.42.0", + "windows-sys 0.45.0", ] [[package]] name = "wasmtime-types" -version = "6.0.2" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83e5572c5727c1ee7e8f28717aaa8400e4d22dcbd714ea5457d85b5005206568" +checksum = "a4f6fffd2a1011887d57f07654dd112791e872e3ff4a2e626aee8059ee17f06f" dependencies = [ "cranelift-entity", "serde", @@ -11899,31 +12687,21 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.65" +version = "0.3.67" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5db499c5f66323272151db0e666cd34f78617522fb0c1604d31a27c50c206a85" +checksum = "58cd2333b6e0be7a39605f0e255892fd7418a682d8da8fe042fe25128794d2ed" 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 0.16.20", - "untrusted 0.7.1", -] - [[package]] name = "webpki" version = "0.22.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed63aea5ce73d0ff405984102c42de94fc55a6b75765d621c65262469b3c9b53" dependencies = [ - "ring 0.17.5", + "ring 0.17.7", "untrusted 0.9.0", ] @@ -11933,228 +12711,20 @@ version = "0.22.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6c71e40d7d2c34a5106301fb632274ca37242cd0c9d3e64dbece371a40a2d87" dependencies = [ - "webpki 0.22.4", + "webpki", ] [[package]] name = "webpki-roots" -version = "0.25.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14247bb57be4f377dfb94c72830b8ce8fc6beac03cf4bf7b9732eadd414123fc" - -[[package]] -name = "webrtc" -version = "0.6.0" -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 0.16.20", - "rtcp", - "rtp", - "rustls 0.19.1", - "sdp", - "serde", - "serde_json", - "sha2 0.10.8", - "stun", - "thiserror", - "time", - "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.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4a00f4242f2db33307347bd5be53263c52a0331c96c14292118c9a6bb48d267" -dependencies = [ - "aes 0.6.0", - "aes-gcm 0.10.3", - "async-trait", - "bincode", - "block-modes", - "byteorder", - "ccm", - "curve25519-dalek 3.2.0", - "der-parser 8.2.0", - "elliptic-curve 0.12.3", - "hkdf", - "hmac 0.12.1", - "log", - "p256", - "p384", - "rand 0.8.5", - "rand_core 0.6.4", - "rcgen 0.10.0", - "ring 0.16.20", - "rustls 0.19.1", - "sec1 0.3.0", - "serde", - "sha1", - "sha2 0.10.8", - "signature 1.6.4", - "subtle", - "thiserror", - "tokio", - "webpki 0.21.4", - "webrtc-util", - "x25519-dalek 2.0.0", - "x509-parser 0.13.2", -] - -[[package]] -name = "webrtc-ice" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "465a03cc11e9a7d7b4f9f99870558fe37a102b65b93f8045392fef7c67b39e80" -dependencies = [ - "arc-swap", - "async-trait", - "crc", - "log", - "rand 0.8.5", - "serde", - "serde_json", - "stun", - "thiserror", - "tokio", - "turn", - "url", - "uuid", - "waitgroup", - "webrtc-mdns", - "webrtc-util", -] - -[[package]] -name = "webrtc-mdns" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f08dfd7a6e3987e255c4dbe710dde5d94d0f0574f8a21afa95d171376c143106" -dependencies = [ - "log", - "socket2 0.4.10", - "thiserror", - "tokio", - "webrtc-util", -] - -[[package]] -name = "webrtc-media" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f72e1650a8ae006017d1a5280efb49e2610c19ccc3c0905b03b648aee9554991" -dependencies = [ - "byteorder", - "bytes", - "rand 0.8.5", - "rtp", - "thiserror", -] - -[[package]] -name = "webrtc-sctp" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d47adcd9427eb3ede33d5a7f3424038f63c965491beafcc20bc650a2f6679c0" -dependencies = [ - "arc-swap", - "async-trait", - "bytes", - "crc", - "log", - "rand 0.8.5", - "thiserror", - "tokio", - "webrtc-util", -] - -[[package]] -name = "webrtc-srtp" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6183edc4c1c6c0175f8812eefdce84dfa0aea9c3ece71c2bf6ddd3c964de3da5" -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", -] - -[[package]] -name = "webrtc-util" -version = "0.7.0" +version = "0.25.3" 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 0.3.9", -] +checksum = "1778a42e8b3b90bff8d0f5032bf22250792889a5cdc752aa0020c84abe3aaf10" [[package]] name = "weight-analyzer" version = "0.0.0" dependencies = [ - "convert_case", + "convert_case 0.6.0", "glob", "serde", "subweight-core", @@ -12169,14 +12739,14 @@ dependencies = [ "either", "home", "once_cell", - "rustix 0.38.25", + "rustix 0.38.30", ] [[package]] name = "wide" -version = "0.7.13" +version = "0.7.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c68938b57b33da363195412cfc5fc37c9ed49aa9cfe2156fde64b8d2c9498242" +checksum = "89beec544f246e679fc25490e3f8e08003bc4bf612068f325120dad4cea02c1c" dependencies = [ "bytemuck", "safe_arch", @@ -12237,7 +12807,7 @@ version = "0.51.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ca229916c5ee38c2f2bc1e9d8f04df975b4bd93f9955dc69fabb5d91270045c9" dependencies = [ - "windows-core", + "windows-core 0.51.1", "windows-targets 0.48.5", ] @@ -12251,18 +12821,12 @@ dependencies = [ ] [[package]] -name = "windows-sys" -version = "0.42.0" +name = "windows-core" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" +checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows_aarch64_gnullvm 0.42.2", - "windows_aarch64_msvc 0.42.2", - "windows_i686_gnu 0.42.2", - "windows_i686_msvc 0.42.2", - "windows_x86_64_gnu 0.42.2", - "windows_x86_64_gnullvm 0.42.2", - "windows_x86_64_msvc 0.42.2", + "windows-targets 0.52.0", ] [[package]] @@ -12283,6 +12847,15 @@ 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.0", +] + [[package]] name = "windows-targets" version = "0.42.2" @@ -12313,6 +12886,21 @@ dependencies = [ "windows_x86_64_msvc 0.48.5", ] +[[package]] +name = "windows-targets" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" +dependencies = [ + "windows_aarch64_gnullvm 0.52.0", + "windows_aarch64_msvc 0.52.0", + "windows_i686_gnu 0.52.0", + "windows_i686_msvc 0.52.0", + "windows_x86_64_gnu 0.52.0", + "windows_x86_64_gnullvm 0.52.0", + "windows_x86_64_msvc 0.52.0", +] + [[package]] name = "windows_aarch64_gnullvm" version = "0.42.2" @@ -12325,6 +12913,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" + [[package]] name = "windows_aarch64_msvc" version = "0.42.2" @@ -12337,6 +12931,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" + [[package]] name = "windows_i686_gnu" version = "0.42.2" @@ -12349,6 +12949,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" +[[package]] +name = "windows_i686_gnu" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" + [[package]] name = "windows_i686_msvc" version = "0.42.2" @@ -12361,6 +12967,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" +[[package]] +name = "windows_i686_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" + [[package]] name = "windows_x86_64_gnu" version = "0.42.2" @@ -12373,6 +12985,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" + [[package]] name = "windows_x86_64_gnullvm" version = "0.42.2" @@ -12385,6 +13003,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" + [[package]] name = "windows_x86_64_msvc" version = "0.42.2" @@ -12397,11 +13021,17 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" + [[package]] name = "winnow" -version = "0.5.19" +version = "0.5.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "829846f3e3db426d4cee4510841b71a8e58aa2a76b1132579487ae430ccd9c7b" +checksum = "1931d78a9c73861da0134f453bb1f790ce49b2e30eba8410b4b79bac72b46a2d" dependencies = [ "memchr", ] @@ -12458,38 +13088,19 @@ dependencies = [ "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 0.16.20", - "rusticata-macros", - "thiserror", - "time", -] - [[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", @@ -12500,17 +13111,17 @@ name = "xtask" version = "0.1.0" dependencies = [ "anyhow", - "clap 4.4.11", - "frame-metadata", + "clap 4.4.18", + "frame-metadata 16.0.0", "graphql_client", "hex", - "memmap2", + "memmap2 0.5.10", "parity-scale-codec", "placeholder", "reqwest", "run_script", "scale-info", - "scale-value 0.13.0", + "scale-value", "serde", "serde_json", "tera", @@ -12526,7 +13137,7 @@ version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5d9ba232399af1783a58d8eb26f6b5006fbefe2dc9ef36bd283324792d03ea5" dependencies = [ - "futures 0.3.29", + "futures 0.3.30", "log", "nohash-hasher", "parking_lot 0.12.1", @@ -12534,12 +13145,6 @@ dependencies = [ "static_assertions", ] -[[package]] -name = "yap" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2a7eb6d82a11e4d0b8e6bda8347169aff4ccd8235d039bba7c47482d977dcf7" - [[package]] name = "yap" version = "0.11.0" @@ -12557,22 +13162,22 @@ dependencies = [ [[package]] name = "zerocopy" -version = "0.7.26" +version = "0.7.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e97e415490559a91254a2979b4829267a57d2fcd741a98eee8b722fb57289aa0" +checksum = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.7.26" +version = "0.7.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd7e48ccf166952882ca8bd778a43502c64f33bf94c12ebe2a7f08e5a0f6689f" +checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] @@ -12592,7 +13197,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 53abd0ce475e5693d63df10fad5c5db028c8e42e..e0fe00ada660224d02a65285437ee908893f5769 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,123 +21,133 @@ path = "node/src/main.rs" default = ["gdev", "distance-oracle"] gdev = ["gdev-runtime"] # gdev feature enables gdev runtime and gdev command line options g1 = ["g1-runtime"] -constant-fees = ["common-runtime/constant-fees"] # Activate constant fees model, 1 extrinsic = 2 cG +constant-fees = [ +"common-runtime/constant-fees", +"g1-runtime/constant-fees", +"gdev-runtime/constant-fees", +"gtest-runtime/constant-fees", +] # Activate constant fees model, 1 extrinsic = 2 cG gtest = ["gtest-runtime"] embed = [] # embed feature enables embedding raw chainspecs that must be in ./specs/gdev-raw.json runtime-benchmarks = [ - #'g1-runtime', - #'g1-runtime/runtime-benchmarks', - 'gdev-runtime', + 'common-runtime/runtime-benchmarks', + 'g1-runtime/runtime-benchmarks', 'gdev-runtime/runtime-benchmarks', - #'gtest-runtime', - #'gtest-runtime/runtime-benchmarks', + 'gtest-runtime/runtime-benchmarks', 'sc-client-db/runtime-benchmarks', ] try-runtime = [ - #"g1-runtime/try-runtime", + "common-runtime/try-runtime", + "g1-runtime/try-runtime", "gdev-runtime/try-runtime", - #"gtest-runtime/try-runtime", + "gtest-runtime/try-runtime", "try-runtime-cli", ] +std = [ + "common-runtime/std", + "g1-runtime/std", + "gdev-runtime/std", + "gtest-runtime/std", +] [build-dependencies] -clap = { version = "4.0" } +clap = { version = "4.4.18" } #clap_complete = { version = "4.0" } -substrate-build-script-utils = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42' } +substrate-build-script-utils = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0' } [dev-dependencies] rusty-hook = "^0.11.2" # Dependencies for specific targets [target.'cfg(any(target_arch="x86_64", target_arch="aarch64"))'.dependencies] -sc-cli = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.42", default-features = false } -sc-service = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.42", default-features = false } -sp-trie = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.42" } - +sc-cli = { git = "https://github.com/duniter/duniter-polkadot-sdk", branch = "duniter-substrate-v1.6.0", default-features = false } +sc-service = { git = "https://github.com/duniter/duniter-polkadot-sdk", branch = "duniter-substrate-v1.6.0", default-features = false } +sp-trie = { git = "https://github.com/duniter/duniter-polkadot-sdk", branch = "duniter-substrate-v1.6.0" } [dependencies] + +# crates.io dependencies +async-io = { version = "2.3.0", default-features = false } +bs58 = "0.5.0" +clap = { version = "4.4.18", default-features = false, features = ["derive"] } +clap_complete = { version = "4.4.8", default-features = false } # local dependencies -common-runtime = { path = 'runtime/common' } +common-runtime = { path = 'runtime/common', default-features = false } dc-distance = { path = 'client/distance' } distance-oracle = { path = 'distance-oracle', default-features = false, optional = true } +enum-as-inner = { version = "=0.5.1", default-features = false } #https://github.com/bluejekyll/trust-dns/issues/1946 + +# substrate dependencies +frame-benchmarking = { git = "https://github.com/duniter/duniter-polkadot-sdk", branch = "duniter-substrate-v1.6.0", default-features = false } +frame-benchmarking-cli = { git = "https://github.com/duniter/duniter-polkadot-sdk", branch = "duniter-substrate-v1.6.0", default-features = false } +frame-system = { git = "https://github.com/duniter/duniter-polkadot-sdk", branch = "duniter-substrate-v1.6.0", default-features = false } +futures = { version = "0.3.28", default-features = false, features = ["compat"] } g1-runtime = { path = 'runtime/g1', optional = true } gdev-runtime = { path = 'runtime/gdev', optional = true } gtest-runtime = { path = 'runtime/gtest', optional = true } -pallet-certification = { path = 'pallets/certification' } -pallet-oneshot-account = { path = 'pallets/oneshot-account' } -sp-distance = { path = 'primitives/distance' } -sp-membership = { path = 'primitives/membership' } - -# crates.io dependencies -async-io = { version = "1.6.0", default-features = false } -bs58 = "0.5.0" -clap = { version = "4.0.9", default-features = false, features = ["derive"] } -clap_complete = { version = "4", default-features = false } -futures = { version = "0.3.28", default-features = false, features = ["compat"] } hex = { version = "0.4.3", default-features = false } jsonrpsee = { version = "0.16.2", default-features = false, features = ["server"] } lazy_static = { version = "1.4.0", default-features = false } -log = { version = "0.4", default-features = false } +log = { version = "0.4.20", default-features = false } maplit = { version = '1.0.2', default-features = false } -memmap2 = { version = "0.5.10", default-features = false } -serde = { version = "1.0", default-features = false } +memmap2 = { version = "0.9.3", default-features = false } +num-format = "0.4.4" +pallet-certification = { path = 'pallets/certification' } +pallet-grandpa = { git = "https://github.com/duniter/duniter-polkadot-sdk", branch = "duniter-substrate-v1.6.0", default-features = false } +pallet-im-online = { git = "https://github.com/duniter/duniter-polkadot-sdk", branch = "duniter-substrate-v1.6.0", default-features = false } +pallet-oneshot-account = { path = 'pallets/oneshot-account' } +pallet-transaction-payment = { git = "https://github.com/duniter/duniter-polkadot-sdk", branch = "duniter-substrate-v1.6.0", default-features = false } +pallet-transaction-payment-rpc = { git = "https://github.com/duniter/duniter-polkadot-sdk", branch = "duniter-substrate-v1.6.0", default-features = false } +pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/duniter/duniter-polkadot-sdk", branch = "duniter-substrate-v1.6.0", default-features = false } +pallet-treasury = { git = "https://github.com/duniter/duniter-polkadot-sdk", branch = "duniter-substrate-v1.6.0", default-features = false } +sc-basic-authorship = { git = "https://github.com/duniter/duniter-polkadot-sdk", branch = "duniter-substrate-v1.6.0", default-features = false } +sc-chain-spec = { git = "https://github.com/duniter/duniter-polkadot-sdk", branch = "duniter-substrate-v1.6.0", default-features = false } +sc-cli = { git = "https://github.com/duniter/duniter-polkadot-sdk", branch = "duniter-substrate-v1.6.0", default-features = false } +sc-client-api = { git = "https://github.com/duniter/duniter-polkadot-sdk", branch = "duniter-substrate-v1.6.0", default-features = false } +sc-client-db = { git = "https://github.com/duniter/duniter-polkadot-sdk", branch = "duniter-substrate-v1.6.0", default-features = false } +sc-consensus = { git = "https://github.com/duniter/duniter-polkadot-sdk", branch = "duniter-substrate-v1.6.0", default-features = false } +sc-consensus-babe = { git = "https://github.com/duniter/duniter-polkadot-sdk", branch = "duniter-substrate-v1.6.0", default-features = false } +sc-consensus-babe-rpc = { git = "https://github.com/duniter/duniter-polkadot-sdk", branch = "duniter-substrate-v1.6.0", default-features = false } +sc-consensus-grandpa = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +sc-consensus-manual-seal = { git = "https://github.com/duniter/duniter-polkadot-sdk", branch = "duniter-substrate-v1.6.0", default-features = false } +sc-executor = { git = "https://github.com/duniter/duniter-polkadot-sdk", branch = "duniter-substrate-v1.6.0", default-features = false } +sc-keystore = { git = "https://github.com/duniter/duniter-polkadot-sdk", branch = "duniter-substrate-v1.6.0", default-features = false } +sc-network = { git = "https://github.com/duniter/duniter-polkadot-sdk", branch = "duniter-substrate-v1.6.0", default-features = false } +sc-network-common = { git = "https://github.com/duniter/duniter-polkadot-sdk", branch = "duniter-substrate-v1.6.0", default-features = false } +sc-rpc-api = { git = "https://github.com/duniter/duniter-polkadot-sdk", branch = "duniter-substrate-v1.6.0", default-features = false } +sc-service = { git = "https://github.com/duniter/duniter-polkadot-sdk", branch = "duniter-substrate-v1.6.0", default-features = false } +sc-telemetry = { git = "https://github.com/duniter/duniter-polkadot-sdk", branch = "duniter-substrate-v1.6.0", default-features = false } +sc-transaction-pool = { git = "https://github.com/duniter/duniter-polkadot-sdk", branch = "duniter-substrate-v1.6.0", default-features = false } +sc-transaction-pool-api = { git = "https://github.com/duniter/duniter-polkadot-sdk", branch = "duniter-substrate-v1.6.0", default-features = false } +serde = { version = "1.0.195", default-features = false } serde_json = { version = "1.0.64", default-features = false } serde_yaml = { version = "0.9.27", default-features = false } +sp-api = { git = "https://github.com/duniter/duniter-polkadot-sdk", branch = "duniter-substrate-v1.6.0", default-features = false } +sp-authority-discovery = { git = "https://github.com/duniter/duniter-polkadot-sdk", branch = "duniter-substrate-v1.6.0", default-features = false } +sp-block-builder = { git = "https://github.com/duniter/duniter-polkadot-sdk", branch = "duniter-substrate-v1.6.0", default-features = false } +sp-blockchain = { git = "https://github.com/duniter/duniter-polkadot-sdk", branch = "duniter-substrate-v1.6.0", default-features = false } +sp-consensus = { git = "https://github.com/duniter/duniter-polkadot-sdk", branch = "duniter-substrate-v1.6.0", default-features = false } +sp-consensus-babe = { git = "https://github.com/duniter/duniter-polkadot-sdk", branch = "duniter-substrate-v1.6.0", default-features = false } +sp-consensus-grandpa = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +sp-core = { git = "https://github.com/duniter/duniter-polkadot-sdk", branch = "duniter-substrate-v1.6.0", default-features = false } +sp-distance = { path = 'primitives/distance' } +sp-inherents = { git = "https://github.com/duniter/duniter-polkadot-sdk", branch = "duniter-substrate-v1.6.0", default-features = false } +sp-io = { git = "https://github.com/duniter/duniter-polkadot-sdk", branch = "duniter-substrate-v1.6.0", default-features = false } +sp-keyring = { git = "https://github.com/duniter/duniter-polkadot-sdk", branch = "duniter-substrate-v1.6.0", default-features = false } +sp-keystore = { git = "https://github.com/duniter/duniter-polkadot-sdk", branch = "duniter-substrate-v1.6.0", default-features = false } +sp-membership = { path = 'primitives/membership' } +sp-offchain = { git = "https://github.com/duniter/duniter-polkadot-sdk", branch = "duniter-substrate-v1.6.0", default-features = false } +sc-offchain = { git = "https://github.com/duniter/duniter-polkadot-sdk", branch = "duniter-substrate-v1.6.0", default-features = false } +sp-runtime = { git = "https://github.com/duniter/duniter-polkadot-sdk", branch = "duniter-substrate-v1.6.0", default-features = false } +sp-session = { git = "https://github.com/duniter/duniter-polkadot-sdk", branch = "duniter-substrate-v1.6.0", default-features = false } +sp-storage = { git = "https://github.com/duniter/duniter-polkadot-sdk", branch = "duniter-substrate-v1.6.0", default-features = false } +sp-timestamp = { git = "https://github.com/duniter/duniter-polkadot-sdk", branch = "duniter-substrate-v1.6.0", default-features = false } +sp-transaction-pool = { git = "https://github.com/duniter/duniter-polkadot-sdk", branch = "duniter-substrate-v1.6.0", default-features = false } +sp-transaction-storage-proof = { git = "https://github.com/duniter/duniter-polkadot-sdk", branch = "duniter-substrate-v1.6.0", default-features = false } +sp-trie = { git = "https://github.com/duniter/duniter-polkadot-sdk", branch = "duniter-substrate-v1.6.0", default-features = false } +substrate-frame-rpc-system = { git = "https://github.com/duniter/duniter-polkadot-sdk", branch = "duniter-substrate-v1.6.0", default-features = false } tracing-core = { version = "0.1.28", default-features = false } -enum-as-inner = { version = "=0.5.1", default-features = false } #https://github.com/bluejekyll/trust-dns/issues/1946 -num-format = "0.4.4" - -# substrate dependencies -frame-benchmarking = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.42", default-features = false } -frame-benchmarking-cli = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.42", default-features = false } -frame-system = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.42", default-features = false } -pallet-grandpa = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.42", default-features = false } -pallet-im-online = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.42", default-features = false } -pallet-transaction-payment = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.42", default-features = false } -pallet-transaction-payment-rpc = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.42", default-features = false } -pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.42", default-features = false } -pallet-treasury = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.42", default-features = false } -sc-basic-authorship = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.42", default-features = false } -sc-chain-spec = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.42", default-features = false } -sc-cli = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.42", default-features = false } -sc-client-api = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.42", default-features = false } -sc-consensus = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.42", default-features = false } -sc-consensus-babe = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.42", default-features = false } -sc-consensus-babe-rpc = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.42", default-features = false } -sc-consensus-manual-seal = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.42", default-features = false } -sc-client-db = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.42", default-features = false } -sc-executor = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.42", default-features = false } -sc-keystore = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.42", default-features = false } -sc-network = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.42", default-features = false } -sc-network-common = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.42", default-features = false } -sc-rpc-api = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.42", default-features = false } -sc-service = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.42", default-features = false } -sc-telemetry = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.42", default-features = false } -sc-transaction-pool = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.42", default-features = false } -sc-transaction-pool-api = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.42", default-features = false } -sp-api = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.42", default-features = false } -sp-authority-discovery = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.42", default-features = false } -sp-transaction-storage-proof = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.42", default-features = false } -sp-block-builder = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.42", default-features = false } -sp-blockchain = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.42", default-features = false } -sp-consensus = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.42", default-features = false } -sp-consensus-babe = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.42", default-features = false } -sp-consensus-grandpa = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -sc-consensus-grandpa = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -sp-core = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.42", default-features = false } -sp-inherents = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.42", default-features = false } -sp-io = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.42", default-features = false } -sp-offchain = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.42", default-features = false } -sp-keyring = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.42", default-features = false } -sp-keystore = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.42", default-features = false } -sp-runtime = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.42", default-features = false } -sp-session = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.42", default-features = false } -sp-storage = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.42", default-features = false } -sp-timestamp = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.42", default-features = false } -sp-transaction-pool = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.42", default-features = false } -sp-trie = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.42", default-features = false } -substrate-frame-rpc-system = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.42", default-features = false } -try-runtime-cli = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.42", optional = true, default-features = false } +try-runtime-cli = { git = "https://github.com/duniter/duniter-polkadot-sdk", branch = "duniter-substrate-v1.6.0", optional = true, default-features = false } [workspace] resolver = "2" @@ -146,9 +156,9 @@ members = [ 'client/distance', 'distance-oracle', 'end2end-tests', - 'live-tests', + #'live-tests', + 'pallets/authority-members', 'pallets/certification', - 'pallets/quota', 'pallets/distance', 'pallets/duniter-test-parameters', 'pallets/duniter-test-parameters/macro', @@ -156,16 +166,16 @@ members = [ 'pallets/identity', 'pallets/membership', 'pallets/oneshot-account', - 'pallets/authority-members', + 'pallets/quota', 'pallets/smith-members', 'pallets/universal-dividend', 'pallets/upgrade-origin', - 'primitives/membership', 'primitives/distance', + 'primitives/membership', + 'resources/weight_analyzer', 'runtime/common', 'runtime/gdev', - 'xtask', - 'resources/weight_analyzer' + 'xtask' ] # The list of dependencies below (which can be both direct and indirect dependencies) are crates @@ -233,7 +243,7 @@ panic = "unwind" # # the following patch can be useful to debug substrate dependency # # added by tuxmain on 0.9.32 update # # updated by hugo on 0.9.42 update (benjamin) -# [patch.'https://github.com/duniter/substrate'] +# [patch.'https://github.com/duniter/duniter-polkadot-sdk'] # pallet-balances = {path = '../substrate/frame/balances'} # fork-tree = { path = "../substrate/utils/fork-tree" } # frame-support = { path = "../substrate/frame/support" } diff --git a/client/distance/Cargo.toml b/client/distance/Cargo.toml index 6ece8d3fa23d2f64fc8cf7646e92d6e7c202e925..11a8f9d37c9e83393a3971384ed2bf7418bc36a6 100644 --- a/client/distance/Cargo.toml +++ b/client/distance/Cargo.toml @@ -11,14 +11,14 @@ version = '1.0.0' [dependencies] -pallet-distance = { path = "../../pallets/distance" } -sp-distance = { path = "../../primitives/distance" } - log = "0.4" -thiserror = "1.0.30" + +pallet-distance = { path = "../../pallets/distance" } # substrate scale-info = { version = "2.1.1", features = ["derive"] } +sp-distance = { path = "../../primitives/distance" } +thiserror = "1.0.30" [dependencies.codec] features = ['derive'] @@ -26,26 +26,25 @@ package = 'parity-scale-codec' version = '3.1.5' [dependencies.frame-support] -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' [dependencies.sc-client-api] -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' [dependencies.sp-core] -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' [dependencies.sp-keystore] -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' - -[dependencies.sp-runtime] -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' - +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' ### DOC ### [package.metadata.docs.rs] targets = ['x86_64-unknown-linux-gnu'] + +[dependencies.sp-runtime] +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' diff --git a/distance-oracle/Cargo.toml b/distance-oracle/Cargo.toml index 4ca93a1a5b5347e7503eb386b487666d036f10e2..bc70ca786a89b8c33a97c98993c44bffbf13945f 100644 --- a/distance-oracle/Cargo.toml +++ b/distance-oracle/Cargo.toml @@ -7,23 +7,25 @@ license = "AGPL-3.0-only" edition = "2021" [dependencies] -sp-distance = { path = "../primitives/distance" } -codec = { package = "parity-scale-codec", version = "3.6.5" } +# standalone only +clap = { version = "4.4.18", features = ["derive"], optional = true } + +codec = { package = "parity-scale-codec", version = "3.6.9" } fnv = "1.0.7" -log = "0.4.17" -num-traits = "0.2.15" -rayon = "1.7.0" -simple_logger = "4.2.0" -sp-core = { git = "https://github.com/duniter/substrate.git", branch = "duniter-substrate-v0.9.42" } -sp-runtime = { git = "https://github.com/duniter/substrate.git", branch = "duniter-substrate-v0.9.42" } -subxt = { git = 'https://github.com/duniter/subxt.git', branch = "duniter-substrate-v0.9.42" } -time = "<=0.3.23"# required for MSRV -time-macros = "=0.2.10" +log = "0.4.20" +num-traits = "0.2.17" +rayon = "1.8.1" +simple_logger = "4.3.3" +hex = "0.4.3" -# standalone only -clap = { version = "4.0", features = ["derive"], optional = true } -tokio = { version = "1.15.0", features = [ +sp-core = { git = "https://github.com/duniter/duniter-polkadot-sdk.git", branch = "duniter-substrate-v1.6.0" } +sp-distance = { path = "../primitives/distance" } +sp-runtime = { git = "https://github.com/duniter/duniter-polkadot-sdk.git", branch = "duniter-substrate-v1.6.0" } +subxt = { git = 'https://github.com/duniter/subxt', branch = 'subxt-v0.34.0-duniter-substrate-v1.6.0', default-features = false, features = ["substrate-compat", "native", "jsonrpsee"] } +time = "0.3.31" +time-macros = "0.2.16" +tokio = { version = "1.35.1", features = [ "rt-multi-thread", "macros", ], optional = true } @@ -31,7 +33,7 @@ tokio = { version = "1.15.0", features = [ [dev-dependencies] bincode = "1.3.3" dubp-wot = "0.11.1" -flate2 = { version = "1.0", features = [ +flate2 = { version = "1.0.28", features = [ "zlib-ng-compat", ], default-features = false } diff --git a/distance-oracle/src/api.rs b/distance-oracle/src/api.rs index 6af754679ed693bb1347f1e02d36c325e42e8f0b..48b6e127862f8f466a77b2d6870e10e59a365c84 100644 --- a/distance-oracle/src/api.rs +++ b/distance-oracle/src/api.rs @@ -14,11 +14,12 @@ // You should have received a copy of the GNU Affero General Public License // along with Duniter-v2S. If not, see <https://www.gnu.org/licenses/>. +#![allow(clippy::type_complexity)] + use crate::runtime; use log::debug; use sp_core::H256; -use subxt::storage::StorageKey; pub type Client = subxt::OnlineClient<crate::RuntimeConfig>; pub type AccountId = subxt::utils::AccountId32; @@ -31,7 +32,12 @@ pub async fn client(rpc_url: String) -> Client { } pub async fn parent_hash(client: &Client) -> H256 { - client.rpc().block_hash(None).await.unwrap().unwrap() + client + .blocks() + .at_latest() + .await + .expect("Cannot fetch latest block hash") + .hash() } pub async fn current_session(client: &Client, parent_hash: H256) -> u32 { @@ -93,27 +99,24 @@ pub async fn member_iter(client: &Client, evaluation_block: H256) -> MemberIter client .storage() .at(evaluation_block) - .iter(runtime::storage().membership().membership(0), 100) + .iter(runtime::storage().membership().membership_iter()) .await .expect("Cannot fetch memberships"), ) } pub struct MemberIter( - subxt::storage::KeyIter< - crate::RuntimeConfig, - Client, + subxt::backend::StreamOfResults<( + Vec<u8>, runtime::runtime_types::sp_membership::MembershipData<u32>, - >, + )>, ); impl MemberIter { pub async fn next(&mut self) -> Result<Option<IdtyIndex>, subxt::error::Error> { - Ok(self - .0 - .next() - .await? - .map(|(storage_key, _membership_data)| idty_id_from_storage_key(&storage_key))) + self.0.next().await.transpose().map(|i| { + i.map(|(storage_key, _membership_data)| idty_id_from_storage_key(&storage_key)) + }) } } @@ -122,26 +125,28 @@ pub async fn cert_iter(client: &Client, evaluation_block: H256) -> CertIter { client .storage() .at(evaluation_block) - .iter(runtime::storage().certification().certs_by_receiver(0), 100) + .iter(runtime::storage().certification().certs_by_receiver_iter()) .await .expect("Cannot fetch certifications"), ) } -pub struct CertIter(subxt::storage::KeyIter<crate::RuntimeConfig, Client, Vec<(IdtyIndex, u32)>>); +pub struct CertIter(subxt::backend::StreamOfResults<(Vec<u8>, Vec<(IdtyIndex, u32)>)>); impl CertIter { pub async fn next( &mut self, ) -> Result<Option<(IdtyIndex, Vec<(IdtyIndex, u32)>)>, subxt::error::Error> { - Ok(self - .0 - .next() - .await? - .map(|(storage_key, issuers)| (idty_id_from_storage_key(&storage_key), issuers))) + self.0.next().await.transpose().map(|i| { + i.map(|(storage_key, issuers)| (idty_id_from_storage_key(&storage_key), issuers)) + }) } } -fn idty_id_from_storage_key(storage_key: &StorageKey) -> IdtyIndex { - u32::from_le_bytes(storage_key.as_ref()[40..44].try_into().unwrap()) +fn idty_id_from_storage_key(storage_key: &[u8]) -> IdtyIndex { + u32::from_le_bytes( + storage_key[40..44] + .try_into() + .expect("Cannot convert StorageKey to IdtyIndex"), + ) } diff --git a/distance-oracle/src/lib.rs b/distance-oracle/src/lib.rs index daff57e9035b43ec8337bd02e4f3537d4a5579f1..955759efd0ebc69ab5d9eb64a04f7ee71feef90a 100644 --- a/distance-oracle/src/lib.rs +++ b/distance-oracle/src/lib.rs @@ -40,16 +40,15 @@ pub mod runtime {} pub enum RuntimeConfig {} impl subxt::config::Config for RuntimeConfig { - type Index = u32; - // type BlockNumber = u32; - type Hash = sp_core::H256; - type Hasher = subxt::config::substrate::BlakeTwo256; type AccountId = AccountId; type Address = subxt::ext::sp_runtime::MultiAddress<Self::AccountId, u32>; + type AssetId = (); + type ExtrinsicParams = subxt::config::substrate::SubstrateExtrinsicParams<Self>; + type Hash = sp_core::H256; + type Hasher = subxt::config::substrate::BlakeTwo256; type Header = subxt::config::substrate::SubstrateHeader<u32, subxt::config::substrate::BlakeTwo256>; type Signature = subxt::ext::sp_runtime::MultiSignature; - type ExtrinsicParams = subxt::config::extrinsic_params::BaseExtrinsicParams<Self, Tip>; } #[derive(Copy, Clone, Debug, Default, Encode)] @@ -172,7 +171,10 @@ pub async fn run( if handle_fs { // Stop if already evaluated - if evaluation_result_path.try_exists().unwrap() { + if evaluation_result_path + .try_exists() + .expect("Result path unavailable") + { info!("Nothing to do: File already exists"); return None; } @@ -192,7 +194,11 @@ pub async fn run( let mut members = FnvHashMap::<IdtyIndex, u32>::default(); let mut members_iter = api::member_iter(client, evaluation_block).await; - while let Some(member_idty) = members_iter.next().await.unwrap() { + while let Some(member_idty) = members_iter + .next() + .await + .expect("Cannot fetch next members") + { members.insert(member_idty, 0); } diff --git a/docs/api/runtime-calls.md b/docs/api/runtime-calls.md index ef918bc7ec8c9f9cf60f23da45d5842a75c820c0..5b99ddfdf375453feeeb8c3957ec8bf724c99ffd 100644 --- a/docs/api/runtime-calls.md +++ b/docs/api/runtime-calls.md @@ -3,14 +3,13 @@ Calls are categorized according to the dispatch origin they require: 1. **User calls**: the dispatch origin for this kind of call must be signed by -the transactor. This is the only call category that can be submitted with an extrinsic. + the transactor. This is the only call category that can be submitted with an extrinsic. 1. **Root calls**: This kind of call requires a special origin that can only be invoked -through on-chain governance mechanisms. + through on-chain governance mechanisms. 1. **Inherent calls**: This kind of call is invoked by the author of the block itself -(usually automatically by the node). + (usually automatically by the node). 1. **Disabled calls**: These calls can not be called directly, they are reserved for internal use by other runtime calls. - ## User calls There are **78** user calls from **21** pallets. @@ -24,11 +23,12 @@ There are **78** user calls from **21** pallets. Taking 0.0082 % of a block. ```rust + ``` -</details> +</details> -unlink the identity associated with the account +See [`Pallet::unlink_identity`]. ### Scheduler - 2 @@ -39,15 +39,15 @@ unlink the identity associated with the account Taking 0.0098 % of a block. ```rust -when: T::BlockNumber -maybe_periodic: Option<schedule::Period<T::BlockNumber>> +when: BlockNumberFor<T> +maybe_periodic: Option<schedule::Period<BlockNumberFor<T>>> priority: schedule::Priority call: Box<<T as Config>::RuntimeCall> ``` -</details> +</details> -Anonymously schedule a task. +See [`Pallet::schedule`]. #### cancel - 1 @@ -56,13 +56,13 @@ Anonymously schedule a task. Taking 0.0131 % of a block. ```rust -when: T::BlockNumber +when: BlockNumberFor<T> index: u32 ``` -</details> +</details> -Cancel an anonymously scheduled task. +See [`Pallet::cancel`]. #### schedule_named - 2 @@ -72,15 +72,15 @@ Taking 0.0131 % of a block. ```rust id: TaskName -when: T::BlockNumber -maybe_periodic: Option<schedule::Period<T::BlockNumber>> +when: BlockNumberFor<T> +maybe_periodic: Option<schedule::Period<BlockNumberFor<T>>> priority: schedule::Priority call: Box<<T as Config>::RuntimeCall> ``` -</details> +</details> -Schedule a named task. +See [`Pallet::schedule_named`]. #### cancel_named - 3 @@ -91,10 +91,10 @@ Taking 0.0137 % of a block. ```rust id: TaskName ``` -</details> +</details> -Cancel a named scheduled task. +See [`Pallet::cancel_named`]. #### schedule_after - 4 @@ -103,15 +103,15 @@ Cancel a named scheduled task. No weight available. ```rust -after: T::BlockNumber -maybe_periodic: Option<schedule::Period<T::BlockNumber>> +after: BlockNumberFor<T> +maybe_periodic: Option<schedule::Period<BlockNumberFor<T>>> priority: schedule::Priority call: Box<<T as Config>::RuntimeCall> ``` -</details> +</details> -Anonymously schedule a task after a delay. +See [`Pallet::schedule_after`]. #### schedule_named_after - 5 @@ -121,15 +121,15 @@ No weight available. ```rust id: TaskName -after: T::BlockNumber -maybe_periodic: Option<schedule::Period<T::BlockNumber>> +after: BlockNumberFor<T> +maybe_periodic: Option<schedule::Period<BlockNumberFor<T>>> priority: schedule::Priority call: Box<<T as Config>::RuntimeCall> ``` -</details> +</details> -Schedule a named task after a delay. +See [`Pallet::schedule_named_after`]. ### Babe - 3 @@ -140,16 +140,13 @@ Schedule a named task after a delay. No weight available. ```rust -equivocation_proof: Box<EquivocationProof<T::Header>> +equivocation_proof: Box<EquivocationProof<HeaderFor<T>>> key_owner_proof: T::KeyOwnerProof ``` -</details> +</details> -Report authority equivocation/misbehavior. This method will verify -the equivocation proof and validate the given key ownership proof -against the extracted offender. If both are valid, the offence will -be reported. +See [`Pallet::report_equivocation`]. ### Balances - 6 @@ -163,37 +160,10 @@ Taking 0.0152 % of a block. dest: AccountIdLookupOf<T> value: T::Balance ``` -</details> - - -Transfer some liquid free balance to another account. - -`transfer_allow_death` will set the `FreeBalance` of the sender and receiver. -If the sender's account is below the existential deposit as a result -of the transfer, the account will be reaped. - -The dispatch origin for this call must be `Signed` by the transactor. - -#### set_balance_deprecated - 1 - -<details><summary><code>set_balance_deprecated(who, new_free, old_reserved)</code></summary> - -No weight available. -```rust -who: AccountIdLookupOf<T> -new_free: T::Balance -old_reserved: T::Balance -``` </details> - -Set the regular balance of a given account; it also takes a reserved balance but this -must be the same as the account's current reserved balance. - -The dispatch origin for this call is `root`. - -WARNING: This call is DEPRECATED! Use `force_set_balance` instead. +See [`Pallet::transfer_allow_death`]. #### transfer_keep_alive - 3 @@ -205,15 +175,10 @@ Taking 0.0168 % of a block. dest: AccountIdLookupOf<T> value: T::Balance ``` -</details> - -Same as the [`transfer_allow_death`] call, but with a check that the transfer will not -kill the origin account. - -99% of the time you want [`transfer_allow_death`] instead. +</details> -[`transfer_allow_death`]: struct.Pallet.html#method.transfer +See [`Pallet::transfer_keep_alive`]. #### transfer_all - 4 @@ -225,41 +190,10 @@ Taking 0.0142 % of a block. dest: AccountIdLookupOf<T> keep_alive: bool ``` -</details> - - -Transfer the entire transferable balance from the caller account. -NOTE: This function only attempts to transfer _transferable_ balances. This means that -any locked, reserved, or existential deposits (when `keep_alive` is `true`), will not be -transferred by this function. To ensure that this function results in a killed account, -you might need to prepare the account by removing any reference counters, storage -deposits, etc... - -The dispatch origin of this call must be Signed. - -- `dest`: The recipient of the transfer. -- `keep_alive`: A boolean to determine if the `transfer_all` operation should send all - of the funds the account has, causing the sender account to be killed (false), or - transfer everything except at least the existential deposit, which will guarantee to - keep the sender account alive (true). - -#### transfer - 7 - -<details><summary><code>transfer(dest, value)</code></summary> - -No weight available. - -```rust -dest: AccountIdLookupOf<T> -value: T::Balance -``` </details> - -Alias for `transfer_allow_death`, provided only for name-wise compatibility. - -WARNING: DEPRECATED! Will be released in approximately 3 months. +See [`Pallet::transfer_all`]. #### force_set_balance - 8 @@ -271,14 +205,12 @@ No weight available. who: AccountIdLookupOf<T> new_free: T::Balance ``` -</details> - -Set the regular balance of a given account. +</details> -The dispatch origin for this call is `root`. +See [`Pallet::force_set_balance`]. -### OneshotAccount - 7 +### OneshotAccount - 8 #### create_oneshot_account - 0 @@ -290,15 +222,10 @@ Taking 0.0095 % of a block. dest: <T::Lookup as StaticLookup>::Source value: <T::Currency as Currency<T::AccountId>>::Balance ``` -</details> +</details> -Create an account that can only be consumed once - -- `dest`: The oneshot account to be created. -- `balance`: The balance to be transfered to this oneshot account. - -Origin account is kept alive. +See [`Pallet::create_oneshot_account`]. #### consume_oneshot_account - 1 @@ -307,17 +234,13 @@ Origin account is kept alive. Taking 0.0134 % of a block. ```rust -block_height: T::BlockNumber +block_height: BlockNumberFor<T> dest: Account<<T::Lookup as StaticLookup>::Source> ``` -</details> - -Consume a oneshot account and transfer its balance to an account +</details> -- `block_height`: Must be a recent block number. The limit is `BlockHashCount` in the past. (this is to prevent replay attacks) -- `dest`: The destination account. -- `dest_is_oneshot`: If set to `true`, then a oneshot account is created at `dest`. Else, `dest` has to be an existing account. +See [`Pallet::consume_oneshot_account`]. #### consume_oneshot_account_with_remaining - 2 @@ -326,24 +249,15 @@ Consume a oneshot account and transfer its balance to an account Taking 0.0175 % of a block. ```rust -block_height: T::BlockNumber +block_height: BlockNumberFor<T> dest: Account<<T::Lookup as StaticLookup>::Source> remaining_to: Account<<T::Lookup as StaticLookup>::Source> balance: <T::Currency as Currency<T::AccountId>>::Balance ``` -</details> +</details> -Consume a oneshot account then transfer some amount to an account, -and the remaining amount to another account. - -- `block_height`: Must be a recent block number. - The limit is `BlockHashCount` in the past. (this is to prevent replay attacks) -- `dest`: The destination account. -- `dest_is_oneshot`: If set to `true`, then a oneshot account is created at `dest`. Else, `dest` has to be an existing account. -- `dest2`: The second destination account. -- `dest2_is_oneshot`: If set to `true`, then a oneshot account is created at `dest2`. Else, `dest2` has to be an existing account. -- `balance1`: The amount transfered to `dest`, the leftover being transfered to `dest2`. +See [`Pallet::consume_oneshot_account_with_remaining`]. ### SmithMembers - 10 @@ -356,8 +270,8 @@ Taking 0.0153 % of a block. ```rust receiver: T::IdtyIndex ``` -</details> +</details> Invite a WoT member to try becoming a Smith @@ -368,9 +282,10 @@ Invite a WoT member to try becoming a Smith Taking 0.0094 % of a block. ```rust + ``` -</details> +</details> Accept an invitation (must have been invited first) @@ -383,8 +298,8 @@ Taking 0.0139 % of a block. ```rust receiver: T::IdtyIndex ``` -</details> +</details> Certify an invited smith which can lead the certified to become a Smith @@ -397,11 +312,12 @@ Certify an invited smith which can lead the certified to become a Smith Taking 0.0117 % of a block. ```rust + ``` -</details> +</details> -ask to leave the set of validators two sessions after +See [`Pallet::go_offline`]. #### go_online - 1 @@ -410,11 +326,12 @@ ask to leave the set of validators two sessions after Taking 0.0138 % of a block. ```rust + ``` -</details> +</details> -ask to join the set of validators two sessions after +See [`Pallet::go_online`]. #### set_session_keys - 2 @@ -425,10 +342,10 @@ Taking 0.0177 % of a block. ```rust keys: T::Keys ``` -</details> +</details> -declare new session keys to replace current ones +See [`Pallet::set_session_keys`]. #### remove_member_from_blacklist - 4 @@ -439,10 +356,10 @@ Taking 0.0094 % of a block. ```rust member_id: T::MemberId ``` -</details> +</details> -remove an identity from the blacklist +See [`Pallet::remove_member_from_blacklist`]. ### Grandpa - 16 @@ -453,18 +370,15 @@ remove an identity from the blacklist No weight available. ```rust -equivocation_proof: Box<EquivocationProof<T::Hash, T::BlockNumber>> +equivocation_proof: Box<EquivocationProof<T::Hash, BlockNumberFor<T>>> key_owner_proof: T::KeyOwnerProof ``` -</details> +</details> -Report voter equivocation/misbehavior. This method will verify the -equivocation proof and validate the given key ownership proof -against the extracted offender. If both are valid, the offence -will be reported. +See [`Pallet::report_equivocation`]. -### UpgradeOrigin - 21 +### UpgradeOrigin - 20 #### dispatch_as_root_unchecked_weight - 1 @@ -476,16 +390,12 @@ No weight available. call: Box<<T as Config>::Call> weight: Weight ``` -</details> - -Dispatches a function call from root origin. -This function does not check the weight of the call, and instead allows the -caller to specify the weight of the call. +</details> -The weight of this call is defined by the caller. +See [`Pallet::dispatch_as_root_unchecked_weight`]. -### Preimage - 22 +### Preimage - 21 #### note_preimage - 0 @@ -496,13 +406,10 @@ Taking 0.5042 % of a block. ```rust bytes: Vec<u8> ``` -</details> - -Register a preimage on-chain. +</details> -If the preimage was previously requested, no fees or deposits are taken for providing -the preimage. Otherwise, a deposit is taken proportional to the size of the preimage. +See [`Pallet::note_preimage`]. #### unnote_preimage - 1 @@ -513,15 +420,10 @@ Taking 0.0135 % of a block. ```rust hash: T::Hash ``` -</details> - -Clear an unrequested preimage from the runtime storage. - -If `len` is provided, then it will be a much cheaper operation. +</details> -- `hash`: The hash of the preimage to be removed from the store. -- `len`: The length of the preimage of `hash`. +See [`Pallet::unnote_preimage`]. #### request_preimage - 2 @@ -532,13 +434,10 @@ Taking 0.0092 % of a block. ```rust hash: T::Hash ``` -</details> - -Request a preimage be uploaded to the chain without paying any fees or deposits. +</details> -If the preimage requests has already been provided on-chain, we unreserve any deposit -a user may have paid, and take the control of the preimage out of their hands. +See [`Pallet::request_preimage`]. #### unrequest_preimage - 3 @@ -549,14 +448,26 @@ Taking 0.0119 % of a block. ```rust hash: T::Hash ``` + </details> +See [`Pallet::unrequest_preimage`]. + +#### ensure_updated - 4 -Clear a previously made request for a preimage. +<details><summary><code>ensure_updated(hashes)</code></summary> + +Taking 21.0381 % of a block. + +```rust +hashes: Vec<T::Hash> +``` + +</details> -NOTE: THIS MUST NOT BE CALLED ON `hash` MORE TIMES THAN `request_preimage`. +See [`Pallet::ensure_updated`]. -### TechnicalCommittee - 23 +### TechnicalCommittee - 22 #### execute - 1 @@ -568,18 +479,10 @@ Taking 0.0061 % of a block. proposal: Box<<T as Config<I>>::Proposal> length_bound: u32 ``` -</details> - -Dispatch a proposal from a member using the `Member` origin. - -Origin must be a member of the collective. +</details> -**Complexity**: -- `O(B + M + P)` where: -- `B` is `proposal` size in bytes (length-fee-bounded) -- `M` members-count (code-bounded) -- `P` complexity of dispatching `proposal` +See [`Pallet::execute`]. #### propose - 2 @@ -592,23 +495,10 @@ threshold: MemberCount proposal: Box<<T as Config<I>>::Proposal> length_bound: u32 ``` -</details> - - -Add a new proposal to either be voted on or executed directly. -Requires the sender to be member. - -`threshold` determines whether `proposal` is executed directly (`threshold < 2`) -or put up for voting. +</details> -**Complexity** -- `O(B + M + P1)` or `O(B + M + P2)` where: - - `B` is `proposal` size in bytes (length-fee-bounded) - - `M` is members-count (code- and governance-bounded) - - branching is influenced by `threshold` where: - - `P1` is proposal execution complexity (`threshold < 2`) - - `P2` is proposals-count (code-bounded) (`threshold >= 2`) +See [`Pallet::propose`]. #### vote - 3 @@ -621,18 +511,10 @@ proposal: T::Hash index: ProposalIndex approve: bool ``` -</details> - -Add an aye or nay vote for the sender to the given proposal. - -Requires the sender to be a member. +</details> -Transaction fees will be waived if the member is voting on any particular proposal -for the first time and the call is successful. Subsequent vote changes will charge a -fee. -**Complexity** -- `O(M)` where `M` is members-count (code- and governance-bounded) +See [`Pallet::vote`]. #### close - 6 @@ -646,35 +528,12 @@ index: ProposalIndex proposal_weight_bound: Weight length_bound: u32 ``` -</details> +</details> -Close a vote that is either approved, disapproved or whose voting period has ended. - -May be called by any signed account in order to finish voting and close the proposal. - -If called before the end of the voting period it will only close the vote if it is -has enough votes to be approved or disapproved. - -If called after the end of the voting period abstentions are counted as rejections -unless there is a prime member set and the prime member cast an approval. - -If the close operation completes successfully with disapproval, the transaction fee will -be waived. Otherwise execution of the approved operation will be charged to the caller. - -+ `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed -proposal. -+ `length_bound`: The upper bound for the length of the proposal in storage. Checked via -`storage::read` so it is `size_of::<u32>() == 4` larger than the pure length. - -**Complexity** -- `O(B + M + P1 + P2)` where: - - `B` is `proposal` size in bytes (length-fee-bounded) - - `M` is members-count (code- and governance-bounded) - - `P1` is the complexity of `proposal` preimage. - - `P2` is proposal-count (code-bounded) +See [`Pallet::close`]. -### UniversalDividend - 30 +### UniversalDividend - 23 #### claim_uds - 0 @@ -683,11 +542,12 @@ proposal. Taking 0.0146 % of a block. ```rust + ``` -</details> +</details> -Claim Universal Dividends +See [`Pallet::claim_uds`]. #### transfer_ud - 1 @@ -699,10 +559,10 @@ Taking 0.0158 % of a block. dest: <T::Lookup as StaticLookup>::Source value: BalanceOf<T> ``` -</details> +</details> -Transfer some liquid free balance to another account, in milliUD. +See [`Pallet::transfer_ud`]. #### transfer_ud_keep_alive - 2 @@ -714,12 +574,12 @@ Taking 0.0144 % of a block. dest: <T::Lookup as StaticLookup>::Source value: BalanceOf<T> ``` -</details> +</details> -Transfer some liquid free balance to another account, in milliUD. +See [`Pallet::transfer_ud_keep_alive`]. -### Identity - 41 +### Identity - 25 #### create_identity - 0 @@ -730,14 +590,10 @@ Taking 0.0484 % of a block. ```rust owner_key: T::AccountId ``` -</details> - - -Create an identity for an existing account -- `owner_key`: the public key corresponding to the identity to be created +</details> -The origin must be allowed to create an identity. +See [`Pallet::create_identity`]. #### confirm_identity - 1 @@ -748,14 +604,10 @@ Taking 0.0204 % of a block. ```rust idty_name: IdtyName ``` -</details> - -Confirm the creation of an identity and give it a name - -- `idty_name`: the name uniquely associated to this identity. Must match the validation rules defined by the runtime. +</details> -The identity must have been created using `create_identity` before it can be confirmed. +See [`Pallet::confirm_identity`]. #### change_owner_key - 3 @@ -767,16 +619,10 @@ Taking 0.0306 % of a block. new_key: T::AccountId new_key_sig: T::Signature ``` -</details> - -Change identity owner key. - -- `new_key`: the new owner key. -- `new_key_sig`: the signature of the encoded form of `IdtyIndexAccountIdPayload`. - Must be signed by `new_key`. +</details> -The origin should be the old identity owner key. +See [`Pallet::change_owner_key`]. #### revoke_identity - 4 @@ -789,17 +635,10 @@ idty_index: T::IdtyIndex revocation_key: T::AccountId revocation_sig: T::Signature ``` -</details> +</details> -Revoke an identity using a revocation signature - -- `idty_index`: the index of the identity to be revoked. -- `revocation_key`: the key used to sign the revocation payload. -- `revocation_sig`: the signature of the encoded form of `RevocationPayload`. - Must be signed by `revocation_key`. - -Any signed origin can execute this call. +See [`Pallet::revoke_identity`]. #### fix_sufficients - 7 @@ -811,10 +650,10 @@ Taking 0.0081 % of a block. owner_key: T::AccountId inc: bool ``` -</details> +</details> -change sufficient ref count for given key +See [`Pallet::fix_sufficients`]. #### link_account - 8 @@ -826,12 +665,12 @@ Taking 0.0135 % of a block. account_id: T::AccountId payload_sig: T::Signature ``` -</details> +</details> -Link an account to an identity +See [`Pallet::link_account`]. -### Certification - 43 +### Certification - 27 #### add_cert - 0 @@ -842,8 +681,8 @@ Taking 0.0214 % of a block. ```rust receiver: T::IdtyIndex ``` -</details> +</details> Add a new certification. @@ -856,8 +695,8 @@ Taking 0.018 % of a block. ```rust receiver: T::IdtyIndex ``` -</details> +</details> Renew an existing certification. @@ -871,10 +710,10 @@ Taking 0.0155 % of a block. issuer: T::IdtyIndex receiver: T::IdtyIndex ``` -</details> +</details> -remove a certification (only root) +See [`Pallet::del_cert`]. #### remove_all_certs_received_by - 2 @@ -885,12 +724,12 @@ Taking 3.7485 % of a block. ```rust idty_index: T::IdtyIndex ``` -</details> +</details> -remove all certifications received by an identity (only root) +See [`Pallet::remove_all_certs_received_by`]. -### Distance - 44 +### Distance - 28 #### request_distance_evaluation - 0 @@ -899,13 +738,12 @@ remove all certifications received by an identity (only root) Taking 0.0194 % of a block. ```rust + ``` -</details> +</details> -Request caller identity to be evaluated -positive evaluation will result in claim/renew membership -negative evaluation will result in slash for caller +See [`Pallet::request_distance_evaluation`]. #### request_distance_evaluation_for - 4 @@ -916,11 +754,10 @@ Taking 0.0199 % of a block. ```rust target: T::IdtyIndex ``` -</details> +</details> -Request target identity to be evaluated -only possible for unvalidated identity +See [`Pallet::request_distance_evaluation_for`]. #### update_evaluation - 1 @@ -931,11 +768,10 @@ Taking 0.0214 % of a block. ```rust computation_result: ComputationResult ``` -</details> +</details> -(Inherent) Push an evaluation result to the pool -this is called internally by validators (= inherent) +See [`Pallet::update_evaluation`]. #### force_update_evaluation - 2 @@ -947,10 +783,10 @@ Taking 0.014 % of a block. evaluator: <T as frame_system::Config>::AccountId computation_result: ComputationResult ``` -</details> +</details> -Force push an evaluation result to the pool +See [`Pallet::force_update_evaluation`]. #### force_valid_distance_status - 3 @@ -961,12 +797,12 @@ Taking 0.0173 % of a block. ```rust identity: <T as pallet_identity::Config>::IdtyIndex ``` -</details> +</details> -Force set the distance evaluation status of an identity +See [`Pallet::force_valid_distance_status`]. -### AtomicSwap - 50 +### AtomicSwap - 29 #### create_swap - 0 @@ -978,23 +814,12 @@ No weight available. target: T::AccountId hashed_proof: HashedProof action: T::SwapAction -duration: T::BlockNumber +duration: BlockNumberFor<T> ``` -</details> +</details> -Register a new atomic swap, declaring an intention to send funds from origin to target -on the current blockchain. The target can claim the fund using the revealed proof. If -the fund is not claimed after `duration` blocks, then the sender can cancel the swap. - -The dispatch origin for this call must be _Signed_. - -- `target`: Receiver of the atomic swap. -- `hashed_proof`: The blake2_256 hash of the secret proof. -- `balance`: Funds to be sent from origin. -- `duration`: Locked duration of the atomic swap. For safety reasons, it is recommended - that the revealer uses a shorter duration than the counterparty, to prevent the - situation where the revealer reveals the proof too late around the end block. +See [`Pallet::create_swap`]. #### claim_swap - 1 @@ -1006,16 +831,10 @@ No weight available. proof: Vec<u8> action: T::SwapAction ``` -</details> +</details> -Claim an atomic swap. - -The dispatch origin for this call must be _Signed_. - -- `proof`: Revealed proof of the claim. -- `action`: Action defined in the swap, it must match the entry in blockchain. Otherwise - the operation fails. This is used for weight calculation. +See [`Pallet::claim_swap`]. #### cancel_swap - 2 @@ -1027,17 +846,12 @@ No weight available. target: T::AccountId hashed_proof: HashedProof ``` -</details> - - -Cancel an atomic swap. Only possible after the originally set duration has passed. -The dispatch origin for this call must be _Signed_. +</details> -- `target`: Target of the original atomic swap. -- `hashed_proof`: Hashed proof of the original atomic swap. +See [`Pallet::cancel_swap`]. -### Multisig - 51 +### Multisig - 30 #### as_multi_threshold_1 - 0 @@ -1049,21 +863,10 @@ Taking 0.0054 % of a block. other_signatories: Vec<T::AccountId> call: Box<<T as Config>::RuntimeCall> ``` -</details> - -Immediately dispatch a multi-signature call using a single approval from the caller. - -The dispatch origin for this call must be _Signed_. - -- `other_signatories`: The accounts (other than the sender) who are part of the -multi-signature, but do not participate in the approval process. -- `call`: The call to be executed. - -Result is equivalent to the dispatched result. +</details> -**Complexity** -O(Z + C) where Z is the length of the call and C its execution weight. +See [`Pallet::as_multi_threshold_1`]. #### as_multi - 1 @@ -1074,52 +877,14 @@ No weight available. ```rust threshold: u16 other_signatories: Vec<T::AccountId> -maybe_timepoint: Option<Timepoint<T::BlockNumber>> +maybe_timepoint: Option<Timepoint<BlockNumberFor<T>>> call: Box<<T as Config>::RuntimeCall> max_weight: Weight ``` -</details> - - -Register approval for a dispatch to be made from a deterministic composite account if -approved by a total of `threshold - 1` of `other_signatories`. -If there are enough, then dispatch the call. - -Payment: `DepositBase` will be reserved if this is the first approval, plus -`threshold` times `DepositFactor`. It is returned once this dispatch happens or -is cancelled. - -The dispatch origin for this call must be _Signed_. - -- `threshold`: The total number of approvals for this dispatch before it is executed. -- `other_signatories`: The accounts (other than the sender) who can approve this -dispatch. May not be empty. -- `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is -not the first approval, then it must be `Some`, with the timepoint (block number and -transaction index) of the first approval transaction. -- `call`: The call to be executed. - -NOTE: Unless this is the final approval, you will generally want to use -`approve_as_multi` instead, since it only requires a hash of the call. - -Result is equivalent to the dispatched result if `threshold` is exactly `1`. Otherwise -on success, result is `Ok` and the result from the interior call, if it was executed, -may be found in the deposited `MultisigExecuted` event. +</details> -**Complexity** -- `O(S + Z + Call)`. -- Up to one balance-reserve or unreserve operation. -- One passthrough operation, one insert, both `O(S)` where `S` is the number of - signatories. `S` is capped by `MaxSignatories`, with weight being proportional. -- One call encode & hash, both of complexity `O(Z)` where `Z` is tx-len. -- One encode & hash, both of complexity `O(S)`. -- Up to one binary search and insert (`O(logS + S)`). -- I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. -- One event. -- The weight of the `call`. -- Storage: inserts one item, value size bounded by `MaxSignatories`, with a deposit - taken for its lifetime of `DepositBase + threshold * DepositFactor`. +See [`Pallet::as_multi`]. #### approve_as_multi - 2 @@ -1130,43 +895,14 @@ No weight available. ```rust threshold: u16 other_signatories: Vec<T::AccountId> -maybe_timepoint: Option<Timepoint<T::BlockNumber>> +maybe_timepoint: Option<Timepoint<BlockNumberFor<T>>> call_hash: [u8; 32] max_weight: Weight ``` -</details> - - -Register approval for a dispatch to be made from a deterministic composite account if -approved by a total of `threshold - 1` of `other_signatories`. - -Payment: `DepositBase` will be reserved if this is the first approval, plus -`threshold` times `DepositFactor`. It is returned once this dispatch happens or -is cancelled. -The dispatch origin for this call must be _Signed_. - -- `threshold`: The total number of approvals for this dispatch before it is executed. -- `other_signatories`: The accounts (other than the sender) who can approve this -dispatch. May not be empty. -- `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is -not the first approval, then it must be `Some`, with the timepoint (block number and -transaction index) of the first approval transaction. -- `call_hash`: The hash of the call to be executed. - -NOTE: If this is the final approval, you will want to use `as_multi` instead. +</details> -**Complexity** -- `O(S)`. -- Up to one balance-reserve or unreserve operation. -- One passthrough operation, one insert, both `O(S)` where `S` is the number of - signatories. `S` is capped by `MaxSignatories`, with weight being proportional. -- One encode & hash, both of complexity `O(S)`. -- Up to one binary search and insert (`O(logS + S)`). -- I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. -- One event. -- Storage: inserts one item, value size bounded by `MaxSignatories`, with a deposit - taken for its lifetime of `DepositBase + threshold * DepositFactor`. +See [`Pallet::approve_as_multi`]. #### cancel_as_multi - 3 @@ -1177,35 +913,15 @@ Taking 0.0103 % of a block. ```rust threshold: u16 other_signatories: Vec<T::AccountId> -timepoint: Timepoint<T::BlockNumber> +timepoint: Timepoint<BlockNumberFor<T>> call_hash: [u8; 32] ``` -</details> - - -Cancel a pre-existing, on-going multisig transaction. Any deposit reserved previously -for this operation will be unreserved on success. -The dispatch origin for this call must be _Signed_. - -- `threshold`: The total number of approvals for this dispatch before it is executed. -- `other_signatories`: The accounts (other than the sender) who can approve this -dispatch. May not be empty. -- `timepoint`: The timepoint (block number and transaction index) of the first approval -transaction for this dispatch. -- `call_hash`: The hash of the call to be executed. +</details> -**Complexity** -- `O(S)`. -- Up to one balance-reserve or unreserve operation. -- One passthrough operation, one insert, both `O(S)` where `S` is the number of - signatories. `S` is capped by `MaxSignatories`, with weight being proportional. -- One encode & hash, both of complexity `O(S)`. -- One event. -- I/O: 1 read `O(S)`, one remove. -- Storage: removes one item. +See [`Pallet::cancel_as_multi`]. -### ProvideRandomness - 52 +### ProvideRandomness - 31 #### request - 0 @@ -1217,12 +933,12 @@ Taking 0.0224 % of a block. randomness_type: RandomnessType salt: H256 ``` -</details> +</details> -Request a randomness +See [`Pallet::request`]. -### Proxy - 53 +### Proxy - 32 #### proxy - 0 @@ -1235,18 +951,10 @@ real: AccountIdLookupOf<T> force_proxy_type: Option<T::ProxyType> call: Box<<T as Config>::RuntimeCall> ``` -</details> - - -Dispatch the given `call` from an account that the sender is authorised for through -`add_proxy`. -The dispatch origin for this call must be _Signed_. +</details> -Parameters: -- `real`: The account that the proxy will make a call on behalf of. -- `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. -- `call`: The call to be made by the `real` account. +See [`Pallet::proxy`]. #### add_proxy - 1 @@ -1257,20 +965,12 @@ Taking 0.0098 % of a block. ```rust delegate: AccountIdLookupOf<T> proxy_type: T::ProxyType -delay: T::BlockNumber +delay: BlockNumberFor<T> ``` -</details> - -Register a proxy account for the sender that is able to make calls on its behalf. - -The dispatch origin for this call must be _Signed_. +</details> -Parameters: -- `proxy`: The account that the `caller` would like to make a proxy. -- `proxy_type`: The permissions allowed for this proxy account. -- `delay`: The announcement period required of the initial proxy. Will generally be -zero. +See [`Pallet::add_proxy`]. #### remove_proxy - 2 @@ -1281,18 +981,12 @@ Taking 0.0101 % of a block. ```rust delegate: AccountIdLookupOf<T> proxy_type: T::ProxyType -delay: T::BlockNumber +delay: BlockNumberFor<T> ``` -</details> - -Unregister a proxy account for the sender. - -The dispatch origin for this call must be _Signed_. +</details> -Parameters: -- `proxy`: The account that the `caller` would like to remove as a proxy. -- `proxy_type`: The permissions currently enabled for the removed proxy account. +See [`Pallet::remove_proxy`]. #### remove_proxies - 3 @@ -1301,16 +995,12 @@ Parameters: Taking 0.0098 % of a block. ```rust -``` -</details> - -Unregister all proxy accounts for the sender. +``` -The dispatch origin for this call must be _Signed_. +</details> -WARNING: This may be called on accounts created by `pure`, however if done, then -the unreserved fees will be inaccessible. **All access to this account will be lost.** +See [`Pallet::remove_proxies`]. #### create_pure - 4 @@ -1320,30 +1010,13 @@ Taking 0.0109 % of a block. ```rust proxy_type: T::ProxyType -delay: T::BlockNumber +delay: BlockNumberFor<T> index: u16 ``` -</details> - - -Spawn a fresh new account that is guaranteed to be otherwise inaccessible, and -initialize it with a proxy of `proxy_type` for `origin` sender. -Requires a `Signed` origin. - -- `proxy_type`: The type of the proxy that the sender will be registered as over the -new account. This will almost always be the most permissive `ProxyType` possible to -allow for maximum flexibility. -- `index`: A disambiguation index, in case this is called multiple times in the same -transaction (e.g. with `utility::batch`). Unless you're using `batch` you probably just -want to use `0`. -- `delay`: The announcement period required of the initial proxy. Will generally be -zero. - -Fails with `Duplicate` if this has already been called in this transaction, from the -same sender, with the same parameters. +</details> -Fails if there are insufficient funds to pay for deposit. +See [`Pallet::create_pure`]. #### kill_pure - 5 @@ -1355,28 +1028,13 @@ Taking 0.0094 % of a block. spawner: AccountIdLookupOf<T> proxy_type: T::ProxyType index: u16 -height: T::BlockNumber +height: BlockNumberFor<T> ext_index: u32 ``` -</details> - - -Removes a previously spawned pure proxy. -WARNING: **All access to this account will be lost.** Any funds held in it will be -inaccessible. - -Requires a `Signed` origin, and the sender account must have been created by a call to -`pure` with corresponding parameters. - -- `spawner`: The account that originally called `pure` to create this account. -- `index`: The disambiguation index originally passed to `pure`. Probably `0`. -- `proxy_type`: The proxy type originally passed to `pure`. -- `height`: The height of the chain when the call to `pure` was processed. -- `ext_index`: The extrinsic index in which the call to `pure` was processed. +</details> -Fails with `NoPermission` in case the caller is not a previously created pure -account whose `pure` call has corresponding parameters. +See [`Pallet::kill_pure`]. #### announce - 6 @@ -1388,24 +1046,10 @@ Taking 0.0138 % of a block. real: AccountIdLookupOf<T> call_hash: CallHashOf<T> ``` -</details> - - -Publish the hash of a proxy-call that will be made in the future. - -This must be called some number of blocks before the corresponding `proxy` is attempted -if the delay associated with the proxy relationship is greater than zero. -No more than `MaxPending` announcements may be made at any one time. - -This will take a deposit of `AnnouncementDepositFactor` as well as -`AnnouncementDepositBase` if there are no other pending announcements. - -The dispatch origin for this call must be _Signed_ and a proxy of `real`. +</details> -Parameters: -- `real`: The account that the proxy will make a call on behalf of. -- `call_hash`: The hash of the call to be made by the `real` account. +See [`Pallet::announce`]. #### remove_announcement - 7 @@ -1417,19 +1061,10 @@ Taking 0.0126 % of a block. real: AccountIdLookupOf<T> call_hash: CallHashOf<T> ``` -</details> - - -Remove a given announcement. - -May be called by a proxy account to remove a call they previously announced and return -the deposit. -The dispatch origin for this call must be _Signed_. +</details> -Parameters: -- `real`: The account that the proxy will make a call on behalf of. -- `call_hash`: The hash of the call to be made by the `real` account. +See [`Pallet::remove_announcement`]. #### reject_announcement - 8 @@ -1441,19 +1076,10 @@ Taking 0.0128 % of a block. delegate: AccountIdLookupOf<T> call_hash: CallHashOf<T> ``` -</details> - - -Remove the given announcement of a delegate. -May be called by a target (proxied) account to remove a call that one of their delegates -(`delegate`) has announced they want to execute. The deposit is returned. - -The dispatch origin for this call must be _Signed_. +</details> -Parameters: -- `delegate`: The account that previously announced the call. -- `call_hash`: The hash of the call to be made. +See [`Pallet::reject_announcement`]. #### proxy_announced - 9 @@ -1467,22 +1093,12 @@ real: AccountIdLookupOf<T> force_proxy_type: Option<T::ProxyType> call: Box<<T as Config>::RuntimeCall> ``` -</details> +</details> -Dispatch the given `call` from an account that the sender is authorized for through -`add_proxy`. - -Removes any corresponding announcement(s). - -The dispatch origin for this call must be _Signed_. - -Parameters: -- `real`: The account that the proxy will make a call on behalf of. -- `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. -- `call`: The call to be made by the `real` account. +See [`Pallet::proxy_announced`]. -### Utility - 54 +### Utility - 33 #### batch - 0 @@ -1493,27 +1109,10 @@ Taking 0.2737 % of a block. ```rust calls: Vec<<T as Config>::RuntimeCall> ``` -</details> - -Send a batch of dispatch calls. - -May be called from any origin except `None`. - -- `calls`: The calls to be dispatched from the same origin. The number of call must not - exceed the constant: `batched_calls_limit` (available in constant metadata). - -If origin is root then the calls are dispatched without checking origin filter. (This -includes bypassing `frame_system::Config::BaseCallFilter`). - -**Complexity** -- O(C) where C is the number of calls to be batched. +</details> -This will return `Ok` in all circumstances. To determine the success of the batch, an -event is deposited. If a call failed and the batch was interrupted, then the -`BatchInterrupted` event is deposited, along with the number of successful calls made -and the error of the failed call. If all were successful, then the `BatchCompleted` -event is deposited. +See [`Pallet::batch`]. #### as_derivative - 1 @@ -1525,22 +1124,10 @@ Taking 0.0049 % of a block. index: u16 call: Box<<T as Config>::RuntimeCall> ``` -</details> - -Send a call through an indexed pseudonym of the sender. - -Filter from origin are passed along. The call will be dispatched with an origin which -use the same filter as the origin of this call. - -NOTE: If you need to ensure that any account-based filtering is not honored (i.e. -because you expect `proxy` to have been used prior in the call stack and you do not want -the call restrictions to apply to any sub-accounts), then use `as_multi_threshold_1` -in the Multisig pallet instead. - -NOTE: Prior to version *12, this was called `as_limited_sub`. +</details> -The dispatch origin for this call must be _Signed_. +See [`Pallet::as_derivative`]. #### batch_all - 2 @@ -1551,22 +1138,10 @@ Taking 0.2944 % of a block. ```rust calls: Vec<<T as Config>::RuntimeCall> ``` -</details> - - -Send a batch of dispatch calls and atomically execute them. -The whole transaction will rollback and fail if any of the calls failed. -May be called from any origin except `None`. - -- `calls`: The calls to be dispatched from the same origin. The number of call must not - exceed the constant: `batched_calls_limit` (available in constant metadata). - -If origin is root then the calls are dispatched without checking origin filter. (This -includes bypassing `frame_system::Config::BaseCallFilter`). +</details> -**Complexity** -- O(C) where C is the number of calls to be batched. +See [`Pallet::batch_all`]. #### force_batch - 4 @@ -1577,22 +1152,10 @@ Taking 0.3113 % of a block. ```rust calls: Vec<<T as Config>::RuntimeCall> ``` -</details> - - -Send a batch of dispatch calls. -Unlike `batch`, it allows errors and won't interrupt. - -May be called from any origin except `None`. -- `calls`: The calls to be dispatched from the same origin. The number of call must not - exceed the constant: `batched_calls_limit` (available in constant metadata). - -If origin is root then the calls are dispatch without checking origin filter. (This -includes bypassing `frame_system::Config::BaseCallFilter`). +</details> -**Complexity** -- O(C) where C is the number of calls to be batched. +See [`Pallet::force_batch`]. #### with_weight - 5 @@ -1604,17 +1167,12 @@ No weight available. call: Box<<T as Config>::RuntimeCall> weight: Weight ``` -</details> +</details> -Dispatch a function call with a specified weight. - -This function does not check the weight of the call, and instead allows the -Root origin to specify the weight of the call. - -The dispatch origin for this call must be _Root_. +See [`Pallet::with_weight`]. -### Treasury - 55 +### Treasury - 34 #### propose_spend - 0 @@ -1626,37 +1184,25 @@ Taking 0.0119 % of a block. value: BalanceOf<T, I> beneficiary: AccountIdLookupOf<T> ``` -</details> - -Put forward a suggestion for spending. A deposit proportional to the value -is reserved and slashed if the proposal is rejected. It is returned once the -proposal is awarded. +</details> -**Complexity** -- O(1) +See [`Pallet::propose_spend`]. -#### spend - 3 +#### spend_local - 3 -<details><summary><code>spend(amount, beneficiary)</code></summary> +<details><summary><code>spend_local(amount, beneficiary)</code></summary> -Taking 0.0045 % of a block. +Taking 0.0035 % of a block. ```rust amount: BalanceOf<T, I> beneficiary: AccountIdLookupOf<T> ``` -</details> +</details> -Propose and approve a spend of treasury funds. - -- `origin`: Must be `SpendOrigin` with the `Success` value being at least `amount`. -- `amount`: The amount to be transferred from the treasury to the `beneficiary`. -- `beneficiary`: The destination account for the transfer. - -NOTE: For record-keeping purposes, the proposer is deemed to be equivalent to the -beneficiary. +See [`Pallet::spend_local`]. #### remove_approval - 4 @@ -1667,28 +1213,73 @@ Taking 0.0079 % of a block. ```rust proposal_id: ProposalIndex ``` + +</details> + +See [`Pallet::remove_approval`]. + +#### spend - 5 + +<details><summary><code>spend(asset_kind, amount, beneficiary, valid_from)</code></summary> + +Taking 0.0035 % of a block. + +```rust +asset_kind: Box<T::AssetKind> +amount: AssetBalanceOf<T, I> +beneficiary: Box<BeneficiaryLookupOf<T, I>> +valid_from: Option<BlockNumberFor<T>> +``` + +</details> + +See [`Pallet::spend`]. + +#### payout - 6 + +<details><summary><code>payout(index)</code></summary> + +Taking 0.0035 % of a block. + +```rust +index: SpendIndex +``` + +</details> + +See [`Pallet::payout`]. + +#### check_status - 7 + +<details><summary><code>check_status(index)</code></summary> + +Taking 0.0035 % of a block. + +```rust +index: SpendIndex +``` + </details> +See [`Pallet::check_status`]. -Force a previously approved proposal to be removed from the approval queue. -The original deposit will no longer be returned. +#### void_spend - 8 -May only be called from `T::RejectOrigin`. -- `proposal_id`: The index of a proposal +<details><summary><code>void_spend(index)</code></summary> -**Complexity** -- O(A) where `A` is the number of approvals +Taking 0.0035 % of a block. -Errors: -- `ProposalNotApproved`: The `proposal_id` supplied was not found in the approval queue, -i.e., the proposal has not been approved. This could also mean the proposal does not -exist altogether, thus there is no way it would have been approved in the first place. +```rust +index: SpendIndex +``` +</details> +See [`Pallet::void_spend`]. ## Root calls -There are **15** root calls from **8** pallets. +There are **18** root calls from **8** pallets. ### System - 0 @@ -1701,27 +1292,24 @@ Taking 0.0105 % of a block. ```rust pages: u64 ``` -</details> +</details> -Set the number of pages in the WebAssembly environment's heap. +See [`Pallet::set_heap_pages`]. #### set_code - 2 <details><summary><code>set_code(code)</code></summary> -No weight available. +Taking 3.9604 % of a block. ```rust code: Vec<u8> ``` -</details> +</details> -Set the new runtime code. - -**Complexity** -- `O(C + S)` where `C` length of `code` and `S` complexity of `can_set_code` +See [`Pallet::set_code`]. #### set_code_without_checks - 3 @@ -1732,13 +1320,10 @@ No weight available. ```rust code: Vec<u8> ``` -</details> - -Set the new runtime code without doing any checks of the given `code`. +</details> -**Complexity** -- `O(C)` where `C` length of `code` +See [`Pallet::set_code_without_checks`]. #### set_storage - 4 @@ -1749,10 +1334,10 @@ Taking 2.6599 % of a block. ```rust items: Vec<KeyValue> ``` -</details> +</details> -Set some items of storage. +See [`Pallet::set_storage`]. #### kill_storage - 5 @@ -1763,10 +1348,10 @@ Taking 2.6329 % of a block. ```rust keys: Vec<Key> ``` -</details> +</details> -Kill some items from storage. +See [`Pallet::kill_storage`]. #### kill_prefix - 6 @@ -1778,13 +1363,52 @@ Taking 3.0283 % of a block. prefix: Key subkeys: u32 ``` + +</details> + +See [`Pallet::kill_prefix`]. + +#### authorize_upgrade - 9 + +<details><summary><code>authorize_upgrade(code_hash)</code></summary> + +Taking 0.0098 % of a block. + +```rust +code_hash: T::Hash +``` + </details> +See [`Pallet::authorize_upgrade`]. + +#### authorize_upgrade_without_checks - 10 + +<details><summary><code>authorize_upgrade_without_checks(code_hash)</code></summary> -Kill all storage items with a key that starts with the given prefix. +No weight available. + +```rust +code_hash: T::Hash +``` + +</details> + +See [`Pallet::authorize_upgrade_without_checks`]. + +#### apply_authorized_upgrade - 11 + +<details><summary><code>apply_authorized_upgrade(code)</code></summary> + +Taking 4.1178 % of a block. + +```rust +code: Vec<u8> +``` + +</details> -**NOTE:** We rely on the Root origin to provide us the number of subkeys under -the prefix we are removing to accurately calculate the weight of this function. +See [`Pallet::apply_authorized_upgrade`]. ### Babe - 3 @@ -1797,13 +1421,10 @@ No weight available. ```rust config: NextConfigDescriptor ``` -</details> +</details> -Plan an epoch config change. The epoch config change is recorded and will be enacted on -the next call to `enact_epoch_change`. The config will be activated one epoch after. -Multiple calls to this method will replace any existing planned config change that had -not been enacted yet. +See [`Pallet::plan_config_change`]. ### Balances - 6 @@ -1818,11 +1439,10 @@ source: AccountIdLookupOf<T> dest: AccountIdLookupOf<T> value: T::Balance ``` -</details> +</details> -Exactly as `transfer_allow_death`, except the origin must be root and the source account -may be specified. +See [`Pallet::force_transfer`]. #### force_unreserve - 5 @@ -1834,12 +1454,10 @@ Taking 0.0096 % of a block. who: AccountIdLookupOf<T> amount: T::Balance ``` -</details> - -Unreserve some balance from a user by force. +</details> -Can only be called by ROOT. +See [`Pallet::force_unreserve`]. ### AuthorityMembers - 11 @@ -1852,10 +1470,10 @@ Taking 0.0366 % of a block. ```rust member_id: T::MemberId ``` -</details> +</details> -remove an identity from the set of authorities +See [`Pallet::remove_member`]. ### Grandpa - 16 @@ -1866,26 +1484,15 @@ remove an identity from the set of authorities No weight available. ```rust -delay: T::BlockNumber -best_finalized_block_number: T::BlockNumber +delay: BlockNumberFor<T> +best_finalized_block_number: BlockNumberFor<T> ``` -</details> - -Note that the current authority set of the GRANDPA finality gadget has stalled. - -This will trigger a forced authority set change at the beginning of the next session, to -be enacted `delay` blocks after that. The `delay` should be high enough to safely assume -that the block signalling the forced change will not be re-orged e.g. 1000 blocks. -The block production rate (which may be slowed down because of finality lagging) should -be taken into account when choosing the `delay`. The GRANDPA voters based on the new -authority will start voting on top of `best_finalized_block_number` for new finalized -blocks. `best_finalized_block_number` should be the highest of the latest finalized -block of all validators of the new authority set. +</details> -Only callable by root. +See [`Pallet::note_stalled`]. -### TechnicalCommittee - 23 +### TechnicalCommittee - 22 #### set_members - 0 @@ -1898,33 +1505,10 @@ new_members: Vec<T::AccountId> prime: Option<T::AccountId> old_count: MemberCount ``` -</details> +</details> -Set the collective's membership. - -- `new_members`: The new member list. Be nice to the chain and provide it sorted. -- `prime`: The prime member whose vote sets the default. -- `old_count`: The upper bound for the previous number of members in storage. Used for - weight estimation. - -The dispatch of this call must be `SetMembersOrigin`. - -NOTE: Does not enforce the expected `MaxMembers` limit on the amount of members, but - the weight estimations rely on it to estimate dispatchable weight. - -WARNING: - -The `pallet-collective` can also be managed by logic outside of the pallet through the -implementation of the trait [`ChangeMembers`]. -Any call to `set_members` must be careful that the member set doesn't get out of sync -with other logic managing the member set. - -**Complexity**: -- `O(MP + N)` where: - - `M` old-members-count (code- and governance-bounded) - - `N` new-members-count (code- and governance-bounded) - - `P` proposals-count (code-bounded) +See [`Pallet::set_members`]. #### disapprove_proposal - 5 @@ -1935,21 +1519,12 @@ Taking 0.014 % of a block. ```rust proposal_hash: T::Hash ``` -</details> - - -Disapprove a proposal, close, and remove it from the system, regardless of its current -state. -Must be called by the Root origin. - -Parameters: -* `proposal_hash`: The hash of the proposal that should be disapproved. +</details> -**Complexity** -O(P) where P is the number of max proposals +See [`Pallet::disapprove_proposal`]. -### Identity - 41 +### Identity - 25 #### prune_item_identities_names - 6 @@ -1960,12 +1535,12 @@ Taking 2.6984 % of a block. ```rust names: Vec<IdtyName> ``` -</details> +</details> -remove identity names from storage +See [`Pallet::prune_item_identities_names`]. -### Utility - 54 +### Utility - 33 #### dispatch_as - 3 @@ -1977,20 +1552,10 @@ Taking 0.0059 % of a block. as_origin: Box<T::PalletsOrigin> call: Box<<T as Config>::RuntimeCall> ``` -</details> - - -Dispatches a function call with a provided origin. - -The dispatch origin for this call must be _Root_. - -**Complexity** -- O(1). - - - +</details> +See [`Pallet::dispatch_as`]. ## Disabled calls @@ -2007,13 +1572,10 @@ Taking 0.0955 % of a block. ```rust remark: Vec<u8> ``` -</details> - -Make some on-chain remark. +</details> -**Complexity** -- `O(1)` +See [`Pallet::remark`]. #### remark_with_event - 7 @@ -2024,10 +1586,10 @@ Taking 0.3514 % of a block. ```rust remark: Vec<u8> ``` -</details> +</details> -Make some on-chain remark and emit event. +See [`Pallet::remark_with_event`]. ### Session - 15 @@ -2041,18 +1603,10 @@ Taking 0.0212 % of a block. keys: T::Keys proof: Vec<u8> ``` -</details> - -Sets the session key(s) of the function caller to `keys`. -Allows an account to set its session key prior to becoming a validator. -This doesn't take effect until the next session. - -The dispatch origin of this function must be signed. +</details> -**Complexity** -- `O(1)`. Actual cost depends on the number of length of `T::Keys::key_ids()` which is - fixed. +See [`Pallet::set_keys`]. #### purge_keys - 1 @@ -2061,20 +1615,9 @@ The dispatch origin of this function must be signed. Taking 0.0189 % of a block. ```rust -``` -</details> - - -Removes any session key(s) of the function caller. -This doesn't take effect until the next session. - -The dispatch origin of this function must be Signed and the account must be either be -convertible to a validator ID using the chain's typical addressing system (this usually -means being a controller account) or directly convertible into a validator ID (which -usually means being a stash account). +``` -**Complexity** -- `O(1)` in number of key types. Actual cost depends on the number of length of - `T::Keys::key_ids()` which is fixed. +</details> +See [`Pallet::purge_keys`]. diff --git a/docs/api/runtime-errors.md b/docs/api/runtime-errors.md index ba588dddcd7f15cd8209e10cb5e3d6ae47a4215c..d4157539100f6c03525c2de2f048a834414c675c 100644 --- a/docs/api/runtime-errors.md +++ b/docs/api/runtime-errors.md @@ -28,6 +28,7 @@ and the new runtime. Failed to extract the runtime version from the new runtime. Either calling `Core_version` or decoding `RuntimeVersion` failed. + </details> </li> <li> @@ -51,6 +52,20 @@ There is a non-zero reference count preventing the account from being purged. The origin filter prevent the call to be dispatched. </details> </li> +<li> +<details> +<summary> +<code>NothingAuthorized</code> - 6</summary> +No upgrade authorized. +</details> +</li> +<li> +<details> +<summary> +<code>Unauthorized</code> - 7</summary> +The submitted code is not authorized. +</details> +</li> </ul> </li> <li>Account - 1 @@ -210,11 +225,11 @@ Number of freezes exceed `MaxFreezes`. </li> </ul> </li> -<li>TransactionPayment - 32 +<li>TransactionPayment - 7 <ul> </ul> </li> -<li>OneshotAccount - 7 +<li>OneshotAccount - 8 <ul> <li> <details> @@ -267,7 +282,7 @@ Source oneshot account does not exist. </li> </ul> </li> -<li>Quota - 66 +<li>Quota - 9 <ul> </ul> </li> @@ -589,22 +604,22 @@ Duplicated heartbeat. <ul> </ul> </li> -<li>Sudo - 20 +<li>Sudo - 19 <ul> <li> <details> <summary> <code>RequireSudo</code> - 0</summary> -Sender must be the Sudo account +Sender must be the Sudo account. </details> </li> </ul> </li> -<li>UpgradeOrigin - 21 +<li>UpgradeOrigin - 20 <ul> </ul> </li> -<li>Preimage - 22 +<li>Preimage - 21 <ul> <li> <details> @@ -648,9 +663,23 @@ A preimage may not be removed when there are outstanding requests. The preimage request cannot be removed since no outstanding requests exist. </details> </li> +<li> +<details> +<summary> +<code>TooMany</code> - 6</summary> +More than `MAX_HASH_UPGRADE_BULK_COUNT` hashes were requested to be upgraded at once. +</details> +</li> +<li> +<details> +<summary> +<code>TooFew</code> - 7</summary> +Too few hashes were requested to be upgraded (i.e. zero). +</details> +</li> </ul> </li> -<li>TechnicalCommittee - 23 +<li>TechnicalCommittee - 22 <ul> <li> <details> @@ -722,9 +751,16 @@ The given weight bound for the proposal was too low. The given length bound for the proposal was too low. </details> </li> +<li> +<details> +<summary> +<code>PrimeAccountNotMember</code> - 10</summary> +Prime account is not a member +</details> +</li> </ul> </li> -<li>UniversalDividend - 30 +<li>UniversalDividend - 23 <ul> <li> <details> @@ -735,7 +771,7 @@ This account is not allowed to claim UDs. </li> </ul> </li> -<li>Wot - 40 +<li>Wot - 24 <ul> <li> <details> @@ -795,7 +831,7 @@ Membership can only be renewed after an antispam delay. </li> </ul> </li> -<li>Identity - 41 +<li>Identity - 25 <ul> <li> <details> @@ -918,7 +954,7 @@ Cannot link to an inexisting account. </li> </ul> </li> -<li>Membership - 42 +<li>Membership - 26 <ul> <li> <details> @@ -936,7 +972,7 @@ Already member, can not add membership. </li> </ul> </li> -<li>Certification - 43 +<li>Certification - 27 <ul> <li> <details> @@ -989,7 +1025,7 @@ Can not renew a non-existing cert </li> </ul> </li> -<li>Distance - 44 +<li>Distance - 28 <ul> <li> <details> @@ -1084,7 +1120,7 @@ Targeted distance evaluation request is only possible for an unvalidated identit </li> </ul> </li> -<li>AtomicSwap - 50 +<li>AtomicSwap - 29 <ul> <li> <details> @@ -1144,7 +1180,7 @@ Duration has not yet passed for the swap to be cancelled. </li> </ul> </li> -<li>Multisig - 51 +<li>Multisig - 30 <ul> <li> <details> @@ -1246,7 +1282,7 @@ The data to be stored is already stored. </li> </ul> </li> -<li>ProvideRandomness - 52 +<li>ProvideRandomness - 31 <ul> <li> <details> @@ -1257,7 +1293,7 @@ Request randomness queue is full. </li> </ul> </li> -<li>Proxy - 53 +<li>Proxy - 32 <ul> <li> <details> @@ -1317,7 +1353,7 @@ Cannot add self as proxy. </li> </ul> </li> -<li>Utility - 54 +<li>Utility - 33 <ul> <li> <details> @@ -1328,7 +1364,7 @@ Too many calls batched. </li> </ul> </li> -<li>Treasury - 55 +<li>Treasury - 34 <ul> <li> <details> @@ -1341,7 +1377,7 @@ Proposer's balance is too low. <details> <summary> <code>InvalidIndex</code> - 1</summary> -No proposal or bounty at that index. +No proposal, bounty or spend at that index. </details> </li> <li> @@ -1366,6 +1402,55 @@ amount to be spent. Proposal has not been approved. </details> </li> +<li> +<details> +<summary> +<code>FailedToConvertBalance</code> - 5</summary> +The balance of the asset kind is not convertible to the balance of the native asset. +</details> +</li> +<li> +<details> +<summary> +<code>SpendExpired</code> - 6</summary> +The spend has expired and cannot be claimed. +</details> +</li> +<li> +<details> +<summary> +<code>EarlyPayout</code> - 7</summary> +The spend is not yet eligible for payout. +</details> +</li> +<li> +<details> +<summary> +<code>AlreadyAttempted</code> - 8</summary> +The payment has already been attempted. +</details> +</li> +<li> +<details> +<summary> +<code>PayoutError</code> - 9</summary> +There was some issue with the mechanism of payment. +</details> +</li> +<li> +<details> +<summary> +<code>NotAttempted</code> - 10</summary> +The payout was not yet attempted/claimed. +</details> +</li> +<li> +<details> +<summary> +<code>Inconclusive</code> - 11</summary> +The payment has neither failed nor succeeded yet. +</details> +</li> </ul> </li> -</ul> \ No newline at end of file +</ul> diff --git a/docs/api/runtime-events.md b/docs/api/runtime-events.md index a3a532d8a735400a1ee71d05dc64b87f913715bb..71abd3323f1538d626c6f8f8ffa739b70cc86511 100644 --- a/docs/api/runtime-events.md +++ b/docs/api/runtime-events.md @@ -77,6 +77,19 @@ sender: T::AccountId hash: T::Hash ``` +</details> +</li> +<li> +<details> +<summary> +<code>UpgradeAuthorized(code_hash, check_version)</code> - 6</summary> +An upgrade was authorized. + +```rust +code_hash: T::Hash +check_version: bool +``` + </details> </li> </ul> @@ -145,7 +158,7 @@ The account was unlinked from its identity. Scheduled some task. ```rust -when: T::BlockNumber +when: BlockNumberFor<T> index: u32 ``` @@ -158,7 +171,7 @@ index: u32 Canceled some task. ```rust -when: T::BlockNumber +when: BlockNumberFor<T> index: u32 ``` @@ -171,7 +184,7 @@ index: u32 Dispatched some task. ```rust -task: TaskAddress<T::BlockNumber> +task: TaskAddress<BlockNumberFor<T>> id: Option<TaskName> result: DispatchResult ``` @@ -185,7 +198,7 @@ result: DispatchResult The call for the provided hash was not found so the task has been aborted. ```rust -task: TaskAddress<T::BlockNumber> +task: TaskAddress<BlockNumberFor<T>> id: Option<TaskName> ``` @@ -198,7 +211,7 @@ id: Option<TaskName> The given task was unable to be renewed since the agenda is full at that block. ```rust -task: TaskAddress<T::BlockNumber> +task: TaskAddress<BlockNumberFor<T>> id: Option<TaskName> ``` @@ -211,7 +224,7 @@ id: Option<TaskName> The given task can never be executed since it is overweight. ```rust -task: TaskAddress<T::BlockNumber> +task: TaskAddress<BlockNumberFor<T>> id: Option<TaskName> ``` @@ -510,7 +523,7 @@ amount: T::Balance </li> </ul> </li> -<li>TransactionPayment - 32 +<li>TransactionPayment - 7 <ul> <li> <details> @@ -529,7 +542,7 @@ tip: BalanceOf<T> </li> </ul> </li> -<li>OneshotAccount - 7 +<li>OneshotAccount - 8 <ul> <li> <details> @@ -576,7 +589,7 @@ balance: <T::Currency as Currency<T::AccountId>>::Balance </li> </ul> </li> -<li>Quota - 66 +<li>Quota - 9 <ul> <li> <details> @@ -937,13 +950,13 @@ offline: Vec<IdentificationTuple<T>> <ul> </ul> </li> -<li>Sudo - 20 +<li>Sudo - 19 <ul> <li> <details> <summary> <code>Sudid(sudo_result)</code> - 0</summary> -A sudo just took place. \[result\] +A sudo call just took place. ```rust sudo_result: DispatchResult @@ -954,11 +967,12 @@ sudo_result: DispatchResult <li> <details> <summary> -<code>KeyChanged(old_sudoer)</code> - 1</summary> -The \[sudoer\] just switched identity; the old key is supplied if one existed. +<code>KeyChanged(old, new)</code> - 1</summary> +The sudo key has been updated. ```rust -old_sudoer: Option<T::AccountId> +old: Option<T::AccountId> +new: T::AccountId ``` </details> @@ -966,8 +980,20 @@ old_sudoer: Option<T::AccountId> <li> <details> <summary> -<code>SudoAsDone(sudo_result)</code> - 2</summary> -A sudo just took place. \[result\] +<code>KeyRemoved()</code> - 2</summary> +The key was permanently removed. + +```rust +no args +``` + +</details> +</li> +<li> +<details> +<summary> +<code>SudoAsDone(sudo_result)</code> - 3</summary> +A [sudo_as](Pallet::sudo_as) call just took place. ```rust sudo_result: DispatchResult @@ -977,7 +1003,7 @@ sudo_result: DispatchResult </li> </ul> </li> -<li>UpgradeOrigin - 21 +<li>UpgradeOrigin - 20 <ul> <li> <details> @@ -993,7 +1019,7 @@ result: DispatchResult </li> </ul> </li> -<li>Preimage - 22 +<li>Preimage - 21 <ul> <li> <details> @@ -1033,7 +1059,7 @@ hash: T::Hash </li> </ul> </li> -<li>TechnicalCommittee - 23 +<li>TechnicalCommittee - 22 <ul> <li> <details> @@ -1134,7 +1160,7 @@ no: MemberCount </li> </ul> </li> -<li>UniversalDividend - 30 +<li>UniversalDividend - 23 <ul> <li> <details> @@ -1195,11 +1221,11 @@ who: T::AccountId </li> </ul> </li> -<li>Wot - 40 +<li>Wot - 24 <ul> </ul> </li> -<li>Identity - 41 +<li>Identity - 25 <ul> <li> <details> @@ -1245,7 +1271,6 @@ idty_index: T::IdtyIndex <summary> <code>IdtyChangedOwnerKey(idty_index, new_owner_key)</code> - 3</summary> - ```rust idty_index: T::IdtyIndex new_owner_key: T::AccountId @@ -1281,7 +1306,7 @@ reason: RemovalReason </li> </ul> </li> -<li>Membership - 42 +<li>Membership - 26 <ul> <li> <details> @@ -1324,7 +1349,7 @@ reason: MembershipRemovalReason </li> </ul> </li> -<li>Certification - 43 +<li>Certification - 27 <ul> <li> <details> @@ -1368,7 +1393,7 @@ receiver: T::IdtyIndex </li> </ul> </li> -<li>Distance - 44 +<li>Distance - 28 <ul> <li> <details> @@ -1409,7 +1434,7 @@ idty_index: T::IdtyIndex </li> </ul> </li> -<li>AtomicSwap - 50 +<li>AtomicSwap - 29 <ul> <li> <details> @@ -1454,7 +1479,7 @@ proof: HashedProof </li> </ul> </li> -<li>Multisig - 51 +<li>Multisig - 30 <ul> <li> <details> @@ -1478,7 +1503,7 @@ A multisig operation has been approved by someone. ```rust approving: T::AccountId -timepoint: Timepoint<T::BlockNumber> +timepoint: Timepoint<BlockNumberFor<T>> multisig: T::AccountId call_hash: CallHash ``` @@ -1493,7 +1518,7 @@ A multisig operation has been executed. ```rust approving: T::AccountId -timepoint: Timepoint<T::BlockNumber> +timepoint: Timepoint<BlockNumberFor<T>> multisig: T::AccountId call_hash: CallHash result: DispatchResult @@ -1509,7 +1534,7 @@ A multisig operation has been cancelled. ```rust cancelling: T::AccountId -timepoint: Timepoint<T::BlockNumber> +timepoint: Timepoint<BlockNumberFor<T>> multisig: T::AccountId call_hash: CallHash ``` @@ -1518,7 +1543,7 @@ call_hash: CallHash </li> </ul> </li> -<li>ProvideRandomness - 52 +<li>ProvideRandomness - 31 <ul> <li> <details> @@ -1549,7 +1574,7 @@ r#type: RandomnessType </li> </ul> </li> -<li>Proxy - 53 +<li>Proxy - 32 <ul> <li> <details> @@ -1603,7 +1628,7 @@ A proxy was added. delegator: T::AccountId delegatee: T::AccountId proxy_type: T::ProxyType -delay: T::BlockNumber +delay: BlockNumberFor<T> ``` </details> @@ -1618,14 +1643,14 @@ A proxy was removed. delegator: T::AccountId delegatee: T::AccountId proxy_type: T::ProxyType -delay: T::BlockNumber +delay: BlockNumberFor<T> ``` </details> </li> </ul> </li> -<li>Utility - 54 +<li>Utility - 33 <ul> <li> <details> @@ -1703,7 +1728,7 @@ result: DispatchResult </li> </ul> </li> -<li>Treasury - 55 +<li>Treasury - 34 <ul> <li> <details> @@ -1817,8 +1842,76 @@ reactivated: BalanceOf<T, I> deactivated: BalanceOf<T, I> ``` +</details> +</li> +<li> +<details> +<summary> +<code>AssetSpendApproved(index, asset_kind, amount, beneficiary, valid_from, expire_at)</code> - 9</summary> +A new asset spend proposal has been approved. + +```rust +index: SpendIndex +asset_kind: T::AssetKind +amount: AssetBalanceOf<T, I> +beneficiary: T::Beneficiary +valid_from: BlockNumberFor<T> +expire_at: BlockNumberFor<T> +``` + +</details> +</li> +<li> +<details> +<summary> +<code>AssetSpendVoided(index)</code> - 10</summary> +An approved spend was voided. + +```rust +index: SpendIndex +``` + +</details> +</li> +<li> +<details> +<summary> +<code>Paid(index, payment_id)</code> - 11</summary> +A payment happened. + +```rust +index: SpendIndex +payment_id: <T::Paymaster as Pay>::Id +``` + +</details> +</li> +<li> +<details> +<summary> +<code>PaymentFailed(index, payment_id)</code> - 12</summary> +A payment failed and can be retried. + +```rust +index: SpendIndex +payment_id: <T::Paymaster as Pay>::Id +``` + +</details> +</li> +<li> +<details> +<summary> +<code>SpendProcessed(index)</code> - 13</summary> +A spend was processed and removed from the storage. It might have been successfully +paid or it may have expired. + +```rust +index: SpendIndex +``` + </details> </li> </ul> </li> -</ul> \ No newline at end of file +</ul> diff --git a/end2end-tests/Cargo.toml b/end2end-tests/Cargo.toml index d933ba05a95ef0b2e5dc3b3e2154eda043a2645c..a59b3faaeb994da0125205b474d8cd6abefb53f9 100644 --- a/end2end-tests/Cargo.toml +++ b/end2end-tests/Cargo.toml @@ -10,21 +10,23 @@ version = '3.0.0' [dev-dependencies] anyhow = "1.0" -async-trait = "0.1" -clap = { version = "3.2.23", features = ["derive"] } +async-trait = "0.1.74" +clap = { version = "3.2.23", features = ["derive", "cargo"] } # end2end cli refactoring need to upgrade to 4 ctrlc = "3.2.2" cucumber = "0.11" distance-oracle = { path = "../distance-oracle", default_features = false } env_logger = "0.9.0" -hex = "0.4" +hex = "0.4.3" notify = "4.0" parity-scale-codec = "3.4.0" portpicker = "0.1.1" serde_json = "1.0.96" -sp-keyring = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.42", default-features = false } -subxt = { git = 'https://github.com/duniter/subxt.git', branch = 'duniter-substrate-v0.9.42', default-features = false, features = ["substrate-compat", "jsonrpsee-ws"] } +sp-core = { git = "https://github.com/duniter/duniter-polkadot-sdk", branch = "duniter-substrate-v1.6.0", default-features = false } +sp-core-hashing = { git = "https://github.com/duniter/duniter-polkadot-sdk", branch = "duniter-substrate-v1.6.0", default-features = false } +sp-runtime = { git = "https://github.com/duniter/duniter-polkadot-sdk", branch = "duniter-substrate-v1.6.0" } +sp-keyring = { git = "https://github.com/duniter/duniter-polkadot-sdk", branch = "duniter-substrate-v1.6.0" } +subxt = { git = 'https://github.com/duniter/subxt', branch = 'subxt-v0.34.0-duniter-substrate-v1.6.0', default-features = false, features = ["substrate-compat", "native", "jsonrpsee"] } tokio = { version = "1.28", features = ["macros", "time", "rt-multi-thread"], default-features = false } -sp-runtime = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false , features = ["std"] } [[test]] name = "cucumber_tests" diff --git a/end2end-tests/cucumber-features/oneshot_account.feature b/end2end-tests/cucumber-features/oneshot_account.feature index e180b019b9708a1e3d6310ca57801600dae2d948..10b6b3a9009f7f17f4d5f3537f976e01364e2b87 100644 --- a/end2end-tests/cucumber-features/oneshot_account.feature +++ b/end2end-tests/cucumber-features/oneshot_account.feature @@ -1,9 +1,11 @@ Feature: Oneshot account Scenario: Simple oneshot consumption + When charlie sends 7 ĞD to dave + # Cover the oneshot calls fees When alice sends 7 ĞD to oneshot dave - # Alice is treasury funder for 1 ĞD and pays fees TODO - Then alice should have 199 cĞD + # Alice is treasury funder for 1 ĞD, and member so fees are refunded + Then alice should have 2 ĞD Then dave should have oneshot 7 ĞD When oneshot dave consumes into account bob Then dave should have oneshot 0 ĞD @@ -11,13 +13,16 @@ Feature: Oneshot account Then bob should have oneshot 0 ĞD Scenario: Double oneshot consumption + When charlie sends 7 ĞD to dave + Then charlie should have 299 cĞD + # Cover the oneshot calls fees When alice sends 7 ĞD to oneshot dave - # Alice is treasury funder for 1 ĞD and pays fees TODO - Then alice should have 199 cĞD + # Alice is treasury funder for 1 ĞD, and member so fees are refunded + Then alice should have 2 ĞD Then dave should have oneshot 7 ĞD When oneshot dave consumes 4 ĞD into account bob and the rest into oneshot charlie Then dave should have oneshot 0 ĞD Then bob should have 14 ĞD Then bob should have oneshot 0 ĞD - Then charlie should have 10 ĞD + Then charlie should have 299 cĞD Then charlie should have oneshot 298 cĞD diff --git a/end2end-tests/cucumber-genesis/default.json b/end2end-tests/cucumber-genesis/default.json index 84ba683ec5250381762a1a85d4d7d095d05e4769..2912937ff5b82608ade3116bf4fd837bffbe2ea1 100644 --- a/end2end-tests/cucumber-genesis/default.json +++ b/end2end-tests/cucumber-genesis/default.json @@ -93,4 +93,4 @@ "number": 0, "medianTime": 1700000000 } -} \ No newline at end of file +} diff --git a/end2end-tests/tests/common/balances.rs b/end2end-tests/tests/common/balances.rs index a09421ae2ba08043a1baf85661de4d166cf68c78..9329a5fe13bcf9ca6081cd783611ef17c5b934c6 100644 --- a/end2end-tests/tests/common/balances.rs +++ b/end2end-tests/tests/common/balances.rs @@ -20,10 +20,11 @@ use super::*; use sp_keyring::AccountKeyring; use subxt::{tx::PairSigner, utils::MultiAddress}; -pub async fn set_balance(client: &Client, who: AccountKeyring, amount: u64) -> Result<()> { +pub async fn set_balance(client: &FullClient, who: AccountKeyring, amount: u64) -> Result<()> { let _events = create_block_with_extrinsic( - client, + &client.rpc, client + .client .tx() .create_signed( &gdev::tx() @@ -35,7 +36,7 @@ pub async fn set_balance(client: &Client, who: AccountKeyring, amount: u64) -> R }, )), &PairSigner::new(SUDO_ACCOUNT.pair()), - BaseExtrinsicParamsBuilder::new(), + SubstrateExtrinsicParamsBuilder::new().build(), ) .await?, ) @@ -45,7 +46,7 @@ pub async fn set_balance(client: &Client, who: AccountKeyring, amount: u64) -> R } pub async fn transfer( - client: &Client, + client: &FullClient, from: AccountKeyring, amount: u64, to: AccountKeyring, @@ -54,15 +55,16 @@ pub async fn transfer( let to = to.to_account_id(); let _events = create_block_with_extrinsic( - client, + &client.rpc, client + .client .tx() .create_signed( &gdev::tx() .universal_dividend() .transfer_ud(to.clone().into(), amount), &from, - BaseExtrinsicParamsBuilder::new(), + SubstrateExtrinsicParamsBuilder::new().build(), ) .await?, ) @@ -71,18 +73,23 @@ pub async fn transfer( Ok(()) } -pub async fn transfer_all(client: &Client, from: AccountKeyring, to: AccountKeyring) -> Result<()> { +pub async fn transfer_all( + client: &FullClient, + from: AccountKeyring, + to: AccountKeyring, +) -> Result<()> { let from = PairSigner::new(from.pair()); let to = to.to_account_id(); let _events = create_block_with_extrinsic( - client, + &client.rpc, client + .client .tx() .create_signed( &gdev::tx().balances().transfer_all(to.into(), false), &from, - BaseExtrinsicParamsBuilder::new(), + SubstrateExtrinsicParamsBuilder::new().build(), ) .await?, ) @@ -92,7 +99,7 @@ pub async fn transfer_all(client: &Client, from: AccountKeyring, to: AccountKeyr } pub async fn transfer_ud( - client: &Client, + client: &FullClient, from: AccountKeyring, amount: u64, to: AccountKeyring, @@ -101,15 +108,16 @@ pub async fn transfer_ud( let to = to.to_account_id(); let _events = create_block_with_extrinsic( - client, + &client.rpc, client + .client .tx() .create_signed( &gdev::tx() .universal_dividend() .transfer_ud(to.clone().into(), amount), &from, - BaseExtrinsicParamsBuilder::new(), + SubstrateExtrinsicParamsBuilder::new().build(), ) .await?, ) diff --git a/end2end-tests/tests/common/cert.rs b/end2end-tests/tests/common/cert.rs index d1fba64178b81da4ded2cc46d7953b25c9dcef43..86efaed685f7a8962949df0d1c6facf9576b5612 100644 --- a/end2end-tests/tests/common/cert.rs +++ b/end2end-tests/tests/common/cert.rs @@ -20,12 +20,13 @@ use super::*; use sp_keyring::AccountKeyring; use subxt::{tx::PairSigner, utils::MultiAddress}; -pub async fn certify(client: &Client, from: AccountKeyring, to: AccountKeyring) -> Result<()> { +pub async fn certify(client: &FullClient, from: AccountKeyring, to: AccountKeyring) -> Result<()> { let signer = PairSigner::new(from.pair()); let from = from.to_account_id(); let to = to.to_account_id(); let _issuer_index = client + .client .storage() .at_latest() .await @@ -38,6 +39,7 @@ pub async fn certify(client: &Client, from: AccountKeyring, to: AccountKeyring) .await? .unwrap_or_else(|| panic!("{} issuer must exist", from)); let receiver_index = client + .client .storage() .at_latest() .await @@ -47,13 +49,14 @@ pub async fn certify(client: &Client, from: AccountKeyring, to: AccountKeyring) .unwrap_or_else(|| panic!("{} issuer must exist", from)); let _events = create_block_with_extrinsic( - client, + &client.rpc, client + .client .tx() .create_signed( &gdev::tx().certification().add_cert(receiver_index), &signer, - BaseExtrinsicParamsBuilder::new(), + SubstrateExtrinsicParamsBuilder::new().build(), ) .await?, ) diff --git a/end2end-tests/tests/common/distance.rs b/end2end-tests/tests/common/distance.rs index c06b52919fb2dc09b0011088dfb229e28295f7e4..97add31a313804b983b61b3d5feb4228dc9593f9 100644 --- a/end2end-tests/tests/common/distance.rs +++ b/end2end-tests/tests/common/distance.rs @@ -19,20 +19,22 @@ use super::gdev::runtime_types::pallet_identity; use super::*; use crate::DuniterWorld; use sp_keyring::AccountKeyring; +use subxt::backend::rpc::RpcClient; use subxt::tx::{PairSigner, Signer}; use subxt::utils::AccountId32; -pub async fn request_evaluation(client: &Client, origin: AccountKeyring) -> Result<()> { +pub async fn request_evaluation(client: &FullClient, origin: AccountKeyring) -> Result<()> { let origin = PairSigner::new(origin.pair()); let _events = create_block_with_extrinsic( - client, + &client.rpc, client + .client .tx() .create_signed( &gdev::tx().distance().request_distance_evaluation(), &origin, - BaseExtrinsicParamsBuilder::new(), + SubstrateExtrinsicParamsBuilder::new().build(), ) .await?, ) @@ -41,7 +43,11 @@ pub async fn request_evaluation(client: &Client, origin: AccountKeyring) -> Resu Ok(()) } -pub async fn run_oracle(client: &Client, origin: AccountKeyring, rpc_url: String) -> Result<()> { +pub async fn run_oracle( + client: &FullClient, + origin: AccountKeyring, + rpc_url: String, +) -> Result<()> { let origin = PairSigner::new(origin.pair()); let account_id: &AccountId32 = origin.account_id(); @@ -56,12 +62,12 @@ pub async fn run_oracle(client: &Client, origin: AccountKeyring, rpc_url: String .await { for _ in 0..30 { - super::create_empty_block(client).await?; + super::create_empty_block(&client.rpc).await?; } let _events = create_block_with_extrinsic( - client, - client + &client.rpc, + client.client .tx() .create_signed( &gdev::tx().sudo().sudo(gdev::runtime_types::gdev_runtime::RuntimeCall::Distance( @@ -75,7 +81,7 @@ pub async fn run_oracle(client: &Client, origin: AccountKeyring, rpc_url: String ) ), &origin, - BaseExtrinsicParamsBuilder::new(), + SubstrateExtrinsicParamsBuilder::new().build(), ) .await?, ) diff --git a/end2end-tests/tests/common/identity.rs b/end2end-tests/tests/common/identity.rs index 57707e5b078ce10170cad3bc00ac5c97e9aa8ad5..ab42cff025a9044cc3b23646fa1de82ef4ead41b 100644 --- a/end2end-tests/tests/common/identity.rs +++ b/end2end-tests/tests/common/identity.rs @@ -17,6 +17,7 @@ use super::gdev; use super::gdev::runtime_types::pallet_identity; use super::*; +use crate::gdev::runtime_types::pallet_identity::types::IdtyName; use crate::DuniterWorld; use sp_keyring::AccountKeyring; use subxt::tx::PairSigner; @@ -30,7 +31,7 @@ type IdtyValue = // submit extrinsics pub async fn create_identity( - client: &Client, + client: &FullClient, from: AccountKeyring, to: AccountKeyring, ) -> Result<()> { @@ -38,13 +39,14 @@ pub async fn create_identity( let to = to.to_account_id(); let _events = create_block_with_extrinsic( - client, + &client.rpc, client + .client .tx() .create_signed( &gdev::tx().identity().create_identity(to.into()), &from, - BaseExtrinsicParamsBuilder::new(), + SubstrateExtrinsicParamsBuilder::new().build(), ) .await?, ) @@ -53,17 +55,23 @@ pub async fn create_identity( Ok(()) } -pub async fn confirm_identity(client: &Client, from: AccountKeyring, pseudo: String) -> Result<()> { +pub async fn confirm_identity( + client: &FullClient, + from: AccountKeyring, + pseudo: String, +) -> Result<()> { let from = PairSigner::new(from.pair()); + let pseudo: IdtyName = IdtyName(pseudo.as_bytes().to_vec()); let _events = create_block_with_extrinsic( - client, + &client.rpc, client + .client .tx() .create_signed( &gdev::tx().identity().confirm_identity(pseudo), &from, - BaseExtrinsicParamsBuilder::new(), + SubstrateExtrinsicParamsBuilder::new().build(), ) .await?, ) diff --git a/end2end-tests/tests/common/mod.rs b/end2end-tests/tests/common/mod.rs index d69a00c155f3cfc1694811945447a74d86d8d492..6b65e5ec757f6ba4085b04223ac4c7f1b62d4c2f 100644 --- a/end2end-tests/tests/common/mod.rs +++ b/end2end-tests/tests/common/mod.rs @@ -37,9 +37,12 @@ use std::path::{Path, PathBuf}; use std::process::Command; use std::str::FromStr; use std::time::{Duration, Instant}; -use subxt::config::extrinsic_params::BaseExtrinsicParamsBuilder; +use subxt::backend::rpc::RpcClient; +use subxt::backend::rpc::RpcParams; +use subxt::config::substrate::SubstrateExtrinsicParamsBuilder; +use subxt::config::SubstrateExtrinsicParams; use subxt::ext::{sp_core, sp_runtime}; -use subxt::rpc::rpc_params; +use subxt::rpc_params; pub type Client = subxt::OnlineClient<GdevConfig>; pub type Event = gdev::Event; @@ -49,15 +52,15 @@ pub type TxProgress = subxt::tx::TxProgress<GdevConfig, Client>; pub enum GdevConfig {} impl subxt::config::Config for GdevConfig { - type Index = u32; - type Hash = sp_core::H256; type AccountId = subxt::utils::AccountId32; type Address = sp_runtime::MultiAddress<Self::AccountId, u32>; + type AssetId = (); + type ExtrinsicParams = SubstrateExtrinsicParams<Self>; + type Hash = sp_core::H256; + type Hasher = subxt::config::substrate::BlakeTwo256; type Header = subxt::config::substrate::SubstrateHeader<u32, subxt::config::substrate::BlakeTwo256>; - type Hasher = subxt::config::substrate::BlakeTwo256; type Signature = sp_runtime::MultiSignature; - type ExtrinsicParams = subxt::config::extrinsic_params::BaseExtrinsicParams<Self, Tip>; } #[derive(Copy, Clone, Debug, Default, Encode)] @@ -66,6 +69,11 @@ pub struct Tip { tip: u64, } +pub struct FullClient { + pub rpc: RpcClient, + pub client: Client, +} + impl Tip { pub fn new(amount: u64) -> Self { Tip { tip: amount } @@ -101,13 +109,13 @@ const DUNITER_LOCAL_PATH: &str = "../target/debug/duniter"; struct FullNode { process: Process, p2p_port: u16, - ws_port: u16, + rpc_port: u16, } pub async fn spawn_node( maybe_genesis_conf_file: Option<PathBuf>, no_spawn: bool, -) -> (Client, Option<Process>, u16) { +) -> (FullClient, Option<Process>, u16) { println!("maybe_genesis_conf_file={:?}", maybe_genesis_conf_file); let duniter_binary_path = std::env::var("DUNITER_BINARY_PATH").unwrap_or_else(|_| { if std::path::Path::new(DUNITER_DOCKER_PATH).exists() { @@ -117,14 +125,14 @@ pub async fn spawn_node( } }); - let mut the_ws_port = 9944; + let mut the_rpc_port = 9944; let mut opt_process = None; // Eventually spawn a node (we most likely will - unless --no-spawn option is used) if !no_spawn { let FullNode { process, p2p_port: _, - ws_port, + rpc_port, } = spawn_full_node( &[ "--chain=gdev_dev", @@ -144,27 +152,27 @@ pub async fn spawn_node( maybe_genesis_conf_file, ); opt_process = Some(process); - the_ws_port = ws_port; + the_rpc_port = rpc_port; } - let client = Client::from_url(format!("ws://127.0.0.1:{}", the_ws_port)) + let rpc = RpcClient::from_url(format!("ws://127.0.0.1:{}", the_rpc_port)) .await - .expect("fail to connect to node"); + .expect("Failed to create the rpc backend"); + let client = Client::from_rpc_client(rpc.clone()).await.unwrap(); - (client, opt_process, the_ws_port) + (FullClient { rpc, client }, opt_process, the_rpc_port) } -pub async fn create_empty_block(client: &Client) -> Result<()> { +pub async fn create_empty_block(client: &RpcClient) -> Result<()> { // Create an empty block let _: Value = client - .rpc() - .request("engine_createBlock", rpc_params![true, false, Value::Null]) + .request("engine_createBlock", rpc_params![true, true, Value::Null]) .await?; Ok(()) } pub async fn create_block_with_extrinsic( - client: &Client, + client: &RpcClient, extrinsic: SubmittableExtrinsic, ) -> Result<subxt::blocks::ExtrinsicEvents<GdevConfig>> { //println!("extrinsic encoded: {}", hex::encode(extrinsic.encoded())); @@ -173,13 +181,12 @@ pub async fn create_block_with_extrinsic( // Create a non-empty block let _: Value = client - .rpc() - .request("engine_createBlock", rpc_params![false, false, Value::Null]) + .request("engine_createBlock", rpc_params![false, true, Value::Null]) .await?; // Get extrinsic events watcher - .wait_for_in_block() + .wait_for_finalized() .await? .fetch_events() .await @@ -194,7 +201,6 @@ fn spawn_full_node( // Ports let p2p_port = portpicker::pick_unused_port().expect("No ports free"); let rpc_port = portpicker::pick_unused_port().expect("No ports free"); - let ws_port = portpicker::pick_unused_port().expect("No ports free"); // Env vars let mut envs = Vec::new(); @@ -204,7 +210,7 @@ fn spawn_full_node( } // Logs - let log_file_path = format!("duniter-v2s-{}.log", ws_port); + let log_file_path = format!("duniter-v2s-{}.log", rpc_port); let log_file = std::fs::File::create(&log_file_path).expect("fail to create log file"); // Command @@ -218,8 +224,6 @@ fn spawn_full_node( &p2p_port.to_string(), "--rpc-port", &rpc_port.to_string(), - "--ws-port", - &ws_port.to_string(), ] .iter() .chain(args), @@ -247,7 +251,7 @@ fn spawn_full_node( FullNode { process, p2p_port, - ws_port, + rpc_port, } } diff --git a/end2end-tests/tests/common/oneshot.rs b/end2end-tests/tests/common/oneshot.rs index 6bfe2189d5e2dd730bd99ba90ab54c0159fdb702..51478d12978f6432da50e06c7d47e180dae32a63 100644 --- a/end2end-tests/tests/common/oneshot.rs +++ b/end2end-tests/tests/common/oneshot.rs @@ -43,7 +43,7 @@ impl Account { } pub async fn create_oneshot_account( - client: &Client, + client: &FullClient, from: AccountKeyring, amount: u64, to: AccountKeyring, @@ -52,15 +52,16 @@ pub async fn create_oneshot_account( let to = to.to_account_id(); let _events = create_block_with_extrinsic( - client, + &client.rpc, client + .client .tx() .create_signed( &gdev::tx() .oneshot_account() .create_oneshot_account(to.into(), amount), &from, - BaseExtrinsicParamsBuilder::new(), + SubstrateExtrinsicParamsBuilder::new().build(), ) .await?, ) @@ -70,7 +71,7 @@ pub async fn create_oneshot_account( } pub async fn consume_oneshot_account( - client: &Client, + client: &FullClient, from: AccountKeyring, to: Account, ) -> Result<()> { @@ -78,13 +79,14 @@ pub async fn consume_oneshot_account( let to = to.to_account_id(); let _events = create_block_with_extrinsic( - client, + &client.rpc, client + .client .tx() .create_signed( &gdev::tx().oneshot_account().consume_oneshot_account(0, to), &from, - BaseExtrinsicParamsBuilder::new(), + SubstrateExtrinsicParamsBuilder::new().build(), ) .await?, ) @@ -95,7 +97,7 @@ pub async fn consume_oneshot_account( #[allow(clippy::too_many_arguments)] pub async fn consume_oneshot_account_with_remaining( - client: &Client, + client: &FullClient, from: AccountKeyring, amount: u64, to: Account, @@ -106,15 +108,16 @@ pub async fn consume_oneshot_account_with_remaining( let remaining_to = remaining_to.to_account_id(); let _events = create_block_with_extrinsic( - client, + &client.rpc, client + .client .tx() .create_signed( &gdev::tx() .oneshot_account() .consume_oneshot_account_with_remaining(0, to, remaining_to, amount), &from, - BaseExtrinsicParamsBuilder::new(), + SubstrateExtrinsicParamsBuilder::new().build(), ) .await?, ) diff --git a/end2end-tests/tests/cucumber_tests.rs b/end2end-tests/tests/cucumber_tests.rs index 48d7c30be44ce6ef8a1c7bfba5cc4a487f4d83c3..e63495dff01ad78930744ddb0c5747a7f3058d9a 100644 --- a/end2end-tests/tests/cucumber_tests.rs +++ b/end2end-tests/tests/cucumber_tests.rs @@ -27,6 +27,7 @@ use std::sync::{ atomic::{AtomicBool, Ordering}, Arc, }; +use subxt::backend::rpc::RpcClient; // ===== world ===== @@ -44,25 +45,47 @@ impl DuniterWorld { } self.inner = Some(DuniterWorldInner::new(maybe_genesis_conf_file, no_spawn).await); } + fn kill(&mut self) { if let Some(ref mut inner) = self.inner { inner.kill(); } } + fn set_ignore_errors(&mut self, ignore_errors: bool) { self.ignore_errors = ignore_errors; } + // Read methods + fn rpc_client(&self) -> &RpcClient { + if let Some(ref inner) = self.inner { + &inner.client.rpc + } else { + panic!("uninit") + } + } + fn client(&self) -> &Client { + if let Some(ref inner) = self.inner { + &inner.client.client + } else { + panic!("uninit") + } + } + + fn full_client(&self) -> &FullClient { if let Some(ref inner) = self.inner { &inner.client } else { panic!("uninit") } } + + // Read methods fn ignore_errors(&self) -> bool { self.ignore_errors } + // Read storage entry on last block async fn read<'a, Address>( &self, @@ -80,6 +103,7 @@ impl DuniterWorld { .unwrap() .fetch(address) } + // Read storage entry with default value (on last block) async fn read_or_default<'a, Address>( &self, @@ -120,7 +144,7 @@ impl World for DuniterWorld { } struct DuniterWorldInner { - client: Client, + client: FullClient, process: Option<Process>, ws_port: u16, } @@ -134,6 +158,7 @@ impl DuniterWorldInner { ws_port, } } + fn kill(&mut self) { if let Some(p) = &mut self.process { p.kill(); @@ -170,7 +195,7 @@ async fn who_have(world: &mut DuniterWorld, who: String, amount: u64, unit: Stri } // Create {amount} ĞD for {who} - common::balances::set_balance(world.client(), who, amount).await?; + common::balances::set_balance(world.full_client(), who, amount).await?; Ok(()) } @@ -181,7 +206,7 @@ async fn who_have(world: &mut DuniterWorld, who: String, amount: u64, unit: Stri #[when(regex = r"(\d+) blocks? later")] async fn n_blocks_later(world: &mut DuniterWorld, n: usize) -> Result<()> { for _ in 0..n { - common::create_empty_block(world.client()).await?; + common::create_empty_block(world.rpc_client()).await?; } Ok(()) } @@ -201,9 +226,9 @@ async fn transfer( let (amount, is_ud) = parse_amount(amount, &unit); let res = if is_ud { - common::balances::transfer_ud(world.client(), from, amount, to).await + common::balances::transfer_ud(world.full_client(), from, amount, to).await } else { - common::balances::transfer(world.client(), from, amount, to).await + common::balances::transfer(world.full_client(), from, amount, to).await }; if world.ignore_errors() { @@ -229,7 +254,7 @@ async fn create_oneshot_account( assert!(!is_ud); - common::oneshot::create_oneshot_account(world.client(), from, amount, to).await + common::oneshot::create_oneshot_account(world.full_client(), from, amount, to).await } #[allow(clippy::needless_pass_by_ref_mut)] @@ -249,7 +274,7 @@ async fn consume_oneshot_account( _ => unreachable!(), }; - common::oneshot::consume_oneshot_account(world.client(), from, to).await + common::oneshot::consume_oneshot_account(world.full_client(), from, to).await } #[when( @@ -286,7 +311,7 @@ async fn consume_oneshot_account_with_remaining( assert!(!is_ud); common::oneshot::consume_oneshot_account_with_remaining( - world.client(), + world.full_client(), from, amount, to, @@ -302,7 +327,7 @@ async fn send_all_to(world: &mut DuniterWorld, from: String, to: String) -> Resu let from = AccountKeyring::from_str(&from).expect("unknown from"); let to = AccountKeyring::from_str(&to).expect("unknown to"); - common::balances::transfer_all(world.client(), from, to).await + common::balances::transfer_all(world.full_client(), from, to).await } #[allow(clippy::needless_pass_by_ref_mut)] @@ -312,7 +337,7 @@ async fn certifies(world: &mut DuniterWorld, from: String, to: String) -> Result let from = AccountKeyring::from_str(&from).expect("unknown from"); let to = AccountKeyring::from_str(&to).expect("unknown to"); - common::cert::certify(world.client(), from, to).await + common::cert::certify(world.full_client(), from, to).await } #[allow(clippy::needless_pass_by_ref_mut)] @@ -322,7 +347,7 @@ async fn creates_identity(world: &mut DuniterWorld, from: String, to: String) -> let from = AccountKeyring::from_str(&from).expect("unknown from"); let to = AccountKeyring::from_str(&to).expect("unknown to"); - common::identity::create_identity(world.client(), from, to).await + common::identity::create_identity(world.full_client(), from, to).await } #[allow(clippy::needless_pass_by_ref_mut)] @@ -330,7 +355,7 @@ async fn creates_identity(world: &mut DuniterWorld, from: String, to: String) -> async fn confirm_identity(world: &mut DuniterWorld, from: String, pseudo: String) -> Result<()> { let from = AccountKeyring::from_str(&from).expect("unknown from"); - common::identity::confirm_identity(world.client(), from, pseudo).await + common::identity::confirm_identity(world.full_client(), from, pseudo).await } #[allow(clippy::needless_pass_by_ref_mut)] @@ -338,7 +363,7 @@ async fn confirm_identity(world: &mut DuniterWorld, from: String, pseudo: String async fn request_distance_evaluation(world: &mut DuniterWorld, who: String) -> Result<()> { let who = AccountKeyring::from_str(&who).expect("unknown origin"); - common::distance::request_evaluation(world.client(), who).await + common::distance::request_evaluation(world.full_client(), who).await } #[allow(clippy::needless_pass_by_ref_mut)] @@ -347,7 +372,7 @@ async fn run_distance_oracle(world: &mut DuniterWorld, who: String) -> Result<() let who = AccountKeyring::from_str(&who).expect("unknown origin"); common::distance::run_oracle( - world.client(), + world.full_client(), who, format!("ws://127.0.0.1:{}", world.inner.as_ref().unwrap().ws_port), ) diff --git a/live-tests/Cargo.toml b/live-tests/Cargo.toml index d58d98fc276997f7504e90d2b8fbde8199d9eedc..d29c9455c0250a2b66b5bc5afc2928bfb310d680 100644 --- a/live-tests/Cargo.toml +++ b/live-tests/Cargo.toml @@ -10,10 +10,10 @@ version = '3.0.0' [dev-dependencies] anyhow = "1.0" +countmap = "0.2.0" hex-literal = "0.4" parity-scale-codec = "3.4.0" -sp-core = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -subxt = { git = 'https://github.com/duniter/subxt', branch = 'duniter-substrate-v0.9.42', default-features = false, features = ["jsonrpsee-ws"] } +sp-core = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +sp-runtime = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false, features = ["std"] } # https://github.com/paritytech/subxt/issues/437 +subxt = { git = 'https://github.com/paritytech/subxt.git', tag = 'v0.33.0', default-features = false, features = ["substrate-compat", "native"] } tokio = { version = "1.28", features = ["macros", "time", "rt-multi-thread"], default-features = false } -sp-runtime = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false , features = ["std"] } # https://github.com/paritytech/subxt/issues/437 -countmap = "0.2.0" diff --git a/node/src/chain_spec/gdev.rs b/node/src/chain_spec/gdev.rs index 1ea45a67a1962775303d820b718ed37a9447ba34..f43332a4c5dfcfd488992c34115506779a3de16b 100644 --- a/node/src/chain_spec/gdev.rs +++ b/node/src/chain_spec/gdev.rs @@ -14,6 +14,8 @@ // You should have received a copy of the GNU Affero General Public License // along with Duniter-v2S. If not, see <https://www.gnu.org/licenses/>. +#![allow(deprecated)] + use super::*; use crate::chain_spec::gen_genesis_data::{ AuthorityKeys, CommonParameters, GenesisIdentity, SessionKeysProvider, @@ -23,10 +25,9 @@ use common_runtime::entities::IdtyData; use common_runtime::*; use gdev_runtime::{ opaque::SessionKeys, pallet_universal_dividend, parameters, AccountConfig, - AuthorityMembersConfig, BabeConfig, BalancesConfig, CertificationConfig, GenesisConfig, - IdentityConfig, MembershipConfig, ParametersConfig, QuotaConfig, Runtime, SessionConfig, - SmithMembersConfig, SudoConfig, SystemConfig, TechnicalCommitteeConfig, - UniversalDividendConfig, WASM_BINARY, + AuthorityMembersConfig, BabeConfig, BalancesConfig, CertificationConfig, IdentityConfig, + MembershipConfig, ParametersConfig, QuotaConfig, Runtime, RuntimeGenesisConfig, SessionConfig, + SmithMembersConfig, SudoConfig, TechnicalCommitteeConfig, UniversalDividendConfig, WASM_BINARY, }; use jsonrpsee::core::JsonValue; use sc_network::config::MultiaddrWithPeerId; @@ -37,7 +38,7 @@ use sp_core::{sr25519, Get}; use sp_runtime::Perbill; use std::{env, fs}; -pub type ChainSpec = sc_service::GenericChainSpec<GenesisConfig>; +pub type ChainSpec = sc_service::GenericChainSpec<RuntimeGenesisConfig>; type GenesisParameters = gdev_runtime::GenesisParameters<u32, u32, u64, u32>; @@ -61,8 +62,9 @@ impl SessionKeysProvider<SessionKeys> for GDevSKP { } fn get_parameters(parameters_from_file: &Option<GenesisParameters>) -> CommonParameters { - let parameters_from_file = - parameters_from_file.expect("parameters must be defined in file for GDev"); + let parameters_from_file = parameters_from_file + .clone() + .expect("parameters must be defined in file for GDev"); CommonParameters { currency_name: TOKEN_SYMBOL.to_string(), decimals: TOKEN_DECIMALS, @@ -124,7 +126,7 @@ pub fn gdev_development_chain_spec(config_file_path: String) -> Result<ChainSpec Some("Alice".to_owned()), ) .expect("Genesis Data must be buildable"); - genesis_data_to_gdev_genesis_conf(genesis_data, wasm_binary.to_vec()) + genesis_data_to_gdev_genesis_conf(genesis_data) }, // Bootnodes vec![], @@ -146,6 +148,7 @@ pub fn gdev_development_chain_spec(config_file_path: String) -> Result<ChainSpec ), // Extensions None, + &wasm_binary.to_vec().clone(), // TODO upgrade to builder )) } @@ -190,7 +193,7 @@ pub fn gen_live_conf( None, ) .expect("Genesis Data must be buildable"); - genesis_data_to_gdev_genesis_conf(genesis_data, wasm_binary.to_vec()) + genesis_data_to_gdev_genesis_conf(genesis_data) }, // Bootnodes client_spec.boot_nodes, @@ -204,6 +207,7 @@ pub fn gen_live_conf( client_spec.properties, // Extensions None, + &wasm_binary.clone(), // TODO upgrade to builder )) } @@ -241,7 +245,7 @@ pub fn local_testnet_config( get_parameters, ) .expect("Genesis Data must be buildable"); - genesis_data_to_gdev_genesis_conf(genesis_data, wasm_binary.to_vec()) + genesis_data_to_gdev_genesis_conf(genesis_data) }, // Bootnodes vec![], @@ -263,14 +267,14 @@ pub fn local_testnet_config( ), // Extensions None, + &wasm_binary.clone(), // TODO upgrade to builder )) } /// custom genesis fn genesis_data_to_gdev_genesis_conf( genesis_data: super::gen_genesis_data::GenesisData<GenesisParameters, SessionKeys>, - wasm_binary: Vec<u8>, -) -> gdev_runtime::GenesisConfig { +) -> gdev_runtime::RuntimeGenesisConfig { let super::gen_genesis_data::GenesisData { accounts, treasury_balance, @@ -290,11 +294,8 @@ fn genesis_data_to_gdev_genesis_conf( ud, } = genesis_data; - gdev_runtime::GenesisConfig { - system: SystemConfig { - // Add Wasm runtime to storage. - code: wasm_binary, - }, + gdev_runtime::RuntimeGenesisConfig { + system: Default::default(), account: AccountConfig { accounts, treasury_balance, @@ -312,6 +313,7 @@ fn genesis_data_to_gdev_genesis_conf( babe: BabeConfig { authorities: Vec::with_capacity(0), epoch_config: Some(BABE_GENESIS_EPOCH_CONFIG), + _config: Default::default(), }, grandpa: Default::default(), im_online: Default::default(), @@ -377,6 +379,7 @@ fn genesis_data_to_gdev_genesis_conf( ud, }, treasury: Default::default(), + transaction_payment: Default::default(), } } diff --git a/node/src/chain_spec/gtest.rs b/node/src/chain_spec/gtest.rs index 2b0ff5c78eca108fa2b762ddf721a616595f273a..b4c37dbe6ffee3d30aba933a0d32c37d500010ef 100644 --- a/node/src/chain_spec/gtest.rs +++ b/node/src/chain_spec/gtest.rs @@ -14,18 +14,19 @@ // You should have received a copy of the GNU Affero General Public License // along with Duniter-v2S. If not, see <https://www.gnu.org/licenses/>. +#![allow(deprecated)] + use super::*; use crate::chain_spec::gen_genesis_data::{CommonParameters, GenesisIdentity, SessionKeysProvider}; use common_runtime::constants::*; use common_runtime::entities::IdtyData; use common_runtime::*; -use frame_benchmarking::frame_support::traits::Get; use gtest_runtime::SmithMembersConfig; use gtest_runtime::{ opaque::SessionKeys, pallet_universal_dividend, parameters, AccountConfig, AccountId, AuthorityMembersConfig, BabeConfig, BalancesConfig, CertificationConfig, GenesisConfig, IdentityConfig, ImOnlineId, MembershipConfig, Perbill, QuotaConfig, Runtime, SessionConfig, - SudoConfig, SystemConfig, TechnicalCommitteeConfig, UniversalDividendConfig, WASM_BINARY, + SudoConfig, TechnicalCommitteeConfig, UniversalDividendConfig, WASM_BINARY, }; use jsonrpsee::core::JsonValue; use sc_consensus_grandpa::AuthorityId as GrandpaId; @@ -35,6 +36,7 @@ use sc_telemetry::TelemetryEndpoints; use serde::Deserialize; use sp_authority_discovery::AuthorityId as AuthorityDiscoveryId; use sp_consensus_babe::AuthorityId as BabeId; +use sp_core::Get; use std::{env, fs}; pub type ChainSpec = sc_service::GenericChainSpec<GenesisConfig>; @@ -149,7 +151,7 @@ pub fn development_chainspecs(config_file_path: String) -> Result<ChainSpec, Str Some("Alice".to_owned()), ) .expect("Genesis Data must be buildable"); - genesis_data_to_gtest_genesis_conf(genesis_data, wasm_binary.to_vec()) + genesis_data_to_gtest_genesis_conf(genesis_data) }, // Bootnodes vec![], @@ -171,6 +173,7 @@ pub fn development_chainspecs(config_file_path: String) -> Result<ChainSpec, Str ), // Extensions None, + &wasm_binary.clone(), // TODO upgrade to builder )) } @@ -199,7 +202,7 @@ pub fn live_chainspecs( None, ) .expect("Genesis Data must be buildable"); - genesis_data_to_gtest_genesis_conf(genesis_data, wasm_binary.to_vec()) + genesis_data_to_gtest_genesis_conf(genesis_data) }, // Bootnodes client_spec.boot_nodes, @@ -213,13 +216,13 @@ pub fn live_chainspecs( client_spec.properties, // Extensions None, + &wasm_binary.clone(), // TODO upgrade to builder )) } /// custom genesis fn genesis_data_to_gtest_genesis_conf( genesis_data: super::gen_genesis_data::GenesisData<GenesisParameters, SessionKeys>, - wasm_binary: Vec<u8>, ) -> gtest_runtime::GenesisConfig { let super::gen_genesis_data::GenesisData { accounts, @@ -241,10 +244,7 @@ fn genesis_data_to_gtest_genesis_conf( } = genesis_data; gtest_runtime::GenesisConfig { - system: SystemConfig { - // Add Wasm runtime to storage. - code: wasm_binary, - }, + system: Default::default(), account: AccountConfig { accounts, treasury_balance, @@ -260,6 +260,7 @@ fn genesis_data_to_gtest_genesis_conf( babe: BabeConfig { authorities: Vec::with_capacity(0), epoch_config: Some(BABE_GENESIS_EPOCH_CONFIG), + _config: Default::default(), }, grandpa: Default::default(), im_online: Default::default(), @@ -327,6 +328,7 @@ fn genesis_data_to_gtest_genesis_conf( initial_members: vec![], }, treasury: Default::default(), + transaction_payment: Default::default(), } } diff --git a/node/src/command.rs b/node/src/command.rs index e120906e76e6da2b105adf570a22825c896f9542..14825ec7978b0bf741dc42274c529d78c13eabf6 100644 --- a/node/src/command.rs +++ b/node/src/command.rs @@ -22,17 +22,21 @@ pub mod utils; use crate::chain_spec::gtest; use crate::cli::{Cli, Subcommand}; #[cfg(feature = "g1")] -use crate::service::G1Executor; +use crate::service::g1_executor::G1Executor; #[cfg(feature = "gdev")] -use crate::service::GDevExecutor; +#[cfg(feature = "runtime-benchmarks")] +use crate::service::gdev_executor::GDevExecutor; #[cfg(feature = "gtest")] -use crate::service::GTestExecutor; +#[cfg(feature = "runtime-benchmarks")] +use crate::service::gtest_executor::GTestExecutor; use crate::service::{IdentifyRuntimeType, RuntimeType}; use crate::{chain_spec, service}; use clap::CommandFactory; #[cfg(feature = "runtime-benchmarks")] use frame_benchmarking_cli::{BenchmarkCmd, SUBSTRATE_REFERENCE_HARDWARE}; -use sc_cli::{ChainSpec, RuntimeVersion, SubstrateCli}; +use sc_cli::SubstrateCli; +#[cfg(feature = "runtime-benchmarks")] +use sc_executor::{sp_wasm_interface::ExtendedHostFunctions, NativeExecutionDispatch}; // TODO: create our own reference hardware /* @@ -210,18 +214,6 @@ impl SubstrateCli for Cli { } }) } - - fn native_runtime_version(spec: &Box<dyn ChainSpec>) -> &'static RuntimeVersion { - match spec.runtime_type() { - #[cfg(feature = "g1")] - RuntimeType::G1 => &g1_runtime::VERSION, - #[cfg(feature = "gtest")] - RuntimeType::GTest => >est_runtime::VERSION, - #[cfg(feature = "gdev")] - RuntimeType::GDev => &gdev_runtime::VERSION, - _ => panic!("unknown runtime {:?}", spec.runtime_type()), - } - } } /// Parse and run command line arguments @@ -357,15 +349,24 @@ pub fn run() -> sc_cli::Result<()> { match chain_spec.runtime_type() { #[cfg(feature = "g1")] RuntimeType::G1 => runner.sync_run(|config| { - cmd.run::<g1_runtime::Block, G1Executor>(config) + cmd.run::<g1_runtime::Block, ExtendedHostFunctions< + sp_io::SubstrateHostFunctions, + <G1Executor as NativeExecutionDispatch>::ExtendHostFunctions, + >>(config) }), #[cfg(feature = "gtest")] RuntimeType::GTest => runner.sync_run(|config| { - cmd.run::<gtest_runtime::Block, GTestExecutor>(config) + cmd.run::<gtest_runtime::Block, ExtendedHostFunctions< + sp_io::SubstrateHostFunctions, + <GTestExecutor as NativeExecutionDispatch>::ExtendHostFunctions, + >>(config) }), #[cfg(feature = "gdev")] RuntimeType::GDev => runner.sync_run(|config| { - cmd.run::<gdev_runtime::Block, GDevExecutor>(config) + cmd.run::<gdev_runtime::Block, ExtendedHostFunctions< + sp_io::SubstrateHostFunctions, + <GDevExecutor as NativeExecutionDispatch>::ExtendHostFunctions, + >>(config) }), _ => Err(sc_cli::Error::Application("unknown runtime type".into())), } @@ -443,22 +444,18 @@ pub fn run() -> sc_cli::Result<()> { match config.chain_spec.runtime_type() { #[cfg(feature = "g1")] RuntimeType::G1 => { - service::new_full::<g1_runtime::RuntimeApi, G1Executor>(config, cli.sealing) + service::new_full::<g1_runtime::RuntimeApi>(config, cli.sealing) .map_err(sc_cli::Error::Service) } #[cfg(feature = "gtest")] - RuntimeType::GTest => service::new_full::< - gtest_runtime::RuntimeApi, - GTestExecutor, - >(config, cli.sealing) - .map_err(sc_cli::Error::Service), + RuntimeType::GTest => { + service::new_full::<gtest_runtime::RuntimeApi>(config, cli.sealing) + .map_err(sc_cli::Error::Service) + } #[cfg(feature = "gdev")] RuntimeType::GDev => { - service::new_full::<gdev_runtime::RuntimeApi, GDevExecutor>( - config, - cli.sealing, - ) - .map_err(sc_cli::Error::Service) + service::new_full::<gdev_runtime::RuntimeApi>(config, cli.sealing) + .map_err(sc_cli::Error::Service) } _ => Err(sc_cli::Error::Application("unknown runtime".into())), } diff --git a/node/src/service.rs b/node/src/service.rs index 4d63bff982e19f894856c515c56d6b75d718c315..35768f20485af832830b9ed79517fc80e3373243 100644 --- a/node/src/service.rs +++ b/node/src/service.rs @@ -23,80 +23,88 @@ use async_io::Timer; use common_runtime::Block; use futures::{Stream, StreamExt}; use sc_client_api::client::BlockBackend; +use sc_client_api::Backend; use sc_consensus_grandpa::SharedVoterState; use sc_consensus_manual_seal::{run_manual_seal, EngineCommand, ManualSealParams}; -pub use sc_executor::NativeElseWasmExecutor; -use sc_network_common::sync::warp::WarpSyncParams; +pub use sc_executor::WasmExecutor; +use sc_service::WarpSyncParams; use sc_service::{error::Error as ServiceError, Configuration, PartialComponents, TaskManager}; use sc_telemetry::{Telemetry, TelemetryWorker}; use sp_core::H256; use sp_runtime::traits::BlakeTwo256; -use std::{path::PathBuf, sync::Arc, time::Duration}; +use std::{sync::Arc, time::Duration}; -type FullClient<RuntimeApi, Executor> = - sc_service::TFullClient<Block, RuntimeApi, NativeElseWasmExecutor<Executor>>; +#[cfg(not(feature = "runtime-benchmarks"))] +type HostFunctions = sp_io::SubstrateHostFunctions; + +#[cfg(feature = "runtime-benchmarks")] +type HostFunctions = ( + sp_io::SubstrateHostFunctions, + frame_benchmarking::benchmarking::HostFunctions, +); + +type FullClient<RuntimeApi> = + sc_service::TFullClient<Block, RuntimeApi, WasmExecutor<HostFunctions>>; type FullBackend = sc_service::TFullBackend<Block>; type FullSelectChain = sc_consensus::LongestChain<FullBackend, Block>; #[cfg(feature = "gdev")] -pub struct GDevExecutor; -#[cfg(feature = "gdev")] -impl sc_executor::NativeExecutionDispatch for GDevExecutor { - /// Only enable the benchmarking host functions when we actually want to benchmark. - #[cfg(feature = "runtime-benchmarks")] - type ExtendHostFunctions = frame_benchmarking::benchmarking::HostFunctions; - /// Otherwise we only use the default Substrate host functions. - #[cfg(not(feature = "runtime-benchmarks"))] - type ExtendHostFunctions = (); - - fn dispatch(method: &str, data: &[u8]) -> Option<Vec<u8>> { - gdev_runtime::api::dispatch(method, data) - } +pub mod gdev_executor { + pub use gdev_runtime; - fn native_version() -> sc_executor::NativeVersion { - gdev_runtime::native_version() - } -} + pub struct GDevExecutor; + impl sc_executor::NativeExecutionDispatch for GDevExecutor { + type ExtendHostFunctions = frame_benchmarking::benchmarking::HostFunctions; -#[cfg(feature = "gtest")] -pub struct GTestExecutor; -#[cfg(feature = "gtest")] -impl sc_executor::NativeExecutionDispatch for GTestExecutor { - /// Only enable the benchmarking host functions when we actually want to benchmark. - #[cfg(feature = "runtime-benchmarks")] - type ExtendHostFunctions = frame_benchmarking::benchmarking::HostFunctions; - /// Otherwise we only use the default Substrate host functions. - #[cfg(not(feature = "runtime-benchmarks"))] - type ExtendHostFunctions = (); - - fn dispatch(method: &str, data: &[u8]) -> Option<Vec<u8>> { - gtest_runtime::api::dispatch(method, data) - } + fn dispatch(method: &str, data: &[u8]) -> Option<Vec<u8>> { + gdev_runtime::api::dispatch(method, data) + } - fn native_version() -> sc_executor::NativeVersion { - gtest_runtime::native_version() + fn native_version() -> sc_executor::NativeVersion { + gdev_runtime::native_version() + } } } #[cfg(feature = "g1")] -pub struct G1Executor; -#[cfg(feature = "g1")] -impl sc_executor::NativeExecutionDispatch for G1Executor { - /// Only enable the benchmarking host functions when we actually want to benchmark. - #[cfg(feature = "runtime-benchmarks")] - type ExtendHostFunctions = frame_benchmarking::benchmarking::HostFunctions; - /// Otherwise we only use the default Substrate host functions. - #[cfg(not(feature = "runtime-benchmarks"))] - type ExtendHostFunctions = (); - - fn dispatch(method: &str, data: &[u8]) -> Option<Vec<u8>> { - g1_runtime::api::dispatch(method, data) +pub mod g1_executor { + pub use g1_runtime; + + pub struct G1Executor; + impl sc_executor::NativeExecutionDispatch for G1Executor { + type ExtendHostFunctions = frame_benchmarking::benchmarking::HostFunctions; + + fn dispatch(method: &str, data: &[u8]) -> Option<Vec<u8>> { + g1_runtime::api::dispatch(method, data) + } + + fn native_version() -> sc_executor::NativeVersion { + g1_runtime::native_version() + } } +} + +#[cfg(feature = "gtest")] +pub mod gtest_executor { + pub use gtest_runtime; + + pub struct GTestExecutor; + impl sc_executor::NativeExecutionDispatch for GTestExecutor { + type ExtendHostFunctions = frame_benchmarking::benchmarking::HostFunctions; - fn native_version() -> sc_executor::NativeVersion { - g1_runtime::native_version() + fn dispatch(method: &str, data: &[u8]) -> Option<Vec<u8>> { + gtest_runtime::api::dispatch(method, data) + } + + fn native_version() -> sc_executor::NativeVersion { + gtest_runtime::native_version() + } } } +/// +/// The minimum period of blocks on which justifications will be +/// imported and generated. +const GRANDPA_JUSTIFICATION_PERIOD: u32 = 512; #[derive(Debug)] pub enum RuntimeType { @@ -135,7 +143,7 @@ pub fn new_chain_ops( ( Arc<Client>, Arc<FullBackend>, - sc_consensus::BasicQueue<Block, sp_trie::PrefixedMemoryDB<BlakeTwo256>>, + sc_consensus::BasicQueue<Block>, TaskManager, ), ServiceError, @@ -149,7 +157,7 @@ pub fn new_chain_ops( import_queue, task_manager, .. - } = new_partial::<g1_runtime::RuntimeApi, G1Executor>(config, manual_consensus)?; + } = new_partial::<g1_runtime::RuntimeApi>(config, manual_consensus)?; Ok(( Arc::new(Client::G1(client)), backend, @@ -165,7 +173,7 @@ pub fn new_chain_ops( import_queue, task_manager, .. - } = new_partial::<gtest_runtime::RuntimeApi, GTestExecutor>(config, manual_consensus)?; + } = new_partial::<gtest_runtime::RuntimeApi>(config, manual_consensus)?; Ok(( Arc::new(Client::GTest(client)), backend, @@ -181,7 +189,7 @@ pub fn new_chain_ops( import_queue, task_manager, .. - } = new_partial::<gdev_runtime::RuntimeApi, GDevExecutor>(config, manual_consensus)?; + } = new_partial::<gdev_runtime::RuntimeApi>(config, manual_consensus)?; Ok(( Arc::new(Client::GDev(client)), backend, @@ -193,50 +201,41 @@ pub fn new_chain_ops( } } -type FullGrandpaBlockImport<RuntimeApi, Executor> = sc_consensus_grandpa::GrandpaBlockImport< +type FullGrandpaBlockImport<RuntimeApi> = sc_consensus_grandpa::GrandpaBlockImport< FullBackend, Block, - FullClient<RuntimeApi, Executor>, + FullClient<RuntimeApi>, FullSelectChain, >; #[allow(clippy::type_complexity)] -pub fn new_partial<RuntimeApi, Executor>( +pub fn new_partial<RuntimeApi>( config: &Configuration, consensus_manual: bool, ) -> Result< sc_service::PartialComponents< - FullClient<RuntimeApi, Executor>, + FullClient<RuntimeApi>, FullBackend, FullSelectChain, - sc_consensus::DefaultImportQueue<Block, FullClient<RuntimeApi, Executor>>, - sc_transaction_pool::FullPool<Block, FullClient<RuntimeApi, Executor>>, + sc_consensus::DefaultImportQueue<Block>, + sc_transaction_pool::FullPool<Block, FullClient<RuntimeApi>>, ( sc_consensus_babe::BabeBlockImport< Block, - FullClient<RuntimeApi, Executor>, - FullGrandpaBlockImport<RuntimeApi, Executor>, + FullClient<RuntimeApi>, + FullGrandpaBlockImport<RuntimeApi>, >, sc_consensus_babe::BabeLink<Block>, Option<sc_consensus_babe::BabeWorkerHandle<Block>>, - sc_consensus_grandpa::LinkHalf< - Block, - FullClient<RuntimeApi, Executor>, - FullSelectChain, - >, + sc_consensus_grandpa::LinkHalf<Block, FullClient<RuntimeApi>, FullSelectChain>, Option<Telemetry>, ), >, ServiceError, > where - RuntimeApi: sp_api::ConstructRuntimeApi<Block, FullClient<RuntimeApi, Executor>> - + Send - + Sync - + 'static, - RuntimeApi::RuntimeApi: - RuntimeApiCollection<StateBackend = sc_client_api::StateBackendFor<FullBackend, Block>>, - Executor: sc_executor::NativeExecutionDispatch + 'static, + RuntimeApi: sp_api::ConstructRuntimeApi<Block, FullClient<RuntimeApi>> + Send + Sync + 'static, + RuntimeApi::RuntimeApi: RuntimeApiCollection, { let telemetry = config .telemetry_endpoints @@ -249,7 +248,7 @@ where }) .transpose()?; - let executor = sc_service::new_native_or_wasm_executor(config); + let executor = sc_service::new_wasm_executor(config); let (client, backend, keystore_container, task_manager) = sc_service::new_full_parts::<Block, RuntimeApi, _>( @@ -279,6 +278,7 @@ where let client_ = client.clone(); let (grandpa_block_import, grandpa_link) = sc_consensus_grandpa::block_import( client.clone(), + GRANDPA_JUSTIFICATION_PERIOD, &(client_ as Arc<_>), select_chain.clone(), telemetry.as_ref().map(|x| x.handle()), @@ -301,26 +301,33 @@ where (import_queue, None) } else { let slot_duration = babe_link.config().slot_duration(); - let (queue, handle) = sc_consensus_babe::import_queue( - babe_link.clone(), - babe_block_import.clone(), - Some(Box::new(justification_import)), - client.clone(), - select_chain.clone(), - move |_parent, ()| async move { - let timestamp = sp_timestamp::InherentDataProvider::from_system_time(); - - let slot = - sp_consensus_babe::inherents::InherentDataProvider::from_timestamp_and_slot_duration( - *timestamp, - slot_duration, - ); - Ok((slot, timestamp)) - }, - &task_manager.spawn_essential_handle(), - config.prometheus_registry(), - telemetry.as_ref().map(|x| x.handle()), - )?; + let (queue, handle) = + sc_consensus_babe::import_queue(sc_consensus_babe::ImportQueueParams { + link: babe_link.clone(), + block_import: babe_block_import.clone(), + justification_import: Some(Box::new(justification_import)), + client: client.clone(), + select_chain: select_chain.clone(), + create_inherent_data_providers: move |_, ()| async move { + let timestamp = sp_timestamp::InherentDataProvider::from_system_time(); + + let slot = + sp_consensus_babe::inherents::InherentDataProvider::from_timestamp_and_slot_duration( + *timestamp, + slot_duration, + ); + + Ok((slot, timestamp)) + }, + spawner: &task_manager.spawn_essential_handle(), + registry: config.prometheus_registry(), + telemetry: telemetry.as_ref().map(|x| x.handle()), + offchain_tx_pool_factory: + sc_transaction_pool_api::OffchainTransactionPoolFactory::new( + transaction_pool.clone(), + ), + })?; + (queue, Some(handle)) }; @@ -343,18 +350,13 @@ where } /// Builds a new service for a full client. -pub fn new_full<RuntimeApi, Executor>( - mut config: Configuration, +pub fn new_full<RuntimeApi>( + config: Configuration, sealing: crate::cli::Sealing, ) -> Result<TaskManager, ServiceError> where - RuntimeApi: sp_api::ConstructRuntimeApi<Block, FullClient<RuntimeApi, Executor>> - + Send - + Sync - + 'static, - RuntimeApi::RuntimeApi: - RuntimeApiCollection<StateBackend = sc_client_api::StateBackendFor<FullBackend, Block>>, - Executor: sc_executor::NativeExecutionDispatch + 'static, + RuntimeApi: sp_api::ConstructRuntimeApi<Block, FullClient<RuntimeApi>> + Send + Sync + 'static, + RuntimeApi::RuntimeApi: RuntimeApiCollection, { let sc_service::PartialComponents { client, @@ -365,7 +367,7 @@ where select_chain, transaction_pool, other: (block_import, babe_link, babe_worker_handle, grandpa_link, mut telemetry), - } = new_partial::<RuntimeApi, Executor>(&config, sealing.is_manual_consensus())?; + } = new_partial::<RuntimeApi>(&config, sealing.is_manual_consensus())?; let grandpa_protocol_name = sc_consensus_grandpa::protocol_standard_name( &client @@ -375,12 +377,12 @@ where .expect("Genesis block exists; qed"), &config.chain_spec, ); - config - .network - .extra_sets - .push(sc_consensus_grandpa::grandpa_peers_set_config( - grandpa_protocol_name.clone(), - )); + + let mut net_config = sc_network::config::FullNetworkConfiguration::new(&config.network); + let (grandpa_protocol_config, grandpa_notification_service) = + sc_consensus_grandpa::grandpa_peers_set_config(grandpa_protocol_name.clone()); + net_config.add_notification_protocol(grandpa_protocol_config); + let warp_sync = Arc::new(sc_consensus_grandpa::warp_proof::NetworkProvider::new( backend.clone(), grandpa_link.shared_authority_set().clone(), @@ -390,23 +392,16 @@ where 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_params: Some(WarpSyncParams::WithProvider(warp_sync)), + block_relay: None, })?; - 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; @@ -414,21 +409,37 @@ where let enable_grandpa = !config.disable_grandpa; let prometheus_registry = config.prometheus_registry().cloned(); + if config.offchain_worker.enabled { + use futures::FutureExt; + + task_manager.spawn_handle().spawn( + "offchain-workers-runner", + "offchain-work", + sc_offchain::OffchainWorkers::new(sc_offchain::OffchainWorkerOptions { + runtime_api_provider: client.clone(), + keystore: Some(keystore_container.keystore()), + offchain_db: backend.offchain_storage(), + transaction_pool: Some( + sc_transaction_pool_api::OffchainTransactionPoolFactory::new( + transaction_pool.clone(), + ), + ), + network_provider: network.clone(), + is_validator: role.is_authority(), + enable_http_requests: false, + custom_extensions: move |_| vec![], + }) + .run(client.clone(), task_manager.spawn_handle()) + .boxed(), + ); + } + let mut command_sink_opt = None; if role.is_authority() { - let distance_dir = config.base_path.as_ref().map_or_else( - || { - PathBuf::from(format!( - "/tmp/duniter/chains/{}/distance", - config.chain_spec.id() - )) - }, - |base_path| { - base_path - .config_dir(config.chain_spec.id()) - .join("distance") - }, - ); + let distance_dir = config + .base_path + .config_dir(config.chain_spec.id()) + .join("distance"); let proposer_factory = sc_basic_authorship::ProposerFactory::new( task_manager.spawn_handle(), @@ -522,7 +533,7 @@ where let distance = dc_distance::create_distance_inherent_data_provider::< Block, - FullClient<RuntimeApi, Executor>, + FullClient<RuntimeApi>, FullBackend, >( &*client, parent, distance_dir, &babe_owner_keys.clone() @@ -569,7 +580,7 @@ where let distance = dc_distance::create_distance_inherent_data_provider::< Block, - FullClient<RuntimeApi, Executor>, + FullClient<RuntimeApi>, FullBackend, >( &*client, parent, distance_dir, &babe_owner_keys.clone() @@ -631,7 +642,7 @@ where client, keystore: keystore_container.keystore(), task_manager: &mut task_manager, - transaction_pool, + transaction_pool: transaction_pool.clone(), rpc_builder: rpc_extensions_builder, system_rpc_tx, tx_handler_controller, @@ -647,9 +658,8 @@ where }; let grandpa_config = sc_consensus_grandpa::Config { - // FIXME #1578 make this available through chainspec gossip_duration: Duration::from_millis(333), - justification_period: 512, + justification_generation_period: GRANDPA_JUSTIFICATION_PERIOD, name: Some(name), observer_enabled: false, keystore, @@ -674,6 +684,10 @@ where prometheus_registry, shared_voter_state: SharedVoterState::empty(), telemetry: telemetry.as_ref().map(|x| x.handle()), + notification_service: grandpa_notification_service, + offchain_tx_pool_factory: sc_transaction_pool_api::OffchainTransactionPoolFactory::new( + transaction_pool.clone(), + ), }; // the GRANDPA voter task is considered infallible, i.e. @@ -716,10 +730,9 @@ impl client::ExecuteWithClient for RevertConsensus { fn execute_with_client<Client, Api, Backend>(self, client: Arc<Client>) -> Self::Output where - <Api as sp_api::ApiExt<Block>>::StateBackend: sp_api::StateBackend<BlakeTwo256>, - Backend: sc_client_api::Backend<Block> + 'static, - Backend::State: sp_api::StateBackend<BlakeTwo256>, - Api: RuntimeApiCollection<StateBackend = Backend::State>, + Backend: sc_client_api::Backend<Block>, + Backend::State: sc_client_api::StateBackend<BlakeTwo256>, + Api: RuntimeApiCollection, Client: client::AbstractClient<Block, Backend, Api = Api> + 'static, { // Revert consensus-related components. diff --git a/node/src/service/client.rs b/node/src/service/client.rs index e54efcfc35311c564021c1432d0d1a90b83d861c..1faebeb6c44fd4561bf23621b43e147745cad237 100644 --- a/node/src/service/client.rs +++ b/node/src/service/client.rs @@ -15,10 +15,11 @@ // along with Duniter-v2S. If not, see <https://www.gnu.org/licenses/>. use common_runtime::{AccountId, Balance, Block, BlockNumber, Hash, Header, Index}; +use sc_client_api::MerkleValue; use sc_client_api::{ AuxStore, Backend as BackendT, BlockchainEvents, KeysIter, PairsIter, UsageProvider, }; -use sp_api::{CallApiAt, NumberFor, ProvideRuntimeApi}; +use sp_api::{CallApiAt, ProvideRuntimeApi}; use sp_blockchain::{HeaderBackend, HeaderMetadata}; use sp_consensus::BlockStatus; use sp_core::{Encode, Pair}; @@ -40,15 +41,15 @@ pub trait AbstractClient<Block, Backend>: + Sync + ProvideRuntimeApi<Block> + HeaderBackend<Block> - + CallApiAt<Block, StateBackend = Backend::State> + + CallApiAt<Block> + AuxStore + UsageProvider<Block> + HeaderMetadata<Block, Error = sp_blockchain::Error> where Block: BlockT, Backend: BackendT<Block>, - Backend::State: sp_api::StateBackend<BlakeTwo256>, - Self::Api: RuntimeApiCollection<StateBackend = Backend::State>, + Backend::State: sc_client_api::StateBackend<BlakeTwo256>, + Self::Api: RuntimeApiCollection, { } @@ -56,7 +57,7 @@ impl<Block, Backend, Client> AbstractClient<Block, Backend> for Client where Block: BlockT, Backend: BackendT<Block>, - Backend::State: sp_api::StateBackend<BlakeTwo256>, + Backend::State: sc_client_api::StateBackend<BlakeTwo256>, Client: BlockchainEvents<Block> + ProvideRuntimeApi<Block> + HeaderBackend<Block> @@ -65,9 +66,9 @@ where + Sized + Send + Sync - + CallApiAt<Block, StateBackend = Backend::State> + + CallApiAt<Block> + HeaderMetadata<Block, Error = sp_blockchain::Error>, - Client::Api: RuntimeApiCollection<StateBackend = Backend::State>, + Client::Api: RuntimeApiCollection, { } @@ -102,10 +103,9 @@ pub trait ExecuteWithClient { /// Execute whatever should be executed with the given client instance. fn execute_with_client<Client, Api, Backend>(self, client: Arc<Client>) -> Self::Output where - <Api as sp_api::ApiExt<Block>>::StateBackend: sp_api::StateBackend<BlakeTwo256>, Backend: sc_client_api::Backend<Block> + 'static, - Backend::State: sp_api::StateBackend<BlakeTwo256>, - Api: crate::service::RuntimeApiCollection<StateBackend = Backend::State>, + Backend::State: sc_client_api::StateBackend<BlakeTwo256>, + Api: crate::service::RuntimeApiCollection, Client: AbstractClient<Block, Backend, Api = Api> + 'static; } @@ -125,12 +125,9 @@ pub trait RuntimeApiCollection: + sp_session::SessionKeys<Block> + sp_transaction_pool::runtime_api::TaggedTransactionQueue<Block> + substrate_frame_rpc_system::AccountNonceApi<Block, AccountId, Index> -where - <Self as sp_api::ApiExt<Block>>::StateBackend: sp_api::StateBackend<BlakeTwo256>, { } -impl<Api> RuntimeApiCollection for Api -where +impl<Api> RuntimeApiCollection for Api where Api: pallet_grandpa::fg_primitives::GrandpaApi<Block> + pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi<Block, Balance> + sp_api::ApiExt<Block> @@ -141,8 +138,7 @@ where + sp_offchain::OffchainWorkerApi<Block> + sp_session::SessionKeys<Block> + sp_transaction_pool::runtime_api::TaggedTransactionQueue<Block> - + substrate_frame_rpc_system::AccountNonceApi<Block, AccountId, Index>, - <Self as sp_api::ApiExt<Block>>::StateBackend: sp_api::StateBackend<BlakeTwo256>, + + substrate_frame_rpc_system::AccountNonceApi<Block, AccountId, Index> { } @@ -150,11 +146,11 @@ where #[derive(Clone)] pub enum Client { #[cfg(feature = "g1")] - G1(Arc<super::FullClient<g1_runtime::RuntimeApi, super::G1Executor>>), + G1(Arc<super::FullClient<g1_runtime::RuntimeApi>>), #[cfg(feature = "gtest")] - GTest(Arc<super::FullClient<gtest_runtime::RuntimeApi, super::GTestExecutor>>), + GTest(Arc<super::FullClient<gtest_runtime::RuntimeApi>>), #[cfg(feature = "gdev")] - GDev(Arc<super::FullClient<gdev_runtime::RuntimeApi, super::GDevExecutor>>), + GDev(Arc<super::FullClient<gdev_runtime::RuntimeApi>>), } macro_rules! with_client { @@ -201,24 +197,22 @@ impl ClientHandle for Client { } #[cfg(feature = "g1")] -impl From<Arc<super::FullClient<g1_runtime::RuntimeApi, super::G1Executor>>> for Client { - fn from(client: Arc<super::FullClient<g1_runtime::RuntimeApi, super::G1Executor>>) -> Self { +impl From<Arc<super::FullClient<g1_runtime::RuntimeApi>>> for Client { + fn from(client: Arc<super::FullClient<g1_runtime::RuntimeApi>>) -> Self { Self::G1(client) } } #[cfg(feature = "gtest")] -impl From<Arc<super::FullClient<gtest_runtime::RuntimeApi, super::GTestExecutor>>> for Client { - fn from( - client: Arc<super::FullClient<gtest_runtime::RuntimeApi, super::GTestExecutor>>, - ) -> Self { +impl From<Arc<super::FullClient<gtest_runtime::RuntimeApi>>> for Client { + fn from(client: Arc<super::FullClient<gtest_runtime::RuntimeApi>>) -> Self { Self::GTest(client) } } #[cfg(feature = "gdev")] -impl From<Arc<super::FullClient<gdev_runtime::RuntimeApi, super::GDevExecutor>>> for Client { - fn from(client: Arc<super::FullClient<gdev_runtime::RuntimeApi, super::GDevExecutor>>) -> Self { +impl From<Arc<super::FullClient<gdev_runtime::RuntimeApi>>> for Client { + fn from(client: Arc<super::FullClient<gdev_runtime::RuntimeApi>>) -> Self { Self::GDev(client) } } @@ -271,7 +265,7 @@ impl sc_client_api::BlockBackend<Block> for Client { fn block_hash( &self, - number: NumberFor<Block>, + number: sp_runtime::traits::NumberFor<Block>, ) -> sp_blockchain::Result<Option<<Block as BlockT>::Hash>> { match_client!(self, block_hash(number)) } @@ -320,11 +314,11 @@ use g1_runtime as runtime; #[cfg(feature = "gdev")] use gdev_runtime as runtime; #[cfg(feature = "gdev")] -type FullClient = super::FullClient<runtime::RuntimeApi, super::GDevExecutor>; +type FullClient = super::FullClient<runtime::RuntimeApi>; #[cfg(feature = "gtest")] use gtest_runtime as runtime; #[cfg(feature = "gtest")] -type FullClient = super::FullClient<runtime::RuntimeApi, super::GTestExecutor>; +type FullClient = super::FullClient<runtime::RuntimeApi>; #[cfg(any(feature = "gdev", feature = "gtest"))] impl BenchmarkCallSigner<runtime::RuntimeCall, sp_core::sr25519::Pair> for FullClient { @@ -382,9 +376,11 @@ impl frame_benchmarking_cli::ExtrinsicBuilder for Client { fn pallet(&self) -> &str { "system" } + fn extrinsic(&self) -> &str { "remark" } + fn build(&self, nonce: u32) -> std::result::Result<sp_runtime::OpaqueExtrinsic, &'static str> { with_client! { self, client, { @@ -404,6 +400,7 @@ impl sp_blockchain::HeaderBackend<Block> for Client { fn header(&self, hash: Hash) -> sp_blockchain::Result<Option<Header>> { match_client!(self, header(hash)) } + fn info(&self) -> sp_blockchain::Info<Block> { match_client!(self, info()) } @@ -492,6 +489,25 @@ impl sc_client_api::StorageProvider<Block, super::FullBackend> for Client { ) -> sp_blockchain::Result<Option<<Block as BlockT>::Hash>> { match_client!(self, child_storage_hash(hash, child_info, key)) } + + // Given a block's hash and a key, return the closest merkle value. + fn closest_merkle_value( + &self, + hash: <Block as BlockT>::Hash, + key: &StorageKey, + ) -> sp_blockchain::Result<Option<MerkleValue<<Block as BlockT>::Hash>>> { + match_client!(self, closest_merkle_value(hash, key)) + } + + // Given a block's hash and a key and a child storage key, return the closest merkle value. + fn child_closest_merkle_value( + &self, + hash: <Block as BlockT>::Hash, + child_info: &ChildInfo, + key: &StorageKey, + ) -> sp_blockchain::Result<Option<MerkleValue<<Block as BlockT>::Hash>>> { + match_client!(self, child_closest_merkle_value(hash, child_info, key)) + } } impl sc_client_api::UsageProvider<Block> for Client { diff --git a/pallets/authority-members/Cargo.toml b/pallets/authority-members/Cargo.toml index 8337faccb14bc36f4173d5c7c9b43740e8ece047..92333b0c15b171b6c5b7472ed7f334226784255e 100644 --- a/pallets/authority-members/Cargo.toml +++ b/pallets/authority-members/Cargo.toml @@ -18,94 +18,103 @@ std = [ 'codec/std', 'frame-support/std', 'frame-system/std', - 'frame-benchmarking/std', - 'log/std', + 'frame-benchmarking?/std', 'pallet-session/std', 'pallet-offences/std', - 'serde', + 'serde/std', + 'scale-info/std', 'sp-core/std', - 'sp-membership/std', 'sp-runtime/std', 'sp-staking/std', 'sp-std/std', + 'sp-io/std', + 'sp-state-machine/std', + 'log/std', +] +try-runtime = [ + 'frame-support/try-runtime', + 'frame-system/try-runtime', + 'sp-runtime/try-runtime', + 'pallet-session/try-runtime', + 'pallet-offences/try-runtime', ] -try-runtime = ['frame-support/try-runtime'] [dependencies] + +# crates.io +log = { version = "0.4.20", default-features = false } # local pallet-offences = { path = "../offences", default-features = false } -sp-membership = { path = "../../primitives/membership", default-features = false } +scale-info = { version = "2.10.0", default-features = false, features = ["derive"] } -# crates.io -log = { version = "0.4.14", default-features = false } -scale-info = { version = "2.1.1", default-features = false, features = ["derive"] } [dependencies.codec] default-features = false features = ['derive'] package = 'parity-scale-codec' -version = "3.1.5" +version = "3.6.9" # substrate [dependencies.frame-benchmarking] default-features = false -git = 'https://github.com/duniter/substrate' +git = 'https://github.com/duniter/duniter-polkadot-sdk' optional = true -branch = 'duniter-substrate-v0.9.42' +branch = 'duniter-substrate-v1.6.0' [dependencies.frame-support] default-features = false -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' [dependencies.frame-system] default-features = false -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' [dependencies.pallet-session] default-features = false features = ["historical"] -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' [dependencies.serde] -version = "1.0.101" optional = true +default-features = false +version = "1.0.195" features = ["derive"] [dependencies.sp-core] default-features = false -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' [dependencies.sp-runtime] default-features = false -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' [dependencies.sp-staking] default-features = false -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' - -[dependencies.sp-std] -default-features = false -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' - -### DOC ### +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' [package.metadata.docs.rs] targets = ['x86_64-unknown-linux-gnu'] -### DEV ### +[dependencies.sp-std] +default-features = false +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' [dev-dependencies.maplit] +default-features = false version = '1.0.2' -[dev-dependencies.serde] -version = '1.0.119' - [dev-dependencies.sp-io] -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' +default-features = false +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' + +[dev-dependencies.sp-state-machine] +default-features = false +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' diff --git a/pallets/authority-members/src/lib.rs b/pallets/authority-members/src/lib.rs index 3494331ad3f026c8fbbda12283aed225cceb9816..963a180b59a92982758d71828484d7b7eabdb657 100644 --- a/pallets/authority-members/src/lib.rs +++ b/pallets/authority-members/src/lib.rs @@ -31,7 +31,7 @@ mod tests; #[cfg(feature = "runtime-benchmarks")] mod benchmarking; -pub use impls::*; +//pub use impls::*; pub use pallet::*; pub use sp_staking::SessionIndex; pub use traits::*; @@ -88,7 +88,6 @@ pub mod pallet { pub initial_authorities: BTreeMap<T::MemberId, (T::AccountId, bool)>, } - #[cfg(feature = "std")] impl<T: Config> Default for GenesisConfig<T> { fn default() -> Self { Self { @@ -98,7 +97,7 @@ pub mod pallet { } #[pallet::genesis_build] - impl<T: Config> GenesisBuild<T> for GenesisConfig<T> { + impl<T: Config> BuildGenesisConfig for GenesisConfig<T> { fn build(&self) { for (member_id, (account_id, _is_online)) in &self.initial_authorities { Members::<T>::insert(member_id, MemberData::new_genesis(account_id.to_owned())); @@ -233,6 +232,7 @@ pub mod pallet { Ok(().into()) } + /// ask to join the set of validators two sessions after #[pallet::call_index(1)] #[pallet::weight(<T as pallet::Config>::WeightInfo::go_online())] @@ -291,6 +291,7 @@ pub mod pallet { Ok(().into()) } + /// remove an identity from the set of authorities #[pallet::call_index(3)] #[pallet::weight(<T as pallet::Config>::WeightInfo::remove_member())] @@ -305,6 +306,7 @@ pub mod pallet { Ok(().into()) } + #[pallet::call_index(4)] #[pallet::weight(<T as pallet::Config>::WeightInfo::remove_member_from_blacklist())] /// remove an identity from the blacklist @@ -404,6 +406,7 @@ pub mod pallet { // Emit event Self::deposit_event(Event::MemberRemoved { member: member_id }); } + /// perform incoming authorities insertion fn insert_in(member_id: T::MemberId) -> bool { let not_already_inserted = IncomingAuthorities::<T>::mutate(|members_ids| { @@ -419,6 +422,7 @@ pub mod pallet { } not_already_inserted } + /// perform outgoing authority insertion pub fn insert_out(member_id: T::MemberId) -> bool { let not_already_inserted = OutgoingAuthorities::<T>::mutate(|members_ids| { @@ -434,28 +438,33 @@ pub mod pallet { } not_already_inserted } + /// check if member is incoming fn is_incoming(member_id: T::MemberId) -> bool { IncomingAuthorities::<T>::get() .binary_search(&member_id) .is_ok() } + /// check if member is online fn is_online(member_id: T::MemberId) -> bool { OnlineAuthorities::<T>::get() .binary_search(&member_id) .is_ok() } + /// check if member is outgoing fn is_outgoing(member_id: T::MemberId) -> bool { OutgoingAuthorities::<T>::get() .binary_search(&member_id) .is_ok() } + /// check if member is blacklisted fn is_blacklisted(member_id: T::MemberId) -> bool { Blacklist::<T>::get().contains(&member_id) } + /// perform removal from incoming authorities fn remove_in(member_id: T::MemberId) { IncomingAuthorities::<T>::mutate(|members_ids| { @@ -464,6 +473,7 @@ pub mod pallet { } }) } + /// perform removal from online authorities fn remove_online(member_id: T::MemberId) { OnlineAuthorities::<T>::mutate(|members_ids| { @@ -472,6 +482,7 @@ pub mod pallet { } }); } + /// perform removal from outgoing authorities fn remove_out(member_id: T::MemberId) { OutgoingAuthorities::<T>::mutate(|members_ids| { @@ -480,6 +491,7 @@ pub mod pallet { } }); } + /// check that accountid is member fn verify_ownership_and_membership( who: &T::AccountId, @@ -558,6 +570,7 @@ impl<T: Config> pallet_session::SessionManager<T::ValidatorId> for Pallet<T> { .collect(), ) } + /// Same as `new_session`, but it this should only be called at genesis. fn new_session_genesis(_new_index: SessionIndex) -> Option<Vec<T::ValidatorId>> { Some( @@ -573,11 +586,13 @@ impl<T: Config> pallet_session::SessionManager<T::ValidatorId> for Pallet<T> { .collect(), ) } + /// End the session. /// /// Because the session pallet can queue validator set the ending session can be lower than the /// last new session index. fn end_session(_end_index: SessionIndex) {} + /// Start an already planned session. /// /// The session start to be used for validation. @@ -609,6 +624,7 @@ impl<T: Config> pallet_session::historical::SessionManager<T::ValidatorId, T::Fu .collect() }) } + fn new_session_genesis( new_index: SessionIndex, ) -> Option<sp_std::vec::Vec<(T::ValidatorId, T::FullIdentification)>> { @@ -621,9 +637,11 @@ impl<T: Config> pallet_session::historical::SessionManager<T::ValidatorId, T::Fu }, ) } + fn start_session(start_index: SessionIndex) { <Self as pallet_session::SessionManager<_>>::start_session(start_index) } + fn end_session(end_index: SessionIndex) { <Self as pallet_session::SessionManager<_>>::end_session(end_index) } diff --git a/pallets/authority-members/src/mock.rs b/pallets/authority-members/src/mock.rs index 4c818534a42d84227b1542ed68dc29f4c449804a..f4d412df500eacbd3f611a7d28f574f92e3c77a3 100644 --- a/pallets/authority-members/src/mock.rs +++ b/pallets/authority-members/src/mock.rs @@ -16,28 +16,24 @@ use super::*; use crate::{self as pallet_authority_members}; -use frame_support::{ - pallet_prelude::*, - parameter_types, - traits::{Everything, GenesisBuild}, - BasicExternalities, -}; +use frame_support::{pallet_prelude::*, parameter_types, traits::Everything}; use frame_system as system; use pallet_offences::traits::OnOffenceHandler; use pallet_offences::SlashStrategy; use pallet_session::ShouldEndSession; use sp_core::{crypto::key_types::DUMMY, H256}; +use sp_runtime::BuildStorage; use sp_runtime::{ impl_opaque_keys, - testing::{Header, UintAuthorityId}, + testing::UintAuthorityId, traits::{BlakeTwo256, ConvertInto, IdentityLookup, IsMember, OpaqueKeys}, KeyTypeId, }; use sp_staking::offence::OffenceDetails; +use sp_state_machine::BasicExternalities; type AccountId = u64; type Block = frame_system::mocking::MockBlock<Test>; -type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic<Test>; impl_opaque_keys! { pub struct MockSessionKeys { @@ -53,14 +49,11 @@ impl From<UintAuthorityId> for MockSessionKeys { // Configure a mock runtime to test the pallet. frame_support::construct_runtime!( - pub enum Test where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, + pub enum Test { - System: frame_system::{Pallet, Call, Config, Storage, Event<T>}, - Session: pallet_session::{Pallet, Call, Storage, Config<T>, Event}, - AuthorityMembers: pallet_authority_members::{Pallet, Call, Storage, Config<T>, Event<T>}, + System: frame_system, + Session: pallet_session, + AuthorityMembers: pallet_authority_members, } ); @@ -70,30 +63,30 @@ parameter_types! { } impl system::Config for Test { + type AccountData = (); + type AccountId = AccountId; type BaseCallFilter = Everything; - type BlockWeights = (); + type Block = Block; + type BlockHashCount = BlockHashCount; type BlockLength = (); + type BlockWeights = (); type DbWeight = (); - type RuntimeOrigin = RuntimeOrigin; - type RuntimeCall = RuntimeCall; - type Index = u64; - type BlockNumber = u64; type Hash = H256; type Hashing = BlakeTwo256; - type AccountId = AccountId; type Lookup = IdentityLookup<Self::AccountId>; - type Header = Header; - type RuntimeEvent = RuntimeEvent; - type BlockHashCount = BlockHashCount; - type Version = (); - type PalletInfo = PalletInfo; - type AccountData = (); - type OnNewAccount = (); + type MaxConsumers = frame_support::traits::ConstU32<16>; + type Nonce = u64; type OnKilledAccount = (); - type SystemWeightInfo = (); - type SS58Prefix = SS58Prefix; + type OnNewAccount = (); type OnSetCode = (); - type MaxConsumers = frame_support::traits::ConstU32<16>; + type PalletInfo = PalletInfo; + type RuntimeCall = RuntimeCall; + type RuntimeEvent = RuntimeEvent; + type RuntimeOrigin = RuntimeOrigin; + type RuntimeTask = (); + type SS58Prefix = SS58Prefix; + type SystemWeightInfo = (); + type Version = (); } pub struct TestSessionHandler; @@ -121,14 +114,14 @@ impl ShouldEndSession<u64> for TestShouldEndSession { } impl pallet_session::Config for Test { + type Keys = MockSessionKeys; + type NextSessionRotation = (); type RuntimeEvent = RuntimeEvent; + type SessionHandler = TestSessionHandler; + type SessionManager = AuthorityMembers; + type ShouldEndSession = TestShouldEndSession; type ValidatorId = u64; type ValidatorIdOf = ConvertInto; - type ShouldEndSession = TestShouldEndSession; - type NextSessionRotation = (); - type SessionManager = AuthorityMembers; - type SessionHandler = TestSessionHandler; - type Keys = MockSessionKeys; type WeightInfo = (); } @@ -155,12 +148,12 @@ impl pallet_authority_members::Config for Test { type MaxAuthorities = ConstU32<4>; type MemberId = u64; type MemberIdOf = ConvertInto; + type OnIncomingMember = (); type OnNewSession = (); + type OnOutgoingMember = (); type RemoveMemberOrigin = system::EnsureRoot<u64>; type RuntimeEvent = RuntimeEvent; type WeightInfo = (); - type OnIncomingMember = (); - type OnOutgoingMember = (); } // Build genesis storage according to the mock runtime. @@ -172,8 +165,8 @@ pub fn new_test_ext(initial_authorities_len: u64) -> sp_io::TestExternalities { .map(|i| (i * 3, i * 3, UintAuthorityId(i * 3).into())) .collect(); - let mut t = frame_system::GenesisConfig::default() - .build_storage::<Test>() + let mut t = frame_system::GenesisConfig::<Test>::default() + .build_storage() .unwrap(); BasicExternalities::execute_with_storage(&mut t, || { for (ref k, ..) in &keys { diff --git a/pallets/authority-members/src/weights.rs b/pallets/authority-members/src/weights.rs index f4160f078ea244501f2cba30c0a7e04695eee4ca..5a32bf50f759048bbfb13a032872e35ec863f0a2 100644 --- a/pallets/authority-members/src/weights.rs +++ b/pallets/authority-members/src/weights.rs @@ -42,6 +42,7 @@ impl WeightInfo for () { .saturating_add(RocksDbWeight::get().reads(7 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } + // Storage: Identity IdentityIndexOf (r:1 w:0) // Storage: SmithMembership Membership (r:1 w:0) // Storage: AuthorityMembers Members (r:1 w:0) @@ -56,6 +57,7 @@ impl WeightInfo for () { .saturating_add(RocksDbWeight::get().reads(8 as u64)) .saturating_add(RocksDbWeight::get().writes(2 as u64)) } + // Storage: Identity IdentityIndexOf (r:1 w:0) // Storage: SmithMembership Membership (r:1 w:0) // Storage: System Account (r:1 w:0) @@ -70,6 +72,7 @@ impl WeightInfo for () { .saturating_add(RocksDbWeight::get().reads(11 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } + // Storage: AuthorityMembers Members (r:1 w:1) // Storage: AuthorityMembers OnlineAuthorities (r:1 w:1) // Storage: AuthorityMembers OutgoingAuthorities (r:1 w:1) @@ -86,6 +89,7 @@ impl WeightInfo for () { .saturating_add(RocksDbWeight::get().reads(9 as u64)) .saturating_add(RocksDbWeight::get().writes(13 as u64)) } + // Storage: AuthorityMembers BlackList (r:1 w:1) fn remove_member_from_blacklist() -> Weight { // Minimum execution time: 60_023 nanoseconds. diff --git a/pallets/certification/Cargo.toml b/pallets/certification/Cargo.toml index d17ef7ee1489e4834dc49b70d5d78a032a9d199e..8ed57c30a521829c4cbc2f411f061d65b2f6ea54 100644 --- a/pallets/certification/Cargo.toml +++ b/pallets/certification/Cargo.toml @@ -11,81 +11,82 @@ version = '3.0.0' [features] default = ['std'] -runtime-benchmarks = ["frame-benchmarking/runtime-benchmarks"] +runtime-benchmarks = [ + 'frame-benchmarking/runtime-benchmarks', + 'frame-support/runtime-benchmarks', + 'frame-system/runtime-benchmarks', + 'sp-runtime/runtime-benchmarks', +] std = [ 'codec/std', 'frame-support/std', 'frame-system/std', - 'frame-benchmarking/std', - 'serde', + 'frame-benchmarking?/std', + 'scale-info/std', 'sp-core/std', 'sp-runtime/std', 'sp-std/std', + 'sp-io/std', +] +try-runtime = [ + 'frame-support/try-runtime', + 'frame-system/try-runtime', + 'sp-runtime/try-runtime', ] -try-runtime = ['frame-support/try-runtime'] [dependencies] duniter-primitives = { path = "../../primitives/duniter", default-features = false } # substrate -scale-info = { version = "2.1.1", default-features = false, features = ["derive"] } +scale-info = { version = "2.10.0", default-features = false, features = ["derive"] } [dependencies.codec] default-features = false features = ['derive'] package = 'parity-scale-codec' -version = "3.1.5" +version = "3.6.9" [dependencies.frame-benchmarking] default-features = false -git = 'https://github.com/duniter/substrate' +git = 'https://github.com/duniter/duniter-polkadot-sdk' optional = true -branch = 'duniter-substrate-v0.9.42' - +branch = 'duniter-substrate-v1.6.0' [dependencies.frame-support] default-features = false -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' [dependencies.frame-system] default-features = false -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' -[dependencies.serde] -version = "1.0.101" -optional = true -features = ["derive"] +[dependencies.maplit] +default-features = false +version = '1.0.2' [dependencies.sp-core] default-features = false -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' [dependencies.sp-runtime] default-features = false -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' - -[dependencies.sp-std] -default-features = false -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' - -[dependencies.maplit] -version = '1.0.2' - +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' ### DOC ### [package.metadata.docs.rs] +default-features = false targets = ['x86_64-unknown-linux-gnu'] -[dev-dependencies.serde] -version = '1.0.119' -### DEV ### +[dependencies.sp-std] +default-features = false +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' [dev-dependencies.sp-io] default-features = false -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' diff --git a/pallets/certification/src/benchmarking.rs b/pallets/certification/src/benchmarking.rs index 803903bc11f8bbe46ebd118904b1461774565bc3..6b4290818f119579dbd8eaf8c3dfb7b87f3dcf20 100644 --- a/pallets/certification/src/benchmarking.rs +++ b/pallets/certification/src/benchmarking.rs @@ -19,7 +19,6 @@ use super::*; use frame_benchmarking::benchmarks; -use frame_benchmarking::Zero; use frame_system::RawOrigin; #[cfg(test)] @@ -100,12 +99,12 @@ benchmarks! { } on_initialize { - assert!(CertsRemovableOn::<T>::try_get(T::BlockNumber::zero()).is_err()); - }: {Pallet::<T>::on_initialize(T::BlockNumber::zero());} + assert!(CertsRemovableOn::<T>::try_get(BlockNumberFor::<T>::zero()).is_err()); + }: {Pallet::<T>::on_initialize(BlockNumberFor::<T>::zero());} do_remove_cert_noop { - }: {Pallet::<T>::do_remove_cert(100.into(), 101.into(), Some(T::BlockNumber::zero()));} - + }: {Pallet::<T>::do_remove_cert(100.into(), 101.into(), Some(BlockNumberFor::<T>::zero()));} + do_remove_cert { let issuer: T::IdtyIndex = 1.into(); let receiver: T::IdtyIndex = 0.into(); diff --git a/pallets/certification/src/lib.rs b/pallets/certification/src/lib.rs index 6da865932eb42e641e790ed8e52515908024720a..1db2c14061c1bb65460fa1f9c51963170e74a25b 100644 --- a/pallets/certification/src/lib.rs +++ b/pallets/certification/src/lib.rs @@ -29,6 +29,7 @@ mod mock; #[cfg(test)] mod tests; +use frame_system::pallet_prelude::BlockNumberFor; pub use pallet::*; pub use types::*; pub use weights::WeightInfo; @@ -60,7 +61,7 @@ pub mod pallet { pub trait Config: frame_system::Config { #[pallet::constant] /// Minimum duration between two certifications issued by the same issuer. - type CertPeriod: Get<Self::BlockNumber>; + type CertPeriod: Get<BlockNumberFor<Self>>; /// A short identity index. type IdtyIndex: Parameter + Member @@ -91,7 +92,7 @@ pub mod pallet { type WeightInfo: WeightInfo; #[pallet::constant] /// Duration of validity of a certification. - type ValidityPeriod: Get<Self::BlockNumber>; + type ValidityPeriod: Get<BlockNumberFor<Self>>; } // GENESIS STUFF // @@ -101,10 +102,9 @@ pub mod pallet { pub struct GenesisConfig<T: Config> { pub apply_cert_period_at_genesis: bool, pub certs_by_receiver: - BTreeMap<T::IdtyIndex, BTreeMap<T::IdtyIndex, Option<T::BlockNumber>>>, + BTreeMap<T::IdtyIndex, BTreeMap<T::IdtyIndex, Option<BlockNumberFor<T>>>>, } - #[cfg(feature = "std")] impl<T: Config> Default for GenesisConfig<T> { fn default() -> Self { Self { @@ -115,12 +115,12 @@ pub mod pallet { } #[pallet::genesis_build] - impl<T: Config> GenesisBuild<T> for GenesisConfig<T> { + impl<T: Config> BuildGenesisConfig for GenesisConfig<T> { fn build(&self) { let mut cert_meta_by_issuer = - BTreeMap::<T::IdtyIndex, IdtyCertMeta<T::BlockNumber>>::new(); + BTreeMap::<T::IdtyIndex, IdtyCertMeta<BlockNumberFor<T>>>::new(); let mut certs_removable_on = - BTreeMap::<T::BlockNumber, Vec<(T::IdtyIndex, T::IdtyIndex)>>::new(); + BTreeMap::<BlockNumberFor<T>, Vec<(T::IdtyIndex, T::IdtyIndex)>>::new(); for (receiver, issuers) in &self.certs_by_receiver { // Forbid self-cert assert!( @@ -204,19 +204,29 @@ pub mod pallet { #[pallet::storage] #[pallet::getter(fn idty_cert_meta)] pub type StorageIdtyCertMeta<T: Config> = - StorageMap<_, Twox64Concat, T::IdtyIndex, IdtyCertMeta<T::BlockNumber>, ValueQuery>; + StorageMap<_, Twox64Concat, T::IdtyIndex, IdtyCertMeta<BlockNumberFor<T>>, ValueQuery>; /// Certifications by receiver. #[pallet::storage] #[pallet::getter(fn certs_by_receiver)] - pub type CertsByReceiver<T: Config> = - StorageMap<_, Twox64Concat, T::IdtyIndex, Vec<(T::IdtyIndex, T::BlockNumber)>, ValueQuery>; + pub type CertsByReceiver<T: Config> = StorageMap< + _, + Twox64Concat, + T::IdtyIndex, + Vec<(T::IdtyIndex, BlockNumberFor<T>)>, + ValueQuery, + >; /// Certifications removable on. #[pallet::storage] #[pallet::getter(fn certs_removable_on)] - pub type CertsRemovableOn<T: Config> = - StorageMap<_, Twox64Concat, T::BlockNumber, Vec<(T::IdtyIndex, T::IdtyIndex)>, OptionQuery>; + pub type CertsRemovableOn<T: Config> = StorageMap< + _, + Twox64Concat, + BlockNumberFor<T>, + Vec<(T::IdtyIndex, T::IdtyIndex)>, + OptionQuery, + >; // EVENTS // @@ -263,7 +273,7 @@ pub mod pallet { #[pallet::hooks] impl<T: Config> Hooks<BlockNumberFor<T>> for Pallet<T> { - fn on_initialize(n: T::BlockNumber) -> Weight { + fn on_initialize(n: BlockNumberFor<T>) -> Weight { Self::prune_certifications(n).saturating_add(T::WeightInfo::on_initialize()) } } @@ -359,7 +369,7 @@ pub mod pallet { /// perform cert addition if not existing, else CertAlreadyExists // must be transactional fn try_add_cert( - block_number: T::BlockNumber, + block_number: BlockNumberFor<T>, issuer: T::IdtyIndex, receiver: T::IdtyIndex, ) -> DispatchResultWithPostInfo { @@ -442,7 +452,7 @@ pub mod pallet { /// remove the certifications due to expire on the given block // (run at on_initialize step) - fn prune_certifications(block_number: T::BlockNumber) -> Weight { + fn prune_certifications(block_number: BlockNumberFor<T>) -> Weight { // See on initialize for the overhead weight accounting let mut total_weight = Weight::zero(); @@ -461,7 +471,7 @@ pub mod pallet { pub fn do_remove_cert( issuer: T::IdtyIndex, receiver: T::IdtyIndex, - block_number_opt: Option<T::BlockNumber>, + block_number_opt: Option<BlockNumberFor<T>>, ) -> Weight { let mut total_weight = Weight::zero(); let mut removed = false; @@ -526,7 +536,7 @@ pub mod pallet { fn check_add_cert_internal( issuer: T::IdtyIndex, receiver: T::IdtyIndex, - block_number: T::BlockNumber, + block_number: BlockNumberFor<T>, ) -> DispatchResult { // 1. Forbid self cert ensure!(issuer != receiver, Error::<T>::CannotCertifySelf); @@ -561,7 +571,7 @@ pub mod pallet { fn check_add_cert( issuer: T::IdtyIndex, receiver: T::IdtyIndex, - block_number: T::BlockNumber, + block_number: BlockNumberFor<T>, ) -> DispatchResult { // internal checks Self::check_add_cert_internal(issuer, receiver, block_number)?; @@ -589,8 +599,8 @@ pub mod pallet { } // implement setting next_issuable_on for certification period -impl<T: Config> SetNextIssuableOn<T::BlockNumber, T::IdtyIndex> for Pallet<T> { - fn set_next_issuable_on(idty_index: T::IdtyIndex, next_issuable_on: T::BlockNumber) { +impl<T: Config> SetNextIssuableOn<BlockNumberFor<T>, T::IdtyIndex> for Pallet<T> { + fn set_next_issuable_on(idty_index: T::IdtyIndex, next_issuable_on: BlockNumberFor<T>) { <StorageIdtyCertMeta<T>>::mutate_exists(idty_index, |cert_meta_opt| { let cert_meta = cert_meta_opt.get_or_insert(IdtyCertMeta::default()); cert_meta.next_issuable_on = next_issuable_on; diff --git a/pallets/certification/src/mock.rs b/pallets/certification/src/mock.rs index 514b25e9f32cf06ced8e42e774bcd2acbb560207..dc5efc8c4330e9c4aed375abc59a2a1eeab49370 100644 --- a/pallets/certification/src/mock.rs +++ b/pallets/certification/src/mock.rs @@ -22,26 +22,19 @@ use frame_support::{ use frame_system as system; use sp_core::H256; use sp_runtime::{ - testing::Header, traits::{BlakeTwo256, IdentityLookup}, BuildStorage, }; type AccountId = u64; -type BlockNumber = u64; type Block = frame_system::mocking::MockBlock<Test>; pub type IdtyIndex = u64; -type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic<Test>; // Configure a mock runtime to test the pallet. frame_support::construct_runtime!( - pub enum Test where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, - { - System: frame_system::{Pallet, Call, Config, Storage, Event<T>}, - DefaultCertification: pallet_certification::{Pallet, Call, Event<T>, Storage, Config<T>}, + pub enum Test { + System: frame_system, + DefaultCertification: pallet_certification, } ); @@ -51,30 +44,30 @@ parameter_types! { } impl system::Config for Test { + type AccountData = (); + type AccountId = AccountId; type BaseCallFilter = Everything; - type BlockWeights = (); + type Block = Block; + type BlockHashCount = BlockHashCount; type BlockLength = (); + type BlockWeights = (); type DbWeight = (); - type RuntimeOrigin = RuntimeOrigin; - type RuntimeCall = RuntimeCall; - type Index = u64; - type BlockNumber = BlockNumber; type Hash = H256; type Hashing = BlakeTwo256; - type AccountId = AccountId; type Lookup = IdentityLookup<Self::AccountId>; - type Header = Header; - type RuntimeEvent = RuntimeEvent; - type BlockHashCount = BlockHashCount; - type Version = (); - type PalletInfo = PalletInfo; - type AccountData = (); - type OnNewAccount = (); + type MaxConsumers = frame_support::traits::ConstU32<16>; + type Nonce = u64; type OnKilledAccount = (); - type SystemWeightInfo = (); - type SS58Prefix = SS58Prefix; + type OnNewAccount = (); type OnSetCode = (); - type MaxConsumers = frame_support::traits::ConstU32<16>; + type PalletInfo = PalletInfo; + type RuntimeCall = RuntimeCall; + type RuntimeEvent = RuntimeEvent; + type RuntimeOrigin = RuntimeOrigin; + type RuntimeTask = (); + type SS58Prefix = SS58Prefix; + type SystemWeightInfo = (); + type Version = (); } parameter_types! { @@ -93,16 +86,17 @@ impl pallet_certification::Config for Test { type MinReceivedCertToBeAbleToIssueCert = MinReceivedCertToBeAbleToIssueCert; type OnNewcert = (); type OnRemovedCert = (); + type OwnerKeyOf = sp_runtime::traits::ConvertInto; type RuntimeEvent = RuntimeEvent; - type WeightInfo = (); type ValidityPeriod = ValidityPeriod; + type WeightInfo = (); } // Build genesis storage according to the mock runtime. pub fn new_test_ext( gen_conf: pallet_certification::GenesisConfig<Test>, ) -> sp_io::TestExternalities { - GenesisConfig { + RuntimeGenesisConfig { system: SystemConfig::default(), default_certification: gen_conf, } diff --git a/pallets/certification/src/weights.rs b/pallets/certification/src/weights.rs index 08ba7b444865d71d8de07fcae9945a4b165acead..fd935dfd7456519a04c7b54b1881ed6c268e79d8 100644 --- a/pallets/certification/src/weights.rs +++ b/pallets/certification/src/weights.rs @@ -63,6 +63,7 @@ impl WeightInfo for () { .saturating_add(RocksDbWeight::get().reads(5 as u64)) .saturating_add(RocksDbWeight::get().writes(3 as u64)) } + // Storage: Cert CertsByReceiver (r:1 w:1) // Storage: Cert StorageIdtyCertMeta (r:2 w:2) // Storage: Parameters ParametersStorage (r:1 w:0) @@ -78,18 +79,21 @@ impl WeightInfo for () { .saturating_add(RocksDbWeight::get().writes(1 as u64)) .saturating_add(RocksDbWeight::get().writes((1 as u64).saturating_mul(i as u64))) } + fn on_initialize() -> Weight { // Minimum execution time: 259_247 nanoseconds. Weight::from_parts(269_348_000 as u64, 0) .saturating_add(RocksDbWeight::get().reads(7 as u64)) .saturating_add(RocksDbWeight::get().writes(4 as u64)) } + fn do_remove_cert_noop() -> Weight { // Minimum execution time: 259_247 nanoseconds. Weight::from_parts(269_348_000 as u64, 0) .saturating_add(RocksDbWeight::get().reads(7 as u64)) .saturating_add(RocksDbWeight::get().writes(4 as u64)) } + fn do_remove_cert() -> Weight { // Minimum execution time: 259_247 nanoseconds. Weight::from_parts(269_348_000 as u64, 0) diff --git a/pallets/distance/Cargo.toml b/pallets/distance/Cargo.toml index 2387c3ce188dbe2b14c58f6edf81bfe90f1a8005..f9ae014d79ee08c70c77adbcc05a6470827152a8 100644 --- a/pallets/distance/Cargo.toml +++ b/pallets/distance/Cargo.toml @@ -13,100 +13,126 @@ version = '1.0.0' default = ['std'] runtime-benchmarks = [ 'frame-benchmarking/runtime-benchmarks', - 'pallet-balances', 'pallet-identity/runtime-benchmarks', - 'sp-consensus-babe', + 'frame-support/runtime-benchmarks', + 'frame-system/runtime-benchmarks', + 'sp-runtime/runtime-benchmarks', + 'pallet-authority-members/runtime-benchmarks', + 'pallet-membership/runtime-benchmarks', + 'pallet-balances/runtime-benchmarks', ] std = [ 'codec/std', + 'scale-info/std', 'frame-support/std', - 'frame-benchmarking/std', + 'frame-system/std', + 'frame-benchmarking?/std', 'pallet-authority-members/std', 'pallet-authorship/std', 'pallet-identity/std', 'pallet-membership/std', 'pallet-session/std', + 'pallet-balances/std', + 'sp-io/std', + 'sp-keystore/std', 'sp-core/std', 'sp-consensus-babe/std', + 'sp-inherents/std', 'sp-distance/std', 'sp-runtime/std', 'sp-std/std', + 'sp-io/std', +] +try-runtime = [ + 'frame-support/try-runtime', + 'frame-system/try-runtime', + 'sp-runtime/try-runtime', + 'pallet-authority-members/try-runtime', + 'pallet-authorship/try-runtime', + 'pallet-identity/try-runtime', + 'pallet-membership/try-runtime', + 'pallet-session/try-runtime', + 'pallet-balances/try-runtime', + 'sp-distance/try-runtime', ] [dependencies] +getrandom = { version = "0.2.12", features = ["js"], default-features = false } pallet-authority-members = { path = "../authority-members", default-features = false } + +pallet-balances = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', optional = true, default-features = false } pallet-identity = { path = "../identity", default-features = false } pallet-membership = { path = "../membership", default-features = false } -sp-distance = { path = "../../primitives/distance", default-features = false } -sp-consensus-babe = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false, optional = true } -getrandom = { version = "0.2", features = ["js"] } # substrate -scale-info = { version = "2.1.1", default-features = false, features = [ +scale-info = { version = "2.10.0", default-features = false, features = [ "derive", ] } - -pallet-balances = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', optional = true, default-features = false } +sp-distance = { path = "../../primitives/distance", default-features = false } [dependencies.codec] default-features = false features = ['derive'] package = 'parity-scale-codec' -version = '3.1.5' +version = '3.6.9' [dependencies.frame-benchmarking] default-features = false -git = 'https://github.com/duniter/substrate' +git = 'https://github.com/duniter/duniter-polkadot-sdk' optional = true -branch = 'duniter-substrate-v0.9.42' +branch = 'duniter-substrate-v1.6.0' [dependencies.frame-support] default-features = false -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' [dependencies.frame-system] default-features = false -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' [dependencies.pallet-authorship] default-features = false -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' [dependencies.pallet-session] default-features = false -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' [dependencies.sp-core] default-features = false -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' [dependencies.sp-inherents] default-features = false -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' [dependencies.sp-runtime] default-features = false -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' - -[dependencies.sp-std] -default-features = false -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' - +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' ### DOC ### [package.metadata.docs.rs] +default-features = false targets = ['x86_64-unknown-linux-gnu'] +[dependencies.sp-std] +default-features = false +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' + +[dependencies.sp-consensus-babe] +default-features = false +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' + [dev-dependencies] -pallet-balances = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -sp-io = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -sp-keystore = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } +sp-io = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +sp-keystore = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } diff --git a/pallets/distance/src/benchmarking.rs b/pallets/distance/src/benchmarking.rs index c762bde19753caa3c506c546772f495a98d620f9..4b5fb9557650cbae9ec1dc1f758c6de36d3852ec 100644 --- a/pallets/distance/src/benchmarking.rs +++ b/pallets/distance/src/benchmarking.rs @@ -19,8 +19,9 @@ use super::*; use codec::Encode; -use frame_benchmarking::{benchmarks, vec}; +use frame_benchmarking::benchmarks; use frame_support::traits::{Currency, OnFinalize}; +use frame_system::pallet_prelude::BlockNumberFor; use frame_system::RawOrigin; use pallet_balances::Pallet as Balances; use sp_runtime::traits::{Bounded, One}; @@ -48,7 +49,7 @@ benchmarks! { where_clause { where T: pallet_balances::Config, T::Balance: From<u64>, - T::BlockNumber: From<u32>, + BlockNumberFor<T>: From<u32>, } // request distance evaluation diff --git a/pallets/distance/src/lib.rs b/pallets/distance/src/lib.rs index 1790134a02e738b41eb2588b7b39b77e9131fc02..ddcff521833871062ddab62fe08951f7d37705c1 100644 --- a/pallets/distance/src/lib.rs +++ b/pallets/distance/src/lib.rs @@ -332,6 +332,7 @@ pub mod pallet { _ => unreachable!("index % 3 < 3"), } } + /// Mutate the evaluation pool containing the results sent by evaluators on this session. fn mutate_next_pool< R, @@ -581,6 +582,7 @@ pub mod pallet { computation_result: inherent_data, }) } + fn is_inherent(call: &Self::Call) -> bool { matches!(call, Self::Call::update_evaluation { .. }) } diff --git a/pallets/distance/src/mock.rs b/pallets/distance/src/mock.rs index 6861b3c43ad8a817ba9b04f521203a21d9f2bccd..c95da08752eb25e07acb39bd2fe6ce8980738b21 100644 --- a/pallets/distance/src/mock.rs +++ b/pallets/distance/src/mock.rs @@ -19,23 +19,23 @@ use crate::{self as pallet_distance}; use core::marker::PhantomData; use frame_support::{ parameter_types, - traits::{Everything, GenesisBuild, OnFinalize, OnInitialize}, + traits::{Everything, OnFinalize, OnInitialize}, }; use frame_system as system; use pallet_balances::AccountData; use pallet_session::ShouldEndSession; use sp_core::{ConstU32, H256}; +use sp_runtime::BuildStorage; use sp_runtime::{ impl_opaque_keys, key_types::DUMMY, - testing::{Header, TestSignature, UintAuthorityId}, + testing::{TestSignature, UintAuthorityId}, traits::{BlakeTwo256, ConvertInto, IdentityLookup, IsMember, OpaqueKeys}, KeyTypeId, Perbill, }; type Balance = u64; type Block = frame_system::mocking::MockBlock<Test>; -type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic<Test>; pub type AccountId = u64; impl_opaque_keys! { @@ -52,18 +52,14 @@ impl From<UintAuthorityId> for MockSessionKeys { // Configure a mock runtime to test the pallet. frame_support::construct_runtime!( - pub enum Test where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, - { - System: frame_system::{Pallet, Call, Config, Storage, Event<T>}, - Session: pallet_session::{Pallet, Call, Storage, Config<T>, Event}, - Authorship: pallet_authorship::{Pallet, Storage}, - AuthorityMembers: pallet_authority_members::{Pallet, Call, Storage, Config<T>, Event<T>}, - Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>}, - Identity: pallet_identity::{Pallet, Call, Storage, Config<T>, Event<T>}, - Distance: pallet_distance::{Pallet, Call, Storage, Event<T>}, + pub enum Test { + System: frame_system, + Session: pallet_session, + Authorship: pallet_authorship, + AuthorityMembers: pallet_authority_members, + Balances: pallet_balances, + Identity: pallet_identity, + Distance: pallet_distance, } ); @@ -73,30 +69,30 @@ parameter_types! { } impl system::Config for Test { + type AccountData = AccountData<u64>; + type AccountId = AccountId; type BaseCallFilter = Everything; - type BlockWeights = (); + type Block = Block; + type BlockHashCount = BlockHashCount; type BlockLength = (); + type BlockWeights = (); type DbWeight = (); - type RuntimeOrigin = RuntimeOrigin; - type RuntimeCall = RuntimeCall; - type Index = u64; - type BlockNumber = u64; type Hash = H256; type Hashing = BlakeTwo256; - type AccountId = AccountId; type Lookup = IdentityLookup<Self::AccountId>; - type Header = Header; - type RuntimeEvent = RuntimeEvent; - type BlockHashCount = BlockHashCount; - type Version = (); - type PalletInfo = PalletInfo; - type AccountData = AccountData<u64>; - type OnNewAccount = (); + type MaxConsumers = frame_support::traits::ConstU32<16>; + type Nonce = u64; type OnKilledAccount = (); - type SystemWeightInfo = (); - type SS58Prefix = SS58Prefix; + type OnNewAccount = (); type OnSetCode = (); - type MaxConsumers = frame_support::traits::ConstU32<16>; + type PalletInfo = PalletInfo; + type RuntimeCall = RuntimeCall; + type RuntimeEvent = RuntimeEvent; + type RuntimeOrigin = RuntimeOrigin; + type RuntimeTask = (); + type SS58Prefix = SS58Prefix; + type SystemWeightInfo = (); + type Version = (); } pub struct TestSessionHandler; @@ -124,14 +120,14 @@ impl ShouldEndSession<u64> for TestShouldEndSession { } impl pallet_session::Config for Test { + type Keys = MockSessionKeys; + type NextSessionRotation = (); type RuntimeEvent = RuntimeEvent; + type SessionHandler = TestSessionHandler; + type SessionManager = AuthorityMembers; + type ShouldEndSession = TestShouldEndSession; type ValidatorId = AccountId; type ValidatorIdOf = ConvertInto; - type ShouldEndSession = TestShouldEndSession; - type NextSessionRotation = (); - type SessionManager = AuthorityMembers; - type SessionHandler = TestSessionHandler; - type Keys = MockSessionKeys; type WeightInfo = (); } @@ -158,8 +154,8 @@ impl<T: From<u64>> frame_support::traits::FindAuthor<T> for ConstantAuthor<T> { } impl pallet_authorship::Config for Test { - type FindAuthor = ConstantAuthor<Self::AccountId>; type EventHandler = (); + type FindAuthor = ConstantAuthor<Self::AccountId>; } pub struct TestIsSmithMember; @@ -184,12 +180,12 @@ impl pallet_authority_members::Config for Test { type MaxAuthorities = ConstU32<4>; type MemberId = u32; type MemberIdOf = IdentityIndexOf<Self>; + type OnIncomingMember = (); type OnNewSession = (); + type OnOutgoingMember = (); type RemoveMemberOrigin = system::EnsureRoot<AccountId>; type RuntimeEvent = RuntimeEvent; type WeightInfo = (); - type OnOutgoingMember = (); - type OnIncomingMember = (); } parameter_types! { @@ -198,19 +194,20 @@ parameter_types! { } impl pallet_balances::Config for Test { + type AccountStore = System; type Balance = Balance; type DustRemoval = (); type ExistentialDeposit = ExistentialDeposit; - type AccountStore = System; - type WeightInfo = pallet_balances::weights::SubstrateWeight<Test>; + type FreezeIdentifier = (); + type MaxFreezes = ConstU32<0>; + type MaxHolds = ConstU32<0>; type MaxLocks = MaxLocks; type MaxReserves = (); type ReserveIdentifier = [u8; 8]; type RuntimeEvent = RuntimeEvent; - type HoldIdentifier = (); - type FreezeIdentifier = (); - type MaxHolds = ConstU32<0>; - type MaxFreezes = ConstU32<0>; + type RuntimeFreezeReason = (); + type RuntimeHoldReason = (); + type WeightInfo = pallet_balances::weights::SubstrateWeight<Test>; } parameter_types! { @@ -230,21 +227,21 @@ impl pallet_identity::traits::IdtyNameValidator for IdtyNameValidatorTestImpl { } impl pallet_identity::Config for Test { + type AccountLinker = (); + type AutorevocationPeriod = AutorevocationPeriod; type ChangeOwnerKeyPeriod = ChangeOwnerKeyPeriod; + type CheckIdtyCallAllowed = (); type ConfirmPeriod = ConfirmPeriod; - type ValidationPeriod = ValidationPeriod; - type AutorevocationPeriod = AutorevocationPeriod; type DeletionPeriod = DeletionPeriod; - type CheckIdtyCallAllowed = (); type IdtyCreationPeriod = IdtyCreationPeriod; type IdtyData = (); - type IdtyNameValidator = IdtyNameValidatorTestImpl; type IdtyIndex = u32; - type AccountLinker = (); - type Signer = UintAuthorityId; - type Signature = TestSignature; + type IdtyNameValidator = IdtyNameValidatorTestImpl; type OnIdtyChange = (); type RuntimeEvent = RuntimeEvent; + type Signature = TestSignature; + type Signer = UintAuthorityId; + type ValidationPeriod = ValidationPeriod; type WeightInfo = (); } @@ -252,21 +249,21 @@ parameter_types! { pub const MinAccessibleReferees: Perbill = Perbill::from_percent(80); } impl pallet_distance::Config for Test { + type CheckRequestDistanceEvaluation = (); type Currency = Balances; type EvaluationPrice = frame_support::traits::ConstU64<1000>; type MaxRefereeDistance = frame_support::traits::ConstU32<5>; type MinAccessibleReferees = MinAccessibleReferees; + type OnValidDistanceStatus = (); type RuntimeEvent = RuntimeEvent; type WeightInfo = (); - type OnValidDistanceStatus = (); - type CheckRequestDistanceEvaluation = (); } // Build genesis storage according to the mock runtime. #[allow(dead_code)] // ??? Clippy triggers dead code for new_test_ext while it is used during test benchmark pub fn new_test_ext() -> sp_io::TestExternalities { - let mut t = frame_system::GenesisConfig::default() - .build_storage::<Test>() + let mut t = frame_system::GenesisConfig::<Test>::default() + .build_storage() .unwrap(); pub const NAMES: [&str; 6] = ["Alice", "Bob", "Charlie", "Dave", "Eve", "Ferdie"]; diff --git a/pallets/duniter-account/Cargo.toml b/pallets/duniter-account/Cargo.toml index 71bb9afe730747544b42d9fafc44d0fd12b37c7b..8e1dca7dc499963b0fbcce19c5ff1ffc341b5ee6 100644 --- a/pallets/duniter-account/Cargo.toml +++ b/pallets/duniter-account/Cargo.toml @@ -13,22 +13,45 @@ version = '3.0.0' default = ['std'] runtime-benchmarks = [ 'frame-benchmarking/runtime-benchmarks', + 'frame-support/runtime-benchmarks', + 'frame-system/runtime-benchmarks', + 'sp-runtime/runtime-benchmarks', + 'pallet-identity/runtime-benchmarks', + 'pallet-provide-randomness/runtime-benchmarks', + 'pallet-treasury/runtime-benchmarks', + 'pallet-quota/runtime-benchmarks', + 'pallet-balances/runtime-benchmarks', ] std = [ 'codec/std', 'frame-support/std', 'frame-system/std', - 'frame-benchmarking/std', + 'frame-benchmarking?/std', 'pallet-balances/std', + 'pallet-transaction-payment/std', + 'pallet-identity/std', 'pallet-provide-randomness/std', 'pallet-treasury/std', - 'serde', + 'pallet-quota/std', + 'serde/std', + 'log/std', + 'scale-info/std', 'sp-core/std', 'sp-io/std', 'sp-runtime/std', 'sp-std/std', ] -try-runtime = ['frame-support/try-runtime'] +try-runtime = [ + 'frame-support/try-runtime', + 'frame-system/try-runtime', + 'sp-runtime/try-runtime', + 'pallet-identity/try-runtime', + 'pallet-provide-randomness/try-runtime', + 'pallet-treasury/try-runtime', + 'pallet-quota/try-runtime', + 'pallet-balances/try-runtime', + 'pallet-transaction-payment/try-runtime', +] [dependencies] # local @@ -37,84 +60,75 @@ pallet-identity = { path = "../identity", default-features = false } pallet-provide-randomness = { path = "../provide-randomness", default-features = false } # crates.io -codec = { package = 'parity-scale-codec', version = "3.1.5", default-features = false, features = ["derive"] } -log = { version = "0.4.14", default-features = false } -scale-info = { version = "2.1.1", default-features = false, features = ["derive"] } +codec = { package = 'parity-scale-codec', version = "3.6.9", default-features = false, features = ["derive"] } +log = { version = "0.4.20", default-features = false } +scale-info = { version = "2.10.0", default-features = false, features = ["derive"] } # substrate [dependencies.frame-benchmarking] default-features = false -git = 'https://github.com/duniter/substrate' +git = 'https://github.com/duniter/duniter-polkadot-sdk' optional = true -branch = 'duniter-substrate-v0.9.42' +branch = 'duniter-substrate-v1.6.0' [dependencies.frame-support] default-features = false -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' [dependencies.frame-system] default-features = false -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' [dependencies.pallet-balances] default-features = false -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' [dependencies.pallet-transaction-payment] default-features = false -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' [dependencies.pallet-treasury] default-features = false -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' [dependencies.serde] -version = "1.0.101" -optional = true +default-features = false +version = "1.0.195" features = ["derive"] [dependencies.sp-core] default-features = false -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' [dependencies.sp-io] default-features = false -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' [dependencies.sp-runtime] default-features = false -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' [dependencies.sp-std] default-features = false -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' ### DOC ### [package.metadata.docs.rs] +default-features = false targets = ['x86_64-unknown-linux-gnu'] ### DEV ### -[dev-dependencies.pallet-balances] -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' - [dev-dependencies.maplit] +default-features = false version = '1.0.2' - -[dev-dependencies.serde] -version = '1.0.119' - -[dev-dependencies.sp-io] -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' \ No newline at end of file diff --git a/pallets/duniter-account/src/benchmarking.rs b/pallets/duniter-account/src/benchmarking.rs index 6c99b55323dd91dea63eb4bc124de7e6434ac4bc..27a839e1a714503c4c3f01dd940f1cec48576771 100644 --- a/pallets/duniter-account/src/benchmarking.rs +++ b/pallets/duniter-account/src/benchmarking.rs @@ -65,13 +65,13 @@ benchmarks! { }: _<T::RuntimeOrigin>(origin.into()) on_initialize_sufficient { let i in 0 .. T::MaxNewAccountsPerBlock::get() => create_pending_accounts::<T>(i, false, true)?; - }: { Pallet::<T>::on_initialize(T::BlockNumber::one()); } + }: { Pallet::<T>::on_initialize(BlockNumberFor::<T>::one()); } on_initialize_with_balance { let i in 0 .. T::MaxNewAccountsPerBlock::get() => create_pending_accounts::<T>(i, true, false)?; - }: { Pallet::<T>::on_initialize(T::BlockNumber::one()); } + }: { Pallet::<T>::on_initialize(BlockNumberFor::<T>::one()); } on_initialize_no_balance { let i in 0 .. T::MaxNewAccountsPerBlock::get() => create_pending_accounts::<T>(i, false, false)?; - }: { Pallet::<T>::on_initialize(T::BlockNumber::one()); } + }: { Pallet::<T>::on_initialize(BlockNumberFor::<T>::one()); } on_filled_randomness_pending { let caller: T::AccountId = whitelisted_caller(); let randomness = H256(T::AccountIdToSalt::convert(caller.clone())); diff --git a/pallets/duniter-account/src/lib.rs b/pallets/duniter-account/src/lib.rs index 21b72affaa063d1e458255a093e7937d8916e916..05f0c69e357a234e3a26e2315a05c0d644f21ed2 100644 --- a/pallets/duniter-account/src/lib.rs +++ b/pallets/duniter-account/src/lib.rs @@ -104,7 +104,6 @@ pub mod pallet { pub treasury_balance: T::Balance, } - #[cfg(feature = "std")] impl<T: Config> Default for GenesisConfig<T> { fn default() -> Self { Self { @@ -115,7 +114,7 @@ pub mod pallet { } #[pallet::genesis_build] - impl<T: Config> GenesisBuild<T> for GenesisConfig<T> { + impl<T: Config> BuildGenesisConfig for GenesisConfig<T> { fn build(&self) { // Treasury frame_system::Account::<T>::mutate( @@ -132,7 +131,7 @@ pub mod pallet { .accounts .keys() .cloned() - .collect::<std::collections::BTreeSet<_>>(); + .collect::<sp_std::collections::btree_set::BTreeSet<_>>(); assert!( endowed_accounts.len() == self.accounts.len(), @@ -236,7 +235,7 @@ pub mod pallet { #[pallet::hooks] impl<T: Config> Hooks<BlockNumberFor<T>> for Pallet<T> { // on initialize, withdraw account creation tax - fn on_initialize(_: T::BlockNumber) -> Weight { + fn on_initialize(_: BlockNumberFor<T>) -> Weight { let mut total_weight = Weight::zero(); for account_id in PendingNewAccounts::<T>::iter_keys() .drain() diff --git a/pallets/duniter-account/src/types.rs b/pallets/duniter-account/src/types.rs index c9b9a02cf4d3a83203086cb008847adde825122f..77553c4db3c34a3e6e7520b302a78c7b6368a570 100644 --- a/pallets/duniter-account/src/types.rs +++ b/pallets/duniter-account/src/types.rs @@ -74,8 +74,20 @@ impl<Balance: Zero, IdtyId> From<AccountData<Balance, IdtyId>> } } -#[derive(Clone, Decode, Default, Encode, Eq, MaxEncodedLen, PartialEq, RuntimeDebug, TypeInfo)] -#[cfg_attr(feature = "std", derive(serde::Deserialize, serde::Serialize))] +#[derive( + Clone, + Decode, + Default, + Encode, + Eq, + MaxEncodedLen, + PartialEq, + RuntimeDebug, + TypeInfo, + serde::Serialize, + serde::Deserialize, +)] +#[serde(deny_unknown_fields)] pub struct GenesisAccountData<Balance, IdtyId> { pub random_id: H256, pub balance: Balance, diff --git a/pallets/duniter-account/src/weights.rs b/pallets/duniter-account/src/weights.rs index 212eb7fe4f6fe00e35abbc052926e6b1fa2a3ce7..d8ccf6bb58cbb363ba0c5a885bdc9f008b06295d 100644 --- a/pallets/duniter-account/src/weights.rs +++ b/pallets/duniter-account/src/weights.rs @@ -41,6 +41,7 @@ impl WeightInfo for () { .saturating_add(Weight::from_parts(0, 3591)) .saturating_add(RocksDbWeight::get().reads(1)) } + // Storage: Account PendingNewAccounts (r:1 w:0) // Storage: ProvideRandomness RequestIdProvider (r:1 w:1) // Storage: ProvideRandomness RequestsIds (r:1 w:1) @@ -59,6 +60,7 @@ impl WeightInfo for () { .saturating_add(RocksDbWeight::get().reads((6 as u64).saturating_mul(i as u64))) .saturating_add(RocksDbWeight::get().writes((6 as u64).saturating_mul(i as u64))) } + // Storage: Account PendingNewAccounts (r:1 w:0) // Storage: ProvideRandomness RequestIdProvider (r:1 w:1) // Storage: ProvideRandomness RequestsIds (r:1 w:1) @@ -77,6 +79,7 @@ impl WeightInfo for () { .saturating_add(RocksDbWeight::get().reads((6 as u64).saturating_mul(i as u64))) .saturating_add(RocksDbWeight::get().writes((6 as u64).saturating_mul(i as u64))) } + // Storage: Account PendingNewAccounts (r:1 w:0) /// The range of component `i` is `[0, 1]`. fn on_initialize_no_balance(i: u32) -> Weight { @@ -87,6 +90,7 @@ impl WeightInfo for () { .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes((1 as u64).saturating_mul(i as u64))) } + // Storage: Account PendingRandomIdAssignments (r:1 w:1) fn on_filled_randomness_pending() -> Weight { // Minimum execution time: 66_963 nanoseconds. @@ -94,6 +98,7 @@ impl WeightInfo for () { .saturating_add(RocksDbWeight::get().reads(1 as u64)) .saturating_add(RocksDbWeight::get().writes(1 as u64)) } + // Storage: Account PendingRandomIdAssignments (r:1 w:0) fn on_filled_randomness_no_pending() -> Weight { // Minimum execution time: 16_088 nanoseconds. diff --git a/pallets/duniter-test-parameters/Cargo.toml b/pallets/duniter-test-parameters/Cargo.toml index 1fe4019fda511e58e8eb16b61e5e1450f0d770b4..faf557e6a4443fce594363c57c007849d18efd87 100644 --- a/pallets/duniter-test-parameters/Cargo.toml +++ b/pallets/duniter-test-parameters/Cargo.toml @@ -10,63 +10,74 @@ version = '3.0.0' [features] default = ['std'] -runtime-benchmarks = ['frame-benchmarking'] +runtime-benchmarks = [ + 'frame-benchmarking/runtime-benchmarks', + 'frame-support/runtime-benchmarks', + 'frame-system/runtime-benchmarks', + 'sp-runtime/runtime-benchmarks', +] std = [ + 'scale-info/std', + 'serde/std', 'codec/std', + 'frame-benchmarking?/std', 'frame-support/std', 'frame-system/std', - 'frame-benchmarking/std', - 'serde', "sp-io/std", + "sp-runtime/std", "sp-std/std", ] -try-runtime = ['frame-support/try-runtime'] +try-runtime = [ + 'frame-support/try-runtime', + 'frame-system/try-runtime', + 'sp-runtime/try-runtime', +] [dependencies] -pallet-duniter-test-parameters-macro = { path = "macro" } -serde = { version = "1.0.101", features = ["derive"], optional = true } +pallet-duniter-test-parameters-macro = { path = "macro", default-features = false } # substrate -scale-info = { version = "2.1.1", default-features = false, features = ["derive"] } +scale-info = { version = "2.10.0", default-features = false, features = ["derive"] } +serde = { version = "1.0.195", features = ["derive"], default-features = false } [dependencies.codec] default-features = false features = ['derive'] package = 'parity-scale-codec' -version = "3.1.5" +version = "3.6.9" [dependencies.frame-benchmarking] default-features = false -git = 'https://github.com/duniter/substrate' +git = 'https://github.com/duniter/duniter-polkadot-sdk' optional = true -branch = 'duniter-substrate-v0.9.42' +branch = 'duniter-substrate-v1.6.0' [dependencies.frame-support] default-features = false -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' [dependencies.frame-system] default-features = false -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' +### DOC ### -[dependencies.sp-io] +[package.metadata.docs.rs] default-features = false -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' +targets = ['x86_64-unknown-linux-gnu'] -[dependencies.sp-std] +[dependencies.sp-io] default-features = false -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' [dependencies.sp-runtime] default-features = false -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' - -### DOC ### +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' -[package.metadata.docs.rs] -targets = ['x86_64-unknown-linux-gnu'] +[dependencies.sp-std] +default-features = false +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' diff --git a/pallets/duniter-test-parameters/macro/Cargo.toml b/pallets/duniter-test-parameters/macro/Cargo.toml index 4faec3d4bcc3abf2760bd270cb14a97a55e57f0c..a7d9b0701d1ab9037899d0cf1b100612a075c1f3 100644 --- a/pallets/duniter-test-parameters/macro/Cargo.toml +++ b/pallets/duniter-test-parameters/macro/Cargo.toml @@ -12,7 +12,7 @@ version = '3.0.0' proc-macro = true [dependencies] -num_enum = { version = "0.5.3", default-features = false } -proc-macro2 = "1.0" -quote = "1.0" -syn = { version = "1.0", features = [ "extra-traits", "fold", "full", "visit" ] } +num_enum = { version = "0.7.2", default-features = false } +proc-macro2 = { version = "1.0.76", default-features = false } +quote = { version = "1.0.35", default-features = false } +syn = { version = "2.0.48", features = [ "extra-traits", "fold", "full", "visit" ] } diff --git a/pallets/duniter-test-parameters/src/lib.rs b/pallets/duniter-test-parameters/src/lib.rs index 55ca1c612e69e681ef2f76bb877b92f209cca87a..98db19954b354ca28baded4fff508da6a8426deb 100644 --- a/pallets/duniter-test-parameters/src/lib.rs +++ b/pallets/duniter-test-parameters/src/lib.rs @@ -24,13 +24,18 @@ pub mod types { use codec::{Decode, Encode}; use frame_support::pallet_prelude::*; use pallet_duniter_test_parameters_macro::generate_fields_getters; - use scale_info::TypeInfo; - #[cfg(feature = "std")] - use serde::{Deserialize, Serialize}; #[generate_fields_getters] - #[cfg_attr(feature = "std", derive(Deserialize, Serialize))] - #[derive(Encode, Decode, Default, Clone, Copy, PartialEq, Eq, RuntimeDebug, TypeInfo)] + #[derive( + Default, + Encode, + Decode, + Clone, + PartialEq, + serde::Serialize, + serde::Deserialize, + scale_info::TypeInfo, + )] pub struct Parameters< BlockNumber: Default + Parameter, CertCount: Default + Parameter, @@ -75,6 +80,7 @@ pub mod pallet { #[pallet::config] pub trait Config: frame_system::Config { + type BlockNumber: Default + MaybeSerializeDeserialize + Parameter; type CertCount: Default + MaybeSerializeDeserialize + Parameter; type PeriodCount: Default + MaybeSerializeDeserialize + Parameter; type SessionCount: Default + MaybeSerializeDeserialize + Parameter; @@ -97,7 +103,6 @@ pub mod pallet { pub parameters: Parameters<T::BlockNumber, T::CertCount, T::PeriodCount, T::SessionCount>, } - #[cfg(feature = "std")] impl<T: Config> Default for GenesisConfig<T> { fn default() -> Self { Self { @@ -107,7 +112,7 @@ pub mod pallet { } #[pallet::genesis_build] - impl<T: Config> GenesisBuild<T> for GenesisConfig<T> { + impl<T: Config> BuildGenesisConfig for GenesisConfig<T> { fn build(&self) { <ParametersStorage<T>>::put(self.parameters.clone()); } diff --git a/pallets/duniter-wot/Cargo.toml b/pallets/duniter-wot/Cargo.toml index 403af9bcec971c9a886eb62f7cfff9d1f6f258ef..7e17bd1271b436217c36260def0250f974ff4231 100644 --- a/pallets/duniter-wot/Cargo.toml +++ b/pallets/duniter-wot/Cargo.toml @@ -11,93 +11,105 @@ version = '3.0.0' [features] default = ['std'] -runtime-benchmarks = ['frame-benchmarking', 'pallet-membership/runtime-benchmarks', 'pallet-identity/runtime-benchmarks'] +runtime-benchmarks = [ + 'frame-benchmarking/runtime-benchmarks', + 'frame-support/runtime-benchmarks', + 'frame-system/runtime-benchmarks', + 'sp-runtime/runtime-benchmarks', + 'pallet-identity/runtime-benchmarks', + 'pallet-distance/runtime-benchmarks', + 'pallet-membership/runtime-benchmarks', + 'pallet-certification/runtime-benchmarks', +] std = [ 'codec/std', 'frame-support/std', 'frame-system/std', - 'frame-benchmarking/std', + 'frame-benchmarking?/std', 'pallet-certification/std', 'pallet-distance/std', 'pallet-identity/std', 'pallet-membership/std', - 'serde', + 'scale-info/std', 'sp-core/std', 'sp-io/std', 'sp-membership/std', 'sp-runtime/std', 'sp-std/std', + 'sp-state-machine/std', +] +try-runtime = [ + 'frame-support/try-runtime', + 'frame-system/try-runtime', + 'sp-runtime/try-runtime', + 'sp-membership/try-runtime', + 'pallet-identity/try-runtime', + 'pallet-certification/try-runtime', + 'pallet-membership/try-runtime', + 'pallet-distance/try-runtime', ] -try-runtime = ['frame-support/try-runtime'] [dependencies] pallet-certification = { path = "../certification", default-features = false } -pallet-identity = { path = "../identity", default-features = false } pallet-distance = { path = "../distance", default-features = false } +pallet-identity = { path = "../identity", default-features = false } pallet-membership = { path = "../membership", default-features = false } -sp-membership = { path = "../../primitives/membership", default-features = false } # substrate -scale-info = { version = "2.1.1", default-features = false, features = [ +scale-info = { version = "2.10.0", default-features = false, features = [ "derive", ] } +sp-membership = { path = "../../primitives/membership", default-features = false } [dependencies.codec] default-features = false features = ['derive'] package = 'parity-scale-codec' -version = "3.1.5" +version = "3.6.9" [dependencies.frame-benchmarking] default-features = false -git = 'https://github.com/duniter/substrate' +git = 'https://github.com/duniter/duniter-polkadot-sdk' optional = true -branch = 'duniter-substrate-v0.9.42' +branch = 'duniter-substrate-v1.6.0' [dependencies.frame-support] default-features = false -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' [dependencies.frame-system] default-features = false -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' - -[dependencies.serde] -version = "1.0.101" -optional = true -features = ["derive"] +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' [dependencies.sp-core] default-features = false -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' [dependencies.sp-io] default-features = false -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' [dependencies.sp-runtime] default-features = false -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' - -[dependencies.sp-std] -default-features = false -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' - +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' ### DOC ### [package.metadata.docs.rs] +default-features = false targets = ['x86_64-unknown-linux-gnu'] -[dev-dependencies.serde] -version = '1.0.119' +[dependencies.sp-std] +default-features = false +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' ### DEV ### -[dev-dependencies.sp-io] -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' +[dev-dependencies.sp-state-machine] +default-features = false +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' diff --git a/pallets/duniter-wot/src/lib.rs b/pallets/duniter-wot/src/lib.rs index 7051c922c6eb5f8179a6650a6ea6b1c54147e182..9985c6822cea6b38e1f258a5dd5c7be544ca9f03 100644 --- a/pallets/duniter-wot/src/lib.rs +++ b/pallets/duniter-wot/src/lib.rs @@ -60,7 +60,7 @@ pub mod pallet { + pallet_membership::Config<IdtyId = IdtyIndex> { #[pallet::constant] - type FirstIssuableOn: Get<Self::BlockNumber>; + type FirstIssuableOn: Get<frame_system::pallet_prelude::BlockNumberFor<Self>>; #[pallet::constant] type MinCertForMembership: Get<u32>; #[pallet::constant] diff --git a/pallets/duniter-wot/src/mock.rs b/pallets/duniter-wot/src/mock.rs index 7d2c1f27e4e1fdb1ec1f58da23c50af992a676ac..00fcb0b7ccda8350729701bb02656cbdb1d3fc97 100644 --- a/pallets/duniter-wot/src/mock.rs +++ b/pallets/duniter-wot/src/mock.rs @@ -19,15 +19,16 @@ use crate::{self as pallet_duniter_wot}; use frame_support::{parameter_types, traits::Everything}; use frame_system as system; use sp_core::H256; +use sp_runtime::BuildStorage; use sp_runtime::{ - testing::{Header, TestSignature, UintAuthorityId}, + testing::{TestSignature, UintAuthorityId}, traits::{BlakeTwo256, IdentityLookup}, }; +use sp_state_machine::BasicExternalities; use std::collections::BTreeMap; type AccountId = u64; type Block = frame_system::mocking::MockBlock<Test>; -type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic<Test>; pub struct IdentityIndexOf<T: pallet_identity::Config>(PhantomData<T>); impl<T: pallet_identity::Config> sp_runtime::traits::Convert<T::AccountId, Option<T::IdtyIndex>> @@ -40,16 +41,12 @@ impl<T: pallet_identity::Config> sp_runtime::traits::Convert<T::AccountId, Optio // Configure a mock runtime to test the pallet. frame_support::construct_runtime!( - pub enum Test where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, - { - System: frame_system::{Pallet, Call, Config, Storage, Event<T>}, - DuniterWot: pallet_duniter_wot::{Pallet}, - Identity: pallet_identity::{Pallet, Call, Config<T>, Storage, Event<T>}, - Membership: pallet_membership::{Pallet, Config<T>, Storage, Event<T>}, - Cert: pallet_certification::{Pallet, Call, Config<T>, Storage, Event<T>}, + pub enum Test { + System: frame_system, + DuniterWot: pallet_duniter_wot, + Identity: pallet_identity, + Membership: pallet_membership, + Cert: pallet_certification, } ); @@ -60,30 +57,30 @@ parameter_types! { } impl system::Config for Test { + type AccountData = (); + type AccountId = AccountId; type BaseCallFilter = Everything; - type BlockWeights = (); + type Block = Block; + type BlockHashCount = BlockHashCount; type BlockLength = (); + type BlockWeights = (); type DbWeight = (); - type RuntimeOrigin = RuntimeOrigin; - type RuntimeCall = RuntimeCall; - type Index = u64; - type BlockNumber = u64; type Hash = H256; type Hashing = BlakeTwo256; - type AccountId = AccountId; type Lookup = IdentityLookup<Self::AccountId>; - type Header = Header; - type RuntimeEvent = RuntimeEvent; - type BlockHashCount = BlockHashCount; - type Version = (); - type PalletInfo = PalletInfo; - type AccountData = (); - type OnNewAccount = (); + type MaxConsumers = frame_support::traits::ConstU32<16>; + type Nonce = u64; type OnKilledAccount = (); - type SystemWeightInfo = (); - type SS58Prefix = SS58Prefix; + type OnNewAccount = (); type OnSetCode = (); - type MaxConsumers = frame_support::traits::ConstU32<16>; + type PalletInfo = PalletInfo; + type RuntimeCall = RuntimeCall; + type RuntimeEvent = RuntimeEvent; + type RuntimeOrigin = RuntimeOrigin; + type RuntimeTask = (); + type SS58Prefix = SS58Prefix; + type SystemWeightInfo = (); + type Version = (); } // DuniterWot @@ -94,9 +91,9 @@ parameter_types! { } impl pallet_duniter_wot::Config for Test { - type MinCertForMembership = MinCertForMembership; - type MinCertForCreateIdtyRight = MinCertForCreateIdtyRight; type FirstIssuableOn = FirstIssuableOn; + type MinCertForCreateIdtyRight = MinCertForCreateIdtyRight; + type MinCertForMembership = MinCertForMembership; } // Identity @@ -117,21 +114,21 @@ impl pallet_identity::traits::IdtyNameValidator for IdtyNameValidatorTestImpl { } impl pallet_identity::Config for Test { + type AccountLinker = (); + type AutorevocationPeriod = AutorevocationPeriod; type ChangeOwnerKeyPeriod = ChangeOwnerKeyPeriod; - type ConfirmPeriod = ConfirmPeriod; type CheckIdtyCallAllowed = DuniterWot; - type IdtyCreationPeriod = IdtyCreationPeriod; - type ValidationPeriod = ValidationPeriod; - type AutorevocationPeriod = AutorevocationPeriod; + type ConfirmPeriod = ConfirmPeriod; type DeletionPeriod = DeletionPeriod; + type IdtyCreationPeriod = IdtyCreationPeriod; type IdtyData = (); - type IdtyNameValidator = IdtyNameValidatorTestImpl; type IdtyIndex = IdtyIndex; - type AccountLinker = (); - type Signer = UintAuthorityId; - type Signature = TestSignature; + type IdtyNameValidator = IdtyNameValidatorTestImpl; type OnIdtyChange = DuniterWot; type RuntimeEvent = RuntimeEvent; + type Signature = TestSignature; + type Signer = UintAuthorityId; + type ValidationPeriod = ValidationPeriod; type WeightInfo = (); } @@ -142,17 +139,17 @@ parameter_types! { } impl pallet_membership::Config for Test { + type AccountIdOf = (); + #[cfg(feature = "runtime-benchmarks")] + type BenchmarkSetupHandler = (); type CheckMembershipOpAllowed = DuniterWot; type IdtyId = IdtyIndex; type IdtyIdOf = IdentityIndexOf<Self>; - type AccountIdOf = (); type MembershipPeriod = MembershipPeriod; type MembershipRenewalPeriod = MembershipRenewalPeriod; type OnEvent = DuniterWot; type RuntimeEvent = RuntimeEvent; type WeightInfo = (); - #[cfg(feature = "runtime-benchmarks")] - type BenchmarkSetupHandler = (); } // Cert @@ -172,17 +169,18 @@ impl pallet_certification::Config for Test { type MinReceivedCertToBeAbleToIssueCert = MinReceivedCertToBeAbleToIssueCert; type OnNewcert = DuniterWot; type OnRemovedCert = DuniterWot; + type OwnerKeyOf = Identity; type RuntimeEvent = RuntimeEvent; - type WeightInfo = (); type ValidityPeriod = ValidityPeriod; + type WeightInfo = (); } pub const NAMES: [&str; 6] = ["Alice", "Bob", "Charlie", "Dave", "Eve", "Ferdie"]; // Build genesis storage according to the mock runtime. pub fn new_test_ext(initial_identities_len: usize) -> sp_io::TestExternalities { - let mut t = frame_system::GenesisConfig::default() - .build_storage::<Test>() + let mut t = frame_system::GenesisConfig::<Test>::default() + .build_storage() .unwrap(); pallet_identity::GenesisConfig::<Test> { @@ -226,7 +224,7 @@ pub fn new_test_ext(initial_identities_len: usize) -> sp_io::TestExternalities { .assimilate_storage(&mut t) .unwrap(); - frame_support::BasicExternalities::execute_with_storage(&mut t, || { + BasicExternalities::execute_with_storage(&mut t, || { // manually increment genesis identities sufficient counter // In real world, this is done by pallet-identity for i in 1..=initial_identities_len { diff --git a/pallets/identity/Cargo.toml b/pallets/identity/Cargo.toml index 156fa8e8a3b27178d6e3348e61ea902977933222..9a52d089679a833413c40423e020365998035bf6 100644 --- a/pallets/identity/Cargo.toml +++ b/pallets/identity/Cargo.toml @@ -11,70 +11,86 @@ version = '3.0.0' [features] default = ['std'] -runtime-benchmarks = ['frame-benchmarking/runtime-benchmarks'] +runtime-benchmarks = [ + 'frame-benchmarking/runtime-benchmarks', + 'frame-support/runtime-benchmarks', + 'frame-system/runtime-benchmarks', + 'sp-runtime/runtime-benchmarks', +] std = [ 'codec/std', 'frame-support/std', + 'scale-info/std', + 'serde/std', + 'frame-benchmarking?/std', + 'frame-support/std', 'frame-system/std', - 'frame-benchmarking/std', - 'serde', 'sp-core/std', + 'sp-io/std', 'sp-runtime/std', 'sp-std/std', + 'sp-keystore/std', + 'sp-state-machine/std', +] +try-runtime = [ + 'frame-support/try-runtime', + 'frame-system/try-runtime', + 'sp-runtime/try-runtime', ] -try-runtime = ['frame-support/try-runtime'] [package.metadata.docs.rs] +default-features = false targets = ['x86_64-unknown-linux-gnu'] +[build-dependencies] +substrate-wasm-builder = { git = "https://github.com/duniter/duniter-polkadot-sdk", branch = "duniter-substrate-v1.6.0" } + [dependencies] duniter-primitives = { path = "../../primitives/duniter", default-features = false } # crates.io -codec = { package = 'parity-scale-codec', version = "3.1.5", features = ['derive'], default-features = false } -impl-trait-for-tuples = "0.2.1" -scale-info = { version = "2.1.1", default-features = false, features = ["derive"] } -serde = { version = "1.0.101", features = ["derive"], optional = true } - +codec = { package = 'parity-scale-codec', version = "3.6.9", features = ['derive'], default-features = false } +impl-trait-for-tuples = { version = "0.2.2", default-features = false } +scale-info = { version = "2.10.0", default-features = false, features = ["derive"] } +serde = { version = "1.0.195", features = ["derive"], default-features = false } # substrate [dependencies.frame-benchmarking] default-features = false -git = 'https://github.com/duniter/substrate' +git = 'https://github.com/duniter/duniter-polkadot-sdk' optional = true -branch = 'duniter-substrate-v0.9.42' +branch = 'duniter-substrate-v1.6.0' [dependencies.frame-support] default-features = false -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' [dependencies.frame-system] default-features = false -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' [dependencies.sp-core] default-features = false -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' -[dependencies.sp-runtime] +[dependencies.sp-io] default-features = false -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' -[dependencies.sp-std] +[dependencies.sp-runtime] default-features = false -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' -[dependencies.sp-io] +[dependencies.sp-std] default-features = false -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' [dev-dependencies] -serde = '1.0.119' -sp-io = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42' } -sp-keystore = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42' } +sp-keystore = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +sp-state-machine = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } diff --git a/pallets/identity/src/benchmarking.rs b/pallets/identity/src/benchmarking.rs index f7ba053f612ba4e3b905f34dbe2ddc2b3d1f445a..0d4fe93e42ccc159f6b6c438857d078fb553a798 100644 --- a/pallets/identity/src/benchmarking.rs +++ b/pallets/identity/src/benchmarking.rs @@ -69,7 +69,7 @@ fn create_one_identity<T: Config>(owner_key: T::AccountId) -> Result<Account<T>, // Reset next_creatable_identity_on to add more identities with Alice <Identities<T>>::mutate_exists(T::IdtyIndex::from(1u32), |idty_val_opt| { if let Some(ref mut idty_val) = idty_val_opt { - idty_val.next_creatable_identity_on = T::BlockNumber::zero(); + idty_val.next_creatable_identity_on = BlockNumberFor::<T>::zero(); } }); Ok(Account { @@ -84,10 +84,10 @@ fn create_one_identity<T: Config>(owner_key: T::AccountId) -> Result<Account<T>, fn create_dummy_identity<T: Config>(i: u32) -> Result<(), &'static str> { let idty_index: T::IdtyIndex = i.into(); let owner_key: T::AccountId = account("Bob", i, SEED); - let next_scheduled = T::BlockNumber::zero(); + let next_scheduled = BlockNumberFor::<T>::zero(); let value = IdtyValue { data: Default::default(), - next_creatable_identity_on: T::BlockNumber::zero(), + next_creatable_identity_on: BlockNumberFor::<T>::zero(), old_owner_key: None, owner_key: owner_key.clone(), next_scheduled, @@ -155,7 +155,7 @@ benchmarks! { let account: Account<T> = create_one_identity(old_key.clone())?; // Change key a first time to add an old-old key - let genesis_hash = frame_system::Pallet::<T>::block_hash(T::BlockNumber::zero()); + let genesis_hash = frame_system::Pallet::<T>::block_hash(BlockNumberFor::<T>::zero()); let new_key_payload = IdtyIndexAccountIdPayload { genesis_hash: &genesis_hash, idty_index: account.index, @@ -170,7 +170,7 @@ benchmarks! { // Change key a second time to benchmark // The sufficients for the old_old key will drop to 0 during benchmark let caller_origin: <T as frame_system::Config>::RuntimeOrigin = RawOrigin::Signed(caller.clone()).into(); - let genesis_hash = frame_system::Pallet::<T>::block_hash(T::BlockNumber::zero()); + let genesis_hash = frame_system::Pallet::<T>::block_hash(BlockNumberFor::<T>::zero()); let new_key_payload = IdtyIndexAccountIdPayload { genesis_hash: &genesis_hash, idty_index: account.index, @@ -194,7 +194,7 @@ benchmarks! { // Change key // The sufficients for the old key will drop to 0 during benchmark (not for revoke, only for remove) - let genesis_hash = frame_system::Pallet::<T>::block_hash(T::BlockNumber::zero()); + let genesis_hash = frame_system::Pallet::<T>::block_hash(BlockNumberFor::<T>::zero()); let new_key_payload = IdtyIndexAccountIdPayload { genesis_hash: &genesis_hash, idty_index: account.index, @@ -206,7 +206,7 @@ benchmarks! { let signature = sr25519_sign(0.into(), &caller_public, &message).unwrap().into(); Pallet::<T>::change_owner_key(account.origin.clone(), caller.clone(), signature)?; - let genesis_hash = frame_system::Pallet::<T>::block_hash(T::BlockNumber::zero()); + let genesis_hash = frame_system::Pallet::<T>::block_hash(BlockNumberFor::<T>::zero()); let revocation_payload = RevocationPayload { genesis_hash: &genesis_hash, idty_index: account.index, @@ -255,7 +255,7 @@ benchmarks! { let bob_public = sr25519_generate(0.into(), None); let bob: T::AccountId = MultiSigner::Sr25519(bob_public).into_account().into(); frame_system::Pallet::<T>::inc_providers(&bob); - let genesis_hash = frame_system::Pallet::<T>::block_hash(T::BlockNumber::zero()); + let genesis_hash = frame_system::Pallet::<T>::block_hash(BlockNumberFor::<T>::zero()); let payload = ( LINK_IDTY_PAYLOAD_PREFIX, genesis_hash, T::IdtyIndex::one(), bob.clone(), ).encode(); @@ -308,21 +308,21 @@ benchmarks! { // --- prune identities prune_identities_noop { - assert!(IdentityChangeSchedule::<T>::try_get(T::BlockNumber::zero()).is_err()); - }: {Pallet::<T>::prune_identities(T::BlockNumber::zero());} + assert!(IdentityChangeSchedule::<T>::try_get(BlockNumberFor::<T>::zero()).is_err()); + }: {Pallet::<T>::prune_identities(BlockNumberFor::<T>::zero());} prune_identities_none { let idty_index: T::IdtyIndex = 100u32.into(); - IdentityChangeSchedule::<T>::append(T::BlockNumber::zero(), idty_index); - assert!(IdentityChangeSchedule::<T>::try_get(T::BlockNumber::zero()).is_ok()); + IdentityChangeSchedule::<T>::append(BlockNumberFor::<T>::zero(), idty_index); + assert!(IdentityChangeSchedule::<T>::try_get(BlockNumberFor::<T>::zero()).is_ok()); assert!(<Identities<T>>::try_get(idty_index).is_err()); - }: {Pallet::<T>::prune_identities(T::BlockNumber::zero());} + }: {Pallet::<T>::prune_identities(BlockNumberFor::<T>::zero());} prune_identities_err { let idty_index: T::IdtyIndex = 100u32.into(); create_dummy_identity::<T>(100u32)?; - IdentityChangeSchedule::<T>::append(T::BlockNumber::zero(), idty_index); - }: {Pallet::<T>::prune_identities(T::BlockNumber::zero());} + IdentityChangeSchedule::<T>::append(BlockNumberFor::<T>::zero(), idty_index); + }: {Pallet::<T>::prune_identities(BlockNumberFor::<T>::zero());} impl_benchmark_test_suite!( Pallet, diff --git a/pallets/identity/src/lib.rs b/pallets/identity/src/lib.rs index 2063481cd305399664ebe97fa5e45b6574cf65e5..59367032b7150ca80943e8e6d2ba6b090f764c52 100644 --- a/pallets/identity/src/lib.rs +++ b/pallets/identity/src/lib.rs @@ -36,7 +36,7 @@ pub use weights::WeightInfo; use crate::traits::*; use codec::Codec; -use frame_support::dispatch::Weight; +use frame_support::pallet_prelude::Weight; use sp_runtime::traits::{AtLeast32BitUnsigned, IdentifyAccount, One, Saturating, Verify, Zero}; use sp_std::fmt::Debug; use sp_std::prelude::*; @@ -70,26 +70,26 @@ pub mod pallet { /// Period during which the owner can confirm the new identity. // something like 2 days but this should be done quickly as the first certifier is helping #[pallet::constant] - type ConfirmPeriod: Get<Self::BlockNumber>; + type ConfirmPeriod: Get<BlockNumberFor<Self>>; /// Period before which the identity has to be validated (become member). // this is the 2 month period in v1 #[pallet::constant] - type ValidationPeriod: Get<Self::BlockNumber>; + type ValidationPeriod: Get<BlockNumberFor<Self>>; /// Period before which an identity who lost membership is automatically revoked. // this is the 1 year period in v1 #[pallet::constant] - type AutorevocationPeriod: Get<Self::BlockNumber>; + type AutorevocationPeriod: Get<BlockNumberFor<Self>>; /// Period after which a revoked identity is removed and the keys are freed. #[pallet::constant] - type DeletionPeriod: Get<Self::BlockNumber>; + type DeletionPeriod: Get<BlockNumberFor<Self>>; /// Minimum duration between two owner key changes. // to avoid stealing the identity without means to revoke #[pallet::constant] - type ChangeOwnerKeyPeriod: Get<Self::BlockNumber>; + type ChangeOwnerKeyPeriod: Get<BlockNumberFor<Self>>; /// Minimum duration between the creation of 2 identities by the same creator. // it should be greater or equal than the certification period in certification pallet #[pallet::constant] - type IdtyCreationPeriod: Get<Self::BlockNumber>; + type IdtyCreationPeriod: Get<BlockNumberFor<Self>>; /// Management of the authorizations of the different calls. /// The default implementation allows everything. type CheckIdtyCallAllowed: CheckIdtyCallAllowed<Self>; @@ -129,12 +129,12 @@ pub mod pallet { // GENESIS STUFF // - #[cfg_attr(feature = "std", derive(serde::Deserialize, serde::Serialize))] - #[derive(Encode, Decode, Clone, PartialEq, Eq)] + #[derive(Encode, Decode, Clone, PartialEq, serde::Serialize, serde::Deserialize)] + #[serde(deny_unknown_fields, bound(serialize = ""), bound(deserialize = ""))] pub struct GenesisIdty<T: Config> { pub index: T::IdtyIndex, pub name: IdtyName, - pub value: IdtyValue<T::BlockNumber, T::AccountId, T::IdtyData>, + pub value: IdtyValue<BlockNumberFor<T>, T::AccountId, T::IdtyData>, } #[pallet::genesis_config] @@ -142,7 +142,6 @@ pub mod pallet { pub identities: Vec<GenesisIdty<T>>, } - #[cfg(feature = "std")] impl<T: Config> Default for GenesisConfig<T> { fn default() -> Self { Self { @@ -152,7 +151,7 @@ pub mod pallet { } #[pallet::genesis_build] - impl<T: Config> GenesisBuild<T> for GenesisConfig<T> { + impl<T: Config> BuildGenesisConfig for GenesisConfig<T> { fn build(&self) { let mut names = sp_std::collections::btree_set::BTreeSet::new(); for idty in &self.identities { @@ -173,7 +172,7 @@ pub mod pallet { let _ = Pallet::<T>::get_next_idty_index(); // use instead custom provided index let idty_index = idty.index; - if idty.value.next_scheduled > T::BlockNumber::zero() { + if idty.value.next_scheduled > BlockNumberFor::<T>::zero() { <IdentityChangeSchedule<T>>::append(idty.value.next_scheduled, idty_index) } <Identities<T>>::insert(idty_index, idty.value.clone()); @@ -196,7 +195,7 @@ pub mod pallet { _, Twox64Concat, T::IdtyIndex, - IdtyValue<T::BlockNumber, T::AccountId, T::IdtyData>, + IdtyValue<BlockNumberFor<T>, T::AccountId, T::IdtyData>, OptionQuery, >; @@ -220,14 +219,14 @@ pub mod pallet { #[pallet::storage] #[pallet::getter(fn next_scheduled)] pub type IdentityChangeSchedule<T: Config> = - StorageMap<_, Twox64Concat, T::BlockNumber, Vec<T::IdtyIndex>, ValueQuery>; + StorageMap<_, Twox64Concat, BlockNumberFor<T>, Vec<T::IdtyIndex>, ValueQuery>; // HOOKS // #[pallet::hooks] impl<T: Config> Hooks<BlockNumberFor<T>> for Pallet<T> { - fn on_initialize(n: T::BlockNumber) -> Weight { - if n > T::BlockNumber::zero() { + fn on_initialize(n: BlockNumberFor<T>) -> Weight { + if n > BlockNumberFor::<T>::zero() { Self::prune_identities(n).saturating_add(T::WeightInfo::on_initialize()) } else { T::WeightInfo::on_initialize() @@ -309,7 +308,7 @@ pub mod pallet { idty_index, IdtyValue { data: Default::default(), - next_creatable_identity_on: T::BlockNumber::zero(), + next_creatable_identity_on: BlockNumberFor::<T>::zero(), old_owner_key: None, owner_key: owner_key.clone(), next_scheduled: Self::schedule_identity_change( @@ -426,7 +425,7 @@ pub mod pallet { None }; - let genesis_hash = frame_system::Pallet::<T>::block_hash(T::BlockNumber::zero()); + let genesis_hash = frame_system::Pallet::<T>::block_hash(BlockNumberFor::<T>::zero()); let new_key_payload = IdtyIndexAccountIdPayload { genesis_hash: &genesis_hash, idty_index, @@ -501,7 +500,7 @@ pub mod pallet { ); // then check payload signature - let genesis_hash = frame_system::Pallet::<T>::block_hash(T::BlockNumber::zero()); + let genesis_hash = frame_system::Pallet::<T>::block_hash(BlockNumberFor::<T>::zero()); let revocation_payload = RevocationPayload { genesis_hash, idty_index, @@ -569,7 +568,7 @@ pub mod pallet { let who = ensure_signed(origin)?; let idty_index = IdentityIndexOf::<T>::get(&who).ok_or(Error::<T>::IdtyIndexNotFound)?; - let genesis_hash = frame_system::Pallet::<T>::block_hash(T::BlockNumber::zero()); + let genesis_hash = frame_system::Pallet::<T>::block_hash(BlockNumberFor::<T>::zero()); let payload = IdtyIndexAccountIdPayload { genesis_hash: &genesis_hash, idty_index, @@ -642,7 +641,7 @@ pub mod pallet { pub fn membership_added(idty_index: T::IdtyIndex) { if let Some(mut idty_value) = Identities::<T>::get(idty_index) { Self::unschedule_identity_change(idty_index, idty_value.next_scheduled); - idty_value.next_scheduled = T::BlockNumber::zero(); + idty_value.next_scheduled = BlockNumberFor::<T>::zero(); if idty_value.status == IdtyStatus::Unvalidated { // only submit event first time, after that, only membership events are relevant Self::deposit_event(Event::IdtyValidated { idty_index }); @@ -731,7 +730,7 @@ pub mod pallet { } /// remove identities planned for removal at the given block - pub fn prune_identities(block_number: T::BlockNumber) -> Weight { + pub fn prune_identities(block_number: BlockNumberFor<T>) -> Weight { let mut total_weight = Weight::zero(); for idty_index in IdentityChangeSchedule::<T>::take(block_number) { @@ -774,9 +773,9 @@ pub mod pallet { /// change identity status and reschedule next action fn update_identity_status( idty_index: T::IdtyIndex, - mut idty_value: IdtyValue<T::BlockNumber, T::AccountId, T::IdtyData>, + mut idty_value: IdtyValue<BlockNumberFor<T>, T::AccountId, T::IdtyData>, new_status: IdtyStatus, - period: T::BlockNumber, + period: BlockNumberFor<T>, ) { Self::unschedule_identity_change(idty_index, idty_value.next_scheduled); idty_value.next_scheduled = Self::schedule_identity_change(idty_index, period); @@ -785,18 +784,19 @@ pub mod pallet { } /// unschedule identity change - fn unschedule_identity_change(idty_id: T::IdtyIndex, block_number: T::BlockNumber) { + fn unschedule_identity_change(idty_id: T::IdtyIndex, block_number: BlockNumberFor<T>) { let mut scheduled = IdentityChangeSchedule::<T>::get(block_number); if let Some(pos) = scheduled.iter().position(|x| *x == idty_id) { scheduled.swap_remove(pos); IdentityChangeSchedule::<T>::set(block_number, scheduled); } } + /// schedule identity change after given period fn schedule_identity_change( idty_id: T::IdtyIndex, - period: T::BlockNumber, - ) -> T::BlockNumber { + period: BlockNumberFor<T>, + ) -> BlockNumberFor<T> { let block_number = frame_system::pallet::Pallet::<T>::block_number(); let next_scheduled = block_number + period; IdentityChangeSchedule::<T>::append(next_scheduled, idty_id); @@ -809,7 +809,7 @@ pub mod pallet { fn check_create_identity( issuer_key: &T::AccountId, receiver_key: &T::AccountId, - block_number: T::BlockNumber, + block_number: BlockNumberFor<T>, ) -> Result<T::IdtyIndex, DispatchError> { // first get issuer details let creator_index = IdentityIndexOf::<T>::try_get(issuer_key) @@ -878,6 +878,7 @@ where Default::default() } } + /// mutate an account given a function of its data fn try_mutate_exists<R, E: From<sp_runtime::DispatchError>>( key: &T::AccountId, diff --git a/pallets/identity/src/mock.rs b/pallets/identity/src/mock.rs index 59242164b589612193f65cec8430810727653b3c..8941544143f6bcc790726e2f08def0c65d091efc 100644 --- a/pallets/identity/src/mock.rs +++ b/pallets/identity/src/mock.rs @@ -18,20 +18,20 @@ use super::*; use crate::{self as pallet_identity}; use frame_support::{ parameter_types, - traits::{Everything, GenesisBuild, OnFinalize, OnInitialize}, + traits::{Everything, OnFinalize, OnInitialize}, }; use frame_system as system; use sp_core::{Pair, H256}; use sp_keystore::{testing::MemoryKeystore, KeystoreExt}; +use sp_runtime::BuildStorage; use sp_runtime::{ - testing::Header, traits::{BlakeTwo256, IdentityLookup}, MultiSignature, MultiSigner, }; +use sp_state_machine::BasicExternalities; use std::sync::Arc; type Block = frame_system::mocking::MockBlock<Test>; -type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic<Test>; pub type Signature = MultiSignature; pub type AccountPublic = <Signature as Verify>::Signer; pub type AccountId = <AccountPublic as IdentifyAccount>::AccountId; @@ -43,13 +43,10 @@ fn account(id: u8) -> AccountId { // Configure a mock runtime to test the pallet. frame_support::construct_runtime!( - pub enum Test where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, + pub enum Test { - System: frame_system::{Pallet, Call, Config, Storage, Event<T>}, - Identity: pallet_identity::{Pallet, Call, Storage, Config<T>, Event<T>}, + System: frame_system, + Identity: pallet_identity, } ); @@ -59,30 +56,30 @@ parameter_types! { } impl system::Config for Test { + type AccountData = (); + type AccountId = AccountId; type BaseCallFilter = Everything; - type BlockWeights = (); + type Block = Block; + type BlockHashCount = BlockHashCount; type BlockLength = (); + type BlockWeights = (); type DbWeight = (); - type RuntimeOrigin = RuntimeOrigin; - type RuntimeCall = RuntimeCall; - type Index = u64; - type BlockNumber = u64; type Hash = H256; type Hashing = BlakeTwo256; - type AccountId = AccountId; type Lookup = IdentityLookup<Self::AccountId>; - type Header = Header; - type RuntimeEvent = RuntimeEvent; - type BlockHashCount = BlockHashCount; - type Version = (); - type PalletInfo = PalletInfo; - type AccountData = (); - type OnNewAccount = (); + type MaxConsumers = frame_support::traits::ConstU32<16>; + type Nonce = u64; type OnKilledAccount = (); - type SystemWeightInfo = (); - type SS58Prefix = SS58Prefix; + type OnNewAccount = (); type OnSetCode = (); - type MaxConsumers = frame_support::traits::ConstU32<16>; + type PalletInfo = PalletInfo; + type RuntimeCall = RuntimeCall; + type RuntimeEvent = RuntimeEvent; + type RuntimeOrigin = RuntimeOrigin; + type RuntimeTask = (); + type SS58Prefix = SS58Prefix; + type SystemWeightInfo = (); + type Version = (); } parameter_types! { @@ -102,33 +99,33 @@ impl pallet_identity::traits::IdtyNameValidator for IdtyNameValidatorTestImpl { } impl pallet_identity::Config for Test { + type AccountLinker = (); + type AutorevocationPeriod = AutorevocationPeriod; type ChangeOwnerKeyPeriod = ChangeOwnerKeyPeriod; + type CheckIdtyCallAllowed = (); type ConfirmPeriod = ConfirmPeriod; - type ValidationPeriod = ValidationPeriod; - type AutorevocationPeriod = AutorevocationPeriod; type DeletionPeriod = DeletionPeriod; - type CheckIdtyCallAllowed = (); type IdtyCreationPeriod = IdtyCreationPeriod; type IdtyData = (); - type IdtyNameValidator = IdtyNameValidatorTestImpl; type IdtyIndex = u64; - type AccountLinker = (); - type Signer = AccountPublic; - type Signature = Signature; + type IdtyNameValidator = IdtyNameValidatorTestImpl; type OnIdtyChange = (); type RuntimeEvent = RuntimeEvent; + type Signature = Signature; + type Signer = AccountPublic; + type ValidationPeriod = ValidationPeriod; type WeightInfo = (); } // Build genesis storage according to the mock runtime. pub fn new_test_ext(gen_conf: pallet_identity::GenesisConfig<Test>) -> sp_io::TestExternalities { - let mut t = frame_system::GenesisConfig::default() - .build_storage::<Test>() + let mut t = frame_system::GenesisConfig::<Test>::default() + .build_storage() .unwrap(); gen_conf.assimilate_storage(&mut t).unwrap(); - frame_support::BasicExternalities::execute_with_storage(&mut t, || { + BasicExternalities::execute_with_storage(&mut t, || { frame_system::Pallet::<Test>::inc_providers(&account(2)); frame_system::Pallet::<Test>::inc_providers(&account(3)); }); diff --git a/pallets/identity/src/types.rs b/pallets/identity/src/types.rs index f8bff333c804b2a17f0152703ea267861d45cc0e..e3c8b35dba622b34ed0f6d566c07fe1896db28ff 100644 --- a/pallets/identity/src/types.rs +++ b/pallets/identity/src/types.rs @@ -17,9 +17,9 @@ //! Various basic types for use in the identity pallet. use codec::{Decode, Encode}; +use core::primitive::str; use frame_support::pallet_prelude::*; use scale_info::TypeInfo; -#[cfg(feature = "std")] use serde::{Deserialize, Serialize}; use sp_std::vec::Vec; @@ -66,45 +66,43 @@ pub enum RemovalReason { } /// name of the identity, ascii encoded -#[derive(Encode, Decode, Default, Clone, PartialEq, Eq, PartialOrd, Ord, RuntimeDebug)] +#[derive( + Encode, + Decode, + Default, + Clone, + PartialEq, + Eq, + PartialOrd, + Ord, + RuntimeDebug, + Serialize, + Deserialize, + TypeInfo, +)] pub struct IdtyName(pub Vec<u8>); -/// implement scale string typeinfo for encoding -impl scale_info::TypeInfo for IdtyName { - type Identity = str; - - fn type_info() -> scale_info::Type { - Self::Identity::type_info() - } -} - -#[cfg(feature = "std")] impl From<&str> for IdtyName { fn from(s: &str) -> Self { Self(s.as_bytes().to_vec()) } } -#[cfg(feature = "std")] -impl serde::Serialize for IdtyName { - fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> { - std::str::from_utf8(&self.0) - .map_err(|e| serde::ser::Error::custom(format!("{:?}", e)))? - .serialize(serializer) - } -} - -#[cfg(feature = "std")] -impl<'de> serde::Deserialize<'de> for IdtyName { - fn deserialize<D: serde::Deserializer<'de>>(de: D) -> Result<Self, D::Error> { - Ok(Self(String::deserialize(de)?.as_bytes().to_vec())) - } -} - /// status of the identity // this is a kind of index to tell the state of the identity -#[cfg_attr(feature = "std", derive(Deserialize, Serialize))] -#[derive(Encode, Decode, Default, Clone, Copy, PartialEq, Eq, RuntimeDebug, TypeInfo)] +#[derive( + Encode, + Decode, + Default, + Clone, + Copy, + PartialEq, + Eq, + RuntimeDebug, + TypeInfo, + Deserialize, + Serialize, +)] pub enum IdtyStatus { /// created through a first certification but unconfirmed #[default] @@ -121,8 +119,7 @@ pub enum IdtyStatus { } /// identity value (as in key/value) -#[cfg_attr(feature = "std", derive(Debug, Deserialize, Serialize))] -#[derive(Encode, Decode, Clone, PartialEq, Eq, TypeInfo)] +#[derive(Serialize, Deserialize, Debug, Encode, Decode, Clone, PartialEq, Eq, TypeInfo)] pub struct IdtyValue<BlockNumber, AccountId, IdtyData> { /// data shared between pallets defined by runtime /// only contains first_eligible_ud in our case diff --git a/pallets/identity/src/weights.rs b/pallets/identity/src/weights.rs index ee07fdec978c74ce96b9b7f70f25c263b8e50fa5..879cbe3f40d0816d10ce88cb99d309200dbdf34f 100644 --- a/pallets/identity/src/weights.rs +++ b/pallets/identity/src/weights.rs @@ -48,6 +48,7 @@ impl WeightInfo for () { .saturating_add(RocksDbWeight::get().reads(14)) .saturating_add(RocksDbWeight::get().writes(12)) } + fn confirm_identity() -> Weight { // Proof Size summary in bytes: // Measured: `661` @@ -58,6 +59,7 @@ impl WeightInfo for () { .saturating_add(RocksDbWeight::get().reads(5)) .saturating_add(RocksDbWeight::get().writes(4)) } + fn change_owner_key() -> Weight { // Proof Size summary in bytes: // Measured: `837` @@ -68,6 +70,7 @@ impl WeightInfo for () { .saturating_add(RocksDbWeight::get().reads(7)) .saturating_add(RocksDbWeight::get().writes(5)) } + fn revoke_identity() -> Weight { // Proof Size summary in bytes: // Measured: `778` @@ -78,6 +81,7 @@ impl WeightInfo for () { .saturating_add(RocksDbWeight::get().reads(6)) .saturating_add(RocksDbWeight::get().writes(6)) } + fn prune_item_identities_names(i: u32) -> Weight { // Proof Size summary in bytes: // Measured: `0` @@ -89,6 +93,7 @@ impl WeightInfo for () { .saturating_add(Weight::from_parts(30_016_649, 0).saturating_mul(i.into())) .saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(i.into()))) } + fn fix_sufficients() -> Weight { // Proof Size summary in bytes: // Measured: `67` @@ -99,6 +104,7 @@ impl WeightInfo for () { .saturating_add(RocksDbWeight::get().reads(1)) .saturating_add(RocksDbWeight::get().writes(1)) } + fn link_account() -> Weight { // Proof Size summary in bytes: // Measured: `307` @@ -109,6 +115,7 @@ impl WeightInfo for () { .saturating_add(RocksDbWeight::get().reads(3)) .saturating_add(RocksDbWeight::get().writes(1)) } + fn on_initialize() -> Weight { // Proof Size summary in bytes: // Measured: `0` @@ -116,6 +123,7 @@ impl WeightInfo for () { // Minimum execution time: 4_529_000 picoseconds. Weight::from_parts(7_360_000, 0).saturating_add(Weight::from_parts(0, 0)) } + fn do_revoke_identity_noop() -> Weight { // Proof Size summary in bytes: // Measured: `269` @@ -125,6 +133,7 @@ impl WeightInfo for () { .saturating_add(Weight::from_parts(0, 3734)) .saturating_add(RocksDbWeight::get().reads(1)) } + fn do_revoke_identity() -> Weight { // Proof Size summary in bytes: // Measured: `1525` @@ -135,6 +144,7 @@ impl WeightInfo for () { .saturating_add(RocksDbWeight::get().reads(17)) .saturating_add(RocksDbWeight::get().writes(20)) } + fn do_remove_identity_noop() -> Weight { // Proof Size summary in bytes: // Measured: `269` @@ -144,6 +154,7 @@ impl WeightInfo for () { .saturating_add(Weight::from_parts(0, 3734)) .saturating_add(RocksDbWeight::get().reads(1)) } + fn do_remove_identity() -> Weight { // Proof Size summary in bytes: // Measured: `1432` @@ -154,6 +165,7 @@ impl WeightInfo for () { .saturating_add(RocksDbWeight::get().reads(16)) .saturating_add(RocksDbWeight::get().writes(22)) } + fn prune_identities_noop() -> Weight { // Proof Size summary in bytes: // Measured: `108` @@ -163,6 +175,7 @@ impl WeightInfo for () { .saturating_add(Weight::from_parts(0, 3573)) .saturating_add(RocksDbWeight::get().reads(1)) } + fn prune_identities_none() -> Weight { // Proof Size summary in bytes: // Measured: `292` @@ -173,6 +186,7 @@ impl WeightInfo for () { .saturating_add(RocksDbWeight::get().reads(2)) .saturating_add(RocksDbWeight::get().writes(1)) } + fn prune_identities_err() -> Weight { // Proof Size summary in bytes: // Measured: `1177` diff --git a/pallets/membership/Cargo.toml b/pallets/membership/Cargo.toml index 44216709603cb209103cc72440208b8131ddfa82..ea0bc3465aaf2d1f8e60243cf157f80e4a640850 100644 --- a/pallets/membership/Cargo.toml +++ b/pallets/membership/Cargo.toml @@ -12,83 +12,83 @@ version = '3.0.0' [features] default = ['std'] runtime-benchmarks = [ - "frame-benchmarking/runtime-benchmarks", + 'frame-benchmarking/runtime-benchmarks', + 'frame-support/runtime-benchmarks', + 'frame-system/runtime-benchmarks', + 'sp-runtime/runtime-benchmarks', ] std = [ + 'scale-info/std', + 'sp-membership/std', 'codec/std', + 'frame-benchmarking?/std', 'frame-support/std', 'frame-system/std', - 'frame-benchmarking/std', - 'serde', 'sp-core/std', - 'sp-membership/std', 'sp-runtime/std', 'sp-std/std', + 'sp-io/std', +] +try-runtime = [ + 'frame-support/try-runtime', + 'frame-system/try-runtime', + 'sp-runtime/try-runtime', + 'sp-membership/try-runtime', ] -try-runtime = ['frame-support/try-runtime'] [dependencies] -sp-membership = { path = "../../primitives/membership", default-features = false } # substrate -scale-info = { version = "2.1.1", default-features = false, features = ["derive"] } +scale-info = { version = "2.10.0", default-features = false, features = ["derive"] } +sp-membership = { path = "../../primitives/membership", default-features = false } [dependencies.codec] default-features = false features = ['derive'] package = 'parity-scale-codec' -version = "3.1.5" +version = "3.6.9" [dependencies.frame-benchmarking] default-features = false -git = 'https://github.com/duniter/substrate' +git = 'https://github.com/duniter/duniter-polkadot-sdk' optional = true -branch = 'duniter-substrate-v0.9.42' +branch = 'duniter-substrate-v1.6.0' [dependencies.frame-support] default-features = false -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' [dependencies.frame-system] default-features = false -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' -[dependencies.serde] -version = "1.0.101" -optional = true -features = ["derive"] +### DOC ### + +[package.metadata.docs.rs] +targets = ['x86_64-unknown-linux-gnu'] [dependencies.sp-core] default-features = false -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' [dependencies.sp-runtime] default-features = false -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' [dependencies.sp-std] default-features = false -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' - - -### DOC ### - -[package.metadata.docs.rs] -targets = ['x86_64-unknown-linux-gnu'] -[dev-dependencies.serde] -version = '1.0.119' - -### DEV ### +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' [dev-dependencies.maplit] +default-features = false version = '1.0.2' [dev-dependencies.sp-io] default-features = false -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' diff --git a/pallets/membership/src/benchmarking.rs b/pallets/membership/src/benchmarking.rs index 84216da894acd5049049f33b48ec40bf6d756317..a3475c7d031209aa5f8b2820e0e5a4536e139e88 100644 --- a/pallets/membership/src/benchmarking.rs +++ b/pallets/membership/src/benchmarking.rs @@ -34,7 +34,7 @@ benchmarks! { where_clause { where T::IdtyId: From<u32>, - <T as frame_system::Config>::BlockNumber: From<u32>, + BlockNumberFor<T>: From<u32>, } // TODO membership add and renewal should be included to distance on_new_session as worst case scenario @@ -52,7 +52,7 @@ benchmarks! { let mut idties: Vec<T::IdtyId> = Vec::new(); for j in 1..i+1 { let j: T::IdtyId = j.into(); - Membership::<T>::insert(j, MembershipData::<T::BlockNumber>::default()); + Membership::<T>::insert(j, MembershipData::<BlockNumberFor<T>>::default()); idties.push(j); } MembershipsExpireOn::<T>::insert(block_number, idties); diff --git a/pallets/membership/src/lib.rs b/pallets/membership/src/lib.rs index 16d30e9684e58ef81b495d14da40392af675c546..d1fb52e3598a9797020ef063cf4449eeaa44eb49 100644 --- a/pallets/membership/src/lib.rs +++ b/pallets/membership/src/lib.rs @@ -31,14 +31,13 @@ pub mod weights; pub use pallet::*; pub use weights::WeightInfo; -use frame_support::dispatch::Weight; +use frame_support::pallet_prelude::Weight; use frame_support::pallet_prelude::*; use sp_membership::traits::*; use sp_membership::MembershipData; use sp_runtime::traits::Zero; +use sp_std::collections::btree_map::BTreeMap; use sp_std::prelude::*; -#[cfg(feature = "std")] -use std::collections::BTreeMap; #[cfg(feature = "runtime-benchmarks")] pub trait SetupBenchmark<IdtyId, AccountId> { @@ -49,6 +48,7 @@ pub trait SetupBenchmark<IdtyId, AccountId> { #[cfg(feature = "runtime-benchmarks")] impl<IdtyId, AccountId> SetupBenchmark<IdtyId, AccountId> for () { fn force_valid_distance_status(_idty_id: &IdtyId) {} + fn add_cert(_issuer: &IdtyId, _receiver: &IdtyId) {} } @@ -94,11 +94,11 @@ pub mod pallet { /// Maximum life span of a single membership (in number of blocks) // (this could be renamed "validity" or "duration") #[pallet::constant] - type MembershipPeriod: Get<Self::BlockNumber>; + type MembershipPeriod: Get<BlockNumberFor<Self>>; /// Minimum delay to wait before renewing membership // i.e. asking for distance evaluation #[pallet::constant] - type MembershipRenewalPeriod: Get<Self::BlockNumber>; + type MembershipRenewalPeriod: Get<BlockNumberFor<Self>>; /// On event handler type OnEvent: OnEvent<Self::IdtyId>; /// Because this pallet emits events, it depends on the runtime's definition of an event. @@ -112,10 +112,9 @@ pub mod pallet { #[pallet::genesis_config] pub struct GenesisConfig<T: Config> { - pub memberships: BTreeMap<T::IdtyId, MembershipData<T::BlockNumber>>, + pub memberships: BTreeMap<T::IdtyId, MembershipData<BlockNumberFor<T>>>, } - #[cfg(feature = "std")] impl<T: Config> Default for GenesisConfig<T> { fn default() -> Self { Self { @@ -125,7 +124,7 @@ pub mod pallet { } #[pallet::genesis_build] - impl<T: Config> GenesisBuild<T> for GenesisConfig<T> { + impl<T: Config> BuildGenesisConfig for GenesisConfig<T> { fn build(&self) { for (idty_id, membership_data) in &self.memberships { MembershipsExpireOn::<T>::append(membership_data.expire_on, idty_id); @@ -140,14 +139,19 @@ pub mod pallet { // (expiration block for instance) #[pallet::storage] #[pallet::getter(fn membership)] - pub type Membership<T: Config> = - CountedStorageMap<_, Twox64Concat, T::IdtyId, MembershipData<T::BlockNumber>, OptionQuery>; + pub type Membership<T: Config> = CountedStorageMap< + _, + Twox64Concat, + T::IdtyId, + MembershipData<BlockNumberFor<T>>, + OptionQuery, + >; /// maps block number to the list of identity id set to expire at this block #[pallet::storage] #[pallet::getter(fn memberships_expire_on)] pub type MembershipsExpireOn<T: Config> = - StorageMap<_, Twox64Concat, T::BlockNumber, Vec<T::IdtyId>, ValueQuery>; + StorageMap<_, Twox64Concat, BlockNumberFor<T>, Vec<T::IdtyId>, ValueQuery>; // EVENTS // @@ -185,8 +189,8 @@ pub mod pallet { #[pallet::hooks] impl<T: Config> Hooks<BlockNumberFor<T>> for Pallet<T> { - fn on_initialize(n: T::BlockNumber) -> Weight { - if n > T::BlockNumber::zero() { + fn on_initialize(n: BlockNumberFor<T>) -> Weight { + if n > BlockNumberFor::<T>::zero() { T::WeightInfo::on_initialize().saturating_add(Self::expire_memberships(n)) } else { T::WeightInfo::on_initialize() @@ -203,7 +207,7 @@ pub mod pallet { // INTERNAL FUNCTIONS // impl<T: Config> Pallet<T> { /// unschedule membership expiry - fn unschedule_membership_expiry(idty_id: T::IdtyId, block_number: T::BlockNumber) { + fn unschedule_membership_expiry(idty_id: T::IdtyId, block_number: BlockNumberFor<T>) { let mut scheduled = MembershipsExpireOn::<T>::get(block_number); if let Some(pos) = scheduled.iter().position(|x| *x == idty_id) { @@ -211,8 +215,9 @@ pub mod pallet { MembershipsExpireOn::<T>::set(block_number, scheduled); } } + /// schedule membership expiry - fn insert_membership_and_schedule_expiry(idty_id: T::IdtyId) -> T::BlockNumber { + fn insert_membership_and_schedule_expiry(idty_id: T::IdtyId) -> BlockNumberFor<T> { let block_number = frame_system::pallet::Pallet::<T>::block_number(); let expire_on = block_number + T::MembershipPeriod::get(); @@ -237,7 +242,7 @@ pub mod pallet { /// check that membership can be renewed pub fn check_renew_membership( idty_id: T::IdtyId, - ) -> Result<MembershipData<T::BlockNumber>, DispatchError> { + ) -> Result<MembershipData<BlockNumberFor<T>>, DispatchError> { let membership_data = Membership::<T>::get(idty_id).ok_or(Error::<T>::MembershipNotFound)?; @@ -273,7 +278,7 @@ pub mod pallet { /// perform membership renewal fn do_renew_membership( idty_id: T::IdtyId, - membership_data: MembershipData<T::BlockNumber>, + membership_data: MembershipData<BlockNumberFor<T>>, ) { Self::unschedule_membership_expiry(idty_id, membership_data.expire_on); let expire_on = Self::insert_membership_and_schedule_expiry(idty_id); @@ -297,7 +302,7 @@ pub mod pallet { } /// perform the membership expiry scheduled at given block - pub fn expire_memberships(block_number: T::BlockNumber) -> Weight { + pub fn expire_memberships(block_number: BlockNumberFor<T>) -> Weight { let mut expired_idty_count = 0u32; for idty_id in MembershipsExpireOn::<T>::take(block_number) { diff --git a/pallets/membership/src/mock.rs b/pallets/membership/src/mock.rs index f197691276be7446d36a9a5fa910222c5337adb9..27070cd5ff7199212632dfebdfd7e537bdeab161 100644 --- a/pallets/membership/src/mock.rs +++ b/pallets/membership/src/mock.rs @@ -22,7 +22,6 @@ use frame_support::{ use frame_system as system; use sp_core::H256; use sp_runtime::{ - testing::Header, traits::{BlakeTwo256, ConvertInto, IdentityLookup}, BuildStorage, }; @@ -31,17 +30,12 @@ type AccountId = u64; type BlockNumber = u64; type Block = frame_system::mocking::MockBlock<Test>; pub type IdtyId = u64; -type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic<Test>; // Configure a mock runtime to test the pallet. frame_support::construct_runtime!( - pub enum Test where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, - { - System: frame_system::{Pallet, Call, Config, Storage, Event<T>}, - Membership: pallet_membership::{Pallet, Event<T>, Storage, Config<T>}, + pub enum Test{ + System: frame_system, + Membership: pallet_membership, } ); @@ -51,30 +45,30 @@ parameter_types! { } impl system::Config for Test { + type AccountData = (); + type AccountId = AccountId; type BaseCallFilter = Everything; - type BlockWeights = (); + type Block = Block; + type BlockHashCount = BlockHashCount; type BlockLength = (); + type BlockWeights = (); type DbWeight = (); - type RuntimeOrigin = RuntimeOrigin; - type RuntimeCall = RuntimeCall; - type Index = u64; - type BlockNumber = BlockNumber; type Hash = H256; type Hashing = BlakeTwo256; - type AccountId = AccountId; type Lookup = IdentityLookup<Self::AccountId>; - type Header = Header; - type RuntimeEvent = RuntimeEvent; - type BlockHashCount = BlockHashCount; - type Version = (); - type PalletInfo = PalletInfo; - type AccountData = (); - type OnNewAccount = (); + type MaxConsumers = frame_support::traits::ConstU32<16>; + type Nonce = u64; type OnKilledAccount = (); - type SystemWeightInfo = (); - type SS58Prefix = SS58Prefix; + type OnNewAccount = (); type OnSetCode = (); - type MaxConsumers = frame_support::traits::ConstU32<16>; + type PalletInfo = PalletInfo; + type RuntimeCall = RuntimeCall; + type RuntimeEvent = RuntimeEvent; + type RuntimeOrigin = RuntimeOrigin; + type RuntimeTask = (); + type SS58Prefix = SS58Prefix; + type SystemWeightInfo = (); + type Version = (); } parameter_types! { @@ -83,22 +77,22 @@ parameter_types! { } impl pallet_membership::Config for Test { + type AccountIdOf = ConvertInto; + #[cfg(feature = "runtime-benchmarks")] + type BenchmarkSetupHandler = (); type CheckMembershipOpAllowed = (); type IdtyId = IdtyId; type IdtyIdOf = ConvertInto; - type AccountIdOf = ConvertInto; type MembershipPeriod = MembershipPeriod; type MembershipRenewalPeriod = MembershipRenewalPeriod; type OnEvent = (); type RuntimeEvent = RuntimeEvent; type WeightInfo = (); - #[cfg(feature = "runtime-benchmarks")] - type BenchmarkSetupHandler = (); } // Build genesis storage according to the mock runtime. pub fn new_test_ext(gen_conf: pallet_membership::GenesisConfig<Test>) -> sp_io::TestExternalities { - GenesisConfig { + RuntimeGenesisConfig { system: SystemConfig::default(), membership: gen_conf, } diff --git a/pallets/membership/src/weights.rs b/pallets/membership/src/weights.rs index e8024faf080c4e3e7c83c6905f7d4717cf894a9e..e5ad978271dbdac611349160cf1b8eb0c26fb97a 100644 --- a/pallets/membership/src/weights.rs +++ b/pallets/membership/src/weights.rs @@ -33,6 +33,7 @@ impl WeightInfo for () { // Minimum execution time: 4_012_000 picoseconds. Weight::from_parts(4_629_000, 0).saturating_add(Weight::from_parts(0, 0)) } + fn expire_memberships(i: u32) -> Weight { // Proof Size summary in bytes: // Measured: `567 + i * (23 ±0)` diff --git a/pallets/offences/Cargo.toml b/pallets/offences/Cargo.toml index e3214bab5c2970dbe70dcce52c909402d24c49d8..fb7737eb17f8d327c4af81e702b38c6a6694e51c 100644 --- a/pallets/offences/Cargo.toml +++ b/pallets/offences/Cargo.toml @@ -13,20 +13,19 @@ readme = "README.md" targets = ["x86_64-unknown-linux-gnu"] [dependencies] -codec = { package = "parity-scale-codec", version = "3.1.5", features = ["derive"], default-features = false } -log = { version = "0.4.17", default-features = false } -scale-info = { version = "2.1.1", default-features = false, features = ["derive"] } -serde = { version = "1.0.101", default-features = false, optional = true } -frame-support = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -frame-system = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -pallet-balances = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -sp-runtime = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -sp-staking = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -sp-std = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } +codec = { package = "parity-scale-codec", version = "3.6.9", features = ["derive"], default-features = false } +log = { version = "0.4.20", default-features = false } +scale-info = { version = "2.10.0", default-features = false, features = ["derive"] } +frame-support = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +frame-system = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +pallet-balances = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +sp-runtime = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +sp-staking = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +sp-std = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } [dev-dependencies] -sp-core = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -sp-io = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42' } +sp-core = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +sp-io = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } [features] default = ["std"] @@ -37,10 +36,22 @@ std = [ "log/std", "pallet-balances/std", "scale-info/std", - "serde", "sp-runtime/std", "sp-staking/std", "sp-std/std", + "sp-io/std", + "sp-core/std", +] +runtime-benchmarks = [ + "frame-support/runtime-benchmarks", + "frame-system/runtime-benchmarks", + "pallet-balances/runtime-benchmarks", + "sp-runtime/runtime-benchmarks", + "sp-staking/runtime-benchmarks", +] +try-runtime = [ + 'frame-support/try-runtime', + 'frame-system/try-runtime', + 'pallet-balances/runtime-benchmarks', + 'sp-runtime/try-runtime', ] -runtime-benchmarks = [] -try-runtime = ["frame-support/try-runtime"] diff --git a/pallets/offences/src/mock.rs b/pallets/offences/src/mock.rs index 57f8e73990729b2822f1b515b9f4059fe94d44de..11b2b4109bf36dbc31dca713ee06fe3ba95bccbd 100644 --- a/pallets/offences/src/mock.rs +++ b/pallets/offences/src/mock.rs @@ -25,8 +25,8 @@ use frame_support::{ weights::{constants::RocksDbWeight, Weight}, }; use sp_core::H256; +use sp_runtime::BuildStorage; use sp_runtime::{ - testing::Header, traits::{BlakeTwo256, IdentityLookup}, Perbill, }; @@ -54,56 +54,51 @@ impl<Reporter, Offender> pallet_offences::OnOffenceHandler<Reporter, Offender, W } } -type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic<Runtime>; type Block = frame_system::mocking::MockBlock<Runtime>; frame_support::construct_runtime!( - pub struct Runtime where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, - { - System: frame_system::{Pallet, Call, Config, Storage, Event<T>}, - Offences: pallet_offences::{Pallet, Storage, Event}, + pub struct Runtime { + System: frame_system, + Offences: pallet_offences, } ); impl frame_system::Config for Runtime { + type AccountData = (); + type AccountId = u64; type BaseCallFilter = frame_support::traits::Everything; - type BlockWeights = (); + type Block = Block; + type BlockHashCount = ConstU64<250>; type BlockLength = (); + type BlockWeights = (); type DbWeight = RocksDbWeight; - type RuntimeOrigin = RuntimeOrigin; - type Index = u64; - type BlockNumber = u64; - type RuntimeCall = RuntimeCall; type Hash = H256; type Hashing = BlakeTwo256; - type AccountId = u64; type Lookup = IdentityLookup<Self::AccountId>; - type Header = Header; - type RuntimeEvent = RuntimeEvent; - type BlockHashCount = ConstU64<250>; - type Version = (); - type PalletInfo = PalletInfo; - type AccountData = (); - type OnNewAccount = (); + type MaxConsumers = ConstU32<16>; + type Nonce = u64; type OnKilledAccount = (); - type SystemWeightInfo = (); - type SS58Prefix = (); + type OnNewAccount = (); type OnSetCode = (); - type MaxConsumers = ConstU32<16>; + type PalletInfo = PalletInfo; + type RuntimeCall = RuntimeCall; + type RuntimeEvent = RuntimeEvent; + type RuntimeOrigin = RuntimeOrigin; + type RuntimeTask = (); + type SS58Prefix = (); + type SystemWeightInfo = (); + type Version = (); } impl Config for Runtime { - type RuntimeEvent = RuntimeEvent; type IdentificationTuple = u64; type OnOffenceHandler = OnOffenceHandler; + type RuntimeEvent = RuntimeEvent; } pub fn new_test_ext() -> sp_io::TestExternalities { - let t = frame_system::GenesisConfig::default() - .build_storage::<Runtime>() + let t = frame_system::GenesisConfig::<Runtime>::default() + .build_storage() .unwrap(); let mut ext = sp_io::TestExternalities::new(t); ext.execute_with(|| System::set_block_number(1)); @@ -131,9 +126,10 @@ pub struct Offence { } impl pallet_offences::Offence<u64> for Offence { - const ID: pallet_offences::Kind = KIND; type TimeSlot = u128; + const ID: pallet_offences::Kind = KIND; + fn offenders(&self) -> Vec<u64> { self.offenders.clone() } diff --git a/pallets/oneshot-account/Cargo.toml b/pallets/oneshot-account/Cargo.toml index fc39c81a38c85552c976c863ca81423ac3d36dd3..b3d33e6ff2fba1e35f7a984205b93a1a8d7424fe 100644 --- a/pallets/oneshot-account/Cargo.toml +++ b/pallets/oneshot-account/Cargo.toml @@ -12,83 +12,90 @@ version = '3.0.0' [features] default = ['std'] runtime-benchmarks = [ - "frame-benchmarking/runtime-benchmarks", - "pallet-balances", + "frame-benchmarking/runtime-benchmarks", + "frame-support/runtime-benchmarks", + "frame-system/runtime-benchmarks", + "pallet-balances/runtime-benchmarks", + "sp-runtime/runtime-benchmarks", +] +try-runtime = [ + 'frame-support/try-runtime', + 'frame-system/try-runtime', + 'pallet-balances/runtime-benchmarks', + 'sp-runtime/try-runtime', ] std = [ 'codec/std', + 'log/std', + 'pallet-balances/std', + 'scale-info/std', 'frame-support/std', 'frame-system/std', - 'frame-benchmarking/std', + 'frame-benchmarking?/std', 'sp-core/std', 'sp-io/std', 'sp-runtime/std', 'sp-std/std', + 'pallet-transaction-payment/std', ] -try-runtime = ['frame-support/try-runtime'] [dependencies] # crates.io -codec = { package = 'parity-scale-codec', version = "3.1.5", default-features = false, features = ["derive"] } -log = { version = "0.4.14", default-features = false } -scale-info = { version = "2.1.1", default-features = false, features = ["derive"] } +codec = { package = 'parity-scale-codec', version = "3.6.9", default-features = false, features = ["derive"] } +log = { version = "0.4.20", default-features = false } # benchmarks -pallet-balances = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', optional = true, default-features = false } +pallet-balances = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', optional = true, default-features = false } +scale-info = { version = "2.10.0", default-features = false, features = ["derive"] } # substrate [dependencies.frame-benchmarking] default-features = false -git = 'https://github.com/duniter/substrate' +git = 'https://github.com/duniter/duniter-polkadot-sdk' optional = true -branch = 'duniter-substrate-v0.9.42' +branch = 'duniter-substrate-v1.6.0' [dependencies.frame-support] default-features = false -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' [dependencies.frame-system] default-features = false -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' [dependencies.pallet-transaction-payment] default-features = false -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' [dependencies.sp-core] default-features = false -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' [dependencies.sp-io] default-features = false -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' [dependencies.sp-runtime] default-features = false -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' - -[dependencies.sp-std] -default-features = false -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' - +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' ### DOC ### [package.metadata.docs.rs] +default-features = false targets = ['x86_64-unknown-linux-gnu'] -### DEV ### - -[dev-dependencies.sp-io] -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' +[dependencies.sp-std] +default-features = false +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' [dev-dependencies.pallet-balances] -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' +default-features = false +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' diff --git a/pallets/oneshot-account/src/benchmarking.rs b/pallets/oneshot-account/src/benchmarking.rs index 69bdf381d344f3726d3a2d7dd68c6f7eca0554fc..dcc72ff2ef144d8b1474d61aded1734d33a796f3 100644 --- a/pallets/oneshot-account/src/benchmarking.rs +++ b/pallets/oneshot-account/src/benchmarking.rs @@ -71,7 +71,7 @@ benchmarks! { let _ = T::Currency::make_free_balance_be(&recipient, existential_deposit.into()); }: _( RawOrigin::Signed(caller.clone()), - T::BlockNumber::zero(), + BlockNumberFor::<T>::zero(), Account::<<T::Lookup as StaticLookup>::Source>::Normal(recipient_lookup) ) verify { @@ -104,7 +104,7 @@ benchmarks! { let _ = T::Currency::make_free_balance_be(&recipient2, existential_deposit.into()); }: _( RawOrigin::Signed(caller.clone()), - T::BlockNumber::zero(), + BlockNumberFor::<T>::zero(), Account::<<T::Lookup as StaticLookup>::Source>::Normal(recipient1_lookup), Account::<<T::Lookup as StaticLookup>::Source>::Normal(recipient2_lookup), existential_deposit.into() diff --git a/pallets/oneshot-account/src/check_nonce.rs b/pallets/oneshot-account/src/check_nonce.rs index fc2103a1655309b14b7428a0ae20bf9f7a449b47..83bd7494fe4c7ce9408d163b904352bcc104873e 100644 --- a/pallets/oneshot-account/src/check_nonce.rs +++ b/pallets/oneshot-account/src/check_nonce.rs @@ -53,9 +53,10 @@ where T::RuntimeCall: Dispatchable<Info = DispatchInfo> + IsSubType<crate::Call<T>>, { type AccountId = <T as frame_system::Config>::AccountId; - type Call = <T as frame_system::Config>::RuntimeCall; type AdditionalSigned = (); + type Call = <T as frame_system::Config>::RuntimeCall; type Pre = (); + const IDENTIFIER: &'static str = "CheckNonce"; fn additional_signed(&self) -> sp_std::result::Result<(), TransactionValidityError> { diff --git a/pallets/oneshot-account/src/lib.rs b/pallets/oneshot-account/src/lib.rs index acee3cd7aa50be986e44de8049c0834ab0282fa0..0c86b3ce425d5bd0028745615e0d3d3a7f7db50c 100644 --- a/pallets/oneshot-account/src/lib.rs +++ b/pallets/oneshot-account/src/lib.rs @@ -162,6 +162,7 @@ pub mod pallet { Ok(()) } + /// Consume a oneshot account and transfer its balance to an account /// /// - `block_height`: Must be a recent block number. The limit is `BlockHashCount` in the past. (this is to prevent replay attacks) @@ -171,7 +172,7 @@ pub mod pallet { #[pallet::weight(T::WeightInfo::consume_oneshot_account())] pub fn consume_oneshot_account( origin: OriginFor<T>, - block_height: T::BlockNumber, + block_height: BlockNumberFor<T>, dest: Account<<T::Lookup as StaticLookup>::Source>, ) -> DispatchResult { let transactor = ensure_signed(origin)?; @@ -216,6 +217,7 @@ pub mod pallet { Ok(()) } + /// Consume a oneshot account then transfer some amount to an account, /// and the remaining amount to another account. /// @@ -230,7 +232,7 @@ pub mod pallet { #[pallet::weight(T::WeightInfo::consume_oneshot_account_with_remaining())] pub fn consume_oneshot_account_with_remaining( origin: OriginFor<T>, - block_height: T::BlockNumber, + block_height: BlockNumberFor<T>, dest: Account<<T::Lookup as StaticLookup>::Source>, remaining_to: Account<<T::Lookup as StaticLookup>::Source>, #[pallet::compact] balance: <T::Currency as Currency<T::AccountId>>::Balance, @@ -328,6 +330,7 @@ where { type Balance = <T::Currency as Currency<T::AccountId>>::Balance; type LiquidityInfo = Option<<T::Currency as Currency<T::AccountId>>::NegativeImbalance>; + fn withdraw_fee( who: &T::AccountId, call: &T::RuntimeCall, @@ -364,6 +367,7 @@ where T::InnerOnChargeTransaction::withdraw_fee(who, call, dispatch_info, fee, tip) } } + fn correct_and_deposit_fee( who: &T::AccountId, dispatch_info: &DispatchInfoOf<T::RuntimeCall>, diff --git a/pallets/oneshot-account/src/mock.rs b/pallets/oneshot-account/src/mock.rs index 4353000adf02643d8493bc9f51b9e7d2995cdda7..7e35d0efe45e8841223925ce63d38682028f286d 100644 --- a/pallets/oneshot-account/src/mock.rs +++ b/pallets/oneshot-account/src/mock.rs @@ -20,27 +20,22 @@ use frame_system as system; use pallet_transaction_payment::CurrencyAdapter; use sp_core::{ConstU32, H256}; use sp_runtime::{ - testing::Header, traits::{BlakeTwo256, IdentityLookup}, BuildStorage, }; use sp_std::convert::{TryFrom, TryInto}; type Balance = u64; -type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic<Test>; type Block = frame_system::mocking::MockBlock<Test>; // Configure a mock runtime to test the pallet. frame_support::construct_runtime!( - pub enum Test where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, + pub enum Test { - System: frame_system::{Pallet, Call, Config, Storage, Event<T>}, - Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>}, - TransactionPayment: pallet_transaction_payment::{Pallet, Storage, Event<T>}, - OneshotAccount: pallet_oneshot_account::{Pallet, Call, Storage, Event<T>}, + System: frame_system, + Balances: pallet_balances, + TransactionPayment: pallet_transaction_payment, + OneshotAccount: pallet_oneshot_account, } ); @@ -50,30 +45,30 @@ parameter_types! { } impl system::Config for Test { + type AccountData = pallet_balances::AccountData<Balance>; + type AccountId = u64; type BaseCallFilter = Everything; - type BlockWeights = (); + type Block = Block; + type BlockHashCount = BlockHashCount; type BlockLength = (); + type BlockWeights = (); type DbWeight = (); - type RuntimeOrigin = RuntimeOrigin; - type RuntimeCall = RuntimeCall; - type Index = u64; - type BlockNumber = u64; type Hash = H256; type Hashing = BlakeTwo256; - type AccountId = u64; type Lookup = IdentityLookup<Self::AccountId>; - type Header = Header; - type RuntimeEvent = RuntimeEvent; - type BlockHashCount = BlockHashCount; - type Version = (); - type PalletInfo = PalletInfo; - type AccountData = pallet_balances::AccountData<Balance>; - type OnNewAccount = (); + type MaxConsumers = frame_support::traits::ConstU32<16>; + type Nonce = u64; type OnKilledAccount = (); - type SystemWeightInfo = (); - type SS58Prefix = SS58Prefix; + type OnNewAccount = (); type OnSetCode = (); - type MaxConsumers = frame_support::traits::ConstU32<16>; + type PalletInfo = PalletInfo; + type RuntimeCall = RuntimeCall; + type RuntimeEvent = RuntimeEvent; + type RuntimeOrigin = RuntimeOrigin; + type RuntimeTask = (); + type SS58Prefix = SS58Prefix; + type SystemWeightInfo = (); + type Version = (); } parameter_types! { @@ -82,27 +77,28 @@ parameter_types! { } impl pallet_balances::Config for Test { + type AccountStore = System; type Balance = Balance; type DustRemoval = (); type ExistentialDeposit = ExistentialDeposit; - type AccountStore = System; - type WeightInfo = pallet_balances::weights::SubstrateWeight<Test>; + type FreezeIdentifier = (); + type MaxFreezes = ConstU32<0>; + type MaxHolds = ConstU32<0>; type MaxLocks = MaxLocks; type MaxReserves = (); type ReserveIdentifier = [u8; 8]; type RuntimeEvent = RuntimeEvent; - type HoldIdentifier = (); - type FreezeIdentifier = (); - type MaxHolds = ConstU32<0>; - type MaxFreezes = ConstU32<0>; + type RuntimeFreezeReason = (); + type RuntimeHoldReason = (); + type WeightInfo = pallet_balances::weights::SubstrateWeight<Test>; } impl pallet_transaction_payment::Config for Test { - type RuntimeEvent = RuntimeEvent; + type FeeMultiplierUpdate = (); + type LengthToFee = IdentityFee<u64>; type OnChargeTransaction = OneshotAccount; type OperationalFeeMultiplier = frame_support::traits::ConstU8<5>; + type RuntimeEvent = RuntimeEvent; type WeightToFee = IdentityFee<u64>; - type LengthToFee = IdentityFee<u64>; - type FeeMultiplierUpdate = (); } impl pallet_oneshot_account::Config for Test { type Currency = Balances; @@ -120,9 +116,10 @@ impl frame_support::traits::OnUnbalanced<NegativeImbalance> for HandleFees { // Build genesis storage according to the mock runtime. #[allow(dead_code)] pub fn new_test_ext() -> sp_io::TestExternalities { - GenesisConfig { + RuntimeGenesisConfig { system: SystemConfig::default(), balances: BalancesConfig::default(), // FIXME (explicit absence of oneshot account in genesis) + transaction_payment: TransactionPaymentConfig::default(), } .build_storage() .unwrap() diff --git a/pallets/oneshot-account/src/weights.rs b/pallets/oneshot-account/src/weights.rs index 5308ff1d06526f0cdea54719c84ff08d1dc2cd9c..f8fabe3ccfb93156edfcdb2f75d8c2bd71d6d725 100644 --- a/pallets/oneshot-account/src/weights.rs +++ b/pallets/oneshot-account/src/weights.rs @@ -33,6 +33,7 @@ impl WeightInfo for () { .saturating_add(RocksDbWeight::get().reads(1)) .saturating_add(RocksDbWeight::get().writes(1)) } + // Storage: OneshotAccount OneshotAccounts (r:1 w:1) // Storage: System BlockHash (r:1 w:0) // Storage: System Account (r:1 w:1) @@ -41,6 +42,7 @@ impl WeightInfo for () { .saturating_add(RocksDbWeight::get().reads(3)) .saturating_add(RocksDbWeight::get().writes(2)) } + // Storage: OneshotAccount OneshotAccounts (r:1 w:1) // Storage: System BlockHash (r:1 w:0) // Storage: System Account (r:2 w:2) diff --git a/pallets/provide-randomness/Cargo.toml b/pallets/provide-randomness/Cargo.toml index b5d6f5b286de75281c3ecc5d929c4e40c9a3bad9..e845c2d85f54f636d21780e00515431819c30492 100644 --- a/pallets/provide-randomness/Cargo.toml +++ b/pallets/provide-randomness/Cargo.toml @@ -11,71 +11,83 @@ version = '3.0.0' [features] default = ['std'] runtime-benchmarks = [ - 'frame-benchmarking/runtime-benchmarks', - 'pallet-balances', + "frame-support/runtime-benchmarks", + "frame-system/runtime-benchmarks", + "pallet-balances/runtime-benchmarks", + "frame-benchmarking/runtime-benchmarks", + "sp-runtime/runtime-benchmarks", +] +try-runtime = [ + 'frame-support/try-runtime', + 'frame-system/try-runtime', + 'pallet-balances/runtime-benchmarks', + 'sp-runtime/try-runtime', ] std = [ 'codec/std', + 'scale-info/std', + 'pallet-balances/std', 'frame-support/std', 'frame-system/std', - 'frame-benchmarking/std', + 'sp-runtime/std', + 'frame-benchmarking?/std', "sp-core/std", "sp-io/std", "sp-std/std", ] -try-runtime = ['frame-support/try-runtime'] [dependencies] # substrate -scale-info = { version = "2.1.1", default-features = false, features = ["derive"] } +scale-info = { version = "2.10.0", default-features = false, features = ["derive"] } # benchmarks -pallet-balances = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', optional = true, default-features = false } +pallet-balances = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', optional = true, default-features = false } [dependencies.codec] default-features = false features = ['derive'] package = 'parity-scale-codec' -version = "3.1.5" +version = "3.6.9" [dependencies.frame-benchmarking] default-features = false -git = 'https://github.com/duniter/substrate' +git = 'https://github.com/duniter/duniter-polkadot-sdk' optional = true -branch = 'duniter-substrate-v0.9.42' +branch = 'duniter-substrate-v1.6.0' [dependencies.frame-support] default-features = false -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' [dependencies.frame-system] default-features = false -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' [dependencies.sp-core] default-features = false -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' [dependencies.sp-io] default-features = false -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' [dependencies.sp-std] default-features = false -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' [dependencies.sp-runtime] default-features = false -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' ### DOC ### [package.metadata.docs.rs] -targets = ['x86_64-unknown-linux-gnu'] \ No newline at end of file +default-features = false +targets = ['x86_64-unknown-linux-gnu'] diff --git a/pallets/provide-randomness/src/benchmarking.rs b/pallets/provide-randomness/src/benchmarking.rs index cbbf0f685865f8549c85e87573ea2fbcb528a984..56dfe1590f3fb824e454a8dda11fba9120bc6881 100644 --- a/pallets/provide-randomness/src/benchmarking.rs +++ b/pallets/provide-randomness/src/benchmarking.rs @@ -23,6 +23,7 @@ use frame_support::ensure; use frame_support::pallet_prelude::IsType; use frame_support::sp_runtime::{traits::One, Saturating}; use frame_support::traits::{Currency, Get, OnInitialize}; +use frame_system::pallet_prelude::BlockNumberFor; use frame_system::RawOrigin; use sp_core::H256; @@ -64,7 +65,7 @@ benchmarks! { T: pallet_balances::Config, T::Balance: From<u64>, <T::Currency as Currency<T::AccountId>>::Balance: IsType<T::Balance>, - T::BlockNumber: From<u32>, + BlockNumberFor<T>: From<u32>, } request { // Get account @@ -94,7 +95,7 @@ benchmarks! { core::mem::replace(next_in, next_in.saturating_sub(1)) }); ensure!(next_epoch_hook_in != 1, "Will be next epoch."); - }: { Pallet::<T>::on_initialize(T::BlockNumber::one()); } + }: { Pallet::<T>::on_initialize(BlockNumberFor::<T>::one()); } verify { ensure!(RequestsIds::<T>::count() == 0, "List not processed."); ensure!(RequestsReadyAtNextBlock::<T>::get().is_empty(), "List not processed."); diff --git a/pallets/provide-randomness/src/lib.rs b/pallets/provide-randomness/src/lib.rs index 5cce15f702abab7aa977737757f319044380d5e9..b6c36c3454f54e2da6e22f1b374d14b0e5a71bee 100644 --- a/pallets/provide-randomness/src/lib.rs +++ b/pallets/provide-randomness/src/lib.rs @@ -84,9 +84,9 @@ pub mod pallet { /// Handler for the unbalanced reduction when the requestor pays fees. type OnUnbalanced: OnUnbalanced<NegativeImbalanceOf<Self>>; /// A safe source of randomness from the parent block - type ParentBlockRandomness: Randomness<Option<H256>, Self::BlockNumber>; + type ParentBlockRandomness: Randomness<Option<H256>, BlockNumberFor<Self>>; /// A safe source of randomness from one epoch ago - type RandomnessFromOneEpochAgo: Randomness<H256, Self::BlockNumber>; + type RandomnessFromOneEpochAgo: Randomness<H256, BlockNumberFor<Self>>; /// The overarching event type. type RuntimeEvent: From<Event> + IsType<<Self as frame_system::Config>::RuntimeEvent>; /// Type representing the weight of this pallet @@ -171,7 +171,7 @@ pub mod pallet { #[pallet::hooks] impl<T: Config> Hooks<BlockNumberFor<T>> for Pallet<T> { - fn on_initialize(_: T::BlockNumber) -> Weight { + fn on_initialize(_: BlockNumberFor<T>) -> Weight { // Overhead to process an empty request let mut total_weight = T::WeightInfo::on_initialize(0); @@ -234,9 +234,11 @@ pub mod pallet { // Apply phase Ok(Self::apply_request(randomness_type, salt)) } + pub fn force_request(randomness_type: RandomnessType, salt: H256) -> RequestId { Self::apply_request(randomness_type, salt) } + pub fn on_new_epoch() { NexEpochHookIn::<T>::put(5) } @@ -255,6 +257,7 @@ pub mod pallet { T::OnUnbalanced::on_unbalanced(imbalance); Ok(()) } + fn apply_request(randomness_type: RandomnessType, salt: H256) -> RequestId { let request_id = RequestIdProvider::<T>::mutate(|next_request_id| { core::mem::replace(next_request_id, next_request_id.saturating_add(1)) diff --git a/pallets/provide-randomness/src/weights.rs b/pallets/provide-randomness/src/weights.rs index be2f03e8710d8f6e329d3e29d40e5320a8894e2d..94e99db3b570df1fadbe035cb906439fa3c8d66a 100644 --- a/pallets/provide-randomness/src/weights.rs +++ b/pallets/provide-randomness/src/weights.rs @@ -39,6 +39,7 @@ impl WeightInfo for () { .saturating_add(RocksDbWeight::get().reads(6 as u64)) .saturating_add(RocksDbWeight::get().writes(4 as u64)) } + // Storage: ProvideRandomness RequestsReadyAtNextBlock (r:1 w:1) // Storage: Babe AuthorVrfRandomness (r:1 w:0) // Storage: ProvideRandomness RequestsIds (r:1 w:1) @@ -56,6 +57,7 @@ impl WeightInfo for () { .saturating_add(RocksDbWeight::get().writes(3 as u64)) .saturating_add(RocksDbWeight::get().writes((1 as u64).saturating_mul(i as u64))) } + fn on_initialize_epoch(i: u32) -> Weight { // Minimum execution time: 175_645 nanoseconds. Weight::from_parts(461_442_906 as u64, 0) diff --git a/pallets/quota/Cargo.toml b/pallets/quota/Cargo.toml index efcc0dcfbaeb64d5c2d519d9a66a0e925363fa04..c2133c79ef7409f56177697ba355d668c15bd911 100644 --- a/pallets/quota/Cargo.toml +++ b/pallets/quota/Cargo.toml @@ -12,69 +12,80 @@ version = '3.0.0' [features] default = ['std'] runtime-benchmarks = [ - 'frame-benchmarking/runtime-benchmarks', + "frame-support/runtime-benchmarks", + "frame-system/runtime-benchmarks", + "frame-benchmarking/runtime-benchmarks", + "pallet-balances/runtime-benchmarks", + "pallet-identity/runtime-benchmarks", + "sp-runtime/runtime-benchmarks", +] +try-runtime = [ + 'frame-support/try-runtime', + 'frame-system/try-runtime', + 'pallet-balances/runtime-benchmarks', 'pallet-identity/runtime-benchmarks', + 'sp-runtime/try-runtime', ] std = [ 'codec/std', + 'scale-info/std', 'frame-support/std', 'frame-system/std', - 'frame-benchmarking/std', + 'frame-benchmarking?/std', 'sp-core/std', 'sp-runtime/std', 'sp-std/std', + 'sp-io/std', 'pallet-identity/std', 'pallet-balances/std', ] -try-runtime = ['frame-support/try-runtime'] [package.metadata.docs.rs] targets = ['x86_64-unknown-linux-gnu'] [dependencies] -pallet-identity = { path = "../identity", default-features = false } # crates.io -codec = { package = 'parity-scale-codec', version = "3.1.5", features = ['derive'], default-features = false } -scale-info = { version = "2.1.1", default-features = false, features = ["derive"] } - -# substrate - -[dependencies.pallet-balances] -default-features = false -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' +codec = { package = 'parity-scale-codec', version = "3.6.9", features = ['derive'], default-features = false } +pallet-identity = { path = "../identity", default-features = false } +scale-info = { version = "2.10.0", default-features = false, features = ["derive"] } [dependencies.frame-benchmarking] default-features = false -git = 'https://github.com/duniter/substrate' +git = 'https://github.com/duniter/duniter-polkadot-sdk' optional = true -branch = 'duniter-substrate-v0.9.42' +branch = 'duniter-substrate-v1.6.0' [dependencies.frame-support] default-features = false -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' [dependencies.frame-system] default-features = false -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' +# substrate + +[dependencies.pallet-balances] +default-features = false +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' [dependencies.sp-core] default-features = false -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' [dependencies.sp-runtime] default-features = false -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' [dependencies.sp-std] default-features = false -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' [dev-dependencies] -sp-io = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42' } +sp-io = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } diff --git a/pallets/quota/src/benchmarking.rs b/pallets/quota/src/benchmarking.rs index 124f2e66f9bfc34147409789aa7207703bfa2051..bae829e73049f7fac956680a33be754b9ee95779 100644 --- a/pallets/quota/src/benchmarking.rs +++ b/pallets/quota/src/benchmarking.rs @@ -59,14 +59,14 @@ benchmarks! { IdtyQuota::<T>::insert( idty_id, Quota { - last_use: T::BlockNumber::zero(), + last_use: BlockNumberFor::<T>::zero(), amount: quota_amount.into(), }, ); }: { Pallet::<T>::spend_quota(idty_id, amount.into()) } verify { let quota_growth = sp_runtime::Perbill::from_rational( - T::BlockNumber::one(), + BlockNumberFor::<T>::one(), T::ReloadRate::get(), ).mul_floor(T::MaxQuota::get()); assert_eq!(IdtyQuota::<T>::get(idty_id).unwrap().amount, quota_growth +quota_amount.into() - amount.into()); @@ -77,7 +77,7 @@ benchmarks! { IdtyQuota::<T>::insert( idty_id, Quota { - last_use: T::BlockNumber::zero(), + last_use: BlockNumberFor::<T>::zero(), amount: 10u64.into(), }, ); @@ -127,7 +127,7 @@ benchmarks! { IdtyQuota::<T>::insert( idty_id, Quota { - last_use: T::BlockNumber::zero(), + last_use: BlockNumberFor::<T>::zero(), amount: 10u64.into(), }, ); diff --git a/pallets/quota/src/lib.rs b/pallets/quota/src/lib.rs index e618281ea9aff42ea7ddb0b6a0ce5e215ce209b0..8a063dcb13ca8b19f79023df55f69854ef5c9ede 100644 --- a/pallets/quota/src/lib.rs +++ b/pallets/quota/src/lib.rs @@ -36,6 +36,7 @@ pub use pallet::*; use pallet_identity::IdtyEvent; use sp_runtime::traits::Zero; use sp_std::fmt::Debug; +use sp_std::vec::Vec; pub use weights::WeightInfo; #[frame_support::pallet] @@ -63,7 +64,7 @@ pub mod pallet { /// Because this pallet emits events, it depends on the runtime's definition of an event. type RuntimeEvent: From<Event<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>; /// number of blocks in which max quota is replenished - type ReloadRate: Get<Self::BlockNumber>; + type ReloadRate: Get<BlockNumberFor<Self>>; /// maximum amount of quota an identity can get type MaxQuota: Get<BalanceOf<Self>>; /// Account used to refund fee @@ -97,7 +98,7 @@ pub mod pallet { #[pallet::storage] #[pallet::getter(fn quota)] pub type IdtyQuota<T: Config> = - StorageMap<_, Twox64Concat, IdtyId<T>, Quota<T::BlockNumber, BalanceOf<T>>, OptionQuery>; + StorageMap<_, Twox64Concat, IdtyId<T>, Quota<BlockNumberFor<T>, BalanceOf<T>>, OptionQuery>; /// fees waiting for refund #[pallet::storage] @@ -246,7 +247,7 @@ pub mod pallet { } /// update quota according to the growth rate, max value, and last use - fn update_quota(quota: &mut Quota<T::BlockNumber, BalanceOf<T>>) { + fn update_quota(quota: &mut Quota<BlockNumberFor<T>, BalanceOf<T>>) { let current_block = frame_system::pallet::Pallet::<T>::block_number(); let quota_growth = sp_runtime::Perbill::from_rational( current_block - quota.last_use, @@ -257,9 +258,10 @@ pub mod pallet { quota.last_use = current_block; quota.amount = core::cmp::min(quota.amount + quota_growth, T::MaxQuota::get()); } + /// spend a certain amount of quota and return what was spent fn do_spend_quota( - quota: &mut Quota<T::BlockNumber, BalanceOf<T>>, + quota: &mut Quota<BlockNumberFor<T>, BalanceOf<T>>, amount: BalanceOf<T>, ) -> BalanceOf<T> { let old_amount = quota.amount; @@ -282,7 +284,6 @@ pub mod pallet { pub identities: Vec<IdtyId<T>>, } - #[cfg(feature = "std")] impl<T: Config> Default for GenesisConfig<T> { fn default() -> Self { Self { @@ -292,13 +293,13 @@ pub mod pallet { } #[pallet::genesis_build] - impl<T: Config> GenesisBuild<T> for GenesisConfig<T> { + impl<T: Config> BuildGenesisConfig for GenesisConfig<T> { fn build(&self) { for idty in self.identities.iter() { IdtyQuota::<T>::insert( idty, Quota { - last_use: T::BlockNumber::zero(), + last_use: BlockNumberFor::<T>::zero(), amount: BalanceOf::<T>::zero(), }, ); @@ -310,7 +311,7 @@ pub mod pallet { #[pallet::hooks] impl<T: Config> Hooks<BlockNumberFor<T>> for Pallet<T> { // process refund queue if space left on block - fn on_idle(_block: T::BlockNumber, remaining_weight: Weight) -> Weight { + fn on_idle(_block: BlockNumberFor<T>, remaining_weight: Weight) -> Weight { Self::process_refund_queue(remaining_weight) } } diff --git a/pallets/quota/src/mock.rs b/pallets/quota/src/mock.rs index 06548263bd8b14e02e5fefcef2101ae8a915a1a5..5f7f79a2f411b12dc7082727c41529acab238223 100644 --- a/pallets/quota/src/mock.rs +++ b/pallets/quota/src/mock.rs @@ -28,7 +28,6 @@ use sp_runtime::traits::IdentifyAccount; use sp_runtime::traits::Verify; use sp_runtime::BuildStorage; use sp_runtime::{ - testing::Header, traits::{BlakeTwo256, IdentityLookup}, MultiSignature, MultiSigner, }; @@ -36,7 +35,6 @@ use sp_runtime::{ type BlockNumber = u64; type Balance = u64; type Block = frame_system::mocking::MockBlock<Test>; -type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic<Test>; pub type Signature = MultiSignature; pub type AccountPublic = <Signature as Verify>::Signer; pub type AccountId = <AccountPublic as IdentifyAccount>::AccountId; @@ -48,15 +46,11 @@ pub fn account(id: u8) -> AccountId { // Configure a mock runtime to test the pallet. frame_support::construct_runtime!( - pub enum Test where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, - { - System: frame_system::{Pallet, Call, Config, Storage, Event<T>}, - Quota: pallet_quota::{Pallet, Storage, Config<T>, Event<T>}, - Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>}, - Identity: pallet_identity::{Pallet, Call, Storage, Config<T>, Event<T>}, + pub enum Test{ + System: frame_system, + Quota: pallet_quota, + Balances: pallet_balances, + Identity: pallet_identity, } ); @@ -72,10 +66,10 @@ parameter_types! { pub const MaxQuota: u64 = 1000; } impl Config for Test { - type RuntimeEvent = RuntimeEvent; - type ReloadRate = ReloadRate; type MaxQuota = MaxQuota; type RefundAccount = TreasuryAccountId; + type ReloadRate = ReloadRate; + type RuntimeEvent = RuntimeEvent; type WeightInfo = (); } @@ -85,30 +79,30 @@ parameter_types! { pub const SS58Prefix: u8 = 42; } impl system::Config for Test { + type AccountData = pallet_balances::AccountData<Balance>; + type AccountId = AccountId; type BaseCallFilter = Everything; - type BlockWeights = (); + type Block = Block; + type BlockHashCount = BlockHashCount; type BlockLength = (); + type BlockWeights = (); type DbWeight = (); - type RuntimeOrigin = RuntimeOrigin; - type RuntimeCall = RuntimeCall; - type Index = u64; - type BlockNumber = BlockNumber; type Hash = H256; type Hashing = BlakeTwo256; - type AccountId = AccountId; type Lookup = IdentityLookup<Self::AccountId>; - type Header = Header; - type RuntimeEvent = RuntimeEvent; - type BlockHashCount = BlockHashCount; - type Version = (); - type PalletInfo = PalletInfo; - type AccountData = pallet_balances::AccountData<Balance>; - type OnNewAccount = (); + type MaxConsumers = frame_support::traits::ConstU32<16>; + type Nonce = u64; type OnKilledAccount = (); - type SystemWeightInfo = (); - type SS58Prefix = SS58Prefix; + type OnNewAccount = (); type OnSetCode = (); - type MaxConsumers = frame_support::traits::ConstU32<16>; + type PalletInfo = PalletInfo; + type RuntimeCall = RuntimeCall; + type RuntimeEvent = RuntimeEvent; + type RuntimeOrigin = RuntimeOrigin; + type RuntimeTask = (); + type SS58Prefix = SS58Prefix; + type SystemWeightInfo = (); + type Version = (); } // BALANCES // @@ -117,19 +111,20 @@ parameter_types! { pub const MaxLocks: u32 = 50; } impl pallet_balances::Config for Test { + type AccountStore = System; type Balance = Balance; type DustRemoval = (); type ExistentialDeposit = ExistentialDeposit; - type AccountStore = System; - type WeightInfo = pallet_balances::weights::SubstrateWeight<Test>; + type FreezeIdentifier = (); + type MaxFreezes = ConstU32<0>; + type MaxHolds = ConstU32<0>; type MaxLocks = MaxLocks; type MaxReserves = (); type ReserveIdentifier = [u8; 8]; type RuntimeEvent = RuntimeEvent; - type HoldIdentifier = (); - type FreezeIdentifier = (); - type MaxHolds = ConstU32<0>; - type MaxFreezes = ConstU32<0>; + type RuntimeFreezeReason = (); + type RuntimeHoldReason = (); + type WeightInfo = pallet_balances::weights::SubstrateWeight<Test>; } // IDENTITY // @@ -148,27 +143,27 @@ impl pallet_identity::traits::IdtyNameValidator for IdtyNameValidatorTestImpl { } } impl pallet_identity::Config for Test { + type AccountLinker = (); + type AutorevocationPeriod = AutorevocationPeriod; type ChangeOwnerKeyPeriod = ChangeOwnerKeyPeriod; + type CheckIdtyCallAllowed = (); type ConfirmPeriod = ConfirmPeriod; - type ValidationPeriod = ValidationPeriod; - type AutorevocationPeriod = AutorevocationPeriod; type DeletionPeriod = DeletionPeriod; - type CheckIdtyCallAllowed = (); type IdtyCreationPeriod = IdtyCreationPeriod; type IdtyData = (); - type IdtyNameValidator = IdtyNameValidatorTestImpl; type IdtyIndex = u64; - type AccountLinker = (); - type Signer = AccountPublic; - type Signature = Signature; + type IdtyNameValidator = IdtyNameValidatorTestImpl; type OnIdtyChange = (); type RuntimeEvent = RuntimeEvent; + type Signature = Signature; + type Signer = AccountPublic; + type ValidationPeriod = ValidationPeriod; type WeightInfo = (); } // Build genesis storage according to the mock runtime. pub fn new_test_ext(gen_conf: pallet_quota::GenesisConfig<Test>) -> sp_io::TestExternalities { - GenesisConfig { + RuntimeGenesisConfig { system: SystemConfig::default(), balances: BalancesConfig::default(), quota: gen_conf, diff --git a/pallets/quota/src/weights.rs b/pallets/quota/src/weights.rs index 076daa4b1800aa0a9a90c82f2a64474c364700b7..23a9f77745e614cd9e4f8eac52d3a343a2ee2ee3 100644 --- a/pallets/quota/src/weights.rs +++ b/pallets/quota/src/weights.rs @@ -15,18 +15,23 @@ impl WeightInfo for () { fn queue_refund() -> Weight { Weight::from_parts(100u64, 0) } + fn spend_quota() -> Weight { Weight::from_parts(25u64, 0) } + fn try_refund() -> Weight { Weight::from_parts(100u64, 0) } + fn do_refund() -> Weight { Weight::from_parts(25u64, 0) } + fn on_process_refund_queue() -> Weight { Weight::from_parts(1u64, 0) } + fn on_process_refund_queue_elements(_i: u32) -> Weight { Weight::from_parts(1u64, 0) } diff --git a/pallets/session-benchmarking/Cargo.toml b/pallets/session-benchmarking/Cargo.toml index 1ef5f28922f6a0cadb23e9f7e93c8854bba39804..b1658a6c648d668219ee0a50f230361238196ce6 100644 --- a/pallets/session-benchmarking/Cargo.toml +++ b/pallets/session-benchmarking/Cargo.toml @@ -13,45 +13,45 @@ readme = "README.md" targets = ["x86_64-unknown-linux-gnu"] [dependencies] -scale-info = { version = "2.1.1", default-features = false, features = ["derive"] } +scale-info = { version = "2.10.0", default-features = false, features = ["derive"] } pallet-authority-members = { path = "../authority-members", default-features = false } [dependencies.frame-benchmarking] default-features = false -git = 'https://github.com/duniter/substrate' +git = 'https://github.com/duniter/duniter-polkadot-sdk' optional = true -branch = 'duniter-substrate-v0.9.42' +branch = 'duniter-substrate-v1.6.0' [dependencies.frame-support] default-features = false -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' [dependencies.frame-system] default-features = false -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' [dependencies.pallet-session] default-features = false -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' [dependencies.sp-runtime] default-features = false -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' [dependencies.sp-session] default-features = false -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' [dependencies.sp-std] default-features = false -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' [dependencies.parity-scale-codec] default-features = false @@ -61,40 +61,53 @@ version = "3.1.5" [dev-dependencies.pallet-balances] default-features = false -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' [dev-dependencies.pallet-timestamp] default-features = false -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' [dev-dependencies.sp-core] default-features = false -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' [dev-dependencies.sp-io] default-features = false -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' [features] default = ["std"] std = [ "parity-scale-codec/std", - "frame-benchmarking/std", + "frame-benchmarking?/std", "frame-support/std", "frame-system/std", "pallet-session/std", + "pallet-balances/std", + "pallet-timestamp/std", "sp-runtime/std", "sp-session/std", "sp-std/std", + "sp-core/std", + "sp-io/std", +] +try-runtime = [ + 'frame-support/try-runtime', + 'frame-system/try-runtime', + 'pallet-balances/runtime-benchmarks', + 'pallet-timestamp/runtime-benchmarks', + 'sp-runtime/try-runtime', ] - runtime-benchmarks = [ 'frame-benchmarking/runtime-benchmarks', - 'frame-support/runtime-benchmarks', - 'frame-system/runtime-benchmarks', + 'frame-support/runtime-benchmarks', + 'frame-system/runtime-benchmarks', + 'pallet-balances/runtime-benchmarks', + 'pallet-timestamp/runtime-benchmarks', + 'sp-runtime/runtime-benchmarks', ] diff --git a/pallets/smith-members/Cargo.toml b/pallets/smith-members/Cargo.toml index 5ced90e2c20a197003523b374e1bcf7928d904c0..8949b9149ec2197df2dd8688e508e13f977ac780 100644 --- a/pallets/smith-members/Cargo.toml +++ b/pallets/smith-members/Cargo.toml @@ -13,22 +13,27 @@ readme = "README.md" targets = ["x86_64-unknown-linux-gnu"] [dependencies] -codec = { package = "parity-scale-codec", version = "3.1.5", features = ["derive"], default-features = false } -log = { version = "0.4.17", default-features = false } -scale-info = { version = "2.1.1", default-features = false, features = ["derive"] } -serde = { version = "1.0.101", default-features = false, optional = true } +codec = { package = "parity-scale-codec", version = "3.6.9", features = ["derive"], default-features = false } +frame-support = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +frame-system = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +log = { version = "0.4.20", default-features = false } pallet-authority-members = { path = "../authority-members", default-features = false } -frame-support = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -frame-system = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -pallet-balances = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -sp-runtime = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -sp-staking = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -sp-std = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } +pallet-balances = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +scale-info = { version = "2.10.0", default-features = false, features = ["derive"] } +sp-runtime = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +sp-staking = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +sp-std = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } + +[dependencies.frame-benchmarking] +default-features = false +git = 'https://github.com/duniter/duniter-polkadot-sdk' +optional = true +branch = 'duniter-substrate-v1.6.0' [dev-dependencies] -maplit = "1.0.2" -sp-core = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -sp-io = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42' } +maplit = { version = "1.0.2", default-features = false } +sp-core = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +sp-io = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } [features] default = ["std"] @@ -36,21 +41,28 @@ std = [ "codec/std", "frame-support/std", "frame-system/std", - 'frame-benchmarking/std', + 'frame-benchmarking?/std', "log/std", "pallet-balances/std", "pallet-authority-members/std", "scale-info/std", - "serde", "sp-runtime/std", "sp-staking/std", "sp-std/std", ] -runtime-benchmarks = ["frame-benchmarking/runtime-benchmarks"] -try-runtime = ["frame-support/try-runtime"] - -[dependencies.frame-benchmarking] -default-features = false -git = 'https://github.com/duniter/substrate' -optional = true -branch = 'duniter-substrate-v0.9.42' \ No newline at end of file +runtime-benchmarks = [ + "frame-benchmarking/runtime-benchmarks", + "frame-support/runtime-benchmarks", + "frame-system/runtime-benchmarks", + "pallet-balances/runtime-benchmarks", + "pallet-authority-members/runtime-benchmarks", + "sp-runtime/runtime-benchmarks", + "sp-staking/runtime-benchmarks", +] +try-runtime = [ + 'frame-support/try-runtime', + 'frame-system/try-runtime', + 'pallet-balances/runtime-benchmarks', + 'pallet-authority-members/runtime-benchmarks', + 'sp-runtime/try-runtime', +] diff --git a/pallets/smith-members/src/lib.rs b/pallets/smith-members/src/lib.rs index bf8527957038796b8727699bad624c5cc4b2dea0..f9e126a18bab3fcc60d678e5ce333659b081a673 100644 --- a/pallets/smith-members/src/lib.rs +++ b/pallets/smith-members/src/lib.rs @@ -31,11 +31,13 @@ pub mod weights; mod benchmarking; use codec::{Codec, Decode, Encode}; -use frame_support::dispatch::{DispatchResultWithPostInfo, TypeInfo}; +use frame_support::dispatch::DispatchResultWithPostInfo; +use frame_support::ensure; use frame_support::pallet_prelude::Get; -use frame_support::{ensure, RuntimeDebug}; +use frame_support::pallet_prelude::RuntimeDebug; use frame_system::ensure_signed; use frame_system::pallet_prelude::OriginFor; +use scale_info::TypeInfo; use sp_runtime::traits::AtLeast32BitUnsigned; use sp_runtime::traits::IsMember; use sp_std::fmt::Debug; @@ -156,7 +158,6 @@ pub mod pallet { pub initial_smiths: BTreeMap<T::IdtyIndex, (bool, Vec<T::IdtyIndex>)>, } - #[cfg(feature = "std")] impl<T: Config> Default for GenesisConfig<T> { fn default() -> Self { Self { @@ -166,7 +167,7 @@ pub mod pallet { } #[pallet::genesis_build] - impl<T: Config> GenesisBuild<T> for GenesisConfig<T> { + impl<T: Config> BuildGenesisConfig for GenesisConfig<T> { fn build(&self) { CurrentSession::<T>::put(0); let mut cert_meta_by_issuer = BTreeMap::<T::IdtyIndex, Vec<T::IdtyIndex>>::new(); diff --git a/pallets/smith-members/src/mock.rs b/pallets/smith-members/src/mock.rs index cd2398e4dc2ed48618d6f24b50b0186e3d34bba2..2e7ddf15b5147d2ee1fc40cd7220bcecb198dfe8 100644 --- a/pallets/smith-members/src/mock.rs +++ b/pallets/smith-members/src/mock.rs @@ -26,7 +26,6 @@ use frame_support::{ use sp_core::H256; use sp_runtime::traits::{ConvertInto, IsMember}; use sp_runtime::{ - testing::Header, traits::{BlakeTwo256, IdentityLookup}, BuildStorage, Perbill, }; @@ -36,45 +35,40 @@ parameter_types! { pub static OffenceWeight: Weight = Default::default(); } -type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic<Runtime>; type Block = frame_system::mocking::MockBlock<Runtime>; frame_support::construct_runtime!( - pub struct Runtime where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, - { - System: frame_system::{Pallet, Call, Config, Storage, Event<T>}, - Smith: pallet_smith_members::{Pallet, Config<T>, Storage, Event<T>}, + pub struct Runtime { + System: frame_system, + Smith: pallet_smith_members, } ); impl frame_system::Config for Runtime { + type AccountData = (); + type AccountId = u64; type BaseCallFilter = frame_support::traits::Everything; - type BlockWeights = (); + type Block = Block; + type BlockHashCount = ConstU64<250>; type BlockLength = (); + type BlockWeights = (); type DbWeight = RocksDbWeight; - type RuntimeOrigin = RuntimeOrigin; - type Index = u64; - type BlockNumber = u64; - type RuntimeCall = RuntimeCall; type Hash = H256; type Hashing = BlakeTwo256; - type AccountId = u64; type Lookup = IdentityLookup<Self::AccountId>; - type Header = Header; - type RuntimeEvent = RuntimeEvent; - type BlockHashCount = ConstU64<250>; - type Version = (); - type PalletInfo = PalletInfo; - type AccountData = (); - type OnNewAccount = (); + type MaxConsumers = ConstU32<16>; + type Nonce = u64; type OnKilledAccount = (); - type SystemWeightInfo = (); - type SS58Prefix = (); + type OnNewAccount = (); type OnSetCode = (); - type MaxConsumers = ConstU32<16>; + type PalletInfo = PalletInfo; + type RuntimeCall = RuntimeCall; + type RuntimeEvent = RuntimeEvent; + type RuntimeOrigin = RuntimeOrigin; + type RuntimeTask = (); + type SS58Prefix = (); + type SystemWeightInfo = (); + type Version = (); } pub struct EveryoneExceptIdZero; @@ -85,24 +79,24 @@ impl IsMember<u64> for EveryoneExceptIdZero { } impl pallet_smith_members::Config for Runtime { - type RuntimeEvent = RuntimeEvent; + type IdtyIdOf = ConvertInto; + type IdtyIdOfAuthorityId = ConvertInto; type IdtyIndex = u64; type IsWoTMember = EveryoneExceptIdZero; - type IdtyIdOf = ConvertInto; - type MinCertForMembership = ConstU32<2>; type MaxByIssuer = ConstU32<3>; - type SmithInactivityMaxDuration = ConstU32<5>; - type OnSmithDelete = (); - type IdtyIdOfAuthorityId = ConvertInto; type MemberId = u64; + type MinCertForMembership = ConstU32<2>; + type OnSmithDelete = (); type OwnerKeyOf = ConvertInto; + type RuntimeEvent = RuntimeEvent; + type SmithInactivityMaxDuration = ConstU32<5>; type WeightInfo = (); } pub fn new_test_ext( genesis_config: crate::pallet::GenesisConfig<Runtime>, ) -> sp_io::TestExternalities { - GenesisConfig { + RuntimeGenesisConfig { system: SystemConfig::default(), smith: genesis_config, } diff --git a/pallets/smith-members/src/weights.rs b/pallets/smith-members/src/weights.rs index b18e0cef9fe76aa09afbd4b3544cfcd21652ac0d..76a6d6af7afaacfe3221db91195b65504f32305a 100644 --- a/pallets/smith-members/src/weights.rs +++ b/pallets/smith-members/src/weights.rs @@ -29,9 +29,11 @@ impl WeightInfo for () { fn invite_smith() -> Weight { Weight::zero() } + fn accept_invitation() -> Weight { Weight::zero() } + fn certify_smith() -> Weight { Weight::zero() } diff --git a/pallets/universal-dividend/Cargo.toml b/pallets/universal-dividend/Cargo.toml index 53172924b44edf88270fbfdb614b337f30040239..bb15b5881f177ae86e7fa0da57b606d40306a743 100644 --- a/pallets/universal-dividend/Cargo.toml +++ b/pallets/universal-dividend/Cargo.toml @@ -11,90 +11,88 @@ version = '3.0.0' [features] default = ['std'] runtime-benchmarks = [ - "frame-benchmarking/runtime-benchmarks", - "pallet-balances", + "frame-benchmarking/runtime-benchmarks", + "frame-support/runtime-benchmarks", + "frame-system/runtime-benchmarks", + "pallet-balances/runtime-benchmarks", + "pallet-timestamp/runtime-benchmarks", + "sp-runtime/runtime-benchmarks", +] +try-runtime = [ + 'frame-support/try-runtime', + 'frame-system/try-runtime', + 'pallet-balances/runtime-benchmarks', + 'pallet-timestamp/runtime-benchmarks', + 'sp-runtime/try-runtime', ] std = [ 'codec/std', 'frame-support/std', 'frame-system/std', - 'frame-benchmarking/std', + 'frame-benchmarking?/std', 'pallet-timestamp/std', - "serde", + 'pallet-balances/std', + 'scale-info/std', + "serde/std", "sp-arithmetic/std", "sp-io/std", + "sp-core/std", "sp-std/std", + "sp-runtime/std", ] -try-runtime = ['frame-support/try-runtime'] [dependencies] # crates.io -codec = { package = 'parity-scale-codec', version = "3.1.5", default-features = false, features = ["derive", "max-encoded-len"] } -scale-info = { version = "2.1.1", default-features = false, features = ["derive"] } -serde = { version = "1.0.101", features = ["derive"], optional = true } +codec = { package = 'parity-scale-codec', version = "3.6.9", default-features = false, features = ["derive", "max-encoded-len"] } # substrate bencharks -frame-benchmarking = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', optional = true, default-features = false } -pallet-balances = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', optional = true, default-features = false } +frame-benchmarking = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', optional = true, default-features = false } +pallet-balances = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', optional = true, default-features = false } +scale-info = { version = "2.10.0", default-features = false, features = ["derive"] } +serde = { version = "1.0.195", features = ["derive"], default-features = false } [dependencies.frame-support] default-features = false -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' [dependencies.frame-system] default-features = false -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' [dependencies.pallet-timestamp] default-features = false -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' [dependencies.sp-arithmetic] default-features = false -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' [dependencies.sp-io] default-features = false -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' - -[dependencies.sp-std] -default-features = false -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' [dependencies.sp-runtime] default-features = false -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' - +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' ### DOC ### [package.metadata.docs.rs] +default-features = false targets = ['x86_64-unknown-linux-gnu'] - +[dependencies.sp-std] +default-features = false +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' ### DEV ### -[dev-dependencies] -serde = { version = "1.0.101", features = ["derive"] } - -[dev-dependencies.pallet-balances] -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' - [dev-dependencies.sp-core] -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' - -[dev-dependencies.sp-io] -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' - -[dev-dependencies.sp-runtime] -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' +default-features = false +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' diff --git a/pallets/universal-dividend/src/lib.rs b/pallets/universal-dividend/src/lib.rs index b524827091f2c4031c4ec7f8509970c5029b25a6..d475f974ca82f1a7d397a019ab3b531fe1078e5c 100644 --- a/pallets/universal-dividend/src/lib.rs +++ b/pallets/universal-dividend/src/lib.rs @@ -170,7 +170,6 @@ pub mod pallet { pub ud: BalanceOf<T>, } - #[cfg(feature = "std")] impl<T: Config> Default for GenesisConfig<T> where <T as pallet_timestamp::Config>::Moment: MaybeSerializeDeserialize, @@ -188,7 +187,7 @@ pub mod pallet { } #[pallet::genesis_build] - impl<T: Config> GenesisBuild<T> for GenesisConfig<T> + impl<T: Config> BuildGenesisConfig for GenesisConfig<T> where <T as pallet_timestamp::Config>::Moment: MaybeSerializeDeserialize, { @@ -403,6 +402,7 @@ pub mod pallet { let who = ensure_signed(origin)?; Self::do_claim_uds(&who) } + /// Transfer some liquid free balance to another account, in milliUD. #[pallet::call_index(1)] #[pallet::weight(<T as pallet::Config>::WeightInfo::transfer_ud())] @@ -432,6 +432,7 @@ pub mod pallet { pub fn init_first_eligible_ud() -> FirstEligibleUd { CurrentUdIndex::<T>::get().into() } + /// function to call when removing a member /// auto-claims UDs pub fn on_removed_member(first_ud_index: UdIndex, who: &T::AccountId) -> Weight { diff --git a/pallets/universal-dividend/src/mock.rs b/pallets/universal-dividend/src/mock.rs index a753ac163f487a6ac4cad51daac6ebf0432f96f3..ada04634e5c57e11dfdf220e3610c8b3828e9723 100644 --- a/pallets/universal-dividend/src/mock.rs +++ b/pallets/universal-dividend/src/mock.rs @@ -23,7 +23,6 @@ use frame_support::{ use frame_system as system; use sp_core::{ConstU32, H256}; use sp_runtime::{ - testing::Header, traits::{BlakeTwo256, IdentityLookup}, BuildStorage, }; @@ -34,20 +33,16 @@ use sp_runtime::traits::ConvertInto; pub const BLOCK_TIME: u64 = 6_000; type Balance = u64; -type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic<Test>; type Block = frame_system::mocking::MockBlock<Test>; // Configure a mock runtime to test the pallet. frame_support::construct_runtime!( - pub enum Test where - Block = Block, - NodeBlock = Block, - UncheckedExtrinsic = UncheckedExtrinsic, + pub enum Test { - System: frame_system::{Pallet, Call, Config, Storage, Event<T>}, - Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent}, - Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>}, - UniversalDividend: pallet_universal_dividend::{Pallet, Storage, Config<T>, Event<T>}, + System: frame_system, + Timestamp: pallet_timestamp, + Balances: pallet_balances, + UniversalDividend: pallet_universal_dividend, } ); @@ -57,30 +52,30 @@ parameter_types! { } impl system::Config for Test { + type AccountData = pallet_balances::AccountData<Balance>; + type AccountId = u32; type BaseCallFilter = Everything; - type BlockWeights = (); + type Block = Block; + type BlockHashCount = BlockHashCount; type BlockLength = (); + type BlockWeights = (); type DbWeight = (); - type RuntimeOrigin = RuntimeOrigin; - type RuntimeCall = RuntimeCall; - type Index = u64; - type BlockNumber = u64; type Hash = H256; type Hashing = BlakeTwo256; - type AccountId = u32; type Lookup = IdentityLookup<Self::AccountId>; - type Header = Header; - type RuntimeEvent = RuntimeEvent; - type BlockHashCount = BlockHashCount; - type Version = (); - type PalletInfo = PalletInfo; - type AccountData = pallet_balances::AccountData<Balance>; - type OnNewAccount = (); + type MaxConsumers = frame_support::traits::ConstU32<16>; + type Nonce = u64; type OnKilledAccount = (); - type SystemWeightInfo = (); - type SS58Prefix = SS58Prefix; + type OnNewAccount = (); type OnSetCode = (); - type MaxConsumers = frame_support::traits::ConstU32<16>; + type PalletInfo = PalletInfo; + type RuntimeCall = RuntimeCall; + type RuntimeEvent = RuntimeEvent; + type RuntimeOrigin = RuntimeOrigin; + type RuntimeTask = (); + type SS58Prefix = SS58Prefix; + type SystemWeightInfo = (); + type Version = (); } parameter_types! { @@ -88,9 +83,9 @@ parameter_types! { } impl pallet_timestamp::Config for Test { + type MinimumPeriod = MinimumPeriod; type Moment = u64; type OnTimestampSet = UniversalDividend; - type MinimumPeriod = MinimumPeriod; type WeightInfo = (); } @@ -100,19 +95,20 @@ parameter_types! { } impl pallet_balances::Config for Test { + type AccountStore = System; type Balance = Balance; type DustRemoval = (); type ExistentialDeposit = ExistentialDeposit; - type AccountStore = System; - type WeightInfo = pallet_balances::weights::SubstrateWeight<Test>; + type FreezeIdentifier = (); + type MaxFreezes = ConstU32<0>; + type MaxHolds = ConstU32<0>; type MaxLocks = MaxLocks; type MaxReserves = (); type ReserveIdentifier = [u8; 8]; type RuntimeEvent = RuntimeEvent; - type HoldIdentifier = (); - type FreezeIdentifier = (); - type MaxHolds = ConstU32<0>; - type MaxFreezes = ConstU32<0>; + type RuntimeFreezeReason = (); + type RuntimeHoldReason = (); + type WeightInfo = pallet_balances::weights::SubstrateWeight<Test>; } parameter_types! { @@ -127,6 +123,7 @@ impl frame_support::traits::StoredMap<u32, FirstEligibleUd> for TestMembersStora fn get(key: &u32) -> FirstEligibleUd { crate::TestMembers::<Test>::get(key) } + fn try_mutate_exists<R, E: From<sp_runtime::DispatchError>>( key: &u32, f: impl FnOnce(&mut Option<FirstEligibleUd>) -> Result<R, E>, @@ -141,26 +138,26 @@ impl frame_support::traits::StoredMap<u32, FirstEligibleUd> for TestMembersStora } impl pallet_universal_dividend::Config for Test { - type MomentIntoBalance = sp_runtime::traits::ConvertInto; + #[cfg(feature = "runtime-benchmarks")] + type AccountIdOf = ConvertInto; type Currency = pallet_balances::Pallet<Test>; type MaxPastReeval = frame_support::traits::ConstU32<2>; type MembersCount = MembersCount; type MembersStorage = TestMembersStorage; + type MomentIntoBalance = sp_runtime::traits::ConvertInto; type RuntimeEvent = RuntimeEvent; type SquareMoneyGrowthRate = SquareMoneyGrowthRate; type UdCreationPeriod = UdCreationPeriod; type UdReevalPeriod = UdReevalPeriod; type UnitsPerUd = frame_support::traits::ConstU64<1_000>; type WeightInfo = (); - #[cfg(feature = "runtime-benchmarks")] - type AccountIdOf = ConvertInto; } // Build genesis storage according to the mock runtime. pub fn new_test_ext( gen_conf: pallet_universal_dividend::GenesisConfig<Test>, ) -> sp_io::TestExternalities { - GenesisConfig { + RuntimeGenesisConfig { system: SystemConfig::default(), balances: BalancesConfig { total_issuance: gen_conf.initial_monetary_mass, diff --git a/pallets/universal-dividend/src/types.rs b/pallets/universal-dividend/src/types.rs index 000ac00177b6c8356598a52dddb0b371957f241b..da94dd22d1da1f293986fc821f92a90c6630c3e5 100644 --- a/pallets/universal-dividend/src/types.rs +++ b/pallets/universal-dividend/src/types.rs @@ -16,18 +16,16 @@ use codec::{Decode, Encode, Error, Input, MaxEncodedLen, Output}; use core::num::NonZeroU16; -#[cfg(feature = "std")] -use serde::{Deserialize, Serialize}; use sp_runtime::RuntimeDebug; use sp_std::vec::Vec; pub type UdIndex = u16; -#[cfg_attr(feature = "std", derive(Deserialize, Serialize))] -#[derive(Clone, Copy, Default, Eq, PartialEq, RuntimeDebug)] +#[derive( + Clone, Copy, Default, Eq, PartialEq, RuntimeDebug, serde::Deserialize, serde::Serialize, +)] pub struct FirstEligibleUd(pub Option<NonZeroU16>); -#[cfg(feature = "std")] impl FirstEligibleUd { pub fn min() -> Self { Self(Some(NonZeroU16::new(1).expect("unreachable"))) diff --git a/pallets/universal-dividend/src/weights.rs b/pallets/universal-dividend/src/weights.rs index 75eb80a58898d4252a480c1b6e3a77d7a8cd0629..27d0f739c0d4d73daa71345671dca76f755a4f42 100644 --- a/pallets/universal-dividend/src/weights.rs +++ b/pallets/universal-dividend/src/weights.rs @@ -35,6 +35,7 @@ impl WeightInfo for () { .saturating_add(RocksDbWeight::get().reads(4)) .saturating_add(RocksDbWeight::get().writes(1)) } + // Storage: UniversalDividend CurrentUd (r:1 w:0) // Storage: System Account (r:1 w:1) // Storage: Account PendingNewAccounts (r:0 w:1) @@ -43,6 +44,7 @@ impl WeightInfo for () { .saturating_add(RocksDbWeight::get().reads(2)) .saturating_add(RocksDbWeight::get().writes(2)) } + // Storage: UniversalDividend CurrentUd (r:1 w:0) // Storage: System Account (r:1 w:1) // Storage: Account PendingNewAccounts (r:0 w:1) @@ -51,6 +53,7 @@ impl WeightInfo for () { .saturating_add(RocksDbWeight::get().reads(2)) .saturating_add(RocksDbWeight::get().writes(2)) } + fn on_removed_member(i: u32) -> Weight { Weight::from_parts(32_514_000, 0) // Standard Error: 32_000 diff --git a/pallets/upgrade-origin/Cargo.toml b/pallets/upgrade-origin/Cargo.toml index 54c322852c62f59cca3cac379a1e64af60268525..6aabbaeb067ccfbcb9419ac3d87231e9fe4ed31d 100644 --- a/pallets/upgrade-origin/Cargo.toml +++ b/pallets/upgrade-origin/Cargo.toml @@ -10,60 +10,71 @@ version = '3.0.0' [features] default = ['std'] -runtime-benchmarks = ['frame-benchmarking/runtime-benchmarks'] +runtime-benchmarks = [ + "frame-support/runtime-benchmarks", + "frame-system/runtime-benchmarks", + "frame-benchmarking/runtime-benchmarks", + "sp-runtime/runtime-benchmarks", +] +try-runtime = [ + 'frame-support/try-runtime', + 'frame-system/try-runtime', + 'sp-runtime/try-runtime', +] std = [ 'codec/std', + 'scale-info/std', 'frame-support/std', 'frame-system/std', - 'frame-benchmarking/std', + 'frame-benchmarking?/std', "sp-io/std", + "sp-runtime/std", "sp-std/std", ] -try-runtime = ['frame-support/try-runtime'] [dependencies] # substrate -scale-info = { version = "2.1.1", default-features = false, features = ["derive"] } +scale-info = { version = "2.10.0", default-features = false, features = ["derive"] } [dependencies.codec] default-features = false features = ['derive'] package = 'parity-scale-codec' -version = "3.1.5" +version = "3.6.9" [dependencies.frame-benchmarking] default-features = false -git = 'https://github.com/duniter/substrate' +git = 'https://github.com/duniter/duniter-polkadot-sdk' optional = true -branch = 'duniter-substrate-v0.9.42' +branch = 'duniter-substrate-v1.6.0' [dependencies.frame-support] default-features = false -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' [dependencies.frame-system] default-features = false -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' [dependencies.sp-io] default-features = false -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' - -[dependencies.sp-std] -default-features = false -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' [dependencies.sp-runtime] default-features = false -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' - +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' ### DOC ### [package.metadata.docs.rs] +default-features = false targets = ['x86_64-unknown-linux-gnu'] + +[dependencies.sp-std] +default-features = false +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' diff --git a/pallets/upgrade-origin/src/lib.rs b/pallets/upgrade-origin/src/lib.rs index 00bdfd2550086ce282b4c5491d3f5b1d000632ca..15ebd1ae95c4aa18d78e2dd45d24f411646b3625 100644 --- a/pallets/upgrade-origin/src/lib.rs +++ b/pallets/upgrade-origin/src/lib.rs @@ -104,18 +104,20 @@ pub mod pallet { }); Ok(Pays::No.into()) } + /// Dispatches a function call from root origin. /// This function does not check the weight of the call, and instead allows the /// caller to specify the weight of the call. /// /// The weight of this call is defined by the caller. #[pallet::call_index(1)] - #[pallet::weight((*_weight, call.get_dispatch_info().class))] + #[pallet::weight((*weight, call.get_dispatch_info().class))] pub fn dispatch_as_root_unchecked_weight( origin: OriginFor<T>, call: Box<<T as Config>::Call>, - _weight: Weight, + weight: Weight, ) -> DispatchResultWithPostInfo { + let _ = weight; // We dont need to check the weight witness. T::UpgradableOrigin::ensure_origin(origin)?; let res = call.dispatch_bypass_filter(frame_system::RawOrigin::Root.into()); diff --git a/primitives/distance/Cargo.toml b/primitives/distance/Cargo.toml index fce822d7c04b1126e21ff75ee9bf18345236554e..afd7e3c3c5784b9efbb239dd0cfa500094573594 100644 --- a/primitives/distance/Cargo.toml +++ b/primitives/distance/Cargo.toml @@ -13,55 +13,59 @@ version = '3.0.0' default = ['std'] std = [ 'async-trait', + 'scale-info/std', 'codec/std', 'frame-support/std', - 'serde', + 'serde/std', 'sp-inherents/std', 'sp-runtime/std', 'sp-std/std', 'thiserror' ] -try-runtime = ['frame-support/try-runtime'] +try-runtime = [ + 'frame-support/try-runtime', + 'sp-runtime/try-runtime', +] [dependencies] -async-trait = { version = "0.1", optional = true } -thiserror = { version = "1.0.30", optional = true } +async-trait = { version = "0.1", optional = true, default-features = false } # substrate -scale-info = { version = "2.1.1", default-features = false, features = ["derive"] } +scale-info = { version = "2.10.0", default-features = false, features = ["derive"] } +thiserror = { version = "1.0.56", optional = true, default-features = false } [dependencies.codec] default-features = false features = ['derive'] package = 'parity-scale-codec' -version = "3.1.5" +version = "3.6.9" [dependencies.frame-support] default-features = false -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' [dependencies.serde] -version = "1.0.101" -optional = true +default-features = false +version = "1.0.195" features = ["derive"] [dependencies.sp-inherents] default-features = false -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' [dependencies.sp-runtime] default-features = false -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' - -[dependencies.sp-std] -default-features = false -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' - +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' ### DOC ### [package.metadata.docs.rs] +default-features = false targets = ['x86_64-unknown-linux-gnu'] + +[dependencies.sp-std] +default-features = false +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' diff --git a/primitives/distance/src/lib.rs b/primitives/distance/src/lib.rs index f2e89334509081769c3f20043a0990fec4986234..bf878cc9b6a201e456c463aaac6e05fa96a1008f 100644 --- a/primitives/distance/src/lib.rs +++ b/primitives/distance/src/lib.rs @@ -20,7 +20,7 @@ #![allow(clippy::type_complexity)] use codec::{Decode, Encode}; -use frame_support::RuntimeDebug; +use frame_support::pallet_prelude::RuntimeDebug; use scale_info::TypeInfo; //#[cfg(feature = "std")] //use serde::{Deserialize, Serialize}; diff --git a/primitives/duniter/Cargo.toml b/primitives/duniter/Cargo.toml index 12c7c92753ec0f8be3c32abef572933606a5eb69..9cb227fb8939bee810a0c0d6fa619307543b0cfc 100644 --- a/primitives/duniter/Cargo.toml +++ b/primitives/duniter/Cargo.toml @@ -12,40 +12,45 @@ version = '3.0.0' [features] default = ['std'] std = [ + 'scale-info/std', 'codec/std', 'frame-support/std', 'sp-runtime/std', 'sp-std/std', ] -try-runtime = ['frame-support/try-runtime'] +try-runtime = [ + 'frame-support/try-runtime', + 'sp-runtime/try-runtime', +] [dependencies] # substrate -scale-info = { version = "2.1.1", default-features = false, features = ["derive"] } +scale-info = { version = "2.10.0", default-features = false, features = ["derive"] } [dependencies.codec] default-features = false features = ['derive'] package = 'parity-scale-codec' -version = "3.1.5" +version = "3.6.9" [dependencies.frame-support] default-features = false -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' [dependencies.sp-runtime] default-features = false -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' [dependencies.sp-std] default-features = false -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' ### DOC ### [package.metadata.docs.rs] +default-features = false targets = ['x86_64-unknown-linux-gnu'] diff --git a/primitives/membership/Cargo.toml b/primitives/membership/Cargo.toml index d0f391814ef38ceea3f303546dbe84b5e256cf02..a66bc91dc3926e6b23b921bc3b1715ac8fcb80e1 100644 --- a/primitives/membership/Cargo.toml +++ b/primitives/membership/Cargo.toml @@ -12,49 +12,53 @@ version = '3.0.0' [features] default = ['std'] std = [ + 'scale-info/std', 'codec/std', 'frame-support/std', - 'serde', + 'serde/std', 'sp-runtime/std', 'sp-std/std', ] -try-runtime = ['frame-support/try-runtime'] +try-runtime = [ + 'frame-support/try-runtime', + 'sp-runtime/try-runtime', +] [dependencies] # crates.io -impl-trait-for-tuples = "0.2.1" +impl-trait-for-tuples = { version = "0.2.2", default-features = false } # substrate -scale-info = { version = "2.1.1", default-features = false, features = ["derive"] } +scale-info = { version = "2.10.0", default-features = false, features = ["derive"] } [dependencies.codec] default-features = false features = ['derive'] package = 'parity-scale-codec' -version = "3.1.5" +version = "3.6.9" [dependencies.frame-support] default-features = false -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' [dependencies.serde] -version = "1.0.101" -optional = true +default-features = false +version = "1.0.195" features = ["derive"] [dependencies.sp-runtime] default-features = false -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' - -[dependencies.sp-std] -default-features = false -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' - +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' ### DOC ### [package.metadata.docs.rs] +default-features = false targets = ['x86_64-unknown-linux-gnu'] + +[dependencies.sp-std] +default-features = false +git = 'https://github.com/duniter/duniter-polkadot-sdk' +branch = 'duniter-substrate-v1.6.0' diff --git a/primitives/membership/src/lib.rs b/primitives/membership/src/lib.rs index 897bf64ffc81003caef3f02a60aff9251f2b7945..64f7f821f1ec8a9dd05b77d1491b3c6b9479e490 100644 --- a/primitives/membership/src/lib.rs +++ b/primitives/membership/src/lib.rs @@ -22,9 +22,9 @@ pub mod traits; use codec::{Decode, Encode}; -use frame_support::RuntimeDebug; +use frame_support::pallet_prelude::RuntimeDebug; + use scale_info::TypeInfo; -#[cfg(feature = "std")] use serde::{Deserialize, Serialize}; /// membership events @@ -37,8 +37,19 @@ pub enum Event<IdtyId> { MembershipRenewed(IdtyId), } -#[cfg_attr(feature = "std", derive(Deserialize, Serialize))] -#[derive(Encode, Decode, Default, Clone, Copy, PartialEq, Eq, RuntimeDebug, TypeInfo)] +#[derive( + Encode, + Decode, + Default, + Clone, + Copy, + PartialEq, + Eq, + RuntimeDebug, + TypeInfo, + Deserialize, + Serialize, +)] pub struct MembershipData<BlockNumber: Decode + Encode + TypeInfo> { pub expire_on: BlockNumber, } diff --git a/primitives/membership/src/traits.rs b/primitives/membership/src/traits.rs index 9e54c148b7dd06be47a76c9ca114f0e51ab6cc5b..a877fa9fb1643804e47a6c30dc1b565f4961c485 100644 --- a/primitives/membership/src/traits.rs +++ b/primitives/membership/src/traits.rs @@ -25,6 +25,7 @@ impl<IdtyId> CheckMembershipOpAllowed<IdtyId> for () { fn check_add_membership(_: IdtyId) -> Result<(), DispatchError> { Ok(()) } + fn check_renew_membership(_: IdtyId) -> Result<(), DispatchError> { Ok(()) } diff --git a/resources/weight_analyzer/Cargo.toml b/resources/weight_analyzer/Cargo.toml index 56c59b7e21cc5b10e117a43e22800756748b91b1..9a935bd0fb60eab847ba887bb4091fec148b8c4b 100644 --- a/resources/weight_analyzer/Cargo.toml +++ b/resources/weight_analyzer/Cargo.toml @@ -13,7 +13,7 @@ name = "weightanalyzer" path = "src/lib.rs" [dependencies] -subweight-core = "3.3.1" convert_case = "0.6.0" glob = "0.3.1" serde = { version = "1.0.101", features = ["derive"] } +subweight-core = "3.3.1" diff --git a/resources/weight_analyzer/src/lib.rs b/resources/weight_analyzer/src/lib.rs index 5403efab32da26a04b5e74a27b669edad409bf45..14e8bf7ae2b38acc702924d0c85107726085ac9c 100644 --- a/resources/weight_analyzer/src/lib.rs +++ b/resources/weight_analyzer/src/lib.rs @@ -24,6 +24,7 @@ impl Default for MaxBlockWeight { } impl Div<&MaxBlockWeight> for f64 { type Output = Self; + fn div(self, max_block_weight: &MaxBlockWeight) -> Self::Output { self / max_block_weight.0 } diff --git a/runtime/common/Cargo.toml b/runtime/common/Cargo.toml index c4206e8db91fcf05e1a98aa92ae06e7dde6c5ed6..11e953e402c132883ac0f904458bcca3ca5b42fe 100644 --- a/runtime/common/Cargo.toml +++ b/runtime/common/Cargo.toml @@ -7,126 +7,167 @@ authors = ['Axiom-Team Developers <https://axiom-team.fr>'] edition = "2021" [features] +default = ['std'] +no_std = [] constant-fees = [] runtime-benchmarks = [ - "frame-benchmarking/runtime-benchmarks", - 'frame-support/runtime-benchmarks', + 'frame-benchmarking/runtime-benchmarks', 'frame-system-benchmarking/runtime-benchmarks', + 'frame-support/runtime-benchmarks', 'frame-system/runtime-benchmarks', "pallet-babe/runtime-benchmarks", 'pallet-balances/runtime-benchmarks', 'pallet-certification/runtime-benchmarks', + 'pallet-offences/runtime-benchmarks', 'pallet-collective/runtime-benchmarks', 'pallet-duniter-wot/runtime-benchmarks', 'pallet-identity/runtime-benchmarks', 'pallet-membership/runtime-benchmarks', + 'pallet-quota/runtime-benchmarks', + 'pallet-provide-randomness/runtime-benchmarks', 'pallet-im-online/runtime-benchmarks', + 'pallet-universal-dividend/runtime-benchmarks', + 'pallet-oneshot-account/runtime-benchmarks', 'pallet-multisig/runtime-benchmarks', 'pallet-proxy/runtime-benchmarks', 'pallet-preimage/runtime-benchmarks', - 'pallet-session-benchmarking/runtime-benchmarks', 'pallet-treasury/runtime-benchmarks', 'pallet-upgrade-origin/runtime-benchmarks', 'sp-runtime/runtime-benchmarks', ] std = [ 'codec/std', - 'duniter-primitives/std', + 'frame-benchmarking/std', + 'frame-system-benchmarking?/std', 'frame-support/std', 'frame-system/std', - 'log/std', 'pallet-authority-members/std', - 'pallet-smith-members/std', 'pallet-babe/std', 'pallet-balances/std', 'pallet-certification/std', - 'pallet-distance/std', + 'pallet-collective/std', 'pallet-duniter-account/std', - 'pallet-quota/std', 'pallet-duniter-wot/std', 'pallet-grandpa/std', 'pallet-identity/std', + 'pallet-im-online/std', 'pallet-membership/std', 'pallet-multisig/std', + "pallet-offences/std", 'pallet-oneshot-account/std', + 'pallet-preimage/std', 'pallet-provide-randomness/std', 'pallet-proxy/std', - 'pallet-scheduler/std', + 'pallet-quota/std', + 'pallet-multisig/std', + "pallet-scheduler/std", + 'pallet-session/std', + 'pallet-smith-members/std', + 'pallet-sudo/std', 'pallet-timestamp/std', 'pallet-treasury/std', 'pallet-universal-dividend/std', + 'pallet-upgrade-origin/std', + 'pallet-utility/std', + 'scale-info/std', "serde/std", - "serde_derive", 'sp-arithmetic/std', + 'sp-consensus-babe/std', 'sp-core/std', - 'sp-distance/std', 'sp-membership/std', 'sp-runtime/std', + 'sp-staking/std', 'sp-std/std', 'sp-weights/std', + 'node-primitives/std', ] try-runtime = [ - "frame-support/try-runtime", - "frame-system/try-runtime", - "pallet-babe/try-runtime", - "pallet-grandpa/try-runtime", + 'frame-support/try-runtime', + 'frame-system/try-runtime', + 'pallet-babe/try-runtime', + 'pallet-balances/try-runtime', + 'pallet-certification/try-runtime', + 'pallet-collective/try-runtime', + 'pallet-duniter-account/try-runtime', + 'pallet-duniter-wot/try-runtime', + 'pallet-grandpa/try-runtime', + 'pallet-identity/try-runtime', + 'pallet-im-online/try-runtime', + 'pallet-membership/try-runtime', + 'pallet-multisig/try-runtime', + "pallet-offences/try-runtime", + 'pallet-oneshot-account/try-runtime', + 'pallet-preimage/try-runtime', + 'pallet-provide-randomness/try-runtime', + 'pallet-proxy/try-runtime', + 'pallet-quota/try-runtime', + 'pallet-multisig/try-runtime', + "pallet-scheduler/try-runtime", + 'pallet-session/try-runtime', + 'pallet-smith-members/try-runtime', + 'pallet-sudo/try-runtime', + 'pallet-timestamp/try-runtime', + 'pallet-treasury/try-runtime', + 'pallet-universal-dividend/try-runtime', + 'pallet-upgrade-origin/try-runtime', + 'pallet-utility/try-runtime', ] [dependencies] + +# Crates.io +codec = { package = "parity-scale-codec", version = "3.6.9", features = ["derive"], default-features = false } duniter-primitives = { path = '../../primitives/duniter', default-features = false } + +# substrate benchmarks +frame-system-benchmarking = { git = "https://github.com/duniter/duniter-polkadot-sdk", branch = 'duniter-substrate-v1.6.0', default-features = false, optional = true } +frame-benchmarking = { git = "https://github.com/duniter/duniter-polkadot-sdk", branch = 'duniter-substrate-v1.6.0', default-features = false, optional = true } +frame-support = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +frame-system = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } + +# Substrate pallet-authority-members = { path = '../../pallets/authority-members', default-features = false } -pallet-smith-members = { path = '../../pallets/smith-members', default-features = false } +pallet-babe = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +pallet-balances = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } pallet-certification = { path = '../../pallets/certification', default-features = false } +pallet-collective = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } pallet-distance = { path = "../../pallets/distance", default-features = false } pallet-duniter-account = { path = '../../pallets/duniter-account', default-features = false } -pallet-quota = { path = '../../pallets/quota', default-features = false } pallet-duniter-wot = { path = '../../pallets/duniter-wot', default-features = false } +pallet-grandpa = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } pallet-identity = { path = '../../pallets/identity', default-features = false } +pallet-im-online = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } pallet-membership = { path = '../../pallets/membership', default-features = false } +pallet-multisig = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +pallet-offences = { path = '../../pallets/offences', default-features = false } pallet-oneshot-account = { path = '../../pallets/oneshot-account', default-features = false } +pallet-preimage = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } pallet-provide-randomness = { path = '../../pallets/provide-randomness', default-features = false } -pallet-upgrade-origin = { path = '../../pallets/upgrade-origin', default-features = false } +pallet-proxy = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +pallet-quota = { path = '../../pallets/quota', default-features = false } +pallet-scheduler = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +pallet-session = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +pallet-smith-members = { path = '../../pallets/smith-members', default-features = false } +pallet-sudo = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +pallet-timestamp = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +pallet-treasury = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } pallet-universal-dividend = { path = '../../pallets/universal-dividend', default-features = false } -pallet-session-benchmarking = { path = '../../pallets/session-benchmarking', default-features = false } -sp-distance = { path = '../../primitives/distance', default-features = false } +pallet-upgrade-origin = { path = '../../pallets/upgrade-origin', default-features = false } +pallet-utility = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +scale-info = { version = "2.10.0", default-features = false, features = ["derive"] } +serde = { version = "1.0.195", default-features = false } +smallvec = { version = "1.13.1", default-features = false } +sp-arithmetic = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +sp-consensus-babe = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +sp-core = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } sp-membership = { path = '../../primitives/membership', default-features = false } - -# Crates.io -codec = { package = "parity-scale-codec", version = "3.4.0", features = ["derive"], default-features = false } -log = { version = "0.4.17", default-features = false } -scale-info = { version = "2.5.0", default-features = false, features = ["derive"] } -serde = { version = "1.0.139", default-features = false } -serde_derive = { version = "1.0.117", optional = true, default-features = false } -smallvec = { version = "1.8.0", default-features = false } - -# Substrate -frame-support = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -frame-system = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -pallet-babe = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -pallet-balances = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -pallet-collective = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -pallet-grandpa = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -pallet-im-online = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -pallet-multisig = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -pallet-preimage = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -pallet-proxy = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -pallet-scheduler = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -pallet-session = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -pallet-timestamp = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -pallet-treasury = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -pallet-utility = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -sp-arithmetic = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -sp-consensus-babe = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -sp-consensus-grandpa = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -sp-core = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -sp-runtime = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -sp-std = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -sp-weights = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } - - -# substrate benchmarks -frame-benchmarking = { git = "https://github.com/duniter/substrate", branch = 'duniter-substrate-v0.9.42', default-features = false, optional = true } -frame-system-benchmarking = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false, optional = true } +sp-runtime = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } # TODO: there is a bad coupling in substrate that force to add this dependency -sp-staking = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } +sp-staking = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +sp-std = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +sp-weights = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +node-primitives = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } + +[package.metadata.docs.rs] +targets = ['x86_64-unknown-linux-gnu'] diff --git a/runtime/common/src/apis.rs b/runtime/common/src/apis.rs index acea484d81fcca848a4633db1f9ac553eb380574..ef895c58cfdd3d71ee3e88d3ea588b7c3336166e 100644 --- a/runtime/common/src/apis.rs +++ b/runtime/common/src/apis.rs @@ -268,9 +268,9 @@ macro_rules! runtime_apis { Vec<frame_benchmarking::BenchmarkBatch>, sp_runtime::RuntimeString, > { - use frame_benchmarking::{Benchmarking, BenchmarkBatch, TrackedStorageKey}; - // Trying to add benchmarks directly to some pallets caused cyclic dependency issues. - // To get around that, we separated the benchmarks into its own crate. + use frame_benchmarking::{Benchmarking, BenchmarkBatch}; +use frame_support::traits::TrackedStorageKey; +use frame_support::traits::WhitelistedStorageKeys; use pallet_session_benchmarking::Pallet as SessionBench; use frame_system_benchmarking::Pallet as SystemBench; use frame_benchmarking::baseline::Pallet as Baseline; @@ -279,7 +279,7 @@ macro_rules! runtime_apis { impl frame_system_benchmarking::Config for Runtime {} impl frame_benchmarking::baseline::Config for Runtime {} - let whitelist: Vec<TrackedStorageKey> = vec![ + /*let whitelist: Vec<TrackedStorageKey> = vec![ // Block Number hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef702a5c1b19ab7a04f536c519aca4983ac").to_vec().into(), // Total Issuance @@ -292,8 +292,9 @@ macro_rules! runtime_apis { hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef780d41e5e16056765bc8461851072c9d7").to_vec().into(), // Treasury Account hex_literal::hex!("26aa394eea5630e07c48ae0c9558cef7b99d880ec681799c0cf30e8886371da95ecffd7b6c0f78751baa9d281e0bfa3a6d6f646c70792f74727372790000000000000000000000000000000000000000").to_vec().into(), - ]; + ];*/ +let whitelist: Vec<TrackedStorageKey> = AllPalletsWithSystem::whitelisted_storage_keys(); let mut batches = Vec::<BenchmarkBatch>::new(); let params = (&config, &whitelist); add_benchmarks!(params, batches); diff --git a/runtime/common/src/entities.rs b/runtime/common/src/entities.rs index 7ee895b7fa4c00058470756c06912ceeb296d4b0..4f21fa71b02d2d026b5752f3b3c2fc5d070d412e 100644 --- a/runtime/common/src/entities.rs +++ b/runtime/common/src/entities.rs @@ -16,8 +16,6 @@ use frame_support::pallet_prelude::*; use scale_info::TypeInfo; -#[cfg(feature = "std")] -use serde::{Deserialize, Serialize}; #[macro_export] macro_rules! declare_session_keys { @@ -37,8 +35,19 @@ macro_rules! declare_session_keys { } } -#[cfg_attr(feature = "std", derive(Deserialize, Serialize))] -#[derive(Clone, Encode, Decode, Default, Eq, PartialEq, RuntimeDebug, TypeInfo, MaxEncodedLen)] +#[derive( + Clone, + Encode, + Decode, + Default, + Eq, + PartialEq, + RuntimeDebug, + TypeInfo, + MaxEncodedLen, + serde::Deserialize, + serde::Serialize, +)] pub struct IdtyData { /// number of the first claimable UD pub first_eligible_ud: pallet_universal_dividend::FirstEligibleUd, @@ -59,8 +68,19 @@ impl From<IdtyData> for pallet_universal_dividend::FirstEligibleUd { } } -#[cfg_attr(feature = "std", derive(Deserialize, Serialize))] #[derive( - Encode, Decode, Default, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, RuntimeDebug, TypeInfo, + Encode, + Decode, + Default, + Clone, + Copy, + PartialEq, + Eq, + PartialOrd, + Ord, + RuntimeDebug, + TypeInfo, + serde::Deserialize, + serde::Serialize, )] pub struct ValidatorFullIdentification; diff --git a/runtime/common/src/fees.rs b/runtime/common/src/fees.rs index fb43d4f1fdc641e827ebc9509c6b5ca6f1837ae0..1bea9d5759d1a77d1c1aabf231c082a4bb72922d 100644 --- a/runtime/common/src/fees.rs +++ b/runtime/common/src/fees.rs @@ -47,6 +47,7 @@ where fn weight_to_fee(length_in_bytes: &Weight) -> Self::Balance { Self::Balance::saturated_from(length_in_bytes.ref_time() / 100u64) } + #[cfg(feature = "constant-fees")] fn weight_to_fee(_length_in_bytes: &Weight) -> Self::Balance { 0u32.into() diff --git a/runtime/common/src/handlers.rs b/runtime/common/src/handlers.rs index c529252726f47da3cdfd6754e6b067047bd63d56..1942c41959b502d1b0a56143051cf479ea8eec88 100644 --- a/runtime/common/src/handlers.rs +++ b/runtime/common/src/handlers.rs @@ -16,8 +16,8 @@ use super::entities::*; use super::{AccountId, IdtyIndex}; -use frame_support::dispatch::UnfilteredDispatchable; use frame_support::pallet_prelude::Weight; +use frame_support::traits::UnfilteredDispatchable; use pallet_smith_members::SmithRemovalReason; // new session handler diff --git a/runtime/common/src/pallets_config.rs b/runtime/common/src/pallets_config.rs index 7e6c19e2ce4d90da6f19a5a34fec1f34375f8fed..d1893985c5523820fca3bd790bb3593d615661fb 100644 --- a/runtime/common/src/pallets_config.rs +++ b/runtime/common/src/pallets_config.rs @@ -38,16 +38,10 @@ macro_rules! pallets_config { type RuntimeCall = RuntimeCall; /// The lookup mechanism to get account ID from whatever is passed in dispatchers. type Lookup = AccountIdLookup<AccountId, ()>; - /// The index type for storing how many extrinsics an account has signed. - type Index = Index; - /// The index type for blocks. - type BlockNumber = BlockNumber; /// The type for hashing blocks and tries. type Hash = Hash; /// The hashing algorithm used. type Hashing = BlakeTwo256; - /// The header type. - type Header = generic::Header<BlockNumber, BlakeTwo256>; /// The ubiquitous event type. type RuntimeEvent = RuntimeEvent; /// The ubiquitous origin type. @@ -75,6 +69,11 @@ macro_rules! pallets_config { /// The set code logic, just the default since we're not a parachain. type OnSetCode = (); type MaxConsumers = frame_support::traits::ConstU32<16>; + /// The type for storing how many extrinsics an account has signed. + type Nonce = node_primitives::Nonce; + /// The block type for the runtime. + type Block = Block; +type RuntimeTask = (); } // SCHEDULER // @@ -123,6 +122,8 @@ macro_rules! pallets_config { parameter_types! { pub const ReloadRate: BlockNumber = 1 * HOURS; // faster than DAYS pub const MaxQuota: Balance = 1000; // 10 ĞD + pub const MaxNominators: u32 = 64; +pub TreasuryAccount: AccountId = Treasury::account_id(); // TODO } impl pallet_quota::Config for Runtime { type RuntimeEvent = RuntimeEvent; @@ -149,6 +150,7 @@ macro_rules! pallets_config { pallet_babe::EquivocationReportSystem<Self, Offences, Historical, ReportLongevity>; type WeightInfo = common_runtime::weights::pallet_babe::WeightInfo<Runtime>; type MaxAuthorities = MaxAuthorities; +type MaxNominators = MaxNominators; } impl pallet_timestamp::Config for Runtime { @@ -161,6 +163,8 @@ macro_rules! pallets_config { // MONEY MANAGEMENT // impl pallet_balances::Config for Runtime { +type RuntimeHoldReason = (); +type RuntimeFreezeReason = (); type RuntimeEvent = RuntimeEvent; type MaxLocks = MaxLocks; type MaxReserves = frame_support::pallet_prelude::ConstU32<5>; @@ -170,7 +174,6 @@ macro_rules! pallets_config { type DustRemoval = HandleDust; type ExistentialDeposit = ExistentialDeposit; type AccountStore = Account; - type HoldIdentifier = (); type FreezeIdentifier = (); type MaxHolds = frame_support::pallet_prelude::ConstU32<0>; type MaxFreezes = frame_support::pallet_prelude::ConstU32<0>; @@ -260,7 +263,6 @@ macro_rules! pallets_config { #[cfg(feature = "runtime-benchmarks")] type MaxKeys = frame_support::traits::ConstU32<1_000>; // At least 1000 to be benchmarkable see https://github.com/paritytech/substrate/blob/e94cb0dafd4f30ff29512c1c00ec513ada7d2b5d/frame/im-online/src/benchmarking.rs#L35 type MaxPeerInHeartbeats = MaxPeerInHeartbeats; - type MaxPeerDataEncodingSize = MaxPeerDataEncodingSize; } impl pallet_offences::Config for Runtime { type RuntimeEvent = RuntimeEvent; @@ -291,6 +293,7 @@ macro_rules! pallets_config { type WeightInfo = common_runtime::weights::pallet_grandpa::WeightInfo<Runtime>; type MaxAuthorities = MaxAuthorities; type MaxSetIdSessionEntries = MaxSetIdSessionEntries; + type MaxNominators = frame_support::traits::ConstU32<64>; } parameter_types! { // BondingDuration::get() * SessionsPerEra::get(); @@ -327,8 +330,7 @@ macro_rules! pallets_config { type WeightInfo = common_runtime::weights::pallet_preimage::WeightInfo<Runtime>; type Currency = Balances; type ManagerOrigin = EnsureRoot<AccountId>; - type BaseDeposit = PreimageBaseDeposit; - type ByteDeposit = PreimageByteDeposit; + type Consideration = (); } // UTILITIES // @@ -420,8 +422,16 @@ macro_rules! pallets_config { type RejectOrigin = TreasuryRejectOrigin; type SpendFunds = TreasurySpendFunds<Self>; type SpendPeriod = SpendPeriod; - type SpendOrigin = frame_support::traits::NeverEnsureOrigin<u64>; - type WeightInfo = common_runtime::weights::pallet_treasury::WeightInfo<Runtime>; + type SpendOrigin = frame_support::traits::NeverEnsureOrigin<Balance>; + type WeightInfo = common_runtime::weights::pallet_treasury::WeightInfo<Runtime>; + type AssetKind = (); + type Beneficiary = AccountId; + type BeneficiaryLookup = AccountIdLookup<AccountId, ()>; + type Paymaster = frame_support::traits::tokens::pay::PayFromAccount<Balances, TreasuryAccount>; + type BalanceConverter = frame_support::traits::tokens::UnityAssetBalanceConversion; + type PayoutPeriod = sp_core::ConstU32<10>; + #[cfg(feature = "runtime-benchmarks")] + type BenchmarkHelper = (); } // UNIVERSAL DIVIDEND // @@ -480,6 +490,12 @@ macro_rules! pallets_config { type WeightInfo = common_runtime::weights::pallet_identity::WeightInfo<Runtime>; } + impl pallet_sudo::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type RuntimeCall = RuntimeCall; + type WeightInfo = common_runtime::weights::pallet_sudo::WeightInfo<Runtime>; + } + impl pallet_membership::Config for Runtime { type CheckMembershipOpAllowed = Wot; type IdtyId = IdtyIndex; diff --git a/runtime/common/src/providers.rs b/runtime/common/src/providers.rs index 504cf92f8db91313aa780b7e8c5b2f927bc35863..c947ce58856bd7dd997448a57bbfe9be65580f1d 100644 --- a/runtime/common/src/providers.rs +++ b/runtime/common/src/providers.rs @@ -51,6 +51,7 @@ where fn get(key: &T::AccountId) -> FirstEligibleUd { pallet_identity::Pallet::<T>::get(key).first_eligible_ud } + fn try_mutate_exists<R, E: From<sp_runtime::DispatchError>>( key: &T::AccountId, f: impl FnOnce(&mut Option<FirstEligibleUd>) -> Result<R, E>, @@ -98,6 +99,7 @@ macro_rules! impl_benchmark_setup_handler { fn force_valid_distance_status(idty_id: &IdtyIndex) -> () { let _ = pallet_distance::Pallet::<T>::do_valid_distance_status(*idty_id); } + fn add_cert(issuer: &IdtyIndex, receiver: &IdtyIndex) { let _ = pallet_certification::Pallet::<T>::do_add_cert_checked( (*issuer).into(), diff --git a/runtime/common/src/weights.rs b/runtime/common/src/weights.rs index feb3b0eaaacd1aba27c6875de79a0b461d6ddea8..1bf51bdbb063859c33197a6251bf767ba1311442 100644 --- a/runtime/common/src/weights.rs +++ b/runtime/common/src/weights.rs @@ -18,6 +18,7 @@ #![allow(unused_parens)] #![allow(unused_imports)] #![allow(clippy::unnecessary_cast)] +#![allow(unused_doc_comments)] pub mod block_weights; pub mod extrinsic_weights; @@ -46,5 +47,6 @@ pub mod pallet_oneshot_account; pub mod pallet_certification; pub mod pallet_membership; pub mod pallet_smith_members; +pub mod pallet_sudo; pub mod pallet_authority_members; pub mod paritydb_weights; diff --git a/runtime/common/src/weights/block_weights.rs b/runtime/common/src/weights/block_weights.rs index 30231d207079a5c483131c0e31d995a8b44f28b8..13709dc5312da322f51bd462dfe46782ec33c15b 100644 --- a/runtime/common/src/weights/block_weights.rs +++ b/runtime/common/src/weights/block_weights.rs @@ -1,6 +1,6 @@ //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-01-15 (Y/M/D) +//! DATE: 2024-01-24 (Y/M/D) //! HOSTNAME: `bgallois-ms7d43`, CPU: `12th Gen Intel(R) Core(TM) i3-12100F` //! //! SHORT-NAME: `block`, LONG-NAME: `BlockExecution`, RUNTIME: `Ğdev Local Testnet` @@ -13,7 +13,6 @@ // benchmark // overhead // --chain=dev -// --execution=wasm // --wasm-execution=compiled // --weight-path=./runtime/common/src/weights/ // --warmup=10 @@ -27,17 +26,17 @@ parameter_types! { /// Calculated by multiplying the *Average* with `1.0` and adding `0`. /// /// Stats nanoseconds: - /// Min, Max: 143_797, 169_170 - /// Average: 147_198 - /// Median: 146_289 - /// Std-Dev: 3315.16 + /// Min, Max: 127_953, 157_199 + /// Average: 136_253 + /// Median: 134_999 + /// Std-Dev: 4551.46 /// /// Percentiles nanoseconds: - /// 99th: 157_051 - /// 95th: 152_313 - /// 75th: 147_656 + /// 99th: 155_010 + /// 95th: 145_334 + /// 75th: 136_845 pub const BlockExecutionWeight: Weight = - Weight::from_parts(WEIGHT_REF_TIME_PER_NANOS.saturating_mul(147_198), 0); + Weight::from_parts(WEIGHT_REF_TIME_PER_NANOS.saturating_mul(136_253), 0); } #[cfg(test)] diff --git a/runtime/common/src/weights/extrinsic_weights.rs b/runtime/common/src/weights/extrinsic_weights.rs index 99cd803d32fcc267868b8b7958a9fdc6a6d04b14..cbb74a08903acddc76e2c01f0a228f16aa21f9eb 100644 --- a/runtime/common/src/weights/extrinsic_weights.rs +++ b/runtime/common/src/weights/extrinsic_weights.rs @@ -1,6 +1,6 @@ //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-01-15 (Y/M/D) +//! DATE: 2024-01-24 (Y/M/D) //! HOSTNAME: `bgallois-ms7d43`, CPU: `12th Gen Intel(R) Core(TM) i3-12100F` //! //! SHORT-NAME: `extrinsic`, LONG-NAME: `ExtrinsicBase`, RUNTIME: `Ğdev Local Testnet` @@ -13,7 +13,6 @@ // benchmark // overhead // --chain=dev -// --execution=wasm // --wasm-execution=compiled // --weight-path=./runtime/common/src/weights/ // --warmup=10 @@ -27,17 +26,17 @@ parameter_types! { /// Calculated by multiplying the *Average* with `1.0` and adding `0`. /// /// Stats nanoseconds: - /// Min, Max: 86_213, 89_249 - /// Average: 88_814 - /// Median: 89_036 - /// Std-Dev: 762.64 + /// Min, Max: 70_783, 71_184 + /// Average: 70_943 + /// Median: 70_929 + /// Std-Dev: 83.18 /// /// Percentiles nanoseconds: - /// 99th: 89_245 - /// 95th: 89_207 - /// 75th: 89_105 + /// 99th: 71_160 + /// 95th: 71_090 + /// 75th: 70_988 pub const ExtrinsicBaseWeight: Weight = - Weight::from_parts(WEIGHT_REF_TIME_PER_NANOS.saturating_mul(88_814), 0); + Weight::from_parts(WEIGHT_REF_TIME_PER_NANOS.saturating_mul(70_943), 0); } #[cfg(test)] diff --git a/runtime/common/src/weights/frame_benchmarking_baseline.rs b/runtime/common/src/weights/frame_benchmarking_baseline.rs index 16f7bbd00830571853d6cc8af8894aeeb0586e7b..1c6d684c8295c5c760a01500bc7199391c032f54 100644 --- a/runtime/common/src/weights/frame_benchmarking_baseline.rs +++ b/runtime/common/src/weights/frame_benchmarking_baseline.rs @@ -31,7 +31,6 @@ // --repeat=2 // --pallet=* // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --header=./file_header.txt diff --git a/runtime/common/src/weights/frame_system.rs b/runtime/common/src/weights/frame_system.rs index d445a4911636e148bfbde5ed8069d5873bf5568c..ca4024d06cc5466649a7e3898f7be5726bb482c2 100644 --- a/runtime/common/src/weights/frame_system.rs +++ b/runtime/common/src/weights/frame_system.rs @@ -31,7 +31,6 @@ // --repeat=2 // --pallet=* // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --header=./file_header.txt @@ -70,10 +69,10 @@ impl<T: frame_system::Config> frame_system::WeightInfo for WeightInfo<T> { // Standard Error: 145 .saturating_add(Weight::from_parts(1_760, 0).saturating_mul(b.into())) } - /// Storage: System Digest (r:1 w:1) - /// Proof Skipped: System Digest (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: unknown `0x3a686561707061676573` (r:0 w:1) - /// Proof Skipped: unknown `0x3a686561707061676573` (r:0 w:1) + /// Storage: `System::Digest` (r:1 w:1) + /// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: UNKNOWN KEY `0x3a686561707061676573` (r:0 w:1) + /// Proof: UNKNOWN KEY `0x3a686561707061676573` (r:0 w:1) fn set_heap_pages() -> Weight { // Proof Size summary in bytes: // Measured: `0` @@ -84,8 +83,22 @@ impl<T: frame_system::Config> frame_system::WeightInfo for WeightInfo<T> { .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Skipped Metadata (r:0 w:0) - /// Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Measured) + /// Storage: `System::Digest` (r:1 w:1) + /// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: UNKNOWN KEY `0x3a636f6465` (r:0 w:1) + /// Proof: UNKNOWN KEY `0x3a636f6465` (r:0 w:1) + fn set_code() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `1485` + // Minimum execution time: 77_630_689_000 picoseconds. + Weight::from_parts(78_881_053_000, 0) + .saturating_add(Weight::from_parts(0, 1485)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `Skipped::Metadata` (r:0 w:0) + /// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `i` is `[0, 1000]`. fn set_storage(i: u32, ) -> Weight { // Proof Size summary in bytes: @@ -98,8 +111,8 @@ impl<T: frame_system::Config> frame_system::WeightInfo for WeightInfo<T> { .saturating_add(Weight::from_parts(1_380_876, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) } - /// Storage: Skipped Metadata (r:0 w:0) - /// Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Measured) + /// Storage: `Skipped::Metadata` (r:0 w:0) + /// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `i` is `[0, 1000]`. fn kill_storage(i: u32, ) -> Weight { // Proof Size summary in bytes: @@ -112,8 +125,8 @@ impl<T: frame_system::Config> frame_system::WeightInfo for WeightInfo<T> { .saturating_add(Weight::from_parts(841_068, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) } - /// Storage: Skipped Metadata (r:0 w:0) - /// Proof Skipped: Skipped Metadata (max_values: None, max_size: None, mode: Measured) + /// Storage: `Skipped::Metadata` (r:0 w:0) + /// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `p` is `[0, 1000]`. fn kill_prefix(p: u32, ) -> Weight { // Proof Size summary in bytes: @@ -128,4 +141,31 @@ impl<T: frame_system::Config> frame_system::WeightInfo for WeightInfo<T> { .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into()))) .saturating_add(Weight::from_parts(0, 70).saturating_mul(p.into())) } + /// Storage: `System::AuthorizedUpgrade` (r:0 w:1) + /// Proof: `System::AuthorizedUpgrade` (`max_values`: Some(1), `max_size`: Some(33), added: 528, mode: `MaxEncodedLen`) + fn authorize_upgrade() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 7_879_000 picoseconds. + Weight::from_parts(8_896_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `System::AuthorizedUpgrade` (r:1 w:1) + /// Proof: `System::AuthorizedUpgrade` (`max_values`: Some(1), `max_size`: Some(33), added: 528, mode: `MaxEncodedLen`) + /// Storage: `System::Digest` (r:1 w:1) + /// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: UNKNOWN KEY `0x3a636f6465` (r:0 w:1) + /// Proof: UNKNOWN KEY `0x3a636f6465` (r:0 w:1) + fn apply_authorized_upgrade() -> Weight { + // Proof Size summary in bytes: + // Measured: `22` + // Estimated: `1518` + // Minimum execution time: 81_052_498_000 picoseconds. + Weight::from_parts(81_887_122_000, 0) + .saturating_add(Weight::from_parts(0, 1518)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(3)) + } } diff --git a/runtime/common/src/weights/pallet_authority_members.rs b/runtime/common/src/weights/pallet_authority_members.rs index 505b818d8e6865116f089fc1d4e2bb343447c222..59950c97fe545430c5ba2b4e9cf90d88bd774516 100644 --- a/runtime/common/src/weights/pallet_authority_members.rs +++ b/runtime/common/src/weights/pallet_authority_members.rs @@ -31,7 +31,6 @@ // --repeat=2 // --pallet=* // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --header=./file_header.txt @@ -48,18 +47,18 @@ use core::marker::PhantomData; /// Weight functions for `pallet_authority_members`. pub struct WeightInfo<T>(PhantomData<T>); impl<T: frame_system::Config> pallet_authority_members::WeightInfo for WeightInfo<T> { - /// Storage: Identity IdentityIndexOf (r:1 w:0) - /// Proof Skipped: Identity IdentityIndexOf (max_values: None, max_size: None, mode: Measured) - /// Storage: SmithMembers Smiths (r:1 w:0) - /// Proof Skipped: SmithMembers Smiths (max_values: None, max_size: None, mode: Measured) - /// Storage: AuthorityMembers Members (r:1 w:0) - /// Proof Skipped: AuthorityMembers Members (max_values: None, max_size: None, mode: Measured) - /// Storage: AuthorityMembers OutgoingAuthorities (r:1 w:1) - /// Proof Skipped: AuthorityMembers OutgoingAuthorities (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: AuthorityMembers IncomingAuthorities (r:1 w:0) - /// Proof Skipped: AuthorityMembers IncomingAuthorities (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: AuthorityMembers OnlineAuthorities (r:1 w:0) - /// Proof Skipped: AuthorityMembers OnlineAuthorities (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `Identity::IdentityIndexOf` (r:1 w:0) + /// Proof: `Identity::IdentityIndexOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmithMembers::Smiths` (r:1 w:0) + /// Proof: `SmithMembers::Smiths` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `AuthorityMembers::Members` (r:1 w:0) + /// Proof: `AuthorityMembers::Members` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `AuthorityMembers::OutgoingAuthorities` (r:1 w:1) + /// Proof: `AuthorityMembers::OutgoingAuthorities` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `AuthorityMembers::IncomingAuthorities` (r:1 w:0) + /// Proof: `AuthorityMembers::IncomingAuthorities` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `AuthorityMembers::OnlineAuthorities` (r:1 w:0) + /// Proof: `AuthorityMembers::OnlineAuthorities` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn go_offline() -> Weight { // Proof Size summary in bytes: // Measured: `717` @@ -70,22 +69,22 @@ impl<T: frame_system::Config> pallet_authority_members::WeightInfo for WeightInf .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Identity IdentityIndexOf (r:1 w:0) - /// Proof Skipped: Identity IdentityIndexOf (max_values: None, max_size: None, mode: Measured) - /// Storage: SmithMembers Smiths (r:1 w:0) - /// Proof Skipped: SmithMembers Smiths (max_values: None, max_size: None, mode: Measured) - /// Storage: AuthorityMembers Blacklist (r:1 w:0) - /// Proof Skipped: AuthorityMembers Blacklist (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: AuthorityMembers Members (r:1 w:0) - /// Proof Skipped: AuthorityMembers Members (max_values: None, max_size: None, mode: Measured) - /// Storage: Session NextKeys (r:1 w:0) - /// Proof Skipped: Session NextKeys (max_values: None, max_size: None, mode: Measured) - /// Storage: AuthorityMembers IncomingAuthorities (r:1 w:1) - /// Proof Skipped: AuthorityMembers IncomingAuthorities (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: AuthorityMembers OutgoingAuthorities (r:1 w:0) - /// Proof Skipped: AuthorityMembers OutgoingAuthorities (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: AuthorityMembers OnlineAuthorities (r:1 w:0) - /// Proof Skipped: AuthorityMembers OnlineAuthorities (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `Identity::IdentityIndexOf` (r:1 w:0) + /// Proof: `Identity::IdentityIndexOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmithMembers::Smiths` (r:1 w:0) + /// Proof: `SmithMembers::Smiths` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `AuthorityMembers::Blacklist` (r:1 w:0) + /// Proof: `AuthorityMembers::Blacklist` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `AuthorityMembers::Members` (r:1 w:0) + /// Proof: `AuthorityMembers::Members` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Session::NextKeys` (r:1 w:0) + /// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `AuthorityMembers::IncomingAuthorities` (r:1 w:1) + /// Proof: `AuthorityMembers::IncomingAuthorities` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `AuthorityMembers::OutgoingAuthorities` (r:1 w:0) + /// Proof: `AuthorityMembers::OutgoingAuthorities` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `AuthorityMembers::OnlineAuthorities` (r:1 w:0) + /// Proof: `AuthorityMembers::OnlineAuthorities` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn go_online() -> Weight { // Proof Size summary in bytes: // Measured: `1108` @@ -96,18 +95,18 @@ impl<T: frame_system::Config> pallet_authority_members::WeightInfo for WeightInf .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Identity IdentityIndexOf (r:1 w:0) - /// Proof Skipped: Identity IdentityIndexOf (max_values: None, max_size: None, mode: Measured) - /// Storage: SmithMembers Smiths (r:1 w:0) - /// Proof Skipped: SmithMembers Smiths (max_values: None, max_size: None, mode: Measured) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(126), added: 2601, mode: MaxEncodedLen) - /// Storage: Session NextKeys (r:1 w:1) - /// Proof Skipped: Session NextKeys (max_values: None, max_size: None, mode: Measured) - /// Storage: Session KeyOwner (r:4 w:0) - /// Proof Skipped: Session KeyOwner (max_values: None, max_size: None, mode: Measured) - /// Storage: AuthorityMembers Members (r:0 w:1) - /// Proof Skipped: AuthorityMembers Members (max_values: None, max_size: None, mode: Measured) + /// Storage: `Identity::IdentityIndexOf` (r:1 w:0) + /// Proof: `Identity::IdentityIndexOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmithMembers::Smiths` (r:1 w:0) + /// Proof: `SmithMembers::Smiths` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:0) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(126), added: 2601, mode: `MaxEncodedLen`) + /// Storage: `Session::NextKeys` (r:1 w:1) + /// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Session::KeyOwner` (r:4 w:0) + /// Proof: `Session::KeyOwner` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `AuthorityMembers::Members` (r:0 w:1) + /// Proof: `AuthorityMembers::Members` (`max_values`: None, `max_size`: None, mode: `Measured`) fn set_session_keys() -> Weight { // Proof Size summary in bytes: // Measured: `1512` @@ -118,20 +117,20 @@ impl<T: frame_system::Config> pallet_authority_members::WeightInfo for WeightInf .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: AuthorityMembers Members (r:1 w:1) - /// Proof Skipped: AuthorityMembers Members (max_values: None, max_size: None, mode: Measured) - /// Storage: AuthorityMembers OnlineAuthorities (r:1 w:1) - /// Proof Skipped: AuthorityMembers OnlineAuthorities (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: AuthorityMembers OutgoingAuthorities (r:1 w:1) - /// Proof Skipped: AuthorityMembers OutgoingAuthorities (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: AuthorityMembers IncomingAuthorities (r:1 w:1) - /// Proof Skipped: AuthorityMembers IncomingAuthorities (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Session NextKeys (r:1 w:1) - /// Proof Skipped: Session NextKeys (max_values: None, max_size: None, mode: Measured) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(126), added: 2601, mode: MaxEncodedLen) - /// Storage: Session KeyOwner (r:0 w:4) - /// Proof Skipped: Session KeyOwner (max_values: None, max_size: None, mode: Measured) + /// Storage: `AuthorityMembers::Members` (r:1 w:1) + /// Proof: `AuthorityMembers::Members` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `AuthorityMembers::OnlineAuthorities` (r:1 w:1) + /// Proof: `AuthorityMembers::OnlineAuthorities` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `AuthorityMembers::OutgoingAuthorities` (r:1 w:1) + /// Proof: `AuthorityMembers::OutgoingAuthorities` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `AuthorityMembers::IncomingAuthorities` (r:1 w:1) + /// Proof: `AuthorityMembers::IncomingAuthorities` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Session::NextKeys` (r:1 w:1) + /// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(126), added: 2601, mode: `MaxEncodedLen`) + /// Storage: `Session::KeyOwner` (r:0 w:4) + /// Proof: `Session::KeyOwner` (`max_values`: None, `max_size`: None, mode: `Measured`) fn remove_member() -> Weight { // Proof Size summary in bytes: // Measured: `750` @@ -142,8 +141,8 @@ impl<T: frame_system::Config> pallet_authority_members::WeightInfo for WeightInf .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(10)) } - /// Storage: AuthorityMembers Blacklist (r:1 w:1) - /// Proof Skipped: AuthorityMembers Blacklist (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `AuthorityMembers::Blacklist` (r:1 w:1) + /// Proof: `AuthorityMembers::Blacklist` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn remove_member_from_blacklist() -> Weight { // Proof Size summary in bytes: // Measured: `199` diff --git a/runtime/common/src/weights/pallet_babe.rs b/runtime/common/src/weights/pallet_babe.rs index ea526bb2e3ddb47ed35b6e771d460320999ce78a..caa37df090cc508af9b16853df12c04eefcff5c2 100644 --- a/runtime/common/src/weights/pallet_babe.rs +++ b/runtime/common/src/weights/pallet_babe.rs @@ -33,7 +33,7 @@ impl<T: frame_system::Config> pallet_babe::WeightInfo for WeightInfo<T> { T::DbWeight::get().writes(1) } - fn report_equivocation(validator_count: u32) -> Weight { + fn report_equivocation(validator_count: u32, _p: u32) -> Weight { // we take the validator set count from the membership proof to // calculate the weight but we set a floor of 100 validators. let validator_count = validator_count.max(100) as u64; diff --git a/runtime/common/src/weights/pallet_balances.rs b/runtime/common/src/weights/pallet_balances.rs index d274a3ebda0d41af123699d5caa7df6761d271bc..10c17c0b946e58594738288ef986260f61b23976 100644 --- a/runtime/common/src/weights/pallet_balances.rs +++ b/runtime/common/src/weights/pallet_balances.rs @@ -31,7 +31,6 @@ // --repeat=2 // --pallet=* // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --header=./file_header.txt @@ -48,10 +47,10 @@ use core::marker::PhantomData; /// Weight functions for `pallet_balances`. pub struct WeightInfo<T>(PhantomData<T>); impl<T: frame_system::Config> pallet_balances::WeightInfo for WeightInfo<T> { - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(126), added: 2601, mode: MaxEncodedLen) - /// Storage: Account PendingNewAccounts (r:0 w:1) - /// Proof Skipped: Account PendingNewAccounts (max_values: None, max_size: None, mode: Measured) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(126), added: 2601, mode: `MaxEncodedLen`) + /// Storage: `Account::PendingNewAccounts` (r:0 w:1) + /// Proof: `Account::PendingNewAccounts` (`max_values`: None, `max_size`: None, mode: `Measured`) fn transfer_allow_death() -> Weight { // Proof Size summary in bytes: // Measured: `0` @@ -114,11 +113,11 @@ impl<T: frame_system::Config> pallet_balances::WeightInfo for WeightInfo<T> { .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(126), added: 2601, mode: MaxEncodedLen) - /// Storage: Account PendingNewAccounts (r:0 w:1) - /// Proof Skipped: Account PendingNewAccounts (max_values: None, max_size: None, mode: Measured) - fn transfer_all() -> Weight { + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(126), added: 2601, mode: `MaxEncodedLen`) + /// Storage: `Account::PendingNewAccounts` (r:0 w:1) + /// Proof: `Account::PendingNewAccounts` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn transfer_keep_alive() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `3591` @@ -128,8 +127,60 @@ impl<T: frame_system::Config> pallet_balances::WeightInfo for WeightInfo<T> { .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(126), added: 2601, mode: MaxEncodedLen) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(126), added: 2601, mode: `MaxEncodedLen`) + fn force_set_balance_creating() -> Weight { + // Proof Size summary in bytes: + // Measured: `101` + // Estimated: `3591` + // Minimum execution time: 9_693_000 picoseconds. + Weight::from_parts(10_211_000, 0) + .saturating_add(Weight::from_parts(0, 3591)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(126), added: 2601, mode: `MaxEncodedLen`) + fn force_set_balance_killing() -> Weight { + // Proof Size summary in bytes: + // Measured: `101` + // Estimated: `3591` + // Minimum execution time: 14_040_000 picoseconds. + Weight::from_parts(14_480_000, 0) + .saturating_add(Weight::from_parts(0, 3591)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `System::Account` (r:3 w:3) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(126), added: 2601, mode: `MaxEncodedLen`) + /// Storage: `Account::PendingNewAccounts` (r:0 w:1) + /// Proof: `Account::PendingNewAccounts` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn force_transfer() -> Weight { + // Proof Size summary in bytes: + // Measured: `128` + // Estimated: `8793` + // Minimum execution time: 46_820_000 picoseconds. + Weight::from_parts(48_569_000, 0) + .saturating_add(Weight::from_parts(0, 8793)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(4)) + } + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(126), added: 2601, mode: `MaxEncodedLen`) + /// Storage: `Account::PendingNewAccounts` (r:0 w:1) + /// Proof: `Account::PendingNewAccounts` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn transfer_all() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `3591` + // Minimum execution time: 38_912_000 picoseconds. + Weight::from_parts(40_985_000, 0) + .saturating_add(Weight::from_parts(0, 3591)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(126), added: 2601, mode: `MaxEncodedLen`) fn force_unreserve() -> Weight { // Proof Size summary in bytes: // Measured: `101` diff --git a/runtime/common/src/weights/pallet_certification.rs b/runtime/common/src/weights/pallet_certification.rs index 4679203343bb3d265b8ac1c23dd8977e8160d96c..948c3caf242de24ca4c98a8d2bc60c495f96db77 100644 --- a/runtime/common/src/weights/pallet_certification.rs +++ b/runtime/common/src/weights/pallet_certification.rs @@ -31,7 +31,6 @@ // --repeat=2 // --pallet=* // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --header=./file_header.txt diff --git a/runtime/common/src/weights/pallet_collective.rs b/runtime/common/src/weights/pallet_collective.rs index cf7b510b886994933291eaf1b8551e021aab6a37..3aa7a37d93334498accb833ddac343b79254a524 100644 --- a/runtime/common/src/weights/pallet_collective.rs +++ b/runtime/common/src/weights/pallet_collective.rs @@ -31,7 +31,6 @@ // --repeat=2 // --pallet=* // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --header=./file_header.txt @@ -48,14 +47,14 @@ use core::marker::PhantomData; /// Weight functions for `pallet_collective`. pub struct WeightInfo<T>(PhantomData<T>); impl<T: frame_system::Config> pallet_collective::WeightInfo for WeightInfo<T> { - /// Storage: TechnicalCommittee Members (r:1 w:1) - /// Proof Skipped: TechnicalCommittee Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TechnicalCommittee Proposals (r:1 w:0) - /// Proof Skipped: TechnicalCommittee Proposals (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TechnicalCommittee Voting (r:20 w:20) - /// Proof Skipped: TechnicalCommittee Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: TechnicalCommittee Prime (r:0 w:1) - /// Proof Skipped: TechnicalCommittee Prime (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `TechnicalCommittee::Members` (r:1 w:1) + /// Proof: `TechnicalCommittee::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TechnicalCommittee::Proposals` (r:1 w:0) + /// Proof: `TechnicalCommittee::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TechnicalCommittee::Voting` (r:20 w:20) + /// Proof: `TechnicalCommittee::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TechnicalCommittee::Prime` (r:0 w:1) + /// Proof: `TechnicalCommittee::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// The range of component `m` is `[0, 100]`. /// The range of component `n` is `[0, 100]`. /// The range of component `p` is `[0, 20]`. @@ -77,8 +76,8 @@ impl<T: frame_system::Config> pallet_collective::WeightInfo for WeightInfo<T> { .saturating_add(Weight::from_parts(0, 9624).saturating_mul(m.into())) .saturating_add(Weight::from_parts(0, 1918).saturating_mul(p.into())) } - /// Storage: TechnicalCommittee Members (r:1 w:0) - /// Proof Skipped: TechnicalCommittee Members (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `TechnicalCommittee::Members` (r:1 w:0) + /// Proof: `TechnicalCommittee::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// The range of component `b` is `[2, 1024]`. /// The range of component `m` is `[1, 100]`. fn execute(b: u32, m: u32, ) -> Weight { @@ -95,10 +94,10 @@ impl<T: frame_system::Config> pallet_collective::WeightInfo for WeightInfo<T> { .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(Weight::from_parts(0, 32).saturating_mul(m.into())) } - /// Storage: TechnicalCommittee Members (r:1 w:0) - /// Proof Skipped: TechnicalCommittee Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TechnicalCommittee ProposalOf (r:1 w:0) - /// Proof Skipped: TechnicalCommittee ProposalOf (max_values: None, max_size: None, mode: Measured) + /// Storage: `TechnicalCommittee::Members` (r:1 w:0) + /// Proof: `TechnicalCommittee::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TechnicalCommittee::ProposalOf` (r:1 w:0) + /// Proof: `TechnicalCommittee::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `b` is `[2, 1024]`. /// The range of component `m` is `[1, 100]`. fn propose_execute(b: u32, m: u32, ) -> Weight { @@ -115,16 +114,16 @@ impl<T: frame_system::Config> pallet_collective::WeightInfo for WeightInfo<T> { .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(Weight::from_parts(0, 32).saturating_mul(m.into())) } - /// Storage: TechnicalCommittee Members (r:1 w:0) - /// Proof Skipped: TechnicalCommittee Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TechnicalCommittee ProposalOf (r:1 w:1) - /// Proof Skipped: TechnicalCommittee ProposalOf (max_values: None, max_size: None, mode: Measured) - /// Storage: TechnicalCommittee Proposals (r:1 w:1) - /// Proof Skipped: TechnicalCommittee Proposals (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TechnicalCommittee ProposalCount (r:1 w:1) - /// Proof Skipped: TechnicalCommittee ProposalCount (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TechnicalCommittee Voting (r:0 w:1) - /// Proof Skipped: TechnicalCommittee Voting (max_values: None, max_size: None, mode: Measured) + /// Storage: `TechnicalCommittee::Members` (r:1 w:0) + /// Proof: `TechnicalCommittee::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TechnicalCommittee::ProposalOf` (r:1 w:1) + /// Proof: `TechnicalCommittee::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TechnicalCommittee::Proposals` (r:1 w:1) + /// Proof: `TechnicalCommittee::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TechnicalCommittee::ProposalCount` (r:1 w:1) + /// Proof: `TechnicalCommittee::ProposalCount` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TechnicalCommittee::Voting` (r:0 w:1) + /// Proof: `TechnicalCommittee::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `b` is `[2, 1024]`. /// The range of component `m` is `[2, 100]`. /// The range of component `p` is `[1, 20]`. @@ -144,10 +143,10 @@ impl<T: frame_system::Config> pallet_collective::WeightInfo for WeightInfo<T> { .saturating_add(Weight::from_parts(0, 32).saturating_mul(m.into())) .saturating_add(Weight::from_parts(0, 58).saturating_mul(p.into())) } - /// Storage: TechnicalCommittee Members (r:1 w:0) - /// Proof Skipped: TechnicalCommittee Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TechnicalCommittee Voting (r:1 w:1) - /// Proof Skipped: TechnicalCommittee Voting (max_values: None, max_size: None, mode: Measured) + /// Storage: `TechnicalCommittee::Members` (r:1 w:0) + /// Proof: `TechnicalCommittee::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TechnicalCommittee::Voting` (r:1 w:1) + /// Proof: `TechnicalCommittee::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `m` is `[5, 100]`. fn vote(m: u32, ) -> Weight { // Proof Size summary in bytes: @@ -160,14 +159,14 @@ impl<T: frame_system::Config> pallet_collective::WeightInfo for WeightInfo<T> { .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(Weight::from_parts(0, 64).saturating_mul(m.into())) } - /// Storage: TechnicalCommittee Voting (r:1 w:1) - /// Proof Skipped: TechnicalCommittee Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: TechnicalCommittee Members (r:1 w:0) - /// Proof Skipped: TechnicalCommittee Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TechnicalCommittee Proposals (r:1 w:1) - /// Proof Skipped: TechnicalCommittee Proposals (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TechnicalCommittee ProposalOf (r:0 w:1) - /// Proof Skipped: TechnicalCommittee ProposalOf (max_values: None, max_size: None, mode: Measured) + /// Storage: `TechnicalCommittee::Voting` (r:1 w:1) + /// Proof: `TechnicalCommittee::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TechnicalCommittee::Members` (r:1 w:0) + /// Proof: `TechnicalCommittee::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TechnicalCommittee::Proposals` (r:1 w:1) + /// Proof: `TechnicalCommittee::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TechnicalCommittee::ProposalOf` (r:0 w:1) + /// Proof: `TechnicalCommittee::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `m` is `[4, 100]`. /// The range of component `p` is `[1, 20]`. fn close_early_disapproved(m: u32, p: u32, ) -> Weight { @@ -184,14 +183,14 @@ impl<T: frame_system::Config> pallet_collective::WeightInfo for WeightInfo<T> { .saturating_add(Weight::from_parts(0, 64).saturating_mul(m.into())) .saturating_add(Weight::from_parts(0, 55).saturating_mul(p.into())) } - /// Storage: TechnicalCommittee Voting (r:1 w:1) - /// Proof Skipped: TechnicalCommittee Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: TechnicalCommittee Members (r:1 w:0) - /// Proof Skipped: TechnicalCommittee Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TechnicalCommittee ProposalOf (r:1 w:1) - /// Proof Skipped: TechnicalCommittee ProposalOf (max_values: None, max_size: None, mode: Measured) - /// Storage: TechnicalCommittee Proposals (r:1 w:1) - /// Proof Skipped: TechnicalCommittee Proposals (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `TechnicalCommittee::Voting` (r:1 w:1) + /// Proof: `TechnicalCommittee::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TechnicalCommittee::Members` (r:1 w:0) + /// Proof: `TechnicalCommittee::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TechnicalCommittee::ProposalOf` (r:1 w:1) + /// Proof: `TechnicalCommittee::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TechnicalCommittee::Proposals` (r:1 w:1) + /// Proof: `TechnicalCommittee::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// The range of component `b` is `[2, 1024]`. /// The range of component `m` is `[4, 100]`. /// The range of component `p` is `[1, 20]`. @@ -212,16 +211,16 @@ impl<T: frame_system::Config> pallet_collective::WeightInfo for WeightInfo<T> { .saturating_add(Weight::from_parts(0, 64).saturating_mul(m.into())) .saturating_add(Weight::from_parts(0, 79).saturating_mul(p.into())) } - /// Storage: TechnicalCommittee Voting (r:1 w:1) - /// Proof Skipped: TechnicalCommittee Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: TechnicalCommittee Members (r:1 w:0) - /// Proof Skipped: TechnicalCommittee Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TechnicalCommittee Prime (r:1 w:0) - /// Proof Skipped: TechnicalCommittee Prime (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TechnicalCommittee Proposals (r:1 w:1) - /// Proof Skipped: TechnicalCommittee Proposals (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TechnicalCommittee ProposalOf (r:0 w:1) - /// Proof Skipped: TechnicalCommittee ProposalOf (max_values: None, max_size: None, mode: Measured) + /// Storage: `TechnicalCommittee::Voting` (r:1 w:1) + /// Proof: `TechnicalCommittee::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TechnicalCommittee::Members` (r:1 w:0) + /// Proof: `TechnicalCommittee::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TechnicalCommittee::Prime` (r:1 w:0) + /// Proof: `TechnicalCommittee::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TechnicalCommittee::Proposals` (r:1 w:1) + /// Proof: `TechnicalCommittee::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TechnicalCommittee::ProposalOf` (r:0 w:1) + /// Proof: `TechnicalCommittee::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `m` is `[4, 100]`. /// The range of component `p` is `[1, 20]`. fn close_disapproved(m: u32, p: u32, ) -> Weight { @@ -240,16 +239,16 @@ impl<T: frame_system::Config> pallet_collective::WeightInfo for WeightInfo<T> { .saturating_add(Weight::from_parts(0, 64).saturating_mul(m.into())) .saturating_add(Weight::from_parts(0, 55).saturating_mul(p.into())) } - /// Storage: TechnicalCommittee Voting (r:1 w:1) - /// Proof Skipped: TechnicalCommittee Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: TechnicalCommittee Members (r:1 w:0) - /// Proof Skipped: TechnicalCommittee Members (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TechnicalCommittee Prime (r:1 w:0) - /// Proof Skipped: TechnicalCommittee Prime (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TechnicalCommittee ProposalOf (r:1 w:1) - /// Proof Skipped: TechnicalCommittee ProposalOf (max_values: None, max_size: None, mode: Measured) - /// Storage: TechnicalCommittee Proposals (r:1 w:1) - /// Proof Skipped: TechnicalCommittee Proposals (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `TechnicalCommittee::Voting` (r:1 w:1) + /// Proof: `TechnicalCommittee::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TechnicalCommittee::Members` (r:1 w:0) + /// Proof: `TechnicalCommittee::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TechnicalCommittee::Prime` (r:1 w:0) + /// Proof: `TechnicalCommittee::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TechnicalCommittee::ProposalOf` (r:1 w:1) + /// Proof: `TechnicalCommittee::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TechnicalCommittee::Proposals` (r:1 w:1) + /// Proof: `TechnicalCommittee::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// The range of component `b` is `[2, 1024]`. /// The range of component `m` is `[4, 100]`. /// The range of component `p` is `[1, 20]`. @@ -268,12 +267,12 @@ impl<T: frame_system::Config> pallet_collective::WeightInfo for WeightInfo<T> { .saturating_add(Weight::from_parts(0, 64).saturating_mul(m.into())) .saturating_add(Weight::from_parts(0, 79).saturating_mul(p.into())) } - /// Storage: TechnicalCommittee Proposals (r:1 w:1) - /// Proof Skipped: TechnicalCommittee Proposals (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: TechnicalCommittee Voting (r:0 w:1) - /// Proof Skipped: TechnicalCommittee Voting (max_values: None, max_size: None, mode: Measured) - /// Storage: TechnicalCommittee ProposalOf (r:0 w:1) - /// Proof Skipped: TechnicalCommittee ProposalOf (max_values: None, max_size: None, mode: Measured) + /// Storage: `TechnicalCommittee::Proposals` (r:1 w:1) + /// Proof: `TechnicalCommittee::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `TechnicalCommittee::Voting` (r:0 w:1) + /// Proof: `TechnicalCommittee::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `TechnicalCommittee::ProposalOf` (r:0 w:1) + /// Proof: `TechnicalCommittee::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `p` is `[1, 20]`. fn disapprove_proposal(p: u32, ) -> Weight { // Proof Size summary in bytes: diff --git a/runtime/common/src/weights/pallet_distance.rs b/runtime/common/src/weights/pallet_distance.rs index 52551ece62422452c93a1eae61c023c55b570574..b930f67446dab73b5b335d4371a0e1606dfd529d 100644 --- a/runtime/common/src/weights/pallet_distance.rs +++ b/runtime/common/src/weights/pallet_distance.rs @@ -19,8 +19,8 @@ //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev //! DATE: 2024-01-22, STEPS: `2`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `squirrel`, CPU: `Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 +//! HOSTNAME: `bgallois-ms7d43`, CPU: `12th Gen Intel(R) Core(TM) i3-12100F` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: // ./target/release/duniter @@ -31,7 +31,6 @@ // --repeat=2 // --pallet=* // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --header=./file_header.txt @@ -104,18 +103,18 @@ impl<T: frame_system::Config> pallet_distance::WeightInfo for WeightInfo<T> { .saturating_add(T::DbWeight::get().reads(10)) .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: Distance DidUpdate (r:1 w:1) - /// Proof Skipped: Distance DidUpdate (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Authorship Author (r:1 w:1) - /// Proof: Authorship Author (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) - /// Storage: System Digest (r:1 w:0) - /// Proof Skipped: System Digest (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Session Validators (r:1 w:0) - /// Proof Skipped: Session Validators (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Session CurrentIndex (r:1 w:0) - /// Proof Skipped: Session CurrentIndex (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Distance EvaluationPool0 (r:1 w:1) - /// Proof Skipped: Distance EvaluationPool0 (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `Distance::DidUpdate` (r:1 w:1) + /// Proof: `Distance::DidUpdate` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Authorship::Author` (r:1 w:1) + /// Proof: `Authorship::Author` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`) + /// Storage: `System::Digest` (r:1 w:0) + /// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Session::Validators` (r:1 w:0) + /// Proof: `Session::Validators` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Session::CurrentIndex` (r:1 w:0) + /// Proof: `Session::CurrentIndex` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Distance::EvaluationPool0` (r:1 w:1) + /// Proof: `Distance::EvaluationPool0` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// The range of component `i` is `[1, 600]`. fn update_evaluation(i: u32, ) -> Weight { // Proof Size summary in bytes: @@ -130,10 +129,10 @@ impl<T: frame_system::Config> pallet_distance::WeightInfo for WeightInfo<T> { .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(Weight::from_parts(0, 10).saturating_mul(i.into())) } - /// Storage: Session CurrentIndex (r:1 w:0) - /// Proof Skipped: Session CurrentIndex (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Distance EvaluationPool0 (r:1 w:1) - /// Proof Skipped: Distance EvaluationPool0 (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `Session::CurrentIndex` (r:1 w:0) + /// Proof: `Session::CurrentIndex` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Distance::EvaluationPool0` (r:1 w:1) + /// Proof: `Distance::EvaluationPool0` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// The range of component `i` is `[1, 600]`. fn force_update_evaluation(i: u32, ) -> Weight { // Proof Size summary in bytes: @@ -166,8 +165,8 @@ impl<T: frame_system::Config> pallet_distance::WeightInfo for WeightInfo<T> { .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: Distance DidUpdate (r:1 w:1) - /// Proof Skipped: Distance DidUpdate (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `Distance::DidUpdate` (r:1 w:1) + /// Proof: `Distance::DidUpdate` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn on_finalize() -> Weight { // Proof Size summary in bytes: // Measured: `170` diff --git a/runtime/common/src/weights/pallet_duniter_account.rs b/runtime/common/src/weights/pallet_duniter_account.rs index 6a911afdff360483c94dfecb316d20c41a1641e5..797603e6655d168ef4d66eff1396b14bc32d27fb 100644 --- a/runtime/common/src/weights/pallet_duniter_account.rs +++ b/runtime/common/src/weights/pallet_duniter_account.rs @@ -31,7 +31,6 @@ // --repeat=2 // --pallet=* // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --header=./file_header.txt @@ -48,8 +47,8 @@ use core::marker::PhantomData; /// Weight functions for `pallet_duniter_account`. pub struct WeightInfo<T>(PhantomData<T>); impl<T: frame_system::Config> pallet_duniter_account::WeightInfo for WeightInfo<T> { - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(126), added: 2601, mode: MaxEncodedLen) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(126), added: 2601, mode: `MaxEncodedLen`) fn unlink_identity() -> Weight { // Proof Size summary in bytes: // Measured: `0` @@ -60,22 +59,22 @@ impl<T: frame_system::Config> pallet_duniter_account::WeightInfo for WeightInfo< .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Account PendingNewAccounts (r:1 w:1) - /// Proof Skipped: Account PendingNewAccounts (max_values: None, max_size: None, mode: Measured) - /// Storage: ProvideRandomness RequestIdProvider (r:1 w:1) - /// Proof Skipped: ProvideRandomness RequestIdProvider (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: ProvideRandomness RequestsIds (r:1 w:1) - /// Proof Skipped: ProvideRandomness RequestsIds (max_values: None, max_size: None, mode: Measured) - /// Storage: ProvideRandomness CounterForRequestsIds (r:1 w:1) - /// Proof: ProvideRandomness CounterForRequestsIds (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: Babe EpochIndex (r:1 w:0) - /// Proof: Babe EpochIndex (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) - /// Storage: ProvideRandomness NexEpochHookIn (r:1 w:0) - /// Proof Skipped: ProvideRandomness NexEpochHookIn (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: ProvideRandomness RequestsReadyAtEpoch (r:1 w:1) - /// Proof Skipped: ProvideRandomness RequestsReadyAtEpoch (max_values: None, max_size: None, mode: Measured) - /// Storage: Account PendingRandomIdAssignments (r:0 w:1) - /// Proof Skipped: Account PendingRandomIdAssignments (max_values: None, max_size: None, mode: Measured) + /// Storage: `Account::PendingNewAccounts` (r:1 w:1) + /// Proof: `Account::PendingNewAccounts` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `ProvideRandomness::RequestIdProvider` (r:1 w:1) + /// Proof: `ProvideRandomness::RequestIdProvider` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ProvideRandomness::RequestsIds` (r:1 w:1) + /// Proof: `ProvideRandomness::RequestsIds` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `ProvideRandomness::CounterForRequestsIds` (r:1 w:1) + /// Proof: `ProvideRandomness::CounterForRequestsIds` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Babe::EpochIndex` (r:1 w:0) + /// Proof: `Babe::EpochIndex` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `ProvideRandomness::NexEpochHookIn` (r:1 w:0) + /// Proof: `ProvideRandomness::NexEpochHookIn` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ProvideRandomness::RequestsReadyAtEpoch` (r:1 w:1) + /// Proof: `ProvideRandomness::RequestsReadyAtEpoch` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Account::PendingRandomIdAssignments` (r:0 w:1) + /// Proof: `Account::PendingRandomIdAssignments` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `i` is `[0, 1]`. fn on_initialize_sufficient(i: u32, ) -> Weight { // Proof Size summary in bytes: @@ -91,22 +90,24 @@ impl<T: frame_system::Config> pallet_duniter_account::WeightInfo for WeightInfo< .saturating_add(T::DbWeight::get().writes((6_u64).saturating_mul(i.into()))) .saturating_add(Weight::from_parts(0, 309).saturating_mul(i.into())) } - /// Storage: Account PendingNewAccounts (r:1 w:1) - /// Proof Skipped: Account PendingNewAccounts (max_values: None, max_size: None, mode: Measured) - /// Storage: ProvideRandomness RequestIdProvider (r:1 w:1) - /// Proof Skipped: ProvideRandomness RequestIdProvider (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: ProvideRandomness RequestsIds (r:1 w:1) - /// Proof Skipped: ProvideRandomness RequestsIds (max_values: None, max_size: None, mode: Measured) - /// Storage: ProvideRandomness CounterForRequestsIds (r:1 w:1) - /// Proof: ProvideRandomness CounterForRequestsIds (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: Babe EpochIndex (r:1 w:0) - /// Proof: Babe EpochIndex (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) - /// Storage: ProvideRandomness NexEpochHookIn (r:1 w:0) - /// Proof Skipped: ProvideRandomness NexEpochHookIn (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: ProvideRandomness RequestsReadyAtEpoch (r:1 w:1) - /// Proof Skipped: ProvideRandomness RequestsReadyAtEpoch (max_values: None, max_size: None, mode: Measured) - /// Storage: Account PendingRandomIdAssignments (r:0 w:1) - /// Proof Skipped: Account PendingRandomIdAssignments (max_values: None, max_size: None, mode: Measured) + /// Storage: `Account::PendingNewAccounts` (r:1 w:1) + /// Proof: `Account::PendingNewAccounts` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(126), added: 2601, mode: `MaxEncodedLen`) + /// Storage: `ProvideRandomness::RequestIdProvider` (r:1 w:1) + /// Proof: `ProvideRandomness::RequestIdProvider` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ProvideRandomness::RequestsIds` (r:1 w:1) + /// Proof: `ProvideRandomness::RequestsIds` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `ProvideRandomness::CounterForRequestsIds` (r:1 w:1) + /// Proof: `ProvideRandomness::CounterForRequestsIds` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Babe::EpochIndex` (r:1 w:0) + /// Proof: `Babe::EpochIndex` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `ProvideRandomness::NexEpochHookIn` (r:1 w:0) + /// Proof: `ProvideRandomness::NexEpochHookIn` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ProvideRandomness::RequestsReadyAtEpoch` (r:1 w:1) + /// Proof: `ProvideRandomness::RequestsReadyAtEpoch` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Account::PendingRandomIdAssignments` (r:0 w:1) + /// Proof: `Account::PendingRandomIdAssignments` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `i` is `[0, 1]`. fn on_initialize_with_balance(i: u32, ) -> Weight { // Proof Size summary in bytes: @@ -122,8 +123,8 @@ impl<T: frame_system::Config> pallet_duniter_account::WeightInfo for WeightInfo< .saturating_add(T::DbWeight::get().writes((6_u64).saturating_mul(i.into()))) .saturating_add(Weight::from_parts(0, 309).saturating_mul(i.into())) } - /// Storage: Account PendingNewAccounts (r:1 w:1) - /// Proof Skipped: Account PendingNewAccounts (max_values: None, max_size: None, mode: Measured) + /// Storage: `Account::PendingNewAccounts` (r:1 w:1) + /// Proof: `Account::PendingNewAccounts` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `i` is `[0, 1]`. fn on_initialize_no_balance(i: u32, ) -> Weight { // Proof Size summary in bytes: @@ -138,8 +139,8 @@ impl<T: frame_system::Config> pallet_duniter_account::WeightInfo for WeightInfo< .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) .saturating_add(Weight::from_parts(0, 74).saturating_mul(i.into())) } - /// Storage: Account PendingRandomIdAssignments (r:1 w:1) - /// Proof Skipped: Account PendingRandomIdAssignments (max_values: None, max_size: None, mode: Measured) + /// Storage: `Account::PendingRandomIdAssignments` (r:1 w:1) + /// Proof: `Account::PendingRandomIdAssignments` (`max_values`: None, `max_size`: None, mode: `Measured`) fn on_filled_randomness_pending() -> Weight { // Proof Size summary in bytes: // Measured: `116` @@ -150,8 +151,8 @@ impl<T: frame_system::Config> pallet_duniter_account::WeightInfo for WeightInfo< .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Account PendingRandomIdAssignments (r:1 w:0) - /// Proof Skipped: Account PendingRandomIdAssignments (max_values: None, max_size: None, mode: Measured) + /// Storage: `Account::PendingRandomIdAssignments` (r:1 w:0) + /// Proof: `Account::PendingRandomIdAssignments` (`max_values`: None, `max_size`: None, mode: `Measured`) fn on_filled_randomness_no_pending() -> Weight { // Proof Size summary in bytes: // Measured: `42` diff --git a/runtime/common/src/weights/pallet_grandpa.rs b/runtime/common/src/weights/pallet_grandpa.rs index c30daf2614ff976b19499ea659e98a994037c6b0..3c6528f7ff9e2b8abdcedde415ad299aec208a0f 100644 --- a/runtime/common/src/weights/pallet_grandpa.rs +++ b/runtime/common/src/weights/pallet_grandpa.rs @@ -29,7 +29,7 @@ use sp_std::marker::PhantomData; /// Weight functions for `pallet_grandpa`. pub struct WeightInfo<T>(PhantomData<T>); impl<T: frame_system::Config> pallet_grandpa::WeightInfo for WeightInfo<T> { - fn report_equivocation(validator_count: u32) -> Weight { + fn report_equivocation(validator_count: u32, _p: u32) -> Weight { // we take the validator set count from the membership proof to // calculate the weight but we set a floor of 100 validators. let validator_count = validator_count.max(100) as u64; diff --git a/runtime/common/src/weights/pallet_identity.rs b/runtime/common/src/weights/pallet_identity.rs index 448e28da1f9d0658f19380253890e5a559d564e3..7f77612568a91d826195ca81d789146f7dec42e9 100644 --- a/runtime/common/src/weights/pallet_identity.rs +++ b/runtime/common/src/weights/pallet_identity.rs @@ -31,7 +31,6 @@ // --repeat=2 // --pallet=* // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --header=./file_header.txt @@ -80,14 +79,14 @@ impl<T: frame_system::Config> pallet_identity::WeightInfo for WeightInfo<T> { .saturating_add(T::DbWeight::get().reads(13)) .saturating_add(T::DbWeight::get().writes(12)) } - /// Storage: Identity IdentityIndexOf (r:1 w:0) - /// Proof Skipped: Identity IdentityIndexOf (max_values: None, max_size: None, mode: Measured) - /// Storage: Identity Identities (r:1 w:1) - /// Proof Skipped: Identity Identities (max_values: None, max_size: None, mode: Measured) - /// Storage: Identity IdentitiesNames (r:1 w:1) - /// Proof Skipped: Identity IdentitiesNames (max_values: None, max_size: None, mode: Measured) - /// Storage: Identity IdentityChangeSchedule (r:2 w:2) - /// Proof Skipped: Identity IdentityChangeSchedule (max_values: None, max_size: None, mode: Measured) + /// Storage: `Identity::IdentityIndexOf` (r:1 w:0) + /// Proof: `Identity::IdentityIndexOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Identity::Identities` (r:1 w:1) + /// Proof: `Identity::Identities` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Identity::IdentitiesNames` (r:1 w:1) + /// Proof: `Identity::IdentitiesNames` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Identity::IdentityChangeSchedule` (r:2 w:2) + /// Proof: `Identity::IdentityChangeSchedule` (`max_values`: None, `max_size`: None, mode: `Measured`) fn confirm_identity() -> Weight { // Proof Size summary in bytes: // Measured: `661` @@ -98,14 +97,14 @@ impl<T: frame_system::Config> pallet_identity::WeightInfo for WeightInfo<T> { .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(4)) } - /// Storage: Identity IdentityIndexOf (r:2 w:2) - /// Proof Skipped: Identity IdentityIndexOf (max_values: None, max_size: None, mode: Measured) - /// Storage: Identity Identities (r:1 w:1) - /// Proof Skipped: Identity Identities (max_values: None, max_size: None, mode: Measured) - /// Storage: System BlockHash (r:1 w:0) - /// Proof: System BlockHash (max_values: None, max_size: Some(44), added: 2519, mode: MaxEncodedLen) - /// Storage: System Account (r:2 w:2) - /// Proof: System Account (max_values: None, max_size: Some(126), added: 2601, mode: MaxEncodedLen) + /// Storage: `Identity::IdentityIndexOf` (r:2 w:2) + /// Proof: `Identity::IdentityIndexOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Identity::Identities` (r:1 w:1) + /// Proof: `Identity::Identities` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `System::BlockHash` (r:1 w:0) + /// Proof: `System::BlockHash` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(126), added: 2601, mode: `MaxEncodedLen`) fn change_owner_key() -> Weight { // Proof Size summary in bytes: // Measured: `714` @@ -116,16 +115,16 @@ impl<T: frame_system::Config> pallet_identity::WeightInfo for WeightInfo<T> { .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(5)) } - /// Storage: Identity Identities (r:1 w:1) - /// Proof Skipped: Identity Identities (max_values: None, max_size: None, mode: Measured) - /// Storage: System BlockHash (r:1 w:0) - /// Proof: System BlockHash (max_values: None, max_size: Some(44), added: 2519, mode: MaxEncodedLen) - /// Storage: Identity IdentityChangeSchedule (r:2 w:2) - /// Proof Skipped: Identity IdentityChangeSchedule (max_values: None, max_size: None, mode: Measured) - /// Storage: Membership Membership (r:1 w:1) - /// Proof Skipped: Membership Membership (max_values: None, max_size: None, mode: Measured) - /// Storage: Quota IdtyQuota (r:0 w:1) - /// Proof: Quota IdtyQuota (max_values: None, max_size: Some(24), added: 2499, mode: MaxEncodedLen) + /// Storage: `Identity::Identities` (r:1 w:1) + /// Proof: `Identity::Identities` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `System::BlockHash` (r:1 w:0) + /// Proof: `System::BlockHash` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`) + /// Storage: `Identity::IdentityChangeSchedule` (r:2 w:2) + /// Proof: `Identity::IdentityChangeSchedule` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Membership::Membership` (r:1 w:1) + /// Proof: `Membership::Membership` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Quota::IdtyQuota` (r:0 w:1) + /// Proof: `Quota::IdtyQuota` (`max_values`: None, `max_size`: Some(24), added: 2499, mode: `MaxEncodedLen`) fn revoke_identity() -> Weight { // Proof Size summary in bytes: // Measured: `631` @@ -150,11 +149,11 @@ impl<T: frame_system::Config> pallet_identity::WeightInfo for WeightInfo<T> { .saturating_add(Weight::from_parts(2_138_979, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) } - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(126), added: 2601, mode: MaxEncodedLen) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(126), added: 2601, mode: `MaxEncodedLen`) fn fix_sufficients() -> Weight { // Proof Size summary in bytes: - // Measured: `67` + // Measured: `105` // Estimated: `3591` // Minimum execution time: 13_275_000 picoseconds. Weight::from_parts(14_053_000, 0) @@ -162,12 +161,12 @@ impl<T: frame_system::Config> pallet_identity::WeightInfo for WeightInfo<T> { .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Identity IdentityIndexOf (r:1 w:0) - /// Proof Skipped: Identity IdentityIndexOf (max_values: None, max_size: None, mode: Measured) - /// Storage: System BlockHash (r:1 w:0) - /// Proof: System BlockHash (max_values: None, max_size: Some(44), added: 2519, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(126), added: 2601, mode: MaxEncodedLen) + /// Storage: `Identity::IdentityIndexOf` (r:1 w:0) + /// Proof: `Identity::IdentityIndexOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `System::BlockHash` (r:1 w:0) + /// Proof: `System::BlockHash` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(126), added: 2601, mode: `MaxEncodedLen`) fn link_account() -> Weight { // Proof Size summary in bytes: // Measured: `371` @@ -186,8 +185,8 @@ impl<T: frame_system::Config> pallet_identity::WeightInfo for WeightInfo<T> { Weight::from_parts(492_000, 0) .saturating_add(Weight::from_parts(0, 0)) } - /// Storage: Identity Identities (r:1 w:0) - /// Proof Skipped: Identity Identities (max_values: None, max_size: None, mode: Measured) + /// Storage: `Identity::Identities` (r:1 w:0) + /// Proof: `Identity::Identities` (`max_values`: None, `max_size`: None, mode: `Measured`) fn do_revoke_identity_noop() -> Weight { // Proof Size summary in bytes: // Measured: `269` @@ -197,36 +196,36 @@ impl<T: frame_system::Config> pallet_identity::WeightInfo for WeightInfo<T> { .saturating_add(Weight::from_parts(0, 3734)) .saturating_add(T::DbWeight::get().reads(1)) } - /// Storage: Identity Identities (r:1 w:1) - /// Proof Skipped: Identity Identities (max_values: None, max_size: None, mode: Measured) - /// Storage: Identity IdentityChangeSchedule (r:2 w:1) - /// Proof Skipped: Identity IdentityChangeSchedule (max_values: None, max_size: None, mode: Measured) - /// Storage: Membership Membership (r:1 w:1) - /// Proof Skipped: Membership Membership (max_values: None, max_size: None, mode: Measured) - /// Storage: Membership CounterForMembership (r:1 w:1) - /// Proof: Membership CounterForMembership (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: Membership MembershipsExpireOn (r:1 w:1) - /// Proof Skipped: Membership MembershipsExpireOn (max_values: None, max_size: None, mode: Measured) - /// Storage: UniversalDividend CurrentUdIndex (r:1 w:0) - /// Proof: UniversalDividend CurrentUdIndex (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen) - /// Storage: SmithMembers Smiths (r:3 w:3) - /// Proof Skipped: SmithMembers Smiths (max_values: None, max_size: None, mode: Measured) - /// Storage: AuthorityMembers Members (r:1 w:1) - /// Proof Skipped: AuthorityMembers Members (max_values: None, max_size: None, mode: Measured) - /// Storage: AuthorityMembers OnlineAuthorities (r:1 w:1) - /// Proof Skipped: AuthorityMembers OnlineAuthorities (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: AuthorityMembers OutgoingAuthorities (r:1 w:1) - /// Proof Skipped: AuthorityMembers OutgoingAuthorities (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: AuthorityMembers IncomingAuthorities (r:1 w:1) - /// Proof Skipped: AuthorityMembers IncomingAuthorities (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Session NextKeys (r:1 w:1) - /// Proof Skipped: Session NextKeys (max_values: None, max_size: None, mode: Measured) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(126), added: 2601, mode: MaxEncodedLen) - /// Storage: Quota IdtyQuota (r:0 w:1) - /// Proof: Quota IdtyQuota (max_values: None, max_size: Some(24), added: 2499, mode: MaxEncodedLen) - /// Storage: Session KeyOwner (r:0 w:4) - /// Proof Skipped: Session KeyOwner (max_values: None, max_size: None, mode: Measured) + /// Storage: `Identity::Identities` (r:1 w:1) + /// Proof: `Identity::Identities` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Identity::IdentityChangeSchedule` (r:2 w:1) + /// Proof: `Identity::IdentityChangeSchedule` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Membership::Membership` (r:1 w:1) + /// Proof: `Membership::Membership` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Membership::CounterForMembership` (r:1 w:1) + /// Proof: `Membership::CounterForMembership` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Membership::MembershipsExpireOn` (r:1 w:1) + /// Proof: `Membership::MembershipsExpireOn` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `UniversalDividend::CurrentUdIndex` (r:1 w:0) + /// Proof: `UniversalDividend::CurrentUdIndex` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`) + /// Storage: `SmithMembers::Smiths` (r:3 w:3) + /// Proof: `SmithMembers::Smiths` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `AuthorityMembers::Members` (r:1 w:1) + /// Proof: `AuthorityMembers::Members` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `AuthorityMembers::OnlineAuthorities` (r:1 w:1) + /// Proof: `AuthorityMembers::OnlineAuthorities` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `AuthorityMembers::OutgoingAuthorities` (r:1 w:1) + /// Proof: `AuthorityMembers::OutgoingAuthorities` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `AuthorityMembers::IncomingAuthorities` (r:1 w:1) + /// Proof: `AuthorityMembers::IncomingAuthorities` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Session::NextKeys` (r:1 w:1) + /// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(126), added: 2601, mode: `MaxEncodedLen`) + /// Storage: `Quota::IdtyQuota` (r:0 w:1) + /// Proof: `Quota::IdtyQuota` (`max_values`: None, `max_size`: Some(24), added: 2499, mode: `MaxEncodedLen`) + /// Storage: `Session::KeyOwner` (r:0 w:4) + /// Proof: `Session::KeyOwner` (`max_values`: None, `max_size`: None, mode: `Measured`) fn do_revoke_identity() -> Weight { // Proof Size summary in bytes: // Measured: `1540` @@ -237,8 +236,8 @@ impl<T: frame_system::Config> pallet_identity::WeightInfo for WeightInfo<T> { .saturating_add(T::DbWeight::get().reads(16)) .saturating_add(T::DbWeight::get().writes(19)) } - /// Storage: Identity Identities (r:1 w:0) - /// Proof Skipped: Identity Identities (max_values: None, max_size: None, mode: Measured) + /// Storage: `Identity::Identities` (r:1 w:0) + /// Proof: `Identity::Identities` (`max_values`: None, `max_size`: None, mode: `Measured`) fn do_remove_identity_noop() -> Weight { // Proof Size summary in bytes: // Measured: `269` @@ -248,36 +247,36 @@ impl<T: frame_system::Config> pallet_identity::WeightInfo for WeightInfo<T> { .saturating_add(Weight::from_parts(0, 3734)) .saturating_add(T::DbWeight::get().reads(1)) } - /// Storage: Identity Identities (r:1 w:1) - /// Proof Skipped: Identity Identities (max_values: None, max_size: None, mode: Measured) - /// Storage: Identity CounterForIdentities (r:1 w:1) - /// Proof: Identity CounterForIdentities (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: System Account (r:2 w:2) - /// Proof: System Account (max_values: None, max_size: Some(126), added: 2601, mode: MaxEncodedLen) - /// Storage: Membership Membership (r:1 w:1) - /// Proof Skipped: Membership Membership (max_values: None, max_size: None, mode: Measured) - /// Storage: Membership CounterForMembership (r:1 w:1) - /// Proof: Membership CounterForMembership (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: Membership MembershipsExpireOn (r:1 w:1) - /// Proof Skipped: Membership MembershipsExpireOn (max_values: None, max_size: None, mode: Measured) - /// Storage: SmithMembers Smiths (r:3 w:3) - /// Proof Skipped: SmithMembers Smiths (max_values: None, max_size: None, mode: Measured) - /// Storage: AuthorityMembers Members (r:1 w:1) - /// Proof Skipped: AuthorityMembers Members (max_values: None, max_size: None, mode: Measured) - /// Storage: AuthorityMembers OnlineAuthorities (r:1 w:1) - /// Proof Skipped: AuthorityMembers OnlineAuthorities (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: AuthorityMembers OutgoingAuthorities (r:1 w:1) - /// Proof Skipped: AuthorityMembers OutgoingAuthorities (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: AuthorityMembers IncomingAuthorities (r:1 w:1) - /// Proof Skipped: AuthorityMembers IncomingAuthorities (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Session NextKeys (r:1 w:1) - /// Proof Skipped: Session NextKeys (max_values: None, max_size: None, mode: Measured) - /// Storage: Identity IdentityIndexOf (r:0 w:1) - /// Proof Skipped: Identity IdentityIndexOf (max_values: None, max_size: None, mode: Measured) - /// Storage: Quota IdtyQuota (r:0 w:1) - /// Proof: Quota IdtyQuota (max_values: None, max_size: Some(24), added: 2499, mode: MaxEncodedLen) - /// Storage: Session KeyOwner (r:0 w:4) - /// Proof Skipped: Session KeyOwner (max_values: None, max_size: None, mode: Measured) + /// Storage: `Identity::Identities` (r:1 w:1) + /// Proof: `Identity::Identities` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Identity::CounterForIdentities` (r:1 w:1) + /// Proof: `Identity::CounterForIdentities` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(126), added: 2601, mode: `MaxEncodedLen`) + /// Storage: `Membership::Membership` (r:1 w:1) + /// Proof: `Membership::Membership` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Membership::CounterForMembership` (r:1 w:1) + /// Proof: `Membership::CounterForMembership` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Membership::MembershipsExpireOn` (r:1 w:1) + /// Proof: `Membership::MembershipsExpireOn` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmithMembers::Smiths` (r:3 w:3) + /// Proof: `SmithMembers::Smiths` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `AuthorityMembers::Members` (r:1 w:1) + /// Proof: `AuthorityMembers::Members` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `AuthorityMembers::OnlineAuthorities` (r:1 w:1) + /// Proof: `AuthorityMembers::OnlineAuthorities` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `AuthorityMembers::OutgoingAuthorities` (r:1 w:1) + /// Proof: `AuthorityMembers::OutgoingAuthorities` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `AuthorityMembers::IncomingAuthorities` (r:1 w:1) + /// Proof: `AuthorityMembers::IncomingAuthorities` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Session::NextKeys` (r:1 w:1) + /// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Identity::IdentityIndexOf` (r:0 w:1) + /// Proof: `Identity::IdentityIndexOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Quota::IdtyQuota` (r:0 w:1) + /// Proof: `Quota::IdtyQuota` (`max_values`: None, `max_size`: Some(24), added: 2499, mode: `MaxEncodedLen`) + /// Storage: `Session::KeyOwner` (r:0 w:4) + /// Proof: `Session::KeyOwner` (`max_values`: None, `max_size`: None, mode: `Measured`) fn do_remove_identity() -> Weight { // Proof Size summary in bytes: // Measured: `1447` @@ -288,8 +287,8 @@ impl<T: frame_system::Config> pallet_identity::WeightInfo for WeightInfo<T> { .saturating_add(T::DbWeight::get().reads(15)) .saturating_add(T::DbWeight::get().writes(21)) } - /// Storage: Identity IdentityChangeSchedule (r:1 w:0) - /// Proof Skipped: Identity IdentityChangeSchedule (max_values: None, max_size: None, mode: Measured) + /// Storage: `Identity::IdentityChangeSchedule` (r:1 w:0) + /// Proof: `Identity::IdentityChangeSchedule` (`max_values`: None, `max_size`: None, mode: `Measured`) fn prune_identities_noop() -> Weight { // Proof Size summary in bytes: // Measured: `108` @@ -299,10 +298,10 @@ impl<T: frame_system::Config> pallet_identity::WeightInfo for WeightInfo<T> { .saturating_add(Weight::from_parts(0, 3573)) .saturating_add(T::DbWeight::get().reads(1)) } - /// Storage: Identity IdentityChangeSchedule (r:1 w:1) - /// Proof Skipped: Identity IdentityChangeSchedule (max_values: None, max_size: None, mode: Measured) - /// Storage: Identity Identities (r:1 w:0) - /// Proof Skipped: Identity Identities (max_values: None, max_size: None, mode: Measured) + /// Storage: `Identity::IdentityChangeSchedule` (r:1 w:1) + /// Proof: `Identity::IdentityChangeSchedule` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Identity::Identities` (r:1 w:0) + /// Proof: `Identity::Identities` (`max_values`: None, `max_size`: None, mode: `Measured`) fn prune_identities_none() -> Weight { // Proof Size summary in bytes: // Measured: `292` diff --git a/runtime/common/src/weights/pallet_im_online.rs b/runtime/common/src/weights/pallet_im_online.rs index be113f033e2e0d44787fc552ea3f5261e16edafd..223bf4ff633c512aae95a7ef2178646f89ed9717 100644 --- a/runtime/common/src/weights/pallet_im_online.rs +++ b/runtime/common/src/weights/pallet_im_online.rs @@ -31,7 +31,6 @@ // --repeat=2 // --pallet=* // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --header=./file_header.txt @@ -48,21 +47,20 @@ use core::marker::PhantomData; /// Weight functions for `pallet_im_online`. pub struct WeightInfo<T>(PhantomData<T>); impl<T: frame_system::Config> pallet_im_online::WeightInfo for WeightInfo<T> { - /// Storage: Session Validators (r:1 w:0) - /// Proof Skipped: Session Validators (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Session CurrentIndex (r:1 w:0) - /// Proof Skipped: Session CurrentIndex (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: ImOnline Keys (r:1 w:0) - /// Proof: ImOnline Keys (max_values: Some(1), max_size: Some(32002), added: 32497, mode: MaxEncodedLen) - /// Storage: Parameters ParametersStorage (r:1 w:0) - /// Proof Skipped: Parameters ParametersStorage (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: ImOnline ReceivedHeartbeats (r:1 w:1) - /// Proof: ImOnline ReceivedHeartbeats (max_values: None, max_size: Some(10021032), added: 10023507, mode: MaxEncodedLen) - /// Storage: ImOnline AuthoredBlocks (r:1 w:0) - /// Proof: ImOnline AuthoredBlocks (max_values: None, max_size: Some(56), added: 2531, mode: MaxEncodedLen) + /// Storage: `Session::Validators` (r:1 w:0) + /// Proof: `Session::Validators` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Session::CurrentIndex` (r:1 w:0) + /// Proof: `Session::CurrentIndex` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ImOnline::Keys` (r:1 w:0) + /// Proof: `ImOnline::Keys` (`max_values`: Some(1), `max_size`: Some(32002), added: 32497, mode: `MaxEncodedLen`) + /// Storage: `Parameters::ParametersStorage` (r:1 w:0) + /// Proof: `Parameters::ParametersStorage` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ImOnline::ReceivedHeartbeats` (r:1 w:1) + /// Proof: `ImOnline::ReceivedHeartbeats` (`max_values`: None, `max_size`: Some(25), added: 2500, mode: `MaxEncodedLen`) + /// Storage: `ImOnline::AuthoredBlocks` (r:1 w:0) + /// Proof: `ImOnline::AuthoredBlocks` (`max_values`: None, `max_size`: Some(56), added: 2531, mode: `MaxEncodedLen`) /// The range of component `k` is `[1, 1000]`. - /// The range of component `e` is `[1, 100]`. - fn validate_unsigned_and_then_heartbeat(k: u32, e: u32, ) -> Weight { + fn validate_unsigned_and_then_heartbeat(k: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `601 + k * (32 ±0)` // Estimated: `10024497 + k * (32 ±0)` diff --git a/runtime/common/src/weights/pallet_membership.rs b/runtime/common/src/weights/pallet_membership.rs index d7bba69b03b1fddb82aa2ab55cada085a1740106..624d14353e82a492f56f4720d9d264bff6b6ffa9 100644 --- a/runtime/common/src/weights/pallet_membership.rs +++ b/runtime/common/src/weights/pallet_membership.rs @@ -31,7 +31,6 @@ // --repeat=2 // --pallet=* // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --header=./file_header.txt @@ -56,34 +55,34 @@ impl<T: frame_system::Config> pallet_membership::WeightInfo for WeightInfo<T> { Weight::from_parts(511_000, 0) .saturating_add(Weight::from_parts(0, 0)) } - /// Storage: Membership MembershipsExpireOn (r:2 w:2) - /// Proof Skipped: Membership MembershipsExpireOn (max_values: None, max_size: None, mode: Measured) - /// Storage: Membership Membership (r:3 w:3) - /// Proof Skipped: Membership Membership (max_values: None, max_size: None, mode: Measured) - /// Storage: Membership CounterForMembership (r:1 w:1) - /// Proof: Membership CounterForMembership (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: Identity Identities (r:3 w:3) - /// Proof Skipped: Identity Identities (max_values: None, max_size: None, mode: Measured) - /// Storage: UniversalDividend CurrentUdIndex (r:1 w:0) - /// Proof: UniversalDividend CurrentUdIndex (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen) - /// Storage: SmithMembers Smiths (r:3 w:3) - /// Proof Skipped: SmithMembers Smiths (max_values: None, max_size: None, mode: Measured) - /// Storage: AuthorityMembers Members (r:3 w:3) - /// Proof Skipped: AuthorityMembers Members (max_values: None, max_size: None, mode: Measured) - /// Storage: AuthorityMembers OnlineAuthorities (r:1 w:1) - /// Proof Skipped: AuthorityMembers OnlineAuthorities (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: AuthorityMembers OutgoingAuthorities (r:1 w:1) - /// Proof Skipped: AuthorityMembers OutgoingAuthorities (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: AuthorityMembers IncomingAuthorities (r:1 w:1) - /// Proof Skipped: AuthorityMembers IncomingAuthorities (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Session NextKeys (r:3 w:3) - /// Proof Skipped: Session NextKeys (max_values: None, max_size: None, mode: Measured) - /// Storage: System Account (r:3 w:3) - /// Proof: System Account (max_values: None, max_size: Some(126), added: 2601, mode: MaxEncodedLen) - /// Storage: Identity IdentityChangeSchedule (r:2 w:1) - /// Proof Skipped: Identity IdentityChangeSchedule (max_values: None, max_size: None, mode: Measured) - /// Storage: Session KeyOwner (r:0 w:12) - /// Proof Skipped: Session KeyOwner (max_values: None, max_size: None, mode: Measured) + /// Storage: `Membership::MembershipsExpireOn` (r:2 w:2) + /// Proof: `Membership::MembershipsExpireOn` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Membership::Membership` (r:3 w:3) + /// Proof: `Membership::Membership` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Membership::CounterForMembership` (r:1 w:1) + /// Proof: `Membership::CounterForMembership` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Identity::Identities` (r:3 w:3) + /// Proof: `Identity::Identities` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `UniversalDividend::CurrentUdIndex` (r:1 w:0) + /// Proof: `UniversalDividend::CurrentUdIndex` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`) + /// Storage: `SmithMembers::Smiths` (r:3 w:3) + /// Proof: `SmithMembers::Smiths` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `AuthorityMembers::Members` (r:3 w:3) + /// Proof: `AuthorityMembers::Members` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `AuthorityMembers::OnlineAuthorities` (r:1 w:1) + /// Proof: `AuthorityMembers::OnlineAuthorities` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `AuthorityMembers::OutgoingAuthorities` (r:1 w:1) + /// Proof: `AuthorityMembers::OutgoingAuthorities` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `AuthorityMembers::IncomingAuthorities` (r:1 w:1) + /// Proof: `AuthorityMembers::IncomingAuthorities` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Session::NextKeys` (r:3 w:3) + /// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `System::Account` (r:3 w:3) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(126), added: 2601, mode: `MaxEncodedLen`) + /// Storage: `Identity::IdentityChangeSchedule` (r:2 w:1) + /// Proof: `Identity::IdentityChangeSchedule` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Session::KeyOwner` (r:0 w:12) + /// Proof: `Session::KeyOwner` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `i` is `[0, 3]`. fn expire_memberships(i: u32, ) -> Weight { // Proof Size summary in bytes: diff --git a/runtime/common/src/weights/pallet_multisig.rs b/runtime/common/src/weights/pallet_multisig.rs index 365ea7dde60678d01653d3dce07482a6651c887b..bc0bc453d410d44afbce4d13f9769b42fbfbe0b1 100644 --- a/runtime/common/src/weights/pallet_multisig.rs +++ b/runtime/common/src/weights/pallet_multisig.rs @@ -31,7 +31,6 @@ // --repeat=2 // --pallet=* // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --header=./file_header.txt @@ -59,8 +58,8 @@ impl<T: frame_system::Config> pallet_multisig::WeightInfo for WeightInfo<T> { // Standard Error: 947 .saturating_add(Weight::from_parts(221, 0).saturating_mul(z.into())) } - /// Storage: Multisig Multisigs (r:1 w:1) - /// Proof: Multisig Multisigs (max_values: None, max_size: Some(457), added: 2932, mode: MaxEncodedLen) + /// Storage: `Multisig::Multisigs` (r:1 w:1) + /// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(457), added: 2932, mode: `MaxEncodedLen`) /// The range of component `s` is `[2, 10]`. /// The range of component `z` is `[0, 10000]`. fn as_multi_create(s: u32, z: u32, ) -> Weight { @@ -77,8 +76,8 @@ impl<T: frame_system::Config> pallet_multisig::WeightInfo for WeightInfo<T> { .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Multisig Multisigs (r:1 w:1) - /// Proof: Multisig Multisigs (max_values: None, max_size: Some(457), added: 2932, mode: MaxEncodedLen) + /// Storage: `Multisig::Multisigs` (r:1 w:1) + /// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(457), added: 2932, mode: `MaxEncodedLen`) /// The range of component `s` is `[3, 10]`. /// The range of component `z` is `[0, 10000]`. fn as_multi_approve(s: u32, z: u32, ) -> Weight { @@ -95,10 +94,10 @@ impl<T: frame_system::Config> pallet_multisig::WeightInfo for WeightInfo<T> { .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Multisig Multisigs (r:1 w:1) - /// Proof: Multisig Multisigs (max_values: None, max_size: Some(457), added: 2932, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(126), added: 2601, mode: MaxEncodedLen) + /// Storage: `Multisig::Multisigs` (r:1 w:1) + /// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(457), added: 2932, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(126), added: 2601, mode: `MaxEncodedLen`) /// The range of component `s` is `[2, 10]`. /// The range of component `z` is `[0, 10000]`. fn as_multi_complete(s: u32, z: u32, ) -> Weight { @@ -115,8 +114,8 @@ impl<T: frame_system::Config> pallet_multisig::WeightInfo for WeightInfo<T> { .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Multisig Multisigs (r:1 w:1) - /// Proof: Multisig Multisigs (max_values: None, max_size: Some(457), added: 2932, mode: MaxEncodedLen) + /// Storage: `Multisig::Multisigs` (r:1 w:1) + /// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(457), added: 2932, mode: `MaxEncodedLen`) /// The range of component `s` is `[2, 10]`. fn approve_as_multi_create(s: u32, ) -> Weight { // Proof Size summary in bytes: @@ -130,8 +129,8 @@ impl<T: frame_system::Config> pallet_multisig::WeightInfo for WeightInfo<T> { .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Multisig Multisigs (r:1 w:1) - /// Proof: Multisig Multisigs (max_values: None, max_size: Some(457), added: 2932, mode: MaxEncodedLen) + /// Storage: `Multisig::Multisigs` (r:1 w:1) + /// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(457), added: 2932, mode: `MaxEncodedLen`) /// The range of component `s` is `[2, 10]`. fn approve_as_multi_approve(s: u32, ) -> Weight { // Proof Size summary in bytes: @@ -145,8 +144,8 @@ impl<T: frame_system::Config> pallet_multisig::WeightInfo for WeightInfo<T> { .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Multisig Multisigs (r:1 w:1) - /// Proof: Multisig Multisigs (max_values: None, max_size: Some(457), added: 2932, mode: MaxEncodedLen) + /// Storage: `Multisig::Multisigs` (r:1 w:1) + /// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(457), added: 2932, mode: `MaxEncodedLen`) /// The range of component `s` is `[2, 10]`. fn cancel_as_multi(_s: u32, ) -> Weight { // Proof Size summary in bytes: diff --git a/runtime/common/src/weights/pallet_oneshot_account.rs b/runtime/common/src/weights/pallet_oneshot_account.rs index 1139d09b91a1ae946945d36a5b933b7a4622943c..763fc12107959f049d6764edfa5b24786dab05c8 100644 --- a/runtime/common/src/weights/pallet_oneshot_account.rs +++ b/runtime/common/src/weights/pallet_oneshot_account.rs @@ -31,7 +31,6 @@ // --repeat=2 // --pallet=* // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --header=./file_header.txt @@ -48,8 +47,8 @@ use core::marker::PhantomData; /// Weight functions for `pallet_oneshot_account`. pub struct WeightInfo<T>(PhantomData<T>); impl<T: frame_system::Config> pallet_oneshot_account::WeightInfo for WeightInfo<T> { - /// Storage: OneshotAccount OneshotAccounts (r:1 w:1) - /// Proof Skipped: OneshotAccount OneshotAccounts (max_values: None, max_size: None, mode: Measured) + /// Storage: `OneshotAccount::OneshotAccounts` (r:1 w:1) + /// Proof: `OneshotAccount::OneshotAccounts` (`max_values`: None, `max_size`: None, mode: `Measured`) fn create_oneshot_account() -> Weight { // Proof Size summary in bytes: // Measured: `42` @@ -60,12 +59,12 @@ impl<T: frame_system::Config> pallet_oneshot_account::WeightInfo for WeightInfo< .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: OneshotAccount OneshotAccounts (r:1 w:1) - /// Proof Skipped: OneshotAccount OneshotAccounts (max_values: None, max_size: None, mode: Measured) - /// Storage: System BlockHash (r:1 w:0) - /// Proof: System BlockHash (max_values: None, max_size: Some(44), added: 2519, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(126), added: 2601, mode: MaxEncodedLen) + /// Storage: `OneshotAccount::OneshotAccounts` (r:1 w:1) + /// Proof: `OneshotAccount::OneshotAccounts` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `System::BlockHash` (r:1 w:0) + /// Proof: `System::BlockHash` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(126), added: 2601, mode: `MaxEncodedLen`) fn consume_oneshot_account() -> Weight { // Proof Size summary in bytes: // Measured: `242` @@ -76,12 +75,12 @@ impl<T: frame_system::Config> pallet_oneshot_account::WeightInfo for WeightInfo< .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: OneshotAccount OneshotAccounts (r:1 w:1) - /// Proof Skipped: OneshotAccount OneshotAccounts (max_values: None, max_size: None, mode: Measured) - /// Storage: System BlockHash (r:1 w:0) - /// Proof: System BlockHash (max_values: None, max_size: Some(44), added: 2519, mode: MaxEncodedLen) - /// Storage: System Account (r:2 w:2) - /// Proof: System Account (max_values: None, max_size: Some(126), added: 2601, mode: MaxEncodedLen) + /// Storage: `OneshotAccount::OneshotAccounts` (r:1 w:1) + /// Proof: `OneshotAccount::OneshotAccounts` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `System::BlockHash` (r:1 w:0) + /// Proof: `System::BlockHash` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(126), added: 2601, mode: `MaxEncodedLen`) fn consume_oneshot_account_with_remaining() -> Weight { // Proof Size summary in bytes: // Measured: `306` diff --git a/runtime/common/src/weights/pallet_preimage.rs b/runtime/common/src/weights/pallet_preimage.rs index b789f054af11d6ef159592be9df1ef1124ddeb76..8cea5d5178324ddb6dddec908284fe9cfa5ffdfe 100644 --- a/runtime/common/src/weights/pallet_preimage.rs +++ b/runtime/common/src/weights/pallet_preimage.rs @@ -31,7 +31,6 @@ // --repeat=2 // --pallet=* // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --header=./file_header.txt @@ -48,14 +47,16 @@ use core::marker::PhantomData; /// Weight functions for `pallet_preimage`. pub struct WeightInfo<T>(PhantomData<T>); impl<T: frame_system::Config> pallet_preimage::WeightInfo for WeightInfo<T> { - /// Storage: Preimage StatusFor (r:1 w:1) - /// Proof: Preimage StatusFor (max_values: None, max_size: Some(83), added: 2558, mode: MaxEncodedLen) - /// Storage: Preimage PreimageFor (r:0 w:1) - /// Proof: Preimage PreimageFor (max_values: None, max_size: Some(4194344), added: 4196819, mode: MaxEncodedLen) + /// Storage: `Preimage::StatusFor` (r:1 w:0) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(83), added: 2558, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(75), added: 2550, mode: `MaxEncodedLen`) + /// Storage: `Preimage::PreimageFor` (r:0 w:1) + /// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`) /// The range of component `s` is `[0, 4194304]`. fn note_preimage(s: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `104` + // Measured: `42` // Estimated: `3548` // Minimum execution time: 38_160_000 picoseconds. Weight::from_parts(39_633_500, 0) @@ -65,10 +66,12 @@ impl<T: frame_system::Config> pallet_preimage::WeightInfo for WeightInfo<T> { .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Preimage StatusFor (r:1 w:1) - /// Proof: Preimage StatusFor (max_values: None, max_size: Some(83), added: 2558, mode: MaxEncodedLen) - /// Storage: Preimage PreimageFor (r:0 w:1) - /// Proof: Preimage PreimageFor (max_values: None, max_size: Some(4194344), added: 4196819, mode: MaxEncodedLen) + /// Storage: `Preimage::StatusFor` (r:1 w:0) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(83), added: 2558, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(75), added: 2550, mode: `MaxEncodedLen`) + /// Storage: `Preimage::PreimageFor` (r:0 w:1) + /// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`) /// The range of component `s` is `[0, 4194304]`. fn note_requested_preimage(s: u32, ) -> Weight { // Proof Size summary in bytes: @@ -82,10 +85,12 @@ impl<T: frame_system::Config> pallet_preimage::WeightInfo for WeightInfo<T> { .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Preimage StatusFor (r:1 w:1) - /// Proof: Preimage StatusFor (max_values: None, max_size: Some(83), added: 2558, mode: MaxEncodedLen) - /// Storage: Preimage PreimageFor (r:0 w:1) - /// Proof: Preimage PreimageFor (max_values: None, max_size: Some(4194344), added: 4196819, mode: MaxEncodedLen) + /// Storage: `Preimage::StatusFor` (r:1 w:0) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(83), added: 2558, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(75), added: 2550, mode: `MaxEncodedLen`) + /// Storage: `Preimage::PreimageFor` (r:0 w:1) + /// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`) /// The range of component `s` is `[0, 4194304]`. fn note_no_deposit_preimage(s: u32, ) -> Weight { // Proof Size summary in bytes: @@ -99,24 +104,28 @@ impl<T: frame_system::Config> pallet_preimage::WeightInfo for WeightInfo<T> { .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Preimage StatusFor (r:1 w:1) - /// Proof: Preimage StatusFor (max_values: None, max_size: Some(83), added: 2558, mode: MaxEncodedLen) - /// Storage: Preimage PreimageFor (r:0 w:1) - /// Proof: Preimage PreimageFor (max_values: None, max_size: Some(4194344), added: 4196819, mode: MaxEncodedLen) + /// Storage: `Preimage::StatusFor` (r:1 w:0) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(83), added: 2558, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(75), added: 2550, mode: `MaxEncodedLen`) + /// Storage: `Preimage::PreimageFor` (r:0 w:1) + /// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`) fn unnote_preimage() -> Weight { // Proof Size summary in bytes: - // Measured: `242` + // Measured: `172` // Estimated: `3548` // Minimum execution time: 60_607_000 picoseconds. Weight::from_parts(70_545_000, 0) .saturating_add(Weight::from_parts(0, 3548)) - .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Preimage StatusFor (r:1 w:1) - /// Proof: Preimage StatusFor (max_values: None, max_size: Some(83), added: 2558, mode: MaxEncodedLen) - /// Storage: Preimage PreimageFor (r:0 w:1) - /// Proof: Preimage PreimageFor (max_values: None, max_size: Some(4194344), added: 4196819, mode: MaxEncodedLen) + /// Storage: `Preimage::StatusFor` (r:1 w:0) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(83), added: 2558, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(75), added: 2550, mode: `MaxEncodedLen`) + /// Storage: `Preimage::PreimageFor` (r:0 w:1) + /// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`) fn unnote_no_deposit_preimage() -> Weight { // Proof Size summary in bytes: // Measured: `144` @@ -124,23 +133,27 @@ impl<T: frame_system::Config> pallet_preimage::WeightInfo for WeightInfo<T> { // Minimum execution time: 38_868_000 picoseconds. Weight::from_parts(46_917_000, 0) .saturating_add(Weight::from_parts(0, 3548)) - .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Preimage StatusFor (r:1 w:1) - /// Proof: Preimage StatusFor (max_values: None, max_size: Some(83), added: 2558, mode: MaxEncodedLen) + /// Storage: `Preimage::StatusFor` (r:1 w:0) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(83), added: 2558, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(75), added: 2550, mode: `MaxEncodedLen`) fn request_preimage() -> Weight { // Proof Size summary in bytes: - // Measured: `180` + // Measured: `172` // Estimated: `3548` // Minimum execution time: 30_541_000 picoseconds. Weight::from_parts(37_066_000, 0) .saturating_add(Weight::from_parts(0, 3548)) - .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Preimage StatusFor (r:1 w:1) - /// Proof: Preimage StatusFor (max_values: None, max_size: Some(83), added: 2558, mode: MaxEncodedLen) + /// Storage: `Preimage::StatusFor` (r:1 w:0) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(83), added: 2558, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(75), added: 2550, mode: `MaxEncodedLen`) fn request_no_deposit_preimage() -> Weight { // Proof Size summary in bytes: // Measured: `144` @@ -148,11 +161,13 @@ impl<T: frame_system::Config> pallet_preimage::WeightInfo for WeightInfo<T> { // Minimum execution time: 30_620_000 picoseconds. Weight::from_parts(44_732_000, 0) .saturating_add(Weight::from_parts(0, 3548)) - .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Preimage StatusFor (r:1 w:1) - /// Proof: Preimage StatusFor (max_values: None, max_size: Some(83), added: 2558, mode: MaxEncodedLen) + /// Storage: `Preimage::StatusFor` (r:1 w:0) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(83), added: 2558, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(75), added: 2550, mode: `MaxEncodedLen`) fn request_unnoted_preimage() -> Weight { // Proof Size summary in bytes: // Measured: `42` @@ -160,11 +175,13 @@ impl<T: frame_system::Config> pallet_preimage::WeightInfo for WeightInfo<T> { // Minimum execution time: 32_593_000 picoseconds. Weight::from_parts(48_836_000, 0) .saturating_add(Weight::from_parts(0, 3548)) - .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Preimage StatusFor (r:1 w:1) - /// Proof: Preimage StatusFor (max_values: None, max_size: Some(83), added: 2558, mode: MaxEncodedLen) + /// Storage: `Preimage::StatusFor` (r:1 w:0) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(83), added: 2558, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(75), added: 2550, mode: `MaxEncodedLen`) fn request_requested_preimage() -> Weight { // Proof Size summary in bytes: // Measured: `106` @@ -172,13 +189,15 @@ impl<T: frame_system::Config> pallet_preimage::WeightInfo for WeightInfo<T> { // Minimum execution time: 18_050_000 picoseconds. Weight::from_parts(20_396_000, 0) .saturating_add(Weight::from_parts(0, 3548)) - .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Preimage StatusFor (r:1 w:1) - /// Proof: Preimage StatusFor (max_values: None, max_size: Some(83), added: 2558, mode: MaxEncodedLen) - /// Storage: Preimage PreimageFor (r:0 w:1) - /// Proof: Preimage PreimageFor (max_values: None, max_size: Some(4194344), added: 4196819, mode: MaxEncodedLen) + /// Storage: `Preimage::StatusFor` (r:1 w:0) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(83), added: 2558, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(75), added: 2550, mode: `MaxEncodedLen`) + /// Storage: `Preimage::PreimageFor` (r:0 w:1) + /// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `MaxEncodedLen`) fn unrequest_preimage() -> Weight { // Proof Size summary in bytes: // Measured: `144` @@ -186,11 +205,13 @@ impl<T: frame_system::Config> pallet_preimage::WeightInfo for WeightInfo<T> { // Minimum execution time: 34_145_000 picoseconds. Weight::from_parts(38_096_000, 0) .saturating_add(Weight::from_parts(0, 3548)) - .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Preimage StatusFor (r:1 w:1) - /// Proof: Preimage StatusFor (max_values: None, max_size: Some(83), added: 2558, mode: MaxEncodedLen) + /// Storage: `Preimage::StatusFor` (r:1 w:0) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(83), added: 2558, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(75), added: 2550, mode: `MaxEncodedLen`) fn unrequest_unnoted_preimage() -> Weight { // Proof Size summary in bytes: // Measured: `106` @@ -198,11 +219,13 @@ impl<T: frame_system::Config> pallet_preimage::WeightInfo for WeightInfo<T> { // Minimum execution time: 11_945_000 picoseconds. Weight::from_parts(15_583_000, 0) .saturating_add(Weight::from_parts(0, 3548)) - .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Preimage StatusFor (r:1 w:1) - /// Proof: Preimage StatusFor (max_values: None, max_size: Some(83), added: 2558, mode: MaxEncodedLen) + /// Storage: `Preimage::StatusFor` (r:1 w:0) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(83), added: 2558, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(75), added: 2550, mode: `MaxEncodedLen`) fn unrequest_multi_referenced_preimage() -> Weight { // Proof Size summary in bytes: // Measured: `106` @@ -210,7 +233,27 @@ impl<T: frame_system::Config> pallet_preimage::WeightInfo for WeightInfo<T> { // Minimum execution time: 16_740_000 picoseconds. Weight::from_parts(19_662_000, 0) .saturating_add(Weight::from_parts(0, 3548)) - .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } + /// Storage: `Preimage::StatusFor` (r:1023 w:1023) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(83), added: 2558, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1023 w:1023) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(126), added: 2601, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:0 w:1023) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(75), added: 2550, mode: `MaxEncodedLen`) + /// The range of component `n` is `[1, 1024]`. + fn ensure_updated(n: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `0 + n * (180 ±0)` + // Estimated: `990 + n * (2601 ±0)` + // Minimum execution time: 16_685_000 picoseconds. + Weight::from_parts(17_134_000, 0) + .saturating_add(Weight::from_parts(0, 990)) + // Standard Error: 17_297 + .saturating_add(Weight::from_parts(13_805_632, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(n.into()))) + .saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(n.into()))) + .saturating_add(Weight::from_parts(0, 2601).saturating_mul(n.into())) + } } diff --git a/runtime/common/src/weights/pallet_provide_randomness.rs b/runtime/common/src/weights/pallet_provide_randomness.rs index 05a0b44f767b96029b93d88904b18c36f591e987..003ec1b3c7e3d515f4551c84f64cd52af22637b3 100644 --- a/runtime/common/src/weights/pallet_provide_randomness.rs +++ b/runtime/common/src/weights/pallet_provide_randomness.rs @@ -31,7 +31,6 @@ // --repeat=2 // --pallet=* // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --header=./file_header.txt @@ -48,18 +47,20 @@ use core::marker::PhantomData; /// Weight functions for `pallet_provide_randomness`. pub struct WeightInfo<T>(PhantomData<T>); impl<T: frame_system::Config> pallet_provide_randomness::WeightInfo for WeightInfo<T> { - /// Storage: ProvideRandomness CounterForRequestsIds (r:1 w:1) - /// Proof: ProvideRandomness CounterForRequestsIds (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: ProvideRandomness RequestIdProvider (r:1 w:1) - /// Proof Skipped: ProvideRandomness RequestIdProvider (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: ProvideRandomness RequestsIds (r:1 w:1) - /// Proof Skipped: ProvideRandomness RequestsIds (max_values: None, max_size: None, mode: Measured) - /// Storage: Babe EpochIndex (r:1 w:0) - /// Proof: Babe EpochIndex (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) - /// Storage: ProvideRandomness NexEpochHookIn (r:1 w:0) - /// Proof Skipped: ProvideRandomness NexEpochHookIn (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: ProvideRandomness RequestsReadyAtEpoch (r:1 w:1) - /// Proof Skipped: ProvideRandomness RequestsReadyAtEpoch (max_values: None, max_size: None, mode: Measured) + /// Storage: `ProvideRandomness::CounterForRequestsIds` (r:1 w:1) + /// Proof: `ProvideRandomness::CounterForRequestsIds` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(126), added: 2601, mode: `MaxEncodedLen`) + /// Storage: `ProvideRandomness::RequestIdProvider` (r:1 w:1) + /// Proof: `ProvideRandomness::RequestIdProvider` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ProvideRandomness::RequestsIds` (r:1 w:1) + /// Proof: `ProvideRandomness::RequestsIds` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Babe::EpochIndex` (r:1 w:0) + /// Proof: `Babe::EpochIndex` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `ProvideRandomness::NexEpochHookIn` (r:1 w:0) + /// Proof: `ProvideRandomness::NexEpochHookIn` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ProvideRandomness::RequestsReadyAtEpoch` (r:1 w:1) + /// Proof: `ProvideRandomness::RequestsReadyAtEpoch` (`max_values`: None, `max_size`: None, mode: `Measured`) fn request() -> Weight { // Proof Size summary in bytes: // Measured: `235` @@ -70,18 +71,18 @@ impl<T: frame_system::Config> pallet_provide_randomness::WeightInfo for WeightIn .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(4)) } - /// Storage: ProvideRandomness RequestsReadyAtNextBlock (r:1 w:1) - /// Proof Skipped: ProvideRandomness RequestsReadyAtNextBlock (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Babe AuthorVrfRandomness (r:1 w:0) - /// Proof: Babe AuthorVrfRandomness (max_values: Some(1), max_size: Some(33), added: 528, mode: MaxEncodedLen) - /// Storage: ProvideRandomness RequestsIds (r:100 w:100) - /// Proof Skipped: ProvideRandomness RequestsIds (max_values: None, max_size: None, mode: Measured) - /// Storage: ProvideRandomness CounterForRequestsIds (r:1 w:1) - /// Proof: ProvideRandomness CounterForRequestsIds (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: Account PendingRandomIdAssignments (r:100 w:0) - /// Proof Skipped: Account PendingRandomIdAssignments (max_values: None, max_size: None, mode: Measured) - /// Storage: ProvideRandomness NexEpochHookIn (r:1 w:1) - /// Proof Skipped: ProvideRandomness NexEpochHookIn (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `ProvideRandomness::RequestsReadyAtNextBlock` (r:1 w:1) + /// Proof: `ProvideRandomness::RequestsReadyAtNextBlock` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Babe::AuthorVrfRandomness` (r:1 w:0) + /// Proof: `Babe::AuthorVrfRandomness` (`max_values`: Some(1), `max_size`: Some(33), added: 528, mode: `MaxEncodedLen`) + /// Storage: `ProvideRandomness::RequestsIds` (r:100 w:100) + /// Proof: `ProvideRandomness::RequestsIds` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `ProvideRandomness::CounterForRequestsIds` (r:1 w:1) + /// Proof: `ProvideRandomness::CounterForRequestsIds` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Account::PendingRandomIdAssignments` (r:100 w:0) + /// Proof: `Account::PendingRandomIdAssignments` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `ProvideRandomness::NexEpochHookIn` (r:1 w:1) + /// Proof: `ProvideRandomness::NexEpochHookIn` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// The range of component `i` is `[1, 100]`. fn on_initialize(i: u32, ) -> Weight { // Proof Size summary in bytes: @@ -98,24 +99,24 @@ impl<T: frame_system::Config> pallet_provide_randomness::WeightInfo for WeightIn .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) .saturating_add(Weight::from_parts(0, 2535).saturating_mul(i.into())) } - /// Storage: ProvideRandomness RequestsReadyAtNextBlock (r:1 w:0) - /// Proof Skipped: ProvideRandomness RequestsReadyAtNextBlock (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: ProvideRandomness NexEpochHookIn (r:1 w:1) - /// Proof Skipped: ProvideRandomness NexEpochHookIn (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Babe EpochIndex (r:1 w:0) - /// Proof: Babe EpochIndex (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) - /// Storage: ProvideRandomness RequestsReadyAtEpoch (r:1 w:1) - /// Proof Skipped: ProvideRandomness RequestsReadyAtEpoch (max_values: None, max_size: None, mode: Measured) - /// Storage: Babe NextRandomness (r:1 w:0) - /// Proof: Babe NextRandomness (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) - /// Storage: Babe EpochStart (r:1 w:0) - /// Proof: Babe EpochStart (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) - /// Storage: ProvideRandomness RequestsIds (r:100 w:100) - /// Proof Skipped: ProvideRandomness RequestsIds (max_values: None, max_size: None, mode: Measured) - /// Storage: ProvideRandomness CounterForRequestsIds (r:1 w:1) - /// Proof: ProvideRandomness CounterForRequestsIds (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: Account PendingRandomIdAssignments (r:100 w:0) - /// Proof Skipped: Account PendingRandomIdAssignments (max_values: None, max_size: None, mode: Measured) + /// Storage: `ProvideRandomness::RequestsReadyAtNextBlock` (r:1 w:0) + /// Proof: `ProvideRandomness::RequestsReadyAtNextBlock` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ProvideRandomness::NexEpochHookIn` (r:1 w:1) + /// Proof: `ProvideRandomness::NexEpochHookIn` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Babe::EpochIndex` (r:1 w:0) + /// Proof: `Babe::EpochIndex` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `ProvideRandomness::RequestsReadyAtEpoch` (r:1 w:1) + /// Proof: `ProvideRandomness::RequestsReadyAtEpoch` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Babe::NextRandomness` (r:1 w:0) + /// Proof: `Babe::NextRandomness` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`) + /// Storage: `Babe::EpochStart` (r:1 w:0) + /// Proof: `Babe::EpochStart` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `ProvideRandomness::RequestsIds` (r:100 w:100) + /// Proof: `ProvideRandomness::RequestsIds` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `ProvideRandomness::CounterForRequestsIds` (r:1 w:1) + /// Proof: `ProvideRandomness::CounterForRequestsIds` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Account::PendingRandomIdAssignments` (r:100 w:0) + /// Proof: `Account::PendingRandomIdAssignments` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `i` is `[1, 100]`. fn on_initialize_epoch(i: u32, ) -> Weight { // Proof Size summary in bytes: diff --git a/runtime/common/src/weights/pallet_proxy.rs b/runtime/common/src/weights/pallet_proxy.rs index e2de5c02ff2de58a826ac23a90c8ef96bf4ba690..f21307d4706ae053eeec5f4a7d29a03a96329a3b 100644 --- a/runtime/common/src/weights/pallet_proxy.rs +++ b/runtime/common/src/weights/pallet_proxy.rs @@ -31,7 +31,6 @@ // --repeat=2 // --pallet=* // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --header=./file_header.txt @@ -48,8 +47,8 @@ use core::marker::PhantomData; /// Weight functions for `pallet_proxy`. pub struct WeightInfo<T>(PhantomData<T>); impl<T: frame_system::Config> pallet_proxy::WeightInfo for WeightInfo<T> { - /// Storage: Proxy Proxies (r:1 w:0) - /// Proof: Proxy Proxies (max_values: None, max_size: Some(1233), added: 3708, mode: MaxEncodedLen) + /// Storage: `Proxy::Proxies` (r:1 w:0) + /// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1233), added: 3708, mode: `MaxEncodedLen`) /// The range of component `p` is `[1, 31]`. fn proxy(p: u32, ) -> Weight { // Proof Size summary in bytes: @@ -62,12 +61,12 @@ impl<T: frame_system::Config> pallet_proxy::WeightInfo for WeightInfo<T> { .saturating_add(Weight::from_parts(191_683, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) } - /// Storage: Proxy Proxies (r:1 w:0) - /// Proof: Proxy Proxies (max_values: None, max_size: Some(1233), added: 3708, mode: MaxEncodedLen) - /// Storage: Proxy Announcements (r:1 w:1) - /// Proof: Proxy Announcements (max_values: None, max_size: Some(2225), added: 4700, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(126), added: 2601, mode: MaxEncodedLen) + /// Storage: `Proxy::Proxies` (r:1 w:0) + /// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1233), added: 3708, mode: `MaxEncodedLen`) + /// Storage: `Proxy::Announcements` (r:1 w:1) + /// Proof: `Proxy::Announcements` (`max_values`: None, `max_size`: Some(2225), added: 4700, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(126), added: 2601, mode: `MaxEncodedLen`) /// The range of component `a` is `[0, 31]`. /// The range of component `p` is `[1, 31]`. fn proxy_announced(a: u32, p: u32, ) -> Weight { @@ -84,10 +83,10 @@ impl<T: frame_system::Config> pallet_proxy::WeightInfo for WeightInfo<T> { .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Proxy Announcements (r:1 w:1) - /// Proof: Proxy Announcements (max_values: None, max_size: Some(2225), added: 4700, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(126), added: 2601, mode: MaxEncodedLen) + /// Storage: `Proxy::Announcements` (r:1 w:1) + /// Proof: `Proxy::Announcements` (`max_values`: None, `max_size`: Some(2225), added: 4700, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(126), added: 2601, mode: `MaxEncodedLen`) /// The range of component `a` is `[0, 31]`. /// The range of component `p` is `[1, 31]`. fn remove_announcement(_a: u32, _p: u32, ) -> Weight { @@ -100,10 +99,10 @@ impl<T: frame_system::Config> pallet_proxy::WeightInfo for WeightInfo<T> { .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Proxy Announcements (r:1 w:1) - /// Proof: Proxy Announcements (max_values: None, max_size: Some(2225), added: 4700, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(126), added: 2601, mode: MaxEncodedLen) + /// Storage: `Proxy::Announcements` (r:1 w:1) + /// Proof: `Proxy::Announcements` (`max_values`: None, `max_size`: Some(2225), added: 4700, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(126), added: 2601, mode: `MaxEncodedLen`) /// The range of component `a` is `[0, 31]`. /// The range of component `p` is `[1, 31]`. fn reject_announcement(a: u32, p: u32, ) -> Weight { @@ -120,12 +119,12 @@ impl<T: frame_system::Config> pallet_proxy::WeightInfo for WeightInfo<T> { .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Proxy Proxies (r:1 w:0) - /// Proof: Proxy Proxies (max_values: None, max_size: Some(1233), added: 3708, mode: MaxEncodedLen) - /// Storage: Proxy Announcements (r:1 w:1) - /// Proof: Proxy Announcements (max_values: None, max_size: Some(2225), added: 4700, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(126), added: 2601, mode: MaxEncodedLen) + /// Storage: `Proxy::Proxies` (r:1 w:0) + /// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1233), added: 3708, mode: `MaxEncodedLen`) + /// Storage: `Proxy::Announcements` (r:1 w:1) + /// Proof: `Proxy::Announcements` (`max_values`: None, `max_size`: Some(2225), added: 4700, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(126), added: 2601, mode: `MaxEncodedLen`) /// The range of component `a` is `[0, 31]`. /// The range of component `p` is `[1, 31]`. fn announce(a: u32, _p: u32, ) -> Weight { @@ -140,8 +139,8 @@ impl<T: frame_system::Config> pallet_proxy::WeightInfo for WeightInfo<T> { .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Proxy Proxies (r:1 w:1) - /// Proof: Proxy Proxies (max_values: None, max_size: Some(1233), added: 3708, mode: MaxEncodedLen) + /// Storage: `Proxy::Proxies` (r:1 w:1) + /// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1233), added: 3708, mode: `MaxEncodedLen`) /// The range of component `p` is `[1, 31]`. fn add_proxy(_p: u32, ) -> Weight { // Proof Size summary in bytes: @@ -153,8 +152,8 @@ impl<T: frame_system::Config> pallet_proxy::WeightInfo for WeightInfo<T> { .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Proxy Proxies (r:1 w:1) - /// Proof: Proxy Proxies (max_values: None, max_size: Some(1233), added: 3708, mode: MaxEncodedLen) + /// Storage: `Proxy::Proxies` (r:1 w:1) + /// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1233), added: 3708, mode: `MaxEncodedLen`) /// The range of component `p` is `[1, 31]`. fn remove_proxy(p: u32, ) -> Weight { // Proof Size summary in bytes: @@ -168,8 +167,8 @@ impl<T: frame_system::Config> pallet_proxy::WeightInfo for WeightInfo<T> { .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Proxy Proxies (r:1 w:1) - /// Proof: Proxy Proxies (max_values: None, max_size: Some(1233), added: 3708, mode: MaxEncodedLen) + /// Storage: `Proxy::Proxies` (r:1 w:1) + /// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1233), added: 3708, mode: `MaxEncodedLen`) /// The range of component `p` is `[1, 31]`. fn remove_proxies(_p: u32, ) -> Weight { // Proof Size summary in bytes: @@ -181,21 +180,23 @@ impl<T: frame_system::Config> pallet_proxy::WeightInfo for WeightInfo<T> { .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Proxy Proxies (r:1 w:1) - /// Proof: Proxy Proxies (max_values: None, max_size: Some(1233), added: 3708, mode: MaxEncodedLen) + /// Storage: `Proxy::Proxies` (r:1 w:1) + /// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1233), added: 3708, mode: `MaxEncodedLen`) /// The range of component `p` is `[1, 31]`. - fn create_pure(_p: u32, ) -> Weight { + fn create_pure(p: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `177` // Estimated: `4698` // Minimum execution time: 44_405_000 picoseconds. Weight::from_parts(71_055_316, 0) .saturating_add(Weight::from_parts(0, 4698)) + // Standard Error: 1_936 + .saturating_add(Weight::from_parts(2_195, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Proxy Proxies (r:1 w:1) - /// Proof: Proxy Proxies (max_values: None, max_size: Some(1233), added: 3708, mode: MaxEncodedLen) + /// Storage: `Proxy::Proxies` (r:1 w:1) + /// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1233), added: 3708, mode: `MaxEncodedLen`) /// The range of component `p` is `[0, 30]`. fn kill_pure(_p: u32, ) -> Weight { // Proof Size summary in bytes: diff --git a/runtime/common/src/weights/pallet_quota.rs b/runtime/common/src/weights/pallet_quota.rs index 2dd5ae83a3981a66723e42061c16cc73947afce4..2e67c768b4813a7920181bcd6f2bc3663e89964a 100644 --- a/runtime/common/src/weights/pallet_quota.rs +++ b/runtime/common/src/weights/pallet_quota.rs @@ -31,7 +31,6 @@ // --repeat=2 // --pallet=* // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --header=./file_header.txt @@ -48,8 +47,8 @@ use core::marker::PhantomData; /// Weight functions for `pallet_quota`. pub struct WeightInfo<T>(PhantomData<T>); impl<T: frame_system::Config> pallet_quota::WeightInfo for WeightInfo<T> { - /// Storage: Quota RefundQueue (r:1 w:1) - /// Proof: Quota RefundQueue (max_values: Some(1), max_size: Some(11266), added: 11761, mode: MaxEncodedLen) + /// Storage: `Quota::RefundQueue` (r:1 w:1) + /// Proof: `Quota::RefundQueue` (`max_values`: Some(1), `max_size`: Some(11266), added: 11761, mode: `MaxEncodedLen`) fn queue_refund() -> Weight { // Proof Size summary in bytes: // Measured: `11288` @@ -60,8 +59,8 @@ impl<T: frame_system::Config> pallet_quota::WeightInfo for WeightInfo<T> { .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Quota IdtyQuota (r:1 w:1) - /// Proof: Quota IdtyQuota (max_values: None, max_size: Some(24), added: 2499, mode: MaxEncodedLen) + /// Storage: `Quota::IdtyQuota` (r:1 w:1) + /// Proof: `Quota::IdtyQuota` (`max_values`: None, `max_size`: Some(24), added: 2499, mode: `MaxEncodedLen`) fn spend_quota() -> Weight { // Proof Size summary in bytes: // Measured: `139` @@ -72,10 +71,10 @@ impl<T: frame_system::Config> pallet_quota::WeightInfo for WeightInfo<T> { .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Quota IdtyQuota (r:1 w:1) - /// Proof: Quota IdtyQuota (max_values: None, max_size: Some(24), added: 2499, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(126), added: 2601, mode: MaxEncodedLen) + /// Storage: `Quota::IdtyQuota` (r:1 w:1) + /// Proof: `Quota::IdtyQuota` (`max_values`: None, `max_size`: Some(24), added: 2499, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:2 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(126), added: 2601, mode: `MaxEncodedLen`) fn try_refund() -> Weight { // Proof Size summary in bytes: // Measured: `139` @@ -86,10 +85,10 @@ impl<T: frame_system::Config> pallet_quota::WeightInfo for WeightInfo<T> { .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Quota IdtyQuota (r:1 w:1) - /// Proof: Quota IdtyQuota (max_values: None, max_size: Some(24), added: 2499, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(126), added: 2601, mode: MaxEncodedLen) + /// Storage: `Quota::IdtyQuota` (r:1 w:1) + /// Proof: `Quota::IdtyQuota` (`max_values`: None, `max_size`: Some(24), added: 2499, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:2 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(126), added: 2601, mode: `MaxEncodedLen`) fn do_refund() -> Weight { // Proof Size summary in bytes: // Measured: `139` @@ -100,8 +99,8 @@ impl<T: frame_system::Config> pallet_quota::WeightInfo for WeightInfo<T> { .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Quota RefundQueue (r:1 w:1) - /// Proof: Quota RefundQueue (max_values: Some(1), max_size: Some(11266), added: 11761, mode: MaxEncodedLen) + /// Storage: `Quota::RefundQueue` (r:1 w:1) + /// Proof: `Quota::RefundQueue` (`max_values`: Some(1), `max_size`: Some(11266), added: 11761, mode: `MaxEncodedLen`) fn on_process_refund_queue() -> Weight { // Proof Size summary in bytes: // Measured: `43` @@ -112,12 +111,12 @@ impl<T: frame_system::Config> pallet_quota::WeightInfo for WeightInfo<T> { .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Quota RefundQueue (r:1 w:1) - /// Proof: Quota RefundQueue (max_values: Some(1), max_size: Some(11266), added: 11761, mode: Measured) - /// Storage: Quota IdtyQuota (r:1 w:1) - /// Proof: Quota IdtyQuota (max_values: None, max_size: Some(24), added: 2499, mode: Measured) - /// Storage: System Account (r:1 w:0) - /// Proof: System Account (max_values: None, max_size: Some(126), added: 2601, mode: Measured) + /// Storage: `Quota::RefundQueue` (r:1 w:1) + /// Proof: `Quota::RefundQueue` (`max_values`: Some(1), `max_size`: Some(11266), added: 11761, mode: `Measured`) + /// Storage: `Quota::IdtyQuota` (r:1 w:1) + /// Proof: `Quota::IdtyQuota` (`max_values`: None, `max_size`: Some(24), added: 2499, mode: `Measured`) + /// Storage: `System::Account` (r:2 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(126), added: 2601, mode: `Measured`) /// The range of component `i` is `[1, 256]`. fn on_process_refund_queue_elements(i: u32, ) -> Weight { // Proof Size summary in bytes: diff --git a/runtime/common/src/weights/pallet_scheduler.rs b/runtime/common/src/weights/pallet_scheduler.rs index c792e151f8fe42b2d1ef624f428d06aefc273091..7a86277ae324c41dc41a93411c42c83cfe743705 100644 --- a/runtime/common/src/weights/pallet_scheduler.rs +++ b/runtime/common/src/weights/pallet_scheduler.rs @@ -31,7 +31,6 @@ // --repeat=2 // --pallet=* // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --header=./file_header.txt @@ -48,8 +47,8 @@ use core::marker::PhantomData; /// Weight functions for `pallet_scheduler`. pub struct WeightInfo<T>(PhantomData<T>); impl<T: frame_system::Config> pallet_scheduler::WeightInfo for WeightInfo<T> { - /// Storage: Scheduler IncompleteSince (r:1 w:1) - /// Proof: Scheduler IncompleteSince (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) + /// Storage: `Scheduler::IncompleteSince` (r:1 w:1) + /// Proof: `Scheduler::IncompleteSince` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) fn service_agendas_base() -> Weight { // Proof Size summary in bytes: // Measured: `30` @@ -60,8 +59,8 @@ impl<T: frame_system::Config> pallet_scheduler::WeightInfo for WeightInfo<T> { .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Scheduler Agenda (r:1 w:1) - /// Proof: Scheduler Agenda (max_values: None, max_size: Some(10463), added: 12938, mode: MaxEncodedLen) + /// Storage: `Scheduler::Agenda` (r:1 w:1) + /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(10463), added: 12938, mode: `MaxEncodedLen`) /// The range of component `s` is `[0, 50]`. fn service_agenda_base(s: u32, ) -> Weight { // Proof Size summary in bytes: @@ -83,10 +82,12 @@ impl<T: frame_system::Config> pallet_scheduler::WeightInfo for WeightInfo<T> { Weight::from_parts(10_122_000, 0) .saturating_add(Weight::from_parts(0, 0)) } - /// Storage: Preimage PreimageFor (r:1 w:1) - /// Proof: Preimage PreimageFor (max_values: None, max_size: Some(4194344), added: 4196819, mode: Measured) - /// Storage: Preimage StatusFor (r:1 w:1) - /// Proof: Preimage StatusFor (max_values: None, max_size: Some(83), added: 2558, mode: MaxEncodedLen) + /// Storage: `Preimage::PreimageFor` (r:1 w:1) + /// Proof: `Preimage::PreimageFor` (`max_values`: None, `max_size`: Some(4194344), added: 4196819, mode: `Measured`) + /// Storage: `Preimage::StatusFor` (r:1 w:0) + /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(83), added: 2558, mode: `MaxEncodedLen`) + /// Storage: `Preimage::RequestStatusFor` (r:1 w:1) + /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(75), added: 2550, mode: `MaxEncodedLen`) /// The range of component `s` is `[128, 4194304]`. fn service_task_fetched(s: u32, ) -> Weight { // Proof Size summary in bytes: @@ -101,8 +102,8 @@ impl<T: frame_system::Config> pallet_scheduler::WeightInfo for WeightInfo<T> { .saturating_add(T::DbWeight::get().writes(2)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(s.into())) } - /// Storage: Scheduler Lookup (r:0 w:1) - /// Proof: Scheduler Lookup (max_values: None, max_size: Some(48), added: 2523, mode: MaxEncodedLen) + /// Storage: `Scheduler::Lookup` (r:0 w:1) + /// Proof: `Scheduler::Lookup` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) fn service_task_named() -> Weight { // Proof Size summary in bytes: // Measured: `0` @@ -136,8 +137,8 @@ impl<T: frame_system::Config> pallet_scheduler::WeightInfo for WeightInfo<T> { Weight::from_parts(6_432_000, 0) .saturating_add(Weight::from_parts(0, 0)) } - /// Storage: Scheduler Agenda (r:1 w:1) - /// Proof: Scheduler Agenda (max_values: None, max_size: Some(10463), added: 12938, mode: MaxEncodedLen) + /// Storage: `Scheduler::Agenda` (r:1 w:1) + /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(10463), added: 12938, mode: `MaxEncodedLen`) /// The range of component `s` is `[0, 49]`. fn schedule(s: u32, ) -> Weight { // Proof Size summary in bytes: @@ -151,10 +152,10 @@ impl<T: frame_system::Config> pallet_scheduler::WeightInfo for WeightInfo<T> { .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Scheduler Agenda (r:1 w:1) - /// Proof: Scheduler Agenda (max_values: None, max_size: Some(10463), added: 12938, mode: MaxEncodedLen) - /// Storage: Scheduler Lookup (r:0 w:1) - /// Proof: Scheduler Lookup (max_values: None, max_size: Some(48), added: 2523, mode: MaxEncodedLen) + /// Storage: `Scheduler::Agenda` (r:1 w:1) + /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(10463), added: 12938, mode: `MaxEncodedLen`) + /// Storage: `Scheduler::Lookup` (r:0 w:1) + /// Proof: `Scheduler::Lookup` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) /// The range of component `s` is `[1, 50]`. fn cancel(s: u32, ) -> Weight { // Proof Size summary in bytes: @@ -168,10 +169,10 @@ impl<T: frame_system::Config> pallet_scheduler::WeightInfo for WeightInfo<T> { .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Scheduler Lookup (r:1 w:1) - /// Proof: Scheduler Lookup (max_values: None, max_size: Some(48), added: 2523, mode: MaxEncodedLen) - /// Storage: Scheduler Agenda (r:1 w:1) - /// Proof: Scheduler Agenda (max_values: None, max_size: Some(10463), added: 12938, mode: MaxEncodedLen) + /// Storage: `Scheduler::Lookup` (r:1 w:1) + /// Proof: `Scheduler::Lookup` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `Scheduler::Agenda` (r:1 w:1) + /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(10463), added: 12938, mode: `MaxEncodedLen`) /// The range of component `s` is `[0, 49]`. fn schedule_named(s: u32, ) -> Weight { // Proof Size summary in bytes: @@ -185,10 +186,10 @@ impl<T: frame_system::Config> pallet_scheduler::WeightInfo for WeightInfo<T> { .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Scheduler Lookup (r:1 w:1) - /// Proof: Scheduler Lookup (max_values: None, max_size: Some(48), added: 2523, mode: MaxEncodedLen) - /// Storage: Scheduler Agenda (r:1 w:1) - /// Proof: Scheduler Agenda (max_values: None, max_size: Some(10463), added: 12938, mode: MaxEncodedLen) + /// Storage: `Scheduler::Lookup` (r:1 w:1) + /// Proof: `Scheduler::Lookup` (`max_values`: None, `max_size`: Some(48), added: 2523, mode: `MaxEncodedLen`) + /// Storage: `Scheduler::Agenda` (r:1 w:1) + /// Proof: `Scheduler::Agenda` (`max_values`: None, `max_size`: Some(10463), added: 12938, mode: `MaxEncodedLen`) /// The range of component `s` is `[1, 50]`. fn cancel_named(s: u32, ) -> Weight { // Proof Size summary in bytes: diff --git a/runtime/common/src/weights/pallet_session.rs b/runtime/common/src/weights/pallet_session.rs index 4138b5b109336bbc4499d981557d353bea395db9..249b19475ea84ae44e008a0d5e832e5cea6cda60 100644 --- a/runtime/common/src/weights/pallet_session.rs +++ b/runtime/common/src/weights/pallet_session.rs @@ -31,7 +31,6 @@ // --repeat=2 // --pallet=* // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --header=./file_header.txt @@ -48,10 +47,10 @@ use core::marker::PhantomData; /// Weight functions for `pallet_session`. pub struct WeightInfo<T>(PhantomData<T>); impl<T: frame_system::Config> pallet_session::WeightInfo for WeightInfo<T> { - /// Storage: Session NextKeys (r:1 w:1) - /// Proof Skipped: Session NextKeys (max_values: None, max_size: None, mode: Measured) - /// Storage: Session KeyOwner (r:4 w:4) - /// Proof Skipped: Session KeyOwner (max_values: None, max_size: None, mode: Measured) + /// Storage: `Session::NextKeys` (r:1 w:1) + /// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Session::KeyOwner` (r:4 w:4) + /// Proof: `Session::KeyOwner` (`max_values`: None, `max_size`: None, mode: `Measured`) fn set_keys() -> Weight { // Proof Size summary in bytes: // Measured: `723` @@ -62,10 +61,10 @@ impl<T: frame_system::Config> pallet_session::WeightInfo for WeightInfo<T> { .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(5)) } - /// Storage: Session NextKeys (r:1 w:1) - /// Proof Skipped: Session NextKeys (max_values: None, max_size: None, mode: Measured) - /// Storage: Session KeyOwner (r:0 w:4) - /// Proof Skipped: Session KeyOwner (max_values: None, max_size: None, mode: Measured) + /// Storage: `Session::NextKeys` (r:1 w:1) + /// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Session::KeyOwner` (r:0 w:4) + /// Proof: `Session::KeyOwner` (`max_values`: None, `max_size`: None, mode: `Measured`) fn purge_keys() -> Weight { // Proof Size summary in bytes: // Measured: `412` diff --git a/runtime/common/src/weights/pallet_smith_members.rs b/runtime/common/src/weights/pallet_smith_members.rs index b27fda004b513fbf19adb7929cb1f620529796d0..3e89d16dd5654befdbac2bca8b8d8025788d6f15 100644 --- a/runtime/common/src/weights/pallet_smith_members.rs +++ b/runtime/common/src/weights/pallet_smith_members.rs @@ -31,7 +31,6 @@ // --repeat=2 // --pallet=* // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --header=./file_header.txt @@ -48,18 +47,18 @@ use core::marker::PhantomData; /// Weight functions for `pallet_smith_members`. pub struct WeightInfo<T>(PhantomData<T>); impl<T: frame_system::Config> pallet_smith_members::WeightInfo for WeightInfo<T> { - /// Storage: Identity IdentityIndexOf (r:1 w:0) - /// Proof Skipped: Identity IdentityIndexOf (max_values: None, max_size: None, mode: Measured) - /// Storage: SmithMembers Smiths (r:2 w:1) - /// Proof Skipped: SmithMembers Smiths (max_values: None, max_size: None, mode: Measured) - /// Storage: Membership Membership (r:1 w:0) - /// Proof Skipped: Membership Membership (max_values: None, max_size: None, mode: Measured) - /// Storage: SmithMembers CurrentSession (r:1 w:0) - /// Proof Skipped: SmithMembers CurrentSession (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Parameters ParametersStorage (r:1 w:0) - /// Proof Skipped: Parameters ParametersStorage (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: SmithMembers ExpiresOn (r:1 w:1) - /// Proof Skipped: SmithMembers ExpiresOn (max_values: None, max_size: None, mode: Measured) + /// Storage: `Identity::IdentityIndexOf` (r:1 w:0) + /// Proof: `Identity::IdentityIndexOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmithMembers::Smiths` (r:2 w:1) + /// Proof: `SmithMembers::Smiths` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Membership::Membership` (r:1 w:0) + /// Proof: `Membership::Membership` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmithMembers::CurrentSession` (r:1 w:0) + /// Proof: `SmithMembers::CurrentSession` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Parameters::ParametersStorage` (r:1 w:0) + /// Proof: `Parameters::ParametersStorage` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `SmithMembers::ExpiresOn` (r:1 w:1) + /// Proof: `SmithMembers::ExpiresOn` (`max_values`: None, `max_size`: None, mode: `Measured`) fn invite_smith() -> Weight { // Proof Size summary in bytes: // Measured: `732` @@ -70,10 +69,10 @@ impl<T: frame_system::Config> pallet_smith_members::WeightInfo for WeightInfo<T> .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Identity IdentityIndexOf (r:1 w:0) - /// Proof Skipped: Identity IdentityIndexOf (max_values: None, max_size: None, mode: Measured) - /// Storage: SmithMembers Smiths (r:1 w:1) - /// Proof Skipped: SmithMembers Smiths (max_values: None, max_size: None, mode: Measured) + /// Storage: `Identity::IdentityIndexOf` (r:1 w:0) + /// Proof: `Identity::IdentityIndexOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmithMembers::Smiths` (r:1 w:1) + /// Proof: `SmithMembers::Smiths` (`max_values`: None, `max_size`: None, mode: `Measured`) fn accept_invitation() -> Weight { // Proof Size summary in bytes: // Measured: `463` @@ -84,14 +83,14 @@ impl<T: frame_system::Config> pallet_smith_members::WeightInfo for WeightInfo<T> .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Identity IdentityIndexOf (r:1 w:0) - /// Proof Skipped: Identity IdentityIndexOf (max_values: None, max_size: None, mode: Measured) - /// Storage: SmithMembers Smiths (r:2 w:2) - /// Proof Skipped: SmithMembers Smiths (max_values: None, max_size: None, mode: Measured) - /// Storage: Parameters ParametersStorage (r:1 w:0) - /// Proof Skipped: Parameters ParametersStorage (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: SmithMembers CurrentSession (r:1 w:0) - /// Proof Skipped: SmithMembers CurrentSession (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `Identity::IdentityIndexOf` (r:1 w:0) + /// Proof: `Identity::IdentityIndexOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `SmithMembers::Smiths` (r:2 w:2) + /// Proof: `SmithMembers::Smiths` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Parameters::ParametersStorage` (r:1 w:0) + /// Proof: `Parameters::ParametersStorage` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `SmithMembers::CurrentSession` (r:1 w:0) + /// Proof: `SmithMembers::CurrentSession` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn certify_smith() -> Weight { // Proof Size summary in bytes: // Measured: `577` diff --git a/runtime/common/src/weights/pallet_sudo.rs b/runtime/common/src/weights/pallet_sudo.rs new file mode 100644 index 0000000000000000000000000000000000000000..d66cc41fa2664c8022c8b96b38663feb7dd5ddcf --- /dev/null +++ b/runtime/common/src/weights/pallet_sudo.rs @@ -0,0 +1,96 @@ +// Copyright 2021-2022 Axiom-Team +// +// This file is part of Duniter-v2S. +// +// Duniter-v2S is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, version 3 of the License. +// +// Duniter-v2S 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 Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with Duniter-v2S. If not, see <https://www.gnu.org/licenses/>. + +//! Autogenerated weights for `pallet_sudo` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2024-01-24, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `bgallois-ms7d43`, CPU: `12th Gen Intel(R) Core(TM) i3-12100F` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 + +// Executed Command: +// target/release/duniter +// benchmark +// pallet +// --chain=dev +// --steps=50 +// --repeat=20 +// --pallet=* +// --extrinsic=* +// --wasm-execution=compiled +// --heap-pages=4096 +// --header=./file_header.txt +// --output=./runtime/common/src/weights/ + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `pallet_sudo`. +pub struct WeightInfo<T>(PhantomData<T>); +impl<T: frame_system::Config> pallet_sudo::WeightInfo for WeightInfo<T> { + /// Storage: `Sudo::Key` (r:1 w:1) + /// Proof: `Sudo::Key` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`) + fn set_key() -> Weight { + // Proof Size summary in bytes: + // Measured: `165` + // Estimated: `1517` + // Minimum execution time: 6_941_000 picoseconds. + Weight::from_parts(7_451_000, 0) + .saturating_add(Weight::from_parts(0, 1517)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Sudo::Key` (r:1 w:0) + /// Proof: `Sudo::Key` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`) + fn sudo() -> Weight { + // Proof Size summary in bytes: + // Measured: `165` + // Estimated: `1517` + // Minimum execution time: 7_383_000 picoseconds. + Weight::from_parts(7_917_000, 0) + .saturating_add(Weight::from_parts(0, 1517)) + .saturating_add(T::DbWeight::get().reads(1)) + } + /// Storage: `Sudo::Key` (r:1 w:0) + /// Proof: `Sudo::Key` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`) + fn sudo_as() -> Weight { + // Proof Size summary in bytes: + // Measured: `165` + // Estimated: `1517` + // Minimum execution time: 7_367_000 picoseconds. + Weight::from_parts(7_890_000, 0) + .saturating_add(Weight::from_parts(0, 1517)) + .saturating_add(T::DbWeight::get().reads(1)) + } + /// Storage: `Sudo::Key` (r:1 w:1) + /// Proof: `Sudo::Key` (`max_values`: Some(1), `max_size`: Some(32), added: 527, mode: `MaxEncodedLen`) + fn remove_key() -> Weight { + // Proof Size summary in bytes: + // Measured: `165` + // Estimated: `1517` + // Minimum execution time: 6_445_000 picoseconds. + Weight::from_parts(6_714_000, 0) + .saturating_add(Weight::from_parts(0, 1517)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } +} diff --git a/runtime/common/src/weights/pallet_timestamp.rs b/runtime/common/src/weights/pallet_timestamp.rs index f7376fb79aff58e97c8b63633e59f0d5cda34fcf..6518156f09c0aaa72d8ba3b9353bb01e03ded23a 100644 --- a/runtime/common/src/weights/pallet_timestamp.rs +++ b/runtime/common/src/weights/pallet_timestamp.rs @@ -31,7 +31,6 @@ // --repeat=2 // --pallet=* // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --header=./file_header.txt @@ -48,14 +47,14 @@ use core::marker::PhantomData; /// Weight functions for `pallet_timestamp`. pub struct WeightInfo<T>(PhantomData<T>); impl<T: frame_system::Config> pallet_timestamp::WeightInfo for WeightInfo<T> { - /// Storage: Timestamp Now (r:1 w:1) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) - /// Storage: Babe CurrentSlot (r:1 w:0) - /// Proof: Babe CurrentSlot (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) - /// Storage: UniversalDividend NextUd (r:1 w:1) - /// Proof: UniversalDividend NextUd (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) - /// Storage: Parameters ParametersStorage (r:1 w:0) - /// Proof Skipped: Parameters ParametersStorage (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: `Timestamp::Now` (r:1 w:1) + /// Proof: `Timestamp::Now` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `Babe::CurrentSlot` (r:1 w:0) + /// Proof: `Babe::CurrentSlot` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `UniversalDividend::NextUd` (r:1 w:1) + /// Proof: `UniversalDividend::NextUd` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `Parameters::ParametersStorage` (r:1 w:0) + /// Proof: `Parameters::ParametersStorage` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) fn set() -> Weight { // Proof Size summary in bytes: // Measured: `379` diff --git a/runtime/common/src/weights/pallet_treasury.rs b/runtime/common/src/weights/pallet_treasury.rs index 977455753207c21bb6681a06a4400fb5b8332ff5..578f56c090daf9b95951083ddab989fca4ebf2f7 100644 --- a/runtime/common/src/weights/pallet_treasury.rs +++ b/runtime/common/src/weights/pallet_treasury.rs @@ -31,7 +31,6 @@ // --repeat=2 // --pallet=* // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --header=./file_header.txt @@ -48,7 +47,7 @@ use core::marker::PhantomData; /// Weight functions for `pallet_treasury`. pub struct WeightInfo<T>(PhantomData<T>); impl<T: frame_system::Config> pallet_treasury::WeightInfo for WeightInfo<T> { - fn spend() -> Weight { + fn spend_local() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` @@ -56,10 +55,10 @@ impl<T: frame_system::Config> pallet_treasury::WeightInfo for WeightInfo<T> { Weight::from_parts(557_000, 0) .saturating_add(Weight::from_parts(0, 0)) } - /// Storage: Treasury ProposalCount (r:1 w:1) - /// Proof: Treasury ProposalCount (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen) - /// Storage: Treasury Proposals (r:0 w:1) - /// Proof: Treasury Proposals (max_values: None, max_size: Some(92), added: 2567, mode: MaxEncodedLen) + /// Storage: `Treasury::ProposalCount` (r:1 w:1) + /// Proof: `Treasury::ProposalCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `Treasury::Proposals` (r:0 w:1) + /// Proof: `Treasury::Proposals` (`max_values`: None, `max_size`: Some(92), added: 2567, mode: `MaxEncodedLen`) fn propose_spend() -> Weight { // Proof Size summary in bytes: // Measured: `68` @@ -70,10 +69,10 @@ impl<T: frame_system::Config> pallet_treasury::WeightInfo for WeightInfo<T> { .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Treasury Proposals (r:1 w:1) - /// Proof: Treasury Proposals (max_values: None, max_size: Some(92), added: 2567, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(126), added: 2601, mode: MaxEncodedLen) + /// Storage: `Treasury::Proposals` (r:1 w:1) + /// Proof: `Treasury::Proposals` (`max_values`: None, `max_size`: Some(92), added: 2567, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(126), added: 2601, mode: `MaxEncodedLen`) fn reject_proposal() -> Weight { // Proof Size summary in bytes: // Measured: `210` @@ -84,10 +83,10 @@ impl<T: frame_system::Config> pallet_treasury::WeightInfo for WeightInfo<T> { .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: Treasury Proposals (r:1 w:0) - /// Proof: Treasury Proposals (max_values: None, max_size: Some(92), added: 2567, mode: MaxEncodedLen) - /// Storage: Treasury Approvals (r:1 w:1) - /// Proof: Treasury Approvals (max_values: Some(1), max_size: Some(402), added: 897, mode: MaxEncodedLen) + /// Storage: `Treasury::Proposals` (r:1 w:0) + /// Proof: `Treasury::Proposals` (`max_values`: None, `max_size`: Some(92), added: 2567, mode: `MaxEncodedLen`) + /// Storage: `Treasury::Approvals` (r:1 w:1) + /// Proof: `Treasury::Approvals` (`max_values`: Some(1), `max_size`: Some(402), added: 897, mode: `MaxEncodedLen`) /// The range of component `p` is `[0, 99]`. fn approve_proposal(p: u32, ) -> Weight { // Proof Size summary in bytes: @@ -101,8 +100,8 @@ impl<T: frame_system::Config> pallet_treasury::WeightInfo for WeightInfo<T> { .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Treasury Approvals (r:1 w:1) - /// Proof: Treasury Approvals (max_values: Some(1), max_size: Some(402), added: 897, mode: MaxEncodedLen) + /// Storage: `Treasury::Approvals` (r:1 w:1) + /// Proof: `Treasury::Approvals` (`max_values`: Some(1), `max_size`: Some(402), added: 897, mode: `MaxEncodedLen`) fn remove_approval() -> Weight { // Proof Size summary in bytes: // Measured: `90` @@ -113,19 +112,17 @@ impl<T: frame_system::Config> pallet_treasury::WeightInfo for WeightInfo<T> { .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Treasury Deactivated (r:1 w:1) - /// Proof: Treasury Deactivated (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) - /// Storage: Balances InactiveIssuance (r:1 w:1) - /// Proof: Balances InactiveIssuance (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) - /// Storage: Treasury Approvals (r:1 w:1) - /// Proof: Treasury Approvals (max_values: Some(1), max_size: Some(402), added: 897, mode: MaxEncodedLen) - /// Storage: Treasury Proposals (r:100 w:100) - /// Proof: Treasury Proposals (max_values: None, max_size: Some(92), added: 2567, mode: MaxEncodedLen) - /// Storage: System Account (r:200 w:200) - /// Proof: System Account (max_values: None, max_size: Some(126), added: 2601, mode: MaxEncodedLen) - /// Storage: Account PendingNewAccounts (r:0 w:100) - /// Proof Skipped: Account PendingNewAccounts (max_values: None, max_size: None, mode: Measured) - /// The range of component `p` is `[0, 100]`. + /// Storage: `System::Account` (r:199 w:199) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(126), added: 2601, mode: `MaxEncodedLen`) + /// Storage: `Treasury::Deactivated` (r:1 w:1) + /// Proof: `Treasury::Deactivated` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `Treasury::Approvals` (r:1 w:1) + /// Proof: `Treasury::Approvals` (`max_values`: Some(1), `max_size`: Some(402), added: 897, mode: `MaxEncodedLen`) + /// Storage: `Treasury::Proposals` (r:99 w:99) + /// Proof: `Treasury::Proposals` (`max_values`: None, `max_size`: Some(92), added: 2567, mode: `MaxEncodedLen`) + /// Storage: `Account::PendingNewAccounts` (r:0 w:99) + /// Proof: `Account::PendingNewAccounts` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `p` is `[0, 99]`. fn on_initialize_proposals(p: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `6 + p * (194 ±0)` @@ -140,4 +137,52 @@ impl<T: frame_system::Config> pallet_treasury::WeightInfo for WeightInfo<T> { .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(T::DbWeight::get().writes((4_u64).saturating_mul(p.into()))) } + fn spend() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 0_000 picoseconds. + Weight::from_parts(0, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + /// Storage: `Treasury::Spends` (r:1 w:1) + /// Proof: `Treasury::Spends` (`max_values`: None, `max_size`: Some(61), added: 2536, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(126), added: 2601, mode: `MaxEncodedLen`) + /// Storage: `Account::PendingNewAccounts` (r:0 w:1) + /// Proof: `Account::PendingNewAccounts` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn payout() -> Weight { + // Proof Size summary in bytes: + // Measured: `180` + // Estimated: `6192` + // Minimum execution time: 42_526_000 picoseconds. + Weight::from_parts(43_552_000, 0) + .saturating_add(Weight::from_parts(0, 6192)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(4)) + } + /// Storage: `Treasury::Spends` (r:1 w:1) + /// Proof: `Treasury::Spends` (`max_values`: None, `max_size`: Some(61), added: 2536, mode: `MaxEncodedLen`) + fn check_status() -> Weight { + // Proof Size summary in bytes: + // Measured: `116` + // Estimated: `3526` + // Minimum execution time: 8_915_000 picoseconds. + Weight::from_parts(9_287_000, 0) + .saturating_add(Weight::from_parts(0, 3526)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Treasury::Spends` (r:1 w:1) + /// Proof: `Treasury::Spends` (`max_values`: None, `max_size`: Some(61), added: 2536, mode: `MaxEncodedLen`) + fn void_spend() -> Weight { + // Proof Size summary in bytes: + // Measured: `116` + // Estimated: `3526` + // Minimum execution time: 7_955_000 picoseconds. + Weight::from_parts(8_849_000, 0) + .saturating_add(Weight::from_parts(0, 3526)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } } diff --git a/runtime/common/src/weights/pallet_universal_dividend.rs b/runtime/common/src/weights/pallet_universal_dividend.rs index e1672e02e78148929d8dc7da4e0194740e3cb7ce..bcae2a15a3e15e66bd07edcdb10e632feef60d6d 100644 --- a/runtime/common/src/weights/pallet_universal_dividend.rs +++ b/runtime/common/src/weights/pallet_universal_dividend.rs @@ -31,7 +31,6 @@ // --repeat=2 // --pallet=* // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --header=./file_header.txt @@ -48,18 +47,18 @@ use core::marker::PhantomData; /// Weight functions for `pallet_universal_dividend`. pub struct WeightInfo<T>(PhantomData<T>); impl<T: frame_system::Config> pallet_universal_dividend::WeightInfo for WeightInfo<T> { - /// Storage: Identity IdentityIndexOf (r:1 w:0) - /// Proof Skipped: Identity IdentityIndexOf (max_values: None, max_size: None, mode: Measured) - /// Storage: Identity Identities (r:1 w:1) - /// Proof Skipped: Identity Identities (max_values: None, max_size: None, mode: Measured) - /// Storage: UniversalDividend CurrentUdIndex (r:1 w:0) - /// Proof: UniversalDividend CurrentUdIndex (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen) - /// Storage: UniversalDividend PastReevals (r:1 w:0) - /// Proof: UniversalDividend PastReevals (max_values: Some(1), max_size: Some(1602), added: 2097, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(126), added: 2601, mode: MaxEncodedLen) + /// Storage: `Identity::IdentityIndexOf` (r:1 w:0) + /// Proof: `Identity::IdentityIndexOf` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Identity::Identities` (r:1 w:1) + /// Proof: `Identity::Identities` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `UniversalDividend::CurrentUdIndex` (r:1 w:0) + /// Proof: `UniversalDividend::CurrentUdIndex` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`) + /// Storage: `UniversalDividend::PastReevals` (r:1 w:0) + /// Proof: `UniversalDividend::PastReevals` (`max_values`: Some(1), `max_size`: Some(1602), added: 2097, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(126), added: 2601, mode: `MaxEncodedLen`) /// The range of component `i` is `[1, 160]`. - fn claim_uds(i: u32, ) -> Weight { + fn claim_uds(_i: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `644` // Estimated: `4109` @@ -71,12 +70,12 @@ impl<T: frame_system::Config> pallet_universal_dividend::WeightInfo for WeightIn .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: UniversalDividend CurrentUd (r:1 w:0) - /// Proof: UniversalDividend CurrentUd (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(126), added: 2601, mode: MaxEncodedLen) - /// Storage: Account PendingNewAccounts (r:0 w:1) - /// Proof Skipped: Account PendingNewAccounts (max_values: None, max_size: None, mode: Measured) + /// Storage: `UniversalDividend::CurrentUd` (r:1 w:0) + /// Proof: `UniversalDividend::CurrentUd` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:2 w:2) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(126), added: 2601, mode: `MaxEncodedLen`) + /// Storage: `Account::PendingNewAccounts` (r:0 w:1) + /// Proof: `Account::PendingNewAccounts` (`max_values`: None, `max_size`: None, mode: `Measured`) fn transfer_ud() -> Weight { // Proof Size summary in bytes: // Measured: `93` @@ -87,12 +86,12 @@ impl<T: frame_system::Config> pallet_universal_dividend::WeightInfo for WeightIn .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: UniversalDividend CurrentUd (r:1 w:0) - /// Proof: UniversalDividend CurrentUd (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(126), added: 2601, mode: MaxEncodedLen) - /// Storage: Account PendingNewAccounts (r:0 w:1) - /// Proof Skipped: Account PendingNewAccounts (max_values: None, max_size: None, mode: Measured) + /// Storage: `UniversalDividend::CurrentUd` (r:1 w:0) + /// Proof: `UniversalDividend::CurrentUd` (`max_values`: Some(1), `max_size`: Some(8), added: 503, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(126), added: 2601, mode: `MaxEncodedLen`) + /// Storage: `Account::PendingNewAccounts` (r:0 w:1) + /// Proof: `Account::PendingNewAccounts` (`max_values`: None, `max_size`: None, mode: `Measured`) fn transfer_ud_keep_alive() -> Weight { // Proof Size summary in bytes: // Measured: `93` @@ -103,12 +102,12 @@ impl<T: frame_system::Config> pallet_universal_dividend::WeightInfo for WeightIn .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } - /// Storage: UniversalDividend CurrentUdIndex (r:1 w:0) - /// Proof: UniversalDividend CurrentUdIndex (max_values: Some(1), max_size: Some(2), added: 497, mode: MaxEncodedLen) - /// Storage: UniversalDividend PastReevals (r:1 w:0) - /// Proof: UniversalDividend PastReevals (max_values: Some(1), max_size: Some(1602), added: 2097, mode: MaxEncodedLen) - /// Storage: System Account (r:1 w:1) - /// Proof: System Account (max_values: None, max_size: Some(126), added: 2601, mode: MaxEncodedLen) + /// Storage: `UniversalDividend::CurrentUdIndex` (r:1 w:0) + /// Proof: `UniversalDividend::CurrentUdIndex` (`max_values`: Some(1), `max_size`: Some(2), added: 497, mode: `MaxEncodedLen`) + /// Storage: `UniversalDividend::PastReevals` (r:1 w:0) + /// Proof: `UniversalDividend::PastReevals` (`max_values`: Some(1), `max_size`: Some(1602), added: 2097, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(126), added: 2601, mode: `MaxEncodedLen`) /// The range of component `i` is `[0, 160]`. fn on_removed_member(i: u32, ) -> Weight { // Proof Size summary in bytes: diff --git a/runtime/common/src/weights/pallet_upgrade_origin.rs b/runtime/common/src/weights/pallet_upgrade_origin.rs index 6333adfe760515afdcc5baa042d593111b3e2df2..287a8b650adc67dffaff94e7cc5cb7ff8d8e4ca9 100644 --- a/runtime/common/src/weights/pallet_upgrade_origin.rs +++ b/runtime/common/src/weights/pallet_upgrade_origin.rs @@ -31,7 +31,6 @@ // --repeat=2 // --pallet=* // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --header=./file_header.txt diff --git a/runtime/common/src/weights/pallet_utility.rs b/runtime/common/src/weights/pallet_utility.rs index 73d4cb17acdd2ccd6549a26705134fa0983fc8ed..3bbc0e50f65454c7168465298b36bd9b597444d3 100644 --- a/runtime/common/src/weights/pallet_utility.rs +++ b/runtime/common/src/weights/pallet_utility.rs @@ -31,7 +31,6 @@ // --repeat=2 // --pallet=* // --extrinsic=* -// --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 // --header=./file_header.txt diff --git a/runtime/common/src/weights/paritydb_weights.rs b/runtime/common/src/weights/paritydb_weights.rs index ceed82df641138a423060cc9187693f6e12cf37f..4673b94b3907f7761eb255fbaeb2131346cd0efd 100644 --- a/runtime/common/src/weights/paritydb_weights.rs +++ b/runtime/common/src/weights/paritydb_weights.rs @@ -1,26 +1,25 @@ //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-12-26 (Y/M/D) +//! DATE: 2024-01-24 (Y/M/D) //! HOSTNAME: `bgallois-ms7d43`, CPU: `12th Gen Intel(R) Core(TM) i3-12100F` //! -//! DATABASE: `ParityDb`, RUNTIME: `ĞDev` +//! DATABASE: `ParityDb`, RUNTIME: `Ğdev Local Testnet` //! BLOCK-NUM: `BlockId::Number(0)` //! SKIP-WRITE: `false`, SKIP-READ: `false`, WARMUPS: `1` //! STATE-VERSION: `V1`, STATE-CACHE-SIZE: `` -//! WEIGHT-PATH: `runtime/common/src/weights/` +//! WEIGHT-PATH: `./runtime/common/src/weights/` //! METRIC: `Average`, WEIGHT-MUL: `2.0`, WEIGHT-ADD: `0` // Executed Command: // target/release/duniter // benchmark // storage -// --chain=gdev +// --chain=dev // --mul=2 +// --weight-path=./runtime/common/src/weights/ // --state-version=1 -// --weight-path -// runtime/common/src/weights/ -/// Storage DB weights for the `ĞDev` runtime and `ParityDb`. +/// Storage DB weights for the `Ğdev Local Testnet` runtime and `ParityDb`. pub mod constants { use frame_support::weights::constants; use sp_core::parameter_types; @@ -34,31 +33,31 @@ pub mod constants { /// Calculated by multiplying the *Average* of all values with `2.0` and adding `0`. /// /// Stats nanoseconds: - /// Min, Max: 1_139, 113_508 - /// Average: 3_659 - /// Median: 3_601 - /// Std-Dev: 820.57 + /// Min, Max: 951, 1_277_318 + /// Average: 11_592 + /// Median: 1_567 + /// Std-Dev: 111445.56 /// /// Percentiles nanoseconds: - /// 99th: 5_347 - /// 95th: 4_760 - /// 75th: 4_064 - read: 7_318 * constants::WEIGHT_REF_TIME_PER_NANOS, + /// 99th: 10_193 + /// 95th: 2_928 + /// 75th: 1_855 + read: 23_184 * constants::WEIGHT_REF_TIME_PER_NANOS, /// Time to write one storage item. /// Calculated by multiplying the *Average* of all values with `2.0` and adding `0`. /// /// Stats nanoseconds: - /// Min, Max: 4_337, 511_811 - /// Average: 25_862 - /// Median: 24_782 - /// Std-Dev: 5817.92 + /// Min, Max: 3_824, 6_440_944 + /// Average: 58_440 + /// Median: 8_907 + /// Std-Dev: 561954.34 /// /// Percentiles nanoseconds: - /// 99th: 47_862 - /// 95th: 37_929 - /// 75th: 27_045 - write: 51_724 * constants::WEIGHT_REF_TIME_PER_NANOS, + /// 99th: 18_256 + /// 95th: 13_376 + /// 75th: 10_858 + write: 116_880 * constants::WEIGHT_REF_TIME_PER_NANOS, }; } diff --git a/runtime/g1/Cargo.toml b/runtime/g1/Cargo.toml index 65207b28d2d50149694689d9dd2ba701d6fb339a..fb0cc12856fead6e4bbf4e841cbd3eb95a95ffc7 100644 --- a/runtime/g1/Cargo.toml +++ b/runtime/g1/Cargo.toml @@ -1,7 +1,3 @@ -[build-dependencies.substrate-wasm-builder] -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' - [package] authors = ['Axiom-Team Developers <https://axiom-team.fr>'] edition = "2021" @@ -10,18 +6,16 @@ license = 'AGPL-3.0' name = 'g1-runtime' repository = 'https://git.duniter.org/nodes/rust/duniter-v2s' version = '3.0.0' -[package.metadata.docs.rs] -targets = ['x86_64-unknown-linux-gnu'] [features] default = ['std'] +constant-fees = ['common-runtime/constant-fees'] runtime-benchmarks = [ 'common-runtime/runtime-benchmarks', 'frame-benchmarking/runtime-benchmarks', 'frame-support/runtime-benchmarks', 'frame-system-benchmarking', 'frame-system/runtime-benchmarks', - 'hex-literal', 'pallet-authority-members/runtime-benchmarks', 'pallet-smith-members/runtime-benchmarks', 'pallet-babe/runtime-benchmarks', @@ -44,6 +38,7 @@ runtime-benchmarks = [ 'pallet-session-benchmarking/runtime-benchmarks', 'pallet-proxy/runtime-benchmarks', 'pallet-scheduler/runtime-benchmarks', + 'pallet-sudo/runtime-benchmarks', 'pallet-timestamp/runtime-benchmarks', 'pallet-treasury/runtime-benchmarks', 'pallet-universal-dividend/runtime-benchmarks', @@ -53,150 +48,197 @@ runtime-benchmarks = [ ] std = [ 'codec/std', + 'common-runtime/std', + 'frame-benchmarking/std', 'frame-executive/std', 'frame-support/std', - 'frame-system-rpc-runtime-api/std', 'frame-system/std', + 'frame-system-benchmarking/std', + 'frame-system-rpc-runtime-api/std', "frame-try-runtime/std", - 'pallet-atomic-swap/std', 'log/std', + 'pallet-atomic-swap/std', 'pallet-authority-discovery/std', 'pallet-authority-members/std', - 'pallet-smith-members/std', + "pallet-authorship/std", 'pallet-babe/std', 'pallet-balances/std', 'pallet-certification/std', 'pallet-collective/std', 'pallet-distance/std', - 'pallet-duniter-test-parameters/std', 'pallet-duniter-account/std', - 'pallet-quota/std', + 'pallet-duniter-test-parameters/std', 'pallet-duniter-wot/std', 'pallet-grandpa/std', 'pallet-identity/std', - 'pallet-membership/std', - 'pallet-provide-randomness/std', 'pallet-im-online/std', + 'pallet-membership/std', 'pallet-multisig/std', + "pallet-offences/std", 'pallet-oneshot-account/std', 'pallet-preimage/std', + 'pallet-provide-randomness/std', 'pallet-proxy/std', + 'pallet-quota/std', + 'pallet-multisig/std', + "pallet-scheduler/std", 'pallet-session/std', + 'pallet-session-benchmarking/std', + 'pallet-smith-members/std', 'pallet-sudo/std', - 'pallet-universal-dividend/std', - 'pallet-upgrade-origin/std', 'pallet-timestamp/std', - 'pallet-transaction-payment-rpc-runtime-api/std', 'pallet-transaction-payment/std', + 'pallet-transaction-payment-rpc-runtime-api/std', 'pallet-treasury/std', - 'common-runtime/std', - 'serde', + 'pallet-universal-dividend/std', + 'pallet-upgrade-origin/std', + 'pallet-utility/std', + 'scale-info/std', + "serde/std", + "serde_derive", 'sp-api/std', 'sp-arithmetic/std', 'sp-authority-discovery/std', 'sp-block-builder/std', 'sp-consensus-babe/std', + 'sp-consensus-grandpa/std', 'sp-core/std', + 'sp-distance/std', 'sp-inherents/std', - 'sp-offchain/std', 'sp-membership/std', + 'sp-offchain/std', 'sp-runtime/std', 'sp-session/std', 'sp-std/std', 'sp-transaction-pool/std', 'sp-version/std', + 'sp-staking/std', + 'node-primitives/std', + 'substrate-wasm-builder', ] try-runtime = [ - "frame-executive/try-runtime", - "frame-try-runtime", - "frame-system/try-runtime", - "pallet-authority-discovery/try-runtime", + 'common-runtime/try-runtime', + 'frame-executive/try-runtime', + 'frame-support/try-runtime', + 'frame-system/try-runtime', + 'frame-try-runtime/try-runtime', + 'pallet-atomic-swap/try-runtime', + 'pallet-authority-discovery/try-runtime', + 'pallet-authority-members/try-runtime', "pallet-authorship/try-runtime", - "pallet-balances/try-runtime", - "pallet-transaction-payment/try-runtime", - "pallet-collective/try-runtime", - "pallet-grandpa/try-runtime", - "pallet-im-online/try-runtime", - "pallet-multisig/try-runtime", + 'pallet-babe/try-runtime', + 'pallet-balances/try-runtime', + 'pallet-certification/try-runtime', + 'pallet-collective/try-runtime', + 'pallet-distance/try-runtime', + 'pallet-duniter-account/try-runtime', + 'pallet-duniter-test-parameters/try-runtime', + 'pallet-duniter-wot/try-runtime', + 'pallet-grandpa/try-runtime', + 'pallet-identity/try-runtime', + 'pallet-im-online/try-runtime', + 'pallet-membership/try-runtime', + 'pallet-multisig/try-runtime', "pallet-offences/try-runtime", - "pallet-proxy/try-runtime", + 'pallet-oneshot-account/try-runtime', + 'pallet-preimage/try-runtime', + 'pallet-provide-randomness/try-runtime', + 'pallet-proxy/try-runtime', + 'pallet-quota/try-runtime', + 'pallet-multisig/try-runtime', "pallet-scheduler/try-runtime", - "pallet-session/try-runtime", - "pallet-timestamp/try-runtime", - "pallet-treasury/try-runtime", - "pallet-babe/try-runtime", - "pallet-utility/try-runtime", + 'pallet-session/try-runtime', + 'pallet-smith-members/try-runtime', + 'pallet-sudo/try-runtime', + 'pallet-timestamp/try-runtime', + 'pallet-transaction-payment/try-runtime', + 'pallet-treasury/try-runtime', + 'pallet-universal-dividend/try-runtime', + 'pallet-upgrade-origin/try-runtime', + 'pallet-utility/try-runtime', ] [dev-dependencies] -sp-io = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -sp-keyring = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } +sp-keyring = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +sp-staking = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } + +[build-dependencies] +substrate-wasm-builder = { git = "https://github.com/duniter/duniter-polkadot-sdk", optional = true , branch = "duniter-substrate-v1.6.0" } [dependencies] + +# crates.io +codec = { package = "parity-scale-codec", version = "3.6.9", features = ["derive"], default-features = false } # local common-runtime = { path = "../common", default-features = false } + +# substrate benchmarking +frame-benchmarking = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false, optional = false } +frame-executive = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +frame-support = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +frame-system = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +frame-system-benchmarking = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false, optional = true } +frame-system-rpc-runtime-api = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } + +# substrate +frame-try-runtime = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false, optional = true } +hex-literal = { version = '0.4.1', default-features = false, optional = true } +log = { version = "0.4.20", default-features = false } +pallet-atomic-swap = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +pallet-authority-discovery = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } pallet-authority-members = { path = '../../pallets/authority-members', default-features = false } -pallet-smith-members = { path = '../../pallets/smith-members', default-features = false } +pallet-authorship = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +pallet-babe = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +pallet-balances = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } pallet-certification = { path = '../../pallets/certification', default-features = false } +pallet-collective = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } pallet-distance = { path = "../../pallets/distance", default-features = false } -pallet-duniter-test-parameters = { path = '../../pallets/duniter-test-parameters', default-features = false } pallet-duniter-account = { path = '../../pallets/duniter-account', default-features = false } -pallet-quota = { path = '../../pallets/quota', default-features = false } +pallet-duniter-test-parameters = { path = '../../pallets/duniter-test-parameters', default-features = false } pallet-duniter-wot = { path = '../../pallets/duniter-wot', default-features = false } +pallet-grandpa = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } pallet-identity = { path = '../../pallets/identity', default-features = false } +pallet-im-online = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } pallet-membership = { path = '../../pallets/membership', default-features = false } +pallet-multisig = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +pallet-offences = { path = '../../pallets/offences', default-features = false } pallet-oneshot-account = { path = '../../pallets/oneshot-account', default-features = false } +pallet-preimage = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } pallet-provide-randomness = { path = '../../pallets/provide-randomness', default-features = false } +pallet-proxy = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +pallet-quota = { path = '../../pallets/quota', default-features = false } +pallet-scheduler = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +pallet-session = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +pallet-session-benchmarking = { path = '../../pallets/session-benchmarking', default-features = false } +pallet-smith-members = { path = '../../pallets/smith-members', default-features = false } +pallet-sudo = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +pallet-timestamp = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +pallet-transaction-payment = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +pallet-transaction-payment-rpc-runtime-api = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +pallet-treasury = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } pallet-universal-dividend = { path = '../../pallets/universal-dividend', default-features = false } pallet-upgrade-origin = { path = '../../pallets/upgrade-origin', default-features = false } +pallet-utility = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +scale-info = { version = "2.10.0", default-features = false, features = ["derive"] } +serde = { version = "1.0.195", default-features = false } +serde_derive = { version = "1.0.195", default-features = false, optional = true } +sp-api = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +sp-arithmetic = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +sp-authority-discovery = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +sp-block-builder = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +sp-consensus-babe = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +sp-consensus-grandpa = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +sp-core = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +sp-distance = { path = '../../primitives/distance', default-features = false } +sp-inherents = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } sp-membership = { path = '../../primitives/membership', default-features = false } -pallet-offences = { path = '../../pallets/offences', default-features = false } - -# crates.io -codec = { package = "parity-scale-codec", version = "3.4.0", features = ["derive"], default-features = false } -log = { version = "0.4.17", default-features = false } -hex-literal = { version = '0.4.1', default-features = false, optional = true } -scale-info = { version = "2.5.0", default-features = false, features = ["derive"] } -serde = { version = "1.0.139", default-features = false, optional = true, features = ["derive"] } +sp-offchain = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +sp-runtime = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +sp-session = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +sp-std = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +sp-transaction-pool = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +sp-version = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +node-primitives = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } -# substrate -frame-benchmarking = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false, optional = true } -frame-try-runtime = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false, optional = true } -frame-executive = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -frame-support = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -frame-system = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -frame-system-benchmarking = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false, optional = true } -frame-system-rpc-runtime-api = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false} -pallet-atomic-swap = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -pallet-authority-discovery = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -pallet-authorship = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -pallet-babe = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -pallet-balances = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -pallet-collective = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -pallet-grandpa = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -pallet-im-online = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -pallet-multisig = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -pallet-preimage = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -pallet-proxy = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -pallet-scheduler = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -pallet-session = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -pallet-session-benchmarking = { path = '../../pallets/session-benchmarking', default-features = false } -pallet-sudo = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -pallet-timestamp = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -pallet-transaction-payment = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -pallet-transaction-payment-rpc-runtime-api = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -pallet-treasury = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -pallet-utility = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -sp-api = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -sp-arithmetic = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -sp-authority-discovery = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -sp-block-builder = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -sp-consensus-babe = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -sp-core = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -sp-inherents = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -sp-offchain = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -sp-runtime = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -sp-session = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -sp-std = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -sp-transaction-pool = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -sp-version = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } +[package.metadata.docs.rs] +targets = ['x86_64-unknown-linux-gnu'] diff --git a/runtime/g1/build.rs b/runtime/g1/build.rs index decf500c1e400be96f7c6a0f1bfb2935a65e930d..b31efa2f039949719cab9bfdcb170c98d4cb542f 100644 --- a/runtime/g1/build.rs +++ b/runtime/g1/build.rs @@ -14,12 +14,13 @@ // You should have received a copy of the GNU Affero General Public License // along with Duniter-v2S. If not, see <https://www.gnu.org/licenses/>. -use substrate_wasm_builder::WasmBuilder; - fn main() { - WasmBuilder::new() - .with_current_project() - .export_heap_base() - .import_memory() - .build() + #[cfg(feature = "std")] + { + substrate_wasm_builder::WasmBuilder::new() + .with_current_project() + .export_heap_base() + .import_memory() + .build(); + } } diff --git a/runtime/g1/src/lib.rs b/runtime/g1/src/lib.rs index 8c9bca67c4336aaf69d36a807bf07a27cb6f6657..e3f5a7228269ef08640205939df99064e971f2e5 100644 --- a/runtime/g1/src/lib.rs +++ b/runtime/g1/src/lib.rs @@ -154,6 +154,7 @@ mod benches { [pallet_balances, Balances] [frame_benchmarking::baseline, Baseline::<Runtime>] [pallet_collective, TechnicalCommittee] + [pallet_sudo, Sudo] [pallet_session, SessionBench::<Runtime>] [pallet_im_online, ImOnline] [pallet_multisig, Multisig] @@ -189,7 +190,7 @@ impl Contains<RuntimeCall> for BaseCallFilter { PartialOrd, codec::Encode, codec::Decode, - frame_support::RuntimeDebug, + frame_support::pallet_prelude::RuntimeDebug, codec::MaxEncodedLen, scale_info::TypeInfo, )] @@ -232,69 +233,62 @@ impl frame_support::traits::InstanceFilter<RuntimeCall> for ProxyType { } } -common_runtime::pallets_config! { - impl pallet_sudo::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type RuntimeCall = RuntimeCall; - } -} +// Configure pallets to include in runtime. +common_runtime::pallets_config! {} // Create the runtime by composing the pallets that were previously configured. construct_runtime!( - pub enum Runtime where - Block = Block, - NodeBlock = common_runtime::Block, - UncheckedExtrinsic = UncheckedExtrinsic + pub enum Runtime { // Basic stuff - System: frame_system::{Pallet, Call, Config, Storage, Event<T>} = 0, - Account: pallet_duniter_account::{Pallet, Storage, Config<T>, Event<T>} = 1, - Scheduler: pallet_scheduler::{Pallet, Call, Storage, Event<T>} = 2, + System: frame_system = 0, + Account: pallet_duniter_account = 1, + Scheduler: pallet_scheduler = 2, // Block creation - Babe: pallet_babe::{Pallet, Call, Storage, Config, ValidateUnsigned} = 3, - Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent} = 4, + Babe: pallet_babe = 3, + Timestamp: pallet_timestamp = 4, // Money management - Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>} = 6, - TransactionPayment: pallet_transaction_payment::{Pallet, Storage, Event<T>} = 32, - OneshotAccount: pallet_oneshot_account::{Pallet, Call, Storage, Event<T>} = 7, - Quota: pallet_quota::{Pallet, Storage, Config<T>, Event<T>} = 66, + Balances: pallet_balances = 6, + TransactionPayment: pallet_transaction_payment = 32, + OneshotAccount: pallet_oneshot_account = 7, + Quota: pallet_quota = 66, - // Consensus support. - SmithMembers: pallet_smith_members::{Pallet, Call, Storage, Config<T>, Event<T>} = 10, - AuthorityMembers: pallet_authority_members::{Pallet, Call, Storage, Config<T>, Event<T>} = 11, - Authorship: pallet_authorship::{Pallet, Storage} = 12, - Offences: pallet_offences::{Pallet, Storage, Event} = 13, - Historical: session_historical::{Pallet} = 14, - Session: pallet_session::{Pallet, Call, Storage, Event, Config<T>} = 15, - Grandpa: pallet_grandpa::{Pallet, Call, Storage, Config, Event, ValidateUnsigned} = 16, - ImOnline: pallet_im_online::{Pallet, Call, Storage, Event<T>, ValidateUnsigned, Config<T>} = 17, - AuthorityDiscovery: pallet_authority_discovery::{Pallet, Config} = 18, + // Consensus support + SmithMembers: pallet_smith_members = 10, + AuthorityMembers: pallet_authority_members = 11, + Authorship: pallet_authorship = 12, + Offences: pallet_offences = 13, + Historical: session_historical = 14, + Session: pallet_session = 15, + Grandpa: pallet_grandpa= 16, + ImOnline: pallet_im_online = 17, + AuthorityDiscovery: pallet_authority_discovery = 18, - // Governance stuff. - Sudo: pallet_sudo::{Pallet, Call, Config<T>, Storage, Event<T>} = 20, - UpgradeOrigin: pallet_upgrade_origin::{Pallet, Call, Event} = 21, - Preimage: pallet_preimage::{Pallet, Call, Storage, Event<T>} = 22, - TechnicalCommittee: pallet_collective::<Instance2>::{Pallet, Call, Config<T>, Storage, Event<T>, Origin<T>} = 23, + // Governance stuff + Sudo: pallet_sudo = 20, + UpgradeOrigin: pallet_upgrade_origin = 21, + Preimage: pallet_preimage = 22, + TechnicalCommittee: pallet_collective::<Instance2> = 23, // Universal dividend - UniversalDividend: pallet_universal_dividend::{Pallet, Call, Config<T>, Storage, Event<T>} = 30, + UniversalDividend: pallet_universal_dividend = 30, // Web Of Trust - Wot: pallet_duniter_wot::{Pallet} = 40, - Identity: pallet_identity::{Pallet, Call, Config<T>, Storage, Event<T>} = 41, - Membership: pallet_membership::{Pallet, Config<T>, Storage, Event<T>} = 42, - Certification: pallet_certification::{Pallet, Call, Config<T>, Storage, Event<T>} = 43, - Distance: pallet_distance::{Pallet, Call, Storage, Inherent, Event<T>} = 44, + Wot: pallet_duniter_wot = 40, + Identity: pallet_identity = 41, + Membership: pallet_membership = 42, + Certification: pallet_certification = 43, + Distance: pallet_distance = 44, // Utilities - AtomicSwap: pallet_atomic_swap::{Pallet, Call, Storage, Event<T>} = 50, - Multisig: pallet_multisig::{Pallet, Call, Storage, Event<T>} = 51, - ProvideRandomness: pallet_provide_randomness::{Pallet, Call, Storage, Event} = 52, - Proxy: pallet_proxy::{Pallet, Call, Storage, Event<T>} = 53, - Utility: pallet_utility::{Pallet, Call, Event} = 54, - Treasury: pallet_treasury::{Pallet, Call, Config, Storage, Event<T>} = 55, + AtomicSwap: pallet_atomic_swap = 50, + Multisig: pallet_multisig = 51, + ProvideRandomness: pallet_provide_randomness = 52, + Proxy: pallet_proxy = 53, + Utility: pallet_utility = 54, + Treasury: pallet_treasury = 55, } ); diff --git a/runtime/gdev/Cargo.toml b/runtime/gdev/Cargo.toml index 716482251ac1f1a734150a12717684cd25317179..7a10663810dbfe38ba98afa6ae2e4ea641ced8cd 100644 --- a/runtime/gdev/Cargo.toml +++ b/runtime/gdev/Cargo.toml @@ -1,7 +1,3 @@ -[build-dependencies.substrate-wasm-builder] -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' - [package] authors = ['Axiom-Team Developers <https://axiom-team.fr>'] edition = "2021" @@ -10,18 +6,16 @@ license = 'AGPL-3.0' name = 'gdev-runtime' repository = 'https://git.duniter.org/nodes/rust/duniter-v2s' version = '3.0.0' -[package.metadata.docs.rs] -targets = ['x86_64-unknown-linux-gnu'] [features] default = ['std'] +constant-fees = ['common-runtime/constant-fees'] runtime-benchmarks = [ 'common-runtime/runtime-benchmarks', 'frame-benchmarking/runtime-benchmarks', 'frame-support/runtime-benchmarks', - 'frame-system-benchmarking', + 'frame-system-benchmarking/runtime-benchmarks', 'frame-system/runtime-benchmarks', - 'hex-literal', 'pallet-authority-members/runtime-benchmarks', 'pallet-smith-members/runtime-benchmarks', 'pallet-babe/runtime-benchmarks', @@ -44,6 +38,7 @@ runtime-benchmarks = [ 'pallet-session-benchmarking/runtime-benchmarks', 'pallet-proxy/runtime-benchmarks', 'pallet-scheduler/runtime-benchmarks', + 'pallet-sudo/runtime-benchmarks', 'pallet-timestamp/runtime-benchmarks', 'pallet-treasury/runtime-benchmarks', 'pallet-universal-dividend/runtime-benchmarks', @@ -53,46 +48,53 @@ runtime-benchmarks = [ ] std = [ 'codec/std', + 'frame-try-runtime?/std', 'common-runtime/std', + 'frame-benchmarking?/std', 'frame-executive/std', 'frame-support/std', - 'frame-system-rpc-runtime-api/std', 'frame-system/std', + 'frame-system-benchmarking?/std', + 'frame-system-rpc-runtime-api/std', "frame-try-runtime/std", 'log/std', 'pallet-atomic-swap/std', 'pallet-authority-discovery/std', 'pallet-authority-members/std', - 'pallet-smith-members/std', + "pallet-authorship/std", 'pallet-babe/std', 'pallet-balances/std', 'pallet-certification/std', 'pallet-collective/std', 'pallet-distance/std', - 'pallet-duniter-test-parameters/std', 'pallet-duniter-account/std', - 'pallet-quota/std', + 'pallet-duniter-test-parameters/std', 'pallet-duniter-wot/std', 'pallet-grandpa/std', 'pallet-identity/std', - 'pallet-membership/std', - 'pallet-oneshot-account/std', - 'pallet-provide-randomness/std', 'pallet-im-online/std', + 'pallet-membership/std', 'pallet-multisig/std', "pallet-offences/std", + 'pallet-oneshot-account/std', 'pallet-preimage/std', + 'pallet-provide-randomness/std', 'pallet-proxy/std', + 'pallet-quota/std', + 'pallet-multisig/std', "pallet-scheduler/std", 'pallet-session/std', + 'pallet-session-benchmarking/std', + 'pallet-smith-members/std', 'pallet-sudo/std', - 'pallet-universal-dividend/std', - 'pallet-upgrade-origin/std', 'pallet-timestamp/std', - 'pallet-transaction-payment-rpc-runtime-api/std', 'pallet-transaction-payment/std', + 'pallet-transaction-payment-rpc-runtime-api/std', 'pallet-treasury/std', + 'pallet-universal-dividend/std', + 'pallet-upgrade-origin/std', 'pallet-utility/std', + 'scale-info/std', "serde/std", "serde_derive", 'sp-api/std', @@ -100,115 +102,146 @@ std = [ 'sp-authority-discovery/std', 'sp-block-builder/std', 'sp-consensus-babe/std', + 'sp-consensus-grandpa/std', 'sp-core/std', 'sp-distance/std', 'sp-inherents/std', - 'sp-offchain/std', 'sp-membership/std', + 'sp-offchain/std', 'sp-runtime/std', 'sp-session/std', 'sp-std/std', 'sp-transaction-pool/std', 'sp-version/std', + 'sp-staking/std', + 'sp-io/std', + 'node-primitives/std', + 'substrate-wasm-builder', ] try-runtime = [ - "common-runtime/try-runtime", - "frame-executive/try-runtime", - "frame-try-runtime", - "frame-system/try-runtime", - "pallet-authority-discovery/try-runtime", + 'common-runtime/try-runtime', + 'frame-executive/try-runtime', + 'frame-support/try-runtime', + 'frame-system/try-runtime', + 'frame-try-runtime/try-runtime', + 'pallet-atomic-swap/try-runtime', + 'pallet-authority-discovery/try-runtime', + 'pallet-authority-members/try-runtime', "pallet-authorship/try-runtime", - "pallet-balances/try-runtime", - "pallet-transaction-payment/try-runtime", - "pallet-collective/try-runtime", - "pallet-grandpa/try-runtime", - "pallet-im-online/try-runtime", - "pallet-multisig/try-runtime", + 'pallet-babe/try-runtime', + 'pallet-balances/try-runtime', + 'pallet-certification/try-runtime', + 'pallet-collective/try-runtime', + 'pallet-distance/try-runtime', + 'pallet-duniter-account/try-runtime', + 'pallet-duniter-test-parameters/try-runtime', + 'pallet-duniter-wot/try-runtime', + 'pallet-grandpa/try-runtime', + 'pallet-identity/try-runtime', + 'pallet-im-online/try-runtime', + 'pallet-membership/try-runtime', + 'pallet-multisig/try-runtime', "pallet-offences/try-runtime", - "pallet-proxy/try-runtime", + 'pallet-oneshot-account/try-runtime', + 'pallet-preimage/try-runtime', + 'pallet-provide-randomness/try-runtime', + 'pallet-proxy/try-runtime', + 'pallet-quota/try-runtime', + 'pallet-multisig/try-runtime', "pallet-scheduler/try-runtime", - "pallet-session/try-runtime", - "pallet-timestamp/try-runtime", - "pallet-treasury/try-runtime", - "pallet-babe/try-runtime", - "pallet-utility/try-runtime", + 'pallet-session/try-runtime', + 'pallet-smith-members/try-runtime', + 'pallet-sudo/try-runtime', + 'pallet-timestamp/try-runtime', + 'pallet-transaction-payment/try-runtime', + 'pallet-treasury/try-runtime', + 'pallet-universal-dividend/try-runtime', + 'pallet-upgrade-origin/try-runtime', + 'pallet-utility/try-runtime', ] [dev-dependencies] -sp-io = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -sp-keyring = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -sp-staking = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } +sp-keyring = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +sp-staking = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +sp-io = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } + +[build-dependencies] +substrate-wasm-builder = { git = "https://github.com/duniter/duniter-polkadot-sdk", optional = true , branch = "duniter-substrate-v1.6.0" } [dependencies] + +# crates.io +codec = { package = "parity-scale-codec", version = "3.6.9", features = ["derive"], default-features = false } # local common-runtime = { path = "../common", default-features = false } + +# substrate benchmarking +frame-benchmarking = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false, optional = true } +frame-executive = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +frame-support = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +frame-system = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +frame-system-benchmarking = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false, optional = true } +frame-system-rpc-runtime-api = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } + +# substrate +frame-try-runtime = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false, optional = true } +hex-literal = { version = '0.4.1', default-features = false, optional = true } +log = { version = "0.4.20", default-features = false } +pallet-atomic-swap = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +pallet-authority-discovery = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } pallet-authority-members = { path = '../../pallets/authority-members', default-features = false } -pallet-smith-members = { path = '../../pallets/smith-members', default-features = false } +pallet-authorship = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +pallet-babe = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +pallet-balances = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } pallet-certification = { path = '../../pallets/certification', default-features = false } +pallet-collective = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } pallet-distance = { path = "../../pallets/distance", default-features = false } -pallet-duniter-test-parameters = { path = '../../pallets/duniter-test-parameters', default-features = false } pallet-duniter-account = { path = '../../pallets/duniter-account', default-features = false } -pallet-quota = { path = '../../pallets/quota', default-features = false } +pallet-duniter-test-parameters = { path = '../../pallets/duniter-test-parameters', default-features = false } pallet-duniter-wot = { path = '../../pallets/duniter-wot', default-features = false } +pallet-grandpa = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } pallet-identity = { path = '../../pallets/identity', default-features = false } +pallet-im-online = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } pallet-membership = { path = '../../pallets/membership', default-features = false } +pallet-multisig = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } pallet-offences = { path = '../../pallets/offences', default-features = false } pallet-oneshot-account = { path = '../../pallets/oneshot-account', default-features = false } +pallet-preimage = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } pallet-provide-randomness = { path = '../../pallets/provide-randomness', default-features = false } -pallet-universal-dividend = { path = '../../pallets/universal-dividend', default-features = false } +pallet-proxy = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +pallet-quota = { path = '../../pallets/quota', default-features = false } +pallet-scheduler = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +pallet-session = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } pallet-session-benchmarking = { path = '../../pallets/session-benchmarking', default-features = false } +pallet-smith-members = { path = '../../pallets/smith-members', default-features = false } +pallet-sudo = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +pallet-timestamp = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +pallet-transaction-payment = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +pallet-transaction-payment-rpc-runtime-api = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +pallet-treasury = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +pallet-universal-dividend = { path = '../../pallets/universal-dividend', default-features = false } pallet-upgrade-origin = { path = '../../pallets/upgrade-origin', default-features = false } +pallet-utility = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +scale-info = { version = "2.10.0", default-features = false, features = ["derive"] } +serde = { version = "1.0.195", default-features = false } +serde_derive = { version = "1.0.195", default-features = false, optional = true } +sp-api = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +sp-arithmetic = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +sp-authority-discovery = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +sp-block-builder = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +sp-consensus-babe = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +sp-consensus-grandpa = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +sp-core = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } sp-distance = { path = '../../primitives/distance', default-features = false } +sp-inherents = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } sp-membership = { path = '../../primitives/membership', default-features = false } +sp-offchain = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +sp-runtime = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +sp-session = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +sp-std = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +sp-transaction-pool = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +sp-version = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +node-primitives = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } -# crates.io -codec = { package = "parity-scale-codec", version = "3.4.0", features = ["derive"], default-features = false } -log = { version = "0.4.17", default-features = false } -hex-literal = { version = '0.4.1', default-features = false, optional = true } -scale-info = { version = "2.5.0", default-features = false, features = ["derive"] } -serde = { version = "1.0.139", default-features = false } -serde_derive = { version = "1.0.117", default-features = false, optional = true } - -# substrate -frame-try-runtime = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false, optional = true } -frame-executive = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -frame-support = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -frame-system = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -frame-system-rpc-runtime-api = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false} -pallet-atomic-swap = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -pallet-authority-discovery = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -pallet-authorship = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -pallet-babe = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -pallet-balances = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -pallet-collective = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -pallet-grandpa = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -pallet-im-online = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -pallet-multisig = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -pallet-preimage = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -pallet-proxy = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -pallet-scheduler = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -pallet-session = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -pallet-sudo = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -pallet-timestamp = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -pallet-transaction-payment = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -pallet-transaction-payment-rpc-runtime-api = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -pallet-treasury = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -pallet-utility = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -sp-api = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -sp-arithmetic = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -sp-authority-discovery = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -sp-block-builder = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -sp-consensus-babe = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -sp-consensus-grandpa = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -sp-core = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -sp-inherents = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -sp-offchain = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -sp-runtime = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -sp-session = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -sp-std = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -sp-transaction-pool = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -sp-version = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } - -# substrate benchmarking -frame-benchmarking = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false, optional = false } -frame-system-benchmarking = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false, optional = true } +[package.metadata.docs.rs] +targets = ['x86_64-unknown-linux-gnu'] diff --git a/runtime/gdev/build.rs b/runtime/gdev/build.rs index decf500c1e400be96f7c6a0f1bfb2935a65e930d..b31efa2f039949719cab9bfdcb170c98d4cb542f 100644 --- a/runtime/gdev/build.rs +++ b/runtime/gdev/build.rs @@ -14,12 +14,13 @@ // You should have received a copy of the GNU Affero General Public License // along with Duniter-v2S. If not, see <https://www.gnu.org/licenses/>. -use substrate_wasm_builder::WasmBuilder; - fn main() { - WasmBuilder::new() - .with_current_project() - .export_heap_base() - .import_memory() - .build() + #[cfg(feature = "std")] + { + substrate_wasm_builder::WasmBuilder::new() + .with_current_project() + .export_heap_base() + .import_memory() + .build(); + } } diff --git a/runtime/gdev/src/lib.rs b/runtime/gdev/src/lib.rs index d64153d645e659cc59d1a789cbfd253115618e62..485138f837b960c218198d917deb28b34e73d39d 100644 --- a/runtime/gdev/src/lib.rs +++ b/runtime/gdev/src/lib.rs @@ -159,6 +159,7 @@ mod benches { [pallet_collective, TechnicalCommittee] [pallet_session, SessionBench::<Runtime>] [pallet_im_online, ImOnline] + [pallet_sudo, Sudo] [pallet_multisig, Multisig] [pallet_preimage, Preimage] [pallet_proxy, Proxy] @@ -194,7 +195,7 @@ impl Contains<RuntimeCall> for BaseCallFilter { PartialOrd, codec::Encode, codec::Decode, - frame_support::RuntimeDebug, + frame_support::pallet_prelude::RuntimeDebug, codec::MaxEncodedLen, scale_info::TypeInfo, )] @@ -270,76 +271,68 @@ common_runtime::pallets_config! { pallet_duniter_test_parameters::SmithInactivityMaxDuration<Runtime>; impl pallet_duniter_test_parameters::Config for Runtime { + type BlockNumber = u32; type CertCount = u32; type PeriodCount = Balance; type SessionCount = u32; } - - impl pallet_sudo::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type RuntimeCall = RuntimeCall; - } } // Create the runtime by composing the pallets that were previously configured. construct_runtime!( - pub enum Runtime where - Block = Block, - NodeBlock = common_runtime::Block, - UncheckedExtrinsic = UncheckedExtrinsic - { + pub enum Runtime { // Basic stuff - System: frame_system::{Pallet, Call, Config, Storage, Event<T>} = 0, - Account: pallet_duniter_account::{Pallet, Call, Storage, Config<T>, Event<T>} = 1, - Scheduler: pallet_scheduler::{Pallet, Call, Storage, Event<T>} = 2, + System: frame_system = 0, + Account: pallet_duniter_account = 1, + Scheduler: pallet_scheduler = 2, // Block creation - Babe: pallet_babe::{Pallet, Call, Storage, Config, ValidateUnsigned} = 3, - Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent} = 4, + Babe: pallet_babe = 3, + Timestamp: pallet_timestamp = 4, // Test parameters - Parameters: pallet_duniter_test_parameters::{Pallet, Config<T>, Storage} = 5, + Parameters: pallet_duniter_test_parameters = 5, // Money management - Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>} = 6, - TransactionPayment: pallet_transaction_payment::{Pallet, Storage, Event<T>} = 32, - OneshotAccount: pallet_oneshot_account::{Pallet, Call, Storage, Event<T>} = 7, - Quota: pallet_quota::{Pallet, Storage, Config<T>, Event<T>} = 66, + Balances: pallet_balances = 6, + TransactionPayment: pallet_transaction_payment = 32, + OneshotAccount: pallet_oneshot_account = 7, + Quota: pallet_quota = 66, // Consensus support - SmithMembers: pallet_smith_members::{Pallet, Call, Storage, Config<T>, Event<T>} = 10, - AuthorityMembers: pallet_authority_members::{Pallet, Call, Storage, Config<T>, Event<T>} = 11, - Authorship: pallet_authorship::{Pallet, Storage} = 12, - Offences: pallet_offences::{Pallet, Storage, Event} = 13, - Historical: session_historical::{Pallet} = 14, - Session: pallet_session::{Pallet, Call, Storage, Event, Config<T>} = 15, - Grandpa: pallet_grandpa::{Pallet, Call, Storage, Config, Event, ValidateUnsigned} = 16, - ImOnline: pallet_im_online::{Pallet, Call, Storage, Event<T>, ValidateUnsigned, Config<T>} = 17, - AuthorityDiscovery: pallet_authority_discovery::{Pallet, Config} = 18, + SmithMembers: pallet_smith_members = 10, + AuthorityMembers: pallet_authority_members = 11, + Authorship: pallet_authorship = 12, + Offences: pallet_offences = 13, + Historical: session_historical = 14, + Session: pallet_session = 15, + Grandpa: pallet_grandpa= 16, + ImOnline: pallet_im_online = 17, + AuthorityDiscovery: pallet_authority_discovery = 18, // Governance stuff - Sudo: pallet_sudo::{Pallet, Call, Config<T>, Storage, Event<T>} = 20, - UpgradeOrigin: pallet_upgrade_origin::{Pallet, Call, Event} = 21, - Preimage: pallet_preimage::{Pallet, Call, Storage, Event<T>} = 22, - TechnicalCommittee: pallet_collective::<Instance2>::{Pallet, Call, Config<T>, Storage, Event<T>, Origin<T>} = 23, + Sudo: pallet_sudo = 20, + UpgradeOrigin: pallet_upgrade_origin = 21, + Preimage: pallet_preimage = 22, + TechnicalCommittee: pallet_collective::<Instance2> = 23, // Universal dividend - UniversalDividend: pallet_universal_dividend::{Pallet, Call, Config<T>, Storage, Event<T>} = 30, + UniversalDividend: pallet_universal_dividend = 30, // Web Of Trust - Wot: pallet_duniter_wot::{Pallet} = 40, - Identity: pallet_identity::{Pallet, Call, Config<T>, Storage, Event<T>} = 41, - Membership: pallet_membership::{Pallet, Config<T>, Storage, Event<T>} = 42, - Certification: pallet_certification::{Pallet, Call, Config<T>, Storage, Event<T>} = 43, - Distance: pallet_distance::{Pallet, Call, Storage, Inherent, Event<T>} = 44, + Wot: pallet_duniter_wot = 40, + Identity: pallet_identity = 41, + Membership: pallet_membership = 42, + Certification: pallet_certification = 43, + Distance: pallet_distance = 44, // Utilities - AtomicSwap: pallet_atomic_swap::{Pallet, Call, Storage, Event<T>} = 50, - Multisig: pallet_multisig::{Pallet, Call, Storage, Event<T>} = 51, - ProvideRandomness: pallet_provide_randomness::{Pallet, Call, Storage, Event} = 52, - Proxy: pallet_proxy::{Pallet, Call, Storage, Event<T>} = 53, - Utility: pallet_utility::{Pallet, Call, Event} = 54, - Treasury: pallet_treasury::{Pallet, Call, Config, Storage, Event<T>} = 55, + AtomicSwap: pallet_atomic_swap = 50, + Multisig: pallet_multisig = 51, + ProvideRandomness: pallet_provide_randomness = 52, + Proxy: pallet_proxy = 53, + Utility: pallet_utility = 54, + Treasury: pallet_treasury = 55, } ); diff --git a/runtime/gdev/tests/common/mod.rs b/runtime/gdev/tests/common/mod.rs index 0ca8aa74cc02be2f068724ebafd8811ce6b58cb1..249653ec218918ba9566cc79368c602509889012 100644 --- a/runtime/gdev/tests/common/mod.rs +++ b/runtime/gdev/tests/common/mod.rs @@ -14,18 +14,18 @@ // You should have received a copy of the GNU Affero General Public License // along with Duniter-v2S. If not, see <https://www.gnu.org/licenses/>. -#![allow(dead_code, unused_imports)] // TODO remove this line when we will have more tests +#![allow(dead_code, unused_imports)] use common_runtime::constants::*; use common_runtime::*; -use frame_support::traits::{GenesisBuild, OnFinalize, OnInitialize}; +use frame_support::traits::{OnFinalize, OnInitialize}; use gdev_runtime::opaque::SessionKeys; use gdev_runtime::*; use pallet_authority_members::OnNewSession; use pallet_smith_members::SmithMeta; use sp_authority_discovery::AuthorityId as AuthorityDiscoveryId; use sp_consensus_babe::{AuthorityId as BabeId, Slot}; -use sp_consensus_babe::{VrfOutput, VrfProof}; +use sp_consensus_babe::{VrfInput, VrfProof}; use sp_consensus_grandpa::AuthorityId as GrandpaId; use sp_core::crypto::IsWrappedBy; use sp_core::sr25519; @@ -155,8 +155,8 @@ impl ExtBuilder { parameters, } = self; - let mut t = frame_system::GenesisConfig::default() - .build_storage::<Runtime>() + let mut t = frame_system::GenesisConfig::<Runtime>::default() + .build_storage() .unwrap(); // compute total monetary mass @@ -196,9 +196,11 @@ impl ExtBuilder { .assimilate_storage(&mut t) .unwrap(); - pallet_duniter_test_parameters::GenesisConfig::<Runtime> { parameters } - .assimilate_storage(&mut t) - .unwrap(); + pallet_duniter_test_parameters::GenesisConfig::<Runtime> { + parameters: parameters.clone(), + } + .assimilate_storage(&mut t) + .unwrap(); pallet_session::GenesisConfig::<Runtime> { keys: initial_smiths diff --git a/runtime/gdev/tests/integration_tests.rs b/runtime/gdev/tests/integration_tests.rs index 10efd23dc88b1c539bee87997346627ab7d7dc8e..4624094d431f677308915f2a3e2ca1175f0ca226 100644 --- a/runtime/gdev/tests/integration_tests.rs +++ b/runtime/gdev/tests/integration_tests.rs @@ -196,7 +196,7 @@ fn test_identity_below_ed() { // new behavior : nobody is able to go below ED without killing the account // a transfer below ED will lead to frozen token error assert_noop!( - Balances::transfer( + Balances::transfer_allow_death( frame_system::RawOrigin::Signed(AccountKeyring::Alice.to_account_id()).into(), MultiAddress::Id(AccountKeyring::Bob.to_account_id()), 850 @@ -957,7 +957,7 @@ fn test_create_new_account_with_insufficient_balance() { assert_eq!(Balances::free_balance(Treasury::account_id()), 100); // Should be able to transfer 4 units to a new account - assert_ok!(Balances::transfer( + assert_ok!(Balances::transfer_allow_death( frame_system::RawOrigin::Signed(AccountKeyring::Alice.to_account_id()).into(), MultiAddress::Id(AccountKeyring::Eve.to_account_id()), 300 @@ -1014,7 +1014,7 @@ fn test_create_new_account() { assert_eq!(Balances::free_balance(Treasury::account_id()), 100); // Should be able to transfer 5 units to a new account - assert_ok!(Balances::transfer( + assert_ok!(Balances::transfer_allow_death( frame_system::RawOrigin::Signed(AccountKeyring::Alice.to_account_id()).into(), MultiAddress::Id(AccountKeyring::Eve.to_account_id()), 500 @@ -1066,7 +1066,7 @@ fn test_create_new_account() { run_to_block(4); // can not remove using transfer assert_noop!( - Balances::transfer( + Balances::transfer_allow_death( frame_system::RawOrigin::Signed(AccountKeyring::Eve.to_account_id()).into(), MultiAddress::Id(AccountKeyring::Alice.to_account_id()), 200 @@ -1104,7 +1104,7 @@ fn test_create_new_idty() { run_to_block(2); // Should be able to create an identity - assert_ok!(Balances::transfer( + assert_ok!(Balances::transfer_allow_death( frame_system::RawOrigin::Signed(AccountKeyring::Alice.to_account_id()).into(), MultiAddress::Id(AccountKeyring::Eve.to_account_id()), 200 @@ -1158,7 +1158,7 @@ fn test_create_new_idty_without_founds() { // Deposit some founds on the identity account, // this should trigger the random id assignemt - assert_ok!(Balances::transfer( + assert_ok!(Balances::transfer_allow_death( frame_system::RawOrigin::Signed(AccountKeyring::Alice.to_account_id()).into(), MultiAddress::Id(AccountKeyring::Eve.to_account_id()), 200 @@ -1193,7 +1193,7 @@ fn test_validate_new_idty_after_few_uds() { run_to_block(21); // Should be able to create an identity - assert_ok!(Balances::transfer( + assert_ok!(Balances::transfer_allow_death( frame_system::RawOrigin::Signed(AccountKeyring::Alice.to_account_id()).into(), MultiAddress::Id(AccountKeyring::Eve.to_account_id()), 200 @@ -1404,7 +1404,7 @@ fn test_link_account() { pallet_identity::Error::<gdev_runtime::Runtime>::AccountNotExist ); - assert_ok!(Balances::transfer( + assert_ok!(Balances::transfer_allow_death( frame_system::RawOrigin::Signed(alice.clone()).into(), MultiAddress::Id(ferdie.clone()), 1_000 diff --git a/runtime/gdev/tests/xt_tests.rs b/runtime/gdev/tests/xt_tests.rs index 4635571e3dd7e4709d10593d38c12fe9baa4b7e9..ab48fdaf73fbaf93be4e69a57a3b9f29bdebaa14 100644 --- a/runtime/gdev/tests/xt_tests.rs +++ b/runtime/gdev/tests/xt_tests.rs @@ -21,13 +21,13 @@ mod common; use common::*; use frame_support::assert_ok; -use frame_support::inherent::Extrinsic; use frame_support::traits::OnIdle; use gdev_runtime::*; use sp_core::Encode; use sp_core::Pair; use sp_keyring::AccountKeyring; use sp_runtime::generic::SignedPayload; +use sp_runtime::traits::Extrinsic; /// get extrinsic for given call fn get_unchecked_extrinsic( diff --git a/runtime/gtest/Cargo.toml b/runtime/gtest/Cargo.toml index 8e90489b73d8d7c6afd25dac6a15ca39ae03e524..9c7a497a0d1ba271cc7254a036cb73e06c0f8d64 100644 --- a/runtime/gtest/Cargo.toml +++ b/runtime/gtest/Cargo.toml @@ -1,7 +1,3 @@ -[build-dependencies.substrate-wasm-builder] -git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.42' - [package] authors = ['Axiom-Team Developers <https://axiom-team.fr>'] edition = "2021" @@ -10,18 +6,16 @@ license = 'AGPL-3.0' name = 'gtest-runtime' repository = 'https://git.duniter.org/nodes/rust/duniter-v2s' version = '3.0.0' -[package.metadata.docs.rs] -targets = ['x86_64-unknown-linux-gnu'] [features] default = ['std'] +constant-fees = ['common-runtime/constant-fees'] runtime-benchmarks = [ 'common-runtime/runtime-benchmarks', 'frame-benchmarking/runtime-benchmarks', 'frame-support/runtime-benchmarks', 'frame-system-benchmarking', 'frame-system/runtime-benchmarks', - 'hex-literal', 'pallet-authority-members/runtime-benchmarks', 'pallet-smith-members/runtime-benchmarks', 'pallet-babe/runtime-benchmarks', @@ -29,7 +23,9 @@ runtime-benchmarks = [ 'pallet-certification/runtime-benchmarks', 'pallet-collective/runtime-benchmarks', 'pallet-distance/runtime-benchmarks', + 'pallet-duniter-test-parameters/runtime-benchmarks', 'pallet-duniter-account/runtime-benchmarks', + 'pallet-quota/runtime-benchmarks', 'pallet-duniter-wot/runtime-benchmarks', 'pallet-grandpa/runtime-benchmarks', 'pallet-identity/runtime-benchmarks', @@ -42,6 +38,7 @@ runtime-benchmarks = [ 'pallet-session-benchmarking/runtime-benchmarks', 'pallet-proxy/runtime-benchmarks', 'pallet-scheduler/runtime-benchmarks', + 'pallet-sudo/runtime-benchmarks', 'pallet-timestamp/runtime-benchmarks', 'pallet-treasury/runtime-benchmarks', 'pallet-universal-dividend/runtime-benchmarks', @@ -52,44 +49,51 @@ runtime-benchmarks = [ std = [ 'codec/std', 'common-runtime/std', + 'frame-benchmarking/std', 'frame-executive/std', 'frame-support/std', - 'frame-system-rpc-runtime-api/std', 'frame-system/std', + 'frame-system-benchmarking/std', + 'frame-system-rpc-runtime-api/std', "frame-try-runtime/std", 'log/std', 'pallet-atomic-swap/std', 'pallet-authority-discovery/std', 'pallet-authority-members/std', - 'pallet-smith-members/std', + "pallet-authorship/std", 'pallet-babe/std', 'pallet-balances/std', 'pallet-certification/std', 'pallet-collective/std', 'pallet-distance/std', 'pallet-duniter-account/std', - 'pallet-quota/std', + 'pallet-duniter-test-parameters/std', 'pallet-duniter-wot/std', 'pallet-grandpa/std', 'pallet-identity/std', - 'pallet-membership/std', - 'pallet-oneshot-account/std', - 'pallet-provide-randomness/std', 'pallet-im-online/std', + 'pallet-membership/std', 'pallet-multisig/std', "pallet-offences/std", + 'pallet-oneshot-account/std', 'pallet-preimage/std', + 'pallet-provide-randomness/std', 'pallet-proxy/std', + 'pallet-quota/std', + 'pallet-multisig/std', "pallet-scheduler/std", 'pallet-session/std', + 'pallet-session-benchmarking/std', + 'pallet-smith-members/std', 'pallet-sudo/std', - 'pallet-universal-dividend/std', - 'pallet-upgrade-origin/std', 'pallet-timestamp/std', - 'pallet-transaction-payment-rpc-runtime-api/std', 'pallet-transaction-payment/std', + 'pallet-transaction-payment-rpc-runtime-api/std', 'pallet-treasury/std', + 'pallet-universal-dividend/std', + 'pallet-upgrade-origin/std', 'pallet-utility/std', + 'scale-info/std', "serde/std", "serde_derive", 'sp-api/std', @@ -97,112 +101,144 @@ std = [ 'sp-authority-discovery/std', 'sp-block-builder/std', 'sp-consensus-babe/std', + 'sp-consensus-grandpa/std', 'sp-core/std', 'sp-distance/std', 'sp-inherents/std', - 'sp-offchain/std', 'sp-membership/std', + 'sp-offchain/std', 'sp-runtime/std', 'sp-session/std', 'sp-std/std', 'sp-transaction-pool/std', 'sp-version/std', + 'sp-staking/std', + 'node-primitives/std', + 'substrate-wasm-builder', ] try-runtime = [ - "common-runtime/try-runtime", - "frame-executive/try-runtime", - "frame-try-runtime", - "frame-system/try-runtime", - "pallet-authority-discovery/try-runtime", + 'common-runtime/try-runtime', + 'frame-executive/try-runtime', + 'frame-support/try-runtime', + 'frame-system/try-runtime', + 'frame-try-runtime/try-runtime', + 'pallet-atomic-swap/try-runtime', + 'pallet-authority-discovery/try-runtime', + 'pallet-authority-members/try-runtime', "pallet-authorship/try-runtime", - "pallet-balances/try-runtime", - "pallet-transaction-payment/try-runtime", - "pallet-collective/try-runtime", - "pallet-grandpa/try-runtime", - "pallet-im-online/try-runtime", - "pallet-multisig/try-runtime", + 'pallet-babe/try-runtime', + 'pallet-balances/try-runtime', + 'pallet-certification/try-runtime', + 'pallet-collective/try-runtime', + 'pallet-distance/try-runtime', + 'pallet-duniter-account/try-runtime', + 'pallet-duniter-test-parameters/try-runtime', + 'pallet-duniter-wot/try-runtime', + 'pallet-grandpa/try-runtime', + 'pallet-identity/try-runtime', + 'pallet-im-online/try-runtime', + 'pallet-membership/try-runtime', + 'pallet-multisig/try-runtime', "pallet-offences/try-runtime", - "pallet-proxy/try-runtime", + 'pallet-oneshot-account/try-runtime', + 'pallet-preimage/try-runtime', + 'pallet-provide-randomness/try-runtime', + 'pallet-proxy/try-runtime', + 'pallet-quota/try-runtime', + 'pallet-multisig/try-runtime', "pallet-scheduler/try-runtime", - "pallet-session/try-runtime", - "pallet-timestamp/try-runtime", - "pallet-treasury/try-runtime", - "pallet-babe/try-runtime", - "pallet-utility/try-runtime", + 'pallet-session/try-runtime', + 'pallet-smith-members/try-runtime', + 'pallet-sudo/try-runtime', + 'pallet-timestamp/try-runtime', + 'pallet-transaction-payment/try-runtime', + 'pallet-treasury/try-runtime', + 'pallet-universal-dividend/try-runtime', + 'pallet-upgrade-origin/try-runtime', + 'pallet-utility/try-runtime', ] [dev-dependencies] -sp-io = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -sp-keyring = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } +sp-keyring = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +sp-staking = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } + +[build-dependencies] +substrate-wasm-builder = { git = "https://github.com/duniter/duniter-polkadot-sdk", optional = true , branch = "duniter-substrate-v1.6.0" } [dependencies] + +# crates.io +codec = { package = "parity-scale-codec", version = "3.6.9", features = ["derive"], default-features = false } # local common-runtime = { path = "../common", default-features = false } + +# substrate benchmarking +frame-benchmarking = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false, optional = false } +frame-executive = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +frame-support = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +frame-system = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +frame-system-benchmarking = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false, optional = true } +frame-system-rpc-runtime-api = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } + +# substrate +frame-try-runtime = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false, optional = true } +hex-literal = { version = '0.4.1', default-features = false, optional = true } +log = { version = "0.4.20", default-features = false } +pallet-atomic-swap = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +pallet-authority-discovery = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } pallet-authority-members = { path = '../../pallets/authority-members', default-features = false } -pallet-smith-members = { path = '../../pallets/smith-members', default-features = false } +pallet-authorship = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +pallet-babe = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +pallet-balances = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } pallet-certification = { path = '../../pallets/certification', default-features = false } +pallet-collective = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } pallet-distance = { path = "../../pallets/distance", default-features = false } pallet-duniter-account = { path = '../../pallets/duniter-account', default-features = false } -pallet-quota = { path = '../../pallets/quota', default-features = false } +pallet-duniter-test-parameters = { path = '../../pallets/duniter-test-parameters', default-features = false } pallet-duniter-wot = { path = '../../pallets/duniter-wot', default-features = false } +pallet-grandpa = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } pallet-identity = { path = '../../pallets/identity', default-features = false } +pallet-im-online = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } pallet-membership = { path = '../../pallets/membership', default-features = false } +pallet-multisig = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } pallet-offences = { path = '../../pallets/offences', default-features = false } pallet-oneshot-account = { path = '../../pallets/oneshot-account', default-features = false } +pallet-preimage = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } pallet-provide-randomness = { path = '../../pallets/provide-randomness', default-features = false } -pallet-universal-dividend = { path = '../../pallets/universal-dividend', default-features = false } +pallet-proxy = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +pallet-quota = { path = '../../pallets/quota', default-features = false } +pallet-scheduler = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +pallet-session = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } pallet-session-benchmarking = { path = '../../pallets/session-benchmarking', default-features = false } +pallet-smith-members = { path = '../../pallets/smith-members', default-features = false } +pallet-sudo = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +pallet-timestamp = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +pallet-transaction-payment = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +pallet-transaction-payment-rpc-runtime-api = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +pallet-treasury = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +pallet-universal-dividend = { path = '../../pallets/universal-dividend', default-features = false } pallet-upgrade-origin = { path = '../../pallets/upgrade-origin', default-features = false } +pallet-utility = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +scale-info = { version = "2.10.0", default-features = false, features = ["derive"] } +serde = { version = "1.0.195", default-features = false } +serde_derive = { version = "1.0.195", default-features = false, optional = true } +sp-api = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +sp-arithmetic = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +sp-authority-discovery = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +sp-block-builder = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +sp-consensus-babe = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +sp-consensus-grandpa = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +sp-core = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } sp-distance = { path = '../../primitives/distance', default-features = false } +sp-inherents = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } sp-membership = { path = '../../primitives/membership', default-features = false } +sp-offchain = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +sp-runtime = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +sp-session = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +sp-std = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +sp-transaction-pool = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +sp-version = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } +node-primitives = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.6.0', default-features = false } -# crates.io -codec = { package = "parity-scale-codec", version = "3.4.0", features = ["derive"], default-features = false } -log = { version = "0.4.17", default-features = false } -hex-literal = { version = '0.4.1', default-features = false, optional = true } -scale-info = { version = "2.5.0", default-features = false, features = ["derive"] } -serde = { version = "1.0.139", default-features = false } -serde_derive = { version = "1.0.117", default-features = false, optional = true } - -# substrate -frame-try-runtime = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false, optional = true } -frame-executive = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -frame-support = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -frame-system = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -frame-system-rpc-runtime-api = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false} -pallet-atomic-swap = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -pallet-authority-discovery = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -pallet-authorship = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -pallet-babe = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -pallet-balances = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -pallet-collective = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -pallet-grandpa = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -pallet-im-online = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -pallet-multisig = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -pallet-preimage = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -pallet-proxy = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -pallet-scheduler = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -pallet-session = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -pallet-sudo = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -pallet-timestamp = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -pallet-transaction-payment = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -pallet-transaction-payment-rpc-runtime-api = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -pallet-treasury = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -pallet-utility = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -sp-api = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -sp-arithmetic = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -sp-authority-discovery = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -sp-block-builder = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -sp-consensus-babe = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -sp-core = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -sp-inherents = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -sp-offchain = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -sp-runtime = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -sp-session = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -sp-std = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -sp-transaction-pool = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } -sp-version = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false } - -# substrate benchmarking -frame-benchmarking = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false, optional = false } -frame-system-benchmarking = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.42', default-features = false, optional = true } +[package.metadata.docs.rs] +targets = ['x86_64-unknown-linux-gnu'] diff --git a/runtime/gtest/build.rs b/runtime/gtest/build.rs index decf500c1e400be96f7c6a0f1bfb2935a65e930d..b31efa2f039949719cab9bfdcb170c98d4cb542f 100644 --- a/runtime/gtest/build.rs +++ b/runtime/gtest/build.rs @@ -14,12 +14,13 @@ // You should have received a copy of the GNU Affero General Public License // along with Duniter-v2S. If not, see <https://www.gnu.org/licenses/>. -use substrate_wasm_builder::WasmBuilder; - fn main() { - WasmBuilder::new() - .with_current_project() - .export_heap_base() - .import_memory() - .build() + #[cfg(feature = "std")] + { + substrate_wasm_builder::WasmBuilder::new() + .with_current_project() + .export_heap_base() + .import_memory() + .build(); + } } diff --git a/runtime/gtest/src/lib.rs b/runtime/gtest/src/lib.rs index 7fe0cfeba60b0c77c6746d931b272e13e582f3d3..70da1da8605672834ba8f309a3257706132bef6b 100644 --- a/runtime/gtest/src/lib.rs +++ b/runtime/gtest/src/lib.rs @@ -160,6 +160,7 @@ mod benches { [pallet_multisig, Multisig] [pallet_preimage, Preimage] [pallet_proxy, Proxy] + [pallet_sudo, Sudo] [pallet_scheduler, Scheduler] [frame_system, SystemBench::<Runtime>] [pallet_timestamp, Timestamp] @@ -188,7 +189,7 @@ impl Contains<RuntimeCall> for BaseCallFilter { PartialOrd, codec::Encode, codec::Decode, - frame_support::RuntimeDebug, + frame_support::pallet_prelude::RuntimeDebug, codec::MaxEncodedLen, scale_info::TypeInfo, )] @@ -239,70 +240,61 @@ impl frame_support::traits::InstanceFilter<RuntimeCall> for ProxyType { } // Configure pallets to include in runtime. -common_runtime::pallets_config! { - - impl pallet_sudo::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type RuntimeCall = RuntimeCall; - } -} +common_runtime::pallets_config! {} // Create the runtime by composing the pallets that were previously configured. construct_runtime!( - pub enum Runtime where - Block = Block, - NodeBlock = common_runtime::Block, - UncheckedExtrinsic = UncheckedExtrinsic + pub enum Runtime { // Basic stuff - System: frame_system::{Pallet, Call, Config, Storage, Event<T>} = 0, - Account: pallet_duniter_account::{Pallet, Storage, Config<T>, Event<T>} = 1, - Scheduler: pallet_scheduler::{Pallet, Call, Storage, Event<T>} = 2, + System: frame_system = 0, + Account: pallet_duniter_account = 1, + Scheduler: pallet_scheduler = 2, // Block creation - Babe: pallet_babe::{Pallet, Call, Storage, Config, ValidateUnsigned} = 3, - Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent} = 4, + Babe: pallet_babe = 3, + Timestamp: pallet_timestamp = 4, // Money management - Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>} = 6, - TransactionPayment: pallet_transaction_payment::{Pallet, Storage, Event<T>} = 32, - OneshotAccount: pallet_oneshot_account::{Pallet, Call, Storage, Event<T>} = 7, - Quota: pallet_quota::{Pallet, Storage, Config<T>, Event<T>} = 66, + Balances: pallet_balances = 6, + TransactionPayment: pallet_transaction_payment = 32, + OneshotAccount: pallet_oneshot_account = 7, + Quota: pallet_quota = 66, // Consensus support - SmithMembers: pallet_smith_members::{Pallet, Call, Storage, Config<T>, Event<T>} = 10, - AuthorityMembers: pallet_authority_members::{Pallet, Call, Storage, Config<T>, Event<T>} = 11, - Authorship: pallet_authorship::{Pallet, Storage} = 12, - Offences: pallet_offences::{Pallet, Storage, Event} = 13, - Historical: session_historical::{Pallet} = 14, - Session: pallet_session::{Pallet, Call, Storage, Event, Config<T>} = 15, - Grandpa: pallet_grandpa::{Pallet, Call, Storage, Config, Event, ValidateUnsigned} = 16, - ImOnline: pallet_im_online::{Pallet, Call, Storage, Event<T>, ValidateUnsigned, Config<T>} = 17, - AuthorityDiscovery: pallet_authority_discovery::{Pallet, Config} = 18, + SmithMembers: pallet_smith_members = 10, + AuthorityMembers: pallet_authority_members = 11, + Authorship: pallet_authorship = 12, + Offences: pallet_offences = 13, + Historical: session_historical = 14, + Session: pallet_session = 15, + Grandpa: pallet_grandpa= 16, + ImOnline: pallet_im_online = 17, + AuthorityDiscovery: pallet_authority_discovery = 18, // Governance stuff - Sudo: pallet_sudo::{Pallet, Call, Config<T>, Storage, Event<T>} = 20, - UpgradeOrigin: pallet_upgrade_origin::{Pallet, Call, Event} = 21, - Preimage: pallet_preimage::{Pallet, Call, Storage, Event<T>} = 22, - TechnicalCommittee: pallet_collective::<Instance2>::{Pallet, Call, Config<T>, Storage, Event<T>, Origin<T>} = 23, + Sudo: pallet_sudo = 20, + UpgradeOrigin: pallet_upgrade_origin = 21, + Preimage: pallet_preimage = 22, + TechnicalCommittee: pallet_collective::<Instance2> = 23, // Universal dividend - UniversalDividend: pallet_universal_dividend::{Pallet, Call, Config<T>, Storage, Event<T>} = 30, + UniversalDividend: pallet_universal_dividend = 30, // Web Of Trust - Wot: pallet_duniter_wot::{Pallet} = 40, - Identity: pallet_identity::{Pallet, Call, Config<T>, Storage, Event<T>} = 41, - Membership: pallet_membership::{Pallet, Config<T>, Storage, Event<T>} = 42, - Certification: pallet_certification::{Pallet, Call, Config<T>, Storage, Event<T>} = 43, - Distance: pallet_distance::{Pallet, Call, Storage, Inherent, Event<T>} = 44, + Wot: pallet_duniter_wot = 40, + Identity: pallet_identity = 41, + Membership: pallet_membership = 42, + Certification: pallet_certification = 43, + Distance: pallet_distance = 44, // Utilities - AtomicSwap: pallet_atomic_swap::{Pallet, Call, Storage, Event<T>} = 50, - Multisig: pallet_multisig::{Pallet, Call, Storage, Event<T>} = 51, - ProvideRandomness: pallet_provide_randomness::{Pallet, Call, Storage, Event} = 52, - Proxy: pallet_proxy::{Pallet, Call, Storage, Event<T>} = 53, - Utility: pallet_utility::{Pallet, Call, Event} = 54, - Treasury: pallet_treasury::{Pallet, Call, Config, Storage, Event<T>} = 55, + AtomicSwap: pallet_atomic_swap = 50, + Multisig: pallet_multisig = 51, + ProvideRandomness: pallet_provide_randomness = 52, + Proxy: pallet_proxy = 53, + Utility: pallet_utility = 54, + Treasury: pallet_treasury = 55, } ); diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 7c39cc2dff56643cbdabbb51b183f6f1fc2b8fc1..5e98fede28ca46517d26e8496c6493b4ea4a4acd 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,5 +1,5 @@ [toolchain] -channel = "nightly-2023-08-23" -components = [ "rustfmt", "clippy" ] +channel = "nightly-2023-10-31" +components = [ "rustfmt", "clippy", "rust-std", "cargo", "rust-src" ] targets = [ "wasm32-unknown-unknown" ] profile = "minimal" diff --git a/rustfmt.toml b/rustfmt.toml new file mode 100644 index 0000000000000000000000000000000000000000..b7ac0b7277d257f2401ec6ef04d6b8ef88ba6c5c --- /dev/null +++ b/rustfmt.toml @@ -0,0 +1 @@ +reorder_impl_items = true diff --git a/scripts/run_all_benchmarks.sh b/scripts/run_all_benchmarks.sh new file mode 100755 index 0000000000000000000000000000000000000000..01ec0fe5deecb190c8a5412b78548505723839cd --- /dev/null +++ b/scripts/run_all_benchmarks.sh @@ -0,0 +1,5 @@ +cargo build --release --features runtime-benchmarks +target/release/duniter benchmark storage --chain=dev --mul=2 --weight-path=./runtime/common/src/weights/ --state-version=1 +target/release/duniter benchmark overhead --chain=dev --wasm-execution=compiled --weight-path=./runtime/common/src/weights/ --warmup=10 --repeat=100 +target/release/duniter benchmark pallet --chain=dev --steps=50 --repeat=20 --pallet="*" --extrinsic="*" --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/common/src/weights/ + diff --git a/xtask/Cargo.toml b/xtask/Cargo.toml index 43d347a1de779e63e71571463602e9f76a01baeb..c996fece88646766487b5a81bf37b01513e4e270 100644 --- a/xtask/Cargo.toml +++ b/xtask/Cargo.toml @@ -16,7 +16,7 @@ name = "xtask" anyhow = "1.0.32" clap = { version = "4.0", features = ["derive"] } codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false, features = ["derive", "full", "bit-vec"] } -frame-metadata = "15.0.0" +frame-metadata = "16.0.0" graphql_client = "0.10.0" hex = "0.4" memmap2 = "0.5.0" @@ -24,11 +24,11 @@ placeholder = "1.1.3" reqwest = { version = "0.11.11", features = ["json"] } run_script = "0.6.3" scale-info = { version = "2.1.1", features = ["bit-vec"] } +scale-value = "0.13.0" serde = { version = "1.0.101", features = ["derive"] } serde_json = "1.0" +tera = { version = "1", default-features = false } tokio = { version = "1.24.2", features = ["macros"] } -version_check = "0.9.2" version-compare = "0.0.11" -tera = { version = "1", default-features = false } -weight-analyzer = {path = "../resources/weight_analyzer"} -scale-value = "0.13.0" +version_check = "0.9.2" +weight-analyzer = { path = "../resources/weight_analyzer" } diff --git a/xtask/src/gen_doc.rs b/xtask/src/gen_doc.rs index 979fa59a3040f70d2fd1e8a16932fbf6990fd366..929361633264451c01a562110242448c48497c80 100644 --- a/xtask/src/gen_doc.rs +++ b/xtask/src/gen_doc.rs @@ -229,12 +229,15 @@ impl CallCategory { _ => Self::User, } } + fn is_root(pallet_name: &str, call_name: &str) -> bool { matches!(Self::is(pallet_name, call_name), Self::Root) } + fn is_user(pallet_name: &str, call_name: &str) -> bool { matches!(Self::is(pallet_name, call_name), Self::User) } + fn is_disabled(pallet_name: &str, call_name: &str) -> bool { matches!(Self::is(pallet_name, call_name), Self::Disabled) } @@ -256,10 +259,10 @@ pub(super) fn gen_doc() -> Result<()> { println!("Metadata successfully loaded!"); let (mut runtime, max_weight) = - if let frame_metadata::RuntimeMetadata::V14(ref metadata_v14) = metadata.1 { + if let frame_metadata::RuntimeMetadata::V15(ref metadata_v15) = metadata.1 { ( - get_from_metadata_v14(metadata_v14.clone())?, - get_max_weight_from_metadata_v14(metadata_v14.clone())?, + get_from_metadata_v15(metadata_v15.clone())?, + get_max_weight_from_metadata_v15(metadata_v15.clone())?, ) } else { bail!("unsuported metadata version") @@ -280,7 +283,6 @@ pub(super) fn gen_doc() -> Result<()> { // For pallets with manual or no weight, we define a default value. weights.insert("Babe".to_string(), Default::default()); // Manual weights.insert("Grandpa".to_string(), Default::default()); // Manual - weights.insert("Sudo".to_string(), Default::default()); // Only > v1.0 has WeightInfo TODO at update weights.insert("AtomicSwap".to_string(), Default::default()); // No weight // Insert weights for each call of each pallet. @@ -320,12 +322,12 @@ pub(super) fn gen_doc() -> Result<()> { Ok(()) } -fn get_max_weight_from_metadata_v14( - metadata_v14: frame_metadata::v14::RuntimeMetadataV14, +fn get_max_weight_from_metadata_v15( + metadata_v15: frame_metadata::v15::RuntimeMetadataV15, ) -> Result<u128> { // Extract the maximal weight available in one block // from the metadata. - let block_weights = metadata_v14 + let block_weights = metadata_v15 .pallets .iter() .find(|pallet| pallet.name == "System") @@ -338,29 +340,31 @@ fn get_max_weight_from_metadata_v14( let block_weights = scale_value::scale::decode_as_type( &mut &*block_weights.value, block_weights.ty.id, - &metadata_v14.types, + &metadata_v15.types, ) .expect("Can't decode max_weight") .value; if let scale_value::ValueDef::Composite(scale_value::Composite::Named(i)) = block_weights - && let scale_value::ValueDef::Composite(scale_value::Composite::Named(j)) = &i.iter().find(|name| name.0 == "max_block").unwrap().1.value - && let scale_value::ValueDef::Primitive(scale_value::Primitive::U128(k)) = &j.iter().find(|name| name.0 == "ref_time").unwrap().1.value - { - Ok(*k) - } else { - bail!("Invalid max_weight") - } + && let scale_value::ValueDef::Composite(scale_value::Composite::Named(j)) = + &i.iter().find(|name| name.0 == "max_block").unwrap().1.value + && let scale_value::ValueDef::Primitive(scale_value::Primitive::U128(k)) = + &j.iter().find(|name| name.0 == "ref_time").unwrap().1.value + { + Ok(*k) + } else { + bail!("Invalid max_weight") + } } -fn get_from_metadata_v14( - metadata_v14: frame_metadata::v14::RuntimeMetadataV14, +fn get_from_metadata_v15( + metadata_v15: frame_metadata::v15::RuntimeMetadataV15, ) -> Result<RuntimePallets> { - println!("Number of pallets: {}", metadata_v14.pallets.len()); + println!("Number of pallets: {}", metadata_v15.pallets.len()); let mut pallets = Vec::new(); - for pallet in metadata_v14.pallets { + for pallet in metadata_v15.pallets { let calls_type_def = if let Some(calls) = pallet.calls { - let Some(calls_type) = metadata_v14.types.resolve(calls.ty.id) else { + let Some(calls_type) = metadata_v15.types.resolve(calls.ty.id) else { bail!("Invalid metadata") }; Some(calls_type.type_def.clone()) @@ -369,7 +373,7 @@ fn get_from_metadata_v14( None }; let events_type_def = if let Some(events) = pallet.event { - let Some(events_type) = metadata_v14.types.resolve(events.ty.id) else { + let Some(events_type) = metadata_v15.types.resolve(events.ty.id) else { bail!("Invalid metadata") }; Some(events_type.type_def.clone()) @@ -378,7 +382,7 @@ fn get_from_metadata_v14( None }; let errors_type_def = if let Some(errors) = pallet.error { - let Some(errors_type) = metadata_v14.types.resolve(errors.ty.id) else { + let Some(errors_type) = metadata_v15.types.resolve(errors.ty.id) else { bail!("Invalid metadata") }; Some(errors_type.type_def.clone())