diff --git a/.vscode/launch.json b/.vscode/launch.json index 3fb767daceef457fbfeab501aea8b9c4e0bbabd1..e7982be638cf8ca067e612b2efda245a48e96116 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -9,7 +9,12 @@ "request": "launch", "name": "Debug unit tests in library 'duniter'", "cargo": { - "args": ["test", "--no-run", "--lib", "--package=duniter"], + "args": [ + "test", + "--no-run", + "--lib", + "--package=duniter" + ], "filter": { "name": "duniter", "kind": "lib" @@ -23,13 +28,20 @@ "request": "launch", "name": "Debug executable 'duniter'", "cargo": { - "args": ["build"], + "args": [ + "build" + ], "filter": { "name": "duniter", "kind": "bin" } }, - "args": ["--tmp", "--dev", "--execution", "Native"], + "args": [ + "--tmp", + "--dev", + "--execution", + "Native" + ], "cwd": "${workspaceFolder}" }, { @@ -37,7 +49,12 @@ "request": "launch", "name": "Debug unit tests in executable 'duniter'", "cargo": { - "args": ["test", "--no-run", "--bin=duniter", "--package=duniter"], + "args": [ + "test", + "--no-run", + "--bin=duniter", + "--package=duniter" + ], "filter": { "name": "duniter", "kind": "bin" @@ -51,7 +68,12 @@ "request": "launch", "name": "Debug unit tests in library 'gdev-runtime'", "cargo": { - "args": ["test", "--no-run", "--lib", "--package=gdev-runtime"], + "args": [ + "test", + "--no-run", + "--lib", + "--package=gdev-runtime" + ], "filter": { "name": "gdev-runtime", "kind": "lib" @@ -65,7 +87,12 @@ "request": "launch", "name": "Debug unit tests in library 'pallet-certification'", "cargo": { - "args": ["test", "--no-run", "--lib", "--package=pallet-certification"], + "args": [ + "test", + "--no-run", + "--lib", + "--package=pallet-certification" + ], "filter": { "name": "pallet-certification", "kind": "lib" @@ -79,7 +106,12 @@ "request": "launch", "name": "Debug unit tests in library 'pallet-identity'", "cargo": { - "args": ["test", "--no-run", "--lib", "--package=pallet-identity"], + "args": [ + "test", + "--no-run", + "--lib", + "--package=pallet-identity" + ], "filter": { "name": "pallet-identity", "kind": "lib" @@ -108,4 +140,4 @@ "cwd": "${workspaceFolder}" } ] -} +} \ No newline at end of file diff --git a/Cargo.lock b/Cargo.lock index 470e820e88447c0d3410d45b388dc1c55a14a82a..1d8fa6f3d062dda40cf2e1d07fb18d343293c1f6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -18,7 +18,16 @@ version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9ecd88a8c8378ca913a680cd98f0f13ac67383d35993f86c90a70e3f137816b" dependencies = [ - "gimli", + "gimli 0.26.2", +] + +[[package]] +name = "addr2line" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a76fd60b23679b7d19bd066031410fb7e458ccc5e958eb5c325888ce4baedc97" +dependencies = [ + "gimli 0.27.0", ] [[package]] @@ -33,7 +42,7 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b613b8e1e3cf911a086f53f03bf286f52fd7a7258e4fa606f0ef220d39d8877" dependencies = [ - "generic-array 0.14.4", + "generic-array 0.14.6", ] [[package]] @@ -44,7 +53,7 @@ checksum = "9e8b47f52ea9bae42228d07ec09eb676433d7c4ed1ebdf0f1d1c29ed446f1ab8" dependencies = [ "cfg-if 1.0.0", "cipher", - "cpufeatures 0.2.1", + "cpufeatures", "opaque-debug 0.3.0", ] @@ -68,20 +77,29 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" dependencies = [ - "getrandom 0.2.3", + "getrandom 0.2.8", "once_cell", "version_check", ] [[package]] name = "aho-corasick" -version = "0.7.18" +version = "0.7.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e37cfd5e7657ada45f742d6e99ca5788580b5c529dc78faf11ece6dc702656f" +checksum = "cc936419f96fa211c1b9166887b38e5e40b19958e5b895be7c1f93adec7071ac" dependencies = [ "memchr", ] +[[package]] +name = "android_system_properties" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" +dependencies = [ + "libc", +] + [[package]] name = "ansi_term" version = "0.12.1" @@ -93,19 +111,25 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.43" +version = "1.0.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28ae2b3dec75a406790005a200b1bd89785afc02517a00ca99ecfe093ee9e6cf" +checksum = "2cb2f989d18dd141ab8ae82f64d1a8cdd37e0840f73a406896cf5e99502fab61" [[package]] name = "approx" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "072df7202e63b127ab55acfe16ce97013d5b97bf160489336d3f1840fd78e99e" +checksum = "cab112f0a86d568ea0e627cc1d6be74a1e9cd55214684db5561995f6dad897c6" dependencies = [ "num-traits", ] +[[package]] +name = "array-bytes" +version = "4.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f52f63c5c1316a16a4b35eaac8b76a98248961a533f061684cb2a7cb0eafb6c6" + [[package]] name = "arrayref" version = "0.3.6" @@ -141,9 +165,9 @@ checksum = "eab1c04a571841102f5345a8fc0f6bb3d31c315dec879b5c6e42e40ce7ffa34e" [[package]] name = "asn1_der" -version = "0.7.4" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d6e24d2cce90c53b948c46271bfb053e4bdc2db9b5d3f65e20f8cf28a1b7fc3" +checksum = "e22d1f4b888c298a027c99dc9048015fac177587de20fc30232a057dfbe24a21" [[package]] name = "assert_matches" @@ -153,9 +177,9 @@ checksum = "9b34d609dfbaf33d6889b2b7106d3ca345eacad44200913df5ba02bfd31d2ba9" [[package]] name = "async-channel" -version = "1.6.1" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2114d64672151c0c5eaa5e131ec84a74f06e1e559830dabba01ca30605d66319" +checksum = "cf46fee83e5ccffc220104713af3292ff9bc7c64c7de289f66dae8e38d826833" dependencies = [ "concurrent-queue", "event-listener", @@ -164,93 +188,86 @@ dependencies = [ [[package]] name = "async-executor" -version = "1.4.1" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "871f9bb5e0a22eeb7e8cf16641feb87c9dc67032ccf8ff49e772eb9941d3a965" +checksum = "17adb73da160dfb475c183343c8cccd80721ea5a605d3eb57125f0a7b7a92d0b" dependencies = [ + "async-lock", "async-task", "concurrent-queue", "fastrand", "futures-lite", - "once_cell", "slab", ] [[package]] name = "async-global-executor" -version = "2.0.2" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9586ec52317f36de58453159d48351bc244bc24ced3effc1fce22f3d48664af6" +checksum = "f1b6f5d7df27bd294849f8eec66ecfc63d11814df7a4f5d74168a2394467b776" dependencies = [ "async-channel", "async-executor", "async-io", - "async-mutex", + "async-lock", "blocking", "futures-lite", - "num_cpus", "once_cell", ] [[package]] name = "async-io" -version = "1.6.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a811e6a479f2439f0c04038796b5cfb3d2ad56c230e0f2d3f7b04d68cfee607b" +checksum = "8c374dda1ed3e7d8f0d9ba58715f924862c63eae6849c92d3a18e7fbde9e2794" dependencies = [ + "async-lock", + "autocfg", "concurrent-queue", "futures-lite", "libc", "log", - "once_cell", "parking", "polling", "slab", "socket2", "waker-fn", - "winapi 0.3.9", + "windows-sys 0.42.0", ] [[package]] name = "async-lock" -version = "2.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6a8ea61bf9947a1007c5cada31e647dbc77b103c679858150003ba697ea798b" -dependencies = [ - "event-listener", -] - -[[package]] -name = "async-mutex" -version = "1.4.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "479db852db25d9dbf6204e6cb6253698f175c15726470f78af0d918e99d6156e" +checksum = "c8101efe8695a6c17e02911402145357e718ac92d3ff88ae8419e84b1707b685" dependencies = [ "event-listener", + "futures-lite", ] [[package]] name = "async-process" -version = "1.2.0" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b21b63ab5a0db0369deb913540af2892750e42d949faacc7a61495ac418a1692" +checksum = "6381ead98388605d0d9ff86371043b5aa922a3905824244de40dc263a14fcba4" dependencies = [ "async-io", + "async-lock", + "autocfg", "blocking", "cfg-if 1.0.0", "event-listener", "futures-lite", "libc", - "once_cell", "signal-hook", - "winapi 0.3.9", + "windows-sys 0.42.0", ] [[package]] name = "async-std" -version = "1.10.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8056f1455169ab86dd47b47391e4ab0cbd25410a70e9fe675544f49bafaf952" +checksum = "62565bb4402e926b29953c785397c6dc0391b7b446e45008b0049eb43cec6f5d" dependencies = [ "async-channel", "async-global-executor", @@ -266,9 +283,8 @@ dependencies = [ "kv-log-macro", "log", "memchr", - "num_cpus", "once_cell", - "pin-project-lite 0.2.7", + "pin-project-lite 0.2.9", "pin-utils", "slab", "wasm-bindgen-futures", @@ -276,9 +292,9 @@ dependencies = [ [[package]] name = "async-std-resolver" -version = "0.21.2" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f2f8a4a203be3325981310ab243a28e6e4ea55b6519bffce05d41ab60e09ad8" +checksum = "6ba50e24d9ee0a8950d3d03fc6d0dd10aa14b5de3b101949b4e160f7fee7c723" dependencies = [ "async-std", "async-trait", @@ -291,15 +307,15 @@ dependencies = [ [[package]] name = "async-task" -version = "4.0.3" +version = "4.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e91831deabf0d6d7ec49552e489aed63b7456a7a3c46cff62adad428110b0af0" +checksum = "7a40729d2133846d9ed0ea60a8b9541bccddab49cd30f0715a1da672fe9a2524" [[package]] name = "async-trait" -version = "0.1.51" +version = "0.1.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44318e776df68115a881de9a8fd1b9e53368d7a4a5ce4cc48517da3393233a5e" +checksum = "677d1d8ab452a3936018a687b20e6f7cf5363d713b732b8884001317b0e48aa3" dependencies = [ "proc-macro2", "quote", @@ -308,15 +324,15 @@ dependencies = [ [[package]] name = "asynchronous-codec" -version = "0.6.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0de5164e5edbf51c45fb8c2d9664ae1c095cce1b265ecf7569093c0d66ef690" +checksum = "06a0daa378f5fd10634e44b0a29b2a87b890657658e072a30d6f26e57ddee182" dependencies = [ "bytes", "futures-sink", "futures-util", "memchr", - "pin-project-lite 0.2.7", + "pin-project-lite 0.2.9", ] [[package]] @@ -331,7 +347,7 @@ version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" dependencies = [ - "hermit-abi", + "hermit-abi 0.1.19", "libc", "winapi 0.3.9", ] @@ -344,24 +360,24 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "backtrace" -version = "0.3.66" +version = "0.3.67" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cab84319d616cfb654d03394f38ab7e6f0919e181b1b57e1fd15e7fb4077d9a7" +checksum = "233d376d6d185f2a3093e58f283f60f880315b6c60075b01f36b3b85154564ca" dependencies = [ - "addr2line", + "addr2line 0.19.0", "cc", "cfg-if 1.0.0", "libc", - "miniz_oxide 0.5.3", - "object 0.29.0", + "miniz_oxide", + "object 0.30.0", "rustc-demangle", ] [[package]] name = "base-x" -version = "0.2.8" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4521f3e3d031370679b3b140beb36dfe4801b09ac77e30c61941f97df3ef28b" +checksum = "4cbbc9d0964165b47557570cce6c952866c2678457aca742aafc9fb771d30270" [[package]] name = "base16ct" @@ -377,25 +393,25 @@ checksum = "6107fe1be6682a68940da878d9e9f5e90ca5745b3dec9fd1bb393c8777d4f581" [[package]] name = "base64" -version = "0.13.0" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" + +[[package]] +name = "base64ct" +version = "1.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" +checksum = "b645a089122eccb6111b4f81cbc1a49f5900ac4666bb93ac027feaecf15607bf" [[package]] name = "beef" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bed554bd50246729a1ec158d08aa3235d1b69d94ad120ebe187e28894787e736" +checksum = "3a8241f3ebb85c056b509d4327ad0358fbbba6ffb340bf388f26350aeda225b1" dependencies = [ "serde", ] -[[package]] -name = "bimap" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50ae17cabbc8a38a1e3e4c1a6a664e9a09672dc14d0896fa8d865d3a5a446b07" - [[package]] name = "bincode" version = "1.3.3" @@ -425,11 +441,11 @@ dependencies = [ [[package]] name = "blake2" -version = "0.10.4" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9cf849ee05b2ee5fba5e36f97ff8ec2533916700fc0758d40d92136a42f3388" +checksum = "46502ad458c9a52b69d4d4d32775c788b7a1b85e8bc9d482d92250fc0e3f8efe" dependencies = [ - "digest 0.10.3", + "digest 0.10.6", ] [[package]] @@ -439,7 +455,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5d6d530bdd2d52966a6d03b7a964add7ae1a288d25214066fd4b600f0f796400" dependencies = [ "arrayvec 0.4.12", - "constant_time_eq", + "constant_time_eq 0.1.5", ] [[package]] @@ -450,7 +466,7 @@ checksum = "72936ee4afc7f8f736d1c38383b56480b5497b4617b4a77bdbf1d2ababc76127" dependencies = [ "arrayref", "arrayvec 0.7.2", - "constant_time_eq", + "constant_time_eq 0.1.5", ] [[package]] @@ -461,20 +477,20 @@ checksum = "db539cc2b5f6003621f1cd9ef92d7ded8ea5232c7de0f9faa2de251cd98730d4" dependencies = [ "arrayref", "arrayvec 0.7.2", - "constant_time_eq", + "constant_time_eq 0.1.5", ] [[package]] name = "blake3" -version = "1.3.1" +version = "1.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a08e53fc5a564bb15bfe6fae56bd71522205f1f91893f9c0116edad6496c183f" +checksum = "42ae2468a89544a466886840aa467a25b766499f4f04bf7d9fcd10ecee9fccef" dependencies = [ "arrayref", "arrayvec 0.7.2", "cc", "cfg-if 1.0.0", - "constant_time_eq", + "constant_time_eq 0.2.4", ] [[package]] @@ -483,7 +499,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", @@ -495,17 +511,16 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" dependencies = [ - "block-padding 0.2.1", - "generic-array 0.14.4", + "generic-array 0.14.6", ] [[package]] name = "block-buffer" -version = "0.10.1" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03588e54c62ae6d763e2a80090d50353b785795361b4ff5b3bf0a5097fc31c0b" +checksum = "69cce20737498f97b993470a6e536b8523f0af7892a4f928cceb1ac5e52ebe7e" dependencies = [ - "generic-array 0.14.4", + "generic-array 0.14.6", ] [[package]] @@ -517,24 +532,18 @@ dependencies = [ "byte-tools", ] -[[package]] -name = "block-padding" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" - [[package]] name = "blocking" -version = "1.0.2" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5e170dbede1f740736619b776d7251cb1b9095c435c34d8ca9f57fcd2f335e9" +checksum = "3c67b173a56acffd6d2326fb7ab938ba0b00a71480e14902b2591c87bc5741e8" dependencies = [ "async-channel", + "async-lock", "async-task", "atomic-waker", "fastrand", "futures-lite", - "once_cell", ] [[package]] @@ -545,9 +554,9 @@ checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" [[package]] name = "bstr" -version = "0.2.16" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90682c8d613ad3373e66de8c6411e0ae2ab2571e879d2efbf73558cc66f21279" +checksum = "ba3569f383e8f1598449f1a423e72e99569137b47740b1da11ef19af3d5c3223" dependencies = [ "memchr", ] @@ -563,15 +572,15 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.7.0" +version = "3.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c59e7af012c713f529e7a3ee57ce9b31ddd858d4b512923602f74608b009631" +checksum = "572f695136211188308f16ad2ca5c851a712c464060ae6974944458eb83880ba" [[package]] name = "byte-slice-cast" -version = "1.0.0" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65c1bf4a04a88c54f589125563643d773f3254b5c38571395e2b591c693bbc81" +checksum = "c3ac9f8b63eca6fd385229b3675f6cc0dc5c8a5c8a54a59d4f52ffd670d87b0c" [[package]] name = "byte-tools" @@ -581,9 +590,9 @@ checksum = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" [[package]] name = "bytecount" -version = "0.6.2" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72feb31ffc86498dacdbd0fcebb56138e7177a8cc5cea4516031d15ae85a742e" +checksum = "2c676a478f63e9fa2dd5368a42f28bba0d6c560b775f38583c8bbaa7fcd67c9c" [[package]] name = "byteorder" @@ -593,21 +602,15 @@ checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" [[package]] name = "bytes" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4872d67bab6358e59559027aa3b9157c53d9358c51423c17554809a8858e0f8" - -[[package]] -name = "cache-padded" -version = "1.1.1" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "631ae5198c9be5e753e5cc215e1bd73c2b466a3565173db433f52bb9d3e66dba" +checksum = "dfb24e866b15a1af2a1b663f10c6b6b8f397a84aadb828f12e5b289ec23a3a3c" [[package]] name = "camino" -version = "1.0.5" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52d74260d9bf6944e2208aa46841b4b8f0d7ffc0849a06837b2f510337f86b2b" +checksum = "88ad0e1e3e88dd237a156ab9f571021b8a158caa0ae44b1968a241efb5144c1e" dependencies = [ "serde", ] @@ -629,20 +632,29 @@ checksum = "4acbb09d9ee8e23699b9634375c72795d095bf268439da88562cf9b501f181fa" dependencies = [ "camino", "cargo-platform", - "semver 1.0.4", + "semver 1.0.16", "serde", "serde_json", ] [[package]] name = "cc" -version = "1.0.69" +version = "1.0.78" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e70cc2f62c6ce1868963827bd677764c62d07c3d9a3e1fb1177ee1a9ab199eb2" +checksum = "a20104e2335ce8a659d6dd92a51a767a0c062599c73b343fd152cb401e828c3d" dependencies = [ "jobserver", ] +[[package]] +name = "cfg-expr" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0aacacf4d96c24b2ad6eb8ee6df040e4f27b0d0b39a5710c30091baa830485db" +dependencies = [ + "smallvec", +] + [[package]] name = "cfg-if" version = "0.1.10" @@ -655,6 +667,12 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +[[package]] +name = "cfg_aliases" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" + [[package]] name = "chacha20" version = "0.8.2" @@ -663,7 +681,7 @@ checksum = "5c80e5460aa66fe3b91d40bcbdab953a597b60053e34d684ac6903f863b680a6" dependencies = [ "cfg-if 1.0.0", "cipher", - "cpufeatures 0.2.1", + "cpufeatures", "zeroize", ] @@ -682,14 +700,16 @@ dependencies = [ [[package]] name = "chrono" -version = "0.4.19" +version = "0.4.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "670ad68c9088c2a963aaa298cb369688cf3f9465ce5e2d4ca10e6e0098a1ce73" +checksum = "16b0a3d9ed01224b22057780a37bb8c5dbfe1be8ba48678e7bf57ec4b385411f" dependencies = [ - "libc", + "iana-time-zone", + "js-sys", "num-integer", "num-traits", "time", + "wasm-bindgen", "winapi 0.3.9", ] @@ -704,9 +724,9 @@ dependencies = [ [[package]] name = "cid" -version = "0.8.5" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc949bff6704880faf064c42a4854032ab07bfcf3a4fcb82a57470acededb69c" +checksum = "f6ed9c8b2d17acb8110c46f1da5bf4a696d745e1474a16db0cd2b49cd0249bf2" dependencies = [ "core2", "multibase", @@ -721,40 +741,68 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ee52072ec15386f770805afd189a01c8841be8696bed250fa2f13c4c0d6dfb7" dependencies = [ - "generic-array 0.14.4", + "generic-array 0.14.6", ] [[package]] name = "clap" -version = "3.1.18" +version = "3.2.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2dbdf4bdacb33466e854ce889eee8dfd5729abf7ccd7664d0a2d60cd384440b" +checksum = "71655c45cb9845d3270c9d6df84ebe72b4dad3c2ba3f7023ad47c144e4e473a5" dependencies = [ "atty", "bitflags", - "clap_derive", - "clap_lex", + "clap_derive 3.2.18", + "clap_lex 0.2.4", "indexmap", - "lazy_static", + "once_cell", + "strsim", + "termcolor", + "textwrap 0.16.0", +] + +[[package]] +name = "clap" +version = "4.0.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "656ad1e55e23d287773f7d8192c300dc715c3eeded93b3da651d11c42cfd74d2" +dependencies = [ + "bitflags", + "clap_derive 4.0.21", + "clap_lex 0.3.0", + "is-terminal", + "once_cell", "strsim", "termcolor", - "textwrap 0.15.0", ] [[package]] name = "clap_complete" -version = "3.1.4" +version = "4.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7b3c9eae0de7bf8e3f904a5e40612b21fb2e2e566456d177809a48b892d24da" +dependencies = [ + "clap 4.0.30", +] + +[[package]] +name = "clap_derive" +version = "3.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da92e6facd8d73c22745a5d3cbb59bdf8e46e3235c923e516527d8e81eec14a4" +checksum = "ea0c8bce528c4be4da13ea6fead8965e95b6073585a2f05204bd8f4119f82a65" dependencies = [ - "clap", + "heck 0.4.0", + "proc-macro-error", + "proc-macro2", + "quote", + "syn", ] [[package]] name = "clap_derive" -version = "3.1.18" +version = "4.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25320346e922cffe59c0bbc5410c8d8784509efb321488971081313cb1e1a33c" +checksum = "0177313f9f02afc995627906bbd8967e2be069f5261954222dac78290c2b9014" dependencies = [ "heck 0.4.0", "proc-macro-error", @@ -765,20 +813,30 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.2.0" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a37c35f1112dad5e6e0b1adaff798507497a18fceeb30cceb3bae7d1427b9213" +checksum = "2850f2f5a82cbf437dd5af4d49848fbdfc27c157c3d010345776f952765261c5" dependencies = [ "os_str_bytes", ] [[package]] -name = "cmake" -version = "0.1.46" +name = "clap_lex" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7b858541263efe664aead4a5209a4ae5c5d2811167d4ed4ee0944503f8d2089" +checksum = "0d4198f73e42b4936b35b5bb248d81d2b595ecb170da0bac7655c54eedfa8da8" dependencies = [ - "cc", + "os_str_bytes", +] + +[[package]] +name = "codespan-reporting" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e" +dependencies = [ + "termcolor", + "unicode-width", ] [[package]] @@ -796,9 +854,9 @@ dependencies = [ [[package]] name = "comfy-table" -version = "5.0.1" +version = "6.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b103d85ca6e209388771bfb7aa6b68a7aeec4afbf6f0a0264bfbf50360e5212e" +checksum = "e621e7e86c46fd8a14c32c6ae3cb95656621b4743a27d0cffedb831d46e7ad21" dependencies = [ "strum", "strum_macros", @@ -850,23 +908,22 @@ dependencies = [ [[package]] name = "concurrent-queue" -version = "1.2.2" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30ed07550be01594c6026cff2a1d7fe9c8f683caa798e12b68694ac9e88286a3" +checksum = "bd7bef69dc86e3c610e4e7aed41035e2a7ed12e72dd7530f61327a6579a4390b" dependencies = [ - "cache-padded", + "crossbeam-utils", ] [[package]] name = "console" -version = "0.15.0" +version = "0.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a28b32d32ca44b70c3e4acd7db1babf555fa026e385fb95f18028f88848b3c31" +checksum = "c050367d967ced717c04b65d8c619d863ef9292ce0c5760028655a2fb298718c" dependencies = [ "encode_unicode", + "lazy_static", "libc", - "once_cell", - "regex", "terminal_size", "unicode-width", "winapi 0.3.9", @@ -884,11 +941,17 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" +[[package]] +name = "constant_time_eq" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3ad85c1f65dc7b37604eb0e89748faf0b9653065f2a8ef69f96a687ec1e9279" + [[package]] name = "core-foundation" -version = "0.9.2" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6888e10551bb93e424d8df1d07f1a8b4fceb0001a3a4b048bfc47554946f47b3" +checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" dependencies = [ "core-foundation-sys", "libc", @@ -920,43 +983,36 @@ dependencies = [ [[package]] name = "cpufeatures" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66c99696f6c9dd7f35d486b9d04d7e6e202aa3e8c40d553f2fdf5e7e0c6a71ef" -dependencies = [ - "libc", -] - -[[package]] -name = "cpufeatures" -version = "0.2.1" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95059428f66df56b63431fdb4e1947ed2190586af5c5a8a8b71122bdf5a7f469" +checksum = "28d997bd5e24a5928dd43e46dc529867e207907fe0b239c3477d924f7f2ca320" dependencies = [ "libc", ] [[package]] name = "cranelift-bforest" -version = "0.85.3" +version = "0.88.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "749d0d6022c9038dccf480bdde2a38d435937335bf2bb0f14e815d94517cdce8" +checksum = "52056f6d0584484b57fa6c1a65c1fcb15f3780d8b6a758426d9e3084169b2ddd" dependencies = [ "cranelift-entity", ] [[package]] name = "cranelift-codegen" -version = "0.85.3" +version = "0.88.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e94370cc7b37bf652ccd8bb8f09bd900997f7ccf97520edfc75554bb5c4abbea" +checksum = "18fed94c8770dc25d01154c3ffa64ed0b3ba9d583736f305fed7beebe5d9cf74" dependencies = [ + "arrayvec 0.7.2", + "bumpalo", "cranelift-bforest", "cranelift-codegen-meta", "cranelift-codegen-shared", "cranelift-entity", "cranelift-isle", - "gimli", + "gimli 0.26.2", "log", "regalloc2", "smallvec", @@ -965,33 +1021,33 @@ dependencies = [ [[package]] name = "cranelift-codegen-meta" -version = "0.85.3" +version = "0.88.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0a3cea8fdab90e44018c5b9a1dfd460d8ee265ac354337150222a354628bdb6" +checksum = "1c451b81faf237d11c7e4f3165eeb6bac61112762c5cfe7b4c0fb7241474358f" dependencies = [ "cranelift-codegen-shared", ] [[package]] name = "cranelift-codegen-shared" -version = "0.85.3" +version = "0.88.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ac72f76f2698598951ab26d8c96eaa854810e693e7dd52523958b5909fde6b2" +checksum = "e7c940133198426d26128f08be2b40b0bd117b84771fd36798969c4d712d81fc" [[package]] name = "cranelift-entity" -version = "0.85.3" +version = "0.88.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09eaeacfcd2356fe0e66b295e8f9d59fdd1ac3ace53ba50de14d628ec902f72d" +checksum = "87a0f1b2fdc18776956370cf8d9b009ded3f855350c480c1c52142510961f352" dependencies = [ "serde", ] [[package]] name = "cranelift-frontend" -version = "0.85.3" +version = "0.88.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dba69c9980d5ffd62c18a2bde927855fcd7c8dc92f29feaf8636052662cbd99c" +checksum = "34897538b36b216cc8dd324e73263596d51b8cf610da6498322838b2546baf8a" dependencies = [ "cranelift-codegen", "log", @@ -1001,15 +1057,15 @@ dependencies = [ [[package]] name = "cranelift-isle" -version = "0.85.3" +version = "0.88.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2920dc1e05cac40304456ed3301fde2c09bd6a9b0210bcfa2f101398d628d5b" +checksum = "1b2629a569fae540f16a76b70afcc87ad7decb38dc28fa6c648ac73b51e78470" [[package]] name = "cranelift-native" -version = "0.85.3" +version = "0.88.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f04dfa45f9b2a6f587c564d6b63388e00cd6589d2df6ea2758cf79e1a13285e6" +checksum = "20937dab4e14d3e225c5adfc9c7106bafd4ac669bdb43027b911ff794c6fb318" dependencies = [ "cranelift-codegen", "libc", @@ -1018,9 +1074,9 @@ dependencies = [ [[package]] name = "cranelift-wasm" -version = "0.85.3" +version = "0.88.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31a46513ae6f26f3f267d8d75b5373d555fbbd1e68681f348d99df43f747ec54" +checksum = "80fc2288957a94fd342a015811479de1837850924166d1f1856d8406e6f3609b" dependencies = [ "cranelift-codegen", "cranelift-entity", @@ -1034,18 +1090,18 @@ dependencies = [ [[package]] name = "crc32fast" -version = "1.2.1" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81156fece84ab6a9f2afdb109ce3ae577e42b1228441eded99bd77f627953b1a" +checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" dependencies = [ "cfg-if 1.0.0", ] [[package]] name = "crossbeam-channel" -version = "0.5.4" +version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aaa7bd5fb665c6864b5f963dd9097905c54125909c7aa94c9e18507cdbe6c53" +checksum = "c2dd04ddaf88237dc3b8d8f9a3c1004b506b54b3313403944054d23c0870c521" dependencies = [ "cfg-if 1.0.0", "crossbeam-utils", @@ -1053,9 +1109,9 @@ dependencies = [ [[package]] name = "crossbeam-deque" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6455c0ca19f0d2fbf751b908d5c55c1f5cbc65e03c4225427254b46890bdde1e" +checksum = "715e8152b692bba2d374b53d4875445368fdf21a94751410af607a5ac677d1fc" dependencies = [ "cfg-if 1.0.0", "crossbeam-epoch", @@ -1064,26 +1120,24 @@ dependencies = [ [[package]] name = "crossbeam-epoch" -version = "0.9.8" +version = "0.9.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1145cf131a2c6ba0615079ab6a638f7e1973ac9c2634fcbeaaad6114246efe8c" +checksum = "01a9af1f4c2ef74bb8aa1f7e19706bc72d03598c8a570bb5de72243c7a9d9d5a" dependencies = [ "autocfg", "cfg-if 1.0.0", "crossbeam-utils", - "lazy_static", - "memoffset", + "memoffset 0.7.1", "scopeguard", ] [[package]] name = "crossbeam-utils" -version = "0.8.5" +version = "0.8.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d82cfc11ce7f2c3faef78d8a684447b40d503d9681acebed6cb728d45940c4db" +checksum = "4fb766fa798726286dbbb842f174001dab8abc7b627a1dd86e0b7222a95d929f" dependencies = [ "cfg-if 1.0.0", - "lazy_static", ] [[package]] @@ -1098,19 +1152,19 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "03c6a1d5fa1de37e071642dfa44ec552ca5b299adb128fab16138e24b548fd21" dependencies = [ - "generic-array 0.14.4", - "rand_core 0.6.3", + "generic-array 0.14.6", + "rand_core 0.6.4", "subtle", "zeroize", ] [[package]] name = "crypto-common" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ccfd8c0ee4cce11e45b3fd6f9d5e69e0cc62912aa6a0cb1bf4617b0eba5a12f" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" dependencies = [ - "generic-array 0.14.4", + "generic-array 0.14.6", "typenum", ] @@ -1120,7 +1174,7 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" dependencies = [ - "generic-array 0.14.4", + "generic-array 0.14.6", "subtle", ] @@ -1130,15 +1184,15 @@ version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b1d1a86f49236c215f271d40892d5fc950490551400b02ef360692c29815c714" dependencies = [ - "generic-array 0.14.4", + "generic-array 0.14.6", "subtle", ] [[package]] name = "ctor" -version = "0.1.20" +version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e98e2ad1a782e33928b96fc3948e7c355e5af34ba4de7670fe8bac2a3b2006d" +checksum = "6d2301688392eb071b0bf1a37be05c469d3cc4dbbd95df672fe28ab021e6a096" dependencies = [ "quote", "syn", @@ -1155,40 +1209,29 @@ dependencies = [ [[package]] name = "ctrlc" -version = "3.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b37feaa84e6861e00a1f5e5aa8da3ee56d605c9992d33e082786754828e20865" -dependencies = [ - "nix", - "winapi 0.3.9", -] - -[[package]] -name = "cuckoofilter" -version = "0.5.0" +version = "3.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b810a8449931679f64cd7eef1bbd0fa315801b6d5d9cdc1ace2804d6529eee18" +checksum = "1631ca6e3c59112501a9d87fd86f21591ff77acd31331e8a73f8d80a65bbdd71" dependencies = [ - "byteorder", - "fnv", - "rand 0.7.3", + "nix 0.26.1", + "windows-sys 0.42.0", ] [[package]] name = "cucumber" -version = "0.11.1" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "684af0e63387e834c0dd72f6e9dabc387c215e36b7528f8b0467ad08904344ce" +checksum = "17c2113609da80892316eeacd21e63c359536814b07146d4caa17ad7676e0db3" dependencies = [ "async-trait", "atty", - "clap", + "clap 3.2.23", "console", "cucumber-codegen", "cucumber-expressions", "derive_more", "either", - "futures 0.3.21", + "futures 0.3.25", "gherkin", "globwalk", "inventory", @@ -1196,14 +1239,14 @@ dependencies = [ "linked-hash-map", "once_cell", "regex", - "sealed", + "sealed 0.4.0", ] [[package]] name = "cucumber-codegen" -version = "0.11.1" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7ad5dc615ed629ddd9957386a9b29e93e091c628228ba376bdec529b157f53" +checksum = "57569af2742cb38e213e8cc686fffc76e0ee4119cad3a122753c27107dc26e58" dependencies = [ "cucumber-expressions", "inflections", @@ -1256,22 +1299,67 @@ dependencies = [ [[package]] name = "curve25519-dalek" -version = "4.0.0-pre.1" +version = "4.0.0-pre.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4033478fbf70d6acf2655ac70da91ee65852d69daf7a67bf7a2f518fb47aafcf" +checksum = "67bc65846be335cb20f4e52d49a437b773a2c1fdb42b19fc84e79e6f6771536f" dependencies = [ - "byteorder", - "digest 0.9.0", - "rand_core 0.6.3", + "cfg-if 1.0.0", + "fiat-crypto", + "packed_simd_2", + "platforms 3.0.2", "subtle", "zeroize", ] +[[package]] +name = "cxx" +version = "1.0.85" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5add3fc1717409d029b20c5b6903fc0c0b02fa6741d820054f4a2efa5e5816fd" +dependencies = [ + "cc", + "cxxbridge-flags", + "cxxbridge-macro", + "link-cplusplus", +] + +[[package]] +name = "cxx-build" +version = "1.0.85" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4c87959ba14bc6fbc61df77c3fcfe180fc32b93538c4f1031dd802ccb5f2ff0" +dependencies = [ + "cc", + "codespan-reporting", + "once_cell", + "proc-macro2", + "quote", + "scratch", + "syn", +] + +[[package]] +name = "cxxbridge-flags" +version = "1.0.85" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69a3e162fde4e594ed2b07d0f83c6c67b745e7f28ce58c6df5e6b6bef99dfb59" + +[[package]] +name = "cxxbridge-macro" +version = "1.0.85" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e7e2adeb6a0d4a282e581096b06e1791532b7d576dcde5ccd9382acf55db8e6" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "darling" -version = "0.14.1" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4529658bdda7fd6769b8614be250cdcfc3aeb0ee72fe66f9e41e5e5eb73eac02" +checksum = "b0dd3cd20dc6b5a876612a6e5accfe7f3dd883db6d07acfbf14c128f61550dfa" dependencies = [ "darling_core", "darling_macro", @@ -1279,9 +1367,9 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.14.1" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "649c91bc01e8b1eac09fb91e8dbc7d517684ca6be8ebc75bb9cafc894f9fdb6f" +checksum = "a784d2ccaf7c98501746bf0be29b2022ba41fd62a2e622af997a03e9f972859f" dependencies = [ "fnv", "ident_case", @@ -1293,9 +1381,9 @@ dependencies = [ [[package]] name = "darling_macro" -version = "0.14.1" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddfc69c5bfcbd2fc09a0f38451d2daf0e372e367986a83906d1b0dbc88134fb5" +checksum = "7618812407e9402654622dd402b0a89dff9ba93badd6540781526117b92aab7e" dependencies = [ "darling_core", "quote", @@ -1304,9 +1392,9 @@ dependencies = [ [[package]] name = "data-encoding" -version = "2.3.2" +version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ee2393c4a91429dffb4bedf19f4d6abf27d8a732c8ce4980305d782e5426d57" +checksum = "23d8666cb01533c39dde32bcbab8e227b4ed6679b2c925eba05feabea39508fb" [[package]] name = "data-encoding-macro" @@ -1359,6 +1447,12 @@ dependencies = [ "syn", ] +[[package]] +name = "difflib" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6184e33543162437515c2e2b48714794e37845ec9851711914eec9d308f6ebe8" + [[package]] name = "digest" version = "0.8.1" @@ -1374,16 +1468,16 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" dependencies = [ - "generic-array 0.14.4", + "generic-array 0.14.6", ] [[package]] name = "digest" -version = "0.10.3" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2fb860ca6fafa5552fb6d0e816a69c8e49f0908bf524e30a90d97c85892d506" +checksum = "8168378f4e5023e7218c89c891c0fd8ecdb5e5e4f18cb78f38cf245dd021e76f" dependencies = [ - "block-buffer 0.10.1", + "block-buffer 0.10.3", "crypto-common", "subtle", ] @@ -1409,9 +1503,9 @@ dependencies = [ [[package]] name = "dirs-sys" -version = "0.3.6" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03d86534ed367a67548dc68113a0f5db55432fdfbb6e6f9d77704397d95d5780" +checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6" dependencies = [ "libc", "redox_users", @@ -1439,6 +1533,12 @@ dependencies = [ "quick-error", ] +[[package]] +name = "downcast" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1435fa1053d8b2fbbe9be7e97eca7f33d37b28409959813daefc1446a14247f1" + [[package]] name = "downcast-rs" version = "1.2.0" @@ -1447,32 +1547,35 @@ checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" [[package]] name = "dtoa" -version = "1.0.2" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5caaa75cbd2b960ff1e5392d2cfb1f44717fffe12fc1f32b7b5d1267f99732a6" +checksum = "c00704156a7de8df8da0911424e30c2049957b0a714542a44e05fe693dd85313" [[package]] name = "duniter" version = "0.3.0" dependencies = [ "async-io", - "clap", + "clap 4.0.30", "clap_complete", "common-runtime", "frame-benchmarking", "frame-benchmarking-cli", - "futures 0.3.21", + "frame-system", + "futures 0.3.25", "g1-runtime", "gdev-runtime", "gtest-runtime", "hex", - "jsonrpsee 0.14.0", + "jsonrpsee 0.15.1", "lazy_static", "log", "maplit", - "memmap2 0.5.0", + "memmap2", "pallet-certification", "pallet-grandpa", + "pallet-oneshot-account", + "pallet-transaction-payment", "pallet-transaction-payment-rpc", "pallet-transaction-payment-rpc-runtime-api", "rusty-hook", @@ -1480,6 +1583,7 @@ dependencies = [ "sc-chain-spec", "sc-cli", "sc-client-api", + "sc-client-db", "sc-consensus", "sc-consensus-babe", "sc-consensus-manual-seal", @@ -1527,7 +1631,7 @@ version = "3.0.0" dependencies = [ "anyhow", "async-trait", - "clap", + "clap 3.2.23", "ctrlc", "cucumber", "env_logger", @@ -1587,9 +1691,9 @@ dependencies = [ [[package]] name = "dyn-clone" -version = "1.0.4" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee2626afccd7561a06cf1367e2950c4718ea04565e20fb5029b6c7d8ad09abcf" +checksum = "c9b0705efd4599c15a38151f4721f7bc388306f61084d3bfd50bd07fbca5cb60" [[package]] name = "ecdsa" @@ -1605,9 +1709,9 @@ dependencies = [ [[package]] name = "ed25519" -version = "1.2.0" +version = "1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4620d40f6d2601794401d6dd95a5cf69b6c157852539470eeda433a99b3c0efc" +checksum = "1e9c280362032ea4203659fc489832d0204ef09f247a0506f170dafcac08c369" dependencies = [ "signature", ] @@ -1627,11 +1731,25 @@ dependencies = [ ] [[package]] -name = "either" -version = "1.6.1" +name = "ed25519-zebra" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" - +checksum = "7c24f403d068ad0b359e577a77f92392118be3f3c927538f2bb544a5ecd828c6" +dependencies = [ + "curve25519-dalek 3.2.0", + "hashbrown", + "hex", + "rand_core 0.6.4", + "sha2 0.9.9", + "zeroize", +] + +[[package]] +name = "either" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90e5c1c8368803113bf0c9584fc495a58b86dc8a29edbf8fe877d21d9507e797" + [[package]] name = "elliptic-curve" version = "0.11.12" @@ -1642,9 +1760,9 @@ dependencies = [ "crypto-bigint", "der", "ff", - "generic-array 0.14.4", + "generic-array 0.14.6", "group", - "rand_core 0.6.3", + "rand_core 0.6.4", "sec1", "subtle", "zeroize", @@ -1667,9 +1785,9 @@ dependencies = [ [[package]] name = "enum-as-inner" -version = "0.4.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21cdad81446a7f7dc43f6a77409efeb9733d2fa65553efef6018ef257c959b73" +checksum = "c9720bba047d567ffc8a3cba48bf19126600e249ab7f128e9233e6376976a116" dependencies = [ "heck 0.4.0", "proc-macro2", @@ -1679,9 +1797,9 @@ dependencies = [ [[package]] name = "env_logger" -version = "0.9.0" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b2cf0344971ee6c64c31be0d530793fba457d322dfec2810c453d0ef228f9c3" +checksum = "a12e6657c4c97ebab115a42dcee77225f7f482cdd841cf7088c657a42e9e00e7" dependencies = [ "atty", "humantime", @@ -1692,9 +1810,9 @@ dependencies = [ [[package]] name = "environmental" -version = "1.1.3" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68b91989ae21441195d7d9b9993a2f9295c7e1a8c96255d8b729accddc124797" +checksum = "e48c92028aaa870e83d51c64e5d4e0b6981b360c522198c23959f219a4e1b15b" [[package]] name = "envmnt" @@ -1729,9 +1847,9 @@ dependencies = [ [[package]] name = "event-listener" -version = "2.5.1" +version = "2.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7531096570974c3a9dcf9e4b8e1cede1ec26cf5046219fb3b9d897503b9be59" +checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" [[package]] name = "exit-future" @@ -1739,7 +1857,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e43f2f1833d64e33f15592464d6fdd70f349dda7b1a53088eb83cd94014008c5" dependencies = [ - "futures 0.3.21", + "futures 0.3.25", ] [[package]] @@ -1778,9 +1896,9 @@ checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" [[package]] name = "fastrand" -version = "1.5.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b394ed3d285a429378d3b384b9eb1285267e7df4b166df24b7a6939a04dc392e" +checksum = "a7a407cfaa3385c4ae6b23e84623d48c2798d06e3e6a1878f7f59f17b3f86499" dependencies = [ "instant", ] @@ -1800,10 +1918,16 @@ version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "131655483be284720a17d74ff97592b8e76576dc25563148601df2d7c9080924" dependencies = [ - "rand_core 0.6.3", + "rand_core 0.6.4", "subtle", ] +[[package]] +name = "fiat-crypto" +version = "0.1.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a214f5bb88731d436478f3ae1f8a277b62124089ba9fb67f4f93fb100ef73c90" + [[package]] name = "file-per-thread-logger" version = "0.1.5" @@ -1816,14 +1940,14 @@ dependencies = [ [[package]] name = "filetime" -version = "0.2.17" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e94a7bbaa59354bc20dd75b67f23e2797b4490e9d6928203fb105c79e448c86c" +checksum = "4e884668cd0c7480504233e951174ddc3b382f7c2666e3b7310b5c4e7b0c37f9" dependencies = [ "cfg-if 1.0.0", "libc", "redox_syscall", - "windows-sys", + "windows-sys 0.42.0", ] [[package]] @@ -1833,44 +1957,51 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b22349c6a11563a202d95772a68e0fcf56119e74ea8a2a19cf2301460fcd0df5" dependencies = [ "either", - "futures 0.3.21", + "futures 0.3.25", "futures-timer", "log", "num-traits", "parity-scale-codec", - "parking_lot 0.12.0", + "parking_lot 0.12.1", "scale-info", ] [[package]] name = "fixed-hash" -version = "0.7.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfcf0ed7fe52a17a03854ec54a9f76d6d84508d1c0e66bc1793301c73fc8493c" +checksum = "835c052cb0c08c1acf6ffd71c022172e18723949c8282f2b9f27efbc51e64534" dependencies = [ "byteorder", - "rand 0.8.4", + "rand 0.8.5", "rustc-hex", "static_assertions", ] [[package]] name = "fixedbitset" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "279fb028e20b3c4c320317955b77c5e0c9701f05a1d309905d6fc702cdc5053e" +checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" [[package]] name = "flate2" -version = "1.0.20" +version = "1.0.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd3aec53de10fe96d7d8c565eb17f2c687bb5518a2ec453b5b1252964526abe0" +checksum = "a8a2db397cb1c8772f31494cb8917e48cd1e64f0fa7efac59fbd741a0a8ce841" dependencies = [ - "cfg-if 1.0.0", "crc32fast", - "libc", "libz-sys", - "miniz_oxide 0.4.4", + "miniz_oxide", +] + +[[package]] +name = "float-cmp" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98de4bbd547a563b716d8dfa9aad1cb19bfab00f4fa09a6a4ed21dbcf44ce9c4" +dependencies = [ + "num-traits", ] [[package]] @@ -1897,25 +2028,30 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "fork-tree" version = "3.0.0" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ "parity-scale-codec", ] [[package]] name = "form_urlencoded" -version = "1.0.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fc25a87fa4fd2094bffb06925852034d90a17f0d1e05197d4956d3555752191" +checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8" dependencies = [ - "matches", "percent-encoding", ] +[[package]] +name = "fragile" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" + [[package]] name = "frame-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ "frame-support", "frame-system", @@ -1927,6 +2063,7 @@ dependencies = [ "serde", "sp-api", "sp-application-crypto", + "sp-core", "sp-io", "sp-runtime", "sp-runtime-interface", @@ -1937,11 +2074,12 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ "Inflector", + "array-bytes", "chrono", - "clap", + "clap 4.0.30", "comfy-table", "frame-benchmarking", "frame-support", @@ -1949,7 +2087,6 @@ dependencies = [ "gethostname", "handlebars", "hash-db", - "hex", "itertools", "kvdb", "lazy_static", @@ -1957,7 +2094,7 @@ dependencies = [ "log", "memory-db", "parity-scale-codec", - "rand 0.8.4", + "rand 0.8.5", "rand_pcg 0.3.1", "sc-block-builder", "sc-cli", @@ -1988,10 +2125,11 @@ dependencies = [ [[package]] name = "frame-executive" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ "frame-support", "frame-system", + "frame-try-runtime", "parity-scale-codec", "scale-info", "sp-core", @@ -2016,7 +2154,7 @@ dependencies = [ [[package]] name = "frame-support" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ "bitflags", "frame-metadata", @@ -2030,6 +2168,7 @@ dependencies = [ "scale-info", "serde", "smallvec", + "sp-api", "sp-arithmetic", "sp-core", "sp-core-hashing-proc-macro", @@ -2040,16 +2179,19 @@ dependencies = [ "sp-state-machine", "sp-std", "sp-tracing", + "sp-weights", "tt-call", ] [[package]] name = "frame-support-procedural" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ "Inflector", + "cfg-expr", "frame-support-procedural-tools", + "itertools", "proc-macro2", "quote", "syn", @@ -2058,7 +2200,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate", @@ -2070,7 +2212,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ "proc-macro2", "quote", @@ -2080,7 +2222,7 @@ dependencies = [ [[package]] name = "frame-system" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ "frame-support", "log", @@ -2092,12 +2234,13 @@ dependencies = [ "sp-runtime", "sp-std", "sp-version", + "sp-weights", ] [[package]] name = "frame-system-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ "frame-benchmarking", "frame-support", @@ -2112,7 +2255,7 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ "parity-scale-codec", "sp-api", @@ -2121,9 +2264,10 @@ dependencies = [ [[package]] name = "frame-try-runtime" version = "0.10.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ "frame-support", + "parity-scale-codec", "sp-api", "sp-runtime", "sp-std", @@ -2198,9 +2342,9 @@ checksum = "3a471a38ef8ed83cd6e40aa59c1ffe17db6855c18e3604d9c4ed8c08ebc28678" [[package]] name = "futures" -version = "0.3.21" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f73fe65f54d1e12b726f517d3e2135ca3125a437b6d998caf1962961f7172d9e" +checksum = "38390104763dc37a5145a53c29c63c1290b5d316d6086ec32c293f6736051bb0" dependencies = [ "futures-channel", "futures-core", @@ -2213,9 +2357,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.21" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3083ce4b914124575708913bca19bfe887522d6e2e6d0952943f5eac4a74010" +checksum = "52ba265a92256105f45b719605a571ffe2d1f0fea3807304b522c1d778f79eed" dependencies = [ "futures-core", "futures-sink", @@ -2223,15 +2367,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.21" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c09fd04b7e4073ac7156a9539b57a484a8ea920f79c7c675d05d289ab6110d3" +checksum = "04909a7a7e4633ae6c4a9ab280aeb86da1236243a77b694a49eacd659a4bd3ac" [[package]] name = "futures-executor" -version = "0.3.21" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9420b90cfa29e327d0429f19be13e7ddb68fa1cccb09d65e5706b8c7a749b8a6" +checksum = "7acc85df6714c176ab5edf386123fafe217be88c0840ec11f199441134a074e2" dependencies = [ "futures-core", "futures-task", @@ -2241,9 +2385,9 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.21" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc4045962a5a5e935ee2fdedaa4e08284547402885ab326734432bed5d12966b" +checksum = "00f5fb52a06bdcadeb54e8d3671f8888a39697dcb0b81b23b55174030427f4eb" [[package]] name = "futures-lite" @@ -2256,15 +2400,15 @@ dependencies = [ "futures-io", "memchr", "parking", - "pin-project-lite 0.2.7", + "pin-project-lite 0.2.9", "waker-fn", ] [[package]] name = "futures-macro" -version = "0.3.21" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33c1e13800337f4d4d7a316bf45a567dbcb6ffe087f16424852d97e97a91f512" +checksum = "bdfb8ce053d86b91919aad980c220b1fb8401a9394410e1c289ed7e66b61835d" dependencies = [ "proc-macro2", "quote", @@ -2273,9 +2417,9 @@ dependencies = [ [[package]] name = "futures-rustls" -version = "0.22.1" +version = "0.22.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e01fe9932a224b72b45336d96040aa86386d674a31d0af27d800ea7bc8ca97fe" +checksum = "d2411eed028cdf8c8034eaf21f9915f956b6c3abec4d4c7949ee67f0721127bd" dependencies = [ "futures-io", "rustls", @@ -2284,15 +2428,15 @@ dependencies = [ [[package]] name = "futures-sink" -version = "0.3.21" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21163e139fa306126e6eedaf49ecdb4588f939600f0b1e770f4205ee4b7fa868" +checksum = "39c15cf1a4aa79df40f1bb462fb39676d0ad9e366c2a33b590d7c66f4f81fcf9" [[package]] name = "futures-task" -version = "0.3.21" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57c66a976bf5909d801bbef33416c41372779507e7a6b3a5e25e4749c58f776a" +checksum = "2ffb393ac5d9a6eaa9d3fdf37ae2776656b706e200c8e16b1bdb227f5198e6ea" [[package]] name = "futures-timer" @@ -2302,9 +2446,9 @@ checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c" [[package]] name = "futures-util" -version = "0.3.21" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8b7abd5d659d9b90c8cba917f6ec750a74e2dc23902ef9cd4cc8c8b22e6036a" +checksum = "197676987abd2f9cadff84926f410af1c183608d36641465df73ae8211dc65d6" dependencies = [ "futures 0.1.31", "futures-channel", @@ -2314,7 +2458,7 @@ dependencies = [ "futures-sink", "futures-task", "memchr", - "pin-project-lite 0.2.7", + "pin-project-lite 0.2.9", "pin-utils", "slab", ] @@ -2478,9 +2622,9 @@ dependencies = [ [[package]] name = "generic-array" -version = "0.14.4" +version = "0.14.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "501466ecc8a30d1d3b7fc9229b122b2ce8ed6e9d9223f1138d4babb253e51817" +checksum = "bff49e947297f3312447abdca79f45f4738097cc82b06e72054d2223f601f1b9" dependencies = [ "typenum", "version_check", @@ -2520,13 +2664,15 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.3" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fcd999463524c52659517fe2cea98493cfe485d10565e7b0fb07dbba7ad2753" +checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31" dependencies = [ "cfg-if 1.0.0", + "js-sys", "libc", - "wasi 0.10.0+wasi-snapshot-preview1", + "wasi 0.11.0+wasi-snapshot-preview1", + "wasm-bindgen", ] [[package]] @@ -2541,9 +2687,9 @@ dependencies = [ [[package]] name = "gherkin" -version = "0.11.1" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "908e95f865f52ecddf0b4364f3f93b18e5ba6ff7e6f74710b4b7da73987ef192" +checksum = "f7916b3cc60fa87903b2d62fbe7fd9c346fb9f8d4cb8d1717c482b37605016ad" dependencies = [ "heck 0.3.3", "peg", @@ -2558,9 +2704,9 @@ dependencies = [ [[package]] name = "ghost" -version = "0.1.2" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a5bcf1bbeab73aa4cf2fde60a846858dc036163c7c33bec309f8d17de785479" +checksum = "41973d4c45f7a35af8753ba3457cc99d406d863941fd7f52663cff54a5ab99b3" dependencies = [ "proc-macro2", "quote", @@ -2569,20 +2715,26 @@ dependencies = [ [[package]] name = "gimli" -version = "0.26.1" +version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78cc372d058dcf6d5ecd98510e7fbc9e5aec4d21de70f65fea8fecebcd881bd4" +checksum = "22030e2c5a68ec659fde1e949a745124b48e6fa8b045b7ed5bd1fe4ccc5c4e5d" dependencies = [ "fallible-iterator", "indexmap", "stable_deref_trait", ] +[[package]] +name = "gimli" +version = "0.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dec7af912d60cdbd3677c1af9352ebae6fb8394d165568a2234df0fa00f87793" + [[package]] name = "globset" -version = "0.4.8" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10463d9ff00a2a068db14231982f5132edebad0d7660cd956a1c30292dbcbfbd" +checksum = "0a1e17342619edbc21a964c2afbeb6c820c6a2560032872f397bb97ea127bd0a" dependencies = [ "aho-corasick", "bstr", @@ -2604,15 +2756,14 @@ dependencies = [ [[package]] name = "gloo-timers" -version = "0.2.1" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47204a46aaff920a1ea58b11d03dec6f704287d27561724a4631e450654a891f" +checksum = "98c4a8d6391675c6b2ee1a6c8d06e8e2d03605c44cec1270675985a4c2a5500b" dependencies = [ "futures-channel", "futures-core", "js-sys", "wasm-bindgen", - "web-sys", ] [[package]] @@ -2680,7 +2831,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bc5ac374b108929de78460075f3dc439fa66df9d8fc77e8f12caa5165fcf0c89" dependencies = [ "ff", - "rand_core 0.6.3", + "rand_core 0.6.4", "subtle", ] @@ -2755,9 +2906,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.10" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c9de88456263e249e241fcd211d3954e2c9b0ef7ccfc235a444eb367cae3689" +checksum = "5f9f29bc9dda355256b2916cf526ab02ce0aeaaaf2bad60d65ef3f12f11dd0f4" dependencies = [ "bytes", "fnv", @@ -2768,15 +2919,15 @@ dependencies = [ "indexmap", "slab", "tokio", - "tokio-util 0.6.9", + "tokio-util", "tracing", ] [[package]] name = "handlebars" -version = "4.3.2" +version = "4.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36641a8b9deb60e23fb9bb47ac631d664a780b088909b89179a4eab5618b076b" +checksum = "035ef95d03713f2c347a72547b7cd38cbc9af7cd51e6099fb62d586d4a6dee3a" dependencies = [ "log", "pest", @@ -2803,18 +2954,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" -dependencies = [ - "ahash", -] - -[[package]] -name = "hashbrown" -version = "0.12.2" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "607c8a29735385251a339424dd462993c0fed8fa09d378f259377df08c126022" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" dependencies = [ "ahash", ] @@ -2843,6 +2985,15 @@ dependencies = [ "libc", ] +[[package]] +name = "hermit-abi" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7" +dependencies = [ + "libc", +] + [[package]] name = "hex" version = "0.4.3" @@ -2851,15 +3002,9 @@ checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "hex-literal" -version = "0.3.3" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21e4590e13640f19f249fe3e4eca5113bc4289f2497710378190e7f4bd96f45b" - -[[package]] -name = "hex_fmt" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b07f60793ff0a4d9cef0f18e63b5357e06209987153a64648c972c1e5aff336f" +checksum = "7ebdb29d2ea9ed0083cd8cece49bbd968021bd99b0849edb4a9a7ee0fdf6a4e0" [[package]] name = "hmac" @@ -2888,7 +3033,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "17ea0a1394df5b6574da6e0c1ade9e78868c9fb0a4e5ef4428e32da4676b85b1" dependencies = [ "digest 0.9.0", - "generic-array 0.14.4", + "generic-array 0.14.6", "hmac 0.8.1", ] @@ -2905,31 +3050,31 @@ dependencies = [ [[package]] name = "http" -version = "0.2.4" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "527e8c9ac747e28542699a951517aa9a6945af506cd1f2e1b53a576c17b6cc11" +checksum = "75f43d41e26995c17e71ee126451dd3941010b0514a81a9d11f3b341debc2399" dependencies = [ "bytes", "fnv", - "itoa 0.4.7", + "itoa", ] [[package]] name = "http-body" -version = "0.4.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ff4f84919677303da5f147645dbea6b1881f368d03ac84e1dc09031ebd7b2c6" +checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" dependencies = [ "bytes", "http", - "pin-project-lite 0.2.7", + "pin-project-lite 0.2.9", ] [[package]] name = "httparse" -version = "1.7.1" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "496ce29bb5a52785b44e0f7ca2847ae0bb839c9bd28f69acac9b99d461c0c04c" +checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" [[package]] name = "httpdate" @@ -2945,9 +3090,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "0.14.19" +version = "0.14.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42dc3c131584288d375f2d07f822b0cb012d8c6fb899a5b9fdb3cb7eb9b6004f" +checksum = "034711faac9d2166cb1baf1a2fb0b60b1f277f8492fd72176c17f3515e1abd3c" dependencies = [ "bytes", "futures-channel", @@ -2958,8 +3103,8 @@ dependencies = [ "http-body", "httparse", "httpdate", - "itoa 1.0.1", - "pin-project-lite 0.2.7", + "itoa", + "pin-project-lite 0.2.9", "socket2", "tokio", "tower-service", @@ -2969,9 +3114,9 @@ dependencies = [ [[package]] name = "hyper-rustls" -version = "0.23.0" +version = "0.23.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d87c48c02e0dc5e3b849a2041db3029fd066650f8f717c07bf8ed78ccb895cac" +checksum = "1788965e61b367cd03a62950836d5cd41560c3577d90e40e0819373194d1661c" dependencies = [ "http", "hyper", @@ -2980,6 +3125,7 @@ dependencies = [ "rustls-native-certs", "tokio", "tokio-rustls", + "webpki-roots", ] [[package]] @@ -2995,6 +3141,30 @@ dependencies = [ "tokio-native-tls", ] +[[package]] +name = "iana-time-zone" +version = "0.1.53" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64c122667b287044802d6ce17ee2ddf13207ed924c712de9a66a5814d5b64765" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "wasm-bindgen", + "winapi 0.3.9", +] + +[[package]] +name = "iana-time-zone-haiku" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0703ae284fc167426161c2e3f1da3ea71d94b21bedbcc9494e92b28e334e3dca" +dependencies = [ + "cxx", + "cxx-build", +] + [[package]] name = "ident_case" version = "1.0.1" @@ -3012,6 +3182,16 @@ dependencies = [ "unicode-normalization", ] +[[package]] +name = "idna" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" +dependencies = [ + "unicode-bidi", + "unicode-normalization", +] + [[package]] name = "if-addrs" version = "0.7.0" @@ -3024,14 +3204,14 @@ dependencies = [ [[package]] name = "if-watch" -version = "1.1.1" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "015a7df1eb6dda30df37f34b63ada9b7b352984b0e84de2a20ed526345000791" +checksum = "065c008e570a43c00de6aed9714035e5ea6a498c255323db9091722af6ee67dd" dependencies = [ "async-io", "core-foundation", "fnv", - "futures 0.3.21", + "futures 0.3.25", "if-addrs", "ipnet", "log", @@ -3069,9 +3249,9 @@ dependencies = [ [[package]] name = "impl-serde" -version = "0.3.1" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b47ca4d2b6931707a55fce5cf66aff80e2178c8b63bbb4ecb5695cbc870ddf6f" +checksum = "ebc88fc67028ae3db0c853baa36269d398d5f45b6982f95549ff5def78c935cd" dependencies = [ "serde", ] @@ -3089,12 +3269,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "1.9.1" +version = "1.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10a35a97730320ffe8e2d410b5d3b69279b98d2c14bdb8b70ea89ecf7888d41e" +checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399" dependencies = [ "autocfg", - "hashbrown 0.12.2", + "hashbrown", "serde", ] @@ -3144,9 +3324,9 @@ dependencies = [ [[package]] name = "inventory" -version = "0.2.1" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa2f6fdbc5fd6457ae78e0313ba2eb5cb509655bbcfe8c577096cdbae8ff621c" +checksum = "84344c6e0b90a9e2b6f3f9abe5cc74402684e348df7b32adca28747e0cef091a" dependencies = [ "ctor", "ghost", @@ -3154,15 +3334,19 @@ dependencies = [ [[package]] name = "io-lifetimes" -version = "0.5.3" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec58677acfea8a15352d42fc87d11d63596ade9239e0a7c9352914417515dbe6" +checksum = "59ce5ef949d49ee85593fc4d3f3f95ad61657076395cbbce23e2121fc5542074" [[package]] name = "io-lifetimes" -version = "0.7.3" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ea37f355c05dde75b84bba2d767906ad522e97cd9e2eef2be7a4ab7fb442c06" +checksum = "46112a93252b123d31a119a8d1a1ac19deac4fac6e0e8b0df58f0d4e5870e63c" +dependencies = [ + "libc", + "windows-sys 0.42.0", +] [[package]] name = "iovec" @@ -3181,71 +3365,77 @@ checksum = "aa2f047c0a98b2f299aa5d6d7088443570faae494e9ae1305e48be000c9e0eb1" [[package]] name = "ipconfig" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "723519edce41262b05d4143ceb95050e4c614f483e78e9fd9e39a8275a84ad98" +checksum = "bd302af1b90f2463a98fa5ad469fc212c8e3175a41c3068601bfa2727591c5be" dependencies = [ "socket2", "widestring", "winapi 0.3.9", - "winreg 0.7.0", + "winreg", ] [[package]] name = "ipnet" -version = "2.3.1" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68f2d64f2edebec4ce84ad108148e67e1064789bee435edc5b60ad398714a3a9" +checksum = "11b0d96e660696543b251e58030cf9787df56da39dab19ad60eae7353040917e" [[package]] -name = "itertools" -version = "0.10.3" +name = "is-terminal" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9a9d19fa1e79b6215ff29b9d6880b706147f16e9b1dbb1e4e5947b5b02bc5e3" +checksum = "28dfb6c8100ccc63462345b67d1bbc3679177c75ee4bf59bf29c8b1d110b8189" dependencies = [ - "either", + "hermit-abi 0.2.6", + "io-lifetimes 1.0.3", + "rustix 0.36.5", + "windows-sys 0.42.0", ] [[package]] -name = "itoa" -version = "0.4.7" +name = "itertools" +version = "0.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd25036021b0de88a0aff6b850051563c6516d0bf53f8638938edbb9de732736" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +dependencies = [ + "either", +] [[package]] name = "itoa" -version = "1.0.1" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1aab8fc367588b89dcee83ab0fd66b72b50b72fa1904d7095045ace2b0c81c35" +checksum = "fad582f4b9e86b6caa621cabeb0963332d92eea04729ab12892c2533951e6440" [[package]] name = "jobserver" -version = "0.1.24" +version = "0.1.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af25a77299a7f711a01975c35a6a424eb6862092cc2d6c72c4ed6cbc56dfc1fa" +checksum = "068b1ee6743e4d11fb9c6a1e6064b3693a1b600e7f5f5988047d98b3dc9fb90b" dependencies = [ "libc", ] [[package]] name = "js-sys" -version = "0.3.53" +version = "0.3.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4bf49d50e2961077d9c99f4b7997d770a1114f087c3c2e0069b36c13fc2979d" +checksum = "49409df3e3bf0856b916e2ceaca09ee28e6871cf7d9ce97a692cacfdb2a25a47" dependencies = [ "wasm-bindgen", ] [[package]] name = "jsonrpsee" -version = "0.14.0" +version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11e017217fcd18da0a25296d3693153dd19c8a6aadab330b3595285d075385d1" +checksum = "8bd0d559d5e679b1ab2f869b486a11182923863b1b3ee8b421763cdd707b783a" dependencies = [ - "jsonrpsee-core 0.14.0", + "jsonrpsee-core 0.15.1", "jsonrpsee-http-server", "jsonrpsee-proc-macros", - "jsonrpsee-types 0.14.0", + "jsonrpsee-types 0.15.1", "jsonrpsee-ws-client", "jsonrpsee-ws-server", "tracing", @@ -3253,61 +3443,63 @@ dependencies = [ [[package]] name = "jsonrpsee" -version = "0.15.1" +version = "0.16.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bd0d559d5e679b1ab2f869b486a11182923863b1b3ee8b421763cdd707b783a" +checksum = "7d291e3a5818a2384645fd9756362e6d89cf0541b0b916fa7702ea4a9833608e" dependencies = [ - "jsonrpsee-client-transport 0.15.1", - "jsonrpsee-core 0.15.1", + "jsonrpsee-client-transport 0.16.2", + "jsonrpsee-core 0.16.2", + "jsonrpsee-http-client", + "jsonrpsee-types 0.16.2", ] [[package]] name = "jsonrpsee-client-transport" -version = "0.14.0" +version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce395539a14d3ad4ec1256fde105abd36a2da25d578a291cabe98f45adfdb111" +checksum = "8752740ecd374bcbf8b69f3e80b0327942df76f793f8d4e60d3355650c31fb74" dependencies = [ "futures-util", "http", - "jsonrpsee-core 0.14.0", - "jsonrpsee-types 0.14.0", + "jsonrpsee-core 0.15.1", + "jsonrpsee-types 0.15.1", "pin-project", "rustls-native-certs", "soketto", "thiserror", "tokio", "tokio-rustls", - "tokio-util 0.7.3", + "tokio-util", "tracing", "webpki-roots", ] [[package]] name = "jsonrpsee-client-transport" -version = "0.15.1" +version = "0.16.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8752740ecd374bcbf8b69f3e80b0327942df76f793f8d4e60d3355650c31fb74" +checksum = "965de52763f2004bc91ac5bcec504192440f0b568a5d621c59d9dbd6f886c3fb" dependencies = [ "futures-util", "http", - "jsonrpsee-core 0.15.1", - "jsonrpsee-types 0.15.1", + "jsonrpsee-core 0.16.2", + "jsonrpsee-types 0.16.2", "pin-project", "rustls-native-certs", "soketto", "thiserror", "tokio", "tokio-rustls", - "tokio-util 0.7.3", + "tokio-util", "tracing", "webpki-roots", ] [[package]] name = "jsonrpsee-core" -version = "0.14.0" +version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16efcd4477de857d4a2195a45769b2fe9ebb54f3ef5a4221d3b014a4fe33ec0b" +checksum = "f3dc3e9cf2ba50b7b1d7d76a667619f82846caa39e8e8daa8a4962d74acaddca" dependencies = [ "anyhow", "arrayvec 0.7.2", @@ -3318,11 +3510,12 @@ dependencies = [ "futures-timer", "futures-util", "globset", + "http", "hyper", - "jsonrpsee-types 0.14.0", + "jsonrpsee-types 0.15.1", "lazy_static", - "parking_lot 0.12.0", - "rand 0.8.4", + "parking_lot 0.12.1", + "rand 0.8.5", "rustc-hash", "serde", "serde_json", @@ -3330,14 +3523,15 @@ dependencies = [ "thiserror", "tokio", "tracing", + "tracing-futures", "unicase", ] [[package]] name = "jsonrpsee-core" -version = "0.15.1" +version = "0.16.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3dc3e9cf2ba50b7b1d7d76a667619f82846caa39e8e8daa8a4962d74acaddca" +checksum = "a4e70b4439a751a5de7dd5ed55eacff78ebf4ffe0fc009cb1ebb11417f5b536b" dependencies = [ "anyhow", "async-lock", @@ -3346,38 +3540,58 @@ dependencies = [ "futures-channel", "futures-timer", "futures-util", - "jsonrpsee-types 0.15.1", + "hyper", + "jsonrpsee-types 0.16.2", + "rustc-hash", + "serde", + "serde_json", + "thiserror", + "tokio", + "tracing", +] + +[[package]] +name = "jsonrpsee-http-client" +version = "0.16.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc345b0a43c6bc49b947ebeb936e886a419ee3d894421790c969cc56040542ad" +dependencies = [ + "async-trait", + "hyper", + "hyper-rustls", + "jsonrpsee-core 0.16.2", + "jsonrpsee-types 0.16.2", "rustc-hash", "serde", "serde_json", "thiserror", "tokio", "tracing", - "tracing-futures", ] [[package]] name = "jsonrpsee-http-server" -version = "0.14.0" +version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdd69efeb3ce2cba767f126872f4eeb4624038a29098e75d77608b2b4345ad03" +checksum = "03802f0373a38c2420c70b5144742d800b509e2937edc4afb116434f07120117" dependencies = [ "futures-channel", "futures-util", "hyper", - "jsonrpsee-core 0.14.0", - "jsonrpsee-types 0.14.0", + "jsonrpsee-core 0.15.1", + "jsonrpsee-types 0.15.1", "serde", "serde_json", "tokio", "tracing", + "tracing-futures", ] [[package]] name = "jsonrpsee-proc-macros" -version = "0.14.0" +version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "874cf3f6a027cebf36cae767feca9aa2e8a8f799880e49eb5540819fcbd8eada" +checksum = "bd67957d4280217247588ac86614ead007b301ca2fa9f19c19f880a536f029e3" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -3387,9 +3601,9 @@ dependencies = [ [[package]] name = "jsonrpsee-types" -version = "0.14.0" +version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3bcf76cd316f5d3ad48138085af1f45e2c58c98e02f0779783dbb034d43f7c86" +checksum = "e290bba767401b646812f608c099b922d8142603c9e73a50fb192d3ac86f4a0d" dependencies = [ "anyhow", "beef", @@ -3401,9 +3615,9 @@ dependencies = [ [[package]] name = "jsonrpsee-types" -version = "0.15.1" +version = "0.16.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e290bba767401b646812f608c099b922d8142603c9e73a50fb192d3ac86f4a0d" +checksum = "5bd522fe1ce3702fd94812965d7bb7a3364b1c9aba743944c5a00529aae80f8c" dependencies = [ "anyhow", "beef", @@ -3415,31 +3629,34 @@ dependencies = [ [[package]] name = "jsonrpsee-ws-client" -version = "0.14.0" +version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee043cb5dd0d51d3eb93432e998d5bae797691a7b10ec4a325e036bcdb48c48a" +checksum = "6ee5feddd5188e62ac08fcf0e56478138e581509d4730f3f7be9b57dd402a4ff" dependencies = [ - "jsonrpsee-client-transport 0.14.0", - "jsonrpsee-core 0.14.0", - "jsonrpsee-types 0.14.0", + "http", + "jsonrpsee-client-transport 0.15.1", + "jsonrpsee-core 0.15.1", + "jsonrpsee-types 0.15.1", ] [[package]] name = "jsonrpsee-ws-server" -version = "0.14.0" +version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bd2e4d266774a671f8def3794255b28eddd09b18d76e0b913fa439f34588c0a" +checksum = "d488ba74fb369e5ab68926feb75a483458b88e768d44319f37e4ecad283c7325" dependencies = [ "futures-channel", "futures-util", - "jsonrpsee-core 0.14.0", - "jsonrpsee-types 0.14.0", + "http", + "jsonrpsee-core 0.15.1", + "jsonrpsee-types 0.15.1", "serde_json", "soketto", "tokio", "tokio-stream", - "tokio-util 0.7.3", + "tokio-util", "tracing", + "tracing-futures", ] [[package]] @@ -3456,9 +3673,12 @@ dependencies = [ [[package]] name = "keccak" -version = "0.1.0" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67c21572b4949434e4fc1e1978b99c5f77064153c59d998bf13ecd96fb5ecba7" +checksum = "3afef3b6eff9ce9d8ff9b3601125eec7f0c8cbac7abd14f355d053fa56c98768" +dependencies = [ + "cpufeatures", +] [[package]] name = "kernel32-sys" @@ -3481,9 +3701,9 @@ dependencies = [ [[package]] name = "kvdb" -version = "0.11.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a301d8ecb7989d4a6e2c57a49baca77d353bdbf879909debe3f375fe25d61f86" +checksum = "585089ceadba0197ffe9af6740ab350b325e3c1f5fccfbc3522e0250c750409b" dependencies = [ "parity-util-mem", "smallvec", @@ -3491,13 +3711,13 @@ dependencies = [ [[package]] name = "kvdb-memorydb" -version = "0.11.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ece7e668abd21387aeb6628130a6f4c802787f014fa46bc83221448322250357" +checksum = "40d109c87bfb7759edd2a49b2649c1afe25af785d930ad6a38479b4dc70dd873" dependencies = [ "kvdb", "parity-util-mem", - "parking_lot 0.12.0", + "parking_lot 0.12.1", ] [[package]] @@ -3514,34 +3734,36 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.126" +version = "0.2.138" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "349d5a591cd28b49e1d1037471617a32ddcda5731b99419008085f72d5a53836" +checksum = "db6d7e329c562c5dfab7a46a2afabc8b987ab9a4834c9d1ca04dc54c1546cef8" [[package]] name = "libm" -version = "0.2.1" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fc7aa29613bd6a620df431842069224d8bc9011086b1db4c0e0cd47fa03ec9a" + +[[package]] +name = "libm" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7d73b3f436185384286bd8098d17ec07c9a7d2388a6599f824d8502b529702a" +checksum = "348108ab3fba42ec82ff6e9564fc4ca0247bdccdc68dd8af9764bbc79c3c8ffb" [[package]] name = "libp2p" -version = "0.46.1" +version = "0.49.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81327106887e42d004fbdab1fef93675be2e2e07c1b95fce45e2cc813485611d" +checksum = "ec878fda12ebec479186b3914ebc48ff180fa4c51847e11a1a68bf65249e02c1" dependencies = [ "bytes", - "futures 0.3.21", + "futures 0.3.25", "futures-timer", - "getrandom 0.2.3", + "getrandom 0.2.8", "instant", "lazy_static", - "libp2p-autonat", "libp2p-core", - "libp2p-deflate", "libp2p-dns", - "libp2p-floodsub", - "libp2p-gossipsub", "libp2p-identify", "libp2p-kad", "libp2p-mdns", @@ -3549,72 +3771,45 @@ dependencies = [ "libp2p-mplex", "libp2p-noise", "libp2p-ping", - "libp2p-plaintext", - "libp2p-pnet", - "libp2p-relay", - "libp2p-rendezvous", "libp2p-request-response", "libp2p-swarm", "libp2p-swarm-derive", "libp2p-tcp", - "libp2p-uds", "libp2p-wasm-ext", "libp2p-websocket", "libp2p-yamux", "multiaddr", - "parking_lot 0.12.0", + "parking_lot 0.12.1", "pin-project", - "rand 0.7.3", "smallvec", ] -[[package]] -name = "libp2p-autonat" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4decc51f3573653a9f4ecacb31b1b922dd20c25a6322bb15318ec04287ec46f9" -dependencies = [ - "async-trait", - "futures 0.3.21", - "futures-timer", - "instant", - "libp2p-core", - "libp2p-request-response", - "libp2p-swarm", - "log", - "prost", - "prost-build", - "rand 0.8.4", -] - [[package]] name = "libp2p-core" -version = "0.34.0" +version = "0.37.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbf9b94cefab7599b2d3dff2f93bee218c6621d68590b23ede4485813cbcece6" +checksum = "799676bb0807c788065e57551c6527d461ad572162b0519d1958946ff9e0539d" dependencies = [ "asn1_der", "bs58", "ed25519-dalek", "either", "fnv", - "futures 0.3.21", + "futures 0.3.25", "futures-timer", "instant", "lazy_static", - "libsecp256k1", "log", "multiaddr", "multihash", "multistream-select", - "parking_lot 0.12.0", + "parking_lot 0.12.1", "pin-project", "prost", "prost-build", - "rand 0.8.4", - "ring", + "rand 0.8.5", "rw-stream-sink", - "sha2 0.10.2", + "sha2 0.10.6", "smallvec", "thiserror", "unsigned-varint", @@ -3622,91 +3817,34 @@ dependencies = [ "zeroize", ] -[[package]] -name = "libp2p-deflate" -version = "0.34.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0183dc2a3da1fbbf85e5b6cf51217f55b14f5daea0c455a9536eef646bfec71" -dependencies = [ - "flate2", - "futures 0.3.21", - "libp2p-core", -] - [[package]] name = "libp2p-dns" -version = "0.34.0" +version = "0.37.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6cbf54723250fa5d521383be789bf60efdabe6bacfb443f87da261019a49b4b5" +checksum = "2322c9fb40d99101def6a01612ee30500c89abbbecb6297b3cd252903a4c1720" dependencies = [ "async-std-resolver", - "futures 0.3.21", + "futures 0.3.25", "libp2p-core", "log", - "parking_lot 0.12.0", + "parking_lot 0.12.1", "smallvec", "trust-dns-resolver", ] -[[package]] -name = "libp2p-floodsub" -version = "0.37.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98a4b6ffd53e355775d24b76f583fdda54b3284806f678499b57913adb94f231" -dependencies = [ - "cuckoofilter", - "fnv", - "futures 0.3.21", - "libp2p-core", - "libp2p-swarm", - "log", - "prost", - "prost-build", - "rand 0.7.3", - "smallvec", -] - -[[package]] -name = "libp2p-gossipsub" -version = "0.39.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74b4b888cfbeb1f5551acd3aa1366e01bf88ede26cc3c4645d0d2d004d5ca7b0" -dependencies = [ - "asynchronous-codec", - "base64", - "byteorder", - "bytes", - "fnv", - "futures 0.3.21", - "hex_fmt", - "instant", - "libp2p-core", - "libp2p-swarm", - "log", - "prometheus-client", - "prost", - "prost-build", - "rand 0.7.3", - "regex", - "sha2 0.10.2", - "smallvec", - "unsigned-varint", - "wasm-timer", -] - [[package]] name = "libp2p-identify" -version = "0.37.0" +version = "0.40.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c50b585518f8efd06f93ac2f976bd672e17cdac794644b3117edd078e96bda06" +checksum = "dcf9a121f699e8719bda2e6e9e9b6ddafc6cff4602471d6481c1067930ccb29b" dependencies = [ "asynchronous-codec", - "futures 0.3.21", + "futures 0.3.25", "futures-timer", "libp2p-core", "libp2p-swarm", "log", - "lru", + "lru 0.8.1", "prost", "prost-build", "prost-codec", @@ -3717,16 +3855,16 @@ dependencies = [ [[package]] name = "libp2p-kad" -version = "0.38.0" +version = "0.41.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "740862893bb5f06ac24acc9d49bdeadc3a5e52e51818a30a25c1f3519da2c851" +checksum = "6721c200e2021f6c3fab8b6cf0272ead8912d871610ee194ebd628cecf428f22" dependencies = [ "arrayvec 0.7.2", "asynchronous-codec", "bytes", "either", "fnv", - "futures 0.3.21", + "futures 0.3.25", "futures-timer", "instant", "libp2p-core", @@ -3734,8 +3872,8 @@ dependencies = [ "log", "prost", "prost-build", - "rand 0.7.3", - "sha2 0.10.2", + "rand 0.8.5", + "sha2 0.10.6", "smallvec", "thiserror", "uint", @@ -3745,20 +3883,19 @@ dependencies = [ [[package]] name = "libp2p-mdns" -version = "0.38.0" +version = "0.41.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66e5e5919509603281033fd16306c61df7a4428ce274b67af5e14b07de5cdcb2" +checksum = "761704e727f7d68d58d7bc2231eafae5fc1b9814de24290f126df09d4bd37a15" dependencies = [ "async-io", "data-encoding", "dns-parser", - "futures 0.3.21", + "futures 0.3.25", "if-watch", - "lazy_static", "libp2p-core", "libp2p-swarm", "log", - "rand 0.8.4", + "rand 0.8.5", "smallvec", "socket2", "void", @@ -3766,189 +3903,107 @@ dependencies = [ [[package]] name = "libp2p-metrics" -version = "0.7.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef8aff4a1abef42328fbb30b17c853fff9be986dc39af17ee39f9c5f755c5e0c" +checksum = "9ee31b08e78b7b8bfd1c4204a9dd8a87b4fcdf6dafc57eb51701c1c264a81cb9" dependencies = [ "libp2p-core", - "libp2p-gossipsub", "libp2p-identify", "libp2p-kad", "libp2p-ping", - "libp2p-relay", "libp2p-swarm", "prometheus-client", ] [[package]] name = "libp2p-mplex" -version = "0.34.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61fd1b20638ec209c5075dfb2e8ce6a7ea4ec3cd3ad7b77f7a477c06d53322e2" -dependencies = [ - "asynchronous-codec", - "bytes", - "futures 0.3.21", - "libp2p-core", - "log", - "nohash-hasher", - "parking_lot 0.12.0", - "rand 0.7.3", - "smallvec", - "unsigned-varint", -] - -[[package]] -name = "libp2p-noise" -version = "0.37.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "762408cb5d84b49a600422d7f9a42c18012d8da6ebcd570f9a4a4290ba41fb6f" -dependencies = [ - "bytes", - "curve25519-dalek 3.2.0", - "futures 0.3.21", - "lazy_static", - "libp2p-core", - "log", - "prost", - "prost-build", - "rand 0.8.4", - "sha2 0.10.2", - "snow", - "static_assertions", - "x25519-dalek", - "zeroize", -] - -[[package]] -name = "libp2p-ping" version = "0.37.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "100a6934ae1dbf8a693a4e7dd1d730fd60b774dafc45688ed63b554497c6c925" -dependencies = [ - "futures 0.3.21", - "futures-timer", - "instant", - "libp2p-core", - "libp2p-swarm", - "log", - "rand 0.7.3", - "void", -] - -[[package]] -name = "libp2p-plaintext" -version = "0.34.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be27bf0820a6238a4e06365b096d428271cce85a129cf16f2fe9eb1610c4df86" +checksum = "692664acfd98652de739a8acbb0a0d670f1d67190a49be6b4395e22c37337d89" dependencies = [ "asynchronous-codec", "bytes", - "futures 0.3.21", + "futures 0.3.25", "libp2p-core", "log", - "prost", - "prost-build", + "nohash-hasher", + "parking_lot 0.12.1", + "rand 0.8.5", + "smallvec", "unsigned-varint", - "void", -] - -[[package]] -name = "libp2p-pnet" -version = "0.22.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f1a458bbda880107b5b36fcb9b5a1ef0c329685da0e203ed692a8ebe64cc92c" -dependencies = [ - "futures 0.3.21", - "log", - "pin-project", - "rand 0.7.3", - "salsa20", - "sha3 0.9.1", ] [[package]] -name = "libp2p-relay" -version = "0.10.0" +name = "libp2p-noise" +version = "0.40.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4931547ee0cce03971ccc1733ff05bb0c4349fd89120a39e9861e2bbe18843c3" +checksum = "048155686bd81fe6cb5efdef0c6290f25ad32a0a42e8f4f72625cf6a505a206f" dependencies = [ - "asynchronous-codec", "bytes", - "either", - "futures 0.3.21", - "futures-timer", - "instant", + "curve25519-dalek 3.2.0", + "futures 0.3.25", + "lazy_static", "libp2p-core", - "libp2p-swarm", "log", - "pin-project", "prost", "prost-build", - "prost-codec", - "rand 0.8.4", - "smallvec", + "rand 0.8.5", + "sha2 0.10.6", + "snow", "static_assertions", - "thiserror", - "void", + "x25519-dalek", + "zeroize", ] [[package]] -name = "libp2p-rendezvous" -version = "0.7.0" +name = "libp2p-ping" +version = "0.40.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9511c9672ba33284838e349623319c8cad2d18cfad243ae46c6b7e8a2982ea4e" +checksum = "7228b9318d34689521349a86eb39a3c3a802c9efc99a0568062ffb80913e3f91" dependencies = [ - "asynchronous-codec", - "bimap", - "futures 0.3.21", + "futures 0.3.25", "futures-timer", "instant", "libp2p-core", "libp2p-swarm", "log", - "prost", - "prost-build", - "rand 0.8.4", - "sha2 0.10.2", - "thiserror", - "unsigned-varint", + "rand 0.8.5", "void", ] [[package]] name = "libp2p-request-response" -version = "0.19.0" +version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "508a189e2795d892c8f5c1fa1e9e0b1845d32d7b0b249dbf7b05b18811361843" +checksum = "8827af16a017b65311a410bb626205a9ad92ec0473967618425039fa5231adc1" dependencies = [ "async-trait", "bytes", - "futures 0.3.21", + "futures 0.3.25", "instant", "libp2p-core", "libp2p-swarm", "log", - "rand 0.7.3", + "rand 0.8.5", "smallvec", "unsigned-varint", ] [[package]] name = "libp2p-swarm" -version = "0.37.0" +version = "0.40.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95ac5be6c2de2d1ff3f7693fda6faf8a827b1f3e808202277783fea9f527d114" +checksum = "46d13df7c37807965d82930c0e4b04a659efcb6cca237373b206043db5398ecf" dependencies = [ "either", "fnv", - "futures 0.3.21", + "futures 0.3.25", "futures-timer", "instant", "libp2p-core", "log", "pin-project", - "rand 0.7.3", + "rand 0.8.5", "smallvec", "thiserror", "void", @@ -3956,50 +4011,38 @@ dependencies = [ [[package]] name = "libp2p-swarm-derive" -version = "0.28.0" +version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f54a64b6957249e0ce782f8abf41d97f69330d02bf229f0672d864f0650cc76" +checksum = "a0eddc4497a8b5a506013c40e8189864f9c3a00db2b25671f428ae9007f3ba32" dependencies = [ + "heck 0.4.0", "quote", "syn", ] [[package]] name = "libp2p-tcp" -version = "0.34.0" +version = "0.37.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a6771dc19aa3c65d6af9a8c65222bfc8fcd446630ddca487acd161fa6096f3b" +checksum = "9839d96761491c6d3e238e70554b856956fca0ab60feb9de2cd08eed4473fa92" dependencies = [ "async-io", - "futures 0.3.21", + "futures 0.3.25", "futures-timer", "if-watch", - "ipnet", "libc", "libp2p-core", "log", "socket2", ] -[[package]] -name = "libp2p-uds" -version = "0.33.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d125e3e5f0d58f3c6ac21815b20cf4b6a88b8db9dc26368ea821838f4161fd4d" -dependencies = [ - "async-std", - "futures 0.3.21", - "libp2p-core", - "log", -] - [[package]] name = "libp2p-wasm-ext" -version = "0.34.0" +version = "0.37.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec894790eec3c1608f8d1a8a0bdf0dbeb79ed4de2dce964222011c2896dfa05a" +checksum = "a17b5b8e7a73e379e47b1b77f8a82c4721e97eca01abcd18e9cd91a23ca6ce97" dependencies = [ - "futures 0.3.21", + "futures 0.3.25", "js-sys", "libp2p-core", "parity-send-wrapper", @@ -4009,16 +4052,16 @@ dependencies = [ [[package]] name = "libp2p-websocket" -version = "0.36.0" +version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9808e57e81be76ff841c106b4c5974fb4d41a233a7bdd2afbf1687ac6def3818" +checksum = "3758ae6f89b2531a24b6d9f5776bda6a626b60a57600d7185d43dfa75ca5ecc4" dependencies = [ "either", - "futures 0.3.21", + "futures 0.3.25", "futures-rustls", "libp2p-core", "log", - "parking_lot 0.12.0", + "parking_lot 0.12.1", "quicksink", "rw-stream-sink", "soketto", @@ -4028,22 +4071,23 @@ dependencies = [ [[package]] name = "libp2p-yamux" -version = "0.38.0" +version = "0.41.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6dea686217a06072033dc025631932810e2f6ad784e4fafa42e27d311c7a81c" +checksum = "0d6874d66543c4f7e26e3b8ca9a6bead351563a13ab4fafd43c7927f7c0d6c12" dependencies = [ - "futures 0.3.21", + "futures 0.3.25", "libp2p-core", - "parking_lot 0.12.0", + "log", + "parking_lot 0.12.1", "thiserror", "yamux", ] [[package]] name = "libsecp256k1" -version = "0.7.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0452aac8bab02242429380e9b2f94ea20cea2b37e2c1777a1358799bbe97f37" +checksum = "95b09eff1b35ed3b33b877ced3a691fc7a481919c7e29c53c906226fcf55e2a1" dependencies = [ "arrayref", "base64", @@ -4052,7 +4096,7 @@ dependencies = [ "libsecp256k1-core", "libsecp256k1-gen-ecmult", "libsecp256k1-gen-genmult", - "rand 0.8.4", + "rand 0.8.5", "serde", "sha2 0.9.9", "typenum", @@ -4089,20 +4133,29 @@ dependencies = [ [[package]] name = "libz-sys" -version = "1.1.3" +version = "1.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de5435b8549c16d423ed0c03dbaafe57cf6c3344744f1242520d59c9d8ecec66" +checksum = "9702761c3935f8cc2f101793272e202c72b99da8f4224a19ddcf1279a6450bbf" dependencies = [ "cc", "pkg-config", "vcpkg", ] +[[package]] +name = "link-cplusplus" +version = "1.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ecd207c9c713c34f95a097a5b029ac2ce6010530c7b49d7fea24d977dede04f5" +dependencies = [ + "cc", +] + [[package]] name = "linked-hash-map" -version = "0.5.4" +version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fb9b38af92608140b86b693604b9ffcc5824240a484d1ecd4795bacb2fe88f3" +checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" [[package]] name = "linked_hash_set" @@ -4125,21 +4178,21 @@ dependencies = [ [[package]] name = "linux-raw-sys" -version = "0.0.42" +version = "0.0.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5284f00d480e1c39af34e72f8ad60b94f47007e3481cd3b731c1d67190ddc7b7" +checksum = "d4d2456c373231a208ad294c33dc5bff30051eafd954cd4caae83a712b12854d" [[package]] name = "linux-raw-sys" -version = "0.0.46" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4d2456c373231a208ad294c33dc5bff30051eafd954cd4caae83a712b12854d" +checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4" [[package]] name = "lock_api" -version = "0.4.7" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "327fa5b6a6940e4699ec49a9beae1ea4845c6bab9314e4f84ac68742139d8c53" +checksum = "435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df" dependencies = [ "autocfg", "scopeguard", @@ -4157,11 +4210,20 @@ dependencies = [ [[package]] name = "lru" -version = "0.7.7" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e999beba7b6e8345721bd280141ed958096a2e4abdf74f67ff4ce49b4b54e47a" +dependencies = [ + "hashbrown", +] + +[[package]] +name = "lru" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c84e6fe5655adc6ce00787cf7dcaf8dc4f998a0565d23eafc207a8b08ca3349a" +checksum = "b6e8aaa3f231bb4bd57b84b2d5dc3ae7f350265df8aa96492e0bc394a1571909" dependencies = [ - "hashbrown 0.11.2", + "hashbrown", ] [[package]] @@ -4175,9 +4237,9 @@ dependencies = [ [[package]] name = "lz4" -version = "1.23.2" +version = "1.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aac20ed6991e01bf6a2e68cc73df2b389707403662a8ba89f68511fb340f724c" +checksum = "7e9e2dd86df36ce760a60f6ff6ad526f7ba1f14ba0356f8254fb6905e6494df1" dependencies = [ "libc", "lz4-sys", @@ -4185,9 +4247,9 @@ dependencies = [ [[package]] name = "lz4-sys" -version = "1.9.2" +version = "1.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dca79aa95d8b3226213ad454d328369853be3a1382d89532a854f4d69640acae" +checksum = "57d27b317e207b10f69f5e75494119e391a96f48861ae870d1da6edac98ca900" dependencies = [ "cc", "libc", @@ -4231,71 +4293,71 @@ checksum = "a3e378b66a060d48947b590737b30a1be76706c8dd7b8ba0f2fe3989c68a853f" [[package]] name = "matrixmultiply" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a8a15b776d9dfaecd44b03c5828c2199cddff5247215858aac14624f8d6b741" +checksum = "add85d4dd35074e6fedc608f8c8f513a3548619a9024b751949ef0e8e45a4d84" dependencies = [ "rawpointer", ] [[package]] name = "memchr" -version = "2.4.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a" +checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" [[package]] name = "memfd" -version = "0.4.1" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6627dc657574b49d6ad27105ed671822be56e0d2547d413bfbf3e8d8fa92e7a" +checksum = "b20a59d985586e4a5aef64564ac77299f8586d8be6cf9106a5a40207e8908efb" dependencies = [ - "libc", + "rustix 0.36.5", ] [[package]] name = "memmap2" -version = "0.2.3" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "723e3ebdcdc5c023db1df315364573789f8857c11b631a2fdfad7c00f5c046b4" +checksum = "4b182332558b18d807c4ce1ca8ca983b34c3ee32765e47b3f0f69b90355cc1dc" dependencies = [ "libc", ] [[package]] -name = "memmap2" -version = "0.5.0" +name = "memoffset" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4647a11b578fead29cdbb34d4adef8dd3dc35b876c9c6d5240d83f205abfe96e" +checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" dependencies = [ - "libc", + "autocfg", ] [[package]] name = "memoffset" -version = "0.6.5" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" +checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4" dependencies = [ "autocfg", ] [[package]] name = "memory-db" -version = "0.29.0" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6566c70c1016f525ced45d7b7f97730a2bafb037c788211d0c186ef5b2189f0a" +checksum = "34ac11bb793c28fa095b7554466f53b3a60a2cd002afdac01bcf135cbd73a269" dependencies = [ "hash-db", - "hashbrown 0.12.2", + "hashbrown", "parity-util-mem", ] [[package]] name = "memory_units" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71d96e3f3c0b6325d8ccd83c33b28acb183edcb6c67938ba104ec546854b0882" +checksum = "8452105ba047068f40ff7093dd1d9da90898e63dd61736462e9cdda6a90ad3c3" [[package]] name = "merlin" @@ -4323,19 +4385,9 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a92518e98c078586bc6c934028adcca4c92a53d6a958196de835170a01d84e4b" -dependencies = [ - "adler", - "autocfg", -] - -[[package]] -name = "miniz_oxide" -version = "0.5.3" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f5c75688da582b8ffc1f1799e9db273f32133c49e048f614d22ec3256773ccc" +checksum = "b275950c28b37e794e8c55d88aeb5e139d0ce23fdbbeda68f8d7174abdf9e8fa" dependencies = [ "adler", ] @@ -4361,14 +4413,14 @@ dependencies = [ [[package]] name = "mio" -version = "0.8.4" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57ee1c23c7c63b0c9250c339ffdc69255f110b298b901b9f6c82547b7b87caaf" +checksum = "e5d732bc30207a6423068df043e3d02e0735b155ad7ce1a6f76fe2baa5b158de" dependencies = [ "libc", "log", "wasi 0.11.0+wasi-snapshot-preview1", - "windows-sys", + "windows-sys 0.42.0", ] [[package]] @@ -4396,10 +4448,31 @@ dependencies = [ ] [[package]] -name = "more-asserts" -version = "0.2.2" +name = "mockall" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50e4a1c770583dac7ab5e2f6c139153b783a53a1bbee9729613f193e59828326" +dependencies = [ + "cfg-if 1.0.0", + "downcast", + "fragile", + "lazy_static", + "mockall_derive", + "predicates", + "predicates-tree", +] + +[[package]] +name = "mockall_derive" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7843ec2de400bcbc6a6328c958dc38e5359da6e93e72e37bc5246bf1ae776389" +checksum = "832663583d5fa284ca8810bf7015e46c9fff9622d3cf34bd1eea5003fec06dd0" +dependencies = [ + "cfg-if 1.0.0", + "proc-macro2", + "quote", + "syn", +] [[package]] name = "multiaddr" @@ -4432,18 +4505,18 @@ dependencies = [ [[package]] name = "multihash" -version = "0.16.2" +version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3db354f401db558759dfc1e568d010a5d4146f4d3f637be1275ec4a3cf09689" +checksum = "1c346cf9999c631f002d8f977c4eaeaa0e6386f16007202308d0b3757522c2cc" dependencies = [ "blake2b_simd", "blake2s_simd", "blake3", "core2", - "digest 0.10.3", + "digest 0.10.6", "multihash-derive", - "sha2 0.10.2", - "sha3 0.10.1", + "sha2 0.10.6", + "sha3", "unsigned-varint", ] @@ -4469,12 +4542,12 @@ checksum = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a" [[package]] name = "multistream-select" -version = "0.11.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "363a84be6453a70e63513660f4894ef815daf88e3356bffcda9ca27d810ce83b" +checksum = "c8552ab875c1313b97b8d20cb857b9fd63e2d1d6a0a1b53ce9821e575405f27a" dependencies = [ "bytes", - "futures 0.3.21", + "futures 0.3.25", "log", "pin-project", "smallvec", @@ -4491,9 +4564,9 @@ dependencies = [ "matrixmultiply", "nalgebra-macros", "num-complex", - "num-rational 0.4.0", + "num-rational 0.4.1", "num-traits", - "rand 0.8.4", + "rand 0.8.5", "rand_distr", "simba", "typenum", @@ -4516,14 +4589,14 @@ version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e7d66043b25d4a6cccb23619d10c19c25304b355a7dccd4a8e11423dd2382146" dependencies = [ - "rand 0.8.4", + "rand 0.8.5", ] [[package]] name = "native-tls" -version = "0.2.10" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd7e2f3618557f980e0b17e8856252eee3c97fa12c54dff0ca290fb6266ca4a9" +checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" dependencies = [ "lazy_static", "libc", @@ -4539,9 +4612,9 @@ dependencies = [ [[package]] name = "net2" -version = "0.2.37" +version = "0.2.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "391630d12b68002ae1e25e8f974306474966550ad82dac6886fb8910c19568ae" +checksum = "74d0df99cfcd2530b2e694f6e17e7f37b8e26bb23983ac530c0c97408837c631" dependencies = [ "cfg-if 0.1.10", "libc", @@ -4593,7 +4666,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "65b4b14489ab424703c092062176d52ba55485a89c076b4f9db05092b7223aa6" dependencies = [ "bytes", - "futures 0.3.21", + "futures 0.3.25", "log", "netlink-packet-core", "netlink-sys", @@ -4609,7 +4682,7 @@ checksum = "92b654097027250401127914afb37cb1f311df6610a9891ff07a757e94199027" dependencies = [ "async-io", "bytes", - "futures 0.3.21", + "futures 0.3.25", "libc", "log", ] @@ -4622,13 +4695,25 @@ checksum = "ab250442c86f1850815b5d268639dff018c0627022bc1940eb2d642ca1ce12f0" [[package]] name = "nix" -version = "0.24.1" +version = "0.24.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa52e972a9a719cecb6864fb88568781eb706bac2cd1d4f04a648542dbf78069" +dependencies = [ + "bitflags", + "cfg-if 1.0.0", + "libc", +] + +[[package]] +name = "nix" +version = "0.26.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f17df307904acd05aa8e32e97bb20f2a0df1728bbc2d771ae8f9a90463441e9" +checksum = "46a58d1d356c6597d08cde02c2f09d785b09e28711837b1ed667dc652c08a694" dependencies = [ "bitflags", "cfg-if 1.0.0", "libc", + "static_assertions", ] [[package]] @@ -4645,13 +4730,12 @@ checksum = "2bf50223579dc7cdcfb3bfcacf7069ff68243f8c363f62ffa99cf000a6b9c451" [[package]] name = "nom" -version = "7.1.0" +version = "7.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b1d11e1ef389c76fe5b81bcaf2ea32cf88b62bc494e19f493d0b30e7a930109" +checksum = "a8903e5a29a317527874d0402f867152a3d21c908bb0b933e416c65e301d4c36" dependencies = [ "memchr", "minimal-lexical", - "version_check", ] [[package]] @@ -4665,6 +4749,12 @@ dependencies = [ "nom", ] +[[package]] +name = "normalize-line-endings" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61807f77802ff30975e01f4f071c8ba10c022052f98b3294119f3e615d13e5be" + [[package]] name = "notify" version = "4.0.17" @@ -4694,30 +4784,41 @@ dependencies = [ "num-traits", ] +[[package]] +name = "num-bigint" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f93ab6289c7b344a8a9f60f88d80aa20032336fe78da341afc91c8a2341fc75f" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + [[package]] name = "num-complex" -version = "0.4.0" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26873667bbbb7c5182d4a37c1add32cdf09f841af72da53318fdb81543c15085" +checksum = "7ae39348c8bc5fbd7f40c727a9925f03517afd2ab27d46702108b6a7e5414c19" dependencies = [ "num-traits", ] [[package]] name = "num-format" -version = "0.4.0" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bafe4179722c2894288ee77a9f044f02811c86af699344c498b0840c698a2465" +checksum = "a652d9771a63711fd3c3deb670acfbe5c30a4072e664d7a3bf5a9e1056ac72c3" dependencies = [ - "arrayvec 0.4.12", - "itoa 0.4.7", + "arrayvec 0.7.2", + "itoa", ] [[package]] name = "num-integer" -version = "0.1.44" +version = "0.1.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2cc698a63b549a70bc047073d2949cce27cd1c7b0a4a862d08a8031bc2801db" +checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" dependencies = [ "autocfg", "num-traits", @@ -4730,56 +4831,57 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5c000134b5dbf44adc5cb772486d335293351644b801551abe8f75c84cfa4aef" dependencies = [ "autocfg", - "num-bigint", + "num-bigint 0.2.6", "num-integer", "num-traits", ] [[package]] name = "num-rational" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d41702bd167c2df5520b384281bc111a4b5efcf7fbc4c9c222c815b07e0a6a6a" +checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0" dependencies = [ "autocfg", + "num-bigint 0.4.3", "num-integer", "num-traits", ] [[package]] name = "num-traits" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290" +checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" dependencies = [ "autocfg", - "libm", + "libm 0.2.6", ] [[package]] name = "num_cpus" -version = "1.13.0" +version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3" +checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b" dependencies = [ - "hermit-abi", + "hermit-abi 0.2.6", "libc", ] [[package]] name = "num_enum" -version = "0.5.6" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "720d3ea1055e4e4574c0c0b0f8c3fd4f24c4cdaf465948206dea090b57b526ad" +checksum = "cf5395665662ef45796a4ff5486c5d41d29e0c09640af4c5f17fd94ee2c119c9" dependencies = [ "num_enum_derive", ] [[package]] name = "num_enum_derive" -version = "0.5.6" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d992b768490d7fe0d8586d9b5745f6c49f557da6d81dc982b1d167ad4edbb21" +checksum = "3b0498641e53dd6ac1a4f22547548caa6864cc4933784319cd1775271c5a46ce" dependencies = [ "proc-macro2", "quote", @@ -4788,32 +4890,32 @@ dependencies = [ [[package]] name = "object" -version = "0.28.4" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e42c982f2d955fac81dd7e1d0e1426a7d702acd9c98d19ab01083a6a0328c424" +checksum = "21158b2c33aa6d4561f1c0a6ea283ca92bc54802a93b263e910746d679a7eb53" dependencies = [ "crc32fast", - "hashbrown 0.11.2", + "hashbrown", "indexmap", "memchr", ] [[package]] name = "object" -version = "0.29.0" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21158b2c33aa6d4561f1c0a6ea283ca92bc54802a93b263e910746d679a7eb53" +checksum = "239da7f290cfa979f43f85a8efeee9a8a76d0827c356d37f9d3d7254d6b537fb" dependencies = [ "memchr", ] [[package]] name = "once_cell" -version = "1.13.0" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18a6dbe30758c9f83eb00cbea4ac95966305f5a7772f3f42ebfc7fc7eddbd8e1" +checksum = "86f0b0d4bf799edbc74508c1e8bf170ff5f41238e5f8225603ca7caaae2b7860" dependencies = [ - "parking_lot_core 0.9.3", + "parking_lot_core 0.9.5", ] [[package]] @@ -4830,9 +4932,9 @@ checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" [[package]] name = "openssl" -version = "0.10.40" +version = "0.10.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb81a6430ac911acb25fe5ac8f1d2af1b4ea8a4fdfda0f1ee4292af2e2d8eb0e" +checksum = "b102428fd03bc5edf97f62620f7298614c45cedf287c271e7ed450bbaf83f2e1" dependencies = [ "bitflags", "cfg-if 1.0.0", @@ -4856,15 +4958,15 @@ dependencies = [ [[package]] name = "openssl-probe" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28988d872ab76095a6e6ac88d99b54fd267702734fd7ffe610ca27f533ddb95a" +checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.74" +version = "0.9.80" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "835363342df5fba8354c5b453325b110ffd54044e588c539cf2f20a8014e4cb1" +checksum = "23bbbf7854cd45b83958ebe919f0e8e516793727652e27fda10a8384cfc790b7" dependencies = [ "autocfg", "cc", @@ -4875,23 +4977,24 @@ dependencies = [ [[package]] name = "os_str_bytes" -version = "6.0.0" +version = "6.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e22443d1643a904602595ba1cd8f7d896afe56d26712531c5ff73a15b2fbf64" +checksum = "9b7820b9daea5457c9f21c69448905d723fbd21136ccf521748f23fd49e723ee" [[package]] -name = "owning_ref" -version = "0.4.1" +name = "packed_simd_2" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ff55baddef9e4ad00f88b6c743a2a8062d4c6ade126c2a528644b8e444d52ce" +checksum = "a1914cd452d8fccd6f9db48147b29fd4ae05bea9dc5d9ad578509f72415de282" dependencies = [ - "stable_deref_trait", + "cfg-if 1.0.0", + "libm 0.1.4", ] [[package]] name = "pallet-atomic-swap" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ "frame-support", "frame-system", @@ -4906,7 +5009,7 @@ dependencies = [ [[package]] name = "pallet-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ "frame-support", "frame-system", @@ -4943,7 +5046,7 @@ dependencies = [ [[package]] name = "pallet-authorship" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ "frame-support", "frame-system", @@ -4958,7 +5061,7 @@ dependencies = [ [[package]] name = "pallet-babe" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ "frame-benchmarking", "frame-support", @@ -4982,7 +5085,7 @@ dependencies = [ [[package]] name = "pallet-balances" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ "frame-benchmarking", "frame-support", @@ -5014,7 +5117,7 @@ dependencies = [ [[package]] name = "pallet-collective" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ "frame-benchmarking", "frame-support", @@ -5098,7 +5201,7 @@ dependencies = [ [[package]] name = "pallet-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ "frame-benchmarking", "frame-support", @@ -5138,7 +5241,7 @@ dependencies = [ [[package]] name = "pallet-im-online" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ "frame-benchmarking", "frame-support", @@ -5176,11 +5279,12 @@ dependencies = [ [[package]] name = "pallet-multisig" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", + "log", "parity-scale-codec", "scale-info", "sp-io", @@ -5191,7 +5295,7 @@ dependencies = [ [[package]] name = "pallet-offences" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ "frame-support", "frame-system", @@ -5226,11 +5330,12 @@ dependencies = [ [[package]] name = "pallet-preimage" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", + "log", "parity-scale-codec", "scale-info", "sp-core", @@ -5257,7 +5362,7 @@ dependencies = [ [[package]] name = "pallet-proxy" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ "frame-benchmarking", "frame-support", @@ -5272,7 +5377,7 @@ dependencies = [ [[package]] name = "pallet-scheduler" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ "frame-benchmarking", "frame-support", @@ -5288,7 +5393,7 @@ dependencies = [ [[package]] name = "pallet-session" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ "frame-support", "frame-system", @@ -5309,7 +5414,7 @@ dependencies = [ [[package]] name = "pallet-sudo" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ "frame-support", "frame-system", @@ -5323,7 +5428,7 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ "frame-benchmarking", "frame-support", @@ -5341,7 +5446,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ "frame-support", "frame-system", @@ -5357,9 +5462,9 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ - "jsonrpsee 0.14.0", + "jsonrpsee 0.15.1", "pallet-transaction-payment-rpc-runtime-api", "parity-scale-codec", "sp-api", @@ -5367,23 +5472,25 @@ dependencies = [ "sp-core", "sp-rpc", "sp-runtime", + "sp-weights", ] [[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.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", "sp-api", "sp-runtime", + "sp-weights", ] [[package]] name = "pallet-treasury" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ "frame-benchmarking", "frame-support", @@ -5432,7 +5539,7 @@ dependencies = [ [[package]] name = "pallet-utility" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ "frame-benchmarking", "frame-support", @@ -5447,9 +5554,9 @@ dependencies = [ [[package]] name = "parity-db" -version = "0.3.14" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "966eb23bd3a09758b8dac09f82b9d417c00f14e5d46171bf04cffdd9cb2e1eb1" +checksum = "2c8fdb726a43661fa54b43e7114e6b88b2289cae388eb3ad766d9d1754d83fce" dependencies = [ "blake2-rfc", "crc32fast", @@ -5458,21 +5565,22 @@ dependencies = [ "libc", "log", "lz4", - "memmap2 0.2.3", - "parking_lot 0.11.2", - "rand 0.8.4", + "memmap2", + "parking_lot 0.12.1", + "rand 0.8.5", "snap", ] [[package]] name = "parity-scale-codec" -version = "3.1.5" +version = "3.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9182e4a71cae089267ab03e67c99368db7cd877baf50f931e5d6d4b71e195ac0" +checksum = "366e44391a8af4cfd6002ef6ba072bae071a96aafca98d7d448a34c5dca38b6a" dependencies = [ "arrayvec 0.7.2", "bitvec", "byte-slice-cast", + "bytes", "impl-trait-for-tuples", "parity-scale-codec-derive", "serde", @@ -5498,15 +5606,15 @@ checksum = "aa9777aa91b8ad9dd5aaa04a9b6bcb02c7f1deb952fca5a66034d5e63afc5c6f" [[package]] name = "parity-util-mem" -version = "0.11.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c32561d248d352148124f036cac253a644685a21dc9fea383eb4907d7bd35a8f" +checksum = "0d32c34f4f5ca7f9196001c0aba5a1f9a5a12382c8944b8b0f90233282d1e8f8" dependencies = [ "cfg-if 1.0.0", - "hashbrown 0.12.2", + "hashbrown", "impl-trait-for-tuples", "parity-util-mem-derive", - "parking_lot 0.12.0", + "parking_lot 0.12.1", "primitive-types", "winapi 0.3.9", ] @@ -5533,9 +5641,9 @@ dependencies = [ [[package]] name = "parity-wasm" -version = "0.42.2" +version = "0.45.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be5e13c266502aadf83426d87d81a0f5d1ef45b8027f5a471c360abfe4bfae92" +checksum = "e1ad0aff30c1da14b1254fcb2af73e1fa9a28670e584a626f53a369d0e157304" [[package]] name = "parking" @@ -5551,24 +5659,24 @@ checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" dependencies = [ "instant", "lock_api", - "parking_lot_core 0.8.5", + "parking_lot_core 0.8.6", ] [[package]] name = "parking_lot" -version = "0.12.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f5ec2493a61ac0506c0f4199f99070cbe83857b0337006a30f3e6719b8ef58" +checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" dependencies = [ "lock_api", - "parking_lot_core 0.9.3", + "parking_lot_core 0.9.5", ] [[package]] name = "parking_lot_core" -version = "0.8.5" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d76e8e1493bcac0d2766c42737f34458f1c8c50c0d23bcb24ea953affb273216" +checksum = "60a2cfe6f0ad2bfc16aefa463b497d5c7a5ecd44a23efa72aa342d90177356dc" dependencies = [ "cfg-if 1.0.0", "instant", @@ -5580,22 +5688,22 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.3" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09a279cbf25cb0757810394fbc1e359949b59e348145c643a939a525692e6929" +checksum = "7ff9f3fef3968a3ec5945535ed654cb38ff72d7495a25619e2247fb15a2ed9ba" dependencies = [ "cfg-if 1.0.0", "libc", "redox_syscall", "smallvec", - "windows-sys", + "windows-sys 0.42.0", ] [[package]] name = "paste" -version = "1.0.5" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acbf547ad0c65e31259204bd90935776d1c693cec2f4ff7abb7a1bbbd40dfe58" +checksum = "d01a5bd0424d00070b0098dd17ebca6f961a959dead1dbcbbbc1d1cd8d3deeba" [[package]] name = "pbkdf2" @@ -5644,24 +5752,25 @@ checksum = "9555b1514d2d99d78150d3c799d4c357a3e2c2a8062cd108e93a06d9057629c5" [[package]] name = "percent-encoding" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" +checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" [[package]] name = "pest" -version = "2.1.3" +version = "2.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10f4872ae94d7b90ae48754df22fd42ad52ce740b8f370b03da4835417403e53" +checksum = "cc8bed3549e0f9b0a2a78bf7c0018237a2cdf085eecbbc048e52612438e4e9d0" dependencies = [ + "thiserror", "ucd-trie", ] [[package]] name = "pest_derive" -version = "2.1.0" +version = "2.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "833d1ae558dc601e9a60366421196a8d94bc0ac980476d0b67e1d0988d72b2d0" +checksum = "cdc078600d06ff90d4ed238f0119d84ab5d43dbaad278b0e33a8820293b32344" dependencies = [ "pest", "pest_generator", @@ -5669,9 +5778,9 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.1.3" +version = "2.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99b8db626e31e5b81787b9783425769681b347011cc59471e33ea46d2ea0cf55" +checksum = "28a1af60b1c4148bb269006a750cff8e2ea36aff34d2d96cf7be0b14d1bed23c" dependencies = [ "pest", "pest_meta", @@ -5682,20 +5791,20 @@ dependencies = [ [[package]] name = "pest_meta" -version = "2.1.3" +version = "2.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54be6e404f5317079812fc8f9f5279de376d8856929e21c184ecf6bbd692a11d" +checksum = "fec8605d59fc2ae0c6c1aefc0c7c7a9769732017c0ce07f7a9cfffa7b4404f20" dependencies = [ - "maplit", + "once_cell", "pest", - "sha-1 0.8.2", + "sha1", ] [[package]] name = "petgraph" -version = "0.6.0" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a13a2fa9d0b63e5f22328828741e523766fff0ee9e779316902290dff3f824f" +checksum = "e6d5014253a1331579ce62aa67443b4a658c5e7dd03d4bc6d302b94474888143" dependencies = [ "fixedbitset", "indexmap", @@ -5703,18 +5812,18 @@ dependencies = [ [[package]] name = "pin-project" -version = "1.0.10" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58ad3879ad3baf4e44784bc6a718a8698867bb991f8ce24d1bcbe2cfb4c3a75e" +checksum = "ad29a609b6bcd67fee905812e544992d216af9d755757c05ed2d0e15a74c6ecc" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.0.10" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "744b6f092ba29c3650faf274db506afd39944f48420f6c86b17cfe0ee1cb36bb" +checksum = "069bdb1e05adc7a8990dce9cc75370895fbe4e3d58b9b73bf1aee56359344a55" dependencies = [ "proc-macro2", "quote", @@ -5729,9 +5838,9 @@ checksum = "257b64915a082f7811703966789728173279bdebb956b143dbcd23f6f970a777" [[package]] name = "pin-project-lite" -version = "0.2.7" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d31d11c69a6b52a174b42bdc0c30e5e11670f90788b2c471c31c1d17d449443" +checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" [[package]] name = "pin-utils" @@ -5739,17 +5848,28 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" +[[package]] +name = "pkcs8" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cabda3fb821068a9a4fab19a683eac3af12edf0f34b94a8be53c4972b8149d0" +dependencies = [ + "der", + "spki", + "zeroize", +] + [[package]] name = "pkg-config" -version = "0.3.19" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3831453b3449ceb48b6d9c7ad7c96d5ea673e9b470a1dc578c2ce6521230884c" +checksum = "6ac9a59f73473f1b8d852421e59e64809f025994837ef743615c6d0c5b305160" [[package]] name = "placeholder" -version = "1.1.3" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a488674d1157858898c95280e599d63584bb2daf3a11031ce5e76887d666c16" +checksum = "f1b691ea66d1ec20b3f725bab409c6600215fe556e67aff316c875d6aa2deb20" dependencies = [ "lazy_static", "regex", @@ -5761,17 +5881,24 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e8d0eef3571242013a0d5dc84861c3ae4a652e56e12adf8bdc26ff5f8cb34c94" +[[package]] +name = "platforms" +version = "3.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3d7ddaed09e0eb771a79ab0fd64609ba0afb0a8366421957936ad14cbd13630" + [[package]] name = "polling" -version = "2.1.0" +version = "2.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92341d779fa34ea8437ef4d82d440d5e1ce3f3ff7f824aa64424cd481f9a1f25" +checksum = "22122d5ec4f9fe1b3916419b76be1e80bcb93f618d071d2edf841b137b2a2bd6" dependencies = [ + "autocfg", "cfg-if 1.0.0", "libc", "log", "wepoll-ffi", - "winapi 0.3.9", + "windows-sys 0.42.0", ] [[package]] @@ -5780,7 +5907,7 @@ version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "048aeb476be11a4b6ca432ca569e375810de9294ae78f4774e78ea98a9246ede" dependencies = [ - "cpufeatures 0.2.1", + "cpufeatures", "opaque-debug 0.3.0", "universal-hash", ] @@ -5792,7 +5919,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8419d2b623c7c0896ff2d5d96e2cb4ede590fed28fcc34934f4c33c036e620a1" dependencies = [ "cfg-if 1.0.0", - "cpufeatures 0.2.1", + "cpufeatures", "opaque-debug 0.3.0", "universal-hash", ] @@ -5803,20 +5930,60 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "be97d76faf1bfab666e1375477b23fde79eccf0276e9b63b92a39d676a889ba9" dependencies = [ - "rand 0.8.4", + "rand 0.8.5", ] [[package]] name = "ppv-lite86" -version = "0.2.10" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" + +[[package]] +name = "predicates" +version = "2.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f54fc5dc63ed3bbf19494623db4f3af16842c0d975818e469022d09e53f0aa05" +dependencies = [ + "difflib", + "float-cmp", + "itertools", + "normalize-line-endings", + "predicates-core", + "regex", +] + +[[package]] +name = "predicates-core" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72f883590242d3c6fc5bf50299011695fa6590c2c70eac95ee1bdb9a733ad1a2" + +[[package]] +name = "predicates-tree" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54ff541861505aabf6ea722d2131ee980b8276e10a1297b94e896dd8b621850d" +dependencies = [ + "predicates-core", + "termtree", +] + +[[package]] +name = "prettyplease" +version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac74c624d6b2d21f425f752262f42188365d7b8ff1aff74c82e45136510a4857" +checksum = "2c8992a85d8e93a28bdf76137db888d3874e3b230dee5ed8bebac4c9f7617773" +dependencies = [ + "proc-macro2", + "syn", +] [[package]] name = "primitive-types" -version = "0.11.1" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e28720988bff275df1f51b171e1b2a18c30d194c4d2b61defdacecd625a5d94a" +checksum = "9f3486ccba82358b11a77516035647c34ba167dfa53312630de83b12bd4f3d66" dependencies = [ "fixed-hash", "impl-codec", @@ -5827,10 +5994,11 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "1.1.3" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e17d47ce914bf4de440332250b0edd23ce48c005f59fab39d3335866b114f11a" +checksum = "eda0fc3b0fb7c975631757e14d9049da17374063edb6ebbcbc54d880d4fe94e9" dependencies = [ + "once_cell", "thiserror", "toml", ] @@ -5861,44 +6029,44 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.40" +version = "1.0.49" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd96a1e8ed2596c337f8eae5f24924ec83f5ad5ab21ea8e455d3566c69fbcaf7" +checksum = "57a8eca9f9c4ffde41714334dee777596264c7825420f521abc92b5b5deb63a5" dependencies = [ "unicode-ident", ] [[package]] name = "prometheus" -version = "0.13.0" +version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7f64969ffd5dd8f39bd57a68ac53c163a095ed9d0fb707146da1b27025a3504" +checksum = "449811d15fbdf5ceb5c1144416066429cf82316e2ec8ce0c1f6f8a02e7bbcf8c" dependencies = [ "cfg-if 1.0.0", "fnv", "lazy_static", "memchr", - "parking_lot 0.11.2", + "parking_lot 0.12.1", "thiserror", ] [[package]] name = "prometheus-client" -version = "0.16.0" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac1abe0255c04d15f571427a2d1e00099016506cf3297b53853acd2b7eb87825" +checksum = "83cd1b99916654a69008fd66b4f9397fbe08e6e51dfe23d4417acf5d3b8cb87c" dependencies = [ "dtoa", - "itoa 1.0.1", - "owning_ref", + "itoa", + "parking_lot 0.12.1", "prometheus-client-derive-text-encode", ] [[package]] name = "prometheus-client-derive-text-encode" -version = "0.2.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8e12d01b9d66ad9eb4529c57666b6263fc1993cb30261d83ead658fdd932652" +checksum = "66a455fbcb954c1a7decf3c586e860fd7889cddf4b8e164be736dbac95a953cd" dependencies = [ "proc-macro2", "quote", @@ -5907,9 +6075,9 @@ dependencies = [ [[package]] name = "prost" -version = "0.10.4" +version = "0.11.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71adf41db68aa0daaefc69bb30bcd68ded9b9abaad5d1fbb6304c4fb390e083e" +checksum = "c01db6702aa05baa3f57dec92b8eeeeb4cb19e894e73996b32a4093289e54592" dependencies = [ "bytes", "prost-derive", @@ -5917,31 +6085,31 @@ dependencies = [ [[package]] name = "prost-build" -version = "0.10.4" +version = "0.11.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ae5a4388762d5815a9fc0dea33c56b021cdc8dde0c55e0c9ca57197254b0cab" +checksum = "cb5320c680de74ba083512704acb90fe00f28f79207286a848e730c45dd73ed6" dependencies = [ "bytes", - "cfg-if 1.0.0", - "cmake", "heck 0.4.0", "itertools", "lazy_static", "log", "multimap", "petgraph", + "prettyplease", "prost", "prost-types", "regex", + "syn", "tempfile", "which", ] [[package]] name = "prost-codec" -version = "0.1.0" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00af1e92c33b4813cc79fda3f2dbf56af5169709be0202df730e9ebc3e4cd007" +checksum = "011ae9ff8359df7915f97302d591cdd9e0e27fbd5a4ddc5bd13b71079bb20987" dependencies = [ "asynchronous-codec", "bytes", @@ -5952,9 +6120,9 @@ dependencies = [ [[package]] name = "prost-derive" -version = "0.10.1" +version = "0.11.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b670f45da57fb8542ebdbb6105a925fe571b67f9e7ed9f47a06a84e72b4e7cc" +checksum = "c8842bad1a5419bca14eac663ba798f6bc19c413c2fdceb5f3ba3b0932d96720" dependencies = [ "anyhow", "itertools", @@ -5965,9 +6133,9 @@ dependencies = [ [[package]] name = "prost-types" -version = "0.10.1" +version = "0.11.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d0a014229361011dc8e69c8a1ec6c2e8d0f2af7c91e3ea3f5b2170298461e68" +checksum = "017f79637768cde62820bc2d4fe0e45daaa027755c323ad077767c6c5f173091" dependencies = [ "bytes", "prost", @@ -5975,9 +6143,9 @@ dependencies = [ [[package]] name = "psm" -version = "0.1.18" +version = "0.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "871372391786ccec00d3c5d3d6608905b3d4db263639cfe075d3b60a736d115a" +checksum = "5787f7cda34e3033a72192c018bc5883100330f362ef279a8cbccfce8bb4e874" dependencies = [ "cc", ] @@ -6001,9 +6169,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.20" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3bcdf212e9776fbcb2d23ab029360416bb1706b1aea2d1a5ba002727cbcab804" +checksum = "8856d8364d252a14d474036ea1358d63c9e6965c8e5c1885c18f73d70bff9c7b" dependencies = [ "proc-macro2", ] @@ -6024,20 +6192,19 @@ dependencies = [ "libc", "rand_chacha 0.2.2", "rand_core 0.5.1", - "rand_hc 0.2.0", + "rand_hc", "rand_pcg 0.2.1", ] [[package]] name = "rand" -version = "0.8.4" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e7573632e6454cf6b99d7aac4ccca54be06da05aca2ef7423d22d27d4d4bcd8" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ "libc", "rand_chacha 0.3.1", - "rand_core 0.6.3", - "rand_hc 0.3.1", + "rand_core 0.6.4", ] [[package]] @@ -6057,7 +6224,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" dependencies = [ "ppv-lite86", - "rand_core 0.6.3", + "rand_core 0.6.4", ] [[package]] @@ -6071,21 +6238,21 @@ dependencies = [ [[package]] name = "rand_core" -version = "0.6.3" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.3", + "getrandom 0.2.8", ] [[package]] name = "rand_distr" -version = "0.4.1" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "051b398806e42b9cd04ad9ec8f81e355d0a382c543ac6672c62f5a5b452ef142" +checksum = "32cb0b9bc82b0a0876c2dd994a7e7a2683d3e7390ca40e6886785ef0c7e3ee31" dependencies = [ "num-traits", - "rand 0.8.4", + "rand 0.8.5", ] [[package]] @@ -6097,15 +6264,6 @@ dependencies = [ "rand_core 0.5.1", ] -[[package]] -name = "rand_hc" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d51e9f596de227fda2ea6c84607f5558e196eeaf43c986b724ba4fb8fdf497e7" -dependencies = [ - "rand_core 0.6.3", -] - [[package]] name = "rand_pcg" version = "0.2.1" @@ -6121,7 +6279,7 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "59cad018caf63deb318e5a4586d99a24424a364f40f1e5778c29aca23f4fc73e" dependencies = [ - "rand_core 0.6.3", + "rand_core 0.6.4", ] [[package]] @@ -6132,21 +6290,19 @@ checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3" [[package]] name = "rayon" -version = "1.5.3" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd99e5772ead8baa5215278c9b15bf92087709e9c1b2d1f97cdb5a183c933a7d" +checksum = "6db3a213adf02b3bcfd2d3846bb41cb22857d131789e01df434fb7e7bc0759b7" dependencies = [ - "autocfg", - "crossbeam-deque", "either", "rayon-core", ] [[package]] name = "rayon-core" -version = "1.9.3" +version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "258bcdb5ac6dad48491bb2992db6b7cf74878b0384908af124823d118c99683f" +checksum = "cac410af5d00ab6884528b4ab69d1e8e146e8d471201800fa1b4524126de6ad3" dependencies = [ "crossbeam-channel", "crossbeam-deque", @@ -6156,37 +6312,38 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.2.10" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8383f39639269cde97d255a32bdb68c047337295414940c68bdd30c2e13203ff" +checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" dependencies = [ "bitflags", ] [[package]] name = "redox_users" -version = "0.4.0" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "528532f3d801c87aec9def2add9ca802fe569e44a544afe633765267840abe64" +checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" dependencies = [ - "getrandom 0.2.3", + "getrandom 0.2.8", "redox_syscall", + "thiserror", ] [[package]] name = "ref-cast" -version = "1.0.6" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "300f2a835d808734ee295d45007adacb9ebb29dd3ae2424acfa17930cae541da" +checksum = "8c78fb8c9293bcd48ef6fce7b4ca950ceaf21210de6e105a883ee280c0f7b9ed" dependencies = [ "ref-cast-impl", ] [[package]] name = "ref-cast-impl" -version = "1.0.6" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c38e3aecd2b21cb3959637b883bb3714bc7e43f0268b9a29d3743ee3e55cdd2" +checksum = "9f9c0c92af03644e4806106281fe2e068ac5bc0ae74a707266d06ea27bccee5f" dependencies = [ "proc-macro2", "quote", @@ -6195,9 +6352,9 @@ dependencies = [ [[package]] name = "regalloc2" -version = "0.2.3" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a8d23b35d7177df3b9d31ed8a9ab4bf625c668be77a319d4f5efd4a5257701c" +checksum = "d43a209257d978ef079f3d446331d0f1794f5e0fc19b306a199983857833a779" dependencies = [ "fxhash", "log", @@ -6207,9 +6364,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.6.0" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c4eb3267174b8c6c2f654116623910a0fef09c4753f8dd83db29c48a0df988b" +checksum = "e076559ef8e241f2ae3479e36f97bd5741c0330689e217ad51ce2c76808b868a" dependencies = [ "aho-corasick", "memchr", @@ -6227,29 +6384,16 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.6.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3f87b73ce11b1619a3c6332f45341e0047173771e8b8b73f87bfeefb7b56244" - -[[package]] -name = "region" -version = "2.2.0" +version = "0.6.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "877e54ea2adcd70d80e9179344c97f93ef0dffd6b03e1f4529e6e83ab2fa9ae0" -dependencies = [ - "bitflags", - "libc", - "mach", - "winapi 0.3.9", -] +checksum = "456c603be3e8d448b072f410900c09faf164fbce2d480456f50eea6e25f9c848" [[package]] name = "remote-externalities" version = "0.10.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ "env_logger", - "jsonrpsee 0.14.0", "log", "parity-scale-codec", "serde", @@ -6258,6 +6402,7 @@ dependencies = [ "sp-io", "sp-runtime", "sp-version", + "substrate-rpc-client", ] [[package]] @@ -6271,9 +6416,9 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.11.11" +version = "0.11.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b75aa69a3f06bbcc66ede33af2af253c6f7a86b1ca0033f60c580a27074fbf92" +checksum = "68cc60575865c7831548863cc02356512e3f1dc2f3f82cb837d7fc4cc8f3c97c" dependencies = [ "base64", "bytes", @@ -6287,12 +6432,12 @@ dependencies = [ "hyper-tls", "ipnet", "js-sys", - "lazy_static", "log", "mime", "native-tls", + "once_cell", "percent-encoding", - "pin-project-lite 0.2.7", + "pin-project-lite 0.2.9", "serde", "serde_json", "serde_urlencoded", @@ -6303,7 +6448,7 @@ dependencies = [ "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "winreg 0.10.1", + "winreg", ] [[package]] @@ -6316,12 +6461,6 @@ dependencies = [ "quick-error", ] -[[package]] -name = "retain_mut" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11000e6ba5020e53e7cc26f73b91ae7d5496b4977851479edb66b694c0675c21" - [[package]] name = "rfc6979" version = "0.1.0" @@ -6350,11 +6489,12 @@ dependencies = [ [[package]] name = "rpassword" -version = "5.0.1" +version = "7.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffc936cf8a7ea60c58f030fd36a612a48f440610214dc54bc36431f9ea0c3efb" +checksum = "6678cf63ab3491898c0d021b493c94c9b221d91295294a2a5746eacbe5928322" dependencies = [ "libc", + "rtoolbox", "winapi 0.3.9", ] @@ -6365,14 +6505,24 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "322c53fd76a18698f1c27381d58091de3a043d356aa5bd0d510608b565f469a0" dependencies = [ "async-global-executor", - "futures 0.3.21", + "futures 0.3.25", "log", "netlink-packet-route", "netlink-proto", - "nix", + "nix 0.24.3", "thiserror", ] +[[package]] +name = "rtoolbox" +version = "0.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "034e22c514f5c0cb8a10ff341b9b048b5ceb21591f31c8f44c43b960f9b3524a" +dependencies = [ + "libc", + "winapi 0.3.9", +] + [[package]] name = "run_script" version = "0.6.4" @@ -6384,9 +6534,9 @@ dependencies = [ [[package]] name = "rustc-demangle" -version = "0.1.20" +version = "0.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dead70b0b5e03e9c814bcb6b01e03e68f7c57a80aa48c72ec92152ab3e818d49" +checksum = "7ef03e0a2b150c7a90d01faf6254c9c48a41e95fb2a8c2ac1c6f0d2b9aefc342" [[package]] name = "rustc-hash" @@ -6406,42 +6556,42 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" dependencies = [ - "semver 1.0.4", + "semver 1.0.16", ] [[package]] name = "rustix" -version = "0.33.7" +version = "0.35.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "938a344304321a9da4973b9ff4f9f8db9caf4597dfd9dda6a60b523340a0fff0" +checksum = "727a1a6d65f786ec22df8a81ca3121107f235970dc1705ed681d3e6e8b9cd5f9" dependencies = [ "bitflags", "errno", - "io-lifetimes 0.5.3", + "io-lifetimes 0.7.5", "libc", - "linux-raw-sys 0.0.42", - "winapi 0.3.9", + "linux-raw-sys 0.0.46", + "windows-sys 0.42.0", ] [[package]] name = "rustix" -version = "0.35.9" +version = "0.36.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72c825b8aa8010eb9ee99b75f05e10180b9278d161583034d7574c9d617aeada" +checksum = "a3807b5d10909833d3e9acd1eb5fb988f79376ff10fce42937de71a449c4c588" dependencies = [ "bitflags", "errno", - "io-lifetimes 0.7.3", + "io-lifetimes 1.0.3", "libc", - "linux-raw-sys 0.0.46", - "windows-sys", + "linux-raw-sys 0.1.4", + "windows-sys 0.42.0", ] [[package]] name = "rustls" -version = "0.20.2" +version = "0.20.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d37e5e2290f3e040b594b1a9e04377c2c671f1a1cfd9bfdef82106ac1c113f84" +checksum = "539a2bfe908f471bfa933876bd1eb6a19cf2176d375f82ef7f99530a40e48c2c" dependencies = [ "log", "ring", @@ -6451,9 +6601,9 @@ dependencies = [ [[package]] name = "rustls-native-certs" -version = "0.6.1" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ca9ebdfa27d3fc180e42879037b5338ab1c040c06affd00d8338598e7800943" +checksum = "0167bac7a9f490495f3c33013e7722b53cb087ecbe082fb0c6387c96f634ea50" dependencies = [ "openssl-probe", "rustls-pemfile", @@ -6463,18 +6613,18 @@ dependencies = [ [[package]] name = "rustls-pemfile" -version = "0.2.1" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5eebeaeb360c87bfb72e84abdb3447159c0eaececf1bef2aecd65a8be949d1c9" +checksum = "0864aeff53f8c05aa08d86e5ef839d3dfcf07aeba2db32f12db0ef716e87bd55" dependencies = [ "base64", ] [[package]] name = "rustversion" -version = "1.0.6" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2cc38e8fa666e2de3c4aba7edeb5ffc5246c1c2ed0e3d17e560aeeba736b23f" +checksum = "5583e89e108996506031660fe09baa5011b9dd0341b89029313006d1fb508d70" [[package]] name = "rusty-hook" @@ -6494,25 +6644,16 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "26338f5e09bb721b85b135ea05af7767c90b52f6de4f087d4f4a3a9d64e7dc04" dependencies = [ - "futures 0.3.21", + "futures 0.3.25", "pin-project", "static_assertions", ] [[package]] name = "ryu" -version = "1.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e" - -[[package]] -name = "salsa20" -version = "0.9.0" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c0fbb5f676da676c260ba276a8f43a8dc67cf02d1438423aeb1c677a7212686" -dependencies = [ - "cipher", -] +checksum = "7b4b9743ed687d4b4bcedf9ff5eaa7398495ae14e61cba0a295704edbc7decde" [[package]] name = "same-file" @@ -6526,7 +6667,7 @@ dependencies = [ [[package]] name = "sc-allocator" version = "4.1.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ "log", "sp-core", @@ -6537,9 +6678,9 @@ dependencies = [ [[package]] name = "sc-basic-authorship" version = "0.10.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ - "futures 0.3.21", + "futures 0.3.25", "futures-timer", "log", "parity-scale-codec", @@ -6560,7 +6701,7 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.10.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ "parity-scale-codec", "sc-client-api", @@ -6576,13 +6717,13 @@ dependencies = [ [[package]] name = "sc-chain-spec" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ "impl-trait-for-tuples", - "memmap2 0.5.0", + "memmap2", "parity-scale-codec", "sc-chain-spec-derive", - "sc-network", + "sc-network-common", "sc-telemetry", "serde", "serde_json", @@ -6593,7 +6734,7 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -6604,13 +6745,13 @@ dependencies = [ [[package]] name = "sc-cli" version = "0.10.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ + "array-bytes", "chrono", - "clap", + "clap 4.0.30", "fdlimit", - "futures 0.3.21", - "hex", + "futures 0.3.25", "libp2p", "log", "names", @@ -6622,6 +6763,7 @@ dependencies = [ "sc-client-db", "sc-keystore", "sc-network", + "sc-network-common", "sc-service", "sc-telemetry", "sc-tracing", @@ -6643,14 +6785,14 @@ dependencies = [ [[package]] name = "sc-client-api" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ "fnv", - "futures 0.3.21", + "futures 0.3.25", "hash-db", "log", "parity-scale-codec", - "parking_lot 0.12.0", + "parking_lot 0.12.1", "sc-executor", "sc-transaction-pool-api", "sc-utils", @@ -6671,7 +6813,7 @@ dependencies = [ [[package]] name = "sc-client-db" version = "0.10.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ "hash-db", "kvdb", @@ -6680,7 +6822,7 @@ dependencies = [ "log", "parity-db", "parity-scale-codec", - "parking_lot 0.12.0", + "parking_lot 0.12.1", "sc-client-api", "sc-state-db", "sp-arithmetic", @@ -6695,14 +6837,14 @@ dependencies = [ [[package]] name = "sc-consensus" version = "0.10.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ "async-trait", - "futures 0.3.21", + "futures 0.3.25", "futures-timer", "libp2p", "log", - "parking_lot 0.12.0", + "parking_lot 0.12.1", "sc-client-api", "sc-utils", "serde", @@ -6719,10 +6861,10 @@ dependencies = [ [[package]] name = "sc-consensus-aura" version = "0.10.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ "async-trait", - "futures 0.3.21", + "futures 0.3.25", "log", "parity-scale-codec", "sc-block-builder", @@ -6748,20 +6890,19 @@ dependencies = [ [[package]] name = "sc-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ "async-trait", "fork-tree", - "futures 0.3.21", + "futures 0.3.25", "log", "merlin", - "num-bigint", + "num-bigint 0.2.6", "num-rational 0.2.4", "num-traits", "parity-scale-codec", - "parking_lot 0.12.0", + "parking_lot 0.12.1", "rand 0.7.3", - "retain_mut", "sc-client-api", "sc-consensus", "sc-consensus-epochs", @@ -6791,7 +6932,7 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" version = "0.10.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ "fork-tree", "parity-scale-codec", @@ -6804,12 +6945,12 @@ dependencies = [ [[package]] name = "sc-consensus-manual-seal" version = "0.10.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ "assert_matches", "async-trait", - "futures 0.3.21", - "jsonrpsee 0.14.0", + "futures 0.3.25", + "jsonrpsee 0.15.1", "log", "parity-scale-codec", "sc-client-api", @@ -6838,10 +6979,10 @@ dependencies = [ [[package]] name = "sc-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ "async-trait", - "futures 0.3.21", + "futures 0.3.25", "futures-timer", "log", "parity-scale-codec", @@ -6856,14 +6997,13 @@ dependencies = [ "sp-inherents", "sp-runtime", "sp-state-machine", - "sp-timestamp", "thiserror", ] [[package]] name = "sc-consensus-uncles" version = "0.10.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ "sc-client-api", "sp-authorship", @@ -6874,12 +7014,12 @@ dependencies = [ [[package]] name = "sc-executor" version = "0.10.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ "lazy_static", - "lru", + "lru 0.7.8", "parity-scale-codec", - "parking_lot 0.12.0", + "parking_lot 0.12.1", "sc-executor-common", "sc-executor-wasmi", "sc-executor-wasmtime", @@ -6901,14 +7041,13 @@ dependencies = [ [[package]] name = "sc-executor-common" version = "0.10.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ "environmental", "parity-scale-codec", "sc-allocator", "sp-maybe-compressed-blob", "sp-sandbox", - "sp-serializer", "sp-wasm-interface", "thiserror", "wasm-instrument", @@ -6918,7 +7057,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmi" version = "0.10.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ "log", "parity-scale-codec", @@ -6933,15 +7072,15 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" version = "0.10.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ "cfg-if 1.0.0", "libc", "log", "once_cell", "parity-scale-codec", - "parity-wasm 0.42.2", - "rustix 0.35.9", + "parity-wasm 0.45.0", + "rustix 0.35.13", "sc-allocator", "sc-executor-common", "sp-runtime-interface", @@ -6953,26 +7092,27 @@ dependencies = [ [[package]] name = "sc-finality-grandpa" version = "0.10.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ "ahash", + "array-bytes", "async-trait", "dyn-clone", "finality-grandpa", "fork-tree", - "futures 0.3.21", + "futures 0.3.25", "futures-timer", - "hex", "log", "parity-scale-codec", - "parking_lot 0.12.0", - "rand 0.8.4", + "parking_lot 0.12.1", + "rand 0.8.5", "sc-block-builder", "sc-chain-spec", "sc-client-api", "sc-consensus", "sc-keystore", "sc-network", + "sc-network-common", "sc-network-gossip", "sc-telemetry", "sc-utils", @@ -6993,15 +7133,15 @@ dependencies = [ [[package]] name = "sc-informant" version = "0.10.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ "ansi_term", - "futures 0.3.21", + "futures 0.3.25", "futures-timer", "log", "parity-util-mem", "sc-client-api", - "sc-network", + "sc-network-common", "sc-transaction-pool-api", "sp-blockchain", "sp-runtime", @@ -7010,11 +7150,11 @@ dependencies = [ [[package]] name = "sc-keystore" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ + "array-bytes", "async-trait", - "hex", - "parking_lot 0.12.0", + "parking_lot 0.12.1", "serde_json", "sp-application-crypto", "sp-core", @@ -7025,8 +7165,9 @@ dependencies = [ [[package]] name = "sc-network" version = "0.10.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ + "array-bytes", "async-trait", "asynchronous-codec", "bitflags", @@ -7035,27 +7176,23 @@ dependencies = [ "either", "fnv", "fork-tree", - "futures 0.3.21", + "futures 0.3.25", "futures-timer", - "hex", "ip_network", "libp2p", "linked-hash-map", "linked_hash_set", "log", - "lru", + "lru 0.7.8", "parity-scale-codec", - "parking_lot 0.12.0", + "parking_lot 0.12.1", "pin-project", "prost", - "prost-build", "rand 0.7.3", "sc-block-builder", "sc-client-api", "sc-consensus", "sc-network-common", - "sc-network-light", - "sc-network-sync", "sc-peerset", "sc-utils", "serde", @@ -7065,40 +7202,72 @@ dependencies = [ "sp-blockchain", "sp-consensus", "sp-core", - "sp-finality-grandpa", "sp-runtime", "substrate-prometheus-endpoint", "thiserror", "unsigned-varint", - "void", "zeroize", ] +[[package]] +name = "sc-network-bitswap" +version = "0.10.0-dev" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" +dependencies = [ + "cid", + "futures 0.3.25", + "libp2p", + "log", + "prost", + "prost-build", + "sc-client-api", + "sc-network-common", + "sp-blockchain", + "sp-runtime", + "thiserror", + "unsigned-varint", + "void", +] + [[package]] name = "sc-network-common" version = "0.10.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ - "futures 0.3.21", + "async-trait", + "bitflags", + "bytes", + "futures 0.3.25", + "futures-timer", "libp2p", + "linked_hash_set", "parity-scale-codec", "prost-build", + "sc-consensus", "sc-peerset", + "serde", "smallvec", + "sp-blockchain", + "sp-consensus", + "sp-finality-grandpa", + "sp-runtime", + "substrate-prometheus-endpoint", + "thiserror", ] [[package]] name = "sc-network-gossip" version = "0.10.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ "ahash", - "futures 0.3.21", + "futures 0.3.25", "futures-timer", "libp2p", "log", - "lru", - "sc-network", + "lru 0.7.8", + "sc-network-common", + "sc-peerset", "sp-runtime", "substrate-prometheus-endpoint", "tracing", @@ -7107,9 +7276,10 @@ dependencies = [ [[package]] name = "sc-network-light" version = "0.10.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ - "futures 0.3.21", + "array-bytes", + "futures 0.3.25", "libp2p", "log", "parity-scale-codec", @@ -7127,15 +7297,15 @@ dependencies = [ [[package]] name = "sc-network-sync" version = "0.10.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ - "bitflags", - "either", + "array-bytes", "fork-tree", - "futures 0.3.21", + "futures 0.3.25", "libp2p", "log", - "lru", + "lru 0.7.8", + "mockall", "parity-scale-codec", "prost", "prost-build", @@ -7143,6 +7313,7 @@ dependencies = [ "sc-consensus", "sc-network-common", "sc-peerset", + "sc-utils", "smallvec", "sp-arithmetic", "sp-blockchain", @@ -7153,25 +7324,46 @@ dependencies = [ "thiserror", ] +[[package]] +name = "sc-network-transactions" +version = "0.10.0-dev" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" +dependencies = [ + "array-bytes", + "futures 0.3.25", + "hex", + "libp2p", + "log", + "parity-scale-codec", + "pin-project", + "sc-network-common", + "sc-peerset", + "sp-consensus", + "sp-runtime", + "substrate-prometheus-endpoint", +] + [[package]] name = "sc-offchain" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ + "array-bytes", "bytes", "fnv", - "futures 0.3.21", + "futures 0.3.25", "futures-timer", - "hex", "hyper", "hyper-rustls", + "libp2p", "num_cpus", "once_cell", "parity-scale-codec", - "parking_lot 0.12.0", + "parking_lot 0.12.1", "rand 0.7.3", "sc-client-api", - "sc-network", + "sc-network-common", + "sc-peerset", "sc-utils", "sp-api", "sp-core", @@ -7184,9 +7376,9 @@ dependencies = [ [[package]] name = "sc-peerset" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ - "futures 0.3.21", + "futures 0.3.25", "libp2p", "log", "sc-utils", @@ -7197,7 +7389,7 @@ dependencies = [ [[package]] name = "sc-proposer-metrics" version = "0.10.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -7206,14 +7398,14 @@ dependencies = [ [[package]] name = "sc-rpc" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ - "futures 0.3.21", + "futures 0.3.25", "hash-db", - "jsonrpsee 0.14.0", + "jsonrpsee 0.15.1", "log", "parity-scale-codec", - "parking_lot 0.12.0", + "parking_lot 0.12.1", "sc-block-builder", "sc-chain-spec", "sc-client-api", @@ -7236,13 +7428,13 @@ dependencies = [ [[package]] name = "sc-rpc-api" version = "0.10.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ - "futures 0.3.21", - "jsonrpsee 0.14.0", + "futures 0.3.25", + "jsonrpsee 0.15.1", "log", "parity-scale-codec", - "parking_lot 0.12.0", + "parking_lot 0.12.1", "sc-chain-spec", "sc-transaction-pool-api", "scale-info", @@ -7259,32 +7451,51 @@ dependencies = [ [[package]] name = "sc-rpc-server" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ - "futures 0.3.21", - "jsonrpsee 0.14.0", + "futures 0.3.25", + "jsonrpsee 0.15.1", "log", "serde_json", "substrate-prometheus-endpoint", "tokio", ] +[[package]] +name = "sc-rpc-spec-v2" +version = "0.10.0-dev" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" +dependencies = [ + "futures 0.3.25", + "hex", + "jsonrpsee 0.15.1", + "parity-scale-codec", + "sc-chain-spec", + "sc-transaction-pool-api", + "serde", + "sp-api", + "sp-blockchain", + "sp-core", + "sp-runtime", + "thiserror", +] + [[package]] name = "sc-service" version = "0.10.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ "async-trait", "directories", "exit-future", - "futures 0.3.21", + "futures 0.3.25", "futures-timer", "hash-db", - "jsonrpsee 0.14.0", + "jsonrpsee 0.15.1", "log", "parity-scale-codec", "parity-util-mem", - "parking_lot 0.12.0", + "parking_lot 0.12.1", "pin-project", "rand 0.7.3", "sc-block-builder", @@ -7296,10 +7507,15 @@ dependencies = [ "sc-informant", "sc-keystore", "sc-network", + "sc-network-bitswap", "sc-network-common", + "sc-network-light", + "sc-network-sync", + "sc-network-transactions", "sc-offchain", "sc-rpc", "sc-rpc-server", + "sc-rpc-spec-v2", "sc-sysinfo", "sc-telemetry", "sc-tracing", @@ -7326,6 +7542,7 @@ dependencies = [ "sp-transaction-storage-proof", "sp-trie", "sp-version", + "static_init", "substrate-prometheus-endpoint", "tempfile", "thiserror", @@ -7337,13 +7554,13 @@ dependencies = [ [[package]] name = "sc-state-db" version = "0.10.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ "log", "parity-scale-codec", "parity-util-mem", "parity-util-mem-derive", - "parking_lot 0.12.0", + "parking_lot 0.12.1", "sc-client-api", "sp-core", ] @@ -7351,9 +7568,9 @@ dependencies = [ [[package]] name = "sc-sysinfo" version = "6.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ - "futures 0.3.21", + "futures 0.3.25", "libc", "log", "rand 0.7.3", @@ -7370,13 +7587,13 @@ dependencies = [ [[package]] name = "sc-telemetry" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ "chrono", - "futures 0.3.21", + "futures 0.3.25", "libp2p", "log", - "parking_lot 0.12.0", + "parking_lot 0.12.1", "pin-project", "rand 0.7.3", "serde", @@ -7388,7 +7605,7 @@ dependencies = [ [[package]] name = "sc-tracing" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ "ansi_term", "atty", @@ -7397,7 +7614,7 @@ dependencies = [ "libc", "log", "once_cell", - "parking_lot 0.12.0", + "parking_lot 0.12.1", "regex", "rustc-hash", "sc-client-api", @@ -7419,7 +7636,7 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -7430,16 +7647,16 @@ dependencies = [ [[package]] name = "sc-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ - "futures 0.3.21", + "async-trait", + "futures 0.3.25", "futures-timer", "linked-hash-map", "log", "parity-scale-codec", "parity-util-mem", - "parking_lot 0.12.0", - "retain_mut", + "parking_lot 0.12.1", "sc-client-api", "sc-transaction-pool-api", "sc-utils", @@ -7457,9 +7674,10 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ - "futures 0.3.21", + "async-trait", + "futures 0.3.25", "log", "serde", "sp-blockchain", @@ -7470,33 +7688,44 @@ dependencies = [ [[package]] name = "sc-utils" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ - "futures 0.3.21", + "futures 0.3.25", "futures-timer", "lazy_static", "log", - "parking_lot 0.12.0", + "parking_lot 0.12.1", "prometheus", ] [[package]] -name = "scale-decode" +name = "scale-bits" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c70dece385bc3e5918109830d9509806b5d4525fdf594e3463078c529122979e" +checksum = "8dd7aca73785181cc41f0bbe017263e682b585ca660540ba569133901d013ecf" +dependencies = [ + "parity-scale-codec", + "scale-info", + "serde", +] + +[[package]] +name = "scale-decode" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d823d4be477fc33321f93d08fb6c2698273d044f01362dc27573a750deb7c233" dependencies = [ - "bitvec", "parity-scale-codec", + "scale-bits", "scale-info", "thiserror", ] [[package]] name = "scale-info" -version = "2.1.2" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c46be926081c9f4dd5dd9b6f1d3e3229f2360bc6502dd8836f84a93b7c75e99a" +checksum = "001cf62ece89779fd16105b5f515ad0e5cedcd5440d3dd806bb067978e7c3608" dependencies = [ "bitvec", "cfg-if 1.0.0", @@ -7508,9 +7737,9 @@ dependencies = [ [[package]] name = "scale-info-derive" -version = "2.1.2" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50e334bb10a245e28e5fd755cabcafd96cfcd167c99ae63a46924ca8d8703a3c" +checksum = "303959cf613a6f6efd19ed4b4ad5bf79966a13352716299ad532cfb115f4205c" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -7520,14 +7749,14 @@ dependencies = [ [[package]] name = "scale-value" -version = "0.5.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eae8b296b3ebcb3425661e9b612ccc34cb1064483a61dc379c65e6b1463498f1" +checksum = "16a5e7810815bd295da73e4216d1dfbced3c7c7c7054d70fa5f6e4c58123fff4" dependencies = [ - "bitvec", "either", "frame-metadata", "parity-scale-codec", + "scale-bits", "scale-decode", "scale-info", "serde", @@ -7537,12 +7766,12 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.19" +version = "0.1.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f05ba609c234e60bee0d547fe94a4c7e9da733d1c962cf6e59efa4cd9c8bc75" +checksum = "88d6731146462ea25d9244b2ed5fd1d716d25c52e4d54aa4fb0f3c4e9854dbe2" dependencies = [ "lazy_static", - "winapi 0.3.9", + "windows-sys 0.36.1", ] [[package]] @@ -7569,6 +7798,12 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" +[[package]] +name = "scratch" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddccb15bcce173023b3fedd9436f882a0739b8dfb45e4f6b6002bee5929f61b2" + [[package]] name = "sct" version = "0.7.0" @@ -7591,6 +7826,18 @@ dependencies = [ "syn", ] +[[package]] +name = "sealed" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b5e421024b5e5edfbaa8e60ecf90bda9dbffc602dbb230e6028763f85f0c68c" +dependencies = [ + "heck 0.3.3", + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "sec1" version = "0.2.1" @@ -7598,25 +7845,26 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08da66b8b0965a5555b6bd6639e68ccba85e1e2506f5fbb089e93f8a04e1a2d1" dependencies = [ "der", - "generic-array 0.14.4", + "generic-array 0.14.6", + "pkcs8", "subtle", "zeroize", ] [[package]] name = "secp256k1" -version = "0.21.3" +version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c42e6f1735c5f00f51e43e28d6634141f2bcad10931b2609ddd74a86d751260" +checksum = "d9512ffd81e3a3503ed401f79c33168b9148c75038956039166cd750eaa037c3" dependencies = [ "secp256k1-sys", ] [[package]] name = "secp256k1-sys" -version = "0.4.2" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "957da2573cde917463ece3570eab4a0b3f19de6f1646cde62e6fd3868f566036" +checksum = "83080e2c2fc1006e625be82e5d1eb6a43b7fd9578b617fcc55814daf286bba4b" dependencies = [ "cc", ] @@ -7632,9 +7880,9 @@ dependencies = [ [[package]] name = "security-framework" -version = "2.4.2" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "525bc1abfda2e1998d152c45cf13e696f76d0a4972310b22fac1658b05df7c87" +checksum = "2bc1bb97804af6631813c55739f771071e0f2ed33ee20b68c86ec505d906356c" dependencies = [ "bitflags", "core-foundation", @@ -7645,9 +7893,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.4.2" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9dd14d83160b528b7bfd66439110573efcfbe281b17fc2ca9f39f550d619c7e" +checksum = "0160a13a177a45bfb43ce71c01580998474f556ad854dcbca936dd2841a5c556" dependencies = [ "core-foundation-sys", "libc", @@ -7664,9 +7912,9 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.4" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "568a8e6258aa33c13358f81fd834adb854c6f7c9468520910a9b1e8fac068012" +checksum = "58bc9567378fc7690d6b2addae4e60ac2eeea07becb2c64b9f218b53865cba2a" dependencies = [ "serde", ] @@ -7679,18 +7927,18 @@ checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" [[package]] name = "serde" -version = "1.0.139" +version = "1.0.151" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0171ebb889e45aa68b44aee0859b3eede84c6f5f5c228e6f140c0b2a0a46cad6" +checksum = "97fed41fc1a24994d044e6db6935e69511a1153b52c15eb42493b26fa87feba0" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.139" +version = "1.0.151" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc1d3230c1de7932af58ad8ffbe1d784bd55efd5a9d84ac24f69c72d83543dfb" +checksum = "255abe9a125a985c05190d687b320c12f9b1f0b99445e608c21ba0782c719ad8" dependencies = [ "proc-macro2", "quote", @@ -7699,11 +7947,11 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.82" +version = "1.0.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82c2c1fdcd807d1098552c5b9a36e425e42e9fbd7c6a37a8425f390f781f7fa7" +checksum = "877c235533714907a8c2464236f5c4b2a17262ef1bd71f38f35ea592c8da6883" dependencies = [ - "itoa 1.0.1", + "itoa", "ryu", "serde", ] @@ -7724,34 +7972,33 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" dependencies = [ "form_urlencoded", - "itoa 1.0.1", + "itoa", "ryu", "serde", ] [[package]] name = "sha-1" -version = "0.8.2" +version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7d94d0bede923b3cea61f3f1ff57ff8cdfd77b400fb8f9998949e0cf04163df" +checksum = "99cd6713db3cf16b6c84e06321e049a9b9f699826e16096d23bbcc44d15d51a6" dependencies = [ - "block-buffer 0.7.3", - "digest 0.8.1", - "fake-simd", - "opaque-debug 0.2.3", + "block-buffer 0.9.0", + "cfg-if 1.0.0", + "cpufeatures", + "digest 0.9.0", + "opaque-debug 0.3.0", ] [[package]] -name = "sha-1" -version = "0.9.7" +name = "sha1" +version = "0.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a0c8611594e2ab4ebbf06ec7cbbf0a99450b8570e96cbf5188b5d5f6ef18d81" +checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3" dependencies = [ - "block-buffer 0.9.0", "cfg-if 1.0.0", - "cpufeatures 0.1.5", - "digest 0.9.0", - "opaque-debug 0.3.0", + "cpufeatures", + "digest 0.10.6", ] [[package]] @@ -7774,58 +8021,46 @@ checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" dependencies = [ "block-buffer 0.9.0", "cfg-if 1.0.0", - "cpufeatures 0.2.1", + "cpufeatures", "digest 0.9.0", "opaque-debug 0.3.0", ] [[package]] name = "sha2" -version = "0.10.2" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55deaec60f81eefe3cce0dc50bda92d6d8e88f2a27df7c5033b42afeb1ed2676" +checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" dependencies = [ "cfg-if 1.0.0", - "cpufeatures 0.2.1", - "digest 0.10.3", -] - -[[package]] -name = "sha3" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f81199417d4e5de3f04b1e871023acea7389672c4135918f05aa9cbf2f2fa809" -dependencies = [ - "block-buffer 0.9.0", - "digest 0.9.0", - "keccak", - "opaque-debug 0.3.0", + "cpufeatures", + "digest 0.10.6", ] [[package]] name = "sha3" -version = "0.10.1" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "881bf8156c87b6301fc5ca6b27f11eeb2761224c7081e69b409d5a1951a70c86" +checksum = "bdf0c33fae925bdc080598b84bc15c55e7b9a4a43b3c704da051f977469691c9" dependencies = [ - "digest 0.10.3", + "digest 0.10.6", "keccak", ] [[package]] name = "sharded-slab" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "740223c51853f3145fe7c90360d2d4232f2b62e3449489c207eccde818979982" +checksum = "900fba806f70c630b0a382d0d825e17a0f19fcd059a2ade1ff237bcddf446b31" dependencies = [ "lazy_static", ] [[package]] name = "signal-hook" -version = "0.3.9" +version = "0.3.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "470c5a6397076fae0094aaf06a08e6ba6f37acb77d3b1b91ea92b4d6c8650c39" +checksum = "a253b5e89e2698464fc26b545c9edceb338e18a89effeeecfea192c3025be29d" dependencies = [ "libc", "signal-hook-registry", @@ -7842,12 +8077,12 @@ dependencies = [ [[package]] name = "signature" -version = "1.3.1" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c19772be3c4dd2ceaacf03cb41d5885f2a02c4d8804884918e3a258480803335" +checksum = "02658e48d89f2bec991f9a78e69cfa4c316f8d6a6c4ec12fae1aeb263d486788" dependencies = [ "digest 0.9.0", - "rand_core 0.6.3", + "rand_core 0.6.4", ] [[package]] @@ -7864,9 +8099,12 @@ dependencies = [ [[package]] name = "slab" -version = "0.4.4" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c307a32c1c5c437f38c7fd45d753050587732ba8628319fbdf12a7e289ccc590" +checksum = "4614a76b2a8be0058caa9dbbaf66d988527d86d003c11a94fbd335d7661edcef" +dependencies = [ + "autocfg", +] [[package]] name = "slice-group-by" @@ -7876,15 +8114,15 @@ checksum = "03b634d87b960ab1a38c4fe143b508576f075e7c978bfad18217645ebfdfa2ec" [[package]] name = "smallvec" -version = "1.9.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fd0db749597d91ff862fd1d55ea87f7855a744a8425a64695b6fca237d1dad1" +checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" [[package]] name = "snap" -version = "1.0.5" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45456094d1983e2ee2a18fdfebce3189fa451699d0502cb8e3b49dba5ba41451" +checksum = "5e9f0ab6ef7eb7353d9119c170a436d1bf248eea575ac42d19d12f4e34130831" [[package]] name = "snow" @@ -7895,19 +8133,19 @@ dependencies = [ "aes-gcm", "blake2", "chacha20poly1305", - "curve25519-dalek 4.0.0-pre.1", - "rand_core 0.6.3", + "curve25519-dalek 4.0.0-pre.5", + "rand_core 0.6.4", "ring", "rustc_version", - "sha2 0.10.2", + "sha2 0.10.6", "subtle", ] [[package]] name = "socket2" -version = "0.4.4" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66d72b759436ae32898a2af0a14218dbf55efde3feeb170eb623637db85ee1e0" +checksum = "02e2d2db9033d13a1567121ddd7a095ee144db4e1ca1b1bda3419bc0da294ebd" dependencies = [ "libc", "winapi 0.3.9", @@ -7922,17 +8160,17 @@ dependencies = [ "base64", "bytes", "flate2", - "futures 0.3.21", + "futures 0.3.25", "httparse", "log", - "rand 0.8.4", - "sha-1 0.9.7", + "rand 0.8.5", + "sha-1", ] [[package]] name = "sp-api" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ "hash-db", "log", @@ -7942,6 +8180,7 @@ dependencies = [ "sp-runtime", "sp-state-machine", "sp-std", + "sp-trie", "sp-version", "thiserror", ] @@ -7949,7 +8188,7 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ "blake2", "proc-macro-crate", @@ -7961,7 +8200,7 @@ dependencies = [ [[package]] name = "sp-application-crypto" version = "6.0.0" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ "parity-scale-codec", "scale-info", @@ -7974,7 +8213,7 @@ dependencies = [ [[package]] name = "sp-arithmetic" version = "5.0.0" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ "integer-sqrt", "num-traits", @@ -7989,7 +8228,7 @@ dependencies = [ [[package]] name = "sp-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ "parity-scale-codec", "scale-info", @@ -8002,7 +8241,7 @@ dependencies = [ [[package]] name = "sp-authorship" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ "async-trait", "parity-scale-codec", @@ -8014,7 +8253,7 @@ dependencies = [ [[package]] name = "sp-block-builder" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ "parity-scale-codec", "sp-api", @@ -8026,13 +8265,13 @@ dependencies = [ [[package]] name = "sp-blockchain" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ - "futures 0.3.21", + "futures 0.3.25", "log", - "lru", + "lru 0.7.8", "parity-scale-codec", - "parking_lot 0.12.0", + "parking_lot 0.12.1", "sp-api", "sp-consensus", "sp-database", @@ -8044,10 +8283,10 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.10.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ "async-trait", - "futures 0.3.21", + "futures 0.3.25", "futures-timer", "log", "parity-scale-codec", @@ -8063,7 +8302,7 @@ dependencies = [ [[package]] name = "sp-consensus-aura" version = "0.10.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ "async-trait", "parity-scale-codec", @@ -8081,7 +8320,7 @@ dependencies = [ [[package]] name = "sp-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ "async-trait", "merlin", @@ -8104,7 +8343,7 @@ dependencies = [ [[package]] name = "sp-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ "parity-scale-codec", "scale-info", @@ -8118,7 +8357,7 @@ dependencies = [ [[package]] name = "sp-consensus-vrf" version = "0.10.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ "parity-scale-codec", "scale-info", @@ -8131,18 +8370,18 @@ dependencies = [ [[package]] name = "sp-core" version = "6.0.0" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ + "array-bytes", "base58", "bitflags", - "blake2-rfc", + "blake2", "byteorder", "dyn-clonable", - "ed25519-dalek", - "futures 0.3.21", + "ed25519-zebra", + "futures 0.3.25", "hash-db", "hash256-std-hasher", - "hex", "impl-serde", "lazy_static", "libsecp256k1", @@ -8151,7 +8390,7 @@ dependencies = [ "num-traits", "parity-scale-codec", "parity-util-mem", - "parking_lot 0.12.0", + "parking_lot 0.12.1", "primitive-types", "rand 0.7.3", "regex", @@ -8177,13 +8416,13 @@ dependencies = [ [[package]] name = "sp-core-hashing" version = "4.0.0" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ "blake2", "byteorder", - "digest 0.10.3", - "sha2 0.10.2", - "sha3 0.10.1", + "digest 0.10.6", + "sha2 0.10.6", + "sha3", "sp-std", "twox-hash", ] @@ -8191,7 +8430,7 @@ dependencies = [ [[package]] name = "sp-core-hashing-proc-macro" version = "5.0.0" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ "proc-macro2", "quote", @@ -8202,16 +8441,16 @@ dependencies = [ [[package]] name = "sp-database" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ "kvdb", - "parking_lot 0.12.0", + "parking_lot 0.12.1", ] [[package]] name = "sp-debug-derive" version = "4.0.0" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ "proc-macro2", "quote", @@ -8221,7 +8460,7 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.12.0" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ "environmental", "parity-scale-codec", @@ -8232,7 +8471,7 @@ dependencies = [ [[package]] name = "sp-finality-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ "finality-grandpa", "log", @@ -8250,7 +8489,7 @@ dependencies = [ [[package]] name = "sp-inherents" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -8264,14 +8503,15 @@ dependencies = [ [[package]] name = "sp-io" version = "6.0.0" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ - "futures 0.3.21", + "bytes", + "futures 0.3.25", "hash-db", "libsecp256k1", "log", "parity-scale-codec", - "parking_lot 0.12.0", + "parking_lot 0.12.1", "secp256k1", "sp-core", "sp-externalities", @@ -8289,7 +8529,7 @@ dependencies = [ [[package]] name = "sp-keyring" version = "6.0.0" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ "lazy_static", "sp-core", @@ -8300,13 +8540,13 @@ dependencies = [ [[package]] name = "sp-keystore" version = "0.12.0" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ "async-trait", - "futures 0.3.21", + "futures 0.3.25", "merlin", "parity-scale-codec", - "parking_lot 0.12.0", + "parking_lot 0.12.1", "schnorrkel", "serde", "sp-core", @@ -8317,7 +8557,7 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" version = "4.1.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ "thiserror", "zstd", @@ -8338,7 +8578,7 @@ dependencies = [ [[package]] name = "sp-offchain" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ "sp-api", "sp-core", @@ -8348,7 +8588,7 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "4.0.0" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ "backtrace", "lazy_static", @@ -8358,7 +8598,7 @@ dependencies = [ [[package]] name = "sp-rpc" version = "6.0.0" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ "rustc-hash", "serde", @@ -8368,7 +8608,7 @@ dependencies = [ [[package]] name = "sp-runtime" version = "6.0.0" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ "either", "hash256-std-hasher", @@ -8385,13 +8625,15 @@ dependencies = [ "sp-core", "sp-io", "sp-std", + "sp-weights", ] [[package]] name = "sp-runtime-interface" version = "6.0.0" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ + "bytes", "impl-trait-for-tuples", "parity-scale-codec", "primitive-types", @@ -8407,7 +8649,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "5.0.0" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ "Inflector", "proc-macro-crate", @@ -8419,7 +8661,7 @@ dependencies = [ [[package]] name = "sp-sandbox" version = "0.10.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ "log", "parity-scale-codec", @@ -8430,19 +8672,10 @@ dependencies = [ "wasmi", ] -[[package]] -name = "sp-serializer" -version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" -dependencies = [ - "serde", - "serde_json", -] - [[package]] name = "sp-session" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ "parity-scale-codec", "scale-info", @@ -8456,7 +8689,7 @@ dependencies = [ [[package]] name = "sp-staking" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ "parity-scale-codec", "scale-info", @@ -8467,13 +8700,13 @@ dependencies = [ [[package]] name = "sp-state-machine" version = "0.12.0" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ "hash-db", "log", "num-traits", "parity-scale-codec", - "parking_lot 0.12.0", + "parking_lot 0.12.1", "rand 0.7.3", "smallvec", "sp-core", @@ -8489,12 +8722,12 @@ dependencies = [ [[package]] name = "sp-std" version = "4.0.0" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" [[package]] name = "sp-storage" version = "6.0.0" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ "impl-serde", "parity-scale-codec", @@ -8507,7 +8740,7 @@ dependencies = [ [[package]] name = "sp-tasks" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ "log", "sp-core", @@ -8520,7 +8753,7 @@ dependencies = [ [[package]] name = "sp-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ "async-trait", "futures-timer", @@ -8536,7 +8769,7 @@ dependencies = [ [[package]] name = "sp-tracing" version = "5.0.0" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ "parity-scale-codec", "sp-std", @@ -8548,7 +8781,7 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ "sp-api", "sp-runtime", @@ -8557,7 +8790,7 @@ dependencies = [ [[package]] name = "sp-transaction-storage-proof" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ "async-trait", "log", @@ -8573,15 +8806,22 @@ dependencies = [ [[package]] name = "sp-trie" version = "6.0.0" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ + "ahash", "hash-db", + "hashbrown", + "lazy_static", + "lru 0.7.8", "memory-db", + "nohash-hasher", "parity-scale-codec", + "parking_lot 0.12.1", "scale-info", "sp-core", "sp-std", "thiserror", + "tracing", "trie-db", "trie-root", ] @@ -8589,11 +8829,11 @@ dependencies = [ [[package]] name = "sp-version" version = "5.0.0" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ "impl-serde", "parity-scale-codec", - "parity-wasm 0.42.2", + "parity-wasm 0.45.0", "scale-info", "serde", "sp-core-hashing-proc-macro", @@ -8606,7 +8846,7 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ "parity-scale-codec", "proc-macro2", @@ -8617,7 +8857,7 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "6.0.0" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ "impl-trait-for-tuples", "log", @@ -8627,17 +8867,43 @@ dependencies = [ "wasmtime", ] +[[package]] +name = "sp-weights" +version = "4.0.0" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" +dependencies = [ + "impl-trait-for-tuples", + "parity-scale-codec", + "scale-info", + "serde", + "smallvec", + "sp-arithmetic", + "sp-core", + "sp-debug-derive", + "sp-std", +] + [[package]] name = "spin" version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" +[[package]] +name = "spki" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44d01ac02a6ccf3e07db148d2be087da624fea0221a16152ed01f0496a6b0a27" +dependencies = [ + "base64ct", + "der", +] + [[package]] name = "ss58-registry" -version = "1.24.0" +version = "1.36.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b3522333512d68c1a4793f4f1109354a2b56d935b19fee6929d204a120b3673" +checksum = "23d92659e7d18d82b803824a9ba5a6022cff101c3491d027c1c1d8d30e749284" dependencies = [ "Inflector", "num-format", @@ -8660,6 +8926,34 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" +[[package]] +name = "static_init" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a2a1c578e98c1c16fc3b8ec1328f7659a500737d7a0c6d625e73e830ff9c1f6" +dependencies = [ + "bitflags", + "cfg_aliases", + "libc", + "parking_lot 0.11.2", + "parking_lot_core 0.8.6", + "static_init_macro", + "winapi 0.3.9", +] + +[[package]] +name = "static_init_macro" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70a2595fc3aa78f2d0e45dd425b22282dd863273761cc77780914b2cf3003acf" +dependencies = [ + "cfg_aliases", + "memchr", + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "statrs" version = "0.15.0" @@ -8670,7 +8964,7 @@ dependencies = [ "lazy_static", "nalgebra", "num-traits", - "rand 0.8.4", + "rand 0.8.5", ] [[package]] @@ -8681,20 +8975,20 @@ checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" [[package]] name = "strum" -version = "0.23.0" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cae14b91c7d11c9a851d3fbc80a963198998c2a64eec840477fa92d8ce9b70bb" +checksum = "063e6045c0e62079840579a7e47a355ae92f60eb74daaf156fb1e84ba164e63f" dependencies = [ "strum_macros", ] [[package]] name = "strum_macros" -version = "0.23.1" +version = "0.24.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bb0dc7ee9c15cea6199cde9a127fa16a4c5819af85395457ad72d68edc85a38" +checksum = "1e385be0d24f186b4ce2f9982191e7101bb737312ad61c1f2f984f34bcf85d59" dependencies = [ - "heck 0.3.3", + "heck 0.4.0", "proc-macro2", "quote", "rustversion", @@ -8717,19 +9011,19 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" version = "3.0.0" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ - "platforms", + "platforms 2.0.0", ] [[package]] name = "substrate-frame-rpc-system" version = "4.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ "frame-system-rpc-runtime-api", - "futures 0.3.21", - "jsonrpsee 0.14.0", + "futures 0.3.25", + "jsonrpsee 0.15.1", "log", "parity-scale-codec", "sc-client-api", @@ -8746,7 +9040,7 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.10.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ "futures-util", "hyper", @@ -8756,10 +9050,23 @@ dependencies = [ "tokio", ] +[[package]] +name = "substrate-rpc-client" +version = "0.10.0-dev" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" +dependencies = [ + "async-trait", + "jsonrpsee 0.15.1", + "log", + "sc-rpc-api", + "serde", + "sp-runtime", +] + [[package]] name = "substrate-wasm-builder" version = "5.0.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ "ansi_term", "build-helper", @@ -8781,17 +9088,18 @@ checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" [[package]] name = "subxt" -version = "0.23.0" -source = "git+https://github.com/duniter/subxt.git?branch=duniter-substrate-v0.9.26#9ab601b10b4254d64368371f07e09934a0f55bf7" +version = "0.24.0" +source = "git+https://github.com/duniter/subxt.git?branch=duniter-substrate-v0.9.32#c1266b43252514d42febde8d6f66cc3b14be94ef" dependencies = [ "bitvec", "derivative", "frame-metadata", - "futures 0.3.21", + "futures 0.3.25", + "getrandom 0.2.8", "hex", - "jsonrpsee 0.15.1", + "jsonrpsee 0.16.2", "parity-scale-codec", - "parking_lot 0.12.0", + "parking_lot 0.12.1", "scale-decode", "scale-info", "scale-value", @@ -8807,12 +9115,14 @@ dependencies = [ [[package]] name = "subxt-codegen" -version = "0.23.0" -source = "git+https://github.com/duniter/subxt.git?branch=duniter-substrate-v0.9.26#9ab601b10b4254d64368371f07e09934a0f55bf7" +version = "0.24.0" +source = "git+https://github.com/duniter/subxt.git?branch=duniter-substrate-v0.9.32#c1266b43252514d42febde8d6f66cc3b14be94ef" dependencies = [ "darling", "frame-metadata", "heck 0.4.0", + "hex", + "jsonrpsee 0.16.2", "parity-scale-codec", "proc-macro-error", "proc-macro2", @@ -8820,12 +9130,13 @@ dependencies = [ "scale-info", "subxt-metadata", "syn", + "tokio", ] [[package]] name = "subxt-macro" -version = "0.23.0" -source = "git+https://github.com/duniter/subxt.git?branch=duniter-substrate-v0.9.26#9ab601b10b4254d64368371f07e09934a0f55bf7" +version = "0.24.0" +source = "git+https://github.com/duniter/subxt.git?branch=duniter-substrate-v0.9.32#c1266b43252514d42febde8d6f66cc3b14be94ef" dependencies = [ "darling", "proc-macro-error", @@ -8835,8 +9146,8 @@ dependencies = [ [[package]] name = "subxt-metadata" -version = "0.23.0" -source = "git+https://github.com/duniter/subxt.git?branch=duniter-substrate-v0.9.26#9ab601b10b4254d64368371f07e09934a0f55bf7" +version = "0.24.0" +source = "git+https://github.com/duniter/subxt.git?branch=duniter-substrate-v0.9.32#c1266b43252514d42febde8d6f66cc3b14be94ef" dependencies = [ "frame-metadata", "parity-scale-codec", @@ -8846,9 +9157,9 @@ dependencies = [ [[package]] name = "syn" -version = "1.0.99" +version = "1.0.107" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58dbef6ec655055e20b86b15a8cc6d439cca19b667537ac6a1369572d151ab13" +checksum = "1f4064b5b16e03ae50984a5a8ed5d4f8803e6bc1fd170a3cda91a1be4b18e3f5" dependencies = [ "proc-macro2", "quote", @@ -8857,9 +9168,9 @@ dependencies = [ [[package]] name = "synstructure" -version = "0.12.5" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "474aaa926faa1603c40b7885a9eaea29b444d1cb2850cb7c0e37bb1a4182f4fa" +checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" dependencies = [ "proc-macro2", "quote", @@ -8896,7 +9207,7 @@ checksum = "bb8b5a4089fe1723279f06302afda64a5dacaa11a82bcbb4d08759590d4389d9" dependencies = [ "proc-macro2", "quote", - "sealed", + "sealed 0.3.0", "syn", ] @@ -8929,19 +9240,19 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "target-lexicon" -version = "0.12.4" +version = "0.12.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c02424087780c9b71cc96799eaeddff35af2bc513278cda5c99fc1f5d026d3c1" +checksum = "9410d0f6853b1d94f0e519fb95df60f29d2c1eff2d921ffdf01a4c8a3b54f12d" [[package]] name = "tempfile" -version = "3.2.0" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dac1c663cfc93810f88aed9b8941d48cabf856a1b111c29a40439018d870eb22" +checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" dependencies = [ "cfg-if 1.0.0", + "fastrand", "libc", - "rand 0.8.4", "redox_syscall", "remove_dir_all", "winapi 0.3.9", @@ -8965,9 +9276,9 @@ dependencies = [ [[package]] name = "termcolor" -version = "1.1.2" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dfed899f0eb03f32ee8c6a0aabdb8a7949659e3466561fc0adf54e26d88c5f4" +checksum = "bab24d30b911b2376f3a13cc2cd443142f0c81dda04c118693e35b3835757755" dependencies = [ "winapi-util", ] @@ -8982,6 +9293,12 @@ dependencies = [ "winapi 0.3.9", ] +[[package]] +name = "termtree" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95059e91184749cb66be6dc994f67f182b6d897cb3df74a5bf66b5e709295fd8" + [[package]] name = "textwrap" version = "0.12.1" @@ -8993,24 +9310,24 @@ dependencies = [ [[package]] name = "textwrap" -version = "0.15.0" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1141d4d61095b28419e22cb0bbf02755f5e54e0526f97f1e3d1d160e60885fb" +checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d" [[package]] name = "thiserror" -version = "1.0.30" +version = "1.0.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "854babe52e4df1653706b98fcfc05843010039b406875930a70e4d9644e5c417" +checksum = "6a9cd18aa97d5c45c6603caea1da6628790b37f7a34b6ca89522331c5180fed0" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.30" +version = "1.0.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa32fd3f627f367fe16f893e2597ae3c05020f8bba2666a4e6ea73d377e5714b" +checksum = "1fb327af4685e4d03fa8cbcf1716380da910eeb2bb8be417e7f9fd3fb164f36f" dependencies = [ "proc-macro2", "quote", @@ -9025,9 +9342,9 @@ checksum = "3bf63baf9f5039dadc247375c29eb13706706cfde997d0330d05aa63a77d8820" [[package]] name = "thread_local" -version = "1.1.3" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8018d24e04c95ac8790716a5987d0fec4f8b27249ffa0f7d33f1369bdfb88cbd" +checksum = "5516c27b78311c50bf42c071425c560ac799b11c30b31f87e3081965fe5e0180" dependencies = [ "once_cell", ] @@ -9043,9 +9360,9 @@ dependencies = [ [[package]] name = "time" -version = "0.1.44" +version = "0.1.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6db9e6914ab8b1ae1c260a4ae7a49b6c5611b40328a735b21862567685e73255" +checksum = "1b797afad3f312d1c66a56d11d0316f916356d11bd158fbc6ca6389ff6bf805a" dependencies = [ "libc", "wasi 0.10.0+wasi-snapshot-preview1", @@ -9073,9 +9390,9 @@ dependencies = [ [[package]] name = "tinyvec" -version = "1.3.1" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "848a1e1181b9f6753b5e96a092749e29b11d19ede67dfbbd6c7dc7e0f49b5338" +checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" dependencies = [ "tinyvec_macros", ] @@ -9088,30 +9405,29 @@ checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" [[package]] name = "tokio" -version = "1.20.0" +version = "1.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57aec3cfa4c296db7255446efb4928a6be304b431a806216105542a67b6ca82e" +checksum = "eab6d665857cc6ca78d6e80303a02cea7a7851e85dfbd77cbdc09bd129f1ef46" dependencies = [ "autocfg", "bytes", "libc", "memchr", - "mio 0.8.4", + "mio 0.8.5", "num_cpus", - "once_cell", - "parking_lot 0.12.0", - "pin-project-lite 0.2.7", + "parking_lot 0.12.1", + "pin-project-lite 0.2.9", "signal-hook-registry", "socket2", "tokio-macros", - "winapi 0.3.9", + "windows-sys 0.42.0", ] [[package]] name = "tokio-macros" -version = "1.7.0" +version = "1.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b557f72f448c511a979e2564e55d74e6c4432fc96ff4f6241bc6bded342643b7" +checksum = "d266c00fde287f55d3f1c3e96c500c362a2b8c695076ec180f27918820bc6df8" dependencies = [ "proc-macro2", "quote", @@ -9130,9 +9446,9 @@ dependencies = [ [[package]] name = "tokio-rustls" -version = "0.23.2" +version = "0.23.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a27d5f2b839802bd8267fa19b0530f5a08b9c08cd417976be2a65d130fe1c11b" +checksum = "c43ee83903113e03984cb9e5cebe6c04a5116269e900e3ddba8f068a62adda59" dependencies = [ "rustls", "tokio", @@ -9141,75 +9457,62 @@ dependencies = [ [[package]] name = "tokio-stream" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df54d54117d6fdc4e4fea40fe1e4e566b3505700e148a6827e59b34b0d2600d9" -dependencies = [ - "futures-core", - "pin-project-lite 0.2.7", - "tokio", -] - -[[package]] -name = "tokio-util" -version = "0.6.9" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e99e1983e5d376cd8eb4b66604d2e99e79f5bd988c3055891dcd8c9e2604cc0" +checksum = "d660770404473ccd7bc9f8b28494a811bc18542b915c0855c51e8f419d5223ce" dependencies = [ - "bytes", "futures-core", - "futures-sink", - "log", - "pin-project-lite 0.2.7", + "pin-project-lite 0.2.9", "tokio", ] [[package]] name = "tokio-util" -version = "0.7.3" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc463cd8deddc3770d20f9852143d50bf6094e640b485cb2e189a2099085ff45" +checksum = "0bb2e075f03b3d66d8d8785356224ba688d2906a371015e225beeb65ca92c740" dependencies = [ "bytes", "futures-core", "futures-io", "futures-sink", - "pin-project-lite 0.2.7", + "pin-project-lite 0.2.9", "tokio", + "tracing", ] [[package]] name = "toml" -version = "0.5.8" +version = "0.5.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a31142970826733df8241ef35dc040ef98c679ab14d7c3e54d827099b3acecaa" +checksum = "1333c76748e868a4d9d1017b5ab53171dfd095f70c712fdb4653a406547f598f" dependencies = [ "serde", ] [[package]] name = "tower-service" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "360dfd1d6d30e05fda32ace2c8c70e9c0a9da713275777f5a4dbb8a1893930c6" +checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" [[package]] name = "tracing" -version = "0.1.34" +version = "0.1.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d0ecdcb44a79f0fe9844f0c4f33a342cbcbb5117de8001e6ba0dc2351327d09" +checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" dependencies = [ "cfg-if 1.0.0", - "pin-project-lite 0.2.7", + "pin-project-lite 0.2.9", "tracing-attributes", "tracing-core", ] [[package]] name = "tracing-attributes" -version = "0.1.22" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11c75893af559bc8e10716548bdef5cb2b983f8e637db9d0e15126b61b484ee2" +checksum = "4017f8f45139870ca7e672686113917c71c7a6e02d4924eda67186083c03081a" dependencies = [ "proc-macro2", "quote", @@ -9218,11 +9521,11 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.26" +version = "0.1.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f54c8ca710e81886d498c2fd3331b56c93aa248d49de2222ad2742247c60072f" +checksum = "24eb03ba0eab1fd845050058ce5e616558e8f8d8fca633e6b163fe25c797213a" dependencies = [ - "lazy_static", + "once_cell", "valuable", ] @@ -9242,18 +9545,16 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78ddad33d2d10b1ed7eb9d1f518a5674713876e97e5bb9b7345a7984fbb4f922" dependencies = [ - "ahash", "lazy_static", "log", - "lru", "tracing-core", ] [[package]] name = "tracing-serde" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb65ea441fbb84f9f6748fd496cf7f63ec9af5bca94dd86456978d055e8eb28b" +checksum = "bc6b213177105856957181934e4920de57730fc69bf42c37ee5bb664d406d9e1" dependencies = [ "serde", "tracing-core", @@ -9284,12 +9585,12 @@ dependencies = [ [[package]] name = "trie-db" -version = "0.23.1" +version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d32d034c0d3db64b43c31de38e945f15b40cd4ca6d2dcfc26d4798ce8de4ab83" +checksum = "004e1e8f92535694b4cb1444dc5a8073ecf0815e3357f729638b9f8fc4062908" dependencies = [ "hash-db", - "hashbrown 0.12.2", + "hashbrown", "log", "rustc-hex", "smallvec", @@ -9306,9 +9607,9 @@ dependencies = [ [[package]] name = "trust-dns-proto" -version = "0.21.2" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c31f240f59877c3d4bb3b3ea0ec5a6a0cff07323580ff8c7a605cd7d08b255d" +checksum = "4f7f83d1e4a0e4358ac54c5c3681e5d7da5efc5a7a632c90bb6d6669ddd9bc26" dependencies = [ "async-trait", "cfg-if 1.0.0", @@ -9317,33 +9618,33 @@ dependencies = [ "futures-channel", "futures-io", "futures-util", - "idna", + "idna 0.2.3", "ipnet", "lazy_static", - "log", - "rand 0.8.4", + "rand 0.8.5", "smallvec", "thiserror", "tinyvec", + "tracing", "url", ] [[package]] name = "trust-dns-resolver" -version = "0.21.2" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4ba72c2ea84515690c9fcef4c6c660bb9df3036ed1051686de84605b74fd558" +checksum = "aff21aa4dcefb0a1afbfac26deb0adc93888c7d295fb63ab273ef276ba2b7cfe" dependencies = [ "cfg-if 1.0.0", "futures-util", "ipconfig", "lazy_static", - "log", "lru-cache", - "parking_lot 0.12.0", + "parking_lot 0.12.1", "resolv-conf", "smallvec", "thiserror", + "tracing", "trust-dns-proto", ] @@ -9356,10 +9657,10 @@ checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" [[package]] name = "try-runtime-cli" version = "0.10.0-dev" -source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.26#16476332c7c5a6a6478c4072aa3cadb9b7c28c83" +source = "git+https://github.com/duniter/substrate?branch=duniter-substrate-v0.9.32#7f8b8db65b441ce1d1b2ffb26ebde314b54e117c" dependencies = [ - "clap", - "jsonrpsee 0.14.0", + "clap 4.0.30", + "frame-try-runtime", "log", "parity-scale-codec", "remote-externalities", @@ -9375,14 +9676,16 @@ dependencies = [ "sp-runtime", "sp-state-machine", "sp-version", + "sp-weights", + "substrate-rpc-client", "zstd", ] [[package]] name = "tt-call" -version = "1.0.8" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e66dcbec4290c69dd03c57e76c2469ea5c7ce109c6dd4351c13055cf71ea055" +checksum = "f4f195fd851901624eee5a58c4bb2b4f06399148fcd0ed336e6f1cb60a9881df" [[package]] name = "twox-hash" @@ -9390,9 +9693,9 @@ version = "1.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675" dependencies = [ - "cfg-if 1.0.0", - "digest 0.10.3", - "rand 0.8.4", + "cfg-if 0.1.10", + "digest 0.10.6", + "rand 0.7.3", "static_assertions", ] @@ -9409,21 +9712,21 @@ dependencies = [ [[package]] name = "typenum" -version = "1.15.0" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987" +checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" [[package]] name = "ucd-trie" -version = "0.1.3" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56dee185309b50d1f11bfedef0fe6d036842e3fb77413abef29f8f8d1c5d4c1c" +checksum = "9e79c4d996edb816c91e4308506774452e55e95c3c9de07b6729e17e15a5ef81" [[package]] name = "uint" -version = "0.9.1" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6470ab50f482bde894a037a57064480a246dbfdd5960bd65a44824693f08da5f" +checksum = "76f64bba2c53b04fcab63c01a7d7427eadc821e3bc48c34dc9ba29c501164b52" dependencies = [ "byteorder", "crunchy", @@ -9492,42 +9795,42 @@ dependencies = [ [[package]] name = "unicode-bidi" -version = "0.3.6" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "246f4c42e67e7a4e3c6106ff716a5d067d4132a642840b242e357e468a2a0085" +checksum = "099b7128301d285f79ddd55b9a83d5e6b9e97c92e0ea0daebee7263e932de992" [[package]] name = "unicode-ident" -version = "1.0.2" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15c61ba63f9235225a22310255a29b806b907c9b8c964bcbd0a2c70f3f2deea7" +checksum = "84a22b9f218b40614adcb3f4ff08b703773ad44fa9423e4e0d346d5db86e4ebc" [[package]] name = "unicode-normalization" -version = "0.1.19" +version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d54590932941a9e9266f0832deed84ebe1bf2e4c9e4a3554d393d18f5e854bf9" +checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" dependencies = [ "tinyvec", ] [[package]] name = "unicode-segmentation" -version = "1.8.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8895849a949e7845e06bd6dc1aa51731a103c42707010a5b591c0038fb73385b" +checksum = "0fdbf052a0783de01e944a6ce7a8cb939e295b1e7be835a1112c3b9a7f047a5a" [[package]] name = "unicode-width" -version = "0.1.8" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9337591893a19b88d8d87f2cec1e73fad5cdfd10e5a6f349f498ad6ea2ffb1e3" +checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" [[package]] name = "unicode-xid" -version = "0.2.2" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3" +checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" [[package]] name = "universal-hash" @@ -9535,7 +9838,7 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9f214e8f697e925001e66ec2c6e37a4ef93f0f78c2eed7814394e10c62025b05" dependencies = [ - "generic-array 0.14.4", + "generic-array 0.14.6", "subtle", ] @@ -9568,13 +9871,12 @@ checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" [[package]] name = "url" -version = "2.2.2" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a507c383b2d33b5fc35d1861e77e6b383d158b2da5e14fe51b83dfedf6fd578c" +checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643" dependencies = [ "form_urlencoded", - "idna", - "matches", + "idna 0.3.0", "percent-encoding", ] @@ -9618,9 +9920,9 @@ checksum = "1c18c859eead79d8b95d09e4678566e8d70105c4e7b251f707a03df32442661b" [[package]] name = "version_check" -version = "0.9.3" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fecdca9a5291cc2b8dcf7dc02453fee791a280f3743cb0905f8822ae463b3fe" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "void" @@ -9675,9 +9977,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.76" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ce9b1b516211d33767048e5d47fa2a381ed8b76fc48d2ce4aa39877f9f183e0" +checksum = "eaf9f5aceeec8be17c128b2e93e031fb8a4d469bb9c4ae2d7dc1888b26887268" dependencies = [ "cfg-if 1.0.0", "wasm-bindgen-macro", @@ -9685,13 +9987,13 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.76" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfe8dc78e2326ba5f845f4b5bf548401604fa20b1dd1d365fb73b6c1d6364041" +checksum = "4c8ffb332579b0557b52d268b91feab8df3615f265d5270fec2a8c95b17c1142" dependencies = [ "bumpalo", - "lazy_static", "log", + "once_cell", "proc-macro2", "quote", "syn", @@ -9700,9 +10002,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.26" +version = "0.4.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95fded345a6559c2cfee778d562300c581f7d4ff3edb9b0d230d69800d213972" +checksum = "23639446165ca5a5de86ae1d8896b737ae80319560fbaa4c2887b7da6e7ebd7d" dependencies = [ "cfg-if 1.0.0", "js-sys", @@ -9712,9 +10014,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.76" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44468aa53335841d9d6b6c023eaab07c0cd4bddbcfdee3e2bb1e8d2cb8069fef" +checksum = "052be0f94026e6cbc75cdefc9bae13fd6052cdcaf532fa6c45e7ae33a1e6c810" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -9722,9 +10024,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.76" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0195807922713af1e67dc66132c7328206ed9766af3858164fb583eedc25fbad" +checksum = "07bc0c051dc5f23e307b13285f9d75df86bfdf816c5721e573dec1f9b8aa193c" dependencies = [ "proc-macro2", "quote", @@ -9735,9 +10037,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.76" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acdb075a845574a1fa5f09fd77e43f7747599301ea3417a9fbffdeedfc1f4a29" +checksum = "1c38c045535d93ec4f0b4defec448e4291638ee608530863b1e2ba115d4fff7f" [[package]] name = "wasm-gc-api" @@ -9752,11 +10054,11 @@ dependencies = [ [[package]] name = "wasm-instrument" -version = "0.1.1" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "962e5b0401bbb6c887f54e69b8c496ea36f704df65db73e81fd5ff8dc3e63a9f" +checksum = "aa1dafb3e60065305741e83db35c6c2584bb3725b692b5b66148a38d72ace6cd" dependencies = [ - "parity-wasm 0.42.2", + "parity-wasm 0.45.0", ] [[package]] @@ -9765,7 +10067,7 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "be0ecb0db480561e9a7642b5d3e4187c128914e58aa84330b9493e3eb68c5e7f" dependencies = [ - "futures 0.3.21", + "futures 0.3.25", "js-sys", "parking_lot 0.11.2", "pin-utils", @@ -9776,58 +10078,63 @@ dependencies = [ [[package]] name = "wasmi" -version = "0.9.1" +version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca00c5147c319a8ec91ec1a0edbec31e566ce2c9cc93b3f9bb86a9efd0eb795d" +checksum = "06c326c93fbf86419608361a2c925a31754cf109da1b8b55737070b4d6669422" dependencies = [ - "downcast-rs", - "libc", - "libm", - "memory_units", - "num-rational 0.2.4", - "num-traits", - "parity-wasm 0.42.2", + "parity-wasm 0.45.0", "wasmi-validation", + "wasmi_core", ] [[package]] name = "wasmi-validation" -version = "0.4.0" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91ff416ad1ff0c42e5a926ed5d5fab74c0f098749aa0ad8b2a34b982ce0e867b" +dependencies = [ + "parity-wasm 0.45.0", +] + +[[package]] +name = "wasmi_core" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2eb8e860796d8be48efef530b60eebf84e74a88bce107374fffb0da97d504b8" +checksum = "57d20cb3c59b788653d99541c646c561c9dd26506f25c0cebfe810659c54c6d7" dependencies = [ - "parity-wasm 0.42.2", + "downcast-rs", + "libm 0.2.6", + "memory_units", + "num-rational 0.4.1", + "num-traits", ] [[package]] name = "wasmparser" -version = "0.85.0" +version = "0.89.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "570460c58b21e9150d2df0eaaedbb7816c34bcec009ae0dcc976e40ba81463e7" +checksum = "ab5d3e08b13876f96dd55608d03cd4883a0545884932d5adf11925876c96daef" dependencies = [ "indexmap", ] [[package]] name = "wasmtime" -version = "0.38.3" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f50eadf868ab6a04b7b511460233377d0bfbb92e417b2f6a98b98fef2e098f5" +checksum = "4ad5af6ba38311282f2a21670d96e78266e8c8e2f38cbcd52c254df6ccbc7731" dependencies = [ "anyhow", - "backtrace", "bincode", "cfg-if 1.0.0", "indexmap", - "lazy_static", "libc", "log", - "object 0.28.4", + "object 0.29.0", "once_cell", "paste", "psm", "rayon", - "region", "serde", "target-lexicon", "wasmparser", @@ -9836,14 +10143,23 @@ dependencies = [ "wasmtime-environ", "wasmtime-jit", "wasmtime-runtime", - "winapi 0.3.9", + "windows-sys 0.36.1", +] + +[[package]] +name = "wasmtime-asm-macros" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45de63ddfc8b9223d1adc8f7b2ee5f35d1f6d112833934ad7ea66e4f4339e597" +dependencies = [ + "cfg-if 1.0.0", ] [[package]] name = "wasmtime-cache" -version = "0.38.3" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1df23c642e1376892f3b72f311596976979cbf8b85469680cdd3a8a063d12a2" +checksum = "bcd849399d17d2270141cfe47fa0d91ee52d5f8ea9b98cf7ddde0d53e5f79882" dependencies = [ "anyhow", "base64", @@ -9851,19 +10167,19 @@ dependencies = [ "directories-next", "file-per-thread-logger", "log", - "rustix 0.33.7", + "rustix 0.35.13", "serde", "sha2 0.9.9", "toml", - "winapi 0.3.9", + "windows-sys 0.36.1", "zstd", ] [[package]] name = "wasmtime-cranelift" -version = "0.38.3" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f264ff6b4df247d15584f2f53d009fbc90032cfdc2605b52b961bffc71b6eccd" +checksum = "4bd91339b742ff20bfed4532a27b73c86b5bcbfedd6bea2dcdf2d64471e1b5c6" dependencies = [ "anyhow", "cranelift-codegen", @@ -9871,10 +10187,9 @@ dependencies = [ "cranelift-frontend", "cranelift-native", "cranelift-wasm", - "gimli", + "gimli 0.26.2", "log", - "more-asserts", - "object 0.28.4", + "object 0.29.0", "target-lexicon", "thiserror", "wasmparser", @@ -9883,17 +10198,16 @@ dependencies = [ [[package]] name = "wasmtime-environ" -version = "0.38.3" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "839d2820e4b830f4b9e7aa08d4c0acabf4a5036105d639f6dfa1c6891c73bdc6" +checksum = "ebb881c61f4f627b5d45c54e629724974f8a8890d455bcbe634330cc27309644" dependencies = [ "anyhow", "cranelift-entity", - "gimli", + "gimli 0.26.2", "indexmap", "log", - "more-asserts", - "object 0.28.4", + "object 0.29.0", "serde", "target-lexicon", "thiserror", @@ -9903,49 +10217,47 @@ dependencies = [ [[package]] name = "wasmtime-jit" -version = "0.38.3" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef0a0bcbfa18b946d890078ba0e1bc76bcc53eccfb40806c0020ec29dcd1bd49" +checksum = "1985c628011fe26adf5e23a5301bdc79b245e0e338f14bb58b39e4e25e4d8681" dependencies = [ - "addr2line", + "addr2line 0.17.0", "anyhow", "bincode", "cfg-if 1.0.0", "cpp_demangle", - "gimli", + "gimli 0.26.2", "log", - "object 0.28.4", - "region", + "object 0.29.0", "rustc-demangle", - "rustix 0.33.7", + "rustix 0.35.13", "serde", "target-lexicon", "thiserror", "wasmtime-environ", "wasmtime-jit-debug", "wasmtime-runtime", - "winapi 0.3.9", + "windows-sys 0.36.1", ] [[package]] name = "wasmtime-jit-debug" -version = "0.38.3" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f4779d976206c458edd643d1ac622b6c37e4a0800a8b1d25dfbf245ac2f2cac" +checksum = "f671b588486f5ccec8c5a3dba6b4c07eac2e66ab8c60e6f4e53717c77f709731" dependencies = [ - "lazy_static", - "object 0.28.4", - "rustix 0.33.7", + "object 0.29.0", + "once_cell", + "rustix 0.35.13", ] [[package]] name = "wasmtime-runtime" -version = "0.38.3" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7eb6ffa169eb5dcd18ac9473c817358cd57bc62c244622210566d473397954a" +checksum = "ee8f92ad4b61736339c29361da85769ebc200f184361959d1792832e592a1afd" dependencies = [ "anyhow", - "backtrace", "cc", "cfg-if 1.0.0", "indexmap", @@ -9953,22 +10265,22 @@ dependencies = [ "log", "mach", "memfd", - "memoffset", - "more-asserts", - "rand 0.8.4", - "region", - "rustix 0.33.7", + "memoffset 0.6.5", + "paste", + "rand 0.8.5", + "rustix 0.35.13", "thiserror", + "wasmtime-asm-macros", "wasmtime-environ", "wasmtime-jit-debug", - "winapi 0.3.9", + "windows-sys 0.36.1", ] [[package]] name = "wasmtime-types" -version = "0.38.3" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d932b0ac5336f7308d869703dd225610a6a3aeaa8e968c52b43eed96cefb1c2" +checksum = "d23d61cb4c46e837b431196dd06abb11731541021916d03476a178b54dc07aeb" dependencies = [ "cranelift-entity", "serde", @@ -9978,9 +10290,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.53" +version = "0.3.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "224b2f6b67919060055ef1a67807367c2066ed520c3862cc013d26cf893a783c" +checksum = "bcda906d8be16e728fd5adc5b729afad4e444e106ab28cd1c7256e54fa61510f" dependencies = [ "js-sys", "wasm-bindgen", @@ -9998,9 +10310,9 @@ dependencies = [ [[package]] name = "webpki-roots" -version = "0.22.2" +version = "0.22.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "552ceb903e957524388c4d3475725ff2c8b7960922063af6ce53c9a43da07449" +checksum = "b6c71e40d7d2c34a5106301fb632274ca37242cd0c9d3e64dbece371a40a2d87" dependencies = [ "webpki", ] @@ -10016,13 +10328,13 @@ dependencies = [ [[package]] name = "which" -version = "4.2.2" +version = "4.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea187a8ef279bc014ec368c27a920da2024d2a711109bfbe3440585d5cf27ad9" +checksum = "1c831fbbee9e129a8cf93e7747a82da9d95ba8e16621cae60ec2cdc849bacb7b" dependencies = [ "either", - "lazy_static", "libc", + "once_cell", ] [[package]] @@ -10100,6 +10412,27 @@ dependencies = [ "windows_x86_64_msvc 0.36.1", ] +[[package]] +name = "windows-sys" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc 0.42.0", + "windows_i686_gnu 0.42.0", + "windows_i686_msvc 0.42.0", + "windows_x86_64_gnu 0.42.0", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc 0.42.0", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41d2aa71f6f0cbe00ae5167d90ef3cfe66527d6f613ca78ac8024c3ccab9a19e" + [[package]] name = "windows_aarch64_msvc" version = "0.34.0" @@ -10112,6 +10445,12 @@ version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" +[[package]] +name = "windows_aarch64_msvc" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd0f252f5a35cac83d6311b2e795981f5ee6e67eb1f9a7f64eb4500fbc4dcdb4" + [[package]] name = "windows_i686_gnu" version = "0.34.0" @@ -10124,6 +10463,12 @@ version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" +[[package]] +name = "windows_i686_gnu" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbeae19f6716841636c28d695375df17562ca208b2b7d0dc47635a50ae6c5de7" + [[package]] name = "windows_i686_msvc" version = "0.34.0" @@ -10136,6 +10481,12 @@ version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" +[[package]] +name = "windows_i686_msvc" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "84c12f65daa39dd2babe6e442988fc329d6243fdce47d7d2d155b8d874862246" + [[package]] name = "windows_x86_64_gnu" version = "0.34.0" @@ -10148,6 +10499,18 @@ version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" +[[package]] +name = "windows_x86_64_gnu" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf7b1b21b5362cbc318f686150e5bcea75ecedc74dd157d874d754a2ca44b0ed" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09d525d2ba30eeb3297665bd434a54297e4170c7f1a44cad4ef58095b4cd2028" + [[package]] name = "windows_x86_64_msvc" version = "0.34.0" @@ -10161,13 +10524,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" [[package]] -name = "winreg" -version = "0.7.0" +name = "windows_x86_64_msvc" +version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0120db82e8a1e0b9fb3345a539c478767c0048d842860994d96113d5b667bd69" -dependencies = [ - "winapi 0.3.9", -] +checksum = "f40009d85759725a34da6d89a94e63d7bdc50a862acf0dbc7c8e488f1edcb6f5" [[package]] name = "winreg" @@ -10190,9 +10550,9 @@ dependencies = [ [[package]] name = "wyz" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30b31594f29d27036c383b53b59ed3476874d518f0efb151b27a4c275141390e" +checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" dependencies = [ "tap", ] @@ -10213,11 +10573,11 @@ name = "xtask" version = "0.1.0" dependencies = [ "anyhow", - "clap", + "clap 4.0.30", "frame-metadata", "graphql_client", "hex", - "memmap2 0.5.0", + "memmap2", "parity-scale-codec", "placeholder", "reqwest", @@ -10233,15 +10593,15 @@ dependencies = [ [[package]] name = "yamux" -version = "0.10.1" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c0608f53c1dc0bad505d03a34bbd49fbf2ad7b51eb036123e896365532745a1" +checksum = "e5d9ba232399af1783a58d8eb26f6b5006fbefe2dc9ef36bd283324792d03ea5" dependencies = [ - "futures 0.3.21", + "futures 0.3.25", "log", "nohash-hasher", - "parking_lot 0.12.0", - "rand 0.8.4", + "parking_lot 0.12.1", + "rand 0.8.5", "static_assertions", ] @@ -10253,18 +10613,18 @@ checksum = "5fc77f52dc9e9b10d55d3f4462c3b7fc393c4f17975d641542833ab2d3bc26ef" [[package]] name = "zeroize" -version = "1.4.3" +version = "1.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d68d9dcec5f9b43a30d38c49f91dfedfaac384cb8f085faca366c26207dd1619" +checksum = "c394b5bd0c6f669e7275d9c20aa90ae064cb22e75a1cad54e1b34088034b149f" dependencies = [ "zeroize_derive", ] [[package]] name = "zeroize_derive" -version = "1.1.0" +version = "1.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2c1e130bebaeab2f23886bf9acbaca14b092408c452543c857f66399cd6dab1" +checksum = "44bf07cb3e50ea2003396695d58bf46bc9887a1f362260446fad6bc4e79bd36c" dependencies = [ "proc-macro2", "quote", @@ -10293,9 +10653,9 @@ dependencies = [ [[package]] name = "zstd-sys" -version = "2.0.1+zstd.1.5.2" +version = "2.0.4+zstd.1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fd07cbbc53846d9145dbffdf6dd09a7a0aa52be46741825f5c97bdd4f73f12b" +checksum = "4fa202f2ef00074143e219d15b62ffc317d17cc33909feac471c044087cad7b0" dependencies = [ "cc", "libc", diff --git a/Cargo.toml b/Cargo.toml index 16e11ef4537fe2323835a5ff30f6225e77070f4e..7033f0bdcc883096e80a8b4a426006514764f18e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -29,27 +29,28 @@ runtime-benchmarks = [ 'gdev-runtime/runtime-benchmarks', #'gtest-runtime', #'gtest-runtime/runtime-benchmarks', + 'sc-client-db/runtime-benchmarks', ] try-runtime = [ - "g1-runtime/try-runtime", + #"g1-runtime/try-runtime", "gdev-runtime/try-runtime", - "gtest-runtime/try-runtime", + #"gtest-runtime/try-runtime", "try-runtime-cli" ] [build-dependencies] -clap = { version = "3.0" } -#clap_complete = { version = "3.0" } -substrate-build-script-utils = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26' } +clap = { version = "4.0" } +#clap_complete = { version = "4.0" } +substrate-build-script-utils = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32' } [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.26", default-features = false, features = ["wasmtime"] } -sc-service = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.26", default-features = false, features = ["wasmtime"] } -sp-trie = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.26", features = ["memory-tracker"] } +sc-cli = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.32", default-features = false, features = ["wasmtime"] } +sc-service = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.32", default-features = false, features = ["wasmtime"] } +sp-trie = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.32", features = ["memory-tracker"] } [dependencies] @@ -59,67 +60,71 @@ 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-membership = { path = 'primitives/membership' } # crates.io dependencies async-io = "1.3" -clap = { version = "3.0", features = ["derive"] } -clap_complete = { version = "3" } +clap = { version = "4.0", features = ["derive"] } +clap_complete = { version = "4" } futures = { version = "0.3.1", features = ["compat"] } hex = "0.4.3" -jsonrpsee = { version = "0.14.0", features = ["server"] } +jsonrpsee = { version = "0.15.1", features = ["server"] } lazy_static = "1.4.0" log = "0.4" maplit = '1.0.2' memmap2 = "0.5.0" serde = "1.0" serde_json = "1.0.64" -tracing-core = "=0.1.26" +tracing-core = "0.1.28" # substrate dependencies -frame-benchmarking = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.26" } -frame-benchmarking-cli = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.26" } -pallet-grandpa = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.26" } -pallet-transaction-payment-rpc = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.26" } -pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.26" } -sc-basic-authorship = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.26" } -sc-chain-spec = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.26" } -sc-cli = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.26", default-features = false } -sc-client-api = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.26" } -sc-consensus = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.26" } -babe = { package = "sc-consensus-babe", git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.26" } -manual-seal = { package = "sc-consensus-manual-seal", git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.26" } -sc-consensus-uncles = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.26" } -sc-executor = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.26" } -sc-finality-grandpa = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.26" } -sc-keystore = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.26" } -sc-network = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.26" } -sc-rpc-api = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.26" } -sc-service = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.26", default-features = false } -sc-telemetry = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.26" } -sc-transaction-pool = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.26" } -sc-transaction-pool-api = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.26" } -sp-api = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.26" } -sp-authority-discovery = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.26" } -sp-block-builder = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.26" } -sp-blockchain = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.26" } -sp-consensus = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.26" } -sp-consensus-babe = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.26" } -sp-core = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.26" } -sp-finality-grandpa = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.26" } -sp-inherents = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.26" } -sp-io = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.26" } -sp-offchain = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.26" } -sp-keyring = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.26" } -sp-keystore = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.26" } -sp-runtime = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.26" } -sp-session = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.26" } -sp-storage = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.26" } -sp-timestamp = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.26" } -sp-transaction-pool = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.26" } -sp-trie = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.26" } -substrate-frame-rpc-system = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.26" } -try-runtime-cli = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.26", optional = true } +frame-benchmarking = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.32" } +frame-benchmarking-cli = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.32" } +frame-system = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.32", default-features = false } +pallet-grandpa = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.32" } +pallet-transaction-payment = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.32", default-features = false } +pallet-transaction-payment-rpc = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.32" } +pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.32" } +sc-basic-authorship = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.32" } +sc-chain-spec = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.32" } +sc-cli = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.32", default-features = false } +sc-client-api = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.32" } +sc-consensus = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.32" } +babe = { package = "sc-consensus-babe", git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.32" } +manual-seal = { package = "sc-consensus-manual-seal", git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.32" } +sc-client-db = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.32", default-features = false } +sc-consensus-uncles = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.32" } +sc-executor = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.32" } +sc-finality-grandpa = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.32" } +sc-keystore = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.32" } +sc-network = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.32" } +sc-rpc-api = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.32" } +sc-service = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.32", default-features = false } +sc-telemetry = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.32" } +sc-transaction-pool = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.32" } +sc-transaction-pool-api = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.32" } +sp-api = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.32" } +sp-authority-discovery = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.32" } +sp-block-builder = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.32" } +sp-blockchain = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.32" } +sp-consensus = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.32" } +sp-consensus-babe = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.32" } +sp-core = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.32" } +sp-finality-grandpa = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.32" } +sp-inherents = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.32" } +sp-io = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.32" } +sp-offchain = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.32" } +sp-keyring = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.32" } +sp-keystore = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.32" } +sp-runtime = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.32" } +sp-session = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.32" } +sp-storage = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.32" } +sp-timestamp = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.32" } +sp-transaction-pool = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.32" } +sp-trie = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.32" } +substrate-frame-rpc-system = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.32" } +try-runtime-cli = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.32", optional = true } [workspace] resolver = "2" @@ -204,6 +209,74 @@ zeroize = { opt-level = 3 } panic = "unwind" [patch.crates-io] -# rw-stream-sink has not been updated for 2 years and uses a too old version of pin-project (v0.4.28) -# For the project to compile, we have to patch this dependency to force the use of pin-project v1.x -#rw-stream-sink = { git = "https://github.com/librelois/rw-stream-sink", branch = "master" } + +#[patch."https://github.com/duniter/substrate"] +#fork-tree = { path = "../substrate/utils/fork-tree" } +#frame-support = { path = "../substrate/frame/support" } +#frame-support-procedural = { path = "../substrate/frame/support/procedural" } +#frame-support-procedural-tools = { path = "../substrate/frame/support/procedural/tools" } +#frame-system = { path = "../substrate/frame/system" } +#frame-benchmarking = { path = "../substrate/frame/benchmarking" } +#frame-benchmarking-cli = { path = "../substrate/utils/frame/benchmarking-cli" } +#sc-basic-authorship = { path = "../substrate/client/basic-authorship" } +#sc-block-builder = { path = "../substrate/client/block-builder" } +#sc-chain-spec = { path = "../substrate/client/chain-spec" } +#sc-cli = { path = "../substrate/client/cli" } +#sc-client-api = { path = "../substrate/client/api" } +#sc-client-db = { path = "../substrate/client/db" } +#sc-consensus = { path = "../substrate/client/consensus/common" } +#sc-consensus-aura = { path = "../substrate/client/consensus/aura" } +#sc-consensus-babe = { path = "../substrate/client/consensus/babe" } +#sc-consensus-manual-seal = { path = "../substrate/client/consensus/manual-seal" } +#sc-consensus-slots = { path = "../substrate/client/consensus/slots" } +#sc-consensus-uncles = { path = "../substrate/client/consensus/uncles" } +#sc-executor = { path = "../substrate/client/executor" } +#sc-executor-common = { path = "../substrate/client/executor/common" } +#sc-executor-wasmi = { path = "../substrate/client/executor/wasmi" } +#sc-executor-wasmtime = { path = "../substrate/client/executor/wasmtime" } +#sc-finality-grandpa = { path = "../substrate/client/finality-grandpa" } +#sc-keystore = { path = "../substrate/client/keystore" } +#sc-network = { path = "../substrate/client/network" } +#sc-rpc-api = { path = "../substrate/client/rpc-api" } +#sc-service = { path = "../substrate/client/service" } +#sc-telemetry = { path = "../substrate/client/telemetry" } +#sc-transaction-pool = { path = "../substrate/client/transaction-pool" } +#sc-transaction-pool-api = { path = "../substrate/client/transaction-pool/api" } +#sp-api = { path = "../substrate/primitives/api" } +#sp-application-crypto = { path = "../substrate/primitives/application-crypto" } +#sp-arithmetic = { path = "../substrate/primitives/arithmetic" } +#sp-authority-discovery = { path = "../substrate/primitives/authority-discovery" } +#sp-authorship = { path = "../substrate/primitives/authorship" } +#sp-block-builder = { path = "../substrate/primitives/block-builder" } +#sp-blockchain = { path = "../substrate/primitives/blockchain" } +#sp-consensus = { path = "../substrate/primitives/consensus/common" } +#sp-consensus-babe = { path = "../substrate/primitives/consensus/babe" } +#sp-consensus-slots = { path = "../substrate/primitives/consensus/slots" } +#sp-consensus-vrf = { path = "../substrate/primitives/consensus/vrf" } +#sp-core = { path = "../substrate/primitives/core" } +#sp-core-hashing = { path = "../substrate/primitives/core/hashing" } +#sp-core-hashing-proc-macro = { path = "../substrate/primitives/core/hashing/proc-macro" } +#sp-debug-derive = { path = "../substrate/primitives/debug-derive" } +#sp-externalities = { path = "../substrate/primitives/externalities" } +#sp-finality-grandpa = { path = "../substrate/primitives/finality-grandpa" } +#sp-inherents = { path = "../substrate/primitives/inherents" } +#sp-io = { path = "../substrate/primitives/io" } +#sp-keyring = { path = "../substrate/primitives/keyring" } +#sp-keystore = { path = "../substrate/primitives/keystore" } +#sp-maybe-compressed-blob = { path = "../substrate/primitives/maybe-compressed-blob" } +#sp-offchain = { path = "../substrate/primitives/offchain" } +#sp-panic-handler = { path = "../substrate/primitives/panic-handler" } +#sp-rpc = { path = "../substrate/primitives/rpc" } +#sp-runtime = { path = "../substrate/primitives/runtime" } +#sp-session = { path = "../substrate/primitives/session" } +#sp-staking = { path = "../substrate/primitives/staking" } +#sp-state-machine = { path = "../substrate/primitives/state-machine" } +#sp-std = { path = "../substrate/primitives/std" } +#sp-storage = { path = "../substrate/primitives/storage" } +#sp-timestamp = { path = "../substrate/primitives/timestamp" } +#sp-tracing = { path = "../substrate/primitives/tracing" } +#sp-transaction-pool = { path = "../substrate/primitives/transaction-pool" } +#sp-trie = { path = "../substrate/primitives/trie" } +#sp-version = { path = "../substrate/primitives/version" } +#sp-weights = { path = "../substrate/primitives/weights" } +#substrate-prometheus-endpoint = { path = "../substrate/utils/prometheus" } diff --git a/README.md b/README.md index a084562f7bbaa1fa01a27cf4db660b195f604080..a175e327491f60342cd2386d43b6ab4ae204d9e7 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,7 @@ - [setup](./docs/dev/setup.md) - [verify-runtime-code](./docs/dev/verify-runtime-code.md) - [weights-benchmarking](./docs/dev/weights-benchmarking.md) + - [upgrade-substrate](./docs/dev/upgrade-substrate.md) - [test](./docs/test/) - [replay-block](./docs/test/replay-block.md) - [user](./docs/user/) @@ -278,3 +279,21 @@ A FRAME pallet is compromised of a number of blockchain primitives: - Errors: When a dispatchable fails, it returns an error. - Config: The `Config` configuration interface is used to define the types and parameters upon which a FRAME pallet depends. + +## License + +CopyLeft 2021-2023 Axiom-Team + +Some parts borrowed from Polkadot (Parity Technologies (UK) Ltd.) + +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/>. diff --git a/docs/dev/upgrade-substrate.md b/docs/dev/upgrade-substrate.md new file mode 100644 index 0000000000000000000000000000000000000000..2f98d776bbaec0dd67b6d3c1a9040f8ba44b11f1 --- /dev/null +++ b/docs/dev/upgrade-substrate.md @@ -0,0 +1,29 @@ +# Upgrade Substrate + +We need to keep up to date with Substrate. Here is an empirical guide. + +Let's say for the example that we want to upgrade from `v0.9.26` to `v0.9.32`. + +## Upgrade Substrate fork + +TBD (only Élois has done this for now) + +## Upgrade Subxt fork + +1. Checkout the currently used branch in [our Subxt fork](https://github.com/duniter/subxt), e.g. `duniter-substrate-v0.9.26` +2. Create a new branch `duniter-substrate-v0.9.32` +3. Fetch the [upstream repository](https://github.com/paritytech/subxt) +4. Rebase on an upstream stable branch matching the wanted version + +## Upgrade Duniter + +1. Replace `duniter-substrate-v0.9.26` with `duniter-substrate-v0.9.32` in `Cargo.toml` +2. Update the `rust-toolchain` file according to [Polkadot release notes](https://github.com/paritytech/polkadot/releases) + * Tip: To save storage space on your machine, do `rm target -r` after changing the rust toolchain version and before re-building the project with the new version. +3. While needed, iterate `cargo check`, `cargo update` and upgrading dependencies to match substrate's dependencies +4. Fix errors in Duniter code + * You may need to check how Polkadot is doing by searching in [their repo](https://github.com/paritytech/polkadot). Luckily, the project structure and Substrate patterns are close enough to ours. + * Some errors may happen due to two semver-incompatible versions of a same crate being used. To check this, use `cargo tree -i <crate>`. Update the dependency accordingly, then do `cargo update`. +5. As always, don't forget to `clippy` once you're done with the errors. +6. Test benchmarking: + `cargo run --features runtime-benchmarks -- benchmark overhead --chain=dev --execution=wasm --wasm-execution=interpreted-i-know-what-i-do --weight-path=. --warmup=10 --repeat=100` \ No newline at end of file diff --git a/end2end-tests/Cargo.toml b/end2end-tests/Cargo.toml index 03a09ea47eb45b1a3877b2a7e9f835a83e8615c5..07df18c1aa1878428fd2c5c9b1b655df405ea810 100644 --- a/end2end-tests/Cargo.toml +++ b/end2end-tests/Cargo.toml @@ -11,7 +11,7 @@ version = '3.0.0' [dev-dependencies] anyhow = "1.0" async-trait = "0.1" -clap = { version = "3.0", features = ["derive"] } +clap = { version = "3.2.23", features = ["derive"] } ctrlc = "3.2.2" cucumber = "0.11" env_logger = "0.9.0" @@ -20,8 +20,8 @@ notify = "4.0" parity-scale-codec = "3.1.5" portpicker = "0.1.1" serde_json = "1.0.64" -sp-keyring = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.26" } -subxt = { git = 'https://github.com/duniter/subxt.git', branch = 'duniter-substrate-v0.9.26' } +sp-keyring = { git = "https://github.com/duniter/substrate", branch = "duniter-substrate-v0.9.32" } +subxt = { git = 'https://github.com/duniter/subxt.git', branch = 'duniter-substrate-v0.9.32' } tokio = { version = "1.15.0", features = ["macros"] } [[test]] diff --git a/end2end-tests/tests/common/identity.rs b/end2end-tests/tests/common/identity.rs index bbe892d15891e4c21aace9f7d3f9dbc6f2789b2f..0f21cb5aa9896bee21f61ef521877b9fbb50a7e1 100644 --- a/end2end-tests/tests/common/identity.rs +++ b/end2end-tests/tests/common/identity.rs @@ -85,7 +85,7 @@ pub async fn get_identity_value(world: &mut DuniterWorld, account: String) -> Re .unwrap(); let identity_value = world - .read(&gdev::storage().identity().identities(&identity_index)) + .read(&gdev::storage().identity().identities(identity_index)) .await? .ok_or_else(|| { anyhow::anyhow!( diff --git a/end2end-tests/tests/common/mod.rs b/end2end-tests/tests/common/mod.rs index 736c7ad35829a9fc7f59a4837e1ca6a104fd20a0..c1fd35076c0aa45fe5328cb1ebb436f7ea5f8d60 100644 --- a/end2end-tests/tests/common/mod.rs +++ b/end2end-tests/tests/common/mod.rs @@ -33,13 +33,13 @@ use std::path::PathBuf; use std::process::Command; use std::str::FromStr; use subxt::ext::{sp_core, sp_runtime}; -use subxt::rpc::{rpc_params, ClientT, SubscriptionClientT}; +use subxt::rpc::rpc_params; use subxt::tx::BaseExtrinsicParamsBuilder; pub type Client = subxt::OnlineClient<GdevConfig>; pub type Event = gdev::Event; pub type Result<T> = std::result::Result<T, Box<dyn std::error::Error>>; -pub type SignedSubmittableExtrinsic = subxt::tx::SignedSubmittableExtrinsic<GdevConfig, Client>; +pub type SubmittableExtrinsic = subxt::tx::SubmittableExtrinsic<GdevConfig, Client>; pub type TxProgress = subxt::tx::TxProgress<GdevConfig, Client>; pub enum GdevConfig {} @@ -52,7 +52,6 @@ impl subxt::config::Config for GdevConfig { type Address = sp_runtime::MultiAddress<Self::AccountId, u32>; type Header = sp_runtime::generic::Header<Self::BlockNumber, sp_runtime::traits::BlakeTwo256>; type Signature = sp_runtime::MultiSignature; - type Extrinsic = sp_runtime::OpaqueExtrinsic; type ExtrinsicParams = subxt::tx::BaseExtrinsicParams<Self, Tip>; } @@ -122,7 +121,6 @@ pub async fn create_empty_block(client: &Client) -> Result<()> { // Create an empty block let _: Value = client .rpc() - .client .request("engine_createBlock", rpc_params![true, false, Value::Null]) .await?; @@ -131,8 +129,8 @@ pub async fn create_empty_block(client: &Client) -> Result<()> { pub async fn create_block_with_extrinsic( client: &Client, - extrinsic: SignedSubmittableExtrinsic, -) -> Result<subxt::tx::TxEvents<GdevConfig>> { + extrinsic: SubmittableExtrinsic, +) -> Result<subxt::blocks::ExtrinsicEvents<GdevConfig>> { //println!("extrinsic encoded: {}", hex::encode(extrinsic.encoded())); let watcher = extrinsic.submit_and_watch().await?; @@ -140,7 +138,6 @@ pub async fn create_block_with_extrinsic( // Create a non-empty block let _: Value = client .rpc() - .client .request("engine_createBlock", rpc_params![false, false, Value::Null]) .await?; @@ -223,14 +220,14 @@ fn wait_until_log_line(expected_log_line: &str, log_file_path: &str, timeout: st let mut watcher = notify::watcher(tx, std::time::Duration::from_millis(100)).unwrap(); use notify::Watcher as _; watcher - .watch(&log_file_path, notify::RecursiveMode::NonRecursive) + .watch(log_file_path, notify::RecursiveMode::NonRecursive) .unwrap(); let mut pos = 0; loop { match rx.recv_timeout(timeout) { Ok(notify::DebouncedEvent::Write(_)) => { - let mut file = std::fs::File::open(&log_file_path).unwrap(); + let mut file = std::fs::File::open(log_file_path).unwrap(); file.seek(std::io::SeekFrom::Start(pos)).unwrap(); pos = file.metadata().unwrap().len(); let reader = std::io::BufReader::new(file); diff --git a/end2end-tests/tests/cucumber_tests.rs b/end2end-tests/tests/cucumber_tests.rs index 5bd43d5573dccd83c53e06aec0398ac34ca952e2..50ba89a5843071b4fe1013df2eefa66c3a6420a2 100644 --- a/end2end-tests/tests/cucumber_tests.rs +++ b/end2end-tests/tests/cucumber_tests.rs @@ -412,7 +412,7 @@ async fn should_be_certified_by( .unwrap(); let issuers = world - .read_or_default(&gdev::storage().cert().certs_by_receiver(&receiver_index)) + .read_or_default(&gdev::storage().cert().certs_by_receiver(receiver_index)) .await?; // look for certification by issuer/receiver pair diff --git a/live-tests/Cargo.toml b/live-tests/Cargo.toml index 573ad3ebed215f1859dcd620e3715b810e8136fb..52e0e475d068d79b70cbece0f0e8b492bf0b84de 100644 --- a/live-tests/Cargo.toml +++ b/live-tests/Cargo.toml @@ -12,6 +12,6 @@ version = '3.0.0' anyhow = "1.0" hex-literal = "0.3" parity-scale-codec = "3.1.5" -sp-core = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26' } -subxt = { git = 'https://github.com/duniter/subxt', branch = 'duniter-substrate-v0.9.26' } +sp-core = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32' } +subxt = { git = 'https://github.com/duniter/subxt', branch = 'duniter-substrate-v0.9.32' } tokio = { version = "1.15.0", features = ["macros"] } diff --git a/node/src/cli.rs b/node/src/cli.rs index 61d9d8977633b75257788a786179a905fa3ca220..3cfdc73c383a8cf45123662aef8ede9e48f8f873 100644 --- a/node/src/cli.rs +++ b/node/src/cli.rs @@ -87,7 +87,7 @@ pub enum Subcommand { } /// Block authoring scheme to be used by the node -#[derive(Clone, Copy, Debug, PartialEq, Eq, clap::ArgEnum)] +#[derive(Clone, Copy, Debug, PartialEq, Eq, clap::ValueEnum)] pub enum Sealing { /// Author a block using normal runtime behavior (mandatory for production networks) Production, @@ -129,6 +129,6 @@ impl std::str::FromStr for Sealing { #[derive(Debug, clap::Args)] pub struct Completion { - #[clap(short, long, arg_enum)] + #[clap(short, long, value_enum)] pub generator: clap_complete::Shell, } diff --git a/node/src/command.rs b/node/src/command.rs index 97cda73c1df4cb31a880342fbb85aa4a1667fbf6..d85cc22ddfe06243587a8e4957fa9175e1f41137 100644 --- a/node/src/command.rs +++ b/node/src/command.rs @@ -28,6 +28,7 @@ use crate::service::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}; @@ -42,6 +43,7 @@ lazy_static! { }*/ /// Unwraps a [`crate::client::Client`] into the concrete runtime client. +#[cfg(feature = "runtime-benchmarks")] macro_rules! unwrap_client { ( $client:ident, @@ -78,7 +80,7 @@ impl SubstrateCli for Cli { } fn support_url() -> String { - "support.anonymous.an".into() + "https://forum.duniter.org/".into() } fn copyright_start_year() -> i32 { @@ -129,7 +131,7 @@ impl SubstrateCli for Cli { let starts_with = |prefix: &str| { path.file_name() - .and_then(|f| f.to_str().map(|s| s.starts_with(&prefix))) + .and_then(|f| f.to_str().map(|s| s.starts_with(prefix))) .unwrap_or(false) }; @@ -278,6 +280,7 @@ pub fn run() -> sc_cli::Result<()> { ); Ok(()) } + #[cfg(feature = "runtime-benchmarks")] Some(Subcommand::Benchmark(cmd)) => { let runner = cli.create_runner(cmd)?; let chain_spec = &runner.config().chain_spec; @@ -304,7 +307,13 @@ pub fn run() -> sc_cli::Result<()> { unwrap_client!( client, - cmd.run(config, client.clone(), inherent_data, wrapped) + cmd.run( + config, + client.clone(), + inherent_data, + Vec::new(), + wrapped.as_ref() + ) ) }), BenchmarkCmd::Pallet(cmd) => { @@ -339,6 +348,12 @@ pub fn run() -> sc_cli::Result<()> { _ => panic!("unknown runtime"), } } + #[cfg(not(feature = "runtime-benchmarks"))] + Some(Subcommand::Benchmark(_cmd)) => { + Err("Benchmark wasn't enabled when building the node. \ + You can enable it with `--features runtime-benchmarks`." + .into()) + } #[cfg(feature = "try-runtime")] Some(Subcommand::TryRuntime(cmd)) => { let runner = cli.create_runner(cmd)?; diff --git a/node/src/command/key.rs b/node/src/command/key.rs index d19945d4f1b9e9ad32ae63162fd26865feed7c48..2448aa11d7929e9c1a8c39ebfc5f29e075551a91 100644 --- a/node/src/command/key.rs +++ b/node/src/command/key.rs @@ -73,7 +73,7 @@ impl GenSessionKeysCmd { let suri = utils::read_uri(self.suri.as_ref())?; let base_path = self .shared_params - .base_path() + .base_path()? .unwrap_or_else(|| BasePath::from_project("", "", &C::executable_name())); let chain_id = self.shared_params.chain_id(self.shared_params.is_dev()); let chain_spec = cli.load_spec(&chain_id)?; diff --git a/node/src/command/utils.rs b/node/src/command/utils.rs index 3ee858edcec7fdf5c35452821813923640565ec0..97b6419280791bbdb03d41018365edbb38b9c378 100644 --- a/node/src/command/utils.rs +++ b/node/src/command/utils.rs @@ -50,7 +50,7 @@ impl StorageKeyPrefixCmd { if let Some(ref pallet_name) = self.pallet_name { print_key_prefix = true; let pallet_prefix = twox_128(pallet_name.as_bytes()); - println!("Pallet prefix: 0x{}", hex::encode(&pallet_prefix)); + println!("Pallet prefix: 0x{}", hex::encode(pallet_prefix)); key_prefix.extend_from_slice(&pallet_prefix[..]); } if let Some(ref item_name) = self.item_name { diff --git a/node/src/service.rs b/node/src/service.rs index e668b5383d927772c92e23256f971a8480f1150f..30edcb7ae1bf2fbd7c36dddb166986b461f90a8e 100644 --- a/node/src/service.rs +++ b/node/src/service.rs @@ -23,7 +23,7 @@ use async_io::Timer; use common_runtime::Block; use futures::{Stream, StreamExt}; use manual_seal::{run_manual_seal, EngineCommand, ManualSealParams}; -use sc_client_api::{BlockBackend, ExecutorProvider}; +use sc_client_api::BlockBackend; pub use sc_executor::NativeElseWasmExecutor; use sc_finality_grandpa::SharedVoterState; use sc_keystore::LocalKeystore; @@ -292,7 +292,7 @@ where let justification_import = grandpa_block_import.clone(); - let babe_config = babe::Config::get(&*client)?; + let babe_config = babe::configuration(&*client)?; let (babe_block_import, babe_link) = babe::block_import(babe_config, grandpa_block_import, client.clone())?; @@ -319,11 +319,10 @@ where slot_duration, ); - Ok((timestamp, slot)) + Ok((slot, timestamp)) }, &task_manager.spawn_essential_handle(), config.prometheus_registry(), - sp_consensus::CanAuthorWithNativeVersion::new(client.executor().clone()), telemetry.as_ref().map(|x| x.handle()), )? }; @@ -404,7 +403,7 @@ where Vec::default(), )); - let (network, system_rpc_tx, network_starter) = + let (network, system_rpc_tx, tx_handler_controller, network_starter) = sc_service::build_network(sc_service::BuildNetworkParams { config: &config, client: client.clone(), @@ -520,9 +519,6 @@ where }), ); } else { - let can_author_with = - sp_consensus::CanAuthorWithNativeVersion::new(client.executor().clone()); - let client_clone = client.clone(); let slot_duration = babe_link.config().slot_duration(); let babe_config = babe::BabeParams { @@ -550,13 +546,12 @@ where slot_duration, ); - Ok((timestamp, slot, uncles)) + Ok((slot, timestamp, uncles)) } }, force_authoring, backoff_authoring_blocks, babe_link, - can_author_with, block_proposal_slot_portion: babe::SlotProportion::new(2f32 / 3f32), max_block_proposal_slot_portion: None, telemetry: telemetry.as_ref().map(|x| x.handle()), @@ -600,15 +595,16 @@ where }; let _rpc_handlers = sc_service::spawn_tasks(sc_service::SpawnTasksParams { + config, + backend, network: network.clone(), client, keystore: keystore_container.sync_keystore(), task_manager: &mut task_manager, transaction_pool, rpc_builder: rpc_extensions_builder, - backend, system_rpc_tx, - config, + tx_handler_controller, telemetry: telemetry.as_mut(), })?; diff --git a/node/src/service/client.rs b/node/src/service/client.rs index 9c5d63ae509aaf5447f625c75c79619ba808da7c..16cb4b4125db1ab317f0e7cedc667e5dc279f7d5 100644 --- a/node/src/service/client.rs +++ b/node/src/service/client.rs @@ -19,6 +19,7 @@ use sc_client_api::{AuxStore, Backend as BackendT, BlockchainEvents, KeyIterator use sp_api::{CallApiAt, NumberFor, ProvideRuntimeApi}; use sp_blockchain::{HeaderBackend, HeaderMetadata}; use sp_consensus::BlockStatus; +use sp_core::{Encode, Pair}; use sp_runtime::{ generic::{BlockId, SignedBlock}, traits::{BlakeTwo256, Block as BlockT}, @@ -155,22 +156,34 @@ pub enum Client { } macro_rules! with_client { - { - $self:ident, - $client:ident, - { - $( $code:tt )* - } - } => { - match $self { - #[cfg(feature = "g1")] - Self::G1($client) => { $( $code )* }, - #[cfg(feature = "gtest")] - Self::GTest($client) => { $( $code )* }, - #[cfg(feature = "gdev")] - Self::GDev($client) => { $( $code )* }, - } - } + { + $self:ident, + $client:ident, + { + $( $code:tt )* + } + } => { + match $self { + #[cfg(feature = "g1")] + Self::G1($client) => { + #[allow(unused_imports)] + use g1_runtime as runtime; + $( $code )* + } + #[cfg(feature = "gtest")] + Self::GTest($client) => { + #[allow(unused_imports)] + use gtest_runtime as runtime; + $( $code )* + } + #[cfg(feature = "gdev")] + Self::GDev($client) => { + #[allow(unused_imports)] + use gdev_runtime as runtime; + $( $code )* + } + } + } } impl ClientHandle for Client { @@ -274,44 +287,99 @@ impl sc_client_api::BlockBackend<Block> for Client { } } -impl frame_benchmarking_cli::ExtrinsicBuilder for Client { - fn remark( +/// Helper trait to implement [`frame_benchmarking_cli::ExtrinsicBuilder`]. +/// +/// Should only be used for benchmarking since it makes strong assumptions +/// about the chain state that these calls will be valid for. +trait BenchmarkCallSigner<RuntimeCall: Encode + Clone, Signer: Pair> { + /// Signs a call together with the signed extensions of the specific runtime. + /// + /// Only works if the current block is the genesis block since the + /// `CheckMortality` check is mocked by using the genesis block. + fn sign_call( &self, - _nonce: u32, - ) -> std::result::Result<sp_runtime::OpaqueExtrinsic, &'static str> { - todo!() - /*with_signed_payload! { - self, - {extra, client, raw_payload}, - { - // First the setup code to init all the variables that are needed - // to build the signed extras. - use runtime::{Call, SystemCall}; + call: RuntimeCall, + nonce: u32, + current_block: u64, + period: u64, + genesis: sp_core::H256, + acc: Signer, + ) -> sp_runtime::OpaqueExtrinsic; +} - let call = Call::System(SystemCall::remark { remark: vec![] }); - let bob = Sr25519Keyring::Bob.pair(); +#[cfg(feature = "gdev")] +impl BenchmarkCallSigner<gdev_runtime::RuntimeCall, sp_core::sr25519::Pair> + for super::FullClient<gdev_runtime::RuntimeApi, super::GDevExecutor> +{ + fn sign_call( + &self, + call: gdev_runtime::RuntimeCall, + nonce: u32, + current_block: u64, + period: u64, + genesis: sp_core::H256, + acc: sp_core::sr25519::Pair, + ) -> sp_runtime::OpaqueExtrinsic { + use gdev_runtime as runtime; + + let extra: runtime::SignedExtra = ( + frame_system::CheckNonZeroSender::<runtime::Runtime>::new(), + frame_system::CheckSpecVersion::<runtime::Runtime>::new(), + frame_system::CheckTxVersion::<runtime::Runtime>::new(), + frame_system::CheckGenesis::<runtime::Runtime>::new(), + frame_system::CheckMortality::<runtime::Runtime>::from( + sp_runtime::generic::Era::mortal(period, current_block), + ), + frame_system::CheckNonce::<runtime::Runtime>::from(nonce).into(), + frame_system::CheckWeight::<runtime::Runtime>::new(), + pallet_transaction_payment::ChargeTransactionPayment::<runtime::Runtime>::from(0), + ); + + let payload = sp_runtime::generic::SignedPayload::from_raw( + call.clone(), + extra.clone(), + ( + (), + runtime::VERSION.spec_version, + runtime::VERSION.transaction_version, + genesis, + genesis, + (), + (), + (), + ), + ); + + let signature = payload.using_encoded(|p| acc.sign(p)); + runtime::UncheckedExtrinsic::new_signed( + call, + sp_runtime::AccountId32::from(acc.public()).into(), + common_runtime::Signature::Sr25519(signature), + extra, + ) + .into() + } +} - let period = polkadot_runtime_common::BlockHashCount::get().checked_next_power_of_two().map(|c| c / 2).unwrap_or(2) as u64; +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, { + let call = runtime::RuntimeCall::System(runtime::SystemCall::remark { remark: vec![] }); + let signer = sp_keyring::Sr25519Keyring::Bob.pair(); - let current_block = 0; - let tip = 0; + let period = runtime::BlockHashCount::get().checked_next_power_of_two().map(|c| c / 2).unwrap_or(2) as u64; let genesis = client.usage_info().chain.best_hash; - }, - (period, current_block, nonce, tip, call, genesis), - /* The SignedPayload is generated here */ - { - // Use the payload to generate a signature. - let signature = raw_payload.using_encoded(|payload| bob.sign(payload)); - - let ext = runtime::UncheckedExtrinsic::new_signed( - call, - sp_runtime::AccountId32::from(bob.public()).into(), - polkadot_core_primitives::Signature::Sr25519(signature.clone()), - extra, - ); - Ok(ext.into()) + + Ok(client.sign_call(call, nonce, 0, period, genesis, signer)) } - }*/ + } } } @@ -340,7 +408,7 @@ impl sp_blockchain::HeaderBackend<Block> for Client { impl sc_client_api::StorageProvider<Block, super::FullBackend> for Client { fn storage( &self, - id: &BlockId<Block>, + id: &<Block as BlockT>::Hash, key: &StorageKey, ) -> sp_blockchain::Result<Option<StorageData>> { match_client!(self, storage(id, key)) @@ -348,7 +416,7 @@ impl sc_client_api::StorageProvider<Block, super::FullBackend> for Client { fn storage_keys( &self, - id: &BlockId<Block>, + id: &<Block as BlockT>::Hash, key_prefix: &StorageKey, ) -> sp_blockchain::Result<Vec<StorageKey>> { match_client!(self, storage_keys(id, key_prefix)) @@ -356,7 +424,7 @@ impl sc_client_api::StorageProvider<Block, super::FullBackend> for Client { fn storage_hash( &self, - id: &BlockId<Block>, + id: &<Block as BlockT>::Hash, key: &StorageKey, ) -> sp_blockchain::Result<Option<<Block as BlockT>::Hash>> { match_client!(self, storage_hash(id, key)) @@ -364,7 +432,7 @@ impl sc_client_api::StorageProvider<Block, super::FullBackend> for Client { fn storage_pairs( &self, - id: &BlockId<Block>, + id: &<Block as BlockT>::Hash, key_prefix: &StorageKey, ) -> sp_blockchain::Result<Vec<(StorageKey, StorageData)>> { match_client!(self, storage_pairs(id, key_prefix)) @@ -372,7 +440,7 @@ impl sc_client_api::StorageProvider<Block, super::FullBackend> for Client { fn storage_keys_iter<'a>( &self, - id: &BlockId<Block>, + id: &<Block as BlockT>::Hash, prefix: Option<&'a StorageKey>, start_key: Option<&StorageKey>, ) -> sp_blockchain::Result< @@ -383,7 +451,7 @@ impl sc_client_api::StorageProvider<Block, super::FullBackend> for Client { fn child_storage( &self, - id: &BlockId<Block>, + id: &<Block as BlockT>::Hash, child_info: &ChildInfo, key: &StorageKey, ) -> sp_blockchain::Result<Option<StorageData>> { @@ -392,7 +460,7 @@ impl sc_client_api::StorageProvider<Block, super::FullBackend> for Client { fn child_storage_keys( &self, - id: &BlockId<Block>, + id: &<Block as BlockT>::Hash, child_info: &ChildInfo, key_prefix: &StorageKey, ) -> sp_blockchain::Result<Vec<StorageKey>> { @@ -401,7 +469,7 @@ impl sc_client_api::StorageProvider<Block, super::FullBackend> for Client { fn child_storage_keys_iter<'a>( &self, - id: &BlockId<Block>, + id: &<Block as BlockT>::Hash, child_info: ChildInfo, prefix: Option<&'a StorageKey>, start_key: Option<&StorageKey>, @@ -416,7 +484,7 @@ impl sc_client_api::StorageProvider<Block, super::FullBackend> for Client { fn child_storage_hash( &self, - id: &BlockId<Block>, + id: &<Block as BlockT>::Hash, child_info: &ChildInfo, key: &StorageKey, ) -> sp_blockchain::Result<Option<<Block as BlockT>::Hash>> { @@ -433,6 +501,7 @@ impl sc_client_api::UsageProvider<Block> for Client { /// Generates inherent data for benchmarking G1, GTest and GDev. /// /// Not to be used outside of benchmarking since it returns mocked values. +#[cfg(feature = "runtime-benchmarks")] pub fn benchmark_inherent_data( ) -> std::result::Result<sp_inherents::InherentData, sp_inherents::Error> { use sp_inherents::InherentDataProvider; diff --git a/pallets/authority-members/Cargo.toml b/pallets/authority-members/Cargo.toml index b3405d6e1dbb5cdc5b7f8a394be4ae70dee7eda2..485f2b203f216037df1876df0cac737700ced2ab 100644 --- a/pallets/authority-members/Cargo.toml +++ b/pallets/authority-members/Cargo.toml @@ -46,23 +46,23 @@ version = "3.1.5" default-features = false git = 'https://github.com/duniter/substrate' optional = true -branch = 'duniter-substrate-v0.9.26' +branch = 'duniter-substrate-v0.9.32' [dependencies.frame-support] default-features = false git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.26' +branch = 'duniter-substrate-v0.9.32' [dependencies.frame-system] default-features = false git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.26' +branch = 'duniter-substrate-v0.9.32' [dependencies.pallet-session] default-features = false features = ["historical"] git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.26' +branch = 'duniter-substrate-v0.9.32' [dependencies.serde] version = "1.0.101" @@ -72,22 +72,22 @@ features = ["derive"] [dependencies.sp-core] default-features = false git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.26' +branch = 'duniter-substrate-v0.9.32' [dependencies.sp-runtime] default-features = false git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.26' +branch = 'duniter-substrate-v0.9.32' [dependencies.sp-staking] default-features = false git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.26' +branch = 'duniter-substrate-v0.9.32' [dependencies.sp-std] default-features = false git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.26' +branch = 'duniter-substrate-v0.9.32' ### DOC ### @@ -104,4 +104,4 @@ version = '1.0.119' [dev-dependencies.sp-io] git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.26' +branch = 'duniter-substrate-v0.9.32' diff --git a/pallets/authority-members/src/lib.rs b/pallets/authority-members/src/lib.rs index 941a0af7d56e1f4be886df51bc7905436b93f900..9a1d9f4d3f20c223fd08b08eaf3d34c96966ae56 100644 --- a/pallets/authority-members/src/lib.rs +++ b/pallets/authority-members/src/lib.rs @@ -63,7 +63,6 @@ pub mod pallet { pub trait Config: frame_system::Config + pallet_session::Config + pallet_session::historical::Config { - type Event: From<Event<Self>> + IsType<<Self as frame_system::Config>::Event>; type KeysWrapper: Parameter + Into<Self::Keys>; type IsMember: IsMember<Self::MemberId>; type OnNewSession: OnNewSession; @@ -77,7 +76,8 @@ pub mod pallet { type MaxOfflineSessions: Get<SessionIndex>; type MemberId: Copy + Ord + MaybeSerializeDeserialize + Parameter; type MemberIdOf: Convert<Self::AccountId, Option<Self::MemberId>>; - type RemoveMemberOrigin: EnsureOrigin<Self::Origin>; + type RemoveMemberOrigin: EnsureOrigin<Self::RuntimeOrigin>; + type RuntimeEvent: From<Event<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>; } // GENESIS STUFF // @@ -396,7 +396,7 @@ pub mod pallet { Self::deposit_event(Event::MemberRemoved(member_id)); let _ = T::OnRemovedMember::on_removed_member(member_id); - 0 + Weight::zero() } pub(super) fn expire_memberships(current_session_index: SessionIndex) { for member_id in MembersExpireOn::<T>::take(current_session_index) { diff --git a/pallets/authority-members/src/mock.rs b/pallets/authority-members/src/mock.rs index 288fc07b686e0ab14e1f1b004655972678495234..d28782a4a0673e0038329f9bc0ad6e2371eee9d2 100644 --- a/pallets/authority-members/src/mock.rs +++ b/pallets/authority-members/src/mock.rs @@ -71,8 +71,8 @@ impl system::Config for Test { type BlockWeights = (); type BlockLength = (); type DbWeight = (); - type Origin = Origin; - type Call = Call; + type RuntimeOrigin = RuntimeOrigin; + type RuntimeCall = RuntimeCall; type Index = u64; type BlockNumber = u64; type Hash = H256; @@ -80,7 +80,7 @@ impl system::Config for Test { type AccountId = AccountId; type Lookup = IdentityLookup<Self::AccountId>; type Header = Header; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type BlockHashCount = BlockHashCount; type Version = (); type PalletInfo = PalletInfo; @@ -118,7 +118,7 @@ impl ShouldEndSession<u64> for TestShouldEndSession { } impl pallet_session::Config for Test { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type ValidatorId = u64; type ValidatorIdOf = ConvertInto; type ShouldEndSession = TestShouldEndSession; @@ -148,7 +148,6 @@ impl IsMember<u64> for TestIsSmithMember { } impl pallet_authority_members::Config for Test { - type Event = Event; type KeysWrapper = MockSessionKeys; type IsMember = TestIsSmithMember; type MaxAuthorities = ConstU32<4>; @@ -159,6 +158,7 @@ impl pallet_authority_members::Config for Test { type OnNewSession = (); type OnRemovedMember = (); type RemoveMemberOrigin = system::EnsureRoot<u64>; + type RuntimeEvent = RuntimeEvent; } // Build genesis storage according to the mock runtime. diff --git a/pallets/authority-members/src/tests.rs b/pallets/authority-members/src/tests.rs index 3b9670a65ac00c1b036d595a116556bb9c5dc829..d26c3f410ebede06c96fe9dfac87f481c3f57e3c 100644 --- a/pallets/authority-members/src/tests.rs +++ b/pallets/authority-members/src/tests.rs @@ -81,11 +81,11 @@ fn test_max_keys_life_rule() { // Member 3 and 6 rotate their sessions keys assert_ok!(AuthorityMembers::set_session_keys( - Origin::signed(3), + RuntimeOrigin::signed(3), UintAuthorityId(3).into() ),); assert_ok!(AuthorityMembers::set_session_keys( - Origin::signed(6), + RuntimeOrigin::signed(6), UintAuthorityId(6).into() ),); @@ -132,7 +132,7 @@ fn test_go_offline() { run_to_block(1); // Member 9 should be able to go offline - assert_ok!(AuthorityMembers::go_offline(Origin::signed(9)),); + assert_ok!(AuthorityMembers::go_offline(RuntimeOrigin::signed(9)),); // Verify state assert_eq!(AuthorityMembers::incoming(), EMPTY); @@ -185,7 +185,7 @@ fn test_go_online() { // Member 12 should be able to set their session keys assert_ok!(AuthorityMembers::set_session_keys( - Origin::signed(12), + RuntimeOrigin::signed(12), UintAuthorityId(12).into(), )); assert_eq!( @@ -198,7 +198,7 @@ fn test_go_online() { ); // Member 12 should be able to go online - assert_ok!(AuthorityMembers::go_online(Origin::signed(12)),); + assert_ok!(AuthorityMembers::go_online(RuntimeOrigin::signed(12)),); // Verify state assert_eq!(AuthorityMembers::incoming(), vec![12]); @@ -237,27 +237,27 @@ fn test_too_many_authorities() { // Member 12 sets their session keys then go online assert_ok!(AuthorityMembers::set_session_keys( - Origin::signed(12), + RuntimeOrigin::signed(12), UintAuthorityId(12).into(), )); assert_eq!(AuthorityMembers::authorities_counter(), 3); - assert_ok!(AuthorityMembers::go_online(Origin::signed(12)),); + assert_ok!(AuthorityMembers::go_online(RuntimeOrigin::signed(12)),); // Member 15 can't go online because there is already 4 authorities "planned" assert_ok!(AuthorityMembers::set_session_keys( - Origin::signed(15), + RuntimeOrigin::signed(15), UintAuthorityId(15).into(), )); assert_eq!(AuthorityMembers::authorities_counter(), 4); assert_noop!( - AuthorityMembers::go_online(Origin::signed(15)), + AuthorityMembers::go_online(RuntimeOrigin::signed(15)), Error::<Test>::TooManyAuthorities, ); // If member 3 go_offline, member 15 can go_online - assert_ok!(AuthorityMembers::go_offline(Origin::signed(3)),); + assert_ok!(AuthorityMembers::go_offline(RuntimeOrigin::signed(3)),); assert_eq!(AuthorityMembers::authorities_counter(), 3); - assert_ok!(AuthorityMembers::go_online(Origin::signed(15)),); + assert_ok!(AuthorityMembers::go_online(RuntimeOrigin::signed(15)),); assert_eq!(AuthorityMembers::authorities_counter(), 4); }); } @@ -269,16 +269,16 @@ fn test_go_online_then_go_offline_in_same_session() { // Member 12 sets their session keys & go online assert_ok!(AuthorityMembers::set_session_keys( - Origin::signed(12), + RuntimeOrigin::signed(12), UintAuthorityId(12).into(), )); - assert_ok!(AuthorityMembers::go_online(Origin::signed(12)),); + assert_ok!(AuthorityMembers::go_online(RuntimeOrigin::signed(12)),); run_to_block(2); // Member 12 should be able to go offline at the same session to "cancel" their previous // action - assert_ok!(AuthorityMembers::go_offline(Origin::signed(12)),); + assert_ok!(AuthorityMembers::go_offline(RuntimeOrigin::signed(12)),); // Verify state assert_eq!(AuthorityMembers::incoming(), EMPTY); @@ -301,12 +301,12 @@ fn test_go_offline_then_go_online_in_same_session() { run_to_block(6); // Member 9 go offline - assert_ok!(AuthorityMembers::go_offline(Origin::signed(9)),); + assert_ok!(AuthorityMembers::go_offline(RuntimeOrigin::signed(9)),); run_to_block(7); // Member 9 should be able to go online at the same session to "cancel" their previous action - assert_ok!(AuthorityMembers::go_online(Origin::signed(9)),); + assert_ok!(AuthorityMembers::go_online(RuntimeOrigin::signed(9)),); // Verify state assert_eq!(AuthorityMembers::incoming(), EMPTY); diff --git a/pallets/authority-members/src/traits.rs b/pallets/authority-members/src/traits.rs index ea29f90b5671f1adac13b3e3fd6b522a7932774d..3cd7566d9b2752ff8e151f5faf9f0af106e3d7d8 100644 --- a/pallets/authority-members/src/traits.rs +++ b/pallets/authority-members/src/traits.rs @@ -23,7 +23,7 @@ pub trait OnNewSession { impl OnNewSession for () { fn on_new_session(_: SessionIndex) -> Weight { - 0 + Weight::zero() } } @@ -33,6 +33,6 @@ pub trait OnRemovedMember<MemberId> { impl<MemberId> OnRemovedMember<MemberId> for () { fn on_removed_member(_: MemberId) -> Weight { - 0 + Weight::zero() } } diff --git a/pallets/certification/Cargo.toml b/pallets/certification/Cargo.toml index 1ce99de357899c53b4b1ffd2440ad06a726475cd..7615c6f00453a10f76ee4b0feb61cb3228a898c9 100644 --- a/pallets/certification/Cargo.toml +++ b/pallets/certification/Cargo.toml @@ -39,17 +39,17 @@ version = "3.1.5" default-features = false git = 'https://github.com/duniter/substrate' optional = true -branch = 'duniter-substrate-v0.9.26' +branch = 'duniter-substrate-v0.9.32' [dependencies.frame-support] default-features = false git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.26' +branch = 'duniter-substrate-v0.9.32' [dependencies.frame-system] default-features = false git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.26' +branch = 'duniter-substrate-v0.9.32' [dependencies.serde] version = "1.0.101" @@ -59,17 +59,17 @@ features = ["derive"] [dependencies.sp-core] default-features = false git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.26' +branch = 'duniter-substrate-v0.9.32' [dependencies.sp-runtime] default-features = false git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.26' +branch = 'duniter-substrate-v0.9.32' [dependencies.sp-std] default-features = false git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.26' +branch = 'duniter-substrate-v0.9.32' ### DOC ### @@ -86,4 +86,4 @@ version = '1.0.2' [dev-dependencies.sp-io] default-features = false git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.26' +branch = 'duniter-substrate-v0.9.32' diff --git a/pallets/certification/src/lib.rs b/pallets/certification/src/lib.rs index 75d79258ca74b468d63617babab7901c06fc7ff6..57a1d7e3c230e03ffee37a4a481e8598d1aee300 100644 --- a/pallets/certification/src/lib.rs +++ b/pallets/certification/src/lib.rs @@ -30,6 +30,7 @@ pub use types::*; use crate::traits::*; use codec::Codec; +use frame_support::pallet_prelude::*; use frame_support::traits::StorageVersion; use sp_runtime::traits::AtLeast32BitUnsigned; use sp_std::{fmt::Debug, vec::Vec}; @@ -37,7 +38,6 @@ use sp_std::{fmt::Debug, vec::Vec}; #[frame_support::pallet] pub mod pallet { use super::*; - use frame_support::pallet_prelude::*; use frame_system::pallet_prelude::*; use sp_runtime::traits::{Convert, Saturating}; use sp_std::collections::btree_map::BTreeMap; @@ -56,8 +56,6 @@ pub mod pallet { #[pallet::constant] /// Minimum duration between two certifications issued by the same issuer type CertPeriod: Get<Self::BlockNumber>; - /// Because this pallet emits events, it depends on the runtime's definition of an event. - type Event: From<Event<Self, I>> + IsType<<Self as frame_system::Config>::Event>; /// A short identity index. type IdtyIndex: Parameter + Member @@ -82,6 +80,9 @@ pub mod pallet { type OnNewcert: OnNewcert<Self::IdtyIndex>; /// Handler for Removed event type OnRemovedCert: OnRemovedCert<Self::IdtyIndex>; + /// Because this pallet emits events, it depends on the runtime's definition of an event. + type RuntimeEvent: From<Event<Self, I>> + + IsType<<Self as frame_system::Config>::RuntimeEvent>; #[pallet::constant] /// Duration of validity of a certification type ValidityPeriod: Get<Self::BlockNumber>; @@ -211,6 +212,8 @@ pub mod pallet { pub type StorageCertsRemovableOn<T: Config<I>, I: 'static = ()> = StorageMap<_, Twox64Concat, T::BlockNumber, Vec<(T::IdtyIndex, T::IdtyIndex)>, OptionQuery>; + // EVENTS // + #[pallet::event] #[pallet::generate_deposit(pub(super) fn deposit_event)] pub enum Event<T: Config<I>, I: 'static = ()> { @@ -239,6 +242,8 @@ pub mod pallet { }, } + // ERRORS // + #[pallet::error] pub enum Error<T, I = ()> { /// An identity cannot certify itself @@ -434,7 +439,7 @@ pub mod pallet { Ok(().into()) } fn prune_certifications(block_number: T::BlockNumber) -> Weight { - let mut total_weight: Weight = 0; + let mut total_weight = Weight::zero(); if let Some(certs) = StorageCertsRemovableOn::<T, I>::take(block_number) { for (issuer, receiver) in certs { @@ -449,7 +454,7 @@ pub mod pallet { receiver: T::IdtyIndex, block_number_opt: Option<T::BlockNumber>, ) -> Weight { - let mut total_weight: Weight = 0; + let mut total_weight = Weight::zero(); let mut removed = false; CertsByReceiver::<T, I>::mutate_exists(receiver, |issuers_opt| { let issuers = issuers_opt.get_or_insert(Vec::with_capacity(0)); @@ -501,14 +506,11 @@ pub mod pallet { } impl<T: Config<I>, I: 'static> SetNextIssuableOn<T::BlockNumber, T::IdtyIndex> for Pallet<T, I> { - fn set_next_issuable_on( - idty_index: T::IdtyIndex, - next_issuable_on: T::BlockNumber, - ) -> frame_support::pallet_prelude::Weight { + fn set_next_issuable_on(idty_index: T::IdtyIndex, next_issuable_on: T::BlockNumber) -> Weight { <StorageIdtyCertMeta<T, I>>::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; }); - 0 + Weight::zero() } } diff --git a/pallets/certification/src/mock.rs b/pallets/certification/src/mock.rs index 68de7a87ea0637a006ce6fcc2c6e81431eaca57b..3096b3a066aa361a04f1b50dd851f06d18b95535 100644 --- a/pallets/certification/src/mock.rs +++ b/pallets/certification/src/mock.rs @@ -55,8 +55,8 @@ impl system::Config for Test { type BlockWeights = (); type BlockLength = (); type DbWeight = (); - type Origin = Origin; - type Call = Call; + type RuntimeOrigin = RuntimeOrigin; + type RuntimeCall = RuntimeCall; type Index = u64; type BlockNumber = BlockNumber; type Hash = H256; @@ -64,7 +64,7 @@ impl system::Config for Test { type AccountId = AccountId; type Lookup = IdentityLookup<Self::AccountId>; type Header = Header; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type BlockHashCount = BlockHashCount; type Version = (); type PalletInfo = PalletInfo; @@ -78,12 +78,12 @@ impl system::Config for Test { } pub struct EnsureRoot; -impl frame_support::traits::EnsureOrigin<(Origin, IdtyIndex, IdtyIndex)> for EnsureRoot { +impl frame_support::traits::EnsureOrigin<(RuntimeOrigin, IdtyIndex, IdtyIndex)> for EnsureRoot { type Success = (); fn try_origin( - o: (Origin, IdtyIndex, IdtyIndex), - ) -> Result<Self::Success, (Origin, IdtyIndex, IdtyIndex)> { + o: (RuntimeOrigin, IdtyIndex, IdtyIndex), + ) -> Result<Self::Success, (RuntimeOrigin, IdtyIndex, IdtyIndex)> { match o.0.clone().into() { Ok(system::RawOrigin::Root) => Ok(()), _ => Err(o), @@ -100,7 +100,6 @@ parameter_types! { impl pallet_certification::Config for Test { type CertPeriod = CertPeriod; - type Event = Event; type IdtyIndex = IdtyIndex; type OwnerKeyOf = sp_runtime::traits::ConvertInto; type CheckCertAllowed = (); @@ -108,6 +107,7 @@ impl pallet_certification::Config for Test { type MinReceivedCertToBeAbleToIssueCert = MinReceivedCertToBeAbleToIssueCert; type OnNewcert = (); type OnRemovedCert = (); + type RuntimeEvent = RuntimeEvent; type ValidityPeriod = ValidityPeriod; } diff --git a/pallets/certification/src/tests.rs b/pallets/certification/src/tests.rs index 7922a49b723b982d2ec58b8c31eb4ffc76513797..9b685c6f66496233d9a8c70e9ee818f4b8d7c4b8 100644 --- a/pallets/certification/src/tests.rs +++ b/pallets/certification/src/tests.rs @@ -14,7 +14,6 @@ // 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 crate::mock::Event as RuntimeEvent; use crate::mock::*; use crate::{Error, Event}; use frame_support::assert_ok; @@ -29,7 +28,7 @@ fn test_must_receive_cert_before_can_issue() { }) .execute_with(|| { assert_eq!( - DefaultCertification::add_cert(Origin::signed(0), 0, 1), + DefaultCertification::add_cert(RuntimeOrigin::signed(0), 0, 1), Err(Error::<Test, _>::NotEnoughCertReceived.into()) ); }); @@ -50,7 +49,7 @@ fn test_cannot_certify_self() { run_to_block(2); assert_eq!( - DefaultCertification::add_cert(Origin::signed(0), 0, 0), + DefaultCertification::add_cert(RuntimeOrigin::signed(0), 0, 0), Err(Error::<Test, _>::CannotCertifySelf.into()) ); }); @@ -154,17 +153,25 @@ fn test_cert_period() { } ); assert_eq!( - DefaultCertification::add_cert(Origin::signed(0), 0, 3), + DefaultCertification::add_cert(RuntimeOrigin::signed(0), 0, 3), Err(Error::<Test, _>::NotRespectCertPeriod.into()) ); run_to_block(CertPeriod::get()); - assert_ok!(DefaultCertification::add_cert(Origin::signed(0), 0, 3)); + assert_ok!(DefaultCertification::add_cert( + RuntimeOrigin::signed(0), + 0, + 3 + )); run_to_block(CertPeriod::get() + 1); assert_eq!( - DefaultCertification::add_cert(Origin::signed(0), 0, 4), + DefaultCertification::add_cert(RuntimeOrigin::signed(0), 0, 4), Err(Error::<Test, _>::NotRespectCertPeriod.into()) ); run_to_block((2 * CertPeriod::get()) + 1); - assert_ok!(DefaultCertification::add_cert(Origin::signed(0), 0, 4)); + assert_ok!(DefaultCertification::add_cert( + RuntimeOrigin::signed(0), + 0, + 4 + )); }); } diff --git a/pallets/certification/src/traits.rs b/pallets/certification/src/traits.rs index 9a81bb3d006e4129be8074816f9c85490016ed91..6189b35e08c01f079ae4b6bcde9f754bb24c568e 100644 --- a/pallets/certification/src/traits.rs +++ b/pallets/certification/src/traits.rs @@ -41,7 +41,7 @@ impl<IdtyIndex> OnNewcert<IdtyIndex> for () { _receiver: IdtyIndex, _receiver_received_count: u32, ) -> frame_support::dispatch::Weight { - 0 + Weight::zero() } } @@ -62,7 +62,7 @@ impl<IdtyIndex> OnRemovedCert<IdtyIndex> for () { _receiver_received_count: u32, _expiration: bool, ) -> frame_support::dispatch::Weight { - 0 + Weight::zero() } } diff --git a/pallets/duniter-account/Cargo.toml b/pallets/duniter-account/Cargo.toml index 5f5fe87e5fb8ba7efda2be675bbdaf1df18d93eb..169cbff1bb02631ea420adeb35f37ebdd7cb9f74 100644 --- a/pallets/duniter-account/Cargo.toml +++ b/pallets/duniter-account/Cargo.toml @@ -42,27 +42,27 @@ scale-info = { version = "2.1.1", default-features = false, features = ["derive" default-features = false git = 'https://github.com/duniter/substrate' optional = true -branch = 'duniter-substrate-v0.9.26' +branch = 'duniter-substrate-v0.9.32' [dependencies.frame-support] default-features = false git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.26' +branch = 'duniter-substrate-v0.9.32' [dependencies.frame-system] default-features = false git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.26' +branch = 'duniter-substrate-v0.9.32' [dependencies.pallet-balances] default-features = false git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.26' +branch = 'duniter-substrate-v0.9.32' [dependencies.pallet-treasury] default-features = false git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.26' +branch = 'duniter-substrate-v0.9.32' [dependencies.serde] version = "1.0.101" @@ -72,22 +72,22 @@ features = ["derive"] [dependencies.sp-core] default-features = false git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.26' +branch = 'duniter-substrate-v0.9.32' [dependencies.sp-io] default-features = false git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.26' +branch = 'duniter-substrate-v0.9.32' [dependencies.sp-runtime] default-features = false git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.26' +branch = 'duniter-substrate-v0.9.32' [dependencies.sp-std] default-features = false git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.26' +branch = 'duniter-substrate-v0.9.32' ### DOC ### @@ -98,7 +98,7 @@ targets = ['x86_64-unknown-linux-gnu'] [dev-dependencies.pallet-balances] git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.26' +branch = 'duniter-substrate-v0.9.32' [dev-dependencies.maplit] version = '1.0.2' @@ -108,4 +108,4 @@ version = '1.0.119' [dev-dependencies.sp-io] git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.26' +branch = 'duniter-substrate-v0.9.32' diff --git a/pallets/duniter-account/src/lib.rs b/pallets/duniter-account/src/lib.rs index 329997d5040d5773fe732bc3eb14544646202c73..221e0ce62ff2781dcb3f07983778bebefe4f3ace 100644 --- a/pallets/duniter-account/src/lib.rs +++ b/pallets/duniter-account/src/lib.rs @@ -52,12 +52,12 @@ pub mod pallet { + pallet_treasury::Config<Currency = pallet_balances::Pallet<Self>> { type AccountIdToSalt: Convert<Self::AccountId, [u8; 32]>; - /// The overarching event type. - type Event: From<Event<Self>> + IsType<<Self as frame_system::Config>::Event>; #[pallet::constant] type MaxNewAccountsPerBlock: Get<u32>; #[pallet::constant] type NewAccountPrice: Get<Self::Balance>; + /// The overarching event type. + type RuntimeEvent: From<Event<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>; } // STORAGE // @@ -147,7 +147,7 @@ pub mod pallet { #[pallet::hooks] impl<T: Config> Hooks<BlockNumberFor<T>> for Pallet<T> { fn on_initialize(_: T::BlockNumber) -> Weight { - let mut total_weight = 0; + let mut total_weight = Weight::zero(); for account_id in PendingNewAccounts::<T>::iter_keys() .drain() .take(T::MaxNewAccountsPerBlock::get() as usize) @@ -159,7 +159,7 @@ pub mod pallet { H256(T::AccountIdToSalt::convert(account_id.clone())), ); PendingRandomIdAssignments::<T>::insert(request_id, account_id); - total_weight += 100_000; + total_weight += Weight::from_ref_time(100_000); } else { // If the account is not self-sufficient, it must pay the account creation fees let account_data = frame_system::Pallet::<T>::get(&account_id); @@ -195,7 +195,7 @@ pub mod pallet { H256(T::AccountIdToSalt::convert(account_id.clone())), ); PendingRandomIdAssignments::<T>::insert(request_id, account_id); - total_weight += 200_000; + total_weight += Weight::from_ref_time(200_000); } } else { // The charges could not be deducted, we must destroy the account @@ -210,7 +210,7 @@ pub mod pallet { T::OnUnbalanced::on_unbalanced(pallet_balances::NegativeImbalance::new( balance_to_suppr, )); - total_weight += 300_000; + total_weight += Weight::from_ref_time(300_000); } } } @@ -233,9 +233,9 @@ where who: account_id, random_id: randomness, }); - 200_000 + Weight::from_ref_time(200_000) } else { - 100_000 + Weight::from_ref_time(100_000) } } } diff --git a/pallets/duniter-test-parameters/Cargo.toml b/pallets/duniter-test-parameters/Cargo.toml index a68092c743a8ab16a9712048f92e3dec534e20a9..7fef56df4e1fac59126aa986c2fb22ad921d4d75 100644 --- a/pallets/duniter-test-parameters/Cargo.toml +++ b/pallets/duniter-test-parameters/Cargo.toml @@ -39,32 +39,32 @@ version = "3.1.5" default-features = false git = 'https://github.com/duniter/substrate' optional = true -branch = 'duniter-substrate-v0.9.26' +branch = 'duniter-substrate-v0.9.32' [dependencies.frame-support] default-features = false git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.26' +branch = 'duniter-substrate-v0.9.32' [dependencies.frame-system] default-features = false git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.26' +branch = 'duniter-substrate-v0.9.32' [dependencies.sp-io] default-features = false git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.26' +branch = 'duniter-substrate-v0.9.32' [dependencies.sp-std] default-features = false git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.26' +branch = 'duniter-substrate-v0.9.32' [dependencies.sp-runtime] default-features = false git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.26' +branch = 'duniter-substrate-v0.9.32' ### DOC ### diff --git a/pallets/duniter-wot/Cargo.toml b/pallets/duniter-wot/Cargo.toml index 73a38389cdc5cc1c208ab71cd05b5b9a7926138a..252e9e8a4c84b25e6931aeb151afab4d2bed03ae 100644 --- a/pallets/duniter-wot/Cargo.toml +++ b/pallets/duniter-wot/Cargo.toml @@ -48,17 +48,17 @@ version = "3.1.5" default-features = false git = 'https://github.com/duniter/substrate' optional = true -branch = 'duniter-substrate-v0.9.26' +branch = 'duniter-substrate-v0.9.32' [dependencies.frame-support] default-features = false git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.26' +branch = 'duniter-substrate-v0.9.32' [dependencies.frame-system] default-features = false git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.26' +branch = 'duniter-substrate-v0.9.32' [dependencies.serde] version = "1.0.101" @@ -68,22 +68,22 @@ features = ["derive"] [dependencies.sp-core] default-features = false git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.26' +branch = 'duniter-substrate-v0.9.32' [dependencies.sp-io] default-features = false git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.26' +branch = 'duniter-substrate-v0.9.32' [dependencies.sp-runtime] default-features = false git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.26' +branch = 'duniter-substrate-v0.9.32' [dependencies.sp-std] default-features = false git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.26' +branch = 'duniter-substrate-v0.9.32' ### DOC ### @@ -96,4 +96,4 @@ version = '1.0.119' [dev-dependencies.sp-io] git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.26' +branch = 'duniter-substrate-v0.9.32' diff --git a/pallets/duniter-wot/src/lib.rs b/pallets/duniter-wot/src/lib.rs index 1d195b096b514ae5363721f7023c8fbe80513e83..e16695040c4d17761e7bd1698d9cbdc40eb37868 100644 --- a/pallets/duniter-wot/src/lib.rs +++ b/pallets/duniter-wot/src/lib.rs @@ -218,7 +218,7 @@ impl<T: Config<I>, I: 'static> sp_membership::traits::CheckCallAllowed<IdtyIndex fn check_idty_allowed_to_claim_membership(idty_index: &IdtyIndex) -> Result<(), DispatchError> { let idty_cert_meta = pallet_certification::Pallet::<T, I>::idty_cert_meta(idty_index); ensure!( - idty_cert_meta.received_count >= T::MinCertForMembership::get() as u32, + idty_cert_meta.received_count >= T::MinCertForMembership::get(), Error::<T, I>::IdtyNotAllowedToClaimMembership ); Ok(()) @@ -286,7 +286,7 @@ where }); } } - 0 + Weight::zero() } } @@ -321,7 +321,7 @@ impl<T: Config<I>, I: 'static> pallet_identity::traits::OnIdtyChange<T> for Pall } IdtyEvent::Confirmed | IdtyEvent::Validated | IdtyEvent::ChangedOwnerKey { .. } => {} } - 0 + Weight::zero() } } @@ -335,7 +335,7 @@ impl<T: Config<I>, I: 'static> pallet_certification::traits::OnNewcert<IdtyIndex if receiver_received_count == T::MinReceivedCertToBeAbleToIssueCert::get() { Self::do_apply_first_issuable_on(receiver); } - 0 + Weight::zero() } } @@ -370,6 +370,6 @@ impl<T: Config<I>, I: 'static> pallet_certification::traits::OnRemovedCert<IdtyI }); } } - 0 + Weight::zero() } } diff --git a/pallets/duniter-wot/src/mock.rs b/pallets/duniter-wot/src/mock.rs index f90f159b2c75248d460da2290faa5aec57cbe785..ef15c5518171981b45988e25c8e26201e99a5e9c 100644 --- a/pallets/duniter-wot/src/mock.rs +++ b/pallets/duniter-wot/src/mock.rs @@ -67,8 +67,8 @@ impl system::Config for Test { type BlockWeights = (); type BlockLength = (); type DbWeight = (); - type Origin = Origin; - type Call = Call; + type RuntimeOrigin = RuntimeOrigin; + type RuntimeCall = RuntimeCall; type Index = u64; type BlockNumber = u64; type Hash = H256; @@ -76,7 +76,7 @@ impl system::Config for Test { type AccountId = AccountId; type Lookup = IdentityLookup<Self::AccountId>; type Header = Header; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type BlockHashCount = BlockHashCount; type Version = (); type PalletInfo = PalletInfo; @@ -121,7 +121,6 @@ impl pallet_identity::traits::IdtyNameValidator for IdtyNameValidatorTestImpl { impl pallet_identity::Config for Test { type ChangeOwnerKeyPeriod = ChangeOwnerKeyPeriod; type ConfirmPeriod = ConfirmPeriod; - type Event = Event; type CheckIdtyCallAllowed = (DuniterWot, SmithsSubWot); type IdtyCreationPeriod = IdtyCreationPeriod; type IdtyData = (); @@ -133,6 +132,7 @@ impl pallet_identity::Config for Test { type RemoveIdentityConsumers = (); type RevocationSigner = UintAuthorityId; type RevocationSignature = TestSignature; + type RuntimeEvent = RuntimeEvent; } // Membership @@ -143,12 +143,12 @@ parameter_types! { impl pallet_membership::Config<Instance1> for Test { type CheckCallAllowed = DuniterWot; - type Event = Event; type IdtyId = IdtyIndex; type IdtyIdOf = IdentityIndexOf<Self>; type MembershipPeriod = MembershipPeriod; type MetaData = (); type OnEvent = DuniterWot; + type RuntimeEvent = RuntimeEvent; type PendingMembershipPeriod = PendingMembershipPeriod; } @@ -162,7 +162,6 @@ parameter_types! { impl pallet_certification::Config<Instance1> for Test { type CertPeriod = CertPeriod; - type Event = Event; type IdtyIndex = IdtyIndex; type OwnerKeyOf = Identity; type CheckCertAllowed = DuniterWot; @@ -170,6 +169,7 @@ impl pallet_certification::Config<Instance1> for Test { type MinReceivedCertToBeAbleToIssueCert = MinReceivedCertToBeAbleToIssueCert; type OnNewcert = DuniterWot; type OnRemovedCert = DuniterWot; + type RuntimeEvent = RuntimeEvent; type ValidityPeriod = ValidityPeriod; } @@ -195,13 +195,13 @@ parameter_types! { impl pallet_membership::Config<Instance2> for Test { type CheckCallAllowed = SmithsSubWot; - type Event = Event; type IdtyId = IdtyIndex; type IdtyIdOf = IdentityIndexOf<Self>; type MembershipPeriod = SmithsMembershipPeriod; type MetaData = (); type OnEvent = SmithsSubWot; type PendingMembershipPeriod = SmithsPendingMembershipPeriod; + type RuntimeEvent = RuntimeEvent; } // SmithsCert @@ -214,7 +214,6 @@ parameter_types! { impl pallet_certification::Config<Instance2> for Test { type CertPeriod = SmithsCertPeriod; - type Event = Event; type IdtyIndex = IdtyIndex; type OwnerKeyOf = Identity; type CheckCertAllowed = SmithsSubWot; @@ -222,6 +221,7 @@ impl pallet_certification::Config<Instance2> for Test { type MinReceivedCertToBeAbleToIssueCert = SmithsMinReceivedCertToBeAbleToIssueCert; type OnNewcert = SmithsSubWot; type OnRemovedCert = SmithsSubWot; + type RuntimeEvent = RuntimeEvent; type ValidityPeriod = SmithsValidityPeriod; } diff --git a/pallets/duniter-wot/src/tests.rs b/pallets/duniter-wot/src/tests.rs index 91c1715613d79774e693a7ce550763bf0d5eef2c..e098da0a65b3b0ab6edb5aadfe46b97f18082ec4 100644 --- a/pallets/duniter-wot/src/tests.rs +++ b/pallets/duniter-wot/src/tests.rs @@ -49,7 +49,7 @@ fn test_creator_not_allowed_to_create_idty() { // because Alice.next_issuable_on = 2 // but the true reason is that alice did not receive enough certs assert_noop!( - Identity::create_identity(Origin::signed(1), 4), + Identity::create_identity(RuntimeOrigin::signed(1), 4), pallet_duniter_wot::Error::<Test, Instance1>::NotEnoughReceivedCertsToCreateIdty ); }); @@ -61,26 +61,29 @@ fn test_join_smiths() { run_to_block(2); // Dave shoud be able to request smith membership - assert_ok!(SmithsMembership::request_membership(Origin::signed(4), ())); - System::assert_has_event(Event::SmithsMembership( + assert_ok!(SmithsMembership::request_membership( + RuntimeOrigin::signed(4), + () + )); + System::assert_has_event(RuntimeEvent::SmithsMembership( pallet_membership::Event::MembershipRequested(4), )); // Then, Alice should be able to send a smith cert to Dave run_to_block(3); - assert_ok!(SmithsCert::add_cert(Origin::signed(1), 1, 4)); + assert_ok!(SmithsCert::add_cert(RuntimeOrigin::signed(1), 1, 4)); // Then, Bob should be able to send a smith cert to Dave run_to_block(4); - assert_ok!(SmithsCert::add_cert(Origin::signed(2), 2, 4)); + assert_ok!(SmithsCert::add_cert(RuntimeOrigin::signed(2), 2, 4)); // Then, Dave should be able to claim his membership run_to_block(4); assert_ok!(SmithsMembership::claim_membership( - Origin::signed(4), + RuntimeOrigin::signed(4), Some(4) )); - System::assert_has_event(Event::SmithsMembership( + System::assert_has_event(RuntimeEvent::SmithsMembership( pallet_membership::Event::MembershipAcquired(4), )); }); @@ -91,7 +94,7 @@ fn test_smith_certs_expirations_should_revoke_smith_membership() { new_test_ext(5, 3).execute_with(|| { // After block #10, alice membership should be revoked due to smith certs expiration run_to_block(10); - System::assert_has_event(Event::SmithsMembership( + System::assert_has_event(RuntimeEvent::SmithsMembership( pallet_membership::Event::MembershipRevoked(1), )); }); @@ -112,7 +115,7 @@ fn test_smith_member_cant_change_its_idty_address() { // Identity 3 can't change it's address assert_noop!( Identity::change_owner_key( - Origin::signed(3), + RuntimeOrigin::signed(3), 13, TestSignature(13, (NEW_OWNER_KEY_PAYLOAD_PREFIX, new_key_payload).encode()) ), @@ -134,7 +137,7 @@ fn test_smith_member_cant_revoke_its_idty() { // Identity 3 can't change it's address assert_noop!( Identity::revoke_identity( - Origin::signed(3), + RuntimeOrigin::signed(3), 3, 3, TestSignature(3, (REVOCATION_PAYLOAD_PREFIX, revocation_payload).encode()) @@ -150,13 +153,15 @@ fn test_create_idty_ok() { run_to_block(2); // Alice should be able to create an identity at block #2 - assert_ok!(Identity::create_identity(Origin::signed(1), 6)); + assert_ok!(Identity::create_identity(RuntimeOrigin::signed(1), 6)); // 2 events should have occurred: IdtyCreated and NewCert - System::assert_has_event(Event::Identity(pallet_identity::Event::IdtyCreated { - idty_index: 6, - owner_key: 6, - })); - System::assert_has_event(Event::Cert(pallet_certification::Event::NewCert { + System::assert_has_event(RuntimeEvent::Identity( + pallet_identity::Event::IdtyCreated { + idty_index: 6, + owner_key: 6, + }, + )); + System::assert_has_event(RuntimeEvent::Cert(pallet_certification::Event::NewCert { issuer: 1, issuer_issued_count: 5, receiver: 6, @@ -173,19 +178,19 @@ fn test_new_idty_validation() { new_test_ext(5, 2).execute_with(|| { // Alice creates Ferdie identity run_to_block(2); - assert_ok!(Identity::create_identity(Origin::signed(1), 6)); + assert_ok!(Identity::create_identity(RuntimeOrigin::signed(1), 6)); // Ferdie confirms his identity run_to_block(3); assert_ok!(Identity::confirm_identity( - Origin::signed(6), + RuntimeOrigin::signed(6), IdtyName::from("Ferdie"), )); // Bob should be able to certify Ferdie run_to_block(4); - assert_ok!(Cert::add_cert(Origin::signed(2), 2, 6)); - System::assert_has_event(Event::Cert(pallet_certification::Event::NewCert { + assert_ok!(Cert::add_cert(RuntimeOrigin::signed(2), 2, 6)); + System::assert_has_event(RuntimeEvent::Cert(pallet_certification::Event::NewCert { issuer: 2, issuer_issued_count: 5, receiver: 6, @@ -194,13 +199,13 @@ fn test_new_idty_validation() { // Anyone should be able to validate Ferdie identity run_to_block(5); - assert_ok!(Identity::validate_identity(Origin::signed(42), 6)); - System::assert_has_event(Event::Membership( + assert_ok!(Identity::validate_identity(RuntimeOrigin::signed(42), 6)); + System::assert_has_event(RuntimeEvent::Membership( pallet_membership::Event::MembershipAcquired(6), )); - System::assert_has_event(Event::Identity(pallet_identity::Event::IdtyValidated { - idty_index: 6, - })); + System::assert_has_event(RuntimeEvent::Identity( + pallet_identity::Event::IdtyValidated { idty_index: 6 }, + )); // After PendingMembershipPeriod, Ferdie identity should not expire run_to_block(6); @@ -224,23 +229,25 @@ fn test_confirm_idty_ok() { run_to_block(2); // Alice creates Ferdie identity - assert_ok!(Identity::create_identity(Origin::signed(1), 6)); + assert_ok!(Identity::create_identity(RuntimeOrigin::signed(1), 6)); run_to_block(3); // Ferdie should be able to confirm his identity assert_ok!(Identity::confirm_identity( - Origin::signed(6), + RuntimeOrigin::signed(6), IdtyName::from("Ferdie"), )); - System::assert_has_event(Event::Membership( + System::assert_has_event(RuntimeEvent::Membership( pallet_membership::Event::MembershipRequested(6), )); - System::assert_has_event(Event::Identity(pallet_identity::Event::IdtyConfirmed { - idty_index: 6, - owner_key: 6, - name: IdtyName::from("Ferdie"), - })); + System::assert_has_event(RuntimeEvent::Identity( + pallet_identity::Event::IdtyConfirmed { + idty_index: 6, + owner_key: 6, + name: IdtyName::from("Ferdie"), + }, + )); }); } @@ -250,27 +257,27 @@ fn test_idty_membership_expire_them_requested() { run_to_block(4); // Alice renews her membership - assert_ok!(Membership::renew_membership(Origin::signed(1), None)); + assert_ok!(Membership::renew_membership(RuntimeOrigin::signed(1), None)); // Bob renews his membership - assert_ok!(Membership::renew_membership(Origin::signed(2), None)); + assert_ok!(Membership::renew_membership(RuntimeOrigin::signed(2), None)); // Charlie's membership should expire at block #8 run_to_block(8); assert!(Membership::membership(3).is_none()); - System::assert_has_event(Event::Membership( + System::assert_has_event(RuntimeEvent::Membership( pallet_membership::Event::MembershipExpired(3), )); - System::assert_has_event(Event::Identity(pallet_identity::Event::IdtyRemoved { - idty_index: 3, - })); + System::assert_has_event(RuntimeEvent::Identity( + pallet_identity::Event::IdtyRemoved { idty_index: 3 }, + )); // Charlie's identity should be removed at block #8 assert!(Identity::identity(3).is_none()); // Alice can't renew her cert to Charlie assert_noop!( - Cert::add_cert(Origin::signed(1), 1, 3), + Cert::add_cert(RuntimeOrigin::signed(1), 1, 3), pallet_duniter_wot::Error::<Test, Instance1>::IdtyNotFound ); }); @@ -281,12 +288,12 @@ fn test_unvalidated_idty_certs_removal() { new_test_ext(5, 2).execute_with(|| { // Alice creates Ferdie identity run_to_block(2); - assert_ok!(Identity::create_identity(Origin::signed(1), 6)); + assert_ok!(Identity::create_identity(RuntimeOrigin::signed(1), 6)); // Ferdie confirms his identity run_to_block(3); assert_ok!(Identity::confirm_identity( - Origin::signed(6), + RuntimeOrigin::signed(6), IdtyName::from("Ferdie"), )); diff --git a/pallets/identity/Cargo.toml b/pallets/identity/Cargo.toml index 98d9a68ed526c17cbfeeed35d91a9c40b96459cc..5eb5c216737c9c6df5030d9abafe118270591713 100644 --- a/pallets/identity/Cargo.toml +++ b/pallets/identity/Cargo.toml @@ -41,33 +41,33 @@ serde = { version = "1.0.101", features = ["derive"], optional = true } default-features = false git = 'https://github.com/duniter/substrate' optional = true -branch = 'duniter-substrate-v0.9.26' +branch = 'duniter-substrate-v0.9.32' [dependencies.frame-support] default-features = false git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.26' +branch = 'duniter-substrate-v0.9.32' [dependencies.frame-system] default-features = false git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.26' +branch = 'duniter-substrate-v0.9.32' [dependencies.sp-core] default-features = false git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.26' +branch = 'duniter-substrate-v0.9.32' [dependencies.sp-runtime] default-features = false git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.26' +branch = 'duniter-substrate-v0.9.32' [dependencies.sp-std] default-features = false git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.26' +branch = 'duniter-substrate-v0.9.32' [dev-dependencies] serde = '1.0.119' -sp-io = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26' } +sp-io = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32' } diff --git a/pallets/identity/src/lib.rs b/pallets/identity/src/lib.rs index 961b8e2f8d4a45d7adac24f25d94fde3a1a53a37..fc2dfe4e5e2282c8814f0d8b605a868789f1fe6f 100644 --- a/pallets/identity/src/lib.rs +++ b/pallets/identity/src/lib.rs @@ -68,8 +68,6 @@ pub mod pallet { #[pallet::constant] /// Minimum duration between two owner key changes type ChangeOwnerKeyPeriod: Get<Self::BlockNumber>; - /// Because this pallet emits events, it depends on the runtime's definition of an event. - type Event: From<Event<Self>> + IsType<<Self as frame_system::Config>::Event>; /// Management of the authorizations of the different calls. /// The default implementation allows everything. type CheckIdtyCallAllowed: CheckIdtyCallAllowed<Self>; @@ -109,6 +107,8 @@ pub mod pallet { type RevocationSigner: IdentifyAccount<AccountId = Self::AccountId>; /// Signature of revocation payload type RevocationSignature: Parameter + Verify<Signer = Self::RevocationSigner>; + /// 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>; } // GENESIS STUFF // @@ -205,7 +205,7 @@ pub mod pallet { if n > T::BlockNumber::zero() { Self::prune_identities(n) } else { - 0 + Weight::zero() } } } @@ -265,7 +265,7 @@ pub mod pallet { let creator = IdentityIndexOf::<T>::try_get(&who).map_err(|_| Error::<T>::IdtyIndexNotFound)?; let creator_idty_val = - Identities::<T>::try_get(&creator).map_err(|_| Error::<T>::IdtyNotFound)?; + Identities::<T>::try_get(creator).map_err(|_| Error::<T>::IdtyNotFound)?; if IdentityIndexOf::<T>::contains_key(&owner_key) { return Err(Error::<T>::IdtyAlreadyCreated.into()); @@ -643,7 +643,7 @@ pub mod pallet { }, ); } - 0 + Weight::zero() } fn get_next_idty_index() -> T::IdtyIndex { if let Ok(next_index) = <NextIdtyIndex<T>>::try_get() { @@ -655,7 +655,7 @@ pub mod pallet { } } fn prune_identities(block_number: T::BlockNumber) -> Weight { - let mut total_weight: Weight = 0; + let mut total_weight = Weight::zero(); for (idty_index, idty_status) in IdentitiesRemovableOn::<T>::take(block_number) { if let Ok(idty_val) = <Identities<T>>::try_get(idty_index) { diff --git a/pallets/identity/src/mock.rs b/pallets/identity/src/mock.rs index 6825ebf66759918a159a93444a45bb590459c869..53b8f4ec35c27c5f4ac2749326b4244c948a36ab 100644 --- a/pallets/identity/src/mock.rs +++ b/pallets/identity/src/mock.rs @@ -53,8 +53,8 @@ impl system::Config for Test { type BlockWeights = (); type BlockLength = (); type DbWeight = (); - type Origin = Origin; - type Call = Call; + type RuntimeOrigin = RuntimeOrigin; + type RuntimeCall = RuntimeCall; type Index = u64; type BlockNumber = u64; type Hash = H256; @@ -62,7 +62,7 @@ impl system::Config for Test { type AccountId = AccountId; type Lookup = IdentityLookup<Self::AccountId>; type Header = Header; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type BlockHashCount = BlockHashCount; type Version = (); type PalletInfo = PalletInfo; @@ -93,7 +93,6 @@ impl pallet_identity::traits::IdtyNameValidator for IdtyNameValidatorTestImpl { impl pallet_identity::Config for Test { type ChangeOwnerKeyPeriod = ChangeOwnerKeyPeriod; type ConfirmPeriod = ConfirmPeriod; - type Event = Event; type CheckIdtyCallAllowed = (); type IdtyCreationPeriod = IdtyCreationPeriod; type IdtyData = (); @@ -105,6 +104,7 @@ impl pallet_identity::Config for Test { type RemoveIdentityConsumers = (); type RevocationSigner = UintAuthorityId; type RevocationSignature = TestSignature; + type RuntimeEvent = RuntimeEvent; } // Build genesis storage according to the mock runtime. diff --git a/pallets/identity/src/tests.rs b/pallets/identity/src/tests.rs index 1c81e75583ac91f9080a61e0fa1c5fd73181066e..ea495479017617d449f012a2fc7e680cdb0e23bc 100644 --- a/pallets/identity/src/tests.rs +++ b/pallets/identity/src/tests.rs @@ -75,9 +75,9 @@ fn test_create_identity_ok() { run_to_block(1); // Alice should be able to create an identity - assert_ok!(Identity::create_identity(Origin::signed(1), 2)); + assert_ok!(Identity::create_identity(RuntimeOrigin::signed(1), 2)); - System::assert_has_event(Event::Identity(crate::Event::IdtyCreated { + System::assert_has_event(RuntimeEvent::Identity(crate::Event::IdtyCreated { idty_index: 2, owner_key: 2, })); @@ -94,18 +94,20 @@ fn test_create_identity_but_not_confirm_it() { run_to_block(1); // Alice should be able to create an identity - assert_ok!(Identity::create_identity(Origin::signed(1), 2)); + assert_ok!(Identity::create_identity(RuntimeOrigin::signed(1), 2)); // The identity shoud expire in blocs #3 run_to_block(3); - System::assert_has_event(Event::Identity(crate::Event::IdtyRemoved { idty_index: 2 })); + System::assert_has_event(RuntimeEvent::Identity(crate::Event::IdtyRemoved { + idty_index: 2, + })); // We shoud be able to recreate the identity run_to_block(4); - assert_ok!(Identity::create_identity(Origin::signed(1), 2)); + assert_ok!(Identity::create_identity(RuntimeOrigin::signed(1), 2)); - System::assert_has_event(Event::Identity(crate::Event::IdtyCreated { + System::assert_has_event(RuntimeEvent::Identity(crate::Event::IdtyCreated { idty_index: 3, owner_key: 2, })); @@ -122,9 +124,9 @@ fn test_idty_creation_period() { run_to_block(1); // Alice should be able to create an identity - assert_ok!(Identity::create_identity(Origin::signed(1), 2)); + assert_ok!(Identity::create_identity(RuntimeOrigin::signed(1), 2)); - System::assert_has_event(Event::Identity(crate::Event::IdtyCreated { + System::assert_has_event(RuntimeEvent::Identity(crate::Event::IdtyCreated { idty_index: 2, owner_key: 2, })); @@ -134,15 +136,15 @@ fn test_idty_creation_period() { // Alice cannot create a new identity before block #4 run_to_block(2); assert_eq!( - Identity::create_identity(Origin::signed(1), 3), + Identity::create_identity(RuntimeOrigin::signed(1), 3), Err(Error::<Test>::NotRespectIdtyCreationPeriod.into()) ); // Alice should be able to create a second identity after block #4 run_to_block(4); - assert_ok!(Identity::create_identity(Origin::signed(1), 3)); + assert_ok!(Identity::create_identity(RuntimeOrigin::signed(1), 3)); - System::assert_has_event(Event::Identity(crate::Event::IdtyCreated { + System::assert_has_event(RuntimeEvent::Identity(crate::Event::IdtyCreated { idty_index: 3, owner_key: 3, })); @@ -173,7 +175,7 @@ fn test_change_owner_key() { // Caller should have an associated identity assert_noop!( Identity::change_owner_key( - Origin::signed(42), + RuntimeOrigin::signed(42), 10, TestSignature(10, (NEW_OWNER_KEY_PAYLOAD_PREFIX, new_key_payload).encode()) ), @@ -183,7 +185,7 @@ fn test_change_owner_key() { // Payload must be signed by the new key assert_noop!( Identity::change_owner_key( - Origin::signed(1), + RuntimeOrigin::signed(1), 10, TestSignature(42, (NEW_OWNER_KEY_PAYLOAD_PREFIX, new_key_payload).encode()) ), @@ -193,7 +195,7 @@ fn test_change_owner_key() { // Payload must be prefixed assert_noop!( Identity::change_owner_key( - Origin::signed(1), + RuntimeOrigin::signed(1), 10, TestSignature(10, new_key_payload.encode()) ), @@ -203,7 +205,7 @@ fn test_change_owner_key() { // New owner key should not be used by another identity assert_noop!( Identity::change_owner_key( - Origin::signed(1), + RuntimeOrigin::signed(1), 2, TestSignature(2, (NEW_OWNER_KEY_PAYLOAD_PREFIX, new_key_payload).encode()) ), @@ -212,7 +214,7 @@ fn test_change_owner_key() { // Alice can change her owner key assert_ok!(Identity::change_owner_key( - Origin::signed(1), + RuntimeOrigin::signed(1), 10, TestSignature(10, (NEW_OWNER_KEY_PAYLOAD_PREFIX, new_key_payload).encode()) )); @@ -238,7 +240,7 @@ fn test_change_owner_key() { new_key_payload.old_owner_key = &10; assert_noop!( Identity::change_owner_key( - Origin::signed(10), + RuntimeOrigin::signed(10), 100, TestSignature( 100, @@ -251,7 +253,7 @@ fn test_change_owner_key() { // Alice can re-change her owner key after ChangeOwnerKeyPeriod blocs run_to_block(2 + <Test as crate::Config>::ChangeOwnerKeyPeriod::get()); assert_ok!(Identity::change_owner_key( - Origin::signed(10), + RuntimeOrigin::signed(10), 100, TestSignature( 100, @@ -267,7 +269,7 @@ fn test_change_owner_key() { // Revoke identity 1 assert_ok!(Identity::revoke_identity( - Origin::signed(42), + RuntimeOrigin::signed(42), 1, 100, TestSignature( @@ -311,7 +313,7 @@ fn test_idty_revocation_with_old_key() { // Change alice owner key assert_ok!(Identity::change_owner_key( - Origin::signed(1), + RuntimeOrigin::signed(1), 10, TestSignature(10, (NEW_OWNER_KEY_PAYLOAD_PREFIX, new_key_payload).encode()) )); @@ -323,7 +325,7 @@ fn test_idty_revocation_with_old_key() { // We should be able to revoke Alice identity with old key run_to_block(2); assert_ok!(Identity::revoke_identity( - Origin::signed(42), + RuntimeOrigin::signed(42), 1, 1, TestSignature(1, (REVOCATION_PAYLOAD_PREFIX, revocation_payload).encode()) @@ -355,7 +357,7 @@ fn test_idty_revocation_with_old_key_after_old_key_expiration() { // Change alice owner key assert_ok!(Identity::change_owner_key( - Origin::signed(1), + RuntimeOrigin::signed(1), 10, TestSignature(10, (NEW_OWNER_KEY_PAYLOAD_PREFIX, new_key_payload).encode()) )); @@ -368,7 +370,7 @@ fn test_idty_revocation_with_old_key_after_old_key_expiration() { run_to_block(2 + <Test as crate::Config>::ChangeOwnerKeyPeriod::get()); assert_noop!( Identity::revoke_identity( - Origin::signed(42), + RuntimeOrigin::signed(42), 1, 1, TestSignature(1, (REVOCATION_PAYLOAD_PREFIX, revocation_payload).encode()) @@ -395,7 +397,7 @@ fn test_idty_revocation() { // Payload must be signed by the right identity assert_eq!( Identity::revoke_identity( - Origin::signed(1), + RuntimeOrigin::signed(1), 1, 42, TestSignature(42, (REVOCATION_PAYLOAD_PREFIX, revocation_payload).encode()) @@ -406,7 +408,7 @@ fn test_idty_revocation() { // Payload must be prefixed assert_eq!( Identity::revoke_identity( - Origin::signed(1), + RuntimeOrigin::signed(1), 1, 1, TestSignature(1, revocation_payload.encode()) @@ -416,23 +418,25 @@ fn test_idty_revocation() { // Anyone can submit a revocation payload assert_ok!(Identity::revoke_identity( - Origin::signed(42), + RuntimeOrigin::signed(42), 1, 1, TestSignature(1, (REVOCATION_PAYLOAD_PREFIX, revocation_payload).encode()) )); - System::assert_has_event(Event::System(frame_system::Event::KilledAccount { + System::assert_has_event(RuntimeEvent::System(frame_system::Event::KilledAccount { account: 1, })); - System::assert_has_event(Event::Identity(crate::Event::IdtyRemoved { idty_index: 1 })); + System::assert_has_event(RuntimeEvent::Identity(crate::Event::IdtyRemoved { + idty_index: 1, + })); run_to_block(2); // The identity no longer exists assert_eq!( Identity::revoke_identity( - Origin::signed(1), + RuntimeOrigin::signed(1), 1, 1, TestSignature(1, (REVOCATION_PAYLOAD_PREFIX, revocation_payload).encode()) diff --git a/pallets/identity/src/traits.rs b/pallets/identity/src/traits.rs index cc6230e4c101b5775f57f1029430225f04c367d0..54b50a06c4e6e660779b2a6eda7b09c73ebc3f25 100644 --- a/pallets/identity/src/traits.rs +++ b/pallets/identity/src/traits.rs @@ -17,7 +17,6 @@ use crate::*; use frame_support::pallet_prelude::*; use impl_trait_for_tuples::impl_for_tuples; -use sp_runtime::traits::Saturating; pub trait CheckIdtyCallAllowed<T: Config> { fn check_create_identity(creator: T::IdtyIndex) -> Result<(), DispatchError>; @@ -63,7 +62,7 @@ pub trait OnIdtyChange<T: Config> { #[allow(clippy::let_and_return)] impl<T: Config> OnIdtyChange<T> for Tuple { fn on_idty_change(idty_index: T::IdtyIndex, idty_event: &IdtyEvent<T>) -> Weight { - let mut weight = 0; + let mut weight = Weight::zero(); for_tuples!( #( weight = weight.saturating_add(Tuple::on_idty_change(idty_index, idty_event)); )* ); weight } @@ -74,6 +73,6 @@ pub trait RemoveIdentityConsumers<IndtyIndex> { } impl<IndtyIndex> RemoveIdentityConsumers<IndtyIndex> for () { fn remove_idty_consumers(_: IndtyIndex) -> Weight { - 0 + Weight::zero() } } diff --git a/pallets/membership/Cargo.toml b/pallets/membership/Cargo.toml index 4afafd852dcdca32ba01c589f3f226c0a14dfddc..2d0c23a9d239db6b36ff0234262eed180f83fb20 100644 --- a/pallets/membership/Cargo.toml +++ b/pallets/membership/Cargo.toml @@ -41,17 +41,17 @@ version = "3.1.5" default-features = false git = 'https://github.com/duniter/substrate' optional = true -branch = 'duniter-substrate-v0.9.26' +branch = 'duniter-substrate-v0.9.32' [dependencies.frame-support] default-features = false git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.26' +branch = 'duniter-substrate-v0.9.32' [dependencies.frame-system] default-features = false git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.26' +branch = 'duniter-substrate-v0.9.32' [dependencies.serde] version = "1.0.101" @@ -61,17 +61,17 @@ features = ["derive"] [dependencies.sp-core] default-features = false git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.26' +branch = 'duniter-substrate-v0.9.32' [dependencies.sp-runtime] default-features = false git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.26' +branch = 'duniter-substrate-v0.9.32' [dependencies.sp-std] default-features = false git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.26' +branch = 'duniter-substrate-v0.9.32' ### DOC ### @@ -88,4 +88,4 @@ version = '1.0.2' [dev-dependencies.sp-io] default-features = false git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.26' +branch = 'duniter-substrate-v0.9.32' diff --git a/pallets/membership/src/lib.rs b/pallets/membership/src/lib.rs index aebd602cec3a4b7e5933d34947288b60fa1998de..154acb37249885046c32ead98433e2476eb04bac 100644 --- a/pallets/membership/src/lib.rs +++ b/pallets/membership/src/lib.rs @@ -61,8 +61,6 @@ pub mod pallet { pub trait Config<I: 'static = ()>: frame_system::Config { /// Ask the runtime whether the identity can perform membership operations type CheckCallAllowed: CheckCallAllowed<Self::IdtyId>; - /// Because this pallet emits events, it depends on the runtime's definition of an event. - type Event: From<Event<Self, I>> + IsType<<Self as frame_system::Config>::Event>; /// Something that identifies an identity type IdtyId: Copy + MaybeSerializeDeserialize + Parameter + Ord; /// Something that give the IdtyId on an account id @@ -77,6 +75,9 @@ pub mod pallet { #[pallet::constant] /// Maximum period (in number of blocks), where an identity can remain pending subscription. type PendingMembershipPeriod: Get<Self::BlockNumber>; + /// Because this pallet emits events, it depends on the runtime's definition of an event. + type RuntimeEvent: From<Event<Self, I>> + + IsType<<Self as frame_system::Config>::RuntimeEvent>; } // GENESIS STUFF // @@ -180,7 +181,7 @@ pub mod pallet { if n > T::BlockNumber::zero() { Self::expire_pending_memberships(n) + Self::expire_memberships(n) } else { - 0 + Weight::zero() } } } @@ -225,13 +226,13 @@ pub mod pallet { let idty_id = Self::ensure_origin_and_get_idty_id(origin, maybe_idty_id)?; ensure!( - !Membership::<T, I>::contains_key(&idty_id), + !Membership::<T, I>::contains_key(idty_id), Error::<T, I>::MembershipAlreadyAcquired ); T::CheckCallAllowed::check_idty_allowed_to_claim_membership(&idty_id)?; - let metadata = PendingMembership::<T, I>::take(&idty_id) + let metadata = PendingMembership::<T, I>::take(idty_id) .ok_or(Error::<T, I>::MembershipRequestNotFound)?; // Apply phase @@ -295,16 +296,16 @@ pub mod pallet { Self::insert_membership(idty_id, MembershipData { expire_on }); MembershipsExpireOn::<T, I>::append(expire_on, idty_id); - 0 + Weight::zero() } fn do_request_membership( idty_id: T::IdtyId, metadata: T::MetaData, ) -> DispatchResultWithPostInfo { - if PendingMembership::<T, I>::contains_key(&idty_id) { + if PendingMembership::<T, I>::contains_key(idty_id) { return Err(Error::<T, I>::MembershipAlreadyRequested.into()); } - if Membership::<T, I>::contains_key(&idty_id) { + if Membership::<T, I>::contains_key(idty_id) { return Err(Error::<T, I>::MembershipAlreadyAcquired.into()); } @@ -332,7 +333,7 @@ pub mod pallet { } } fn expire_memberships(block_number: T::BlockNumber) -> Weight { - let mut total_weight: Weight = 0; + let mut total_weight: Weight = Weight::zero(); for idty_id in MembershipsExpireOn::<T, I>::take(block_number) { if let Some(member_data) = Self::get_membership(&idty_id) { @@ -348,10 +349,10 @@ pub mod pallet { total_weight } fn expire_pending_memberships(block_number: T::BlockNumber) -> Weight { - let mut total_weight: Weight = 0; + let mut total_weight: Weight = Weight::zero(); for idty_id in PendingMembershipsExpireOn::<T, I>::take(block_number) { - if PendingMembership::<T, I>::take(&idty_id).is_some() { + if PendingMembership::<T, I>::take(idty_id).is_some() { Self::deposit_event(Event::PendingMembershipExpired(idty_id)); total_weight += T::OnEvent::on_event( &sp_membership::Event::PendingMembershipExpired(idty_id), diff --git a/pallets/membership/src/mock.rs b/pallets/membership/src/mock.rs index b292910e0a9c9ec79f5d42f03b9872b14e2916f8..93bb61d0db04e8f607cc809990f4debcc1421495 100644 --- a/pallets/membership/src/mock.rs +++ b/pallets/membership/src/mock.rs @@ -55,8 +55,8 @@ impl system::Config for Test { type BlockWeights = (); type BlockLength = (); type DbWeight = (); - type Origin = Origin; - type Call = Call; + type RuntimeOrigin = RuntimeOrigin; + type RuntimeCall = RuntimeCall; type Index = u64; type BlockNumber = BlockNumber; type Hash = H256; @@ -64,7 +64,7 @@ impl system::Config for Test { type AccountId = AccountId; type Lookup = IdentityLookup<Self::AccountId>; type Header = Header; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type BlockHashCount = BlockHashCount; type Version = (); type PalletInfo = PalletInfo; @@ -84,13 +84,13 @@ parameter_types! { impl pallet_membership::Config for Test { type CheckCallAllowed = (); - type Event = Event; type IdtyId = IdtyId; type IdtyIdOf = ConvertInto; type MembershipPeriod = MembershipPeriod; type MetaData = (); type OnEvent = (); type PendingMembershipPeriod = PendingMembershipPeriod; + type RuntimeEvent = RuntimeEvent; } // Build genesis storage according to the mock runtime. diff --git a/pallets/membership/src/tests.rs b/pallets/membership/src/tests.rs index f78b62fe308b88a61422beea319c3644e62859cd..b730a80f4474d9d46c11683a250548c055c9da90 100644 --- a/pallets/membership/src/tests.rs +++ b/pallets/membership/src/tests.rs @@ -14,7 +14,6 @@ // 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 crate::mock::Event as RuntimeEvent; use crate::mock::*; use crate::{Error, Event}; use frame_support::assert_ok; @@ -52,7 +51,7 @@ fn test_membership_already_acquired() { run_to_block(1); // Merbership 0 cannot be reclaimed assert_eq!( - DefaultMembership::claim_membership(Origin::signed(0), None), + DefaultMembership::claim_membership(RuntimeOrigin::signed(0), None), Err(Error::<Test, _>::MembershipAlreadyAcquired.into()) ); }); @@ -64,7 +63,7 @@ fn test_membership_request_not_found() { run_to_block(1); // Merbership 0 cannot be reclaimed assert_eq!( - DefaultMembership::claim_membership(Origin::signed(1), None), + DefaultMembership::claim_membership(RuntimeOrigin::signed(1), None), Err(Error::<Test, _>::MembershipRequestNotFound.into()) ); }); @@ -75,7 +74,10 @@ fn test_membership_renewal() { new_test_ext(default_gen_conf()).execute_with(|| { run_to_block(2); // Merbership 0 can be renewable on block #2 - assert_ok!(DefaultMembership::renew_membership(Origin::signed(0), None),); + assert_ok!(DefaultMembership::renew_membership( + RuntimeOrigin::signed(0), + None + ),); assert_eq!( System::events()[0].event, RuntimeEvent::DefaultMembership(Event::MembershipRenewed(0)) @@ -105,7 +107,7 @@ fn test_membership_revocation() { run_to_block(1); // Merbership 0 can be revocable on block #1 assert_ok!(DefaultMembership::revoke_membership( - Origin::signed(0), + RuntimeOrigin::signed(0), None ),); assert_eq!( @@ -115,7 +117,10 @@ fn test_membership_revocation() { // Membership 0 can re-request membership run_to_block(5); - assert_ok!(DefaultMembership::request_membership(Origin::signed(0), ()),); + assert_ok!(DefaultMembership::request_membership( + RuntimeOrigin::signed(0), + () + ),); assert_eq!( System::events()[0].event, RuntimeEvent::DefaultMembership(Event::MembershipRequested(0)) @@ -128,7 +133,10 @@ fn test_pending_membership_expiration() { new_test_ext(Default::default()).execute_with(|| { // Idty 0 request membership run_to_block(1); - assert_ok!(DefaultMembership::request_membership(Origin::signed(0), ()),); + assert_ok!(DefaultMembership::request_membership( + RuntimeOrigin::signed(0), + () + ),); assert_eq!( System::events()[0].event, RuntimeEvent::DefaultMembership(Event::MembershipRequested(0)) @@ -153,7 +161,10 @@ fn test_membership_workflow() { new_test_ext(Default::default()).execute_with(|| { // Idty 0 request membership run_to_block(1); - assert_ok!(DefaultMembership::request_membership(Origin::signed(0), ()),); + assert_ok!(DefaultMembership::request_membership( + RuntimeOrigin::signed(0), + () + ),); assert_eq!( System::events()[0].event, RuntimeEvent::DefaultMembership(Event::MembershipRequested(0)) @@ -161,7 +172,10 @@ fn test_membership_workflow() { // Then, idty 0 claim membership run_to_block(2); - assert_ok!(DefaultMembership::claim_membership(Origin::signed(0), None),); + assert_ok!(DefaultMembership::claim_membership( + RuntimeOrigin::signed(0), + None + ),); assert_eq!( System::events()[0].event, RuntimeEvent::DefaultMembership(Event::MembershipAcquired(0)) @@ -169,7 +183,10 @@ fn test_membership_workflow() { // Then, idty 0 claim renewal, should success run_to_block(2); - assert_ok!(DefaultMembership::renew_membership(Origin::signed(0), None),); + assert_ok!(DefaultMembership::renew_membership( + RuntimeOrigin::signed(0), + None + ),); // Then, idty 0 shoul still member until membership period ended run_to_block(2 + MembershipPeriod::get() - 1); diff --git a/pallets/oneshot-account/Cargo.toml b/pallets/oneshot-account/Cargo.toml index da1f4189c0682ab362639b11159086310e9a310a..f17a8e1d2962d71aeadd4bb3e5ec5004dd8d7ae7 100644 --- a/pallets/oneshot-account/Cargo.toml +++ b/pallets/oneshot-account/Cargo.toml @@ -34,49 +34,49 @@ log = { version = "0.4.14", default-features = false } scale-info = { version = "2.1.1", default-features = false, features = ["derive"] } # benchmarks -pallet-balances = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', optional = true, default-features = false } +pallet-balances = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', optional = true, default-features = false } # substrate [dependencies.frame-benchmarking] default-features = false git = 'https://github.com/duniter/substrate' optional = true -branch = 'duniter-substrate-v0.9.26' +branch = 'duniter-substrate-v0.9.32' [dependencies.frame-support] default-features = false git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.26' +branch = 'duniter-substrate-v0.9.32' [dependencies.frame-system] default-features = false git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.26' +branch = 'duniter-substrate-v0.9.32' [dependencies.pallet-transaction-payment] default-features = false git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.26' +branch = 'duniter-substrate-v0.9.32' [dependencies.sp-core] default-features = false git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.26' +branch = 'duniter-substrate-v0.9.32' [dependencies.sp-io] default-features = false git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.26' +branch = 'duniter-substrate-v0.9.32' [dependencies.sp-runtime] default-features = false git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.26' +branch = 'duniter-substrate-v0.9.32' [dependencies.sp-std] default-features = false git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.26' +branch = 'duniter-substrate-v0.9.32' ### DOC ### @@ -87,8 +87,8 @@ targets = ['x86_64-unknown-linux-gnu'] [dev-dependencies.sp-io] git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.26' +branch = 'duniter-substrate-v0.9.32' [dev-dependencies.pallet-balances] git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.26' +branch = 'duniter-substrate-v0.9.32' diff --git a/pallets/oneshot-account/src/check_nonce.rs b/pallets/oneshot-account/src/check_nonce.rs index 2643a9ff068712f3f4757fa95cb410f32847a577..fc2103a1655309b14b7428a0ae20bf9f7a449b47 100644 --- a/pallets/oneshot-account/src/check_nonce.rs +++ b/pallets/oneshot-account/src/check_nonce.rs @@ -17,8 +17,8 @@ use crate::Config; use codec::{Decode, Encode}; +use frame_support::dispatch::DispatchInfo; use frame_support::traits::IsSubType; -use frame_support::weights::DispatchInfo; //use frame_system::Config; use scale_info::TypeInfo; use sp_runtime::{ @@ -30,6 +30,12 @@ use sp_runtime::{ #[scale_info(skip_type_params(Runtime))] pub struct CheckNonce<T: Config>(pub frame_system::CheckNonce<T>); +impl<T: Config> From<frame_system::CheckNonce<T>> for CheckNonce<T> { + fn from(check_nonce: frame_system::CheckNonce<T>) -> Self { + Self(check_nonce) + } +} + impl<T: Config> sp_std::fmt::Debug for CheckNonce<T> { #[cfg(feature = "std")] fn fmt(&self, f: &mut sp_std::fmt::Formatter) -> sp_std::fmt::Result { @@ -44,10 +50,10 @@ impl<T: Config> sp_std::fmt::Debug for CheckNonce<T> { impl<T: Config + TypeInfo> SignedExtension for CheckNonce<T> where - T::Call: Dispatchable<Info = DispatchInfo> + IsSubType<crate::Call<T>>, + T::RuntimeCall: Dispatchable<Info = DispatchInfo> + IsSubType<crate::Call<T>>, { type AccountId = <T as frame_system::Config>::AccountId; - type Call = <T as frame_system::Config>::Call; + type Call = <T as frame_system::Config>::RuntimeCall; type AdditionalSigned = (); type Pre = (); const IDENTIFIER: &'static str = "CheckNonce"; diff --git a/pallets/oneshot-account/src/lib.rs b/pallets/oneshot-account/src/lib.rs index 4381f154356cb471d3fe0bcbaa1f90a7738796ac..6c1b7f72e95dd48d7d4e1ffdfdf5b1da1ef0950f 100644 --- a/pallets/oneshot-account/src/lib.rs +++ b/pallets/oneshot-account/src/lib.rs @@ -54,8 +54,8 @@ pub mod pallet { #[pallet::config] pub trait Config: frame_system::Config + pallet_transaction_payment::Config { type Currency: Currency<Self::AccountId>; - type Event: From<Event<Self>> + IsType<<Self as frame_system::Config>::Event>; type InnerOnChargeTransaction: OnChargeTransaction<Self>; + type RuntimeEvent: From<Event<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>; } // STORAGE // @@ -315,7 +315,7 @@ pub mod pallet { impl<T: Config> OnChargeTransaction<T> for Pallet<T> where - T::Call: IsSubType<Call<T>>, + T::RuntimeCall: IsSubType<Call<T>>, T::InnerOnChargeTransaction: OnChargeTransaction< T, Balance = <T::Currency as Currency<T::AccountId>>::Balance, @@ -326,8 +326,8 @@ where type LiquidityInfo = Option<<T::Currency as Currency<T::AccountId>>::NegativeImbalance>; fn withdraw_fee( who: &T::AccountId, - call: &T::Call, - dispatch_info: &DispatchInfoOf<T::Call>, + call: &T::RuntimeCall, + dispatch_info: &DispatchInfoOf<T::RuntimeCall>, fee: Self::Balance, tip: Self::Balance, ) -> Result<Self::LiquidityInfo, TransactionValidityError> { @@ -340,7 +340,7 @@ where return Ok(None); } - if let Some(balance) = OneshotAccounts::<T>::get(&who) { + if let Some(balance) = OneshotAccounts::<T>::get(who) { if balance >= fee { OneshotAccounts::<T>::insert(who, balance.saturating_sub(fee)); Self::deposit_event(Event::Withdraw { @@ -362,8 +362,8 @@ where } fn correct_and_deposit_fee( who: &T::AccountId, - dispatch_info: &DispatchInfoOf<T::Call>, - post_info: &PostDispatchInfoOf<T::Call>, + dispatch_info: &DispatchInfoOf<T::RuntimeCall>, + post_info: &PostDispatchInfoOf<T::RuntimeCall>, corrected_fee: Self::Balance, tip: Self::Balance, already_withdrawn: Self::LiquidityInfo, diff --git a/pallets/oneshot-account/src/mock.rs b/pallets/oneshot-account/src/mock.rs index 435ef58839c9e8d6c1ac44cb3023c32afc56013d..89ee71c47ee5cfe2d0c60769453c8a97bb4c76f1 100644 --- a/pallets/oneshot-account/src/mock.rs +++ b/pallets/oneshot-account/src/mock.rs @@ -54,8 +54,8 @@ impl system::Config for Test { type BlockWeights = (); type BlockLength = (); type DbWeight = (); - type Origin = Origin; - type Call = Call; + type RuntimeOrigin = RuntimeOrigin; + type RuntimeCall = RuntimeCall; type Index = u64; type BlockNumber = u64; type Hash = H256; @@ -63,7 +63,7 @@ impl system::Config for Test { type AccountId = u64; type Lookup = IdentityLookup<Self::AccountId>; type Header = Header; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type BlockHashCount = BlockHashCount; type Version = (); type PalletInfo = PalletInfo; @@ -84,16 +84,16 @@ parameter_types! { impl pallet_balances::Config for Test { type Balance = Balance; type DustRemoval = (); - type Event = Event; type ExistentialDeposit = ExistentialDeposit; type AccountStore = System; type WeightInfo = pallet_balances::weights::SubstrateWeight<Test>; type MaxLocks = MaxLocks; type MaxReserves = (); type ReserveIdentifier = [u8; 8]; + type RuntimeEvent = RuntimeEvent; } impl pallet_transaction_payment::Config for Test { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type OnChargeTransaction = OneshotAccount; type OperationalFeeMultiplier = frame_support::traits::ConstU8<5>; type WeightToFee = IdentityFee<u64>; @@ -102,8 +102,8 @@ impl pallet_transaction_payment::Config for Test { } impl pallet_oneshot_account::Config for Test { type Currency = Balances; - type Event = Event; type InnerOnChargeTransaction = CurrencyAdapter<Balances, HandleFees>; + type RuntimeEvent = RuntimeEvent; } pub struct HandleFees; diff --git a/pallets/oneshot-account/src/weights.rs b/pallets/oneshot-account/src/weights.rs index a4cbfbe78a9f76a68879cdc9e675a8518987bb7f..4fe386ab942d4798fb7e03bd4ac911d6fd867df0 100644 --- a/pallets/oneshot-account/src/weights.rs +++ b/pallets/oneshot-account/src/weights.rs @@ -29,24 +29,24 @@ pub trait WeightInfo { impl WeightInfo for () { // Storage: OneshotAccount OneshotAccounts (r:1 w:1) fn create_oneshot_account() -> Weight { - (45_690_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) + (Weight::from_ref_time(45_690_000)) + .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) fn consume_oneshot_account() -> Weight { - (50_060_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(3 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) + (Weight::from_ref_time(50_060_000)) + .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) fn consume_oneshot_account_with_remaining() -> Weight { - (69_346_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(4 as Weight)) - .saturating_add(RocksDbWeight::get().writes(3 as Weight)) + (Weight::from_ref_time(69_346_000)) + .saturating_add(RocksDbWeight::get().reads(4)) + .saturating_add(RocksDbWeight::get().writes(3)) } } diff --git a/pallets/provide-randomness/Cargo.toml b/pallets/provide-randomness/Cargo.toml index cbbfe53e4870ebae8264ff30c5c6f7176db21687..5caab0b725aa418d0b7539db577f4c680ab434e7 100644 --- a/pallets/provide-randomness/Cargo.toml +++ b/pallets/provide-randomness/Cargo.toml @@ -37,37 +37,37 @@ version = "3.1.5" default-features = false git = 'https://github.com/duniter/substrate' optional = true -branch = 'duniter-substrate-v0.9.26' +branch = 'duniter-substrate-v0.9.32' [dependencies.frame-support] default-features = false git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.26' +branch = 'duniter-substrate-v0.9.32' [dependencies.frame-system] default-features = false git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.26' +branch = 'duniter-substrate-v0.9.32' [dependencies.sp-core] default-features = false git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.26' +branch = 'duniter-substrate-v0.9.32' [dependencies.sp-io] default-features = false git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.26' +branch = 'duniter-substrate-v0.9.32' [dependencies.sp-std] default-features = false git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.26' +branch = 'duniter-substrate-v0.9.32' [dependencies.sp-runtime] default-features = false git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.26' +branch = 'duniter-substrate-v0.9.32' ### DOC ### diff --git a/pallets/provide-randomness/src/lib.rs b/pallets/provide-randomness/src/lib.rs index ddaaea3e3578b0d38e7001f8ecda676dc5ca6199..545cf81a8e724995607c43bd112b709b632a9567 100644 --- a/pallets/provide-randomness/src/lib.rs +++ b/pallets/provide-randomness/src/lib.rs @@ -33,7 +33,7 @@ pub trait OnFilledRandomness { } impl OnFilledRandomness for () { fn on_filled_randomness(_: RequestId, _: H256) -> Weight { - 0 + Weight::zero() } } @@ -67,8 +67,6 @@ pub mod pallet { pub trait Config: frame_system::Config<Hash = H256> { // The currency type Currency: Currency<Self::AccountId>; - /// The overarching event type. - type Event: From<Event> + IsType<<Self as frame_system::Config>::Event>; /// Get the current epoch index type GetCurrentEpochIndex: Get<u64>; /// Maximum number of not yet filled requests @@ -85,6 +83,8 @@ pub mod pallet { type ParentBlockRandomness: Randomness<Option<H256>, Self::BlockNumber>; /// A safe source of randomness from one epoch ago type RandomnessFromOneEpochAgo: Randomness<H256, Self::BlockNumber>; + /// The overarching event type. + type RuntimeEvent: From<Event> + IsType<<Self as frame_system::Config>::RuntimeEvent>; } // STORAGE // @@ -165,9 +165,11 @@ pub mod pallet { #[pallet::hooks] impl<T: Config> Hooks<BlockNumberFor<T>> for Pallet<T> { fn on_initialize(_: T::BlockNumber) -> Weight { - let mut total_weight = 0; + let request_weight = Weight::from_ref_time(100_000); + + let mut total_weight = Weight::zero(); - total_weight += 100_000; + total_weight += request_weight; for Request { request_id, salt } in RequestsReadyAtNextBlock::<T>::take() { let randomness = T::ParentBlockRandomness::random(salt.as_ref()) .0 @@ -178,14 +180,14 @@ pub mod pallet { request_id, randomness, }); - total_weight += 100_000; + total_weight += request_weight; } let next_epoch_hook_in = NexEpochHookIn::<T>::mutate(|next_in| { core::mem::replace(next_in, next_in.saturating_sub(1)) }); if next_epoch_hook_in == 1 { - total_weight += 100_000; + total_weight += request_weight; for Request { request_id, salt } in RequestsReadyAtEpoch::<T>::take(T::GetCurrentEpochIndex::get()) { @@ -197,7 +199,7 @@ pub mod pallet { request_id, randomness, }); - total_weight += 100_000; + total_weight += request_weight; } } diff --git a/pallets/universal-dividend/Cargo.toml b/pallets/universal-dividend/Cargo.toml index 8e94b6cf7f53ba486650707eaa3d98e32923921c..a4c167c13631fde767da1a25c44728088c2ffa02 100644 --- a/pallets/universal-dividend/Cargo.toml +++ b/pallets/universal-dividend/Cargo.toml @@ -33,38 +33,38 @@ scale-info = { version = "2.1.1", default-features = false, features = ["derive" serde = { version = "1.0.101", features = ["derive"], optional = true } # substrate bencharks -frame-benchmarking = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', optional = true, default-features = false } -pallet-balances = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', optional = true, default-features = false } +frame-benchmarking = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', optional = true, default-features = false } +pallet-balances = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', optional = true, default-features = false } [dependencies.frame-support] default-features = false git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.26' +branch = 'duniter-substrate-v0.9.32' [dependencies.frame-system] default-features = false git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.26' +branch = 'duniter-substrate-v0.9.32' [dependencies.sp-arithmetic] default-features = false git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.26' +branch = 'duniter-substrate-v0.9.32' [dependencies.sp-io] default-features = false git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.26' +branch = 'duniter-substrate-v0.9.32' [dependencies.sp-std] default-features = false git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.26' +branch = 'duniter-substrate-v0.9.32' [dependencies.sp-runtime] default-features = false git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.26' +branch = 'duniter-substrate-v0.9.32' ### DOC ### @@ -79,16 +79,16 @@ serde = { version = "1.0.101", features = ["derive"] } [dev-dependencies.pallet-balances] git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.26' +branch = 'duniter-substrate-v0.9.32' [dev-dependencies.sp-core] git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.26' +branch = 'duniter-substrate-v0.9.32' [dev-dependencies.sp-io] git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.26' +branch = 'duniter-substrate-v0.9.32' [dev-dependencies.sp-runtime] git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.26' +branch = 'duniter-substrate-v0.9.32' diff --git a/pallets/universal-dividend/src/benchmarking.rs b/pallets/universal-dividend/src/benchmarking.rs index 0dd6b662d68a911565134f4fd2d9491611379472..7d54bb0173de37757d8e84cd62c9ebcf3a2fb243 100644 --- a/pallets/universal-dividend/src/benchmarking.rs +++ b/pallets/universal-dividend/src/benchmarking.rs @@ -51,7 +51,7 @@ benchmarks! { let block_number = T::UdCreationPeriod::get(); let block_number_plus_one: T::BlockNumber = block_number + One::one(); NextReeval::<T>::put(block_number_plus_one); - }: { Pallet::<T>::on_initialize(block_number.into()); } + }: { Pallet::<T>::on_initialize(block_number); } verify { } where_clause { @@ -63,9 +63,9 @@ benchmarks! { let block_number = T::UdCreationPeriod::get(); let block_number_plus_one: T::BlockNumber = block_number + One::one(); NextReeval::<T>::put(block_number_plus_one); - Pallet::<T>::on_initialize(block_number.into()); + Pallet::<T>::on_initialize(block_number); NextReeval::<T>::put(block_number); - }: { Pallet::<T>::on_initialize(block_number.into()); } + }: { Pallet::<T>::on_initialize(block_number); } verify { } // Benchmark `claim_uds` extrinsic with the worst possible conditions: @@ -89,8 +89,8 @@ benchmarks! { let mut past_reevals = BoundedVec::default(); for i in 0..n { past_reevals - .try_push((((3 * i) + 1) as u16, ((1_000 + (100 * i)) as u32).into())) - .expect("unreachable"); + .try_push((((3 * i) + 1) as u16, (1_000 + (100 * i)).into())) + .expect("unreachable claim"); } PastReevals::<T>::put(past_reevals); diff --git a/pallets/universal-dividend/src/lib.rs b/pallets/universal-dividend/src/lib.rs index 5a887d16b359cc2399bfd69a967379d3430e21ab..41992650d951c924d22176337790b231a739d1b6 100644 --- a/pallets/universal-dividend/src/lib.rs +++ b/pallets/universal-dividend/src/lib.rs @@ -63,8 +63,6 @@ pub mod pallet { type BlockNumberIntoBalance: Convert<Self::BlockNumber, BalanceOf<Self>>; // The currency type Currency: Currency<Self::AccountId>; - /// Because this pallet emits events, it depends on the runtime's definition of an event. - type Event: From<Event<Self>> + IsType<<Self as frame_system::Config>::Event>; #[pallet::constant] /// Maximum number of past UD revaluations to keep in storage. type MaxPastReeval: Get<u32>; @@ -75,6 +73,8 @@ pub mod pallet { /// An iterator over all members type MembersStorageIter: From<Option<Vec<u8>>> + Iterator<Item = (Self::AccountId, FirstEligibleUd)>; + /// 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>; #[pallet::constant] /// Square of the money growth rate per ud reevaluation period type SquareMoneyGrowthRate: Get<Perbill>; diff --git a/pallets/universal-dividend/src/mock.rs b/pallets/universal-dividend/src/mock.rs index 56e88c7324f831e9e1e00a0744292cb18c830b56..bb5a4b20d63cb6e5447eaffb95e78e8e84b63a2a 100644 --- a/pallets/universal-dividend/src/mock.rs +++ b/pallets/universal-dividend/src/mock.rs @@ -56,8 +56,8 @@ impl system::Config for Test { type BlockWeights = (); type BlockLength = (); type DbWeight = (); - type Origin = Origin; - type Call = Call; + type RuntimeOrigin = RuntimeOrigin; + type RuntimeCall = RuntimeCall; type Index = u64; type BlockNumber = u64; type Hash = H256; @@ -65,7 +65,7 @@ impl system::Config for Test { type AccountId = u64; type Lookup = IdentityLookup<Self::AccountId>; type Header = Header; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type BlockHashCount = BlockHashCount; type Version = (); type PalletInfo = PalletInfo; @@ -86,13 +86,13 @@ parameter_types! { impl pallet_balances::Config for Test { type Balance = Balance; type DustRemoval = (); - type Event = Event; type ExistentialDeposit = ExistentialDeposit; type AccountStore = System; type WeightInfo = pallet_balances::weights::SubstrateWeight<Test>; type MaxLocks = MaxLocks; type MaxReserves = (); type ReserveIdentifier = [u8; 8]; + type RuntimeEvent = RuntimeEvent; } parameter_types! { @@ -140,11 +140,11 @@ impl Iterator for TestMembersStorageIter { impl pallet_universal_dividend::Config for Test { type BlockNumberIntoBalance = sp_runtime::traits::ConvertInto; type Currency = pallet_balances::Pallet<Test>; - type Event = Event; type MaxPastReeval = frame_support::traits::ConstU32<2>; type MembersCount = MembersCount; type MembersStorage = TestMembersStorage; type MembersStorageIter = TestMembersStorageIter; + type RuntimeEvent = RuntimeEvent; type SquareMoneyGrowthRate = SquareMoneyGrowthRate; type UdCreationPeriod = UdCreationPeriod; type UdReevalPeriod = UdReevalPeriod; diff --git a/pallets/universal-dividend/src/tests.rs b/pallets/universal-dividend/src/tests.rs index cf246f0cf392e065fbcbfddca947dc8ac7cc2ff0..3a4f83bf20d5828353115a210a2dab90f1c2e4c2 100644 --- a/pallets/universal-dividend/src/tests.rs +++ b/pallets/universal-dividend/src/tests.rs @@ -35,12 +35,14 @@ fn test_claim_uds() { // Alice can claim UDs, but this should be a no-op. run_to_block(1); - assert_storage_noop!(assert_ok!(UniversalDividend::claim_uds(Origin::signed(1)))); + assert_storage_noop!(assert_ok!(UniversalDividend::claim_uds( + RuntimeOrigin::signed(1) + ))); assert_eq!(Balances::free_balance(1), 0); // Dave is not a member, he can't claim UDs assert_err!( - UniversalDividend::claim_uds(Origin::signed(4)), + UniversalDividend::claim_uds(RuntimeOrigin::signed(4)), crate::Error::<Test>::AccountNotAllowedToClaimUds ); @@ -53,8 +55,8 @@ fn test_claim_uds() { assert_eq!(Balances::free_balance(4), 0); // Alice can claim UDs, and this time she must receive exactly one UD - assert_ok!(UniversalDividend::claim_uds(Origin::signed(1))); - System::assert_has_event(Event::UniversalDividend(crate::Event::UdsClaimed { + assert_ok!(UniversalDividend::claim_uds(RuntimeOrigin::signed(1))); + System::assert_has_event(RuntimeEvent::UniversalDividend(crate::Event::UdsClaimed { count: 1, total: 1_000, who: 1, @@ -74,8 +76,8 @@ fn test_claim_uds() { assert_eq!(Balances::free_balance(4), 0); // Alice can claim UDs, And she must receive exactly one UD (the second one) - assert_ok!(UniversalDividend::claim_uds(Origin::signed(1))); - System::assert_has_event(Event::UniversalDividend(crate::Event::UdsClaimed { + assert_ok!(UniversalDividend::claim_uds(RuntimeOrigin::signed(1))); + System::assert_has_event(RuntimeEvent::UniversalDividend(crate::Event::UdsClaimed { count: 1, total: 1_000, who: 1, @@ -87,8 +89,8 @@ fn test_claim_uds() { assert_eq!(Balances::free_balance(4), 0); // Bob can claim UDs, he must receive exactly two UDs - assert_ok!(UniversalDividend::claim_uds(Origin::signed(2))); - System::assert_has_event(Event::UniversalDividend(crate::Event::UdsClaimed { + assert_ok!(UniversalDividend::claim_uds(RuntimeOrigin::signed(2))); + System::assert_has_event(RuntimeEvent::UniversalDividend(crate::Event::UdsClaimed { count: 2, total: 2_000, who: 2, @@ -100,7 +102,7 @@ fn test_claim_uds() { // Dave is still not a member, he still can't claim UDs. assert_err!( - UniversalDividend::claim_uds(Origin::signed(4)), + UniversalDividend::claim_uds(RuntimeOrigin::signed(4)), crate::Error::<Test>::AccountNotAllowedToClaimUds ); @@ -109,8 +111,8 @@ fn test_claim_uds() { assert_eq!(UniversalDividend::total_money_created(), 12_225); // Charlie can claim all his UDs at once, he must receive exactly four UDs - assert_ok!(UniversalDividend::claim_uds(Origin::signed(3))); - System::assert_has_event(Event::UniversalDividend(crate::Event::UdsClaimed { + assert_ok!(UniversalDividend::claim_uds(RuntimeOrigin::signed(3))); + System::assert_has_event(RuntimeEvent::UniversalDividend(crate::Event::UdsClaimed { count: 4, total: 4_075, who: 3, @@ -137,12 +139,14 @@ fn test_ud_creation() { // The first UD must be created in block #2 run_to_block(2); - System::assert_has_event(Event::UniversalDividend(crate::Event::NewUdCreated { - amount: 1_000, - index: 1, - monetary_mass: 3_000, - members_count: 3, - })); + System::assert_has_event(RuntimeEvent::UniversalDividend( + crate::Event::NewUdCreated { + amount: 1_000, + index: 1, + monetary_mass: 3_000, + members_count: 3, + }, + )); assert_eq!(UniversalDividend::total_money_created(), 3_000); /*assert_eq!(Balances::free_balance(1), 1_000); assert_eq!(Balances::free_balance(2), 1_000); @@ -151,12 +155,14 @@ fn test_ud_creation() { // The second UD must be created in block #4 run_to_block(4); - System::assert_has_event(Event::UniversalDividend(crate::Event::NewUdCreated { - amount: 1_000, - index: 2, - monetary_mass: 6_000, - members_count: 3, - })); + System::assert_has_event(RuntimeEvent::UniversalDividend( + crate::Event::NewUdCreated { + amount: 1_000, + index: 2, + monetary_mass: 6_000, + members_count: 3, + }, + )); assert_eq!(UniversalDividend::total_money_created(), 6_000); /*assert_eq!(Balances::free_balance(1), 2_000); assert_eq!(Balances::free_balance(2), 2_000); @@ -165,12 +171,14 @@ fn test_ud_creation() { // The third UD must be created in block #6 run_to_block(6); - System::assert_has_event(Event::UniversalDividend(crate::Event::NewUdCreated { - amount: 1_000, - index: 3, - monetary_mass: 9_000, - members_count: 3, - })); + System::assert_has_event(RuntimeEvent::UniversalDividend( + crate::Event::NewUdCreated { + amount: 1_000, + index: 3, + monetary_mass: 9_000, + members_count: 3, + }, + )); assert_eq!(UniversalDividend::total_money_created(), 9_000); /*assert_eq!(Balances::free_balance(1), 3_000); assert_eq!(Balances::free_balance(2), 3_000); @@ -179,18 +187,20 @@ fn test_ud_creation() { // Block #8 should cause a re-evaluation of UD run_to_block(8); - System::assert_has_event(Event::UniversalDividend(crate::Event::UdReevalued { + System::assert_has_event(RuntimeEvent::UniversalDividend(crate::Event::UdReevalued { new_ud_amount: 1_075, monetary_mass: 9_000, members_count: 3, })); // Then, the first reevalued UD should be created - System::assert_has_event(Event::UniversalDividend(crate::Event::NewUdCreated { - amount: 1_075, - index: 4, - monetary_mass: 12_225, - members_count: 3, - })); + System::assert_has_event(RuntimeEvent::UniversalDividend( + crate::Event::NewUdCreated { + amount: 1_075, + index: 4, + monetary_mass: 12_225, + members_count: 3, + }, + )); assert_eq!(UniversalDividend::total_money_created(), 12_225); /*assert_eq!(Balances::free_balance(1), 4_075); assert_eq!(Balances::free_balance(2), 4_075); @@ -199,28 +209,32 @@ fn test_ud_creation() { // Block #10 #12 and #14should creates the reevalued UD run_to_block(14); - System::assert_has_event(Event::UniversalDividend(crate::Event::NewUdCreated { - amount: 1_075, - index: 7, - monetary_mass: 21_900, - members_count: 3, - })); + System::assert_has_event(RuntimeEvent::UniversalDividend( + crate::Event::NewUdCreated { + amount: 1_075, + index: 7, + monetary_mass: 21_900, + members_count: 3, + }, + )); assert_eq!(UniversalDividend::total_money_created(), 21_900); // Block #16 should cause a second re-evaluation of UD run_to_block(16); - System::assert_has_event(Event::UniversalDividend(crate::Event::UdReevalued { + System::assert_has_event(RuntimeEvent::UniversalDividend(crate::Event::UdReevalued { new_ud_amount: 1_257, monetary_mass: 21_900, members_count: 3, })); // Then, the reevalued UD should be created - System::assert_has_event(Event::UniversalDividend(crate::Event::NewUdCreated { - amount: 1_257, - index: 8, - monetary_mass: 25_671, - members_count: 3, - })); + System::assert_has_event(RuntimeEvent::UniversalDividend( + crate::Event::NewUdCreated { + amount: 1_257, + index: 8, + monetary_mass: 25_671, + members_count: 3, + }, + )); assert_eq!(UniversalDividend::total_money_created(), 25_671); }); } diff --git a/pallets/universal-dividend/src/weights.rs b/pallets/universal-dividend/src/weights.rs index e3b860880991e7c3aa5e7cd04fb8a67c5d6418e2..3fb577113d496b1dfe059d6f2e7ef80d4a958b89 100644 --- a/pallets/universal-dividend/src/weights.rs +++ b/pallets/universal-dividend/src/weights.rs @@ -32,7 +32,7 @@ pub trait WeightInfo { impl WeightInfo for () { // Storage: (r:0 w:0) fn on_initialize() -> Weight { - 2_260_000 as Weight + Weight::from_ref_time(2_260_000) } // Storage: Membership CounterForMembership (r:1 w:0) // Storage: UniversalDividend NextReeval (r:1 w:0) @@ -40,9 +40,9 @@ impl WeightInfo for () { // Storage: UniversalDividend MonetaryMass (r:1 w:1) // Storage: UniversalDividend CurrentUdIndex (r:1 w:1) fn on_initialize_ud_created() -> Weight { - (20_160_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(5 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(20_160_000) + .saturating_add(RocksDbWeight::get().reads(5)) + .saturating_add(RocksDbWeight::get().writes(2)) } // Storage: Membership CounterForMembership (r:1 w:0) // Storage: UniversalDividend NextReeval (r:1 w:1) @@ -51,35 +51,35 @@ impl WeightInfo for () { // Storage: UniversalDividend PastReevals (r:1 w:1) // Storage: UniversalDividend CurrentUdIndex (r:1 w:1) fn on_initialize_ud_reevalued() -> Weight { - (32_770_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(6 as Weight)) - .saturating_add(RocksDbWeight::get().writes(5 as Weight)) + Weight::from_ref_time(32_770_000) + .saturating_add(RocksDbWeight::get().reads(6)) + .saturating_add(RocksDbWeight::get().writes(5)) } // Storage: Identity IdentityIndexOf (r:1 w:0) // Storage: Identity Identities (r:1 w:1) // Storage: UniversalDividend CurrentUdIndex (r:1 w:0) // Storage: UniversalDividend PastReevals (r:1 w:0) fn claim_uds(n: u32) -> Weight { - (32_514_000 as Weight) + Weight::from_ref_time(32_514_000) // Standard Error: 32_000 - .saturating_add((8_000 as Weight).saturating_mul(n as Weight)) - .saturating_add(RocksDbWeight::get().reads(4 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) + .saturating_add(Weight::from_ref_time(8_000).saturating_mul(n as u64)) + .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) fn transfer_ud() -> Weight { - (53_401_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(53_401_000) + .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) fn transfer_ud_keep_alive() -> Weight { - (33_420_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(33_420_000) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(2)) } } diff --git a/pallets/upgrade-origin/Cargo.toml b/pallets/upgrade-origin/Cargo.toml index b4b3ed2c3e5d73843b9889424f1828130f3e0fc5..c4ff72d4c339e0f9632f662d5d3a358a7593ba40 100644 --- a/pallets/upgrade-origin/Cargo.toml +++ b/pallets/upgrade-origin/Cargo.toml @@ -36,32 +36,32 @@ version = "3.1.5" default-features = false git = 'https://github.com/duniter/substrate' optional = true -branch = 'duniter-substrate-v0.9.26' +branch = 'duniter-substrate-v0.9.32' [dependencies.frame-support] default-features = false git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.26' +branch = 'duniter-substrate-v0.9.32' [dependencies.frame-system] default-features = false git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.26' +branch = 'duniter-substrate-v0.9.32' [dependencies.sp-io] default-features = false git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.26' +branch = 'duniter-substrate-v0.9.32' [dependencies.sp-std] default-features = false git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.26' +branch = 'duniter-substrate-v0.9.32' [dependencies.sp-runtime] default-features = false git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.26' +branch = 'duniter-substrate-v0.9.32' ### DOC ### diff --git a/pallets/upgrade-origin/src/lib.rs b/pallets/upgrade-origin/src/lib.rs index 56ef25bea59733eada9a783ce6c1bcb4d92594c5..beb90209aa0afa50e26cfeb996abd5c83fb5552c 100644 --- a/pallets/upgrade-origin/src/lib.rs +++ b/pallets/upgrade-origin/src/lib.rs @@ -24,9 +24,9 @@ pub use pallet::*; pub use weights::WeightInfo; use frame_support::{ + dispatch::GetDispatchInfo, dispatch::PostDispatchInfo, traits::{IsSubType, UnfilteredDispatchable}, - weights::GetDispatchInfo, }; use sp_runtime::traits::Dispatchable; use sp_std::prelude::*; @@ -44,27 +44,27 @@ pub mod pallet { /// Configuration trait. #[pallet::config] pub trait Config: frame_system::Config { - /// The overarching event type. - type Event: From<Event> + IsType<<Self as frame_system::Config>::Event>; - /// The overarching call type. type Call: Parameter - + Dispatchable<Origin = Self::Origin, PostInfo = PostDispatchInfo> + + Dispatchable<RuntimeOrigin = Self::RuntimeOrigin, PostInfo = PostDispatchInfo> + GetDispatchInfo + From<frame_system::Call<Self>> - + UnfilteredDispatchable<Origin = Self::Origin> + + UnfilteredDispatchable<RuntimeOrigin = Self::RuntimeOrigin> + IsSubType<Call<Self>> - + IsType<<Self as frame_system::Config>::Call>; + + IsType<<Self as frame_system::Config>::RuntimeCall>; + + /// The overarching event type. + type RuntimeEvent: From<Event> + IsType<<Self as frame_system::Config>::RuntimeEvent>; /// The upgradable origin - type UpgradableOrigin: EnsureOrigin<Self::Origin>; + type UpgradableOrigin: EnsureOrigin<Self::RuntimeOrigin>; /// Pallet weights info type WeightInfo: WeightInfo; #[cfg(feature = "runtime-benchmarks")] - /// The worst case origin type to use in ŵeights benchmarking - type WorstCaseOriginType: Into<Self::Origin>; + /// The worst case origin type to use in weights benchmarking + type WorstCaseOriginType: Into<Self::RuntimeOrigin>; #[cfg(feature = "runtime-benchmarks")] /// The worst case origin to use in weights benchmarking diff --git a/pallets/upgrade-origin/src/weights.rs b/pallets/upgrade-origin/src/weights.rs index 765e8554d843ee17e4a8c8ce9bb0a62b39c2ff5a..7ed4eab532954d85106f86016f49de0817ee7ca9 100644 --- a/pallets/upgrade-origin/src/weights.rs +++ b/pallets/upgrade-origin/src/weights.rs @@ -26,6 +26,6 @@ pub trait WeightInfo { // Insecure weights implementation, use it for tests only! impl WeightInfo for () { fn dispatch_as_root() -> Weight { - 8_000 as Weight + Weight::from_ref_time(8_000) } } diff --git a/primitives/duniter/Cargo.toml b/primitives/duniter/Cargo.toml index 93dbdf1ede5053f6c6904211567889f7659cffe0..aca6a99010de8515b6540d0cb16cbc5cf52dcc90 100644 --- a/primitives/duniter/Cargo.toml +++ b/primitives/duniter/Cargo.toml @@ -33,17 +33,17 @@ version = "3.1.5" [dependencies.frame-support] default-features = false git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.26' +branch = 'duniter-substrate-v0.9.32' [dependencies.sp-runtime] default-features = false git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.26' +branch = 'duniter-substrate-v0.9.32' [dependencies.sp-std] default-features = false git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.26' +branch = 'duniter-substrate-v0.9.32' ### DOC ### diff --git a/primitives/membership/Cargo.toml b/primitives/membership/Cargo.toml index 599847670d46cfc1cb904b533d437d8b617413ae..cfaf056ea2654d715275aea2ccf55777901b3033 100644 --- a/primitives/membership/Cargo.toml +++ b/primitives/membership/Cargo.toml @@ -34,7 +34,7 @@ version = "3.1.5" [dependencies.frame-support] default-features = false git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.26' +branch = 'duniter-substrate-v0.9.32' [dependencies.serde] version = "1.0.101" @@ -44,12 +44,12 @@ features = ["derive"] [dependencies.sp-runtime] default-features = false git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.26' +branch = 'duniter-substrate-v0.9.32' [dependencies.sp-std] default-features = false git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.26' +branch = 'duniter-substrate-v0.9.32' ### DOC ### diff --git a/primitives/membership/src/traits.rs b/primitives/membership/src/traits.rs index 81421eb8a88962b58d33ca27c49bcc4942ecc194..9ab0d5b4e953b5d722ebd7c9c8e8bc51aaced363 100644 --- a/primitives/membership/src/traits.rs +++ b/primitives/membership/src/traits.rs @@ -44,7 +44,7 @@ pub trait OnEvent<IdtyId, MetaData> { impl<IdtyId, MetaData> OnEvent<IdtyId, MetaData> for () { fn on_event(_: &crate::Event<IdtyId, MetaData>) -> Weight { - 0 + Weight::zero() } } diff --git a/runtime/common/Cargo.toml b/runtime/common/Cargo.toml index a4685b21bdeb8eefd696b83106d3ad4beb53afd9..b78bd44c291d866e40d9263121f47083e2af410f 100644 --- a/runtime/common/Cargo.toml +++ b/runtime/common/Cargo.toml @@ -10,7 +10,7 @@ edition = "2021" runtime-benchmarks = [ "frame-benchmarking/runtime-benchmarks", 'frame-support/runtime-benchmarks', - 'frame-system-benchmarking', + 'frame-system-benchmarking/runtime-benchmarks', 'frame-system/runtime-benchmarks', "pallet-babe/runtime-benchmarks", 'pallet-balances/runtime-benchmarks', @@ -21,6 +21,7 @@ runtime-benchmarks = [ 'pallet-multisig/runtime-benchmarks', 'pallet-proxy/runtime-benchmarks', 'pallet-treasury/runtime-benchmarks', + 'pallet-upgrade-origin/runtime-benchmarks', 'sp-runtime/runtime-benchmarks', ] std = [ @@ -84,27 +85,27 @@ serde_derive = { version = "1.0.101", optional = true } smallvec = "1.6.1" # Substrate -frame-support = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -frame-system = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -pallet-babe = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -pallet-balances = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -pallet-grandpa = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -pallet-multisig = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -pallet-proxy = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -pallet-scheduler = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -pallet-session = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -pallet-timestamp = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -pallet-treasury = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -sp-arithmetic = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -sp-consensus-babe = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -sp-core = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -sp-runtime = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -sp-std = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } +frame-support = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +frame-system = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +pallet-babe = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +pallet-balances = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +pallet-grandpa = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +pallet-multisig = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +pallet-proxy = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +pallet-scheduler = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +pallet-session = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +pallet-timestamp = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +pallet-treasury = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +sp-arithmetic = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +sp-consensus-babe = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +sp-core = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +sp-runtime = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +sp-std = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } # substrate benchmarks -frame-benchmarking = { git = "https://github.com/duniter/substrate", branch = 'duniter-substrate-v0.9.26', default-features = false, optional = true } -frame-system-benchmarking = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false, optional = true } +frame-benchmarking = { git = "https://github.com/duniter/substrate", branch = 'duniter-substrate-v0.9.32', default-features = false, optional = true } +frame-system-benchmarking = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false, optional = true } # 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.26', default-features = false } +sp-staking = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } diff --git a/runtime/common/src/apis.rs b/runtime/common/src/apis.rs index dcd38e6e10ea4dccbea315532a2763c162757144..e3936762bfcfe9a84b11567f98881c1c1de81041 100644 --- a/runtime/common/src/apis.rs +++ b/runtime/common/src/apis.rs @@ -27,18 +27,18 @@ macro_rules! runtime_apis { } impl sp_consensus_babe::BabeApi<Block> for Runtime { - fn configuration() -> sp_consensus_babe::BabeGenesisConfiguration { + fn configuration() -> sp_consensus_babe::BabeConfiguration { // The choice of `c` parameter (where `1 - c` represents the // probability of a slot being empty), is done in accordance to the // slot duration and expected target block time, for safely // resisting network delays of maximum two seconds. // <https://research.web3.foundation/en/latest/polkadot/BABE/Babe/#6-practical-results> use frame_support::traits::Get as _; - sp_consensus_babe::BabeGenesisConfiguration { + sp_consensus_babe::BabeConfiguration { slot_duration: Babe::slot_duration(), epoch_length: EpochDuration::get(), c: BABE_GENESIS_EPOCH_CONFIG.c, - genesis_authorities: Babe::authorities().to_vec(), + authorities: Babe::authorities().to_vec(), randomness: Babe::randomness(), allowed_slots: BABE_GENESIS_EPOCH_CONFIG.allowed_slots, } @@ -210,15 +210,23 @@ macro_rules! runtime_apis { } #[cfg(feature = "try-runtime")] - impl frame_try_runtime::TryRuntime<Block> for Runtime { + impl frame_try_runtime::TryRuntime<Block> for Runtime where <Runtime as frame_system::Config>::BlockNumber: Clone + sp_std::fmt::Debug + sp_runtime::traits::AtLeast32BitUnsigned { fn on_runtime_upgrade() -> (Weight, Weight) { log::info!("try-runtime::on_runtime_upgrade."); - let weight = Executive::try_runtime_upgrade().unwrap(); - (weight, BlockWeights::get().max_block) + todo!() + // TODO solve the problem to uncomment this: + //let weight = Executive::try_runtime_upgrade().unwrap(); + //(weight, BlockWeights::get().max_block) } - fn execute_block_no_check(block: Block) -> Weight { - Executive::execute_block_no_check(block) + fn execute_block( + block: Block, + state_root_check: bool, + select: frame_try_runtime::TryStateSelect, + ) -> Weight { + todo!() + // TODO solve the problem to uncomment this: + //Executive::try_execute_block(block, state_root_check, select).expect("try_execute_block failed") } } @@ -235,16 +243,7 @@ macro_rules! runtime_apis { use frame_benchmarking::baseline::Pallet as Baseline; let mut list = Vec::<BenchmarkList>::new(); - list_benchmark!(list, extra, frame_system, SystemBench::<Runtime>); - list_benchmark!(list, extra, pallet_balances, Balances); - list_benchmark!(list, extra, pallet_multisig, Multisig); - list_benchmark!(list, extra, pallet_oneshot_account, OneshotAccount); - list_benchmark!(list, extra, pallet_proxy, Proxy); - list_benchmark!(list, extra, pallet_scheduler, Scheduler); - list_benchmark!(list, extra, pallet_timestamp, Timestamp); - list_benchmark!(list, extra, pallet_universal_dividend, UniversalDividend); - list_benchmark!(list, extra, pallet_upgrade_origin, UpgradeOrigin); - list_benchmark!(list, extra, pallet_utility, Utility); + list_benchmarks!(list, extra); let storage_info = AllPalletsWithSystem::storage_info(); return (list, storage_info) @@ -282,16 +281,7 @@ macro_rules! runtime_apis { let mut batches = Vec::<BenchmarkBatch>::new(); let params = (&config, &whitelist); - add_benchmark!(params, batches, frame_system, SystemBench::<Runtime>); - add_benchmark!(params, batches, pallet_balances, Balances); - add_benchmark!(params, batches, pallet_multisig, Multisig); - add_benchmark!(params, batches, pallet_oneshot_account, OneshotAccount); - add_benchmark!(params, batches, pallet_proxy, Proxy); - add_benchmark!(params, batches, pallet_scheduler, Scheduler); - add_benchmark!(params, batches, pallet_timestamp, Timestamp); - add_benchmark!(params, batches, pallet_universal_dividend, UniversalDividend); - add_benchmark!(params, batches, pallet_upgrade_origin, UpgradeOrigin); - add_benchmark!(params, batches, pallet_utility, Utility); + add_benchmarks!(params, batches); if batches.is_empty() { return Err("Benchmark not found for this pallet.".into()) } Ok(batches) diff --git a/runtime/common/src/constants.rs b/runtime/common/src/constants.rs index a519a450660761d3485b00774e2fc3e3b7991dd9..fc3037a88beebd4757db116a097822ff588a345f 100644 --- a/runtime/common/src/constants.rs +++ b/runtime/common/src/constants.rs @@ -73,14 +73,15 @@ pub fn block_weights( let normal_weight = normal_ratio * expected_block_weight; frame_system::limits::BlockWeights::builder() .base_block(crate::weights::block_weights::BlockExecutionWeight::get()) - .for_class(frame_support::weights::DispatchClass::Normal, |weights| { + .for_class(frame_support::dispatch::DispatchClass::all(), |weights| { weights.base_extrinsic = base_weight; + }) + .for_class(frame_support::dispatch::DispatchClass::Normal, |weights| { weights.max_total = normal_weight.into(); }) .for_class( - frame_support::weights::DispatchClass::Operational, + frame_support::dispatch::DispatchClass::Operational, |weights| { - weights.base_extrinsic = base_weight; weights.max_total = expected_block_weight.into(); weights.reserved = (expected_block_weight - normal_weight).into(); }, diff --git a/runtime/common/src/fees.rs b/runtime/common/src/fees.rs index 1d16135edcb51ae74a35bb81d66083efaaed80c4..890d56c099e2786a219fd1fee8759ec59e557b67 100644 --- a/runtime/common/src/fees.rs +++ b/runtime/common/src/fees.rs @@ -26,8 +26,9 @@ where type Balance = T; // Force constant fees - fn weight_to_fee(lenght_in_bytes: &Weight) -> Self::Balance { - (*lenght_in_bytes as u32 / 1_000_u32).into() + fn weight_to_fee(length_in_bytes: &Weight) -> Self::Balance { + ((length_in_bytes.ref_time() as u32 + length_in_bytes.proof_size() as u32) / 1_000_u32) + .into() } } diff --git a/runtime/common/src/handlers.rs b/runtime/common/src/handlers.rs index e09b1d30fd008f604e4834e9f4b8a0c3531be31a..583e31e8e3f4a8bc63fba9aafb16f4c17669f81d 100644 --- a/runtime/common/src/handlers.rs +++ b/runtime/common/src/handlers.rs @@ -31,7 +31,7 @@ where { fn on_new_session(_index: sp_staking::SessionIndex) -> Weight { pallet_provide_randomness::Pallet::<Runtime>::on_new_epoch(); - 0 + Weight::zero() } } @@ -69,7 +69,7 @@ where } IdtyEvent::Created { .. } | IdtyEvent::Confirmed | IdtyEvent::Removed { .. } => {} } - 0 + Weight::zero() } } @@ -99,7 +99,7 @@ impl< Runtime::DbWeight::get().reads(1) } } - _ => 0, + _ => Weight::zero(), }) + Inner::on_event(membership_event) } } @@ -147,7 +147,7 @@ impl< println!("fail to set session keys: {:?}", e) } } - 0 + Weight::zero() } sp_membership::Event::MembershipRevoked(idty_index) => { let call = pallet_authority_members::Call::<Runtime>::remove_member { @@ -160,9 +160,9 @@ impl< println!("faid to remove member: {:?}", e) } } - 0 + Weight::zero() } - _ => 0, + _ => Weight::zero(), }) + Inner::on_event(membership_event) } } @@ -182,7 +182,7 @@ where println!("fail to revoke membership: {:?}", e) } } - 0 + Weight::zero() } } @@ -221,7 +221,7 @@ where ); } - 0 + Weight::zero() } } diff --git a/runtime/common/src/pallets_config.rs b/runtime/common/src/pallets_config.rs index 974db7fa974d19b6e7eed3bec498457852222a02..bff6616c063264fef83c6e31a39a6b16a04da4da 100644 --- a/runtime/common/src/pallets_config.rs +++ b/runtime/common/src/pallets_config.rs @@ -35,7 +35,7 @@ macro_rules! pallets_config { /// The identifier used to distinguish between accounts. type AccountId = AccountId; /// The aggregated dispatch type that is available for extrinsics. - type Call = Call; + 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. @@ -49,9 +49,9 @@ macro_rules! pallets_config { /// The header type. type Header = generic::Header<BlockNumber, BlakeTwo256>; /// The ubiquitous event type. - type Event = Event; + type RuntimeEvent = RuntimeEvent; /// The ubiquitous origin type. - type Origin = Origin; + type RuntimeOrigin = RuntimeOrigin; /// Maximum number of block number to block hash mappings to keep (oldest pruned first). type BlockHashCount = BlockHashCount; /// The weight of database operations that the runtime can invoke. @@ -86,26 +86,25 @@ macro_rules! pallets_config { pub const NoPreimagePostponement: Option<u32> = Some(10); } impl pallet_scheduler::Config for Runtime { - type Event = Event; - type Origin = Origin; + type RuntimeEvent = RuntimeEvent; + type RuntimeOrigin = RuntimeOrigin; type PalletsOrigin = OriginCaller; - type Call = Call; + type RuntimeCall = RuntimeCall; type MaximumWeight = MaximumSchedulerWeight; type ScheduleOrigin = EnsureRoot<AccountId>; type OriginPrivilegeCmp = EqualPrivilegeOnly; type MaxScheduledPerBlock = MaxScheduledPerBlock; type WeightInfo = common_runtime::weights::pallet_scheduler::WeightInfo<Runtime>; - type PreimageProvider = Preimage; - type NoPreimagePostponement = (); + type Preimages = Preimage; } // ACCOUNT // impl pallet_duniter_account::Config for Runtime { type AccountIdToSalt = sp_runtime::traits::ConvertInto; - type Event = Event; type MaxNewAccountsPerBlock = frame_support::pallet_prelude::ConstU32<1>; type NewAccountPrice = frame_support::traits::ConstU64<300>; + type RuntimeEvent = RuntimeEvent; } // BLOCK CREATION // @@ -154,11 +153,11 @@ macro_rules! pallets_config { type ReserveIdentifier = [u8; 8]; /// The type for recording an account's balance. type Balance = Balance; - /// The ubiquitous event type. - type Event = Event; type DustRemoval = Treasury; type ExistentialDeposit = ExistentialDeposit; type AccountStore = Account; + /// The ubiquitous event type. + type RuntimeEvent = RuntimeEvent; type WeightInfo = common_runtime::weights::pallet_balances::WeightInfo<Runtime>; } @@ -175,16 +174,16 @@ macro_rules! pallets_config { } pub struct OnChargeTransaction; impl pallet_transaction_payment::Config for Runtime { - type Event = Event; type OnChargeTransaction = OneshotAccount; type OperationalFeeMultiplier = frame_support::traits::ConstU8<5>; type WeightToFee = common_runtime::fees::WeightToFeeImpl<Balance>; type LengthToFee = common_runtime::fees::LengthToFeeImpl<Balance>; type FeeMultiplierUpdate = (); + type RuntimeEvent = RuntimeEvent; } impl pallet_oneshot_account::Config for Runtime { type Currency = Balances; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type InnerOnChargeTransaction = CurrencyAdapter<Balances, HandleFees>; } @@ -194,7 +193,6 @@ macro_rules! pallets_config { type MaxAuthorities = MaxAuthorities; } impl pallet_authority_members::Config for Runtime { - type Event = Event; type KeysWrapper = opaque::SessionKeysWrapper; type IsMember = SmithsMembership; type OnNewSession = OnNewSessionHandler<Runtime>; @@ -205,6 +203,7 @@ macro_rules! pallets_config { type MaxKeysLife = frame_support::pallet_prelude::ConstU32<1_500>; type MaxOfflineSessions = frame_support::pallet_prelude::ConstU32<2_400>; type RemoveMemberOrigin = EnsureRoot<Self::AccountId>; + type RuntimeEvent = RuntimeEvent; } impl pallet_authorship::Config for Runtime { type FindAuthor = pallet_session::FindAccountFromAuthorIndex<Self, Babe>; @@ -214,7 +213,7 @@ macro_rules! pallets_config { } impl pallet_im_online::Config for Runtime { type AuthorityId = ImOnlineId; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type ValidatorSet = Historical; type NextSessionRotation = Babe; type ReportUnresponsiveness = Offences; @@ -225,12 +224,12 @@ macro_rules! pallets_config { type MaxPeerDataEncodingSize = MaxPeerDataEncodingSize; } impl pallet_offences::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type IdentificationTuple = pallet_session::historical::IdentificationTuple<Self>; type OnOffenceHandler = (); } impl pallet_session::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type ValidatorId = AccountId; type ValidatorIdOf = sp_runtime::traits::ConvertInto; type ShouldEndSession = Babe; @@ -245,8 +244,7 @@ macro_rules! pallets_config { type FullIdentificationOf = FullIdentificationOfImpl; } impl pallet_grandpa::Config for Runtime { - type Event = Event; - type Call = Call; + type RuntimeEvent = RuntimeEvent; type KeyOwnerProofSystem = (); @@ -274,8 +272,8 @@ macro_rules! pallets_config { } impl pallet_upgrade_origin::Config for Runtime { - type Event = Event; - type Call = Call; + type RuntimeEvent = RuntimeEvent; + type Call = RuntimeCall; type UpgradableOrigin = pallet_collective::EnsureProportionAtLeast<AccountId, TechnicalCommitteeInstance, 2, 3>; type WeightInfo = common_runtime::weights::pallet_upgrade_origin::WeightInfo<Runtime>; #[cfg(feature = "runtime-benchmarks")] @@ -292,10 +290,9 @@ macro_rules! pallets_config { impl pallet_preimage::Config for Runtime { type WeightInfo = pallet_preimage::weights::SubstrateWeight<Runtime>; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Currency = Balances; type ManagerOrigin = EnsureRoot<AccountId>; - type MaxSize = PreimageMaxSize; type BaseDeposit = PreimageBaseDeposit; type ByteDeposit = PreimageByteDeposit; } @@ -303,14 +300,13 @@ macro_rules! pallets_config { // UTILITIES // impl pallet_atomic_swap::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type SwapAction = pallet_atomic_swap::BalanceSwapAction<AccountId, Balances>; type ProofLimit = frame_support::traits::ConstU32<1_024>; } impl pallet_provide_randomness::Config for Runtime { type Currency = Balances; - type Event = Event; type GetCurrentEpochIndex = GetCurrentEpochIndex<Self>; type MaxRequests = frame_support::traits::ConstU32<100>; type RequestPrice = frame_support::traits::ConstU64<2_000>; @@ -318,6 +314,7 @@ macro_rules! pallets_config { type OnUnbalanced = Treasury; type ParentBlockRandomness = pallet_babe::ParentBlockRandomness<Self>; type RandomnessFromOneEpochAgo = pallet_babe::RandomnessFromOneEpochAgo<Self>; + type RuntimeEvent = RuntimeEvent; } parameter_types! { @@ -329,8 +326,8 @@ macro_rules! pallets_config { pub const AnnouncementDepositFactor: Balance = deposit(0, 66); } impl pallet_proxy::Config for Runtime { - type Event = Event; - type Call = Call; + type RuntimeEvent = RuntimeEvent; + type RuntimeCall = RuntimeCall; type Currency = Balances; type ProxyType = ProxyType; type ProxyDepositBase = ProxyDepositBase; @@ -348,8 +345,8 @@ macro_rules! pallets_config { pub const DepositFactor: Balance = DEPOSIT_PER_BYTE * 32; } impl pallet_multisig::Config for Runtime { - type Event = Event; - type Call = Call; + type RuntimeEvent = RuntimeEvent; + type RuntimeCall = RuntimeCall; type Currency = Balances; type DepositBase = DepositBase; type DepositFactor = DepositFactor; @@ -358,8 +355,8 @@ macro_rules! pallets_config { } impl pallet_utility::Config for Runtime { - type Event = Event; - type Call = Call; + type RuntimeEvent = RuntimeEvent; + type RuntimeCall = RuntimeCall; type PalletsOrigin = OriginCaller; type WeightInfo = pallet_utility::weights::SubstrateWeight<Self>; } @@ -378,7 +375,7 @@ macro_rules! pallets_config { type Burn = Burn; type BurnDestination = (); type Currency = Balances; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type OnSlash = Treasury; type ProposalBond = ProposalBond; type ProposalBondMinimum = frame_support::traits::ConstU64<10_000>; @@ -404,7 +401,7 @@ macro_rules! pallets_config { impl pallet_universal_dividend::Config for Runtime { type BlockNumberIntoBalance = sp_runtime::traits::ConvertInto; type Currency = pallet_balances::Pallet<Runtime>; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type MaxPastReeval = frame_support::traits::ConstU32<4>; type MembersCount = MembersCount; type MembersStorage = common_runtime::providers::UdMembersStorage<Runtime>; @@ -429,7 +426,6 @@ macro_rules! pallets_config { impl pallet_identity::Config for Runtime { type ChangeOwnerKeyPeriod = ChangeOwnerKeyPeriod; type ConfirmPeriod = ConfirmPeriod; - type Event = Event; type CheckIdtyCallAllowed = (Wot, SmithsSubWot); type IdtyCreationPeriod = IdtyCreationPeriod; type IdtyData = IdtyData; @@ -441,22 +437,22 @@ macro_rules! pallets_config { type RemoveIdentityConsumers = RemoveIdentityConsumersImpl<Self>; type RevocationSigner = <Signature as sp_runtime::traits::Verify>::Signer; type RevocationSignature = Signature; + type RuntimeEvent = RuntimeEvent; } impl pallet_membership::Config<frame_support::instances::Instance1> for Runtime { type CheckCallAllowed = Wot; - type Event = Event; type IdtyId = IdtyIndex; type IdtyIdOf = common_runtime::providers::IdentityIndexOf<Self>; type MembershipPeriod = MembershipPeriod; type MetaData = (); type OnEvent = OnMembershipEventHandler<Wot, Runtime>; type PendingMembershipPeriod = PendingMembershipPeriod; + type RuntimeEvent = RuntimeEvent; } impl pallet_certification::Config<Instance1> for Runtime { type CertPeriod = CertPeriod; - type Event = Event; type IdtyIndex = IdtyIndex; type OwnerKeyOf = Identity; type CheckCertAllowed = Wot; @@ -464,6 +460,7 @@ macro_rules! pallets_config { type MinReceivedCertToBeAbleToIssueCert = MinReceivedCertToBeAbleToIssueCert; type OnNewcert = Wot; type OnRemovedCert = Wot; + type RuntimeEvent = RuntimeEvent; type ValidityPeriod = ValidityPeriod; } @@ -479,18 +476,17 @@ macro_rules! pallets_config { impl pallet_membership::Config<Instance2> for Runtime { type CheckCallAllowed = SmithsSubWot; - type Event = Event; type IdtyId = IdtyIndex; type IdtyIdOf = common_runtime::providers::IdentityIndexOf<Self>; type MembershipPeriod = SmithMembershipPeriod; type MetaData = SmithsMembershipMetaData<opaque::SessionKeysWrapper>; type OnEvent = OnSmithMembershipEventHandler<SmithsSubWot, Runtime>; type PendingMembershipPeriod = SmithPendingMembershipPeriod; + type RuntimeEvent = RuntimeEvent; } impl pallet_certification::Config<Instance2> for Runtime { type CertPeriod = SmithCertPeriod; - type Event = Event; type IdtyIndex = IdtyIndex; type OwnerKeyOf = Identity; type CheckCertAllowed = SmithsSubWot; @@ -498,6 +494,7 @@ macro_rules! pallets_config { type MinReceivedCertToBeAbleToIssueCert = SmithMinReceivedCertToBeAbleToIssueCert; type OnNewcert = SmithsSubWot; type OnRemovedCert = SmithsSubWot; + type RuntimeEvent = RuntimeEvent; type ValidityPeriod = SmithValidityPeriod; } @@ -516,9 +513,9 @@ macro_rules! pallets_config { pub const TechnicalCommitteeMotionDuration: BlockNumber = 7 * DAYS; } impl pallet_collective::Config<Instance2> for Runtime { - type Origin = Origin; - type Proposal = Call; - type Event = Event; + type RuntimeOrigin = RuntimeOrigin; + type Proposal = RuntimeCall; + type RuntimeEvent = RuntimeEvent; type MotionDuration = TechnicalCommitteeMotionDuration; type MaxProposals = frame_support::pallet_prelude::ConstU32<20>; type MaxMembers = frame_support::pallet_prelude::ConstU32<100>; diff --git a/runtime/common/src/weights/block_weights.rs b/runtime/common/src/weights/block_weights.rs index 9eddf6933459de398b259cc76c27c90e13baba35..3d2ca644dd187195e6e0edcc2a8199e495f88e39 100644 --- a/runtime/common/src/weights/block_weights.rs +++ b/runtime/common/src/weights/block_weights.rs @@ -35,41 +35,47 @@ // --repeat=100 use frame_support::{ - parameter_types, - weights::{constants::WEIGHT_PER_NANOS, Weight}, + parameter_types, + weights::{constants::WEIGHT_PER_NANOS, Weight}, }; parameter_types! { - /// Time to execute an empty block. - /// Calculated by multiplying the *Average* with `1` and adding `0`. - /// - /// Stats nanoseconds: - /// Min, Max: 23_866_638, 90_077_105 - /// Average: 24_871_527 - /// Median: 23_915_377 - /// Std-Dev: 6645558.32 - /// - /// Percentiles nanoseconds: - /// 99th: 30_529_787 - /// 95th: 27_134_555 - /// 75th: 23_951_395 - pub const BlockExecutionWeight: Weight = 24_871_527 * WEIGHT_PER_NANOS; + /// Time to execute an empty block. + /// Calculated by multiplying the *Average* with `1` and adding `0`. + /// + /// Stats nanoseconds: + /// Min, Max: 23_866_638, 90_077_105 + /// Average: 24_871_527 + /// Median: 23_915_377 + /// Std-Dev: 6645558.32 + /// + /// Percentiles nanoseconds: + /// 99th: 30_529_787 + /// 95th: 27_134_555 + /// 75th: 23_951_395 + pub const BlockExecutionWeight: Weight = WEIGHT_PER_NANOS.saturating_mul(24_871_527); } #[cfg(test)] mod test_weights { - use frame_support::weights::constants; + use frame_support::weights::constants; - /// Checks that the weight exists and is sane. - // NOTE: If this test fails but you are sure that the generated values are fine, - // you can delete it. - #[test] - fn sane() { - let w = super::BlockExecutionWeight::get(); + /// Checks that the weight exists and is sane. + // NOTE: If this test fails but you are sure that the generated values are fine, + // you can delete it. + #[test] + fn sane() { + let w = super::BlockExecutionWeight::get(); - // At least 100 µs. - assert!(w >= 100 * constants::WEIGHT_PER_MICROS, "Weight should be at least 100 µs."); - // At most 50 ms. - assert!(w <= 50 * constants::WEIGHT_PER_MILLIS, "Weight should be at most 50 ms."); - } + // At least 100 µs. + assert!( + w.ref_time() >= 100u64 * constants::WEIGHT_PER_MICROS.ref_time(), + "Weight should be at least 100 µs." + ); + // At most 50 ms. + assert!( + w.ref_time() <= 50u64 * constants::WEIGHT_PER_MILLIS.ref_time(), + "Weight should be at most 50 ms." + ); + } } diff --git a/runtime/common/src/weights/frame_system.rs b/runtime/common/src/weights/frame_system.rs index a5a26e394cd7f05797002d90ebe23433baef4f64..3dc766a9ab60aa4c8d95afc0e11f5b965ebc4e10 100644 --- a/runtime/common/src/weights/frame_system.rs +++ b/runtime/common/src/weights/frame_system.rs @@ -45,41 +45,41 @@ use sp_std::marker::PhantomData; pub struct WeightInfo<T>(PhantomData<T>); impl<T: frame_system::Config> frame_system::WeightInfo for WeightInfo<T> { fn remark(b: u32, ) -> Weight { - (56_698_000 as Weight) + (Weight::from_ref_time(56_698_000)) // Standard Error: 0 - .saturating_add((238_000 as Weight).saturating_mul(b as Weight)) + .saturating_add((Weight::from_ref_time(238_000)).saturating_mul(b as u64)) } fn remark_with_event(b: u32, ) -> Weight { - (1_830_806_000 as Weight) + (Weight::from_ref_time(1_830_806_000)) // Standard Error: 0 - .saturating_add((254_000 as Weight).saturating_mul(b as Weight)) + .saturating_add((Weight::from_ref_time(254_000)).saturating_mul(b as u64)) } // Storage: System Digest (r:1 w:1) // Storage: unknown [0x3a686561707061676573] (r:0 w:1) fn set_heap_pages() -> Weight { - (74_351_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + (Weight::from_ref_time(74_351_000)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) } // Storage: Skipped Metadata (r:0 w:0) fn set_storage(i: u32, ) -> Weight { - (0 as Weight) + (Weight::from_ref_time(0)) // Standard Error: 26_000 - .saturating_add((38_883_000 as Weight).saturating_mul(i as Weight)) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(i as Weight))) + .saturating_add((Weight::from_ref_time(38_883_000)).saturating_mul(i as u64)) + .saturating_add(T::DbWeight::get().writes((1u64).saturating_mul(i as u64))) } // Storage: Skipped Metadata (r:0 w:0) fn kill_storage(i: u32, ) -> Weight { - (14_386_000 as Weight) + (Weight::from_ref_time(14_386_000)) // Standard Error: 16_000 - .saturating_add((18_658_000 as Weight).saturating_mul(i as Weight)) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(i as Weight))) + .saturating_add((Weight::from_ref_time(18_658_000)).saturating_mul(i as u64)) + .saturating_add(T::DbWeight::get().writes((1u64).saturating_mul(i as u64))) } // Storage: Skipped Metadata (r:0 w:0) fn kill_prefix(p: u32, ) -> Weight { - (0 as Weight) + (Weight::from_ref_time(0)) // Standard Error: 8_000 - .saturating_add((6_532_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(p as Weight))) + .saturating_add((Weight::from_ref_time(6_532_000)).saturating_mul(p as u64)) + .saturating_add(T::DbWeight::get().writes((1u64).saturating_mul(p as u64))) } } diff --git a/runtime/common/src/weights/pallet_babe.rs b/runtime/common/src/weights/pallet_babe.rs index 05237c914185e46e74e2c31f32e5e1b6ae2f3b44..2ba18b260d7037e509a82ef491136d6507a05dd1 100644 --- a/runtime/common/src/weights/pallet_babe.rs +++ b/runtime/common/src/weights/pallet_babe.rs @@ -39,13 +39,13 @@ impl<T: frame_system::Config> pallet_babe::WeightInfo for WeightInfo<T> { let validator_count = validator_count.max(100) as u64; // checking membership proof - (35 * WEIGHT_PER_MICROS) - .saturating_add((175 * WEIGHT_PER_NANOS).saturating_mul(validator_count)) + (WEIGHT_PER_MICROS * 35) + .saturating_add((WEIGHT_PER_NANOS * 175).saturating_mul(validator_count)) .saturating_add(T::DbWeight::get().reads(5)) // check equivocation proof - .saturating_add(110 * WEIGHT_PER_MICROS) + .saturating_add(WEIGHT_PER_MICROS * 110) // report offence - .saturating_add(110 * WEIGHT_PER_MICROS) + .saturating_add(WEIGHT_PER_MICROS * 110) .saturating_add(T::DbWeight::get().writes(3)) } } diff --git a/runtime/common/src/weights/pallet_balances.rs b/runtime/common/src/weights/pallet_balances.rs index d2157390f83f016ee7606f28a8f44924d4775b29..a1bf9ac98356ba270849e7d45ab2d332368f1f37 100644 --- a/runtime/common/src/weights/pallet_balances.rs +++ b/runtime/common/src/weights/pallet_balances.rs @@ -47,47 +47,47 @@ impl<T: frame_system::Config> pallet_balances::WeightInfo for WeightInfo<T> { // Storage: System Account (r:1 w:1) // Storage: Account PendingNewAccounts (r:0 w:1) fn transfer() -> Weight { - (2_412_993_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + (Weight::from_ref_time(2_412_993_000)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) } // Storage: System Account (r:1 w:1) // Storage: Account PendingNewAccounts (r:0 w:1) fn transfer_keep_alive() -> Weight { - (1_414_318_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + (Weight::from_ref_time(1_414_318_000)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) } // Storage: System Account (r:1 w:1) fn set_balance_creating() -> Weight { - (594_104_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + (Weight::from_ref_time(594_104_000)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: System Account (r:1 w:1) fn set_balance_killing() -> Weight { - (704_715_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + (Weight::from_ref_time(704_715_000)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: System Account (r:2 w:2) // Storage: Account PendingNewAccounts (r:0 w:1) fn force_transfer() -> Weight { - (2_427_122_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + (Weight::from_ref_time(2_427_122_000)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(3)) } // Storage: System Account (r:1 w:1) // Storage: Account PendingNewAccounts (r:0 w:1) fn transfer_all() -> Weight { - (1_769_185_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + (Weight::from_ref_time(1_769_185_000)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) } // Storage: System Account (r:1 w:1) fn force_unreserve() -> Weight { - (619_549_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + (Weight::from_ref_time(619_549_000)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } } diff --git a/runtime/common/src/weights/pallet_grandpa.rs b/runtime/common/src/weights/pallet_grandpa.rs index 4ab77c5bfa3166841396c39fa74384b8efea91c4..06039084ad2a4b2a80912465d8f97c43128ab445 100644 --- a/runtime/common/src/weights/pallet_grandpa.rs +++ b/runtime/common/src/weights/pallet_grandpa.rs @@ -35,19 +35,19 @@ impl<T: frame_system::Config> pallet_grandpa::WeightInfo for WeightInfo<T> { let validator_count = validator_count.max(100) as u64; // checking membership proof - (35 * WEIGHT_PER_MICROS) - .saturating_add((175 * WEIGHT_PER_NANOS).saturating_mul(validator_count)) + (WEIGHT_PER_MICROS * 35) + .saturating_add((WEIGHT_PER_NANOS * 175).saturating_mul(validator_count)) .saturating_add(T::DbWeight::get().reads(5)) // check equivocation proof - .saturating_add(95 * WEIGHT_PER_MICROS) + .saturating_add(WEIGHT_PER_MICROS * 95) // report offence - .saturating_add(110 * WEIGHT_PER_MICROS) + .saturating_add(WEIGHT_PER_MICROS * 110) .saturating_add(T::DbWeight::get().writes(3)) // fetching set id -> session index mappings .saturating_add(T::DbWeight::get().reads(2)) } fn note_stalled() -> Weight { - (3 * WEIGHT_PER_MICROS).saturating_add(T::DbWeight::get().writes(1)) + (WEIGHT_PER_MICROS * 3).saturating_add(T::DbWeight::get().writes(1)) } } diff --git a/runtime/common/src/weights/pallet_multisig.rs b/runtime/common/src/weights/pallet_multisig.rs index d2099e694a71e7ebde2ac2c21612f0cdfac8aef9..ec89d7e28c4bae2e26fbc6287161217f653cfc17 100644 --- a/runtime/common/src/weights/pallet_multisig.rs +++ b/runtime/common/src/weights/pallet_multisig.rs @@ -46,101 +46,68 @@ use sp_std::marker::PhantomData; pub struct WeightInfo<T>(PhantomData<T>); impl<T: frame_system::Config> pallet_multisig::WeightInfo for WeightInfo<T> { fn as_multi_threshold_1(z: u32, ) -> Weight { - (694_175_000 as Weight) + (Weight::from_ref_time(694_175_000)) // Standard Error: 0 - .saturating_add((405_000 as Weight).saturating_mul(z as Weight)) + .saturating_add((Weight::from_ref_time(405_000)).saturating_mul(z as u64)) } // Storage: Multisig Multisigs (r:1 w:1) // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) fn as_multi_create(s: u32, z: u32, ) -> Weight { - (1_258_408_000 as Weight) + (Weight::from_ref_time(1_258_408_000)) // Standard Error: 752_000 - .saturating_add((34_672_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((Weight::from_ref_time(34_672_000)).saturating_mul(s as u64)) // Standard Error: 0 - .saturating_add((249_000 as Weight).saturating_mul(z as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Multisig Multisigs (r:1 w:1) - // Storage: Multisig Calls (r:1 w:1) - // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) - fn as_multi_create_store(s: u32, z: u32, ) -> Weight { - (1_397_026_000 as Weight) - // Standard Error: 754_000 - .saturating_add((29_235_000 as Weight).saturating_mul(s as Weight)) - // Standard Error: 0 - .saturating_add((574_000 as Weight).saturating_mul(z as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + .saturating_add((Weight::from_ref_time(249_000)).saturating_mul(z as u64)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: Multisig Multisigs (r:1 w:1) fn as_multi_approve(s: u32, z: u32, ) -> Weight { - (865_034_000 as Weight) + (Weight::from_ref_time(865_034_000)) // Standard Error: 878_000 - .saturating_add((36_962_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((Weight::from_ref_time(36_962_000)).saturating_mul(s as u64)) // Standard Error: 0 - .saturating_add((250_000 as Weight).saturating_mul(z as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Multisig Multisigs (r:1 w:1) - // Storage: Multisig Calls (r:1 w:1) - fn as_multi_approve_store(s: u32, z: u32, ) -> Weight { - (1_470_691_000 as Weight) - // Standard Error: 1_012_000 - .saturating_add((36_087_000 as Weight).saturating_mul(s as Weight)) - // Standard Error: 0 - .saturating_add((573_000 as Weight).saturating_mul(z as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + .saturating_add((Weight::from_ref_time(250_000)).saturating_mul(z as u64)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: Multisig Multisigs (r:1 w:1) // Storage: Multisig Calls (r:1 w:1) // Storage: System Account (r:1 w:1) fn as_multi_complete(s: u32, z: u32, ) -> Weight { - (1_884_292_000 as Weight) + (Weight::from_ref_time(1_884_292_000)) // Standard Error: 1_339_000 - .saturating_add((80_505_000 as Weight).saturating_mul(s as Weight)) + .saturating_add((Weight::from_ref_time(80_505_000)).saturating_mul(s as u64)) // Standard Error: 0 - .saturating_add((980_000 as Weight).saturating_mul(z as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + .saturating_add((Weight::from_ref_time(980_000)).saturating_mul(z as u64)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) } // Storage: Multisig Multisigs (r:1 w:1) // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) fn approve_as_multi_create(s: u32, ) -> Weight { - (1_267_276_000 as Weight) + (Weight::from_ref_time(1_267_276_000)) // Standard Error: 243_000 - .saturating_add((33_108_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + .saturating_add((Weight::from_ref_time(33_108_000)).saturating_mul(s as u64)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: Multisig Multisigs (r:1 w:1) // Storage: Multisig Calls (r:1 w:0) fn approve_as_multi_approve(s: u32, ) -> Weight { - (865_683_000 as Weight) + (Weight::from_ref_time(865_683_000)) // Standard Error: 403_000 - .saturating_add((35_735_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Multisig Multisigs (r:1 w:1) - // Storage: Multisig Calls (r:1 w:1) - // Storage: System Account (r:1 w:1) - fn approve_as_multi_complete(s: u32, ) -> Weight { - (14_065_198_000 as Weight) - // Standard Error: 3_270_000 - .saturating_add((72_838_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + .saturating_add((Weight::from_ref_time(35_735_000)).saturating_mul(s as u64)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: Multisig Multisigs (r:1 w:1) // Storage: Multisig Calls (r:1 w:1) fn cancel_as_multi(s: u32, ) -> Weight { - (6_654_037_000 as Weight) + (Weight::from_ref_time(6_654_037_000)) // Standard Error: 300_000 - .saturating_add((33_665_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + .saturating_add((Weight::from_ref_time(33_665_000)).saturating_mul(s as u64)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) } } diff --git a/runtime/common/src/weights/pallet_oneshot_account.rs b/runtime/common/src/weights/pallet_oneshot_account.rs index 8a50c766419bb3d029d79538aefe8cb54ab40ff4..a6a423bd79438c92a04ee51053bb92d117f329f2 100644 --- a/runtime/common/src/weights/pallet_oneshot_account.rs +++ b/runtime/common/src/weights/pallet_oneshot_account.rs @@ -48,24 +48,24 @@ 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) fn create_oneshot_account() -> Weight { - (941_602_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + (Weight::from_ref_time(941_602_000)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: OneshotAccount OneshotAccounts (r:1 w:1) // Storage: System BlockHash (r:1 w:0) // Storage: System Account (r:1 w:1) fn consume_oneshot_account() -> Weight { - (971_453_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + (Weight::from_ref_time(971_453_000)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(2)) } // Storage: OneshotAccount OneshotAccounts (r:1 w:1) // Storage: System BlockHash (r:1 w:0) // Storage: System Account (r:2 w:2) fn consume_oneshot_account_with_remaining() -> Weight { - (1_500_781_000 as Weight) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + (Weight::from_ref_time(1_500_781_000)) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(3)) } } diff --git a/runtime/common/src/weights/pallet_proxy.rs b/runtime/common/src/weights/pallet_proxy.rs index 7fa6892cf20356a383f8439ccdcbb2d38bb52330..fc43a342609702633df097cb953c154d8c48b5c5 100644 --- a/runtime/common/src/weights/pallet_proxy.rs +++ b/runtime/common/src/weights/pallet_proxy.rs @@ -45,94 +45,81 @@ use sp_std::marker::PhantomData; /// Weight functions for `pallet_proxy`. pub struct WeightInfo<T>(PhantomData<T>); impl<T: frame_system::Config> pallet_proxy::WeightInfo for WeightInfo<T> { + // dummy + fn create_pure(_s:u32)->Weight {Weight::zero()} + // dummy + fn kill_pure(_s:u32)->Weight {Weight::zero()} // Storage: Proxy Proxies (r:1 w:0) fn proxy(p: u32, ) -> Weight { - (580_976_000 as Weight) + (Weight::from_ref_time(580_976_000)) // Standard Error: 66_000 - .saturating_add((43_246_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) + .saturating_add((Weight::from_ref_time(43_246_000)).saturating_mul(p as u64)) + .saturating_add(T::DbWeight::get().reads(1)) } // Storage: Proxy Proxies (r:1 w:0) // Storage: Proxy Announcements (r:1 w:1) // Storage: System Account (r:1 w:1) fn proxy_announced(a: u32, p: u32, ) -> Weight { - (1_543_060_000 as Weight) + (Weight::from_ref_time(1_543_060_000)) // Standard Error: 372_000 - .saturating_add((106_336_000 as Weight).saturating_mul(a as Weight)) + .saturating_add((Weight::from_ref_time(106_336_000)).saturating_mul(a as u64)) // Standard Error: 387_000 - .saturating_add((37_661_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + .saturating_add((Weight::from_ref_time(37_661_000)).saturating_mul(p as u64)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(2)) } // Storage: Proxy Announcements (r:1 w:1) // Storage: System Account (r:1 w:1) fn remove_announcement(a: u32, _p: u32, ) -> Weight { - (1_028_018_000 as Weight) + (Weight::from_ref_time(1_028_018_000)) // Standard Error: 359_000 - .saturating_add((105_964_000 as Weight).saturating_mul(a as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + .saturating_add((Weight::from_ref_time(105_964_000)).saturating_mul(a as u64)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) } // Storage: Proxy Announcements (r:1 w:1) // Storage: System Account (r:1 w:1) fn reject_announcement(a: u32, _p: u32, ) -> Weight { - (1_044_098_000 as Weight) + (Weight::from_ref_time(1_044_098_000)) // Standard Error: 349_000 - .saturating_add((106_076_000 as Weight).saturating_mul(a as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + .saturating_add((Weight::from_ref_time(106_076_000)).saturating_mul(a as u64)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) } // Storage: Proxy Proxies (r:1 w:0) // Storage: Proxy Announcements (r:1 w:1) // Storage: System Account (r:1 w:1) fn announce(a: u32, p: u32, ) -> Weight { - (1_262_407_000 as Weight) + (Weight::from_ref_time(1_262_407_000)) // Standard Error: 350_000 - .saturating_add((104_255_000 as Weight).saturating_mul(a as Weight)) + .saturating_add((Weight::from_ref_time(104_255_000)).saturating_mul(a as u64)) // Standard Error: 364_000 - .saturating_add((38_980_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + .saturating_add((Weight::from_ref_time(38_980_000)).saturating_mul(p as u64)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(2)) } // Storage: Proxy Proxies (r:1 w:1) fn add_proxy(p: u32, ) -> Weight { - (964_226_000 as Weight) + (Weight::from_ref_time(964_226_000)) // Standard Error: 288_000 - .saturating_add((55_018_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + .saturating_add((Weight::from_ref_time(55_018_000)).saturating_mul(p as u64)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: Proxy Proxies (r:1 w:1) fn remove_proxy(p: u32, ) -> Weight { - (761_347_000 as Weight) + (Weight::from_ref_time(761_347_000)) // Standard Error: 240_000 - .saturating_add((58_595_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + .saturating_add((Weight::from_ref_time(58_595_000)).saturating_mul(p as u64)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: Proxy Proxies (r:1 w:1) fn remove_proxies(p: u32, ) -> Weight { - (706_599_000 as Weight) + (Weight::from_ref_time(706_599_000)) // Standard Error: 55_000 - .saturating_add((41_943_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) - // Storage: Proxy Proxies (r:1 w:1) - fn anonymous(p: u32, ) -> Weight { - (1_162_882_000 as Weight) - // Standard Error: 25_000 - .saturating_add((105_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Proxy Proxies (r:1 w:1) - fn kill_anonymous(p: u32, ) -> Weight { - (952_412_000 as Weight) - // Standard Error: 58_000 - .saturating_add((41_903_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + .saturating_add((Weight::from_ref_time(41_943_000)).saturating_mul(p as u64)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } } diff --git a/runtime/common/src/weights/pallet_scheduler.rs b/runtime/common/src/weights/pallet_scheduler.rs index 4e3bb4df9ef251e0305aaf6c58eb48371cbf6ce3..1a6a7099028080245248867d709d7f67269cedaf 100644 --- a/runtime/common/src/weights/pallet_scheduler.rs +++ b/runtime/common/src/weights/pallet_scheduler.rs @@ -45,150 +45,55 @@ use sp_std::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 Agenda (r:2 w:2) - // Storage: Preimage PreimageFor (r:1 w:1) - // Storage: Preimage StatusFor (r:1 w:1) - // Storage: Scheduler Lookup (r:0 w:1) - fn on_initialize_periodic_named_resolved(s: u32, ) -> Weight { - (0 as Weight) - // Standard Error: 4_241_000 - .saturating_add((1_897_662_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(s as Weight))) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - .saturating_add(T::DbWeight::get().writes((4 as Weight).saturating_mul(s as Weight))) - } - // Storage: Scheduler Agenda (r:1 w:1) - // Storage: Preimage PreimageFor (r:1 w:1) - // Storage: Preimage StatusFor (r:1 w:1) - // Storage: Scheduler Lookup (r:0 w:1) - fn on_initialize_named_resolved(s: u32, ) -> Weight { - (0 as Weight) - // Standard Error: 3_139_000 - .saturating_add((1_581_261_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(s as Weight))) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - .saturating_add(T::DbWeight::get().writes((3 as Weight).saturating_mul(s as Weight))) - } - // Storage: Scheduler Agenda (r:2 w:2) - // Storage: Preimage PreimageFor (r:1 w:1) - // Storage: Preimage StatusFor (r:1 w:1) - fn on_initialize_periodic_resolved(s: u32, ) -> Weight { - (332_908_000 as Weight) - // Standard Error: 2_905_000 - .saturating_add((1_623_424_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(s as Weight))) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - .saturating_add(T::DbWeight::get().writes((3 as Weight).saturating_mul(s as Weight))) - } - // Storage: Scheduler Agenda (r:1 w:1) - // Storage: Preimage PreimageFor (r:1 w:1) - // Storage: Preimage StatusFor (r:1 w:1) - fn on_initialize_resolved(s: u32, ) -> Weight { - (327_285_000 as Weight) - // Standard Error: 4_837_000 - .saturating_add((1_511_863_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(s as Weight))) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - .saturating_add(T::DbWeight::get().writes((2 as Weight).saturating_mul(s as Weight))) - } - // Storage: Scheduler Agenda (r:1 w:1) - // Storage: Preimage PreimageFor (r:1 w:0) - // Storage: Scheduler Lookup (r:0 w:1) - fn on_initialize_named_aborted(s: u32, ) -> Weight { - (576_015_000 as Weight) - // Standard Error: 3_247_000 - .saturating_add((834_088_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(s as Weight))) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight))) - } - // Storage: Scheduler Agenda (r:1 w:1) - // Storage: Preimage PreimageFor (r:1 w:0) - fn on_initialize_aborted(s: u32, ) -> Weight { - (0 as Weight) - // Standard Error: 3_109_000 - .saturating_add((794_152_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(s as Weight))) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Scheduler Agenda (r:2 w:2) - // Storage: Scheduler Lookup (r:0 w:1) - fn on_initialize_periodic_named(s: u32, ) -> Weight { - (0 as Weight) - // Standard Error: 4_608_000 - .saturating_add((1_580_912_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(s as Weight))) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - .saturating_add(T::DbWeight::get().writes((2 as Weight).saturating_mul(s as Weight))) - } - // Storage: Scheduler Agenda (r:2 w:2) - fn on_initialize_periodic(s: u32, ) -> Weight { - (405_993_000 as Weight) - // Standard Error: 5_129_000 - .saturating_add((1_400_748_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(s as Weight))) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight))) - } - // Storage: Scheduler Agenda (r:1 w:1) - // Storage: Scheduler Lookup (r:0 w:1) - fn on_initialize_named(s: u32, ) -> Weight { - (149_824_000 as Weight) - // Standard Error: 2_930_000 - .saturating_add((1_272_241_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight))) - } - // Storage: Scheduler Agenda (r:1 w:1) - fn on_initialize(s: u32, ) -> Weight { - (103_696_000 as Weight) - // Standard Error: 2_588_000 - .saturating_add((1_194_963_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } + // dummy + fn service_agendas_base()->Weight {Weight::zero()} + // dummy + fn service_agenda_base(_s:u32)->Weight {Weight::zero()} + // dummy + fn service_task_base()->Weight {Weight::zero()} + // dummy + fn service_task_fetched(_s:u32)->Weight {Weight::zero()} + // dummy + fn service_task_named()->Weight {Weight::zero()} + // dummy + fn service_task_periodic()->Weight {Weight::zero()} + // dummy + fn execute_dispatch_signed()->Weight {Weight::zero()} + // dummy + fn execute_dispatch_unsigned()->Weight {Weight::zero()} // Storage: Scheduler Agenda (r:1 w:1) fn schedule(s: u32, ) -> Weight { - (655_442_000 as Weight) + (Weight::from_ref_time(655_442_000)) // Standard Error: 23_000 - .saturating_add((1_352_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + .saturating_add((Weight::from_ref_time(1_352_000)).saturating_mul(s as u64)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: Scheduler Agenda (r:1 w:1) // Storage: Scheduler Lookup (r:0 w:1) fn cancel(s: u32, ) -> Weight { - (431_975_000 as Weight) + (Weight::from_ref_time(431_975_000)) // Standard Error: 606_000 - .saturating_add((422_692_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + .saturating_add((Weight::from_ref_time(422_692_000)).saturating_mul(s as u64)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) } // Storage: Scheduler Lookup (r:1 w:1) // Storage: Scheduler Agenda (r:1 w:1) fn schedule_named(s: u32, ) -> Weight { - (820_828_000 as Weight) + (Weight::from_ref_time(820_828_000)) // Standard Error: 12_000 - .saturating_add((795_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + .saturating_add((Weight::from_ref_time(795_000)).saturating_mul(s as u64)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) } // Storage: Scheduler Lookup (r:1 w:1) // Storage: Scheduler Agenda (r:1 w:1) fn cancel_named(s: u32, ) -> Weight { - (197_177_000 as Weight) + (Weight::from_ref_time(197_177_000)) // Standard Error: 672_000 - .saturating_add((425_783_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + .saturating_add((Weight::from_ref_time(425_783_000)).saturating_mul(s as u64)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) } } diff --git a/runtime/common/src/weights/pallet_timestamp.rs b/runtime/common/src/weights/pallet_timestamp.rs index f85c2aba0dd20256a98c99c39f58c9b33d8415d1..96288464de2835eeab8a1bad7b3e13d36e8fff50 100644 --- a/runtime/common/src/weights/pallet_timestamp.rs +++ b/runtime/common/src/weights/pallet_timestamp.rs @@ -48,11 +48,11 @@ impl<T: frame_system::Config> pallet_timestamp::WeightInfo for WeightInfo<T> { // Storage: Timestamp Now (r:1 w:1) // Storage: Babe CurrentSlot (r:1 w:0) fn set() -> Weight { - (126_036_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + (Weight::from_ref_time(126_036_000)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) } fn on_finalize() -> Weight { - (53_611_000 as Weight) + (Weight::from_ref_time(53_611_000)) } } diff --git a/runtime/common/src/weights/pallet_universal_dividend.rs b/runtime/common/src/weights/pallet_universal_dividend.rs index 9c9efb8f91e8e234a80a53cd082edf33c3668d3c..30f2ba996ee93ee058353cbebd9c4db757314d84 100644 --- a/runtime/common/src/weights/pallet_universal_dividend.rs +++ b/runtime/common/src/weights/pallet_universal_dividend.rs @@ -46,7 +46,7 @@ use sp_std::marker::PhantomData; pub struct WeightInfo<T>(PhantomData<T>); impl<T: frame_system::Config> pallet_universal_dividend::WeightInfo for WeightInfo<T> { fn on_initialize() -> Weight { - 111_220_000 as Weight + Weight::from_ref_time(111_220_000) } // Storage: Membership CounterForMembership (r:1 w:0) // Storage: UniversalDividend NextReeval (r:1 w:0) @@ -54,9 +54,9 @@ impl<T: frame_system::Config> pallet_universal_dividend::WeightInfo for WeightIn // Storage: UniversalDividend MonetaryMass (r:1 w:1) // Storage: UniversalDividend CurrentUdIndex (r:1 w:1) fn on_initialize_ud_created() -> Weight { - (525_382_000 as Weight) - .saturating_add(T::DbWeight::get().reads(5 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(525_382_000) + .saturating_add(T::DbWeight::get().reads(5)) + .saturating_add(T::DbWeight::get().writes(2)) } // Storage: Membership CounterForMembership (r:1 w:0) // Storage: UniversalDividend NextReeval (r:1 w:1) @@ -65,35 +65,35 @@ impl<T: frame_system::Config> pallet_universal_dividend::WeightInfo for WeightIn // Storage: UniversalDividend PastReevals (r:1 w:1) // Storage: UniversalDividend CurrentUdIndex (r:1 w:1) fn on_initialize_ud_reevalued() -> Weight { - (1_161_595_000 as Weight) - .saturating_add(T::DbWeight::get().reads(6 as Weight)) - .saturating_add(T::DbWeight::get().writes(5 as Weight)) + Weight::from_ref_time(1_161_595_000) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(5)) } // Storage: Identity IdentityIndexOf (r:1 w:0) // Storage: Identity Identities (r:1 w:1) // Storage: UniversalDividend CurrentUdIndex (r:1 w:0) // Storage: UniversalDividend PastReevals (r:1 w:0) fn claim_uds(n: u32) -> Weight { - (1_228_876_000 as Weight) + Weight::from_ref_time(1_228_876_000) // Standard Error: 958_000 - .saturating_add((7_551_000 as Weight).saturating_mul(n as Weight)) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + .saturating_add((Weight::from_ref_time(7_551_000)).saturating_mul(n as u64)) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(1)) } // Storage: UniversalDividend CurrentUd (r:1 w:0) // Storage: System Account (r:1 w:1) // Storage: Account PendingNewAccounts (r:0 w:1) fn transfer_ud() -> Weight { - (2_468_842_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + (Weight::from_ref_time(2_468_842_000)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) } // Storage: UniversalDividend CurrentUd (r:1 w:0) // Storage: System Account (r:1 w:1) // Storage: Account PendingNewAccounts (r:0 w:1) fn transfer_ud_keep_alive() -> Weight { - (1_442_150_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + (Weight::from_ref_time(1_442_150_000)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) } } diff --git a/runtime/common/src/weights/pallet_upgrade_origin.rs b/runtime/common/src/weights/pallet_upgrade_origin.rs index 8e0fa34d708a047a4dad6dcfec7860dd379db7b8..caa7c5b62b96b5fe14b75bb84ce4930bf9020396 100644 --- a/runtime/common/src/weights/pallet_upgrade_origin.rs +++ b/runtime/common/src/weights/pallet_upgrade_origin.rs @@ -46,6 +46,6 @@ use sp_std::marker::PhantomData; pub struct WeightInfo<T>(PhantomData<T>); impl<T: frame_system::Config> pallet_upgrade_origin::WeightInfo for WeightInfo<T> { fn dispatch_as_root() -> Weight { - (324_716_000 as Weight) + (Weight::from_ref_time(324_716_000)) } } diff --git a/runtime/common/src/weights/paritydb_weights.rs b/runtime/common/src/weights/paritydb_weights.rs index cce8ee131c89ab1bc935533e2e364092cff5f74c..d57bf202758f4163e1620544c096bd8f8dad4cfc 100644 --- a/runtime/common/src/weights/paritydb_weights.rs +++ b/runtime/common/src/weights/paritydb_weights.rs @@ -51,7 +51,7 @@ pub mod constants { /// /// Stats nanoseconds: /// Min, Max: 62_017, 5_238_182 - /// Average: 125_949 + /// Average: 125_949 /// Median: 124_943 /// Std-Dev: 19659.02 /// @@ -59,14 +59,14 @@ pub mod constants { /// 99th: 151_424 /// 95th: 143_017 /// 75th: 133_498 - read: 250_000 * constants::WEIGHT_PER_NANOS, + read: 250_000 * constants::WEIGHT_PER_NANOS.ref_time(), /// Time to write one storage item. /// Calculated by multiplying the *Average* of all values with `2` and adding `0`. /// /// Stats nanoseconds: /// Min, Max: 88_054, 107_065_367 - /// Average: 419_064 + /// Average: 419_064 /// Median: 424_994 /// Std-Dev: 423253.1 /// @@ -74,7 +74,7 @@ pub mod constants { /// 99th: 611_825 /// 95th: 512_789 /// 75th: 457_938 - write: 840_000 * constants::WEIGHT_PER_NANOS, + write: 840_000 * constants::WEIGHT_PER_NANOS.ref_time(), }; } @@ -90,20 +90,20 @@ pub mod constants { fn bound() { // At least 1 µs. assert!( - W::get().reads(1) >= constants::WEIGHT_PER_MICROS, + W::get().reads(1).ref_time() >= constants::WEIGHT_PER_MICROS.ref_time(), "Read weight should be at least 1 µs." ); assert!( - W::get().writes(1) >= constants::WEIGHT_PER_MICROS, + W::get().writes(1).ref_time() >= constants::WEIGHT_PER_MICROS.ref_time(), "Write weight should be at least 1 µs." ); // At most 1 ms. assert!( - W::get().reads(1) <= constants::WEIGHT_PER_MILLIS, + W::get().reads(1).ref_time() <= constants::WEIGHT_PER_MILLIS.ref_time(), "Read weight should be at most 1 ms." ); assert!( - W::get().writes(1) <= constants::WEIGHT_PER_MILLIS, + W::get().writes(1).ref_time() <= constants::WEIGHT_PER_MILLIS.ref_time(), "Write weight should be at most 1 ms." ); } diff --git a/runtime/g1/Cargo.toml b/runtime/g1/Cargo.toml index d61823cd3b6a6169de609e106df1fd92f5948979..03f0577377cf6636695cc424b8b6aa019fae0a5a 100644 --- a/runtime/g1/Cargo.toml +++ b/runtime/g1/Cargo.toml @@ -1,6 +1,6 @@ [build-dependencies.substrate-wasm-builder] git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.26' +branch = 'duniter-substrate-v0.9.32' [package] authors = ['Axiom-Team Developers <https://axiom-team.fr>'] @@ -103,10 +103,10 @@ try-runtime = [ ] [dev-dependencies] -sp-consensus-vrf = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26' } -sp-finality-grandpa = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26' } -sp-io = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26' } -sp-keyring = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26' } +sp-consensus-vrf = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32' } +sp-finality-grandpa = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32' } +sp-io = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32' } +sp-keyring = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32' } [dependencies] # local @@ -132,43 +132,43 @@ scale-info = { version = "2.1.1", default-features = false, features = ["derive" serde = { version = "1.0.101", optional = true, features = ["derive"] } # substrate -frame-benchmarking = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', optional = true } -frame-try-runtime = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false, optional = true } -frame-executive = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -frame-support = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -frame-system = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -frame-system-benchmarking = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', optional = true } -frame-system-rpc-runtime-api = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false} -pallet-atomic-swap = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -pallet-authority-discovery = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -pallet-authorship = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -pallet-babe = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -pallet-balances = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -pallet-collective = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -pallet-grandpa = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -pallet-im-online = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -pallet-offences = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -pallet-multisig = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -pallet-preimage = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -pallet-proxy = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -pallet-scheduler = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -pallet-session = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -pallet-sudo = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -pallet-timestamp = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -pallet-transaction-payment = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -pallet-transaction-payment-rpc-runtime-api = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -pallet-treasury = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -pallet-utility = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -sp-api = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -sp-arithmetic = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -sp-authority-discovery = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -sp-block-builder = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -sp-consensus-babe = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -sp-core = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -sp-inherents = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -sp-offchain = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -sp-runtime = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -sp-session = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -sp-std = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -sp-transaction-pool = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -sp-version = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } +frame-benchmarking = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', optional = true } +frame-try-runtime = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false, optional = true } +frame-executive = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +frame-support = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +frame-system = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +frame-system-benchmarking = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', optional = true } +frame-system-rpc-runtime-api = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false} +pallet-atomic-swap = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +pallet-authority-discovery = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +pallet-authorship = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +pallet-babe = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +pallet-balances = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +pallet-collective = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +pallet-grandpa = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +pallet-im-online = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +pallet-offences = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +pallet-multisig = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +pallet-preimage = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +pallet-proxy = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +pallet-scheduler = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +pallet-session = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +pallet-sudo = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +pallet-timestamp = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +pallet-transaction-payment = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +pallet-transaction-payment-rpc-runtime-api = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +pallet-treasury = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +pallet-utility = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +sp-api = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +sp-arithmetic = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +sp-authority-discovery = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +sp-block-builder = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +sp-consensus-babe = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +sp-core = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +sp-inherents = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +sp-offchain = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +sp-runtime = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +sp-session = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +sp-std = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +sp-transaction-pool = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +sp-version = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } diff --git a/runtime/g1/src/lib.rs b/runtime/g1/src/lib.rs index c3a5612de868ceec2b87bb0a45cb50f36d2ec21e..6adcb4d571422c4656b4a03e1fb9f605ee83fe6c 100644 --- a/runtime/g1/src/lib.rs +++ b/runtime/g1/src/lib.rs @@ -103,7 +103,8 @@ pub fn native_version() -> NativeVersion { /// Block type as expected by this runtime. pub type Block = sp_runtime::generic::Block<Header, UncheckedExtrinsic>; /// Unchecked extrinsic type as expected by this runtime. -pub type UncheckedExtrinsic = generic::UncheckedExtrinsic<Address, Call, Signature, SignedExtra>; +pub type UncheckedExtrinsic = + generic::UncheckedExtrinsic<Address, RuntimeCall, Signature, SignedExtra>; /// The SignedExtension to the basic transaction logic. pub type SignedExtra = ( frame_system::CheckNonZeroSender<Runtime>, @@ -126,17 +127,42 @@ pub type Executive = frame_executive::Executive< pub type TechnicalCommitteeInstance = Instance2; +#[cfg(feature = "runtime-benchmarks")] +mod benches { + define_benchmarks!( + // Duniter + // NOTE: Make sure to prefix these with `common_runtime::` so + // the that path resolves correctly in the generated file. + [common_runtime::oneshot_account, OneshotAccount] + [common_runtime::universal_dividend, UniversalDividend] + [common_runtime::upgrade_origin, UpgradeOrigin] + // Substrate + [pallet_balances, Balances] + [frame_benchmarking::baseline, Baseline::<Runtime>] + [pallet_collective, TechnicalCommittee] + [pallet_im_online, ImOnline] + [pallet_multisig, Multisig] + [pallet_preimage, Preimage] + [pallet_proxy, Proxy] + [pallet_scheduler, Scheduler] + [frame_system, SystemBench::<Runtime>] + [pallet_timestamp, Timestamp] + [pallet_treasury, Treasury] + [pallet_utility, Utility] + ); +} + pub struct BaseCallFilter; -impl Contains<Call> for BaseCallFilter { - fn contains(call: &Call) -> bool { +impl Contains<RuntimeCall> for BaseCallFilter { + fn contains(call: &RuntimeCall) -> bool { !matches!( call, - Call::System( + RuntimeCall::System( frame_system::Call::remark { .. } | frame_system::Call::remark_with_event { .. } - ) | Call::Membership( + ) | RuntimeCall::Membership( pallet_membership::Call::claim_membership { .. } | pallet_membership::Call::revoke_membership { .. } - ) | Call::Session(_) + ) | RuntimeCall::Session(_) ) } } @@ -166,23 +192,26 @@ impl Default for ProxyType { Self::AlmostAny } } -impl frame_support::traits::InstanceFilter<Call> for ProxyType { - fn filter(&self, c: &Call) -> bool { +impl frame_support::traits::InstanceFilter<RuntimeCall> for ProxyType { + fn filter(&self, c: &RuntimeCall) -> bool { match self { ProxyType::AlmostAny => { // Some calls are never authorized from a proxied account !matches!( c, - Call::Cert(..) | Call::Identity(..) | Call::SmithsCert(..) + RuntimeCall::Cert(..) | RuntimeCall::Identity(..) | RuntimeCall::SmithsCert(..) ) } ProxyType::TransferOnly => { - matches!(c, Call::Balances(..) | Call::UniversalDividend(..)) + matches!( + c, + RuntimeCall::Balances(..) | RuntimeCall::UniversalDividend(..) + ) } ProxyType::CancelProxy => { matches!( c, - Call::Proxy(pallet_proxy::Call::reject_announcement { .. }) + RuntimeCall::Proxy(pallet_proxy::Call::reject_announcement { .. }) ) } } @@ -191,8 +220,8 @@ impl frame_support::traits::InstanceFilter<Call> for ProxyType { common_runtime::pallets_config! { impl pallet_sudo::Config for Runtime { - type Event = Event; - type Call = Call; + type RuntimeEvent = RuntimeEvent; + type RuntimeCall = RuntimeCall; } } @@ -259,10 +288,10 @@ construct_runtime!( impl<C> frame_system::offchain::SendTransactionTypes<C> for Runtime where - Call: From<C>, + RuntimeCall: From<C>, { type Extrinsic = UncheckedExtrinsic; - type OverarchingCall = Call; + type OverarchingCall = RuntimeCall; } // All of our runtimes share most of their Runtime API implementations. diff --git a/runtime/g1/src/parameters.rs b/runtime/g1/src/parameters.rs index 5444c2fefffb6476df6e7f9a2eb6a60b9be9af86..fc1340d134a97045a04dcaa57abbb0a392195700 100644 --- a/runtime/g1/src/parameters.rs +++ b/runtime/g1/src/parameters.rs @@ -25,7 +25,8 @@ use sp_runtime::transaction_validity::TransactionPriority; parameter_types! { pub const BlockHashCount: BlockNumber = 2400; /// We allow for 2 seconds of compute with a 6 second average block time. - pub BlockWeights: frame_system::limits::BlockWeights = block_weights(2 * WEIGHT_PER_SECOND, NORMAL_DISPATCH_RATIO); + pub BlockWeights: frame_system::limits::BlockWeights = block_weights((WEIGHT_PER_SECOND * 2) + .set_proof_size(5 * 1024 * 1024), NORMAL_DISPATCH_RATIO); pub BlockLength: frame_system::limits::BlockLength = frame_system::limits::BlockLength ::max_with_normal_ratio(5 * 1024 * 1024, NORMAL_DISPATCH_RATIO); pub const SS58Prefix: u16 = 4450; diff --git a/runtime/gdev/Cargo.toml b/runtime/gdev/Cargo.toml index 65d3ec9afbf49d90c96ddf69b9189a25d293207c..643fc4b03a121197620de2bd4082f32898ece4b4 100644 --- a/runtime/gdev/Cargo.toml +++ b/runtime/gdev/Cargo.toml @@ -1,6 +1,6 @@ [build-dependencies.substrate-wasm-builder] git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.26' +branch = 'duniter-substrate-v0.9.32' [package] authors = ['Axiom-Team Developers <https://axiom-team.fr>'] @@ -104,6 +104,7 @@ std = [ 'sp-version/std', ] try-runtime = [ + "common-runtime/try-runtime", "frame-executive/try-runtime", "frame-try-runtime", "frame-system/try-runtime", @@ -126,10 +127,10 @@ try-runtime = [ ] [dev-dependencies] -sp-consensus-vrf = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26' } -sp-finality-grandpa = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26' } -sp-io = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26' } -sp-keyring = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26' } +sp-consensus-vrf = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32' } +sp-finality-grandpa = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32' } +sp-io = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32' } +sp-keyring = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32' } [dependencies] # local @@ -156,45 +157,45 @@ serde = { version = "1.0.101", default-features = false } serde_derive = { version = "1.0.101", optional = true } # substrate -frame-try-runtime = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false, optional = true } -frame-executive = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -frame-support = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -frame-system = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -frame-system-rpc-runtime-api = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false} -pallet-atomic-swap = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -pallet-authority-discovery = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -pallet-authorship = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -pallet-babe = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -pallet-balances = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -pallet-collective = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -pallet-grandpa = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -pallet-im-online = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -pallet-offences = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -pallet-multisig = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -pallet-preimage = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -pallet-proxy = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -pallet-scheduler = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -pallet-session = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -pallet-sudo = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -pallet-timestamp = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -pallet-transaction-payment = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -pallet-transaction-payment-rpc-runtime-api = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -pallet-treasury = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -pallet-utility = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -sp-api = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -sp-arithmetic = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -sp-authority-discovery = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -sp-block-builder = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -sp-consensus-babe = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -sp-core = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -sp-inherents = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -sp-offchain = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -sp-runtime = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -sp-session = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -sp-std = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -sp-transaction-pool = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -sp-version = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } +frame-try-runtime = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false, optional = true } +frame-executive = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +frame-support = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +frame-system = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +frame-system-rpc-runtime-api = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false} +pallet-atomic-swap = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +pallet-authority-discovery = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +pallet-authorship = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +pallet-babe = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +pallet-balances = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +pallet-collective = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +pallet-grandpa = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +pallet-im-online = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +pallet-offences = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +pallet-multisig = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +pallet-preimage = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +pallet-proxy = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +pallet-scheduler = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +pallet-session = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +pallet-sudo = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +pallet-timestamp = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +pallet-transaction-payment = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +pallet-transaction-payment-rpc-runtime-api = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +pallet-treasury = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +pallet-utility = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +sp-api = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +sp-arithmetic = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +sp-authority-discovery = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +sp-block-builder = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +sp-consensus-babe = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +sp-core = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +sp-inherents = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +sp-offchain = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +sp-runtime = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +sp-session = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +sp-std = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +sp-transaction-pool = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +sp-version = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } # substrate benchmarking -frame-benchmarking = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false, optional = true } -frame-system-benchmarking = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false, optional = true } +frame-benchmarking = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false, optional = true } +frame-system-benchmarking = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false, optional = true } diff --git a/runtime/gdev/src/lib.rs b/runtime/gdev/src/lib.rs index 33e172eb2b0e88afb816ec25a07d95d32ff5dbb1..9d6eb62e1d54de3bd31b5c7164c1053999149a9d 100644 --- a/runtime/gdev/src/lib.rs +++ b/runtime/gdev/src/lib.rs @@ -35,6 +35,7 @@ pub use common_runtime::{ constants::*, entities::*, handlers::*, AccountId, Address, Balance, BlockNumber, FullIdentificationOfImpl, GetCurrentEpochIndex, Hash, Header, IdtyIndex, Index, Signature, }; +pub use frame_system::Call as SystemCall; pub use pallet_balances::Call as BalancesCall; pub use pallet_duniter_test_parameters::Parameters as GenesisParameters; pub use pallet_im_online::sr25519::AuthorityId as ImOnlineId; @@ -109,7 +110,8 @@ pub fn native_version() -> NativeVersion { /// Block type as expected by this runtime. pub type Block = sp_runtime::generic::Block<Header, UncheckedExtrinsic>; /// Unchecked extrinsic type as expected by this runtime. -pub type UncheckedExtrinsic = generic::UncheckedExtrinsic<Address, Call, Signature, SignedExtra>; +pub type UncheckedExtrinsic = + generic::UncheckedExtrinsic<Address, RuntimeCall, Signature, SignedExtra>; /// The SignedExtension to the basic transaction logic. pub type SignedExtra = ( frame_system::CheckNonZeroSender<Runtime>, @@ -134,32 +136,58 @@ pub type Executive = frame_executive::Executive< pub type TechnicalCommitteeInstance = Instance2; +#[cfg(feature = "runtime-benchmarks")] +mod benches { + define_benchmarks!( + // Duniter + // NOTE: Make sure to prefix these with `common_runtime::` so + // the that path resolves correctly in the generated file. + [common_runtime::oneshot_account, OneshotAccount] + [common_runtime::universal_dividend, UniversalDividend] + [common_runtime::upgrade_origin, UpgradeOrigin] + // Substrate + [pallet_balances, Balances] + [frame_benchmarking::baseline, Baseline::<Runtime>] + [pallet_collective, TechnicalCommittee] + [pallet_im_online, ImOnline] + [pallet_multisig, Multisig] + [pallet_preimage, Preimage] + [pallet_proxy, Proxy] + [pallet_scheduler, Scheduler] + [frame_system, SystemBench::<Runtime>] + [pallet_timestamp, Timestamp] + [pallet_treasury, Treasury] + [pallet_utility, Utility] + ); +} + pub struct BaseCallFilter; #[cfg(not(feature = "runtime-benchmarks"))] -impl Contains<Call> for BaseCallFilter { - fn contains(call: &Call) -> bool { +impl Contains<RuntimeCall> for BaseCallFilter { + fn contains(call: &RuntimeCall) -> bool { !matches!( call, - Call::System( + /*RuntimeCall::System( frame_system::Call::remark { .. } | frame_system::Call::remark_with_event { .. } - ) | Call::Membership( + ) | */ + RuntimeCall::Membership( pallet_membership::Call::request_membership { .. } | pallet_membership::Call::claim_membership { .. } | pallet_membership::Call::revoke_membership { .. } - ) | Call::Session(_) + ) | RuntimeCall::Session(_) ) } } #[cfg(feature = "runtime-benchmarks")] -impl Contains<Call> for BaseCallFilter { - fn contains(call: &Call) -> bool { +impl Contains<RuntimeCall> for BaseCallFilter { + fn contains(call: &RuntimeCall) -> bool { !matches!( call, - Call::Membership( + RuntimeCall::Membership( pallet_membership::Call::request_membership { .. } | pallet_membership::Call::claim_membership { .. } | pallet_membership::Call::revoke_membership { .. } - ) | Call::Session(_) + ) | RuntimeCall::Session(_) ) } } @@ -190,29 +218,32 @@ impl Default for ProxyType { Self::AlmostAny } } -impl frame_support::traits::InstanceFilter<Call> for ProxyType { - fn filter(&self, c: &Call) -> bool { +impl frame_support::traits::InstanceFilter<RuntimeCall> for ProxyType { + fn filter(&self, c: &RuntimeCall) -> bool { match self { ProxyType::AlmostAny => { // Some calls are never authorized from a proxied account !matches!( c, - Call::Cert(..) | Call::Identity(..) | Call::SmithsCert(..) + RuntimeCall::Cert(..) | RuntimeCall::Identity(..) | RuntimeCall::SmithsCert(..) ) } ProxyType::TransferOnly => { - matches!(c, Call::Balances(..) | Call::UniversalDividend(..)) + matches!( + c, + RuntimeCall::Balances(..) | RuntimeCall::UniversalDividend(..) + ) } ProxyType::CancelProxy => { matches!( c, - Call::Proxy(pallet_proxy::Call::reject_announcement { .. }) + RuntimeCall::Proxy(pallet_proxy::Call::reject_announcement { .. }) ) } ProxyType::TechnicalCommitteePropose => { matches!( c, - Call::TechnicalCommittee(pallet_collective::Call::propose { .. }) + RuntimeCall::TechnicalCommittee(pallet_collective::Call::propose { .. }) ) } } @@ -260,8 +291,8 @@ common_runtime::pallets_config! { } impl pallet_sudo::Config for Runtime { - type Event = Event; - type Call = Call; + type RuntimeEvent = RuntimeEvent; + type RuntimeCall = RuntimeCall; } } @@ -331,10 +362,10 @@ construct_runtime!( impl<C> frame_system::offchain::SendTransactionTypes<C> for Runtime where - Call: From<C>, + RuntimeCall: From<C>, { type Extrinsic = UncheckedExtrinsic; - type OverarchingCall = Call; + type OverarchingCall = RuntimeCall; } // All of our runtimes share most of their Runtime API implementations. diff --git a/runtime/gdev/src/migrations_v400.rs b/runtime/gdev/src/migrations_v400.rs index fb82240168ba0bc64a6a1e8f95ba90a30faf8ab9..f4bc46c49282295786ca76487d0d6bd43df944d1 100644 --- a/runtime/gdev/src/migrations_v400.rs +++ b/runtime/gdev/src/migrations_v400.rs @@ -19,13 +19,13 @@ use crate::*; pub struct MigrationsV400; impl frame_support::traits::OnRuntimeUpgrade for MigrationsV400 { fn on_runtime_upgrade() -> Weight { - let mut weight = 1_000_000_000; // Safety margin + let mut weight = Weight::from_ref_time(1_000_000_000); // Safety margin type OldvalueType = AccountId; pallet_membership::PendingMembership::<Runtime, Instance1>::translate_values( |_: OldvalueType| { - weight += <Runtime as frame_system::Config>::DbWeight::get().write; + *weight.ref_time_mut() += <Runtime as frame_system::Config>::DbWeight::get().write; Some(()) }, ); @@ -34,12 +34,12 @@ impl frame_support::traits::OnRuntimeUpgrade for MigrationsV400 { } #[cfg(feature = "try-runtime")] - fn pre_upgrade() -> Result<(), &'static str> { - Ok(()) + fn pre_upgrade() -> Result<frame_benchmarking::Vec<u8>, &'static str> { + Ok(Vec::new()) } #[cfg(feature = "try-runtime")] - fn post_upgrade() -> Result<(), &'static str> { + fn post_upgrade(_state: frame_benchmarking::Vec<u8>) -> Result<(), &'static str> { Ok(()) } } diff --git a/runtime/gdev/src/parameters.rs b/runtime/gdev/src/parameters.rs index 1fce1bd736409275ba7f2f52749e42766fc0544c..9c23a138628d2c4b42c8e0a0b20c5b29268d0246 100644 --- a/runtime/gdev/src/parameters.rs +++ b/runtime/gdev/src/parameters.rs @@ -25,7 +25,8 @@ use sp_runtime::transaction_validity::TransactionPriority; parameter_types! { pub const BlockHashCount: BlockNumber = 2400; /// We allow for 2 seconds of compute with a 6 second average block time. - pub BlockWeights: frame_system::limits::BlockWeights = block_weights(2 * WEIGHT_PER_SECOND, NORMAL_DISPATCH_RATIO); + pub BlockWeights: frame_system::limits::BlockWeights = block_weights((WEIGHT_PER_SECOND * 2) + .set_proof_size(5 * 1024 * 1024), NORMAL_DISPATCH_RATIO); pub BlockLength: frame_system::limits::BlockLength = frame_system::limits::BlockLength ::max_with_normal_ratio(5 * 1024 * 1024, NORMAL_DISPATCH_RATIO); pub const SS58Prefix: u16 = 42; diff --git a/runtime/gdev/tests/integration_tests.rs b/runtime/gdev/tests/integration_tests.rs index 7230ed5376c48bd62ba3ae867884c625e226e9bb..a4068ebff6916c22b257887bfc459d3109cb9ae3 100644 --- a/runtime/gdev/tests/integration_tests.rs +++ b/runtime/gdev/tests/integration_tests.rs @@ -92,15 +92,15 @@ fn test_remove_identity() { None )); - System::assert_has_event(Event::Membership( + System::assert_has_event(RuntimeEvent::Membership( pallet_membership::Event::MembershipRevoked(4), )); - System::assert_has_event(Event::System(frame_system::Event::KilledAccount { + System::assert_has_event(RuntimeEvent::System(frame_system::Event::KilledAccount { account: AccountKeyring::Dave.to_account_id(), })); - System::assert_has_event(Event::Identity(pallet_identity::Event::IdtyRemoved { - idty_index: 4, - })); + System::assert_has_event(RuntimeEvent::Identity( + pallet_identity::Event::IdtyRemoved { idty_index: 4 }, + )); }); } #[test] @@ -116,27 +116,27 @@ fn test_remove_identity_after_one_ud() { )); // Verify events - System::assert_has_event(Event::Membership( + System::assert_has_event(RuntimeEvent::Membership( pallet_membership::Event::MembershipRevoked(4), )); - System::assert_has_event(Event::Balances(pallet_balances::Event::Deposit { + System::assert_has_event(RuntimeEvent::Balances(pallet_balances::Event::Deposit { who: AccountKeyring::Dave.to_account_id(), amount: 1_000, })); - System::assert_has_event(Event::Balances(pallet_balances::Event::Endowed { + System::assert_has_event(RuntimeEvent::Balances(pallet_balances::Event::Endowed { account: AccountKeyring::Dave.to_account_id(), free_balance: 1_000, })); - System::assert_has_event(Event::UniversalDividend( + System::assert_has_event(RuntimeEvent::UniversalDividend( pallet_universal_dividend::Event::UdsAutoPaidAtRemoval { count: 1, total: 1_000, who: AccountKeyring::Dave.to_account_id(), }, )); - System::assert_has_event(Event::Identity(pallet_identity::Event::IdtyRemoved { - idty_index: 4, - })); + System::assert_has_event(RuntimeEvent::Identity( + pallet_identity::Event::IdtyRemoved { idty_index: 4 }, + )); // Verify state assert!(Identity::identity(4).is_none()); @@ -158,18 +158,18 @@ fn test_remove_smith_identity() { None )); // Verify events - System::assert_has_event(Event::SmithsMembership( + System::assert_has_event(RuntimeEvent::SmithsMembership( pallet_membership::Event::MembershipRevoked(3), )); - System::assert_has_event(Event::AuthorityMembers( + System::assert_has_event(RuntimeEvent::AuthorityMembers( pallet_authority_members::Event::MemberRemoved(3), )); - System::assert_has_event(Event::Membership( + System::assert_has_event(RuntimeEvent::Membership( pallet_membership::Event::MembershipRevoked(3), )); - System::assert_has_event(Event::Identity(pallet_identity::Event::IdtyRemoved { - idty_index: 3, - })); + System::assert_has_event(RuntimeEvent::Identity( + pallet_identity::Event::IdtyRemoved { idty_index: 3 }, + )); }); } @@ -188,14 +188,14 @@ fn test_create_new_account_with_insufficient_balance() { 400 )); - System::assert_has_event(Event::System(frame_system::Event::NewAccount { + System::assert_has_event(RuntimeEvent::System(frame_system::Event::NewAccount { account: AccountKeyring::Eve.to_account_id(), })); - System::assert_has_event(Event::Balances(pallet_balances::Event::Endowed { + System::assert_has_event(RuntimeEvent::Balances(pallet_balances::Event::Endowed { account: AccountKeyring::Eve.to_account_id(), free_balance: 400, })); - System::assert_has_event(Event::Balances(pallet_balances::Event::Transfer { + System::assert_has_event(RuntimeEvent::Balances(pallet_balances::Event::Transfer { from: AccountKeyring::Alice.to_account_id(), to: AccountKeyring::Eve.to_account_id(), amount: 400, @@ -205,17 +205,17 @@ fn test_create_new_account_with_insufficient_balance() { // to pay the "new account tax" run_to_block(3); - System::assert_has_event(Event::Account( + System::assert_has_event(RuntimeEvent::Account( pallet_duniter_account::Event::ForceDestroy { who: AccountKeyring::Eve.to_account_id(), balance: 400, }, )); - System::assert_has_event(Event::Balances(pallet_balances::Event::Deposit { + System::assert_has_event(RuntimeEvent::Balances(pallet_balances::Event::Deposit { who: Treasury::account_id(), amount: 400, })); - System::assert_has_event(Event::Treasury(pallet_treasury::Event::Deposit { + System::assert_has_event(RuntimeEvent::Treasury(pallet_treasury::Event::Deposit { value: 400, })); @@ -242,14 +242,14 @@ fn test_create_new_account() { 500 )); //println!("{:#?}", System::events()); - System::assert_has_event(Event::System(frame_system::Event::NewAccount { + System::assert_has_event(RuntimeEvent::System(frame_system::Event::NewAccount { account: AccountKeyring::Eve.to_account_id(), })); - System::assert_has_event(Event::Balances(pallet_balances::Event::Endowed { + System::assert_has_event(RuntimeEvent::Balances(pallet_balances::Event::Endowed { account: AccountKeyring::Eve.to_account_id(), free_balance: 500, })); - System::assert_has_event(Event::Balances(pallet_balances::Event::Transfer { + System::assert_has_event(RuntimeEvent::Balances(pallet_balances::Event::Transfer { from: AccountKeyring::Alice.to_account_id(), to: AccountKeyring::Eve.to_account_id(), amount: 500, @@ -259,15 +259,15 @@ fn test_create_new_account() { // and new account tax should be collected and deposited in the treasury run_to_block(3); - System::assert_has_event(Event::Balances(pallet_balances::Event::Withdraw { + System::assert_has_event(RuntimeEvent::Balances(pallet_balances::Event::Withdraw { who: AccountKeyring::Eve.to_account_id(), amount: 300, })); - System::assert_has_event(Event::Balances(pallet_balances::Event::Deposit { + System::assert_has_event(RuntimeEvent::Balances(pallet_balances::Event::Deposit { who: Treasury::account_id(), amount: 300, })); - System::assert_has_event(Event::Treasury(pallet_treasury::Event::Deposit { + System::assert_has_event(RuntimeEvent::Treasury(pallet_treasury::Event::Deposit { value: 300, })); diff --git a/runtime/gtest/Cargo.toml b/runtime/gtest/Cargo.toml index db8c2be246bf0bcee30659dbccf612d17913ccb3..034ab8621934ae906a77e47db06590a885d768a6 100644 --- a/runtime/gtest/Cargo.toml +++ b/runtime/gtest/Cargo.toml @@ -1,6 +1,6 @@ [build-dependencies.substrate-wasm-builder] git = 'https://github.com/duniter/substrate' -branch = 'duniter-substrate-v0.9.26' +branch = 'duniter-substrate-v0.9.32' [package] authors = ['Axiom-Team Developers <https://axiom-team.fr>'] @@ -103,10 +103,10 @@ try-runtime = [ ] [dev-dependencies] -sp-consensus-vrf = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26' } -sp-finality-grandpa = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26' } -sp-io = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26' } -sp-keyring = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26' } +sp-consensus-vrf = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32' } +sp-finality-grandpa = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32' } +sp-io = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32' } +sp-keyring = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32' } [dependencies] # local @@ -132,43 +132,43 @@ scale-info = { version = "2.1.1", default-features = false, features = ["derive" serde = { version = "1.0.101", optional = true, features = ["derive"] } # substrate -frame-benchmarking = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', optional = true } -frame-try-runtime = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false, optional = true } -frame-executive = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -frame-support = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -frame-system = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -frame-system-benchmarking = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', optional = true } -frame-system-rpc-runtime-api = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false} -pallet-atomic-swap = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -pallet-authority-discovery = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -pallet-authorship = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -pallet-babe = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -pallet-balances = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -pallet-collective = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -pallet-grandpa = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -pallet-im-online = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -pallet-offences = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -pallet-multisig = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -pallet-preimage = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -pallet-proxy = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -pallet-scheduler = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -pallet-session = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -pallet-sudo = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -pallet-timestamp = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -pallet-transaction-payment = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -pallet-transaction-payment-rpc-runtime-api = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -pallet-treasury = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -pallet-utility = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -sp-api = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -sp-arithmetic = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -sp-authority-discovery = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -sp-block-builder = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -sp-consensus-babe = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -sp-core = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -sp-inherents = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -sp-offchain = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -sp-runtime = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -sp-session = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -sp-std = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -sp-transaction-pool = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } -sp-version = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.26', default-features = false } +frame-benchmarking = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', optional = true } +frame-try-runtime = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false, optional = true } +frame-executive = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +frame-support = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +frame-system = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +frame-system-benchmarking = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', optional = true } +frame-system-rpc-runtime-api = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false} +pallet-atomic-swap = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +pallet-authority-discovery = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +pallet-authorship = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +pallet-babe = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +pallet-balances = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +pallet-collective = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +pallet-grandpa = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +pallet-im-online = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +pallet-offences = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +pallet-multisig = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +pallet-preimage = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +pallet-proxy = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +pallet-scheduler = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +pallet-session = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +pallet-sudo = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +pallet-timestamp = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +pallet-transaction-payment = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +pallet-transaction-payment-rpc-runtime-api = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +pallet-treasury = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +pallet-utility = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +sp-api = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +sp-arithmetic = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +sp-authority-discovery = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +sp-block-builder = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +sp-consensus-babe = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +sp-core = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +sp-inherents = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +sp-offchain = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +sp-runtime = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +sp-session = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +sp-std = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +sp-transaction-pool = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } +sp-version = { git = 'https://github.com/duniter/substrate', branch = 'duniter-substrate-v0.9.32', default-features = false } diff --git a/runtime/gtest/src/lib.rs b/runtime/gtest/src/lib.rs index 0bad5440c5df87c835acee8b9be595bfa75406f1..f859943c433d6c54982d54f3e2503f326bb7f8ad 100644 --- a/runtime/gtest/src/lib.rs +++ b/runtime/gtest/src/lib.rs @@ -103,7 +103,8 @@ pub fn native_version() -> NativeVersion { /// Block type as expected by this runtime. pub type Block = sp_runtime::generic::Block<Header, UncheckedExtrinsic>; /// Unchecked extrinsic type as expected by this runtime. -pub type UncheckedExtrinsic = generic::UncheckedExtrinsic<Address, Call, Signature, SignedExtra>; +pub type UncheckedExtrinsic = + generic::UncheckedExtrinsic<Address, RuntimeCall, Signature, SignedExtra>; /// The SignedExtension to the basic transaction logic. pub type SignedExtra = ( frame_system::CheckNonZeroSender<Runtime>, @@ -127,17 +128,42 @@ pub type Executive = frame_executive::Executive< pub type TechnicalCommitteeInstance = Instance2; +#[cfg(feature = "runtime-benchmarks")] +mod benches { + define_benchmarks!( + // Duniter + // NOTE: Make sure to prefix these with `common_runtime::` so + // the that path resolves correctly in the generated file. + [common_runtime::oneshot_account, OneshotAccount] + [common_runtime::universal_dividend, UniversalDividend] + [common_runtime::upgrade_origin, UpgradeOrigin] + // Substrate + [pallet_balances, Balances] + [frame_benchmarking::baseline, Baseline::<Runtime>] + [pallet_collective, TechnicalCommittee] + [pallet_im_online, ImOnline] + [pallet_multisig, Multisig] + [pallet_preimage, Preimage] + [pallet_proxy, Proxy] + [pallet_scheduler, Scheduler] + [frame_system, SystemBench::<Runtime>] + [pallet_timestamp, Timestamp] + [pallet_treasury, Treasury] + [pallet_utility, Utility] + ); +} + pub struct BaseCallFilter; -impl Contains<Call> for BaseCallFilter { - fn contains(call: &Call) -> bool { +impl Contains<RuntimeCall> for BaseCallFilter { + fn contains(call: &RuntimeCall) -> bool { !matches!( call, - Call::System( + RuntimeCall::System( frame_system::Call::remark { .. } | frame_system::Call::remark_with_event { .. } - ) | Call::Membership( + ) | RuntimeCall::Membership( pallet_membership::Call::claim_membership { .. } | pallet_membership::Call::revoke_membership { .. } - ) | Call::Session(_) + ) | RuntimeCall::Session(_) ) } } @@ -167,23 +193,26 @@ impl Default for ProxyType { Self::AlmostAny } } -impl frame_support::traits::InstanceFilter<Call> for ProxyType { - fn filter(&self, c: &Call) -> bool { +impl frame_support::traits::InstanceFilter<RuntimeCall> for ProxyType { + fn filter(&self, c: &RuntimeCall) -> bool { match self { ProxyType::AlmostAny => { // Some calls are never authorized from a proxied account !matches!( c, - Call::Cert(..) | Call::Identity(..) | Call::SmithsCert(..) + RuntimeCall::Cert(..) | RuntimeCall::Identity(..) | RuntimeCall::SmithsCert(..) ) } ProxyType::TransferOnly => { - matches!(c, Call::Balances(..) | Call::UniversalDividend(..)) + matches!( + c, + RuntimeCall::Balances(..) | RuntimeCall::UniversalDividend(..) + ) } ProxyType::CancelProxy => { matches!( c, - Call::Proxy(pallet_proxy::Call::reject_announcement { .. }) + RuntimeCall::Proxy(pallet_proxy::Call::reject_announcement { .. }) ) } } @@ -192,8 +221,8 @@ impl frame_support::traits::InstanceFilter<Call> for ProxyType { common_runtime::pallets_config! { impl pallet_sudo::Config for Runtime { - type Event = Event; - type Call = Call; + type RuntimeEvent = RuntimeEvent; + type RuntimeCall = RuntimeCall; } } @@ -260,10 +289,10 @@ construct_runtime!( impl<C> frame_system::offchain::SendTransactionTypes<C> for Runtime where - Call: From<C>, + RuntimeCall: From<C>, { type Extrinsic = UncheckedExtrinsic; - type OverarchingCall = Call; + type OverarchingCall = RuntimeCall; } // All of our runtimes share most of their Runtime API implementations. diff --git a/runtime/gtest/src/parameters.rs b/runtime/gtest/src/parameters.rs index b2290c84e7d579ebc5b6a535ab211cd684fbd460..5e9aa22522ca0d9b1b6f5e84fa88d2445ba380e7 100644 --- a/runtime/gtest/src/parameters.rs +++ b/runtime/gtest/src/parameters.rs @@ -25,7 +25,8 @@ use sp_runtime::transaction_validity::TransactionPriority; parameter_types! { pub const BlockHashCount: BlockNumber = 2400; /// We allow for 2 seconds of compute with a 6 second average block time. - pub BlockWeights: frame_system::limits::BlockWeights = block_weights(2 * WEIGHT_PER_SECOND, NORMAL_DISPATCH_RATIO); + pub BlockWeights: frame_system::limits::BlockWeights = block_weights((WEIGHT_PER_SECOND * 2) + .set_proof_size(5 * 1024 * 1024), NORMAL_DISPATCH_RATIO); pub BlockLength: frame_system::limits::BlockLength = frame_system::limits::BlockLength ::max_with_normal_ratio(5 * 1024 * 1024, NORMAL_DISPATCH_RATIO); pub const SS58Prefix: u16 = 42; diff --git a/rust-toolchain b/rust-toolchain index d5cdfc7a5a7e3388f6c4cb74d3ece9bc40229d40..fe2d86aa67f086868d92ef4ba4c2528d6de1d766 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -1,5 +1,5 @@ [toolchain] -channel = "nightly-2022-04-20" +channel = "nightly-2022-10-09" components = [ "rustfmt", "clippy" ] targets = [ "wasm32-unknown-unknown" ] profile = "minimal" diff --git a/xtask/Cargo.toml b/xtask/Cargo.toml index 528564f2a932edc8287ee4c414ba88f258f85de0..acf7d5b5e7a982f10b54ef6f3c9c31555404d308 100644 --- a/xtask/Cargo.toml +++ b/xtask/Cargo.toml @@ -14,7 +14,7 @@ name = "xtask" [dependencies] anyhow = "1.0.32" -clap = { version = "3.0", features = ["derive"] } +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" graphql_client = "0.10.0" diff --git a/xtask/src/main.rs b/xtask/src/main.rs index 27a971e7b08fa13d829a7ca1659fd2dd8a8289a8..00944fe83cc65ae0218cf2c233bf17e07e818782 100644 --- a/xtask/src/main.rs +++ b/xtask/src/main.rs @@ -42,10 +42,10 @@ enum DuniterXTaskCommand { GenCallsDoc, /// Inject runtime code in raw specs InjectRuntimeCode { - #[clap(short, long, parse(from_os_str))] + #[clap(short, long)] /// Runtime filepath runtime: PathBuf, - #[clap(short = 's', long, parse(from_os_str))] + #[clap(short = 's', long)] /// Raw spec filepath raw_spec: PathBuf, }, @@ -61,7 +61,7 @@ async fn main() -> Result<()> { let args = DuniterXTask::parse(); if !version_check::is_min_version(MIN_RUST_VERSION).unwrap_or(false) - && exec_should_success(Command::new("rustup").args(&["update", "stable"])).is_err() + && exec_should_success(Command::new("rustup").args(["update", "stable"])).is_err() { eprintln!( "Duniter requires stable Rust {} or higher. If you installed the Rust toolchain via rustup, please execute the command `rustup update stable`.", @@ -125,7 +125,7 @@ fn inject_runtime_code(raw_spec: &Path, runtime: &Path) -> Result<()> { .with_context(|| "invalid raw spec file")? .insert( CODE_KEY.to_owned(), - serde_json::Value::String(unsafe { std::mem::transmute(hex_runtime_code) }), + serde_json::Value::String(hex_runtime_code), ); // Write modified raw specs @@ -139,16 +139,16 @@ fn inject_runtime_code(raw_spec: &Path, runtime: &Path) -> Result<()> { } fn build(_production: bool) -> Result<()> { - exec_should_success(Command::new("cargo").args(&["clean", "-p", "duniter"]))?; - exec_should_success(Command::new("cargo").args(&["build", "--locked"]))?; - exec_should_success(Command::new("mkdir").args(&["build"]))?; - exec_should_success(Command::new("mv").args(&["target/debug/duniter", "build/duniter"]))?; + exec_should_success(Command::new("cargo").args(["clean", "-p", "duniter"]))?; + exec_should_success(Command::new("cargo").args(["build", "--locked"]))?; + exec_should_success(Command::new("mkdir").args(["build"]))?; + exec_should_success(Command::new("mv").args(["target/debug/duniter", "build/duniter"]))?; Ok(()) } fn test() -> Result<()> { - exec_should_success(Command::new("cargo").args(&[ + exec_should_success(Command::new("cargo").args([ "test", "--workspace", "--exclude",