Skip to content

feat(abci): let the application ask for the next block without waiting for transactions - #1466

Merged
lklimek merged 6 commits into
v1.8-devfrom
feat/abci-propose-next-block-immediately
Sep 15, 2026
Merged

lklimek merged 6 commits into
v1.8-devfrom
feat/abci-propose-next-block-immediately

Conversation

@QuantumExplorer

@QuantumExplorer QuantumExplorer commented Sep 14, 2026 •

Copy link
Copy Markdown
Member

Issue being fixed or feature implemented

On an idle chain the next block only comes after create-empty-blocks-interval (3 minutes on Dash Platform networks). Platform withdrawals need two consecutive blocks: the block that pools a withdrawal leaves the untied asset unlock transaction in a queue, and the following block dequeues it, threshold-signs it through vote extensions, and broadcasts it to Core. Today that following block waits the whole interval, so every withdrawal on a quiet chain is delayed by minutes for nothing.

Tendermint used to propose immediately whenever the last block changed the app hash (the "proof block"). Tenderdash dropped that, correctly, because its header carries its own app hash. This PR gives the application an explicit way to ask for the same thing when it actually has work pending.

What was done?

  • ResponseFinalizeBlock.propose_next_block_immediately (new field 3). When set, round 0 of the next height enters the propose step as soon as timeout-commit has passed instead of waiting for transactions or the empty-block interval, exactly as if a transaction were in the mempool.
  • ABCISemVer 1.3.0 to 1.4.0 (additive response field, same as previous additive ABCI changes).
  • state.Executor.FinalizeBlock now also returns the application's ResponseFinalizeBlock, so the consensus engine can read the hint. ApplyCommitAction stores it on RoundState.ProposeNextBlockImmediately after updateToState has reset it, and EnterNewRoundAction skips the wait when it is set. Block sync and replay ignore the response.
  • Executor mock updated for the new signature (hand-edited: mockery fails on this tree with an internal go/packages error).
  • Tests: TestMempoolProgressWhenAppRequestsNextBlockImmediately (second block arrives without the interval, third one waits again, so the hint applies to one height only) and TestFinalizeBlockReturnsProposeNextBlockImmediately.
  • e2e: the kvstore app gains propose_next_block_immediately (sets the hint in every FinalizeBlock response); the manifest gains create_empty_blocks and propose_next_block_immediately; the dashcore CI testnet runs with empty blocks off and the hint on, so the chain only keeps moving without transactions because of the hint. TestApp_ProposeNextBlockImmediately asserts that empty blocks above the initial height exist, which nothing else can produce in that configuration, and the runner's post-load wait fails outright if the chain stalls.
  • Docs: spec/abci++/abci++_methods.md, regenerated spec/abci++/api.md, docs/nodes/configuration.md.
  • The first commit only regenerates the .pb.go files with the current toolchain (the committed ones came from Go 1.23; check-generated regenerates with 1.27 and diffs the whole tree). No .proto changed in that commit.

Why it is safe

  • Not consensus. The field is not compared between validators, does not affect the app hash, votes, or ProcessProposal, and only the node that proposes the next height acts on it.
  • A non-proposer still sitting in RoundStepNewRound on its interval timer accepts a complete proposal and moves on to prevote (state_add_prop_block.go), so validators disagreeing on the hint cannot fork or stall.
  • Consumed once and not persisted: a node that restarts in between falls back to the configured wait.
  • Applications that never set the field see no change; an older Tenderdash ignores the unknown field.

Follow-ups

🤖 Generated with Claude Code

QuantumExplorer and others added 2 commits September 14, 2026 19:47
The committed files were generated with Go 1.23; go.mod now requires 1.27 and
the check-generated workflow regenerates with it, so the gzipped descriptors
and blank comment lines differ. No .proto changed in this commit.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
…g for transactions

Add ResponseFinalizeBlock.propose_next_block_immediately. When the application
sets it, round 0 of the next height enters the propose step as soon as the
commit timeout has passed instead of waiting for transactions or the
create-empty-blocks-interval, the same as if a transaction were in the mempool.

The hint is local to the node and never part of consensus: it is not compared
between validators, only the proposer of the next height acts on it, a
non-proposer that is still waiting on its interval accepts the early proposal
as usual, and it is consumed once and not persisted, so a restart falls back
to the configured wait.

Dash Platform needs this for withdrawals: the block that pools a withdrawal
leaves the untied transaction in a queue that the next block signs, and on an
idle chain that next block only came after the empty-block interval.

ABCISemVer 1.3.0 -> 1.4.0 (additive response field). FinalizeBlock on the
state executor now also returns the application's response so the consensus
engine can read the hint; block sync and replay ignore it.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
@coderabbitai

coderabbitai Bot commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on this repository. 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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 7cfc7c37-5207-4678-b555-63997335c8dc

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

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.

@github-actions

github-actions Bot commented Sep 14, 2026 •

Copy link
Copy Markdown

PR Hygiene

State: waiting-self-review · commit 54a2d09edb5e0a1b74e0c545bc0e18332afb1946

  • Author must post /self-reviewed 54a2d09 after bot completion

Self-review is an author attestation that you have read the diff:
/self-reviewed — covers everything pushed so far; post it again after a new push.
Post it after this report appears for commit 54a2d09edb5e0a1b74e0c545bc0e18332afb1946, or name the commit explicitly with /self-reviewed 54a2d09edb5e0a1b74e0c545bc0e18332afb1946.

This report does not bypass CI or repository protection rules.

@thepastaclaw

thepastaclaw commented Sep 14, 2026 •

Copy link
Copy Markdown

✅ Final review complete — no blockers (commit 54a2d09) · triage: critical · Phase 2 only (queue backlog)

Comment thread proto/tendermint/abci/types.proto Resolved
QuantumExplorer and others added 2 commits September 14, 2026 22:26
…stnet

The kvstore application gains propose_next_block_immediately, which sets the
hint in every FinalizeBlock response. The manifest gains create_empty_blocks
(consensus create-empty-blocks of every node) and
propose_next_block_immediately. The dashcore CI testnet turns empty blocks off
and the hint on, so the chain only keeps moving without transactions because
of the hint; TestApp_ProposeNextBlockImmediately asserts that empty blocks
above the initial height exist, which is impossible without it.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
The e2e application adds its extensionSum transaction to every proposal once
vote extensions are enabled, so no block is ever empty. Count blocks above the
initial height whose only transaction is that one, and also watch the chain
grow while nothing submits transactions.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
@QuantumExplorer

Copy link
Copy Markdown
Member Author

First e2e run with the scenario failed on my own assertion, not on the hint: the e2e app adds its extensionSum transaction to every proposal once vote extensions are enabled, so no block is ever literally empty. The chain did keep moving after the load generator stopped (the runner's post-load wait passed), which with create_empty_blocks = false only the hint can do. 37f3ab6 counts blocks above the initial height that carry no mempool transactions and also watches the chain grow while nothing submits transactions. The rotate leg was only cancelled by the matrix fail-fast.

🤖 Addressed by Claude Code

@thepastaclaw

Copy link
Copy Markdown

/self-reviewed 37f3ab6

@thepastaclaw thepastaclaw left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Final validation — Phase 2 only (queue backlog)

The implementation correctly carries the application’s FinalizeBlock scheduling hint into the next height, consumes it only for round 0, and preserves normal behavior for subsequent heights. The protobuf/API updates, executor changes, consensus integration, tests, e2e coverage, and documentation are consistent; no in-scope correctness, consensus-safety, security, or interoperability defects were identified.

Review provenance

Source: reviewer 1: gpt-6-astra (agent: phase2-reviewer, role: general); reviewer 2: gpt-6-astra (agent: phase2-reviewer, role: tenderdash-consensus-security); final verifier: gpt-6-astra (agent: astra-verifier, role: final-verifier)

  • Triage: critical by gpt-6-astra (effort low) — This is a large, intricate cross-cutting change that alters consensus-engine block-proposal timing in internal/consensus/state_apply_commit.go and state_enter_new_round.go, directly affecting consensus behavior.
  • Phase 1 reviewers: not run (skipped for throughput: 11 PRs queued, above the 10 limit)
  • Fresh verifier: gpt-6-astra — final-verifier; agent astra-verifier
  • Phase 2 reviewers: gpt-6-astra — general (completed, effort xhigh); agent phase2-reviewer, gpt-6-astra — tenderdash-consensus-security (completed, effort xhigh); agent phase2-reviewer

…-next-block-immediately

# Conflicts:
#	abci/types/types.pb.go

@thepastaclaw thepastaclaw left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Final validation — Phase 2 only (queue backlog)

The change correctly propagates the application’s FinalizeBlock scheduling hint through the state executor and consumes it for exactly the next height’s round-0 proposal wait. The hint is reset on height transitions, ignored during replay and block sync, and does not alter signed bytes, block validity, voting, or quorum verification. The added unit and end-to-end coverage exercises both response propagation and one-shot consensus behavior; no in-scope issues were identified.

Review provenance

Source: reviewer 1: gpt-6-astra (agent: phase2-reviewer, role: general); reviewer 2: gpt-6-astra (agent: phase2-reviewer, role: tenderdash-consensus-security); final verifier: gpt-6-astra (agent: astra-verifier, role: final-verifier)

  • Triage: critical by gpt-6-astra (effort low) — This is a large, intricate diff that changes consensus behavior in the core state transition and round progression paths, notably state.Executor.FinalizeBlock, ApplyCommitAction, and EnterNewRoundAction, even though the feature is intended to be non-consensus-affecting.
  • Phase 1 reviewers: not run (skipped for throughput: 24 PRs queued, above the 10 limit)
  • Fresh verifier: gpt-6-astra — final-verifier; agent astra-verifier
  • Phase 2 reviewers: gpt-6-astra — general (completed, effort xhigh); agent phase2-reviewer, gpt-6-astra — tenderdash-consensus-security (completed, effort xhigh); agent phase2-reviewer

@lklimek
lklimek merged commit 0284cfc into v1.8-dev Sep 15, 2026
25 checks passed
@lklimek
lklimek deleted the feat/abci-propose-next-block-immediately branch September 15, 2026 09:20
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