Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
301 changes: 224 additions & 77 deletions Cargo.lock

Large diffs are not rendered by default.

5 changes: 1 addition & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,9 @@ pallet-bridge-parachains = { git = "https://github.com/darwinia-network/darwinia
pallet-fee-market = { git = "https://github.com/darwinia-network/darwinia-messages-substrate", branch = "polkadot-v0.9.43", default-features = false }

# frontier
fc-cli = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v0.9.43" }
fc-consensus = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v0.9.43" }
fc-db = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v0.9.43" }
fc-mapping-sync = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v0.9.43" }
fc-mapping-sync = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v0.9.43", features = ["sql"] }
fc-rpc = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v0.9.43", features = ["rpc-binary-search-estimate"] }
fc-rpc-core = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v0.9.43" }
fc-storage = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v0.9.43" }
Expand All @@ -111,9 +110,7 @@ moonbeam-evm-tracer = { git = "https://github.com/darwinia-network/mo
moonbeam-primitives-ext = { git = "https://github.com/darwinia-network/moonbeam", branch = "dev", default-features = false }
moonbeam-rpc-debug = { git = "https://github.com/darwinia-network/moonbeam", branch = "dev" }
moonbeam-rpc-primitives-debug = { git = "https://github.com/darwinia-network/moonbeam", branch = "dev", default-features = false }
moonbeam-rpc-primitives-txpool = { git = "https://github.com/darwinia-network/moonbeam", branch = "dev", default-features = false }
moonbeam-rpc-trace = { git = "https://github.com/darwinia-network/moonbeam", branch = "dev" }
moonbeam-rpc-txpool = { git = "https://github.com/darwinia-network/moonbeam", branch = "dev" }
pallet-ethereum-xcm = { git = "https://github.com/darwinia-network/moonbeam", branch = "dev", default-features = false }
precompile-utils = { git = "https://github.com/darwinia-network/moonbeam", branch = "dev", default-features = false }
xcm-primitives = { git = "https://github.com/darwinia-network/moonbeam", branch = "dev", default-features = false }
Expand Down
3 changes: 0 additions & 3 deletions node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ pangolin-runtime = { workspace = true, optional = true }
pangoro-runtime = { workspace = true, optional = true }

# frontier
fc-cli = { workspace = true }
fc-db = { workspace = true }
fc-mapping-sync = { workspace = true }
fc-rpc = { workspace = true }
Expand All @@ -52,9 +51,7 @@ fp-rpc = { workspace = true, features = ["std"] }
moonbeam-primitives-ext = { workspace = true, optional = true, features = ["std"] }
moonbeam-rpc-debug = { workspace = true }
moonbeam-rpc-primitives-debug = { workspace = true, features = ["std"] }
moonbeam-rpc-primitives-txpool = { workspace = true, features = ["std"] }
moonbeam-rpc-trace = { workspace = true }
moonbeam-rpc-txpool = { workspace = true }

# polkadot
polkadot-cli = { workspace = true }
Expand Down
44 changes: 41 additions & 3 deletions node/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,6 @@ pub enum Subcommand {
/// Export the genesis wasm of the parachain.
ExportGenesisWasm(cumulus_client_cli::ExportGenesisWasmCommand),

/// Db meta columns information.
FrontierDb(fc_cli::FrontierDbCmd),

/// Sub-commands concerned with benchmarking.
/// The pallet benchmarking moved to the `pallet` sub-command.
#[cfg(feature = "runtime-benchmarks")]
Expand Down Expand Up @@ -131,6 +128,16 @@ impl RelayChainCli {
}
}

/// Available frontier backend types.
#[derive(Debug, Copy, Clone, Default, clap::ValueEnum)]
pub enum FrontierBackendType {
/// Either RocksDb or ParityDb as per inherited from the global backend settings.
#[default]
KeyValue,
/// Sql database with custom log indexing.
Sql,
}

#[derive(Debug, clap::Parser)]
pub struct EthArgs {
/// Enable EVM tracing functionalities.
Expand Down Expand Up @@ -172,6 +179,27 @@ pub struct EthArgs {
/// Maximum fee history cache size.
#[arg(long, default_value = "2048")]
pub fee_history_limit: u64,

/// Sets the frontier backend type (KeyValue or Sql)
#[arg(long, value_enum, ignore_case = true, default_value_t = FrontierBackendType::default())]
pub frontier_backend_type: FrontierBackendType,

// Sets the SQL backend's pool size.
#[arg(long, default_value = "100")]
pub frontier_sql_backend_pool_size: u32,

/// Sets the SQL backend's query timeout in number of VM ops.
#[arg(long, default_value = "10000000")]
pub frontier_sql_backend_num_ops_timeout: u32,

/// Sets the SQL backend's auxiliary thread limit.
#[arg(long, default_value = "4")]
pub frontier_sql_backend_thread_count: u32,

/// Sets the SQL backend's query timeout in number of VM ops.
/// Default value is 200MB.
#[arg(long, default_value = "209715200")]
pub frontier_sql_backend_cache_size: u64,
}
impl EthArgs {
pub fn build_eth_rpc_config(&self) -> EthRpcConfig {
Expand All @@ -185,6 +213,11 @@ impl EthArgs {
eth_log_block_cache: self.eth_log_block_cache,
max_past_logs: self.max_past_logs,
fee_history_limit: self.fee_history_limit,
frontier_backend_type: self.frontier_backend_type,
frontier_sql_backend_pool_size: self.frontier_sql_backend_pool_size,
frontier_sql_backend_num_ops_timeout: self.frontier_sql_backend_num_ops_timeout,
frontier_sql_backend_thread_count: self.frontier_sql_backend_thread_count,
frontier_sql_backend_cache_size: self.frontier_sql_backend_cache_size,
}
}
}
Expand Down Expand Up @@ -217,4 +250,9 @@ pub struct EthRpcConfig {
pub eth_statuses_cache: usize,
pub fee_history_limit: u64,
pub max_past_logs: u32,
pub frontier_backend_type: FrontierBackendType,
pub frontier_sql_backend_pool_size: u32,
pub frontier_sql_backend_num_ops_timeout: u32,
pub frontier_sql_backend_thread_count: u32,
pub frontier_sql_backend_cache_size: u64,
}
Loading