fix(consensus): return own mempool on empty-incoming pull - #985
Draft
Shitikyan wants to merge 1 commit into
Draft
Conversation
Mempool.receive([]) returned { mempool: [] }, so an idle validator (empty
mempool) pulling a peer via the push-pull 'mempool' exchange got nothing
back. The proposer's txs never reached the shard, its candidate block's
tx-set diverged (broadcastBlockHash missingFromThem>0), and a tx submitted
to a single node was never included. Return our own pool, mirroring the
unseenTransactions===0 path.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GaYywCQ3f4SZD78cn1MaXA
Contributor
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Fixes a consensus-liveness bug: a tx submitted to a single node in a multi-validator network is never included.
Root cause
Mempool.receive([])early-returned{ mempool: [] }. The peer "mempool" exchange is push-pull (handleMempool→receive(theirTxs).mempool): an idle validator (empty mempool) pulls a peer by sending[], so the proposer replied[]instead of its own pool. Peers never learned the proposer's txs → the candidate block's tx-set diverged (broadcastBlockHash missingFromThem>0) → block rejected → tx never included.Fix
On empty incoming, return our own pool (mirrors the
unseenTransactions===0path).Verified
Local 4-node devnet: before, peers logged "Received 0 transactions from "; after, "Received N". Single-validator sidesteps the bug.
Follow-up (separate scope, NOT in this PR)
Exposed a second layer: peers then reject propagated txs as "Transaction is not coherent" — the submit path hashes via the node
@/forksserializer while the worker validates via the SDKdemosdkdenomination serializer; they diverge post-osDenomination. Serializer-parity fix is its own (likely cross-repo) scope.🤖 Generated with Claude Code