Commit eaba17c
committed
feat(toolkit): exclude historical balance DBs from lite snapshot
**Exclude historical balance data from lite snapshots**
### What Changed
- Lite history cleanup now removes balance trace data and the related account trace entries for trimmed blocks.
- When rebuilding a lite database, account trace data is copied from the start, so historical balance lookups still work after the split.
- Snapshot tests now enable historical balance lookup to cover this behavior.
- Added `.claude` to `.gitignore`.
### Impact
`✅ Smaller lite snapshots`
`✅ Complete balance history after trimming`
`✅ Fewer missing trace records in rebuilt databases`1 parent 29f475e commit eaba17c
6 files changed
Lines changed: 87 additions & 16 deletions
File tree
- plugins/src
- main/java/common/org/tron/plugins
- test/java/org/tron/plugins
- rocksdb
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
Lines changed: 32 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
| 34 | + | |
33 | 35 | | |
34 | 36 | | |
35 | 37 | | |
| |||
57 | 59 | | |
58 | 60 | | |
59 | 61 | | |
| 62 | + | |
| 63 | + | |
60 | 64 | | |
61 | 65 | | |
62 | 66 | | |
63 | 67 | | |
64 | 68 | | |
65 | 69 | | |
66 | | - | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
67 | 73 | | |
68 | 74 | | |
69 | 75 | | |
| |||
522 | 528 | | |
523 | 529 | | |
524 | 530 | | |
525 | | - | |
| 531 | + | |
| 532 | + | |
526 | 533 | | |
527 | 534 | | |
528 | 535 | | |
529 | | - | |
| 536 | + | |
| 537 | + | |
530 | 538 | | |
531 | | - | |
| 539 | + | |
532 | 540 | | |
533 | 541 | | |
534 | 542 | | |
535 | 543 | | |
536 | 544 | | |
537 | 545 | | |
538 | | - | |
| 546 | + | |
539 | 547 | | |
540 | 548 | | |
541 | 549 | | |
542 | | - | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
543 | 567 | | |
544 | 568 | | |
545 | 569 | | |
| |||
570 | 594 | | |
571 | 595 | | |
572 | 596 | | |
573 | | - | |
| 597 | + | |
| 598 | + | |
574 | 599 | | |
575 | 600 | | |
576 | 601 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
92 | | - | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
93 | 106 | | |
94 | 107 | | |
95 | 108 | | |
| |||
104 | 117 | | |
105 | 118 | | |
106 | 119 | | |
| 120 | + | |
107 | 121 | | |
108 | 122 | | |
109 | 123 | | |
| |||
117 | 131 | | |
118 | 132 | | |
119 | 133 | | |
120 | | - | |
121 | | - | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
122 | 137 | | |
123 | 138 | | |
124 | 139 | | |
| |||
137 | 152 | | |
138 | 153 | | |
139 | 154 | | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
145 | 162 | | |
146 | 163 | | |
147 | 164 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
Lines changed: 13 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
Lines changed: 13 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
0 commit comments