rust-ceramic icon indicating copy to clipboard operation
rust-ceramic copied to clipboard

fix: recon protocol hang with large diffs

Open nathanielc opened this issue 9 months ago • 0 comments

If two nodes each had 2K+ events that the other node did not have it was possible for the protocol to deadlock as both nodes tried to write those events without read the values from the other node.

The fix was accomplished by splitting the protocol into two loops, a read loop and a write loop. They communicate with each other using message passing. The code now has both a clean separation of concerns as well as the behavior that we concurrently read and write from the network so we do not enter a state where we are exclusively writing to the network.

nathanielc avatar May 16 '24 15:05 nathanielc