Repository navigation
feat(abci): let the application ask for the next block without waiting for transactions - #1466
Conversation
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]>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
PR HygieneState: waiting-self-review · commit
Self-review is an author attestation that you have read the diff: This report does not bypass CI or repository protection rules. |
Co-Authored-By: Claude Fable 5.1 <[email protected]>
|
✅ Final review complete — no blockers (commit 54a2d09) · triage: critical · Phase 2 only (queue backlog) |
…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]>
|
First e2e run with the scenario failed on my own assertion, not on the hint: the e2e app adds its 🤖 Addressed by Claude Code |
|
/self-reviewed 37f3ab6 |
thepastaclaw
left a comment
There was a problem hiding this comment.
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:
criticalbygpt-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; agentastra-verifier - Phase 2 reviewers:
gpt-6-astra— general (completed, effort xhigh); agentphase2-reviewer,gpt-6-astra— tenderdash-consensus-security (completed, effort xhigh); agentphase2-reviewer
…-next-block-immediately # Conflicts: # abci/types/types.pb.go
thepastaclaw
left a comment
There was a problem hiding this comment.
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:
criticalbygpt-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; agentastra-verifier - Phase 2 reviewers:
gpt-6-astra— general (completed, effort xhigh); agentphase2-reviewer,gpt-6-astra— tenderdash-consensus-security (completed, effort xhigh); agentphase2-reviewer
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 astimeout-commithas passed instead of waiting for transactions or the empty-block interval, exactly as if a transaction were in the mempool.ABCISemVer1.3.0to1.4.0(additive response field, same as previous additive ABCI changes).state.Executor.FinalizeBlocknow also returns the application'sResponseFinalizeBlock, so the consensus engine can read the hint.ApplyCommitActionstores it onRoundState.ProposeNextBlockImmediatelyafterupdateToStatehas reset it, andEnterNewRoundActionskips the wait when it is set. Block sync and replay ignore the response.mockeryfails on this tree with an internal go/packages error).TestMempoolProgressWhenAppRequestsNextBlockImmediately(second block arrives without the interval, third one waits again, so the hint applies to one height only) andTestFinalizeBlockReturnsProposeNextBlockImmediately.propose_next_block_immediately(sets the hint in every FinalizeBlock response); the manifest gainscreate_empty_blocksandpropose_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_ProposeNextBlockImmediatelyasserts 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.spec/abci++/abci++_methods.md, regeneratedspec/abci++/api.md,docs/nodes/configuration.md..pb.gofiles with the current toolchain (the committed ones came from Go 1.23;check-generatedregenerates with 1.27 and diffs the whole tree). No.protochanged in that commit.Why it is safe
ProcessProposal, and only the node that proposes the next height acts on it.RoundStepNewRoundon 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.Follow-ups
rs-tenderdash-abci: feat(proto): build against Tenderdash with ResponseFinalizeBlock.propose_next_block_immediately rs-tenderdash-abci#208 regenerates against this Tenderdash commit (ABCI1.4.0).dashpay/platform: feat(drive-abci): ask Tenderdash for the next block right away when withdrawal work is queued platform#4741 sets the hint fromfinalize_blockwhen withdrawal work is queued or expired.rs-tenderdash-abcirequires a matching ABCI minor, Drive built against it needs a Tenderdash release with this change; dashmate ships both together.🤖 Generated with Claude Code