From 4464ed9ff17f43c34e1825cf083b819a315f987b Mon Sep 17 00:00:00 2001 From: librelois <c@elo.tf> Date: Sat, 8 Jan 2022 02:36:50 +0100 Subject: [PATCH] upgrade substrate to monthly-2022-01 --- Cargo.lock | 2800 ++++++++++-------------- Cargo.toml | 65 +- node/Cargo.toml | 154 +- node/src/chain_spec/gdev.rs | 3 +- node/src/chain_spec/gtest.rs | 6 +- node/src/command.rs | 20 +- node/src/rpc.rs | 6 +- node/src/service.rs | 265 +-- node/src/service/client.rs | 179 +- pallets/certification/Cargo.toml | 35 +- pallets/certification/src/lib.rs | 507 +++-- pallets/certification/src/mock.rs | 4 +- pallets/certification/src/traits.rs | 4 + pallets/certification/src/types.rs | 44 + pallets/identity/Cargo.toml | 35 +- pallets/identity/src/lib.rs | 106 +- pallets/identity/src/mock.rs | 7 +- pallets/identity/src/traits.rs | 33 +- pallets/identity/src/types.rs | 84 + pallets/ud-accounts-storage/Cargo.toml | 39 +- pallets/ud-accounts-storage/src/lib.rs | 7 +- pallets/universal-dividend/Cargo.toml | 47 +- pallets/universal-dividend/src/lib.rs | 6 +- pallets/universal-dividend/src/mock.rs | 4 +- runtime/common/Cargo.toml | 29 +- runtime/common/src/apis.rs | 6 +- runtime/common/src/authorizations.rs | 92 +- runtime/common/src/entities.rs | 12 +- runtime/common/src/handlers.rs | 36 +- runtime/common/src/pallets_config.rs | 13 +- runtime/common/src/providers.rs | 27 +- runtime/g1/Cargo.toml | 113 +- runtime/g1/src/lib.rs | 10 +- runtime/g1/src/parameters.rs | 5 + runtime/gdev/Cargo.toml | 113 +- runtime/gdev/src/lib.rs | 8 +- runtime/gdev/src/parameters.rs | 5 + runtime/gtest/Cargo.toml | 113 +- runtime/gtest/src/lib.rs | 10 +- runtime/gtest/src/parameters.rs | 5 + rust-toolchain | 4 +- 41 files changed, 2373 insertions(+), 2688 deletions(-) create mode 100644 pallets/certification/src/types.rs create mode 100644 pallets/identity/src/types.rs diff --git a/Cargo.lock b/Cargo.lock index eecbf7959..6a425298c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -14,20 +14,20 @@ dependencies = [ [[package]] name = "addr2line" -version = "0.15.2" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7a2e47a1fbe209ee101dd6d61285226744c6c8d3c21c8dc878ba6cb9f467f3a" +checksum = "3e61f2b7f93d2c7d2b08263acaa4a363b3e276806c68af6134c44f523bf1aacd" dependencies = [ - "gimli 0.24.0", + "gimli 0.25.0", ] [[package]] name = "addr2line" -version = "0.16.0" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e61f2b7f93d2c7d2b08263acaa4a363b3e276806c68af6134c44f523bf1aacd" +checksum = "b9ecd88a8c8378ca913a680cd98f0f13ac67383d35993f86c90a70e3f137816b" dependencies = [ - "gimli 0.25.0", + "gimli 0.26.1", ] [[package]] @@ -38,56 +38,37 @@ checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" [[package]] name = "aead" -version = "0.3.2" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fc95d1bdb8e6666b2b217308eeeb09f2d6728d104be3e31916cc74d15420331" +checksum = "0b613b8e1e3cf911a086f53f03bf286f52fd7a7258e4fa606f0ef220d39d8877" dependencies = [ "generic-array 0.14.4", ] [[package]] name = "aes" -version = "0.5.0" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd2bc6d3f370b5666245ff421e231cba4353df936e26986d2918e61a8fd6aef6" +checksum = "9e8b47f52ea9bae42228d07ec09eb676433d7c4ed1ebdf0f1d1c29ed446f1ab8" dependencies = [ - "aes-soft", - "aesni", - "block-cipher", + "cfg-if 1.0.0", + "cipher", + "cpufeatures 0.2.1", + "opaque-debug 0.3.0", ] [[package]] name = "aes-gcm" -version = "0.7.0" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0301c9e9c443494d970a07885e8cf3e587bae8356a1d5abd0999068413f7205f" +checksum = "df5f85a83a7d8b0442b6aa7b504b8212c1733da07b98aae43d4bc21b2cb3cdf6" dependencies = [ "aead", "aes", - "block-cipher", + "cipher", + "ctr", "ghash", - "subtle 2.4.1", -] - -[[package]] -name = "aes-soft" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63dd91889c49327ad7ef3b500fd1109dbd3c509a03db0d4a9ce413b79f575cb6" -dependencies = [ - "block-cipher", - "byteorder", - "opaque-debug 0.3.0", -] - -[[package]] -name = "aesni" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a6fe808308bb07d393e2ea47780043ec47683fcf19cf5efc8ca51c50cc8c68a" -dependencies = [ - "block-cipher", - "opaque-debug 0.3.0", + "subtle", ] [[package]] @@ -279,16 +260,16 @@ dependencies = [ [[package]] name = "async-std" -version = "1.9.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9f06685bad74e0570f5213741bea82158279a4103d988e57bfada11ad230341" +checksum = "f8056f1455169ab86dd47b47391e4ab0cbd25410a70e9fe675544f49bafaf952" dependencies = [ "async-channel", "async-global-executor", "async-io", "async-lock", "async-process", - "crossbeam-utils 0.8.5", + "crossbeam-utils", "futures-channel", "futures-core", "futures-io", @@ -342,7 +323,7 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fb4401f0a3622dad2e0763fa79e0eb328bc70fb7dccfdd645341f00d671247d6" dependencies = [ - "bytes 1.0.1", + "bytes 1.1.0", "futures-sink", "futures-util", "memchr", @@ -355,7 +336,7 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0de5164e5edbf51c45fb8c2d9664ae1c095cce1b265ecf7569093c0d66ef690" dependencies = [ - "bytes 1.0.1", + "bytes 1.1.0", "futures-sink", "futures-util", "memchr", @@ -396,16 +377,16 @@ checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" [[package]] name = "backtrace" -version = "0.3.61" +version = "0.3.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7a905d892734eea339e896738c14b9afce22b5318f64b951e70bf3844419b01" +checksum = "321629d8ba6513061f26707241fa9bc89524ff1cd7a915a97ef0c62c666ce1b6" dependencies = [ - "addr2line 0.16.0", + "addr2line 0.17.0", "cc", "cfg-if 1.0.0", "libc", "miniz_oxide", - "object 0.26.1", + "object", "rustc-demangle", ] @@ -417,21 +398,21 @@ checksum = "a4521f3e3d031370679b3b140beb36dfe4801b09ac77e30c61941f97df3ef28b" [[package]] name = "base58" -version = "0.1.0" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5024ee8015f02155eee35c711107ddd9a9bf3cb689cf2a9089c97e79b6e1ae83" +checksum = "6107fe1be6682a68940da878d9e9f5e90ca5745b3dec9fd1bb393c8777d4f581" [[package]] name = "base64" -version = "0.12.3" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff" +checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" [[package]] -name = "base64" -version = "0.13.0" +name = "bimap" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" +checksum = "50ae17cabbc8a38a1e3e4c1a6a664e9a09672dc14d0896fa8d865d3a5a446b07" [[package]] name = "bincode" @@ -571,15 +552,6 @@ dependencies = [ "generic-array 0.14.4", ] -[[package]] -name = "block-cipher" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f337a3e6da609650eb74e02bc9fac7b735049f7623ab12f2e4c719316fcc7e80" -dependencies = [ - "generic-array 0.14.4", -] - [[package]] name = "block-padding" version = "0.1.5" @@ -664,21 +636,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "206fdffcfa2df7cbe15601ef46c813fce0965eb3286db6b56c583b814b51c81c" dependencies = [ "byteorder", - "either", "iovec", ] [[package]] name = "bytes" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e4cec68f03f32e44924783795810fa50a7035d8c8ebe78580ad7e6c703fba38" - -[[package]] -name = "bytes" -version = "1.0.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b700ce4376041dcd0a327fd0097c41095743c4c8af8887265942faf1100bd040" +checksum = "c4872d67bab6358e59559027aa3b9157c53d9358c51423c17554809a8858e0f8" [[package]] name = "cache-padded" @@ -706,14 +671,13 @@ dependencies = [ [[package]] name = "cargo_metadata" -version = "0.13.1" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "081e3f0755c1f380c2d010481b6fa2e02973586d5f2b24eebb7a2a1d98b143d8" +checksum = "ba2ae6de944143141f6155a473a6b02f66c7c3f9f47316f802f80204ebfe6e12" dependencies = [ "camino", "cargo-platform", - "semver 0.11.0", - "semver-parser 0.10.2", + "semver 1.0.4", "serde", "serde_json", ] @@ -750,24 +714,26 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chacha20" -version = "0.5.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "244fbce0d47e97e8ef2f63b81d5e05882cb518c68531eb33194990d7b7e85845" +checksum = "fee7ad89dc1128635074c268ee661f90c3f7e83d9fd12910608c36b47d6c3412" dependencies = [ - "stream-cipher", + "cfg-if 1.0.0", + "cipher", + "cpufeatures 0.1.5", "zeroize", ] [[package]] name = "chacha20poly1305" -version = "0.6.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bf18d374d66df0c05cdddd528a7db98f78c28e2519b120855c4f84c5027b1f5" +checksum = "1580317203210c517b6d44794abfbe600698276db18127e37ad3e69bf5e848e5" dependencies = [ "aead", "chacha20", + "cipher", "poly1305", - "stream-cipher", "zeroize", ] @@ -791,15 +757,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff0e3bc0b6446b3f9663c1a6aba6ef06c5aeaa1bc92bd18077be337198ab9768" dependencies = [ "multibase", - "multihash", + "multihash 0.13.2", "unsigned-varint 0.5.1", ] [[package]] name = "cipher" -version = "0.2.5" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12f8e7987cbd042a63249497f41aed09f8e65add917ea6566effbc56578d6801" +checksum = "7ee52072ec15386f770805afd189a01c8841be8696bed250fa2f13c4c0d6dfb7" dependencies = [ "generic-array 0.14.4", ] @@ -830,15 +796,6 @@ dependencies = [ "vec_map", ] -[[package]] -name = "cloudabi" -version = "0.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" -dependencies = [ - "bitflags", -] - [[package]] name = "common-runtime" version = "0.8.0-dev" @@ -849,8 +806,9 @@ dependencies = [ "pallet-identity", "pallet-ud-accounts-storage", "parity-scale-codec", + "scale-info", "serde", - "smallvec 1.6.1", + "smallvec", "sp-arithmetic", "sp-core", "sp-runtime", @@ -880,9 +838,9 @@ checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" [[package]] name = "core-foundation" -version = "0.7.0" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57d24c7a13c43e870e37c1556b74555437870a04514f7685f5b354e090567171" +checksum = "6888e10551bb93e424d8df1d07f1a8b4fceb0001a3a4b048bfc47554946f47b3" dependencies = [ "core-foundation-sys", "libc", @@ -890,9 +848,9 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.7.0" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3a71ab494c0b5b860bdc8407ae08978052417070c2ced38573a9157ad75b8ac" +checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" [[package]] name = "cpp_demangle" @@ -913,43 +871,45 @@ dependencies = [ ] [[package]] -name = "cpuid-bool" -version = "0.2.0" +name = "cpufeatures" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcb25d077389e53838a8158c8e99174c5a9d902dee4904320db714f3c653ffba" +checksum = "95059428f66df56b63431fdb4e1947ed2190586af5c5a8a8b71122bdf5a7f469" +dependencies = [ + "libc", +] [[package]] name = "cranelift-bforest" -version = "0.74.0" +version = "0.78.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8ca3560686e7c9c7ed7e0fe77469f2410ba5d7781b1acaa9adc8d8deea28e3e" +checksum = "cc0cb7df82c8cf8f2e6a8dd394a0932a71369c160cc9b027dca414fced242513" dependencies = [ "cranelift-entity", ] [[package]] name = "cranelift-codegen" -version = "0.74.0" +version = "0.78.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf9bf1ffffb6ce3d2e5ebc83549bd2436426c99b31cc550d521364cbe35d276" +checksum = "fe4463c15fa42eee909e61e5eac4866b7c6d22d0d8c621e57a0c5380753bfa8c" dependencies = [ "cranelift-bforest", "cranelift-codegen-meta", "cranelift-codegen-shared", "cranelift-entity", - "gimli 0.24.0", + "gimli 0.25.0", "log", "regalloc", - "serde", - "smallvec 1.6.1", + "smallvec", "target-lexicon", ] [[package]] name = "cranelift-codegen-meta" -version = "0.74.0" +version = "0.78.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cc21936a5a6d07e23849ffe83e5c1f6f50305c074f4b2970ca50c13bf55b821" +checksum = "793f6a94a053a55404ea16e1700202a88101672b8cd6b4df63e13cde950852bf" dependencies = [ "cranelift-codegen-shared", "cranelift-entity", @@ -957,59 +917,56 @@ dependencies = [ [[package]] name = "cranelift-codegen-shared" -version = "0.74.0" +version = "0.78.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca5b6ffaa87560bebe69a5446449da18090b126037920b0c1c6d5945f72faf6b" -dependencies = [ - "serde", -] +checksum = "44aa1846df275bce5eb30379d65964c7afc63c05a117076e62a119c25fe174be" [[package]] name = "cranelift-entity" -version = "0.74.0" +version = "0.78.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d6b4a8bef04f82e4296782646f733c641d09497df2fabf791323fefaa44c64c" +checksum = "a3a45d8d6318bf8fc518154d9298eab2a8154ec068a8885ff113f6db8d69bb3a" dependencies = [ "serde", ] [[package]] name = "cranelift-frontend" -version = "0.74.0" +version = "0.78.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c31b783b351f966fce33e3c03498cb116d16d97a8f9978164a60920bd0d3a99c" +checksum = "e07339bd461766deb7605169de039e01954768ff730fa1254e149001884a8525" dependencies = [ "cranelift-codegen", "log", - "smallvec 1.6.1", + "smallvec", "target-lexicon", ] [[package]] name = "cranelift-native" -version = "0.74.0" +version = "0.78.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a77c88d3dd48021ff1e37e978a00098524abd3513444ae252c08d37b310b3d2a" +checksum = "03e2fca76ff57e0532936a71e3fc267eae6a19a86656716479c66e7f912e3d7b" dependencies = [ "cranelift-codegen", + "libc", "target-lexicon", ] [[package]] name = "cranelift-wasm" -version = "0.74.0" +version = "0.78.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edb6d408e2da77cdbbd65466298d44c86ae71c1785d2ab0d8657753cdb4d9d89" +checksum = "1f46fec547a1f8a32c54ea61c28be4f4ad234ad95342b718a9a9adcaadb0c778" dependencies = [ "cranelift-codegen", "cranelift-entity", "cranelift-frontend", - "itertools 0.10.1", + "itertools", "log", - "serde", - "smallvec 1.6.1", - "thiserror", + "smallvec", "wasmparser", + "wasmtime-types", ] [[package]] @@ -1028,18 +985,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "06ed27e177f16d65f0f0c22a213e17c696ace5dd64b14258b52f9417ccb52db4" dependencies = [ "cfg-if 1.0.0", - "crossbeam-utils 0.8.5", -] - -[[package]] -name = "crossbeam-deque" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c20ff29ded3204c5106278a81a38f4b482636ed4fa1e6cfbeef193291beb29ed" -dependencies = [ - "crossbeam-epoch 0.8.2", - "crossbeam-utils 0.7.2", - "maybe-uninit", + "crossbeam-utils", ] [[package]] @@ -1049,23 +995,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6455c0ca19f0d2fbf751b908d5c55c1f5cbc65e03c4225427254b46890bdde1e" dependencies = [ "cfg-if 1.0.0", - "crossbeam-epoch 0.9.5", - "crossbeam-utils 0.8.5", -] - -[[package]] -name = "crossbeam-epoch" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "058ed274caafc1f60c4997b5fc07bf7dc7cca454af7c6e81edffe5f33f70dace" -dependencies = [ - "autocfg", - "cfg-if 0.1.10", - "crossbeam-utils 0.7.2", - "lazy_static", - "maybe-uninit", - "memoffset 0.5.6", - "scopeguard", + "crossbeam-epoch", + "crossbeam-utils", ] [[package]] @@ -1075,34 +1006,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ec02e091aa634e2c3ada4a392989e7c3116673ef0ac5b72232439094d73b7fd" dependencies = [ "cfg-if 1.0.0", - "crossbeam-utils 0.8.5", + "crossbeam-utils", "lazy_static", - "memoffset 0.6.4", + "memoffset", "scopeguard", ] -[[package]] -name = "crossbeam-queue" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "774ba60a54c213d409d5353bda12d49cd68d14e45036a285234c8d6f91f92570" -dependencies = [ - "cfg-if 0.1.10", - "crossbeam-utils 0.7.2", - "maybe-uninit", -] - -[[package]] -name = "crossbeam-utils" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3c7c73a2d1e9fc0886a08b93e98eb643461230d5f1925e4036204d5f2e261a8" -dependencies = [ - "autocfg", - "cfg-if 0.1.10", - "lazy_static", -] - [[package]] name = "crossbeam-utils" version = "0.8.5" @@ -1121,29 +1030,29 @@ checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" [[package]] name = "crypto-mac" -version = "0.7.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4434400df11d95d556bac068ddfedd482915eb18fe8bea89bc80b6e4b1c179e5" +checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" dependencies = [ - "generic-array 0.12.4", - "subtle 1.0.0", + "generic-array 0.14.4", + "subtle", ] [[package]] name = "crypto-mac" -version = "0.8.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" +checksum = "b1d1a86f49236c215f271d40892d5fc950490551400b02ef360692c29815c714" dependencies = [ "generic-array 0.14.4", - "subtle 2.4.1", + "subtle", ] [[package]] name = "ct-logs" -version = "0.7.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c8e13110a84b6315df212c045be706af261fd364791cad863285439ebba672e" +checksum = "c1a816186fa68d9e426e3cb4ae4dff1fcd8e4a2c34b781bf7a822574a0d0aac8" dependencies = [ "sct", ] @@ -1158,6 +1067,15 @@ dependencies = [ "syn", ] +[[package]] +name = "ctr" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "049bb91fb4aaf0e3c7efa6cd5ef877dbbbd15b39dad06d9948de4ec8a75761ea" +dependencies = [ + "cipher", +] + [[package]] name = "cuckoofilter" version = "0.5.0" @@ -1178,7 +1096,7 @@ dependencies = [ "byteorder", "digest 0.8.1", "rand_core 0.5.1", - "subtle 2.4.1", + "subtle", "zeroize", ] @@ -1191,7 +1109,7 @@ dependencies = [ "byteorder", "digest 0.9.0", "rand_core 0.5.1", - "subtle 2.4.1", + "subtle", "zeroize", ] @@ -1254,9 +1172,9 @@ dependencies = [ [[package]] name = "directories" -version = "3.0.2" +version = "4.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e69600ff1703123957937708eb27f7a564e48885c537782722ed0ba3189ce1d7" +checksum = "f51c5d4ddabd36886dd3e1438cb358cdcb0d7c499cb99cb4ac2e38e18b5cb210" dependencies = [ "dirs-sys", ] @@ -1309,6 +1227,12 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" +[[package]] +name = "dtoa" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56899898ce76aaf4a0f24d914c97ea6ed976d42fec6ad33fcbb0a1103e07b2b0" + [[package]] name = "dyn-clonable" version = "0.9.0" @@ -1355,7 +1279,7 @@ dependencies = [ "ed25519", "rand 0.7.3", "serde", - "sha2 0.9.5", + "sha2 0.9.9", "zeroize", ] @@ -1396,15 +1320,6 @@ version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "68b91989ae21441195d7d9b9993a2f9295c7e1a8c96255d8b729accddc124797" -[[package]] -name = "erased-serde" -version = "0.3.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3de9ad4541d99dc22b59134e7ff8dc3d6c988c89ecd7324bf10a8362b07a2afa" -dependencies = [ - "serde", -] - [[package]] name = "errno" version = "0.2.7" @@ -1441,28 +1356,6 @@ dependencies = [ "futures 0.3.16", ] -[[package]] -name = "failure" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d32e9bd16cc02eae7db7ef620b392808b89f6a5e16bb3497d159c6b92a0f4f86" -dependencies = [ - "backtrace", - "failure_derive", -] - -[[package]] -name = "failure_derive" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa4da3c766cd7a0db8242e326e9e4e081edd567072893ed320008189715366a4" -dependencies = [ - "proc-macro2", - "quote", - "syn", - "synstructure", -] - [[package]] name = "fake-simd" version = "0.1.2" @@ -1505,9 +1398,9 @@ dependencies = [ [[package]] name = "finality-grandpa" -version = "0.14.3" +version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c832d0ed507622c7cb98e9b7f10426850fc9d38527ab8071778dcc3a81d45875" +checksum = "e8ac3ff5224ef91f3c97e03eb1de2db82743427e91aaa5ac635f454f0b164f5a" dependencies = [ "either", "futures 0.3.16", @@ -1515,7 +1408,7 @@ dependencies = [ "log", "num-traits", "parity-scale-codec", - "parking_lot 0.11.1", + "parking_lot", "scale-info", ] @@ -1533,9 +1426,9 @@ dependencies = [ [[package]] name = "fixedbitset" -version = "0.2.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37ab347416e802de484e4d03c7316c48f1ecb56574dfd4a46a80f173ce1de04d" +checksum = "279fb028e20b3c4c320317955b77c5e0c9701f05a1d309905d6fc702cdc5053e" [[package]] name = "flate2" @@ -1559,7 +1452,7 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "fork-tree" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" dependencies = [ "parity-scale-codec", ] @@ -1577,7 +1470,7 @@ dependencies = [ [[package]] name = "frame-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" dependencies = [ "frame-support", "frame-system", @@ -1585,7 +1478,9 @@ dependencies = [ "log", "parity-scale-codec", "paste", + "scale-info", "sp-api", + "sp-application-crypto", "sp-io", "sp-runtime", "sp-runtime-interface", @@ -1596,13 +1491,15 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" dependencies = [ "Inflector", "chrono", "frame-benchmarking", "frame-support", "handlebars", + "linked-hash-map", + "log", "parity-scale-codec", "sc-cli", "sc-client-db", @@ -1620,11 +1517,12 @@ dependencies = [ [[package]] name = "frame-executive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" dependencies = [ "frame-support", "frame-system", "parity-scale-codec", + "scale-info", "sp-core", "sp-io", "sp-runtime", @@ -1634,19 +1532,20 @@ dependencies = [ [[package]] name = "frame-metadata" -version = "14.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +version = "14.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37ed5e5c346de62ca5c184b4325a6600d1eaca210666e4606fe4e449574978d0" dependencies = [ + "cfg-if 1.0.0", "parity-scale-codec", + "scale-info", "serde", - "sp-core", - "sp-std", ] [[package]] name = "frame-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" dependencies = [ "bitflags", "frame-metadata", @@ -1656,10 +1555,12 @@ dependencies = [ "once_cell", "parity-scale-codec", "paste", + "scale-info", "serde", - "smallvec 1.6.1", + "smallvec", "sp-arithmetic", "sp-core", + "sp-core-hashing-proc-macro", "sp-inherents", "sp-io", "sp-runtime", @@ -1667,12 +1568,13 @@ dependencies = [ "sp-state-machine", "sp-std", "sp-tracing", + "tt-call", ] [[package]] name = "frame-support-procedural" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" dependencies = [ "Inflector", "frame-support-procedural-tools", @@ -1684,10 +1586,10 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" dependencies = [ "frame-support-procedural-tools-derive", - "proc-macro-crate 1.0.0", + "proc-macro-crate 1.1.0", "proc-macro2", "quote", "syn", @@ -1696,7 +1598,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" dependencies = [ "proc-macro2", "quote", @@ -1706,12 +1608,12 @@ dependencies = [ [[package]] name = "frame-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" dependencies = [ "frame-support", - "impl-trait-for-tuples", "log", "parity-scale-codec", + "scale-info", "serde", "sp-core", "sp-io", @@ -1723,12 +1625,13 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "parity-scale-codec", + "scale-info", "sp-core", "sp-runtime", "sp-std", @@ -1737,7 +1640,7 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" dependencies = [ "parity-scale-codec", "sp-api", @@ -1765,12 +1668,6 @@ dependencies = [ "winapi 0.3.9", ] -[[package]] -name = "fuchsia-cprng" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" - [[package]] name = "fuchsia-zircon" version = "0.3.3" @@ -1816,9 +1713,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.16" +version = "0.3.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74ed2411805f6e4e3d9bc904c95d5d423b89b3b25dc0250aa74729de20629ff9" +checksum = "ba3dda0b6588335f360afc675d0564c17a77a2bda81ca178a4b6081bd86c7f0b" dependencies = [ "futures-core", "futures-sink", @@ -1826,19 +1723,9 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af51b1b4a7fdff033703db39de8802c673eb91855f2e0d47dcf3bf2c0ef01f99" - -[[package]] -name = "futures-cpupool" -version = "0.1.8" +version = "0.3.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab90cde24b3319636588d0c35fe03b1333857621051837ed769faefb4c2162e4" -dependencies = [ - "futures 0.1.31", - "num_cpus", -] +checksum = "d0c8ff0461b82559810cdccfde3215c3f373807f5e5232b71479bff7bb2583d7" [[package]] name = "futures-executor" @@ -1854,9 +1741,9 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.16" +version = "0.3.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b0e06c393068f3a6ef246c75cdca793d6a46347e75286933e5e75fd2fd11582" +checksum = "b1f9d34af5a1aac6fb380f735fe510746c38067c5bf16c7fd250280503c971b2" [[package]] name = "futures-lite" @@ -1875,12 +1762,10 @@ dependencies = [ [[package]] name = "futures-macro" -version = "0.3.16" +version = "0.3.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c54913bae956fb8df7f4dc6fc90362aa72e69148e3f39041fbe8742d21e0ac57" +checksum = "6dbd947adfffb0efc70599b3ddcf7b5597bb5fa9e245eb99f62b3a5f7bb8bd3c" dependencies = [ - "autocfg", - "proc-macro-hack", "proc-macro2", "quote", "syn", @@ -1893,21 +1778,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3a1387e07917c711fb4ee4f48ea0adb04a3c9739e53ef85bf43ae1edc2937a8b" dependencies = [ "futures-io", - "rustls 0.19.1", + "rustls", "webpki", ] [[package]] name = "futures-sink" -version = "0.3.16" +version = "0.3.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0f30aaa67363d119812743aa5f33c201a7a66329f97d1a887022971feea4b53" +checksum = "e3055baccb68d74ff6480350f8d6eb8fcfa3aa11bdc1a1ae3afdd0514617d508" [[package]] name = "futures-task" -version = "0.3.16" +version = "0.3.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbe54a98670017f3be909561f6ad13e810d9a51f3f061b902062ca3da80799f2" +checksum = "6ee7c6485c30167ce4dfb83ac568a849fe53274c831081476ee13e0dce1aad72" [[package]] name = "futures-timer" @@ -1923,11 +1808,10 @@ checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c" [[package]] name = "futures-util" -version = "0.3.16" +version = "0.3.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67eb846bfd58e44a8481a00049e82c43e0ccb5d61f8dc071057cb19249dd4d78" +checksum = "d9b5cf40b47a271f77a8b1bec03ca09044d99d2372c0de244e66430761127164" dependencies = [ - "autocfg", "futures 0.1.31", "futures-channel", "futures-core", @@ -1938,8 +1822,6 @@ dependencies = [ "memchr", "pin-project-lite 0.2.7", "pin-utils", - "proc-macro-hack", - "proc-macro-nested", "slab", ] @@ -1968,8 +1850,9 @@ dependencies = [ "pallet-ud-accounts-storage", "pallet-universal-dividend", "parity-scale-codec", + "scale-info", "serde", - "smallvec 1.6.1", + "smallvec", "sp-api", "sp-arithmetic", "sp-block-builder", @@ -2016,6 +1899,7 @@ dependencies = [ "pallet-ud-accounts-storage", "pallet-universal-dividend", "parity-scale-codec", + "scale-info", "serde", "sp-api", "sp-arithmetic", @@ -2058,8 +1942,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" dependencies = [ "cfg-if 1.0.0", + "js-sys", "libc", "wasi 0.9.0+wasi-snapshot-preview1", + "wasm-bindgen", ] [[package]] @@ -2075,9 +1961,9 @@ dependencies = [ [[package]] name = "ghash" -version = "0.3.1" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97304e4cd182c3846f7575ced3890c53012ce534ad9114046b0a9e00bb30a375" +checksum = "1583cc1656d7839fd3732b80cf4f38850336cdb9b8ded1cd399ca62958de3c99" dependencies = [ "opaque-debug 0.3.0", "polyval", @@ -2085,9 +1971,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.24.0" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e4075386626662786ddb0ec9081e7c7eeb1ba31951f447ca780ef9f5d568189" +checksum = "f0a01e0497841a3b2db4f8afa483cce65f7e96a3498bd6c541734792aeac8fe7" dependencies = [ "fallible-iterator", "indexmap", @@ -2096,9 +1982,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.25.0" +version = "0.26.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0a01e0497841a3b2db4f8afa483cce65f7e96a3498bd6c541734792aeac8fe7" +checksum = "78cc372d058dcf6d5ecd98510e7fbc9e5aec4d21de70f65fea8fecebcd881bd4" [[package]] name = "glob" @@ -2157,8 +2043,9 @@ dependencies = [ "pallet-ud-accounts-storage", "pallet-universal-dividend", "parity-scale-codec", + "scale-info", "serde", - "smallvec 1.6.1", + "smallvec", "sp-api", "sp-arithmetic", "sp-block-builder", @@ -2176,47 +2063,28 @@ dependencies = [ [[package]] name = "h2" -version = "0.1.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5b34c246847f938a410a03c5458c7fee2274436675e76d8b903c08efc29c462" -dependencies = [ - "byteorder", - "bytes 0.4.12", - "fnv", - "futures 0.1.31", - "http 0.1.21", - "indexmap", - "log", - "slab", - "string", - "tokio-io", -] - -[[package]] -name = "h2" -version = "0.2.7" +version = "0.3.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e4728fd124914ad25e99e3d15a9361a879f6620f63cb56bbb08f95abb97a535" +checksum = "0c9de88456263e249e241fcd211d3954e2c9b0ef7ccfc235a444eb367cae3689" dependencies = [ - "bytes 0.5.6", + "bytes 1.1.0", "fnv", "futures-core", "futures-sink", "futures-util", - "http 0.2.4", + "http", "indexmap", "slab", - "tokio 0.2.25", + "tokio", "tokio-util", "tracing", - "tracing-futures", ] [[package]] name = "handlebars" -version = "3.5.5" +version = "4.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4498fc115fa7d34de968184e473529abb40eeb6be8bc5f7faba3d08c316cb3e3" +checksum = "2483bce82dd3ed52509d0117e4a30a488bd608be250ed7a0185301314239ed31" dependencies = [ "log", "pest", @@ -2288,33 +2156,33 @@ checksum = "b07f60793ff0a4d9cef0f18e63b5357e06209987153a64648c972c1e5aff336f" [[package]] name = "hmac" -version = "0.7.1" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dcb5e64cda4c23119ab41ba960d1e170a774c8e4b9d9e6a9bc18aabf5e59695" +checksum = "126888268dcc288495a26bf004b38c5fdbb31682f992c84ceb046a1f0fe38840" dependencies = [ - "crypto-mac 0.7.0", - "digest 0.8.1", + "crypto-mac 0.8.0", + "digest 0.9.0", ] [[package]] name = "hmac" -version = "0.8.1" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "126888268dcc288495a26bf004b38c5fdbb31682f992c84ceb046a1f0fe38840" +checksum = "2a2a2320eb7ec0ebe8da8f744d7812d9fc4cb4d09344ac01898dbcb6a20ae69b" dependencies = [ - "crypto-mac 0.8.0", + "crypto-mac 0.11.1", "digest 0.9.0", ] [[package]] name = "hmac-drbg" -version = "0.2.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6e570451493f10f6581b48cdd530413b63ea9e780f544bfd3bdcaa0d89d1a7b" +checksum = "17ea0a1394df5b6574da6e0c1ade9e78868c9fb0a4e5ef4428e32da4676b85b1" dependencies = [ - "digest 0.8.1", - "generic-array 0.12.4", - "hmac 0.7.1", + "digest 0.9.0", + "generic-array 0.14.4", + "hmac 0.8.1", ] [[package]] @@ -2328,48 +2196,26 @@ dependencies = [ "winapi 0.3.9", ] -[[package]] -name = "http" -version = "0.1.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6ccf5ede3a895d8856620237b2f02972c1bbc78d2965ad7fe8838d4a0ed41f0" -dependencies = [ - "bytes 0.4.12", - "fnv", - "itoa", -] - [[package]] name = "http" version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "527e8c9ac747e28542699a951517aa9a6945af506cd1f2e1b53a576c17b6cc11" dependencies = [ - "bytes 1.0.1", + "bytes 1.1.0", "fnv", - "itoa", -] - -[[package]] -name = "http-body" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6741c859c1b2463a423a1dbce98d418e6c3c3fc720fb0d45528657320920292d" -dependencies = [ - "bytes 0.4.12", - "futures 0.1.31", - "http 0.1.21", - "tokio-buf", + "itoa 0.4.7", ] [[package]] name = "http-body" -version = "0.3.1" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13d5ff830006f7646652e057693569bfe0d51760c0085a071769d142a205111b" +checksum = "1ff4f84919677303da5f147645dbea6b1881f368d03ac84e1dc09031ebd7b2c6" dependencies = [ - "bytes 0.5.6", - "http 0.2.4", + "bytes 1.1.0", + "http", + "pin-project-lite 0.2.7", ] [[package]] @@ -2380,9 +2226,9 @@ checksum = "acd94fdbe1d4ff688b67b04eee2e17bd50995534a61539e45adfefb45e5e5503" [[package]] name = "httpdate" -version = "0.3.2" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "494b4d60369511e7dea41cf646832512a94e542f68bb9c49e54518e0f468eb47" +checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" [[package]] name = "humantime" @@ -2395,72 +2241,41 @@ dependencies = [ [[package]] name = "hyper" -version = "0.12.36" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c843caf6296fc1f93444735205af9ed4e109a539005abb2564ae1d6fad34c52" -dependencies = [ - "bytes 0.4.12", - "futures 0.1.31", - "futures-cpupool", - "h2 0.1.26", - "http 0.1.21", - "http-body 0.1.0", - "httparse", - "iovec", - "itoa", - "log", - "net2", - "rustc_version 0.2.3", - "time", - "tokio 0.1.22", - "tokio-buf", - "tokio-executor", - "tokio-io", - "tokio-reactor", - "tokio-tcp", - "tokio-threadpool", - "tokio-timer", - "want 0.2.0", -] - -[[package]] -name = "hyper" -version = "0.13.10" +version = "0.14.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a6f157065790a3ed2f88679250419b5cdd96e714a0d65f7797fd337186e96bb" +checksum = "b7ec3e62bdc98a2f0393a5048e4c30ef659440ea6e0e572965103e72bd836f55" dependencies = [ - "bytes 0.5.6", + "bytes 1.1.0", "futures-channel", "futures-core", "futures-util", - "h2 0.2.7", - "http 0.2.4", - "http-body 0.3.1", + "h2", + "http", + "http-body", "httparse", "httpdate", - "itoa", - "pin-project 1.0.8", - "socket2 0.3.19", - "tokio 0.2.25", + "itoa 0.4.7", + "pin-project-lite 0.2.7", + "socket2 0.4.1", + "tokio", "tower-service", "tracing", - "want 0.3.0", + "want", ] [[package]] name = "hyper-rustls" -version = "0.21.0" +version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37743cc83e8ee85eacfce90f2f4102030d9ff0a95244098d781e9bee4a90abb6" +checksum = "5f9f7a97316d44c0af9b0301e65010573a853a9fc97046d7331d7f6bc0fd5a64" dependencies = [ - "bytes 0.5.6", "ct-logs", "futures-util", - "hyper 0.13.10", + "hyper", "log", - "rustls 0.18.1", + "rustls", "rustls-native-certs", - "tokio 0.2.25", + "tokio", "tokio-rustls", "webpki", ] @@ -2592,6 +2407,16 @@ dependencies = [ "futures-timer 2.0.2", ] +[[package]] +name = "io-lifetimes" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "278e90d6f8a6c76a8334b336e306efa3c5f2b604048cbfd486d6f49878e3af14" +dependencies = [ + "rustc_version 0.4.0", + "winapi 0.3.9", +] + [[package]] name = "iovec" version = "0.1.4" @@ -2603,9 +2428,9 @@ dependencies = [ [[package]] name = "ip_network" -version = "0.3.4" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ee15951c035f79eddbef745611ec962f63f4558f1dadf98ab723cc603487c6f" +checksum = "aa2f047c0a98b2f299aa5d6d7088443570faae494e9ae1305e48be000c9e0eb1" [[package]] name = "ipconfig" @@ -2625,15 +2450,6 @@ version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "68f2d64f2edebec4ce84ad108148e67e1064789bee435edc5b60ad398714a3a9" -[[package]] -name = "itertools" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "284f18f85651fe11e8a991b2adb42cb078325c996ed026d994719efcfca1d54b" -dependencies = [ - "either", -] - [[package]] name = "itertools" version = "0.10.1" @@ -2649,6 +2465,12 @@ version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd25036021b0de88a0aff6b850051563c6516d0bf53f8638938edbb9de732736" +[[package]] +name = "itoa" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1aab8fc367588b89dcee83ab0fd66b72b50b72fa1904d7095045ace2b0c81c35" + [[package]] name = "jobserver" version = "0.1.24" @@ -2669,12 +2491,12 @@ dependencies = [ [[package]] name = "jsonrpc-client-transports" -version = "15.1.0" +version = "18.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "489b9c612e60c766f751ab40fcb43cbb55a1e10bb44a9b4307ed510ca598cbd7" +checksum = "d2b99d4207e2a04fb4581746903c2bb7eb376f88de9c699d0f3e10feeac0cd3a" dependencies = [ - "failure", - "futures 0.1.31", + "derive_more", + "futures 0.3.16", "jsonrpc-core", "jsonrpc-pubsub", "log", @@ -2685,11 +2507,13 @@ dependencies = [ [[package]] name = "jsonrpc-core" -version = "15.1.0" +version = "18.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0745a6379e3edc893c84ec203589790774e4247420033e71a76d3ab4687991fa" +checksum = "14f7f76aef2d054868398427f6c54943cf3d1caa9a7ec7d0c38d69df97a965eb" dependencies = [ - "futures 0.1.31", + "futures 0.3.16", + "futures-executor", + "futures-util", "log", "serde", "serde_derive", @@ -2698,18 +2522,19 @@ dependencies = [ [[package]] name = "jsonrpc-core-client" -version = "15.1.0" +version = "18.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f764902d7b891344a0acb65625f32f6f7c6db006952143bd650209fbe7d94db" +checksum = "b51da17abecbdab3e3d4f26b01c5ec075e88d3abe3ab3b05dc9aa69392764ec0" dependencies = [ + "futures 0.3.16", "jsonrpc-client-transports", ] [[package]] name = "jsonrpc-derive" -version = "15.1.0" +version = "18.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99a847f9ec7bb52149b2786a17c9cb260d6effc6b8eeb8c16b343a487a7563a3" +checksum = "5b939a78fa820cdfcb7ee7484466746a7377760970f6f9c6fe19f9edcc8a38d2" dependencies = [ "proc-macro-crate 0.1.5", "proc-macro2", @@ -2719,73 +2544,80 @@ dependencies = [ [[package]] name = "jsonrpc-http-server" -version = "15.1.0" +version = "18.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fb5c4513b7b542f42da107942b7b759f27120b5cc894729f88254b28dff44b7" +checksum = "e1dea6e07251d9ce6a552abfb5d7ad6bc290a4596c8dcc3d795fae2bbdc1f3ff" dependencies = [ - "hyper 0.12.36", + "futures 0.3.16", + "hyper", "jsonrpc-core", "jsonrpc-server-utils", "log", "net2", - "parking_lot 0.10.2", + "parking_lot", "unicase", ] [[package]] name = "jsonrpc-ipc-server" -version = "15.1.0" +version = "18.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf50e53e4eea8f421a7316c5f63e395f7bc7c4e786a6dc54d76fab6ff7aa7ce7" +checksum = "382bb0206323ca7cda3dcd7e245cea86d37d02457a02a975e3378fb149a48845" dependencies = [ + "futures 0.3.16", "jsonrpc-core", "jsonrpc-server-utils", "log", "parity-tokio-ipc", - "parking_lot 0.10.2", - "tokio-service", + "parking_lot", + "tower-service", ] [[package]] name = "jsonrpc-pubsub" -version = "15.1.0" +version = "18.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "639558e0604013be9787ae52f798506ae42bf4220fe587bdc5625871cc8b9c77" +checksum = "240f87695e6c6f62fb37f05c02c04953cf68d6408b8c1c89de85c7a0125b1011" dependencies = [ + "futures 0.3.16", "jsonrpc-core", + "lazy_static", "log", - "parking_lot 0.10.2", + "parking_lot", "rand 0.7.3", "serde", ] [[package]] name = "jsonrpc-server-utils" -version = "15.1.0" +version = "18.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72f1f3990650c033bd8f6bd46deac76d990f9bbfb5f8dc8c4767bf0a00392176" +checksum = "fa4fdea130485b572c39a460d50888beb00afb3e35de23ccd7fad8ff19f0e0d4" dependencies = [ - "bytes 0.4.12", + "bytes 1.1.0", + "futures 0.3.16", "globset", "jsonrpc-core", "lazy_static", "log", - "tokio 0.1.22", - "tokio-codec", + "tokio", + "tokio-stream", + "tokio-util", "unicase", ] [[package]] name = "jsonrpc-ws-server" -version = "15.1.0" +version = "18.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6596fe75209b73a2a75ebe1dce4e60e03b88a2b25e8807b667597f6315150d22" +checksum = "f892c7d766369475ab7b0669f417906302d7c0fb521285c0a0c92e52e7c8e946" dependencies = [ + "futures 0.3.16", "jsonrpc-core", "jsonrpc-server-utils", "log", "parity-ws", - "parking_lot 0.10.2", + "parking_lot", "slab", ] @@ -2821,7 +2653,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "45a3f58dc069ec0e205a27f5b45920722a46faed802a0541538241af6228f512" dependencies = [ "parity-util-mem", - "smallvec 1.6.1", + "smallvec", ] [[package]] @@ -2832,14 +2664,14 @@ checksum = "c3b6b85fc643f5acd0bffb2cc8a6d150209379267af0d41db72170021841f9f5" dependencies = [ "kvdb", "parity-util-mem", - "parking_lot 0.11.1", + "parking_lot", ] [[package]] name = "kvdb-rocksdb" -version = "0.12.1" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d169dbb316aa0fa185d02d847c047f1aa20e292cf1563d790c13536a2a732c8" +checksum = "9b1b6ea8f2536f504b645ad78419c8246550e19d2c3419a167080ce08edee35a" dependencies = [ "fs-swap", "kvdb", @@ -2847,10 +2679,10 @@ dependencies = [ "num_cpus", "owning_ref", "parity-util-mem", - "parking_lot 0.11.1", + "parking_lot", "regex", "rocksdb", - "smallvec 1.6.1", + "smallvec", ] [[package]] @@ -2922,9 +2754,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.99" +version = "0.2.112" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7f823d141fe0a24df1e23b4af4e3c7ba9e5966ec514ea068c93024aa7deb765" +checksum = "1b03d17f364a3a042d5e5d46b053bbbf82c92c9430c592dd4c064dc6ee997125" [[package]] name = "libloading" @@ -2954,12 +2786,12 @@ checksum = "c7d73b3f436185384286bd8098d17ec07c9a7d2388a6599f824d8502b529702a" [[package]] name = "libp2p" -version = "0.37.1" +version = "0.40.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08053fbef67cd777049ef7a95ebaca2ece370b4ed7712c3fa404d69a88cb741b" +checksum = "3bec54343492ba5940a6c555e512c6721139835d28c59bc22febece72dfd0d9d" dependencies = [ "atomic", - "bytes 1.0.1", + "bytes 1.1.0", "futures 0.3.16", "lazy_static", "libp2p-core", @@ -2970,12 +2802,14 @@ dependencies = [ "libp2p-identify", "libp2p-kad", "libp2p-mdns", + "libp2p-metrics", "libp2p-mplex", "libp2p-noise", "libp2p-ping", "libp2p-plaintext", "libp2p-pnet", "libp2p-relay", + "libp2p-rendezvous", "libp2p-request-response", "libp2p-swarm", "libp2p-swarm-derive", @@ -2984,18 +2818,18 @@ dependencies = [ "libp2p-wasm-ext", "libp2p-websocket", "libp2p-yamux", - "parity-multiaddr", - "parking_lot 0.11.1", + "multiaddr", + "parking_lot", "pin-project 1.0.8", - "smallvec 1.6.1", + "smallvec", "wasm-timer", ] [[package]] name = "libp2p-core" -version = "0.28.3" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "554d3e7e9e65f939d66b75fd6a4c67f258fe250da61b91f46c545fc4a89b51d9" +checksum = "bef22d9bba1e8bcb7ec300073e6802943fe8abb8190431842262b5f1c30abba1" dependencies = [ "asn1_der", "bs58", @@ -3007,18 +2841,18 @@ dependencies = [ "lazy_static", "libsecp256k1", "log", - "multihash", + "multiaddr", + "multihash 0.14.0", "multistream-select", - "parity-multiaddr", - "parking_lot 0.11.1", + "parking_lot", "pin-project 1.0.8", "prost", "prost-build", - "rand 0.7.3", + "rand 0.8.4", "ring", "rw-stream-sink", - "sha2 0.9.5", - "smallvec 1.6.1", + "sha2 0.9.9", + "smallvec", "thiserror", "unsigned-varint 0.7.0", "void", @@ -3027,9 +2861,9 @@ dependencies = [ [[package]] name = "libp2p-deflate" -version = "0.28.0" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2181a641cd15f9b6ba71b1335800f309012a0a97a29ffaabbbf40e9d3d58f08" +checksum = "51a800adb195f33de63f4b17b63fe64cfc23bf2c6a0d3d0d5321328664e65197" dependencies = [ "flate2", "futures 0.3.16", @@ -3038,23 +2872,23 @@ dependencies = [ [[package]] name = "libp2p-dns" -version = "0.28.1" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62e63dab8b5ff35e0c101a3e51e843ba782c07bbb1682f5fd827622e0d02b98b" +checksum = "bb8f89d15cb6e3c5bc22afff7513b11bab7856f2872d3cfba86f7f63a06bc498" dependencies = [ "async-std-resolver", "futures 0.3.16", "libp2p-core", "log", - "smallvec 1.6.1", + "smallvec", "trust-dns-resolver", ] [[package]] name = "libp2p-floodsub" -version = "0.29.0" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48a9b570f6766301d9c4aa00fce3554cad1598e2f466debbc4dde909028417cf" +checksum = "aab3d7210901ea51b7bae2b581aa34521797af8c4ec738c980bda4a06434067f" dependencies = [ "cuckoofilter", "fnv", @@ -3065,19 +2899,19 @@ dependencies = [ "prost", "prost-build", "rand 0.7.3", - "smallvec 1.6.1", + "smallvec", ] [[package]] name = "libp2p-gossipsub" -version = "0.30.1" +version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7b0c8506a6ec3344b9e706d7c7a6dba826f8ede735cfe13dde12a8c263c4af9" +checksum = "dfeead619eb5dac46e65acc78c535a60aaec803d1428cca6407c3a4fc74d698d" dependencies = [ "asynchronous-codec 0.6.0", - "base64 0.13.0", + "base64", "byteorder", - "bytes 1.0.1", + "bytes 1.1.0", "fnv", "futures 0.3.16", "hex_fmt", @@ -3088,37 +2922,38 @@ dependencies = [ "prost-build", "rand 0.7.3", "regex", - "sha2 0.9.5", - "smallvec 1.6.1", + "sha2 0.9.9", + "smallvec", "unsigned-varint 0.7.0", "wasm-timer", ] [[package]] name = "libp2p-identify" -version = "0.29.0" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f668f00efd9883e8b7bcc582eaf0164615792608f886f6577da18bcbeea0a46" +checksum = "cca1275574183f288ff8b72d535d5ffa5ea9292ef7829af8b47dcb197c7b0dcd" dependencies = [ "futures 0.3.16", "libp2p-core", "libp2p-swarm", "log", + "lru 0.6.6", "prost", "prost-build", - "smallvec 1.6.1", + "smallvec", "wasm-timer", ] [[package]] name = "libp2p-kad" -version = "0.30.0" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b07312ebe5ee4fd2404447a0609814574df55c65d4e20838b957bbd34907d820" +checksum = "a2297dc0ca285f3a09d1368bde02449e539b46f94d32d53233f53f6625bcd3ba" dependencies = [ "arrayvec 0.5.2", "asynchronous-codec 0.6.0", - "bytes 1.0.1", + "bytes 1.1.0", "either", "fnv", "futures 0.3.16", @@ -3128,8 +2963,8 @@ dependencies = [ "prost", "prost-build", "rand 0.7.3", - "sha2 0.9.5", - "smallvec 1.6.1", + "sha2 0.9.9", + "smallvec", "uint", "unsigned-varint 0.7.0", "void", @@ -3138,9 +2973,9 @@ dependencies = [ [[package]] name = "libp2p-mdns" -version = "0.30.2" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4efa70c1c3d2d91237f8546e27aeb85e287d62c066a7b4f3ea6a696d43ced714" +checksum = "14c864b64bdc8a84ff3910a0df88e6535f256191a450870f1e7e10cbf8e64d45" dependencies = [ "async-io", "data-encoding", @@ -3152,36 +2987,50 @@ dependencies = [ "libp2p-swarm", "log", "rand 0.8.4", - "smallvec 1.6.1", + "smallvec", "socket2 0.4.1", "void", ] +[[package]] +name = "libp2p-metrics" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4af432fcdd2f8ba4579b846489f8f0812cfd738ced2c0af39df9b1c48bbb6ab2" +dependencies = [ + "libp2p-core", + "libp2p-identify", + "libp2p-kad", + "libp2p-ping", + "libp2p-swarm", + "open-metrics-client", +] + [[package]] name = "libp2p-mplex" -version = "0.28.0" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85e9b544335d1ed30af71daa96edbefadef6f19c7a55f078b9fc92c87163105d" +checksum = "7f2cd64ef597f40e14bfce0497f50ecb63dd6d201c61796daeb4227078834fbf" dependencies = [ "asynchronous-codec 0.6.0", - "bytes 1.0.1", + "bytes 1.1.0", "futures 0.3.16", "libp2p-core", "log", "nohash-hasher", - "parking_lot 0.11.1", + "parking_lot", "rand 0.7.3", - "smallvec 1.6.1", + "smallvec", "unsigned-varint 0.7.0", ] [[package]] name = "libp2p-noise" -version = "0.30.0" +version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36db0f0db3b0433f5b9463f1c0cd9eadc0a3734a9170439ce501ff99733a88bd" +checksum = "a8772c7a99088221bb7ca9c5c0574bf55046a7ab4c319f3619b275f28c8fb87a" dependencies = [ - "bytes 1.0.1", + "bytes 1.1.0", "curve25519-dalek 3.2.0", "futures 0.3.16", "lazy_static", @@ -3189,8 +3038,8 @@ dependencies = [ "log", "prost", "prost-build", - "rand 0.7.3", - "sha2 0.9.5", + "rand 0.8.4", + "sha2 0.9.9", "snow", "static_assertions", "x25519-dalek", @@ -3199,9 +3048,9 @@ dependencies = [ [[package]] name = "libp2p-ping" -version = "0.29.0" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf4bfaffac63bf3c7ec11ed9d8879d455966ddea7e78ee14737f0b6dce0d1cd1" +checksum = "80ef7b0ec5cf06530d9eb6cf59ae49d46a2c45663bde31c25a12f682664adbcf" dependencies = [ "futures 0.3.16", "libp2p-core", @@ -3214,12 +3063,12 @@ dependencies = [ [[package]] name = "libp2p-plaintext" -version = "0.28.0" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c8c37b4d2a075b4be8442760a5f8c037180f0c8dd5b5734b9978ab868b3aa11" +checksum = "5fba1a6ff33e4a274c89a3b1d78b9f34f32af13265cc5c46c16938262d4e945a" dependencies = [ "asynchronous-codec 0.6.0", - "bytes 1.0.1", + "bytes 1.1.0", "futures 0.3.16", "libp2p-core", "log", @@ -3231,9 +3080,9 @@ dependencies = [ [[package]] name = "libp2p-pnet" -version = "0.20.0" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ce3374f3b28162db9d3442c9347c4f14cb01e8290052615c7d341d40eae0599" +checksum = "0f1a458bbda880107b5b36fcb9b5a1ef0c329685da0e203ed692a8ebe64cc92c" dependencies = [ "futures 0.3.16", "log", @@ -3245,12 +3094,12 @@ dependencies = [ [[package]] name = "libp2p-relay" -version = "0.2.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b8786aca3f18671d8776289706a5521f6c9124a820f69e358de214b9939440d" +checksum = "2852b61c90fa8ce3c8fcc2aba76e6cefc20d648f9df29157d6b3a916278ef3e3" dependencies = [ "asynchronous-codec 0.6.0", - "bytes 1.0.1", + "bytes 1.1.0", "futures 0.3.16", "futures-timer 3.0.2", "libp2p-core", @@ -3260,7 +3109,29 @@ dependencies = [ "prost", "prost-build", "rand 0.7.3", - "smallvec 1.6.1", + "smallvec", + "unsigned-varint 0.7.0", + "void", + "wasm-timer", +] + +[[package]] +name = "libp2p-rendezvous" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14a6d2b9e7677eff61dc3d2854876aaf3976d84a01ef6664b610c77a0c9407c5" +dependencies = [ + "asynchronous-codec 0.6.0", + "bimap", + "futures 0.3.16", + "libp2p-core", + "libp2p-swarm", + "log", + "prost", + "prost-build", + "rand 0.8.4", + "sha2 0.9.9", + "thiserror", "unsigned-varint 0.7.0", "void", "wasm-timer", @@ -3268,45 +3139,44 @@ dependencies = [ [[package]] name = "libp2p-request-response" -version = "0.11.0" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cdbe172f08e6d0f95fa8634e273d4c4268c4063de2e33e7435194b0130c62e3" +checksum = "a877a4ced6d46bf84677e1974e8cf61fb434af73b2e96fb48d6cb6223a4634d8" dependencies = [ "async-trait", - "bytes 1.0.1", + "bytes 1.1.0", "futures 0.3.16", "libp2p-core", "libp2p-swarm", "log", - "lru", - "minicbor", + "lru 0.7.2", "rand 0.7.3", - "smallvec 1.6.1", + "smallvec", "unsigned-varint 0.7.0", "wasm-timer", ] [[package]] name = "libp2p-swarm" -version = "0.29.0" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e04d8e1eef675029ec728ba14e8d0da7975d84b6679b699b4ae91a1de9c3a92" +checksum = "3f5184a508f223bc100a12665517773fb8730e9f36fc09eefb670bf01b107ae9" dependencies = [ "either", "futures 0.3.16", "libp2p-core", "log", "rand 0.7.3", - "smallvec 1.6.1", + "smallvec", "void", "wasm-timer", ] [[package]] name = "libp2p-swarm-derive" -version = "0.23.0" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "365b0a699fea5168676840567582a012ea297b1ca02eee467e58301b9c9c5eed" +checksum = "072c290f727d39bdc4e9d6d1c847978693d25a673bd757813681e33e5f6c00c2" dependencies = [ "quote", "syn", @@ -3314,9 +3184,9 @@ dependencies = [ [[package]] name = "libp2p-tcp" -version = "0.28.0" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b1a27d21c477951799e99d5c105d78868258502ce092988040a808d5a19bbd9" +checksum = "7399c5b6361ef525d41c11fcf51635724f832baf5819b30d3d873eabb4fbae4b" dependencies = [ "async-io", "futures 0.3.16", @@ -3331,9 +3201,9 @@ dependencies = [ [[package]] name = "libp2p-uds" -version = "0.28.0" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffd6564bb3b7ff203661ccbb69003c2b551e34cef974f2d6c6a28306a12170b5" +checksum = "b8b7563e46218165dfd60f64b96f7ce84590d75f53ecbdc74a7dd01450dc5973" dependencies = [ "async-std", "futures 0.3.16", @@ -3343,9 +3213,9 @@ dependencies = [ [[package]] name = "libp2p-wasm-ext" -version = "0.28.2" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2d413e4cf9b8e5dfbcd2a60d3dc5a3391308bdb463684093d4f67137b7113de" +checksum = "1008a302b73c5020251f9708c653f5ed08368e530e247cc9cd2f109ff30042cf" dependencies = [ "futures 0.3.16", "js-sys", @@ -3357,9 +3227,9 @@ dependencies = [ [[package]] name = "libp2p-websocket" -version = "0.29.0" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cace60995ef6f637e4752cccbb2590f6bc358e8741a0d066307636c69a4b3a74" +checksum = "22e12df82d1ed64969371a9e65ea92b91064658604cc2576c2757f18ead9a1cf" dependencies = [ "either", "futures 0.3.16", @@ -3375,13 +3245,13 @@ dependencies = [ [[package]] name = "libp2p-yamux" -version = "0.32.0" +version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f35da42cfc6d5cb0dcf3ad6881bc68d146cdf38f98655e09e33fbba4d13eabc4" +checksum = "4e7362abb8867d7187e7e93df17f460d554c997fc5c8ac57dc1259057f6889af" dependencies = [ "futures 0.3.16", "libp2p-core", - "parking_lot 0.11.1", + "parking_lot", "thiserror", "yamux", ] @@ -3400,20 +3270,52 @@ dependencies = [ [[package]] name = "libsecp256k1" -version = "0.3.5" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fc1e2c808481a63dc6da2074752fdd4336a3c8fcc68b83db6f1fd5224ae7962" +checksum = "b0452aac8bab02242429380e9b2f94ea20cea2b37e2c1777a1358799bbe97f37" dependencies = [ "arrayref", - "crunchy", - "digest 0.8.1", + "base64", + "digest 0.9.0", "hmac-drbg", - "rand 0.7.3", - "sha2 0.8.2", - "subtle 2.4.1", + "libsecp256k1-core", + "libsecp256k1-gen-ecmult", + "libsecp256k1-gen-genmult", + "rand 0.8.4", + "serde", + "sha2 0.9.9", "typenum", ] +[[package]] +name = "libsecp256k1-core" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5be9b9bb642d8522a44d533eab56c16c738301965504753b03ad1de3425d5451" +dependencies = [ + "crunchy", + "digest 0.9.0", + "subtle", +] + +[[package]] +name = "libsecp256k1-gen-ecmult" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3038c808c55c87e8a172643a7d87187fc6c4174468159cb3090659d55bcb4809" +dependencies = [ + "libsecp256k1-core", +] + +[[package]] +name = "libsecp256k1-gen-genmult" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3db8d6ba2cec9eacc40e6e8ccc98931840301f1006e95647ceb2dd5c3aa06f7c" +dependencies = [ + "libsecp256k1-core", +] + [[package]] name = "libz-sys" version = "1.1.3" @@ -3442,28 +3344,25 @@ dependencies = [ [[package]] name = "linregress" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e6e407dadb4ca4b31bc69c27aff00e7ca4534fdcee855159b039a7cebb5f395" +checksum = "d6c601a85f5ecd1aba625247bca0031585fb1c446461b142878a16f8245ddeb8" dependencies = [ "nalgebra", "statrs", ] [[package]] -name = "lock_api" -version = "0.3.4" +name = "linux-raw-sys" +version = "0.0.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4da24a77a3d8a6d4862d95f72e6fdb9c09a643ecdb402d754004a557f2bec75" -dependencies = [ - "scopeguard", -] +checksum = "687387ff42ec7ea4f2149035a5675fedb675d26f98db90a1846ac63d3addb5f5" [[package]] name = "lock_api" -version = "0.4.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0382880606dff6d15c9476c416d18690b72742aa7b605bb6dd6ec9030fbf07eb" +checksum = "712a4d093c9976e24e7dbca41db895dabcbac38eb5f4045393d17a95bdfb1109" dependencies = [ "scopeguard", ] @@ -3487,6 +3386,15 @@ dependencies = [ "hashbrown", ] +[[package]] +name = "lru" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "274353858935c992b13c0ca408752e2121da852d07dec7ce5f108c77dfa14d1f" +dependencies = [ + "hashbrown", +] + [[package]] name = "lru-cache" version = "0.1.2" @@ -3496,6 +3404,26 @@ dependencies = [ "linked-hash-map", ] +[[package]] +name = "lz4" +version = "1.23.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aac20ed6991e01bf6a2e68cc73df2b389707403662a8ba89f68511fb340f724c" +dependencies = [ + "libc", + "lz4-sys", +] + +[[package]] +name = "lz4-sys" +version = "1.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dca79aa95d8b3226213ad454d328369853be3a1382d89532a854f4d69640acae" +dependencies = [ + "cc", + "libc", +] + [[package]] name = "mach" version = "0.3.2" @@ -3541,12 +3469,6 @@ dependencies = [ "rawpointer", ] -[[package]] -name = "maybe-uninit" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" - [[package]] name = "memchr" version = "2.4.1" @@ -3563,12 +3485,12 @@ dependencies = [ ] [[package]] -name = "memoffset" -version = "0.5.6" +name = "memmap2" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "043175f069eda7b85febe4a74abbaeff828d9f8b448515d3151a14a3542811aa" +checksum = "4647a11b578fead29cdbb34d4adef8dd3dc35b876c9c6d5240d83f205abfe96e" dependencies = [ - "autocfg", + "libc", ] [[package]] @@ -3582,9 +3504,9 @@ dependencies = [ [[package]] name = "memory-db" -version = "0.27.0" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de006e09d04fc301a5f7e817b75aa49801c4479a8af753764416b085337ddcc5" +checksum = "d505169b746dacf02f7d14d8c80b34edfd8212159c63d23c977739a0d960c626" dependencies = [ "hash-db", "hashbrown", @@ -3609,26 +3531,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "minicbor" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51aa5bb0ca22415daca596a227b507f880ad1b2318a87fa9325312a5d285ca0d" -dependencies = [ - "minicbor-derive", -] - -[[package]] -name = "minicbor-derive" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54999f917cd092b13904737e26631aa2b2b88d625db68e4bab461dcd8006c788" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "miniz_oxide" version = "0.4.4" @@ -3659,38 +3561,28 @@ dependencies = [ ] [[package]] -name = "mio-extras" -version = "2.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52403fe290012ce777c4626790c8951324a2b9e3316b3143779c72b029742f19" -dependencies = [ - "lazycell", - "log", - "mio", - "slab", -] - -[[package]] -name = "mio-named-pipes" -version = "0.1.7" +name = "mio" +version = "0.7.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0840c1c50fd55e521b247f949c241c9997709f23bd7f023b9762cd561e935656" +checksum = "8067b404fe97c70829f082dec8bcf4f71225d7eaea1d8645349cb76fa06205cc" dependencies = [ + "libc", "log", - "mio", "miow 0.3.7", + "ntapi", "winapi 0.3.9", ] [[package]] -name = "mio-uds" -version = "0.6.8" +name = "mio-extras" +version = "2.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afcb699eb26d4332647cc848492bbc15eafb26f08d0304550d5aa1f612e066f0" +checksum = "52403fe290012ce777c4626790c8951324a2b9e3316b3143779c72b029742f19" dependencies = [ - "iovec", - "libc", - "mio", + "lazycell", + "log", + "mio 0.6.23", + "slab", ] [[package]] @@ -3721,16 +3613,34 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0debeb9fcf88823ea64d64e4a815ab1643f33127d995978e099942ce38f25238" [[package]] -name = "multibase" -version = "0.8.0" +name = "multiaddr" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b78c60039650ff12e140ae867ef5299a58e19dded4d334c849dc7177083667e2" +checksum = "48ee4ea82141951ac6379f964f71b20876d43712bea8faf6dd1a375e08a46499" dependencies = [ - "base-x", + "arrayref", + "bs58", + "byteorder", "data-encoding", - "data-encoding-macro", -] - + "multihash 0.14.0", + "percent-encoding 2.1.0", + "serde", + "static_assertions", + "unsigned-varint 0.7.0", + "url 2.2.2", +] + +[[package]] +name = "multibase" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b78c60039650ff12e140ae867ef5299a58e19dded4d334c849dc7177083667e2" +dependencies = [ + "base-x", + "data-encoding", + "data-encoding-macro", +] + [[package]] name = "multihash" version = "0.13.2" @@ -3743,18 +3653,31 @@ dependencies = [ "digest 0.9.0", "generic-array 0.14.4", "multihash-derive", - "sha2 0.9.5", + "sha2 0.9.9", "sha3", "unsigned-varint 0.5.1", ] +[[package]] +name = "multihash" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "752a61cd890ff691b4411423d23816d5866dd5621e4d1c5687a53b94b5a979d8" +dependencies = [ + "digest 0.9.0", + "generic-array 0.14.4", + "multihash-derive", + "sha2 0.9.9", + "unsigned-varint 0.7.0", +] + [[package]] name = "multihash-derive" version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "424f6e86263cd5294cbd7f1e95746b95aca0e0d66bff31e5a40d6baa87b4aa99" dependencies = [ - "proc-macro-crate 1.0.0", + "proc-macro-crate 1.1.0", "proc-macro-error", "proc-macro2", "quote", @@ -3774,11 +3697,11 @@ version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7d91ec0a2440aaff5f78ec35631a7027d50386c6163aa975f7caa0d5da4b6ff8" dependencies = [ - "bytes 1.0.1", + "bytes 1.1.0", "futures 0.3.16", "log", "pin-project 1.0.8", - "smallvec 1.6.1", + "smallvec", "unsigned-varint 0.7.0", ] @@ -3813,11 +3736,11 @@ dependencies = [ [[package]] name = "names" -version = "0.11.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef320dab323286b50fb5cdda23f61c796a72a89998ab565ca32525c5c556f2da" +checksum = "10a8690bf09abf659851e58cd666c3d37ac6af07c2bd7a9e332cfba471715775" dependencies = [ - "rand 0.3.23", + "rand 0.8.4", ] [[package]] @@ -3855,6 +3778,15 @@ dependencies = [ "version_check", ] +[[package]] +name = "ntapi" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f6bb902e437b6d86e03cce10a7e2af662292c5dfef23b65899ea3ac9354ad44" +dependencies = [ + "winapi 0.3.9", +] + [[package]] name = "num-bigint" version = "0.2.6" @@ -3930,20 +3862,12 @@ dependencies = [ [[package]] name = "object" -version = "0.24.0" +version = "0.27.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a5b3dd1c072ee7963717671d1ca129f1048fda25edea6b752bfc71ac8854170" +checksum = "67ac1d3f9a1d3616fd9a60c8d74296f22406a238b6a72f5cc1e6f314df4ffbf9" dependencies = [ "crc32fast", "indexmap", -] - -[[package]] -name = "object" -version = "0.26.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee2766204889d09937d00bfbb7fec56bb2a199e2ade963cab19185d8a6104c7c" -dependencies = [ "memchr", ] @@ -3952,9 +3876,6 @@ name = "once_cell" version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "692fcb63b64b1758029e0a96ee63e049ce8c5948587f2f7208df04625e5f6b56" -dependencies = [ - "parking_lot 0.11.1", -] [[package]] name = "opaque-debug" @@ -3968,6 +3889,29 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" +[[package]] +name = "open-metrics-client" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7337d80c23c2d8b1349563981bc4fb531220733743ba8115454a67b181173f0d" +dependencies = [ + "dtoa", + "itoa 0.4.7", + "open-metrics-client-derive-text-encode", + "owning_ref", +] + +[[package]] +name = "open-metrics-client-derive-text-encode" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a15c83b586f00268c619c1cb3340ec1a6f59dd9ba1d9833a273a68e6d5cd8ffc" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "openssl-probe" version = "0.1.4" @@ -3986,13 +3930,13 @@ dependencies = [ [[package]] name = "pallet-aura" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" dependencies = [ "frame-support", "frame-system", - "pallet-session", "pallet-timestamp", "parity-scale-codec", + "scale-info", "sp-application-crypto", "sp-consensus-aura", "sp-runtime", @@ -4002,12 +3946,13 @@ dependencies = [ [[package]] name = "pallet-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" dependencies = [ "frame-support", "frame-system", "impl-trait-for-tuples", "parity-scale-codec", + "scale-info", "sp-authorship", "sp-runtime", "sp-std", @@ -4016,13 +3961,14 @@ dependencies = [ [[package]] name = "pallet-balances" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "log", "parity-scale-codec", + "scale-info", "sp-runtime", "sp-std", ] @@ -4036,6 +3982,7 @@ dependencies = [ "frame-system", "maplit", "parity-scale-codec", + "scale-info", "serde", "sp-core", "sp-io", @@ -4046,7 +3993,7 @@ dependencies = [ [[package]] name = "pallet-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" dependencies = [ "frame-benchmarking", "frame-support", @@ -4055,6 +4002,7 @@ dependencies = [ "pallet-authorship", "pallet-session", "parity-scale-codec", + "scale-info", "sp-application-crypto", "sp-core", "sp-finality-grandpa", @@ -4073,6 +4021,7 @@ dependencies = [ "frame-support", "frame-system", "parity-scale-codec", + "scale-info", "serde", "sp-core", "sp-io", @@ -4083,12 +4032,12 @@ dependencies = [ [[package]] name = "pallet-multisig" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" dependencies = [ "frame-support", "frame-system", "parity-scale-codec", - "sp-core", + "scale-info", "sp-io", "sp-runtime", "sp-std", @@ -4097,12 +4046,13 @@ dependencies = [ [[package]] name = "pallet-randomness-collective-flip" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" dependencies = [ "frame-support", "frame-system", "parity-scale-codec", "safe-mix", + "scale-info", "sp-runtime", "sp-std", ] @@ -4110,7 +4060,7 @@ dependencies = [ [[package]] name = "pallet-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" dependencies = [ "frame-support", "frame-system", @@ -4118,6 +4068,7 @@ dependencies = [ "log", "pallet-timestamp", "parity-scale-codec", + "scale-info", "sp-core", "sp-io", "sp-runtime", @@ -4130,11 +4081,12 @@ dependencies = [ [[package]] name = "pallet-sudo" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" dependencies = [ "frame-support", "frame-system", "parity-scale-codec", + "scale-info", "sp-io", "sp-runtime", "sp-std", @@ -4143,14 +4095,14 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", - "impl-trait-for-tuples", "log", "parity-scale-codec", + "scale-info", "sp-inherents", "sp-io", "sp-runtime", @@ -4161,13 +4113,14 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" dependencies = [ "frame-support", "frame-system", "parity-scale-codec", + "scale-info", "serde", - "smallvec 1.6.1", + "smallvec", "sp-core", "sp-io", "sp-runtime", @@ -4177,7 +4130,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" dependencies = [ "jsonrpc-core", "jsonrpc-core-client", @@ -4194,7 +4147,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -4211,6 +4164,7 @@ dependencies = [ "frame-system", "pallet-balances", "parity-scale-codec", + "scale-info", "serde", "sp-core", "sp-io", @@ -4227,6 +4181,7 @@ dependencies = [ "frame-system", "pallet-balances", "parity-scale-codec", + "scale-info", "serde", "sp-arithmetic", "sp-core", @@ -4237,9 +4192,9 @@ dependencies = [ [[package]] name = "parity-db" -version = "0.2.4" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e337f62db341435f0da05b8f6b97e984ef4ea5800510cd07c2d624688c40b47" +checksum = "78a95abf24f1097c6e3181abbbbfc3630b3b5e681470940f719b69acb4911c7f" dependencies = [ "blake2-rfc", "crc32fast", @@ -4247,34 +4202,18 @@ dependencies = [ "hex", "libc", "log", - "memmap2", - "parking_lot 0.11.1", + "lz4", + "memmap2 0.2.3", + "parking_lot", "rand 0.8.4", -] - -[[package]] -name = "parity-multiaddr" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58341485071825827b7f03cf7efd1cb21e6a709bea778fb50227fd45d2f361b4" -dependencies = [ - "arrayref", - "bs58", - "byteorder", - "data-encoding", - "multihash", - "percent-encoding 2.1.0", - "serde", - "static_assertions", - "unsigned-varint 0.7.0", - "url 2.2.2", + "snap", ] [[package]] name = "parity-scale-codec" -version = "2.2.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8975095a2a03bbbdc70a74ab11a4f76a6d0b84680d87c68d722531b0ac28e8a9" +checksum = "373b1a4c1338d9cd3d1fa53b3a11bdab5ab6bd80a20f7f7becd76953ae2be909" dependencies = [ "arrayvec 0.7.1", "bitvec 0.20.4", @@ -4286,11 +4225,11 @@ dependencies = [ [[package]] name = "parity-scale-codec-derive" -version = "2.2.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40dbbfef7f0a1143c5b06e0d76a6278e25dac0bc1af4be51a0fbb73f07e7ad09" +checksum = "1557010476e0595c9b568d16dcfb81b93cdeb157612726f5170d31aa707bed27" dependencies = [ - "proc-macro-crate 1.0.0", + "proc-macro-crate 1.1.0", "proc-macro2", "quote", "syn", @@ -4304,36 +4243,31 @@ checksum = "aa9777aa91b8ad9dd5aaa04a9b6bcb02c7f1deb952fca5a66034d5e63afc5c6f" [[package]] name = "parity-tokio-ipc" -version = "0.4.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e57fea504fea33f9fbb5f49f378359030e7e026a6ab849bb9e8f0787376f1bf" +checksum = "9981e32fb75e004cc148f5fb70342f393830e0a4aa62e3cc93b50976218d42b6" dependencies = [ - "bytes 0.4.12", - "futures 0.1.31", + "futures 0.3.16", "libc", "log", - "mio-named-pipes", - "miow 0.3.7", "rand 0.7.3", - "tokio 0.1.22", - "tokio-named-pipes", - "tokio-uds", + "tokio", "winapi 0.3.9", ] [[package]] name = "parity-util-mem" -version = "0.10.0" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ad6f1acec69b95caf435bbd158d486e5a0a44fcf51531e84922c59ff09e8457" +checksum = "6f4cb4e169446179cbc6b8b6320cc9fca49bd2e94e8db25f25f200a8ea774770" dependencies = [ "cfg-if 1.0.0", "hashbrown", "impl-trait-for-tuples", "parity-util-mem-derive", - "parking_lot 0.11.1", + "parking_lot", "primitive-types", - "smallvec 1.6.1", + "smallvec", "winapi 0.3.9", ] @@ -4365,15 +4299,15 @@ checksum = "be5e13c266502aadf83426d87d81a0f5d1ef45b8027f5a471c360abfe4bfae92" [[package]] name = "parity-ws" -version = "0.10.1" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "322d72dfe461b8b9e367d057ceace105379d64d5b03907d23c481ccf3fbf8aa4" +checksum = "5983d3929ad50f12c3eb9a6743f19d691866ecd44da74c0a3308c3f8a56df0c6" dependencies = [ "byteorder", "bytes 0.4.12", "httparse", "log", - "mio", + "mio 0.6.23", "mio-extras", "rand 0.7.3", "sha-1 0.8.2", @@ -4389,76 +4323,26 @@ checksum = "427c3892f9e783d91cc128285287e70a59e206ca452770ece88a76f7a3eddd72" [[package]] name = "parking_lot" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f842b1982eb6c2fe34036a4fbfb06dd185a3f5c8edfaacdf7d1ea10b07de6252" -dependencies = [ - "lock_api 0.3.4", - "parking_lot_core 0.6.2", - "rustc_version 0.2.3", -] - -[[package]] -name = "parking_lot" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3a704eb390aafdc107b0e392f56a82b668e3a71366993b5340f5833fd62505e" -dependencies = [ - "lock_api 0.3.4", - "parking_lot_core 0.7.2", -] - -[[package]] -name = "parking_lot" -version = "0.11.1" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d7744ac029df22dca6284efe4e898991d28e3085c706c972bcd7da4a27a15eb" +checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" dependencies = [ "instant", - "lock_api 0.4.4", - "parking_lot_core 0.8.3", -] - -[[package]] -name = "parking_lot_core" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b876b1b9e7ac6e1a74a6da34d25c42e17e8862aa409cbbbdcfc8d86c6f3bc62b" -dependencies = [ - "cfg-if 0.1.10", - "cloudabi", - "libc", - "redox_syscall 0.1.57", - "rustc_version 0.2.3", - "smallvec 0.6.14", - "winapi 0.3.9", -] - -[[package]] -name = "parking_lot_core" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d58c7c768d4ba344e3e8d72518ac13e259d7c7ade24167003b8488e10b6740a3" -dependencies = [ - "cfg-if 0.1.10", - "cloudabi", - "libc", - "redox_syscall 0.1.57", - "smallvec 1.6.1", - "winapi 0.3.9", + "lock_api", + "parking_lot_core", ] [[package]] name = "parking_lot_core" -version = "0.8.3" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa7a782938e745763fe6907fc6ba86946d72f49fe7e21de074e08128a99fb018" +checksum = "d76e8e1493bcac0d2766c42737f34458f1c8c50c0d23bcb24ea953affb273216" dependencies = [ "cfg-if 1.0.0", "instant", "libc", - "redox_syscall 0.2.10", - "smallvec 1.6.1", + "redox_syscall", + "smallvec", "winapi 0.3.9", ] @@ -4468,16 +4352,6 @@ version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "acbf547ad0c65e31259204bd90935776d1c693cec2f4ff7abb7a1bbbd40dfe58" -[[package]] -name = "pbkdf2" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "006c038a43a45995a9670da19e67600114740e8511d4333bf97a56e66a7542d9" -dependencies = [ - "byteorder", - "crypto-mac 0.7.0", -] - [[package]] name = "pbkdf2" version = "0.4.0" @@ -4488,10 +4362,13 @@ dependencies = [ ] [[package]] -name = "pdqselect" -version = "0.1.0" +name = "pbkdf2" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ec91767ecc0a0bbe558ce8c9da33c068066c57ecc8bb8477ef8c1ad3ef77c27" +checksum = "d95f5254224e617595d2cc3cc73ff0a5eaf2637519e25f03388154e9378b6ffa" +dependencies = [ + "crypto-mac 0.11.1", +] [[package]] name = "peeking_take_while" @@ -4556,9 +4433,9 @@ dependencies = [ [[package]] name = "petgraph" -version = "0.5.1" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "467d164a6de56270bd7c4d070df81d07beace25012d5103ced4e9ff08d6afdb7" +checksum = "4a13a2fa9d0b63e5f22328828741e523766fff0ee9e779316902290dff3f824f" dependencies = [ "fixedbitset", "indexmap", @@ -4630,9 +4507,9 @@ checksum = "3831453b3449ceb48b6d9c7ad7c96d5ea673e9b470a1dc578c2ce6521230884c" [[package]] name = "platforms" -version = "1.1.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "989d43012e2ca1c4a02507c67282691a0a3207f9dc67cec596b43fe925b3d325" +checksum = "e8d0eef3571242013a0d5dc84861c3ae4a652e56e12adf8bdc26ff5f8cb34c94" [[package]] name = "polling" @@ -4649,21 +4526,23 @@ dependencies = [ [[package]] name = "poly1305" -version = "0.6.2" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b7456bc1ad2d4cf82b3a016be4c2ac48daf11bf990c1603ebd447fe6f30fca8" +checksum = "048aeb476be11a4b6ca432ca569e375810de9294ae78f4774e78ea98a9246ede" dependencies = [ - "cpuid-bool", + "cpufeatures 0.2.1", + "opaque-debug 0.3.0", "universal-hash", ] [[package]] name = "polyval" -version = "0.4.5" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eebcc4aa140b9abd2bc40d9c3f7ccec842679cd79045ac3a7ac698c1a064b7cd" +checksum = "8419d2b623c7c0896ff2d5d96e2cb4ede590fed28fcc34934f4c33c036e620a1" dependencies = [ - "cpuid-bool", + "cfg-if 1.0.0", + "cpufeatures 0.2.1", "opaque-debug 0.3.0", "universal-hash", ] @@ -4683,6 +4562,7 @@ dependencies = [ "fixed-hash", "impl-codec", "impl-serde", + "scale-info", "uint", ] @@ -4697,9 +4577,9 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "1.0.0" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41fdbd1df62156fbc5945f4762632564d7d038153091c3fcf1067f6aef7cff92" +checksum = "1ebace6889caf889b4d3f76becee12e90353f2b8c7d875534a71e5742f8f6f83" dependencies = [ "thiserror", "toml", @@ -4729,77 +4609,67 @@ dependencies = [ "version_check", ] -[[package]] -name = "proc-macro-hack" -version = "0.5.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbf0c48bc1d91375ae5c3cd81e3722dff1abcf81a30960240640d223f59fe0e5" - -[[package]] -name = "proc-macro-nested" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc881b2c22681370c6a780e47af9840ef841837bc98118431d4e1868bd0c1086" - [[package]] name = "proc-macro2" -version = "1.0.28" +version = "1.0.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c7ed8b8c7b886ea3ed7dde405212185f423ab44682667c8c6dd14aa1d9f6612" +checksum = "ba508cc11742c0dc5c1659771673afbab7a0efab23aa17e854cbab0837ed0b43" dependencies = [ "unicode-xid", ] [[package]] name = "prometheus" -version = "0.11.0" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8425533e7122f0c3cc7a37e6244b16ad3a2cc32ae7ac6276e2a75da0d9c200d" +checksum = "b7f64969ffd5dd8f39bd57a68ac53c163a095ed9d0fb707146da1b27025a3504" dependencies = [ "cfg-if 1.0.0", "fnv", "lazy_static", - "parking_lot 0.11.1", - "regex", + "memchr", + "parking_lot", "thiserror", ] [[package]] name = "prost" -version = "0.7.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e6984d2f1a23009bd270b8bb56d0926810a3d483f59c987d77969e9d8e840b2" +checksum = "444879275cb4fd84958b1a1d5420d15e6fcf7c235fe47f053c9c2a80aceb6001" dependencies = [ - "bytes 1.0.1", + "bytes 1.1.0", "prost-derive", ] [[package]] name = "prost-build" -version = "0.7.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32d3ebd75ac2679c2af3a92246639f9fcc8a442ee420719cc4fe195b98dd5fa3" +checksum = "62941722fb675d463659e49c4f3fe1fe792ff24fe5bbaa9c08cd3b98a1c354f5" dependencies = [ - "bytes 1.0.1", + "bytes 1.1.0", "heck", - "itertools 0.9.0", + "itertools", + "lazy_static", "log", "multimap", "petgraph", "prost", "prost-types", + "regex", "tempfile", "which", ] [[package]] name = "prost-derive" -version = "0.7.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "169a15f3008ecb5160cba7d37bcd690a7601b6d30cfb87a117d45e59d52af5d4" +checksum = "f9cc1a3263e07e0bf68e96268f37665207b49560d98739662cdfaae215c720fe" dependencies = [ "anyhow", - "itertools 0.9.0", + "itertools", "proc-macro2", "quote", "syn", @@ -4807,11 +4677,11 @@ dependencies = [ [[package]] name = "prost-types" -version = "0.7.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b518d7cdd93dab1d1122cf07fa9a60771836c668dde9d9e2a139f957f0d9f1bb" +checksum = "534b7a0e836e3c482d2693070f982e39e7611da9695d4d1f5a4b186b51faef0a" dependencies = [ - "bytes 1.0.1", + "bytes 1.1.0", "prost", ] @@ -4826,9 +4696,9 @@ dependencies = [ [[package]] name = "pwasm-utils" -version = "0.18.1" +version = "0.18.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0c1a2f10b47d446372a4f397c58b329aaea72b2daf9395a623a411cb8ccb54f" +checksum = "880b3384fb00b8f6ecccd5d358b93bd2201900ae3daad213791d1864f6441f5c" dependencies = [ "byteorder", "log", @@ -4860,9 +4730,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.9" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3d0b9745dc2debf507c8422de05d7226cc1f0644216dfdfead988f9b1ab32a7" +checksum = "38bc8cc6a5f2e3655e0899c1b848643b2562f853f114bfec7be120678e3ace05" dependencies = [ "proc-macro2", ] @@ -4879,29 +4749,6 @@ version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "643f8f41a8ebc4c5dc4515c82bb8abd397b527fc20fd681b7c011c2aee5d44fb" -[[package]] -name = "rand" -version = "0.3.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64ac302d8f83c0c1974bf758f6b041c6c8ada916fbb44a609158ca8b064cc76c" -dependencies = [ - "libc", - "rand 0.4.6", -] - -[[package]] -name = "rand" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "552840b97013b1a26992c11eac34bdd778e464601a4c2054b5f0bff7c6761293" -dependencies = [ - "fuchsia-cprng", - "libc", - "rand_core 0.3.1", - "rdrand", - "winapi 0.3.9", -] - [[package]] name = "rand" version = "0.7.3" @@ -4948,21 +4795,6 @@ dependencies = [ "rand_core 0.6.3", ] -[[package]] -name = "rand_core" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b" -dependencies = [ - "rand_core 0.4.2", -] - -[[package]] -name = "rand_core" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c33a3c44ca05fa6f1807d8e6743f3824e8509beca625669633be0acbdf509dc" - [[package]] name = "rand_core" version = "0.5.1" @@ -5031,7 +4863,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c06aca804d41dbc8ba42dfd964f0d01334eceb64314b9ecf7c5fad5188a06d90" dependencies = [ "autocfg", - "crossbeam-deque 0.8.1", + "crossbeam-deque", "either", "rayon-core", ] @@ -5043,27 +4875,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d78120e2c850279833f1dd3582f730c4ab53ed95aeaaaa862a2a5c71b1656d8e" dependencies = [ "crossbeam-channel", - "crossbeam-deque 0.8.1", - "crossbeam-utils 0.8.5", + "crossbeam-deque", + "crossbeam-utils", "lazy_static", "num_cpus", ] -[[package]] -name = "rdrand" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" -dependencies = [ - "rand_core 0.3.1", -] - -[[package]] -name = "redox_syscall" -version = "0.1.57" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" - [[package]] name = "redox_syscall" version = "0.2.10" @@ -5080,7 +4897,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "528532f3d801c87aec9def2add9ca802fe569e44a544afe633765267840abe64" dependencies = [ "getrandom 0.2.3", - "redox_syscall 0.2.10", + "redox_syscall", ] [[package]] @@ -5105,14 +4922,13 @@ dependencies = [ [[package]] name = "regalloc" -version = "0.0.31" +version = "0.0.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "571f7f397d61c4755285cd37853fe8e03271c243424a907415909379659381c5" +checksum = "a6304468554ed921da3d32c355ea107b8d13d7b8996c3adfb7aab48d3bc321f4" dependencies = [ "log", "rustc-hash", - "serde", - "smallvec 1.6.1", + "smallvec", ] [[package]] @@ -5174,9 +4990,9 @@ dependencies = [ [[package]] name = "retain_mut" -version = "0.1.3" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9c17925a9027d298a4603d286befe3f9dc0e8ed02523141914eb628798d6e5b" +checksum = "11000e6ba5020e53e7cc26f73b91ae7d5496b4977851479edb66b694c0675c21" [[package]] name = "ring" @@ -5213,6 +5029,23 @@ dependencies = [ "winapi 0.3.9", ] +[[package]] +name = "rsix" +version = "0.23.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f64c5788d5aab8b75441499d99576a24eb09f76fb267b36fec7e3d970c66431" +dependencies = [ + "bitflags", + "cc", + "errno", + "io-lifetimes", + "itoa 0.4.7", + "libc", + "linux-raw-sys", + "once_cell", + "rustc_version 0.4.0", +] + [[package]] name = "rustc-demangle" version = "0.1.20" @@ -5250,16 +5083,12 @@ dependencies = [ ] [[package]] -name = "rustls" -version = "0.18.1" +name = "rustc_version" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d1126dcf58e93cee7d098dbda643b5f92ed724f1f6a63007c1116eed6700c81" +checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" dependencies = [ - "base64 0.12.3", - "log", - "ring", - "sct", - "webpki", + "semver 1.0.4", ] [[package]] @@ -5268,7 +5097,7 @@ version = "0.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "35edb675feee39aec9c99fa5ff985081995a06d594114ae14cbe797ad7b7a6d7" dependencies = [ - "base64 0.13.0", + "base64", "log", "ring", "sct", @@ -5277,26 +5106,16 @@ dependencies = [ [[package]] name = "rustls-native-certs" -version = "0.4.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "629d439a7672da82dd955498445e496ee2096fe2117b9f796558a43fdb9e59b8" +checksum = "5a07b7c1885bd8ed3831c289b7870b13ef46fe0e856d288c30d9cc17d75a2092" dependencies = [ "openssl-probe", - "rustls 0.18.1", + "rustls", "schannel", "security-framework", ] -[[package]] -name = "ruzstd" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cada0ef59efa6a5f4dc5e491f93d9f31e3fc7758df421ff1de8a706338e1100" -dependencies = [ - "byteorder", - "twox-hash", -] - [[package]] name = "rw-stream-sink" version = "0.2.1" @@ -5325,9 +5144,9 @@ dependencies = [ [[package]] name = "salsa20" -version = "0.7.2" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "399f290ffc409596022fce5ea5d4138184be4784f2b28c62c59f0d8389059a15" +checksum = "0c0fbb5f676da676c260ba276a8f43a8dc67cf02d1438423aeb1c677a7212686" dependencies = [ "cipher", ] @@ -5343,8 +5162,8 @@ dependencies = [ [[package]] name = "sc-allocator" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +version = "4.1.0-dev" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" dependencies = [ "log", "sp-core", @@ -5355,7 +5174,7 @@ dependencies = [ [[package]] name = "sc-basic-authorship" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" dependencies = [ "futures 0.3.16", "futures-timer 3.0.2", @@ -5378,7 +5197,7 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" dependencies = [ "parity-scale-codec", "sc-client-api", @@ -5394,19 +5213,16 @@ dependencies = [ [[package]] name = "sc-chain-spec" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" dependencies = [ "impl-trait-for-tuples", + "memmap2 0.5.0", "parity-scale-codec", "sc-chain-spec-derive", - "sc-consensus-babe", - "sc-consensus-epochs", - "sc-finality-grandpa", "sc-network", "sc-telemetry", "serde", "serde_json", - "sp-consensus-babe", "sp-core", "sp-runtime", ] @@ -5414,9 +5230,9 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" dependencies = [ - "proc-macro-crate 1.0.0", + "proc-macro-crate 1.1.0", "proc-macro2", "quote", "syn", @@ -5425,7 +5241,7 @@ dependencies = [ [[package]] name = "sc-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" dependencies = [ "chrono", "fdlimit", @@ -5444,6 +5260,7 @@ dependencies = [ "sc-service", "sc-telemetry", "sc-tracing", + "sc-utils", "serde", "serde_json", "sp-blockchain", @@ -5452,54 +5269,46 @@ dependencies = [ "sp-keystore", "sp-panic-handler", "sp-runtime", - "sp-utils", "sp-version", "structopt", "thiserror", "tiny-bip39", - "tokio 0.2.25", + "tokio", ] [[package]] name = "sc-client-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" dependencies = [ - "derive_more", "fnv", "futures 0.3.16", "hash-db", - "kvdb", - "lazy_static", "log", "parity-scale-codec", - "parking_lot 0.11.1", + "parking_lot", "sc-executor", "sc-transaction-pool-api", + "sc-utils", "sp-api", "sp-blockchain", "sp-consensus", "sp-core", "sp-database", "sp-externalities", - "sp-inherents", "sp-keystore", "sp-runtime", "sp-state-machine", - "sp-std", "sp-storage", "sp-trie", - "sp-utils", - "sp-version", "substrate-prometheus-endpoint", ] [[package]] name = "sc-client-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" dependencies = [ - "blake2-rfc", "hash-db", "kvdb", "kvdb-memorydb", @@ -5508,10 +5317,8 @@ dependencies = [ "log", "parity-db", "parity-scale-codec", - "parity-util-mem", - "parking_lot 0.11.1", + "parking_lot", "sc-client-api", - "sc-executor", "sc-state-db", "sp-arithmetic", "sp-blockchain", @@ -5520,21 +5327,21 @@ dependencies = [ "sp-runtime", "sp-state-machine", "sp-trie", - "substrate-prometheus-endpoint", ] [[package]] name = "sc-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" dependencies = [ "async-trait", "futures 0.3.16", "futures-timer 3.0.2", "libp2p", "log", - "parking_lot 0.11.1", + "parking_lot", "sc-client-api", + "sc-utils", "serde", "sp-api", "sp-blockchain", @@ -5542,21 +5349,18 @@ dependencies = [ "sp-core", "sp-runtime", "sp-state-machine", - "sp-utils", "substrate-prometheus-endpoint", "thiserror", - "wasm-timer", ] [[package]] name = "sc-consensus-aura" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" dependencies = [ "async-trait", "derive_more", "futures 0.3.16", - "futures-timer 3.0.2", "log", "parity-scale-codec", "sc-block-builder", @@ -5573,38 +5377,33 @@ dependencies = [ "sp-consensus-slots", "sp-core", "sp-inherents", - "sp-io", "sp-keystore", "sp-runtime", - "sp-version", "substrate-prometheus-endpoint", ] [[package]] name = "sc-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" dependencies = [ "async-trait", "derive_more", "fork-tree", "futures 0.3.16", - "futures-timer 3.0.2", "log", "merlin", "num-bigint", "num-rational 0.2.4", "num-traits", "parity-scale-codec", - "parking_lot 0.11.1", - "pdqselect", + "parking_lot", "rand 0.7.3", "retain_mut", "sc-client-api", "sc-consensus", "sc-consensus-epochs", "sc-consensus-slots", - "sc-consensus-uncles", "sc-keystore", "sc-telemetry", "schnorrkel", @@ -5622,7 +5421,6 @@ dependencies = [ "sp-io", "sp-keystore", "sp-runtime", - "sp-utils", "sp-version", "substrate-prometheus-endpoint", ] @@ -5630,7 +5428,7 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" dependencies = [ "fork-tree", "parity-scale-codec", @@ -5643,7 +5441,7 @@ dependencies = [ [[package]] name = "sc-consensus-manual-seal" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" dependencies = [ "assert_matches", "async-trait", @@ -5654,7 +5452,6 @@ dependencies = [ "jsonrpc-derive", "log", "parity-scale-codec", - "parking_lot 0.11.1", "sc-client-api", "sc-consensus", "sc-consensus-babe", @@ -5669,7 +5466,6 @@ dependencies = [ "sp-consensus-slots", "sp-core", "sp-inherents", - "sp-keyring", "sp-keystore", "sp-runtime", "sp-timestamp", @@ -5679,19 +5475,16 @@ dependencies = [ [[package]] name = "sc-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" dependencies = [ "async-trait", "futures 0.3.16", "futures-timer 3.0.2", - "impl-trait-for-tuples", "log", "parity-scale-codec", "sc-client-api", "sc-consensus", "sc-telemetry", - "sp-api", - "sp-application-crypto", "sp-arithmetic", "sp-blockchain", "sp-consensus", @@ -5701,43 +5494,30 @@ dependencies = [ "sp-runtime", "sp-state-machine", "sp-timestamp", - "sp-trie", - "thiserror", -] - -[[package]] -name = "sc-consensus-uncles" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" -dependencies = [ - "sc-client-api", - "sp-authorship", - "sp-runtime", "thiserror", ] [[package]] name = "sc-executor" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" dependencies = [ - "derive_more", "lazy_static", "libsecp256k1", "log", + "lru 0.6.6", "parity-scale-codec", - "parity-wasm 0.42.2", - "parking_lot 0.11.1", + "parking_lot", "sc-executor-common", "sc-executor-wasmi", "sc-executor-wasmtime", "sp-api", "sp-core", + "sp-core-hashing-proc-macro", "sp-externalities", "sp-io", "sp-panic-handler", "sp-runtime-interface", - "sp-serializer", "sp-tasks", "sp-trie", "sp-version", @@ -5748,9 +5528,10 @@ dependencies = [ [[package]] name = "sc-executor-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" dependencies = [ "derive_more", + "environmental", "parity-scale-codec", "pwasm-utils", "sc-allocator", @@ -5765,12 +5546,13 @@ dependencies = [ [[package]] name = "sc-executor-wasmi" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" dependencies = [ "log", "parity-scale-codec", "sc-allocator", "sc-executor-common", + "scoped-tls", "sp-core", "sp-runtime-interface", "sp-wasm-interface", @@ -5780,17 +5562,15 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" dependencies = [ "cfg-if 1.0.0", "libc", "log", "parity-scale-codec", "parity-wasm 0.42.2", - "pwasm-utils", "sc-allocator", "sc-executor-common", - "scoped-tls", "sp-core", "sp-runtime-interface", "sp-wasm-interface", @@ -5800,7 +5580,7 @@ dependencies = [ [[package]] name = "sc-finality-grandpa" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" dependencies = [ "async-trait", "derive_more", @@ -5809,12 +5589,10 @@ dependencies = [ "fork-tree", "futures 0.3.16", "futures-timer 3.0.2", - "linked-hash-map", "log", "parity-scale-codec", - "parking_lot 0.11.1", - "pin-project 1.0.8", - "rand 0.7.3", + "parking_lot", + "rand 0.8.4", "sc-block-builder", "sc-client-api", "sc-consensus", @@ -5822,6 +5600,7 @@ dependencies = [ "sc-network", "sc-network-gossip", "sc-telemetry", + "sc-utils", "serde_json", "sp-api", "sp-application-crypto", @@ -5830,18 +5609,15 @@ dependencies = [ "sp-consensus", "sp-core", "sp-finality-grandpa", - "sp-inherents", "sp-keystore", "sp-runtime", - "sp-utils", "substrate-prometheus-endpoint", - "wasm-timer", ] [[package]] name = "sc-informant" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" dependencies = [ "ansi_term 0.12.1", "futures 0.3.16", @@ -5853,63 +5629,36 @@ dependencies = [ "sc-transaction-pool-api", "sp-blockchain", "sp-runtime", - "wasm-timer", ] [[package]] name = "sc-keystore" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" dependencies = [ "async-trait", "derive_more", - "futures 0.3.16", - "futures-util", "hex", - "merlin", - "parking_lot 0.11.1", - "rand 0.7.3", + "parking_lot", "serde_json", "sp-application-crypto", "sp-core", "sp-keystore", - "subtle 2.4.1", -] - -[[package]] -name = "sc-light" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" -dependencies = [ - "hash-db", - "lazy_static", - "parity-scale-codec", - "parking_lot 0.11.1", - "sc-client-api", - "sc-executor", - "sp-api", - "sp-blockchain", - "sp-core", - "sp-externalities", - "sp-runtime", - "sp-state-machine", ] [[package]] name = "sc-network" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" dependencies = [ "async-std", "async-trait", "asynchronous-codec 0.5.0", "bitflags", - "bs58", - "bytes 1.0.1", + "bytes 1.1.0", "cid", "derive_more", "either", - "erased-serde", "fnv", "fork-tree", "futures 0.3.16", @@ -5920,10 +5669,9 @@ dependencies = [ "linked-hash-map", "linked_hash_set", "log", - "lru", - "nohash-hasher", + "lru 0.7.2", "parity-scale-codec", - "parking_lot 0.11.1", + "parking_lot", "pin-project 1.0.8", "prost", "prost-build", @@ -5932,85 +5680,84 @@ dependencies = [ "sc-client-api", "sc-consensus", "sc-peerset", + "sc-utils", "serde", "serde_json", - "smallvec 1.6.1", + "smallvec", "sp-arithmetic", "sp-blockchain", "sp-consensus", "sp-core", + "sp-finality-grandpa", "sp-runtime", - "sp-utils", "substrate-prometheus-endpoint", "thiserror", "unsigned-varint 0.6.0", "void", - "wasm-timer", "zeroize", ] [[package]] name = "sc-network-gossip" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" dependencies = [ "futures 0.3.16", "futures-timer 3.0.2", "libp2p", "log", - "lru", + "lru 0.7.2", "sc-network", "sp-runtime", "substrate-prometheus-endpoint", "tracing", - "wasm-timer", ] [[package]] name = "sc-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" dependencies = [ - "bytes 0.5.6", + "bytes 1.1.0", "fnv", "futures 0.3.16", "futures-timer 3.0.2", "hex", - "hyper 0.13.10", + "hyper", "hyper-rustls", - "log", "num_cpus", + "once_cell", "parity-scale-codec", - "parking_lot 0.11.1", + "parking_lot", "rand 0.7.3", "sc-client-api", - "sc-keystore", "sc-network", + "sc-utils", "sp-api", "sp-core", "sp-offchain", "sp-runtime", - "sp-utils", "threadpool", + "tracing", ] [[package]] name = "sc-peerset" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" dependencies = [ "futures 0.3.16", "libp2p", "log", + "sc-utils", "serde_json", - "sp-utils", "wasm-timer", ] [[package]] name = "sc-proposer-metrics" -version = "0.9.0" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +version = "0.10.0-dev" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -6019,7 +5766,7 @@ dependencies = [ [[package]] name = "sc-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" dependencies = [ "futures 0.3.16", "hash-db", @@ -6027,15 +5774,14 @@ dependencies = [ "jsonrpc-pubsub", "log", "parity-scale-codec", - "parking_lot 0.11.1", + "parking_lot", "sc-block-builder", "sc-chain-spec", "sc-client-api", - "sc-executor", - "sc-keystore", "sc-rpc-api", "sc-tracing", "sc-transaction-pool-api", + "sc-utils", "serde_json", "sp-api", "sp-blockchain", @@ -6045,18 +5791,14 @@ dependencies = [ "sp-rpc", "sp-runtime", "sp-session", - "sp-state-machine", - "sp-tracing", - "sp-utils", "sp-version", ] [[package]] name = "sc-rpc-api" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" dependencies = [ - "derive_more", "futures 0.3.16", "jsonrpc-core", "jsonrpc-core-client", @@ -6064,7 +5806,7 @@ dependencies = [ "jsonrpc-pubsub", "log", "parity-scale-codec", - "parking_lot 0.11.1", + "parking_lot", "sc-chain-spec", "sc-transaction-pool-api", "serde", @@ -6074,45 +5816,43 @@ dependencies = [ "sp-runtime", "sp-tracing", "sp-version", + "thiserror", ] [[package]] name = "sc-rpc-server" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" dependencies = [ - "futures 0.1.31", + "futures 0.3.16", "jsonrpc-core", "jsonrpc-http-server", "jsonrpc-ipc-server", "jsonrpc-pubsub", "jsonrpc-ws-server", "log", - "serde", "serde_json", - "sp-runtime", "substrate-prometheus-endpoint", + "tokio", ] [[package]] name = "sc-service" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" dependencies = [ "async-trait", "directories", "exit-future", - "futures 0.1.31", "futures 0.3.16", "futures-timer 3.0.2", "hash-db", "jsonrpc-core", "jsonrpc-pubsub", - "lazy_static", "log", "parity-scale-codec", "parity-util-mem", - "parking_lot 0.11.1", + "parking_lot", "pin-project 1.0.8", "rand 0.7.3", "sc-block-builder", @@ -6123,7 +5863,6 @@ dependencies = [ "sc-executor", "sc-informant", "sc-keystore", - "sc-light", "sc-network", "sc-offchain", "sc-rpc", @@ -6132,6 +5871,7 @@ dependencies = [ "sc-tracing", "sc-transaction-pool", "sc-transaction-pool-api", + "sc-utils", "serde", "serde_json", "sp-api", @@ -6142,7 +5882,6 @@ dependencies = [ "sp-core", "sp-externalities", "sp-inherents", - "sp-io", "sp-keystore", "sp-runtime", "sp-session", @@ -6152,94 +5891,84 @@ dependencies = [ "sp-transaction-pool", "sp-transaction-storage-proof", "sp-trie", - "sp-utils", "sp-version", "substrate-prometheus-endpoint", "tempfile", "thiserror", + "tokio", "tracing", "tracing-futures", - "wasm-timer", ] [[package]] name = "sc-state-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" dependencies = [ "log", "parity-scale-codec", "parity-util-mem", "parity-util-mem-derive", - "parking_lot 0.11.1", + "parking_lot", "sc-client-api", "sp-core", - "thiserror", ] [[package]] name = "sc-telemetry" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" dependencies = [ "chrono", "futures 0.3.16", "libp2p", "log", - "parking_lot 0.11.1", + "parking_lot", "pin-project 1.0.8", "rand 0.7.3", "serde", "serde_json", - "take_mut", "thiserror", - "void", "wasm-timer", ] [[package]] name = "sc-tracing" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" dependencies = [ "ansi_term 0.12.1", "atty", - "erased-serde", + "chrono", "lazy_static", + "libc", "log", "once_cell", - "parking_lot 0.11.1", + "parking_lot", "regex", "rustc-hash", "sc-client-api", "sc-rpc-server", - "sc-telemetry", "sc-tracing-proc-macro", "serde", - "serde_json", "sp-api", - "sp-block-builder", "sp-blockchain", "sp-core", "sp-rpc", "sp-runtime", - "sp-storage", "sp-tracing", "thiserror", "tracing", "tracing-log", "tracing-subscriber", - "wasm-bindgen", - "wasm-timer", - "web-sys", ] [[package]] name = "sc-tracing-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" dependencies = [ - "proc-macro-crate 1.0.0", + "proc-macro-crate 1.1.0", "proc-macro2", "quote", "syn", @@ -6248,19 +5977,19 @@ dependencies = [ [[package]] name = "sc-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" dependencies = [ - "derive_more", "futures 0.3.16", "intervalier", "linked-hash-map", "log", "parity-scale-codec", "parity-util-mem", - "parking_lot 0.11.1", + "parking_lot", "retain_mut", "sc-client-api", "sc-transaction-pool-api", + "sc-utils", "serde", "sp-api", "sp-blockchain", @@ -6268,47 +5997,56 @@ dependencies = [ "sp-runtime", "sp-tracing", "sp-transaction-pool", - "sp-utils", "substrate-prometheus-endpoint", "thiserror", - "wasm-timer", ] [[package]] name = "sc-transaction-pool-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" dependencies = [ "derive_more", "futures 0.3.16", "log", - "parity-scale-codec", "serde", "sp-blockchain", "sp-runtime", "thiserror", ] +[[package]] +name = "sc-utils" +version = "4.0.0-dev" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" +dependencies = [ + "futures 0.3.16", + "futures-timer 3.0.2", + "lazy_static", + "prometheus", +] + [[package]] name = "scale-info" -version = "0.10.0" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2e62ff266e136db561a007c84569985805f84a1d5a08278e52c36aacb6e061b" +checksum = "5c55b744399c25532d63a0d2789b109df8d46fc93752d46b0782991a931a782f" dependencies = [ "bitvec 0.20.4", "cfg-if 1.0.0", "derive_more", "parity-scale-codec", "scale-info-derive", + "serde", ] [[package]] name = "scale-info-derive" -version = "0.7.0" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b648fa291891a4c80187a25532f6a7d96b82c70353e30b868b14632b8fe043d6" +checksum = "baeb2780690380592f86205aa4ee49815feb2acad8c2f59e6dd207148c3f1fcd" dependencies = [ - "proc-macro-crate 1.0.0", + "proc-macro-crate 1.1.0", "proc-macro2", "quote", "syn", @@ -6338,7 +6076,7 @@ dependencies = [ "rand 0.7.3", "rand_core 0.5.1", "sha2 0.8.2", - "subtle 2.4.1", + "subtle", "zeroize", ] @@ -6366,18 +6104,18 @@ dependencies = [ [[package]] name = "secrecy" -version = "0.7.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0673d6a6449f5e7d12a1caf424fd9363e2af3a4953023ed455e3c4beef4597c0" +checksum = "9bd1c54ea06cfd2f6b63219704de0b9b4f72dcc2b8fdef820be6cd799780e91e" dependencies = [ "zeroize", ] [[package]] name = "security-framework" -version = "1.0.0" +version = "2.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad502866817f0575705bd7be36e2b2535cc33262d493aa733a2ec862baa2bc2b" +checksum = "525bc1abfda2e1998d152c45cf13e696f76d0a4972310b22fac1658b05df7c87" dependencies = [ "bitflags", "core-foundation", @@ -6388,9 +6126,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "1.0.0" +version = "2.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51ceb04988b17b6d1dcd555390fa822ca5637b4a14e1f5099f13d351bed4d6c7" +checksum = "a9dd14d83160b528b7bfd66439110573efcfbe281b17fc2ca9f39f550d619c7e" dependencies = [ "core-foundation-sys", "libc", @@ -6421,6 +6159,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f301af10236f6df4160f7c3f04eec6dbc70ace82d23326abad5edee88801c6b6" dependencies = [ "semver-parser 0.10.2", +] + +[[package]] +name = "semver" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "568a8e6258aa33c13358f81fd834adb854c6f7c9468520910a9b1e8fac068012" +dependencies = [ "serde", ] @@ -6441,18 +6187,18 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.127" +version = "1.0.133" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f03b9878abf6d14e6779d3f24f07b2cfa90352cfec4acc5aab8f1ac7f146fae8" +checksum = "97565067517b60e2d1ea8b268e59ce036de907ac523ad83a0475da04e818989a" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.127" +version = "1.0.133" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a024926d3432516606328597e0f224a51355a493b49fdd67e9209187cbe55ecc" +checksum = "ed201699328568d8d08208fdd080e3ff594e6c422e438b6705905da01005d537" dependencies = [ "proc-macro2", "quote", @@ -6461,11 +6207,11 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.66" +version = "1.0.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "336b10da19a12ad094b59d870ebde26a45402e5b470add4b5fd03c5048a32127" +checksum = "ee2bb9cd061c5865d345bb02ca49fcef1391741b672b54a0bf7b679badec3142" dependencies = [ - "itoa", + "itoa 1.0.1", "ryu", "serde", ] @@ -6490,7 +6236,7 @@ checksum = "1a0c8611594e2ab4ebbf06ec7cbbf0a99450b8570e96cbf5188b5d5f6ef18d81" dependencies = [ "block-buffer 0.9.0", "cfg-if 1.0.0", - "cpufeatures", + "cpufeatures 0.1.5", "digest 0.9.0", "opaque-debug 0.3.0", ] @@ -6509,13 +6255,13 @@ dependencies = [ [[package]] name = "sha2" -version = "0.9.5" +version = "0.9.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b362ae5752fd2137731f9fa25fd4d9058af34666ca1966fb969119cc35719f12" +checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" dependencies = [ "block-buffer 0.9.0", "cfg-if 1.0.0", - "cpufeatures", + "cpufeatures 0.2.1", "digest 0.9.0", "opaque-debug 0.3.0", ] @@ -6590,45 +6336,33 @@ version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c307a32c1c5c437f38c7fd45d753050587732ba8628319fbdf12a7e289ccc590" -[[package]] -name = "slog" -version = "2.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8347046d4ebd943127157b94d63abb990fcf729dc4e9978927fdf4ac3c998d06" -dependencies = [ - "erased-serde", -] - [[package]] name = "smallvec" -version = "0.6.14" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b97fcaeba89edba30f044a10c6a3cc39df9c3f17d7cd829dd1446cab35f890e0" -dependencies = [ - "maybe-uninit", -] +checksum = "1ecab6c735a6bb4139c0caafd0cc3635748bbb3acf4550e8138122099251f309" [[package]] -name = "smallvec" -version = "1.6.1" +name = "snap" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe0f37c9e8f3c5a4a66ad655a93c74daac4ad00c441533bf5c6e7990bb42604e" +checksum = "45456094d1983e2ee2a18fdfebce3189fa451699d0502cb8e3b49dba5ba41451" [[package]] name = "snow" -version = "0.7.2" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "795dd7aeeee24468e5a32661f6d27f7b5cbed802031b2d7640c7b10f8fb2dd50" +checksum = "6142f7c25e94f6fd25a32c3348ec230df9109b463f59c8c7acc4bd34936babb7" dependencies = [ "aes-gcm", "blake2", "chacha20poly1305", - "rand 0.7.3", - "rand_core 0.5.1", + "rand 0.8.4", + "rand_core 0.6.3", "ring", - "rustc_version 0.2.3", - "sha2 0.9.5", - "subtle 2.4.1", + "rustc_version 0.3.3", + "sha2 0.9.9", + "subtle", "x25519-dalek", ] @@ -6655,24 +6389,24 @@ dependencies = [ [[package]] name = "soketto" -version = "0.4.2" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5c71ed3d54db0a699f4948e1bb3e45b450fa31fe602621dee6680361d569c88" +checksum = "41d1c5305e39e09653383c2c7244f2f78b3bcae37cf50c64cb4789c9f5096ec2" dependencies = [ - "base64 0.12.3", - "bytes 0.5.6", + "base64", + "bytes 1.1.0", "flate2", "futures 0.3.16", "httparse", "log", - "rand 0.7.3", + "rand 0.8.4", "sha-1 0.9.7", ] [[package]] name = "sp-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" dependencies = [ "hash-db", "log", @@ -6689,10 +6423,10 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" dependencies = [ "blake2-rfc", - "proc-macro-crate 1.0.0", + "proc-macro-crate 1.1.0", "proc-macro2", "quote", "syn", @@ -6700,10 +6434,11 @@ dependencies = [ [[package]] name = "sp-application-crypto" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +version = "4.0.0" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" dependencies = [ "parity-scale-codec", + "scale-info", "serde", "sp-core", "sp-io", @@ -6712,12 +6447,13 @@ dependencies = [ [[package]] name = "sp-arithmetic" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +version = "4.0.0" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" dependencies = [ "integer-sqrt", "num-traits", "parity-scale-codec", + "scale-info", "serde", "sp-debug-derive", "sp-std", @@ -6727,7 +6463,7 @@ dependencies = [ [[package]] name = "sp-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" dependencies = [ "async-trait", "parity-scale-codec", @@ -6739,7 +6475,7 @@ dependencies = [ [[package]] name = "sp-block-builder" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" dependencies = [ "parity-scale-codec", "sp-api", @@ -6751,13 +6487,13 @@ dependencies = [ [[package]] name = "sp-blockchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" dependencies = [ "futures 0.3.16", "log", - "lru", + "lru 0.7.2", "parity-scale-codec", - "parking_lot 0.11.1", + "parking_lot", "sp-api", "sp-consensus", "sp-database", @@ -6769,36 +6505,30 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" dependencies = [ "async-trait", "futures 0.3.16", "futures-timer 3.0.2", "log", "parity-scale-codec", - "parking_lot 0.11.1", - "serde", - "sp-api", "sp-core", "sp-inherents", "sp-runtime", "sp-state-machine", "sp-std", - "sp-trie", - "sp-utils", "sp-version", - "substrate-prometheus-endpoint", "thiserror", - "wasm-timer", ] [[package]] name = "sp-consensus-aura" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" dependencies = [ "async-trait", "parity-scale-codec", + "scale-info", "sp-api", "sp-application-crypto", "sp-consensus", @@ -6812,11 +6542,12 @@ dependencies = [ [[package]] name = "sp-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" dependencies = [ "async-trait", "merlin", "parity-scale-codec", + "scale-info", "serde", "sp-api", "sp-application-crypto", @@ -6834,9 +6565,11 @@ dependencies = [ [[package]] name = "sp-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" dependencies = [ "parity-scale-codec", + "scale-info", + "serde", "sp-arithmetic", "sp-runtime", ] @@ -6844,7 +6577,7 @@ dependencies = [ [[package]] name = "sp-consensus-vrf" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" dependencies = [ "parity-scale-codec", "schnorrkel", @@ -6855,10 +6588,11 @@ dependencies = [ [[package]] name = "sp-core" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +version = "4.1.0-dev" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" dependencies = [ "base58", + "bitflags", "blake2-rfc", "byteorder", "dyn-clonable", @@ -6875,19 +6609,22 @@ dependencies = [ "num-traits", "parity-scale-codec", "parity-util-mem", - "parking_lot 0.11.1", + "parking_lot", "primitive-types", "rand 0.7.3", "regex", + "scale-info", "schnorrkel", "secrecy", "serde", - "sha2 0.9.5", + "sha2 0.9.9", + "sp-core-hashing", "sp-debug-derive", "sp-externalities", "sp-runtime-interface", "sp-std", "sp-storage", + "ss58-registry", "substrate-bip39", "thiserror", "tiny-bip39", @@ -6897,19 +6634,43 @@ dependencies = [ "zeroize", ] +[[package]] +name = "sp-core-hashing" +version = "4.0.0" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" +dependencies = [ + "blake2-rfc", + "byteorder", + "sha2 0.9.9", + "sp-std", + "tiny-keccak", + "twox-hash", +] + +[[package]] +name = "sp-core-hashing-proc-macro" +version = "4.0.0-dev" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" +dependencies = [ + "proc-macro2", + "quote", + "sp-core-hashing", + "syn", +] + [[package]] name = "sp-database" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" dependencies = [ "kvdb", - "parking_lot 0.11.1", + "parking_lot", ] [[package]] name = "sp-debug-derive" -version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +version = "4.0.0" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" dependencies = [ "proc-macro2", "quote", @@ -6918,8 +6679,8 @@ dependencies = [ [[package]] name = "sp-externalities" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +version = "0.10.0" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" dependencies = [ "environmental", "parity-scale-codec", @@ -6930,11 +6691,12 @@ dependencies = [ [[package]] name = "sp-finality-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" dependencies = [ "finality-grandpa", "log", "parity-scale-codec", + "scale-info", "serde", "sp-api", "sp-application-crypto", @@ -6947,7 +6709,7 @@ dependencies = [ [[package]] name = "sp-inherents" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -6960,19 +6722,18 @@ dependencies = [ [[package]] name = "sp-io" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +version = "4.0.0" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" dependencies = [ "futures 0.3.16", "hash-db", "libsecp256k1", "log", "parity-scale-codec", - "parking_lot 0.11.1", + "parking_lot", "sp-core", "sp-externalities", "sp-keystore", - "sp-maybe-compressed-blob", "sp-runtime-interface", "sp-state-machine", "sp-std", @@ -6986,7 +6747,7 @@ dependencies = [ [[package]] name = "sp-keyring" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" dependencies = [ "lazy_static", "sp-core", @@ -6996,15 +6757,15 @@ dependencies = [ [[package]] name = "sp-keystore" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +version = "0.10.0" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" dependencies = [ "async-trait", "derive_more", "futures 0.3.16", "merlin", "parity-scale-codec", - "parking_lot 0.11.1", + "parking_lot", "schnorrkel", "serde", "sp-core", @@ -7013,17 +6774,16 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +version = "4.1.0-dev" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" dependencies = [ - "ruzstd", "zstd", ] [[package]] name = "sp-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" dependencies = [ "sp-api", "sp-core", @@ -7032,27 +6792,28 @@ dependencies = [ [[package]] name = "sp-panic-handler" -version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +version = "4.0.0" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" dependencies = [ "backtrace", + "lazy_static", + "regex", ] [[package]] name = "sp-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" dependencies = [ "rustc-hash", "serde", "sp-core", - "tracing-core", ] [[package]] name = "sp-runtime" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +version = "4.0.0" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" dependencies = [ "either", "hash256-std-hasher", @@ -7061,7 +6822,9 @@ dependencies = [ "parity-scale-codec", "parity-util-mem", "paste", + "primitive-types", "rand 0.7.3", + "scale-info", "serde", "sp-application-crypto", "sp-arithmetic", @@ -7072,8 +6835,8 @@ dependencies = [ [[package]] name = "sp-runtime-interface" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +version = "4.1.0-dev" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -7089,11 +6852,11 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +version = "4.0.0" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" dependencies = [ "Inflector", - "proc-macro-crate 1.0.0", + "proc-macro-crate 1.1.0", "proc-macro2", "quote", "syn", @@ -7101,8 +6864,8 @@ dependencies = [ [[package]] name = "sp-serializer" -version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +version = "4.0.0-dev" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" dependencies = [ "serde", "serde_json", @@ -7111,9 +6874,10 @@ dependencies = [ [[package]] name = "sp-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" dependencies = [ "parity-scale-codec", + "scale-info", "sp-api", "sp-core", "sp-runtime", @@ -7124,25 +6888,26 @@ dependencies = [ [[package]] name = "sp-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" dependencies = [ "parity-scale-codec", + "scale-info", "sp-runtime", "sp-std", ] [[package]] name = "sp-state-machine" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +version = "0.10.0" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" dependencies = [ "hash-db", "log", "num-traits", "parity-scale-codec", - "parking_lot 0.11.1", + "parking_lot", "rand 0.7.3", - "smallvec 1.6.1", + "smallvec", "sp-core", "sp-externalities", "sp-panic-handler", @@ -7156,13 +6921,13 @@ dependencies = [ [[package]] name = "sp-std" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +version = "4.0.0" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" [[package]] name = "sp-storage" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +version = "4.0.0" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" dependencies = [ "impl-serde", "parity-scale-codec", @@ -7175,7 +6940,7 @@ dependencies = [ [[package]] name = "sp-tasks" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" dependencies = [ "log", "sp-core", @@ -7188,7 +6953,7 @@ dependencies = [ [[package]] name = "sp-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" dependencies = [ "async-trait", "futures-timer 3.0.2", @@ -7199,21 +6964,14 @@ dependencies = [ "sp-runtime", "sp-std", "thiserror", - "wasm-timer", ] [[package]] name = "sp-tracing" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +version = "4.0.0" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" dependencies = [ - "erased-serde", - "log", "parity-scale-codec", - "parking_lot 0.10.2", - "serde", - "serde_json", - "slog", "sp-std", "tracing", "tracing-core", @@ -7223,7 +6981,7 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" dependencies = [ "sp-api", "sp-runtime", @@ -7232,11 +6990,12 @@ dependencies = [ [[package]] name = "sp-transaction-storage-proof" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" dependencies = [ "async-trait", "log", "parity-scale-codec", + "scale-info", "sp-core", "sp-inherents", "sp-runtime", @@ -7246,39 +7005,30 @@ dependencies = [ [[package]] name = "sp-trie" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +version = "4.0.0" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" dependencies = [ "hash-db", "memory-db", "parity-scale-codec", + "scale-info", "sp-core", "sp-std", "trie-db", "trie-root", ] -[[package]] -name = "sp-utils" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" -dependencies = [ - "futures 0.3.16", - "futures-core", - "futures-timer 3.0.2", - "lazy_static", - "prometheus", -] - [[package]] name = "sp-version" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" dependencies = [ "impl-serde", "parity-scale-codec", "parity-wasm 0.42.2", + "scale-info", "serde", + "sp-core-hashing-proc-macro", "sp-runtime", "sp-std", "sp-version-proc-macro", @@ -7288,10 +7038,9 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" dependencies = [ "parity-scale-codec", - "proc-macro-crate 1.0.0", "proc-macro2", "quote", "syn", @@ -7299,13 +7048,15 @@ dependencies = [ [[package]] name = "sp-wasm-interface" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +version = "4.1.0-dev" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" dependencies = [ "impl-trait-for-tuples", + "log", "parity-scale-codec", "sp-std", "wasmi", + "wasmtime", ] [[package]] @@ -7314,6 +7065,20 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" +[[package]] +name = "ss58-registry" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c83f0afe7e571565ef9aae7b0e4fb30fcaec4ebb9aea2f00489b772782aa03a4" +dependencies = [ + "Inflector", + "proc-macro2", + "quote", + "serde", + "serde_json", + "unicode-xid", +] + [[package]] name = "stable_deref_trait" version = "1.2.0" @@ -7339,25 +7104,6 @@ dependencies = [ "rand 0.8.4", ] -[[package]] -name = "stream-cipher" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c80e15f898d8d8f25db24c253ea615cc14acf418ff307822995814e7d42cfa89" -dependencies = [ - "block-cipher", - "generic-array 0.14.4", -] - -[[package]] -name = "string" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d24114bfcceb867ca7f71a0d3fe45d45619ec47a6fbfa98cb14e14250bfa5d6d" -dependencies = [ - "bytes 0.4.12", -] - [[package]] name = "strsim" version = "0.8.0" @@ -7366,9 +7112,9 @@ checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" [[package]] name = "structopt" -version = "0.3.22" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69b041cdcb67226aca307e6e7be44c8806423d83e018bd662360a93dabce4d71" +checksum = "40b9788f4202aa75c240ecc9c15c65185e6a39ccdeb0fd5d008b98825464c87c" dependencies = [ "clap", "lazy_static", @@ -7377,9 +7123,9 @@ dependencies = [ [[package]] name = "structopt-derive" -version = "0.4.15" +version = "0.4.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7813934aecf5f51a54775e00068c237de98489463968231a51746bbbc03f9c10" +checksum = "dcb5ae327f9cc13b68763b5749770cb9e048a99bd9dfdfa58d0cf05d5f64afe0" dependencies = [ "heck", "proc-macro-error", @@ -7390,18 +7136,18 @@ dependencies = [ [[package]] name = "strum" -version = "0.20.0" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7318c509b5ba57f18533982607f24070a55d353e90d4cae30c467cdb2ad5ac5c" +checksum = "f7ac893c7d471c8a21f31cfe213ec4f6d9afeed25537c772e08ef3f005f8729e" dependencies = [ "strum_macros", ] [[package]] name = "strum_macros" -version = "0.20.1" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee8bc6b87a5112aeeab1f4a9f7ab634fe6cbefc4850006df31267f4cfb9e3149" +checksum = "339f799d8b549e3744c7ac7feb216383e4005d94bdb22561b3ab8f3b808ae9fb" dependencies = [ "heck", "proc-macro2", @@ -7411,21 +7157,21 @@ dependencies = [ [[package]] name = "substrate-bip39" -version = "0.4.2" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bed6646a0159b9935b5d045611560eeef842b78d7adc3ba36f5ca325a13a0236" +checksum = "49eee6965196b32f882dd2ee85a92b1dbead41b04e53907f269de3b0dc04733c" dependencies = [ - "hmac 0.7.1", - "pbkdf2 0.3.0", + "hmac 0.11.0", + "pbkdf2 0.8.0", "schnorrkel", - "sha2 0.8.2", + "sha2 0.9.9", "zeroize", ] [[package]] name = "substrate-build-script-utils" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" dependencies = [ "platforms", ] @@ -7433,7 +7179,7 @@ dependencies = [ [[package]] name = "substrate-frame-rpc-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" dependencies = [ "frame-system-rpc-runtime-api", "futures 0.3.16", @@ -7445,7 +7191,6 @@ dependencies = [ "sc-client-api", "sc-rpc-api", "sc-transaction-pool-api", - "serde", "sp-api", "sp-block-builder", "sp-blockchain", @@ -7455,25 +7200,24 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" -version = "0.9.0" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +version = "0.10.0-dev" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" dependencies = [ "async-std", "derive_more", "futures-util", - "hyper 0.13.10", + "hyper", "log", "prometheus", - "tokio 0.2.25", + "tokio", ] [[package]] name = "substrate-wasm-builder" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?tag=monthly-2021-08#4d28ebeb8b027ca0227fe7779c5beb70a7b56467" +source = "git+https://github.com/librelois/substrate.git?branch=duniter-monthly-2022-01#dfa512d0e1475ef671bab9b4d76c17f20a1a297a" dependencies = [ "ansi_term 0.12.1", - "atty", "build-helper", "cargo_metadata", "sp-maybe-compressed-blob", @@ -7483,12 +7227,6 @@ dependencies = [ "wasm-gc-api", ] -[[package]] -name = "subtle" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d67a5a62ba6e01cb2192ff309324cb4875d0c451d55fe2319433abe7a05a8ee" - [[package]] name = "subtle" version = "2.4.1" @@ -7497,9 +7235,9 @@ checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" [[package]] name = "syn" -version = "1.0.74" +version = "1.0.85" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1873d832550d4588c3dbc20f01361ab00bfe741048f71e3fecf145a7cc18b29c" +checksum = "a684ac3dcd8913827e18cd09a68384ee66c1de24157e3c556c9ab16d85695fb7" dependencies = [ "proc-macro2", "quote", @@ -7518,12 +7256,6 @@ dependencies = [ "unicode-xid", ] -[[package]] -name = "take_mut" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f764005d11ee5f36500a149ace24e00e3da98b0158b3e2d53a7495660d3f4d60" - [[package]] name = "tap" version = "1.0.1" @@ -7545,7 +7277,7 @@ dependencies = [ "cfg-if 1.0.0", "libc", "rand 0.8.4", - "redox_syscall 0.2.10", + "redox_syscall", "remove_dir_all", "winapi 0.3.9", ] @@ -7570,18 +7302,18 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.26" +version = "1.0.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93119e4feac1cbe6c798c34d3a53ea0026b0b1de6a120deef895137c0529bfe2" +checksum = "854babe52e4df1653706b98fcfc05843010039b406875930a70e4d9644e5c417" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.26" +version = "1.0.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "060d69a0afe7796bf42e9e2ff91f5ee691fb15c53d38b4b62a9a53eb23164745" +checksum = "aa32fd3f627f367fe16f893e2597ae3c05020f8bba2666a4e6ea73d377e5714b" dependencies = [ "proc-macro2", "quote", @@ -7619,9 +7351,9 @@ dependencies = [ [[package]] name = "tiny-bip39" -version = "0.8.0" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9e44c4759bae7f1032e286a7ef990bd9ed23fe831b7eeba0beb97484c2e59b8" +checksum = "ffc59cb9dfc85bb312c3a78fd6aa8a8582e310b0fa885d5bb877f6dcc601839d" dependencies = [ "anyhow", "hmac 0.8.1", @@ -7629,9 +7361,10 @@ dependencies = [ "pbkdf2 0.4.0", "rand 0.7.3", "rustc-hash", - "sha2 0.9.5", + "sha2 0.9.9", "thiserror", "unicode-normalization", + "wasm-bindgen", "zeroize", ] @@ -7661,265 +7394,55 @@ checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" [[package]] name = "tokio" -version = "0.1.22" +version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a09c0b5bb588872ab2f09afa13ee6e9dac11e10a0ec9e8e3ba39a5a5d530af6" +checksum = "fbbf1c778ec206785635ce8ad57fe52b3009ae9e0c9f574a728f3049d3e55838" dependencies = [ - "bytes 0.4.12", - "futures 0.1.31", - "mio", - "num_cpus", - "tokio-codec", - "tokio-current-thread", - "tokio-executor", - "tokio-fs", - "tokio-io", - "tokio-reactor", - "tokio-sync", - "tokio-tcp", - "tokio-threadpool", - "tokio-timer", - "tokio-udp", - "tokio-uds", -] - -[[package]] -name = "tokio" -version = "0.2.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6703a273949a90131b290be1fe7b039d0fc884aa1935860dfcbe056f28cd8092" -dependencies = [ - "bytes 0.5.6", - "fnv", - "futures-core", - "iovec", - "lazy_static", + "bytes 1.1.0", "libc", "memchr", - "mio", - "mio-uds", + "mio 0.7.14", "num_cpus", - "pin-project-lite 0.1.12", + "once_cell", + "pin-project-lite 0.2.7", "signal-hook-registry", - "slab", "winapi 0.3.9", ] -[[package]] -name = "tokio-buf" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fb220f46c53859a4b7ec083e41dec9778ff0b1851c0942b211edb89e0ccdc46" -dependencies = [ - "bytes 0.4.12", - "either", - "futures 0.1.31", -] - -[[package]] -name = "tokio-codec" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25b2998660ba0e70d18684de5d06b70b70a3a747469af9dea7618cc59e75976b" -dependencies = [ - "bytes 0.4.12", - "futures 0.1.31", - "tokio-io", -] - -[[package]] -name = "tokio-current-thread" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1de0e32a83f131e002238d7ccde18211c0a5397f60cbfffcb112868c2e0e20e" -dependencies = [ - "futures 0.1.31", - "tokio-executor", -] - -[[package]] -name = "tokio-executor" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb2d1b8f4548dbf5e1f7818512e9c406860678f29c300cdf0ebac72d1a3a1671" -dependencies = [ - "crossbeam-utils 0.7.2", - "futures 0.1.31", -] - -[[package]] -name = "tokio-fs" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "297a1206e0ca6302a0eed35b700d292b275256f596e2f3fea7729d5e629b6ff4" -dependencies = [ - "futures 0.1.31", - "tokio-io", - "tokio-threadpool", -] - -[[package]] -name = "tokio-io" -version = "0.1.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57fc868aae093479e3131e3d165c93b1c7474109d13c90ec0dda2a1bbfff0674" -dependencies = [ - "bytes 0.4.12", - "futures 0.1.31", - "log", -] - -[[package]] -name = "tokio-named-pipes" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d282d483052288b2308ba5ee795f5673b159c9bdf63c385a05609da782a5eae" -dependencies = [ - "bytes 0.4.12", - "futures 0.1.31", - "mio", - "mio-named-pipes", - "tokio 0.1.22", -] - -[[package]] -name = "tokio-reactor" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09bc590ec4ba8ba87652da2068d150dcada2cfa2e07faae270a5e0409aa51351" -dependencies = [ - "crossbeam-utils 0.7.2", - "futures 0.1.31", - "lazy_static", - "log", - "mio", - "num_cpus", - "parking_lot 0.9.0", - "slab", - "tokio-executor", - "tokio-io", - "tokio-sync", -] - [[package]] name = "tokio-rustls" -version = "0.14.1" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e12831b255bcfa39dc0436b01e19fea231a37db570686c06ee72c423479f889a" +checksum = "bc6844de72e57df1980054b38be3a9f4702aba4858be64dd700181a8a6d0e1b6" dependencies = [ - "futures-core", - "rustls 0.18.1", - "tokio 0.2.25", + "rustls", + "tokio", "webpki", ] [[package]] -name = "tokio-service" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24da22d077e0f15f55162bdbdc661228c1581892f52074fb242678d015b45162" -dependencies = [ - "futures 0.1.31", -] - -[[package]] -name = "tokio-sync" +name = "tokio-stream" version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edfe50152bc8164fcc456dab7891fa9bf8beaf01c5ee7e1dd43a397c3cf87dee" -dependencies = [ - "fnv", - "futures 0.1.31", -] - -[[package]] -name = "tokio-tcp" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98df18ed66e3b72e742f185882a9e201892407957e45fbff8da17ae7a7c51f72" -dependencies = [ - "bytes 0.4.12", - "futures 0.1.31", - "iovec", - "mio", - "tokio-io", - "tokio-reactor", -] - -[[package]] -name = "tokio-threadpool" -version = "0.1.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df720b6581784c118f0eb4310796b12b1d242a7eb95f716a8367855325c25f89" -dependencies = [ - "crossbeam-deque 0.7.4", - "crossbeam-queue", - "crossbeam-utils 0.7.2", - "futures 0.1.31", - "lazy_static", - "log", - "num_cpus", - "slab", - "tokio-executor", -] - -[[package]] -name = "tokio-timer" -version = "0.2.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93044f2d313c95ff1cb7809ce9a7a05735b012288a888b62d4434fd58c94f296" +checksum = "50145484efff8818b5ccd256697f36863f587da82cf8b409c53adf1e840798e3" dependencies = [ - "crossbeam-utils 0.7.2", - "futures 0.1.31", - "slab", - "tokio-executor", -] - -[[package]] -name = "tokio-udp" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2a0b10e610b39c38b031a2fcab08e4b82f16ece36504988dcbd81dbba650d82" -dependencies = [ - "bytes 0.4.12", - "futures 0.1.31", - "log", - "mio", - "tokio-codec", - "tokio-io", - "tokio-reactor", -] - -[[package]] -name = "tokio-uds" -version = "0.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab57a4ac4111c8c9dbcf70779f6fc8bc35ae4b2454809febac840ad19bd7e4e0" -dependencies = [ - "bytes 0.4.12", - "futures 0.1.31", - "iovec", - "libc", - "log", - "mio", - "mio-uds", - "tokio-codec", - "tokio-io", - "tokio-reactor", + "futures-core", + "pin-project-lite 0.2.7", + "tokio", ] [[package]] name = "tokio-util" -version = "0.3.1" +version = "0.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be8242891f2b6cbef26a2d7e8605133c2c554cd35b3e4948ea892d6d68436499" +checksum = "9e99e1983e5d376cd8eb4b66604d2e99e79f5bd988c3055891dcd8c9e2604cc0" dependencies = [ - "bytes 0.5.6", + "bytes 1.1.0", "futures-core", "futures-sink", "log", - "pin-project-lite 0.1.12", - "tokio 0.2.25", + "pin-project-lite 0.2.7", + "tokio", ] [[package]] @@ -7939,12 +7462,11 @@ checksum = "360dfd1d6d30e05fda32ace2c8c70e9c0a9da713275777f5a4dbb8a1893930c6" [[package]] name = "tracing" -version = "0.1.26" +version = "0.1.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09adeb8c97449311ccd28a427f96fb563e7fd31aabf994189879d9da2394b89d" +checksum = "375a639232caf30edfc78e8d89b2d4c375515393e7af7e16f01cd96917fb2105" dependencies = [ "cfg-if 1.0.0", - "log", "pin-project-lite 0.2.7", "tracing-attributes", "tracing-core", @@ -7952,9 +7474,9 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.15" +version = "0.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c42e6fa53307c8a17e4ccd4dc81cf5ec38db9209f59b222210375b54ee40d1e2" +checksum = "f4f480b8f81512e825f337ad51e94c1eb5d3bbdf2b363dcd01e2b19a9ffe3f8e" dependencies = [ "proc-macro2", "quote", @@ -7963,9 +7485,9 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.19" +version = "0.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ca517f43f0fb96e0c3072ed5c275fe5eece87e8cb52f4a77b69226d3b1c9df8" +checksum = "1f4ed65637b8390770814083d20756f87bfa2c21bf2f110babdc5438351746e4" dependencies = [ "lazy_static", ] @@ -8003,19 +7525,20 @@ dependencies = [ [[package]] name = "tracing-subscriber" -version = "0.2.20" +version = "0.2.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9cbe87a2fa7e35900ce5de20220a582a9483a7063811defce79d7cbd59d4cfe" +checksum = "0e0d2eaa99c3c2e41547cfa109e910a68ea03823cccad4a0525dcbc9b01e8c71" dependencies = [ "ansi_term 0.12.1", "chrono", "lazy_static", "matchers", + "parking_lot", "regex", "serde", "serde_json", "sharded-slab", - "smallvec 1.6.1", + "smallvec", "thread_local", "tracing", "tracing-core", @@ -8025,22 +7548,22 @@ dependencies = [ [[package]] name = "trie-db" -version = "0.22.6" +version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9eac131e334e81b6b3be07399482042838adcd7957aa0010231d0813e39e02fa" +checksum = "e3ddae50680c12ef75bfbf58416ca6622fa43d879553f6cb2ed1a817346e1ffe" dependencies = [ "hash-db", "hashbrown", "log", "rustc-hex", - "smallvec 1.6.1", + "smallvec", ] [[package]] name = "trie-root" -version = "0.16.0" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "652931506d2c1244d7217a70b99f56718a7b4161b37f04e7cd868072a99f68cd" +checksum = "9a36c5ca3911ed3c9a5416ee6c679042064b93fc637ded67e25f92e68d783891" dependencies = [ "hash-db", ] @@ -8063,7 +7586,7 @@ dependencies = [ "lazy_static", "log", "rand 0.8.4", - "smallvec 1.6.1", + "smallvec", "thiserror", "tinyvec", "url 2.2.2", @@ -8081,9 +7604,9 @@ dependencies = [ "lazy_static", "log", "lru-cache", - "parking_lot 0.11.1", + "parking_lot", "resolv-conf", - "smallvec 1.6.1", + "smallvec", "thiserror", "trust-dns-proto", ] @@ -8094,6 +7617,12 @@ version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" +[[package]] +name = "tt-call" +version = "1.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e66dcbec4290c69dd03c57e76c2469ea5c7ce109c6dd4351c13055cf71ea055" + [[package]] name = "twox-hash" version = "1.6.1" @@ -8178,7 +7707,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9f214e8f697e925001e66ec2c6e37a4ef93f0f78c2eed7814394e10c62025b05" dependencies = [ "generic-array 0.14.4", - "subtle 2.4.1", + "subtle", ] [[package]] @@ -8194,7 +7723,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "35581ff83d4101e58b582e607120c7f5ffb17e632a980b1f38334d76b36908b2" dependencies = [ "asynchronous-codec 0.5.0", - "bytes 1.0.1", + "bytes 1.1.0", "futures-io", "futures-util", ] @@ -8206,7 +7735,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f8d425fafb8cd76bc3f22aace4af471d3156301d7508f2107e98fbeae10bc7f" dependencies = [ "asynchronous-codec 0.6.0", - "bytes 1.0.1", + "bytes 1.1.0", "futures-io", "futures-util", ] @@ -8291,17 +7820,6 @@ dependencies = [ "winapi-util", ] -[[package]] -name = "want" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6395efa4784b027708f7451087e647ec73cc74f5d9bc2e418404248d679a230" -dependencies = [ - "futures 0.1.31", - "log", - "try-lock", -] - [[package]] name = "want" version = "0.3.0" @@ -8409,7 +7927,7 @@ checksum = "be0ecb0db480561e9a7642b5d3e4187c128914e58aa84330b9493e3eb68c5e7f" dependencies = [ "futures 0.3.16", "js-sys", - "parking_lot 0.11.1", + "parking_lot", "pin-utils", "wasm-bindgen", "wasm-bindgen-futures", @@ -8418,9 +7936,9 @@ dependencies = [ [[package]] name = "wasmi" -version = "0.9.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2ee05bba3d1d994652079893941a2ef9324d2b58a63c31b40678fb7eddd7a5a" +checksum = "ca00c5147c319a8ec91ec1a0edbec31e566ce2c9cc93b3f9bb86a9efd0eb795d" dependencies = [ "downcast-rs", "libc", @@ -8442,15 +7960,15 @@ dependencies = [ [[package]] name = "wasmparser" -version = "0.78.2" +version = "0.81.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52144d4c78e5cf8b055ceab8e5fa22814ce4315d6002ad32cfd914f37c12fd65" +checksum = "98930446519f63d00a836efdc22f67766ceae8dbcc1571379f2bcabc6b2b9abc" [[package]] name = "wasmtime" -version = "0.27.0" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b310b9d20fcf59385761d1ade7a3ef06aecc380e3d3172035b919eaf7465d9f7" +checksum = "311d06b0c49346d1fbf48a17052e844036b95a7753c1afb34e8c0af3f6b5bb13" dependencies = [ "anyhow", "backtrace", @@ -8461,38 +7979,38 @@ dependencies = [ "lazy_static", "libc", "log", + "object", "paste", "psm", + "rayon", "region", "rustc-demangle", "serde", - "smallvec 1.6.1", "target-lexicon", "wasmparser", "wasmtime-cache", + "wasmtime-cranelift", "wasmtime-environ", "wasmtime-jit", - "wasmtime-profiling", "wasmtime-runtime", "winapi 0.3.9", ] [[package]] name = "wasmtime-cache" -version = "0.27.0" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d14d500d5c3dc5f5c097158feee123d64b3097f0d836a2a27dff9c761c73c843" +checksum = "36147930a4995137dc096e5b17a573b446799be2bbaea433e821ce6a80abe2c5" dependencies = [ "anyhow", - "base64 0.13.0", + "base64", "bincode", "directories-next", - "errno", "file-per-thread-logger", - "libc", "log", + "rsix", "serde", - "sha2 0.9.5", + "sha2 0.9.9", "toml", "winapi 0.3.9", "zstd", @@ -8500,29 +8018,20 @@ dependencies = [ [[package]] name = "wasmtime-cranelift" -version = "0.27.0" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c525b39f062eada7db3c1298287b96dcb6e472b9f6b22501300b28d9fa7582f6" +checksum = "ab3083a47e1ede38aac06a1d9831640d673f9aeda0b82a64e4ce002f3432e2e7" dependencies = [ + "anyhow", "cranelift-codegen", "cranelift-entity", "cranelift-frontend", + "cranelift-native", "cranelift-wasm", - "target-lexicon", - "wasmparser", - "wasmtime-environ", -] - -[[package]] -name = "wasmtime-debug" -version = "0.27.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5d2a763e7a6fc734218e0e463196762a4f409c483063d81e0e85f96343b2e0a" -dependencies = [ - "anyhow", - "gimli 0.24.0", + "gimli 0.25.0", + "log", "more-asserts", - "object 0.24.0", + "object", "target-lexicon", "thiserror", "wasmparser", @@ -8531,91 +8040,55 @@ dependencies = [ [[package]] name = "wasmtime-environ" -version = "0.27.0" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f64d0c2d881c31b0d65c1f2695e022d71eb60b9fbdd336aacca28208b58eac90" +checksum = "1c2d194b655321053bc4111a1aa4ead552655c8a17d17264bc97766e70073510" dependencies = [ + "anyhow", "cfg-if 1.0.0", - "cranelift-codegen", "cranelift-entity", - "cranelift-wasm", - "gimli 0.24.0", + "gimli 0.25.0", "indexmap", "log", "more-asserts", + "object", "serde", + "target-lexicon", "thiserror", "wasmparser", + "wasmtime-types", ] [[package]] name = "wasmtime-jit" -version = "0.27.0" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d4539ea734422b7c868107e2187d7746d8affbcaa71916d72639f53757ad707" +checksum = "864ac8dfe4ce310ac59f16fdbd560c257389cb009ee5d030ac6e30523b023d11" dependencies = [ - "addr2line 0.15.2", + "addr2line 0.16.0", "anyhow", + "bincode", "cfg-if 1.0.0", - "cranelift-codegen", - "cranelift-entity", - "cranelift-frontend", - "cranelift-native", - "cranelift-wasm", - "gimli 0.24.0", + "gimli 0.25.0", "log", "more-asserts", - "object 0.24.0", - "rayon", + "object", "region", + "rsix", "serde", "target-lexicon", "thiserror", "wasmparser", - "wasmtime-cranelift", - "wasmtime-debug", "wasmtime-environ", - "wasmtime-obj", - "wasmtime-profiling", "wasmtime-runtime", "winapi 0.3.9", ] -[[package]] -name = "wasmtime-obj" -version = "0.27.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e1a8ff85246d091828e2225af521a6208ed28c997bb5c39eb697366dc2e2f2b" -dependencies = [ - "anyhow", - "more-asserts", - "object 0.24.0", - "target-lexicon", - "wasmtime-debug", - "wasmtime-environ", -] - -[[package]] -name = "wasmtime-profiling" -version = "0.27.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e24364d522dcd67c897c8fffc42e5bdfc57207bbb6d7eeade0da9d4a7d70105b" -dependencies = [ - "anyhow", - "cfg-if 1.0.0", - "lazy_static", - "libc", - "serde", - "target-lexicon", - "wasmtime-environ", - "wasmtime-runtime", -] - [[package]] name = "wasmtime-runtime" -version = "0.27.0" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c51e57976e8a19a18a18e002c6eb12e5769554204238e47ff155fda1809ef0f7" +checksum = "ab97da813a26b98c9abfd3b0c2d99e42f6b78b749c0646344e2e262d212d8c8b" dependencies = [ "anyhow", "backtrace", @@ -8626,15 +8099,28 @@ dependencies = [ "libc", "log", "mach", - "memoffset 0.6.4", + "memoffset", "more-asserts", "rand 0.8.4", "region", + "rsix", "thiserror", "wasmtime-environ", "winapi 0.3.9", ] +[[package]] +name = "wasmtime-types" +version = "0.31.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff94409cc3557bfbbcce6b14520ccd6bd3727e965c0fe68d63ef2c185bf379c6" +dependencies = [ + "cranelift-entity", + "serde", + "thiserror", + "wasmparser", +] + [[package]] name = "web-sys" version = "0.3.53" @@ -8778,16 +8264,16 @@ dependencies = [ "futures 0.3.16", "log", "nohash-hasher", - "parking_lot 0.11.1", + "parking_lot", "rand 0.8.4", "static_assertions", ] [[package]] name = "zeroize" -version = "1.4.1" +version = "1.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "377db0846015f7ae377174787dd452e1c5f5a9050bc6f954911d01f116daa0cd" +checksum = "d68d9dcec5f9b43a30d38c49f91dfedfaac384cb8f085faca366c26207dd1619" dependencies = [ "zeroize_derive", ] @@ -8806,18 +8292,18 @@ dependencies = [ [[package]] name = "zstd" -version = "0.6.1+zstd.1.4.9" +version = "0.9.2+zstd.1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5de55e77f798f205d8561b8fe2ef57abfb6e0ff2abe7fd3c089e119cdb5631a3" +checksum = "2390ea1bf6c038c39674f22d95f0564725fc06034a47129179810b2fc58caa54" dependencies = [ "zstd-safe", ] [[package]] name = "zstd-safe" -version = "3.0.1+zstd.1.4.9" +version = "4.1.3+zstd.1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1387cabcd938127b30ce78c4bf00b30387dddf704e3f0881dbc4ff62b5566f8c" +checksum = "e99d81b99fb3c2c2c794e3fe56c305c63d5173a16a46b5850b07c935ffc7db79" dependencies = [ "libc", "zstd-sys", @@ -8825,9 +8311,9 @@ dependencies = [ [[package]] name = "zstd-sys" -version = "1.4.20+zstd.1.4.9" +version = "1.6.2+zstd.1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebd5b733d7cf2d9447e2c3e76a5589b4f5e5ae065c22a2bc0b023cbc331b6c8e" +checksum = "2daf2f248d9ea44454bfcb2516534e8b8ad2fc91bf818a1885495fc42bc8ac9f" dependencies = [ "cc", "libc", diff --git a/Cargo.toml b/Cargo.toml index 857702b7a..133027664 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,4 +1,6 @@ [workspace] +resolver = "2" + members = [ 'node', 'pallets/certification', @@ -9,7 +11,64 @@ members = [ 'runtime/gdev', 'runtime/gtest' ] -[profile.dev] -opt-level = 3 + +# The list of dependencies below (which can be both direct and indirect dependencies) are crates +# that are suspected to be CPU-intensive, and that are unlikely to require debugging (as some of +# their debug info might be missing) or to require to be frequently recompiled. We compile these +# dependencies with `opt-level=3` even in "dev" mode in order to make "dev" mode more usable. +# The majority of these crates are cryptographic libraries. +# +# This list is only relevant when running `cargo build` from within +# the Duniter-v2s workspace. +# +# If you see an error mentioning "profile package spec ... did not match any packages", it +# probably concerns this list. +# +# This list is ordered alphabetically. +[profile.dev.package] +blake2 = { opt-level = 3 } +blake2-rfc = { opt-level = 3 } +blake2b_simd = { opt-level = 3 } +chacha20poly1305 = { opt-level = 3 } +cranelift-codegen = { opt-level = 3 } +cranelift-wasm = { opt-level = 3 } +crc32fast = { opt-level = 3 } +crossbeam-deque = { opt-level = 3 } +crypto-mac = { opt-level = 3 } +curve25519-dalek = { opt-level = 3 } +ed25519-dalek = { opt-level = 3 } +flate2 = { opt-level = 3 } +futures-channel = { opt-level = 3 } +hashbrown = { opt-level = 3 } +hash-db = { opt-level = 3 } +hmac = { opt-level = 3 } +httparse = { opt-level = 3 } +integer-sqrt = { opt-level = 3 } +keccak = { opt-level = 3 } +libm = { opt-level = 3 } +librocksdb-sys = { opt-level = 3 } +libsecp256k1 = { opt-level = 3 } +libz-sys = { opt-level = 3 } +mio = { opt-level = 3 } +nalgebra = { opt-level = 3 } +num-bigint = { opt-level = 3 } +parking_lot = { opt-level = 3 } +parking_lot_core = { opt-level = 3 } +percent-encoding = { opt-level = 3 } +primitive-types = { opt-level = 3 } +ring = { opt-level = 3 } +rustls = { opt-level = 3 } +sha2 = { opt-level = 3 } +sha3 = { opt-level = 3 } +smallvec = { opt-level = 3 } +snow = { opt-level = 3 } +twox-hash = { opt-level = 3 } +uint = { opt-level = 3 } +wasmi = { opt-level = 3 } +x25519-dalek = { opt-level = 3 } +yamux = { opt-level = 3 } +zeroize = { opt-level = 3 } + [profile.release] -panic = 'unwind' +# Substrate runtime requires unwinding. +panic = "unwind" diff --git a/node/Cargo.toml b/node/Cargo.toml index e02005332..6da0a543a 100644 --- a/node/Cargo.toml +++ b/node/Cargo.toml @@ -2,8 +2,8 @@ runtime-benchmarks = ['gdev-runtime/runtime-benchmarks'] [build-dependencies.substrate-build-script-utils] -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [package] authors = ['Axiom-Team Developers <https://axiom-team.fr>'] @@ -22,7 +22,7 @@ targets = ['x86_64-unknown-linux-gnu'] [dependencies] async-io = "1.3" futures = { version = "0.3.1", features = ["compat"] } -jsonrpc-core = '15.1.0' +jsonrpc-core = '18.0.0' log = "0.4" maplit = '1.0.2' common-runtime = { path = '../runtime/common' } @@ -32,159 +32,159 @@ gtest-runtime = { path = '../runtime/gtest' } structopt = '0.3.8' [dependencies.frame-benchmarking] -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.frame-benchmarking-cli] -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.pallet-grandpa] -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.pallet-transaction-payment-rpc] -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.pallet-transaction-payment-rpc-runtime-api] default-features = false -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.sc-basic-authorship] -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.sc-chain-spec] -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.sc-cli] features = ['wasmtime'] -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.sc-client-api] -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.sc-consensus] -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.sc-consensus-aura] -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.sc-consensus-manual-seal] -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.sc-executor] features = ['wasmtime'] -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.sc-finality-grandpa] -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.sc-keystore] -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.sc-rpc] -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.sc-rpc-api] -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.sc-service] features = ['wasmtime'] -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.sc-telemetry] -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.sc-transaction-pool] -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.sc-transaction-pool-api] -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.serde_json] version = '1.0.64' [dependencies.sp-api] -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.sp-block-builder] -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.sp-blockchain] -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.sp-consensus] -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.sp-consensus-aura] -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.sp-core] -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.sp-finality-grandpa] -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.sp-offchain] -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.sp-inherents] -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.sp-runtime] -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.sp-session] -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.sp-storage] -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.sp-timestamp] -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.sp-transaction-pool] -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.sp-trie] -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.substrate-frame-rpc-system] -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [[bin]] name = 'lc-core' diff --git a/node/src/chain_spec/gdev.rs b/node/src/chain_spec/gdev.rs index 254baa853..9a6a184b9 100644 --- a/node/src/chain_spec/gdev.rs +++ b/node/src/chain_spec/gdev.rs @@ -98,7 +98,6 @@ fn devnet_genesis( system: SystemConfig { // Add Wasm runtime to storage. code: wasm_binary.to_vec(), - changes_trie_config: Default::default(), }, balances: BalancesConfig { balances: Vec::with_capacity(0), @@ -111,7 +110,7 @@ fn devnet_genesis( }, sudo: SudoConfig { // Assign network admin rights. - key: root_key, + key: Some(root_key), }, identity: IdentityConfig { identities: initial_identities diff --git a/node/src/chain_spec/gtest.rs b/node/src/chain_spec/gtest.rs index 100e251a5..7326f1c78 100644 --- a/node/src/chain_spec/gtest.rs +++ b/node/src/chain_spec/gtest.rs @@ -148,7 +148,6 @@ fn devnet_genesis( system: SystemConfig { // Add Wasm runtime to storage. code: wasm_binary.to_vec(), - changes_trie_config: Default::default(), }, balances: BalancesConfig { // Configure endowed accounts with initial balance of INITIAL_BALANCE. @@ -165,7 +164,7 @@ fn devnet_genesis( }, sudo: SudoConfig { // Assign network admin rights. - key: root_key, + key: Some(root_key), }, identity: IdentityConfig { identities: initial_identities @@ -211,7 +210,6 @@ fn testnet_genesis( system: SystemConfig { // Add Wasm runtime to storage. code: wasm_binary.to_vec(), - changes_trie_config: Default::default(), }, balances: BalancesConfig { // Configure endowed accounts with initial balance of INITIAL_BALANCE. @@ -228,7 +226,7 @@ fn testnet_genesis( }, sudo: SudoConfig { // Assign network admin rights. - key: root_key, + key: Some(root_key), }, identity: IdentityConfig { identities: initial_identities diff --git a/node/src/command.rs b/node/src/command.rs index 3423ddd6b..f506250c4 100644 --- a/node/src/command.rs +++ b/node/src/command.rs @@ -16,10 +16,10 @@ // limitations under the License. use crate::cli::{Cli, Subcommand}; -use crate::service::{GDevExecutor, GTestExecutor, IdentifyVariant}; +use crate::service::{G1Executor, GDevExecutor, GTestExecutor, IdentifyVariant}; use crate::{chain_spec, service}; use gdev_runtime::Block; -use sc_cli::{ChainSpec, Role, RuntimeVersion, SubstrateCli}; +use sc_cli::{ChainSpec, RuntimeVersion, SubstrateCli}; impl SubstrateCli for Cli { fn impl_name() -> String { @@ -168,7 +168,7 @@ pub fn run() -> sc_cli::Result<()> { let chain_spec = &runner.config().chain_spec; if chain_spec.is_main() { - todo!() + runner.sync_run(|config| cmd.run::<Block, G1Executor>(config)) } else if chain_spec.is_test() { runner.sync_run(|config| cmd.run::<Block, GTestExecutor>(config)) } else if chain_spec.is_dev() { @@ -186,17 +186,11 @@ pub fn run() -> sc_cli::Result<()> { let runner = cli.create_runner(&cli.run)?; runner.run_node_until_exit(|config| async move { if config.chain_spec.is_main() { - todo!() + service::new_full::<gtest_runtime::RuntimeApi, G1Executor>(config, None) + .map_err(sc_cli::Error::Service) } else if config.chain_spec.is_test() { - match config.role { - Role::Light => { - service::new_light::<gtest_runtime::RuntimeApi, GTestExecutor>(config) - } - _ => service::new_full::<gtest_runtime::RuntimeApi, GTestExecutor>( - config, None, - ), - } - .map_err(sc_cli::Error::Service) + service::new_full::<gtest_runtime::RuntimeApi, GTestExecutor>(config, None) + .map_err(sc_cli::Error::Service) } else if config.chain_spec.is_dev() { service::new_full::<gdev_runtime::RuntimeApi, GDevExecutor>( config, diff --git a/node/src/rpc.rs b/node/src/rpc.rs index d47586112..4a64fb4b8 100644 --- a/node/src/rpc.rs +++ b/node/src/rpc.rs @@ -47,7 +47,9 @@ pub struct FullDeps<C, P> { } /// Instantiate all full RPC extensions. -pub fn create_full<C, P>(deps: FullDeps<C, P>) -> jsonrpc_core::IoHandler<sc_rpc::Metadata> +pub fn create_full<C, P>( + deps: FullDeps<C, P>, +) -> Result<jsonrpc_core::IoHandler<sc_rpc_api::Metadata>, Box<dyn std::error::Error + Send + Sync>> where C: ProvideRuntimeApi<Block>, C: HeaderBackend<Block> + HeaderMetadata<Block, Error = BlockChainError> + 'static, @@ -91,5 +93,5 @@ where // to call into the runtime. // `io.extend_with(YourRpcTrait::to_delegate(YourRpcStruct::new(ReferenceToClient, ...)));` - io + Ok(io) } diff --git a/node/src/service.rs b/node/src/service.rs index 1a2cca33d..6973b8cad 100644 --- a/node/src/service.rs +++ b/node/src/service.rs @@ -18,16 +18,14 @@ mod client; -pub use sc_executor::NativeExecutor; - use self::client::{Client, RuntimeApiCollection}; use async_io::Timer; use common_runtime::Block; use futures::{Stream, StreamExt}; -use sc_client_api::{ExecutorProvider, RemoteBackend}; +use sc_client_api::ExecutorProvider; use sc_consensus_aura::{ImportQueueParams, SlotProportion, StartAuraParams}; use sc_consensus_manual_seal::{run_manual_seal, EngineCommand, ManualSealParams}; -use sc_executor::native_executor_instance; +pub use sc_executor::NativeElseWasmExecutor; use sc_finality_grandpa::SharedVoterState; use sc_keystore::LocalKeystore; use sc_service::{error::Error as ServiceError, Configuration, PartialComponents, TaskManager}; @@ -38,27 +36,64 @@ use sp_core::H256; use sp_runtime::traits::BlakeTwo256; use std::{sync::Arc, time::Duration}; -type FullClient<RuntimeApi, Executor> = sc_service::TFullClient<Block, RuntimeApi, Executor>; +type FullClient<RuntimeApi, Executor> = + sc_service::TFullClient<Block, RuntimeApi, NativeElseWasmExecutor<Executor>>; type FullBackend = sc_service::TFullBackend<Block>; type FullSelectChain = sc_consensus::LongestChain<FullBackend, Block>; -type LightClient<RuntimeApi, Executor> = - sc_service::TLightClientWithBackend<Block, RuntimeApi, Executor, LightBackend>; -type LightBackend = sc_service::TLightBackendWithHash<Block, sp_runtime::traits::BlakeTwo256>; +pub struct GDevExecutor; +impl sc_executor::NativeExecutionDispatch for GDevExecutor { + /// Only enable the benchmarking host functions when we actually want to benchmark. + #[cfg(feature = "runtime-benchmarks")] + type ExtendHostFunctions = frame_benchmarking::benchmarking::HostFunctions; + /// Otherwise we only use the default Substrate host functions. + #[cfg(not(feature = "runtime-benchmarks"))] + type ExtendHostFunctions = (); + + fn dispatch(method: &str, data: &[u8]) -> Option<Vec<u8>> { + gdev_runtime::api::dispatch(method, data) + } + + fn native_version() -> sc_executor::NativeVersion { + gdev_runtime::native_version() + } +} + +pub struct GTestExecutor; +impl sc_executor::NativeExecutionDispatch for GTestExecutor { + /// Only enable the benchmarking host functions when we actually want to benchmark. + #[cfg(feature = "runtime-benchmarks")] + type ExtendHostFunctions = frame_benchmarking::benchmarking::HostFunctions; + /// Otherwise we only use the default Substrate host functions. + #[cfg(not(feature = "runtime-benchmarks"))] + type ExtendHostFunctions = (); + + fn dispatch(method: &str, data: &[u8]) -> Option<Vec<u8>> { + gtest_runtime::api::dispatch(method, data) + } + + fn native_version() -> sc_executor::NativeVersion { + gtest_runtime::native_version() + } +} -native_executor_instance!( - pub GDevExecutor, - gdev_runtime::api::dispatch, - gdev_runtime::native_version, - frame_benchmarking::benchmarking::HostFunctions, -); +pub struct G1Executor; +impl sc_executor::NativeExecutionDispatch for G1Executor { + /// Only enable the benchmarking host functions when we actually want to benchmark. + #[cfg(feature = "runtime-benchmarks")] + type ExtendHostFunctions = frame_benchmarking::benchmarking::HostFunctions; + /// Otherwise we only use the default Substrate host functions. + #[cfg(not(feature = "runtime-benchmarks"))] + type ExtendHostFunctions = (); + + fn dispatch(method: &str, data: &[u8]) -> Option<Vec<u8>> { + g1_runtime::api::dispatch(method, data) + } -native_executor_instance!( - pub GTestExecutor, - gtest_runtime::api::dispatch, - gtest_runtime::native_version, - frame_benchmarking::benchmarking::HostFunctions, -); + fn native_version() -> sc_executor::NativeVersion { + g1_runtime::native_version() + } +} /// Can be called for a `Configuration` to check if it is a configuration for /// a particular network. @@ -101,7 +136,19 @@ pub fn new_chain_ops( ServiceError, > { if config.chain_spec.is_main() { - todo!() + let PartialComponents { + client, + backend, + import_queue, + task_manager, + .. + } = new_partial::<g1_runtime::RuntimeApi, G1Executor>(config, false)?; + Ok(( + Arc::new(Client::G1(client)), + backend, + import_queue, + task_manager, + )) } else if config.chain_spec.is_test() { let PartialComponents { client, @@ -185,15 +232,25 @@ where }) .transpose()?; + let executor = NativeElseWasmExecutor::<Executor>::new( + config.wasm_method, + config.default_heap_pages, + config.max_runtime_instances, + config.runtime_cache_size, + ); + let (client, backend, keystore_container, task_manager) = - sc_service::new_full_parts::<Block, RuntimeApi, Executor>( + sc_service::new_full_parts::<Block, RuntimeApi, _>( &config, telemetry.as_ref().map(|(_, telemetry)| telemetry.handle()), + executor, )?; let client = Arc::new(client); let telemetry = telemetry.map(|(worker, telemetry)| { - task_manager.spawn_handle().spawn("telemetry", worker.run()); + task_manager + .spawn_handle() + .spawn("telemetry", None, worker.run()); telemetry }); @@ -307,6 +364,11 @@ where .network .extra_sets .push(sc_finality_grandpa::grandpa_peers_set_config()); + let warp_sync = Arc::new(sc_finality_grandpa::warp_proof::NetworkProvider::new( + backend.clone(), + grandpa_link.shared_authority_set().clone(), + Vec::default(), + )); let (network, system_rpc_tx, network_starter) = sc_service::build_network(sc_service::BuildNetworkParams { @@ -315,8 +377,8 @@ where transaction_pool: transaction_pool.clone(), spawn_handle: task_manager.spawn_handle(), import_queue, - on_demand: None, block_announce_validator_builder: None, + warp_sync: Some(warp_sync), })?; if config.offchain_worker.enabled { @@ -382,6 +444,7 @@ where task_manager.spawn_essential_handle().spawn_blocking( "authorship_task", + Some("block-authoring"), run_manual_seal(ManualSealParams { block_import, env: proposer_factory, @@ -431,9 +494,11 @@ where // the AURA authoring task is considered essential, i.e. if it // fails we take down the service with it. - task_manager - .spawn_essential_handle() - .spawn_blocking("aura", aura); + task_manager.spawn_essential_handle().spawn_blocking( + "aura", + Some("block-authoring"), + aura, + ); } } @@ -449,7 +514,7 @@ where command_sink_opt: command_sink_opt.clone(), }; - crate::rpc::create_full(deps) + crate::rpc::create_full(deps).map_err(Into::into) }) }; @@ -460,8 +525,6 @@ where task_manager: &mut task_manager, transaction_pool, rpc_extensions_builder, - on_demand: None, - remote_blockchain: None, backend, system_rpc_tx, config, @@ -508,6 +571,7 @@ where // if it fails we take down the service with it. task_manager.spawn_essential_handle().spawn_blocking( "grandpa-voter", + None, sc_finality_grandpa::run_grandpa_voter(grandpa_config)?, ); } @@ -515,144 +579,3 @@ where network_starter.start_network(); Ok(task_manager) } - -/// Builds a new service for a light client. -pub fn new_light<RuntimeApi, Executor>( - mut config: Configuration, -) -> Result<TaskManager, ServiceError> -where - RuntimeApi: sp_api::ConstructRuntimeApi<Block, LightClient<RuntimeApi, Executor>> - + Send - + Sync - + 'static, - RuntimeApi::RuntimeApi: - RuntimeApiCollection<StateBackend = sc_client_api::StateBackendFor<LightBackend, Block>>, - Executor: sc_executor::NativeExecutionDispatch + 'static, -{ - let telemetry = config - .telemetry_endpoints - .clone() - .filter(|x| !x.is_empty()) - .map(|endpoints| -> Result<_, sc_telemetry::Error> { - let worker = TelemetryWorker::new(16)?; - let telemetry = worker.handle().new_telemetry(endpoints); - Ok((worker, telemetry)) - }) - .transpose()?; - - let (client, backend, keystore_container, mut task_manager, on_demand) = - sc_service::new_light_parts::<Block, RuntimeApi, Executor>( - &config, - telemetry.as_ref().map(|(_, telemetry)| telemetry.handle()), - )?; - - let mut telemetry = telemetry.map(|(worker, telemetry)| { - task_manager.spawn_handle().spawn("telemetry", worker.run()); - telemetry - }); - - config - .network - .extra_sets - .push(sc_finality_grandpa::grandpa_peers_set_config()); - - let select_chain = sc_consensus::LongestChain::new(backend.clone()); - - let transaction_pool = Arc::new(sc_transaction_pool::BasicPool::new_light( - config.transaction_pool.clone(), - config.prometheus_registry(), - task_manager.spawn_essential_handle(), - client.clone(), - on_demand.clone(), - )); - - let (grandpa_block_import, grandpa_link) = sc_finality_grandpa::block_import( - client.clone(), - &(client.clone() as Arc<_>), - select_chain, - telemetry.as_ref().map(|x| x.handle()), - )?; - - let slot_duration = sc_consensus_aura::slot_duration(&*client)?.slot_duration(); - - let import_queue = - sc_consensus_aura::import_queue::<AuraPair, _, _, _, _, _, _>(ImportQueueParams { - block_import: grandpa_block_import.clone(), - justification_import: Some(Box::new(grandpa_block_import)), - client: client.clone(), - create_inherent_data_providers: move |_, ()| async move { - let timestamp = sp_timestamp::InherentDataProvider::from_system_time(); - - let slot = - sp_consensus_aura::inherents::InherentDataProvider::from_timestamp_and_duration( - *timestamp, - slot_duration, - ); - - Ok((timestamp, slot)) - }, - spawner: &task_manager.spawn_essential_handle(), - can_author_with: sp_consensus::NeverCanAuthor, - registry: config.prometheus_registry(), - check_for_equivocation: Default::default(), - telemetry: telemetry.as_ref().map(|x| x.handle()), - })?; - - let (network, system_rpc_tx, network_starter) = - sc_service::build_network(sc_service::BuildNetworkParams { - config: &config, - client: client.clone(), - transaction_pool: transaction_pool.clone(), - spawn_handle: task_manager.spawn_handle(), - import_queue, - on_demand: Some(on_demand.clone()), - block_announce_validator_builder: None, - })?; - - if config.offchain_worker.enabled { - sc_service::build_offchain_workers( - &config, - task_manager.spawn_handle(), - client.clone(), - network.clone(), - ); - } - - let enable_grandpa = !config.disable_grandpa; - if enable_grandpa { - let name = config.network.node_name.clone(); - - let config = sc_finality_grandpa::Config { - gossip_duration: std::time::Duration::from_millis(333), - justification_period: 512, - name: Some(name), - observer_enabled: false, - keystore: None, - local_role: config.role.clone(), - telemetry: telemetry.as_ref().map(|x| x.handle()), - }; - - task_manager.spawn_handle().spawn_blocking( - "grandpa-observer", - sc_finality_grandpa::run_grandpa_observer(config, grandpa_link, network.clone())?, - ); - } - - sc_service::spawn_tasks(sc_service::SpawnTasksParams { - remote_blockchain: Some(backend.remote_blockchain()), - transaction_pool, - task_manager: &mut task_manager, - on_demand: Some(on_demand), - rpc_extensions_builder: Box::new(|_, _| ()), - config, - client, - keystore: keystore_container.sync_keystore(), - backend, - network, - system_rpc_tx, - telemetry: telemetry.as_mut(), - })?; - - network_starter.start_network(); - Ok(task_manager) -} diff --git a/node/src/service/client.rs b/node/src/service/client.rs index c9311401d..dcb19336f 100644 --- a/node/src/service/client.rs +++ b/node/src/service/client.rs @@ -23,23 +23,50 @@ use sp_runtime::{ traits::{BlakeTwo256, Block as BlockT}, Justifications, }; -use sp_storage::{ChildInfo, PrefixedStorageKey, StorageData, StorageKey}; +use sp_storage::{ChildInfo, StorageData, StorageKey}; use std::sync::Arc; /// A client instance. #[derive(Clone)] pub enum Client { - //G1(Arc<super::FullClient<g1_runtime::RuntimeApi, super::G1Executor>>), + G1(Arc<super::FullClient<g1_runtime::RuntimeApi, super::G1Executor>>), GTest(Arc<super::FullClient<gtest_runtime::RuntimeApi, super::GTestExecutor>>), GDev(Arc<super::FullClient<gdev_runtime::RuntimeApi, super::GDevExecutor>>), } +impl From<Arc<super::FullClient<g1_runtime::RuntimeApi, super::G1Executor>>> for Client { + fn from(client: Arc<super::FullClient<g1_runtime::RuntimeApi, super::G1Executor>>) -> Self { + Self::G1(client) + } +} + +impl From<Arc<super::FullClient<gtest_runtime::RuntimeApi, super::GTestExecutor>>> for Client { + fn from( + client: Arc<super::FullClient<gtest_runtime::RuntimeApi, super::GTestExecutor>>, + ) -> Self { + Self::GTest(client) + } +} + +impl From<Arc<super::FullClient<gdev_runtime::RuntimeApi, super::GDevExecutor>>> for Client { + fn from(client: Arc<super::FullClient<gdev_runtime::RuntimeApi, super::GDevExecutor>>) -> Self { + Self::GDev(client) + } +} + +macro_rules! match_client { + ($self:ident, $method:ident($($param:ident),*)) => { + match $self { + Self::G1(client) => client.$method($($param),*), + Self::GTest(client) => client.$method($($param),*), + Self::GDev(client) => client.$method($($param),*), + } + }; +} + impl sc_client_api::UsageProvider<Block> for Client { fn usage_info(&self) -> sc_client_api::ClientInfo<Block> { - match self { - Self::GTest(client) => client.usage_info(), - Self::GDev(client) => client.usage_info(), - } + match_client!(self, usage_info()) } } @@ -48,71 +75,47 @@ impl sc_client_api::BlockBackend<Block> for Client { &self, id: &BlockId<Block>, ) -> sp_blockchain::Result<Option<Vec<<Block as BlockT>::Extrinsic>>> { - match self { - Self::GTest(client) => client.block_body(id), - Self::GDev(client) => client.block_body(id), - } + match_client!(self, block_body(id)) } fn block_indexed_body( &self, id: &BlockId<Block>, ) -> sp_blockchain::Result<Option<Vec<Vec<u8>>>> { - match self { - Self::GTest(client) => client.block_indexed_body(id), - Self::GDev(client) => client.block_indexed_body(id), - } + match_client!(self, block_indexed_body(id)) } fn block(&self, id: &BlockId<Block>) -> sp_blockchain::Result<Option<SignedBlock<Block>>> { - match self { - Self::GTest(client) => client.block(id), - Self::GDev(client) => client.block(id), - } + match_client!(self, block(id)) } fn block_status(&self, id: &BlockId<Block>) -> sp_blockchain::Result<BlockStatus> { - match self { - Self::GTest(client) => client.block_status(id), - Self::GDev(client) => client.block_status(id), - } + match_client!(self, block_status(id)) } fn justifications(&self, id: &BlockId<Block>) -> sp_blockchain::Result<Option<Justifications>> { - match self { - Self::GTest(client) => client.justifications(id), - Self::GDev(client) => client.justifications(id), - } + match_client!(self, justifications(id)) } fn block_hash( &self, number: NumberFor<Block>, ) -> sp_blockchain::Result<Option<<Block as BlockT>::Hash>> { - match self { - Self::GTest(client) => client.block_hash(number), - Self::GDev(client) => client.block_hash(number), - } + match_client!(self, block_hash(number)) } fn indexed_transaction( &self, hash: &<Block as BlockT>::Hash, ) -> sp_blockchain::Result<Option<Vec<u8>>> { - match self { - Self::GTest(client) => client.indexed_transaction(hash), - Self::GDev(client) => client.indexed_transaction(hash), - } + match_client!(self, indexed_transaction(hash)) } fn has_indexed_transaction( &self, hash: &<Block as BlockT>::Hash, ) -> sp_blockchain::Result<bool> { - match self { - Self::GTest(client) => client.has_indexed_transaction(hash), - Self::GDev(client) => client.has_indexed_transaction(hash), - } + match_client!(self, has_indexed_transaction(hash)) } } @@ -122,10 +125,7 @@ impl sc_client_api::StorageProvider<Block, super::FullBackend> for Client { id: &BlockId<Block>, key: &StorageKey, ) -> sp_blockchain::Result<Option<StorageData>> { - match self { - Self::GTest(client) => client.storage(id, key), - Self::GDev(client) => client.storage(id, key), - } + match_client!(self, storage(id, key)) } fn storage_keys( @@ -133,10 +133,7 @@ impl sc_client_api::StorageProvider<Block, super::FullBackend> for Client { id: &BlockId<Block>, key_prefix: &StorageKey, ) -> sp_blockchain::Result<Vec<StorageKey>> { - match self { - Self::GTest(client) => client.storage_keys(id, key_prefix), - Self::GDev(client) => client.storage_keys(id, key_prefix), - } + match_client!(self, storage_keys(id, key_prefix)) } fn storage_hash( @@ -144,10 +141,7 @@ impl sc_client_api::StorageProvider<Block, super::FullBackend> for Client { id: &BlockId<Block>, key: &StorageKey, ) -> sp_blockchain::Result<Option<<Block as BlockT>::Hash>> { - match self { - Self::GTest(client) => client.storage_hash(id, key), - Self::GDev(client) => client.storage_hash(id, key), - } + match_client!(self, storage_hash(id, key)) } fn storage_pairs( @@ -155,10 +149,7 @@ impl sc_client_api::StorageProvider<Block, super::FullBackend> for Client { id: &BlockId<Block>, key_prefix: &StorageKey, ) -> sp_blockchain::Result<Vec<(StorageKey, StorageData)>> { - match self { - Self::GTest(client) => client.storage_pairs(id, key_prefix), - Self::GDev(client) => client.storage_pairs(id, key_prefix), - } + match_client!(self, storage_pairs(id, key_prefix)) } fn storage_keys_iter<'a>( @@ -169,10 +160,7 @@ impl sc_client_api::StorageProvider<Block, super::FullBackend> for Client { ) -> sp_blockchain::Result< KeyIterator<'a, <super::FullBackend as sc_client_api::Backend<Block>>::State, Block>, > { - match self { - Self::GTest(client) => client.storage_keys_iter(id, prefix, start_key), - Self::GDev(client) => client.storage_keys_iter(id, prefix, start_key), - } + match_client!(self, storage_keys_iter(id, prefix, start_key)) } fn child_storage( @@ -181,10 +169,7 @@ impl sc_client_api::StorageProvider<Block, super::FullBackend> for Client { child_info: &ChildInfo, key: &StorageKey, ) -> sp_blockchain::Result<Option<StorageData>> { - match self { - Self::GTest(client) => client.child_storage(id, child_info, key), - Self::GDev(client) => client.child_storage(id, child_info, key), - } + match_client!(self, child_storage(id, child_info, key)) } fn child_storage_keys( @@ -193,10 +178,7 @@ impl sc_client_api::StorageProvider<Block, super::FullBackend> for Client { child_info: &ChildInfo, key_prefix: &StorageKey, ) -> sp_blockchain::Result<Vec<StorageKey>> { - match self { - Self::GTest(client) => client.child_storage_keys(id, child_info, key_prefix), - Self::GDev(client) => client.child_storage_keys(id, child_info, key_prefix), - } + match_client!(self, child_storage_keys(id, child_info, key_prefix)) } fn child_storage_keys_iter<'a>( @@ -208,12 +190,10 @@ impl sc_client_api::StorageProvider<Block, super::FullBackend> for Client { ) -> sp_blockchain::Result< KeyIterator<'a, <super::FullBackend as sc_client_api::Backend<Block>>::State, Block>, > { - match self { - Self::GTest(client) => { - client.child_storage_keys_iter(id, child_info, prefix, start_key) - } - Self::GDev(client) => client.child_storage_keys_iter(id, child_info, prefix, start_key), - } + match_client!( + self, + child_storage_keys_iter(id, child_info, prefix, start_key) + ) } fn child_storage_hash( @@ -222,70 +202,29 @@ impl sc_client_api::StorageProvider<Block, super::FullBackend> for Client { child_info: &ChildInfo, key: &StorageKey, ) -> sp_blockchain::Result<Option<<Block as BlockT>::Hash>> { - match self { - Self::GTest(client) => client.child_storage_hash(id, child_info, key), - Self::GDev(client) => client.child_storage_hash(id, child_info, key), - } - } - - fn max_key_changes_range( - &self, - first: NumberFor<Block>, - last: BlockId<Block>, - ) -> sp_blockchain::Result<Option<(NumberFor<Block>, BlockId<Block>)>> { - match self { - Self::GTest(client) => client.max_key_changes_range(first, last), - Self::GDev(client) => client.max_key_changes_range(first, last), - } - } - - fn key_changes( - &self, - first: NumberFor<Block>, - last: BlockId<Block>, - storage_key: Option<&PrefixedStorageKey>, - key: &StorageKey, - ) -> sp_blockchain::Result<Vec<(NumberFor<Block>, u32)>> { - match self { - Self::GTest(client) => client.key_changes(first, last, storage_key, key), - Self::GDev(client) => client.key_changes(first, last, storage_key, key), - } + match_client!(self, child_storage_hash(id, child_info, key)) } } impl sp_blockchain::HeaderBackend<Block> for Client { fn header(&self, id: BlockId<Block>) -> sp_blockchain::Result<Option<Header>> { - match self { - Self::GTest(client) => client.header(&id), - Self::GDev(client) => client.header(&id), - } + let id = &id; + match_client!(self, header(id)) } fn info(&self) -> sp_blockchain::Info<Block> { - match self { - Self::GTest(client) => client.info(), - Self::GDev(client) => client.info(), - } + match_client!(self, info()) } fn status(&self, id: BlockId<Block>) -> sp_blockchain::Result<sp_blockchain::BlockStatus> { - match self { - Self::GTest(client) => client.status(id), - Self::GDev(client) => client.status(id), - } + match_client!(self, status(id)) } fn number(&self, hash: Hash) -> sp_blockchain::Result<Option<BlockNumber>> { - match self { - Self::GTest(client) => client.number(hash), - Self::GDev(client) => client.number(hash), - } + match_client!(self, number(hash)) } fn hash(&self, number: BlockNumber) -> sp_blockchain::Result<Option<Hash>> { - match self { - Self::GTest(client) => client.hash(number), - Self::GDev(client) => client.hash(number), - } + match_client!(self, hash(number)) } } diff --git a/pallets/certification/Cargo.toml b/pallets/certification/Cargo.toml index b48cb85eb..51b128621 100644 --- a/pallets/certification/Cargo.toml +++ b/pallets/certification/Cargo.toml @@ -24,27 +24,32 @@ std = [ ] try-runtime = ['frame-support/try-runtime'] +[dependencies] + +# substrate +scale-info = { version = "1.0", default-features = false, features = ["derive"] } + [dependencies.codec] default-features = false features = ['derive'] package = 'parity-scale-codec' -version = '2.2.0' +version = '2.3.1' [dependencies.frame-benchmarking] default-features = false -git = 'https://github.com/paritytech/substrate.git' +git = 'https://github.com/librelois/substrate.git' optional = true -tag = 'monthly-2021-08' +branch = 'duniter-monthly-2022-01' [dependencies.frame-support] default-features = false -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.frame-system] default-features = false -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.serde] version = "1.0.101" @@ -53,18 +58,18 @@ features = ["derive"] [dependencies.sp-core] default-features = false -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.sp-runtime] default-features = false -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.sp-std] default-features = false -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' ### DOC ### @@ -80,5 +85,5 @@ version = '1.0.2' [dev-dependencies.sp-io] default-features = false -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' diff --git a/pallets/certification/src/lib.rs b/pallets/certification/src/lib.rs index e9f965e66..857f7e011 100644 --- a/pallets/certification/src/lib.rs +++ b/pallets/certification/src/lib.rs @@ -17,6 +17,7 @@ #![cfg_attr(not(feature = "std"), no_std)] pub mod traits; +mod types; #[cfg(test)] mod mock; @@ -25,30 +26,40 @@ mod mock; mod tests; pub use pallet::*; +pub use types::*; use crate::traits::*; use codec::Codec; -use sp_runtime::traits::{AtLeast32BitUnsigned, Zero}; -use sp_std::{ - collections::{btree_map::BTreeMap, btree_set::BTreeSet}, - fmt::Debug, - vec::Vec, -}; +use frame_support::traits::{Instance, StorageVersion}; +use sp_runtime::traits::AtLeast32BitUnsigned; +use sp_std::{fmt::Debug, vec::Vec}; +#[frame_support::pallet] pub mod pallet { use super::*; use frame_support::pallet_prelude::*; + use frame_system::pallet_prelude::*; + use sp_std::collections::{btree_map::BTreeMap, btree_set::BTreeSet}; - /// Configure the pallet by specifying the parameters and types on which it depends. - pub trait Config<I: Instance = DefaultInstance>: frame_system::Config { + /// The current storage version. + const STORAGE_VERSION: StorageVersion = StorageVersion::new(1); + + #[pallet::pallet] + #[pallet::generate_store(pub(super) trait Store)] + #[pallet::storage_version(STORAGE_VERSION)] + pub struct Pallet<T, I = ()>(PhantomData<(T, I)>); + + #[pallet::config] + pub trait Config<I: 'static = ()>: frame_system::Config { /// Origin allowed to add a certification type AddCertOrigin: EnsureOrigin<(Self::Origin, Self::IdtyIndex, Self::IdtyIndex)>; + #[pallet::constant] /// Minimum duration between two certifications issued by the same issuer type CertPeriod: Get<Self::BlockNumber>; /// Origin allowed to delete a certification type DelCertOrigin: EnsureOrigin<(Self::Origin, Self::IdtyIndex, Self::IdtyIndex)>; - /// The overarching event type. - type Event: From<Event<Self, I>> + Into<<Self as frame_system::Config>::Event>; + /// Because this pallet emits events, it depends on the runtime's definition of an event. + type Event: From<Event<Self, I>> + IsType<<Self as frame_system::Config>::Event>; /// A short identity index. type IdtyIndex: Parameter + Member @@ -59,259 +70,309 @@ pub mod pallet { + MaybeSerializeDeserialize + Debug + MaxEncodedLen; + #[pallet::constant] /// Maximum number of active certifications by issuer type MaxByIssuer: Get<u8>; /// Handler for NewCert event type OnNewcert: OnNewcert<Self::IdtyIndex>; /// Handler for Removed event type OnRemovedCert: OnRemovedCert<Self::IdtyIndex>; + #[pallet::constant] /// Duration after which a certification is renewable - type RenewablePeriod: Get<Self::BlockNumber>; + type CertRenewablePeriod: Get<Self::BlockNumber>; + #[pallet::constant] /// Duration of validity of a certification type ValidityPeriod: Get<Self::BlockNumber>; } - frame_support::decl_event! { - pub enum Event<T, I=DefaultInstance> where - <T as Config<I>>::IdtyIndex, - { - /// New certification - /// \[issuer, issuer_issued_count, receiver, receiver_received_count\] - NewCert(IdtyIndex,u8, IdtyIndex, u32), - /// Removed certification - /// \[issuer, issuer_issued_count, receiver, receiver_received_count, expiration\] - RemovedCert(IdtyIndex, u8, IdtyIndex, u32, bool), - /// Renewed certification - /// \[issuer, receiver\] - RenewedCert(IdtyIndex, IdtyIndex), - } - } - - frame_support::decl_error! { - pub enum Error for Module<T: Config<I>, I: Instance> { - /// An identity must receive certifications before it can issue them. - IdtyMustReceiveCertsBeforeCanIssue, - /// This identity has already issued the maximum number of certifications - IssuedTooManyCert, - /// This certification has already been issued or renewed recently - NotRespectRenewablePeriod, - /// This identity has already issued a certification too recently - NotRespectCertPeriod, - } - } - - // STORAGE // - - // A value placed in storage that represents the current version of the Balances storage. - // This value is used by the `on_runtime_upgrade` logic to determine whether we run - // storage migration logic. This should match directly with the semantic versions of the Rust crate. - #[derive(Encode, Decode, Clone, Copy, PartialEq, Eq, RuntimeDebug)] - pub enum Releases { - V1_0_0, - } - impl Default for Releases { - fn default() -> Self { - Releases::V1_0_0 - } - } - - #[derive(Encode, Decode, Clone, Copy, PartialEq, Eq, RuntimeDebug)] - pub struct CertValue<T: Config<I>, I: Instance> { - renewable_on: T::BlockNumber, - removable_on: T::BlockNumber, - phantom: PhantomData<I>, + #[pallet::genesis_config] + pub struct GenesisConfig<T: Config<I>, I: 'static = ()> { + pub certs_by_issuer: BTreeMap<T::IdtyIndex, BTreeSet<T::IdtyIndex>>, + pub phantom: PhantomData<I>, } - #[derive(Encode, Decode, Clone, Copy, PartialEq, Eq, RuntimeDebug)] - pub struct IdtyCertMeta<T: Config<I>, I: Instance> { - issued_count: u8, - next_issuable_on: T::BlockNumber, - received_count: u32, - phantom: PhantomData<I>, - } - impl<T: Config<I>, I: Instance> Default for IdtyCertMeta<T, I> { + #[cfg(feature = "std")] + impl<T: Config<I>, I: 'static> Default for GenesisConfig<T, I> { fn default() -> Self { Self { - issued_count: 0, - next_issuable_on: T::BlockNumber::zero(), - received_count: 0, - phantom: PhantomData, + certs_by_issuer: Default::default(), + phantom: Default::default(), } } } - frame_support::decl_storage! { - trait Store for Module<T: Config<I>, I: Instance=DefaultInstance> as Certification { - /// Storage version of the pallet. - StorageVersion get(fn storage_version): Releases; - /// Certifications by issuer - pub StorageIdtyCertMeta get(fn certs_by_issuer): - map hasher(twox_64_concat) T::IdtyIndex => IdtyCertMeta<T, I> = IdtyCertMeta { - issued_count: 0, - next_issuable_on: T::BlockNumber::zero(), - received_count: 0, - phantom: PhantomData, - }; - pub StorageCertsByIssuer get(fn cert): - double_map hasher(identity) T::IdtyIndex, hasher(identity) T::IdtyIndex - => Option<CertValue<T, I>>; - /// Certifications by receiver - pub StorageCertsByReceiver get(fn certs_by_receiver): - map hasher(twox_64_concat) T::IdtyIndex => Vec<T::IdtyIndex>; - /// Certifications removable on - pub StorageCertsRemovableOn get(fn certs_removable_on): - map hasher(twox_64_concat) T::BlockNumber => Vec<(T::IdtyIndex, T::IdtyIndex)>; - } - add_extra_genesis { - config(phantom): sp_std::marker::PhantomData<I>; - config(certs_by_issuer): BTreeMap<T::IdtyIndex, BTreeSet<T::IdtyIndex>>; - build(|config| { - let mut cert_meta_by_issuer = BTreeMap::<T::IdtyIndex, IdtyCertMeta<T, I>>::new(); - let mut certs_by_receiver = BTreeMap::<T::IdtyIndex, Vec<T::IdtyIndex>>::new(); - for (issuer, receivers) in &config.certs_by_issuer { - assert!(!receivers.contains(issuer), "Identity cannot tcertify it-self."); - assert!(!receivers.len() >= T::MaxByIssuer::get() as usize, "Identity n°{:?} exceed MaxByIssuer.", issuer); - - cert_meta_by_issuer.insert(*issuer, IdtyCertMeta { + #[pallet::genesis_build] + impl<T: Config<I>, I: 'static> GenesisBuild<T, I> for GenesisConfig<T, I> { + fn build(&self) { + let mut cert_meta_by_issuer = + BTreeMap::<T::IdtyIndex, IdtyCertMeta<T::BlockNumber>>::new(); + let mut certs_by_receiver = BTreeMap::<T::IdtyIndex, Vec<T::IdtyIndex>>::new(); + for (issuer, receivers) in &self.certs_by_issuer { + assert!( + !receivers.contains(issuer), + "Identity cannot certify it-self." + ); + assert!( + !receivers.len() >= T::MaxByIssuer::get() as usize, + "Identity n°{:?} exceed MaxByIssuer.", + issuer + ); + + cert_meta_by_issuer.insert( + *issuer, + IdtyCertMeta { issued_count: receivers.len() as u8, next_issuable_on: T::CertPeriod::get(), received_count: 0, - phantom: PhantomData, - }); - for receiver in receivers { - certs_by_receiver.entry(*receiver).or_default().push(*issuer); - } + }, + ); + for receiver in receivers { + certs_by_receiver + .entry(*receiver) + .or_default() + .push(*issuer); } + } - <StorageVersion<I>>::put(Releases::V1_0_0); - // Write StorageCertsByReceiver - for (receiver, mut issuers) in certs_by_receiver { - cert_meta_by_issuer.entry(receiver).and_modify(|cert_meta| cert_meta.received_count = issuers.len() as u32); - issuers.sort(); - <StorageCertsByReceiver<T, I>>::insert(receiver, issuers); - } - // Write StorageIdtyCertMeta - for (issuer, cert_meta) in cert_meta_by_issuer { - <StorageIdtyCertMeta<T, I>>::insert(issuer, cert_meta); - } - // Write StorageCertsByIssuer && StorageCertsRemovableOn - let mut all_couples = Vec::new(); - for (issuer, receivers) in &config.certs_by_issuer { - for receiver in receivers { - all_couples.push((*issuer, *receiver)); - <StorageCertsByIssuer<T, I>>::insert(issuer, receiver, CertValue { - renewable_on: T::RenewablePeriod::get(), + // Write StorageCertsByReceiver + for (receiver, mut issuers) in certs_by_receiver { + cert_meta_by_issuer + .entry(receiver) + .and_modify(|cert_meta| cert_meta.received_count = issuers.len() as u32); + issuers.sort(); + <StorageCertsByReceiver<T, I>>::insert(receiver, issuers); + } + // Write StorageIdtyCertMeta + for (issuer, cert_meta) in cert_meta_by_issuer { + <StorageIdtyCertMeta<T, I>>::insert(issuer, cert_meta); + } + // Write StorageCertsByIssuer && StorageCertsRemovableOn + let mut all_couples = Vec::new(); + for (issuer, receivers) in &self.certs_by_issuer { + for receiver in receivers { + all_couples.push((*issuer, *receiver)); + <StorageCertsByIssuer<T, I>>::insert( + issuer, + receiver, + CertValue { + renewable_on: T::CertRenewablePeriod::get(), removable_on: T::ValidityPeriod::get(), - phantom: PhantomData, - }); - } + }, + ); } - <StorageCertsRemovableOn<T, I>>::insert(T::ValidityPeriod::get(), all_couples); - }); + } + <StorageCertsRemovableOn<T, I>>::insert(T::ValidityPeriod::get(), all_couples); } } - // CALLS // + // STORAGE // - frame_support::decl_module! { - pub struct Module<T: Config<I>, I: Instance=DefaultInstance> for enum Call where origin: <T as frame_system::Config>::Origin { - type Error = Error<T, I>; + /// Certifications metada by issuer + #[pallet::storage] + #[pallet::getter(fn idty_cert_meta)] + pub type StorageIdtyCertMeta<T: Config<I>, I: 'static = ()> = + StorageMap<_, Blake2_128Concat, T::IdtyIndex, IdtyCertMeta<T::BlockNumber>, OptionQuery>; + + /// Certifications by issuer + #[pallet::storage] + #[pallet::getter(fn cert)] + /// Certifications by issuer + pub(super) type StorageCertsByIssuer<T: Config<I>, I: 'static = ()> = StorageDoubleMap< + _, + Identity, + T::IdtyIndex, + Identity, + T::IdtyIndex, + CertValue<T::BlockNumber>, + OptionQuery, + GetDefault, + ConstU32<4_000_000_000>, + >; + + /// Certifications by receiver + #[pallet::storage] + #[pallet::getter(fn certs_by_receiver)] + pub type StorageCertsByReceiver<T: Config<I>, I: 'static = ()> = + StorageMap<_, Blake2_128Concat, T::IdtyIndex, Vec<T::IdtyIndex>, OptionQuery>; + + /// Certifications removable on + #[pallet::storage] + #[pallet::getter(fn certs_removable_on)] + pub type StorageCertsRemovableOn<T: Config<I>, I: 'static = ()> = StorageMap< + _, + Blake2_128Concat, + T::BlockNumber, + Vec<(T::IdtyIndex, T::IdtyIndex)>, + OptionQuery, + >; + + #[pallet::event] + #[pallet::generate_deposit(pub(super) fn deposit_event)] + pub enum Event<T: Config<I>, I: 'static = ()> { + /// New certification + NewCert { + issuer: T::IdtyIndex, + issuer_issued_count: u8, + receiver: T::IdtyIndex, + receiver_received_count: u32, + }, + /// Removed certification + RemovedCert { + issuer: T::IdtyIndex, + issuer_issued_count: u8, + receiver: T::IdtyIndex, + receiver_received_count: u32, + expiration: bool, + }, + /// Renewed certification + RenewedCert { + issuer: T::IdtyIndex, + receiver: T::IdtyIndex, + }, + } - fn deposit_event() = default; + #[pallet::error] + pub enum Error<T, I = ()> { + /// An identity must receive certifications before it can issue them. + IdtyMustReceiveCertsBeforeCanIssue, + /// This identity has already issued the maximum number of certifications + IssuedTooManyCert, + /// This certification has already been issued or renewed recently + NotRespectRenewablePeriod, + /// This identity has already issued a certification too recently + NotRespectCertPeriod, + } - fn on_initialize(n: T::BlockNumber) -> Weight { - Self::prune_certifications(n) - } + #[pallet::hooks] + impl<T: Config<I>, I: 'static> Hooks<BlockNumberFor<T>> for Pallet<T, I> { + fn on_initialize(n: T::BlockNumber) -> Weight { + Self::prune_certifications(n) + } + } - #[weight = 0] - pub fn add_cert(origin, issuer: T::IdtyIndex, receiver: T::IdtyIndex) { - T::AddCertOrigin::ensure_origin((origin, issuer, receiver))?; - frame_support::runtime_print!("add_cert({:?}, {:?}): origin OK", issuer, receiver); + // CALLS // - let block_number = frame_system::pallet::Pallet::<T>::block_number(); + #[pallet::call] + impl<T: Config<I>, I: 'static> Pallet<T, I> { + #[pallet::weight(0)] + pub fn add_cert( + origin: OriginFor<T>, + issuer: T::IdtyIndex, + receiver: T::IdtyIndex, + ) -> DispatchResultWithPostInfo { + T::AddCertOrigin::ensure_origin((origin, issuer, receiver))?; + frame_support::runtime_print!("add_cert({:?}, {:?}): origin OK", issuer, receiver); + + let block_number = frame_system::pallet::Pallet::<T>::block_number(); + + let (create, issuer_issued_count) = if let Ok(mut issuer_idty_cert_meta) = + <StorageIdtyCertMeta<T, I>>::try_get(issuer) + { + // Verify rules CertPeriod and MaxByIssuer + frame_support::runtime_print!( + "add_cert({:?}, {:?}): Verify rules CertPeriod and MaxByIssuer", + issuer, + receiver + ); + if issuer_idty_cert_meta.next_issuable_on > block_number { + return Err(Error::<T, I>::NotRespectCertPeriod.into()); + } else if issuer_idty_cert_meta.issued_count >= T::MaxByIssuer::get() { + return Err(Error::<T, I>::IssuedTooManyCert.into()); + } - let (create, issuer_issued_count) = if let Ok(mut issuer_idty_cert_meta) = <StorageIdtyCertMeta<T, I>>::try_get(issuer) { - // Verify rules CertPeriod and MaxByIssuer - frame_support::runtime_print!("add_cert({:?}, {:?}): Verify rules CertPeriod and MaxByIssuer", issuer, receiver); - if issuer_idty_cert_meta.next_issuable_on > block_number { - return Err(Error::<T, I>::NotRespectCertPeriod.into()); - } else if issuer_idty_cert_meta.issued_count >= T::MaxByIssuer::get() { - return Err(Error::<T, I>::IssuedTooManyCert.into()); + // Verify rule CertRenewablePeriod + frame_support::runtime_print!( + "add_cert({:?}, {:?}): Verify rule CertRenewablePeriod", + issuer, + receiver + ); + let create = if let Ok(CertValue { renewable_on, .. }) = + <StorageCertsByIssuer<T, I>>::try_get(issuer, receiver) + { + if renewable_on > block_number { + return Err(Error::<T, I>::NotRespectRenewablePeriod.into()); } - - // Verify rule RenewablePeriod - frame_support::runtime_print!("add_cert({:?}, {:?}): Verify rule RenewablePeriod", issuer, receiver); - let create = if let Ok(CertValue { renewable_on, .. }) = <StorageCertsByIssuer<T, I>>::try_get(issuer, receiver) { - if renewable_on > block_number { - return Err(Error::<T, I>::NotRespectRenewablePeriod.into()); - } - false - } else { - true - }; - - // Write StorageIdtyCertMeta for issuer - issuer_idty_cert_meta.issued_count = issuer_idty_cert_meta.issued_count.saturating_add(1); - let issuer_issued_count = issuer_idty_cert_meta.issued_count; - issuer_idty_cert_meta.next_issuable_on = block_number + T::CertPeriod::get(); - <StorageIdtyCertMeta<T, I>>::insert(issuer, issuer_idty_cert_meta); - - (create, issuer_issued_count) + false } else { - // An identity must receive certifications before it can issue them. - return Err(Error::<T, I>::IdtyMustReceiveCertsBeforeCanIssue.into()); + true }; - // Write StorageIdtyCertMeta for receiver - frame_support::runtime_print!("add_cert({:?}, {:?}): Write StorageIdtyCertMeta for receiver", issuer, receiver); - let receiver_received_count = <StorageIdtyCertMeta<T, I>>::mutate_exists(receiver, |cert_meta_opt| { + // Write StorageIdtyCertMeta for issuer + issuer_idty_cert_meta.issued_count = + issuer_idty_cert_meta.issued_count.saturating_add(1); + let issuer_issued_count = issuer_idty_cert_meta.issued_count; + issuer_idty_cert_meta.next_issuable_on = block_number + T::CertPeriod::get(); + <StorageIdtyCertMeta<T, I>>::insert(issuer, issuer_idty_cert_meta); + + (create, issuer_issued_count) + } else { + // An identity must receive certifications before it can issue them. + return Err(Error::<T, I>::IdtyMustReceiveCertsBeforeCanIssue.into()); + }; + + // Write StorageIdtyCertMeta for receiver + frame_support::runtime_print!( + "add_cert({:?}, {:?}): Write StorageIdtyCertMeta for receiver", + issuer, + receiver + ); + let receiver_received_count = + <StorageIdtyCertMeta<T, I>>::mutate_exists(receiver, |cert_meta_opt| { let cert_meta = cert_meta_opt.get_or_insert(IdtyCertMeta::default()); cert_meta.received_count = cert_meta.received_count.saturating_add(1); cert_meta.received_count }); - // Write StorageCertsRemovableOn and StorageCertsByIssuer - let cert_value = CertValue { - renewable_on: block_number + T::RenewablePeriod::get(), - removable_on: block_number + T::ValidityPeriod::get(), - phantom: PhantomData, - }; - <StorageCertsRemovableOn<T, I>>::append(cert_value.removable_on, (issuer, receiver)); - <StorageCertsByIssuer<T, I>>::insert(issuer, receiver, cert_value); - - if create { - // Write StorageCertsByReceiver - <StorageCertsByReceiver<T, I>>::mutate_exists(receiver, |issuers_opt| { - let issuers = issuers_opt.get_or_insert(Vec::with_capacity(0)); - if let Err(index) = issuers.binary_search(&issuer) { - issuers.insert(index, issuer); - } - }); - Self::deposit_event(RawEvent::NewCert(issuer, issuer_issued_count, receiver, receiver_received_count)); - T::OnNewcert::on_new_cert(issuer, issuer_issued_count, receiver, receiver_received_count); - } else { - Self::deposit_event(RawEvent::RenewedCert(issuer, receiver)); - } - } - #[weight = 0] - pub fn del_cert(origin, issuer: T::IdtyIndex, receiver: T::IdtyIndex) { - T::DelCertOrigin::ensure_origin((origin, issuer, receiver))?; - Self::remove_cert_inner(issuer, receiver, None); + // Write StorageCertsRemovableOn and StorageCertsByIssuer + let cert_value = CertValue { + renewable_on: block_number + T::CertRenewablePeriod::get(), + removable_on: block_number + T::ValidityPeriod::get(), + }; + <StorageCertsRemovableOn<T, I>>::append(cert_value.removable_on, (issuer, receiver)); + <StorageCertsByIssuer<T, I>>::insert(issuer, receiver, cert_value); + + if create { + // Write StorageCertsByReceiver + <StorageCertsByReceiver<T, I>>::mutate_exists(receiver, |issuers_opt| { + let issuers = issuers_opt.get_or_insert(Vec::with_capacity(0)); + if let Err(index) = issuers.binary_search(&issuer) { + issuers.insert(index, issuer); + } + }); + Self::deposit_event(Event::NewCert { + issuer, + issuer_issued_count, + receiver, + receiver_received_count, + }); + T::OnNewcert::on_new_cert( + issuer, + issuer_issued_count, + receiver, + receiver_received_count, + ); + } else { + Self::deposit_event(Event::RenewedCert { issuer, receiver }); } + + Ok(().into()) + } + + #[pallet::weight(0)] + pub fn del_cert( + origin: OriginFor<T>, + issuer: T::IdtyIndex, + receiver: T::IdtyIndex, + ) -> DispatchResultWithPostInfo { + T::DelCertOrigin::ensure_origin((origin, issuer, receiver))?; + Self::remove_cert_inner(issuer, receiver, None); + Ok(().into()) } } // PUBLIC FUNCTIONS // - impl<T: Config<I>, I: Instance> Module<T, I> { - pub fn is_idty_allowed_to_create_cert(idty_index: T::IdtyIndex) -> bool { - if let Ok(cert_meta) = <StorageIdtyCertMeta<T, I>>::try_get(idty_index) { - cert_meta.next_issuable_on <= frame_system::pallet::Pallet::<T>::block_number() - && cert_meta.issued_count < T::MaxByIssuer::get() - } else { - true - } - } + impl<T: Config<I>, I: Instance> Pallet<T, I> { pub fn on_idty_removed(idty_index: T::IdtyIndex) -> Weight { let mut total_weight: Weight = 0; if let Ok(issuers) = <StorageCertsByReceiver<T, I>>::try_get(idty_index) { @@ -325,7 +386,7 @@ pub mod pallet { // INTERNAL FUNCTIONS // - impl<T: Config<I>, I: Instance> Module<T, I> { + impl<T: Config<I>, I: 'static> Pallet<T, I> { fn prune_certifications(block_number: T::BlockNumber) -> Weight { let mut total_weight: Weight = 0; @@ -377,13 +438,13 @@ pub mod pallet { cert_meta.received_count = cert_meta.received_count.saturating_sub(1); cert_meta.received_count }); - Self::deposit_event(RawEvent::RemovedCert( + Self::deposit_event(Event::RemovedCert { issuer, issuer_issued_count, receiver, receiver_received_count, - block_number_opt.is_some(), - )); + expiration: block_number_opt.is_some(), + }); total_weight += T::OnRemovedCert::on_removed_cert( issuer, issuer_issued_count, @@ -396,3 +457,15 @@ pub mod pallet { } } } + +impl<T: Config<I>, I: 'static> IsIdtyAllowedToCreateCert<T::IdtyIndex> for Pallet<T, I> { + fn is_idty_allowed_to_create_cert(idty_index: T::IdtyIndex) -> bool { + if let Ok(cert_meta) = <StorageIdtyCertMeta<T, I>>::try_get(idty_index) { + use frame_support::traits::Get as _; + cert_meta.next_issuable_on <= frame_system::pallet::Pallet::<T>::block_number() + && cert_meta.issued_count < T::MaxByIssuer::get() + } else { + true + } + } +} diff --git a/pallets/certification/src/mock.rs b/pallets/certification/src/mock.rs index 391fb7d65..304cd757d 100644 --- a/pallets/certification/src/mock.rs +++ b/pallets/certification/src/mock.rs @@ -17,7 +17,7 @@ use crate::{self as pallet_certification}; use frame_support::{ parameter_types, - traits::{AllowAll, OnFinalize, OnInitialize}, + traits::{Everything, OnFinalize, OnInitialize}, }; use frame_system as system; use sp_core::H256; @@ -51,7 +51,7 @@ parameter_types! { } impl system::Config for Test { - type BaseCallFilter = AllowAll; + type BaseCallFilter = Everything; type BlockWeights = (); type BlockLength = (); type DbWeight = (); diff --git a/pallets/certification/src/traits.rs b/pallets/certification/src/traits.rs index 38c4fa37d..0e195603f 100644 --- a/pallets/certification/src/traits.rs +++ b/pallets/certification/src/traits.rs @@ -14,6 +14,10 @@ // You should have received a copy of the GNU Affero General Public License // along with Substrate-Libre-Currency. If not, see <https://www.gnu.org/licenses/>. +pub trait IsIdtyAllowedToCreateCert<IdtyIndex> { + fn is_idty_allowed_to_create_cert(idty_index: IdtyIndex) -> bool; +} + pub trait OnNewcert<IdtyIndex> { fn on_new_cert( issuer: IdtyIndex, diff --git a/pallets/certification/src/types.rs b/pallets/certification/src/types.rs new file mode 100644 index 000000000..464df347a --- /dev/null +++ b/pallets/certification/src/types.rs @@ -0,0 +1,44 @@ +// Copyright 2021 Axiom-Team +// +// This file is part of Substrate-Libre-Currency. +// +// Substrate-Libre-Currency is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, version 3 of the License. +// +// Substrate-Libre-Currency is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with Substrate-Libre-Currency. If not, see <https://www.gnu.org/licenses/>. + +//! Various basic types for use in the certification pallet. + +use codec::{Decode, Encode}; +use frame_support::pallet_prelude::*; +use scale_info::TypeInfo; + +#[derive(Encode, Decode, Clone, Copy, PartialEq, Eq, RuntimeDebug, TypeInfo)] +pub struct CertValue<BlockNumber> { + pub renewable_on: BlockNumber, + pub removable_on: BlockNumber, +} + +#[derive(Encode, Decode, Clone, Copy, PartialEq, Eq, RuntimeDebug, TypeInfo)] +pub struct IdtyCertMeta<BlockNumber> { + pub issued_count: u8, + pub next_issuable_on: BlockNumber, + pub received_count: u32, +} + +impl<BlockNumber: Default> Default for IdtyCertMeta<BlockNumber> { + fn default() -> Self { + Self { + issued_count: 0, + next_issuable_on: BlockNumber::default(), + received_count: 0, + } + } +} diff --git a/pallets/identity/Cargo.toml b/pallets/identity/Cargo.toml index c137d3c06..df5c683e9 100644 --- a/pallets/identity/Cargo.toml +++ b/pallets/identity/Cargo.toml @@ -24,27 +24,32 @@ std = [ ] try-runtime = ['frame-support/try-runtime'] +[dependencies] + +# substrate +scale-info = { version = "1.0", default-features = false, features = ["derive"] } + [dependencies.codec] default-features = false features = ['derive'] package = 'parity-scale-codec' -version = '2.2.0' +version = '2.3.1' [dependencies.frame-benchmarking] default-features = false -git = 'https://github.com/paritytech/substrate.git' +git = 'https://github.com/librelois/substrate.git' optional = true -tag = 'monthly-2021-08' +branch = 'duniter-monthly-2022-01' [dependencies.frame-support] default-features = false -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.frame-system] default-features = false -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.serde] version = "1.0.101" @@ -53,18 +58,18 @@ features = ["derive"] [dependencies.sp-core] default-features = false -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.sp-runtime] default-features = false -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.sp-std] default-features = false -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' ### DOC ### @@ -77,5 +82,5 @@ version = '1.0.119' [dev-dependencies.sp-io] default-features = false -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' diff --git a/pallets/identity/src/lib.rs b/pallets/identity/src/lib.rs index a5ac4e31d..51b62b76d 100644 --- a/pallets/identity/src/lib.rs +++ b/pallets/identity/src/lib.rs @@ -17,6 +17,7 @@ #![cfg_attr(not(feature = "std"), no_std)] pub mod traits; +mod types; #[cfg(test)] mod mock; @@ -28,14 +29,12 @@ mod tests; mod benchmarking;*/ pub use pallet::*; +pub use types::*; use crate::traits::*; use codec::Codec; use frame_support::dispatch::Weight; -#[cfg(feature = "std")] -use serde::{Deserialize, Serialize}; use sp_runtime::traits::{AtLeast32BitUnsigned, One, Saturating, Zero}; -use sp_std::collections::btree_set::BTreeSet; use sp_std::fmt::Debug; use sp_std::prelude::*; @@ -44,6 +43,7 @@ pub mod pallet { use super::*; use frame_support::pallet_prelude::*; use frame_system::pallet_prelude::*; + use scale_info::TypeInfo; /// Configure the pallet by specifying the parameters and types on which it depends. #[pallet::config] @@ -61,6 +61,8 @@ pub mod pallet { type EnsureIdtyCallAllowed: EnsureIdtyCallAllowed<Self>; /// Identity custom data type IdtyData: Parameter + Member + MaybeSerializeDeserialize + Debug + Default; + /// Identity custom data provider + type IdtyDataProvider: ProvideIdtyData<Self>; /// Identity decentralized identifier type IdtyDid: IdtyDid; /// A short identity index. @@ -103,7 +105,7 @@ pub mod pallet { // A value placed in storage that represents the current version of the Balances storage. // This value is used by the `on_runtime_upgrade` logic to determine whether we run // storage migration logic. This should match directly with the semantic versions of the Rust crate. - #[derive(Encode, Decode, Clone, Copy, PartialEq, Eq, RuntimeDebug)] + #[derive(Encode, Decode, Clone, Copy, PartialEq, Eq, RuntimeDebug, TypeInfo)] pub enum Releases { V1_0_0, } @@ -113,66 +115,6 @@ pub mod pallet { } } - #[cfg_attr(feature = "std", derive(Deserialize, Serialize))] - #[derive(Encode, Decode, Clone, Copy, PartialEq, Eq, RuntimeDebug)] - pub enum IdtyStatus { - Created, - ConfirmedByOwner, - Validated, - Expired, - } - impl Default for IdtyStatus { - fn default() -> Self { - IdtyStatus::Created - } - } - - #[cfg_attr(feature = "std", derive(Deserialize, Serialize))] - #[derive(Encode, Decode, Clone, PartialEq, Eq)] - pub struct IdtyValue<T: Config> { - pub did: T::IdtyDid, - pub expire_on: T::BlockNumber, - pub owner_key: T::AccountId, - pub removable_on: T::BlockNumber, - pub renewable_on: T::BlockNumber, - pub rights: Vec<(T::IdtyRight, Option<T::AccountId>)>, - pub status: IdtyStatus, - pub data: T::IdtyData, - } - impl<T: Config> Default for IdtyValue<T> { - fn default() -> Self { - Self { - did: Default::default(), - expire_on: frame_system::Pallet::<T>::block_number() - + T::MaxInactivityPeriod::get(), - owner_key: Default::default(), - removable_on: T::BlockNumber::zero(), - renewable_on: frame_system::Pallet::<T>::block_number() + T::RenewablePeriod::get(), - rights: Default::default(), - status: Default::default(), - data: Default::default(), - } - } - } - impl<T: Config> IdtyValue<T> { - pub fn get_right_key(&self, right: T::IdtyRight) -> Option<T::AccountId> { - if let Ok(index) = self - .rights - .binary_search_by(|(right_, _)| right_.cmp(&right)) - { - if self.rights[index].1.is_some() { - self.rights[index].1.clone() - } else if right.allow_owner_key() { - Some(self.owner_key.clone()) - } else { - None - } - } else { - None - } - } - } - /// Storage version of the pallet. #[pallet::storage] pub(super) type StorageVersion<T: Config> = StorageValue<_, Releases, ValueQuery>; @@ -180,8 +122,13 @@ pub mod pallet { /// Identities #[pallet::storage] #[pallet::getter(fn identity)] - pub type Identities<T: Config> = - StorageMap<_, Blake2_128Concat, T::IdtyIndex, IdtyValue<T>, ValueQuery>; + pub type Identities<T: Config> = StorageMap< + _, + Blake2_128Concat, + T::IdtyIndex, + IdtyValue<T::AccountId, T::BlockNumber, T::IdtyData, T::IdtyDid, T::IdtyRight>, + OptionQuery, + >; /// IdentitiesByDid #[pallet::storage] @@ -217,7 +164,8 @@ pub mod pallet { #[pallet::genesis_config] pub struct GenesisConfig<T: Config> { - pub identities: Vec<IdtyValue<T>>, + pub identities: + Vec<IdtyValue<T::AccountId, T::BlockNumber, T::IdtyData, T::IdtyDid, T::IdtyRight>>, } #[cfg(feature = "std")] @@ -232,7 +180,7 @@ pub mod pallet { #[pallet::genesis_build] impl<T: Config> GenesisBuild<T> for GenesisConfig<T> { fn build(&self) { - let mut dids = BTreeSet::new(); + let mut dids = sp_std::collections::btree_set::BTreeSet::new(); for idty_value in &self.identities { assert!( !dids.contains(&idty_value.did), @@ -290,11 +238,6 @@ pub mod pallet { // https://substrate.dev/docs/en/knowledgebase/runtime/events #[pallet::event] #[pallet::generate_deposit(pub(super) fn deposit_event)] - #[pallet::metadata( - T::IdtyDid = "IdtyDid", - T::IdtyRight = "IdtyRight", - T::AccountId = "AccountId" - )] pub enum Event<T: Config> { /// A new identity has been created /// [idty, owner_key] @@ -338,8 +281,9 @@ pub mod pallet { idty_did: T::IdtyDid, owner_key: T::AccountId, ) -> DispatchResultWithPostInfo { + T::EnsureIdtyCallAllowed::can_create_identity(origin, creator, &idty_did, &owner_key)?; let idty_data = - T::EnsureIdtyCallAllowed::create_identity(origin, creator, &idty_did, &owner_key)?; + T::IdtyDataProvider::provide_identity_data(creator, &idty_did, &owner_key); if <IdentitiesByDid<T>>::contains_key(&idty_did) { return Err(Error::<T>::IdtyAlreadyExist.into()); } @@ -707,8 +651,10 @@ pub mod pallet { impl<T: Config> Pallet<T> { pub fn set_idty_data(idty_index: T::IdtyIndex, idty_data: T::IdtyData) { - Identities::<T>::mutate_exists(idty_index, |idty_val| { - idty_val.get_or_insert(IdtyValue::default()).data = idty_data; + Identities::<T>::mutate_exists(idty_index, |idty_val_opt| { + if let Some(ref mut idty_val) = idty_val_opt { + idty_val.data = idty_data; + } }); } } @@ -750,10 +696,10 @@ pub mod pallet { if let Ok(idty_val) = <Identities<T>>::try_get(idty_index) { if idty_val.expire_on == block_number { <Identities<T>>::mutate_exists(idty_index, |idty_val_opt| { - idty_val_opt.get_or_insert(IdtyValue::default()).rights = - Vec::with_capacity(0); - idty_val_opt.get_or_insert(IdtyValue::default()).status = - IdtyStatus::Expired; + if let Some(ref mut idty_val) = idty_val_opt { + idty_val.rights = Vec::with_capacity(0); + idty_val.status = IdtyStatus::Expired; + } }); total_weight += T::OnIdtyChange::on_idty_change(idty_index, IdtyEvent::Expired); diff --git a/pallets/identity/src/mock.rs b/pallets/identity/src/mock.rs index e36c06d6e..9a1c0b8e8 100644 --- a/pallets/identity/src/mock.rs +++ b/pallets/identity/src/mock.rs @@ -19,7 +19,7 @@ use crate::{self as pallet_identity}; use frame_support::{ codec::{Decode, Encode}, parameter_types, - traits::{AllowAll, OnFinalize, OnInitialize}, + traits::{Everything, OnFinalize, OnInitialize}, RuntimeDebug, }; use frame_system as system; @@ -54,6 +54,9 @@ impl pallet_identity::traits::IdtyRight for IdtyRight { fn allow_owner_key(self) -> bool { self == Self::Right1 } + fn create_idty_right() -> Self { + Self::Right1 + } } // Configure a mock runtime to test the pallet. @@ -74,7 +77,7 @@ parameter_types! { } impl system::Config for Test { - type BaseCallFilter = AllowAll; + type BaseCallFilter = Everything; type BlockWeights = (); type BlockLength = (); type DbWeight = (); diff --git a/pallets/identity/src/traits.rs b/pallets/identity/src/traits.rs index 441d4b05c..0550946da 100644 --- a/pallets/identity/src/traits.rs +++ b/pallets/identity/src/traits.rs @@ -21,27 +21,49 @@ use sp_runtime::traits::MaybeSerializeDeserialize; use sp_std::fmt::Debug; pub trait EnsureIdtyCallAllowed<T: Config> { - fn create_identity( + fn can_create_identity( origin: T::Origin, creator: T::IdtyIndex, idty_did: &T::IdtyDid, idty_owner_key: &T::AccountId, - ) -> Result<T::IdtyData, DispatchError>; + ) -> Result<(), DispatchError>; } + impl<T: Config> EnsureIdtyCallAllowed<T> for () { - fn create_identity( + fn can_create_identity( origin: T::Origin, _creator: T::IdtyIndex, _idty_did: &T::IdtyDid, _idty_owner_key: &T::AccountId, - ) -> Result<T::IdtyData, DispatchError> { + ) -> Result<(), DispatchError> { match ensure_root(origin) { - Ok(()) => Ok(T::IdtyData::default()), + Ok(()) => Ok(()), Err(_) => Err(DispatchError::BadOrigin), } } } +pub trait ProvideIdtyData<T: Config> { + fn provide_identity_data( + creator: T::IdtyIndex, + idty_did: &T::IdtyDid, + idty_owner_key: &T::AccountId, + ) -> T::IdtyData; +} + +impl<T: Config> ProvideIdtyData<T> for () +where + T::IdtyData: Default, +{ + fn provide_identity_data( + _creator: T::IdtyIndex, + _idty_did: &T::IdtyDid, + _idty_owner_key: &T::AccountId, + ) -> T::IdtyData { + Default::default() + } +} + pub trait IdtyDid: frame_support::Parameter + frame_support::pallet_prelude::Member @@ -63,6 +85,7 @@ pub trait IdtyRight: + Ord { fn allow_owner_key(self) -> bool; + fn create_idty_right() -> Self; } pub enum IdtyEvent<T: Config> { diff --git a/pallets/identity/src/types.rs b/pallets/identity/src/types.rs new file mode 100644 index 000000000..420c912a0 --- /dev/null +++ b/pallets/identity/src/types.rs @@ -0,0 +1,84 @@ +// Copyright 2021 Axiom-Team +// +// This file is part of Substrate-Libre-Currency. +// +// Substrate-Libre-Currency is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, version 3 of the License. +// +// Substrate-Libre-Currency is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with Substrate-Libre-Currency. If not, see <https://www.gnu.org/licenses/>. + +//! Various basic types for use in the certification pallet. + +use codec::{Decode, Encode}; +use frame_support::pallet_prelude::*; +use scale_info::TypeInfo; +#[cfg(feature = "std")] +use serde::{Deserialize, Serialize}; +use sp_std::vec::Vec; + +#[cfg_attr(feature = "std", derive(Deserialize, Serialize))] +#[derive(Encode, Decode, Clone, Copy, PartialEq, Eq, RuntimeDebug, TypeInfo)] +pub enum IdtyStatus { + Created, + ConfirmedByOwner, + Validated, + Expired, +} +impl Default for IdtyStatus { + fn default() -> Self { + IdtyStatus::Created + } +} + +#[cfg_attr(feature = "std", derive(Deserialize, Serialize))] +#[derive(Encode, Decode, Clone, PartialEq, Eq, TypeInfo)] +pub struct IdtyValue< + AccountId: Decode + Encode + TypeInfo, + BlockNumber: Decode + Encode + TypeInfo, + IdtyData: Decode + Encode + TypeInfo, + IdtyDid: Decode + Encode + TypeInfo, + IdtyRight: Decode + Encode + TypeInfo, +> { + pub did: IdtyDid, + pub expire_on: BlockNumber, + pub owner_key: AccountId, + pub removable_on: BlockNumber, + pub renewable_on: BlockNumber, + pub rights: Vec<(IdtyRight, Option<AccountId>)>, + pub status: IdtyStatus, + pub data: IdtyData, +} + +impl<AccountId, BlockNumber, IdtyData, IdtyDid, IdtyRight> + IdtyValue<AccountId, BlockNumber, IdtyData, IdtyDid, IdtyRight> +where + AccountId: Clone + Decode + Encode + TypeInfo, + BlockNumber: Decode + Encode + TypeInfo, + IdtyData: Decode + Encode + TypeInfo, + IdtyDid: Decode + Encode + TypeInfo, + IdtyRight: crate::traits::IdtyRight + Decode + Encode + TypeInfo, +{ + pub fn get_right_key(&self, right: IdtyRight) -> Option<AccountId> { + if let Ok(index) = self + .rights + .binary_search_by(|(right_, _)| right_.cmp(&right)) + { + if self.rights[index].1.is_some() { + self.rights[index].1.clone() + } else if right.allow_owner_key() { + Some(self.owner_key.clone()) + } else { + None + } + } else { + None + } + } +} diff --git a/pallets/ud-accounts-storage/Cargo.toml b/pallets/ud-accounts-storage/Cargo.toml index 3d13fa297..16eabf58b 100644 --- a/pallets/ud-accounts-storage/Cargo.toml +++ b/pallets/ud-accounts-storage/Cargo.toml @@ -21,32 +21,37 @@ std = [ ] try-runtime = ['frame-support/try-runtime'] +[dependencies] + +# substrate +scale-info = { version = "1.0", default-features = false, features = ["derive"] } + [dependencies.codec] default-features = false features = ['derive'] package = 'parity-scale-codec' -version = '2.2.0' +version = '2.3.1' [dependencies.frame-benchmarking] default-features = false -git = 'https://github.com/paritytech/substrate.git' +git = 'https://github.com/librelois/substrate.git' optional = true -tag = 'monthly-2021-08' +branch = 'duniter-monthly-2022-01' [dependencies.frame-support] default-features = false -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.frame-system] default-features = false -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.sp-std] default-features = false -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' ### DOC ### @@ -59,20 +64,20 @@ version = '1.0.119' [dev-dependencies.pallet-balances] default-features = false -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dev-dependencies.sp-core] default-features = false -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dev-dependencies.sp-io] default-features = false -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dev-dependencies.sp-runtime] default-features = false -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' diff --git a/pallets/ud-accounts-storage/src/lib.rs b/pallets/ud-accounts-storage/src/lib.rs index baa99bdf0..f318148bb 100644 --- a/pallets/ud-accounts-storage/src/lib.rs +++ b/pallets/ud-accounts-storage/src/lib.rs @@ -32,10 +32,9 @@ use sp_std::prelude::*; #[frame_support::pallet] pub mod pallet { - use sp_std::collections::btree_set::BTreeSet; - use super::*; use frame_support::pallet_prelude::*; + use scale_info::TypeInfo; // CONFIG // @@ -51,7 +50,7 @@ pub mod pallet { // A value placed in storage that represents the current version of the Balances storage. // This value is used by the `on_runtime_upgrade` logic to determine whether we run // storage migration logic. This should match directly with the semantic versions of the Rust crate. - #[derive(Encode, Decode, Clone, Copy, PartialEq, Eq, RuntimeDebug)] + #[derive(Encode, Decode, Clone, Copy, PartialEq, Eq, RuntimeDebug, TypeInfo)] pub enum Releases { V1_0_0, } @@ -77,7 +76,7 @@ pub mod pallet { #[pallet::genesis_config] pub struct GenesisConfig<T: Config> { - pub ud_accounts: BTreeSet<T::AccountId>, + pub ud_accounts: sp_std::collections::btree_set::BTreeSet<T::AccountId>, } #[cfg(feature = "std")] diff --git a/pallets/universal-dividend/Cargo.toml b/pallets/universal-dividend/Cargo.toml index 36f1ae6f2..15b446624 100644 --- a/pallets/universal-dividend/Cargo.toml +++ b/pallets/universal-dividend/Cargo.toml @@ -22,42 +22,47 @@ std = [ ] try-runtime = ['frame-support/try-runtime'] +[dependencies] + +# substrate +scale-info = { version = "1.0", default-features = false, features = ["derive"] } + [dependencies.codec] default-features = false features = ['derive'] package = 'parity-scale-codec' -version = '2.2.0' +version = '2.3.1' [dependencies.frame-benchmarking] default-features = false -git = 'https://github.com/paritytech/substrate.git' +git = 'https://github.com/librelois/substrate.git' optional = true -tag = 'monthly-2021-08' +branch = 'duniter-monthly-2022-01' [dependencies.frame-support] default-features = false -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.frame-system] default-features = false -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.sp-arithmetic] default-features = false -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.sp-io] default-features = false -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.sp-std] default-features = false -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' ### DOC ### @@ -69,8 +74,8 @@ targets = ['x86_64-unknown-linux-gnu'] [dev-dependencies.pallet-balances] default-features = false -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dev-dependencies.serde] features = ["derive"] @@ -78,15 +83,15 @@ version = '1.0.119' [dev-dependencies.sp-core] default-features = false -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dev-dependencies.sp-io] default-features = false -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dev-dependencies.sp-runtime] default-features = false -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' diff --git a/pallets/universal-dividend/src/lib.rs b/pallets/universal-dividend/src/lib.rs index 16b33fdd7..8fe5b9d82 100644 --- a/pallets/universal-dividend/src/lib.rs +++ b/pallets/universal-dividend/src/lib.rs @@ -41,6 +41,7 @@ pub mod pallet { use super::*; use frame_support::pallet_prelude::*; use frame_system::pallet_prelude::*; + use scale_info::TypeInfo; pub type BalanceOf<T> = <<T as Config>::Currency as Currency<<T as frame_system::Config>::AccountId>>::Balance; @@ -80,7 +81,7 @@ pub mod pallet { // A value placed in storage that represents the current version of the Balances storage. // This value is used by the `on_runtime_upgrade` logic to determine whether we run // storage migration logic. This should match directly with the semantic versions of the Rust crate. - #[derive(Encode, Decode, Clone, Copy, PartialEq, Eq, RuntimeDebug)] + #[derive(Encode, Decode, Clone, Copy, PartialEq, Eq, RuntimeDebug, TypeInfo)] pub enum Releases { V1_0_0, } @@ -94,7 +95,7 @@ pub mod pallet { #[pallet::storage] pub(super) type StorageVersion<T: Config> = StorageValue<_, Releases, ValueQuery>; - #[derive(Encode, Decode, Clone, Copy, PartialEq, Eq, RuntimeDebug)] + #[derive(Encode, Decode, Clone, Copy, PartialEq, Eq, RuntimeDebug, TypeInfo)] pub struct LastReeval<T: Config> { members_count: BalanceOf<T>, monetary_mass: BalanceOf<T>, @@ -175,7 +176,6 @@ pub mod pallet { // https://substrate.dev/docs/en/knowledgebase/runtime/events #[pallet::event] #[pallet::generate_deposit(pub(super) fn deposit_event)] - #[pallet::metadata(T::AccountId = "AccountId", BalanceOf<T> = "Balance")] pub enum Event<T: Config> { /// A new universal dividend is created /// [ud_amout, members_count] diff --git a/pallets/universal-dividend/src/mock.rs b/pallets/universal-dividend/src/mock.rs index 145d0dcf6..35fbe9b9d 100644 --- a/pallets/universal-dividend/src/mock.rs +++ b/pallets/universal-dividend/src/mock.rs @@ -18,7 +18,7 @@ use super::*; use crate::{self as pallet_universal_dividend}; use frame_support::{ parameter_types, - traits::{AllowAll, Get, OnFinalize, OnInitialize}, + traits::{Everything, Get, OnFinalize, OnInitialize}, }; use frame_system as system; use sp_core::H256; @@ -52,7 +52,7 @@ parameter_types! { } impl system::Config for Test { - type BaseCallFilter = AllowAll; + type BaseCallFilter = Everything; type BlockWeights = (); type BlockLength = (); type DbWeight = (); diff --git a/runtime/common/Cargo.toml b/runtime/common/Cargo.toml index 9767f45ca..798430382 100644 --- a/runtime/common/Cargo.toml +++ b/runtime/common/Cargo.toml @@ -35,21 +35,24 @@ pallet-identity = { path = '../../pallets/identity', default-features = false } pallet-ud-accounts-storage = { path = '../../pallets/ud-accounts-storage', default-features = false } smallvec = "1.6.1" +# substrate +scale-info = { version = "1.0", default-features = false, features = ["derive"] } + [dependencies.codec] default-features = false features = ['derive'] package = 'parity-scale-codec' -version = '2.2.0' +version = '2.3.1' [dependencies.frame-support] default-features = false -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.frame-system] default-features = false -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.serde] version = "1.0.101" @@ -58,20 +61,20 @@ features = ["derive"] [dependencies.sp-arithmetic] default-features = false -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.sp-core] default-features = false -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.sp-runtime] default-features = false -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.sp-std] default-features = false -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' diff --git a/runtime/common/src/apis.rs b/runtime/common/src/apis.rs index d7eeff45d..dba0901a1 100644 --- a/runtime/common/src/apis.rs +++ b/runtime/common/src/apis.rs @@ -36,7 +36,7 @@ macro_rules! runtime_apis { impl sp_api::Metadata<Block> for Runtime { fn metadata() -> OpaqueMetadata { - Runtime::metadata().into() + OpaqueMetadata::new(Runtime::metadata().into()) } } @@ -96,6 +96,10 @@ macro_rules! runtime_apis { Grandpa::grandpa_authorities() } + fn current_set_id() -> fg_primitives::SetId { + Grandpa::current_set_id() + } + fn submit_report_equivocation_unsigned_extrinsic( _equivocation_proof: fg_primitives::EquivocationProof< <Block as BlockT>::Hash, diff --git a/runtime/common/src/authorizations.rs b/runtime/common/src/authorizations.rs index 4a4a6e591..f4c286882 100644 --- a/runtime/common/src/authorizations.rs +++ b/runtime/common/src/authorizations.rs @@ -18,10 +18,11 @@ use crate::entities::{IdtyData, IdtyDid, IdtyRight}; use crate::{BlockNumber, IdtyIndex}; use frame_support::pallet_prelude::DispatchError; use frame_support::traits::EnsureOrigin; +use pallet_certification::traits::IsIdtyAllowedToCreateCert; use pallet_identity::IdtyStatus; -pub struct EnsureIdtyCallAllowedImpl<Runtime, const IDTY_CREATE_PERIOD: BlockNumber>( - core::marker::PhantomData<Runtime>, +pub struct EnsureIdtyCallAllowedImpl<Runtime, IsIdtyAllowedToCreateCertImpl>( + core::marker::PhantomData<(Runtime, IsIdtyAllowedToCreateCertImpl)>, ); impl< Runtime: frame_system::Config<BlockNumber = BlockNumber> @@ -30,47 +31,46 @@ impl< IdtyDid = IdtyDid, IdtyIndex = IdtyIndex, IdtyRight = IdtyRight, - > + pallet_certification::Config<IdtyIndex = IdtyIndex>, - const IDTY_CREATE_PERIOD: BlockNumber, + >, + IsIdtyAllowedToCreateCertImpl: IsIdtyAllowedToCreateCert<IdtyIndex>, > pallet_identity::traits::EnsureIdtyCallAllowed<Runtime> - for EnsureIdtyCallAllowedImpl<Runtime, IDTY_CREATE_PERIOD> + for EnsureIdtyCallAllowedImpl<Runtime, IsIdtyAllowedToCreateCertImpl> { - fn create_identity( + fn can_create_identity( origin: Runtime::Origin, creator: IdtyIndex, _idty_did: &IdtyDid, _idty_owner_key: &Runtime::AccountId, - ) -> Result<IdtyData, DispatchError> { - let block_number = frame_system::Pallet::<Runtime>::block_number(); - let creator_idty_data = IdtyData { - can_create_on: block_number + IDTY_CREATE_PERIOD, - }; - let new_idty_data = IdtyData { can_create_on: 0 }; + ) -> Result<(), DispatchError> { match origin.into() { - Ok(frame_system::RawOrigin::Root) => { - pallet_identity::Pallet::<Runtime>::set_idty_data(creator, creator_idty_data); - Ok(new_idty_data) - } + Ok(frame_system::RawOrigin::Root) => Ok(()), Ok(frame_system::RawOrigin::Signed(signer)) => { - let creator_idty = pallet_identity::Pallet::<Runtime>::identity(creator); - - if let Some(authorized_key) = creator_idty.get_right_key(IdtyRight::CreateIdty) { - if signer != authorized_key { - frame_support::runtime_print!("signer != authorized_key"); - Err(DispatchError::Other("signer != authorized_key")) - } else if !pallet_certification::Pallet::<Runtime>::is_idty_allowed_to_create_cert(creator) { - frame_support::runtime_print!("not allowed to create cert"); - Err(DispatchError::Other("not allowed to create cert")) - } else if creator_idty.data.can_create_on > frame_system::Pallet::<Runtime>::block_number() { - frame_support::runtime_print!("Not respect IdtyCreatePeriod"); - Err(DispatchError::Other("Not respect IdtyCreatePeriod")) + if let Some(creator_idty) = pallet_identity::Pallet::<Runtime>::identity(creator) { + if let Some(authorized_key) = creator_idty.get_right_key(IdtyRight::CreateIdty) + { + if signer != authorized_key { + frame_support::runtime_print!("signer != authorized_key"); + Err(DispatchError::Other("signer != authorized_key")) + } else if !IsIdtyAllowedToCreateCertImpl::is_idty_allowed_to_create_cert( + creator, + ) { + frame_support::runtime_print!("not allowed to create cert"); + Err(DispatchError::Other("not allowed to create cert")) + } else if creator_idty.data.can_create_on + > frame_system::Pallet::<Runtime>::block_number() + { + frame_support::runtime_print!("Not respect IdtyCreatePeriod"); + Err(DispatchError::Other("Not respect IdtyCreatePeriod")) + } else { + Ok(()) + } } else { - pallet_identity::Pallet::<Runtime>::set_idty_data(creator, creator_idty_data); - Ok(new_idty_data) + frame_support::runtime_print!("Idty not have right CreateIdty"); + Err(DispatchError::Other("Idty not have right CreateIdty")) } } else { - frame_support::runtime_print!("Idty not have right CreateIdty"); - Err(DispatchError::Other("Idty not have right CreateIdty")) + frame_support::runtime_print!("Idty not found"); + Err(DispatchError::Other("Idty not found")) } } _ => { @@ -93,20 +93,30 @@ impl<Runtime: pallet_identity::Config<IdtyIndex = IdtyIndex, IdtyRight = IdtyRig match o.0.clone().into() { Ok(frame_system::RawOrigin::Root) => Ok(()), Ok(frame_system::RawOrigin::Signed(who)) => { - let issuer = pallet_identity::Pallet::<Runtime>::identity(o.1); - if let Some(allowed_key) = issuer.get_right_key(IdtyRight::StrongCert) { - if who == allowed_key { - let receiver = pallet_identity::Pallet::<Runtime>::identity(o.2); - match receiver.status { - IdtyStatus::ConfirmedByOwner | IdtyStatus::Validated => Ok(()), - IdtyStatus::Created | IdtyStatus::Expired => Err(o), + if let Some(issuer) = pallet_identity::Pallet::<Runtime>::identity(o.1) { + if let Some(allowed_key) = issuer.get_right_key(IdtyRight::StrongCert) { + if who == allowed_key { + if let Some(receiver) = + pallet_identity::Pallet::<Runtime>::identity(o.2) + { + match receiver.status { + IdtyStatus::ConfirmedByOwner | IdtyStatus::Validated => Ok(()), + IdtyStatus::Created | IdtyStatus::Expired => Err(o), + } + } else { + // Receiver not found + Err(o) + } + } else { + // Bad key + Err(o) } } else { - // Bad key + // Issuer has not right StrongCert Err(o) } } else { - // Issuer has not right StrongCert + // Issuer not found Err(o) } } diff --git a/runtime/common/src/entities.rs b/runtime/common/src/entities.rs index d0442983d..877ab4dab 100644 --- a/runtime/common/src/entities.rs +++ b/runtime/common/src/entities.rs @@ -16,12 +16,13 @@ use crate::BlockNumber; use frame_support::pallet_prelude::*; +use scale_info::TypeInfo; #[cfg(feature = "std")] use serde::{Deserialize, Serialize}; use sp_core::H256; #[cfg_attr(feature = "std", derive(Deserialize, Serialize))] -#[derive(Encode, Decode, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, RuntimeDebug)] +#[derive(Encode, Decode, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, RuntimeDebug, TypeInfo)] pub enum IdtyRight { CreateIdty, LightCert, @@ -41,10 +42,13 @@ impl pallet_identity::traits::IdtyRight for IdtyRight { //_ => false, } } + fn create_idty_right() -> Self { + Self::CreateIdty + } } #[cfg_attr(feature = "std", derive(Deserialize, Serialize))] -#[derive(Encode, Decode, Default, Clone, Copy, PartialEq, Eq, RuntimeDebug)] +#[derive(Encode, Decode, Default, Clone, Copy, PartialEq, Eq, RuntimeDebug, TypeInfo)] pub struct IdtyDid { pub hash: H256, pub planet: Planet, @@ -86,13 +90,13 @@ impl Ord for IdtyDid { impl pallet_identity::traits::IdtyDid for IdtyDid {} #[cfg_attr(feature = "std", derive(Deserialize, Serialize))] -#[derive(Encode, Decode, Default, Clone, Copy, PartialEq, Eq, RuntimeDebug)] +#[derive(Encode, Decode, Default, Clone, Copy, PartialEq, Eq, RuntimeDebug, TypeInfo)] pub struct IdtyData { pub can_create_on: BlockNumber, } #[cfg_attr(feature = "std", derive(Deserialize, Serialize))] -#[derive(Encode, Decode, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, RuntimeDebug)] +#[derive(Encode, Decode, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, RuntimeDebug, TypeInfo)] pub enum Planet { Earth, } diff --git a/runtime/common/src/handlers.rs b/runtime/common/src/handlers.rs index ce0e11543..47797dfdd 100644 --- a/runtime/common/src/handlers.rs +++ b/runtime/common/src/handlers.rs @@ -15,23 +15,23 @@ // along with Substrate-Libre-Currency. If not, see <https://www.gnu.org/licenses/>. use crate::entities::IdtyRight; +use frame_support::instances::Instance1; use frame_support::weights::Weight; use pallet_identity::traits::IdtyEvent; -type IdtyIndex<T> = <T as pallet_identity::Config>::IdtyIndex; - pub struct OnIdtyChangeHandler<Runtime>(core::marker::PhantomData<Runtime>); impl< - II, - Runtime: pallet_identity::Config<IdtyIndex = II> + pallet_certification::Config<IdtyIndex = II>, + IdtyIndex, + Runtime: pallet_identity::Config<IdtyIndex = IdtyIndex> + + pallet_certification::Config<Instance1, IdtyIndex = IdtyIndex>, > pallet_identity::traits::OnIdtyChange<Runtime> for OnIdtyChangeHandler<Runtime> { - fn on_idty_change(idty_index: IdtyIndex<Runtime>, idty_event: IdtyEvent<Runtime>) -> Weight { + fn on_idty_change(idty_index: IdtyIndex, idty_event: IdtyEvent<Runtime>) -> Weight { let total_weight = 0; match idty_event { IdtyEvent::Created { creator } => { // totad_weight += StrongCert::WeightInfo::add_cert(); - let _ = <pallet_certification::Pallet<Runtime>>::add_cert( + let _ = <pallet_certification::Pallet<Runtime, Instance1>>::add_cert( frame_system::Origin::<Runtime>::Root.into(), creator, idty_index, @@ -48,11 +48,13 @@ impl< pub struct OnRightKeyChangeHandler<Runtime>(core::marker::PhantomData<Runtime>); impl< - Runtime: pallet_identity::Config<IdtyRight = IdtyRight> + pallet_ud_accounts_storage::Config, + IdtyIndex, + Runtime: pallet_identity::Config<IdtyIndex = IdtyIndex, IdtyRight = IdtyRight> + + pallet_ud_accounts_storage::Config, > pallet_identity::traits::OnRightKeyChange<Runtime> for OnRightKeyChangeHandler<Runtime> { fn on_right_key_change( - _idty_index: IdtyIndex<Runtime>, + _idty_index: IdtyIndex, right: Runtime::IdtyRight, old_key_opt: Option<Runtime::AccountId>, new_key_opt: Option<Runtime::AccountId>, @@ -75,16 +77,17 @@ pub struct OnNewStrongCertHandler< const MIN_STRONG_CERT_FOR_STRONG_CERT: u32, >(core::marker::PhantomData<Runtime>); impl< - Runtime: pallet_identity::Config<IdtyRight = IdtyRight>, + IdtyIndex, + Runtime: pallet_identity::Config<IdtyIndex = IdtyIndex, IdtyRight = IdtyRight>, const MIN_STRONG_CERT_FOR_UD: u32, const MIN_STRONG_CERT_FOR_STRONG_CERT: u32, - > pallet_certification::traits::OnNewcert<IdtyIndex<Runtime>> + > pallet_certification::traits::OnNewcert<IdtyIndex> for OnNewStrongCertHandler<Runtime, MIN_STRONG_CERT_FOR_UD, MIN_STRONG_CERT_FOR_STRONG_CERT> { fn on_new_cert( - _issuer: IdtyIndex<Runtime>, + _issuer: IdtyIndex, _issuer_issued_count: u8, - receiver: IdtyIndex<Runtime>, + receiver: IdtyIndex, receiver_received_count: u32, ) -> frame_support::dispatch::Weight { let total_weight = 0; @@ -111,15 +114,16 @@ pub struct OnRemovedStrongCertHandler<Runtime, const MIN_STRONG_CERT_FOR_UD: u32 core::marker::PhantomData<Runtime>, ); impl< - Runtime: pallet_identity::Config<IdtyRight = IdtyRight>, + IdtyIndex, + Runtime: pallet_identity::Config<IdtyIndex = IdtyIndex, IdtyRight = IdtyRight>, const MIN_STRONG_CERT_FOR_UD: u32, - > pallet_certification::traits::OnRemovedCert<IdtyIndex<Runtime>> + > pallet_certification::traits::OnRemovedCert<IdtyIndex> for OnRemovedStrongCertHandler<Runtime, MIN_STRONG_CERT_FOR_UD> { fn on_removed_cert( - _issuer: IdtyIndex<Runtime>, + _issuer: IdtyIndex, _issuer_issued_count: u8, - receiver: IdtyIndex<Runtime>, + receiver: IdtyIndex, receiver_received_count: u32, _expiration: bool, ) -> frame_support::dispatch::Weight { diff --git a/runtime/common/src/pallets_config.rs b/runtime/common/src/pallets_config.rs index 32e6e4c4e..bbd1ac537 100644 --- a/runtime/common/src/pallets_config.rs +++ b/runtime/common/src/pallets_config.rs @@ -21,7 +21,7 @@ macro_rules! pallets_config { impl frame_system::Config for Runtime { /// The basic call filter to use in dispatchable. - type BaseCallFilter = frame_support::traits::AllowAll; + type BaseCallFilter = frame_support::traits::Everything; /// Block & extrinsics weights: base values and limits. type BlockWeights = BlockWeights; /// The maximum length of a block (in bytes). @@ -68,6 +68,7 @@ macro_rules! pallets_config { type SS58Prefix = SS58Prefix; /// The set code logic, just the default since we're not a parachain. type OnSetCode = (); + type MaxConsumers = frame_support::traits::ConstU32<16>; } impl pallet_grandpa::Config for Runtime { @@ -87,6 +88,8 @@ macro_rules! pallets_config { type HandleEquivocation = (); type WeightInfo = (); + + type MaxAuthorities = MaxAuthorities; } impl pallet_balances::Config for Runtime { @@ -106,6 +109,7 @@ macro_rules! pallets_config { impl pallet_transaction_payment::Config for Runtime { type OnChargeTransaction = CurrencyAdapter<Balances, ()>; type TransactionByteFee = TransactionByteFee; + type OperationalFeeMultiplier = frame_support::traits::ConstU8<5>; type WeightToFee = common_runtime::fees::WeightToFeeImpl<Balance>; type FeeMultiplierUpdate = (); } @@ -115,7 +119,8 @@ macro_rules! pallets_config { type Event = Event; type AddRightOrigin = EnsureRoot<Self::AccountId>; type DelRightOrigin = EnsureRoot<Self::AccountId>; - type EnsureIdtyCallAllowed = EnsureIdtyCallAllowedImpl<Runtime, IDTY_CREATE_PERIOD>; + type EnsureIdtyCallAllowed = EnsureIdtyCallAllowedImpl<Runtime, StrongCert>; + type IdtyDataProvider = IdtyDataProvider<Runtime, IDTY_CREATE_PERIOD>; type IdtyData = IdtyData; type IdtyDid = IdtyDid; type IdtyIndex = IdtyIndex; @@ -129,7 +134,7 @@ macro_rules! pallets_config { type ValidationPeriod = ValidationPeriod; } - impl pallet_certification::Config for Runtime { + impl pallet_certification::Config<frame_support::instances::Instance1> for Runtime { type AddCertOrigin = AddStrongCertOrigin<Runtime>; type CertPeriod = CertPeriod; type DelCertOrigin = DelStrongCertOrigin<Runtime>; @@ -139,7 +144,7 @@ macro_rules! pallets_config { type OnNewcert = OnNewStrongCertHandler<Runtime, MIN_STRONG_CERT_FOR_UD, MIN_STRONG_CERT_FOR_STRONG_CERT>; type OnRemovedCert = OnRemovedStrongCertHandler<Runtime, MIN_STRONG_CERT_FOR_UD>; - type RenewablePeriod = StrongCertRenewablePeriod; + type CertRenewablePeriod = StrongCertRenewablePeriod; type ValidityPeriod = ValidityPeriod; } diff --git a/runtime/common/src/providers.rs b/runtime/common/src/providers.rs index 1f49810e9..73ba6e9bf 100644 --- a/runtime/common/src/providers.rs +++ b/runtime/common/src/providers.rs @@ -14,10 +14,35 @@ // You should have received a copy of the GNU Affero General Public License // along with Substrate-Libre-Currency. If not, see <https://www.gnu.org/licenses/>. -use crate::AccountId; +use crate::entities::{IdtyData, IdtyDid}; +use crate::{AccountId, BlockNumber, IdtyIndex}; use frame_support::traits::Get; use sp_std::vec::Vec; +pub struct IdtyDataProvider<Runtime, const IDTY_CREATE_PERIOD: BlockNumber>( + core::marker::PhantomData<Runtime>, +); +impl<Runtime, const IDTY_CREATE_PERIOD: BlockNumber> + pallet_identity::traits::ProvideIdtyData<Runtime> + for IdtyDataProvider<Runtime, IDTY_CREATE_PERIOD> +where + Runtime: frame_system::Config<AccountId = AccountId, BlockNumber = BlockNumber> + + pallet_identity::Config<IdtyData = IdtyData, IdtyDid = IdtyDid, IdtyIndex = IdtyIndex>, +{ + fn provide_identity_data( + creator: IdtyIndex, + _idty_did: &IdtyDid, + _idty_owner_key: &AccountId, + ) -> IdtyData { + let block_number = frame_system::Pallet::<Runtime>::block_number(); + let creator_idty_data = IdtyData { + can_create_on: block_number + IDTY_CREATE_PERIOD, + }; + pallet_identity::Pallet::<Runtime>::set_idty_data(creator, creator_idty_data); + Default::default() + } +} + pub struct UdAccountsProvider<Runtime>(core::marker::PhantomData<Runtime>); impl<Runtime: pallet_ud_accounts_storage::Config> Get<u64> for UdAccountsProvider<Runtime> { fn get() -> u64 { diff --git a/runtime/g1/Cargo.toml b/runtime/g1/Cargo.toml index 65ab2ec78..815112a98 100644 --- a/runtime/g1/Cargo.toml +++ b/runtime/g1/Cargo.toml @@ -1,6 +1,6 @@ [build-dependencies.substrate-wasm-builder] -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [package] authors = ['Axiom-Team Developers <https://axiom-team.fr>'] @@ -66,43 +66,46 @@ pallet-ud-accounts-storage = { path = '../../pallets/ud-accounts-storage', defau pallet-universal-dividend = { path = '../../pallets/universal-dividend', default-features = false } common-runtime = { path = "../common", default-features = false } +# substrate +scale-info = { version = "1.0", default-features = false, features = ["derive"] } + [dependencies.codec] default-features = false features = ['derive'] package = 'parity-scale-codec' -version = '2.2.0' +version = '2.3.1' [dependencies.frame-benchmarking] default-features = false -git = 'https://github.com/paritytech/substrate.git' +git = 'https://github.com/librelois/substrate.git' optional = true -tag = 'monthly-2021-08' +branch = 'duniter-monthly-2022-01' [dependencies.frame-executive] default-features = false -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.frame-support] default-features = false -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.frame-system] default-features = false -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.frame-system-benchmarking] default-features = false -git = 'https://github.com/paritytech/substrate.git' +git = 'https://github.com/librelois/substrate.git' optional = true -tag = 'monthly-2021-08' +branch = 'duniter-monthly-2022-01' [dependencies.frame-system-rpc-runtime-api] default-features = false -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.hex-literal] optional = true @@ -110,43 +113,43 @@ version = '0.3.1' [dependencies.pallet-aura] default-features = false -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.pallet-balances] default-features = false -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.pallet-grandpa] default-features = false -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.pallet-randomness-collective-flip] default-features = false -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.pallet-sudo] default-features = false -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.pallet-timestamp] default-features = false -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.pallet-transaction-payment] default-features = false -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.pallet-transaction-payment-rpc-runtime-api] default-features = false -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.serde] version = "1.0.101" @@ -158,60 +161,60 @@ version = "1.6.1" [dependencies.sp-api] default-features = false -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.sp-arithmetic] default-features = false -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.sp-block-builder] default-features = false -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.sp-consensus-aura] default-features = false -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.sp-core] default-features = false -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.sp-inherents] default-features = false -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.sp-offchain] default-features = false -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.sp-runtime] default-features = false -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.sp-session] default-features = false -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.sp-std] default-features = false -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.sp-transaction-pool] default-features = false -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.sp-version] default-features = false -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' diff --git a/runtime/g1/src/lib.rs b/runtime/g1/src/lib.rs index 2b756140a..225834450 100644 --- a/runtime/g1/src/lib.rs +++ b/runtime/g1/src/lib.rs @@ -45,6 +45,7 @@ use common_runtime::{ OnIdtyChangeHandler, OnNewStrongCertHandler, OnRemovedStrongCertHandler, OnRightKeyChangeHandler, }, + providers::IdtyDataProvider, }; use frame_system::EnsureRoot; use pallet_grandpa::fg_primitives; @@ -104,6 +105,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { impl_version: 1, apis: RUNTIME_API_VERSIONS, transaction_version: 1, + state_version: 1, }; /// The version information used to identify this runtime when compiled natively. @@ -131,6 +133,8 @@ common_runtime::pallets_config! { impl pallet_randomness_collective_flip::Config for Runtime {} impl pallet_aura::Config for Runtime { type AuthorityId = sp_consensus_aura::sr25519::AuthorityId; + type DisabledValidators = (); + type MaxAuthorities = frame_support::pallet_prelude::ConstU32<32>; } impl pallet_timestamp::Config for Runtime { /// A timestamp: milliseconds since the unix epoch. @@ -163,7 +167,7 @@ construct_runtime!( UdAccountsStorage: pallet_ud_accounts_storage::{Pallet, Config<T>, Storage}, UniversalDividend: pallet_universal_dividend::{Pallet, Config<T>, Storage, Event<T>}, Identity: pallet_identity::{Pallet, Call, Config<T>, Storage, Event<T>}, - StrongCert: pallet_certification::{Pallet, Call, Config<T>, Storage, Event<T>}, + StrongCert: pallet_certification::<Instance1>::{Pallet, Call, Config<T>, Storage, Event<T>}, } ); @@ -187,7 +191,7 @@ pub type Executive = frame_executive::Executive< Block, frame_system::ChainContext<Runtime>, Runtime, - AllPallets, + AllPalletsWithSystem, >; // All of our runtimes share most of their Runtime API implementations. @@ -207,7 +211,7 @@ common_runtime::runtime_apis! { } fn authorities() -> Vec<sp_consensus_aura::sr25519::AuthorityId> { - Aura::authorities() + Aura::authorities().into_inner() } } } diff --git a/runtime/g1/src/parameters.rs b/runtime/g1/src/parameters.rs index 3738ac605..a3fa2e656 100644 --- a/runtime/g1/src/parameters.rs +++ b/runtime/g1/src/parameters.rs @@ -24,6 +24,11 @@ parameter_types! { pub const MinimumPeriod: u64 = SLOT_DURATION / 2; } +// Consensus +parameter_types! { + pub const MaxAuthorities: u32 = 100; +} + // Balances frame_support::parameter_types! { pub const ExistentialDeposit: Balance = 500; diff --git a/runtime/gdev/Cargo.toml b/runtime/gdev/Cargo.toml index 121e82af6..973ed82ea 100644 --- a/runtime/gdev/Cargo.toml +++ b/runtime/gdev/Cargo.toml @@ -1,6 +1,6 @@ [build-dependencies.substrate-wasm-builder] -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [package] authors = ['Axiom-Team Developers <https://axiom-team.fr>'] @@ -67,43 +67,46 @@ pallet-ud-accounts-storage = { path = '../../pallets/ud-accounts-storage', defau pallet-universal-dividend = { path = '../../pallets/universal-dividend', default-features = false } common-runtime = { path = "../common", default-features = false } +# substrate +scale-info = { version = "1.0", default-features = false, features = ["derive"] } + [dependencies.codec] default-features = false features = ['derive'] package = 'parity-scale-codec' -version = '2.2.0' +version = '2.3.1' [dependencies.frame-benchmarking] default-features = false -git = 'https://github.com/paritytech/substrate.git' +git = 'https://github.com/librelois/substrate.git' optional = true -tag = 'monthly-2021-08' +branch = 'duniter-monthly-2022-01' [dependencies.frame-executive] default-features = false -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.frame-support] default-features = false -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.frame-system] default-features = false -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.frame-system-benchmarking] default-features = false -git = 'https://github.com/paritytech/substrate.git' +git = 'https://github.com/librelois/substrate.git' optional = true -tag = 'monthly-2021-08' +branch = 'duniter-monthly-2022-01' [dependencies.frame-system-rpc-runtime-api] default-features = false -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.hex-literal] optional = true @@ -111,43 +114,43 @@ version = '0.3.1' [dependencies.pallet-aura] default-features = false -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.pallet-balances] default-features = false -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.pallet-grandpa] default-features = false -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.pallet-multisig] default-features = false -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.pallet-randomness-collective-flip] default-features = false -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.pallet-sudo] default-features = false -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.pallet-transaction-payment] default-features = false -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.pallet-transaction-payment-rpc-runtime-api] default-features = false -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.serde] version = "1.0.101" @@ -156,60 +159,60 @@ features = ["derive"] [dependencies.sp-api] default-features = false -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.sp-arithmetic] default-features = false -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.sp-block-builder] default-features = false -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.sp-consensus-aura] default-features = false -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.sp-core] default-features = false -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.sp-inherents] default-features = false -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.sp-offchain] default-features = false -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.sp-runtime] default-features = false -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.sp-session] default-features = false -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.sp-std] default-features = false -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.sp-transaction-pool] default-features = false -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.sp-version] default-features = false -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' diff --git a/runtime/gdev/src/lib.rs b/runtime/gdev/src/lib.rs index 2b3479c1f..5b3bb50ea 100644 --- a/runtime/gdev/src/lib.rs +++ b/runtime/gdev/src/lib.rs @@ -44,6 +44,7 @@ use common_runtime::{ OnIdtyChangeHandler, OnNewStrongCertHandler, OnRemovedStrongCertHandler, OnRightKeyChangeHandler, }, + providers::IdtyDataProvider, }; use frame_system::EnsureRoot; use pallet_grandpa::fg_primitives; @@ -102,6 +103,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { impl_version: 1, apis: RUNTIME_API_VERSIONS, transaction_version: 1, + state_version: 1, }; /// The version information used to identify this runtime when compiled natively. @@ -161,7 +163,7 @@ construct_runtime!( UdAccountsStorage: pallet_ud_accounts_storage::{Pallet, Config<T>, Storage}, UniversalDividend: pallet_universal_dividend::{Pallet, Config<T>, Storage, Event<T>}, Identity: pallet_identity::{Pallet, Call, Config<T>, Storage, Event<T>}, - StrongCert: pallet_certification::{Pallet, Call, Config<T>, Storage, Event<T>}, + StrongCert: pallet_certification::<Instance1>::{Pallet, Call, Config<T>, Storage, Event<T>}, } ); @@ -185,7 +187,7 @@ pub type Executive = frame_executive::Executive< Block, frame_system::ChainContext<Runtime>, Runtime, - AllPallets, + AllPalletsWithSystem, >; // All of our runtimes share most of their Runtime API implementations. @@ -205,7 +207,7 @@ common_runtime::runtime_apis! { } fn authorities() -> Vec<sp_consensus_aura::sr25519::AuthorityId> { - Vec::with_capacity(0) + vec![] } } } diff --git a/runtime/gdev/src/parameters.rs b/runtime/gdev/src/parameters.rs index 8e44733c2..870995e9d 100644 --- a/runtime/gdev/src/parameters.rs +++ b/runtime/gdev/src/parameters.rs @@ -25,6 +25,11 @@ frame_support::parameter_types! { pub const MaxLocks: u32 = 50; } +// Consensus +parameter_types! { + pub const MaxAuthorities: u32 = 10; +} + // Transaction payment frame_support::parameter_types! { pub const TransactionByteFee: Balance = 0; diff --git a/runtime/gtest/Cargo.toml b/runtime/gtest/Cargo.toml index ded9a387b..6bc6f3a04 100644 --- a/runtime/gtest/Cargo.toml +++ b/runtime/gtest/Cargo.toml @@ -1,6 +1,6 @@ [build-dependencies.substrate-wasm-builder] -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [package] authors = ['Axiom-Team Developers <https://axiom-team.fr>'] @@ -66,43 +66,46 @@ pallet-ud-accounts-storage = { path = '../../pallets/ud-accounts-storage', defau pallet-universal-dividend = { path = '../../pallets/universal-dividend', default-features = false } common-runtime = { path = "../common", default-features = false } +# substrate +scale-info = { version = "1.0", default-features = false, features = ["derive"] } + [dependencies.codec] default-features = false features = ['derive'] package = 'parity-scale-codec' -version = '2.2.0' +version = '2.3.1' [dependencies.frame-benchmarking] default-features = false -git = 'https://github.com/paritytech/substrate.git' +git = 'https://github.com/librelois/substrate.git' optional = true -tag = 'monthly-2021-08' +branch = 'duniter-monthly-2022-01' [dependencies.frame-executive] default-features = false -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.frame-support] default-features = false -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.frame-system] default-features = false -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.frame-system-benchmarking] default-features = false -git = 'https://github.com/paritytech/substrate.git' +git = 'https://github.com/librelois/substrate.git' optional = true -tag = 'monthly-2021-08' +branch = 'duniter-monthly-2022-01' [dependencies.frame-system-rpc-runtime-api] default-features = false -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.hex-literal] optional = true @@ -110,43 +113,43 @@ version = '0.3.1' [dependencies.pallet-aura] default-features = false -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.pallet-balances] default-features = false -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.pallet-grandpa] default-features = false -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.pallet-randomness-collective-flip] default-features = false -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.pallet-sudo] default-features = false -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.pallet-timestamp] default-features = false -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.pallet-transaction-payment] default-features = false -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.pallet-transaction-payment-rpc-runtime-api] default-features = false -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.serde] version = "1.0.101" @@ -158,60 +161,60 @@ version = "1.6.1" [dependencies.sp-api] default-features = false -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.sp-arithmetic] default-features = false -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.sp-block-builder] default-features = false -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.sp-consensus-aura] default-features = false -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.sp-core] default-features = false -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.sp-inherents] default-features = false -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.sp-offchain] default-features = false -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.sp-runtime] default-features = false -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.sp-session] default-features = false -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.sp-std] default-features = false -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.sp-transaction-pool] default-features = false -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' [dependencies.sp-version] default-features = false -git = 'https://github.com/paritytech/substrate.git' -tag = 'monthly-2021-08' +git = 'https://github.com/librelois/substrate.git' +branch = 'duniter-monthly-2022-01' diff --git a/runtime/gtest/src/lib.rs b/runtime/gtest/src/lib.rs index 226c258f7..c6af1214f 100644 --- a/runtime/gtest/src/lib.rs +++ b/runtime/gtest/src/lib.rs @@ -45,6 +45,7 @@ use common_runtime::{ OnIdtyChangeHandler, OnNewStrongCertHandler, OnRemovedStrongCertHandler, OnRightKeyChangeHandler, }, + providers::IdtyDataProvider, }; use frame_system::EnsureRoot; use pallet_grandpa::fg_primitives; @@ -104,6 +105,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { impl_version: 1, apis: RUNTIME_API_VERSIONS, transaction_version: 1, + state_version: 1, }; /// The version information used to identify this runtime when compiled natively. @@ -131,6 +133,8 @@ common_runtime::pallets_config! { impl pallet_randomness_collective_flip::Config for Runtime {} impl pallet_aura::Config for Runtime { type AuthorityId = sp_consensus_aura::sr25519::AuthorityId; + type DisabledValidators = (); + type MaxAuthorities = frame_support::pallet_prelude::ConstU32<32>; } impl pallet_timestamp::Config for Runtime { /// A timestamp: milliseconds since the unix epoch. @@ -163,7 +167,7 @@ construct_runtime!( UdAccountsStorage: pallet_ud_accounts_storage::{Pallet, Config<T>, Storage}, UniversalDividend: pallet_universal_dividend::{Pallet, Config<T>, Storage, Event<T>}, Identity: pallet_identity::{Pallet, Call, Config<T>, Storage, Event<T>}, - StrongCert: pallet_certification::{Pallet, Call, Config<T>, Storage, Event<T>}, + StrongCert: pallet_certification::<Instance1>::{Pallet, Call, Config<T>, Storage, Event<T>}, } ); @@ -187,7 +191,7 @@ pub type Executive = frame_executive::Executive< Block, frame_system::ChainContext<Runtime>, Runtime, - AllPallets, + AllPalletsWithSystem, >; // All of our runtimes share most of their Runtime API implementations. @@ -207,7 +211,7 @@ common_runtime::runtime_apis! { } fn authorities() -> Vec<sp_consensus_aura::sr25519::AuthorityId> { - Aura::authorities() + Aura::authorities().into_inner() } } } diff --git a/runtime/gtest/src/parameters.rs b/runtime/gtest/src/parameters.rs index 4b44b7081..3247e21bb 100644 --- a/runtime/gtest/src/parameters.rs +++ b/runtime/gtest/src/parameters.rs @@ -24,6 +24,11 @@ parameter_types! { pub const MinimumPeriod: u64 = SLOT_DURATION / 2; } +// Consensus +parameter_types! { + pub const MaxAuthorities: u32 = 32; +} + // Balances frame_support::parameter_types! { pub const ExistentialDeposit: Balance = 500; diff --git a/rust-toolchain b/rust-toolchain index e29d5e616..0f5159104 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -1,5 +1,5 @@ [toolchain] -channel = "nightly-2021-02-24" +channel = "nightly-2021-09-10" components = [ "rustfmt", "clippy" ] targets = [ "wasm32-unknown-unknown" ] -profile = "minimal" \ No newline at end of file +profile = "minimal" -- GitLab