Sync chain from scratch using only 1 server as source
sammy007 opened this issue · 5 comments
I heard sync from scratch can take several months as Bor decided to go the centralization way and abandoned snapshots program. I want to use path based scheme which requires full resync, but I do not have months of time. I got a full node on old scheme and 2nd server next to the first one on the same LAN which I would like to sync from scratch. Is there a trick to set up Bor so it can quickly perform a sync from a fully synced node without connecting to other slow peers?
Hi @sammy007 we'll release PBSS soon. What exactly are you trying to achieve? Can you elaborate a bit more on your setup?
Hi @sammy007 we'll release PBSS soon. What exactly are you trying to achieve? Can you elaborate a bit more on your setup?
I am trying to get PBSS full node, as normal sync can take months (I heard) I wonder if there is a lifehack like connecting existing full node fully synced to a fresh node with PBSS config on and sync from it much faster.
PBSS could be enabled by setting flag state.scheme
to path
. However, please use it with caution because we are still testing it. Currently, bor is using 1.13.6
from geth, and there were a few issues related to PBSS. Majority of the issues will be resolved after another upstream merge from 1.14.0
.
Hi @sammy007 we'll release PBSS soon. What exactly are you trying to achieve? Can you elaborate a bit more on your setup?
I am trying to get PBSS full node, as normal sync can take months (I heard) I wonder if there is a lifehack like connecting existing full node fully synced to a fresh node with PBSS config on and sync from it much faster.
P2P lib has a lot of option to allow connection for only whitelisted nodes, I will start the sync without any setting and once it finish the bootstrap (first few hundred block) just block all other IP than your trusted node.
My experience with syncing nodes and blockchain, that real slowdown is that validating the state and sync is very much "single" threaded job, you cannot validate a Tx until the previous Tx is validated same for blocks you can download 200 block in a batch, then you have to validate them 1 by 1.
I would say, having localhost 0 latency a source node, will give you 10% advantage at top, my 2 censt for really skyrocket PBSS testing is having a CPU with the highest single-core performance + some crazy fast NVME SSD.