diff --git a/Cargo.lock b/Cargo.lock index 001a30b..6de91a7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2340,7 +2340,7 @@ dependencies = [ "log", "parking_lot 0.12.1", "sc-client-api", - "sc-utils 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43)", + "sc-utils", "sp-api", "sp-blockchain", "sp-consensus", @@ -2384,7 +2384,7 @@ dependencies = [ "sc-service", "sc-transaction-pool", "sc-transaction-pool-api", - "sc-utils 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43)", + "sc-utils", "serde", "sp-api", "sp-block-builder", @@ -4945,7 +4945,7 @@ dependencies = [ "moonbeam-rpc-core-types", "moonbeam-rpc-primitives-debug", "sc-client-api", - "sc-utils 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36)", + "sc-utils", "sp-api", "sp-block-builder", "sp-blockchain", @@ -5005,7 +5005,7 @@ dependencies = [ "moonbeam-rpc-primitives-debug", "sc-client-api", "sc-network", - "sc-utils 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36)", + "sc-utils", "serde", "sha3 0.9.1", "sp-api", @@ -7821,7 +7821,7 @@ dependencies = [ "sc-service", "sc-telemetry", "sc-tracing", - "sc-utils 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43)", + "sc-utils", "serde", "serde_json", "sp-blockchain", @@ -7848,7 +7848,7 @@ dependencies = [ "parking_lot 0.12.1", "sc-executor", "sc-transaction-pool-api", - "sc-utils 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43)", + "sc-utils", "sp-api", "sp-blockchain", "sp-consensus", @@ -7902,7 +7902,7 @@ dependencies = [ "mockall", "parking_lot 0.12.1", "sc-client-api", - "sc-utils 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43)", + "sc-utils", "serde", "sp-api", "sp-blockchain", @@ -8017,7 +8017,7 @@ dependencies = [ "sc-network-common", "sc-network-gossip", "sc-telemetry", - "sc-utils 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43)", + "sc-utils", "serde_json", "sp-api", "sp-application-crypto", @@ -8201,7 +8201,7 @@ dependencies = [ "sc-consensus", "sc-network-common", "sc-peerset", - "sc-utils 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43)", + "sc-utils", "serde", "serde_json", "smallvec", @@ -8254,7 +8254,7 @@ dependencies = [ "prost-build", "sc-consensus", "sc-peerset", - "sc-utils 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43)", + "sc-utils", "serde", "smallvec", "sp-blockchain", @@ -8331,7 +8331,7 @@ dependencies = [ "sc-network", "sc-network-common", "sc-peerset", - "sc-utils 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43)", + "sc-utils", "smallvec", "sp-arithmetic", "sp-blockchain", @@ -8357,7 +8357,7 @@ dependencies = [ "sc-network", "sc-network-common", "sc-peerset", - "sc-utils 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43)", + "sc-utils", "sp-consensus", "sp-runtime", "substrate-prometheus-endpoint", @@ -8385,7 +8385,7 @@ dependencies = [ "sc-network", "sc-network-common", "sc-peerset", - "sc-utils 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43)", + "sc-utils", "sp-api", "sp-core", "sp-offchain", @@ -8404,7 +8404,7 @@ dependencies = [ "log", "parking_lot 0.12.1", "partial_sort", - "sc-utils 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43)", + "sc-utils", "serde_json", "sp-arithmetic", "wasm-timer", @@ -8435,7 +8435,7 @@ dependencies = [ "sc-rpc-api", "sc-tracing", "sc-transaction-pool-api", - "sc-utils 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43)", + "sc-utils", "serde_json", "sp-api", "sp-blockchain", @@ -8550,7 +8550,7 @@ dependencies = [ "sc-tracing", "sc-transaction-pool", "sc-transaction-pool-api", - "sc-utils 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43)", + "sc-utils", "serde", "serde_json", "sp-api", @@ -8597,7 +8597,7 @@ dependencies = [ "futures 0.3.29", "log", "sc-client-db", - "sc-utils 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43)", + "sc-utils", "sp-core", "thiserror", "tokio", @@ -8634,7 +8634,7 @@ dependencies = [ "parking_lot 0.12.1", "pin-project", "rand 0.8.5", - "sc-utils 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43)", + "sc-utils", "serde", "serde_json", "thiserror", @@ -8698,7 +8698,7 @@ dependencies = [ "parking_lot 0.12.1", "sc-client-api", "sc-transaction-pool-api", - "sc-utils 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43)", + "sc-utils", "serde", "sp-api", "sp-blockchain", @@ -8724,19 +8724,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "sc-utils" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" -dependencies = [ - "futures 0.3.29", - "futures-timer", - "lazy_static", - "log", - "parking_lot 0.12.1", - "prometheus", -] - [[package]] name = "sc-utils" version = "4.0.0-dev" diff --git a/Cargo.toml b/Cargo.toml index dd89032..d6f8cce 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -121,8 +121,7 @@ sc-transaction-pool = { version = "4.0.0-dev", git = "https://github.com/parityt sc-transaction-pool-api = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } sc-proposer-metrics = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43"} sc-offchain = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -sc-finality-grandpa = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } -sc-utils = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sc-utils = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } # Substrate Primitive sp-api = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } sp-block-builder = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } diff --git a/node/src/rpc/eth.rs b/node/src/rpc/eth.rs index fd37f9d..44f9219 100644 --- a/node/src/rpc/eth.rs +++ b/node/src/rpc/eth.rs @@ -24,6 +24,7 @@ pub use fc_rpc::{EthBlockDataCacheTask, EthConfig, OverrideHandle, StorageOverri pub use fc_rpc_core::types::{FeeHistoryCache, FeeHistoryCacheLimit, FilterPool}; pub use fc_storage::overrides_handle; use fp_rpc::{ConvertTransaction, ConvertTransactionRuntimeApi, EthereumRuntimeRPCApi}; +use crate::eth::{EthApi, EthConfiguration}; use super::TracingConfig; @@ -100,6 +101,7 @@ pub fn create_eth>( fc_mapping_sync::EthereumBlockNotification, >, >, + eth_config: &EthConfiguration, optional_tracing_config: Option, ) -> Result, Box> where @@ -215,7 +217,10 @@ where io.merge(Trace::new(client.clone(), trace_requester, 20).into_rpc())?; } } - io.merge(tx_pool.into_rpc())?; + + if eth_config.ethapi.contains(&EthApi::Txpool) { + io.merge(tx_pool.into_rpc())?; + } Ok(io) } diff --git a/node/src/rpc/mod.rs b/node/src/rpc/mod.rs index cca5789..62030ba 100644 --- a/node/src/rpc/mod.rs +++ b/node/src/rpc/mod.rs @@ -25,7 +25,8 @@ mod tracing; pub use self::tracing::*; mod eth; -pub use self::eth::{create_eth, overrides_handle, EthDeps}; +pub use self::eth::{create_eth, overrides_handle, EthDeps, }; +use crate::service::EthConfiguration; /// Full client dependencies. pub struct FullDeps { @@ -59,6 +60,7 @@ pub struct TracingConfig { /// Instantiate all Full RPC extensions. pub fn create_full( + eth_config: &EthConfiguration, deps: FullDeps, subscription_task_executor: SubscriptionTaskExecutor, pubsub_notification_sinks: Arc< @@ -119,6 +121,7 @@ where eth, subscription_task_executor, pubsub_notification_sinks, + eth_config, optional_tracing_config, )?; diff --git a/node/src/service.rs b/node/src/service.rs index 044f586..30066a7 100644 --- a/node/src/service.rs +++ b/node/src/service.rs @@ -440,6 +440,7 @@ where }; crate::rpc::create_full( + ð_config.clone(), deps, subscription_task_executor, pubsub_notification_sinks.clone(), diff --git a/vendor/client/rpc/debug/src/lib.rs b/vendor/client/rpc/debug/src/lib.rs index e8da6bf..a4301e9 100644 --- a/vendor/client/rpc/debug/src/lib.rs +++ b/vendor/client/rpc/debug/src/lib.rs @@ -148,7 +148,7 @@ where raw_max_memory_usage: usize, ) -> (impl Future, DebugRequester) { let (tx, mut rx): (DebugRequester, _) = - sc_utils::mpsc::tracing_unbounded("debug-requester"); + sc_utils::mpsc::tracing_unbounded("debug-requester", 1000); let fut = async move { loop { diff --git a/vendor/client/rpc/trace/src/lib.rs b/vendor/client/rpc/trace/src/lib.rs index 6b60264..e749ec8 100644 --- a/vendor/client/rpc/trace/src/lib.rs +++ b/vendor/client/rpc/trace/src/lib.rs @@ -447,7 +447,7 @@ where ) -> (impl Future, CacheRequester) { // Communication with the outside world : let (requester_tx, mut requester_rx) = - sc_utils::mpsc::tracing_unbounded("trace-filter-cache"); + sc_utils::mpsc::tracing_unbounded("trace-filter-cache", 1000); // Task running in the service. let task = async move {