validator coordination and leader election service for the Tana blockchain.
tana-consensus implements a practical Byzantine fault tolerant (pBFT) consensus mechanism that coordinates block production across multiple validator nodes. it handles leader election, block proposal broadcasting, and vote collection to achieve network-wide agreement on the canonical chain.
validators connect to each other via WebSocket and participate in rounds of consensus. each round has a designated leader who proposes a block, and other validators vote on whether to accept it.
round begins
|
v
leader elected (round-robin)
|
v
leader proposes block
|
v
validators verify + vote
|
v
2/3+ votes collected
|
v
block finalized
leaders are selected deterministically using round-robin ordering based on validator registration order. this ensures predictable block production while maintaining fairness across validators.
validators sign their votes using Ed25519 keys registered with the mesh service. a block is finalized when it receives votes from more than two-thirds of active validators.
built with TypeScript using WebSocket for peer-to-peer communication. validators discover each other through the mesh service and establish direct connections for low-latency message passing.
the service exposes both an internal API (port 9000) for inter-validator communication and an external API (port 9001) for monitoring and status queries.
tana-consensus runs alongside tana-ledger on each validator node. when consensus finalizes a block, it notifies the local ledger service to apply the state transitions and persist the block.
validator coordination and leader election service for the Tana blockchain.
tana-consensus implements a practical Byzantine fault tolerant (pBFT) consensus mechanism that coordinates block production across multiple validator nodes. it handles leader election, block proposal broadcasting, and vote collection to achieve network-wide agreement on the canonical chain.
validators connect to each other via WebSocket and participate in rounds of consensus. each round has a designated leader who proposes a block, and other validators vote on whether to accept it.
round begins
|
v
leader elected (round-robin)
|
v
leader proposes block
|
v
validators verify + vote
|
v
2/3+ votes collected
|
v
block finalized
leaders are selected deterministically using round-robin ordering based on validator registration order. this ensures predictable block production while maintaining fairness across validators.
validators sign their votes using Ed25519 keys registered with the mesh service. a block is finalized when it receives votes from more than two-thirds of active validators.
built with TypeScript using WebSocket for peer-to-peer communication. validators discover each other through the mesh service and establish direct connections for low-latency message passing.
the service exposes both an internal API (port 9000) for inter-validator communication and an external API (port 9001) for monitoring and status queries.
tana-consensus runs alongside tana-ledger on each validator node. when consensus finalizes a block, it notifies the local ledger service to apply the state transitions and persist the block.