Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Synchronization starts from the genesis block, not from the snapshot #90

Closed
mb-gvidon opened this issue Dec 23, 2021 · 1 comment
Closed

Comments

@mb-gvidon
Copy link

mb-gvidon commented Dec 23, 2021

Hi everyone!

I'm trying to run a full node from snapshot, but it seems that synchronization starts from the genesis block, not from the snapshot. I've already tried several guides including

The official one simply doesn't work at all.

The second option (aka this comment) is more reasonable. It actually started the synchronization (thanks to @updatesvc), but I suppose the sync has started from the genesis. If I attach the node via ./geth_linux attach --datadir ./mainnet I see the following (after 3 days of synchronization):

> eth.syncing
{
  currentBlock: 7092885,
  highestBlock: 13735935,
  knownStates: 0,
  pulledStates: 0,
  startingBlock: 0
}

The value of currentBlock is increasing with with the speed 10 blocks/sec. At the beginning (currentBlock < 1000000) it was 5000 blocks/sec.

The list of my commands after downloading geth_linux of version 1.1.7, unpacking mainnet.zip and the snapshot:

./geth_linux --datadir mainnet init genesis.json
mv server/data-seed/geth/chaindata mainnet/geth/chaindata
mv server/data-seed/geth/triecache mainnet/geth/triecache
./geth_linux --config ./config.toml --datadir ./mainnet --cache 100000 --rpc.allow-unprotected-txs --txlookuplimit 0 --http --maxpeers 100 --ws --syncmode=full --snapshot=false --diffsync

Hardware specs

  • 4nvme raid0
  • 256 Gb RAM
  • Ryzen Threadripper 3990 64 cores

Static IP and ports are opened without firewalls and so on.

Could anyone please help with the command that starts the node exactly from the snapshot? Does it exist actually?

@mb-gvidon
Copy link
Author

mb-gvidon commented Dec 24, 2021

Issue was solved.

I have copied the whole geth folder and the sync has started from the snapshot.

Finally, the following list of commands worked for me

mkdir mainnet
cp -R /server/data-seed/geth/ mainnet/geth/
unzip mainnet.zip
./geth_linux --config ./config.toml --datadir ./mainnet --cache 100000 --rpc.allow-unprotected-txs --txlookuplimit 0 --http --maxpeers 100 --ws --syncmode=full --snapshot=false --diffsync

The synchronization started from the snapshot.

Attaching to the node via ./geth_linux attach --datadir ./mainnet has the following results

> eth.syncing
{
  currentBlock: 13523532,
  highestBlock: 13615014,
  knownStates: 297473485,
  pulledStates: 297473485,
  startingBlock: 13523459
}

It took 40 hours for full sync.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant