Skip to content

reorg lag env#318

Merged
nischitpra merged 1 commit intomainfrom
np/reorg_lag
May 5, 2026
Merged

reorg lag env#318
nischitpra merged 1 commit intomainfrom
np/reorg_lag

Conversation

@nischitpra
Copy link
Copy Markdown
Collaborator

@nischitpra nischitpra commented May 5, 2026

Summary by CodeRabbit

  • New Features
    • Added configurable reorg lag setting via the REORG_LAG_BY_BLOCKS environment variable (default: 500 blocks).

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 5, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: c9b1fbea-85b8-4979-be14-ee52d373b89a

📥 Commits

Reviewing files that changed from the base of the PR and between c3c0665 and ffbd285.

📒 Files selected for processing (2)
  • configs/config.go
  • internal/committer/reorg.go

Disabled knowledge base sources:

  • Linear integration is disabled

You can enable these sources in your CodeRabbit configuration.


Walkthrough

The PR introduces a configurable reorg validation lag by adding a ReorgLagByBlocks field to the Config struct with a default value of 500, then updates the reorg range calculation to reference this configurable value instead of using a hardcoded offset.

Changes

Reorg Lag Configuration

Layer / File(s) Summary
Configuration
configs/config.go
Add ReorgLagByBlocks uint64 field (env var REORG_LAG_BY_BLOCKS, default 500) to Config struct with documentation about maintaining reorg validation lag behind the latest committed block.
Core Logic
internal/committer/reorg.go
Update getReorgRange to use configurable config.Cfg.ReorgLagByBlocks instead of hardcoded 500 offset when computing the reorg-check end block.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch np/reorg_lag

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

@nischitpra nischitpra merged commit af5040e into main May 5, 2026
4 of 5 checks passed
@nischitpra nischitpra deleted the np/reorg_lag branch May 5, 2026 16:15
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