Why does syncing blocks for new nodes take that long? how to solve this problem? #120
kevingzhang
announced in
Announcements
Replies: 1 comment
-
in epoch9, we will use the new algorithm to speed up at least 5X. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
For a new node join the TEA network, it may take more than 12 hours to sync to the latest block and start mining.
This is not new to the blockchain world. Every blockchain may have such a problem. That is because the blockchain needs to deal with Byzantine fault. The new node has to verify all the blocks from any other nodes assuming they are not trustable. Verifying every block from the genesis block (the first block) takes time. Especially when there is a lot of business logic in the blockchain, the syncing process needs to redo every calculation that other nodes did since the first block. No doubt, it is time-consuming.
We have two solutions, one for long term, one for short term.
The long term solution would be our ultimate solution to migrate most complex logic from layer one to layer two. Layer two doesn't require validate all state from the time zero. The trust is built on top of layer one. So when syncing the layer 2 state, a new node only needs to sync the most recent state and catch up with the new transactions from then on. This may takes just few seconds. Give only very few logic remaining in layer one, syncing layer one would be significant quicker than it is today.
The short term solution would be upgrade some existing business logic by reducing the event frequency. For example, we change TApp tipping interval from 100 blocks to 1000 blocks. This will reduce the calculation by 10 times.
We actually have upgrade the epoch7.1 testnet. We can see it takes effect. But there is no way to reduce the historical blocks, syncing new nodes still take very long.
We are thinking to reset the testnet. so the new epoch would be epoch 8. The upgrade may happen on Friday night PST as we completed a new competition week.
For those who has assets in epoch7.1, we will take a snapshot and issue the exact assets to the owner when epoch 8 starts.
The rules are:
Sending new CML coupon may take some time, so you will receive them gradually after epoch8 starts, not the first few minutes.
All the number we take will be in the snapshot right at the time when we stop the epoch7.1.
When we confirmed the time, we will announce at telegram channel and discussion board. Also on the wallet home page. You surely can see when you start the wallet any time during the week.
If you have any question or suggestion please leave your comments
Beta Was this translation helpful? Give feedback.
All reactions