Anchoring¶
In a private blockchain, transactions are processed by a certain number of participants known in advance. Thus, there is a threat of information spoofing, because the number of participants is quite small compared to a public blockchain where anyone can join the network. When using PoS consensus algorithm in a private blockchain, the threat of overwriting that blockchain becomes real.
The anchoring mechanism was developed to increase participant confidence in the date placed in a private blockchain. Anchoring checks the data in a blockchain for invariability, which is achieved by publishing data from a private blockchain to a public one, where data spoofing is unlikely due to the larger number of participants and blocks. Published data represents a signature and a height of blocks in a private network. This connectivity between two or more networks increases their resistance, because any attempt to forge or alter data using a long-range attack would require attacking all connected networks.
How does anchoring work in the Waves Enterprise blockchain¶

Targetnet anchoring scheme¶
Anchoring process is shown below:
Anchoring configurations are set in the configuration file of the private blockchain node. Users should use recommended values for configurations to avoid anchoring malfunctioning.
Each
height-range
is an anchoring transaction that contains block data atcurrent-height - threshold
and is broadcasted to the Targetnet by the anchoring node. The Data Transaction with akey-value
list is used as an anchoring transaction. The node then requests height of the broadcasted transaction.The node then checks the Targetnet height each 30 seconds until its height reaches the height of the created transaction +
height-above
.When the required Targetnet height is reached and the presence of previously created data transactions are confirmed, another anchoring data transaction is created in the private blockchain.
Transaction structure for anchoring¶
Targetnet transaction consists of the following fields:
height
- the height of the chosen block from the private blockchain.signature
- the signature of the chosen block from the private blockchain.
The private blockchain transaction consists of the following fields:
height
- the height of the chosen block from the private blockchain.signature
- the signature of the chosen block from the private blockchain.targetnet-tx-id
- the Targetnet anchoring transaction ID.targetnet-tx-timestamp
- the timestamp of the Targetnet anchoring transaction.
Errors during the anchoring¶
Errors can occur at any step during anchoring. In case of any error in the private blockchain the Data Transaction containing the error code and the description is always published. The error transaction includes the following data:
height
- the height of the chosen block from the private blockchain.signature
- the signature of the chosen block from the private blockchain.error-code
- the error code.error-message
- the error message.
Code |
Message |
Possible cause |
---|---|---|
0 |
|
An unknown error occurred during the send of the transaction to the Targetnet |
1 |
|
Creating of the transaction to be sent to the Targetnet failed |
2 |
|
The transaction publication to the Targetnet failed (it could be |
3 |
|
The Targetnet has returned an HTTP code other than 200 after the |
4 |
|
The Targetnet has returned an unknown JSON after |
5 |
|
The Targetnet has returned mismatched ID after |
6 |
|
The Targetnet has not responded to the request about the transaction info |
7 |
|
Failed to get current Targetnet height |
8 |
|
The anchoring transaction has disappeared from the Targetnet after |
9 |
|
Fail to public the anchoring transaction in the private blockchain |
10 |
|
Anchored transaction in sidechain was changed during Targetnet height |