hyperledger-iroha / iroha-dco

Iroha - A simple, decentralized ledger
http://iroha.tech
Apache License 2.0
988 stars 297 forks source link

Add Synchronization on Rejects #2210

Closed igor-egorov closed 5 years ago

igor-egorov commented 5 years ago

Signed-off-by: Igor Egorov igor@soramitsu.co.jp

Description of the Change

Synchronizer now is able to download missing blocks even when reject is happened in consensus.

Benefits

Performance of the network can be increased in some cases.

Explanation Some peers at the network can be out of sync (the peer is in round 3, when the rest in 5). Such a peer previously could sync even when a commit of 6th block happened. Now the peer can sync early and be in a synchronized state when a commit of the 6th block is happening. Thus there is a chance to do consensus step faster.

Possible Drawbacks

Still some changes has to be introduced by #2066 to the structure of SynchronizationEvent.

Usage Examples or Tests

synchronizer_test