From bfa130d1875f1e1510e181e09fced33578d70563 Mon Sep 17 00:00:00 2001 From: Alexey Shekhirin Date: Wed, 23 Aug 2023 23:08:27 +0100 Subject: [PATCH] feat(bin): unhide and enable full flag (#4327) --- bin/reth/src/args/pruning_args.rs | 11 ++++------- book/cli/node.md | 4 ++++ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/bin/reth/src/args/pruning_args.rs b/bin/reth/src/args/pruning_args.rs index 4b288a4e45e1..ccb6dda741fa 100644 --- a/bin/reth/src/args/pruning_args.rs +++ b/bin/reth/src/args/pruning_args.rs @@ -13,30 +13,27 @@ use std::sync::Arc; pub struct PruningArgs { /// Run full node. Only the most recent 128 block states are stored. This flag takes /// priority over pruning configuration in reth.toml. - // TODO(alexey): unhide when pruning is ready for production use - #[arg(long, hide = true, default_value_t = false)] + #[arg(long, default_value_t = false)] pub full: bool, } impl PruningArgs { /// Returns pruning configuration. - pub fn prune_config(&self, _chain_spec: Arc) -> eyre::Result> { + pub fn prune_config(&self, chain_spec: Arc) -> eyre::Result> { Ok(if self.full { - eyre::bail!("full node is not supported yet, keep an eye on next releases"); - #[allow(unreachable_code)] Some(PruneConfig { block_interval: 5, parts: PruneModes { sender_recovery: Some(PruneMode::Distance(MINIMUM_PRUNING_DISTANCE)), transaction_lookup: None, - receipts: _chain_spec + receipts: chain_spec .deposit_contract .as_ref() .map(|contract| PruneMode::Before(contract.block)), account_history: Some(PruneMode::Distance(MINIMUM_PRUNING_DISTANCE)), storage_history: Some(PruneMode::Distance(MINIMUM_PRUNING_DISTANCE)), receipts_log_filter: ReceiptsLogPruneConfig( - _chain_spec + chain_spec .deposit_contract .as_ref() .map(|contract| (contract.address, PruneMode::Before(contract.block))) diff --git a/book/cli/node.md b/book/cli/node.md index d0826f9b214e..2aa71d1ccefa 100644 --- a/book/cli/node.md +++ b/book/cli/node.md @@ -332,6 +332,10 @@ Dev testnet: Parses strings using [humantime::parse_duration] --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: --log.persistent