koinos / koinos-p2p

The p2p microservice orchestrates the distribution of blocks and transactions between peers.
MIT License
6 stars 4 forks source link

Forked Genesis Not Making Progress #122

Closed mvandeberg closed 3 years ago

mvandeberg commented 3 years ago

When p2p encounters two genesis forks, it cannot progress on both.

To replicate create three nodes, prod1, prod2, and seed.

On prod1 and prod2, before connecting to seed, have them each produce some blocks (small numbers are fine. In my test it was 4 and 6 blocks, respectively).

Start seed and have prod1 connect to it.

seed will sync the 4 blocks from prod1.

Finally, have prod2 connect to seed. The 6 blocks from prod2 will not sync to seed or prod1 and the 4 blocks from prod1 and seed will not sync to prod2.

Upon inspection of seed's topology cache in a debugger, all of the correct entries appeared to be there, but seed could not make progress on prod1's fork.

This appears to be a problem just at genesis, so it is probably not a high priority, but may still be worth looking in to.

theoreticalbts commented 3 years ago

May be fixed by #126.