You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is no need to keep all the trie logs for a near-head node as the state for old blocks is rarely needed. This will place a configurable limit on how many trie logs are kept reducing storage needed for a node.
Add configurable limit for number trie logs to be kept. This should be the same as the Bonsai read limit config
--bonsai-historical-block-limit parameter
Prune old trie logs that are not needed
Trie logs are stored by block hash so there will need to be a way of determining with block hashes to remove the trie logs for
The logic used for the block pruning which keeps a list of block hashes for each block number could possibly be reused for pruning the trie log
This should be enabled independently of the chain data pruning feature and can be used together
Measure storage saved by having the trie log pruning enabled
Test that reorgs have their trie log pruned
Acceptance Criteria
DB size of long running node should be the same before and after resync
Notes:
The ChainDataPruner could be a helpful place to start and reuse some of the same logic
How to enable this feature: https://wiki.hyperledger.org/display/BESU/Limit+Trie+Logs+for+Bonsai
There is no need to keep all the trie logs for a near-head node as the state for old blocks is rarely needed. This will place a configurable limit on how many trie logs are kept reducing storage needed for a node.
--bonsai-historical-block-limit parameter
Acceptance Criteria
Notes:
ChainDataPruner
could be a helpful place to start and reuse some of the same logicTasks:
--Xbonsai-trie-log-pruning-enabled
: Add trie log pruning triggered after trie log persist #6026*simon-6026*
and*simon-flatdb*
nodesAdd experimental x-trie-log subcommand for one-off backlog prune #6188 (needs testing on an old node to see how long it might take to run)Add --X-trie-log subcommand #6303--bonsai-historical-block-limit
instead of--Xbonsai-trie-log-retention-threshold
--Xbonsai-trie-log-pruning-enabled
to--Xbonsai-limit-trie-logs-enabled
- YESNice to have:
The text was updated successfully, but these errors were encountered: