Problem: Votes were being submitted to one validator but not shared with
other validators, preventing them from being included in blocks.
Root cause: When a validator received a transaction via eth_sendTransaction,
it added it to its pending_transactions pool but did NOT broadcast it to
peer validators. Only blocks were being broadcast.
This meant:
- validator-1 receives vote → adds to pending_transactions
- validator-2 (responsible for next block) never receives the vote
- validator-2 can't include vote in block because it doesn't know about it
- Result: votes sit in pending queue forever
Solution:
- Add broadcast_transaction() method following same pattern as broadcast_block()
- Broadcast transaction to all known peers via /p2p/new_transaction endpoint
- Call broadcast on receipt of each transaction
- Peer validators receive and add to their pending_transactions pool
- All validators now have same pending transactions
- Any validator can create blocks with all pending transactions
The /p2p/new_transaction endpoint already existed, so validators can now
receive and process transactions from peers.
This fixes the issue where votes were submitted successfully but never
appeared on the blockchain.
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
Description
No description provided
Languages
JavaScript
37.7%
Python
28.6%
CSS
26%
Typst
4.1%
Shell
2.4%
Other
1.2%