Technical description of the platform
Waves-NG blockchain protocol¶
Waves-NG is a blockchain protocol developed by Waves Enterprise on the basis of the Bitcoin-NG. The main concept of the protocol is a continuous generation of microblocks instead of one big block in each mining round. This approach allows to increase the blockchain operating speed, because microblocks are validated and transferred into the network much faster.
Description of a mining round¶
Each mining round consists of the following stages:
A used consensus algorithm defines a round miner and the time for generation of a key block which does not contain transactions.
The round miner generates a key block which contains only service information:
public key of the miner for validation of microblock signatures;
a miner fee for a previous block;
the miner signature;
a reference to a previous block.
After generating of a key block, the round miner generates a liquid block: each 5 seconds the miner generates microblocks with transactions and broadcasts them in the network . At this stage, microblocks are not validated by a consensus algorithm, which increases their generation speed. A first microblock refers to the key block, each subsequent microblock refers to a previous one.
The process of generation of microblocks within the liquid block continues up to generation of a next valid key block, which finishes the mining round. At the moment of generation of the next key block, the liquid block with all microblocks generated by the round miner is finalized as a next block of the blockchain.
Miner fee mechanism¶
The Waves-NG protocol supports financial motivation for miners. Each transaction in the Waves Enterprise blockchain requires a fee in WEST tokens. All fees for transactions in microblocks are summed up during a mining round. A total fee is distributed in the following way:
a miner of the current round receives 40% of the total fee for generation of the current block;
a miner of the next round receives 60% of the total fee.
The fee charging transaction is carried out for each 100 blocks in order to provide an additional checking interval:
Smart contract validators fee mechanism¶
The Waves-NG protocol supports financial motivation for smart contract validators. Each validated smart contract execution transaction in the Waves Enterprise blockchain requires a fee in WEST tokens that is then transferred to miners and validators. A smart contract is validated if it uses the
MajorityWithOneOf validation policy. The fee is distributed in the following way:
25% of the smart contract execution transaction fee goes to validators. Remuneration is distributed among the validators in equal shares.
75% of the smart contract execution transaction fee goes to the miners. This amount is distributed among the miners in the following way:
– a miner of the current round receives 40% of 75%, i.e. 30% of the total fee for the current block generation;
– a miner of the next round receives 60% of 75%, i.e. 45% of the total fee.
Conflict resolution while generating blocks¶
If a miner continues a previously created blockchain by generating two microblocks with the same parent block, an inconsistency of transaction occurs. It is detected by a blockchain node at the moment of generating of a next microblock, when a node accepts the received changes for its network state copy and synchronizes them with other nodes.
The Waves-NG protocol defines such situation as a fraud. A miner who has continued a foreign chain, is deprived of round transaction fees. A node that has detected an inconsistency receives a miner fee.
Generation and broadcasting of invalid blockchain blocks are also detected by the consensus algorithms.