Skip to content

Commit

Permalink
feat(bin): unhide and enable full flag (paradigmxyz#4327)
Browse files Browse the repository at this point in the history
  • Loading branch information
shekhirin authored Aug 23, 2023
1 parent fca6404 commit bfa130d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
11 changes: 4 additions & 7 deletions bin/reth/src/args/pruning_args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<ChainSpec>) -> eyre::Result<Option<PruneConfig>> {
pub fn prune_config(&self, chain_spec: Arc<ChainSpec>) -> eyre::Result<Option<PruneConfig>> {
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)))
Expand Down
4 changes: 4 additions & 0 deletions book/cli/node.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit bfa130d

Please sign in to comment.