Skip to content

v0.11.0-rc6

Pre-release
Pre-release

Choose a tag to compare

@arnaubennassar arnaubennassar released this 12 Aug 20:54
· 68 commits to develop since this release
954702f

πŸš€ What's New

  • INC-129 root cause fixed: l1-info-tree-index fallback used the wrong tree's index (#1794, closes #1795): the fallback in getFirstL1InfoTreeIndexForL1Bridge took root.Index from bridgeL1.GetLastRoot β€” a position in the L1 bridge exit tree (a deposit count, ~1,146,035) β€” and passed it to l1InfoTree.GetInfoByIndex, which queries SELECT * FROM l1info_leaf WHERE position = $1, an L1 info tree index. Two different trees, two different counters, both bare uint32. The row could not exist, so GET /bridge/v1/l1-info-tree-index returned HTTP 500 sql: no rows in result set whenever the L1 bridge syncer trailed the L1 info tree syncer. The fallback now calls GetLatestL1InfoLeafUntilBlock(ctx, root.BlockNum), clamping to the most recent info-tree leaf at or before the last block the bridge syncer indexed β€” the clamp the original code intended, in the correct index space. The tip-anchored binary search, the GetRootByLER join, and ErrNotOnL1Info are all retained.
  • Same bug fixed in autoclaim (#1794, closes #1795): autoclaim/proof/preparer.go carried a verbatim copy of the index-space confusion in its own GetRootByLER fallback. It now clamps on root.BlockNum too.
  • Cross-syncer error taxonomy (#1794): endpoints that join syncers which can sit at different heights now distinguish "not indexed yet" from a genuine fault, via a shared httpStatusForSyncerError helper: ErrBlockNotProcessed, l1infotreesync.ErrNotFound, ErrNoBlock0, db.ErrNotFound, ErrNotOnL1Info β†’ 404; sync.ErrInconsistentState β†’ 503; anything else β†’ 500. Not-ready conditions now log at Debug/Warn instead of Error, so alert volume does not simply migrate from HTTP 500s into ERROR logs.
  • ClaimProofHandler metrics fix (#1794): statusCode was initialised to 200 and never reassigned across all 13 exit paths, so every failure was invisible in metrics. All exits now report the correct status.
  • GetInfoByIndex not-found is now properly wrapped (#1794): getInfoByIndexWithTx skipped db.ReturnErrNotFound, returning a raw sql: no rows in result set β€” the literal 500 body in INC-129 β€” leaving errors.Is(err, db.ErrNotFound) dead code at three call sites.

⚠️ Breaking Changes

  • πŸ”Œ API/CLI: HTTP 500 β†’ 404 / 503 on three endpoints. /bridge/v1/l1-info-tree-index, /bridge/v1/claim-proof, and the L1 path of /bridge/v1/injected-l1-info-leaf now return 404 when a syncer has not indexed the requested data yet (callers should treat it as not ready yet, retry later) and 503 when a syncer is halted / in an inconsistent state. Previously all of these were 500 (#1794).
  • /injected-l1-info-leaf's L2 path already returned 404; only its L1 path changes.
  • bridgeservice/client: GetL1InfoTreeIndex and GetClaimProof switch from doRequest to doRequestAllowNotFound, so they now return the ErrNotFound sentinel on 404 instead of a generic error. Signatures and return types are unchanged, but callers that treated any error as fatal may now want to retry on ErrNotFound. A 503 deliberately stays a plain non-ErrNotFound error so a halted syncer is not mistaken for "not indexed yet".
  • No success-path response body or schema changed anywhere.

πŸ“‹ Config Updates

  • None.

πŸ› Bug Fixes

  • GET /bridge/v1/l1-info-tree-index no longer returns HTTP 500 when the L1 bridge syncer trails the L1 info tree syncer (#1794).
  • autoclaim's GetRootByLER fallback no longer mixes L1 bridge exit tree indices with L1 info tree indices, closing #1795.
  • ClaimProofHandler now reports accurate HTTP status codes in metrics on all 13 exit paths (#1794).
  • GetInfoByIndex not-found errors are now correctly wrapped as db.ErrNotFound instead of leaking a raw SQL error (#1794).

Full changelog: v0.11.0-rc5...v0.11.0-rc6