Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix full mode sender_recovery distance #5931

Closed
wants to merge 1 commit into from

Conversation

pawurb
Copy link
Contributor

@pawurb pawurb commented Jan 3, 2024

According to these docs --full mode flag should be equivalent to the following reth.toml prune config:

[prune]
block_interval = 5

[prune.parts]
sender_recovery = { distance = 10_064 }
# transaction_lookup is not pruned
receipts = { before = 11052984 } # Beacon Deposit Contract deployment block: https://etherscan.io/tx/0xe75fb554e433e03763a1560646ee22dcb74e5274b34c5ad644e7c0f619a7e1d0
account_history = { distance = 10_064 }
storage_history = { distance = 10_064 }

[prune.parts.receipts_log_filter]
# Prune all receipts, leaving only those which contain logs from address `0x00000000219ab540356cbb839cbe05303d7705fa`,
# starting from the block 11052984. This leaves receipts with the logs from the Beacon Deposit Contract.
"0x00000000219ab540356cbb839cbe05303d7705fa" = { before = 11052984 }

But when running the node with --full flag I'm getting the following output:

Pruner initialized prune_config=PruneConfig { block_interval: 5, segments: PruneModes { sender_recovery: Some(Full), transaction_lookup: None, receipts: Some(Before(11052984)), account_history: Some(Distance(10064)), storage_history: Some(Distance(10064)), receipts_log_filter: ReceiptsLogPruneConfig({0x00000000219ab540356cbb839cbe05303d7705fa: Before(11052984)}) } } — full

When I run the archive node with the mentioned reth.toml prune config I'm seeing:

Pruner initialized prune_config=PruneConfig { block_interval: 5, segments: PruneModes { sender_recovery: Some(Distance(10064)), transaction_lookup: None, receipts: Some(Before(11052984)), account_history: Some(Distance(10064)), storage_history: Some(Distance(10064)), receipts_log_filter: ReceiptsLogPruneConfig({0x00000000219ab540356cbb839cbe05303d7705fa: Before(11052984)}) } }

The difference is in sender_recovery: Some(Full) vs. sender_recovery: Some(Distance(10064)). This PR changes sender_recovery for --full node to reflect info from the docs. If this is not the intended behavior I would update the docs to avoid confusion.

@pawurb pawurb requested a review from onbjerg as a code owner January 3, 2024 15:07
@pawurb pawurb changed the title Fix fix full mode sender_recovery distance Fix full mode sender_recovery distance Jan 3, 2024
@pawurb
Copy link
Contributor Author

pawurb commented Jan 3, 2024

Sorry, it looks like it was changed on purpose here #4488 . So I'll close the PR and instead update docs to reflect this change.

@pawurb pawurb closed this Jan 3, 2024
@pawurb pawurb deleted the full_mode_sender_recovery branch January 3, 2024 19:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant