From 378d8fd5a22bc4fab7729274e00a745a055c1cfd Mon Sep 17 00:00:00 2001 From: dmitrylavrenov Date: Mon, 6 Dec 2021 13:15:14 +0300 Subject: [PATCH 01/42] Changes based on substrate commits till the current master --- crates/pallet-bioauth/src/lib.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/crates/pallet-bioauth/src/lib.rs b/crates/pallet-bioauth/src/lib.rs index 9631ce848..2990d4482 100644 --- a/crates/pallet-bioauth/src/lib.rs +++ b/crates/pallet-bioauth/src/lib.rs @@ -133,11 +133,15 @@ pub mod pallet { use crate::weights::WeightInfo; +<<<<<<< HEAD use codec::MaxEncodedLen; use frame_support::{ dispatch::DispatchResult, pallet_prelude::*, sp_tracing::error, storage::types::ValueQuery, WeakBoundedVec, }; +======= + use frame_support::{pallet_prelude::*, sp_tracing::error, storage::types::ValueQuery}; +>>>>>>> Changes based on substrate commits till the current master use frame_system::pallet_prelude::*; use sp_runtime::{app_crypto::MaybeHash, traits::AtLeast32Bit}; From 96b6fdee7a540468f094917fba7b9c416c8270af Mon Sep 17 00:00:00 2001 From: dmitrylavrenov Date: Fri, 3 Dec 2021 14:14:00 +0300 Subject: [PATCH 02/42] Add pallet-evm and pallet-ethereum from humanode fork --- Cargo.lock | 1604 +++++++++++++++++++++------- crates/humanode-runtime/Cargo.toml | 4 + 2 files changed, 1215 insertions(+), 393 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 961696d76..8534cd69b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -437,14 +437,14 @@ dependencies = [ "sc-client-api", "sc-consensus", "sc-service", - "sp-api", - "sp-application-crypto", + "sp-api 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-application-crypto 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "sp-blockchain", "sp-consensus", "sp-consensus-aura", - "sp-inherents", - "sp-keystore", - "sp-runtime", + "sp-inherents 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-keystore 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "thiserror", "tokio", ] @@ -454,8 +454,8 @@ name = "bioauth-consensus-api" version = "0.1.0" dependencies = [ "parity-scale-codec", - "sp-api", - "sp-std", + "sp-api 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-std 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", ] [[package]] @@ -1289,12 +1289,119 @@ version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "68b91989ae21441195d7d9b9993a2f9295c7e1a8c96255d8b729accddc124797" +[[package]] +name = "ethbloom" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfb684ac8fa8f6c5759f788862bb22ec6fe3cb392f6bfd08e3c64b603661e3f8" +dependencies = [ + "crunchy", + "fixed-hash", + "impl-codec", + "impl-rlp", + "impl-serde", + "scale-info", + "tiny-keccak", +] + +[[package]] +name = "ethereum" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81fb916554a4dba293ea69c69ad5653e21d770a9d0c2496b5fa0a1f5a3946d87" +dependencies = [ + "bytes 1.1.0", + "ethereum-types", + "hash-db", + "hash256-std-hasher", + "parity-scale-codec", + "rlp", + "rlp-derive", + "scale-info", + "serde", + "sha3 0.9.1", + "triehash", +] + +[[package]] +name = "ethereum-types" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05136f7057fe789f06e6d41d07b34e6f70d8c86e5693b60f97aaa6553553bdaf" +dependencies = [ + "ethbloom", + "fixed-hash", + "impl-codec", + "impl-rlp", + "impl-serde", + "primitive-types", + "scale-info", + "uint", +] + [[package]] name = "event-listener" version = "2.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f7531096570974c3a9dcf9e4b8e1cede1ec26cf5046219fb3b9d897503b9be59" +[[package]] +name = "evm" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2068bbfe82315b76637b601c73810ec7e92d542bad02f0155182915e832c6357" +dependencies = [ + "environmental", + "ethereum", + "evm-core", + "evm-gasometer", + "evm-runtime", + "log", + "parity-scale-codec", + "primitive-types", + "rlp", + "scale-info", + "serde", + "sha3 0.8.2", +] + +[[package]] +name = "evm-core" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4dfe4f2a56c4c05a8107b8596380e2332fc2019ffcf56b8f2d01971393a30c4d" +dependencies = [ + "funty", + "parity-scale-codec", + "primitive-types", + "scale-info", + "serde", +] + +[[package]] +name = "evm-gasometer" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c446679607eacac4e8c8738e20c97ea9b3c86eddd8b43666744b05f416037bd9" +dependencies = [ + "environmental", + "evm-core", + "evm-runtime", + "primitive-types", +] + +[[package]] +name = "evm-runtime" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "419e8434ac6e850a8a4bc09a19406264582d1940913b2920be2af948f4ffc49b" +dependencies = [ + "environmental", + "evm-core", + "primitive-types", + "sha3 0.8.2", +] + [[package]] name = "exit-future" version = "0.2.0" @@ -1438,6 +1545,71 @@ dependencies = [ "percent-encoding 2.1.0", ] +[[package]] +name = "fp-consensus" +version = "2.0.0-dev" +source = "git+https://github.com/humanode-network/frontier?branch=substrate-1a30fa2#26bf32c18044785756eba89478c24b2bf730f719" +dependencies = [ + "ethereum", + "parity-scale-codec", + "rlp", + "sha3 0.8.2", + "sp-core 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-runtime 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-std 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", +] + +[[package]] +name = "fp-evm" +version = "3.0.0-dev" +source = "git+https://github.com/humanode-network/frontier?branch=substrate-1a30fa2#26bf32c18044785756eba89478c24b2bf730f719" +dependencies = [ + "evm", + "parity-scale-codec", + "serde", + "sp-core 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-std 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", +] + +[[package]] +name = "fp-rpc" +version = "3.0.0-dev" +source = "git+https://github.com/humanode-network/frontier?branch=substrate-1a30fa2#26bf32c18044785756eba89478c24b2bf730f719" +dependencies = [ + "ethereum", + "ethereum-types", + "fp-evm", + "parity-scale-codec", + "scale-info", + "sp-api 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-core 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-io 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-runtime 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-std 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", +] + +[[package]] +name = "fp-self-contained" +version = "1.0.0-dev" +source = "git+https://github.com/humanode-network/frontier?branch=substrate-1a30fa2#26bf32c18044785756eba89478c24b2bf730f719" +dependencies = [ + "ethereum", + "frame-support 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "parity-scale-codec", + "parity-util-mem", + "scale-info", + "serde", + "sha3 0.8.2", + "sp-core 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-io 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-runtime 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", +] + +[[package]] +name = "fp-storage" +version = "2.0.0" +source = "git+https://github.com/humanode-network/frontier?branch=substrate-1a30fa2#26bf32c18044785756eba89478c24b2bf730f719" + [[package]] name = "fragile" version = "1.0.0" @@ -1449,20 +1621,41 @@ name = "frame-benchmarking" version = "4.0.0-dev" source = "git+https://github.com/humanode-network/substrate?branch=master#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" dependencies = [ - "frame-support", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "frame-system 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "linregress", "log", "parity-scale-codec", "paste", "scale-info", - "sp-api", - "sp-application-crypto", - "sp-io", - "sp-runtime", - "sp-runtime-interface", - "sp-std", - "sp-storage", + "sp-api 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-application-crypto 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-io 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-runtime-interface 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-std 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-storage 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", +] + +[[package]] +name = "frame-benchmarking" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?rev=1a30fa2#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" +dependencies = [ + "frame-support 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "frame-system 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "linregress", + "log", + "parity-scale-codec", + "paste", + "scale-info", + "sp-api 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-application-crypto 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-io 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-runtime 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-runtime-interface 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-std 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-storage 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", ] [[package]] @@ -1472,8 +1665,8 @@ source = "git+https://github.com/humanode-network/substrate?branch=master#1a30fa dependencies = [ "Inflector", "chrono", - "frame-benchmarking", - "frame-support", + "frame-benchmarking 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "frame-support 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "handlebars", "linked-hash-map", "log", @@ -1483,11 +1676,11 @@ dependencies = [ "sc-executor", "sc-service", "serde", - "sp-core", - "sp-externalities", - "sp-keystore", - "sp-runtime", - "sp-state-machine", + "sp-core 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-externalities 0.10.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-keystore 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-state-machine 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "structopt", ] @@ -1496,15 +1689,15 @@ name = "frame-executive" version = "4.0.0-dev" source = "git+https://github.com/humanode-network/substrate?branch=master#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" dependencies = [ - "frame-support", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "frame-system 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "parity-scale-codec", "scale-info", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", - "sp-tracing", + "sp-core 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-io 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-std 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-tracing 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", ] [[package]] @@ -1526,7 +1719,7 @@ source = "git+https://github.com/humanode-network/substrate?branch=master#1a30fa dependencies = [ "bitflags", "frame-metadata", - "frame-support-procedural", + "frame-support-procedural 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "impl-trait-for-tuples", "log", "once_cell", @@ -1535,16 +1728,45 @@ dependencies = [ "scale-info", "serde", "smallvec", - "sp-arithmetic", - "sp-core", - "sp-core-hashing-proc-macro", - "sp-inherents", - "sp-io", - "sp-runtime", - "sp-staking", - "sp-state-machine", - "sp-std", - "sp-tracing", + "sp-arithmetic 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-core 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-core-hashing-proc-macro 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-inherents 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-io 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-staking 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-state-machine 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-std 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-tracing 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "tt-call", +] + +[[package]] +name = "frame-support" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?rev=1a30fa2#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" +dependencies = [ + "bitflags", + "frame-metadata", + "frame-support-procedural 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "impl-trait-for-tuples", + "log", + "once_cell", + "parity-scale-codec", + "paste", + "scale-info", + "serde", + "smallvec", + "sp-arithmetic 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-core 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-core-hashing-proc-macro 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-inherents 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-io 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-runtime 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-staking 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-state-machine 0.10.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-std 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-tracing 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", "tt-call", ] @@ -1554,7 +1776,19 @@ version = "4.0.0-dev" source = "git+https://github.com/humanode-network/substrate?branch=master#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" dependencies = [ "Inflector", - "frame-support-procedural-tools", + "frame-support-procedural-tools 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "frame-support-procedural" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?rev=1a30fa2#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" +dependencies = [ + "Inflector", + "frame-support-procedural-tools 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", "proc-macro2", "quote", "syn", @@ -1565,7 +1799,19 @@ name = "frame-support-procedural-tools" version = "4.0.0-dev" source = "git+https://github.com/humanode-network/substrate?branch=master#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" dependencies = [ - "frame-support-procedural-tools-derive", + "frame-support-procedural-tools-derive 3.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "proc-macro-crate 1.1.0", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "frame-support-procedural-tools" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?rev=1a30fa2#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" +dependencies = [ + "frame-support-procedural-tools-derive 3.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", "proc-macro-crate 1.1.0", "proc-macro2", "quote", @@ -1582,21 +1828,48 @@ dependencies = [ "syn", ] +[[package]] +name = "frame-support-procedural-tools-derive" +version = "3.0.0" +source = "git+https://github.com/paritytech/substrate?rev=1a30fa2#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "frame-system" version = "4.0.0-dev" source = "git+https://github.com/humanode-network/substrate?branch=master#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" dependencies = [ - "frame-support", + "frame-support 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "log", "parity-scale-codec", "scale-info", "serde", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", - "sp-version", + "sp-core 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-io 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-std 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-version 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", +] + +[[package]] +name = "frame-system" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?rev=1a30fa2#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" +dependencies = [ + "frame-support 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "log", + "parity-scale-codec", + "scale-info", + "serde", + "sp-core 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-io 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-runtime 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-std 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-version 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", ] [[package]] @@ -1604,14 +1877,14 @@ name = "frame-system-benchmarking" version = "4.0.0-dev" source = "git+https://github.com/humanode-network/substrate?branch=master#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "frame-support 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "frame-system 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "parity-scale-codec", "scale-info", - "sp-core", - "sp-runtime", - "sp-std", + "sp-core 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-std 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", ] [[package]] @@ -1620,7 +1893,7 @@ version = "4.0.0-dev" source = "git+https://github.com/humanode-network/substrate?branch=master#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" dependencies = [ "parity-scale-codec", - "sp-api", + "sp-api 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", ] [[package]] @@ -2151,13 +2424,13 @@ dependencies = [ "sc-utils", "serde", "serde_json", - "sp-application-crypto", + "sp-application-crypto 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "sp-consensus", "sp-consensus-aura", "sp-finality-grandpa", - "sp-keystore", - "sp-runtime", - "sp-timestamp", + "sp-keystore 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-timestamp 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "structopt", "thiserror", "tokio", @@ -2177,7 +2450,7 @@ dependencies = [ "robonode-client", "sc-rpc-api", "sc-transaction-pool-api", - "sp-api", + "sp-api 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "sp-block-builder", "sp-blockchain", "substrate-frame-rpc-system", @@ -2190,20 +2463,22 @@ dependencies = [ "bioauth-consensus-api", "bioauth-flow-api", "chrono", - "frame-benchmarking", + "frame-benchmarking 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "frame-executive", - "frame-support", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "frame-system 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "frame-system-benchmarking", "frame-system-rpc-runtime-api", "hex-literal", "pallet-aura", - "pallet-balances", + "pallet-balances 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "pallet-bioauth", + "pallet-ethereum", + "pallet-evm", "pallet-grandpa", "pallet-randomness-collective-flip", "pallet-sudo", - "pallet-timestamp", + "pallet-timestamp 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "pallet-transaction-payment", "pallet-transaction-payment-rpc-runtime-api", "parity-scale-codec", @@ -2211,17 +2486,17 @@ dependencies = [ "robonode-crypto", "scale-info", "serde", - "sp-api", + "sp-api 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "sp-block-builder", "sp-consensus-aura", - "sp-core", - "sp-inherents", + "sp-core 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-inherents 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "sp-offchain", - "sp-runtime", + "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "sp-session", - "sp-std", + "sp-std 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", "sp-transaction-pool", - "sp-version", + "sp-version 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "substrate-wasm-builder", ] @@ -2347,6 +2622,15 @@ dependencies = [ "parity-scale-codec", ] +[[package]] +name = "impl-rlp" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f28220f89297a075ddc7245cd538076ee98b01f2a9c23a53a4f1105d5a322808" +dependencies = [ + "rlp", +] + [[package]] name = "impl-serde" version = "0.3.1" @@ -3053,7 +3337,7 @@ dependencies = [ "pin-project 1.0.8", "rand 0.7.3", "salsa20", - "sha3", + "sha3 0.9.1", ] [[package]] @@ -3631,7 +3915,7 @@ dependencies = [ "generic-array 0.14.4", "multihash-derive", "sha2 0.9.8", - "sha3", + "sha3 0.9.1", "unsigned-varint 0.5.1", ] @@ -3786,12 +4070,12 @@ name = "node-primitives" version = "2.0.0" source = "git+https://github.com/humanode-network/substrate?branch=master#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" dependencies = [ - "frame-system", + "frame-system 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "parity-scale-codec", "scale-info", - "sp-application-crypto", - "sp-core", - "sp-runtime", + "sp-application-crypto 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-core 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", ] [[package]] @@ -4014,15 +4298,15 @@ name = "pallet-aura" version = "4.0.0-dev" source = "git+https://github.com/humanode-network/substrate?branch=master#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" dependencies = [ - "frame-support", - "frame-system", - "pallet-timestamp", + "frame-support 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "frame-system 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "pallet-timestamp 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "parity-scale-codec", "scale-info", - "sp-application-crypto", + "sp-application-crypto 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "sp-consensus-aura", - "sp-runtime", - "sp-std", + "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-std 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", ] [[package]] @@ -4030,14 +4314,14 @@ name = "pallet-authorship" version = "4.0.0-dev" source = "git+https://github.com/humanode-network/substrate?branch=master#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" dependencies = [ - "frame-support", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "frame-system 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "impl-trait-for-tuples", "parity-scale-codec", "scale-info", "sp-authorship", - "sp-runtime", - "sp-std", + "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-std 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", ] [[package]] @@ -4045,32 +4329,104 @@ name = "pallet-balances" version = "4.0.0-dev" source = "git+https://github.com/humanode-network/substrate?branch=master#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "frame-support 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "frame-system 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "log", "parity-scale-codec", "scale-info", - "sp-runtime", - "sp-std", + "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-std 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", +] + +[[package]] +name = "pallet-balances" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?rev=1a30fa2#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" +dependencies = [ + "frame-benchmarking 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "frame-support 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "frame-system 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "log", + "parity-scale-codec", + "scale-info", + "sp-runtime 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-std 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", ] [[package]] name = "pallet-bioauth" version = "0.1.0" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "frame-support 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "frame-system 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "mockall", "parity-scale-codec", "scale-info", "serde", - "sp-api", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "sp-api 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-core 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-io 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-std 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", +] + +[[package]] +name = "pallet-ethereum" +version = "4.0.0-dev" +source = "git+https://github.com/humanode-network/frontier?branch=substrate-1a30fa2#26bf32c18044785756eba89478c24b2bf730f719" +dependencies = [ + "ethereum", + "ethereum-types", + "evm", + "fp-consensus", + "fp-evm", + "fp-rpc", + "fp-self-contained", + "fp-storage", + "frame-support 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "frame-system 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "pallet-balances 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "pallet-evm", + "pallet-timestamp 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "parity-scale-codec", + "rlp", + "rustc-hex", + "scale-info", + "serde", + "sha3 0.8.2", + "sp-io 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-runtime 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-std 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", +] + +[[package]] +name = "pallet-evm" +version = "6.0.0-dev" +source = "git+https://github.com/humanode-network/frontier?branch=substrate-1a30fa2#26bf32c18044785756eba89478c24b2bf730f719" +dependencies = [ + "evm", + "evm-gasometer", + "evm-runtime", + "fp-evm", + "frame-benchmarking 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "frame-support 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "frame-system 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "hex", + "log", + "pallet-balances 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "pallet-timestamp 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "parity-scale-codec", + "primitive-types", + "rlp", + "scale-info", + "serde", + "sha3 0.8.2", + "sp-core 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-io 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-runtime 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-std 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", ] [[package]] @@ -4078,22 +4434,22 @@ name = "pallet-grandpa" version = "4.0.0-dev" source = "git+https://github.com/humanode-network/substrate?branch=master#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "frame-support 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "frame-system 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "log", "pallet-authorship", "pallet-session", "parity-scale-codec", "scale-info", - "sp-application-crypto", - "sp-core", + "sp-application-crypto 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-core 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", "sp-finality-grandpa", - "sp-io", - "sp-runtime", + "sp-io 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "sp-session", - "sp-staking", - "sp-std", + "sp-staking 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-std 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", ] [[package]] @@ -4101,13 +4457,13 @@ name = "pallet-randomness-collective-flip" version = "4.0.0-dev" source = "git+https://github.com/humanode-network/substrate?branch=master#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" dependencies = [ - "frame-support", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "frame-system 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "parity-scale-codec", "safe-mix", "scale-info", - "sp-runtime", - "sp-std", + "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-std 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", ] [[package]] @@ -4115,20 +4471,20 @@ name = "pallet-session" version = "4.0.0-dev" source = "git+https://github.com/humanode-network/substrate?branch=master#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" dependencies = [ - "frame-support", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "frame-system 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "impl-trait-for-tuples", "log", - "pallet-timestamp", + "pallet-timestamp 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "parity-scale-codec", "scale-info", - "sp-core", - "sp-io", - "sp-runtime", + "sp-core 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-io 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "sp-session", - "sp-staking", - "sp-std", - "sp-trie", + "sp-staking 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-std 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-trie 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", ] [[package]] @@ -4136,13 +4492,13 @@ name = "pallet-sudo" version = "4.0.0-dev" source = "git+https://github.com/humanode-network/substrate?branch=master#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" dependencies = [ - "frame-support", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "frame-system 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "parity-scale-codec", "scale-info", - "sp-io", - "sp-runtime", - "sp-std", + "sp-io 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-std 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", ] [[package]] @@ -4150,16 +4506,33 @@ name = "pallet-timestamp" version = "4.0.0-dev" source = "git+https://github.com/humanode-network/substrate?branch=master#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", + "frame-benchmarking 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "frame-support 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "frame-system 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "log", "parity-scale-codec", "scale-info", - "sp-inherents", - "sp-runtime", - "sp-std", - "sp-timestamp", + "sp-inherents 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-std 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-timestamp 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", +] + +[[package]] +name = "pallet-timestamp" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?rev=1a30fa2#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" +dependencies = [ + "frame-benchmarking 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "frame-support 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "frame-system 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "log", + "parity-scale-codec", + "scale-info", + "sp-inherents 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-runtime 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-std 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-timestamp 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", ] [[package]] @@ -4167,16 +4540,16 @@ name = "pallet-transaction-payment" version = "4.0.0-dev" source = "git+https://github.com/humanode-network/substrate?branch=master#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" dependencies = [ - "frame-support", - "frame-system", + "frame-support 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "frame-system 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "parity-scale-codec", "scale-info", "serde", "smallvec", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", + "sp-core 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-io 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-std 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", ] [[package]] @@ -4189,11 +4562,11 @@ dependencies = [ "jsonrpc-derive", "pallet-transaction-payment-rpc-runtime-api", "parity-scale-codec", - "sp-api", + "sp-api 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "sp-blockchain", - "sp-core", + "sp-core 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", "sp-rpc", - "sp-runtime", + "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", ] [[package]] @@ -4203,8 +4576,8 @@ source = "git+https://github.com/humanode-network/substrate?branch=master#1a30fa dependencies = [ "pallet-transaction-payment", "parity-scale-codec", - "sp-api", - "sp-runtime", + "sp-api 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", ] [[package]] @@ -4279,8 +4652,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6f4cb4e169446179cbc6b8b6320cc9fca49bd2e94e8db25f25f200a8ea774770" dependencies = [ "cfg-if 1.0.0", + "ethereum-types", "hashbrown", "impl-trait-for-tuples", + "lru 0.6.6", "parity-util-mem-derive", "parking_lot", "primitive-types", @@ -4601,6 +4976,7 @@ checksum = "05e4722c697a58a99d5d06a08c30821d7c082a4632198de1eaa5a6c22ef42373" dependencies = [ "fixed-hash", "impl-codec", + "impl-rlp", "impl-serde", "scale-info", "uint", @@ -4613,7 +4989,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-std", + "sp-std 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", ] [[package]] @@ -5078,23 +5454,44 @@ dependencies = [ ] [[package]] -name = "robonode-client" -version = "0.1.0" +name = "rlp" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "999508abb0ae792aabed2460c45b89106d97fe4adac593bdaef433c2605847b5" dependencies = [ - "assert_matches", - "reqwest", - "serde", - "serde_json", - "thiserror", - "tokio", - "wiremock", + "bytes 1.1.0", + "rustc-hex", ] [[package]] -name = "robonode-crypto" +name = "rlp-derive" version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e33d7b2abe0c340d8797fe2907d3f20d3b5ea5908683618bfe80df7f621f672a" dependencies = [ - "ed25519-dalek", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "robonode-client" +version = "0.1.0" +dependencies = [ + "assert_matches", + "reqwest", + "serde", + "serde_json", + "thiserror", + "tokio", + "wiremock", +] + +[[package]] +name = "robonode-crypto" +version = "0.1.0" +dependencies = [ + "ed25519-dalek", "hex-literal", "rand 0.7.3", ] @@ -5123,7 +5520,7 @@ dependencies = [ "sc-tracing", "serde", "serde_json", - "sp-core", + "sp-core 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", "tokio", "tracing", "tracing-test", @@ -5268,8 +5665,8 @@ version = "4.1.0-dev" source = "git+https://github.com/humanode-network/substrate?branch=master#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" dependencies = [ "log", - "sp-core", - "sp-wasm-interface", + "sp-core 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-wasm-interface 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", "thiserror", ] @@ -5287,12 +5684,12 @@ dependencies = [ "sc-proposer-metrics", "sc-telemetry", "sc-transaction-pool-api", - "sp-api", + "sp-api 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "sp-blockchain", "sp-consensus", - "sp-core", - "sp-inherents", - "sp-runtime", + "sp-core 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-inherents 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "substrate-prometheus-endpoint", ] @@ -5303,13 +5700,13 @@ source = "git+https://github.com/humanode-network/substrate?branch=master#1a30fa dependencies = [ "parity-scale-codec", "sc-client-api", - "sp-api", + "sp-api 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "sp-block-builder", "sp-blockchain", - "sp-core", - "sp-inherents", - "sp-runtime", - "sp-state-machine", + "sp-core 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-inherents 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-state-machine 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", ] [[package]] @@ -5325,8 +5722,8 @@ dependencies = [ "sc-telemetry", "serde", "serde_json", - "sp-core", - "sp-runtime", + "sp-core 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", ] [[package]] @@ -5366,12 +5763,12 @@ dependencies = [ "serde", "serde_json", "sp-blockchain", - "sp-core", + "sp-core 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", "sp-keyring", - "sp-keystore", - "sp-panic-handler", - "sp-runtime", - "sp-version", + "sp-keystore 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-panic-handler 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-version 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "structopt", "thiserror", "tiny-bip39", @@ -5392,17 +5789,17 @@ dependencies = [ "sc-executor", "sc-transaction-pool-api", "sc-utils", - "sp-api", + "sp-api 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "sp-blockchain", "sp-consensus", - "sp-core", + "sp-core 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", "sp-database", - "sp-externalities", - "sp-keystore", - "sp-runtime", - "sp-state-machine", - "sp-storage", - "sp-trie", + "sp-externalities 0.10.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-keystore 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-state-machine 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-storage 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-trie 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "substrate-prometheus-endpoint", ] @@ -5422,13 +5819,13 @@ dependencies = [ "parking_lot", "sc-client-api", "sc-state-db", - "sp-arithmetic", + "sp-arithmetic 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "sp-blockchain", - "sp-core", + "sp-core 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", "sp-database", - "sp-runtime", - "sp-state-machine", - "sp-trie", + "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-state-machine 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-trie 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", ] [[package]] @@ -5445,12 +5842,12 @@ dependencies = [ "sc-client-api", "sc-utils", "serde", - "sp-api", + "sp-api 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "sp-blockchain", "sp-consensus", - "sp-core", - "sp-runtime", - "sp-state-machine", + "sp-core 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-state-machine 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "substrate-prometheus-endpoint", "thiserror", ] @@ -5470,17 +5867,17 @@ dependencies = [ "sc-consensus", "sc-consensus-slots", "sc-telemetry", - "sp-api", - "sp-application-crypto", + "sp-api 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-application-crypto 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "sp-block-builder", "sp-blockchain", "sp-consensus", "sp-consensus-aura", "sp-consensus-slots", - "sp-core", - "sp-inherents", - "sp-keystore", - "sp-runtime", + "sp-core 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-inherents 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-keystore 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "substrate-prometheus-endpoint", ] @@ -5497,16 +5894,16 @@ dependencies = [ "sc-client-api", "sc-consensus", "sc-telemetry", - "sp-api", - "sp-arithmetic", + "sp-api 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-arithmetic 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "sp-blockchain", "sp-consensus", "sp-consensus-slots", - "sp-core", - "sp-inherents", - "sp-runtime", - "sp-state-machine", - "sp-timestamp", + "sp-core 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-inherents 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-state-machine 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-timestamp 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "thiserror", ] @@ -5522,17 +5919,17 @@ dependencies = [ "parking_lot", "sc-executor-common", "sc-executor-wasmi", - "sp-api", - "sp-core", - "sp-core-hashing-proc-macro", - "sp-externalities", - "sp-io", - "sp-panic-handler", - "sp-runtime-interface", + "sp-api 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-core 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-core-hashing-proc-macro 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-externalities 0.10.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-io 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-panic-handler 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-runtime-interface 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", "sp-tasks", - "sp-trie", - "sp-version", - "sp-wasm-interface", + "sp-trie 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-version 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-wasm-interface 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", "wasmi", ] @@ -5546,10 +5943,10 @@ dependencies = [ "parity-scale-codec", "pwasm-utils", "sc-allocator", - "sp-core", + "sp-core 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", "sp-maybe-compressed-blob", "sp-serializer", - "sp-wasm-interface", + "sp-wasm-interface 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", "thiserror", "wasmi", ] @@ -5564,9 +5961,9 @@ dependencies = [ "sc-allocator", "sc-executor-common", "scoped-tls", - "sp-core", - "sp-runtime-interface", - "sp-wasm-interface", + "sp-core 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-runtime-interface 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-wasm-interface 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", "wasmi", ] @@ -5595,15 +5992,15 @@ dependencies = [ "sc-telemetry", "sc-utils", "serde_json", - "sp-api", - "sp-application-crypto", - "sp-arithmetic", + "sp-api 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-application-crypto 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-arithmetic 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "sp-blockchain", "sp-consensus", - "sp-core", + "sp-core 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", "sp-finality-grandpa", - "sp-keystore", - "sp-runtime", + "sp-keystore 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "substrate-prometheus-endpoint", ] @@ -5621,7 +6018,7 @@ dependencies = [ "sc-network", "sc-transaction-pool-api", "sp-blockchain", - "sp-runtime", + "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", ] [[package]] @@ -5634,9 +6031,9 @@ dependencies = [ "hex", "parking_lot", "serde_json", - "sp-application-crypto", - "sp-core", - "sp-keystore", + "sp-application-crypto 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-core 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-keystore 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", ] [[package]] @@ -5677,12 +6074,12 @@ dependencies = [ "serde", "serde_json", "smallvec", - "sp-arithmetic", + "sp-arithmetic 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "sp-blockchain", "sp-consensus", - "sp-core", + "sp-core 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", "sp-finality-grandpa", - "sp-runtime", + "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "substrate-prometheus-endpoint", "thiserror", "unsigned-varint 0.6.0", @@ -5701,7 +6098,7 @@ dependencies = [ "log", "lru 0.7.0", "sc-network", - "sp-runtime", + "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "substrate-prometheus-endpoint", "tracing", ] @@ -5726,10 +6123,10 @@ dependencies = [ "sc-client-api", "sc-network", "sc-utils", - "sp-api", - "sp-core", + "sp-api 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-core 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", "sp-offchain", - "sp-runtime", + "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "threadpool", "tracing", ] @@ -5776,15 +6173,15 @@ dependencies = [ "sc-transaction-pool-api", "sc-utils", "serde_json", - "sp-api", + "sp-api 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "sp-blockchain", - "sp-core", - "sp-keystore", + "sp-core 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-keystore 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "sp-offchain", "sp-rpc", - "sp-runtime", + "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "sp-session", - "sp-version", + "sp-version 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", ] [[package]] @@ -5804,11 +6201,11 @@ dependencies = [ "sc-transaction-pool-api", "serde", "serde_json", - "sp-core", + "sp-core 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", "sp-rpc", - "sp-runtime", - "sp-tracing", - "sp-version", + "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-tracing 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-version 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "thiserror", ] @@ -5867,24 +6264,24 @@ dependencies = [ "sc-utils", "serde", "serde_json", - "sp-api", - "sp-application-crypto", + "sp-api 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-application-crypto 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "sp-block-builder", "sp-blockchain", "sp-consensus", - "sp-core", - "sp-externalities", - "sp-inherents", - "sp-keystore", - "sp-runtime", + "sp-core 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-externalities 0.10.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-inherents 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-keystore 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "sp-session", - "sp-state-machine", - "sp-storage", - "sp-tracing", + "sp-state-machine 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-storage 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-tracing 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", "sp-transaction-pool", "sp-transaction-storage-proof", - "sp-trie", - "sp-version", + "sp-trie 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-version 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "substrate-prometheus-endpoint", "tempfile", "thiserror", @@ -5904,7 +6301,7 @@ dependencies = [ "parity-util-mem-derive", "parking_lot", "sc-client-api", - "sp-core", + "sp-core 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", ] [[package]] @@ -5944,12 +6341,12 @@ dependencies = [ "sc-rpc-server", "sc-tracing-proc-macro", "serde", - "sp-api", + "sp-api 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "sp-blockchain", - "sp-core", + "sp-core 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", "sp-rpc", - "sp-runtime", - "sp-tracing", + "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-tracing 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", "thiserror", "tracing", "tracing-log", @@ -5984,11 +6381,11 @@ dependencies = [ "sc-transaction-pool-api", "sc-utils", "serde", - "sp-api", + "sp-api 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "sp-blockchain", - "sp-core", - "sp-runtime", - "sp-tracing", + "sp-core 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-tracing 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", "sp-transaction-pool", "substrate-prometheus-endpoint", "thiserror", @@ -6004,7 +6401,7 @@ dependencies = [ "log", "serde", "sp-blockchain", - "sp-runtime", + "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "thiserror", ] @@ -6282,6 +6679,19 @@ dependencies = [ "opaque-debug 0.3.0", ] +[[package]] +name = "sha3" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd26bc0e7a2e3a7c959bc494caf58b72ee0c71d67704e9520f736ca7e4853ecf" +dependencies = [ + "block-buffer 0.7.3", + "byte-tools", + "digest 0.8.1", + "keccak", + "opaque-debug 0.2.3", +] + [[package]] name = "sha3" version = "0.9.1" @@ -6438,12 +6848,29 @@ dependencies = [ "hash-db", "log", "parity-scale-codec", - "sp-api-proc-macro", - "sp-core", - "sp-runtime", - "sp-state-machine", - "sp-std", - "sp-version", + "sp-api-proc-macro 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-core 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-state-machine 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-std 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-version 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "thiserror", +] + +[[package]] +name = "sp-api" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?rev=1a30fa2#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" +dependencies = [ + "hash-db", + "log", + "parity-scale-codec", + "sp-api-proc-macro 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-core 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-runtime 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-state-machine 0.10.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-std 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-version 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", "thiserror", ] @@ -6459,6 +6886,18 @@ dependencies = [ "syn", ] +[[package]] +name = "sp-api-proc-macro" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?rev=1a30fa2#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" +dependencies = [ + "blake2-rfc", + "proc-macro-crate 1.1.0", + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "sp-application-crypto" version = "4.0.0-dev" @@ -6467,9 +6906,22 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-core", - "sp-io", - "sp-std", + "sp-core 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-io 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-std 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", +] + +[[package]] +name = "sp-application-crypto" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?rev=1a30fa2#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" +dependencies = [ + "parity-scale-codec", + "scale-info", + "serde", + "sp-core 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-io 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-std 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", ] [[package]] @@ -6482,8 +6934,23 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-debug-derive", - "sp-std", + "sp-debug-derive 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-std 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "static_assertions", +] + +[[package]] +name = "sp-arithmetic" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?rev=1a30fa2#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" +dependencies = [ + "integer-sqrt", + "num-traits", + "parity-scale-codec", + "scale-info", + "serde", + "sp-debug-derive 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-std 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", "static_assertions", ] @@ -6494,9 +6961,9 @@ source = "git+https://github.com/humanode-network/substrate?branch=master#1a30fa dependencies = [ "async-trait", "parity-scale-codec", - "sp-inherents", - "sp-runtime", - "sp-std", + "sp-inherents 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-std 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", ] [[package]] @@ -6505,10 +6972,10 @@ version = "4.0.0-dev" source = "git+https://github.com/humanode-network/substrate?branch=master#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" dependencies = [ "parity-scale-codec", - "sp-api", - "sp-inherents", - "sp-runtime", - "sp-std", + "sp-api 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-inherents 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-std 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", ] [[package]] @@ -6521,11 +6988,11 @@ dependencies = [ "lru 0.7.0", "parity-scale-codec", "parking_lot", - "sp-api", + "sp-api 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "sp-consensus", "sp-database", - "sp-runtime", - "sp-state-machine", + "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-state-machine 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "thiserror", ] @@ -6539,12 +7006,12 @@ dependencies = [ "futures-timer 3.0.2", "log", "parity-scale-codec", - "sp-core", - "sp-inherents", - "sp-runtime", - "sp-state-machine", - "sp-std", - "sp-version", + "sp-core 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-inherents 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-state-machine 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-std 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-version 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "thiserror", ] @@ -6556,14 +7023,14 @@ dependencies = [ "async-trait", "parity-scale-codec", "scale-info", - "sp-api", - "sp-application-crypto", + "sp-api 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-application-crypto 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "sp-consensus", "sp-consensus-slots", - "sp-inherents", - "sp-runtime", - "sp-std", - "sp-timestamp", + "sp-inherents 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-std 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-timestamp 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", ] [[package]] @@ -6574,8 +7041,8 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-arithmetic", - "sp-runtime", + "sp-arithmetic 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", ] [[package]] @@ -6610,12 +7077,60 @@ dependencies = [ "secrecy", "serde", "sha2 0.9.8", - "sp-core-hashing", - "sp-debug-derive", - "sp-externalities", - "sp-runtime-interface", - "sp-std", - "sp-storage", + "sp-core-hashing 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-debug-derive 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-externalities 0.10.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-runtime-interface 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-std 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-storage 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "ss58-registry", + "substrate-bip39", + "thiserror", + "tiny-bip39", + "tiny-keccak", + "twox-hash", + "wasmi", + "zeroize", +] + +[[package]] +name = "sp-core" +version = "4.0.0" +source = "git+https://github.com/paritytech/substrate?rev=1a30fa2#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" +dependencies = [ + "base58", + "bitflags", + "blake2-rfc", + "byteorder", + "dyn-clonable", + "ed25519-dalek", + "futures 0.3.17", + "hash-db", + "hash256-std-hasher", + "hex", + "impl-serde", + "lazy_static", + "libsecp256k1", + "log", + "merlin", + "num-traits", + "parity-scale-codec", + "parity-util-mem", + "parking_lot", + "primitive-types", + "rand 0.7.3", + "regex", + "scale-info", + "schnorrkel", + "secrecy", + "serde", + "sha2 0.9.8", + "sp-core-hashing 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-debug-derive 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-externalities 0.10.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-runtime-interface 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-std 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-storage 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", "ss58-registry", "substrate-bip39", "thiserror", @@ -6634,7 +7149,20 @@ dependencies = [ "blake2-rfc", "byteorder", "sha2 0.9.8", - "sp-std", + "sp-std 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "tiny-keccak", + "twox-hash", +] + +[[package]] +name = "sp-core-hashing" +version = "4.0.0" +source = "git+https://github.com/paritytech/substrate?rev=1a30fa2#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" +dependencies = [ + "blake2-rfc", + "byteorder", + "sha2 0.9.8", + "sp-std 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", "tiny-keccak", "twox-hash", ] @@ -6646,7 +7174,18 @@ source = "git+https://github.com/humanode-network/substrate?branch=master#1a30fa dependencies = [ "proc-macro2", "quote", - "sp-core-hashing", + "sp-core-hashing 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "syn", +] + +[[package]] +name = "sp-core-hashing-proc-macro" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?rev=1a30fa2#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" +dependencies = [ + "proc-macro2", + "quote", + "sp-core-hashing 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", "syn", ] @@ -6669,6 +7208,16 @@ dependencies = [ "syn", ] +[[package]] +name = "sp-debug-derive" +version = "4.0.0" +source = "git+https://github.com/paritytech/substrate?rev=1a30fa2#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "sp-externalities" version = "0.10.0" @@ -6676,8 +7225,19 @@ source = "git+https://github.com/humanode-network/substrate?branch=master#1a30fa dependencies = [ "environmental", "parity-scale-codec", - "sp-std", - "sp-storage", + "sp-std 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-storage 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", +] + +[[package]] +name = "sp-externalities" +version = "0.10.0" +source = "git+https://github.com/paritytech/substrate?rev=1a30fa2#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" +dependencies = [ + "environmental", + "parity-scale-codec", + "sp-std 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-storage 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", ] [[package]] @@ -6690,12 +7250,12 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-api", - "sp-application-crypto", - "sp-core", - "sp-keystore", - "sp-runtime", - "sp-std", + "sp-api 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-application-crypto 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-core 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-keystore 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-std 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", ] [[package]] @@ -6706,9 +7266,23 @@ dependencies = [ "async-trait", "impl-trait-for-tuples", "parity-scale-codec", - "sp-core", - "sp-runtime", - "sp-std", + "sp-core 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-std 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "thiserror", +] + +[[package]] +name = "sp-inherents" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?rev=1a30fa2#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" +dependencies = [ + "async-trait", + "impl-trait-for-tuples", + "parity-scale-codec", + "sp-core 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-runtime 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-std 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", "thiserror", ] @@ -6723,15 +7297,39 @@ dependencies = [ "log", "parity-scale-codec", "parking_lot", - "sp-core", - "sp-externalities", - "sp-keystore", - "sp-runtime-interface", - "sp-state-machine", - "sp-std", - "sp-tracing", - "sp-trie", - "sp-wasm-interface", + "sp-core 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-externalities 0.10.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-keystore 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-runtime-interface 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-state-machine 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-std 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-tracing 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-trie 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-wasm-interface 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "tracing", + "tracing-core", +] + +[[package]] +name = "sp-io" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?rev=1a30fa2#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" +dependencies = [ + "futures 0.3.17", + "hash-db", + "libsecp256k1", + "log", + "parity-scale-codec", + "parking_lot", + "sp-core 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-externalities 0.10.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-keystore 0.10.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-runtime-interface 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-state-machine 0.10.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-std 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-tracing 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-trie 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-wasm-interface 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", "tracing", "tracing-core", ] @@ -6742,8 +7340,8 @@ version = "4.0.0-dev" source = "git+https://github.com/humanode-network/substrate?branch=master#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" dependencies = [ "lazy_static", - "sp-core", - "sp-runtime", + "sp-core 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "strum", ] @@ -6760,8 +7358,24 @@ dependencies = [ "parking_lot", "schnorrkel", "serde", - "sp-core", - "sp-externalities", + "sp-core 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-externalities 0.10.0 (git+https://github.com/humanode-network/substrate?branch=master)", +] + +[[package]] +name = "sp-keystore" +version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate?rev=1a30fa2#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" +dependencies = [ + "async-trait", + "derive_more", + "futures 0.3.17", + "merlin", + "parity-scale-codec", + "parking_lot", + "schnorrkel", + "sp-core 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-externalities 0.10.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", ] [[package]] @@ -6777,9 +7391,9 @@ name = "sp-offchain" version = "4.0.0-dev" source = "git+https://github.com/humanode-network/substrate?branch=master#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" dependencies = [ - "sp-api", - "sp-core", - "sp-runtime", + "sp-api 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-core 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", ] [[package]] @@ -6792,6 +7406,16 @@ dependencies = [ "regex", ] +[[package]] +name = "sp-panic-handler" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?rev=1a30fa2#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" +dependencies = [ + "backtrace", + "lazy_static", + "regex", +] + [[package]] name = "sp-rpc" version = "4.0.0-dev" @@ -6799,7 +7423,7 @@ source = "git+https://github.com/humanode-network/substrate?branch=master#1a30fa dependencies = [ "rustc-hash", "serde", - "sp-core", + "sp-core 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", ] [[package]] @@ -6817,11 +7441,33 @@ dependencies = [ "rand 0.7.3", "scale-info", "serde", - "sp-application-crypto", - "sp-arithmetic", - "sp-core", - "sp-io", - "sp-std", + "sp-application-crypto 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-arithmetic 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-core 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-io 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-std 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", +] + +[[package]] +name = "sp-runtime" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?rev=1a30fa2#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" +dependencies = [ + "either", + "hash256-std-hasher", + "impl-trait-for-tuples", + "log", + "parity-scale-codec", + "parity-util-mem", + "paste", + "rand 0.7.3", + "scale-info", + "serde", + "sp-application-crypto 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-arithmetic 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-core 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-io 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-std 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", ] [[package]] @@ -6832,12 +7478,29 @@ dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", "primitive-types", - "sp-externalities", - "sp-runtime-interface-proc-macro", - "sp-std", - "sp-storage", - "sp-tracing", - "sp-wasm-interface", + "sp-externalities 0.10.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-runtime-interface-proc-macro 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-std 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-storage 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-tracing 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-wasm-interface 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "static_assertions", +] + +[[package]] +name = "sp-runtime-interface" +version = "4.0.0" +source = "git+https://github.com/paritytech/substrate?rev=1a30fa2#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" +dependencies = [ + "impl-trait-for-tuples", + "parity-scale-codec", + "primitive-types", + "sp-externalities 0.10.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-runtime-interface-proc-macro 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-std 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-storage 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-tracing 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-wasm-interface 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", "static_assertions", ] @@ -6853,6 +7516,18 @@ dependencies = [ "syn", ] +[[package]] +name = "sp-runtime-interface-proc-macro" +version = "4.0.0" +source = "git+https://github.com/paritytech/substrate?rev=1a30fa2#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" +dependencies = [ + "Inflector", + "proc-macro-crate 1.1.0", + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "sp-serializer" version = "4.0.0-dev" @@ -6869,11 +7544,11 @@ source = "git+https://github.com/humanode-network/substrate?branch=master#1a30fa dependencies = [ "parity-scale-codec", "scale-info", - "sp-api", - "sp-core", - "sp-runtime", - "sp-staking", - "sp-std", + "sp-api 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-core 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-staking 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-std 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", ] [[package]] @@ -6883,8 +7558,19 @@ source = "git+https://github.com/humanode-network/substrate?branch=master#1a30fa dependencies = [ "parity-scale-codec", "scale-info", - "sp-runtime", - "sp-std", + "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-std 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", +] + +[[package]] +name = "sp-staking" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?rev=1a30fa2#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" +dependencies = [ + "parity-scale-codec", + "scale-info", + "sp-runtime 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-std 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", ] [[package]] @@ -6899,11 +7585,34 @@ dependencies = [ "parking_lot", "rand 0.7.3", "smallvec", - "sp-core", - "sp-externalities", - "sp-panic-handler", - "sp-std", - "sp-trie", + "sp-core 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-externalities 0.10.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-panic-handler 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-std 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-trie 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "thiserror", + "tracing", + "trie-db", + "trie-root", +] + +[[package]] +name = "sp-state-machine" +version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate?rev=1a30fa2#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" +dependencies = [ + "hash-db", + "log", + "num-traits", + "parity-scale-codec", + "parking_lot", + "rand 0.7.3", + "smallvec", + "sp-core 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-externalities 0.10.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-panic-handler 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-std 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-trie 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", "thiserror", "tracing", "trie-db", @@ -6915,6 +7624,11 @@ name = "sp-std" version = "4.0.0" source = "git+https://github.com/humanode-network/substrate?branch=master#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" +[[package]] +name = "sp-std" +version = "4.0.0" +source = "git+https://github.com/paritytech/substrate?rev=1a30fa2#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" + [[package]] name = "sp-storage" version = "4.0.0" @@ -6924,8 +7638,21 @@ dependencies = [ "parity-scale-codec", "ref-cast", "serde", - "sp-debug-derive", - "sp-std", + "sp-debug-derive 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-std 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", +] + +[[package]] +name = "sp-storage" +version = "4.0.0" +source = "git+https://github.com/paritytech/substrate?rev=1a30fa2#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" +dependencies = [ + "impl-serde", + "parity-scale-codec", + "ref-cast", + "serde", + "sp-debug-derive 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-std 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", ] [[package]] @@ -6934,11 +7661,11 @@ version = "4.0.0-dev" source = "git+https://github.com/humanode-network/substrate?branch=master#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" dependencies = [ "log", - "sp-core", - "sp-externalities", - "sp-io", - "sp-runtime-interface", - "sp-std", + "sp-core 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-externalities 0.10.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-io 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-runtime-interface 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-std 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", ] [[package]] @@ -6950,10 +7677,26 @@ dependencies = [ "futures-timer 3.0.2", "log", "parity-scale-codec", - "sp-api", - "sp-inherents", - "sp-runtime", - "sp-std", + "sp-api 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-inherents 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-std 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "thiserror", +] + +[[package]] +name = "sp-timestamp" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?rev=1a30fa2#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" +dependencies = [ + "async-trait", + "futures-timer 3.0.2", + "log", + "parity-scale-codec", + "sp-api 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-inherents 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-runtime 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-std 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", "thiserror", ] @@ -6963,7 +7706,19 @@ version = "4.0.0" source = "git+https://github.com/humanode-network/substrate?branch=master#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" dependencies = [ "parity-scale-codec", - "sp-std", + "sp-std 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "tracing", + "tracing-core", + "tracing-subscriber", +] + +[[package]] +name = "sp-tracing" +version = "4.0.0" +source = "git+https://github.com/paritytech/substrate?rev=1a30fa2#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" +dependencies = [ + "parity-scale-codec", + "sp-std 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", "tracing", "tracing-core", "tracing-subscriber", @@ -6974,8 +7729,8 @@ name = "sp-transaction-pool" version = "4.0.0-dev" source = "git+https://github.com/humanode-network/substrate?branch=master#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" dependencies = [ - "sp-api", - "sp-runtime", + "sp-api 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", ] [[package]] @@ -6987,11 +7742,11 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-core", - "sp-inherents", - "sp-runtime", - "sp-std", - "sp-trie", + "sp-core 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-inherents 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-std 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-trie 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", ] [[package]] @@ -7003,8 +7758,23 @@ dependencies = [ "memory-db", "parity-scale-codec", "scale-info", - "sp-core", - "sp-std", + "sp-core 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-std 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "trie-db", + "trie-root", +] + +[[package]] +name = "sp-trie" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?rev=1a30fa2#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" +dependencies = [ + "hash-db", + "memory-db", + "parity-scale-codec", + "scale-info", + "sp-core 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-std 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", "trie-db", "trie-root", ] @@ -7019,9 +7789,25 @@ dependencies = [ "parity-wasm 0.42.2", "scale-info", "serde", - "sp-runtime", - "sp-std", - "sp-version-proc-macro", + "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-std 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-version-proc-macro 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "thiserror", +] + +[[package]] +name = "sp-version" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?rev=1a30fa2#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" +dependencies = [ + "impl-serde", + "parity-scale-codec", + "parity-wasm 0.42.2", + "scale-info", + "serde", + "sp-runtime 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-std 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-version-proc-macro 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", "thiserror", ] @@ -7036,6 +7822,17 @@ dependencies = [ "syn", ] +[[package]] +name = "sp-version-proc-macro" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?rev=1a30fa2#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" +dependencies = [ + "parity-scale-codec", + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "sp-wasm-interface" version = "4.0.0" @@ -7043,7 +7840,18 @@ source = "git+https://github.com/humanode-network/substrate?branch=master#1a30fa dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", - "sp-std", + "sp-std 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "wasmi", +] + +[[package]] +name = "sp-wasm-interface" +version = "4.0.0" +source = "git+https://github.com/paritytech/substrate?rev=1a30fa2#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" +dependencies = [ + "impl-trait-for-tuples", + "parity-scale-codec", + "sp-std 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", "wasmi", ] @@ -7171,11 +7979,11 @@ dependencies = [ "sc-client-api", "sc-rpc-api", "sc-transaction-pool-api", - "sp-api", + "sp-api 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "sp-block-builder", "sp-blockchain", - "sp-core", - "sp-runtime", + "sp-core 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", ] [[package]] @@ -7600,6 +8408,16 @@ dependencies = [ "hash-db", ] +[[package]] +name = "triehash" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1631b201eb031b563d2e85ca18ec8092508e262a3196ce9bd10a67ec87b9f5c" +dependencies = [ + "hash-db", + "rlp", +] + [[package]] name = "trust-dns-proto" version = "0.20.3" @@ -7689,7 +8507,7 @@ version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1f559b464de2e2bdabcac6a210d12e9b5a5973c251e102c44c585c71d51bd78e" dependencies = [ - "cfg-if 1.0.0", + "cfg-if 0.1.10", "rand 0.8.4", "static_assertions", ] diff --git a/crates/humanode-runtime/Cargo.toml b/crates/humanode-runtime/Cargo.toml index 956f90e0e..0eec2f375 100644 --- a/crates/humanode-runtime/Cargo.toml +++ b/crates/humanode-runtime/Cargo.toml @@ -28,6 +28,8 @@ frame-system-rpc-runtime-api = { default-features = false, git = "https://github hex-literal = { version = "0.3", optional = true } pallet-aura = { default-features = false, git = "https://github.com/humanode-network/substrate", branch = "master" } pallet-balances = { default-features = false, git = "https://github.com/humanode-network/substrate", branch = "master" } +pallet-ethereum = { default-features = false, git = "https://github.com/humanode-network/frontier", branch = "substrate-1a30fa2" } +pallet-evm = { default-features = false, git = "https://github.com/humanode-network/frontier", branch = "substrate-1a30fa2" } pallet-grandpa = { default-features = false, git = "https://github.com/humanode-network/substrate", branch = "master" } pallet-randomness-collective-flip = { default-features = false, git = "https://github.com/humanode-network/substrate", branch = "master" } pallet-sudo = { default-features = false, git = "https://github.com/humanode-network/substrate", branch = "master" } @@ -76,6 +78,8 @@ std = [ "pallet-aura/std", "pallet-bioauth/std", "pallet-balances/std", + "pallet-ethereum/std", + "pallet-evm/std", "pallet-grandpa/std", "pallet-randomness-collective-flip/std", "pallet-sudo/std", From f820824b967fdd87fb3255fbf9ce1daf7e338d63 Mon Sep 17 00:00:00 2001 From: dmitrylavrenov Date: Tue, 14 Dec 2021 01:39:01 +0300 Subject: [PATCH 03/42] integrate EVM to current humanode runtime --- Cargo.lock | 1462 ++++++----------- Cargo.toml | 14 + crates/humanode-peer/Cargo.toml | 2 + crates/humanode-peer/src/chain_spec.rs | 44 +- crates/humanode-runtime/Cargo.toml | 11 + .../src/frontier_precompiles.rs | 69 + crates/humanode-runtime/src/lib.rs | 289 +++- 7 files changed, 950 insertions(+), 941 deletions(-) create mode 100644 crates/humanode-runtime/src/frontier_precompiles.rs diff --git a/Cargo.lock b/Cargo.lock index 8534cd69b..4c950f2fa 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -437,14 +437,14 @@ dependencies = [ "sc-client-api", "sc-consensus", "sc-service", - "sp-api 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-application-crypto 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-api", + "sp-application-crypto", "sp-blockchain", "sp-consensus", "sp-consensus-aura", - "sp-inherents 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-keystore 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-inherents", + "sp-keystore", + "sp-runtime", "thiserror", "tokio", ] @@ -454,8 +454,8 @@ name = "bioauth-consensus-api" version = "0.1.0" dependencies = [ "parity-scale-codec", - "sp-api 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-std 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-api", + "sp-std", ] [[package]] @@ -1554,9 +1554,9 @@ dependencies = [ "parity-scale-codec", "rlp", "sha3 0.8.2", - "sp-core 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", - "sp-runtime 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", - "sp-std 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-core", + "sp-runtime", + "sp-std", ] [[package]] @@ -1567,8 +1567,8 @@ dependencies = [ "evm", "parity-scale-codec", "serde", - "sp-core 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", - "sp-std 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-core", + "sp-std", ] [[package]] @@ -1581,11 +1581,11 @@ dependencies = [ "fp-evm", "parity-scale-codec", "scale-info", - "sp-api 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", - "sp-core 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", - "sp-io 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", - "sp-runtime 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", - "sp-std 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-api", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", ] [[package]] @@ -1594,15 +1594,15 @@ version = "1.0.0-dev" source = "git+https://github.com/humanode-network/frontier?branch=substrate-1a30fa2#26bf32c18044785756eba89478c24b2bf730f719" dependencies = [ "ethereum", - "frame-support 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "frame-support", "parity-scale-codec", "parity-util-mem", "scale-info", "serde", "sha3 0.8.2", - "sp-core 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", - "sp-io 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", - "sp-runtime 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-core", + "sp-io", + "sp-runtime", ] [[package]] @@ -1621,41 +1621,20 @@ name = "frame-benchmarking" version = "4.0.0-dev" source = "git+https://github.com/humanode-network/substrate?branch=master#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" dependencies = [ - "frame-support 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "frame-system 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "linregress", - "log", - "parity-scale-codec", - "paste", - "scale-info", - "sp-api 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-application-crypto 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-io 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-runtime-interface 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-std 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-storage 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", -] - -[[package]] -name = "frame-benchmarking" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?rev=1a30fa2#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" -dependencies = [ - "frame-support 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", - "frame-system 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "frame-support", + "frame-system", "linregress", "log", "parity-scale-codec", "paste", "scale-info", - "sp-api 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", - "sp-application-crypto 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", - "sp-io 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", - "sp-runtime 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", - "sp-runtime-interface 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", - "sp-std 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", - "sp-storage 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-api", + "sp-application-crypto", + "sp-io", + "sp-runtime", + "sp-runtime-interface", + "sp-std", + "sp-storage", ] [[package]] @@ -1665,8 +1644,8 @@ source = "git+https://github.com/humanode-network/substrate?branch=master#1a30fa dependencies = [ "Inflector", "chrono", - "frame-benchmarking 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "frame-support 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "frame-benchmarking", + "frame-support", "handlebars", "linked-hash-map", "log", @@ -1676,11 +1655,11 @@ dependencies = [ "sc-executor", "sc-service", "serde", - "sp-core 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-externalities 0.10.0 (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-keystore 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-state-machine 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-core", + "sp-externalities", + "sp-keystore", + "sp-runtime", + "sp-state-machine", "structopt", ] @@ -1689,15 +1668,15 @@ name = "frame-executive" version = "4.0.0-dev" source = "git+https://github.com/humanode-network/substrate?branch=master#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" dependencies = [ - "frame-support 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "frame-system 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "frame-support", + "frame-system", "parity-scale-codec", "scale-info", - "sp-core 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-io 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-std 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-tracing 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", + "sp-tracing", ] [[package]] @@ -1719,36 +1698,7 @@ source = "git+https://github.com/humanode-network/substrate?branch=master#1a30fa dependencies = [ "bitflags", "frame-metadata", - "frame-support-procedural 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "impl-trait-for-tuples", - "log", - "once_cell", - "parity-scale-codec", - "paste", - "scale-info", - "serde", - "smallvec", - "sp-arithmetic 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-core 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-core-hashing-proc-macro 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-inherents 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-io 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-staking 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-state-machine 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-std 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-tracing 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", - "tt-call", -] - -[[package]] -name = "frame-support" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?rev=1a30fa2#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" -dependencies = [ - "bitflags", - "frame-metadata", - "frame-support-procedural 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "frame-support-procedural", "impl-trait-for-tuples", "log", "once_cell", @@ -1757,16 +1707,16 @@ dependencies = [ "scale-info", "serde", "smallvec", - "sp-arithmetic 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", - "sp-core 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", - "sp-core-hashing-proc-macro 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", - "sp-inherents 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", - "sp-io 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", - "sp-runtime 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", - "sp-staking 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", - "sp-state-machine 0.10.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", - "sp-std 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", - "sp-tracing 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-arithmetic", + "sp-core", + "sp-core-hashing-proc-macro", + "sp-inherents", + "sp-io", + "sp-runtime", + "sp-staking", + "sp-state-machine", + "sp-std", + "sp-tracing", "tt-call", ] @@ -1776,19 +1726,7 @@ version = "4.0.0-dev" source = "git+https://github.com/humanode-network/substrate?branch=master#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" dependencies = [ "Inflector", - "frame-support-procedural-tools 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "frame-support-procedural" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?rev=1a30fa2#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" -dependencies = [ - "Inflector", - "frame-support-procedural-tools 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "frame-support-procedural-tools", "proc-macro2", "quote", "syn", @@ -1799,19 +1737,7 @@ name = "frame-support-procedural-tools" version = "4.0.0-dev" source = "git+https://github.com/humanode-network/substrate?branch=master#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" dependencies = [ - "frame-support-procedural-tools-derive 3.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", - "proc-macro-crate 1.1.0", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "frame-support-procedural-tools" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?rev=1a30fa2#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" -dependencies = [ - "frame-support-procedural-tools-derive 3.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "frame-support-procedural-tools-derive", "proc-macro-crate 1.1.0", "proc-macro2", "quote", @@ -1828,48 +1754,21 @@ dependencies = [ "syn", ] -[[package]] -name = "frame-support-procedural-tools-derive" -version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?rev=1a30fa2#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "frame-system" version = "4.0.0-dev" source = "git+https://github.com/humanode-network/substrate?branch=master#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" dependencies = [ - "frame-support 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "log", - "parity-scale-codec", - "scale-info", - "serde", - "sp-core 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-io 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-std 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-version 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", -] - -[[package]] -name = "frame-system" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?rev=1a30fa2#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" -dependencies = [ - "frame-support 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "frame-support", "log", "parity-scale-codec", "scale-info", "serde", - "sp-core 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", - "sp-io 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", - "sp-runtime 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", - "sp-std 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", - "sp-version 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", + "sp-version", ] [[package]] @@ -1877,14 +1776,14 @@ name = "frame-system-benchmarking" version = "4.0.0-dev" source = "git+https://github.com/humanode-network/substrate?branch=master#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" dependencies = [ - "frame-benchmarking 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "frame-support 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "frame-system 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "frame-benchmarking", + "frame-support", + "frame-system", "parity-scale-codec", "scale-info", - "sp-core 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-std 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-core", + "sp-runtime", + "sp-std", ] [[package]] @@ -1893,7 +1792,7 @@ version = "4.0.0-dev" source = "git+https://github.com/humanode-network/substrate?branch=master#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" dependencies = [ "parity-scale-codec", - "sp-api 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-api", ] [[package]] @@ -2403,6 +2302,7 @@ dependencies = [ "indoc", "ngrok-api", "pallet-bioauth", + "pallet-evm", "parity-scale-codec", "qr2term", "reqwest", @@ -2424,13 +2324,14 @@ dependencies = [ "sc-utils", "serde", "serde_json", - "sp-application-crypto 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-application-crypto", "sp-consensus", "sp-consensus-aura", + "sp-core", "sp-finality-grandpa", - "sp-keystore 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-timestamp 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-keystore", + "sp-runtime", + "sp-timestamp", "structopt", "thiserror", "tokio", @@ -2450,7 +2351,7 @@ dependencies = [ "robonode-client", "sc-rpc-api", "sc-transaction-pool-api", - "sp-api 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-api", "sp-block-builder", "sp-blockchain", "substrate-frame-rpc-system", @@ -2463,22 +2364,29 @@ dependencies = [ "bioauth-consensus-api", "bioauth-flow-api", "chrono", - "frame-benchmarking 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "fp-rpc", + "fp-self-contained", + "frame-benchmarking", "frame-executive", - "frame-support 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "frame-system 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "frame-support", + "frame-system", "frame-system-benchmarking", "frame-system-rpc-runtime-api", "hex-literal", "pallet-aura", - "pallet-balances 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "pallet-balances", + "pallet-base-fee", "pallet-bioauth", + "pallet-dynamic-fee", "pallet-ethereum", "pallet-evm", + "pallet-evm-precompile-modexp", + "pallet-evm-precompile-sha3fips", + "pallet-evm-precompile-simple", "pallet-grandpa", "pallet-randomness-collective-flip", "pallet-sudo", - "pallet-timestamp 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "pallet-timestamp", "pallet-transaction-payment", "pallet-transaction-payment-rpc-runtime-api", "parity-scale-codec", @@ -2486,17 +2394,17 @@ dependencies = [ "robonode-crypto", "scale-info", "serde", - "sp-api 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-api", "sp-block-builder", "sp-consensus-aura", - "sp-core 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-inherents 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-core", + "sp-inherents", "sp-offchain", - "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-runtime", "sp-session", - "sp-std 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-std", "sp-transaction-pool", - "sp-version 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-version", "substrate-wasm-builder", ] @@ -4070,12 +3978,12 @@ name = "node-primitives" version = "2.0.0" source = "git+https://github.com/humanode-network/substrate?branch=master#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" dependencies = [ - "frame-system 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "frame-system", "parity-scale-codec", "scale-info", - "sp-application-crypto 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-core 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-application-crypto", + "sp-core", + "sp-runtime", ] [[package]] @@ -4128,6 +4036,20 @@ dependencies = [ "winapi 0.3.9", ] +[[package]] +name = "num" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43db66d1170d347f9a065114077f7dccb00c1b9478c89384490a3425279a4606" +dependencies = [ + "num-bigint 0.4.3", + "num-complex", + "num-integer", + "num-iter", + "num-rational 0.4.0", + "num-traits", +] + [[package]] name = "num-bigint" version = "0.2.6" @@ -4139,6 +4061,17 @@ dependencies = [ "num-traits", ] +[[package]] +name = "num-bigint" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f93ab6289c7b344a8a9f60f88d80aa20032336fe78da341afc91c8a2341fc75f" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + [[package]] name = "num-complex" version = "0.4.0" @@ -4158,6 +4091,17 @@ dependencies = [ "num-traits", ] +[[package]] +name = "num-iter" +version = "0.1.42" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2021c8337a54d21aca0d59a92577a029af9431cb59b909b03252b9c164fad59" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + [[package]] name = "num-rational" version = "0.2.4" @@ -4165,7 +4109,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5c000134b5dbf44adc5cb772486d335293351644b801551abe8f75c84cfa4aef" dependencies = [ "autocfg", - "num-bigint", + "num-bigint 0.2.6", "num-integer", "num-traits", ] @@ -4177,6 +4121,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d41702bd167c2df5520b384281bc111a4b5efcf7fbc4c9c222c815b07e0a6a6a" dependencies = [ "autocfg", + "num-bigint 0.4.3", "num-integer", "num-traits", ] @@ -4298,15 +4243,15 @@ name = "pallet-aura" version = "4.0.0-dev" source = "git+https://github.com/humanode-network/substrate?branch=master#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" dependencies = [ - "frame-support 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "frame-system 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "pallet-timestamp 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "frame-support", + "frame-system", + "pallet-timestamp", "parity-scale-codec", "scale-info", - "sp-application-crypto 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-application-crypto", "sp-consensus-aura", - "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-std 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-runtime", + "sp-std", ] [[package]] @@ -4314,14 +4259,14 @@ name = "pallet-authorship" version = "4.0.0-dev" source = "git+https://github.com/humanode-network/substrate?branch=master#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" dependencies = [ - "frame-support 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "frame-system 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "frame-support", + "frame-system", "impl-trait-for-tuples", "parity-scale-codec", "scale-info", "sp-authorship", - "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-std 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-runtime", + "sp-std", ] [[package]] @@ -4329,47 +4274,65 @@ name = "pallet-balances" version = "4.0.0-dev" source = "git+https://github.com/humanode-network/substrate?branch=master#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" dependencies = [ - "frame-benchmarking 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "frame-support 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "frame-system 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "frame-benchmarking", + "frame-support", + "frame-system", "log", "parity-scale-codec", "scale-info", - "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-std 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-runtime", + "sp-std", ] [[package]] -name = "pallet-balances" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?rev=1a30fa2#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" +name = "pallet-base-fee" +version = "1.0.0" +source = "git+https://github.com/humanode-network/frontier?branch=substrate-1a30fa2#26bf32c18044785756eba89478c24b2bf730f719" dependencies = [ - "frame-benchmarking 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", - "frame-support 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", - "frame-system 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", - "log", + "frame-support", + "frame-system", + "pallet-evm", "parity-scale-codec", "scale-info", - "sp-runtime 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", - "sp-std 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "serde", + "sp-core", + "sp-runtime", ] [[package]] name = "pallet-bioauth" version = "0.1.0" dependencies = [ - "frame-benchmarking 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "frame-support 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "frame-system 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "frame-benchmarking", + "frame-support", + "frame-system", "mockall", "parity-scale-codec", "scale-info", "serde", - "sp-api 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-core 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-io 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-std 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-api", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "pallet-dynamic-fee" +version = "4.0.0-dev" +source = "git+https://github.com/humanode-network/frontier?branch=substrate-1a30fa2#26bf32c18044785756eba89478c24b2bf730f719" +dependencies = [ + "async-trait", + "frame-support", + "frame-system", + "pallet-evm", + "parity-scale-codec", + "scale-info", + "serde", + "sp-core", + "sp-inherents", + "sp-runtime", + "sp-std", ] [[package]] @@ -4385,20 +4348,20 @@ dependencies = [ "fp-rpc", "fp-self-contained", "fp-storage", - "frame-support 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", - "frame-system 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", - "pallet-balances 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "frame-support", + "frame-system", + "pallet-balances", "pallet-evm", - "pallet-timestamp 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "pallet-timestamp", "parity-scale-codec", "rlp", "rustc-hex", "scale-info", "serde", "sha3 0.8.2", - "sp-io 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", - "sp-runtime 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", - "sp-std 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-io", + "sp-runtime", + "sp-std", ] [[package]] @@ -4410,23 +4373,56 @@ dependencies = [ "evm-gasometer", "evm-runtime", "fp-evm", - "frame-benchmarking 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", - "frame-support 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", - "frame-system 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "frame-benchmarking", + "frame-support", + "frame-system", "hex", "log", - "pallet-balances 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", - "pallet-timestamp 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "pallet-balances", + "pallet-timestamp", "parity-scale-codec", "primitive-types", "rlp", "scale-info", "serde", "sha3 0.8.2", - "sp-core 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", - "sp-io 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", - "sp-runtime 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", - "sp-std 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "pallet-evm-precompile-modexp" +version = "2.0.0-dev" +source = "git+https://github.com/humanode-network/frontier?branch=substrate-1a30fa2#26bf32c18044785756eba89478c24b2bf730f719" +dependencies = [ + "fp-evm", + "num", + "sp-core", + "sp-io", +] + +[[package]] +name = "pallet-evm-precompile-sha3fips" +version = "2.0.0-dev" +source = "git+https://github.com/humanode-network/frontier?branch=substrate-1a30fa2#26bf32c18044785756eba89478c24b2bf730f719" +dependencies = [ + "fp-evm", + "sp-core", + "sp-io", + "tiny-keccak", +] + +[[package]] +name = "pallet-evm-precompile-simple" +version = "2.0.0-dev" +source = "git+https://github.com/humanode-network/frontier?branch=substrate-1a30fa2#26bf32c18044785756eba89478c24b2bf730f719" +dependencies = [ + "fp-evm", + "ripemd160", + "sp-core", + "sp-io", ] [[package]] @@ -4434,22 +4430,22 @@ name = "pallet-grandpa" version = "4.0.0-dev" source = "git+https://github.com/humanode-network/substrate?branch=master#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" dependencies = [ - "frame-benchmarking 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "frame-support 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "frame-system 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "frame-benchmarking", + "frame-support", + "frame-system", "log", "pallet-authorship", "pallet-session", "parity-scale-codec", "scale-info", - "sp-application-crypto 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-core 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-application-crypto", + "sp-core", "sp-finality-grandpa", - "sp-io 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-io", + "sp-runtime", "sp-session", - "sp-staking 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-std 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-staking", + "sp-std", ] [[package]] @@ -4457,13 +4453,13 @@ name = "pallet-randomness-collective-flip" version = "4.0.0-dev" source = "git+https://github.com/humanode-network/substrate?branch=master#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" dependencies = [ - "frame-support 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "frame-system 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "frame-support", + "frame-system", "parity-scale-codec", "safe-mix", "scale-info", - "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-std 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-runtime", + "sp-std", ] [[package]] @@ -4471,20 +4467,20 @@ name = "pallet-session" version = "4.0.0-dev" source = "git+https://github.com/humanode-network/substrate?branch=master#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" dependencies = [ - "frame-support 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "frame-system 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "frame-support", + "frame-system", "impl-trait-for-tuples", "log", - "pallet-timestamp 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "pallet-timestamp", "parity-scale-codec", "scale-info", - "sp-core 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-io 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-core", + "sp-io", + "sp-runtime", "sp-session", - "sp-staking 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-std 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-trie 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-staking", + "sp-std", + "sp-trie", ] [[package]] @@ -4492,13 +4488,13 @@ name = "pallet-sudo" version = "4.0.0-dev" source = "git+https://github.com/humanode-network/substrate?branch=master#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" dependencies = [ - "frame-support 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "frame-system 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "frame-support", + "frame-system", "parity-scale-codec", "scale-info", - "sp-io 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-std 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-io", + "sp-runtime", + "sp-std", ] [[package]] @@ -4506,33 +4502,16 @@ name = "pallet-timestamp" version = "4.0.0-dev" source = "git+https://github.com/humanode-network/substrate?branch=master#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" dependencies = [ - "frame-benchmarking 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "frame-support 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "frame-system 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "log", - "parity-scale-codec", - "scale-info", - "sp-inherents 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-std 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-timestamp 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", -] - -[[package]] -name = "pallet-timestamp" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?rev=1a30fa2#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" -dependencies = [ - "frame-benchmarking 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", - "frame-support 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", - "frame-system 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "frame-benchmarking", + "frame-support", + "frame-system", "log", "parity-scale-codec", "scale-info", - "sp-inherents 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", - "sp-runtime 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", - "sp-std 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", - "sp-timestamp 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-inherents", + "sp-runtime", + "sp-std", + "sp-timestamp", ] [[package]] @@ -4540,16 +4519,16 @@ name = "pallet-transaction-payment" version = "4.0.0-dev" source = "git+https://github.com/humanode-network/substrate?branch=master#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" dependencies = [ - "frame-support 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "frame-system 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "frame-support", + "frame-system", "parity-scale-codec", "scale-info", "serde", "smallvec", - "sp-core 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-io 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-std 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", ] [[package]] @@ -4562,11 +4541,11 @@ dependencies = [ "jsonrpc-derive", "pallet-transaction-payment-rpc-runtime-api", "parity-scale-codec", - "sp-api 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-api", "sp-blockchain", - "sp-core 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-core", "sp-rpc", - "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-runtime", ] [[package]] @@ -4576,8 +4555,8 @@ source = "git+https://github.com/humanode-network/substrate?branch=master#1a30fa dependencies = [ "pallet-transaction-payment", "parity-scale-codec", - "sp-api 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-api", + "sp-runtime", ] [[package]] @@ -4989,7 +4968,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-std 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-std", ] [[package]] @@ -5453,6 +5432,17 @@ dependencies = [ "winapi 0.3.9", ] +[[package]] +name = "ripemd160" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2eca4ecc81b7f313189bf73ce724400a07da2a6dac19588b03c8bd76a2dcc251" +dependencies = [ + "block-buffer 0.9.0", + "digest 0.9.0", + "opaque-debug 0.3.0", +] + [[package]] name = "rlp" version = "0.5.1" @@ -5520,7 +5510,7 @@ dependencies = [ "sc-tracing", "serde", "serde_json", - "sp-core 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-core", "tokio", "tracing", "tracing-test", @@ -5665,8 +5655,8 @@ version = "4.1.0-dev" source = "git+https://github.com/humanode-network/substrate?branch=master#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" dependencies = [ "log", - "sp-core 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-wasm-interface 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-core", + "sp-wasm-interface", "thiserror", ] @@ -5684,12 +5674,12 @@ dependencies = [ "sc-proposer-metrics", "sc-telemetry", "sc-transaction-pool-api", - "sp-api 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-api", "sp-blockchain", "sp-consensus", - "sp-core 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-inherents 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-core", + "sp-inherents", + "sp-runtime", "substrate-prometheus-endpoint", ] @@ -5700,13 +5690,13 @@ source = "git+https://github.com/humanode-network/substrate?branch=master#1a30fa dependencies = [ "parity-scale-codec", "sc-client-api", - "sp-api 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-api", "sp-block-builder", "sp-blockchain", - "sp-core 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-inherents 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-state-machine 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-core", + "sp-inherents", + "sp-runtime", + "sp-state-machine", ] [[package]] @@ -5722,8 +5712,8 @@ dependencies = [ "sc-telemetry", "serde", "serde_json", - "sp-core 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-core", + "sp-runtime", ] [[package]] @@ -5763,12 +5753,12 @@ dependencies = [ "serde", "serde_json", "sp-blockchain", - "sp-core 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-core", "sp-keyring", - "sp-keystore 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-panic-handler 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-version 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-keystore", + "sp-panic-handler", + "sp-runtime", + "sp-version", "structopt", "thiserror", "tiny-bip39", @@ -5789,17 +5779,17 @@ dependencies = [ "sc-executor", "sc-transaction-pool-api", "sc-utils", - "sp-api 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-api", "sp-blockchain", "sp-consensus", - "sp-core 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-core", "sp-database", - "sp-externalities 0.10.0 (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-keystore 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-state-machine 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-storage 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-trie 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-externalities", + "sp-keystore", + "sp-runtime", + "sp-state-machine", + "sp-storage", + "sp-trie", "substrate-prometheus-endpoint", ] @@ -5819,13 +5809,13 @@ dependencies = [ "parking_lot", "sc-client-api", "sc-state-db", - "sp-arithmetic 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-arithmetic", "sp-blockchain", - "sp-core 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-core", "sp-database", - "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-state-machine 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-trie 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-runtime", + "sp-state-machine", + "sp-trie", ] [[package]] @@ -5842,12 +5832,12 @@ dependencies = [ "sc-client-api", "sc-utils", "serde", - "sp-api 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-api", "sp-blockchain", "sp-consensus", - "sp-core 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-state-machine 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-core", + "sp-runtime", + "sp-state-machine", "substrate-prometheus-endpoint", "thiserror", ] @@ -5867,17 +5857,17 @@ dependencies = [ "sc-consensus", "sc-consensus-slots", "sc-telemetry", - "sp-api 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-application-crypto 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-api", + "sp-application-crypto", "sp-block-builder", "sp-blockchain", "sp-consensus", "sp-consensus-aura", "sp-consensus-slots", - "sp-core 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-inherents 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-keystore 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-core", + "sp-inherents", + "sp-keystore", + "sp-runtime", "substrate-prometheus-endpoint", ] @@ -5894,16 +5884,16 @@ dependencies = [ "sc-client-api", "sc-consensus", "sc-telemetry", - "sp-api 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-arithmetic 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-api", + "sp-arithmetic", "sp-blockchain", "sp-consensus", "sp-consensus-slots", - "sp-core 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-inherents 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-state-machine 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-timestamp 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-core", + "sp-inherents", + "sp-runtime", + "sp-state-machine", + "sp-timestamp", "thiserror", ] @@ -5919,17 +5909,17 @@ dependencies = [ "parking_lot", "sc-executor-common", "sc-executor-wasmi", - "sp-api 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-core 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-core-hashing-proc-macro 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-externalities 0.10.0 (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-io 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-panic-handler 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-runtime-interface 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-api", + "sp-core", + "sp-core-hashing-proc-macro", + "sp-externalities", + "sp-io", + "sp-panic-handler", + "sp-runtime-interface", "sp-tasks", - "sp-trie 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-version 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-wasm-interface 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-trie", + "sp-version", + "sp-wasm-interface", "wasmi", ] @@ -5943,10 +5933,10 @@ dependencies = [ "parity-scale-codec", "pwasm-utils", "sc-allocator", - "sp-core 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-core", "sp-maybe-compressed-blob", "sp-serializer", - "sp-wasm-interface 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-wasm-interface", "thiserror", "wasmi", ] @@ -5961,9 +5951,9 @@ dependencies = [ "sc-allocator", "sc-executor-common", "scoped-tls", - "sp-core 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-runtime-interface 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-wasm-interface 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-core", + "sp-runtime-interface", + "sp-wasm-interface", "wasmi", ] @@ -5992,15 +5982,15 @@ dependencies = [ "sc-telemetry", "sc-utils", "serde_json", - "sp-api 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-application-crypto 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-arithmetic 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-api", + "sp-application-crypto", + "sp-arithmetic", "sp-blockchain", "sp-consensus", - "sp-core 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-core", "sp-finality-grandpa", - "sp-keystore 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-keystore", + "sp-runtime", "substrate-prometheus-endpoint", ] @@ -6018,7 +6008,7 @@ dependencies = [ "sc-network", "sc-transaction-pool-api", "sp-blockchain", - "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-runtime", ] [[package]] @@ -6031,9 +6021,9 @@ dependencies = [ "hex", "parking_lot", "serde_json", - "sp-application-crypto 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-core 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-keystore 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-application-crypto", + "sp-core", + "sp-keystore", ] [[package]] @@ -6074,12 +6064,12 @@ dependencies = [ "serde", "serde_json", "smallvec", - "sp-arithmetic 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-arithmetic", "sp-blockchain", "sp-consensus", - "sp-core 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-core", "sp-finality-grandpa", - "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-runtime", "substrate-prometheus-endpoint", "thiserror", "unsigned-varint 0.6.0", @@ -6098,7 +6088,7 @@ dependencies = [ "log", "lru 0.7.0", "sc-network", - "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-runtime", "substrate-prometheus-endpoint", "tracing", ] @@ -6123,10 +6113,10 @@ dependencies = [ "sc-client-api", "sc-network", "sc-utils", - "sp-api 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-core 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-api", + "sp-core", "sp-offchain", - "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-runtime", "threadpool", "tracing", ] @@ -6173,15 +6163,15 @@ dependencies = [ "sc-transaction-pool-api", "sc-utils", "serde_json", - "sp-api 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-api", "sp-blockchain", - "sp-core 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-keystore 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-core", + "sp-keystore", "sp-offchain", "sp-rpc", - "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-runtime", "sp-session", - "sp-version 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-version", ] [[package]] @@ -6201,11 +6191,11 @@ dependencies = [ "sc-transaction-pool-api", "serde", "serde_json", - "sp-core 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-core", "sp-rpc", - "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-tracing 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-version 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-runtime", + "sp-tracing", + "sp-version", "thiserror", ] @@ -6264,24 +6254,24 @@ dependencies = [ "sc-utils", "serde", "serde_json", - "sp-api 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-application-crypto 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-api", + "sp-application-crypto", "sp-block-builder", "sp-blockchain", "sp-consensus", - "sp-core 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-externalities 0.10.0 (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-inherents 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-keystore 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-core", + "sp-externalities", + "sp-inherents", + "sp-keystore", + "sp-runtime", "sp-session", - "sp-state-machine 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-storage 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-tracing 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-state-machine", + "sp-storage", + "sp-tracing", "sp-transaction-pool", "sp-transaction-storage-proof", - "sp-trie 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-version 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-trie", + "sp-version", "substrate-prometheus-endpoint", "tempfile", "thiserror", @@ -6301,7 +6291,7 @@ dependencies = [ "parity-util-mem-derive", "parking_lot", "sc-client-api", - "sp-core 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-core", ] [[package]] @@ -6341,12 +6331,12 @@ dependencies = [ "sc-rpc-server", "sc-tracing-proc-macro", "serde", - "sp-api 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-api", "sp-blockchain", - "sp-core 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-core", "sp-rpc", - "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-tracing 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-runtime", + "sp-tracing", "thiserror", "tracing", "tracing-log", @@ -6381,11 +6371,11 @@ dependencies = [ "sc-transaction-pool-api", "sc-utils", "serde", - "sp-api 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-api", "sp-blockchain", - "sp-core 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-tracing 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-core", + "sp-runtime", + "sp-tracing", "sp-transaction-pool", "substrate-prometheus-endpoint", "thiserror", @@ -6401,7 +6391,7 @@ dependencies = [ "log", "serde", "sp-blockchain", - "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-runtime", "thiserror", ] @@ -6848,29 +6838,12 @@ dependencies = [ "hash-db", "log", "parity-scale-codec", - "sp-api-proc-macro 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-core 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-state-machine 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-std 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-version 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "thiserror", -] - -[[package]] -name = "sp-api" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?rev=1a30fa2#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" -dependencies = [ - "hash-db", - "log", - "parity-scale-codec", - "sp-api-proc-macro 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", - "sp-core 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", - "sp-runtime 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", - "sp-state-machine 0.10.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", - "sp-std 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", - "sp-version 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-api-proc-macro", + "sp-core", + "sp-runtime", + "sp-state-machine", + "sp-std", + "sp-version", "thiserror", ] @@ -6886,18 +6859,6 @@ dependencies = [ "syn", ] -[[package]] -name = "sp-api-proc-macro" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?rev=1a30fa2#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" -dependencies = [ - "blake2-rfc", - "proc-macro-crate 1.1.0", - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "sp-application-crypto" version = "4.0.0-dev" @@ -6906,22 +6867,9 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-core 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-io 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-std 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", -] - -[[package]] -name = "sp-application-crypto" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?rev=1a30fa2#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" -dependencies = [ - "parity-scale-codec", - "scale-info", - "serde", - "sp-core 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", - "sp-io 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", - "sp-std 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-core", + "sp-io", + "sp-std", ] [[package]] @@ -6934,23 +6882,8 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-debug-derive 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-std 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", - "static_assertions", -] - -[[package]] -name = "sp-arithmetic" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?rev=1a30fa2#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" -dependencies = [ - "integer-sqrt", - "num-traits", - "parity-scale-codec", - "scale-info", - "serde", - "sp-debug-derive 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", - "sp-std 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-debug-derive", + "sp-std", "static_assertions", ] @@ -6961,9 +6894,9 @@ source = "git+https://github.com/humanode-network/substrate?branch=master#1a30fa dependencies = [ "async-trait", "parity-scale-codec", - "sp-inherents 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-std 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-inherents", + "sp-runtime", + "sp-std", ] [[package]] @@ -6972,10 +6905,10 @@ version = "4.0.0-dev" source = "git+https://github.com/humanode-network/substrate?branch=master#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" dependencies = [ "parity-scale-codec", - "sp-api 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-inherents 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-std 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-api", + "sp-inherents", + "sp-runtime", + "sp-std", ] [[package]] @@ -6988,11 +6921,11 @@ dependencies = [ "lru 0.7.0", "parity-scale-codec", "parking_lot", - "sp-api 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-api", "sp-consensus", "sp-database", - "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-state-machine 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-runtime", + "sp-state-machine", "thiserror", ] @@ -7006,12 +6939,12 @@ dependencies = [ "futures-timer 3.0.2", "log", "parity-scale-codec", - "sp-core 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-inherents 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-state-machine 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-std 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-version 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-core", + "sp-inherents", + "sp-runtime", + "sp-state-machine", + "sp-std", + "sp-version", "thiserror", ] @@ -7023,14 +6956,14 @@ dependencies = [ "async-trait", "parity-scale-codec", "scale-info", - "sp-api 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-application-crypto 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-api", + "sp-application-crypto", "sp-consensus", "sp-consensus-slots", - "sp-inherents 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-std 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-timestamp 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-inherents", + "sp-runtime", + "sp-std", + "sp-timestamp", ] [[package]] @@ -7041,8 +6974,8 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-arithmetic 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-arithmetic", + "sp-runtime", ] [[package]] @@ -7077,60 +7010,12 @@ dependencies = [ "secrecy", "serde", "sha2 0.9.8", - "sp-core-hashing 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-debug-derive 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-externalities 0.10.0 (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-runtime-interface 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-std 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-storage 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", - "ss58-registry", - "substrate-bip39", - "thiserror", - "tiny-bip39", - "tiny-keccak", - "twox-hash", - "wasmi", - "zeroize", -] - -[[package]] -name = "sp-core" -version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?rev=1a30fa2#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" -dependencies = [ - "base58", - "bitflags", - "blake2-rfc", - "byteorder", - "dyn-clonable", - "ed25519-dalek", - "futures 0.3.17", - "hash-db", - "hash256-std-hasher", - "hex", - "impl-serde", - "lazy_static", - "libsecp256k1", - "log", - "merlin", - "num-traits", - "parity-scale-codec", - "parity-util-mem", - "parking_lot", - "primitive-types", - "rand 0.7.3", - "regex", - "scale-info", - "schnorrkel", - "secrecy", - "serde", - "sha2 0.9.8", - "sp-core-hashing 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", - "sp-debug-derive 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", - "sp-externalities 0.10.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", - "sp-runtime-interface 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", - "sp-std 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", - "sp-storage 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-core-hashing", + "sp-debug-derive", + "sp-externalities", + "sp-runtime-interface", + "sp-std", + "sp-storage", "ss58-registry", "substrate-bip39", "thiserror", @@ -7149,20 +7034,7 @@ dependencies = [ "blake2-rfc", "byteorder", "sha2 0.9.8", - "sp-std 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", - "tiny-keccak", - "twox-hash", -] - -[[package]] -name = "sp-core-hashing" -version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?rev=1a30fa2#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" -dependencies = [ - "blake2-rfc", - "byteorder", - "sha2 0.9.8", - "sp-std 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-std", "tiny-keccak", "twox-hash", ] @@ -7174,18 +7046,7 @@ source = "git+https://github.com/humanode-network/substrate?branch=master#1a30fa dependencies = [ "proc-macro2", "quote", - "sp-core-hashing 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", - "syn", -] - -[[package]] -name = "sp-core-hashing-proc-macro" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?rev=1a30fa2#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" -dependencies = [ - "proc-macro2", - "quote", - "sp-core-hashing 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-core-hashing", "syn", ] @@ -7208,16 +7069,6 @@ dependencies = [ "syn", ] -[[package]] -name = "sp-debug-derive" -version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?rev=1a30fa2#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "sp-externalities" version = "0.10.0" @@ -7225,19 +7076,8 @@ source = "git+https://github.com/humanode-network/substrate?branch=master#1a30fa dependencies = [ "environmental", "parity-scale-codec", - "sp-std 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-storage 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", -] - -[[package]] -name = "sp-externalities" -version = "0.10.0" -source = "git+https://github.com/paritytech/substrate?rev=1a30fa2#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" -dependencies = [ - "environmental", - "parity-scale-codec", - "sp-std 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", - "sp-storage 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-std", + "sp-storage", ] [[package]] @@ -7250,12 +7090,12 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-api 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-application-crypto 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-core 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-keystore 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-std 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-api", + "sp-application-crypto", + "sp-core", + "sp-keystore", + "sp-runtime", + "sp-std", ] [[package]] @@ -7266,23 +7106,9 @@ dependencies = [ "async-trait", "impl-trait-for-tuples", "parity-scale-codec", - "sp-core 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-std 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", - "thiserror", -] - -[[package]] -name = "sp-inherents" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?rev=1a30fa2#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" -dependencies = [ - "async-trait", - "impl-trait-for-tuples", - "parity-scale-codec", - "sp-core 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", - "sp-runtime 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", - "sp-std 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-core", + "sp-runtime", + "sp-std", "thiserror", ] @@ -7297,39 +7123,15 @@ dependencies = [ "log", "parity-scale-codec", "parking_lot", - "sp-core 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-externalities 0.10.0 (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-keystore 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-runtime-interface 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-state-machine 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-std 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-tracing 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-trie 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-wasm-interface 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", - "tracing", - "tracing-core", -] - -[[package]] -name = "sp-io" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?rev=1a30fa2#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" -dependencies = [ - "futures 0.3.17", - "hash-db", - "libsecp256k1", - "log", - "parity-scale-codec", - "parking_lot", - "sp-core 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", - "sp-externalities 0.10.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", - "sp-keystore 0.10.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", - "sp-runtime-interface 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", - "sp-state-machine 0.10.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", - "sp-std 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", - "sp-tracing 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", - "sp-trie 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", - "sp-wasm-interface 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-core", + "sp-externalities", + "sp-keystore", + "sp-runtime-interface", + "sp-state-machine", + "sp-std", + "sp-tracing", + "sp-trie", + "sp-wasm-interface", "tracing", "tracing-core", ] @@ -7340,8 +7142,8 @@ version = "4.0.0-dev" source = "git+https://github.com/humanode-network/substrate?branch=master#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" dependencies = [ "lazy_static", - "sp-core 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-core", + "sp-runtime", "strum", ] @@ -7358,24 +7160,8 @@ dependencies = [ "parking_lot", "schnorrkel", "serde", - "sp-core 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-externalities 0.10.0 (git+https://github.com/humanode-network/substrate?branch=master)", -] - -[[package]] -name = "sp-keystore" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?rev=1a30fa2#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" -dependencies = [ - "async-trait", - "derive_more", - "futures 0.3.17", - "merlin", - "parity-scale-codec", - "parking_lot", - "schnorrkel", - "sp-core 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", - "sp-externalities 0.10.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-core", + "sp-externalities", ] [[package]] @@ -7391,9 +7177,9 @@ name = "sp-offchain" version = "4.0.0-dev" source = "git+https://github.com/humanode-network/substrate?branch=master#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" dependencies = [ - "sp-api 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-core 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-api", + "sp-core", + "sp-runtime", ] [[package]] @@ -7406,16 +7192,6 @@ dependencies = [ "regex", ] -[[package]] -name = "sp-panic-handler" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?rev=1a30fa2#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" -dependencies = [ - "backtrace", - "lazy_static", - "regex", -] - [[package]] name = "sp-rpc" version = "4.0.0-dev" @@ -7423,7 +7199,7 @@ source = "git+https://github.com/humanode-network/substrate?branch=master#1a30fa dependencies = [ "rustc-hash", "serde", - "sp-core 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-core", ] [[package]] @@ -7441,33 +7217,11 @@ dependencies = [ "rand 0.7.3", "scale-info", "serde", - "sp-application-crypto 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-arithmetic 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-core 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-io 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-std 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", -] - -[[package]] -name = "sp-runtime" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?rev=1a30fa2#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" -dependencies = [ - "either", - "hash256-std-hasher", - "impl-trait-for-tuples", - "log", - "parity-scale-codec", - "parity-util-mem", - "paste", - "rand 0.7.3", - "scale-info", - "serde", - "sp-application-crypto 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", - "sp-arithmetic 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", - "sp-core 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", - "sp-io 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", - "sp-std 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-application-crypto", + "sp-arithmetic", + "sp-core", + "sp-io", + "sp-std", ] [[package]] @@ -7478,29 +7232,12 @@ dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", "primitive-types", - "sp-externalities 0.10.0 (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-runtime-interface-proc-macro 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-std 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-storage 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-tracing 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-wasm-interface 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", - "static_assertions", -] - -[[package]] -name = "sp-runtime-interface" -version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?rev=1a30fa2#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" -dependencies = [ - "impl-trait-for-tuples", - "parity-scale-codec", - "primitive-types", - "sp-externalities 0.10.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", - "sp-runtime-interface-proc-macro 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", - "sp-std 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", - "sp-storage 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", - "sp-tracing 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", - "sp-wasm-interface 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-externalities", + "sp-runtime-interface-proc-macro", + "sp-std", + "sp-storage", + "sp-tracing", + "sp-wasm-interface", "static_assertions", ] @@ -7516,18 +7253,6 @@ dependencies = [ "syn", ] -[[package]] -name = "sp-runtime-interface-proc-macro" -version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?rev=1a30fa2#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" -dependencies = [ - "Inflector", - "proc-macro-crate 1.1.0", - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "sp-serializer" version = "4.0.0-dev" @@ -7544,11 +7269,11 @@ source = "git+https://github.com/humanode-network/substrate?branch=master#1a30fa dependencies = [ "parity-scale-codec", "scale-info", - "sp-api 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-core 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-staking 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-std 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-api", + "sp-core", + "sp-runtime", + "sp-staking", + "sp-std", ] [[package]] @@ -7558,19 +7283,8 @@ source = "git+https://github.com/humanode-network/substrate?branch=master#1a30fa dependencies = [ "parity-scale-codec", "scale-info", - "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-std 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", -] - -[[package]] -name = "sp-staking" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?rev=1a30fa2#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" -dependencies = [ - "parity-scale-codec", - "scale-info", - "sp-runtime 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", - "sp-std 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-runtime", + "sp-std", ] [[package]] @@ -7585,34 +7299,11 @@ dependencies = [ "parking_lot", "rand 0.7.3", "smallvec", - "sp-core 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-externalities 0.10.0 (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-panic-handler 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-std 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-trie 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "thiserror", - "tracing", - "trie-db", - "trie-root", -] - -[[package]] -name = "sp-state-machine" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?rev=1a30fa2#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" -dependencies = [ - "hash-db", - "log", - "num-traits", - "parity-scale-codec", - "parking_lot", - "rand 0.7.3", - "smallvec", - "sp-core 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", - "sp-externalities 0.10.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", - "sp-panic-handler 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", - "sp-std 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", - "sp-trie 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-core", + "sp-externalities", + "sp-panic-handler", + "sp-std", + "sp-trie", "thiserror", "tracing", "trie-db", @@ -7624,11 +7315,6 @@ name = "sp-std" version = "4.0.0" source = "git+https://github.com/humanode-network/substrate?branch=master#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" -[[package]] -name = "sp-std" -version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?rev=1a30fa2#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" - [[package]] name = "sp-storage" version = "4.0.0" @@ -7638,21 +7324,8 @@ dependencies = [ "parity-scale-codec", "ref-cast", "serde", - "sp-debug-derive 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-std 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", -] - -[[package]] -name = "sp-storage" -version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?rev=1a30fa2#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" -dependencies = [ - "impl-serde", - "parity-scale-codec", - "ref-cast", - "serde", - "sp-debug-derive 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", - "sp-std 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-debug-derive", + "sp-std", ] [[package]] @@ -7661,11 +7334,11 @@ version = "4.0.0-dev" source = "git+https://github.com/humanode-network/substrate?branch=master#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" dependencies = [ "log", - "sp-core 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-externalities 0.10.0 (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-io 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-runtime-interface 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-std 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-core", + "sp-externalities", + "sp-io", + "sp-runtime-interface", + "sp-std", ] [[package]] @@ -7677,26 +7350,10 @@ dependencies = [ "futures-timer 3.0.2", "log", "parity-scale-codec", - "sp-api 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-inherents 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-std 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", - "thiserror", -] - -[[package]] -name = "sp-timestamp" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?rev=1a30fa2#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" -dependencies = [ - "async-trait", - "futures-timer 3.0.2", - "log", - "parity-scale-codec", - "sp-api 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", - "sp-inherents 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", - "sp-runtime 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", - "sp-std 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-api", + "sp-inherents", + "sp-runtime", + "sp-std", "thiserror", ] @@ -7706,19 +7363,7 @@ version = "4.0.0" source = "git+https://github.com/humanode-network/substrate?branch=master#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" dependencies = [ "parity-scale-codec", - "sp-std 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", - "tracing", - "tracing-core", - "tracing-subscriber", -] - -[[package]] -name = "sp-tracing" -version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?rev=1a30fa2#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" -dependencies = [ - "parity-scale-codec", - "sp-std 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-std", "tracing", "tracing-core", "tracing-subscriber", @@ -7729,8 +7374,8 @@ name = "sp-transaction-pool" version = "4.0.0-dev" source = "git+https://github.com/humanode-network/substrate?branch=master#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" dependencies = [ - "sp-api 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-api", + "sp-runtime", ] [[package]] @@ -7742,11 +7387,11 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-core 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-inherents 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-std 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-trie 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-core", + "sp-inherents", + "sp-runtime", + "sp-std", + "sp-trie", ] [[package]] @@ -7758,23 +7403,8 @@ dependencies = [ "memory-db", "parity-scale-codec", "scale-info", - "sp-core 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-std 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", - "trie-db", - "trie-root", -] - -[[package]] -name = "sp-trie" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?rev=1a30fa2#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" -dependencies = [ - "hash-db", - "memory-db", - "parity-scale-codec", - "scale-info", - "sp-core 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", - "sp-std 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-core", + "sp-std", "trie-db", "trie-root", ] @@ -7789,25 +7419,9 @@ dependencies = [ "parity-wasm 0.42.2", "scale-info", "serde", - "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-std 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-version-proc-macro 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "thiserror", -] - -[[package]] -name = "sp-version" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?rev=1a30fa2#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" -dependencies = [ - "impl-serde", - "parity-scale-codec", - "parity-wasm 0.42.2", - "scale-info", - "serde", - "sp-runtime 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", - "sp-std 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", - "sp-version-proc-macro 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-runtime", + "sp-std", + "sp-version-proc-macro", "thiserror", ] @@ -7822,17 +7436,6 @@ dependencies = [ "syn", ] -[[package]] -name = "sp-version-proc-macro" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?rev=1a30fa2#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" -dependencies = [ - "parity-scale-codec", - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "sp-wasm-interface" version = "4.0.0" @@ -7840,18 +7443,7 @@ source = "git+https://github.com/humanode-network/substrate?branch=master#1a30fa dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", - "sp-std 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", - "wasmi", -] - -[[package]] -name = "sp-wasm-interface" -version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?rev=1a30fa2#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" -dependencies = [ - "impl-trait-for-tuples", - "parity-scale-codec", - "sp-std 4.0.0 (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-std", "wasmi", ] @@ -7979,11 +7571,11 @@ dependencies = [ "sc-client-api", "sc-rpc-api", "sc-transaction-pool-api", - "sp-api 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-api", "sp-block-builder", "sp-blockchain", - "sp-core 4.0.0 (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-runtime 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-core", + "sp-runtime", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index a848b85b4..dd1313521 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,3 +1,17 @@ [workspace] resolver = "2" members = ["crates/*"] + +[patch."https://github.com/paritytech/substrate"] + frame-benchmarking = { git = "https://github.com/humanode-network/substrate", branch = "master" } + frame-support = { git = "https://github.com/humanode-network/substrate", branch = "master" } + frame-system = { git = "https://github.com/humanode-network/substrate", branch = "master" } + pallet-balances = { git = "https://github.com/humanode-network/substrate", branch = "master" } + pallet-timestamp = { git = "https://github.com/humanode-network/substrate", branch = "master" } + sp-core = { git = "https://github.com/humanode-network/substrate", branch = "master" } + sp-io = { git = "https://github.com/humanode-network/substrate", branch = "master" } + sp-runtime = { git = "https://github.com/humanode-network/substrate", branch = "master" } + sp-std = { git = "https://github.com/humanode-network/substrate", branch = "master" } + sp-externalities = { git = "https://github.com/humanode-network/substrate", branch = "master" } + sp-inherents = { git = "https://github.com/humanode-network/substrate", branch = "master" } + sp-api = { git = "https://github.com/humanode-network/substrate", branch = "master" } diff --git a/crates/humanode-peer/Cargo.toml b/crates/humanode-peer/Cargo.toml index 3f8a21f8f..c4088ac0b 100644 --- a/crates/humanode-peer/Cargo.toml +++ b/crates/humanode-peer/Cargo.toml @@ -23,6 +23,7 @@ frame-benchmarking-cli = { git = "https://github.com/humanode-network/substrate" futures = "0.3" hex = "0.4.3" hex-literal = "0.3" +pallet-evm = { default-features = false, git = "https://github.com/humanode-network/frontier", branch = "substrate-1a30fa2" } qr2term = "0.2" reqwest = "0.11" sc-basic-authorship = { git = "https://github.com/humanode-network/substrate", branch = "master" } @@ -44,6 +45,7 @@ serde = { version = "1", features = ["derive"] } sp-application-crypto = { git = "https://github.com/humanode-network/substrate", branch = "master" } sp-consensus = { git = "https://github.com/humanode-network/substrate", branch = "master" } sp-consensus-aura = { git = "https://github.com/humanode-network/substrate", branch = "master" } +sp-core = { git = "https://github.com/humanode-network/substrate", branch = "master" } sp-finality-grandpa = { git = "https://github.com/humanode-network/substrate", branch = "master" } sp-keystore = { git = "https://github.com/humanode-network/substrate", branch = "master" } sp-runtime = { git = "https://github.com/humanode-network/substrate", branch = "master" } diff --git a/crates/humanode-peer/src/chain_spec.rs b/crates/humanode-peer/src/chain_spec.rs index 570e8efb1..24ff576e4 100644 --- a/crates/humanode-peer/src/chain_spec.rs +++ b/crates/humanode-peer/src/chain_spec.rs @@ -2,19 +2,22 @@ use hex_literal::hex; use humanode_runtime::{ - AccountId, AuraConfig, BalancesConfig, BioauthConfig, GenesisConfig, GrandpaConfig, - RobonodePublicKeyWrapper, Signature, SudoConfig, SystemConfig, UnixMilliseconds, WASM_BINARY, + AccountId, AuraConfig, BalancesConfig, BioauthConfig, EVMConfig, EthereumConfig, GenesisConfig, + GrandpaConfig, RobonodePublicKeyWrapper, Signature, SudoConfig, SystemConfig, UnixMilliseconds, + WASM_BINARY, }; use pallet_bioauth::{AuthTicketNonce, Authentication}; use sc_chain_spec_derive::{ChainSpecExtension, ChainSpecGroup}; use sc_service::ChainType; use serde::{Deserialize, Serialize}; use sp_consensus_aura::sr25519::AuthorityId as AuraId; +use sp_core::{H160, U256}; use sp_finality_grandpa::AuthorityId as GrandpaId; use sp_runtime::{ app_crypto::{sr25519, Pair, Public}, traits::{IdentifyAccount, Verify}, }; +use std::{collections::BTreeMap, str::FromStr}; /// The concrete chain spec type we're using for the humanode network. pub type ChainSpec = sc_service::GenericChainSpec; @@ -211,6 +214,43 @@ fn testnet_genesis( consumed_auth_ticket_nonces, active_authentications, }, + evm: EVMConfig { + accounts: { + let mut map = BTreeMap::new(); + map.insert( + // H160 address of Alice dev account + // Derived from SS58 (42 prefix) address + // SS58: 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY + // hex: 0xd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d + // Using the full hex key, truncating to the first 20 bytes (the first 40 hex chars) + H160::from_str("d43593c715fdd31c61141abd04a99fd6822c8558") + .expect("internal H160 is valid; qed"), + pallet_evm::GenesisAccount { + balance: U256::from_str("0xffffffffffffffffffffffffffffffff") + .expect("internal U256 is valid; qed"), + code: Default::default(), + nonce: Default::default(), + storage: Default::default(), + }, + ); + map.insert( + // H160 address of CI test runner account + H160::from_str("6be02d1d3665660d22ff9624b7be0551ee1ac91b") + .expect("internal H160 is valid; qed"), + pallet_evm::GenesisAccount { + balance: U256::from_str("0xffffffffffffffffffffffffffffffff") + .expect("internal U256 is valid; qed"), + code: Default::default(), + nonce: Default::default(), + storage: Default::default(), + }, + ); + map + }, + }, + ethereum: EthereumConfig {}, + dynamic_fee: Default::default(), + base_fee: Default::default(), } } diff --git a/crates/humanode-runtime/Cargo.toml b/crates/humanode-runtime/Cargo.toml index 0eec2f375..3fd8dcc00 100644 --- a/crates/humanode-runtime/Cargo.toml +++ b/crates/humanode-runtime/Cargo.toml @@ -51,6 +51,13 @@ sp-session = { default-features = false, git = "https://github.com/humanode-netw sp-std = { default-features = false, git = "https://github.com/humanode-network/substrate", branch = "master" } sp-transaction-pool = { default-features = false, git = "https://github.com/humanode-network/substrate", branch = "master" } sp-version = { default-features = false, git = "https://github.com/humanode-network/substrate", branch = "master" } +fp-rpc = { default-features = false, git = "https://github.com/humanode-network/frontier", branch = "substrate-1a30fa2" } +fp-self-contained = { default-features = false, git = "https://github.com/humanode-network/frontier", branch = "substrate-1a30fa2" } +pallet-dynamic-fee = { default-features = false, git = "https://github.com/humanode-network/frontier", branch = "substrate-1a30fa2" } +pallet-base-fee = { default-features = false, git = "https://github.com/humanode-network/frontier", branch = "substrate-1a30fa2" } +pallet-evm-precompile-simple = { default-features = false, git = "https://github.com/humanode-network/frontier", branch = "substrate-1a30fa2" } +pallet-evm-precompile-sha3fips = { default-features = false, git = "https://github.com/humanode-network/frontier", branch = "substrate-1a30fa2" } +pallet-evm-precompile-modexp = { default-features = false, git = "https://github.com/humanode-network/frontier", branch = "substrate-1a30fa2" } [features] default = ["std"] @@ -78,8 +85,12 @@ std = [ "pallet-aura/std", "pallet-bioauth/std", "pallet-balances/std", + "pallet-base-fee/std", "pallet-ethereum/std", "pallet-evm/std", + "pallet-evm-precompile-simple/std", + "pallet-evm-precompile-sha3fips/std", + "pallet-dynamic-fee/std", "pallet-grandpa/std", "pallet-randomness-collective-flip/std", "pallet-sudo/std", diff --git a/crates/humanode-runtime/src/frontier_precompiles.rs b/crates/humanode-runtime/src/frontier_precompiles.rs new file mode 100644 index 000000000..208e649f5 --- /dev/null +++ b/crates/humanode-runtime/src/frontier_precompiles.rs @@ -0,0 +1,69 @@ +use pallet_evm::{Context, Precompile, PrecompileResult, PrecompileSet}; +use sp_core::H160; +use sp_std::marker::PhantomData; + +use pallet_evm_precompile_modexp::Modexp; +use pallet_evm_precompile_sha3fips::Sha3FIPS256; +use pallet_evm_precompile_simple::{ECRecover, ECRecoverPublicKey, Identity, Ripemd160, Sha256}; + +pub struct FrontierPrecompiles(PhantomData); + +impl Default for FrontierPrecompiles { + fn default() -> Self { + Self(Default::default()) + } +} + +impl FrontierPrecompiles +where + R: pallet_evm::Config, +{ + pub fn new() -> Self { + Self::default() + } + + pub fn used_addresses() -> sp_std::vec::Vec { + sp_std::vec![1, 2, 3, 4, 5, 1024, 1025] + .into_iter() + .map(|x| hash(x as u64)) + .collect() + } +} +impl PrecompileSet for FrontierPrecompiles +where + R: pallet_evm::Config, +{ + fn execute( + &self, + address: H160, + input: &[u8], + target_gas: Option, + context: &Context, + is_static: bool, + ) -> Option { + match address { + // Ethereum precompiles : + a if a == hash(1) => Some(ECRecover::execute(input, target_gas, context, is_static)), + a if a == hash(2) => Some(Sha256::execute(input, target_gas, context, is_static)), + a if a == hash(3) => Some(Ripemd160::execute(input, target_gas, context, is_static)), + a if a == hash(4) => Some(Identity::execute(input, target_gas, context, is_static)), + a if a == hash(5) => Some(Modexp::execute(input, target_gas, context, is_static)), + // Non-Frontier specific nor Ethereum precompiles : + a if a == hash(1024) => { + Some(Sha3FIPS256::execute(input, target_gas, context, is_static)) + } + a if a == hash(1025) => Some(ECRecoverPublicKey::execute( + input, target_gas, context, is_static, + )), + _ => None, + } + } + + fn is_precompile(&self, address: H160) -> bool { + Self::used_addresses().contains(&address) + } +} + +fn hash(a: u64) -> H160 { + H160::from_low_u64_be(a) +} diff --git a/crates/humanode-runtime/src/lib.rs b/crates/humanode-runtime/src/lib.rs index 02b8415d5..dd6c66c80 100644 --- a/crates/humanode-runtime/src/lib.rs +++ b/crates/humanode-runtime/src/lib.rs @@ -10,7 +10,11 @@ #[cfg(feature = "std")] include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs")); +use fp_rpc::TransactionStatus; use pallet_bioauth::AuthTicket; +use pallet_ethereum::{Call::transact, Transaction as EthereumTransaction}; +use pallet_evm::FeeCalculator; +use pallet_evm::{Account as EVMAccount, EnsureAddressTruncated, HashedAddressMapping, Runner}; use pallet_grandpa::{ fg_primitives, AuthorityId as GrandpaId, AuthorityList as GrandpaAuthorityList, }; @@ -20,15 +24,20 @@ use scale_info::TypeInfo; use serde::{Deserialize, Serialize}; use sp_api::impl_runtime_apis; use sp_consensus_aura::sr25519::AuthorityId as AuraId; -use sp_core::{crypto::KeyTypeId, OpaqueMetadata}; +use sp_core::{ + crypto::{KeyTypeId, Public}, + OpaqueMetadata, H160, H256, U256, +}; use sp_runtime::traits::{ AccountIdLookup, BlakeTwo256, Block as BlockT, IdentifyAccount, NumberFor, Verify, }; use sp_runtime::{ create_runtime_str, generic, impl_opaque_keys, - transaction_validity::{TransactionSource, TransactionValidity}, + traits::{Dispatchable, PostDispatchInfoOf}, + transaction_validity::{TransactionSource, TransactionValidity, TransactionValidityError}, ApplyExtrinsicResult, MultiSignature, }; +use sp_std::marker::PhantomData; use sp_std::prelude::*; #[cfg(feature = "std")] use sp_version::NativeVersion; @@ -38,12 +47,12 @@ use sp_version::RuntimeVersion; use codec::{Decode, Encode, MaxEncodedLen}; pub use frame_support::{ construct_runtime, parameter_types, - traits::{KeyOwnerProofSystem, Randomness}, + traits::{FindAuthor, KeyOwnerProofSystem, Randomness}, weights::{ constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight, WEIGHT_PER_SECOND}, IdentityFee, Weight, }, - StorageValue, + ConsensusEngineId, StorageValue, }; pub use pallet_balances::Call as BalancesCall; pub use pallet_timestamp::Call as TimestampCall; @@ -52,6 +61,9 @@ use pallet_transaction_payment::CurrencyAdapter; pub use sp_runtime::BuildStorage; pub use sp_runtime::{Perbill, Permill}; +mod frontier_precompiles; +use frontier_precompiles::FrontierPrecompiles; + mod display_moment; /// An index to a block. @@ -440,6 +452,75 @@ impl pallet_bioauth::Config for Runtime { type MaxNonces = MaxNonces; } +pub struct FindAuthorTruncated(PhantomData); +impl> FindAuthor for FindAuthorTruncated { + fn find_author<'a, I>(digests: I) -> Option + where + I: 'a + IntoIterator, + { + if let Some(author_index) = F::find_author(digests) { + let authority_id = Aura::authorities()[author_index as usize].clone(); + return Some(H160::from_slice(&authority_id.to_raw_vec()[4..24])); + } + None + } +} + +parameter_types! { + pub const ChainId: u64 = 42; + pub BlockGasLimit: U256 = U256::from(u32::max_value()); + pub PrecompilesValue: FrontierPrecompiles = FrontierPrecompiles::<_>::new(); +} + +impl pallet_evm::Config for Runtime { + type FeeCalculator = BaseFee; + type GasWeightMapping = (); + type BlockHashMapping = pallet_ethereum::EthereumBlockHashMapping; + type CallOrigin = EnsureAddressTruncated; + type WithdrawOrigin = EnsureAddressTruncated; + type AddressMapping = HashedAddressMapping; + type Currency = Balances; + type Event = Event; + type Runner = pallet_evm::runner::stack::Runner; + type PrecompilesType = FrontierPrecompiles; + type PrecompilesValue = PrecompilesValue; + type ChainId = ChainId; + type BlockGasLimit = BlockGasLimit; + type OnChargeTransaction = (); + type FindAuthor = FindAuthorTruncated; +} + +impl pallet_ethereum::Config for Runtime { + type Event = Event; + type StateRoot = pallet_ethereum::IntermediateStateRoot; +} + +frame_support::parameter_types! { + pub BoundDivision: U256 = U256::from(1024); +} + +impl pallet_dynamic_fee::Config for Runtime { + type MinGasPriceBoundDivisor = BoundDivision; +} + +pub struct BaseFeeThreshold; +impl pallet_base_fee::BaseFeeThreshold for BaseFeeThreshold { + fn lower() -> Permill { + Permill::zero() + } + fn ideal() -> Permill { + Permill::from_parts(500_000) + } + fn upper() -> Permill { + Permill::from_parts(1_000_000) + } +} + +impl pallet_base_fee::Config for Runtime { + type Event = Event; + type Threshold = BaseFeeThreshold; +} + // Create the runtime by composing the FRAME pallets that were previously // configured. construct_runtime!( @@ -457,9 +538,37 @@ construct_runtime!( TransactionPayment: pallet_transaction_payment::{Pallet, Storage}, Sudo: pallet_sudo::{Pallet, Call, Config, Storage, Event}, Grandpa: pallet_grandpa::{Pallet, Call, Storage, Config, Event}, + Ethereum: pallet_ethereum::{Pallet, Call, Storage, Event, Config, Origin}, + EVM: pallet_evm::{Pallet, Config, Call, Storage, Event}, + DynamicFee: pallet_dynamic_fee::{Pallet, Call, Storage, Config, Inherent}, + BaseFee: pallet_base_fee::{Pallet, Call, Storage, Config, Event}, } ); +pub struct TransactionConverter; + +impl fp_rpc::ConvertTransaction for TransactionConverter { + fn convert_transaction(&self, transaction: pallet_ethereum::Transaction) -> UncheckedExtrinsic { + UncheckedExtrinsic::new_unsigned( + pallet_ethereum::Call::::transact { transaction }.into(), + ) + } +} + +impl fp_rpc::ConvertTransaction for TransactionConverter { + fn convert_transaction( + &self, + transaction: pallet_ethereum::Transaction, + ) -> opaque::UncheckedExtrinsic { + let extrinsic = UncheckedExtrinsic::new_unsigned( + pallet_ethereum::Call::::transact { transaction }.into(), + ); + let encoded = extrinsic.encode(); + opaque::UncheckedExtrinsic::decode(&mut &encoded[..]) + .expect("Encoded extrinsic is always valid") + } +} + /// The address format for describing accounts. pub type Address = sp_runtime::MultiAddress; /// Block header type as expected by this runtime. @@ -488,6 +597,53 @@ pub type Executive = frame_executive::Executive< AllPalletsWithSystem, >; +impl fp_self_contained::SelfContainedCall for Call { + type SignedInfo = H160; + + fn is_self_contained(&self) -> bool { + match self { + Call::Ethereum(call) => call.is_self_contained(), + _ => false, + } + } + + fn check_self_contained(&self) -> Option> { + match self { + Call::Ethereum(call) => call.check_self_contained(), + _ => None, + } + } + + fn validate_self_contained(&self, info: &Self::SignedInfo) -> Option { + match self { + Call::Ethereum(call) => call.validate_self_contained(info), + _ => None, + } + } + + fn pre_dispatch_self_contained( + &self, + info: &Self::SignedInfo, + ) -> Option> { + match self { + Call::Ethereum(call) => call.pre_dispatch_self_contained(info), + _ => None, + } + } + + fn apply_self_contained( + self, + info: Self::SignedInfo, + ) -> Option>> { + match self { + call @ Call::Ethereum(pallet_ethereum::Call::transact { .. }) => Some(call.dispatch( + Origin::from(pallet_ethereum::RawOrigin::EthereumTransaction(info)), + )), + _ => None, + } + } +} + impl_runtime_apis! { impl sp_api::Core for Runtime { fn version() -> RuntimeVersion { @@ -628,6 +784,131 @@ impl_runtime_apis! { } } + impl fp_rpc::EthereumRuntimeRPCApi for Runtime { + fn chain_id() -> u64 { + ::ChainId::get() + } + + fn account_basic(address: H160) -> EVMAccount { + EVM::account_basic(&address) + } + + fn gas_price() -> U256 { + ::FeeCalculator::min_gas_price() + } + + fn account_code_at(address: H160) -> Vec { + EVM::account_codes(address) + } + + fn author() -> H160 { + >::find_author() + } + + fn storage_at(address: H160, index: U256) -> H256 { + let mut tmp = [0u8; 32]; + index.to_big_endian(&mut tmp); + EVM::account_storages(address, H256::from_slice(&tmp[..])) + } + + fn call( + from: H160, + to: H160, + data: Vec, + value: U256, + gas_limit: U256, + max_fee_per_gas: Option, + max_priority_fee_per_gas: Option, + nonce: Option, + estimate: bool, + ) -> Result { + let config = if estimate { + let mut config = ::config().clone(); + config.estimate = true; + config + } else { + ::config().clone() + }; + + ::Runner::call( + from, + to, + data, + value, + gas_limit.low_u64(), + max_fee_per_gas, + max_priority_fee_per_gas, + nonce, + Vec::new(), + &config, + ).map_err(|err| err.into()) + } + + fn create( + from: H160, + data: Vec, + value: U256, + gas_limit: U256, + max_fee_per_gas: Option, + max_priority_fee_per_gas: Option, + nonce: Option, + estimate: bool, + ) -> Result { + let config = if estimate { + let mut config = ::config().clone(); + config.estimate = true; + config + } else { + ::config().clone() + }; + + ::Runner::create( + from, + data, + value, + gas_limit.low_u64(), + max_fee_per_gas, + max_priority_fee_per_gas, + nonce, + Vec::new(), + &config, + ).map_err(|err| err.into()) + } + + fn current_transaction_statuses() -> Option> { + Ethereum::current_transaction_statuses() + } + + fn current_block() -> Option { + Ethereum::current_block() + } + + fn current_receipts() -> Option> { + Ethereum::current_receipts() + } + + fn current_all() -> ( + Option, + Option>, + Option> + ) { + ( + Ethereum::current_block(), + Ethereum::current_receipts(), + Ethereum::current_transaction_statuses() + ) + } + + fn extrinsic_filter( + xts: Vec<::Extrinsic>, + ) -> Vec { + xts.into_iter().filter_map(|xt| match xt.function { + Call::Ethereum(transact { transaction }) => Some(transaction), + _ => None + }).collect::>() + } + } + impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi for Runtime { fn query_info( From 3d91f98c64c01ada6aa4cd093e2d735bad8d97d5 Mon Sep 17 00:00:00 2001 From: dmitrylavrenov Date: Tue, 14 Dec 2021 10:20:09 +0300 Subject: [PATCH 04/42] Sort cargo --- crates/humanode-runtime/Cargo.toml | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/crates/humanode-runtime/Cargo.toml b/crates/humanode-runtime/Cargo.toml index 3fd8dcc00..64436646a 100644 --- a/crates/humanode-runtime/Cargo.toml +++ b/crates/humanode-runtime/Cargo.toml @@ -16,9 +16,9 @@ primitives-auth-ticket = { version = "0.1", path = "../primitives-auth-ticket", robonode-crypto = { version = "0.1", path = "../robonode-crypto", default-features = false } chrono = { version = "0.4.19", default-features = false } -codec = { package = "parity-scale-codec", version = "2", default-features = false, features = [ - "derive", -] } +codec = { package = "parity-scale-codec", version = "2", default-features = false, features = ["derive"] } +fp-rpc = { default-features = false, git = "https://github.com/humanode-network/frontier", branch = "substrate-1a30fa2" } +fp-self-contained = { default-features = false, git = "https://github.com/humanode-network/frontier", branch = "substrate-1a30fa2" } frame-benchmarking = { default-features = false, optional = true, git = "https://github.com/humanode-network/substrate", branch = "master" } frame-executive = { default-features = false, git = "https://github.com/humanode-network/substrate", branch = "master" } frame-support = { default-features = false, git = "https://github.com/humanode-network/substrate", branch = "master" } @@ -28,8 +28,13 @@ frame-system-rpc-runtime-api = { default-features = false, git = "https://github hex-literal = { version = "0.3", optional = true } pallet-aura = { default-features = false, git = "https://github.com/humanode-network/substrate", branch = "master" } pallet-balances = { default-features = false, git = "https://github.com/humanode-network/substrate", branch = "master" } +pallet-base-fee = { default-features = false, git = "https://github.com/humanode-network/frontier", branch = "substrate-1a30fa2" } +pallet-dynamic-fee = { default-features = false, git = "https://github.com/humanode-network/frontier", branch = "substrate-1a30fa2" } pallet-ethereum = { default-features = false, git = "https://github.com/humanode-network/frontier", branch = "substrate-1a30fa2" } pallet-evm = { default-features = false, git = "https://github.com/humanode-network/frontier", branch = "substrate-1a30fa2" } +pallet-evm-precompile-modexp = { default-features = false, git = "https://github.com/humanode-network/frontier", branch = "substrate-1a30fa2" } +pallet-evm-precompile-sha3fips = { default-features = false, git = "https://github.com/humanode-network/frontier", branch = "substrate-1a30fa2" } +pallet-evm-precompile-simple = { default-features = false, git = "https://github.com/humanode-network/frontier", branch = "substrate-1a30fa2" } pallet-grandpa = { default-features = false, git = "https://github.com/humanode-network/substrate", branch = "master" } pallet-randomness-collective-flip = { default-features = false, git = "https://github.com/humanode-network/substrate", branch = "master" } pallet-sudo = { default-features = false, git = "https://github.com/humanode-network/substrate", branch = "master" } @@ -51,13 +56,6 @@ sp-session = { default-features = false, git = "https://github.com/humanode-netw sp-std = { default-features = false, git = "https://github.com/humanode-network/substrate", branch = "master" } sp-transaction-pool = { default-features = false, git = "https://github.com/humanode-network/substrate", branch = "master" } sp-version = { default-features = false, git = "https://github.com/humanode-network/substrate", branch = "master" } -fp-rpc = { default-features = false, git = "https://github.com/humanode-network/frontier", branch = "substrate-1a30fa2" } -fp-self-contained = { default-features = false, git = "https://github.com/humanode-network/frontier", branch = "substrate-1a30fa2" } -pallet-dynamic-fee = { default-features = false, git = "https://github.com/humanode-network/frontier", branch = "substrate-1a30fa2" } -pallet-base-fee = { default-features = false, git = "https://github.com/humanode-network/frontier", branch = "substrate-1a30fa2" } -pallet-evm-precompile-simple = { default-features = false, git = "https://github.com/humanode-network/frontier", branch = "substrate-1a30fa2" } -pallet-evm-precompile-sha3fips = { default-features = false, git = "https://github.com/humanode-network/frontier", branch = "substrate-1a30fa2" } -pallet-evm-precompile-modexp = { default-features = false, git = "https://github.com/humanode-network/frontier", branch = "substrate-1a30fa2" } [features] default = ["std"] From b7b271b6d603615b3f7332949e01e0bf7ad2afa7 Mon Sep 17 00:00:00 2001 From: dmitrylavrenov Date: Wed, 15 Dec 2021 16:35:20 +0300 Subject: [PATCH 05/42] Add ethereum rpc --- Cargo.lock | 569 +++++++++++++++++++++++----- Cargo.toml | 15 +- crates/humanode-peer/Cargo.toml | 3 + crates/humanode-peer/src/service.rs | 62 ++- crates/humanode-rpc/Cargo.toml | 10 + crates/humanode-rpc/src/lib.rs | 97 ++++- crates/pallet-bioauth/src/lib.rs | 4 - 7 files changed, 636 insertions(+), 124 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4c950f2fa..6a4cfc321 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -59,7 +59,7 @@ dependencies = [ "cipher", "ctr", "ghash", - "subtle", + "subtle 2.4.1", ] [[package]] @@ -435,12 +435,12 @@ dependencies = [ "node-primitives", "parity-scale-codec", "sc-client-api", - "sc-consensus", + "sc-consensus 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "sc-service", "sp-api", "sp-application-crypto", "sp-blockchain", - "sp-consensus", + "sp-consensus 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "sp-consensus-aura", "sp-inherents", "sp-keystore", @@ -986,6 +986,16 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" +[[package]] +name = "crypto-mac" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4434400df11d95d556bac068ddfedd482915eb18fe8bea89bc80b6e4b1c179e5" +dependencies = [ + "generic-array 0.12.4", + "subtle 1.0.0", +] + [[package]] name = "crypto-mac" version = "0.8.0" @@ -993,7 +1003,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" dependencies = [ "generic-array 0.14.4", - "subtle", + "subtle 2.4.1", ] [[package]] @@ -1003,7 +1013,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b1d1a86f49236c215f271d40892d5fc950490551400b02ef360692c29815c714" dependencies = [ "generic-array 0.14.4", - "subtle", + "subtle 2.4.1", ] [[package]] @@ -1054,7 +1064,7 @@ dependencies = [ "byteorder", "digest 0.8.1", "rand_core 0.5.1", - "subtle", + "subtle 2.4.1", "zeroize", ] @@ -1067,7 +1077,7 @@ dependencies = [ "byteorder", "digest 0.9.0", "rand_core 0.5.1", - "subtle", + "subtle 2.4.1", "zeroize", ] @@ -1441,6 +1451,111 @@ dependencies = [ "instant", ] +[[package]] +name = "fc-consensus" +version = "2.0.0-dev" +source = "git+https://github.com/humanode-network/frontier?branch=substrate-1a30fa2#26bf32c18044785756eba89478c24b2bf730f719" +dependencies = [ + "async-trait", + "derive_more", + "fc-db", + "fp-consensus", + "fp-rpc", + "futures 0.3.17", + "log", + "parity-scale-codec", + "sc-client-api", + "sc-consensus 0.10.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-api", + "sp-block-builder 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-blockchain", + "sp-consensus 0.10.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-core", + "sp-inherents", + "sp-runtime", + "sp-timestamp 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "substrate-prometheus-endpoint 0.10.0-dev (git+https://github.com/paritytech/substrate)", +] + +[[package]] +name = "fc-db" +version = "2.0.0-dev" +source = "git+https://github.com/humanode-network/frontier?branch=substrate-1a30fa2#26bf32c18044785756eba89478c24b2bf730f719" +dependencies = [ + "fp-storage", + "kvdb", + "kvdb-rocksdb", + "pallet-ethereum", + "parity-scale-codec", + "parking_lot", + "sp-core", + "sp-database 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-runtime", +] + +[[package]] +name = "fc-rpc" +version = "2.0.0-dev" +source = "git+https://github.com/humanode-network/frontier?branch=substrate-1a30fa2#26bf32c18044785756eba89478c24b2bf730f719" +dependencies = [ + "ethereum", + "ethereum-types", + "evm", + "fc-consensus", + "fc-db", + "fc-rpc-core", + "fp-consensus", + "fp-evm", + "fp-rpc", + "fp-storage", + "futures 0.3.17", + "jsonrpc-core", + "jsonrpc-core-client", + "jsonrpc-derive", + "jsonrpc-pubsub", + "libsecp256k1 0.3.5", + "log", + "lru 0.6.6", + "pallet-ethereum", + "pallet-evm", + "parity-scale-codec", + "parking_lot", + "rand 0.7.3", + "rlp", + "rustc-hex", + "sc-client-api", + "sc-network", + "sc-rpc", + "sc-service", + "sc-transaction-pool", + "sc-transaction-pool-api", + "sha3 0.8.2", + "sp-api", + "sp-blockchain", + "sp-io", + "sp-runtime", + "sp-storage", + "sp-transaction-pool", +] + +[[package]] +name = "fc-rpc-core" +version = "1.1.0-dev" +source = "git+https://github.com/humanode-network/frontier?branch=substrate-1a30fa2#26bf32c18044785756eba89478c24b2bf730f719" +dependencies = [ + "ethereum", + "ethereum-types", + "jsonrpc-core", + "jsonrpc-core-client", + "jsonrpc-derive", + "jsonrpc-pubsub", + "rlp", + "rustc-hex", + "serde", + "serde_json", + "sha3 0.8.2", +] + [[package]] name = "fdlimit" version = "0.2.1" @@ -1659,7 +1774,7 @@ dependencies = [ "sp-externalities", "sp-keystore", "sp-runtime", - "sp-state-machine", + "sp-state-machine 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "structopt", ] @@ -1714,7 +1829,7 @@ dependencies = [ "sp-io", "sp-runtime", "sp-staking", - "sp-state-machine", + "sp-state-machine 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "sp-std", "sp-tracing", "tt-call", @@ -1768,7 +1883,7 @@ dependencies = [ "sp-io", "sp-runtime", "sp-std", - "sp-version", + "sp-version 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", ] [[package]] @@ -2188,6 +2303,16 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b07f60793ff0a4d9cef0f18e63b5357e06209987153a64648c972c1e5aff336f" +[[package]] +name = "hmac" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5dcb5e64cda4c23119ab41ba960d1e170a774c8e4b9d9e6a9bc18aabf5e59695" +dependencies = [ + "crypto-mac 0.7.0", + "digest 0.8.1", +] + [[package]] name = "hmac" version = "0.8.1" @@ -2208,6 +2333,17 @@ dependencies = [ "digest 0.9.0", ] +[[package]] +name = "hmac-drbg" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6e570451493f10f6581b48cdd530413b63ea9e780f544bfd3bdcaa0d89d1a7b" +dependencies = [ + "digest 0.8.1", + "generic-array 0.12.4", + "hmac 0.7.1", +] + [[package]] name = "hmac-drbg" version = "0.3.0" @@ -2293,6 +2429,8 @@ dependencies = [ "async-trait", "bioauth-consensus", "bioauth-flow", + "fc-db", + "fc-rpc-core", "frame-benchmarking-cli", "futures 0.3.17", "hex", @@ -2312,26 +2450,27 @@ dependencies = [ "sc-chain-spec-derive", "sc-cli", "sc-client-api", - "sc-consensus", + "sc-consensus 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "sc-consensus-aura", "sc-executor", "sc-finality-grandpa", "sc-network", + "sc-rpc", "sc-service", "sc-telemetry", "sc-tracing", "sc-transaction-pool", - "sc-utils", + "sc-utils 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "serde", "serde_json", "sp-application-crypto", - "sp-consensus", + "sp-consensus 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "sp-consensus-aura", "sp-core", "sp-finality-grandpa", "sp-keystore", "sp-runtime", - "sp-timestamp", + "sp-timestamp 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "structopt", "thiserror", "tokio", @@ -2345,14 +2484,24 @@ version = "0.1.0" dependencies = [ "bioauth-flow", "bioauth-flow-api", + "fc-db", + "fc-rpc", + "fc-rpc-core", + "fp-rpc", "humanode-runtime", "jsonrpc-core", + "jsonrpc-pubsub", + "pallet-ethereum", "pallet-transaction-payment-rpc", "robonode-client", + "sc-client-api", + "sc-network", + "sc-rpc", "sc-rpc-api", + "sc-transaction-pool", "sc-transaction-pool-api", "sp-api", - "sp-block-builder", + "sp-block-builder 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "sp-blockchain", "substrate-frame-rpc-system", ] @@ -2395,7 +2544,7 @@ dependencies = [ "scale-info", "serde", "sp-api", - "sp-block-builder", + "sp-block-builder 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "sp-consensus-aura", "sp-core", "sp-inherents", @@ -2404,7 +2553,7 @@ dependencies = [ "sp-session", "sp-std", "sp-transaction-pool", - "sp-version", + "sp-version 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "substrate-wasm-builder", ] @@ -2995,7 +3144,7 @@ dependencies = [ "futures 0.3.17", "futures-timer 3.0.2", "lazy_static", - "libsecp256k1", + "libsecp256k1 0.7.0", "log", "multiaddr", "multihash 0.14.0", @@ -3424,6 +3573,22 @@ dependencies = [ "libc", ] +[[package]] +name = "libsecp256k1" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fc1e2c808481a63dc6da2074752fdd4336a3c8fcc68b83db6f1fd5224ae7962" +dependencies = [ + "arrayref", + "crunchy", + "digest 0.8.1", + "hmac-drbg 0.2.0", + "rand 0.7.3", + "sha2 0.8.2", + "subtle 2.4.1", + "typenum", +] + [[package]] name = "libsecp256k1" version = "0.7.0" @@ -3433,7 +3598,7 @@ dependencies = [ "arrayref", "base64", "digest 0.9.0", - "hmac-drbg", + "hmac-drbg 0.3.0", "libsecp256k1-core", "libsecp256k1-gen-ecmult", "libsecp256k1-gen-genmult", @@ -3451,7 +3616,7 @@ checksum = "5be9b9bb642d8522a44d533eab56c16c738301965504753b03ad1de3425d5451" dependencies = [ "crunchy", "digest 0.9.0", - "subtle", + "subtle 2.4.1", ] [[package]] @@ -4480,7 +4645,7 @@ dependencies = [ "sp-session", "sp-staking", "sp-std", - "sp-trie", + "sp-trie 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", ] [[package]] @@ -4511,7 +4676,7 @@ dependencies = [ "sp-inherents", "sp-runtime", "sp-std", - "sp-timestamp", + "sp-timestamp 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", ] [[package]] @@ -5676,11 +5841,11 @@ dependencies = [ "sc-transaction-pool-api", "sp-api", "sp-blockchain", - "sp-consensus", + "sp-consensus 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "sp-core", "sp-inherents", "sp-runtime", - "substrate-prometheus-endpoint", + "substrate-prometheus-endpoint 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", ] [[package]] @@ -5691,12 +5856,12 @@ dependencies = [ "parity-scale-codec", "sc-client-api", "sp-api", - "sp-block-builder", + "sp-block-builder 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "sp-blockchain", "sp-core", "sp-inherents", "sp-runtime", - "sp-state-machine", + "sp-state-machine 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", ] [[package]] @@ -5749,16 +5914,16 @@ dependencies = [ "sc-service", "sc-telemetry", "sc-tracing", - "sc-utils", + "sc-utils 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "serde", "serde_json", "sp-blockchain", "sp-core", "sp-keyring", "sp-keystore", - "sp-panic-handler", + "sp-panic-handler 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "sp-runtime", - "sp-version", + "sp-version 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "structopt", "thiserror", "tiny-bip39", @@ -5778,19 +5943,19 @@ dependencies = [ "parking_lot", "sc-executor", "sc-transaction-pool-api", - "sc-utils", + "sc-utils 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "sp-api", "sp-blockchain", - "sp-consensus", + "sp-consensus 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "sp-core", - "sp-database", + "sp-database 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "sp-externalities", "sp-keystore", "sp-runtime", - "sp-state-machine", + "sp-state-machine 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "sp-storage", - "sp-trie", - "substrate-prometheus-endpoint", + "sp-trie 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "substrate-prometheus-endpoint 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", ] [[package]] @@ -5812,10 +5977,10 @@ dependencies = [ "sp-arithmetic", "sp-blockchain", "sp-core", - "sp-database", + "sp-database 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "sp-runtime", - "sp-state-machine", - "sp-trie", + "sp-state-machine 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-trie 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", ] [[package]] @@ -5830,15 +5995,39 @@ dependencies = [ "log", "parking_lot", "sc-client-api", - "sc-utils", + "sc-utils 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "serde", "sp-api", "sp-blockchain", - "sp-consensus", + "sp-consensus 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "sp-core", "sp-runtime", - "sp-state-machine", - "substrate-prometheus-endpoint", + "sp-state-machine 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "substrate-prometheus-endpoint 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "thiserror", +] + +[[package]] +name = "sc-consensus" +version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate?rev=1a30fa2#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" +dependencies = [ + "async-trait", + "futures 0.3.17", + "futures-timer 3.0.2", + "libp2p", + "log", + "parking_lot", + "sc-client-api", + "sc-utils 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "serde", + "sp-api", + "sp-blockchain", + "sp-consensus 0.10.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-core", + "sp-runtime", + "sp-state-machine 0.10.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "substrate-prometheus-endpoint 0.10.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", "thiserror", ] @@ -5854,21 +6043,21 @@ dependencies = [ "parity-scale-codec", "sc-block-builder", "sc-client-api", - "sc-consensus", + "sc-consensus 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "sc-consensus-slots", "sc-telemetry", "sp-api", "sp-application-crypto", - "sp-block-builder", + "sp-block-builder 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "sp-blockchain", - "sp-consensus", + "sp-consensus 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "sp-consensus-aura", "sp-consensus-slots", "sp-core", "sp-inherents", "sp-keystore", "sp-runtime", - "substrate-prometheus-endpoint", + "substrate-prometheus-endpoint 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", ] [[package]] @@ -5882,18 +6071,18 @@ dependencies = [ "log", "parity-scale-codec", "sc-client-api", - "sc-consensus", + "sc-consensus 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "sc-telemetry", "sp-api", "sp-arithmetic", "sp-blockchain", - "sp-consensus", + "sp-consensus 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "sp-consensus-slots", "sp-core", "sp-inherents", "sp-runtime", - "sp-state-machine", - "sp-timestamp", + "sp-state-machine 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-timestamp 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "thiserror", ] @@ -5903,7 +6092,7 @@ version = "0.10.0-dev" source = "git+https://github.com/humanode-network/substrate?branch=master#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" dependencies = [ "lazy_static", - "libsecp256k1", + "libsecp256k1 0.7.0", "log", "parity-scale-codec", "parking_lot", @@ -5914,11 +6103,11 @@ dependencies = [ "sp-core-hashing-proc-macro", "sp-externalities", "sp-io", - "sp-panic-handler", + "sp-panic-handler 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "sp-runtime-interface", "sp-tasks", - "sp-trie", - "sp-version", + "sp-trie 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-version 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "sp-wasm-interface", "wasmi", ] @@ -5975,23 +6164,23 @@ dependencies = [ "rand 0.8.4", "sc-block-builder", "sc-client-api", - "sc-consensus", + "sc-consensus 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "sc-keystore", "sc-network", "sc-network-gossip", "sc-telemetry", - "sc-utils", + "sc-utils 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "serde_json", "sp-api", "sp-application-crypto", "sp-arithmetic", "sp-blockchain", - "sp-consensus", + "sp-consensus 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "sp-core", "sp-finality-grandpa", "sp-keystore", "sp-runtime", - "substrate-prometheus-endpoint", + "substrate-prometheus-endpoint 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", ] [[package]] @@ -6058,19 +6247,19 @@ dependencies = [ "rand 0.7.3", "sc-block-builder", "sc-client-api", - "sc-consensus", + "sc-consensus 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "sc-peerset", - "sc-utils", + "sc-utils 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "serde", "serde_json", "smallvec", "sp-arithmetic", "sp-blockchain", - "sp-consensus", + "sp-consensus 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "sp-core", "sp-finality-grandpa", "sp-runtime", - "substrate-prometheus-endpoint", + "substrate-prometheus-endpoint 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "thiserror", "unsigned-varint 0.6.0", "void", @@ -6089,7 +6278,7 @@ dependencies = [ "lru 0.7.0", "sc-network", "sp-runtime", - "substrate-prometheus-endpoint", + "substrate-prometheus-endpoint 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "tracing", ] @@ -6112,7 +6301,7 @@ dependencies = [ "rand 0.7.3", "sc-client-api", "sc-network", - "sc-utils", + "sc-utils 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "sp-api", "sp-core", "sp-offchain", @@ -6129,7 +6318,7 @@ dependencies = [ "futures 0.3.17", "libp2p", "log", - "sc-utils", + "sc-utils 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "serde_json", "wasm-timer", ] @@ -6140,7 +6329,7 @@ version = "0.10.0-dev" source = "git+https://github.com/humanode-network/substrate?branch=master#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" dependencies = [ "log", - "substrate-prometheus-endpoint", + "substrate-prometheus-endpoint 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", ] [[package]] @@ -6161,7 +6350,7 @@ dependencies = [ "sc-rpc-api", "sc-tracing", "sc-transaction-pool-api", - "sc-utils", + "sc-utils 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "serde_json", "sp-api", "sp-blockchain", @@ -6171,7 +6360,7 @@ dependencies = [ "sp-rpc", "sp-runtime", "sp-session", - "sp-version", + "sp-version 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", ] [[package]] @@ -6195,7 +6384,7 @@ dependencies = [ "sp-rpc", "sp-runtime", "sp-tracing", - "sp-version", + "sp-version 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "thiserror", ] @@ -6212,7 +6401,7 @@ dependencies = [ "jsonrpc-ws-server", "log", "serde_json", - "substrate-prometheus-endpoint", + "substrate-prometheus-endpoint 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "tokio", ] @@ -6239,7 +6428,7 @@ dependencies = [ "sc-chain-spec", "sc-client-api", "sc-client-db", - "sc-consensus", + "sc-consensus 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "sc-executor", "sc-informant", "sc-keystore", @@ -6251,28 +6440,28 @@ dependencies = [ "sc-tracing", "sc-transaction-pool", "sc-transaction-pool-api", - "sc-utils", + "sc-utils 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "serde", "serde_json", "sp-api", "sp-application-crypto", - "sp-block-builder", + "sp-block-builder 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "sp-blockchain", - "sp-consensus", + "sp-consensus 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "sp-core", "sp-externalities", "sp-inherents", "sp-keystore", "sp-runtime", "sp-session", - "sp-state-machine", + "sp-state-machine 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "sp-storage", "sp-tracing", "sp-transaction-pool", "sp-transaction-storage-proof", - "sp-trie", - "sp-version", - "substrate-prometheus-endpoint", + "sp-trie 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-version 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "substrate-prometheus-endpoint 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "tempfile", "thiserror", "tokio", @@ -6369,7 +6558,7 @@ dependencies = [ "retain_mut", "sc-client-api", "sc-transaction-pool-api", - "sc-utils", + "sc-utils 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "serde", "sp-api", "sp-blockchain", @@ -6377,7 +6566,7 @@ dependencies = [ "sp-runtime", "sp-tracing", "sp-transaction-pool", - "substrate-prometheus-endpoint", + "substrate-prometheus-endpoint 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "thiserror", ] @@ -6406,6 +6595,17 @@ dependencies = [ "prometheus", ] +[[package]] +name = "sc-utils" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?rev=1a30fa2#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" +dependencies = [ + "futures 0.3.17", + "futures-timer 3.0.2", + "lazy_static", + "prometheus", +] + [[package]] name = "scale-info" version = "1.0.0" @@ -6456,7 +6656,7 @@ dependencies = [ "rand 0.7.3", "rand_core 0.5.1", "sha2 0.8.2", - "subtle", + "subtle 2.4.1", "zeroize", ] @@ -6789,7 +6989,7 @@ dependencies = [ "ring", "rustc_version 0.3.3", "sha2 0.9.8", - "subtle", + "subtle 2.4.1", "x25519-dalek", ] @@ -6841,9 +7041,9 @@ dependencies = [ "sp-api-proc-macro", "sp-core", "sp-runtime", - "sp-state-machine", + "sp-state-machine 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "sp-std", - "sp-version", + "sp-version 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "thiserror", ] @@ -6911,6 +7111,18 @@ dependencies = [ "sp-std", ] +[[package]] +name = "sp-block-builder" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?rev=1a30fa2#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" +dependencies = [ + "parity-scale-codec", + "sp-api", + "sp-inherents", + "sp-runtime", + "sp-std", +] + [[package]] name = "sp-blockchain" version = "4.0.0-dev" @@ -6922,10 +7134,10 @@ dependencies = [ "parity-scale-codec", "parking_lot", "sp-api", - "sp-consensus", - "sp-database", + "sp-consensus 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-database 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "sp-runtime", - "sp-state-machine", + "sp-state-machine 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "thiserror", ] @@ -6942,9 +7154,28 @@ dependencies = [ "sp-core", "sp-inherents", "sp-runtime", - "sp-state-machine", + "sp-state-machine 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-std", + "sp-version 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "thiserror", +] + +[[package]] +name = "sp-consensus" +version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate?rev=1a30fa2#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" +dependencies = [ + "async-trait", + "futures 0.3.17", + "futures-timer 3.0.2", + "log", + "parity-scale-codec", + "sp-core", + "sp-inherents", + "sp-runtime", + "sp-state-machine 0.10.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", "sp-std", - "sp-version", + "sp-version 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", "thiserror", ] @@ -6958,12 +7189,12 @@ dependencies = [ "scale-info", "sp-api", "sp-application-crypto", - "sp-consensus", + "sp-consensus 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "sp-consensus-slots", "sp-inherents", "sp-runtime", "sp-std", - "sp-timestamp", + "sp-timestamp 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", ] [[package]] @@ -6995,7 +7226,7 @@ dependencies = [ "hex", "impl-serde", "lazy_static", - "libsecp256k1", + "libsecp256k1 0.7.0", "log", "merlin", "num-traits", @@ -7059,6 +7290,15 @@ dependencies = [ "parking_lot", ] +[[package]] +name = "sp-database" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?rev=1a30fa2#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" +dependencies = [ + "kvdb", + "parking_lot", +] + [[package]] name = "sp-debug-derive" version = "4.0.0" @@ -7119,7 +7359,7 @@ source = "git+https://github.com/humanode-network/substrate?branch=master#1a30fa dependencies = [ "futures 0.3.17", "hash-db", - "libsecp256k1", + "libsecp256k1 0.7.0", "log", "parity-scale-codec", "parking_lot", @@ -7127,10 +7367,10 @@ dependencies = [ "sp-externalities", "sp-keystore", "sp-runtime-interface", - "sp-state-machine", + "sp-state-machine 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "sp-std", "sp-tracing", - "sp-trie", + "sp-trie 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "sp-wasm-interface", "tracing", "tracing-core", @@ -7192,6 +7432,16 @@ dependencies = [ "regex", ] +[[package]] +name = "sp-panic-handler" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?rev=1a30fa2#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" +dependencies = [ + "backtrace", + "lazy_static", + "regex", +] + [[package]] name = "sp-rpc" version = "4.0.0-dev" @@ -7301,9 +7551,32 @@ dependencies = [ "smallvec", "sp-core", "sp-externalities", - "sp-panic-handler", + "sp-panic-handler 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "sp-std", - "sp-trie", + "sp-trie 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "thiserror", + "tracing", + "trie-db", + "trie-root", +] + +[[package]] +name = "sp-state-machine" +version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate?rev=1a30fa2#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" +dependencies = [ + "hash-db", + "log", + "num-traits", + "parity-scale-codec", + "parking_lot", + "rand 0.7.3", + "smallvec", + "sp-core", + "sp-externalities", + "sp-panic-handler 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-std", + "sp-trie 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", "thiserror", "tracing", "trie-db", @@ -7357,6 +7630,22 @@ dependencies = [ "thiserror", ] +[[package]] +name = "sp-timestamp" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?rev=1a30fa2#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" +dependencies = [ + "async-trait", + "futures-timer 3.0.2", + "log", + "parity-scale-codec", + "sp-api", + "sp-inherents", + "sp-runtime", + "sp-std", + "thiserror", +] + [[package]] name = "sp-tracing" version = "4.0.0" @@ -7391,7 +7680,7 @@ dependencies = [ "sp-inherents", "sp-runtime", "sp-std", - "sp-trie", + "sp-trie 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", ] [[package]] @@ -7409,6 +7698,21 @@ dependencies = [ "trie-root", ] +[[package]] +name = "sp-trie" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?rev=1a30fa2#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" +dependencies = [ + "hash-db", + "memory-db", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-std", + "trie-db", + "trie-root", +] + [[package]] name = "sp-version" version = "4.0.0-dev" @@ -7421,7 +7725,23 @@ dependencies = [ "serde", "sp-runtime", "sp-std", - "sp-version-proc-macro", + "sp-version-proc-macro 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "thiserror", +] + +[[package]] +name = "sp-version" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?rev=1a30fa2#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" +dependencies = [ + "impl-serde", + "parity-scale-codec", + "parity-wasm 0.42.2", + "scale-info", + "serde", + "sp-runtime", + "sp-std", + "sp-version-proc-macro 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", "thiserror", ] @@ -7436,6 +7756,17 @@ dependencies = [ "syn", ] +[[package]] +name = "sp-version-proc-macro" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?rev=1a30fa2#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" +dependencies = [ + "parity-scale-codec", + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "sp-wasm-interface" version = "4.0.0" @@ -7572,7 +7903,7 @@ dependencies = [ "sc-rpc-api", "sc-transaction-pool-api", "sp-api", - "sp-block-builder", + "sp-block-builder 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "sp-blockchain", "sp-core", "sp-runtime", @@ -7592,6 +7923,34 @@ dependencies = [ "tokio", ] +[[package]] +name = "substrate-prometheus-endpoint" +version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate?rev=1a30fa2#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" +dependencies = [ + "async-std", + "derive_more", + "futures-util", + "hyper", + "log", + "prometheus", + "tokio", +] + +[[package]] +name = "substrate-prometheus-endpoint" +version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate#027368fe34e9a57ead752d4f900db6b5f85352e6" +dependencies = [ + "async-std", + "derive_more", + "futures-util", + "hyper", + "log", + "prometheus", + "tokio", +] + [[package]] name = "substrate-wasm-builder" version = "5.0.0-dev" @@ -7607,6 +7966,12 @@ dependencies = [ "wasm-gc-api", ] +[[package]] +name = "subtle" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d67a5a62ba6e01cb2192ff309324cb4875d0c451d55fe2319433abe7a05a8ee" + [[package]] name = "subtle" version = "2.4.1" @@ -8099,7 +8464,7 @@ version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1f559b464de2e2bdabcac6a210d12e9b5a5973c251e102c44c585c71d51bd78e" dependencies = [ - "cfg-if 0.1.10", + "cfg-if 1.0.0", "rand 0.8.4", "static_assertions", ] @@ -8183,7 +8548,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9f214e8f697e925001e66ec2c6e37a4ef93f0f78c2eed7814394e10c62025b05" dependencies = [ "generic-array 0.14.4", - "subtle", + "subtle 2.4.1", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index dd1313521..75d75f993 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,10 +8,19 @@ members = ["crates/*"] frame-system = { git = "https://github.com/humanode-network/substrate", branch = "master" } pallet-balances = { git = "https://github.com/humanode-network/substrate", branch = "master" } pallet-timestamp = { git = "https://github.com/humanode-network/substrate", branch = "master" } + sc-client-api = { git = "https://github.com/humanode-network/substrate", branch = "master" } + sc-network = { git = "https://github.com/humanode-network/substrate", branch = "master" } + sc-rpc = { git = "https://github.com/humanode-network/substrate", branch = "master" } + sc-service = { git = "https://github.com/humanode-network/substrate", branch = "master" } + sc-transaction-pool = { git = "https://github.com/humanode-network/substrate", branch = "master" } + sc-transaction-pool-api = { git = "https://github.com/humanode-network/substrate", branch = "master" } + sp-api = { git = "https://github.com/humanode-network/substrate", branch = "master" } + sp-blockchain = { git = "https://github.com/humanode-network/substrate", branch = "master" } sp-core = { git = "https://github.com/humanode-network/substrate", branch = "master" } + sp-externalities = { git = "https://github.com/humanode-network/substrate", branch = "master" } + sp-inherents = { git = "https://github.com/humanode-network/substrate", branch = "master" } sp-io = { git = "https://github.com/humanode-network/substrate", branch = "master" } sp-runtime = { git = "https://github.com/humanode-network/substrate", branch = "master" } sp-std = { git = "https://github.com/humanode-network/substrate", branch = "master" } - sp-externalities = { git = "https://github.com/humanode-network/substrate", branch = "master" } - sp-inherents = { git = "https://github.com/humanode-network/substrate", branch = "master" } - sp-api = { git = "https://github.com/humanode-network/substrate", branch = "master" } + sp-storage = { git = "https://github.com/humanode-network/substrate", branch = "master" } + sp-transaction-pool = { git = "https://github.com/humanode-network/substrate", branch = "master" } diff --git a/crates/humanode-peer/Cargo.toml b/crates/humanode-peer/Cargo.toml index c4088ac0b..99411910b 100644 --- a/crates/humanode-peer/Cargo.toml +++ b/crates/humanode-peer/Cargo.toml @@ -19,6 +19,8 @@ robonode-client = { version = "0.1", path = "../robonode-client" } anyhow = "1" async-trait = "0.1" codec = { package = "parity-scale-codec", version = "2.0.0" } +fc-db = { default-features = false, git = "https://github.com/humanode-network/frontier", branch = "substrate-1a30fa2" } +fc-rpc-core = { default-features = false, git = "https://github.com/humanode-network/frontier", branch = "substrate-1a30fa2" } frame-benchmarking-cli = { git = "https://github.com/humanode-network/substrate", branch = "master" } futures = "0.3" hex = "0.4.3" @@ -36,6 +38,7 @@ sc-consensus-aura = { git = "https://github.com/humanode-network/substrate", bra sc-executor = { git = "https://github.com/humanode-network/substrate", branch = "master" } sc-finality-grandpa = { git = "https://github.com/humanode-network/substrate", branch = "master" } sc-network = { git = "https://github.com/humanode-network/substrate", branch = "master" } +sc-rpc = { git = "https://github.com/humanode-network/substrate", branch = "master" } sc-service = { git = "https://github.com/humanode-network/substrate", branch = "master" } sc-telemetry = { git = "https://github.com/humanode-network/substrate", branch = "master" } sc-tracing = { git = "https://github.com/humanode-network/substrate", branch = "master" } diff --git a/crates/humanode-peer/src/service.rs b/crates/humanode-peer/src/service.rs index bb3ccdb3f..2622230ae 100644 --- a/crates/humanode-peer/src/service.rs +++ b/crates/humanode-peer/src/service.rs @@ -4,11 +4,14 @@ use std::{marker::PhantomData, sync::Arc, time::Duration}; use humanode_runtime::{self, opaque::Block, RuntimeApi}; +use sc_cli::SubstrateCli; use sc_client_api::ExecutorProvider; use sc_consensus_aura::{ImportQueueParams, SlotDuration, SlotProportion, StartAuraParams}; pub use sc_executor::NativeElseWasmExecutor; use sc_finality_grandpa::SharedVoterState; -use sc_service::{Error as ServiceError, KeystoreContainer, PartialComponents, TaskManager}; +use sc_service::{ + BasePath, Error as ServiceError, KeystoreContainer, PartialComponents, TaskManager, +}; use sc_telemetry::{Telemetry, TelemetryWorker}; use sp_consensus::SlotData; use sp_consensus_aura::sr25519::{AuthorityId as AuraId, AuthorityPair as AuraPair}; @@ -64,6 +67,33 @@ pub fn keystore_container( Ok((keystore_container, task_manager)) } +/// Create frontier dir. +pub fn frontier_database_dir(config: &sc_service::Configuration) -> std::path::PathBuf { + let config_dir = config + .base_path + .as_ref() + .map(|base_path| base_path.config_dir(config.chain_spec.id())) + .unwrap_or_else(|| { + BasePath::from_project("", "", &crate::cli::Root::executable_name()) + .config_dir(config.chain_spec.id()) + }); + config_dir.join("frontier").join("db") +} + +/// Construct frontier backend. +pub fn open_frontier_backend( + config: &sc_service::Configuration, +) -> Result>, String> { + Ok(Arc::new(fc_db::Backend::::new( + &fc_db::DatabaseSettings { + source: fc_db::DatabaseSettingsSrc::RocksDb { + path: frontier_database_dir(config), + cache_size: 0, + }, + }, + )?)) +} + /// Extract substrate partial components. pub fn new_partial( config: &Configuration, @@ -286,21 +316,35 @@ pub async fn new_full(config: Configuration) -> Result { +pub struct Deps { /// The client instance to use. pub client: Arc, /// Transaction pool instance. @@ -24,22 +42,37 @@ pub struct Deps { pub bioauth_flow_slot: Arc, /// Extracts the currently used validator key. pub validator_key_extractor: VKE, + /// Graph pool instance. + pub graph: Arc>, + /// Network service + pub network: Arc>, + /// Backend. + pub backend: Arc>, + /// Maximum number of logs in a query. + pub max_past_logs: u32, } /// Instantiate all RPC extensions. -pub fn create(deps: Deps) -> jsonrpc_core::IoHandler +pub fn create( + deps: Deps, + subscription_task_executor: SubscriptionTaskExecutor, +) -> jsonrpc_core::IoHandler where - C: ProvideRuntimeApi, + BE: Backend + 'static, + C: ProvideRuntimeApi + StorageProvider + AuxStore, + C: BlockchainEvents, C: HeaderBackend + HeaderMetadata + 'static, C: Send + Sync + 'static, C::Api: substrate_frame_rpc_system::AccountNonceApi, C::Api: pallet_transaction_payment_rpc::TransactionPaymentRuntimeApi, C::Api: bioauth_flow_api::BioauthFlowApi, C::Api: BlockBuilder, - P: TransactionPool + 'static, + C::Api: fp_rpc::EthereumRuntimeRPCApi, VKE: ValidatorKeyExtractorT + Send + Sync + 'static, VKE::PublicKeyType: Encode, VKE::Error: std::fmt::Debug, + P: TransactionPool + 'static, + A: ChainApi + 'static, { use pallet_transaction_payment_rpc::{TransactionPayment, TransactionPaymentApi}; use substrate_frame_rpc_system::{FullSystem, SystemApi}; @@ -52,11 +85,15 @@ where robonode_client, bioauth_flow_slot, validator_key_extractor, + graph, + network, + backend, + max_past_logs, } = deps; io.extend_with(SystemApi::to_delegate(FullSystem::new( Arc::clone(&client), - pool, + Arc::clone(&pool), deny_unsafe, ))); @@ -71,5 +108,53 @@ where Arc::clone(&client), ))); + let mut overrides_map = BTreeMap::new(); + overrides_map.insert( + EthereumStorageSchema::V1, + Box::new(SchemaV1Override::new(Arc::clone(&client))) + as Box + Send + Sync>, + ); + overrides_map.insert( + EthereumStorageSchema::V2, + Box::new(SchemaV2Override::new(Arc::clone(&client))) + as Box + Send + Sync>, + ); + + let overrides = Arc::new(OverrideHandle { + schemas: overrides_map, + fallback: Box::new(RuntimeApiStorageOverride::new(Arc::clone(&client))), + }); + + let block_data_cache = Arc::new(EthBlockDataCache::new(50, 50)); + + io.extend_with(EthApiServer::to_delegate(EthApi::new( + Arc::clone(&client), + Arc::clone(&pool), + graph, + humanode_runtime::TransactionConverter, + Arc::clone(&network), + Vec::new(), + Arc::clone(&overrides), + Arc::clone(&backend), + true, + max_past_logs, + Arc::clone(&block_data_cache), + ))); + + io.extend_with(Web3ApiServer::to_delegate(Web3Api::new(Arc::clone( + &client, + )))); + + io.extend_with(EthPubSubApiServer::to_delegate(EthPubSubApi::new( + pool, + client, + network, + SubscriptionManager::::with_id_provider( + HexEncodedIdProvider::default(), + Arc::new(subscription_task_executor), + ), + overrides, + ))); + io } diff --git a/crates/pallet-bioauth/src/lib.rs b/crates/pallet-bioauth/src/lib.rs index 2990d4482..9631ce848 100644 --- a/crates/pallet-bioauth/src/lib.rs +++ b/crates/pallet-bioauth/src/lib.rs @@ -133,15 +133,11 @@ pub mod pallet { use crate::weights::WeightInfo; -<<<<<<< HEAD use codec::MaxEncodedLen; use frame_support::{ dispatch::DispatchResult, pallet_prelude::*, sp_tracing::error, storage::types::ValueQuery, WeakBoundedVec, }; -======= - use frame_support::{pallet_prelude::*, sp_tracing::error, storage::types::ValueQuery}; ->>>>>>> Changes based on substrate commits till the current master use frame_system::pallet_prelude::*; use sp_runtime::{app_crypto::MaybeHash, traits::AtLeast32Bit}; From 3c1edf4637a24f8678ccb32ef7d3bcfd5abff937 Mon Sep 17 00:00:00 2001 From: dmitrylavrenov Date: Wed, 15 Dec 2021 23:43:36 +0300 Subject: [PATCH 06/42] Add evm config to define max_past_logs for eth api --- crates/humanode-peer/src/cli/config.rs | 10 ++++++++++ crates/humanode-peer/src/cli/params.rs | 8 ++++++++ crates/humanode-peer/src/cli/run_cmd.rs | 8 ++++++++ crates/humanode-peer/src/configuration.rs | 9 +++++++++ crates/humanode-peer/src/service.rs | 5 +++++ 5 files changed, 40 insertions(+) diff --git a/crates/humanode-peer/src/cli/config.rs b/crates/humanode-peer/src/cli/config.rs index c00ec8e20..957e7ae09 100644 --- a/crates/humanode-peer/src/cli/config.rs +++ b/crates/humanode-peer/src/cli/config.rs @@ -44,10 +44,15 @@ pub trait CliConfigurationExt: SubstrateCliConfigurationProvider { } }); + let evm = self.evm_params().map(|params| configuration::Evm { + max_past_logs: params.max_past_logs, + }); + Ok(Configuration { substrate, bioauth_flow, bioauth_perform_enroll: self.bioauth_perform_enroll(), + evm, }) } @@ -60,6 +65,11 @@ pub trait CliConfigurationExt: SubstrateCliConfigurationProvider { fn bioauth_perform_enroll(&self) -> bool { false } + + /// Provide the evm params, if available. + fn evm_params(&self) -> Option<¶ms::EvmParams> { + None + } } /// Indirect relation to the [`sc_cli::CliConfiguration`] for any type. diff --git a/crates/humanode-peer/src/cli/params.rs b/crates/humanode-peer/src/cli/params.rs index cfeed50b3..a39de64ec 100644 --- a/crates/humanode-peer/src/cli/params.rs +++ b/crates/humanode-peer/src/cli/params.rs @@ -31,3 +31,11 @@ pub struct BioauthFlowParams { #[structopt(long, value_name = "ROBONODE_URL")] pub robonode_url: Option, } + +/// Shared CLI parameters used to configure evm. +#[derive(Debug, StructOpt, Clone)] +pub struct EvmParams { + /// Maximum number of logs in a query. + #[structopt(long, default_value = "10000")] + pub max_past_logs: u32, +} diff --git a/crates/humanode-peer/src/cli/run_cmd.rs b/crates/humanode-peer/src/cli/run_cmd.rs index 676f97b01..3cbd1da1c 100644 --- a/crates/humanode-peer/src/cli/run_cmd.rs +++ b/crates/humanode-peer/src/cli/run_cmd.rs @@ -19,6 +19,10 @@ pub struct RunCmd { /// Run the bioauth enroll flow before the authentication. #[structopt(long = "bioauth-enroll")] bioauth_perform_enroll: bool, + + #[allow(missing_docs, clippy::missing_docs_in_private_items)] + #[structopt(flatten)] + pub evm_params: params::EvmParams, } impl SubstrateCliConfigurationProvider for RunCmd { @@ -37,4 +41,8 @@ impl CliConfigurationExt for RunCmd { fn bioauth_perform_enroll(&self) -> bool { self.bioauth_perform_enroll } + + fn evm_params(&self) -> Option<¶ms::EvmParams> { + Some(&self.evm_params) + } } diff --git a/crates/humanode-peer/src/configuration.rs b/crates/humanode-peer/src/configuration.rs index 63a59824b..ded2530e8 100644 --- a/crates/humanode-peer/src/configuration.rs +++ b/crates/humanode-peer/src/configuration.rs @@ -17,6 +17,9 @@ pub struct Configuration { /// Whether to perform the bioauth enroll before the authentication or not. pub bioauth_perform_enroll: bool, + + /// EVM configuration, + pub evm: Option, } /// Bioauth flow configuration parameters. @@ -47,3 +50,9 @@ impl BioauthFlow { Ok((webapp_url, rpc_url)) } } + +/// EVM configuration parameters. +pub struct Evm { + /// Maximum number of logs in a query. + pub max_past_logs: u32, +} diff --git a/crates/humanode-peer/src/service.rs b/crates/humanode-peer/src/service.rs index 2622230ae..9abf3dc91 100644 --- a/crates/humanode-peer/src/service.rs +++ b/crates/humanode-peer/src/service.rs @@ -254,6 +254,7 @@ pub async fn new_full(config: Configuration) -> Result Result Result Date: Thu, 16 Dec 2021 00:46:16 +0300 Subject: [PATCH 07/42] Improve frontier precompiles and add frontier workers to service --- Cargo.lock | 22 +++++++++++- crates/humanode-peer/Cargo.toml | 2 ++ crates/humanode-peer/src/service.rs | 34 +++++++++++++++---- .../src/frontier_precompiles.rs | 4 --- crates/humanode-runtime/src/lib.rs | 2 +- 5 files changed, 52 insertions(+), 12 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6a4cfc321..8caf4386d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1493,6 +1493,24 @@ dependencies = [ "sp-runtime", ] +[[package]] +name = "fc-mapping-sync" +version = "2.0.0-dev" +source = "git+https://github.com/humanode-network/frontier?branch=substrate-1a30fa2#26bf32c18044785756eba89478c24b2bf730f719" +dependencies = [ + "fc-consensus", + "fc-db", + "fp-consensus", + "fp-rpc", + "futures 0.3.17", + "futures-timer 3.0.2", + "log", + "sc-client-api", + "sp-api", + "sp-blockchain", + "sp-runtime", +] + [[package]] name = "fc-rpc" version = "2.0.0-dev" @@ -2430,6 +2448,8 @@ dependencies = [ "bioauth-consensus", "bioauth-flow", "fc-db", + "fc-mapping-sync", + "fc-rpc", "fc-rpc-core", "frame-benchmarking-cli", "futures 0.3.17", @@ -7940,7 +7960,7 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate#027368fe34e9a57ead752d4f900db6b5f85352e6" +source = "git+https://github.com/paritytech/substrate#1306573829700eb5912e342e4372a3735a0b0679" dependencies = [ "async-std", "derive_more", diff --git a/crates/humanode-peer/Cargo.toml b/crates/humanode-peer/Cargo.toml index 99411910b..59dc6ef2c 100644 --- a/crates/humanode-peer/Cargo.toml +++ b/crates/humanode-peer/Cargo.toml @@ -20,6 +20,8 @@ anyhow = "1" async-trait = "0.1" codec = { package = "parity-scale-codec", version = "2.0.0" } fc-db = { default-features = false, git = "https://github.com/humanode-network/frontier", branch = "substrate-1a30fa2" } +fc-mapping-sync = { default-features = false, git = "https://github.com/humanode-network/frontier", branch = "substrate-1a30fa2" } +fc-rpc = { default-features = false, git = "https://github.com/humanode-network/frontier", branch = "substrate-1a30fa2" } fc-rpc-core = { default-features = false, git = "https://github.com/humanode-network/frontier", branch = "substrate-1a30fa2" } frame-benchmarking-cli = { git = "https://github.com/humanode-network/substrate", branch = "master" } futures = "0.3" diff --git a/crates/humanode-peer/src/service.rs b/crates/humanode-peer/src/service.rs index 9abf3dc91..ba8b802cb 100644 --- a/crates/humanode-peer/src/service.rs +++ b/crates/humanode-peer/src/service.rs @@ -1,11 +1,12 @@ //! Initializing, bootstrapping and launching the node from a provided configuration. #![allow(clippy::type_complexity)] -use std::{marker::PhantomData, sync::Arc, time::Duration}; - +use fc_mapping_sync::{MappingSyncWorker, SyncStrategy}; +use fc_rpc::EthTask; +use futures::StreamExt; use humanode_runtime::{self, opaque::Block, RuntimeApi}; use sc_cli::SubstrateCli; -use sc_client_api::ExecutorProvider; +use sc_client_api::{BlockchainEvents, ExecutorProvider}; use sc_consensus_aura::{ImportQueueParams, SlotDuration, SlotProportion, StartAuraParams}; pub use sc_executor::NativeElseWasmExecutor; use sc_finality_grandpa::SharedVoterState; @@ -15,6 +16,7 @@ use sc_service::{ use sc_telemetry::{Telemetry, TelemetryWorker}; use sp_consensus::SlotData; use sp_consensus_aura::sr25519::{AuthorityId as AuraId, AuthorityPair as AuraPair}; +use std::{marker::PhantomData, sync::Arc, time::Duration}; use tracing::*; use crate::configuration::Configuration; @@ -320,10 +322,9 @@ pub async fn new_full(config: Configuration) -> Result Result Result Result FrontierPrecompiles where R: pallet_evm::Config, { - pub fn new() -> Self { - Self::default() - } - pub fn used_addresses() -> sp_std::vec::Vec { sp_std::vec![1, 2, 3, 4, 5, 1024, 1025] .into_iter() diff --git a/crates/humanode-runtime/src/lib.rs b/crates/humanode-runtime/src/lib.rs index dd6c66c80..7ff7e1204 100644 --- a/crates/humanode-runtime/src/lib.rs +++ b/crates/humanode-runtime/src/lib.rs @@ -469,7 +469,7 @@ impl> FindAuthor for FindAuthorTruncated { parameter_types! { pub const ChainId: u64 = 42; pub BlockGasLimit: U256 = U256::from(u32::max_value()); - pub PrecompilesValue: FrontierPrecompiles = FrontierPrecompiles::<_>::new(); + pub PrecompilesValue: FrontierPrecompiles = FrontierPrecompiles::<_>::default(); } impl pallet_evm::Config for Runtime { From cc76eee57505d0fa916b62dea38b7c1502012fb2 Mon Sep 17 00:00:00 2001 From: dmitrylavrenov Date: Tue, 11 Jan 2022 13:42:44 +0300 Subject: [PATCH 08/42] Fix cargo sort --- crates/humanode-runtime/Cargo.toml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/humanode-runtime/Cargo.toml b/crates/humanode-runtime/Cargo.toml index 64436646a..e90a78d6e 100644 --- a/crates/humanode-runtime/Cargo.toml +++ b/crates/humanode-runtime/Cargo.toml @@ -16,7 +16,9 @@ primitives-auth-ticket = { version = "0.1", path = "../primitives-auth-ticket", robonode-crypto = { version = "0.1", path = "../robonode-crypto", default-features = false } chrono = { version = "0.4.19", default-features = false } -codec = { package = "parity-scale-codec", version = "2", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "2", default-features = false, features = [ + "derive", +] } fp-rpc = { default-features = false, git = "https://github.com/humanode-network/frontier", branch = "substrate-1a30fa2" } fp-self-contained = { default-features = false, git = "https://github.com/humanode-network/frontier", branch = "substrate-1a30fa2" } frame-benchmarking = { default-features = false, optional = true, git = "https://github.com/humanode-network/substrate", branch = "master" } From 99c3b21e078ec6f1c41ae192c6534c4ae499afc3 Mon Sep 17 00:00:00 2001 From: dmitrylavrenov Date: Tue, 11 Jan 2022 13:44:56 +0300 Subject: [PATCH 09/42] Fix std list in humanode-runtime cargo --- crates/humanode-runtime/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/humanode-runtime/Cargo.toml b/crates/humanode-runtime/Cargo.toml index e90a78d6e..813fdcc46 100644 --- a/crates/humanode-runtime/Cargo.toml +++ b/crates/humanode-runtime/Cargo.toml @@ -89,7 +89,7 @@ std = [ "pallet-ethereum/std", "pallet-evm/std", "pallet-evm-precompile-simple/std", - "pallet-evm-precompile-sha3fips/std", + "pallet-evm-precompile-sha3fips/std", "pallet-dynamic-fee/std", "pallet-grandpa/std", "pallet-randomness-collective-flip/std", From d48711fd6390797143dcbe52c82946b25af2cce4 Mon Sep 17 00:00:00 2001 From: dmitrylavrenov Date: Tue, 11 Jan 2022 16:30:42 +0300 Subject: [PATCH 10/42] Use frontier UncheckedExtrinsic as a part of evm integration --- crates/humanode-peer/src/service.rs | 2 +- crates/humanode-runtime/src/frontier_precompiles.rs | 1 + crates/humanode-runtime/src/lib.rs | 7 +++++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/crates/humanode-peer/src/service.rs b/crates/humanode-peer/src/service.rs index ba8b802cb..a4f80fa69 100644 --- a/crates/humanode-peer/src/service.rs +++ b/crates/humanode-peer/src/service.rs @@ -565,7 +565,7 @@ pub async fn new_full(config: Configuration) -> Result PrecompileSet for FrontierPrecompiles where R: pallet_evm::Config, diff --git a/crates/humanode-runtime/src/lib.rs b/crates/humanode-runtime/src/lib.rs index 7ff7e1204..942b65ac3 100644 --- a/crates/humanode-runtime/src/lib.rs +++ b/crates/humanode-runtime/src/lib.rs @@ -587,8 +587,11 @@ pub type SignedExtra = ( pallet_transaction_payment::ChargeTransactionPayment, ); /// Unchecked extrinsic type as expected by this runtime. -pub type UncheckedExtrinsic = generic::UncheckedExtrinsic; +pub type UncheckedExtrinsic = + fp_self_contained::UncheckedExtrinsic; /// Extrinsic type that has already been checked. +pub type CheckedExtrinsic = fp_self_contained::CheckedExtrinsic; +/// Executive: handles dispatch to the various modules. pub type Executive = frame_executive::Executive< Runtime, Block, @@ -902,7 +905,7 @@ impl_runtime_apis! { fn extrinsic_filter( xts: Vec<::Extrinsic>, ) -> Vec { - xts.into_iter().filter_map(|xt| match xt.function { + xts.into_iter().filter_map(|xt| match xt.0.function { Call::Ethereum(transact { transaction }) => Some(transaction), _ => None }).collect::>() From be2627da8b2b8e9c77af96e9fbf567be2f7ba213 Mon Sep 17 00:00:00 2001 From: dmitrylavrenov Date: Tue, 11 Jan 2022 17:19:47 +0300 Subject: [PATCH 11/42] Add dynamic-fee to inherent data providers --- Cargo.lock | 92 ++++++++--------------- crates/humanode-peer/Cargo.toml | 1 + crates/humanode-peer/src/cli/config.rs | 1 + crates/humanode-peer/src/cli/params.rs | 4 + crates/humanode-peer/src/configuration.rs | 3 + crates/humanode-peer/src/service.rs | 21 +++++- 6 files changed, 60 insertions(+), 62 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8caf4386d..79f7ee237 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -82,15 +82,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "ansi_term" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" -dependencies = [ - "winapi 0.3.9", -] - [[package]] name = "ansi_term" version = "0.12.1" @@ -847,11 +838,11 @@ dependencies = [ [[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", @@ -1995,9 +1986,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.17" +version = "0.3.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5da6ba8c3bb3c165d3c7319fc1cc8304facf1fb8db99c5de877183c08a273888" +checksum = "ba3dda0b6588335f360afc675d0564c17a77a2bda81ca178a4b6081bd86c7f0b" dependencies = [ "futures-core", "futures-sink", @@ -2005,9 +1996,9 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.17" +version = "0.3.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88d1c26957f23603395cd326b0ffe64124b818f4449552f960d815cfba83a53d" +checksum = "d0c8ff0461b82559810cdccfde3215c3f373807f5e5232b71479bff7bb2583d7" [[package]] name = "futures-executor" @@ -2023,9 +2014,9 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.17" +version = "0.3.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "522de2a0fe3e380f1bc577ba0474108faf3f6b18321dbf60b3b9c39a75073377" +checksum = "b1f9d34af5a1aac6fb380f735fe510746c38067c5bf16c7fd250280503c971b2" [[package]] name = "futures-lite" @@ -2044,12 +2035,10 @@ dependencies = [ [[package]] name = "futures-macro" -version = "0.3.17" +version = "0.3.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18e4a4b95cea4b4ccbcf1c5675ca7c4ee4e9e75eb79944d07defde18068f79bb" +checksum = "6dbd947adfffb0efc70599b3ddcf7b5597bb5fa9e245eb99f62b3a5f7bb8bd3c" dependencies = [ - "autocfg", - "proc-macro-hack", "proc-macro2", "quote", "syn", @@ -2068,15 +2057,15 @@ dependencies = [ [[package]] name = "futures-sink" -version = "0.3.17" +version = "0.3.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36ea153c13024fe480590b3e3d4cad89a0cfacecc24577b68f86c6ced9c2bc11" +checksum = "e3055baccb68d74ff6480350f8d6eb8fcfa3aa11bdc1a1ae3afdd0514617d508" [[package]] name = "futures-task" -version = "0.3.17" +version = "0.3.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d3d00f4eddb73e498a54394f228cd55853bdf059259e8e7bc6e69d408892e99" +checksum = "6ee7c6485c30167ce4dfb83ac568a849fe53274c831081476ee13e0dce1aad72" [[package]] name = "futures-timer" @@ -2092,11 +2081,10 @@ checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c" [[package]] name = "futures-util" -version = "0.3.17" +version = "0.3.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36568465210a3a6ee45e1f165136d68671471a501e632e9a98d96872222b5481" +checksum = "d9b5cf40b47a271f77a8b1bec03ca09044d99d2372c0de244e66430761127164" dependencies = [ - "autocfg", "futures 0.1.31", "futures-channel", "futures-core", @@ -2107,8 +2095,6 @@ dependencies = [ "memchr", "pin-project-lite 0.2.7", "pin-utils", - "proc-macro-hack", - "proc-macro-nested", "slab", ] @@ -2205,9 +2191,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.7" +version = "0.3.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fd819562fcebdac5afc5c113c3ec36f902840b70fd4fc458799c8ce4607ae55" +checksum = "0c9de88456263e249e241fcd211d3954e2c9b0ef7ccfc235a444eb367cae3689" dependencies = [ "bytes 1.1.0", "fnv", @@ -2224,9 +2210,9 @@ dependencies = [ [[package]] name = "handlebars" -version = "4.1.6" +version = "4.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "167fa173496c9eadd8749cca6f8339ac88e248f3ad2442791d0b743318a94fc0" +checksum = "2483bce82dd3ed52509d0117e4a30a488bd608be250ed7a0185301314239ed31" dependencies = [ "log", "pest", @@ -2460,6 +2446,7 @@ dependencies = [ "indoc", "ngrok-api", "pallet-bioauth", + "pallet-dynamic-fee", "pallet-evm", "parity-scale-codec", "qr2term", @@ -2579,9 +2566,9 @@ dependencies = [ [[package]] name = "hyper" -version = "0.14.14" +version = "0.14.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b91bb1f221b6ea1f1e4371216b70f40748774c2fb5971b450c07773fb92d26b" +checksum = "b7ec3e62bdc98a2f0393a5048e4c30ef659440ea6e0e572965103e72bd836f55" dependencies = [ "bytes 1.1.0", "futures-channel", @@ -5208,18 +5195,6 @@ 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.32" @@ -6208,7 +6183,7 @@ name = "sc-informant" version = "0.10.0-dev" source = "git+https://github.com/humanode-network/substrate?branch=master#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" dependencies = [ - "ansi_term 0.12.1", + "ansi_term", "futures 0.3.17", "futures-timer 3.0.2", "log", @@ -6526,7 +6501,7 @@ name = "sc-tracing" version = "4.0.0-dev" source = "git+https://github.com/humanode-network/substrate?branch=master#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" dependencies = [ - "ansi_term 0.12.1", + "ansi_term", "atty", "chrono", "lazy_static", @@ -7960,7 +7935,7 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate#1306573829700eb5912e342e4372a3735a0b0679" +source = "git+https://github.com/paritytech/substrate#004412194a73741866b9fedc9931a69e6f21de34" dependencies = [ "async-std", "derive_more", @@ -7976,7 +7951,7 @@ name = "substrate-wasm-builder" version = "5.0.0-dev" source = "git+https://github.com/humanode-network/substrate?branch=master#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" dependencies = [ - "ansi_term 0.12.1", + "ansi_term", "build-helper", "cargo_metadata", "sp-maybe-compressed-blob", @@ -8150,11 +8125,10 @@ checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" [[package]] name = "tokio" -version = "1.13.0" +version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "588b2d10a336da58d877567cd8fb8a14b463e2104910f8132cd054b4b96e29ee" +checksum = "fbbf1c778ec206785635ce8ad57fe52b3009ae9e0c9f574a728f3049d3e55838" dependencies = [ - "autocfg", "bytes 1.1.0", "libc", "memchr", @@ -8170,9 +8144,9 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "1.5.1" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "114383b041aa6212c579467afa0075fbbdd0718de036100bc0ba7961d8cb9095" +checksum = "b557f72f448c511a979e2564e55d74e6c4432fc96ff4f6241bc6bded342643b7" dependencies = [ "proc-macro2", "quote", @@ -8323,7 +8297,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", diff --git a/crates/humanode-peer/Cargo.toml b/crates/humanode-peer/Cargo.toml index 59dc6ef2c..72b03412b 100644 --- a/crates/humanode-peer/Cargo.toml +++ b/crates/humanode-peer/Cargo.toml @@ -27,6 +27,7 @@ frame-benchmarking-cli = { git = "https://github.com/humanode-network/substrate" futures = "0.3" hex = "0.4.3" hex-literal = "0.3" +pallet-dynamic-fee = { default-features = false, git = "https://github.com/humanode-network/frontier", branch = "substrate-1a30fa2" } pallet-evm = { default-features = false, git = "https://github.com/humanode-network/frontier", branch = "substrate-1a30fa2" } qr2term = "0.2" reqwest = "0.11" diff --git a/crates/humanode-peer/src/cli/config.rs b/crates/humanode-peer/src/cli/config.rs index 957e7ae09..a94420508 100644 --- a/crates/humanode-peer/src/cli/config.rs +++ b/crates/humanode-peer/src/cli/config.rs @@ -46,6 +46,7 @@ pub trait CliConfigurationExt: SubstrateCliConfigurationProvider { let evm = self.evm_params().map(|params| configuration::Evm { max_past_logs: params.max_past_logs, + target_gas_price: params.target_gas_price, }); Ok(Configuration { diff --git a/crates/humanode-peer/src/cli/params.rs b/crates/humanode-peer/src/cli/params.rs index a39de64ec..746f2b162 100644 --- a/crates/humanode-peer/src/cli/params.rs +++ b/crates/humanode-peer/src/cli/params.rs @@ -38,4 +38,8 @@ pub struct EvmParams { /// Maximum number of logs in a query. #[structopt(long, default_value = "10000")] pub max_past_logs: u32, + + /// The dynamic-fee pallet target gas price set by block author + #[structopt(long, default_value = "1")] + pub target_gas_price: u64, } diff --git a/crates/humanode-peer/src/configuration.rs b/crates/humanode-peer/src/configuration.rs index ded2530e8..bd7a7741a 100644 --- a/crates/humanode-peer/src/configuration.rs +++ b/crates/humanode-peer/src/configuration.rs @@ -55,4 +55,7 @@ impl BioauthFlow { pub struct Evm { /// Maximum number of logs in a query. pub max_past_logs: u32, + + /// The dynamic-fee pallet target gas price set by block author. + pub target_gas_price: u64, } diff --git a/crates/humanode-peer/src/service.rs b/crates/humanode-peer/src/service.rs index a4f80fa69..12b9e7043 100644 --- a/crates/humanode-peer/src/service.rs +++ b/crates/humanode-peer/src/service.rs @@ -16,6 +16,7 @@ use sc_service::{ use sc_telemetry::{Telemetry, TelemetryWorker}; use sp_consensus::SlotData; use sp_consensus_aura::sr25519::{AuthorityId as AuraId, AuthorityPair as AuraPair}; +use sp_core::U256; use std::{marker::PhantomData, sync::Arc, time::Duration}; use tracing::*; @@ -125,9 +126,15 @@ pub fn new_partial( ServiceError, > { let Configuration { - substrate: config, .. + substrate: config, + evm: evm_config, + .. } = config; + let evm_config = evm_config + .as_ref() + .ok_or_else(|| ServiceError::Other("evm config is not set".into()))?; + let telemetry = config .telemetry_endpoints .clone() @@ -186,6 +193,7 @@ pub fn new_partial( let slot_duration = sc_consensus_aura::slot_duration(&*client)?; let raw_slot_duration = slot_duration.slot_duration(); + let target_gas_price = evm_config.target_gas_price; let import_queue = sc_consensus_aura::import_queue::(ImportQueueParams { @@ -201,7 +209,10 @@ pub fn new_partial( raw_slot_duration, ); - Ok((timestamp, slot)) + let dynamic_fee = + pallet_dynamic_fee::InherentDataProvider(U256::from(target_gas_price)); + + Ok((timestamp, slot, dynamic_fee)) }, spawner: &task_manager.spawn_essential_handle(), can_author_with: sp_consensus::CanAuthorWithNativeVersion::new( @@ -284,6 +295,7 @@ pub async fn new_full(config: Configuration) -> Result = None; let prometheus_registry = config.prometheus_registry().cloned(); + let target_gas_price = evm_config.target_gas_price; let proposer_factory = sc_basic_authorship::ProposerFactory::new( task_manager.spawn_handle(), @@ -384,7 +396,10 @@ pub async fn new_full(config: Configuration) -> Result Date: Tue, 11 Jan 2022 23:01:40 +0300 Subject: [PATCH 12/42] Add FrontierBlockImport --- Cargo.lock | 300 +++++++--------------------- Cargo.toml | 4 + crates/humanode-peer/Cargo.toml | 1 + crates/humanode-peer/src/service.rs | 24 ++- 4 files changed, 99 insertions(+), 230 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 79f7ee237..23603fc9a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -426,12 +426,12 @@ dependencies = [ "node-primitives", "parity-scale-codec", "sc-client-api", - "sc-consensus 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sc-consensus", "sc-service", "sp-api", "sp-application-crypto", "sp-blockchain", - "sp-consensus 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-consensus", "sp-consensus-aura", "sp-inherents", "sp-keystore", @@ -1456,11 +1456,11 @@ dependencies = [ "log", "parity-scale-codec", "sc-client-api", - "sc-consensus 0.10.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sc-consensus", "sp-api", - "sp-block-builder 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-block-builder", "sp-blockchain", - "sp-consensus 0.10.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-consensus", "sp-core", "sp-inherents", "sp-runtime", @@ -1783,7 +1783,7 @@ dependencies = [ "sp-externalities", "sp-keystore", "sp-runtime", - "sp-state-machine 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-state-machine", "structopt", ] @@ -1838,7 +1838,7 @@ dependencies = [ "sp-io", "sp-runtime", "sp-staking", - "sp-state-machine 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-state-machine", "sp-std", "sp-tracing", "tt-call", @@ -1892,7 +1892,7 @@ dependencies = [ "sp-io", "sp-runtime", "sp-std", - "sp-version 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-version", ] [[package]] @@ -2433,6 +2433,7 @@ dependencies = [ "async-trait", "bioauth-consensus", "bioauth-flow", + "fc-consensus", "fc-db", "fc-mapping-sync", "fc-rpc", @@ -2457,7 +2458,7 @@ dependencies = [ "sc-chain-spec-derive", "sc-cli", "sc-client-api", - "sc-consensus 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sc-consensus", "sc-consensus-aura", "sc-executor", "sc-finality-grandpa", @@ -2467,11 +2468,11 @@ dependencies = [ "sc-telemetry", "sc-tracing", "sc-transaction-pool", - "sc-utils 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sc-utils", "serde", "serde_json", "sp-application-crypto", - "sp-consensus 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-consensus", "sp-consensus-aura", "sp-core", "sp-finality-grandpa", @@ -2508,7 +2509,7 @@ dependencies = [ "sc-transaction-pool", "sc-transaction-pool-api", "sp-api", - "sp-block-builder 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-block-builder", "sp-blockchain", "substrate-frame-rpc-system", ] @@ -2551,7 +2552,7 @@ dependencies = [ "scale-info", "serde", "sp-api", - "sp-block-builder 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-block-builder", "sp-consensus-aura", "sp-core", "sp-inherents", @@ -2560,7 +2561,7 @@ dependencies = [ "sp-session", "sp-std", "sp-transaction-pool", - "sp-version 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-version", "substrate-wasm-builder", ] @@ -4652,7 +4653,7 @@ dependencies = [ "sp-session", "sp-staking", "sp-std", - "sp-trie 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-trie", ] [[package]] @@ -5836,7 +5837,7 @@ dependencies = [ "sc-transaction-pool-api", "sp-api", "sp-blockchain", - "sp-consensus 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-consensus", "sp-core", "sp-inherents", "sp-runtime", @@ -5851,12 +5852,12 @@ dependencies = [ "parity-scale-codec", "sc-client-api", "sp-api", - "sp-block-builder 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-block-builder", "sp-blockchain", "sp-core", "sp-inherents", "sp-runtime", - "sp-state-machine 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-state-machine", ] [[package]] @@ -5909,16 +5910,16 @@ dependencies = [ "sc-service", "sc-telemetry", "sc-tracing", - "sc-utils 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sc-utils", "serde", "serde_json", "sp-blockchain", "sp-core", "sp-keyring", "sp-keystore", - "sp-panic-handler 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-panic-handler", "sp-runtime", - "sp-version 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-version", "structopt", "thiserror", "tiny-bip39", @@ -5938,18 +5939,18 @@ dependencies = [ "parking_lot", "sc-executor", "sc-transaction-pool-api", - "sc-utils 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sc-utils", "sp-api", "sp-blockchain", - "sp-consensus 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-consensus", "sp-core", "sp-database 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "sp-externalities", "sp-keystore", "sp-runtime", - "sp-state-machine 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-state-machine", "sp-storage", - "sp-trie 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-trie", "substrate-prometheus-endpoint 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", ] @@ -5974,8 +5975,8 @@ dependencies = [ "sp-core", "sp-database 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "sp-runtime", - "sp-state-machine 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-trie 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-state-machine", + "sp-trie", ] [[package]] @@ -5990,42 +5991,18 @@ dependencies = [ "log", "parking_lot", "sc-client-api", - "sc-utils 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sc-utils", "serde", "sp-api", "sp-blockchain", - "sp-consensus 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-consensus", "sp-core", "sp-runtime", - "sp-state-machine 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-state-machine", "substrate-prometheus-endpoint 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "thiserror", ] -[[package]] -name = "sc-consensus" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?rev=1a30fa2#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" -dependencies = [ - "async-trait", - "futures 0.3.17", - "futures-timer 3.0.2", - "libp2p", - "log", - "parking_lot", - "sc-client-api", - "sc-utils 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", - "serde", - "sp-api", - "sp-blockchain", - "sp-consensus 0.10.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", - "sp-core", - "sp-runtime", - "sp-state-machine 0.10.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", - "substrate-prometheus-endpoint 0.10.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", - "thiserror", -] - [[package]] name = "sc-consensus-aura" version = "0.10.0-dev" @@ -6038,14 +6015,14 @@ dependencies = [ "parity-scale-codec", "sc-block-builder", "sc-client-api", - "sc-consensus 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sc-consensus", "sc-consensus-slots", "sc-telemetry", "sp-api", "sp-application-crypto", - "sp-block-builder 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-block-builder", "sp-blockchain", - "sp-consensus 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-consensus", "sp-consensus-aura", "sp-consensus-slots", "sp-core", @@ -6066,17 +6043,17 @@ dependencies = [ "log", "parity-scale-codec", "sc-client-api", - "sc-consensus 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sc-consensus", "sc-telemetry", "sp-api", "sp-arithmetic", "sp-blockchain", - "sp-consensus 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-consensus", "sp-consensus-slots", "sp-core", "sp-inherents", "sp-runtime", - "sp-state-machine 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-state-machine", "sp-timestamp 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "thiserror", ] @@ -6098,11 +6075,11 @@ dependencies = [ "sp-core-hashing-proc-macro", "sp-externalities", "sp-io", - "sp-panic-handler 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-panic-handler", "sp-runtime-interface", "sp-tasks", - "sp-trie 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-version 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-trie", + "sp-version", "sp-wasm-interface", "wasmi", ] @@ -6159,18 +6136,18 @@ dependencies = [ "rand 0.8.4", "sc-block-builder", "sc-client-api", - "sc-consensus 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sc-consensus", "sc-keystore", "sc-network", "sc-network-gossip", "sc-telemetry", - "sc-utils 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sc-utils", "serde_json", "sp-api", "sp-application-crypto", "sp-arithmetic", "sp-blockchain", - "sp-consensus 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-consensus", "sp-core", "sp-finality-grandpa", "sp-keystore", @@ -6242,15 +6219,15 @@ dependencies = [ "rand 0.7.3", "sc-block-builder", "sc-client-api", - "sc-consensus 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sc-consensus", "sc-peerset", - "sc-utils 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sc-utils", "serde", "serde_json", "smallvec", "sp-arithmetic", "sp-blockchain", - "sp-consensus 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-consensus", "sp-core", "sp-finality-grandpa", "sp-runtime", @@ -6296,7 +6273,7 @@ dependencies = [ "rand 0.7.3", "sc-client-api", "sc-network", - "sc-utils 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sc-utils", "sp-api", "sp-core", "sp-offchain", @@ -6313,7 +6290,7 @@ dependencies = [ "futures 0.3.17", "libp2p", "log", - "sc-utils 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sc-utils", "serde_json", "wasm-timer", ] @@ -6345,7 +6322,7 @@ dependencies = [ "sc-rpc-api", "sc-tracing", "sc-transaction-pool-api", - "sc-utils 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sc-utils", "serde_json", "sp-api", "sp-blockchain", @@ -6355,7 +6332,7 @@ dependencies = [ "sp-rpc", "sp-runtime", "sp-session", - "sp-version 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-version", ] [[package]] @@ -6379,7 +6356,7 @@ dependencies = [ "sp-rpc", "sp-runtime", "sp-tracing", - "sp-version 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-version", "thiserror", ] @@ -6423,7 +6400,7 @@ dependencies = [ "sc-chain-spec", "sc-client-api", "sc-client-db", - "sc-consensus 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sc-consensus", "sc-executor", "sc-informant", "sc-keystore", @@ -6435,27 +6412,27 @@ dependencies = [ "sc-tracing", "sc-transaction-pool", "sc-transaction-pool-api", - "sc-utils 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sc-utils", "serde", "serde_json", "sp-api", "sp-application-crypto", - "sp-block-builder 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-block-builder", "sp-blockchain", - "sp-consensus 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-consensus", "sp-core", "sp-externalities", "sp-inherents", "sp-keystore", "sp-runtime", "sp-session", - "sp-state-machine 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-state-machine", "sp-storage", "sp-tracing", "sp-transaction-pool", "sp-transaction-storage-proof", - "sp-trie 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "sp-version 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-trie", + "sp-version", "substrate-prometheus-endpoint 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "tempfile", "thiserror", @@ -6553,7 +6530,7 @@ dependencies = [ "retain_mut", "sc-client-api", "sc-transaction-pool-api", - "sc-utils 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sc-utils", "serde", "sp-api", "sp-blockchain", @@ -6590,17 +6567,6 @@ dependencies = [ "prometheus", ] -[[package]] -name = "sc-utils" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?rev=1a30fa2#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" -dependencies = [ - "futures 0.3.17", - "futures-timer 3.0.2", - "lazy_static", - "prometheus", -] - [[package]] name = "scale-info" version = "1.0.0" @@ -7036,9 +7002,9 @@ dependencies = [ "sp-api-proc-macro", "sp-core", "sp-runtime", - "sp-state-machine 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-state-machine", "sp-std", - "sp-version 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-version", "thiserror", ] @@ -7106,18 +7072,6 @@ dependencies = [ "sp-std", ] -[[package]] -name = "sp-block-builder" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?rev=1a30fa2#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" -dependencies = [ - "parity-scale-codec", - "sp-api", - "sp-inherents", - "sp-runtime", - "sp-std", -] - [[package]] name = "sp-blockchain" version = "4.0.0-dev" @@ -7129,10 +7083,10 @@ dependencies = [ "parity-scale-codec", "parking_lot", "sp-api", - "sp-consensus 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-consensus", "sp-database 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", "sp-runtime", - "sp-state-machine 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-state-machine", "thiserror", ] @@ -7149,28 +7103,9 @@ dependencies = [ "sp-core", "sp-inherents", "sp-runtime", - "sp-state-machine 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-state-machine", "sp-std", - "sp-version 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "thiserror", -] - -[[package]] -name = "sp-consensus" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?rev=1a30fa2#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" -dependencies = [ - "async-trait", - "futures 0.3.17", - "futures-timer 3.0.2", - "log", - "parity-scale-codec", - "sp-core", - "sp-inherents", - "sp-runtime", - "sp-state-machine 0.10.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", - "sp-std", - "sp-version 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-version", "thiserror", ] @@ -7184,7 +7119,7 @@ dependencies = [ "scale-info", "sp-api", "sp-application-crypto", - "sp-consensus 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-consensus", "sp-consensus-slots", "sp-inherents", "sp-runtime", @@ -7362,10 +7297,10 @@ dependencies = [ "sp-externalities", "sp-keystore", "sp-runtime-interface", - "sp-state-machine 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-state-machine", "sp-std", "sp-tracing", - "sp-trie 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-trie", "sp-wasm-interface", "tracing", "tracing-core", @@ -7427,16 +7362,6 @@ dependencies = [ "regex", ] -[[package]] -name = "sp-panic-handler" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?rev=1a30fa2#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" -dependencies = [ - "backtrace", - "lazy_static", - "regex", -] - [[package]] name = "sp-rpc" version = "4.0.0-dev" @@ -7546,32 +7471,9 @@ dependencies = [ "smallvec", "sp-core", "sp-externalities", - "sp-panic-handler 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-panic-handler", "sp-std", - "sp-trie 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "thiserror", - "tracing", - "trie-db", - "trie-root", -] - -[[package]] -name = "sp-state-machine" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?rev=1a30fa2#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" -dependencies = [ - "hash-db", - "log", - "num-traits", - "parity-scale-codec", - "parking_lot", - "rand 0.7.3", - "smallvec", - "sp-core", - "sp-externalities", - "sp-panic-handler 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", - "sp-std", - "sp-trie 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-trie", "thiserror", "tracing", "trie-db", @@ -7675,7 +7577,7 @@ dependencies = [ "sp-inherents", "sp-runtime", "sp-std", - "sp-trie 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-trie", ] [[package]] @@ -7693,21 +7595,6 @@ dependencies = [ "trie-root", ] -[[package]] -name = "sp-trie" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?rev=1a30fa2#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" -dependencies = [ - "hash-db", - "memory-db", - "parity-scale-codec", - "scale-info", - "sp-core", - "sp-std", - "trie-db", - "trie-root", -] - [[package]] name = "sp-version" version = "4.0.0-dev" @@ -7720,23 +7607,7 @@ dependencies = [ "serde", "sp-runtime", "sp-std", - "sp-version-proc-macro 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", - "thiserror", -] - -[[package]] -name = "sp-version" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?rev=1a30fa2#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" -dependencies = [ - "impl-serde", - "parity-scale-codec", - "parity-wasm 0.42.2", - "scale-info", - "serde", - "sp-runtime", - "sp-std", - "sp-version-proc-macro 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-version-proc-macro", "thiserror", ] @@ -7751,17 +7622,6 @@ dependencies = [ "syn", ] -[[package]] -name = "sp-version-proc-macro" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?rev=1a30fa2#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" -dependencies = [ - "parity-scale-codec", - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "sp-wasm-interface" version = "4.0.0" @@ -7898,7 +7758,7 @@ dependencies = [ "sc-rpc-api", "sc-transaction-pool-api", "sp-api", - "sp-block-builder 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-block-builder", "sp-blockchain", "sp-core", "sp-runtime", @@ -7918,20 +7778,6 @@ dependencies = [ "tokio", ] -[[package]] -name = "substrate-prometheus-endpoint" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?rev=1a30fa2#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" -dependencies = [ - "async-std", - "derive_more", - "futures-util", - "hyper", - "log", - "prometheus", - "tokio", -] - [[package]] name = "substrate-prometheus-endpoint" version = "0.10.0-dev" diff --git a/Cargo.toml b/Cargo.toml index 75d75f993..fca6affe5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,14 +8,18 @@ members = ["crates/*"] frame-system = { git = "https://github.com/humanode-network/substrate", branch = "master" } pallet-balances = { git = "https://github.com/humanode-network/substrate", branch = "master" } pallet-timestamp = { git = "https://github.com/humanode-network/substrate", branch = "master" } + sc-block-builder = { git = "https://github.com/humanode-network/substrate", branch = "master" } sc-client-api = { git = "https://github.com/humanode-network/substrate", branch = "master" } + sc-consensus = { git = "https://github.com/humanode-network/substrate", branch = "master" } sc-network = { git = "https://github.com/humanode-network/substrate", branch = "master" } sc-rpc = { git = "https://github.com/humanode-network/substrate", branch = "master" } sc-service = { git = "https://github.com/humanode-network/substrate", branch = "master" } sc-transaction-pool = { git = "https://github.com/humanode-network/substrate", branch = "master" } sc-transaction-pool-api = { git = "https://github.com/humanode-network/substrate", branch = "master" } sp-api = { git = "https://github.com/humanode-network/substrate", branch = "master" } + sp-block-builder = { git = "https://github.com/humanode-network/substrate", branch = "master" } sp-blockchain = { git = "https://github.com/humanode-network/substrate", branch = "master" } + sp-consensus = { git = "https://github.com/humanode-network/substrate", branch = "master" } sp-core = { git = "https://github.com/humanode-network/substrate", branch = "master" } sp-externalities = { git = "https://github.com/humanode-network/substrate", branch = "master" } sp-inherents = { git = "https://github.com/humanode-network/substrate", branch = "master" } diff --git a/crates/humanode-peer/Cargo.toml b/crates/humanode-peer/Cargo.toml index 72b03412b..18a84a55f 100644 --- a/crates/humanode-peer/Cargo.toml +++ b/crates/humanode-peer/Cargo.toml @@ -19,6 +19,7 @@ robonode-client = { version = "0.1", path = "../robonode-client" } anyhow = "1" async-trait = "0.1" codec = { package = "parity-scale-codec", version = "2.0.0" } +fc-consensus = { default-features = false, git = "https://github.com/humanode-network/frontier", branch = "substrate-1a30fa2" } fc-db = { default-features = false, git = "https://github.com/humanode-network/frontier", branch = "substrate-1a30fa2" } fc-mapping-sync = { default-features = false, git = "https://github.com/humanode-network/frontier", branch = "substrate-1a30fa2" } fc-rpc = { default-features = false, git = "https://github.com/humanode-network/frontier", branch = "substrate-1a30fa2" } diff --git a/crates/humanode-peer/src/service.rs b/crates/humanode-peer/src/service.rs index 12b9e7043..6b258ea46 100644 --- a/crates/humanode-peer/src/service.rs +++ b/crates/humanode-peer/src/service.rs @@ -1,6 +1,7 @@ //! Initializing, bootstrapping and launching the node from a provided configuration. #![allow(clippy::type_complexity)] +use fc_consensus::FrontierBlockImport; use fc_mapping_sync::{MappingSyncWorker, SyncStrategy}; use fc_rpc::EthTask; use futures::StreamExt; @@ -54,6 +55,14 @@ type FullSelectChain = sc_consensus::LongestChain; /// Full node Grandpa type. type FullGrandpa = sc_finality_grandpa::GrandpaBlockImport; +/// Full BlockImport Frontier type. +type FullFrontier = FrontierBlockImport< + Block, + sc_finality_grandpa::GrandpaBlockImport, + FullClient, +>; +/// Frontier backend type. +type FrontierBackend = fc_db::Backend; /// Construct a bare keystore from the configuration. pub fn keystore_container( @@ -114,12 +123,13 @@ pub fn new_partial( FullBackend, Block, FullClient, - FullGrandpa, + FullFrontier, bioauth_consensus::aura::BlockAuthorExtractor, bioauth_consensus::api::AuthorizationVerifier, >, SlotDuration, Duration, + Arc, Option, ), >, @@ -184,9 +194,16 @@ pub fn new_partial( telemetry.as_ref().map(|x| x.handle()), )?; + let frontier_backend = open_frontier_backend(config)?; + let frontier_block_import = FrontierBlockImport::new( + grandpa_block_import.clone(), + Arc::clone(&client), + Arc::clone(&frontier_backend), + ); + let bioauth_consensus_block_import = bioauth_consensus::BioauthBlockImport::new( Arc::clone(&client), - grandpa_block_import.clone(), + frontier_block_import, bioauth_consensus::aura::BlockAuthorExtractor::new(Arc::clone(&client)), bioauth_consensus::api::AuthorizationVerifier::new(Arc::clone(&client)), ); @@ -237,6 +254,7 @@ pub fn new_partial( bioauth_consensus_block_import, slot_duration, raw_slot_duration, + frontier_backend, telemetry, ), }) @@ -260,6 +278,7 @@ pub async fn new_full(config: Configuration) -> Result Result Date: Tue, 11 Jan 2022 23:09:10 +0300 Subject: [PATCH 13/42] Avoid code duplication for getting evm_config --- crates/humanode-peer/src/service.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/humanode-peer/src/service.rs b/crates/humanode-peer/src/service.rs index 6b258ea46..65711dfc4 100644 --- a/crates/humanode-peer/src/service.rs +++ b/crates/humanode-peer/src/service.rs @@ -304,7 +304,7 @@ pub async fn new_full(config: Configuration) -> Result Date: Wed, 12 Jan 2022 17:52:12 +0300 Subject: [PATCH 14/42] Add NetApi to humanode-rpc --- crates/humanode-rpc/src/lib.rs | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/crates/humanode-rpc/src/lib.rs b/crates/humanode-rpc/src/lib.rs index ba983f0f8..df2757c5b 100644 --- a/crates/humanode-rpc/src/lib.rs +++ b/crates/humanode-rpc/src/lib.rs @@ -4,8 +4,8 @@ use std::sync::Arc; use bioauth_flow::rpc::{Bioauth, BioauthApi, LivenessDataTxSlot, ValidatorKeyExtractorT}; use fc_rpc::{ - EthApi, EthApiServer, EthPubSubApi, EthPubSubApiServer, HexEncodedIdProvider, Web3Api, - Web3ApiServer, + EthApi, EthApiServer, EthPubSubApi, EthPubSubApiServer, HexEncodedIdProvider, NetApi, + NetApiServer, Web3Api, Web3ApiServer, }; use fc_rpc::{ EthBlockDataCache, OverrideHandle, RuntimeApiStorageOverride, SchemaV1Override, @@ -147,8 +147,8 @@ where io.extend_with(EthPubSubApiServer::to_delegate(EthPubSubApi::new( pool, - client, - network, + Arc::clone(&client), + Arc::clone(&network), SubscriptionManager::::with_id_provider( HexEncodedIdProvider::default(), Arc::new(subscription_task_executor), @@ -156,5 +156,11 @@ where overrides, ))); + io.extend_with(NetApiServer::to_delegate(NetApi::new( + client, network, + // Whether to format the `peer_count` response as Hex (default) or not. + true, + ))); + io } From 36431d369912893d66092608917ec1a05c2a1f87 Mon Sep 17 00:00:00 2001 From: dmitrylavrenov Date: Wed, 12 Jan 2022 17:54:22 +0300 Subject: [PATCH 15/42] Use FullGrandpa type instead of the whole Grandpa def --- crates/humanode-peer/src/service.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/crates/humanode-peer/src/service.rs b/crates/humanode-peer/src/service.rs index 65711dfc4..a323f15de 100644 --- a/crates/humanode-peer/src/service.rs +++ b/crates/humanode-peer/src/service.rs @@ -56,11 +56,7 @@ type FullSelectChain = sc_consensus::LongestChain; type FullGrandpa = sc_finality_grandpa::GrandpaBlockImport; /// Full BlockImport Frontier type. -type FullFrontier = FrontierBlockImport< - Block, - sc_finality_grandpa::GrandpaBlockImport, - FullClient, ->; +type FullFrontier = FrontierBlockImport; /// Frontier backend type. type FrontierBackend = fc_db::Backend; From 6e837ad2f3f744f95a7e4bf04bb78e53d26f6f29 Mon Sep 17 00:00:00 2001 From: dmitrylavrenov Date: Wed, 12 Jan 2022 18:49:21 +0300 Subject: [PATCH 16/42] Add FilterApi to humanode-rpc --- crates/humanode-peer/src/service.rs | 22 +++++++++++++++++++++- crates/humanode-rpc/src/lib.rs | 25 +++++++++++++++++++++---- 2 files changed, 42 insertions(+), 5 deletions(-) diff --git a/crates/humanode-peer/src/service.rs b/crates/humanode-peer/src/service.rs index a323f15de..5ba6d3503 100644 --- a/crates/humanode-peer/src/service.rs +++ b/crates/humanode-peer/src/service.rs @@ -4,6 +4,7 @@ use fc_consensus::FrontierBlockImport; use fc_mapping_sync::{MappingSyncWorker, SyncStrategy}; use fc_rpc::EthTask; +use fc_rpc_core::types::FilterPool; use futures::StreamExt; use humanode_runtime::{self, opaque::Block, RuntimeApi}; use sc_cli::SubstrateCli; @@ -18,7 +19,12 @@ use sc_telemetry::{Telemetry, TelemetryWorker}; use sp_consensus::SlotData; use sp_consensus_aura::sr25519::{AuthorityId as AuraId, AuthorityPair as AuraPair}; use sp_core::U256; -use std::{marker::PhantomData, sync::Arc, time::Duration}; +use std::{ + collections::BTreeMap, + marker::PhantomData, + sync::{Arc, Mutex}, + time::Duration, +}; use tracing::*; use crate::configuration::Configuration; @@ -311,6 +317,7 @@ pub async fn new_full(config: Configuration) -> Result = None; let prometheus_registry = config.prometheus_registry().cloned(); let target_gas_price = evm_config.target_gas_price; + let filter_pool: Option = Some(Arc::new(Mutex::new(BTreeMap::new()))); let proposer_factory = sc_basic_authorship::ProposerFactory::new( task_manager.spawn_handle(), @@ -359,6 +366,7 @@ pub async fn new_full(config: Configuration) -> Result Result Result { pub graph: Arc>, /// Network service pub network: Arc>, + /// EthFilterApi pool. + pub filter_pool: Option, /// Backend. pub backend: Arc>, /// Maximum number of logs in a query. @@ -87,6 +90,7 @@ where validator_key_extractor, graph, network, + filter_pool, backend, max_past_logs, } = deps; @@ -153,14 +157,27 @@ where HexEncodedIdProvider::default(), Arc::new(subscription_task_executor), ), - overrides, + Arc::clone(&overrides), ))); io.extend_with(NetApiServer::to_delegate(NetApi::new( - client, network, + Arc::clone(&client), + Arc::clone(&network), // Whether to format the `peer_count` response as Hex (default) or not. true, ))); + if let Some(filter_pool) = filter_pool { + io.extend_with(EthFilterApiServer::to_delegate(EthFilterApi::new( + client, + backend, + filter_pool, + 500_usize, // max stored filters + overrides, + max_past_logs, + block_data_cache, + ))); + } + io } From 35d76b9435d999b48704ffd2d784b7e93e3495d0 Mon Sep 17 00:00:00 2001 From: dmitrylavrenov Date: Wed, 12 Jan 2022 18:57:22 +0300 Subject: [PATCH 17/42] Export max_stored_filters to evm_config params --- crates/humanode-peer/src/cli/config.rs | 1 + crates/humanode-peer/src/cli/params.rs | 6 +++++- crates/humanode-peer/src/configuration.rs | 3 +++ crates/humanode-peer/src/service.rs | 2 ++ crates/humanode-rpc/src/lib.rs | 5 ++++- 5 files changed, 15 insertions(+), 2 deletions(-) diff --git a/crates/humanode-peer/src/cli/config.rs b/crates/humanode-peer/src/cli/config.rs index a94420508..a39323f25 100644 --- a/crates/humanode-peer/src/cli/config.rs +++ b/crates/humanode-peer/src/cli/config.rs @@ -46,6 +46,7 @@ pub trait CliConfigurationExt: SubstrateCliConfigurationProvider { let evm = self.evm_params().map(|params| configuration::Evm { max_past_logs: params.max_past_logs, + max_stored_filters: params.max_stored_filters, target_gas_price: params.target_gas_price, }); diff --git a/crates/humanode-peer/src/cli/params.rs b/crates/humanode-peer/src/cli/params.rs index 746f2b162..bcf63b710 100644 --- a/crates/humanode-peer/src/cli/params.rs +++ b/crates/humanode-peer/src/cli/params.rs @@ -39,7 +39,11 @@ pub struct EvmParams { #[structopt(long, default_value = "10000")] pub max_past_logs: u32, - /// The dynamic-fee pallet target gas price set by block author + /// Maximum number of stored filters. + #[structopt(long, default_value = "500")] + pub max_stored_filters: usize, + + /// The dynamic-fee pallet target gas price set by block author. #[structopt(long, default_value = "1")] pub target_gas_price: u64, } diff --git a/crates/humanode-peer/src/configuration.rs b/crates/humanode-peer/src/configuration.rs index bd7a7741a..6f61836a3 100644 --- a/crates/humanode-peer/src/configuration.rs +++ b/crates/humanode-peer/src/configuration.rs @@ -56,6 +56,9 @@ pub struct Evm { /// Maximum number of logs in a query. pub max_past_logs: u32, + /// Maximum number of stored filters. + pub max_stored_filters: usize, + /// The dynamic-fee pallet target gas price set by block author. pub target_gas_price: u64, } diff --git a/crates/humanode-peer/src/service.rs b/crates/humanode-peer/src/service.rs index 5ba6d3503..894238132 100644 --- a/crates/humanode-peer/src/service.rs +++ b/crates/humanode-peer/src/service.rs @@ -367,6 +367,7 @@ pub async fn new_full(config: Configuration) -> Result Result { pub network: Arc>, /// EthFilterApi pool. pub filter_pool: Option, + /// Maximum number of stored filters. + pub max_stored_filters: usize, /// Backend. pub backend: Arc>, /// Maximum number of logs in a query. @@ -91,6 +93,7 @@ where graph, network, filter_pool, + max_stored_filters, backend, max_past_logs, } = deps; @@ -172,7 +175,7 @@ where client, backend, filter_pool, - 500_usize, // max stored filters + max_stored_filters, overrides, max_past_logs, block_data_cache, From c9f6d65f901583fd149f1dd1fd2b4937769b8b1a Mon Sep 17 00:00:00 2001 From: MOZGIII Date: Fri, 14 Jan 2022 14:43:21 +0300 Subject: [PATCH 18/42] Correct the patch list --- Cargo.lock | 81 ++++++++++++++---------------------------------------- Cargo.toml | 3 ++ 2 files changed, 24 insertions(+), 60 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1b7275243..6ed72063b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1464,8 +1464,8 @@ dependencies = [ "sp-core", "sp-inherents", "sp-runtime", - "sp-timestamp 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", - "substrate-prometheus-endpoint 0.10.0-dev (git+https://github.com/paritytech/substrate)", + "sp-timestamp", + "substrate-prometheus-endpoint", ] [[package]] @@ -1480,7 +1480,7 @@ dependencies = [ "parity-scale-codec", "parking_lot", "sp-core", - "sp-database 4.0.0-dev (git+https://github.com/paritytech/substrate?rev=1a30fa2)", + "sp-database", "sp-runtime", ] @@ -2480,7 +2480,7 @@ dependencies = [ "sp-keystore", "sp-panic-handler", "sp-runtime", - "sp-timestamp 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-timestamp", "structopt", "thiserror", "tokio", @@ -4686,7 +4686,7 @@ dependencies = [ "sp-inherents", "sp-runtime", "sp-std", - "sp-timestamp 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-timestamp", ] [[package]] @@ -5843,7 +5843,7 @@ dependencies = [ "sp-core", "sp-inherents", "sp-runtime", - "substrate-prometheus-endpoint 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "substrate-prometheus-endpoint", ] [[package]] @@ -5946,14 +5946,14 @@ dependencies = [ "sp-blockchain", "sp-consensus", "sp-core", - "sp-database 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-database", "sp-externalities", "sp-keystore", "sp-runtime", "sp-state-machine", "sp-storage", "sp-trie", - "substrate-prometheus-endpoint 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "substrate-prometheus-endpoint", ] [[package]] @@ -5975,7 +5975,7 @@ dependencies = [ "sp-arithmetic", "sp-blockchain", "sp-core", - "sp-database 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-database", "sp-runtime", "sp-state-machine", "sp-trie", @@ -6001,7 +6001,7 @@ dependencies = [ "sp-core", "sp-runtime", "sp-state-machine", - "substrate-prometheus-endpoint 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "substrate-prometheus-endpoint", "thiserror", ] @@ -6031,7 +6031,7 @@ dependencies = [ "sp-inherents", "sp-keystore", "sp-runtime", - "substrate-prometheus-endpoint 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "substrate-prometheus-endpoint", ] [[package]] @@ -6056,7 +6056,7 @@ dependencies = [ "sp-inherents", "sp-runtime", "sp-state-machine", - "sp-timestamp 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-timestamp", "thiserror", ] @@ -6154,7 +6154,7 @@ dependencies = [ "sp-finality-grandpa", "sp-keystore", "sp-runtime", - "substrate-prometheus-endpoint 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "substrate-prometheus-endpoint", ] [[package]] @@ -6233,7 +6233,7 @@ dependencies = [ "sp-core", "sp-finality-grandpa", "sp-runtime", - "substrate-prometheus-endpoint 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "substrate-prometheus-endpoint", "thiserror", "unsigned-varint 0.6.0", "void", @@ -6252,7 +6252,7 @@ dependencies = [ "lru 0.7.0", "sc-network", "sp-runtime", - "substrate-prometheus-endpoint 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "substrate-prometheus-endpoint", "tracing", ] @@ -6303,7 +6303,7 @@ version = "0.10.0-dev" source = "git+https://github.com/humanode-network/substrate?branch=master#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" dependencies = [ "log", - "substrate-prometheus-endpoint 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "substrate-prometheus-endpoint", ] [[package]] @@ -6375,7 +6375,7 @@ dependencies = [ "jsonrpc-ws-server", "log", "serde_json", - "substrate-prometheus-endpoint 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "substrate-prometheus-endpoint", "tokio", ] @@ -6435,7 +6435,7 @@ dependencies = [ "sp-transaction-storage-proof", "sp-trie", "sp-version", - "substrate-prometheus-endpoint 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "substrate-prometheus-endpoint", "tempfile", "thiserror", "tokio", @@ -6540,7 +6540,7 @@ dependencies = [ "sp-runtime", "sp-tracing", "sp-transaction-pool", - "substrate-prometheus-endpoint 0.10.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "substrate-prometheus-endpoint", "thiserror", ] @@ -7086,7 +7086,7 @@ dependencies = [ "parking_lot", "sp-api", "sp-consensus", - "sp-database 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-database", "sp-runtime", "sp-state-machine", "thiserror", @@ -7126,7 +7126,7 @@ dependencies = [ "sp-inherents", "sp-runtime", "sp-std", - "sp-timestamp 4.0.0-dev (git+https://github.com/humanode-network/substrate?branch=master)", + "sp-timestamp", ] [[package]] @@ -7222,15 +7222,6 @@ dependencies = [ "parking_lot", ] -[[package]] -name = "sp-database" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?rev=1a30fa2#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" -dependencies = [ - "kvdb", - "parking_lot", -] - [[package]] name = "sp-debug-derive" version = "4.0.0" @@ -7529,22 +7520,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "sp-timestamp" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?rev=1a30fa2#1a30fa202e00dfeac07cb648e1f557ce938d5f1a" -dependencies = [ - "async-trait", - "futures-timer 3.0.2", - "log", - "parity-scale-codec", - "sp-api", - "sp-inherents", - "sp-runtime", - "sp-std", - "thiserror", -] - [[package]] name = "sp-tracing" version = "4.0.0" @@ -7780,20 +7755,6 @@ dependencies = [ "tokio", ] -[[package]] -name = "substrate-prometheus-endpoint" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate#004412194a73741866b9fedc9931a69e6f21de34" -dependencies = [ - "async-std", - "derive_more", - "futures-util", - "hyper", - "log", - "prometheus", - "tokio", -] - [[package]] name = "substrate-wasm-builder" version = "5.0.0-dev" diff --git a/Cargo.toml b/Cargo.toml index fca6affe5..7a992920c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,10 +21,13 @@ members = ["crates/*"] sp-blockchain = { git = "https://github.com/humanode-network/substrate", branch = "master" } sp-consensus = { git = "https://github.com/humanode-network/substrate", branch = "master" } sp-core = { git = "https://github.com/humanode-network/substrate", branch = "master" } + sp-database = { git = "https://github.com/humanode-network/substrate", branch = "master" } sp-externalities = { git = "https://github.com/humanode-network/substrate", branch = "master" } sp-inherents = { git = "https://github.com/humanode-network/substrate", branch = "master" } sp-io = { git = "https://github.com/humanode-network/substrate", branch = "master" } sp-runtime = { git = "https://github.com/humanode-network/substrate", branch = "master" } sp-std = { git = "https://github.com/humanode-network/substrate", branch = "master" } sp-storage = { git = "https://github.com/humanode-network/substrate", branch = "master" } + sp-timestamp = { git = "https://github.com/humanode-network/substrate", branch = "master" } sp-transaction-pool = { git = "https://github.com/humanode-network/substrate", branch = "master" } + substrate-prometheus-endpoint = { git = "https://github.com/humanode-network/substrate", branch = "master" } From d395c3b3d6848758b7b946a9215ac789f68b614d Mon Sep 17 00:00:00 2001 From: MOZGIII Date: Fri, 14 Jan 2022 14:44:02 +0300 Subject: [PATCH 19/42] Correct the indent at Cargo.toml --- Cargo.toml | 56 +++++++++++++++++++++++++++--------------------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 7a992920c..6547170dc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,31 +3,31 @@ resolver = "2" members = ["crates/*"] [patch."https://github.com/paritytech/substrate"] - frame-benchmarking = { git = "https://github.com/humanode-network/substrate", branch = "master" } - frame-support = { git = "https://github.com/humanode-network/substrate", branch = "master" } - frame-system = { git = "https://github.com/humanode-network/substrate", branch = "master" } - pallet-balances = { git = "https://github.com/humanode-network/substrate", branch = "master" } - pallet-timestamp = { git = "https://github.com/humanode-network/substrate", branch = "master" } - sc-block-builder = { git = "https://github.com/humanode-network/substrate", branch = "master" } - sc-client-api = { git = "https://github.com/humanode-network/substrate", branch = "master" } - sc-consensus = { git = "https://github.com/humanode-network/substrate", branch = "master" } - sc-network = { git = "https://github.com/humanode-network/substrate", branch = "master" } - sc-rpc = { git = "https://github.com/humanode-network/substrate", branch = "master" } - sc-service = { git = "https://github.com/humanode-network/substrate", branch = "master" } - sc-transaction-pool = { git = "https://github.com/humanode-network/substrate", branch = "master" } - sc-transaction-pool-api = { git = "https://github.com/humanode-network/substrate", branch = "master" } - sp-api = { git = "https://github.com/humanode-network/substrate", branch = "master" } - sp-block-builder = { git = "https://github.com/humanode-network/substrate", branch = "master" } - sp-blockchain = { git = "https://github.com/humanode-network/substrate", branch = "master" } - sp-consensus = { git = "https://github.com/humanode-network/substrate", branch = "master" } - sp-core = { git = "https://github.com/humanode-network/substrate", branch = "master" } - sp-database = { git = "https://github.com/humanode-network/substrate", branch = "master" } - sp-externalities = { git = "https://github.com/humanode-network/substrate", branch = "master" } - sp-inherents = { git = "https://github.com/humanode-network/substrate", branch = "master" } - sp-io = { git = "https://github.com/humanode-network/substrate", branch = "master" } - sp-runtime = { git = "https://github.com/humanode-network/substrate", branch = "master" } - sp-std = { git = "https://github.com/humanode-network/substrate", branch = "master" } - sp-storage = { git = "https://github.com/humanode-network/substrate", branch = "master" } - sp-timestamp = { git = "https://github.com/humanode-network/substrate", branch = "master" } - sp-transaction-pool = { git = "https://github.com/humanode-network/substrate", branch = "master" } - substrate-prometheus-endpoint = { git = "https://github.com/humanode-network/substrate", branch = "master" } +frame-benchmarking = { git = "https://github.com/humanode-network/substrate", branch = "master" } +frame-support = { git = "https://github.com/humanode-network/substrate", branch = "master" } +frame-system = { git = "https://github.com/humanode-network/substrate", branch = "master" } +pallet-balances = { git = "https://github.com/humanode-network/substrate", branch = "master" } +pallet-timestamp = { git = "https://github.com/humanode-network/substrate", branch = "master" } +sc-block-builder = { git = "https://github.com/humanode-network/substrate", branch = "master" } +sc-client-api = { git = "https://github.com/humanode-network/substrate", branch = "master" } +sc-consensus = { git = "https://github.com/humanode-network/substrate", branch = "master" } +sc-network = { git = "https://github.com/humanode-network/substrate", branch = "master" } +sc-rpc = { git = "https://github.com/humanode-network/substrate", branch = "master" } +sc-service = { git = "https://github.com/humanode-network/substrate", branch = "master" } +sc-transaction-pool = { git = "https://github.com/humanode-network/substrate", branch = "master" } +sc-transaction-pool-api = { git = "https://github.com/humanode-network/substrate", branch = "master" } +sp-api = { git = "https://github.com/humanode-network/substrate", branch = "master" } +sp-block-builder = { git = "https://github.com/humanode-network/substrate", branch = "master" } +sp-blockchain = { git = "https://github.com/humanode-network/substrate", branch = "master" } +sp-consensus = { git = "https://github.com/humanode-network/substrate", branch = "master" } +sp-core = { git = "https://github.com/humanode-network/substrate", branch = "master" } +sp-database = { git = "https://github.com/humanode-network/substrate", branch = "master" } +sp-externalities = { git = "https://github.com/humanode-network/substrate", branch = "master" } +sp-inherents = { git = "https://github.com/humanode-network/substrate", branch = "master" } +sp-io = { git = "https://github.com/humanode-network/substrate", branch = "master" } +sp-runtime = { git = "https://github.com/humanode-network/substrate", branch = "master" } +sp-std = { git = "https://github.com/humanode-network/substrate", branch = "master" } +sp-storage = { git = "https://github.com/humanode-network/substrate", branch = "master" } +sp-timestamp = { git = "https://github.com/humanode-network/substrate", branch = "master" } +sp-transaction-pool = { git = "https://github.com/humanode-network/substrate", branch = "master" } +substrate-prometheus-endpoint = { git = "https://github.com/humanode-network/substrate", branch = "master" } From c3cb5cf667c39f3b2e23f10ff7c99b4c0ce74497 Mon Sep 17 00:00:00 2001 From: dmitrylavrenov Date: Fri, 14 Jan 2022 18:25:52 +0300 Subject: [PATCH 20/42] Remove not used CI address --- crates/humanode-peer/src/chain_spec.rs | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/crates/humanode-peer/src/chain_spec.rs b/crates/humanode-peer/src/chain_spec.rs index 24ff576e4..ed2bcd98f 100644 --- a/crates/humanode-peer/src/chain_spec.rs +++ b/crates/humanode-peer/src/chain_spec.rs @@ -233,18 +233,6 @@ fn testnet_genesis( storage: Default::default(), }, ); - map.insert( - // H160 address of CI test runner account - H160::from_str("6be02d1d3665660d22ff9624b7be0551ee1ac91b") - .expect("internal H160 is valid; qed"), - pallet_evm::GenesisAccount { - balance: U256::from_str("0xffffffffffffffffffffffffffffffff") - .expect("internal U256 is valid; qed"), - code: Default::default(), - nonce: Default::default(), - storage: Default::default(), - }, - ); map }, }, From 6835f4fb7d45af4fc613d43853ebb63bd2431aa4 Mon Sep 17 00:00:00 2001 From: dmitrylavrenov Date: Fri, 14 Jan 2022 18:29:19 +0300 Subject: [PATCH 21/42] Update comment for max_past_logs at params.rs --- crates/humanode-peer/src/cli/params.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/humanode-peer/src/cli/params.rs b/crates/humanode-peer/src/cli/params.rs index bcf63b710..55b2876d2 100644 --- a/crates/humanode-peer/src/cli/params.rs +++ b/crates/humanode-peer/src/cli/params.rs @@ -35,7 +35,8 @@ pub struct BioauthFlowParams { /// Shared CLI parameters used to configure evm. #[derive(Debug, StructOpt, Clone)] pub struct EvmParams { - /// Maximum number of logs in a query. + /// Maximum number of logs to keep from the latest block; + /// it is notpossible to query logs older than this in the past. #[structopt(long, default_value = "10000")] pub max_past_logs: u32, From 3a64d1248136db7589ce508b81b501a5e671b161 Mon Sep 17 00:00:00 2001 From: dmitrylavrenov Date: Fri, 14 Jan 2022 18:31:05 +0300 Subject: [PATCH 22/42] Update comment for max_past_logs at configuration.rs --- crates/humanode-peer/src/configuration.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/humanode-peer/src/configuration.rs b/crates/humanode-peer/src/configuration.rs index 6f61836a3..727e3cb79 100644 --- a/crates/humanode-peer/src/configuration.rs +++ b/crates/humanode-peer/src/configuration.rs @@ -53,7 +53,8 @@ impl BioauthFlow { /// EVM configuration parameters. pub struct Evm { - /// Maximum number of logs in a query. + /// Maximum number of logs to keep from the latest block; + /// it is notpossible to query logs older than this in the past. pub max_past_logs: u32, /// Maximum number of stored filters. From 5b7c66e79cd1c2f582652aa3af578a37ef65277f Mon Sep 17 00:00:00 2001 From: dmitrylavrenov Date: Fri, 14 Jan 2022 18:34:25 +0300 Subject: [PATCH 23/42] Edit comments for FullGrandpa and FullFrontier type aliases --- crates/humanode-peer/src/service.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/humanode-peer/src/service.rs b/crates/humanode-peer/src/service.rs index 894238132..f15246ecf 100644 --- a/crates/humanode-peer/src/service.rs +++ b/crates/humanode-peer/src/service.rs @@ -58,10 +58,10 @@ type FullClient = sc_service::TFullClient; type FullBackend = sc_service::TFullBackend; /// Full node select chain type. type FullSelectChain = sc_consensus::LongestChain; -/// Full node Grandpa type. +/// Full type for GrandpaBlockImport. type FullGrandpa = sc_finality_grandpa::GrandpaBlockImport; -/// Full BlockImport Frontier type. +/// Full type for FrontierBlockImport. type FullFrontier = FrontierBlockImport; /// Frontier backend type. type FrontierBackend = fc_db::Backend; From 8669741cd8a31b0880a8c3e8b894561f310bea2f Mon Sep 17 00:00:00 2001 From: dmitrylavrenov Date: Fri, 14 Jan 2022 18:39:58 +0300 Subject: [PATCH 24/42] Define a FullBioauth type --- crates/humanode-peer/src/service.rs | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/crates/humanode-peer/src/service.rs b/crates/humanode-peer/src/service.rs index f15246ecf..d13cd48d6 100644 --- a/crates/humanode-peer/src/service.rs +++ b/crates/humanode-peer/src/service.rs @@ -63,6 +63,15 @@ type FullGrandpa = sc_finality_grandpa::GrandpaBlockImport; /// Full type for FrontierBlockImport. type FullFrontier = FrontierBlockImport; +/// Full type for BioauthBlockImport. +type FullBioauth = bioauth_consensus::BioauthBlockImport< + FullBackend, + Block, + FullClient, + FullFrontier, + bioauth_consensus::aura::BlockAuthorExtractor, + bioauth_consensus::api::AuthorizationVerifier, +>; /// Frontier backend type. type FrontierBackend = fc_db::Backend; @@ -121,14 +130,7 @@ pub fn new_partial( ( FullGrandpa, sc_finality_grandpa::LinkHalf, - bioauth_consensus::BioauthBlockImport< - FullBackend, - Block, - FullClient, - FullFrontier, - bioauth_consensus::aura::BlockAuthorExtractor, - bioauth_consensus::api::AuthorizationVerifier, - >, + FullBioauth, SlotDuration, Duration, Arc, From 415d32f95ac832bc241b8db05924a58d03c37b80 Mon Sep 17 00:00:00 2001 From: dmitrylavrenov Date: Fri, 14 Jan 2022 18:49:55 +0300 Subject: [PATCH 25/42] Remove wrapping with Arc and use it later when needed --- crates/humanode-peer/src/service.rs | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/crates/humanode-peer/src/service.rs b/crates/humanode-peer/src/service.rs index d13cd48d6..9a9e35677 100644 --- a/crates/humanode-peer/src/service.rs +++ b/crates/humanode-peer/src/service.rs @@ -106,15 +106,13 @@ pub fn frontier_database_dir(config: &sc_service::Configuration) -> std::path::P /// Construct frontier backend. pub fn open_frontier_backend( config: &sc_service::Configuration, -) -> Result>, String> { - Ok(Arc::new(fc_db::Backend::::new( - &fc_db::DatabaseSettings { - source: fc_db::DatabaseSettingsSrc::RocksDb { - path: frontier_database_dir(config), - cache_size: 0, - }, +) -> Result, String> { + fc_db::Backend::::new(&fc_db::DatabaseSettings { + source: fc_db::DatabaseSettingsSrc::RocksDb { + path: frontier_database_dir(config), + cache_size: 0, }, - )?)) + }) } /// Extract substrate partial components. @@ -198,7 +196,7 @@ pub fn new_partial( telemetry.as_ref().map(|x| x.handle()), )?; - let frontier_backend = open_frontier_backend(config)?; + let frontier_backend = Arc::new(open_frontier_backend(config)?); let frontier_block_import = FrontierBlockImport::new( grandpa_block_import.clone(), Arc::clone(&client), From 1b2232656cc94842981d20b5101395ba591b5c5c Mon Sep 17 00:00:00 2001 From: dmitrylavrenov Date: Mon, 17 Jan 2022 15:32:26 +0300 Subject: [PATCH 26/42] Return Gerald account as Ethereum dev account --- crates/humanode-peer/src/chain_spec.rs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/crates/humanode-peer/src/chain_spec.rs b/crates/humanode-peer/src/chain_spec.rs index ed2bcd98f..22da927cf 100644 --- a/crates/humanode-peer/src/chain_spec.rs +++ b/crates/humanode-peer/src/chain_spec.rs @@ -233,6 +233,23 @@ fn testnet_genesis( storage: Default::default(), }, ); + map.insert( + // H160 address of Gerald dev account + // Public address: 0x6Be02d1d3665660d22FF9624b7BE0551ee1Ac91b + // Private key: 0x99b3c12287537e38c90a9219d4cb074a89a16e9cdb20bf85728ebd97c343e342 + // A proper private key should be used to allow testing EVM as Ethereum developer + // For example, use it at Metamask, Remix, Truffle configuration, etc + // We don't have a good converter between Substrate and Ethereum private keys for now. + H160::from_str("6be02d1d3665660d22ff9624b7be0551ee1ac91b") + .expect("internal H160 is valid; qed"), + pallet_evm::GenesisAccount { + balance: U256::from_str("0xffffffffffffffffffffffffffffffff") + .expect("internal U256 is valid; qed"), + code: Default::default(), + nonce: Default::default(), + storage: Default::default(), + }, + ); map }, }, From 19584ac8c1fbe75ee58981295aaaafe8730f21ca Mon Sep 17 00:00:00 2001 From: dmitrylavrenov Date: Mon, 17 Jan 2022 22:00:14 +0300 Subject: [PATCH 27/42] Fix comments based on review --- crates/humanode-peer/src/cli/params.rs | 2 +- crates/humanode-peer/src/configuration.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/humanode-peer/src/cli/params.rs b/crates/humanode-peer/src/cli/params.rs index 55b2876d2..e33e4eb29 100644 --- a/crates/humanode-peer/src/cli/params.rs +++ b/crates/humanode-peer/src/cli/params.rs @@ -36,7 +36,7 @@ pub struct BioauthFlowParams { #[derive(Debug, StructOpt, Clone)] pub struct EvmParams { /// Maximum number of logs to keep from the latest block; - /// it is notpossible to query logs older than this in the past. + /// it is not possible to query logs older than this amount from the latest block in the past. #[structopt(long, default_value = "10000")] pub max_past_logs: u32, diff --git a/crates/humanode-peer/src/configuration.rs b/crates/humanode-peer/src/configuration.rs index 727e3cb79..00a1fc41d 100644 --- a/crates/humanode-peer/src/configuration.rs +++ b/crates/humanode-peer/src/configuration.rs @@ -53,8 +53,8 @@ impl BioauthFlow { /// EVM configuration parameters. pub struct Evm { - /// Maximum number of logs to keep from the latest block; - /// it is notpossible to query logs older than this in the past. + /// Maximum number of blocks to keep the log information available + /// for querying via the RPC (from the latest block). pub max_past_logs: u32, /// Maximum number of stored filters. From 2f357cb8151a0799be429281a884562b5765b98a Mon Sep 17 00:00:00 2001 From: dmitrylavrenov Date: Mon, 17 Jan 2022 22:14:12 +0300 Subject: [PATCH 28/42] Move subscription_task_executor to Deps --- crates/humanode-peer/src/service.rs | 38 ++++++++++++++--------------- crates/humanode-rpc/src/lib.rs | 7 +++--- 2 files changed, 22 insertions(+), 23 deletions(-) diff --git a/crates/humanode-peer/src/service.rs b/crates/humanode-peer/src/service.rs index 9a9e35677..b87f32f1b 100644 --- a/crates/humanode-peer/src/service.rs +++ b/crates/humanode-peer/src/service.rs @@ -356,9 +356,6 @@ pub async fn new_full(config: Configuration) -> Result Result { pub backend: Arc>, /// Maximum number of logs in a query. pub max_past_logs: u32, + /// Subscription task executor instance. + pub subscription_task_executor: Arc, } /// Instantiate all RPC extensions. pub fn create( deps: Deps, - subscription_task_executor: SubscriptionTaskExecutor, ) -> jsonrpc_core::IoHandler where BE: Backend + 'static, @@ -96,6 +96,7 @@ where max_stored_filters, backend, max_past_logs, + subscription_task_executor, } = deps; io.extend_with(SystemApi::to_delegate(FullSystem::new( @@ -158,7 +159,7 @@ where Arc::clone(&network), SubscriptionManager::::with_id_provider( HexEncodedIdProvider::default(), - Arc::new(subscription_task_executor), + subscription_task_executor, ), Arc::clone(&overrides), ))); From f7da4fdd1b24675b0c69f2596d24dded7705de7a Mon Sep 17 00:00:00 2001 From: dmitrylavrenov Date: Mon, 17 Jan 2022 22:18:51 +0300 Subject: [PATCH 29/42] Use raw_slot_duration at frontier-mapping-sync-worker --- crates/humanode-peer/src/service.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/humanode-peer/src/service.rs b/crates/humanode-peer/src/service.rs index b87f32f1b..06c160a44 100644 --- a/crates/humanode-peer/src/service.rs +++ b/crates/humanode-peer/src/service.rs @@ -477,7 +477,7 @@ pub async fn new_full(config: Configuration) -> Result Date: Tue, 18 Jan 2022 23:02:57 +0300 Subject: [PATCH 30/42] Make frontier-related function to separate mod --- crates/humanode-peer/src/service/frontier.rs | 26 ++++++++++++++ .../src/{service.rs => service/mod.rs} | 34 +++---------------- 2 files changed, 30 insertions(+), 30 deletions(-) create mode 100644 crates/humanode-peer/src/service/frontier.rs rename crates/humanode-peer/src/{service.rs => service/mod.rs} (96%) diff --git a/crates/humanode-peer/src/service/frontier.rs b/crates/humanode-peer/src/service/frontier.rs new file mode 100644 index 000000000..ab018ae1c --- /dev/null +++ b/crates/humanode-peer/src/service/frontier.rs @@ -0,0 +1,26 @@ +use humanode_runtime::opaque::Block; +use sc_cli::SubstrateCli; +use sc_service::BasePath; + +/// Create frontier dir. +pub fn database_dir(config: &sc_service::Configuration) -> std::path::PathBuf { + let config_dir = config + .base_path + .as_ref() + .map(|base_path| base_path.config_dir(config.chain_spec.id())) + .unwrap_or_else(|| { + BasePath::from_project("", "", &crate::cli::Root::executable_name()) + .config_dir(config.chain_spec.id()) + }); + config_dir.join("frontier").join("db") +} + +/// Construct frontier backend. +pub fn open_backend(config: &sc_service::Configuration) -> Result, String> { + fc_db::Backend::::new(&fc_db::DatabaseSettings { + source: fc_db::DatabaseSettingsSrc::RocksDb { + path: database_dir(config), + cache_size: 0, + }, + }) +} diff --git a/crates/humanode-peer/src/service.rs b/crates/humanode-peer/src/service/mod.rs similarity index 96% rename from crates/humanode-peer/src/service.rs rename to crates/humanode-peer/src/service/mod.rs index 06c160a44..8651e8ac5 100644 --- a/crates/humanode-peer/src/service.rs +++ b/crates/humanode-peer/src/service/mod.rs @@ -7,14 +7,11 @@ use fc_rpc::EthTask; use fc_rpc_core::types::FilterPool; use futures::StreamExt; use humanode_runtime::{self, opaque::Block, RuntimeApi}; -use sc_cli::SubstrateCli; use sc_client_api::{BlockchainEvents, ExecutorProvider}; use sc_consensus_aura::{ImportQueueParams, SlotDuration, SlotProportion, StartAuraParams}; pub use sc_executor::NativeElseWasmExecutor; use sc_finality_grandpa::SharedVoterState; -use sc_service::{ - BasePath, Error as ServiceError, KeystoreContainer, PartialComponents, TaskManager, -}; +use sc_service::{Error as ServiceError, KeystoreContainer, PartialComponents, TaskManager}; use sc_telemetry::{Telemetry, TelemetryWorker}; use sp_consensus::SlotData; use sp_consensus_aura::sr25519::{AuthorityId as AuraId, AuthorityPair as AuraPair}; @@ -29,6 +26,8 @@ use tracing::*; use crate::configuration::Configuration; +pub mod frontier; + /// Declare an instance of the native executor named `ExecutorDispatch`. Include the wasm binary as /// the equivalent wasm code. pub struct ExecutorDispatch; @@ -90,31 +89,6 @@ pub fn keystore_container( Ok((keystore_container, task_manager)) } -/// Create frontier dir. -pub fn frontier_database_dir(config: &sc_service::Configuration) -> std::path::PathBuf { - let config_dir = config - .base_path - .as_ref() - .map(|base_path| base_path.config_dir(config.chain_spec.id())) - .unwrap_or_else(|| { - BasePath::from_project("", "", &crate::cli::Root::executable_name()) - .config_dir(config.chain_spec.id()) - }); - config_dir.join("frontier").join("db") -} - -/// Construct frontier backend. -pub fn open_frontier_backend( - config: &sc_service::Configuration, -) -> Result, String> { - fc_db::Backend::::new(&fc_db::DatabaseSettings { - source: fc_db::DatabaseSettingsSrc::RocksDb { - path: frontier_database_dir(config), - cache_size: 0, - }, - }) -} - /// Extract substrate partial components. pub fn new_partial( config: &Configuration, @@ -196,7 +170,7 @@ pub fn new_partial( telemetry.as_ref().map(|x| x.handle()), )?; - let frontier_backend = Arc::new(open_frontier_backend(config)?); + let frontier_backend = Arc::new(frontier::open_backend(config)?); let frontier_block_import = FrontierBlockImport::new( grandpa_block_import.clone(), Arc::clone(&client), From 8b0351c23bc213547fe278f1ba793d4f2328b7f1 Mon Sep 17 00:00:00 2001 From: dmitrylavrenov Date: Tue, 18 Jan 2022 23:05:06 +0300 Subject: [PATCH 31/42] Add missing doc for frontier mod --- crates/humanode-peer/src/service/frontier.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crates/humanode-peer/src/service/frontier.rs b/crates/humanode-peer/src/service/frontier.rs index ab018ae1c..0585fc4c2 100644 --- a/crates/humanode-peer/src/service/frontier.rs +++ b/crates/humanode-peer/src/service/frontier.rs @@ -1,3 +1,5 @@ +//! The Frontier related stuff. + use humanode_runtime::opaque::Block; use sc_cli::SubstrateCli; use sc_service::BasePath; From 69bbb7ddeb9b66e6d7855770d5e729f99c9bbc57 Mon Sep 17 00:00:00 2001 From: dmitrylavrenov Date: Tue, 18 Jan 2022 23:28:11 +0300 Subject: [PATCH 32/42] Use super::Block at frontier mod --- crates/humanode-peer/src/service/frontier.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/humanode-peer/src/service/frontier.rs b/crates/humanode-peer/src/service/frontier.rs index 0585fc4c2..8476f67e8 100644 --- a/crates/humanode-peer/src/service/frontier.rs +++ b/crates/humanode-peer/src/service/frontier.rs @@ -1,6 +1,6 @@ //! The Frontier related stuff. -use humanode_runtime::opaque::Block; +use super::Block; use sc_cli::SubstrateCli; use sc_service::BasePath; From 3451193f8e16fe530e8bb3705a8efd003758ec41 Mon Sep 17 00:00:00 2001 From: dmitrylavrenov Date: Tue, 18 Jan 2022 23:34:08 +0300 Subject: [PATCH 33/42] Remove not used CheckedExtrinsic --- crates/humanode-runtime/src/lib.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/crates/humanode-runtime/src/lib.rs b/crates/humanode-runtime/src/lib.rs index 942b65ac3..8a2fd0c3c 100644 --- a/crates/humanode-runtime/src/lib.rs +++ b/crates/humanode-runtime/src/lib.rs @@ -589,8 +589,7 @@ pub type SignedExtra = ( /// Unchecked extrinsic type as expected by this runtime. pub type UncheckedExtrinsic = fp_self_contained::UncheckedExtrinsic; -/// Extrinsic type that has already been checked. -pub type CheckedExtrinsic = fp_self_contained::CheckedExtrinsic; + /// Executive: handles dispatch to the various modules. pub type Executive = frame_executive::Executive< Runtime, From de2a96643ab6faefc7f23657970546512b5910d2 Mon Sep 17 00:00:00 2001 From: dmitrylavrenov Date: Wed, 19 Jan 2022 11:52:44 +0300 Subject: [PATCH 34/42] Use spawn_blocking for frontier-mapping-sync-worker --- crates/humanode-peer/src/service/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/humanode-peer/src/service/mod.rs b/crates/humanode-peer/src/service/mod.rs index 8651e8ac5..5693de266 100644 --- a/crates/humanode-peer/src/service/mod.rs +++ b/crates/humanode-peer/src/service/mod.rs @@ -446,7 +446,7 @@ pub async fn new_full(config: Configuration) -> Result Date: Wed, 19 Jan 2022 16:19:48 +0300 Subject: [PATCH 35/42] Implement TransactionConverterApi and RuntimeTransactionConverter --- Cargo.lock | 26 +++++++++++++++++ crates/frontier-api/Cargo.toml | 15 ++++++++++ crates/frontier-api/src/lib.rs | 16 +++++++++++ crates/humanode-rpc/Cargo.toml | 3 ++ crates/humanode-rpc/src/lib.rs | 8 ++++-- crates/humanode-runtime/Cargo.toml | 1 + crates/humanode-runtime/src/lib.rs | 35 ++++++++--------------- crates/primitives-frontier/Cargo.toml | 14 ++++++++++ crates/primitives-frontier/src/lib.rs | 40 +++++++++++++++++++++++++++ 9 files changed, 132 insertions(+), 26 deletions(-) create mode 100644 crates/frontier-api/Cargo.toml create mode 100644 crates/frontier-api/src/lib.rs create mode 100644 crates/primitives-frontier/Cargo.toml create mode 100644 crates/primitives-frontier/src/lib.rs diff --git a/Cargo.lock b/Cargo.lock index 6ed72063b..88f61df71 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1919,6 +1919,16 @@ dependencies = [ "sp-api", ] +[[package]] +name = "frontier-api" +version = "0.1.0" +dependencies = [ + "pallet-ethereum", + "parity-scale-codec", + "sp-api", + "sp-std", +] + [[package]] name = "fs-swap" version = "0.2.6" @@ -2498,11 +2508,13 @@ dependencies = [ "fc-rpc", "fc-rpc-core", "fp-rpc", + "frontier-api", "humanode-runtime", "jsonrpc-core", "jsonrpc-pubsub", "pallet-ethereum", "pallet-transaction-payment-rpc", + "primitives-frontier", "robonode-client", "sc-client-api", "sc-network", @@ -2513,6 +2525,7 @@ dependencies = [ "sp-api", "sp-block-builder", "sp-blockchain", + "sp-runtime", "substrate-frame-rpc-system", ] @@ -2531,6 +2544,7 @@ dependencies = [ "frame-system", "frame-system-benchmarking", "frame-system-rpc-runtime-api", + "frontier-api", "hex-literal", "pallet-aura", "pallet-balances", @@ -5146,6 +5160,18 @@ dependencies = [ "sp-std", ] +[[package]] +name = "primitives-frontier" +version = "0.1.0" +dependencies = [ + "fp-rpc", + "frontier-api", + "pallet-ethereum", + "sp-api", + "sp-blockchain", + "sp-runtime", +] + [[package]] name = "primitives-liveness-data" version = "0.1.0" diff --git a/crates/frontier-api/Cargo.toml b/crates/frontier-api/Cargo.toml new file mode 100644 index 000000000..ab4f6e297 --- /dev/null +++ b/crates/frontier-api/Cargo.toml @@ -0,0 +1,15 @@ +[package] +name = "frontier-api" +version = "0.1.0" +edition = "2021" +publish = false + +[dependencies] +codec = { package = "parity-scale-codec", version = "2", default-features = false } +pallet-ethereum = { default-features = false, git = "https://github.com/humanode-network/frontier", branch = "substrate-1a30fa2" } +sp-api = { default-features = false, git = "https://github.com/humanode-network/substrate", branch = "master" } +sp-std = { default-features = false, git = "https://github.com/humanode-network/substrate", branch = "master" } + +[features] +default = ["std"] +std = ["codec/std", "sp-api/std", "sp-std/std", "pallet-ethereum/std"] diff --git a/crates/frontier-api/src/lib.rs b/crates/frontier-api/src/lib.rs new file mode 100644 index 000000000..ec30e6d5f --- /dev/null +++ b/crates/frontier-api/src/lib.rs @@ -0,0 +1,16 @@ +//! The runtime API for the frontier related stuff. + +#![cfg_attr(not(feature = "std"), no_std)] +// `decl_runtime_apis` macro has issues. +#![allow(clippy::too_many_arguments, clippy::unnecessary_mut_passed)] + +use codec::Decode; +use sp_std::prelude::*; + +sp_api::decl_runtime_apis! { + /// Runtime API for the transaction converter. + pub trait TransactionConverterApi { + /// Convert an ethereum transaction to an extrinsic. + fn convert_transaction(transaction: pallet_ethereum::Transaction) -> Extrinsic; + } +} diff --git a/crates/humanode-rpc/Cargo.toml b/crates/humanode-rpc/Cargo.toml index b476dedf9..29c873fe4 100644 --- a/crates/humanode-rpc/Cargo.toml +++ b/crates/humanode-rpc/Cargo.toml @@ -7,7 +7,9 @@ publish = false [dependencies] bioauth-flow = { version = "0.1", path = "../bioauth-flow" } bioauth-flow-api = { version = "0.1", path = "../bioauth-flow-api" } +frontier-api = { version = "0.1", path = "../frontier-api", default-features = false } humanode-runtime = { version = "0.1", path = "../humanode-runtime" } +primitives-frontier = { version = "0.1", path = "../primitives-frontier" } robonode-client = { version = "0.1", path = "../robonode-client" } fc-db = { default-features = false, git = "https://github.com/humanode-network/frontier", branch = "substrate-1a30fa2" } @@ -27,4 +29,5 @@ sc-transaction-pool-api = { git = "https://github.com/humanode-network/substrate sp-api = { git = "https://github.com/humanode-network/substrate", branch = "master" } sp-block-builder = { git = "https://github.com/humanode-network/substrate", branch = "master" } sp-blockchain = { git = "https://github.com/humanode-network/substrate", branch = "master" } +sp-runtime = { git = "https://github.com/humanode-network/substrate", branch = "master" } substrate-frame-rpc-system = { git = "https://github.com/humanode-network/substrate", branch = "master" } diff --git a/crates/humanode-rpc/src/lib.rs b/crates/humanode-rpc/src/lib.rs index a58a1bc73..58bd4568e 100644 --- a/crates/humanode-rpc/src/lib.rs +++ b/crates/humanode-rpc/src/lib.rs @@ -12,7 +12,10 @@ use fc_rpc::{ SchemaV2Override, StorageOverride, }; use fc_rpc_core::types::FilterPool; -use humanode_runtime::{opaque::Block, AccountId, Balance, Hash, Index, UnixMilliseconds}; +use humanode_runtime::{ + opaque::{Block, UncheckedExtrinsic}, + AccountId, Balance, Hash, Index, UnixMilliseconds, +}; use jsonrpc_pubsub::manager::SubscriptionManager; use pallet_ethereum::EthereumStorageSchema; use sc_client_api::{ @@ -73,6 +76,7 @@ where C::Api: bioauth_flow_api::BioauthFlowApi, C::Api: BlockBuilder, C::Api: fp_rpc::EthereumRuntimeRPCApi, + C::Api: frontier_api::TransactionConverterApi, VKE: ValidatorKeyExtractorT + Send + Sync + 'static, VKE::PublicKeyType: Encode, VKE::Error: std::fmt::Debug, @@ -139,7 +143,7 @@ where Arc::clone(&client), Arc::clone(&pool), graph, - humanode_runtime::TransactionConverter, + primitives_frontier::RuntimeTransactionConverter::new(Arc::clone(&client)), Arc::clone(&network), Vec::new(), Arc::clone(&overrides), diff --git a/crates/humanode-runtime/Cargo.toml b/crates/humanode-runtime/Cargo.toml index 813fdcc46..4ce0d1bf9 100644 --- a/crates/humanode-runtime/Cargo.toml +++ b/crates/humanode-runtime/Cargo.toml @@ -11,6 +11,7 @@ substrate-wasm-builder = { git = "https://github.com/humanode-network/substrate" [dependencies] bioauth-consensus-api = { version = "0.1", path = "../bioauth-consensus-api", default-features = false } bioauth-flow-api = { version = "0.1", path = "../bioauth-flow-api", default-features = false } +frontier-api = { version = "0.1", path = "../frontier-api", default-features = false } pallet-bioauth = { version = "0.1", path = "../pallet-bioauth", default-features = false } primitives-auth-ticket = { version = "0.1", path = "../primitives-auth-ticket", default-features = false } robonode-crypto = { version = "0.1", path = "../robonode-crypto", default-features = false } diff --git a/crates/humanode-runtime/src/lib.rs b/crates/humanode-runtime/src/lib.rs index 8a2fd0c3c..a972ea7c4 100644 --- a/crates/humanode-runtime/src/lib.rs +++ b/crates/humanode-runtime/src/lib.rs @@ -545,30 +545,6 @@ construct_runtime!( } ); -pub struct TransactionConverter; - -impl fp_rpc::ConvertTransaction for TransactionConverter { - fn convert_transaction(&self, transaction: pallet_ethereum::Transaction) -> UncheckedExtrinsic { - UncheckedExtrinsic::new_unsigned( - pallet_ethereum::Call::::transact { transaction }.into(), - ) - } -} - -impl fp_rpc::ConvertTransaction for TransactionConverter { - fn convert_transaction( - &self, - transaction: pallet_ethereum::Transaction, - ) -> opaque::UncheckedExtrinsic { - let extrinsic = UncheckedExtrinsic::new_unsigned( - pallet_ethereum::Call::::transact { transaction }.into(), - ); - let encoded = extrinsic.encode(); - opaque::UncheckedExtrinsic::decode(&mut &encoded[..]) - .expect("Encoded extrinsic is always valid") - } -} - /// The address format for describing accounts. pub type Address = sp_runtime::MultiAddress; /// Block header type as expected by this runtime. @@ -738,6 +714,17 @@ impl_runtime_apis! { } } + impl frontier_api::TransactionConverterApi for Runtime { + fn convert_transaction(transaction: pallet_ethereum::Transaction) -> opaque::UncheckedExtrinsic { + let extrinsic = UncheckedExtrinsic::new_unsigned( + pallet_ethereum::Call::::transact { transaction }.into(), + ); + let encoded = extrinsic.encode(); + opaque::UncheckedExtrinsic::decode(&mut &encoded[..]) + .expect("Encoded extrinsic is always valid") + } + } + impl sp_session::SessionKeys for Runtime { fn generate_session_keys(seed: Option>) -> Vec { opaque::SessionKeys::generate(seed) diff --git a/crates/primitives-frontier/Cargo.toml b/crates/primitives-frontier/Cargo.toml new file mode 100644 index 000000000..eb8a5d74b --- /dev/null +++ b/crates/primitives-frontier/Cargo.toml @@ -0,0 +1,14 @@ +[package] +name = "primitives-frontier" +version = "0.1.0" +edition = "2021" +publish = false + +[dependencies] +frontier-api = { version = "0.1", path = "../frontier-api", default-features = false } + +fp-rpc = { default-features = false, git = "https://github.com/humanode-network/frontier", branch = "substrate-1a30fa2" } +pallet-ethereum = { default-features = false, git = "https://github.com/humanode-network/frontier", branch = "substrate-1a30fa2" } +sp-api = { default-features = false, git = "https://github.com/humanode-network/substrate", branch = "master" } +sp-blockchain = { default-features = false, git = "https://github.com/humanode-network/substrate", branch = "master" } +sp-runtime = { default-features = false, git = "https://github.com/humanode-network/substrate", branch = "master" } diff --git a/crates/primitives-frontier/src/lib.rs b/crates/primitives-frontier/src/lib.rs new file mode 100644 index 000000000..a341210a2 --- /dev/null +++ b/crates/primitives-frontier/src/lib.rs @@ -0,0 +1,40 @@ +//! Frontier related primitives. + +use frontier_api::TransactionConverterApi; +use sp_api::ProvideRuntimeApi; +use sp_blockchain::HeaderBackend; +use sp_runtime::traits::Block as BlockT; +use std::{marker::PhantomData, sync::Arc}; + +/// Ethereum transaction converter to an extrinsic. +pub struct RuntimeTransactionConverter { + /// The client provides access to the runtime. + client: Arc, + /// The type of the block used in the chain. + _phantom_block: PhantomData, +} + +impl RuntimeTransactionConverter { + /// Create a new [`RuntimeTransactionConverter`]. + pub fn new(client: Arc) -> Self { + Self { + client, + _phantom_block: PhantomData, + } + } +} + +impl fp_rpc::ConvertTransaction + for RuntimeTransactionConverter +where + Client: HeaderBackend + ProvideRuntimeApi, + Client::Api: TransactionConverterApi, +{ + fn convert_transaction(&self, transaction: pallet_ethereum::Transaction) -> Block::Extrinsic { + let at = sp_api::BlockId::Hash(self.client.info().best_hash); + self.client + .runtime_api() + .convert_transaction(&at, transaction) + .unwrap() + } +} From 0926af17b3bb006270b45c8f91ab11493d711104 Mon Sep 17 00:00:00 2001 From: dmitrylavrenov Date: Wed, 19 Jan 2022 16:35:23 +0300 Subject: [PATCH 36/42] Getting eth address as a helper function --- crates/humanode-runtime/src/lib.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/crates/humanode-runtime/src/lib.rs b/crates/humanode-runtime/src/lib.rs index a972ea7c4..e3ecf11dc 100644 --- a/crates/humanode-runtime/src/lib.rs +++ b/crates/humanode-runtime/src/lib.rs @@ -452,6 +452,10 @@ impl pallet_bioauth::Config for Runtime { type MaxNonces = MaxNonces; } +pub fn get_ethereum_address(authority_id: AuraId) -> H160 { + H160::from_slice(&authority_id.to_raw_vec()[4..24]) +} + pub struct FindAuthorTruncated(PhantomData); impl> FindAuthor for FindAuthorTruncated { fn find_author<'a, I>(digests: I) -> Option @@ -460,7 +464,7 @@ impl> FindAuthor for FindAuthorTruncated { { if let Some(author_index) = F::find_author(digests) { let authority_id = Aura::authorities()[author_index as usize].clone(); - return Some(H160::from_slice(&authority_id.to_raw_vec()[4..24])); + return Some(get_ethereum_address(authority_id)); } None } From e59ddbaa072be1eb31cbe6718ccaa6267a617bba Mon Sep 17 00:00:00 2001 From: dmitrylavrenov Date: Thu, 20 Jan 2022 01:59:05 +0300 Subject: [PATCH 37/42] Use updated frontier fork --- Cargo.lock | 86 +++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 60 insertions(+), 26 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 88f61df71..6e18c2e63 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -351,6 +351,18 @@ dependencies = [ "winapi 0.3.9", ] +[[package]] +name = "auto_impl" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7862e21c893d65a1650125d157eaeec691439379a1cee17ee49031b79236ada4" +dependencies = [ + "proc-macro-error", + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "autocfg" version = "1.0.1" @@ -1324,6 +1336,25 @@ dependencies = [ "triehash", ] +[[package]] +name = "ethereum" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34c90e0a755da706ce0970ec0fa8cc48aabcc8e8efa1245336acf718dab06ffe" +dependencies = [ + "bytes 1.1.0", + "ethereum-types", + "hash-db", + "hash256-std-hasher", + "parity-scale-codec", + "rlp", + "rlp-derive", + "scale-info", + "serde", + "sha3 0.9.1", + "triehash", +] + [[package]] name = "ethereum-types" version = "0.12.1" @@ -1348,12 +1379,13 @@ checksum = "f7531096570974c3a9dcf9e4b8e1cede1ec26cf5046219fb3b9d897503b9be59" [[package]] name = "evm" -version = "0.33.0" +version = "0.33.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2068bbfe82315b76637b601c73810ec7e92d542bad02f0155182915e832c6357" +checksum = "408ffdd509e16de15ea9b51f5333748f6086601f29d445d2ba53dd7e95565574" dependencies = [ + "auto_impl", "environmental", - "ethereum", + "ethereum 0.10.0", "evm-core", "evm-gasometer", "evm-runtime", @@ -1445,7 +1477,7 @@ dependencies = [ [[package]] name = "fc-consensus" version = "2.0.0-dev" -source = "git+https://github.com/humanode-network/frontier?branch=substrate-1a30fa2#26bf32c18044785756eba89478c24b2bf730f719" +source = "git+https://github.com/humanode-network/frontier?branch=substrate-1a30fa2#864ef8d7e97ede08c758394c5f9e2a57bbef7218" dependencies = [ "async-trait", "derive_more", @@ -1471,7 +1503,7 @@ dependencies = [ [[package]] name = "fc-db" version = "2.0.0-dev" -source = "git+https://github.com/humanode-network/frontier?branch=substrate-1a30fa2#26bf32c18044785756eba89478c24b2bf730f719" +source = "git+https://github.com/humanode-network/frontier?branch=substrate-1a30fa2#864ef8d7e97ede08c758394c5f9e2a57bbef7218" dependencies = [ "fp-storage", "kvdb", @@ -1487,7 +1519,7 @@ dependencies = [ [[package]] name = "fc-mapping-sync" version = "2.0.0-dev" -source = "git+https://github.com/humanode-network/frontier?branch=substrate-1a30fa2#26bf32c18044785756eba89478c24b2bf730f719" +source = "git+https://github.com/humanode-network/frontier?branch=substrate-1a30fa2#864ef8d7e97ede08c758394c5f9e2a57bbef7218" dependencies = [ "fc-consensus", "fc-db", @@ -1505,9 +1537,9 @@ dependencies = [ [[package]] name = "fc-rpc" version = "2.0.0-dev" -source = "git+https://github.com/humanode-network/frontier?branch=substrate-1a30fa2#26bf32c18044785756eba89478c24b2bf730f719" +source = "git+https://github.com/humanode-network/frontier?branch=substrate-1a30fa2#864ef8d7e97ede08c758394c5f9e2a57bbef7218" dependencies = [ - "ethereum", + "ethereum 0.11.1", "ethereum-types", "evm", "fc-consensus", @@ -1540,19 +1572,21 @@ dependencies = [ "sc-transaction-pool-api", "sha3 0.8.2", "sp-api", + "sp-block-builder", "sp-blockchain", "sp-io", "sp-runtime", "sp-storage", "sp-transaction-pool", + "tokio", ] [[package]] name = "fc-rpc-core" version = "1.1.0-dev" -source = "git+https://github.com/humanode-network/frontier?branch=substrate-1a30fa2#26bf32c18044785756eba89478c24b2bf730f719" +source = "git+https://github.com/humanode-network/frontier?branch=substrate-1a30fa2#864ef8d7e97ede08c758394c5f9e2a57bbef7218" dependencies = [ - "ethereum", + "ethereum 0.11.1", "ethereum-types", "jsonrpc-core", "jsonrpc-core-client", @@ -1672,9 +1706,9 @@ dependencies = [ [[package]] name = "fp-consensus" version = "2.0.0-dev" -source = "git+https://github.com/humanode-network/frontier?branch=substrate-1a30fa2#26bf32c18044785756eba89478c24b2bf730f719" +source = "git+https://github.com/humanode-network/frontier?branch=substrate-1a30fa2#864ef8d7e97ede08c758394c5f9e2a57bbef7218" dependencies = [ - "ethereum", + "ethereum 0.11.1", "parity-scale-codec", "rlp", "sha3 0.8.2", @@ -1686,7 +1720,7 @@ dependencies = [ [[package]] name = "fp-evm" version = "3.0.0-dev" -source = "git+https://github.com/humanode-network/frontier?branch=substrate-1a30fa2#26bf32c18044785756eba89478c24b2bf730f719" +source = "git+https://github.com/humanode-network/frontier?branch=substrate-1a30fa2#864ef8d7e97ede08c758394c5f9e2a57bbef7218" dependencies = [ "evm", "parity-scale-codec", @@ -1698,9 +1732,9 @@ dependencies = [ [[package]] name = "fp-rpc" version = "3.0.0-dev" -source = "git+https://github.com/humanode-network/frontier?branch=substrate-1a30fa2#26bf32c18044785756eba89478c24b2bf730f719" +source = "git+https://github.com/humanode-network/frontier?branch=substrate-1a30fa2#864ef8d7e97ede08c758394c5f9e2a57bbef7218" dependencies = [ - "ethereum", + "ethereum 0.11.1", "ethereum-types", "fp-evm", "parity-scale-codec", @@ -1715,9 +1749,9 @@ dependencies = [ [[package]] name = "fp-self-contained" version = "1.0.0-dev" -source = "git+https://github.com/humanode-network/frontier?branch=substrate-1a30fa2#26bf32c18044785756eba89478c24b2bf730f719" +source = "git+https://github.com/humanode-network/frontier?branch=substrate-1a30fa2#864ef8d7e97ede08c758394c5f9e2a57bbef7218" dependencies = [ - "ethereum", + "ethereum 0.10.0", "frame-support", "parity-scale-codec", "parity-util-mem", @@ -1732,7 +1766,7 @@ dependencies = [ [[package]] name = "fp-storage" version = "2.0.0" -source = "git+https://github.com/humanode-network/frontier?branch=substrate-1a30fa2#26bf32c18044785756eba89478c24b2bf730f719" +source = "git+https://github.com/humanode-network/frontier?branch=substrate-1a30fa2#864ef8d7e97ede08c758394c5f9e2a57bbef7218" [[package]] name = "fragile" @@ -4476,7 +4510,7 @@ dependencies = [ [[package]] name = "pallet-base-fee" version = "1.0.0" -source = "git+https://github.com/humanode-network/frontier?branch=substrate-1a30fa2#26bf32c18044785756eba89478c24b2bf730f719" +source = "git+https://github.com/humanode-network/frontier?branch=substrate-1a30fa2#864ef8d7e97ede08c758394c5f9e2a57bbef7218" dependencies = [ "frame-support", "frame-system", @@ -4509,7 +4543,7 @@ dependencies = [ [[package]] name = "pallet-dynamic-fee" version = "4.0.0-dev" -source = "git+https://github.com/humanode-network/frontier?branch=substrate-1a30fa2#26bf32c18044785756eba89478c24b2bf730f719" +source = "git+https://github.com/humanode-network/frontier?branch=substrate-1a30fa2#864ef8d7e97ede08c758394c5f9e2a57bbef7218" dependencies = [ "async-trait", "frame-support", @@ -4527,9 +4561,9 @@ dependencies = [ [[package]] name = "pallet-ethereum" version = "4.0.0-dev" -source = "git+https://github.com/humanode-network/frontier?branch=substrate-1a30fa2#26bf32c18044785756eba89478c24b2bf730f719" +source = "git+https://github.com/humanode-network/frontier?branch=substrate-1a30fa2#864ef8d7e97ede08c758394c5f9e2a57bbef7218" dependencies = [ - "ethereum", + "ethereum 0.11.1", "ethereum-types", "evm", "fp-consensus", @@ -4556,7 +4590,7 @@ dependencies = [ [[package]] name = "pallet-evm" version = "6.0.0-dev" -source = "git+https://github.com/humanode-network/frontier?branch=substrate-1a30fa2#26bf32c18044785756eba89478c24b2bf730f719" +source = "git+https://github.com/humanode-network/frontier?branch=substrate-1a30fa2#864ef8d7e97ede08c758394c5f9e2a57bbef7218" dependencies = [ "evm", "evm-gasometer", @@ -4584,7 +4618,7 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-modexp" version = "2.0.0-dev" -source = "git+https://github.com/humanode-network/frontier?branch=substrate-1a30fa2#26bf32c18044785756eba89478c24b2bf730f719" +source = "git+https://github.com/humanode-network/frontier?branch=substrate-1a30fa2#864ef8d7e97ede08c758394c5f9e2a57bbef7218" dependencies = [ "fp-evm", "num", @@ -4595,7 +4629,7 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-sha3fips" version = "2.0.0-dev" -source = "git+https://github.com/humanode-network/frontier?branch=substrate-1a30fa2#26bf32c18044785756eba89478c24b2bf730f719" +source = "git+https://github.com/humanode-network/frontier?branch=substrate-1a30fa2#864ef8d7e97ede08c758394c5f9e2a57bbef7218" dependencies = [ "fp-evm", "sp-core", @@ -4606,7 +4640,7 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-simple" version = "2.0.0-dev" -source = "git+https://github.com/humanode-network/frontier?branch=substrate-1a30fa2#26bf32c18044785756eba89478c24b2bf730f719" +source = "git+https://github.com/humanode-network/frontier?branch=substrate-1a30fa2#864ef8d7e97ede08c758394c5f9e2a57bbef7218" dependencies = [ "fp-evm", "ripemd160", From c13dae851c6e37bdb519985b11b04af6b3da53f9 Mon Sep 17 00:00:00 2001 From: dmitrylavrenov Date: Thu, 20 Jan 2022 12:39:16 +0300 Subject: [PATCH 38/42] Fix frontier update by changing ethereum version at evm --- Cargo.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index 6e18c2e63..e6be00dc4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1385,7 +1385,7 @@ checksum = "408ffdd509e16de15ea9b51f5333748f6086601f29d445d2ba53dd7e95565574" dependencies = [ "auto_impl", "environmental", - "ethereum 0.10.0", + "ethereum 0.11.1", "evm-core", "evm-gasometer", "evm-runtime", From 256f107cd7b38d832fdaaabeb096743f41c281d9 Mon Sep 17 00:00:00 2001 From: dmitrylavrenov Date: Thu, 20 Jan 2022 13:33:34 +0300 Subject: [PATCH 39/42] Apply frontier updates --- crates/humanode-peer/src/cli/config.rs | 1 + crates/humanode-peer/src/cli/params.rs | 4 ++ crates/humanode-peer/src/configuration.rs | 3 + crates/humanode-peer/src/service/mod.rs | 31 ++++++++- crates/humanode-rpc/src/lib.rs | 77 +++++++++++++++-------- crates/humanode-runtime/src/lib.rs | 15 ++++- 6 files changed, 102 insertions(+), 29 deletions(-) diff --git a/crates/humanode-peer/src/cli/config.rs b/crates/humanode-peer/src/cli/config.rs index a39323f25..2d71136c5 100644 --- a/crates/humanode-peer/src/cli/config.rs +++ b/crates/humanode-peer/src/cli/config.rs @@ -48,6 +48,7 @@ pub trait CliConfigurationExt: SubstrateCliConfigurationProvider { max_past_logs: params.max_past_logs, max_stored_filters: params.max_stored_filters, target_gas_price: params.target_gas_price, + fee_history_limit: params.fee_history_limit, }); Ok(Configuration { diff --git a/crates/humanode-peer/src/cli/params.rs b/crates/humanode-peer/src/cli/params.rs index e33e4eb29..4259cb5af 100644 --- a/crates/humanode-peer/src/cli/params.rs +++ b/crates/humanode-peer/src/cli/params.rs @@ -47,4 +47,8 @@ pub struct EvmParams { /// The dynamic-fee pallet target gas price set by block author. #[structopt(long, default_value = "1")] pub target_gas_price: u64, + + /// Maximum fee history cache size. + #[structopt(long, default_value = "2048")] + pub fee_history_limit: u64, } diff --git a/crates/humanode-peer/src/configuration.rs b/crates/humanode-peer/src/configuration.rs index 00a1fc41d..305e7f2e9 100644 --- a/crates/humanode-peer/src/configuration.rs +++ b/crates/humanode-peer/src/configuration.rs @@ -62,4 +62,7 @@ pub struct Evm { /// The dynamic-fee pallet target gas price set by block author. pub target_gas_price: u64, + + /// Maximum fee history cache size. + pub fee_history_limit: u64, } diff --git a/crates/humanode-peer/src/service/mod.rs b/crates/humanode-peer/src/service/mod.rs index 5693de266..c6e975d29 100644 --- a/crates/humanode-peer/src/service/mod.rs +++ b/crates/humanode-peer/src/service/mod.rs @@ -4,7 +4,7 @@ use fc_consensus::FrontierBlockImport; use fc_mapping_sync::{MappingSyncWorker, SyncStrategy}; use fc_rpc::EthTask; -use fc_rpc_core::types::FilterPool; +use fc_rpc_core::types::{FeeHistoryCache, FilterPool}; use futures::StreamExt; use humanode_runtime::{self, opaque::Block, RuntimeApi}; use sc_client_api::{BlockchainEvents, ExecutorProvider}; @@ -292,6 +292,9 @@ pub async fn new_full(config: Configuration) -> Result = Some(Arc::new(Mutex::new(BTreeMap::new()))); + let fee_history_cache: FeeHistoryCache = Arc::new(Mutex::new(BTreeMap::new())); + let fee_history_limit = evm_config.fee_history_limit; + let overrides = humanode_rpc::overrides_handle(Arc::clone(&client)); let proposer_factory = sc_basic_authorship::ProposerFactory::new( task_manager.spawn_handle(), @@ -341,9 +344,17 @@ pub async fn new_full(config: Configuration) -> Result Result Result Result { @@ -57,8 +57,49 @@ pub struct Deps { pub backend: Arc>, /// Maximum number of logs in a query. pub max_past_logs: u32, + /// Maximum fee history cache size. + pub fee_history_limit: u64, + /// Fee history cache. + pub fee_history_cache: FeeHistoryCache, /// Subscription task executor instance. pub subscription_task_executor: Arc, + /// Ethereum data access overrides. + pub overrides: Arc>, + /// Cache for Ethereum block data. + pub block_data_cache: Arc>, +} + +/// A helper function to handle overrides. +pub fn overrides_handle(client: Arc) -> Arc> +where + C: ProvideRuntimeApi + StorageProvider + AuxStore, + C: HeaderBackend + HeaderMetadata, + C: Send + Sync + 'static, + C::Api: fp_rpc::EthereumRuntimeRPCApi, + BE: Backend + 'static, + BE::State: StateBackend, +{ + let mut overrides_map = BTreeMap::new(); + overrides_map.insert( + EthereumStorageSchema::V1, + Box::new(SchemaV1Override::new(Arc::clone(&client))) + as Box + Send + Sync>, + ); + overrides_map.insert( + EthereumStorageSchema::V2, + Box::new(SchemaV2Override::new(Arc::clone(&client))) + as Box + Send + Sync>, + ); + overrides_map.insert( + EthereumStorageSchema::V3, + Box::new(SchemaV3Override::new(Arc::clone(&client))) + as Box + Send + Sync>, + ); + + Arc::new(OverrideHandle { + schemas: overrides_map, + fallback: Box::new(RuntimeApiStorageOverride::new(Arc::clone(&client))), + }) } /// Instantiate all RPC extensions. @@ -100,7 +141,11 @@ where max_stored_filters, backend, max_past_logs, + fee_history_limit, + fee_history_cache, subscription_task_executor, + overrides, + block_data_cache, } = deps; io.extend_with(SystemApi::to_delegate(FullSystem::new( @@ -120,25 +165,6 @@ where Arc::clone(&client), ))); - let mut overrides_map = BTreeMap::new(); - overrides_map.insert( - EthereumStorageSchema::V1, - Box::new(SchemaV1Override::new(Arc::clone(&client))) - as Box + Send + Sync>, - ); - overrides_map.insert( - EthereumStorageSchema::V2, - Box::new(SchemaV2Override::new(Arc::clone(&client))) - as Box + Send + Sync>, - ); - - let overrides = Arc::new(OverrideHandle { - schemas: overrides_map, - fallback: Box::new(RuntimeApiStorageOverride::new(Arc::clone(&client))), - }); - - let block_data_cache = Arc::new(EthBlockDataCache::new(50, 50)); - io.extend_with(EthApiServer::to_delegate(EthApi::new( Arc::clone(&client), Arc::clone(&pool), @@ -151,6 +177,8 @@ where true, max_past_logs, Arc::clone(&block_data_cache), + fee_history_limit, + fee_history_cache, ))); io.extend_with(Web3ApiServer::to_delegate(Web3Api::new(Arc::clone( @@ -181,7 +209,6 @@ where backend, filter_pool, max_stored_filters, - overrides, max_past_logs, block_data_cache, ))); diff --git a/crates/humanode-runtime/src/lib.rs b/crates/humanode-runtime/src/lib.rs index e3ecf11dc..796e3d477 100644 --- a/crates/humanode-runtime/src/lib.rs +++ b/crates/humanode-runtime/src/lib.rs @@ -507,6 +507,10 @@ impl pallet_dynamic_fee::Config for Runtime { type MinGasPriceBoundDivisor = BoundDivision; } +frame_support::parameter_types! { + pub IsActive: bool = true; +} + pub struct BaseFeeThreshold; impl pallet_base_fee::BaseFeeThreshold for BaseFeeThreshold { fn lower() -> Permill { @@ -523,6 +527,7 @@ impl pallet_base_fee::BaseFeeThreshold for BaseFeeThreshold { impl pallet_base_fee::Config for Runtime { type Event = Event; type Threshold = BaseFeeThreshold; + type IsActive = IsActive; } // Create the runtime by composing the FRAME pallets that were previously @@ -814,6 +819,7 @@ impl_runtime_apis! { max_priority_fee_per_gas: Option, nonce: Option, estimate: bool, + access_list: Option)>>, ) -> Result { let config = if estimate { let mut config = ::config().clone(); @@ -832,7 +838,7 @@ impl_runtime_apis! { max_fee_per_gas, max_priority_fee_per_gas, nonce, - Vec::new(), + access_list.unwrap_or_default(), &config, ).map_err(|err| err.into()) } @@ -846,6 +852,7 @@ impl_runtime_apis! { max_priority_fee_per_gas: Option, nonce: Option, estimate: bool, + access_list: Option)>>, ) -> Result { let config = if estimate { let mut config = ::config().clone(); @@ -863,7 +870,7 @@ impl_runtime_apis! { max_fee_per_gas, max_priority_fee_per_gas, nonce, - Vec::new(), + access_list.unwrap_or_default(), &config, ).map_err(|err| err.into()) } @@ -900,6 +907,10 @@ impl_runtime_apis! { _ => None }).collect::>() } + + fn elasticity() -> Option { + Some(BaseFee::elasticity()) + } } impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi From 275f9a5492b9cbc1297ca3c6cc11824f6d3e1ef7 Mon Sep 17 00:00:00 2001 From: dmitrylavrenov Date: Thu, 20 Jan 2022 13:39:02 +0300 Subject: [PATCH 40/42] Remove useless clippy allowers --- crates/frontier-api/src/lib.rs | 2 -- 1 file changed, 2 deletions(-) diff --git a/crates/frontier-api/src/lib.rs b/crates/frontier-api/src/lib.rs index ec30e6d5f..d2d45c62c 100644 --- a/crates/frontier-api/src/lib.rs +++ b/crates/frontier-api/src/lib.rs @@ -1,8 +1,6 @@ //! The runtime API for the frontier related stuff. #![cfg_attr(not(feature = "std"), no_std)] -// `decl_runtime_apis` macro has issues. -#![allow(clippy::too_many_arguments, clippy::unnecessary_mut_passed)] use codec::Decode; use sp_std::prelude::*; From 2200607a622f183201e44ab877a2a0807ea676fa Mon Sep 17 00:00:00 2001 From: dmitrylavrenov Date: Thu, 20 Jan 2022 16:51:33 +0300 Subject: [PATCH 41/42] Remove default-features for frontier-api --- crates/humanode-rpc/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/humanode-rpc/Cargo.toml b/crates/humanode-rpc/Cargo.toml index 29c873fe4..054badc6a 100644 --- a/crates/humanode-rpc/Cargo.toml +++ b/crates/humanode-rpc/Cargo.toml @@ -7,7 +7,7 @@ publish = false [dependencies] bioauth-flow = { version = "0.1", path = "../bioauth-flow" } bioauth-flow-api = { version = "0.1", path = "../bioauth-flow-api" } -frontier-api = { version = "0.1", path = "../frontier-api", default-features = false } +frontier-api = { version = "0.1", path = "../frontier-api" } humanode-runtime = { version = "0.1", path = "../humanode-runtime" } primitives-frontier = { version = "0.1", path = "../primitives-frontier" } robonode-client = { version = "0.1", path = "../robonode-client" } From 2347aa996e0bceb70eef8900a66f6bb042cb9ec7 Mon Sep 17 00:00:00 2001 From: dmitrylavrenov Date: Thu, 20 Jan 2022 17:05:48 +0300 Subject: [PATCH 42/42] Add eth prefix to ethereum related objects --- crates/humanode-peer/src/service/mod.rs | 60 +++++++++++++------------ crates/humanode-rpc/src/lib.rs | 58 ++++++++++++------------ 2 files changed, 61 insertions(+), 57 deletions(-) diff --git a/crates/humanode-peer/src/service/mod.rs b/crates/humanode-peer/src/service/mod.rs index c6e975d29..b97f43db5 100644 --- a/crates/humanode-peer/src/service/mod.rs +++ b/crates/humanode-peer/src/service/mod.rs @@ -186,7 +186,7 @@ pub fn new_partial( let slot_duration = sc_consensus_aura::slot_duration(&*client)?; let raw_slot_duration = slot_duration.slot_duration(); - let target_gas_price = evm_config.target_gas_price; + let eth_target_gas_price = evm_config.target_gas_price; let import_queue = sc_consensus_aura::import_queue::(ImportQueueParams { @@ -203,7 +203,7 @@ pub fn new_partial( ); let dynamic_fee = - pallet_dynamic_fee::InherentDataProvider(U256::from(target_gas_price)); + pallet_dynamic_fee::InherentDataProvider(U256::from(eth_target_gas_price)); Ok((timestamp, slot, dynamic_fee)) }, @@ -290,11 +290,11 @@ pub async fn new_full(config: Configuration) -> Result = None; let prometheus_registry = config.prometheus_registry().cloned(); - let target_gas_price = evm_config.target_gas_price; - let filter_pool: Option = Some(Arc::new(Mutex::new(BTreeMap::new()))); - let fee_history_cache: FeeHistoryCache = Arc::new(Mutex::new(BTreeMap::new())); - let fee_history_limit = evm_config.fee_history_limit; - let overrides = humanode_rpc::overrides_handle(Arc::clone(&client)); + let eth_target_gas_price = evm_config.target_gas_price; + let eth_filter_pool: Option = Some(Arc::new(Mutex::new(BTreeMap::new()))); + let eth_fee_history_cache: FeeHistoryCache = Arc::new(Mutex::new(BTreeMap::new())); + let eth_fee_history_limit = evm_config.fee_history_limit; + let eth_overrides = humanode_rpc::overrides_handle(Arc::clone(&client)); let proposer_factory = sc_basic_authorship::ProposerFactory::new( task_manager.spawn_handle(), @@ -340,18 +340,18 @@ pub async fn new_full(config: Configuration) -> Result Result Result Result Result { /// Network service pub network: Arc>, /// EthFilterApi pool. - pub filter_pool: Option, + pub eth_filter_pool: Option, /// Maximum number of stored filters. - pub max_stored_filters: usize, + pub eth_max_stored_filters: usize, /// Backend. - pub backend: Arc>, + pub eth_backend: Arc>, /// Maximum number of logs in a query. - pub max_past_logs: u32, + pub eth_max_past_logs: u32, /// Maximum fee history cache size. - pub fee_history_limit: u64, + pub eth_fee_history_limit: u64, /// Fee history cache. - pub fee_history_cache: FeeHistoryCache, + pub eth_fee_history_cache: FeeHistoryCache, /// Subscription task executor instance. pub subscription_task_executor: Arc, /// Ethereum data access overrides. - pub overrides: Arc>, + pub eth_overrides: Arc>, /// Cache for Ethereum block data. - pub block_data_cache: Arc>, + pub eth_block_data_cache: Arc>, } /// A helper function to handle overrides. @@ -137,15 +137,15 @@ where validator_key_extractor, graph, network, - filter_pool, - max_stored_filters, - backend, - max_past_logs, - fee_history_limit, - fee_history_cache, + eth_filter_pool, + eth_max_stored_filters, + eth_backend, + eth_max_past_logs, + eth_fee_history_limit, + eth_fee_history_cache, subscription_task_executor, - overrides, - block_data_cache, + eth_overrides, + eth_block_data_cache, } = deps; io.extend_with(SystemApi::to_delegate(FullSystem::new( @@ -172,13 +172,13 @@ where primitives_frontier::RuntimeTransactionConverter::new(Arc::clone(&client)), Arc::clone(&network), Vec::new(), - Arc::clone(&overrides), - Arc::clone(&backend), + Arc::clone(ð_overrides), + Arc::clone(ð_backend), true, - max_past_logs, - Arc::clone(&block_data_cache), - fee_history_limit, - fee_history_cache, + eth_max_past_logs, + Arc::clone(ð_block_data_cache), + eth_fee_history_limit, + eth_fee_history_cache, ))); io.extend_with(Web3ApiServer::to_delegate(Web3Api::new(Arc::clone( @@ -193,7 +193,7 @@ where HexEncodedIdProvider::default(), subscription_task_executor, ), - Arc::clone(&overrides), + Arc::clone(ð_overrides), ))); io.extend_with(NetApiServer::to_delegate(NetApi::new( @@ -203,14 +203,14 @@ where true, ))); - if let Some(filter_pool) = filter_pool { + if let Some(eth_filter_pool) = eth_filter_pool { io.extend_with(EthFilterApiServer::to_delegate(EthFilterApi::new( client, - backend, - filter_pool, - max_stored_filters, - max_past_logs, - block_data_cache, + eth_backend, + eth_filter_pool, + eth_max_stored_filters, + eth_max_past_logs, + eth_block_data_cache, ))); }