diff --git a/.maintain/frame-weight-template.hbs b/.maintain/frame-weight-template.hbs index 3135963036..9e038effee 100644 --- a/.maintain/frame-weight-template.hbs +++ b/.maintain/frame-weight-template.hbs @@ -1,24 +1,25 @@ -// This file is part of Substrate. - -// Copyright (C) 2020 Parity Technologies (UK) Ltd. -// SPDX-License-Identifier: Apache-2.0 - -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// This file is part of Darwinia. +// +// Copyright (C) 2018-2021 Darwinia Network +// SPDX-License-Identifier: GPL-3.0 // -// http://www.apache.org/licenses/LICENSE-2.0 +// Darwinia 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. // -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// Darwinia 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 Darwinia. If not, see . //! 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}} +//! 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: @@ -26,6 +27,7 @@ // {{arg}} {{/each}} +#![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] @@ -34,69 +36,80 @@ 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 SubstrateWeight(PhantomData); +{{~#if (eq pallet "frame_system")}} +impl WeightInfo for SubstrateWeight { +{{~else}} impl WeightInfo for SubstrateWeight { - {{#each benchmarks as |benchmark| ~}} +{{~/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 { ({{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}} } // For backwards compatibility and tests impl WeightInfo for () { - {{#each benchmarks as |benchmark| ~}} + {{~#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 { ({{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}} } diff --git a/Cargo.lock b/Cargo.lock index 25fff32ec2..78b4f4e3fc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -23,11 +23,11 @@ dependencies = [ [[package]] name = "addr2line" -version = "0.16.0" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e61f2b7f93d2c7d2b08263acaa4a363b3e276806c68af6134c44f523bf1aacd" +checksum = "b9ecd88a8c8378ca913a680cd98f0f13ac67383d35993f86c90a70e3f137816b" dependencies = [ - "gimli 0.25.0", + "gimli 0.26.1", ] [[package]] @@ -71,12 +71,6 @@ dependencies = [ "subtle 2.4.1", ] -[[package]] -name = "ahash" -version = "0.4.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "739f4a8db6605981345c5654f3a85b056ce52f37a39d34da03f25bf2151ea16e" - [[package]] name = "ahash" version = "0.7.6" @@ -97,15 +91,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" @@ -117,9 +102,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.44" +version = "1.0.51" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61604a8f862e1d5c3229fdd78f8b02c68dcf73a4c4b05fd636d12240aaa242c1" +checksum = "8b26702f315f53b6071259e15dd9d64528213b44d61de1ec926eca7715d62203" [[package]] name = "approx" @@ -132,9 +117,9 @@ dependencies = [ [[package]] name = "array-bytes" -version = "1.4.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8fb297b55a15d4b1ca38e1d8f6f0063d318e60981560298a503e5ae3ebed20c" +checksum = "9ad284aeb45c13f2fb4f084de4a420ebf447423bdf9386c0540ce33cb3ef4b8c" dependencies = [ "serde", ] @@ -162,9 +147,9 @@ checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" [[package]] name = "arrayvec" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be4dc07131ffa69b8072d35f5007352af944213cde02545e2103680baed38fcd" +checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6" [[package]] name = "asn1_der" @@ -258,9 +243,9 @@ dependencies = [ [[package]] name = "async-process" -version = "1.2.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b21b63ab5a0db0369deb913540af2892750e42d949faacc7a61495ac418a1692" +checksum = "83137067e3a2a6a06d67168e49e68a0957d215410473a740cea95a2425c0b7c6" dependencies = [ "async-io", "blocking", @@ -360,9 +345,9 @@ dependencies = [ [[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", ] @@ -392,19 +377,32 @@ checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" [[package]] name = "backtrace" -version = "0.3.62" +version = "0.3.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "091bcdf2da9950f96aa522681ce805e6857f6ca8df73833d35736ab2dc78e152" +checksum = "321629d8ba6513061f26707241fa9bc89524ff1cd7a915a97ef0c62c666ce1b6" dependencies = [ - "addr2line 0.16.0", + "addr2line 0.17.0", "cc", "cfg-if 1.0.0", "libc", "miniz_oxide", - "object 0.27.0", + "object 0.27.1", "rustc-demangle", ] +[[package]] +name = "bae" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33b8de67cc41132507eeece2584804efcb15f85ba516e34c944b7667f480397a" +dependencies = [ + "heck", + "proc-macro-error", + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "base-x" version = "0.2.8" @@ -449,9 +447,9 @@ dependencies = [ [[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", @@ -472,18 +470,6 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" -[[package]] -name = "bitvec" -version = "0.19.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8942c8d352ae1838c9dda0b0ca2ab657696ef2232a20147cf1b30ae1a9cb4321" -dependencies = [ - "funty", - "radium 0.5.3", - "tap", - "wyz", -] - [[package]] name = "bitvec" version = "0.20.4" @@ -491,7 +477,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7774144344a4faa177370406a7ff5f1da24303817368584c6206c8303eb07848" dependencies = [ "funty", - "radium 0.6.2", + "radium", "tap", "wyz", ] @@ -593,9 +579,9 @@ checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" [[package]] name = "blocking" -version = "1.0.2" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5e170dbede1f740736619b776d7251cb1b9095c435c34d8ca9f57fcd2f335e9" +checksum = "046e47d4b2d391b1f6f8b407b1deb8dee56c1852ccd868becf2710f601b5f427" dependencies = [ "async-channel", "async-task", @@ -608,7 +594,7 @@ dependencies = [ [[package]] name = "bp-header-chain" version = "0.1.0" -source = "git+https://github.com/darwinia-network/parity-bridges-common?tag=darwinia-v0.11.6-4#495a773403e5827bbf9d7b20d97333f673628db9" +source = "git+https://github.com/darwinia-network/parity-bridges-common?branch=darwinia-v0.11.7#f747b99e7a3857a7d438f9aa180d064ff50c570d" dependencies = [ "finality-grandpa", "frame-support", @@ -623,7 +609,7 @@ dependencies = [ [[package]] name = "bp-message-dispatch" version = "0.1.0" -source = "git+https://github.com/darwinia-network/parity-bridges-common?tag=darwinia-v0.11.6-4#495a773403e5827bbf9d7b20d97333f673628db9" +source = "git+https://github.com/darwinia-network/parity-bridges-common?branch=darwinia-v0.11.7#f747b99e7a3857a7d438f9aa180d064ff50c570d" dependencies = [ "bp-runtime", "frame-support", @@ -634,9 +620,9 @@ dependencies = [ [[package]] name = "bp-messages" version = "0.1.0" -source = "git+https://github.com/darwinia-network/parity-bridges-common?tag=darwinia-v0.11.6-4#495a773403e5827bbf9d7b20d97333f673628db9" +source = "git+https://github.com/darwinia-network/parity-bridges-common?branch=darwinia-v0.11.7#f747b99e7a3857a7d438f9aa180d064ff50c570d" dependencies = [ - "bitvec 0.20.4", + "bitvec", "bp-runtime", "frame-support", "frame-system", @@ -649,7 +635,7 @@ dependencies = [ [[package]] name = "bp-runtime" version = "0.1.0" -source = "git+https://github.com/darwinia-network/parity-bridges-common?tag=darwinia-v0.11.6-4#495a773403e5827bbf9d7b20d97333f673628db9" +source = "git+https://github.com/darwinia-network/parity-bridges-common?branch=darwinia-v0.11.7#f747b99e7a3857a7d438f9aa180d064ff50c570d" dependencies = [ "frame-support", "hash-db", @@ -666,7 +652,7 @@ dependencies = [ [[package]] name = "bp-test-utils" version = "0.1.0" -source = "git+https://github.com/darwinia-network/parity-bridges-common?tag=darwinia-v0.11.6-4#495a773403e5827bbf9d7b20d97333f673628db9" +source = "git+https://github.com/darwinia-network/parity-bridges-common?branch=darwinia-v0.11.7#f747b99e7a3857a7d438f9aa180d064ff50c570d" dependencies = [ "bp-header-chain", "ed25519-dalek", @@ -681,7 +667,7 @@ dependencies = [ [[package]] name = "bridge-runtime-common" version = "0.1.0" -source = "git+https://github.com/darwinia-network/parity-bridges-common?tag=darwinia-v0.11.6-4#495a773403e5827bbf9d7b20d97333f673628db9" +source = "git+https://github.com/darwinia-network/parity-bridges-common?branch=darwinia-v0.11.7#f747b99e7a3857a7d438f9aa180d064ff50c570d" dependencies = [ "bp-message-dispatch", "bp-messages", @@ -842,18 +828,18 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.71" +version = "1.0.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79c2681d6594606957bbb8631c4b90a7fcaaa72cdb714743a437b156d6a7eedd" +checksum = "22a9137b95ea06864e018375b72adfb7db6e6f68cfc8df5a04d00288050485ee" 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", ] @@ -947,22 +933,22 @@ dependencies = [ [[package]] name = "clang-sys" -version = "1.2.2" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10612c0ec0e0a1ff0e97980647cb058a6e7aedb913d01d009c406b8b7d0b26ee" +checksum = "fa66045b9cb23c2e9c1520732030608b02ee07e5cfaa5a521ec15ded7fa24c90" dependencies = [ "glob", "libc", - "libloading 0.7.1", + "libloading 0.7.2", ] [[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", @@ -989,7 +975,6 @@ dependencies = [ "drml-common-primitives", "frame-support", "frame-system", - "max-encoded-len", "pallet-authorship", "pallet-transaction-payment", "pallet-treasury", @@ -1054,9 +1039,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", ] @@ -1166,9 +1151,9 @@ dependencies = [ [[package]] name = "crc32fast" -version = "1.2.1" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81156fece84ab6a9f2afdb109ce3ae577e42b1228441eded99bd77f627953b1a" +checksum = "738c290dfaea84fc1ca15ad9c168d083b05a714e1efddd8edaab678dc28d2836" dependencies = [ "cfg-if 1.0.0", ] @@ -1265,7 +1250,7 @@ dependencies = [ "cfg-if 1.0.0", "crossbeam-utils 0.8.5", "lazy_static", - "memoffset 0.6.4", + "memoffset 0.6.5", "scopeguard", ] @@ -1433,7 +1418,6 @@ dependencies = [ "frame-support", "frame-system", "log", - "max-encoded-len", "pallet-transaction-payment", "parity-scale-codec", "sp-core", @@ -1499,7 +1483,6 @@ dependencies = [ "ethereum-types", "frame-support", "frame-system", - "max-encoded-len", "parity-scale-codec", "rlp", "serde", @@ -1521,7 +1504,6 @@ dependencies = [ "frame-system", "libsecp256k1 0.3.5", "log", - "max-encoded-len", "parity-scale-codec", "serde", "serde_json", @@ -1540,7 +1522,6 @@ dependencies = [ "frame-support", "frame-system", "hex-literal", - "max-encoded-len", "pallet-scheduler", "parity-scale-codec", "serde", @@ -1562,7 +1543,6 @@ dependencies = [ "frame-system", "hex-literal", "log", - "max-encoded-len", "parity-scale-codec", "sp-core", "sp-io", @@ -1587,7 +1567,6 @@ dependencies = [ "frame-support", "frame-system", "log", - "max-encoded-len", "pallet-timestamp", "parity-scale-codec", "primitive-types", @@ -1777,7 +1756,7 @@ dependencies = [ name = "darwinia-fee-market" version = "2.7.0" dependencies = [ - "bitvec 0.20.4", + "bitvec", "bp-messages", "bp-runtime", "darwinia-balances", @@ -1787,7 +1766,6 @@ dependencies = [ "frame-support", "frame-system", "log", - "max-encoded-len", "num-traits", "pallet-bridge-messages", "pallet-timestamp", @@ -1884,7 +1862,6 @@ dependencies = [ "frame-support", "frame-system", "log", - "max-encoded-len", "parity-scale-codec", "sp-core", "sp-io", @@ -1910,11 +1887,10 @@ dependencies = [ "darwinia-balances", "darwinia-relay-primitives", "darwinia-support", - "env_logger 0.8.4", + "env_logger 0.9.0", "frame-support", "frame-system", "log", - "max-encoded-len", "parity-scale-codec", "rand 0.8.4", "serde", @@ -1935,7 +1911,6 @@ dependencies = [ "frame-election-provider-support", "frame-support", "frame-system", - "max-encoded-len", "pallet-authorship", "pallet-session", "pallet-timestamp", @@ -1991,7 +1966,6 @@ dependencies = [ "frame-support", "frame-system", "impl-trait-for-tuples", - "max-encoded-len", "num-traits", "parity-scale-codec", "sha3 0.9.1", @@ -2010,7 +1984,6 @@ dependencies = [ "frame-support", "frame-system", "hex-literal", - "max-encoded-len", "parity-scale-codec", "sp-core", "sp-io", @@ -2052,7 +2025,7 @@ dependencies = [ "dp-storage", "dvm-ethereum", "kvdb", - "kvdb-rocksdb", + "kvdb-rocksdb 0.14.0", "parity-scale-codec", "parking_lot 0.11.2", "sp-core", @@ -2067,7 +2040,7 @@ dependencies = [ "dc-db", "dp-consensus", "dvm-rpc-runtime-api", - "futures 0.3.17", + "futures 0.3.18", "futures-timer 3.0.2", "log", "sc-client-api", @@ -2091,7 +2064,7 @@ dependencies = [ "ethereum", "ethereum-types", "evm", - "futures 0.3.17", + "futures 0.3.18", "jsonrpc-core", "jsonrpc-core-client", "jsonrpc-derive", @@ -2099,31 +2072,31 @@ dependencies = [ "libsecp256k1 0.3.5", "log", "parity-scale-codec", - "rand 0.7.3", + "rand 0.8.4", "rlp", "sc-client-api", "sc-network", "sc-rpc", "sc-service", + "sc-transaction-pool-api", "sha3 0.9.1", "sp-api", "sp-blockchain", "sp-io", "sp-runtime", "sp-storage", - "sp-transaction-pool", ] [[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", ] @@ -2351,7 +2324,7 @@ dependencies = [ "drml-common-primitives", "dvm-ethereum", "dvm-rpc-runtime-api", - "futures 0.3.17", + "futures 0.3.18", "jsonrpc-core", "jsonrpc-pubsub", "pallet-transaction-payment-rpc", @@ -2367,13 +2340,13 @@ dependencies = [ "sc-network", "sc-rpc", "sc-sync-state-rpc", + "sc-transaction-pool-api", "sp-api", "sp-block-builder", "sp-blockchain", "sp-consensus", "sp-keystore", "sp-runtime", - "sp-transaction-pool", "substrate-frame-rpc-system", "template-runtime", ] @@ -2401,7 +2374,7 @@ dependencies = [ "dvm-rpc-runtime-api", "frame-benchmarking", "frame-system-rpc-runtime-api", - "futures 0.3.17", + "futures 0.3.18", "log", "pallet-im-online", "pallet-transaction-payment-rpc-runtime-api", @@ -2411,6 +2384,7 @@ dependencies = [ "rand 0.8.4", "sc-authority-discovery", "sc-basic-authorship", + "sc-chain-spec", "sc-client-api", "sc-consensus", "sc-consensus-aura", @@ -2420,12 +2394,13 @@ dependencies = [ "sc-consensus-uncles", "sc-executor", "sc-finality-grandpa", - "sc-finality-grandpa-warp-sync", "sc-keystore", "sc-network", "sc-service", + "sc-sync-state-rpc", "sc-telemetry", "sc-transaction-pool", + "serde", "serde_json", "sp-api", "sp-authority-discovery", @@ -2486,7 +2461,6 @@ dependencies = [ "frame-system", "libsecp256k1 0.5.0", "log", - "max-encoded-len", "pallet-timestamp", "parity-scale-codec", "rlp", @@ -2563,9 +2537,9 @@ checksum = "ee2626afccd7561a06cf1367e2950c4718ea04565e20fb5029b6c7d8ad09abcf" [[package]] name = "ed25519" -version = "1.2.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4620d40f6d2601794401d6dd95a5cf69b6c157852539470eeda433a99b3c0efc" +checksum = "74e1069e39f1454367eb2de793ed062fac4c35c2934b76a81d90dd9abcd28816" dependencies = [ "signature", ] @@ -2648,6 +2622,19 @@ dependencies = [ "termcolor", ] +[[package]] +name = "env_logger" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b2cf0344971ee6c64c31be0d530793fba457d322dfec2810c453d0ef228f9c3" +dependencies = [ + "atty", + "humantime 2.1.0", + "log", + "regex", + "termcolor", +] + [[package]] name = "environmental" version = "1.1.3" @@ -2665,9 +2652,9 @@ dependencies = [ [[package]] name = "errno" -version = "0.2.7" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa68f2fb9cae9d37c9b2b3584aba698a2e97f72d7aef7b9f7aa71d8b54ce46fe" +checksum = "f639046355ee4f37944e44f60642c6f3a7efa3cf6b78c78a0d989a8ce6c396a1" dependencies = [ "errno-dragonfly", "libc", @@ -2686,8 +2673,9 @@ dependencies = [ [[package]] name = "ethabi" -version = "13.0.0" -source = "git+https://github.com/darwinia-network/ethabi?tag=v13.0.0-no-std#baacf174d5c2f12122c4ee3fe31506fb52069983" +version = "15.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f76ef192b63e8a44b3d08832acebbb984c3fba154b5c26f70037c860202a0d4b" dependencies = [ "anyhow", "ethereum-types", @@ -2701,8 +2689,8 @@ dependencies = [ [[package]] name = "ethash" -version = "0.4.0" -source = "git+https://github.com/darwinia-network/rust-ethash?tag=v0.4.0#e5d6d4c490ac710d793db4f8c1c1bdbb2bfbb164" +version = "0.4.2" +source = "git+https://github.com/darwinia-network/rust-ethash?tag=v0.4.2#ee07a503226adfb889e2ead5ac38656a7698c728" dependencies = [ "byteorder", "ethereum-types", @@ -2727,12 +2715,12 @@ dependencies = [ [[package]] name = "ethereum" -version = "0.7.1" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "567ce064a8232c16e2b2c2173a936b91fbe35c2f2c5278871f5a1a31688b42e9" +checksum = "4a67be3eaf296ef668733f54c637e84d0ca34eaf194f0077455135981ad464c3" dependencies = [ + "bytes 1.1.0", "ethereum-types", - "funty", "hash-db", "hash256-std-hasher", "parity-scale-codec", @@ -2766,9 +2754,9 @@ dependencies = [ [[package]] name = "ethereum-types" -version = "0.11.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f64b5df66a228d85e4b17e5d6c6aa43b0310898ffe8a85988c4c032357aaabfd" +checksum = "05136f7057fe789f06e6d41d07b34e6f70d8c86e5693b60f97aaa6553553bdaf" dependencies = [ "ethbloom", "fixed-hash", @@ -2776,6 +2764,7 @@ dependencies = [ "impl-rlp", "impl-serde", "primitive-types", + "scale-info", "uint", ] @@ -2787,9 +2776,9 @@ checksum = "f7531096570974c3a9dcf9e4b8e1cede1ec26cf5046219fb3b9d897503b9be59" [[package]] name = "evm" -version = "0.27.0" +version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f833b0e642bec8286b80f00ad6cc6a95e50210c77949b9cb484637e6a05ed596" +checksum = "3144301c57a81101003055c7cab61b58e68060f3bd1c54aa419f663e4f0e6347" dependencies = [ "environmental", "ethereum", @@ -2806,9 +2795,9 @@ dependencies = [ [[package]] name = "evm-core" -version = "0.27.1" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "908739da31125d17a69533c290a6c818b494176e59a2ce8accbf122f7d76835c" +checksum = "a7bfa2dae9a2c6c0172d83c37eb406bfabf6a9d1af17b7ab4958e89853ddae97" dependencies = [ "funty", "parity-scale-codec", @@ -2818,9 +2807,9 @@ dependencies = [ [[package]] name = "evm-gasometer" -version = "0.27.0" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4118f952ce320c11e1b7b8a575e477d70bc86a3b92ea23e427174d979cf1da26" +checksum = "14d5b12117cb9a5a9b9f031296ea86416da2cd9d8c9a9e3a2fa10275ae55f3ea" dependencies = [ "environmental", "evm-core", @@ -2830,9 +2819,9 @@ dependencies = [ [[package]] name = "evm-runtime" -version = "0.27.0" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "952296b416c3b334b26933ad1f9cfa9203e251691586fb317e411872886ca31b" +checksum = "3921ac8964cf13d12693392fef6686ef94470328ccd8eea384c6ff9ac0125b01" dependencies = [ "environmental", "evm-core", @@ -2846,7 +2835,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.18", ] [[package]] @@ -2918,7 +2907,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e8ac3ff5224ef91f3c97e03eb1de2db82743427e91aaa5ac635f454f0b164f5a" dependencies = [ "either", - "futures 0.3.17", + "futures 0.3.18", "futures-timer 3.0.2", "log", "num-traits", @@ -2967,7 +2956,7 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "fork-tree" version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "parity-scale-codec", ] @@ -2984,8 +2973,8 @@ dependencies = [ [[package]] name = "frame-benchmarking" -version = "3.1.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "frame-support", "frame-system", @@ -3003,13 +2992,16 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" -version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "Inflector", "chrono", "frame-benchmarking", + "frame-support", "handlebars", + "linked-hash-map", + "log", "parity-scale-codec", "sc-cli", "sc-client-db", @@ -3026,8 +3018,8 @@ dependencies = [ [[package]] name = "frame-election-provider-support" -version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "frame-support", "frame-system", @@ -3039,8 +3031,8 @@ dependencies = [ [[package]] name = "frame-executive" -version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "frame-support", "frame-system", @@ -3054,8 +3046,8 @@ dependencies = [ [[package]] name = "frame-metadata" -version = "13.0.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "14.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "parity-scale-codec", "serde", @@ -3065,15 +3057,14 @@ dependencies = [ [[package]] name = "frame-support" -version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "bitflags", "frame-metadata", "frame-support-procedural", "impl-trait-for-tuples", "log", - "max-encoded-len", "once_cell", "parity-scale-codec", "paste", @@ -3092,8 +3083,8 @@ dependencies = [ [[package]] name = "frame-support-procedural" -version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "Inflector", "frame-support-procedural-tools", @@ -3104,8 +3095,8 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" -version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate 1.1.0", @@ -3117,7 +3108,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "proc-macro2", "quote", @@ -3126,8 +3117,8 @@ dependencies = [ [[package]] name = "frame-system" -version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "frame-support", "impl-trait-for-tuples", @@ -3143,8 +3134,8 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" -version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "frame-benchmarking", "frame-support", @@ -3157,8 +3148,8 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" -version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "parity-scale-codec", "sp-api", @@ -3166,8 +3157,8 @@ dependencies = [ [[package]] name = "frame-try-runtime" -version = "0.9.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "0.10.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "frame-support", "parity-scale-codec", @@ -3224,7 +3215,6 @@ dependencies = [ "frame-system", "libsecp256k1 0.5.0", "log", - "max-encoded-len", "pallet-timestamp", "parity-scale-codec", "rlp", @@ -3294,9 +3284,9 @@ checksum = "3a471a38ef8ed83cd6e40aa59c1ffe17db6855c18e3604d9c4ed8c08ebc28678" [[package]] name = "futures" -version = "0.3.17" +version = "0.3.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a12aa0eb539080d55c3f2d45a67c3b58b6b0773c1a3ca2dfec66d58c97fd66ca" +checksum = "8cd0210d8c325c245ff06fd95a3b13689a1a276ac8cfa8e8720cb840bfb84b9e" dependencies = [ "futures-channel", "futures-core", @@ -3309,9 +3299,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.17" +version = "0.3.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5da6ba8c3bb3c165d3c7319fc1cc8304facf1fb8db99c5de877183c08a273888" +checksum = "7fc8cd39e3dbf865f7340dce6a2d401d24fd37c6fe6c4f0ee0de8bfca2252d27" dependencies = [ "futures-core", "futures-sink", @@ -3319,9 +3309,9 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.17" +version = "0.3.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88d1c26957f23603395cd326b0ffe64124b818f4449552f960d815cfba83a53d" +checksum = "629316e42fe7c2a0b9a65b47d159ceaa5453ab14e8f0a3c5eedbb8cd55b4a445" [[package]] name = "futures-cpupool" @@ -3335,9 +3325,9 @@ dependencies = [ [[package]] name = "futures-executor" -version = "0.3.17" +version = "0.3.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45025be030969d763025784f7f355043dc6bc74093e4ecc5000ca4dc50d8745c" +checksum = "7b808bf53348a36cab739d7e04755909b9fcaaa69b7d7e588b37b6ec62704c97" dependencies = [ "futures-core", "futures-task", @@ -3347,9 +3337,9 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.17" +version = "0.3.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "522de2a0fe3e380f1bc577ba0474108faf3f6b18321dbf60b3b9c39a75073377" +checksum = "e481354db6b5c353246ccf6a728b0c5511d752c08da7260546fc0933869daa11" [[package]] name = "futures-lite" @@ -3368,12 +3358,10 @@ dependencies = [ [[package]] name = "futures-macro" -version = "0.3.17" +version = "0.3.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18e4a4b95cea4b4ccbcf1c5675ca7c4ee4e9e75eb79944d07defde18068f79bb" +checksum = "a89f17b21645bc4ed773c69af9c9a0effd4a3f1a3876eadd453469f8854e7fdd" dependencies = [ - "autocfg", - "proc-macro-hack", "proc-macro2", "quote", "syn", @@ -3392,15 +3380,15 @@ dependencies = [ [[package]] name = "futures-sink" -version = "0.3.17" +version = "0.3.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36ea153c13024fe480590b3e3d4cad89a0cfacecc24577b68f86c6ced9c2bc11" +checksum = "996c6442437b62d21a32cd9906f9c41e7dc1e19a9579843fad948696769305af" [[package]] name = "futures-task" -version = "0.3.17" +version = "0.3.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d3d00f4eddb73e498a54394f228cd55853bdf059259e8e7bc6e69d408892e99" +checksum = "dabf1872aaab32c886832f2276d2f5399887e2bd613698a02359e4ea83f8de12" [[package]] name = "futures-timer" @@ -3416,11 +3404,10 @@ checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c" [[package]] name = "futures-util" -version = "0.3.17" +version = "0.3.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36568465210a3a6ee45e1f165136d68671471a501e632e9a98d96872222b5481" +checksum = "41d22213122356472061ac0f1ab2cee28d2bac8491410fd68c2af53d1cedb83e" dependencies = [ - "autocfg", "futures 0.1.31", "futures-channel", "futures-core", @@ -3431,8 +3418,6 @@ dependencies = [ "memchr", "pin-project-lite 0.2.7", "pin-utils", - "proc-macro-hack", - "proc-macro-nested", "slab", ] @@ -3442,7 +3427,7 @@ version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ffdf9f34f1447443d37393cc6c2b8313aebddcd96906caf34e54c68d8e57d7bd" dependencies = [ - "typenum", + "typenum 1.14.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -3451,7 +3436,7 @@ version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "501466ecc8a30d1d3b7fc9229b122b2ce8ed6e9d9223f1138d4babb253e51817" dependencies = [ - "typenum", + "typenum 1.14.0 (registry+https://github.com/rust-lang/crates.io-index)", "version_check", ] @@ -3502,9 +3487,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.25.0" +version = "0.26.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0a01e0497841a3b2db4f8afa483cce65f7e96a3498bd6c541734792aeac8fe7" +checksum = "78cc372d058dcf6d5ecd98510e7fbc9e5aec4d21de70f65fea8fecebcd881bd4" [[package]] name = "glob" @@ -3527,9 +3512,9 @@ dependencies = [ [[package]] name = "gloo-timers" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47204a46aaff920a1ea58b11d03dec6f704287d27561724a4631e450654a891f" +checksum = "6f16c88aa13d2656ef20d1c042086b8767bbe2bdb62526894275a1b062161b2e" dependencies = [ "futures-channel", "futures-core", @@ -3578,9 +3563,9 @@ dependencies = [ [[package]] name = "half" -version = "1.8.0" +version = "1.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac5956d4e63858efaec57e0d6c1c2f6a41e1487f830314a324ccd7e2223a7ca0" +checksum = "eabb4a44450da02c90444cf74558da904edde8fb4e9035a9a6a4e15445af0bd7" [[package]] name = "handlebars" @@ -3611,22 +3596,13 @@ dependencies = [ "crunchy", ] -[[package]] -name = "hashbrown" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7afe4a420e3fe79967a00898cc1f4db7c8a49a9333a29f8a4bd76a253d5cd04" -dependencies = [ - "ahash 0.4.7", -] - [[package]] name = "hashbrown" version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" dependencies = [ - "ahash 0.7.6", + "ahash", ] [[package]] @@ -3655,9 +3631,9 @@ checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "hex-literal" -version = "0.3.3" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21e4590e13640f19f249fe3e4eca5113bc4289f2497710378190e7f4bd96f45b" +checksum = "7ebdb29d2ea9ed0083cd8cece49bbd968021bd99b0849edb4a9a7ee0fdf6a4e0" [[package]] name = "hex_fmt" @@ -3774,9 +3750,9 @@ dependencies = [ [[package]] name = "http-body" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "399c583b2979440c60be0821a6199eca73bc3c8dcd9d070d75ac726e2c6186e5" +checksum = "1ff4f84919677303da5f147645dbea6b1881f368d03ac84e1dc09031ebd7b2c6" dependencies = [ "bytes 1.1.0", "http 0.2.5", @@ -3797,9 +3773,9 @@ checksum = "494b4d60369511e7dea41cf646832512a94e542f68bb9c49e54518e0f468eb47" [[package]] name = "httpdate" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6456b8a6c8f33fee7d958fcd1b60d55b11940a79e63ae87013e6d22e26034440" +checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" [[package]] name = "humantime" @@ -3872,21 +3848,21 @@ dependencies = [ [[package]] name = "hyper" -version = "0.14.13" +version = "0.14.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15d1cfb9e4f68655fa04c01f59edb405b6074a0f7118ea881e5026e4a1cd8593" +checksum = "436ec0091e4f20e655156a30a0df3770fe2900aa301e548e08446ec794b6953c" dependencies = [ "bytes 1.1.0", "futures-channel", "futures-core", "futures-util", "http 0.2.5", - "http-body 0.4.3", + "http-body 0.4.4", "httparse", - "httpdate 1.0.1", + "httpdate 1.0.2", "itoa", "pin-project-lite 0.2.7", - "tokio 1.12.0", + "tokio 1.14.0", "tower-service", "tracing", "want 0.3.0", @@ -3934,9 +3910,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", @@ -3960,7 +3936,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ae8ab7f67bad3240049cb24fb9cb0b4c2c6af4c245840917fbbdededeee91179" dependencies = [ "async-io", - "futures 0.3.17", + "futures 0.3.18", "futures-lite", "if-addrs", "ipnet", @@ -3989,9 +3965,9 @@ 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", ] @@ -4014,7 +3990,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bc633605454125dec4b66843673f01c7df2b89479b32e0ed634e43a91cff62a5" dependencies = [ "autocfg", - "hashbrown 0.11.2", + "hashbrown", "serde", ] @@ -4042,7 +4018,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "64fa110ec7b8f493f416eed552740d10e7030ad5f63b2308f82c9608ec2df275" dependencies = [ - "futures 0.3.17", + "futures 0.3.18", "futures-timer 2.0.2", ] @@ -4245,11 +4221,12 @@ dependencies = [ [[package]] name = "jsonrpsee-proc-macros" -version = "0.2.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b4c85cfa6767333f3e5f3b2f2f765dad2727b0033ee270ae07c599bf43ed5ae" +checksum = "8edb341d35279b59c79d7fe9e060a51aec29d45af99cc7c72ea7caa350fa71a4" dependencies = [ "Inflector", + "bae", "proc-macro-crate 1.1.0", "proc-macro2", "quote", @@ -4258,31 +4235,31 @@ dependencies = [ [[package]] name = "jsonrpsee-types" -version = "0.2.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0cf7bd4e93b3b56e59131de7f24afbea871faf914e97bcdd942c86927ab0172" +checksum = "4cc738fd55b676ada3271ef7c383a14a0867a2a88b0fa941311bf5fc0a29d498" dependencies = [ "async-trait", "beef", "futures-channel", "futures-util", - "hyper 0.14.13", + "hyper 0.14.15", "log", "serde", "serde_json", - "soketto 0.5.0", + "soketto 0.6.0", "thiserror", ] [[package]] name = "jsonrpsee-ws-client" -version = "0.2.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ec51150965544e1a4468f372bdab8545243a1b045d4ab272023aac74c60de32" +checksum = "9841352dbecf4c2ed5dc71698df9f1660262ae4e0b610e968602529bdbcf7b30" dependencies = [ "async-trait", "fnv", - "futures 0.3.17", + "futures 0.3.18", "jsonrpsee-types", "log", "pin-project 1.0.8", @@ -4290,7 +4267,7 @@ dependencies = [ "rustls-native-certs 0.5.0", "serde", "serde_json", - "soketto 0.5.0", + "soketto 0.6.0", "thiserror", "tokio 0.2.25", "tokio-rustls 0.15.0", @@ -4306,9 +4283,9 @@ checksum = "67c21572b4949434e4fc1e1978b99c5f77064153c59d998bf13ecd96fb5ecba7" [[package]] name = "keccak-hash" -version = "0.7.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae0386ec98c26dd721aaa3412bf3a817156ff3ee7cb6959503f8d1095f4ccc51" +checksum = "ce2bd4c29270e724d3eaadf7bdc8700af4221fc0ed771b855eadcd1b98d52851" dependencies = [ "primitive-types", "tiny-keccak", @@ -4346,9 +4323,9 @@ dependencies = [ [[package]] name = "kvdb" -version = "0.9.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8891bd853eff90e33024195d79d578dc984c82f9e0715fcd2b525a0c19d52811" +checksum = "45a3f58dc069ec0e205a27f5b45920722a46faed802a0541538241af6228f512" dependencies = [ "parity-util-mem", "smallvec 1.7.0", @@ -4356,9 +4333,9 @@ dependencies = [ [[package]] name = "kvdb-memorydb" -version = "0.9.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30a0da8e08caf08d384a620ec19bb6c9b85c84137248e202617fb91881f25912" +checksum = "c3b6b85fc643f5acd0bffb2cc8a6d150209379267af0d41db72170021841f9f5" dependencies = [ "kvdb", "parity-util-mem", @@ -4367,9 +4344,27 @@ dependencies = [ [[package]] name = "kvdb-rocksdb" -version = "0.11.1" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d169dbb316aa0fa185d02d847c047f1aa20e292cf1563d790c13536a2a732c8" +dependencies = [ + "fs-swap", + "kvdb", + "log", + "num_cpus", + "owning_ref", + "parity-util-mem", + "parking_lot 0.11.2", + "regex", + "rocksdb", + "smallvec 1.7.0", +] + +[[package]] +name = "kvdb-rocksdb" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94b27cdb788bf1c8ade782289f9dbee626940be2961fd75c7cde993fa2f1ded1" +checksum = "9b1b6ea8f2536f504b645ad78419c8246550e19d2c3419a167080ce08edee35a" dependencies = [ "fs-swap", "kvdb", @@ -4398,17 +4393,11 @@ version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" -[[package]] -name = "leb128" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" - [[package]] name = "libc" -version = "0.2.104" +version = "0.2.109" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b2f96d100e1cf1929e7719b7edb3b90ab5298072638fccd77be9ce942ecdfce" +checksum = "f98a04dce437184842841303488f70d0188c5f51437d2a834dc097eafa909a01" [[package]] name = "libloading" @@ -4422,9 +4411,9 @@ dependencies = [ [[package]] name = "libloading" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0cf036d15402bea3c5d4de17b3fce76b3e4a56ebc1f577be0e7a72f7c607cf0" +checksum = "afe203d669ec979b7128619bae5a63b7b42e9203c1b29146079ee05e2f604b52" dependencies = [ "cfg-if 1.0.0", "winapi 0.3.9", @@ -4444,7 +4433,7 @@ checksum = "08053fbef67cd777049ef7a95ebaca2ece370b4ed7712c3fa404d69a88cb741b" dependencies = [ "atomic", "bytes 1.1.0", - "futures 0.3.17", + "futures 0.3.18", "lazy_static", "libp2p-core", "libp2p-deflate", @@ -4486,7 +4475,7 @@ dependencies = [ "ed25519-dalek", "either", "fnv", - "futures 0.3.17", + "futures 0.3.18", "futures-timer 3.0.2", "lazy_static", "libsecp256k1 0.3.5", @@ -4504,7 +4493,7 @@ dependencies = [ "sha2 0.9.8", "smallvec 1.7.0", "thiserror", - "unsigned-varint 0.7.0", + "unsigned-varint 0.7.1", "void", "zeroize", ] @@ -4516,7 +4505,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2181a641cd15f9b6ba71b1335800f309012a0a97a29ffaabbbf40e9d3d58f08" dependencies = [ "flate2", - "futures 0.3.17", + "futures 0.3.18", "libp2p-core", ] @@ -4527,7 +4516,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "62e63dab8b5ff35e0c101a3e51e843ba782c07bbb1682f5fd827622e0d02b98b" dependencies = [ "async-std-resolver", - "futures 0.3.17", + "futures 0.3.18", "libp2p-core", "log", "smallvec 1.7.0", @@ -4542,7 +4531,7 @@ checksum = "48a9b570f6766301d9c4aa00fce3554cad1598e2f466debbc4dde909028417cf" dependencies = [ "cuckoofilter", "fnv", - "futures 0.3.17", + "futures 0.3.18", "libp2p-core", "libp2p-swarm", "log", @@ -4563,7 +4552,7 @@ dependencies = [ "byteorder", "bytes 1.1.0", "fnv", - "futures 0.3.17", + "futures 0.3.18", "hex_fmt", "libp2p-core", "libp2p-swarm", @@ -4574,7 +4563,7 @@ dependencies = [ "regex", "sha2 0.9.8", "smallvec 1.7.0", - "unsigned-varint 0.7.0", + "unsigned-varint 0.7.1", "wasm-timer", ] @@ -4584,7 +4573,7 @@ version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f668f00efd9883e8b7bcc582eaf0164615792608f886f6577da18bcbeea0a46" dependencies = [ - "futures 0.3.17", + "futures 0.3.18", "libp2p-core", "libp2p-swarm", "log", @@ -4605,7 +4594,7 @@ dependencies = [ "bytes 1.1.0", "either", "fnv", - "futures 0.3.17", + "futures 0.3.18", "libp2p-core", "libp2p-swarm", "log", @@ -4615,7 +4604,7 @@ dependencies = [ "sha2 0.9.8", "smallvec 1.7.0", "uint", - "unsigned-varint 0.7.0", + "unsigned-varint 0.7.1", "void", "wasm-timer", ] @@ -4629,7 +4618,7 @@ dependencies = [ "async-io", "data-encoding", "dns-parser", - "futures 0.3.17", + "futures 0.3.18", "if-watch", "lazy_static", "libp2p-core", @@ -4649,14 +4638,14 @@ checksum = "85e9b544335d1ed30af71daa96edbefadef6f19c7a55f078b9fc92c87163105d" dependencies = [ "asynchronous-codec 0.6.0", "bytes 1.1.0", - "futures 0.3.17", + "futures 0.3.18", "libp2p-core", "log", "nohash-hasher", "parking_lot 0.11.2", "rand 0.7.3", "smallvec 1.7.0", - "unsigned-varint 0.7.0", + "unsigned-varint 0.7.1", ] [[package]] @@ -4667,7 +4656,7 @@ checksum = "73ab46d3de1b6e70a794ad48d6e05c29b4f00d3a467639b16772ea20421c862d" dependencies = [ "bytes 1.1.0", "curve25519-dalek 3.2.0", - "futures 0.3.17", + "futures 0.3.18", "lazy_static", "libp2p-core", "log", @@ -4687,7 +4676,7 @@ version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bf4bfaffac63bf3c7ec11ed9d8879d455966ddea7e78ee14737f0b6dce0d1cd1" dependencies = [ - "futures 0.3.17", + "futures 0.3.18", "libp2p-core", "libp2p-swarm", "log", @@ -4704,12 +4693,12 @@ checksum = "0c8c37b4d2a075b4be8442760a5f8c037180f0c8dd5b5734b9978ab868b3aa11" dependencies = [ "asynchronous-codec 0.6.0", "bytes 1.1.0", - "futures 0.3.17", + "futures 0.3.18", "libp2p-core", "log", "prost", "prost-build", - "unsigned-varint 0.7.0", + "unsigned-varint 0.7.1", "void", ] @@ -4719,7 +4708,7 @@ version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6ce3374f3b28162db9d3442c9347c4f14cb01e8290052615c7d341d40eae0599" dependencies = [ - "futures 0.3.17", + "futures 0.3.18", "log", "pin-project 1.0.8", "rand 0.7.3", @@ -4735,7 +4724,7 @@ checksum = "0b8786aca3f18671d8776289706a5521f6c9124a820f69e358de214b9939440d" dependencies = [ "asynchronous-codec 0.6.0", "bytes 1.1.0", - "futures 0.3.17", + "futures 0.3.18", "futures-timer 3.0.2", "libp2p-core", "libp2p-swarm", @@ -4745,7 +4734,7 @@ dependencies = [ "prost-build", "rand 0.7.3", "smallvec 1.7.0", - "unsigned-varint 0.7.0", + "unsigned-varint 0.7.1", "void", "wasm-timer", ] @@ -4758,7 +4747,7 @@ checksum = "1cdbe172f08e6d0f95fa8634e273d4c4268c4063de2e33e7435194b0130c62e3" dependencies = [ "async-trait", "bytes 1.1.0", - "futures 0.3.17", + "futures 0.3.18", "libp2p-core", "libp2p-swarm", "log", @@ -4766,7 +4755,7 @@ dependencies = [ "minicbor", "rand 0.7.3", "smallvec 1.7.0", - "unsigned-varint 0.7.0", + "unsigned-varint 0.7.1", "wasm-timer", ] @@ -4777,7 +4766,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e04d8e1eef675029ec728ba14e8d0da7975d84b6679b699b4ae91a1de9c3a92" dependencies = [ "either", - "futures 0.3.17", + "futures 0.3.18", "libp2p-core", "log", "rand 0.7.3", @@ -4803,7 +4792,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b1a27d21c477951799e99d5c105d78868258502ce092988040a808d5a19bbd9" dependencies = [ "async-io", - "futures 0.3.17", + "futures 0.3.18", "futures-timer 3.0.2", "if-watch", "ipnet", @@ -4820,7 +4809,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ffd6564bb3b7ff203661ccbb69003c2b551e34cef974f2d6c6a28306a12170b5" dependencies = [ "async-std", - "futures 0.3.17", + "futures 0.3.18", "libp2p-core", "log", ] @@ -4831,7 +4820,7 @@ version = "0.28.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2d413e4cf9b8e5dfbcd2a60d3dc5a3391308bdb463684093d4f67137b7113de" dependencies = [ - "futures 0.3.17", + "futures 0.3.18", "js-sys", "libp2p-core", "parity-send-wrapper", @@ -4846,7 +4835,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cace60995ef6f637e4752cccbb2590f6bc358e8741a0d066307636c69a4b3a74" dependencies = [ "either", - "futures 0.3.17", + "futures 0.3.18", "futures-rustls", "libp2p-core", "log", @@ -4863,7 +4852,7 @@ version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f35da42cfc6d5cb0dcf3ad6881bc68d146cdf38f98655e09e33fbba4d13eabc4" dependencies = [ - "futures 0.3.17", + "futures 0.3.18", "libp2p-core", "parking_lot 0.11.2", "thiserror", @@ -4895,7 +4884,7 @@ dependencies = [ "rand 0.7.3", "sha2 0.8.2", "subtle 2.4.1", - "typenum", + "typenum 1.14.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -4914,7 +4903,7 @@ dependencies = [ "rand 0.7.3", "serde", "sha2 0.9.8", - "typenum", + "typenum 1.14.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -5016,7 +5005,7 @@ version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ea2d928b485416e8908cff2d97d621db22b27f7b3b6729e438bcf42c671ba91" dependencies = [ - "hashbrown 0.11.2", + "hashbrown", ] [[package]] @@ -5066,35 +5055,13 @@ checksum = "a3e378b66a060d48947b590737b30a1be76706c8dd7b8ba0f2fe3989c68a853f" [[package]] name = "matrixmultiply" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a8a15b776d9dfaecd44b03c5828c2199cddff5247215858aac14624f8d6b741" +checksum = "add85d4dd35074e6fedc608f8c8f513a3548619a9024b751949ef0e8e45a4d84" dependencies = [ "rawpointer", ] -[[package]] -name = "max-encoded-len" -version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" -dependencies = [ - "impl-trait-for-tuples", - "max-encoded-len-derive", - "parity-scale-codec", - "primitive-types", -] - -[[package]] -name = "max-encoded-len-derive" -version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" -dependencies = [ - "proc-macro-crate 1.1.0", - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "maybe-uninit" version = "2.0.0" @@ -5127,21 +5094,21 @@ dependencies = [ [[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", ] [[package]] name = "memory-db" -version = "0.26.0" +version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "814bbecfc0451fc314eeea34f05bbcd5b98a7ad7af37faee088b86a1e633f1d4" +checksum = "de006e09d04fc301a5f7e817b75aa49801c4479a8af753764416b085337ddcc5" dependencies = [ "hash-db", - "hashbrown 0.9.1", + "hashbrown", "parity-util-mem", ] @@ -5158,7 +5125,7 @@ dependencies = [ "array-bytes", "criterion", "ethereum-types", - "hashbrown 0.9.1", + "hashbrown", "hex", "keccak-hash", "rand 0.8.4", @@ -5199,6 +5166,12 @@ dependencies = [ "syn", ] +[[package]] +name = "minimal-lexical" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" + [[package]] name = "miniz_oxide" version = "0.4.4" @@ -5292,7 +5265,6 @@ dependencies = [ "darwinia-support", "frame-support", "frame-system", - "max-encoded-len", "parity-scale-codec", "sp-core", "sp-io", @@ -5302,9 +5274,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 = "multibase" @@ -5361,11 +5333,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "56a336acba8bc87c8876f6425407dbbe6c417bf478b22015f8fb0994ef3bc0ab" dependencies = [ "bytes 1.1.0", - "futures 0.3.17", + "futures 0.3.18", "log", "pin-project 1.0.8", "smallvec 1.7.0", - "unsigned-varint 0.7.0", + "unsigned-varint 0.7.1", ] [[package]] @@ -5383,7 +5355,7 @@ dependencies = [ "rand 0.8.4", "rand_distr", "simba", - "typenum", + "typenum 1.14.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -5431,13 +5403,12 @@ checksum = "2bf50223579dc7cdcfb3bfcacf7069ff68243f8c363f62ffa99cf000a6b9c451" [[package]] name = "nom" -version = "6.1.2" +version = "7.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7413f999671bd4745a7b624bd370a569fb6bc574b23c83a3c5ed2e453f3d5e2" +checksum = "1b1d11e1ef389c76fe5b81bcaf2ea32cf88b62bc494e19f493d0b30e7a930109" dependencies = [ - "bitvec 0.19.5", - "funty", "memchr", + "minimal-lexical", "version_check", ] @@ -5583,9 +5554,9 @@ dependencies = [ [[package]] name = "object" -version = "0.27.0" +version = "0.27.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c821014c18301591b89b843809ef953af9e3df0496c232d5c0611b0a52aac363" +checksum = "67ac1d3f9a1d3616fd9a60c8d74296f22406a238b6a72f5cc1e6f314df4ffbf9" dependencies = [ "memchr", ] @@ -5631,8 +5602,8 @@ dependencies = [ [[package]] name = "pallet-aura" -version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "frame-support", "frame-system", @@ -5647,8 +5618,8 @@ dependencies = [ [[package]] name = "pallet-authority-discovery" -version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "frame-support", "frame-system", @@ -5662,8 +5633,8 @@ dependencies = [ [[package]] name = "pallet-authorship" -version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "frame-support", "frame-system", @@ -5676,8 +5647,8 @@ dependencies = [ [[package]] name = "pallet-babe" -version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "frame-benchmarking", "frame-support", @@ -5699,14 +5670,13 @@ dependencies = [ [[package]] name = "pallet-balances" -version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "log", - "max-encoded-len", "parity-scale-codec", "sp-runtime", "sp-std", @@ -5714,8 +5684,8 @@ dependencies = [ [[package]] name = "pallet-bounties" -version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "frame-support", "frame-system", @@ -5728,7 +5698,7 @@ dependencies = [ [[package]] name = "pallet-bridge-dispatch" version = "0.1.0" -source = "git+https://github.com/darwinia-network/parity-bridges-common?tag=darwinia-v0.11.6-4#495a773403e5827bbf9d7b20d97333f673628db9" +source = "git+https://github.com/darwinia-network/parity-bridges-common?branch=darwinia-v0.11.7#f747b99e7a3857a7d438f9aa180d064ff50c570d" dependencies = [ "bp-message-dispatch", "bp-runtime", @@ -5744,7 +5714,7 @@ dependencies = [ [[package]] name = "pallet-bridge-grandpa" version = "0.1.0" -source = "git+https://github.com/darwinia-network/parity-bridges-common?tag=darwinia-v0.11.6-4#495a773403e5827bbf9d7b20d97333f673628db9" +source = "git+https://github.com/darwinia-network/parity-bridges-common?branch=darwinia-v0.11.7#f747b99e7a3857a7d438f9aa180d064ff50c570d" dependencies = [ "bp-header-chain", "bp-runtime", @@ -5765,9 +5735,9 @@ dependencies = [ [[package]] name = "pallet-bridge-messages" version = "0.1.0" -source = "git+https://github.com/darwinia-network/parity-bridges-common?tag=darwinia-v0.11.6-4#495a773403e5827bbf9d7b20d97333f673628db9" +source = "git+https://github.com/darwinia-network/parity-bridges-common?branch=darwinia-v0.11.7#f747b99e7a3857a7d438f9aa180d064ff50c570d" dependencies = [ - "bitvec 0.20.4", + "bitvec", "bp-message-dispatch", "bp-messages", "bp-runtime", @@ -5784,8 +5754,8 @@ dependencies = [ [[package]] name = "pallet-collective" -version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "frame-benchmarking", "frame-support", @@ -5800,8 +5770,8 @@ dependencies = [ [[package]] name = "pallet-election-provider-multi-phase" -version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "frame-election-provider-support", "frame-support", @@ -5819,8 +5789,8 @@ dependencies = [ [[package]] name = "pallet-grandpa" -version = "3.1.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "frame-benchmarking", "frame-support", @@ -5841,8 +5811,8 @@ dependencies = [ [[package]] name = "pallet-identity" -version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "enumflags2", "frame-benchmarking", @@ -5856,8 +5826,8 @@ dependencies = [ [[package]] name = "pallet-im-online" -version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "frame-support", "frame-system", @@ -5874,8 +5844,8 @@ dependencies = [ [[package]] name = "pallet-membership" -version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "frame-benchmarking", "frame-support", @@ -5889,8 +5859,8 @@ dependencies = [ [[package]] name = "pallet-multisig" -version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "frame-support", "frame-system", @@ -5903,8 +5873,8 @@ dependencies = [ [[package]] name = "pallet-offences" -version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "frame-support", "frame-system", @@ -5919,12 +5889,11 @@ dependencies = [ [[package]] name = "pallet-proxy" -version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "frame-support", "frame-system", - "max-encoded-len", "parity-scale-codec", "sp-core", "sp-io", @@ -5934,8 +5903,8 @@ dependencies = [ [[package]] name = "pallet-randomness-collective-flip" -version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "frame-support", "frame-system", @@ -5947,8 +5916,8 @@ dependencies = [ [[package]] name = "pallet-recovery" -version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "enumflags2", "frame-support", @@ -5961,8 +5930,8 @@ dependencies = [ [[package]] name = "pallet-scheduler" -version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "frame-benchmarking", "frame-support", @@ -5976,8 +5945,8 @@ dependencies = [ [[package]] name = "pallet-session" -version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "frame-support", "frame-system", @@ -5996,8 +5965,8 @@ dependencies = [ [[package]] name = "pallet-society" -version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "frame-support", "frame-system", @@ -6009,8 +5978,8 @@ dependencies = [ [[package]] name = "pallet-sudo" -version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "frame-support", "frame-system", @@ -6022,8 +5991,8 @@ dependencies = [ [[package]] name = "pallet-timestamp" -version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "frame-benchmarking", "frame-support", @@ -6039,8 +6008,8 @@ dependencies = [ [[package]] name = "pallet-tips" -version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "frame-support", "frame-system", @@ -6053,8 +6022,8 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" -version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "frame-support", "frame-system", @@ -6069,8 +6038,8 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" -version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "jsonrpc-core", "jsonrpc-core-client", @@ -6086,8 +6055,8 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" -version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -6097,8 +6066,8 @@ dependencies = [ [[package]] name = "pallet-treasury" -version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "frame-support", "frame-system", @@ -6112,8 +6081,8 @@ dependencies = [ [[package]] name = "pallet-utility" -version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "frame-support", "frame-system", @@ -6179,7 +6148,6 @@ dependencies = [ "frame-try-runtime", "from-ethereum-issuing", "from-substrate-issuing", - "max-encoded-len", "module-transaction-pause", "pallet-authority-discovery", "pallet-authorship", @@ -6265,7 +6233,6 @@ dependencies = [ "frame-system-benchmarking", "frame-system-rpc-runtime-api", "frame-try-runtime", - "max-encoded-len", "module-transaction-pause", "pallet-authority-discovery", "pallet-authorship", @@ -6339,7 +6306,7 @@ dependencies = [ "percent-encoding 2.1.0", "serde", "static_assertions", - "unsigned-varint 0.7.0", + "unsigned-varint 0.7.1", "url 2.2.2", ] @@ -6349,8 +6316,8 @@ version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "373b1a4c1338d9cd3d1fa53b3a11bdab5ab6bd80a20f7f7becd76953ae2be909" dependencies = [ - "arrayvec 0.7.1", - "bitvec 0.20.4", + "arrayvec 0.7.2", + "bitvec", "byte-slice-cast", "impl-trait-for-tuples", "parity-scale-codec-derive", @@ -6396,12 +6363,12 @@ dependencies = [ [[package]] name = "parity-util-mem" -version = "0.9.0" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "664a8c6b8e62d8f9f2f937e391982eb433ab285b4cd9545b342441e04a906e42" +checksum = "6f4cb4e169446179cbc6b8b6320cc9fca49bd2e94e8db25f25f200a8ea774770" dependencies = [ "cfg-if 1.0.0", - "hashbrown 0.9.1", + "hashbrown", "impl-trait-for-tuples", "parity-util-mem-derive", "parking_lot 0.11.2", @@ -6537,9 +6504,9 @@ dependencies = [ [[package]] name = "paste" -version = "1.0.5" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acbf547ad0c65e31259204bd90935776d1c693cec2f4ff7abb7a1bbbd40dfe58" +checksum = "0744126afe1a6dd7f394cb50a716dbe086cb06e255e53d8d0185d82828358fb5" [[package]] name = "pbkdf2" @@ -6561,9 +6528,9 @@ dependencies = [ [[package]] name = "pdqselect" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ec91767ecc0a0bbe558ce8c9da33c068066c57ecc8bb8477ef8c1ad3ef77c27" +checksum = "7778906d9321dd56cde1d1ffa69a73e59dcf5fda6d366f62727adf2bd4193aee" [[package]] name = "peeking_take_while" @@ -6696,9 +6663,9 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "pkg-config" -version = "0.3.20" +version = "0.3.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c9b1041b4387893b91ee6746cddfc28516aff326a3519fb2adf820932c5e6cb" +checksum = "12295df4f294471248581bc09bef3c38a5e46f1e36d6a37353621a0c6c357e1f" [[package]] name = "plain_hasher" @@ -6745,9 +6712,9 @@ dependencies = [ [[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", @@ -6781,20 +6748,21 @@ dependencies = [ [[package]] name = "ppv-lite86" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3ca011bd0129ff4ae15cd04c4eef202cadf6c51c21e47aba319b4e0501db741" +checksum = "ed0cfbc8191465bed66e1718596ee0b0b35d5ee1f41c5df2189d0fe8bde535ba" [[package]] name = "primitive-types" -version = "0.9.1" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06345ee39fbccfb06ab45f3a1a5798d9dafa04cb8921a76d227040003a234b0e" +checksum = "05e4722c697a58a99d5d06a08c30821d7c082a4632198de1eaa5a6c22ef42373" dependencies = [ "fixed-hash", "impl-codec", "impl-rlp", "impl-serde", + "scale-info", "uint", ] @@ -6841,23 +6809,11 @@ dependencies = [ "version_check", ] -[[package]] -name = "proc-macro-hack" -version = "0.5.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbf0c48bc1d91375ae5c3cd81e3722dff1abcf81a30960240640d223f59fe0e5" - -[[package]] -name = "proc-macro-nested" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc881b2c22681370c6a780e47af9840ef841837bc98118431d4e1868bd0c1086" - [[package]] name = "proc-macro2" -version = "1.0.30" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edc3358ebc67bc8b7fa0c007f945b0b18226f78437d61bec735a9eb96b61ee70" +checksum = "fb37d2df5df740e582f28f8560cf425f52bb267d872fe58358eadb554909f07a" dependencies = [ "unicode-xid", ] @@ -6938,9 +6894,9 @@ dependencies = [ [[package]] name = "pwasm-utils" -version = "0.18.0" +version = "0.18.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0e517f47d9964362883182404b68d0b6949382c0baa40aa5ffca94f5f1e3481" +checksum = "880b3384fb00b8f6ecccd5d358b93bd2201900ae3daad213791d1864f6441f5c" dependencies = [ "byteorder", "log", @@ -6979,12 +6935,6 @@ dependencies = [ "proc-macro2", ] -[[package]] -name = "radium" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "941ba9d78d8e2f7ce474c015eea4d9c6d25b6a3327f9832ee29a4de27f91bbb8" - [[package]] name = "radium" version = "0.6.2" @@ -7267,8 +7217,8 @@ dependencies = [ [[package]] name = "remote-externalities" -version = "0.9.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "0.10.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "env_logger 0.8.4", "hex", @@ -7304,9 +7254,9 @@ dependencies = [ [[package]] name = "retain_mut" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "448296241d034b96c11173591deaa1302f2c17b56092106c1f92c1bc0183a8c9" +checksum = "11000e6ba5020e53e7cc26f73b91ae7d5496b4977851479edb66b694c0675c21" [[package]] name = "ring" @@ -7357,9 +7307,9 @@ dependencies = [ [[package]] name = "rocksdb" -version = "0.16.0" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c749134fda8bfc90d0de643d59bfc841dcb3ac8a1062e12b6754bd60235c48b3" +checksum = "7a62eca5cacf2c8261128631bed9f045598d40bfbe4b29f5163f0f802f8f44a7" dependencies = [ "libc", "librocksdb-sys", @@ -7486,16 +7436,16 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4da5fcb054c46f5a5dff833b129285a93d3f0179531735e6c866e8cc307d2020" dependencies = [ - "futures 0.3.17", + "futures 0.3.18", "pin-project 0.4.28", "static_assertions", ] [[package]] name = "ryu" -version = "1.0.5" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e" +checksum = "3c9613b5a66ab9ba26415184cfc41156594925a9cf3a2057e57f31ff145f6568" [[package]] name = "safe-mix" @@ -7526,25 +7476,24 @@ dependencies = [ [[package]] name = "sc-allocator" -version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "log", "sp-core", - "sp-std", "sp-wasm-interface", "thiserror", ] [[package]] name = "sc-authority-discovery" -version = "0.9.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "0.10.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "async-trait", "derive_more", "either", - "futures 0.3.17", + "futures 0.3.18", "futures-timer 3.0.2", "ip_network", "libp2p", @@ -7567,10 +7516,10 @@ dependencies = [ [[package]] name = "sc-basic-authorship" -version = "0.9.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "0.10.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ - "futures 0.3.17", + "futures 0.3.18", "futures-timer 3.0.2", "log", "parity-scale-codec", @@ -7578,20 +7527,20 @@ dependencies = [ "sc-client-api", "sc-proposer-metrics", "sc-telemetry", + "sc-transaction-pool-api", "sp-api", "sp-blockchain", "sp-consensus", "sp-core", "sp-inherents", "sp-runtime", - "sp-transaction-pool", "substrate-prometheus-endpoint", ] [[package]] name = "sc-block-builder" -version = "0.9.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "0.10.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "parity-scale-codec", "sc-client-api", @@ -7606,28 +7555,24 @@ dependencies = [ [[package]] name = "sc-chain-spec" -version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", "sc-chain-spec-derive", - "sc-consensus-babe", - "sc-consensus-epochs", - "sc-finality-grandpa", "sc-network", "sc-telemetry", "serde", "serde_json", - "sp-consensus-babe", "sp-core", "sp-runtime", ] [[package]] name = "sc-chain-spec-derive" -version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "proc-macro-crate 1.1.0", "proc-macro2", @@ -7637,12 +7582,12 @@ dependencies = [ [[package]] name = "sc-cli" -version = "0.9.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "0.10.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "chrono", "fdlimit", - "futures 0.3.17", + "futures 0.3.18", "hex", "libp2p", "log", @@ -7675,12 +7620,12 @@ dependencies = [ [[package]] name = "sc-client-api" -version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "derive_more", "fnv", - "futures 0.3.17", + "futures 0.3.18", "hash-db", "kvdb", "lazy_static", @@ -7688,6 +7633,7 @@ dependencies = [ "parity-scale-codec", "parking_lot 0.11.2", "sc-executor", + "sc-transaction-pool-api", "sp-api", "sp-blockchain", "sp-consensus", @@ -7700,7 +7646,6 @@ dependencies = [ "sp-state-machine", "sp-std", "sp-storage", - "sp-transaction-pool", "sp-trie", "sp-utils", "sp-version", @@ -7709,14 +7654,14 @@ dependencies = [ [[package]] name = "sc-client-db" -version = "0.9.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "0.10.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "blake2-rfc", "hash-db", "kvdb", "kvdb-memorydb", - "kvdb-rocksdb", + "kvdb-rocksdb 0.12.1", "linked-hash-map", "log", "parity-db", @@ -7728,7 +7673,6 @@ dependencies = [ "sc-state-db", "sp-arithmetic", "sp-blockchain", - "sp-consensus", "sp-core", "sp-database", "sp-runtime", @@ -7739,30 +7683,43 @@ dependencies = [ [[package]] name = "sc-consensus" -version = "0.9.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "0.10.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "async-trait", + "futures 0.3.18", + "futures-timer 3.0.2", + "libp2p", + "log", "parking_lot 0.11.2", "sc-client-api", + "serde", + "sp-api", "sp-blockchain", "sp-consensus", + "sp-core", "sp-runtime", + "sp-state-machine", + "sp-utils", + "substrate-prometheus-endpoint", + "thiserror", + "wasm-timer", ] [[package]] name = "sc-consensus-aura" -version = "0.9.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "0.10.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "async-trait", "derive_more", - "futures 0.3.17", + "futures 0.3.18", "futures-timer 3.0.2", "log", "parity-scale-codec", "sc-block-builder", "sc-client-api", + "sc-consensus", "sc-consensus-slots", "sc-telemetry", "sp-api", @@ -7783,13 +7740,13 @@ dependencies = [ [[package]] name = "sc-consensus-babe" -version = "0.9.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "0.10.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "async-trait", "derive_more", "fork-tree", - "futures 0.3.17", + "futures 0.3.18", "futures-timer 3.0.2", "log", "merlin", @@ -7802,6 +7759,7 @@ dependencies = [ "rand 0.7.3", "retain_mut", "sc-client-api", + "sc-consensus", "sc-consensus-epochs", "sc-consensus-slots", "sc-consensus-uncles", @@ -7829,11 +7787,11 @@ dependencies = [ [[package]] name = "sc-consensus-babe-rpc" -version = "0.9.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "0.10.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "derive_more", - "futures 0.3.17", + "futures 0.3.18", "jsonrpc-core", "jsonrpc-core-client", "jsonrpc-derive", @@ -7853,8 +7811,8 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" -version = "0.9.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "0.10.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "fork-tree", "parity-scale-codec", @@ -7866,13 +7824,13 @@ dependencies = [ [[package]] name = "sc-consensus-manual-seal" -version = "0.9.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "0.10.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "assert_matches", "async-trait", "derive_more", - "futures 0.3.17", + "futures 0.3.18", "jsonrpc-core", "jsonrpc-core-client", "jsonrpc-derive", @@ -7880,9 +7838,11 @@ dependencies = [ "parity-scale-codec", "parking_lot 0.11.2", "sc-client-api", + "sc-consensus", "sc-consensus-babe", "sc-consensus-epochs", "sc-transaction-pool", + "sc-transaction-pool-api", "serde", "sp-api", "sp-blockchain", @@ -7895,22 +7855,22 @@ dependencies = [ "sp-keystore", "sp-runtime", "sp-timestamp", - "sp-transaction-pool", "substrate-prometheus-endpoint", ] [[package]] name = "sc-consensus-slots" -version = "0.9.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "0.10.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "async-trait", - "futures 0.3.17", + "futures 0.3.18", "futures-timer 3.0.2", "impl-trait-for-tuples", "log", "parity-scale-codec", "sc-client-api", + "sc-consensus", "sc-telemetry", "sp-api", "sp-application-crypto", @@ -7929,8 +7889,8 @@ dependencies = [ [[package]] name = "sc-consensus-uncles" -version = "0.9.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "0.10.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "sc-client-api", "sp-authorship", @@ -7940,8 +7900,8 @@ dependencies = [ [[package]] name = "sc-executor" -version = "0.9.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "0.10.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "derive_more", "lazy_static", @@ -7969,8 +7929,8 @@ dependencies = [ [[package]] name = "sc-executor-common" -version = "0.9.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "0.10.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "derive_more", "parity-scale-codec", @@ -7986,8 +7946,8 @@ dependencies = [ [[package]] name = "sc-executor-wasmi" -version = "0.9.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "0.10.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "log", "parity-scale-codec", @@ -8001,14 +7961,15 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" -version = "0.9.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "0.10.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "cfg-if 1.0.0", "libc", "log", "parity-scale-codec", "parity-wasm 0.42.2", + "pwasm-utils", "sc-allocator", "sc-executor-common", "scoped-tls", @@ -8020,22 +7981,22 @@ dependencies = [ [[package]] name = "sc-finality-grandpa" -version = "0.9.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "0.10.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "async-trait", "derive_more", "dyn-clone", "finality-grandpa", "fork-tree", - "futures 0.3.17", + "futures 0.3.18", "futures-timer 3.0.2", "linked-hash-map", "log", "parity-scale-codec", "parking_lot 0.11.2", "pin-project 1.0.8", - "rand 0.7.3", + "rand 0.8.4", "sc-block-builder", "sc-client-api", "sc-consensus", @@ -8061,12 +8022,12 @@ dependencies = [ [[package]] name = "sc-finality-grandpa-rpc" -version = "0.9.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "0.10.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "derive_more", "finality-grandpa", - "futures 0.3.17", + "futures 0.3.18", "jsonrpc-core", "jsonrpc-core-client", "jsonrpc-derive", @@ -8083,53 +8044,32 @@ dependencies = [ "sp-runtime", ] -[[package]] -name = "sc-finality-grandpa-warp-sync" -version = "0.9.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" -dependencies = [ - "derive_more", - "futures 0.3.17", - "log", - "num-traits", - "parity-scale-codec", - "parking_lot 0.11.2", - "prost", - "sc-client-api", - "sc-finality-grandpa", - "sc-network", - "sc-service", - "sp-blockchain", - "sp-finality-grandpa", - "sp-runtime", -] - [[package]] name = "sc-informant" -version = "0.9.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "0.10.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ - "ansi_term 0.12.1", - "futures 0.3.17", + "ansi_term", + "futures 0.3.18", "futures-timer 3.0.2", "log", "parity-util-mem", "sc-client-api", "sc-network", + "sc-transaction-pool-api", "sp-blockchain", "sp-runtime", - "sp-transaction-pool", "wasm-timer", ] [[package]] name = "sc-keystore" -version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "async-trait", "derive_more", - "futures 0.3.17", + "futures 0.3.18", "futures-util", "hex", "merlin", @@ -8144,8 +8084,8 @@ dependencies = [ [[package]] name = "sc-light" -version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "hash-db", "lazy_static", @@ -8163,8 +8103,8 @@ dependencies = [ [[package]] name = "sc-network" -version = "0.9.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "0.10.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "async-std", "async-trait", @@ -8178,7 +8118,7 @@ dependencies = [ "erased-serde", "fnv", "fork-tree", - "futures 0.3.17", + "futures 0.3.18", "futures-timer 3.0.2", "hex", "ip_network", @@ -8196,6 +8136,7 @@ dependencies = [ "rand 0.7.3", "sc-block-builder", "sc-client-api", + "sc-consensus", "sc-peerset", "serde", "serde_json", @@ -8204,6 +8145,7 @@ dependencies = [ "sp-blockchain", "sp-consensus", "sp-core", + "sp-finality-grandpa", "sp-runtime", "sp-utils", "substrate-prometheus-endpoint", @@ -8216,10 +8158,10 @@ dependencies = [ [[package]] name = "sc-network-gossip" -version = "0.9.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "0.10.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ - "futures 0.3.17", + "futures 0.3.18", "futures-timer 3.0.2", "libp2p", "log", @@ -8233,12 +8175,12 @@ dependencies = [ [[package]] name = "sc-offchain" -version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "bytes 0.5.6", "fnv", - "futures 0.3.17", + "futures 0.3.18", "futures-timer 3.0.2", "hex", "hyper 0.13.10", @@ -8261,10 +8203,10 @@ dependencies = [ [[package]] name = "sc-peerset" -version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ - "futures 0.3.17", + "futures 0.3.18", "libp2p", "log", "serde_json", @@ -8275,7 +8217,7 @@ dependencies = [ [[package]] name = "sc-proposer-metrics" version = "0.9.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -8283,10 +8225,10 @@ dependencies = [ [[package]] name = "sc-rpc" -version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ - "futures 0.3.17", + "futures 0.3.18", "hash-db", "jsonrpc-core", "jsonrpc-pubsub", @@ -8300,6 +8242,7 @@ dependencies = [ "sc-keystore", "sc-rpc-api", "sc-tracing", + "sc-transaction-pool-api", "serde_json", "sp-api", "sp-blockchain", @@ -8311,18 +8254,17 @@ dependencies = [ "sp-session", "sp-state-machine", "sp-tracing", - "sp-transaction-pool", "sp-utils", "sp-version", ] [[package]] name = "sc-rpc-api" -version = "0.9.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "0.10.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "derive_more", - "futures 0.3.17", + "futures 0.3.18", "jsonrpc-core", "jsonrpc-core-client", "jsonrpc-derive", @@ -8331,20 +8273,20 @@ dependencies = [ "parity-scale-codec", "parking_lot 0.11.2", "sc-chain-spec", + "sc-transaction-pool-api", "serde", "serde_json", "sp-core", "sp-rpc", "sp-runtime", "sp-tracing", - "sp-transaction-pool", "sp-version", ] [[package]] name = "sc-rpc-server" -version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "futures 0.1.31", "jsonrpc-core", @@ -8361,14 +8303,14 @@ dependencies = [ [[package]] name = "sc-service" -version = "0.9.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "0.10.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "async-trait", "directories", "exit-future", "futures 0.1.31", - "futures 0.3.17", + "futures 0.3.18", "futures-timer 3.0.2", "hash-db", "jsonrpc-core", @@ -8384,6 +8326,7 @@ dependencies = [ "sc-chain-spec", "sc-client-api", "sc-client-db", + "sc-consensus", "sc-executor", "sc-informant", "sc-keystore", @@ -8395,6 +8338,7 @@ dependencies = [ "sc-telemetry", "sc-tracing", "sc-transaction-pool", + "sc-transaction-pool-api", "serde", "serde_json", "sp-api", @@ -8427,8 +8371,8 @@ dependencies = [ [[package]] name = "sc-state-db" -version = "0.9.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "0.10.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "log", "parity-scale-codec", @@ -8442,18 +8386,20 @@ dependencies = [ [[package]] name = "sc-sync-state-rpc" -version = "0.9.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "0.10.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "jsonrpc-core", "jsonrpc-core-client", "jsonrpc-derive", + "parity-scale-codec", "sc-chain-spec", "sc-client-api", "sc-consensus-babe", "sc-consensus-epochs", "sc-finality-grandpa", "sc-rpc-api", + "serde", "serde_json", "sp-blockchain", "sp-runtime", @@ -8462,11 +8408,11 @@ dependencies = [ [[package]] name = "sc-telemetry" -version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "chrono", - "futures 0.3.17", + "futures 0.3.18", "libp2p", "log", "parking_lot 0.11.2", @@ -8482,10 +8428,10 @@ dependencies = [ [[package]] name = "sc-tracing" -version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ - "ansi_term 0.12.1", + "ansi_term", "atty", "erased-serde", "lazy_static", @@ -8519,8 +8465,8 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" -version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "proc-macro-crate 1.1.0", "proc-macro2", @@ -8529,50 +8475,47 @@ dependencies = [ ] [[package]] -name = "sc-transaction-graph" -version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +name = "sc-transaction-pool" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "derive_more", - "futures 0.3.17", + "futures 0.3.18", + "intervalier", "linked-hash-map", "log", + "parity-scale-codec", "parity-util-mem", "parking_lot 0.11.2", "retain_mut", + "sc-client-api", + "sc-transaction-pool-api", "serde", + "sp-api", "sp-blockchain", "sp-core", "sp-runtime", + "sp-tracing", "sp-transaction-pool", "sp-utils", + "substrate-prometheus-endpoint", "thiserror", "wasm-timer", ] [[package]] -name = "sc-transaction-pool" -version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +name = "sc-transaction-pool-api" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ - "futures 0.3.17", - "intervalier", + "derive_more", + "futures 0.3.18", "log", "parity-scale-codec", - "parity-util-mem", - "parking_lot 0.11.2", - "sc-client-api", - "sc-transaction-graph", - "sp-api", + "serde", "sp-blockchain", - "sp-core", "sp-runtime", - "sp-tracing", - "sp-transaction-pool", - "sp-utils", - "substrate-prometheus-endpoint", "thiserror", - "wasm-timer", ] [[package]] @@ -8581,7 +8524,7 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5c55b744399c25532d63a0d2789b109df8d46fc93752d46b0782991a931a782f" dependencies = [ - "bitvec 0.20.4", + "bitvec", "cfg-if 1.0.0", "derive_more", "parity-scale-codec", @@ -8640,26 +8583,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" -[[package]] -name = "scroll" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fda28d4b4830b807a8b43f7b0e6b5df875311b3e7621d84577188c175b6ec1ec" -dependencies = [ - "scroll_derive", -] - -[[package]] -name = "scroll_derive" -version = "0.10.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aaaae8f38bb311444cfb7f1979af0bc9240d95795f75f9ceddf6a59b79ceffa0" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "sct" version = "0.6.1" @@ -8806,9 +8729,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.68" +version = "1.0.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f690853975602e1bfe1ccbf50504d67174e3bcf340f23b5ea9992e0587a52d8" +checksum = "d0ffa0837f2dfa6fb90868c2b5468cad482e175f7dad97e7421951e663f2b527" dependencies = [ "itoa", "ryu", @@ -9020,7 +8943,7 @@ dependencies = [ "base64 0.12.3", "bytes 0.5.6", "flate2", - "futures 0.3.17", + "futures 0.3.18", "httparse", "log", "rand 0.7.3", @@ -9029,13 +8952,13 @@ dependencies = [ [[package]] name = "soketto" -version = "0.5.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4919971d141dbadaa0e82b5d369e2d7666c98e4625046140615ca363e50d4daa" +checksum = "a74e48087dbeed4833785c2f3352b59140095dc192dce966a3bfc155020a439f" dependencies = [ "base64 0.13.0", "bytes 1.1.0", - "futures 0.3.17", + "futures 0.3.18", "httparse", "log", "rand 0.8.4", @@ -9044,8 +8967,8 @@ dependencies = [ [[package]] name = "sp-api" -version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "hash-db", "log", @@ -9061,8 +8984,8 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" -version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "blake2-rfc", "proc-macro-crate 1.1.0", @@ -9073,10 +8996,9 @@ dependencies = [ [[package]] name = "sp-application-crypto" -version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ - "max-encoded-len", "parity-scale-codec", "serde", "sp-core", @@ -9086,22 +9008,22 @@ dependencies = [ [[package]] name = "sp-arithmetic" -version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "integer-sqrt", "num-traits", "parity-scale-codec", "serde", - "sp-debug-derive 3.0.0 (git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1)", + "sp-debug-derive 3.0.0 (git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7)", "sp-std", "static_assertions", ] [[package]] name = "sp-authority-discovery" -version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "parity-scale-codec", "sp-api", @@ -9112,8 +9034,8 @@ dependencies = [ [[package]] name = "sp-authorship" -version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "async-trait", "parity-scale-codec", @@ -9124,8 +9046,8 @@ dependencies = [ [[package]] name = "sp-block-builder" -version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "parity-scale-codec", "sp-api", @@ -9136,10 +9058,10 @@ dependencies = [ [[package]] name = "sp-blockchain" -version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ - "futures 0.3.17", + "futures 0.3.18", "log", "lru", "parity-scale-codec", @@ -9154,13 +9076,12 @@ dependencies = [ [[package]] name = "sp-consensus" -version = "0.9.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "0.10.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "async-trait", - "futures 0.3.17", + "futures 0.3.18", "futures-timer 3.0.2", - "libp2p", "log", "parity-scale-codec", "parking_lot 0.11.2", @@ -9181,8 +9102,8 @@ dependencies = [ [[package]] name = "sp-consensus-aura" -version = "0.9.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "0.10.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "async-trait", "parity-scale-codec", @@ -9198,8 +9119,8 @@ dependencies = [ [[package]] name = "sp-consensus-babe" -version = "0.9.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "0.10.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "async-trait", "merlin", @@ -9220,8 +9141,8 @@ dependencies = [ [[package]] name = "sp-consensus-slots" -version = "0.9.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "0.10.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "parity-scale-codec", "sp-arithmetic", @@ -9230,8 +9151,8 @@ dependencies = [ [[package]] name = "sp-consensus-vrf" -version = "0.9.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "0.10.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "parity-scale-codec", "schnorrkel", @@ -9242,15 +9163,15 @@ dependencies = [ [[package]] name = "sp-core" -version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "base58", "blake2-rfc", "byteorder", "dyn-clonable", "ed25519-dalek", - "futures 0.3.17", + "futures 0.3.18", "hash-db", "hash256-std-hasher", "hex", @@ -9258,7 +9179,6 @@ dependencies = [ "lazy_static", "libsecp256k1 0.3.5", "log", - "max-encoded-len", "merlin", "num-traits", "parity-scale-codec", @@ -9271,7 +9191,7 @@ dependencies = [ "secrecy", "serde", "sha2 0.9.8", - "sp-debug-derive 3.0.0 (git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1)", + "sp-debug-derive 3.0.0 (git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7)", "sp-externalities", "sp-runtime-interface", "sp-std", @@ -9287,8 +9207,8 @@ dependencies = [ [[package]] name = "sp-database" -version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "kvdb", "parking_lot 0.11.2", @@ -9308,7 +9228,7 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "proc-macro2", "quote", @@ -9317,8 +9237,8 @@ dependencies = [ [[package]] name = "sp-externalities" -version = "0.9.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "0.10.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "environmental", "parity-scale-codec", @@ -9328,8 +9248,8 @@ dependencies = [ [[package]] name = "sp-finality-grandpa" -version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "finality-grandpa", "log", @@ -9345,8 +9265,8 @@ dependencies = [ [[package]] name = "sp-inherents" -version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -9359,10 +9279,10 @@ dependencies = [ [[package]] name = "sp-io" -version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ - "futures 0.3.17", + "futures 0.3.18", "hash-db", "libsecp256k1 0.3.5", "log", @@ -9384,8 +9304,8 @@ dependencies = [ [[package]] name = "sp-keyring" -version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "lazy_static", "sp-core", @@ -9395,12 +9315,12 @@ dependencies = [ [[package]] name = "sp-keystore" -version = "0.9.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "0.10.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "async-trait", "derive_more", - "futures 0.3.17", + "futures 0.3.18", "merlin", "parity-scale-codec", "parking_lot 0.11.2", @@ -9412,8 +9332,8 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" -version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "ruzstd", "zstd", @@ -9421,8 +9341,8 @@ dependencies = [ [[package]] name = "sp-npos-elections" -version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "parity-scale-codec", "serde", @@ -9434,8 +9354,8 @@ dependencies = [ [[package]] name = "sp-npos-elections-compact" -version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "proc-macro-crate 1.1.0", "proc-macro2", @@ -9445,8 +9365,8 @@ dependencies = [ [[package]] name = "sp-offchain" -version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "sp-api", "sp-core", @@ -9456,15 +9376,15 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "backtrace", ] [[package]] name = "sp-rpc" -version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "rustc-hash", "serde", @@ -9474,14 +9394,13 @@ dependencies = [ [[package]] name = "sp-runtime" -version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "either", "hash256-std-hasher", "impl-trait-for-tuples", "log", - "max-encoded-len", "parity-scale-codec", "parity-util-mem", "paste", @@ -9496,8 +9415,8 @@ dependencies = [ [[package]] name = "sp-runtime-interface" -version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -9513,8 +9432,8 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" -version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "Inflector", "proc-macro-crate 1.1.0", @@ -9526,7 +9445,7 @@ dependencies = [ [[package]] name = "sp-serializer" version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "serde", "serde_json", @@ -9534,8 +9453,8 @@ dependencies = [ [[package]] name = "sp-session" -version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "parity-scale-codec", "sp-api", @@ -9547,8 +9466,8 @@ dependencies = [ [[package]] name = "sp-staking" -version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "parity-scale-codec", "sp-runtime", @@ -9557,8 +9476,8 @@ dependencies = [ [[package]] name = "sp-state-machine" -version = "0.9.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "0.10.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "hash-db", "log", @@ -9580,26 +9499,26 @@ dependencies = [ [[package]] name = "sp-std" -version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" [[package]] name = "sp-storage" -version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "impl-serde", "parity-scale-codec", "ref-cast", "serde", - "sp-debug-derive 3.0.0 (git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1)", + "sp-debug-derive 3.0.0 (git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7)", "sp-std", ] [[package]] name = "sp-tasks" -version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "log", "sp-core", @@ -9611,8 +9530,8 @@ dependencies = [ [[package]] name = "sp-timestamp" -version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "async-trait", "futures-timer 3.0.2", @@ -9628,8 +9547,8 @@ dependencies = [ [[package]] name = "sp-tracing" -version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "erased-serde", "log", @@ -9646,24 +9565,17 @@ dependencies = [ [[package]] name = "sp-transaction-pool" -version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ - "derive_more", - "futures 0.3.17", - "log", - "parity-scale-codec", - "serde", "sp-api", - "sp-blockchain", "sp-runtime", - "thiserror", ] [[package]] name = "sp-transaction-storage-proof" -version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "async-trait", "log", @@ -9677,8 +9589,8 @@ dependencies = [ [[package]] name = "sp-trie" -version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "hash-db", "memory-db", @@ -9691,10 +9603,10 @@ dependencies = [ [[package]] name = "sp-utils" -version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ - "futures 0.3.17", + "futures 0.3.18", "futures-core", "futures-timer 3.0.2", "lazy_static", @@ -9703,21 +9615,23 @@ dependencies = [ [[package]] name = "sp-version" -version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "impl-serde", "parity-scale-codec", + "parity-wasm 0.42.2", "serde", "sp-runtime", "sp-std", "sp-version-proc-macro", + "thiserror", ] [[package]] name = "sp-version-proc-macro" -version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "parity-scale-codec", "proc-macro-crate 1.1.0", @@ -9728,8 +9642,8 @@ dependencies = [ [[package]] name = "sp-wasm-interface" -version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -9870,27 +9784,29 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "platforms", ] [[package]] name = "substrate-fixed" -version = "0.5.6" -source = "git+https://github.com/encointer/substrate-fixed?branch=master#b33d186888c60f38adafcfc0ec3a21aab263aef1" +version = "0.5.7" +source = "git+https://github.com/encointer/substrate-fixed?branch=master#2f353acee3c7cf7a386863a89fc6cb805048561f" dependencies = [ "parity-scale-codec", - "typenum", + "scale-info", + "serde", + "typenum 1.14.0 (git+https://github.com/encointer/typenum)", ] [[package]] name = "substrate-frame-rpc-system" -version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "frame-system-rpc-runtime-api", - "futures 0.3.17", + "futures 0.3.18", "jsonrpc-core", "jsonrpc-core-client", "jsonrpc-derive", @@ -9898,19 +9814,19 @@ dependencies = [ "parity-scale-codec", "sc-client-api", "sc-rpc-api", + "sc-transaction-pool-api", "serde", "sp-api", "sp-block-builder", "sp-blockchain", "sp-core", "sp-runtime", - "sp-transaction-pool", ] [[package]] name = "substrate-prometheus-endpoint" version = "0.9.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "async-std", "derive_more", @@ -9923,18 +9839,18 @@ dependencies = [ [[package]] name = "substrate-test-utils" -version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ - "futures 0.3.17", + "futures 0.3.18", "substrate-test-utils-derive", "tokio 0.2.25", ] [[package]] name = "substrate-test-utils-derive" -version = "0.9.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "0.10.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "proc-macro-crate 1.1.0", "quote", @@ -9943,10 +9859,10 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" -version = "4.0.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "5.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ - "ansi_term 0.12.1", + "ansi_term", "atty", "build-helper", "cargo_metadata", @@ -9971,9 +9887,9 @@ checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" [[package]] name = "syn" -version = "1.0.80" +version = "1.0.82" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d010a1623fbd906d51d650a9916aaefc05ffa0e4053ff7fe601167f3e715d194" +checksum = "8daf5dd0bb60cbd4137b1b587d2fc0ae729bc07cf01cd70b36a1ed5ade3b9d59" dependencies = [ "proc-macro2", "quote", @@ -10042,7 +9958,6 @@ dependencies = [ "frame-support", "frame-system", "frame-system-rpc-runtime-api", - "max-encoded-len", "pallet-aura", "pallet-grandpa", "pallet-randomness-collective-flip", @@ -10174,9 +10089,9 @@ dependencies = [ [[package]] name = "tinyvec" -version = "1.5.0" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f83b2a3d4d9091d0abd7eba4dc2710b1718583bd4d8992e2190720ea38f391f7" +checksum = "2c1c1d5a42b6245520c249549ec267180beaffcc0615401ac8e31853d4b6d8d2" dependencies = [ "tinyvec_macros", ] @@ -10204,7 +10119,6 @@ dependencies = [ "frame-support", "frame-system", "log", - "max-encoded-len", "pallet-session", "pallet-timestamp", "parity-scale-codec", @@ -10237,7 +10151,6 @@ dependencies = [ "frame-support", "frame-system", "log", - "max-encoded-len", "pallet-timestamp", "parity-scale-codec", "serde", @@ -10307,9 +10220,9 @@ dependencies = [ [[package]] name = "tokio" -version = "1.12.0" +version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2c2416fdedca8443ae44b4527de1ea633af61d8f7169ffa6e72c5b53d24efcc" +checksum = "70e992e41e0d2fb9f755b37446f20900f64446ef54874f40a60c78f021ac6144" dependencies = [ "autocfg", "pin-project-lite 0.2.7", @@ -10641,7 +10554,7 @@ 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", @@ -10664,7 +10577,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9eac131e334e81b6b3be07399482042838adcd7957aa0010231d0813e39e02fa" dependencies = [ "hash-db", - "hashbrown 0.11.2", + "hashbrown", "log", "rustc-hex", "smallvec 1.7.0", @@ -10740,8 +10653,8 @@ checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" [[package]] name = "try-runtime-cli" -version = "0.9.0" -source = "git+https://github.com/darwinia-network/substrate?tag=darwinia-v0.11.6-1#3c951d7eb441b8dec5f438084b0c264422385069" +version = "0.10.0-dev" +source = "git+https://github.com/darwinia-network/substrate?branch=darwinia-v0.11.7#ddaa176d2e4e9d44f962fd4ab4bc0107cca5a1c5" dependencies = [ "frame-try-runtime", "log", @@ -10757,7 +10670,6 @@ dependencies = [ "sp-blockchain", "sp-core", "sp-externalities", - "sp-io", "sp-keystore", "sp-runtime", "sp-state-machine", @@ -10781,6 +10693,14 @@ version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b63708a265f51345575b27fe43f9500ad611579e764c79edbc2037b1121959ec" +[[package]] +name = "typenum" +version = "1.14.0" +source = "git+https://github.com/encointer/typenum#ec35bb80fcfb495de2e1f6966381c3f85e8a6509" +dependencies = [ + "scale-info", +] + [[package]] name = "ucd-trie" version = "0.1.3" @@ -10871,9 +10791,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", @@ -10922,9 +10842,9 @@ dependencies = [ [[package]] name = "value-bag" -version = "1.0.0-alpha.7" +version = "1.0.0-alpha.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd320e1520f94261153e96f7534476ad869c14022aee1e59af7c778075d840ae" +checksum = "79923f7731dc61ebfba3633098bf3ac533bbd35ccd8c57e7088d9a5eebe0263f" dependencies = [ "ctor", "version_check", @@ -11087,7 +11007,7 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "be0ecb0db480561e9a7642b5d3e4187c128914e58aa84330b9493e3eb68c5e7f" dependencies = [ - "futures 0.3.17", + "futures 0.3.18", "js-sys", "parking_lot 0.11.2", "pin-utils", @@ -11151,11 +11071,9 @@ dependencies = [ "wasmparser", "wasmtime-cache", "wasmtime-environ", - "wasmtime-fiber", "wasmtime-jit", "wasmtime-profiling", "wasmtime-runtime", - "wat", "winapi 0.3.9", ] @@ -11230,17 +11148,6 @@ dependencies = [ "wasmparser", ] -[[package]] -name = "wasmtime-fiber" -version = "0.27.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a089d44cd7e2465d41a53b840a5b4fca1bf6d1ecfebc970eac9592b34ea5f0b3" -dependencies = [ - "cc", - "libc", - "winapi 0.3.9", -] - [[package]] name = "wasmtime-jit" version = "0.27.0" @@ -11296,11 +11203,8 @@ checksum = "e24364d522dcd67c897c8fffc42e5bdfc57207bbb6d7eeade0da9d4a7d70105b" dependencies = [ "anyhow", "cfg-if 1.0.0", - "gimli 0.24.0", "lazy_static", "libc", - "object 0.24.0", - "scroll", "serde", "target-lexicon", "wasmtime-environ", @@ -11322,34 +11226,15 @@ dependencies = [ "libc", "log", "mach", - "memoffset 0.6.4", + "memoffset 0.6.5", "more-asserts", "rand 0.8.4", "region", "thiserror", "wasmtime-environ", - "wasmtime-fiber", "winapi 0.3.9", ] -[[package]] -name = "wast" -version = "38.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae0d7b256bef26c898fa7344a2d627e8499f5a749432ce0a05eae1a64ff0c271" -dependencies = [ - "leb128", -] - -[[package]] -name = "wat" -version = "1.0.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adcfaeb27e2578d2c6271a45609f4a055e6d7ba3a12eff35b1fd5ba147bdf046" -dependencies = [ - "wast", -] - [[package]] name = "web-sys" version = "0.3.55" @@ -11490,7 +11375,7 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e7d9028f208dd5e63c614be69f115c1b53cacc1111437d4c765185856666c107" dependencies = [ - "futures 0.3.17", + "futures 0.3.18", "log", "nohash-hasher", "parking_lot 0.11.2", @@ -11509,9 +11394,9 @@ dependencies = [ [[package]] name = "zeroize_derive" -version = "1.2.0" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdff2024a851a322b08f179173ae2ba620445aef1e838f0c196820eade4ae0c7" +checksum = "65f1a51723ec88c66d5d1fe80c841f17f63587d6691901d66be9bec6c3b51f73" dependencies = [ "proc-macro2", "quote", diff --git a/client/dvm/db/Cargo.toml b/client/dvm/db/Cargo.toml index 307689aef4..3943237de1 100644 --- a/client/dvm/db/Cargo.toml +++ b/client/dvm/db/Cargo.toml @@ -12,13 +12,13 @@ version = "2.7.0" [dependencies] # crates.io codec = { package = "parity-scale-codec", version = "2.1", features = ["derive"] } -kvdb = { version = "0.9" } -kvdb-rocksdb = { version = "0.11" } +kvdb = { version = "0.10" } +kvdb-rocksdb = { version = "0.14" } parking_lot = { version = "0.11" } # paritytech -sp-core = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-database = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-runtime = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } +sp-core = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-database = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-runtime = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } # darwinia-network dp-storage = { path = "../../../primitives/storage/" } dvm-ethereum = { path = "../../../frame/dvm" } diff --git a/client/dvm/mapping-sync/Cargo.toml b/client/dvm/mapping-sync/Cargo.toml index 10041dd8ba..774d41e799 100644 --- a/client/dvm/mapping-sync/Cargo.toml +++ b/client/dvm/mapping-sync/Cargo.toml @@ -19,7 +19,7 @@ dc-db = { path = "../db" } dp-consensus = { path = "../../../primitives/consensus/" } dvm-rpc-runtime-api = { path = "../../../frame/dvm/rpc/runtime-api" } # paritytech -sc-client-api = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-api = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-blockchain = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-runtime = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } +sc-client-api = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-api = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-blockchain = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-runtime = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } diff --git a/client/dvm/rpc/Cargo.toml b/client/dvm/rpc/Cargo.toml index c2f952770a..88eb1ff18d 100644 --- a/client/dvm/rpc/Cargo.toml +++ b/client/dvm/rpc/Cargo.toml @@ -13,9 +13,9 @@ version = "2.7.0" # crates.io array-bytes = { version = "1.4" } codec = { package = "parity-scale-codec", version = "2.1" } -ethereum = { version = "0.7", features = ["with-codec"] } -ethereum-types = { version = "0.11" } -evm = { version = "0.27" } +ethereum = { version = "0.9", features = ["with-codec"] } +ethereum-types = { version = "0.12" } +evm = { version = "0.30" } futures = { version = "0.3", features = ["compat"] } jsonrpc-core = { version = "15.1" } jsonrpc-core-client = { version = "15.1" } @@ -23,7 +23,7 @@ jsonrpc-derive = { version = "15.1" } jsonrpc-pubsub = { version = "15.1" } libsecp256k1 = { version = "0.3" } log = { version = "0.4" } -rand = { version = "0.7" } +rand = { version = "0.8" } rlp = { version = "0.5" } sha3 = { version = "0.9" } # darwinia-network @@ -35,16 +35,16 @@ dvm-ethereum = { path = "../../../frame/dvm" } dvm-rpc-core = { path = "../../../frame/dvm/rpc" } dvm-rpc-runtime-api = { path = "../../../frame/dvm/rpc/runtime-api" } # paritytech -sc-client-api = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sc-network = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sc-rpc = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sc-service = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-api = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-blockchain = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-io = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-runtime = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-storage = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-transaction-pool = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } +sc-client-api = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sc-network = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sc-rpc = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sc-service = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sc-transaction-pool-api = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-api = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-blockchain = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-io = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-runtime = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-storage = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } [features] rpc_binary_search_estimate = [] diff --git a/client/dvm/rpc/src/eth.rs b/client/dvm/rpc/src/eth.rs index cb2420e610..1893c87784 100644 --- a/client/dvm/rpc/src/eth.rs +++ b/client/dvm/rpc/src/eth.rs @@ -38,6 +38,7 @@ use sc_client_api::{ client::BlockchainEvents, }; use sc_network::{ExHashT, NetworkService}; +use sc_transaction_pool_api::{InPoolTransaction, TransactionPool}; use sp_api::{BlockId, Core, HeaderT, ProvideRuntimeApi}; use sp_blockchain::{Error as BlockChainError, HeaderBackend, HeaderMetadata}; use sp_runtime::{ @@ -45,10 +46,11 @@ use sp_runtime::{ transaction_validity::TransactionSource, }; use sp_storage::{StorageData, StorageKey}; -use sp_transaction_pool::{InPoolTransaction, TransactionPool}; // --- std --- use codec::{self, Decode, Encode}; -use ethereum::{Block as EthereumBlock, Transaction as EthereumTransaction}; +use ethereum::{ + BlockV0 as EthereumBlockV0, LegacyTransactionMessage, TransactionAction, TransactionV0, +}; use ethereum_types::{H160, H256, H512, H64, U256, U64}; use futures::{future::TryFutureExt, StreamExt}; use jsonrpc_core::{ @@ -114,7 +116,7 @@ where } fn rich_block_build( - block: ethereum::Block, + block: EthereumBlockV0, statuses: Vec>, hash: Option, full_transactions: bool, @@ -182,8 +184,8 @@ fn rich_block_build( } fn transaction_build( - transaction: EthereumTransaction, - block: Option, + transaction: TransactionV0, + block: Option, status: Option, ) -> Transaction { let pubkey = match public_key(&transaction) { @@ -217,7 +219,7 @@ fn transaction_build( to: status.as_ref().map_or( { match transaction.action { - ethereum::TransactionAction::Call(to) => Some(to), + TransactionAction::Call(to) => Some(to), _ => None, } }, @@ -355,7 +357,7 @@ where fn filter_block_logs<'a>( ret: &'a mut Vec, filter: &'a Filter, - block: EthereumBlock, + block: EthereumBlockV0, transaction_statuses: Vec, ) -> &'a Vec { let params = FilteredParams::new(Some(filter.clone())); @@ -768,15 +770,15 @@ where Err(e) => return Box::new(future::result(Err(e))), }; - let message = ethereum::TransactionMessage { + let message = LegacyTransactionMessage { nonce, gas_price: request.gas_price.unwrap_or(U256::from(1)), gas_limit: request.gas.unwrap_or(U256::max_value()), value: request.value.unwrap_or(U256::zero()), input: request.data.map(|s| s.into_vec()).unwrap_or_default(), action: match request.to { - Some(to) => ethereum::TransactionAction::Call(to), - None => ethereum::TransactionAction::Create, + Some(to) => TransactionAction::Call(to), + None => TransactionAction::Create, }, chain_id: chain_id.map(|s| s.as_u64()), }; @@ -832,7 +834,7 @@ where } fn send_raw_transaction(&self, bytes: Bytes) -> BoxFuture { - let transaction = match rlp::decode::(&bytes.0[..]) { + let transaction = match rlp::decode::(&bytes.0[..]) { Ok(transaction) => transaction, Err(_) => { return Box::new(future::result(Err(internal_err( diff --git a/client/dvm/rpc/src/eth_pubsub.rs b/client/dvm/rpc/src/eth_pubsub.rs index e072115340..e6b4abfa79 100644 --- a/client/dvm/rpc/src/eth_pubsub.rs +++ b/client/dvm/rpc/src/eth_pubsub.rs @@ -1,24 +1,11 @@ -use crate::{frontier_backend_client, overrides::OverrideHandle}; pub use dvm_rpc_core::EthPubSubApiServer; -// --- darwinia-network --- -use dp_rpc::{ - pubsub::{Kind, Params, PubSubSyncStatus, Result as PubSubResult}, - Bytes, FilteredParams, Header, Log, Rich, -}; + +// --- std --- +use std::{collections::BTreeMap, iter, marker::PhantomData, sync::Arc}; +// --- crates.io --- use dvm_rpc_core::EthPubSubApi::{self as EthPubSubApiT}; use dvm_rpc_runtime_api::EthereumRuntimeRPCApi; -// --- paritytech --- -use sc_client_api::{ - backend::{Backend, StateBackend, StorageProvider}, - client::BlockchainEvents, -}; -use sc_network::{ExHashT, NetworkService}; -use sc_rpc::Metadata; -use sp_api::{BlockId, ProvideRuntimeApi}; -use sp_blockchain::{Error as BlockChainError, HeaderBackend, HeaderMetadata}; -use sp_runtime::traits::{BlakeTwo256, Block as BlockT, UniqueSaturatedInto}; -use sp_transaction_pool::TransactionPool; -// --- std --- +use ethereum::{BlockV0 as EthereumBlockV0, Log as EthereumLog, Receipt as EthereumReceipt}; use ethereum_types::{H256, U256}; use futures::{StreamExt as _, TryStreamExt as _}; use jsonrpc_core::{ @@ -33,7 +20,23 @@ use jsonrpc_pubsub::{ use log::warn; use rand::{distributions::Alphanumeric, thread_rng, Rng}; use sha3::{Digest, Keccak256}; -use std::{collections::BTreeMap, iter, marker::PhantomData, sync::Arc}; +// --- paritytech --- +use sc_client_api::{ + backend::{Backend, StateBackend, StorageProvider}, + client::BlockchainEvents, +}; +use sc_network::{ExHashT, NetworkService}; +use sc_rpc::Metadata; +use sc_transaction_pool_api::TransactionPool; +use sp_api::{BlockId, ProvideRuntimeApi}; +use sp_blockchain::{Error as BlockChainError, HeaderBackend, HeaderMetadata}; +use sp_runtime::traits::{BlakeTwo256, Block as BlockT, UniqueSaturatedInto}; +// --- darwinia-network --- +use crate::{frontier_backend_client, overrides::OverrideHandle}; +use dp_rpc::{ + pubsub::{Kind, Params, PubSubSyncStatus, Result as PubSubResult}, + Bytes, FilteredParams, Header, Log, Rich, +}; #[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)] pub struct HexEncodedIdProvider { @@ -52,6 +55,7 @@ impl IdProvider for HexEncodedIdProvider { let mut rng = thread_rng(); let id: String = iter::repeat(()) .map(|()| rng.sample(Alphanumeric)) + .map(char::from) .take(self.len) .collect(); @@ -97,7 +101,7 @@ impl SubscriptionResult { pub fn new() -> Self { SubscriptionResult {} } - pub fn new_heads(&self, block: ethereum::Block) -> PubSubResult { + pub fn new_heads(&self, block: EthereumBlockV0) -> PubSubResult { PubSubResult::Header(Box::new(Rich { inner: Header { hash: Some(H256::from_slice( @@ -128,8 +132,8 @@ impl SubscriptionResult { } pub fn logs( &self, - block: ethereum::Block, - receipts: Vec, + block: EthereumBlockV0, + receipts: Vec, params: &FilteredParams, ) -> Vec { let block_hash = Some(H256::from_slice( @@ -171,8 +175,8 @@ impl SubscriptionResult { fn add_log( &self, block_hash: H256, - ethereum_log: ðereum::Log, - block: ðereum::Block, + ethereum_log: &EthereumLog, + block: &EthereumBlockV0, params: &FilteredParams, ) -> bool { let log = Log { @@ -310,7 +314,7 @@ where }); } Kind::NewPendingTransactions => { - use sp_transaction_pool::InPoolTransaction; + use sc_transaction_pool_api::InPoolTransaction; self.subscriptions.add(subscriber, move |sink| { let stream = pool .import_notification_stream() diff --git a/client/dvm/rpc/src/lib.rs b/client/dvm/rpc/src/lib.rs index 0b3b5391b2..4e5118e9f5 100644 --- a/client/dvm/rpc/src/lib.rs +++ b/client/dvm/rpc/src/lib.rs @@ -23,13 +23,12 @@ pub use eth::{ Web3ApiServer, }; pub use eth_pubsub::{EthPubSubApi, EthPubSubApiServer, HexEncodedIdProvider}; -use ethereum::{ - Transaction as EthereumTransaction, TransactionMessage as EthereumTransactionMessage, -}; +pub use overrides::{OverrideHandle, RuntimeApiStorageOverride, SchemaV1Override, StorageOverride}; + +use ethereum::{LegacyTransactionMessage, TransactionSignature, TransactionV0}; use ethereum_types::{H160, H256}; use evm::{ExitError, ExitReason}; use jsonrpc_core::{Error, ErrorCode, Value}; -pub use overrides::{OverrideHandle, RuntimeApiStorageOverride, SchemaV1Override, StorageOverride}; use sha3::{Digest, Keccak256}; pub mod frontier_backend_client { @@ -242,13 +241,13 @@ pub fn error_on_execution_failure(reason: &ExitReason, data: &[u8]) -> Result<() } } -pub fn public_key(transaction: &EthereumTransaction) -> Result<[u8; 64], sp_io::EcdsaVerifyError> { +pub fn public_key(transaction: &TransactionV0) -> Result<[u8; 64], sp_io::EcdsaVerifyError> { let mut sig = [0u8; 65]; let mut msg = [0u8; 32]; sig[0..32].copy_from_slice(&transaction.signature.r()[..]); sig[32..64].copy_from_slice(&transaction.signature.s()[..]); sig[64] = transaction.signature.standard_v(); - msg.copy_from_slice(&EthereumTransactionMessage::from(transaction.clone()).hash()[..]); + msg.copy_from_slice(&LegacyTransactionMessage::from(transaction.clone()).hash()[..]); sp_io::crypto::secp256k1_ecdsa_recover(&sig, &msg) } @@ -260,9 +259,9 @@ pub trait EthSigner: Send + Sync { /// Sign a transaction message using the given account in message. fn sign( &self, - message: ethereum::TransactionMessage, + message: LegacyTransactionMessage, address: &H160, - ) -> Result; + ) -> Result; } pub struct EthDevSigner { @@ -298,9 +297,9 @@ impl EthSigner for EthDevSigner { fn sign( &self, - message: ethereum::TransactionMessage, + message: LegacyTransactionMessage, address: &H160, - ) -> Result { + ) -> Result { let mut transaction = None; for secret in &self.keys { @@ -324,14 +323,14 @@ impl EthSigner for EthDevSigner { let r = H256::from_slice(&rs[0..32]); let s = H256::from_slice(&rs[32..64]); - transaction = Some(ethereum::Transaction { + transaction = Some(TransactionV0 { nonce: message.nonce, gas_price: message.gas_price, gas_limit: message.gas_limit, action: message.action, value: message.value, input: message.input.clone(), - signature: ethereum::TransactionSignature::new(v, r, s) + signature: TransactionSignature::new(v, r, s) .ok_or(internal_err("signer generated invalid signature"))?, }); diff --git a/client/dvm/rpc/src/overrides/mod.rs b/client/dvm/rpc/src/overrides/mod.rs index 6b3552bfdf..f81bba852a 100644 --- a/client/dvm/rpc/src/overrides/mod.rs +++ b/client/dvm/rpc/src/overrides/mod.rs @@ -33,7 +33,7 @@ use sp_api::{BlockId, ProvideRuntimeApi}; use sp_io::hashing::{blake2_128, twox_128}; use sp_runtime::traits::Block as BlockT; // --- std --- -use ethereum::Block as EthereumBlock; +use ethereum::{BlockV0 as EthereumBlockV0}; use ethereum_types::{H160, H256, U256}; use std::{collections::BTreeMap, marker::PhantomData, sync::Arc}; @@ -53,7 +53,7 @@ pub trait StorageOverride { /// For a given account address and index, returns pallet_evm::AccountStorages. fn storage_at(&self, block: &BlockId, address: H160, index: U256) -> Option; /// Return the current block. - fn current_block(&self, block: &BlockId) -> Option; + fn current_block(&self, block: &BlockId) -> Option; /// Return the current receipt. fn current_receipts(&self, block: &BlockId) -> Option>; /// Return the current transaction status. @@ -119,7 +119,7 @@ where } /// Return the current block. - fn current_block(&self, block: &BlockId) -> Option { + fn current_block(&self, block: &BlockId) -> Option { self.client.runtime_api().current_block(&block).ok()? } diff --git a/client/dvm/rpc/src/overrides/schema_v1_override.rs b/client/dvm/rpc/src/overrides/schema_v1_override.rs index 4e0a2ee007..964795a54b 100644 --- a/client/dvm/rpc/src/overrides/schema_v1_override.rs +++ b/client/dvm/rpc/src/overrides/schema_v1_override.rs @@ -25,7 +25,7 @@ use sp_runtime::traits::{BlakeTwo256, Block as BlockT}; use sp_storage::StorageKey; // --- std --- use codec::Decode; -use ethereum::Block as EthereumBlock; +use ethereum::BlockV0 as EthereumBlockV0; use ethereum_types::{H160, H256, U256}; use std::{marker::PhantomData, sync::Arc}; @@ -102,8 +102,8 @@ where } /// Return the current block. - fn current_block(&self, block: &BlockId) -> Option { - self.query_storage::( + fn current_block(&self, block: &BlockId) -> Option { + self.query_storage::( block, &StorageKey(storage_prefix_build(b"Ethereum", b"CurrentBlock")), ) diff --git a/frame/balances/Cargo.toml b/frame/balances/Cargo.toml index 7b890d20f0..ca6122f953 100644 --- a/frame/balances/Cargo.toml +++ b/frame/balances/Cargo.toml @@ -17,18 +17,16 @@ log = { version = "0.4" } darwinia-balances-rpc-runtime-api = { default-features = false, path = "./rpc/runtime-api" } darwinia-support = { default-features = false, path = "../support" } # paritytech -frame-support = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -frame-system = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -max-encoded-len = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-runtime = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } +frame-support = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +frame-system = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-runtime = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } [dev-dependencies] # paritytech -max-encoded-len = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -pallet-transaction-payment = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-core = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-io = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } +pallet-transaction-payment = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-core = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-io = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } [features] default = ["std"] @@ -42,7 +40,6 @@ std = [ # paritytech "frame-support/std", "frame-system/std", - "max-encoded-len/std", "sp-runtime/std", "sp-std/std", ] diff --git a/frame/balances/rpc/Cargo.toml b/frame/balances/rpc/Cargo.toml index da9dc24f0f..69497a240d 100644 --- a/frame/balances/rpc/Cargo.toml +++ b/frame/balances/rpc/Cargo.toml @@ -18,6 +18,6 @@ jsonrpc-derive = { version = "15.1" } # darwinia-network darwinia-balances-rpc-runtime-api = { path = "./runtime-api" } # paritytech -sp-api = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-blockchain = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-runtime = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } +sp-api = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-blockchain = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-runtime = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } diff --git a/frame/balances/rpc/runtime-api/Cargo.toml b/frame/balances/rpc/runtime-api/Cargo.toml index 575655ab7b..ba3bd6178c 100644 --- a/frame/balances/rpc/runtime-api/Cargo.toml +++ b/frame/balances/rpc/runtime-api/Cargo.toml @@ -16,8 +16,8 @@ serde = { version = "1.0", optional = true, features = ["derive"] } # darwinia-network darwinia-support = { default-features = false, path = "../../../support" } # paritytech -sp-api = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-runtime = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } +sp-api = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-runtime = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } [features] default = ["std"] diff --git a/frame/balances/src/lib.rs b/frame/balances/src/lib.rs index c9505acb30..63c5ab1214 100644 --- a/frame/balances/src/lib.rs +++ b/frame/balances/src/lib.rs @@ -518,7 +518,7 @@ pub mod pallet { pub use imbalances::{NegativeImbalance, PositiveImbalance}; // --- crates.io --- - use codec::{Codec, EncodeLike}; + use codec::{Codec, EncodeLike, MaxEncodedLen}; // --- paritytech --- use frame_support::{ ensure, @@ -527,8 +527,8 @@ pub mod pallet { fungible::Inspect, tokens::{DepositConsequence, WithdrawConsequence}, BalanceStatus, Currency, ExistenceRequirement, Imbalance, LockIdentifier, - MaxEncodedLen, NamedReservableCurrency, OnUnbalanced, ReservableCurrency, - SignedImbalance, StoredMap, TryDrop, WithdrawReasons, + NamedReservableCurrency, OnUnbalanced, ReservableCurrency, SignedImbalance, StoredMap, + TryDrop, WithdrawReasons, }, WeakBoundedVec, }; @@ -537,7 +537,7 @@ pub mod pallet { use sp_runtime::{ traits::{ AtLeast32BitUnsigned, Bounded, CheckedAdd, CheckedSub, MaybeSerializeDeserialize, - Saturating, StaticLookup, StoredMapError, Zero, + Saturating, StaticLookup, Zero, }, ArithmeticError, DispatchError, DispatchResult, RuntimeDebug, }; @@ -578,9 +578,11 @@ pub mod pallet { /// The maximum number of locks that should exist on an account. /// Not strictly enforced, but used for weight estimation. + #[pallet::constant] type MaxLocks: Get; /// The maximum number of named reserves that can exist on an account. + #[pallet::constant] type MaxReserves: Get; /// The id type for named reserves. @@ -1109,8 +1111,8 @@ pub mod pallet { pub fn mutate_account( who: &T::AccountId, f: impl FnOnce(&mut T::BalanceInfo) -> R, - ) -> Result { - Self::try_mutate_account(who, |a, _| -> Result { Ok(f(a)) }) + ) -> Result { + Self::try_mutate_account(who, |a, _| -> Result { Ok(f(a)) }) } /// Mutate an account to some new value, or delete it entirely with `None`. Will enforce @@ -1122,7 +1124,7 @@ pub mod pallet { /// /// NOTE: LOW-LEVEL: This will not attempt to maintain total issuance. It is expected that /// the caller will do this. - fn try_mutate_account>( + fn try_mutate_account>( who: &T::AccountId, f: impl FnOnce(&mut T::BalanceInfo, bool) -> Result, ) -> Result { @@ -1145,7 +1147,7 @@ pub mod pallet { /// /// NOTE: LOW-LEVEL: This will not attempt to maintain total issuance. It is expected that /// the caller will do this. - fn try_mutate_account_with_dust>( + fn try_mutate_account_with_dust>( who: &T::AccountId, f: impl FnOnce(&mut T::BalanceInfo, bool) -> Result, ) -> Result<(R, DustCleaner), E> { @@ -1421,7 +1423,7 @@ pub mod pallet { let allow_death = existence_requirement == ExistenceRequirement::AllowDeath; let allow_death = allow_death - && !>::is_provider_required(transactor); + && >::can_dec_provider(transactor); ensure!( allow_death || from_account.total() >= ed || !T::OtherCurrencies::is_dust( @@ -1468,7 +1470,7 @@ pub mod pallet { who, |account, _is_new| - -> Result<(Self::NegativeImbalance, Self::Balance), StoredMapError> { + -> Result<(Self::NegativeImbalance, Self::Balance), DispatchError> { // Best value is the most amount we can slash following liveness rules. let best_value = match attempt { // First attempt we try to slash the full amount, and see if liveness issues happen. diff --git a/frame/balances/src/tests.rs b/frame/balances/src/tests.rs index c6698cb162..847239a248 100644 --- a/frame/balances/src/tests.rs +++ b/frame/balances/src/tests.rs @@ -73,6 +73,30 @@ macro_rules! decl_tests { }); } + #[test] + fn reap_failed_due_to_provider_and_consumer() { + <$ext_builder>::default().existential_deposit(1).monied(true).build().execute_with(|| { + // SCENARIO: only one provider and there are remaining consumers. + assert_ok!(System::inc_consumers(&1)); + assert!(!System::can_dec_provider(&1)); + assert_noop!( + >::transfer(&1, &2, 10, ExistenceRequirement::AllowDeath), + RingError::KeepAlive + ); + assert!(System::account_exists(&1)); + assert_eq!(Ring::free_balance(1), 10); + + // SCENARIO: more than one provider, but will not kill account due to other provider. + assert_eq!(System::inc_providers(&1), frame_system::IncRefStatus::Existed); + assert_eq!(System::providers(&1), 2); + assert!(System::can_dec_provider(&1)); + assert_ok!(>::transfer(&1, &2, 10, ExistenceRequirement::AllowDeath)); + assert_eq!(System::providers(&1), 1); + assert!(System::account_exists(&1)); + assert_eq!(Ring::free_balance(1), 0); + }); + } + #[test] fn partial_locking_should_work() { <$ext_builder>::default() diff --git a/frame/balances/src/tests_local.rs b/frame/balances/src/tests_local.rs index 717c309731..ec05b9b87a 100644 --- a/frame/balances/src/tests_local.rs +++ b/frame/balances/src/tests_local.rs @@ -19,13 +19,13 @@ //! Test utilities // --- crates.io --- -use codec::{Decode, Encode}; +use codec::{Decode, Encode, MaxEncodedLen}; // --- paritytech --- use frame_support::{ assert_err, assert_noop, assert_ok, assert_storage_noop, parameter_types, traits::{ - BalanceStatus, Currency, ExistenceRequirement, GenesisBuild, Imbalance, LockIdentifier, - MaxEncodedLen, NamedReservableCurrency, ReservableCurrency, StorageMapShim, + BalanceStatus, Currency, Everything, ExistenceRequirement, GenesisBuild, Imbalance, + LockIdentifier, NamedReservableCurrency, ReservableCurrency, StorageMapShim, WithdrawReasons, }, weights::{DispatchInfo, IdentityFee, Weight}, @@ -54,7 +54,7 @@ parameter_types! { frame_system::limits::BlockWeights::simple_max(1024); } impl frame_system::Config for Test { - type BaseCallFilter = (); + type BaseCallFilter = Everything; type BlockWeights = BlockWeights; type BlockLength = (); type DbWeight = (); diff --git a/frame/balances/src/tests_reentrancy.rs b/frame/balances/src/tests_reentrancy.rs index dd445d4684..c40f8e2481 100644 --- a/frame/balances/src/tests_reentrancy.rs +++ b/frame/balances/src/tests_reentrancy.rs @@ -19,12 +19,12 @@ //! Test setup for potential reentracy and lost updates of nested mutations. // --- crates.io --- -use codec::{Decode, Encode}; +use codec::{Decode, Encode, MaxEncodedLen}; // --- paritytech --- use frame_support::{ assert_ok, traits::{ - BalanceStatus, Currency, GenesisBuild, MaxEncodedLen, OnUnbalanced, ReservableCurrency, + BalanceStatus, Currency, Everything, GenesisBuild, OnUnbalanced, ReservableCurrency, StorageMapShim, }, weights::IdentityFee, @@ -50,7 +50,7 @@ frame_support::parameter_types! { pub static ExistentialDeposit: Balance = 0; } impl frame_system::Config for Test { - type BaseCallFilter = (); + type BaseCallFilter = Everything; type BlockWeights = BlockWeights; type BlockLength = (); type DbWeight = (); diff --git a/frame/bridge/bsc/Cargo.toml b/frame/bridge/bsc/Cargo.toml index 504ef77e3e..4ec71dfa5f 100644 --- a/frame/bridge/bsc/Cargo.toml +++ b/frame/bridge/bsc/Cargo.toml @@ -15,19 +15,19 @@ codec = { package = "parity-scale-codec", version = "2.1", default-features = fa # darwinia-network bsc-primitives = { default-features = false, path = "../../../primitives/bsc" } # paritytech -frame-support = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -frame-system = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-core = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-io = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-runtime = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } +frame-support = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +frame-system = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-core = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-io = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-runtime = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } [dev-dependencies] # crates.io array-bytes = { version = "1.4" } serde_json = { version = "1.0" } # paritytech -pallet-timestamp = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } +pallet-timestamp = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } [features] default = ["std"] diff --git a/frame/bridge/bsc/src/mock.rs b/frame/bridge/bsc/src/mock.rs index fb1a1fa4ed..8a5ee739e8 100644 --- a/frame/bridge/bsc/src/mock.rs +++ b/frame/bridge/bsc/src/mock.rs @@ -19,7 +19,7 @@ // --- std --- use std::time::{SystemTime, UNIX_EPOCH}; // --- paritytech --- -use frame_support::traits::GenesisBuild; +use frame_support::traits::{Everything, GenesisBuild}; use frame_system::mocking::*; use sp_core::U256; use sp_io::TestExternalities; @@ -36,7 +36,7 @@ pub type BlockNumber = u64; pub type BSCError = Error; impl frame_system::Config for Test { - type BaseCallFilter = (); + type BaseCallFilter = Everything; type BlockWeights = (); type BlockLength = (); type DbWeight = (); diff --git a/frame/bridge/ethereum/Cargo.toml b/frame/bridge/ethereum/Cargo.toml index 45fa819fcc..de63f2909c 100644 --- a/frame/bridge/ethereum/Cargo.toml +++ b/frame/bridge/ethereum/Cargo.toml @@ -15,7 +15,7 @@ version = "2.7.0" array-bytes = { version = "1.4" } blake2-rfc = { version = "0.2", default-features = false } codec = { package = "parity-scale-codec", version = "2.1", default-features = false } -ethereum-types = { version = "0.11", default-features = false } +ethereum-types = { version = "0.12", default-features = false } rlp = { version = "0.5", default-features = false } serde = { version = "1.0", optional = true } serde_json = { version = "1.0", optional = true } @@ -26,20 +26,19 @@ darwinia-relayer-game = { default-features = false, path = "../relayer-game" darwinia-support = { default-features = false, path = "../../support" } ethereum-primitives = { default-features = false, features = ["full-codec", "full-rlp"], path = "../../../primitives/ethereum" } # paritytech -frame-support = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -frame-system = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-core = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-runtime = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } +frame-support = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +frame-system = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-core = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-runtime = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } [dev-dependencies] # darwinia-network darwinia-balances = { path = "../../balances" } ethereum-primitives = { features = ["full-serde"], path = "../../../primitives/ethereum" } # paritytech -max-encoded-len = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-core = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-io = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } +sp-core = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-io = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } [features] default = ["std"] diff --git a/frame/bridge/ethereum/src/mock.rs b/frame/bridge/ethereum/src/mock.rs index 502e103dbc..501910d5d6 100644 --- a/frame/bridge/ethereum/src/mock.rs +++ b/frame/bridge/ethereum/src/mock.rs @@ -18,8 +18,10 @@ //! Mock file for ethereum-relay. +// --- crates.io --- +use codec::MaxEncodedLen; // --- paritytech --- -use frame_support::traits::{MaxEncodedLen, OnInitialize}; +use frame_support::traits::{Everything, OnInitialize}; use frame_system::{mocking::*, EnsureRoot}; use sp_core::H256; use sp_runtime::{testing::Header, traits::IdentityLookup, RuntimeDebug}; @@ -36,7 +38,7 @@ pub type Balance = u128; darwinia_support::impl_test_account_data! {} impl frame_system::Config for Test { - type BaseCallFilter = (); + type BaseCallFilter = Everything; type BlockWeights = (); type BlockLength = (); type DbWeight = (); diff --git a/frame/bridge/relay-authorities/Cargo.toml b/frame/bridge/relay-authorities/Cargo.toml index 08288dd4ef..4cfedda6e7 100644 --- a/frame/bridge/relay-authorities/Cargo.toml +++ b/frame/bridge/relay-authorities/Cargo.toml @@ -17,10 +17,10 @@ log = { version = "0.4" } darwinia-relay-primitives = { default-features = false, path = "../../../primitives/relay" } darwinia-support = { default-features = false, path = "../../support" } # paritytech -frame-support = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -frame-system = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-runtime = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } +frame-support = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +frame-system = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-runtime = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } [dev-dependencies] # crates.io @@ -30,10 +30,9 @@ darwinia-balances = { path = "../../balances" } darwinia-header-mmr = { features = ["easy-testing"], path = "../../header-mmr" } darwinia-support = { path = "../../support" } # paritytech -max-encoded-len = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-core = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-io = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-tracing = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } +sp-core = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-io = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-tracing = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } [features] default = ["std"] diff --git a/frame/bridge/relay-authorities/src/mock.rs b/frame/bridge/relay-authorities/src/mock.rs index 1ec4e2f9e2..82c7e9469e 100644 --- a/frame/bridge/relay-authorities/src/mock.rs +++ b/frame/bridge/relay-authorities/src/mock.rs @@ -19,9 +19,9 @@ //! # Mock file for relay authorities // --- crates.io --- -use codec::{Decode, Encode}; +use codec::{Decode, Encode, MaxEncodedLen}; // --- paritytech --- -use frame_support::traits::{GenesisBuild, MaxEncodedLen, OnFinalize, OnInitialize}; +use frame_support::traits::{Everything, GenesisBuild, OnFinalize, OnInitialize}; use frame_system::{mocking::*, EnsureRoot}; use sp_core::H256; use sp_io::{hashing, TestExternalities}; @@ -50,7 +50,7 @@ pub const DEFAULT_SIGNATURE: [u8; 65] = [0; 65]; darwinia_support::impl_test_account_data! {} impl frame_system::Config for Test { - type BaseCallFilter = (); + type BaseCallFilter = Everything; type BlockWeights = (); type BlockLength = (); type DbWeight = (); diff --git a/frame/bridge/relayer-game/Cargo.toml b/frame/bridge/relayer-game/Cargo.toml index 41a2d32759..27241b8dda 100644 --- a/frame/bridge/relayer-game/Cargo.toml +++ b/frame/bridge/relayer-game/Cargo.toml @@ -17,22 +17,21 @@ log = { version = "0.4" } darwinia-relay-primitives = { default-features = false, path = "../../../primitives/relay" } darwinia-support = { default-features = false, path = "../../support" } # paritytech -frame-support = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -frame-system = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-runtime = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } +frame-support = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +frame-system = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-runtime = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } [dev-dependencies] # crates.io -env_logger = { version = "0.8" } +env_logger = { version = "0.9" } rand = { version = "0.8" } serde = { version = "1.0" } # darwinia-network darwinia-balances = { path = "../../balances" } # paritytech -max-encoded-len = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-core = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-io = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } +sp-core = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-io = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } [features] default = ["std"] diff --git a/frame/bridge/relayer-game/src/mock.rs b/frame/bridge/relayer-game/src/mock.rs index f0a07d2f8b..0b134fce03 100644 --- a/frame/bridge/relayer-game/src/mock.rs +++ b/frame/bridge/relayer-game/src/mock.rs @@ -225,9 +225,9 @@ pub mod mock_relay { } // --- crates.io --- -use codec::{Decode, Encode}; +use codec::{Decode, Encode, MaxEncodedLen}; // --- paritytech --- -use frame_support::traits::{GenesisBuild, MaxEncodedLen, OnFinalize}; +use frame_support::traits::{Everything, GenesisBuild, OnFinalize}; use frame_system::mocking::*; use sp_runtime::RuntimeDebug; // --- darwinia-network --- @@ -247,7 +247,7 @@ pub type RelayerGameError = Error; darwinia_support::impl_test_account_data! {} impl frame_system::Config for Test { - type BaseCallFilter = (); + type BaseCallFilter = Everything; type BlockWeights = (); type BlockLength = (); type DbWeight = (); diff --git a/frame/claims/Cargo.toml b/frame/claims/Cargo.toml index d9156a7dc7..ad4dec5013 100644 --- a/frame/claims/Cargo.toml +++ b/frame/claims/Cargo.toml @@ -19,11 +19,11 @@ serde_json = { version = "1.0", optional = true } # darwinia-network darwinia-support = { default-features = false, path = "../support" } # paritytech -frame-support = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -frame-system = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-io = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-runtime = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } +frame-support = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +frame-system = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-io = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-runtime = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } [dev-dependencies] # crates.io @@ -31,8 +31,7 @@ libsecp256k1 = { version = "0.3" } # darwinia-network darwinia-balances = { path = "../balances" } # paritytech -max-encoded-len = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-core = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } +sp-core = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } [features] default = ["std"] diff --git a/frame/claims/src/lib.rs b/frame/claims/src/lib.rs index c163c6a88e..c17cf54b6d 100644 --- a/frame/claims/src/lib.rs +++ b/frame/claims/src/lib.rs @@ -579,13 +579,13 @@ mod secp_utils { #[cfg(test)] mod tests { // --- crates.io --- - use codec::Encode; + use codec::{Encode, MaxEncodedLen}; // --- paritytech --- use frame_support::{ assert_err, assert_noop, assert_ok, dispatch::DispatchError::BadOrigin, ord_parameter_types, parameter_types, - traits::{GenesisBuild, MaxEncodedLen}, + traits::{Everything, GenesisBuild}, }; use frame_system::mocking::*; use sp_core::H256; @@ -607,7 +607,7 @@ mod tests { darwinia_support::impl_test_account_data! {} impl frame_system::Config for Test { - type BaseCallFilter = (); + type BaseCallFilter = Everything; type BlockWeights = (); type BlockLength = (); type DbWeight = (); diff --git a/frame/democracy/Cargo.toml b/frame/democracy/Cargo.toml index 74f0482a32..4dcb0a4d98 100644 --- a/frame/democracy/Cargo.toml +++ b/frame/democracy/Cargo.toml @@ -16,11 +16,11 @@ serde = { version = "1.0", optional = true, features = ["derive"] } # darwinia-network darwinia-support = { default-features = false, path = "../support" } # paritytech -frame-support = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -frame-system = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-io = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-runtime = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } +frame-support = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +frame-system = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-io = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-runtime = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } [dev-dependencies] # crates.io @@ -29,11 +29,10 @@ hex-literal = { version = "0.3" } darwinia-balances = { path = "../balances" } darwinia-support = { features = ["easy-testing"], path = "../support" } # paritytech -max-encoded-len = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -pallet-scheduler = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-core = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-storage = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -substrate-test-utils = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } +pallet-scheduler = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-core = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-storage = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +substrate-test-utils = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } [features] default = ["std"] diff --git a/frame/democracy/src/lib.rs b/frame/democracy/src/lib.rs index 314ba7c7fe..80d91ed673 100644 --- a/frame/democracy/src/lib.rs +++ b/frame/democracy/src/lib.rs @@ -290,6 +290,7 @@ pub mod pallet { /// Indicator for whether an emergency origin is even allowed to happen. Some chains may want /// to set this permanently to `false`, others may want to condition it on things such as /// an upgrade having happened recently. + #[pallet::constant] type InstantAllowed: Get; /// Minimum voting period allowed for a fast-track referendum. @@ -344,6 +345,7 @@ pub mod pallet { type WeightInfo: WeightInfo; /// The maximum number of public proposals that can exist at any time. + #[pallet::constant] type MaxProposals: Get; } @@ -502,8 +504,8 @@ pub mod pallet { NotPassed(ReferendumIndex), /// A referendum has been cancelled. \[ref_index\] Cancelled(ReferendumIndex), - /// A proposal has been enacted. \[ref_index, is_ok\] - Executed(ReferendumIndex, bool), + /// A proposal has been enacted. \[ref_index, result\] + Executed(ReferendumIndex, DispatchResult), /// An account has delegated their vote to another account. \[who, target\] Delegated(T::AccountId, T::AccountId), /// An \[account\] has cancelled a previous delegation operation. @@ -524,8 +526,6 @@ pub mod pallet { /// A registered preimage was removed and the deposit collected by the reaper. /// \[proposal_hash, provider, deposit, reaper\] PreimageReaped(T::Hash, T::AccountId, BalanceOf, T::AccountId), - /// An \[account\] has been unlocked successfully. - Unlocked(T::AccountId), /// A proposal \[hash\] has been blacklisted permanently. Blacklisted(T::Hash), } @@ -536,8 +536,6 @@ pub mod pallet { ValueLow, /// Proposal does not exist ProposalMissing, - /// Unknown index - BadIndex, /// Cannot cancel the same proposal twice AlreadyCanceled, /// Proposal already made @@ -552,8 +550,6 @@ pub mod pallet { NoProposal, /// Identity may not veto a proposal twice AlreadyVetoed, - /// Not delegated - NotDelegated, /// Preimage already noted DuplicatePreimage, /// Not imminent @@ -570,10 +566,6 @@ pub mod pallet { PreimageInvalid, /// No proposals waiting NoneWaiting, - /// The target account does not have a lock. - NotLocked, - /// The lock on the account to be unlocked has not yet expired. - NotExpired, /// The given account did not vote on the referendum. NotVoter, /// The actor has no permission to conduct the action. @@ -595,8 +587,6 @@ pub mod pallet { WrongUpperBound, /// Maximum number of votes reached. MaxVotesReached, - /// The provided witness data is wrong. - InvalidWitness, /// Maximum number of proposals reached. TooManyProposals, } @@ -1747,10 +1737,11 @@ impl Pallet { debug_assert!(err_amount.is_zero()); Self::deposit_event(Event::::PreimageUsed(proposal_hash, provider, deposit)); - let ok = proposal + let res = proposal .dispatch(frame_system::RawOrigin::Root.into()) - .is_ok(); - Self::deposit_event(Event::::Executed(index, ok)); + .map(|_| ()) + .map_err(|e| e.error); + Self::deposit_event(Event::::Executed(index, res)); Ok(()) } else { diff --git a/frame/democracy/src/tests.rs b/frame/democracy/src/tests.rs index ddaf1d390c..1ede4643af 100644 --- a/frame/democracy/src/tests.rs +++ b/frame/democracy/src/tests.rs @@ -2,11 +2,11 @@ use super::*; use crate as pallet_democracy; -use codec::Encode; +use codec::{Encode, MaxEncodedLen}; use darwinia_balances::Error as BalancesError; use frame_support::{ assert_noop, assert_ok, ord_parameter_types, parameter_types, - traits::{Filter, GenesisBuild, MaxEncodedLen, OnInitialize, SortedMembers}, + traits::{Contains, GenesisBuild, OnInitialize, SortedMembers}, weights::Weight, }; use frame_system::{EnsureRoot, EnsureSignedBy}; @@ -65,8 +65,8 @@ frame_support::construct_runtime!( // Test that a fitlered call can be dispatched. pub struct BaseFilter; -impl Filter for BaseFilter { - fn filter(call: &Call) -> bool { +impl Contains for BaseFilter { + fn contains(call: &Call) -> bool { !matches!( call, &Call::Balances(darwinia_balances::Call::<_, RingInstance>::set_balance(..)) @@ -235,7 +235,7 @@ fn set_balance_proposal(value: u64) -> Vec { fn set_balance_proposal_is_correctly_filtered_out() { for i in 0..10 { let call = Call::decode(&mut &set_balance_proposal(i)[..]).unwrap(); - assert!(!::BaseCallFilter::filter( + assert!(!::BaseCallFilter::contains( &call )); } diff --git a/frame/dvm-dynamic-fee/Cargo.toml b/frame/dvm-dynamic-fee/Cargo.toml index a02674098d..0a997a4bca 100644 --- a/frame/dvm-dynamic-fee/Cargo.toml +++ b/frame/dvm-dynamic-fee/Cargo.toml @@ -17,15 +17,15 @@ codec = { package = "parity-scale-codec", version = "2.1", default-feature # darwinia-network darwinia-evm = { default-features = false, path = "../evm" } # paritytech -frame-support = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -frame-system = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-core = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-inherents = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-runtime = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } +frame-support = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +frame-system = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-core = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-inherents = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-runtime = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } [dev-dependencies] -pallet-timestamp = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-io = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } +pallet-timestamp = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-io = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } [features] default = ["std"] diff --git a/frame/dvm-dynamic-fee/src/lib.rs b/frame/dvm-dynamic-fee/src/lib.rs index 1a8c87522e..ebcc03c5ec 100644 --- a/frame/dvm-dynamic-fee/src/lib.rs +++ b/frame/dvm-dynamic-fee/src/lib.rs @@ -173,7 +173,7 @@ mod tests { use frame_support::{ assert_ok, parameter_types, - traits::{OnFinalize, OnInitialize}, + traits::{Everything, OnFinalize, OnInitialize}, }; use sp_core::{H256, U256}; use sp_io::TestExternalities; @@ -198,7 +198,7 @@ mod tests { frame_system::limits::BlockWeights::simple_max(1024); } impl frame_system::Config for Test { - type BaseCallFilter = (); + type BaseCallFilter = Everything; type BlockWeights = (); type BlockLength = (); type DbWeight = (); diff --git a/frame/dvm/Cargo.toml b/frame/dvm/Cargo.toml index 99f0d06efd..a1457bd491 100644 --- a/frame/dvm/Cargo.toml +++ b/frame/dvm/Cargo.toml @@ -12,9 +12,9 @@ version = "2.7.0" [dependencies] # crates.io codec = { package = "parity-scale-codec", version = "2.1", default-features = false } -ethereum = { version = "0.7", default-features = false, features = ["with-codec"] } -ethereum-types = { version = "0.11", default-features = false } -evm = { version = "0.27", default-features = false, features = ["with-codec"] } +ethereum = { version = "0.9", default-features = false, features = ["with-codec"] } +ethereum-types = { version = "0.12", default-features = false } +evm = { version = "0.30", default-features = false, features = ["with-codec"] } libsecp256k1 = { version = "0.5", default-features = false, features = ["static-context", "hmac"] } log = { version = "0.4" } rlp = { version = "0.5", default-features = false } @@ -28,24 +28,22 @@ dp-evm = { default-features = false, path = "../../primitives/evm" dp-storage = { default-features = false, path = "../../primitives/storage" } dvm-rpc-runtime-api = { default-features = false, path = "./rpc/runtime-api" } # paritytech -frame-support = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -frame-system = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -pallet-timestamp = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-core = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-io = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-runtime = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } +frame-support = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +frame-system = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +pallet-timestamp = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-core = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-io = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-runtime = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } [dev-dependencies] # crates.io array-bytes = { version = "1.4" } -ethabi = { git = "https://github.com/darwinia-network/ethabi", tag = "v13.0.0-no-std" } +ethabi = { version = "15.0" } # darwinia-network darwinia-balances = { path = "../balances" } darwinia-evm-precompile-simple = { path = "../evm/precompile/contracts/simple" } darwinia-evm-precompile-transfer = { path = "../evm/precompile/contracts/transfer" } -# paritytech -max-encoded-len = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } [features] default = ["std"] diff --git a/frame/dvm/rpc/Cargo.toml b/frame/dvm/rpc/Cargo.toml index 9a8d089774..b2646ff312 100644 --- a/frame/dvm/rpc/Cargo.toml +++ b/frame/dvm/rpc/Cargo.toml @@ -12,8 +12,8 @@ version = "2.7.0" [dependencies] # crates.io codec = { package = "parity-scale-codec", version = "2.1", default-features = false } -ethereum = { version = "0.7", default-features = false, features = ["with-codec"] } -ethereum-types = { version = "0.11", default-features = false } +ethereum = { version = "0.9", default-features = false, features = ["with-codec"] } +ethereum-types = { version = "0.12", default-features = false } jsonrpc-core = { version = "15.1" } jsonrpc-derive = { version = "15.1" } jsonrpc-pubsub = { version = "15.1" } @@ -23,10 +23,10 @@ darwinia-evm = { default-features = false, path = "../../evm" } dp-evm = { default-features = false, path = "../../../primitives/evm" } dp-rpc = { optional = true, path = "../../../primitives/rpc" } # paritytech -sp-api = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-core = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-runtime = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } +sp-api = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-core = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-runtime = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } [features] default = ["std"] diff --git a/frame/dvm/rpc/runtime-api/Cargo.toml b/frame/dvm/rpc/runtime-api/Cargo.toml index bef92c8648..5cfbe44bde 100644 --- a/frame/dvm/rpc/runtime-api/Cargo.toml +++ b/frame/dvm/rpc/runtime-api/Cargo.toml @@ -12,18 +12,18 @@ version = "2.7.0" [dependencies] # crates.io codec = { package = "parity-scale-codec", version = "2.1", default-features = false } -ethereum = { version = "0.7", default-features = false, features = ["with-codec"] } -ethereum-types = { version = "0.11", default-features = false } +ethereum = { version = "0.9", default-features = false, features = ["with-codec"] } +ethereum-types = { version = "0.12", default-features = false } # darwinia-network darwinia-evm = { default-features = false, path = "../../../evm" } darwinia-support = { default-features = false, path = "../../../support" } dp-evm = { default-features = false, path = "../../../../primitives/evm" } # paritytech -sp-api = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-core = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-io = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-runtime = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } +sp-api = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-core = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-io = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-runtime = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } [features] default = ["std"] diff --git a/frame/dvm/rpc/runtime-api/src/lib.rs b/frame/dvm/rpc/runtime-api/src/lib.rs index 629675ea0a..e9d692bbaf 100644 --- a/frame/dvm/rpc/runtime-api/src/lib.rs +++ b/frame/dvm/rpc/runtime-api/src/lib.rs @@ -18,7 +18,7 @@ #![cfg_attr(not(feature = "std"), no_std)] use codec::{Decode, Encode}; -use ethereum::{Block as EthereumBlock, Log}; +use ethereum::{BlockV0 as EthereumBlockV0, Log}; use ethereum_types::Bloom; use sp_core::{H160, H256, U256}; use sp_runtime::traits::Block as BlockT; @@ -86,24 +86,24 @@ sp_api::decl_runtime_apis! { estimate: bool, ) -> Result; /// Return the current block. - fn current_block() -> Option; + fn current_block() -> Option; /// Return the current receipt. fn current_receipts() -> Option>; /// Return the current transaction status. fn current_transaction_statuses() -> Option>; /// Return all the current data for a block in a single runtime call. fn current_all() -> ( - Option, + Option, Option>, Option> ); /// Receives a `Vec` and filters all the ethereum transactions. fn extrinsic_filter( xts: Vec<::Extrinsic>, - ) -> Vec; + ) -> Vec; } } pub trait ConvertTransaction { - fn convert_transaction(&self, transaction: ethereum::Transaction) -> E; + fn convert_transaction(&self, transaction: ethereum::TransactionV0) -> E; } diff --git a/frame/dvm/src/lib.rs b/frame/dvm/src/lib.rs index b4b1264bdb..4315a85062 100644 --- a/frame/dvm/src/lib.rs +++ b/frame/dvm/src/lib.rs @@ -29,7 +29,8 @@ pub mod account_basic; use dvm_rpc_runtime_api::TransactionStatus; #[doc(no_inline)] pub use ethereum::{ - Block, Log, Receipt, Transaction, TransactionAction, TransactionMessage, TransactionSignature, + BlockV0 as EthereumBlockV0, LegacyTransactionMessage, Log, Receipt as EthereumReceipt, + TransactionAction, TransactionSignature, TransactionV0, }; #[cfg(all(feature = "std", test))] @@ -146,7 +147,7 @@ pub mod pallet { #[pallet::weight(::GasWeightMapping::gas_to_weight(transaction.gas_limit.unique_saturated_into()))] pub fn transact( origin: OriginFor, - transaction: ethereum::Transaction, + transaction: TransactionV0, ) -> DispatchResultWithPostInfo { ensure_none(origin)?; @@ -273,19 +274,16 @@ pub mod pallet { /// Current building block's transactions and receipts. #[pallet::storage] - pub(super) type Pending = StorageValue< - _, - Vec<(ethereum::Transaction, TransactionStatus, ethereum::Receipt)>, - ValueQuery, - >; + pub(super) type Pending = + StorageValue<_, Vec<(TransactionV0, TransactionStatus, EthereumReceipt)>, ValueQuery>; /// The current Ethereum block. #[pallet::storage] - pub(super) type CurrentBlock = StorageValue<_, ethereum::Block>; + pub(super) type CurrentBlock = StorageValue<_, EthereumBlockV0>; /// The current Ethereum receipts. #[pallet::storage] - pub(super) type CurrentReceipts = StorageValue<_, Vec>; + pub(super) type CurrentReceipts = StorageValue<_, Vec>; /// The current transaction statuses. #[pallet::storage] @@ -337,7 +335,7 @@ impl Pallet { /// Execute transaction from EthApi(network transaction) /// NOTE: For the rpc transaction, the execution will return ok(..) even when encounters error /// from evm runner - pub fn rpc_transact(transaction: ethereum::Transaction) -> DispatchResultWithPostInfo { + pub fn rpc_transact(transaction: TransactionV0) -> DispatchResultWithPostInfo { ensure!( dp_consensus::find_pre_log(&>::digest()).is_err(), Error::::PreLogExists, @@ -405,7 +403,7 @@ impl Pallet { ), }; - let receipt = ethereum::Receipt { + let receipt = EthereumReceipt { state_root: match reason { ExitReason::Succeed(_) => H256::from_low_u64_be(1), ExitReason::Error(_) => H256::from_low_u64_le(0), @@ -433,7 +431,7 @@ impl Pallet { CurrentTransactionStatuses::::get() } /// Get current block. - pub fn current_block() -> Option { + pub fn current_block() -> Option { CurrentBlock::::get() } @@ -443,7 +441,7 @@ impl Pallet { } /// Get receipts by number. - pub fn current_receipts() -> Option> { + pub fn current_receipts() -> Option> { CurrentReceipts::::get() } @@ -492,9 +490,7 @@ impl Pallet { } /// Transfer rpc transaction to dvm transaction - fn to_dvm_transaction( - transaction: ethereum::Transaction, - ) -> Result { + fn to_dvm_transaction(transaction: TransactionV0) -> Result { let source = recover_signer(&transaction).ok_or(Error::::InvalidSignature)?; Ok(DVMTransaction { source, @@ -539,7 +535,7 @@ impl Pallet { mix_hash: H256::default(), nonce: H64::default(), }; - let block = ethereum::Block::new(partial_header, transactions, ommers); + let block = EthereumBlockV0::new(partial_header, transactions, ommers); CurrentBlock::::put(block.clone()); CurrentReceipts::::put(receipts); diff --git a/frame/dvm/src/mock.rs b/frame/dvm/src/mock.rs index 3b9f8379d9..82e043b06c 100644 --- a/frame/dvm/src/mock.rs +++ b/frame/dvm/src/mock.rs @@ -19,13 +19,13 @@ //! Test utilities // --- crates.io --- -use codec::{Decode, Encode}; +use codec::{Decode, Encode, MaxEncodedLen}; use ethereum::{TransactionAction, TransactionSignature}; use evm::{executor::PrecompileOutput, Context, ExitError}; use rlp::RlpStream; // --- paritytech --- use frame_support::{ - traits::{FindAuthor, GenesisBuild, MaxEncodedLen}, + traits::{Everything, FindAuthor, GenesisBuild}, ConsensusEngineId, PalletId, }; use frame_system::mocking::*; @@ -57,7 +57,7 @@ frame_support::parameter_types! { pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75); } impl frame_system::Config for Test { - type BaseCallFilter = (); + type BaseCallFilter = Everything; type BlockWeights = (); type BlockLength = (); type DbWeight = (); @@ -260,7 +260,7 @@ impl UnsignedTransaction { H256::from_slice(&Keccak256::digest(&stream.out()).as_slice()) } - pub fn sign(&self, key: &H256) -> Transaction { + pub fn sign(&self, key: &H256) -> TransactionV0 { let hash = self.signing_hash(); let msg = libsecp256k1::Message::parse(hash.as_fixed_bytes()); let s = libsecp256k1::sign( @@ -276,7 +276,7 @@ impl UnsignedTransaction { ) .unwrap(); - Transaction { + TransactionV0 { nonce: self.nonce, gas_price: self.gas_price, gas_limit: self.gas_limit, diff --git a/frame/dvm/src/tests.rs b/frame/dvm/src/tests.rs index 9714d0a020..4c0e683139 100644 --- a/frame/dvm/src/tests.rs +++ b/frame/dvm/src/tests.rs @@ -19,7 +19,7 @@ // --- crates.io --- use array_bytes::{bytes2hex, hex2bytes_unchecked}; use codec::Decode; -use ethabi::{Function, Param, ParamType, Token}; +use ethabi::{Function, Param, ParamType, StateMutability, Token}; use ethereum::TransactionSignature; use evm::ExitSucceed; use std::str::FromStr; @@ -173,59 +173,70 @@ fn get_wkton_balance(sender: &AccountInfo, nonce: u64) -> U256 { } fn wkton_balance_input(address: H160) -> Vec { + #[allow(deprecated)] let func = Function { name: "balanceOf".to_owned(), inputs: vec![Param { name: "address".to_owned(), kind: ParamType::Address, + internal_type: Some("address".into()), }], outputs: vec![], - constant: false, + constant: true, + state_mutability: StateMutability::NonPayable, }; func.encode_input(&[Token::Address(address)]).unwrap() } fn transfer_and_call(address: H160, value: U256) -> Vec { + #[allow(deprecated)] let func = Function { name: "transfer_and_call".to_owned(), inputs: vec![ Param { name: "address".to_owned(), kind: ParamType::Address, + internal_type: Some("address".into()), }, Param { name: "value".to_owned(), kind: ParamType::Uint(256), + internal_type: Some("uint256".into()), }, ], outputs: vec![], constant: false, + state_mutability: StateMutability::NonPayable, }; func.encode_input(&[Token::Address(address), Token::Uint(value)]) .unwrap() } fn withdraw(to: Vec, value: U256) -> Vec { + #[allow(deprecated)] let func = Function { name: "withdraw".to_owned(), inputs: vec![ Param { name: "to".to_owned(), kind: ParamType::FixedBytes(32), + internal_type: Some("bytes32".into()), }, Param { name: "value".to_owned(), kind: ParamType::Uint(256), + internal_type: Some("uint256".into()), }, ], outputs: vec![], constant: false, + state_mutability: StateMutability::NonPayable, }; func.encode_input(&[Token::FixedBytes(to), Token::Uint(value)]) .unwrap() } -fn sign_transaction(account: &AccountInfo, unsign_tx: UnsignedTransaction) -> Transaction { +fn sign_transaction(account: &AccountInfo, unsign_tx: UnsignedTransaction) -> TransactionV0 { unsign_tx.sign(&account.private_key) } diff --git a/frame/elections-phragmen/Cargo.toml b/frame/elections-phragmen/Cargo.toml index 6d50714569..7073f7d3e3 100644 --- a/frame/elections-phragmen/Cargo.toml +++ b/frame/elections-phragmen/Cargo.toml @@ -16,13 +16,13 @@ log = { version = "0.4" } # darwinia-network darwinia-support = { default-features = false, path = "../support" } # paritytech -frame-support = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -frame-system = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-core = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-io = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-npos-elections = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-runtime = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } +frame-support = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +frame-system = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-core = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-io = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-npos-elections = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-runtime = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } [dev-dependencies] # crates.io @@ -31,8 +31,7 @@ hex-literal = { version = "0.3" } darwinia-balances = { path = "../balances" } darwinia-support = { path = "../support", features = ["easy-testing"] } # paritytech -max-encoded-len = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -substrate-test-utils = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } +substrate-test-utils = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } [features] default = ["std"] diff --git a/frame/elections-phragmen/src/lib.rs b/frame/elections-phragmen/src/lib.rs index cd37ef4123..000284f28c 100644 --- a/frame/elections-phragmen/src/lib.rs +++ b/frame/elections-phragmen/src/lib.rs @@ -87,7 +87,7 @@ use frame_support::{ traits::{ ChangeMembers, Contains, ContainsLengthBound, Currency, CurrencyToVote, Get, InitializeMembers, LockIdentifier, OnUnbalanced, ReservableCurrency, SortedMembers, - WithdrawReasons, + StorageVersion, WithdrawReasons, }, weights::Weight, }; @@ -103,6 +103,9 @@ use darwinia_support::balance::*; pub mod weights; pub use weights::WeightInfo; +/// The current storage version. +const STORAGE_VERSION: StorageVersion = StorageVersion::new(4); + /// The maximum votes allowed per voter. pub const MAXIMUM_VOTE: usize = 16; @@ -220,6 +223,7 @@ pub mod pallet { #[pallet::pallet] #[pallet::generate_store(pub(super) trait Store)] + #[pallet::storage_version(STORAGE_VERSION)] pub struct Pallet(PhantomData); #[pallet::hooks] @@ -407,8 +411,9 @@ pub mod pallet { /// origin is removed as a runner-up. /// - `origin` is a current member. In this case, the deposit is unreserved and origin is /// removed as a member, consequently not being a candidate for the next round anymore. - /// Similar to [`remove_members`], if replacement runners exists, they are immediately - /// used. If the prime is renouncing, then no prime will exist until the next round. + /// Similar to [`remove_member`](Self::remove_member), if replacement runners exists, + /// they are immediately used. If the prime is renouncing, then no prime will exist until + /// the next round. /// /// The dispatch origin of this call must be signed, and have one of the above roles. /// @@ -1160,10 +1165,11 @@ impl ContainsLengthBound for Pallet { mod tests { use super::*; use crate as elections_phragmen; + use codec::MaxEncodedLen; use frame_support::{ assert_noop, assert_ok, dispatch::DispatchResultWithPostInfo, - traits::{MaxEncodedLen, OnInitialize}, + traits::{Everything, OnInitialize}, }; use frame_system::ensure_signed; use sp_core::H256; @@ -1203,7 +1209,7 @@ mod tests { } impl frame_system::Config for Test { - type BaseCallFilter = (); + type BaseCallFilter = Everything; type BlockWeights = BlockWeights; type BlockLength = (); type DbWeight = (); diff --git a/frame/evm/Cargo.toml b/frame/evm/Cargo.toml index a4e248f1e0..4e918521ad 100644 --- a/frame/evm/Cargo.toml +++ b/frame/evm/Cargo.toml @@ -13,11 +13,11 @@ version = "2.7.0" # crates.io array-bytes = { version = "1.4" } codec = { package = "parity-scale-codec", version = "2.1", default-features = false } -evm = { version = "0.27", default-features = false, features = ["with-codec"] } -evm-gasometer = { version = "0.27", default-features = false } -evm-runtime = { version = "0.27", default-features = false } +evm = { version = "0.30", default-features = false, features = ["with-codec"] } +evm-gasometer = { version = "0.30", default-features = false } +evm-runtime = { version = "0.30", default-features = false } log = { version = "0.4" } -primitive-types = { version = "0.9", default-features = false, features = ["rlp", "byteorder"] } +primitive-types = { version = "0.10", default-features = false, features = ["rlp", "byteorder"] } rlp = { version = "0.5", default-features = false } serde = { version = "1.0", optional = true, features = ["derive"] } sha3 = { version = "0.9", default-features = false } @@ -26,20 +26,18 @@ darwinia-balances = { default-features = false, path = "../balances" } darwinia-support = { default-features = false, path = "../support" } dp-evm = { default-features = false, path = "../../primitives/evm" } # paritytech -frame-benchmarking = { optional = true, default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -frame-support = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -frame-system = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -pallet-timestamp = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-core = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-io = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-runtime = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } +frame-benchmarking = { optional = true, default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +frame-support = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +frame-system = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +pallet-timestamp = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-core = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-io = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-runtime = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } [dev-dependencies] # darwinia-network darwinia-support = { features = ["easy-testing"], path = "../support" } -# paritytech -max-encoded-len = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } [features] default = ["std"] diff --git a/frame/evm/precompile/contracts/blake2/Cargo.toml b/frame/evm/precompile/contracts/blake2/Cargo.toml index 33d21db4b0..52db3b60bc 100644 --- a/frame/evm/precompile/contracts/blake2/Cargo.toml +++ b/frame/evm/precompile/contracts/blake2/Cargo.toml @@ -12,12 +12,12 @@ version = "2.7.0" [dependencies] # crates.io -evm = { version = "0.27", default-features = false, features = ["with-codec"] } +evm = { version = "0.30", default-features = false, features = ["with-codec"] } # darwinia-network dp-evm = { default-features = false, path = "../../../../../primitives/evm" } # paritytech -sp-core = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-io = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } +sp-core = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-io = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } [features] default = ["std"] diff --git a/frame/evm/precompile/contracts/bn128/Cargo.toml b/frame/evm/precompile/contracts/bn128/Cargo.toml index fa25659668..6d6cc4a095 100644 --- a/frame/evm/precompile/contracts/bn128/Cargo.toml +++ b/frame/evm/precompile/contracts/bn128/Cargo.toml @@ -13,12 +13,12 @@ version = "2.7.0" [dependencies] # crates.io bn = { package = "substrate-bn", version = "0.6" } -evm = { version = "0.27", default-features = false, features = ["with-codec"] } +evm = { version = "0.30", default-features = false, features = ["with-codec"] } # darwinia-network dp-evm = { default-features = false, path = "../../../../../primitives/evm" } # paritytech -sp-core = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-io = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } +sp-core = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-io = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } [features] default = ["std"] diff --git a/frame/evm/precompile/contracts/bridge/ethereum/Cargo.toml b/frame/evm/precompile/contracts/bridge/ethereum/Cargo.toml index d490b56d8e..b68d1ca11a 100644 --- a/frame/evm/precompile/contracts/bridge/ethereum/Cargo.toml +++ b/frame/evm/precompile/contracts/bridge/ethereum/Cargo.toml @@ -13,16 +13,16 @@ version = "2.7.0" [dependencies] # crates.io codec = { package = "parity-scale-codec", version = "2.1", default-features = false } -evm = { version = "0.27", default-features = false, features = ["with-codec"] } +evm = { version = "0.30", default-features = false, features = ["with-codec"] } # darwinia-network darwinia-evm = { default-features = false, path = "../../../../../evm" } darwinia-evm-precompile-utils = { default-features = false, path = "../../utils" } dp-evm = { default-features = false, path = "../../../../../../primitives/evm" } from-ethereum-issuing = { default-features = false, path = "../../../../../wormhole/issuing/ethereum" } # paritytech -sp-core = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-io = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } +sp-core = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-io = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } [features] default = ["std"] diff --git a/frame/evm/precompile/contracts/bridge/s2s/Cargo.toml b/frame/evm/precompile/contracts/bridge/s2s/Cargo.toml index 4c26a2fa6d..4325f24632 100644 --- a/frame/evm/precompile/contracts/bridge/s2s/Cargo.toml +++ b/frame/evm/precompile/contracts/bridge/s2s/Cargo.toml @@ -12,7 +12,7 @@ version = "2.7.0" [dependencies] # crates.io codec = { package = "parity-scale-codec", version = "2.1", default-features = false } -evm = { version = "0.27", default-features = false, features = ["with-codec"] } +evm = { version = "0.30", default-features = false, features = ["with-codec"] } log = { version = "0.4" } # darwinia-network darwinia-evm = { default-features = false, path = "../../../../../evm" } @@ -23,12 +23,12 @@ dp-evm = { default-features = false, path = "../../../../ dp-s2s = { default-features = false, path = "../../../../../../primitives/s2s" } from-substrate-issuing = { default-features = false, path = "../../../../../wormhole/issuing/s2s" } # paritytech -bp-message-dispatch = { default-features = false, git = "https://github.com/darwinia-network/parity-bridges-common", tag = "darwinia-v0.11.6-4" } -bp-runtime = { default-features = false, git = "https://github.com/darwinia-network/parity-bridges-common", tag = "darwinia-v0.11.6-4" } -frame-support = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-core = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-io = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } +bp-message-dispatch = { default-features = false, git = "https://github.com/darwinia-network/parity-bridges-common", branch = "darwinia-v0.11.7" } +bp-runtime = { default-features = false, git = "https://github.com/darwinia-network/parity-bridges-common", branch = "darwinia-v0.11.7" } +frame-support = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-core = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-io = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } [features] default = ["std"] diff --git a/frame/evm/precompile/contracts/curve25519/Cargo.toml b/frame/evm/precompile/contracts/curve25519/Cargo.toml index 5a8ce6bdb5..a271bd29d5 100644 --- a/frame/evm/precompile/contracts/curve25519/Cargo.toml +++ b/frame/evm/precompile/contracts/curve25519/Cargo.toml @@ -12,12 +12,12 @@ version = "2.7.0" [dependencies] # crates.io curve25519-dalek = { version = "3.0", default-features = false, features = ["alloc", "u64_backend"] } -evm = { version = "0.27", default-features = false, features = ["with-codec"] } +evm = { version = "0.30", default-features = false, features = ["with-codec"] } # darwinia-network dp-evm = { default-features = false, path = "../../../../../primitives/evm" } # paritytech -sp-core = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-io = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } +sp-core = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-io = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } [features] default = ["std"] diff --git a/frame/evm/precompile/contracts/dispatch/Cargo.toml b/frame/evm/precompile/contracts/dispatch/Cargo.toml index 37a7eeda74..f894f1a780 100644 --- a/frame/evm/precompile/contracts/dispatch/Cargo.toml +++ b/frame/evm/precompile/contracts/dispatch/Cargo.toml @@ -13,15 +13,15 @@ version = "2.7.0" [dependencies] # crates.io codec = { package = "parity-scale-codec", version = "2.1", default-features = false } -evm = { version = "0.27", default-features = false, features = ["with-codec"] } +evm = { version = "0.30", default-features = false, features = ["with-codec"] } # darwinia-network darwinia-evm = { default-features = false, path = "../../../../evm" } darwinia-support = { default-features = false, path = "../../../../support" } dp-evm = { default-features = false, path = "../../../../../primitives/evm" } # paritytech -frame-support = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-core = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-io = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } +frame-support = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-core = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-io = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } [features] default = ["std"] diff --git a/frame/evm/precompile/contracts/ed25519/Cargo.toml b/frame/evm/precompile/contracts/ed25519/Cargo.toml index 5f0afb694e..c53d9aae69 100644 --- a/frame/evm/precompile/contracts/ed25519/Cargo.toml +++ b/frame/evm/precompile/contracts/ed25519/Cargo.toml @@ -12,12 +12,12 @@ version = "2.7.0" [dependencies] # crates.io ed25519-dalek = { version = "1.0", default-features = false, features = ["alloc", "u64_backend"] } -evm = { version = "0.27", default-features = false, features = ["with-codec"] } +evm = { version = "0.30", default-features = false, features = ["with-codec"] } # darwinia-network dp-evm = { default-features = false, path = "../../../../../primitives/evm" } # paritytech -sp-core = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-io = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } +sp-core = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-io = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } [features] default = ["std"] diff --git a/frame/evm/precompile/contracts/modexp/Cargo.toml b/frame/evm/precompile/contracts/modexp/Cargo.toml index b215ebb78f..6c3aaf5db3 100644 --- a/frame/evm/precompile/contracts/modexp/Cargo.toml +++ b/frame/evm/precompile/contracts/modexp/Cargo.toml @@ -13,11 +13,11 @@ version = "2.7.0" [dependencies] # crates.io dp-evm = { default-features = false, path = "../../../../../primitives/evm" } -evm = { version = "0.27", default-features = false, features = ["with-codec"] } +evm = { version = "0.30", default-features = false, features = ["with-codec"] } num = { version = "0.3", default-features = false, features = ["alloc"] } # paritytech -sp-core = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-io = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } +sp-core = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-io = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } [dev-dependencies] hex = { version = "0.4" } diff --git a/frame/evm/precompile/contracts/sha3fips/Cargo.toml b/frame/evm/precompile/contracts/sha3fips/Cargo.toml index a349443af3..87a4f5c112 100644 --- a/frame/evm/precompile/contracts/sha3fips/Cargo.toml +++ b/frame/evm/precompile/contracts/sha3fips/Cargo.toml @@ -13,11 +13,11 @@ version = "2.7.0" [dependencies] # crates.io dp-evm = { default-features = false, path = "../../../../../primitives/evm" } -evm = { version = "0.27", default-features = false, features = ["with-codec"] } +evm = { version = "0.30", default-features = false, features = ["with-codec"] } tiny-keccak = { version = "2.0", features = ["fips202"] } # paritytech -sp-core = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-io = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } +sp-core = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-io = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } [features] default = ["std"] diff --git a/frame/evm/precompile/contracts/simple/Cargo.toml b/frame/evm/precompile/contracts/simple/Cargo.toml index f31a17a64c..e5825e37b6 100644 --- a/frame/evm/precompile/contracts/simple/Cargo.toml +++ b/frame/evm/precompile/contracts/simple/Cargo.toml @@ -12,11 +12,11 @@ version = "2.7.0" [dependencies] # crates.io dp-evm = { default-features = false, path = "../../../../../primitives/evm" } -evm = { version = "0.27", default-features = false, features = ["with-codec"] } +evm = { version = "0.30", default-features = false, features = ["with-codec"] } ripemd160 = { version = "0.9", default-features = false } # paritytech -sp-core = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-io = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } +sp-core = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-io = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } [features] default = ["std"] diff --git a/frame/evm/precompile/contracts/transfer/Cargo.toml b/frame/evm/precompile/contracts/transfer/Cargo.toml index c28b6c080a..f83bd1f65d 100644 --- a/frame/evm/precompile/contracts/transfer/Cargo.toml +++ b/frame/evm/precompile/contracts/transfer/Cargo.toml @@ -13,8 +13,8 @@ version = "2.7.0" # crates.io array-bytes = { version = "1.4" } codec = { package = "parity-scale-codec", version = "2.1", default-features = false } -ethereum-types = { version = "0.11", default-features = false } -evm = { version = "0.27", features = ["with-codec"], default-features = false } +ethereum-types = { version = "0.12", default-features = false } +evm = { version = "0.30", features = ["with-codec"], default-features = false } log = { version = "0.4" } ripemd160 = { version = "0.9", default-features = false } sha3 = { version = "0.9", default-features = false } @@ -22,15 +22,15 @@ sha3 = { version = "0.9", default-features = false } darwinia-evm = { default-features = false, path = "../../../" } darwinia-support = { default-features = false, path = "../../../../support" } dp-evm = { default-features = false, path = "../../../../../primitives/evm" } -ethabi = { default-features = false, git = "https://github.com/darwinia-network/ethabi", tag = "v13.0.0-no-std" } +ethabi = { version = "15.0", default-features = false } # paritytech -frame-support = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -frame-system = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -pallet-timestamp = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-core = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-io = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-runtime = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } +frame-support = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +frame-system = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +pallet-timestamp = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-core = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-io = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-runtime = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } [features] default = ["std"] diff --git a/frame/evm/precompile/contracts/transfer/src/kton.rs b/frame/evm/precompile/contracts/transfer/src/kton.rs index ab300e15ab..6abfeddfcc 100644 --- a/frame/evm/precompile/contracts/transfer/src/kton.rs +++ b/frame/evm/precompile/contracts/transfer/src/kton.rs @@ -16,6 +16,11 @@ // You should have received a copy of the GNU General Public License // along with Darwinia. If not, see . +// --- crates.io --- +use codec::Decode; +use ethabi::{Function, Param, ParamType, StateMutability, Token}; +use evm::{executor::PrecompileOutput, Context, ExitError, ExitReason, ExitSucceed}; +use sha3::Digest; // --- paritytech --- use frame_support::ensure; use sp_core::{H160, U256}; @@ -24,11 +29,6 @@ use sp_std::{borrow::ToOwned, prelude::*, vec::Vec}; use crate::{util, AccountId}; use darwinia_evm::{runner::Runner, AccountBasic, Config, Pallet}; use darwinia_support::evm::{SELECTOR, TRANSFER_ADDR}; -// --- crates.io --- -use codec::Decode; -use ethabi::{Function, Param, ParamType, Token}; -use evm::{executor::PrecompileOutput, Context, ExitError, ExitReason, ExitSucceed}; -use sha3::Digest; const TRANSFER_AND_CALL_ACTION: &[u8] = b"transfer_and_call(address,uint256)"; const WITHDRAW_ACTION: &[u8] = b"withdraw(bytes32,uint256)"; @@ -157,20 +157,24 @@ fn make_call_data( ) -> Result, ExitError> { let eth_address = util::s2e_address(sp_address); let eth_value = util::s2e_u256(sp_value); + #[allow(deprecated)] let func = Function { name: "deposit".to_owned(), inputs: vec![ Param { name: "address".to_owned(), kind: ParamType::Address, + internal_type: Some("address".into()), }, Param { name: "value".to_owned(), kind: ParamType::Uint(256), + internal_type: Some("uint256".into()), }, ], outputs: vec![], constant: false, + state_mutability: StateMutability::NonPayable, }; func.encode_input(&[Token::Address(eth_address), Token::Uint(eth_value)]) .map_err(|_| ExitError::Other("Make call data error happened".into())) diff --git a/frame/evm/precompile/contracts/utils/Cargo.toml b/frame/evm/precompile/contracts/utils/Cargo.toml index eac8d073a2..0873f5560d 100644 --- a/frame/evm/precompile/contracts/utils/Cargo.toml +++ b/frame/evm/precompile/contracts/utils/Cargo.toml @@ -11,7 +11,7 @@ version = "2.7.0" [dependencies] # crates.io -evm = { version = "0.27", default-features = false, features = ["with-codec"] } +evm = { version = "0.30", default-features = false, features = ["with-codec"] } # darwinia darwinia-evm-precompile-utils-macro = { path = "macro" } darwinia-support = { default-features = false, path = "../../../../support" } diff --git a/frame/evm/precompile/contracts/utils/macro/Cargo.toml b/frame/evm/precompile/contracts/utils/macro/Cargo.toml index d8dc839a03..44f27a9487 100644 --- a/frame/evm/precompile/contracts/utils/macro/Cargo.toml +++ b/frame/evm/precompile/contracts/utils/macro/Cargo.toml @@ -14,13 +14,13 @@ proc-macro = true [dependencies] # crates.io -evm = { version = "0.27", default-features = false, features = ["with-codec"] } +evm = { version = "0.30", default-features = false, features = ["with-codec"] } proc-macro2 = { version = "1.0" } quote = { version = "1.0" } sha3 = { version = "0.9", default-features = false } syn = { version = "1.0", features = ["full", "fold", "extra-traits", "visit"] } # paritytech -sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } +sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } [features] default = ["std"] diff --git a/frame/evm/src/tests.rs b/frame/evm/src/tests.rs index 4b68c646c9..48e70bfab6 100644 --- a/frame/evm/src/tests.rs +++ b/frame/evm/src/tests.rs @@ -18,10 +18,12 @@ // --- std --- use std::{collections::BTreeMap, str::FromStr}; +// --- crates.io --- +use codec::MaxEncodedLen; // --- paritytech --- use frame_support::{ assert_ok, - traits::{GenesisBuild, MaxEncodedLen}, + traits::{Everything, GenesisBuild}, ConsensusEngineId, }; use frame_system::mocking::*; @@ -43,7 +45,7 @@ type Balance = u64; darwinia_support::impl_test_account_data! {} impl frame_system::Config for Test { - type BaseCallFilter = (); + type BaseCallFilter = Everything; type BlockWeights = (); type BlockLength = (); type DbWeight = (); diff --git a/frame/fee-market/Cargo.toml b/frame/fee-market/Cargo.toml index 89d7a0967a..4070e10dd8 100644 --- a/frame/fee-market/Cargo.toml +++ b/frame/fee-market/Cargo.toml @@ -19,22 +19,21 @@ num-traits = { version = "0.2", default-features = false } darwinia-support = { default-features = false, path = "../support" } dp-fee = { default-features = false, path = "../../primitives/fee-market" } # paritytech -frame-benchmarking = { optional = true, default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -frame-support = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -frame-system = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -pallet-timestamp = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-core = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-io = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-runtime = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } +frame-benchmarking = { optional = true, default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +frame-support = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +frame-system = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +pallet-timestamp = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-core = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-io = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-runtime = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } # parity-bridges-common -bp-messages = { default-features = false, git = "https://github.com/darwinia-network/parity-bridges-common", tag = "darwinia-v0.11.6-4" } -bp-runtime = { default-features = false, git = "https://github.com/darwinia-network/parity-bridges-common", tag = "darwinia-v0.11.6-4" } -pallet-bridge-messages = { default-features = false, git = "https://github.com/darwinia-network/parity-bridges-common", tag = "darwinia-v0.11.6-4" } +bp-messages = { default-features = false, git = "https://github.com/darwinia-network/parity-bridges-common", branch = "darwinia-v0.11.7" } +bp-runtime = { default-features = false, git = "https://github.com/darwinia-network/parity-bridges-common", branch = "darwinia-v0.11.7" } +pallet-bridge-messages = { default-features = false, git = "https://github.com/darwinia-network/parity-bridges-common", branch = "darwinia-v0.11.7" } [dev-dependencies] darwinia-balances = { path = "../balances" } -max-encoded-len = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } [features] default = ["std"] diff --git a/frame/fee-market/rpc/Cargo.toml b/frame/fee-market/rpc/Cargo.toml index 7d498b5b0a..e00b34c944 100644 --- a/frame/fee-market/rpc/Cargo.toml +++ b/frame/fee-market/rpc/Cargo.toml @@ -18,6 +18,6 @@ jsonrpc-derive = { version = "15.1" } # darwinia-network darwinia-fee-market-rpc-runtime-api = { path = "./runtime-api" } # paritytech -sp-api = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-blockchain = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-runtime = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } +sp-api = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-blockchain = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-runtime = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } diff --git a/frame/fee-market/rpc/runtime-api/Cargo.toml b/frame/fee-market/rpc/runtime-api/Cargo.toml index 642aeb0df5..4044fa8431 100644 --- a/frame/fee-market/rpc/runtime-api/Cargo.toml +++ b/frame/fee-market/rpc/runtime-api/Cargo.toml @@ -14,10 +14,10 @@ version = "2.7.0" codec = { package = "parity-scale-codec", version = "2.1", default-features = false } serde = { version = "1.0", optional = true, features = ["derive"] } # paritytech -bp-messages = { default-features = false, git = "https://github.com/darwinia-network/parity-bridges-common", tag = "darwinia-v0.11.6-4" } -sp-api = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-runtime = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } +bp-messages = { default-features = false, git = "https://github.com/darwinia-network/parity-bridges-common", branch = "darwinia-v0.11.7" } +sp-api = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-runtime = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } [features] default = ["std"] diff --git a/frame/fee-market/src/tests.rs b/frame/fee-market/src/tests.rs index dd1b4646f8..4f84ecd044 100644 --- a/frame/fee-market/src/tests.rs +++ b/frame/fee-market/src/tests.rs @@ -30,7 +30,7 @@ use bp_messages::{ use bp_runtime::{messages::MessageDispatchResult, Size}; use frame_support::{ assert_err, assert_ok, - traits::{GenesisBuild, LockIdentifier}, + traits::{Everything, GenesisBuild, LockIdentifier}, weights::{RuntimeDbWeight, Weight}, PalletId, }; @@ -65,7 +65,7 @@ frame_support::parameter_types! { pub const DbWeight: RuntimeDbWeight = RuntimeDbWeight { read: 1, write: 2 }; } impl frame_system::Config for Test { - type BaseCallFilter = (); + type BaseCallFilter = Everything; type BlockWeights = (); type BlockLength = (); type DbWeight = DbWeight; diff --git a/frame/header-mmr/Cargo.toml b/frame/header-mmr/Cargo.toml index f9c3cd898b..9da67fa45e 100644 --- a/frame/header-mmr/Cargo.toml +++ b/frame/header-mmr/Cargo.toml @@ -20,19 +20,19 @@ darwinia-relay-primitives = { default-features = false, path = "../../ darwinia-support = { default-features = false, path = "../support" } mmr = { package = "ckb-merkle-mountain-range", default-features = false, git = "https://github.com/darwinia-network/merkle-mountain-range" } # paritytech -frame-support = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -frame-system = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-core = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-io = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-runtime = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } +frame-support = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +frame-system = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-core = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-io = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-runtime = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } [dev-dependencies] # crates.io array-bytes = { version = "1.4" } serde_json = { version = "1.0" } # paritytech -sp-tracing = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } +sp-tracing = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } [features] default = ["std"] diff --git a/frame/header-mmr/rpc/Cargo.toml b/frame/header-mmr/rpc/Cargo.toml index 868ea9bcdf..b8dd703b6b 100644 --- a/frame/header-mmr/rpc/Cargo.toml +++ b/frame/header-mmr/rpc/Cargo.toml @@ -18,6 +18,6 @@ jsonrpc-derive = { version = "15.1" } # darwinia-network darwinia-header-mmr-rpc-runtime-api = { path = "./runtime-api" } # paritytech -sp-api = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-blockchain = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-runtime = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } +sp-api = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-blockchain = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-runtime = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } diff --git a/frame/header-mmr/rpc/runtime-api/Cargo.toml b/frame/header-mmr/rpc/runtime-api/Cargo.toml index 993d3251c2..46d358c3b1 100644 --- a/frame/header-mmr/rpc/runtime-api/Cargo.toml +++ b/frame/header-mmr/rpc/runtime-api/Cargo.toml @@ -16,9 +16,9 @@ serde = { version = "1.0", optional = true, features = ["derive"] } # darwinia-network darwinia-support = { default-features = false, path = "../../../support" } # paritytech -sp-api = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-runtime = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } +sp-api = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-runtime = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } [features] default = ["std"] diff --git a/frame/header-mmr/src/mock.rs b/frame/header-mmr/src/mock.rs index 55392882a5..c30b610bf9 100644 --- a/frame/header-mmr/src/mock.rs +++ b/frame/header-mmr/src/mock.rs @@ -23,7 +23,7 @@ use codec::Encode; // --- github.com --- use mmr::MMRStore; // --- paritytech --- -use frame_support::traits::{OnFinalize, OnInitialize}; +use frame_support::traits::{Everything, OnFinalize, OnInitialize}; use frame_system::mocking::*; use sp_core::{ offchain::{testing::TestOffchainExt, OffchainDbExt, OffchainWorkerExt}, @@ -45,7 +45,7 @@ type Block = MockBlock; type UncheckedExtrinsic = MockUncheckedExtrinsic; impl frame_system::Config for Test { - type BaseCallFilter = (); + type BaseCallFilter = Everything; type BlockWeights = (); type BlockLength = (); type DbWeight = (); diff --git a/frame/staking/Cargo.toml b/frame/staking/Cargo.toml index f2a8c27dcb..2cd9556bf6 100644 --- a/frame/staking/Cargo.toml +++ b/frame/staking/Cargo.toml @@ -20,17 +20,17 @@ darwinia-support = { default-features = false, path = "../suppor # encointer substrate-fixed = { default-features = false, git = "https://github.com/encointer/substrate-fixed", branch = "master" } # paritytech -frame-election-provider-support = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -frame-support = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -frame-system = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -pallet-authorship = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -pallet-session = { default-features = false, features = ["historical"], git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-arithmetic = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-core = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-io = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-runtime = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-staking = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } +frame-election-provider-support = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +frame-support = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +frame-system = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +pallet-authorship = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +pallet-session = { default-features = false, features = ["historical"], git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-arithmetic = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-core = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-io = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-runtime = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-staking = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } [dev-dependencies] # crates.io @@ -39,12 +39,12 @@ rand_chacha = { version = "0.3" } darwinia-balances = { path = "../../frame/balances" } darwinia-support = { features = ["easy-testing"], path = "../support" } # paritytech -frame-benchmarking = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -max-encoded-len = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -pallet-timestamp = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-storage = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-tracing = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -substrate-test-utils = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } +frame-benchmarking = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +frame-election-provider-support = { features = ["runtime-benchmarks"], git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +pallet-timestamp = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-storage = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-tracing = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +substrate-test-utils = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } [features] diff --git a/frame/staking/rpc/Cargo.toml b/frame/staking/rpc/Cargo.toml index 690834d90b..56f9c3319a 100644 --- a/frame/staking/rpc/Cargo.toml +++ b/frame/staking/rpc/Cargo.toml @@ -18,6 +18,6 @@ jsonrpc-derive = { version = "15.1" } # darwinia-network darwinia-staking-rpc-runtime-api = { path = "./runtime-api" } # paritytech -sp-api = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-blockchain = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-runtime = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } +sp-api = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-blockchain = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-runtime = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } diff --git a/frame/staking/rpc/runtime-api/Cargo.toml b/frame/staking/rpc/runtime-api/Cargo.toml index 18b34c83d9..0f4cdd7bd1 100644 --- a/frame/staking/rpc/runtime-api/Cargo.toml +++ b/frame/staking/rpc/runtime-api/Cargo.toml @@ -16,8 +16,8 @@ serde = { version = "1.0", optional = true, features = ["derive"] } # darwinia-network darwinia-support = { default-features = false, path = "../../../support" } # paritytech -sp-api = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-runtime = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } +sp-api = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-runtime = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } [features] default = ["std"] diff --git a/frame/staking/src/darwinia_tests.rs b/frame/staking/src/darwinia_tests.rs index 9ef26bcdd1..583336745f 100644 --- a/frame/staking/src/darwinia_tests.rs +++ b/frame/staking/src/darwinia_tests.rs @@ -165,7 +165,7 @@ fn slash_ledger_should_work() { }], ring_staking_lock: StakingLock { staking_amount: deposit - deposit_slashed, - unbondings: WeakBoundedVec::force_from(vec![], None), + ..Default::default() }, ..Default::default() }, @@ -257,7 +257,7 @@ fn normal_kton_should_work() { active_kton: 10 * COIN, kton_staking_lock: StakingLock { staking_amount: 10 * COIN, - unbondings: WeakBoundedVec::force_from(vec![], None), + ..Default::default() }, ..Default::default() } @@ -268,7 +268,7 @@ fn normal_kton_should_work() { id: STAKING_ID, lock_for: LockFor::Staking(StakingLock { staking_amount: 10 * COIN, - unbondings: WeakBoundedVec::force_from(vec![], None), + ..Default::default() }), lock_reasons: LockReasons::All }] @@ -294,7 +294,7 @@ fn normal_kton_should_work() { active_kton: 10 * COIN, kton_staking_lock: StakingLock { staking_amount: 10 * COIN, - unbondings: WeakBoundedVec::force_from(vec![], None), + ..Default::default() }, ..Default::default() } @@ -544,7 +544,7 @@ fn punished_claim_should_work() { }], ring_staking_lock: StakingLock { staking_amount: bond_value, - unbondings: WeakBoundedVec::force_from(vec![], None), + ..Default::default() }, ..Default::default() }; @@ -594,7 +594,7 @@ fn punished_claim_should_work() { }], ring_staking_lock: StakingLock { staking_amount: bond_value, - unbondings: WeakBoundedVec::force_from(vec![], None), + ..Default::default() }, ..Default::default() }; @@ -1113,7 +1113,7 @@ fn on_deposit_redeem_should_work() { id: STAKING_ID, lock_for: LockFor::Staking(StakingLock { staking_amount: deposit_amount, - unbondings: WeakBoundedVec::force_from(vec![], None), + ..Default::default() }), lock_reasons: LockReasons::All, }] @@ -1172,7 +1172,7 @@ fn on_deposit_redeem_should_work() { id: STAKING_ID, lock_for: LockFor::Staking(StakingLock { staking_amount: 50 * COIN + deposit_amount, - unbondings: WeakBoundedVec::force_from(vec![], None), + ..Default::default() }), lock_reasons: LockReasons::All, }] @@ -1270,7 +1270,7 @@ fn staking_with_kton_with_unbondings() { id: STAKING_ID, lock_for: LockFor::Staking(StakingLock { staking_amount: 5, - unbondings: WeakBoundedVec::force_from(vec![], None), + ..Default::default() }), lock_reasons: LockReasons::All, }], @@ -1288,7 +1288,7 @@ fn staking_with_kton_with_unbondings() { id: STAKING_ID, lock_for: LockFor::Staking(StakingLock { staking_amount: 10, - unbondings: WeakBoundedVec::force_from(vec![], None), + ..Default::default() }), lock_reasons: LockReasons::All, }] @@ -1411,7 +1411,7 @@ fn staking_with_kton_with_unbondings() { id: STAKING_ID, lock_for: LockFor::Staking(StakingLock { staking_amount: 5, - unbondings: WeakBoundedVec::force_from(vec![], None), + ..Default::default() }), lock_reasons: LockReasons::All, }] @@ -1429,7 +1429,7 @@ fn staking_with_kton_with_unbondings() { id: STAKING_ID, lock_for: LockFor::Staking(StakingLock { staking_amount: 10, - unbondings: WeakBoundedVec::force_from(vec![], None), + ..Default::default() }), lock_reasons: LockReasons::All, }] @@ -1555,7 +1555,7 @@ fn unbound_values_in_twice() { id: STAKING_ID, lock_for: LockFor::Staking(StakingLock { staking_amount: 5, - unbondings: WeakBoundedVec::force_from(vec![], None), + ..Default::default() }), lock_reasons: LockReasons::All, }] @@ -1573,7 +1573,7 @@ fn unbound_values_in_twice() { id: STAKING_ID, lock_for: LockFor::Staking(StakingLock { staking_amount: 9, - unbondings: WeakBoundedVec::force_from(vec![], None), + ..Default::default() }), lock_reasons: LockReasons::All, }] @@ -1765,7 +1765,7 @@ fn unbound_values_in_twice() { id: STAKING_ID, lock_for: LockFor::Staking(StakingLock { staking_amount: 5, - unbondings: WeakBoundedVec::force_from(vec![], None), + ..Default::default() }), lock_reasons: LockReasons::All, }] @@ -1783,7 +1783,7 @@ fn unbound_values_in_twice() { id: STAKING_ID, lock_for: LockFor::Staking(StakingLock { staking_amount: 9, - unbondings: WeakBoundedVec::force_from(vec![], None), + ..Default::default() }), lock_reasons: LockReasons::All, }] @@ -1989,7 +1989,7 @@ fn bond_values_when_some_value_unbonding() { active_kton: 5, kton_staking_lock: StakingLock { staking_amount: 5, - unbondings: WeakBoundedVec::force_from(vec![], None), + ..Default::default() }, ..Default::default() }, @@ -2045,7 +2045,7 @@ fn bond_values_when_some_value_unbonding() { active_kton: 1, kton_staking_lock: StakingLock { staking_amount: 1, - unbondings: WeakBoundedVec::force_from(vec![], None), + ..Default::default() }, ..Default::default() }, @@ -2074,7 +2074,7 @@ fn bond_values_when_some_value_unbonding() { active_ring: 5, ring_staking_lock: StakingLock { staking_amount: 5, - unbondings: WeakBoundedVec::force_from(vec![], None), + ..Default::default() }, ..Default::default() }, @@ -2130,7 +2130,7 @@ fn bond_values_when_some_value_unbonding() { active_ring: 1, ring_staking_lock: StakingLock { staking_amount: 1, - unbondings: WeakBoundedVec::force_from(vec![], None), + ..Default::default() }, ..Default::default() } diff --git a/frame/staking/src/lib.rs b/frame/staking/src/lib.rs index 8b0411aa4c..7b1a222ac0 100644 --- a/frame/staking/src/lib.rs +++ b/frame/staking/src/lib.rs @@ -883,7 +883,7 @@ pub mod pallet { /// The last planned session scheduled by the session pallet. /// - /// This is basically in sync with the call to [`SessionManager::new_session`]. + /// This is basically in sync with the call to [`pallet_session::SessionManager::new_session`]. #[pallet::storage] #[pallet::getter(fn current_planned_session)] pub type CurrentPlannedSession = StorageValue<_, SessionIndex, ValueQuery>; @@ -1163,8 +1163,8 @@ pub mod pallet { /// The dispatch origin for this call must be _Signed_ by the stash, not the controller. /// /// Use this if there are additional funds in your stash account that you wish to bond. - /// Unlike [`bond`] or [`unbond`] this function does not impose any limitation on the amount - /// that can be added. + /// Unlike [`bond`](Self::bond) or [`unbond`](Self::unbond) this function does not impose any limitation + /// on the amount that can be added. /// /// Emits `Bonded`. /// @@ -1814,7 +1814,7 @@ pub mod pallet { /// The dispatch origin must be Root. /// /// # - /// Same as [`set_validator_count`]. + /// Same as [`Self::set_validator_count`]. /// # #[pallet::weight(T::WeightInfo::set_validator_count())] pub fn increase_validator_count( @@ -1833,7 +1833,7 @@ pub mod pallet { /// The dispatch origin must be Root. /// /// # - /// Same as [`set_validator_count`]. + /// Same as [`Self::set_validator_count`]. /// # #[pallet::weight(T::WeightInfo::set_validator_count())] pub fn scale_validator_count(origin: OriginFor, factor: Percent) -> DispatchResult { @@ -2484,10 +2484,10 @@ pub mod pallet { era: EraIndex, ) -> DispatchResultWithPostInfo { // Validate input data - let current_era = >::get().ok_or( + let current_era = >::get().ok_or_else(|| { >::InvalidEraToReward - .with_weight(T::WeightInfo::payout_stakers_alive_staked(0)), - )?; + .with_weight(T::WeightInfo::payout_stakers_alive_staked(0)) + })?; ensure!( era <= current_era, >::InvalidEraToReward @@ -2507,9 +2507,9 @@ pub mod pallet { .with_weight(T::WeightInfo::payout_stakers_alive_staked(0)) })?; - let controller = Self::bonded(&validator_stash).ok_or( - >::NotStash.with_weight(T::WeightInfo::payout_stakers_alive_staked(0)), - )?; + let controller = Self::bonded(&validator_stash).ok_or_else(|| { + >::NotStash.with_weight(T::WeightInfo::payout_stakers_alive_staked(0)) + })?; let mut ledger = >::get(&controller).ok_or_else(|| >::NotController)?; @@ -3410,6 +3410,68 @@ pub mod pallet { ) } + #[cfg(any(feature = "runtime-benchmarks", test))] + fn add_voter(voter: T::AccountId, weight: VoteWeight, targets: Vec) { + use sp_std::convert::TryFrom; + let stake = >::try_from(weight).unwrap_or_else(|_| { + panic!("cannot convert a VoteWeight into BalanceOf, benchmark needs reconfiguring.") + }); + >::insert(voter.clone(), voter.clone()); + >::insert( + voter.clone(), + StakingLedger { + stash: voter.clone(), + active_ring: stake, + ring_staking_lock: StakingLock { + staking_amount: stake, + ..Default::default() + }, + ..Default::default() + }, + ); + Self::do_add_nominator( + &voter, + Nominations { + targets, + submitted_in: 0, + suppressed: false, + }, + ); + } + + #[cfg(any(feature = "runtime-benchmarks", test))] + fn add_target(target: T::AccountId) { + let stake = >::get() * 100u32.into(); + >::insert(target.clone(), target.clone()); + >::insert( + target.clone(), + StakingLedger { + stash: target.clone(), + active_ring: stake, + ring_staking_lock: StakingLock { + staking_amount: stake, + ..Default::default() + }, + ..Default::default() + }, + ); + Self::do_add_validator( + &target, + ValidatorPrefs { + commission: Perbill::zero(), + blocked: false, + }, + ); + } + + #[cfg(any(feature = "runtime-benchmarks", test))] + fn clear() { + >::remove_all(None); + >::remove_all(None); + >::remove_all(None); + >::remove_all(None); + } + #[cfg(feature = "runtime-benchmarks")] fn put_snapshot( voters: Vec<(AccountId, VoteWeight, Vec>)>, diff --git a/frame/staking/src/mock.rs b/frame/staking/src/mock.rs index 36f253419f..aa3a563bc4 100644 --- a/frame/staking/src/mock.rs +++ b/frame/staking/src/mock.rs @@ -23,15 +23,15 @@ // --- std --- use std::{cell::RefCell, collections::HashSet}; // --- crates.io --- -use codec::{Decode, Encode}; +use codec::{Decode, Encode, MaxEncodedLen}; // --- paritytech --- use frame_election_provider_support::onchain; use frame_support::{ assert_ok, parameter_types, storage::IterableStorageMap, traits::{ - Currency, FindAuthor, GenesisBuild, Get, Imbalance, MaxEncodedLen, OnFinalize, - OnInitialize, OnUnbalanced, OneSessionHandler, UnixTime, + Currency, Everything, FindAuthor, GenesisBuild, Get, Imbalance, OnFinalize, OnInitialize, + OnUnbalanced, OneSessionHandler, UnixTime, }, weights::constants::RocksDbWeight, PalletId, StorageValue, @@ -123,7 +123,7 @@ parameter_types! { ); } impl frame_system::Config for Test { - type BaseCallFilter = (); + type BaseCallFilter = Everything; type BlockWeights = BlockWeights; type BlockLength = (); type DbWeight = RocksDbWeight; diff --git a/frame/staking/src/substrate_tests.rs b/frame/staking/src/substrate_tests.rs index c97d9dbfef..9c4d73b3a1 100644 --- a/frame/staking/src/substrate_tests.rs +++ b/frame/staking/src/substrate_tests.rs @@ -1113,7 +1113,7 @@ fn reward_destination_works() { active_ring: 1000, ring_staking_lock: StakingLock { staking_amount: 1000, - unbondings: WeakBoundedVec::force_from(vec![], None), + ..Default::default() }, ..Default::default() }), @@ -1138,7 +1138,7 @@ fn reward_destination_works() { active_ring: 1000 + total_payout_0, ring_staking_lock: StakingLock { staking_amount: 1000 + total_payout_0, - unbondings: WeakBoundedVec::force_from(vec![], None), + ..Default::default() }, claimed_rewards: vec![0], ..Default::default() @@ -1172,7 +1172,7 @@ fn reward_destination_works() { active_ring: 1000 + total_payout_0, ring_staking_lock: StakingLock { staking_amount: 1000 + total_payout_0, - unbondings: WeakBoundedVec::force_from(vec![], None), + ..Default::default() }, claimed_rewards: vec![0, 1], ..Default::default() @@ -1204,7 +1204,7 @@ fn reward_destination_works() { active_ring: 1000 + total_payout_0, ring_staking_lock: StakingLock { staking_amount: 1000 + total_payout_0, - unbondings: WeakBoundedVec::force_from(vec![], None), + ..Default::default() }, claimed_rewards: vec![0, 1, 2], ..Default::default() @@ -1286,7 +1286,7 @@ fn bond_extra_works() { active_ring: 1000, ring_staking_lock: StakingLock { staking_amount: 1000, - unbondings: WeakBoundedVec::force_from(vec![], None), + ..Default::default() }, ..Default::default() }) @@ -1309,7 +1309,7 @@ fn bond_extra_works() { active_ring: 1000 + 100, ring_staking_lock: StakingLock { staking_amount: 1000 + 100, - unbondings: WeakBoundedVec::force_from(vec![], None), + ..Default::default() }, ..Default::default() }), @@ -1329,7 +1329,7 @@ fn bond_extra_works() { active_ring: 1000000, ring_staking_lock: StakingLock { staking_amount: 1000000, - unbondings: WeakBoundedVec::force_from(vec![], None), + ..Default::default() }, ..Default::default() }), diff --git a/frame/staking/src/testing_utils.rs b/frame/staking/src/testing_utils.rs index 2b02576842..611e308678 100644 --- a/frame/staking/src/testing_utils.rs +++ b/frame/staking/src/testing_utils.rs @@ -2,31 +2,32 @@ use frame_benchmarking::account; use frame_support::traits::Currency; use frame_system::RawOrigin; -use sp_runtime::{traits::StaticLookup, Perbill}; +use sp_runtime::traits::StaticLookup; +// use sp_runtime::Perbill; // --- darwinia-network --- use crate::{Pallet as Staking, *}; pub const SEED: u32 = 0; -/// create `max` validators. -pub fn create_validators( - max: u32, - balance_factor: u32, -) -> Result::Source>, &'static str> { - let mut validators: Vec<::Source> = Vec::with_capacity(max as usize); - for i in 0..max { - let (stash, controller) = - create_stash_controller::(i, balance_factor, RewardDestination::Staked)?; - let validator_prefs = ValidatorPrefs { - commission: Perbill::from_percent(50), - ..Default::default() - }; - >::validate(RawOrigin::Signed(controller).into(), validator_prefs)?; - let stash_lookup: ::Source = T::Lookup::unlookup(stash); - validators.push(stash_lookup); - } - Ok(validators) -} +// /// create `max` validators. +// pub fn create_validators( +// max: u32, +// balance_factor: u32, +// ) -> Result::Source>, &'static str> { +// let mut validators: Vec<::Source> = Vec::with_capacity(max as usize); +// for i in 0..max { +// let (stash, controller) = +// create_stash_controller::(i, balance_factor, RewardDestination::Staked)?; +// let validator_prefs = ValidatorPrefs { +// commission: Perbill::from_percent(50), +// ..Default::default() +// }; +// >::validate(RawOrigin::Signed(controller).into(), validator_prefs)?; +// let stash_lookup: ::Source = T::Lookup::unlookup(stash); +// validators.push(stash_lookup); +// } +// Ok(validators) +// } /// Create a stash and controller pair. pub fn create_stash_controller( diff --git a/frame/support/Cargo.toml b/frame/support/Cargo.toml index c515b58457..e61cc7c789 100644 --- a/frame/support/Cargo.toml +++ b/frame/support/Cargo.toml @@ -12,22 +12,21 @@ version = "2.7.0" [dependencies] # crates.io codec = { package = "parity-scale-codec", version = "2.1", default-features = false, features = ["derive"] } -ethereum = { version = "0.7", default-features = false, features = ["with-codec"] } +ethereum = { version = "0.9", default-features = false, features = ["with-codec"] } impl-trait-for-tuples = { version = "0.2" } num-traits = { version = "0.2", default-features = false } sha3 = { version = "0.9", default-features = false } # darwinia-network ethereum-primitives = { default-features = false, path = "../../primitives/ethereum" } # paritytech -bp-messages = { default-features = false, git = "https://github.com/darwinia-network/parity-bridges-common", tag = "darwinia-v0.11.6-4" } -bp-runtime = { default-features = false, git = "https://github.com/darwinia-network/parity-bridges-common", tag = "darwinia-v0.11.6-4" } -frame-support = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -frame-system = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -max-encoded-len = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-core = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-io = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-runtime = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } +bp-messages = { default-features = false, git = "https://github.com/darwinia-network/parity-bridges-common", branch = "darwinia-v0.11.7" } +bp-runtime = { default-features = false, git = "https://github.com/darwinia-network/parity-bridges-common", branch = "darwinia-v0.11.7" } +frame-support = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +frame-system = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-core = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-io = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-runtime = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } [features] default = ["std"] @@ -43,7 +42,6 @@ std = [ # paritytech "frame-system/std", "frame-support/std", - "max-encoded-len/std", "bp-messages/std", "bp-runtime/std", "sp-core/std", diff --git a/frame/support/src/evm.rs b/frame/support/src/evm.rs index edfbdfa2de..46ce18209d 100644 --- a/frame/support/src/evm.rs +++ b/frame/support/src/evm.rs @@ -17,7 +17,7 @@ // along with Darwinia. If not, see . // --- crates.io --- -use ethereum::TransactionMessage; +use ethereum::LegacyTransactionMessage; use sha3::{Digest, Keccak256}; // --- darwinia-network --- use ethereum_primitives::{H160, H256, U256}; @@ -89,13 +89,13 @@ where } } -pub fn recover_signer(transaction: ðereum::Transaction) -> Option { +pub fn recover_signer(transaction: ðereum::TransactionV0) -> Option { let mut sig = [0u8; 65]; let mut msg = [0u8; 32]; sig[0..32].copy_from_slice(&transaction.signature.r()[..]); sig[32..64].copy_from_slice(&transaction.signature.s()[..]); sig[64] = transaction.signature.standard_v(); - msg.copy_from_slice(&TransactionMessage::from(transaction.clone()).hash()[..]); + msg.copy_from_slice(&LegacyTransactionMessage::from(transaction.clone()).hash()[..]); let pubkey = sp_io::crypto::secp256k1_ecdsa_recover(&sig, &msg).ok()?; Some(H160::from(H256::from_slice( @@ -110,7 +110,7 @@ pub struct DVMTransaction { /// gas price wrapped by Option pub gas_price: Option, /// the transaction defined in ethereum lib - pub tx: ethereum::Transaction, + pub tx: ethereum::TransactionV0, } impl DVMTransaction { @@ -124,7 +124,7 @@ impl DVMTransaction { target: H160, input: Vec, ) -> Self { - let transaction = ethereum::Transaction { + let transaction = ethereum::TransactionV0 { nonce, // Not used, and will be overwritten by None later. gas_price: U256::zero(), diff --git a/frame/support/src/structs.rs b/frame/support/src/structs.rs index 14489b07eb..c6ae1470a6 100644 --- a/frame/support/src/structs.rs +++ b/frame/support/src/structs.rs @@ -17,11 +17,11 @@ // along with Darwinia. If not, see . // --- crates.io --- -use codec::{Decode, Encode}; +use codec::{Decode, Encode, MaxEncodedLen}; use num_traits::Zero; // --- paritytech --- use frame_support::{ - traits::{ConstU32, LockIdentifier, MaxEncodedLen, WithdrawReasons}, + traits::{ConstU32, LockIdentifier, WithdrawReasons}, WeakBoundedVec, }; use sp_runtime::{traits::AtLeast32BitUnsigned, RuntimeDebug}; diff --git a/frame/support/src/traits.rs b/frame/support/src/traits.rs index a78d6b0531..3a6da02d5a 100644 --- a/frame/support/src/traits.rs +++ b/frame/support/src/traits.rs @@ -19,10 +19,10 @@ // --- core --- use core::fmt::Debug; // --- crates.io --- -use codec::FullCodec; +use codec::{FullCodec, MaxEncodedLen}; use impl_trait_for_tuples::impl_for_tuples; // --- paritytech --- -use frame_support::traits::{Currency, Get, LockIdentifier, MaxEncodedLen, WithdrawReasons}; +use frame_support::traits::{Currency, Get, LockIdentifier, WithdrawReasons}; use sp_runtime::{DispatchError, DispatchResult}; use sp_std::prelude::*; // --- darwinia-network --- diff --git a/frame/transaction-pause/Cargo.toml b/frame/transaction-pause/Cargo.toml index 0e399e6b27..ca1bb8e46e 100644 --- a/frame/transaction-pause/Cargo.toml +++ b/frame/transaction-pause/Cargo.toml @@ -6,17 +6,16 @@ version = "2.7.0" [dependencies] codec = { package = "parity-scale-codec", version = "2.1", default-features = false } -frame-support = { git = "https://github.com/darwinia-network/substrate", default-features = false, tag = "darwinia-v0.11.6-1" } -frame-system = { git = "https://github.com/darwinia-network/substrate", default-features = false, tag = "darwinia-v0.11.6-1" } -sp-runtime = { git = "https://github.com/darwinia-network/substrate", default-features = false, tag = "darwinia-v0.11.6-1" } -sp-std = { git = "https://github.com/darwinia-network/substrate", default-features = false, tag = "darwinia-v0.11.6-1" } +frame-support = { git = "https://github.com/darwinia-network/substrate", default-features = false, branch = "darwinia-v0.11.7" } +frame-system = { git = "https://github.com/darwinia-network/substrate", default-features = false, branch = "darwinia-v0.11.7" } +sp-runtime = { git = "https://github.com/darwinia-network/substrate", default-features = false, branch = "darwinia-v0.11.7" } +sp-std = { git = "https://github.com/darwinia-network/substrate", default-features = false, branch = "darwinia-v0.11.7" } [dev-dependencies] darwinia-balances = { path = "../balances" } darwinia-support = { path = "../support" } -max-encoded-len = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-core = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-io = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } +sp-core = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-io = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } [features] default = ["std"] diff --git a/frame/vesting/Cargo.toml b/frame/vesting/Cargo.toml index 46b7b73341..46dbe48487 100644 --- a/frame/vesting/Cargo.toml +++ b/frame/vesting/Cargo.toml @@ -15,10 +15,10 @@ codec = { package = "parity-scale-codec", version = "2.1", default-features = fa # darwinia-network darwinia-support = { default-features = false, path = "../support" } # paritytech -frame-support = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -frame-system = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-runtime = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } +frame-support = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +frame-system = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-runtime = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } [dev-dependencies] # crates.io @@ -26,10 +26,9 @@ hex-literal = { version = "0.3" } # darwinia-network darwinia-balances = { path = "../balances" } # paritytech -max-encoded-len = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-core = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-io = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-storage = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } +sp-core = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-io = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-storage = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } [features] default = ["std"] diff --git a/frame/vesting/src/lib.rs b/frame/vesting/src/lib.rs index a3680574f4..c8de968326 100644 --- a/frame/vesting/src/lib.rs +++ b/frame/vesting/src/lib.rs @@ -438,7 +438,8 @@ where mod tests { use crate::{self as darwinia_vesting, *}; - use frame_support::{assert_noop, assert_ok, traits::MaxEncodedLen}; + use codec::MaxEncodedLen; + use frame_support::{assert_noop, assert_ok, traits::Everything}; use frame_system::{mocking::*, RawOrigin}; use sp_core::H256; use sp_runtime::{ @@ -454,7 +455,7 @@ mod tests { darwinia_support::impl_test_account_data! {} impl frame_system::Config for Test { - type BaseCallFilter = (); + type BaseCallFilter = Everything; type BlockWeights = (); type BlockLength = (); type DbWeight = (); diff --git a/frame/wormhole/backing/ethereum/Cargo.toml b/frame/wormhole/backing/ethereum/Cargo.toml index 99d6bb9f1a..dc49a10fae 100644 --- a/frame/wormhole/backing/ethereum/Cargo.toml +++ b/frame/wormhole/backing/ethereum/Cargo.toml @@ -19,14 +19,14 @@ serde_json = { version = "1.0", optional = true } # darwinia-network darwinia-relay-primitives = { default-features = false, path = "../../../../primitives/relay" } darwinia-support = { default-features = false, path = "../../../support" } -ethabi = { default-features = false, git = "https://github.com/darwinia-network/ethabi", tag = "v13.0.0-no-std" } +ethabi = { version = "15.0", default-features = false } ethereum-primitives = { default-features = false, path = "../../../../primitives/ethereum" } # paritytech -frame-support = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -frame-system = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-io = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-runtime = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } +frame-support = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +frame-system = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-io = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-runtime = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } [dev-dependencies] # crates.io @@ -39,12 +39,11 @@ darwinia-relayer-game = { path = "../../../bridge/relayer-game" } darwinia-staking = { path = "../../../../frame/staking" } ethereum-primitives = { features = ["full-serde"], path = "../../../../primitives/ethereum" } # paritytech -frame-election-provider-support = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -max-encoded-len = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -pallet-session = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -pallet-timestamp = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-core = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-staking = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } +frame-election-provider-support = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +pallet-session = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +pallet-timestamp = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-core = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-staking = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } [features] default = ["std"] diff --git a/frame/wormhole/backing/ethereum/src/lib.rs b/frame/wormhole/backing/ethereum/src/lib.rs index d38668a6c3..23b9a65431 100644 --- a/frame/wormhole/backing/ethereum/src/lib.rs +++ b/frame/wormhole/backing/ethereum/src/lib.rs @@ -50,6 +50,8 @@ pub mod pallet { } pub use types::*; + // --- crates.io --- + use ethabi::{Event as EthEvent, EventParam as EthEventParam, ParamType, RawLog}; // --- paritytech --- use frame_support::{ pallet_prelude::*, @@ -70,7 +72,6 @@ pub mod pallet { traits::{EthereumReceipt, OnDepositRedeem}, AccountId, }; - use ethabi::{Event as EthEvent, EventParam as EthEventParam, ParamType, RawLog}; use ethereum_primitives::{ log_entry::LogEntry, receipt::EthereumTransactionIndex, EthereumAddress, U256, }; diff --git a/frame/wormhole/backing/ethereum/src/mock.rs b/frame/wormhole/backing/ethereum/src/mock.rs index 9cb062369b..6189e59120 100644 --- a/frame/wormhole/backing/ethereum/src/mock.rs +++ b/frame/wormhole/backing/ethereum/src/mock.rs @@ -19,11 +19,11 @@ //! Mock file for ethereum-backing. // --- crates.io --- -use codec::{Decode, Encode}; +use codec::{Decode, Encode, MaxEncodedLen}; // --- paritytech --- use frame_election_provider_support::onchain; use frame_support::{ - traits::{GenesisBuild, MaxEncodedLen, SortedMembers}, + traits::{Everything, GenesisBuild, SortedMembers}, PalletId, }; use frame_system::{mocking::*, EnsureRoot}; @@ -60,7 +60,7 @@ pub type EthereumRelayError = darwinia_bridge_ethereum::Error; darwinia_support::impl_test_account_data! {} impl frame_system::Config for Test { - type BaseCallFilter = (); + type BaseCallFilter = Everything; type BlockWeights = (); type BlockLength = (); type DbWeight = (); diff --git a/frame/wormhole/backing/s2s/Cargo.toml b/frame/wormhole/backing/s2s/Cargo.toml index 0f73a9cf95..ea160a1f00 100644 --- a/frame/wormhole/backing/s2s/Cargo.toml +++ b/frame/wormhole/backing/s2s/Cargo.toml @@ -13,7 +13,7 @@ version = "2.7.0" # crates.io array-bytes = { version = "1.4" } codec = { package = "parity-scale-codec", version = "2.1", default-features = false, features = ["derive"] } -ethereum-types = { default-features = false, version = "0.11" } +ethereum-types = { version = "0.12", default-features = false } log = { version = "0.4" } serde = { version = "1.0", optional = true } serde_json = { version = "1.0", optional = true } @@ -24,21 +24,20 @@ dp-contract = { default-features = false, path = "../../../../primitives dp-s2s = { default-features = false, path = "../../../../primitives/s2s" } ethereum-primitives = { default-features = false, path = "../../../../primitives/ethereum" } # paritytech -bp-message-dispatch = { default-features = false, git = "https://github.com/darwinia-network/parity-bridges-common", tag = "darwinia-v0.11.6-4" } -bp-messages = { default-features = false, git = "https://github.com/darwinia-network/parity-bridges-common", tag = "darwinia-v0.11.6-4" } -bp-runtime = { default-features = false, git = "https://github.com/darwinia-network/parity-bridges-common", tag = "darwinia-v0.11.6-4" } -frame-benchmarking = { optional = true, default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -frame-support = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -frame-system = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-runtime = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } +bp-message-dispatch = { default-features = false, git = "https://github.com/darwinia-network/parity-bridges-common", branch = "darwinia-v0.11.7" } +bp-messages = { default-features = false, git = "https://github.com/darwinia-network/parity-bridges-common", branch = "darwinia-v0.11.7" } +bp-runtime = { default-features = false, git = "https://github.com/darwinia-network/parity-bridges-common", branch = "darwinia-v0.11.7" } +frame-benchmarking = { optional = true, default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +frame-support = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +frame-system = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-runtime = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } [dev-dependencies] # paritytech darwinia-balances = { path = "../../../balances" } -max-encoded-len = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -pallet-timestamp = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-io = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } +pallet-timestamp = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-io = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } [features] default = ["std"] diff --git a/frame/wormhole/backing/s2s/src/tests.rs b/frame/wormhole/backing/s2s/src/tests.rs index a40f45da7b..a427b7e536 100644 --- a/frame/wormhole/backing/s2s/src/tests.rs +++ b/frame/wormhole/backing/s2s/src/tests.rs @@ -20,13 +20,12 @@ use std::str::FromStr; // --- crates.io --- use array_bytes::hex2bytes_unchecked; -use codec::{Decode, Encode}; +use codec::{Decode, Encode, MaxEncodedLen}; // --- paritytech --- use bp_messages::source_chain::SendMessageArtifacts; use bp_runtime::{derive_account_id, SourceAccount}; - use frame_support::{ - assert_err, assert_ok, dispatch::PostDispatchInfo, traits::MaxEncodedLen, PalletId, + assert_err, assert_ok, dispatch::PostDispatchInfo, traits::Everything, PalletId, }; use frame_system::{mocking::*, RawOrigin}; use sp_runtime::{ @@ -76,7 +75,7 @@ impl pallet_timestamp::Config for Test { } impl frame_system::Config for Test { - type BaseCallFilter = (); + type BaseCallFilter = Everything; type BlockWeights = (); type BlockLength = (); type DbWeight = (); diff --git a/frame/wormhole/backing/tron/Cargo.toml b/frame/wormhole/backing/tron/Cargo.toml index 553223a7f2..3deaabb23b 100644 --- a/frame/wormhole/backing/tron/Cargo.toml +++ b/frame/wormhole/backing/tron/Cargo.toml @@ -13,9 +13,9 @@ version = "2.7.0" # crates.io codec = { package = "parity-scale-codec", version = "2.1", default-features = false } # paritytech -frame-support = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -frame-system = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-runtime = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } +frame-support = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +frame-system = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-runtime = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } # darwinia-network darwinia-support = { default-features = false, path = "../../../support" } diff --git a/frame/wormhole/issuing/ethereum/Cargo.toml b/frame/wormhole/issuing/ethereum/Cargo.toml index 1774dda7ce..6a2af26abb 100644 --- a/frame/wormhole/issuing/ethereum/Cargo.toml +++ b/frame/wormhole/issuing/ethereum/Cargo.toml @@ -25,11 +25,11 @@ dp-evm = { default-features = false, path = "../../../../prim dvm-ethereum = { default-features = false, path = "../../../dvm" } ethereum-primitives = { default-features = false, features = ["full-codec"], path = "../../../../primitives/ethereum" } # paritytech -frame-benchmarking = { optional = true, default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -frame-support = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -frame-system = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-runtime = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } +frame-benchmarking = { optional = true, default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +frame-support = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +frame-system = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-runtime = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } [features] default = ["std"] diff --git a/frame/wormhole/issuing/s2s/Cargo.toml b/frame/wormhole/issuing/s2s/Cargo.toml index f2b836f09f..6f951c379f 100644 --- a/frame/wormhole/issuing/s2s/Cargo.toml +++ b/frame/wormhole/issuing/s2s/Cargo.toml @@ -13,7 +13,7 @@ version = "2.7.0" # crates.io array-bytes = { version = "1.4" } codec = { package = "parity-scale-codec", version = "2.1", default-features = false, features = ["derive"] } -ethereum-types = { default-features = false, version = "0.11.0" } +ethereum-types = { version = "0.12", default-features = false } log = { version = "0.4" } serde = { version = "1.0", optional = true } serde_json = { version = "1.0", optional = true } @@ -28,27 +28,25 @@ dp-s2s = { default-features = false, path = "../../../../primitives dvm-ethereum = { default-features = false, path = "../../../dvm" } ethereum-primitives = { default-features = false, path = "../../../../primitives/ethereum" } # paritytech -bp-message-dispatch = { default-features = false, git = "https://github.com/darwinia-network/parity-bridges-common", tag = "darwinia-v0.11.6-4" } -bp-messages = { default-features = false, git = "https://github.com/darwinia-network/parity-bridges-common", tag = "darwinia-v0.11.6-4" } -bp-runtime = { default-features = false, git = "https://github.com/darwinia-network/parity-bridges-common", tag = "darwinia-v0.11.6-4" } -frame-benchmarking = { optional = true, default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -frame-support = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -frame-system = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-io = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-runtime = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } +bp-message-dispatch = { default-features = false, git = "https://github.com/darwinia-network/parity-bridges-common", branch = "darwinia-v0.11.7" } +bp-messages = { default-features = false, git = "https://github.com/darwinia-network/parity-bridges-common", branch = "darwinia-v0.11.7" } +bp-runtime = { default-features = false, git = "https://github.com/darwinia-network/parity-bridges-common", branch = "darwinia-v0.11.7" } +frame-benchmarking = { optional = true, default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +frame-support = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +frame-system = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-io = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-runtime = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } [dev-dependencies] # crates.io -ethereum = { version = "0.7", features = ["with-codec"] } -evm = { version = "0.27", features = ["with-codec"] } +ethereum = { version = "0.9", features = ["with-codec"] } +evm = { version = "0.30", features = ["with-codec"] } libsecp256k1 = { version = "0.5", features = ["static-context", "hmac"] } rlp = { version = "0.5" } # darwinia-network darwinia-balances = { path = "../../../balances" } -pallet-timestamp = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -# paritytech -max-encoded-len = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } +pallet-timestamp = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } [features] default = ["std"] diff --git a/frame/wormhole/issuing/s2s/src/mock.rs b/frame/wormhole/issuing/s2s/src/mock.rs index 146db9ead2..f4500227d5 100644 --- a/frame/wormhole/issuing/s2s/src/mock.rs +++ b/frame/wormhole/issuing/s2s/src/mock.rs @@ -17,7 +17,7 @@ // along with Darwinia. If not, see . // --- crates.io --- -use codec::{Decode, Encode}; +use codec::{Decode, Encode, MaxEncodedLen}; use std::str::FromStr; // --- darwinia-network --- use crate::{ @@ -34,7 +34,7 @@ use dvm_ethereum::{ }; // --- paritytech --- use frame_support::{ - traits::{GenesisBuild, MaxEncodedLen}, + traits::{Everything, GenesisBuild}, PalletId, }; use frame_system::mocking::*; @@ -44,7 +44,7 @@ use sp_runtime::{ AccountId32, RuntimeDebug, }; -use ethereum::{Transaction, TransactionAction, TransactionSignature}; +use ethereum::{TransactionAction, TransactionSignature, TransactionV0}; use rlp::RlpStream; use sha3::{Digest, Keccak256}; @@ -147,7 +147,7 @@ impl pallet_timestamp::Config for Test { } impl frame_system::Config for Test { - type BaseCallFilter = (); + type BaseCallFilter = Everything; type BlockWeights = (); type BlockLength = (); type DbWeight = (); @@ -328,7 +328,7 @@ impl UnsignedTransaction { H256::from_slice(&Keccak256::digest(&stream.out()).as_slice()) } - pub fn sign(&self, key: &H256) -> Transaction { + pub fn sign(&self, key: &H256) -> TransactionV0 { let hash = self.signing_hash(); let msg = libsecp256k1::Message::parse(hash.as_fixed_bytes()); let s = libsecp256k1::sign( @@ -344,7 +344,7 @@ impl UnsignedTransaction { ) .unwrap(); - Transaction { + TransactionV0 { nonce: self.nonce, gas_price: self.gas_price, gas_limit: self.gas_limit, diff --git a/node/cli/Cargo.toml b/node/cli/Cargo.toml index 4540612e09..651130af82 100644 --- a/node/cli/Cargo.toml +++ b/node/cli/Cargo.toml @@ -23,17 +23,17 @@ bsc-primitives = { path = "../../primitives/bsc" } dp-consensus = { path = "../../primitives/consensus" } drml-service = { default-features = false, path = "../service" } # paritytech -frame-benchmarking-cli = { optional = true, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sc-cli = { optional = true, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sc-service = { optional = true, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-core = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-trie = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -try-runtime-cli = { optional = true, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } +frame-benchmarking-cli = { optional = true, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sc-cli = { optional = true, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sc-service = { optional = true, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-core = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-trie = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +try-runtime-cli = { optional = true, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } [build-dependencies] # paritytech -substrate-build-script-utils = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -try-runtime-cli = { optional = true, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } +substrate-build-script-utils = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +try-runtime-cli = { optional = true, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } [features] default = [ diff --git a/node/primitives/bridge/Cargo.toml b/node/primitives/bridge/Cargo.toml index 71f08daeb5..2d7a7d5c09 100644 --- a/node/primitives/bridge/Cargo.toml +++ b/node/primitives/bridge/Cargo.toml @@ -14,15 +14,15 @@ version = "2.7.0" darwinia-fee-market = { default-features = false, path = "../../../frame/fee-market" } drml-common-primitives = { default-features = false, path = "../common" } # paritytech -bp-messages = { default-features = false, git = "https://github.com/darwinia-network/parity-bridges-common", tag = "darwinia-v0.11.6-4" } -bp-runtime = { default-features = false, git = "https://github.com/darwinia-network/parity-bridges-common", tag = "darwinia-v0.11.6-4" } -bridge-runtime-common = { default-features = false, git = "https://github.com/darwinia-network/parity-bridges-common", tag = "darwinia-v0.11.6-4" } -frame-support = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -pallet-bridge-dispatch = { default-features = false, git = "https://github.com/darwinia-network/parity-bridges-common", tag = "darwinia-v0.11.6-4" } -sp-api = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-core = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-runtime = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } +bp-messages = { default-features = false, git = "https://github.com/darwinia-network/parity-bridges-common", branch = "darwinia-v0.11.7" } +bp-runtime = { default-features = false, git = "https://github.com/darwinia-network/parity-bridges-common", branch = "darwinia-v0.11.7" } +bridge-runtime-common = { default-features = false, git = "https://github.com/darwinia-network/parity-bridges-common", branch = "darwinia-v0.11.7" } +frame-support = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +pallet-bridge-dispatch = { default-features = false, git = "https://github.com/darwinia-network/parity-bridges-common", branch = "darwinia-v0.11.7" } +sp-api = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-core = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-runtime = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } [features] default = ["std"] diff --git a/node/primitives/common/Cargo.toml b/node/primitives/common/Cargo.toml index b9419f53de..75358a155a 100644 --- a/node/primitives/common/Cargo.toml +++ b/node/primitives/common/Cargo.toml @@ -11,8 +11,8 @@ version = "2.7.0" [dependencies] # paritytech -sp-core = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-runtime = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } +sp-core = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-runtime = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } [features] default = ["std"] diff --git a/node/rpc/Cargo.toml b/node/rpc/Cargo.toml index 92ddc96545..2697c33b70 100644 --- a/node/rpc/Cargo.toml +++ b/node/rpc/Cargo.toml @@ -26,28 +26,28 @@ dvm-ethereum = { path = "../../frame/dvm" } dvm-rpc-runtime-api = { path = "../../frame/dvm/rpc/runtime-api" } pangolin-runtime = { path = "../runtime/pangolin" } # paritytech -pallet-transaction-payment-rpc = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sc-chain-spec = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sc-client-api = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sc-consensus-babe = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sc-consensus-babe-rpc = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sc-consensus-epochs = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sc-finality-grandpa = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sc-finality-grandpa-rpc = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sc-network = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sc-rpc = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sc-sync-state-rpc = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-api = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-block-builder = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-blockchain = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-consensus = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-keystore = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-runtime = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-transaction-pool = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -substrate-frame-rpc-system = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } +pallet-transaction-payment-rpc = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sc-chain-spec = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sc-client-api = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sc-consensus-babe = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sc-consensus-babe-rpc = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sc-consensus-epochs = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sc-finality-grandpa = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sc-finality-grandpa-rpc = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sc-network = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sc-rpc = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sc-sync-state-rpc = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sc-transaction-pool-api = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-api = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-block-builder = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-blockchain = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-consensus = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-keystore = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-runtime = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +substrate-frame-rpc-system = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } # template futures = { version = "0.3", optional = true } -sc-consensus-manual-seal = { optional = true, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } +sc-consensus-manual-seal = { optional = true, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } template-runtime = { optional = true, path = "../runtime/template" } [features] diff --git a/node/rpc/src/lib.rs b/node/rpc/src/lib.rs index d7ff1052d4..8e8d329c2c 100644 --- a/node/rpc/src/lib.rs +++ b/node/rpc/src/lib.rs @@ -25,7 +25,7 @@ pub mod template; pub use sc_rpc::{DenyUnsafe, SubscriptionTaskExecutor}; // --- std --- -use std::sync::Arc; +use std::{error::Error, sync::Arc}; // --- darwinia-network --- use drml_common_primitives::{ AccountId, Balance, BlockNumber, Hash, Hashing, Nonce, OpaqueBlock as Block, @@ -33,6 +33,8 @@ use drml_common_primitives::{ /// A type representing all RPC extensions. pub type RpcExtension = jsonrpc_core::IoHandler; +/// RPC result. +pub type RpcResult = Result>; /// Extra dependencies for BABE. pub struct BabeDeps { diff --git a/node/rpc/src/pangolin.rs b/node/rpc/src/pangolin.rs index d6f77b8fad..d0918b1ead 100644 --- a/node/rpc/src/pangolin.rs +++ b/node/rpc/src/pangolin.rs @@ -73,7 +73,7 @@ pub struct LightDeps { pub fn create_full( deps: FullDeps, subscription_task_executor: SubscriptionTaskExecutor, -) -> RpcExtension +) -> RpcResult where C: 'static + Send @@ -93,7 +93,7 @@ where C::Api: darwinia_staking_rpc::StakingRuntimeApi, C::Api: darwinia_fee_market_rpc::FeeMarketRuntimeApi, C::Api: dvm_rpc_runtime_api::EthereumRuntimeRPCApi, - P: 'static + Sync + Send + sp_transaction_pool::TransactionPool, + P: 'static + Sync + Send + sc_transaction_pool_api::TransactionPool, SC: 'static + sp_consensus::SelectChain, B: 'static + Send + Sync + sc_client_api::Backend, B::State: sc_client_api::StateBackend, @@ -176,7 +176,7 @@ where shared_authority_set, shared_epoch_changes, deny_unsafe, - ))); + )?)); io.extend_with(BalancesApi::to_delegate(Balances::new(client.clone()))); io.extend_with(HeaderMMRApi::to_delegate(HeaderMMR::new(client.clone()))); io.extend_with(StakingApi::to_delegate(Staking::new(client.clone()))); @@ -233,7 +233,7 @@ where ))); io.extend_with(Web3ApiServer::to_delegate(Web3Api::new(client))); - io + Ok(io) } /// Instantiate all RPC extensions for light node. @@ -246,7 +246,7 @@ where + sp_blockchain::HeaderBackend, C::Api: substrate_frame_rpc_system::AccountNonceApi, C::Api: pallet_transaction_payment_rpc::TransactionPaymentRuntimeApi, - P: 'static + sp_transaction_pool::TransactionPool, + P: 'static + sc_transaction_pool_api::TransactionPool, F: 'static + sc_client_api::Fetcher, { // --- paritytech --- diff --git a/node/rpc/src/pangoro.rs b/node/rpc/src/pangoro.rs index b2de638331..a03fe7c664 100644 --- a/node/rpc/src/pangoro.rs +++ b/node/rpc/src/pangoro.rs @@ -54,7 +54,7 @@ pub struct LightDeps { } /// Instantiate all RPC extensions. -pub fn create_full(deps: FullDeps) -> RpcExtension +pub fn create_full(deps: FullDeps) -> RpcResult where C: 'static + Send @@ -69,7 +69,7 @@ where C::Api: sc_consensus_babe::BabeApi, C::Api: sp_block_builder::BlockBuilder, C::Api: darwinia_balances_rpc::BalancesRuntimeApi, - P: 'static + sp_transaction_pool::TransactionPool, + P: 'static + sc_transaction_pool_api::TransactionPool, SC: 'static + sp_consensus::SelectChain, B: 'static + Send + Sync + sc_client_api::Backend, B::State: sc_client_api::StateBackend, @@ -136,11 +136,11 @@ where shared_authority_set, shared_epoch_changes, deny_unsafe, - ))); + )?)); io.extend_with(BalancesApi::to_delegate(Balances::new(client.clone()))); io.extend_with(FeeMarketApi::to_delegate(FeeMarket::new(client))); - io + Ok(io) } /// Instantiate all RPC extensions for light node. @@ -153,7 +153,7 @@ where + sp_blockchain::HeaderBackend, C::Api: substrate_frame_rpc_system::AccountNonceApi, C::Api: pallet_transaction_payment_rpc::TransactionPaymentRuntimeApi, - P: 'static + sp_transaction_pool::TransactionPool, + P: 'static + sc_transaction_pool_api::TransactionPool, F: 'static + sc_client_api::Fetcher, { // --- paritytech --- diff --git a/node/rpc/src/template.rs b/node/rpc/src/template.rs index ea50d43632..9018945c62 100644 --- a/node/rpc/src/template.rs +++ b/node/rpc/src/template.rs @@ -54,7 +54,7 @@ pub struct FullDeps { pub fn create_full( deps: FullDeps, subscription_task_executor: SubscriptionTaskExecutor, -) -> jsonrpc_core::IoHandler +) -> RpcExtension where C: 'static + Send @@ -69,7 +69,7 @@ where C::Api: sp_block_builder::BlockBuilder, C::Api: pallet_transaction_payment_rpc::TransactionPaymentRuntimeApi, C::Api: dvm_rpc_runtime_api::EthereumRuntimeRPCApi, - P: 'static + sp_transaction_pool::TransactionPool, + P: 'static + sc_transaction_pool_api::TransactionPool, B: 'static + sc_client_api::Backend, B::State: sc_client_api::StateBackend, { diff --git a/node/runtime/common/Cargo.toml b/node/runtime/common/Cargo.toml index 0a77360830..5ac1c02391 100644 --- a/node/runtime/common/Cargo.toml +++ b/node/runtime/common/Cargo.toml @@ -17,16 +17,13 @@ darwinia-balances = { default-features = false, path = "../../../frame/bala darwinia-support = { default-features = false, path = "../../../frame/support" } drml-common-primitives = { default-features = false, path = "../../primitives/common" } # paritytech -frame-support = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -frame-system = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -pallet-authorship = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -pallet-transaction-payment = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -pallet-treasury = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-runtime = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } - -# will be removed in later substrate version -max-encoded-len = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } +frame-support = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +frame-system = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +pallet-authorship = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +pallet-transaction-payment = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +pallet-treasury = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-runtime = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } [features] default = ["std"] @@ -47,5 +44,4 @@ std = [ "pallet-treasury/std", "sp-runtime/std", "sp-std/std", - "max-encoded-len/std", ] diff --git a/node/runtime/common/src/impls.rs b/node/runtime/common/src/impls.rs index 07501b9b56..dd38168cd6 100644 --- a/node/runtime/common/src/impls.rs +++ b/node/runtime/common/src/impls.rs @@ -19,9 +19,9 @@ //! Auxillary struct/enums for Darwinia runtime. // --- crates.io --- -use codec::{Decode, Encode}; +use codec::{Decode, Encode, MaxEncodedLen}; // --- paritytech --- -use frame_support::traits::{Currency, Imbalance, MaxEncodedLen, OnUnbalanced}; +use frame_support::traits::{Currency, Imbalance, OnUnbalanced}; use sp_runtime::RuntimeDebug; // --- darwinia-network --- use crate::*; diff --git a/node/runtime/pangolin/Cargo.toml b/node/runtime/pangolin/Cargo.toml index 8e0b6c64c3..042216edc9 100644 --- a/node/runtime/pangolin/Cargo.toml +++ b/node/runtime/pangolin/Cargo.toml @@ -13,9 +13,9 @@ version = "2.7.0" # crates.io array-bytes = { version = "1.4" } codec = { package = "parity-scale-codec", version = "2.1", default-features = false } -evm = { version = "0.27", default-features = false, features = ["with-codec"] } +evm = { version = "0.30", default-features = false, features = ["with-codec"] } serde = { version = "1.0", optional = true } -smallvec = { version = "1.6" } +smallvec = { version = "1.7" } static_assertions = { version = "1.1" } # darwinia-network common-runtime = { default-features = false, path = "../common" } @@ -59,67 +59,66 @@ module-transaction-pause = { default-features = false, path = ".. to-ethereum-backing = { default-features = false, path = "../../../frame/wormhole/backing/ethereum" } to-tron-backing = { default-features = false, path = "../../../frame/wormhole/backing/tron" } # paritytech -bp-message-dispatch = { default-features = false, git = "https://github.com/darwinia-network/parity-bridges-common", tag = "darwinia-v0.11.6-4" } -bp-messages = { default-features = false, git = "https://github.com/darwinia-network/parity-bridges-common", tag = "darwinia-v0.11.6-4" } -bp-runtime = { default-features = false, git = "https://github.com/darwinia-network/parity-bridges-common", tag = "darwinia-v0.11.6-4" } -bridge-runtime-common = { default-features = false, git = "https://github.com/darwinia-network/parity-bridges-common", tag = "darwinia-v0.11.6-4" } -frame-benchmarking = { optional = true, default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -frame-election-provider-support = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -frame-executive = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -frame-support = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -frame-system = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -frame-system-benchmarking = { optional = true, default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -frame-system-rpc-runtime-api = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -frame-try-runtime = { default-features = false, optional = true, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -max-encoded-len = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -pallet-authority-discovery = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -pallet-authorship = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -pallet-babe = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -pallet-bounties = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -pallet-bridge-dispatch = { default-features = false, git = "https://github.com/darwinia-network/parity-bridges-common", tag = "darwinia-v0.11.6-4" } -pallet-bridge-grandpa = { default-features = false, git = "https://github.com/darwinia-network/parity-bridges-common", tag = "darwinia-v0.11.6-4" } -pallet-bridge-messages = { default-features = false, git = "https://github.com/darwinia-network/parity-bridges-common", tag = "darwinia-v0.11.6-4" } -pallet-collective = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -pallet-election-provider-multi-phase = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -pallet-grandpa = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -pallet-identity = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -pallet-im-online = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -pallet-membership = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -pallet-multisig = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -pallet-offences = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -pallet-proxy = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -pallet-randomness-collective-flip = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -pallet-recovery = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -pallet-scheduler = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -pallet-session = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -pallet-society = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -pallet-sudo = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -pallet-timestamp = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -pallet-tips = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -pallet-transaction-payment = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -pallet-transaction-payment-rpc-runtime-api = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -pallet-treasury = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -pallet-utility = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-api = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-application-crypto = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-authority-discovery = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-block-builder = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-consensus-babe = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-core = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-inherents = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-io = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-npos-elections = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-offchain = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-runtime = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-session = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-staking = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-transaction-pool = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-version = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } +bp-message-dispatch = { default-features = false, git = "https://github.com/darwinia-network/parity-bridges-common", branch = "darwinia-v0.11.7" } +bp-messages = { default-features = false, git = "https://github.com/darwinia-network/parity-bridges-common", branch = "darwinia-v0.11.7" } +bp-runtime = { default-features = false, git = "https://github.com/darwinia-network/parity-bridges-common", branch = "darwinia-v0.11.7" } +bridge-runtime-common = { default-features = false, git = "https://github.com/darwinia-network/parity-bridges-common", branch = "darwinia-v0.11.7" } +frame-benchmarking = { optional = true, default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +frame-election-provider-support = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +frame-executive = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +frame-support = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +frame-system = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +frame-system-benchmarking = { optional = true, default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +frame-system-rpc-runtime-api = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +frame-try-runtime = { default-features = false, optional = true, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +pallet-authority-discovery = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +pallet-authorship = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +pallet-babe = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +pallet-bounties = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +pallet-bridge-dispatch = { default-features = false, git = "https://github.com/darwinia-network/parity-bridges-common", branch = "darwinia-v0.11.7" } +pallet-bridge-grandpa = { default-features = false, git = "https://github.com/darwinia-network/parity-bridges-common", branch = "darwinia-v0.11.7" } +pallet-bridge-messages = { default-features = false, git = "https://github.com/darwinia-network/parity-bridges-common", branch = "darwinia-v0.11.7" } +pallet-collective = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +pallet-election-provider-multi-phase = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +pallet-grandpa = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +pallet-identity = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +pallet-im-online = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +pallet-membership = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +pallet-multisig = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +pallet-offences = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +pallet-proxy = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +pallet-randomness-collective-flip = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +pallet-recovery = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +pallet-scheduler = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +pallet-session = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +pallet-society = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +pallet-sudo = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +pallet-timestamp = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +pallet-tips = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +pallet-transaction-payment = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +pallet-transaction-payment-rpc-runtime-api = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +pallet-treasury = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +pallet-utility = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-api = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-application-crypto = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-authority-discovery = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-block-builder = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-consensus-babe = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-core = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-inherents = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-io = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-npos-elections = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-offchain = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-runtime = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-session = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-staking = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-transaction-pool = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-version = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } [build-dependencies] # paritytech -substrate-wasm-builder = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } +substrate-wasm-builder = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } [features] default = ["std"] @@ -183,7 +182,6 @@ std = [ "frame-system-benchmarking/std", "frame-system-rpc-runtime-api/std", "frame-try-runtime/std", - "max-encoded-len/std", "pallet-authority-discovery/std", "pallet-authorship/std", "pallet-babe/std", diff --git a/node/runtime/pangolin/src/lib.rs b/node/runtime/pangolin/src/lib.rs index 9c4538a74b..557707e4c6 100644 --- a/node/runtime/pangolin/src/lib.rs +++ b/node/runtime/pangolin/src/lib.rs @@ -407,6 +407,10 @@ sp_api::impl_runtime_apis! { Grandpa::grandpa_authorities() } + fn current_set_id() -> fg_primitives::SetId { + Grandpa::current_set_id() + } + fn submit_report_equivocation_unsigned_extrinsic( equivocation_proof: fg_primitives::EquivocationProof< ::Hash, @@ -650,17 +654,17 @@ sp_api::impl_runtime_apis! { Ethereum::current_transaction_statuses() } - fn current_block() -> Option { + fn current_block() -> Option { Ethereum::current_block() } - fn current_receipts() -> Option> { + fn current_receipts() -> Option> { Ethereum::current_receipts() } fn current_all() -> ( - Option, - Option>, + Option, + Option>, Option> ) { ( @@ -672,7 +676,7 @@ sp_api::impl_runtime_apis! { fn extrinsic_filter( xts: Vec<::Extrinsic>, - ) -> Vec { + ) -> Vec { xts.into_iter().filter_map(|xt| match xt.function { Call::Ethereum(dvm_ethereum::Call::transact(t)) => Some(t), _ => None @@ -752,13 +756,18 @@ sp_api::impl_runtime_apis! { impl frame_benchmarking::Benchmark for Runtime { fn dispatch_benchmark( config: frame_benchmarking::BenchmarkConfig - ) -> Result, sp_runtime::RuntimeString> { + ) -> Result< + (Vec, Vec), + sp_runtime::RuntimeString, + > { use frame_benchmarking::{Benchmarking, BenchmarkBatch, add_benchmark, TrackedStorageKey}; use frame_system_benchmarking::Pallet as SystemBench; + use frame_support::traits::StorageInfoTrait; + impl frame_system_benchmarking::Config for Runtime {} let whitelist: Vec = vec![]; - + let storage_info = AllPalletsWithSystem::storage_info(); let mut batches = Vec::::new(); let params = (&config, &whitelist); @@ -769,21 +778,22 @@ sp_api::impl_runtime_apis! { add_benchmark!(params, batches, darwinia_fee_market, FeeMarket); if batches.is_empty() { return Err("Benchmark not found for this pallet.".into()) } - Ok(batches) + + Ok((batches, storage_info)) } } } pub struct TransactionConverter; impl dvm_rpc_runtime_api::ConvertTransaction for TransactionConverter { - fn convert_transaction(&self, transaction: dvm_ethereum::Transaction) -> UncheckedExtrinsic { + fn convert_transaction(&self, transaction: dvm_ethereum::TransactionV0) -> UncheckedExtrinsic { UncheckedExtrinsic::new_unsigned( >::transact(transaction).into(), ) } } impl dvm_rpc_runtime_api::ConvertTransaction for TransactionConverter { - fn convert_transaction(&self, transaction: dvm_ethereum::Transaction) -> OpaqueExtrinsic { + fn convert_transaction(&self, transaction: dvm_ethereum::TransactionV0) -> OpaqueExtrinsic { let extrinsic = UncheckedExtrinsic::new_unsigned( >::transact(transaction).into(), ); diff --git a/node/runtime/pangolin/src/pallets/babe.rs b/node/runtime/pangolin/src/pallets/babe.rs index 2a79e2bf64..c03be09fb8 100644 --- a/node/runtime/pangolin/src/pallets/babe.rs +++ b/node/runtime/pangolin/src/pallets/babe.rs @@ -18,6 +18,7 @@ impl Config for Runtime { type EpochDuration = EpochDuration; type ExpectedBlockTime = ExpectedBlockTime; type EpochChangeTrigger = ExternalTrigger; + type DisabledValidators = Session; type KeyOwnerProofSystem = Historical; type KeyOwnerProof = >::Proof; diff --git a/node/runtime/pangolin/src/pallets/election_provider_multi_phase.rs b/node/runtime/pangolin/src/pallets/election_provider_multi_phase.rs index a95b99ce7e..ff49ad8bf3 100644 --- a/node/runtime/pangolin/src/pallets/election_provider_multi_phase.rs +++ b/node/runtime/pangolin/src/pallets/election_provider_multi_phase.rs @@ -13,6 +13,19 @@ sp_npos_elections::generate_solution_type!( >(24) ); +/// The numbers configured here should always be more than the the maximum limits of staking pallet +/// to ensure election snapshot will not run out of memory. +pub struct BenchmarkConfig; +impl pallet_election_provider_multi_phase::BenchmarkingConfig for BenchmarkConfig { + const VOTERS: [u32; 2] = [5_000, 10_000]; + const TARGETS: [u32; 2] = [1_000, 2_000]; + const ACTIVE_VOTERS: [u32; 2] = [1000, 4_000]; + const DESIRED_TARGETS: [u32; 2] = [400, 800]; + const SNAPSHOT_MAXIMUM_VOTERS: u32 = 25_000; + const MINER_MAXIMUM_VOTERS: u32 = 15_000; + const MAXIMUM_TARGETS: u32 = 2000; +} + frame_support::parameter_types! { // no signed phase for now, just unsigned. pub const SignedPhase: u32 = 0; @@ -38,6 +51,7 @@ frame_support::parameter_types! { impl Config for Runtime { type Event = Event; type Currency = Ring; + type EstimateCallFee = TransactionPayment; type SignedPhase = SignedPhase; type UnsignedPhase = UnsignedPhase; type SolutionImprovementThreshold = SolutionImprovementThreshold; @@ -60,5 +74,5 @@ impl Config for Runtime { type Fallback = Fallback; type WeightInfo = (); type ForceOrigin = EnsureRootOrHalfCouncil; - type BenchmarkingConfig = (); + type BenchmarkingConfig = BenchmarkConfig; } diff --git a/node/runtime/pangolin/src/pallets/proxy.rs b/node/runtime/pangolin/src/pallets/proxy.rs index 035796b3d3..f94d6649c9 100644 --- a/node/runtime/pangolin/src/pallets/proxy.rs +++ b/node/runtime/pangolin/src/pallets/proxy.rs @@ -1,7 +1,7 @@ // --- crates.io --- -use codec::{Decode, Encode}; +use codec::{Decode, Encode, MaxEncodedLen}; // --- paritytech --- -use frame_support::traits::{InstanceFilter, MaxEncodedLen}; +use frame_support::traits::InstanceFilter; use pallet_proxy::Config; use sp_runtime::{traits::BlakeTwo256, RuntimeDebug}; // --- darwinia-network --- diff --git a/node/runtime/pangolin/src/pallets/system.rs b/node/runtime/pangolin/src/pallets/system.rs index 67bd848367..1b6b52f63d 100644 --- a/node/runtime/pangolin/src/pallets/system.rs +++ b/node/runtime/pangolin/src/pallets/system.rs @@ -1,10 +1,7 @@ pub use pangolin_runtime_system_params::*; // --- paritytech --- -use frame_support::{ - traits::{Contains, Filter}, - weights::constants::RocksDbWeight, -}; +use frame_support::{traits::Contains, weights::constants::RocksDbWeight}; use frame_system::Config; use sp_runtime::traits::AccountIdLookup; use sp_version::RuntimeVersion; @@ -13,8 +10,8 @@ use crate::*; use module_transaction_pause::PausedTransactionFilter; pub struct BaseFilter; -impl Filter for BaseFilter { - fn filter(call: &Call) -> bool { +impl Contains for BaseFilter { + fn contains(call: &Call) -> bool { let is_paused = PausedTransactionFilter::::contains(call); if is_paused { diff --git a/node/runtime/pangoro/Cargo.toml b/node/runtime/pangoro/Cargo.toml index 4d9b7a6c34..8641fcd0c4 100644 --- a/node/runtime/pangoro/Cargo.toml +++ b/node/runtime/pangoro/Cargo.toml @@ -14,7 +14,7 @@ version = "2.7.0" array-bytes = { version = "1.4" } codec = { package = "parity-scale-codec", version = "2.1", default-features = false, features = ["derive"] } serde = { version = "1.0", features = ["derive"], optional = true } -smallvec = { version = "1.6" } +smallvec = { version = "1.7" } # darwinia-network common-runtime = { default-features = false, path = "../common" } darwinia-balances = { default-features = false, path = "../../../frame/balances" } @@ -32,58 +32,57 @@ drml-common-primitives = { default-features = false, path = "../../ module-transaction-pause = { default-features = false, path = "../../../frame/transaction-pause" } to-substrate-backing = { default-features = false, path = "../../../frame/wormhole/backing/s2s" } # paritytech -bp-header-chain = { default-features = false, git = "https://github.com/darwinia-network/parity-bridges-common", tag = "darwinia-v0.11.6-4" } -bp-message-dispatch = { default-features = false, git = "https://github.com/darwinia-network/parity-bridges-common", tag = "darwinia-v0.11.6-4" } -bp-messages = { default-features = false, git = "https://github.com/darwinia-network/parity-bridges-common", tag = "darwinia-v0.11.6-4" } -bp-runtime = { default-features = false, git = "https://github.com/darwinia-network/parity-bridges-common", tag = "darwinia-v0.11.6-4" } -bridge-runtime-common = { default-features = false, git = "https://github.com/darwinia-network/parity-bridges-common", tag = "darwinia-v0.11.6-4" } -frame-benchmarking = { optional = true, default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -frame-election-provider-support = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -frame-executive = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -frame-support = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -frame-system = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -frame-system-benchmarking = { optional = true, default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -frame-system-rpc-runtime-api = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -frame-try-runtime = { default-features = false, optional = true, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -max-encoded-len = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -pallet-authority-discovery = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -pallet-authorship = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -pallet-babe = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -pallet-bridge-dispatch = { default-features = false, git = "https://github.com/darwinia-network/parity-bridges-common", tag = "darwinia-v0.11.6-4" } -pallet-bridge-grandpa = { default-features = false, git = "https://github.com/darwinia-network/parity-bridges-common", tag = "darwinia-v0.11.6-4" } -pallet-bridge-messages = { default-features = false, git = "https://github.com/darwinia-network/parity-bridges-common", tag = "darwinia-v0.11.6-4" } -pallet-election-provider-multi-phase = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -pallet-grandpa = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -pallet-im-online = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -pallet-offences = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -pallet-randomness-collective-flip = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -pallet-scheduler = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -pallet-session = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -pallet-sudo = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -pallet-timestamp = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -pallet-transaction-payment = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -pallet-transaction-payment-rpc-runtime-api = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -pallet-treasury = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-api = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-authority-discovery = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-block-builder = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-consensus-babe = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-core = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-finality-grandpa = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-inherents = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-npos-elections = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-offchain = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-runtime = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-session = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-staking = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-transaction-pool = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-trie = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-version = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } +bp-header-chain = { default-features = false, git = "https://github.com/darwinia-network/parity-bridges-common", branch = "darwinia-v0.11.7" } +bp-message-dispatch = { default-features = false, git = "https://github.com/darwinia-network/parity-bridges-common", branch = "darwinia-v0.11.7" } +bp-messages = { default-features = false, git = "https://github.com/darwinia-network/parity-bridges-common", branch = "darwinia-v0.11.7" } +bp-runtime = { default-features = false, git = "https://github.com/darwinia-network/parity-bridges-common", branch = "darwinia-v0.11.7" } +bridge-runtime-common = { default-features = false, git = "https://github.com/darwinia-network/parity-bridges-common", branch = "darwinia-v0.11.7" } +frame-benchmarking = { optional = true, default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +frame-election-provider-support = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +frame-executive = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +frame-support = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +frame-system = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +frame-system-benchmarking = { optional = true, default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +frame-system-rpc-runtime-api = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +frame-try-runtime = { default-features = false, optional = true, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +pallet-authority-discovery = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +pallet-authorship = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +pallet-babe = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +pallet-bridge-dispatch = { default-features = false, git = "https://github.com/darwinia-network/parity-bridges-common", branch = "darwinia-v0.11.7" } +pallet-bridge-grandpa = { default-features = false, git = "https://github.com/darwinia-network/parity-bridges-common", branch = "darwinia-v0.11.7" } +pallet-bridge-messages = { default-features = false, git = "https://github.com/darwinia-network/parity-bridges-common", branch = "darwinia-v0.11.7" } +pallet-election-provider-multi-phase = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +pallet-grandpa = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +pallet-im-online = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +pallet-offences = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +pallet-randomness-collective-flip = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +pallet-scheduler = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +pallet-session = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +pallet-sudo = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +pallet-timestamp = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +pallet-transaction-payment = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +pallet-transaction-payment-rpc-runtime-api = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +pallet-treasury = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-api = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-authority-discovery = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-block-builder = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-consensus-babe = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-core = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-finality-grandpa = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-inherents = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-npos-elections = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-offchain = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-runtime = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-session = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-staking = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-transaction-pool = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-trie = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-version = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } [build-dependencies] # paritytech -substrate-wasm-builder = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } +substrate-wasm-builder = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } [features] default = ["std"] @@ -121,7 +120,6 @@ std = [ "frame-system-benchmarking/std", "frame-system-rpc-runtime-api/std", "frame-try-runtime/std", - "max-encoded-len/std", "pallet-authority-discovery/std", "pallet-authorship/std", "pallet-babe/std", diff --git a/node/runtime/pangoro/src/lib.rs b/node/runtime/pangoro/src/lib.rs index a092b72cf1..a35ec9b7b2 100644 --- a/node/runtime/pangoro/src/lib.rs +++ b/node/runtime/pangoro/src/lib.rs @@ -369,6 +369,10 @@ sp_api::impl_runtime_apis! { Grandpa::grandpa_authorities() } + fn current_set_id() -> fg_primitives::SetId { + Grandpa::current_set_id() + } + fn submit_report_equivocation_unsigned_extrinsic( equivocation_proof: fg_primitives::EquivocationProof< ::Hash, @@ -524,13 +528,19 @@ sp_api::impl_runtime_apis! { impl frame_benchmarking::Benchmark for Runtime { fn dispatch_benchmark( config: frame_benchmarking::BenchmarkConfig - ) -> Result, sp_runtime::RuntimeString> { + ) -> Result< + (Vec, Vec), + sp_runtime::RuntimeString, + >{ use frame_benchmarking::{Benchmarking, BenchmarkBatch, add_benchmark, TrackedStorageKey}; use frame_system_benchmarking::Pallet as SystemBench; + use frame_support::traits::StorageInfoTrait; + + impl frame_system_benchmarking::Config for Runtime {} let whitelist: Vec = vec![]; - + let storage_info = AllPalletsWithSystem::storage_info(); let mut batches = Vec::::new(); let params = (&config, &whitelist); @@ -538,7 +548,8 @@ sp_api::impl_runtime_apis! { add_benchmark!(params, batches, to_substrate_backing, Substrate2SubstrateBacking); if batches.is_empty() { return Err("Benchmark not found for this pallet.".into()) } - Ok(batches) + + Ok((batches, storage_info)) } } } diff --git a/node/runtime/pangoro/src/pallets/babe.rs b/node/runtime/pangoro/src/pallets/babe.rs index fca7c1c1ef..d78e113b77 100644 --- a/node/runtime/pangoro/src/pallets/babe.rs +++ b/node/runtime/pangoro/src/pallets/babe.rs @@ -18,6 +18,7 @@ impl Config for Runtime { type EpochDuration = EpochDuration; type ExpectedBlockTime = ExpectedBlockTime; type EpochChangeTrigger = ExternalTrigger; + type DisabledValidators = Session; type KeyOwnerProofSystem = Historical; type KeyOwnerProof = >::Proof; diff --git a/node/runtime/pangoro/src/pallets/election_provider_multi_phase.rs b/node/runtime/pangoro/src/pallets/election_provider_multi_phase.rs index afafd3b21a..20351240f5 100644 --- a/node/runtime/pangoro/src/pallets/election_provider_multi_phase.rs +++ b/node/runtime/pangoro/src/pallets/election_provider_multi_phase.rs @@ -13,6 +13,19 @@ sp_npos_elections::generate_solution_type!( >(16) ); +/// The numbers configured here should always be more than the the maximum limits of staking pallet +/// to ensure election snapshot will not run out of memory. +pub struct BenchmarkConfig; +impl pallet_election_provider_multi_phase::BenchmarkingConfig for BenchmarkConfig { + const VOTERS: [u32; 2] = [5_000, 10_000]; + const TARGETS: [u32; 2] = [1_000, 2_000]; + const ACTIVE_VOTERS: [u32; 2] = [1000, 4_000]; + const DESIRED_TARGETS: [u32; 2] = [400, 800]; + const SNAPSHOT_MAXIMUM_VOTERS: u32 = 25_000; + const MINER_MAXIMUM_VOTERS: u32 = 15_000; + const MAXIMUM_TARGETS: u32 = 2000; +} + frame_support::parameter_types! { // no signed phase for now, just unsigned. pub const SignedPhase: u32 = 0; @@ -38,6 +51,7 @@ frame_support::parameter_types! { impl Config for Runtime { type Event = Event; type Currency = Ring; + type EstimateCallFee = TransactionPayment; type SignedPhase = SignedPhase; type UnsignedPhase = UnsignedPhase; type SolutionImprovementThreshold = SolutionImprovementThreshold; @@ -60,5 +74,5 @@ impl Config for Runtime { type Fallback = Fallback; type WeightInfo = (); type ForceOrigin = RootOrigin; - type BenchmarkingConfig = (); + type BenchmarkingConfig = BenchmarkConfig; } diff --git a/node/runtime/pangoro/src/pallets/system.rs b/node/runtime/pangoro/src/pallets/system.rs index dde5fe305f..8130d24a98 100644 --- a/node/runtime/pangoro/src/pallets/system.rs +++ b/node/runtime/pangoro/src/pallets/system.rs @@ -1,8 +1,5 @@ // --- paritytech --- -use frame_support::{ - traits::{Contains, Filter}, - weights::constants::RocksDbWeight, -}; +use frame_support::{traits::Contains, weights::constants::RocksDbWeight}; use frame_system::Config; use sp_runtime::traits::AccountIdLookup; use sp_version::RuntimeVersion; @@ -11,8 +8,8 @@ use crate::*; use module_transaction_pause::PausedTransactionFilter; pub struct BaseFilter; -impl Filter for BaseFilter { - fn filter(call: &Call) -> bool { +impl Contains for BaseFilter { + fn contains(call: &Call) -> bool { let is_paused = PausedTransactionFilter::::contains(call); if is_paused { diff --git a/node/runtime/template/Cargo.toml b/node/runtime/template/Cargo.toml index 4530da1b1c..ed461c47ba 100644 --- a/node/runtime/template/Cargo.toml +++ b/node/runtime/template/Cargo.toml @@ -25,33 +25,32 @@ drml-common-primitives = { default-features = false, path = "../../pri dvm-ethereum = { default-features = false, path = "../../../frame/dvm" } dvm-rpc-runtime-api = { default-features = false, path = "../../../frame/dvm/rpc/runtime-api" } # paritytech -frame-executive = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -frame-support = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -frame-system = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -frame-system-rpc-runtime-api = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -max-encoded-len = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -pallet-aura = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -pallet-grandpa = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -pallet-randomness-collective-flip = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -pallet-sudo = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -pallet-timestamp = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -pallet-transaction-payment = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -pallet-transaction-payment-rpc-runtime-api = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-api = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-block-builder = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-consensus-aura = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-core = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-inherents = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-io = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-offchain = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-runtime = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-session = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-transaction-pool = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-version = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } +frame-executive = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +frame-support = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +frame-system = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +frame-system-rpc-runtime-api = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +pallet-aura = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +pallet-grandpa = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +pallet-randomness-collective-flip = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +pallet-sudo = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +pallet-timestamp = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +pallet-transaction-payment = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +pallet-transaction-payment-rpc-runtime-api = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-api = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-block-builder = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-consensus-aura = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-core = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-inherents = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-io = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-offchain = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-runtime = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-session = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-transaction-pool = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-version = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } [build-dependencies] -substrate-wasm-builder = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } +substrate-wasm-builder = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } [features] default = ["std"] @@ -76,7 +75,6 @@ std = [ "frame-support/std", "frame-system/std", "frame-system-rpc-runtime-api/std", - "max-encoded-len/std", "pallet-aura/std", "pallet-grandpa/std", "pallet-randomness-collective-flip/std", diff --git a/node/runtime/template/src/lib.rs b/node/runtime/template/src/lib.rs index 45856fb4eb..0feac0c553 100644 --- a/node/runtime/template/src/lib.rs +++ b/node/runtime/template/src/lib.rs @@ -218,6 +218,10 @@ sp_api::impl_runtime_apis! { Grandpa::grandpa_authorities() } + fn current_set_id() -> fg_primitives::SetId { + Grandpa::current_set_id() + } + fn submit_report_equivocation_unsigned_extrinsic( _: fg_primitives::EquivocationProof< ::Hash, @@ -353,17 +357,17 @@ sp_api::impl_runtime_apis! { Ethereum::current_transaction_statuses() } - fn current_block() -> Option { + fn current_block() -> Option { Ethereum::current_block() } - fn current_receipts() -> Option> { + fn current_receipts() -> Option> { Ethereum::current_receipts() } fn current_all() -> ( - Option, - Option>, + Option, + Option>, Option> ) { ( @@ -375,7 +379,7 @@ sp_api::impl_runtime_apis! { fn extrinsic_filter( xts: Vec<::Extrinsic>, - ) -> Vec { + ) -> Vec { xts.into_iter().filter_map(|xt| match xt.function { Call::Ethereum(dvm_ethereum::Call::transact(t)) => Some(t), _ => None @@ -386,14 +390,14 @@ sp_api::impl_runtime_apis! { pub struct TransactionConverter; impl dvm_rpc_runtime_api::ConvertTransaction for TransactionConverter { - fn convert_transaction(&self, transaction: dvm_ethereum::Transaction) -> UncheckedExtrinsic { + fn convert_transaction(&self, transaction: dvm_ethereum::TransactionV0) -> UncheckedExtrinsic { UncheckedExtrinsic::new_unsigned( >::transact(transaction).into(), ) } } impl dvm_rpc_runtime_api::ConvertTransaction for TransactionConverter { - fn convert_transaction(&self, transaction: dvm_ethereum::Transaction) -> OpaqueExtrinsic { + fn convert_transaction(&self, transaction: dvm_ethereum::TransactionV0) -> OpaqueExtrinsic { let extrinsic = UncheckedExtrinsic::new_unsigned( >::transact(transaction).into(), ); diff --git a/node/runtime/template/src/pallets/aura.rs b/node/runtime/template/src/pallets/aura.rs index 414fbf4dd9..e7ec5093d2 100644 --- a/node/runtime/template/src/pallets/aura.rs +++ b/node/runtime/template/src/pallets/aura.rs @@ -14,4 +14,5 @@ sp_runtime::impl_opaque_keys! { impl Config for Runtime { type AuthorityId = AuraId; + type DisabledValidators = (); } diff --git a/node/runtime/template/src/pallets/system.rs b/node/runtime/template/src/pallets/system.rs index 27172ec1c1..d9768bdeb3 100644 --- a/node/runtime/template/src/pallets/system.rs +++ b/node/runtime/template/src/pallets/system.rs @@ -1,5 +1,5 @@ // --- paritytech --- -use frame_support::weights::constants::RocksDbWeight; +use frame_support::{traits::Everything, weights::constants::RocksDbWeight}; use frame_system::Config; use sp_runtime::traits::AccountIdLookup; use sp_version::RuntimeVersion; @@ -12,7 +12,7 @@ frame_support::parameter_types! { } impl Config for Runtime { - type BaseCallFilter = (); + type BaseCallFilter = Everything; type BlockWeights = RuntimeBlockWeights; type BlockLength = RuntimeBlockLength; type DbWeight = RocksDbWeight; diff --git a/node/service/Cargo.toml b/node/service/Cargo.toml index 7df181b50d..f34c82b713 100644 --- a/node/service/Cargo.toml +++ b/node/service/Cargo.toml @@ -15,6 +15,7 @@ array-bytes = { version = "1.4" } codec = { package = "parity-scale-codec", version = "2.1" } futures = { version = "0.3" } rand = { version = "0.8" } +serde = { version = "1.0" } serde_json = { version = "1.0" } # darwinia-network darwinia-balances-rpc-runtime-api = { path = "../../frame/balances/rpc/runtime-api" } @@ -35,48 +36,49 @@ dvm-rpc-runtime-api = { path = "../../frame/dvm/rpc/runtime-api" pangolin-runtime = { path = "../runtime/pangolin" } pangoro-runtime = { path = "../runtime/pangoro" } # paritytech -frame-benchmarking = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -frame-system-rpc-runtime-api = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -pallet-im-online = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sc-authority-discovery = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sc-basic-authorship = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sc-client-api = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sc-consensus = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sc-consensus-babe = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sc-consensus-slots = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sc-consensus-uncles = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sc-executor = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sc-finality-grandpa = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sc-finality-grandpa-warp-sync = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sc-keystore = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sc-network = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sc-service = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sc-telemetry = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sc-transaction-pool = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-api = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-authority-discovery = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-authorship = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-block-builder = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-blockchain = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-consensus = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-consensus-babe = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-core = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-finality-grandpa = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-offchain = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-runtime = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-session = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-timestamp = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-transaction-pool = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-trie = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -substrate-prometheus-endpoint = { git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } +frame-benchmarking = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +frame-system-rpc-runtime-api = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +pallet-im-online = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sc-authority-discovery = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sc-basic-authorship = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sc-chain-spec = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sc-client-api = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sc-consensus = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sc-consensus-babe = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sc-consensus-slots = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sc-consensus-uncles = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sc-executor = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sc-finality-grandpa = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sc-keystore = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sc-network = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sc-service = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sc-sync-state-rpc = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sc-telemetry = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sc-transaction-pool = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-api = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-authority-discovery = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-authorship = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-block-builder = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-blockchain = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-consensus = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-consensus-babe = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-core = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-finality-grandpa = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-offchain = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-runtime = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-session = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-timestamp = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-transaction-pool = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-trie = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +substrate-prometheus-endpoint = { git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } # template async-trait = { version = "0.1", optional = true } log = { version = "0.4", optional = true } -sc-consensus-aura = { optional = true, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sc-consensus-manual-seal = { optional = true, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-consensus-aura = { optional = true, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-inherents = { optional = true, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } +sc-consensus-aura = { optional = true, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sc-consensus-manual-seal = { optional = true, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-consensus-aura = { optional = true, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-inherents = { optional = true, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } template-runtime = { optional = true, path = "../runtime/template" } diff --git a/node/service/src/chain_spec/mod.rs b/node/service/src/chain_spec/mod.rs index 4d20ed76dc..979c3918e1 100644 --- a/node/service/src/chain_spec/mod.rs +++ b/node/service/src/chain_spec/mod.rs @@ -27,15 +27,22 @@ pub mod template; #[cfg(feature = "template")] pub use template::ChainSpec as TemplateChainSpec; +// --- crates.io --- +// use serde::{Deserialize, Serialize}; // --- paritytech --- use pallet_im_online::sr25519::AuthorityId as ImOnlineId; +use sc_chain_spec::{ChainType, GenericChainSpec, Properties}; +// use sc_chain_spec::ChainSpecExtension; +// use sc_client_api::{BadBlocks, ForkBlocks}; use sc_finality_grandpa::AuthorityId as GrandpaId; +// use sc_sync_state_rpc::LightSyncStateExtension; use sp_authority_discovery::AuthorityId as AuthorityDiscoveryId; use sp_consensus_babe::AuthorityId as BabeId; use sp_core::{sr25519, Pair, Public}; use sp_runtime::traits::IdentifyAccount; // --- darwinia-network --- use drml_common_primitives::{AccountId, AccountPublic}; +// use drml_common_primitives::OpaqueBlock; const DEFAULT_PROTOCOL_ID: &str = "drml"; @@ -64,6 +71,22 @@ const TEAM_MEMBERS: &[&str] = &[ "0x88d388115bd0df43e805b029207cfa4925cecfb29026e345979d9b0004466c49", ]; +// TODO: next version +// /// Node `ChainSpec` extensions. +// /// +// /// Additional parameters for some Substrate core modules, +// /// customizable from the chain spec. +// #[derive(Default, Clone, Serialize, Deserialize, ChainSpecExtension)] +// #[serde(rename_all = "camelCase")] +// pub struct Extensions { +// /// Block numbers with known hashes. +// pub fork_blocks: ForkBlocks, +// /// Known bad block hashes. +// pub bad_blocks: BadBlocks, +// /// The light sync state extension used by the sync-state rpc. +// pub light_sync_state: LightSyncStateExtension, +// } + /// Generate a crypto pair from seed. pub fn get_from_seed(seed: &str) -> ::Public { TPublic::Pair::from_string(&format!("//{}", seed), None) diff --git a/node/service/src/chain_spec/pangolin.rs b/node/service/src/chain_spec/pangolin.rs index e66bd3141f..a48b9eecfc 100644 --- a/node/service/src/chain_spec/pangolin.rs +++ b/node/service/src/chain_spec/pangolin.rs @@ -22,7 +22,6 @@ use std::{collections::BTreeMap, marker::PhantomData, str::FromStr}; use rand::{seq::SliceRandom, Rng}; // --- paritytech --- use pallet_im_online::sr25519::AuthorityId as ImOnlineId; -use sc_service::{ChainType, GenericChainSpec, Properties}; use sc_telemetry::TelemetryEndpoints; use sp_authority_discovery::AuthorityId as AuthorityDiscoveryId; use sp_consensus_babe::AuthorityId as BabeId; @@ -37,6 +36,8 @@ use darwinia_evm::GenesisAccount; use drml_common_primitives::*; use pangolin_runtime::*; +// TODO: next version +// pub type ChainSpec = GenericChainSpec; pub type ChainSpec = GenericChainSpec; const PANGOLIN_TELEMETRY_URL: &str = "wss://telemetry.polkadot.io/submit/"; @@ -384,7 +385,7 @@ pub fn genesis_config() -> ChainSpec { ), Some(DEFAULT_PROTOCOL_ID), Some(properties()), - None, + Default::default(), ) } @@ -588,7 +589,7 @@ pub fn development_config() -> ChainSpec { None, Some(DEFAULT_PROTOCOL_ID), Some(properties()), - None, + Default::default(), ) } @@ -826,6 +827,6 @@ pub fn local_testnet_config() -> ChainSpec { None, Some(DEFAULT_PROTOCOL_ID), Some(properties()), - None, + Default::default(), ) } diff --git a/node/service/src/chain_spec/pangoro.rs b/node/service/src/chain_spec/pangoro.rs index a7c43865da..6f6a618232 100644 --- a/node/service/src/chain_spec/pangoro.rs +++ b/node/service/src/chain_spec/pangoro.rs @@ -22,7 +22,6 @@ use std::str::FromStr; use rand::{seq::SliceRandom, Rng}; // --- paritytech --- use pallet_im_online::sr25519::AuthorityId as ImOnlineId; -use sc_service::{ChainType, Properties}; use sc_telemetry::TelemetryEndpoints; use sp_authority_discovery::AuthorityId as AuthorityDiscoveryId; use sp_consensus_babe::AuthorityId as BabeId; @@ -35,7 +34,9 @@ use darwinia_staking::StakerStatus; use drml_common_primitives::*; use pangoro_runtime::*; -pub type ChainSpec = sc_service::GenericChainSpec; +// TODO: next version +// pub type ChainSpec = GenericChainSpec; +pub type ChainSpec = GenericChainSpec; const PANGORO_TELEMETRY_URL: &str = "wss://telemetry.polkadot.io/submit/"; @@ -259,7 +260,7 @@ pub fn genesis_config() -> ChainSpec { ), Some(DEFAULT_PROTOCOL_ID), Some(properties()), - None, + Default::default(), ) } @@ -347,6 +348,6 @@ pub fn development_config() -> ChainSpec { None, Some(DEFAULT_PROTOCOL_ID), Some(properties()), - None, + Default::default(), ) } diff --git a/node/service/src/service/mod.rs b/node/service/src/service/mod.rs index b154367bbd..59b92df013 100644 --- a/node/service/src/service/mod.rs +++ b/node/service/src/service/mod.rs @@ -65,6 +65,7 @@ use sp_runtime::traits::BlakeTwo256; use substrate_prometheus_endpoint::Registry; // --- darwinia-network --- use drml_common_primitives::OpaqueBlock as Block; +use drml_rpc::RpcExtension; type FullBackend = TFullBackend; type FullSelectChain = LongestChain; @@ -75,6 +76,8 @@ type LightBackend = TLightBackendWithHash; type LightClient = TLightClientWithBackend; +type RpcResult = Result; + pub trait RuntimeExtrinsic: 'static + Send + Sync + Codec {} impl RuntimeExtrinsic for E where E: 'static + Send + Sync + Codec {} diff --git a/node/service/src/service/pangolin.rs b/node/service/src/service/pangolin.rs index a843095e72..e3ce1b3de1 100644 --- a/node/service/src/service/pangolin.rs +++ b/node/service/src/service/pangolin.rs @@ -31,7 +31,7 @@ use futures::StreamExt; use sc_authority_discovery::WorkerConfig; use sc_basic_authorship::ProposerFactory; use sc_client_api::{BlockchainEvents, ExecutorProvider, RemoteBackend, StateBackendFor}; -use sc_consensus::LongestChain; +use sc_consensus::{BasicQueue, DefaultImportQueue, LongestChain}; use sc_consensus_babe::{ BabeBlockImport, BabeLink, BabeParams, Config as BabeConfig, SlotProportion, }; @@ -49,9 +49,7 @@ use sc_service::{ use sc_telemetry::{Telemetry, TelemetryWorker}; use sc_transaction_pool::{BasicPool, FullPool}; use sp_api::ConstructRuntimeApi; -use sp_consensus::{ - import_queue::BasicQueue, CanAuthorWithNativeVersion, DefaultImportQueue, NeverCanAuthor, -}; +use sp_consensus::{CanAuthorWithNativeVersion, NeverCanAuthor}; use sp_runtime::traits::{BlakeTwo256, Block as BlockT}; use sp_trie::PrefixedMemoryDB; // --- darwinia-network --- @@ -59,7 +57,7 @@ use crate::{ client::PangolinClient, service::{ self, FullBackend, FullClient, FullGrandpaBlockImport, FullSelectChain, LightBackend, - LightClient, + LightClient, RpcResult, }, }; use dc_db::{Backend, DatabaseSettings, DatabaseSettingsSrc}; @@ -69,7 +67,7 @@ use dp_rpc::{FilterPool, PendingTransactions}; use drml_common_primitives::{AccountId, Balance, Hash, Nonce, OpaqueBlock as Block, Power}; use drml_rpc::{ pangolin::{FullDeps, LightDeps}, - BabeDeps, DenyUnsafe, GrandpaDeps, RpcExtension, SubscriptionTaskExecutor, + BabeDeps, DenyUnsafe, GrandpaDeps, SubscriptionTaskExecutor, }; use pangolin_runtime::RuntimeApi; @@ -127,7 +125,7 @@ fn new_partial( bool, Arc>, SubscriptionTaskExecutor, - ) -> RpcExtension, + ) -> RpcResult, ( BabeBlockImport< Block, @@ -253,7 +251,7 @@ where let dvm_backend = dvm_backend.clone(); let filter_pool = filter_pool.clone(); - move |deny_unsafe, is_authority, network, subscription_executor| -> RpcExtension { + move |deny_unsafe, is_authority, network, subscription_executor| -> RpcResult { let deps = FullDeps { client: client.clone(), pool: transaction_pool.clone(), @@ -281,6 +279,7 @@ where }; drml_rpc::pangolin::create_full(deps, subscription_task_executor.clone()) + .map_err(Into::into) } }; @@ -372,15 +371,11 @@ where .network .extra_sets .push(sc_finality_grandpa::grandpa_peers_set_config()); - config.network.request_response_protocols.push( - sc_finality_grandpa_warp_sync::request_response_config_for_chain( - &config, - task_manager.spawn_handle(), - backend.clone(), - import_setup.1.shared_authority_set().clone(), - ), - ); + let warp_sync = Arc::new(sc_finality_grandpa::warp_proof::NetworkProvider::new( + backend.clone(), + import_setup.1.shared_authority_set().clone(), + )); let (network, system_rpc_tx, network_starter) = sc_service::build_network(BuildNetworkParams { config: &config, @@ -390,6 +385,7 @@ where import_queue, on_demand: None, block_announce_validator_builder: None, + warp_sync: Some(warp_sync), })?; if config.offchain_worker.enabled { @@ -411,7 +407,7 @@ where let wrap_rpc_extensions_builder = { let network = network.clone(); - move |deny_unsafe, subscription_executor| -> RpcExtension { + move |deny_unsafe, subscription_executor| -> RpcResult { rpc_extensions_builder( deny_unsafe, is_authority, @@ -686,6 +682,10 @@ where NeverCanAuthor, 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(BuildNetworkParams { config: &config, @@ -695,6 +695,7 @@ where import_queue, on_demand: Some(on_demand.clone()), block_announce_validator_builder: None, + warp_sync: Some(warp_sync), })?; let enable_grandpa = !config.disable_grandpa; diff --git a/node/service/src/service/pangoro.rs b/node/service/src/service/pangoro.rs index 594052f341..aa22ff0a99 100644 --- a/node/service/src/service/pangoro.rs +++ b/node/service/src/service/pangoro.rs @@ -26,7 +26,7 @@ use futures::stream::StreamExt; use sc_authority_discovery::WorkerConfig; use sc_basic_authorship::ProposerFactory; use sc_client_api::{ExecutorProvider, RemoteBackend, StateBackendFor}; -use sc_consensus::LongestChain; +use sc_consensus::{BasicQueue, DefaultImportQueue, LongestChain}; use sc_consensus_babe::{ BabeBlockImport, BabeLink, BabeParams, Config as BabeConfig, SlotProportion, }; @@ -44,9 +44,7 @@ use sc_service::{ use sc_telemetry::{Telemetry, TelemetryWorker}; use sc_transaction_pool::{BasicPool, FullPool}; use sp_api::ConstructRuntimeApi; -use sp_consensus::{ - import_queue::BasicQueue, CanAuthorWithNativeVersion, DefaultImportQueue, NeverCanAuthor, -}; +use sp_consensus::{CanAuthorWithNativeVersion, NeverCanAuthor}; use sp_runtime::traits::{BlakeTwo256, Block as BlockT}; use sp_trie::PrefixedMemoryDB; // --- darwinia-network --- @@ -54,13 +52,13 @@ use crate::{ client::PangoroClient, service::{ self, FullBackend, FullClient, FullGrandpaBlockImport, FullSelectChain, LightBackend, - LightClient, + LightClient, RpcResult, }, }; use drml_common_primitives::{AccountId, Balance, Nonce, OpaqueBlock as Block}; use drml_rpc::{ pangoro::{FullDeps, LightDeps}, - BabeDeps, DenyUnsafe, GrandpaDeps, RpcExtension, SubscriptionTaskExecutor, + BabeDeps, DenyUnsafe, GrandpaDeps, SubscriptionTaskExecutor, }; use pangoro_runtime::RuntimeApi; @@ -87,7 +85,7 @@ fn new_partial( DefaultImportQueue>, FullPool>, ( - impl Fn(DenyUnsafe, SubscriptionTaskExecutor) -> RpcExtension, + impl Fn(DenyUnsafe, SubscriptionTaskExecutor) -> RpcResult, ( BabeBlockImport< Block, @@ -203,7 +201,7 @@ where let select_chain = select_chain.clone(); let chain_spec = config.chain_spec.cloned_box(); - move |deny_unsafe, subscription_executor| -> RpcExtension { + move |deny_unsafe, subscription_executor| -> RpcResult { let deps = FullDeps { client: client.clone(), pool: transaction_pool.clone(), @@ -224,7 +222,7 @@ where }, }; - drml_rpc::pangoro::create_full(deps) + drml_rpc::pangoro::create_full(deps).map_err(Into::into) } }; @@ -297,15 +295,11 @@ where .network .extra_sets .push(sc_finality_grandpa::grandpa_peers_set_config()); - config.network.request_response_protocols.push( - sc_finality_grandpa_warp_sync::request_response_config_for_chain( - &config, - task_manager.spawn_handle(), - backend.clone(), - import_setup.1.shared_authority_set().clone(), - ), - ); + let warp_sync = Arc::new(sc_finality_grandpa::warp_proof::NetworkProvider::new( + backend.clone(), + import_setup.1.shared_authority_set().clone(), + )); let (network, system_rpc_tx, network_starter) = sc_service::build_network(BuildNetworkParams { config: &config, @@ -315,6 +309,7 @@ where import_queue, on_demand: None, block_announce_validator_builder: None, + warp_sync: Some(warp_sync), })?; if config.offchain_worker.enabled { @@ -337,7 +332,6 @@ where task_manager: &mut task_manager, on_demand: None, remote_blockchain: None, - system_rpc_tx, telemetry: telemetry.as_mut(), })?; @@ -556,6 +550,10 @@ where NeverCanAuthor, 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(BuildNetworkParams { config: &config, @@ -565,6 +563,7 @@ where import_queue, on_demand: Some(on_demand.clone()), block_announce_validator_builder: None, + warp_sync: Some(warp_sync), })?; let enable_grandpa = !config.disable_grandpa; diff --git a/node/service/src/service/template.rs b/node/service/src/service/template.rs index 9ad8c6ceaa..d153c72f03 100644 --- a/node/service/src/service/template.rs +++ b/node/service/src/service/template.rs @@ -113,7 +113,7 @@ pub fn new_partial( FullClient, FullBackend, FullSelectChain, - sp_consensus::DefaultImportQueue>, + sc_consensus::DefaultImportQueue>, sc_transaction_pool::FullPool>, ( ConsensusResult, @@ -233,7 +233,7 @@ pub fn new_full( import_queue, on_demand: None, block_announce_validator_builder: None, - // warp_sync, + warp_sync: None, })?; // Channel for the rpc handler to communicate with the authorship task. @@ -276,7 +276,10 @@ pub fn new_full( command_sink: Some(command_sink.clone()), }; - drml_rpc::template::create_full(deps, subscription_task_executor.clone()) + Ok(drml_rpc::template::create_full( + deps, + subscription_task_executor.clone(), + )) }) }; @@ -353,12 +356,13 @@ pub fn new_full( block_import, env, client, - pool: transaction_pool.pool().clone(), + pool: transaction_pool.clone(), commands_stream, select_chain, consensus_data_provider: None, create_inherent_data_providers: move |_, ()| async move { let mock_timestamp = MockTimestampInherentDataProvider; + Ok(mock_timestamp) }, }); @@ -371,7 +375,7 @@ pub fn new_full( block_import, env, client: client.clone(), - pool: transaction_pool.pool().clone(), + pool: transaction_pool.clone(), select_chain, consensus_data_provider: None, create_inherent_data_providers: move |_, ()| async move { diff --git a/primitives/asset/Cargo.toml b/primitives/asset/Cargo.toml index da9a96acb6..69553a00bb 100644 --- a/primitives/asset/Cargo.toml +++ b/primitives/asset/Cargo.toml @@ -11,11 +11,11 @@ version = "2.7.0" [dependencies] # crates.io -codec = { package = "parity-scale-codec", version = "2.1.1", default-features = false, features = ["derive"] } -ethereum-types = { version = "0.11.0", default-features = false } -sha3 = { version = "0.9.1", default-features = false } +codec = { package = "parity-scale-codec", version = "2.1", default-features = false, features = ["derive"] } +ethereum-types = { version = "0.12", default-features = false } +sha3 = { version = "0.9", default-features = false } # paritytech -sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } +sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } [features] default = ["std"] diff --git a/primitives/bsc/Cargo.toml b/primitives/bsc/Cargo.toml index decde37e32..22faa0186c 100644 --- a/primitives/bsc/Cargo.toml +++ b/primitives/bsc/Cargo.toml @@ -16,14 +16,14 @@ codec = { package = "parity-scale-codec", version = "2.1", default-fea ethbloom = { version = "0.11", default-features = false, features = ["codec", "rlp"] } hash-db = { version = "0.15", default-features = false } plain_hasher = { version = "0.2", default-features = false } -primitive-types = { version = "0.9", default-features = false, features = ["codec", "rlp"] } +primitive-types = { version = "0.10", default-features = false, features = ["codec", "rlp"] } rlp = { version = "0.5", default-features = false } serde = { version = "1.0", optional = true } triehash = { version = "0.8", default-features = false } # paritytech -sp-io = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-runtime = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } +sp-io = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-runtime = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } [dev-dependencies] # crates.io diff --git a/primitives/consensus/Cargo.toml b/primitives/consensus/Cargo.toml index fd58f19ffc..8602ba713a 100644 --- a/primitives/consensus/Cargo.toml +++ b/primitives/consensus/Cargo.toml @@ -12,13 +12,13 @@ version = "2.7.0" [dependencies] # crates.io codec = { package = "parity-scale-codec", version = "2.1", default-features = false, features = ["derive"] } -ethereum = { version = "0.7", default-features = false, features = ["with-codec"] } +ethereum = { version = "0.9", default-features = false, features = ["with-codec"] } rlp = { version = "0.5", default-features = false } sha3 = { version = "0.9", default-features = false } # paritytech -sp-core = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-runtime = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } +sp-core = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-runtime = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } [features] default = ["std"] diff --git a/primitives/consensus/src/lib.rs b/primitives/consensus/src/lib.rs index cafc29b53d..e49b729d5f 100644 --- a/primitives/consensus/src/lib.rs +++ b/primitives/consensus/src/lib.rs @@ -47,7 +47,7 @@ impl Log { #[derive(Decode, Encode, Clone, PartialEq, Eq)] pub enum PreLog { #[codec(index = 3)] - Block(ethereum::Block), + Block(ethereum::BlockV0), } #[derive(Decode, Encode, Clone, PartialEq, Eq)] @@ -55,7 +55,7 @@ pub enum PostLog { #[codec(index = 1)] Hashes(Hashes), #[codec(index = 2)] - Block(ethereum::Block), + Block(ethereum::BlockV0), } #[derive(Decode, Encode, Clone, PartialEq, Eq)] @@ -67,7 +67,7 @@ pub struct Hashes { } impl Hashes { - pub fn from_block(block: ethereum::Block) -> Self { + pub fn from_block(block: ethereum::BlockV0) -> Self { let mut transaction_hashes = Vec::new(); for t in &block.transactions { diff --git a/primitives/contract/Cargo.toml b/primitives/contract/Cargo.toml index b752434fbc..8c37576d3b 100644 --- a/primitives/contract/Cargo.toml +++ b/primitives/contract/Cargo.toml @@ -11,14 +11,14 @@ version = "2.7.0" [dependencies] # crates.io -ethereum-types = { default-features = false, version = "0.11.0" } +ethereum-types = { default-features = false, version = "0.12" } # darwinia-network dp-asset = { default-features = false, path = "../asset" } -ethabi = { default-features = false, git = "https://github.com/darwinia-network/ethabi.git", tag = "v13.0.0-no-std" } +ethabi = { version = "15.0", default-features = false } ethereum-primitives = { default-features = false, path = "../ethereum" } # paritytech -bp-messages = { default-features = false, git = "https://github.com/darwinia-network/parity-bridges-common", tag = "darwinia-v0.11.6-4" } -sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } +bp-messages = { default-features = false, git = "https://github.com/darwinia-network/parity-bridges-common", branch = "darwinia-v0.11.7" } +sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } [dev-dependencies] array-bytes = { version = "1.4" } diff --git a/primitives/contract/src/ethereum_backing.rs b/primitives/contract/src/ethereum_backing.rs index fa6a3b07e4..e33c3edd9b 100644 --- a/primitives/contract/src/ethereum_backing.rs +++ b/primitives/contract/src/ethereum_backing.rs @@ -21,9 +21,9 @@ pub use ethabi::{Event, Log}; // --- crates.io --- +use ethabi::{param_type::ParamType, Error, EventParam, RawLog, Result as AbiResult}; use ethereum_types::{Address as EthereumAddress, U256}; // --- darwinia-network --- -use ethabi::{param_type::ParamType, Error, EventParam, RawLog, Result as AbiResult}; use ethereum_primitives::receipt::EthereumReceipt; // --- paritytech --- use sp_std::prelude::*; diff --git a/primitives/contract/src/mapping_token_factory/basic.rs b/primitives/contract/src/mapping_token_factory/basic.rs index 37f58d1b65..8723417162 100644 --- a/primitives/contract/src/mapping_token_factory/basic.rs +++ b/primitives/contract/src/mapping_token_factory/basic.rs @@ -21,9 +21,12 @@ pub use ethabi::{Event, Log}; // --- crates.io --- +use ethabi::{ + param_type::ParamType, token::Token, Bytes, Function, Param, Result as AbiResult, + StateMutability, +}; use ethereum_types::{Address as EthereumAddress, U256}; -// --- darwinia-network --- -use ethabi::{param_type::ParamType, token::Token, Bytes, Function, Param, Result as AbiResult}; +// --- paritytech --- use sp_std::vec; pub struct BasicMappingTokenFactory; @@ -38,23 +41,28 @@ impl BasicMappingTokenFactory { Param { name: "backing_address".into(), kind: ParamType::Address, + internal_type: Some("address".into()), }, Param { name: "original_token".into(), kind: ParamType::Address, + internal_type: Some("address".into()), }, ]; let outputs = vec![Param { name: "mapping_token".into(), kind: ParamType::Address, + internal_type: Some("address".into()), }]; + #[allow(deprecated)] Function { name: "mappingToken".into(), inputs, outputs, constant: true, + state_mutability: StateMutability::View, } .encode_input( vec![ @@ -78,39 +86,48 @@ impl BasicMappingTokenFactory { Param { name: "tokenType".into(), kind: ParamType::Uint(32), + internal_type: Some("uint32".into()), }, Param { name: "name".into(), kind: ParamType::String, + internal_type: Some("string".into()), }, Param { name: "symbol".into(), kind: ParamType::String, + internal_type: Some("string".into()), }, Param { name: "decimals".into(), kind: ParamType::Uint(8), + internal_type: Some("uint8".into()), }, Param { name: "backing_address".into(), kind: ParamType::Address, + internal_type: Some("address".into()), }, Param { name: "original_token".into(), kind: ParamType::Address, + internal_type: Some("address".into()), }, ]; let outputs = vec![Param { name: "token".into(), kind: ParamType::Address, + internal_type: Some("address".into()), }]; + #[allow(deprecated)] Function { name: "newErc20Contract".into(), inputs, outputs, constant: false, + state_mutability: StateMutability::NonPayable, } .encode_input( vec![ @@ -135,22 +152,27 @@ impl BasicMappingTokenFactory { Param { name: "mapping_token".into(), kind: ParamType::Address, + internal_type: Some("address".into()), }, Param { name: "recipient".into(), kind: ParamType::Address, + internal_type: Some("address".into()), }, Param { name: "amount".into(), kind: ParamType::Uint(256), + internal_type: Some("uint256".into()), }, ]; + #[allow(deprecated)] Function { name: "issueMappingToken".into(), inputs, outputs: vec![], constant: false, + state_mutability: StateMutability::NonPayable, } .encode_input( vec![ diff --git a/primitives/contract/src/mapping_token_factory/s2s.rs b/primitives/contract/src/mapping_token_factory/s2s.rs index b1e1306a83..8d551d06ff 100644 --- a/primitives/contract/src/mapping_token_factory/s2s.rs +++ b/primitives/contract/src/mapping_token_factory/s2s.rs @@ -25,6 +25,7 @@ use ethereum_types::{H160, U256}; // --- darwinia-network --- use ethabi::{ param_type::ParamType, token::Token, Bytes, Error, Function, Param, Result as AbiResult, + StateMutability, }; // --- paritytech --- use bp_messages::{LaneId, MessageNonce}; @@ -43,22 +44,27 @@ impl Sub2SubMappingTokenFactory { Param { name: "lane_id".into(), kind: ParamType::FixedBytes(4), + internal_type: Some("bytes4".into()), }, Param { name: "nonce".into(), kind: ParamType::Uint(64), + internal_type: Some("uint64".into()), }, Param { name: "result".into(), kind: ParamType::Bool, + internal_type: Some("bool".into()), }, ]; + #[allow(deprecated)] Function { name: "confirmBurnAndRemoteUnlock".into(), inputs, outputs: vec![], constant: false, + state_mutability: StateMutability::NonPayable, } .encode_input( vec![ diff --git a/primitives/contract/src/tests.rs b/primitives/contract/src/tests.rs index a4136ec999..cbc7739f95 100644 --- a/primitives/contract/src/tests.rs +++ b/primitives/contract/src/tests.rs @@ -20,7 +20,9 @@ mod abi_tests { use crate::abi_util::{abi_encode_bytes4, abi_encode_u64}; use array_bytes::hex2bytes_unchecked; - use ethabi::{param_type::ParamType, token::Token, Bytes, Function, Param, Result}; + use ethabi::{ + param_type::ParamType, token::Token, Bytes, Function, Param, Result, StateMutability, + }; #[test] fn test_abi_encode_bytes4() { @@ -45,13 +47,16 @@ mod abi_tests { let inputs = vec![Param { name: "param".into(), kind: ParamType::FixedBytes(4), + internal_type: Some("bytes4".into()), }]; + #[allow(deprecated)] Function { name: "test_input_error".into(), inputs, outputs: vec![], constant: false, + state_mutability: StateMutability::NonPayable, } .encode_input(vec![Token::FixedBytes(param.to_vec())].as_slice()) } diff --git a/primitives/ethereum/Cargo.toml b/primitives/ethereum/Cargo.toml index 005bae2f0c..500b7c652c 100644 --- a/primitives/ethereum/Cargo.toml +++ b/primitives/ethereum/Cargo.toml @@ -14,23 +14,23 @@ version = "2.7.0" array-bytes = { version = "1.4" } codec = { package = "parity-scale-codec", version = "2.1", optional = true, default-features = false, features = ["derive"] } ethbloom = { version = "0.11", default-features = false } -ethereum-types = { version = "0.11", default-features = false } -keccak-hash = { version = "0.7", default-features = false } +ethereum-types = { version = "0.12", default-features = false } +keccak-hash = { version = "0.8", default-features = false } rlp = { version = "0.5", optional = true, default-features = false } rlp-derive = { version = "0.1", optional = true } serde = { version = "1.0", optional = true, features = ["derive"] } sp-debug-derive = { version = "3.0" } subhasher = { version = "0.1", default-features = false } # darwinia-network -ethash = { default-features = false, git = "https://github.com/darwinia-network/rust-ethash", tag = "v0.4.0" } +ethash = { default-features = false, git = "https://github.com/darwinia-network/rust-ethash", tag = "v0.4.2" } merkle-patricia-trie = { default-features = false, path = "../merkle-patricia-trie" } [dev-dependencies] # crates.io array-bytes = { version = "1.4", features = ["serde"] } -codec = { package = "parity-scale-codec", version = "2.1.1", features = ["derive"] } +codec = { package = "parity-scale-codec", version = "2.1", features = ["derive"] } ethbloom = { version = "0.11", features = ["codec"] } -ethereum-types = { version = "0.11", features = ["codec"] } +ethereum-types = { version = "0.12", features = ["codec"] } keccak-hasher = { version = "0.15" } rlp = { version = "0.5" } rlp-derive = { version = "0.1" } diff --git a/primitives/evm/Cargo.toml b/primitives/evm/Cargo.toml index c5d7e958c4..d87b00efad 100644 --- a/primitives/evm/Cargo.toml +++ b/primitives/evm/Cargo.toml @@ -12,12 +12,12 @@ version = "2.7.0" [dependencies] # crates.io codec = { package = "parity-scale-codec", version = "2.1", default-features = false } -evm = { version = "0.27", default-features = false, features = ["with-codec"] } +evm = { version = "0.30", default-features = false, features = ["with-codec"] } impl-trait-for-tuples = { version = "0.2" } serde = { version = "1.0", optional = true, features = ["derive"] } # paritytech -sp-core = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } +sp-core = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } [features] default = ["std"] diff --git a/primitives/fee-market/Cargo.toml b/primitives/fee-market/Cargo.toml index ae8feb1323..c034413500 100644 --- a/primitives/fee-market/Cargo.toml +++ b/primitives/fee-market/Cargo.toml @@ -10,22 +10,22 @@ repository = "https://github.com/darwinia-network/darwinia-common/" version = "2.7.0" [dependencies] -# parity-bridges-common -bp-messages = { default-features = false, git = "https://github.com/darwinia-network/parity-bridges-common", tag = "darwinia-v0.11.6-4" } +# crates.io +codec = { package = "parity-scale-codec", version = "2.1", default-features = false, features = ["derive"] } # paritytech -codec = { package = "parity-scale-codec", version = "2.1.1", default-features = false, features = ["derive"] } -frame-support = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-runtime = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } +bp-messages = { default-features = false, git = "https://github.com/darwinia-network/parity-bridges-common", branch = "darwinia-v0.11.7" } +frame-support = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-runtime = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } [features] default = ["std"] std = [ - # parity-bridges-common - "bp-messages/std", - # paritytech + # crates.io "codec/std", + # paritytech + "bp-messages/std", "frame-support/std", "sp-runtime/std", "sp-std/std", diff --git a/primitives/fee-market/src/lib.rs b/primitives/fee-market/src/lib.rs index 8feb3fea1f..a724123dae 100644 --- a/primitives/fee-market/src/lib.rs +++ b/primitives/fee-market/src/lib.rs @@ -136,7 +136,11 @@ where } pub fn fee(&self) -> Balance { - self.relayers.iter().last().map(|r| r.fee).unwrap_or_default() + self.relayers + .iter() + .last() + .map(|r| r.fee) + .unwrap_or_default() } pub fn is_confirmed(&self) -> bool { diff --git a/primitives/merkle-patricia-trie/Cargo.toml b/primitives/merkle-patricia-trie/Cargo.toml index 625f607600..7c45f2e0cb 100644 --- a/primitives/merkle-patricia-trie/Cargo.toml +++ b/primitives/merkle-patricia-trie/Cargo.toml @@ -15,17 +15,17 @@ name = "trie" [dependencies] # crates.io -hash = { package = "keccak-hash", version = "0.7", default-features = false } -hashbrown = { version = "0.9" } +hash = { package = "keccak-hash", version = "0.8", default-features = false } +hashbrown = { version = "0.11" } rlp = { version = "0.5", default-features = false } # paritytech -sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } +sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } [dev-dependencies] # crates.io array-bytes = { version = "1.4" } criterion = { version = "0.3" } -ethereum-types = { version = "0.11" } +ethereum-types = { version = "0.12" } hex = { version = "0.4" } rand = { version = "0.8" } uuid = { version = "0.8", features = ["serde", "v4"] } diff --git a/primitives/relay/Cargo.toml b/primitives/relay/Cargo.toml index c41a55b984..505d3c675b 100644 --- a/primitives/relay/Cargo.toml +++ b/primitives/relay/Cargo.toml @@ -13,9 +13,9 @@ version = "2.7.0" # crates.io codec = { package = "parity-scale-codec", version = "2.1.1", default-features = false } # paritytech -frame-support = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-runtime = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } +frame-support = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-runtime = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } [features] default = ["std"] diff --git a/primitives/rpc/Cargo.toml b/primitives/rpc/Cargo.toml index 03b369961f..fd19f5bffa 100644 --- a/primitives/rpc/Cargo.toml +++ b/primitives/rpc/Cargo.toml @@ -11,11 +11,11 @@ version = "2.7.0" [dependencies] # crates.io -ethereum-types = { version = "0.11.0" } -jsonrpc-core = { version = "15.1.0" } -jsonrpc-core-client = { version = "15.1.0" } -jsonrpc-derive = { version = "15.1.0" } -jsonrpc-pubsub = { version = "15.1.0" } -rustc-hex = { version = "2.1.0" } +ethereum-types = { version = "0.12" } +jsonrpc-core = { version = "15.1" } +jsonrpc-core-client = { version = "15.1" } +jsonrpc-derive = { version = "15.1" } +jsonrpc-pubsub = { version = "15.1" } +rustc-hex = { version = "2.1" } serde = { version = "1.0", features = ["derive"] } serde_json = { version = "1.0" } diff --git a/primitives/s2s/Cargo.toml b/primitives/s2s/Cargo.toml index 3d5c3a1190..eb84a503f8 100644 --- a/primitives/s2s/Cargo.toml +++ b/primitives/s2s/Cargo.toml @@ -12,16 +12,16 @@ version = "2.7.0" [dependencies] # crates.io array-bytes = { version = "1.4" } +codec = { package = "parity-scale-codec", version = "2.1", default-features = false, features = ["derive"] } # darwinia-network dp-asset = { default-features = false, path = "../asset" } dp-contract = { default-features = false, path = "../contract" } # paritytech -bp-message-dispatch = { default-features = false, git = "https://github.com/darwinia-network/parity-bridges-common", tag = "darwinia-v0.11.6-4" } -bp-runtime = { default-features = false, git = "https://github.com/darwinia-network/parity-bridges-common", tag = "darwinia-v0.11.6-4" } -codec = { package = "parity-scale-codec", version = "2.1", default-features = false, features = ["derive"] } -sp-core = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-runtime = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } -sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate", tag = "darwinia-v0.11.6-1" } +bp-message-dispatch = { default-features = false, git = "https://github.com/darwinia-network/parity-bridges-common", branch = "darwinia-v0.11.7" } +bp-runtime = { default-features = false, git = "https://github.com/darwinia-network/parity-bridges-common", branch = "darwinia-v0.11.7" } +sp-core = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-runtime = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } +sp-std = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.11.7" } [dev-dependencies] dp-contract = { default-features = false, path = "../contract" } @@ -30,14 +30,14 @@ dp-contract = { default-features = false, path = "../contract" } default = ["std"] std = [ + # crates.io + "codec/std", # darwinia-network "dp-contract/std", "dp-asset/std", - "dp-contract/std", # paritytech "bp-message-dispatch/std", "bp-runtime/std", - "codec/std", "sp-core/std", "sp-runtime/std", "sp-std/std", diff --git a/tests/dvm/frontier/tests/util.ts b/tests/dvm/frontier/tests/util.ts index cae86e4150..f4ec187f8d 100644 --- a/tests/dvm/frontier/tests/util.ts +++ b/tests/dvm/frontier/tests/util.ts @@ -38,7 +38,7 @@ export async function customRequest(web3: Web3, method: string, params: any[]) { // Create a block and finalize it. // It will include all previously executed transactions since the last finalized block. export async function createAndFinalizeBlock(web3: Web3) { - const response = await customRequest(web3, "engine_createBlock", [true, true, null]); + const response = await customRequest(web3, "engine_createBlock", [false, true, null]); if (!response.result) { throw new Error(`Unexpected result: ${JSON.stringify(response)}`); }