Commit 21d8e48
committed
feat(l1): harden state-history invariants
Per review:
- Document the version-bump strategy on JOURNAL_VERSION so PRs 2/3/4 have a
policy to follow: drain at finality on bump, or grow per-version decode
arms if history needs to survive the upgrade.
- Add debug_assert!(layers_to_commit.len() == 1) in TrieLayerCache::commit
to runtime-enforce the single-layer invariant the ATTRIBUTION NOTE
describes; catches any future change that quietly merges multiple
blocks into one journal entry.1 parent ec89fa8 commit 21d8e48
2 files changed
Lines changed: 16 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
28 | 38 | | |
29 | 39 | | |
30 | 40 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
277 | 277 | | |
278 | 278 | | |
279 | 279 | | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
280 | 286 | | |
281 | 287 | | |
282 | 288 | | |
| |||
0 commit comments