Skip to content

fix(consensus): return own mempool on empty-incoming pull - #985

Draft
Shitikyan wants to merge 1 commit into
stabilisationfrom
fix/consensus-tx-propagation
Draft

fix(consensus): return own mempool on empty-incoming pull#985
Shitikyan wants to merge 1 commit into
stabilisationfrom
fix/consensus-tx-propagation

Conversation

@Shitikyan

Copy link
Copy Markdown
Contributor

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 (handleMempoolreceive(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===0 path).

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 @/forks serializer while the worker validates via the SDK demosdk denomination serializer; they diverge post-osDenomination. Serializer-parity fix is its own (likely cross-repo) scope.

🤖 Generated with Claude Code

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
@coderabbitai

coderabbitai Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

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.

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