Skip to content

Reject invalid frame fees and verify watchdog checkpoints - #56

Merged
stephenctw merged 3 commits into
mainfrom
fix/sequencer-qa-findings
Oct 29, 2026
Merged

stephenctw merged 3 commits into
mainfrom
fix/sequencer-qa-findings

Conversation

@stephenctw

@stephenctw stephenctw commented Oct 20, 2026 •

Copy link
Copy Markdown
Member

Reject out-of-range frame fees before the scheduler applies any frame, preventing malformed batches from halting the canonical guest. Preserve the batch nonce and overdue-direct backstop. Unit, duality and real-machine regressions cover the boundary.

Verify external watchdog init/replay checkpoints against their stored hash trees. Keep the release manifest's kernel metadata aligned with the existing toolchain pins, and exercise manifest generation in CI. The kernel download verification and RPC URL redaction already present on main remain unchanged.

Document operator shutdown before guardian foreclosure and prohibit restarting a foreclosed application. This change adds no expiry protocol, emergency-exit machinery or foreclosure RPC gates; existing signing, wire, storage and fee formats and warm-restart behavior are preserved.

Validation:

  • 823 Rust workspace tests passed (--workspace --exclude canonical-test).
  • All 16 canonical guest tests passed on a rebuilt emulator 0.22.0 image, including the fee-bound regression and v1 golden vectors.
  • All 64 watchdog unit tests and the real-machine stale-sidecar regression passed.
  • The restored warm-restart-with-L1-down end-to-end scenario passed.
  • Workspace/all-targets cargo check and Clippy with warnings denied, Rust formatting, Lua lint, release-manifest generation and toolchain-pin checks passed.

The complete rollups/watchdog end-to-end suites were not rerun locally.

@stephenctw
stephenctw force-pushed the fix/sequencer-qa-findings branch from e32ae96 to f2b7506 Compare October 26, 2026 13:47
Reject an entire batch before frame execution if any frame fee exceeds MAX_EXPONENT, preventing the wallet's conversion assertion from halting the guest. Keep the scheduler nonce and overdue-direct backstop intact. Pin the behavior in unit, duality and real-machine tests, and update the governing contracts.
Verify external init/replay snapshots against their stored hash trees and cover stale sidecars with a clean control and a real-machine corruption regression. Document the diagnostic's scope and independently trusted provenance requirement.

Use the existing CARTESI_LINUX_RELEASE pin in the release manifest and exercise manifest generation in CI. The kernel download pin and verification already exist on main.
Record the guardian operators' procedure to stop and disable the sequencer before foreclosure, including Kubernetes scaling and the instruction never to restart a foreclosed application.
@stephenctw
stephenctw force-pushed the fix/sequencer-qa-findings branch from 8f68182 to ee5c72c Compare October 28, 2026 06:42
@stephenctw stephenctw changed the title Fix sequencer QA findings: foreclosure, exits, replay and integrity Reject invalid frame fees and verify watchdog checkpoints Oct 28, 2026

@GCdePaula GCdePaula left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Approving. Thanks for the quick, clean rewrite: every item from the review is done, nothing from the removed parts remains, and CI is green.

Optional nits, fine to skip or to fold into a later PR:

  • sequencer/src/storage/safe_accepted_batches.rs:755 still says scheduler_accepts omits "the two structural" rejections; there are now three.
  • watchdog/machine.lua:147: the pcall drops the emulator's error text, so a host-level failure reads as "fails hash-tree verification". Consider appending tostring(valid) to the message when not ok, as load already does.
  • The 5d3a15e title says it verifies the kernel manifest metadata; the commit only records the pins in the manifest.
  • The 52e9b57 message could say it changes a canonical acceptance rule and moves the template hash, for whoever writes the release notes.

Outside the code: Bart should hear that the out-of-range fee rule is now settled, since the C++ port must reject the same batches. The release notes will also need the new devnet and Sepolia template hashes.

@stephenctw
stephenctw merged commit 4e7b34b into main Oct 29, 2026
5 checks passed
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.

2 participants