Commit 3210473
consensus: fix emission-boundary total_supply halt + 6th-node onboarding; single snapshot artifact
total_supply / emission halt:
- producer applies its own block inline but never minted emission -> per-node supply skew -> checkpoint divergence -> halt. Add inline mint via shared emission_mb_index (watermark-idempotent).
- checkpoint read total_supply from the live counter (races the in-block mint). Seal it at each checkpoint head (ts_seal, mirrors registry_root); readers use get_total_supply_at, not the live value.
- restart/reconcile restored neither the emission watermark nor a correct replay floor -> replayed emissions double-minted -> halt. Restore both from the snapshot's microblock height.
6th-node onboarding:
- NodeRegistration never landed on-chain (one-shot arm + loop break, finite rebroadcast budget, Ok-on-mempool-reject). Single-owner driver: arm only when synced, retry on arm failure, backoff-rebroadcast until on-chain.
snapshots (single source):
- two artifacts keyed by two denominators (state_snap_=macroblock ordinal, full_snap_=microblock height) -> ordinal/height confusion. Unify to microblock height.
- state_snap_ was a live-captured (drifting), incomplete, redundant artifact -> restart drifted. Retire it: local restart + reconcile restore from the apply-bound full_snap_ with total_supply taken from the QC-bound checkpoint (same source as cold-join). P2P serves full_snap_ only.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent 9695844 commit 3210473
4 files changed
Lines changed: 287 additions & 389 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2650 | 2650 | | |
2651 | 2651 | | |
2652 | 2652 | | |
| 2653 | + | |
| 2654 | + | |
| 2655 | + | |
2653 | 2656 | | |
2654 | 2657 | | |
2655 | 2658 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
516 | 516 | | |
517 | 517 | | |
518 | 518 | | |
519 | | - | |
| 519 | + | |
520 | 520 | | |
521 | 521 | | |
522 | 522 | | |
523 | 523 | | |
524 | 524 | | |
525 | 525 | | |
| 526 | + | |
| 527 | + | |
526 | 528 | | |
527 | 529 | | |
528 | 530 | | |
| |||
0 commit comments