mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
feat(bin): unhide and enable full flag (#4327)
This commit is contained in:
@ -13,30 +13,27 @@ use std::sync::Arc;
|
|||||||
pub struct PruningArgs {
|
pub struct PruningArgs {
|
||||||
/// Run full node. Only the most recent 128 block states are stored. This flag takes
|
/// Run full node. Only the most recent 128 block states are stored. This flag takes
|
||||||
/// priority over pruning configuration in reth.toml.
|
/// priority over pruning configuration in reth.toml.
|
||||||
// TODO(alexey): unhide when pruning is ready for production use
|
#[arg(long, default_value_t = false)]
|
||||||
#[arg(long, hide = true, default_value_t = false)]
|
|
||||||
pub full: bool,
|
pub full: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl PruningArgs {
|
impl PruningArgs {
|
||||||
/// Returns pruning configuration.
|
/// Returns pruning configuration.
|
||||||
pub fn prune_config(&self, _chain_spec: Arc<ChainSpec>) -> eyre::Result<Option<PruneConfig>> {
|
pub fn prune_config(&self, chain_spec: Arc<ChainSpec>) -> eyre::Result<Option<PruneConfig>> {
|
||||||
Ok(if self.full {
|
Ok(if self.full {
|
||||||
eyre::bail!("full node is not supported yet, keep an eye on next releases");
|
|
||||||
#[allow(unreachable_code)]
|
|
||||||
Some(PruneConfig {
|
Some(PruneConfig {
|
||||||
block_interval: 5,
|
block_interval: 5,
|
||||||
parts: PruneModes {
|
parts: PruneModes {
|
||||||
sender_recovery: Some(PruneMode::Distance(MINIMUM_PRUNING_DISTANCE)),
|
sender_recovery: Some(PruneMode::Distance(MINIMUM_PRUNING_DISTANCE)),
|
||||||
transaction_lookup: None,
|
transaction_lookup: None,
|
||||||
receipts: _chain_spec
|
receipts: chain_spec
|
||||||
.deposit_contract
|
.deposit_contract
|
||||||
.as_ref()
|
.as_ref()
|
||||||
.map(|contract| PruneMode::Before(contract.block)),
|
.map(|contract| PruneMode::Before(contract.block)),
|
||||||
account_history: Some(PruneMode::Distance(MINIMUM_PRUNING_DISTANCE)),
|
account_history: Some(PruneMode::Distance(MINIMUM_PRUNING_DISTANCE)),
|
||||||
storage_history: Some(PruneMode::Distance(MINIMUM_PRUNING_DISTANCE)),
|
storage_history: Some(PruneMode::Distance(MINIMUM_PRUNING_DISTANCE)),
|
||||||
receipts_log_filter: ReceiptsLogPruneConfig(
|
receipts_log_filter: ReceiptsLogPruneConfig(
|
||||||
_chain_spec
|
chain_spec
|
||||||
.deposit_contract
|
.deposit_contract
|
||||||
.as_ref()
|
.as_ref()
|
||||||
.map(|contract| (contract.address, PruneMode::Before(contract.block)))
|
.map(|contract| (contract.address, PruneMode::Before(contract.block)))
|
||||||
|
|||||||
@ -332,6 +332,10 @@ Dev testnet:
|
|||||||
|
|
||||||
Parses strings using [humantime::parse_duration]
|
Parses strings using [humantime::parse_duration]
|
||||||
--dev.block-time 12s
|
--dev.block-time 12s
|
||||||
|
|
||||||
|
Pruning:
|
||||||
|
--full
|
||||||
|
Run full node. Only the most recent 128 block states are stored. This flag takes priority over pruning configuration in reth.toml
|
||||||
|
|
||||||
Logging:
|
Logging:
|
||||||
--log.persistent
|
--log.persistent
|
||||||
|
|||||||
Reference in New Issue
Block a user