paradigmxyz / reth

Modular, contributor-friendly and blazing-fast implementation of the Ethereum protocol, in Rust
https://reth.rs/
Apache License 2.0
3.79k stars 1.03k forks source link

Prune config is no effect and receipts data exists in db tables #10118

Open sysvm opened 1 month ago

sysvm commented 1 month ago

Describe the bug

I met a problem when running reth with prune config

  1. run reth in archive node without prune config, and set --debug.max-block=7000000, when ending import blocks, using db stats to analyse db, there are receipts data in static file: 22.3Gib and receipts in db is no data

  2. run reth in archive node with prune config, and set --debug.max-block=7000000, when ending import blocks, using db stats to analyse db, there are no receipts data in static file, there is receipts data in db: 25.3 GiB. Config as follows:

[prune]
block_interval = 5
[prune.parts]
receipts = {  distance = 3_000_000}
sender_recovery = { distance = 3_000_000 }
account_history = { distance = 3_000_000 }
storage_history = { distance = 3_000_000}
transaction_lookup = {distance = 3_000_000}

So why I use prune config in reth.toml and prune receipt, but the result is no effect and the receipts data is in db

Steps to reproduce

  1. Configure the reth.toml with prune config as follows:
    [prune]
    block_interval = 5
    [prune.parts]
    receipts = {  distance = 3_000_000}
    sender_recovery = { distance = 3_000_000 }
    account_history = { distance = 3_000_000 }
    storage_history = { distance = 3_000_000}
    transaction_lookup = {distance = 3_000_000}
  2. Start running the node with CLI: nohup ./reth node --datadir ./data --authrpc.jwtsecret /server/test/reth/jwt.hex --authrpc.addr 127.0.0.1 --authrpc.port 8551 --http --http.port 9010 --http.api all --debug.max-block 5000000 --log.file.directory ./logs --metrics 0.0.0.0:6060 >> nohup.out 2>&1&
  3. When ending importing blocks, use ./reth db --datadir ./data/ stats to analyze the db, the receipt data is shown in db table image
  4. But when I run reth without a prune config, use ./reth db --datadir ./data/ stats to analyze the db, the receipts data is shown in static file: image

Node logs

INFO Pruner initialized prune_config=PruneConfig { block_interval: 5, segments: PruneModes { sender_recovery: Some(Distance(3000000)), transaction_lookup: Some(Distance(3000000)), receipts: Some(Distance(3000000)), account_history: Some(Distance(3000000)), storage_history: Some(Distance(3000000)), receipts_log_filter: ReceiptsLogPruneConfig({}) } }

Platform(s)

Linux (x86)

What version/commit are you on?

Reth 1.0.3

What database version are you on?

Current database version: 2 Local database version: 2

Which chain / network are you on?

default , mainnet of eth

What type of node are you running?

Archive (default)

What prune config do you use, if any?

[prune]
block_interval = 5
[prune.parts]
receipts = {  distance = 3_000_000}
sender_recovery = { distance = 3_000_000 }
account_history = { distance = 3_000_000 }
storage_history = { distance = 3_000_000}
transaction_lookup = {distance = 3_000_000}

If you've built Reth from source, provide the full command you used

No response

Code of Conduct

ShantelPeters commented 1 month ago

Hello @sysvm please can I be assigned to this issue?

sysvm commented 1 month ago

Hello @sysvm please can I be assigned to this issue?

I have no permission to assign it.

github-actions[bot] commented 2 weeks ago

This issue is stale because it has been open for 21 days with no activity.