Full Sync Stall Bug Crushed!

Full sync, no stalls, no need to manually shutdown and restart the node during first sync!

Bug has been a plague to Grin for years and I fixed it!

8 Likes

2 Likes

So it will automatically re-sync the whole node from scratch in case it’s stuck? or it’s just continuing to sync the remaining un-synced data?

Anyways, great thanks for your efforts.

2 Likes

@hellogrin Good question! No, not from scratch, it keeps the progress. It just does a quick restart of the node in the background and then continues the sync.

If it starts hitting the error too much I might add a ban peer script to ban the offending peer(s) but so far it hasn’t been a problem.

Any feedback or testing you guys want to run is :100: welcome.

2 Likes

maybe @ardocrat has ability to verify the code. if i’m not mistaken, long time back he mentioned this issue came from dandelion or something.

1 Like

I added additional logging in my code that logs msg sizes and it could have been this code that revealed the “try_send disconnected” error originating from a peer that I think causes the stall during PIBD sync. The try_send error is what I programmed the node to recognize before triggering the soft-reset and it seemed to work flawlessly.

Anyone can run my modified grin node and try it for themselves. But yes, having someone like @ardocrat or @Yeastplume or @tromp review my code would be hella useful.

Technically the official grin node software is broken, has been for years cuz it stalls out during the initial sync step. Welp, my node works fine so I’d recommend using the software from my fork since it’s better than official. (No stalls, better logging, and msg header size limit increased to adjust for the actual message header size) (Imagine my shock when I revealed that the real msg header size was larger than the set maximum… derp!)

I wonder how much yall was paying the last dev(s) who left the project? I’ll take my payments in grin coin since the last dev(s) didn’t or couldn’t fix it, but I did!

IMG_4902

6 Likes

Thank you, sorry for late response, I am active on Telegram most of the time.

2 Likes