From d991abea7f4d15cea613d19ffb397ba1d2915740 Mon Sep 17 00:00:00 2001 From: bear Date: Sat, 18 Sep 2021 15:58:45 +0800 Subject: [PATCH] Companion for dvm update 817 (#738) * Companion for common 817 * Bump `darwinia-common` Co-authored-by: Xavier Lau --- Cargo.lock | 146 ++++++++++++++++--------------- node/service/src/service/crab.rs | 7 +- rpc/src/crab.rs | 3 +- 3 files changed, 82 insertions(+), 74 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6c7771a09..4f1549f4c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1316,8 +1316,8 @@ dependencies = [ [[package]] name = "darwinia-balances" -version = "2.6.2" -source = "git+https://github.com/darwinia-network/darwinia-common?branch=master#3269f9315a67ab17d03b57927eddfaafec7ee2ad" +version = "2.6.4" +source = "git+https://github.com/darwinia-network/darwinia-common?branch=master#e7fa03775942b1836c91c77c4f79d2292b604675" dependencies = [ "darwinia-balances-rpc-runtime-api", "darwinia-support", @@ -1331,8 +1331,8 @@ dependencies = [ [[package]] name = "darwinia-balances-rpc" -version = "2.6.2" -source = "git+https://github.com/darwinia-network/darwinia-common?branch=master#3269f9315a67ab17d03b57927eddfaafec7ee2ad" +version = "2.6.4" +source = "git+https://github.com/darwinia-network/darwinia-common?branch=master#e7fa03775942b1836c91c77c4f79d2292b604675" dependencies = [ "darwinia-balances-rpc-runtime-api", "jsonrpc-core", @@ -1346,8 +1346,8 @@ dependencies = [ [[package]] name = "darwinia-balances-rpc-runtime-api" -version = "2.6.2" -source = "git+https://github.com/darwinia-network/darwinia-common?branch=master#3269f9315a67ab17d03b57927eddfaafec7ee2ad" +version = "2.6.4" +source = "git+https://github.com/darwinia-network/darwinia-common?branch=master#e7fa03775942b1836c91c77c4f79d2292b604675" dependencies = [ "darwinia-support", "parity-scale-codec", @@ -1358,8 +1358,8 @@ dependencies = [ [[package]] name = "darwinia-bridge-ethereum" -version = "2.6.2" -source = "git+https://github.com/darwinia-network/darwinia-common?branch=master#3269f9315a67ab17d03b57927eddfaafec7ee2ad" +version = "2.6.4" +source = "git+https://github.com/darwinia-network/darwinia-common?branch=master#e7fa03775942b1836c91c77c4f79d2292b604675" dependencies = [ "array-bytes", "blake2-rfc", @@ -1382,8 +1382,8 @@ dependencies = [ [[package]] name = "darwinia-claims" -version = "2.6.2" -source = "git+https://github.com/darwinia-network/darwinia-common?branch=master#3269f9315a67ab17d03b57927eddfaafec7ee2ad" +version = "2.6.4" +source = "git+https://github.com/darwinia-network/darwinia-common?branch=master#e7fa03775942b1836c91c77c4f79d2292b604675" dependencies = [ "array-bytes", "darwinia-support", @@ -1418,8 +1418,8 @@ dependencies = [ [[package]] name = "darwinia-democracy" -version = "2.6.2" -source = "git+https://github.com/darwinia-network/darwinia-common?branch=master#3269f9315a67ab17d03b57927eddfaafec7ee2ad" +version = "2.6.4" +source = "git+https://github.com/darwinia-network/darwinia-common?branch=master#e7fa03775942b1836c91c77c4f79d2292b604675" dependencies = [ "darwinia-support", "frame-support", @@ -1433,8 +1433,8 @@ dependencies = [ [[package]] name = "darwinia-elections-phragmen" -version = "2.6.2" -source = "git+https://github.com/darwinia-network/darwinia-common?branch=master#3269f9315a67ab17d03b57927eddfaafec7ee2ad" +version = "2.6.4" +source = "git+https://github.com/darwinia-network/darwinia-common?branch=master#e7fa03775942b1836c91c77c4f79d2292b604675" dependencies = [ "darwinia-support", "frame-support", @@ -1450,8 +1450,8 @@ dependencies = [ [[package]] name = "darwinia-evm" -version = "2.6.2" -source = "git+https://github.com/darwinia-network/darwinia-common?branch=master#3269f9315a67ab17d03b57927eddfaafec7ee2ad" +version = "2.6.4" +source = "git+https://github.com/darwinia-network/darwinia-common?branch=master#e7fa03775942b1836c91c77c4f79d2292b604675" dependencies = [ "array-bytes", "darwinia-balances", @@ -1477,8 +1477,8 @@ dependencies = [ [[package]] name = "darwinia-evm-precompile-simple" -version = "2.6.2" -source = "git+https://github.com/darwinia-network/darwinia-common?branch=master#3269f9315a67ab17d03b57927eddfaafec7ee2ad" +version = "2.6.4" +source = "git+https://github.com/darwinia-network/darwinia-common?branch=master#e7fa03775942b1836c91c77c4f79d2292b604675" dependencies = [ "dp-evm", "evm", @@ -1489,8 +1489,8 @@ dependencies = [ [[package]] name = "darwinia-evm-precompile-transfer" -version = "2.6.2" -source = "git+https://github.com/darwinia-network/darwinia-common?branch=master#3269f9315a67ab17d03b57927eddfaafec7ee2ad" +version = "2.6.4" +source = "git+https://github.com/darwinia-network/darwinia-common?branch=master#e7fa03775942b1836c91c77c4f79d2292b604675" dependencies = [ "array-bytes", "darwinia-evm", @@ -1514,8 +1514,8 @@ dependencies = [ [[package]] name = "darwinia-header-mmr" -version = "2.6.2" -source = "git+https://github.com/darwinia-network/darwinia-common?branch=master#3269f9315a67ab17d03b57927eddfaafec7ee2ad" +version = "2.6.4" +source = "git+https://github.com/darwinia-network/darwinia-common?branch=master#e7fa03775942b1836c91c77c4f79d2292b604675" dependencies = [ "ckb-merkle-mountain-range", "darwinia-header-mmr-rpc-runtime-api", @@ -1534,8 +1534,8 @@ dependencies = [ [[package]] name = "darwinia-header-mmr-rpc" -version = "2.6.2" -source = "git+https://github.com/darwinia-network/darwinia-common?branch=master#3269f9315a67ab17d03b57927eddfaafec7ee2ad" +version = "2.6.4" +source = "git+https://github.com/darwinia-network/darwinia-common?branch=master#e7fa03775942b1836c91c77c4f79d2292b604675" dependencies = [ "darwinia-header-mmr-rpc-runtime-api", "jsonrpc-core", @@ -1549,8 +1549,8 @@ dependencies = [ [[package]] name = "darwinia-header-mmr-rpc-runtime-api" -version = "2.6.2" -source = "git+https://github.com/darwinia-network/darwinia-common?branch=master#3269f9315a67ab17d03b57927eddfaafec7ee2ad" +version = "2.6.4" +source = "git+https://github.com/darwinia-network/darwinia-common?branch=master#e7fa03775942b1836c91c77c4f79d2292b604675" dependencies = [ "darwinia-support", "parity-scale-codec", @@ -1574,8 +1574,8 @@ dependencies = [ [[package]] name = "darwinia-relay-authorities" -version = "2.6.2" -source = "git+https://github.com/darwinia-network/darwinia-common?branch=master#3269f9315a67ab17d03b57927eddfaafec7ee2ad" +version = "2.6.4" +source = "git+https://github.com/darwinia-network/darwinia-common?branch=master#e7fa03775942b1836c91c77c4f79d2292b604675" dependencies = [ "darwinia-relay-primitives", "darwinia-support", @@ -1589,8 +1589,8 @@ dependencies = [ [[package]] name = "darwinia-relay-primitives" -version = "2.6.2" -source = "git+https://github.com/darwinia-network/darwinia-common?branch=master#3269f9315a67ab17d03b57927eddfaafec7ee2ad" +version = "2.6.4" +source = "git+https://github.com/darwinia-network/darwinia-common?branch=master#e7fa03775942b1836c91c77c4f79d2292b604675" dependencies = [ "frame-support", "parity-scale-codec", @@ -1600,8 +1600,8 @@ dependencies = [ [[package]] name = "darwinia-relayer-game" -version = "2.6.2" -source = "git+https://github.com/darwinia-network/darwinia-common?branch=master#3269f9315a67ab17d03b57927eddfaafec7ee2ad" +version = "2.6.4" +source = "git+https://github.com/darwinia-network/darwinia-common?branch=master#e7fa03775942b1836c91c77c4f79d2292b604675" dependencies = [ "darwinia-relay-primitives", "darwinia-support", @@ -1815,8 +1815,8 @@ dependencies = [ [[package]] name = "darwinia-staking" -version = "2.6.2" -source = "git+https://github.com/darwinia-network/darwinia-common?branch=master#3269f9315a67ab17d03b57927eddfaafec7ee2ad" +version = "2.6.4" +source = "git+https://github.com/darwinia-network/darwinia-common?branch=master#e7fa03775942b1836c91c77c4f79d2292b604675" dependencies = [ "darwinia-staking-rpc-runtime-api", "darwinia-support", @@ -1840,8 +1840,8 @@ dependencies = [ [[package]] name = "darwinia-staking-rpc" -version = "2.6.2" -source = "git+https://github.com/darwinia-network/darwinia-common?branch=master#3269f9315a67ab17d03b57927eddfaafec7ee2ad" +version = "2.6.4" +source = "git+https://github.com/darwinia-network/darwinia-common?branch=master#e7fa03775942b1836c91c77c4f79d2292b604675" dependencies = [ "darwinia-staking-rpc-runtime-api", "jsonrpc-core", @@ -1855,8 +1855,8 @@ dependencies = [ [[package]] name = "darwinia-staking-rpc-runtime-api" -version = "2.6.2" -source = "git+https://github.com/darwinia-network/darwinia-common?branch=master#3269f9315a67ab17d03b57927eddfaafec7ee2ad" +version = "2.6.4" +source = "git+https://github.com/darwinia-network/darwinia-common?branch=master#e7fa03775942b1836c91c77c4f79d2292b604675" dependencies = [ "darwinia-support", "parity-scale-codec", @@ -1867,8 +1867,8 @@ dependencies = [ [[package]] name = "darwinia-support" -version = "2.6.2" -source = "git+https://github.com/darwinia-network/darwinia-common?branch=master#3269f9315a67ab17d03b57927eddfaafec7ee2ad" +version = "2.6.4" +source = "git+https://github.com/darwinia-network/darwinia-common?branch=master#e7fa03775942b1836c91c77c4f79d2292b604675" dependencies = [ "array-bytes", "bp-runtime", @@ -1888,8 +1888,8 @@ dependencies = [ [[package]] name = "darwinia-vesting" -version = "2.6.2" -source = "git+https://github.com/darwinia-network/darwinia-common?branch=master#3269f9315a67ab17d03b57927eddfaafec7ee2ad" +version = "2.6.4" +source = "git+https://github.com/darwinia-network/darwinia-common?branch=master#e7fa03775942b1836c91c77c4f79d2292b604675" dependencies = [ "darwinia-support", "frame-support", @@ -1927,9 +1927,11 @@ dependencies = [ [[package]] name = "dc-db" -version = "2.6.2" -source = "git+https://github.com/darwinia-network/darwinia-common?branch=master#3269f9315a67ab17d03b57927eddfaafec7ee2ad" +version = "2.6.4" +source = "git+https://github.com/darwinia-network/darwinia-common?branch=master#e7fa03775942b1836c91c77c4f79d2292b604675" dependencies = [ + "dp-storage", + "dvm-ethereum", "kvdb", "kvdb-rocksdb", "parity-scale-codec", @@ -1941,8 +1943,8 @@ dependencies = [ [[package]] name = "dc-mapping-sync" -version = "2.6.2" -source = "git+https://github.com/darwinia-network/darwinia-common?branch=master#3269f9315a67ab17d03b57927eddfaafec7ee2ad" +version = "2.6.4" +source = "git+https://github.com/darwinia-network/darwinia-common?branch=master#e7fa03775942b1836c91c77c4f79d2292b604675" dependencies = [ "dc-db", "dp-consensus", @@ -1958,8 +1960,8 @@ dependencies = [ [[package]] name = "dc-rpc" -version = "2.6.2" -source = "git+https://github.com/darwinia-network/darwinia-common?branch=master#3269f9315a67ab17d03b57927eddfaafec7ee2ad" +version = "2.6.4" +source = "git+https://github.com/darwinia-network/darwinia-common?branch=master#e7fa03775942b1836c91c77c4f79d2292b604675" dependencies = [ "array-bytes", "dc-db", @@ -2079,8 +2081,8 @@ dependencies = [ [[package]] name = "dp-consensus" -version = "2.6.2" -source = "git+https://github.com/darwinia-network/darwinia-common?branch=master#3269f9315a67ab17d03b57927eddfaafec7ee2ad" +version = "2.6.4" +source = "git+https://github.com/darwinia-network/darwinia-common?branch=master#e7fa03775942b1836c91c77c4f79d2292b604675" dependencies = [ "ethereum", "parity-scale-codec", @@ -2093,8 +2095,8 @@ dependencies = [ [[package]] name = "dp-evm" -version = "2.6.2" -source = "git+https://github.com/darwinia-network/darwinia-common?branch=master#3269f9315a67ab17d03b57927eddfaafec7ee2ad" +version = "2.6.4" +source = "git+https://github.com/darwinia-network/darwinia-common?branch=master#e7fa03775942b1836c91c77c4f79d2292b604675" dependencies = [ "evm", "impl-trait-for-tuples", @@ -2106,8 +2108,8 @@ dependencies = [ [[package]] name = "dp-rpc" -version = "2.6.2" -source = "git+https://github.com/darwinia-network/darwinia-common?branch=master#3269f9315a67ab17d03b57927eddfaafec7ee2ad" +version = "2.6.4" +source = "git+https://github.com/darwinia-network/darwinia-common?branch=master#e7fa03775942b1836c91c77c4f79d2292b604675" dependencies = [ "ethereum-types", "jsonrpc-core", @@ -2121,13 +2123,13 @@ dependencies = [ [[package]] name = "dp-storage" -version = "2.6.2" -source = "git+https://github.com/darwinia-network/darwinia-common?branch=master#3269f9315a67ab17d03b57927eddfaafec7ee2ad" +version = "2.6.4" +source = "git+https://github.com/darwinia-network/darwinia-common?branch=master#e7fa03775942b1836c91c77c4f79d2292b604675" [[package]] name = "dvm-dynamic-fee" -version = "2.6.2" -source = "git+https://github.com/darwinia-network/darwinia-common?branch=master#3269f9315a67ab17d03b57927eddfaafec7ee2ad" +version = "2.6.4" +source = "git+https://github.com/darwinia-network/darwinia-common?branch=master#e7fa03775942b1836c91c77c4f79d2292b604675" dependencies = [ "async-trait", "darwinia-evm", @@ -2141,8 +2143,8 @@ dependencies = [ [[package]] name = "dvm-ethereum" -version = "2.6.2" -source = "git+https://github.com/darwinia-network/darwinia-common?branch=master#3269f9315a67ab17d03b57927eddfaafec7ee2ad" +version = "2.6.4" +source = "git+https://github.com/darwinia-network/darwinia-common?branch=master#e7fa03775942b1836c91c77c4f79d2292b604675" dependencies = [ "darwinia-evm", "darwinia-support", @@ -2170,8 +2172,8 @@ dependencies = [ [[package]] name = "dvm-rpc-core" -version = "2.6.2" -source = "git+https://github.com/darwinia-network/darwinia-common?branch=master#3269f9315a67ab17d03b57927eddfaafec7ee2ad" +version = "2.6.4" +source = "git+https://github.com/darwinia-network/darwinia-common?branch=master#e7fa03775942b1836c91c77c4f79d2292b604675" dependencies = [ "darwinia-evm", "dp-evm", @@ -2190,8 +2192,8 @@ dependencies = [ [[package]] name = "dvm-rpc-runtime-api" -version = "2.6.2" -source = "git+https://github.com/darwinia-network/darwinia-common?branch=master#3269f9315a67ab17d03b57927eddfaafec7ee2ad" +version = "2.6.4" +source = "git+https://github.com/darwinia-network/darwinia-common?branch=master#e7fa03775942b1836c91c77c4f79d2292b604675" dependencies = [ "darwinia-evm", "darwinia-support", @@ -2416,8 +2418,8 @@ dependencies = [ [[package]] name = "ethereum-primitives" -version = "2.6.2" -source = "git+https://github.com/darwinia-network/darwinia-common?branch=master#3269f9315a67ab17d03b57927eddfaafec7ee2ad" +version = "2.6.4" +source = "git+https://github.com/darwinia-network/darwinia-common?branch=master#e7fa03775942b1836c91c77c4f79d2292b604675" dependencies = [ "array-bytes", "ethash", @@ -4762,8 +4764,8 @@ checksum = "71d96e3f3c0b6325d8ccd83c33b28acb183edcb6c67938ba104ec546854b0882" [[package]] name = "merkle-patricia-trie" -version = "2.6.2" -source = "git+https://github.com/darwinia-network/darwinia-common?branch=master#3269f9315a67ab17d03b57927eddfaafec7ee2ad" +version = "2.6.4" +source = "git+https://github.com/darwinia-network/darwinia-common?branch=master#e7fa03775942b1836c91c77c4f79d2292b604675" dependencies = [ "hashbrown 0.9.1", "keccak-hash", @@ -9202,8 +9204,8 @@ checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" [[package]] name = "to-ethereum-backing" -version = "2.6.2" -source = "git+https://github.com/darwinia-network/darwinia-common?branch=master#3269f9315a67ab17d03b57927eddfaafec7ee2ad" +version = "2.6.4" +source = "git+https://github.com/darwinia-network/darwinia-common?branch=master#e7fa03775942b1836c91c77c4f79d2292b604675" dependencies = [ "array-bytes", "darwinia-relay-primitives", @@ -9223,8 +9225,8 @@ dependencies = [ [[package]] name = "to-tron-backing" -version = "2.6.2" -source = "git+https://github.com/darwinia-network/darwinia-common?branch=master#3269f9315a67ab17d03b57927eddfaafec7ee2ad" +version = "2.6.4" +source = "git+https://github.com/darwinia-network/darwinia-common?branch=master#e7fa03775942b1836c91c77c4f79d2292b604675" dependencies = [ "frame-support", "frame-system", diff --git a/node/service/src/service/crab.rs b/node/service/src/service/crab.rs index 470ac6e39..ff8b5f93a 100644 --- a/node/service/src/service/crab.rs +++ b/node/service/src/service/crab.rs @@ -70,7 +70,7 @@ use darwinia_rpc::{ BabeDeps, DenyUnsafe, GrandpaDeps, RpcExtension, SubscriptionTaskExecutor, }; use dc_db::{Backend, DatabaseSettings, DatabaseSettingsSrc}; -use dc_mapping_sync::MappingSyncWorker; +use dc_mapping_sync::{MappingSyncWorker, SyncStrategy}; use dc_rpc::EthTask; use dp_rpc::{FilterPool, PendingTransactions}; @@ -571,6 +571,10 @@ where ), ); } + task_manager.spawn_essential_handle().spawn( + "frontier-schema-cache-task", + EthTask::ethereum_schema_cache_task(Arc::clone(&client), Arc::clone(&dvm_backend)), + ); if is_archive { task_manager.spawn_essential_handle().spawn( @@ -581,6 +585,7 @@ where client.clone(), backend.clone(), dvm_backend.clone(), + SyncStrategy::Normal, ) .for_each(|()| futures::future::ready(())), ); diff --git a/rpc/src/crab.rs b/rpc/src/crab.rs index ff62f87d3..0094a1333 100644 --- a/rpc/src/crab.rs +++ b/rpc/src/crab.rs @@ -208,13 +208,14 @@ where network.clone(), overrides.clone(), pending_transactions.clone(), - backend, + backend.clone(), is_authority, max_past_logs, ))); if let Some(filter_pool) = filter_pool { io.extend_with(EthFilterApiServer::to_delegate(EthFilterApi::new( client.clone(), + backend, filter_pool.clone(), 500 as usize, // max stored filters overrides.clone(),