From a8d4dd55643d324dbbf49be7f4e4e10494f56d39 Mon Sep 17 00:00:00 2001 From: Qinxuan Chen Date: Fri, 23 Sep 2022 23:43:23 +0800 Subject: [PATCH] Update substrate to polkadot-v0.9.28 (#830) * Update substrate to polkadot-v0.9.28 Signed-off-by: koushiro * Fix PruningParams fields Signed-off-by: koushiro * Some trivials Signed-off-by: koushiro * Ignore tests calling EthereumRuntimeRPCApi_current_transaction_statuses Signed-off-by: koushiro * ignore tests Signed-off-by: koushiro * Fix fmt Signed-off-by: koushiro Signed-off-by: koushiro --- Cargo.lock | 334 +++++++++--------- client/cli/src/frontier_db_cmd/mapping_db.rs | 10 +- client/cli/src/frontier_db_cmd/meta_db.rs | 9 +- client/cli/src/frontier_db_cmd/mod.rs | 14 +- client/cli/src/frontier_db_cmd/tests.rs | 43 ++- client/cli/src/frontier_db_cmd/utils.rs | 17 +- client/consensus/src/lib.rs | 3 +- client/db/src/lib.rs | 4 +- client/db/src/parity_db_adapter.rs | 3 +- client/mapping-sync/src/lib.rs | 6 +- client/mapping-sync/src/worker.rs | 7 +- client/rpc-core/Cargo.toml | 2 +- client/rpc/Cargo.toml | 4 +- client/rpc/src/eth/block.rs | 4 +- client/rpc/src/eth/cache/mod.rs | 6 +- client/rpc/src/eth/client.rs | 5 +- client/rpc/src/eth/execute.rs | 4 +- client/rpc/src/eth/fee.rs | 4 +- client/rpc/src/eth/filter.rs | 4 +- client/rpc/src/eth/format.rs | 4 +- client/rpc/src/eth/mining.rs | 4 +- client/rpc/src/eth/mod.rs | 4 +- client/rpc/src/eth/state.rs | 6 +- client/rpc/src/eth/submit.rs | 4 +- client/rpc/src/eth/transaction.rs | 4 +- client/rpc/src/eth_pubsub.rs | 40 +-- client/rpc/src/lib.rs | 4 +- client/rpc/src/net.rs | 6 +- client/rpc/src/overrides/mod.rs | 9 +- .../rpc/src/overrides/schema_v1_override.rs | 8 +- .../rpc/src/overrides/schema_v2_override.rs | 4 +- .../rpc/src/overrides/schema_v3_override.rs | 4 +- client/rpc/src/signer.rs | 5 +- client/rpc/src/web3.rs | 3 +- template/node/Cargo.toml | 2 +- 35 files changed, 314 insertions(+), 280 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 40665f7125..d5e83d2660 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -262,7 +262,7 @@ dependencies = [ "memchr", "num_cpus", "once_cell", - "pin-project-lite 0.2.7", + "pin-project-lite 0.2.9", "pin-utils", "slab", "wasm-bindgen-futures", @@ -310,7 +310,7 @@ dependencies = [ "futures-sink", "futures-util", "memchr", - "pin-project-lite 0.2.7", + "pin-project-lite 0.2.9", ] [[package]] @@ -399,7 +399,7 @@ dependencies = [ [[package]] name = "beefy-merkle-tree" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "beefy-primitives", "sp-api", @@ -408,7 +408,7 @@ dependencies = [ [[package]] name = "beefy-primitives" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "parity-scale-codec", "scale-info", @@ -1701,6 +1701,7 @@ dependencies = [ "sc-client-api", "sc-client-db", "sc-network", + "sc-network-common", "sc-rpc", "sc-service", "sc-transaction-pool", @@ -1829,7 +1830,7 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "fork-tree" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "parity-scale-codec", ] @@ -1929,7 +1930,7 @@ dependencies = [ [[package]] name = "frame-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "frame-support", "frame-system", @@ -1951,7 +1952,7 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "Inflector", "chrono", @@ -2002,7 +2003,7 @@ dependencies = [ [[package]] name = "frame-executive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "frame-support", "frame-system", @@ -2030,7 +2031,7 @@ dependencies = [ [[package]] name = "frame-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "bitflags", "frame-metadata", @@ -2044,6 +2045,7 @@ dependencies = [ "scale-info", "serde", "smallvec", + "sp-api", "sp-arithmetic", "sp-core", "sp-core-hashing-proc-macro", @@ -2060,7 +2062,7 @@ dependencies = [ [[package]] name = "frame-support-procedural" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "Inflector", "frame-support-procedural-tools", @@ -2072,7 +2074,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate", @@ -2084,7 +2086,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "proc-macro2", "quote", @@ -2094,7 +2096,7 @@ dependencies = [ [[package]] name = "frame-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "frame-support", "log", @@ -2111,7 +2113,7 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "frame-benchmarking", "frame-support", @@ -2126,7 +2128,7 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "parity-scale-codec", "sp-api", @@ -2330,7 +2332,7 @@ dependencies = [ "futures-io", "memchr", "parking", - "pin-project-lite 0.2.7", + "pin-project-lite 0.2.9", "waker-fn", ] @@ -2387,7 +2389,7 @@ dependencies = [ "futures-sink", "futures-task", "memchr", - "pin-project-lite 0.2.7", + "pin-project-lite 0.2.9", "pin-utils", "slab", ] @@ -2655,13 +2657,13 @@ dependencies = [ [[package]] name = "http" -version = "0.2.4" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "527e8c9ac747e28542699a951517aa9a6945af506cd1f2e1b53a576c17b6cc11" +checksum = "75f43d41e26995c17e71ee126451dd3941010b0514a81a9d11f3b341debc2399" dependencies = [ "bytes", "fnv", - "itoa 0.4.7", + "itoa 1.0.1", ] [[package]] @@ -2672,7 +2674,7 @@ checksum = "399c583b2979440c60be0821a6199eca73bc3c8dcd9d070d75ac726e2c6186e5" dependencies = [ "bytes", "http", - "pin-project-lite 0.2.7", + "pin-project-lite 0.2.9", ] [[package]] @@ -2709,7 +2711,7 @@ dependencies = [ "httparse", "httpdate", "itoa 1.0.1", - "pin-project-lite 0.2.7", + "pin-project-lite 0.2.9", "socket2", "tokio", "tower-service", @@ -2915,9 +2917,9 @@ dependencies = [ [[package]] name = "jsonrpsee" -version = "0.14.0" +version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11e017217fcd18da0a25296d3693153dd19c8a6aadab330b3595285d075385d1" +checksum = "8bd0d559d5e679b1ab2f869b486a11182923863b1b3ee8b421763cdd707b783a" dependencies = [ "jsonrpsee-core", "jsonrpsee-http-server", @@ -2929,9 +2931,9 @@ dependencies = [ [[package]] name = "jsonrpsee-core" -version = "0.14.0" +version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16efcd4477de857d4a2195a45769b2fe9ebb54f3ef5a4221d3b014a4fe33ec0b" +checksum = "f3dc3e9cf2ba50b7b1d7d76a667619f82846caa39e8e8daa8a4962d74acaddca" dependencies = [ "anyhow", "arrayvec 0.7.2", @@ -2940,6 +2942,7 @@ dependencies = [ "futures-channel", "futures-util", "globset", + "http", "hyper", "jsonrpsee-types", "lazy_static", @@ -2957,9 +2960,9 @@ dependencies = [ [[package]] name = "jsonrpsee-http-server" -version = "0.14.0" +version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdd69efeb3ce2cba767f126872f4eeb4624038a29098e75d77608b2b4345ad03" +checksum = "03802f0373a38c2420c70b5144742d800b509e2937edc4afb116434f07120117" dependencies = [ "futures-channel", "futures-util", @@ -2970,13 +2973,14 @@ dependencies = [ "serde_json", "tokio", "tracing", + "tracing-futures", ] [[package]] name = "jsonrpsee-proc-macros" -version = "0.14.0" +version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "874cf3f6a027cebf36cae767feca9aa2e8a8f799880e49eb5540819fcbd8eada" +checksum = "bd67957d4280217247588ac86614ead007b301ca2fa9f19c19f880a536f029e3" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -2986,9 +2990,9 @@ dependencies = [ [[package]] name = "jsonrpsee-types" -version = "0.14.0" +version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3bcf76cd316f5d3ad48138085af1f45e2c58c98e02f0779783dbb034d43f7c86" +checksum = "e290bba767401b646812f608c099b922d8142603c9e73a50fb192d3ac86f4a0d" dependencies = [ "anyhow", "beef", @@ -3000,12 +3004,13 @@ dependencies = [ [[package]] name = "jsonrpsee-ws-server" -version = "0.14.0" +version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bd2e4d266774a671f8def3794255b28eddd09b18d76e0b913fa439f34588c0a" +checksum = "d488ba74fb369e5ab68926feb75a483458b88e768d44319f37e4ecad283c7325" dependencies = [ "futures-channel", "futures-util", + "http", "jsonrpsee-core", "jsonrpsee-types", "serde_json", @@ -3014,6 +3019,7 @@ dependencies = [ "tokio-stream", "tokio-util", "tracing", + "tracing-futures", ] [[package]] @@ -4372,7 +4378,7 @@ dependencies = [ [[package]] name = "pallet-aura" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "frame-support", "frame-system", @@ -4388,7 +4394,7 @@ dependencies = [ [[package]] name = "pallet-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "frame-support", "frame-system", @@ -4403,7 +4409,7 @@ dependencies = [ [[package]] name = "pallet-babe" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "frame-benchmarking", "frame-support", @@ -4427,7 +4433,7 @@ dependencies = [ [[package]] name = "pallet-balances" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "frame-benchmarking", "frame-support", @@ -4635,7 +4641,7 @@ dependencies = [ [[package]] name = "pallet-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "frame-benchmarking", "frame-support", @@ -4674,7 +4680,7 @@ dependencies = [ [[package]] name = "pallet-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "frame-support", "frame-system", @@ -4695,7 +4701,7 @@ dependencies = [ [[package]] name = "pallet-sudo" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "frame-support", "frame-system", @@ -4709,7 +4715,7 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "frame-benchmarking", "frame-support", @@ -4727,7 +4733,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "frame-support", "frame-system", @@ -4743,7 +4749,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "jsonrpsee", "pallet-transaction-payment-rpc-runtime-api", @@ -4758,7 +4764,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -4769,7 +4775,7 @@ dependencies = [ [[package]] name = "pallet-utility" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "frame-support", "frame-system", @@ -4802,13 +4808,14 @@ dependencies = [ [[package]] name = "parity-scale-codec" -version = "3.1.2" +version = "3.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8b44461635bbb1a0300f100a841e571e7d919c81c73075ef5d152ffdb521066" +checksum = "9182e4a71cae089267ab03e67c99368db7cd877baf50f931e5d6d4b71e195ac0" dependencies = [ "arrayvec 0.7.2", "bitvec", "byte-slice-cast", + "bytes", "impl-trait-for-tuples", "parity-scale-codec-derive", "serde", @@ -4816,9 +4823,9 @@ dependencies = [ [[package]] name = "parity-scale-codec-derive" -version = "3.1.2" +version = "3.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c45ed1f39709f5a89338fab50e59816b2e8815f5bb58276e7ddf9afd495f73f8" +checksum = "9299338969a3d2f491d65f140b00ddec470858402f888af98e8642fb5e8965cd" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -5047,9 +5054,9 @@ checksum = "257b64915a082f7811703966789728173279bdebb956b143dbcd23f6f970a777" [[package]] name = "pin-project-lite" -version = "0.2.7" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d31d11c69a6b52a174b42bdc0c30e5e11670f90788b2c471c31c1d17d449443" +checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" [[package]] name = "pin-utils" @@ -5775,7 +5782,7 @@ dependencies = [ [[package]] name = "sc-allocator" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "log", "sp-core", @@ -5786,7 +5793,7 @@ dependencies = [ [[package]] name = "sc-basic-authorship" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "futures", "futures-timer", @@ -5809,7 +5816,7 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "parity-scale-codec", "sc-client-api", @@ -5825,7 +5832,7 @@ dependencies = [ [[package]] name = "sc-chain-spec" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "impl-trait-for-tuples", "memmap2 0.5.3", @@ -5842,7 +5849,7 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -5853,7 +5860,7 @@ dependencies = [ [[package]] name = "sc-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "chrono", "clap", @@ -5892,7 +5899,7 @@ dependencies = [ [[package]] name = "sc-client-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "fnv", "futures", @@ -5920,7 +5927,7 @@ dependencies = [ [[package]] name = "sc-client-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "hash-db", "kvdb", @@ -5945,7 +5952,7 @@ dependencies = [ [[package]] name = "sc-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "async-trait", "futures", @@ -5969,7 +5976,7 @@ dependencies = [ [[package]] name = "sc-consensus-aura" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "async-trait", "futures", @@ -5998,7 +6005,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "async-trait", "fork-tree", @@ -6040,7 +6047,7 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "fork-tree", "parity-scale-codec", @@ -6053,7 +6060,7 @@ dependencies = [ [[package]] name = "sc-consensus-manual-seal" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "assert_matches", "async-trait", @@ -6087,7 +6094,7 @@ dependencies = [ [[package]] name = "sc-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "async-trait", "futures", @@ -6112,7 +6119,7 @@ dependencies = [ [[package]] name = "sc-executor" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "lazy_static", "lru 0.7.8", @@ -6139,14 +6146,13 @@ dependencies = [ [[package]] name = "sc-executor-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "environmental", "parity-scale-codec", "sc-allocator", "sp-maybe-compressed-blob", "sp-sandbox", - "sp-serializer", "sp-wasm-interface", "thiserror", "wasm-instrument", @@ -6156,7 +6162,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmi" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "log", "parity-scale-codec", @@ -6171,7 +6177,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "cfg-if", "libc", @@ -6191,7 +6197,7 @@ dependencies = [ [[package]] name = "sc-finality-grandpa" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "ahash", "async-trait", @@ -6232,7 +6238,7 @@ dependencies = [ [[package]] name = "sc-informant" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "ansi_term", "futures", @@ -6240,7 +6246,7 @@ dependencies = [ "log", "parity-util-mem", "sc-client-api", - "sc-network", + "sc-network-common", "sc-transaction-pool-api", "sp-blockchain", "sp-runtime", @@ -6249,7 +6255,7 @@ dependencies = [ [[package]] name = "sc-keystore" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "async-trait", "hex", @@ -6264,7 +6270,7 @@ dependencies = [ [[package]] name = "sc-network" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "async-trait", "asynchronous-codec", @@ -6313,9 +6319,11 @@ dependencies = [ [[package]] name = "sc-network-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ + "async-trait", "bitflags", + "bytes", "futures", "libp2p", "parity-scale-codec", @@ -6326,12 +6334,13 @@ dependencies = [ "sp-consensus", "sp-finality-grandpa", "sp-runtime", + "thiserror", ] [[package]] name = "sc-network-gossip" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "ahash", "futures", @@ -6340,6 +6349,7 @@ dependencies = [ "log", "lru 0.7.8", "sc-network", + "sc-network-common", "sp-runtime", "substrate-prometheus-endpoint", "tracing", @@ -6348,9 +6358,10 @@ dependencies = [ [[package]] name = "sc-network-light" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "futures", + "hex", "libp2p", "log", "parity-scale-codec", @@ -6368,10 +6379,11 @@ dependencies = [ [[package]] name = "sc-network-sync" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "fork-tree", "futures", + "hex", "libp2p", "log", "lru 0.7.8", @@ -6395,7 +6407,7 @@ dependencies = [ [[package]] name = "sc-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "bytes", "fnv", @@ -6411,6 +6423,7 @@ dependencies = [ "rand 0.7.3", "sc-client-api", "sc-network", + "sc-network-common", "sc-utils", "sp-api", "sp-core", @@ -6423,7 +6436,7 @@ dependencies = [ [[package]] name = "sc-peerset" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "futures", "libp2p", @@ -6436,7 +6449,7 @@ dependencies = [ [[package]] name = "sc-proposer-metrics" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -6445,7 +6458,7 @@ dependencies = [ [[package]] name = "sc-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "futures", "hash-db", @@ -6475,7 +6488,7 @@ dependencies = [ [[package]] name = "sc-rpc-api" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "futures", "jsonrpsee", @@ -6498,7 +6511,7 @@ dependencies = [ [[package]] name = "sc-rpc-server" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "futures", "jsonrpsee", @@ -6511,7 +6524,7 @@ dependencies = [ [[package]] name = "sc-service" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "async-trait", "directories", @@ -6578,7 +6591,7 @@ dependencies = [ [[package]] name = "sc-state-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "log", "parity-scale-codec", @@ -6592,7 +6605,7 @@ dependencies = [ [[package]] name = "sc-sysinfo" version = "6.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "futures", "libc", @@ -6611,7 +6624,7 @@ dependencies = [ [[package]] name = "sc-telemetry" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "chrono", "futures", @@ -6629,7 +6642,7 @@ dependencies = [ [[package]] name = "sc-tracing" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "ansi_term", "atty", @@ -6660,7 +6673,7 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -6671,7 +6684,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "futures", "futures-timer", @@ -6697,7 +6710,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "futures", "log", @@ -6710,7 +6723,7 @@ dependencies = [ [[package]] name = "sc-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "futures", "futures-timer", @@ -7125,7 +7138,7 @@ dependencies = [ [[package]] name = "sp-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "hash-db", "log", @@ -7142,7 +7155,7 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "blake2", "proc-macro-crate", @@ -7154,7 +7167,7 @@ dependencies = [ [[package]] name = "sp-application-crypto" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "parity-scale-codec", "scale-info", @@ -7167,7 +7180,7 @@ dependencies = [ [[package]] name = "sp-arithmetic" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "integer-sqrt", "num-traits", @@ -7182,7 +7195,7 @@ dependencies = [ [[package]] name = "sp-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "async-trait", "parity-scale-codec", @@ -7194,7 +7207,7 @@ dependencies = [ [[package]] name = "sp-block-builder" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "parity-scale-codec", "sp-api", @@ -7206,7 +7219,7 @@ dependencies = [ [[package]] name = "sp-blockchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "futures", "log", @@ -7224,7 +7237,7 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "async-trait", "futures", @@ -7243,7 +7256,7 @@ dependencies = [ [[package]] name = "sp-consensus-aura" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "async-trait", "parity-scale-codec", @@ -7261,7 +7274,7 @@ dependencies = [ [[package]] name = "sp-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "async-trait", "merlin", @@ -7284,7 +7297,7 @@ dependencies = [ [[package]] name = "sp-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "parity-scale-codec", "scale-info", @@ -7298,7 +7311,7 @@ dependencies = [ [[package]] name = "sp-consensus-vrf" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "parity-scale-codec", "scale-info", @@ -7311,7 +7324,7 @@ dependencies = [ [[package]] name = "sp-core" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "base58", "bitflags", @@ -7357,7 +7370,7 @@ dependencies = [ [[package]] name = "sp-core-hashing" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "blake2", "byteorder", @@ -7371,7 +7384,7 @@ dependencies = [ [[package]] name = "sp-core-hashing-proc-macro" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "proc-macro2", "quote", @@ -7382,7 +7395,7 @@ dependencies = [ [[package]] name = "sp-database" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "kvdb", "parking_lot 0.12.1", @@ -7391,7 +7404,7 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "proc-macro2", "quote", @@ -7401,7 +7414,7 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.12.0" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "environmental", "parity-scale-codec", @@ -7412,7 +7425,7 @@ dependencies = [ [[package]] name = "sp-finality-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "finality-grandpa", "log", @@ -7430,7 +7443,7 @@ dependencies = [ [[package]] name = "sp-inherents" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -7444,8 +7457,9 @@ dependencies = [ [[package]] name = "sp-io" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ + "bytes", "futures", "hash-db", "libsecp256k1", @@ -7469,7 +7483,7 @@ dependencies = [ [[package]] name = "sp-keyring" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "lazy_static", "sp-core", @@ -7480,7 +7494,7 @@ dependencies = [ [[package]] name = "sp-keystore" version = "0.12.0" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "async-trait", "futures", @@ -7497,7 +7511,7 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "thiserror", "zstd", @@ -7506,7 +7520,7 @@ dependencies = [ [[package]] name = "sp-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "sp-api", "sp-core", @@ -7516,7 +7530,7 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "backtrace", "lazy_static", @@ -7526,7 +7540,7 @@ dependencies = [ [[package]] name = "sp-rpc" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "rustc-hash", "serde", @@ -7536,7 +7550,7 @@ dependencies = [ [[package]] name = "sp-runtime" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "either", "hash256-std-hasher", @@ -7558,8 +7572,9 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ + "bytes", "impl-trait-for-tuples", "parity-scale-codec", "primitive-types", @@ -7575,7 +7590,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "Inflector", "proc-macro-crate", @@ -7587,7 +7602,7 @@ dependencies = [ [[package]] name = "sp-sandbox" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "log", "parity-scale-codec", @@ -7598,19 +7613,10 @@ dependencies = [ "wasmi", ] -[[package]] -name = "sp-serializer" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" -dependencies = [ - "serde", - "serde_json", -] - [[package]] name = "sp-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "parity-scale-codec", "scale-info", @@ -7624,7 +7630,7 @@ dependencies = [ [[package]] name = "sp-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "parity-scale-codec", "scale-info", @@ -7635,7 +7641,7 @@ dependencies = [ [[package]] name = "sp-state-machine" version = "0.12.0" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "hash-db", "log", @@ -7657,12 +7663,12 @@ dependencies = [ [[package]] name = "sp-std" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" [[package]] name = "sp-storage" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "impl-serde", "parity-scale-codec", @@ -7675,7 +7681,7 @@ dependencies = [ [[package]] name = "sp-tasks" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "log", "sp-core", @@ -7688,7 +7694,7 @@ dependencies = [ [[package]] name = "sp-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "async-trait", "futures-timer", @@ -7704,7 +7710,7 @@ dependencies = [ [[package]] name = "sp-tracing" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "parity-scale-codec", "sp-std", @@ -7716,7 +7722,7 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "sp-api", "sp-runtime", @@ -7725,7 +7731,7 @@ dependencies = [ [[package]] name = "sp-transaction-storage-proof" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "async-trait", "log", @@ -7741,7 +7747,7 @@ dependencies = [ [[package]] name = "sp-trie" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "hash-db", "memory-db", @@ -7757,7 +7763,7 @@ dependencies = [ [[package]] name = "sp-version" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "impl-serde", "parity-scale-codec", @@ -7774,7 +7780,7 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "parity-scale-codec", "proc-macro2", @@ -7785,7 +7791,7 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "impl-trait-for-tuples", "log", @@ -7898,7 +7904,7 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "platforms", ] @@ -7906,7 +7912,7 @@ dependencies = [ [[package]] name = "substrate-frame-rpc-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "frame-system-rpc-runtime-api", "futures", @@ -7927,7 +7933,7 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "futures-util", "hyper", @@ -7940,7 +7946,7 @@ dependencies = [ [[package]] name = "substrate-test-client" version = "2.0.1" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "async-trait", "futures", @@ -7966,7 +7972,7 @@ dependencies = [ [[package]] name = "substrate-test-runtime" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "beefy-merkle-tree", "beefy-primitives", @@ -8010,7 +8016,7 @@ dependencies = [ [[package]] name = "substrate-test-runtime-client" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "futures", "parity-scale-codec", @@ -8029,7 +8035,7 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#782e08ed36e3c3e5ffa3a48484267b02ec8b7b6d" +source = "git+https://github.com/paritytech/substrate?branch=master#34a0621761c4a333cb2074ff720f7acbfb92dbb8" dependencies = [ "ansi_term", "build-helper", @@ -8256,7 +8262,7 @@ dependencies = [ "num_cpus", "once_cell", "parking_lot 0.12.1", - "pin-project-lite 0.2.7", + "pin-project-lite 0.2.9", "signal-hook-registry", "socket2", "tokio-macros", @@ -8292,7 +8298,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df54d54117d6fdc4e4fea40fe1e4e566b3505700e148a6827e59b34b0d2600d9" dependencies = [ "futures-core", - "pin-project-lite 0.2.7", + "pin-project-lite 0.2.9", "tokio", ] @@ -8306,7 +8312,7 @@ dependencies = [ "futures-core", "futures-io", "futures-sink", - "pin-project-lite 0.2.7", + "pin-project-lite 0.2.9", "tokio", "tracing", ] @@ -8328,21 +8334,21 @@ checksum = "360dfd1d6d30e05fda32ace2c8c70e9c0a9da713275777f5a4dbb8a1893930c6" [[package]] name = "tracing" -version = "0.1.30" +version = "0.1.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d8d93354fe2a8e50d5953f5ae2e47a3fc2ef03292e7ea46e3cc38f549525fb9" +checksum = "2fce9567bd60a67d08a16488756721ba392f24f29006402881e43b19aac64307" dependencies = [ "cfg-if", - "pin-project-lite 0.2.7", + "pin-project-lite 0.2.9", "tracing-attributes", "tracing-core", ] [[package]] name = "tracing-attributes" -version = "0.1.19" +version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8276d9a4a3a558d7b7ad5303ad50b53d58264641b82914b7ada36bd762e7a716" +checksum = "11c75893af559bc8e10716548bdef5cb2b983f8e637db9d0e15126b61b484ee2" dependencies = [ "proc-macro2", "quote", diff --git a/client/cli/src/frontier_db_cmd/mapping_db.rs b/client/cli/src/frontier_db_cmd/mapping_db.rs index 0a048c98d3..a3a332405f 100644 --- a/client/cli/src/frontier_db_cmd/mapping_db.rs +++ b/client/cli/src/frontier_db_cmd/mapping_db.rs @@ -16,15 +16,17 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +use std::sync::Arc; + use ethereum_types::H256; use serde::Deserialize; -use std::sync::Arc; +// Substrate +use sp_runtime::{generic::BlockId, traits::Block as BlockT}; +// Frontier +use fp_rpc::EthereumRuntimeRPCApi; use super::{utils::FrontierDbMessage, Column, FrontierDbCmd, Operation}; -use fp_rpc::EthereumRuntimeRPCApi; -use sp_runtime::{generic::BlockId, traits::Block as BlockT}; - #[derive(Debug, Deserialize)] #[serde(untagged)] pub enum MappingValue { diff --git a/client/cli/src/frontier_db_cmd/meta_db.rs b/client/cli/src/frontier_db_cmd/meta_db.rs index 2f6c42d5ab..e6d2a634eb 100644 --- a/client/cli/src/frontier_db_cmd/meta_db.rs +++ b/client/cli/src/frontier_db_cmd/meta_db.rs @@ -16,18 +16,19 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -use ethereum_types::H256; -use serde::Deserialize; use std::{ collections::HashMap, str::{self, FromStr}, sync::Arc, }; -use super::{utils::FrontierDbMessage, FrontierDbCmd, Operation}; - +use ethereum_types::H256; +use serde::Deserialize; +// Substrate use sp_runtime::traits::Block as BlockT; +use super::{utils::FrontierDbMessage, FrontierDbCmd, Operation}; + #[derive(Debug, Deserialize)] #[serde(untagged)] pub enum MetaValue { diff --git a/client/cli/src/frontier_db_cmd/mod.rs b/client/cli/src/frontier_db_cmd/mod.rs index 4f491d9ce0..fff7601b7d 100644 --- a/client/cli/src/frontier_db_cmd/mod.rs +++ b/client/cli/src/frontier_db_cmd/mod.rs @@ -21,17 +21,19 @@ mod meta_db; mod tests; pub(crate) mod utils; -use mapping_db::{MappingDb, MappingKey, MappingValue}; -use meta_db::{MetaDb, MetaKey, MetaValue}; +use std::{path::PathBuf, str::FromStr, sync::Arc}; use clap::ArgEnum; -use sc_cli::{PruningParams, SharedParams}; +use ethereum_types::H256; use serde::Deserialize; -use std::{path::PathBuf, str::FromStr, sync::Arc}; - +// Substrate +use sc_cli::{PruningParams, SharedParams}; use sp_runtime::traits::Block as BlockT; -use ethereum_types::H256; +use self::{ + mapping_db::{MappingDb, MappingKey, MappingValue}, + meta_db::{MetaDb, MetaKey, MetaValue}, +}; /// Cli tool to interact with the Frontier backend db #[derive(Debug, Clone, clap::Parser)] diff --git a/client/cli/src/frontier_db_cmd/tests.rs b/client/cli/src/frontier_db_cmd/tests.rs index a64b4ed8cb..5b05a90199 100644 --- a/client/cli/src/frontier_db_cmd/tests.rs +++ b/client/cli/src/frontier_db_cmd/tests.rs @@ -18,29 +18,30 @@ #[cfg(test)] mod tests { - use frontier_template_runtime::RuntimeApi; - use substrate_test_runtime_client::{ - BlockBuilderExt, ClientBlockImportExt, ClientExt, DefaultTestClientBuilderExt, - TestClientBuilder, - }; - - use std::{collections::HashMap, path::PathBuf, sync::Arc}; + use std::{collections::HashMap, path::PathBuf, str::FromStr, sync::Arc}; - use crate::frontier_db_cmd::{Column, FrontierDbCmd, Operation}; use codec::Encode; use ethereum_types::H256; - use fp_storage::EthereumStorageSchema; use futures::executor; - use sc_block_builder::BlockBuilderProvider; use serde::Serialize; + use tempfile::tempdir; + // Substrate + use sc_block_builder::BlockBuilderProvider; use sp_consensus::BlockOrigin; use sp_io::hashing::twox_128; use sp_runtime::{ generic::{Block, BlockId, Header}, traits::{BlakeTwo256, Block as BlockT}, }; - use std::str::FromStr; - use tempfile::tempdir; + use substrate_test_runtime_client::{ + BlockBuilderExt, ClientBlockImportExt, ClientExt, DefaultTestClientBuilderExt, + TestClientBuilder, + }; + // Frontier + use fp_storage::{EthereumStorageSchema, ETHEREUM_CURRENT_TRANSACTION_STATUS, PALLET_ETHEREUM}; + use frontier_template_runtime::RuntimeApi; + + use crate::frontier_db_cmd::{Column, FrontierDbCmd, Operation}; type OpaqueBlock = Block, substrate_test_runtime_client::runtime::Extrinsic>; @@ -93,8 +94,8 @@ mod tests { detailed_log_output: false, }, pruning_params: sc_cli::PruningParams { - pruning: None, - keep_blocks: None, + state_pruning: None, + blocks_pruning: None, }, } } @@ -530,6 +531,7 @@ mod tests { assert_eq!(backend.meta().ethereum_schema(), Ok(None)); } + #[ignore] #[test] fn commitment_create() { let tmp = tempdir().expect("create a temporary directory"); @@ -544,7 +546,7 @@ mod tests { let statuses = vec![t1]; // Build a block and fill the pallet-ethereum status. - let key = storage_prefix_build(b"Ethereum", b"CurrentTransactionStatuses"); + let key = storage_prefix_build(PALLET_ETHEREUM, ETHEREUM_CURRENT_TRANSACTION_STATUS); let mut builder = client.new_block(Default::default()).unwrap(); builder .push_storage_change(key, Some(statuses.encode())) @@ -598,6 +600,7 @@ mod tests { .is_err()); } + #[ignore] #[test] fn commitment_update() { let tmp = tempdir().expect("create a temporary directory"); @@ -617,7 +620,7 @@ mod tests { let statuses_a1 = vec![t1.clone()]; let statuses_a2 = vec![t1, t2]; - let key = storage_prefix_build(b"Ethereum", b"CurrentTransactionStatuses"); + let key = storage_prefix_build(PALLET_ETHEREUM, ETHEREUM_CURRENT_TRANSACTION_STATUS); // First we create block and insert data in the offchain db. @@ -733,6 +736,7 @@ mod tests { ); } + #[ignore] #[test] fn mapping_read_works() { let tmp = tempdir().expect("create a temporary directory"); @@ -747,7 +751,7 @@ mod tests { let statuses = vec![t1]; // Build a block and fill the pallet-ethereum status. - let key = storage_prefix_build(b"Ethereum", b"CurrentTransactionStatuses"); + let key = storage_prefix_build(PALLET_ETHEREUM, ETHEREUM_CURRENT_TRANSACTION_STATUS); let mut builder = client.new_block(Default::default()).unwrap(); builder .push_storage_change(key, Some(statuses.encode())) @@ -764,13 +768,14 @@ mod tests { // Create command using some ethereum block hash as key. let ethereum_block_hash = H256::default(); - let _ = cmd( + assert!(cmd( format!("{:?}", ethereum_block_hash), Some(test_value_path.clone()), Operation::Create, Column::Block, ) - .run(Arc::clone(&client), backend.clone()); + .run(Arc::clone(&client), backend.clone()) + .is_ok()); // Read block command. assert!(cmd( diff --git a/client/cli/src/frontier_db_cmd/utils.rs b/client/cli/src/frontier_db_cmd/utils.rs index 4c203b69a6..a1095534c8 100644 --- a/client/cli/src/frontier_db_cmd/utils.rs +++ b/client/cli/src/frontier_db_cmd/utils.rs @@ -15,21 +15,22 @@ // // You should have received a copy of the GNU General Public License // along with this program. If not, see . -#![allow(clippy::useless_format)] -#![allow(clippy::format_in_format_args)] -use super::{DbValue, Operation}; +#![allow(clippy::format_in_format_args)] -use serde::de::DeserializeOwned; -use serde_json::Deserializer; use std::{ fs, io::{self, Read}, path::PathBuf, }; +use serde::de::DeserializeOwned; +use serde_json::Deserializer; +// Substrate use sp_runtime::traits::Block as BlockT; +use super::{DbValue, Operation}; + pub fn maybe_deserialize_value( operation: &Operation, value: Option<&PathBuf>, @@ -41,7 +42,7 @@ pub fn maybe_deserialize_value( if let Some(Ok(value)) = stream_deser.next() { Ok(Some(value)) } else { - Err("Failed to deserialize value data".to_string().into()) + Err("Failed to deserialize value data".into()) } } @@ -91,7 +92,7 @@ pub trait FrontierDbMessage { } fn one_to_many_error(&self) -> sc_cli::Error { - "One-to-many operation not allowed".to_string().into() + "One-to-many operation not allowed".into() } #[cfg(not(test))] @@ -121,7 +122,7 @@ pub trait FrontierDbMessage { let mut buffer = String::new(); io::stdin().read_line(&mut buffer)?; if buffer.trim() != "confirm" { - return Err(format!("-- Cancel exit --").into()); + return Err("-- Cancel exit --".into()); } Ok(()) } diff --git a/client/consensus/src/lib.rs b/client/consensus/src/lib.rs index 47ee25b062..88b3a4361d 100644 --- a/client/consensus/src/lib.rs +++ b/client/consensus/src/lib.rs @@ -18,6 +18,7 @@ use std::{collections::HashMap, marker::PhantomData, sync::Arc}; +// Substrate use sc_client_api::{backend::AuxStore, BlockOf}; use sc_consensus::{BlockCheckParams, BlockImport, BlockImportParams, ImportResult}; use sp_api::ProvideRuntimeApi; @@ -25,7 +26,7 @@ use sp_block_builder::BlockBuilder as BlockBuilderApi; use sp_blockchain::{well_known_cache_keys::Id as CacheKeyId, HeaderBackend}; use sp_consensus::Error as ConsensusError; use sp_runtime::traits::{Block as BlockT, Header as HeaderT}; - +// Frontier use fp_consensus::{ensure_log, FindLogError}; use fp_rpc::EthereumRuntimeRPCApi; diff --git a/client/db/src/lib.rs b/client/db/src/lib.rs index 3caa87d382..c5b83da3a8 100644 --- a/client/db/src/lib.rs +++ b/client/db/src/lib.rs @@ -27,12 +27,14 @@ use std::{ }; use codec::{Decode, Encode}; -use fp_storage::{EthereumStorageSchema, PALLET_ETHEREUM_SCHEMA_CACHE}; use parking_lot::Mutex; +// Substrate pub use sc_client_db::DatabaseSource; use sp_core::H256; pub use sp_database::Database; use sp_runtime::traits::Block as BlockT; +// Frontier +use fp_storage::{EthereumStorageSchema, PALLET_ETHEREUM_SCHEMA_CACHE}; const DB_HASH_LEN: usize = 32; /// Hash type that this backend uses for the database. diff --git a/client/db/src/parity_db_adapter.rs b/client/db/src/parity_db_adapter.rs index 9d79f1ea03..26168ec34f 100644 --- a/client/db/src/parity_db_adapter.rs +++ b/client/db/src/parity_db_adapter.rs @@ -16,9 +16,10 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -use crate::Database; use sp_database::{error::DatabaseError, Change, ColumnId, Transaction}; +use crate::Database; + fn handle_err(result: parity_db::Result) -> T { match result { Ok(r) => r, diff --git a/client/mapping-sync/src/lib.rs b/client/mapping-sync/src/lib.rs index b4c96e3e38..dcbd6ab823 100644 --- a/client/mapping-sync/src/lib.rs +++ b/client/mapping-sync/src/lib.rs @@ -22,8 +22,7 @@ mod worker; pub use worker::{MappingSyncWorker, SyncStrategy}; -use fp_consensus::FindLogError; -use fp_rpc::EthereumRuntimeRPCApi; +// Substrate use sc_client_api::BlockOf; use sp_api::{ApiExt, ProvideRuntimeApi}; use sp_blockchain::HeaderBackend; @@ -31,6 +30,9 @@ use sp_runtime::{ generic::BlockId, traits::{Block as BlockT, Header as HeaderT, Zero}, }; +// Frontier +use fp_consensus::FindLogError; +use fp_rpc::EthereumRuntimeRPCApi; pub fn sync_block( backend: &fc_db::Backend, diff --git a/client/mapping-sync/src/worker.rs b/client/mapping-sync/src/worker.rs index dd940dafc9..5c6c371634 100644 --- a/client/mapping-sync/src/worker.rs +++ b/client/mapping-sync/src/worker.rs @@ -16,18 +16,21 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -use fp_rpc::EthereumRuntimeRPCApi; +use std::{pin::Pin, sync::Arc, time::Duration}; + use futures::{ prelude::*, task::{Context, Poll}, }; use futures_timer::Delay; use log::debug; +// Substrate use sc_client_api::{BlockOf, ImportNotifications}; use sp_api::ProvideRuntimeApi; use sp_blockchain::HeaderBackend; use sp_runtime::traits::{Block as BlockT, Header as HeaderT}; -use std::{pin::Pin, sync::Arc, time::Duration}; +// Frontier +use fp_rpc::EthereumRuntimeRPCApi; #[derive(PartialEq, Copy, Clone)] pub enum SyncStrategy { diff --git a/client/rpc-core/Cargo.toml b/client/rpc-core/Cargo.toml index aaf794510c..eafdf96802 100644 --- a/client/rpc-core/Cargo.toml +++ b/client/rpc-core/Cargo.toml @@ -18,5 +18,5 @@ serde_json = "1.0" # Parity ethereum-types = "0.13.1" -jsonrpsee = { version = "0.14.0", features = ["server", "macros"] } +jsonrpsee = { version = "0.15.1", features = ["server", "macros"] } rlp = "0.5" diff --git a/client/rpc/Cargo.toml b/client/rpc/Cargo.toml index ffe412ac53..d2297b2345 100644 --- a/client/rpc/Cargo.toml +++ b/client/rpc/Cargo.toml @@ -24,7 +24,7 @@ tokio = { version = "1.19", features = ["sync"] } # Parity codec = { package = "parity-scale-codec", version = "3.0.0" } ethereum-types = "0.13.1" -jsonrpsee = { version = "0.14.0", features = ["server", "macros"] } +jsonrpsee = { version = "0.15.1", features = ["server", "macros"] } libsecp256k1 = "0.7" rlp = "0.5" @@ -32,6 +32,7 @@ rlp = "0.5" prometheus-endpoint = { package = "substrate-prometheus-endpoint", git = "https://github.com/paritytech/substrate", branch = "master" } sc-client-api = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate", branch = "master" } sc-network = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate", branch = "master" } +sc-network-common = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate", branch = "master" } sc-rpc = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate", branch = "master" } sc-service = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate", branch = "master" } sc-transaction-pool = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate", branch = "master" } @@ -39,6 +40,7 @@ sc-transaction-pool-api = { version = "4.0.0-dev", git = "https://github.com/par sp-api = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate", branch = "master" } sp-block-builder = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate", branch = "master" } sp-blockchain = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate", branch = "master" } +sp-consensus = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate", branch = "master" } sp-core = { version = "6.0.0", git = "https://github.com/paritytech/substrate", branch = "master" } sp-io = { version = "6.0.0", git = "https://github.com/paritytech/substrate", branch = "master" } sp-runtime = { version = "6.0.0", git = "https://github.com/paritytech/substrate", branch = "master" } diff --git a/client/rpc/src/eth/block.rs b/client/rpc/src/eth/block.rs index 821ec9f4ad..972063f201 100644 --- a/client/rpc/src/eth/block.rs +++ b/client/rpc/src/eth/block.rs @@ -20,14 +20,14 @@ use std::sync::Arc; use ethereum_types::{H256, U256}; use jsonrpsee::core::RpcResult as Result; - +// Substrate use sc_client_api::backend::{Backend, StateBackend, StorageProvider}; use sc_network::ExHashT; use sc_transaction_pool::ChainApi; use sp_blockchain::HeaderBackend; use sp_core::hashing::keccak_256; use sp_runtime::traits::{BlakeTwo256, Block as BlockT}; - +// Frontier use fc_rpc_core::types::*; use crate::{ diff --git a/client/rpc/src/eth/cache/mod.rs b/client/rpc/src/eth/cache/mod.rs index 6aa019e036..70addaf7f8 100644 --- a/client/rpc/src/eth/cache/mod.rs +++ b/client/rpc/src/eth/cache/mod.rs @@ -24,12 +24,11 @@ use std::{ sync::{Arc, Mutex}, }; -use self::lru_cache::LRUCacheByteLimited; use ethereum::BlockV2 as EthereumBlock; use ethereum_types::{H256, U256}; use futures::StreamExt; use tokio::sync::{mpsc, oneshot}; - +// Substrate use sc_client_api::{ backend::{Backend, StateBackend, StorageProvider}, client::BlockchainEvents, @@ -41,11 +40,12 @@ use sp_runtime::{ generic::BlockId, traits::{BlakeTwo256, Block as BlockT, Header as HeaderT, UniqueSaturatedInto}, }; - +// Frontier use fc_rpc_core::types::*; use fp_rpc::{EthereumRuntimeRPCApi, TransactionStatus}; use fp_storage::EthereumStorageSchema; +use self::lru_cache::LRUCacheByteLimited; use crate::{ frontier_backend_client, overrides::{OverrideHandle, StorageOverride}, diff --git a/client/rpc/src/eth/client.rs b/client/rpc/src/eth/client.rs index 7d871a7add..320eb1e8fc 100644 --- a/client/rpc/src/eth/client.rs +++ b/client/rpc/src/eth/client.rs @@ -18,17 +18,18 @@ use ethereum_types::{H160, H256, U256, U64}; use jsonrpsee::core::RpcResult as Result; - +// Substrate use sc_client_api::backend::{Backend, StateBackend, StorageProvider}; use sc_network::ExHashT; use sc_transaction_pool::ChainApi; use sp_api::ProvideRuntimeApi; use sp_blockchain::HeaderBackend; +use sp_consensus::SyncOracle; use sp_runtime::{ generic::BlockId, traits::{BlakeTwo256, Block as BlockT, UniqueSaturatedInto}, }; - +// Frontier use fc_rpc_core::types::*; use fp_rpc::EthereumRuntimeRPCApi; diff --git a/client/rpc/src/eth/execute.rs b/client/rpc/src/eth/execute.rs index 355c041bdd..e079d6c797 100644 --- a/client/rpc/src/eth/execute.rs +++ b/client/rpc/src/eth/execute.rs @@ -21,7 +21,7 @@ use std::sync::Arc; use ethereum_types::{H256, U256}; use evm::{ExitError, ExitReason}; use jsonrpsee::core::RpcResult as Result; - +// Substrate use sc_client_api::backend::{Backend, StateBackend, StorageProvider}; use sc_network::ExHashT; use sc_transaction_pool::ChainApi; @@ -33,7 +33,7 @@ use sp_runtime::{ traits::{BlakeTwo256, Block as BlockT}, SaturatedConversion, }; - +// Frontier use fc_rpc_core::types::*; use fp_rpc::EthereumRuntimeRPCApi; diff --git a/client/rpc/src/eth/fee.rs b/client/rpc/src/eth/fee.rs index 3968d7b0d0..29ebff4a65 100644 --- a/client/rpc/src/eth/fee.rs +++ b/client/rpc/src/eth/fee.rs @@ -18,7 +18,7 @@ use ethereum_types::{H256, U256}; use jsonrpsee::core::RpcResult as Result; - +// Substrate use sc_client_api::backend::{Backend, StateBackend, StorageProvider}; use sc_network::ExHashT; use sc_transaction_pool::ChainApi; @@ -28,7 +28,7 @@ use sp_runtime::{ generic::BlockId, traits::{BlakeTwo256, Block as BlockT, Header as HeaderT, UniqueSaturatedInto}, }; - +// Frontier use fc_rpc_core::types::*; use fp_rpc::EthereumRuntimeRPCApi; diff --git a/client/rpc/src/eth/filter.rs b/client/rpc/src/eth/filter.rs index 6e0dd142f7..f275c2ead4 100644 --- a/client/rpc/src/eth/filter.rs +++ b/client/rpc/src/eth/filter.rs @@ -21,7 +21,7 @@ use std::{marker::PhantomData, sync::Arc, time}; use ethereum::BlockV2 as EthereumBlock; use ethereum_types::{H256, U256}; use jsonrpsee::core::{async_trait, RpcResult as Result}; - +// Substrate use sc_client_api::backend::{Backend, StateBackend, StorageProvider}; use sp_api::ProvideRuntimeApi; use sp_blockchain::HeaderBackend; @@ -30,7 +30,7 @@ use sp_runtime::{ generic::BlockId, traits::{BlakeTwo256, Block as BlockT, NumberFor, One, Saturating, UniqueSaturatedInto}, }; - +// Frontier use fc_rpc_core::{types::*, EthFilterApiServer}; use fp_rpc::{EthereumRuntimeRPCApi, TransactionStatus}; diff --git a/client/rpc/src/eth/format.rs b/client/rpc/src/eth/format.rs index 421da8f1ca..19df69e2a2 100644 --- a/client/rpc/src/eth/format.rs +++ b/client/rpc/src/eth/format.rs @@ -16,9 +16,11 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -use fp_evm::InvalidEvmTransactionError as VError; +// Substrate use sc_transaction_pool_api::error::{Error as PError, IntoPoolError}; use sp_runtime::transaction_validity::InvalidTransaction; +// Frontier +use fp_evm::InvalidEvmTransactionError as VError; // Formats the same way Geth node formats responses. pub struct Geth; diff --git a/client/rpc/src/eth/mining.rs b/client/rpc/src/eth/mining.rs index c662c206c8..90897d24ad 100644 --- a/client/rpc/src/eth/mining.rs +++ b/client/rpc/src/eth/mining.rs @@ -18,11 +18,11 @@ use ethereum_types::{H256, H64, U256}; use jsonrpsee::core::RpcResult as Result; - +// Substrate use sc_network::ExHashT; use sc_transaction_pool::ChainApi; use sp_runtime::traits::Block as BlockT; - +// Frontier use fc_rpc_core::types::*; use crate::eth::Eth; diff --git a/client/rpc/src/eth/mod.rs b/client/rpc/src/eth/mod.rs index 110785f675..7e1ce0220c 100644 --- a/client/rpc/src/eth/mod.rs +++ b/client/rpc/src/eth/mod.rs @@ -33,7 +33,7 @@ use std::{collections::BTreeMap, marker::PhantomData, sync::Arc}; use ethereum::{BlockV2 as EthereumBlock, TransactionV2 as EthereumTransaction}; use ethereum_types::{H160, H256, H512, H64, U256, U64}; use jsonrpsee::core::{async_trait, RpcResult as Result}; - +// Substrate use sc_client_api::backend::{Backend, StateBackend, StorageProvider}; use sc_network::{ExHashT, NetworkService}; use sc_transaction_pool::{ChainApi, Pool}; @@ -46,7 +46,7 @@ use sp_runtime::{ generic::BlockId, traits::{BlakeTwo256, Block as BlockT, UniqueSaturatedInto}, }; - +// Frontier use fc_rpc_core::{types::*, EthApiServer}; use fp_rpc::{ConvertTransactionRuntimeApi, EthereumRuntimeRPCApi, TransactionStatus}; diff --git a/client/rpc/src/eth/state.rs b/client/rpc/src/eth/state.rs index c637c84660..b37b6dffdc 100644 --- a/client/rpc/src/eth/state.rs +++ b/client/rpc/src/eth/state.rs @@ -16,10 +16,10 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +use codec::Encode; use ethereum_types::{H160, H256, U256}; use jsonrpsee::core::RpcResult as Result; - -use codec::Encode; +// Substrate use sc_client_api::backend::{Backend, StateBackend, StorageProvider}; use sc_network::ExHashT; use sc_transaction_pool::ChainApi; @@ -31,7 +31,7 @@ use sp_runtime::{ generic::BlockId, traits::{BlakeTwo256, Block as BlockT}, }; - +// Frontier use fc_rpc_core::types::*; use fp_rpc::EthereumRuntimeRPCApi; diff --git a/client/rpc/src/eth/submit.rs b/client/rpc/src/eth/submit.rs index 1ae62284a5..9bee93bb45 100644 --- a/client/rpc/src/eth/submit.rs +++ b/client/rpc/src/eth/submit.rs @@ -19,7 +19,7 @@ use ethereum_types::H256; use futures::future::TryFutureExt; use jsonrpsee::core::RpcResult as Result; - +// Substrate use sc_client_api::backend::{Backend, StateBackend, StorageProvider}; use sc_network::ExHashT; use sc_transaction_pool::ChainApi; @@ -32,7 +32,7 @@ use sp_runtime::{ traits::{BlakeTwo256, Block as BlockT}, transaction_validity::TransactionSource, }; - +// Frontier use fc_rpc_core::types::*; use fp_rpc::{ConvertTransaction, ConvertTransactionRuntimeApi, EthereumRuntimeRPCApi}; diff --git a/client/rpc/src/eth/transaction.rs b/client/rpc/src/eth/transaction.rs index 980416ff4d..6b1489662d 100644 --- a/client/rpc/src/eth/transaction.rs +++ b/client/rpc/src/eth/transaction.rs @@ -21,7 +21,7 @@ use std::sync::Arc; use ethereum::TransactionV2 as EthereumTransaction; use ethereum_types::{H256, U256, U64}; use jsonrpsee::core::RpcResult as Result; - +// Substrate use sc_client_api::backend::{Backend, StateBackend, StorageProvider}; use sc_network::ExHashT; use sc_transaction_pool::ChainApi; @@ -33,7 +33,7 @@ use sp_runtime::{ generic::BlockId, traits::{BlakeTwo256, Block as BlockT}, }; - +// Frontier use fc_rpc_core::types::*; use fp_rpc::EthereumRuntimeRPCApi; diff --git a/client/rpc/src/eth_pubsub.rs b/client/rpc/src/eth_pubsub.rs index bc65e6cebb..51275b66ad 100644 --- a/client/rpc/src/eth_pubsub.rs +++ b/client/rpc/src/eth_pubsub.rs @@ -21,20 +21,21 @@ use std::{collections::BTreeMap, marker::PhantomData, sync::Arc}; use ethereum::{BlockV2 as EthereumBlock, TransactionV2 as EthereumTransaction}; use ethereum_types::{H256, U256}; use futures::{FutureExt as _, StreamExt as _}; -use jsonrpsee::PendingSubscription; - +use jsonrpsee::{types::SubscriptionResult, SubscriptionSink}; +// Substrate use sc_client_api::{ backend::{Backend, StateBackend, StorageProvider}, client::BlockchainEvents, }; -use sc_network::{ExHashT, NetworkService}; +use sc_network::{ExHashT, NetworkService, NetworkStatusProvider}; use sc_rpc::SubscriptionTaskExecutor; use sc_transaction_pool_api::TransactionPool; use sp_api::{ApiExt, BlockId, ProvideRuntimeApi}; use sp_blockchain::HeaderBackend; +use sp_consensus::SyncOracle; use sp_core::hashing::keccak_256; use sp_runtime::traits::{BlakeTwo256, Block as BlockT, UniqueSaturatedInto}; - +// Frontier use fc_rpc_core::{ types::{ pubsub::{Kind, Params, PubSubSyncStatus, Result as PubSubResult, SyncStatusMetadata}, @@ -92,12 +93,9 @@ where } } -struct SubscriptionResult {} -impl SubscriptionResult { - pub fn new() -> Self { - SubscriptionResult {} - } - pub fn new_heads(&self, block: EthereumBlock) -> PubSubResult { +struct EthSubscriptionResult; +impl EthSubscriptionResult { + pub fn new_heads(block: EthereumBlock) -> PubSubResult { PubSubResult::Header(Box::new(Rich { inner: Header { hash: Some(H256::from(keccak_256(&rlp::encode(&block.header)))), @@ -122,7 +120,6 @@ impl SubscriptionResult { })) } pub fn logs( - &self, block: EthereumBlock, receipts: Vec, params: &FilteredParams, @@ -143,7 +140,7 @@ impl SubscriptionResult { None }; for log in receipt_logs { - if self.add_log(block_hash.unwrap(), &log, &block, params) { + if Self::add_log(block_hash.unwrap(), &log, &block, params) { logs.push(Log { address: log.address, topics: log.topics, @@ -164,7 +161,6 @@ impl SubscriptionResult { logs } fn add_log( - &self, block_hash: H256, ethereum_log: ðereum::Log, block: &EthereumBlock, @@ -207,12 +203,13 @@ where BE: Backend + 'static, BE::State: StateBackend, { - fn subscribe(&self, sink: PendingSubscription, kind: Kind, params: Option) { - let mut sink = if let Some(sink) = sink.accept() { - sink - } else { - return; - }; + fn subscribe( + &self, + mut sink: SubscriptionSink, + kind: Kind, + params: Option, + ) -> SubscriptionResult { + sink.accept()?; let filtered_params = match params { Some(Params::Logs(filter)) => FilteredParams::new(Some(filter)), @@ -257,7 +254,7 @@ where } }) .flat_map(move |(block, receipts)| { - futures::stream::iter(SubscriptionResult::new().logs( + futures::stream::iter(EthSubscriptionResult::logs( block, receipts, &filtered_params, @@ -289,7 +286,7 @@ where futures::future::ready(None) } }) - .map(|block| SubscriptionResult::new().new_heads(block)); + .map(EthSubscriptionResult::new_heads); sink.pipe_from_stream(stream).await; } Kind::NewPendingTransactions => { @@ -412,5 +409,6 @@ where Some("rpc"), fut.map(drop).boxed(), ); + Ok(()) } } diff --git a/client/rpc/src/lib.rs b/client/rpc/src/lib.rs index 647f8f7985..2b2f2242e6 100644 --- a/client/rpc/src/lib.rs +++ b/client/rpc/src/lib.rs @@ -54,7 +54,7 @@ pub mod frontier_backend_client { use codec::Decode; use ethereum_types::H256; use jsonrpsee::core::RpcResult; - + // Substrate use sc_client_api::backend::{Backend, StateBackend, StorageProvider}; use sp_blockchain::HeaderBackend; use sp_runtime::{ @@ -62,7 +62,7 @@ pub mod frontier_backend_client { traits::{BlakeTwo256, Block as BlockT, Header as HeaderT, UniqueSaturatedInto, Zero}, }; use sp_storage::StorageKey; - + // Frontier use fc_rpc_core::types::BlockNumber; use fp_storage::{EthereumStorageSchema, PALLET_ETHEREUM_SCHEMA}; diff --git a/client/rpc/src/net.rs b/client/rpc/src/net.rs index 2ee504935e..2000b62fb6 100644 --- a/client/rpc/src/net.rs +++ b/client/rpc/src/net.rs @@ -20,11 +20,13 @@ use std::sync::Arc; use ethereum_types::H256; use jsonrpsee::core::RpcResult as Result; +// Substrate use sc_network::{ExHashT, NetworkService}; +use sc_network_common::service::NetworkPeers; use sp_api::ProvideRuntimeApi; use sp_blockchain::HeaderBackend; use sp_runtime::{generic::BlockId, traits::Block as BlockT}; - +// Frontier use fc_rpc_core::{types::PeerCount, NetApiServer}; use fp_rpc::EthereumRuntimeRPCApi; @@ -68,7 +70,7 @@ where } fn peer_count(&self) -> Result { - let peer_count = self.network.num_connected(); + let peer_count = self.network.sync_num_connected(); Ok(match self.peer_count_as_hex { true => PeerCount::String(format!("0x{:x}", peer_count)), false => PeerCount::U32(peer_count as u32), diff --git a/client/rpc/src/overrides/mod.rs b/client/rpc/src/overrides/mod.rs index 914346f580..43836d4be1 100644 --- a/client/rpc/src/overrides/mod.rs +++ b/client/rpc/src/overrides/mod.rs @@ -16,16 +16,17 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -use std::collections::BTreeMap; +use std::{collections::BTreeMap, marker::PhantomData, sync::Arc}; use ethereum::BlockV2 as EthereumBlock; use ethereum_types::{H160, H256, U256}; -use fp_rpc::{EthereumRuntimeRPCApi, TransactionStatus}; -use fp_storage::EthereumStorageSchema; +// Substrate use sp_api::{ApiExt, BlockId, ProvideRuntimeApi}; use sp_io::hashing::{blake2_128, twox_128}; use sp_runtime::{traits::Block as BlockT, Permill}; -use std::{marker::PhantomData, sync::Arc}; +// Frontier +use fp_rpc::{EthereumRuntimeRPCApi, TransactionStatus}; +use fp_storage::EthereumStorageSchema; mod schema_v1_override; mod schema_v2_override; diff --git a/client/rpc/src/overrides/schema_v1_override.rs b/client/rpc/src/overrides/schema_v1_override.rs index dd0fee16a7..7258bc733e 100644 --- a/client/rpc/src/overrides/schema_v1_override.rs +++ b/client/rpc/src/overrides/schema_v1_override.rs @@ -20,7 +20,7 @@ use std::{marker::PhantomData, sync::Arc}; use codec::Decode; use ethereum_types::{H160, H256, U256}; - +// Substrate use sc_client_api::backend::{Backend, StateBackend, StorageProvider}; use sp_api::BlockId; use sp_runtime::{ @@ -28,7 +28,7 @@ use sp_runtime::{ Permill, }; use sp_storage::StorageKey; - +// Frontier use fp_rpc::TransactionStatus; use fp_storage::*; @@ -133,8 +133,8 @@ where self.query_storage::>( block, &StorageKey(storage_prefix_build( - b"Ethereum", - b"CurrentTransactionStatuses", + PALLET_ETHEREUM, + ETHEREUM_CURRENT_TRANSACTION_STATUS, )), ) } diff --git a/client/rpc/src/overrides/schema_v2_override.rs b/client/rpc/src/overrides/schema_v2_override.rs index 80faff842a..713c79eede 100644 --- a/client/rpc/src/overrides/schema_v2_override.rs +++ b/client/rpc/src/overrides/schema_v2_override.rs @@ -20,7 +20,7 @@ use std::{marker::PhantomData, sync::Arc}; use codec::Decode; use ethereum_types::{H160, H256, U256}; - +// Substrate use sc_client_api::backend::{Backend, StateBackend, StorageProvider}; use sp_api::BlockId; use sp_runtime::{ @@ -28,7 +28,7 @@ use sp_runtime::{ Permill, }; use sp_storage::StorageKey; - +// Frontier use fp_rpc::TransactionStatus; use fp_storage::*; diff --git a/client/rpc/src/overrides/schema_v3_override.rs b/client/rpc/src/overrides/schema_v3_override.rs index b157b4f5ba..f2209554ca 100644 --- a/client/rpc/src/overrides/schema_v3_override.rs +++ b/client/rpc/src/overrides/schema_v3_override.rs @@ -20,7 +20,7 @@ use std::{marker::PhantomData, sync::Arc}; use codec::Decode; use ethereum_types::{H160, H256, U256}; - +// Substrate use sc_client_api::backend::{Backend, StateBackend, StorageProvider}; use sp_api::BlockId; use sp_runtime::{ @@ -28,7 +28,7 @@ use sp_runtime::{ Permill, }; use sp_storage::StorageKey; - +// Frontier use fp_rpc::TransactionStatus; use fp_storage::*; diff --git a/client/rpc/src/signer.rs b/client/rpc/src/signer.rs index 7ae8042bac..c1c90fb4a0 100644 --- a/client/rpc/src/signer.rs +++ b/client/rpc/src/signer.rs @@ -19,9 +19,10 @@ use ethereum::TransactionV2 as EthereumTransaction; use ethereum_types::{H160, H256}; use jsonrpsee::core::Error; - -use fc_rpc_core::types::TransactionMessage; +// Substrate use sp_core::hashing::keccak_256; +// Frontier +use fc_rpc_core::types::TransactionMessage; use crate::internal_err; diff --git a/client/rpc/src/web3.rs b/client/rpc/src/web3.rs index 7f664ee0f0..417db683b2 100644 --- a/client/rpc/src/web3.rs +++ b/client/rpc/src/web3.rs @@ -20,11 +20,12 @@ use std::{marker::PhantomData, sync::Arc}; use ethereum_types::H256; use jsonrpsee::core::RpcResult as Result; +// Substrate use sp_api::{Core, ProvideRuntimeApi}; use sp_blockchain::HeaderBackend; use sp_core::keccak_256; use sp_runtime::{generic::BlockId, traits::Block as BlockT}; - +// Frontier use fc_rpc_core::{types::Bytes, Web3ApiServer}; use fp_rpc::EthereumRuntimeRPCApi; diff --git a/template/node/Cargo.toml b/template/node/Cargo.toml index 05472247b0..1ad36412ce 100644 --- a/template/node/Cargo.toml +++ b/template/node/Cargo.toml @@ -19,7 +19,7 @@ log = "0.4.17" # Parity codec = { package = "parity-scale-codec", version = "3.1", features = ["derive"] } -jsonrpsee = { version = "0.14.0", features = ["server", "macros"] } +jsonrpsee = { version = "0.15.1", features = ["server", "macros"] } # Substrate sc-basic-authorship = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate", branch = "master" }