Skip to content

feat: add NewL2BlockV2 support in executor + RetryableClient#934

Open
tomatoishealthy wants to merge 2 commits intofeat/sequencer-ha-v2from
feat/reorg-geth
Open

feat: add NewL2BlockV2 support in executor + RetryableClient#934
tomatoishealthy wants to merge 2 commits intofeat/sequencer-ha-v2from
feat/reorg-geth

Conversation

@tomatoishealthy
Copy link
Copy Markdown
Contributor

Summary

  • Executor.ApplyBlockV2 returns (applied bool, err error) to let callers distinguish real applies from idempotent skips, preventing StateV2.latestBlock regression during HA Raft log replay
  • RetryableClient.NewL2BlockV2 wraps the new engine_newL2BlockV2 RPC with retry, excluding WrongBlockNumberError / ParentNotFoundError from retry
  • RetryableClient.AssembleL2BlockV2 added for parent-hash-based block assembly

Test plan

  • go build ./node/... — compiles cleanly
  • UPGRADE_HEIGHT=10 ./run-test.sh test — full devnet test passed (PBFT → Sequencer → fullnode sync)

🤖 Generated with Claude Code

@tomatoishealthy tomatoishealthy requested a review from a team as a code owner April 16, 2026 07:15
@tomatoishealthy tomatoishealthy requested review from r3aker86 and removed request for a team April 16, 2026 07:15
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 16, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 44aa8283-1644-4d74-b70f-80bc6751839b

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/reorg-geth

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Wire up the new engine_newL2BlockV2 API for reorg support:

- Executor.ApplyBlockV2 now returns (applied bool, err error) matching
  the updated L2Node interface; detects idempotent skips and reorgs
  using BlockNumber + BlockByNumber checks before calling NewL2BlockV2
- RetryableClient.NewL2BlockV2 wraps the new authclient method with
  exponential backoff retry; excludes WrongBlockNumberError and
  ParentNotFoundError from retry (permanent errors)
- RetryableClient.AssembleL2BlockV2 added for parent-hash-based block
  assembly

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add BlockHashMismatchError and InvalidNextL1MsgIndexError to the
retryableError() exclusion list so the executor stops re-sending
invalid payloads back to geth.

Made-with: Cursor
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.

1 participant