Skip to content

Skip pruning if trie log count is less than retention limit#6463

Merged
siladu merged 3 commits intobesu-eth:mainfrom
siladu:trie-log-subcommand-tweak
Jan 25, 2024
Merged

Skip pruning if trie log count is less than retention limit#6463
siladu merged 3 commits intobesu-eth:mainfrom
siladu:trie-log-subcommand-tweak

Conversation

@siladu
Copy link
Contributor

@siladu siladu commented Jan 25, 2024

Rework error messaging in this case.

This can occur if pruning is attempted before the node has reached the configured retention limit (512 by default)

PR description

Fixed Issue(s)

Rework error messaging in this case.
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
@github-actions
Copy link

github-actions bot commented Jan 25, 2024

  • I thought about documentation and added the doc-change-required label to this PR if updates are required.
  • I thought about the changelog and included a changelog update if required.
  • If my PR includes database changes (e.g. KeyValueSegmentIdentifier) I have thought about compatibility and performed forwards and backwards compatibility tests

Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
@siladu siladu marked this pull request as ready for review January 25, 2024 04:13
@siladu
Copy link
Contributor Author

siladu commented Jan 25, 2024

Tested on holesky...

simon.dudley@dev-elc-besu-teku-holesky-simon-trie-log-subcommand-6463:~$ sudo /opt/besu/current/bin/besu --data-storage-format=BONSAI --data-path=/data/besu --network=holesky storage x-trie-log prune
2024-01-25 07:00:11.400+00:00 | main | INFO  | KeyPairUtil | Attempting to load public key from /data/besu/key
2024-01-25 07:00:11.447+00:00 | main | INFO  | KeyPairUtil | Loaded public key 0x02bcae59ab23c1736418802c4f62f6353d83558723d306e40886da5b95bf3aabddede4951663e8183d74de140529ad1e2a17961b387c4fb0a33c8a183f110378 from /data/besu/key
2024-01-25 07:00:11.635+00:00 | main | INFO  | ProtocolScheduleBuilder | Protocol schedule created with milestones: [London:0, Shanghai:1696000704, Cancun:1707305664]
2024-01-25 07:00:11.657+00:00 | main | INFO  | ProtocolScheduleBuilder | Protocol schedule created with milestones: [Paris:0, Shanghai:1696000704, Cancun:1707305664]
2024-01-25 07:00:11.681+00:00 | main | INFO  | FlatDbStrategyProvider | Bonsai flat db mode found PARTIAL
2024-01-25 07:00:11.778+00:00 | main | INFO  | DatabaseMetadata | Lookup database metadata file in data directory: /data/besu
2024-01-25 07:00:11.818+00:00 | main | INFO  | RocksDBKeyValueStorageFactory | Existing database detected at /data/besu. Version 2. Compacting database...
2024-01-25 07:00:12.011+00:00 | main | INFO  | FlatDbStrategyProvider | Bonsai flat db mode found FULL
2024-01-25 07:00:12.088+00:00 | main | INFO  | TransactionPoolFactory | Enabling transaction pool
2024-01-25 07:00:12.099+00:00 | main | INFO  | EthPeers | Updating the default best peer comparator
2024-01-25 07:00:12.109+00:00 | main | INFO  | BesuControllerBuilder | TTD difficulty is present, creating initial sync for PoS
2024-01-25 07:00:12.118+00:00 | main | INFO  | TransitionBesuControllerBuilder | TTD present, creating DefaultSynchronizer that stops propagating after finalization
2024-01-25 07:00:12.128+00:00 | main | INFO  | FlatDbStrategyProvider | Bonsai flat db mode found FULL
java.lang.IllegalArgumentException: Trie log count (178) is less than retention limit (512), skipping pruning

@siladu siladu merged commit 6ac419b into besu-eth:main Jan 25, 2024
@siladu siladu added the TeamGroot GH issues worked on by Groot Team label Jan 25, 2024
@siladu siladu deleted the trie-log-subcommand-tweak branch January 25, 2024 07:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

TeamGroot GH issues worked on by Groot Team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants