Skip to content

Feat: make block-production intervals configurable - #1032

Merged
tomatoishealthy merged 1 commit into
mainfrom
feat/configurable-block-interval
Aug 6, 2026
Merged

Feat: make block-production intervals configurable#1032
tomatoishealthy merged 1 commit into
mainfrom
feat/configurable-block-interval

Conversation

@tomatoishealthy

@tomatoishealthy tomatoishealthy commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • New Features

    • Added configurable sequencer block intervals through command-line options.
    • Added separate settings for empty-block fallback timing and transaction-pool polling.
    • Applied configured intervals before consensus startup and displayed them in startup logs.
  • Bug Fixes

    • Startup now reports a clear error when interval settings are invalid, preventing the node from launching with incompatible configuration.

@tomatoishealthy
tomatoishealthy requested a review from a team as a code owner August 5, 2026 10:17
@tomatoishealthy
tomatoishealthy requested review from dylanCai9 and removed request for a team August 5, 2026 10:17
@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The PR updates Morph L2 Tendermint replacements from v0.3.8 to v0.3.9. It also adds CLI flags for sequencer block intervals and applies them during consensus node startup.

Changes

Tendermint and sequencer configuration

Layer / File(s) Summary
Tendermint dependency alignment
Makefile, bindings/go.mod, common/go.mod, contracts/go.mod, node/go.mod, ops/l2-genesis/go.mod, ops/tools/go.mod, tx-submitter/go.mod
The configured Tendermint target and module replacements now use v0.3.9.
Sequencer interval startup configuration
node/flags/flags.go, node/cmd/node/main.go
New flags configure 2-second empty-block fallback and 300-millisecond transaction-pool polling intervals. Node startup applies the values with tmsequencer.SetBlockIntervals and returns a wrapped error for invalid combinations.

Estimated code review effort: 2 (Simple) | ~10 minutes

Sequence Diagram(s)

sequenceDiagram
  participant CLI
  participant NodeStartup
  participant tmsequencer
  CLI->>NodeStartup: Provide sequencer interval flags
  NodeStartup->>tmsequencer: Call SetBlockIntervals
  tmsequencer-->>NodeStartup: Return validation result
  NodeStartup->>NodeStartup: Log intervals or return startup error
Loading

Possibly related PRs

  • morph-l2/morph#748: Updates Tendermint dependency versions across shared module files and the Makefile.
  • morph-l2/morph#939: Updates Tendermint dependency versions in the same configuration files.
  • morph-l2/morph#858: Updates Tendermint dependency versions across overlapping module files.

Suggested reviewers: dylancai9, curryxbo, chengwenxi

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: making block-production intervals configurable.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ 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 feat/configurable-block-interval

Warning

Billing warning: we have not been able to collect payment for this subscription for more than 72 hours. Please update the payment method or pay any pending invoices in Billing to avoid service interruption.


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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
node/flags/flags.go (1)

218-232: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add focused coverage for the interval configuration contract.

Test the default values, environment-variable overrides, flag registration, and invalid ordering before startup. This protects the exact names used by node/cmd/node/main.go and prevents configuration drift.

Also applies to: 425-426

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@node/flags/flags.go` around lines 218 - 232, Add focused tests for
SequencerBlockInterval and SequencerFastBlockInterval covering their default
durations, SEQUENCER_BLOCK_INTERVAL and SEQUENCER_FAST_BLOCK_INTERVAL
environment overrides, registration under the exact flag names, and rejection of
configurations where the fast interval is not less than the block interval
before startup. Anchor the coverage to these flag definitions and the startup
validation used by node/cmd/node/main.go.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@node/flags/flags.go`:
- Around line 218-232: Add focused tests for SequencerBlockInterval and
SequencerFastBlockInterval covering their default durations,
SEQUENCER_BLOCK_INTERVAL and SEQUENCER_FAST_BLOCK_INTERVAL environment
overrides, registration under the exact flag names, and rejection of
configurations where the fast interval is not less than the block interval
before startup. Anchor the coverage to these flag definitions and the startup
validation used by node/cmd/node/main.go.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 0c0d4a2c-7c4d-47a4-89d5-96f983c80cb7

📥 Commits

Reviewing files that changed from the base of the PR and between fc629c0 and 7fba445.

⛔ Files ignored due to path filters (2)
  • node/go.sum is excluded by !**/*.sum
  • ops/tools/go.sum is excluded by !**/*.sum
📒 Files selected for processing (10)
  • Makefile
  • bindings/go.mod
  • common/go.mod
  • contracts/go.mod
  • node/cmd/node/main.go
  • node/flags/flags.go
  • node/go.mod
  • ops/l2-genesis/go.mod
  • ops/tools/go.mod
  • tx-submitter/go.mod

@tomatoishealthy
tomatoishealthy merged commit 3e428d4 into main Aug 6, 2026
15 checks passed
@tomatoishealthy
tomatoishealthy deleted the feat/configurable-block-interval branch August 6, 2026 08:14
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.

3 participants