hyperledger-iroha / iroha

Iroha - A simple, enterprise-grade decentralized ledger
https://wiki.hyperledger.org/display/iroha
Apache License 2.0
438 stars 280 forks source link

Peer synchronization during consensus #5144

Open mversic opened 2 weeks ago

mversic commented 2 weeks ago

We've always suffered from a risk that nodes can silently diverge but this has become especially evident after #4967.

The current algorithm works like this:

  1. Leader creates a block, signs and broadcasts it to all peers without validating transactions
  2. All peers (including Leader) validate block transactions independently of each other
  3. After validating transactions, Validating peers send their signatures to ProxyTail
  4. After ProxyTail has collected enough signatures it broadcasts confirmation to all peers

We need to modify this approach so that transaction errors are agreed and synchronized between the nodes. This must be done during the consensus round. We can't include transaction error into the block hash but we can protect them with block signatures.