Configuring Raft consensus
To enable Raft consensus, specify the
--raft command line option when starting GoQuorum.
Raft requires that all initial nodes in the cluster are configured as static peers.
The order of the enode IDs in the
static-nodes.json file must be the same across all peers.
The enode IDs must include a
raftport querystring parameter specifying the Raft port for each peer.
Adding Raft members
To add a verifier node to the cluster, attach to a JS console and issue
To add a learner node to the cluster, attach to a JS console and issue
To promote a learner to a verifier in the cluster, attach to a JS console of a leader or verifier node
The enode ID must include a
raftport querystring parameter like the enode IDs in the
addLearner calls allocate and return a Raft ID not already in use. After
addLearner, start the new GoQuorum node with the
--raftjoinexisting RAFTID command line option
in addition to
RAFTID with the Raft ID returned by
Removing Raft members
To remove a node from the cluster, attach to a JS console and issue
is the number of the node to be removed. For initial nodes in the cluster,
is the 1-indexed position of the enode ID for the node in the static peers list. Once a node is removed
from the cluster, it is permanent. The Raft ID cannot reconnect to the cluster in the future. If rejoining,
the node must specify a new Raft ID returned by
By default, blocks are minted no more frequently than every 50ms. When transactions arrive:
- If it has been at least 50ms since the last block, a new block is minted immediately.
- If it has been less that 50ms, a new block is minted 50ms after the previous block was minted. Waiting prevents Raft being flooded with blocks.
The rate limiting achieves a balance between transaction throughput and latency.
Configure the minting frequency using the
--raftblocktime command line option when starting GoQuorum.
Raft transport layer
Blocks are communicated over the HTTP transport layer built into etcd Raft.
By default, GoQuorum listens on port 50400 for the Raft transport. Use the
--raftport command line
option to change the port.
By default, the number of peers is 25. Use the
--maxpeers N command line option to configure the
maximum number of peers where N is expected size of the cluster.