Waves NG Protocol

From Waves Wiki
Jump to: navigation, search
This page contains changes which are not marked for translation.

Other languages:
العربية • ‎беларуская • ‎Deutsch • ‎Ελληνικά • ‎English • ‎español • ‎français • ‎हिन्दी • ‎hrvatski • ‎magyar • ‎Bahasa Indonesia • ‎italiano • ‎日本語 • ‎ភាសាខ្មែរ • ‎Nederlands • ‎русский • ‎ไทย • ‎Türkçe • ‎Tiếng Việt • ‎中文(中国大陆)‎

A scalability comparison between Bitcoin, Ethereum, Waves and Waves-NG

Scalability comparison
Blockchain System Block Time Block Size TXs/s
Bitcoin 10 minutes 1 MB 3-7 TX/s
Ethereum 15-30 seconds 2-22 KB 2-22 TX/s
Waves 1 minute 2-24 KB 1.6 TX/s
Waves-NG 1 Minute/KeyBlock

3 Seconds/MicroBlock

1 MB

65535 TX/KeyBlock

200 TX/MicroBlock

1000 TX/s

Weaknesses of Current Proposals to Improve Scalability

Blockchain systems can process transactions and the maximum rate of these transactions is limited by the choice of two parameters: block size and block interval.

The block interval defines the average amount of time that passes between the creation of two blocks. By deciding to reduce the block interval to solve the latency limit, the system will have less security (increases fork probability) due to multiple miners solving the same block which leads to instability as the blockchain is subject to reorganization and the system is in disagreement (Figure 1). If we reduce the time per block, then we will have a situation where a significant number of blocks are solved in less time than it takes to relay a solved block throughout the network. As a result, there is no way to know which block is the "real" one and which one is a "fork" because the transactions that appeared to have multiple confirmations suddenly have fewer confirmations (or possibly go back to being unconfirmed).


Figure 1: Increasing block frequency with static block size results in less security

The throughput of a system is bound by the maximum block size (given a fixed block interval) as the maximum number of included transactions is directly dependent on the block size. Larger blocks do however cause slower propagation speeds which causes more orphaned blocks (increased miner inefficiency). An unlimited block size could, for example, result in a Denial-of-Service attack on the system by creating a block that takes a long time to validate. If the choice is to increase block size in order to improve throughput, there will be network spikes with longer time to propagate over the network (Figure 2).

Block size.jpeg

Figure 2: Increasing block size with static block frequency will lead to more orphaned blocks and network spikes

Brief Summary of Bitcoin-NG

Bitcoin-NG is a next-generation blockchain protocol which is an alternative bitcoin scaling solution that does not involve increasing the size of blocks or decreasing the block time interval. This reduces the risk of forks amongst other advantages. Bitcoin-NG describes that the basic trade-offs in Bitcoin can be reduced with an alternative blockchain protocol, offering a consensus delay and bandwidth limited only by the network plane. The protocol splits time into time periods (epochs). In each time period, a particular leader is responsible for serializing transactions (Figure 3).

The leaders takes the responsibility of generating blocks:

Key blocks for the election of a leader.

Micro blocks for ledger records.


Figure 3: Bitcoin-NG time period structure with transaction serialization

All transactions are part of the same block and are serialized together. In between blocks, the traditional Bitcoin system appears idle to an onlooker, as miners are working to discover the next block, but without apparent progress on the consensus front. In contradiction, with Bitcoin-NG, the key blocks can be small because they need to contain only the coin base transaction which defines the public key that the miner will be using to sign micro blocks. Because a key block does not require Proof-of-Stake or Proof-of-Work, miners can not just produce one and expropriate the leadership at will. Following the key block, the leader frequently issues micro blocks by simply signing them with the private key corresponding to the public key named in the key block’s coin base (Figure 4).

Bitcoin Blocks.jpeg

Figure 4: Key blocks and micro blocks signing process

Waves-NG Overlay

Waves-NG is based on the Bitcoin-NG protocol that serializes transactions and offers important improvements in the transaction latency (lower latency) and bandwidth (higher throughput) compared to Bitcoin without sacrificing other properties or increasing number of forks. Waves approaches this scalability matter by providing the miner with the ability to farm a block during the time of mining with a continuous approach. This continuous block increment is called a liquid block. The liquid block is unalterable over time once the next liquid block referencing the previous one is created and appended. The main and core idea of Waves-NG is to split the liquid block into two types: Key blocks and micro blocks. The process of creating liquid blocks works as followed:

The miner node gets the permission to create a block.

The miner node creates and sends the key block (which does not contain transactions).

The miner node creates and sends the micro blocks (which contain transactions just as in normal blocks with a reference to the previous micro or key block) at a frequency of 3 seconds.

Miners will mine those micro blocks and propagate them directly to the network until the next new key block appears with a reference to the liquid block.

Waves-NG with Proof-of-Stake Protocol

Waves platform is using a Proof-of-Stake instead of Proof-of-Work protocol which results in a different approach for the implementation of Bitcoin-NG. The miner is able to update the generated block with new transactions and push those transactions to the network at low block generation fees due to Proof-of-Stake. In Proof-of-Work, however, it's significantly more expensive to serialize transactions as solving the block puzzle requires a lot of computational power. As a result, the Waves blockchain will be able to handle thousands of transactions per minute without sacrificing the concept of decentralization. After a successful implementation of Waves-NG with low transaction fees and maximization of throughput, the Waves network will be ready and suitable for high-load applications.

Leader Blocks

Also called "Key Blocks". These blocks are generated with Proof-of-Stake (PoS) but do not contain transactions. They serve as a leader election mechanism and contain a public key that identifies the chosen leader. Each block has a header that contains, among other fields, the unique reference of its predecessor which is a cryptographic hash of the predecessor's header (either a key block or a micro block). As in Bitcoin, for a key block to be valid, the cryptographic hash of its header must be smaller than the target value. Unlike Bitcoin, a key block contains a public key that will be used in subsequent micro blocks to sign transactions.

Micro Blocks

Once a node generates a key block, it becomes the leader. As a leader, the node is allowed to generate micro blocks at a set rate smaller than a predefined maximum. These micro blocks will contain the ledger entries with no requirement for any Proof-of-Stake and they are solely generated by the elected leader for that block-generation cycle. This block-generation cycle is initiated by a leader block. The only requirement is to sign the micro blocks with the elected leader's private key. The micro blocks can be generated at a very high speed by the elected leader (miner), thus resulting in increased performance and transaction speed. For a micro block to be valid, all its entries must be valid according to the specification of the state machine, and the miner's signature has to be valid.

Waves-NG Reward Mechanism

Miner reward is comprised of two parts. First, each key block entitles its generator a set amount. Second, each ledger entry carries a fee. This fee is split by the leader that places this entry in a micro block and the subsequent leader that generates the next key block. In order to motivate participants to follow the protocol, Waves-NG uses the following mechanism: Each transaction pays a fee to the system which is re-distributed to miners: 40% to the current epoch's leader and 60% to the subsequent leader. Finally, if a leader forks the chain by generating two micro blocks with the same parent, it is punished by revoking the subsidy revenue; whoever detects the fraud wins a nominal fee (Figure 5).


Figure 5: Chain structure of the Waves-NG protocol. Micro blocks (circles) are signed with the private key matching with the public key in the last key block (squares). Fee is distributed 40% to the current leader and 60% to the next one.