Commit ee895d3
committed
fix(fast-inbox): synthesize the genesis Inbox bucket on read (A-1383)
The archiver only writes bucket snapshots for ingested messages, whose first bucket is
sequence 1, so `getInboxBucket(0)` / `getInboxBucketByTotalMsgCount(0)` returned undefined.
That broke streaming resolution of a genesis parent (first block would reject
`parent_bucket_unresolved`), of an empty genesis block's own bucket reference, and let an
empty checkpoint skip the last-block censorship enforcement. Synthesize the sequence-0
sentinel (rolling hash 0, total 0) on read, mirroring the on-chain Inbox's base case, with
a store-level test exercising it through a populated MessageStore.1 parent aa1822c commit ee895d3
2 files changed
Lines changed: 29 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
403 | 403 | | |
404 | 404 | | |
405 | 405 | | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
406 | 414 | | |
407 | 415 | | |
408 | 416 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
57 | 71 | | |
58 | 72 | | |
59 | 73 | | |
| |||
403 | 417 | | |
404 | 418 | | |
405 | 419 | | |
406 | | - | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
407 | 423 | | |
408 | 424 | | |
409 | 425 | | |
410 | | - | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
411 | 430 | | |
412 | 431 | | |
413 | 432 | | |
| |||
0 commit comments