Commit ceb3307
refactor: align pruning mode naming with Erigon conventions
This commit updates the pruning mode naming to match Erigon Ethereum
client conventions, making the API more familiar to users who have
experience with Erigon.
## Changes
### Core PruningMode Enum (crates/sync/stage/src/lib.rs)
Renamed modes to match Erigon:
- `Full` → `Archive` (keep all historical state)
- `HistoricalBlocks(N)` → `Full(N)` (keep last N blocks)
- `LatestOnly` → `Minimal` (keep only latest state)
Updated documentation to explicitly reference Erigon equivalents
and explain the mapping between the two systems.
### CLI Options (crates/cli/src/options.rs)
Updated argument names and documentation:
- `--pruning.mode` → `--prune.mode` (matches Erigon exactly)
- Mode values: `archive`, `full:N`, `minimal`
- Updated parser to handle new format
### Pipeline (crates/sync/pipeline/src/lib.rs)
- Updated default mode from `Full` to `Archive`
- Updated `is_enabled()` to check for `Archive` mode
### Tests
Updated all test functions to use new naming conventions
while maintaining the same test logic.
## Erigon Mapping
The naming now directly corresponds to Erigon's modes:
- `--prune.mode=archive` - Keep complete historical state
- `--prune.mode=full:1000` - Keep last 1000 blocks
- `--prune.mode=minimal` - Keep only latest state
## Usage Examples
Archive mode (no pruning):
```
katana node full --prune.mode archive
```
Full mode with 1000 block history, prune every 100 blocks:
```
katana node full --prune.mode full:1000 --prune.interval 100
```
Minimal mode for validators, prune every 50 blocks:
```
katana node full --prune.mode minimal --prune.interval 50
```
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent 8f90c25 commit ceb3307
File tree
4 files changed
+46
-38
lines changed- crates
- cli/src
- sync
- pipeline/src
- stage/src
4 files changed
+46
-38
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
117 | | - | |
118 | | - | |
119 | | - | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
723 | 723 | | |
724 | 724 | | |
725 | 725 | | |
726 | | - | |
| 726 | + | |
727 | 727 | | |
728 | 728 | | |
729 | | - | |
730 | | - | |
731 | | - | |
732 | | - | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
733 | 733 | | |
734 | 734 | | |
735 | 735 | | |
| |||
738 | 738 | | |
739 | 739 | | |
740 | 740 | | |
741 | | - | |
| 741 | + | |
742 | 742 | | |
743 | 743 | | |
744 | 744 | | |
| |||
752 | 752 | | |
753 | 753 | | |
754 | 754 | | |
755 | | - | |
756 | | - | |
757 | | - | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
758 | 758 | | |
759 | 759 | | |
760 | 760 | | |
761 | 761 | | |
762 | | - | |
763 | | - | |
764 | | - | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
765 | 765 | | |
766 | | - | |
| 766 | + | |
767 | 767 | | |
768 | 768 | | |
769 | | - | |
| 769 | + | |
770 | 770 | | |
771 | | - | |
| 771 | + | |
772 | 772 | | |
773 | 773 | | |
774 | | - | |
| 774 | + | |
775 | 775 | | |
776 | 776 | | |
777 | 777 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
217 | 217 | | |
218 | 218 | | |
219 | 219 | | |
220 | | - | |
| 220 | + | |
221 | 221 | | |
222 | 222 | | |
223 | 223 | | |
| |||
229 | 229 | | |
230 | 230 | | |
231 | 231 | | |
232 | | - | |
| 232 | + | |
233 | 233 | | |
234 | 234 | | |
235 | 235 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
69 | 74 | | |
70 | 75 | | |
71 | 76 | | |
72 | | - | |
| 77 | + | |
| 78 | + | |
73 | 79 | | |
74 | | - | |
| 80 | + | |
| 81 | + | |
75 | 82 | | |
76 | | - | |
| 83 | + | |
| 84 | + | |
77 | 85 | | |
78 | 86 | | |
79 | 87 | | |
80 | 88 | | |
81 | | - | |
| 89 | + | |
82 | 90 | | |
83 | 91 | | |
84 | 92 | | |
| |||
111 | 119 | | |
112 | 120 | | |
113 | 121 | | |
114 | | - | |
| 122 | + | |
115 | 123 | | |
116 | 124 | | |
117 | 125 | | |
118 | | - | |
119 | | - | |
120 | | - | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
121 | 129 | | |
122 | 130 | | |
123 | 131 | | |
| |||
239 | 247 | | |
240 | 248 | | |
241 | 249 | | |
242 | | - | |
243 | | - | |
| 250 | + | |
| 251 | + | |
244 | 252 | | |
245 | 253 | | |
246 | 254 | | |
247 | 255 | | |
248 | | - | |
249 | | - | |
| 256 | + | |
| 257 | + | |
250 | 258 | | |
251 | 259 | | |
252 | 260 | | |
253 | | - | |
| 261 | + | |
254 | 262 | | |
255 | 263 | | |
256 | 264 | | |
257 | 265 | | |
258 | | - | |
| 266 | + | |
259 | 267 | | |
260 | | - | |
| 268 | + | |
261 | 269 | | |
262 | 270 | | |
263 | 271 | | |
264 | | - | |
| 272 | + | |
265 | 273 | | |
266 | 274 | | |
267 | 275 | | |
268 | | - | |
| 276 | + | |
269 | 277 | | |
270 | 278 | | |
271 | 279 | | |
0 commit comments