From 01d4933125270a33fa5ac0f7d8315d8ab539419b Mon Sep 17 00:00:00 2001 From: Alexey Shekhirin Date: Tue, 5 Sep 2023 18:39:49 +0100 Subject: [PATCH] feat(primitives): remove constraints on `SenderRecovery` pruning (#4488) --- bin/reth/src/args/pruning_args.rs | 2 +- crates/primitives/src/prune/target.rs | 9 ++------- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/bin/reth/src/args/pruning_args.rs b/bin/reth/src/args/pruning_args.rs index ccb6dda741..550634f0e9 100644 --- a/bin/reth/src/args/pruning_args.rs +++ b/bin/reth/src/args/pruning_args.rs @@ -24,7 +24,7 @@ impl PruningArgs { Some(PruneConfig { block_interval: 5, parts: PruneModes { - sender_recovery: Some(PruneMode::Distance(MINIMUM_PRUNING_DISTANCE)), + sender_recovery: Some(PruneMode::Full), transaction_lookup: None, receipts: chain_spec .deposit_contract diff --git a/crates/primitives/src/prune/target.rs b/crates/primitives/src/prune/target.rs index 8789b0cf8f..e715c94ed7 100644 --- a/crates/primitives/src/prune/target.rs +++ b/crates/primitives/src/prune/target.rs @@ -13,12 +13,7 @@ pub const MINIMUM_PRUNING_DISTANCE: u64 = 128; #[serde(default)] pub struct PruneModes { /// Sender Recovery pruning configuration. - // TODO(alexey): removing min blocks restriction is possible if we start calculating the senders - // dynamically on blockchain tree unwind. - #[serde( - skip_serializing_if = "Option::is_none", - deserialize_with = "deserialize_opt_prune_mode_with_min_blocks::<64, _>" - )] + #[serde(skip_serializing_if = "Option::is_none")] pub sender_recovery: Option, /// Transaction Lookup pruning configuration. #[serde(skip_serializing_if = "Option::is_none")] @@ -104,7 +99,7 @@ impl PruneModes { } impl_prune_parts!( - (sender_recovery, SenderRecovery, Some(64)), + (sender_recovery, SenderRecovery, None), (transaction_lookup, TransactionLookup, None), (receipts, Receipts, Some(64)), (account_history, AccountHistory, Some(64)),