in

Why do altcoins have poor sync performance

Having worked on several altcoin projects I can say one thing they all have in common is poor sync performance. Perhaps they were forked from Bitcoin before headers first sync was added, perhaps their code has been so hacked about that it’s just too buggy. I often see obvious sync performance issues swept under the carpet with “just use the bootstrap”. Today I wish to present a visualization tool called syncmon and a case study.

[https://github.com/project-ecc/syncmon](https://github.com/project-ecc/syncmon)

syncmon is very simple in concept, but very useful in application. It calls getinfo at minute intervals, writing time, connection count, header count and block count to a csv file which can be imported into your favorite spreadsheet or charting tool. This results in a chart showing the progress of header and block sync. Here is an example of a bugged sync process I worked on recently:

​

[Bugged sync – header slowdown](https://preview.redd.it/iekyo859xjs61.png?width=974&format=png&auto=webp&s=bdb0e5c3f51bbeb45caebf8dede254ff353d2939)

This sync was done with a single peer for clarity (using -connect command line option). What you can see happening here is that the headers sync is progressively slowing down until a node disconnect/reconnect forces the re-initialization of internal state data with the sync resuming at full speed, only to progressively slow again. Armed with this insight the dev team were able to determine that the syncing node was requesting progressively more redundant headers from its peer resulting in duplicate processing of headers already received. With this bug resolved, the sync time was reduced from 14 hours to 6 hours:

​

[Fixed sync](https://preview.redd.it/p9p2kmvqyjs61.png?width=852&format=png&auto=webp&s=96bf940ea577705b8ed1414f5e777194d257bf6b)

So the moral of the story is – collect stats and chart them. The shape of lines can tell you a lot more about what’s going on, and better inform bug resolution. Next time someone tells you to “just use the bootstrap”, you know what to do …



View Reddit by henryyoung42View Source

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

GIPHY App Key not set. Please check settings

8 Comments

  1. pretty sure it just speaks to the lack of attention paid by altcoins in general to some of the root problems facing crypto today. Data availability and syncing in a distributed network is a known challenge to scaling but most projects are just vaporware so not many are even discussing the problem. DOT, ETH 2.0 and ZNN are addressing it but its still early.

Loading…

0

What do you think?

Mike Novogratz: A Digital Dollar Is Necessary

Mike Novogratz: A Digital Dollar Is Necessary

Ripple (XRP)

Ripple (XRP) Consolidates Gains, Why Rally Isn’t Over Yet