From b8df7b84512172e5122b328367b99648eba4e5e3 Mon Sep 17 00:00:00 2001 From: Daniel Date: Mon, 9 May 2022 09:55:43 +0200 Subject: [PATCH 01/33] feat: state chain upgraded to substrate 2022-05 Old substrate version: monthly-2021-09+1 New substrate version: monthly-2022-05 Main change: TypeInfo added to all storage types. See https://github.com/paritytech/substrate/releases for a full list of changes. --- Cargo.lock | 5778 ++++++++++------- engine/Cargo.toml | 28 +- engine/cli/Cargo.toml | 6 +- engine/insert-genesis-keyshare/Cargo.toml | 2 +- engine/src/multisig_p2p.rs | 12 +- engine/src/state_chain/client.rs | 38 +- state-chain/README.md | 26 +- state-chain/cf-integration-tests/Cargo.toml | 52 +- state-chain/chains/Cargo.toml | 24 +- state-chain/chains/src/eth.rs | 51 +- state-chain/chains/src/eth/api.rs | 19 +- .../chains/src/eth/api/register_claim.rs | 33 +- .../src/eth/api/set_agg_key_with_agg_key.rs | 18 +- .../chains/src/eth/api/update_flip_supply.rs | 30 +- state-chain/chains/src/lib.rs | 23 +- state-chain/custom-rpc/Cargo.toml | 10 +- state-chain/doc/rust-setup.md | 81 - state-chain/{doc => docs}/docker-compose.md | 21 +- state-chain/docs/rust-setup.md | 217 + state-chain/multisig-p2p-transport/Cargo.toml | 10 +- state-chain/multisig-p2p-transport/src/lib.rs | 54 +- state-chain/node/Cargo.toml | 179 +- state-chain/node/src/chain_spec.rs | 10 +- state-chain/node/src/cli.rs | 14 +- state-chain/node/src/command.rs | 68 +- state-chain/node/src/command_helper.rs | 131 + state-chain/node/src/main.rs | 1 + state-chain/node/src/service.rs | 193 +- state-chain/pallets/cf-auction/Cargo.toml | 18 +- .../pallets/cf-auction/src/benchmarking.rs | 6 +- state-chain/pallets/cf-auction/src/lib.rs | 1 + state-chain/pallets/cf-broadcast/Cargo.toml | 18 +- state-chain/pallets/cf-broadcast/src/lib.rs | 23 +- state-chain/pallets/cf-emissions/Cargo.toml | 20 +- .../pallets/cf-emissions/src/benchmarking.rs | 14 +- state-chain/pallets/cf-emissions/src/lib.rs | 5 +- state-chain/pallets/cf-emissions/src/mock.rs | 4 +- state-chain/pallets/cf-environment/Cargo.toml | 18 +- state-chain/pallets/cf-environment/src/lib.rs | 4 +- state-chain/pallets/cf-flip/Cargo.toml | 20 +- .../pallets/cf-flip/src/benchmarking.rs | 6 +- state-chain/pallets/cf-flip/src/imbalances.rs | 5 +- state-chain/pallets/cf-flip/src/lib.rs | 11 +- state-chain/pallets/cf-governance/Cargo.toml | 18 +- .../pallets/cf-governance/src/benchmarking.rs | 6 +- state-chain/pallets/cf-governance/src/lib.rs | 16 +- state-chain/pallets/cf-online/Cargo.toml | 18 +- .../pallets/cf-online/src/benchmarking.rs | 6 +- state-chain/pallets/cf-reputation/Cargo.toml | 18 +- .../pallets/cf-reputation/src/benchmarking.rs | 6 +- state-chain/pallets/cf-reputation/src/lib.rs | 16 +- state-chain/pallets/cf-reputation/src/mock.rs | 2 +- .../pallets/cf-reputation/src/reputation.rs | 16 +- .../pallets/cf-reputation/src/suspensions.rs | 5 +- state-chain/pallets/cf-staking/Cargo.toml | 18 +- .../pallets/cf-staking/src/benchmarking.rs | 6 +- state-chain/pallets/cf-staking/src/lib.rs | 33 +- .../pallets/cf-threshold-signature/Cargo.toml | 18 +- .../pallets/cf-threshold-signature/src/lib.rs | 16 +- .../cf-threshold-signature/src/mock.rs | 2 +- state-chain/pallets/cf-validator/Cargo.toml | 22 +- state-chain/pallets/cf-validator/src/lib.rs | 19 +- .../pallets/cf-validator/src/migrations/v2.rs | 2 +- state-chain/pallets/cf-vaults/Cargo.toml | 18 +- .../pallets/cf-vaults/src/benchmarking.rs | 8 +- state-chain/pallets/cf-vaults/src/lib.rs | 13 +- .../pallets/cf-vaults/src/migrations/v1.rs | 10 +- state-chain/pallets/cf-vaults/src/mock.rs | 2 +- state-chain/pallets/cf-witnesser/Cargo.toml | 18 +- .../pallets/cf-witnesser/src/benchmarking.rs | 6 +- state-chain/pallets/cf-witnesser/src/lib.rs | 8 +- .../runtime-benchmark-utilities/Cargo.toml | 2 +- .../runtime-upgrade-utilities/Cargo.toml | 6 +- .../runtime-upgrade-utilities/src/lib.rs | 8 + state-chain/runtime-utilities/Cargo.toml | 10 +- state-chain/runtime/Cargo.toml | 88 +- state-chain/runtime/src/chainflip.rs | 42 +- .../src/chainflip/missed_authorship_slots.rs | 15 +- state-chain/runtime/src/chainflip/offences.rs | 5 +- state-chain/runtime/src/lib.rs | 152 +- .../runtime/src/migrations/delete_rewards.rs | 2 +- .../src/migrations/refactor_offences.rs | 2 +- state-chain/test-utilities/Cargo.toml | 2 +- state-chain/traits/Cargo.toml | 18 +- state-chain/traits/src/async_result.rs | 3 +- state-chain/traits/src/lib.rs | 24 +- .../traits/src/mocks/ceremony_id_provider.rs | 5 +- .../traits/src/mocks/keygen_exclusion.rs | 2 +- .../traits/src/mocks/offence_reporting.rs | 4 +- 89 files changed, 4603 insertions(+), 3435 deletions(-) delete mode 100644 state-chain/doc/rust-setup.md rename state-chain/{doc => docs}/docker-compose.md (90%) create mode 100644 state-chain/docs/rust-setup.md create mode 100644 state-chain/node/src/command_helper.rs diff --git a/Cargo.lock b/Cargo.lock index 33fa3b39fe..bc509d7d7c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -12,22 +12,13 @@ dependencies = [ "regex", ] -[[package]] -name = "addr2line" -version = "0.15.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7a2e47a1fbe209ee101dd6d61285226744c6c8d3c21c8dc878ba6cb9f467f3a" -dependencies = [ - "gimli 0.24.0", -] - [[package]] name = "addr2line" version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9ecd88a8c8378ca913a680cd98f0f13ac67383d35993f86c90a70e3f137816b" dependencies = [ - "gimli 0.26.1", + "gimli", ] [[package]] @@ -42,7 +33,7 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b613b8e1e3cf911a086f53f03bf286f52fd7a7258e4fa606f0ef220d39d8877" dependencies = [ - "generic-array 0.14.4", + "generic-array 0.14.5", ] [[package]] @@ -53,7 +44,7 @@ checksum = "9e8b47f52ea9bae42228d07ec09eb676433d7c4ed1ebdf0f1d1c29ed446f1ab8" dependencies = [ "cfg-if 1.0.0", "cipher", - "cpufeatures 0.2.1", + "cpufeatures 0.2.2", "opaque-debug 0.3.0", ] @@ -77,9 +68,9 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" dependencies = [ - "getrandom 0.2.3", + "getrandom 0.2.6", "once_cell", - "version_check 0.9.3", + "version_check 0.9.4", ] [[package]] @@ -91,15 +82,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "ansi_term" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" -dependencies = [ - "winapi 0.3.9", -] - [[package]] name = "ansi_term" version = "0.12.1" @@ -111,17 +93,17 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.45" +version = "1.0.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee10e43ae4a853c0a3591d4e2ada1719e553be18199d9da9d4a83f5927c2f5c7" +checksum = "08f9b8508dccb7687a1d6c4ce66b2b0ecef467c94667de27d8d7fe1f8d2a9cdc" [[package]] name = "approx" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "072df7202e63b127ab55acfe16ce97013d5b97bf160489336d3f1840fd78e99e" +checksum = "cab112f0a86d568ea0e627cc1d6be74a1e9cd55214684db5561995f6dad897c6" dependencies = [ - "num-traits 0.2.14", + "num-traits 0.2.15", ] [[package]] @@ -190,9 +172,9 @@ dependencies = [ [[package]] name = "async-global-executor" -version = "2.0.2" +version = "2.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9586ec52317f36de58453159d48351bc244bc24ced3effc1fce22f3d48664af6" +checksum = "c290043c9a95b05d45e952fb6383c67bcb61471f60cfa21e890dba6654234f43" dependencies = [ "async-channel", "async-executor", @@ -213,21 +195,21 @@ dependencies = [ "concurrent-queue", "futures-lite", "libc", - "log 0.4.14", + "log 0.4.17", "once_cell", "parking", "polling", "slab", - "socket2 0.4.2", + "socket2 0.4.4", "waker-fn", "winapi 0.3.9", ] [[package]] name = "async-lock" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6a8ea61bf9947a1007c5cada31e647dbc77b103c679858150003ba697ea798b" +checksum = "e97a171d191782fba31bb902b14ad94e24a68145032b7eedf871ab0bc0d077b6" dependencies = [ "event-listener", ] @@ -241,46 +223,28 @@ dependencies = [ "event-listener", ] -[[package]] -name = "async-process" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b21b63ab5a0db0369deb913540af2892750e42d949faacc7a61495ac418a1692" -dependencies = [ - "async-io", - "blocking", - "cfg-if 1.0.0", - "event-listener", - "futures-lite", - "libc", - "once_cell", - "signal-hook", - "winapi 0.3.9", -] - [[package]] name = "async-std" -version = "1.10.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8056f1455169ab86dd47b47391e4ab0cbd25410a70e9fe675544f49bafaf952" +checksum = "52580991739c5cdb36cde8b2a516371c0a3b70dda36d916cc08b82372916808c" dependencies = [ "async-channel", "async-global-executor", "async-io", "async-lock", - "async-process", - "crossbeam-utils 0.8.5", + "crossbeam-utils 0.8.8", "futures-channel", "futures-core", "futures-io", "futures-lite", "gloo-timers", "kv-log-macro", - "log 0.4.14", + "log 0.4.17", "memchr", "num_cpus", "once_cell", - "pin-project-lite 0.2.7", + "pin-project-lite 0.2.9", "pin-utils", "slab", "wasm-bindgen-futures", @@ -288,9 +252,9 @@ dependencies = [ [[package]] name = "async-std-resolver" -version = "0.20.3" +version = "0.20.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed4e2c3da14d8ad45acb1e3191db7a918e9505b6f155b218e70a7c9a1a48c638" +checksum = "dbf3e776afdf3a2477ef4854b85ba0dff3bd85792f685fb3c68948b4d304e4f0" dependencies = [ "async-std", "async-trait", @@ -302,9 +266,9 @@ dependencies = [ [[package]] name = "async-stream" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "171374e7e3b2504e0e5236e3b59260560f9fe94bfe9ac39ba5e4e929c5590625" +checksum = "dad5c83079eae9969be7fadefe640a1c566901f05ff91ab221de4b6f68d9507e" dependencies = [ "async-stream-impl", "futures-core", @@ -312,9 +276,9 @@ dependencies = [ [[package]] name = "async-stream-impl" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "648ed8c8d2ce5409ccd57453d9d1b214b342a0d69376a6feda1fd6cae3299308" +checksum = "10f203db73a71dfa2fb6dd22763990fa26f3d2625a6da2da900d23b87d26be27" dependencies = [ "proc-macro2", "quote", @@ -323,15 +287,15 @@ dependencies = [ [[package]] name = "async-task" -version = "4.0.3" +version = "4.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e91831deabf0d6d7ec49552e489aed63b7456a7a3c46cff62adad428110b0af0" +checksum = "30696a84d817107fc028e049980e09d5e140e8da8f1caeb17e8e950658a3cea9" [[package]] name = "async-trait" -version = "0.1.51" +version = "0.1.53" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44318e776df68115a881de9a8fd1b9e53368d7a4a5ce4cc48517da3393233a5e" +checksum = "ed6aa3524a2dfcf9fe180c51eae2b58738348d819517ceadf95789c51fff7600" dependencies = [ "proc-macro2", "quote", @@ -348,7 +312,7 @@ dependencies = [ "futures-sink", "futures-util", "memchr", - "pin-project-lite 0.2.7", + "pin-project-lite 0.2.9", ] [[package]] @@ -361,16 +325,16 @@ dependencies = [ "futures-sink", "futures-util", "memchr", - "pin-project-lite 0.2.7", + "pin-project-lite 0.2.9", ] [[package]] name = "atomic" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3410529e8288c463bedb5930f82833bc0c90e5d2fe639a56582a4d09220b281" +checksum = "b88d82667eca772c4aa12f0f1348b3ae643424c8876448f3f7bd5787032e234c" dependencies = [ - "autocfg 1.0.1", + "autocfg 1.1.0", ] [[package]] @@ -392,55 +356,51 @@ dependencies = [ [[package]] name = "autocfg" -version = "0.1.7" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d49d90015b3c36167a20fe2810c5cd875ad504b39cff3d4eae7977e6b7c1cb2" +checksum = "0dde43e75fd43e8a1bf86103336bc699aa8d17ad1be60c76c0bdfd4828e19b78" +dependencies = [ + "autocfg 1.1.0", +] [[package]] name = "autocfg" -version = "1.0.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "backtrace" -version = "0.3.63" +version = "0.3.65" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "321629d8ba6513061f26707241fa9bc89524ff1cd7a915a97ef0c62c666ce1b6" +checksum = "11a17d453482a265fd5f8479f2a3f405566e6ca627837aaddb85af8b1ab8ef61" dependencies = [ - "addr2line 0.17.0", + "addr2line", "cc", "cfg-if 1.0.0", "libc", "miniz_oxide", - "object 0.27.1", + "object 0.28.3", "rustc-demangle", ] [[package]] -name = "bae" -version = "0.1.6" +name = "base-x" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec107f431ee3d8a8e45e6dd117adab769556ef463959e77bf6a4888d5fd500cf" -dependencies = [ - "heck", - "proc-macro-error 0.4.12", - "proc-macro2", - "quote", - "syn", -] +checksum = "dc19a4937b4fbd3fe3379793130e42060d10627a360f2127802b10b87e7baf74" [[package]] -name = "base-x" -version = "0.2.8" +name = "base16ct" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4521f3e3d031370679b3b140beb36dfe4801b09ac77e30c61941f97df3ef28b" +checksum = "349a06037c7bf932dd7e7d1f653678b2038b9ad46a74102f1fc7bd7872678cce" [[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" @@ -461,12 +421,6 @@ dependencies = [ "byteorder", ] -[[package]] -name = "base64" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff" - [[package]] name = "base64" version = "0.13.0" @@ -479,23 +433,29 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bed554bd50246729a1ec158d08aa3235d1b69d94ad120ebe187e28894787e736" dependencies = [ - "serde 1.0.130", + "serde 1.0.137", ] +[[package]] +name = "bimap" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc0455254eb5c6964c4545d8bac815e1a1be4f3afe0ae695ea539c12d728d44b" + [[package]] name = "bincode" version = "1.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" dependencies = [ - "serde 1.0.130", + "serde 1.0.137", ] [[package]] name = "bindgen" -version = "0.59.1" +version = "0.59.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "453c49e5950bb0eb63bb3df640e31618846c89d5b7faa54040d76e98e0134375" +checksum = "2bd2a9a458e8f4304c52c43ebb0cfbd520289f8379a52e329a38afda99bf8eb8" dependencies = [ "bitflags", "cexpr", @@ -518,26 +478,26 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitvec" -version = "0.19.5" +version = "0.20.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8942c8d352ae1838c9dda0b0ca2ab657696ef2232a20147cf1b30ae1a9cb4321" +checksum = "7774144344a4faa177370406a7ff5f1da24303817368584c6206c8303eb07848" dependencies = [ - "funty", - "radium 0.5.3", + "funty 1.1.0", + "radium 0.6.2", "tap", - "wyz", + "wyz 0.2.0", ] [[package]] name = "bitvec" -version = "0.20.4" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7774144344a4faa177370406a7ff5f1da24303817368584c6206c8303eb07848" +checksum = "1489fcb93a5bb47da0462ca93ad252ad6af2145cce58d10d46a83931ba9f016b" dependencies = [ - "funty", - "radium 0.6.2", + "funty 2.0.0", + "radium 0.7.0", "tap", - "wyz", + "wyz 0.5.0", ] [[package]] @@ -551,6 +511,15 @@ dependencies = [ "opaque-debug 0.3.0", ] +[[package]] +name = "blake2" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9cf849ee05b2ee5fba5e36f97ff8ec2533916700fc0758d40d92136a42f3388" +dependencies = [ + "digest 0.10.3", +] + [[package]] name = "blake2-rfc" version = "0.2.18" @@ -617,7 +586,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" dependencies = [ "block-padding 0.2.1", - "generic-array 0.14.4", + "generic-array 0.14.5", +] + +[[package]] +name = "block-buffer" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bf7fe51849ea569fd452f37822f606a5cabb684dc918707a0193fd4664ff324" +dependencies = [ + "generic-array 0.14.5", ] [[package]] @@ -637,9 +615,9 @@ checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" [[package]] name = "blocking" -version = "1.0.2" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5e170dbede1f740736619b776d7251cb1b9095c435c34d8ca9f57fcd2f335e9" +checksum = "c6ccb65d468978a086b69884437ded69a90faab3bbe6e67f242173ea728acccc" dependencies = [ "async-channel", "async-task", @@ -664,7 +642,7 @@ dependencies = [ "lazy_static", "memchr", "regex-automata", - "serde 1.0.130", + "serde 1.0.137", ] [[package]] @@ -678,15 +656,15 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.8.0" +version = "3.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f1e260c3a9040a7c19a12468758f4c16f31a81a1fe087482be9570ec864bb6c" +checksum = "a4a45a46ab1f2412e53d3a0ade76ffad2025804294569aae387231a0cd6e0899" [[package]] name = "byte-slice-cast" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d30c751592b77c499e7bce34d99d67c2c11bdc0574e9a488ddade14150a4698" +checksum = "87c5fdd0166095e1d463fc6cc01aa8ce547ad77a4e84d42eb6762b084e28067e" [[package]] name = "byte-tools" @@ -712,29 +690,34 @@ dependencies = [ [[package]] name = "bytes" -version = "0.5.6" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e4cec68f03f32e44924783795810fa50a7035d8c8ebe78580ad7e6c703fba38" +checksum = "c4872d67bab6358e59559027aa3b9157c53d9358c51423c17554809a8858e0f8" [[package]] -name = "bytes" -version = "1.1.0" +name = "bzip2-sys" +version = "0.1.11+1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4872d67bab6358e59559027aa3b9157c53d9358c51423c17554809a8858e0f8" +checksum = "736a955f3fa7875102d57c82b8cac37ec45224a07fd32d58f9f7a186b6cd4cdc" +dependencies = [ + "cc", + "libc", + "pkg-config", +] [[package]] name = "cache-padded" -version = "1.1.1" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "631ae5198c9be5e753e5cc215e1bd73c2b466a3565173db433f52bb9d3e66dba" +checksum = "c1db59621ec70f09c5e9b597b220c7a2b43611f4710dc03ceb8748637775692c" [[package]] name = "camino" -version = "1.0.5" +version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52d74260d9bf6944e2208aa46841b4b8f0d7ffc0849a06837b2f510337f86b2b" +checksum = "6f3132262930b0522068049f5870a856ab8affc80c70d08b6ecb785771a6fc23" dependencies = [ - "serde 1.0.130", + "serde 1.0.137", ] [[package]] @@ -743,39 +726,38 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cbdb825da8a5df079a43676dbe042702f1707b1109f713a01420fbb4cc71fa27" dependencies = [ - "serde 1.0.130", + "serde 1.0.137", ] [[package]] name = "cargo_metadata" -version = "0.13.1" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "081e3f0755c1f380c2d010481b6fa2e02973586d5f2b24eebb7a2a1d98b143d8" +checksum = "4acbb09d9ee8e23699b9634375c72795d095bf268439da88562cf9b501f181fa" dependencies = [ "camino", "cargo-platform", - "semver 0.11.0", - "semver-parser 0.10.2", - "serde 1.0.130", + "semver 1.0.9", + "serde 1.0.137", "serde_json", ] [[package]] name = "cc" -version = "1.0.71" +version = "1.0.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79c2681d6594606957bbb8631c4b90a7fcaaa72cdb714743a437b156d6a7eedd" +checksum = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11" dependencies = [ "jobserver", ] [[package]] name = "cexpr" -version = "0.5.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db507a7679252d2276ed0dd8113c6875ec56d3089f9225b2b42c30cc1f8e5c89" +checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" dependencies = [ - "nom 6.1.2", + "nom 7.1.1", ] [[package]] @@ -783,22 +765,24 @@ name = "cf-chains" version = "0.1.0" dependencies = [ "cf-runtime-benchmark-utilities", - "ethabi 14.1.0", + "ethabi 17.0.0", "ethereum", + "ethereum-types 0.13.1", "frame-support", "frame-system", "hex", "hex-literal", - "libsecp256k1 0.7.0", - "log 0.4.14", - "parity-scale-codec", - "rand 0.8.4", + "libsecp256k1", + "log 0.4.17", + "parity-scale-codec 3.1.2", + "rand 0.8.5", "rlp", - "secp256k1", - "serde 1.0.130", - "sp-runtime", - "sp-std", - "web3 0.17.0 (git+https://github.com/tomusdrw/rust-web3?rev=861cfcd)", + "scale-info", + "secp256k1 0.20.3", + "serde 1.0.137", + "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "web3 0.18.0", ] [[package]] @@ -815,7 +799,7 @@ dependencies = [ "frame-system-benchmarking", "frame-system-rpc-runtime-api", "hex-literal", - "libsecp256k1 0.7.0", + "libsecp256k1", "pallet-aura", "pallet-authorship", "pallet-cf-auction", @@ -836,18 +820,18 @@ dependencies = [ "pallet-session", "pallet-timestamp", "pallet-transaction-payment", - "parity-scale-codec", - "rand 0.8.4", + "parity-scale-codec 3.1.2", + "rand 0.8.5", "scale-info", "sp-block-builder", "sp-consensus-aura", - "sp-core", + "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "sp-finality-grandpa", "sp-inherents", "sp-offchain", - "sp-runtime", + "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "sp-session", - "sp-std", + "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "sp-transaction-pool", "sp-version", "state-chain-runtime", @@ -857,7 +841,7 @@ dependencies = [ name = "cf-runtime-benchmark-utilities" version = "0.1.0" dependencies = [ - "sp-std", + "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", ] [[package]] @@ -873,9 +857,9 @@ name = "cf-runtime-upgrade-utilities" version = "0.1.0" dependencies = [ "frame-support", - "log 0.4.14", - "sp-io", - "sp-std", + "log 0.4.17", + "sp-io 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", ] [[package]] @@ -884,11 +868,11 @@ version = "0.1.0" dependencies = [ "cf-runtime-macros", "frame-support", - "log 0.4.14", - "parity-scale-codec", - "sp-io", - "sp-runtime", - "sp-std", + "log 0.4.17", + "parity-scale-codec 3.1.2", + "sp-io 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", ] [[package]] @@ -906,13 +890,13 @@ dependencies = [ "frame-benchmarking", "frame-support", "frame-system", - "log 0.4.14", - "parity-scale-codec", + "log 0.4.17", + "parity-scale-codec 3.1.2", "scale-info", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-io 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", ] [[package]] @@ -961,22 +945,22 @@ dependencies = [ "chainflip-engine", "chainflip-node", "config", - "futures 0.3.17", + "futures 0.3.21", "hex", "pallet-cf-environment", "pallet-cf-staking", "pallet-cf-threshold-signature", "pallet-cf-validator", - "serde 1.0.130", + "serde 1.0.137", "slog", "sp-consensus-aura", - "sp-core", + "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "sp-finality-grandpa", "state-chain-runtime", "structopt", "tokio", "utilities", - "web3 0.17.0 (git+https://github.com/tomusdrw/rust-web3.git?rev=a425fa7)", + "web3 0.17.0", ] [[package]] @@ -997,15 +981,15 @@ dependencies = [ "curv-kzen", "custom-rpc", "dyn-clone", - "env_logger 0.9.0", - "ethbloom", + "env_logger", + "ethbloom 0.11.1", "frame-support", "frame-system", "fs_extra", - "futures 0.3.17", + "futures 0.3.21", "futures-core", "futures-util", - "generic-array 0.14.4", + "generic-array 0.14.5", "hex", "httparse", "itertools", @@ -1018,7 +1002,7 @@ dependencies = [ "lazy_format", "lazy_static", "libp2p", - "log 0.4.14", + "log 0.4.17", "mockall", "multisig-p2p-transport", "num", @@ -1034,37 +1018,37 @@ dependencies = [ "pallet-cf-validator", "pallet-cf-vaults", "pallet-cf-witnesser", - "parity-scale-codec", + "parity-scale-codec 3.1.2", "parking_lot 0.11.2", "public-ip", "rand 0.6.5", - "rand 0.8.4", + "rand 0.8.5", "regex", "reqwest", "rocksdb", "sc-rpc-api", - "secp256k1", - "serde 1.0.130", + "secp256k1 0.20.3", + "serde 1.0.137", "serde_json", - "sha2 0.9.8", + "sha2 0.9.9", "slog", "slog-async", "slog-json", - "sp-core", + "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "sp-keyring", "sp-rpc", - "sp-runtime", + "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "sp-version", "state-chain-runtime", "structopt", - "substrate-subxt", + "subxt", "tempfile", "thiserror", "tokio", "tokio-stream", "url 1.7.2", "utilities", - "web3 0.17.0 (git+https://github.com/tomusdrw/rust-web3.git?rev=a425fa7)", + "web3 0.17.0", "websocket", "zeroize", ] @@ -1074,17 +1058,20 @@ name = "chainflip-node" version = "0.1.0" dependencies = [ "cf-chains", + "clap 3.1.15", "custom-rpc", "frame-benchmarking", "frame-benchmarking-cli", - "frame-try-runtime", - "futures 0.3.17", + "frame-system", + "futures 0.3.21", "hex", "hex-literal", "jsonrpc-core", "jsonrpc-core-client", "jsonrpc-derive", "multisig-p2p-transport", + "pallet-transaction-payment", + "pallet-transaction-payment-rpc", "sc-basic-authorship", "sc-cli", "sc-client-api", @@ -1104,9 +1091,11 @@ dependencies = [ "sp-blockchain", "sp-consensus", "sp-consensus-aura", - "sp-core", + "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "sp-finality-grandpa", - "sp-runtime", + "sp-inherents", + "sp-keyring", + "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "sp-timestamp", "state-chain-runtime", "structopt", @@ -1124,7 +1113,7 @@ checksum = "670ad68c9088c2a963aaa298cb369688cf3f9465ce5e2d4ca10e6e0098a1ce73" dependencies = [ "libc", "num-integer", - "num-traits 0.2.14", + "num-traits 0.2.15", "time 0.1.44", "winapi 0.3.9", ] @@ -1146,35 +1135,74 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ee52072ec15386f770805afd189a01c8841be8696bed250fa2f13c4c0d6dfb7" dependencies = [ - "generic-array 0.14.4", + "generic-array 0.14.5", ] [[package]] name = "clang-sys" -version = "1.3.0" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa66045b9cb23c2e9c1520732030608b02ee07e5cfaa5a521ec15ded7fa24c90" +checksum = "4cc00842eed744b858222c4c9faf7243aafc6d33f92f96935263ef4d8a41ce21" dependencies = [ "glob", "libc", - "libloading 0.7.1", + "libloading 0.7.3", ] [[package]] name = "clap" -version = "2.33.3" +version = "2.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37e58ac78573c40708d45522f0d80fa2f01cc4f9b4e2bf749807255454312002" +checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c" dependencies = [ - "ansi_term 0.11.0", + "ansi_term", "atty", "bitflags", "strsim 0.8.0", - "textwrap", + "textwrap 0.11.0", "unicode-width", "vec_map", ] +[[package]] +name = "clap" +version = "3.1.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85a35a599b11c089a7f49105658d089b8f2cf0882993c17daf6de15285c2c35d" +dependencies = [ + "atty", + "bitflags", + "clap_derive", + "clap_lex", + "indexmap", + "lazy_static", + "strsim 0.10.0", + "termcolor", + "textwrap 0.15.0", +] + +[[package]] +name = "clap_derive" +version = "3.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3aab4734e083b809aaf5794e14e756d1c798d2c69c7f7de7a09a2f5214993c1" +dependencies = [ + "heck 0.4.0", + "proc-macro-error", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "clap_lex" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a37c35f1112dad5e6e0b1adaff798507497a18fceeb30cceb3bae7d1427b9213" +dependencies = [ + "os_str_bytes", +] + [[package]] name = "cloudabi" version = "0.0.3" @@ -1202,7 +1230,7 @@ dependencies = [ "lazy_static", "nom 5.1.2", "rust-ini", - "serde 1.0.130", + "serde 1.0.137", "serde-hjson", "serde_json", "toml", @@ -1215,6 +1243,12 @@ version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d6f2aa4d0537bcc1c74df8755072bd31c1ef1a3a1b85a68e8404a8c353b7b8b" +[[package]] +name = "const-oid" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4c78c047431fee22c1a7bb92e00ad095a02a983affe4d8a72e2a2c62c1b94f3" + [[package]] name = "constant_time_eq" version = "0.1.5" @@ -1229,9 +1263,9 @@ checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" [[package]] name = "core-foundation" -version = "0.9.2" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6888e10551bb93e424d8df1d07f1a8b4fceb0001a3a4b048bfc47554946f47b3" +checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" dependencies = [ "core-foundation-sys", "libc", @@ -1245,9 +1279,9 @@ checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" [[package]] name = "cpp_demangle" -version = "0.3.3" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ea47428dc9d2237f3c6bc134472edfd63ebba0af932e783506dcfd66f10d18a" +checksum = "eeaa953eaad386a53111e47172c2fedba671e5684c8dd601a5f474f4f118710f" dependencies = [ "cfg-if 1.0.0", ] @@ -1263,124 +1297,119 @@ dependencies = [ [[package]] name = "cpufeatures" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95059428f66df56b63431fdb4e1947ed2190586af5c5a8a8b71122bdf5a7f469" +checksum = "59a6001667ab124aebae2a495118e11d30984c3a653e99d86d58971708cf5e4b" dependencies = [ "libc", ] [[package]] name = "cranelift-bforest" -version = "0.74.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8ca3560686e7c9c7ed7e0fe77469f2410ba5d7781b1acaa9adc8d8deea28e3e" +checksum = "38faa2a16616c8e78a18d37b4726b98bfd2de192f2fdc8a39ddf568a408a0f75" dependencies = [ "cranelift-entity", ] [[package]] name = "cranelift-codegen" -version = "0.74.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf9bf1ffffb6ce3d2e5ebc83549bd2436426c99b31cc550d521364cbe35d276" +checksum = "26f192472a3ba23860afd07d2b0217dc628f21fcc72617aa1336d98e1671f33b" dependencies = [ "cranelift-bforest", "cranelift-codegen-meta", "cranelift-codegen-shared", "cranelift-entity", - "gimli 0.24.0", - "log 0.4.14", + "gimli", + "log 0.4.17", "regalloc", - "serde 1.0.130", - "smallvec 1.7.0", + "smallvec 1.8.0", "target-lexicon", ] [[package]] name = "cranelift-codegen-meta" -version = "0.74.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cc21936a5a6d07e23849ffe83e5c1f6f50305c074f4b2970ca50c13bf55b821" +checksum = "0f32ddb89e9b89d3d9b36a5b7d7ea3261c98235a76ac95ba46826b8ec40b1a24" dependencies = [ "cranelift-codegen-shared", - "cranelift-entity", ] [[package]] name = "cranelift-codegen-shared" -version = "0.74.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca5b6ffaa87560bebe69a5446449da18090b126037920b0c1c6d5945f72faf6b" -dependencies = [ - "serde 1.0.130", -] +checksum = "01fd0d9f288cc1b42d9333b7a776b17e278fc888c28e6a0f09b5573d45a150bc" [[package]] name = "cranelift-entity" -version = "0.74.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d6b4a8bef04f82e4296782646f733c641d09497df2fabf791323fefaa44c64c" +checksum = "9e3bfe172b83167604601faf9dc60453e0d0a93415b57a9c4d1a7ae6849185cf" dependencies = [ - "serde 1.0.130", + "serde 1.0.137", ] [[package]] name = "cranelift-frontend" -version = "0.74.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c31b783b351f966fce33e3c03498cb116d16d97a8f9978164a60920bd0d3a99c" +checksum = "a006e3e32d80ce0e4ba7f1f9ddf66066d052a8c884a110b91d05404d6ce26dce" dependencies = [ "cranelift-codegen", - "log 0.4.14", - "smallvec 1.7.0", + "log 0.4.17", + "smallvec 1.8.0", "target-lexicon", ] [[package]] name = "cranelift-native" -version = "0.74.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a77c88d3dd48021ff1e37e978a00098524abd3513444ae252c08d37b310b3d2a" +checksum = "501241b0cdf903412ec9075385ac9f2b1eb18a89044d1538e97fab603231f70c" dependencies = [ "cranelift-codegen", + "libc", "target-lexicon", ] [[package]] name = "cranelift-wasm" -version = "0.74.0" +version = "0.82.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edb6d408e2da77cdbbd65466298d44c86ae71c1785d2ab0d8657753cdb4d9d89" +checksum = "16d9e4211bbc3268042a96dd4de5bd979cda22434991d035f5f8eacba987fad2" dependencies = [ "cranelift-codegen", "cranelift-entity", "cranelift-frontend", "itertools", - "log 0.4.14", - "serde 1.0.130", - "smallvec 1.7.0", - "thiserror", + "log 0.4.17", + "smallvec 1.8.0", "wasmparser", + "wasmtime-types", ] [[package]] name = "crc32fast" -version = "1.2.1" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81156fece84ab6a9f2afdb109ce3ae577e42b1228441eded99bd77f627953b1a" +checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" dependencies = [ "cfg-if 1.0.0", ] [[package]] name = "crossbeam-channel" -version = "0.5.1" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ed27e177f16d65f0f0c22a213e17c696ace5dd64b14258b52f9417ccb52db4" +checksum = "5aaa7bd5fb665c6864b5f963dd9097905c54125909c7aa94c9e18507cdbe6c53" dependencies = [ "cfg-if 1.0.0", - "crossbeam-utils 0.8.5", + "crossbeam-utils 0.8.8", ] [[package]] @@ -1391,17 +1420,18 @@ checksum = "6455c0ca19f0d2fbf751b908d5c55c1f5cbc65e03c4225427254b46890bdde1e" dependencies = [ "cfg-if 1.0.0", "crossbeam-epoch", - "crossbeam-utils 0.8.5", + "crossbeam-utils 0.8.8", ] [[package]] name = "crossbeam-epoch" -version = "0.9.5" +version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ec02e091aa634e2c3ada4a392989e7c3116673ef0ac5b72232439094d73b7fd" +checksum = "1145cf131a2c6ba0615079ab6a638f7e1973ac9c2634fcbeaaad6114246efe8c" dependencies = [ + "autocfg 1.1.0", "cfg-if 1.0.0", - "crossbeam-utils 0.8.5", + "crossbeam-utils 0.8.8", "lazy_static", "memoffset", "scopeguard", @@ -1413,16 +1443,16 @@ version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3c7c73a2d1e9fc0886a08b93e98eb643461230d5f1925e4036204d5f2e261a8" dependencies = [ - "autocfg 1.0.1", + "autocfg 1.1.0", "cfg-if 0.1.10", "lazy_static", ] [[package]] name = "crossbeam-utils" -version = "0.8.5" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d82cfc11ce7f2c3faef78d8a684447b40d503d9681acebed6cb728d45940c4db" +checksum = "0bf124c720b7686e3c2663cf54062ab0f68a88af2fb6a030e87e30bf721fcb38" dependencies = [ "cfg-if 1.0.0", "lazy_static", @@ -1436,23 +1466,45 @@ checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" [[package]] name = "crypto-bigint" -version = "0.2.11" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8658c15c5d921ddf980f7fe25b1e82f4b7a4083b2c4985fea4922edb8e43e07d" +dependencies = [ + "generic-array 0.14.5", + "rand_core 0.6.3", + "subtle", + "zeroize", +] + +[[package]] +name = "crypto-bigint" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f83bd3bb4314701c568e340cd8cf78c975aa0ca79e03d3f6d1677d5b0c9c0c03" +checksum = "03c6a1d5fa1de37e071642dfa44ec552ca5b299adb128fab16138e24b548fd21" dependencies = [ - "generic-array 0.14.4", + "generic-array 0.14.5", "rand_core 0.6.3", "subtle", "zeroize", ] +[[package]] +name = "crypto-common" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57952ca27b5e3606ff4dd79b0020231aaf9d6aa76dc05fd30137538c50bd3ce8" +dependencies = [ + "generic-array 0.14.5", + "typenum", +] + [[package]] name = "crypto-mac" version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" dependencies = [ - "generic-array 0.14.4", + "generic-array 0.14.5", "subtle", ] @@ -1462,7 +1514,7 @@ version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b1d1a86f49236c215f271d40892d5fc950490551400b02ef360692c29815c714" dependencies = [ - "generic-array 0.14.4", + "generic-array 0.14.5", "subtle", ] @@ -1480,9 +1532,9 @@ checksum = "22813a6dc45b335f9bade10bf7271dc477e81113e89eb251a0bc2a8a81c536e1" dependencies = [ "bstr", "csv-core", - "itoa", + "itoa 0.4.8", "ryu", - "serde 1.0.130", + "serde 1.0.137", ] [[package]] @@ -1500,14 +1552,14 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c1a816186fa68d9e426e3cb4ae4dff1fcd8e4a2c34b781bf7a822574a0d0aac8" dependencies = [ - "sct", + "sct 0.6.1", ] [[package]] name = "ctor" -version = "0.1.21" +version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccc0a48a9b826acdf4028595adc9db92caea352f7af011a3034acd172a52a0aa" +checksum = "f877be4f7c9f246b183111634f75baa039715e3f46ce860677d3b19a69fb229c" dependencies = [ "quote", "syn", @@ -1543,25 +1595,25 @@ dependencies = [ "curve25519-dalek 3.2.0", "digest 0.9.0", "ff-zeroize", - "generic-array 0.14.4", + "generic-array 0.14.5", "hex", "hmac 0.11.0", "lazy_static", "merkle-cbt", "num-integer", - "num-traits 0.2.14", + "num-traits 0.2.15", "p256", "pairing-plus", "rand 0.6.5", "rand 0.7.3", "rust-gmp-kzen", - "secp256k1", - "serde 1.0.130", + "secp256k1 0.20.3", + "serde 1.0.137", "serde_bytes", "serde_derive", "sha2 0.8.2", - "sha2 0.9.8", - "sha3", + "sha2 0.9.9", + "sha3 0.9.1", "thiserror", "typenum", "zeroize", @@ -1604,7 +1656,7 @@ dependencies = [ "sc-rpc", "sc-rpc-api", "sp-api", - "sp-runtime", + "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "state-chain-runtime", ] @@ -1614,8 +1666,18 @@ version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0d706e75d87e35569db781a9b5e2416cff1236a47ed380831f959382ccd5f858" dependencies = [ - "darling_core", - "darling_macro", + "darling_core 0.10.2", + "darling_macro 0.10.2", +] + +[[package]] +name = "darling" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4529658bdda7fd6769b8614be250cdcfc3aeb0ee72fe66f9e41e5e5eb73eac02" +dependencies = [ + "darling_core 0.14.1", + "darling_macro 0.14.1", ] [[package]] @@ -1632,13 +1694,38 @@ dependencies = [ "syn", ] +[[package]] +name = "darling_core" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "649c91bc01e8b1eac09fb91e8dbc7d517684ca6be8ebc75bb9cafc894f9fdb6f" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim 0.10.0", + "syn", +] + [[package]] name = "darling_macro" version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9b5a2f4ac4969822c62224815d069952656cadc7084fdca9751e6d959189b72" dependencies = [ - "darling_core", + "darling_core 0.10.2", + "quote", + "syn", +] + +[[package]] +name = "darling_macro" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddfc69c5bfcbd2fc09a0f38451d2daf0e372e367986a83906d1b0dbc88134fb5" +dependencies = [ + "darling_core 0.14.1", "quote", "syn", ] @@ -1675,7 +1762,27 @@ version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "79b71cca7d95d7681a4b3b9cdf63c8dbc3730d0584c2c74e31416d64a90493f4" dependencies = [ - "const-oid", + "const-oid 0.6.2", +] + +[[package]] +name = "der" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6919815d73839e7ad218de758883aae3a257ba6759ce7a9992501efbb53d705c" +dependencies = [ + "const-oid 0.7.1", +] + +[[package]] +name = "derivative" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" +dependencies = [ + "proc-macro2", + "quote", + "syn", ] [[package]] @@ -1684,7 +1791,7 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2658621297f2cf68762a6f7dc0bb7e1ff2cfd6583daef8ee0fed6f7ec468ec0" dependencies = [ - "darling", + "darling 0.10.2", "derive_builder_core", "proc-macro2", "quote", @@ -1697,7 +1804,7 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2791ea3e372c8495c0bc2033991d76b512cd799d07491fbd6890124db9458bef" dependencies = [ - "darling", + "darling 0.10.2", "proc-macro2", "quote", "syn", @@ -1705,14 +1812,14 @@ dependencies = [ [[package]] name = "derive_more" -version = "0.99.16" +version = "0.99.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40eebddd2156ce1bb37b20bbe5151340a31828b1f2d22ba4141f3531710e38df" +checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" dependencies = [ "convert_case", "proc-macro2", "quote", - "rustc_version 0.3.3", + "rustc_version 0.4.0", "syn", ] @@ -1737,14 +1844,25 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" dependencies = [ - "generic-array 0.14.4", + "generic-array 0.14.5", +] + +[[package]] +name = "digest" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2fb860ca6fafa5552fb6d0e816a69c8e49f0908bf524e30a90d97c85892d506" +dependencies = [ + "block-buffer 0.10.2", + "crypto-common", + "subtle", ] [[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", ] @@ -1759,14 +1877,25 @@ dependencies = [ "dirs-sys-next", ] +[[package]] +name = "dirs" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fd78930633bd1c6e35c4b42b1df7b0cbc6bc191146e512bb3bedf243fcc3901" +dependencies = [ + "libc", + "redox_users 0.3.5", + "winapi 0.3.9", +] + [[package]] name = "dirs-sys" -version = "0.3.6" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03d86534ed367a67548dc68113a0f5db55432fdfbb6e6f9d77704397d95d5780" +checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6" dependencies = [ "libc", - "redox_users", + "redox_users 0.4.3", "winapi 0.3.9", ] @@ -1777,7 +1906,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" dependencies = [ "libc", - "redox_users", + "redox_users 0.4.3", "winapi 0.3.9", ] @@ -1789,7 +1918,7 @@ checksum = "53ecafc952c4528d9b51a458d1a8904b81783feff9fde08ab6ed2545ff396872" dependencies = [ "cfg-if 1.0.0", "libc", - "socket2 0.4.2", + "socket2 0.4.4", "winapi 0.3.9", ] @@ -1815,6 +1944,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" @@ -1838,9 +1973,9 @@ dependencies = [ [[package]] name = "dyn-clone" -version = "1.0.4" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee2626afccd7561a06cf1367e2950c4718ea04565e20fb5029b6c7d8ad09abcf" +checksum = "21e50f3adc76d6a43f5ed73b698a87d0760ca74617f60f7c3b879003536fdd28" [[package]] name = "ecdsa" @@ -1848,17 +1983,29 @@ version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "43ee23aa5b4f68c7a092b5c3beb25f50c406adc75e2363634f242f28ab255372" dependencies = [ - "der", - "elliptic-curve", + "der 0.4.5", + "elliptic-curve 0.10.4", "hmac 0.11.0", "signature", ] +[[package]] +name = "ecdsa" +version = "0.13.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0d69ae62e0ce582d56380743515fefaf1a8c70cec685d9677636d7e30ae9dc9" +dependencies = [ + "der 0.5.1", + "elliptic-curve 0.11.12", + "rfc6979", + "signature", +] + [[package]] name = "ed25519" -version = "1.2.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4620d40f6d2601794401d6dd95a5cf69b6c157852539470eeda433a99b3c0efc" +checksum = "3d5c4b5e5959dc2c2b89918d8e2cc40fcdd623cef026ed09d2f0ee05199dc8e4" dependencies = [ "signature", ] @@ -1872,8 +2019,8 @@ dependencies = [ "curve25519-dalek 3.2.0", "ed25519", "rand 0.7.3", - "serde 1.0.130", - "sha2 0.9.8", + "serde 1.0.137", + "sha2 0.9.9", "zeroize", ] @@ -1885,25 +2032,49 @@ checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" [[package]] name = "elliptic-curve" -version = "0.10.6" +version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "beca177dcb8eb540133e7680baff45e7cc4d93bf22002676cec549f82343721b" +checksum = "83e5c176479da93a0983f0a6fdc3c1b8e7d5be0d7fe3fe05a99f15b96582b9a8" dependencies = [ - "crypto-bigint", - "ff", - "generic-array 0.14.4", - "group", + "crypto-bigint 0.2.5", + "ff 0.10.1", + "generic-array 0.14.5", + "group 0.10.0", "pkcs8", "rand_core 0.6.3", "subtle", "zeroize", ] +[[package]] +name = "elliptic-curve" +version = "0.11.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25b477563c2bfed38a3b7a60964c49e058b2510ad3f12ba3483fd8f62c2306d6" +dependencies = [ + "base16ct", + "crypto-bigint 0.3.2", + "der 0.5.1", + "ff 0.11.1", + "generic-array 0.14.5", + "group 0.11.0", + "rand_core 0.6.3", + "sec1", + "subtle", + "zeroize", +] + +[[package]] +name = "encode_unicode" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" + [[package]] name = "encoding_rs" -version = "0.8.29" +version = "0.8.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a74ea89a0a1b98f6332de42c95baff457ada66d1cb4030f9ff151b2041a1c746" +checksum = "9852635589dc9f9ea1b6fe9f05b50ef208c85c834a562f0c6abb1c475736ec2b" dependencies = [ "cfg-if 1.0.0", ] @@ -1916,29 +2087,16 @@ checksum = "c34f04666d835ff5d62e058c3995147c06f42fe86ff053337632bca83e42702d" [[package]] name = "enum-as-inner" -version = "0.3.3" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c5f0096a91d210159eceb2ff5e1c4da18388a170e1e3ce948aac9c8fdbbf595" +checksum = "570d109b813e904becc80d8d5da38376818a143348413f7149f1340fe04754d4" dependencies = [ - "heck", + "heck 0.4.0", "proc-macro2", "quote", "syn", ] -[[package]] -name = "env_logger" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44533bbbb3bb3c1fa17d9f2e4e38bbbaf8396ba82193c4cb1b6445d711445d36" -dependencies = [ - "atty", - "humantime 1.3.0", - "log 0.4.14", - "regex", - "termcolor", -] - [[package]] name = "env_logger" version = "0.9.0" @@ -1946,8 +2104,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b2cf0344971ee6c64c31be0d530793fba457d322dfec2810c453d0ef228f9c3" dependencies = [ "atty", - "humantime 2.1.0", - "log 0.4.14", + "humantime", + "log 0.4.17", "regex", "termcolor", ] @@ -1958,15 +2116,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 1.0.130", -] - [[package]] name = "errno" version = "0.2.8" @@ -1990,31 +2139,48 @@ dependencies = [ [[package]] name = "ethabi" -version = "14.1.0" -source = "git+https://github.com/chainflip-io/ethabi?rev=87ea2a3#87ea2a3270c5cdd18b829e901a9c1d3424bff491" +version = "15.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f76ef192b63e8a44b3d08832acebbb984c3fba154b5c26f70037c860202a0d4b" dependencies = [ "anyhow", - "ethereum-types", + "ethereum-types 0.12.1", "hex", - "serde 1.0.130", + "serde 1.0.137", "serde_json", - "sha3", + "sha3 0.9.1", "thiserror", "uint", ] [[package]] name = "ethabi" -version = "15.0.0" +version = "16.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f76ef192b63e8a44b3d08832acebbb984c3fba154b5c26f70037c860202a0d4b" +checksum = "a4c98847055d934070b90e806e12d3936b787d0a115068981c1d8dfd5dfef5a5" dependencies = [ - "anyhow", - "ethereum-types", + "ethereum-types 0.12.1", + "hex", + "serde 1.0.137", + "serde_json", + "sha3 0.9.1", + "thiserror", + "uint", +] + +[[package]] +name = "ethabi" +version = "17.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b69517146dfab88e9238c00c724fd8e277951c3cc6f22b016d72f422a832213e" +dependencies = [ + "ethereum-types 0.13.1", "hex", - "serde 1.0.130", + "once_cell", + "regex", + "serde 1.0.137", "serde_json", - "sha3", + "sha3 0.10.1", "thiserror", "uint", ] @@ -2027,7 +2193,20 @@ checksum = "bfb684ac8fa8f6c5759f788862bb22ec6fe3cb392f6bfd08e3c64b603661e3f8" dependencies = [ "crunchy", "fixed-hash", - "impl-codec", + "impl-rlp", + "impl-serde", + "tiny-keccak", +] + +[[package]] +name = "ethbloom" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11da94e443c60508eb62cf256243a64da87304c2802ac2528847f79d750007ef" +dependencies = [ + "crunchy", + "fixed-hash", + "impl-codec 0.6.0", "impl-rlp", "impl-serde", "scale-info", @@ -2036,20 +2215,20 @@ dependencies = [ [[package]] name = "ethereum" -version = "0.10.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81fb916554a4dba293ea69c69ad5653e21d770a9d0c2496b5fa0a1f5a3946d87" +checksum = "23750149fe8834c0e24bb9adcbacbe06c45b9861f15df53e09f26cb7c4ab91ef" dependencies = [ "bytes 1.1.0", - "ethereum-types", + "ethereum-types 0.13.1", "hash-db", "hash256-std-hasher", - "parity-scale-codec", + "parity-scale-codec 3.1.2", "rlp", "rlp-derive", "scale-info", - "serde 1.0.130", - "sha3", + "serde 1.0.137", + "sha3 0.10.1", "triehash", ] @@ -2059,21 +2238,35 @@ version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "05136f7057fe789f06e6d41d07b34e6f70d8c86e5693b60f97aaa6553553bdaf" dependencies = [ - "ethbloom", + "ethbloom 0.11.1", + "fixed-hash", + "impl-rlp", + "impl-serde", + "primitive-types 0.10.1", + "uint", +] + +[[package]] +name = "ethereum-types" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2827b94c556145446fcce834ca86b7abf0c39a805883fe20e72c5bfdb5a0dc6" +dependencies = [ + "ethbloom 0.12.1", "fixed-hash", - "impl-codec", + "impl-codec 0.6.0", "impl-rlp", "impl-serde", - "primitive-types", + "primitive-types 0.11.1", "scale-info", "uint", ] [[package]] name = "event-listener" -version = "2.5.1" +version = "2.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7531096570974c3a9dcf9e4b8e1cede1ec26cf5046219fb3b9d897503b9be59" +checksum = "77f3309417938f28bf8228fcff79a4a37103981e3e186d2ccd19c74b38f4eb71" [[package]] name = "exit-future" @@ -2081,7 +2274,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e43f2f1833d64e33f15592464d6fdd70f349dda7b1a53088eb83cd94014008c5" dependencies = [ - "futures 0.3.17", + "futures 0.3.21", ] [[package]] @@ -2124,6 +2317,16 @@ dependencies = [ "subtle", ] +[[package]] +name = "ff" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "131655483be284720a17d74ff97592b8e76576dc25563148601df2d7c9080924" +dependencies = [ + "rand_core 0.6.3", + "subtle", +] + [[package]] name = "ff-zeroize" version = "0.6.3" @@ -2144,7 +2347,7 @@ checksum = "b24d4059bc0d0a0bf26b740aa21af1f96a984f0ab7a21356d00b32475388b53a" dependencies = [ "num-bigint 0.2.6", "num-integer", - "num-traits 0.2.14", + "num-traits 0.2.15", "proc-macro2", "quote", "syn", @@ -2152,26 +2355,27 @@ dependencies = [ [[package]] name = "file-per-thread-logger" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fdbe0d94371f9ce939b555dd342d0686cc4c0cadbcd4b61d70af5ff97eb4126" +checksum = "21e16290574b39ee41c71aeb90ae960c504ebaf1e2a1c87bd52aa56ed6e1a02f" dependencies = [ - "env_logger 0.7.1", - "log 0.4.14", + "env_logger", + "log 0.4.17", ] [[package]] name = "finality-grandpa" -version = "0.14.1" -source = "git+https://github.com/chainflip-io/finality-grandpa.git?tag=chainflip-v0.14.1#f594febef91a8ae2771ac1b72f87984d203467c3" +version = "0.16.0" +source = "git+https://github.com/chainflip-io/finality-grandpa.git?tag=chainflip-v0.16.0#b48bf13c0f76f24014ad5a926182629f4cc815c9" dependencies = [ "either", - "futures 0.3.17", - "futures-timer 3.0.2", - "log 0.4.14", - "num-traits 0.2.14", - "parity-scale-codec", + "futures 0.3.21", + "futures-timer", + "log 0.4.17", + "num-traits 0.2.15", + "parity-scale-codec 3.1.2", "parking_lot 0.11.2", + "scale-info", ] [[package]] @@ -2181,22 +2385,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cfcf0ed7fe52a17a03854ec54a9f76d6d84508d1c0e66bc1793301c73fc8493c" dependencies = [ "byteorder", - "rand 0.8.4", + "rand 0.8.5", "rustc-hex", "static_assertions", ] [[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" -version = "1.0.22" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e6988e897c1c9c485f43b47a529cef42fde0547f9d8d41a7062518f1d8fc53f" +checksum = "b39522e96686d38f4bc984b9198e3a0613264abaebaff2c5c918bfa6b6da09af" dependencies = [ "cfg-if 1.0.0", "crc32fast", @@ -2211,7 +2415,7 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "98de4bbd547a563b716d8dfa9aad1cb19bfab00f4fa09a6a4ed21dbcf44ce9c4" dependencies = [ - "num-traits 0.2.14", + "num-traits 0.2.15", ] [[package]] @@ -2238,9 +2442,9 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "fork-tree" version = "3.0.0" -source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2021-09+1#04a24174cbe3ac6cc2ae16df5e312db942203107" +source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ - "parity-scale-codec", + "parity-scale-codec 3.1.2", ] [[package]] @@ -2255,124 +2459,144 @@ dependencies = [ [[package]] name = "fragile" -version = "1.0.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69a039c3498dc930fe810151a34ba0c1c70b02b8625035592e74432f678591f2" +checksum = "e9d758e60b45e8d749c89c1b389ad8aee550f86aa12e2b9298b546dda7a82ab1" [[package]] name = "frame-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2021-09+1#04a24174cbe3ac6cc2ae16df5e312db942203107" +source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ "frame-support", "frame-system", "linregress", - "log 0.4.14", - "parity-scale-codec", + "log 0.4.17", + "parity-scale-codec 3.1.2", "paste", + "scale-info", + "serde 1.0.137", "sp-api", - "sp-io", - "sp-runtime", - "sp-runtime-interface", - "sp-std", - "sp-storage", + "sp-application-crypto 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-io 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-runtime-interface 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-storage 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", ] [[package]] name = "frame-benchmarking-cli" version = "4.0.0-dev" -source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2021-09+1#04a24174cbe3ac6cc2ae16df5e312db942203107" +source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ "Inflector", "chrono", + "clap 3.1.15", "frame-benchmarking", "frame-support", + "frame-system", "handlebars", + "hash-db", + "hex", + "itertools", + "kvdb", + "lazy_static", "linked-hash-map", - "log 0.4.14", - "parity-scale-codec", + "log 0.4.17", + "memory-db", + "parity-scale-codec 3.1.2", + "prettytable-rs", + "rand 0.8.5", + "rand_pcg 0.3.1", + "sc-block-builder", "sc-cli", + "sc-client-api", "sc-client-db", "sc-executor", "sc-service", - "serde 1.0.130", - "sp-core", - "sp-externalities", - "sp-keystore", - "sp-runtime", - "sp-state-machine", - "structopt", -] - -[[package]] -name = "frame-election-provider-support" -version = "4.0.0-dev" -source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2021-09+1#04a24174cbe3ac6cc2ae16df5e312db942203107" -dependencies = [ - "frame-support", - "frame-system", - "parity-scale-codec", - "sp-arithmetic", - "sp-npos-elections", - "sp-std", + "sc-sysinfo", + "serde 1.0.137", + "serde_json", + "serde_nanos", + "sp-api", + "sp-blockchain", + "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-database", + "sp-externalities 0.12.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-inherents", + "sp-keystore 0.12.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-state-machine 0.12.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-storage 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-trie 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "tempfile", + "thiserror", + "thousands", ] [[package]] name = "frame-executive" version = "4.0.0-dev" -source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2021-09+1#04a24174cbe3ac6cc2ae16df5e312db942203107" +source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ "frame-support", "frame-system", - "parity-scale-codec", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", - "sp-tracing", + "parity-scale-codec 3.1.2", + "scale-info", + "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-io 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-tracing 5.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", ] [[package]] name = "frame-metadata" -version = "14.0.0-dev" -source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2021-09+1#04a24174cbe3ac6cc2ae16df5e312db942203107" +version = "15.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df6bb8542ef006ef0de09a5c4420787d79823c0ed7924225822362fd2bf2ff2d" dependencies = [ - "parity-scale-codec", - "serde 1.0.130", - "sp-core", - "sp-std", + "cfg-if 1.0.0", + "parity-scale-codec 3.1.2", + "scale-info", + "serde 1.0.137", ] [[package]] name = "frame-support" version = "4.0.0-dev" -source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2021-09+1#04a24174cbe3ac6cc2ae16df5e312db942203107" +source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ "bitflags", "frame-metadata", "frame-support-procedural", "impl-trait-for-tuples", - "log 0.4.14", + "k256", + "log 0.4.17", "once_cell", - "parity-scale-codec", + "parity-scale-codec 3.1.2", "paste", - "serde 1.0.130", - "smallvec 1.7.0", - "sp-arithmetic", - "sp-core", + "scale-info", + "serde 1.0.137", + "smallvec 1.8.0", + "sp-arithmetic 5.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-core-hashing-proc-macro", "sp-inherents", - "sp-io", - "sp-runtime", + "sp-io 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "sp-staking", - "sp-state-machine", - "sp-std", - "sp-tracing", + "sp-state-machine 0.12.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-tracing 5.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "tt-call", ] [[package]] name = "frame-support-procedural" version = "4.0.0-dev" -source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2021-09+1#04a24174cbe3ac6cc2ae16df5e312db942203107" +source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ "Inflector", "frame-support-procedural-tools", @@ -2384,10 +2608,10 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" version = "4.0.0-dev" -source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2021-09+1#04a24174cbe3ac6cc2ae16df5e312db942203107" +source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ "frame-support-procedural-tools-derive", - "proc-macro-crate 1.1.0", + "proc-macro-crate 1.1.3", "proc-macro2", "quote", "syn", @@ -2396,7 +2620,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2021-09+1#04a24174cbe3ac6cc2ae16df5e312db942203107" +source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ "proc-macro2", "quote", @@ -2406,51 +2630,53 @@ dependencies = [ [[package]] name = "frame-system" version = "4.0.0-dev" -source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2021-09+1#04a24174cbe3ac6cc2ae16df5e312db942203107" +source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ "frame-support", - "log 0.4.14", - "parity-scale-codec", - "serde 1.0.130", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "log 0.4.17", + "parity-scale-codec 3.1.2", + "scale-info", + "serde 1.0.137", + "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-io 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "sp-version", ] [[package]] name = "frame-system-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2021-09+1#04a24174cbe3ac6cc2ae16df5e312db942203107" +source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", - "parity-scale-codec", - "sp-core", - "sp-runtime", - "sp-std", + "parity-scale-codec 3.1.2", + "scale-info", + "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", ] [[package]] name = "frame-system-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2021-09+1#04a24174cbe3ac6cc2ae16df5e312db942203107" +source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ - "parity-scale-codec", + "parity-scale-codec 3.1.2", "sp-api", ] [[package]] name = "frame-try-runtime" version = "0.10.0-dev" -source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2021-09+1#04a24174cbe3ac6cc2ae16df5e312db942203107" +source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ "frame-support", "sp-api", - "sp-runtime", - "sp-std", + "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", ] [[package]] @@ -2509,6 +2735,12 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fed34cd105917e91daa4da6b3728c47b068749d6a62c59811f06ed2ac71d9da7" +[[package]] +name = "funty" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" + [[package]] name = "futures" version = "0.1.31" @@ -2517,9 +2749,9 @@ checksum = "3a471a38ef8ed83cd6e40aa59c1ffe17db6855c18e3604d9c4ed8c08ebc28678" [[package]] name = "futures" -version = "0.3.17" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a12aa0eb539080d55c3f2d45a67c3b58b6b0773c1a3ca2dfec66d58c97fd66ca" +checksum = "f73fe65f54d1e12b726f517d3e2135ca3125a437b6d998caf1962961f7172d9e" dependencies = [ "futures-channel", "futures-core", @@ -2532,9 +2764,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.17" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5da6ba8c3bb3c165d3c7319fc1cc8304facf1fb8db99c5de877183c08a273888" +checksum = "c3083ce4b914124575708913bca19bfe887522d6e2e6d0952943f5eac4a74010" dependencies = [ "futures-core", "futures-sink", @@ -2542,15 +2774,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.17" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88d1c26957f23603395cd326b0ffe64124b818f4449552f960d815cfba83a53d" +checksum = "0c09fd04b7e4073ac7156a9539b57a484a8ea920f79c7c675d05d289ab6110d3" [[package]] name = "futures-executor" -version = "0.3.17" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45025be030969d763025784f7f355043dc6bc74093e4ecc5000ca4dc50d8745c" +checksum = "9420b90cfa29e327d0429f19be13e7ddb68fa1cccb09d65e5706b8c7a749b8a6" dependencies = [ "futures-core", "futures-task", @@ -2560,9 +2792,9 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.17" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "522de2a0fe3e380f1bc577ba0474108faf3f6b18321dbf60b3b9c39a75073377" +checksum = "fc4045962a5a5e935ee2fdedaa4e08284547402885ab326734432bed5d12966b" [[package]] name = "futures-lite" @@ -2575,18 +2807,16 @@ dependencies = [ "futures-io", "memchr", "parking", - "pin-project-lite 0.2.7", + "pin-project-lite 0.2.9", "waker-fn", ] [[package]] name = "futures-macro" -version = "0.3.17" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18e4a4b95cea4b4ccbcf1c5675ca7c4ee4e9e75eb79944d07defde18068f79bb" +checksum = "33c1e13800337f4d4d7a316bf45a567dbcb6ffe087f16424852d97e97a91f512" dependencies = [ - "autocfg 1.0.1", - "proc-macro-hack", "proc-macro2", "quote", "syn", @@ -2599,27 +2829,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3a1387e07917c711fb4ee4f48ea0adb04a3c9739e53ef85bf43ae1edc2937a8b" dependencies = [ "futures-io", - "rustls", - "webpki", + "rustls 0.19.1", + "webpki 0.21.4", ] [[package]] name = "futures-sink" -version = "0.3.17" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36ea153c13024fe480590b3e3d4cad89a0cfacecc24577b68f86c6ced9c2bc11" +checksum = "21163e139fa306126e6eedaf49ecdb4588f939600f0b1e770f4205ee4b7fa868" [[package]] name = "futures-task" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d3d00f4eddb73e498a54394f228cd55853bdf059259e8e7bc6e69d408892e99" - -[[package]] -name = "futures-timer" -version = "2.0.2" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1de7508b218029b0f01662ed8f61b1c964b3ae99d6f25462d0f55a595109df6" +checksum = "57c66a976bf5909d801bbef33416c41372779507e7a6b3a5e25e4749c58f776a" [[package]] name = "futures-timer" @@ -2629,11 +2853,10 @@ checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c" [[package]] name = "futures-util" -version = "0.3.17" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36568465210a3a6ee45e1f165136d68671471a501e632e9a98d96872222b5481" +checksum = "d8b7abd5d659d9b90c8cba917f6ec750a74e2dc23902ef9cd4cc8c8b22e6036a" dependencies = [ - "autocfg 1.0.1", "futures 0.1.31", "futures-channel", "futures-core", @@ -2642,10 +2865,8 @@ dependencies = [ "futures-sink", "futures-task", "memchr", - "pin-project-lite 0.2.7", + "pin-project-lite 0.2.9", "pin-utils", - "proc-macro-hack", - "proc-macro-nested", "slab", ] @@ -2660,12 +2881,12 @@ dependencies = [ [[package]] name = "generic-array" -version = "0.14.4" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "501466ecc8a30d1d3b7fc9229b122b2ce8ed6e9d9223f1138d4babb253e51817" +checksum = "fd48d33ec7f05fbfa152300fdad764757cbded343c1aa1cff2fbaf4134851803" dependencies = [ "typenum", - "version_check 0.9.3", + "version_check 0.9.4", ] [[package]] @@ -2683,9 +2904,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.3" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fcd999463524c52659517fe2cea98493cfe485d10565e7b0fb07dbba7ad2753" +checksum = "9be70c98951c83b8d2f8f60d7065fa6d5146873094452a1008da8c2f1e4205ad" dependencies = [ "cfg-if 1.0.0", "js-sys", @@ -2706,21 +2927,15 @@ dependencies = [ [[package]] name = "gimli" -version = "0.24.0" +version = "0.26.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e4075386626662786ddb0ec9081e7c7eeb1ba31951f447ca780ef9f5d568189" +checksum = "78cc372d058dcf6d5ecd98510e7fbc9e5aec4d21de70f65fea8fecebcd881bd4" dependencies = [ "fallible-iterator", "indexmap", "stable_deref_trait", ] -[[package]] -name = "gimli" -version = "0.26.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78cc372d058dcf6d5ecd98510e7fbc9e5aec4d21de70f65fea8fecebcd881bd4" - [[package]] name = "glob" version = "0.3.0" @@ -2736,21 +2951,20 @@ dependencies = [ "aho-corasick", "bstr", "fnv", - "log 0.4.14", + "log 0.4.17", "regex", ] [[package]] name = "gloo-timers" -version = "0.2.1" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47204a46aaff920a1ea58b11d03dec6f704287d27561724a4631e450654a891f" +checksum = "5fb7d06c1c8cc2a29bee7ec961009a0b2caa0793ee4900c2ffb348734ba1c8f9" dependencies = [ "futures-channel", "futures-core", "js-sys", "wasm-bindgen", - "web-sys", ] [[package]] @@ -2759,16 +2973,27 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1c363a5301b8f153d80747126a04b3c82073b9fe3130571a9d170cacdeaf7912" dependencies = [ - "ff", + "ff 0.10.1", + "rand_core 0.6.3", + "subtle", +] + +[[package]] +name = "group" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc5ac374b108929de78460075f3dc439fa66df9d8fc77e8f12caa5165fcf0c89" +dependencies = [ + "ff 0.11.1", "rand_core 0.6.3", "subtle", ] [[package]] name = "h2" -version = "0.3.7" +version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fd819562fcebdac5afc5c113c3ec36f902840b70fd4fc458799c8ce4607ae55" +checksum = "37a82c6d637fc9515a4694bbf1cb2457b79d81ce52b3108bdeea58b07dd34a57" dependencies = [ "bytes 1.1.0", "fnv", @@ -2779,21 +3004,21 @@ dependencies = [ "indexmap", "slab", "tokio", - "tokio-util", + "tokio-util 0.7.1", "tracing", ] [[package]] name = "handlebars" -version = "3.5.5" +version = "4.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4498fc115fa7d34de968184e473529abb40eeb6be8bc5f7faba3d08c316cb3e3" +checksum = "99d6a30320f094710245150395bc763ad23128d6a1ebbad7594dc4164b62c56b" dependencies = [ - "log 0.4.14", + "log 0.4.17", "pest", "pest_derive", "quick-error 2.0.1", - "serde 1.0.130", + "serde 1.0.137", "serde_json", ] @@ -2821,11 +3046,20 @@ dependencies = [ "ahash", ] +[[package]] +name = "hashbrown" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db0d4cf898abf0081f964436dc980e96670a0f36863e4b83aaacdb65c9d7ccc3" +dependencies = [ + "ahash", +] + [[package]] name = "headers" -version = "0.3.5" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4c4eb0471fcb85846d8b0690695ef354f9afb11cb03cac2e1d7c9253351afb0" +checksum = "4cff78e5788be1e0ab65b04d306b2ed5092c815ec97ec70f4ebd5aee158aa55d" dependencies = [ "base64 0.13.0", "bitflags", @@ -2834,7 +3068,7 @@ dependencies = [ "http", "httpdate", "mime 0.3.16", - "sha-1 0.9.8", + "sha-1 0.10.0", ] [[package]] @@ -2855,6 +3089,12 @@ dependencies = [ "unicode-segmentation", ] +[[package]] +name = "heck" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2540771e65fc8cb83cd6e8a237f70c319bd5c29f78ed1084ba5d50eeac86f7f9" + [[package]] name = "hermit-abi" version = "0.1.19" @@ -2870,7 +3110,7 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" dependencies = [ - "serde 1.0.130", + "serde 1.0.137", ] [[package]] @@ -2912,7 +3152,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "17ea0a1394df5b6574da6e0c1ade9e78868c9fb0a4e5ef4428e32da4676b85b1" dependencies = [ "digest 0.9.0", - "generic-array 0.14.4", + "generic-array 0.14.5", "hmac 0.8.1", ] @@ -2929,13 +3169,13 @@ dependencies = [ [[package]] name = "http" -version = "0.2.5" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1323096b05d41827dadeaee54c9981958c0f94e670bc94ed80037d1a7b8b186b" +checksum = "ff8670570af52249509a86f5e3e18a08c60b177071826898fde8997cf5f6bfbb" dependencies = [ "bytes 1.1.0", "fnv", - "itoa", + "itoa 1.0.1", ] [[package]] @@ -2946,29 +3186,20 @@ checksum = "1ff4f84919677303da5f147645dbea6b1881f368d03ac84e1dc09031ebd7b2c6" dependencies = [ "bytes 1.1.0", "http", - "pin-project-lite 0.2.7", + "pin-project-lite 0.2.9", ] [[package]] name = "httparse" -version = "1.5.1" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acd94fdbe1d4ff688b67b04eee2e17bd50995534a61539e45adfefb45e5e5503" +checksum = "496ce29bb5a52785b44e0f7ca2847ae0bb839c9bd28f69acac9b99d461c0c04c" [[package]] name = "httpdate" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6456b8a6c8f33fee7d958fcd1b60d55b11940a79e63ae87013e6d22e26034440" - -[[package]] -name = "humantime" -version = "1.3.0" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df004cfca50ef23c36850aaaa59ad52cc70d0e90243c3c7737a4dd32dc7a3c4f" -dependencies = [ - "quick-error 1.2.3", -] +checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" [[package]] name = "humantime" @@ -2997,9 +3228,9 @@ dependencies = [ [[package]] name = "hyper" -version = "0.14.14" +version = "0.14.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b91bb1f221b6ea1f1e4371216b70f40748774c2fb5971b450c07773fb92d26b" +checksum = "b26ae0a80afebe130861d90abf98e3814a4f28a4c6ffeb5ab8ebb2be311e0ef2" dependencies = [ "bytes 1.1.0", "futures-channel", @@ -3010,9 +3241,9 @@ dependencies = [ "http-body", "httparse", "httpdate", - "itoa", - "pin-project-lite 0.2.7", - "socket2 0.4.2", + "itoa 1.0.1", + "pin-project-lite 0.2.9", + "socket2 0.4.4", "tokio", "tower-service", "tracing", @@ -3027,13 +3258,13 @@ checksum = "5f9f7a97316d44c0af9b0301e65010573a853a9fc97046d7331d7f6bc0fd5a64" dependencies = [ "ct-logs", "futures-util", - "hyper 0.14.14", - "log 0.4.14", - "rustls", - "rustls-native-certs", + "hyper 0.14.18", + "log 0.4.17", + "rustls 0.19.1", + "rustls-native-certs 0.5.0", "tokio", - "tokio-rustls", - "webpki", + "tokio-rustls 0.22.0", + "webpki 0.21.4", ] [[package]] @@ -3044,7 +3275,7 @@ checksum = "6eea26c5d0b6ab9d72219f65000af310f042a740926f7b2fa3553e774036e2e7" dependencies = [ "derive_builder", "dns-lookup", - "hyper 0.14.14", + "hyper 0.14.18", "tokio", "tower-service", "tracing", @@ -3057,7 +3288,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" dependencies = [ "bytes 1.1.0", - "hyper 0.14.14", + "hyper 0.14.18", "native-tls", "tokio", "tokio-native-tls", @@ -3093,9 +3324,9 @@ dependencies = [ [[package]] name = "if-addrs" -version = "0.6.6" +version = "0.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9a83ec4af652890ac713ffd8dc859e650420a5ef47f7b9be29b6664ab50fbc8" +checksum = "2273e421f7c4f0fc99e1934fe4776f59d8df2972f4199d703fc0da9f2a9f73de" dependencies = [ "if-addrs-sys", "libc", @@ -3119,12 +3350,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ae8ab7f67bad3240049cb24fb9cb0b4c2c6af4c245840917fbbdededeee91179" dependencies = [ "async-io", - "futures 0.3.17", + "futures 0.3.21", "futures-lite", "if-addrs", "ipnet", "libc", - "log 0.4.14", + "log 0.4.17", "winapi 0.3.9", ] @@ -3134,7 +3365,16 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "161ebdfec3c8e3b52bf61c4f3550a1eea4f9579d10dc1b936f3171ebdcd6c443" dependencies = [ - "parity-scale-codec", + "parity-scale-codec 2.3.1", +] + +[[package]] +name = "impl-codec" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba6a270039626615617f3f36d15fc827041df3b78c439da2cadfa47455a77f2f" +dependencies = [ + "parity-scale-codec 3.1.2", ] [[package]] @@ -3148,18 +3388,18 @@ dependencies = [ [[package]] name = "impl-serde" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b47ca4d2b6931707a55fce5cf66aff80e2178c8b63bbb4ecb5695cbc870ddf6f" +checksum = "4551f042f3438e64dbd6226b20527fc84a6e1fe65688b58746a2f53623f25f5c" dependencies = [ - "serde 1.0.130", + "serde 1.0.137", ] [[package]] name = "impl-trait-for-tuples" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5dacb10c5b3bb92d46ba347505a9041e676bb20ad220101326bffb0c93031ee" +checksum = "11d7a9f6330b71fea57921c9b61c47ee6e84f72d394754eff6163ae67e7395eb" dependencies = [ "proc-macro2", "quote", @@ -3168,13 +3408,13 @@ dependencies = [ [[package]] name = "indexmap" -version = "1.7.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc633605454125dec4b66843673f01c7df2b89479b32e0ed634e43a91cff62a5" +checksum = "0f647032dfaa1f8b6dc29bd3edb7bbef4861b8b8007ebb118d6db284fd59f6ee" dependencies = [ - "autocfg 1.0.1", - "hashbrown", - "serde 1.0.130", + "autocfg 1.1.0", + "hashbrown 0.11.2", + "serde 1.0.137", ] [[package]] @@ -3202,18 +3442,14 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "276ec31bcb4a9ee45f58bec6f9ec700ae4cf4f4f8f2fa7e06cb406bd5ffdd770" dependencies = [ - "num-traits 0.2.14", + "num-traits 0.2.15", ] [[package]] -name = "intervalier" -version = "0.4.0" +name = "io-lifetimes" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64fa110ec7b8f493f416eed552740d10e7030ad5f63b2308f82c9608ec2df275" -dependencies = [ - "futures 0.3.17", - "futures-timer 2.0.2", -] +checksum = "ec58677acfea8a15352d42fc87d11d63596ade9239e0a7c9352914417515dbe6" [[package]] name = "iovec" @@ -3226,9 +3462,9 @@ dependencies = [ [[package]] name = "ip_network" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09b746553d2f4a1ca26fab939943ddfb217a091f34f53571620a8e3d30691303" +checksum = "aa2f047c0a98b2f299aa5d6d7088443570faae494e9ae1305e48be000c9e0eb1" [[package]] name = "ipconfig" @@ -3244,9 +3480,9 @@ dependencies = [ [[package]] name = "ipnet" -version = "2.3.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68f2d64f2edebec4ce84ad108148e67e1064789bee435edc5b60ad398714a3a9" +checksum = "879d54834c8c76457ef4293a689b2a8c59b076067ad77b15efafbb05f92a592b" [[package]] name = "itertools" @@ -3263,6 +3499,12 @@ version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4" +[[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" @@ -3274,9 +3516,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.55" +version = "0.3.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cc9ffccd38c451a86bf13657df244e9c3f37493cce8e5e21e940963777acc84" +checksum = "671a26f820db17c2a2750743f1dd03bafd15b98c9f30c7c2628c024c05d73397" dependencies = [ "wasm-bindgen", ] @@ -3288,12 +3530,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2b99d4207e2a04fb4581746903c2bb7eb376f88de9c699d0f3e10feeac0cd3a" dependencies = [ "derive_more", - "futures 0.3.17", - "hyper 0.14.14", + "futures 0.3.21", + "hyper 0.14.18", "jsonrpc-core", "jsonrpc-pubsub", - "log 0.4.14", - "serde 1.0.130", + "log 0.4.17", + "serde 1.0.137", "serde_json", "tokio", "url 1.7.2", @@ -3306,11 +3548,11 @@ version = "18.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "14f7f76aef2d054868398427f6c54943cf3d1caa9a7ec7d0c38d69df97a965eb" dependencies = [ - "futures 0.3.17", + "futures 0.3.21", "futures-executor", "futures-util", - "log 0.4.14", - "serde 1.0.130", + "log 0.4.17", + "serde 1.0.137", "serde_derive", "serde_json", ] @@ -3321,7 +3563,7 @@ version = "18.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b51da17abecbdab3e3d4f26b01c5ec075e88d3abe3ab3b05dc9aa69392764ec0" dependencies = [ - "futures 0.3.17", + "futures 0.3.21", "jsonrpc-client-transports", ] @@ -3343,11 +3585,11 @@ version = "18.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e1dea6e07251d9ce6a552abfb5d7ad6bc290a4596c8dcc3d795fae2bbdc1f3ff" dependencies = [ - "futures 0.3.17", - "hyper 0.14.14", + "futures 0.3.21", + "hyper 0.14.18", "jsonrpc-core", "jsonrpc-server-utils", - "log 0.4.14", + "log 0.4.17", "net2", "parking_lot 0.11.2", "unicase 2.6.0", @@ -3359,10 +3601,10 @@ version = "18.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "382bb0206323ca7cda3dcd7e245cea86d37d02457a02a975e3378fb149a48845" dependencies = [ - "futures 0.3.17", + "futures 0.3.21", "jsonrpc-core", "jsonrpc-server-utils", - "log 0.4.14", + "log 0.4.17", "parity-tokio-ipc", "parking_lot 0.11.2", "tower-service", @@ -3374,13 +3616,13 @@ version = "18.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "240f87695e6c6f62fb37f05c02c04953cf68d6408b8c1c89de85c7a0125b1011" dependencies = [ - "futures 0.3.17", + "futures 0.3.21", "jsonrpc-core", "lazy_static", - "log 0.4.14", + "log 0.4.17", "parking_lot 0.11.2", "rand 0.7.3", - "serde 1.0.130", + "serde 1.0.137", ] [[package]] @@ -3390,14 +3632,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fa4fdea130485b572c39a460d50888beb00afb3e35de23ccd7fad8ff19f0e0d4" dependencies = [ "bytes 1.1.0", - "futures 0.3.17", + "futures 0.3.21", "globset", "jsonrpc-core", "lazy_static", - "log 0.4.14", + "log 0.4.17", "tokio", "tokio-stream", - "tokio-util", + "tokio-util 0.6.9", "unicase 2.6.0", ] @@ -3407,101 +3649,119 @@ version = "18.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f892c7d766369475ab7b0669f417906302d7c0fb521285c0a0c92e52e7c8e946" dependencies = [ - "futures 0.3.17", + "futures 0.3.21", "jsonrpc-core", "jsonrpc-server-utils", - "log 0.4.14", + "log 0.4.17", "parity-ws", "parking_lot 0.11.2", "slab", ] [[package]] -name = "jsonrpsee-http-client" -version = "0.3.1" +name = "jsonrpsee" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa96aee30f40b97f1831e6ab7ba63d65b73d73ae418e1437bae2a47bbdf3aff6" +checksum = "91dc760c341fa81173f9a434931aaf32baad5552b0230cc6c93e8fb7eaad4c19" dependencies = [ - "async-trait", - "fnv", - "futures 0.3.17", - "hyper 0.14.14", - "hyper-rustls", + "jsonrpsee-client-transport", + "jsonrpsee-core", + "jsonrpsee-proc-macros", "jsonrpsee-types", - "jsonrpsee-utils", - "log 0.4.14", - "serde 1.0.130", - "serde_json", - "thiserror", - "tokio", - "url 2.2.2", + "jsonrpsee-ws-client", ] [[package]] -name = "jsonrpsee-proc-macros" -version = "0.3.1" +name = "jsonrpsee-client-transport" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8edb341d35279b59c79d7fe9e060a51aec29d45af99cc7c72ea7caa350fa71a4" +checksum = "765f7a36d5087f74e3b3b47805c2188fef8eb54afcb587b078d9f8ebfe9c7220" dependencies = [ - "Inflector", - "bae", - "proc-macro-crate 1.1.0", - "proc-macro2", - "quote", - "syn", + "futures 0.3.21", + "http", + "jsonrpsee-core", + "jsonrpsee-types", + "pin-project 1.0.10", + "rustls-native-certs 0.6.2", + "soketto", + "thiserror", + "tokio", + "tokio-rustls 0.23.4", + "tokio-util 0.7.1", + "tracing", + "webpki-roots 0.22.3", ] [[package]] -name = "jsonrpsee-types" -version = "0.3.1" +name = "jsonrpsee-core" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cc738fd55b676ada3271ef7c383a14a0867a2a88b0fa941311bf5fc0a29d498" +checksum = "82ef77ecd20c2254d54f5da8c0738eacca61e6b6511268a8f2753e3148c6c706" dependencies = [ + "anyhow", + "arrayvec 0.7.2", "async-trait", "beef", "futures-channel", "futures-util", - "hyper 0.14.14", - "log 0.4.14", - "serde 1.0.130", + "hyper 0.14.18", + "jsonrpsee-types", + "rustc-hash", + "serde 1.0.137", "serde_json", - "soketto 0.6.0", + "soketto", "thiserror", + "tokio", + "tracing", ] [[package]] -name = "jsonrpsee-utils" -version = "0.3.1" +name = "jsonrpsee-proc-macros" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d674f0eafa768a66c5cd3ad3131c5d966b1425a475bc87be84acc6dc48321b01" +checksum = "b7291c72805bc7d413b457e50d8ef3e87aa554da65ecbbc278abb7dfc283e7f0" dependencies = [ - "futures-util", - "hyper 0.14.14", - "jsonrpsee-types", + "proc-macro-crate 1.1.3", + "proc-macro2", + "quote", + "syn", ] [[package]] -name = "jsonrpsee-ws-client" -version = "0.3.1" +name = "jsonrpsee-types" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9841352dbecf4c2ed5dc71698df9f1660262ae4e0b610e968602529bdbcf7b30" +checksum = "38b6aa52f322cbf20c762407629b8300f39bcc0cf0619840d9252a2f65fd2dd9" dependencies = [ - "async-trait", - "fnv", - "futures 0.3.17", - "jsonrpsee-types", - "log 0.4.14", - "pin-project 1.0.8", - "rustls", - "rustls-native-certs", - "serde 1.0.130", + "anyhow", + "beef", + "serde 1.0.137", "serde_json", - "soketto 0.6.0", "thiserror", - "tokio", - "tokio-rustls", - "tokio-util", - "url 2.2.2", + "tracing", +] + +[[package]] +name = "jsonrpsee-ws-client" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd66d18bab78d956df24dd0d2e41e4c00afbb818fda94a98264bdd12ce8506ac" +dependencies = [ + "jsonrpsee-client-transport", + "jsonrpsee-core", + "jsonrpsee-types", +] + +[[package]] +name = "k256" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19c3a5e0a0b8450278feda242592512e09f61c72e018b8cd5c859482802daf2d" +dependencies = [ + "cfg-if 1.0.0", + "ecdsa 0.13.4", + "elliptic-curve 0.11.12", + "sec1", ] [[package]] @@ -3526,46 +3786,46 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0de8b303297635ad57c9f5059fd9cee7a47f8e8daa09df0fcd07dd39fb22977f" dependencies = [ - "log 0.4.14", + "log 0.4.17", ] [[package]] name = "kvdb" -version = "0.10.0" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45a3f58dc069ec0e205a27f5b45920722a46faed802a0541538241af6228f512" +checksum = "a301d8ecb7989d4a6e2c57a49baca77d353bdbf879909debe3f375fe25d61f86" dependencies = [ "parity-util-mem", - "smallvec 1.7.0", + "smallvec 1.8.0", ] [[package]] name = "kvdb-memorydb" -version = "0.10.0" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3b6b85fc643f5acd0bffb2cc8a6d150209379267af0d41db72170021841f9f5" +checksum = "ece7e668abd21387aeb6628130a6f4c802787f014fa46bc83221448322250357" dependencies = [ "kvdb", "parity-util-mem", - "parking_lot 0.11.2", + "parking_lot 0.12.0", ] [[package]] name = "kvdb-rocksdb" -version = "0.14.0" +version = "0.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b1b6ea8f2536f504b645ad78419c8246550e19d2c3419a167080ce08edee35a" +checksum = "ca7fbdfd71cd663dceb0faf3367a99f8cf724514933e9867cec4995b6027cbc1" dependencies = [ "fs-swap", "kvdb", - "log 0.4.14", + "log 0.4.17", "num_cpus", "owning_ref", "parity-util-mem", - "parking_lot 0.11.2", + "parking_lot 0.12.0", "regex", "rocksdb", - "smallvec 1.7.0", + "smallvec 1.8.0", ] [[package]] @@ -3607,9 +3867,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.117" +version = "0.2.125" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e74d72e0f9b65b5b4ca49a346af3976df0f9c61d550727f349ecd559f251a26c" +checksum = "5916d2ae698f6de9bfb891ad7a8d65c09d232dc58cc4ac433c7da3b2fd84bc2b" [[package]] name = "libloading" @@ -3623,9 +3883,9 @@ dependencies = [ [[package]] name = "libloading" -version = "0.7.1" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0cf036d15402bea3c5d4de17b3fce76b3e4a56ebc1f577be0e7a72f7c607cf0" +checksum = "efbc0f03f9a775e9f6aed295c6a1ba2253c5757a9e03d55c6caa46a681abcddd" dependencies = [ "cfg-if 1.0.0", "winapi 0.3.9", @@ -3633,19 +3893,19 @@ dependencies = [ [[package]] name = "libm" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7d73b3f436185384286bd8098d17ec07c9a7d2388a6599f824d8502b529702a" +checksum = "33a33a362ce288760ec6a508b94caaec573ae7d3bbbd91b87aa0bad4456839db" [[package]] name = "libp2p" -version = "0.39.1" +version = "0.40.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9004c06878ef8f3b4b4067e69a140d87ed20bf777287f82223e49713b36ee433" +checksum = "3bec54343492ba5940a6c555e512c6721139835d28c59bc22febece72dfd0d9d" dependencies = [ "atomic", "bytes 1.1.0", - "futures 0.3.17", + "futures 0.3.21", "lazy_static", "libp2p-core", "libp2p-deflate", @@ -3655,12 +3915,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", @@ -3671,211 +3933,227 @@ dependencies = [ "libp2p-yamux", "multiaddr", "parking_lot 0.11.2", - "pin-project 1.0.8", - "smallvec 1.7.0", + "pin-project 1.0.10", + "smallvec 1.8.0", "wasm-timer", ] [[package]] name = "libp2p-core" -version = "0.29.0" +version = "0.30.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af9b4abdeaa420593a297c8592f63fad4234f4b88dc9343b8fd8e736c35faa59" +checksum = "86aad7d54df283db817becded03e611137698a6509d4237a96881976a162340c" dependencies = [ "asn1_der", "bs58", "ed25519-dalek", "either", "fnv", - "futures 0.3.17", - "futures-timer 3.0.2", + "futures 0.3.21", + "futures-timer", + "instant", "lazy_static", - "libsecp256k1 0.5.0", - "log 0.4.14", + "libsecp256k1", + "log 0.4.17", "multiaddr", "multihash 0.14.0", "multistream-select", "parking_lot 0.11.2", - "pin-project 1.0.8", + "pin-project 1.0.10", "prost", "prost-build", - "rand 0.7.3", + "rand 0.8.5", "ring", "rw-stream-sink", - "sha2 0.9.8", - "smallvec 1.7.0", + "sha2 0.9.9", + "smallvec 1.8.0", "thiserror", - "unsigned-varint 0.7.0", + "unsigned-varint 0.7.1", "void", "zeroize", ] [[package]] name = "libp2p-deflate" -version = "0.29.0" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66097fccc0b7f8579f90a03ea76ba6196332ea049fd07fd969490a06819dcdc8" +checksum = "51a800adb195f33de63f4b17b63fe64cfc23bf2c6a0d3d0d5321328664e65197" dependencies = [ "flate2", - "futures 0.3.17", + "futures 0.3.21", "libp2p-core", ] [[package]] name = "libp2p-dns" -version = "0.29.0" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58ff08b3196b85a17f202d80589e93b1660a574af67275706657fdc762e42c32" +checksum = "bb8f89d15cb6e3c5bc22afff7513b11bab7856f2872d3cfba86f7f63a06bc498" dependencies = [ "async-std-resolver", - "futures 0.3.17", + "futures 0.3.21", "libp2p-core", - "log 0.4.14", - "smallvec 1.7.0", + "log 0.4.17", + "smallvec 1.8.0", "trust-dns-resolver", ] [[package]] name = "libp2p-floodsub" -version = "0.30.0" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "404eca8720967179dac7a5b4275eb91f904a53859c69ca8d018560ad6beb214f" +checksum = "aab3d7210901ea51b7bae2b581aa34521797af8c4ec738c980bda4a06434067f" dependencies = [ "cuckoofilter", "fnv", - "futures 0.3.17", + "futures 0.3.21", "libp2p-core", "libp2p-swarm", - "log 0.4.14", + "log 0.4.17", "prost", "prost-build", "rand 0.7.3", - "smallvec 1.7.0", + "smallvec 1.8.0", ] [[package]] name = "libp2p-gossipsub" -version = "0.32.0" +version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1cc48709bcbc3a3321f08a73560b4bbb4166a7d56f6fdb615bc775f4f91058e" +checksum = "dfeead619eb5dac46e65acc78c535a60aaec803d1428cca6407c3a4fc74d698d" dependencies = [ "asynchronous-codec 0.6.0", "base64 0.13.0", "byteorder", "bytes 1.1.0", "fnv", - "futures 0.3.17", + "futures 0.3.21", "hex_fmt", "libp2p-core", "libp2p-swarm", - "log 0.4.14", + "log 0.4.17", "prost", "prost-build", "rand 0.7.3", "regex", - "sha2 0.9.8", - "smallvec 1.7.0", - "unsigned-varint 0.7.0", + "sha2 0.9.9", + "smallvec 1.8.0", + "unsigned-varint 0.7.1", "wasm-timer", ] [[package]] name = "libp2p-identify" -version = "0.30.0" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7b61f6cf07664fb97016c318c4d4512b3dd4cc07238607f3f0163245f99008e" +checksum = "cca1275574183f288ff8b72d535d5ffa5ea9292ef7829af8b47dcb197c7b0dcd" dependencies = [ - "futures 0.3.17", + "futures 0.3.21", "libp2p-core", "libp2p-swarm", - "log 0.4.14", + "log 0.4.17", + "lru 0.6.6", "prost", "prost-build", - "smallvec 1.7.0", + "smallvec 1.8.0", "wasm-timer", ] [[package]] name = "libp2p-kad" -version = "0.31.0" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50ed78489c87924235665a0ab345b298ee34dff0f7ad62c0ba6608b2144fb75e" +checksum = "a2297dc0ca285f3a09d1368bde02449e539b46f94d32d53233f53f6625bcd3ba" dependencies = [ "arrayvec 0.5.2", "asynchronous-codec 0.6.0", "bytes 1.1.0", "either", "fnv", - "futures 0.3.17", + "futures 0.3.21", "libp2p-core", "libp2p-swarm", - "log 0.4.14", + "log 0.4.17", "prost", "prost-build", "rand 0.7.3", - "sha2 0.9.8", - "smallvec 1.7.0", + "sha2 0.9.9", + "smallvec 1.8.0", "uint", - "unsigned-varint 0.7.0", + "unsigned-varint 0.7.1", "void", "wasm-timer", ] [[package]] name = "libp2p-mdns" -version = "0.31.0" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a29e6cbc2a24b8471b6567e580a0e8e7b70a6d0f0ea2be0844d1e842d7d4fa33" +checksum = "14c864b64bdc8a84ff3910a0df88e6535f256191a450870f1e7e10cbf8e64d45" dependencies = [ "async-io", "data-encoding", "dns-parser", - "futures 0.3.17", + "futures 0.3.21", "if-watch", "lazy_static", "libp2p-core", "libp2p-swarm", - "log 0.4.14", - "rand 0.8.4", - "smallvec 1.7.0", - "socket2 0.4.2", + "log 0.4.17", + "rand 0.8.5", + "smallvec 1.8.0", + "socket2 0.4.4", "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.29.0" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "313d9ea526c68df4425f580024e67a9d3ffd49f2c33de5154b1f5019816f7a99" +checksum = "7f2cd64ef597f40e14bfce0497f50ecb63dd6d201c61796daeb4227078834fbf" dependencies = [ "asynchronous-codec 0.6.0", "bytes 1.1.0", - "futures 0.3.17", + "futures 0.3.21", "libp2p-core", - "log 0.4.14", + "log 0.4.17", "nohash-hasher", "parking_lot 0.11.2", "rand 0.7.3", - "smallvec 1.7.0", - "unsigned-varint 0.7.0", + "smallvec 1.8.0", + "unsigned-varint 0.7.1", ] [[package]] name = "libp2p-noise" -version = "0.32.0" +version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f1db7212f342b6ba7c981cc40e31f76e9e56cb48e65fa4c142ecaca5839523e" +checksum = "a8772c7a99088221bb7ca9c5c0574bf55046a7ab4c319f3619b275f28c8fb87a" dependencies = [ "bytes 1.1.0", "curve25519-dalek 3.2.0", - "futures 0.3.17", + "futures 0.3.21", "lazy_static", "libp2p-core", - "log 0.4.14", + "log 0.4.17", "prost", "prost-build", - "rand 0.8.4", - "sha2 0.9.8", + "rand 0.8.5", + "sha2 0.9.9", "snow", "static_assertions", "x25519-dalek", @@ -3884,14 +4162,14 @@ dependencies = [ [[package]] name = "libp2p-ping" -version = "0.30.0" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2482cfd9eb0b7a0baaf3e7b329dc4f2785181a161b1a47b7192f8d758f54a439" +checksum = "80ef7b0ec5cf06530d9eb6cf59ae49d46a2c45663bde31c25a12f682664adbcf" dependencies = [ - "futures 0.3.17", + "futures 0.3.21", "libp2p-core", "libp2p-swarm", - "log 0.4.14", + "log 0.4.17", "rand 0.7.3", "void", "wasm-timer", @@ -3899,99 +4177,120 @@ dependencies = [ [[package]] name = "libp2p-plaintext" -version = "0.29.0" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13b4783e5423870b9a5c199f65a7a3bc66d86ab56b2b9beebf3c338d889cf8e4" +checksum = "5fba1a6ff33e4a274c89a3b1d78b9f34f32af13265cc5c46c16938262d4e945a" dependencies = [ "asynchronous-codec 0.6.0", "bytes 1.1.0", - "futures 0.3.17", + "futures 0.3.21", "libp2p-core", - "log 0.4.14", + "log 0.4.17", "prost", "prost-build", - "unsigned-varint 0.7.0", + "unsigned-varint 0.7.1", "void", ] [[package]] name = "libp2p-pnet" -version = "0.21.0" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07cb4dd4b917e5b40ddefe49b96b07adcd8d342e0317011d175b7b2bb1dcc974" +checksum = "0f1a458bbda880107b5b36fcb9b5a1ef0c329685da0e203ed692a8ebe64cc92c" dependencies = [ - "futures 0.3.17", - "log 0.4.14", - "pin-project 1.0.8", + "futures 0.3.21", + "log 0.4.17", + "pin-project 1.0.10", "rand 0.7.3", "salsa20", - "sha3", + "sha3 0.9.1", ] [[package]] name = "libp2p-relay" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0133f6cfd81cdc16e716de2982e012c62e6b9d4f12e41967b3ee361051c622aa" +checksum = "2852b61c90fa8ce3c8fcc2aba76e6cefc20d648f9df29157d6b3a916278ef3e3" dependencies = [ "asynchronous-codec 0.6.0", "bytes 1.1.0", - "futures 0.3.17", - "futures-timer 3.0.2", + "futures 0.3.21", + "futures-timer", "libp2p-core", "libp2p-swarm", - "log 0.4.14", - "pin-project 1.0.8", + "log 0.4.17", + "pin-project 1.0.10", "prost", "prost-build", "rand 0.7.3", - "smallvec 1.7.0", - "unsigned-varint 0.7.0", + "smallvec 1.8.0", + "unsigned-varint 0.7.1", + "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.21", + "libp2p-core", + "libp2p-swarm", + "log 0.4.17", + "prost", + "prost-build", + "rand 0.8.5", + "sha2 0.9.9", + "thiserror", + "unsigned-varint 0.7.1", "void", "wasm-timer", ] [[package]] name = "libp2p-request-response" -version = "0.12.0" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06cdae44b6821466123af93cbcdec7c9e6ba9534a8af9cdc296446d39416d241" +checksum = "a877a4ced6d46bf84677e1974e8cf61fb434af73b2e96fb48d6cb6223a4634d8" dependencies = [ "async-trait", "bytes 1.1.0", - "futures 0.3.17", + "futures 0.3.21", "libp2p-core", "libp2p-swarm", - "log 0.4.14", - "lru", - "minicbor", + "log 0.4.17", + "lru 0.7.5", "rand 0.7.3", - "smallvec 1.7.0", - "unsigned-varint 0.7.0", + "smallvec 1.8.0", + "unsigned-varint 0.7.1", "wasm-timer", ] [[package]] name = "libp2p-swarm" -version = "0.30.0" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7083861341e1555467863b4cd802bea1e8c4787c0f7b5110097d0f1f3248f9a9" +checksum = "3f5184a508f223bc100a12665517773fb8730e9f36fc09eefb670bf01b107ae9" dependencies = [ "either", - "futures 0.3.17", + "futures 0.3.21", "libp2p-core", - "log 0.4.14", + "log 0.4.17", "rand 0.7.3", - "smallvec 1.7.0", + "smallvec 1.8.0", "void", "wasm-timer", ] [[package]] name = "libp2p-swarm-derive" -version = "0.24.0" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab8cb308d4fc854869f5abb54fdab0833d2cf670d407c745849dc47e6e08d79c" +checksum = "072c290f727d39bdc4e9d6d1c847978693d25a673bd757813681e33e5f6c00c2" dependencies = [ "quote", "syn", @@ -3999,40 +4298,40 @@ dependencies = [ [[package]] name = "libp2p-tcp" -version = "0.29.0" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79edd26b6b4bb5feee210dcda562dca186940dfecb0024b979c3f50824b3bf28" +checksum = "7399c5b6361ef525d41c11fcf51635724f832baf5819b30d3d873eabb4fbae4b" dependencies = [ "async-io", - "futures 0.3.17", - "futures-timer 3.0.2", + "futures 0.3.21", + "futures-timer", "if-watch", "ipnet", "libc", "libp2p-core", - "log 0.4.14", - "socket2 0.4.2", + "log 0.4.17", + "socket2 0.4.4", ] [[package]] name = "libp2p-uds" -version = "0.29.0" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "280e793440dd4e9f273d714f4497325c72cddb0fe85a49f9a03c88f41dd20182" +checksum = "b8b7563e46218165dfd60f64b96f7ce84590d75f53ecbdc74a7dd01450dc5973" dependencies = [ "async-std", - "futures 0.3.17", + "futures 0.3.21", "libp2p-core", - "log 0.4.14", + "log 0.4.17", ] [[package]] name = "libp2p-wasm-ext" -version = "0.29.0" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f553b7140fad3d7a76f50497b0ea591e26737d9607428a75509fc191e4d1b1f6" +checksum = "1008a302b73c5020251f9708c653f5ed08368e530e247cc9cd2f109ff30042cf" dependencies = [ - "futures 0.3.17", + "futures 0.3.21", "js-sys", "libp2p-core", "parity-send-wrapper", @@ -4042,29 +4341,29 @@ dependencies = [ [[package]] name = "libp2p-websocket" -version = "0.30.0" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddf99dcbf5063e9d59087f61b1e85c686ceab2f5abedb472d32288065c0e5e27" +checksum = "22e12df82d1ed64969371a9e65ea92b91064658604cc2576c2757f18ead9a1cf" dependencies = [ "either", - "futures 0.3.17", + "futures 0.3.21", "futures-rustls", "libp2p-core", - "log 0.4.14", + "log 0.4.17", "quicksink", "rw-stream-sink", - "soketto 0.4.2", + "soketto", "url 2.2.2", - "webpki-roots", + "webpki-roots 0.21.1", ] [[package]] name = "libp2p-yamux" -version = "0.33.0" +version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "214cc0dd9c37cbed27f0bb1eba0c41bbafdb93a8be5e9d6ae1e6b4b42cd044bf" +checksum = "4e7362abb8867d7187e7e93df17f460d554c997fc5c8ac57dc1259057f6889af" dependencies = [ - "futures 0.3.17", + "futures 0.3.21", "libp2p-core", "parking_lot 0.11.2", "thiserror", @@ -4073,52 +4372,17 @@ dependencies = [ [[package]] name = "librocksdb-sys" -version = "6.20.3" +version = "0.6.1+6.28.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c309a9d2470844aceb9a4a098cf5286154d20596868b75a6b36357d2bb9ca25d" +checksum = "81bc587013734dadb7cf23468e531aa120788b87243648be42e2d3a072186291" dependencies = [ "bindgen", + "bzip2-sys", "cc", "glob", "libc", -] - -[[package]] -name = "libsecp256k1" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd1137239ab33b41aa9637a88a28249e5e70c40a42ccc92db7f12cc356c1fcd7" -dependencies = [ - "arrayref", - "base64 0.12.3", - "digest 0.9.0", - "hmac-drbg", - "libsecp256k1-core 0.2.2", - "libsecp256k1-gen-ecmult 0.2.1", - "libsecp256k1-gen-genmult 0.2.1", - "rand 0.7.3", - "serde 1.0.130", - "sha2 0.9.8", - "typenum", -] - -[[package]] -name = "libsecp256k1" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9d220bc1feda2ac231cb78c3d26f27676b8cf82c96971f7aeef3d0cf2797c73" -dependencies = [ - "arrayref", - "base64 0.12.3", - "digest 0.9.0", - "hmac-drbg", - "libsecp256k1-core 0.2.2", - "libsecp256k1-gen-ecmult 0.2.1", - "libsecp256k1-gen-genmult 0.2.1", - "rand 0.7.3", - "serde 1.0.130", - "sha2 0.9.8", - "typenum", + "libz-sys", + "tikv-jemalloc-sys", ] [[package]] @@ -4130,23 +4394,14 @@ dependencies = [ "arrayref", "base64 0.13.0", "digest 0.9.0", - "libsecp256k1-core 0.3.0", - "libsecp256k1-gen-ecmult 0.3.0", - "libsecp256k1-gen-genmult 0.3.0", - "rand 0.8.4", - "serde 1.0.130", - "sha2 0.9.8", -] - -[[package]] -name = "libsecp256k1-core" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0f6ab710cec28cef759c5f18671a27dae2a5f952cdaaee1d8e2908cb2478a80" -dependencies = [ - "crunchy", - "digest 0.9.0", - "subtle", + "hmac-drbg", + "libsecp256k1-core", + "libsecp256k1-gen-ecmult", + "libsecp256k1-gen-genmult", + "rand 0.8.5", + "serde 1.0.137", + "sha2 0.9.9", + "typenum", ] [[package]] @@ -4160,31 +4415,13 @@ dependencies = [ "subtle", ] -[[package]] -name = "libsecp256k1-gen-ecmult" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccab96b584d38fac86a83f07e659f0deafd0253dc096dab5a36d53efe653c5c3" -dependencies = [ - "libsecp256k1-core 0.2.2", -] - [[package]] name = "libsecp256k1-gen-ecmult" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3038c808c55c87e8a172643a7d87187fc6c4174468159cb3090659d55bcb4809" dependencies = [ - "libsecp256k1-core 0.3.0", -] - -[[package]] -name = "libsecp256k1-gen-genmult" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67abfe149395e3aa1c48a2beb32b068e2334402df8181f818d3aee2b304c4f5d" -dependencies = [ - "libsecp256k1-core 0.2.2", + "libsecp256k1-core", ] [[package]] @@ -4193,14 +4430,14 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3db8d6ba2cec9eacc40e6e8ccc98931840301f1006e95647ceb2dd5c3aa06f7c" dependencies = [ - "libsecp256k1-core 0.3.0", + "libsecp256k1-core", ] [[package]] name = "libz-sys" -version = "1.1.3" +version = "1.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de5435b8549c16d423ed0c03dbaafe57cf6c3344744f1242520d59c9d8ecec66" +checksum = "92e7e15d7610cce1d9752e137625f14e61a28cd45929b6e12e47b50fe154ee2e" dependencies = [ "cc", "pkg-config", @@ -4232,6 +4469,12 @@ dependencies = [ "statrs", ] +[[package]] +name = "linux-raw-sys" +version = "0.0.42" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5284f00d480e1c39af34e72f8ad60b94f47007e3481cd3b731c1d67190ddc7b7" + [[package]] name = "lock_api" version = "0.3.4" @@ -4243,10 +4486,11 @@ dependencies = [ [[package]] name = "lock_api" -version = "0.4.5" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712a4d093c9976e24e7dbca41db895dabcbac38eb5f4045393d17a95bdfb1109" +checksum = "327fa5b6a6940e4699ec49a9beae1ea4845c6bab9314e4f84ac68742139d8c53" dependencies = [ + "autocfg 1.1.0", "scopeguard", ] @@ -4256,14 +4500,14 @@ version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e19e8d5c34a3e0e2223db8e060f9e8264aeeb5c5fc64a4ee9965c062211c024b" dependencies = [ - "log 0.4.14", + "log 0.4.17", ] [[package]] name = "log" -version = "0.4.14" +version = "0.4.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710" +checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" dependencies = [ "cfg-if 1.0.0", "value-bag", @@ -4275,7 +4519,16 @@ version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ea2d928b485416e8908cff2d97d621db22b27f7b3b6729e438bcf42c671ba91" dependencies = [ - "hashbrown", + "hashbrown 0.11.2", +] + +[[package]] +name = "lru" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32613e41de4c47ab04970c348ca7ae7382cf116625755af070b008a15516a889" +dependencies = [ + "hashbrown 0.11.2", ] [[package]] @@ -4289,9 +4542,9 @@ dependencies = [ [[package]] name = "lz4" -version = "1.23.2" +version = "1.23.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aac20ed6991e01bf6a2e68cc73df2b389707403662a8ba89f68511fb340f724c" +checksum = "4edcb94251b1c375c459e5abe9fb0168c1c826c3370172684844f8f3f8d1a885" dependencies = [ "libc", "lz4-sys", @@ -4299,9 +4552,9 @@ dependencies = [ [[package]] name = "lz4-sys" -version = "1.9.2" +version = "1.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dca79aa95d8b3226213ad454d328369853be3a1382d89532a854f4d69640acae" +checksum = "d7be8908e2ed6f31c02db8a9fa962f03e36c53fbfde437363eae3306b85d7e17" dependencies = [ "cc", "libc", @@ -4345,9 +4598,9 @@ checksum = "a3e378b66a060d48947b590737b30a1be76706c8dd7b8ba0f2fe3989c68a853f" [[package]] name = "matrixmultiply" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a8a15b776d9dfaecd44b03c5828c2199cddff5247215858aac14624f8d6b741" +checksum = "add85d4dd35074e6fedc608f8c8f513a3548619a9024b751949ef0e8e45a4d84" dependencies = [ "rawpointer", ] @@ -4360,9 +4613,9 @@ checksum = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" [[package]] name = "memchr" -version = "2.4.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a" +checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" [[package]] name = "memmap2" @@ -4373,23 +4626,32 @@ dependencies = [ "libc", ] +[[package]] +name = "memmap2" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "057a3db23999c867821a7a59feb06a578fcb03685e983dff90daf9e7d24ac08f" +dependencies = [ + "libc", +] + [[package]] name = "memoffset" -version = "0.6.4" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59accc507f1338036a0477ef61afdae33cde60840f4dfe481319ce3ad116ddf9" +checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" dependencies = [ - "autocfg 1.0.1", + "autocfg 1.1.0", ] [[package]] name = "memory-db" -version = "0.27.0" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de006e09d04fc301a5f7e817b75aa49801c4479a8af753764416b085337ddcc5" +checksum = "6566c70c1016f525ced45d7b7f97730a2bafb037c788211d0c186ef5b2189f0a" dependencies = [ "hash-db", - "hashbrown", + "hashbrown 0.12.1", "parity-util-mem", ] @@ -4401,11 +4663,11 @@ checksum = "71d96e3f3c0b6325d8ccd83c33b28acb183edcb6c67938ba104ec546854b0882" [[package]] name = "merkle-cbt" -version = "0.3.0" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f1ac8428ec02d6caa5a79c15e851d84d5dc7a00df0429a8aa860d104f0a81be" +checksum = "171d2f700835121c3b04ccf0880882987a050fd5c7ae88148abf537d33dd3a56" dependencies = [ - "cfg-if 0.1.10", + "cfg-if 1.0.0", ] [[package]] @@ -4436,33 +4698,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" [[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" +name = "minimal-lexical" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54999f917cd092b13904737e26631aa2b2b88d625db68e4bab461dcd8006c788" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.4.4" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a92518e98c078586bc6c934028adcca4c92a53d6a958196de835170a01d84e4b" +checksum = "d2b29bd4bc3f33391105ebee3589c19197c4271e3e5a9ec9bfe8127eeff8f082" dependencies = [ "adler", - "autocfg 1.0.1", ] [[package]] @@ -4477,7 +4724,7 @@ dependencies = [ "iovec", "kernel32-sys", "libc", - "log 0.4.14", + "log 0.4.17", "miow 0.2.2", "net2", "slab", @@ -4486,14 +4733,15 @@ dependencies = [ [[package]] name = "mio" -version = "0.7.14" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8067b404fe97c70829f082dec8bcf4f71225d7eaea1d8645349cb76fa06205cc" +checksum = "52da4364ffb0e4fe33a9841a98a3f3014fb964045ce4f7a45a398243c8d6b0c9" dependencies = [ "libc", - "log 0.4.14", + "log 0.4.17", "miow 0.3.7", "ntapi", + "wasi 0.11.0+wasi-snapshot-preview1", "winapi 0.3.9", ] @@ -4504,7 +4752,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "52403fe290012ce777c4626790c8951324a2b9e3316b3143779c72b029742f19" dependencies = [ "lazycell", - "log 0.4.14", + "log 0.4.17", "mio 0.6.23", "slab", ] @@ -4559,9 +4807,9 @@ dependencies = [ [[package]] name = "more-asserts" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0debeb9fcf88823ea64d64e4a815ab1643f33127d995978e099942ce38f25238" +checksum = "7843ec2de400bcbc6a6328c958dc38e5359da6e93e72e37bc5246bf1ae776389" [[package]] name = "multiaddr" @@ -4575,9 +4823,9 @@ dependencies = [ "data-encoding", "multihash 0.14.0", "percent-encoding 2.1.0", - "serde 1.0.130", + "serde 1.0.137", "static_assertions", - "unsigned-varint 0.7.0", + "unsigned-varint 0.7.1", "url 2.2.2", ] @@ -4602,10 +4850,10 @@ dependencies = [ "blake2s_simd", "blake3", "digest 0.9.0", - "generic-array 0.14.4", + "generic-array 0.14.5", "multihash-derive", - "sha2 0.9.8", - "sha3", + "sha2 0.9.9", + "sha3 0.9.1", "unsigned-varint 0.5.1", ] @@ -4616,10 +4864,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "752a61cd890ff691b4411423d23816d5866dd5621e4d1c5687a53b94b5a979d8" dependencies = [ "digest 0.9.0", - "generic-array 0.14.4", + "generic-array 0.14.5", "multihash-derive", - "sha2 0.9.8", - "unsigned-varint 0.7.0", + "sha2 0.9.9", + "unsigned-varint 0.7.1", ] [[package]] @@ -4628,8 +4876,8 @@ version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "424f6e86263cd5294cbd7f1e95746b95aca0e0d66bff31e5a40d6baa87b4aa99" dependencies = [ - "proc-macro-crate 1.1.0", - "proc-macro-error 1.0.4", + "proc-macro-crate 1.1.3", + "proc-macro-error", "proc-macro2", "quote", "syn", @@ -4650,21 +4898,21 @@ dependencies = [ "async-trait", "bincode", "bs58", - "futures 0.3.17", + "futures 0.3.21", "jsonrpc-core", "jsonrpc-core-client", "jsonrpc-derive", "jsonrpc-pubsub", - "log 0.4.14", + "log 0.4.17", "mockall", "predicates", "sc-network", "sc-rpc", "sc-service", - "serde 1.0.130", + "serde 1.0.137", "serde_json", - "sp-core", - "sp-runtime", + "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "tokio", "tokio-stream", ] @@ -4676,11 +4924,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "56a336acba8bc87c8876f6425407dbbe6c417bf478b22015f8fb0994ef3bc0ab" dependencies = [ "bytes 1.1.0", - "futures 0.3.17", - "log 0.4.14", - "pin-project 1.0.8", - "smallvec 1.7.0", - "unsigned-varint 0.7.0", + "futures 0.3.21", + "log 0.4.17", + "pin-project 1.0.10", + "smallvec 1.8.0", + "unsigned-varint 0.7.1", ] [[package]] @@ -4694,8 +4942,8 @@ dependencies = [ "nalgebra-macros", "num-complex", "num-rational 0.4.0", - "num-traits 0.2.14", - "rand 0.8.4", + "num-traits 0.2.15", + "rand 0.8.5", "rand_distr", "simba", "typenum", @@ -4714,11 +4962,11 @@ dependencies = [ [[package]] name = "names" -version = "0.11.0" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef320dab323286b50fb5cdda23f61c796a72a89998ab565ca32525c5c556f2da" +checksum = "e7d66043b25d4a6cccb23619d10c19c25304b355a7dccd4a8e11423dd2382146" dependencies = [ - "rand 0.3.23", + "rand 0.8.5", ] [[package]] @@ -4729,13 +4977,13 @@ checksum = "729eb334247daa1803e0a094d0a5c55711b85571179f5ec6e53eccfdf7008958" [[package]] name = "native-tls" -version = "0.2.8" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48ba9f7719b5a0f42f338907614285fb5fd70e53858141f69898a1fb7203b24d" +checksum = "fd7e2f3618557f980e0b17e8856252eee3c97fa12c54dff0ca290fb6266ca4a9" dependencies = [ "lazy_static", "libc", - "log 0.4.14", + "log 0.4.17", "openssl", "openssl-probe", "openssl-sys", @@ -4762,7 +5010,7 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77a5d83df9f36fe23f0c3648c6bbb8b0298bb5f1939c8f2704431371f4b84d43" dependencies = [ - "smallvec 1.7.0", + "smallvec 1.8.0", ] [[package]] @@ -4785,19 +5033,17 @@ checksum = "ffb4262d26ed83a1c0a33a38fe2bb15797329c85770da05e6b828ddb782627af" dependencies = [ "lexical-core", "memchr", - "version_check 0.9.3", + "version_check 0.9.4", ] [[package]] name = "nom" -version = "6.1.2" +version = "7.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7413f999671bd4745a7b624bd370a569fb6bc574b23c83a3c5ed2e453f3d5e2" +checksum = "a8903e5a29a317527874d0402f867152a3d21c908bb0b933e416c65e301d4c36" dependencies = [ - "bitvec 0.19.5", - "funty", "memchr", - "version_check 0.9.3", + "minimal-lexical", ] [[package]] @@ -4808,9 +5054,9 @@ checksum = "61807f77802ff30975e01f4f071c8ba10c022052f98b3294119f3e615d13e5be" [[package]] name = "ntapi" -version = "0.3.6" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f6bb902e437b6d86e03cce10a7e2af662292c5dfef23b65899ea3ac9354ad44" +checksum = "c28774a7fd2fbb4f0babd8237ce554b73af68021b5f695a3cebd6c59bac0980f" dependencies = [ "winapi 0.3.9", ] @@ -4826,7 +5072,7 @@ dependencies = [ "num-integer", "num-iter", "num-rational 0.4.0", - "num-traits 0.2.14", + "num-traits 0.2.15", ] [[package]] @@ -4835,9 +5081,9 @@ version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "090c7f9998ee0ff65aa5b723e4009f7b217707f1fb5ea551329cc4d6231fb304" dependencies = [ - "autocfg 1.0.1", + "autocfg 1.1.0", "num-integer", - "num-traits 0.2.14", + "num-traits 0.2.15", ] [[package]] @@ -4846,39 +5092,49 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f93ab6289c7b344a8a9f60f88d80aa20032336fe78da341afc91c8a2341fc75f" dependencies = [ - "autocfg 1.0.1", + "autocfg 1.1.0", "num-integer", - "num-traits 0.2.14", + "num-traits 0.2.15", ] [[package]] name = "num-complex" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97fbc387afefefd5e9e39493299f3069e14a140dd34dc19b4c1c1a8fddb6a790" +dependencies = [ + "num-traits 0.2.15", +] + +[[package]] +name = "num-format" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26873667bbbb7c5182d4a37c1add32cdf09f841af72da53318fdb81543c15085" +checksum = "bafe4179722c2894288ee77a9f044f02811c86af699344c498b0840c698a2465" dependencies = [ - "num-traits 0.2.14", + "arrayvec 0.4.12", + "itoa 0.4.8", ] [[package]] name = "num-integer" -version = "0.1.44" +version = "0.1.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2cc698a63b549a70bc047073d2949cce27cd1c7b0a4a862d08a8031bc2801db" +checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" dependencies = [ - "autocfg 1.0.1", - "num-traits 0.2.14", + "autocfg 1.1.0", + "num-traits 0.2.15", ] [[package]] name = "num-iter" -version = "0.1.42" +version = "0.1.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2021c8337a54d21aca0d59a92577a029af9431cb59b909b03252b9c164fad59" +checksum = "7d03e6c028c5dc5cac6e2dec0efda81fc887605bb3d884578bb6d6bf7514e252" dependencies = [ - "autocfg 1.0.1", + "autocfg 1.1.0", "num-integer", - "num-traits 0.2.14", + "num-traits 0.2.15", ] [[package]] @@ -4887,10 +5143,10 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5c000134b5dbf44adc5cb772486d335293351644b801551abe8f75c84cfa4aef" dependencies = [ - "autocfg 1.0.1", + "autocfg 1.1.0", "num-bigint 0.2.6", "num-integer", - "num-traits 0.2.14", + "num-traits 0.2.15", ] [[package]] @@ -4899,10 +5155,10 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d41702bd167c2df5520b384281bc111a4b5efcf7fbc4c9c222c815b07e0a6a6a" dependencies = [ - "autocfg 1.0.1", + "autocfg 1.1.0", "num-bigint 0.4.3", "num-integer", - "num-traits 0.2.14", + "num-traits 0.2.15", ] [[package]] @@ -4911,24 +5167,24 @@ version = "0.1.43" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "92e5113e9fd4cc14ded8e499429f396a20f98c772a47cc8622a736e1ec843c31" dependencies = [ - "num-traits 0.2.14", + "num-traits 0.2.15", ] [[package]] name = "num-traits" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290" +checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" dependencies = [ - "autocfg 1.0.1", + "autocfg 1.1.0", "libm", ] [[package]] name = "num_cpus" -version = "1.13.0" +version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3" +checksum = "19e64526ebdee182341572e50e9ad03965aa510cd94427a4549448f285e957a1" dependencies = [ "hermit-abi", "libc", @@ -4936,37 +5192,38 @@ dependencies = [ [[package]] name = "num_threads" -version = "0.1.3" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97ba99ba6393e2c3734791401b66902d981cb03bf190af674ca69949b6d5fb15" +checksum = "aba1801fb138d8e85e11d0fc70baf4fe1cdfffda7c6cd34a854905df588e5ed0" dependencies = [ "libc", ] [[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", + "memchr", ] [[package]] name = "object" -version = "0.27.1" +version = "0.28.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67ac1d3f9a1d3616fd9a60c8d74296f22406a238b6a72f5cc1e6f314df4ffbf9" +checksum = "40bec70ba014595f99f7aa110b84331ffe1ee9aece7fe6f387cc7e3ecda4d456" dependencies = [ "memchr", ] [[package]] name = "once_cell" -version = "1.8.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "692fcb63b64b1758029e0a96ee63e049ce8c5948587f2f7208df04625e5f6b56" +checksum = "87f3e037eac156d1775da914196f0f37741a274155e34a0b7e427c35d2a2ecb9" [[package]] name = "opaque-debug" @@ -4981,38 +5238,79 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" [[package]] -name = "openssl" -version = "0.10.38" +name = "open-metrics-client" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c7ae222234c30df141154f159066c5093ff73b63204dcda7121eb082fc56a95" +checksum = "7337d80c23c2d8b1349563981bc4fb531220733743ba8115454a67b181173f0d" dependencies = [ - "bitflags", - "cfg-if 1.0.0", - "foreign-types", - "libc", - "once_cell", - "openssl-sys", + "dtoa", + "itoa 0.4.8", + "open-metrics-client-derive-text-encode", + "owning_ref", ] [[package]] -name = "openssl-probe" -version = "0.1.4" +name = "open-metrics-client-derive-text-encode" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28988d872ab76095a6e6ac88d99b54fd267702734fd7ffe610ca27f533ddb95a" - -[[package]] -name = "openssl-sys" -version = "0.9.70" +checksum = "a15c83b586f00268c619c1cb3340ec1a6f59dd9ba1d9833a273a68e6d5cd8ffc" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "openssl" +version = "0.10.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb81a6430ac911acb25fe5ac8f1d2af1b4ea8a4fdfda0f1ee4292af2e2d8eb0e" +dependencies = [ + "bitflags", + "cfg-if 1.0.0", + "foreign-types", + "libc", + "once_cell", + "openssl-macros", + "openssl-sys", +] + +[[package]] +name = "openssl-macros" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b501e44f11665960c7e7fcf062c7d96a14ade4aa98116c004b2e37b5be7d736c" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "openssl-probe" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" + +[[package]] +name = "openssl-sys" +version = "0.9.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6517987b3f8226b5da3661dad65ff7f300cc59fb5ea8333ca191fc65fde3edf" +checksum = "9d5fd19fb3e0a8191c1e34935718976a3e70c112ab9a24af6d7cadccd9d90bc0" dependencies = [ - "autocfg 1.0.1", + "autocfg 1.1.0", "cc", "libc", "pkg-config", "vcpkg", ] +[[package]] +name = "os_str_bytes" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e22443d1643a904602595ba1cd8f7d896afe56d26712531c5ff73a15b2fbf64" + [[package]] name = "owning_ref" version = "0.4.1" @@ -5028,9 +5326,9 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d053368e1bae4c8a672953397bd1bd7183dde1c72b0b7612a15719173148d186" dependencies = [ - "ecdsa", - "elliptic-curve", - "sha2 0.9.8", + "ecdsa 0.12.4", + "elliptic-curve 0.10.4", + "sha2 0.9.9", ] [[package]] @@ -5051,30 +5349,32 @@ dependencies = [ [[package]] name = "pallet-aura" version = "4.0.0-dev" -source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2021-09+1#04a24174cbe3ac6cc2ae16df5e312db942203107" +source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ "frame-support", "frame-system", "pallet-timestamp", - "parity-scale-codec", - "sp-application-crypto", + "parity-scale-codec 3.1.2", + "scale-info", + "sp-application-crypto 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "sp-consensus-aura", - "sp-runtime", - "sp-std", + "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", ] [[package]] name = "pallet-authorship" version = "4.0.0-dev" -source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2021-09+1#04a24174cbe3ac6cc2ae16df5e312db942203107" +source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ "frame-support", "frame-system", "impl-trait-for-tuples", - "parity-scale-codec", + "parity-scale-codec 3.1.2", + "scale-info", "sp-authorship", - "sp-runtime", - "sp-std", + "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", ] [[package]] @@ -5088,13 +5388,13 @@ dependencies = [ "frame-benchmarking", "frame-support", "frame-system", - "log 0.4.14", - "parity-scale-codec", + "log 0.4.17", + "parity-scale-codec 3.1.2", "scale-info", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-io 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", ] [[package]] @@ -5107,14 +5407,14 @@ dependencies = [ "frame-benchmarking", "frame-support", "frame-system", - "log 0.4.14", + "log 0.4.17", "pallet-cf-threshold-signature", - "parity-scale-codec", + "parity-scale-codec 3.1.2", "scale-info", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-io 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", ] [[package]] @@ -5127,15 +5427,15 @@ dependencies = [ "frame-benchmarking", "frame-support", "frame-system", - "log 0.4.14", + "log 0.4.17", "pallet-cf-flip", - "parity-scale-codec", + "parity-scale-codec 3.1.2", "scale-info", - "sp-arithmetic", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "sp-arithmetic 5.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-io 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", ] [[package]] @@ -5146,13 +5446,13 @@ dependencies = [ "frame-benchmarking", "frame-support", "frame-system", - "parity-scale-codec", + "parity-scale-codec 3.1.2", "scale-info", - "serde 1.0.130", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "serde 1.0.137", + "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-io 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", ] [[package]] @@ -5164,12 +5464,12 @@ dependencies = [ "frame-support", "frame-system", "pallet-transaction-payment", - "parity-scale-codec", + "parity-scale-codec 3.1.2", "scale-info", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-io 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", ] [[package]] @@ -5181,12 +5481,12 @@ dependencies = [ "frame-benchmarking", "frame-support", "frame-system", - "parity-scale-codec", + "parity-scale-codec 3.1.2", "scale-info", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-io 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", ] [[package]] @@ -5199,12 +5499,12 @@ dependencies = [ "frame-support", "frame-system", "pallet-cf-validator", - "parity-scale-codec", + "parity-scale-codec 3.1.2", "scale-info", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-io 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", ] [[package]] @@ -5216,14 +5516,14 @@ dependencies = [ "frame-benchmarking", "frame-support", "frame-system", - "log 0.4.14", - "parity-scale-codec", + "log 0.4.17", + "parity-scale-codec 3.1.2", "scale-info", - "serde 1.0.130", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "serde 1.0.137", + "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-io 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", ] [[package]] @@ -5236,15 +5536,15 @@ dependencies = [ "frame-benchmarking", "frame-support", "frame-system", - "log 0.4.14", + "log 0.4.17", "pallet-cf-flip", "pallet-cf-validator", - "parity-scale-codec", + "parity-scale-codec 3.1.2", "scale-info", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-io 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", ] [[package]] @@ -5258,15 +5558,15 @@ dependencies = [ "frame-support", "frame-system", "hex-literal", - "log 0.4.14", + "log 0.4.17", "pallet-cf-online", "pallet-cf-validator", - "parity-scale-codec", + "parity-scale-codec 3.1.2", "scale-info", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-io 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", ] [[package]] @@ -5280,14 +5580,14 @@ dependencies = [ "frame-benchmarking", "frame-support", "frame-system", - "log 0.4.14", + "log 0.4.17", "pallet-session", - "parity-scale-codec", + "parity-scale-codec 3.1.2", "scale-info", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-io 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", ] [[package]] @@ -5303,14 +5603,14 @@ dependencies = [ "frame-support", "frame-system", "hex", - "log 0.4.14", + "log 0.4.17", "pallet-cf-validator", - "parity-scale-codec", + "parity-scale-codec 3.1.2", "scale-info", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-io 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "utilities", ] @@ -5326,154 +5626,152 @@ dependencies = [ "frame-system", "hex", "pallet-cf-validator", - "parity-scale-codec", + "parity-scale-codec 3.1.2", "scale-info", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-io 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "utilities", ] [[package]] name = "pallet-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2021-09+1#04a24174cbe3ac6cc2ae16df5e312db942203107" +source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", - "log 0.4.14", + "log 0.4.17", "pallet-authorship", "pallet-session", - "parity-scale-codec", - "sp-application-crypto", - "sp-core", + "parity-scale-codec 3.1.2", + "scale-info", + "sp-application-crypto 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "sp-finality-grandpa", - "sp-io", - "sp-runtime", + "sp-io 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "sp-session", "sp-staking", - "sp-std", -] - -[[package]] -name = "pallet-indices" -version = "4.0.0-dev" -source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2021-09+1#04a24174cbe3ac6cc2ae16df5e312db942203107" -dependencies = [ - "frame-support", - "frame-system", - "parity-scale-codec", - "sp-core", - "sp-io", - "sp-keyring", - "sp-runtime", - "sp-std", + "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", ] [[package]] name = "pallet-randomness-collective-flip" version = "4.0.0-dev" -source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2021-09+1#04a24174cbe3ac6cc2ae16df5e312db942203107" +source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ "frame-support", "frame-system", - "parity-scale-codec", + "parity-scale-codec 3.1.2", "safe-mix", - "sp-runtime", - "sp-std", + "scale-info", + "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", ] [[package]] name = "pallet-session" version = "4.0.0-dev" -source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2021-09+1#04a24174cbe3ac6cc2ae16df5e312db942203107" +source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ "frame-support", "frame-system", "impl-trait-for-tuples", - "log 0.4.14", + "log 0.4.17", "pallet-timestamp", - "parity-scale-codec", - "sp-core", - "sp-io", - "sp-runtime", + "parity-scale-codec 3.1.2", + "scale-info", + "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-io 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "sp-session", "sp-staking", - "sp-std", - "sp-trie", -] - -[[package]] -name = "pallet-staking" -version = "4.0.0-dev" -source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2021-09+1#04a24174cbe3ac6cc2ae16df5e312db942203107" -dependencies = [ - "frame-election-provider-support", - "frame-support", - "frame-system", - "log 0.4.14", - "pallet-authorship", - "pallet-session", - "parity-scale-codec", - "serde 1.0.130", - "sp-application-crypto", - "sp-io", - "sp-runtime", - "sp-staking", - "sp-std", + "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-trie 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", ] [[package]] name = "pallet-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2021-09+1#04a24174cbe3ac6cc2ae16df5e312db942203107" +source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", - "log 0.4.14", - "parity-scale-codec", + "log 0.4.17", + "parity-scale-codec 3.1.2", + "scale-info", "sp-inherents", - "sp-io", - "sp-runtime", - "sp-std", + "sp-io 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "sp-timestamp", ] [[package]] name = "pallet-transaction-payment" version = "4.0.0-dev" -source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2021-09+1#04a24174cbe3ac6cc2ae16df5e312db942203107" +source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ "frame-support", "frame-system", - "parity-scale-codec", - "serde 1.0.130", - "smallvec 1.7.0", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "parity-scale-codec 3.1.2", + "scale-info", + "serde 1.0.137", + "smallvec 1.8.0", + "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-io 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", +] + +[[package]] +name = "pallet-transaction-payment-rpc" +version = "4.0.0-dev" +source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" +dependencies = [ + "jsonrpc-core", + "jsonrpc-core-client", + "jsonrpc-derive", + "pallet-transaction-payment-rpc-runtime-api", + "parity-scale-codec 3.1.2", + "sp-api", + "sp-blockchain", + "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-rpc", + "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", +] + +[[package]] +name = "pallet-transaction-payment-rpc-runtime-api" +version = "4.0.0-dev" +source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" +dependencies = [ + "pallet-transaction-payment", + "parity-scale-codec 3.1.2", + "sp-api", + "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", ] [[package]] name = "parity-db" -version = "0.3.3" +version = "0.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7ccc4a8687027deb53d45c5434a1f1b330c9d1069a59cfe80a62aa9a1da25ae" +checksum = "6e73cd0b0a78045276b19eaae8eaaa20e44a1da9a0217ff934a810d9492ae701" dependencies = [ "blake2-rfc", "crc32fast", "fs2", "hex", "libc", - "log 0.4.14", + "log 0.4.17", "lz4", - "memmap2", + "memmap2 0.2.3", "parking_lot 0.11.2", - "rand 0.8.4", + "rand 0.8.5", "snap", ] @@ -5487,8 +5785,22 @@ dependencies = [ "bitvec 0.20.4", "byte-slice-cast", "impl-trait-for-tuples", - "parity-scale-codec-derive", - "serde 1.0.130", + "parity-scale-codec-derive 2.3.1", + "serde 1.0.137", +] + +[[package]] +name = "parity-scale-codec" +version = "3.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8b44461635bbb1a0300f100a841e571e7d919c81c73075ef5d152ffdb521066" +dependencies = [ + "arrayvec 0.7.2", + "bitvec 1.0.0", + "byte-slice-cast", + "impl-trait-for-tuples", + "parity-scale-codec-derive 3.1.2", + "serde 1.0.137", ] [[package]] @@ -5497,7 +5809,19 @@ version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1557010476e0595c9b568d16dcfb81b93cdeb157612726f5170d31aa707bed27" dependencies = [ - "proc-macro-crate 1.1.0", + "proc-macro-crate 1.1.3", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "parity-scale-codec-derive" +version = "3.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c45ed1f39709f5a89338fab50e59816b2e8815f5bb58276e7ddf9afd495f73f8" +dependencies = [ + "proc-macro-crate 1.1.3", "proc-macro2", "quote", "syn", @@ -5515,9 +5839,9 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9981e32fb75e004cc148f5fb70342f393830e0a4aa62e3cc93b50976218d42b6" dependencies = [ - "futures 0.3.17", + "futures 0.3.21", "libc", - "log 0.4.14", + "log 0.4.17", "rand 0.7.3", "tokio", "winapi 0.3.9", @@ -5525,17 +5849,17 @@ dependencies = [ [[package]] name = "parity-util-mem" -version = "0.10.2" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f4cb4e169446179cbc6b8b6320cc9fca49bd2e94e8db25f25f200a8ea774770" +checksum = "c32561d248d352148124f036cac253a644685a21dc9fea383eb4907d7bd35a8f" dependencies = [ "cfg-if 1.0.0", - "hashbrown", + "hashbrown 0.12.1", "impl-trait-for-tuples", "parity-util-mem-derive", - "parking_lot 0.11.2", - "primitive-types", - "smallvec 1.7.0", + "parking_lot 0.12.0", + "primitive-types 0.11.1", + "smallvec 1.8.0", "winapi 0.3.9", ] @@ -5574,7 +5898,7 @@ dependencies = [ "byteorder", "bytes 0.4.12", "httparse", - "log 0.4.14", + "log 0.4.17", "mio 0.6.23", "mio-extras", "rand 0.7.3", @@ -5602,23 +5926,23 @@ dependencies = [ [[package]] name = "parking_lot" -version = "0.10.2" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3a704eb390aafdc107b0e392f56a82b668e3a71366993b5340f5833fd62505e" +checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" dependencies = [ - "lock_api 0.3.4", - "parking_lot_core 0.7.2", + "instant", + "lock_api 0.4.7", + "parking_lot_core 0.8.5", ] [[package]] name = "parking_lot" -version = "0.11.2" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" +checksum = "87f5ec2493a61ac0506c0f4199f99070cbe83857b0337006a30f3e6719b8ef58" dependencies = [ - "instant", - "lock_api 0.4.5", - "parking_lot_core 0.8.5", + "lock_api 0.4.7", + "parking_lot_core 0.9.3", ] [[package]] @@ -5638,37 +5962,36 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.7.2" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d58c7c768d4ba344e3e8d72518ac13e259d7c7ade24167003b8488e10b6740a3" +checksum = "d76e8e1493bcac0d2766c42737f34458f1c8c50c0d23bcb24ea953affb273216" dependencies = [ - "cfg-if 0.1.10", - "cloudabi", + "cfg-if 1.0.0", + "instant", "libc", - "redox_syscall 0.1.57", - "smallvec 1.7.0", + "redox_syscall 0.2.13", + "smallvec 1.8.0", "winapi 0.3.9", ] [[package]] name = "parking_lot_core" -version = "0.8.5" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d76e8e1493bcac0d2766c42737f34458f1c8c50c0d23bcb24ea953affb273216" +checksum = "09a279cbf25cb0757810394fbc1e359949b59e348145c643a939a525692e6929" dependencies = [ "cfg-if 1.0.0", - "instant", "libc", - "redox_syscall 0.2.10", - "smallvec 1.7.0", - "winapi 0.3.9", + "redox_syscall 0.2.13", + "smallvec 1.8.0", + "windows-sys", ] [[package]] name = "paste" -version = "1.0.5" +version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acbf547ad0c65e31259204bd90935776d1c693cec2f4ff7abb7a1bbbd40dfe58" +checksum = "0c520e05135d6e763148b6426a837e239041653ba7becd2e538c076c738025fc" [[package]] name = "pbkdf2" @@ -5751,9 +6074,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", @@ -5761,27 +6084,27 @@ dependencies = [ [[package]] name = "pin-project" -version = "0.4.28" +version = "0.4.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "918192b5c59119d51e0cd221f4d49dde9112824ba717369e903c97d076083d0f" +checksum = "9615c18d31137579e9ff063499264ddc1278e7b1982757ebc111028c4d1dc909" dependencies = [ - "pin-project-internal 0.4.28", + "pin-project-internal 0.4.29", ] [[package]] name = "pin-project" -version = "1.0.8" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "576bc800220cc65dac09e99e97b08b358cfab6e17078de8dc5fee223bd2d0c08" +checksum = "58ad3879ad3baf4e44784bc6a718a8698867bb991f8ce24d1bcbe2cfb4c3a75e" dependencies = [ - "pin-project-internal 1.0.8", + "pin-project-internal 1.0.10", ] [[package]] name = "pin-project-internal" -version = "0.4.28" +version = "0.4.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3be26700300be6d9d23264c73211d8190e755b6b5ca7a1b28230025511b52a5e" +checksum = "044964427019eed9d49d9d5bbce6047ef18f37100ea400912a9fa4a3523ab12a" dependencies = [ "proc-macro2", "quote", @@ -5790,9 +6113,9 @@ dependencies = [ [[package]] name = "pin-project-internal" -version = "1.0.8" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e8fe8163d14ce7f0cdac2e040116f22eac817edabff0be91e8aff7e9accf389" +checksum = "744b6f092ba29c3650faf274db506afd39944f48420f6c86b17cfe0ee1cb36bb" dependencies = [ "proc-macro2", "quote", @@ -5807,9 +6130,9 @@ checksum = "257b64915a082f7811703966789728173279bdebb956b143dbcd23f6f970a777" [[package]] name = "pin-project-lite" -version = "0.2.7" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d31d11c69a6b52a174b42bdc0c30e5e11670f90788b2c471c31c1d17d449443" +checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" [[package]] name = "pin-utils" @@ -5823,31 +6146,31 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ee3ef9b64d26bad0536099c816c6734379e45bbd5f14798def6809e5cc350447" dependencies = [ - "der", + "der 0.4.5", "spki", ] [[package]] name = "pkg-config" -version = "0.3.22" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12295df4f294471248581bc09bef3c38a5e46f1e36d6a37353621a0c6c357e1f" +checksum = "1df8c4ec4b0627e53bdf214615ad287367e482558cf84b109250b37464dc03ae" [[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" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92341d779fa34ea8437ef4d82d440d5e1ce3f3ff7f824aa64424cd481f9a1f25" +checksum = "685404d509889fade3e86fe3a5803bca2ec09b0c0778d5ada6ec8bf7a8de5259" dependencies = [ "cfg-if 1.0.0", "libc", - "log 0.4.14", + "log 0.4.17", "wepoll-ffi", "winapi 0.3.9", ] @@ -5858,7 +6181,7 @@ version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "048aeb476be11a4b6ca432ca569e375810de9294ae78f4774e78ea98a9246ede" dependencies = [ - "cpufeatures 0.2.1", + "cpufeatures 0.2.2", "opaque-debug 0.3.0", "universal-hash", ] @@ -5870,16 +6193,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8419d2b623c7c0896ff2d5d96e2cb4ede590fed28fcc34934f4c33c036e620a1" dependencies = [ "cfg-if 1.0.0", - "cpufeatures 0.2.1", + "cpufeatures 0.2.2", "opaque-debug 0.3.0", "universal-hash", ] [[package]] name = "ppv-lite86" -version = "0.2.15" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed0cfbc8191465bed66e1718596ee0b0b35d5ee1f41c5df2189d0fe8bde535ba" +checksum = "eb9f9e6e233e5c4a35559a617bf40a4ec447db2e84c20b55a6f83167b7e57872" [[package]] name = "predicates" @@ -5897,20 +6220,34 @@ dependencies = [ [[package]] name = "predicates-core" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57e35a3326b75e49aa85f5dc6ec15b41108cf5aee58eabb1f274dd18b73c2451" +checksum = "da1c2388b1513e1b605fcec39a95e0a9e8ef088f71443ef37099fa9ae6673fcb" [[package]] name = "predicates-tree" -version = "1.0.4" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "338c7be2905b732ae3984a2f40032b5e94fd8f52505b186c7d4d68d193445df7" +checksum = "4d86de6de25020a36c6d3643a86d9a6a9f552107c0559c60ea03551b5e16c032" dependencies = [ "predicates-core", "termtree", ] +[[package]] +name = "prettytable-rs" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fd04b170004fa2daccf418a7f8253aaf033c27760b5f225889024cf66d7ac2e" +dependencies = [ + "atty", + "csv", + "encode_unicode", + "lazy_static", + "term", + "unicode-width", +] + [[package]] name = "primitive-types" version = "0.10.1" @@ -5918,7 +6255,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "05e4722c697a58a99d5d06a08c30821d7c082a4632198de1eaa5a6c22ef42373" dependencies = [ "fixed-hash", - "impl-codec", + "impl-codec 0.5.1", + "impl-rlp", + "impl-serde", + "uint", +] + +[[package]] +name = "primitive-types" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e28720988bff275df1f51b171e1b2a18c30d194c4d2b61defdacecd625a5d94a" +dependencies = [ + "fixed-hash", + "impl-codec 0.6.0", "impl-rlp", "impl-serde", "scale-info", @@ -5936,51 +6286,25 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "1.1.0" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ebace6889caf889b4d3f76becee12e90353f2b8c7d875534a71e5742f8f6f83" +checksum = "e17d47ce914bf4de440332250b0edd23ce48c005f59fab39d3335866b114f11a" dependencies = [ "thiserror", "toml", ] -[[package]] -name = "proc-macro-error" -version = "0.4.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18f33027081eba0a6d8aba6d1b1c3a3be58cbb12106341c2d5759fcd9b5277e7" -dependencies = [ - "proc-macro-error-attr 0.4.12", - "proc-macro2", - "quote", - "syn", - "version_check 0.9.3", -] - [[package]] name = "proc-macro-error" version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" dependencies = [ - "proc-macro-error-attr 1.0.4", - "proc-macro2", - "quote", - "syn", - "version_check 0.9.3", -] - -[[package]] -name = "proc-macro-error-attr" -version = "0.4.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a5b4b77fdb63c1eca72173d68d24501c54ab1269409f6b672c85deb18af69de" -dependencies = [ + "proc-macro-error-attr", "proc-macro2", "quote", "syn", - "syn-mid", - "version_check 0.9.3", + "version_check 0.9.4", ] [[package]] @@ -5991,49 +6315,37 @@ checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" dependencies = [ "proc-macro2", "quote", - "version_check 0.9.3", + "version_check 0.9.4", ] -[[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.32" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba508cc11742c0dc5c1659771673afbab7a0efab23aa17e854cbab0837ed0b43" +checksum = "ec757218438d5fda206afc041538b2f6d889286160d649a86a24d37e1235afd1" 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", + "memchr", "parking_lot 0.11.2", - "regex", "thiserror", ] [[package]] name = "prost" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de5e2533f59d08fcf364fd374ebda0692a70bd6d7e66ef97f306f45c6c5d8020" +checksum = "444879275cb4fd84958b1a1d5420d15e6fcf7c235fe47f053c9c2a80aceb6001" dependencies = [ "bytes 1.1.0", "prost-derive", @@ -6041,27 +6353,29 @@ dependencies = [ [[package]] name = "prost-build" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "355f634b43cdd80724ee7848f95770e7e70eefa6dcf14fea676216573b8fd603" +checksum = "62941722fb675d463659e49c4f3fe1fe792ff24fe5bbaa9c08cd3b98a1c354f5" dependencies = [ "bytes 1.1.0", - "heck", + "heck 0.3.3", "itertools", - "log 0.4.14", + "lazy_static", + "log 0.4.17", "multimap", "petgraph", "prost", "prost-types", + "regex", "tempfile", "which", ] [[package]] name = "prost-derive" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "600d2f334aa05acb02a755e217ef1ab6dea4d51b58b7846588b747edec04efba" +checksum = "f9cc1a3263e07e0bf68e96268f37665207b49560d98739662cdfaae215c720fe" dependencies = [ "anyhow", "itertools", @@ -6072,9 +6386,9 @@ dependencies = [ [[package]] name = "prost-types" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "603bbd6394701d13f3f25aada59c7de9d35a6a5887cfc156181234a44002771b" +checksum = "534b7a0e836e3c482d2693070f982e39e7611da9695d4d1f5a4b186b51faef0a" dependencies = [ "bytes 1.1.0", "prost", @@ -6082,9 +6396,9 @@ dependencies = [ [[package]] name = "psm" -version = "0.1.16" +version = "0.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd136ff4382c4753fc061cb9e4712ab2af263376b95bbd5bd8cd50c020b78e69" +checksum = "871372391786ccec00d3c5d3d6608905b3d4db263639cfe075d3b60a736d115a" dependencies = [ "cc", ] @@ -6099,9 +6413,9 @@ dependencies = [ "futures-core", "futures-util", "http", - "hyper 0.14.14", + "hyper 0.14.18", "hyper-system-resolver", - "pin-project-lite 0.2.7", + "pin-project-lite 0.2.9", "thiserror", "tokio", "tracing", @@ -6110,17 +6424,6 @@ dependencies = [ "trust-dns-proto", ] -[[package]] -name = "pwasm-utils" -version = "0.18.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "880b3384fb00b8f6ecccd5d358b93bd2201900ae3daad213791d1864f6441f5c" -dependencies = [ - "byteorder", - "log 0.4.14", - "parity-wasm 0.42.2", -] - [[package]] name = "quick-error" version = "1.2.3" @@ -6146,24 +6449,24 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.10" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38bc8cc6a5f2e3655e0899c1b848643b2562f853f114bfec7be120678e3ace05" +checksum = "a1feb54ed693b93a84e14094943b84b7c4eae204c512b7ccb95ab0c66d278ad1" dependencies = [ "proc-macro2", ] [[package]] name = "radium" -version = "0.5.3" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "941ba9d78d8e2f7ce474c015eea4d9c6d25b6a3327f9832ee29a4de27f91bbb8" +checksum = "643f8f41a8ebc4c5dc4515c82bb8abd397b527fc20fd681b7c011c2aee5d44fb" [[package]] name = "radium" -version = "0.6.2" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "643f8f41a8ebc4c5dc4515c82bb8abd397b527fc20fd681b7c011c2aee5d44fb" +checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" [[package]] name = "radix_trie" @@ -6175,16 +6478,6 @@ dependencies = [ "nibble_vec", ] -[[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" @@ -6204,7 +6497,7 @@ version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6d71dacdc3c88c1fde3885a3be3fbab9f35724e6ce99467f7d9c5026132184ca" dependencies = [ - "autocfg 0.1.7", + "autocfg 0.1.8", "libc", "rand_chacha 0.1.1", "rand_core 0.4.2", @@ -6233,14 +6526,13 @@ dependencies = [ [[package]] name = "rand" -version = "0.8.4" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e7573632e6454cf6b99d7aac4ccca54be06da05aca2ef7423d22d27d4d4bcd8" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ "libc", "rand_chacha 0.3.1", "rand_core 0.6.3", - "rand_hc 0.3.1", ] [[package]] @@ -6249,7 +6541,7 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "556d3a1ca6600bfcbab7c7c91ccb085ac7fbbcd70e008a98742e7847f4f7bcef" dependencies = [ - "autocfg 0.1.7", + "autocfg 0.1.8", "rand_core 0.3.1", ] @@ -6303,17 +6595,17 @@ version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7" dependencies = [ - "getrandom 0.2.3", + "getrandom 0.2.6", ] [[package]] name = "rand_distr" -version = "0.4.2" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "964d548f8e7d12e102ef183a0de7e98180c9f8729f555897a857b96e48122d2f" +checksum = "32cb0b9bc82b0a0876c2dd994a7e7a2683d3e7390ca40e6886785ef0c7e3ee31" dependencies = [ - "num-traits 0.2.14", - "rand 0.8.4", + "num-traits 0.2.15", + "rand 0.8.5", ] [[package]] @@ -6334,15 +6626,6 @@ dependencies = [ "rand_core 0.5.1", ] -[[package]] -name = "rand_hc" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d51e9f596de227fda2ea6c84607f5558e196eeaf43c986b724ba4fb8fdf497e7" -dependencies = [ - "rand_core 0.6.3", -] - [[package]] name = "rand_isaac" version = "0.1.1" @@ -6383,7 +6666,7 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "abf9b09b01790cfe0364f52bf32995ea3c39f4d2dd011eac241d2914146d0b44" dependencies = [ - "autocfg 0.1.7", + "autocfg 0.1.8", "rand_core 0.4.2", ] @@ -6396,6 +6679,15 @@ dependencies = [ "rand_core 0.5.1", ] +[[package]] +name = "rand_pcg" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59cad018caf63deb318e5a4586d99a24424a364f40f1e5778c29aca23f4fc73e" +dependencies = [ + "rand_core 0.6.3", +] + [[package]] name = "rand_xorshift" version = "0.1.1" @@ -6422,11 +6714,11 @@ checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3" [[package]] name = "rayon" -version = "1.5.1" +version = "1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06aca804d41dbc8ba42dfd964f0d01334eceb64314b9ecf7c5fad5188a06d90" +checksum = "fd249e82c21598a9a426a4e00dd7adc1d640b22445ec8545feef801d1a74c221" dependencies = [ - "autocfg 1.0.1", + "autocfg 1.1.0", "crossbeam-deque", "either", "rayon-core", @@ -6434,14 +6726,13 @@ dependencies = [ [[package]] name = "rayon-core" -version = "1.9.1" +version = "1.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d78120e2c850279833f1dd3582f730c4ab53ed95aeaaaa862a2a5c71b1656d8e" +checksum = "9f51245e1e62e1f1629cbfec37b5793bbabcaeb90f30e94d2ba03564687353e4" dependencies = [ "crossbeam-channel", "crossbeam-deque", - "crossbeam-utils 0.8.5", - "lazy_static", + "crossbeam-utils 0.8.8", "num_cpus", ] @@ -6462,37 +6753,49 @@ checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" [[package]] name = "redox_syscall" -version = "0.2.10" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8383f39639269cde97d255a32bdb68c047337295414940c68bdd30c2e13203ff" +checksum = "62f25bc4c7e55e0b0b7a1d43fb893f4fa1361d0abe38b9ce4f323c2adfe6ef42" dependencies = [ "bitflags", ] [[package]] name = "redox_users" -version = "0.4.0" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de0737333e7a9502c789a36d7c7fa6092a49895d4faa31ca5df163857ded2e9d" +dependencies = [ + "getrandom 0.1.16", + "redox_syscall 0.1.57", + "rust-argon2", +] + +[[package]] +name = "redox_users" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "528532f3d801c87aec9def2add9ca802fe569e44a544afe633765267840abe64" +checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" dependencies = [ - "getrandom 0.2.3", - "redox_syscall 0.2.10", + "getrandom 0.2.6", + "redox_syscall 0.2.13", + "thiserror", ] [[package]] name = "ref-cast" -version = "1.0.6" +version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "300f2a835d808734ee295d45007adacb9ebb29dd3ae2424acfa17930cae541da" +checksum = "685d58625b6c2b83e4cc88a27c4bf65adb7b6b16dbdc413e515c9405b47432ab" dependencies = [ "ref-cast-impl", ] [[package]] name = "ref-cast-impl" -version = "1.0.6" +version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c38e3aecd2b21cb3959637b883bb3714bc7e43f0268b9a29d3743ee3e55cdd2" +checksum = "a043824e29c94169374ac5183ac0ed43f5724dc4556b19568007486bd840fa1f" dependencies = [ "proc-macro2", "quote", @@ -6501,21 +6804,20 @@ dependencies = [ [[package]] name = "regalloc" -version = "0.0.31" +version = "0.0.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "571f7f397d61c4755285cd37853fe8e03271c243424a907415909379659381c5" +checksum = "62446b1d3ebf980bdc68837700af1d77b37bc430e524bf95319c6eada2a4cc02" dependencies = [ - "log 0.4.14", + "log 0.4.17", "rustc-hash", - "serde 1.0.130", - "smallvec 1.7.0", + "smallvec 1.8.0", ] [[package]] name = "regex" -version = "1.5.4" +version = "1.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d07a8629359eb56f1e2fb1652bb04212c072a87ba68546a04065d525673ac461" +checksum = "1a11647b6b25ff05a515cb92c365cec08801e83423a235b51e231e1808747286" dependencies = [ "aho-corasick", "memchr", @@ -6552,18 +6854,17 @@ dependencies = [ [[package]] name = "remote-externalities" version = "0.10.0-dev" -source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2021-09+1#04a24174cbe3ac6cc2ae16df5e312db942203107" +source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ - "env_logger 0.9.0", - "jsonrpsee-proc-macros", - "jsonrpsee-ws-client", - "log 0.4.14", - "parity-scale-codec", - "serde 1.0.130", + "env_logger", + "jsonrpsee", + "log 0.4.17", + "parity-scale-codec 3.1.2", + "serde 1.0.137", "serde_json", - "sp-core", - "sp-io", - "sp-runtime", + "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-io 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "sp-version", ] @@ -6578,28 +6879,29 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.11.6" +version = "0.11.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66d2927ca2f685faf0fc620ac4834690d29e7abb153add10f5812eef20b5e280" +checksum = "46a1f7aa4f35e5e8b4160449f51afc758f0ce6454315a9fa7d0d113e958c41eb" dependencies = [ "base64 0.13.0", "bytes 1.1.0", "encoding_rs", "futures-core", "futures-util", + "h2", "http", "http-body", - "hyper 0.14.14", + "hyper 0.14.18", "hyper-tls", "ipnet", "js-sys", "lazy_static", - "log 0.4.14", + "log 0.4.17", "mime 0.3.16", "native-tls", "percent-encoding 2.1.0", - "pin-project-lite 0.2.7", - "serde 1.0.130", + "pin-project-lite 0.2.9", + "serde 1.0.137", "serde_json", "serde_urlencoded", "tokio", @@ -6608,7 +6910,7 @@ dependencies = [ "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "winreg 0.7.0", + "winreg 0.10.1", ] [[package]] @@ -6623,9 +6925,20 @@ dependencies = [ [[package]] name = "retain_mut" -version = "0.1.4" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c31b5c4033f8fdde8700e4657be2c497e7288f01515be52168c631e2e4d4086" + +[[package]] +name = "rfc6979" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "448296241d034b96c11173591deaa1302f2c17b56092106c1f92c1bc0183a8c9" +checksum = "96ef608575f6392792f9ecf7890c00086591d29a83910939d430753f7c050525" +dependencies = [ + "crypto-bigint 0.3.2", + "hmac 0.11.0", + "zeroize", +] [[package]] name = "ring" @@ -6665,9 +6978,9 @@ dependencies = [ [[package]] name = "rocksdb" -version = "0.17.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a62eca5cacf2c8261128631bed9f045598d40bfbe4b29f5163f0f802f8f44a7" +checksum = "620f4129485ff1a7128d184bc687470c21c7951b64779ebc9cfdad3dcd920290" dependencies = [ "libc", "librocksdb-sys", @@ -6683,6 +6996,18 @@ dependencies = [ "winapi 0.3.9", ] +[[package]] +name = "rust-argon2" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b18820d944b33caa75a71378964ac46f58517c92b6ae5f762636247c09e78fb" +dependencies = [ + "base64 0.13.0", + "blake2b_simd", + "constant_time_eq", + "crossbeam-utils 0.8.8", +] + [[package]] name = "rust-gmp-kzen" version = "0.5.1" @@ -6690,8 +7015,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0e654bb304958a567aefa09e83cc313251388202c40bfc245fac19a0e2dd8d08" dependencies = [ "libc", - "num-traits 0.2.14", - "serde 1.0.130", + "num-traits 0.2.15", + "serde 1.0.137", ] [[package]] @@ -6736,6 +7061,29 @@ dependencies = [ "semver 0.11.0", ] +[[package]] +name = "rustc_version" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +dependencies = [ + "semver 1.0.9", +] + +[[package]] +name = "rustix" +version = "0.33.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "938a344304321a9da4973b9ff4f9f8db9caf4597dfd9dda6a60b523340a0fff0" +dependencies = [ + "bitflags", + "errno", + "io-lifetimes", + "libc", + "linux-raw-sys", + "winapi 0.3.9", +] + [[package]] name = "rustls" version = "0.19.1" @@ -6743,10 +7091,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "35edb675feee39aec9c99fa5ff985081995a06d594114ae14cbe797ad7b7a6d7" dependencies = [ "base64 0.13.0", - "log 0.4.14", + "log 0.4.17", + "ring", + "sct 0.6.1", + "webpki 0.21.4", +] + +[[package]] +name = "rustls" +version = "0.20.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fbfeb8d0ddb84706bc597a5574ab8912817c52a397f819e5b614e2265206921" +dependencies = [ + "log 0.4.17", "ring", - "sct", - "webpki", + "sct 0.7.0", + "webpki 0.22.0", ] [[package]] @@ -6756,37 +7116,54 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a07b7c1885bd8ed3831c289b7870b13ef46fe0e856d288c30d9cc17d75a2092" dependencies = [ "openssl-probe", - "rustls", + "rustls 0.19.1", "schannel", "security-framework", ] [[package]] -name = "ruzstd" -version = "0.2.4" +name = "rustls-native-certs" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cada0ef59efa6a5f4dc5e491f93d9f31e3fc7758df421ff1de8a706338e1100" +checksum = "0167bac7a9f490495f3c33013e7722b53cb087ecbe082fb0c6387c96f634ea50" dependencies = [ - "byteorder", - "twox-hash", + "openssl-probe", + "rustls-pemfile", + "schannel", + "security-framework", +] + +[[package]] +name = "rustls-pemfile" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7522c9de787ff061458fe9a829dc790a3f5b22dc571694fc5883f448b94d9a9" +dependencies = [ + "base64 0.13.0", ] +[[package]] +name = "rustversion" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2cc38e8fa666e2de3c4aba7edeb5ffc5246c1c2ed0e3d17e560aeeba736b23f" + [[package]] name = "rw-stream-sink" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4da5fcb054c46f5a5dff833b129285a93d3f0179531735e6c866e8cc307d2020" dependencies = [ - "futures 0.3.17", - "pin-project 0.4.28", + "futures 0.3.21", + "pin-project 0.4.29", "static_assertions", ] [[package]] name = "ryu" -version = "1.0.5" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e" +checksum = "73b4b750c782965c211b42f022f59af1fbceabdd026623714f104152f1ec149f" [[package]] name = "safe-mix" @@ -6805,9 +7182,9 @@ checksum = "ef703b7cb59335eae2eb93ceb664c0eb7ea6bf567079d843e09420219668e072" [[package]] name = "salsa20" -version = "0.8.1" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecbd2eb639fd7cab5804a0837fe373cc2172d15437e804c054a9fb885cb923b0" +checksum = "0c0fbb5f676da676c260ba276a8f43a8dc67cf02d1438423aeb1c677a7212686" dependencies = [ "cipher", ] @@ -6823,24 +7200,24 @@ dependencies = [ [[package]] name = "sc-allocator" -version = "4.0.0-dev" -source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2021-09+1#04a24174cbe3ac6cc2ae16df5e312db942203107" +version = "4.1.0-dev" +source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ - "log 0.4.14", - "sp-core", - "sp-wasm-interface", + "log 0.4.17", + "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-wasm-interface 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "thiserror", ] [[package]] name = "sc-basic-authorship" version = "0.10.0-dev" -source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2021-09+1#04a24174cbe3ac6cc2ae16df5e312db942203107" +source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ - "futures 0.3.17", - "futures-timer 3.0.2", - "log 0.4.14", - "parity-scale-codec", + "futures 0.3.21", + "futures-timer", + "log 0.4.17", + "parity-scale-codec 3.1.2", "sc-block-builder", "sc-client-api", "sc-proposer-metrics", @@ -6849,50 +7226,51 @@ dependencies = [ "sp-api", "sp-blockchain", "sp-consensus", - "sp-core", + "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "sp-inherents", - "sp-runtime", + "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "substrate-prometheus-endpoint", ] [[package]] name = "sc-block-builder" version = "0.10.0-dev" -source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2021-09+1#04a24174cbe3ac6cc2ae16df5e312db942203107" +source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ - "parity-scale-codec", + "parity-scale-codec 3.1.2", "sc-client-api", "sp-api", "sp-block-builder", "sp-blockchain", - "sp-core", + "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "sp-inherents", - "sp-runtime", - "sp-state-machine", + "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-state-machine 0.12.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", ] [[package]] name = "sc-chain-spec" version = "4.0.0-dev" -source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2021-09+1#04a24174cbe3ac6cc2ae16df5e312db942203107" +source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ "impl-trait-for-tuples", - "parity-scale-codec", + "memmap2 0.5.3", + "parity-scale-codec 3.1.2", "sc-chain-spec-derive", "sc-network", "sc-telemetry", - "serde 1.0.130", + "serde 1.0.137", "serde_json", - "sp-core", - "sp-runtime", + "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", ] [[package]] name = "sc-chain-spec-derive" version = "4.0.0-dev" -source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2021-09+1#04a24174cbe3ac6cc2ae16df5e312db942203107" +source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ - "proc-macro-crate 1.1.0", + "proc-macro-crate 1.1.3", "proc-macro2", "quote", "syn", @@ -6901,36 +7279,37 @@ dependencies = [ [[package]] name = "sc-cli" version = "0.10.0-dev" -source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2021-09+1#04a24174cbe3ac6cc2ae16df5e312db942203107" +source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ "chrono", + "clap 3.1.15", "fdlimit", - "futures 0.3.17", + "futures 0.3.21", "hex", "libp2p", - "log 0.4.14", + "log 0.4.17", "names", - "parity-scale-codec", + "parity-scale-codec 3.1.2", "rand 0.7.3", "regex", "rpassword", "sc-client-api", + "sc-client-db", "sc-keystore", "sc-network", "sc-service", "sc-telemetry", "sc-tracing", - "serde 1.0.130", + "sc-utils", + "serde 1.0.137", "serde_json", "sp-blockchain", - "sp-core", + "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "sp-keyring", - "sp-keystore", - "sp-panic-handler", - "sp-runtime", - "sp-utils", + "sp-keystore 0.12.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-panic-handler 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "sp-version", - "structopt", "thiserror", "tiny-bip39", "tokio", @@ -6939,76 +7318,76 @@ dependencies = [ [[package]] name = "sc-client-api" version = "4.0.0-dev" -source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2021-09+1#04a24174cbe3ac6cc2ae16df5e312db942203107" +source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ "fnv", - "futures 0.3.17", + "futures 0.3.21", "hash-db", - "log 0.4.14", - "parity-scale-codec", - "parking_lot 0.11.2", + "log 0.4.17", + "parity-scale-codec 3.1.2", + "parking_lot 0.12.0", "sc-executor", "sc-transaction-pool-api", + "sc-utils", "sp-api", "sp-blockchain", "sp-consensus", - "sp-core", + "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "sp-database", - "sp-externalities", - "sp-keystore", - "sp-runtime", - "sp-state-machine", - "sp-storage", - "sp-trie", - "sp-utils", + "sp-externalities 0.12.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-keystore 0.12.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-state-machine 0.12.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-storage 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-trie 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "substrate-prometheus-endpoint", ] [[package]] name = "sc-client-db" version = "0.10.0-dev" -source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2021-09+1#04a24174cbe3ac6cc2ae16df5e312db942203107" +source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ "hash-db", "kvdb", "kvdb-memorydb", "kvdb-rocksdb", "linked-hash-map", - "log 0.4.14", + "log 0.4.17", "parity-db", - "parity-scale-codec", - "parking_lot 0.11.2", + "parity-scale-codec 3.1.2", + "parking_lot 0.12.0", "sc-client-api", "sc-state-db", - "sp-arithmetic", + "sp-arithmetic 5.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "sp-blockchain", - "sp-core", + "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "sp-database", - "sp-runtime", - "sp-state-machine", - "sp-trie", + "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-state-machine 0.12.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-trie 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", ] [[package]] name = "sc-consensus" version = "0.10.0-dev" -source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2021-09+1#04a24174cbe3ac6cc2ae16df5e312db942203107" +source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ "async-trait", - "futures 0.3.17", - "futures-timer 3.0.2", + "futures 0.3.21", + "futures-timer", "libp2p", - "log 0.4.14", - "parking_lot 0.11.2", + "log 0.4.17", + "parking_lot 0.12.0", "sc-client-api", - "serde 1.0.130", + "sc-utils", + "serde 1.0.137", "sp-api", "sp-blockchain", "sp-consensus", - "sp-core", - "sp-runtime", - "sp-state-machine", - "sp-utils", + "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-state-machine 0.12.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "substrate-prometheus-endpoint", "thiserror", ] @@ -7016,54 +7395,53 @@ dependencies = [ [[package]] name = "sc-consensus-aura" version = "0.10.0-dev" -source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2021-09+1#04a24174cbe3ac6cc2ae16df5e312db942203107" +source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ "async-trait", - "derive_more", - "futures 0.3.17", - "log 0.4.14", - "parity-scale-codec", + "futures 0.3.21", + "log 0.4.17", + "parity-scale-codec 3.1.2", "sc-block-builder", "sc-client-api", "sc-consensus", "sc-consensus-slots", "sc-telemetry", "sp-api", - "sp-application-crypto", + "sp-application-crypto 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "sp-block-builder", "sp-blockchain", "sp-consensus", "sp-consensus-aura", "sp-consensus-slots", - "sp-core", + "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "sp-inherents", - "sp-keystore", - "sp-runtime", + "sp-keystore 0.12.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "substrate-prometheus-endpoint", + "thiserror", ] [[package]] name = "sc-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2021-09+1#04a24174cbe3ac6cc2ae16df5e312db942203107" +source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ "async-trait", - "futures 0.3.17", - "futures-timer 3.0.2", - "log 0.4.14", - "parity-scale-codec", + "futures 0.3.21", + "futures-timer", + "log 0.4.17", + "parity-scale-codec 3.1.2", "sc-client-api", "sc-consensus", "sc-telemetry", - "sp-api", - "sp-arithmetic", + "sp-arithmetic 5.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "sp-blockchain", "sp-consensus", "sp-consensus-slots", - "sp-core", + "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "sp-inherents", - "sp-runtime", - "sp-state-machine", + "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-state-machine 0.12.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "sp-timestamp", "thiserror", ] @@ -7071,195 +7449,177 @@ dependencies = [ [[package]] name = "sc-executor" version = "0.10.0-dev" -source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2021-09+1#04a24174cbe3ac6cc2ae16df5e312db942203107" +source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ "lazy_static", - "libsecp256k1 0.6.0", - "log 0.4.14", - "parity-scale-codec", - "parking_lot 0.11.2", + "lru 0.7.5", + "parity-scale-codec 3.1.2", + "parking_lot 0.12.0", "sc-executor-common", "sc-executor-wasmi", "sc-executor-wasmtime", "sp-api", - "sp-core", - "sp-externalities", - "sp-io", - "sp-panic-handler", - "sp-runtime-interface", + "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-core-hashing-proc-macro", + "sp-externalities 0.12.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-io 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-panic-handler 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-runtime-interface 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "sp-tasks", - "sp-trie", + "sp-trie 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "sp-version", - "sp-wasm-interface", + "sp-wasm-interface 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "tracing", "wasmi", ] [[package]] name = "sc-executor-common" version = "0.10.0-dev" -source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2021-09+1#04a24174cbe3ac6cc2ae16df5e312db942203107" +source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ - "derive_more", - "parity-scale-codec", - "pwasm-utils", + "environmental", + "parity-scale-codec 3.1.2", "sc-allocator", - "sp-core", "sp-maybe-compressed-blob", + "sp-sandbox", "sp-serializer", - "sp-wasm-interface", + "sp-wasm-interface 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "thiserror", + "wasm-instrument", "wasmi", ] [[package]] name = "sc-executor-wasmi" version = "0.10.0-dev" -source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2021-09+1#04a24174cbe3ac6cc2ae16df5e312db942203107" +source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ - "log 0.4.14", - "parity-scale-codec", + "log 0.4.17", + "parity-scale-codec 3.1.2", "sc-allocator", "sc-executor-common", - "scoped-tls", - "sp-core", - "sp-runtime-interface", - "sp-wasm-interface", + "sp-runtime-interface 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-sandbox", + "sp-wasm-interface 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "wasmi", ] [[package]] name = "sc-executor-wasmtime" version = "0.10.0-dev" -source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2021-09+1#04a24174cbe3ac6cc2ae16df5e312db942203107" +source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ "cfg-if 1.0.0", "libc", - "log 0.4.14", - "parity-scale-codec", + "log 0.4.17", + "parity-scale-codec 3.1.2", "parity-wasm 0.42.2", "sc-allocator", "sc-executor-common", - "scoped-tls", - "sp-core", - "sp-runtime-interface", - "sp-wasm-interface", + "sp-runtime-interface 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-sandbox", + "sp-wasm-interface 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "wasmtime", ] [[package]] name = "sc-finality-grandpa" version = "0.10.0-dev" -source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2021-09+1#04a24174cbe3ac6cc2ae16df5e312db942203107" +source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ + "ahash", "async-trait", - "derive_more", "dyn-clone", "finality-grandpa", "fork-tree", - "futures 0.3.17", - "futures-timer 3.0.2", - "log 0.4.14", - "parity-scale-codec", - "parking_lot 0.11.2", - "rand 0.8.4", + "futures 0.3.21", + "futures-timer", + "hex", + "log 0.4.17", + "parity-scale-codec 3.1.2", + "parking_lot 0.12.0", + "rand 0.8.5", "sc-block-builder", + "sc-chain-spec", "sc-client-api", "sc-consensus", "sc-keystore", "sc-network", "sc-network-gossip", "sc-telemetry", + "sc-utils", "serde_json", "sp-api", - "sp-application-crypto", - "sp-arithmetic", + "sp-application-crypto 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-arithmetic 5.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "sp-blockchain", "sp-consensus", - "sp-core", + "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "sp-finality-grandpa", - "sp-keystore", - "sp-runtime", - "sp-utils", + "sp-keystore 0.12.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "substrate-prometheus-endpoint", + "thiserror", ] [[package]] name = "sc-informant" version = "0.10.0-dev" -source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2021-09+1#04a24174cbe3ac6cc2ae16df5e312db942203107" +source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ - "ansi_term 0.12.1", - "futures 0.3.17", - "futures-timer 3.0.2", - "log 0.4.14", + "ansi_term", + "futures 0.3.21", + "futures-timer", + "log 0.4.17", "parity-util-mem", "sc-client-api", "sc-network", "sc-transaction-pool-api", "sp-blockchain", - "sp-runtime", + "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", ] [[package]] name = "sc-keystore" version = "4.0.0-dev" -source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2021-09+1#04a24174cbe3ac6cc2ae16df5e312db942203107" +source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ "async-trait", - "derive_more", "hex", - "parking_lot 0.11.2", + "parking_lot 0.12.0", "serde_json", - "sp-application-crypto", - "sp-core", - "sp-keystore", -] - -[[package]] -name = "sc-light" -version = "4.0.0-dev" -source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2021-09+1#04a24174cbe3ac6cc2ae16df5e312db942203107" -dependencies = [ - "hash-db", - "parity-scale-codec", - "parking_lot 0.11.2", - "sc-client-api", - "sc-executor", - "sp-api", - "sp-blockchain", - "sp-core", - "sp-externalities", - "sp-runtime", - "sp-state-machine", + "sp-application-crypto 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-keystore 0.12.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "thiserror", ] [[package]] name = "sc-network" version = "0.10.0-dev" -source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2021-09+1#04a24174cbe3ac6cc2ae16df5e312db942203107" +source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ - "async-std", "async-trait", "asynchronous-codec 0.5.0", "bitflags", "bytes 1.1.0", "cid", - "derive_more", "either", "fnv", "fork-tree", - "futures 0.3.17", - "futures-timer 3.0.2", + "futures 0.3.21", + "futures-timer", "hex", "ip_network", "libp2p", "linked-hash-map", "linked_hash_set", - "log 0.4.14", - "lru", - "parity-scale-codec", - "parking_lot 0.11.2", - "pin-project 1.0.8", + "log 0.4.17", + "lru 0.7.5", + "parity-scale-codec 3.1.2", + "parking_lot 0.12.0", + "pin-project 1.0.10", "prost", "prost-build", "rand 0.7.3", @@ -7267,16 +7627,16 @@ dependencies = [ "sc-client-api", "sc-consensus", "sc-peerset", - "serde 1.0.130", + "sc-utils", + "serde 1.0.137", "serde_json", - "smallvec 1.7.0", - "sp-arithmetic", + "smallvec 1.8.0", + "sp-arithmetic 5.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "sp-blockchain", "sp-consensus", - "sp-core", + "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "sp-finality-grandpa", - "sp-runtime", - "sp-utils", + "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "substrate-prometheus-endpoint", "thiserror", "unsigned-varint 0.6.0", @@ -7287,15 +7647,16 @@ dependencies = [ [[package]] name = "sc-network-gossip" version = "0.10.0-dev" -source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2021-09+1#04a24174cbe3ac6cc2ae16df5e312db942203107" +source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ - "futures 0.3.17", - "futures-timer 3.0.2", + "ahash", + "futures 0.3.21", + "futures-timer", "libp2p", - "log 0.4.14", - "lru", + "log 0.4.17", + "lru 0.7.5", "sc-network", - "sp-runtime", + "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "substrate-prometheus-endpoint", "tracing", ] @@ -7303,105 +7664,107 @@ dependencies = [ [[package]] name = "sc-offchain" version = "4.0.0-dev" -source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2021-09+1#04a24174cbe3ac6cc2ae16df5e312db942203107" +source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ "bytes 1.1.0", "fnv", - "futures 0.3.17", - "futures-timer 3.0.2", + "futures 0.3.21", + "futures-timer", "hex", - "hyper 0.14.14", + "hyper 0.14.18", "hyper-rustls", - "log 0.4.14", "num_cpus", - "parity-scale-codec", - "parking_lot 0.11.2", + "once_cell", + "parity-scale-codec 3.1.2", + "parking_lot 0.12.0", "rand 0.7.3", "sc-client-api", "sc-network", + "sc-utils", "sp-api", - "sp-core", + "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "sp-offchain", - "sp-runtime", - "sp-utils", + "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "threadpool", + "tracing", ] [[package]] name = "sc-peerset" version = "4.0.0-dev" -source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2021-09+1#04a24174cbe3ac6cc2ae16df5e312db942203107" +source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ - "futures 0.3.17", + "futures 0.3.21", "libp2p", - "log 0.4.14", + "log 0.4.17", + "sc-utils", "serde_json", - "sp-utils", "wasm-timer", ] [[package]] name = "sc-proposer-metrics" -version = "0.9.0" -source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2021-09+1#04a24174cbe3ac6cc2ae16df5e312db942203107" +version = "0.10.0-dev" +source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ - "log 0.4.14", + "log 0.4.17", "substrate-prometheus-endpoint", ] [[package]] name = "sc-rpc" version = "4.0.0-dev" -source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2021-09+1#04a24174cbe3ac6cc2ae16df5e312db942203107" +source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ - "futures 0.3.17", + "futures 0.3.21", "hash-db", "jsonrpc-core", "jsonrpc-pubsub", "lazy_static", - "log 0.4.14", - "parity-scale-codec", - "parking_lot 0.11.2", + "log 0.4.17", + "parity-scale-codec 3.1.2", + "parking_lot 0.12.0", "sc-block-builder", "sc-chain-spec", "sc-client-api", "sc-rpc-api", "sc-tracing", "sc-transaction-pool-api", + "sc-utils", "serde_json", "sp-api", "sp-blockchain", - "sp-core", - "sp-keystore", + "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-keystore 0.12.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "sp-offchain", "sp-rpc", - "sp-runtime", + "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "sp-session", - "sp-utils", "sp-version", ] [[package]] name = "sc-rpc-api" version = "0.10.0-dev" -source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2021-09+1#04a24174cbe3ac6cc2ae16df5e312db942203107" +source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ - "futures 0.3.17", + "futures 0.3.21", "jsonrpc-core", "jsonrpc-core-client", "jsonrpc-derive", "jsonrpc-pubsub", - "log 0.4.14", - "parity-scale-codec", - "parking_lot 0.11.2", + "log 0.4.17", + "parity-scale-codec 3.1.2", + "parking_lot 0.12.0", "sc-chain-spec", "sc-transaction-pool-api", - "serde 1.0.130", + "scale-info", + "serde 1.0.137", "serde_json", - "sp-core", + "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "sp-rpc", - "sp-runtime", - "sp-tracing", + "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-tracing 5.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "sp-version", "thiserror", ] @@ -7409,37 +7772,38 @@ dependencies = [ [[package]] name = "sc-rpc-server" version = "4.0.0-dev" -source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2021-09+1#04a24174cbe3ac6cc2ae16df5e312db942203107" +source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ - "futures 0.3.17", + "futures 0.3.21", "jsonrpc-core", "jsonrpc-http-server", "jsonrpc-ipc-server", "jsonrpc-pubsub", "jsonrpc-ws-server", - "log 0.4.14", + "log 0.4.17", "serde_json", "substrate-prometheus-endpoint", + "tokio", ] [[package]] name = "sc-service" version = "0.10.0-dev" -source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2021-09+1#04a24174cbe3ac6cc2ae16df5e312db942203107" +source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ "async-trait", "directories", "exit-future", - "futures 0.3.17", - "futures-timer 3.0.2", + "futures 0.3.21", + "futures-timer", "hash-db", "jsonrpc-core", "jsonrpc-pubsub", - "log 0.4.14", - "parity-scale-codec", + "log 0.4.17", + "parity-scale-codec 3.1.2", "parity-util-mem", - "parking_lot 0.11.2", - "pin-project 1.0.8", + "parking_lot 0.12.0", + "pin-project 1.0.10", "rand 0.7.3", "sc-block-builder", "sc-chain-spec", @@ -7449,39 +7813,40 @@ dependencies = [ "sc-executor", "sc-informant", "sc-keystore", - "sc-light", "sc-network", "sc-offchain", "sc-rpc", "sc-rpc-server", + "sc-sysinfo", "sc-telemetry", "sc-tracing", "sc-transaction-pool", "sc-transaction-pool-api", - "serde 1.0.130", + "sc-utils", + "serde 1.0.137", "serde_json", "sp-api", - "sp-application-crypto", + "sp-application-crypto 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "sp-block-builder", "sp-blockchain", "sp-consensus", - "sp-core", - "sp-externalities", + "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-externalities 0.12.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "sp-inherents", - "sp-keystore", - "sp-runtime", + "sp-keystore 0.12.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "sp-session", - "sp-state-machine", - "sp-storage", - "sp-tracing", + "sp-state-machine 0.12.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-storage 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-tracing 5.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "sp-transaction-pool", "sp-transaction-storage-proof", - "sp-trie", - "sp-utils", + "sp-trie 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "sp-version", "substrate-prometheus-endpoint", "tempfile", "thiserror", + "tokio", "tracing", "tracing-futures", ] @@ -7489,30 +7854,49 @@ dependencies = [ [[package]] name = "sc-state-db" version = "0.10.0-dev" -source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2021-09+1#04a24174cbe3ac6cc2ae16df5e312db942203107" +source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ - "log 0.4.14", - "parity-scale-codec", + "log 0.4.17", + "parity-scale-codec 3.1.2", "parity-util-mem", "parity-util-mem-derive", - "parking_lot 0.11.2", + "parking_lot 0.12.0", "sc-client-api", - "sp-core", + "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", +] + +[[package]] +name = "sc-sysinfo" +version = "6.0.0-dev" +source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" +dependencies = [ + "futures 0.3.21", + "libc", + "log 0.4.17", + "rand 0.7.3", + "rand_pcg 0.2.1", + "regex", + "sc-telemetry", + "serde 1.0.137", + "serde_json", + "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-io 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", ] [[package]] name = "sc-telemetry" version = "4.0.0-dev" -source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2021-09+1#04a24174cbe3ac6cc2ae16df5e312db942203107" +source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ "chrono", - "futures 0.3.17", + "futures 0.3.21", "libp2p", - "log 0.4.14", - "parking_lot 0.11.2", - "pin-project 1.0.8", + "log 0.4.17", + "parking_lot 0.12.0", + "pin-project 1.0.10", "rand 0.7.3", - "serde 1.0.130", + "serde 1.0.137", "serde_json", "thiserror", "wasm-timer", @@ -7521,40 +7905,40 @@ dependencies = [ [[package]] name = "sc-tracing" version = "4.0.0-dev" -source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2021-09+1#04a24174cbe3ac6cc2ae16df5e312db942203107" +source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ - "ansi_term 0.12.1", + "ansi_term", "atty", + "chrono", "lazy_static", - "log 0.4.14", + "libc", + "log 0.4.17", "once_cell", - "parking_lot 0.11.2", + "parking_lot 0.12.0", "regex", "rustc-hash", "sc-client-api", "sc-rpc-server", "sc-tracing-proc-macro", - "serde 1.0.130", + "serde 1.0.137", "sp-api", "sp-blockchain", - "sp-core", + "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "sp-rpc", - "sp-runtime", - "sp-tracing", + "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-tracing 5.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "thiserror", "tracing", "tracing-log", "tracing-subscriber", - "wasm-bindgen", - "web-sys", ] [[package]] name = "sc-tracing-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2021-09+1#04a24174cbe3ac6cc2ae16df5e312db942203107" +source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ - "proc-macro-crate 1.1.0", + "proc-macro-crate 1.1.3", "proc-macro2", "quote", "syn", @@ -7563,26 +7947,26 @@ dependencies = [ [[package]] name = "sc-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2021-09+1#04a24174cbe3ac6cc2ae16df5e312db942203107" +source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ - "futures 0.3.17", - "intervalier", + "futures 0.3.21", + "futures-timer", "linked-hash-map", - "log 0.4.14", - "parity-scale-codec", + "log 0.4.17", + "parity-scale-codec 3.1.2", "parity-util-mem", - "parking_lot 0.11.2", + "parking_lot 0.12.0", "retain_mut", "sc-client-api", "sc-transaction-pool-api", - "serde 1.0.130", + "sc-utils", + "serde 1.0.137", "sp-api", "sp-blockchain", - "sp-core", - "sp-runtime", - "sp-tracing", + "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-tracing 5.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "sp-transaction-pool", - "sp-utils", "substrate-prometheus-endpoint", "thiserror", ] @@ -7590,37 +7974,50 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" version = "4.0.0-dev" -source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2021-09+1#04a24174cbe3ac6cc2ae16df5e312db942203107" +source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ - "derive_more", - "futures 0.3.17", - "log 0.4.14", - "serde 1.0.130", + "futures 0.3.21", + "log 0.4.17", + "serde 1.0.137", "sp-blockchain", - "sp-runtime", + "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "thiserror", ] +[[package]] +name = "sc-utils" +version = "4.0.0-dev" +source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" +dependencies = [ + "futures 0.3.21", + "futures-timer", + "lazy_static", + "log 0.4.17", + "parking_lot 0.12.0", + "prometheus", +] + [[package]] name = "scale-info" -version = "1.0.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c55b744399c25532d63a0d2789b109df8d46fc93752d46b0782991a931a782f" +checksum = "8980cafbe98a7ee7a9cc16b32ebce542c77883f512d83fbf2ddc8f6a85ea74c9" dependencies = [ - "bitvec 0.20.4", + "bitvec 1.0.0", "cfg-if 1.0.0", "derive_more", - "parity-scale-codec", + "parity-scale-codec 3.1.2", "scale-info-derive", + "serde 1.0.137", ] [[package]] name = "scale-info-derive" -version = "1.0.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baeb2780690380592f86205aa4ee49815feb2acad8c2f59e6dd207148c3f1fcd" +checksum = "4260c630e8a8a33429d1688eff2f163f24c65a4e1b1578ef6b565061336e4b6f" dependencies = [ - "proc-macro-crate 1.1.0", + "proc-macro-crate 1.1.3", "proc-macro2", "quote", "syn", @@ -7654,12 +8051,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "scoped-tls" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea6a9290e3c9cf0f18145ef7ffa62d68ee0bf5fcd651017e586dc7fd5da448c2" - [[package]] name = "scopeguard" version = "1.1.0" @@ -7676,6 +8067,28 @@ dependencies = [ "untrusted", ] +[[package]] +name = "sct" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d53dcdb7c9f8158937a7981b48accfd39a43af418591a5d008c7b22b5e1b7ca4" +dependencies = [ + "ring", + "untrusted", +] + +[[package]] +name = "sec1" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08da66b8b0965a5555b6bd6639e68ccba85e1e2506f5fbb089e93f8a04e1a2d1" +dependencies = [ + "der 0.5.1", + "generic-array 0.14.5", + "subtle", + "zeroize", +] + [[package]] name = "secp256k1" version = "0.20.3" @@ -7684,32 +8097,41 @@ checksum = "97d03ceae636d0fed5bae6a7f4f664354c5f4fcedf6eef053fef17e49f837d0a" dependencies = [ "rand 0.6.5", "secp256k1-sys", - "serde 1.0.130", + "serde 1.0.137", +] + +[[package]] +name = "secp256k1" +version = "0.21.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c42e6f1735c5f00f51e43e28d6634141f2bcad10931b2609ddd74a86d751260" +dependencies = [ + "secp256k1-sys", ] [[package]] name = "secp256k1-sys" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "827cb7cce42533829c792fc51b82fbf18b125b45a702ef2c8be77fce65463a7b" +checksum = "957da2573cde917463ece3570eab4a0b3f19de6f1646cde62e6fd3868f566036" dependencies = [ "cc", ] [[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 = "2.4.2" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "525bc1abfda2e1998d152c45cf13e696f76d0a4972310b22fac1658b05df7c87" +checksum = "2dc14f172faf8a0194a3aded622712b0de276821addc574fa54fc0a1167e10dc" dependencies = [ "bitflags", "core-foundation", @@ -7720,9 +8142,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.4.2" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9dd14d83160b528b7bfd66439110573efcfbe281b17fc2ca9f39f550d619c7e" +checksum = "0160a13a177a45bfb43ce71c01580998474f556ad854dcbca936dd2841a5c556" dependencies = [ "core-foundation-sys", "libc", @@ -7753,7 +8175,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f301af10236f6df4160f7c3f04eec6dbc70ace82d23326abad5edee88801c6b6" dependencies = [ "semver-parser 0.10.2", - "serde 1.0.130", +] + +[[package]] +name = "semver" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8cb243bdfdb5936c8dc3c45762a19d12ab4550cdc753bc247637d4ec35a040fd" +dependencies = [ + "serde 1.0.137", ] [[package]] @@ -7779,9 +8209,9 @@ checksum = "9dad3f759919b92c3068c696c15c3d17238234498bbdcc80f2c469606f948ac8" [[package]] name = "serde" -version = "1.0.130" +version = "1.0.137" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f12d06de37cf59146fbdecab66aa99f9fe4f78722e3607577a5375d66bd0c913" +checksum = "61ea8d54c77f8315140a05f4c7237403bf38b72704d031543aa1d16abbf517d1" dependencies = [ "serde_derive", ] @@ -7800,18 +8230,18 @@ dependencies = [ [[package]] name = "serde_bytes" -version = "0.11.5" +version = "0.11.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16ae07dd2f88a366f15bd0632ba725227018c69a1c8550a927324f8eb8368bb9" +checksum = "212e73464ebcde48d723aa02eb270ba62eff38a9b732df31f33f1b4e145f3a54" dependencies = [ - "serde 1.0.130", + "serde 1.0.137", ] [[package]] name = "serde_derive" -version = "1.0.130" +version = "1.0.137" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7bc1a1ab1961464eae040d96713baa5a724a8152c1222492465b54322ec508b" +checksum = "1f26faba0c3959972377d3b2d306ee9f71faee9714294e41bb777f83f88578be" dependencies = [ "proc-macro2", "quote", @@ -7820,25 +8250,34 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.68" +version = "1.0.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f690853975602e1bfe1ccbf50504d67174e3bcf340f23b5ea9992e0587a52d8" +checksum = "9b7ce2b32a1aed03c558dc61a5cd328f15aff2dbc17daad8fb8af04d2100e15c" dependencies = [ - "itoa", + "itoa 1.0.1", "ryu", - "serde 1.0.130", + "serde 1.0.137", +] + +[[package]] +name = "serde_nanos" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e44969a61f5d316be20a42ff97816efb3b407a924d06824c3d8a49fa8450de0e" +dependencies = [ + "serde 1.0.137", ] [[package]] name = "serde_urlencoded" -version = "0.7.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edfa57a7f8d9c1d260a549e7224100f6c43d43f9103e06dd8b4095a9b2b43ce9" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" dependencies = [ "form_urlencoded", - "itoa", + "itoa 1.0.1", "ryu", - "serde 1.0.130", + "serde 1.0.137", ] [[package]] @@ -7861,16 +8300,36 @@ checksum = "99cd6713db3cf16b6c84e06321e049a9b9f699826e16096d23bbcc44d15d51a6" dependencies = [ "block-buffer 0.9.0", "cfg-if 1.0.0", - "cpufeatures 0.2.1", + "cpufeatures 0.2.2", "digest 0.9.0", "opaque-debug 0.3.0", ] +[[package]] +name = "sha-1" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "028f48d513f9678cda28f6e4064755b3fbb2af6acd672f2c209b62323f7aea0f" +dependencies = [ + "cfg-if 1.0.0", + "cpufeatures 0.2.2", + "digest 0.10.3", +] + [[package]] name = "sha1" -version = "0.6.0" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1da05c97445caa12d05e848c4a4fcbbea29e748ac28f7e80e9b010392063770" +dependencies = [ + "sha1_smol", +] + +[[package]] +name = "sha1_smol" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2579985fda508104f7587689507983eadd6a6e84dd35d6d115361f530916fa0d" +checksum = "ae1a47186c03a32177042e55dbc5fd5aee900b8e0069a8d70fba96a9375cd012" [[package]] name = "sha2" @@ -7886,17 +8345,28 @@ dependencies = [ [[package]] name = "sha2" -version = "0.9.8" +version = "0.9.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b69f9a4c9740d74c5baa3fd2e547f9525fa8088a8a958e0ca2409a514e33f5fa" +checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" dependencies = [ "block-buffer 0.9.0", "cfg-if 1.0.0", - "cpufeatures 0.2.1", + "cpufeatures 0.2.2", "digest 0.9.0", "opaque-debug 0.3.0", ] +[[package]] +name = "sha2" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55deaec60f81eefe3cce0dc50bda92d6d8e88f2a27df7c5033b42afeb1ed2676" +dependencies = [ + "cfg-if 1.0.0", + "cpufeatures 0.2.2", + "digest 0.10.3", +] + [[package]] name = "sha3" version = "0.9.1" @@ -7909,6 +8379,16 @@ dependencies = [ "opaque-debug 0.3.0", ] +[[package]] +name = "sha3" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "881bf8156c87b6301fc5ca6b27f11eeb2761224c7081e69b409d5a1951a70c86" +dependencies = [ + "digest 0.10.3", + "keccak", +] + [[package]] name = "sharded-slab" version = "0.1.4" @@ -7924,16 +8404,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "43b2853a4d09f215c24cc5489c992ce46052d359b5109343cbafbf26bc62f8a3" -[[package]] -name = "signal-hook" -version = "0.3.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c98891d737e271a2954825ef19e46bd16bdb98e2746f2eec4f7a4ef7946efd1" -dependencies = [ - "libc", - "signal-hook-registry", -] - [[package]] name = "signal-hook-registry" version = "1.4.0" @@ -7961,24 +8431,21 @@ checksum = "8e82063457853d00243beda9952e910b82593e4b07ae9f721b9278a99a0d3d5c" dependencies = [ "approx", "num-complex", - "num-traits 0.2.14", + "num-traits 0.2.15", "paste", ] [[package]] name = "slab" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9def91fd1e018fe007022791f865d0ccc9b3a0d5001e01aabb8b40e46000afb5" +checksum = "eb703cfe953bccee95685111adeedb76fabe4e97549a58d16f03ea7b9367bb32" [[package]] name = "slog" version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8347046d4ebd943127157b94d63abb990fcf729dc4e9978927fdf4ac3c998d06" -dependencies = [ - "erased-serde", -] [[package]] name = "slog-async" @@ -7994,14 +8461,14 @@ dependencies = [ [[package]] name = "slog-json" -version = "2.4.0" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52e9b96fb6b5e80e371423b4aca6656eb537661ce8f82c2697e619f8ca85d043" +checksum = "3e1e53f61af1e3c8b852eef0a9dee29008f55d6dd63794f3f12cef786cf0f219" dependencies = [ - "chrono", - "serde 1.0.130", + "serde 1.0.137", "serde_json", "slog", + "time 0.3.9", ] [[package]] @@ -8015,9 +8482,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.7.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ecab6c735a6bb4139c0caafd0cc3635748bbb3acf4550e8138122099251f309" +checksum = "f2dd574626839106c320a323308629dcb1acfc96e32a8cba364ddc61ac23ee83" [[package]] name = "snap" @@ -8032,13 +8499,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6142f7c25e94f6fd25a32c3348ec230df9109b463f59c8c7acc4bd34936babb7" dependencies = [ "aes-gcm", - "blake2", + "blake2 0.9.2", "chacha20poly1305", - "rand 0.8.4", + "rand 0.8.5", "rand_core 0.6.3", "ring", "rustc_version 0.3.3", - "sha2 0.9.8", + "sha2 0.9.9", "subtle", "x25519-dalek", ] @@ -8056,9 +8523,9 @@ dependencies = [ [[package]] name = "socket2" -version = "0.4.2" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dc90fe6c7be1a323296982db1836d1ea9e47b6839496dde9a541bc496df3516" +checksum = "66d72b759436ae32898a2af0a14218dbf55efde3feeb170eb623637db85ee1e0" dependencies = [ "libc", "winapi 0.3.9", @@ -8066,63 +8533,33 @@ dependencies = [ [[package]] name = "soketto" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5c71ed3d54db0a699f4948e1bb3e45b450fa31fe602621dee6680361d569c88" -dependencies = [ - "base64 0.12.3", - "bytes 0.5.6", - "flate2", - "futures 0.3.17", - "httparse", - "log 0.4.14", - "rand 0.7.3", - "sha-1 0.9.8", -] - -[[package]] -name = "soketto" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a74e48087dbeed4833785c2f3352b59140095dc192dce966a3bfc155020a439f" -dependencies = [ - "base64 0.13.0", - "bytes 1.1.0", - "futures 0.3.17", - "httparse", - "log 0.4.14", - "rand 0.8.4", - "sha-1 0.9.8", -] - -[[package]] -name = "soketto" -version = "0.7.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "083624472e8817d44d02c0e55df043737ff11f279af924abdf93845717c2b75c" +checksum = "41d1c5305e39e09653383c2c7244f2f78b3bcae37cf50c64cb4789c9f5096ec2" dependencies = [ "base64 0.13.0", "bytes 1.1.0", - "futures 0.3.17", + "flate2", + "futures 0.3.21", "httparse", - "log 0.4.14", - "rand 0.8.4", + "log 0.4.17", + "rand 0.8.5", "sha-1 0.9.8", ] [[package]] name = "sp-api" version = "4.0.0-dev" -source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2021-09+1#04a24174cbe3ac6cc2ae16df5e312db942203107" +source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ "hash-db", - "log 0.4.14", - "parity-scale-codec", + "log 0.4.17", + "parity-scale-codec 3.1.2", "sp-api-proc-macro", - "sp-core", - "sp-runtime", - "sp-state-machine", - "sp-std", + "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-state-machine 0.12.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "sp-version", "thiserror", ] @@ -8130,10 +8567,10 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2021-09+1#04a24174cbe3ac6cc2ae16df5e312db942203107" +source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ - "blake2-rfc", - "proc-macro-crate 1.1.0", + "blake2 0.10.4", + "proc-macro-crate 1.1.3", "proc-macro2", "quote", "syn", @@ -8141,87 +8578,119 @@ dependencies = [ [[package]] name = "sp-application-crypto" -version = "4.0.0-dev" -source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2021-09+1#04a24174cbe3ac6cc2ae16df5e312db942203107" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "acb4490364cb3b097a6755343e552495b0013778152300714be4647d107e9a2e" dependencies = [ - "parity-scale-codec", - "serde 1.0.130", - "sp-core", - "sp-io", - "sp-std", + "parity-scale-codec 3.1.2", + "scale-info", + "serde 1.0.137", + "sp-core 6.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-io 6.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-std 4.0.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "sp-application-crypto" +version = "6.0.0" +source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" +dependencies = [ + "parity-scale-codec 3.1.2", + "scale-info", + "serde 1.0.137", + "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-io 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", ] [[package]] name = "sp-arithmetic" -version = "4.0.0-dev" -source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2021-09+1#04a24174cbe3ac6cc2ae16df5e312db942203107" +version = "5.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31ef21f82cc10f75ed046b65e2f8048080ee76e59f1b8aed55c7150daebfd35b" +dependencies = [ + "integer-sqrt", + "num-traits 0.2.15", + "parity-scale-codec 3.1.2", + "scale-info", + "serde 1.0.137", + "sp-debug-derive 4.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-std 4.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "static_assertions", +] + +[[package]] +name = "sp-arithmetic" +version = "5.0.0" +source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ "integer-sqrt", - "num-traits 0.2.14", - "parity-scale-codec", - "serde 1.0.130", - "sp-debug-derive", - "sp-std", + "num-traits 0.2.15", + "parity-scale-codec 3.1.2", + "scale-info", + "serde 1.0.137", + "sp-debug-derive 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "static_assertions", ] [[package]] name = "sp-authorship" version = "4.0.0-dev" -source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2021-09+1#04a24174cbe3ac6cc2ae16df5e312db942203107" +source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ "async-trait", - "parity-scale-codec", + "parity-scale-codec 3.1.2", "sp-inherents", - "sp-runtime", - "sp-std", + "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", ] [[package]] name = "sp-block-builder" version = "4.0.0-dev" -source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2021-09+1#04a24174cbe3ac6cc2ae16df5e312db942203107" +source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ - "parity-scale-codec", + "parity-scale-codec 3.1.2", "sp-api", "sp-inherents", - "sp-runtime", - "sp-std", + "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", ] [[package]] name = "sp-blockchain" version = "4.0.0-dev" -source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2021-09+1#04a24174cbe3ac6cc2ae16df5e312db942203107" +source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ - "futures 0.3.17", - "log 0.4.14", - "lru", - "parity-scale-codec", - "parking_lot 0.11.2", + "futures 0.3.21", + "log 0.4.17", + "lru 0.7.5", + "parity-scale-codec 3.1.2", + "parking_lot 0.12.0", "sp-api", "sp-consensus", "sp-database", - "sp-runtime", - "sp-state-machine", + "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-state-machine 0.12.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "thiserror", ] [[package]] name = "sp-consensus" version = "0.10.0-dev" -source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2021-09+1#04a24174cbe3ac6cc2ae16df5e312db942203107" +source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ "async-trait", - "futures 0.3.17", - "futures-timer 3.0.2", - "log 0.4.14", - "parity-scale-codec", - "sp-core", + "futures 0.3.21", + "futures-timer", + "log 0.4.17", + "parity-scale-codec 3.1.2", + "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "sp-inherents", - "sp-runtime", - "sp-state-machine", - "sp-std", + "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-state-machine 0.12.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "sp-version", "thiserror", ] @@ -8229,87 +8698,191 @@ dependencies = [ [[package]] name = "sp-consensus-aura" version = "0.10.0-dev" -source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2021-09+1#04a24174cbe3ac6cc2ae16df5e312db942203107" +source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ "async-trait", - "parity-scale-codec", + "parity-scale-codec 3.1.2", + "scale-info", "sp-api", - "sp-application-crypto", + "sp-application-crypto 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "sp-consensus", "sp-consensus-slots", "sp-inherents", - "sp-runtime", - "sp-std", + "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "sp-timestamp", ] [[package]] name = "sp-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2021-09+1#04a24174cbe3ac6cc2ae16df5e312db942203107" +source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ - "parity-scale-codec", - "sp-arithmetic", - "sp-runtime", + "parity-scale-codec 3.1.2", + "scale-info", + "serde 1.0.137", + "sp-arithmetic 5.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-timestamp", ] [[package]] name = "sp-core" -version = "4.0.0-dev" -source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2021-09+1#04a24174cbe3ac6cc2ae16df5e312db942203107" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77963e2aa8fadb589118c3aede2e78b6c4bcf1c01d588fbf33e915b390825fbd" dependencies = [ "base58", + "bitflags", "blake2-rfc", "byteorder", "dyn-clonable", "ed25519-dalek", - "futures 0.3.17", + "futures 0.3.21", "hash-db", "hash256-std-hasher", "hex", "impl-serde", "lazy_static", - "libsecp256k1 0.6.0", - "log 0.4.14", + "libsecp256k1", + "log 0.4.17", "merlin", - "num-traits 0.2.14", - "parity-scale-codec", + "num-traits 0.2.15", + "parity-scale-codec 3.1.2", "parity-util-mem", - "parking_lot 0.11.2", - "primitive-types", + "parking_lot 0.12.0", + "primitive-types 0.11.1", "rand 0.7.3", "regex", + "scale-info", "schnorrkel", + "secp256k1 0.21.3", "secrecy", - "serde 1.0.130", - "sha2 0.9.8", - "sp-debug-derive", - "sp-externalities", - "sp-runtime-interface", - "sp-std", - "sp-storage", + "serde 1.0.137", + "sp-core-hashing 4.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-debug-derive 4.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-externalities 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-runtime-interface 6.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-std 4.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-storage 6.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "ss58-registry", + "substrate-bip39", + "thiserror", + "tiny-bip39", + "wasmi", + "zeroize", +] + +[[package]] +name = "sp-core" +version = "6.0.0" +source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" +dependencies = [ + "base58", + "bitflags", + "blake2-rfc", + "byteorder", + "dyn-clonable", + "ed25519-dalek", + "futures 0.3.21", + "hash-db", + "hash256-std-hasher", + "hex", + "impl-serde", + "lazy_static", + "libsecp256k1", + "log 0.4.17", + "merlin", + "num-traits 0.2.15", + "parity-scale-codec 3.1.2", + "parity-util-mem", + "parking_lot 0.12.0", + "primitive-types 0.11.1", + "rand 0.7.3", + "regex", + "scale-info", + "schnorrkel", + "secp256k1 0.21.3", + "secrecy", + "serde 1.0.137", + "sp-core-hashing 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-debug-derive 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-externalities 0.12.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-runtime-interface 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-storage 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "ss58-registry", "substrate-bip39", "thiserror", "tiny-bip39", - "tiny-keccak", - "twox-hash", "wasmi", "zeroize", ] +[[package]] +name = "sp-core-hashing" +version = "4.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec864a6a67249f0c8dd3d5acab43623a61677e85ff4f2f9b04b802d2fe780e83" +dependencies = [ + "blake2-rfc", + "byteorder", + "sha2 0.9.9", + "sp-std 4.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tiny-keccak", + "twox-hash", +] + +[[package]] +name = "sp-core-hashing" +version = "4.0.0" +source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" +dependencies = [ + "blake2 0.10.4", + "byteorder", + "digest 0.10.3", + "sha2 0.10.2", + "sha3 0.10.1", + "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "twox-hash", +] + +[[package]] +name = "sp-core-hashing-proc-macro" +version = "5.0.0" +source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" +dependencies = [ + "proc-macro2", + "quote", + "sp-core-hashing 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "syn", +] + [[package]] name = "sp-database" version = "4.0.0-dev" -source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2021-09+1#04a24174cbe3ac6cc2ae16df5e312db942203107" +source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ "kvdb", - "parking_lot 0.11.2", + "parking_lot 0.12.0", ] [[package]] name = "sp-debug-derive" -version = "3.0.0" -source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2021-09+1#04a24174cbe3ac6cc2ae16df5e312db942203107" +version = "4.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d676664972e22a0796176e81e7bec41df461d1edf52090955cdab55f2c956ff2" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "sp-debug-derive" +version = "4.0.0" +source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ "proc-macro2", "quote", @@ -8318,325 +8891,491 @@ dependencies = [ [[package]] name = "sp-externalities" -version = "0.10.0-dev" -source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2021-09+1#04a24174cbe3ac6cc2ae16df5e312db942203107" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fcfd91f92a2a59224230a77c4a5d6f51709620c0aab4e51f108ccece6adc56f" +dependencies = [ + "environmental", + "parity-scale-codec 3.1.2", + "sp-std 4.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-storage 6.0.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "sp-externalities" +version = "0.12.0" +source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ "environmental", - "parity-scale-codec", - "sp-std", - "sp-storage", + "parity-scale-codec 3.1.2", + "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-storage 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", ] [[package]] name = "sp-finality-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2021-09+1#04a24174cbe3ac6cc2ae16df5e312db942203107" +source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ "finality-grandpa", - "log 0.4.14", - "parity-scale-codec", - "serde 1.0.130", + "log 0.4.17", + "parity-scale-codec 3.1.2", + "scale-info", + "serde 1.0.137", "sp-api", - "sp-application-crypto", - "sp-core", - "sp-keystore", - "sp-runtime", - "sp-std", + "sp-application-crypto 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-keystore 0.12.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", ] [[package]] name = "sp-inherents" version = "4.0.0-dev" -source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2021-09+1#04a24174cbe3ac6cc2ae16df5e312db942203107" +source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ "async-trait", "impl-trait-for-tuples", - "parity-scale-codec", - "sp-core", - "sp-runtime", - "sp-std", + "parity-scale-codec 3.1.2", + "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "thiserror", ] [[package]] name = "sp-io" -version = "4.0.0-dev" -source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2021-09+1#04a24174cbe3ac6cc2ae16df5e312db942203107" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "935fd3c71bad6811a7984cabb74d323b8ca3107024024c3eabb610e0182ba8d3" dependencies = [ - "futures 0.3.17", + "futures 0.3.21", "hash-db", - "libsecp256k1 0.6.0", - "log 0.4.14", - "parity-scale-codec", - "parking_lot 0.11.2", - "sp-core", - "sp-externalities", - "sp-keystore", - "sp-maybe-compressed-blob", - "sp-runtime-interface", - "sp-state-machine", - "sp-std", - "sp-tracing", - "sp-trie", - "sp-wasm-interface", + "libsecp256k1", + "log 0.4.17", + "parity-scale-codec 3.1.2", + "parking_lot 0.12.0", + "secp256k1 0.21.3", + "sp-core 6.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-externalities 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-keystore 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-runtime-interface 6.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-state-machine 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-std 4.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-tracing 5.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-trie 6.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-wasm-interface 6.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tracing", + "tracing-core", +] + +[[package]] +name = "sp-io" +version = "6.0.0" +source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" +dependencies = [ + "futures 0.3.21", + "hash-db", + "libsecp256k1", + "log 0.4.17", + "parity-scale-codec 3.1.2", + "parking_lot 0.12.0", + "secp256k1 0.21.3", + "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-externalities 0.12.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-keystore 0.12.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-runtime-interface 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-state-machine 0.12.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-tracing 5.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-trie 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-wasm-interface 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "tracing", "tracing-core", ] [[package]] name = "sp-keyring" -version = "4.0.0-dev" -source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2021-09+1#04a24174cbe3ac6cc2ae16df5e312db942203107" +version = "6.0.0" +source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ "lazy_static", - "sp-core", - "sp-runtime", + "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "strum", ] [[package]] name = "sp-keystore" -version = "0.10.0-dev" -source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2021-09+1#04a24174cbe3ac6cc2ae16df5e312db942203107" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3261eddca8c8926e3e1de136a7980cb3afc3455247d9d6f3119d9b292f73aaee" dependencies = [ "async-trait", - "derive_more", - "futures 0.3.17", + "futures 0.3.21", "merlin", - "parity-scale-codec", - "parking_lot 0.11.2", + "parity-scale-codec 3.1.2", + "parking_lot 0.12.0", "schnorrkel", - "serde 1.0.130", - "sp-core", - "sp-externalities", + "sp-core 6.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-externalities 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", + "thiserror", ] [[package]] -name = "sp-maybe-compressed-blob" -version = "4.0.0-dev" -source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2021-09+1#04a24174cbe3ac6cc2ae16df5e312db942203107" +name = "sp-keystore" +version = "0.12.0" +source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ - "ruzstd", - "zstd", + "async-trait", + "futures 0.3.21", + "merlin", + "parity-scale-codec 3.1.2", + "parking_lot 0.12.0", + "schnorrkel", + "serde 1.0.137", + "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-externalities 0.12.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "thiserror", ] [[package]] -name = "sp-npos-elections" -version = "4.0.0-dev" -source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2021-09+1#04a24174cbe3ac6cc2ae16df5e312db942203107" +name = "sp-maybe-compressed-blob" +version = "4.1.0-dev" +source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ - "parity-scale-codec", - "serde 1.0.130", - "sp-arithmetic", - "sp-core", - "sp-npos-elections-solution-type", - "sp-std", + "thiserror", + "zstd", ] [[package]] -name = "sp-npos-elections-solution-type" +name = "sp-offchain" version = "4.0.0-dev" -source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2021-09+1#04a24174cbe3ac6cc2ae16df5e312db942203107" +source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ - "proc-macro-crate 1.1.0", - "proc-macro2", - "quote", - "syn", + "sp-api", + "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", ] [[package]] -name = "sp-offchain" -version = "4.0.0-dev" -source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2021-09+1#04a24174cbe3ac6cc2ae16df5e312db942203107" +name = "sp-panic-handler" +version = "4.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2101f3c555fceafcfcfb0e61c55ea9ed80dc60bd77d54d9f25b369edb029e9a4" dependencies = [ - "sp-api", - "sp-core", - "sp-runtime", + "backtrace", + "lazy_static", + "regex", ] [[package]] name = "sp-panic-handler" -version = "3.0.0" -source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2021-09+1#04a24174cbe3ac6cc2ae16df5e312db942203107" +version = "4.0.0" +source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ "backtrace", + "lazy_static", + "regex", ] [[package]] name = "sp-rpc" -version = "4.0.0-dev" -source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2021-09+1#04a24174cbe3ac6cc2ae16df5e312db942203107" +version = "6.0.0" +source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ "rustc-hash", - "serde 1.0.130", - "sp-core", + "serde 1.0.137", + "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", ] [[package]] name = "sp-runtime" -version = "4.0.0-dev" -source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2021-09+1#04a24174cbe3ac6cc2ae16df5e312db942203107" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb7d8a8d5ab5d349c6cf9300af1721b7b6446ba63401dbb11c10a1d65197aa5f" +dependencies = [ + "either", + "hash256-std-hasher", + "impl-trait-for-tuples", + "log 0.4.17", + "parity-scale-codec 3.1.2", + "parity-util-mem", + "paste", + "rand 0.7.3", + "scale-info", + "serde 1.0.137", + "sp-application-crypto 6.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-arithmetic 5.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-core 6.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-io 6.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-std 4.0.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "sp-runtime" +version = "6.0.0" +source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ "either", "hash256-std-hasher", "impl-trait-for-tuples", - "log 0.4.14", - "parity-scale-codec", + "log 0.4.17", + "parity-scale-codec 3.1.2", "parity-util-mem", "paste", "rand 0.7.3", - "serde 1.0.130", - "sp-application-crypto", - "sp-arithmetic", - "sp-core", - "sp-io", - "sp-std", + "scale-info", + "serde 1.0.137", + "sp-application-crypto 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-arithmetic 5.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-io 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", ] [[package]] name = "sp-runtime-interface" -version = "4.0.0-dev" -source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2021-09+1#04a24174cbe3ac6cc2ae16df5e312db942203107" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "158bf0305c75a50fc0e334b889568f519a126e32b87900c3f4251202dece7b4b" dependencies = [ "impl-trait-for-tuples", - "parity-scale-codec", - "primitive-types", - "sp-externalities", - "sp-runtime-interface-proc-macro", - "sp-std", - "sp-storage", - "sp-tracing", - "sp-wasm-interface", + "parity-scale-codec 3.1.2", + "primitive-types 0.11.1", + "sp-externalities 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-runtime-interface-proc-macro 5.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-std 4.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-storage 6.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-tracing 5.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-wasm-interface 6.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "static_assertions", +] + +[[package]] +name = "sp-runtime-interface" +version = "6.0.0" +source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" +dependencies = [ + "impl-trait-for-tuples", + "parity-scale-codec 3.1.2", + "primitive-types 0.11.1", + "sp-externalities 0.12.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-runtime-interface-proc-macro 5.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-storage 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-tracing 5.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-wasm-interface 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "static_assertions", ] [[package]] name = "sp-runtime-interface-proc-macro" -version = "4.0.0-dev" -source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2021-09+1#04a24174cbe3ac6cc2ae16df5e312db942203107" +version = "5.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22ecb916b9664ed9f90abef0ff5a3e61454c1efea5861b2997e03f39b59b955f" dependencies = [ "Inflector", - "proc-macro-crate 1.1.0", + "proc-macro-crate 1.1.3", "proc-macro2", "quote", "syn", ] +[[package]] +name = "sp-runtime-interface-proc-macro" +version = "5.0.0" +source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" +dependencies = [ + "Inflector", + "proc-macro-crate 1.1.3", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "sp-sandbox" +version = "0.10.0-dev" +source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" +dependencies = [ + "log 0.4.17", + "parity-scale-codec 3.1.2", + "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-io 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-wasm-interface 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "wasmi", +] + [[package]] name = "sp-serializer" -version = "3.0.0" -source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2021-09+1#04a24174cbe3ac6cc2ae16df5e312db942203107" +version = "4.0.0-dev" +source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ - "serde 1.0.130", + "serde 1.0.137", "serde_json", ] [[package]] name = "sp-session" version = "4.0.0-dev" -source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2021-09+1#04a24174cbe3ac6cc2ae16df5e312db942203107" +source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ - "parity-scale-codec", + "parity-scale-codec 3.1.2", + "scale-info", "sp-api", - "sp-core", - "sp-runtime", + "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "sp-staking", - "sp-std", + "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", ] [[package]] name = "sp-staking" version = "4.0.0-dev" -source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2021-09+1#04a24174cbe3ac6cc2ae16df5e312db942203107" +source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ - "parity-scale-codec", - "sp-runtime", - "sp-std", + "parity-scale-codec 3.1.2", + "scale-info", + "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", ] [[package]] name = "sp-state-machine" -version = "0.10.0-dev" -source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2021-09+1#04a24174cbe3ac6cc2ae16df5e312db942203107" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ecee3b33eb78c99997676a571656bcc35db6886abecfddd13e76a73b5871c6c1" dependencies = [ "hash-db", - "log 0.4.14", - "num-traits 0.2.14", - "parity-scale-codec", - "parking_lot 0.11.2", + "log 0.4.17", + "num-traits 0.2.15", + "parity-scale-codec 3.1.2", + "parking_lot 0.12.0", "rand 0.7.3", - "smallvec 1.7.0", - "sp-core", - "sp-externalities", - "sp-panic-handler", - "sp-std", - "sp-trie", + "smallvec 1.8.0", + "sp-core 6.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-externalities 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-panic-handler 4.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-std 4.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-trie 6.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "thiserror", "tracing", "trie-db", "trie-root", ] +[[package]] +name = "sp-state-machine" +version = "0.12.0" +source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" +dependencies = [ + "hash-db", + "log 0.4.17", + "num-traits 0.2.15", + "parity-scale-codec 3.1.2", + "parking_lot 0.12.0", + "rand 0.7.3", + "smallvec 1.8.0", + "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-externalities 0.12.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-panic-handler 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-trie 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "thiserror", + "tracing", + "trie-root", +] + [[package]] name = "sp-std" -version = "4.0.0-dev" -source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2021-09+1#04a24174cbe3ac6cc2ae16df5e312db942203107" +version = "4.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14804d6069ee7a388240b665f17908d98386ffb0b5d39f89a4099fc7a2a4c03f" + +[[package]] +name = "sp-std" +version = "4.0.0" +source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" [[package]] name = "sp-storage" -version = "4.0.0-dev" -source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2021-09+1#04a24174cbe3ac6cc2ae16df5e312db942203107" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5dab53af846068e3e0716d3ccc70ea0db44035c79b2ed5821aaa6635039efa37" +dependencies = [ + "impl-serde", + "parity-scale-codec 3.1.2", + "ref-cast", + "serde 1.0.137", + "sp-debug-derive 4.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-std 4.0.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "sp-storage" +version = "6.0.0" +source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ "impl-serde", - "parity-scale-codec", + "parity-scale-codec 3.1.2", "ref-cast", - "serde 1.0.130", - "sp-debug-derive", - "sp-std", + "serde 1.0.137", + "sp-debug-derive 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", ] [[package]] name = "sp-tasks" version = "4.0.0-dev" -source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2021-09+1#04a24174cbe3ac6cc2ae16df5e312db942203107" +source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ - "log 0.4.14", - "sp-core", - "sp-externalities", - "sp-io", - "sp-runtime-interface", - "sp-std", + "log 0.4.17", + "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-externalities 0.12.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-io 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-runtime-interface 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", ] [[package]] name = "sp-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2021-09+1#04a24174cbe3ac6cc2ae16df5e312db942203107" +source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ "async-trait", - "futures-timer 3.0.2", - "log 0.4.14", - "parity-scale-codec", + "futures-timer", + "log 0.4.17", + "parity-scale-codec 3.1.2", "sp-api", "sp-inherents", - "sp-runtime", - "sp-std", + "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "thiserror", ] [[package]] name = "sp-tracing" -version = "4.0.0-dev" -source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2021-09+1#04a24174cbe3ac6cc2ae16df5e312db942203107" +version = "5.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69a67e555d171c4238bd223393cda747dd20ec7d4f5fe5c042c056cb7fde9eda" dependencies = [ - "erased-serde", - "log 0.4.14", - "parity-scale-codec", - "parking_lot 0.10.2", - "serde 1.0.130", - "serde_json", - "slog", - "sp-std", + "parity-scale-codec 3.1.2", + "sp-std 4.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tracing", + "tracing-core", + "tracing-subscriber", +] + +[[package]] +name = "sp-tracing" +version = "5.0.0" +source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" +dependencies = [ + "parity-scale-codec 3.1.2", + "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "tracing", "tracing-core", "tracing-subscriber", @@ -8645,63 +9384,73 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2021-09+1#04a24174cbe3ac6cc2ae16df5e312db942203107" +source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ "sp-api", - "sp-runtime", + "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", ] [[package]] name = "sp-transaction-storage-proof" version = "4.0.0-dev" -source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2021-09+1#04a24174cbe3ac6cc2ae16df5e312db942203107" +source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ "async-trait", - "log 0.4.14", - "parity-scale-codec", - "sp-core", + "log 0.4.17", + "parity-scale-codec 3.1.2", + "scale-info", + "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "sp-inherents", - "sp-runtime", - "sp-std", - "sp-trie", + "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-trie 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", ] [[package]] name = "sp-trie" -version = "4.0.0-dev" -source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2021-09+1#04a24174cbe3ac6cc2ae16df5e312db942203107" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6fc34f4f291886914733e083b62708d829f3e6b8d7a7ca7fa8a55a3d7640b0b" dependencies = [ "hash-db", "memory-db", - "parity-scale-codec", - "sp-core", - "sp-std", + "parity-scale-codec 3.1.2", + "scale-info", + "sp-core 6.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-std 4.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "trie-db", "trie-root", ] [[package]] -name = "sp-utils" -version = "4.0.0-dev" -source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2021-09+1#04a24174cbe3ac6cc2ae16df5e312db942203107" +name = "sp-trie" +version = "6.0.0" +source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ - "futures 0.3.17", - "futures-timer 3.0.2", - "lazy_static", - "prometheus", + "hash-db", + "memory-db", + "parity-scale-codec 3.1.2", + "scale-info", + "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "thiserror", + "trie-db", + "trie-root", ] [[package]] name = "sp-version" -version = "4.0.0-dev" -source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2021-09+1#04a24174cbe3ac6cc2ae16df5e312db942203107" +version = "5.0.0" +source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ "impl-serde", - "parity-scale-codec", + "parity-scale-codec 3.1.2", "parity-wasm 0.42.2", - "serde 1.0.130", - "sp-runtime", - "sp-std", + "scale-info", + "serde 1.0.137", + "sp-core-hashing-proc-macro", + "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "sp-version-proc-macro", "thiserror", ] @@ -8709,9 +9458,9 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2021-09+1#04a24174cbe3ac6cc2ae16df5e312db942203107" +source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ - "parity-scale-codec", + "parity-scale-codec 3.1.2", "proc-macro2", "quote", "syn", @@ -8719,15 +9468,30 @@ dependencies = [ [[package]] name = "sp-wasm-interface" -version = "4.0.0-dev" -source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2021-09+1#04a24174cbe3ac6cc2ae16df5e312db942203107" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10d88debe690c2b24eaa9536a150334fcef2ae184c21a0e5b3e80135407a7d52" dependencies = [ "impl-trait-for-tuples", - "parity-scale-codec", - "sp-std", + "log 0.4.17", + "parity-scale-codec 3.1.2", + "sp-std 4.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "wasmi", ] +[[package]] +name = "sp-wasm-interface" +version = "6.0.0" +source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" +dependencies = [ + "impl-trait-for-tuples", + "log 0.4.17", + "parity-scale-codec 3.1.2", + "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "wasmi", + "wasmtime", +] + [[package]] name = "spin" version = "0.5.2" @@ -8740,7 +9504,22 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5c01a0c15da1b0b0e1494112e7af814a678fec9bd157881b49beac661e9b6f32" dependencies = [ - "der", + "der 0.4.5", +] + +[[package]] +name = "ss58-registry" +version = "1.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b84a70894df7a73666e0694f44b41a9571625e9546fb58a0818a565d2c7e084" +dependencies = [ + "Inflector", + "num-format", + "proc-macro2", + "quote", + "serde 1.0.137", + "serde_json", + "unicode-xid", ] [[package]] @@ -8763,9 +9542,9 @@ dependencies = [ "frame-system-benchmarking", "frame-system-rpc-runtime-api", "frame-try-runtime", - "getrandom 0.2.3", + "getrandom 0.2.6", "hex-literal", - "log 0.4.14", + "log 0.4.17", "nanorand", "pallet-aura", "pallet-authorship", @@ -8787,18 +9566,19 @@ dependencies = [ "pallet-session", "pallet-timestamp", "pallet-transaction-payment", - "parity-scale-codec", + "pallet-transaction-payment-rpc-runtime-api", + "parity-scale-codec 3.1.2", "scale-info", - "serde 1.0.130", + "serde 1.0.137", "sp-api", "sp-block-builder", "sp-consensus-aura", - "sp-core", + "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "sp-inherents", "sp-offchain", - "sp-runtime", + "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "sp-session", - "sp-std", + "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "sp-transaction-pool", "sp-version", "substrate-wasm-builder", @@ -8820,8 +9600,8 @@ dependencies = [ "approx", "lazy_static", "nalgebra", - "num-traits 0.2.14", - "rand 0.8.4", + "num-traits 0.2.15", + "rand 0.8.5", ] [[package]] @@ -8836,13 +9616,19 @@ version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6446ced80d6c486436db5c078dde11a9f73d42b57fb273121e160b84f63d894c" +[[package]] +name = "strsim" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" + [[package]] name = "structopt" -version = "0.3.25" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40b9788f4202aa75c240ecc9c15c65185e6a39ccdeb0fd5d008b98825464c87c" +checksum = "0c6b5c64445ba8094a6ab0c3cd2ad323e07171012d9c98b0b15651daf1787a10" dependencies = [ - "clap", + "clap 2.34.0", "lazy_static", "structopt-derive", ] @@ -8853,8 +9639,8 @@ version = "0.4.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dcb5ae327f9cc13b68763b5749770cb9e048a99bd9dfdfa58d0cf05d5f64afe0" dependencies = [ - "heck", - "proc-macro-error 1.0.4", + "heck 0.3.3", + "proc-macro-error", "proc-macro2", "quote", "syn", @@ -8862,22 +9648,23 @@ dependencies = [ [[package]] name = "strum" -version = "0.20.0" +version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7318c509b5ba57f18533982607f24070a55d353e90d4cae30c467cdb2ad5ac5c" +checksum = "cae14b91c7d11c9a851d3fbc80a963198998c2a64eec840477fa92d8ce9b70bb" dependencies = [ "strum_macros", ] [[package]] name = "strum_macros" -version = "0.20.1" +version = "0.23.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee8bc6b87a5112aeeab1f4a9f7ab634fe6cbefc4850006df31267f4cfb9e3149" +checksum = "5bb0dc7ee9c15cea6199cde9a127fa16a4c5819af85395457ad72d68edc85a38" dependencies = [ - "heck", + "heck 0.3.3", "proc-macro2", "quote", + "rustversion", "syn", ] @@ -8890,14 +9677,14 @@ dependencies = [ "hmac 0.11.0", "pbkdf2 0.8.0", "schnorrkel", - "sha2 0.9.8", + "sha2 0.9.9", "zeroize", ] [[package]] name = "substrate-build-script-utils" version = "3.0.0" -source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2021-09+1#04a24174cbe3ac6cc2ae16df5e312db942203107" +source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ "platforms", ] @@ -8905,128 +9692,132 @@ dependencies = [ [[package]] name = "substrate-frame-rpc-system" version = "4.0.0-dev" -source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2021-09+1#04a24174cbe3ac6cc2ae16df5e312db942203107" +source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ "frame-system-rpc-runtime-api", - "futures 0.3.17", + "futures 0.3.21", "jsonrpc-core", "jsonrpc-core-client", "jsonrpc-derive", - "log 0.4.14", - "parity-scale-codec", + "log 0.4.17", + "parity-scale-codec 3.1.2", "sc-client-api", "sc-rpc-api", "sc-transaction-pool-api", "sp-api", "sp-block-builder", "sp-blockchain", - "sp-core", - "sp-runtime", + "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", ] [[package]] name = "substrate-prometheus-endpoint" -version = "0.9.0" -source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2021-09+1#04a24174cbe3ac6cc2ae16df5e312db942203107" +version = "0.10.0-dev" +source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ - "async-std", - "derive_more", "futures-util", - "hyper 0.14.14", - "log 0.4.14", + "hyper 0.14.18", + "log 0.4.17", "prometheus", + "thiserror", "tokio", ] [[package]] -name = "substrate-subxt" -version = "0.15.0" -source = "git+https://github.com/chainflip-io/substrate-subxt.git?tag=chainflip-monthly-2021-09#6b72146270bbf6bb25a8747442501eaadac76b3e" +name = "substrate-wasm-builder" +version = "5.0.0-dev" +source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ - "async-trait", - "dyn-clone", + "ansi_term", + "build-helper", + "cargo_metadata", + "sp-maybe-compressed-blob", + "strum", + "tempfile", + "toml", + "walkdir", + "wasm-gc-api", +] + +[[package]] +name = "subtle" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" + +[[package]] +name = "subxt" +version = "0.21.0" +source = "git+https://github.com/chainflip-io/substrate-subxt.git?tag=chainflip-monthly-2022-05#6d73172560b4c722aeac19695c96c618799d50a2" +dependencies = [ + "bitvec 1.0.0", + "derivative", "frame-metadata", - "frame-support", - "futures 0.3.17", + "futures 0.3.21", "hex", - "jsonrpsee-http-client", - "jsonrpsee-proc-macros", - "jsonrpsee-types", - "jsonrpsee-ws-client", - "log 0.4.14", - "num-traits 0.2.14", - "pallet-indices", - "pallet-staking", - "parity-scale-codec", - "serde 1.0.130", + "jsonrpsee", + "log 0.4.17", + "parity-scale-codec 3.1.2", + "parking_lot 0.12.0", + "scale-info", + "serde 1.0.137", "serde_json", - "sp-application-crypto", - "sp-core", - "sp-rpc", - "sp-runtime", - "sp-std", - "sp-version", - "substrate-subxt-proc-macro", + "sp-core 6.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-runtime 6.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "subxt-macro", + "subxt-metadata", "thiserror", - "url 2.2.2", ] [[package]] -name = "substrate-subxt-proc-macro" -version = "0.15.0" -source = "git+https://github.com/chainflip-io/substrate-subxt.git?tag=chainflip-monthly-2021-09#6b72146270bbf6bb25a8747442501eaadac76b3e" +name = "subxt-codegen" +version = "0.21.0" +source = "git+https://github.com/chainflip-io/substrate-subxt.git?tag=chainflip-monthly-2022-05#6d73172560b4c722aeac19695c96c618799d50a2" dependencies = [ - "async-trait", - "heck", - "proc-macro-crate 0.1.5", - "proc-macro-error 1.0.4", + "darling 0.14.1", + "frame-metadata", + "heck 0.4.0", + "parity-scale-codec 3.1.2", + "proc-macro-error", "proc-macro2", "quote", + "scale-info", + "subxt-metadata", "syn", - "synstructure", ] [[package]] -name = "substrate-wasm-builder" -version = "5.0.0-dev" -source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2021-09+1#04a24174cbe3ac6cc2ae16df5e312db942203107" +name = "subxt-macro" +version = "0.21.0" +source = "git+https://github.com/chainflip-io/substrate-subxt.git?tag=chainflip-monthly-2022-05#6d73172560b4c722aeac19695c96c618799d50a2" dependencies = [ - "ansi_term 0.12.1", - "build-helper", - "cargo_metadata", - "sp-maybe-compressed-blob", - "tempfile", - "toml", - "walkdir", - "wasm-gc-api", + "darling 0.14.1", + "proc-macro-error", + "subxt-codegen", + "syn", ] [[package]] -name = "subtle" -version = "2.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" - -[[package]] -name = "syn" -version = "1.0.81" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2afee18b8beb5a596ecb4a2dce128c719b4ba399d34126b9e4396e3f9860966" +name = "subxt-metadata" +version = "0.21.0" +source = "git+https://github.com/chainflip-io/substrate-subxt.git?tag=chainflip-monthly-2022-05#6d73172560b4c722aeac19695c96c618799d50a2" dependencies = [ - "proc-macro2", - "quote", - "unicode-xid", + "frame-metadata", + "parity-scale-codec 3.1.2", + "scale-info", + "sp-core 6.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "syn-mid" -version = "0.5.3" +name = "syn" +version = "1.0.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baa8e7560a164edb1621a55d18a0c59abf49d360f47aa7b821061dd7eea7fac9" +checksum = "7ff7c592601f11445996a06f8ad0c27f094a58857c2f89e97974ab9235b92c52" dependencies = [ "proc-macro2", "quote", - "syn", + "unicode-xid", ] [[package]] @@ -9055,9 +9846,9 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "target-lexicon" -version = "0.12.2" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9bffcddbc2458fa3e6058414599e3c838a022abae82e5c67b4f7f80298d5bff" +checksum = "d7fa7e55043acb85fca6b3c01485a2eeb6b69c5d21002e273c79e465f43b7ac1" [[package]] name = "tempfile" @@ -9068,25 +9859,36 @@ dependencies = [ "cfg-if 1.0.0", "fastrand", "libc", - "redox_syscall 0.2.10", + "redox_syscall 0.2.13", "remove_dir_all", "winapi 0.3.9", ] +[[package]] +name = "term" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edd106a334b7657c10b7c540a0106114feadeb4dc314513e97df481d5d966f42" +dependencies = [ + "byteorder", + "dirs", + "winapi 0.3.9", +] + [[package]] name = "termcolor" -version = "1.1.2" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dfed899f0eb03f32ee8c6a0aabdb8a7949659e3466561fc0adf54e26d88c5f4" +checksum = "bab24d30b911b2376f3a13cc2cd443142f0c81dda04c118693e35b3835757755" dependencies = [ "winapi-util", ] [[package]] name = "termtree" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13a4ec180a2de59b57434704ccfad967f789b12737738798fa08798cd5824c16" +checksum = "507e9898683b6c43a9aa55b64259b721b52ba226e0f3779137e50ad114a4c90b" [[package]] name = "textwrap" @@ -9097,31 +9899,43 @@ dependencies = [ "unicode-width", ] +[[package]] +name = "textwrap" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1141d4d61095b28419e22cb0bbf02755f5e54e0526f97f1e3d1d160e60885fb" + [[package]] name = "thiserror" -version = "1.0.30" +version = "1.0.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "854babe52e4df1653706b98fcfc05843010039b406875930a70e4d9644e5c417" +checksum = "bd829fe32373d27f76265620b5309d0340cb8550f523c1dda251d6298069069a" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.30" +version = "1.0.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa32fd3f627f367fe16f893e2597ae3c05020f8bba2666a4e6ea73d377e5714b" +checksum = "0396bc89e626244658bef819e22d0cc459e795a5ebe878e6ec336d1674a8d79a" dependencies = [ "proc-macro2", "quote", "syn", ] +[[package]] +name = "thousands" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3bf63baf9f5039dadc247375c29eb13706706cfde997d0330d05aa63a77d8820" + [[package]] name = "thread_local" -version = "1.1.3" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8018d24e04c95ac8790716a5987d0fec4f8b27249ffa0f7d33f1369bdfb88cbd" +checksum = "5516c27b78311c50bf42c071425c560ac799b11c30b31f87e3081965fe5e0180" dependencies = [ "once_cell", ] @@ -9135,6 +9949,17 @@ dependencies = [ "num_cpus", ] +[[package]] +name = "tikv-jemalloc-sys" +version = "0.4.3+5.2.1-patched.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1792ccb507d955b46af42c123ea8863668fae24d03721e40cad6a41773dbb49" +dependencies = [ + "cc", + "fs_extra", + "libc", +] + [[package]] name = "time" version = "0.1.44" @@ -9148,10 +9973,11 @@ dependencies = [ [[package]] name = "time" -version = "0.3.7" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "004cbc98f30fa233c61a38bc77e96a9106e65c88f2d3bef182ae952027e5753d" +checksum = "c2702e08a7a860f005826c6815dcac101b19b5eb330c27fe4a5928fec1d20ddd" dependencies = [ + "itoa 1.0.1", "libc", "num_threads", ] @@ -9168,7 +9994,7 @@ dependencies = [ "pbkdf2 0.4.0", "rand 0.7.3", "rustc-hash", - "sha2 0.9.8", + "sha2 0.9.9", "thiserror", "unicode-normalization", "wasm-bindgen", @@ -9186,9 +10012,9 @@ dependencies = [ [[package]] name = "tinyvec" -version = "1.5.0" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f83b2a3d4d9091d0abd7eba4dc2710b1718583bd4d8992e2190720ea38f391f7" +checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" dependencies = [ "tinyvec_macros", ] @@ -9201,19 +10027,20 @@ checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" [[package]] name = "tokio" -version = "1.16.1" +version = "1.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c27a64b625de6d309e8c57716ba93021dccf1b3b5c97edd6d3dd2d2135afc0a" +checksum = "dce653fb475565de9f6fb0614b28bca8df2c430c0cf84bcd9c843f15de5414cc" dependencies = [ "bytes 1.1.0", "libc", "memchr", - "mio 0.7.14", + "mio 0.8.2", "num_cpus", "once_cell", - "parking_lot 0.11.2", - "pin-project-lite 0.2.7", + "parking_lot 0.12.0", + "pin-project-lite 0.2.9", "signal-hook-registry", + "socket2 0.4.4", "tokio-macros", "winapi 0.3.9", ] @@ -9247,7 +10074,7 @@ checksum = "57fc868aae093479e3131e3d165c93b1c7474109d13c90ec0dda2a1bbfff0674" dependencies = [ "bytes 0.4.12", "futures 0.1.31", - "log 0.4.14", + "log 0.4.17", ] [[package]] @@ -9280,7 +10107,7 @@ dependencies = [ "crossbeam-utils 0.7.2", "futures 0.1.31", "lazy_static", - "log 0.4.14", + "log 0.4.17", "mio 0.6.23", "num_cpus", "parking_lot 0.9.0", @@ -9296,9 +10123,20 @@ version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bc6844de72e57df1980054b38be3a9f4702aba4858be64dd700181a8a6d0e1b6" dependencies = [ - "rustls", + "rustls 0.19.1", + "tokio", + "webpki 0.21.4", +] + +[[package]] +name = "tokio-rustls" +version = "0.23.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c43ee83903113e03984cb9e5cebe6c04a5116269e900e3ddba8f068a62adda59" +dependencies = [ + "rustls 0.20.4", "tokio", - "webpki", + "webpki 0.22.0", ] [[package]] @@ -9308,7 +10146,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "50145484efff8818b5ccd256697f36863f587da82cf8b409c53adf1e840798e3" dependencies = [ "futures-core", - "pin-project-lite 0.2.7", + "pin-project-lite 0.2.9", "tokio", ] @@ -9357,18 +10195,33 @@ dependencies = [ "futures-core", "futures-io", "futures-sink", - "log 0.4.14", - "pin-project-lite 0.2.7", + "log 0.4.17", + "pin-project-lite 0.2.9", + "tokio", +] + +[[package]] +name = "tokio-util" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0edfdeb067411dba2044da6d1cb2df793dd35add7888d73c16e3381ded401764" +dependencies = [ + "bytes 1.1.0", + "futures-core", + "futures-io", + "futures-sink", + "pin-project-lite 0.2.9", "tokio", + "tracing", ] [[package]] name = "toml" -version = "0.5.8" +version = "0.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a31142970826733df8241ef35dc040ef98c679ab14d7c3e54d827099b3acecaa" +checksum = "8d82e1a7758622a465f8cee077614c73484dac5b836c02ff6a40d5d1010324d7" dependencies = [ - "serde 1.0.130", + "serde 1.0.137", ] [[package]] @@ -9379,21 +10232,21 @@ checksum = "360dfd1d6d30e05fda32ace2c8c70e9c0a9da713275777f5a4dbb8a1893930c6" [[package]] name = "tracing" -version = "0.1.29" +version = "0.1.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "375a639232caf30edfc78e8d89b2d4c375515393e7af7e16f01cd96917fb2105" +checksum = "5d0ecdcb44a79f0fe9844f0c4f33a342cbcbb5117de8001e6ba0dc2351327d09" dependencies = [ "cfg-if 1.0.0", - "pin-project-lite 0.2.7", + "pin-project-lite 0.2.9", "tracing-attributes", "tracing-core", ] [[package]] name = "tracing-attributes" -version = "0.1.18" +version = "0.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4f480b8f81512e825f337ad51e94c1eb5d3bbdf2b363dcd01e2b19a9ffe3f8e" +checksum = "cc6b8ad3567499f98a1db7a752b07a7c8c7c7c34c332ec00effb2b0027974b7c" dependencies = [ "proc-macro2", "quote", @@ -9402,11 +10255,12 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.21" +version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f4ed65637b8390770814083d20756f87bfa2c21bf2f110babdc5438351746e4" +checksum = "f54c8ca710e81886d498c2fd3331b56c93aa248d49de2222ad2742247c60072f" dependencies = [ "lazy_static", + "valuable", ] [[package]] @@ -9415,30 +10269,32 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "97d095ae15e245a057c8e8451bab9b3ee1e1f68e9ba2b4fbc18d0ac5237835f2" dependencies = [ - "futures 0.3.17", + "futures 0.3.21", "futures-task", - "pin-project 1.0.8", + "pin-project 1.0.10", "tracing", ] [[package]] name = "tracing-log" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6923477a48e41c1951f1999ef8bb5a3023eb723ceadafe78ffb65dc366761e3" +checksum = "78ddad33d2d10b1ed7eb9d1f518a5674713876e97e5bb9b7345a7984fbb4f922" dependencies = [ + "ahash", "lazy_static", - "log 0.4.14", + "log 0.4.17", + "lru 0.7.5", "tracing-core", ] [[package]] name = "tracing-serde" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb65ea441fbb84f9f6748fd496cf7f63ec9af5bca94dd86456978d055e8eb28b" +checksum = "bc6b213177105856957181934e4920de57730fc69bf42c37ee5bb664d406d9e1" dependencies = [ - "serde 1.0.130", + "serde 1.0.137", "tracing-core", ] @@ -9448,15 +10304,16 @@ version = "0.2.25" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0e0d2eaa99c3c2e41547cfa109e910a68ea03823cccad4a0525dcbc9b01e8c71" dependencies = [ - "ansi_term 0.12.1", + "ansi_term", "chrono", "lazy_static", "matchers", + "parking_lot 0.11.2", "regex", - "serde 1.0.130", + "serde 1.0.137", "serde_json", "sharded-slab", - "smallvec 1.7.0", + "smallvec 1.8.0", "thread_local", "tracing", "tracing-core", @@ -9472,22 +10329,22 @@ checksum = "efd1f82c56340fdf16f2a953d7bda4f8fdffba13d93b00844c25572110b26079" [[package]] name = "trie-db" -version = "0.22.6" +version = "0.23.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9eac131e334e81b6b3be07399482042838adcd7957aa0010231d0813e39e02fa" +checksum = "d32d034c0d3db64b43c31de38e945f15b40cd4ca6d2dcfc26d4798ce8de4ab83" dependencies = [ "hash-db", - "hashbrown", - "log 0.4.14", + "hashbrown 0.12.1", + "log 0.4.17", "rustc-hex", - "smallvec 1.7.0", + "smallvec 1.8.0", ] [[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", ] @@ -9513,11 +10370,11 @@ dependencies = [ "futures-channel", "futures-util", "lazy_static", - "log 0.4.14", + "log 0.4.17", "radix_trie", - "rand 0.8.4", + "rand 0.8.5", "thiserror", - "time 0.3.7", + "time 0.3.9", "tokio", "trust-dns-proto", ] @@ -9538,9 +10395,9 @@ dependencies = [ "idna 0.2.3", "ipnet", "lazy_static", - "log 0.4.14", - "rand 0.8.4", - "smallvec 1.7.0", + "log 0.4.17", + "rand 0.8.5", + "smallvec 1.8.0", "thiserror", "tinyvec", "tokio", @@ -9549,19 +10406,19 @@ dependencies = [ [[package]] name = "trust-dns-resolver" -version = "0.20.3" +version = "0.20.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6ad17b608a64bd0735e67bde16b0636f8aa8591f831a25d18443ed00a699770" +checksum = "ecae383baad9995efaa34ce8e57d12c3f305e545887472a492b838f4b5cfb77a" dependencies = [ "cfg-if 1.0.0", "futures-util", "ipconfig", "lazy_static", - "log 0.4.14", + "log 0.4.17", "lru-cache", "parking_lot 0.11.2", "resolv-conf", - "smallvec 1.7.0", + "smallvec 1.8.0", "thiserror", "trust-dns-proto", ] @@ -9575,31 +10432,43 @@ checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" [[package]] name = "try-runtime-cli" version = "0.10.0-dev" -source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2021-09+1#04a24174cbe3ac6cc2ae16df5e312db942203107" +source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ - "log 0.4.14", - "parity-scale-codec", + "clap 3.1.15", + "jsonrpsee", + "log 0.4.17", + "parity-scale-codec 3.1.2", "remote-externalities", "sc-chain-spec", "sc-cli", "sc-executor", "sc-service", - "serde 1.0.130", - "sp-core", - "sp-keystore", - "sp-runtime", - "sp-state-machine", - "structopt", + "serde 1.0.137", + "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-externalities 0.12.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-io 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-keystore 0.12.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-state-machine 0.12.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-version", + "zstd", ] +[[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" +version = "1.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f559b464de2e2bdabcac6a210d12e9b5a5973c251e102c44c585c71d51bd78e" +checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675" dependencies = [ "cfg-if 1.0.0", - "rand 0.8.4", + "digest 0.10.3", + "rand 0.4.6", "static_assertions", ] @@ -9611,9 +10480,9 @@ checksum = "1410f6f91f21d1612654e7cc69193b0334f909dcf2c790c4826254fbb86f8887" [[package]] name = "typenum" -version = "1.14.0" +version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b63708a265f51345575b27fe43f9500ad611579e764c79edbc2037b1121959ec" +checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987" [[package]] name = "ucd-trie" @@ -9623,9 +10492,9 @@ checksum = "56dee185309b50d1f11bfedef0fe6d036842e3fb77413abef29f8f8d1c5d4c1c" [[package]] name = "uint" -version = "0.9.1" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6470ab50f482bde894a037a57064480a246dbfdd5960bd65a44824693f08da5f" +checksum = "12f03af7ccf01dd611cc450a0d10dbc9b745770d096473e2faf0ca6e2d66d1e0" dependencies = [ "byteorder", "crunchy", @@ -9648,14 +10517,14 @@ version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6" dependencies = [ - "version_check 0.9.3", + "version_check 0.9.4", ] [[package]] name = "unicode-bidi" -version = "0.3.7" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a01404663e3db436ed2746d9fefef640d868edae3cceb81c3b8d5732fda678f" +checksum = "099b7128301d285f79ddd55b9a83d5e6b9e97c92e0ea0daebee7263e932de992" [[package]] name = "unicode-normalization" @@ -9668,9 +10537,9 @@ dependencies = [ [[package]] name = "unicode-segmentation" -version = "1.8.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8895849a949e7845e06bd6dc1aa51731a103c42707010a5b591c0038fb73385b" +checksum = "7e8820f5d777f6224dc4be3632222971ac30164d4a258d595640799554ebfd99" [[package]] name = "unicode-width" @@ -9680,9 +10549,9 @@ checksum = "3ed742d4ea2bd1176e236172c8429aaf54486e7ac098db29ffe6529e0ce50973" [[package]] name = "unicode-xid" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3" +checksum = "957e51f3646910546462e67d5f7599b9e4fb8acdd304b087a6494730f9eebf04" [[package]] name = "universal-hash" @@ -9690,7 +10559,7 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9f214e8f697e925001e66ec2c6e37a4ef93f0f78c2eed7814394e10c62025b05" dependencies = [ - "generic-array 0.14.4", + "generic-array 0.14.5", "subtle", ] @@ -9714,9 +10583,9 @@ dependencies = [ [[package]] name = "unsigned-varint" -version = "0.7.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f8d425fafb8cd76bc3f22aace4af471d3156301d7508f2107e98fbeae10bc7f" +checksum = "d86a8dc7f45e4c1b0d30e43038c38f274e77af056aa5f74b93c2cf9eb3c1c836" dependencies = [ "asynchronous-codec 0.6.0", "bytes 1.1.0", @@ -9760,14 +10629,20 @@ dependencies = [ "hex", ] +[[package]] +name = "valuable" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" + [[package]] name = "value-bag" -version = "1.0.0-alpha.8" +version = "1.0.0-alpha.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79923f7731dc61ebfba3633098bf3ac533bbd35ccd8c57e7088d9a5eebe0263f" +checksum = "2209b78d1249f7e6f3293657c9779fe31ced465df091bbd433a1cf88e916ec55" dependencies = [ "ctor", - "version_check 0.9.3", + "version_check 0.9.4", ] [[package]] @@ -9790,9 +10665,9 @@ checksum = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd" [[package]] name = "version_check" -version = "0.9.3" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fecdca9a5291cc2b8dcf7dc02453fee791a280f3743cb0905f8822ae463b3fe" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "void" @@ -9823,7 +10698,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" dependencies = [ - "log 0.4.14", + "log 0.4.17", "try-lock", ] @@ -9839,11 +10714,17 @@ version = "0.10.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" +[[package]] +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" + [[package]] name = "wasm-bindgen" -version = "0.2.78" +version = "0.2.80" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "632f73e236b219150ea279196e54e610f5dbafa5d61786303d4da54f84e47fce" +checksum = "27370197c907c55e3f1a9fbe26f44e937fe6451368324e009cba39e139dc08ad" dependencies = [ "cfg-if 1.0.0", "wasm-bindgen-macro", @@ -9851,13 +10732,13 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.78" +version = "0.2.80" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a317bf8f9fba2476b4b2c85ef4c4af8ff39c3c7f0cdfeed4f82c34a880aa837b" +checksum = "53e04185bfa3a779273da532f5025e33398409573f348985af9a1cbf3774d3f4" dependencies = [ "bumpalo", "lazy_static", - "log 0.4.14", + "log 0.4.17", "proc-macro2", "quote", "syn", @@ -9866,9 +10747,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.28" +version = "0.4.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e8d7523cb1f2a4c96c1317ca690031b714a51cc14e05f712446691f413f5d39" +checksum = "6f741de44b75e14c35df886aff5f1eb73aa114fa5d4d00dcd37b5e01259bf3b2" dependencies = [ "cfg-if 1.0.0", "js-sys", @@ -9878,9 +10759,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.78" +version = "0.2.80" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d56146e7c495528bf6587663bea13a8eb588d39b36b679d83972e1a2dbbdacf9" +checksum = "17cae7ff784d7e83a2fe7611cfe766ecf034111b49deb850a3dc7699c08251f5" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -9888,9 +10769,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.78" +version = "0.2.80" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7803e0eea25835f8abdc585cd3021b3deb11543c6fe226dcd30b228857c5c5ab" +checksum = "99ec0dc7a4756fffc231aab1b9f2f578d23cd391390ab27f952ae0c9b3ece20b" dependencies = [ "proc-macro2", "quote", @@ -9901,9 +10782,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.78" +version = "0.2.80" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0237232789cf037d5480773fe568aac745bfe2afbc11a863e97901780a6b47cc" +checksum = "d554b7f530dee5964d9a9468d95c1f8b8acae4f282807e7d27d4b03099a46744" [[package]] name = "wasm-gc-api" @@ -9911,18 +10792,27 @@ version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d0c32691b6c7e6c14e7f8fd55361a9088b507aa49620fcd06c09b3a1082186b9" dependencies = [ - "log 0.4.14", + "log 0.4.17", "parity-wasm 0.32.0", "rustc-demangle", ] +[[package]] +name = "wasm-instrument" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "962e5b0401bbb6c887f54e69b8c496ea36f704df65db73e81fd5ff8dc3e63a9f" +dependencies = [ + "parity-wasm 0.42.2", +] + [[package]] name = "wasm-timer" version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "be0ecb0db480561e9a7642b5d3e4187c128914e58aa84330b9493e3eb68c5e7f" dependencies = [ - "futures 0.3.17", + "futures 0.3.21", "js-sys", "parking_lot 0.11.2", "pin-utils", @@ -9939,9 +10829,10 @@ checksum = "ca00c5147c319a8ec91ec1a0edbec31e566ce2c9cc93b3f9bb86a9efd0eb795d" dependencies = [ "downcast-rs", "libc", + "libm", "memory_units", "num-rational 0.2.4", - "num-traits 0.2.14", + "num-traits 0.2.15", "parity-wasm 0.42.2", "wasmi-validation", ] @@ -9957,57 +10848,56 @@ dependencies = [ [[package]] name = "wasmparser" -version = "0.78.2" +version = "0.83.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52144d4c78e5cf8b055ceab8e5fa22814ce4315d6002ad32cfd914f37c12fd65" +checksum = "718ed7c55c2add6548cca3ddd6383d738cd73b892df400e96b9aa876f0141d7a" [[package]] name = "wasmtime" -version = "0.27.0" +version = "0.35.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b310b9d20fcf59385761d1ade7a3ef06aecc380e3d3172035b919eaf7465d9f7" +checksum = "21ffb4705016d5ca91e18a72ed6822dab50e6d5ddd7045461b17ef19071cdef1" dependencies = [ "anyhow", "backtrace", "bincode", "cfg-if 1.0.0", - "cpp_demangle", "indexmap", "lazy_static", "libc", - "log 0.4.14", + "log 0.4.17", + "object 0.27.1", + "once_cell", "paste", "psm", + "rayon", "region", - "rustc-demangle", - "serde 1.0.130", - "smallvec 1.7.0", + "serde 1.0.137", "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.35.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d14d500d5c3dc5f5c097158feee123d64b3097f0d836a2a27dff9c761c73c843" +checksum = "85c6ab24291fa7cb3a181f5669f6c72599b7ef781669759b45c7828c5999d0c0" dependencies = [ "anyhow", "base64 0.13.0", "bincode", "directories-next", - "errno", "file-per-thread-logger", - "libc", - "log 0.4.14", - "serde 1.0.130", - "sha2 0.9.8", + "log 0.4.17", + "rustix", + "serde 1.0.137", + "sha2 0.9.9", "toml", "winapi 0.3.9", "zstd", @@ -10015,29 +10905,20 @@ dependencies = [ [[package]] name = "wasmtime-cranelift" -version = "0.27.0" +version = "0.35.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c525b39f062eada7db3c1298287b96dcb6e472b9f6b22501300b28d9fa7582f6" +checksum = "f04c810078a491b7bc4866ebe045f714d2b95e6b539e1f64009a4a7606be11de" 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", + "log 0.4.17", "more-asserts", - "object 0.24.0", + "object 0.27.1", "target-lexicon", "thiserror", "wasmparser", @@ -10046,115 +10927,103 @@ dependencies = [ [[package]] name = "wasmtime-environ" -version = "0.27.0" +version = "0.35.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f64d0c2d881c31b0d65c1f2695e022d71eb60b9fbdd336aacca28208b58eac90" +checksum = "61448266ea164b1ac406363cdcfac81c7c44db4d94c7a81c8620ac6c5c6cdf59" dependencies = [ - "cfg-if 1.0.0", - "cranelift-codegen", + "anyhow", "cranelift-entity", - "cranelift-wasm", - "gimli 0.24.0", + "gimli", "indexmap", - "log 0.4.14", + "log 0.4.17", "more-asserts", - "serde 1.0.130", + "object 0.27.1", + "serde 1.0.137", + "target-lexicon", "thiserror", "wasmparser", + "wasmtime-types", ] [[package]] name = "wasmtime-jit" -version = "0.27.0" +version = "0.35.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d4539ea734422b7c868107e2187d7746d8affbcaa71916d72639f53757ad707" +checksum = "156b4623c6b0d4b8c24afb846c20525922f538ef464cc024abab7ea8de2109a2" dependencies = [ - "addr2line 0.15.2", + "addr2line", "anyhow", + "bincode", "cfg-if 1.0.0", - "cranelift-codegen", - "cranelift-entity", - "cranelift-frontend", - "cranelift-native", - "cranelift-wasm", - "gimli 0.24.0", - "log 0.4.14", - "more-asserts", - "object 0.24.0", - "rayon", + "cpp_demangle", + "gimli", + "log 0.4.17", + "object 0.27.1", "region", - "serde 1.0.130", + "rustc-demangle", + "rustix", + "serde 1.0.137", "target-lexicon", "thiserror", - "wasmparser", - "wasmtime-cranelift", - "wasmtime-debug", "wasmtime-environ", - "wasmtime-obj", - "wasmtime-profiling", + "wasmtime-jit-debug", "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" +name = "wasmtime-jit-debug" +version = "0.35.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e24364d522dcd67c897c8fffc42e5bdfc57207bbb6d7eeade0da9d4a7d70105b" +checksum = "d5dc31f811760a6c76b2672c404866fd19b75e5fb3b0075a3e377a6846490654" dependencies = [ - "anyhow", - "cfg-if 1.0.0", "lazy_static", - "libc", - "serde 1.0.130", - "target-lexicon", - "wasmtime-environ", - "wasmtime-runtime", + "object 0.27.1", + "rustix", ] [[package]] name = "wasmtime-runtime" -version = "0.27.0" +version = "0.35.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c51e57976e8a19a18a18e002c6eb12e5769554204238e47ff155fda1809ef0f7" +checksum = "f907beaff69d4d920fa4688411ee4cc75c0f01859e424677f9e426e2ef749864" dependencies = [ "anyhow", "backtrace", "cc", "cfg-if 1.0.0", "indexmap", - "lazy_static", "libc", - "log 0.4.14", + "log 0.4.17", "mach", "memoffset", "more-asserts", - "rand 0.8.4", + "rand 0.8.5", "region", + "rustix", "thiserror", "wasmtime-environ", + "wasmtime-jit-debug", "winapi 0.3.9", ] +[[package]] +name = "wasmtime-types" +version = "0.35.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "514ef0e5fd197b9609dc9eb74beba0c84d5a12b2417cbae55534633329ba4852" +dependencies = [ + "cranelift-entity", + "serde 1.0.137", + "thiserror", + "wasmparser", +] + [[package]] name = "web-sys" -version = "0.3.55" +version = "0.3.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38eb105f1c59d9eaa6b5cdc92b859d85b926e82cb2e0945cd0c9259faa6fe9fb" +checksum = "7b17e741662c70c8bd24ac5c5b18de314a2c26c32bf8346ee1e6f53de919c283" dependencies = [ "js-sys", "wasm-bindgen", @@ -10163,67 +11032,69 @@ dependencies = [ [[package]] name = "web3" version = "0.17.0" -source = "git+https://github.com/tomusdrw/rust-web3?rev=861cfcd#861cfcda263d9901a9f5f023d557bd0d3ea728f6" +source = "git+https://github.com/tomusdrw/rust-web3.git?rev=a425fa7#a425fa747bca69c7aede4d2c2828f7267d79227e" dependencies = [ "arrayvec 0.7.2", "base64 0.13.0", "bytes 1.1.0", "derive_more", "ethabi 15.0.0", - "ethereum-types", - "futures 0.3.17", - "futures-timer 3.0.2", + "ethereum-types 0.12.1", + "futures 0.3.21", + "futures-timer", "headers", "hex", "jsonrpc-core", - "log 0.4.14", + "log 0.4.17", "once_cell", "parking_lot 0.11.2", - "pin-project 1.0.8", + "pin-project 1.0.10", "reqwest", "rlp", - "secp256k1", - "serde 1.0.130", + "secp256k1 0.20.3", + "serde 1.0.137", "serde_json", - "soketto 0.7.0", + "soketto", "tiny-keccak", "tokio", "tokio-stream", - "tokio-util", + "tokio-util 0.6.9", "url 2.2.2", "web3-async-native-tls", ] [[package]] name = "web3" -version = "0.17.0" -source = "git+https://github.com/tomusdrw/rust-web3.git?rev=a425fa7#a425fa747bca69c7aede4d2c2828f7267d79227e" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44f258e254752d210b84fe117b31f1e3cc9cbf04c0d747eb7f8cf7cf5e370f6d" dependencies = [ "arrayvec 0.7.2", "base64 0.13.0", "bytes 1.1.0", "derive_more", - "ethabi 15.0.0", - "ethereum-types", - "futures 0.3.17", - "futures-timer 3.0.2", + "ethabi 16.0.0", + "ethereum-types 0.12.1", + "futures 0.3.21", + "futures-timer", "headers", "hex", + "idna 0.2.3", "jsonrpc-core", - "log 0.4.14", + "log 0.4.17", "once_cell", - "parking_lot 0.11.2", - "pin-project 1.0.8", + "parking_lot 0.12.0", + "pin-project 1.0.10", "reqwest", "rlp", - "secp256k1", - "serde 1.0.130", + "secp256k1 0.21.3", + "serde 1.0.137", "serde_json", - "soketto 0.7.0", + "soketto", "tiny-keccak", "tokio", "tokio-stream", - "tokio-util", + "tokio-util 0.6.9", "url 2.2.2", "web3-async-native-tls", ] @@ -10250,13 +11121,32 @@ dependencies = [ "untrusted", ] +[[package]] +name = "webpki" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f095d78192e208183081cc07bc5515ef55216397af48b873e5edcd72637fa1bd" +dependencies = [ + "ring", + "untrusted", +] + [[package]] name = "webpki-roots" version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aabe153544e473b775453675851ecc86863d2a81d786d741f6b76778f2a48940" dependencies = [ - "webpki", + "webpki 0.21.4", +] + +[[package]] +name = "webpki-roots" +version = "0.22.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44d8de8415c823c8abd270ad483c6feeac771fad964890779f9a8cb24fbbc1bf" +dependencies = [ + "webpki 0.22.0", ] [[package]] @@ -10311,9 +11201,9 @@ dependencies = [ [[package]] name = "which" -version = "4.2.2" +version = "4.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea187a8ef279bc014ec368c27a920da2024d2a711109bfbe3440585d5cf27ad9" +checksum = "5c4fb54e6113b6a8772ee41c3404fb0301ac79604489467e0a9ce1f3e97c24ae" dependencies = [ "either", "lazy_static", @@ -10369,6 +11259,49 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "windows-sys" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2" +dependencies = [ + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_msvc" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" + +[[package]] +name = "windows_i686_gnu" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" + +[[package]] +name = "windows_i686_msvc" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" + [[package]] name = "winreg" version = "0.6.2" @@ -10380,9 +11313,9 @@ dependencies = [ [[package]] name = "winreg" -version = "0.7.0" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0120db82e8a1e0b9fb3345a539c478767c0048d842860994d96113d5b667bd69" +checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d" dependencies = [ "winapi 0.3.9", ] @@ -10403,6 +11336,15 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "85e60b0d1b5f99db2556934e21937020776a5d31520bf169e851ac44e6420214" +[[package]] +name = "wyz" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30b31594f29d27036c383b53b59ed3476874d518f0efb151b27a4c275141390e" +dependencies = [ + "tap", +] + [[package]] name = "x25519-dalek" version = "1.1.1" @@ -10429,28 +11371,28 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e7d9028f208dd5e63c614be69f115c1b53cacc1111437d4c765185856666c107" dependencies = [ - "futures 0.3.17", - "log 0.4.14", + "futures 0.3.21", + "log 0.4.17", "nohash-hasher", "parking_lot 0.11.2", - "rand 0.8.4", + "rand 0.8.5", "static_assertions", ] [[package]] name = "zeroize" -version = "1.4.3" +version = "1.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d68d9dcec5f9b43a30d38c49f91dfedfaac384cb8f085faca366c26207dd1619" +checksum = "94693807d016b2f2d2e14420eb3bfcca689311ff775dcf113d74ea624b7cdf07" dependencies = [ "zeroize_derive", ] [[package]] name = "zeroize_derive" -version = "1.2.2" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65f1a51723ec88c66d5d1fe80c841f17f63587d6691901d66be9bec6c3b51f73" +checksum = "3f8f187641dad4f680d25c4bfc4225b418165984179f26ca76ec4fb6441d3a17" dependencies = [ "proc-macro2", "quote", @@ -10460,18 +11402,18 @@ dependencies = [ [[package]] name = "zstd" -version = "0.6.1+zstd.1.4.9" +version = "0.10.0+zstd.1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5de55e77f798f205d8561b8fe2ef57abfb6e0ff2abe7fd3c089e119cdb5631a3" +checksum = "3b1365becbe415f3f0fcd024e2f7b45bacfb5bdd055f0dc113571394114e7bdd" dependencies = [ "zstd-safe", ] [[package]] name = "zstd-safe" -version = "3.0.1+zstd.1.4.9" +version = "4.1.4+zstd.1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1387cabcd938127b30ce78c4bf00b30387dddf704e3f0881dbc4ff62b5566f8c" +checksum = "2f7cd17c9af1a4d6c24beb1cc54b17e2ef7b593dc92f19e9d9acad8b182bbaee" dependencies = [ "libc", "zstd-sys", @@ -10479,9 +11421,9 @@ dependencies = [ [[package]] name = "zstd-sys" -version = "1.4.20+zstd.1.4.9" +version = "1.6.3+zstd.1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebd5b733d7cf2d9447e2c3e76a5589b4f5e5ae065c22a2bc0b023cbc331b6c8e" +checksum = "fc49afa5c8d634e75761feda8c592051e7eeb4683ba827211eb0d731d3402ea8" dependencies = [ "cc", "libc", diff --git a/engine/Cargo.toml b/engine/Cargo.toml index c8446e6c25..a26344d465 100644 --- a/engine/Cargo.toml +++ b/engine/Cargo.toml @@ -44,7 +44,7 @@ jsonrpc-ws-server = "18.0.0" websocket = "0.24" ethbloom = "0.11.1" dyn-clone = "1.0.4" -kvdb-rocksdb = "0.14.0" +kvdb-rocksdb = "0.15.2" lazy_static = "1.4" num = "0.4.0" parking_lot = "0.11" @@ -63,7 +63,7 @@ tokio-stream = "0.1.5" url = "1.7.2" web3 = {git = 'https://github.com/tomusdrw/rust-web3.git', rev = 'a425fa7'} zeroize = "1.4.3" -libp2p = "0.39.1" +libp2p = "0.40" generic-array= "0.14" public-ip = "0.2.2" lazy_format = "1.10.0" @@ -88,7 +88,7 @@ state-chain-runtime = {path = "../state-chain/runtime"} utilities = {path = "../utilities"} [dependencies.rocksdb] -version = "0.17.0" +version = "0.18.0" # Disabling of default features, and using lz4 compression is primarily to avoid linker issues # resulting from the default compression using libs that conflict with the system libs # https://github.com/rust-rocksdb/rust-rocksdb/pull/555 @@ -97,46 +97,46 @@ features = ["lz4"] # substrate deps -[dependencies.substrate-subxt] -tag = 'chainflip-monthly-2021-09' +[dependencies.subxt] +tag = 'chainflip-monthly-2022-05' git = 'https://github.com/chainflip-io/substrate-subxt.git' [dependencies.codec] features = ['derive', 'full'] package = 'parity-scale-codec' -version = '2.3.1' +version = '3.0.0' [dependencies.frame-support] git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.frame-system] git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.sc-rpc-api] git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.sp-core] git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.sp-keyring] git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.sp-rpc] git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.sp-runtime] git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.sp-version] git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.curv-kzen] version = "0.9" diff --git a/engine/cli/Cargo.toml b/engine/cli/Cargo.toml index 3e59bb3ffc..8599360299 100644 --- a/engine/cli/Cargo.toml +++ b/engine/cli/Cargo.toml @@ -27,6 +27,6 @@ cf-chains = {path = "../../state-chain/chains"} chainflip-node = {path = "../../state-chain/node"} # Substrate key types -sp-core = {git='https://github.com/chainflip-io/substrate.git', tag='chainflip-monthly-2021-09+1'} -sp-consensus-aura = {git='https://github.com/chainflip-io/substrate.git', tag='chainflip-monthly-2021-09+1'} -sp-finality-grandpa = {git='https://github.com/chainflip-io/substrate.git', tag='chainflip-monthly-2021-09+1'} +sp-core = {git='https://github.com/chainflip-io/substrate.git', tag='chainflip-monthly-2022-05'} +sp-consensus-aura = {git='https://github.com/chainflip-io/substrate.git', tag='chainflip-monthly-2022-05'} +sp-finality-grandpa = {git='https://github.com/chainflip-io/substrate.git', tag='chainflip-monthly-2022-05'} diff --git a/engine/insert-genesis-keyshare/Cargo.toml b/engine/insert-genesis-keyshare/Cargo.toml index 9dce1701d2..f8d95f3a29 100644 --- a/engine/insert-genesis-keyshare/Cargo.toml +++ b/engine/insert-genesis-keyshare/Cargo.toml @@ -10,7 +10,7 @@ chainflip-engine = {path = "../../engine/"} hex = "0.4.3" [dependencies.rocksdb] -version = "0.17.0" +version = "0.18.0" # Disabling of default features, and using lz4 compression is primarily to avoid linker issues # resulting from the default compression using libs that conflict with the system libs # https://github.com/rust-rocksdb/rust-rocksdb/pull/555 diff --git a/engine/src/multisig_p2p.rs b/engine/src/multisig_p2p.rs index 2f8950365b..91eb907173 100644 --- a/engine/src/multisig_p2p.rs +++ b/engine/src/multisig_p2p.rs @@ -173,18 +173,18 @@ async fn update_registered_peer_id Result { Ok(PeerId::from_public_key( - libp2p::identity::PublicKey::Ed25519(libp2p::identity::ed25519::PublicKey::decode( + &libp2p::identity::PublicKey::Ed25519(libp2p::identity::ed25519::PublicKey::decode( &peer_public_key.0[..], )?), )) diff --git a/engine/src/state_chain/client.rs b/engine/src/state_chain/client.rs index 44c5c8ebbc..26ab344087 100644 --- a/engine/src/state_chain/client.rs +++ b/engine/src/state_chain/client.rs @@ -34,7 +34,7 @@ use std::net::Ipv6Addr; use std::str::FromStr; use std::sync::atomic::{AtomicU32, Ordering}; use std::{marker::PhantomData, sync::Arc}; -use substrate_subxt::{ +use subxt::{ balances::Balances, extrinsic::{ ChargeTransactionPayment, CheckEra, CheckGenesis, CheckNonce, CheckSpecVersion, @@ -78,12 +78,12 @@ impl Balances for RuntimeImplForSigningExtrinsics { impl Runtime for RuntimeImplForSigningExtrinsics { type Signature = state_chain_runtime::Signature; type Extra = SCDefaultExtra; - fn register_type_sizes(_event_type_registry: &mut substrate_subxt::EventTypeRegistry) { + fn register_type_sizes(_event_type_registry: &mut subxt::EventTypeRegistry) { unreachable!(); } } -/// Needed so we can use substrate_subxt's extrinsic signing code +/// Needed so we can use subxt's extrinsic signing code /// Defines extra parameters contained in an extrinsic #[derive(Encode, Decode, Clone, Eq, PartialEq, Debug)] pub struct SCDefaultExtra { @@ -337,8 +337,7 @@ pub struct StateChainClient { runtime_version: RwLock, genesis_hash: state_chain_runtime::Hash, - pub signer: - substrate_subxt::PairSigner, + pub signer: subxt::PairSigner, state_chain_rpc_client: RpcClient, } @@ -364,7 +363,7 @@ pub fn mock_account_storage_key() -> StorageKey { #[cfg(test)] impl StateChainClient { pub fn create_test_sc_client(rpc_client: RpcClient) -> Self { - use substrate_subxt::PairSigner; + use subxt::PairSigner; Self { heartbeat_block_interval: 20, @@ -498,7 +497,7 @@ impl StateChainClient { state_chain_runtime::Call: std::convert::From, { let extrinsic = state_chain_runtime::Call::from(extrinsic); - let encoded_extrinsic = substrate_subxt::Encoded(extrinsic.encode()); + let encoded_extrinsic = subxt::Encoded(extrinsic.encode()); for _ in 0..MAX_EXTRINSIC_RETRY_ATTEMPTS { // use the previous value but increment it for the next thread that loads/fetches it let nonce = self.nonce.fetch_add(1, Ordering::Relaxed); @@ -506,7 +505,7 @@ impl StateChainClient { match self .state_chain_rpc_client .submit_extrinsic_rpc( - substrate_subxt::extrinsic::create_signed::( + subxt::extrinsic::create_signed::( &runtime_version, self.genesis_hash, nonce, @@ -631,11 +630,9 @@ impl StateChainClient { state_chain_runtime::Call: std::convert::From, Extrinsic: 'static + std::fmt::Debug + Clone + Send, { - let unsigned_tx = substrate_subxt::extrinsic::create_unsigned::< - RuntimeImplForSigningExtrinsics, - >(substrate_subxt::Encoded( - state_chain_runtime::Call::from(extrinsic.clone()).encode(), - )); + let unsigned_tx = subxt::extrinsic::create_unsigned::( + subxt::Encoded(state_chain_runtime::Call::from(extrinsic.clone()).encode()), + ); let expected_hash = BlakeTwo256::hash_of(&unsigned_tx); match self .state_chain_rpc_client @@ -992,21 +989,18 @@ async fn inner_connect_to_state_chain( impl Stream>, Arc>, )> { - use substrate_subxt::Signer; + use subxt::Signer; let logger = logger.new(o!(COMPONENT_KEY => "StateChainConnector")); - let signer = substrate_subxt::PairSigner::< - RuntimeImplForSigningExtrinsics, - sp_core::sr25519::Pair, - >::new(sp_core::sr25519::Pair::from_seed( - &read_clean_and_decode_hex_str_file( + let signer = subxt::PairSigner::::new( + sp_core::sr25519::Pair::from_seed(&read_clean_and_decode_hex_str_file( &state_chain_settings.signing_key_file, "State Chain Signing Key", |str| { <[u8; 32]>::try_from(hex::decode(str).map_err(anyhow::Error::new)?) .map_err(|_err| anyhow::Error::msg("Wrong length")) }, - )?, - )); + )?), + ); let our_account_id = signer.account_id().to_owned(); @@ -1131,7 +1125,7 @@ async fn inner_connect_to_state_chain( latest_block_hash ); - let metadata = substrate_subxt::Metadata::try_from(RuntimeMetadataPrefixed::decode( + let metadata = subxt::Metadata::try_from(RuntimeMetadataPrefixed::decode( &mut &state_chain_rpc_client .state_rpc_client .metadata(Some(latest_block_hash)) diff --git a/state-chain/README.md b/state-chain/README.md index 87367e254e..313ef0df7f 100644 --- a/state-chain/README.md +++ b/state-chain/README.md @@ -95,7 +95,7 @@ nodes expose a number of capabilities: - Networking: Substrate nodes use the [`libp2p`](https://libp2p.io/) networking stack to allow the nodes in the network to communicate with one another. - Consensus: Blockchains must have a way to come to - [consensus](https://substrate.dev/docs/en/knowledgebase/advanced/consensus) on the state of the + [consensus](https://docs.substrate.io/v3/advanced/consensus) on the state of the network. Substrate makes it possible to supply custom consensus engines and also ships with several consensus mechanisms that have been built on top of [Web3 Foundation research](https://research.web3.foundation/en/latest/polkadot/NPoS/index.html). @@ -104,21 +104,21 @@ nodes expose a number of capabilities: There are several files in the `node` directory - take special note of the following: - [`chain_spec.rs`](./node/src/chain_spec.rs): A - [chain specification](https://substrate.dev/docs/en/knowledgebase/integrate/chain-spec) is a + [chain specification](https://docs.substrate.io/v3/integrate/chain-spec) is a source code file that defines a Substrate chain's initial (genesis) state. Chain specifications are useful for development and testing, and critical when architecting the launch of a production chain. Take note of the `development_config` and `testnet_genesis` functions, which are used to define the genesis state for the local development chain configuration. These functions identify some - [well-known accounts](https://substrate.dev/docs/en/knowledgebase/integrate/subkey#well-known-keys) + [well-known accounts](https://docs.substrate.io/v3/integrate/subkey#well-known-keys) and use them to configure the blockchain's initial state. - [`service.rs`](./node/src/service.rs): This file defines the node implementation. Take note of the libraries that this file imports and the names of the functions it invokes. In particular, there are references to consensus-related topics, such as the - [longest chain rule](https://substrate.dev/docs/en/knowledgebase/advanced/consensus#longest-chain-rule), - the [Aura](https://substrate.dev/docs/en/knowledgebase/advanced/consensus#aura) block authoring + [longest chain rule](https://docs.substrate.io/v3/advanced/consensus#longest-chain-rule), + the [Aura](https://docs.substrate.io/v3/advanced/consensus#aura) block authoring mechanism and the - [GRANDPA](https://substrate.dev/docs/en/knowledgebase/advanced/consensus#grandpa) finality + [GRANDPA](https://docs.substrate.io/v3/advanced/consensus#grandpa) finality gadget. After the node has been [built](#build), refer to the embedded documentation to learn more about the @@ -131,14 +131,14 @@ capabilities and configuration parameters that it exposes: ### Runtime In Substrate, the terms -"[runtime](https://substrate.dev/docs/en/knowledgebase/getting-started/glossary#runtime)" and -"[state transition function](https://substrate.dev/docs/en/knowledgebase/getting-started/glossary#stf-state-transition-function)" +"[runtime](https://docs.substrate.io/v3/getting-started/glossary#runtime)" and +"[state transition function](https://docs.substrate.io/v3/getting-started/glossary#stf-state-transition-function)" are analogous - they refer to the core logic of the blockchain that is responsible for validating blocks and executing the state changes they define. The Substrate project in this repository uses -the [FRAME](https://substrate.dev/docs/en/knowledgebase/runtime/frame) framework to construct a blockchain runtime. +the [FRAME](https://docs.substrate.io/v3/runtime/frame) framework to construct a blockchain runtime. FRAME allows runtime developers to declare domain-specific logic in modules called "pallets". At the heart of FRAME is a helpful -[macro language](https://substrate.dev/docs/en/knowledgebase/runtime/macros) that makes it easy to create pallets and +[macro language](https://docs.substrate.io/v3/runtime/macros) that makes it easy to create pallets and flexibly compose them to create blockchains that can address [a variety of needs](https://www.substrate.io/substrate-users/). @@ -149,7 +149,7 @@ Review the [FRAME runtime implementation](./runtime/src/lib.rs) included in this - The pallets are composed into a single runtime by way of the [`construct_runtime!`](https://crates.parity.io/frame_support/macro.construct_runtime.html) macro, which is part of the core - [FRAME Support](https://substrate.dev/docs/en/knowledgebase/runtime/frame#support-library) + [FRAME Support](https://docs.substrate.io/v3/runtime/frame#support-library) library. ### Pallets @@ -161,12 +161,12 @@ is [defined in the `pallets`](./pallets/template/src/lib.rs) directory. A FRAME pallet is compromised of a number of blockchain primitives: - Storage: FRAME defines a rich set of powerful - [storage abstractions](https://substrate.dev/docs/en/knowledgebase/runtime/storage) that makes + [storage abstractions](https://docs.substrate.io/v3/runtime/storage) that makes it easy to use Substrate's efficient key-value database to manage the evolving state of a blockchain. - Dispatchables: FRAME pallets define special types of functions that can be invoked (dispatched) from outside of the runtime in order to update its state. -- Events: Substrate uses [events](https://substrate.dev/docs/en/knowledgebase/runtime/events) to +- Events: Substrate uses [events](https://docs.substrate.io/v3/runtime/events-and-errors) to notify users of important changes in the runtime. - Errors: When a dispatchable fails, it returns an error. - Config: The `Config` configuration interface is used to define the types and parameters upon diff --git a/state-chain/cf-integration-tests/Cargo.toml b/state-chain/cf-integration-tests/Cargo.toml index ae3c0689b2..1b9a3f4b4e 100644 --- a/state-chain/cf-integration-tests/Cargo.toml +++ b/state-chain/cf-integration-tests/Cargo.toml @@ -38,12 +38,12 @@ pallet-cf-environment = { path = "../pallets/cf-environment", default-features = [dependencies.pallet-authorship] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.pallet-session] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' features = ['historical'] # Substrate dependencies @@ -51,39 +51,39 @@ features = ['historical'] default-features = false features = ['derive'] package = 'parity-scale-codec' -version = '2.3.1' +version = '3.0.0' [dependencies.frame-benchmarking] default-features = false git = 'https://github.com/chainflip-io/substrate.git' optional = true -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.frame-executive] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.frame-support] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.frame-system] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.frame-system-benchmarking] default-features = false git = 'https://github.com/chainflip-io/substrate.git' optional = true -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.frame-system-rpc-runtime-api] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dev-dependencies.hex-literal] version = '0.3.1' @@ -91,90 +91,90 @@ version = '0.3.1' [dependencies.pallet-aura] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.pallet-grandpa] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.pallet-randomness-collective-flip] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.pallet-timestamp] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.pallet-transaction-payment] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.scale-info] default-features = false features = ['derive'] -version = '1.0' +version = '2.0.1' [dependencies.sp-block-builder] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.sp-consensus-aura] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' version = '0.10.0-dev' [dependencies.sp-core] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.sp-inherents] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.sp-offchain] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.sp-runtime] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.sp-session] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.sp-std] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.sp-transaction-pool] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.sp-version] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dev-dependencies] assert_matches = { version = '1.5.0' } [dev-dependencies.sp-finality-grandpa] git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [features] default = ['std'] diff --git a/state-chain/chains/Cargo.toml b/state-chain/chains/Cargo.toml index 7784c4fa1a..5fd69f167c 100644 --- a/state-chain/chains/Cargo.toml +++ b/state-chain/chains/Cargo.toml @@ -11,8 +11,9 @@ libsecp256k1 = { default-features = false, version = '0.7', features = ['static- secp256k1 = {optional = true, version = "0.20"} # Ethereum -ethabi = {default-features = false, features = ['codec', 'serialize'], git = 'https://github.com/chainflip-io/ethabi', rev = '87ea2a3'} -ethereum = {default-features = false, version = "0.10"} +ethabi = {default-features = false, version = "17.0"} +ethereum-types = {default-features = false, version = "0.13.1"} +ethereum = {default-features = false, version = "0.12"} rlp = {default-features = false, version = "0.5"} # Other @@ -27,32 +28,37 @@ cf-runtime-benchmark-utilities = { path = '../runtime-benchmark-utilities', defa default-features = false features = ['derive'] package = 'parity-scale-codec' -version = '2.3.1' +version = '3.0.0' + +[dependencies.scale-info] +default-features = false +features = ['derive'] +version = '2.0.1' [dependencies.sp-std] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.frame-support] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.frame-system] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.sp-runtime] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dev-dependencies] hex-literal = {version = '0.3'} -web3 = {git = 'https://github.com/tomusdrw/rust-web3', rev = '861cfcd', features = ['test']} +web3 = {version='0.18', features = ['test']} rand = {version='0.8.4'} [features] @@ -60,7 +66,7 @@ default = ['std'] std = [ 'cf-runtime-benchmark-utilities/std', 'codec/std', - 'ethabi/std', + 'ethabi/full-serde', 'ethereum/std', 'frame-support/std', 'frame-system/std', diff --git a/state-chain/chains/src/eth.rs b/state-chain/chains/src/eth.rs index 5df2e94dc7..45924b49cf 100644 --- a/state-chain/chains/src/eth.rs +++ b/state-chain/chains/src/eth.rs @@ -1,7 +1,7 @@ //! Types and functions that are common to ethereum. pub mod api; -use codec::{Decode, Encode}; +use codec::{Decode, Encode, MaxEncodedLen}; pub use ethabi::{ ethereum_types::{H256, U256}, Address, Hash as TxHash, Token, Uint, @@ -10,6 +10,7 @@ use libsecp256k1::{ curve::{Affine, Field, Jacobian, Scalar}, PublicKey, SecretKey, ECMULT_CONTEXT, }; +use scale_info::TypeInfo; #[cfg(feature = "std")] use serde::{Deserialize, Serialize}; use sp_runtime::{ @@ -38,7 +39,7 @@ pub trait Tokenizable { /// The `SigData` struct used for threshold signatures in the smart contracts. /// See [here](https://github.com/chainflip-io/chainflip-eth-contracts/blob/master/contracts/interfaces/IShared.sol). -#[derive(Encode, Decode, Copy, Clone, RuntimeDebug, Default, PartialEq, Eq)] +#[derive(Encode, Decode, TypeInfo, Copy, Clone, RuntimeDebug, Default, PartialEq, Eq)] pub struct SigData { /// The address of the Key Manager contract, to prevent replay attacks key_manager_address: Address, @@ -60,6 +61,14 @@ pub struct SigData { k_times_g_address: Address, } +impl MaxEncodedLen for SigData { + fn max_encoded_len() -> usize { + <[u8; 20]>::max_encoded_len() * 2 // 2 x Addresses + + <[u64; 4]>::max_encoded_len() * 3 // 3 x Uint + + <[u8; 32]>::max_encoded_len() // H256 + } +} + impl SigData { /// Initiate a new `SigData` with given nonce value pub fn new_empty(replay_protection: EthereumReplayProtection) -> Self { @@ -123,7 +132,19 @@ pub enum AggKeyVerificationError { /// use. Ethereum generaly assumes `0` or `1` but the standard serialization format used in most /// libraries assumes `2` or `3`. #[cfg_attr(feature = "std", derive(Serialize, Deserialize))] -#[derive(Encode, Decode, Copy, Clone, RuntimeDebug, PartialEq, Eq, PartialOrd, Ord)] +#[derive( + Encode, + Decode, + TypeInfo, + MaxEncodedLen, + Copy, + Clone, + RuntimeDebug, + PartialEq, + Eq, + PartialOrd, + Ord, +)] pub enum ParityBit { Odd, Even, @@ -169,7 +190,19 @@ impl From for Uint { /// For encoding the `Key` type as defined in #[cfg_attr(feature = "std", derive(Serialize, Deserialize))] -#[derive(Encode, Decode, Copy, Clone, RuntimeDebug, PartialEq, Eq, PartialOrd, Ord)] +#[derive( + Encode, + Decode, + TypeInfo, + MaxEncodedLen, + Copy, + Clone, + RuntimeDebug, + PartialEq, + Eq, + PartialOrd, + Ord, +)] pub struct AggKey { /// X coordinate of the public key as a 32-byte array. pub pub_key_x: [u8; 32], @@ -411,7 +444,7 @@ impl From<&secp256k1::PublicKey> for AggKey { } } -#[derive(Encode, Decode, Copy, Clone, RuntimeDebug, PartialEq, Eq)] +#[derive(Encode, Decode, TypeInfo, Copy, Clone, RuntimeDebug, PartialEq, Eq)] pub struct SchnorrVerificationComponents { /// Scalar component pub s: [u8; 32], @@ -420,7 +453,7 @@ pub struct SchnorrVerificationComponents { } /// Errors that can occur when verifying an Ethereum transaction. -#[derive(Encode, Decode, Clone, RuntimeDebug, PartialEq, Eq)] +#[derive(Encode, Decode, TypeInfo, Clone, RuntimeDebug, PartialEq, Eq)] pub enum TransactionVerificationError { /// The transaction's chain id is invalid. InvalidChainId, @@ -437,7 +470,7 @@ pub enum TransactionVerificationError { } /// Parameters that are checked as part of Ethereum transaction verification. -#[derive(Encode, Decode, Copy, Clone, RuntimeDebug, PartialEq, Eq)] +#[derive(Encode, Decode, TypeInfo, Copy, Clone, RuntimeDebug, PartialEq, Eq)] pub enum CheckedTransactionParameter { ChainId, GasLimit, @@ -462,7 +495,7 @@ impl From for TransactionVerificationError { /// /// We assume the access_list (EIP-2930) is not required. #[cfg_attr(feature = "std", derive(Serialize, Deserialize))] -#[derive(Encode, Decode, Clone, RuntimeDebug, Default, PartialEq, Eq)] +#[derive(Encode, Decode, TypeInfo, Clone, RuntimeDebug, Default, PartialEq, Eq)] pub struct UnsignedTransaction { pub chain_id: u64, pub max_priority_fee_per_gas: Option, // EIP-1559 @@ -644,7 +677,7 @@ pub fn verify_transaction( unsigned.match_against_recovered(decoded_tx) } -#[derive(Encode, Decode, Clone, PartialEq, Eq, Default)] +#[derive(Encode, Decode, TypeInfo, Clone, PartialEq, Eq, Default)] pub struct TransactionHash(H256); impl core::fmt::Debug for TransactionHash { fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> Result<(), core::fmt::Error> { diff --git a/state-chain/chains/src/eth/api.rs b/state-chain/chains/src/eth/api.rs index deac64083c..3852435b0c 100644 --- a/state-chain/chains/src/eth/api.rs +++ b/state-chain/chains/src/eth/api.rs @@ -7,14 +7,14 @@ pub mod set_agg_key_with_agg_key; pub mod update_flip_supply; /// Chainflip api calls available on Ethereum. -#[derive(Clone, Debug, PartialEq, Eq, Encode, Decode)] +#[derive(Clone, Debug, PartialEq, Eq, Encode, Decode, TypeInfo, MaxEncodedLen)] pub enum EthereumApi { SetAggKeyWithAggKey(set_agg_key_with_agg_key::SetAggKeyWithAggKey), RegisterClaim(register_claim::RegisterClaim), UpdateFlipSupply(update_flip_supply::UpdateFlipSupply), } -#[derive(Clone, Copy, Debug, PartialEq, Eq, Encode, Decode, Default)] +#[derive(Clone, Copy, Debug, PartialEq, Eq, Encode, Decode, TypeInfo, Default)] pub struct EthereumReplayProtection { pub key_manager_address: [u8; 20], pub chain_id: u64, @@ -160,3 +160,18 @@ impl_api_calls! { set_agg_key_with_agg_key::SetAggKeyWithAggKey, update_flip_supply::UpdateFlipSupply, } + +fn ethabi_function(name: &'static str, params: Vec) -> ethabi::Function { + #[allow(deprecated)] + ethabi::Function { + name: name.into(), + inputs: params, + outputs: vec![], + constant: None, + state_mutability: ethabi::StateMutability::NonPayable, + } +} + +fn ethabi_param(name: &'static str, param_type: ethabi::ParamType) -> ethabi::Param { + ethabi::Param { name: name.into(), kind: param_type, internal_type: None } +} diff --git a/state-chain/chains/src/eth/api/register_claim.rs b/state-chain/chains/src/eth/api/register_claim.rs index 418790a6e5..e1947122c1 100644 --- a/state-chain/chains/src/eth/api/register_claim.rs +++ b/state-chain/chains/src/eth/api/register_claim.rs @@ -5,16 +5,17 @@ use crate::{ ChainCrypto, Ethereum, }; -use codec::{Decode, Encode}; -use ethabi::{Address, Param, ParamType, StateMutability, Token, Uint}; +use codec::{Decode, Encode, MaxEncodedLen}; +use ethabi::{Address, ParamType, Token, Uint}; +use scale_info::TypeInfo; use sp_runtime::RuntimeDebug; use sp_std::{prelude::*, vec}; -use super::EthereumReplayProtection; +use super::{ethabi_function, ethabi_param, EthereumReplayProtection}; /// Represents all the arguments required to build the call to StakeManager's 'requestClaim' /// function. -#[derive(Encode, Decode, Clone, RuntimeDebug, Default, PartialEq, Eq)] +#[derive(Encode, Decode, TypeInfo, Clone, RuntimeDebug, Default, PartialEq, Eq)] pub struct RegisterClaim { /// The signature data for validation and replay protection. pub sig_data: SigData, @@ -28,6 +29,15 @@ pub struct RegisterClaim { pub expiry: Uint, } +impl MaxEncodedLen for RegisterClaim { + fn max_encoded_len() -> usize { + SigData::max_encoded_len() + + 2 * <[u64; 4]>::max_encoded_len() // 2 x Uint + + <[u8; 32]>::max_encoded_len() // 1 x [u8; 32] + + <[u8; 20]>::max_encoded_len() // 1 x Address + } +} + impl RegisterClaim { pub fn new_unsigned>( replay_protection: EthereumReplayProtection, @@ -78,10 +88,10 @@ impl RegisterClaim { /// the json abi definition is currently not supported in no-std, so instead swe hard-code it /// here and verify against the abi in a unit test. fn get_function(&self) -> ethabi::Function { - ethabi::Function::new( + ethabi_function( "registerClaim", vec![ - Param::new( + ethabi_param( "sigData", ParamType::Tuple(vec![ // keyManagerAddress @@ -98,14 +108,11 @@ impl RegisterClaim { ParamType::Address, ]), ), - Param::new("nodeID", ParamType::FixedBytes(32)), - Param::new("amount", ParamType::Uint(256)), - Param::new("staker", ParamType::Address), - Param::new("expiryTime", ParamType::Uint(48)), + ethabi_param("nodeID", ParamType::FixedBytes(32)), + ethabi_param("amount", ParamType::Uint(256)), + ethabi_param("staker", ParamType::Address), + ethabi_param("expiryTime", ParamType::Uint(48)), ], - vec![], - false, - StateMutability::NonPayable, ) } } diff --git a/state-chain/chains/src/eth/api/set_agg_key_with_agg_key.rs b/state-chain/chains/src/eth/api/set_agg_key_with_agg_key.rs index a295cdff05..af6e1e7d64 100644 --- a/state-chain/chains/src/eth/api/set_agg_key_with_agg_key.rs +++ b/state-chain/chains/src/eth/api/set_agg_key_with_agg_key.rs @@ -5,16 +5,17 @@ use crate::{ ChainCrypto, Ethereum, }; -use codec::{Decode, Encode}; -use ethabi::{Param, ParamType, StateMutability}; +use codec::{Decode, Encode, MaxEncodedLen}; +use ethabi::ParamType; +use scale_info::TypeInfo; use sp_runtime::RuntimeDebug; use sp_std::{prelude::*, vec}; -use super::EthereumReplayProtection; +use super::{ethabi_function, ethabi_param, EthereumReplayProtection}; /// Represents all the arguments required to build the call to StakeManager's 'requestClaim' /// function. -#[derive(Encode, Decode, Clone, RuntimeDebug, PartialEq, Eq)] +#[derive(Encode, Decode, TypeInfo, MaxEncodedLen, Clone, RuntimeDebug, PartialEq, Eq)] pub struct SetAggKeyWithAggKey { /// The signature data for validation and replay protection. pub sig_data: SigData, @@ -58,10 +59,10 @@ impl SetAggKeyWithAggKey { /// from the json abi definition is currently not supported in no-std, so instead we hard-code /// it here and verify against the abi in a unit test. fn get_function(&self) -> ethabi::Function { - ethabi::Function::new( + ethabi_function( "setAggKeyWithAggKey", vec![ - Param::new( + ethabi_param( "sigData", ParamType::Tuple(vec![ ParamType::Address, @@ -72,14 +73,11 @@ impl SetAggKeyWithAggKey { ParamType::Address, ]), ), - Param::new( + ethabi_param( "newKey", ParamType::Tuple(vec![ParamType::Uint(256), ParamType::Uint(8)]), ), ], - vec![], - false, - StateMutability::NonPayable, ) } } diff --git a/state-chain/chains/src/eth/api/update_flip_supply.rs b/state-chain/chains/src/eth/api/update_flip_supply.rs index f4addf536c..a453f7fa9a 100644 --- a/state-chain/chains/src/eth/api/update_flip_supply.rs +++ b/state-chain/chains/src/eth/api/update_flip_supply.rs @@ -1,14 +1,15 @@ use crate::{eth::Tokenizable, ChainCrypto, Ethereum}; -use codec::{Decode, Encode}; -use ethabi::{Address, Param, ParamType, StateMutability, Token, Uint}; +use codec::{Decode, Encode, MaxEncodedLen}; +use ethabi::{Address, ParamType, Token, Uint}; use frame_support::RuntimeDebug; +use scale_info::TypeInfo; use sp_std::{vec, vec::Vec}; use crate::eth::{SchnorrVerificationComponents, SigData}; -use super::EthereumReplayProtection; +use super::{ethabi_function, ethabi_param, EthereumReplayProtection}; -#[derive(Encode, Decode, Clone, RuntimeDebug, PartialEq, Eq)] +#[derive(Encode, Decode, TypeInfo, Clone, RuntimeDebug, PartialEq, Eq)] pub struct UpdateFlipSupply { /// The signature data for validation and replay protection. pub sig_data: SigData, @@ -20,6 +21,14 @@ pub struct UpdateFlipSupply { pub stake_manager_address: Address, } +impl MaxEncodedLen for UpdateFlipSupply { + fn max_encoded_len() -> usize { + SigData::max_encoded_len() + + 2 * <[u64; 4]>::max_encoded_len() + + <[u8; 20]>::max_encoded_len() + } +} + impl UpdateFlipSupply { pub fn new_unsigned, BlockNumber: Into>( replay_protection: EthereumReplayProtection, @@ -67,10 +76,10 @@ impl UpdateFlipSupply { /// from the json abi definition is currently not supported in no-std, so instead we hard-code /// it here and verify against the abi in a unit test. fn get_function(&self) -> ethabi::Function { - ethabi::Function::new( + ethabi_function( "updateFlipSupply", vec![ - Param::new( + ethabi_param( "sigData", ParamType::Tuple(vec![ ParamType::Address, @@ -81,13 +90,10 @@ impl UpdateFlipSupply { ParamType::Address, ]), ), - Param::new("newTotalSupply", ParamType::Uint(256)), - Param::new("stateChainBlockNumber", ParamType::Uint(256)), - Param::new("staker", ParamType::Address), + ethabi_param("newTotalSupply", ParamType::Uint(256)), + ethabi_param("stateChainBlockNumber", ParamType::Uint(256)), + ethabi_param("staker", ParamType::Address), ], - vec![], - false, - StateMutability::NonPayable, ) } } diff --git a/state-chain/chains/src/lib.rs b/state-chain/chains/src/lib.rs index 6602f29e10..7ac14a4d68 100644 --- a/state-chain/chains/src/lib.rs +++ b/state-chain/chains/src/lib.rs @@ -1,12 +1,13 @@ #![cfg_attr(not(feature = "std"), no_std)] use cf_runtime_benchmark_utilities::BenchmarkDefault; -use codec::FullCodec; +use codec::{FullCodec, MaxEncodedLen}; use eth::SchnorrVerificationComponents; use frame_support::{ pallet_prelude::{MaybeSerializeDeserialize, Member}, Parameter, }; +use scale_info::TypeInfo; use sp_runtime::traits::{One, Saturating}; use sp_std::{ convert::{Into, TryFrom}, @@ -73,7 +74,7 @@ pub trait ChainAbi: ChainCrypto { /// A call or collection of calls that can be made to the Chainflip api on an external chain. /// /// See [eth::api::EthereumApi] for an example implementation. -pub trait ApiCall: Parameter { +pub trait ApiCall: Parameter + MaxEncodedLen { /// Get the payload over which the threshold signature should be generated. fn threshold_signature_payload(&self) -> ::Payload; @@ -131,7 +132,7 @@ macro_rules! impl_chains { use sp_runtime::RuntimeDebug; $( - #[derive(Copy, Clone, RuntimeDebug, Default, PartialEq, Eq, Encode, Decode)] + #[derive(Copy, Clone, RuntimeDebug, Default, PartialEq, Eq, Encode, Decode, TypeInfo)] pub struct $chain; impl Chain for $chain { @@ -175,7 +176,7 @@ pub mod mocks { }, } - #[derive(Clone, Debug, PartialEq, Eq, Encode, Decode, Default)] + #[derive(Clone, Debug, PartialEq, Eq, Encode, Decode, TypeInfo, Default)] pub struct MockUnsignedTransaction; impl MockUnsignedTransaction { @@ -185,7 +186,7 @@ pub mod mocks { } } - #[derive(Clone, Debug, PartialEq, Eq, Encode, Decode)] + #[derive(Clone, Debug, PartialEq, Eq, Encode, Decode, TypeInfo)] pub struct MockSignedTransation { transaction: Unsigned, signature: Validity, @@ -203,13 +204,13 @@ pub mod mocks { } } - #[derive(Copy, Clone, Debug, PartialEq, Eq, Encode, Decode)] + #[derive(Copy, Clone, Debug, PartialEq, Eq, Encode, Decode, TypeInfo)] pub enum Validity { Valid, Invalid, } - #[derive(Copy, Clone, Debug, PartialEq, Eq, Default, Encode, Decode)] + #[derive(Copy, Clone, Debug, PartialEq, Eq, Default, Encode, Decode, TypeInfo)] pub struct MockThresholdSignature { pub signing_key: K, pub signed_payload: P, @@ -253,9 +254,15 @@ pub mod mocks { } } - #[derive(Clone, Debug, Default, PartialEq, Eq, Encode, Decode)] + #[derive(Clone, Debug, Default, PartialEq, Eq, Encode, Decode, TypeInfo)] pub struct MockApiCall(C::Payload, Option); + impl MaxEncodedLen for MockApiCall { + fn max_encoded_len() -> usize { + <[u8; 32]>::max_encoded_len() * 3 + } + } + impl ApiCall for MockApiCall { fn threshold_signature_payload(&self) -> ::Payload { self.0.clone() diff --git a/state-chain/custom-rpc/Cargo.toml b/state-chain/custom-rpc/Cargo.toml index e77312b9c8..9259575fb5 100644 --- a/state-chain/custom-rpc/Cargo.toml +++ b/state-chain/custom-rpc/Cargo.toml @@ -15,20 +15,20 @@ jsonrpc-core-client = '18.0.0' [dependencies.sp-runtime] git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.sp-api] git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.sc-client-api] git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.sc-rpc] git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.sc-rpc-api] git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' \ No newline at end of file +tag = 'chainflip-monthly-2022-05' \ No newline at end of file diff --git a/state-chain/doc/rust-setup.md b/state-chain/doc/rust-setup.md deleted file mode 100644 index 34f6e43e7f..0000000000 --- a/state-chain/doc/rust-setup.md +++ /dev/null @@ -1,81 +0,0 @@ ---- -title: Installation ---- - -This page will guide you through the steps needed to prepare a computer for development with the -Substrate Node Template. Since Substrate is built with -[the Rust programming language](https://www.rust-lang.org/), the first thing you will need to do is -prepare the computer for Rust development - these steps will vary based on the computer's operating -system. Once Rust is configured, you will use its toolchains to interact with Rust projects; the -commands for Rust's toolchains will be the same for all supported, Unix-based operating systems. - -## Unix-Based Operating Systems - -Substrate development is easiest on Unix-based operating systems like macOS or Linux. The examples -in the Substrate [Tutorials](https://substrate.dev/tutorials) and [Recipes](https://substrate.dev/recipes/) -use Unix-style terminals to demonstrate how to interact with Substrate from the command line. - -### macOS - -Open the Terminal application and execute the following commands: - -```bash -# Install Homebrew if necessary https://brew.sh/ -/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" - -# Make sure Homebrew is up-to-date, install openssl and cmake -brew update -brew install openssl cmake -``` - -### Ubuntu/Debian - -Use a terminal shell to execute the following commands: - -```bash -sudo apt update -# May prompt for location information -sudo apt install -y cmake pkg-config libssl-dev git build-essential clang libclang-dev curl -``` - -### Arch Linux - -Run these commands from a terminal: - -```bash -pacman -Syu --needed --noconfirm cmake gcc openssl-1.0 pkgconf git clang -export OPENSSL_LIB_DIR="/usr/lib/openssl-1.0" -export OPENSSL_INCLUDE_DIR="/usr/include/openssl-1.0" -``` - -### Fedora/RHEL/CentOS - -Use a terminal to run the following commands: - -```bash -# Update -sudo dnf update -# Install packages -sudo dnf install cmake pkgconfig rocksdb rocksdb-devel llvm git libcurl libcurl-devel curl-devel clang -``` - -## Rust Developer Environment - -This project uses [`rustup`](https://rustup.rs/) to help manage the Rust toolchain. First install -and configure `rustup`: - -```bash -# Install -curl https://sh.rustup.rs -sSf | sh -# Configure -source ~/.cargo/env -``` - -Finally, configure the Rust toolchain: - -```bash -rustup default stable -rustup update nightly -rustup update stable -rustup target add wasm32-unknown-unknown --toolchain nightly -``` diff --git a/state-chain/doc/docker-compose.md b/state-chain/docs/docker-compose.md similarity index 90% rename from state-chain/doc/docker-compose.md rename to state-chain/docs/docker-compose.md index 91da689242..2407249bd1 100644 --- a/state-chain/doc/docker-compose.md +++ b/state-chain/docs/docker-compose.md @@ -2,34 +2,35 @@ First, generate a `docker-compose.yml` file using the `gen-chain-docker-compose.sh` utility script. As arguments, pass valid `--name` arguments (alice, bob, charlie etc... see `chainflip-node --help` for a full list). The script should output a valid docker-compose config to `stdout`. Pipe this to a custom `docker-compose` configuration file: -```bash +```sh ./scripts/gen-chain-docker-compose.sh alice bob eve > docker-compose.yml ``` -You can then start the network. +You can then start the network. ```bash docker-compose up ``` -This will start the nodes but if you look closely you'll notice they can't connect to each other yet! Sadly, substrate's autodiscovery feature doesn't work on docker networks. Not to worry. +This will start the nodes but if you look closely you'll notice they can't connect to each other yet! Sadly, substrate's autodiscovery feature doesn't work on docker networks. Not to worry. Hit `ctrl-C` (or type `docker-compose stop` in another terminal) to stop the chain and look for the following line (or similar) near the start of the log: -``` +```sh cf-substrate-node-alice_1 | Jan 15 14:34:29.715INFO 🏷 Local node identity is: 12D3KooWJo19xzLH4QFxCo8YE6ZHbA9L8SH6MZbLGaWRC4UZLQj5 ``` -Note which of the named nodes this ID corresponds to (*Alice*, in this case) - we will make this our bootstrap node. +Note which of the named nodes this ID corresponds to (*Alice*, in this case) - we will make this our bootstrap node. -Now, open the `docker-compose` config generated above and for each of the *other* nodes in the config, add `--bootnodes /ip4/${bootnode-ip-address}/tcp/30333/p2p/${bootnode-peer-id}` to the end of the command, replacing `${boootnode-ip-address}` and `${bootnode-peer-id}` with the bootstrap node's ip and the id from the log. It should look like this: +Now, open the `docker-compose` config generated above and for each of the *other* nodes in the config, add `--bootnodes /ip4/${bootnode-ip-address}/tcp/30333/p2p/${bootnode-peer-id}` to the end of the command, replacing `${boootnode-ip-address}` and `${bootnode-peer-id}` with the bootstrap node's ip and the id from the log. It should look like this: ```yaml command: ./target/release/chainflip-node --dev --ws-external --eve --bootnodes /ip4/172.28.0.2/tcp/30333/p2p/12D3KooWJo19xzLH4QFxCo8YE6ZHbA9L8SH6MZbLGaWRC4UZLQj5 ``` Save this file and run `docker-compose up` again, and the nodes should connect! Something like this: -``` + +```sh cf-substrate-node-eve_1 | Jan 15 16:17:31.244 INFO 🔍 Discovered new external address for our node: /ip4/172.28.0.4/tcp/30333/p2p/12D3KooWBKts6C3EJ1vs3w1LVb7gBQKwkaUQX8ayqHB1kWPEQW3d cf-substrate-node-alice_1 | Jan 15 16:17:31.283 INFO 🔍 Discovered new external address for our node: /ip4/172.28.0.2/tcp/30333/p2p/12D3KooWJo19xzLH4QFxCo8YE6ZHbA9L8SH6MZbLGaWRC4UZLQj5 cf-substrate-node-bob_1 | Jan 15 16:17:31.343 INFO 🔍 Discovered new external address for our node: /ip4/172.28.0.3/tcp/30333/p2p/12D3KooWBnDtEXqzuydeBjnb4ttxiYeCVmKz4rFHHhFwuuFH9KcR @@ -38,8 +39,8 @@ cf-substrate-node-eve_1 | Jan 15 16:17:35.698 INFO 💤 Idle (2 peers), best cf-substrate-node-bob_1 | Jan 15 16:17:35.789 INFO 💤 Idle (2 peers), best: #6 (0xacb0…b916), finalized #4 (0x6cb8…32f0), ⬇ 2.5kiB/s ⬆ 1.7kiB/s ``` -### Finally... +## Finally -We are now ready to interact via the admin interface. +We are now ready to interact via the admin interface. -Open another terminal in the same directory and run `docker container ls` to see a list of port mappings for port 9944. You can use the mapped ports to connect via the standard [polkadot app](https://polkadot.js.org/apps). +Open another terminal in the same directory and run `docker container ls` to see a list of port mappings for port 9944. You can use the mapped ports to connect via the standard [polkadot app](https://polkadot.js.org/apps). diff --git a/state-chain/docs/rust-setup.md b/state-chain/docs/rust-setup.md new file mode 100644 index 0000000000..038c28228a --- /dev/null +++ b/state-chain/docs/rust-setup.md @@ -0,0 +1,217 @@ +--- +title: Installation +--- + +This guide is for reference only, please check the latest information on getting starting with Substrate +[here](https://docs.substrate.io/v3/getting-started/installation/). + +This page will guide you through the **2 steps** needed to prepare a computer for **Substrate** development. +Since Substrate is built with [the Rust programming language](https://www.rust-lang.org/), the first +thing you will need to do is prepare the computer for Rust development - these steps will vary based +on the computer's operating system. Once Rust is configured, you will use its toolchains to interact +with Rust projects; the commands for Rust's toolchains will be the same for all supported, +Unix-based operating systems. + +## Build dependencies + +Substrate development is easiest on Unix-based operating systems like macOS or Linux. The examples +in the [Substrate Docs](https://docs.substrate.io) use Unix-style terminals to demonstrate how to +interact with Substrate from the command line. + +### Ubuntu/Debian + +Use a terminal shell to execute the following commands: + +```bash +sudo apt update +# May prompt for location information +sudo apt install -y git clang curl libssl-dev llvm libudev-dev +``` + +### Arch Linux + +Run these commands from a terminal: + +```bash +pacman -Syu --needed --noconfirm curl git clang +``` + +### Fedora + +Run these commands from a terminal: + +```bash +sudo dnf update +sudo dnf install clang curl git openssl-devel +``` + +### OpenSUSE + +Run these commands from a terminal: + +```bash +sudo zypper install clang curl git openssl-devel llvm-devel libudev-devel +``` + +### macOS + +> **Apple M1 ARM** +> If you have an Apple M1 ARM system on a chip, make sure that you have Apple Rosetta 2 +> installed through `softwareupdate --install-rosetta`. This is only needed to run the +> `protoc` tool during the build. The build itself and the target binaries would remain native. +Open the Terminal application and execute the following commands: + +```bash +# Install Homebrew if necessary https://brew.sh/ +/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" +# Make sure Homebrew is up-to-date, install openssl +brew update +brew install openssl +``` + +### Windows + +**_PLEASE NOTE:_** Native development of Substrate is _not_ very well supported! It is _highly_ +recommend to use [Windows Subsystem Linux](https://docs.microsoft.com/en-us/windows/wsl/install-win10) +(WSL) and follow the instructions for [Ubuntu/Debian](#ubuntudebian). +Please refer to the separate +[guide for native Windows development](https://docs.substrate.io/v3/getting-started/windows-users/). + +## Rust developer environment + +This guide uses installer and the `rustup` tool to manage the Rust toolchain. +First install and configure `rustup`: + +```bash +# Install +curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh +# Configure +source ~/.cargo/env +``` + +Configure the Rust toolchain to default to the latest stable version, add nightly and the nightly wasm target: + +```bash +rustup default stable +rustup update +rustup update nightly +rustup target add wasm32-unknown-unknown --toolchain nightly +``` + +## Test your set-up + +Now the best way to ensure that you have successfully prepared a computer for Substrate +development is to follow the steps in [our first Substrate tutorial](https://docs.substrate.io/tutorials/v3/create-your-first-substrate-chain/). + +## Troubleshooting Substrate builds + +Sometimes you can't get the Substrate node template +to compile out of the box. Here are some tips to help you work through that. + +### Rust configuration check + +To see what Rust toolchain you are presently using, run: + +```bash +rustup show +``` + +This will show something like this (Ubuntu example) output: + +```text +Default host: x86_64-unknown-linux-gnu +rustup home: /home/user/.rustup +installed toolchains +-------------------- +stable-x86_64-unknown-linux-gnu (default) +nightly-2020-10-06-x86_64-unknown-linux-gnu +nightly-x86_64-unknown-linux-gnu +installed targets for active toolchain +-------------------------------------- +wasm32-unknown-unknown +x86_64-unknown-linux-gnu +active toolchain +---------------- +stable-x86_64-unknown-linux-gnu (default) +rustc 1.50.0 (cb75ad5db 2021-02-10) +``` + +As you can see above, the default toolchain is stable, and the +`nightly-x86_64-unknown-linux-gnu` toolchain as well as its `wasm32-unknown-unknown` target is installed. +You also see that `nightly-2020-10-06-x86_64-unknown-linux-gnu` is installed, but is not used unless explicitly defined as illustrated in the [specify your nightly version](#specifying-nightly-version) +section. + +### WebAssembly compilation + +Substrate uses [WebAssembly](https://webassembly.org) (Wasm) to produce portable blockchain +runtimes. You will need to configure your Rust compiler to use +[`nightly` builds](https://doc.rust-lang.org/book/appendix-07-nightly-rust.html) to allow you to +compile Substrate runtime code to the Wasm target. + +> There are upstream issues in Rust that need to be resolved before all of Substrate can use the stable Rust toolchain. +> [This is our tracking issue](https://github.com/paritytech/substrate/issues/1252) if you're curious as to why and how this will be resolved. + +#### Latest nightly for Substrate `master` + +Developers who are building Substrate _itself_ should always use the latest bug-free versions of +Rust stable and nightly. This is because the Substrate codebase follows the tip of Rust nightly, +which means that changes in Substrate often depend on upstream changes in the Rust nightly compiler. +To ensure your Rust compiler is always up to date, you should run: + +```bash +rustup update +rustup update nightly +rustup target add wasm32-unknown-unknown --toolchain nightly +``` + +> NOTE: It may be necessary to occasionally rerun `rustup update` if a change in the upstream Substrate +> codebase depends on a new feature of the Rust compiler. When you do this, both your nightly +> and stable toolchains will be pulled to the most recent release, and for nightly, it is +> generally _not_ expected to compile WASM without error (although it very often does). +> Be sure to [specify your nightly version](#specifying-nightly-version) if you get WASM build errors +> from `rustup` and [downgrade nightly as needed](#downgrading-rust-nightly). + +#### Rust nightly toolchain + +If you want to guarantee that your build works on your computer as you update Rust and other +dependencies, you should use a specific Rust nightly version that is known to be +compatible with the version of Substrate they are using; this version will vary from project to +project and different projects may use different mechanisms to communicate this version to +developers. For instance, the Polkadot client specifies this information in its +[release notes](https://github.com/paritytech/polkadot/releases). + +```bash +# Specify the specific nightly toolchain in the date below: +rustup install nightly- +``` + +#### Wasm toolchain + +Now, configure the nightly version to work with the Wasm compilation target: + +```bash +rustup target add wasm32-unknown-unknown --toolchain nightly- +``` + +### Specifying nightly version + +Use the `WASM_BUILD_TOOLCHAIN` environment variable to specify the Rust nightly version a Substrate +project should use for Wasm compilation: + +```bash +WASM_BUILD_TOOLCHAIN=nightly- cargo build --release +``` + +> Note that this only builds _the runtime_ with the specified nightly. The rest of project will be +> compiled with **your default toolchain**, i.e. the latest installed stable toolchain. + +### Downgrading Rust nightly + +If your computer is configured to use the latest Rust nightly and you would like to downgrade to a +specific nightly version, follow these steps: + +```bash +rustup uninstall nightly +rustup install nightly- +rustup target add wasm32-unknown-unknown --toolchain nightly- +``` diff --git a/state-chain/multisig-p2p-transport/Cargo.toml b/state-chain/multisig-p2p-transport/Cargo.toml index 4dcb8b0b20..aaf04f0e87 100644 --- a/state-chain/multisig-p2p-transport/Cargo.toml +++ b/state-chain/multisig-p2p-transport/Cargo.toml @@ -22,25 +22,25 @@ predicates = "2.1.1" [dependencies.sp-runtime] git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.sc-network] git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.sp-core] git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.sc-rpc] git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' features = ['test-helpers'] [dependencies.sc-service] features = ['wasmtime'] git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dev-dependencies] mockall = "0.11.0" diff --git a/state-chain/multisig-p2p-transport/src/lib.rs b/state-chain/multisig-p2p-transport/src/lib.rs index c587fa3867..97bed411b4 100644 --- a/state-chain/multisig-p2p-transport/src/lib.rs +++ b/state-chain/multisig-p2p-transport/src/lib.rs @@ -135,18 +135,7 @@ impl PeerNetwork for NetworkService { } fn remove_reserved_peer(&self, peer_id: PeerId) { - if let Err(err) = self.remove_peers_from_reserved_set( - CHAINFLIP_P2P_PROTOCOL_NAME, - std::iter::once( - [multiaddr::Protocol::P2p(peer_id.into())] - .iter() - .cloned() - .collect::(), - ) - .collect(), - ) { - log::error!(target: "p2p", "remove_peers_from_reserved_set failed: {}", err); - } + self.remove_peers_from_reserved_set(CHAINFLIP_P2P_PROTOCOL_NAME, vec![peer_id]) } async fn try_send_notification(&self, target: PeerId, message: &[u8]) -> bool { @@ -237,26 +226,27 @@ impl< state.reserved_peers.insert(peer_id, (port, ip_address, sender)); let p2p_network_service = self.p2p_network_service.clone(); let retry_send_period = self.retry_send_period; - self.message_sender_spawner.spawn("cf-peer-message-sender", async move { - while let Some(message) = receiver.recv().await { - // TODO: Logic here can be improved to effectively only send when you have a - // strong indication it will succeed (By using the connect and disconnect - // notifications) Also it is not ideal to drop new messages, better to drop old - // messages. - let mut attempts = RETRY_SEND_ATTEMPTS; - while attempts > 0 { - if p2p_network_service.try_send_notification(peer_id, &message).await { - break - } else { - attempts -= 1; - tokio::time::sleep(retry_send_period).await; + self.message_sender_spawner + .spawn("cf-peer-message-sender", "chainflip", async move { + while let Some(message) = receiver.recv().await { + // TODO: Logic here can be improved to effectively only send when you have a + // strong indication it will succeed (By using the connect and disconnect + // notifications) Also it is not ideal to drop new messages, better to drop + // old messages. + let mut attempts = RETRY_SEND_ATTEMPTS; + while attempts > 0 { + if p2p_network_service.try_send_notification(peer_id, &message).await { + break + } else { + attempts -= 1; + tokio::time::sleep(retry_send_period).await; + } + } + if 0 == attempts { + log::info!("Dropping message for peer {}", peer_id); } } - if 0 == attempts { - log::info!("Dropping message for peer {}", peer_id); - } - } - }); + }); self.p2p_network_service.reserve_peer(peer_id, port, ip_address); true } @@ -613,9 +603,7 @@ mod tests { }); let handle = tokio::runtime::Handle::current(); - let task_executor: sc_service::TaskExecutor = - (move |future, _| handle.spawn(future).map(|_| ())).into(); - let task_manager = sc_service::TaskManager::new(task_executor, None).unwrap(); + let task_manager = sc_service::TaskManager::new(handle, None).unwrap(); let message_sender_spawn_handle = task_manager.spawn_handle(); let (rpc_request_handler, p2p_message_handler_future) = new_p2p_network_node( diff --git a/state-chain/node/Cargo.toml b/state-chain/node/Cargo.toml index bda3929b98..4013e5ad6f 100644 --- a/state-chain/node/Cargo.toml +++ b/state-chain/node/Cargo.toml @@ -16,147 +16,70 @@ name = 'chainflip-node' [package.metadata.docs.rs] targets = ['x86_64-unknown-linux-gnu'] -[build-dependencies.substrate-build-script-utils] -git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' - # Chainflip Runtime [dependencies.state-chain-runtime] path = '../runtime' [dependencies] -# Chainflip-specific dependencies +# Local dependencies +cf-chains = {path = "../chains"} multisig-p2p-transport = {path = '../multisig-p2p-transport'} +utilities = {path = '../../utilities'} +custom-rpc = {path = '../custom-rpc'} + +# Added by Chainflip futures = {version = '0.3.4'} hex = '0.4' hex-literal = '0.3.1' jsonrpc-core-client = '18.0.0' jsonrpc-derive = '18.0.0' -utilities = {path = '../../utilities'} -custom-rpc = {path = '../custom-rpc'} - -# Substrate dependencies -jsonrpc-core = '18.0.0' structopt = '0.3.8' -cf-chains = {path = "../chains"} - -# Substrate dependencies -[dependencies.frame-benchmarking] -git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' - -[dependencies.frame-benchmarking-cli] -git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' - -[dependencies.sc-basic-authorship] -git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' - -[dependencies.sc-cli] -features = ['wasmtime'] -git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' - -[dependencies.sc-client-api] -git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' - -[dependencies.sc-consensus] -git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' - -[dependencies.sc-consensus-aura] -git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' - -[dependencies.sc-executor] -features = ['wasmtime'] -git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' - -[dependencies.sc-finality-grandpa] -git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' - -[dependencies.sc-keystore] -git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' - -[dependencies.sc-rpc] -git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' - -[dependencies.sc-rpc-api] -git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' - -[dependencies.sc-service] -features = ['wasmtime'] -git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' - -[dependencies.sc-telemetry] -git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' - -[dependencies.sc-transaction-pool] -git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' - -[dependencies.sc-transaction-pool-api] -git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' - -[dependencies.sp-api] -git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' - -[dependencies.sp-block-builder] -git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' - -[dependencies.sp-blockchain] -git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' - -[dependencies.sp-consensus] -git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' - -[dependencies.sp-consensus-aura] -git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' - -[dependencies.sp-core] -git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' - -[dependencies.sp-finality-grandpa] -git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' - -[dependencies.sp-runtime] -git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' - -[dependencies.sp-timestamp] -git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' - -[dependencies.substrate-frame-rpc-system] -git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' - -[dependencies.frame-try-runtime] -optional = true -git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' -[dependencies.try-runtime-cli] -optional = true -git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +# Substrate-node-template dependencies +clap = { version = "3.1.6", features = ["derive"] } + +sc-cli = { git = "https://github.com/chainflip-io/substrate.git", tag = "chainflip-monthly-2022-05", features = ["wasmtime"] } +sp-core = { git = "https://github.com/chainflip-io/substrate.git", tag = "chainflip-monthly-2022-05" } +sc-executor = { git = "https://github.com/chainflip-io/substrate.git", tag = "chainflip-monthly-2022-05", features = ["wasmtime"] } +sc-service = { git = "https://github.com/chainflip-io/substrate.git", tag = "chainflip-monthly-2022-05", features = ["wasmtime"] } +sc-telemetry = { git = "https://github.com/chainflip-io/substrate.git", tag = "chainflip-monthly-2022-05" } +sc-keystore = { git = "https://github.com/chainflip-io/substrate.git", tag = "chainflip-monthly-2022-05" } +sc-transaction-pool = { git = "https://github.com/chainflip-io/substrate.git", tag = "chainflip-monthly-2022-05" } +sc-transaction-pool-api = { git = "https://github.com/chainflip-io/substrate.git", tag = "chainflip-monthly-2022-05" } +sc-consensus-aura = { git = "https://github.com/chainflip-io/substrate.git", tag = "chainflip-monthly-2022-05" } +sp-consensus-aura = { git = "https://github.com/chainflip-io/substrate.git", tag = "chainflip-monthly-2022-05" } +sp-consensus = { git = "https://github.com/chainflip-io/substrate.git", tag = "chainflip-monthly-2022-05" } +sc-consensus = { git = "https://github.com/chainflip-io/substrate.git", tag = "chainflip-monthly-2022-05" } +sc-finality-grandpa = { git = "https://github.com/chainflip-io/substrate.git", tag = "chainflip-monthly-2022-05" } +sp-finality-grandpa = { git = "https://github.com/chainflip-io/substrate.git", tag = "chainflip-monthly-2022-05" } +sc-client-api = { git = "https://github.com/chainflip-io/substrate.git", tag = "chainflip-monthly-2022-05" } +sp-runtime = { version = "6.0.0", git = "https://github.com/chainflip-io/substrate.git", tag = "chainflip-monthly-2022-05" } +sp-timestamp = { git = "https://github.com/chainflip-io/substrate.git", tag = "chainflip-monthly-2022-05" } +sp-inherents = { git = "https://github.com/chainflip-io/substrate.git", tag = "chainflip-monthly-2022-05" } +sp-keyring = { version = "6.0.0", git = "https://github.com/chainflip-io/substrate.git", tag = "chainflip-monthly-2022-05" } +frame-system = { git = "https://github.com/chainflip-io/substrate.git", tag = "chainflip-monthly-2022-05" } +pallet-transaction-payment = { default-features = false, git = "https://github.com/chainflip-io/substrate.git", tag = "chainflip-monthly-2022-05" } + +# These dependencies are used for the node template's RPCs +jsonrpc-core = "18.0.0" +sc-rpc = { git = "https://github.com/chainflip-io/substrate.git", tag = "chainflip-monthly-2022-05" } +sp-api = { git = "https://github.com/chainflip-io/substrate.git", tag = "chainflip-monthly-2022-05" } +sc-rpc-api = { git = "https://github.com/chainflip-io/substrate.git", tag = "chainflip-monthly-2022-05" } +sp-blockchain = { git = "https://github.com/chainflip-io/substrate.git", tag = "chainflip-monthly-2022-05" } +sp-block-builder = { git = "https://github.com/chainflip-io/substrate.git", tag = "chainflip-monthly-2022-05" } +sc-basic-authorship = { git = "https://github.com/chainflip-io/substrate.git", tag = "chainflip-monthly-2022-05" } +substrate-frame-rpc-system = { git = "https://github.com/chainflip-io/substrate.git", tag = "chainflip-monthly-2022-05" } +pallet-transaction-payment-rpc = { git = "https://github.com/chainflip-io/substrate.git", tag = "chainflip-monthly-2022-05" } + +# These dependencies are used for runtime benchmarking +frame-benchmarking = { git = "https://github.com/chainflip-io/substrate.git", tag = "chainflip-monthly-2022-05" } +frame-benchmarking-cli = { git = "https://github.com/chainflip-io/substrate.git", tag = "chainflip-monthly-2022-05" } + +# CLI-specific dependencies +try-runtime-cli = { optional = true, git = "https://github.com/chainflip-io/substrate.git", tag = "chainflip-monthly-2022-05" } + +[build-dependencies] +substrate-build-script-utils = { git = "https://github.com/chainflip-io/substrate.git", tag = "chainflip-monthly-2022-05" } [features] default = [] diff --git a/state-chain/node/src/chain_spec.rs b/state-chain/node/src/chain_spec.rs index dfbebdc9de..45ae4049f5 100644 --- a/state-chain/node/src/chain_spec.rs +++ b/state-chain/node/src/chain_spec.rs @@ -195,6 +195,8 @@ pub fn development_config() -> Result { None, // Protocol ID None, + // Fork ID + None, // Properties None, // Extensions @@ -268,6 +270,8 @@ pub fn cf_development_config() -> Result { None, // Protocol ID None, + // Fork ID + None, // Properties None, // Extensions @@ -391,6 +395,8 @@ fn chainflip_three_node_testnet_config_from_env( None, // Protocol ID None, + // Fork ID + None, // Properties Some(chainflip_properties()), // Extensions @@ -517,6 +523,8 @@ pub fn chainflip_testnet_config() -> Result { None, // Protocol ID None, + // Fork ID + None, // Properties Some(chainflip_properties()), // Extensions @@ -542,7 +550,6 @@ fn testnet_genesis( system: SystemConfig { // Add Wasm runtime to storage. code: wasm_binary.to_vec(), - changes_trie_config: Default::default(), }, validator: ValidatorConfig { blocks_per_epoch: 8 * HOURS, @@ -581,6 +588,7 @@ fn testnet_genesis( current_authority_emission_inflation: CURRENT_AUTHORITY_EMISSION_INFLATION_BPS, backup_node_emission_inflation: BACKUP_NODE_EMISSION_INFLATION_BPS, }, + transaction_payment: Default::default(), } } diff --git a/state-chain/node/src/cli.rs b/state-chain/node/src/cli.rs index 82f260b53f..710c7f3f9e 100644 --- a/state-chain/node/src/cli.rs +++ b/state-chain/node/src/cli.rs @@ -1,18 +1,18 @@ use sc_cli::RunCmd; -use structopt::StructOpt; -#[derive(Debug, StructOpt)] +#[derive(Debug, clap::Parser)] pub struct Cli { - #[structopt(subcommand)] + #[clap(subcommand)] pub subcommand: Option, - #[structopt(flatten)] + #[clap(flatten)] pub run: RunCmd, } -#[derive(Debug, StructOpt)] +#[derive(Debug, clap::Subcommand)] pub enum Subcommand { /// Key management cli utilities + #[clap(subcommand)] Key(sc_cli::KeySubcommand), /// Build a chain specification. @@ -36,8 +36,8 @@ pub enum Subcommand { /// Revert the chain to a previous state. Revert(sc_cli::RevertCmd), - /// The custom benchmark subcommand benchmarking runtime pallets. - #[structopt(name = "benchmark", about = "Benchmark runtime pallets.")] + /// Sub-commands concerned with benchmarking. + #[clap(subcommand)] Benchmark(frame_benchmarking_cli::BenchmarkCmd), /// Try some command against runtime state. diff --git a/state-chain/node/src/command.rs b/state-chain/node/src/command.rs index 3d83165cdd..b3291e2953 100644 --- a/state-chain/node/src/command.rs +++ b/state-chain/node/src/command.rs @@ -1,11 +1,14 @@ use crate::{ chain_spec, cli::{Cli, Subcommand}, + command_helper::{inherent_benchmark_data, BenchmarkExtrinsicBuilder}, service, }; -use sc_cli::{ChainSpec, Role, RuntimeVersion, SubstrateCli}; +use frame_benchmarking_cli::{BenchmarkCmd, SUBSTRATE_REFERENCE_HARDWARE}; +use sc_cli::{ChainSpec, RuntimeVersion, SubstrateCli}; use sc_service::PartialComponents; use state_chain_runtime::Block; +use std::sync::Arc; impl SubstrateCli for Cli { fn impl_name() -> String { @@ -98,19 +101,53 @@ pub fn run() -> sc_cli::Result<()> { runner.async_run(|config| { let PartialComponents { client, task_manager, backend, .. } = service::new_partial(&config)?; - Ok((cmd.run(client, backend), task_manager)) + let aux_revert = Box::new(|client, _, blocks| { + sc_finality_grandpa::revert(client, blocks)?; + Ok(()) + }); + Ok((cmd.run(client, backend, Some(aux_revert)), task_manager)) }) }, - Some(Subcommand::Benchmark(cmd)) => - if cfg!(feature = "runtime-benchmarks") { - let runner = cli.create_runner(cmd)?; + Some(Subcommand::Benchmark(cmd)) => { + let runner = cli.create_runner(cmd)?; + runner.sync_run(|config| { + // This switch needs to be in the client, since the client decides + // which sub-commands it wants to support. + match cmd { + BenchmarkCmd::Pallet(cmd) => { + if !cfg!(feature = "runtime-benchmarks") { + return Err( + "Runtime benchmarking wasn't enabled when building the node. \ + You can enable it with `--features runtime-benchmarks`." + .into(), + ) + } + + cmd.run::(config) + }, + BenchmarkCmd::Block(cmd) => { + let PartialComponents { client, .. } = service::new_partial(&config)?; + cmd.run(client) + }, + BenchmarkCmd::Storage(cmd) => { + let PartialComponents { client, backend, .. } = + service::new_partial(&config)?; + let db = backend.expose_db(); + let storage = backend.expose_storage(); - runner.sync_run(|config| cmd.run::(config)) - } else { - Err("Benchmarking wasn't enabled when building the node. You can enable it with \ - `--features runtime-benchmarks`." - .into()) - }, + cmd.run(config, client, db, storage) + }, + BenchmarkCmd::Overhead(cmd) => { + let PartialComponents { client, .. } = service::new_partial(&config)?; + let ext_builder = BenchmarkExtrinsicBuilder::new(client.clone()); + + cmd.run(config, client, inherent_benchmark_data()?, Arc::new(ext_builder)) + }, + BenchmarkCmd::Machine(cmd) => + cmd.run(&config, SUBSTRATE_REFERENCE_HARDWARE.clone()), + } + }) + }, #[cfg(feature = "try-runtime")] Some(Subcommand::TryRuntime(cmd)) => { let runner = cli.create_runner(cmd)?; @@ -119,9 +156,8 @@ pub fn run() -> sc_cli::Result<()> { // manager to do `async_run`. let registry = config.prometheus_config.as_ref().map(|cfg| &cfg.registry); let task_manager = - sc_service::TaskManager::new(config.task_executor.clone(), registry) + sc_service::TaskManager::new(config.tokio_handle.clone(), registry) .map_err(|e| sc_cli::Error::Service(sc_service::Error::Prometheus(e)))?; - Ok((cmd.run::(config), task_manager)) }) }, @@ -132,11 +168,7 @@ pub fn run() -> sc_cli::Result<()> { None => { let runner = cli.create_runner(&cli.run)?; runner.run_node_until_exit(|config| async move { - match config.role { - Role::Light => service::new_light(config), - _ => service::new_full(config), - } - .map_err(sc_cli::Error::Service) + service::new_full(config).map_err(sc_cli::Error::Service) }) }, } diff --git a/state-chain/node/src/command_helper.rs b/state-chain/node/src/command_helper.rs new file mode 100644 index 0000000000..13c3c45110 --- /dev/null +++ b/state-chain/node/src/command_helper.rs @@ -0,0 +1,131 @@ +// This file is part of Substrate. + +// Copyright (C) 2022 Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +//! Contains code to setup the command invocations in [`super::command`] which would +//! otherwise bloat that module. + +use crate::service::FullClient; + +use runtime::SystemCall; +use sc_cli::Result; +use sc_client_api::BlockBackend; +use sp_core::{Encode, Pair}; +use sp_inherents::{InherentData, InherentDataProvider}; +use sp_keyring::Sr25519Keyring; +use sp_runtime::{OpaqueExtrinsic, SaturatedConversion}; +use state_chain_runtime as runtime; + +use std::{sync::Arc, time::Duration}; + +/// Generates extrinsics for the `benchmark overhead` command. +/// +/// Note: Should only be used for benchmarking. +pub struct BenchmarkExtrinsicBuilder { + client: Arc, +} + +impl BenchmarkExtrinsicBuilder { + /// Creates a new [`Self`] from the given client. + pub fn new(client: Arc) -> Self { + Self { client } + } +} + +impl frame_benchmarking_cli::ExtrinsicBuilder for BenchmarkExtrinsicBuilder { + fn remark(&self, nonce: u32) -> std::result::Result { + let acc = Sr25519Keyring::Bob.pair(); + let extrinsic: OpaqueExtrinsic = create_benchmark_extrinsic( + self.client.as_ref(), + acc, + SystemCall::remark { remark: vec![] }.into(), + nonce, + ) + .into(); + + Ok(extrinsic) + } +} + +/// Create a transaction using the given `call`. +/// +/// Note: Should only be used for benchmarking. +pub fn create_benchmark_extrinsic( + client: &FullClient, + sender: sp_core::sr25519::Pair, + call: runtime::Call, + nonce: u32, +) -> runtime::UncheckedExtrinsic { + let genesis_hash = client.block_hash(0).ok().flatten().expect("Genesis block exists; qed"); + let best_hash = client.chain_info().best_hash; + let best_block = client.chain_info().best_number; + + let period = runtime::BlockHashCount::get() + .checked_next_power_of_two() + .map(|c| c / 2) + .unwrap_or(2) as u64; + let extra: runtime::SignedExtra = ( + frame_system::CheckNonZeroSender::::new(), + frame_system::CheckSpecVersion::::new(), + frame_system::CheckTxVersion::::new(), + frame_system::CheckGenesis::::new(), + frame_system::CheckEra::::from(sp_runtime::generic::Era::mortal( + period, + best_block.saturated_into(), + )), + frame_system::CheckNonce::::from(nonce), + frame_system::CheckWeight::::new(), + pallet_transaction_payment::ChargeTransactionPayment::::from(0), + ); + + let raw_payload = runtime::SignedPayload::from_raw( + call.clone(), + extra.clone(), + ( + (), + runtime::VERSION.spec_version, + runtime::VERSION.transaction_version, + genesis_hash, + best_hash, + (), + (), + (), + ), + ); + let signature = raw_payload.using_encoded(|e| sender.sign(e)); + + runtime::UncheckedExtrinsic::new_signed( + call.clone(), + sp_runtime::AccountId32::from(sender.public()).into(), + runtime::Signature::Sr25519(signature.clone()), + extra.clone(), + ) +} + +/// Generates inherent data for the `benchmark overhead` command. +/// +/// Note: Should only be used for benchmarking. +pub fn inherent_benchmark_data() -> Result { + let mut inherent_data = InherentData::new(); + let d = Duration::from_millis(0); + let timestamp = sp_timestamp::InherentDataProvider::new(d.into()); + + timestamp + .provide_inherent_data(&mut inherent_data) + .map_err(|e| format!("creating inherent data: {:?}", e))?; + Ok(inherent_data) +} diff --git a/state-chain/node/src/main.rs b/state-chain/node/src/main.rs index 369e6932a0..bc65aac82c 100644 --- a/state-chain/node/src/main.rs +++ b/state-chain/node/src/main.rs @@ -6,6 +6,7 @@ mod chain_spec; mod service; mod cli; mod command; +mod command_helper; fn main() -> sc_cli::Result<()> { command::run() diff --git a/state-chain/node/src/service.rs b/state-chain/node/src/service.rs index 1619d695a9..97de5e0636 100644 --- a/state-chain/node/src/service.rs +++ b/state-chain/node/src/service.rs @@ -2,14 +2,13 @@ use custom_rpc::{CustomApi, CustomRpc}; use jsonrpc_core::MetaIoHandler; -use sc_client_api::{ExecutorProvider, RemoteBackend}; +use sc_client_api::{BlockBackend, ExecutorProvider}; use sc_consensus_aura::{ImportQueueParams, SlotProportion, StartAuraParams}; pub use sc_executor::NativeElseWasmExecutor; use sc_finality_grandpa::SharedVoterState; use sc_keystore::LocalKeystore; use sc_service::{error::Error as ServiceError, Configuration, TaskManager}; use sc_telemetry::{Telemetry, TelemetryWorker}; -use sp_consensus::SlotData; use sp_consensus_aura::sr25519::AuthorityPair as AuraPair; use state_chain_runtime::{self, opaque::Block, RuntimeApi}; use std::{marker::PhantomData, sync::Arc, time::Duration}; @@ -18,7 +17,12 @@ use std::{marker::PhantomData, sync::Arc, time::Duration}; pub struct ExecutorDispatch; impl sc_executor::NativeExecutionDispatch for ExecutorDispatch { + /// 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> { state_chain_runtime::api::dispatch(method, data) @@ -29,7 +33,7 @@ impl sc_executor::NativeExecutionDispatch for ExecutorDispatch { } } -type FullClient = +pub(crate) type FullClient = sc_service::TFullClient>; type FullBackend = sc_service::TFullBackend; type FullSelectChain = sc_consensus::LongestChain; @@ -76,6 +80,7 @@ pub fn new_partial( config.wasm_method, config.default_heap_pages, config.max_runtime_instances, + config.runtime_cache_size, ); let (client, backend, keystore_container, task_manager) = @@ -87,7 +92,7 @@ pub fn new_partial( 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 }); @@ -108,7 +113,7 @@ pub fn new_partial( telemetry.as_ref().map(|x| x.handle()), )?; - let slot_duration = sc_consensus_aura::slot_duration(&*client)?.slot_duration(); + let slot_duration = sc_consensus_aura::slot_duration(&*client)?; let import_queue = sc_consensus_aura::import_queue::(ImportQueueParams { @@ -119,7 +124,7 @@ pub fn new_partial( let timestamp = sp_timestamp::InherentDataProvider::from_system_time(); let slot = - sp_consensus_aura::inherents::InherentDataProvider::from_timestamp_and_duration( + sp_consensus_aura::inherents::InherentDataProvider::from_timestamp_and_slot_duration( *timestamp, slot_duration, ); @@ -177,12 +182,20 @@ pub fn new_full(mut config: Configuration) -> Result ))), }; } + let grandpa_protocol_name = sc_finality_grandpa::protocol_standard_name( + &client.block_hash(0).ok().flatten().expect("Genesis block exists; qed"), + &config.chain_spec, + ); config.network.extra_sets.push(multisig_p2p_transport::p2p_peers_set_config()); - config.network.extra_sets.push(sc_finality_grandpa::grandpa_peers_set_config()); + config + .network + .extra_sets + .push(sc_finality_grandpa::grandpa_peers_set_config(grandpa_protocol_name.clone())); 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) = @@ -192,7 +205,6 @@ pub fn new_full(mut config: Configuration) -> Result 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), })?; @@ -239,6 +251,10 @@ pub fn new_full(mut config: Configuration) -> Result ), )); + io.extend_with(pallet_transaction_payment_rpc::TransactionPaymentApi::to_delegate( + pallet_transaction_payment_rpc::TransactionPayment::new(client.clone()), + )); + // Implement custom RPC extensions io.extend_with(CustomApi::to_delegate(CustomRpc { client: client.clone(), @@ -256,8 +272,6 @@ pub fn new_full(mut config: Configuration) -> Result task_manager: &mut task_manager, transaction_pool: transaction_pool.clone(), rpc_extensions_builder, - on_demand: None, - remote_blockchain: None, backend, system_rpc_tx, config, @@ -277,7 +291,6 @@ pub fn new_full(mut config: Configuration) -> Result sp_consensus::CanAuthorWithNativeVersion::new(client.executor().clone()); let slot_duration = sc_consensus_aura::slot_duration(&*client)?; - let raw_slot_duration = slot_duration.slot_duration(); let aura = sc_consensus_aura::start_aura::( StartAuraParams { @@ -290,9 +303,9 @@ pub fn new_full(mut config: Configuration) -> Result let timestamp = sp_timestamp::InherentDataProvider::from_system_time(); let slot = - sp_consensus_aura::inherents::InherentDataProvider::from_timestamp_and_duration( + sp_consensus_aura::inherents::InherentDataProvider::from_timestamp_and_slot_duration( *timestamp, - raw_slot_duration, + slot_duration, ); Ok((timestamp, slot)) @@ -311,7 +324,9 @@ pub fn new_full(mut config: Configuration) -> Result // 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); } // if the node isn't actively participating in consensus then it doesn't @@ -328,11 +343,14 @@ pub fn new_full(mut config: Configuration) -> Result keystore, local_role: role, telemetry: telemetry.as_ref().map(|x| x.handle()), + protocol_name: grandpa_protocol_name, }; - task_manager - .spawn_essential_handle() - .spawn_blocking("cf-p2p", p2p_message_handler_future); + task_manager.spawn_essential_handle().spawn_blocking( + "cf-p2p", + "chainflip", + p2p_message_handler_future, + ); if enable_grandpa { // start the full GRANDPA voter @@ -355,6 +373,7 @@ pub fn new_full(mut config: Configuration) -> Result // 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)?, ); } @@ -362,143 +381,3 @@ pub fn new_full(mut config: Configuration) -> Result network_starter.start_network(); Ok(task_manager) } - -/// Builds a new service for a light client. -pub fn new_light(mut config: Configuration) -> Result { - 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 executor = NativeElseWasmExecutor::::new( - config.wasm_method, - config.default_heap_pages, - config.max_runtime_instances, - ); - - let (client, backend, keystore_container, mut task_manager, on_demand) = - sc_service::new_light_parts::( - &config, - telemetry.as_ref().map(|(_, telemetry)| telemetry.handle()), - executor, - )?; - - 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::(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 warp_sync = Arc::new(sc_finality_grandpa::warp_proof::NetworkProvider::new( - backend.clone(), - grandpa_link.shared_authority_set().clone(), - )); - - 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, - warp_sync: Some(warp_sync), - })?; - - 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(|_, _| Ok(())), - 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/state-chain/pallets/cf-auction/Cargo.toml b/state-chain/pallets/cf-auction/Cargo.toml index 70ac3fe3b1..519bffdd26 100644 --- a/state-chain/pallets/cf-auction/Cargo.toml +++ b/state-chain/pallets/cf-auction/Cargo.toml @@ -23,38 +23,38 @@ log = { version = '0.4.14', default-features = false } default-features = false features = ['derive'] package = 'parity-scale-codec' -version = '2.3.1' +version = '3.0.0' [dependencies.frame-support] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.frame-system] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.scale-info] default-features = false features = ['derive'] -version = '1.0' +version = '2.0.1' [dependencies.sp-runtime] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.sp-std] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.frame-benchmarking] default-features = false git = 'https://github.com/chainflip-io/substrate.git' optional = true -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dev-dependencies] assert_matches = { version = "1.5.0" } @@ -62,11 +62,11 @@ cf-test-utilities = { path = '../../test-utilities' } [dev-dependencies.sp-core] git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dev-dependencies.sp-io] git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [features] diff --git a/state-chain/pallets/cf-auction/src/benchmarking.rs b/state-chain/pallets/cf-auction/src/benchmarking.rs index ba20bcc81b..fa9d4cba0a 100644 --- a/state-chain/pallets/cf-auction/src/benchmarking.rs +++ b/state-chain/pallets/cf-auction/src/benchmarking.rs @@ -3,7 +3,7 @@ use super::*; -use frame_benchmarking::{benchmarks, impl_benchmark_test_suite}; +use frame_benchmarking::benchmarks; use frame_system::RawOrigin; benchmarks! { @@ -13,6 +13,6 @@ benchmarks! { verify { assert_eq!(Pallet::::current_authority_set_size_range(), range.into()) } -} -impl_benchmark_test_suite!(Pallet, crate::mock::new_test_ext(), crate::mock::Test,); + impl_benchmark_test_suite!(Pallet, crate::mock::new_test_ext(), crate::mock::Test,); +} diff --git a/state-chain/pallets/cf-auction/src/lib.rs b/state-chain/pallets/cf-auction/src/lib.rs index c8663dfad5..54aa643d07 100644 --- a/state-chain/pallets/cf-auction/src/lib.rs +++ b/state-chain/pallets/cf-auction/src/lib.rs @@ -36,6 +36,7 @@ pub mod pallet { #[pallet::pallet] #[pallet::generate_store(pub (super) trait Store)] + #[pallet::without_storage_info] #[pallet::storage_version(PALLET_VERSION)] pub struct Pallet(_); diff --git a/state-chain/pallets/cf-broadcast/Cargo.toml b/state-chain/pallets/cf-broadcast/Cargo.toml index 15a5ba5cd6..74300d9edf 100644 --- a/state-chain/pallets/cf-broadcast/Cargo.toml +++ b/state-chain/pallets/cf-broadcast/Cargo.toml @@ -26,49 +26,49 @@ log = { version = '0.4.14', default-features = false } default-features = false features = ['derive'] package = 'parity-scale-codec' -version = '2.3.1' +version = '3.0.0' [dependencies.frame-support] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.frame-system] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.scale-info] default-features = false features = ['derive'] -version = '1.0' +version = '2.0.1' [dependencies.sp-runtime] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.sp-std] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.sp-core] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.frame-benchmarking] default-features = false git = 'https://github.com/chainflip-io/substrate.git' optional = true -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' # Dev dependencies [dev-dependencies.sp-io] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [features] default = ['std'] diff --git a/state-chain/pallets/cf-broadcast/src/lib.rs b/state-chain/pallets/cf-broadcast/src/lib.rs index e30e9d9048..8e8595d68c 100644 --- a/state-chain/pallets/cf-broadcast/src/lib.rs +++ b/state-chain/pallets/cf-broadcast/src/lib.rs @@ -18,7 +18,7 @@ use cf_chains::{ApiCall, ChainAbi, ChainCrypto, TransactionBuilder}; use cf_traits::{ offence_reporting::OffenceReporter, Broadcaster, Chainflip, SignerNomination, ThresholdSigner, }; -use codec::{Decode, Encode}; +use codec::{Decode, Encode, MaxEncodedLen}; use frame_support::{ dispatch::DispatchResultWithPostInfo, traits::{Get, OnRuntimeUpgrade, StorageVersion}, @@ -26,12 +26,13 @@ use frame_support::{ }; use frame_system::pallet_prelude::OriginFor; pub use pallet::*; +use scale_info::TypeInfo; use sp_std::{marker::PhantomData, prelude::*}; pub const PALLET_VERSION: StorageVersion = StorageVersion::new(1); /// The reasons for which a broadcast might fail. -#[derive(Clone, Debug, PartialEq, Eq, Encode, Decode)] +#[derive(Clone, Debug, PartialEq, Eq, Encode, Decode, TypeInfo, MaxEncodedLen)] pub enum TransmissionFailure { /// The transaction was rejected because of some user error, for example, insuffient funds. TransactionRejected, @@ -46,7 +47,7 @@ pub type BroadcastId = u32; pub type AttemptCount = u32; /// A unique id for each broadcast attempt -#[derive(Clone, Debug, PartialEq, Eq, Encode, Decode, Default, Copy)] +#[derive(Clone, Debug, PartialEq, Eq, Encode, Decode, TypeInfo, MaxEncodedLen, Default, Copy)] pub struct BroadcastAttemptId { pub broadcast_id: BroadcastId, pub attempt_count: AttemptCount, @@ -69,7 +70,7 @@ impl sp_std::fmt::Display for BroadcastAttemptId { } } -#[derive(Copy, Clone, Debug, PartialEq, Eq, Encode, Decode)] +#[derive(Copy, Clone, Debug, PartialEq, Eq, Encode, Decode, TypeInfo, MaxEncodedLen)] pub enum PalletOffence { InvalidTransactionAuthored, TransactionFailedOnTransmission, @@ -100,14 +101,16 @@ pub mod pallet { pub type ThresholdSignatureFor = <>::TargetChain as ChainCrypto>::ThresholdSignature; - #[derive(Clone, RuntimeDebug, PartialEq, Eq, Encode, Decode)] + #[derive(Clone, RuntimeDebug, PartialEq, Eq, Encode, Decode, TypeInfo)] + #[scale_info(skip_type_params(T, I))] pub struct BroadcastAttempt, I: 'static> { pub broadcast_attempt_id: BroadcastAttemptId, pub unsigned_tx: UnsignedTransactionFor, } /// The first step in the process - a transaction signing attempt. - #[derive(Clone, RuntimeDebug, PartialEq, Eq, Encode, Decode)] + #[derive(Clone, RuntimeDebug, PartialEq, Eq, Encode, Decode, TypeInfo)] + #[scale_info(skip_type_params(T, I))] pub struct TransactionSigningAttempt, I: 'static> { pub broadcast_attempt: BroadcastAttempt, pub nominee: T::ValidatorId, @@ -115,7 +118,8 @@ pub mod pallet { /// The second step in the process - the transaction is already signed, it needs to be /// broadcast. - #[derive(Clone, RuntimeDebug, PartialEq, Eq, Encode, Decode)] + #[derive(Clone, RuntimeDebug, PartialEq, Eq, Encode, Decode, TypeInfo)] + #[scale_info(skip_type_params(T, I))] pub struct TransmissionAttempt, I: 'static> { pub broadcast_attempt: BroadcastAttempt, pub signer: T::ValidatorId, @@ -123,7 +127,7 @@ pub mod pallet { } /// For tagging the signing or transmission stage of the broadcast - #[derive(Copy, Clone, RuntimeDebug, PartialEq, Eq, Encode, Decode)] + #[derive(Copy, Clone, RuntimeDebug, PartialEq, Eq, Encode, Decode, TypeInfo, MaxEncodedLen)] pub enum BroadcastStage { TransactionSigning, Transmission, @@ -188,6 +192,7 @@ pub mod pallet { #[pallet::pallet] #[pallet::storage_version(PALLET_VERSION)] #[pallet::generate_store(pub(super) trait Store)] + #[pallet::without_storage_info] pub struct Pallet(PhantomData<(T, I)>); /// A counter for incrementing the broadcast id. @@ -581,7 +586,7 @@ impl, I: 'static> Pallet { pub fn threshold_sign_and_broadcast(api_call: >::ApiCall) { T::ThresholdSigner::request_signature_with_callback( api_call.threshold_signature_payload(), - |id| Call::on_signature_ready(id, api_call).into(), + |id| Call::on_signature_ready { threshold_request_id: id, api_call }.into(), ); } diff --git a/state-chain/pallets/cf-emissions/Cargo.toml b/state-chain/pallets/cf-emissions/Cargo.toml index 3d8c494f80..1603b75d41 100644 --- a/state-chain/pallets/cf-emissions/Cargo.toml +++ b/state-chain/pallets/cf-emissions/Cargo.toml @@ -25,43 +25,43 @@ log = { version = '0.4.14', default-features = false } default-features = false features = ['derive'] package = 'parity-scale-codec' -version = '2.3.1' +version = '3.0.0' [dependencies.scale-info] default-features = false features = ['derive'] -version = '1.0' +version = '2.0.1' [dependencies.frame-system] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.frame-support] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.sp-arithmetic] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.frame-benchmarking] default-features = false git = 'https://github.com/chainflip-io/substrate.git' optional = true -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.sp-runtime] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.sp-std] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dev-dependencies] pallet-cf-flip = { path = '../cf-flip' } @@ -69,12 +69,12 @@ pallet-cf-flip = { path = '../cf-flip' } [dev-dependencies.sp-core] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dev-dependencies.sp-io] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [features] default = ['std'] diff --git a/state-chain/pallets/cf-emissions/src/benchmarking.rs b/state-chain/pallets/cf-emissions/src/benchmarking.rs index ad515b141a..192b776192 100644 --- a/state-chain/pallets/cf-emissions/src/benchmarking.rs +++ b/state-chain/pallets/cf-emissions/src/benchmarking.rs @@ -3,7 +3,7 @@ use super::*; -use frame_benchmarking::{benchmarks, impl_benchmark_test_suite}; +use frame_benchmarking::benchmarks; use frame_support::traits::OnInitialize; use frame_system::RawOrigin; @@ -42,10 +42,10 @@ benchmarks! { let mint_interval = Pallet::::mint_interval(); assert_eq!(mint_interval, (50 as u32).into()); } -} -impl_benchmark_test_suite!( - Pallet, - crate::mock::new_test_ext(Default::default(), Default::default()), - crate::mock::Test, -); + impl_benchmark_test_suite!( + Pallet, + crate::mock::new_test_ext(Default::default(), Default::default()), + crate::mock::Test, + ); +} diff --git a/state-chain/pallets/cf-emissions/src/lib.rs b/state-chain/pallets/cf-emissions/src/lib.rs index 0d4af7eaf0..9373e3e3dc 100644 --- a/state-chain/pallets/cf-emissions/src/lib.rs +++ b/state-chain/pallets/cf-emissions/src/lib.rs @@ -23,7 +23,6 @@ pub const PALLET_VERSION: StorageVersion = StorageVersion::new(1); use cf_traits::{ BlockEmissions, EmissionsTrigger, EpochTransitionHandler, Issuance, RewardsDistribution, }; -use codec::FullCodec; use frame_support::traits::{Get, Imbalance, OnRuntimeUpgrade, StorageVersion}; use sp_arithmetic::traits::UniqueSaturatedFrom; use sp_runtime::{ @@ -60,7 +59,8 @@ pub mod pallet { /// The Flip token denomination. type FlipBalance: Member - + FullCodec + + Parameter + + MaxEncodedLen + Default + Copy + MaybeSerializeDeserialize @@ -144,7 +144,6 @@ pub mod pallet { pub(super) type MintInterval = StorageValue<_, BlockNumberFor, ValueQuery>; #[pallet::event] - #[pallet::metadata(T::AccountId = "AccountId")] #[pallet::generate_deposit(pub(super) fn deposit_event)] pub enum Event { /// Emissions have been distributed. \[block_number, amount_minted\] diff --git a/state-chain/pallets/cf-emissions/src/mock.rs b/state-chain/pallets/cf-emissions/src/mock.rs index 0a5139b55a..8f22297bd4 100644 --- a/state-chain/pallets/cf-emissions/src/mock.rs +++ b/state-chain/pallets/cf-emissions/src/mock.rs @@ -163,7 +163,7 @@ impl RewardsDistribution for MockRewardsDistribution { } } -#[derive(Clone, Debug, Default, PartialEq, Eq, Encode, Decode)] +#[derive(Clone, Debug, Default, PartialEq, Eq, Encode, Decode, TypeInfo)] pub struct MockUpdateFlipSupply { pub nonce: ::ReplayProtection, pub new_total_supply: u128, @@ -204,7 +204,7 @@ impl ApiCall for MockUpdateFlipSupply { } } -#[derive(Copy, Clone, Debug, Default, PartialEq, Eq, Encode, Decode)] +#[derive(Copy, Clone, Debug, Default, PartialEq, Eq, Encode, Decode, TypeInfo)] pub struct MockBroadcast; impl MockBroadcast { diff --git a/state-chain/pallets/cf-environment/Cargo.toml b/state-chain/pallets/cf-environment/Cargo.toml index 96783cbce9..ac7ff4d888 100644 --- a/state-chain/pallets/cf-environment/Cargo.toml +++ b/state-chain/pallets/cf-environment/Cargo.toml @@ -22,49 +22,49 @@ serde = {optional = true, version = "1.0.126", features = ['derive']} default-features = false features = ['derive'] package = 'parity-scale-codec' -version = '2.3.1' +version = '3.0.0' [dependencies.scale-info] default-features = false features = ['derive'] -version = '1.0' +version = '2.0.1' [dependencies.frame-support] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.frame-system] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.sp-std] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.sp-runtime] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.frame-benchmarking] default-features = false git = 'https://github.com/chainflip-io/substrate.git' optional = true -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' # Dev dependencies [dev-dependencies.sp-io] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dev-dependencies.sp-core] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [features] default = ['std'] diff --git a/state-chain/pallets/cf-environment/src/lib.rs b/state-chain/pallets/cf-environment/src/lib.rs index f830084cf1..38f6f208df 100644 --- a/state-chain/pallets/cf-environment/src/lib.rs +++ b/state-chain/pallets/cf-environment/src/lib.rs @@ -19,7 +19,7 @@ mod tests; pub mod weights; pub use weights::WeightInfo; -#[derive(Clone, Debug, PartialEq, Eq, Encode, Decode)] +#[derive(Clone, Debug, PartialEq, Eq, Encode, Decode, TypeInfo, MaxEncodedLen)] pub enum SystemState { Normal, Maintenance, @@ -35,7 +35,7 @@ type SignatureNonce = u64; pub mod cfe { use super::*; /// On chain CFE settings - #[derive(Encode, Decode, Clone, RuntimeDebug, PartialEq, Eq, Copy)] + #[derive(Encode, Decode, TypeInfo, MaxEncodedLen, Clone, RuntimeDebug, PartialEq, Eq, Copy)] #[cfg_attr(feature = "std", derive(serde::Serialize, serde::Deserialize))] pub struct CfeSettings { /// Number of blocks we wait until we consider the ethereum witnesser stream finalized. diff --git a/state-chain/pallets/cf-flip/Cargo.toml b/state-chain/pallets/cf-flip/Cargo.toml index 95dc22b9de..4418b779d0 100644 --- a/state-chain/pallets/cf-flip/Cargo.toml +++ b/state-chain/pallets/cf-flip/Cargo.toml @@ -22,54 +22,54 @@ cf-traits = { path = '../../traits', default-features = false } default-features = false features = ['derive'] package = 'parity-scale-codec' -version = '2.3.1' +version = '3.0.0' [dependencies.frame-support] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.frame-system] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.scale-info] default-features = false features = ['derive'] -version = '1.0' +version = '2.0.1' [dependencies.sp-runtime] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.sp-std] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.frame-benchmarking] default-features = false git = 'https://github.com/chainflip-io/substrate.git' optional = true -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.pallet-transaction-payment] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' # Dev dependencies [dev-dependencies.sp-io] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dev-dependencies.sp-core] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [features] default = ['std'] diff --git a/state-chain/pallets/cf-flip/src/benchmarking.rs b/state-chain/pallets/cf-flip/src/benchmarking.rs index a28a0ef521..ab304cb61d 100644 --- a/state-chain/pallets/cf-flip/src/benchmarking.rs +++ b/state-chain/pallets/cf-flip/src/benchmarking.rs @@ -1,7 +1,7 @@ #![cfg(feature = "runtime-benchmarks")] use super::*; -use frame_benchmarking::{benchmarks, impl_benchmark_test_suite}; +use frame_benchmarking::benchmarks; use frame_support::{dispatch::UnfilteredDispatchable, traits::EnsureOrigin}; benchmarks! { @@ -13,6 +13,6 @@ benchmarks! { verify { assert_eq!(Pallet::::slashing_rate(), balance.into()) } -} -impl_benchmark_test_suite!(Pallet, crate::mock::new_test_ext(), crate::mock::Test,); + impl_benchmark_test_suite!(Pallet, crate::mock::new_test_ext(), crate::mock::Test,); +} diff --git a/state-chain/pallets/cf-flip/src/imbalances.rs b/state-chain/pallets/cf-flip/src/imbalances.rs index 463c630488..111b35dfa0 100644 --- a/state-chain/pallets/cf-flip/src/imbalances.rs +++ b/state-chain/pallets/cf-flip/src/imbalances.rs @@ -6,6 +6,7 @@ use crate::{self as Flip, Config, ReserveId}; use codec::{Decode, Encode}; use frame_support::traits::{Imbalance, SameOrOther, TryDrop}; +use scale_info::TypeInfo; use sp_runtime::{ traits::{Bounded, CheckedAdd, CheckedSub, Saturating, Zero}, RuntimeDebug, @@ -13,7 +14,7 @@ use sp_runtime::{ use sp_std::{mem, result}; /// Internal sources of funds. -#[derive(RuntimeDebug, PartialEq, Eq, Clone, Encode, Decode)] +#[derive(RuntimeDebug, PartialEq, Eq, Clone, Encode, Decode, TypeInfo)] pub enum InternalSource { /// A user account. Account(AccountId), @@ -22,7 +23,7 @@ pub enum InternalSource { } /// The origin of an imbalance. -#[derive(RuntimeDebug, PartialEq, Eq, Clone, Encode, Decode)] +#[derive(RuntimeDebug, PartialEq, Eq, Clone, Encode, Decode, TypeInfo)] pub enum ImbalanceSource { /// External, aka. off-chain. External, diff --git a/state-chain/pallets/cf-flip/src/lib.rs b/state-chain/pallets/cf-flip/src/lib.rs index 01559af7a3..527b4d9c38 100644 --- a/state-chain/pallets/cf-flip/src/lib.rs +++ b/state-chain/pallets/cf-flip/src/lib.rs @@ -15,6 +15,7 @@ mod imbalances; mod on_charge_transaction; pub mod weights; +use scale_info::TypeInfo; pub use weights::WeightInfo; use cf_traits::{Bonding, Slashing, StakeHandler}; @@ -26,7 +27,7 @@ use frame_support::{ traits::{Get, Imbalance, OnKilledAccount, SignedImbalance}, }; -use codec::{Decode, Encode}; +use codec::{Decode, Encode, MaxEncodedLen}; use sp_runtime::{ traits::{ AtLeast32BitUnsigned, MaybeSerializeDeserialize, Saturating, UniqueSaturatedInto, Zero, @@ -56,8 +57,9 @@ pub mod pallet { type EnsureGovernance: EnsureOrigin; /// The balance of an account. - type Balance: Parameter - + Member + type Balance: Member + + Parameter + + MaxEncodedLen + AtLeast32BitUnsigned + Default + Copy @@ -113,7 +115,6 @@ pub mod pallet { pub type OffchainFunds = StorageValue<_, T::Balance, ValueQuery>; #[pallet::event] - #[pallet::metadata(T::AccountId = "AccountId")] #[pallet::generate_deposit(pub(super) fn deposit_event)] pub enum Event { /// Some imbalance could not be settled and the remainder will be reverted. /[reverted_to, @@ -180,7 +181,7 @@ pub mod pallet { } /// All balance information for a Flip account. -#[derive(Encode, Decode, Clone, PartialEq, Eq, Default, RuntimeDebug)] +#[derive(Encode, Decode, TypeInfo, MaxEncodedLen, Clone, PartialEq, Eq, Default, RuntimeDebug)] pub struct FlipAccount { /// Amount that has been staked and is considered as a bid in the auction. Includes /// any bonded and vesting funds. Excludes any funds in the process of being claimed. diff --git a/state-chain/pallets/cf-governance/Cargo.toml b/state-chain/pallets/cf-governance/Cargo.toml index 9f35d2cfe5..60f427de7d 100644 --- a/state-chain/pallets/cf-governance/Cargo.toml +++ b/state-chain/pallets/cf-governance/Cargo.toml @@ -20,43 +20,43 @@ cf-traits = { path = '../../traits', default-features = false } default-features = false features = ['derive'] package = 'parity-scale-codec' -version = '2.3.1' +version = '3.0.0' [dependencies.frame-support] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.frame-system] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.scale-info] default-features = false features = ['derive'] -version = '1.0' +version = '2.0.1' [dependencies.sp-runtime] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.sp-std] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.sp-core] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.frame-benchmarking] default-features = false git = 'https://github.com/chainflip-io/substrate.git' optional = true -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dev-dependencies] cf-test-utilities = { path = '../../test-utilities'} @@ -65,7 +65,7 @@ cf-test-utilities = { path = '../../test-utilities'} [dev-dependencies.sp-io] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [features] default = ['std'] diff --git a/state-chain/pallets/cf-governance/src/benchmarking.rs b/state-chain/pallets/cf-governance/src/benchmarking.rs index 90e0e63a9d..d01552d883 100644 --- a/state-chain/pallets/cf-governance/src/benchmarking.rs +++ b/state-chain/pallets/cf-governance/src/benchmarking.rs @@ -3,7 +3,7 @@ use super::*; -use frame_benchmarking::{benchmarks, impl_benchmark_test_suite, whitelisted_caller}; +use frame_benchmarking::{benchmarks, whitelisted_caller}; use frame_support::{dispatch::UnfilteredDispatchable, traits::OnInitialize}; use frame_system::RawOrigin; use sp_std::{boxed::Box, vec}; @@ -63,6 +63,6 @@ benchmarks! { } : { Pallet::::expire_proposals(>::get()); } -} -impl_benchmark_test_suite!(Pallet, crate::mock::new_test_ext(), crate::mock::Test,); + impl_benchmark_test_suite!(Pallet, crate::mock::new_test_ext(), crate::mock::Test,); +} diff --git a/state-chain/pallets/cf-governance/src/lib.rs b/state-chain/pallets/cf-governance/src/lib.rs index 1ea145bf16..c8ab1d0164 100644 --- a/state-chain/pallets/cf-governance/src/lib.rs +++ b/state-chain/pallets/cf-governance/src/lib.rs @@ -39,7 +39,7 @@ pub mod pallet { traits::{UnfilteredDispatchable, UnixTime}, }; - use codec::{Encode, FullCodec}; + use codec::Encode; use frame_system::{pallet, pallet_prelude::*}; use sp_std::{boxed::Box, vec::Vec}; @@ -47,7 +47,7 @@ pub mod pallet { pub type ActiveProposal = (ProposalId, Timestamp); /// Proposal struct - #[derive(Encode, Decode, Clone, RuntimeDebug, Default, PartialEq, Eq)] + #[derive(Encode, Decode, TypeInfo, Clone, RuntimeDebug, PartialEq, Eq)] pub struct Proposal { /// Encoded representation of a extrinsic pub call: OpaqueCall, @@ -55,6 +55,12 @@ pub mod pallet { pub approved: Vec, } + impl Default for Proposal { + fn default() -> Self { + Self { call: Default::default(), approved: Default::default() } + } + } + type AccountId = ::AccountId; type OpaqueCall = Vec; type Timestamp = u64; @@ -71,7 +77,7 @@ pub mod pallet { type EnsureGovernance: EnsureOrigin<::Origin>; /// The overarching call type. type Call: Member - + FullCodec + + Parameter + UnfilteredDispatchable::Origin> + From> + GetDispatchInfo; @@ -84,7 +90,9 @@ pub mod pallet { /// Provides to implementation for a runtime upgrade type RuntimeUpgrade: RuntimeUpgrade; } + #[pallet::pallet] + #[pallet::without_storage_info] #[pallet::generate_store(pub(super) trait Store)] pub struct Pallet(_); @@ -331,7 +339,7 @@ pub mod pallet { pub type Origin = RawOrigin; /// The raw origin enum for this pallet. - #[derive(PartialEq, Eq, Clone, RuntimeDebug, Encode, Decode)] + #[derive(PartialEq, Eq, Clone, RuntimeDebug, Encode, Decode, TypeInfo)] pub enum RawOrigin { GovernanceThreshold, } diff --git a/state-chain/pallets/cf-online/Cargo.toml b/state-chain/pallets/cf-online/Cargo.toml index b72bf0a105..f89ed24c5a 100644 --- a/state-chain/pallets/cf-online/Cargo.toml +++ b/state-chain/pallets/cf-online/Cargo.toml @@ -22,48 +22,48 @@ pallet-cf-validator = { path = '../cf-validator', default-features = false } default-features = false features = ['derive'] package = 'parity-scale-codec' -version = '2.3.1' +version = '3.0.0' [dependencies.frame-support] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.frame-system] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.scale-info] default-features = false features = ['derive'] -version = '1.0' +version = '2.0.1' [dependencies.sp-runtime] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.frame-benchmarking] default-features = false git = 'https://github.com/chainflip-io/substrate.git' optional = true -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.sp-std] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' # Dev dependencies [dev-dependencies.sp-core] git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dev-dependencies.sp-io] git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [features] default = ['std'] diff --git a/state-chain/pallets/cf-online/src/benchmarking.rs b/state-chain/pallets/cf-online/src/benchmarking.rs index dcba619e20..ae44738e7c 100644 --- a/state-chain/pallets/cf-online/src/benchmarking.rs +++ b/state-chain/pallets/cf-online/src/benchmarking.rs @@ -3,7 +3,7 @@ use super::*; -use frame_benchmarking::{account, benchmarks, impl_benchmark_test_suite, whitelisted_caller}; +use frame_benchmarking::{account, benchmarks, whitelisted_caller}; use frame_system::RawOrigin; const HEART_BLOCK_INTERVAL: u32 = 150; @@ -30,6 +30,6 @@ benchmarks! { } : { Pallet::::on_initialize((HEART_BLOCK_INTERVAL + 1).into()); } -} -impl_benchmark_test_suite!(Pallet, crate::mock::new_test_ext(), crate::mock::Test,); + impl_benchmark_test_suite!(Pallet, crate::mock::new_test_ext(), crate::mock::Test,); +} diff --git a/state-chain/pallets/cf-reputation/Cargo.toml b/state-chain/pallets/cf-reputation/Cargo.toml index 5e21b1e39a..635b7a2d58 100644 --- a/state-chain/pallets/cf-reputation/Cargo.toml +++ b/state-chain/pallets/cf-reputation/Cargo.toml @@ -22,38 +22,38 @@ log = { version = '0.4.14', default-features = false } default-features = false features = ['derive'] package = 'parity-scale-codec' -version = '2.3.1' +version = '3.0.0' [dependencies.frame-support] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.frame-system] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.scale-info] default-features = false features = ['derive'] -version = '1.0' +version = '2.0.1' [dependencies.frame-benchmarking] default-features = false git = 'https://github.com/chainflip-io/substrate.git' optional = true -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.sp-runtime] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.sp-std] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' # Dev dependencies [dev-dependencies] @@ -62,12 +62,12 @@ serde = { version = '1.0.126', default-features = false, features = ['derive'] } [dev-dependencies.sp-core] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dev-dependencies.sp-io] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [features] diff --git a/state-chain/pallets/cf-reputation/src/benchmarking.rs b/state-chain/pallets/cf-reputation/src/benchmarking.rs index 4faa584b51..8bd1d762e4 100644 --- a/state-chain/pallets/cf-reputation/src/benchmarking.rs +++ b/state-chain/pallets/cf-reputation/src/benchmarking.rs @@ -3,7 +3,7 @@ use super::*; -use frame_benchmarking::{benchmarks, impl_benchmark_test_suite}; +use frame_benchmarking::benchmarks; use frame_support::dispatch::UnfilteredDispatchable; benchmarks! { @@ -29,6 +29,6 @@ benchmarks! { } : { as Hooks<_>>::on_runtime_upgrade(); } -} -impl_benchmark_test_suite!(Pallet, crate::mock::new_test_ext(), crate::mock::Test,); + impl_benchmark_test_suite!(Pallet, crate::mock::new_test_ext(), crate::mock::Test,); +} diff --git a/state-chain/pallets/cf-reputation/src/lib.rs b/state-chain/pallets/cf-reputation/src/lib.rs index ba314ed8ad..d17eff8e5c 100644 --- a/state-chain/pallets/cf-reputation/src/lib.rs +++ b/state-chain/pallets/cf-reputation/src/lib.rs @@ -59,7 +59,7 @@ impl ReputationParameters for T { type RuntimeReputationTracker = reputation::ReputationTracker; /// A reputation penalty as a ratio of points penalised over number of blocks -#[derive(Clone, PartialEq, Eq, RuntimeDebug, Encode, Decode)] +#[derive(Clone, PartialEq, Eq, RuntimeDebug, Encode, Decode, TypeInfo, MaxEncodedLen)] pub struct ReputationPenaltyRate { pub points: ReputationPoints, pub per_blocks: BlockNumber, @@ -67,7 +67,9 @@ pub struct ReputationPenaltyRate { /// A penalty comprises the reputation that will be deducted and the number of blocks suspension /// that are imposed. -#[derive(Clone, PartialEq, Eq, Encode, Decode)] +#[derive(Clone, PartialEq, Eq, Encode, Decode, TypeInfo, MaxEncodedLen)] +#[scale_info(skip_type_params(T))] +#[codec(mel_bound(T: Config))] pub struct Penalty { reputation: ReputationPoints, suspension: T::BlockNumber, @@ -88,7 +90,7 @@ impl Default for Penalty { } } -#[derive(Copy, Clone, RuntimeDebug, PartialEq, Eq, Encode, Decode)] +#[derive(Copy, Clone, RuntimeDebug, PartialEq, Eq, Encode, Decode, TypeInfo)] pub enum PalletOffence { MissedHeartbeat, } @@ -101,6 +103,7 @@ pub mod pallet { #[pallet::pallet] #[pallet::storage_version(PALLET_VERSION)] #[pallet::generate_store(pub (super) trait Store)] + #[pallet::without_storage_info] pub struct Pallet(_); #[pallet::config] @@ -109,7 +112,12 @@ pub mod pallet { type Event: From> + IsType<::Event>; /// The runtime offence type must be compatible with this pallet's offence type. - type Offence: From + Member + Parameter + Copy + MaybeSerializeDeserialize; + type Offence: From + + Member + + Parameter + + MaxEncodedLen + + Copy + + MaybeSerializeDeserialize; /// When we have to, we slash type Slasher: Slashing< diff --git a/state-chain/pallets/cf-reputation/src/mock.rs b/state-chain/pallets/cf-reputation/src/mock.rs index 603b2aec0b..ad44733158 100644 --- a/state-chain/pallets/cf-reputation/src/mock.rs +++ b/state-chain/pallets/cf-reputation/src/mock.rs @@ -117,7 +117,7 @@ impl Chainflip for Test { } #[cfg_attr(feature = "std", derive(Serialize, Deserialize))] -#[derive(Copy, Clone, Debug, PartialEq, Eq, Encode, Decode)] +#[derive(Copy, Clone, Debug, PartialEq, Eq, Encode, Decode, TypeInfo)] pub enum AllOffences { MissedHeartbeat, NotLockingYourComputer, diff --git a/state-chain/pallets/cf-reputation/src/reputation.rs b/state-chain/pallets/cf-reputation/src/reputation.rs index c630a2158d..4f6c6faa40 100644 --- a/state-chain/pallets/cf-reputation/src/reputation.rs +++ b/state-chain/pallets/cf-reputation/src/reputation.rs @@ -1,11 +1,15 @@ -use codec::{Decode, Encode}; +use codec::{Decode, Encode, MaxEncodedLen}; +use frame_support::{pallet_prelude::Member, Parameter}; +use scale_info::TypeInfo; use sp_runtime::traits::{AtLeast32BitUnsigned, Saturating, Zero}; use sp_std::fmt::Debug; pub type ReputationPoints = i32; /// Reputation of a node -#[derive(Encode, Decode, Clone, PartialEq, Eq)] +#[derive(Encode, Decode, TypeInfo, MaxEncodedLen, Clone, PartialEq, Eq)] +#[scale_info(skip_type_params(P))] +#[codec(mel_bound(P: ReputationParameters))] pub struct ReputationTracker { online_credits: P::OnlineCredits, pub reputation_points: ReputationPoints, @@ -27,7 +31,13 @@ impl Debug for ReputationTracker

{ } pub trait ReputationParameters { - type OnlineCredits: AtLeast32BitUnsigned + Copy + Debug + Default; + type OnlineCredits: Member + + Parameter + + MaxEncodedLen + + AtLeast32BitUnsigned + + Copy + + Debug + + Default; fn bounds() -> (ReputationPoints, ReputationPoints); fn accrual_rate() -> (ReputationPoints, Self::OnlineCredits); diff --git a/state-chain/pallets/cf-reputation/src/suspensions.rs b/state-chain/pallets/cf-reputation/src/suspensions.rs index aa852d45d4..c1e6563ecf 100644 --- a/state-chain/pallets/cf-reputation/src/suspensions.rs +++ b/state-chain/pallets/cf-reputation/src/suspensions.rs @@ -1,12 +1,13 @@ use codec::{Decode, Encode}; use frame_support::RuntimeDebug; +use scale_info::TypeInfo; use sp_runtime::traits::{AtLeast32BitUnsigned, BlockNumberProvider}; use sp_std::{ collections::{btree_set::BTreeSet, vec_deque::VecDeque}, iter, }; -#[derive(Clone, RuntimeDebug, Default, PartialEq, Eq, Encode, Decode)] +#[derive(Clone, RuntimeDebug, Default, PartialEq, Eq, Encode, Decode, TypeInfo)] pub struct SuspensionTracker { offence: Offence, current_block: Block, @@ -70,7 +71,7 @@ mod test_suspension_tracking { use super::*; - #[derive(Copy, Clone, Debug, PartialEq, Eq, Encode, Decode)] + #[derive(Copy, Clone, Debug, PartialEq, Eq, Encode, Decode, TypeInfo)] enum Offence { EatingTheLastRolo, } diff --git a/state-chain/pallets/cf-staking/Cargo.toml b/state-chain/pallets/cf-staking/Cargo.toml index 853ab51ba0..300a8673cd 100644 --- a/state-chain/pallets/cf-staking/Cargo.toml +++ b/state-chain/pallets/cf-staking/Cargo.toml @@ -26,43 +26,43 @@ log = { version = '0.4.14', default-features = false } default-features = false features = ['derive'] package = 'parity-scale-codec' -version = '2.3.1' +version = '3.0.0' [dependencies.frame-support] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.frame-system] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.scale-info] default-features = false features = ['derive'] -version = '1.0' +version = '2.0.1' [dependencies.sp-runtime] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.sp-std] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.sp-core] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.frame-benchmarking] default-features = false git = 'https://github.com/chainflip-io/substrate.git' optional = true -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' # Dev dependencies [dev-dependencies] @@ -72,7 +72,7 @@ cf-test-utilities = { path = '../../test-utilities' } [dev-dependencies.sp-io] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [features] default = ['std'] diff --git a/state-chain/pallets/cf-staking/src/benchmarking.rs b/state-chain/pallets/cf-staking/src/benchmarking.rs index ecd626f7c3..1792c0ff95 100644 --- a/state-chain/pallets/cf-staking/src/benchmarking.rs +++ b/state-chain/pallets/cf-staking/src/benchmarking.rs @@ -4,7 +4,7 @@ use super::*; use codec::{Decode, Encode}; -use frame_benchmarking::{account, benchmarks, impl_benchmark_test_suite, whitelisted_caller}; +use frame_benchmarking::{account, benchmarks, whitelisted_caller}; use frame_support::{dispatch::UnfilteredDispatchable, traits::OnInitialize}; use frame_system::RawOrigin; use sp_std::vec::Vec; @@ -178,6 +178,6 @@ benchmarks! { }: { Pallet::::expire_pending_claims(); } -} -impl_benchmark_test_suite!(Pallet, crate::mock::new_test_ext(), crate::mock::Test,); + impl_benchmark_test_suite!(Pallet, crate::mock::new_test_ext(), crate::mock::Test,); +} diff --git a/state-chain/pallets/cf-staking/src/lib.rs b/state-chain/pallets/cf-staking/src/lib.rs index 2765795812..64d8fe4214 100644 --- a/state-chain/pallets/cf-staking/src/lib.rs +++ b/state-chain/pallets/cf-staking/src/lib.rs @@ -19,7 +19,6 @@ use cf_traits::{ Bid, BidderProvider, EpochInfo, EthEnvironmentProvider, ReplayProtectionProvider, StakeTransfer, ThresholdSigner, }; -use core::time::Duration; use frame_support::{ dispatch::DispatchResultWithPostInfo, ensure, @@ -27,10 +26,16 @@ use frame_support::{ }; use frame_system::pallet_prelude::OriginFor; pub use pallet::*; -use sp_std::prelude::*; +use sp_std::{prelude::*, time::Duration}; use cf_traits::SystemStateInfo; +/// Temporary alias to work around `Duration` not supporting TypeInfo. +/// +/// TODO: Replace this with just a u64 for the seconds. We don't care about nanos. Will do this in +/// another PR since it requires a storage migration. +type DurationParts = (u64, u32); + use sp_runtime::{ traits::{AtLeast32BitUnsigned, CheckedSub, Zero}, DispatchError, @@ -110,6 +115,7 @@ pub mod pallet { } #[pallet::pallet] + #[pallet::without_storage_info] pub struct Pallet(PhantomData); /// Store the list of staked accounts and whether or not they are retired @@ -131,14 +137,14 @@ pub mod pallet { #[pallet::storage] pub(super) type ClaimExpiries = - StorageValue<_, Vec<(Duration, AccountId)>, ValueQuery>; + StorageValue<_, Vec<(DurationParts, AccountId)>, ValueQuery>; #[pallet::storage] pub type MinimumStake = StorageValue<_, T::Balance, ValueQuery>; /// TTL for a claim from the moment of issue. #[pallet::storage] - pub type ClaimTTL = StorageValue<_, Duration, ValueQuery>; + pub type ClaimTTL = StorageValue<_, DurationParts, ValueQuery>; #[pallet::hooks] impl Hooks> for Pallet { @@ -499,7 +505,7 @@ pub mod pallet { impl GenesisBuild for GenesisConfig { fn build(&self) { MinimumStake::::set(self.minimum_stake); - ClaimTTL::::set(self.claim_ttl); + ClaimTTL::::set((self.claim_ttl.as_secs(), 0)); for (staker, amount) in self.genesis_stakers.iter() { Pallet::::stake_account(staker, *amount); match Pallet::::activate(staker) { @@ -625,8 +631,8 @@ impl Pallet { T::Flip::try_claim(account_id, amount)?; // Set expiry and build the claim parameters. - let expiry = T::TimeSource::now() + ClaimTTL::::get(); - Self::register_claim_expiry(account_id.clone(), expiry); + let expiry = T::TimeSource::now() + Duration::from_secs(ClaimTTL::::get().0); + Self::register_claim_expiry(account_id.clone(), (expiry.as_secs(), 0)); let call = T::RegisterClaim::new_unsigned( T::ReplayProtectionProvider::replay_protection(), @@ -639,7 +645,13 @@ impl Pallet { // Emit a threshold signature request. T::ThresholdSigner::request_signature_with_callback( call.threshold_signature_payload(), - |id| Call::::post_claim_signature(account_id.clone(), id).into(), + |id| { + Call::::post_claim_signature { + account_id: account_id.clone(), + signature_request_id: id, + } + .into() + }, ); // Store the claim params for later. @@ -697,7 +709,7 @@ impl Pallet { /// Registers the expiry time for an account's pending claim. At the provided time, any pending /// claims for the account are expired. - fn register_claim_expiry(account_id: AccountId, expiry: Duration) { + fn register_claim_expiry(account_id: AccountId, expiry: DurationParts) { ClaimExpiries::::mutate(|expiries| { // We want to ensure this list remains sorted such that the head of the list contains // the oldest pending claim (ie. the first to be expired). This means we put the new @@ -723,7 +735,8 @@ impl Pallet { let expiries = ClaimExpiries::::get(); // Expiries are sorted on insertion so we can just partition the slice. - let expiry_cutoff = expiries.partition_point(|(expiry, _)| *expiry < T::TimeSource::now()); + let expiry_cutoff = + expiries.partition_point(|(expiry, _)| expiry.0 < T::TimeSource::now().as_secs()); let (to_expire, remaining) = expiries.split_at(expiry_cutoff); diff --git a/state-chain/pallets/cf-threshold-signature/Cargo.toml b/state-chain/pallets/cf-threshold-signature/Cargo.toml index d0d438b86f..bbca4136af 100644 --- a/state-chain/pallets/cf-threshold-signature/Cargo.toml +++ b/state-chain/pallets/cf-threshold-signature/Cargo.toml @@ -28,38 +28,38 @@ pallet-cf-online = { path = '../cf-online', optional = true, default-features = default-features = false features = ['derive'] package = 'parity-scale-codec' -version = '2.3.1' +version = '3.0.0' [dependencies.frame-support] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.frame-system] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.scale-info] default-features = false features = ['derive'] -version = '1.0' +version = '2.0.1' [dependencies.sp-runtime] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.sp-std] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.frame-benchmarking] default-features = false git = 'https://github.com/chainflip-io/substrate.git' optional = true -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' # Dev dependencies [dev-dependencies] @@ -68,12 +68,12 @@ hex-literal = { version = "0.3" } [dev-dependencies.sp-core] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dev-dependencies.sp-io] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [features] default = ['std'] diff --git a/state-chain/pallets/cf-threshold-signature/src/lib.rs b/state-chain/pallets/cf-threshold-signature/src/lib.rs index 4685fc4506..8237a101ce 100644 --- a/state-chain/pallets/cf-threshold-signature/src/lib.rs +++ b/state-chain/pallets/cf-threshold-signature/src/lib.rs @@ -13,7 +13,8 @@ mod benchmarking; pub mod weights; -use codec::{Decode, Encode}; +use codec::{Decode, Encode, MaxEncodedLen}; +use scale_info::TypeInfo; use cf_chains::{Chain, ChainCrypto}; use cf_traits::{ @@ -51,7 +52,7 @@ type AttemptCount = u32; type SignatureFor = <>::TargetChain as ChainCrypto>::ThresholdSignature; type PayloadFor = <>::TargetChain as ChainCrypto>::Payload; -#[derive(Copy, Clone, Debug, PartialEq, Eq, Encode, Decode)] +#[derive(Copy, Clone, Debug, PartialEq, Eq, Encode, Decode, TypeInfo, MaxEncodedLen)] pub enum PalletOffence { ParticipateSigningFailed, } @@ -69,7 +70,8 @@ pub mod pallet { use frame_system::{ensure_none, pallet_prelude::*}; /// Metadata for a pending threshold signature ceremony. - #[derive(Clone, RuntimeDebug, PartialEq, Eq, Encode, Decode)] + #[derive(Clone, RuntimeDebug, PartialEq, Eq, Encode, Decode, TypeInfo)] + #[scale_info(skip_type_params(T, I))] pub struct CeremonyContext, I: 'static> { /// The respondents that have yet to reply. pub remaining_respondents: BTreeSet, @@ -180,6 +182,7 @@ pub mod pallet { } #[pallet::pallet] + #[pallet::without_storage_info] #[pallet::generate_store(pub(super) trait Store)] pub struct Pallet(PhantomData<(T, I)>); @@ -301,7 +304,8 @@ pub mod pallet { } #[pallet::origin] - #[derive(PartialEq, Eq, Copy, Clone, RuntimeDebug, Encode, Decode)] + #[derive(PartialEq, Eq, Copy, Clone, RuntimeDebug, Encode, Decode, TypeInfo)] + #[scale_info(skip_type_params(T, I))] pub struct Origin, I: 'static = ()>(pub(super) PhantomData<(T, I)>); #[pallet::validate_unsigned] @@ -309,7 +313,7 @@ pub mod pallet { type Call = Call; fn validate_unsigned(_source: TransactionSource, call: &Self::Call) -> TransactionValidity { - if let Call::::signature_success(ceremony_id, signature) = call { + if let Call::::signature_success { ceremony_id, signature } = call { let (_, _, payload) = OpenRequests::::get(ceremony_id).ok_or(InvalidTransaction::Stale)?; @@ -462,7 +466,7 @@ pub mod pallet { id: CeremonyId, offenders: BTreeSet<::ValidatorId>, ) -> DispatchResultWithPostInfo { - Call::::report_signature_failed(id, offenders).dispatch_bypass_filter(origin) + Call::::report_signature_failed { id, offenders }.dispatch_bypass_filter(origin) } } } diff --git a/state-chain/pallets/cf-threshold-signature/src/mock.rs b/state-chain/pallets/cf-threshold-signature/src/mock.rs index 5f903208c8..5da3cf7937 100644 --- a/state-chain/pallets/cf-threshold-signature/src/mock.rs +++ b/state-chain/pallets/cf-threshold-signature/src/mock.rs @@ -123,7 +123,7 @@ thread_local! { pub static CALL_DISPATCHED: std::cell::RefCell> = Default::default(); } -#[derive(Debug, Clone, Default, PartialEq, Eq, Encode, Decode)] +#[derive(Debug, Clone, Default, PartialEq, Eq, Encode, Decode, TypeInfo)] pub struct MockCallback(RequestId, PhantomData); impl MockCallback { diff --git a/state-chain/pallets/cf-validator/Cargo.toml b/state-chain/pallets/cf-validator/Cargo.toml index ea964616b8..372848624c 100644 --- a/state-chain/pallets/cf-validator/Cargo.toml +++ b/state-chain/pallets/cf-validator/Cargo.toml @@ -23,48 +23,48 @@ log = { version = '0.4.14', default-features = false } default-features = false features = ['derive'] package = 'parity-scale-codec' -version = '2.3.1' +version = '3.0.0' [dependencies.frame-support] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.frame-system] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.scale-info] default-features = false features = ['derive'] -version = '1.0' +version = '2.0.1' [dependencies.sp-core] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.sp-runtime] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.sp-std] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.frame-benchmarking] default-features = false git = 'https://github.com/chainflip-io/substrate.git' optional = true -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.pallet-session] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' # Dev dependencies [dev-dependencies] @@ -74,12 +74,12 @@ cf-test-utilities = { path = '../../test-utilities' } [dev-dependencies.sp-io] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dev-dependencies.sp-core] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [features] default = ['std'] diff --git a/state-chain/pallets/cf-validator/src/lib.rs b/state-chain/pallets/cf-validator/src/lib.rs index e56243749d..ab66ad3a2a 100644 --- a/state-chain/pallets/cf-validator/src/lib.rs +++ b/state-chain/pallets/cf-validator/src/lib.rs @@ -17,9 +17,9 @@ mod migrations; use cf_traits::{ offence_reporting::OffenceReporter, AsyncResult, AuctionResult, Auctioneer, AuthorityCount, - ChainflipAccount, ChainflipAccountData, ChainflipAccountStore, EmergencyRotation, EpochIndex, - EpochInfo, EpochTransitionHandler, ExecutionCondition, HistoricalEpoch, MissedAuthorshipSlots, - QualifyNode, ReputationResetter, SuccessOrFailure, VaultRotator, + Bonding, ChainflipAccount, ChainflipAccountData, ChainflipAccountStore, EmergencyRotation, + EpochIndex, EpochInfo, EpochTransitionHandler, ExecutionCondition, HistoricalEpoch, + MissedAuthorshipSlots, QualifyNode, ReputationResetter, SuccessOrFailure, VaultRotator, }; use frame_support::{ pallet_prelude::*, @@ -30,13 +30,13 @@ use sp_core::ed25519; use sp_runtime::traits::{BlockNumberProvider, CheckedDiv, Convert, One, Saturating, Zero}; use sp_std::{collections::btree_map::BTreeMap, prelude::*}; -use cf_traits::Bonding; - pub const PALLET_VERSION: StorageVersion = StorageVersion::new(3); type SessionIndex = u32; -#[derive(Clone, Debug, Default, PartialEq, Eq, PartialOrd, Encode, Decode)] +#[derive( + Clone, Debug, Default, PartialEq, Eq, PartialOrd, Encode, Decode, TypeInfo, MaxEncodedLen, +)] pub struct SemVer { pub major: u8, pub minor: u8, @@ -49,7 +49,7 @@ type Ed25519Signature = ed25519::Signature; pub type Ipv6Addr = u128; /// A percentage range -#[derive(Clone, Debug, PartialEq, Eq, Encode, Decode)] +#[derive(Clone, Debug, PartialEq, Eq, Encode, Decode, TypeInfo, MaxEncodedLen)] pub struct PercentageRange { pub top: u8, pub bottom: u8, @@ -59,7 +59,7 @@ pub type RotationStatusOf = RotationStatus< AuctionResult<::AccountId, ::Amount>, >; -#[derive(Clone, Debug, PartialEq, Eq, Encode, Decode)] +#[derive(Clone, Debug, PartialEq, Eq, Encode, Decode, TypeInfo)] pub enum RotationStatus { Idle, RunAuction, @@ -93,7 +93,7 @@ impl cf_traits::CeremonyIdProvider for CeremonyIdProvider { type ValidatorIdOf = ::AccountId; type VanityName = Vec; -#[derive(Copy, Clone, Debug, PartialEq, Eq, Encode, Decode)] +#[derive(Copy, Clone, Debug, PartialEq, Eq, Encode, Decode, TypeInfo, MaxEncodedLen)] pub enum PalletOffence { MissedAuthorshipSlot, } @@ -112,6 +112,7 @@ pub mod pallet { #[pallet::pallet] #[pallet::generate_store(pub (super) trait Store)] + #[pallet::without_storage_info] #[pallet::storage_version(PALLET_VERSION)] pub struct Pallet(_); diff --git a/state-chain/pallets/cf-validator/src/migrations/v2.rs b/state-chain/pallets/cf-validator/src/migrations/v2.rs index 6ee486e838..c593d919c1 100644 --- a/state-chain/pallets/cf-validator/src/migrations/v2.rs +++ b/state-chain/pallets/cf-validator/src/migrations/v2.rs @@ -4,7 +4,7 @@ mod v1_types { use super::*; use codec::{Decode, Encode}; use frame_support::RuntimeDebug; - #[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug, Default)] + #[derive(PartialEq, Eq, Clone, Encode, Decode, TypeInfo, RuntimeDebug, Default)] pub struct AuctionResult { pub winners: Vec, pub minimum_active_bid: Amount, diff --git a/state-chain/pallets/cf-vaults/Cargo.toml b/state-chain/pallets/cf-vaults/Cargo.toml index 108e5ccf7f..e7856b92f5 100644 --- a/state-chain/pallets/cf-vaults/Cargo.toml +++ b/state-chain/pallets/cf-vaults/Cargo.toml @@ -27,38 +27,38 @@ log = { version = '0.4.14', default-features = false } default-features = false features = ['derive'] package = 'parity-scale-codec' -version = '2.3.1' +version = '3.0.0' [dependencies.frame-support] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.frame-system] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.scale-info] default-features = false features = ['derive'] -version = '1.0' +version = '2.0.1' [dependencies.sp-runtime] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.sp-std] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.frame-benchmarking] default-features = false git = 'https://github.com/chainflip-io/substrate.git' optional = true -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' # Dev dependencies [dev-dependencies] @@ -68,12 +68,12 @@ cf-test-utilities = { path = '../../test-utilities' } [dev-dependencies.sp-io] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dev-dependencies.sp-core] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [features] default = ['std'] diff --git a/state-chain/pallets/cf-vaults/src/benchmarking.rs b/state-chain/pallets/cf-vaults/src/benchmarking.rs index 49360bd6d6..6d463299a6 100644 --- a/state-chain/pallets/cf-vaults/src/benchmarking.rs +++ b/state-chain/pallets/cf-vaults/src/benchmarking.rs @@ -5,9 +5,7 @@ use super::*; use cf_traits::EpochInfo; use codec::{Decode, Encode}; -use frame_benchmarking::{ - account, benchmarks_instance_pallet, impl_benchmark_test_suite, whitelisted_caller, -}; +use frame_benchmarking::{account, benchmarks_instance_pallet, whitelisted_caller}; use frame_support::dispatch::UnfilteredDispatchable; use frame_system::RawOrigin; @@ -131,6 +129,6 @@ benchmarks_instance_pallet! { verify { assert!(Vaults::::contains_key(T::EpochInfo::epoch_index())); } -} -impl_benchmark_test_suite!(Pallet, crate::mock::new_test_ext(), crate::mock::MockRuntime,); + impl_benchmark_test_suite!(Pallet, crate::mock::new_test_ext(), crate::mock::MockRuntime,); +} diff --git a/state-chain/pallets/cf-vaults/src/lib.rs b/state-chain/pallets/cf-vaults/src/lib.rs index 24b594ae15..db17320faa 100644 --- a/state-chain/pallets/cf-vaults/src/lib.rs +++ b/state-chain/pallets/cf-vaults/src/lib.rs @@ -34,7 +34,7 @@ mod mock; #[cfg(test)] mod tests; -#[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug)] +#[derive(PartialEq, Eq, Clone, Encode, Decode, TypeInfo, RuntimeDebug)] pub enum KeygenOutcome { /// Keygen succeeded with the enclosed public threshold key. Success(Key), @@ -58,7 +58,8 @@ pub type ThresholdSignatureFor = <>::Chain as ChainCrypto>::ThresholdSignature; /// Tracks the current state of the keygen ceremony. -#[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug)] +#[derive(PartialEq, Eq, Clone, Encode, Decode, TypeInfo, RuntimeDebug)] +#[scale_info(skip_type_params(T, I))] pub struct KeygenResponseStatus, I: 'static = ()> { /// The total number of candidates participating in the keygen ceremony. candidate_count: AuthorityCount, @@ -229,7 +230,8 @@ impl, I: 'static> KeygenResponseStatus { } /// The current status of a vault rotation. -#[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug, EnumVariant)] +#[derive(PartialEq, Eq, Clone, Encode, Decode, TypeInfo, RuntimeDebug, EnumVariant)] +#[scale_info(skip_type_params(T, I))] pub enum VaultRotationStatus, I: 'static = ()> { AwaitingKeygen { keygen_ceremony_id: CeremonyId, response_status: KeygenResponseStatus }, AwaitingRotation { new_public_key: AggKeyFor }, @@ -247,7 +249,7 @@ impl, I: 'static> VaultRotationStatus { } /// A single vault. -#[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug)] +#[derive(PartialEq, Eq, Clone, Encode, Decode, TypeInfo, RuntimeDebug)] pub struct Vault { /// The vault's public key. pub public_key: T::AggKey, @@ -255,7 +257,7 @@ pub struct Vault { pub active_from_block: T::ChainBlockNumber, } -#[derive(Copy, Clone, Debug, PartialEq, Eq, Encode, Decode)] +#[derive(Copy, Clone, Debug, PartialEq, Eq, Encode, Decode, TypeInfo, MaxEncodedLen)] pub enum PalletOffence { /// Failing a keygen ceremony carries its own consequences. ParticipateKeygenFailed, @@ -271,6 +273,7 @@ pub mod pallet { #[pallet::pallet] #[pallet::generate_store(pub (super) trait Store)] + #[pallet::without_storage_info] #[pallet::storage_version(PALLET_VERSION)] pub struct Pallet(PhantomData<(T, I)>); diff --git a/state-chain/pallets/cf-vaults/src/migrations/v1.rs b/state-chain/pallets/cf-vaults/src/migrations/v1.rs index 58dc8aa1b0..287515fc31 100644 --- a/state-chain/pallets/cf-vaults/src/migrations/v1.rs +++ b/state-chain/pallets/cf-vaults/src/migrations/v1.rs @@ -29,7 +29,7 @@ const PALLET_NAME_V0: &[u8; 6] = b"Vaults"; const PALLET_NAME_V1: &[u8; 13] = b"EthereumVault"; -#[derive(Copy, Clone, Debug, PartialEq, Eq, Encode, Decode)] +#[derive(Copy, Clone, Debug, PartialEq, Eq, Encode, Decode, TypeInfo)] enum ChainId { Ethereum, } @@ -177,13 +177,13 @@ mod v0_types { use super::*; - #[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug, Default)] + #[derive(PartialEq, Eq, Clone, Encode, Decode, TypeInfo, RuntimeDebug, Default)] pub struct BlockHeightWindowV0 { pub from: u64, pub to: Option, } - #[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug)] + #[derive(PartialEq, Eq, Clone, Encode, Decode, TypeInfo, RuntimeDebug)] pub struct VaultV0, I: 'static = ()> { /// The vault's public key. pub public_key: Vec, @@ -207,7 +207,7 @@ mod v0_types { } } - #[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug)] + #[derive(PartialEq, Eq, Clone, Encode, Decode, TypeInfo, RuntimeDebug)] pub struct KeygenResponseStatusV0, I: 'static = ()> { /// The total number of candidates participating in the keygen ceremony. candidate_count: u32, @@ -250,7 +250,7 @@ mod v0_types { } } - #[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug)] + #[derive(PartialEq, Eq, Clone, Encode, Decode, TypeInfo, RuntimeDebug)] pub enum VaultRotationStatusV0, I: 'static = ()> { AwaitingKeygen { keygen_ceremony_id: CeremonyId, diff --git a/state-chain/pallets/cf-vaults/src/mock.rs b/state-chain/pallets/cf-vaults/src/mock.rs index d655614551..b9fe57b47f 100644 --- a/state-chain/pallets/cf-vaults/src/mock.rs +++ b/state-chain/pallets/cf-vaults/src/mock.rs @@ -101,7 +101,7 @@ impl UnfilteredDispatchable for MockCallback { } } -#[derive(Copy, Clone, Debug, Default, PartialEq, Eq, Encode, Decode)] +#[derive(Copy, Clone, Debug, Default, PartialEq, Eq, Encode, Decode, TypeInfo)] pub struct MockSetAggKeyWithAggKey { nonce: ::ReplayProtection, new_key: ::AggKey, diff --git a/state-chain/pallets/cf-witnesser/Cargo.toml b/state-chain/pallets/cf-witnesser/Cargo.toml index 9eee57af71..1eef2dab68 100644 --- a/state-chain/pallets/cf-witnesser/Cargo.toml +++ b/state-chain/pallets/cf-witnesser/Cargo.toml @@ -29,38 +29,38 @@ bitvec = { default-features = false, version = '0.20', features = ["alloc"] } default-features = false features = ['derive'] package = 'parity-scale-codec' -version = '2.3.1' +version = '3.0.0' [dependencies.frame-support] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.frame-system] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.scale-info] default-features = false features = ['derive'] -version = '1.0' +version = '2.0.1' [dependencies.sp-runtime] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.sp-std] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.frame-benchmarking] default-features = false git = 'https://github.com/chainflip-io/substrate.git' optional = true -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' # Dev dependencies [dev-dependencies] @@ -69,12 +69,12 @@ cf-test-utilities = { path = '../../test-utilities', default-features = false } [dev-dependencies.sp-io] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dev-dependencies.sp-core] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [features] default = ['std'] diff --git a/state-chain/pallets/cf-witnesser/src/benchmarking.rs b/state-chain/pallets/cf-witnesser/src/benchmarking.rs index cfc8abda40..b4fce54600 100644 --- a/state-chain/pallets/cf-witnesser/src/benchmarking.rs +++ b/state-chain/pallets/cf-witnesser/src/benchmarking.rs @@ -3,7 +3,7 @@ use super::*; -use frame_benchmarking::{benchmarks, impl_benchmark_test_suite, whitelisted_caller}; +use frame_benchmarking::{benchmarks, whitelisted_caller}; use frame_system::RawOrigin; use sp_std::{boxed::Box, vec}; @@ -25,6 +25,6 @@ benchmarks! { let call_hash = CallHash(Hashable::blake2_256(&call)); assert!(Votes::::contains_key(&epoch, &call_hash)); } -} -impl_benchmark_test_suite!(Pallet, crate::mock::new_test_ext(), crate::mock::Test,); + impl_benchmark_test_suite!(Pallet, crate::mock::new_test_ext(), crate::mock::Test,); +} diff --git a/state-chain/pallets/cf-witnesser/src/lib.rs b/state-chain/pallets/cf-witnesser/src/lib.rs index 2eef8b4286..2bc1d88fd8 100644 --- a/state-chain/pallets/cf-witnesser/src/lib.rs +++ b/state-chain/pallets/cf-witnesser/src/lib.rs @@ -50,7 +50,7 @@ pub mod pallet { /// The overarching call type. type Call: Member - + FullCodec + + Parameter + From> + UnfilteredDispatchable::Origin> + GetDispatchInfo; @@ -69,7 +69,7 @@ pub mod pallet { } /// A hash to index the call by. - #[derive(Clone, Copy, PartialEq, Eq, Encode, Decode)] + #[derive(Clone, Copy, PartialEq, Eq, Encode, Decode, TypeInfo, MaxEncodedLen)] pub struct CallHash(pub [u8; 32]); impl sp_std::fmt::Debug for CallHash { fn fmt(&self, f: &mut sp_std::fmt::Formatter) -> sp_std::fmt::Result { @@ -84,6 +84,7 @@ pub mod pallet { pub(super) type VoteCount = u32; #[pallet::pallet] + #[pallet::without_storage_info] pub struct Pallet(_); /// A lookup mapping (epoch, call_hash) to a bitmask representing the votes for each authority. @@ -100,7 +101,6 @@ pub mod pallet { impl Hooks> for Pallet {} #[pallet::event] - #[pallet::metadata(T::AccountId = "AccountId")] #[pallet::generate_deposit(pub(super) fn deposit_event)] pub enum Event { /// Some external event has been witnessed [call_sig, who, num_votes] @@ -194,7 +194,7 @@ pub mod pallet { pub type Origin = RawOrigin; /// The raw origin enum for this pallet. - #[derive(PartialEq, Eq, Clone, RuntimeDebug, Encode, Decode)] + #[derive(PartialEq, Eq, Clone, RuntimeDebug, Encode, Decode, TypeInfo)] pub enum RawOrigin { HistoricalActiveEpochWitnessThreshold, CurrentEpochWitnessThreshold, diff --git a/state-chain/runtime-benchmark-utilities/Cargo.toml b/state-chain/runtime-benchmark-utilities/Cargo.toml index 5f7f0a93d5..22e18efd38 100644 --- a/state-chain/runtime-benchmark-utilities/Cargo.toml +++ b/state-chain/runtime-benchmark-utilities/Cargo.toml @@ -10,7 +10,7 @@ description = "Utilities to help write benchmarks for the Chainflip runtime." [dependencies.sp-std] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [features] default = ['std'] diff --git a/state-chain/runtime-upgrade-utilities/Cargo.toml b/state-chain/runtime-upgrade-utilities/Cargo.toml index 8385a9ab95..35c5d4fc45 100644 --- a/state-chain/runtime-upgrade-utilities/Cargo.toml +++ b/state-chain/runtime-upgrade-utilities/Cargo.toml @@ -11,17 +11,17 @@ log = { version = '0.4.14', default-features = false } [dependencies.sp-std] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.frame-support] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dev-dependencies.sp-io] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [features] default = ['std'] diff --git a/state-chain/runtime-upgrade-utilities/src/lib.rs b/state-chain/runtime-upgrade-utilities/src/lib.rs index 69f23a2675..9f566cbae2 100644 --- a/state-chain/runtime-upgrade-utilities/src/lib.rs +++ b/state-chain/runtime-upgrade-utilities/src/lib.rs @@ -137,6 +137,14 @@ mod test_versioned_upgrade { fn name() -> &'static str { "Pallet" } + + fn module_name() -> &'static str { + "Module" + } + + fn crate_version() -> frame_support::traits::CrateVersion { + Default::default() + } } thread_local! { diff --git a/state-chain/runtime-utilities/Cargo.toml b/state-chain/runtime-utilities/Cargo.toml index 2eff3ebd47..a35b760648 100644 --- a/state-chain/runtime-utilities/Cargo.toml +++ b/state-chain/runtime-utilities/Cargo.toml @@ -13,28 +13,28 @@ cf-runtime-macros = { path = "./macros", optional = true, default-features = fal default-features = false features = ['derive'] package = 'parity-scale-codec' -version = '2.3.1' +version = '3.0.0' [dependencies.sp-std] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' # Not used in this crate but required in order to import sp-io without conflicts. [dependencies.sp-runtime] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.sp-io] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.frame-support] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [features] default = ['std'] diff --git a/state-chain/runtime/Cargo.toml b/state-chain/runtime/Cargo.toml index 7ed272fb56..8cacbdc366 100644 --- a/state-chain/runtime/Cargo.toml +++ b/state-chain/runtime/Cargo.toml @@ -13,7 +13,7 @@ targets = ['x86_64-unknown-linux-gnu'] [build-dependencies.substrate-wasm-builder] git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies] # Required to get wasm to compile. @@ -43,152 +43,152 @@ pallet-cf-threshold-signature = { path = "../pallets/cf-threshold-signature", de pallet-cf-broadcast = { path = "../pallets/cf-broadcast", default-features = false } pallet-cf-environment = { path = "../pallets/cf-environment", default-features = false } +# SCALE +codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } +scale-info = { version = "2.0.1", default-features = false, features = ["derive"] } + # Additional FRAME pallets [dependencies.pallet-authorship] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.pallet-session] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' features = ['historical'] # Substrate dependencies -[dependencies.codec] -default-features = false -features = ['derive'] -package = 'parity-scale-codec' -version = '2.3.1' - [dependencies.frame-benchmarking] default-features = false git = 'https://github.com/chainflip-io/substrate.git' optional = true -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.frame-executive] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.frame-support] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.frame-system] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.frame-system-benchmarking] default-features = false git = 'https://github.com/chainflip-io/substrate.git' optional = true -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' -[dependencies.frame-system-rpc-runtime-api] -default-features = false -git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' [dependencies.hex-literal] optional = true -version = '0.3.1' +version = '0.3.4' [dependencies.pallet-aura] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.pallet-grandpa] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.pallet-randomness-collective-flip] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.pallet-timestamp] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.pallet-transaction-payment] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' - -[dependencies.scale-info] -default-features = false -features = ['derive'] -version = '1.0' +tag = 'chainflip-monthly-2022-05' [dependencies.sp-api] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.sp-block-builder] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.sp-consensus-aura] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' version = '0.10.0-dev' [dependencies.sp-core] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.sp-inherents] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.sp-offchain] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.sp-runtime] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.sp-session] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.sp-std] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.sp-transaction-pool] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.sp-version] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.frame-try-runtime] optional = true -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' +default-features = false +git = 'https://github.com/chainflip-io/substrate.git' + +# Used for RPCs +[dependencies.frame-system-rpc-runtime-api] +default-features = false +git = 'https://github.com/chainflip-io/substrate.git' +tag = 'chainflip-monthly-2022-05' + +[dependencies.pallet-transaction-payment-rpc-runtime-api] default-features = false git = 'https://github.com/chainflip-io/substrate.git' +tag = 'chainflip-monthly-2022-05' [features] default = ['std'] @@ -197,7 +197,7 @@ runtime-benchmarks = [ 'cf-chains/runtime-benchmarks', 'cf-runtime-benchmark-utilities/runtime-benchmarks', 'hex-literal', - 'frame-benchmarking', + 'frame-benchmarking/runtime-benchmarks', 'frame-support/runtime-benchmarks', 'frame-system-benchmarking', 'frame-system/runtime-benchmarks', @@ -267,6 +267,10 @@ try-runtime = [ "frame-executive/try-runtime", "frame-try-runtime", "frame-system/try-runtime", + "pallet-aura/try-runtime", + "pallet-grandpa/try-runtime", + "pallet-timestamp/try-runtime", + "pallet-transaction-payment/try-runtime", "pallet-cf-auction/try-runtime", "pallet-cf-validator/try-runtime", "pallet-cf-vaults/try-runtime", diff --git a/state-chain/runtime/src/chainflip.rs b/state-chain/runtime/src/chainflip.rs index d06fa00fd0..24fdd95992 100644 --- a/state-chain/runtime/src/chainflip.rs +++ b/state-chain/runtime/src/chainflip.rs @@ -11,7 +11,7 @@ pub use signer_nomination::RandomSignerNomination; use crate::{ AccountId, Auction, Authorship, BlockNumber, Call, EmergencyRotationPercentageRange, Emissions, - Environment, Flip, FlipBalance, HeartbeatBlockInterval, Reputation, Runtime, System, Validator, + Environment, Flip, FlipBalance, Reputation, Runtime, System, Validator, }; use cf_chains::{ eth::{ @@ -22,23 +22,21 @@ use cf_chains::{ }; use cf_traits::{ BackupNodes, Chainflip, EmergencyRotation, EpochInfo, Heartbeat, Issuance, NetworkState, - ReplayProtectionProvider, RewardsDistribution, StakeHandler, StakeTransfer, + ReplayProtectionProvider, RewardsDistribution, RuntimeUpgrade, StakeHandler, StakeTransfer, +}; +use frame_support::{ + dispatch::DispatchErrorWithPostInfo, + traits::Get, + weights::{PostDispatchInfo, Weight}, }; -use frame_support::weights::Weight; - -use frame_support::{dispatch::DispatchErrorWithPostInfo, weights::PostDispatchInfo}; - use pallet_cf_auction::HandleStakes; - use pallet_cf_validator::PercentageRange; use sp_runtime::{ helpers_128bit::multiply_by_rational, - traits::{AtLeast32BitUnsigned, UniqueSaturatedFrom}, + traits::{AtLeast32BitUnsigned, UniqueSaturatedFrom, UniqueSaturatedInto}, }; use sp_std::{cmp::min, prelude::*}; -use cf_traits::RuntimeUpgrade; - impl Chainflip for Runtime { type Call = Call; type Amount = FlipBalance; @@ -90,19 +88,22 @@ impl RewardDistribution for BackupNodeEmissions { } // The current minimum active bid let minimum_active_bid = Self::EpochInfo::bond(); + let heartbeat_block_interval: FlipBalance = + <::HeartbeatBlockInterval as Get< + BlockNumber, + >>::get() + .unique_saturated_into(); // Our emission cap for this heartbeat interval - let emissions_cap = Emissions::backup_node_emission_per_block() * - Self::FlipBalance::unique_saturated_from(HeartbeatBlockInterval::get()); + let emissions_cap = + Emissions::backup_node_emission_per_block().saturating_mul(heartbeat_block_interval); // Emissions for this heartbeat interval for the active set - let authority_rewards = Emissions::current_authority_emission_per_block() * - Self::FlipBalance::unique_saturated_from(HeartbeatBlockInterval::get()); + let authority_rewards = Emissions::current_authority_emission_per_block() + .saturating_mul(heartbeat_block_interval); // The average authority emission let average_authority_reward: Self::FlipBalance = authority_rewards / - Self::FlipBalance::unique_saturated_from( - Self::EpochInfo::current_authorities().len(), - ); + Self::FlipBalance::unique_saturated_from(Self::EpochInfo::current_authority_count()); let mut total_rewards = 0; @@ -219,8 +220,11 @@ impl RewardsDistribution for BlockAuthorRewardDistribution { type Surplus = Surplus; fn distribute(rewards: Self::Surplus) { - let current_block_author = Authorship::author(); - Flip::settle_imbalance(¤t_block_author, rewards); + if let Some(current_block_author) = Authorship::author() { + Flip::settle_imbalance(¤t_block_author, rewards); + } else { + log::warn!("No block author! Block reward not credited.") + } } } pub struct RuntimeUpgradeManager; diff --git a/state-chain/runtime/src/chainflip/missed_authorship_slots.rs b/state-chain/runtime/src/chainflip/missed_authorship_slots.rs index 13f3941b96..4b7a46a2fe 100644 --- a/state-chain/runtime/src/chainflip/missed_authorship_slots.rs +++ b/state-chain/runtime/src/chainflip/missed_authorship_slots.rs @@ -13,7 +13,7 @@ impl AuraSlotExtraction { Aura::current_slot() + 1 } - fn extract_slot_from_digest_item(item: &DigestItem) -> Option { + fn extract_slot_from_digest_item(item: &DigestItem) -> Option { item.as_pre_runtime().and_then(|(id, mut data)| { if id == AURA_ENGINE_ID { AuraSlot::decode(&mut data).ok() @@ -137,21 +137,21 @@ mod test_missed_authorship_slots { let slot = AuraSlot::from(42); assert_eq!( Some(slot), - AuraSlotExtraction::extract_slot_from_digest_item::<()>(&DigestItem::PreRuntime( + AuraSlotExtraction::extract_slot_from_digest_item(&DigestItem::PreRuntime( AURA_ENGINE_ID, Encode::encode(&slot) )) ); assert_eq!( None, - AuraSlotExtraction::extract_slot_from_digest_item::<()>(&DigestItem::PreRuntime( + AuraSlotExtraction::extract_slot_from_digest_item(&DigestItem::PreRuntime( *b"BORA", Encode::encode(&slot) )) ); assert_eq!( None, - AuraSlotExtraction::extract_slot_from_digest_item::<()>(&DigestItem::Other( + AuraSlotExtraction::extract_slot_from_digest_item(&DigestItem::Other( b"SomethingElse".to_vec() )) ); @@ -163,12 +163,7 @@ mod test_missed_authorship_slots { Digest { logs: vec![DigestItem::PreRuntime(AURA_ENGINE_ID, author_slot.encode())] }; System::reset_events(); - System::initialize( - &block_number, - &System::parent_hash(), - &pre_digest, - frame_system::InitKind::Full, - ); + System::initialize(&block_number, &System::parent_hash(), &pre_digest); } #[test] diff --git a/state-chain/runtime/src/chainflip/offences.rs b/state-chain/runtime/src/chainflip/offences.rs index a4f10e0193..8c3b0dd7db 100644 --- a/state-chain/runtime/src/chainflip/offences.rs +++ b/state-chain/runtime/src/chainflip/offences.rs @@ -1,12 +1,13 @@ -use codec::{Decode, Encode}; +use codec::{Decode, Encode, MaxEncodedLen}; use frame_support::RuntimeDebug; use pallet_cf_reputation::{GetValidatorsExcludedFor, OffenceList}; +use scale_info::TypeInfo; use crate::Runtime; /// Offences that can be reported in this runtime. #[cfg_attr(feature = "std", derive(serde::Serialize, serde::Deserialize))] -#[derive(Clone, Copy, PartialEq, Eq, RuntimeDebug, Encode, Decode)] +#[derive(Clone, Copy, PartialEq, Eq, RuntimeDebug, Encode, Decode, TypeInfo, MaxEncodedLen)] pub enum Offence { /// There was a failure in participation during a signing ParticipateSigningFailed, diff --git a/state-chain/runtime/src/lib.rs b/state-chain/runtime/src/lib.rs index df5f0a01b8..5ec02817b3 100644 --- a/state-chain/runtime/src/lib.rs +++ b/state-chain/runtime/src/lib.rs @@ -5,15 +5,20 @@ pub mod chainflip; pub mod constants; mod migrations; pub mod runtime_apis; +pub use frame_system::Call as SystemCall; #[cfg(test)] mod tests; use cf_chains::{eth, Ethereum}; pub use frame_support::{ - construct_runtime, debug, parameter_types, - traits::{KeyOwnerProofSystem, Randomness, StorageInfo}, + construct_runtime, debug, + instances::Instance1, + parameter_types, + traits::{ + ConstU128, ConstU32, ConstU64, ConstU8, KeyOwnerProofSystem, Randomness, StorageInfo, + }, weights::{ constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight, WEIGHT_PER_SECOND}, - IdentityFee, Weight, + ConstantMultiplier, IdentityFee, Weight, }, StorageValue, }; @@ -54,8 +59,9 @@ use chainflip::{ KeygenOffences, }; use constants::common::*; -use pallet_cf_broadcast::AttemptCount; use pallet_cf_flip::{Bonder, FlipSlasher}; +use pallet_cf_validator::PercentageRange; +pub use pallet_transaction_payment::ChargeTransactionPayment; // Make the WASM binary available. #[cfg(feature = "std")] @@ -101,7 +107,7 @@ pub mod opaque { } } // To learn more about runtime versioning and what each of the following value means: -// https://substrate.dev/docs/en/knowledgebase/runtime/upgrades#runtime-versioning +// https://docs.substrate.io/v3/runtime/upgrades#runtime-versioning #[sp_version::runtime_version] pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("chainflip-node"), @@ -111,6 +117,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { impl_version: 1, apis: RUNTIME_API_VERSIONS, transaction_version: 2, + state_version: 1, }; /// The version information used to identify this runtime when compiled natively. @@ -213,7 +220,6 @@ impl pallet_session::Config for Runtime { type NextSessionRotation = Validator; type ValidatorId = ::AccountId; type ValidatorIdOf = pallet_cf_validator::ValidatorOf; - type DisabledValidatorsThreshold = (); type WeightInfo = pallet_session::weights::SubstrateWeight; } @@ -287,6 +293,7 @@ impl frame_system::Config for Runtime { type SS58Prefix = SS58Prefix; /// The set code logic, just the default since we're not a parachain. type OnSetCode = (); + type MaxConsumers = ConstU32<16>; } impl pallet_randomness_collective_flip::Config for Runtime {} @@ -299,62 +306,45 @@ impl frame_system::offchain::SigningTypes for Runtime { impl pallet_aura::Config for Runtime { type AuthorityId = AuraId; type DisabledValidators = (); + type MaxAuthorities = ConstU32; } impl pallet_grandpa::Config for Runtime { type Event = Event; type Call = Call; - type KeyOwnerProofSystem = Historical; - type KeyOwnerProof = >::Proof; - type KeyOwnerIdentification = >::IdentificationTuple; - type HandleEquivocation = (); - type WeightInfo = (); -} - -parameter_types! { - pub const MinimumPeriod: u64 = SLOT_DURATION / 2; + type MaxAuthorities = ConstU32; } impl pallet_timestamp::Config for Runtime { /// A timestamp: milliseconds since the unix epoch. type Moment = u64; type OnTimestampSet = Aura; - type MinimumPeriod = MinimumPeriod; + type MinimumPeriod = ConstU64<{ SLOT_DURATION / 2 }>; type WeightInfo = (); } -parameter_types! { - /// The number of blocks back we should accept uncles - pub const UncleGenerations: BlockNumber = 5; -} - impl pallet_authorship::Config for Runtime { type FindAuthor = pallet_session::FindAccountFromAuthorIndex; - type UncleGenerations = UncleGenerations; + type UncleGenerations = ConstU32<5>; type FilterUncle = (); type EventHandler = (); } -parameter_types! { - pub const ExistentialDeposit: u128 = 500; - pub const BlocksPerDay: u32 = DAYS; -} - impl pallet_cf_flip::Config for Runtime { type Event = Event; type Balance = FlipBalance; - type ExistentialDeposit = ExistentialDeposit; + type ExistentialDeposit = ConstU128<500>; type EnsureGovernance = pallet_cf_governance::EnsureGovernance; - type BlocksPerDay = BlocksPerDay; + type BlocksPerDay = ConstU32; type StakeHandler = ChainflipStakeHandler; type WeightInfo = pallet_cf_flip::weights::PalletWeight; type WaivedFees = chainflip::WaivedFees; @@ -407,25 +397,21 @@ impl pallet_cf_emissions::Config for Runtime { type Surplus = pallet_cf_flip::Surplus; type Issuance = pallet_cf_flip::FlipIssuance; type RewardsDistribution = chainflip::BlockAuthorRewardDistribution; - type BlocksPerDay = BlocksPerDay; + type BlocksPerDay = ConstU32; type ReplayProtectionProvider = chainflip::EthReplayProtectionProvider; type EthEnvironmentProvider = Environment; type WeightInfo = pallet_cf_emissions::weights::PalletWeight; } -parameter_types! { - pub const TransactionByteFee: FlipBalance = 1_000_000; -} - impl pallet_transaction_payment::Config for Runtime { type OnChargeTransaction = pallet_cf_flip::FlipTransactionPayment; - type TransactionByteFee = TransactionByteFee; + type OperationalFeeMultiplier = ConstU8<5>; type WeightToFee = IdentityFee; + type LengthToFee = ConstantMultiplier>; type FeeMultiplierUpdate = (); } parameter_types! { - pub const HeartbeatBlockInterval: BlockNumber = HEARTBEAT_BLOCK_INTERVAL; pub const ReputationPointFloorAndCeiling: (i32, i32) = (-2880, 2880); pub const MaximumReputationPointAccrued: pallet_cf_reputation::ReputationPoints = 15; } @@ -433,7 +419,7 @@ parameter_types! { impl pallet_cf_reputation::Config for Runtime { type Event = Event; type Offence = chainflip::Offence; - type HeartbeatBlockInterval = HeartbeatBlockInterval; + type HeartbeatBlockInterval = ConstU32; type ReputationPointFloorAndCeiling = ReputationPointFloorAndCeiling; type Slasher = FlipSlasher; type WeightInfo = pallet_cf_reputation::weights::PalletWeight; @@ -442,19 +428,11 @@ impl pallet_cf_reputation::Config for Runtime { } impl pallet_cf_online::Config for Runtime { - type HeartbeatBlockInterval = HeartbeatBlockInterval; + type HeartbeatBlockInterval = ConstU32; type Heartbeat = ChainflipHeartbeat; type WeightInfo = pallet_cf_online::weights::PalletWeight; } -use frame_support::instances::Instance1; -use pallet_cf_validator::PercentageRange; - -parameter_types! { - pub const ThresholdFailureTimeout: BlockNumber = constants::common::THRESHOLD_SIGNATURE_CEREMONY_TIMEOUT_BLOCKS; - pub const CeremonyRetryDelay: BlockNumber = 1; -} - impl pallet_cf_threshold_signature::Config for Runtime { type Event = Event; type Offence = chainflip::Offence; @@ -465,17 +443,11 @@ impl pallet_cf_threshold_signature::Config for Runtime { type KeyProvider = EthereumVault; type OffenceReporter = Reputation; type CeremonyIdProvider = pallet_cf_validator::CeremonyIdProvider; - type ThresholdFailureTimeout = ThresholdFailureTimeout; - type CeremonyRetryDelay = CeremonyRetryDelay; + type ThresholdFailureTimeout = ConstU32; + type CeremonyRetryDelay = ConstU32<1>; type Weights = pallet_cf_threshold_signature::weights::PalletWeight; } -parameter_types! { - pub const EthereumSigningTimeout: BlockNumber = 5; - pub const EthereumTransmissionTimeout: BlockNumber = 10 * MINUTES; - pub const MaximumAttempts: AttemptCount = MAXIMUM_BROADCAST_ATTEMPTS; -} - impl pallet_cf_broadcast::Config for Runtime { type Event = Event; type Call = Call; @@ -488,9 +460,9 @@ impl pallet_cf_broadcast::Config for Runtime { type OffenceReporter = Reputation; type EnsureThresholdSigned = pallet_cf_threshold_signature::EnsureThresholdSigned; - type SigningTimeout = EthereumSigningTimeout; - type TransmissionTimeout = EthereumTransmissionTimeout; - type MaximumAttempts = MaximumAttempts; + type SigningTimeout = ConstU32<5>; + type TransmissionTimeout = ConstU32<{ 10 * MINUTES }>; + type MaximumAttempts = ConstU32; type WeightInfo = pallet_cf_broadcast::weights::PalletWeight; } @@ -500,28 +472,28 @@ construct_runtime!( NodeBlock = opaque::Block, UncheckedExtrinsic = UncheckedExtrinsic { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - RandomnessCollectiveFlip: pallet_randomness_collective_flip::{Pallet, Storage}, - Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent}, - Environment: pallet_cf_environment::{Pallet, Call, Storage, Event, Config}, - Flip: pallet_cf_flip::{Pallet, Call, Event, Storage, Config}, - Emissions: pallet_cf_emissions::{Pallet, Event, Storage, Config}, - Staking: pallet_cf_staking::{Pallet, Call, Storage, Event, Config}, - TransactionPayment: pallet_transaction_payment::{Pallet, Storage}, - Session: pallet_session::{Pallet, Storage, Event, Config}, + System: frame_system, + RandomnessCollectiveFlip: pallet_randomness_collective_flip, + Timestamp: pallet_timestamp, + Environment: pallet_cf_environment, + Flip: pallet_cf_flip, + Emissions: pallet_cf_emissions, + Staking: pallet_cf_staking, + TransactionPayment: pallet_transaction_payment, + Session: pallet_session, Historical: session_historical::{Pallet}, - Witnesser: pallet_cf_witnesser::{Pallet, Call, Storage, Event, Origin}, - Auction: pallet_cf_auction::{Pallet, Call, Storage, Event, Config}, - Validator: pallet_cf_validator::{Pallet, Call, Storage, Event, Config}, - Aura: pallet_aura::{Pallet, Config}, - Authorship: pallet_authorship::{Pallet, Call, Storage, Inherent}, - Grandpa: pallet_grandpa::{Pallet, Call, Storage, Config, Event}, - Governance: pallet_cf_governance::{Pallet, Call, Storage, Event, Config, Origin}, - EthereumVault: pallet_cf_vaults::::{Pallet, Call, Storage, Event, Config}, - Online: pallet_cf_online::{Pallet, Call, Storage}, - Reputation: pallet_cf_reputation::{Pallet, Call, Storage, Event, Config}, - EthereumThresholdSigner: pallet_cf_threshold_signature::::{Pallet, Call, Storage, Event, Origin, ValidateUnsigned}, - EthereumBroadcaster: pallet_cf_broadcast::::{Pallet, Call, Storage, Event}, + Witnesser: pallet_cf_witnesser, + Auction: pallet_cf_auction, + Validator: pallet_cf_validator, + Aura: pallet_aura, + Authorship: pallet_authorship, + Grandpa: pallet_grandpa, + Governance: pallet_cf_governance, + EthereumVault: pallet_cf_vaults::, + Online: pallet_cf_online, + Reputation: pallet_cf_reputation, + EthereumThresholdSigner: pallet_cf_threshold_signature::, + EthereumBroadcaster: pallet_cf_broadcast::, } ); @@ -535,6 +507,7 @@ pub type Block = generic::Block; pub type SignedBlock = generic::SignedBlock; /// The SignedExtension to the basic transaction logic. pub type SignedExtra = ( + frame_system::CheckNonZeroSender, frame_system::CheckSpecVersion, frame_system::CheckTxVersion, frame_system::CheckGenesis, @@ -545,6 +518,8 @@ pub type SignedExtra = ( ); /// Unchecked extrinsic type as expected by this runtime. pub type UncheckedExtrinsic = generic::UncheckedExtrinsic; +/// The payload being signed in transactions. +pub type SignedPayload = generic::SignedPayload; /// Extrinsic type that has already been checked. pub type CheckedExtrinsic = generic::CheckedExtrinsic; /// Executive: handles dispatch to the various modules. @@ -553,7 +528,7 @@ pub type Executive = frame_executive::Executive< Block, frame_system::ChainContext, Runtime, - AllPallets, + AllPalletsWithSystem, // Note: the following run *before* all pallet migrations. migrations::VersionedMigration< ( @@ -593,7 +568,7 @@ impl_runtime_apis! { impl sp_api::Metadata for Runtime { fn metadata() -> OpaqueMetadata { - Runtime::metadata().into() + OpaqueMetadata::new(Runtime::metadata().into()) } } @@ -640,7 +615,7 @@ impl_runtime_apis! { } fn authorities() -> Vec { - Aura::authorities() + Aura::authorities().into_inner() } } @@ -698,6 +673,21 @@ impl_runtime_apis! { } } + impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi for Runtime { + fn query_info( + uxt: ::Extrinsic, + len: u32, + ) -> pallet_transaction_payment_rpc_runtime_api::RuntimeDispatchInfo { + TransactionPayment::query_info(uxt, len) + } + fn query_fee_details( + uxt: ::Extrinsic, + len: u32, + ) -> pallet_transaction_payment::FeeDetails { + TransactionPayment::query_fee_details(uxt, len) + } + } + #[cfg(feature = "try-runtime")] impl frame_try_runtime::TryRuntime for Runtime { fn on_runtime_upgrade() -> Result<(Weight, Weight), sp_runtime::RuntimeString> { diff --git a/state-chain/runtime/src/migrations/delete_rewards.rs b/state-chain/runtime/src/migrations/delete_rewards.rs index 108f218597..3aab91d398 100644 --- a/state-chain/runtime/src/migrations/delete_rewards.rs +++ b/state-chain/runtime/src/migrations/delete_rewards.rs @@ -14,7 +14,7 @@ pub struct DeleteRewardsPallet; const VALIDATOR_REWARDS: ReserveId = *b"VALR"; generate_storage_alias!( - Rewards, RewardsEntitlement => Map<(ReserveId, Twox64Concat), FlipBalance> + Rewards, RewardsEntitlement => Map<(Twox64Concat, ReserveId), FlipBalance> ); impl OnRuntimeUpgrade for DeleteRewardsPallet { diff --git a/state-chain/runtime/src/migrations/refactor_offences.rs b/state-chain/runtime/src/migrations/refactor_offences.rs index a7c3bb9fc2..1182e8cd12 100644 --- a/state-chain/runtime/src/migrations/refactor_offences.rs +++ b/state-chain/runtime/src/migrations/refactor_offences.rs @@ -17,7 +17,7 @@ struct Liveness { } frame_support::generate_storage_alias!( - Online, Nodes => Map<(::ValidatorId, Blake2_128Concat), Liveness> + Online, Nodes => Map<(Blake2_128Concat, ::ValidatorId), Liveness> ); impl OnRuntimeUpgrade for Migration { diff --git a/state-chain/test-utilities/Cargo.toml b/state-chain/test-utilities/Cargo.toml index d2fd311274..917426d24c 100644 --- a/state-chain/test-utilities/Cargo.toml +++ b/state-chain/test-utilities/Cargo.toml @@ -7,7 +7,7 @@ description = "Chainflip test utilities used in multiple crates" [dependencies.frame-system] git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [features] default = ['std'] diff --git a/state-chain/traits/Cargo.toml b/state-chain/traits/Cargo.toml index 7f107314ac..b9abb7c1b0 100644 --- a/state-chain/traits/Cargo.toml +++ b/state-chain/traits/Cargo.toml @@ -16,46 +16,46 @@ cf-chains = { path ='../chains', default-features = false } default-features = false features = ['derive'] package = 'parity-scale-codec' -version = '2.3.1' +version = '3.0.0' [dependencies.scale-info] default-features = false features = ['derive'] -version = '1.0' +version = '2.0.1' [dependencies.frame-system] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.frame-support] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.sp-runtime] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.sp-std] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dependencies.frame-benchmarking] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' optional = true [dev-dependencies.sp-core] git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [dev-dependencies.sp-io] git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2021-09+1' +tag = 'chainflip-monthly-2022-05' [features] default = ['std'] diff --git a/state-chain/traits/src/async_result.rs b/state-chain/traits/src/async_result.rs index 55a051d533..98c851344d 100644 --- a/state-chain/traits/src/async_result.rs +++ b/state-chain/traits/src/async_result.rs @@ -1,8 +1,9 @@ use codec::{Decode, Encode}; use frame_support::RuntimeDebug; +use scale_info::TypeInfo; /// A result type for asynchronous operations. -#[derive(Clone, Copy, RuntimeDebug, Encode, Decode, PartialEq, Eq)] +#[derive(Clone, Copy, RuntimeDebug, Encode, Decode, TypeInfo, PartialEq, Eq)] pub enum AsyncResult { /// Result is ready. Ready(R), diff --git a/state-chain/traits/src/lib.rs b/state-chain/traits/src/lib.rs index ca8b3c79b5..c8a9d0de5c 100644 --- a/state-chain/traits/src/lib.rs +++ b/state-chain/traits/src/lib.rs @@ -7,7 +7,7 @@ pub mod offence_reporting; pub use async_result::AsyncResult; use cf_chains::{ApiCall, ChainAbi, ChainCrypto}; -use codec::{Decode, Encode}; +use codec::{Decode, Encode, MaxEncodedLen}; use frame_support::{ dispatch::{DispatchResultWithPostInfo, UnfilteredDispatchable}, pallet_prelude::Member, @@ -15,6 +15,7 @@ use frame_support::{ traits::{EnsureOrigin, Get, Imbalance, StoredMap}, Hashable, Parameter, }; +use scale_info::TypeInfo; use sp_runtime::{traits::MaybeSerializeDeserialize, DispatchError, DispatchResult, RuntimeDebug}; use sp_std::{marker::PhantomData, prelude::*}; /// An index to a block. @@ -30,6 +31,7 @@ pub trait Chainflip: frame_system::Config { /// An amount for a bid type Amount: Member + Parameter + + MaxEncodedLen + Default + Eq + Ord @@ -39,8 +41,8 @@ pub trait Chainflip: frame_system::Config { /// An identity for a node type ValidatorId: Member - + Default + Parameter + + MaxEncodedLen + Ord + core::fmt::Debug + From<::AccountId> @@ -142,7 +144,7 @@ pub type Bid = (ValidatorId, Amount); pub type RemainingBid = Bid; /// A successful auction result -#[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug, Default)] +#[derive(PartialEq, Eq, Clone, Encode, Decode, TypeInfo, RuntimeDebug, Default)] pub struct AuctionResult { pub winners: Vec, pub minimum_active_bid: Amount, @@ -176,7 +178,7 @@ pub trait BackupNodes { fn backup_nodes() -> Vec; } -#[derive(Copy, Clone, Debug, PartialEq, Eq, Encode, Decode)] +#[derive(Copy, Clone, Debug, PartialEq, Eq, Encode, Decode, TypeInfo)] pub enum SuccessOrFailure { Success, Failure, @@ -313,15 +315,15 @@ pub trait IsOnline { /// A representation of the current network state for this heartbeat interval. /// A node is regarded online if we have received a heartbeat during the last heartbeat interval /// otherwise they are considered offline. -#[derive(Encode, Decode, Clone, RuntimeDebug, PartialEq, Eq, Default)] -pub struct NetworkState { +#[derive(Encode, Decode, TypeInfo, Clone, RuntimeDebug, PartialEq, Eq, Default)] +pub struct NetworkState { /// Those nodes that are considered offline pub offline: Vec, /// Online nodes pub online: Vec, } -impl NetworkState { +impl NetworkState { /// Returns the total number of nodes in the network. pub fn number_of_nodes(&self) -> u32 { (self.online.len() + self.offline.len()) as u32 @@ -348,13 +350,13 @@ pub trait EmergencyRotation { fn emergency_rotation_completed(); } -#[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug, Copy)] +#[derive(PartialEq, Eq, Clone, Encode, Decode, TypeInfo, RuntimeDebug, Copy)] pub enum BackupOrPassive { Backup, Passive, } -#[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug, Copy)] +#[derive(PartialEq, Eq, Clone, Encode, Decode, TypeInfo, RuntimeDebug, Copy)] pub enum ChainflipAccountState { CurrentAuthority, HistoricalAuthority(BackupOrPassive), @@ -362,7 +364,7 @@ pub enum ChainflipAccountState { } // TODO: Just use the AccountState -#[derive(PartialEq, Eq, Clone, Copy, Encode, Decode, RuntimeDebug)] +#[derive(PartialEq, Eq, Clone, Copy, Encode, Decode, TypeInfo, RuntimeDebug)] pub struct ChainflipAccountData { pub state: ChainflipAccountState, } @@ -544,7 +546,7 @@ pub trait Broadcaster { /// The heartbeat of the network pub trait Heartbeat { - type ValidatorId: Default; + type ValidatorId; type BlockNumber; /// A heartbeat has been submitted fn heartbeat_submitted(validator_id: &Self::ValidatorId, block_number: Self::BlockNumber); diff --git a/state-chain/traits/src/mocks/ceremony_id_provider.rs b/state-chain/traits/src/mocks/ceremony_id_provider.rs index fe44836042..aabf7ae6f1 100644 --- a/state-chain/traits/src/mocks/ceremony_id_provider.rs +++ b/state-chain/traits/src/mocks/ceremony_id_provider.rs @@ -1,4 +1,5 @@ use codec::{Decode, Encode}; +use scale_info::TypeInfo; use sp_runtime::traits::One; use sp_std::{marker::PhantomData, ops::AddAssign}; @@ -6,7 +7,7 @@ use frame_support::{storage, StorageHasher, Twox64Concat}; use crate::CeremonyIdProvider; -#[derive(Copy, Clone, Debug, Default, PartialEq, Eq, Encode, Decode)] +#[derive(Copy, Clone, Debug, Default, PartialEq, Eq, Encode, Decode, TypeInfo)] pub struct ConstCeremonyIdProvider(); impl CeremonyIdProvider for ConstCeremonyIdProvider { @@ -17,7 +18,7 @@ impl CeremonyIdProvider for ConstCeremonyIdProvider { } } -#[derive(Copy, Clone, Debug, Default, PartialEq, Eq, Encode, Decode)] +#[derive(Copy, Clone, Debug, Default, PartialEq, Eq, Encode, Decode, TypeInfo)] pub struct MockCeremonyIdProvider(PhantomData); impl MockCeremonyIdProvider { diff --git a/state-chain/traits/src/mocks/keygen_exclusion.rs b/state-chain/traits/src/mocks/keygen_exclusion.rs index bf4304ed1e..12ff974734 100644 --- a/state-chain/traits/src/mocks/keygen_exclusion.rs +++ b/state-chain/traits/src/mocks/keygen_exclusion.rs @@ -17,6 +17,6 @@ impl MockKeygenExclusion { impl Get> for MockKeygenExclusion { fn get() -> BTreeSet { - KeygenExclusion::::get() + KeygenExclusion::::get().unwrap_or_default() } } diff --git a/state-chain/traits/src/mocks/offence_reporting.rs b/state-chain/traits/src/mocks/offence_reporting.rs index e6e6a7beeb..6dd5ba63bb 100644 --- a/state-chain/traits/src/mocks/offence_reporting.rs +++ b/state-chain/traits/src/mocks/offence_reporting.rs @@ -58,9 +58,11 @@ where #[cfg(test)] mod test { + use scale_info::TypeInfo; + use super::*; - #[derive(Copy, Clone, Debug, PartialEq, Eq, Encode, Decode)] + #[derive(Copy, Clone, Debug, PartialEq, Eq, Encode, Decode, TypeInfo)] enum MockOffence { BeingNaughty, BeingSuperNaughty, From 83b28a25a53a115391e71f5cc71450a50486486c Mon Sep 17 00:00:00 2001 From: Daniel Date: Mon, 9 May 2022 14:19:49 +0200 Subject: [PATCH 02/33] feat: merge monthly-2022-05 changes into Cfe --- Cargo.lock | 409 ++++++++--------------- engine/Cargo.toml | 8 +- engine/cli/Cargo.toml | 2 +- engine/cli/src/main.rs | 14 +- engine/src/eth/key_manager.rs | 46 +-- engine/src/eth/mod.rs | 8 +- engine/src/eth/stake_manager.rs | 32 +- engine/src/main.rs | 12 +- engine/src/multisig/client/common/mod.rs | 7 +- engine/src/multisig_p2p.rs | 2 +- engine/src/state_chain/client.rs | 1 + engine/src/state_chain/sc_observer.rs | 32 +- state-chain/chains/Cargo.toml | 2 +- state-chain/pallets/cf-vaults/Cargo.toml | 1 - 14 files changed, 231 insertions(+), 345 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index bc509d7d7c..d2f73f0f35 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -765,16 +765,16 @@ name = "cf-chains" version = "0.1.0" dependencies = [ "cf-runtime-benchmark-utilities", - "ethabi 17.0.0", + "ethabi", "ethereum", - "ethereum-types 0.13.1", + "ethereum-types", "frame-support", "frame-system", "hex", "hex-literal", "libsecp256k1", "log 0.4.17", - "parity-scale-codec 3.1.2", + "parity-scale-codec", "rand 0.8.5", "rlp", "scale-info", @@ -782,7 +782,7 @@ dependencies = [ "serde 1.0.137", "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "web3 0.18.0", + "web3", ] [[package]] @@ -820,7 +820,7 @@ dependencies = [ "pallet-session", "pallet-timestamp", "pallet-transaction-payment", - "parity-scale-codec 3.1.2", + "parity-scale-codec", "rand 0.8.5", "scale-info", "sp-block-builder", @@ -869,7 +869,7 @@ dependencies = [ "cf-runtime-macros", "frame-support", "log 0.4.17", - "parity-scale-codec 3.1.2", + "parity-scale-codec", "sp-io 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", @@ -891,7 +891,7 @@ dependencies = [ "frame-support", "frame-system", "log 0.4.17", - "parity-scale-codec 3.1.2", + "parity-scale-codec", "scale-info", "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "sp-io 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", @@ -960,7 +960,7 @@ dependencies = [ "structopt", "tokio", "utilities", - "web3 0.17.0", + "web3", ] [[package]] @@ -982,7 +982,7 @@ dependencies = [ "custom-rpc", "dyn-clone", "env_logger", - "ethbloom 0.11.1", + "ethbloom", "frame-support", "frame-system", "fs_extra", @@ -1018,8 +1018,8 @@ dependencies = [ "pallet-cf-validator", "pallet-cf-vaults", "pallet-cf-witnesser", - "parity-scale-codec 3.1.2", - "parking_lot 0.11.2", + "parity-scale-codec", + "parking_lot 0.12.0", "public-ip", "rand 0.6.5", "rand 0.8.5", @@ -1028,6 +1028,7 @@ dependencies = [ "rocksdb", "sc-rpc-api", "secp256k1 0.20.3", + "secp256k1 0.21.3", "serde 1.0.137", "serde_json", "sha2 0.9.9", @@ -1048,7 +1049,7 @@ dependencies = [ "tokio-stream", "url 1.7.2", "utilities", - "web3 0.17.0", + "web3", "websocket", "zeroize", ] @@ -2137,44 +2138,13 @@ dependencies = [ "libc", ] -[[package]] -name = "ethabi" -version = "15.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f76ef192b63e8a44b3d08832acebbb984c3fba154b5c26f70037c860202a0d4b" -dependencies = [ - "anyhow", - "ethereum-types 0.12.1", - "hex", - "serde 1.0.137", - "serde_json", - "sha3 0.9.1", - "thiserror", - "uint", -] - -[[package]] -name = "ethabi" -version = "16.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4c98847055d934070b90e806e12d3936b787d0a115068981c1d8dfd5dfef5a5" -dependencies = [ - "ethereum-types 0.12.1", - "hex", - "serde 1.0.137", - "serde_json", - "sha3 0.9.1", - "thiserror", - "uint", -] - [[package]] name = "ethabi" version = "17.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b69517146dfab88e9238c00c724fd8e277951c3cc6f22b016d72f422a832213e" dependencies = [ - "ethereum-types 0.13.1", + "ethereum-types", "hex", "once_cell", "regex", @@ -2185,19 +2155,6 @@ dependencies = [ "uint", ] -[[package]] -name = "ethbloom" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfb684ac8fa8f6c5759f788862bb22ec6fe3cb392f6bfd08e3c64b603661e3f8" -dependencies = [ - "crunchy", - "fixed-hash", - "impl-rlp", - "impl-serde", - "tiny-keccak", -] - [[package]] name = "ethbloom" version = "0.12.1" @@ -2206,7 +2163,7 @@ checksum = "11da94e443c60508eb62cf256243a64da87304c2802ac2528847f79d750007ef" dependencies = [ "crunchy", "fixed-hash", - "impl-codec 0.6.0", + "impl-codec", "impl-rlp", "impl-serde", "scale-info", @@ -2220,10 +2177,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "23750149fe8834c0e24bb9adcbacbe06c45b9861f15df53e09f26cb7c4ab91ef" dependencies = [ "bytes 1.1.0", - "ethereum-types 0.13.1", + "ethereum-types", "hash-db", "hash256-std-hasher", - "parity-scale-codec 3.1.2", + "parity-scale-codec", "rlp", "rlp-derive", "scale-info", @@ -2232,32 +2189,18 @@ dependencies = [ "triehash", ] -[[package]] -name = "ethereum-types" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05136f7057fe789f06e6d41d07b34e6f70d8c86e5693b60f97aaa6553553bdaf" -dependencies = [ - "ethbloom 0.11.1", - "fixed-hash", - "impl-rlp", - "impl-serde", - "primitive-types 0.10.1", - "uint", -] - [[package]] name = "ethereum-types" version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b2827b94c556145446fcce834ca86b7abf0c39a805883fe20e72c5bfdb5a0dc6" dependencies = [ - "ethbloom 0.12.1", + "ethbloom", "fixed-hash", - "impl-codec 0.6.0", + "impl-codec", "impl-rlp", "impl-serde", - "primitive-types 0.11.1", + "primitive-types", "scale-info", "uint", ] @@ -2373,7 +2316,7 @@ dependencies = [ "futures-timer", "log 0.4.17", "num-traits 0.2.15", - "parity-scale-codec 3.1.2", + "parity-scale-codec", "parking_lot 0.11.2", "scale-info", ] @@ -2444,7 +2387,7 @@ name = "fork-tree" version = "3.0.0" source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ - "parity-scale-codec 3.1.2", + "parity-scale-codec", ] [[package]] @@ -2472,7 +2415,7 @@ dependencies = [ "frame-system", "linregress", "log 0.4.17", - "parity-scale-codec 3.1.2", + "parity-scale-codec", "paste", "scale-info", "serde 1.0.137", @@ -2505,7 +2448,7 @@ dependencies = [ "linked-hash-map", "log 0.4.17", "memory-db", - "parity-scale-codec 3.1.2", + "parity-scale-codec", "prettytable-rs", "rand 0.8.5", "rand_pcg 0.3.1", @@ -2542,7 +2485,7 @@ source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthl dependencies = [ "frame-support", "frame-system", - "parity-scale-codec 3.1.2", + "parity-scale-codec", "scale-info", "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "sp-io 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", @@ -2558,7 +2501,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df6bb8542ef006ef0de09a5c4420787d79823c0ed7924225822362fd2bf2ff2d" dependencies = [ "cfg-if 1.0.0", - "parity-scale-codec 3.1.2", + "parity-scale-codec", "scale-info", "serde 1.0.137", ] @@ -2575,7 +2518,7 @@ dependencies = [ "k256", "log 0.4.17", "once_cell", - "parity-scale-codec 3.1.2", + "parity-scale-codec", "paste", "scale-info", "serde 1.0.137", @@ -2634,7 +2577,7 @@ source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthl dependencies = [ "frame-support", "log 0.4.17", - "parity-scale-codec 3.1.2", + "parity-scale-codec", "scale-info", "serde 1.0.137", "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", @@ -2652,7 +2595,7 @@ dependencies = [ "frame-benchmarking", "frame-support", "frame-system", - "parity-scale-codec 3.1.2", + "parity-scale-codec", "scale-info", "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", @@ -2664,7 +2607,7 @@ name = "frame-system-rpc-runtime-api" version = "4.0.0-dev" source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ - "parity-scale-codec 3.1.2", + "parity-scale-codec", "sp-api", ] @@ -3359,22 +3302,13 @@ dependencies = [ "winapi 0.3.9", ] -[[package]] -name = "impl-codec" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "161ebdfec3c8e3b52bf61c4f3550a1eea4f9579d10dc1b936f3171ebdcd6c443" -dependencies = [ - "parity-scale-codec 2.3.1", -] - [[package]] name = "impl-codec" version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ba6a270039626615617f3f36d15fc827041df3b78c439da2cadfa47455a77f2f" dependencies = [ - "parity-scale-codec 3.1.2", + "parity-scale-codec", ] [[package]] @@ -5354,7 +5288,7 @@ dependencies = [ "frame-support", "frame-system", "pallet-timestamp", - "parity-scale-codec 3.1.2", + "parity-scale-codec", "scale-info", "sp-application-crypto 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "sp-consensus-aura", @@ -5370,7 +5304,7 @@ dependencies = [ "frame-support", "frame-system", "impl-trait-for-tuples", - "parity-scale-codec 3.1.2", + "parity-scale-codec", "scale-info", "sp-authorship", "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", @@ -5389,7 +5323,7 @@ dependencies = [ "frame-support", "frame-system", "log 0.4.17", - "parity-scale-codec 3.1.2", + "parity-scale-codec", "scale-info", "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "sp-io 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", @@ -5409,7 +5343,7 @@ dependencies = [ "frame-system", "log 0.4.17", "pallet-cf-threshold-signature", - "parity-scale-codec 3.1.2", + "parity-scale-codec", "scale-info", "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "sp-io 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", @@ -5429,7 +5363,7 @@ dependencies = [ "frame-system", "log 0.4.17", "pallet-cf-flip", - "parity-scale-codec 3.1.2", + "parity-scale-codec", "scale-info", "sp-arithmetic 5.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", @@ -5446,7 +5380,7 @@ dependencies = [ "frame-benchmarking", "frame-support", "frame-system", - "parity-scale-codec 3.1.2", + "parity-scale-codec", "scale-info", "serde 1.0.137", "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", @@ -5464,7 +5398,7 @@ dependencies = [ "frame-support", "frame-system", "pallet-transaction-payment", - "parity-scale-codec 3.1.2", + "parity-scale-codec", "scale-info", "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "sp-io 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", @@ -5481,7 +5415,7 @@ dependencies = [ "frame-benchmarking", "frame-support", "frame-system", - "parity-scale-codec 3.1.2", + "parity-scale-codec", "scale-info", "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "sp-io 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", @@ -5499,7 +5433,7 @@ dependencies = [ "frame-support", "frame-system", "pallet-cf-validator", - "parity-scale-codec 3.1.2", + "parity-scale-codec", "scale-info", "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "sp-io 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", @@ -5517,7 +5451,7 @@ dependencies = [ "frame-support", "frame-system", "log 0.4.17", - "parity-scale-codec 3.1.2", + "parity-scale-codec", "scale-info", "serde 1.0.137", "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", @@ -5539,7 +5473,7 @@ dependencies = [ "log 0.4.17", "pallet-cf-flip", "pallet-cf-validator", - "parity-scale-codec 3.1.2", + "parity-scale-codec", "scale-info", "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "sp-io 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", @@ -5561,7 +5495,7 @@ dependencies = [ "log 0.4.17", "pallet-cf-online", "pallet-cf-validator", - "parity-scale-codec 3.1.2", + "parity-scale-codec", "scale-info", "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "sp-io 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", @@ -5582,7 +5516,7 @@ dependencies = [ "frame-system", "log 0.4.17", "pallet-session", - "parity-scale-codec 3.1.2", + "parity-scale-codec", "scale-info", "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "sp-io 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", @@ -5604,8 +5538,7 @@ dependencies = [ "frame-system", "hex", "log 0.4.17", - "pallet-cf-validator", - "parity-scale-codec 3.1.2", + "parity-scale-codec", "scale-info", "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "sp-io 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", @@ -5626,7 +5559,7 @@ dependencies = [ "frame-system", "hex", "pallet-cf-validator", - "parity-scale-codec 3.1.2", + "parity-scale-codec", "scale-info", "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "sp-io 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", @@ -5646,7 +5579,7 @@ dependencies = [ "log 0.4.17", "pallet-authorship", "pallet-session", - "parity-scale-codec 3.1.2", + "parity-scale-codec", "scale-info", "sp-application-crypto 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", @@ -5665,7 +5598,7 @@ source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthl dependencies = [ "frame-support", "frame-system", - "parity-scale-codec 3.1.2", + "parity-scale-codec", "safe-mix", "scale-info", "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", @@ -5682,7 +5615,7 @@ dependencies = [ "impl-trait-for-tuples", "log 0.4.17", "pallet-timestamp", - "parity-scale-codec 3.1.2", + "parity-scale-codec", "scale-info", "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "sp-io 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", @@ -5702,7 +5635,7 @@ dependencies = [ "frame-support", "frame-system", "log 0.4.17", - "parity-scale-codec 3.1.2", + "parity-scale-codec", "scale-info", "sp-inherents", "sp-io 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", @@ -5718,7 +5651,7 @@ source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthl dependencies = [ "frame-support", "frame-system", - "parity-scale-codec 3.1.2", + "parity-scale-codec", "scale-info", "serde 1.0.137", "smallvec 1.8.0", @@ -5737,7 +5670,7 @@ dependencies = [ "jsonrpc-core-client", "jsonrpc-derive", "pallet-transaction-payment-rpc-runtime-api", - "parity-scale-codec 3.1.2", + "parity-scale-codec", "sp-api", "sp-blockchain", "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", @@ -5751,7 +5684,7 @@ version = "4.0.0-dev" source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ "pallet-transaction-payment", - "parity-scale-codec 3.1.2", + "parity-scale-codec", "sp-api", "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", ] @@ -5775,20 +5708,6 @@ dependencies = [ "snap", ] -[[package]] -name = "parity-scale-codec" -version = "2.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "373b1a4c1338d9cd3d1fa53b3a11bdab5ab6bd80a20f7f7becd76953ae2be909" -dependencies = [ - "arrayvec 0.7.2", - "bitvec 0.20.4", - "byte-slice-cast", - "impl-trait-for-tuples", - "parity-scale-codec-derive 2.3.1", - "serde 1.0.137", -] - [[package]] name = "parity-scale-codec" version = "3.1.2" @@ -5799,22 +5718,10 @@ dependencies = [ "bitvec 1.0.0", "byte-slice-cast", "impl-trait-for-tuples", - "parity-scale-codec-derive 3.1.2", + "parity-scale-codec-derive", "serde 1.0.137", ] -[[package]] -name = "parity-scale-codec-derive" -version = "2.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1557010476e0595c9b568d16dcfb81b93cdeb157612726f5170d31aa707bed27" -dependencies = [ - "proc-macro-crate 1.1.3", - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "parity-scale-codec-derive" version = "3.1.2" @@ -5858,7 +5765,7 @@ dependencies = [ "impl-trait-for-tuples", "parity-util-mem-derive", "parking_lot 0.12.0", - "primitive-types 0.11.1", + "primitive-types", "smallvec 1.8.0", "winapi 0.3.9", ] @@ -6248,19 +6155,6 @@ dependencies = [ "unicode-width", ] -[[package]] -name = "primitive-types" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05e4722c697a58a99d5d06a08c30821d7c082a4632198de1eaa5a6c22ef42373" -dependencies = [ - "fixed-hash", - "impl-codec 0.5.1", - "impl-rlp", - "impl-serde", - "uint", -] - [[package]] name = "primitive-types" version = "0.11.1" @@ -6268,7 +6162,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e28720988bff275df1f51b171e1b2a18c30d194c4d2b61defdacecd625a5d94a" dependencies = [ "fixed-hash", - "impl-codec 0.6.0", + "impl-codec", "impl-rlp", "impl-serde", "scale-info", @@ -6859,7 +6753,7 @@ dependencies = [ "env_logger", "jsonrpsee", "log 0.4.17", - "parity-scale-codec 3.1.2", + "parity-scale-codec", "serde 1.0.137", "serde_json", "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", @@ -7217,7 +7111,7 @@ dependencies = [ "futures 0.3.21", "futures-timer", "log 0.4.17", - "parity-scale-codec 3.1.2", + "parity-scale-codec", "sc-block-builder", "sc-client-api", "sc-proposer-metrics", @@ -7237,7 +7131,7 @@ name = "sc-block-builder" version = "0.10.0-dev" source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ - "parity-scale-codec 3.1.2", + "parity-scale-codec", "sc-client-api", "sp-api", "sp-block-builder", @@ -7255,7 +7149,7 @@ source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthl dependencies = [ "impl-trait-for-tuples", "memmap2 0.5.3", - "parity-scale-codec 3.1.2", + "parity-scale-codec", "sc-chain-spec-derive", "sc-network", "sc-telemetry", @@ -7289,7 +7183,7 @@ dependencies = [ "libp2p", "log 0.4.17", "names", - "parity-scale-codec 3.1.2", + "parity-scale-codec", "rand 0.7.3", "regex", "rpassword", @@ -7324,7 +7218,7 @@ dependencies = [ "futures 0.3.21", "hash-db", "log 0.4.17", - "parity-scale-codec 3.1.2", + "parity-scale-codec", "parking_lot 0.12.0", "sc-executor", "sc-transaction-pool-api", @@ -7355,7 +7249,7 @@ dependencies = [ "linked-hash-map", "log 0.4.17", "parity-db", - "parity-scale-codec 3.1.2", + "parity-scale-codec", "parking_lot 0.12.0", "sc-client-api", "sc-state-db", @@ -7400,7 +7294,7 @@ dependencies = [ "async-trait", "futures 0.3.21", "log 0.4.17", - "parity-scale-codec 3.1.2", + "parity-scale-codec", "sc-block-builder", "sc-client-api", "sc-consensus", @@ -7430,7 +7324,7 @@ dependencies = [ "futures 0.3.21", "futures-timer", "log 0.4.17", - "parity-scale-codec 3.1.2", + "parity-scale-codec", "sc-client-api", "sc-consensus", "sc-telemetry", @@ -7453,7 +7347,7 @@ source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthl dependencies = [ "lazy_static", "lru 0.7.5", - "parity-scale-codec 3.1.2", + "parity-scale-codec", "parking_lot 0.12.0", "sc-executor-common", "sc-executor-wasmi", @@ -7479,7 +7373,7 @@ version = "0.10.0-dev" source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ "environmental", - "parity-scale-codec 3.1.2", + "parity-scale-codec", "sc-allocator", "sp-maybe-compressed-blob", "sp-sandbox", @@ -7496,7 +7390,7 @@ version = "0.10.0-dev" source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ "log 0.4.17", - "parity-scale-codec 3.1.2", + "parity-scale-codec", "sc-allocator", "sc-executor-common", "sp-runtime-interface 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", @@ -7513,7 +7407,7 @@ dependencies = [ "cfg-if 1.0.0", "libc", "log 0.4.17", - "parity-scale-codec 3.1.2", + "parity-scale-codec", "parity-wasm 0.42.2", "sc-allocator", "sc-executor-common", @@ -7537,7 +7431,7 @@ dependencies = [ "futures-timer", "hex", "log 0.4.17", - "parity-scale-codec 3.1.2", + "parity-scale-codec", "parking_lot 0.12.0", "rand 0.8.5", "sc-block-builder", @@ -7617,7 +7511,7 @@ dependencies = [ "linked_hash_set", "log 0.4.17", "lru 0.7.5", - "parity-scale-codec 3.1.2", + "parity-scale-codec", "parking_lot 0.12.0", "pin-project 1.0.10", "prost", @@ -7675,7 +7569,7 @@ dependencies = [ "hyper-rustls", "num_cpus", "once_cell", - "parity-scale-codec 3.1.2", + "parity-scale-codec", "parking_lot 0.12.0", "rand 0.7.3", "sc-client-api", @@ -7722,7 +7616,7 @@ dependencies = [ "jsonrpc-pubsub", "lazy_static", "log 0.4.17", - "parity-scale-codec 3.1.2", + "parity-scale-codec", "parking_lot 0.12.0", "sc-block-builder", "sc-chain-spec", @@ -7754,7 +7648,7 @@ dependencies = [ "jsonrpc-derive", "jsonrpc-pubsub", "log 0.4.17", - "parity-scale-codec 3.1.2", + "parity-scale-codec", "parking_lot 0.12.0", "sc-chain-spec", "sc-transaction-pool-api", @@ -7800,7 +7694,7 @@ dependencies = [ "jsonrpc-core", "jsonrpc-pubsub", "log 0.4.17", - "parity-scale-codec 3.1.2", + "parity-scale-codec", "parity-util-mem", "parking_lot 0.12.0", "pin-project 1.0.10", @@ -7857,7 +7751,7 @@ version = "0.10.0-dev" source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ "log 0.4.17", - "parity-scale-codec 3.1.2", + "parity-scale-codec", "parity-util-mem", "parity-util-mem-derive", "parking_lot 0.12.0", @@ -7953,7 +7847,7 @@ dependencies = [ "futures-timer", "linked-hash-map", "log 0.4.17", - "parity-scale-codec 3.1.2", + "parity-scale-codec", "parity-util-mem", "parking_lot 0.12.0", "retain_mut", @@ -8006,7 +7900,7 @@ dependencies = [ "bitvec 1.0.0", "cfg-if 1.0.0", "derive_more", - "parity-scale-codec 3.1.2", + "parity-scale-codec", "scale-info-derive", "serde 1.0.137", ] @@ -8554,7 +8448,7 @@ source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthl dependencies = [ "hash-db", "log 0.4.17", - "parity-scale-codec 3.1.2", + "parity-scale-codec", "sp-api-proc-macro", "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", @@ -8582,7 +8476,7 @@ version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "acb4490364cb3b097a6755343e552495b0013778152300714be4647d107e9a2e" dependencies = [ - "parity-scale-codec 3.1.2", + "parity-scale-codec", "scale-info", "serde 1.0.137", "sp-core 6.0.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -8595,7 +8489,7 @@ name = "sp-application-crypto" version = "6.0.0" source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ - "parity-scale-codec 3.1.2", + "parity-scale-codec", "scale-info", "serde 1.0.137", "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", @@ -8611,7 +8505,7 @@ checksum = "31ef21f82cc10f75ed046b65e2f8048080ee76e59f1b8aed55c7150daebfd35b" dependencies = [ "integer-sqrt", "num-traits 0.2.15", - "parity-scale-codec 3.1.2", + "parity-scale-codec", "scale-info", "serde 1.0.137", "sp-debug-derive 4.0.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -8626,7 +8520,7 @@ source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthl dependencies = [ "integer-sqrt", "num-traits 0.2.15", - "parity-scale-codec 3.1.2", + "parity-scale-codec", "scale-info", "serde 1.0.137", "sp-debug-derive 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", @@ -8640,7 +8534,7 @@ version = "4.0.0-dev" source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ "async-trait", - "parity-scale-codec 3.1.2", + "parity-scale-codec", "sp-inherents", "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", @@ -8651,7 +8545,7 @@ name = "sp-block-builder" version = "4.0.0-dev" source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ - "parity-scale-codec 3.1.2", + "parity-scale-codec", "sp-api", "sp-inherents", "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", @@ -8666,7 +8560,7 @@ dependencies = [ "futures 0.3.21", "log 0.4.17", "lru 0.7.5", - "parity-scale-codec 3.1.2", + "parity-scale-codec", "parking_lot 0.12.0", "sp-api", "sp-consensus", @@ -8685,7 +8579,7 @@ dependencies = [ "futures 0.3.21", "futures-timer", "log 0.4.17", - "parity-scale-codec 3.1.2", + "parity-scale-codec", "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "sp-inherents", "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", @@ -8701,7 +8595,7 @@ version = "0.10.0-dev" source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ "async-trait", - "parity-scale-codec 3.1.2", + "parity-scale-codec", "scale-info", "sp-api", "sp-application-crypto 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", @@ -8718,7 +8612,7 @@ name = "sp-consensus-slots" version = "0.10.0-dev" source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ - "parity-scale-codec 3.1.2", + "parity-scale-codec", "scale-info", "serde 1.0.137", "sp-arithmetic 5.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", @@ -8749,10 +8643,10 @@ dependencies = [ "log 0.4.17", "merlin", "num-traits 0.2.15", - "parity-scale-codec 3.1.2", + "parity-scale-codec", "parity-util-mem", "parking_lot 0.12.0", - "primitive-types 0.11.1", + "primitive-types", "rand 0.7.3", "regex", "scale-info", @@ -8795,10 +8689,10 @@ dependencies = [ "log 0.4.17", "merlin", "num-traits 0.2.15", - "parity-scale-codec 3.1.2", + "parity-scale-codec", "parity-util-mem", "parking_lot 0.12.0", - "primitive-types 0.11.1", + "primitive-types", "rand 0.7.3", "regex", "scale-info", @@ -8896,7 +8790,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fcfd91f92a2a59224230a77c4a5d6f51709620c0aab4e51f108ccece6adc56f" dependencies = [ "environmental", - "parity-scale-codec 3.1.2", + "parity-scale-codec", "sp-std 4.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "sp-storage 6.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -8907,7 +8801,7 @@ version = "0.12.0" source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ "environmental", - "parity-scale-codec 3.1.2", + "parity-scale-codec", "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "sp-storage 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", ] @@ -8919,7 +8813,7 @@ source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthl dependencies = [ "finality-grandpa", "log 0.4.17", - "parity-scale-codec 3.1.2", + "parity-scale-codec", "scale-info", "serde 1.0.137", "sp-api", @@ -8937,7 +8831,7 @@ source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthl dependencies = [ "async-trait", "impl-trait-for-tuples", - "parity-scale-codec 3.1.2", + "parity-scale-codec", "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", @@ -8954,7 +8848,7 @@ dependencies = [ "hash-db", "libsecp256k1", "log 0.4.17", - "parity-scale-codec 3.1.2", + "parity-scale-codec", "parking_lot 0.12.0", "secp256k1 0.21.3", "sp-core 6.0.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -8979,7 +8873,7 @@ dependencies = [ "hash-db", "libsecp256k1", "log 0.4.17", - "parity-scale-codec 3.1.2", + "parity-scale-codec", "parking_lot 0.12.0", "secp256k1 0.21.3", "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", @@ -9015,7 +8909,7 @@ dependencies = [ "async-trait", "futures 0.3.21", "merlin", - "parity-scale-codec 3.1.2", + "parity-scale-codec", "parking_lot 0.12.0", "schnorrkel", "sp-core 6.0.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -9031,7 +8925,7 @@ dependencies = [ "async-trait", "futures 0.3.21", "merlin", - "parity-scale-codec 3.1.2", + "parity-scale-codec", "parking_lot 0.12.0", "schnorrkel", "serde 1.0.137", @@ -9100,7 +8994,7 @@ dependencies = [ "hash256-std-hasher", "impl-trait-for-tuples", "log 0.4.17", - "parity-scale-codec 3.1.2", + "parity-scale-codec", "parity-util-mem", "paste", "rand 0.7.3", @@ -9122,7 +9016,7 @@ dependencies = [ "hash256-std-hasher", "impl-trait-for-tuples", "log 0.4.17", - "parity-scale-codec 3.1.2", + "parity-scale-codec", "parity-util-mem", "paste", "rand 0.7.3", @@ -9142,8 +9036,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "158bf0305c75a50fc0e334b889568f519a126e32b87900c3f4251202dece7b4b" dependencies = [ "impl-trait-for-tuples", - "parity-scale-codec 3.1.2", - "primitive-types 0.11.1", + "parity-scale-codec", + "primitive-types", "sp-externalities 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", "sp-runtime-interface-proc-macro 5.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "sp-std 4.0.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -9159,8 +9053,8 @@ version = "6.0.0" source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ "impl-trait-for-tuples", - "parity-scale-codec 3.1.2", - "primitive-types 0.11.1", + "parity-scale-codec", + "primitive-types", "sp-externalities 0.12.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "sp-runtime-interface-proc-macro 5.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", @@ -9201,7 +9095,7 @@ version = "0.10.0-dev" source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ "log 0.4.17", - "parity-scale-codec 3.1.2", + "parity-scale-codec", "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "sp-io 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", @@ -9223,7 +9117,7 @@ name = "sp-session" version = "4.0.0-dev" source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ - "parity-scale-codec 3.1.2", + "parity-scale-codec", "scale-info", "sp-api", "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", @@ -9237,7 +9131,7 @@ name = "sp-staking" version = "4.0.0-dev" source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ - "parity-scale-codec 3.1.2", + "parity-scale-codec", "scale-info", "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", @@ -9252,7 +9146,7 @@ dependencies = [ "hash-db", "log 0.4.17", "num-traits 0.2.15", - "parity-scale-codec 3.1.2", + "parity-scale-codec", "parking_lot 0.12.0", "rand 0.7.3", "smallvec 1.8.0", @@ -9275,7 +9169,7 @@ dependencies = [ "hash-db", "log 0.4.17", "num-traits 0.2.15", - "parity-scale-codec 3.1.2", + "parity-scale-codec", "parking_lot 0.12.0", "rand 0.7.3", "smallvec 1.8.0", @@ -9307,7 +9201,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5dab53af846068e3e0716d3ccc70ea0db44035c79b2ed5821aaa6635039efa37" dependencies = [ "impl-serde", - "parity-scale-codec 3.1.2", + "parity-scale-codec", "ref-cast", "serde 1.0.137", "sp-debug-derive 4.0.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -9320,7 +9214,7 @@ version = "6.0.0" source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ "impl-serde", - "parity-scale-codec 3.1.2", + "parity-scale-codec", "ref-cast", "serde 1.0.137", "sp-debug-derive 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", @@ -9348,7 +9242,7 @@ dependencies = [ "async-trait", "futures-timer", "log 0.4.17", - "parity-scale-codec 3.1.2", + "parity-scale-codec", "sp-api", "sp-inherents", "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", @@ -9362,7 +9256,7 @@ version = "5.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "69a67e555d171c4238bd223393cda747dd20ec7d4f5fe5c042c056cb7fde9eda" dependencies = [ - "parity-scale-codec 3.1.2", + "parity-scale-codec", "sp-std 4.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "tracing", "tracing-core", @@ -9374,7 +9268,7 @@ name = "sp-tracing" version = "5.0.0" source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ - "parity-scale-codec 3.1.2", + "parity-scale-codec", "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "tracing", "tracing-core", @@ -9397,7 +9291,7 @@ source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthl dependencies = [ "async-trait", "log 0.4.17", - "parity-scale-codec 3.1.2", + "parity-scale-codec", "scale-info", "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "sp-inherents", @@ -9414,7 +9308,7 @@ checksum = "d6fc34f4f291886914733e083b62708d829f3e6b8d7a7ca7fa8a55a3d7640b0b" dependencies = [ "hash-db", "memory-db", - "parity-scale-codec 3.1.2", + "parity-scale-codec", "scale-info", "sp-core 6.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "sp-std 4.0.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -9429,7 +9323,7 @@ source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthl dependencies = [ "hash-db", "memory-db", - "parity-scale-codec 3.1.2", + "parity-scale-codec", "scale-info", "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", @@ -9444,7 +9338,7 @@ version = "5.0.0" source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ "impl-serde", - "parity-scale-codec 3.1.2", + "parity-scale-codec", "parity-wasm 0.42.2", "scale-info", "serde 1.0.137", @@ -9460,7 +9354,7 @@ name = "sp-version-proc-macro" version = "4.0.0-dev" source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ - "parity-scale-codec 3.1.2", + "parity-scale-codec", "proc-macro2", "quote", "syn", @@ -9474,7 +9368,7 @@ checksum = "10d88debe690c2b24eaa9536a150334fcef2ae184c21a0e5b3e80135407a7d52" dependencies = [ "impl-trait-for-tuples", "log 0.4.17", - "parity-scale-codec 3.1.2", + "parity-scale-codec", "sp-std 4.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "wasmi", ] @@ -9486,7 +9380,7 @@ source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthl dependencies = [ "impl-trait-for-tuples", "log 0.4.17", - "parity-scale-codec 3.1.2", + "parity-scale-codec", "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", "wasmi", "wasmtime", @@ -9567,7 +9461,7 @@ dependencies = [ "pallet-timestamp", "pallet-transaction-payment", "pallet-transaction-payment-rpc-runtime-api", - "parity-scale-codec 3.1.2", + "parity-scale-codec", "scale-info", "serde 1.0.137", "sp-api", @@ -9700,7 +9594,7 @@ dependencies = [ "jsonrpc-core-client", "jsonrpc-derive", "log 0.4.17", - "parity-scale-codec 3.1.2", + "parity-scale-codec", "sc-client-api", "sc-rpc-api", "sc-transaction-pool-api", @@ -9758,7 +9652,7 @@ dependencies = [ "hex", "jsonrpsee", "log 0.4.17", - "parity-scale-codec 3.1.2", + "parity-scale-codec", "parking_lot 0.12.0", "scale-info", "serde 1.0.137", @@ -9778,7 +9672,7 @@ dependencies = [ "darling 0.14.1", "frame-metadata", "heck 0.4.0", - "parity-scale-codec 3.1.2", + "parity-scale-codec", "proc-macro-error", "proc-macro2", "quote", @@ -9804,7 +9698,7 @@ version = "0.21.0" source = "git+https://github.com/chainflip-io/substrate-subxt.git?tag=chainflip-monthly-2022-05#6d73172560b4c722aeac19695c96c618799d50a2" dependencies = [ "frame-metadata", - "parity-scale-codec 3.1.2", + "parity-scale-codec", "scale-info", "sp-core 6.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -10437,7 +10331,7 @@ dependencies = [ "clap 3.1.15", "jsonrpsee", "log 0.4.17", - "parity-scale-codec 3.1.2", + "parity-scale-codec", "remote-externalities", "sc-chain-spec", "sc-cli", @@ -11031,50 +10925,15 @@ dependencies = [ [[package]] name = "web3" -version = "0.17.0" -source = "git+https://github.com/tomusdrw/rust-web3.git?rev=a425fa7#a425fa747bca69c7aede4d2c2828f7267d79227e" -dependencies = [ - "arrayvec 0.7.2", - "base64 0.13.0", - "bytes 1.1.0", - "derive_more", - "ethabi 15.0.0", - "ethereum-types 0.12.1", - "futures 0.3.21", - "futures-timer", - "headers", - "hex", - "jsonrpc-core", - "log 0.4.17", - "once_cell", - "parking_lot 0.11.2", - "pin-project 1.0.10", - "reqwest", - "rlp", - "secp256k1 0.20.3", - "serde 1.0.137", - "serde_json", - "soketto", - "tiny-keccak", - "tokio", - "tokio-stream", - "tokio-util 0.6.9", - "url 2.2.2", - "web3-async-native-tls", -] - -[[package]] -name = "web3" -version = "0.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44f258e254752d210b84fe117b31f1e3cc9cbf04c0d747eb7f8cf7cf5e370f6d" +version = "0.19.0" +source = "git+https://github.com/tomusdrw/rust-web3.git?rev=8796c88#8796c88c4cb95864bdfeffb40ebb061c283aca74" dependencies = [ "arrayvec 0.7.2", "base64 0.13.0", "bytes 1.1.0", "derive_more", - "ethabi 16.0.0", - "ethereum-types 0.12.1", + "ethabi", + "ethereum-types", "futures 0.3.21", "futures-timer", "headers", diff --git a/engine/Cargo.toml b/engine/Cargo.toml index a26344d465..a66a53a0e2 100644 --- a/engine/Cargo.toml +++ b/engine/Cargo.toml @@ -42,12 +42,12 @@ jsonrpc-http-server = "18.0.0" jsonrpc-ws-server = "18.0.0" websocket = "0.24" -ethbloom = "0.11.1" +ethbloom = "0.12.1" dyn-clone = "1.0.4" kvdb-rocksdb = "0.15.2" lazy_static = "1.4" num = "0.4.0" -parking_lot = "0.11" +parking_lot = "0.12" regex = "1" reqwest = {version = "0.11.4", features = ["json"]} secp256k1 = "0.20" @@ -61,7 +61,9 @@ thiserror = "1.0.26" tokio = {version = "1.13.1", features = ["full"]} tokio-stream = "0.1.5" url = "1.7.2" -web3 = {git = 'https://github.com/tomusdrw/rust-web3.git', rev = 'a425fa7'} +web3 = {git = 'https://github.com/tomusdrw/rust-web3.git', rev = '8796c88', features = ['signing']} +# Required so that we can create a web3-compatilble secret key. +web3-secp256k1 = {package = 'secp256k1', version = '0.21'} zeroize = "1.4.3" libp2p = "0.40" generic-array= "0.14" diff --git a/engine/cli/Cargo.toml b/engine/cli/Cargo.toml index 8599360299..d29e81e349 100644 --- a/engine/cli/Cargo.toml +++ b/engine/cli/Cargo.toml @@ -15,7 +15,7 @@ slog = {version = "2.7.0", features = ["max_level_trace", "release_max_level_tra structopt = "0.3.23" tokio = {version = "1.13.1", features = ["full"]} utilities = {path = "../../utilities"} -web3 = {git = 'https://github.com/tomusdrw/rust-web3.git', rev = 'a425fa7'} +web3 = {git = 'https://github.com/tomusdrw/rust-web3.git', rev = '8796c88'} # State chain pallet-cf-staking = {path = "../../state-chain/pallets/cf-staking"} diff --git a/engine/cli/src/main.rs b/engine/cli/src/main.rs index ce9dcd1158..2a32e5db12 100644 --- a/engine/cli/src/main.rs +++ b/engine/cli/src/main.rs @@ -134,7 +134,10 @@ async fn request_claim( let tx_hash = state_chain_client .submit_signed_extrinsic( - pallet_cf_staking::Call::claim(atomic_amount, eth_address), + pallet_cf_staking::Call::claim { + amount: atomic_amount, + address: eth_address, + }, logger, ) .await?; @@ -263,7 +266,10 @@ async fn rotate_keys(settings: &CLISettings, logger: &slog::Logger) -> Result<() let tx_hash = state_chain_client .submit_signed_extrinsic( - pallet_cf_validator::Call::set_keys(new_session_key, [0; 1].to_vec()), + pallet_cf_validator::Call::set_keys { + keys: new_session_key, + proof: [0; 1].to_vec(), + }, logger, ) .await @@ -277,7 +283,7 @@ async fn retire_account(settings: &CLISettings, logger: &slog::Logger) -> Result let (_, _, state_chain_client) = connect_to_state_chain(&settings.state_chain, false, logger).await?; let tx_hash = state_chain_client - .submit_signed_extrinsic(pallet_cf_staking::Call::retire_account(), logger) + .submit_signed_extrinsic(pallet_cf_staking::Call::retire_account {}, logger) .await .expect("Could not retire account"); println!("Account retired at tx {:#x}.", tx_hash); @@ -288,7 +294,7 @@ async fn activate_account(settings: &CLISettings, logger: &slog::Logger) -> Resu let (_, _, state_chain_client) = connect_to_state_chain(&settings.state_chain, false, logger).await?; let tx_hash = state_chain_client - .submit_signed_extrinsic(pallet_cf_staking::Call::activate_account(), logger) + .submit_signed_extrinsic(pallet_cf_staking::Call::activate_account {}, logger) .await .expect("Could not activate account"); println!("Account activated at tx {:#x}.", tx_hash); diff --git a/engine/src/eth/key_manager.rs b/engine/src/eth/key_manager.rs index da93fc9c26..d8f03955fe 100644 --- a/engine/src/eth/key_manager.rs +++ b/engine/src/eth/key_manager.rs @@ -205,14 +205,18 @@ impl EthObserver for KeyManager { | KeyManagerEvent::AggKeySetByGovKey { new_key, .. } => { let _result = state_chain_client .submit_signed_extrinsic( - pallet_cf_witnesser::Call::witness(Box::new( - pallet_cf_vaults::Call::vault_key_rotated( - cf_chains::eth::AggKey::from_pubkey_compressed(new_key.serialize()), - event.block_number, - event.tx_hash, - ) - .into(), - )), + pallet_cf_witnesser::Call::witness { + call: Box::new( + pallet_cf_vaults::Call::vault_key_rotated { + new_public_key: cf_chains::eth::AggKey::from_pubkey_compressed( + new_key.serialize(), + ), + block_number: event.block_number, + tx_hash: event.tx_hash, + } + .into(), + ), + }, logger, ) .await; @@ -220,18 +224,20 @@ impl EthObserver for KeyManager { KeyManagerEvent::SignatureAccepted { sig_data, signer } => { let _result = state_chain_client .submit_signed_extrinsic( - pallet_cf_witnesser::Call::witness(Box::new( - pallet_cf_broadcast::Call::signature_accepted( - SchnorrVerificationComponents { - s: sig_data.sig.into(), - k_times_g_address: sig_data.k_times_g_address.into(), - }, - signer, - event.block_number, - event.tx_hash, - ) - .into(), - )), + pallet_cf_witnesser::Call::witness { + call: Box::new( + pallet_cf_broadcast::Call::signature_accepted { + payload: SchnorrVerificationComponents { + s: sig_data.sig.into(), + k_times_g_address: sig_data.k_times_g_address.into(), + }, + tx_signer: signer, + block_number: event.block_number, + tx_hash: event.tx_hash, + } + .into(), + ), + }, logger, ) .await; diff --git a/engine/src/eth/mod.rs b/engine/src/eth/mod.rs index 90953fc074..19d11617a3 100644 --- a/engine/src/eth/mod.rs +++ b/engine/src/eth/mod.rs @@ -32,7 +32,6 @@ use futures::{ stream::{self}, StreamExt, TryFutureExt, }; -use secp256k1::SecretKey; use slog::o; use sp_core::{H160, U256}; use std::{ @@ -55,6 +54,7 @@ use web3::{ }, Web3, }; +use web3_secp256k1::SecretKey; use tokio_stream::Stream; @@ -536,10 +536,10 @@ where data: unsigned_tx.data.clone().into(), chain_id: Some(unsigned_tx.chain_id), value: unsigned_tx.value, - transaction_type: Some(web3::types::U64::from(2)), + transaction_type: Some(web3::types::U64::from(2u64)), // Set the gas really high (~half gas in a block) for the estimate, since the estimation call requires you to // input at least as much gas as the estimate will return (stupid? yes) - gas: U256::from(15_000_000), + gas: U256::from(15_000_000u64), ..Default::default() }; // query for the gas estimate if the SC didn't provide it @@ -554,7 +554,7 @@ where }; // increase the estimate by 50% - let uint256_2 = U256::from(2); + let uint256_2 = U256::from(2u64); tx_params.gas = gas_estimate .saturating_mul(uint256_2) .saturating_sub(gas_estimate.checked_div(uint256_2).unwrap()); diff --git a/engine/src/eth/stake_manager.rs b/engine/src/eth/stake_manager.rs index 86862ff924..b5f7ab9b60 100644 --- a/engine/src/eth/stake_manager.rs +++ b/engine/src/eth/stake_manager.rs @@ -112,18 +112,18 @@ impl EthObserver for StakeManager { } => { let _result = state_chain_client .submit_signed_extrinsic( - pallet_cf_witnesser::Call::witness_at_epoch( - Box::new( - pallet_cf_staking::Call::staked( + pallet_cf_witnesser::Call::witness_at_epoch { + call: Box::new( + pallet_cf_staking::Call::staked { account_id, amount, - return_addr.0, - event.tx_hash.into(), - ) + withdrawal_address: return_addr.0, + tx_hash: event.tx_hash.into(), + } .into(), ), - epoch, - ), + epoch_index: epoch, + }, logger, ) .await; @@ -131,17 +131,17 @@ impl EthObserver for StakeManager { StakeManagerEvent::ClaimExecuted { account_id, amount } => { let _result = state_chain_client .submit_signed_extrinsic( - pallet_cf_witnesser::Call::witness_at_epoch( - Box::new( - pallet_cf_staking::Call::claimed( + pallet_cf_witnesser::Call::witness_at_epoch { + call: Box::new( + pallet_cf_staking::Call::claimed { account_id, - amount, - event.tx_hash.to_fixed_bytes(), - ) + claimed_amount: amount, + tx_hash: event.tx_hash.to_fixed_bytes(), + } .into(), ), - epoch, - ), + epoch_index: epoch, + }, logger, ) .await; diff --git a/engine/src/main.rs b/engine/src/main.rs index 757ee6a6e4..db6593c111 100644 --- a/engine/src/main.rs +++ b/engine/src/main.rs @@ -58,11 +58,13 @@ async fn main() { state_chain_client .submit_signed_extrinsic( - pallet_cf_validator::Call::cfe_version(SemVer { - major: env!("CARGO_PKG_VERSION_MAJOR").parse::().unwrap(), - minor: env!("CARGO_PKG_VERSION_MINOR").parse::().unwrap(), - patch: env!("CARGO_PKG_VERSION_PATCH").parse::().unwrap(), - }), + pallet_cf_validator::Call::cfe_version { + version: SemVer { + major: env!("CARGO_PKG_VERSION_MAJOR").parse::().unwrap(), + minor: env!("CARGO_PKG_VERSION_MINOR").parse::().unwrap(), + patch: env!("CARGO_PKG_VERSION_PATCH").parse::().unwrap(), + }, + }, &root_logger, ) .await diff --git a/engine/src/multisig/client/common/mod.rs b/engine/src/multisig/client/common/mod.rs index c2962c5dbd..1a7459ceb0 100644 --- a/engine/src/multisig/client/common/mod.rs +++ b/engine/src/multisig/client/common/mod.rs @@ -28,7 +28,12 @@ impl KeygenResult { /// Gets the serialized compressed public key (33 bytes - 32 bytes + a y parity byte) pub fn get_public_key_bytes(&self) -> Vec { use crate::multisig::crypto::ECPoint; - self.key_share.y.0.serialize_compressed().as_ref().into() + self.key_share + .y + .0 + .serialize_compressed() + .as_slice() + .to_vec() } } diff --git a/engine/src/multisig_p2p.rs b/engine/src/multisig_p2p.rs index 91eb907173..312ca7270d 100644 --- a/engine/src/multisig_p2p.rs +++ b/engine/src/multisig_p2p.rs @@ -276,7 +276,7 @@ pub async fn start( })? .into(); let peer_id_from_cfe_config = - libp2p::identity::PublicKey::Ed25519(peer_keypair_from_cfe_config.public()).into_peer_id(); + libp2p::identity::PublicKey::Ed25519(peer_keypair_from_cfe_config.public()).to_peer_id(); update_registered_peer_id( &peer_id_from_cfe_config, &peer_keypair_from_cfe_config, diff --git a/engine/src/state_chain/client.rs b/engine/src/state_chain/client.rs index 26ab344087..de69cd0911 100644 --- a/engine/src/state_chain/client.rs +++ b/engine/src/state_chain/client.rs @@ -1439,6 +1439,7 @@ mod tests { impl_version: 1, apis: Default::default(), transaction_version: 1, + state_version: 1, }) }); diff --git a/engine/src/state_chain/sc_observer.rs b/engine/src/state_chain/sc_observer.rs index f9e23605ce..43ff55c977 100644 --- a/engine/src/state_chain/sc_observer.rs +++ b/engine/src/state_chain/sc_observer.rs @@ -67,7 +67,10 @@ async fn handle_keygen_request( let _result = state_chain_client .submit_signed_extrinsic( - pallet_cf_vaults::Call::report_keygen_outcome(ceremony_id, keygen_outcome), + pallet_cf_vaults::Call::report_keygen_outcome { + ceremony_id, + reported_outcome: keygen_outcome, + }, &logger, ) .await; @@ -107,7 +110,7 @@ pub async fn start( ); state_chain_client - .submit_signed_extrinsic(pallet_cf_online::Call::heartbeat(), &logger) + .submit_signed_extrinsic(pallet_cf_online::Call::heartbeat {}, &logger) .await .expect("Should be able to submit first heartbeat"); @@ -285,7 +288,10 @@ pub async fn start( Ok(signature) => { let _result = state_chain_client .submit_unsigned_extrinsic( - pallet_cf_threshold_signature::Call::signature_success(ceremony_id, signature.into()), + pallet_cf_threshold_signature::Call::signature_success { + ceremony_id, + signature: signature.into() + }, &logger, ) .await; @@ -293,10 +299,10 @@ pub async fn start( Err((bad_account_ids, _error)) => { let _result = state_chain_client .submit_signed_extrinsic( - pallet_cf_threshold_signature::Call::report_signature_failed_unbounded( - ceremony_id, - BTreeSet::from_iter(bad_account_ids), - ), + pallet_cf_threshold_signature::Call::report_signature_failed_unbounded { + id: ceremony_id, + offenders: BTreeSet::from_iter(bad_account_ids), + }, &logger, ) .await; @@ -321,11 +327,11 @@ pub async fn start( Ok(raw_signed_tx) => { let _result = state_chain_client.submit_signed_extrinsic( state_chain_runtime::Call::EthereumBroadcaster( - pallet_cf_broadcast::Call::transaction_ready_for_transmission( - attempt_id, - raw_signed_tx.0, - eth_broadcaster.address, - ), + pallet_cf_broadcast::Call::transaction_ready_for_transmission { + broadcast_attempt_id: attempt_id, + signed_tx: raw_signed_tx.0, + signer_id: eth_broadcaster.address, + }, ), &logger, ).await; @@ -411,7 +417,7 @@ pub async fn start( current_block_header.number ); let _result = state_chain_client - .submit_signed_extrinsic(pallet_cf_online::Call::heartbeat(), &logger) + .submit_signed_extrinsic(pallet_cf_online::Call::heartbeat {}, &logger) .await; } } diff --git a/state-chain/chains/Cargo.toml b/state-chain/chains/Cargo.toml index 5fd69f167c..9cc3c6dc94 100644 --- a/state-chain/chains/Cargo.toml +++ b/state-chain/chains/Cargo.toml @@ -58,7 +58,7 @@ tag = 'chainflip-monthly-2022-05' [dev-dependencies] hex-literal = {version = '0.3'} -web3 = {version='0.18', features = ['test']} +web3 = {git = 'https://github.com/tomusdrw/rust-web3.git', rev = '8796c88', features = ['test']} rand = {version='0.8.4'} [features] diff --git a/state-chain/pallets/cf-vaults/Cargo.toml b/state-chain/pallets/cf-vaults/Cargo.toml index e7856b92f5..b1887f9418 100644 --- a/state-chain/pallets/cf-vaults/Cargo.toml +++ b/state-chain/pallets/cf-vaults/Cargo.toml @@ -16,7 +16,6 @@ targets = ['x86_64-unknown-linux-gnu'] cf-chains = {path = '../../chains', default-features = false} cf-runtime-utilities = { path = '../../runtime-utilities', default-features = false, features = ['derive'] } cf-runtime-upgrade-utilities = { path = '../../runtime-upgrade-utilities', default-features = false } -pallet-cf-validator = { path = '../cf-validator', default-features = false } cf-traits = {path = '../../traits', default-features = false} utilities = {path = '../../../utilities', default-features = false} From bc8e541d1d5a43236d45650855a36be0d6595d7c Mon Sep 17 00:00:00 2001 From: Daniel Date: Mon, 9 May 2022 14:21:02 +0200 Subject: [PATCH 03/33] feat: remove subxt --- engine/Cargo.toml | 7 +- engine/src/state_chain/client.rs | 275 +++++++++--------------- engine/src/state_chain/client/signer.rs | 39 ++++ 3 files changed, 149 insertions(+), 172 deletions(-) create mode 100644 engine/src/state_chain/client/signer.rs diff --git a/engine/Cargo.toml b/engine/Cargo.toml index a66a53a0e2..bf3208d26f 100644 --- a/engine/Cargo.toml +++ b/engine/Cargo.toml @@ -99,15 +99,14 @@ features = ["lz4"] # substrate deps -[dependencies.subxt] -tag = 'chainflip-monthly-2022-05' -git = 'https://github.com/chainflip-io/substrate-subxt.git' - [dependencies.codec] features = ['derive', 'full'] package = 'parity-scale-codec' version = '3.0.0' +[dependencies.frame-metadata] +version = "15.0.0" + [dependencies.frame-support] git = 'https://github.com/chainflip-io/substrate.git' tag = 'chainflip-monthly-2022-05' diff --git a/engine/src/state_chain/client.rs b/engine/src/state_chain/client.rs index de69cd0911..ca8075d72d 100644 --- a/engine/src/state_chain/client.rs +++ b/engine/src/state_chain/client.rs @@ -1,12 +1,13 @@ -use anyhow::{Context, Result}; +use anyhow::{bail, Context, Result}; use cf_chains::ChainAbi; use cf_traits::{ChainflipAccountData, EpochIndex}; use codec::{Decode, Encode, FullCodec}; use custom_rpc::CustomClient; +use frame_metadata::RuntimeMetadata; use frame_support::metadata::RuntimeMetadataPrefixed; use frame_support::pallet_prelude::InvalidTransaction; +use frame_support::storage::storage_prefix; use frame_support::storage::types::QueryKindTrait; -use frame_support::unsigned::TransactionValidityError; use frame_system::Phase; use futures::{Stream, StreamExt, TryStreamExt}; use jsonrpc_core::{Error, ErrorCode, Value}; @@ -25,24 +26,15 @@ use sp_core::{ }; use sp_runtime::generic::Era; use sp_runtime::traits::{BlakeTwo256, Hash}; -use sp_runtime::AccountId32; +use sp_runtime::{AccountId32, MultiAddress}; use sp_version::RuntimeVersion; -use state_chain_runtime::{AccountId, PalletInstanceAlias, SignedBlock}; +use state_chain_runtime::{PalletInstanceAlias, SignedBlock}; use std::convert::TryFrom; use std::fmt::Debug; use std::net::Ipv6Addr; use std::str::FromStr; use std::sync::atomic::{AtomicU32, Ordering}; -use std::{marker::PhantomData, sync::Arc}; -use subxt::{ - balances::Balances, - extrinsic::{ - ChargeTransactionPayment, CheckEra, CheckGenesis, CheckNonce, CheckSpecVersion, - CheckTxVersion, CheckWeight, - }, - system::System, - Runtime, SignedExtension, SignedExtra, UncheckedExtrinsic, -}; +use std::sync::Arc; use tokio::sync::RwLock; use crate::common::{read_clean_and_decode_hex_str_file, rpc_error_into_anyhow_error}; @@ -50,102 +42,13 @@ use crate::constants::MAX_EXTRINSIC_RETRY_ATTEMPTS; use crate::logging::COMPONENT_KEY; use crate::settings; +mod signer; + #[cfg(test)] use mockall::automock; use async_trait::async_trait; -//////////////////// -// IMPORTANT: The types used here must match those in the state chain - -#[derive(Clone, Debug, PartialEq, Eq)] -pub struct RuntimeImplForSigningExtrinsics {} -impl System for RuntimeImplForSigningExtrinsics { - type Index = ::Index; - type BlockNumber = ::BlockNumber; - type Hash = ::Hash; - type Hashing = ::Hashing; - type AccountId = AccountId; - type Address = state_chain_runtime::Address; - type Header = ::Header; - type Extrinsic = state_chain_runtime::UncheckedExtrinsic; - type AccountData = ::AccountData; -} -impl Balances for RuntimeImplForSigningExtrinsics { - type Balance = ::Balance; -} -// Substrate_subxt's Runtime trait allows us to use it's extrinsic signing code -impl Runtime for RuntimeImplForSigningExtrinsics { - type Signature = state_chain_runtime::Signature; - type Extra = SCDefaultExtra; - fn register_type_sizes(_event_type_registry: &mut subxt::EventTypeRegistry) { - unreachable!(); - } -} - -/// Needed so we can use subxt's extrinsic signing code -/// Defines extra parameters contained in an extrinsic -#[derive(Encode, Decode, Clone, Eq, PartialEq, Debug)] -pub struct SCDefaultExtra { - spec_version: u32, - tx_version: u32, - nonce: T::Index, - genesis_hash: T::Hash, -} - -impl SignedExtra for SCDefaultExtra -where - T: System + Balances + Clone + Debug + Eq + Send + Sync, -{ - #[allow(clippy::type_complexity)] - type Extra = ( - CheckSpecVersion, - CheckTxVersion, - CheckGenesis, - CheckEra, - CheckNonce, - CheckWeight, - ChargeTransactionPayment, - ); - - fn new(spec_version: u32, tx_version: u32, nonce: T::Index, genesis_hash: T::Hash) -> Self { - SCDefaultExtra { - spec_version, - tx_version, - nonce, - genesis_hash, - } - } - - fn extra(&self) -> Self::Extra { - ( - CheckSpecVersion(PhantomData, self.spec_version), - CheckTxVersion(PhantomData, self.tx_version), - CheckGenesis(PhantomData, self.genesis_hash), - CheckEra((Era::Immortal, PhantomData), self.genesis_hash), - CheckNonce(self.nonce), - CheckWeight(PhantomData), - // Note: The tip is ignored in our runtime, but we need to provide one in order to - // use substrate's transaction fee logic. - ChargeTransactionPayment(Default::default()), - ) - } -} - -impl SignedExtension for SCDefaultExtra -where - T: System + Balances + Clone + Debug + Eq + Send + Sync, -{ - const IDENTIFIER: &'static str = "SCDefaultExtra"; - type AccountId = T::AccountId; - type Call = (); - type AdditionalSigned = <>::Extra as SignedExtension>::AdditionalSigned; - type Pre = (); - fn additional_signed(&self) -> Result { - self.extra().additional_signed() - } -} - type AuthorRpcClient = sc_rpc_api::author::AuthorClient< state_chain_runtime::Hash, ::Hash, @@ -185,7 +88,7 @@ pub trait StateChainRpcApi { /// sends a signed transaction. If the nonce is `None`, send an unsigned transaction. async fn submit_extrinsic_rpc( &self, - extrinsic: UncheckedExtrinsic, + extrinsic: state_chain_runtime::UncheckedExtrinsic, ) -> Result; async fn storage( @@ -227,7 +130,7 @@ pub trait StateChainRpcApi { impl StateChainRpcApi for StateChainRpcClient { async fn submit_extrinsic_rpc( &self, - extrinsic: UncheckedExtrinsic, + extrinsic: state_chain_runtime::UncheckedExtrinsic, ) -> Result { self.author_rpc_client .submit_extrinsic(Bytes::from(extrinsic.encode())) @@ -337,7 +240,7 @@ pub struct StateChainClient { runtime_version: RwLock, genesis_hash: state_chain_runtime::Hash, - pub signer: subxt::PairSigner, + pub signer: signer::PairSigner, state_chain_rpc_client: RpcClient, } @@ -363,7 +266,7 @@ pub fn mock_account_storage_key() -> StorageKey { #[cfg(test)] impl StateChainClient { pub fn create_test_sc_client(rpc_client: RpcClient) -> Self { - use subxt::PairSigner; + use signer::PairSigner; Self { heartbeat_block_interval: 20, @@ -487,41 +390,77 @@ mod storage_traits { } impl StateChainClient { + fn create_and_sign_extrinsic( + &self, + call: state_chain_runtime::Call, + runtime_version: &RuntimeVersion, + genesis_hash: state_chain_runtime::Hash, + nonce: state_chain_runtime::Index, + ) -> state_chain_runtime::UncheckedExtrinsic { + let extra: state_chain_runtime::SignedExtra = ( + frame_system::CheckNonZeroSender::new(), + frame_system::CheckSpecVersion::new(), + frame_system::CheckTxVersion::new(), + frame_system::CheckGenesis::new(), + frame_system::CheckEra::from(Era::Immortal), + frame_system::CheckNonce::from(nonce), + frame_system::CheckWeight::new(), + state_chain_runtime::ChargeTransactionPayment::from(0), + ); + let additional_signed = ( + (), + runtime_version.spec_version, + runtime_version.transaction_version, + genesis_hash, + genesis_hash, + (), + (), + (), + ); + + let signed_payload = state_chain_runtime::SignedPayload::from_raw( + call.clone(), + extra.clone(), + additional_signed, + ); + let signature = signed_payload.using_encoded(|bytes| self.signer.sign(bytes)); + + state_chain_runtime::UncheckedExtrinsic::new_signed( + call, + MultiAddress::Id(self.signer.account_id().clone()), + signature, + extra, + ) + } + /// Sign and submit an extrinsic, retrying up to [MAX_EXTRINSIC_RETRY_ATTEMPTS] times if it fails on an invalid nonce. - pub async fn submit_signed_extrinsic( + pub async fn submit_signed_extrinsic( &self, - extrinsic: Extrinsic, + call: Call, logger: &slog::Logger, ) -> Result where - state_chain_runtime::Call: std::convert::From, + Call: Into + Clone + std::fmt::Debug, { - let extrinsic = state_chain_runtime::Call::from(extrinsic); - let encoded_extrinsic = subxt::Encoded(extrinsic.encode()); for _ in 0..MAX_EXTRINSIC_RETRY_ATTEMPTS { // use the previous value but increment it for the next thread that loads/fetches it let nonce = self.nonce.fetch_add(1, Ordering::Relaxed); let runtime_version = { self.runtime_version.read().await.clone() }; match self .state_chain_rpc_client - .submit_extrinsic_rpc( - subxt::extrinsic::create_signed::( - &runtime_version, - self.genesis_hash, - nonce, - encoded_extrinsic.clone(), - &self.signer, - ) - .await - .expect("Should be able to sign"), - ) + .submit_extrinsic_rpc(self.create_and_sign_extrinsic( + call.clone().into(), + &runtime_version, + self.genesis_hash, + nonce, + )) .await { Ok(tx_hash) => { slog::info!( logger, "{:?} submitted successfully with tx_hash: {:#x}", - extrinsic, + &call, tx_hash ); return Ok(tx_hash); @@ -606,7 +545,7 @@ impl StateChainClient { logger, "Extrinsic failed with error: {}. Extrinsic: {:?}", err, - extrinsic + &call, ); self.nonce.fetch_sub(1, Ordering::Relaxed); return Err(err); @@ -621,29 +560,28 @@ impl StateChainClient { } /// Submit an unsigned extrinsic. - pub async fn submit_unsigned_extrinsic( + pub async fn submit_unsigned_extrinsic( &self, - extrinsic: Extrinsic, + call: Call, logger: &slog::Logger, ) -> Result where - state_chain_runtime::Call: std::convert::From, - Extrinsic: 'static + std::fmt::Debug + Clone + Send, + Call: Into + 'static + std::fmt::Debug + Clone + Send, { - let unsigned_tx = subxt::extrinsic::create_unsigned::( - subxt::Encoded(state_chain_runtime::Call::from(extrinsic.clone()).encode()), - ); - let expected_hash = BlakeTwo256::hash_of(&unsigned_tx); + let call = call.into(); + let expected_hash = BlakeTwo256::hash_of(&call); match self .state_chain_rpc_client - .submit_extrinsic_rpc(unsigned_tx) + .submit_extrinsic_rpc(state_chain_runtime::UncheckedExtrinsic::new_unsigned( + call.clone(), + )) .await { Ok(tx_hash) => { slog::info!( logger, "Unsigned extrinsic {:?} submitted successfully with tx_hash: {:#x}", - extrinsic, + &call, tx_hash ); assert_eq!( @@ -662,7 +600,7 @@ impl StateChainClient { // ignore the error and return the transaction hash if e.code == ErrorCode::ServerError(1013) => { - slog::trace!(logger, "Unsigned extrinsic {:?} with tx_hash {:#x} already in pool.", extrinsic, expected_hash); + slog::trace!(logger, "Unsigned extrinsic {:?} with tx_hash {:#x} already in pool.", &call, expected_hash); Ok(expected_hash) } _ => { @@ -671,7 +609,7 @@ impl StateChainClient { logger, "Unsigned extrinsic failed with error: {}. Extrinsic: {:?}", anyhow_error, - extrinsic + &call ); Err(anyhow_error) } @@ -989,9 +927,8 @@ async fn inner_connect_to_state_chain( impl Stream>, Arc>, )> { - use subxt::Signer; let logger = logger.new(o!(COMPONENT_KEY => "StateChainConnector")); - let signer = subxt::PairSigner::::new( + let signer = signer::PairSigner::::new( sp_core::sr25519::Pair::from_seed(&read_clean_and_decode_hex_str_file( &state_chain_settings.signing_key_file, "State Chain Signing Key", @@ -1066,8 +1003,8 @@ async fn inner_connect_to_state_chain( .map_err(rpc_error_into_anyhow_error)? { let account_info: frame_system::AccountInfo< - ::Index, - ::AccountData, + state_chain_runtime::Index, + ::AccountData, > = Decode::decode(&mut &encoded_account_info.0[..])?; Some(account_info.nonce) } else { @@ -1125,15 +1062,24 @@ async fn inner_connect_to_state_chain( latest_block_hash ); - let metadata = subxt::Metadata::try_from(RuntimeMetadataPrefixed::decode( + let RuntimeMetadataPrefixed(metadata_prefix, metadata) = RuntimeMetadataPrefixed::decode( &mut &state_chain_rpc_client .state_rpc_client .metadata(Some(latest_block_hash)) .await .map_err(rpc_error_into_anyhow_error)?[..], - )?)?; - - let system_pallet_metadata = metadata.module("System")?; + )?; + if metadata_prefix != frame_metadata::META_RESERVED { + bail!( + "Invalid Metadata Prefix {}, expected {}.", + metadata_prefix, + frame_metadata::META_RESERVED + ) + } + let metadata = match metadata { + RuntimeMetadata::V14(meta) => meta, + other => bail!("Invalid Metadata version {:?}, epected V14", other), + }; Ok(( latest_block_hash, @@ -1157,16 +1103,11 @@ async fn inner_connect_to_state_chain( state_chain_rpc_client, our_account_id, // TODO: Make this type safe: frame_system::Events::::hashed_key() - Events is private :( - events_storage_key: system_pallet_metadata.storage("Events")?.prefix(), - heartbeat_block_interval: metadata - .module("Reputation") - .expect("No module 'Reputation' in chain metadata") - .constant("HeartbeatBlockInterval") - .expect( - "No constant 'HeartbeatBlockInterval' in chain metadata for module 'Reputation'", - ) - .value::() - .expect("Could not decode HeartbeatBlockInterval to u32"), + events_storage_key: StorageKey(storage_prefix(b"System", b"Events").to_vec()), + heartbeat_block_interval: metadata.pallets.iter().find(|pallet| pallet.name == "Reputation").expect("No module 'Reputation' in chain metadata").constants.iter() + .find_map(|constant| if constant.name == "HeartbeatBlockInterval" { Some(&constant.value[..])} else { None }) + .ok_or(anyhow::anyhow!("No constant 'HeartbeatBlockInterval' in chain metadata for module 'Reputation'")) + .and_then(|value_bytes| Ok(u32::decode(&mut &value_bytes[..])?))?, }), )) } @@ -1404,17 +1345,15 @@ mod tests { mock_state_chain_rpc_client .expect_submit_extrinsic_rpc() .times(1) - .returning( - move |_ext: UncheckedExtrinsic| { - Err(RpcError::JsonRpcError(Error { - code: ErrorCode::ServerError(1010), - message: "Invalid Transaction".to_string(), - data: Some(Value::String( - <&'static str>::from(InvalidTransaction::BadProof).into(), - )), - })) - }, - ); + .returning(move |_ext: state_chain_runtime::UncheckedExtrinsic| { + Err(RpcError::JsonRpcError(Error { + code: ErrorCode::ServerError(1010), + message: "Invalid Transaction".to_string(), + data: Some(Value::String( + <&'static str>::from(InvalidTransaction::BadProof).into(), + )), + })) + }); // Second time called, should succeed mock_state_chain_rpc_client diff --git a/engine/src/state_chain/client/signer.rs b/engine/src/state_chain/client/signer.rs new file mode 100644 index 0000000000..b114844ae0 --- /dev/null +++ b/engine/src/state_chain/client/signer.rs @@ -0,0 +1,39 @@ +use sp_core::Pair; +use sp_runtime::traits::{IdentifyAccount, Verify}; +use state_chain_runtime::{AccountId, Signature}; + +/// A wrapper around a substrate [`Pair`] that can be used for signing. +#[derive(Clone, Debug)] +pub struct PairSigner { + account_id: AccountId, + signer: P, +} + +impl

PairSigner

+where + Signature: From, + ::Signer: From + IdentifyAccount, + P: Pair, +{ + /// Creates a new [`Signer`] from a [`Pair`]. + pub fn new(signer: P) -> Self { + let account_id = ::Signer::from(signer.public()).into_account(); + Self { account_id, signer } + } + + /// Returns the [`Pair`] implementation used to construct this. + pub fn signer(&self) -> &P { + &self.signer + } + + /// Return the account ID. + pub fn account_id(&self) -> &AccountId { + &self.account_id + } + + /// Takes a signer payload for an extrinsic, and returns a signature based on it. + /// + pub fn sign(&self, signer_payload: &[u8]) -> Signature { + self.signer.sign(signer_payload).into() + } +} From 017cf37cef1313b8e00d002339267643304e2c74 Mon Sep 17 00:00:00 2001 From: Daniel Date: Mon, 9 May 2022 15:27:13 +0200 Subject: [PATCH 04/33] chore: update benchmarks template --- state-chain/chainflip-weight-template.hbs | 160 +++++++++++----------- 1 file changed, 83 insertions(+), 77 deletions(-) diff --git a/state-chain/chainflip-weight-template.hbs b/state-chain/chainflip-weight-template.hbs index 33c965dacd..a5ca786ad0 100644 --- a/state-chain/chainflip-weight-template.hbs +++ b/state-chain/chainflip-weight-template.hbs @@ -1,11 +1,13 @@ //! Autogenerated weights for {{pallet}} //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION {{version}} -//! DATE: {{date}}, STEPS: `{{cmd.steps}}`, REPEAT: {{cmd.repeat}}, LOW RANGE: `{{cmd.lowest_range_values}}`, HIGH RANGE: `{{cmd.highest_range_values}}` -//! EXECUTION: {{cmd.execution}}, WASM-EXECUTION: {{cmd.wasm_execution}}, CHAIN: {{cmd.chain}}, DB CACHE: {{cmd.db_cache}} +//! DATE: {{date}}, STEPS: `{{cmd.steps}}`, REPEAT: {{cmd.repeat}}, LOW RANGE: `{{cmd.lowest_range_values}}`, HIGH +RANGE: `{{cmd.highest_range_values}}` +//! EXECUTION: {{cmd.execution}}, WASM-EXECUTION: {{cmd.wasm_execution}}, CHAIN: {{cmd.chain}}, DB CACHE: +{{cmd.db_cache}} // Executed Command: -{{#each args as |arg|~}} +{{#each args as |arg|}} // {{arg}} {{/each}} @@ -18,82 +20,86 @@ use sp_std::marker::PhantomData; /// Weight functions needed for {{pallet}}. pub trait WeightInfo { - {{~#each benchmarks as |benchmark|}} - fn {{benchmark.name~}} - ( - {{~#each benchmark.components as |c| ~}} - {{c.name}}: u32, {{/each~}} - ) -> Weight; - {{~/each}} +{{#each benchmarks as |benchmark|}} +fn {{benchmark.name}} +( +{{#each benchmark.components as |c| }} +{{c.name}}: u32, {{/each}} +) -> Weight; +{{/each}} } /// Weights for {{pallet}} using the Substrate node and recommended hardware. pub struct PalletWeight(PhantomData); -{{~#if (eq pallet "frame_system")}} -impl WeightInfo for WeightInfo { -{{~else}} -impl WeightInfo for PalletWeight { -{{~/if}} - {{~#each benchmarks as |benchmark|}} - {{~#each benchmark.comments as |comment|}} - // {{comment}} - {{~/each}} - fn {{benchmark.name~}} - ( - {{~#each benchmark.components as |c| ~}} - {{~#if (not c.is_used)}}_{{/if}}{{c.name}}: u32, {{/each~}} - ) -> Weight { - #[allow(clippy::unnecessary_cast)] - ({{underscore benchmark.base_weight}} as Weight) - {{~#each benchmark.component_weight as |cw|}} - // Standard Error: {{underscore cw.error}} - .saturating_add(({{underscore cw.slope}} as Weight).saturating_mul({{cw.name}} as Weight)) - {{~/each}} - {{~#if (ne benchmark.base_reads "0")}} - .saturating_add(T::DbWeight::get().reads({{benchmark.base_reads}} as Weight)) - {{~/if}} - {{~#each benchmark.component_reads as |cr|}} - .saturating_add(T::DbWeight::get().reads(({{cr.slope}} as Weight).saturating_mul({{cr.name}} as Weight))) - {{~/each}} - {{~#if (ne benchmark.base_writes "0")}} - .saturating_add(T::DbWeight::get().writes({{benchmark.base_writes}} as Weight)) - {{~/if}} - {{~#each benchmark.component_writes as |cw|}} - .saturating_add(T::DbWeight::get().writes(({{cw.slope}} as Weight).saturating_mul({{cw.name}} as Weight))) - {{~/each}} - } - {{~/each}} -} + {{#if (eq pallet "frame_system")}} + impl WeightInfo for WeightInfo { + {{else}} + impl WeightInfo for PalletWeight { + {{/if}} + {{#each benchmarks as |benchmark|}} + {{#each benchmark.comments as |comment|}} + // {{comment}} + {{/each}} + fn {{benchmark.name}} + ( + {{#each benchmark.components as |c| }} + {{#if (not c.is_used)}}_{{/if}}{{c.name}}: u32, {{/each}} + ) -> Weight { + #[allow(clippy::unnecessary_cast)] + ({{underscore benchmark.base_weight}} as Weight) + {{#each benchmark.component_weight as |cw|}} + // Standard Error: {{underscore cw.error}} + .saturating_add(({{underscore cw.slope}} as Weight).saturating_mul({{cw.name}} as Weight)) + {{/each}} + {{#if (ne benchmark.base_reads "0")}} + .saturating_add(T::DbWeight::get().reads({{benchmark.base_reads}} as Weight)) + {{/if}} + {{#each benchmark.component_reads as |cr|}} + .saturating_add(T::DbWeight::get().reads(({{cr.slope}} as Weight).saturating_mul({{cr.name}} as + Weight))) + {{/each}} + {{#if (ne benchmark.base_writes "0")}} + .saturating_add(T::DbWeight::get().writes({{benchmark.base_writes}} as Weight)) + {{/if}} + {{#each benchmark.component_writes as |cw|}} + .saturating_add(T::DbWeight::get().writes(({{cw.slope}} as Weight).saturating_mul({{cw.name}} as + Weight))) + {{/each}} + } + {{/each}} + } -// For backwards compatibility and tests -impl WeightInfo for () { - {{~#each benchmarks as |benchmark|}} - {{~#each benchmark.comments as |comment|}} - // {{comment}} - {{~/each}} - fn {{benchmark.name~}} - ( - {{~#each benchmark.components as |c| ~}} - {{~#if (not c.is_used)}}_{{/if}}{{c.name}}: u32, {{/each~}} - ) -> Weight { - #[allow(clippy::unnecessary_cast)] - ({{underscore benchmark.base_weight}} as Weight) - {{~#each benchmark.component_weight as |cw|}} - // Standard Error: {{underscore cw.error}} - .saturating_add(({{underscore cw.slope}} as Weight).saturating_mul({{cw.name}} as Weight)) - {{~/each}} - {{~#if (ne benchmark.base_reads "0")}} - .saturating_add(RocksDbWeight::get().reads({{benchmark.base_reads}} as Weight)) - {{~/if}} - {{~#each benchmark.component_reads as |cr|}} - .saturating_add(RocksDbWeight::get().reads(({{cr.slope}} as Weight).saturating_mul({{cr.name}} as Weight))) - {{~/each}} - {{~#if (ne benchmark.base_writes "0")}} - .saturating_add(RocksDbWeight::get().writes({{benchmark.base_writes}} as Weight)) - {{~/if}} - {{~#each benchmark.component_writes as |cw|}} - .saturating_add(RocksDbWeight::get().writes(({{cw.slope}} as Weight).saturating_mul({{cw.name}} as Weight))) - {{~/each}} - } - {{~/each}} -} \ No newline at end of file + // For backwards compatibility and tests + impl WeightInfo for () { + {{#each benchmarks as |benchmark|}} + {{#each benchmark.comments as |comment|}} + // {{comment}} + {{/each}} + fn {{benchmark.name}} + ( + {{#each benchmark.components as |c| }} + {{#if (not c.is_used)}}_{{/if}}{{c.name}}: u32, {{/each}} + ) -> Weight { + #[allow(clippy::unnecessary_cast)] + ({{underscore benchmark.base_weight}} as Weight) + {{#each benchmark.component_weight as |cw|}} + // Standard Error: {{underscore cw.error}} + .saturating_add(({{underscore cw.slope}} as Weight).saturating_mul({{cw.name}} as Weight)) + {{/each}} + {{#if (ne benchmark.base_reads "0")}} + .saturating_add(RocksDbWeight::get().reads({{benchmark.base_reads}} as Weight)) + {{/if}} + {{#each benchmark.component_reads as |cr|}} + .saturating_add(RocksDbWeight::get().reads(({{cr.slope}} as Weight).saturating_mul({{cr.name}} + as Weight))) + {{/each}} + {{#if (ne benchmark.base_writes "0")}} + .saturating_add(RocksDbWeight::get().writes({{benchmark.base_writes}} as Weight)) + {{/if}} + {{#each benchmark.component_writes as |cw|}} + .saturating_add(RocksDbWeight::get().writes(({{cw.slope}} as Weight).saturating_mul({{cw.name}} + as Weight))) + {{/each}} + } + {{/each}} + } \ No newline at end of file From 34e333bbc95aa635989478223d7bcc7bafb11f35 Mon Sep 17 00:00:00 2001 From: Daniel Date: Mon, 9 May 2022 15:46:58 +0200 Subject: [PATCH 05/33] fix: benchmarking and try-runtime compiles --- Cargo.lock | 1118 ++++++----------- .../cf-environment/src/benchmarking.rs | 2 +- .../pallets/cf-flip/src/benchmarking.rs | 6 +- .../pallets/cf-governance/src/benchmarking.rs | 14 +- .../pallets/cf-reputation/src/benchmarking.rs | 8 +- .../pallets/cf-staking/src/benchmarking.rs | 81 +- .../src/benchmarking.rs | 2 +- .../pallets/cf-validator/src/benchmarking.rs | 4 +- .../pallets/cf-vaults/src/benchmarking.rs | 9 +- .../pallets/cf-witnesser/src/benchmarking.rs | 2 +- .../runtime-upgrade-utilities/src/lib.rs | 2 +- state-chain/runtime/src/lib.rs | 87 +- 12 files changed, 479 insertions(+), 856 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d2f73f0f35..9097adf86e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -780,8 +780,8 @@ dependencies = [ "scale-info", "secp256k1 0.20.3", "serde 1.0.137", - "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-runtime", + "sp-std", "web3", ] @@ -825,13 +825,13 @@ dependencies = [ "scale-info", "sp-block-builder", "sp-consensus-aura", - "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-core", "sp-finality-grandpa", "sp-inherents", "sp-offchain", - "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-runtime", "sp-session", - "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-std", "sp-transaction-pool", "sp-version", "state-chain-runtime", @@ -841,7 +841,7 @@ dependencies = [ name = "cf-runtime-benchmark-utilities" version = "0.1.0" dependencies = [ - "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-std", ] [[package]] @@ -858,8 +858,8 @@ version = "0.1.0" dependencies = [ "frame-support", "log 0.4.17", - "sp-io 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-io", + "sp-std", ] [[package]] @@ -870,9 +870,9 @@ dependencies = [ "frame-support", "log 0.4.17", "parity-scale-codec", - "sp-io 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-io", + "sp-runtime", + "sp-std", ] [[package]] @@ -893,10 +893,10 @@ dependencies = [ "log 0.4.17", "parity-scale-codec", "scale-info", - "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-io 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", ] [[package]] @@ -954,7 +954,7 @@ dependencies = [ "serde 1.0.137", "slog", "sp-consensus-aura", - "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-core", "sp-finality-grandpa", "state-chain-runtime", "structopt", @@ -983,6 +983,7 @@ dependencies = [ "dyn-clone", "env_logger", "ethbloom", + "frame-metadata", "frame-support", "frame-system", "fs_extra", @@ -1035,14 +1036,13 @@ dependencies = [ "slog", "slog-async", "slog-json", - "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-core", "sp-keyring", "sp-rpc", - "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-runtime", "sp-version", "state-chain-runtime", "structopt", - "subxt", "tempfile", "thiserror", "tokio", @@ -1092,11 +1092,11 @@ dependencies = [ "sp-blockchain", "sp-consensus", "sp-consensus-aura", - "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-core", "sp-finality-grandpa", "sp-inherents", "sp-keyring", - "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-runtime", "sp-timestamp", "state-chain-runtime", "structopt", @@ -1657,7 +1657,7 @@ dependencies = [ "sc-rpc", "sc-rpc-api", "sp-api", - "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-runtime", "state-chain-runtime", ] @@ -1667,18 +1667,8 @@ version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0d706e75d87e35569db781a9b5e2416cff1236a47ed380831f959382ccd5f858" dependencies = [ - "darling_core 0.10.2", - "darling_macro 0.10.2", -] - -[[package]] -name = "darling" -version = "0.14.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4529658bdda7fd6769b8614be250cdcfc3aeb0ee72fe66f9e41e5e5eb73eac02" -dependencies = [ - "darling_core 0.14.1", - "darling_macro 0.14.1", + "darling_core", + "darling_macro", ] [[package]] @@ -1695,38 +1685,13 @@ dependencies = [ "syn", ] -[[package]] -name = "darling_core" -version = "0.14.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "649c91bc01e8b1eac09fb91e8dbc7d517684ca6be8ebc75bb9cafc894f9fdb6f" -dependencies = [ - "fnv", - "ident_case", - "proc-macro2", - "quote", - "strsim 0.10.0", - "syn", -] - [[package]] name = "darling_macro" version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9b5a2f4ac4969822c62224815d069952656cadc7084fdca9751e6d959189b72" dependencies = [ - "darling_core 0.10.2", - "quote", - "syn", -] - -[[package]] -name = "darling_macro" -version = "0.14.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddfc69c5bfcbd2fc09a0f38451d2daf0e372e367986a83906d1b0dbc88134fb5" -dependencies = [ - "darling_core 0.14.1", + "darling_core", "quote", "syn", ] @@ -1775,24 +1740,13 @@ dependencies = [ "const-oid 0.7.1", ] -[[package]] -name = "derivative" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "derive_builder" version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2658621297f2cf68762a6f7dc0bb7e1ff2cfd6583daef8ee0fed6f7ec468ec0" dependencies = [ - "darling 0.10.2", + "darling", "derive_builder_core", "proc-macro2", "quote", @@ -1805,7 +1759,7 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2791ea3e372c8495c0bc2033991d76b512cd799d07491fbd6890124db9458bef" dependencies = [ - "darling 0.10.2", + "darling", "proc-macro2", "quote", "syn", @@ -2420,12 +2374,12 @@ dependencies = [ "scale-info", "serde 1.0.137", "sp-api", - "sp-application-crypto 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-io 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-runtime-interface 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-storage 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-application-crypto", + "sp-io", + "sp-runtime", + "sp-runtime-interface", + "sp-std", + "sp-storage", ] [[package]] @@ -2464,15 +2418,15 @@ dependencies = [ "serde_nanos", "sp-api", "sp-blockchain", - "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-core", "sp-database", - "sp-externalities 0.12.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-externalities", "sp-inherents", - "sp-keystore 0.12.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-state-machine 0.12.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-storage 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-trie 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-keystore", + "sp-runtime", + "sp-state-machine", + "sp-storage", + "sp-trie", "tempfile", "thiserror", "thousands", @@ -2487,11 +2441,11 @@ dependencies = [ "frame-system", "parity-scale-codec", "scale-info", - "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-io 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-tracing 5.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", + "sp-tracing", ] [[package]] @@ -2523,16 +2477,16 @@ dependencies = [ "scale-info", "serde 1.0.137", "smallvec 1.8.0", - "sp-arithmetic 5.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-arithmetic", + "sp-core", "sp-core-hashing-proc-macro", "sp-inherents", - "sp-io 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-io", + "sp-runtime", "sp-staking", - "sp-state-machine 0.12.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-tracing 5.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-state-machine", + "sp-std", + "sp-tracing", "tt-call", ] @@ -2580,10 +2534,10 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde 1.0.137", - "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-io 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", "sp-version", ] @@ -2597,9 +2551,9 @@ dependencies = [ "frame-system", "parity-scale-codec", "scale-info", - "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-core", + "sp-runtime", + "sp-std", ] [[package]] @@ -2618,8 +2572,8 @@ source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthl dependencies = [ "frame-support", "sp-api", - "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-runtime", + "sp-std", ] [[package]] @@ -3598,7 +3552,6 @@ version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "91dc760c341fa81173f9a434931aaf32baad5552b0230cc6c93e8fb7eaad4c19" dependencies = [ - "jsonrpsee-client-transport", "jsonrpsee-core", "jsonrpsee-proc-macros", "jsonrpsee-types", @@ -4845,8 +4798,8 @@ dependencies = [ "sc-service", "serde 1.0.137", "serde_json", - "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-core", + "sp-runtime", "tokio", "tokio-stream", ] @@ -5290,10 +5243,10 @@ dependencies = [ "pallet-timestamp", "parity-scale-codec", "scale-info", - "sp-application-crypto 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-application-crypto", "sp-consensus-aura", - "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-runtime", + "sp-std", ] [[package]] @@ -5307,8 +5260,8 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-authorship", - "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-runtime", + "sp-std", ] [[package]] @@ -5325,10 +5278,10 @@ dependencies = [ "log 0.4.17", "parity-scale-codec", "scale-info", - "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-io 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", ] [[package]] @@ -5345,10 +5298,10 @@ dependencies = [ "pallet-cf-threshold-signature", "parity-scale-codec", "scale-info", - "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-io 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", ] [[package]] @@ -5365,11 +5318,11 @@ dependencies = [ "pallet-cf-flip", "parity-scale-codec", "scale-info", - "sp-arithmetic 5.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-io 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-arithmetic", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", ] [[package]] @@ -5383,10 +5336,10 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde 1.0.137", - "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-io 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", ] [[package]] @@ -5400,10 +5353,10 @@ dependencies = [ "pallet-transaction-payment", "parity-scale-codec", "scale-info", - "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-io 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", ] [[package]] @@ -5417,10 +5370,10 @@ dependencies = [ "frame-system", "parity-scale-codec", "scale-info", - "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-io 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", ] [[package]] @@ -5435,10 +5388,10 @@ dependencies = [ "pallet-cf-validator", "parity-scale-codec", "scale-info", - "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-io 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", ] [[package]] @@ -5454,10 +5407,10 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde 1.0.137", - "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-io 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", ] [[package]] @@ -5475,10 +5428,10 @@ dependencies = [ "pallet-cf-validator", "parity-scale-codec", "scale-info", - "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-io 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", ] [[package]] @@ -5497,10 +5450,10 @@ dependencies = [ "pallet-cf-validator", "parity-scale-codec", "scale-info", - "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-io 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", ] [[package]] @@ -5518,10 +5471,10 @@ dependencies = [ "pallet-session", "parity-scale-codec", "scale-info", - "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-io 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", ] [[package]] @@ -5540,10 +5493,10 @@ dependencies = [ "log 0.4.17", "parity-scale-codec", "scale-info", - "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-io 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", "utilities", ] @@ -5561,10 +5514,10 @@ dependencies = [ "pallet-cf-validator", "parity-scale-codec", "scale-info", - "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-io 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", "utilities", ] @@ -5581,14 +5534,14 @@ dependencies = [ "pallet-session", "parity-scale-codec", "scale-info", - "sp-application-crypto 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-application-crypto", + "sp-core", "sp-finality-grandpa", - "sp-io 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-io", + "sp-runtime", "sp-session", "sp-staking", - "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-std", ] [[package]] @@ -5601,8 +5554,8 @@ dependencies = [ "parity-scale-codec", "safe-mix", "scale-info", - "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-runtime", + "sp-std", ] [[package]] @@ -5617,13 +5570,13 @@ dependencies = [ "pallet-timestamp", "parity-scale-codec", "scale-info", - "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-io 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-core", + "sp-io", + "sp-runtime", "sp-session", "sp-staking", - "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-trie 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-std", + "sp-trie", ] [[package]] @@ -5638,9 +5591,9 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-inherents", - "sp-io 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-io", + "sp-runtime", + "sp-std", "sp-timestamp", ] @@ -5655,10 +5608,10 @@ dependencies = [ "scale-info", "serde 1.0.137", "smallvec 1.8.0", - "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-io 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", ] [[package]] @@ -5673,9 +5626,9 @@ dependencies = [ "parity-scale-codec", "sp-api", "sp-blockchain", - "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-core", "sp-rpc", - "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-runtime", ] [[package]] @@ -5686,7 +5639,7 @@ dependencies = [ "pallet-transaction-payment", "parity-scale-codec", "sp-api", - "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-runtime", ] [[package]] @@ -6756,9 +6709,9 @@ dependencies = [ "parity-scale-codec", "serde 1.0.137", "serde_json", - "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-io 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-core", + "sp-io", + "sp-runtime", "sp-version", ] @@ -7098,8 +7051,8 @@ version = "4.1.0-dev" source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ "log 0.4.17", - "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-wasm-interface 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-core", + "sp-wasm-interface", "thiserror", ] @@ -7120,9 +7073,9 @@ dependencies = [ "sp-api", "sp-blockchain", "sp-consensus", - "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-core", "sp-inherents", - "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-runtime", "substrate-prometheus-endpoint", ] @@ -7136,10 +7089,10 @@ dependencies = [ "sp-api", "sp-block-builder", "sp-blockchain", - "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-core", "sp-inherents", - "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-state-machine 0.12.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-runtime", + "sp-state-machine", ] [[package]] @@ -7155,8 +7108,8 @@ dependencies = [ "sc-telemetry", "serde 1.0.137", "serde_json", - "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-core", + "sp-runtime", ] [[package]] @@ -7198,11 +7151,11 @@ dependencies = [ "serde 1.0.137", "serde_json", "sp-blockchain", - "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-core", "sp-keyring", - "sp-keystore 0.12.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-panic-handler 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-keystore", + "sp-panic-handler", + "sp-runtime", "sp-version", "thiserror", "tiny-bip39", @@ -7226,14 +7179,14 @@ dependencies = [ "sp-api", "sp-blockchain", "sp-consensus", - "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-core", "sp-database", - "sp-externalities 0.12.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-keystore 0.12.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-state-machine 0.12.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-storage 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-trie 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-externalities", + "sp-keystore", + "sp-runtime", + "sp-state-machine", + "sp-storage", + "sp-trie", "substrate-prometheus-endpoint", ] @@ -7253,13 +7206,13 @@ dependencies = [ "parking_lot 0.12.0", "sc-client-api", "sc-state-db", - "sp-arithmetic 5.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-arithmetic", "sp-blockchain", - "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-core", "sp-database", - "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-state-machine 0.12.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-trie 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-runtime", + "sp-state-machine", + "sp-trie", ] [[package]] @@ -7279,9 +7232,9 @@ dependencies = [ "sp-api", "sp-blockchain", "sp-consensus", - "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-state-machine 0.12.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-core", + "sp-runtime", + "sp-state-machine", "substrate-prometheus-endpoint", "thiserror", ] @@ -7301,16 +7254,16 @@ dependencies = [ "sc-consensus-slots", "sc-telemetry", "sp-api", - "sp-application-crypto 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-application-crypto", "sp-block-builder", "sp-blockchain", "sp-consensus", "sp-consensus-aura", "sp-consensus-slots", - "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-core", "sp-inherents", - "sp-keystore 0.12.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-keystore", + "sp-runtime", "substrate-prometheus-endpoint", "thiserror", ] @@ -7328,14 +7281,14 @@ dependencies = [ "sc-client-api", "sc-consensus", "sc-telemetry", - "sp-arithmetic 5.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-arithmetic", "sp-blockchain", "sp-consensus", "sp-consensus-slots", - "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-core", "sp-inherents", - "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-state-machine 0.12.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-runtime", + "sp-state-machine", "sp-timestamp", "thiserror", ] @@ -7353,16 +7306,16 @@ dependencies = [ "sc-executor-wasmi", "sc-executor-wasmtime", "sp-api", - "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-core", "sp-core-hashing-proc-macro", - "sp-externalities 0.12.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-io 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-panic-handler 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-runtime-interface 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-externalities", + "sp-io", + "sp-panic-handler", + "sp-runtime-interface", "sp-tasks", - "sp-trie 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-trie", "sp-version", - "sp-wasm-interface 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-wasm-interface", "tracing", "wasmi", ] @@ -7378,7 +7331,7 @@ dependencies = [ "sp-maybe-compressed-blob", "sp-sandbox", "sp-serializer", - "sp-wasm-interface 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-wasm-interface", "thiserror", "wasm-instrument", "wasmi", @@ -7393,9 +7346,9 @@ dependencies = [ "parity-scale-codec", "sc-allocator", "sc-executor-common", - "sp-runtime-interface 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-runtime-interface", "sp-sandbox", - "sp-wasm-interface 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-wasm-interface", "wasmi", ] @@ -7411,9 +7364,9 @@ dependencies = [ "parity-wasm 0.42.2", "sc-allocator", "sc-executor-common", - "sp-runtime-interface 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-runtime-interface", "sp-sandbox", - "sp-wasm-interface 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-wasm-interface", "wasmtime", ] @@ -7445,14 +7398,14 @@ dependencies = [ "sc-utils", "serde_json", "sp-api", - "sp-application-crypto 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-arithmetic 5.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-application-crypto", + "sp-arithmetic", "sp-blockchain", "sp-consensus", - "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-core", "sp-finality-grandpa", - "sp-keystore 0.12.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-keystore", + "sp-runtime", "substrate-prometheus-endpoint", "thiserror", ] @@ -7471,7 +7424,7 @@ dependencies = [ "sc-network", "sc-transaction-pool-api", "sp-blockchain", - "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-runtime", ] [[package]] @@ -7483,9 +7436,9 @@ dependencies = [ "hex", "parking_lot 0.12.0", "serde_json", - "sp-application-crypto 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-keystore 0.12.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-application-crypto", + "sp-core", + "sp-keystore", "thiserror", ] @@ -7525,12 +7478,12 @@ dependencies = [ "serde 1.0.137", "serde_json", "smallvec 1.8.0", - "sp-arithmetic 5.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-arithmetic", "sp-blockchain", "sp-consensus", - "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-core", "sp-finality-grandpa", - "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-runtime", "substrate-prometheus-endpoint", "thiserror", "unsigned-varint 0.6.0", @@ -7550,7 +7503,7 @@ dependencies = [ "log 0.4.17", "lru 0.7.5", "sc-network", - "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-runtime", "substrate-prometheus-endpoint", "tracing", ] @@ -7576,9 +7529,9 @@ dependencies = [ "sc-network", "sc-utils", "sp-api", - "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-core", "sp-offchain", - "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-runtime", "threadpool", "tracing", ] @@ -7628,11 +7581,11 @@ dependencies = [ "serde_json", "sp-api", "sp-blockchain", - "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-keystore 0.12.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-core", + "sp-keystore", "sp-offchain", "sp-rpc", - "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-runtime", "sp-session", "sp-version", ] @@ -7655,10 +7608,10 @@ dependencies = [ "scale-info", "serde 1.0.137", "serde_json", - "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-core", "sp-rpc", - "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-tracing 5.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-runtime", + "sp-tracing", "sp-version", "thiserror", ] @@ -7720,22 +7673,22 @@ dependencies = [ "serde 1.0.137", "serde_json", "sp-api", - "sp-application-crypto 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-application-crypto", "sp-block-builder", "sp-blockchain", "sp-consensus", - "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-externalities 0.12.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-core", + "sp-externalities", "sp-inherents", - "sp-keystore 0.12.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-keystore", + "sp-runtime", "sp-session", - "sp-state-machine 0.12.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-storage 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-tracing 5.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-state-machine", + "sp-storage", + "sp-tracing", "sp-transaction-pool", "sp-transaction-storage-proof", - "sp-trie 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-trie", "sp-version", "substrate-prometheus-endpoint", "tempfile", @@ -7756,7 +7709,7 @@ dependencies = [ "parity-util-mem-derive", "parking_lot 0.12.0", "sc-client-api", - "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-core", ] [[package]] @@ -7773,9 +7726,9 @@ dependencies = [ "sc-telemetry", "serde 1.0.137", "serde_json", - "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-io 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-core", + "sp-io", + "sp-std", ] [[package]] @@ -7817,10 +7770,10 @@ dependencies = [ "serde 1.0.137", "sp-api", "sp-blockchain", - "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-core", "sp-rpc", - "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-tracing 5.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-runtime", + "sp-tracing", "thiserror", "tracing", "tracing-log", @@ -7857,9 +7810,9 @@ dependencies = [ "serde 1.0.137", "sp-api", "sp-blockchain", - "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-tracing 5.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-core", + "sp-runtime", + "sp-tracing", "sp-transaction-pool", "substrate-prometheus-endpoint", "thiserror", @@ -7874,7 +7827,7 @@ dependencies = [ "log 0.4.17", "serde 1.0.137", "sp-blockchain", - "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-runtime", "thiserror", ] @@ -8450,10 +8403,10 @@ dependencies = [ "log 0.4.17", "parity-scale-codec", "sp-api-proc-macro", - "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-state-machine 0.12.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-core", + "sp-runtime", + "sp-state-machine", + "sp-std", "sp-version", "thiserror", ] @@ -8470,20 +8423,6 @@ dependencies = [ "syn", ] -[[package]] -name = "sp-application-crypto" -version = "6.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acb4490364cb3b097a6755343e552495b0013778152300714be4647d107e9a2e" -dependencies = [ - "parity-scale-codec", - "scale-info", - "serde 1.0.137", - "sp-core 6.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-io 6.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-std 4.0.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "sp-application-crypto" version = "6.0.0" @@ -8492,25 +8431,9 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde 1.0.137", - "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-io 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", -] - -[[package]] -name = "sp-arithmetic" -version = "5.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31ef21f82cc10f75ed046b65e2f8048080ee76e59f1b8aed55c7150daebfd35b" -dependencies = [ - "integer-sqrt", - "num-traits 0.2.15", - "parity-scale-codec", - "scale-info", - "serde 1.0.137", - "sp-debug-derive 4.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-std 4.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "static_assertions", + "sp-core", + "sp-io", + "sp-std", ] [[package]] @@ -8523,8 +8446,8 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde 1.0.137", - "sp-debug-derive 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-debug-derive", + "sp-std", "static_assertions", ] @@ -8536,8 +8459,8 @@ dependencies = [ "async-trait", "parity-scale-codec", "sp-inherents", - "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-runtime", + "sp-std", ] [[package]] @@ -8548,8 +8471,8 @@ dependencies = [ "parity-scale-codec", "sp-api", "sp-inherents", - "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-runtime", + "sp-std", ] [[package]] @@ -8565,8 +8488,8 @@ dependencies = [ "sp-api", "sp-consensus", "sp-database", - "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-state-machine 0.12.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-runtime", + "sp-state-machine", "thiserror", ] @@ -8580,11 +8503,11 @@ dependencies = [ "futures-timer", "log 0.4.17", "parity-scale-codec", - "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-core", "sp-inherents", - "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-state-machine 0.12.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-runtime", + "sp-state-machine", + "sp-std", "sp-version", "thiserror", ] @@ -8598,12 +8521,12 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-api", - "sp-application-crypto 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-application-crypto", "sp-consensus", "sp-consensus-slots", "sp-inherents", - "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-runtime", + "sp-std", "sp-timestamp", ] @@ -8615,59 +8538,12 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde 1.0.137", - "sp-arithmetic 5.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-arithmetic", + "sp-runtime", + "sp-std", "sp-timestamp", ] -[[package]] -name = "sp-core" -version = "6.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77963e2aa8fadb589118c3aede2e78b6c4bcf1c01d588fbf33e915b390825fbd" -dependencies = [ - "base58", - "bitflags", - "blake2-rfc", - "byteorder", - "dyn-clonable", - "ed25519-dalek", - "futures 0.3.21", - "hash-db", - "hash256-std-hasher", - "hex", - "impl-serde", - "lazy_static", - "libsecp256k1", - "log 0.4.17", - "merlin", - "num-traits 0.2.15", - "parity-scale-codec", - "parity-util-mem", - "parking_lot 0.12.0", - "primitive-types", - "rand 0.7.3", - "regex", - "scale-info", - "schnorrkel", - "secp256k1 0.21.3", - "secrecy", - "serde 1.0.137", - "sp-core-hashing 4.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-debug-derive 4.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-externalities 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-runtime-interface 6.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-std 4.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-storage 6.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "ss58-registry", - "substrate-bip39", - "thiserror", - "tiny-bip39", - "wasmi", - "zeroize", -] - [[package]] name = "sp-core" version = "6.0.0" @@ -8700,12 +8576,12 @@ dependencies = [ "secp256k1 0.21.3", "secrecy", "serde 1.0.137", - "sp-core-hashing 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-debug-derive 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-externalities 0.12.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-runtime-interface 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-storage 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-core-hashing", + "sp-debug-derive", + "sp-externalities", + "sp-runtime-interface", + "sp-std", + "sp-storage", "ss58-registry", "substrate-bip39", "thiserror", @@ -8714,20 +8590,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "sp-core-hashing" -version = "4.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec864a6a67249f0c8dd3d5acab43623a61677e85ff4f2f9b04b802d2fe780e83" -dependencies = [ - "blake2-rfc", - "byteorder", - "sha2 0.9.9", - "sp-std 4.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tiny-keccak", - "twox-hash", -] - [[package]] name = "sp-core-hashing" version = "4.0.0" @@ -8738,7 +8600,7 @@ dependencies = [ "digest 0.10.3", "sha2 0.10.2", "sha3 0.10.1", - "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-std", "twox-hash", ] @@ -8749,7 +8611,7 @@ source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthl dependencies = [ "proc-macro2", "quote", - "sp-core-hashing 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-core-hashing", "syn", ] @@ -8762,17 +8624,6 @@ dependencies = [ "parking_lot 0.12.0", ] -[[package]] -name = "sp-debug-derive" -version = "4.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d676664972e22a0796176e81e7bec41df461d1edf52090955cdab55f2c956ff2" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "sp-debug-derive" version = "4.0.0" @@ -8783,18 +8634,6 @@ dependencies = [ "syn", ] -[[package]] -name = "sp-externalities" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fcfd91f92a2a59224230a77c4a5d6f51709620c0aab4e51f108ccece6adc56f" -dependencies = [ - "environmental", - "parity-scale-codec", - "sp-std 4.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-storage 6.0.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "sp-externalities" version = "0.12.0" @@ -8802,8 +8641,8 @@ source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthl dependencies = [ "environmental", "parity-scale-codec", - "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-storage 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-std", + "sp-storage", ] [[package]] @@ -8817,11 +8656,11 @@ dependencies = [ "scale-info", "serde 1.0.137", "sp-api", - "sp-application-crypto 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-keystore 0.12.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-application-crypto", + "sp-core", + "sp-keystore", + "sp-runtime", + "sp-std", ] [[package]] @@ -8832,38 +8671,12 @@ dependencies = [ "async-trait", "impl-trait-for-tuples", "parity-scale-codec", - "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-core", + "sp-runtime", + "sp-std", "thiserror", ] -[[package]] -name = "sp-io" -version = "6.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "935fd3c71bad6811a7984cabb74d323b8ca3107024024c3eabb610e0182ba8d3" -dependencies = [ - "futures 0.3.21", - "hash-db", - "libsecp256k1", - "log 0.4.17", - "parity-scale-codec", - "parking_lot 0.12.0", - "secp256k1 0.21.3", - "sp-core 6.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-externalities 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-keystore 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-runtime-interface 6.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-state-machine 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-std 4.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-tracing 5.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-trie 6.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-wasm-interface 6.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tracing", - "tracing-core", -] - [[package]] name = "sp-io" version = "6.0.0" @@ -8876,15 +8689,15 @@ dependencies = [ "parity-scale-codec", "parking_lot 0.12.0", "secp256k1 0.21.3", - "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-externalities 0.12.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-keystore 0.12.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-runtime-interface 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-state-machine 0.12.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-tracing 5.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-trie 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-wasm-interface 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-core", + "sp-externalities", + "sp-keystore", + "sp-runtime-interface", + "sp-state-machine", + "sp-std", + "sp-tracing", + "sp-trie", + "sp-wasm-interface", "tracing", "tracing-core", ] @@ -8895,28 +8708,11 @@ version = "6.0.0" source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ "lazy_static", - "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-core", + "sp-runtime", "strum", ] -[[package]] -name = "sp-keystore" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3261eddca8c8926e3e1de136a7980cb3afc3455247d9d6f3119d9b292f73aaee" -dependencies = [ - "async-trait", - "futures 0.3.21", - "merlin", - "parity-scale-codec", - "parking_lot 0.12.0", - "schnorrkel", - "sp-core 6.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-externalities 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", - "thiserror", -] - [[package]] name = "sp-keystore" version = "0.12.0" @@ -8929,8 +8725,8 @@ dependencies = [ "parking_lot 0.12.0", "schnorrkel", "serde 1.0.137", - "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-externalities 0.12.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-core", + "sp-externalities", "thiserror", ] @@ -8949,19 +8745,8 @@ version = "4.0.0-dev" source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ "sp-api", - "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", -] - -[[package]] -name = "sp-panic-handler" -version = "4.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2101f3c555fceafcfcfb0e61c55ea9ed80dc60bd77d54d9f25b369edb029e9a4" -dependencies = [ - "backtrace", - "lazy_static", - "regex", + "sp-core", + "sp-runtime", ] [[package]] @@ -8981,30 +8766,7 @@ source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthl dependencies = [ "rustc-hash", "serde 1.0.137", - "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", -] - -[[package]] -name = "sp-runtime" -version = "6.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb7d8a8d5ab5d349c6cf9300af1721b7b6446ba63401dbb11c10a1d65197aa5f" -dependencies = [ - "either", - "hash256-std-hasher", - "impl-trait-for-tuples", - "log 0.4.17", - "parity-scale-codec", - "parity-util-mem", - "paste", - "rand 0.7.3", - "scale-info", - "serde 1.0.137", - "sp-application-crypto 6.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-arithmetic 5.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-core 6.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-io 6.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-std 4.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-core", ] [[package]] @@ -9022,29 +8784,11 @@ dependencies = [ "rand 0.7.3", "scale-info", "serde 1.0.137", - "sp-application-crypto 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-arithmetic 5.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-io 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", -] - -[[package]] -name = "sp-runtime-interface" -version = "6.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "158bf0305c75a50fc0e334b889568f519a126e32b87900c3f4251202dece7b4b" -dependencies = [ - "impl-trait-for-tuples", - "parity-scale-codec", - "primitive-types", - "sp-externalities 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-runtime-interface-proc-macro 5.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-std 4.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-storage 6.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-tracing 5.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-wasm-interface 6.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "static_assertions", + "sp-application-crypto", + "sp-arithmetic", + "sp-core", + "sp-io", + "sp-std", ] [[package]] @@ -9055,28 +8799,15 @@ dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", "primitive-types", - "sp-externalities 0.12.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-runtime-interface-proc-macro 5.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-storage 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-tracing 5.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-wasm-interface 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-externalities", + "sp-runtime-interface-proc-macro", + "sp-std", + "sp-storage", + "sp-tracing", + "sp-wasm-interface", "static_assertions", ] -[[package]] -name = "sp-runtime-interface-proc-macro" -version = "5.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22ecb916b9664ed9f90abef0ff5a3e61454c1efea5861b2997e03f39b59b955f" -dependencies = [ - "Inflector", - "proc-macro-crate 1.1.3", - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "sp-runtime-interface-proc-macro" version = "5.0.0" @@ -9096,10 +8827,10 @@ source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthl dependencies = [ "log 0.4.17", "parity-scale-codec", - "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-io 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-wasm-interface 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-core", + "sp-io", + "sp-std", + "sp-wasm-interface", "wasmi", ] @@ -9120,10 +8851,10 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-api", - "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-core", + "sp-runtime", "sp-staking", - "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-std", ] [[package]] @@ -9133,32 +8864,8 @@ source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthl dependencies = [ "parity-scale-codec", "scale-info", - "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", -] - -[[package]] -name = "sp-state-machine" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecee3b33eb78c99997676a571656bcc35db6886abecfddd13e76a73b5871c6c1" -dependencies = [ - "hash-db", - "log 0.4.17", - "num-traits 0.2.15", - "parity-scale-codec", - "parking_lot 0.12.0", - "rand 0.7.3", - "smallvec 1.8.0", - "sp-core 6.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-externalities 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-panic-handler 4.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-std 4.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-trie 6.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "thiserror", - "tracing", - "trie-db", - "trie-root", + "sp-runtime", + "sp-std", ] [[package]] @@ -9173,41 +8880,21 @@ dependencies = [ "parking_lot 0.12.0", "rand 0.7.3", "smallvec 1.8.0", - "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-externalities 0.12.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-panic-handler 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-trie 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-core", + "sp-externalities", + "sp-panic-handler", + "sp-std", + "sp-trie", "thiserror", "tracing", "trie-root", ] -[[package]] -name = "sp-std" -version = "4.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14804d6069ee7a388240b665f17908d98386ffb0b5d39f89a4099fc7a2a4c03f" - [[package]] name = "sp-std" version = "4.0.0" source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" -[[package]] -name = "sp-storage" -version = "6.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dab53af846068e3e0716d3ccc70ea0db44035c79b2ed5821aaa6635039efa37" -dependencies = [ - "impl-serde", - "parity-scale-codec", - "ref-cast", - "serde 1.0.137", - "sp-debug-derive 4.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-std 4.0.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "sp-storage" version = "6.0.0" @@ -9217,8 +8904,8 @@ dependencies = [ "parity-scale-codec", "ref-cast", "serde 1.0.137", - "sp-debug-derive 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-debug-derive", + "sp-std", ] [[package]] @@ -9227,11 +8914,11 @@ version = "4.0.0-dev" source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ "log 0.4.17", - "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-externalities 0.12.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-io 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-runtime-interface 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-core", + "sp-externalities", + "sp-io", + "sp-runtime-interface", + "sp-std", ] [[package]] @@ -9245,31 +8932,18 @@ dependencies = [ "parity-scale-codec", "sp-api", "sp-inherents", - "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-runtime", + "sp-std", "thiserror", ] -[[package]] -name = "sp-tracing" -version = "5.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69a67e555d171c4238bd223393cda747dd20ec7d4f5fe5c042c056cb7fde9eda" -dependencies = [ - "parity-scale-codec", - "sp-std 4.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tracing", - "tracing-core", - "tracing-subscriber", -] - [[package]] name = "sp-tracing" version = "5.0.0" source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ "parity-scale-codec", - "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-std", "tracing", "tracing-core", "tracing-subscriber", @@ -9281,7 +8955,7 @@ version = "4.0.0-dev" source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" dependencies = [ "sp-api", - "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-runtime", ] [[package]] @@ -9293,27 +8967,11 @@ dependencies = [ "log 0.4.17", "parity-scale-codec", "scale-info", - "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-core", "sp-inherents", - "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-trie 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", -] - -[[package]] -name = "sp-trie" -version = "6.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6fc34f4f291886914733e083b62708d829f3e6b8d7a7ca7fa8a55a3d7640b0b" -dependencies = [ - "hash-db", - "memory-db", - "parity-scale-codec", - "scale-info", - "sp-core 6.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-std 4.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "trie-db", - "trie-root", + "sp-runtime", + "sp-std", + "sp-trie", ] [[package]] @@ -9325,8 +8983,8 @@ dependencies = [ "memory-db", "parity-scale-codec", "scale-info", - "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-core", + "sp-std", "thiserror", "trie-db", "trie-root", @@ -9343,8 +9001,8 @@ dependencies = [ "scale-info", "serde 1.0.137", "sp-core-hashing-proc-macro", - "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-runtime", + "sp-std", "sp-version-proc-macro", "thiserror", ] @@ -9360,19 +9018,6 @@ dependencies = [ "syn", ] -[[package]] -name = "sp-wasm-interface" -version = "6.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10d88debe690c2b24eaa9536a150334fcef2ae184c21a0e5b3e80135407a7d52" -dependencies = [ - "impl-trait-for-tuples", - "log 0.4.17", - "parity-scale-codec", - "sp-std 4.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "wasmi", -] - [[package]] name = "sp-wasm-interface" version = "6.0.0" @@ -9381,7 +9026,7 @@ dependencies = [ "impl-trait-for-tuples", "log 0.4.17", "parity-scale-codec", - "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-std", "wasmi", "wasmtime", ] @@ -9467,12 +9112,12 @@ dependencies = [ "sp-api", "sp-block-builder", "sp-consensus-aura", - "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-core", "sp-inherents", "sp-offchain", - "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-runtime", "sp-session", - "sp-std 4.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-std", "sp-transaction-pool", "sp-version", "substrate-wasm-builder", @@ -9601,8 +9246,8 @@ dependencies = [ "sp-api", "sp-block-builder", "sp-blockchain", - "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-core", + "sp-runtime", ] [[package]] @@ -9640,69 +9285,6 @@ version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" -[[package]] -name = "subxt" -version = "0.21.0" -source = "git+https://github.com/chainflip-io/substrate-subxt.git?tag=chainflip-monthly-2022-05#6d73172560b4c722aeac19695c96c618799d50a2" -dependencies = [ - "bitvec 1.0.0", - "derivative", - "frame-metadata", - "futures 0.3.21", - "hex", - "jsonrpsee", - "log 0.4.17", - "parity-scale-codec", - "parking_lot 0.12.0", - "scale-info", - "serde 1.0.137", - "serde_json", - "sp-core 6.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-runtime 6.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "subxt-macro", - "subxt-metadata", - "thiserror", -] - -[[package]] -name = "subxt-codegen" -version = "0.21.0" -source = "git+https://github.com/chainflip-io/substrate-subxt.git?tag=chainflip-monthly-2022-05#6d73172560b4c722aeac19695c96c618799d50a2" -dependencies = [ - "darling 0.14.1", - "frame-metadata", - "heck 0.4.0", - "parity-scale-codec", - "proc-macro-error", - "proc-macro2", - "quote", - "scale-info", - "subxt-metadata", - "syn", -] - -[[package]] -name = "subxt-macro" -version = "0.21.0" -source = "git+https://github.com/chainflip-io/substrate-subxt.git?tag=chainflip-monthly-2022-05#6d73172560b4c722aeac19695c96c618799d50a2" -dependencies = [ - "darling 0.14.1", - "proc-macro-error", - "subxt-codegen", - "syn", -] - -[[package]] -name = "subxt-metadata" -version = "0.21.0" -source = "git+https://github.com/chainflip-io/substrate-subxt.git?tag=chainflip-monthly-2022-05#6d73172560b4c722aeac19695c96c618799d50a2" -dependencies = [ - "frame-metadata", - "parity-scale-codec", - "scale-info", - "sp-core 6.0.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "syn" version = "1.0.92" @@ -10338,12 +9920,12 @@ dependencies = [ "sc-executor", "sc-service", "serde 1.0.137", - "sp-core 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-externalities 0.12.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-io 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-keystore 0.12.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-runtime 6.0.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", - "sp-state-machine 0.12.0 (git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05)", + "sp-core", + "sp-externalities", + "sp-io", + "sp-keystore", + "sp-runtime", + "sp-state-machine", "sp-version", "zstd", ] diff --git a/state-chain/pallets/cf-environment/src/benchmarking.rs b/state-chain/pallets/cf-environment/src/benchmarking.rs index ed6aeca031..bce3ebc86c 100644 --- a/state-chain/pallets/cf-environment/src/benchmarking.rs +++ b/state-chain/pallets/cf-environment/src/benchmarking.rs @@ -10,7 +10,7 @@ use frame_support::dispatch::UnfilteredDispatchable; benchmarks! { set_system_state { let caller: T::AccountId = whitelisted_caller(); - let call = Call::::set_system_state(SystemState::Maintenance); + let call = Call::::set_system_state { state: SystemState::Maintenance }; let origin = T::EnsureGovernance::successful_origin(); }: { call.dispatch_bypass_filter(origin)? } verify { diff --git a/state-chain/pallets/cf-flip/src/benchmarking.rs b/state-chain/pallets/cf-flip/src/benchmarking.rs index ab304cb61d..5e2bd7a3e3 100644 --- a/state-chain/pallets/cf-flip/src/benchmarking.rs +++ b/state-chain/pallets/cf-flip/src/benchmarking.rs @@ -6,12 +6,12 @@ use frame_support::{dispatch::UnfilteredDispatchable, traits::EnsureOrigin}; benchmarks! { set_slashing_rate { - let balance: T::Balance = T::Balance::from(100u32); - let call = Call::::set_slashing_rate(balance); + let slashing_rate: T::Balance = T::Balance::from(100u32); + let call = Call::::set_slashing_rate { slashing_rate }; let origin = T::EnsureGovernance::successful_origin(); }: { call.dispatch_bypass_filter(origin)? } verify { - assert_eq!(Pallet::::slashing_rate(), balance.into()) + assert_eq!(Pallet::::slashing_rate(), slashing_rate.into()) } impl_benchmark_test_suite!(Pallet, crate::mock::new_test_ext(), crate::mock::Test,); diff --git a/state-chain/pallets/cf-governance/src/benchmarking.rs b/state-chain/pallets/cf-governance/src/benchmarking.rs index d01552d883..45c288fe8c 100644 --- a/state-chain/pallets/cf-governance/src/benchmarking.rs +++ b/state-chain/pallets/cf-governance/src/benchmarking.rs @@ -11,14 +11,14 @@ use sp_std::{boxed::Box, vec}; benchmarks! { propose_governance_extrinsic { let caller: T::AccountId = whitelisted_caller(); - let call = Box::new(frame_system::Call::remark(vec![]).into()); + let call = Box::new(frame_system::Call::remark{remark: vec![]}.into()); >::put(vec![caller.clone()]); }: _(RawOrigin::Signed(caller.clone()), call) verify { assert_eq!(ProposalIdCounter::::get(), 1); } approve { - let call: ::Call = frame_system::Call::remark(vec![]).into(); + let call: ::Call = frame_system::Call::remark{remark: vec![]}.into(); let caller: T::AccountId = whitelisted_caller(); >::put(vec![caller.clone()]); Pallet::::push_proposal(Box::new(call)); @@ -29,22 +29,22 @@ benchmarks! { new_membership_set { let caller: T::AccountId = whitelisted_caller(); let members = vec![caller.clone()]; - let call = Call::::new_membership_set(members.clone()); + let call = Call::::new_membership_set{ accounts: members.clone() }; let origin = T::EnsureGovernance::successful_origin(); }: { call.dispatch_bypass_filter(origin)? } verify { assert_eq!(Members::::get(), members); } call_as_sudo { - let call: ::Call = frame_system::Call::set_code_without_checks(vec![1, 2, 3, 4]).into(); - let sudo_call = Call::::call_as_sudo(Box::new(call)); + let call: ::Call = frame_system::Call::set_code_without_checks{ code: vec![1, 2, 3, 4] }.into(); + let sudo_call = Call::::call_as_sudo{ call: Box::new(call) }; let origin = T::EnsureGovernance::successful_origin(); }: { sudo_call.dispatch_bypass_filter(origin)? } on_initialize { // TODO: mock the time to end in the expire proposals case which is more expensive let b in 1 .. 100u32; for _n in 1 .. b { - let call = Box::new(frame_system::Call::remark(vec![]).into()); + let call = Box::new(frame_system::Call::remark{remark: vec![]}.into()); Pallet::::push_proposal(call); } }: { @@ -57,7 +57,7 @@ benchmarks! { expire_proposals { let b in 1 .. 100u32; for _n in 1 .. b { - let call = Box::new(frame_system::Call::remark(vec![]).into()); + let call = Box::new(frame_system::Call::remark{remark: vec![]}.into()); Pallet::::push_proposal(call); } } : { diff --git a/state-chain/pallets/cf-reputation/src/benchmarking.rs b/state-chain/pallets/cf-reputation/src/benchmarking.rs index 8bd1d762e4..3201e0d5ed 100644 --- a/state-chain/pallets/cf-reputation/src/benchmarking.rs +++ b/state-chain/pallets/cf-reputation/src/benchmarking.rs @@ -8,16 +8,16 @@ use frame_support::dispatch::UnfilteredDispatchable; benchmarks! { update_accrual_ratio { - let call = Call::::update_accrual_ratio(2, 151u32.into()); + let call = Call::::update_accrual_ratio{ points: 2, online_credits: 151u32.into() }; } : { let _ = call.dispatch_bypass_filter(T::EnsureGovernance::successful_origin()); } set_penalty { - let call = Call::::set_penalty(PalletOffence::MissedHeartbeat.into(), Default::default()); + let call = Call::::set_penalty { offence: PalletOffence::MissedHeartbeat.into(), penalty: Default::default() }; } : { let _ = call.dispatch_bypass_filter(T::EnsureGovernance::successful_origin()); } update_missed_heartbeat_penalty { - let call = Call::::update_missed_heartbeat_penalty(ReputationPenaltyRate { + let call = Call::::update_missed_heartbeat_penalty { value: ReputationPenaltyRate { points: 1, per_blocks: (10 as u32).into() - }); + }}; } : { let _ = call.dispatch_bypass_filter(T::EnsureGovernance::successful_origin()); } verify { assert_eq!( diff --git a/state-chain/pallets/cf-staking/src/benchmarking.rs b/state-chain/pallets/cf-staking/src/benchmarking.rs index 1792c0ff95..71040415dc 100644 --- a/state-chain/pallets/cf-staking/src/benchmarking.rs +++ b/state-chain/pallets/cf-staking/src/benchmarking.rs @@ -31,40 +31,50 @@ const MIN_STAKE: u128 = 50_000 * 10u128.pow(18); benchmarks! { staked { - let balance: T::Balance = T::Balance::from(100u32); - let eth_addr: EthereumAddress = [42u8; 20]; + let amount: T::Balance = T::Balance::from(100u32); + let withdrawal_address: EthereumAddress = [42u8; 20]; let tx_hash: pallet::EthTransactionHash = [211u8; 32]; let caller: T::AccountId = whitelisted_caller(); - let call = Call::::staked(caller.clone(), balance, eth_addr, tx_hash); + let call = Call::::staked { + account_id: caller.clone(), + amount: amount, + withdrawal_address, + tx_hash, + }; let origin = T::EnsureWitnessed::successful_origin(); }: { call.dispatch_bypass_filter(origin)? } verify { assert!(AccountRetired::::get(&caller)); - assert_eq!(T::Flip::stakeable_balance(&caller), balance); + assert_eq!(T::Flip::stakeable_balance(&caller), amount); } claim { let balance_to_claim: T::Balance = T::Balance::from(50u32); let balance_to_stake: T::Balance = T::Balance::from(MIN_STAKE); let tx_hash: pallet::EthTransactionHash = [211u8; 32]; - let eth_addr: EthereumAddress = [42u8; 20]; + let withdrawal_address: EthereumAddress = [42u8; 20]; let caller: T::AccountId = whitelisted_caller(); let origin = T::EnsureWitnessed::successful_origin(); // Stake some funds to claim - let stake_call = Call::::staked(caller.clone(), balance_to_stake, eth_addr, tx_hash); + let stake_call = Call::::staked { + account_id: caller.clone(), + amount: balance_to_stake, + withdrawal_address, + tx_hash + }; stake_call.dispatch_bypass_filter(origin)?; - } :_(RawOrigin::Signed(caller.clone()), balance_to_claim, eth_addr) + } :_(RawOrigin::Signed(caller.clone()), balance_to_claim, withdrawal_address) verify { assert!(PendingClaims::::contains_key(&caller)); } claim_all { - let eth_addr: EthereumAddress = [42u8; 20]; + let withdrawal_address: EthereumAddress = [42u8; 20]; let caller: T::AccountId = whitelisted_caller(); let balance_to_stake: T::Balance = T::Balance::from(MIN_STAKE); @@ -74,10 +84,15 @@ benchmarks! { let origin = T::EnsureWitnessed::successful_origin(); // Stake some funds to claim - let stake_call = Call::::staked(caller.clone(), balance_to_stake, eth_addr, tx_hash); + let stake_call = Call::::staked { + account_id: caller.clone(), + amount: balance_to_stake, + withdrawal_address, + tx_hash + }; stake_call.dispatch_bypass_filter(origin)?; - }:_(RawOrigin::Signed(caller.clone()), eth_addr) + }:_(RawOrigin::Signed(caller.clone()), withdrawal_address) verify { assert!(PendingClaims::::contains_key(&caller)); } @@ -85,20 +100,29 @@ benchmarks! { claimed { let balance_to_stake: T::Balance = T::Balance::from(MIN_STAKE); let tx_hash: pallet::EthTransactionHash = [211u8; 32]; - let eth_addr: EthereumAddress = [42u8; 20]; + let withdrawal_address: EthereumAddress = [42u8; 20]; let caller: T::AccountId = whitelisted_caller(); let origin = T::EnsureWitnessed::successful_origin(); // Stake some funds to claim - let stake_call = Call::::staked(caller.clone(), balance_to_stake, eth_addr, tx_hash); + let stake_call = Call::::staked { + account_id: caller.clone(), + amount: balance_to_stake, + withdrawal_address, + tx_hash + }; stake_call.dispatch_bypass_filter(origin.clone())?; // Push a claim let claimable = T::Flip::claimable_balance(&caller); - Pallet::::do_claim(&caller, claimable, eth_addr)?; + Pallet::::do_claim(&caller, claimable, withdrawal_address)?; - let call = Call::::claimed(caller.clone(), claimable, tx_hash); + let call = Call::::claimed { + account_id: caller.clone(), + claimed_amount: claimable, + tx_hash + }; }: { call.dispatch_bypass_filter(origin)? } verify { @@ -107,7 +131,7 @@ benchmarks! { post_claim_signature { let tx_hash: pallet::EthTransactionHash = [211u8; 32]; - let eth_addr: EthereumAddress = [42u8; 20]; + let withdrawal_address: EthereumAddress = [42u8; 20]; let balance_to_stake: T::Balance = T::Balance::from(MIN_STAKE); let caller: T::AccountId = whitelisted_caller(); @@ -115,16 +139,24 @@ benchmarks! { let threshold_origin = T::EnsureThresholdSigned::successful_origin(); // Stake some funds to claim - let stake_call = Call::::staked(caller.clone(), balance_to_stake, eth_addr, tx_hash); + let stake_call = Call::::staked { + account_id: caller.clone(), + amount: balance_to_stake, + withdrawal_address, + tx_hash + }; stake_call.dispatch_bypass_filter(witness_origin)?; // Push a claim let claimable = T::Flip::claimable_balance(&caller); - Pallet::::do_claim(&caller, claimable, eth_addr)?; + Pallet::::do_claim(&caller, claimable, withdrawal_address)?; // TODO: insert a valid signature... - let call = Call::::post_claim_signature(caller.clone(), transmogrify(1u32)); + let call = Call::::post_claim_signature { + account_id: caller.clone(), + signature_request_id: transmogrify(1u32) + }; }: { call.dispatch_bypass_filter(threshold_origin)? } verify { assert!(PendingClaims::::contains_key(&caller)); @@ -167,13 +199,18 @@ benchmarks! { for i in 0 .. b { // Stake some funds let staker = &accounts[i as usize]; - let eth_addr = eth_base_addr.map(|x| x + i as u8); - let stake_call = Call::::staked(staker.clone(), MIN_STAKE.into(), eth_addr, [0; 32]); + let withdrawal_address = eth_base_addr.map(|x| x + i as u8); + let stake_call = Call::::staked { + account_id: staker.clone(), + amount: MIN_STAKE.into(), + withdrawal_address, + tx_hash: [0; 32] + }; stake_call.dispatch_bypass_filter(T::EnsureWitnessed::successful_origin())?; // Submit a claim let claimable = T::Flip::claimable_balance(staker); - Pallet::::do_claim(staker, claimable, eth_addr)?; - Pallet::::register_claim_expiry(staker.clone(), now); + Pallet::::do_claim(staker, claimable, withdrawal_address)?; + Pallet::::register_claim_expiry(staker.clone(), (now.as_secs(), 0)); } }: { Pallet::::expire_pending_claims(); diff --git a/state-chain/pallets/cf-threshold-signature/src/benchmarking.rs b/state-chain/pallets/cf-threshold-signature/src/benchmarking.rs index 1db3e14ca7..723b1fddf7 100644 --- a/state-chain/pallets/cf-threshold-signature/src/benchmarking.rs +++ b/state-chain/pallets/cf-threshold-signature/src/benchmarking.rs @@ -23,7 +23,7 @@ where CurrentAuthorities::::put(accounts.clone().collect::>()); for account in accounts { whitelist_account!(account); - OnlineCall::::heartbeat() + OnlineCall::::heartbeat {} .dispatch_bypass_filter(RawOrigin::Signed(account).into()) .unwrap(); } diff --git a/state-chain/pallets/cf-validator/src/benchmarking.rs b/state-chain/pallets/cf-validator/src/benchmarking.rs index e17c95bb53..692c8d64c0 100644 --- a/state-chain/pallets/cf-validator/src/benchmarking.rs +++ b/state-chain/pallets/cf-validator/src/benchmarking.rs @@ -10,7 +10,7 @@ use frame_system::RawOrigin; benchmarks! { set_blocks_for_epoch { let b = 2_u32; - let call = Call::::set_blocks_for_epoch(b.into()); + let call = Call::::set_blocks_for_epoch { number_of_blocks: b.into() }; let o = T::EnsureGovernance::successful_origin(); }: { call.dispatch_bypass_filter(o)? @@ -19,7 +19,7 @@ benchmarks! { assert_eq!(Pallet::::epoch_number_of_blocks(), 2_u32.into()) } force_rotation { - let call = Call::::force_rotation(); + let call = Call::::force_rotation {}; let o = T::EnsureGovernance::successful_origin(); }: { call.dispatch_bypass_filter(o)? diff --git a/state-chain/pallets/cf-vaults/src/benchmarking.rs b/state-chain/pallets/cf-vaults/src/benchmarking.rs index 6d463299a6..14f2125945 100644 --- a/state-chain/pallets/cf-vaults/src/benchmarking.rs +++ b/state-chain/pallets/cf-vaults/src/benchmarking.rs @@ -120,10 +120,11 @@ benchmarks_instance_pallet! { PendingVaultRotation::::put( VaultRotationStatus::::AwaitingRotation { new_public_key }, ); - let call = Call::::vault_key_rotated( - new_public_key, 5u64.into(), - Decode::decode(&mut &TX_HASH[..]).unwrap() - ); + let call = Call::::vault_key_rotated { + new_public_key: new_public_key, + block_number: 5u64.into(), + tx_hash: Decode::decode(&mut &TX_HASH[..]).unwrap() + }; let origin = T::EnsureWitnessedAtCurrentEpoch::successful_origin(); } : { call.dispatch_bypass_filter(origin)? } verify { diff --git a/state-chain/pallets/cf-witnesser/src/benchmarking.rs b/state-chain/pallets/cf-witnesser/src/benchmarking.rs index b4fce54600..19bb04a3c5 100644 --- a/state-chain/pallets/cf-witnesser/src/benchmarking.rs +++ b/state-chain/pallets/cf-witnesser/src/benchmarking.rs @@ -11,7 +11,7 @@ benchmarks! { witness { let caller: T::AccountId = whitelisted_caller(); let validator_id: T::ValidatorId = caller.clone().into(); - let call: ::Call = frame_system::Call::remark(vec![]).into(); + let call: ::Call = frame_system::Call::remark{ remark: vec![] }.into(); let epoch = T::EpochInfo::epoch_index(); T::EpochInfo::add_authority_info_for_epoch(epoch, vec![validator_id.clone()]); diff --git a/state-chain/runtime-upgrade-utilities/src/lib.rs b/state-chain/runtime-upgrade-utilities/src/lib.rs index 9f566cbae2..de8ade7ffc 100644 --- a/state-chain/runtime-upgrade-utilities/src/lib.rs +++ b/state-chain/runtime-upgrade-utilities/src/lib.rs @@ -33,7 +33,7 @@ mod try_runtime_helpers { }; frame_support::generate_storage_alias!( - RuntimeUpgradeUtils, MigrationBounds => Map<(Vec, Twox64Concat), (u16, u16)> + RuntimeUpgradeUtils, MigrationBounds => Map<(Twox64Concat, Vec), (u16, u16)> ); pub fn update_migration_bounds() { diff --git a/state-chain/runtime/src/lib.rs b/state-chain/runtime/src/lib.rs index 5ec02817b3..a3144afa20 100644 --- a/state-chain/runtime/src/lib.rs +++ b/state-chain/runtime/src/lib.rs @@ -543,6 +543,32 @@ pub type Executive = frame_executive::Executive< >, >; +#[cfg(feature = "runtime-benchmarks")] +#[macro_use] +extern crate frame_benchmarking; + +#[cfg(feature = "runtime-benchmarks")] +mod benches { + define_benchmarks!( + [frame_benchmarking, BaselineBench::] + [frame_system, SystemBench::] + [pallet_timestamp, Timestamp] + [pallet_cf_environment, Environment] + [pallet_cf_flip, Flip] + [pallet_cf_emissions, Emissions] + [pallet_cf_staking, Staking] + [pallet_cf_witnesser, Witnesser] + [pallet_cf_auction, Auction] + [pallet_cf_validator, Validator] + [pallet_cf_governance, Governance] + [pallet_cf_vaults, EthereumVault] + [pallet_cf_online, Online] + [pallet_cf_reputation, Reputation] + [pallet_cf_threshold_signature, EthereumThresholdSigner] + [pallet_cf_broadcast, EthereumBroadcaster] + ); +} + impl_runtime_apis! { // START custom runtime APIs impl runtime_apis::CustomRuntimeApi for Runtime { @@ -690,13 +716,16 @@ impl_runtime_apis! { #[cfg(feature = "try-runtime")] impl frame_try_runtime::TryRuntime for Runtime { - fn on_runtime_upgrade() -> Result<(Weight, Weight), sp_runtime::RuntimeString> { - // Use unwrap here otherwise the error is swallowed silently. - let weight = Executive::try_runtime_upgrade().map_err(|e| { - log::error!("{}", e); - e - })?; - Ok((weight, BlockWeights::get().max_block)) + fn on_runtime_upgrade() -> (Weight, Weight) { + // NOTE: intentional unwrap: we don't want to propagate the error backwards, and want to + // have a backtrace here. If any of the pre/post migration checks fail, we shall stop + // right here and right now. + let weight = Executive::try_runtime_upgrade().unwrap(); + (weight, BlockWeights::get().max_block) + } + + fn execute_block_no_check(block: Block) -> Weight { + Executive::execute_block_no_check(block) } } @@ -706,40 +735,30 @@ impl_runtime_apis! { Vec, Vec, ) { - use frame_benchmarking::{list_benchmark, Benchmarking, BenchmarkList}; + use frame_benchmarking::{baseline, Benchmarking, BenchmarkList}; use frame_support::traits::StorageInfoTrait; use frame_system_benchmarking::Pallet as SystemBench; + use baseline::Pallet as BaselineBench; let mut list = Vec::::new(); - list_benchmark!(list, extra, frame_system, SystemBench::); - list_benchmark!(list, extra, pallet_timestamp, Timestamp); - list_benchmark!(list, extra, pallet_cf_validator, Validator); - list_benchmark!(list, extra, pallet_cf_auction, Auction); - list_benchmark!(list, extra, pallet_cf_staking, Staking); - list_benchmark!(list, extra, pallet_cf_flip, Flip); - list_benchmark!(list, extra, pallet_cf_governance, Governance); - list_benchmark!(list, extra, pallet_cf_online, Online); - list_benchmark!(list, extra, pallet_cf_emissions, Emissions); - list_benchmark!(list, extra, pallet_cf_reputation, Reputation); - list_benchmark!(list, extra, pallet_cf_vaults, EthereumVault); - list_benchmark!(list, extra, pallet_cf_witnesser, Witnesser); - list_benchmark!(list, extra, pallet_cf_threshold_signature, EthereumThresholdSigner); - list_benchmark!(list, extra, pallet_cf_broadcast, EthereumBroadcaster); - list_benchmark!(list, extra, pallet_cf_environment, Environment); + list_benchmarks!(list, extra); let storage_info = AllPalletsWithSystem::storage_info(); - return (list, storage_info) + (list, storage_info) } fn dispatch_benchmark( config: frame_benchmarking::BenchmarkConfig ) -> Result, sp_runtime::RuntimeString> { - use frame_benchmarking::{Benchmarking, BenchmarkBatch, add_benchmark, TrackedStorageKey}; + use frame_benchmarking::{baseline, Benchmarking, BenchmarkBatch, TrackedStorageKey}; use frame_system_benchmarking::Pallet as SystemBench; + use baseline::Pallet as BaselineBench; + impl frame_system_benchmarking::Config for Runtime {} + impl baseline::Config for Runtime {} let whitelist: Vec = vec![ // Block Number @@ -756,24 +775,8 @@ impl_runtime_apis! { let mut batches = Vec::::new(); let params = (&config, &whitelist); + add_benchmarks!(params, batches); - add_benchmark!(params, batches, frame_system, SystemBench::); - add_benchmark!(params, batches, pallet_timestamp, Timestamp); - add_benchmark!(params, batches, pallet_cf_validator, Validator); - add_benchmark!(params, batches, pallet_cf_auction, Auction); - add_benchmark!(params, batches, pallet_cf_staking, Staking); - add_benchmark!(params, batches, pallet_cf_flip, Flip); - add_benchmark!(params, batches, pallet_cf_governance, Governance); - add_benchmark!(params, batches, pallet_cf_vaults, EthereumVault); - add_benchmark!(params, batches, pallet_cf_online, Online); - add_benchmark!(params, batches, pallet_cf_witnesser, Witnesser); - add_benchmark!(params, batches, pallet_cf_reputation, Reputation); - add_benchmark!(params, batches, pallet_cf_emissions, Emissions); - add_benchmark!(params, batches, pallet_cf_threshold_signature, EthereumThresholdSigner); - add_benchmark!(params, batches, pallet_cf_broadcast, EthereumBroadcaster); - add_benchmark!(params, batches, pallet_cf_environment, Environment); - - if batches.is_empty() { return Err("Benchmark not found for this pallet.".into()) } Ok(batches) } } From ee9a4824890123b0f1c75b03443bc4b33fc2a836 Mon Sep 17 00:00:00 2001 From: Daniel Date: Mon, 9 May 2022 16:27:36 +0200 Subject: [PATCH 06/33] chore: updatre state chain mocks and tests --- Cargo.lock | 2 +- state-chain/cf-integration-tests/src/lib.rs | 38 ++++++++++--------- state-chain/chains/Cargo.toml | 2 +- state-chain/chains/src/eth.rs | 18 +++++++-- state-chain/chains/src/eth/api.rs | 2 +- state-chain/pallets/cf-auction/src/mock.rs | 1 + state-chain/pallets/cf-broadcast/src/mock.rs | 1 + state-chain/pallets/cf-emissions/src/mock.rs | 6 ++- .../pallets/cf-environment/src/mock.rs | 1 + state-chain/pallets/cf-flip/src/mock.rs | 10 ++++- state-chain/pallets/cf-flip/src/tests.rs | 2 +- state-chain/pallets/cf-governance/src/mock.rs | 1 + .../pallets/cf-governance/src/tests.rs | 16 ++++---- state-chain/pallets/cf-online/src/mock.rs | 1 + state-chain/pallets/cf-reputation/src/mock.rs | 3 +- state-chain/pallets/cf-staking/src/mock.rs | 1 + state-chain/pallets/cf-staking/src/tests.rs | 37 +++++++----------- .../cf-threshold-signature/src/mock.rs | 2 + .../cf-threshold-signature/src/tests.rs | 10 +++-- state-chain/pallets/cf-validator/src/mock.rs | 6 +-- state-chain/pallets/cf-vaults/src/mock.rs | 3 +- state-chain/pallets/cf-witnesser/src/mock.rs | 1 + state-chain/pallets/cf-witnesser/src/tests.rs | 10 ++--- .../src/chainflip/missed_authorship_slots.rs | 7 +++- .../src/mocks/missed_authorship_slots.rs | 0 25 files changed, 105 insertions(+), 76 deletions(-) delete mode 100644 state-chain/traits/src/mocks/missed_authorship_slots.rs diff --git a/Cargo.lock b/Cargo.lock index 9097adf86e..7cc4efac1b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -778,7 +778,7 @@ dependencies = [ "rand 0.8.5", "rlp", "scale-info", - "secp256k1 0.20.3", + "secp256k1 0.21.3", "serde 1.0.137", "sp-runtime", "sp-std", diff --git a/state-chain/cf-integration-tests/src/lib.rs b/state-chain/cf-integration-tests/src/lib.rs index b58c924908..292e160f20 100644 --- a/state-chain/cf-integration-tests/src/lib.rs +++ b/state-chain/cf-integration-tests/src/lib.rs @@ -45,7 +45,7 @@ mod tests { use libsecp256k1::PublicKey; use pallet_cf_staking::AccountRetired; use pallet_cf_vaults::KeygenOutcome; - use state_chain_runtime::{Event, HeartbeatBlockInterval, Origin}; + use state_chain_runtime::{constants::common::HEARTBEAT_BLOCK_INTERVAL, Event, Origin}; use std::{cell::RefCell, collections::HashMap, rc::Rc}; // TODO: Can we use the actual events here? @@ -305,7 +305,7 @@ mod tests { fn on_block(&self, block_number: BlockNumber) { if self.active { // Heartbeat -> Send transaction to state chain twice an interval - if block_number % (HeartbeatBlockInterval::get() / 2) == 0 { + if block_number % (HEARTBEAT_BLOCK_INTERVAL / 2) == 0 { // Online pallet let _result = Online::heartbeat(state_chain_runtime::Origin::signed( self.node_id.clone(), @@ -425,8 +425,7 @@ mod tests { pub fn move_to_next_heartbeat_interval(&mut self) { let current_block_number = System::block_number(); self.move_forward_blocks( - HeartbeatBlockInterval::get() - - (current_block_number % HeartbeatBlockInterval::get()) + + HEARTBEAT_BLOCK_INTERVAL - (current_block_number % HEARTBEAT_BLOCK_INTERVAL) + 1, ); } @@ -501,7 +500,7 @@ mod tests { pub struct ExtBuilder { pub accounts: Vec<(AccountId, FlipBalance)>, - root: AccountId, + root: Option, blocks_per_epoch: BlockNumber, max_authorities: AuthorityCount, min_authorities: AuthorityCount, @@ -511,7 +510,7 @@ mod tests { fn default() -> Self { Self { accounts: vec![], - root: AccountId::default(), + root: None, blocks_per_epoch: Zero::zero(), max_authorities: MAX_AUTHORITIES, min_authorities: 1, @@ -526,7 +525,7 @@ mod tests { } fn root(mut self, root: AccountId) -> Self { - self.root = root; + self.root = Some(root); self } @@ -595,7 +594,7 @@ mod tests { .unwrap(); pallet_cf_governance::GenesisConfig:: { - members: vec![self.root.clone()], + members: self.root.iter().cloned().collect(), expiry_span: EXPIRY_SPAN_IN_SECONDS, } .assimilate_storage(storage) @@ -779,7 +778,7 @@ mod tests { EpochInfo, }; use pallet_cf_validator::RotationStatus; - use state_chain_runtime::{HeartbeatBlockInterval, Validator}; + use state_chain_runtime::Validator; #[test] // We have a test network which goes into the first epoch @@ -846,7 +845,7 @@ mod tests { assert_eq!(GENESIS_EPOCH, Validator::epoch_index()); // Move forward heartbeat to get those missing nodes online - testnet.move_forward_blocks(HeartbeatBlockInterval::get()); + testnet.move_forward_blocks(HEARTBEAT_BLOCK_INTERVAL); // The rotation can now continue to the next phase. assert!(matches!( @@ -1105,9 +1104,10 @@ mod tests { // All other accounts are normally charged and can call any extrinsic. fn restriction_handling() { super::genesis::default().build().execute_with(|| { - let call: state_chain_runtime::Call = frame_system::Call::remark(vec![]).into(); + let call: state_chain_runtime::Call = + frame_system::Call::remark { remark: vec![] }.into(); let gov_call: state_chain_runtime::Call = - pallet_cf_governance::Call::approve(1).into(); + pallet_cf_governance::Call::approve { id: 1 }.into(); // Expect a successful normal call to work let ordinary = FlipTransactionPayment::::withdraw_fee( &ALICE.into(), @@ -1140,15 +1140,17 @@ mod tests { } mod authorities { - use crate::tests::{genesis, network, NodeId, GENESIS_EPOCH, VAULT_ROTATION_BLOCKS}; + use crate::tests::{ + genesis, network, NodeId, GENESIS_EPOCH, HEARTBEAT_BLOCK_INTERVAL, + VAULT_ROTATION_BLOCKS, + }; use cf_traits::{ AuthorityCount, BackupOrPassive, ChainflipAccount, ChainflipAccountState, ChainflipAccountStore, EpochInfo, FlipBalance, IsOnline, StakeTransfer, }; use pallet_cf_validator::PercentageRange; use state_chain_runtime::{ - Auction, EmergencyRotationPercentageRange, Flip, HeartbeatBlockInterval, Online, - Runtime, Validator, + Auction, EmergencyRotationPercentageRange, Flip, Online, Runtime, Validator, }; use std::collections::HashMap; @@ -1156,7 +1158,7 @@ mod tests { fn genesis_nodes_rotated_out_accumulate_rewards_correctly() { // We want to have at least one heartbeat within our reduced epoch - const EPOCH_BLOCKS: u32 = HeartbeatBlockInterval::get() * 2; + const EPOCH_BLOCKS: u32 = HEARTBEAT_BLOCK_INTERVAL * 2; // Reduce our validating set and hence the number of nodes we need to have a backup // set const MAX_AUTHORITIES: AuthorityCount = 10; @@ -1256,7 +1258,7 @@ mod tests { .collect(); // Move forward a heartbeat, emissions should be shared to backup nodes - testnet.move_forward_blocks(HeartbeatBlockInterval::get()); + testnet.move_forward_blocks(HEARTBEAT_BLOCK_INTERVAL); // We won't calculate the exact emissions but they should be greater than their // initial stake @@ -1276,7 +1278,7 @@ mod tests { // We want to be able to miss heartbeats to be offline and provoke an emergency rotation // In order to do this we would want to have missed 1 heartbeat interval // Blocks for our epoch, something larger than one heartbeat - const EPOCH_BLOCKS: u32 = HeartbeatBlockInterval::get() * 2; + const EPOCH_BLOCKS: u32 = HEARTBEAT_BLOCK_INTERVAL * 2; // Reduce our validating set and hence the number of nodes we need to have a backup // set to speed the test up const MAX_AUTHORITIES: AuthorityCount = 10; diff --git a/state-chain/chains/Cargo.toml b/state-chain/chains/Cargo.toml index 9cc3c6dc94..df4f63cc2b 100644 --- a/state-chain/chains/Cargo.toml +++ b/state-chain/chains/Cargo.toml @@ -8,7 +8,7 @@ description = "Shared Chain-specific functionality for use in the substrate runt [dependencies] # Cryptography libsecp256k1 = { default-features = false, version = '0.7', features = ['static-context'] } -secp256k1 = {optional = true, version = "0.20"} +secp256k1 = {optional = true, version = "0.21"} # Ethereum ethabi = {default-features = false, version = "17.0"} diff --git a/state-chain/chains/src/eth.rs b/state-chain/chains/src/eth.rs index 45924b49cf..9829ebfb86 100644 --- a/state-chain/chains/src/eth.rs +++ b/state-chain/chains/src/eth.rs @@ -877,7 +877,12 @@ mod verification_tests { let verificaton_result = verify_transaction(&unsigned, &signed_tx_bytes.0, &key_ref.address().0.into()); - assert_eq!(verificaton_result, Ok(()), "Unable to verify tx signed by key {:#x}", key); + assert_eq!( + verificaton_result, + Ok(()), + "Unable to verify tx signed by key {:?}", + hex::encode(key.serialize_secret()) + ); } } @@ -888,14 +893,14 @@ mod verification_tests { max_fee_per_gas: U256::from(1_000_000_000u32).into(), gas_limit: U256::from(21_000u32).into(), contract: [0xcf; 20].into(), - value: 0.into(), + value: 0u32.into(), data: b"do_something()".to_vec(), ..Default::default() }; let msg = LegacyTransactionMessage { chain_id: Some(unsigned.chain_id), - nonce: 0.into(), + nonce: 0u32.into(), gas_limit: unsigned.gas_limit.unwrap(), gas_price: U256::from(1_000_000_000u32), action: ethereum::TransactionAction::Call(unsigned.contract), @@ -930,7 +935,12 @@ mod verification_tests { let verificaton_result = verify_transaction(&unsigned, &signed_tx_bytes, &key_ref.address().0.into()); - assert_eq!(verificaton_result, Ok(()), "Unable to verify tx signed by key {:#x}", key); + assert_eq!( + verificaton_result, + Ok(()), + "Unable to verify tx signed by key {:?}", + hex::encode(key.serialize_secret()) + ); } } } diff --git a/state-chain/chains/src/eth/api.rs b/state-chain/chains/src/eth/api.rs index 3852435b0c..281cd69b46 100644 --- a/state-chain/chains/src/eth/api.rs +++ b/state-chain/chains/src/eth/api.rs @@ -14,7 +14,7 @@ pub enum EthereumApi { UpdateFlipSupply(update_flip_supply::UpdateFlipSupply), } -#[derive(Clone, Copy, Debug, PartialEq, Eq, Encode, Decode, TypeInfo, Default)] +#[derive(Clone, Copy, Debug, PartialEq, Eq, Encode, Decode, TypeInfo, MaxEncodedLen, Default)] pub struct EthereumReplayProtection { pub key_manager_address: [u8; 20], pub chain_id: u64, diff --git a/state-chain/pallets/cf-auction/src/mock.rs b/state-chain/pallets/cf-auction/src/mock.rs index 342c22f7ae..47a06f1f34 100644 --- a/state-chain/pallets/cf-auction/src/mock.rs +++ b/state-chain/pallets/cf-auction/src/mock.rs @@ -98,6 +98,7 @@ impl frame_system::Config for Test { type SystemWeightInfo = (); type SS58Prefix = (); type OnSetCode = (); + type MaxConsumers = frame_support::traits::ConstU32<5>; } parameter_types! { diff --git a/state-chain/pallets/cf-broadcast/src/mock.rs b/state-chain/pallets/cf-broadcast/src/mock.rs index f3a04a540b..9d1a35946a 100644 --- a/state-chain/pallets/cf-broadcast/src/mock.rs +++ b/state-chain/pallets/cf-broadcast/src/mock.rs @@ -66,6 +66,7 @@ impl frame_system::Config for Test { type SystemWeightInfo = (); type SS58Prefix = SS58Prefix; type OnSetCode = (); + type MaxConsumers = frame_support::traits::ConstU32<5>; } impl Chainflip for Test { diff --git a/state-chain/pallets/cf-emissions/src/mock.rs b/state-chain/pallets/cf-emissions/src/mock.rs index 8f22297bd4..1212e6f1e5 100644 --- a/state-chain/pallets/cf-emissions/src/mock.rs +++ b/state-chain/pallets/cf-emissions/src/mock.rs @@ -3,13 +3,14 @@ use cf_chains::{ eth::api::EthereumReplayProtection, mocks::MockEthereum, ApiCall, ChainAbi, ChainCrypto, UpdateFlipSupply, }; -use codec::{Decode, Encode}; +use codec::{Decode, Encode, MaxEncodedLen}; use frame_support::{ parameter_types, storage, traits::{Imbalance, UnfilteredDispatchable}, StorageHasher, Twox64Concat, }; use frame_system as system; +use scale_info::TypeInfo; use sp_core::H256; use sp_runtime::{ testing::Header, @@ -80,6 +81,7 @@ impl system::Config for Test { type SystemWeightInfo = (); type SS58Prefix = SS58Prefix; type OnSetCode = (); + type MaxConsumers = frame_support::traits::ConstU32<5>; } impl Chainflip for Test { @@ -163,7 +165,7 @@ impl RewardsDistribution for MockRewardsDistribution { } } -#[derive(Clone, Debug, Default, PartialEq, Eq, Encode, Decode, TypeInfo)] +#[derive(Clone, Debug, Default, PartialEq, Eq, Encode, Decode, TypeInfo, MaxEncodedLen)] pub struct MockUpdateFlipSupply { pub nonce: ::ReplayProtection, pub new_total_supply: u128, diff --git a/state-chain/pallets/cf-environment/src/mock.rs b/state-chain/pallets/cf-environment/src/mock.rs index 2296249b73..f40aaad674 100644 --- a/state-chain/pallets/cf-environment/src/mock.rs +++ b/state-chain/pallets/cf-environment/src/mock.rs @@ -57,6 +57,7 @@ impl system::Config for Test { type SystemWeightInfo = (); type SS58Prefix = SS58Prefix; type OnSetCode = (); + type MaxConsumers = frame_support::traits::ConstU32<5>; } impl pallet_cf_environment::Config for Test { diff --git a/state-chain/pallets/cf-flip/src/mock.rs b/state-chain/pallets/cf-flip/src/mock.rs index 19dcb1e063..0ca7c2a1e6 100644 --- a/state-chain/pallets/cf-flip/src/mock.rs +++ b/state-chain/pallets/cf-flip/src/mock.rs @@ -3,7 +3,11 @@ use cf_traits::{ impl_mock_waived_fees, mocks::ensure_origin_mock::NeverFailingOriginCheck, StakeTransfer, WaivedFees, }; -use frame_support::{parameter_types, traits::HandleLifetime, weights::IdentityFee}; +use frame_support::{ + parameter_types, + traits::{ConstU128, ConstU8, HandleLifetime}, + weights::{ConstantMultiplier, IdentityFee}, +}; use sp_core::H256; use sp_runtime::{ testing::Header, @@ -59,6 +63,7 @@ impl frame_system::Config for Test { type SystemWeightInfo = (); type SS58Prefix = SS58Prefix; type OnSetCode = (); + type MaxConsumers = frame_support::traits::ConstU32<5>; } pub type FlipBalance = u128; @@ -91,9 +96,10 @@ parameter_types! { impl pallet_transaction_payment::Config for Test { type OnChargeTransaction = pallet_cf_flip::FlipTransactionPayment; - type TransactionByteFee = TransactionByteFee; type WeightToFee = IdentityFee; type FeeMultiplierUpdate = (); + type OperationalFeeMultiplier = ConstU8<5>; + type LengthToFee = ConstantMultiplier>; } // Build genesis storage according to the mock runtime. diff --git a/state-chain/pallets/cf-flip/src/tests.rs b/state-chain/pallets/cf-flip/src/tests.rs index 781d4d3e67..59d845b627 100644 --- a/state-chain/pallets/cf-flip/src/tests.rs +++ b/state-chain/pallets/cf-flip/src/tests.rs @@ -326,7 +326,7 @@ mod test_tx_payments { use super::*; - const CALL: &Call = &Call::System(frame_system::Call::remark(vec![])); // call doesn't matter + const CALL: &Call = &Call::System(frame_system::Call::remark { remark: vec![] }); // call doesn't matter #[test] fn test_zero_fee() { diff --git a/state-chain/pallets/cf-governance/src/mock.rs b/state-chain/pallets/cf-governance/src/mock.rs index bea8ddd018..269248765b 100644 --- a/state-chain/pallets/cf-governance/src/mock.rs +++ b/state-chain/pallets/cf-governance/src/mock.rs @@ -61,6 +61,7 @@ impl system::Config for Test { type SystemWeightInfo = (); type SS58Prefix = SS58Prefix; type OnSetCode = (); + type MaxConsumers = frame_support::traits::ConstU32<5>; } pub struct UpgradeConditionMock; diff --git a/state-chain/pallets/cf-governance/src/tests.rs b/state-chain/pallets/cf-governance/src/tests.rs index 6e42e22081..b6d457c9fa 100644 --- a/state-chain/pallets/cf-governance/src/tests.rs +++ b/state-chain/pallets/cf-governance/src/tests.rs @@ -11,9 +11,9 @@ use crate as pallet_cf_governance; const DUMMY_WASM_BLOB: Vec = vec![]; fn mock_extrinsic() -> Box { - Box::new(Call::Governance(pallet_cf_governance::Call::::new_membership_set(vec![ - EVE, PETER, MAX, - ]))) + Box::new(Call::Governance(pallet_cf_governance::Call::::new_membership_set { + accounts: vec![EVE, PETER, MAX], + })) } fn next_block() { @@ -178,12 +178,14 @@ fn sudo_extrinsic() { new_test_ext().execute_with(|| { // Define a sudo call let sudo_call = - Box::new(Call::System(frame_system::Call::::set_code_without_checks(vec![ - 1, 2, 3, 4, - ]))); + Box::new(Call::System(frame_system::Call::::set_code_without_checks { + code: vec![1, 2, 3, 4], + })); // Wrap the sudo call as governance extrinsic let governance_extrinsic = - Box::new(Call::Governance(pallet_cf_governance::Call::::call_as_sudo(sudo_call))); + Box::new(Call::Governance(pallet_cf_governance::Call::::call_as_sudo { + call: sudo_call, + })); // Propose the governance extrinsic assert_ok!(Governance::propose_governance_extrinsic( Origin::signed(ALICE), diff --git a/state-chain/pallets/cf-online/src/mock.rs b/state-chain/pallets/cf-online/src/mock.rs index 3e73be87fc..b0ca19781e 100644 --- a/state-chain/pallets/cf-online/src/mock.rs +++ b/state-chain/pallets/cf-online/src/mock.rs @@ -70,6 +70,7 @@ impl frame_system::Config for Test { type SystemWeightInfo = (); type SS58Prefix = (); type OnSetCode = (); + type MaxConsumers = frame_support::traits::ConstU32<5>; } // A heartbeat interval in blocks diff --git a/state-chain/pallets/cf-reputation/src/mock.rs b/state-chain/pallets/cf-reputation/src/mock.rs index ad44733158..b10ce8ffdc 100644 --- a/state-chain/pallets/cf-reputation/src/mock.rs +++ b/state-chain/pallets/cf-reputation/src/mock.rs @@ -64,6 +64,7 @@ impl frame_system::Config for Test { type SystemWeightInfo = (); type SS58Prefix = (); type OnSetCode = (); + type MaxConsumers = frame_support::traits::ConstU32<5>; } // A heartbeat interval in blocks @@ -117,7 +118,7 @@ impl Chainflip for Test { } #[cfg_attr(feature = "std", derive(Serialize, Deserialize))] -#[derive(Copy, Clone, Debug, PartialEq, Eq, Encode, Decode, TypeInfo)] +#[derive(Copy, Clone, Debug, PartialEq, Eq, Encode, Decode, TypeInfo, MaxEncodedLen)] pub enum AllOffences { MissedHeartbeat, NotLockingYourComputer, diff --git a/state-chain/pallets/cf-staking/src/mock.rs b/state-chain/pallets/cf-staking/src/mock.rs index 73f787efc9..c0ba09e09b 100644 --- a/state-chain/pallets/cf-staking/src/mock.rs +++ b/state-chain/pallets/cf-staking/src/mock.rs @@ -67,6 +67,7 @@ impl frame_system::Config for Test { type SystemWeightInfo = (); type SS58Prefix = SS58Prefix; type OnSetCode = (); + type MaxConsumers = frame_support::traits::ConstU32<5>; } impl Chainflip for Test { diff --git a/state-chain/pallets/cf-staking/src/tests.rs b/state-chain/pallets/cf-staking/src/tests.rs index 73a770bf28..b3039853d4 100644 --- a/state-chain/pallets/cf-staking/src/tests.rs +++ b/state-chain/pallets/cf-staking/src/tests.rs @@ -78,7 +78,7 @@ fn staked_amount_is_added_and_subtracted() { assert_event_sequence!( Test, - Event::System(frame_system::Event::NewAccount(ALICE)), + Event::System(frame_system::Event::NewAccount { account: ALICE }), Event::Flip(pallet_cf_flip::Event::BalanceSettled( ImbalanceSource::External, ImbalanceSource::Internal(InternalSource::Account(ALICE)), @@ -93,7 +93,7 @@ fn staked_amount_is_added_and_subtracted() { 0 )), Event::Staking(crate::Event::Staked(ALICE, STAKE_A2, STAKE_A1 + STAKE_A2)), - Event::System(frame_system::Event::NewAccount(BOB)), + Event::System(frame_system::Event::NewAccount { account: BOB }), Event::Flip(pallet_cf_flip::Event::BalanceSettled( ImbalanceSource::External, ImbalanceSource::Internal(InternalSource::Account(BOB)), @@ -152,7 +152,7 @@ fn claiming_unclaimable_is_err() { assert_event_sequence!( Test, - Event::System(frame_system::Event::NewAccount(ALICE)), + Event::System(frame_system::Event::NewAccount { account: ALICE }), Event::Flip(pallet_cf_flip::Event::BalanceSettled( ImbalanceSource::External, ImbalanceSource::Internal(InternalSource::Account(ALICE)), @@ -267,7 +267,7 @@ fn staked_and_claimed_events_must_match() { assert_event_sequence!( Test, - Event::System(frame_system::Event::NewAccount(ALICE)), + Event::System(frame_system::Event::NewAccount { account: ALICE }), Event::Flip(pallet_cf_flip::Event::BalanceSettled( ImbalanceSource::External, ImbalanceSource::Internal(InternalSource::Account(ALICE)), @@ -281,7 +281,7 @@ fn staked_and_claimed_events_must_match() { STAKE, 0 )), - Event::System(frame_system::Event::KilledAccount(ALICE)), + Event::System(frame_system::Event::KilledAccount { account: ALICE }), Event::Staking(crate::Event::ClaimSettled(ALICE, STAKE)) ); }); @@ -297,21 +297,12 @@ fn multisig_endpoints_cant_be_called_from_invalid_origins() { BadOrigin ); assert_noop!( - Staking::staked( - Origin::signed(Default::default()), - ALICE, - STAKE, - ETH_ZERO_ADDRESS, - TX_HASH, - ), + Staking::staked(Origin::signed(ALICE), ALICE, STAKE, ETH_ZERO_ADDRESS, TX_HASH,), BadOrigin ); assert_noop!(Staking::claimed(Origin::none(), ALICE, STAKE, TX_HASH), BadOrigin); - assert_noop!( - Staking::claimed(Origin::signed(Default::default()), ALICE, STAKE, TX_HASH), - BadOrigin - ); + assert_noop!(Staking::claimed(Origin::signed(ALICE), ALICE, STAKE, TX_HASH), BadOrigin); }); } @@ -338,7 +329,7 @@ fn signature_is_inserted() { assert_event_sequence!( Test, - Event::System(frame_system::Event::NewAccount(ALICE)), + Event::System(frame_system::Event::NewAccount { account: ALICE }), Event::Flip(pallet_cf_flip::Event::BalanceSettled( ImbalanceSource::External, ImbalanceSource::Internal(InternalSource::Account(ALICE)), @@ -463,7 +454,7 @@ fn test_retirement() { assert_event_sequence!( Test, - Event::System(frame_system::Event::NewAccount(ALICE)), + Event::System(frame_system::Event::NewAccount { account: ALICE }), Event::Flip(pallet_cf_flip::Event::BalanceSettled( ImbalanceSource::External, ImbalanceSource::Internal(InternalSource::Account(ALICE)), @@ -525,7 +516,7 @@ fn claim_expiry() { assert_event_sequence!( Test, - Event::System(frame_system::Event::NewAccount(ALICE)), + Event::System(frame_system::Event::NewAccount { account: ALICE }), Event::Flip(FlipEvent::BalanceSettled( ImbalanceSource::External, ImbalanceSource::Internal(InternalSource::Account(ALICE)), @@ -533,7 +524,7 @@ fn claim_expiry() { 0 )), Event::Staking(crate::Event::Staked(ALICE, STAKE, STAKE)), - Event::System(frame_system::Event::NewAccount(BOB)), + Event::System(frame_system::Event::NewAccount { account: BOB }), Event::Flip(FlipEvent::BalanceSettled( ImbalanceSource::External, ImbalanceSource::Internal(InternalSource::Account(BOB)), @@ -628,7 +619,7 @@ fn test_claim_all() { // We should have a claim for the full staked amount minus the bond. assert_event_sequence!( Test, - Event::System(frame_system::Event::NewAccount(ALICE)), + Event::System(frame_system::Event::NewAccount { account: ALICE }), Event::Flip(pallet_cf_flip::Event::BalanceSettled( ImbalanceSource::External, ImbalanceSource::Internal(InternalSource::Account(ALICE)), @@ -675,7 +666,7 @@ fn test_check_withdrawal_address() { } assert_event_sequence!( Test, - Event::System(frame_system::Event::NewAccount(ALICE)), + Event::System(frame_system::Event::NewAccount { account: ALICE }), Event::Flip(pallet_cf_flip::Event::BalanceSettled( ImbalanceSource::External, ImbalanceSource::Internal(InternalSource::Account(ALICE)), @@ -737,7 +728,7 @@ fn stake_with_provided_withdrawal_only_on_first_attempt() { // Expect an failed stake event to be fired but no stake event assert_event_sequence!( Test, - Event::System(frame_system::Event::NewAccount(ALICE)), + Event::System(frame_system::Event::NewAccount { account: ALICE }), Event::Flip(pallet_cf_flip::Event::BalanceSettled( ImbalanceSource::External, ImbalanceSource::Internal(InternalSource::Account(ALICE)), diff --git a/state-chain/pallets/cf-threshold-signature/src/mock.rs b/state-chain/pallets/cf-threshold-signature/src/mock.rs index 5da3cf7937..fc3d7dc70c 100644 --- a/state-chain/pallets/cf-threshold-signature/src/mock.rs +++ b/state-chain/pallets/cf-threshold-signature/src/mock.rs @@ -19,6 +19,7 @@ use frame_support::{ traits::{EnsureOrigin, UnfilteredDispatchable}, }; use frame_system; +use scale_info::TypeInfo; use sp_core::H256; use sp_runtime::{ testing::Header, @@ -69,6 +70,7 @@ impl frame_system::Config for Test { type SystemWeightInfo = (); type SS58Prefix = SS58Prefix; type OnSetCode = (); + type MaxConsumers = frame_support::traits::ConstU32<5>; } use cf_traits::mocks::{ensure_origin_mock::NeverFailingOriginCheck, epoch_info::MockEpochInfo}; diff --git a/state-chain/pallets/cf-threshold-signature/src/tests.rs b/state-chain/pallets/cf-threshold-signature/src/tests.rs index a853164368..e4359639a6 100644 --- a/state-chain/pallets/cf-threshold-signature/src/tests.rs +++ b/state-chain/pallets/cf-threshold-signature/src/tests.rs @@ -346,7 +346,7 @@ mod unsigned_validation { let (_, ceremony_id) = MockEthereumThresholdSigner::request_signature(PAYLOAD); assert_ok!(Test::validate_unsigned( TransactionSource::External, - &PalletCall::signature_success(ceremony_id, sign(PAYLOAD)).into() + &PalletCall::signature_success { ceremony_id, signature: sign(PAYLOAD) }.into() )); }); } @@ -358,7 +358,8 @@ mod unsigned_validation { assert_eq!( Test::validate_unsigned( TransactionSource::External, - &PalletCall::signature_success(1234, sign(PAYLOAD)).into() + &PalletCall::signature_success { ceremony_id: 1234, signature: sign(PAYLOAD) } + .into() ) .unwrap_err(), InvalidTransaction::Stale.into() @@ -375,7 +376,8 @@ mod unsigned_validation { assert_eq!( Test::validate_unsigned( TransactionSource::External, - &PalletCall::signature_success(ceremony_id, INVALID_SIGNATURE).into() + &PalletCall::signature_success { ceremony_id, signature: INVALID_SIGNATURE } + .into() ) .unwrap_err(), InvalidTransaction::BadProof.into() @@ -389,7 +391,7 @@ mod unsigned_validation { assert_eq!( MockEthereumThresholdSigner::validate_unsigned( TransactionSource::External, - &PalletCall::report_signature_failed(0, Default::default(),) + &PalletCall::report_signature_failed { id: 0, offenders: Default::default() } ) .unwrap_err(), InvalidTransaction::Call.into() diff --git a/state-chain/pallets/cf-validator/src/mock.rs b/state-chain/pallets/cf-validator/src/mock.rs index 1760675c7d..13a6f9323d 100644 --- a/state-chain/pallets/cf-validator/src/mock.rs +++ b/state-chain/pallets/cf-validator/src/mock.rs @@ -67,6 +67,7 @@ impl frame_system::Config for Test { type SystemWeightInfo = (); type SS58Prefix = (); type OnSetCode = (); + type MaxConsumers = frame_support::traits::ConstU32<5>; } impl_opaque_keys! { @@ -93,7 +94,6 @@ impl pallet_session::Config for Test { type ValidatorIdOf = ConvertInto; type Keys = MockSessionKeys; type Event = Event; - type DisabledValidatorsThreshold = DisabledValidatorsThreshold; type NextSessionRotation = (); type WeightInfo = (); } @@ -299,10 +299,8 @@ pub(crate) fn new_test_ext() -> TestExternalitiesWithCheck { pub fn run_to_block(n: u64) { assert_eq!(::current_authorities(), Session::validators()); while System::block_number() < n { - Session::on_finalize(System::block_number()); System::set_block_number(System::block_number() + 1); - Session::on_initialize(System::block_number()); - >::on_initialize(System::block_number()); + <(Session, ValidatorPallet) as OnInitialize>::on_initialize(System::block_number()); MockVaultRotator::on_initialise(); assert_eq!(::current_authorities(), Session::validators()); } diff --git a/state-chain/pallets/cf-vaults/src/mock.rs b/state-chain/pallets/cf-vaults/src/mock.rs index b9fe57b47f..28b8ec4f37 100644 --- a/state-chain/pallets/cf-vaults/src/mock.rs +++ b/state-chain/pallets/cf-vaults/src/mock.rs @@ -72,6 +72,7 @@ impl frame_system::Config for MockRuntime { type SystemWeightInfo = (); type SS58Prefix = (); type OnSetCode = (); + type MaxConsumers = frame_support::traits::ConstU32<5>; } parameter_types! {} @@ -101,7 +102,7 @@ impl UnfilteredDispatchable for MockCallback { } } -#[derive(Copy, Clone, Debug, Default, PartialEq, Eq, Encode, Decode, TypeInfo)] +#[derive(Copy, Clone, Debug, Default, PartialEq, Eq, Encode, Decode, TypeInfo, MaxEncodedLen)] pub struct MockSetAggKeyWithAggKey { nonce: ::ReplayProtection, new_key: ::AggKey, diff --git a/state-chain/pallets/cf-witnesser/src/mock.rs b/state-chain/pallets/cf-witnesser/src/mock.rs index 7b1bb456c2..dd60f5fa73 100644 --- a/state-chain/pallets/cf-witnesser/src/mock.rs +++ b/state-chain/pallets/cf-witnesser/src/mock.rs @@ -56,6 +56,7 @@ impl system::Config for Test { type SystemWeightInfo = (); type SS58Prefix = SS58Prefix; type OnSetCode = (); + type MaxConsumers = frame_support::traits::ConstU32<5>; } impl pallet_cf_witness::Config for Test { diff --git a/state-chain/pallets/cf-witnesser/src/tests.rs b/state-chain/pallets/cf-witnesser/src/tests.rs index 2c9fc84dcf..8629c800a5 100644 --- a/state-chain/pallets/cf-witnesser/src/tests.rs +++ b/state-chain/pallets/cf-witnesser/src/tests.rs @@ -9,7 +9,7 @@ use frame_support::{assert_noop, assert_ok}; #[test] fn call_on_threshold() { new_test_ext().execute_with(|| { - let call = Box::new(Call::Dummy(pallet_dummy::Call::::increment_value())); + let call = Box::new(Call::Dummy(pallet_dummy::Call::::increment_value {})); // Only one vote, nothing should happen yet. assert_ok!(Witnesser::witness(Origin::signed(ALISSA), call.clone())); @@ -55,7 +55,7 @@ fn call_on_threshold() { #[test] fn no_double_call_on_epoch_boundary() { new_test_ext().execute_with(|| { - let call = Box::new(Call::Dummy(pallet_dummy::Call::::increment_value())); + let call = Box::new(Call::Dummy(pallet_dummy::Call::::increment_value {})); // Only one vote, nothing should happen yet. assert_ok!(Witnesser::witness_at_epoch(Origin::signed(ALISSA), call.clone(), 1)); @@ -101,7 +101,7 @@ fn no_double_call_on_epoch_boundary() { #[test] fn cannot_double_witness() { new_test_ext().execute_with(|| { - let call = Box::new(Call::Dummy(pallet_dummy::Call::::increment_value())); + let call = Box::new(Call::Dummy(pallet_dummy::Call::::increment_value {})); // Only one vote, nothing should happen yet. assert_ok!(Witnesser::witness(Origin::signed(ALISSA), call.clone())); @@ -118,7 +118,7 @@ fn cannot_double_witness() { #[test] fn only_authorities_can_witness() { new_test_ext().execute_with(|| { - let call = Box::new(Call::Dummy(pallet_dummy::Call::::increment_value())); + let call = Box::new(Call::Dummy(pallet_dummy::Call::::increment_value {})); // Validators can witness assert_ok!(Witnesser::witness(Origin::signed(ALISSA), call.clone())); @@ -136,7 +136,7 @@ fn only_authorities_can_witness() { #[test] fn can_continue_to_witness_for_old_epochs() { new_test_ext().execute_with(|| { - let call = Box::new(Call::Dummy(pallet_dummy::Call::::increment_value())); + let call = Box::new(Call::Dummy(pallet_dummy::Call::::increment_value {})); // These are ALISSA, BOBSON, CHARLEMAGNE let mut current_authorities = MockEpochInfo::current_authorities(); diff --git a/state-chain/runtime/src/chainflip/missed_authorship_slots.rs b/state-chain/runtime/src/chainflip/missed_authorship_slots.rs index 4b7a46a2fe..3f8c19764b 100644 --- a/state-chain/runtime/src/chainflip/missed_authorship_slots.rs +++ b/state-chain/runtime/src/chainflip/missed_authorship_slots.rs @@ -50,7 +50,10 @@ impl MissedAuthorshipSlots for MissedAuraSlots { mod test_missed_authorship_slots { use super::*; use codec::Encode; - use frame_support::{construct_runtime, parameter_types, traits::OnInitialize}; + use frame_support::{ + construct_runtime, parameter_types, + traits::{ConstU32, OnInitialize}, + }; use sp_consensus_aura::ed25519::AuthorityId; use sp_runtime::{ testing::{Header, UintAuthorityId}, @@ -100,6 +103,7 @@ mod test_missed_authorship_slots { type SystemWeightInfo = (); type SS58Prefix = (); type OnSetCode = (); + type MaxConsumers = frame_support::traits::ConstU32<5>; } parameter_types! { @@ -115,6 +119,7 @@ mod test_missed_authorship_slots { impl pallet_aura::Config for Test { type AuthorityId = AuthorityId; type DisabledValidators = (); + type MaxAuthorities = ConstU32<10>; } pub fn new_test_ext(authorities: Vec) -> frame_support::sp_io::TestExternalities { diff --git a/state-chain/traits/src/mocks/missed_authorship_slots.rs b/state-chain/traits/src/mocks/missed_authorship_slots.rs deleted file mode 100644 index e69de29bb2..0000000000 From dd0d713e40794c7825a962ae95949a898a384ea0 Mon Sep 17 00:00:00 2001 From: Daniel Date: Mon, 9 May 2022 16:44:06 +0200 Subject: [PATCH 07/33] chore: update more tests --- engine/src/state_chain/client.rs | 36 ++++++++++---------- state-chain/pallets/cf-validator/src/mock.rs | 2 +- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/engine/src/state_chain/client.rs b/engine/src/state_chain/client.rs index ca8075d72d..1c675eb61a 100644 --- a/engine/src/state_chain/client.rs +++ b/engine/src/state_chain/client.rs @@ -1254,9 +1254,9 @@ mod tests { StateChainClient::create_test_sc_client(mock_state_chain_rpc_client); let force_rotation_call: state_chain_runtime::Call = - pallet_cf_governance::Call::propose_governance_extrinsic(Box::new( - pallet_cf_validator::Call::force_rotation().into(), - )) + pallet_cf_governance::Call::propose_governance_extrinsic { + call: Box::new(pallet_cf_validator::Call::force_rotation {}.into()), + } .into(); assert_ok!( @@ -1288,9 +1288,9 @@ mod tests { StateChainClient::create_test_sc_client(mock_state_chain_rpc_client); let force_rotation_call: state_chain_runtime::Call = - pallet_cf_governance::Call::propose_governance_extrinsic(Box::new( - pallet_cf_validator::Call::force_rotation().into(), - )) + pallet_cf_governance::Call::propose_governance_extrinsic { + call: Box::new(pallet_cf_validator::Call::force_rotation {}.into()), + } .into(); state_chain_client @@ -1324,9 +1324,9 @@ mod tests { StateChainClient::create_test_sc_client(mock_state_chain_rpc_client); let force_rotation_call: state_chain_runtime::Call = - pallet_cf_governance::Call::propose_governance_extrinsic(Box::new( - pallet_cf_validator::Call::force_rotation().into(), - )) + pallet_cf_governance::Call::propose_governance_extrinsic { + call: Box::new(pallet_cf_validator::Call::force_rotation {}.into()), + } .into(); state_chain_client @@ -1386,9 +1386,9 @@ mod tests { StateChainClient::create_test_sc_client(mock_state_chain_rpc_client); let force_rotation_call: state_chain_runtime::Call = - pallet_cf_governance::Call::propose_governance_extrinsic(Box::new( - pallet_cf_validator::Call::force_rotation().into(), - )) + pallet_cf_governance::Call::propose_governance_extrinsic { + call: Box::new(pallet_cf_validator::Call::force_rotation {}.into()), + } .into(); assert_ok!( @@ -1422,9 +1422,9 @@ mod tests { StateChainClient::create_test_sc_client(mock_state_chain_rpc_client); let force_rotation_call: state_chain_runtime::Call = - pallet_cf_governance::Call::propose_governance_extrinsic(Box::new( - pallet_cf_validator::Call::force_rotation().into(), - )) + pallet_cf_governance::Call::propose_governance_extrinsic { + call: Box::new(pallet_cf_validator::Call::force_rotation {}.into()), + } .into(); state_chain_client @@ -1472,9 +1472,9 @@ mod tests { StateChainClient::create_test_sc_client(mock_state_chain_rpc_client); let force_rotation_call: state_chain_runtime::Call = - pallet_cf_governance::Call::propose_governance_extrinsic(Box::new( - pallet_cf_validator::Call::force_rotation().into(), - )) + pallet_cf_governance::Call::propose_governance_extrinsic { + call: Box::new(pallet_cf_validator::Call::force_rotation {}.into()), + } .into(); assert_ok!( diff --git a/state-chain/pallets/cf-validator/src/mock.rs b/state-chain/pallets/cf-validator/src/mock.rs index 13a6f9323d..db6660e92c 100644 --- a/state-chain/pallets/cf-validator/src/mock.rs +++ b/state-chain/pallets/cf-validator/src/mock.rs @@ -2,7 +2,7 @@ use super::*; use crate as pallet_cf_validator; use frame_support::{ construct_runtime, parameter_types, - traits::{OnFinalize, OnInitialize, ValidatorRegistration}, + traits::{OnInitialize, ValidatorRegistration}, }; use cf_traits::{ From 0bca1af4a7a5f95a9477de124854d6344c5c9000 Mon Sep 17 00:00:00 2001 From: Daniel Date: Tue, 10 May 2022 11:19:37 +0200 Subject: [PATCH 08/33] fix call --- state-chain/cf-integration-tests/src/lib.rs | 22 ++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/state-chain/cf-integration-tests/src/lib.rs b/state-chain/cf-integration-tests/src/lib.rs index 292e160f20..794a1f5a98 100644 --- a/state-chain/cf-integration-tests/src/lib.rs +++ b/state-chain/cf-integration-tests/src/lib.rs @@ -209,12 +209,12 @@ mod tests { state_chain_runtime::Witnesser::witness_at_epoch( Origin::signed(self.node_id.clone()), Box::new( - pallet_cf_staking::Call::staked( - validator_id.clone(), - *amount, - ETH_ZERO_ADDRESS, - TX_HASH, - ) + pallet_cf_staking::Call::staked { + account_id: validator_id.clone(), + amount: *amount, + withdrawal_address: ETH_ZERO_ADDRESS, + tx_hash: TX_HASH, + } .into(), ), *epoch, @@ -265,11 +265,11 @@ mod tests { // If we rotating let's witness the keys being rotated on the contract state_chain_runtime::Witnesser::witness( Origin::signed(self.node_id.clone()), - Box::new(pallet_cf_vaults::Call::vault_key_rotated( - (&*self.threshold_signer).borrow_mut().proposed_public_key(), - 100, - [1u8; 32].into(), - ).into()), + Box::new(pallet_cf_vaults::Call::vault_key_rotated { + new_public_key: (&*self.threshold_signer).borrow_mut().proposed_public_key(), + block_number: 100, + tx_hash: [1u8; 32].into(), + }.into()), ).expect("should be able to vault key rotation for node"); } }, From 2917f33d91ebffcef163844256720d6d0c967a7c Mon Sep 17 00:00:00 2001 From: Daniel Date: Mon, 9 May 2022 16:44:22 +0200 Subject: [PATCH 09/33] fix: dependency conflict in signing --- engine/src/multisig/client/keygen/keygen_stages.rs | 2 +- engine/src/multisig/client/signing/frost.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/engine/src/multisig/client/keygen/keygen_stages.rs b/engine/src/multisig/client/keygen/keygen_stages.rs index 918893d445..efcbc5b49a 100644 --- a/engine/src/multisig/client/keygen/keygen_stages.rs +++ b/engine/src/multisig/client/keygen/keygen_stages.rs @@ -222,7 +222,7 @@ derive_display_as_type_name!(VerifyCommitmentsBroadcast2); /// Check if the public key's x coordinate is smaller than "half secp256k1's order", /// which is a requirement imposed by the Key Manager contract pub fn is_contract_compatible(pk: &secp256k1::PublicKey) -> bool { - let pubkey = cf_chains::eth::AggKey::from(pk); + let pubkey = cf_chains::eth::AggKey::from_pubkey_compressed(pk.serialize()); let x = BigInt::from_bytes(&pubkey.pub_key_x); let half_order = BigInt::from_bytes(&secp256k1::constants::CURVE_ORDER) / 2 + 1; diff --git a/engine/src/multisig/client/signing/frost.rs b/engine/src/multisig/client/signing/frost.rs index fc3bc6a0b2..e53a568446 100644 --- a/engine/src/multisig/client/signing/frost.rs +++ b/engine/src/multisig/client/signing/frost.rs @@ -370,8 +370,8 @@ fn build_challenge( .try_into() .expect("Should never fail, the `message` argument should always be a valid hash"); - let e = - AggKey::from(&pubkey).message_challenge(&msg_hash, &pubkey_to_eth_addr(nonce_commitment)); + let e = AggKey::from_pubkey_compressed(pubkey.serialize()) + .message_challenge(&msg_hash, &pubkey_to_eth_addr(nonce_commitment)); Scalar::from_bytes(&e) } From 9f3070f2a6b33c6d2f1d58c67e31ac49f8845809 Mon Sep 17 00:00:00 2001 From: Daniel Date: Mon, 9 May 2022 18:07:31 +0200 Subject: [PATCH 10/33] fix: validator tests session keys --- state-chain/pallets/cf-validator/src/mock.rs | 15 ++++++++++++++- state-chain/pallets/cf-validator/src/tests.rs | 7 ++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/state-chain/pallets/cf-validator/src/mock.rs b/state-chain/pallets/cf-validator/src/mock.rs index db6660e92c..31935e288b 100644 --- a/state-chain/pallets/cf-validator/src/mock.rs +++ b/state-chain/pallets/cf-validator/src/mock.rs @@ -13,6 +13,7 @@ use cf_traits::{ }, AuctionResult, Chainflip, ChainflipAccount, ChainflipAccountData, IsOnline, QualifyNode, }; +use frame_system::RawOrigin; use sp_core::H256; use sp_runtime::{ impl_opaque_keys, @@ -248,6 +249,18 @@ pub const CLAIM_PERCENTAGE_AT_GENESIS: Percentage = 50; pub const MINIMUM_ACTIVE_BID_AT_GENESIS: Amount = 1; pub const EPOCH_DURATION: u64 = 10; +pub fn register_keys(ids: &[u64]) { + for id in ids { + System::inc_providers(id); + Session::set_keys( + RawOrigin::Signed(*id).into(), + UintAuthorityId(*id).into(), + Default::default(), + ) + .unwrap(); + } +} + pub(crate) struct TestExternalitiesWithCheck { ext: sp_io::TestExternalities, } @@ -300,7 +313,7 @@ pub fn run_to_block(n: u64) { assert_eq!(::current_authorities(), Session::validators()); while System::block_number() < n { System::set_block_number(System::block_number() + 1); - <(Session, ValidatorPallet) as OnInitialize>::on_initialize(System::block_number()); + AllPalletsWithoutSystem::on_initialize(System::block_number()); MockVaultRotator::on_initialise(); assert_eq!(::current_authorities(), Session::validators()); } diff --git a/state-chain/pallets/cf-validator/src/tests.rs b/state-chain/pallets/cf-validator/src/tests.rs index 91efc8465b..4233237e11 100644 --- a/state-chain/pallets/cf-validator/src/tests.rs +++ b/state-chain/pallets/cf-validator/src/tests.rs @@ -194,6 +194,8 @@ fn auction_winners_should_be_the_new_authorities_on_new_epoch() { let new_bond = 10; let new_authorities = vec![1, 2]; + register_keys(&new_authorities); + MockAuctioneer::set_run_behaviour(Ok(AuctionResult { winners: new_authorities.clone(), minimum_active_bid: new_bond, @@ -533,8 +535,11 @@ fn test_setting_vanity_names_() { #[test] fn test_missing_author_punishment() { new_test_ext().execute_with(|| { + let winners = vec![1, 2, 3, 4]; + register_keys(&winners[..]); + RotationPhase::::set(RotationStatusOf::::VaultsRotated(AuctionResult { - winners: vec![1, 2, 3, 4], + winners, ..Default::default() })); move_forward_blocks(2); From 80fc06fd6936ca92c8d6eac52c06ff0321419839 Mon Sep 17 00:00:00 2001 From: Daniel Date: Mon, 9 May 2022 18:10:12 +0200 Subject: [PATCH 11/33] chore: clippy --- engine/src/state_chain/client.rs | 9 ++++++--- state-chain/node/src/command_helper.rs | 6 +++--- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/engine/src/state_chain/client.rs b/engine/src/state_chain/client.rs index 1c675eb61a..2ac932f9f7 100644 --- a/engine/src/state_chain/client.rs +++ b/engine/src/state_chain/client.rs @@ -1104,10 +1104,13 @@ async fn inner_connect_to_state_chain( our_account_id, // TODO: Make this type safe: frame_system::Events::::hashed_key() - Events is private :( events_storage_key: StorageKey(storage_prefix(b"System", b"Events").to_vec()), - heartbeat_block_interval: metadata.pallets.iter().find(|pallet| pallet.name == "Reputation").expect("No module 'Reputation' in chain metadata").constants.iter() + heartbeat_block_interval: metadata + .pallets.iter() + .find(|pallet| pallet.name == "Reputation").expect("No module 'Reputation' in chain metadata") + .constants.iter() .find_map(|constant| if constant.name == "HeartbeatBlockInterval" { Some(&constant.value[..])} else { None }) - .ok_or(anyhow::anyhow!("No constant 'HeartbeatBlockInterval' in chain metadata for module 'Reputation'")) - .and_then(|value_bytes| Ok(u32::decode(&mut &value_bytes[..])?))?, + .ok_or_else(|| anyhow::anyhow!("No constant 'HeartbeatBlockInterval' in chain metadata for module 'Reputation'")) + .and_then(|value_bytes| Ok(u32::decode(&mut &*value_bytes)?))?, }), )) } diff --git a/state-chain/node/src/command_helper.rs b/state-chain/node/src/command_helper.rs index 13c3c45110..0c5e4b133d 100644 --- a/state-chain/node/src/command_helper.rs +++ b/state-chain/node/src/command_helper.rs @@ -109,10 +109,10 @@ pub fn create_benchmark_extrinsic( let signature = raw_payload.using_encoded(|e| sender.sign(e)); runtime::UncheckedExtrinsic::new_signed( - call.clone(), + call, sp_runtime::AccountId32::from(sender.public()).into(), - runtime::Signature::Sr25519(signature.clone()), - extra.clone(), + runtime::Signature::Sr25519(signature), + extra, ) } From f179874f2904c8eb8184fc1e2d0afcff04bfac2b Mon Sep 17 00:00:00 2001 From: Daniel Date: Tue, 10 May 2022 11:21:53 +0200 Subject: [PATCH 12/33] feat: grandpa rpcs --- Cargo.lock | 27 ++++++++++++++++++++++- state-chain/node/Cargo.toml | 1 + state-chain/node/src/service.rs | 38 +++++++++++++++++++++++++++++++++ 3 files changed, 65 insertions(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index 7cc4efac1b..9d629f93e7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1080,6 +1080,7 @@ dependencies = [ "sc-consensus-aura", "sc-executor", "sc-finality-grandpa", + "sc-finality-grandpa-rpc", "sc-keystore", "sc-rpc", "sc-rpc-api", @@ -7410,6 +7411,30 @@ dependencies = [ "thiserror", ] +[[package]] +name = "sc-finality-grandpa-rpc" +version = "0.10.0-dev" +source = "git+https://github.com/chainflip-io/substrate.git?tag=chainflip-monthly-2022-05#9bf63f0f67b5d56912d34e71fcefae73687f0772" +dependencies = [ + "finality-grandpa", + "futures 0.3.21", + "jsonrpc-core", + "jsonrpc-core-client", + "jsonrpc-derive", + "jsonrpc-pubsub", + "log 0.4.17", + "parity-scale-codec", + "sc-client-api", + "sc-finality-grandpa", + "sc-rpc", + "serde 1.0.137", + "serde_json", + "sp-blockchain", + "sp-core", + "sp-runtime", + "thiserror", +] + [[package]] name = "sc-informant" version = "0.10.0-dev" @@ -9944,7 +9969,7 @@ checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675" dependencies = [ "cfg-if 1.0.0", "digest 0.10.3", - "rand 0.4.6", + "rand 0.8.5", "static_assertions", ] diff --git a/state-chain/node/Cargo.toml b/state-chain/node/Cargo.toml index 4013e5ad6f..a9f2d3f7df 100644 --- a/state-chain/node/Cargo.toml +++ b/state-chain/node/Cargo.toml @@ -51,6 +51,7 @@ sp-consensus-aura = { git = "https://github.com/chainflip-io/substrate.git", tag sp-consensus = { git = "https://github.com/chainflip-io/substrate.git", tag = "chainflip-monthly-2022-05" } sc-consensus = { git = "https://github.com/chainflip-io/substrate.git", tag = "chainflip-monthly-2022-05" } sc-finality-grandpa = { git = "https://github.com/chainflip-io/substrate.git", tag = "chainflip-monthly-2022-05" } +sc-finality-grandpa-rpc = { git = "https://github.com/chainflip-io/substrate.git", tag = "chainflip-monthly-2022-05" } sp-finality-grandpa = { git = "https://github.com/chainflip-io/substrate.git", tag = "chainflip-monthly-2022-05" } sc-client-api = { git = "https://github.com/chainflip-io/substrate.git", tag = "chainflip-monthly-2022-05" } sp-runtime = { version = "6.0.0", git = "https://github.com/chainflip-io/substrate.git", tag = "chainflip-monthly-2022-05" } diff --git a/state-chain/node/src/service.rs b/state-chain/node/src/service.rs index 97de5e0636..f7ebab6838 100644 --- a/state-chain/node/src/service.rs +++ b/state-chain/node/src/service.rs @@ -161,6 +161,8 @@ fn remote_keystore(_url: &str) -> Result, &'static str> { /// Builds a new service for a full client. pub fn new_full(mut config: Configuration) -> Result { + use sc_finality_grandpa_rpc::{GrandpaApi, GrandpaRpcHandler}; + let sc_service::PartialComponents { client, backend, @@ -172,6 +174,34 @@ pub fn new_full(mut config: Configuration) -> Result other: (block_import, grandpa_link, mut telemetry), } = new_partial(&config)?; + let ( + shared_voter_state, + shared_authority_set, + justification_stream, + subscription_executor, + finality_provider, + ) = { + let (_grandpa_block_import, grandpa_link) = + sc_finality_grandpa::block_import_with_authority_set_hard_forks( + client.clone(), + &(client.clone() as Arc<_>), + select_chain.clone(), + Vec::new(), + telemetry.as_ref().map(|x| x.handle()), + )?; + + ( + sc_finality_grandpa::SharedVoterState::empty(), + grandpa_link.shared_authority_set().clone(), + grandpa_link.justification_stream(), + sc_rpc::SubscriptionTaskExecutor::new(task_manager.spawn_handle()), + sc_finality_grandpa::FinalityProofProvider::new_for_service( + backend.clone(), + Some(grandpa_link.shared_authority_set().clone()), + ), + ) + }; + if let Some(url) = &config.keystore_remote { match remote_keystore(url) { Ok(k) => keystore_container.set_remote_keystore(k), @@ -255,6 +285,14 @@ pub fn new_full(mut config: Configuration) -> Result pallet_transaction_payment_rpc::TransactionPayment::new(client.clone()), )); + io.extend_with(GrandpaApi::to_delegate(GrandpaRpcHandler::new( + shared_authority_set.clone(), + shared_voter_state.clone(), + justification_stream.clone(), + subscription_executor.clone(), + finality_provider.clone(), + ))); + // Implement custom RPC extensions io.extend_with(CustomApi::to_delegate(CustomRpc { client: client.clone(), From bb4185f063794238864d45bb6e6c797e309bc5be Mon Sep 17 00:00:00 2001 From: Daniel Date: Tue, 10 May 2022 11:26:28 +0200 Subject: [PATCH 13/33] =?UTF-8?q?chore:=20remove=20types.json=20?= =?UTF-8?q?=F0=9F=92=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- state-chain/types.json | 279 ----------------------------------------- 1 file changed, 279 deletions(-) delete mode 100644 state-chain/types.json diff --git a/state-chain/types.json b/state-chain/types.json deleted file mode 100644 index 6c411b5d79..0000000000 --- a/state-chain/types.json +++ /dev/null @@ -1,279 +0,0 @@ -{ - "AccountInfo": { - "nonce": "Index", - "consumers": "RefCount", - "providers": "RefCount", - "sufficients": "RefCount", - "data": "ChainflipAccountData" - }, - "AuthoritySetSizeRange": "(u16,u16)", - "ActiveProposal": "(ProposalId, Timestamp)", - "Address": "MultiAddress", - "AggKey": { - "public_key": "[u8; 32]", - "parity_bit": "ParityBit" - }, - "AggKeyFor": "AggKey", - "Amount": "u128", - "AsyncResult": { - "_enum": [ - "Void", - "Pending", - "Ready" - ] - }, - "AttemptCount": "u32", - "AuctionError": { - "_enum": [ - "NotEnoughBidders" - ] - }, - "AuctionRange": "(u32,u32)", - "AuctionResult": { - "winners": "Vec", - "minimum_active_bid": "Amount" - }, - "BasisPoints": "u32", - "Balance": "FlipBalance", - "Bid": "(ValidatorId, Amount)", - "BlockNumber": "u32", - "BroadcastAttempt": { - "broadcast_attempt_id": "BroadcastAttemptId", - "unsigned_tx": "UnsignedTransactionFor" - }, - "BroadcastAttemptId": { - "broadcast_id": "BroadcastId", - "attempt_count": "AttemptCount" - }, - "BroadcastId": "u32", - "BroadcastStage": { - "_enum": [ - "TransactionSigning", - "Transmission" - ] - }, - "CallHash": "[u8;32]", - "CeremonyId": "u64", - "ChainBlockNumber": "u64", - "ChainflipAccountData": { - "state": "ChainflipAccountState", - "last_active_epoch": "Option" - }, - "ChainflipAccountState": { - "_enum": [ - "Passive", - "Backup", - "Validator" - ] - }, - "ChainId": { - "_enum": [ - "Ethereum" - ] - }, - "Duration": "(u64,u32)", - "Ed25519PublicKey": "[u8;32]", - "Ed25519Signature": "[u8;64]", - "EpochIndex": "u32", - "EthereumAddress": "[u8;20]", - "EthereumReplayProtection": { - "key_manager_address": "EthereumAddress", - "chain_id": "Uint", - "nonce": "Uint" - }, - "EthTransactionHash": "[u8;32]", - "FlipAccount": { - "stake": "Amount", - "authority_bond": "Amount" - }, - "FlipBalance": "u128", - "H256": "[u8; 32]", - "InternalSource": { - "_enum": { - "Account": "(ValidatorId)", - "Reserve": "(ReserveId)" - } - }, - "ImbalanceSource": { - "_enum": { - "External": "", - "Internal": "(InternalSource)", - "Emissions": "" - } - }, - "Ipv6Addr": "u128", - "KeygenOutcome": { - "_enum": { - "Success": "AggKey", - "Failure": "BTreeSet" - } - }, - "KeygenOutcomeFor": "KeygenOutcome", - "KeygenResponseStatus": { - "CandidateCount": "u32", - "RemainingCandidates": "BTreeSet", - "SuccessVotes": "BTreeMap", - "BlameVotes": "BTreeMap" - }, - "KeyId": "Vec", - "Keys": { - "aura": "[u8; 32]", - "grandpa": "[u8; 32]" - }, - "LookupSource": "MultiAddress", - "NetworkState": { - "online": "u32", - "offline": "u32" - }, - "SignatureNonce": "u64", - "Offence": { - "_enum": [ - "ParticipateSigningFailed", - "ParticipateKeygenFailed", - "InvalidTransactionAuthored", - "TransactionFailedOnTransmission", - "MissedAuthorshipSlot", - "MissedHeartbeat" - ] - }, - "OnlineCredits": "BlockNumber", - "OnlineCreditsFor": "BlockNumber", - "ParityBit": { - "_enum": [ - "Odd", - "Even" - ] - }, - "PayloadFor": "[u8; 32]", - "Penalty": { - "reputation": "ReputationPoints", - "suspension": "BlockNumber" - }, - "Percentage": "u8", - "PercentageRange": { - "top": "u8", - "bottom": "u8" - }, - "ProposalId": "u32", - "RegisterClaim": { - "sig_data": "SigData", - "node_id": "[u8; 32]", - "amount": "Uint", - "address": "EthereumAddress", - "expiry": "Uint" - }, - "RemainingBid": "(ValidatorId, Amount)", - "ReputationTracker": { - "online_credits": "OnlineCredits", - "reputation_points": "ReputationPoints" - }, - "ReputationOf": "Reputation", - "ReputationPenalty": { - "points": "ReputationPoints", - "blocks": "BlockNumber" - }, - "ReputationPoints": "i32", - "ReserveId": "[u8;4]", - "Retired": "bool", - "RotationStatus": { - "_enum": { - "Idle": "", - "RunAuction": "", - "AwaitingVaults": "(AuctionResult)", - "VaultsRotated": "(AuctionResult)", - "SessionRotating": "(AuctionResult)" - } - }, - "RotationStatusOf": "RotationStatus", - "RuntimeReputationTracker": "ReputationTracker", - "SchnorrVerificationComponents": { - "s": "[u8; 32]", - "k_times_g_address": "[u8; 20]" - }, - "SemVer": { - "major": "u8", - "minor": "u8", - "patch": "u8" - }, - "Signature": "SignatureFor", - "SignatureFor": "SchnorrVerificationComponents", - "SignerIdFor": "EthereumAddress", - "SigData": { - "key_manager_address": "EthereumAddress", - "chain_id": "Uint", - "msg_hash": "H256", - "sig": "Uint", - "nonce": "Uint", - "k_times_g_address": "EthereumAddress" - }, - "SignedTransactionFor": "Vec", - "StakeAttempt": "(EthereumAddress, Amount)", - "SuccessOrFailure": { - "_enum": [ - "Success", - "Failure" - ] - }, - "SystemState": { - "_enum": [ - "Normal", - "Maintenance" - ] - }, - "ThresholdSignature": "ThresholdSignatureFor", - "ThresholdSignatureFor": "SchnorrVerificationComponents", - "Timestamp": "u64", - "TransactionHash": "H256", - "TransactionHashFor": "TransactionHash", - "TransactionSigningAttempt": { - "broadcast_attempt": "BroadcastAttempt", - "unsigned_tx": "UnsignedTransactionFor" - }, - "TransmissionAttempt": { - "broadcast_attempt": "BroadcastAttempt", - "signer": "ValidatorId", - "signed_tx": "SignedTransactionFor" - }, - "TransmissionFailure": { - "_enum": [ - "TransactionRejected", - "TransactionFailed" - ] - }, - "Uint": "U256", - "UnsignedTransaction": { - "chain_id": "u64", - "max_priority_fee_per_gas": "Option", - "max_fee_per_gas": "Option", - "gas_limit": "Option", - "contract": "EthereumAddress", - "value": "U256", - "data": "Vec" - }, - "UnsignedTransactionFor": "UnsignedTransaction", - "ValidatorId": "AccountId", - "Vault": { - "public_key": "AggKeyFor", - "active_from_block": "u64" - }, - "AwaitingKeygen": { - "ceremony_id": "CeremonyId", - "response_status": "KeygenResponseStatus" - }, - "AwaitingRotation": { - "new_public_key": "AggKeyFor" - }, - "Complete": { - "tx_hash": "TransactionHashFor" - }, - "VaultRotationStatus": { - "_enum": { - "AwaitingKeygen": "AwaitingKeygen", - "AwaitingRotation": "AwaitingRotation", - "Complete": "Complete", - "Failed": "()" - } - }, - "Version": "SemVer", - "VoteCount": "u32" -} \ No newline at end of file From 2d3d545f3a437c775a6cb58440259ad6ec2db6a5 Mon Sep 17 00:00:00 2001 From: Daniel Date: Tue, 10 May 2022 12:02:51 +0200 Subject: [PATCH 14/33] feat: new construct_runtime syntax for mocks --- state-chain/pallets/cf-auction/src/mock.rs | 4 ++-- state-chain/pallets/cf-broadcast/src/mock.rs | 4 ++-- state-chain/pallets/cf-emissions/src/mock.rs | 6 +++--- state-chain/pallets/cf-environment/src/mock.rs | 4 ++-- state-chain/pallets/cf-flip/src/mock.rs | 13 ++++++++----- state-chain/pallets/cf-governance/src/mock.rs | 4 ++-- state-chain/pallets/cf-online/src/mock.rs | 4 ++-- state-chain/pallets/cf-reputation/src/mock.rs | 4 ++-- state-chain/pallets/cf-staking/src/mock.rs | 6 +++--- .../pallets/cf-threshold-signature/src/mock.rs | 4 ++-- state-chain/pallets/cf-validator/src/mock.rs | 6 +++--- state-chain/pallets/cf-vaults/src/mock.rs | 4 ++-- state-chain/pallets/cf-vaults/src/tests.rs | 2 +- state-chain/pallets/cf-witnesser/README.md | 2 +- state-chain/pallets/cf-witnesser/src/mock.rs | 6 +++--- .../src/chainflip/missed_authorship_slots.rs | 6 +++--- 16 files changed, 41 insertions(+), 38 deletions(-) diff --git a/state-chain/pallets/cf-auction/src/mock.rs b/state-chain/pallets/cf-auction/src/mock.rs index 47a06f1f34..3a679291d4 100644 --- a/state-chain/pallets/cf-auction/src/mock.rs +++ b/state-chain/pallets/cf-auction/src/mock.rs @@ -65,8 +65,8 @@ construct_runtime!( NodeBlock = Block, UncheckedExtrinsic = UncheckedExtrinsic, { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - AuctionPallet: pallet_cf_auction::{Pallet, Call, Storage, Event, Config}, + System: frame_system, + AuctionPallet: pallet_cf_auction, } ); diff --git a/state-chain/pallets/cf-broadcast/src/mock.rs b/state-chain/pallets/cf-broadcast/src/mock.rs index 9d1a35946a..05b19cd647 100644 --- a/state-chain/pallets/cf-broadcast/src/mock.rs +++ b/state-chain/pallets/cf-broadcast/src/mock.rs @@ -28,8 +28,8 @@ frame_support::construct_runtime!( NodeBlock = Block, UncheckedExtrinsic = UncheckedExtrinsic, { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - MockBroadcast: pallet_cf_broadcast::::{Pallet, Call, Storage, Event}, + System: frame_system, + MockBroadcast: pallet_cf_broadcast::, } ); diff --git a/state-chain/pallets/cf-emissions/src/mock.rs b/state-chain/pallets/cf-emissions/src/mock.rs index 1212e6f1e5..5d9b597525 100644 --- a/state-chain/pallets/cf-emissions/src/mock.rs +++ b/state-chain/pallets/cf-emissions/src/mock.rs @@ -46,9 +46,9 @@ frame_support::construct_runtime!( NodeBlock = Block, UncheckedExtrinsic = UncheckedExtrinsic, { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - Flip: pallet_cf_flip::{Pallet, Call, Config, Storage, Event}, - Emissions: pallet_cf_emissions::{Pallet, Call, Storage, Event, Config}, + System: frame_system, + Flip: pallet_cf_flip, + Emissions: pallet_cf_emissions, } ); diff --git a/state-chain/pallets/cf-environment/src/mock.rs b/state-chain/pallets/cf-environment/src/mock.rs index f40aaad674..eecd8658d4 100644 --- a/state-chain/pallets/cf-environment/src/mock.rs +++ b/state-chain/pallets/cf-environment/src/mock.rs @@ -23,8 +23,8 @@ frame_support::construct_runtime!( NodeBlock = Block, UncheckedExtrinsic = UncheckedExtrinsic, { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - Environment: pallet_cf_environment::{Pallet, Storage, Event, Config}, + System: frame_system, + Environment: pallet_cf_environment, } ); diff --git a/state-chain/pallets/cf-flip/src/mock.rs b/state-chain/pallets/cf-flip/src/mock.rs index 0ca7c2a1e6..aaa84f09a1 100644 --- a/state-chain/pallets/cf-flip/src/mock.rs +++ b/state-chain/pallets/cf-flip/src/mock.rs @@ -28,9 +28,9 @@ frame_support::construct_runtime!( NodeBlock = Block, UncheckedExtrinsic = UncheckedExtrinsic, { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - Flip: pallet_cf_flip::{Pallet, Call, Config, Storage, Event}, - TransactionPayment: pallet_transaction_payment::{Pallet, Storage}, + System: frame_system, + Flip: pallet_cf_flip, + TransactionPayment: pallet_transaction_payment, } ); @@ -118,8 +118,11 @@ pub fn check_balance_integrity() { // Build genesis storage according to the mock runtime. pub fn new_test_ext() -> sp_io::TestExternalities { - let config = - GenesisConfig { system: Default::default(), flip: FlipConfig { total_issuance: 1_000 } }; + let config = GenesisConfig { + system: Default::default(), + flip: FlipConfig { total_issuance: 1_000 }, + transaction_payment: Default::default(), + }; let mut ext: sp_io::TestExternalities = config.build_storage().unwrap().into(); diff --git a/state-chain/pallets/cf-governance/src/mock.rs b/state-chain/pallets/cf-governance/src/mock.rs index 269248765b..ebb90678ca 100644 --- a/state-chain/pallets/cf-governance/src/mock.rs +++ b/state-chain/pallets/cf-governance/src/mock.rs @@ -22,8 +22,8 @@ frame_support::construct_runtime!( NodeBlock = Block, UncheckedExtrinsic = UncheckedExtrinsic, { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - Governance: pallet_cf_governance::{Pallet, Call, Storage, Event, Config, Origin}, + System: frame_system, + Governance: pallet_cf_governance, } ); diff --git a/state-chain/pallets/cf-online/src/mock.rs b/state-chain/pallets/cf-online/src/mock.rs index b0ca19781e..b788e9a4a8 100644 --- a/state-chain/pallets/cf-online/src/mock.rs +++ b/state-chain/pallets/cf-online/src/mock.rs @@ -37,8 +37,8 @@ construct_runtime!( NodeBlock = Block, UncheckedExtrinsic = UncheckedExtrinsic, { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - OnlinePallet: pallet_cf_online::{Pallet, Call, Storage}, + System: frame_system, + OnlinePallet: pallet_cf_online, } ); diff --git a/state-chain/pallets/cf-reputation/src/mock.rs b/state-chain/pallets/cf-reputation/src/mock.rs index b10ce8ffdc..350cd7618b 100644 --- a/state-chain/pallets/cf-reputation/src/mock.rs +++ b/state-chain/pallets/cf-reputation/src/mock.rs @@ -31,8 +31,8 @@ construct_runtime!( NodeBlock = Block, UncheckedExtrinsic = UncheckedExtrinsic, { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - ReputationPallet: pallet_cf_reputation::{Pallet, Call, Storage, Event, Config}, + System: frame_system, + ReputationPallet: pallet_cf_reputation, } ); diff --git a/state-chain/pallets/cf-staking/src/mock.rs b/state-chain/pallets/cf-staking/src/mock.rs index c0ba09e09b..7bd2d32274 100644 --- a/state-chain/pallets/cf-staking/src/mock.rs +++ b/state-chain/pallets/cf-staking/src/mock.rs @@ -32,9 +32,9 @@ frame_support::construct_runtime!( NodeBlock = Block, UncheckedExtrinsic = UncheckedExtrinsic, { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - Flip: pallet_cf_flip::{Pallet, Call, Config, Storage, Event}, - Staking: pallet_cf_staking::{Pallet, Call, Config, Storage, Event}, + System: frame_system, + Flip: pallet_cf_flip, + Staking: pallet_cf_staking, } ); diff --git a/state-chain/pallets/cf-threshold-signature/src/mock.rs b/state-chain/pallets/cf-threshold-signature/src/mock.rs index fc3d7dc70c..8c439f6df1 100644 --- a/state-chain/pallets/cf-threshold-signature/src/mock.rs +++ b/state-chain/pallets/cf-threshold-signature/src/mock.rs @@ -36,8 +36,8 @@ frame_support::construct_runtime!( NodeBlock = Block, UncheckedExtrinsic = UncheckedExtrinsic, { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - MockEthereumThresholdSigner: pallet_cf_threshold_signature::::{Pallet, Origin, Call, Storage, Event, ValidateUnsigned}, + System: frame_system, + MockEthereumThresholdSigner: pallet_cf_threshold_signature::, } ); diff --git a/state-chain/pallets/cf-validator/src/mock.rs b/state-chain/pallets/cf-validator/src/mock.rs index 31935e288b..e36ff0a0e9 100644 --- a/state-chain/pallets/cf-validator/src/mock.rs +++ b/state-chain/pallets/cf-validator/src/mock.rs @@ -35,9 +35,9 @@ construct_runtime!( NodeBlock = Block, UncheckedExtrinsic = UncheckedExtrinsic, { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - Session: pallet_session::{Pallet, Call, Storage, Event, Config}, - ValidatorPallet: pallet_cf_validator::{Pallet, Call, Storage, Event, Config}, + System: frame_system, + Session: pallet_session, + ValidatorPallet: pallet_cf_validator, } ); diff --git a/state-chain/pallets/cf-vaults/src/mock.rs b/state-chain/pallets/cf-vaults/src/mock.rs index 28b8ec4f37..93261ff91c 100644 --- a/state-chain/pallets/cf-vaults/src/mock.rs +++ b/state-chain/pallets/cf-vaults/src/mock.rs @@ -39,8 +39,8 @@ construct_runtime!( NodeBlock = Block, UncheckedExtrinsic = UncheckedExtrinsic, { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - VaultsPallet: pallet_cf_vaults::{Pallet, Call, Storage, Event, Config}, + System: frame_system, + VaultsPallet: pallet_cf_vaults, } ); diff --git a/state-chain/pallets/cf-vaults/src/tests.rs b/state-chain/pallets/cf-vaults/src/tests.rs index d7da15e45c..218ea27491 100644 --- a/state-chain/pallets/cf-vaults/src/tests.rs +++ b/state-chain/pallets/cf-vaults/src/tests.rs @@ -15,7 +15,7 @@ macro_rules! assert_last_event { ($pat:pat) => { let event = last_event::(); assert!( - matches!(last_event::(), Event::VaultsPallet($pat)), + matches!(last_event::(), $crate::mock::Event::VaultsPallet($pat)), "Unexpected event {:?}", event ); diff --git a/state-chain/pallets/cf-witnesser/README.md b/state-chain/pallets/cf-witnesser/README.md index fc5f9eb751..a86a54dc85 100644 --- a/state-chain/pallets/cf-witnesser/README.md +++ b/state-chain/pallets/cf-witnesser/README.md @@ -35,7 +35,7 @@ steps (also, see the [mock::dummy](./mock/dummy.rs) pallet): ```rust construct_runtime!( // ... - Witness: pallet_cf_witness::{Pallet, Call, Event, Origin}, + Witness: pallet_cf_witness, //... ) ``` diff --git a/state-chain/pallets/cf-witnesser/src/mock.rs b/state-chain/pallets/cf-witnesser/src/mock.rs index dd60f5fa73..813671a4b4 100644 --- a/state-chain/pallets/cf-witnesser/src/mock.rs +++ b/state-chain/pallets/cf-witnesser/src/mock.rs @@ -21,9 +21,9 @@ frame_support::construct_runtime!( NodeBlock = Block, UncheckedExtrinsic = UncheckedExtrinsic, { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - Witnesser: pallet_cf_witness::{Pallet, Call, Storage, Event, Origin}, - Dummy: dummy::{Pallet, Call, Storage, Event}, + System: frame_system, + Witnesser: pallet_cf_witness, + Dummy: dummy, } ); diff --git a/state-chain/runtime/src/chainflip/missed_authorship_slots.rs b/state-chain/runtime/src/chainflip/missed_authorship_slots.rs index 3f8c19764b..cf7dd8e904 100644 --- a/state-chain/runtime/src/chainflip/missed_authorship_slots.rs +++ b/state-chain/runtime/src/chainflip/missed_authorship_slots.rs @@ -70,9 +70,9 @@ mod test_missed_authorship_slots { NodeBlock = Block, UncheckedExtrinsic = UncheckedExtrinsic, { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent}, - Aura: pallet_aura::{Pallet, Config}, + System: frame_system, + Timestamp: pallet_timestamp, + Aura: pallet_aura, } ); From ed4b02dfcde20911a078f1480af9c59f8e22adfb Mon Sep 17 00:00:00 2001 From: Daniel Date: Tue, 10 May 2022 13:25:44 +0200 Subject: [PATCH 15/33] fix: remove unused dependencies. --- Cargo.lock | 74 +------------ engine/Cargo.toml | 2 - state-chain/cf-integration-tests/Cargo.toml | 104 +++++------------- state-chain/chains/Cargo.toml | 2 +- state-chain/custom-rpc/Cargo.toml | 8 -- state-chain/multisig-p2p-transport/Cargo.toml | 2 +- state-chain/node/Cargo.toml | 1 - state-chain/pallets/cf-broadcast/Cargo.toml | 2 - state-chain/pallets/cf-online/Cargo.toml | 2 - state-chain/pallets/cf-staking/Cargo.toml | 2 - state-chain/pallets/cf-witnesser/Cargo.toml | 2 - 11 files changed, 29 insertions(+), 172 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9d629f93e7..61ab6596d2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -264,27 +264,6 @@ dependencies = [ "trust-dns-resolver", ] -[[package]] -name = "async-stream" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dad5c83079eae9969be7fadefe640a1c566901f05ff91ab221de4b6f68d9507e" -dependencies = [ - "async-stream-impl", - "futures-core", -] - -[[package]] -name = "async-stream-impl" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10f203db73a71dfa2fb6dd22763990fa26f3d2625a6da2da900d23b87d26be27" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "async-task" version = "4.2.0" @@ -789,14 +768,11 @@ dependencies = [ name = "cf-integration-tests" version = "0.1.0" dependencies = [ - "assert_matches", "cf-chains", "cf-traits", - "frame-benchmarking", "frame-executive", "frame-support", "frame-system", - "frame-system-benchmarking", "frame-system-rpc-runtime-api", "hex-literal", "libsecp256k1", @@ -968,7 +944,6 @@ name = "chainflip-engine" version = "0.3.0" dependencies = [ "anyhow", - "async-stream", "async-trait", "bincode", "bs58", @@ -1006,7 +981,6 @@ dependencies = [ "log 0.4.17", "mockall", "multisig-p2p-transport", - "num", "pallet-cf-auction", "pallet-cf-broadcast", "pallet-cf-environment", @@ -1100,7 +1074,6 @@ dependencies = [ "sp-runtime", "sp-timestamp", "state-chain-runtime", - "structopt", "substrate-build-script-utils", "substrate-frame-rpc-system", "try-runtime-cli", @@ -1655,8 +1628,6 @@ dependencies = [ "jsonrpc-core-client", "jsonrpc-derive", "sc-client-api", - "sc-rpc", - "sc-rpc-api", "sp-api", "sp-runtime", "state-chain-runtime", @@ -2243,7 +2214,7 @@ version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b24d4059bc0d0a0bf26b740aa21af1f96a984f0ab7a21356d00b32475388b53a" dependencies = [ - "num-bigint 0.2.6", + "num-bigint", "num-integer", "num-traits 0.2.15", "proc-macro2", @@ -4949,20 +4920,6 @@ dependencies = [ "winapi 0.3.9", ] -[[package]] -name = "num" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43db66d1170d347f9a065114077f7dccb00c1b9478c89384490a3425279a4606" -dependencies = [ - "num-bigint 0.4.3", - "num-complex", - "num-integer", - "num-iter", - "num-rational 0.4.0", - "num-traits 0.2.15", -] - [[package]] name = "num-bigint" version = "0.2.6" @@ -4974,17 +4931,6 @@ dependencies = [ "num-traits 0.2.15", ] -[[package]] -name = "num-bigint" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f93ab6289c7b344a8a9f60f88d80aa20032336fe78da341afc91c8a2341fc75f" -dependencies = [ - "autocfg 1.1.0", - "num-integer", - "num-traits 0.2.15", -] - [[package]] name = "num-complex" version = "0.4.1" @@ -5014,17 +4960,6 @@ dependencies = [ "num-traits 0.2.15", ] -[[package]] -name = "num-iter" -version = "0.1.43" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d03e6c028c5dc5cac6e2dec0efda81fc887605bb3d884578bb6d6bf7514e252" -dependencies = [ - "autocfg 1.1.0", - "num-integer", - "num-traits 0.2.15", -] - [[package]] name = "num-rational" version = "0.2.4" @@ -5032,7 +4967,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5c000134b5dbf44adc5cb772486d335293351644b801551abe8f75c84cfa4aef" dependencies = [ "autocfg 1.1.0", - "num-bigint 0.2.6", + "num-bigint", "num-integer", "num-traits 0.2.15", ] @@ -5044,7 +4979,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d41702bd167c2df5520b384281bc111a4b5efcf7fbc4c9c222c815b07e0a6a6a" dependencies = [ "autocfg 1.1.0", - "num-bigint 0.4.3", "num-integer", "num-traits 0.2.15", ] @@ -5296,7 +5230,6 @@ dependencies = [ "frame-support", "frame-system", "log 0.4.17", - "pallet-cf-threshold-signature", "parity-scale-codec", "scale-info", "sp-core", @@ -5386,7 +5319,6 @@ dependencies = [ "frame-benchmarking", "frame-support", "frame-system", - "pallet-cf-validator", "parity-scale-codec", "scale-info", "sp-core", @@ -5426,7 +5358,6 @@ dependencies = [ "frame-system", "log 0.4.17", "pallet-cf-flip", - "pallet-cf-validator", "parity-scale-codec", "scale-info", "sp-core", @@ -5512,7 +5443,6 @@ dependencies = [ "frame-support", "frame-system", "hex", - "pallet-cf-validator", "parity-scale-codec", "scale-info", "sp-core", diff --git a/engine/Cargo.toml b/engine/Cargo.toml index bf3208d26f..c405ecd990 100644 --- a/engine/Cargo.toml +++ b/engine/Cargo.toml @@ -17,7 +17,6 @@ section = "rust" [dependencies] anyhow = "1.0" -async-stream = "0.3.0" async-trait = "0.1.49" bincode = "1.3.3" bs58 = "0.4" @@ -46,7 +45,6 @@ ethbloom = "0.12.1" dyn-clone = "1.0.4" kvdb-rocksdb = "0.15.2" lazy_static = "1.4" -num = "0.4.0" parking_lot = "0.12" regex = "1" reqwest = {version = "0.11.4", features = ["json"]} diff --git a/state-chain/cf-integration-tests/Cargo.toml b/state-chain/cf-integration-tests/Cargo.toml index 1b9a3f4b4e..c5a68245a5 100644 --- a/state-chain/cf-integration-tests/Cargo.toml +++ b/state-chain/cf-integration-tests/Cargo.toml @@ -11,7 +11,7 @@ repository = 'https://github.com/chainflip-io/chainflip-backend' [package.metadata.docs.rs] targets = ['x86_64-unknown-linux-gnu'] -[dependencies] +[dev-dependencies] libsecp256k1 = { default-features = false, version = '0.7', features = ['static-context'] } rand = {version='0.8.4'} @@ -35,52 +35,41 @@ pallet-cf-environment = { path = "../pallets/cf-environment", default-features = # Additional FRAME pallets -[dependencies.pallet-authorship] +[dev-dependencies.pallet-authorship] default-features = false git = 'https://github.com/chainflip-io/substrate.git' tag = 'chainflip-monthly-2022-05' -[dependencies.pallet-session] +[dev-dependencies.pallet-session] default-features = false git = 'https://github.com/chainflip-io/substrate.git' tag = 'chainflip-monthly-2022-05' features = ['historical'] # Substrate dependencies -[dependencies.codec] +[dev-dependencies.codec] default-features = false features = ['derive'] package = 'parity-scale-codec' version = '3.0.0' -[dependencies.frame-benchmarking] -default-features = false -git = 'https://github.com/chainflip-io/substrate.git' -optional = true -tag = 'chainflip-monthly-2022-05' - -[dependencies.frame-executive] -default-features = false -git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2022-05' -[dependencies.frame-support] +[dev-dependencies.frame-executive] default-features = false git = 'https://github.com/chainflip-io/substrate.git' tag = 'chainflip-monthly-2022-05' -[dependencies.frame-system] +[dev-dependencies.frame-support] default-features = false git = 'https://github.com/chainflip-io/substrate.git' tag = 'chainflip-monthly-2022-05' -[dependencies.frame-system-benchmarking] +[dev-dependencies.frame-system] default-features = false git = 'https://github.com/chainflip-io/substrate.git' -optional = true tag = 'chainflip-monthly-2022-05' -[dependencies.frame-system-rpc-runtime-api] +[dev-dependencies.frame-system-rpc-runtime-api] default-features = false git = 'https://github.com/chainflip-io/substrate.git' tag = 'chainflip-monthly-2022-05' @@ -88,133 +77,90 @@ tag = 'chainflip-monthly-2022-05' [dev-dependencies.hex-literal] version = '0.3.1' -[dependencies.pallet-aura] +[dev-dependencies.pallet-aura] default-features = false git = 'https://github.com/chainflip-io/substrate.git' tag = 'chainflip-monthly-2022-05' -[dependencies.pallet-grandpa] +[dev-dependencies.pallet-grandpa] default-features = false git = 'https://github.com/chainflip-io/substrate.git' tag = 'chainflip-monthly-2022-05' -[dependencies.pallet-randomness-collective-flip] +[dev-dependencies.pallet-randomness-collective-flip] default-features = false git = 'https://github.com/chainflip-io/substrate.git' tag = 'chainflip-monthly-2022-05' -[dependencies.pallet-timestamp] +[dev-dependencies.pallet-timestamp] default-features = false git = 'https://github.com/chainflip-io/substrate.git' tag = 'chainflip-monthly-2022-05' -[dependencies.pallet-transaction-payment] +[dev-dependencies.pallet-transaction-payment] default-features = false git = 'https://github.com/chainflip-io/substrate.git' tag = 'chainflip-monthly-2022-05' -[dependencies.scale-info] +[dev-dependencies.scale-info] default-features = false features = ['derive'] version = '2.0.1' -[dependencies.sp-block-builder] +[dev-dependencies.sp-block-builder] default-features = false git = 'https://github.com/chainflip-io/substrate.git' tag = 'chainflip-monthly-2022-05' -[dependencies.sp-consensus-aura] +[dev-dependencies.sp-consensus-aura] default-features = false git = 'https://github.com/chainflip-io/substrate.git' tag = 'chainflip-monthly-2022-05' version = '0.10.0-dev' -[dependencies.sp-core] +[dev-dependencies.sp-core] default-features = false git = 'https://github.com/chainflip-io/substrate.git' tag = 'chainflip-monthly-2022-05' -[dependencies.sp-inherents] +[dev-dependencies.sp-inherents] default-features = false git = 'https://github.com/chainflip-io/substrate.git' tag = 'chainflip-monthly-2022-05' -[dependencies.sp-offchain] +[dev-dependencies.sp-offchain] default-features = false git = 'https://github.com/chainflip-io/substrate.git' tag = 'chainflip-monthly-2022-05' -[dependencies.sp-runtime] +[dev-dependencies.sp-runtime] default-features = false git = 'https://github.com/chainflip-io/substrate.git' tag = 'chainflip-monthly-2022-05' -[dependencies.sp-session] +[dev-dependencies.sp-session] default-features = false git = 'https://github.com/chainflip-io/substrate.git' tag = 'chainflip-monthly-2022-05' -[dependencies.sp-std] +[dev-dependencies.sp-std] default-features = false git = 'https://github.com/chainflip-io/substrate.git' tag = 'chainflip-monthly-2022-05' -[dependencies.sp-transaction-pool] +[dev-dependencies.sp-transaction-pool] default-features = false git = 'https://github.com/chainflip-io/substrate.git' tag = 'chainflip-monthly-2022-05' -[dependencies.sp-version] +[dev-dependencies.sp-version] default-features = false git = 'https://github.com/chainflip-io/substrate.git' tag = 'chainflip-monthly-2022-05' -[dev-dependencies] -assert_matches = { version = '1.5.0' } - [dev-dependencies.sp-finality-grandpa] git = 'https://github.com/chainflip-io/substrate.git' tag = 'chainflip-monthly-2022-05' [features] -default = ['std'] -std = [ - 'state-chain-runtime/std', - 'cf-traits/std', - 'cf-chains/std', - 'codec/std', - 'scale-info/std', - 'frame-executive/std', - 'frame-support/std', - 'frame-system/std', - 'frame-system-rpc-runtime-api/std', - 'pallet-aura/std', - 'pallet-grandpa/std', - 'pallet-randomness-collective-flip/std', - 'pallet-session/std', - 'pallet-timestamp/std', - 'pallet-transaction-payment/std', - 'sp-block-builder/std', - 'sp-consensus-aura/std', - 'sp-core/std', - 'sp-inherents/std', - 'sp-offchain/std', - 'sp-runtime/std', - 'sp-session/std', - 'sp-std/std', - 'sp-transaction-pool/std', - 'sp-version/std', - 'pallet-cf-validator/std', - 'pallet-cf-staking/std', - 'pallet-cf-witnesser/std', - 'pallet-cf-flip/std', - 'pallet-cf-auction/std', - 'pallet-cf-emissions/std', - 'pallet-cf-reputation/std', - 'pallet-cf-governance/std', - 'pallet-cf-vaults/std', - 'pallet-cf-broadcast/std', - 'pallet-cf-threshold-signature/std', - 'pallet-cf-environment/std', - 'pallet-cf-online/std', -] +default = [] diff --git a/state-chain/chains/Cargo.toml b/state-chain/chains/Cargo.toml index df4f63cc2b..f9cd8f85cc 100644 --- a/state-chain/chains/Cargo.toml +++ b/state-chain/chains/Cargo.toml @@ -47,6 +47,7 @@ tag = 'chainflip-monthly-2022-05' [dependencies.frame-system] default-features = false +optional = true git = 'https://github.com/chainflip-io/substrate.git' tag = 'chainflip-monthly-2022-05' @@ -69,7 +70,6 @@ std = [ 'ethabi/full-serde', 'ethereum/std', 'frame-support/std', - 'frame-system/std', 'hex/std', 'libsecp256k1/std', 'log/std', diff --git a/state-chain/custom-rpc/Cargo.toml b/state-chain/custom-rpc/Cargo.toml index 9259575fb5..091a120c1d 100644 --- a/state-chain/custom-rpc/Cargo.toml +++ b/state-chain/custom-rpc/Cargo.toml @@ -24,11 +24,3 @@ tag = 'chainflip-monthly-2022-05' [dependencies.sc-client-api] git = 'https://github.com/chainflip-io/substrate.git' tag = 'chainflip-monthly-2022-05' - -[dependencies.sc-rpc] -git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2022-05' - -[dependencies.sc-rpc-api] -git = 'https://github.com/chainflip-io/substrate.git' -tag = 'chainflip-monthly-2022-05' \ No newline at end of file diff --git a/state-chain/multisig-p2p-transport/Cargo.toml b/state-chain/multisig-p2p-transport/Cargo.toml index aaf04f0e87..37f8f99cb2 100644 --- a/state-chain/multisig-p2p-transport/Cargo.toml +++ b/state-chain/multisig-p2p-transport/Cargo.toml @@ -18,7 +18,6 @@ bs58 = '0.4.0' futures = { version = '0.3.4', features = ['compat'] } tokio = {version = '1.13.1', features = ['full']} async-trait = "0.1.49" -predicates = "2.1.1" [dependencies.sp-runtime] git = 'https://github.com/chainflip-io/substrate.git' @@ -43,5 +42,6 @@ git = 'https://github.com/chainflip-io/substrate.git' tag = 'chainflip-monthly-2022-05' [dev-dependencies] +predicates = "2.1.1" mockall = "0.11.0" tokio-stream = '0.1.5' diff --git a/state-chain/node/Cargo.toml b/state-chain/node/Cargo.toml index a9f2d3f7df..d183531a03 100644 --- a/state-chain/node/Cargo.toml +++ b/state-chain/node/Cargo.toml @@ -33,7 +33,6 @@ hex = '0.4' hex-literal = '0.3.1' jsonrpc-core-client = '18.0.0' jsonrpc-derive = '18.0.0' -structopt = '0.3.8' # Substrate-node-template dependencies clap = { version = "3.1.6", features = ["derive"] } diff --git a/state-chain/pallets/cf-broadcast/Cargo.toml b/state-chain/pallets/cf-broadcast/Cargo.toml index 74300d9edf..495dae4011 100644 --- a/state-chain/pallets/cf-broadcast/Cargo.toml +++ b/state-chain/pallets/cf-broadcast/Cargo.toml @@ -16,7 +16,6 @@ targets = ['x86_64-unknown-linux-gnu'] # Chainflip cf-chains = { path = "../../chains", default-features = false } cf-traits = { path = "../../traits", default-features = false } -pallet-cf-threshold-signature = { path = "../cf-threshold-signature", default-features = false } cf-runtime-upgrade-utilities = { path = '../../runtime-upgrade-utilities', default-features = false } log = { version = '0.4.14', default-features = false } @@ -81,7 +80,6 @@ std = [ 'frame-support/std', 'frame-system/std', 'log/std', - 'pallet-cf-threshold-signature/std', 'sp-core/std', 'sp-runtime/std', 'sp-std/std', diff --git a/state-chain/pallets/cf-online/Cargo.toml b/state-chain/pallets/cf-online/Cargo.toml index f89ed24c5a..48b4f57794 100644 --- a/state-chain/pallets/cf-online/Cargo.toml +++ b/state-chain/pallets/cf-online/Cargo.toml @@ -15,7 +15,6 @@ targets = ['x86_64-unknown-linux-gnu'] # Chainflip cf-traits = { path = '../../traits', default-features = false } cf-runtime-upgrade-utilities = { path = '../../runtime-upgrade-utilities', default-features = false } -pallet-cf-validator = { path = '../cf-validator', default-features = false } # Parity deps [dependencies.codec] @@ -76,7 +75,6 @@ std = [ 'frame-system/std', 'sp-std/std', 'sp-runtime/std', - 'pallet-cf-validator/std', ] runtime-benchmarks = [ 'frame-benchmarking', diff --git a/state-chain/pallets/cf-staking/Cargo.toml b/state-chain/pallets/cf-staking/Cargo.toml index 300a8673cd..3839c37ac6 100644 --- a/state-chain/pallets/cf-staking/Cargo.toml +++ b/state-chain/pallets/cf-staking/Cargo.toml @@ -16,7 +16,6 @@ targets = ['x86_64-unknown-linux-gnu'] # Internal deps cf-traits = {path = '../../traits', default-features = false} cf-chains = {path = '../../chains', default-features = false} -pallet-cf-validator = {path = '../cf-validator', default-features = false} # Non-substrate external deps log = { version = '0.4.14', default-features = false } @@ -79,7 +78,6 @@ default = ['std'] std = [ 'cf-chains/std', 'cf-traits/std', - 'pallet-cf-validator/std', 'codec/std', 'scale-info/std', 'log/std', diff --git a/state-chain/pallets/cf-witnesser/Cargo.toml b/state-chain/pallets/cf-witnesser/Cargo.toml index 1eef2dab68..b381f82849 100644 --- a/state-chain/pallets/cf-witnesser/Cargo.toml +++ b/state-chain/pallets/cf-witnesser/Cargo.toml @@ -16,7 +16,6 @@ targets = ['x86_64-unknown-linux-gnu'] hex = { version = "0.4", default-features = false } # Internal deps cf-traits = { path = '../../traits', default-features = false } -pallet-cf-validator = { path = '../cf-validator', default-features = false } # Local deps utilities = { path = '../../../utilities', default-features = false } @@ -85,7 +84,6 @@ std = [ 'scale-info/std', 'frame-support/std', 'frame-system/std', - 'pallet-cf-validator/std', 'sp-runtime/std', 'sp-std/std', ] From 650dd1cc2268edfdc39ffb753f59aea1bc0e10b3 Mon Sep 17 00:00:00 2001 From: Daniel Date: Tue, 10 May 2022 16:42:11 +0200 Subject: [PATCH 16/33] fix: no expected authorship slot at genesis --- .../src/chainflip/missed_authorship_slots.rs | 27 ++++++++++++++----- 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/state-chain/runtime/src/chainflip/missed_authorship_slots.rs b/state-chain/runtime/src/chainflip/missed_authorship_slots.rs index cf7dd8e904..7576eac91c 100644 --- a/state-chain/runtime/src/chainflip/missed_authorship_slots.rs +++ b/state-chain/runtime/src/chainflip/missed_authorship_slots.rs @@ -9,8 +9,13 @@ use crate::{Aura, System}; struct AuraSlotExtraction; impl AuraSlotExtraction { - fn expected_slot() -> AuraSlot { - Aura::current_slot() + 1 + fn expected_slot() -> Option { + let slot = Aura::current_slot(); + if *slot == 0 { + None + } else { + Some(slot.saturating_add(1u64)) + } } fn extract_slot_from_digest_item(item: &DigestItem) -> Option { @@ -36,11 +41,15 @@ pub struct MissedAuraSlots; impl MissedAuthorshipSlots for MissedAuraSlots { fn missed_slots() -> Vec { - let expected = AuraSlotExtraction::expected_slot(); - if let Some(authored) = AuraSlotExtraction::current_slot_from_digests() { - ((*expected)..(*authored)).collect() + if let Some(expected) = AuraSlotExtraction::expected_slot() { + if let Some(authored) = AuraSlotExtraction::current_slot_from_digests() { + ((*expected)..(*authored)).collect() + } else { + log::error!("No Aura authorship slot passed to runtime via digests!"); + vec![] + } } else { - log::error!("No Aura authorship slot passed to runtime via digests!"); + log::info!("Skipping missed authorship check: aura not expecting any current slot."); vec![] } } @@ -202,4 +211,10 @@ mod test_missed_authorship_slots { assert_eq!(Aura::current_slot(), slot); }) } + + #[test] + fn test_first_authored_block() { + simulate_block_authorship(0, 0); + assert!(::missed_slots().is_empty()); + } } From 8d3d8d54bbfc581a4b6eb8b8deb212d633131e00 Mon Sep 17 00:00:00 2001 From: Daniel Date: Tue, 10 May 2022 16:49:25 +0200 Subject: [PATCH 17/33] fix: spelling --- engine/src/state_chain/client.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engine/src/state_chain/client.rs b/engine/src/state_chain/client.rs index 2ac932f9f7..e5ce0978be 100644 --- a/engine/src/state_chain/client.rs +++ b/engine/src/state_chain/client.rs @@ -1078,7 +1078,7 @@ async fn inner_connect_to_state_chain( } let metadata = match metadata { RuntimeMetadata::V14(meta) => meta, - other => bail!("Invalid Metadata version {:?}, epected V14", other), + other => bail!("Invalid Metadata version {:?}, expected V14", other), }; Ok(( From 361dc2d8faea5f30d4e76430cb1701bac8796009 Mon Sep 17 00:00:00 2001 From: Daniel Date: Tue, 10 May 2022 16:52:45 +0200 Subject: [PATCH 18/33] fix: panic if no author is provided. --- state-chain/runtime/src/chainflip.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/state-chain/runtime/src/chainflip.rs b/state-chain/runtime/src/chainflip.rs index 24fdd95992..b1462f2f0f 100644 --- a/state-chain/runtime/src/chainflip.rs +++ b/state-chain/runtime/src/chainflip.rs @@ -220,11 +220,9 @@ impl RewardsDistribution for BlockAuthorRewardDistribution { type Surplus = Surplus; fn distribute(rewards: Self::Surplus) { - if let Some(current_block_author) = Authorship::author() { - Flip::settle_imbalance(¤t_block_author, rewards); - } else { - log::warn!("No block author! Block reward not credited.") - } + let current_block_author = + Authorship::author().expect("A block without an author is invalid."); + Flip::settle_imbalance(¤t_block_author, rewards); } } pub struct RuntimeUpgradeManager; From 207b9db4e2f93d6a89903d073511d84127782846 Mon Sep 17 00:00:00 2001 From: Daniel Date: Tue, 10 May 2022 17:00:50 +0200 Subject: [PATCH 19/33] feat: add a test for SigData MaxEncodedLen impl. --- state-chain/chains/src/eth.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/state-chain/chains/src/eth.rs b/state-chain/chains/src/eth.rs index 9829ebfb86..4ce628a133 100644 --- a/state-chain/chains/src/eth.rs +++ b/state-chain/chains/src/eth.rs @@ -943,4 +943,9 @@ mod verification_tests { ); } } + + #[test] + fn sig_data_max_encoded_len_is_correct() { + assert_eq!(std::mem::size_of::(), SigData::max_encoded_len()); + } } From 727083aa65af298bca25a38caf847b2cc2fd6685 Mon Sep 17 00:00:00 2001 From: Daniel Date: Wed, 11 May 2022 10:30:40 +0200 Subject: [PATCH 20/33] fix: integration tests Add AURA digest and change block execution order. --- state-chain/cf-integration-tests/src/lib.rs | 36 ++++++++++++--------- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/state-chain/cf-integration-tests/src/lib.rs b/state-chain/cf-integration-tests/src/lib.rs index 794a1f5a98..da5aaa8655 100644 --- a/state-chain/cf-integration-tests/src/lib.rs +++ b/state-chain/cf-integration-tests/src/lib.rs @@ -41,6 +41,7 @@ mod tests { use crate::tests::BLOCK_TIME; use cf_chains::eth::{to_ethereum_address, AggKey, SchnorrVerificationComponents}; use cf_traits::{ChainflipAccount, ChainflipAccountState, ChainflipAccountStore}; + use codec::Encode; use frame_support::traits::HandleLifetime; use libsecp256k1::PublicKey; use pallet_cf_staking::AccountRetired; @@ -434,19 +435,25 @@ mod tests { pub const INIT_TIMESTAMP: u64 = 30_000; let current_block_number = System::block_number(); while System::block_number() < current_block_number + n { - Timestamp::set_timestamp( - (System::block_number() as u64 * BLOCK_TIME) + INIT_TIMESTAMP, - ); - Session::on_initialize(System::block_number()); - Online::on_initialize(System::block_number()); - Flip::on_initialize(System::block_number()); - Staking::on_initialize(System::block_number()); - Auction::on_initialize(System::block_number()); - Emissions::on_initialize(System::block_number()); - Governance::on_initialize(System::block_number()); - Reputation::on_initialize(System::block_number()); - EthereumVault::on_initialize(System::block_number()); - Validator::on_initialize(System::block_number()); + let block_number = System::block_number() + 1; + let mut digest = sp_runtime::Digest::default(); + digest.push(sp_runtime::DigestItem::PreRuntime( + sp_consensus_aura::AURA_ENGINE_ID, + sp_consensus_aura::Slot::from(block_number as u64).encode(), + )); + System::initialize(&block_number, &System::block_hash(block_number), &digest); + System::on_initialize(block_number); + Session::on_initialize(block_number); + Online::on_initialize(block_number); + Flip::on_initialize(block_number); + Staking::on_initialize(block_number); + Auction::on_initialize(block_number); + Emissions::on_initialize(block_number); + Governance::on_initialize(block_number); + Reputation::on_initialize(block_number); + EthereumVault::on_initialize(block_number); + Validator::on_initialize(block_number); + Timestamp::set_timestamp((block_number as u64 * BLOCK_TIME) + INIT_TIMESTAMP); // Notify contract events for event in self.stake_manager_contract.events() { @@ -474,9 +481,8 @@ mod tests { // A completed block notification for engine in self.engines.values() { - engine.on_block(System::block_number()); + engine.on_block(block_number); } - System::set_block_number(System::block_number() + 1); } } } From e8a0b2fc5026eecc393b5800943c31eb057f5191 Mon Sep 17 00:00:00 2001 From: Daniel Date: Wed, 11 May 2022 10:49:07 +0200 Subject: [PATCH 21/33] fix: remove pointless assertion context. --- state-chain/chains/src/eth.rs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/state-chain/chains/src/eth.rs b/state-chain/chains/src/eth.rs index 4ce628a133..0050bb0781 100644 --- a/state-chain/chains/src/eth.rs +++ b/state-chain/chains/src/eth.rs @@ -877,12 +877,7 @@ mod verification_tests { let verificaton_result = verify_transaction(&unsigned, &signed_tx_bytes.0, &key_ref.address().0.into()); - assert_eq!( - verificaton_result, - Ok(()), - "Unable to verify tx signed by key {:?}", - hex::encode(key.serialize_secret()) - ); + assert_eq!(verificaton_result, Ok(()),); } } From 76084338194ad041c82609f54eca9f03b12846ed Mon Sep 17 00:00:00 2001 From: Daniel Date: Wed, 11 May 2022 11:24:28 +0200 Subject: [PATCH 22/33] fix: unsigned extrinsic submission logs pallet call instead of runtime call. --- engine/src/state_chain/client.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/engine/src/state_chain/client.rs b/engine/src/state_chain/client.rs index e5ce0978be..170a275b4e 100644 --- a/engine/src/state_chain/client.rs +++ b/engine/src/state_chain/client.rs @@ -568,12 +568,12 @@ impl StateChainClient { where Call: Into + 'static + std::fmt::Debug + Clone + Send, { - let call = call.into(); - let expected_hash = BlakeTwo256::hash_of(&call); + let runtime_call = call.clone().into(); + let expected_hash = BlakeTwo256::hash_of(&runtime_call); match self .state_chain_rpc_client .submit_extrinsic_rpc(state_chain_runtime::UncheckedExtrinsic::new_unsigned( - call.clone(), + runtime_call, )) .await { From 9850c3bf9b972306cf924447e39f99924b28f631 Mon Sep 17 00:00:00 2001 From: Daniel Date: Wed, 11 May 2022 11:24:45 +0200 Subject: [PATCH 23/33] fix: test all MaxEncodedLen impls --- Cargo.lock | 2 ++ state-chain/chains/Cargo.toml | 1 + state-chain/chains/src/eth.rs | 4 ++-- state-chain/chains/src/eth/api/register_claim.rs | 5 +++++ state-chain/chains/src/eth/api/update_flip_supply.rs | 7 ++++++- state-chain/test-utilities/Cargo.toml | 10 ++++------ state-chain/test-utilities/src/lib.rs | 5 +++++ 7 files changed, 25 insertions(+), 9 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 61ab6596d2..350ee22225 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -744,6 +744,7 @@ name = "cf-chains" version = "0.1.0" dependencies = [ "cf-runtime-benchmark-utilities", + "cf-test-utilities", "ethabi", "ethereum", "ethereum-types", @@ -856,6 +857,7 @@ name = "cf-test-utilities" version = "0.1.0" dependencies = [ "frame-system", + "parity-scale-codec", ] [[package]] diff --git a/state-chain/chains/Cargo.toml b/state-chain/chains/Cargo.toml index f9cd8f85cc..88546d27cd 100644 --- a/state-chain/chains/Cargo.toml +++ b/state-chain/chains/Cargo.toml @@ -58,6 +58,7 @@ tag = 'chainflip-monthly-2022-05' [dev-dependencies] +cf-test-utilities = { path = '../test-utilities' } hex-literal = {version = '0.3'} web3 = {git = 'https://github.com/tomusdrw/rust-web3.git', rev = '8796c88', features = ['test']} rand = {version='0.8.4'} diff --git a/state-chain/chains/src/eth.rs b/state-chain/chains/src/eth.rs index 0050bb0781..0a24521734 100644 --- a/state-chain/chains/src/eth.rs +++ b/state-chain/chains/src/eth.rs @@ -940,7 +940,7 @@ mod verification_tests { } #[test] - fn sig_data_max_encoded_len_is_correct() { - assert_eq!(std::mem::size_of::(), SigData::max_encoded_len()); + fn test_max_encoded_len() { + cf_test_utilities::ensure_max_encoded_len_is_exact::(); } } diff --git a/state-chain/chains/src/eth/api/register_claim.rs b/state-chain/chains/src/eth/api/register_claim.rs index e1947122c1..38c125ff9f 100644 --- a/state-chain/chains/src/eth/api/register_claim.rs +++ b/state-chain/chains/src/eth/api/register_claim.rs @@ -204,4 +204,9 @@ mod test_register_claim { .unwrap() ); } + + #[test] + fn test_max_encoded_len() { + cf_test_utilities::ensure_max_encoded_len_is_exact::(); + } } diff --git a/state-chain/chains/src/eth/api/update_flip_supply.rs b/state-chain/chains/src/eth/api/update_flip_supply.rs index a453f7fa9a..e963b12b80 100644 --- a/state-chain/chains/src/eth/api/update_flip_supply.rs +++ b/state-chain/chains/src/eth/api/update_flip_supply.rs @@ -9,7 +9,7 @@ use crate::eth::{SchnorrVerificationComponents, SigData}; use super::{ethabi_function, ethabi_param, EthereumReplayProtection}; -#[derive(Encode, Decode, TypeInfo, Clone, RuntimeDebug, PartialEq, Eq)] +#[derive(Encode, Decode, TypeInfo, Clone, RuntimeDebug, PartialEq, Eq, Default)] pub struct UpdateFlipSupply { /// The signature data for validation and replay protection. pub sig_data: SigData, @@ -182,4 +182,9 @@ mod test_update_flip_supply { .unwrap() ); } + + #[test] + fn test_max_encoded_len() { + cf_test_utilities::ensure_max_encoded_len_is_exact::(); + } } diff --git a/state-chain/test-utilities/Cargo.toml b/state-chain/test-utilities/Cargo.toml index 917426d24c..f0abdfed4e 100644 --- a/state-chain/test-utilities/Cargo.toml +++ b/state-chain/test-utilities/Cargo.toml @@ -5,12 +5,10 @@ edition = "2018" authors = ['Chainflip '] description = "Chainflip test utilities used in multiple crates" +[dependencies.codec] +package = 'parity-scale-codec' +version = '3.0.0' + [dependencies.frame-system] git = 'https://github.com/chainflip-io/substrate.git' tag = 'chainflip-monthly-2022-05' - -[features] -default = ['std'] -std = [ - 'frame-system/std', -] \ No newline at end of file diff --git a/state-chain/test-utilities/src/lib.rs b/state-chain/test-utilities/src/lib.rs index f9cd2400ec..5a0e0dfe77 100644 --- a/state-chain/test-utilities/src/lib.rs +++ b/state-chain/test-utilities/src/lib.rs @@ -4,6 +4,11 @@ pub fn last_event() -> ::Event { frame_system::Pallet::::events().pop().expect("Event expected").event } +/// Can be used to check that fixed-sized types have the correct implementation of MaxEncodedLen +pub fn ensure_max_encoded_len_is_exact() { + assert_eq!(T::default().encode().len(), T::max_encoded_len()); +} + /// Checks the deposited events in the order they occur #[macro_export] macro_rules! assert_event_sequence { From c8f6e66268f3f4271896620ee847689dd336cd49 Mon Sep 17 00:00:00 2001 From: Daniel Date: Wed, 11 May 2022 15:33:30 +0200 Subject: [PATCH 24/33] fix: revert weight template --- state-chain/chainflip-weight-template.hbs | 160 +++++++++++----------- 1 file changed, 77 insertions(+), 83 deletions(-) diff --git a/state-chain/chainflip-weight-template.hbs b/state-chain/chainflip-weight-template.hbs index a5ca786ad0..33c965dacd 100644 --- a/state-chain/chainflip-weight-template.hbs +++ b/state-chain/chainflip-weight-template.hbs @@ -1,13 +1,11 @@ //! Autogenerated weights for {{pallet}} //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION {{version}} -//! DATE: {{date}}, STEPS: `{{cmd.steps}}`, REPEAT: {{cmd.repeat}}, LOW RANGE: `{{cmd.lowest_range_values}}`, HIGH -RANGE: `{{cmd.highest_range_values}}` -//! EXECUTION: {{cmd.execution}}, WASM-EXECUTION: {{cmd.wasm_execution}}, CHAIN: {{cmd.chain}}, DB CACHE: -{{cmd.db_cache}} +//! DATE: {{date}}, STEPS: `{{cmd.steps}}`, REPEAT: {{cmd.repeat}}, LOW RANGE: `{{cmd.lowest_range_values}}`, HIGH RANGE: `{{cmd.highest_range_values}}` +//! EXECUTION: {{cmd.execution}}, WASM-EXECUTION: {{cmd.wasm_execution}}, CHAIN: {{cmd.chain}}, DB CACHE: {{cmd.db_cache}} // Executed Command: -{{#each args as |arg|}} +{{#each args as |arg|~}} // {{arg}} {{/each}} @@ -20,86 +18,82 @@ use sp_std::marker::PhantomData; /// Weight functions needed for {{pallet}}. pub trait WeightInfo { -{{#each benchmarks as |benchmark|}} -fn {{benchmark.name}} -( -{{#each benchmark.components as |c| }} -{{c.name}}: u32, {{/each}} -) -> Weight; -{{/each}} + {{~#each benchmarks as |benchmark|}} + fn {{benchmark.name~}} + ( + {{~#each benchmark.components as |c| ~}} + {{c.name}}: u32, {{/each~}} + ) -> Weight; + {{~/each}} } /// Weights for {{pallet}} using the Substrate node and recommended hardware. pub struct PalletWeight(PhantomData); - {{#if (eq pallet "frame_system")}} - impl WeightInfo for WeightInfo { - {{else}} - impl WeightInfo for PalletWeight { - {{/if}} - {{#each benchmarks as |benchmark|}} - {{#each benchmark.comments as |comment|}} - // {{comment}} - {{/each}} - fn {{benchmark.name}} - ( - {{#each benchmark.components as |c| }} - {{#if (not c.is_used)}}_{{/if}}{{c.name}}: u32, {{/each}} - ) -> Weight { - #[allow(clippy::unnecessary_cast)] - ({{underscore benchmark.base_weight}} as Weight) - {{#each benchmark.component_weight as |cw|}} - // Standard Error: {{underscore cw.error}} - .saturating_add(({{underscore cw.slope}} as Weight).saturating_mul({{cw.name}} as Weight)) - {{/each}} - {{#if (ne benchmark.base_reads "0")}} - .saturating_add(T::DbWeight::get().reads({{benchmark.base_reads}} as Weight)) - {{/if}} - {{#each benchmark.component_reads as |cr|}} - .saturating_add(T::DbWeight::get().reads(({{cr.slope}} as Weight).saturating_mul({{cr.name}} as - Weight))) - {{/each}} - {{#if (ne benchmark.base_writes "0")}} - .saturating_add(T::DbWeight::get().writes({{benchmark.base_writes}} as Weight)) - {{/if}} - {{#each benchmark.component_writes as |cw|}} - .saturating_add(T::DbWeight::get().writes(({{cw.slope}} as Weight).saturating_mul({{cw.name}} as - Weight))) - {{/each}} - } - {{/each}} - } +{{~#if (eq pallet "frame_system")}} +impl WeightInfo for WeightInfo { +{{~else}} +impl WeightInfo for PalletWeight { +{{~/if}} + {{~#each benchmarks as |benchmark|}} + {{~#each benchmark.comments as |comment|}} + // {{comment}} + {{~/each}} + fn {{benchmark.name~}} + ( + {{~#each benchmark.components as |c| ~}} + {{~#if (not c.is_used)}}_{{/if}}{{c.name}}: u32, {{/each~}} + ) -> Weight { + #[allow(clippy::unnecessary_cast)] + ({{underscore benchmark.base_weight}} as Weight) + {{~#each benchmark.component_weight as |cw|}} + // Standard Error: {{underscore cw.error}} + .saturating_add(({{underscore cw.slope}} as Weight).saturating_mul({{cw.name}} as Weight)) + {{~/each}} + {{~#if (ne benchmark.base_reads "0")}} + .saturating_add(T::DbWeight::get().reads({{benchmark.base_reads}} as Weight)) + {{~/if}} + {{~#each benchmark.component_reads as |cr|}} + .saturating_add(T::DbWeight::get().reads(({{cr.slope}} as Weight).saturating_mul({{cr.name}} as Weight))) + {{~/each}} + {{~#if (ne benchmark.base_writes "0")}} + .saturating_add(T::DbWeight::get().writes({{benchmark.base_writes}} as Weight)) + {{~/if}} + {{~#each benchmark.component_writes as |cw|}} + .saturating_add(T::DbWeight::get().writes(({{cw.slope}} as Weight).saturating_mul({{cw.name}} as Weight))) + {{~/each}} + } + {{~/each}} +} - // For backwards compatibility and tests - impl WeightInfo for () { - {{#each benchmarks as |benchmark|}} - {{#each benchmark.comments as |comment|}} - // {{comment}} - {{/each}} - fn {{benchmark.name}} - ( - {{#each benchmark.components as |c| }} - {{#if (not c.is_used)}}_{{/if}}{{c.name}}: u32, {{/each}} - ) -> Weight { - #[allow(clippy::unnecessary_cast)] - ({{underscore benchmark.base_weight}} as Weight) - {{#each benchmark.component_weight as |cw|}} - // Standard Error: {{underscore cw.error}} - .saturating_add(({{underscore cw.slope}} as Weight).saturating_mul({{cw.name}} as Weight)) - {{/each}} - {{#if (ne benchmark.base_reads "0")}} - .saturating_add(RocksDbWeight::get().reads({{benchmark.base_reads}} as Weight)) - {{/if}} - {{#each benchmark.component_reads as |cr|}} - .saturating_add(RocksDbWeight::get().reads(({{cr.slope}} as Weight).saturating_mul({{cr.name}} - as Weight))) - {{/each}} - {{#if (ne benchmark.base_writes "0")}} - .saturating_add(RocksDbWeight::get().writes({{benchmark.base_writes}} as Weight)) - {{/if}} - {{#each benchmark.component_writes as |cw|}} - .saturating_add(RocksDbWeight::get().writes(({{cw.slope}} as Weight).saturating_mul({{cw.name}} - as Weight))) - {{/each}} - } - {{/each}} - } \ No newline at end of file +// For backwards compatibility and tests +impl WeightInfo for () { + {{~#each benchmarks as |benchmark|}} + {{~#each benchmark.comments as |comment|}} + // {{comment}} + {{~/each}} + fn {{benchmark.name~}} + ( + {{~#each benchmark.components as |c| ~}} + {{~#if (not c.is_used)}}_{{/if}}{{c.name}}: u32, {{/each~}} + ) -> Weight { + #[allow(clippy::unnecessary_cast)] + ({{underscore benchmark.base_weight}} as Weight) + {{~#each benchmark.component_weight as |cw|}} + // Standard Error: {{underscore cw.error}} + .saturating_add(({{underscore cw.slope}} as Weight).saturating_mul({{cw.name}} as Weight)) + {{~/each}} + {{~#if (ne benchmark.base_reads "0")}} + .saturating_add(RocksDbWeight::get().reads({{benchmark.base_reads}} as Weight)) + {{~/if}} + {{~#each benchmark.component_reads as |cr|}} + .saturating_add(RocksDbWeight::get().reads(({{cr.slope}} as Weight).saturating_mul({{cr.name}} as Weight))) + {{~/each}} + {{~#if (ne benchmark.base_writes "0")}} + .saturating_add(RocksDbWeight::get().writes({{benchmark.base_writes}} as Weight)) + {{~/if}} + {{~#each benchmark.component_writes as |cw|}} + .saturating_add(RocksDbWeight::get().writes(({{cw.slope}} as Weight).saturating_mul({{cw.name}} as Weight))) + {{~/each}} + } + {{~/each}} +} \ No newline at end of file From 7de785c8aab74020ffaa3ef3f26ee572d2b852b1 Mon Sep 17 00:00:00 2001 From: Daniel Date: Wed, 11 May 2022 15:35:59 +0200 Subject: [PATCH 25/33] fix: correctly formatted hbs template --- state-chain/chainflip-weight-template.hbs | 79 +++++++++++------------ 1 file changed, 39 insertions(+), 40 deletions(-) diff --git a/state-chain/chainflip-weight-template.hbs b/state-chain/chainflip-weight-template.hbs index 33c965dacd..32eb226173 100644 --- a/state-chain/chainflip-weight-template.hbs +++ b/state-chain/chainflip-weight-template.hbs @@ -1,11 +1,11 @@ //! Autogenerated weights for {{pallet}} //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION {{version}} +//! THIS FILE WAS AUTO-GENERATED USING CHAINFLIP NODE BENCHMARK CMD VERSION {{version}} //! DATE: {{date}}, STEPS: `{{cmd.steps}}`, REPEAT: {{cmd.repeat}}, LOW RANGE: `{{cmd.lowest_range_values}}`, HIGH RANGE: `{{cmd.highest_range_values}}` //! EXECUTION: {{cmd.execution}}, WASM-EXECUTION: {{cmd.wasm_execution}}, CHAIN: {{cmd.chain}}, DB CACHE: {{cmd.db_cache}} // Executed Command: -{{#each args as |arg|~}} +{{#each args as |arg|}} // {{arg}} {{/each}} @@ -18,59 +18,58 @@ use sp_std::marker::PhantomData; /// Weight functions needed for {{pallet}}. pub trait WeightInfo { - {{~#each benchmarks as |benchmark|}} + {{#each benchmarks as |benchmark|}} fn {{benchmark.name~}} ( {{~#each benchmark.components as |c| ~}} {{c.name}}: u32, {{/each~}} ) -> Weight; - {{~/each}} + {{/each}} } /// Weights for {{pallet}} using the Substrate node and recommended hardware. -pub struct PalletWeight(PhantomData); -{{~#if (eq pallet "frame_system")}} -impl WeightInfo for WeightInfo { -{{~else}} -impl WeightInfo for PalletWeight { -{{~/if}} - {{~#each benchmarks as |benchmark|}} - {{~#each benchmark.comments as |comment|}} +pub struct SubstrateWeight(PhantomData); +{{#if (eq pallet "frame_system")}} +impl WeightInfo for SubstrateWeight { +{{else}} +impl WeightInfo for SubstrateWeight { +{{/if}} + {{#each benchmarks as |benchmark|}} + {{#each benchmark.comments as |comment|}} // {{comment}} - {{~/each}} + {{/each}} fn {{benchmark.name~}} ( {{~#each benchmark.components as |c| ~}} {{~#if (not c.is_used)}}_{{/if}}{{c.name}}: u32, {{/each~}} ) -> Weight { - #[allow(clippy::unnecessary_cast)] ({{underscore benchmark.base_weight}} as Weight) - {{~#each benchmark.component_weight as |cw|}} + {{#each benchmark.component_weight as |cw|}} // Standard Error: {{underscore cw.error}} .saturating_add(({{underscore cw.slope}} as Weight).saturating_mul({{cw.name}} as Weight)) - {{~/each}} - {{~#if (ne benchmark.base_reads "0")}} + {{/each}} + {{#if (ne benchmark.base_reads "0")}} .saturating_add(T::DbWeight::get().reads({{benchmark.base_reads}} as Weight)) - {{~/if}} - {{~#each benchmark.component_reads as |cr|}} + {{/if}} + {{#each benchmark.component_reads as |cr|}} .saturating_add(T::DbWeight::get().reads(({{cr.slope}} as Weight).saturating_mul({{cr.name}} as Weight))) - {{~/each}} - {{~#if (ne benchmark.base_writes "0")}} + {{/each}} + {{#if (ne benchmark.base_writes "0")}} .saturating_add(T::DbWeight::get().writes({{benchmark.base_writes}} as Weight)) - {{~/if}} - {{~#each benchmark.component_writes as |cw|}} + {{/if}} + {{#each benchmark.component_writes as |cw|}} .saturating_add(T::DbWeight::get().writes(({{cw.slope}} as Weight).saturating_mul({{cw.name}} as Weight))) - {{~/each}} + {{/each}} } - {{~/each}} + {{/each}} } // For backwards compatibility and tests impl WeightInfo for () { - {{~#each benchmarks as |benchmark|}} - {{~#each benchmark.comments as |comment|}} + {{#each benchmarks as |benchmark|}} + {{#each benchmark.comments as |comment|}} // {{comment}} - {{~/each}} + {{/each}} fn {{benchmark.name~}} ( {{~#each benchmark.components as |c| ~}} @@ -78,22 +77,22 @@ impl WeightInfo for () { ) -> Weight { #[allow(clippy::unnecessary_cast)] ({{underscore benchmark.base_weight}} as Weight) - {{~#each benchmark.component_weight as |cw|}} + {{#each benchmark.component_weight as |cw|}} // Standard Error: {{underscore cw.error}} .saturating_add(({{underscore cw.slope}} as Weight).saturating_mul({{cw.name}} as Weight)) - {{~/each}} - {{~#if (ne benchmark.base_reads "0")}} + {{/each}} + {{#if (ne benchmark.base_reads "0")}} .saturating_add(RocksDbWeight::get().reads({{benchmark.base_reads}} as Weight)) - {{~/if}} - {{~#each benchmark.component_reads as |cr|}} + {{/if}} + {{#each benchmark.component_reads as |cr|}} .saturating_add(RocksDbWeight::get().reads(({{cr.slope}} as Weight).saturating_mul({{cr.name}} as Weight))) - {{~/each}} - {{~#if (ne benchmark.base_writes "0")}} + {{/each}} + {{#if (ne benchmark.base_writes "0")}} .saturating_add(RocksDbWeight::get().writes({{benchmark.base_writes}} as Weight)) - {{~/if}} - {{~#each benchmark.component_writes as |cw|}} + {{/if}} + {{#each benchmark.component_writes as |cw|}} .saturating_add(RocksDbWeight::get().writes(({{cw.slope}} as Weight).saturating_mul({{cw.name}} as Weight))) - {{~/each}} + {{/each}} } - {{~/each}} -} \ No newline at end of file + {{/each}} +} From fcabb066a272f8954f131c99cd3e5e8c55c57716 Mon Sep 17 00:00:00 2001 From: Daniel Date: Wed, 11 May 2022 15:39:21 +0200 Subject: [PATCH 26/33] fix: update benchmark.sh --- state-chain/scripts/benchmark.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/state-chain/scripts/benchmark.sh b/state-chain/scripts/benchmark.sh index c8222f05fa..43cd5b4b32 100755 --- a/state-chain/scripts/benchmark.sh +++ b/state-chain/scripts/benchmark.sh @@ -2,5 +2,5 @@ # usage: state-chain/scripts/benchmark.sh palletname -# execute the benchmark for pallet auction -./target/release/chainflip-node benchmark --extrinsic '*' --pallet pallet_cf_$1 --output state-chain/pallets/cf-$1/src/weights.rs --execution=wasm --steps=20 --repeat=10 --template=state-chain/chainflip-weight-template.hbs \ No newline at end of file +# execute the benchmark for $palletame +./target/release/chainflip-node benchmark pallet --extrinsic '*' --pallet pallet_cf_$1 --output state-chain/pallets/cf-$1/src/weights.rs --execution=wasm --steps=20 --repeat=10 --template=state-chain/chainflip-weight-template.hbs \ No newline at end of file From 762810b4d98498db60a63577d8678166abf10dc3 Mon Sep 17 00:00:00 2001 From: Daniel Date: Wed, 11 May 2022 17:29:42 +0200 Subject: [PATCH 27/33] fix: expected_hash encoding --- engine/src/state_chain/client.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/engine/src/state_chain/client.rs b/engine/src/state_chain/client.rs index 170a275b4e..3f628323d3 100644 --- a/engine/src/state_chain/client.rs +++ b/engine/src/state_chain/client.rs @@ -568,13 +568,11 @@ impl StateChainClient { where Call: Into + 'static + std::fmt::Debug + Clone + Send, { - let runtime_call = call.clone().into(); - let expected_hash = BlakeTwo256::hash_of(&runtime_call); + let extrinsic = state_chain_runtime::UncheckedExtrinsic::new_unsigned(call.clone().into()); + let expected_hash = BlakeTwo256::hash_of(&extrinsic); match self .state_chain_rpc_client - .submit_extrinsic_rpc(state_chain_runtime::UncheckedExtrinsic::new_unsigned( - runtime_call, - )) + .submit_extrinsic_rpc(extrinsic) .await { Ok(tx_hash) => { From e74f0054e5471735d19ed8eca8ff2f75dfa7e6d3 Mon Sep 17 00:00:00 2001 From: Daniel Date: Wed, 11 May 2022 17:40:24 +0200 Subject: [PATCH 28/33] fix: integration tests --- state-chain/cf-integration-tests/Cargo.toml | 58 ++++++--------------- state-chain/cf-integration-tests/src/lib.rs | 5 +- state-chain/runtime/Cargo.toml | 1 + 3 files changed, 21 insertions(+), 43 deletions(-) diff --git a/state-chain/cf-integration-tests/Cargo.toml b/state-chain/cf-integration-tests/Cargo.toml index c5a68245a5..351950508d 100644 --- a/state-chain/cf-integration-tests/Cargo.toml +++ b/state-chain/cf-integration-tests/Cargo.toml @@ -12,65 +12,58 @@ repository = 'https://github.com/chainflip-io/chainflip-backend' targets = ['x86_64-unknown-linux-gnu'] [dev-dependencies] -libsecp256k1 = { default-features = false, version = '0.7', features = ['static-context'] } +libsecp256k1 = { version = '0.7', features = ['static-context'] } rand = {version='0.8.4'} # Chainflip local dependencies -state-chain-runtime = { path = "../runtime", default-features = false } -cf-traits = { path = "../traits", default-features = false } -cf-chains = { path = "../chains", default-features = false } -pallet-cf-validator = { path = "../pallets/cf-validator", default-features = false } -pallet-cf-staking = { path = "../pallets/cf-staking", default-features = false } +state-chain-runtime = { path = "../runtime"} +cf-traits = { path = "../traits"} +cf-chains = { path = "../chains"} +pallet-cf-validator = { path = "../pallets/cf-validator"} +pallet-cf-staking = { path = "../pallets/cf-staking"} pallet-cf-witnesser = { path = "../pallets/cf-witnesser", default-features = false} -pallet-cf-flip = { path = "../pallets/cf-flip", default-features = false } -pallet-cf-auction = { path = "../pallets/cf-auction", default-features = false } -pallet-cf-emissions = { path = "../pallets/cf-emissions", default-features = false } -pallet-cf-governance = { path = "../pallets/cf-governance", default-features = false } -pallet-cf-reputation = { path = "../pallets/cf-reputation", default-features = false } -pallet-cf-vaults = { path = "../pallets/cf-vaults", default-features = false } -pallet-cf-online = { path = "../pallets/cf-online", default-features = false } -pallet-cf-threshold-signature = { path = "../pallets/cf-threshold-signature", default-features = false } -pallet-cf-broadcast = { path = "../pallets/cf-broadcast", default-features = false } -pallet-cf-environment = { path = "../pallets/cf-environment", default-features = false } +pallet-cf-flip = { path = "../pallets/cf-flip"} +pallet-cf-auction = { path = "../pallets/cf-auction"} +pallet-cf-emissions = { path = "../pallets/cf-emissions"} +pallet-cf-governance = { path = "../pallets/cf-governance"} +pallet-cf-reputation = { path = "../pallets/cf-reputation"} +pallet-cf-vaults = { path = "../pallets/cf-vaults"} +pallet-cf-online = { path = "../pallets/cf-online"} +pallet-cf-threshold-signature = { path = "../pallets/cf-threshold-signature"} +pallet-cf-broadcast = { path = "../pallets/cf-broadcast"} +pallet-cf-environment = { path = "../pallets/cf-environment"} # Additional FRAME pallets [dev-dependencies.pallet-authorship] -default-features = false git = 'https://github.com/chainflip-io/substrate.git' tag = 'chainflip-monthly-2022-05' [dev-dependencies.pallet-session] -default-features = false git = 'https://github.com/chainflip-io/substrate.git' tag = 'chainflip-monthly-2022-05' features = ['historical'] # Substrate dependencies [dev-dependencies.codec] -default-features = false features = ['derive'] package = 'parity-scale-codec' version = '3.0.0' [dev-dependencies.frame-executive] -default-features = false git = 'https://github.com/chainflip-io/substrate.git' tag = 'chainflip-monthly-2022-05' [dev-dependencies.frame-support] -default-features = false git = 'https://github.com/chainflip-io/substrate.git' tag = 'chainflip-monthly-2022-05' [dev-dependencies.frame-system] -default-features = false git = 'https://github.com/chainflip-io/substrate.git' tag = 'chainflip-monthly-2022-05' [dev-dependencies.frame-system-rpc-runtime-api] -default-features = false git = 'https://github.com/chainflip-io/substrate.git' tag = 'chainflip-monthly-2022-05' @@ -78,89 +71,70 @@ tag = 'chainflip-monthly-2022-05' version = '0.3.1' [dev-dependencies.pallet-aura] -default-features = false git = 'https://github.com/chainflip-io/substrate.git' tag = 'chainflip-monthly-2022-05' [dev-dependencies.pallet-grandpa] -default-features = false git = 'https://github.com/chainflip-io/substrate.git' tag = 'chainflip-monthly-2022-05' [dev-dependencies.pallet-randomness-collective-flip] -default-features = false git = 'https://github.com/chainflip-io/substrate.git' tag = 'chainflip-monthly-2022-05' [dev-dependencies.pallet-timestamp] -default-features = false git = 'https://github.com/chainflip-io/substrate.git' tag = 'chainflip-monthly-2022-05' [dev-dependencies.pallet-transaction-payment] -default-features = false git = 'https://github.com/chainflip-io/substrate.git' tag = 'chainflip-monthly-2022-05' [dev-dependencies.scale-info] -default-features = false features = ['derive'] version = '2.0.1' [dev-dependencies.sp-block-builder] -default-features = false git = 'https://github.com/chainflip-io/substrate.git' tag = 'chainflip-monthly-2022-05' [dev-dependencies.sp-consensus-aura] -default-features = false git = 'https://github.com/chainflip-io/substrate.git' tag = 'chainflip-monthly-2022-05' version = '0.10.0-dev' [dev-dependencies.sp-core] -default-features = false git = 'https://github.com/chainflip-io/substrate.git' tag = 'chainflip-monthly-2022-05' [dev-dependencies.sp-inherents] -default-features = false git = 'https://github.com/chainflip-io/substrate.git' tag = 'chainflip-monthly-2022-05' [dev-dependencies.sp-offchain] -default-features = false git = 'https://github.com/chainflip-io/substrate.git' tag = 'chainflip-monthly-2022-05' [dev-dependencies.sp-runtime] -default-features = false git = 'https://github.com/chainflip-io/substrate.git' tag = 'chainflip-monthly-2022-05' [dev-dependencies.sp-session] -default-features = false git = 'https://github.com/chainflip-io/substrate.git' tag = 'chainflip-monthly-2022-05' [dev-dependencies.sp-std] -default-features = false git = 'https://github.com/chainflip-io/substrate.git' tag = 'chainflip-monthly-2022-05' [dev-dependencies.sp-transaction-pool] -default-features = false git = 'https://github.com/chainflip-io/substrate.git' tag = 'chainflip-monthly-2022-05' [dev-dependencies.sp-version] -default-features = false git = 'https://github.com/chainflip-io/substrate.git' tag = 'chainflip-monthly-2022-05' [dev-dependencies.sp-finality-grandpa] git = 'https://github.com/chainflip-io/substrate.git' tag = 'chainflip-monthly-2022-05' - -[features] -default = [] diff --git a/state-chain/cf-integration-tests/src/lib.rs b/state-chain/cf-integration-tests/src/lib.rs index 4a35f7b4e8..ceaa52d5a3 100644 --- a/state-chain/cf-integration-tests/src/lib.rs +++ b/state-chain/cf-integration-tests/src/lib.rs @@ -953,7 +953,10 @@ mod tests { // Run to the next epoch to start the auction testnet.move_forward_blocks(EPOCH_BLOCKS - 1); - assert_eq!(Validator::rotation_phase(), RotationStatus::RunAuction); + assert!(matches!( + Validator::rotation_phase(), + RotationStatus::AwaitingVaults(..) + )); testnet.move_forward_blocks(VAULT_ROTATION_BLOCKS); diff --git a/state-chain/runtime/Cargo.toml b/state-chain/runtime/Cargo.toml index 8cacbdc366..c789abd091 100644 --- a/state-chain/runtime/Cargo.toml +++ b/state-chain/runtime/Cargo.toml @@ -237,6 +237,7 @@ std = [ 'pallet-session/std', 'pallet-timestamp/std', 'pallet-transaction-payment/std', + "pallet-transaction-payment-rpc-runtime-api/std", 'serde', 'sp-api/std', 'sp-block-builder/std', From 0566f6ea6b3eef6bcb75ab16d3c877fdbe687948 Mon Sep 17 00:00:00 2001 From: Daniel Date: Wed, 11 May 2022 20:51:31 +0200 Subject: [PATCH 29/33] fix: missed authorship slot tests. --- .../src/chainflip/missed_authorship_slots.rs | 86 +++++++++---------- 1 file changed, 42 insertions(+), 44 deletions(-) diff --git a/state-chain/runtime/src/chainflip/missed_authorship_slots.rs b/state-chain/runtime/src/chainflip/missed_authorship_slots.rs index 7576eac91c..76ced1ab79 100644 --- a/state-chain/runtime/src/chainflip/missed_authorship_slots.rs +++ b/state-chain/runtime/src/chainflip/missed_authorship_slots.rs @@ -61,7 +61,7 @@ mod test_missed_authorship_slots { use codec::Encode; use frame_support::{ construct_runtime, parameter_types, - traits::{ConstU32, OnInitialize}, + traits::{ConstU32, ConstU64, OnInitialize}, }; use sp_consensus_aura::ed25519::AuthorityId; use sp_runtime::{ @@ -115,13 +115,12 @@ mod test_missed_authorship_slots { type MaxConsumers = frame_support::traits::ConstU32<5>; } - parameter_types! { - pub const MinimumPeriod: u64 = 1; - } + const SLOT_DURATION: u64 = 6; + impl pallet_timestamp::Config for Test { type Moment = u64; type OnTimestampSet = Aura; - type MinimumPeriod = MinimumPeriod; + type MinimumPeriod = ConstU64<{ SLOT_DURATION / 2 }>; type WeightInfo = (); } @@ -171,50 +170,49 @@ mod test_missed_authorship_slots { ); } - fn simulate_block_authorship(block_number: u64, slot: u64) { - let author_slot = AuraSlot::from(slot); - let pre_digest = - Digest { logs: vec![DigestItem::PreRuntime(AURA_ENGINE_ID, author_slot.encode())] }; - - System::reset_events(); - System::initialize(&block_number, &System::parent_hash(), &pre_digest); - } - #[test] fn test_missed_slots() { - new_test_ext(vec![0, 1, 2, 3, 4]).execute_with(|| { - let (block, slot) = (33u64, 3u64); - simulate_block_authorship(block, slot); + // The genesis slot is some value greater than zero. + const GENESIS_SLOT: u64 = 12345u64; + + fn simulate_block_authorship)>(block_number: u64, assertions: F) { + // one slot per block, so slot == block_number + let author_slot = AuraSlot::from(GENESIS_SLOT + block_number); + let pre_digest = + Digest { logs: vec![DigestItem::PreRuntime(AURA_ENGINE_ID, author_slot.encode())] }; + + System::reset_events(); + System::initialize(&block_number, &System::parent_hash(), &pre_digest); + System::on_initialize(block_number); + Timestamp::on_initialize(block_number); + assertions(::missed_slots()); + Aura::on_initialize(block_number); + Timestamp::set_timestamp(block_number); + } - // Our author is authoring for slot 3. 0 has already been authored (genesis), so - // 1 and 2 were skipped. - assert_eq!(::missed_slots(), vec![1, 2]); + new_test_ext(vec![0, 1, 2, 3, 4]).execute_with(|| { + // No expected slot at genesis, so no missed slots. + simulate_block_authorship(1, |missed_slots| { + assert!(missed_slots.is_empty()); + }); - // Aura updates after this - current slot should now be 3. - >::on_initialize(block); - assert_eq!(Aura::current_slot(), slot); + // Author block 3 - we missed slot 2. + simulate_block_authorship(3, |missed_slots| { + assert_eq!(missed_slots, [2].map(|x| GENESIS_SLOT + x)); + }); + assert_eq!(Aura::current_slot(), GENESIS_SLOT + 3); // Author for the next slot, assert we haven't missed a slot. - let (block, slot) = (44u64, 4u64); - simulate_block_authorship(block, slot); - assert!(::missed_slots().is_empty()); - - >::on_initialize(block); - assert_eq!(Aura::current_slot(), slot); - - // Author for slot 6, assert we missed slot 5. - let (block, slot) = (66u64, 6u64); - simulate_block_authorship(block, slot); - assert_eq!(::missed_slots(), vec![5]); - - >::on_initialize(block); - assert_eq!(Aura::current_slot(), slot); - }) - } - - #[test] - fn test_first_authored_block() { - simulate_block_authorship(0, 0); - assert!(::missed_slots().is_empty()); + simulate_block_authorship(4, |missed_slots| { + assert!(missed_slots.is_empty()); + }); + assert_eq!(Aura::current_slot(), GENESIS_SLOT + 4); + + // Author for slot 7, assert we missed slots 5 and 6. + simulate_block_authorship(7, |missed_slots| { + assert_eq!(missed_slots, [5, 6].map(|x| GENESIS_SLOT + x)); + }); + assert_eq!(Aura::current_slot(), GENESIS_SLOT + 7); + }); } } From 7b78c96c17dc26940bab1d3a57b667fe0aa8c48b Mon Sep 17 00:00:00 2001 From: Daniel Date: Thu, 12 May 2022 09:39:06 +0200 Subject: [PATCH 30/33] feat: additional cfe logging on failed signing attempt. --- engine/src/state_chain/sc_observer.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/engine/src/state_chain/sc_observer.rs b/engine/src/state_chain/sc_observer.rs index 43ff55c977..93519121d4 100644 --- a/engine/src/state_chain/sc_observer.rs +++ b/engine/src/state_chain/sc_observer.rs @@ -296,7 +296,8 @@ pub async fn start( ) .await; } - Err((bad_account_ids, _error)) => { + Err((bad_account_ids, error)) => { + slog::debug!(logger, "Threshold signing ceremony {} failed: {:?}", ceremony_id, error); let _result = state_chain_client .submit_signed_extrinsic( pallet_cf_threshold_signature::Call::report_signature_failed_unbounded { From e8692a9b00b21fe50e1f079828552f81189040a1 Mon Sep 17 00:00:00 2001 From: Daniel Date: Thu, 12 May 2022 09:56:42 +0200 Subject: [PATCH 31/33] feat: extra loggin on keygen failures. --- engine/src/state_chain/sc_observer.rs | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/engine/src/state_chain/sc_observer.rs b/engine/src/state_chain/sc_observer.rs index 93519121d4..5a3ce34312 100644 --- a/engine/src/state_chain/sc_observer.rs +++ b/engine/src/state_chain/sc_observer.rs @@ -55,12 +55,24 @@ async fn handle_keygen_request( cf_chains::eth::AggKey::from_pubkey_compressed(public_key_bytes), ), // Report keygen failure if we failed to sign - Err((bad_account_ids, _error)) => { + Err((bad_account_ids, error)) => { + slog::debug!( + logger, + "Keygen ceremony {} verification failed: {:?}", + ceremony_id, + error + ); KeygenOutcome::Failure(BTreeSet::from_iter(bad_account_ids)) } } } - Err((bad_account_ids, _error)) => { + Err((bad_account_ids, error)) => { + slog::debug!( + logger, + "Keygen ceremony {} failed: {:?}", + ceremony_id, + error + ); KeygenOutcome::Failure(BTreeSet::from_iter(bad_account_ids)) } }; From 675ad51e9b7aef33c01cbc06e0eef0c15f2c5019 Mon Sep 17 00:00:00 2001 From: Daniel Date: Thu, 12 May 2022 10:06:15 +0200 Subject: [PATCH 32/33] chore: add comment re. tx fee tip --- engine/src/state_chain/client.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/engine/src/state_chain/client.rs b/engine/src/state_chain/client.rs index 3f628323d3..396f03caa6 100644 --- a/engine/src/state_chain/client.rs +++ b/engine/src/state_chain/client.rs @@ -405,6 +405,8 @@ impl StateChainClient { frame_system::CheckEra::from(Era::Immortal), frame_system::CheckNonce::from(nonce), frame_system::CheckWeight::new(), + // This is the tx fee tip. Normally this determines transaction priority. We currently ignore this in the + // runtime but it needs to be set to some default value. state_chain_runtime::ChargeTransactionPayment::from(0), ); let additional_signed = ( From 7a5f9382280f1f4a180d1339ce935fa1ae3f4ab5 Mon Sep 17 00:00:00 2001 From: Daniel Date: Thu, 12 May 2022 16:09:54 +0200 Subject: [PATCH 33/33] chore: add TODO for issue #1657 --- state-chain/runtime/src/chainflip.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/state-chain/runtime/src/chainflip.rs b/state-chain/runtime/src/chainflip.rs index e46b4af9d4..4ccde547f0 100644 --- a/state-chain/runtime/src/chainflip.rs +++ b/state-chain/runtime/src/chainflip.rs @@ -208,6 +208,7 @@ impl RewardsDistribution for BlockAuthorRewardDistribution { type Surplus = Surplus; fn distribute(rewards: Self::Surplus) { + // TODO: Check if it's ok to panic here. let current_block_author = Authorship::author().expect("A block without an author is invalid."); Flip::settle_imbalance(¤t_block_author, rewards);