reth
reth copied to clipboard
Prune config is no effect and receipts data exists in db tables
Describe the bug
I met a problem when running reth with prune config
-
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 -
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
- 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}
- 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&
- When ending importing blocks, use
./reth db --datadir ./data/ stats
to analyze the db, the receipt data is shown in db table - But when I run reth without ant prune config, use
./reth db --datadir ./data/ stats
to analyze the db, the receipts data is shown in static file:
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
- [X] I agree to follow the Code of Conduct