bnb-chain / bsc

A BNB Smart Chain client based on the go-ethereum fork
GNU Lesser General Public License v3.0
2.74k stars 1.57k forks source link

Steps to sync geth node of bsc mainnet through snapshot #524

Closed lokeshratnam09 closed 1 year ago

lokeshratnam09 commented 3 years ago

Please anybody give me proper steps to how to sync geth node through snapshot with commands and every thing. because i failed to sync through genesis and fast sync command. and don't have any idea how to sync through snapshot. so please guide me. thanks for advance.

cyberskycat commented 3 years ago

this repo ,follow the guide https://github.com/binance-chain/bsc-snapshots

Marijus commented 3 years ago

this repo ,follow the guide https://github.com/binance-chain/bsc-snapshots

This references that before moving data the node should already be running. Should it be started with regular fast sync command? After data is copied into the datadir - should the node be started with sync or snap mode?

cyberskycat commented 3 years ago

this repo ,follow the guide https://github.com/binance-chain/bsc-snapshots

This references that before moving data the node should already be running. Should it be started with regular fast sync command? After data is copied into the datadir - should the node be started with sync or snap mode?

1.the node should not running before moving data 2.after perpare the data just start the geth client with fast or snap mode

  1. the snapshot data is just presyncing data,not the same meaing in the command line
lokeshratnam09 commented 3 years ago

@cyberskycat please give the proper instructions with command how to sync geth node through sync mode.

cyberskycat commented 3 years ago

i run bsc node with this command ,you shouold prepare your snapshot data in datadir(for me it's chaindata) ./geth_linux --datadir chaindata/ --config ./config.toml --http --http.addr 127.0.0.1 --http.port 8545 --http.api "eth,net,web3" --http.vhosts=* --txlookuplimit=0 --cache 10000 --diffsync --snapshot="true" --syncmode=snap

@cyberskycat please give the proper instructions with command how to sync geth node through sync mode.

berktaylan commented 3 years ago

shall we generate genesis before run it ?

Marijus commented 3 years ago

shall we generate genesis before run it ?

I was struggling with this question too.

What has worked for me is downloading the snapshot and starting node with snapshot data copied over into data dir without the genesis block

lokeshratnam09 commented 3 years ago

@cyberskycat by using above command how many days to get synced geth node and which version of geth you will take it for .??

lokeshratnam09 commented 3 years ago

@cyberskycat after download the snapshot you use that above command..??

cyberskycat commented 3 years ago

@cyberskycat after download the snapshot you use that above command..??

yes, about 1 day to sync full

nilampatel-engineer commented 2 years ago

shall we generate genesis before run it ?

I was struggling with this question too.

What has worked for me is downloading the snapshot and starting node with snapshot data copied over into data dir without the genesis block

so you mean you have not downloaded config and genesis file, not initialised the genesis.json etccc.? only ran command to download and extract snapshot worked for you?

RumeelHussainbnb commented 2 years ago

We have responded to the question and will proceed to close the case as we didn't get any additional question after 3days. Please proceed to join our Discord channel for more discussion at https://discord.com/invite/binancesmartchain