bnb-chain / bsc

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

I am tired of this #601

Closed adamiss5138 closed 2 years ago

adamiss5138 commented 2 years ago

A month ago I've pruned my node because my server was low on storage. At that time, I was using Hetzner AX51-NVME with Ryzen 7 3700X, 64GB RAM and 1TB NVMe which worked just fine, until I stopped it. Since then it never synced again. So I followed some "smart" recommendations to use snapshot. As the server had only 1TB of storage, I needed to upgrade to AX61-NVME which has Ryzen 9 3900, 128GB RAM and 1.92 TB NVMe. I've followed the snapshot instructions, downloaded it, replaced the data, started the node, and guess what. Here I am 3 days later stuck in the same fckin state, where the node imports billions of states without ever stopping. To be honest, I am sick of this. And please, don't tell me I need better hardware. That's complete bullshit. I could've run half of my country's internet from that server. Does anyone know the exact procedure to get a new node 100% synced? If not, devs should really think about it, as this is the start of the end of this network.

psdlt commented 2 years ago

@adamiss5138 Hetzner AX61 is perfectly fine. The only think I could suggest is get 2x2Tb (or better yet - 4x2Tb) disks and put them into RAID0 configuration. Then just follow the standard snapshot procedure - download and untar, move to correct location, start your node as you would normally do, wait for 24-48 hours. I currently run 2 separate AX61 instances without any issues πŸ‘Œ

chenka commented 2 years ago

Me too, I'm using AX61 and AX101, tired of sync problem. I had synced well then changed to not synced over and over again

by-nari commented 2 years ago

I'm tired too

lvl=eror msg="\n########## BAD BLOCK #########\nChain config: {ChainID: 56 Homestead: 0 DAO: <nil> DAOSupport: false EIP150: 0 EIP155: 0 EIP158: 0 Byzantium: 0 Constantinople: 0 Petersburg: 0 Istanbul: 0, Muir Glacier: 0, Ramanujan: 0, Niels: 0, MirrorSync: 5184000, Bruno: 13082000, Berlin: <nil>, YOLO v3: <nil>, Engine: parlia}

I tried 2 snapshots on the 19th and 26th, reinstalled but still got this error after syncing for a while. I have tried using --snapshot=false --syncmode=fast and debug.setHead with no success.

chenka commented 2 years ago

@adamiss5138 Hetzner AX61 is perfectly fine. The only think I could suggest is get 2x2Tb (or better yet - 4x2Tb) disks and put them into RAID0 configuration. Then just follow the standard snapshot procedure - download and untar, move to correct location, start your node as you would normally do, wait for 24-48 hours. I currently run 2 separate AX61 instances without any issues πŸ‘Œ

Could you share command to run node with snapshot?

unclezoro commented 2 years ago

where the node imports billions of states without ever stopping if you are using the downloaded snapshot, it wont import any states, your node seems doing snap sync. The possible reason is placing the snapshot directory in wrong location. @adamiss5138

adamiss5138 commented 2 years ago

where the node imports billions of states without ever stopping if you are using the downloaded snapshot, it wont import any states, your node seems doing snap sync. The possible reason is placing the snapshot directory in wrong location. @adamiss5138

Yeah, maybe. I'll try one more time.

psdlt commented 2 years ago

Could you share command to run node with snapshot?

https://docs.binance.org/smart-chain/developer/fullnode.html https://github.com/binance-chain/bsc-snapshots geth --config config.toml --datadir /YOUR_DATA_DIR --cache INSERT_CACHE_SIZE_HERE --diffsync

uniftyitadmin commented 2 years ago

I running node on Hetzner's AX101 (container with 3 TB of space, 48GB RAM and 12 cores) ,just started the node (using 26112021 snapshot). I am behind about two days,which is normal since snapshot is 2 days old but i am more afraid of time that is needed to import new chain segments etc. Here is a part of log data that shows the problem.

t=2021-11-28T15:10:34+0000 lvl=info msg="Imported new chain segment" blocks=1 txs=746 mgas=98.843 elapsed=10.080s mgasps=9.805 number=12,964,245 hash=0xb634e2106147600abbf32d4cfa3f0c6fb5b960971321173e2352fb9810929509 age=2d8h5m dirty="602.35 MiB"

Elapsed time is in seconds,that's too slow. Does anyone have similar problem?

psdlt commented 2 years ago

@uniftyitadmin normally that would be too slow. it's easier to track mgasps value. you would need to have it around at least 70-80 to have hope of catching up to latest block. BUT. are your logs also showing "unindexing transactions"? i've noticed that when syncing from snapshot, unindexing happens at the same time and it kills sync performance. once unindexing is done - mgasps goes back to normal.

uniftyitadmin commented 2 years ago

No,not having such massages, just having "Imported new chain segment" and "Deep froze chain segment" after every few new chain segment logs.

Like this: t=2021-11-28T15:25:10+0000 lvl=info msg="Deep froze chain segment" blocks=10 elapsed=20.310ms number=12,874,356 hash=0xa97245e49bae999ddf69a51bf56cbe75abec2072caefb636efaa634520f592c8

t=2021-11-28T15:25:24+0000 lvl=info msg="Imported new chain segment" blocks=2 txs=1578 mgas=195.031 elapsed=15.150s mgasps=12.873 number=12,964,358 hash=0x5362819f9ed255bf226bedece37b1f6cd4e61c60b7dd1aed5474b85921557d42 age=2d8h13m dirty="1.39 GiB"

t=2021-11-28T15:25:39+0000 lvl=info msg="Imported new chain segment" blocks=3 txs=1515 mgas=195.077 elapsed=15.249s mgasps=12.792 number=12,964,361 hash=0xc81e905e53f42ab95a5e83d36481d9c7e06fa1988260668e7530307fc3e7380b age=2d8h13m dirty="1.39 GiB"

t=2021-11-28T15:25:48+0000 lvl=info msg="Imported new chain segment" blocks=1 txs=760 mgas=97.211 elapsed=8.148s mgasps=11.930 number=12,964,362 hash=0x806c4264f8036eed337b95570d6e0f9ae607b2bf6225ba478a3058760b7376b9 age=2d8h13m dirty="1.40 GiB"

t=2021-11-28T15:26:02+0000 lvl=info msg="Imported new chain segment" blocks=2 txs=1643 mgas=194.999 elapsed=14.339s mgasps=13.598 number=12,964,364 hash=0x9d04d6ac21c3b16ed074cfdae9cb2eadc19cb2a324ecfd771b2686a6e099a869 age=2d8h13m dirty="1.41 GiB"

t=2021-11-28T15:26:10+0000 lvl=info msg="Deep froze chain segment" blocks=10 elapsed=38.273ms number=12,874,366 hash=0xbc41652a3b3febf9257625d03dc9ea917fc62a8f1a7ae17dfca1352240037c79

t=2021-11-28T15:26:16+0000 lvl=info msg="Imported new chain segment" blocks=3 txs=1360 mgas=194.390 elapsed=13.929s mgasps=13.955 number=12,964,367 hash=0xc823af72956d11a4cfd18490f809437ad47ab4df4349af8b8c5715e740913415 age=2d8h13m dirty="1.41 GiB"

thehood1 commented 2 years ago

@psdlt Can you please share your config.toml file?

psdlt commented 2 years ago

@thehood1 standard config, except I have max peers at 300.

thehood1 commented 2 years ago

@thehood1 standard config, except I have max peers at 300.

I suppose that you use 1.1,5?

chenka commented 2 years ago

This week I tried node as a service such as chainstack, quicklab, moralis, and etc. All services has block delayed. It can be delayed from 5 minutes to 1 hour, rarely up to date. I think this is serious issue on BSC

psdlt commented 2 years ago

@thehood1 yes, 1.1.5

viwar000 commented 2 years ago

@thehood1 standard config, except I have max peers at 300.

I suppose that you use 1.1,5?

me too

is it ok?

k1ngJ commented 2 years ago

Same here, the spike of transactions in BSC has really make it hard even for fairly powerful machines to sync. I was using i3en.2xlarge and syncing just fine the past week, but now it's hardly able to keep up.

viwar000 commented 2 years ago

Same here, the spike of transactions in BSC has really make it hard even for fairly powerful machines to sync. I was using i3en.2xlarge and syncing just fine the past week, but now it's hardly able to keep up.

@k1ngJ, the machine is resting what's the bottle neck?

29-11-2021 08-00-44 29-11-2021 08-10-30 29-11-2021 08-12-09

jamesryan83 commented 2 years ago

This week I tried node as a service such as chainstack, quicklab, moralis, and etc. All services has block delayed. It can be delayed from 5 minutes to 1 hour, rarely up to date. I think this is serious issue on BSC

i'm using moralis and it's working well. I have a websocket running almost all day every day. It's currently 400 blocks ahead of what's showing on BSCScan. It's 10 blocks ahead of what web3's eth.getBlockNumber() returns too

BrokedTV commented 2 years ago

With 1.1.5 i got it synced in 20h with the snapshot, and it's running fine since i did that.

adamiss5138 commented 2 years ago

Snapshot helped.

uniftyitadmin commented 2 years ago

For me still slow, i am using snapshot too and msgps is high.

rezonautik commented 2 years ago

With 1.1.5 i got it synced in 20h with the snapshot, and it's running fine since i did that.

do you mind sharing your config?

viwar000 commented 2 years ago

Snapshot helped.

Is it normal condition?

Π‘Π½ΠΈΠΌΠΎΠΊ Π‘Π½ΠΈΠΌΠΎΠΊ

root@Ubuntu-2004-focal-64-minimal /home # cat startNodeBSC.sh

!/bin/sh

echo "Starting BSC Full Node Service: $(date)" /home/bsc/build/bin/geth --pprof --snapshot=false --syncmode fast --diffsync --config /home/bsc/config.toml --datadir /mainnet --cache 48000 \ --rpc.allow-unprotected-txs --txlookuplimit 0 --txpool.reannouncetime 5m

config.toml (https://github.com/binance-chain/bsc/releases/download/v1.1.6/mainnet.zip)

viwar000 commented 2 years ago

Π‘Π½ΠΈΠΌΠΎΠΊ

viwar000 commented 2 years ago

What is wrong with that?

t=2021-11-30T12:07:15+0300 lvl=info msg="State in memory for too long, committing" time=12m57.865396041s allowance=1m40s optimum=0.008 t=2021-11-30T12:07:15+0300 lvl=info msg="Persisted trie from memory database" nodes=0 size="0.00 B" time="4.789Β΅s" gcnodes=0 gcsize="0.00 B" gctime=0s livenodes=204,581 livesize="73.65 MiB" t=2021-11-30T12:07:15+0300 lvl=info msg="Imported new chain segment" blocks=1 txs=416 mgas=64.093 elapsed=9m24.150s mgasps=0.114 number=13,036,069 hash=0x455959b93255c6a2e172d6cc3436830a15caac30ea48b3b557e99e430cf73eaf age=1d9h26m dirty="92.57 MiB" t=2021-11-30T12:20:45+0300 lvl=info msg="State in memory for too long, committing" time=9m23.835512731s allowance=1m40s optimum=0.008 t=2021-11-30T12:20:45+0300 lvl=info msg="Persisted trie from memory database" nodes=0 size="0.00 B" time="4.008Β΅s" gcnodes=0 gcsize="0.00 B" gctime=0s livenodes=233,408 livesize="84.05 MiB" t=2021-11-30T12:20:45+0300 lvl=info msg="Imported new chain segment" blocks=1 txs=582 mgas=96.570 elapsed=13m29.882s mgasps=0.119 number=13,036,070 hash=0xda31157cbda6d4cc7fa9f3ecaeabd1ddd49edbd433935468be529c8b6eb18099 age=1d9h40m dirty="105.63 MiB" t=2021-11-30T12:32:57+0300 lvl=info msg="State in memory for too long, committing" time=13m29.495858627s allowance=1m40s optimum=0.008 t=2021-11-30T12:32:57+0300 lvl=info msg="Persisted trie from memory database" nodes=0 size="0.00 B" time="4.91Β΅s" gcnodes=0 gcsize="0.00 B" gctime=0s livenodes=256,181 livesize="92.19 MiB" t=2021-11-30T12:32:58+0300 lvl=info msg="Imported new chain segment" blocks=1 txs=544 mgas=99.510 elapsed=12m12.245s mgasps=0.136 number=13,036,071 hash=0xe7c83ce47114f8ceed8741dfd1aedb2729c5c4d66dd452322aeef09a923410fd age=1d9h52m dirty="115.88 MiB"

viwar000 commented 2 years ago

Snapshot helped.

@adamiss5138 what snapshop did you use???

snapshot 2021-11-29 have been broken.

adamiss5138 commented 2 years ago

Snapshot helped.

@adamiss5138 what snapshop did you use???

snapshot 2021-11-29 have been broken.

from 27th of November i think. The one before "snapshot 2021-11-29"

0xwhatly commented 2 years ago

use snapshot 2021-11-29,bsc can't start

keefel commented 2 years ago

snapshot 2021-11-29

snapshot 2021-11-29 has been broken, snapshot 2021-11-30 is fine.

kkbao13 commented 2 years ago

I am tired too. I sync btc、geth、 tron、heco、lte、doge. successfully. but I fail sync the bsc, 2months 1T SSD.

JohnDotOwl commented 2 years ago

Snapshot helped.

Is it normal condition?

Π‘Π½ΠΈΠΌΠΎΠΊ Π‘Π½ΠΈΠΌΠΎΠΊ

root@Ubuntu-2004-focal-64-minimal /home # cat startNodeBSC.sh #!/bin/sh echo "Starting BSC Full Node Service: $(date)" /home/bsc/build/bin/geth --pprof --snapshot=false --syncmode fast --diffsync --config /home/bsc/config.toml --datadir /mainnet --cache 48000 --rpc.allow-unprotected-txs --txlookuplimit 0 --txpool.reannouncetime 5m

config.toml (https://github.com/binance-chain/bsc/releases/download/v1.1.6/mainnet.zip)

  • DisablePeerTxBroadcast = true
  • 999 peers

How do you get GETH to run properly, i can't find a guide that works

keefel commented 2 years ago

Snapshot helped.

Is it normal condition? Π‘Π½ΠΈΠΌΠΎΠΊ Π‘Π½ΠΈΠΌΠΎΠΊ root@Ubuntu-2004-focal-64-minimal /home # cat startNodeBSC.sh #!/bin/sh echo "Starting BSC Full Node Service: $(date)" /home/bsc/build/bin/geth --pprof --snapshot=false --syncmode fast --diffsync --config /home/bsc/config.toml --datadir /mainnet --cache 48000 --rpc.allow-unprotected-txs --txlookuplimit 0 --txpool.reannouncetime 5m config.toml (https://github.com/binance-chain/bsc/releases/download/v1.1.6/mainnet.zip)

  • DisablePeerTxBroadcast = true
  • 999 peers

How do you get GETH to run properly, i can't find a guide that works

Download latest binary and latest snapshot, follow the guide here https://docs.binance.org/smart-chain/developer/fullnode.html, and find some tips in #502 , pay attention to your hardware specifications, especially storage, hope you good luck.

keefel 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/YPDsUqcwR8