Batch debugger
The batch debugger steps through one settled qledger-v1 batch one inbox entry at a time, showing the exact accounts each entry changed and, for an entry the rules ignored, why. It answers the question a Replay table cannot: what happened inside this batch.
Try it
Open /console?view=debugger&rollup=wicketgate-pay&batch=13. Batch #13 of wicketgate-pay settles inbox range (43, 47]: four entries, two applied and two no-ops. Stepped live on 2026-11-30 in 1.75 s:
| Seq | Kind | Effect | What the debugger says |
|---|---|---|---|
| 44 | deposit | applied | account 0x9554c942c0…: 9,700,000 to 13,700,000 uqor |
| 45 | transfer | no-op | Nonce mismatch: "Tx nonce is 0; the sender's account nonce is 35." |
| 46 | withdrawal | no-op | Nonce mismatch: "Tx nonce is 1; the sender's account nonce is 35." |
| 47 | withdrawal | applied | 2 QOR out as withdrawal index 27; sender nonce 35 to 36 |
The parent root it rebuilt equals batch #12's settled root, and the stepwise root, the whole-batch root and the chain's root agree (0xe20d72aa…0b3e9834).
Controls
| Control | What it does |
|---|---|
| Rollup picker | qledger-v1 rollups with at least one batch, A to Z, with batch counts (setoff-1 is preselected). Changing it loads that rollup's settled batches. |
| Batch picker | Settled batches, newest first, with their entry counts. Defaults to the latest batch. |
| ← → or j k | Step one entry back or forward. |
| space | Play or pause stepping. |
| home end | Jump to the first or last entry. |
| URL | The view writes rollup and batch into the query string, so any state can be shared as a link. |
How it is built
src/lib/batch-debugger.ts, served by GET /api/debug?rollup=<id>&batch=<n> (without batch it lists the rollup's settled batches for the picker).
- Parent state. Every earlier batch is re-executed from the inbox read by Replay's
fetchWholeInbox. Ledger checkpoints are kept every 64 batches (plus a few recent exact parents), and stay valid while the batch before them still carries the same settled root. - Reference. The whole batch is run once through
executeQledgeron a clone of the parent. - Steps. Each entry is then run through
executeQledgeron its own, through a recording state wrapper, so every balance and nonce write is captured as it happens. An entry with no writes is a no-op. - Reasons.
explainEntrymirrors the check order ofexecuteQledger. Its reason is shown only when it agrees with what execution did. If execution ignored an entry that the mirror expected to apply, the step says "reason not determined" instead of guessing. - Checks.
parentAgrees(rebuilt parent vs the previous batch's settled root),rootsAgree(stepwise = whole batch = chain),withdrawalsRootsAgree(stepwise vs whole batch), andinboxVerified(range vsdataHash). - Caches. Batch lists for 30 s, the inbox re-read after 30 s, results for 10 minutes per rollup and batch, all in server memory.
Every no-op reason
These labels are imported from NOOP_REASON_LABEL in the code, so this table cannot drift from what the console shows.
| Reason id | Label |
|---|---|
| deposit-undecodable | Undecodable deposit payload |
| deposit-to-reserved-slot | Deposit to the reserved withdrawal-counter slot |
| deposit-overflow | Deposit would overflow the account balance (u64) |
| undecodable | Undecodable payload (not a qledger-v1 transaction) |
| bad-signature | Bad ML-DSA-44 signature |
| wrong-binding | Signed for a different chain / rollup |
| nonce-mismatch | Nonce mismatch |
| zero-amount | Zero amount |
| insufficient-balance | Insufficient balance |
| nonce-exhausted | Sender nonce exhausted (u64 max) |
| transfer-to-reserved-slot | Transfer to the reserved withdrawal-counter slot |
| recipient-balance-overflow | Recipient balance would overflow (u64) |
| withdraw-amount-too-large | Withdrawal amount above i64 max |
| recipient-not-utf8 | Withdrawal recipient is not valid UTF-8 |
| invalid-recipient | Withdrawal recipient is not a canonical qor1 address |
| withdrawal-counter-exhausted | Rollup withdrawal counter exhausted |
| not-determined | No-op (reason not determined) |