Skip to content

repair: harden against dead block edge cases - #12509

Open
emwang-jump wants to merge 1 commit into
mainfrom
emwang/rotor-dead-harden
Open

emwang-jump wants to merge 1 commit into
mainfrom
emwang/rotor-dead-harden

Conversation

@emwang-jump

@emwang-jump emwang-jump commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

supposedly in some extremely degenerate cases + fd is at 60% of stake then ....

Copilot AI balanced review requested due to automatic review settings October 23, 2026 19:06
@github-actions

github-actions Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
 ┌─ ⚡ PERF · c9f1484 vs main@cd5830d ─────────────────────────────────
 │ SUITE                               BASELINE          NEW         Δ
 │ replay tps, mainnet               13,732 tps   13,654 tps  ·  -0.57%
 │ bench tps, localnet              670,939 tps  672,017 tps  ·  +0.16%
 │ snapshot load, testnet                4.97 s       4.94 s  ·  -0.71%
 │ mem total, mainnet                150.35 GiB   150.35 GiB  ·   0.00%
 │ mem total, testnet                 86.66 GiB    86.66 GiB  ·   0.00%
 │ clean compile, firedancer             3.16 s       3.20 s  ·  +1.25%
 │ binary size, firedancer             57.97 MB     57.97 MB  ·   0.00%
 ├─────────────────────────────────────────────────────────────────────
@@ 0 REGRESSIONS · 0 WARNINGS · 0 IMPROVED · 7 NOISE @@
 └─────────────────────────────────────────────────────────────────────
history · 6 pushes
 ┌─ HISTORY · Δ vs main, per push, newest first ──────────────────────────────────
 │ HEAD         TPS    BENCH     SNAP    MEM·M    MEM·T  COMPILE   BINARY
 │ c9f1484   -0.57%   +0.16%   -0.71%    0.00%    0.00%   +1.25%    0.00%
 │ dc1f320   +0.39%   -0.11%   -0.54%    0.00%    0.00%   -0.06%    0.00%
 │ e220fb5   +0.52%   -0.21%   +0.08%    0.00%    0.00%   -0.07%    0.00%
 │ 9ee554f   +0.56%   -0.16%   -0.19%    0.00%    0.00%   +1.02%    0.00%
+│ ea11c13   -0.76%   -0.16%   +0.25%    0.00%    0.00%   -1.61%    0.00%
 │ df1c983   -0.55%   +0.35%   +0.13%    0.00%    0.00%   -0.11%    0.00%
 └────────────────────────────────────────────────────────────────────────────────

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The localized guard enforces the parent-completion invariant while preserving existing recovery behavior, with no blocking issues identified.

No open issues 🎉

What changed in this PR

This PR hardens replay handling for dead-block edge cases by tightening parent validation before processing a slot’s first FEC set.

Changes:

  • Treat a parent with block_id_seen unset as unavailable, using the existing missing-parent recovery path.
File Description
src/​discof/​replay/​fd_replay_tile.c Adds a block_id_seen check to the parent lookup guard.

Review effort: Balanced

ripatel-fd
ripatel-fd previously approved these changes Oct 26, 2026
@emwang-jump
emwang-jump force-pushed the emwang/rotor-dead-harden branch from df1c983 to ea11c13 Compare October 27, 2026 01:18
Copilot AI balanced review requested due to automatic review settings October 27, 2026 01:18

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Cross-tile recovery-ordering changes need targeted runtime validation and human review before approval.

1 open issue

Review effort: Balanced

Comment thread src/discof/replay/fd_replay_tile.c Outdated
Copilot AI balanced review requested due to automatic review settings October 27, 2026 21:02

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Dead-block retention changes cross-tile recovery ordering and block lifetimes, requiring runtime validation of eviction/reconsume, root advancement, and liveness under the reported 60%-stake scenario beyond the added unit assertions.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

@emwang-jump
emwang-jump force-pushed the emwang/rotor-dead-harden branch from 9ee554f to e220fb5 Compare October 27, 2026 21:09
Copilot AI balanced review requested due to automatic review settings October 27, 2026 21:09

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The consensus-critical retention changes affect replay/repair ordering and bank lifetimes, but existing tests cover only repair-side behavior and integration validation of actual replay eviction and draining could not be run.

No open issues 🎉

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings October 27, 2026 21:12
@emwang-jump emwang-jump changed the title replay: harden against dead block edge cases repair: harden against dead block edge cases Oct 27, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The consensus-sensitive repair/replay lifecycle changes need cross-tile runtime validation of asynchronous event ordering, replay-bank pruning, and hard-fork detection beyond the repair-state and queue-ordering unit tests.

No open issues 🎉

Review effort: Balanced

@emwang-jump
emwang-jump force-pushed the emwang/rotor-dead-harden branch from dc1f320 to c9f1484 Compare October 27, 2026 21:25
Copilot AI balanced review requested due to automatic review settings October 27, 2026 21:25

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Dead-block retention changes recovery ordering and finalized-block handling, but tests cover only rotor state, leaving cross-tile redelivery ordering and hard-fork detection unvalidated.

No open issues 🎉

Review effort: Balanced

@emwang-jump
emwang-jump enabled auto-merge (rebase) October 27, 2026 22:08

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants