Consensus
MultiChain achieves consensus by validating blocks in a round-robin scheme with amining-diversity parameter.
All nodes with the addresses with the mine permission take a turn in validating blocks in the network.
The way the mine nodes take turns in validating blocks is determined by the network’s mining-diversity parameter.
The mining-diversity parameter can be set to any value between 0 and 1:
1— everyminenode in the network must take a turn in block validation per round. This is the strictest setting.0— not everyminenode must take a turn in block validation per round; anyminenode can take turns in block validation in a random fashion. This is the loosest setting.
- Determine the number of nodes with the
minepermission in the network. - Multiply the number of
minenodes by themining-diversityvalue to get the value spacing. - Check if the
minenode validating the current block validated a spacing-1 block. If theminenode validated a spacing-1 block, render the block invalid.
mining-diversity parameter is 0.3 and cannot be changed once the chain is initialized.
Round-robin example with 10 mine nodes with mining-diversity set to 0.3:
- 10 nodes permitted to validate blocks.
- 10×0.3=3. spacing is 3. spacing-1 is 2.
- Each
minenode in the network can validate every third block and cannot validate two blocks in a row.
Service nodes
A MultiChain network is deployed with the following service node:- Explorer — a node running MultiChain explorer