Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
in Blockchain by (4.1k points)

I recently deployed the fabric network using Docker-compose, I was trying to simulate a downed peer. Essentially this is what happens:

  1. 4 peers are brought online using docker-compose running a fabric network
  2. 1 peer i.e the 4th peer goes down (done via docker stop command)
  3. Invoke transactions are sent to the root peer which is verified by querying the peers after sometime (excluding the downed peer).
  4. The downed peer is brought back up with docker start. Query transaction run fine on the always on peers but fail on the newly woken up peer.

Why isn't the 4th peer synchronizing the blockchain, once its up.Is there a step to be taken to ensure it does? Or is it discarded as a rogue peer.

1 Answer

0 votes
by (14.4k points)
edited by

This might be due to the expected behavior of PBFT. As explained in issue 933,

I think what you're seeing is normal PBFT behavior: 2f+1 replicas are making progress, and f replicas are lagging slightly behind, and catch up occasionally.

If you shut down another peer, you should observe that the one you originally shut off and restarted will now participate fully, and the network will continue to make progress. As long as the network is making progress, and the participating nodes share a correct prefix, you're all good. The reason for f replicas lagging behind is that those may be acting byzantine and progress deliberately slowly. You cannot tell a difference between a slower correct replica, and a deliberately slower byzantine replica. Therefore we cannot wait for the last f stragglers. They will be left behind and sync up occasionally. If it turns out that some other replica is crashed, the network will stop making progress until one correct straggler catches up, and then the network will progress normally.

There is a lot more to learn than this. Enroll now in Blockchain Online Course to learn more.

Browse Categories