diff --git a/CHANGELOG.md b/CHANGELOG.md index e47be2757..7f52cf9b0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -46,7 +46,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed -- [C,D] Updated Substrate to polkadot-v0.9.30 +- [C,D] Updated Substrate to polkadot-v0.9.31 ## [4.7.2] diff --git a/Cargo.lock b/Cargo.lock index 89953ca87..f90fd2cbe 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -23,11 +23,11 @@ dependencies = [ [[package]] name = "addr2line" -version = "0.20.0" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4fa78e18c64fce05e902adecd7a5eed15a5e0a3439f7b0e169f0252214865e3" +checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" dependencies = [ - "gimli 0.27.3", + "gimli 0.28.0", ] [[package]] @@ -38,30 +38,30 @@ checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" [[package]] name = "aead" -version = "0.4.3" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b613b8e1e3cf911a086f53f03bf286f52fd7a7258e4fa606f0ef220d39d8877" +checksum = "d122413f284cf2d62fb1b7db97e02edb8cda96d769b16e443a4f6195e35662b0" dependencies = [ + "crypto-common", "generic-array 0.14.7", ] [[package]] name = "aes" -version = "0.7.5" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e8b47f52ea9bae42228d07ec09eb676433d7c4ed1ebdf0f1d1c29ed446f1ab8" +checksum = "ac1f845298e95f983ff1944b728ae08b8cebab80d684f0a832ed0fc74dfa27e2" dependencies = [ "cfg-if", "cipher", "cpufeatures", - "opaque-debug 0.3.0", ] [[package]] name = "aes-gcm" -version = "0.9.4" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df5f85a83a7d8b0442b6aa7b504b8212c1733da07b98aae43d4bc21b2cb3cdf6" +checksum = "831010a0f742e1209b3bcea8fab6a8e149051ba6099432c8cb2cc117dec3ead1" dependencies = [ "aead", "aes", @@ -73,29 +73,20 @@ dependencies = [ [[package]] name = "ahash" -version = "0.7.6" +version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" +checksum = "5a824f2aa7e75a0c98c5a504fceb80649e9c35265d44525b5f94de4771a395cd" dependencies = [ - "getrandom 0.2.10", + "getrandom 0.2.11", "once_cell", "version_check", ] [[package]] name = "aho-corasick" -version = "0.7.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc936419f96fa211c1b9166887b38e5e40b19958e5b895be7c1f93adec7071ac" -dependencies = [ - "memchr", -] - -[[package]] -name = "aho-corasick" -version = "1.0.2" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43f6cb1bf222025340178f382c426f13757b2960e89779dfcb319c32542a5a41" +checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" dependencies = [ "memchr", ] @@ -153,60 +144,11 @@ dependencies = [ "winapi", ] -[[package]] -name = "anstream" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ca84f3628370c59db74ee214b3263d58f9aadd9b4fe7e711fd87dc452b7f163" -dependencies = [ - "anstyle", - "anstyle-parse", - "anstyle-query", - "anstyle-wincon", - "colorchoice", - "is-terminal", - "utf8parse", -] - -[[package]] -name = "anstyle" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a30da5c5f2d5e72842e00bcb57657162cdabef0931f40e2deb9b4140440cecd" - -[[package]] -name = "anstyle-parse" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "938874ff5980b03a87c5524b3ae5b59cf99b1d6bc836848df7bc5ada9643c333" -dependencies = [ - "utf8parse", -] - -[[package]] -name = "anstyle-query" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b" -dependencies = [ - "windows-sys 0.48.0", -] - -[[package]] -name = "anstyle-wincon" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "180abfa45703aebe0093f79badacc01b8fd4ea2e35118747e5811127f926e188" -dependencies = [ - "anstyle", - "windows-sys 0.48.0", -] - [[package]] name = "anyhow" -version = "1.0.71" +version = "1.0.75" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c7d0618f0e0b7e8ff11427422b64564d5fb0be1940354bfe2e0529b18a9d9b8" +checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" [[package]] name = "approx" @@ -263,21 +205,34 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "81953c529336010edd6d8e358f886d9581267795c61b19475b71314bffa46d35" dependencies = [ "concurrent-queue", - "event-listener", + "event-listener 2.5.3", "futures-core", ] +[[package]] +name = "async-channel" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d37875bd9915b7d67c2f117ea2c30a0989874d0b2cb694fe25403c85763c0c9e" +dependencies = [ + "concurrent-queue", + "event-listener 3.1.0", + "event-listener-strategy", + "futures-core", + "pin-project-lite 0.2.13", +] + [[package]] name = "async-executor" -version = "1.5.1" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fa3dc5f2a8564f07759c008b9109dc0d39de92a88d5588b8a5036d286383afb" +checksum = "4b0c4a4f319e45986f347ee47fef8bf5e81c9abc3f6f58dc2391439f30df65f0" dependencies = [ - "async-lock", + "async-lock 2.8.0", "async-task", "concurrent-queue", - "fastrand", - "futures-lite", + "fastrand 2.0.1", + "futures-lite 1.13.0", "slab", ] @@ -287,12 +242,12 @@ version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f1b6f5d7df27bd294849f8eec66ecfc63d11814df7a4f5d74168a2394467b776" dependencies = [ - "async-channel", + "async-channel 1.9.0", "async-executor", - "async-io", - "async-lock", + "async-io 1.13.0", + "async-lock 2.8.0", "blocking", - "futures-lite", + "futures-lite 1.13.0", "once_cell", ] @@ -302,44 +257,92 @@ version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fc5b45d93ef0529756f812ca52e44c221b35341892d3dcc34132ac02f3dd2af" dependencies = [ - "async-lock", + "async-lock 2.8.0", "autocfg", "cfg-if", "concurrent-queue", - "futures-lite", + "futures-lite 1.13.0", "log", "parking", - "polling", - "rustix 0.37.23", + "polling 2.8.0", + "rustix 0.37.27", "slab", - "socket2 0.4.9", + "socket2 0.4.10", "waker-fn", ] +[[package]] +name = "async-io" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41ed9d5715c2d329bf1b4da8d60455b99b187f27ba726df2883799af9af60997" +dependencies = [ + "async-lock 3.1.0", + "cfg-if", + "concurrent-queue", + "futures-io", + "futures-lite 2.0.1", + "parking", + "polling 3.3.0", + "rustix 0.38.21", + "slab", + "tracing", + "waker-fn", + "windows-sys 0.48.0", +] + [[package]] name = "async-lock" -version = "2.7.0" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa24f727524730b077666307f2734b4a1a1c57acb79193127dcc8914d5242dd7" +checksum = "287272293e9d8c41773cec55e365490fe034813a2f172f502d6ddcf75b2f582b" dependencies = [ - "event-listener", + "event-listener 2.5.3", +] + +[[package]] +name = "async-lock" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "deb2ab2aa8a746e221ab826c73f48bc6ba41be6763f0855cb249eb6d154cf1d7" +dependencies = [ + "event-listener 3.1.0", + "event-listener-strategy", + "pin-project-lite 0.2.13", ] [[package]] name = "async-process" -version = "1.7.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a9d28b1d97e08915212e2e45310d47854eafa69600756fc735fb788f75199c9" +checksum = "ea6438ba0a08d81529c69b36700fa2f95837bfe3e776ab39cde9c14d9149da88" dependencies = [ - "async-io", - "async-lock", - "autocfg", + "async-io 1.13.0", + "async-lock 2.8.0", + "async-signal", "blocking", "cfg-if", - "event-listener", - "futures-lite", - "rustix 0.37.23", - "signal-hook", + "event-listener 3.1.0", + "futures-lite 1.13.0", + "rustix 0.38.21", + "windows-sys 0.48.0", +] + +[[package]] +name = "async-signal" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e47d90f65a225c4527103a8d747001fc56e375203592b25ad103e1ca13124c5" +dependencies = [ + "async-io 2.2.0", + "async-lock 2.8.0", + "atomic-waker", + "cfg-if", + "futures-core", + "futures-io", + "rustix 0.38.21", + "signal-hook-registry", + "slab", "windows-sys 0.48.0", ] @@ -349,22 +352,22 @@ version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "62565bb4402e926b29953c785397c6dc0391b7b446e45008b0049eb43cec6f5d" dependencies = [ - "async-channel", + "async-channel 1.9.0", "async-global-executor", - "async-io", - "async-lock", + "async-io 1.13.0", + "async-lock 2.8.0", "async-process", "crossbeam-utils", "futures-channel", "futures-core", "futures-io", - "futures-lite", + "futures-lite 1.13.0", "gloo-timers", "kv-log-macro", "log", "memchr", "once_cell", - "pin-project-lite 0.2.10", + "pin-project-lite 0.2.13", "pin-utils", "slab", "wasm-bindgen-futures", @@ -372,54 +375,54 @@ dependencies = [ [[package]] name = "async-std-resolver" -version = "0.22.0" +version = "0.21.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ba50e24d9ee0a8950d3d03fc6d0dd10aa14b5de3b101949b4e160f7fee7c723" +checksum = "0f2f8a4a203be3325981310ab243a28e6e4ea55b6519bffce05d41ab60e09ad8" dependencies = [ "async-std", "async-trait", "futures-io", "futures-util", "pin-utils", - "socket2 0.4.9", + "socket2 0.4.10", "trust-dns-resolver", ] [[package]] name = "async-task" -version = "4.4.0" +version = "4.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecc7ab41815b3c653ccd2978ec3255c81349336702dfdf62ee6f7069b12a3aae" +checksum = "b4eb2cdb97421e01129ccb49169d8279ed21e829929144f4a22a6e54ac549ca1" [[package]] name = "async-trait" -version = "0.1.71" +version = "0.1.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a564d521dd56509c4c47480d00b80ee55f7e385ae48db5744c67ad50c92d2ebf" +checksum = "a66537f1bb974b254c98ed142ff995236e81b9d0fe4db0575f46612cb15eb0f9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.39", ] [[package]] name = "asynchronous-codec" -version = "0.6.1" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06a0daa378f5fd10634e44b0a29b2a87b890657658e072a30d6f26e57ddee182" +checksum = "4057f2c32adbb2fc158e22fb38433c8e9bbf76b75a4732c7c0cbaf695fb65568" dependencies = [ "bytes", "futures-sink", "futures-util", "memchr", - "pin-project-lite 0.2.10", + "pin-project-lite 0.2.13", ] [[package]] name = "atomic-waker" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1181e1e0d1fce796a03db1ae795d67167da795f9cf4a39c37589e85ef57f26d3" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" [[package]] name = "atty" @@ -440,16 +443,16 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "backtrace" -version = "0.3.68" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4319208da049c43661739c5fade2ba182f09d1dc2299b32298d3a31692b17e12" +checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" dependencies = [ - "addr2line 0.20.0", + "addr2line 0.21.0", "cc", "cfg-if", "libc", "miniz_oxide", - "object 0.31.1", + "object 0.32.1", "rustc-demangle", ] @@ -479,9 +482,9 @@ checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] name = "base64" -version = "0.21.2" +version = "0.21.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "604178f6c5c21f02dc555784810edfb88d34ac2c73b2eae109655649ee73ce3d" +checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9" [[package]] name = "base64ct" @@ -498,6 +501,12 @@ dependencies = [ "serde", ] +[[package]] +name = "bimap" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "230c5f1ca6a325a32553f8640d31ac9b49f2411e901e427570154868b46da4f7" + [[package]] name = "bincode" version = "1.3.3" @@ -509,9 +518,9 @@ dependencies = [ [[package]] name = "bindgen" -version = "0.64.0" +version = "0.65.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4243e6031260db77ede97ad86c27e501d646a27ab57b59a574f725d98ab1fb4" +checksum = "cfdf7b466f9a4903edc73f95d6d2bcd5baf8ae620638762244d3f60143643cc5" dependencies = [ "bitflags 1.3.2", "cexpr", @@ -519,12 +528,13 @@ dependencies = [ "lazy_static", "lazycell", "peeking_take_while", + "prettyplease 0.2.15", "proc-macro2", "quote", "regex", "rustc-hash", "shlex", - "syn 1.0.109", + "syn 2.0.39", ] [[package]] @@ -535,9 +545,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.3.3" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "630be753d4e58660abd17930c71b647fe46c27ea6b63cc59e1e3851406972e42" +checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" [[package]] name = "bitvec" @@ -572,31 +582,31 @@ dependencies = [ [[package]] name = "blake2b_simd" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c2f0dc9a68c6317d884f97cc36cf5a3d20ba14ce404227df55e1af708ab04bc" +checksum = "23285ad32269793932e830392f2fe2f83e26488fd3ec778883a93c8323735780" dependencies = [ "arrayref", "arrayvec 0.7.4", - "constant_time_eq 0.2.6", + "constant_time_eq 0.3.0", ] [[package]] name = "blake2s_simd" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6637f448b9e61dfadbdcbae9a885fadee1f3eaffb1f8d3c1965d3ade8bdfd44f" +checksum = "94230421e395b9920d23df13ea5d77a20e1725331f90fbbf6df6040b33f756ae" dependencies = [ "arrayref", "arrayvec 0.7.4", - "constant_time_eq 0.2.6", + "constant_time_eq 0.3.0", ] [[package]] name = "blake3" -version = "1.4.1" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "199c42ab6972d92c9f8995f086273d25c42fc0f7b2a1fcefba465c1352d25ba5" +checksum = "0231f06152bf547e9c2b5194f247cd97aacf6dcd8b15d8e5ec0663f64580da87" dependencies = [ "arrayref", "arrayvec 0.7.4", @@ -646,17 +656,18 @@ dependencies = [ [[package]] name = "blocking" -version = "1.3.1" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77231a1c8f801696fc0123ec6150ce92cffb8e164a02afb9c8ddee0e9b65ad65" +checksum = "6a37913e8dc4ddcc604f0c6d3bf2887c995153af3611de9e23c352b44c1b9118" dependencies = [ - "async-channel", - "async-lock", + "async-channel 2.1.0", + "async-lock 3.1.0", "async-task", - "atomic-waker", - "fastrand", - "futures-lite", - "log", + "fastrand 2.0.1", + "futures-io", + "futures-lite 2.0.1", + "piper", + "tracing", ] [[package]] @@ -667,9 +678,9 @@ checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" [[package]] name = "bstr" -version = "1.6.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6798148dccfbff0fae41c7574d2fa8f1ef3492fba0face179de5d8d447d67b05" +checksum = "542f33a8835a0884b006a0c3df3dadd99c0c3f296ed26c2fdc8028e01ad6230c" dependencies = [ "memchr", "serde", @@ -686,9 +697,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.13.0" +version = "3.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1" +checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" [[package]] name = "byte-slice-cast" @@ -702,17 +713,26 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" +[[package]] +name = "byte-unit" +version = "4.0.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da78b32057b8fdfc352504708feeba7216dcd65a2c9ab02978cbd288d1279b6c" +dependencies = [ + "utf8-width", +] + [[package]] name = "byteorder" -version = "1.4.3" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" +checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" [[package]] name = "bzip2-sys" @@ -727,18 +747,18 @@ dependencies = [ [[package]] name = "camino" -version = "1.1.4" +version = "1.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c530edf18f37068ac2d977409ed5cd50d53d73bc653c7647b48eb78976ac9ae2" +checksum = "c59e92b5a388f549b863a7bea62612c09f24c8393560709a54558a9abdfb3b9c" dependencies = [ "serde", ] [[package]] name = "cargo-platform" -version = "0.1.2" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbdb825da8a5df079a43676dbe042702f1707b1109f713a01420fbb4cc71fa27" +checksum = "12024c4645c97566567129c204f65d5815a8c9aecf30fcbe682b2fe034996d36" dependencies = [ "serde", ] @@ -751,18 +771,18 @@ checksum = "4acbb09d9ee8e23699b9634375c72795d095bf268439da88562cf9b501f181fa" dependencies = [ "camino", "cargo-platform", - "semver 1.0.17", + "semver 1.0.20", "serde", - "serde_json 1.0.100", + "serde_json 1.0.108", ] [[package]] name = "cc" -version = "1.0.79" +version = "1.0.84" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" +checksum = "0f8e7c90afad890484a21653d08b6e209ae34770fb5ee298f9c699fcc1e5c856" dependencies = [ - "jobserver", + "libc", ] [[package]] @@ -799,6 +819,7 @@ dependencies = [ "frame-system", "frame-system-rpc-runtime-api", "node-primitives", + "pallet-contracts-rpc", "pallet-transaction-payment", "pallet-transaction-payment-rpc-runtime-api", "sc-client-api", @@ -849,10 +870,12 @@ dependencies = [ "pallet-collective", "pallet-contracts", "pallet-contracts-primitives", + "pallet-contracts-rpc-runtime-api", "pallet-ddc-clusters", "pallet-ddc-customers", "pallet-ddc-metrics-offchain-worker", "pallet-ddc-nodes", + "pallet-ddc-payouts", "pallet-ddc-staking", "pallet-democracy", "pallet-election-provider-multi-phase", @@ -922,6 +945,7 @@ version = "4.8.1" dependencies = [ "jsonrpsee", "node-primitives", + "pallet-contracts-rpc", "pallet-transaction-payment-rpc", "sc-chain-spec", "sc-client-api", @@ -974,6 +998,7 @@ dependencies = [ "pallet-collective", "pallet-contracts", "pallet-contracts-primitives", + "pallet-contracts-rpc-runtime-api", "pallet-ddc-metrics-offchain-worker", "pallet-democracy", "pallet-election-provider-multi-phase", @@ -1125,21 +1150,20 @@ checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" [[package]] name = "chacha20" -version = "0.8.2" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c80e5460aa66fe3b91d40bcbdab953a597b60053e34d684ac6903f863b680a6" +checksum = "c3613f74bd2eac03dad61bd53dbe620703d4371614fe0bc3b9f04dd36fe4e818" dependencies = [ "cfg-if", "cipher", "cpufeatures", - "zeroize", ] [[package]] name = "chacha20poly1305" -version = "0.9.1" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a18446b09be63d457bbec447509e85f662f32952b035ce892290396bc0b0cff5" +checksum = "10cd79432192d1c0f4e1a0fef9527696cc039165d729fb41b3f4f4f354c2dc35" dependencies = [ "aead", "chacha20", @@ -1150,17 +1174,16 @@ dependencies = [ [[package]] name = "chrono" -version = "0.4.26" +version = "0.4.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec837a71355b28f6556dbd569b37b3f363091c0bd4b2e735674521b4c5fd9bc5" +checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38" dependencies = [ "android-tzdata", "iana-time-zone", "js-sys", "num-traits", - "time", "wasm-bindgen", - "winapi", + "windows-targets", ] [[package]] @@ -1178,11 +1201,13 @@ dependencies = [ [[package]] name = "cipher" -version = "0.3.0" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ee52072ec15386f770805afd189a01c8841be8696bed250fa2f13c4c0d6dfb7" +checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" dependencies = [ - "generic-array 0.14.7", + "crypto-common", + "inout", + "zeroize", ] [[package]] @@ -1193,55 +1218,56 @@ checksum = "c688fc74432808e3eb684cae8830a86be1d66a2bd58e1f248ed0960a590baf6f" dependencies = [ "glob", "libc", - "libloading", + "libloading 0.7.4", ] [[package]] name = "clap" -version = "4.3.11" +version = "3.2.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1640e5cc7fb47dbb8338fd471b105e7ed6c3cb2aeb00c2e067127ffd3764a05d" +checksum = "4ea181bf566f71cb9a5d17a59e1871af638180a18fb0035c92ae62b705207123" dependencies = [ - "clap_builder", + "atty", + "bitflags 1.3.2", "clap_derive", - "once_cell", -] - -[[package]] -name = "clap_builder" -version = "4.3.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98c59138d527eeaf9b53f35a77fcc1fad9d883116070c63d5de1c7dc7b00c72b" -dependencies = [ - "anstream", - "anstyle", "clap_lex", + "indexmap 1.9.3", + "once_cell", "strsim", + "termcolor", + "textwrap", ] [[package]] name = "clap_derive" -version = "4.3.2" +version = "3.2.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8cd2b2a819ad6eec39e8f1d6b53001af1e5469f8c177579cdaeb313115b825f" +checksum = "ae6371b8bdc8b7d3959e9cf7b22d4435ef3e79e138688421ec654acf8c81b008" dependencies = [ "heck", + "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.25", + "syn 1.0.109", ] [[package]] name = "clap_lex" -version = "0.5.0" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2da6da31387c7e4ef160ffab6d5e7f00c42626fe39aea70a7b0f1773f7dd6c1b" +checksum = "2850f2f5a82cbf437dd5af4d49848fbdfc27c157c3d010345776f952765261c5" +dependencies = [ + "os_str_bytes", +] [[package]] -name = "colorchoice" -version = "1.0.0" +name = "cmake" +version = "0.1.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" +checksum = "a31c789563b815f77f4250caee12365734369f942439b7defd71e18a48197130" +dependencies = [ + "cc", +] [[package]] name = "comfy-table" @@ -1256,9 +1282,9 @@ dependencies = [ [[package]] name = "concurrent-queue" -version = "2.2.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62ec6771ecfa0762d24683ee5a32ad78487a3d3afdc0fb8cae19d2c5deb50b7c" +checksum = "f057a694a54f12365049b0958a1685bb52d567f5593b355fbf685838e873d400" dependencies = [ "crossbeam-utils", ] @@ -1275,12 +1301,6 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" -[[package]] -name = "constant_time_eq" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21a53c0a4d288377e7415b53dcfc3c04da5cdc2cc95c8d5ac178b58f0b861ad6" - [[package]] name = "constant_time_eq" version = "0.3.0" @@ -1323,9 +1343,9 @@ dependencies = [ [[package]] name = "cpufeatures" -version = "0.2.9" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a17b76ff3a4162b0b27f354a0c87015ddad39d35f9c0c36607a3bdd175dde1f1" +checksum = "ce420fe07aecd3e67c5f910618fe65e94158f6dcc0adf44e00d69ce2bdfe0fd0" dependencies = [ "libc", ] @@ -1437,16 +1457,6 @@ dependencies = [ "cfg-if", ] -[[package]] -name = "crossbeam-channel" -version = "0.5.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a33c2bf77f2df06183c3aa30d1e96c0695a313d4f9c453cc3762a6db39f99200" -dependencies = [ - "cfg-if", - "crossbeam-utils", -] - [[package]] name = "crossbeam-deque" version = "0.8.3" @@ -1505,6 +1515,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" dependencies = [ "generic-array 0.14.7", + "rand_core 0.6.4", "typenum", ] @@ -1540,13 +1551,24 @@ dependencies = [ [[package]] name = "ctr" -version = "0.8.0" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "049bb91fb4aaf0e3c7efa6cd5ef877dbbbd15b39dad06d9948de4ec8a75761ea" +checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835" dependencies = [ "cipher", ] +[[package]] +name = "cuckoofilter" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b810a8449931679f64cd7eef1bbd0fa315801b6d5d9cdc1ace2804d6529eee18" +dependencies = [ + "byteorder", + "fnv", + "rand 0.7.3", +] + [[package]] name = "curve25519-dalek" version = "2.1.3" @@ -1575,18 +1597,31 @@ dependencies = [ [[package]] name = "curve25519-dalek" -version = "4.0.0-rc.1" +version = "4.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d4ba9852b42210c7538b75484f9daa0655e9a3ac04f693747bb0f02cf3cfe16" +checksum = "e89b8c6a2e4b1f45971ad09761aafb85514a84744b67a95e32c3cc1352d1f65c" dependencies = [ "cfg-if", + "cpufeatures", + "curve25519-dalek-derive", "fiat-crypto", - "packed_simd_2", - "platforms 3.0.2", + "platforms 3.2.0", + "rustc_version 0.4.0", "subtle", "zeroize", ] +[[package]] +name = "curve25519-dalek-derive" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.39", +] + [[package]] name = "data-encoding" version = "2.4.0" @@ -1630,6 +1665,7 @@ version = "0.1.0" dependencies = [ "ddc-primitives", "frame-system", + "sp-runtime", ] [[package]] @@ -1658,12 +1694,6 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "524cbf6897b527295dff137cec09ecf3a05f4fddffd7dfcd1585403449e74198" -[[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" @@ -1744,12 +1774,6 @@ 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" @@ -1758,9 +1782,9 @@ checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" [[package]] name = "dtoa" -version = "1.0.8" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "519b83cd10f5f6e969625a409f735182bea5558cd8b64c655806ceaae36f1999" +checksum = "dcbb2bf8e87535c23f7a8a321e364ce21462d0ff10cb6407820e8e96dfff6653" [[package]] name = "dyn-clonable" @@ -1785,9 +1809,9 @@ dependencies = [ [[package]] name = "dyn-clone" -version = "1.0.11" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68b0cf012f1230e43cd00ebb729c6bb58707ecfa8ad08b52ef3a4ccd2697fc30" +checksum = "545b22097d44f8a9581187cdf93de7a71e4722bf51200cfaba810865b49a495d" [[package]] name = "ecdsa" @@ -1831,7 +1855,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7c24f403d068ad0b359e577a77f92392118be3f3c927538f2bb544a5ecd828c6" dependencies = [ "curve25519-dalek 3.2.0", - "hashbrown", + "hashbrown 0.12.3", "hex", "rand_core 0.6.4", "sha2 0.9.9", @@ -1840,9 +1864,9 @@ dependencies = [ [[package]] name = "either" -version = "1.8.1" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" +checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" [[package]] name = "elliptic-curve" @@ -1864,9 +1888,9 @@ dependencies = [ [[package]] name = "enum-as-inner" -version = "0.5.1" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9720bba047d567ffc8a3cba48bf19126600e249ab7f128e9233e6376976a116" +checksum = "21cdad81446a7f7dc43f6a77409efeb9733d2fa65553efef6018ef257c959b73" dependencies = [ "heck", "proc-macro2", @@ -1876,22 +1900,22 @@ dependencies = [ [[package]] name = "enumflags2" -version = "0.7.7" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c041f5090df68b32bcd905365fd51769c8b9d553fe87fde0b683534f10c01bd2" +checksum = "5998b4f30320c9d93aed72f63af821bfdac50465b75428fce77b48ec482c3939" dependencies = [ "enumflags2_derive", ] [[package]] name = "enumflags2_derive" -version = "0.7.7" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e9a1f9f7d83e59740248a6e14ecf93929ade55027844dfcea78beafccc15745" +checksum = "f95e2801cd355d4a1a3e3953ce6ee5ae9603a5c833455343a8bfe3f44d418246" dependencies = [ "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.39", ] [[package]] @@ -1909,9 +1933,9 @@ dependencies = [ [[package]] name = "env_logger" -version = "0.10.0" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85cdab6a89accf66733ad5a1693a4dcced6aeff64602b634530dd73c1f3ee9f0" +checksum = "95b3f3e67048839cb0d0781f445682a35113da7121f7c949db0e2be96a4fbece" dependencies = [ "humantime", "is-terminal", @@ -1926,6 +1950,12 @@ version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e48c92028aaa870e83d51c64e5d4e0b6981b360c522198c23959f219a4e1b15b" +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + [[package]] name = "errno" version = "0.2.8" @@ -1939,11 +1969,10 @@ dependencies = [ [[package]] name = "errno" -version = "0.3.1" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a" +checksum = "7c18ee0ed65a5f1f81cac6b1d213b69c35fa47d4252ad41f1486dbd8226fe36e" dependencies = [ - "errno-dragonfly", "libc", "windows-sys 0.48.0", ] @@ -1964,6 +1993,27 @@ version = "2.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" +[[package]] +name = "event-listener" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d93877bcde0eb80ca09131a08d23f0a5c18a620b01db137dba666d18cd9b30c2" +dependencies = [ + "concurrent-queue", + "parking", + "pin-project-lite 0.2.13", +] + +[[package]] +name = "event-listener-strategy" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d96b852f1345da36d551b9473fa1e2b1eb5c5195585c6c018118bc92a8d91160" +dependencies = [ + "event-listener 3.1.0", + "pin-project-lite 0.2.13", +] + [[package]] name = "exit-future" version = "0.2.0" @@ -1994,6 +2044,12 @@ dependencies = [ "instant", ] +[[package]] +name = "fastrand" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" + [[package]] name = "fdlimit" version = "0.2.1" @@ -2015,9 +2071,9 @@ dependencies = [ [[package]] name = "fiat-crypto" -version = "0.1.20" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e825f6987101665dea6ec934c09ec6d721de7bc1bf92248e1d5810c8cd636b77" +checksum = "f69037fe1b785e84986b4f2cbcf647381876a00671d25ceef715d7812dd7e1dd" [[package]] name = "file-per-thread-logger" @@ -2025,19 +2081,19 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "84f2e425d9790201ba4af4630191feac6dcc98765b118d4d18e91d23c2353866" dependencies = [ - "env_logger 0.10.0", + "env_logger 0.10.1", "log", ] [[package]] name = "filetime" -version = "0.2.21" +version = "0.2.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cbc844cecaee9d4443931972e1289c8ff485cb4cc2767cb03ca139ed6885153" +checksum = "d4029edd3e734da6fe05b6cd7bd2960760a616bd2ddd0d59a0124746d6272af0" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.2.16", + "redox_syscall 0.3.5", "windows-sys 0.48.0", ] @@ -2059,9 +2115,9 @@ dependencies = [ [[package]] name = "fixed-hash" -version = "0.8.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "835c052cb0c08c1acf6ffd71c022172e18723949c8282f2b9f27efbc51e64534" +checksum = "cfcf0ed7fe52a17a03854ec54a9f76d6d84508d1c0e66bc1793301c73fc8493c" dependencies = [ "byteorder", "rand 0.8.5", @@ -2077,24 +2133,15 @@ checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" [[package]] name = "flate2" -version = "1.0.26" +version = "1.0.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b9429470923de8e8cbd4d2dc513535400b4b3fef0319fb5c4e1f520a7bef743" +checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" dependencies = [ "crc32fast", "libz-sys", "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]] name = "fnv" version = "1.0.7" @@ -2104,7 +2151,7 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "fork-tree" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "parity-scale-codec", ] @@ -2118,16 +2165,10 @@ dependencies = [ "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/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "frame-support", "frame-system", @@ -2150,7 +2191,7 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "Inflector", "array-bytes", @@ -2180,7 +2221,7 @@ dependencies = [ "sc-service", "sc-sysinfo", "serde", - "serde_json 1.0.100", + "serde_json 1.0.108", "serde_nanos", "sp-api", "sp-blockchain", @@ -2201,7 +2242,7 @@ dependencies = [ [[package]] name = "frame-election-provider-solution-type" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -2212,7 +2253,7 @@ dependencies = [ [[package]] name = "frame-election-provider-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "frame-election-provider-solution-type", "frame-support", @@ -2228,7 +2269,7 @@ dependencies = [ [[package]] name = "frame-executive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "frame-support", "frame-system", @@ -2257,7 +2298,7 @@ dependencies = [ [[package]] name = "frame-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "bitflags 1.3.2", "frame-metadata", @@ -2289,7 +2330,7 @@ dependencies = [ [[package]] name = "frame-support-procedural" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "Inflector", "cfg-expr", @@ -2303,7 +2344,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate", @@ -2315,7 +2356,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "proc-macro2", "quote", @@ -2325,7 +2366,7 @@ dependencies = [ [[package]] name = "frame-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "frame-support", "log", @@ -2343,7 +2384,7 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "frame-benchmarking", "frame-support", @@ -2358,7 +2399,7 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "parity-scale-codec", "sp-api", @@ -2367,7 +2408,7 @@ dependencies = [ [[package]] name = "frame-try-runtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "frame-support", "parity-scale-codec", @@ -2376,6 +2417,18 @@ dependencies = [ "sp-std", ] +[[package]] +name = "fs-swap" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03d47dad3685eceed8488986cad3d5027165ea5edb164331770e2059555f10a5" +dependencies = [ + "lazy_static", + "libc", + "libloading 0.5.2", + "winapi", +] + [[package]] name = "fs2" version = "0.4.3" @@ -2386,6 +2439,12 @@ dependencies = [ "winapi", ] +[[package]] +name = "fs_extra" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c" + [[package]] name = "funty" version = "2.0.0" @@ -2394,9 +2453,9 @@ checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" [[package]] name = "futures" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23342abe12aba583913b2e62f22225ff9c950774065e4bfb61a19cd9770fec40" +checksum = "da0290714b38af9b4a7b094b8a37086d1b4e61f2df9122c3cad2577669145335" dependencies = [ "futures-channel", "futures-core", @@ -2409,9 +2468,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2" +checksum = "ff4dd66668b557604244583e3e1e1eada8c5c2e96a6d0d6653ede395b78bbacb" dependencies = [ "futures-core", "futures-sink", @@ -2419,15 +2478,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" +checksum = "eb1d22c66e66d9d72e1758f0bd7d4fd0bee04cad842ee34587d68c07e45d088c" [[package]] name = "futures-executor" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccecee823288125bd88b4d7f565c9e58e41858e47ab72e8ea2d64e93624386e0" +checksum = "0f4fb8693db0cf099eadcca0efe2a5a22e4550f98ed16aba6c48700da29597bc" dependencies = [ "futures-core", "futures-task", @@ -2437,9 +2496,9 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" +checksum = "8bf34a163b5c4c52d0478a4d757da8fb65cabef42ba90515efee0f6f9fa45aaa" [[package]] name = "futures-lite" @@ -2447,24 +2506,34 @@ version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49a9d51ce47660b1e808d3c990b4709f2f415d928835a17dfd16991515c46bce" dependencies = [ - "fastrand", + "fastrand 1.9.0", "futures-core", "futures-io", "memchr", "parking", - "pin-project-lite 0.2.10", + "pin-project-lite 0.2.13", "waker-fn", ] +[[package]] +name = "futures-lite" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3831c2651acb5177cbd83943f3d9c8912c5ad03c76afcc0e9511ba568ec5ebb" +dependencies = [ + "futures-core", + "pin-project-lite 0.2.13", +] + [[package]] name = "futures-macro" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" +checksum = "53b153fd91e4b0147f4aced87be237c98248656bb01050b96bf3ee89220a8ddb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.39", ] [[package]] @@ -2480,15 +2549,15 @@ dependencies = [ [[package]] name = "futures-sink" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e" +checksum = "e36d3378ee38c2a36ad710c5d30c2911d752cb941c00c72dbabfb786a7970817" [[package]] name = "futures-task" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" +checksum = "efd193069b0ddadc69c46389b740bbccdd97203899b48d09c5f7969591d6bae2" [[package]] name = "futures-timer" @@ -2498,9 +2567,9 @@ checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c" [[package]] name = "futures-util" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" +checksum = "a19526d624e703a3179b3d322efec918b6246ea0fa51d41124525f00f1cc8104" dependencies = [ "futures-channel", "futures-core", @@ -2509,7 +2578,7 @@ dependencies = [ "futures-sink", "futures-task", "memchr", - "pin-project-lite 0.2.10", + "pin-project-lite 0.2.13", "pin-utils", "slab", ] @@ -2567,9 +2636,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.10" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" +checksum = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f" dependencies = [ "cfg-if", "libc", @@ -2578,9 +2647,9 @@ dependencies = [ [[package]] name = "ghash" -version = "0.4.4" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1583cc1656d7839fd3732b80cf4f38850336cdb9b8ded1cd399ca62958de3c99" +checksum = "d930750de5717d2dd0b8c0d42c076c0e884c81a73e6cab859bbd2339c71e3e40" dependencies = [ "opaque-debug 0.3.0", "polyval", @@ -2593,15 +2662,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "22030e2c5a68ec659fde1e949a745124b48e6fa8b045b7ed5bd1fe4ccc5c4e5d" dependencies = [ "fallible-iterator", - "indexmap", + "indexmap 1.9.3", "stable_deref_trait", ] [[package]] name = "gimli" -version = "0.27.3" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6c80984affa11d98d1b88b66ac8853f143217b399d3c74116778ff8fdb4ed2e" +checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0" [[package]] name = "glob" @@ -2611,11 +2680,11 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" [[package]] name = "globset" -version = "0.4.10" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "029d74589adefde59de1a0c4f4732695c32805624aec7b68d91503d4dba79afc" +checksum = "759c97c1e17c55525b57192c06a267cda0ac5210b222d6b82189a2338fa1c13d" dependencies = [ - "aho-corasick 0.7.20", + "aho-corasick", "bstr", "fnv", "log", @@ -2647,9 +2716,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.20" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97ec8491ebaf99c8eaa73058b045fe58073cd6be7f596ac993ced0b0a0c01049" +checksum = "91fc23aa11be92976ef4729127f1a74adf36d8436f7816b185d18df956790833" dependencies = [ "bytes", "fnv", @@ -2657,7 +2726,7 @@ dependencies = [ "futures-sink", "futures-util", "http", - "indexmap", + "indexmap 1.9.3", "slab", "tokio", "tokio-util", @@ -2666,15 +2735,15 @@ dependencies = [ [[package]] name = "handlebars" -version = "4.3.7" +version = "4.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83c3372087601b532857d332f5957cbae686da52bb7810bf038c3e3c3cc2fa0d" +checksum = "faa67bab9ff362228eb3d00bd024a4965d8231bbb7921167f0cfa66c6626b225" dependencies = [ "log", "pest", "pest_derive", "serde", - "serde_json 1.0.100", + "serde_json 1.0.108", "thiserror", ] @@ -2702,6 +2771,12 @@ dependencies = [ "ahash", ] +[[package]] +name = "hashbrown" +version = "0.14.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f93e7192158dbcda357bdec5fb5788eebf8bbac027f3f33e719d29135ae84156" + [[package]] name = "heck" version = "0.4.1" @@ -2719,9 +2794,9 @@ dependencies = [ [[package]] name = "hermit-abi" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "443144c8cdadd93ebf52ddb4056d257f5b52c04d3c804e657d19eb73fc33668b" +checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7" [[package]] name = "hex" @@ -2735,6 +2810,12 @@ version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ebdb29d2ea9ed0083cd8cece49bbd968021bd99b0849edb4a9a7ee0fdf6a4e0" +[[package]] +name = "hex_fmt" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b07f60793ff0a4d9cef0f18e63b5357e06209987153a64648c972c1e5aff336f" + [[package]] name = "hmac" version = "0.8.1" @@ -2766,6 +2847,15 @@ dependencies = [ "hmac 0.8.1", ] +[[package]] +name = "home" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5444c27eef6923071f7ebcc33e3444508466a76f7a2b93da00ed6e19f30c1ddb" +dependencies = [ + "windows-sys 0.48.0", +] + [[package]] name = "hostname" version = "0.3.1" @@ -2779,13 +2869,13 @@ dependencies = [ [[package]] name = "http" -version = "0.2.9" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482" +checksum = "8947b1a6fad4393052c7ba1f4cd97bed3e953a95c79c92ad9b051a04611d9fbb" dependencies = [ "bytes", "fnv", - "itoa 1.0.8", + "itoa 1.0.9", ] [[package]] @@ -2796,7 +2886,7 @@ checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" dependencies = [ "bytes", "http", - "pin-project-lite 0.2.10", + "pin-project-lite 0.2.13", ] [[package]] @@ -2807,9 +2897,9 @@ checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" [[package]] name = "httpdate" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "humantime" @@ -2832,9 +2922,9 @@ dependencies = [ "http-body", "httparse", "httpdate", - "itoa 1.0.8", - "pin-project-lite 0.2.10", - "socket2 0.4.9", + "itoa 1.0.9", + "pin-project-lite 0.2.13", + "socket2 0.4.10", "tokio", "tower-service", "tracing", @@ -2858,16 +2948,16 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.57" +version = "0.1.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fad5b825842d2b38bd206f3e81d6957625fd7f0a361e345c30e01a0ae2dd613" +checksum = "8326b86b6cff230b97d0d312a6c40a60726df3332e721f72a1b035f451663b20" dependencies = [ "android_system_properties", "core-foundation-sys", "iana-time-zone-haiku", "js-sys", "wasm-bindgen", - "windows 0.48.0", + "windows-core", ] [[package]] @@ -2912,11 +3002,11 @@ dependencies = [ [[package]] name = "if-watch" -version = "2.0.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "065c008e570a43c00de6aed9714035e5ea6a498c255323db9091722af6ee67dd" +checksum = "015a7df1eb6dda30df37f34b63ada9b7b352984b0e84de2a20ed526345000791" dependencies = [ - "async-io", + "async-io 1.13.0", "core-foundation", "fnv", "futures", @@ -2925,7 +3015,7 @@ dependencies = [ "log", "rtnetlink", "system-configuration", - "windows 0.34.0", + "windows", ] [[package]] @@ -2939,9 +3029,9 @@ dependencies = [ [[package]] name = "impl-serde" -version = "0.4.0" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebc88fc67028ae3db0c853baa36269d398d5f45b6982f95549ff5def78c935cd" +checksum = "4551f042f3438e64dbd6226b20527fc84a6e1fe65688b58746a2f53623f25f5c" dependencies = [ "serde", ] @@ -2964,10 +3054,29 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" dependencies = [ "autocfg", - "hashbrown", + "hashbrown 0.12.3", "serde", ] +[[package]] +name = "indexmap" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" +dependencies = [ + "equivalent", + "hashbrown 0.14.2", +] + +[[package]] +name = "inout" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" +dependencies = [ + "generic-array 0.14.7", +] + [[package]] name = "instant" version = "0.1.12" @@ -2998,7 +3107,7 @@ version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" dependencies = [ - "hermit-abi 0.3.2", + "hermit-abi 0.3.3", "libc", "windows-sys 0.48.0", ] @@ -3015,7 +3124,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b58db92f96b720de98181bbbe63c831e87005ab460c1bf306eb2622b4707997f" dependencies = [ - "socket2 0.5.3", + "socket2 0.5.5", "widestring", "windows-sys 0.48.0", "winreg", @@ -3023,9 +3132,9 @@ dependencies = [ [[package]] name = "ipnet" -version = "2.8.0" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28b29a3cd74f0f4598934efe3aeba42bae0eb4680554128851ebbecb02af14e6" +checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" [[package]] name = "is-terminal" @@ -3033,8 +3142,8 @@ version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" dependencies = [ - "hermit-abi 0.3.2", - "rustix 0.38.3", + "hermit-abi 0.3.3", + "rustix 0.38.21", "windows-sys 0.48.0", ] @@ -3055,24 +3164,15 @@ checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4" [[package]] name = "itoa" -version = "1.0.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b02a5381cc465bd3041d84623d0fa3b66738b52b8e2fc3bab8ad63ab032f4a" - -[[package]] -name = "jobserver" -version = "0.1.26" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "936cfd212a0155903bcbc060e316fb6cc7cbf2e1907329391ebadc1fe0ce77c2" -dependencies = [ - "libc", -] +checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" [[package]] name = "js-sys" -version = "0.3.64" +version = "0.3.65" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a" +checksum = "54c0c35952f67de54bb584e9fd912b3023117cbafc0a77d8f3dee1fb5f572fe8" dependencies = [ "wasm-bindgen", ] @@ -3121,7 +3221,7 @@ checksum = "f3dc3e9cf2ba50b7b1d7d76a667619f82846caa39e8e8daa8a4962d74acaddca" dependencies = [ "anyhow", "arrayvec 0.7.4", - "async-lock", + "async-lock 2.8.0", "async-trait", "beef", "futures-channel", @@ -3136,7 +3236,7 @@ dependencies = [ "rand 0.8.5", "rustc-hash", "serde", - "serde_json 1.0.100", + "serde_json 1.0.108", "soketto", "thiserror", "tokio", @@ -3157,7 +3257,7 @@ dependencies = [ "jsonrpsee-core", "jsonrpsee-types", "serde", - "serde_json 1.0.100", + "serde_json 1.0.108", "tokio", "tracing", "tracing-futures", @@ -3184,7 +3284,7 @@ dependencies = [ "anyhow", "beef", "serde", - "serde_json 1.0.100", + "serde_json 1.0.108", "thiserror", "tracing", ] @@ -3212,7 +3312,7 @@ dependencies = [ "http", "jsonrpsee-core", "jsonrpsee-types", - "serde_json 1.0.100", + "serde_json 1.0.108", "soketto", "tokio", "tokio-stream", @@ -3253,9 +3353,9 @@ dependencies = [ [[package]] name = "kvdb" -version = "0.12.0" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "585089ceadba0197ffe9af6740ab350b325e3c1f5fccfbc3522e0250c750409b" +checksum = "a301d8ecb7989d4a6e2c57a49baca77d353bdbf879909debe3f375fe25d61f86" dependencies = [ "parity-util-mem", "smallvec", @@ -3263,9 +3363,9 @@ dependencies = [ [[package]] name = "kvdb-memorydb" -version = "0.12.0" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40d109c87bfb7759edd2a49b2649c1afe25af785d930ad6a38479b4dc70dd873" +checksum = "ece7e668abd21387aeb6628130a6f4c802787f014fa46bc83221448322250357" dependencies = [ "kvdb", "parity-util-mem", @@ -3274,13 +3374,15 @@ dependencies = [ [[package]] name = "kvdb-rocksdb" -version = "0.16.0" +version = "0.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c076cc2cdbac89b9910c853a36c957d3862a779f31c2661174222cefb49ee597" +checksum = "ca7fbdfd71cd663dceb0faf3367a99f8cf724514933e9867cec4995b6027cbc1" dependencies = [ + "fs-swap", "kvdb", "log", "num_cpus", + "owning_ref", "parity-util-mem", "parking_lot 0.12.1", "regex", @@ -3302,46 +3404,54 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.147" +version = "0.2.150" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" +checksum = "89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c" [[package]] name = "libloading" -version = "0.7.4" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" +checksum = "f2b111a074963af1d37a139918ac6d49ad1d0d5e47f72fd55388619691a7d753" dependencies = [ - "cfg-if", + "cc", "winapi", ] [[package]] -name = "libm" -version = "0.1.4" +name = "libloading" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fc7aa29613bd6a620df431842069224d8bc9011086b1db4c0e0cd47fa03ec9a" +checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" +dependencies = [ + "cfg-if", + "winapi", +] [[package]] name = "libm" -version = "0.2.7" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7012b1bbb0719e1097c47611d3898568c546d597c2e74d66f6087edd5233ff4" +checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" [[package]] name = "libp2p" -version = "0.49.0" +version = "0.46.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec878fda12ebec479186b3914ebc48ff180fa4c51847e11a1a68bf65249e02c1" +checksum = "81327106887e42d004fbdab1fef93675be2e2e07c1b95fce45e2cc813485611d" dependencies = [ "bytes", "futures", "futures-timer", - "getrandom 0.2.10", + "getrandom 0.2.11", "instant", "lazy_static", + "libp2p-autonat", "libp2p-core", + "libp2p-deflate", "libp2p-dns", + "libp2p-floodsub", + "libp2p-gossipsub", "libp2p-identify", "libp2p-kad", "libp2p-mdns", @@ -3349,24 +3459,49 @@ 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.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", + "futures-timer", + "instant", + "libp2p-core", + "libp2p-request-response", + "libp2p-swarm", + "log", + "prost 0.10.4", + "prost-build 0.10.4", + "rand 0.8.5", +] + [[package]] name = "libp2p-core" -version = "0.37.0" +version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "799676bb0807c788065e57551c6527d461ad572162b0519d1958946ff9e0539d" +checksum = "fbf9b94cefab7599b2d3dff2f93bee218c6621d68590b23ede4485813cbcece6" dependencies = [ "asn1_der", "bs58", @@ -3377,17 +3512,19 @@ dependencies = [ "futures-timer", "instant", "lazy_static", + "libsecp256k1", "log", "multiaddr", "multihash", "multistream-select", "parking_lot 0.12.1", "pin-project", - "prost", - "prost-build", + "prost 0.10.4", + "prost-build 0.10.4", "rand 0.8.5", + "ring 0.16.20", "rw-stream-sink", - "sha2 0.10.7", + "sha2 0.10.8", "smallvec", "thiserror", "unsigned-varint", @@ -3395,11 +3532,22 @@ 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", + "libp2p-core", +] + [[package]] name = "libp2p-dns" -version = "0.37.0" +version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2322c9fb40d99101def6a01612ee30500c89abbbecb6297b3cd252903a4c1720" +checksum = "6cbf54723250fa5d521383be789bf60efdabe6bacfb443f87da261019a49b4b5" dependencies = [ "async-std-resolver", "futures", @@ -3410,11 +3558,57 @@ dependencies = [ "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", + "libp2p-core", + "libp2p-swarm", + "log", + "prost 0.10.4", + "prost-build 0.10.4", + "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 0.13.1", + "byteorder", + "bytes", + "fnv", + "futures", + "hex_fmt", + "instant", + "libp2p-core", + "libp2p-swarm", + "log", + "prometheus-client", + "prost 0.10.4", + "prost-build 0.10.4", + "rand 0.7.3", + "regex", + "sha2 0.10.8", + "smallvec", + "unsigned-varint", + "wasm-timer", +] + [[package]] name = "libp2p-identify" -version = "0.40.0" +version = "0.37.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcf9a121f699e8719bda2e6e9e9b6ddafc6cff4602471d6481c1067930ccb29b" +checksum = "c50b585518f8efd06f93ac2f976bd672e17cdac794644b3117edd078e96bda06" dependencies = [ "asynchronous-codec", "futures", @@ -3422,9 +3616,9 @@ dependencies = [ "libp2p-core", "libp2p-swarm", "log", - "lru 0.8.1", - "prost", - "prost-build", + "lru", + "prost 0.10.4", + "prost-build 0.10.4", "prost-codec", "smallvec", "thiserror", @@ -3433,9 +3627,9 @@ dependencies = [ [[package]] name = "libp2p-kad" -version = "0.41.0" +version = "0.38.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6721c200e2021f6c3fab8b6cf0272ead8912d871610ee194ebd628cecf428f22" +checksum = "740862893bb5f06ac24acc9d49bdeadc3a5e52e51818a30a25c1f3519da2c851" dependencies = [ "arrayvec 0.7.4", "asynchronous-codec", @@ -3448,10 +3642,10 @@ dependencies = [ "libp2p-core", "libp2p-swarm", "log", - "prost", - "prost-build", - "rand 0.8.5", - "sha2 0.10.7", + "prost 0.10.4", + "prost-build 0.10.4", + "rand 0.7.3", + "sha2 0.10.8", "smallvec", "thiserror", "uint", @@ -3461,99 +3655,182 @@ dependencies = [ [[package]] name = "libp2p-mdns" -version = "0.41.0" +version = "0.38.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "761704e727f7d68d58d7bc2231eafae5fc1b9814de24290f126df09d4bd37a15" +checksum = "66e5e5919509603281033fd16306c61df7a4428ce274b67af5e14b07de5cdcb2" dependencies = [ - "async-io", + "async-io 1.13.0", "data-encoding", "dns-parser", "futures", "if-watch", + "lazy_static", "libp2p-core", "libp2p-swarm", "log", "rand 0.8.5", "smallvec", - "socket2 0.4.9", + "socket2 0.4.10", + "void", +] + +[[package]] +name = "libp2p-metrics" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef8aff4a1abef42328fbb30b17c853fff9be986dc39af17ee39f9c5f755c5e0c" +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", + "libp2p-core", + "log", + "nohash-hasher", + "parking_lot 0.12.1", + "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", + "lazy_static", + "libp2p-core", + "log", + "prost 0.10.4", + "prost-build 0.10.4", + "rand 0.8.5", + "sha2 0.10.8", + "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", + "futures-timer", + "instant", + "libp2p-core", + "libp2p-swarm", + "log", + "rand 0.7.3", "void", ] [[package]] -name = "libp2p-metrics" -version = "0.10.0" +name = "libp2p-plaintext" +version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ee31b08e78b7b8bfd1c4204a9dd8a87b4fcdf6dafc57eb51701c1c264a81cb9" +checksum = "be27bf0820a6238a4e06365b096d428271cce85a129cf16f2fe9eb1610c4df86" dependencies = [ + "asynchronous-codec", + "bytes", + "futures", "libp2p-core", - "libp2p-identify", - "libp2p-kad", - "libp2p-ping", - "libp2p-swarm", - "prometheus-client", + "log", + "prost 0.10.4", + "prost-build 0.10.4", + "unsigned-varint", + "void", ] [[package]] -name = "libp2p-mplex" -version = "0.37.0" +name = "libp2p-pnet" +version = "0.22.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "692664acfd98652de739a8acbb0a0d670f1d67190a49be6b4395e22c37337d89" +checksum = "6468f382568da936b4fa1cff273ce59b1debf873ff5f4ca412c3b91d0b37442c" dependencies = [ - "asynchronous-codec", - "bytes", "futures", - "libp2p-core", "log", - "nohash-hasher", - "parking_lot 0.12.1", + "pin-project", "rand 0.8.5", - "smallvec", - "unsigned-varint", + "salsa20", + "sha3", ] [[package]] -name = "libp2p-noise" -version = "0.40.0" +name = "libp2p-relay" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "048155686bd81fe6cb5efdef0c6290f25ad32a0a42e8f4f72625cf6a505a206f" +checksum = "4931547ee0cce03971ccc1733ff05bb0c4349fd89120a39e9861e2bbe18843c3" dependencies = [ + "asynchronous-codec", "bytes", - "curve25519-dalek 3.2.0", + "either", "futures", - "lazy_static", + "futures-timer", + "instant", "libp2p-core", + "libp2p-swarm", "log", - "prost", - "prost-build", + "pin-project", + "prost 0.10.4", + "prost-build 0.10.4", + "prost-codec", "rand 0.8.5", - "sha2 0.10.7", - "snow", + "smallvec", "static_assertions", - "x25519-dalek", - "zeroize", + "thiserror", + "void", ] [[package]] -name = "libp2p-ping" -version = "0.40.1" +name = "libp2p-rendezvous" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7228b9318d34689521349a86eb39a3c3a802c9efc99a0568062ffb80913e3f91" +checksum = "9511c9672ba33284838e349623319c8cad2d18cfad243ae46c6b7e8a2982ea4e" dependencies = [ + "asynchronous-codec", + "bimap", "futures", "futures-timer", "instant", "libp2p-core", "libp2p-swarm", "log", + "prost 0.10.4", + "prost-build 0.10.4", "rand 0.8.5", + "sha2 0.10.8", + "thiserror", + "unsigned-varint", "void", ] [[package]] name = "libp2p-request-response" -version = "0.22.1" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8827af16a017b65311a410bb626205a9ad92ec0473967618425039fa5231adc1" +checksum = "508a189e2795d892c8f5c1fa1e9e0b1845d32d7b0b249dbf7b05b18811361843" dependencies = [ "async-trait", "bytes", @@ -3562,16 +3839,16 @@ dependencies = [ "libp2p-core", "libp2p-swarm", "log", - "rand 0.8.5", + "rand 0.7.3", "smallvec", "unsigned-varint", ] [[package]] name = "libp2p-swarm" -version = "0.40.1" +version = "0.37.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46d13df7c37807965d82930c0e4b04a659efcb6cca237373b206043db5398ecf" +checksum = "95ac5be6c2de2d1ff3f7693fda6faf8a827b1f3e808202277783fea9f527d114" dependencies = [ "either", "fnv", @@ -3581,7 +3858,7 @@ dependencies = [ "libp2p-core", "log", "pin-project", - "rand 0.8.5", + "rand 0.7.3", "smallvec", "thiserror", "void", @@ -3589,36 +3866,48 @@ dependencies = [ [[package]] name = "libp2p-swarm-derive" -version = "0.30.1" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0eddc4497a8b5a506013c40e8189864f9c3a00db2b25671f428ae9007f3ba32" +checksum = "9f54a64b6957249e0ce782f8abf41d97f69330d02bf229f0672d864f0650cc76" dependencies = [ - "heck", "quote", "syn 1.0.109", ] [[package]] name = "libp2p-tcp" -version = "0.37.0" +version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9839d96761491c6d3e238e70554b856956fca0ab60feb9de2cd08eed4473fa92" +checksum = "8a6771dc19aa3c65d6af9a8c65222bfc8fcd446630ddca487acd161fa6096f3b" dependencies = [ - "async-io", + "async-io 1.13.0", "futures", "futures-timer", "if-watch", + "ipnet", "libc", "libp2p-core", "log", - "socket2 0.4.9", + "socket2 0.4.10", +] + +[[package]] +name = "libp2p-uds" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d125e3e5f0d58f3c6ac21815b20cf4b6a88b8db9dc26368ea821838f4161fd4d" +dependencies = [ + "async-std", + "futures", + "libp2p-core", + "log", ] [[package]] name = "libp2p-wasm-ext" -version = "0.37.0" +version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a17b5b8e7a73e379e47b1b77f8a82c4721e97eca01abcd18e9cd91a23ca6ce97" +checksum = "ec894790eec3c1608f8d1a8a0bdf0dbeb79ed4de2dce964222011c2896dfa05a" dependencies = [ "futures", "js-sys", @@ -3630,9 +3919,9 @@ dependencies = [ [[package]] name = "libp2p-websocket" -version = "0.39.0" +version = "0.36.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3758ae6f89b2531a24b6d9f5776bda6a626b60a57600d7185d43dfa75ca5ecc4" +checksum = "9808e57e81be76ff841c106b4c5974fb4d41a233a7bdd2afbf1687ac6def3818" dependencies = [ "either", "futures", @@ -3649,23 +3938,33 @@ dependencies = [ [[package]] name = "libp2p-yamux" -version = "0.41.1" +version = "0.38.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d6874d66543c4f7e26e3b8ca9a6bead351563a13ab4fafd43c7927f7c0d6c12" +checksum = "c6dea686217a06072033dc025631932810e2f6ad784e4fafa42e27d311c7a81c" dependencies = [ "futures", "libp2p-core", - "log", "parking_lot 0.12.1", "thiserror", "yamux", ] +[[package]] +name = "libredox" +version = "0.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85c833ca1e66078851dba29046874e38f08b2c883700aa29a03ddd3b23814ee8" +dependencies = [ + "bitflags 2.4.1", + "libc", + "redox_syscall 0.4.1", +] + [[package]] name = "librocksdb-sys" -version = "0.8.3+7.4.4" +version = "0.6.3+6.28.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "557b255ff04123fcc176162f56ed0c9cd42d8f357cf55b3fabeb60f7413741b3" +checksum = "184ce2a189a817be2731070775ad053b6804a340fee05c6686d711db27455917" dependencies = [ "bindgen", "bzip2-sys", @@ -3726,9 +4025,9 @@ dependencies = [ [[package]] name = "libz-sys" -version = "1.1.9" +version = "1.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56ee889ecc9568871456d42f603d6a0ce59ff328d291063a45cbdf0036baf6db" +checksum = "d97137b25e321a73eef1418d1d5d2eda4d77e12813f8e6dead84bc52c5870a7b" dependencies = [ "cc", "pkg-config", @@ -3774,15 +4073,15 @@ checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" [[package]] name = "linux-raw-sys" -version = "0.4.3" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09fc20d2ca12cb9f044c93e3bd6d32d523e6e2ec3db4f7b2939cd99026ecd3f0" +checksum = "969488b55f8ac402214f3f5fd243ebb7206cf82de60d3172994707a4bcc2b829" [[package]] name = "lock_api" -version = "0.4.10" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1cc9717a20b1bb222f333e6a92fd32f7d8a18ddc5a3191a11af45dcbf4dcd16" +checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" dependencies = [ "autocfg", "scopeguard", @@ -3790,9 +4089,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.19" +version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b06a4cde4c0f271a446782e3eff8de789548ce57dbc8eca9292c27f4a42004b4" +checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" dependencies = [ "value-bag", ] @@ -3803,16 +4102,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 = "b6e8aaa3f231bb4bd57b84b2d5dc3ae7f350265df8aa96492e0bc394a1571909" -dependencies = [ - "hashbrown", + "hashbrown 0.12.3", ] [[package]] @@ -3876,9 +4166,9 @@ checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5" [[package]] name = "matrixmultiply" -version = "0.3.7" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "090126dc04f95dc0d1c1c91f61bdd474b3930ca064c1edc8a849da2c6cbe1e77" +checksum = "7574c1cf36da4798ab73da5b215bbf444f50718207754cb522201d78d1cd0ff2" dependencies = [ "autocfg", "rawpointer", @@ -3886,17 +4176,17 @@ dependencies = [ [[package]] name = "memchr" -version = "2.5.0" +version = "2.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" +checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" [[package]] name = "memfd" -version = "0.6.3" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffc89ccdc6e10d6907450f753537ebc5c5d3460d2e4e62ea74bd571db62c0f9e" +checksum = "b2cffa4ad52c6f791f4f8b15f0c05f9824b2ced1160e88cc393d64fff9a8ac64" dependencies = [ - "rustix 0.37.23", + "rustix 0.38.21", ] [[package]] @@ -3928,12 +4218,12 @@ dependencies = [ [[package]] name = "memory-db" -version = "0.30.0" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34ac11bb793c28fa095b7554466f53b3a60a2cd002afdac01bcf135cbd73a269" +checksum = "6566c70c1016f525ced45d7b7f97730a2bafb037c788211d0c186ef5b2189f0a" dependencies = [ "hash-db", - "hashbrown", + "hashbrown 0.12.3", "parity-util-mem", ] @@ -3972,42 +4262,15 @@ dependencies = [ [[package]] name = "mio" -version = "0.8.8" +version = "0.8.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2" +checksum = "3dce281c5e46beae905d4de1870d8b1509a9142b62eedf18b443b011ca8343d0" dependencies = [ "libc", "wasi 0.11.0+wasi-snapshot-preview1", "windows-sys 0.48.0", ] -[[package]] -name = "mockall" -version = "0.11.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c84490118f2ee2d74570d114f3d0493cbf02790df303d2707606c3e14e07c96" -dependencies = [ - "cfg-if", - "downcast", - "fragile", - "lazy_static", - "mockall_derive", - "predicates", - "predicates-tree", -] - -[[package]] -name = "mockall_derive" -version = "0.11.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22ce75669015c4f47b289fd4d4f56e894e4c96003ffdf3ac51313126f94c6cbb" -dependencies = [ - "cfg-if", - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "multiaddr" version = "0.14.0" @@ -4049,7 +4312,7 @@ dependencies = [ "core2", "digest 0.10.7", "multihash-derive", - "sha2 0.10.7", + "sha2 0.10.8", "sha3", "unsigned-varint", ] @@ -4076,9 +4339,9 @@ checksum = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a" [[package]] name = "multistream-select" -version = "0.12.1" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8552ab875c1313b97b8d20cb857b9fd63e2d1d6a0a1b53ce9821e575405f27a" +checksum = "363a84be6453a70e63513660f4894ef815daf88e3356bffcda9ca27d810ce83b" dependencies = [ "bytes", "futures", @@ -4185,7 +4448,7 @@ version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6471bf08e7ac0135876a9581bf3217ef0333c191c128d34878079f42ee150411" dependencies = [ - "async-io", + "async-io 1.13.0", "bytes", "futures", "libc", @@ -4206,7 +4469,7 @@ dependencies = [ [[package]] name = "node-primitives" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "frame-system", "parity-scale-codec", @@ -4238,12 +4501,6 @@ dependencies = [ "minimal-lexical", ] -[[package]] -name = "normalize-line-endings" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61807f77802ff30975e01f4f071c8ba10c022052f98b3294119f3e615d13e5be" - [[package]] name = "num-bigint" version = "0.2.6" @@ -4257,9 +4514,9 @@ dependencies = [ [[package]] name = "num-bigint" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f93ab6289c7b344a8a9f60f88d80aa20032336fe78da341afc91c8a2341fc75f" +checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" dependencies = [ "autocfg", "num-integer", @@ -4268,9 +4525,9 @@ dependencies = [ [[package]] name = "num-complex" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02e0d21255c828d6f128a1e41534206671e8c3ea0c62f32291e808dc82cff17d" +checksum = "1ba157ca0885411de85d6ca030ba7e2a83a28636056c7c699b07c8b6f7383214" dependencies = [ "num-traits", ] @@ -4282,7 +4539,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a652d9771a63711fd3c3deb670acfbe5c30a4072e664d7a3bf5a9e1056ac72c3" dependencies = [ "arrayvec 0.7.4", - "itoa 1.0.8", + "itoa 1.0.9", ] [[package]] @@ -4314,19 +4571,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0" dependencies = [ "autocfg", - "num-bigint 0.4.3", + "num-bigint 0.4.4", "num-integer", "num-traits", ] [[package]] name = "num-traits" -version = "0.2.15" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" +checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" dependencies = [ "autocfg", - "libm 0.2.7", + "libm", ] [[package]] @@ -4335,7 +4592,7 @@ version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi 0.3.2", + "hermit-abi 0.3.3", "libc", ] @@ -4346,16 +4603,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "21158b2c33aa6d4561f1c0a6ea283ca92bc54802a93b263e910746d679a7eb53" dependencies = [ "crc32fast", - "hashbrown", - "indexmap", + "hashbrown 0.12.3", + "indexmap 1.9.3", "memchr", ] [[package]] name = "object" -version = "0.31.1" +version = "0.32.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bda667d9f2b5051b8833f59f3bf748b28ef54f850f4fcb389a252aa383866d1" +checksum = "9cf5f9dd3933bd50a9e1f149ec995f39ae2c496d31fd772c1fd45ebc27e902b0" dependencies = [ "memchr", ] @@ -4384,6 +4641,12 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" +[[package]] +name = "os_str_bytes" +version = "6.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2355d85b9a3786f481747ced0e0ff2ba35213a1f9bd406ed906554d7af805a1" + [[package]] name = "output_vt100" version = "0.1.3" @@ -4394,19 +4657,18 @@ dependencies = [ ] [[package]] -name = "packed_simd_2" -version = "0.3.8" +name = "owning_ref" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1914cd452d8fccd6f9db48147b29fd4ae05bea9dc5d9ad578509f72415de282" +checksum = "6ff55baddef9e4ad00f88b6c743a2a8062d4c6ade126c2a528644b8e444d52ce" dependencies = [ - "cfg-if", - "libm 0.1.4", + "stable_deref_trait", ] [[package]] name = "pallet-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "frame-support", "frame-system", @@ -4422,7 +4684,7 @@ dependencies = [ [[package]] name = "pallet-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "frame-support", "frame-system", @@ -4437,7 +4699,7 @@ dependencies = [ [[package]] name = "pallet-babe" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "frame-benchmarking", "frame-support", @@ -4461,7 +4723,7 @@ dependencies = [ [[package]] name = "pallet-bags-list" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -4481,7 +4743,7 @@ dependencies = [ [[package]] name = "pallet-balances" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "frame-benchmarking", "frame-support", @@ -4496,7 +4758,7 @@ dependencies = [ [[package]] name = "pallet-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "frame-benchmarking", "frame-support", @@ -4544,7 +4806,7 @@ dependencies = [ [[package]] name = "pallet-child-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "frame-benchmarking", "frame-support", @@ -4563,7 +4825,7 @@ dependencies = [ [[package]] name = "pallet-collective" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "frame-benchmarking", "frame-support", @@ -4580,7 +4842,7 @@ dependencies = [ [[package]] name = "pallet-contracts" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "bitflags 1.3.2", "frame-benchmarking", @@ -4596,7 +4858,6 @@ dependencies = [ "scale-info", "serde", "smallvec", - "sp-api", "sp-core", "sp-io", "sp-runtime", @@ -4609,25 +4870,58 @@ dependencies = [ [[package]] name = "pallet-contracts-primitives" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "bitflags 1.3.2", "parity-scale-codec", + "scale-info", + "serde", + "sp-core", + "sp-rpc", "sp-runtime", "sp-std", - "sp-weights", ] [[package]] name = "pallet-contracts-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "proc-macro2", "quote", "syn 1.0.109", ] +[[package]] +name = "pallet-contracts-rpc" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +dependencies = [ + "jsonrpsee", + "pallet-contracts-primitives", + "pallet-contracts-rpc-runtime-api", + "parity-scale-codec", + "serde", + "sp-api", + "sp-blockchain", + "sp-core", + "sp-rpc", + "sp-runtime", +] + +[[package]] +name = "pallet-contracts-rpc-runtime-api" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" +dependencies = [ + "pallet-contracts-primitives", + "parity-scale-codec", + "scale-info", + "sp-api", + "sp-runtime", + "sp-std", +] + [[package]] name = "pallet-ddc-clusters" version = "4.8.1" @@ -4636,11 +4930,17 @@ dependencies = [ "ddc-traits", "frame-support", "frame-system", + "hex", + "hex-literal", + "pallet-balances", "pallet-contracts", "pallet-ddc-nodes", + "pallet-randomness-collective-flip", + "pallet-timestamp", "parity-scale-codec", "scale-info", "sp-core", + "sp-io", "sp-runtime", "sp-std", "sp-tracing", @@ -4656,10 +4956,15 @@ dependencies = [ "frame-support", "frame-system", "log", + "pallet-balances", + "pallet-timestamp", "parity-scale-codec", "scale-info", + "sp-core", + "sp-io", "sp-runtime", "sp-std", + "sp-tracing", "substrate-test-utils", ] @@ -4695,10 +5000,35 @@ dependencies = [ "ddc-traits", "frame-support", "frame-system", + "pallet-balances", + "pallet-timestamp", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", + "sp-tracing", + "substrate-test-utils", +] + +[[package]] +name = "pallet-ddc-payouts" +version = "4.8.1" +dependencies = [ + "byte-unit", + "ddc-primitives", + "ddc-traits", + "frame-benchmarking", + "frame-support", + "frame-system", + "log", "parity-scale-codec", "scale-info", "sp-core", + "sp-io", "sp-runtime", + "sp-staking", "sp-std", "sp-tracing", "substrate-test-utils", @@ -4728,16 +5058,14 @@ dependencies = [ [[package]] name = "pallet-democracy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", - "log", "parity-scale-codec", "scale-info", "serde", - "sp-core", "sp-io", "sp-runtime", "sp-std", @@ -4746,7 +5074,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-multi-phase" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -4770,7 +5098,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-support-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -4783,7 +5111,7 @@ dependencies = [ [[package]] name = "pallet-elections-phragmen" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "frame-benchmarking", "frame-support", @@ -4835,7 +5163,7 @@ dependencies = [ [[package]] name = "pallet-fast-unstake" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -4856,7 +5184,7 @@ dependencies = [ [[package]] name = "pallet-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "frame-benchmarking", "frame-support", @@ -4879,7 +5207,7 @@ dependencies = [ [[package]] name = "pallet-identity" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "enumflags2", "frame-benchmarking", @@ -4895,7 +5223,7 @@ dependencies = [ [[package]] name = "pallet-im-online" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "frame-benchmarking", "frame-support", @@ -4915,7 +5243,7 @@ dependencies = [ [[package]] name = "pallet-indices" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "frame-benchmarking", "frame-support", @@ -4932,7 +5260,7 @@ dependencies = [ [[package]] name = "pallet-membership" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "frame-benchmarking", "frame-support", @@ -4949,12 +5277,11 @@ dependencies = [ [[package]] name = "pallet-multisig" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", - "log", "parity-scale-codec", "scale-info", "sp-io", @@ -4965,7 +5292,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "frame-support", "frame-system", @@ -4982,7 +5309,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-benchmarking" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5002,7 +5329,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-runtime-api" version = "1.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "parity-scale-codec", "sp-api", @@ -5012,7 +5339,7 @@ dependencies = [ [[package]] name = "pallet-offences" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "frame-support", "frame-system", @@ -5029,7 +5356,7 @@ dependencies = [ [[package]] name = "pallet-offences-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5052,7 +5379,7 @@ dependencies = [ [[package]] name = "pallet-proxy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "frame-benchmarking", "frame-support", @@ -5067,7 +5394,7 @@ dependencies = [ [[package]] name = "pallet-randomness-collective-flip" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "frame-support", "frame-system", @@ -5081,7 +5408,7 @@ dependencies = [ [[package]] name = "pallet-recovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "frame-benchmarking", "frame-support", @@ -5096,7 +5423,7 @@ dependencies = [ [[package]] name = "pallet-scheduler" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "frame-benchmarking", "frame-support", @@ -5112,7 +5439,7 @@ dependencies = [ [[package]] name = "pallet-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "frame-support", "frame-system", @@ -5133,7 +5460,7 @@ dependencies = [ [[package]] name = "pallet-session-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "frame-benchmarking", "frame-support", @@ -5149,7 +5476,7 @@ dependencies = [ [[package]] name = "pallet-society" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "frame-support", "frame-system", @@ -5163,7 +5490,7 @@ dependencies = [ [[package]] name = "pallet-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5186,7 +5513,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-curve" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -5197,7 +5524,7 @@ dependencies = [ [[package]] name = "pallet-sudo" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "frame-support", "frame-system", @@ -5211,7 +5538,7 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "frame-benchmarking", "frame-support", @@ -5229,7 +5556,7 @@ dependencies = [ [[package]] name = "pallet-tips" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "frame-benchmarking", "frame-support", @@ -5248,7 +5575,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "frame-support", "frame-system", @@ -5264,7 +5591,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "jsonrpsee", "pallet-transaction-payment-rpc-runtime-api", @@ -5279,7 +5606,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -5290,7 +5617,7 @@ dependencies = [ [[package]] name = "pallet-treasury" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "frame-benchmarking", "frame-support", @@ -5307,7 +5634,7 @@ dependencies = [ [[package]] name = "pallet-utility" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "frame-benchmarking", "frame-support", @@ -5323,7 +5650,7 @@ dependencies = [ [[package]] name = "pallet-vesting" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "frame-benchmarking", "frame-support", @@ -5356,9 +5683,9 @@ dependencies = [ [[package]] name = "parity-scale-codec" -version = "3.6.3" +version = "3.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "756d439303e94fae44f288ba881ad29670c65b0c4b0e05674ca81061bb65f2c5" +checksum = "0dec8a8073036902368c2cdc0387e85ff9a37054d7e7c98e592145e0c92cd4fb" dependencies = [ "arrayvec 0.7.4", "bitvec", @@ -5371,9 +5698,9 @@ dependencies = [ [[package]] name = "parity-scale-codec-derive" -version = "3.6.3" +version = "3.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d884d78fcf214d70b1e239fcd1c6e5e95aa3be1881918da2e488cc946c7a476" +checksum = "312270ee71e1cd70289dacf597cab7b207aa107d2f28191c2ae45b2ece18a260" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -5389,12 +5716,12 @@ checksum = "aa9777aa91b8ad9dd5aaa04a9b6bcb02c7f1deb952fca5a66034d5e63afc5c6f" [[package]] name = "parity-util-mem" -version = "0.12.0" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d32c34f4f5ca7f9196001c0aba5a1f9a5a12382c8944b8b0f90233282d1e8f8" +checksum = "c32561d248d352148124f036cac253a644685a21dc9fea383eb4907d7bd35a8f" dependencies = [ "cfg-if", - "hashbrown", + "hashbrown 0.12.3", "impl-trait-for-tuples", "parity-util-mem-derive", "parking_lot 0.12.1", @@ -5431,9 +5758,9 @@ checksum = "e1ad0aff30c1da14b1254fcb2af73e1fa9a28670e584a626f53a369d0e157304" [[package]] name = "parking" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14f2252c834a40ed9bb5422029649578e63aa341ac401f74e719dd1afda8394e" +checksum = "bb813b8af86854136c6922af0598d719255ecb2179515e6e7730d468f05c9cae" [[package]] name = "parking_lot" @@ -5453,7 +5780,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" dependencies = [ "lock_api", - "parking_lot_core 0.9.8", + "parking_lot_core 0.9.9", ] [[package]] @@ -5472,22 +5799,22 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.8" +version = "0.9.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93f00c865fe7cabf650081affecd3871070f26767e7b2070a3ffae14c654b447" +checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.3.5", + "redox_syscall 0.4.1", "smallvec", "windows-targets", ] [[package]] name = "paste" -version = "1.0.13" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4b27ab7be369122c218afc2079489cdcb4b517c0a3fc386ff11e1fedfcc2b35" +checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" [[package]] name = "pbkdf2" @@ -5521,19 +5848,20 @@ checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" [[package]] name = "pest" -version = "2.7.0" +version = "2.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f73935e4d55e2abf7f130186537b19e7a4abc886a0252380b59248af473a3fc9" +checksum = "ae9cee2a55a544be8b89dc6848072af97a20f2422603c10865be2a42b580fff5" dependencies = [ + "memchr", "thiserror", "ucd-trie", ] [[package]] name = "pest_derive" -version = "2.7.0" +version = "2.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aef623c9bbfa0eedf5a0efba11a5ee83209c326653ca31ff019bec3a95bfff2b" +checksum = "81d78524685f5ef2a3b3bd1cafbc9fcabb036253d9b1463e726a91cd16e2dfc2" dependencies = [ "pest", "pest_generator", @@ -5541,56 +5869,56 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.7.0" +version = "2.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3e8cba4ec22bada7fc55ffe51e2deb6a0e0db2d0b7ab0b103acc80d2510c190" +checksum = "68bd1206e71118b5356dae5ddc61c8b11e28b09ef6a31acbd15ea48a28e0c227" dependencies = [ "pest", "pest_meta", "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.39", ] [[package]] name = "pest_meta" -version = "2.7.0" +version = "2.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a01f71cb40bd8bb94232df14b946909e14660e33fc05db3e50ae2a82d7ea0ca0" +checksum = "7c747191d4ad9e4a4ab9c8798f1e82a39affe7ef9648390b7e5548d18e099de6" dependencies = [ "once_cell", "pest", - "sha2 0.10.7", + "sha2 0.10.8", ] [[package]] name = "petgraph" -version = "0.6.3" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dd7d28ee937e54fe3080c91faa1c3a46c06de6252988a7f4592ba2310ef22a4" +checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" dependencies = [ "fixedbitset", - "indexmap", + "indexmap 2.1.0", ] [[package]] name = "pin-project" -version = "1.1.2" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "030ad2bc4db10a8944cb0d837f158bdfec4d4a4873ab701a95046770d11f8842" +checksum = "fda4ed1c6c173e3fc7a83629421152e01d7b1f9b7f65fb301e490e8cfc656422" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.2" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec2e072ecce94ec471b13398d5402c188e76ac03cf74dd1a975161b23a3f6d9c" +checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" dependencies = [ "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.39", ] [[package]] @@ -5601,9 +5929,9 @@ checksum = "257b64915a082f7811703966789728173279bdebb956b143dbcd23f6f970a777" [[package]] name = "pin-project-lite" -version = "0.2.10" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c40d25201921e5ff0c862a505c6557ea88568a4e3ace775ab55e93f2f4f9d57" +checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" [[package]] name = "pin-utils" @@ -5611,6 +5939,17 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" +[[package]] +name = "piper" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "668d31b1c4eba19242f2088b2bf3316b82ca31082a8335764db4e083db7485d4" +dependencies = [ + "atomic-waker", + "fastrand 2.0.1", + "futures-io", +] + [[package]] name = "pkcs8" version = "0.8.0" @@ -5636,9 +5975,9 @@ checksum = "e8d0eef3571242013a0d5dc84861c3ae4a652e56e12adf8bdc26ff5f8cb34c94" [[package]] name = "platforms" -version = "3.0.2" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3d7ddaed09e0eb771a79ab0fd64609ba0afb0a8366421957936ad14cbd13630" +checksum = "14e6ab3f592e6fb464fc9712d8d6e6912de6473954635fd76a589d832cffcbb0" [[package]] name = "polling" @@ -5652,69 +5991,53 @@ dependencies = [ "concurrent-queue", "libc", "log", - "pin-project-lite 0.2.10", + "pin-project-lite 0.2.13", "windows-sys 0.48.0", ] [[package]] -name = "poly1305" -version = "0.7.2" +name = "polling" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "048aeb476be11a4b6ca432ca569e375810de9294ae78f4774e78ea98a9246ede" +checksum = "e53b6af1f60f36f8c2ac2aad5459d75a5a9b4be1e8cdd40264f315d78193e531" dependencies = [ - "cpufeatures", - "opaque-debug 0.3.0", - "universal-hash", + "cfg-if", + "concurrent-queue", + "pin-project-lite 0.2.13", + "rustix 0.38.21", + "tracing", + "windows-sys 0.48.0", ] [[package]] -name = "polyval" -version = "0.5.3" +name = "poly1305" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8419d2b623c7c0896ff2d5d96e2cb4ede590fed28fcc34934f4c33c036e620a1" +checksum = "8159bd90725d2df49889a078b54f4f79e87f1f8a8444194cdca81d38f5393abf" dependencies = [ - "cfg-if", "cpufeatures", "opaque-debug 0.3.0", "universal-hash", ] [[package]] -name = "ppv-lite86" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" - -[[package]] -name = "predicates" -version = "2.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59230a63c37f3e18569bdb90e4a89cbf5bf8b06fea0b84e65ea10cc4df47addd" -dependencies = [ - "difflib", - "float-cmp", - "itertools", - "normalize-line-endings", - "predicates-core", - "regex", -] - -[[package]] -name = "predicates-core" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b794032607612e7abeb4db69adb4e33590fa6cf1149e95fd7cb00e634b92f174" - -[[package]] -name = "predicates-tree" -version = "1.0.9" +name = "polyval" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "368ba315fb8c5052ab692e68a0eefec6ec57b23a36959c14496f0b0df2c0cecf" +checksum = "d52cff9d1d4dee5fe6d03729099f4a310a41179e0a10dbf542039873f2e826fb" dependencies = [ - "predicates-core", - "termtree", + "cfg-if", + "cpufeatures", + "opaque-debug 0.3.0", + "universal-hash", ] +[[package]] +name = "ppv-lite86" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" + [[package]] name = "pretty_assertions" version = "0.6.1" @@ -5737,11 +6060,21 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "prettyplease" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae005bd773ab59b4725093fd7df83fd7892f7d8eafb48dbd7de6e024e4215f9d" +dependencies = [ + "proc-macro2", + "syn 2.0.39", +] + [[package]] name = "primitive-types" -version = "0.12.1" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f3486ccba82358b11a77516035647c34ba167dfa53312630de83b12bd4f3d66" +checksum = "e28720988bff275df1f51b171e1b2a18c30d194c4d2b61defdacecd625a5d94a" dependencies = [ "fixed-hash", "impl-codec", @@ -5786,9 +6119,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.64" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78803b62cbf1f46fde80d7c0e803111524b9877184cfe7c3033659490ac7a7da" +checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da" dependencies = [ "unicode-ident", ] @@ -5809,27 +6142,37 @@ dependencies = [ [[package]] name = "prometheus-client" -version = "0.18.1" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83cd1b99916654a69008fd66b4f9397fbe08e6e51dfe23d4417acf5d3b8cb87c" +checksum = "ac1abe0255c04d15f571427a2d1e00099016506cf3297b53853acd2b7eb87825" dependencies = [ "dtoa", - "itoa 1.0.8", - "parking_lot 0.12.1", + "itoa 1.0.9", + "owning_ref", "prometheus-client-derive-text-encode", ] [[package]] name = "prometheus-client-derive-text-encode" -version = "0.3.0" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66a455fbcb954c1a7decf3c586e860fd7889cddf4b8e164be736dbac95a953cd" +checksum = "e8e12d01b9d66ad9eb4529c57666b6263fc1993cb30261d83ead658fdd932652" dependencies = [ "proc-macro2", "quote", "syn 1.0.109", ] +[[package]] +name = "prost" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71adf41db68aa0daaefc69bb30bcd68ded9b9abaad5d1fbb6304c4fb390e083e" +dependencies = [ + "bytes", + "prost-derive 0.10.1", +] + [[package]] name = "prost" version = "0.11.9" @@ -5837,7 +6180,29 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b82eaa1d779e9a4bc1c3217db8ffbeabaae1dca241bf70183242128d48681cd" dependencies = [ "bytes", - "prost-derive", + "prost-derive 0.11.9", +] + +[[package]] +name = "prost-build" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ae5a4388762d5815a9fc0dea33c56b021cdc8dde0c55e0c9ca57197254b0cab" +dependencies = [ + "bytes", + "cfg-if", + "cmake", + "heck", + "itertools", + "lazy_static", + "log", + "multimap", + "petgraph", + "prost 0.10.4", + "prost-types 0.10.1", + "regex", + "tempfile", + "which", ] [[package]] @@ -5853,9 +6218,9 @@ dependencies = [ "log", "multimap", "petgraph", - "prettyplease", - "prost", - "prost-types", + "prettyplease 0.1.25", + "prost 0.11.9", + "prost-types 0.11.9", "regex", "syn 1.0.109", "tempfile", @@ -5864,17 +6229,30 @@ dependencies = [ [[package]] name = "prost-codec" -version = "0.2.0" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "011ae9ff8359df7915f97302d591cdd9e0e27fbd5a4ddc5bd13b71079bb20987" +checksum = "00af1e92c33b4813cc79fda3f2dbf56af5169709be0202df730e9ebc3e4cd007" dependencies = [ "asynchronous-codec", "bytes", - "prost", + "prost 0.10.4", "thiserror", "unsigned-varint", ] +[[package]] +name = "prost-derive" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b670f45da57fb8542ebdbb6105a925fe571b67f9e7ed9f47a06a84e72b4e7cc" +dependencies = [ + "anyhow", + "itertools", + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "prost-derive" version = "0.11.9" @@ -5888,13 +6266,23 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "prost-types" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d0a014229361011dc8e69c8a1ec6c2e8d0f2af7c91e3ea3f5b2170298461e68" +dependencies = [ + "bytes", + "prost 0.10.4", +] + [[package]] name = "prost-types" version = "0.11.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "213622a1460818959ac1181aaeb2dc9c7f63df720db7d788b3e24eacd1983e13" dependencies = [ - "prost", + "prost 0.11.9", ] [[package]] @@ -5925,9 +6313,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.29" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "573015e8ab27661678357f27dc26460738fd2b6c86e46f386fde94cb5d913105" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" dependencies = [ "proc-macro2", ] @@ -5998,7 +6386,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.10", + "getrandom 0.2.11", ] [[package]] @@ -6046,9 +6434,9 @@ checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3" [[package]] name = "rayon" -version = "1.7.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d2df5196e37bcc87abebc0053e20787d73847bb33134a69841207dd0a47f03b" +checksum = "9c27db03db7734835b3f53954b534c91069375ce6ccaa2e065441e07d9b6cdb1" dependencies = [ "either", "rayon-core", @@ -6056,14 +6444,12 @@ dependencies = [ [[package]] name = "rayon-core" -version = "1.11.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b8f95bd6966f5c87776639160a66bd8ab9895d9d4ab01ddba9fc60661aebe8d" +checksum = "5ce3fb6ad83f861aac485e76e1985cd109d9a3713802152be56c3b1f0e0658ed" dependencies = [ - "crossbeam-channel", "crossbeam-deque", "crossbeam-utils", - "num_cpus", ] [[package]] @@ -6084,35 +6470,44 @@ dependencies = [ "bitflags 1.3.2", ] +[[package]] +name = "redox_syscall" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +dependencies = [ + "bitflags 1.3.2", +] + [[package]] name = "redox_users" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" +checksum = "a18479200779601e498ada4e8c1e1f50e3ee19deb0259c25825a98b5603b2cb4" dependencies = [ - "getrandom 0.2.10", - "redox_syscall 0.2.16", + "getrandom 0.2.11", + "libredox", "thiserror", ] [[package]] name = "ref-cast" -version = "1.0.18" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1641819477c319ef452a075ac34a4be92eb9ba09f6841f62d594d50fdcf0bf6b" +checksum = "acde58d073e9c79da00f2b5b84eed919c8326832648a5b109b3fce1bb1175280" dependencies = [ "ref-cast-impl", ] [[package]] name = "ref-cast-impl" -version = "1.0.18" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68bf53dad9b6086826722cdc99140793afd9f62faa14a1ad07eb4f955e7a7216" +checksum = "7f7473c2cfcf90008193dd0e3e16599455cb601a9fce322b5bb55de799664925" dependencies = [ "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.39", ] [[package]] @@ -6129,14 +6524,14 @@ dependencies = [ [[package]] name = "regex" -version = "1.9.1" +version = "1.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2eae68fc220f7cf2532e4494aded17545fce192d59cd996e0fe7887f4ceb575" +checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" dependencies = [ - "aho-corasick 1.0.2", + "aho-corasick", "memchr", - "regex-automata 0.3.2", - "regex-syntax 0.7.3", + "regex-automata 0.4.3", + "regex-syntax 0.8.2", ] [[package]] @@ -6150,13 +6545,13 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.3.2" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83d3daa6976cffb758ec878f108ba0e062a45b2d6ca3a2cca965338855476caf" +checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" dependencies = [ - "aho-corasick 1.0.2", + "aho-corasick", "memchr", - "regex-syntax 0.7.3", + "regex-syntax 0.8.2", ] [[package]] @@ -6167,25 +6562,25 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "regex-syntax" -version = "0.7.3" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ab07dc67230e4a4718e70fd5c20055a4334b121f1f9db8fe63ef39ce9b8c846" +checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" [[package]] name = "remote-externalities" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "env_logger 0.9.3", + "jsonrpsee", "log", "parity-scale-codec", "serde", - "serde_json 1.0.100", + "serde_json 1.0.108", "sp-core", "sp-io", "sp-runtime", "sp-version", - "substrate-rpc-client", ] [[package]] @@ -6218,17 +6613,31 @@ dependencies = [ "cc", "libc", "once_cell", - "spin", - "untrusted", + "spin 0.5.2", + "untrusted 0.7.1", "web-sys", "winapi", ] +[[package]] +name = "ring" +version = "0.17.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb0205304757e5d899b9c2e448b867ffd03ae7f988002e47cd24954391394d0b" +dependencies = [ + "cc", + "getrandom 0.2.11", + "libc", + "spin 0.9.8", + "untrusted 0.9.0", + "windows-sys 0.48.0", +] + [[package]] name = "rocksdb" -version = "0.19.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e9562ea1d70c0cc63a34a22d977753b50cca91cc6b6527750463bd5dd8697bc" +checksum = "620f4129485ff1a7128d184bc687470c21c7951b64779ebc9cfdad3dcd920290" dependencies = [ "libc", "librocksdb-sys", @@ -6236,13 +6645,13 @@ dependencies = [ [[package]] name = "rpassword" -version = "7.2.0" +version = "7.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6678cf63ab3491898c0d021b493c94c9b221d91295294a2a5746eacbe5928322" +checksum = "80472be3c897911d0137b2d2b9055faf6eeac5b14e324073d83bc17b191d7e3f" dependencies = [ "libc", "rtoolbox", - "winapi", + "windows-sys 0.48.0", ] [[package]] @@ -6262,12 +6671,12 @@ dependencies = [ [[package]] name = "rtoolbox" -version = "0.0.1" +version = "0.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "034e22c514f5c0cb8a10ff341b9b048b5ceb21591f31c8f44c43b960f9b3524a" +checksum = "c247d24e63230cdb56463ae328478bd5eac8b8faa8c69461a77e8e323afac90e" dependencies = [ "libc", - "winapi", + "windows-sys 0.48.0", ] [[package]] @@ -6303,14 +6712,14 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" dependencies = [ - "semver 1.0.17", + "semver 1.0.20", ] [[package]] name = "rustix" -version = "0.35.14" +version = "0.35.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6380889b07a03b5ecf1d44dc9ede6fd2145d84b502a2a9ca0b03c48e0cc3220f" +checksum = "5363f616a5244fd47fc1dd0a0b24c28a5c0154f5010c16332a7ad6f78f2e8b62" dependencies = [ "bitflags 1.3.2", "errno 0.2.8", @@ -6322,12 +6731,12 @@ dependencies = [ [[package]] name = "rustix" -version = "0.37.23" +version = "0.37.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d69718bf81c6127a49dc64e44a742e8bb9213c0ff8869a22c308f84c1d4ab06" +checksum = "fea8ca367a3a01fe35e6943c400addf443c0f57670e6ec51196f71a4b8762dd2" dependencies = [ "bitflags 1.3.2", - "errno 0.3.1", + "errno 0.3.6", "io-lifetimes 1.0.11", "libc", "linux-raw-sys 0.3.8", @@ -6336,25 +6745,25 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.3" +version = "0.38.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac5ffa1efe7548069688cd7028f32591853cd7b5b756d41bcffd2353e4fc75b4" +checksum = "2b426b0506e5d50a7d8dafcf2e81471400deb602392c7dd110815afb4eaf02a3" dependencies = [ - "bitflags 2.3.3", - "errno 0.3.1", + "bitflags 2.4.1", + "errno 0.3.6", "libc", - "linux-raw-sys 0.4.3", + "linux-raw-sys 0.4.11", "windows-sys 0.48.0", ] [[package]] name = "rustls" -version = "0.20.8" +version = "0.20.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fff78fc74d175294f4e83b28343315ffcfb114b156f0185e9741cb5570f50e2f" +checksum = "1b80e3dec595989ea8510028f30c408a4630db12c9cbb8de34203b89d6577e99" dependencies = [ "log", - "ring", + "ring 0.16.20", "sct", "webpki", ] @@ -6373,18 +6782,18 @@ dependencies = [ [[package]] name = "rustls-pemfile" -version = "1.0.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d3987094b1d07b653b7dfdc3f70ce9a1da9c51ac18c1b06b662e4f9a0e9f4b2" +checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" dependencies = [ - "base64 0.21.2", + "base64 0.21.5", ] [[package]] name = "rustversion" -version = "1.0.13" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc31bd9b61a32c31f9650d18add92aa83a49ba979c143eefd27fe7177b05bd5f" +checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" [[package]] name = "rw-stream-sink" @@ -6399,9 +6808,9 @@ dependencies = [ [[package]] name = "ryu" -version = "1.0.14" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe232bdf6be8c8de797b22184ee71118d63780ea42ac85b61d1baa6d3b782ae9" +checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" [[package]] name = "safe-mix" @@ -6412,6 +6821,15 @@ dependencies = [ "rustc_version 0.2.3", ] +[[package]] +name = "salsa20" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97a22f5af31f73a954c10289c93e8a50cc23d971e80ee446f1f6f7137a088213" +dependencies = [ + "cipher", +] + [[package]] name = "same-file" version = "1.0.6" @@ -6424,7 +6842,7 @@ dependencies = [ [[package]] name = "sc-allocator" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "log", "sp-core", @@ -6435,7 +6853,7 @@ dependencies = [ [[package]] name = "sc-authority-discovery" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "async-trait", "futures", @@ -6444,8 +6862,8 @@ dependencies = [ "libp2p", "log", "parity-scale-codec", - "prost", - "prost-build", + "prost 0.10.4", + "prost-build 0.10.4", "rand 0.7.3", "sc-client-api", "sc-network-common", @@ -6462,7 +6880,7 @@ dependencies = [ [[package]] name = "sc-basic-authorship" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "futures", "futures-timer", @@ -6485,7 +6903,7 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "parity-scale-codec", "sc-client-api", @@ -6501,7 +6919,7 @@ dependencies = [ [[package]] name = "sc-chain-spec" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "impl-trait-for-tuples", "memmap2", @@ -6510,7 +6928,7 @@ dependencies = [ "sc-network-common", "sc-telemetry", "serde", - "serde_json 1.0.100", + "serde_json 1.0.108", "sp-core", "sp-runtime", ] @@ -6518,7 +6936,7 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -6529,7 +6947,7 @@ dependencies = [ [[package]] name = "sc-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "array-bytes", "chrono", @@ -6553,7 +6971,7 @@ dependencies = [ "sc-tracing", "sc-utils", "serde", - "serde_json 1.0.100", + "serde_json 1.0.108", "sp-blockchain", "sp-core", "sp-keyring", @@ -6569,7 +6987,7 @@ dependencies = [ [[package]] name = "sc-client-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "fnv", "futures", @@ -6597,7 +7015,7 @@ dependencies = [ [[package]] name = "sc-client-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "hash-db", "kvdb", @@ -6622,7 +7040,7 @@ dependencies = [ [[package]] name = "sc-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "async-trait", "futures", @@ -6646,7 +7064,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "async-trait", "fork-tree", @@ -6688,7 +7106,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "futures", "jsonrpsee", @@ -6710,7 +7128,7 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "fork-tree", "parity-scale-codec", @@ -6723,7 +7141,7 @@ dependencies = [ [[package]] name = "sc-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "async-trait", "futures", @@ -6747,7 +7165,7 @@ dependencies = [ [[package]] name = "sc-consensus-uncles" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "sc-client-api", "sp-authorship", @@ -6758,10 +7176,10 @@ dependencies = [ [[package]] name = "sc-executor" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "lazy_static", - "lru 0.7.8", + "lru", "parity-scale-codec", "parking_lot 0.12.1", "sc-executor-common", @@ -6785,7 +7203,7 @@ dependencies = [ [[package]] name = "sc-executor-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "environmental", "parity-scale-codec", @@ -6801,7 +7219,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmi" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "log", "parity-scale-codec", @@ -6816,7 +7234,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "cfg-if", "libc", @@ -6824,7 +7242,7 @@ dependencies = [ "once_cell", "parity-scale-codec", "parity-wasm 0.45.0", - "rustix 0.35.14", + "rustix 0.35.16", "sc-allocator", "sc-executor-common", "sp-runtime-interface", @@ -6836,7 +7254,7 @@ dependencies = [ [[package]] name = "sc-finality-grandpa" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "ahash", "array-bytes", @@ -6860,7 +7278,7 @@ dependencies = [ "sc-network-gossip", "sc-telemetry", "sc-utils", - "serde_json 1.0.100", + "serde_json 1.0.108", "sp-api", "sp-application-crypto", "sp-arithmetic", @@ -6877,7 +7295,7 @@ dependencies = [ [[package]] name = "sc-finality-grandpa-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "finality-grandpa", "futures", @@ -6888,7 +7306,7 @@ dependencies = [ "sc-finality-grandpa", "sc-rpc", "serde", - "serde_json 1.0.100", + "serde_json 1.0.108", "sp-blockchain", "sp-core", "sp-runtime", @@ -6898,7 +7316,7 @@ dependencies = [ [[package]] name = "sc-informant" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "ansi_term 0.12.1", "futures", @@ -6915,12 +7333,12 @@ dependencies = [ [[package]] name = "sc-keystore" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "array-bytes", "async-trait", "parking_lot 0.12.1", - "serde_json 1.0.100", + "serde_json 1.0.108", "sp-application-crypto", "sp-core", "sp-keystore", @@ -6930,7 +7348,7 @@ dependencies = [ [[package]] name = "sc-network" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "array-bytes", "async-trait", @@ -6948,11 +7366,11 @@ dependencies = [ "linked-hash-map", "linked_hash_set", "log", - "lru 0.7.8", + "lru", "parity-scale-codec", "parking_lot 0.12.1", "pin-project", - "prost", + "prost 0.10.4", "rand 0.7.3", "sc-block-builder", "sc-client-api", @@ -6961,7 +7379,7 @@ dependencies = [ "sc-peerset", "sc-utils", "serde", - "serde_json 1.0.100", + "serde_json 1.0.108", "smallvec", "sp-arithmetic", "sp-blockchain", @@ -6977,14 +7395,14 @@ dependencies = [ [[package]] name = "sc-network-bitswap" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "cid", "futures", "libp2p", "log", - "prost", - "prost-build", + "prost 0.11.9", + "prost-build 0.11.9", "sc-client-api", "sc-network-common", "sp-blockchain", @@ -6997,7 +7415,7 @@ dependencies = [ [[package]] name = "sc-network-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "async-trait", "bitflags 1.3.2", @@ -7007,7 +7425,7 @@ dependencies = [ "libp2p", "linked_hash_set", "parity-scale-codec", - "prost-build", + "prost-build 0.10.4", "sc-consensus", "sc-peerset", "serde", @@ -7023,14 +7441,14 @@ dependencies = [ [[package]] name = "sc-network-gossip" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "ahash", "futures", "futures-timer", "libp2p", "log", - "lru 0.7.8", + "lru", "sc-network-common", "sc-peerset", "sp-runtime", @@ -7041,15 +7459,15 @@ dependencies = [ [[package]] name = "sc-network-light" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "array-bytes", "futures", "libp2p", "log", "parity-scale-codec", - "prost", - "prost-build", + "prost 0.10.4", + "prost-build 0.10.4", "sc-client-api", "sc-network-common", "sc-peerset", @@ -7062,23 +7480,21 @@ dependencies = [ [[package]] name = "sc-network-sync" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "array-bytes", "fork-tree", "futures", "libp2p", "log", - "lru 0.7.8", - "mockall", + "lru", "parity-scale-codec", - "prost", - "prost-build", + "prost 0.10.4", + "prost-build 0.10.4", "sc-client-api", "sc-consensus", "sc-network-common", "sc-peerset", - "sc-utils", "smallvec", "sp-arithmetic", "sp-blockchain", @@ -7092,7 +7508,7 @@ dependencies = [ [[package]] name = "sc-network-transactions" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "array-bytes", "futures", @@ -7111,7 +7527,7 @@ dependencies = [ [[package]] name = "sc-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "array-bytes", "bytes", @@ -7141,20 +7557,20 @@ dependencies = [ [[package]] name = "sc-peerset" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "futures", "libp2p", "log", "sc-utils", - "serde_json 1.0.100", + "serde_json 1.0.108", "wasm-timer", ] [[package]] name = "sc-proposer-metrics" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -7163,7 +7579,7 @@ dependencies = [ [[package]] name = "sc-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "futures", "hash-db", @@ -7178,7 +7594,7 @@ dependencies = [ "sc-tracing", "sc-transaction-pool-api", "sc-utils", - "serde_json 1.0.100", + "serde_json 1.0.108", "sp-api", "sp-blockchain", "sp-core", @@ -7193,7 +7609,7 @@ dependencies = [ [[package]] name = "sc-rpc-api" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "futures", "jsonrpsee", @@ -7204,7 +7620,7 @@ dependencies = [ "sc-transaction-pool-api", "scale-info", "serde", - "serde_json 1.0.100", + "serde_json 1.0.108", "sp-core", "sp-rpc", "sp-runtime", @@ -7216,39 +7632,20 @@ dependencies = [ [[package]] name = "sc-rpc-server" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "futures", "jsonrpsee", "log", - "serde_json 1.0.100", + "serde_json 1.0.108", "substrate-prometheus-endpoint", "tokio", ] -[[package]] -name = "sc-rpc-spec-v2" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" -dependencies = [ - "futures", - "hex", - "jsonrpsee", - "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/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "async-trait", "directories", @@ -7280,7 +7677,6 @@ dependencies = [ "sc-offchain", "sc-rpc", "sc-rpc-server", - "sc-rpc-spec-v2", "sc-sysinfo", "sc-telemetry", "sc-tracing", @@ -7288,7 +7684,7 @@ dependencies = [ "sc-transaction-pool-api", "sc-utils", "serde", - "serde_json 1.0.100", + "serde_json 1.0.108", "sp-api", "sp-application-crypto", "sp-block-builder", @@ -7319,7 +7715,7 @@ dependencies = [ [[package]] name = "sc-state-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "log", "parity-scale-codec", @@ -7333,7 +7729,7 @@ dependencies = [ [[package]] name = "sc-sync-state-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -7343,7 +7739,7 @@ dependencies = [ "sc-consensus-epochs", "sc-finality-grandpa", "serde", - "serde_json 1.0.100", + "serde_json 1.0.108", "sp-blockchain", "sp-runtime", "thiserror", @@ -7352,7 +7748,7 @@ dependencies = [ [[package]] name = "sc-sysinfo" version = "6.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "futures", "libc", @@ -7362,7 +7758,7 @@ dependencies = [ "regex", "sc-telemetry", "serde", - "serde_json 1.0.100", + "serde_json 1.0.108", "sp-core", "sp-io", "sp-std", @@ -7371,7 +7767,7 @@ dependencies = [ [[package]] name = "sc-telemetry" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "chrono", "futures", @@ -7381,7 +7777,7 @@ dependencies = [ "pin-project", "rand 0.7.3", "serde", - "serde_json 1.0.100", + "serde_json 1.0.108", "thiserror", "wasm-timer", ] @@ -7389,7 +7785,7 @@ dependencies = [ [[package]] name = "sc-tracing" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "ansi_term 0.12.1", "atty", @@ -7420,7 +7816,7 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -7431,9 +7827,8 @@ dependencies = [ [[package]] name = "sc-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ - "async-trait", "futures", "futures-timer", "linked-hash-map", @@ -7458,9 +7853,8 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ - "async-trait", "futures", "log", "serde", @@ -7472,7 +7866,7 @@ dependencies = [ [[package]] name = "sc-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "futures", "futures-timer", @@ -7484,9 +7878,9 @@ dependencies = [ [[package]] name = "scale-info" -version = "2.9.0" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35c0a159d0c45c12b20c5a844feb1fe4bea86e28f17b92a5f0c42193634d3782" +checksum = "7f7d66a1128282b7ef025a8ead62a4a9fcf017382ec53b8ffbf4d7bf77bd3c60" dependencies = [ "bitvec", "cfg-if", @@ -7498,9 +7892,9 @@ dependencies = [ [[package]] name = "scale-info-derive" -version = "2.9.0" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "912e55f6d20e0e80d63733872b40e1227c0bce1e1ab81ba67d696339bfd7fd29" +checksum = "abf2c68b89cafb3b8d918dd07b42be0da66ff202cf1155c5739a4e0c1ea0dc19" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -7537,18 +7931,18 @@ dependencies = [ [[package]] name = "scopeguard" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "sct" -version = "0.7.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d53dcdb7c9f8158937a7981b48accfd39a43af418591a5d008c7b22b5e1b7ca4" +checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" dependencies = [ - "ring", - "untrusted", + "ring 0.17.5", + "untrusted 0.9.0", ] [[package]] @@ -7593,9 +7987,9 @@ dependencies = [ [[package]] name = "security-framework" -version = "2.9.1" +version = "2.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fc758eb7bffce5b308734e9b0c1468893cae9ff70ebf13e7090be8dcbcc83a8" +checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de" dependencies = [ "bitflags 1.3.2", "core-foundation", @@ -7606,9 +8000,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.9.0" +version = "2.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f51d0c0d83bec45f16480d0ce0058397a69e48fcdc52d1dc8855fb68acbd31a7" +checksum = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a" dependencies = [ "core-foundation-sys", "libc", @@ -7634,9 +8028,9 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.17" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bebd363326d05ec3e2f532ab7660680f3b02130d780c299bca73469d521bc0ed" +checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090" dependencies = [ "serde", ] @@ -7649,22 +8043,22 @@ checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" [[package]] name = "serde" -version = "1.0.171" +version = "1.0.192" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30e27d1e4fd7659406c492fd6cfaf2066ba8773de45ca75e855590f856dc34a9" +checksum = "bca2a08484b285dcb282d0f67b26cadc0df8b19f8c12502c13d966bf9482f001" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.171" +version = "1.0.192" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "389894603bd18c46fa56231694f8d827779c0951a667087194cf9de94ed24682" +checksum = "d6c7207fbec9faa48073f3e3074cbe553af6ea512d7c21ba46e434e70ea9fbc1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.39", ] [[package]] @@ -7679,11 +8073,11 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.100" +version = "1.0.108" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f1e14e89be7aa4c4b78bdbdc9eb5bf8517829a600ae8eaa39a6e1d960b5185c" +checksum = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b" dependencies = [ - "itoa 1.0.8", + "itoa 1.0.9", "ryu", "serde", ] @@ -7737,9 +8131,9 @@ dependencies = [ [[package]] name = "sha2" -version = "0.10.7" +version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "479fb9d862239e610720565ca91403019f2f00410f1864c5aa7479b950a76ed8" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" dependencies = [ "cfg-if", "cpufeatures", @@ -7758,28 +8152,18 @@ dependencies = [ [[package]] name = "sharded-slab" -version = "0.1.4" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "900fba806f70c630b0a382d0d825e17a0f19fcd059a2ade1ff237bcddf446b31" +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" dependencies = [ "lazy_static", ] [[package]] name = "shlex" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43b2853a4d09f215c24cc5489c992ce46052d359b5109343cbafbf26bc62f8a3" - -[[package]] -name = "signal-hook" -version = "0.3.15" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "732768f1176d21d09e076c23a93123d40bba92d50c4058da34d45c8de8e682b9" -dependencies = [ - "libc", - "signal-hook-registry", -] +checksum = "a7cee0529a6d40f580e7a5e6c495c8fbfe21b7b52795ed4bb5e62cdf92bc6380" [[package]] name = "signal-hook-registry" @@ -7814,9 +8198,9 @@ dependencies = [ [[package]] name = "slab" -version = "0.4.8" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6528351c9bc8ab22353f9d776db39a20288e8d6c37ef8cfe3317cf875eecfc2d" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" dependencies = [ "autocfg", ] @@ -7829,9 +8213,9 @@ checksum = "826167069c09b99d56f31e9ae5c99049e932a98c9dc2dac47645b08dbbf76ba7" [[package]] name = "smallvec" -version = "1.11.0" +version = "1.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62bb4feee49fdd9f707ef802e22365a35de4b7b299de4763d44bfea899442ff9" +checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" [[package]] name = "snap" @@ -7841,26 +8225,26 @@ checksum = "5e9f0ab6ef7eb7353d9119c170a436d1bf248eea575ac42d19d12f4e34130831" [[package]] name = "snow" -version = "0.9.2" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ccba027ba85743e09d15c03296797cad56395089b832b48b5a5217880f57733" +checksum = "58021967fd0a5eeeb23b08df6cc244a4d4a5b4aec1d27c9e02fad1a58b4cd74e" dependencies = [ "aes-gcm", "blake2", "chacha20poly1305", - "curve25519-dalek 4.0.0-rc.1", + "curve25519-dalek 4.1.1", "rand_core 0.6.4", - "ring", + "ring 0.17.5", "rustc_version 0.4.0", - "sha2 0.10.7", + "sha2 0.10.8", "subtle", ] [[package]] name = "socket2" -version = "0.4.9" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" +checksum = "9f7916fc008ca5542385b89a3d3ce689953c143e9304a9bf8beec1de48994c0d" dependencies = [ "libc", "winapi", @@ -7868,9 +8252,9 @@ dependencies = [ [[package]] name = "socket2" -version = "0.5.3" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2538b18701741680e0322a2302176d3253a35388e2e62f172f64f4f16605f877" +checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9" dependencies = [ "libc", "windows-sys 0.48.0", @@ -7895,7 +8279,7 @@ dependencies = [ [[package]] name = "sp-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "hash-db", "log", @@ -7913,7 +8297,7 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "blake2", "proc-macro-crate", @@ -7925,7 +8309,7 @@ dependencies = [ [[package]] name = "sp-application-crypto" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "parity-scale-codec", "scale-info", @@ -7938,7 +8322,7 @@ dependencies = [ [[package]] name = "sp-arithmetic" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "integer-sqrt", "num-traits", @@ -7953,7 +8337,7 @@ dependencies = [ [[package]] name = "sp-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "parity-scale-codec", "scale-info", @@ -7966,7 +8350,7 @@ dependencies = [ [[package]] name = "sp-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "async-trait", "parity-scale-codec", @@ -7978,7 +8362,7 @@ dependencies = [ [[package]] name = "sp-block-builder" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "parity-scale-codec", "sp-api", @@ -7990,11 +8374,11 @@ dependencies = [ [[package]] name = "sp-blockchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "futures", "log", - "lru 0.7.8", + "lru", "parity-scale-codec", "parking_lot 0.12.1", "sp-api", @@ -8008,7 +8392,7 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "async-trait", "futures", @@ -8027,7 +8411,7 @@ dependencies = [ [[package]] name = "sp-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "async-trait", "merlin", @@ -8050,7 +8434,7 @@ dependencies = [ [[package]] name = "sp-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "parity-scale-codec", "scale-info", @@ -8064,7 +8448,7 @@ dependencies = [ [[package]] name = "sp-consensus-vrf" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "parity-scale-codec", "scale-info", @@ -8077,7 +8461,7 @@ dependencies = [ [[package]] name = "sp-core" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "array-bytes", "base58", @@ -8123,12 +8507,12 @@ dependencies = [ [[package]] name = "sp-core-hashing" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "blake2", "byteorder", "digest 0.10.7", - "sha2 0.10.7", + "sha2 0.10.8", "sha3", "sp-std", "twox-hash", @@ -8137,7 +8521,7 @@ dependencies = [ [[package]] name = "sp-core-hashing-proc-macro" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "proc-macro2", "quote", @@ -8148,7 +8532,7 @@ dependencies = [ [[package]] name = "sp-database" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "kvdb", "parking_lot 0.12.1", @@ -8157,7 +8541,7 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "proc-macro2", "quote", @@ -8167,7 +8551,7 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.12.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "environmental", "parity-scale-codec", @@ -8178,7 +8562,7 @@ dependencies = [ [[package]] name = "sp-finality-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "finality-grandpa", "log", @@ -8196,7 +8580,7 @@ dependencies = [ [[package]] name = "sp-inherents" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -8210,7 +8594,7 @@ dependencies = [ [[package]] name = "sp-io" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "bytes", "futures", @@ -8236,7 +8620,7 @@ dependencies = [ [[package]] name = "sp-keyring" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "lazy_static", "sp-core", @@ -8247,7 +8631,7 @@ dependencies = [ [[package]] name = "sp-keystore" version = "0.12.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "async-trait", "futures", @@ -8264,7 +8648,7 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "thiserror", "zstd", @@ -8273,7 +8657,7 @@ dependencies = [ [[package]] name = "sp-npos-elections" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "parity-scale-codec", "scale-info", @@ -8287,7 +8671,7 @@ dependencies = [ [[package]] name = "sp-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "sp-api", "sp-core", @@ -8297,7 +8681,7 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "backtrace", "lazy_static", @@ -8307,7 +8691,7 @@ dependencies = [ [[package]] name = "sp-rpc" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "rustc-hash", "serde", @@ -8317,7 +8701,7 @@ dependencies = [ [[package]] name = "sp-runtime" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "either", "hash256-std-hasher", @@ -8340,7 +8724,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "bytes", "impl-trait-for-tuples", @@ -8358,7 +8742,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "Inflector", "proc-macro-crate", @@ -8370,7 +8754,7 @@ dependencies = [ [[package]] name = "sp-sandbox" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "log", "parity-scale-codec", @@ -8384,7 +8768,7 @@ dependencies = [ [[package]] name = "sp-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "parity-scale-codec", "scale-info", @@ -8398,7 +8782,7 @@ dependencies = [ [[package]] name = "sp-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "parity-scale-codec", "scale-info", @@ -8409,7 +8793,7 @@ dependencies = [ [[package]] name = "sp-state-machine" version = "0.12.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "hash-db", "log", @@ -8431,12 +8815,12 @@ dependencies = [ [[package]] name = "sp-std" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" [[package]] name = "sp-storage" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "impl-serde", "parity-scale-codec", @@ -8449,7 +8833,7 @@ dependencies = [ [[package]] name = "sp-tasks" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "log", "sp-core", @@ -8462,7 +8846,7 @@ dependencies = [ [[package]] name = "sp-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "async-trait", "futures-timer", @@ -8478,7 +8862,7 @@ dependencies = [ [[package]] name = "sp-tracing" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "parity-scale-codec", "sp-std", @@ -8490,7 +8874,7 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "sp-api", "sp-runtime", @@ -8499,7 +8883,7 @@ dependencies = [ [[package]] name = "sp-transaction-storage-proof" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "async-trait", "log", @@ -8515,13 +8899,13 @@ dependencies = [ [[package]] name = "sp-trie" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "ahash", "hash-db", - "hashbrown", + "hashbrown 0.12.3", "lazy_static", - "lru 0.7.8", + "lru", "memory-db", "nohash-hasher", "parity-scale-codec", @@ -8538,7 +8922,7 @@ dependencies = [ [[package]] name = "sp-version" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "impl-serde", "parity-scale-codec", @@ -8555,7 +8939,7 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "parity-scale-codec", "proc-macro2", @@ -8566,7 +8950,7 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "impl-trait-for-tuples", "log", @@ -8579,7 +8963,7 @@ dependencies = [ [[package]] name = "sp-weights" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -8598,6 +8982,12 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" +[[package]] +name = "spin" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" + [[package]] name = "spki" version = "0.5.4" @@ -8610,16 +9000,16 @@ dependencies = [ [[package]] name = "ss58-registry" -version = "1.41.0" +version = "1.44.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfc443bad666016e012538782d9e3006213a7db43e9fb1dda91657dc06a6fa08" +checksum = "35935738370302d5e33963665b77541e4b990a3e919ec904c837a56cfc891de1" dependencies = [ "Inflector", "num-format", "proc-macro2", "quote", "serde", - "serde_json 1.0.100", + "serde_json 1.0.108", "unicode-xid", ] @@ -8706,9 +9096,9 @@ dependencies = [ [[package]] name = "substrate-bip39" -version = "0.4.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49eee6965196b32f882dd2ee85a92b1dbead41b04e53907f269de3b0dc04733c" +checksum = "e620c7098893ba667438b47169c00aacdd9e7c10e042250ce2b60b087ec97328" dependencies = [ "hmac 0.11.0", "pbkdf2 0.8.0", @@ -8720,7 +9110,7 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "platforms 2.0.0", ] @@ -8728,7 +9118,7 @@ dependencies = [ [[package]] name = "substrate-frame-rpc-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "frame-system-rpc-runtime-api", "futures", @@ -8738,7 +9128,7 @@ dependencies = [ "sc-client-api", "sc-rpc-api", "sc-transaction-pool-api", - "serde_json 1.0.100", + "serde_json 1.0.108", "sp-api", "sp-block-builder", "sp-blockchain", @@ -8749,7 +9139,7 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "futures-util", "hyper", @@ -8759,23 +9149,10 @@ dependencies = [ "tokio", ] -[[package]] -name = "substrate-rpc-client" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" -dependencies = [ - "async-trait", - "jsonrpsee", - "log", - "sc-rpc-api", - "serde", - "sp-runtime", -] - [[package]] name = "substrate-state-trie-migration-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "jsonrpsee", "log", @@ -8796,7 +9173,7 @@ dependencies = [ [[package]] name = "substrate-test-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "futures", "substrate-test-utils-derive", @@ -8806,7 +9183,7 @@ dependencies = [ [[package]] name = "substrate-test-utils-derive" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -8817,7 +9194,7 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "ansi_term 0.12.1", "build-helper", @@ -8850,9 +9227,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.25" +version = "2.0.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15e3fc8c0c74267e2df136e5e5fb656a464158aa57624053375eb9c8c6e25ae2" +checksum = "23e78b90f2fcf45d3e842032ce32e3f2d1545ba6636271dcbf24fa306d87be7a" dependencies = [ "proc-macro2", "quote", @@ -8900,57 +9277,56 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "target-lexicon" -version = "0.12.8" +version = "0.12.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b1c7f239eb94671427157bd93b3694320f3668d4e1eff08c7285366fd777fac" +checksum = "14c39fd04924ca3a864207c66fc2cd7d22d7c016007f9ce846cbb9326331930a" [[package]] name = "tempfile" -version = "3.6.0" +version = "3.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31c0432476357e58790aaa47a8efb0c5138f137343f3b5f23bd36a27e3b0a6d6" +checksum = "7ef1adac450ad7f4b3c28589471ade84f25f731a7a0fe30d71dfa9f60fd808e5" dependencies = [ - "autocfg", "cfg-if", - "fastrand", - "redox_syscall 0.3.5", - "rustix 0.37.23", + "fastrand 2.0.1", + "redox_syscall 0.4.1", + "rustix 0.38.21", "windows-sys 0.48.0", ] [[package]] name = "termcolor" -version = "1.2.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6" +checksum = "6093bad37da69aab9d123a8091e4be0aa4a03e4d601ec641c327398315f62b64" dependencies = [ "winapi-util", ] [[package]] -name = "termtree" -version = "0.4.1" +name = "textwrap" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" +checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d" [[package]] name = "thiserror" -version = "1.0.43" +version = "1.0.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a35fc5b8971143ca348fa6df4f024d4d55264f3468c71ad1c2f365b0a4d58c42" +checksum = "f9a7210f5c9a7156bb50aa36aed4c95afb51df0df00713949448cf9e97d382d2" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.43" +version = "1.0.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "463fe12d7993d3b327787537ce8dd4dfa058de32fc2b195ef3cde03dc4771e8f" +checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.39", ] [[package]] @@ -8980,25 +9356,15 @@ dependencies = [ [[package]] name = "tikv-jemalloc-sys" -version = "0.5.3+5.3.0-patched" +version = "0.4.3+5.2.1-patched.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a678df20055b43e57ef8cddde41cdfda9a3c1a060b67f4c5836dfb1d78543ba8" +checksum = "a1792ccb507d955b46af42c123ea8863668fae24d03721e40cad6a41773dbb49" dependencies = [ "cc", + "fs_extra", "libc", ] -[[package]] -name = "time" -version = "0.1.45" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b797afad3f312d1c66a56d11d0316f916356d11bd158fbc6ca6389ff6bf805a" -dependencies = [ - "libc", - "wasi 0.10.0+wasi-snapshot-preview1", - "winapi", -] - [[package]] name = "tiny-bip39" version = "0.8.2" @@ -9035,33 +9401,32 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.29.1" +version = "1.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "532826ff75199d5833b9d2c5fe410f29235e25704ee5f0ef599fb51c21f4a4da" +checksum = "d0c014766411e834f7af5b8f4cf46257aab4036ca95e9d2c144a10f59ad6f5b9" dependencies = [ - "autocfg", "backtrace", "bytes", "libc", "mio", "num_cpus", "parking_lot 0.12.1", - "pin-project-lite 0.2.10", + "pin-project-lite 0.2.13", "signal-hook-registry", - "socket2 0.4.9", + "socket2 0.5.5", "tokio-macros", "windows-sys 0.48.0", ] [[package]] name = "tokio-macros" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" +checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.39", ] [[package]] @@ -9082,21 +9447,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842" dependencies = [ "futures-core", - "pin-project-lite 0.2.10", + "pin-project-lite 0.2.13", "tokio", ] [[package]] name = "tokio-util" -version = "0.7.8" +version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "806fe8c2c87eccc8b3267cbae29ed3ab2d0bd37fca70ab622e46aaa9375ddb7d" +checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" dependencies = [ "bytes", "futures-core", "futures-io", "futures-sink", - "pin-project-lite 0.2.10", + "pin-project-lite 0.2.13", "tokio", "tracing", ] @@ -9118,32 +9483,31 @@ checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" [[package]] name = "tracing" -version = "0.1.37" +version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" dependencies = [ - "cfg-if", - "pin-project-lite 0.2.10", + "pin-project-lite 0.2.13", "tracing-attributes", "tracing-core", ] [[package]] name = "tracing-attributes" -version = "0.1.26" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" +checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.39", ] [[package]] name = "tracing-core" -version = "0.1.31" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0955b8137a1df6f1a2e9a37d8a6656291ff0297c1a97c24e0d8425fe2312f79a" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" dependencies = [ "once_cell", "valuable", @@ -9161,12 +9525,12 @@ dependencies = [ [[package]] name = "tracing-log" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78ddad33d2d10b1ed7eb9d1f518a5674713876e97e5bb9b7345a7984fbb4f922" +checksum = "f751112709b4e791d8ce53e32c4ed2d353565a795ce84da2285393f41557bdf2" dependencies = [ - "lazy_static", "log", + "once_cell", "tracing-core", ] @@ -9193,7 +9557,7 @@ dependencies = [ "parking_lot 0.11.2", "regex", "serde", - "serde_json 1.0.100", + "serde_json 1.0.108", "sharded-slab", "smallvec", "thread_local", @@ -9210,7 +9574,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "004e1e8f92535694b4cb1444dc5a8073ecf0815e3357f729638b9f8fc4062908" dependencies = [ "hash-db", - "hashbrown", + "hashbrown 0.12.3", "log", "rustc-hex", "smallvec", @@ -9227,9 +9591,9 @@ dependencies = [ [[package]] name = "trust-dns-proto" -version = "0.22.0" +version = "0.21.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f7f83d1e4a0e4358ac54c5c3681e5d7da5efc5a7a632c90bb6d6669ddd9bc26" +checksum = "9c31f240f59877c3d4bb3b3ea0ec5a6a0cff07323580ff8c7a605cd7d08b255d" dependencies = [ "async-trait", "cfg-if", @@ -9241,30 +9605,30 @@ dependencies = [ "idna 0.2.3", "ipnet", "lazy_static", + "log", "rand 0.8.5", "smallvec", "thiserror", "tinyvec", - "tracing", "url", ] [[package]] name = "trust-dns-resolver" -version = "0.22.0" +version = "0.21.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aff21aa4dcefb0a1afbfac26deb0adc93888c7d295fb63ab273ef276ba2b7cfe" +checksum = "e4ba72c2ea84515690c9fcef4c6c660bb9df3036ed1051686de84605b74fd558" dependencies = [ "cfg-if", "futures-util", "ipconfig", "lazy_static", + "log", "lru-cache", "parking_lot 0.12.1", "resolv-conf", "smallvec", "thiserror", - "tracing", "trust-dns-proto", ] @@ -9277,10 +9641,11 @@ checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" [[package]] name = "try-runtime-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.31#7a4e5163091384c4c10b6d76f5cb80dac0834f38" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.31#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d" dependencies = [ "clap", "frame-try-runtime", + "jsonrpsee", "log", "parity-scale-codec", "remote-externalities", @@ -9296,8 +9661,6 @@ dependencies = [ "sp-runtime", "sp-state-machine", "sp-version", - "sp-weights", - "substrate-rpc-client", "zstd", ] @@ -9321,9 +9684,9 @@ dependencies = [ [[package]] name = "typenum" -version = "1.16.0" +version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "ucd-trie" @@ -9345,9 +9708,9 @@ dependencies = [ [[package]] name = "unicase" -version = "2.6.0" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6" +checksum = "f7d2d4dafb69621809a81864c9c1b864479e1235c0dd4e199924b9742439ed89" dependencies = [ "version_check", ] @@ -9360,9 +9723,9 @@ checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" [[package]] name = "unicode-ident" -version = "1.0.10" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22049a19f4a68748a168c0fc439f9516686aa045927ff767eca0a85101fb6e73" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "unicode-normalization" @@ -9375,9 +9738,9 @@ dependencies = [ [[package]] name = "unicode-width" -version = "0.1.10" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" +checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" [[package]] name = "unicode-xid" @@ -9387,19 +9750,19 @@ checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" [[package]] name = "universal-hash" -version = "0.4.1" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f214e8f697e925001e66ec2c6e37a4ef93f0f78c2eed7814394e10c62025b05" +checksum = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea" dependencies = [ - "generic-array 0.14.7", + "crypto-common", "subtle", ] [[package]] name = "unsigned-varint" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d86a8dc7f45e4c1b0d30e43038c38f274e77af056aa5f74b93c2cf9eb3c1c836" +checksum = "6889a77d49f1f013504cec6bf97a2c730394adedaeb1deb5ea08949a50541105" dependencies = [ "asynchronous-codec", "bytes", @@ -9413,6 +9776,12 @@ version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" +[[package]] +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + [[package]] name = "url" version = "2.4.1" @@ -9425,10 +9794,10 @@ dependencies = [ ] [[package]] -name = "utf8parse" -version = "0.2.1" +name = "utf8-width" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" +checksum = "5190c9442dcdaf0ddd50f37420417d219ae5261bbf5db120d0f9bab996c9cba1" [[package]] name = "valuable" @@ -9438,9 +9807,9 @@ checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" [[package]] name = "value-bag" -version = "1.4.1" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d92ccd67fb88503048c01b59152a04effd0782d035a83a6d256ce6085f08f4a3" +checksum = "4a72e1902dde2bd6441347de2b70b7f5d59bf157c6c62f0c44572607a1d55bbe" [[package]] name = "vcpkg" @@ -9462,15 +9831,15 @@ checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" [[package]] name = "waker-fn" -version = "1.1.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d5b2c62b4012a3e1eca5a7e077d13b3bf498c4073e33ccd58626607748ceeca" +checksum = "f3c4517f54858c779bbcbf228f4fca63d121bf85fbecb2dc578cdf4a39395690" [[package]] name = "walkdir" -version = "2.3.3" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36df944cda56c7d8d8b7496af378e6b16de9284591917d307c9b4d313c44e698" +checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee" dependencies = [ "same-file", "winapi-util", @@ -9491,12 +9860,6 @@ version = "0.9.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" -[[package]] -name = "wasi" -version = "0.10.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" - [[package]] name = "wasi" version = "0.11.0+wasi-snapshot-preview1" @@ -9505,9 +9868,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.87" +version = "0.2.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342" +checksum = "7daec296f25a1bae309c0cd5c29c4b260e510e6d813c286b19eaadf409d40fce" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -9515,24 +9878,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.87" +version = "0.2.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd" +checksum = "e397f4664c0e4e428e8313a469aaa58310d302159845980fd23b0f22a847f217" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.39", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.37" +version = "0.4.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c02dbc21516f9f1f04f187958890d7e6026df8d16540b7ad9492bc34a67cea03" +checksum = "9afec9963e3d0994cac82455b2b3502b81a7f40f9a0d32181f7528d9f4b43e02" dependencies = [ "cfg-if", "js-sys", @@ -9542,9 +9905,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.87" +version = "0.2.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d" +checksum = "5961017b3b08ad5f3fe39f1e79877f8ee7c23c5e5fd5eb80de95abc41f1f16b2" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -9552,22 +9915,22 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.87" +version = "0.2.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" +checksum = "c5353b8dab669f5e10f5bd76df26a9360c748f054f862ff5f3f8aae0c7fb3907" dependencies = [ "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.39", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.87" +version = "0.2.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" +checksum = "0d046c5d029ba91a1ed14da14dca44b68bf2f124cfbaf741c54151fdb3e0750b" [[package]] name = "wasm-gc-api" @@ -9631,7 +9994,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57d20cb3c59b788653d99541c646c561c9dd26506f25c0cebfe810659c54c6d7" dependencies = [ "downcast-rs", - "libm 0.2.7", + "libm", "memory_units", "num-rational 0.4.1", "num-traits", @@ -9643,7 +10006,7 @@ version = "0.89.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ab5d3e08b13876f96dd55608d03cd4883a0545884932d5adf11925876c96daef" dependencies = [ - "indexmap", + "indexmap 1.9.3", ] [[package]] @@ -9655,7 +10018,7 @@ dependencies = [ "anyhow", "bincode", "cfg-if", - "indexmap", + "indexmap 1.9.3", "libc", "log", "object 0.29.0", @@ -9695,7 +10058,7 @@ dependencies = [ "directories-next", "file-per-thread-logger", "log", - "rustix 0.35.14", + "rustix 0.35.16", "serde", "sha2 0.9.9", "toml", @@ -9733,7 +10096,7 @@ dependencies = [ "anyhow", "cranelift-entity", "gimli 0.26.2", - "indexmap", + "indexmap 1.9.3", "log", "object 0.29.0", "serde", @@ -9758,7 +10121,7 @@ dependencies = [ "log", "object 0.29.0", "rustc-demangle", - "rustix 0.35.14", + "rustix 0.35.16", "serde", "target-lexicon", "thiserror", @@ -9776,7 +10139,7 @@ checksum = "f671b588486f5ccec8c5a3dba6b4c07eac2e66ab8c60e6f4e53717c77f709731" dependencies = [ "object 0.29.0", "once_cell", - "rustix 0.35.14", + "rustix 0.35.16", ] [[package]] @@ -9788,7 +10151,7 @@ dependencies = [ "anyhow", "cc", "cfg-if", - "indexmap", + "indexmap 1.9.3", "libc", "log", "mach", @@ -9796,7 +10159,7 @@ dependencies = [ "memoffset 0.6.5", "paste", "rand 0.8.5", - "rustix 0.35.14", + "rustix 0.35.16", "thiserror", "wasmtime-asm-macros", "wasmtime-environ", @@ -9818,9 +10181,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.64" +version = "0.3.65" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b85cbef8c220a6abc02aefd892dfc0fc23afb1c6a426316ec33253a3877249b" +checksum = "5db499c5f66323272151db0e666cd34f78617522fb0c1604d31a27c50c206a85" dependencies = [ "js-sys", "wasm-bindgen", @@ -9828,12 +10191,12 @@ dependencies = [ [[package]] name = "webpki" -version = "0.22.0" +version = "0.22.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f095d78192e208183081cc07bc5515ef55216397af48b873e5edcd72637fa1bd" +checksum = "ed63aea5ce73d0ff405984102c42de94fc55a6b75765d621c65262469b3c9b53" dependencies = [ - "ring", - "untrusted", + "ring 0.17.5", + "untrusted 0.9.0", ] [[package]] @@ -9847,13 +10210,14 @@ dependencies = [ [[package]] name = "which" -version = "4.4.0" +version = "4.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2441c784c52b289a054b7201fc93253e288f094e2f4be9058343127c4226a269" +checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" dependencies = [ "either", - "libc", + "home", "once_cell", + "rustix 0.38.21", ] [[package]] @@ -9880,9 +10244,9 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" +checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" dependencies = [ "winapi", ] @@ -9907,10 +10271,10 @@ dependencies = [ ] [[package]] -name = "windows" -version = "0.48.0" +name = "windows-core" +version = "0.51.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" +checksum = "f1f8cf84f35d2db49a46868f947758c7a1138116f7fac3bc844f43ade1292e64" dependencies = [ "windows-targets", ] @@ -9954,17 +10318,17 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.48.1" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05d4b17490f70499f20b9e791dcf6a299785ce8af4d709018206dc5b4953e95f" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" dependencies = [ - "windows_aarch64_gnullvm 0.48.0", - "windows_aarch64_msvc 0.48.0", - "windows_i686_gnu 0.48.0", - "windows_i686_msvc 0.48.0", - "windows_x86_64_gnu 0.48.0", - "windows_x86_64_gnullvm 0.48.0", - "windows_x86_64_msvc 0.48.0", + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", ] [[package]] @@ -9975,9 +10339,9 @@ checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_msvc" @@ -9999,9 +10363,9 @@ checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" [[package]] name = "windows_aarch64_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_i686_gnu" @@ -10023,9 +10387,9 @@ checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" [[package]] name = "windows_i686_gnu" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_msvc" @@ -10047,9 +10411,9 @@ checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" [[package]] name = "windows_i686_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_x86_64_gnu" @@ -10071,9 +10435,9 @@ checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" [[package]] name = "windows_x86_64_gnu" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnullvm" @@ -10083,9 +10447,9 @@ checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" [[package]] name = "windows_x86_64_gnullvm" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_msvc" @@ -10107,9 +10471,9 @@ checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" [[package]] name = "windows_x86_64_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "winreg" @@ -10172,7 +10536,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.39", ] [[package]] @@ -10196,11 +10560,10 @@ dependencies = [ [[package]] name = "zstd-sys" -version = "2.0.8+zstd.1.5.5" +version = "2.0.9+zstd.1.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5556e6ee25d32df2586c098bbfa278803692a20d0ab9565e049480d52707ec8c" +checksum = "9e16efa8a874a0481a574084d34cc26fdb3b99627480f785888deb6386506656" dependencies = [ "cc", - "libc", "pkg-config", ] diff --git a/Cargo.toml b/Cargo.toml index 507d6de32..3a3d40475 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,10 +11,10 @@ license = "GPL-3.0-or-later WITH Classpath-exception-2.0" [dependencies] cere-cli = { path = "cli", features = ["cere-dev-native"] } -sc-cli = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } +sc-cli = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } [build-dependencies] -substrate-build-script-utils = { version = "3.0.0", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +substrate-build-script-utils = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } [workspace] members = [ @@ -33,6 +33,7 @@ members = [ "pallets/ddc-customers", "pallets/ddc-nodes", "pallets/ddc-clusters", + "pallets/ddc-payouts", "primitives", ] diff --git a/cli/Cargo.toml b/cli/Cargo.toml index 0b4896103..762d78c79 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -12,11 +12,11 @@ wasm-opt = false crate-type = ["cdylib", "rlib"] [dependencies] -clap = { version = "4.0.9", features = ["derive"], optional = true } -frame-benchmarking-cli = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate", optional = true, branch = "polkadot-v0.9.31" } -sc-cli = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate", optional = true, branch = "polkadot-v0.9.31" } -sc-service = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate", optional = true, branch = "polkadot-v0.9.31" } -try-runtime-cli = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate", optional = true, branch = "polkadot-v0.9.31" } +clap = { version = "3.1", features = ["derive"], optional = true } +frame-benchmarking-cli = { git = "https://github.com/paritytech/substrate.git", optional = true, branch = "polkadot-v0.9.31" } +sc-cli = { git = "https://github.com/paritytech/substrate.git", optional = true, branch = "polkadot-v0.9.31" } +sc-service = { git = "https://github.com/paritytech/substrate.git", optional = true, branch = "polkadot-v0.9.31" } +try-runtime-cli = { git = "https://github.com/paritytech/substrate.git", optional = true, branch = "polkadot-v0.9.31" } url = "2.4.1" # Local @@ -24,7 +24,7 @@ cere-client = { path = "../node/client", optional = true } cere-service = { path = "../node/service", default-features = false, optional = true } [build-dependencies] -substrate-build-script-utils = { version = "3.0.0", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } +substrate-build-script-utils = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } [features] default = ["cli", "cere-native"] diff --git a/node/client/Cargo.toml b/node/client/Cargo.toml index 5d49fa6e2..7cbb0216d 100644 --- a/node/client/Cargo.toml +++ b/node/client/Cargo.toml @@ -4,29 +4,30 @@ version = "4.8.1" edition = "2021" [dependencies] -frame-benchmarking = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -frame-system = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -frame-system-rpc-runtime-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -node-primitives = { version = "2.0.0", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -pallet-transaction-payment = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -pallet-transaction-payment-rpc-runtime-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -sc-client-api = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -sc-executor = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } -sc-service = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.31" } -sp-api = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -sp-authority-discovery = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -sp-block-builder = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } -sp-blockchain = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -sp-consensus = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -sp-consensus-babe = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -sp-finality-grandpa = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -sp-inherents = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -sp-offchain = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -sp-runtime = { version = "6.0.0", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -sp-session = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -sp-storage = { version = "6.0.0", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } -sp-timestamp = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -sp-transaction-pool = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +frame-benchmarking = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +frame-system = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +frame-system-rpc-runtime-api = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +node-primitives = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +pallet-contracts-rpc = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +pallet-transaction-payment = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +pallet-transaction-payment-rpc-runtime-api = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sc-client-api = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sc-executor = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sc-service = { git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "polkadot-v0.9.31" } +sp-api = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sp-authority-discovery = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sp-block-builder = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sp-blockchain = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sp-consensus = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sp-consensus-babe = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sp-finality-grandpa = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sp-inherents = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sp-offchain = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sp-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sp-session = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sp-storage = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sp-timestamp = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sp-transaction-pool = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } # Local cere-dev-runtime = { path = "../../runtime/cere-dev", optional = true } diff --git a/node/service/Cargo.toml b/node/service/Cargo.toml index 3e3b48d76..6faa48c9a 100644 --- a/node/service/Cargo.toml +++ b/node/service/Cargo.toml @@ -6,40 +6,39 @@ edition = "2021" [dependencies] futures = "0.3.21" jsonrpsee = { version = "0.15.1", features = ["server"] } +node-primitives = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +pallet-im-online = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } rand = "0.8" +sc-authority-discovery = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sc-basic-authorship = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sc-chain-spec = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sc-client-api = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sc-consensus = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sc-consensus-babe = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sc-consensus-slots = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sc-consensus-uncles = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sc-executor = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31", features = ["wasmtime"] } +sc-finality-grandpa = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sc-network = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sc-network-common = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sc-rpc = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sc-service = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31", features = ["wasmtime"] } +sc-sync-state-rpc = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sc-sysinfo = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sc-telemetry = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sc-transaction-pool = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } serde = { version = "1.0.136", features = ["derive"] } - -node-primitives = { version = "2.0.0", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -pallet-im-online = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -sc-authority-discovery = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -sc-basic-authorship = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -sc-chain-spec = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -sc-client-api = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -sc-consensus = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -sc-consensus-babe = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -sc-consensus-slots = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -sc-consensus-uncles = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -sc-executor = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31", features = ["wasmtime"] } -sc-finality-grandpa = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -sc-network = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -sc-network-common = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } -sc-rpc = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -sc-service = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31", features = ["wasmtime"] } -sc-sync-state-rpc = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -sc-sysinfo = { version = "6.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -sc-telemetry = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -sc-transaction-pool = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -sp-api = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -sp-authority-discovery = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -sp-authorship = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -sp-blockchain = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -sp-consensus-babe = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -sp-core = { version = "6.0.0", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -sp-finality-grandpa = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -sp-runtime = { version = "6.0.0", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -sp-timestamp = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -sp-transaction-storage-proof = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -sp-trie = { version = "6.0.0", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } +sp-api = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sp-authority-discovery = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sp-authorship = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sp-blockchain = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sp-consensus-babe = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sp-core = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sp-finality-grandpa = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sp-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sp-timestamp = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sp-transaction-storage-proof = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sp-trie = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } # Local cere-client = { path = "../client", default-features = false, optional = true } diff --git a/pallets/chainbridge/Cargo.toml b/pallets/chainbridge/Cargo.toml index 292b8adbd..4e14c525e 100644 --- a/pallets/chainbridge/Cargo.toml +++ b/pallets/chainbridge/Cargo.toml @@ -14,14 +14,14 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false } -frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -pallet-balances = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +pallet-balances = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } -sp-core = { version = "6.0.0", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -sp-io = { version = "6.0.0", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -sp-runtime = { version = "6.0.0", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -sp-std = { version = "4.0.0", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } [features] default = ["std"] diff --git a/pallets/ddc-clusters/Cargo.toml b/pallets/ddc-clusters/Cargo.toml index 6b75d089c..d8e456738 100644 --- a/pallets/ddc-clusters/Cargo.toml +++ b/pallets/ddc-clusters/Cargo.toml @@ -7,18 +7,24 @@ edition = "2021" codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false, features = ["derive"] } ddc-primitives = { version = "0.1.0", default-features = false, path = "../../primitives" } ddc-traits = { version = "0.1.0", default-features = false, path = "../../traits" } -frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -pallet-contracts = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +hex = { version = "0.4", default-features = false } +hex-literal = "^0.3.1" +pallet-contracts = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } pallet-ddc-nodes = { version = "4.7.0", default-features = false, path = "../ddc-nodes" } scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } -sp-runtime = { version = "6.0.0", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -sp-std = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } [dev-dependencies] -sp-core = { version = "6.0.0", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -sp-tracing = { version = "5.0.0", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -substrate-test-utils = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +pallet-balances = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +pallet-randomness-collective-flip = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +pallet-timestamp = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sp-core = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sp-tracing = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +substrate-test-utils = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } [features] default = ["std"] diff --git a/pallets/ddc-clusters/src/lib.rs b/pallets/ddc-clusters/src/lib.rs index 4c52afd96..c7786861b 100644 --- a/pallets/ddc-clusters/src/lib.rs +++ b/pallets/ddc-clusters/src/lib.rs @@ -15,11 +15,16 @@ #![recursion_limit = "256"] #![feature(is_some_and)] // ToDo: delete at rustc > 1.70 +#[cfg(test)] +pub(crate) mod mock; +#[cfg(test)] +mod tests; + use crate::{ cluster::{Cluster, ClusterGovParams, ClusterParams}, node_provider_auth::{NodeProviderAuthContract, NodeProviderAuthContractError}, }; -use ddc_primitives::{ClusterId, NodePubKey, NodeType}; +use ddc_primitives::{ClusterId, ClusterPricingParams, NodePubKey, NodeType}; use ddc_traits::{ cluster::{ClusterVisitor, ClusterVisitorError}, staking::{StakingVisitor, StakingVisitorError}, @@ -266,6 +271,19 @@ pub mod pallet { } } + fn get_pricing_params( + cluster_id: &ClusterId, + ) -> Result { + let cluster_gov_params = ClustersGovParams::::try_get(cluster_id) + .map_err(|_| ClusterVisitorError::ClusterGovParamsNotSet)?; + Ok(ClusterPricingParams { + unit_per_mb_stored: cluster_gov_params.unit_per_mb_stored, + unit_per_mb_streamed: cluster_gov_params.unit_per_mb_streamed, + unit_per_put_request: cluster_gov_params.unit_per_put_request, + unit_per_get_request: cluster_gov_params.unit_per_get_request, + }) + } + fn get_chill_delay( cluster_id: &ClusterId, node_type: NodeType, diff --git a/pallets/ddc-clusters/src/mock.rs b/pallets/ddc-clusters/src/mock.rs new file mode 100644 index 000000000..b6c2e4fd2 --- /dev/null +++ b/pallets/ddc-clusters/src/mock.rs @@ -0,0 +1,232 @@ +//! Test utilities + +#![allow(dead_code)] + +use crate::{self as pallet_ddc_clusters, *}; +use ddc_primitives::{ClusterId, NodePubKey}; +use ddc_traits::staking::{StakingVisitor, StakingVisitorError}; +use frame_support::{ + construct_runtime, parameter_types, + traits::{ConstU32, ConstU64, Everything, Nothing}, + weights::constants::RocksDbWeight, +}; +use frame_system::mocking::{MockBlock, MockUncheckedExtrinsic}; +use pallet_contracts as contracts; +use sp_core::H256; +use sp_io::TestExternalities; +use sp_runtime::{ + testing::{Header, TestXt}, + traits::{ + BlakeTwo256, Convert, Extrinsic as ExtrinsicT, IdentifyAccount, IdentityLookup, Verify, + }, + MultiSignature, +}; + +/// The AccountId alias in this test module. +pub type AccountId = <::Signer as IdentifyAccount>::AccountId; +pub(crate) type AccountIndex = u64; +pub(crate) type BlockNumber = u64; +pub(crate) type Balance = u128; + +pub type Signature = MultiSignature; +type UncheckedExtrinsic = MockUncheckedExtrinsic; +type Block = MockBlock; + +construct_runtime!( + pub enum Test where + Block = Block, + NodeBlock = Block, + UncheckedExtrinsic = UncheckedExtrinsic, + { + Contracts: contracts::{Pallet, Call, Storage, Event}, + System: frame_system::{Pallet, Call, Config, Storage, Event}, + Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent}, + Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, + DdcNodes: pallet_ddc_nodes::{Pallet, Call, Storage, Event}, + DdcClusters: pallet_ddc_clusters::{Pallet, Call, Storage, Event}, + Randomness: pallet_randomness_collective_flip::{Pallet, Storage}, + } +); + +parameter_types! { + pub const DepositPerItem: Balance = 0; + pub const DepositPerByte: Balance = 0; + pub const SignedClaimHandicap: BlockNumber = 2; + pub const TombstoneDeposit: Balance = 16; + pub const StorageSizeOffset: u32 = 8; + pub const RentByteFee: Balance = 4; + pub const RentDepositOffset: Balance = 10_000; + pub const SurchargeReward: Balance = 150; + pub const MaxDepth: u32 = 100; + pub const MaxValueSize: u32 = 16_384; + pub Schedule: pallet_contracts::Schedule = Default::default(); +} + +impl Convert> for Test { + fn convert(w: Weight) -> BalanceOf { + w.ref_time().into() + } +} + +use contracts::Config as contractsConfig; + +type BalanceOf = + <::Currency as Currency<::AccountId>>::Balance; + +impl contracts::Config for Test { + type Time = Timestamp; + type Randomness = Randomness; + type Currency = Balances; + type RuntimeEvent = RuntimeEvent; + type CallStack = [pallet_contracts::Frame; 31]; + type WeightPrice = Self; //pallet_transaction_payment::Module; + type WeightInfo = (); + type ChainExtension = (); + type DeletionQueueDepth = (); + type DeletionWeightLimit = (); + type Schedule = Schedule; + type RuntimeCall = RuntimeCall; + type CallFilter = Nothing; + type DepositPerByte = DepositPerByte; + type DepositPerItem = DepositPerItem; + type AddressGenerator = pallet_contracts::DefaultAddressGenerator; + type ContractAccessWeight = (); + type MaxCodeLen = ConstU32<{ 128 * 1024 }>; + type MaxStorageKeyLen = ConstU32<128>; +} + +use frame_system::offchain::{ + AppCrypto, CreateSignedTransaction, SendTransactionTypes, SigningTypes, +}; + +pub type Extrinsic = TestXt; + +impl SigningTypes for Test { + type Public = ::Signer; + type Signature = Signature; +} + +impl SendTransactionTypes for Test +where + RuntimeCall: From, +{ + type OverarchingCall = RuntimeCall; + type Extrinsic = Extrinsic; +} +impl pallet_randomness_collective_flip::Config for Test {} + +impl CreateSignedTransaction for Test +where + RuntimeCall: From, +{ + fn create_transaction>( + call: RuntimeCall, + _public: ::Signer, + _account: AccountId, + nonce: u64, + ) -> Option<(RuntimeCall, ::SignaturePayload)> { + Some((call, (nonce, ()))) + } +} + +parameter_types! { + pub static ExistentialDeposit: Balance = 1; +} + +impl frame_system::Config for Test { + type BaseCallFilter = Everything; + type BlockWeights = (); + type BlockLength = (); + type DbWeight = RocksDbWeight; + type RuntimeOrigin = RuntimeOrigin; + type Index = AccountIndex; + type BlockNumber = BlockNumber; + type RuntimeCall = RuntimeCall; + type Hash = H256; + type Hashing = BlakeTwo256; + type AccountId = AccountId; + type Lookup = IdentityLookup; + type Header = Header; + type RuntimeEvent = RuntimeEvent; + type BlockHashCount = ConstU64<250>; + type Version = (); + type PalletInfo = PalletInfo; + type AccountData = pallet_balances::AccountData; + type OnNewAccount = (); + type OnKilledAccount = (); + type SystemWeightInfo = (); + type SS58Prefix = (); + type OnSetCode = (); + type MaxConsumers = ConstU32<16>; +} + +impl pallet_balances::Config for Test { + type MaxLocks = ConstU32<1024>; + type MaxReserves = (); + type ReserveIdentifier = [u8; 8]; + type Balance = Balance; + type RuntimeEvent = RuntimeEvent; + type DustRemoval = (); + type ExistentialDeposit = ExistentialDeposit; + type AccountStore = System; + type WeightInfo = (); +} + +impl pallet_timestamp::Config for Test { + type Moment = u64; + type OnTimestampSet = (); + type MinimumPeriod = ConstU64<5>; + type WeightInfo = (); +} + +impl pallet_ddc_nodes::Config for Test { + type RuntimeEvent = RuntimeEvent; +} + +impl crate::pallet::Config for Test { + type RuntimeEvent = RuntimeEvent; + type Currency = Balances; + type NodeRepository = DdcNodes; + type StakingVisitor = TestStakingVisitor; +} + +pub(crate) type DdcStakingCall = crate::Call; +pub(crate) type TestRuntimeCall = ::RuntimeCall; +pub struct TestStakingVisitor; +impl StakingVisitor for TestStakingVisitor { + fn node_has_stake( + _node_pub_key: &NodePubKey, + _cluster_id: &ClusterId, + ) -> Result { + Ok(true) + } + fn node_is_chilling(_node_pub_key: &NodePubKey) -> Result { + Ok(false) + } +} + +pub struct ExtBuilder; + +impl ExtBuilder { + fn build(self) -> TestExternalities { + sp_tracing::try_init_simple(); + let mut storage = frame_system::GenesisConfig::default().build_storage::().unwrap(); + + let _ = pallet_balances::GenesisConfig:: { + balances: vec![ + (AccountId::from([1; 32]), 100), + (AccountId::from([2; 32]), 100), + (AccountId::from([3; 32]), 100), + (AccountId::from([4; 32]), 100), + ], + } + .assimilate_storage(&mut storage); + + TestExternalities::new(storage) + } + pub fn build_and_execute(self, test: impl FnOnce()) { + sp_tracing::try_init_simple(); + let mut ext = self.build(); + ext.execute_with(test); + } +} diff --git a/pallets/ddc-clusters/src/test_data/metadata.json b/pallets/ddc-clusters/src/test_data/metadata.json new file mode 100644 index 000000000..4ffe526d6 --- /dev/null +++ b/pallets/ddc-clusters/src/test_data/metadata.json @@ -0,0 +1,365 @@ +{ + "source": { + "hash": "0x26d3338336a945f457e19992f37947659b0b7e4b2962369fe2f97ca7ebb95a09", + "language": "ink! 3.4.0", + "compiler": "rustc 1.69.0-nightly" + }, + "contract": { + "name": "node_provider_auth_white_list", + "version": "0.1.0", + "authors": [ + "Yahor Tsaryk " + ], + "description": "Node provider authorization layer based on admin approval", + "license": "Apache-2.0" + }, + "V3": { + "spec": { + "constructors": [ + { + "args": [], + "docs": [], + "label": "new", + "payable": false, + "selector": "0x9bae9d5e" + } + ], + "docs": [], + "events": [], + "messages": [ + { + "args": [ + { + "label": "_node_provider", + "type": { + "displayName": [ + "AccountId" + ], + "type": 0 + } + }, + { + "label": "node_pub_key", + "type": { + "displayName": [ + "NodePubKey" + ], + "type": 4 + } + }, + { + "label": "_node_variant", + "type": { + "displayName": [ + "NodeType" + ], + "type": 2 + } + } + ], + "docs": [], + "label": "is_authorized", + "mutates": false, + "payable": false, + "returnType": { + "displayName": [ + "bool" + ], + "type": 5 + }, + "selector": "0x96b0453e" + }, + { + "args": [ + { + "label": "node_pub_key", + "type": { + "displayName": [ + "NodePubKey" + ], + "type": 4 + } + } + ], + "docs": [], + "label": "add_node_pub_key", + "mutates": true, + "payable": false, + "returnType": { + "displayName": [ + "Result" + ], + "type": 7 + }, + "selector": "0x7a04093d" + }, + { + "args": [ + { + "label": "node_pub_key", + "type": { + "displayName": [ + "NodePubKey" + ], + "type": 4 + } + } + ], + "docs": [], + "label": "remove_node_pub_key", + "mutates": true, + "payable": false, + "returnType": { + "displayName": [ + "Result" + ], + "type": 7 + }, + "selector": "0xed3668b6" + }, + { + "args": [ + { + "label": "node_pub_key", + "type": { + "displayName": [ + "NodePubKey" + ], + "type": 4 + } + } + ], + "docs": [], + "label": "has_node_pub_key", + "mutates": false, + "payable": false, + "returnType": { + "displayName": [ + "bool" + ], + "type": 5 + }, + "selector": "0x9b868ecf" + }, + { + "args": [], + "docs": [], + "label": "get_admin", + "mutates": false, + "payable": false, + "returnType": { + "displayName": [ + "AccountId" + ], + "type": 0 + }, + "selector": "0x57b8a8a7" + } + ] + }, + "storage": { + "struct": { + "fields": [ + { + "layout": { + "cell": { + "key": "0x0000000000000000000000000000000000000000000000000000000000000000", + "ty": 0 + } + }, + "name": "admin" + }, + { + "layout": { + "cell": { + "key": "0x0100000000000000000000000000000000000000000000000000000000000000", + "ty": 3 + } + }, + "name": "list" + } + ] + } + }, + "types": [ + { + "id": 0, + "type": { + "def": { + "composite": { + "fields": [ + { + "type": 1, + "typeName": "[u8; 32]" + } + ] + } + }, + "path": [ + "ink_env", + "types", + "AccountId" + ] + } + }, + { + "id": 1, + "type": { + "def": { + "array": { + "len": 32, + "type": 2 + } + } + } + }, + { + "id": 2, + "type": { + "def": { + "primitive": "u8" + } + } + }, + { + "id": 3, + "type": { + "def": { + "composite": { + "fields": [ + { + "name": "offset_key", + "type": 6, + "typeName": "Key" + } + ] + } + }, + "params": [ + { + "name": "K", + "type": 4 + }, + { + "name": "V", + "type": 5 + } + ], + "path": [ + "ink_storage", + "lazy", + "mapping", + "Mapping" + ] + } + }, + { + "id": 4, + "type": { + "def": { + "sequence": { + "type": 2 + } + } + } + }, + { + "id": 5, + "type": { + "def": { + "primitive": "bool" + } + } + }, + { + "id": 6, + "type": { + "def": { + "composite": { + "fields": [ + { + "type": 1, + "typeName": "[u8; 32]" + } + ] + } + }, + "path": [ + "ink_primitives", + "Key" + ] + } + }, + { + "id": 7, + "type": { + "def": { + "variant": { + "variants": [ + { + "fields": [ + { + "type": 8 + } + ], + "index": 0, + "name": "Ok" + }, + { + "fields": [ + { + "type": 9 + } + ], + "index": 1, + "name": "Err" + } + ] + } + }, + "params": [ + { + "name": "T", + "type": 8 + }, + { + "name": "E", + "type": 9 + } + ], + "path": [ + "Result" + ] + } + }, + { + "id": 8, + "type": { + "def": { + "tuple": [] + } + } + }, + { + "id": 9, + "type": { + "def": { + "variant": { + "variants": [ + { + "index": 0, + "name": "OnlyAdmin" + } + ] + } + }, + "path": [ + "node_provider_auth_white_list", + "node_provider_auth_white_list", + "Error" + ] + } + } + ] + } +} \ No newline at end of file diff --git a/pallets/ddc-clusters/src/test_data/node_provider_auth_white_list.wasm b/pallets/ddc-clusters/src/test_data/node_provider_auth_white_list.wasm new file mode 100644 index 000000000..39d305f7f Binary files /dev/null and b/pallets/ddc-clusters/src/test_data/node_provider_auth_white_list.wasm differ diff --git a/pallets/ddc-clusters/src/tests.rs b/pallets/ddc-clusters/src/tests.rs new file mode 100644 index 000000000..922ad7a7a --- /dev/null +++ b/pallets/ddc-clusters/src/tests.rs @@ -0,0 +1,412 @@ +//! Tests for the module. + +use super::{mock::*, *}; +use ddc_primitives::{ClusterId, NodePubKey}; +use frame_support::{assert_noop, assert_ok, error::BadOrigin}; +use frame_system::Config; +use hex_literal::hex; +use pallet_ddc_nodes::{CDNNodeParams, NodeParams}; +use sp_runtime::{traits::Hash, AccountId32, Perbill}; + +#[test] +fn create_cluster_works() { + ExtBuilder.build_and_execute(|| { + System::set_block_number(1); + + let cluster_gov_params = ClusterGovParams { + treasury_share: Perbill::from_float(0.05), + validators_share: Perbill::from_float(0.01), + cluster_reserve_share: Perbill::from_float(0.02), + cdn_bond_size: 100, + cdn_chill_delay: 50, + cdn_unbonding_delay: 50, + storage_bond_size: 100, + storage_chill_delay: 50, + storage_unbonding_delay: 50, + unit_per_mb_stored: 10, + unit_per_mb_streamed: 10, + unit_per_put_request: 10, + unit_per_get_request: 10, + }; + + // Creating cluster not with root signature should fail + assert_noop!( + DdcClusters::create_cluster( + RuntimeOrigin::signed(AccountId::from([1; 32])), + ClusterId::from([1; 20]), + AccountId::from([1; 32]), + AccountId::from([2; 32]), + ClusterParams { node_provider_auth_contract: AccountId::from([1; 32]) }, + cluster_gov_params.clone() + ), + BadOrigin + ); + + // Creating 1 cluster should work fine + assert_ok!(DdcClusters::create_cluster( + RuntimeOrigin::root(), + ClusterId::from([1; 20]), + AccountId::from([1; 32]), + AccountId::from([2; 32]), + ClusterParams { node_provider_auth_contract: AccountId::from([1; 32]) }, + cluster_gov_params.clone() + )); + + // Creating cluster with same id should fail + assert_noop!( + DdcClusters::create_cluster( + RuntimeOrigin::root(), + ClusterId::from([1; 20]), + AccountId::from([1; 32]), + AccountId::from([2; 32]), + ClusterParams { node_provider_auth_contract: AccountId::from([1; 32]) }, + cluster_gov_params + ), + Error::::ClusterAlreadyExists + ); + + // Checking that event was emitted + assert_eq!(System::events().len(), 1); + System::assert_last_event( + Event::ClusterCreated { cluster_id: ClusterId::from([1; 20]) }.into(), + ) + }) +} + +#[test] +fn add_and_delete_node_works() { + ExtBuilder.build_and_execute(|| { + System::set_block_number(1); + + let contract_id = deploy_contract(); + + // Cluster doesn't exist + assert_noop!( + DdcClusters::add_node( + RuntimeOrigin::signed(AccountId::from([2; 32])), + ClusterId::from([1; 20]), + NodePubKey::CDNPubKey(AccountId::from([4; 32])), + ), + Error::::ClusterDoesNotExist + ); + + // Creating 1 cluster should work fine + assert_ok!(DdcClusters::create_cluster( + RuntimeOrigin::root(), + ClusterId::from([1; 20]), + AccountId::from([1; 32]), + AccountId::from([2; 32]), + ClusterParams { node_provider_auth_contract: AccountId::from([1; 32]) }, + ClusterGovParams { + treasury_share: Perbill::from_float(0.05), + validators_share: Perbill::from_float(0.01), + cluster_reserve_share: Perbill::from_float(0.02), + cdn_bond_size: 100, + cdn_chill_delay: 50, + cdn_unbonding_delay: 50, + storage_bond_size: 100, + storage_chill_delay: 50, + storage_unbonding_delay: 50, + unit_per_mb_stored: 10, + unit_per_mb_streamed: 10, + unit_per_put_request: 10, + unit_per_get_request: 10, + } + )); + + // Not Cluster Manager + assert_noop!( + DdcClusters::add_node( + RuntimeOrigin::signed(AccountId::from([2; 32])), + ClusterId::from([1; 20]), + NodePubKey::CDNPubKey(AccountId::from([4; 32])), + ), + Error::::OnlyClusterManager + ); + + // Node doesn't exist + assert_noop!( + DdcClusters::add_node( + RuntimeOrigin::signed(AccountId::from([1; 32])), + ClusterId::from([1; 20]), + NodePubKey::CDNPubKey(AccountId::from([4; 32])), + ), + Error::::AttemptToAddNonExistentNode + ); + + // Create node + let bytes = [4u8; 32]; + let node_pub_key = AccountId32::from(bytes); + + let cdn_node_params = CDNNodeParams { + host: vec![1u8, 255], + http_port: 35000u16, + grpc_port: 25000u16, + p2p_port: 15000u16, + }; + + // Node created + assert_ok!(DdcNodes::create_node( + RuntimeOrigin::signed(AccountId::from([1; 32])), + NodePubKey::CDNPubKey(node_pub_key), + NodeParams::CDNParams(cdn_node_params) + )); + + // Node doesn't exist + assert_noop!( + DdcClusters::add_node( + RuntimeOrigin::signed(AccountId::from([1; 32])), + ClusterId::from([1; 20]), + NodePubKey::CDNPubKey(AccountId::from([4; 32])), + ), + Error::::NodeAuthContractCallFailed + ); + + // Set the correct address for auth contract + assert_ok!(DdcClusters::set_cluster_params( + RuntimeOrigin::signed(AccountId::from([1; 32])), + ClusterId::from([1; 20]), + cluster::ClusterParams { node_provider_auth_contract: contract_id }, + )); + + // Node doesn't exist + assert_ok!(DdcClusters::add_node( + RuntimeOrigin::signed(AccountId::from([1; 32])), + ClusterId::from([1; 20]), + NodePubKey::CDNPubKey(AccountId::from([4; 32])), + )); + + // Node already assigned + assert_noop!( + DdcClusters::add_node( + RuntimeOrigin::signed(AccountId::from([1; 32])), + ClusterId::from([1; 20]), + NodePubKey::CDNPubKey(AccountId::from([4; 32])), + ), + Error::::NodeIsAlreadyAssigned + ); + + // Checking that event was emitted + System::assert_last_event( + Event::ClusterNodeAdded { + cluster_id: ClusterId::from([1; 20]), + node_pub_key: NodePubKey::CDNPubKey(AccountId::from([4; 32])), + } + .into(), + ); + + // Remove node + assert_ok!(DdcClusters::remove_node( + RuntimeOrigin::signed(AccountId::from([1; 32])), + ClusterId::from([1; 20]), + NodePubKey::CDNPubKey(AccountId::from([4; 32])), + )); + + // Checking that event was emitted + System::assert_last_event( + Event::ClusterNodeRemoved { + cluster_id: ClusterId::from([1; 20]), + node_pub_key: NodePubKey::CDNPubKey(AccountId::from([4; 32])), + } + .into(), + ); + + // Remove node should fail + assert_noop!( + DdcClusters::remove_node( + RuntimeOrigin::signed(AccountId::from([1; 32])), + ClusterId::from([1; 20]), + NodePubKey::CDNPubKey(AccountId::from([4; 32])), + ), + Error::::NodeIsNotAssigned + ); + + pub const CTOR_SELECTOR: [u8; 4] = hex!("9bae9d5e"); + + fn encode_constructor() -> Vec { + let mut call_data = CTOR_SELECTOR.to_vec(); + let x = 0_u128; + for _ in 0..9 { + x.encode_to(&mut call_data); + } + call_data + } + + fn deploy_contract() -> AccountId { + // Admin account who deploys the contract. + let alice = AccountId::from([1; 32]); + let _ = Balances::deposit_creating(&alice, 1_000_000_000_000); + + // Load the contract code. + let wasm = &include_bytes!("./test_data/node_provider_auth_white_list.wasm")[..]; + let wasm_hash = ::Hashing::hash(wasm); + let contract_args = encode_constructor(); + + // Deploy the contract. + const GAS_LIMIT: frame_support::weights::Weight = + Weight::from_ref_time(100_000_000_000); + const ENDOWMENT: Balance = 0; + Contracts::instantiate_with_code( + RuntimeOrigin::signed(alice.clone()), + ENDOWMENT, + GAS_LIMIT, + None, + wasm.to_vec(), + contract_args, + vec![], + ) + .unwrap(); + + // Configure worker with the contract address. + let contract_id = Contracts::contract_address(&alice, &wasm_hash, &[]); + + pub const ADD_DDC_NODE_SELECTOR: [u8; 4] = hex!("7a04093d"); + let node_pub_key = NodePubKey::CDNPubKey(AccountId::from([4; 32])); + + let call_data = { + // is_authorized(node_provider: AccountId, node: Vec, node_variant: u8) -> bool + let args: ([u8; 4], Vec) = + (ADD_DDC_NODE_SELECTOR, node_pub_key.encode()[1..].to_vec()); + args.encode() + }; + + let results = Contracts::call( + RuntimeOrigin::signed(alice), + contract_id.clone(), + 0, + Weight::from_ref_time(1_000_000_000_000), + None, + call_data, + ); + + results.unwrap(); + + contract_id + } + }) +} + +#[test] +fn set_cluster_params_works() { + ExtBuilder.build_and_execute(|| { + System::set_block_number(1); + + // Cluster doesn't exist + assert_noop!( + DdcClusters::set_cluster_params( + RuntimeOrigin::signed(AccountId::from([2; 32])), + ClusterId::from([2; 20]), + ClusterParams { node_provider_auth_contract: AccountId::from([2; 32]) }, + ), + Error::::ClusterDoesNotExist + ); + + // Creating 1 cluster should work fine + assert_ok!(DdcClusters::create_cluster( + RuntimeOrigin::root(), + ClusterId::from([1; 20]), + AccountId::from([1; 32]), + AccountId::from([2; 32]), + ClusterParams { node_provider_auth_contract: AccountId::from([1; 32]) }, + ClusterGovParams { + treasury_share: Perbill::from_float(0.05), + validators_share: Perbill::from_float(0.01), + cluster_reserve_share: Perbill::from_float(0.02), + cdn_bond_size: 100, + cdn_chill_delay: 50, + cdn_unbonding_delay: 50, + storage_bond_size: 100, + storage_chill_delay: 50, + storage_unbonding_delay: 50, + unit_per_mb_stored: 10, + unit_per_mb_streamed: 10, + unit_per_put_request: 10, + unit_per_get_request: 10, + } + )); + + assert_noop!( + DdcClusters::set_cluster_params( + RuntimeOrigin::signed(AccountId::from([2; 32])), + ClusterId::from([1; 20]), + ClusterParams { node_provider_auth_contract: AccountId::from([2; 32]) }, + ), + Error::::OnlyClusterManager + ); + + assert_ok!(DdcClusters::set_cluster_params( + RuntimeOrigin::signed(AccountId::from([1; 32])), + ClusterId::from([1; 20]), + ClusterParams { node_provider_auth_contract: AccountId::from([2; 32]) }, + )); + + // Checking that event was emitted + assert_eq!(System::events().len(), 2); + System::assert_last_event( + Event::ClusterParamsSet { cluster_id: ClusterId::from([1; 20]) }.into(), + ) + }) +} + +#[test] +fn set_cluster_gov_params_works() { + ExtBuilder.build_and_execute(|| { + System::set_block_number(1); + + let cluster_gov_params = ClusterGovParams { + treasury_share: Perbill::from_float(0.05), + validators_share: Perbill::from_float(0.01), + cluster_reserve_share: Perbill::from_float(0.02), + cdn_bond_size: 100, + cdn_chill_delay: 50, + cdn_unbonding_delay: 50, + storage_bond_size: 100, + storage_chill_delay: 50, + storage_unbonding_delay: 50, + unit_per_mb_stored: 10, + unit_per_mb_streamed: 10, + unit_per_put_request: 10, + unit_per_get_request: 10, + }; + + // Cluster doesn't exist + assert_noop!( + DdcClusters::set_cluster_gov_params( + RuntimeOrigin::root(), + ClusterId::from([2; 20]), + cluster_gov_params.clone() + ), + Error::::ClusterDoesNotExist + ); + + assert_ok!(DdcClusters::create_cluster( + RuntimeOrigin::root(), + ClusterId::from([1; 20]), + AccountId::from([1; 32]), + AccountId::from([2; 32]), + ClusterParams { node_provider_auth_contract: AccountId::from([1; 32]) }, + cluster_gov_params.clone() + )); + + assert_noop!( + DdcClusters::set_cluster_gov_params( + RuntimeOrigin::signed(AccountId::from([1; 32])), + ClusterId::from([1; 20]), + cluster_gov_params.clone() + ), + BadOrigin + ); + + assert_ok!(DdcClusters::set_cluster_gov_params( + RuntimeOrigin::root(), + ClusterId::from([1; 20]), + cluster_gov_params + )); + + // Checking that event was emitted + assert_eq!(System::events().len(), 2); + System::assert_last_event( + Event::ClusterGovParamsSet { cluster_id: ClusterId::from([1; 20]) }.into(), + ) + }) +} diff --git a/pallets/ddc-customers/Cargo.toml b/pallets/ddc-customers/Cargo.toml index ec6450574..1b85d24af 100644 --- a/pallets/ddc-customers/Cargo.toml +++ b/pallets/ddc-customers/Cargo.toml @@ -7,15 +7,20 @@ edition = "2021" codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } ddc-primitives = { version = "0.1.0", default-features = false, path = "../../primitives" } ddc-traits = { version = "0.1.0", default-features = false, path = "../../traits" } -frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } log = { version = "0.4.17", default-features = false } scale-info = { version = "2.1.1", default-features = false, features = ["derive"] } -sp-runtime = { version = "6.0.0", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -sp-std = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } [dev-dependencies] -substrate-test-utils = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +pallet-balances = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +pallet-timestamp = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sp-core = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sp-tracing = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +substrate-test-utils = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } [features] default = ["std"] diff --git a/pallets/ddc-customers/src/lib.rs b/pallets/ddc-customers/src/lib.rs index 22bc8526a..1263db707 100644 --- a/pallets/ddc-customers/src/lib.rs +++ b/pallets/ddc-customers/src/lib.rs @@ -1,11 +1,15 @@ #![cfg_attr(not(feature = "std"), no_std)] #![recursion_limit = "256"] -use codec::{Decode, Encode, HasCompact, MaxEncodedLen}; -use core::fmt::Debug; +#[cfg(test)] +pub(crate) mod mock; +#[cfg(test)] +mod tests; + +use codec::{Decode, Encode, HasCompact}; use ddc_primitives::{BucketId, ClusterId}; -use ddc_traits::cluster::ClusterVisitor; +use ddc_traits::{cluster::ClusterVisitor, customer::CustomerCharger}; use frame_support::{ parameter_types, traits::{Currency, DefensiveSaturating, ExistenceRequirement}, @@ -13,7 +17,7 @@ use frame_support::{ }; use scale_info::TypeInfo; use sp_runtime::{ - traits::{AccountIdConversion, AtLeast32BitUnsigned, Saturating, Zero}, + traits::{AccountIdConversion, AtLeast32BitUnsigned, CheckedAdd, CheckedSub, Saturating, Zero}, RuntimeDebug, SaturatedConversion, }; use sp_std::prelude::*; @@ -30,41 +34,33 @@ parameter_types! { } /// Just a Balance/BlockNumber tuple to encode when a chunk of funds will be unlocked. -#[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug, TypeInfo, MaxEncodedLen)] +#[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug, TypeInfo)] #[scale_info(skip_type_params(T))] -pub struct UnlockChunk -where - Balance: HasCompact + MaxEncodedLen, - BlockNumber: HasCompact + MaxEncodedLen, -{ +pub struct UnlockChunk { /// Amount of funds to be unlocked. #[codec(compact)] value: Balance, /// Block number at which point it'll be unlocked. #[codec(compact)] - block: BlockNumber, + block: T::BlockNumber, } -#[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug, TypeInfo, MaxEncodedLen)] +#[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug, TypeInfo)] pub struct Bucket { bucket_id: BucketId, owner_id: AccountId, cluster_id: ClusterId, } -#[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug, TypeInfo, MaxEncodedLen)] +#[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug, TypeInfo)] pub struct BucketsDetails { pub bucket_id: BucketId, pub amount: Balance, } -#[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug, TypeInfo, MaxEncodedLen)] +#[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug, TypeInfo)] #[scale_info(skip_type_params(T))] -pub struct AccountsLedger -where - Balance: HasCompact + MaxEncodedLen, - T: Config, -{ +pub struct AccountsLedger { /// The owner account whose balance is actually locked and can be used for CDN usage. pub owner: AccountId, /// The total amount of the owner's balance that we are currently accounting for. @@ -79,12 +75,12 @@ where /// (assuming that the content owner has to pay for network usage). It is assumed that this /// will be treated as a first in, first out queue where the new (higher value) eras get pushed /// on the back. - pub unlocking: BoundedVec, MaxUnlockingChunks>, + pub unlocking: BoundedVec, MaxUnlockingChunks>, } impl< AccountId, - Balance: HasCompact + Copy + Saturating + AtLeast32BitUnsigned + Zero + MaxEncodedLen + Debug, + Balance: HasCompact + Copy + Saturating + AtLeast32BitUnsigned + Zero, T: Config, > AccountsLedger { @@ -121,20 +117,28 @@ impl< /// Charge funds that were scheduled for unlocking. /// /// Returns the updated ledger, and the amount actually charged. - fn charge_unlocking(mut self, value: Balance) -> (Self, Balance) { + fn charge_unlocking(mut self, value: Balance) -> Result<(Self, Balance), Error> { let mut unlocking_balance = Balance::zero(); while let Some(last) = self.unlocking.last_mut() { - if unlocking_balance + last.value <= value { - unlocking_balance += last.value; - self.active -= last.value; + let temp = unlocking_balance + .checked_add(&last.value) + .ok_or(Error::::ArithmeticOverflow)?; + if temp <= value { + unlocking_balance = temp; + self.active = + self.active.checked_sub(&last.value).ok_or(Error::::ArithmeticUnderflow)?; self.unlocking.pop(); } else { - let diff = value - unlocking_balance; - - unlocking_balance += diff; - self.active -= diff; - last.value -= diff; + let diff = + value.checked_sub(&unlocking_balance).ok_or(Error::::ArithmeticUnderflow)?; + + unlocking_balance = + unlocking_balance.checked_add(&diff).ok_or(Error::::ArithmeticOverflow)?; + self.active = + self.active.checked_sub(&diff).ok_or(Error::::ArithmeticUnderflow)?; + last.value = + last.value.checked_sub(&diff).ok_or(Error::::ArithmeticUnderflow)?; } if unlocking_balance >= value { @@ -142,7 +146,7 @@ impl< } } - (self, unlocking_balance) + Ok((self, unlocking_balance)) } } @@ -173,13 +177,18 @@ pub mod pallet { /// Map from all (unlocked) "owner" accounts to the info regarding the staking. #[pallet::storage] #[pallet::getter(fn ledger)] - pub type Ledger = - StorageMap<_, Identity, T::AccountId, AccountsLedger, T>>; + pub type Ledger = StorageMap< + _, + Blake2_128Concat, + T::AccountId, + AccountsLedger, T>, + >; #[pallet::type_value] pub fn DefaultBucketCount() -> BucketId { 0 } + #[pallet::storage] #[pallet::getter(fn buckets_count)] pub type BucketsCount = @@ -200,12 +209,12 @@ pub mod pallet { /// it will not be emitted for staking rewards when they are added to stake. Deposited(T::AccountId, BalanceOf), /// An account has initiated unlock for amount. \[owner, amount\] - InitiatDepositUnlock(T::AccountId, BalanceOf), + InitialDepositUnlock(T::AccountId, BalanceOf), /// An account has called `withdraw_unlocked_deposit` and removed unlocking chunks worth /// `Balance` from the unlocking queue. \[owner, amount\] Withdrawn(T::AccountId, BalanceOf), - /// Total amount charged from all accounts to pay CDN nodes - Charged(BalanceOf), + /// The account has been charged for the usage + Charged(T::AccountId, BalanceOf), /// Bucket with specific id created BucketCreated(BucketId), } @@ -230,6 +239,12 @@ pub mod pallet { BucketDoesNotExist, /// DDC Cluster with provided id doesn't exist ClusterDoesNotExist, + // unauthorised operation + Unauthorised, + // Arithmetic overflow + ArithmeticOverflow, + // Arithmetic underflow + ArithmeticUnderflow, } #[pallet::genesis_config] @@ -261,7 +276,8 @@ pub mod pallet { #[pallet::weight(10_000)] pub fn create_bucket(origin: OriginFor, cluster_id: ClusterId) -> DispatchResult { let bucket_owner = ensure_signed(origin)?; - let cur_bucket_id = Self::buckets_count() + 1; + let cur_bucket_id = + Self::buckets_count().checked_add(1).ok_or(Error::::ArithmeticOverflow)?; ::ClusterVisitor::ensure_cluster(&cluster_id) .map_err(|_| Error::::ClusterDoesNotExist)?; @@ -332,8 +348,11 @@ pub mod pallet { let owner_balance = ::Currency::free_balance(&owner); let extra = owner_balance.min(max_additional); - ledger.total += extra; - ledger.active += extra; + ledger.total = + ledger.total.checked_add(&extra).ok_or(Error::::ArithmeticOverflow)?; + ledger.active = + ledger.active.checked_add(&extra).ok_or(Error::::ArithmeticOverflow)?; + // Last check: the new active amount of ledger must be more than ED. ensure!( ledger.active >= ::Currency::minimum_balance(), @@ -360,7 +379,7 @@ pub mod pallet { /// can co-exists at the same time. In that case, [`Call::withdraw_unlocked_deposit`] need /// to be called first to remove some of the chunks (if possible). /// - /// Emits `InitiatDepositUnlock`. + /// Emits `InitialDepositUnlock`. /// /// See also [`Call::withdraw_unlocked_deposit`]. #[pallet::weight(10_000)] @@ -378,18 +397,20 @@ pub mod pallet { let mut value = value.min(ledger.active); if !value.is_zero() { - ledger.active -= value; + ledger.active = + ledger.active.checked_sub(&value).ok_or(Error::::ArithmeticUnderflow)?; // Avoid there being a dust balance left in the accounts system. if ledger.active < ::Currency::minimum_balance() { - value += ledger.active; + value = + value.checked_add(&ledger.active).ok_or(Error::::ArithmeticOverflow)?; ledger.active = Zero::zero(); } let current_block = >::block_number(); // Note: locking for extra block to allow for accounting + // block + configurable value - shouldn't overflow let block = current_block + ::UnlockingDelay::get(); - log::debug!("Block for the unlock: {:?}", block); if let Some(chunk) = ledger.unlocking.last_mut().filter(|chunk| chunk.block == block) @@ -407,7 +428,7 @@ pub mod pallet { Self::update_ledger(&owner, &ledger); - Self::deposit_event(Event::::InitiatDepositUnlock(ledger.owner, value)); + Self::deposit_event(Event::::InitialDepositUnlock(ledger.owner, value)); } Ok(()) } @@ -453,7 +474,8 @@ pub mod pallet { if ledger.total < old_total { log::debug!("Preparing for transfer"); // Already checked that this won't overflow by entry condition. - let value = old_total - ledger.total; + let value = + old_total.checked_sub(&ledger.total).ok_or(Error::::ArithmeticUnderflow)?; let account_id = Self::account_id(); @@ -515,40 +537,49 @@ pub mod pallet { Ok(()) } + } - // Charge payments from content owners - pub fn charge_content_owners( - paying_accounts: Vec>>, - pricing: u128, + impl CustomerCharger for Pallet { + fn charge_content_owner( + content_owner: T::AccountId, + billing_vault: T::AccountId, + amount: u128, ) -> DispatchResult { - let mut total_charged = BalanceOf::::zero(); - - for bucket_details in paying_accounts.iter() { - let bucket: Bucket = Self::buckets(bucket_details.bucket_id) - .ok_or(Error::::BucketDoesNotExist)?; - let content_owner = bucket.owner_id; - let amount = bucket_details.amount * pricing.saturated_into::>(); - - let mut ledger = Self::ledger(&content_owner).ok_or(Error::::NotOwner)?; - if ledger.active >= amount { - ledger.total -= amount; - ledger.active -= amount; - total_charged += amount; - Self::update_ledger(&content_owner, &ledger); - } else { - let diff = amount - ledger.active; - total_charged += ledger.active; - ledger.total -= ledger.active; - ledger.active = BalanceOf::::zero(); - let (ledger, charged) = ledger.charge_unlocking(diff); - Self::update_ledger(&content_owner, &ledger); - total_charged += charged; - } - } - log::debug!("Total charged: {:?}", &total_charged); + let mut ledger = Self::ledger(&content_owner).ok_or(Error::::NotOwner)?; + let mut amount_to_deduct = amount.saturated_into::>(); + + ensure!(ledger.total >= ledger.active, Error::::ArithmeticUnderflow); + if ledger.active >= amount_to_deduct { + ledger.active = ledger + .active + .checked_sub(&amount_to_deduct) + .ok_or(Error::::ArithmeticUnderflow)?; + ledger.total = ledger + .total + .checked_sub(&amount_to_deduct) + .ok_or(Error::::ArithmeticUnderflow)?; + Self::update_ledger(&content_owner, &ledger); + } else { + let diff = amount_to_deduct + .checked_sub(&ledger.active) + .ok_or(Error::::ArithmeticUnderflow)?; + ledger.total = ledger + .total + .checked_sub(&ledger.active) + .ok_or(Error::::ArithmeticUnderflow)?; + amount_to_deduct = ledger.active; + ledger.active = BalanceOf::::zero(); + let (ledger, _charged) = ledger.charge_unlocking(diff)?; + Self::update_ledger(&content_owner, &ledger); + }; - Self::deposit_event(Event::::Charged(total_charged)); - log::debug!("Deposit event executed"); + ::Currency::transfer( + &Self::account_id(), + &billing_vault, + amount_to_deduct, + ExistenceRequirement::KeepAlive, + )?; + Self::deposit_event(Event::::Charged(content_owner, amount_to_deduct)); Ok(()) } diff --git a/pallets/ddc-customers/src/mock.rs b/pallets/ddc-customers/src/mock.rs new file mode 100644 index 000000000..5113b1e69 --- /dev/null +++ b/pallets/ddc-customers/src/mock.rs @@ -0,0 +1,161 @@ +//! Test utilities + +use crate::{self as pallet_ddc_customers, *}; +use ddc_primitives::{ClusterPricingParams, NodePubKey, NodeType}; +use ddc_traits::cluster::{ClusterVisitor, ClusterVisitorError}; + +use frame_support::{ + construct_runtime, parameter_types, + traits::{ConstU32, ConstU64, Everything}, + weights::constants::RocksDbWeight, +}; +use frame_system::mocking::{MockBlock, MockUncheckedExtrinsic}; +use sp_core::H256; +use sp_io::TestExternalities; +use sp_runtime::{ + testing::Header, + traits::{BlakeTwo256, IdentityLookup}, +}; + +/// The AccountId alias in this test module. +pub(crate) type AccountId = u64; +pub(crate) type AccountIndex = u64; +pub(crate) type BlockNumber = u64; +pub(crate) type Balance = u128; + +type UncheckedExtrinsic = MockUncheckedExtrinsic; +type Block = MockBlock; + +construct_runtime!( + pub enum Test where + Block = Block, + NodeBlock = Block, + UncheckedExtrinsic = UncheckedExtrinsic, + { + System: frame_system::{Pallet, Call, Config, Storage, Event}, + Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent}, + Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, + DdcCustomers: pallet_ddc_customers::{Pallet, Call, Storage, Config, Event}, + } +); + +parameter_types! { + pub static ExistentialDeposit: Balance = 1; +} + +impl frame_system::Config for Test { + type BaseCallFilter = Everything; + type BlockWeights = (); + type BlockLength = (); + type DbWeight = RocksDbWeight; + type RuntimeOrigin = RuntimeOrigin; + type Index = AccountIndex; + type BlockNumber = BlockNumber; + type RuntimeCall = RuntimeCall; + type Hash = H256; + type Hashing = BlakeTwo256; + type AccountId = AccountId; + type Lookup = IdentityLookup; + type Header = Header; + type RuntimeEvent = RuntimeEvent; + type BlockHashCount = ConstU64<250>; + type Version = (); + type PalletInfo = PalletInfo; + type AccountData = pallet_balances::AccountData; + type OnNewAccount = (); + type OnKilledAccount = (); + type SystemWeightInfo = (); + type SS58Prefix = (); + type OnSetCode = (); + type MaxConsumers = ConstU32<16>; +} + +impl pallet_balances::Config for Test { + type MaxLocks = ConstU32<1024>; + type MaxReserves = (); + type ReserveIdentifier = [u8; 8]; + type Balance = Balance; + type RuntimeEvent = RuntimeEvent; + type DustRemoval = (); + type ExistentialDeposit = ExistentialDeposit; + type AccountStore = System; + type WeightInfo = (); +} + +impl pallet_timestamp::Config for Test { + type Moment = u64; + type OnTimestampSet = (); + type MinimumPeriod = ConstU64<5>; + type WeightInfo = (); +} + +parameter_types! { + pub const DdcCustomersPalletId: PalletId = PalletId(*b"accounts"); // DDC maintainer's stake + pub const UnlockingDelay: BlockNumber = 10u64; // 10 blocks for test +} + +impl crate::pallet::Config for Test { + type UnlockingDelay = UnlockingDelay; + type Currency = Balances; + type PalletId = DdcCustomersPalletId; + type RuntimeEvent = RuntimeEvent; + type ClusterVisitor = TestClusterVisitor; +} + +pub struct TestClusterVisitor; +impl ClusterVisitor for TestClusterVisitor { + fn cluster_has_node(_cluster_id: &ClusterId, _node_pub_key: &NodePubKey) -> bool { + true + } + fn ensure_cluster(_cluster_id: &ClusterId) -> Result<(), ClusterVisitorError> { + Ok(()) + } + fn get_bond_size( + _cluster_id: &ClusterId, + _node_type: NodeType, + ) -> Result { + Ok(10) + } + fn get_chill_delay( + _cluster_id: &ClusterId, + _node_type: NodeType, + ) -> Result { + Ok(T::BlockNumber::from(10u32)) + } + fn get_unbonding_delay( + _cluster_id: &ClusterId, + _node_type: NodeType, + ) -> Result { + Ok(T::BlockNumber::from(10u32)) + } + + fn get_pricing_params( + _cluster_id: &ClusterId, + ) -> Result { + Ok(ClusterPricingParams { + unit_per_mb_stored: 1, + unit_per_mb_streamed: 2, + unit_per_put_request: 3, + unit_per_get_request: 4, + }) + } +} + +pub struct ExtBuilder; + +impl ExtBuilder { + fn build(self) -> TestExternalities { + sp_tracing::try_init_simple(); + let mut storage = frame_system::GenesisConfig::default().build_storage::().unwrap(); + + let _ = pallet_balances::GenesisConfig:: { balances: vec![(1, 100), (2, 100)] } + .assimilate_storage(&mut storage); + + TestExternalities::new(storage) + } + pub fn build_and_execute(self, test: impl FnOnce()) { + sp_tracing::try_init_simple(); + let mut ext = self.build(); + ext.execute_with(test); + } +} diff --git a/pallets/ddc-customers/src/tests.rs b/pallets/ddc-customers/src/tests.rs new file mode 100644 index 000000000..869115e3b --- /dev/null +++ b/pallets/ddc-customers/src/tests.rs @@ -0,0 +1,199 @@ +//! Tests for the module. + +use super::{mock::*, *}; +use ddc_primitives::ClusterId; + +use frame_support::{assert_noop, assert_ok}; +use pallet_balances::Error as BalancesError; + +#[test] +fn create_bucket_works() { + ExtBuilder.build_and_execute(|| { + System::set_block_number(1); + + let cluster_id = ClusterId::from([1; 20]); + let account_1 = 1; + + // Bucket created + assert_ok!(DdcCustomers::create_bucket(RuntimeOrigin::signed(account_1), cluster_id)); + + // Check storage + assert_eq!(DdcCustomers::buckets_count(), 1); + assert_eq!( + DdcCustomers::buckets(1), + Some(Bucket { bucket_id: 1, owner_id: account_1, cluster_id }) + ); + + // Checking that event was emitted + assert_eq!(System::events().len(), 1); + System::assert_last_event(Event::BucketCreated(1u64).into()) + }) +} + +#[test] +fn create_two_buckets_works() { + ExtBuilder.build_and_execute(|| { + System::set_block_number(1); + + let cluster_id = ClusterId::from([1; 20]); + let account_1 = 1; + + // Buckets created + assert_ok!(DdcCustomers::create_bucket(RuntimeOrigin::signed(account_1), cluster_id)); + assert_eq!(System::events().len(), 1); + System::assert_last_event(Event::BucketCreated(1u64).into()); + assert_ok!(DdcCustomers::create_bucket(RuntimeOrigin::signed(account_1), cluster_id)); + assert_eq!(System::events().len(), 2); + System::assert_last_event(Event::BucketCreated(2u64).into()); + + // Check storage + assert_eq!(DdcCustomers::buckets_count(), 2); + assert_eq!( + DdcCustomers::buckets(1), + Some(Bucket { bucket_id: 1, owner_id: account_1, cluster_id }) + ); + assert_eq!( + DdcCustomers::buckets(2), + Some(Bucket { bucket_id: 2, owner_id: account_1, cluster_id }) + ); + }) +} + +#[test] +fn deposit_and_deposit_extra_works() { + ExtBuilder.build_and_execute(|| { + System::set_block_number(1); + + let account_1 = 1; + let account_2 = 2; + + // Deposit dust + assert_noop!( + DdcCustomers::deposit(RuntimeOrigin::signed(account_1), 0_u128), + Error::::InsufficientDeposit + ); + + // Deposit all tokens fails (should not kill account) + assert_noop!( + DdcCustomers::deposit(RuntimeOrigin::signed(account_1), 100_u128), + BalancesError::::KeepAlive + ); + + // Deposited + assert_ok!(DdcCustomers::deposit(RuntimeOrigin::signed(account_1), 10_u128)); + + // Check storage + assert_eq!( + DdcCustomers::ledger(&account_1), + Some(AccountsLedger { + owner: 1, + total: 10_u128, + active: 10_u128, + unlocking: Default::default(), + }) + ); + + // Checking that event was emitted + System::assert_last_event(Event::Deposited(account_1, 10).into()); + + // Deposit should fail when called the second time + assert_noop!( + DdcCustomers::deposit(RuntimeOrigin::signed(account_1), 10_u128), + Error::::AlreadyPaired + ); + + // Deposit extra fails if not owner + assert_noop!( + DdcCustomers::deposit_extra(RuntimeOrigin::signed(account_2), 10_u128), + Error::::NotOwner + ); + + // Deposited extra + assert_ok!(DdcCustomers::deposit_extra(RuntimeOrigin::signed(account_1), 20_u128)); + + // Check storage + assert_eq!( + DdcCustomers::ledger(&account_1), + Some(AccountsLedger { + owner: 1, + total: 30_u128, + active: 30_u128, + unlocking: Default::default(), + }) + ); + + // Checking that event was emitted + System::assert_last_event(Event::Deposited(account_1, 20).into()); + }) +} + +#[test] +fn unlock_and_withdraw_deposit_works() { + ExtBuilder.build_and_execute(|| { + System::set_block_number(1); + + let account_1 = 1; + let account_2 = 2; + + // Deposited + assert_ok!(DdcCustomers::deposit(RuntimeOrigin::signed(account_1), 35_u128)); + // So there is always positive balance within pallet + assert_ok!(DdcCustomers::deposit(RuntimeOrigin::signed(account_2), 10_u128)); + + // Unlock chunk + assert_ok!(DdcCustomers::unlock_deposit(RuntimeOrigin::signed(account_1), 1_u128)); + System::set_block_number(2); + + let mut unlocking_chunks: BoundedVec, MaxUnlockingChunks> = + Default::default(); + match unlocking_chunks.try_push(UnlockChunk { value: 1, block: 11 }) { + Ok(_) => (), + Err(_) => println!("No more chunks"), + }; + // Check storage + assert_eq!( + DdcCustomers::ledger(&1), + Some(AccountsLedger { + owner: account_1, + total: 35_u128, + active: 34_u128, + unlocking: unlocking_chunks.clone(), + }) + ); + + // Reach max unlock chunks + for i in 1..32 { + assert_ok!(DdcCustomers::unlock_deposit(RuntimeOrigin::signed(account_1), 1_u128)); + System::set_block_number(i + 2); + } + + // No more chunks can be added + assert_noop!( + DdcCustomers::unlock_deposit(RuntimeOrigin::signed(account_1), 1_u128), + Error::::NoMoreChunks + ); + + // Set the block to withdraw all unlocked chunks + System::set_block_number(42); + + assert_ok!(DdcCustomers::withdraw_unlocked_deposit(RuntimeOrigin::signed(account_1))); + // Check storage + assert_eq!( + DdcCustomers::ledger(&1), + Some(AccountsLedger { + owner: account_1, + total: 3_u128, + active: 3_u128, + unlocking: Default::default(), + }) + ); + + // Unlock remaining chuncks & withdraw + assert_ok!(DdcCustomers::unlock_deposit(RuntimeOrigin::signed(account_1), 3_u128)); + System::set_block_number(52); + assert_ok!(DdcCustomers::withdraw_unlocked_deposit(RuntimeOrigin::signed(account_1))); + + // Check storage + assert_eq!(DdcCustomers::ledger(&account_1), None); + }) +} diff --git a/pallets/ddc-metrics-offchain-worker/Cargo.toml b/pallets/ddc-metrics-offchain-worker/Cargo.toml index 1370ab6da..5e40a0968 100644 --- a/pallets/ddc-metrics-offchain-worker/Cargo.toml +++ b/pallets/ddc-metrics-offchain-worker/Cargo.toml @@ -15,18 +15,18 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] alt_serde = { version = "1", default-features = false, features = ["derive"] } codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false, features = ["full"] } -frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } hex = { version = "0.4", default-features = false } hex-literal = "^0.3.1" -pallet-contracts = { version = '4.0.0-dev', default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +pallet-contracts = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } serde_json = { version = "1", default-features = false, git = "https://github.com/Cerebellum-Network/json", branch = "no-std-cere", features = ["alloc"] } -sp-core = { version = "6.0.0", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -sp-io = { version = "6.0.0", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -sp-keystore = { version = "0.12.0", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31", optional = true } -sp-runtime = { version = "6.0.0", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -sp-std = { version = "4.0.0", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sp-keystore = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31", optional = true } +sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } [features] default = ["std"] @@ -40,10 +40,11 @@ std = [ "sp-runtime/std", "sp-std/std", "pallet-contracts/std", + # "pallet-contracts-rpc-runtime-api/std", ] [dev-dependencies] -pallet-balances = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -pallet-randomness-collective-flip = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -pallet-timestamp = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +pallet-balances = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +pallet-randomness-collective-flip = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +pallet-timestamp = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } pretty_assertions = "0.6.1" diff --git a/pallets/ddc-nodes/Cargo.toml b/pallets/ddc-nodes/Cargo.toml index 4fdb86a87..2036abbdc 100644 --- a/pallets/ddc-nodes/Cargo.toml +++ b/pallets/ddc-nodes/Cargo.toml @@ -7,16 +7,19 @@ edition = "2021" codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false, features = ["derive"] } ddc-primitives = { version = "0.1.0", default-features = false, path = "../../primitives" } ddc-traits = { version = "0.1.0", default-features = false, path = "../../traits" } -frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } -sp-runtime = { version = "6.0.0", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -sp-std = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } [dev-dependencies] -sp-core = { version = "6.0.0", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -sp-tracing = { version = "5.0.0", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -substrate-test-utils = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +pallet-balances = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +pallet-timestamp = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sp-core = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sp-tracing = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +substrate-test-utils = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } [features] default = ["std"] diff --git a/pallets/ddc-nodes/src/lib.rs b/pallets/ddc-nodes/src/lib.rs index c655feb53..f18d724b7 100644 --- a/pallets/ddc-nodes/src/lib.rs +++ b/pallets/ddc-nodes/src/lib.rs @@ -14,6 +14,11 @@ #![cfg_attr(not(feature = "std"), no_std)] #![recursion_limit = "256"] +#[cfg(test)] +pub(crate) mod mock; +#[cfg(test)] +mod tests; + use ddc_primitives::{CDNNodePubKey, ClusterId, NodePubKey, StorageNodePubKey}; use ddc_traits::node::{NodeVisitor, NodeVisitorError}; use frame_support::pallet_prelude::*; @@ -26,7 +31,7 @@ mod node; mod storage_node; pub use crate::{ - cdn_node::CDNNode, + cdn_node::{CDNNode, CDNNodeParams}, node::{Node, NodeError, NodeParams, NodeTrait}, storage_node::StorageNode, }; diff --git a/pallets/ddc-nodes/src/mock.rs b/pallets/ddc-nodes/src/mock.rs new file mode 100644 index 000000000..18377ac58 --- /dev/null +++ b/pallets/ddc-nodes/src/mock.rs @@ -0,0 +1,114 @@ +//! Test utilities + +#![allow(dead_code)] + +use crate::{self as pallet_ddc_nodes, *}; +use frame_support::{ + construct_runtime, parameter_types, + traits::{ConstU32, ConstU64, Everything}, + weights::constants::RocksDbWeight, +}; +use frame_system::mocking::{MockBlock, MockUncheckedExtrinsic}; +use sp_core::H256; +use sp_io::TestExternalities; +use sp_runtime::{ + testing::Header, + traits::{BlakeTwo256, IdentityLookup}, +}; + +/// The AccountId alias in this test module. +pub(crate) type AccountId = u64; +pub(crate) type AccountIndex = u64; +pub(crate) type BlockNumber = u64; +pub(crate) type Balance = u128; + +type UncheckedExtrinsic = MockUncheckedExtrinsic; +type Block = MockBlock; + +construct_runtime!( + pub enum Test where + Block = Block, + NodeBlock = Block, + UncheckedExtrinsic = UncheckedExtrinsic, + { + System: frame_system::{Pallet, Call, Config, Storage, Event}, + Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent}, + Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, + DdcNodes: pallet_ddc_nodes::{Pallet, Call, Storage, Event}, + } +); + +parameter_types! { + pub static ExistentialDeposit: Balance = 1; +} + +impl frame_system::Config for Test { + type BaseCallFilter = Everything; + type BlockWeights = (); + type BlockLength = (); + type DbWeight = RocksDbWeight; + type RuntimeOrigin = RuntimeOrigin; + type Index = AccountIndex; + type BlockNumber = BlockNumber; + type RuntimeCall = RuntimeCall; + type Hash = H256; + type Hashing = BlakeTwo256; + type AccountId = AccountId; + type Lookup = IdentityLookup; + type Header = Header; + type RuntimeEvent = RuntimeEvent; + type BlockHashCount = ConstU64<250>; + type Version = (); + type PalletInfo = PalletInfo; + type AccountData = pallet_balances::AccountData; + type OnNewAccount = (); + type OnKilledAccount = (); + type SystemWeightInfo = (); + type SS58Prefix = (); + type OnSetCode = (); + type MaxConsumers = ConstU32<16>; +} + +impl pallet_balances::Config for Test { + type MaxLocks = ConstU32<1024>; + type MaxReserves = (); + type ReserveIdentifier = [u8; 8]; + type Balance = Balance; + type RuntimeEvent = RuntimeEvent; + type DustRemoval = (); + type ExistentialDeposit = ExistentialDeposit; + type AccountStore = System; + type WeightInfo = (); +} + +impl pallet_timestamp::Config for Test { + type Moment = u64; + type OnTimestampSet = (); + type MinimumPeriod = ConstU64<5>; + type WeightInfo = (); +} + +impl crate::pallet::Config for Test { + type RuntimeEvent = RuntimeEvent; +} + +pub(crate) type TestRuntimeCall = ::RuntimeCall; + +pub struct ExtBuilder; + +impl ExtBuilder { + fn build(self) -> TestExternalities { + sp_tracing::try_init_simple(); + let mut storage = frame_system::GenesisConfig::default().build_storage::().unwrap(); + + let _ = pallet_balances::GenesisConfig:: { balances: vec![(1, 100), (2, 100)] } + .assimilate_storage(&mut storage); + + TestExternalities::new(storage) + } + pub fn build_and_execute(self, test: impl FnOnce()) { + sp_tracing::try_init_simple(); + let mut ext = self.build(); + ext.execute_with(test); + } +} diff --git a/pallets/ddc-nodes/src/tests.rs b/pallets/ddc-nodes/src/tests.rs new file mode 100644 index 000000000..1c5a80137 --- /dev/null +++ b/pallets/ddc-nodes/src/tests.rs @@ -0,0 +1,183 @@ +//! Tests for the module. + +use super::{mock::*, *}; +use crate::{cdn_node::CDNNodeParams, storage_node::StorageNodeParams}; +use ddc_primitives::NodePubKey; +use frame_support::{assert_noop, assert_ok}; +use sp_runtime::AccountId32; + +#[test] +fn create_node_works() { + ExtBuilder.build_and_execute(|| { + System::set_block_number(1); + let bytes = [0u8; 32]; + let node_pub_key = AccountId32::from(bytes); + let cdn_node_params = CDNNodeParams { + host: vec![1u8, 255], + http_port: 35000u16, + grpc_port: 25000u16, + p2p_port: 15000u16, + }; + + // Node params are not valid + assert_noop!( + DdcNodes::create_node( + RuntimeOrigin::signed(1), + NodePubKey::CDNPubKey(node_pub_key.clone()), + NodeParams::StorageParams(StorageNodeParams { + host: vec![1u8, 255], + http_port: 35000u16, + grpc_port: 25000u16, + p2p_port: 15000u16, + }) + ), + Error::::InvalidNodeParams + ); + + // Node created + assert_ok!(DdcNodes::create_node( + RuntimeOrigin::signed(1), + NodePubKey::CDNPubKey(node_pub_key.clone()), + NodeParams::CDNParams(cdn_node_params.clone()) + )); + + // Node already exists + assert_noop!( + DdcNodes::create_node( + RuntimeOrigin::signed(1), + NodePubKey::CDNPubKey(node_pub_key.clone()), + NodeParams::CDNParams(cdn_node_params) + ), + Error::::NodeAlreadyExists + ); + + // Checking that event was emitted + assert_eq!(System::events().len(), 1); + System::assert_last_event( + Event::NodeCreated { node_pub_key: NodePubKey::CDNPubKey(node_pub_key) }.into(), + ) + }) +} + +#[test] +fn set_node_params_works() { + ExtBuilder.build_and_execute(|| { + System::set_block_number(1); + let bytes = [0u8; 32]; + let node_pub_key = AccountId32::from(bytes); + let storage_node_params = StorageNodeParams { + host: vec![1u8, 255], + http_port: 35000u16, + grpc_port: 25000u16, + p2p_port: 15000u16, + }; + let cdn_node_params = CDNNodeParams { + host: vec![1u8, 255], + http_port: 35000u16, + grpc_port: 25000u16, + p2p_port: 15000u16, + }; + + // Node doesn't exist + assert_noop!( + DdcNodes::set_node_params( + RuntimeOrigin::signed(1), + NodePubKey::CDNPubKey(node_pub_key.clone()), + NodeParams::CDNParams(cdn_node_params.clone()) + ), + Error::::NodeDoesNotExist + ); + + // Node created + assert_ok!(DdcNodes::create_node( + RuntimeOrigin::signed(1), + NodePubKey::CDNPubKey(node_pub_key.clone()), + NodeParams::CDNParams(cdn_node_params.clone()) + )); + + // Set node params + assert_ok!(DdcNodes::set_node_params( + RuntimeOrigin::signed(1), + NodePubKey::CDNPubKey(node_pub_key.clone()), + NodeParams::CDNParams(cdn_node_params.clone()) + )); + + // Node params are not valid + assert_noop!( + DdcNodes::set_node_params( + RuntimeOrigin::signed(1), + NodePubKey::CDNPubKey(node_pub_key.clone()), + NodeParams::StorageParams(storage_node_params) + ), + Error::::InvalidNodeParams + ); + + // Only node provider can set params + assert_noop!( + DdcNodes::set_node_params( + RuntimeOrigin::signed(2), + NodePubKey::CDNPubKey(node_pub_key.clone()), + NodeParams::CDNParams(cdn_node_params) + ), + Error::::OnlyNodeProvider + ); + + // Checking that event was emitted + assert_eq!(System::events().len(), 2); + System::assert_last_event( + Event::NodeParamsChanged { node_pub_key: NodePubKey::CDNPubKey(node_pub_key) }.into(), + ) + }) +} + +#[test] +fn set_delete_node_works() { + ExtBuilder.build_and_execute(|| { + System::set_block_number(1); + let bytes = [0u8; 32]; + let node_pub_key = AccountId32::from(bytes); + let cdn_node_params = CDNNodeParams { + host: vec![1u8, 255], + http_port: 35000u16, + grpc_port: 25000u16, + p2p_port: 15000u16, + }; + + // Node doesn't exist + assert_noop!( + DdcNodes::delete_node( + RuntimeOrigin::signed(1), + NodePubKey::CDNPubKey(node_pub_key.clone()) + ), + Error::::NodeDoesNotExist + ); + + // Create node + assert_ok!(DdcNodes::create_node( + RuntimeOrigin::signed(1), + NodePubKey::CDNPubKey(node_pub_key.clone()), + NodeParams::CDNParams(cdn_node_params) + )); + + // Only node provider can delete + assert_noop!( + DdcNodes::delete_node( + RuntimeOrigin::signed(2), + NodePubKey::CDNPubKey(node_pub_key.clone()) + ), + Error::::OnlyNodeProvider + ); + + // Delete node + assert_ok!(DdcNodes::delete_node( + RuntimeOrigin::signed(1), + NodePubKey::CDNPubKey(node_pub_key.clone()), + )); + + // Checking that event was emitted + assert_eq!(System::events().len(), 2); + System::assert_last_event( + Event::NodeDeleted { node_pub_key: NodePubKey::CDNPubKey(node_pub_key) }.into(), + ) + }) +} diff --git a/pallets/ddc-payouts/Cargo.toml b/pallets/ddc-payouts/Cargo.toml new file mode 100644 index 000000000..723d03e2b --- /dev/null +++ b/pallets/ddc-payouts/Cargo.toml @@ -0,0 +1,42 @@ +[package] +name = "pallet-ddc-payouts" +version = "4.8.1" +edition = "2021" + +[dependencies] +byte-unit = { version = "4.0.19", default-features = false, features = ["u128"] } +codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false, features = ["derive"] } +ddc-primitives = { version = "0.1.0", default-features = false, path = "../../primitives" } +ddc-traits = { version = "0.1.0", default-features = false, path = "../../traits" } +frame-benchmarking = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31", optional = true } +frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +log = { version = "0.4.17", default-features = false } +scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } +sp-core = { version = "6.0.0", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31", default-features = false } +sp-io = { version = "6.0.0", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sp-runtime = { version = "6.0.0", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sp-staking = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sp-std = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } + +[dev-dependencies] +sp-core = { version = "6.0.0", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sp-tracing = { version = "5.0.0", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +substrate-test-utils = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } + +[features] +default = ["std"] +std = [ + "codec/std", + "ddc-primitives/std", + "frame-support/std", + "frame-system/std", + "frame-benchmarking/std", + "scale-info/std", + "sp-io/std", + "sp-runtime/std", + "sp-staking/std", + "sp-std/std", + "sp-core/std", +] +runtime-benchmarks = ["frame-benchmarking/runtime-benchmarks"] diff --git a/pallets/ddc-payouts/src/lib.rs b/pallets/ddc-payouts/src/lib.rs new file mode 100644 index 000000000..8143622bb --- /dev/null +++ b/pallets/ddc-payouts/src/lib.rs @@ -0,0 +1,725 @@ +//! # DDC Payouts Pallet +//! +//! The DDC Payouts pallet is used to distribute payouts based on DAC validation +//! +//! - [`Config`] +//! - [`Call`] +//! - [`Pallet`] +//! +//! ## GenesisConfig +//! +//! The DDC Payouts pallet depends on the [`GenesisConfig`]. The +//! `GenesisConfig` is optional and allow to set some initial nodes in DDC. + +#![cfg_attr(not(feature = "std"), no_std)] +#![recursion_limit = "256"] + +use ddc_primitives::{ClusterId, DdcEra}; +use ddc_traits::{cluster::ClusterVisitor, customer::CustomerCharger as CustomerChargerType}; +use frame_support::{ + pallet_prelude::*, + parameter_types, + sp_runtime::SaturatedConversion, + traits::{Currency, ExistenceRequirement, LockableCurrency}, + BoundedBTreeSet, +}; +use frame_system::pallet_prelude::*; +pub use pallet::*; +use sp_runtime::Perbill; +use sp_std::prelude::*; + +type BatchIndex = u16; + +/// Stores usage of customers +#[derive(PartialEq, Encode, Decode, RuntimeDebug, TypeInfo, Default, Clone)] +pub struct CustomerUsage { + pub transferred_bytes: u128, + pub stored_bytes: u128, + pub number_of_puts: u128, + pub number_of_gets: u128, +} + +/// Stores usage of node provider +#[derive(PartialEq, Encode, Decode, RuntimeDebug, TypeInfo, Default, Clone)] +pub struct NodeUsage { + pub transferred_bytes: u128, + pub stored_bytes: u128, + pub number_of_puts: u128, + pub number_of_gets: u128, +} + +/// Stores reward in tokens(units) of node provider as per NodeUsage +#[derive(PartialEq, Encode, Decode, RuntimeDebug, TypeInfo, Default, Clone)] +pub struct NodeReward { + pub transfer: u128, // for transferred_bytes + pub storage: u128, // for stored_bytes + pub puts: u128, // for number_of_puts + pub gets: u128, // for number_of_gets +} + +#[derive(PartialEq, Encode, Decode, RuntimeDebug, TypeInfo, Default, Clone)] +pub struct BillingReportDebt { + pub cluster_id: ClusterId, + pub era: DdcEra, + pub batch_index: BatchIndex, + pub amount: u128, +} + +/// Stores charge in tokens(units) of customer as per CustomerUsage +#[derive(PartialEq, Encode, Decode, RuntimeDebug, TypeInfo, Default, Clone)] +pub struct CustomerCharge { + pub transfer: u128, // for transferred_bytes + pub storage: u128, // for stored_bytes + pub puts: u128, // for number_of_puts + pub gets: u128, // for number_of_gets +} + +/// The balance type of this pallet. +pub type BalanceOf = + <::Currency as Currency<::AccountId>>::Balance; + +parameter_types! { + pub MaxBatchesCount: u16 = 1000; +} + +#[frame_support::pallet] +pub mod pallet { + use super::*; + use frame_support::PalletId; + use sp_io::hashing::blake2_128; + use sp_runtime::traits::{AccountIdConversion, Zero}; + + #[pallet::pallet] + #[pallet::generate_store(pub(super) trait Store)] + #[pallet::without_storage_info] + pub struct Pallet(_); + + #[pallet::config] + pub trait Config: frame_system::Config { + type RuntimeEvent: From> + IsType<::RuntimeEvent>; + #[pallet::constant] + type PalletId: Get; + + type Currency: LockableCurrency; + + type CustomerCharger: CustomerChargerType; + type ClusterVisitor: ClusterVisitor; + } + + #[pallet::event] + #[pallet::generate_deposit(pub(crate) fn deposit_event)] + pub enum Event { + BillingReportInitialized { + cluster_id: ClusterId, + era: DdcEra, + }, + ChargingStarted { + cluster_id: ClusterId, + era: DdcEra, + }, + Charged { + cluster_id: ClusterId, + era: DdcEra, + customer_id: T::AccountId, + amount: u128, + }, + ChargeFailed { + cluster_id: ClusterId, + era: DdcEra, + customer_id: T::AccountId, + amount: u128, + }, + ChargingFinished { + cluster_id: ClusterId, + era: DdcEra, + }, + RewardingStarted { + cluster_id: ClusterId, + era: DdcEra, + }, + Rewarded { + cluster_id: ClusterId, + era: DdcEra, + node_provider_id: T::AccountId, + amount: u128, + }, + RewardingFinished { + cluster_id: ClusterId, + era: DdcEra, + }, + BillingReportFinalized { + cluster_id: ClusterId, + era: DdcEra, + }, + } + + #[pallet::error] + #[derive(PartialEq)] + pub enum Error { + BillingReportDoesNotExist, + NotExpectedState, + Unauthorised, + BatchIndexAlreadyProcessed, + BatchIndexIsOutOfRange, + BatchesMissed, + NotDistributedBalance, + BatchIndexOverflow, + BoundedVecOverflow, + ArithmeticOverflow, + NotExpectedClusterState, + } + + #[pallet::storage] + #[pallet::getter(fn active_billing_reports)] + pub type ActiveBillingReports = StorageDoubleMap< + _, + Blake2_128Concat, + ClusterId, + Blake2_128Concat, + DdcEra, + BillingReport, + ValueQuery, + >; + + #[pallet::storage] + #[pallet::getter(fn authorised_caller)] + pub type AuthorisedCaller = StorageValue<_, T::AccountId>; + + #[pallet::storage] + #[pallet::getter(fn debtor_customers)] + pub type DebtorCustomers = StorageDoubleMap< + _, + Blake2_128Concat, + ClusterId, + Blake2_128Concat, + T::AccountId, + u128, + ValueQuery, + >; + + #[derive(Clone, Encode, Decode, RuntimeDebug, TypeInfo, PartialEq)] + #[scale_info(skip_type_params(T))] + pub struct BillingReport { + state: State, + vault: T::AccountId, + total_customer_charge: CustomerCharge, + total_distributed_reward: u128, + total_node_usage: NodeUsage, + // stage 1 + charging_max_batch_index: BatchIndex, + charging_processed_batches: BoundedBTreeSet, + // stage 2 + rewarding_max_batch_index: BatchIndex, + rewarding_processed_batches: BoundedBTreeSet, + } + + impl Default for BillingReport { + fn default() -> Self { + Self { + state: State::default(), + vault: T::PalletId::get().into_account_truncating(), + total_customer_charge: CustomerCharge::default(), + total_distributed_reward: Zero::zero(), + total_node_usage: NodeUsage::default(), + charging_max_batch_index: Zero::zero(), + charging_processed_batches: BoundedBTreeSet::default(), + rewarding_max_batch_index: Zero::zero(), + rewarding_processed_batches: BoundedBTreeSet::default(), + } + } + } + + #[derive(Clone, Encode, Decode, RuntimeDebug, TypeInfo, PartialEq, Default)] + pub enum State { + #[default] + NotInitialized, + Initialized, + ChargingCustomers, + CustomersCharged, + DeductingFees, + RewardingProviders, + ProvidersRewarded, + Finalized, + } + + #[pallet::call] + impl Pallet { + #[pallet::weight(10_000)] + pub fn set_authorised_caller( + origin: OriginFor, + authorised_caller: T::AccountId, + ) -> DispatchResult { + ensure_root(origin)?; // requires Governance approval + + AuthorisedCaller::::put(authorised_caller); + + Ok(()) + } + + #[pallet::weight(10_000)] + pub fn begin_billing_report( + origin: OriginFor, + cluster_id: ClusterId, + era: DdcEra, + ) -> DispatchResult { + let caller = ensure_signed(origin)?; + ensure!(Self::authorised_caller() == Some(caller), Error::::Unauthorised); + + ensure!( + ActiveBillingReports::::try_get(cluster_id, era).is_err(), + Error::::NotExpectedState + ); + + let mut billing_report = BillingReport:: { + vault: Self::sub_account_id(cluster_id, era), + state: State::Initialized, + ..Default::default() + }; + billing_report.vault = Self::sub_account_id(cluster_id, era); + billing_report.state = State::Initialized; + ActiveBillingReports::::insert(cluster_id, era, billing_report); + + Self::deposit_event(Event::::BillingReportInitialized { cluster_id, era }); + + Ok(()) + } + + #[pallet::weight(10_000)] + pub fn begin_charging_customers( + origin: OriginFor, + cluster_id: ClusterId, + era: DdcEra, + max_batch_index: BatchIndex, + ) -> DispatchResult { + let caller = ensure_signed(origin)?; + ensure!(Self::authorised_caller() == Some(caller), Error::::Unauthorised); + + ensure!( + max_batch_index > 0 && max_batch_index < MaxBatchesCount::get(), + Error::::BatchIndexOverflow + ); + + let mut billing_report = ActiveBillingReports::::try_get(cluster_id, era) + .map_err(|_| Error::::BillingReportDoesNotExist)?; + + ensure!(billing_report.state == State::Initialized, Error::::NotExpectedState); + + billing_report.charging_max_batch_index = max_batch_index; + billing_report.state = State::ChargingCustomers; + ActiveBillingReports::::insert(cluster_id, era, billing_report); + + Self::deposit_event(Event::::ChargingStarted { cluster_id, era }); + + Ok(()) + } + + #[pallet::weight(10_000)] + pub fn send_charging_customers_batch( + origin: OriginFor, + cluster_id: ClusterId, + era: DdcEra, + batch_index: BatchIndex, + payers: Vec<(T::AccountId, CustomerUsage)>, + ) -> DispatchResult { + let caller = ensure_signed(origin)?; + ensure!(Self::authorised_caller() == Some(caller), Error::::Unauthorised); + + let billing_report = ActiveBillingReports::::try_get(cluster_id, era) + .map_err(|_| Error::::BillingReportDoesNotExist)?; + + ensure!(billing_report.state == State::ChargingCustomers, Error::::NotExpectedState); + ensure!( + billing_report.charging_max_batch_index >= batch_index, + Error::::BatchIndexIsOutOfRange + ); + ensure!( + !billing_report.charging_processed_batches.contains(&batch_index), + Error::::BatchIndexAlreadyProcessed + ); + + let mut updated_billing_report = billing_report; + for payer in payers { + let customer_charge = get_customer_charge::(cluster_id, &payer.1)?; + let total_customer_charge = (|| -> Option { + customer_charge + .transfer + .checked_add(customer_charge.storage)? + .checked_add(customer_charge.puts)? + .checked_add(customer_charge.gets) + })() + .ok_or(Error::::ArithmeticOverflow)?; + + let temp_total_customer_storage_charge = updated_billing_report + .total_customer_charge + .storage + .checked_add(customer_charge.storage) + .ok_or(Error::::ArithmeticOverflow)?; + + let temp_total_customer_transfer_charge = updated_billing_report + .total_customer_charge + .transfer + .checked_add(customer_charge.transfer) + .ok_or(Error::::ArithmeticOverflow)?; + + let temp_total_customer_puts_charge = updated_billing_report + .total_customer_charge + .puts + .checked_add(customer_charge.puts) + .ok_or(Error::::ArithmeticOverflow)?; + + let temp_total_customer_gets_charge = updated_billing_report + .total_customer_charge + .gets + .checked_add(customer_charge.gets) + .ok_or(Error::::ArithmeticOverflow)?; + + let customer_id = payer.0.clone(); + match T::CustomerCharger::charge_content_owner( + customer_id.clone(), + updated_billing_report.vault.clone(), + total_customer_charge, + ) { + Ok(_) => { + updated_billing_report.total_customer_charge.storage = + temp_total_customer_storage_charge; + updated_billing_report.total_customer_charge.transfer = + temp_total_customer_transfer_charge; + updated_billing_report.total_customer_charge.puts = + temp_total_customer_puts_charge; + updated_billing_report.total_customer_charge.gets = + temp_total_customer_gets_charge; + + Self::deposit_event(Event::::Charged { + cluster_id, + era, + customer_id, + amount: total_customer_charge, + }); + }, + Err(_e) => { + let mut customer_dept = + DebtorCustomers::::try_get(cluster_id, customer_id.clone()) + .unwrap_or_else(|_| Zero::zero()); + + customer_dept = customer_dept + .checked_add(total_customer_charge) + .ok_or(Error::::ArithmeticOverflow)?; + DebtorCustomers::::insert( + cluster_id, + customer_id.clone(), + customer_dept, + ); + + Self::deposit_event(Event::::ChargeFailed { + cluster_id, + era, + customer_id, + amount: total_customer_charge, + }); + }, + } + } + + updated_billing_report + .charging_processed_batches + .try_insert(batch_index) + .map_err(|_| Error::::BoundedVecOverflow)?; + + ActiveBillingReports::::insert(cluster_id, era, updated_billing_report); + + Ok(()) + } + + #[pallet::weight(10_000)] + pub fn end_charging_customers( + origin: OriginFor, + cluster_id: ClusterId, + era: DdcEra, + ) -> DispatchResult { + let caller = ensure_signed(origin)?; + ensure!(Self::authorised_caller() == Some(caller), Error::::Unauthorised); + + let mut billing_report = ActiveBillingReports::::try_get(cluster_id, era) + .map_err(|_| Error::::BillingReportDoesNotExist)?; + + ensure!(billing_report.state == State::ChargingCustomers, Error::::NotExpectedState); + validate_batches::( + &billing_report.charging_processed_batches, + &billing_report.charging_max_batch_index, + )?; + + billing_report.state = State::CustomersCharged; + ActiveBillingReports::::insert(cluster_id, era, billing_report); + + Self::deposit_event(Event::::ChargingFinished { cluster_id, era }); + + Ok(()) + } + + #[pallet::weight(10_000)] + pub fn begin_rewarding_providers( + origin: OriginFor, + cluster_id: ClusterId, + era: DdcEra, + max_batch_index: BatchIndex, + total_node_usage: NodeUsage, + ) -> DispatchResult { + let caller = ensure_signed(origin)?; + ensure!(Self::authorised_caller() == Some(caller), Error::::Unauthorised); + + ensure!( + max_batch_index > 0 && max_batch_index < MaxBatchesCount::get(), + Error::::BatchIndexOverflow + ); + + let mut billing_report = ActiveBillingReports::::try_get(cluster_id, era) + .map_err(|_| Error::::BillingReportDoesNotExist)?; + + ensure!(billing_report.state == State::CustomersCharged, Error::::NotExpectedState); + + billing_report.total_node_usage = total_node_usage; + billing_report.rewarding_max_batch_index = max_batch_index; + billing_report.state = State::RewardingProviders; + ActiveBillingReports::::insert(cluster_id, era, billing_report); + + Self::deposit_event(Event::::RewardingStarted { cluster_id, era }); + + Ok(()) + } + + #[pallet::weight(10_000)] + pub fn send_rewarding_providers_batch( + origin: OriginFor, + cluster_id: ClusterId, + era: DdcEra, + batch_index: BatchIndex, + payees: Vec<(T::AccountId, NodeUsage)>, + ) -> DispatchResult { + let caller = ensure_signed(origin)?; + ensure!(Self::authorised_caller() == Some(caller), Error::::Unauthorised); + + let billing_report = ActiveBillingReports::::try_get(cluster_id, era) + .map_err(|_| Error::::BillingReportDoesNotExist)?; + + ensure!( + billing_report.state == State::RewardingProviders, + Error::::NotExpectedState + ); + ensure!( + billing_report.rewarding_max_batch_index >= batch_index, + Error::::BatchIndexIsOutOfRange + ); + ensure!( + !billing_report.rewarding_processed_batches.contains(&batch_index), + Error::::BatchIndexAlreadyProcessed + ); + + let mut updated_billing_report = billing_report.clone(); + for payee in payees { + let node_reward = get_node_reward::( + &payee.1, + &billing_report.total_node_usage, + &billing_report.total_customer_charge, + ) + .ok_or(Error::::ArithmeticOverflow)?; + let amount_to_reward = (|| -> Option { + node_reward + .transfer + .checked_add(node_reward.storage)? + .checked_add(node_reward.puts)? + .checked_add(node_reward.gets) + })() + .ok_or(Error::::ArithmeticOverflow)?; + + let node_provider_id = payee.0; + let reward: BalanceOf = amount_to_reward.saturated_into::>(); + + ::Currency::transfer( + &updated_billing_report.vault, + &node_provider_id, + reward, + ExistenceRequirement::KeepAlive, + )?; + + updated_billing_report + .total_distributed_reward + .checked_add(amount_to_reward) + .ok_or(Error::::ArithmeticOverflow)?; + + Self::deposit_event(Event::::Rewarded { + cluster_id, + era, + node_provider_id, + amount: amount_to_reward, + }); + } + + updated_billing_report + .rewarding_processed_batches + .try_insert(batch_index) + .map_err(|_| Error::::BoundedVecOverflow)?; + + ActiveBillingReports::::insert(cluster_id, era, updated_billing_report); + + Ok(()) + } + + #[pallet::weight(10_000)] + pub fn end_rewarding_providers( + origin: OriginFor, + cluster_id: ClusterId, + era: DdcEra, + ) -> DispatchResult { + let caller = ensure_signed(origin)?; + ensure!(Self::authorised_caller() == Some(caller), Error::::Unauthorised); + + let mut billing_report = ActiveBillingReports::::try_get(cluster_id, era) + .map_err(|_| Error::::BillingReportDoesNotExist)?; + + ensure!( + billing_report.state == State::RewardingProviders, + Error::::NotExpectedState + ); + + validate_batches::( + &billing_report.rewarding_processed_batches, + &billing_report.rewarding_max_batch_index, + )?; + + billing_report.state = State::ProvidersRewarded; + ActiveBillingReports::::insert(cluster_id, era, billing_report); + + Self::deposit_event(Event::::RewardingFinished { cluster_id, era }); + + Ok(()) + } + + #[pallet::weight(10_000)] + pub fn end_billing_report( + origin: OriginFor, + cluster_id: ClusterId, + era: DdcEra, + ) -> DispatchResult { + let caller = ensure_signed(origin)?; + ensure!(Self::authorised_caller() == Some(caller), Error::::Unauthorised); + + let billing_report = ActiveBillingReports::::try_get(cluster_id, era) + .map_err(|_| Error::::BillingReportDoesNotExist)?; + + ensure!(billing_report.state == State::ProvidersRewarded, Error::::NotExpectedState); + let expected_amount_to_reward = (|| -> Option { + billing_report + .total_customer_charge + .transfer + .checked_add(billing_report.total_customer_charge.storage)? + .checked_add(billing_report.total_customer_charge.puts)? + .checked_add(billing_report.total_customer_charge.gets) + })() + .ok_or(Error::::ArithmeticOverflow)?; + + ensure!( + expected_amount_to_reward == billing_report.total_distributed_reward, + Error::::NotDistributedBalance + ); + + ActiveBillingReports::::remove(cluster_id, era); + Self::deposit_event(Event::::BillingReportFinalized { cluster_id, era }); + + Ok(()) + } + } + + fn get_node_reward( + node_usage: &NodeUsage, + total_nodes_usage: &NodeUsage, + total_customer_charge: &CustomerCharge, + ) -> Option { + let mut node_reward = NodeReward::default(); + + let mut ratio = Perbill::from_rational( + node_usage.transferred_bytes, + total_nodes_usage.transferred_bytes, + ); + // ratio multiplied by X will be > 0, < X no overflow + node_reward.transfer = ratio * total_customer_charge.transfer; + + ratio = Perbill::from_rational(node_usage.stored_bytes, total_nodes_usage.stored_bytes); + node_reward.storage = ratio * total_customer_charge.storage; + + ratio = Perbill::from_rational(node_usage.number_of_puts, total_nodes_usage.number_of_puts); + node_reward.puts = ratio * total_customer_charge.puts; + + ratio = Perbill::from_rational(node_usage.number_of_gets, total_nodes_usage.number_of_gets); + node_reward.gets = ratio * total_customer_charge.gets; + + Some(node_reward) + } + + fn get_customer_charge( + cluster_id: ClusterId, + usage: &CustomerUsage, + ) -> Result> { + let mut total = CustomerCharge::default(); + + let pricing = T::ClusterVisitor::get_pricing_params(&cluster_id) + .map_err(|_| Error::::NotExpectedClusterState)?; + + total.transfer = (|| -> Option { + usage + .transferred_bytes + .checked_mul(pricing.unit_per_mb_streamed)? + .checked_div(byte_unit::MEBIBYTE) + })() + .ok_or(Error::::ArithmeticOverflow)?; + + total.storage = (|| -> Option { + usage + .stored_bytes + .checked_mul(pricing.unit_per_mb_stored)? + .checked_div(byte_unit::MEBIBYTE) + })() + .ok_or(Error::::ArithmeticOverflow)?; + + total.gets = usage + .number_of_gets + .checked_mul(pricing.unit_per_get_request) + .ok_or(Error::::ArithmeticOverflow)?; + + total.puts = usage + .number_of_puts + .checked_mul(pricing.unit_per_put_request) + .ok_or(Error::::ArithmeticOverflow)?; + + Ok(total) + } + + fn validate_batches( + batches: &BoundedBTreeSet, + max_batch_index: &BatchIndex, + ) -> DispatchResult { + // Check if the Vec contains all integers between 1 and rewarding_max_batch_index + ensure!(!batches.is_empty(), Error::::BatchesMissed); + + ensure!(*max_batch_index as usize == batches.len() - 1usize, Error::::BatchesMissed); + + for index in 0..*max_batch_index { + ensure!(batches.contains(&index), Error::::BatchesMissed); + } + + Ok(()) + } + + impl Pallet { + fn sub_account_id(cluster_id: ClusterId, era: DdcEra) -> T::AccountId { + let mut bytes = Vec::new(); + bytes.extend_from_slice(&cluster_id[..]); + bytes.extend_from_slice(&era.encode()); + let hash = blake2_128(&bytes); + + // "modl" + "payouts_" + hash is 28 bytes, the T::AccountId is 32 bytes, so we should be + // safe from the truncation and possible collisions caused by it. The rest 4 bytes will + // be fulfilled with trailing zeros. + T::PalletId::get().into_sub_account_truncating(hash) + } + } +} diff --git a/pallets/ddc-staking/Cargo.toml b/pallets/ddc-staking/Cargo.toml index 728af101a..9a4b5d0da 100644 --- a/pallets/ddc-staking/Cargo.toml +++ b/pallets/ddc-staking/Cargo.toml @@ -7,20 +7,20 @@ edition = "2021" codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false, features = ["derive"] } ddc-primitives = { version = "0.1.0", default-features = false, path = "../../primitives" } ddc-traits = { version = "0.1.0", default-features = false, path = "../../traits" } -frame-benchmarking = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31", optional = true } -frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +frame-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31", optional = true } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } -sp-io = { version = "6.0.0", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -sp-runtime = { version = "6.0.0", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -sp-std = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } [dev-dependencies] -pallet-balances = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -pallet-timestamp = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -sp-core = { version = "6.0.0", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -sp-tracing = { version = "5.0.0", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -substrate-test-utils = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +pallet-balances = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +pallet-timestamp = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sp-core = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sp-tracing = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +substrate-test-utils = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } [features] default = ["std"] diff --git a/pallets/ddc-staking/src/lib.rs b/pallets/ddc-staking/src/lib.rs index e41d3bb36..dede22dd8 100644 --- a/pallets/ddc-staking/src/lib.rs +++ b/pallets/ddc-staking/src/lib.rs @@ -48,7 +48,7 @@ use frame_system::pallet_prelude::*; pub use pallet::*; use scale_info::TypeInfo; use sp_runtime::{ - traits::{AtLeast32BitUnsigned, Saturating, StaticLookup, Zero}, + traits::{AtLeast32BitUnsigned, CheckedAdd, CheckedSub, Saturating, StaticLookup, Zero}, RuntimeDebug, SaturatedConversion, }; use sp_std::prelude::*; @@ -183,14 +183,14 @@ pub mod pallet { pub type Ledger = StorageMap<_, Blake2_128Concat, T::AccountId, StakingLedger, T>>; - /// The map of (wannabe) CDN participants stash keys to the DDC cluster ID they wish to + /// The map of (wannabe) CDN nodes participants stash keys to the DDC cluster ID they wish to /// participate into. #[pallet::storage] #[pallet::getter(fn cdns)] pub type CDNs = StorageMap<_, Twox64Concat, T::AccountId, ClusterId>; - /// The map of (wannabe) storage network participants stash keys to the DDC cluster ID they wish - /// to participate into. + /// The map of (wannabe) Storage nodes participants stash keys to the DDC cluster ID they + /// wish to participate into. #[pallet::storage] #[pallet::getter(fn storages)] pub type Storages = StorageMap<_, Twox64Concat, T::AccountId, ClusterId>; @@ -280,6 +280,9 @@ pub mod pallet { /// An account has declared desire to stop participating in CDN or storage network soon. /// \[stash, cluster, block\] ChillSoon(T::AccountId, ClusterId, T::BlockNumber), + /// An account that started participating as either a storage network or CDN participant. + /// \[stash\] + Activated(T::AccountId), } #[pallet::error] @@ -313,6 +316,14 @@ pub mod pallet { NoClusterGovParams, /// Conditions for fast chill are not met, try the regular `chill` from FastChillProhibited, + /// Serving operation is called for non-CDN node + ServingProhibited, + /// Storing operation is called for non-Storage node + StoringProhibited, + /// Arithmetic overflow occurred + ArithmeticOverflow, + /// Arithmetic underflow occurred + ArithmeticUnderflow, } #[pallet::call] @@ -411,11 +422,13 @@ pub mod pallet { let mut value = value.min(ledger.active); if !value.is_zero() { - ledger.active -= value; + ledger.active = + ledger.active.checked_sub(&value).ok_or(Error::::ArithmeticUnderflow)?; // Avoid there being a dust balance left in the staking system. if ledger.active < T::Currency::minimum_balance() { - value += ledger.active; + value = + value.checked_add(&ledger.active).ok_or(Error::::ArithmeticOverflow)?; ledger.active = Zero::zero(); } @@ -464,6 +477,7 @@ pub mod pallet { } }; + // block number + configuration -> no overflow let block = >::block_number() + unbonding_delay_in_blocks; if let Some(chunk) = ledger.unlocking.last_mut().filter(|chunk| chunk.block == block) @@ -520,7 +534,8 @@ pub mod pallet { // `consolidate_unlocked` strictly subtracts balance. if ledger.total < old_total { // Already checked that this won't overflow by entry condition. - let value = old_total - ledger.total; + let value = + old_total.checked_sub(&ledger.total).ok_or(Error::::ArithmeticUnderflow)?; Self::deposit_event(Event::::Withdrawn(stash, value)); } @@ -554,6 +569,13 @@ pub mod pallet { // Can't participate in CDN if already participating in storage network. ensure!(!Storages::::contains_key(stash), Error::::AlreadyInRole); + // Only CDN node can perform serving (i.e. streaming content) + let node_pub_key = >::get(stash).ok_or(Error::::BadState)?; + ensure!( + matches!(node_pub_key, NodePubKey::CDNPubKey(_)), + Error::::ServingProhibited + ); + // Is it an attempt to cancel a previous "chill"? if let Some(current_cluster) = Self::cdns(stash) { // Switching the cluster is prohibited. The user should chill first. @@ -564,6 +586,8 @@ pub mod pallet { } Self::do_add_cdn(stash, cluster_id); + Self::deposit_event(Event::::Activated(stash.clone())); + Ok(()) } @@ -593,6 +617,13 @@ pub mod pallet { // Can't participate in storage network if already participating in CDN. ensure!(!CDNs::::contains_key(stash), Error::::AlreadyInRole); + // Only Storage node can perform storing (i.e. saving content) + let node_pub_key = >::get(stash).ok_or(Error::::BadState)?; + ensure!( + matches!(node_pub_key, NodePubKey::StoragePubKey(_)), + Error::::StoringProhibited + ); + // Is it an attempt to cancel a previous "chill"? if let Some(current_cluster) = Self::storages(stash) { // Switching the cluster is prohibited. The user should chill first. @@ -603,6 +634,7 @@ pub mod pallet { } Self::do_add_storage(stash, cluster_id); + Self::deposit_event(Event::::Activated(stash.clone())); Ok(()) } @@ -710,6 +742,11 @@ pub mod pallet { } } + // Remove previously owned node from storage + if let Some(current_node) = Providers::::get(&stash) { + >::remove(current_node); + } + // Ensure only one node per stash. ensure!(!>::contains_key(&stash), Error::::AlreadyInRole); ensure!(!>::contains_key(&stash), Error::::AlreadyInRole); @@ -739,6 +776,7 @@ pub mod pallet { let is_cluster_node = T::ClusterVisitor::cluster_has_node(&cluster_id, &node_pub_key); ensure!(!is_cluster_node, Error::::FastChillProhibited); + // block number + 1 => no overflow let can_chill_from = >::block_number() + T::BlockNumber::from(1u32); Self::chill_stash_soon(&stash, &controller, cluster_id, can_chill_from); diff --git a/pallets/ddc-staking/src/mock.rs b/pallets/ddc-staking/src/mock.rs index 549653b92..a047f30c1 100644 --- a/pallets/ddc-staking/src/mock.rs +++ b/pallets/ddc-staking/src/mock.rs @@ -3,7 +3,7 @@ #![allow(dead_code)] use crate::{self as pallet_ddc_staking, *}; -use ddc_primitives::{CDNNodePubKey, StorageNodePubKey}; +use ddc_primitives::{CDNNodePubKey, ClusterPricingParams, StorageNodePubKey}; use ddc_traits::{ cluster::{ClusterVisitor, ClusterVisitorError}, node::{NodeVisitor, NodeVisitorError}, @@ -131,6 +131,17 @@ impl ClusterVisitor for TestClusterVisitor { ) -> Result { Ok(T::BlockNumber::from(10u32)) } + + fn get_pricing_params( + _cluster_id: &ClusterId, + ) -> Result { + Ok(ClusterPricingParams { + unit_per_mb_stored: 2, + unit_per_mb_streamed: 3, + unit_per_put_request: 4, + unit_per_get_request: 5, + }) + } } pub struct TestNodeVisitor; diff --git a/pallets/ddc-staking/src/tests.rs b/pallets/ddc-staking/src/tests.rs index 37d971bca..d0756f3d4 100644 --- a/pallets/ddc-staking/src/tests.rs +++ b/pallets/ddc-staking/src/tests.rs @@ -70,14 +70,117 @@ fn change_controller_works() { }) } +#[test] +fn not_enough_inital_bond_flow() { + ExtBuilder::default().build_and_execute(|| { + System::set_block_number(1); + + // Add new CDN participant, account 3 controlled by 4 with node 5. + assert_ok!(DdcStaking::bond( + RuntimeOrigin::signed(3), + 4, + NodePubKey::CDNPubKey(CDNNodePubKey::new([5; 32])), + 5 + )); + + // Not enough tokens bonded to serve + assert_noop!( + DdcStaking::serve(RuntimeOrigin::signed(4), ClusterId::from([1; 20])), + Error::::InsufficientBond + ); + + // Can not bond extra + assert_noop!( + DdcStaking::bond( + RuntimeOrigin::signed(3), + 4, + NodePubKey::CDNPubKey(CDNNodePubKey::new([5; 32])), + 5 + ), + Error::::AlreadyBonded + ); + + // Unbond all bonded amount + assert_ok!(DdcStaking::unbond(RuntimeOrigin::signed(4), 5)); + System::assert_last_event(Event::Unbonded(3, 5).into()); + System::set_block_number(11); + // Withdraw unbonded tokens to clear up the stash controller pair + assert_ok!(DdcStaking::withdraw_unbonded(RuntimeOrigin::signed(4))); + System::assert_last_event(Event::Withdrawn(3, 5).into()); + + // Bond sufficient amount + assert_ok!(DdcStaking::bond( + RuntimeOrigin::signed(3), + 4, + NodePubKey::CDNPubKey(CDNNodePubKey::new([5; 32])), + 10 + )); + + // Serving should work + assert_ok!(DdcStaking::serve(RuntimeOrigin::signed(4), ClusterId::from([1; 20]))); + }) +} + +#[test] +fn set_node_works() { + ExtBuilder::default().build_and_execute(|| { + System::set_block_number(1); + // 10 and 11 are bonded as stash controller. + assert_eq!(DdcStaking::bonded(&11), Some(10)); + + // Node is already paired + assert_noop!( + DdcStaking::set_node( + RuntimeOrigin::signed(10), + NodePubKey::CDNPubKey(CDNNodePubKey::new([12; 32])) + ), + Error::::AlreadyPaired + ); + + // Node cannot be changed + assert_noop!( + DdcStaking::set_node( + RuntimeOrigin::signed(11), + NodePubKey::CDNPubKey(CDNNodePubKey::new([12; 32])) + ), + Error::::AlreadyInRole + ); + + // Schedule CDN participant removal. + assert_ok!(DdcStaking::chill(RuntimeOrigin::signed(10))); + System::set_block_number(11); + // Actual CDN participant removal. + assert_ok!(DdcStaking::chill(RuntimeOrigin::signed(10))); + + // Setting node should work + assert_ok!(DdcStaking::set_node( + RuntimeOrigin::signed(11), + NodePubKey::CDNPubKey(CDNNodePubKey::new([13; 32])) + )); + }) +} + #[test] fn staking_should_work() { ExtBuilder::default().build_and_execute(|| { + System::set_block_number(1); + // Put some money in account that we'll use. for i in 1..5 { let _ = Balances::make_free_balance_be(&i, 2000); } + // Bond dust should fail + assert_noop!( + DdcStaking::bond( + RuntimeOrigin::signed(3), + 4, + NodePubKey::CDNPubKey(CDNNodePubKey::new([5; 32])), + 0 + ), + Error::::InsufficientBond + ); + // Add new CDN participant, account 3 controlled by 4 with node 5. assert_ok!(DdcStaking::bond( RuntimeOrigin::signed(3), @@ -85,7 +188,31 @@ fn staking_should_work() { NodePubKey::CDNPubKey(CDNNodePubKey::new([5; 32])), 1500 )); + System::assert_last_event(Event::Bonded(3, 1500).into()); assert_ok!(DdcStaking::serve(RuntimeOrigin::signed(4), ClusterId::from([0; 20]))); + System::assert_last_event(Event::Activated(3).into()); + + // Controller already paired + assert_noop!( + DdcStaking::bond( + RuntimeOrigin::signed(5), + 4, + NodePubKey::CDNPubKey(CDNNodePubKey::new([10; 32])), + 10 + ), + Error::::AlreadyPaired + ); + + // Node already paired + assert_noop!( + DdcStaking::bond( + RuntimeOrigin::signed(5), + 6, + NodePubKey::CDNPubKey(CDNNodePubKey::new([5; 32])), + 10 + ), + Error::::AlreadyPaired + ); // Account 4 controls the stash from account 3, which is 1500 units, 3 is a CDN // participant, 5 is a DDC node. @@ -103,12 +230,12 @@ fn staking_should_work() { assert_eq!(DdcStaking::cdns(3), Some(ClusterId::from([0; 20]))); assert_eq!(DdcStaking::nodes(NodePubKey::CDNPubKey(CDNNodePubKey::new([5; 32]))), Some(3)); - // Set `CurrentEra`. + // Set initial block timestamp. Timestamp::set_timestamp(System::block_number() * BLOCK_TIME + INIT_TIMESTAMP); - DdcStaking::on_finalize(System::block_number()); // Schedule CDN participant removal. assert_ok!(DdcStaking::chill(RuntimeOrigin::signed(4))); + System::assert_last_event(Event::ChillSoon(3, ClusterId::from([0; 20]), 11).into()); // Removal is scheduled, stashed value of 4 is still lock. let chilling = System::block_number() + 10u64; @@ -128,11 +255,19 @@ fn staking_should_work() { assert_noop!(Balances::reserve(&3, 501), BalancesError::::LiquidityRestrictions); assert_ok!(Balances::reserve(&3, 409)); - // Set `CurrentEra` to the value allows us to chill. + // Too early to call chill the second time + assert_noop!(DdcStaking::chill(RuntimeOrigin::signed(4)), Error::::TooEarly); + + // Fast chill should not be allowed + assert_noop!( + DdcStaking::fast_chill(RuntimeOrigin::signed(4)), + Error::::FastChillProhibited + ); + + // Set the block number that allows us to chill. while System::block_number() < chilling { System::set_block_number(System::block_number() + 1); Timestamp::set_timestamp(System::block_number() * BLOCK_TIME + INIT_TIMESTAMP); - DdcStaking::on_finalize(System::block_number()); } // Ledger is not changed until we make another call to `chill`. @@ -149,6 +284,7 @@ fn staking_should_work() { // Actual CDN participant removal. assert_ok!(DdcStaking::chill(RuntimeOrigin::signed(4))); + System::assert_last_event(Event::Chilled(3).into()); // Account 3 is no longer a CDN participant. assert_eq!(DdcStaking::cdns(3), None); diff --git a/pallets/ddc/Cargo.toml b/pallets/ddc/Cargo.toml index c9e60b1c2..1321a638e 100644 --- a/pallets/ddc/Cargo.toml +++ b/pallets/ddc/Cargo.toml @@ -14,16 +14,16 @@ targets = ['x86_64-unknown-linux-gnu'] [dependencies] codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false, features = ["derive"] } -frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } -sp-io = { version = "6.0.0", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -sp-runtime = { version = "6.0.0", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -sp-std = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } [dev-dependencies] serde = { version = "1.0.101" } -sp-core = { version = "6.0.0", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sp-core = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } [features] default = ['std'] diff --git a/pallets/ddc/README.md b/pallets/ddc/README.md index 9a6144ff4..f943ea5be 100644 --- a/pallets/ddc/README.md +++ b/pallets/ddc/README.md @@ -58,7 +58,7 @@ Import the CereDDCModule and derive your runtime configuration traits from the C 1. In ./bin/node/runtime/Cargo.toml add: ```rust - frame-executive = { version = "4.0.0-dev", default-features = false, path = "../../../frame/executive" } + frame-executive = { default-features = false, path = "../../../frame/executive" } ... pallet-cere-ddc = { version = "7.3.0", default-features = false, path = "../../../frame/ddc-pallet" } ``` diff --git a/pallets/erc20/Cargo.toml b/pallets/erc20/Cargo.toml index 19620e68f..72394b0ae 100644 --- a/pallets/erc20/Cargo.toml +++ b/pallets/erc20/Cargo.toml @@ -14,17 +14,17 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false } -frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -pallet-balances = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +pallet-balances = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } pallet-chainbridge = { version = "4.2.0", default-features = false, path = "../chainbridge" } pallet-erc721 = { version = "4.2.0", default-features = false, path = "../erc721" } scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } -sp-arithmetic = { version = "5.0.0", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31", default-features = false } -sp-core = { version = "6.0.0", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31", default-features = false } -sp-io = { version = "6.0.0", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -sp-runtime = { version = "6.0.0", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -sp-std = { version = "4.0.0", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sp-arithmetic = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31", default-features = false } +sp-core = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31", default-features = false } +sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } [features] default = ["std"] diff --git a/pallets/erc721/Cargo.toml b/pallets/erc721/Cargo.toml index d0477b3d3..9ade33e51 100644 --- a/pallets/erc721/Cargo.toml +++ b/pallets/erc721/Cargo.toml @@ -14,15 +14,15 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false } -frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -pallet-balances = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +pallet-balances = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } pallet-chainbridge = { version = "4.2.0", default-features = false, path = "../chainbridge" } scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } -sp-core = { version = "6.0.0", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31", default-features = false } -sp-io = { version = "6.0.0", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -sp-runtime = { version = "6.0.0", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -sp-std = { version = "4.0.0", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sp-core = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31", default-features = false } +sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } [features] default = ["std"] diff --git a/primitives/Cargo.toml b/primitives/Cargo.toml index fe6041dd8..13d062734 100644 --- a/primitives/Cargo.toml +++ b/primitives/Cargo.toml @@ -7,9 +7,8 @@ edition = "2021" codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false, features = ["derive"] } scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } serde = { version = "1.0.136", default-features = false, features = ["derive"], optional = true } - -sp-core = { version = "6.0.0", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -sp-runtime = { version = "6.0.0", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } [features] default = ["std"] diff --git a/primitives/src/lib.rs b/primitives/src/lib.rs index 0564f3c16..7ac05a660 100644 --- a/primitives/src/lib.rs +++ b/primitives/src/lib.rs @@ -4,16 +4,20 @@ use codec::{Decode, Encode}; use scale_info::TypeInfo; #[cfg(feature = "std")] use serde::{Deserialize, Serialize}; - use sp_core::hash::H160; use sp_runtime::{AccountId32, RuntimeDebug}; - pub type ClusterId = H160; +pub type DdcEra = u32; pub type BucketId = u64; - pub type StorageNodePubKey = AccountId32; pub type CDNNodePubKey = AccountId32; - +#[derive(Clone, Encode, Decode, RuntimeDebug, TypeInfo, PartialEq)] +pub struct ClusterPricingParams { + pub unit_per_mb_stored: u128, + pub unit_per_mb_streamed: u128, + pub unit_per_put_request: u128, + pub unit_per_get_request: u128, +} #[cfg_attr(feature = "std", derive(Serialize, Deserialize))] #[derive(Clone, Encode, Decode, RuntimeDebug, TypeInfo, PartialEq)] pub enum NodePubKey { diff --git a/rpc/Cargo.toml b/rpc/Cargo.toml index 156e7071a..4d8ba3610 100644 --- a/rpc/Cargo.toml +++ b/rpc/Cargo.toml @@ -5,25 +5,26 @@ edition = "2021" [dependencies] jsonrpsee = { version = "0.15.1", features = ["server"] } -node-primitives = { version = "2.0.0", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -pallet-transaction-payment-rpc = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } -sc-chain-spec = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } -sc-client-api = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } -sc-consensus-babe = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } -sc-consensus-babe-rpc = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } -sc-consensus-epochs = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } -sc-finality-grandpa = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } -sc-finality-grandpa-rpc = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } -sc-rpc = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } -sc-rpc-api = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -sc-sync-state-rpc = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } -sc-transaction-pool-api = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -sp-api = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } -sp-block-builder = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } -sp-blockchain = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } -sp-consensus = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } -sp-consensus-babe = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } -sp-keystore = { version = "0.12.0", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } -sp-runtime = { version = "6.0.0", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } -substrate-frame-rpc-system = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } -substrate-state-trie-migration-rpc = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" } +node-primitives = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +pallet-contracts-rpc = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sc-chain-spec = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sc-client-api = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sc-consensus-babe = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sc-consensus-babe-rpc = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sc-consensus-epochs = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sc-finality-grandpa = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sc-finality-grandpa-rpc = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sc-rpc = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sc-rpc-api = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sc-sync-state-rpc = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sc-transaction-pool-api = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sp-api = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sp-block-builder = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sp-blockchain = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sp-consensus = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sp-consensus-babe = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sp-keystore = { version = "0.12.0", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sp-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +substrate-frame-rpc-system = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +substrate-state-trie-migration-rpc = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } diff --git a/runtime/cere-dev/Cargo.toml b/runtime/cere-dev/Cargo.toml index e93b8b039..109e705fc 100644 --- a/runtime/cere-dev/Cargo.toml +++ b/runtime/cere-dev/Cargo.toml @@ -20,88 +20,90 @@ scale-info = { version = "2.1.2", default-features = false, features = ["derive" static_assertions = "1.1.0" # primitives -node-primitives = { version = "2.0.0", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -sp-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -sp-authority-discovery = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +node-primitives = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sp-api = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sp-authority-discovery = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } sp-block-builder = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31", default-features = false, version = "4.0.0-dev" } -sp-consensus-babe = { version = "0.10.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -sp-core = { version = "6.0.0", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -sp-inherents = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -sp-io = { version = "6.0.0", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -sp-offchain = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -sp-runtime = { version = "6.0.0", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -sp-session = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -sp-staking = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -sp-std = { version = "4.0.0", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -sp-transaction-pool = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -sp-version = { version = "5.0.0", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sp-consensus-babe = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sp-inherents = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sp-offchain = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sp-session = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sp-staking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sp-transaction-pool = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sp-version = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } # frame dependencies cere-dev-runtime-constants = { path = "./constants", default-features = false } cere-runtime-common = { path = "../common", default-features = false } -frame-benchmarking = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31", optional = true } -frame-election-provider-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -frame-executive = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -frame-system-benchmarking = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31", optional = true } -frame-system-rpc-runtime-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -frame-try-runtime = { version = "0.10.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31", optional = true } -pallet-authority-discovery = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -pallet-authorship = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -pallet-babe = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -pallet-bags-list = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -pallet-balances = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -pallet-bounties = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +frame-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31", optional = true } +frame-election-provider-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +frame-executive = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +frame-system-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31", optional = true } +frame-system-rpc-runtime-api = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +frame-try-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31", optional = true } +pallet-authority-discovery = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +pallet-authorship = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +pallet-babe = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +pallet-bags-list = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +pallet-balances = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +pallet-bounties = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } pallet-cere-ddc = { version = "4.8.1", default-features = false, path = "../../pallets/ddc" } pallet-chainbridge = { version = "4.8.1", default-features = false, path = "../../pallets/chainbridge" } -pallet-child-bounties = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -pallet-collective = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -pallet-contracts = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -pallet-contracts-primitives = { version = "6.0.0", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +pallet-child-bounties = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +pallet-collective = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +pallet-contracts = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +pallet-contracts-primitives = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +pallet-contracts-rpc-runtime-api = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } pallet-ddc-clusters = { version = "4.8.1", default-features = false, path = "../../pallets/ddc-clusters" } pallet-ddc-customers = { version = "0.1.0", default-features = false, path = "../../pallets/ddc-customers" } pallet-ddc-metrics-offchain-worker = { version = "4.8.1", default-features = false, path = "../../pallets/ddc-metrics-offchain-worker" } pallet-ddc-nodes = { version = "4.8.1", default-features = false, path = "../../pallets/ddc-nodes" } +pallet-ddc-payouts = { version = "4.8.1", default-features = false, path = "../../pallets/ddc-payouts" } pallet-ddc-staking = { version = "4.8.1", default-features = false, path = "../../pallets/ddc-staking" } -pallet-democracy = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -pallet-election-provider-multi-phase = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -pallet-election-provider-support-benchmarking = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31", optional = true } -pallet-elections-phragmen = { version = "5.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +pallet-democracy = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +pallet-election-provider-multi-phase = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +pallet-election-provider-support-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31", optional = true } +pallet-elections-phragmen = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } pallet-erc20 = { version = "4.8.1", default-features = false, path = "../../pallets/erc20" } pallet-erc721 = { version = "4.8.1", default-features = false, path = "../../pallets/erc721" } -pallet-fast-unstake = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.31" } -pallet-grandpa = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -pallet-identity = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -pallet-im-online = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -pallet-indices = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -pallet-membership = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -pallet-multisig = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -pallet-nomination-pools = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.31" } -pallet-nomination-pools-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true, branch = "polkadot-v0.9.31" } -pallet-nomination-pools-runtime-api = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.31" } -pallet-offences = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -pallet-offences-benchmarking = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31", default-features = false, optional = true } -pallet-proxy = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -pallet-randomness-collective-flip = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -pallet-recovery = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -pallet-scheduler = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -pallet-session = { version = "4.0.0-dev", features = ["historical"], git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31", default-features = false } -pallet-session-benchmarking = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31", default-features = false, optional = true } -pallet-society = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -pallet-staking = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -pallet-staking-reward-curve = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -pallet-sudo = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -pallet-timestamp = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -pallet-tips = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -pallet-transaction-payment = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -pallet-transaction-payment-rpc-runtime-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -pallet-treasury = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -pallet-utility = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -pallet-vesting = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +pallet-fast-unstake = { git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "polkadot-v0.9.31" } +pallet-grandpa = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +pallet-identity = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +pallet-im-online = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +pallet-indices = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +pallet-membership = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +pallet-multisig = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +pallet-nomination-pools = { git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "polkadot-v0.9.31" } +pallet-nomination-pools-benchmarking = { git = "https://github.com/paritytech/substrate.git", default-features = false, optional = true, branch = "polkadot-v0.9.31" } +pallet-nomination-pools-runtime-api = { git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "polkadot-v0.9.31" } +pallet-offences = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +pallet-offences-benchmarking = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31", default-features = false, optional = true } +pallet-proxy = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +pallet-randomness-collective-flip = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +pallet-recovery = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +pallet-scheduler = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +pallet-session = { features = ["historical"], git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31", default-features = false } +pallet-session-benchmarking = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31", default-features = false, optional = true } +pallet-society = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +pallet-staking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +pallet-staking-reward-curve = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +pallet-sudo = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +pallet-timestamp = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +pallet-tips = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +pallet-transaction-payment = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +pallet-transaction-payment-rpc-runtime-api = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +pallet-treasury = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +pallet-utility = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +pallet-vesting = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } [build-dependencies] -substrate-wasm-builder = { version = "5.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +substrate-wasm-builder = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } [features] default = ["std"] @@ -121,6 +123,7 @@ std = [ "pallet-collective/std", "pallet-contracts/std", "pallet-contracts-primitives/std", + "pallet-contracts-rpc-runtime-api/std", "pallet-democracy/std", "pallet-fast-unstake/std", "pallet-elections-phragmen/std", @@ -180,6 +183,7 @@ std = [ "pallet-ddc-customers/std", "pallet-ddc-nodes/std", "pallet-ddc-clusters/std", + "pallet-ddc-payouts/std", ] runtime-benchmarks = [ "frame-benchmarking/runtime-benchmarks", diff --git a/runtime/cere-dev/constants/Cargo.toml b/runtime/cere-dev/constants/Cargo.toml index be074e736..3c42af3f5 100644 --- a/runtime/cere-dev/constants/Cargo.toml +++ b/runtime/cere-dev/constants/Cargo.toml @@ -5,7 +5,7 @@ authors = ["Parity Technologies "] edition = "2021" [dependencies] -node-primitives = { version = "2.0.0", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +node-primitives = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } [features] default = ["std"] diff --git a/runtime/cere-dev/src/lib.rs b/runtime/cere-dev/src/lib.rs index cb40e59a5..c90180ee3 100644 --- a/runtime/cere-dev/src/lib.rs +++ b/runtime/cere-dev/src/lib.rs @@ -52,6 +52,7 @@ pub use pallet_ddc_clusters; pub use pallet_ddc_customers; pub use pallet_ddc_metrics_offchain_worker; pub use pallet_ddc_nodes; +pub use pallet_ddc_payouts; pub use pallet_ddc_staking; use pallet_election_provider_multi_phase::SolutionAccuracyOf; use pallet_grandpa::{ @@ -129,7 +130,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { // and set impl_version to 0. If only runtime // implementation changes and behavior does not, then leave spec_version as // is and increment impl_version. - spec_version: 48013, + spec_version: 48015, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 6, @@ -1354,6 +1355,18 @@ impl pallet_ddc_clusters::Config for Runtime { type Currency = Balances; } +parameter_types! { + pub const PayoutsPalletId: PalletId = PalletId(*b"payouts_"); +} + +impl pallet_ddc_payouts::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type PalletId = PayoutsPalletId; + type Currency = Balances; + type CustomerCharger = DdcCustomers; + type ClusterVisitor = DdcClusters; +} + construct_runtime!( pub enum Runtime where Block = Block, @@ -1408,7 +1421,8 @@ construct_runtime!( DdcStaking: pallet_ddc_staking, DdcCustomers: pallet_ddc_customers, DdcNodes: pallet_ddc_nodes, - DdcClusters: pallet_ddc_clusters + DdcClusters: pallet_ddc_clusters, + DdcPayouts: pallet_ddc_payouts } ); diff --git a/runtime/cere/Cargo.toml b/runtime/cere/Cargo.toml index 0dc5b2594..a3bc0c79c 100644 --- a/runtime/cere/Cargo.toml +++ b/runtime/cere/Cargo.toml @@ -20,84 +20,85 @@ scale-info = { version = "2.1.2", default-features = false, features = ["derive" static_assertions = "1.1.0" # primitives -node-primitives = { version = "2.0.0", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -sp-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -sp-authority-discovery = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +node-primitives = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sp-api = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sp-authority-discovery = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } sp-block-builder = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31", default-features = false, version = "4.0.0-dev" } -sp-consensus-babe = { version = "0.10.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -sp-core = { version = "6.0.0", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -sp-inherents = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -sp-io = { version = "6.0.0", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -sp-offchain = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -sp-runtime = { version = "6.0.0", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -sp-session = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -sp-staking = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -sp-std = { version = "4.0.0", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -sp-transaction-pool = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -sp-version = { version = "5.0.0", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sp-consensus-babe = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sp-inherents = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sp-offchain = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sp-session = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sp-staking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sp-transaction-pool = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +sp-version = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } # frame dependencies cere-runtime-common = { path = "../common", default-features = false } cere-runtime-constants = { path = "./constants", default-features = false } -frame-benchmarking = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31", optional = true } -frame-election-provider-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -frame-executive = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -frame-system-benchmarking = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31", optional = true } -frame-system-rpc-runtime-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -frame-try-runtime = { version = "0.10.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31", optional = true } -pallet-authority-discovery = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -pallet-authorship = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -pallet-babe = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -pallet-bags-list = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -pallet-balances = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -pallet-bounties = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +frame-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31", optional = true } +frame-election-provider-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +frame-executive = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +frame-system-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31", optional = true } +frame-system-rpc-runtime-api = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +frame-try-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31", optional = true } +pallet-authority-discovery = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +pallet-authorship = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +pallet-babe = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +pallet-bags-list = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +pallet-balances = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +pallet-bounties = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } pallet-cere-ddc = { version = "4.8.1", default-features = false, path = "../../pallets/ddc" } pallet-chainbridge = { version = "4.8.1", default-features = false, path = "../../pallets/chainbridge" } -pallet-child-bounties = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -pallet-collective = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -pallet-contracts = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -pallet-contracts-primitives = { version = "6.0.0", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +pallet-child-bounties = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +pallet-collective = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +pallet-contracts = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +pallet-contracts-primitives = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +pallet-contracts-rpc-runtime-api = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } pallet-ddc-metrics-offchain-worker = { version = "4.8.1", default-features = false, path = "../../pallets/ddc-metrics-offchain-worker" } -pallet-democracy = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -pallet-election-provider-multi-phase = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -pallet-election-provider-support-benchmarking = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31", optional = true } -pallet-elections-phragmen = { version = "5.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +pallet-democracy = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +pallet-election-provider-multi-phase = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +pallet-election-provider-support-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31", optional = true } +pallet-elections-phragmen = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } pallet-erc20 = { version = "4.8.1", default-features = false, path = "../../pallets/erc20" } pallet-erc721 = { version = "4.8.1", default-features = false, path = "../../pallets/erc721" } -pallet-fast-unstake = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.31" } -pallet-grandpa = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -pallet-identity = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -pallet-im-online = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -pallet-indices = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -pallet-membership = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -pallet-multisig = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -pallet-nomination-pools = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.31" } -pallet-nomination-pools-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true, branch = "polkadot-v0.9.31" } -pallet-nomination-pools-runtime-api = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.31" } -pallet-offences = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -pallet-offences-benchmarking = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31", default-features = false, optional = true } -pallet-proxy = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -pallet-randomness-collective-flip = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -pallet-recovery = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -pallet-scheduler = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -pallet-session = { version = "4.0.0-dev", features = ["historical"], git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31", default-features = false } -pallet-session-benchmarking = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31", default-features = false, optional = true } -pallet-society = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -pallet-staking = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -pallet-staking-reward-curve = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -pallet-sudo = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -pallet-timestamp = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -pallet-tips = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -pallet-transaction-payment = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -pallet-transaction-payment-rpc-runtime-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -pallet-treasury = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -pallet-utility = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } -pallet-vesting = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +pallet-fast-unstake = { git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "polkadot-v0.9.31" } +pallet-grandpa = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +pallet-identity = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +pallet-im-online = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +pallet-indices = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +pallet-membership = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +pallet-multisig = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +pallet-nomination-pools = { git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "polkadot-v0.9.31" } +pallet-nomination-pools-benchmarking = { git = "https://github.com/paritytech/substrate.git", default-features = false, optional = true, branch = "polkadot-v0.9.31" } +pallet-nomination-pools-runtime-api = { git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "polkadot-v0.9.31" } +pallet-offences = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +pallet-offences-benchmarking = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31", default-features = false, optional = true } +pallet-proxy = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +pallet-randomness-collective-flip = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +pallet-recovery = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +pallet-scheduler = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +pallet-session = { features = ["historical"], git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31", default-features = false } +pallet-session-benchmarking = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31", default-features = false, optional = true } +pallet-society = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +pallet-staking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +pallet-staking-reward-curve = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +pallet-sudo = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +pallet-timestamp = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +pallet-tips = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +pallet-transaction-payment = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +pallet-transaction-payment-rpc-runtime-api = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +pallet-treasury = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +pallet-utility = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +pallet-vesting = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } [build-dependencies] -substrate-wasm-builder = { version = "5.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +substrate-wasm-builder = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } [features] default = ["std"] @@ -117,6 +118,7 @@ std = [ "pallet-collective/std", "pallet-contracts/std", "pallet-contracts-primitives/std", + "pallet-contracts-rpc-runtime-api/std", "pallet-democracy/std", "pallet-fast-unstake/std", "pallet-elections-phragmen/std", diff --git a/runtime/cere/constants/Cargo.toml b/runtime/cere/constants/Cargo.toml index adffb6019..e53040e30 100644 --- a/runtime/cere/constants/Cargo.toml +++ b/runtime/cere/constants/Cargo.toml @@ -5,7 +5,7 @@ authors = ["Parity Technologies "] edition = "2021" [dependencies] -node-primitives = { version = "2.0.0", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +node-primitives = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } [features] default = ["std"] diff --git a/runtime/common/Cargo.toml b/runtime/common/Cargo.toml index 86f70eb4f..b9bfac83f 100644 --- a/runtime/common/Cargo.toml +++ b/runtime/common/Cargo.toml @@ -13,4 +13,4 @@ std = [] frame-support = { git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "polkadot-v0.9.31" } node-primitives = { git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "polkadot-v0.9.31" } sp-core = { git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "polkadot-v0.9.31" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.31" } +sp-runtime = { git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "polkadot-v0.9.31" } diff --git a/traits/Cargo.toml b/traits/Cargo.toml index 0e7f2ecdc..e24da706f 100644 --- a/traits/Cargo.toml +++ b/traits/Cargo.toml @@ -4,5 +4,6 @@ version = "0.1.0" edition = "2021" [dependencies] -ddc-primitives = { version = "0.1.0", default-features = false, path = "../primitives" } -frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31" } +ddc-primitives = { path = "../primitives", default-features = false } +frame-system = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.31", default-features = false } diff --git a/traits/src/cluster.rs b/traits/src/cluster.rs index bbd21ed32..cdb3a5e21 100644 --- a/traits/src/cluster.rs +++ b/traits/src/cluster.rs @@ -1,4 +1,4 @@ -use ddc_primitives::{ClusterId, NodePubKey, NodeType}; +use ddc_primitives::{ClusterId, ClusterPricingParams, NodePubKey, NodeType}; use frame_system::Config; pub trait ClusterVisitor { @@ -11,6 +11,10 @@ pub trait ClusterVisitor { node_type: NodeType, ) -> Result; + fn get_pricing_params( + cluster_id: &ClusterId, + ) -> Result; + fn get_chill_delay( cluster_id: &ClusterId, node_type: NodeType, diff --git a/traits/src/customer.rs b/traits/src/customer.rs new file mode 100644 index 000000000..73bbf784a --- /dev/null +++ b/traits/src/customer.rs @@ -0,0 +1,8 @@ +pub trait CustomerCharger { + // todo: WIP for decoupling payout and customers + fn charge_content_owner( + content_owner: T::AccountId, + billing_vault: T::AccountId, + amount: u128, + ) -> sp_runtime::DispatchResult; +} diff --git a/traits/src/lib.rs b/traits/src/lib.rs index 35d286602..dc252fc3b 100644 --- a/traits/src/lib.rs +++ b/traits/src/lib.rs @@ -1,5 +1,5 @@ #![cfg_attr(not(feature = "std"), no_std)] - pub mod cluster; +pub mod customer; pub mod node; pub mod staking;