feat(toolkit): exclude historical balance DBs from lite snapshot#6690
Open
halibobo1205 wants to merge 5 commits intotronprotocol:developfrom
Open
feat(toolkit): exclude historical balance DBs from lite snapshot#6690halibobo1205 wants to merge 5 commits intotronprotocol:developfrom
halibobo1205 wants to merge 5 commits intotronprotocol:developfrom
Conversation
What Changed Exclude balance-trace and account-trace from lite snapshots. Since historical balance lookup is off by default, most nodes see no difference in snapshot size; only nodes with the feature enabled benefit from smaller snapshots. Impact ✅ Smaller lite snapshots when historical balance lookup is enabled ✅ No impact for default-configured nodes close tronprotocol#6597
9 tasks
Collaborator
|
[NIT] A few minor cleanup items:
|
xxo1shine
reviewed
Apr 21, 2026
Document why TRANS/TRANSACTION_HISTORY/ACCOUNT_TRACE DBs cannot be positioned by block number, and why full replay is safe.
- Drop unrelated .gitignore entry; scope this PR to toolkit changes. - Move `// delete account trace` comment onto the stream it describes. - Extract nested ternary in DbLiteTest into a named local. - Rename testToolsWithTrimHistory -> V1/V2 so reports distinguish them. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Assert snapshot excludes balance-trace/account-trace and history includes them; this locks in the new archiveDbs layout so a future regression fails CI instead of silently shipping historical DBs. - Flip DbLiteWithHistoryRocksDbV2Test to advanceSnapshot=true so the ACCOUNT_TRACE_DB_NAME branch in mergeBak2Database() is exercised for checkpoint v2 as well (previously only v1 covered it). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Changed
Exclude balance-trace and account-trace from lite snapshots. Since historical balance lookup is off by default, most nodes see no difference in snapshot size; only nodes with the feature enabled benefit from smaller snapshots.
Impact
✅ Smaller lite snapshots when historical balance lookup is enabled
✅ No impact for default-configured nodes
close #6597