bsc icon indicating copy to clipboard operation
bsc copied to clipboard

BSC node can't sync the new block

Open 1b1og-com opened this issue 5 years ago • 49 comments

eth.syncing { currentBlock: 6784288, highestBlock: 6784407, knownStates: 133873248, pulledStates: 133865063, startingBlock: 6783739 } eth.blockNumber 0

1b1og-com avatar Apr 22 '21 10:04 1b1og-com

this is bsc log t=2021-04-22T18:12:33+0800 lvl=info msg="Imported new block headers" count=1 elapsed=452.972µs number=6784423 hash=0xbeb0d038cbf21c40545999bba37a546bd120e9291e3252abc1597c29c7e557a0 t=2021-04-22T18:12:33+0800 lvl=info msg="Imported new state entries" count=993 elapsed=2.396ms processed=133910127 pending=40211 retry=70 duplicate=39 unexpected=4366 t=2021-04-22T18:12:34+0800 lvl=info msg="Imported new state entries" count=1166 elapsed=2.437ms processed=133911293 pending=39991 retry=70 duplicate=39 unexpected=4366 t=2021-04-22T18:12:35+0800 lvl=info msg="Imported new state entries" count=1105 elapsed=2.242ms processed=133912398 pending=39910 retry=70 duplicate=39 unexpected=4366 t=2021-04-22T18:12:36+0800 lvl=info msg="Imported new state entries" count=925 elapsed=1.680ms processed=133913323 pending=40460 retry=0 duplicate=39 unexpected=4366 t=2021-04-22T18:12:36+0800 lvl=info msg="Imported new state entries" count=1092 elapsed=3.503ms processed=133914415 pending=39419 retry=58 duplicate=39 unexpected=4366 t=2021-04-22T18:12:37+0800 lvl=info msg="Imported new block headers" count=2 elapsed=971.39µs number=6784425 hash=0xcdf221668b1f3bca8af3e10166d5b40f70cea94d3f4a00f7e6202ee10c3c1652 t=2021-04-22T18:12:37+0800 lvl=info msg="Imported new state entries" count=755 elapsed=1.953ms processed=133915170 pending=39954 retry=116 duplicate=39 unexpected=4366 t=2021-04-22T18:12:38+0800 lvl=info msg="Imported new state entries" count=879 elapsed=2.513ms processed=133916049 pending=39505 retry=151 duplicate=39 unexpected=4366 t=2021-04-22T18:12:39+0800 lvl=info msg="Imported new state entries" count=680 elapsed=1.575ms processed=133916729 pending=39828 retry=4 duplicate=39 unexpected=4366 t=2021-04-22T18:12:40+0800 lvl=info msg="Imported new block headers" count=1 elapsed=428.76µs number=6784426 hash=0x8366967d5af37c03353176e3710189027894394311bc6403853166561dfd756e t=2021-04-22T18:12:40+0800 lvl=info msg="Imported new block headers" count=1 elapsed=391.428µs number=6784427 hash=0x58557834404c684ef692e4f1f589c2bdb963cb94a04d83438d43bad77e8c69a6 t=2021-04-22T18:12:40+0800 lvl=info msg="Imported new state entries" count=809 elapsed=1.288ms processed=133917538 pending=41141 retry=156 duplicate=39 unexpected=4366 t=2021-04-22T18:12:41+0800 lvl=info msg="Imported new state entries" count=387 elapsed=627.89µs processed=133917925 pending=42649 retry=1 duplicate=39 unexpected=4366 t=2021-04-22T18:12:44+0800 lvl=info msg="Imported new state entries" count=1441 elapsed=3.990ms processed=133919366 pending=41706 retry=3 duplicate=39 unexpected=4366 t=2021-04-22T18:12:44+0800 lvl=info msg="Imported new block headers" count=1 elapsed=433.053µs number=6784428 hash=0xb3911273b4edf945935fb0ea0210b707a8a4a5612e6d56cdbb0334e2cdf19f94 t=2021-04-22T18:12:44+0800 lvl=info msg="Imported new state entries" count=1019 elapsed=2.815ms processed=133920385 pending=41334 retry=10 duplicate=39 unexpected=4366 t=2021-04-22T18:12:45+0800 lvl=info msg="Imported new state entries" count=836 elapsed=3.937ms processed=133921221 pending=41848 retry=0 duplicate=39 unexpected=4366 t=2021-04-22T18:12:46+0800 lvl=info msg="Imported new state entries" count=1100 elapsed=3.169ms processed=133922321 pending=40889 retry=51 duplicate=39 unexpected=4366

1b1og-com avatar Apr 22 '21 10:04 1b1og-com

You gotta wait, it's still syncing. You're like halfway there.

psdlt avatar Apr 23 '21 04:04 psdlt

You gotta wait, it's still syncing. You're like halfway there.

@psdlt It's been 100 blocks away for a week what can i do?

1b1og-com avatar Apr 23 '21 07:04 1b1og-com

@1b1og-com yea, sorry, i saw processed=133... and though you just started syncing, as currently there are ~200M state entries. I have similar issue, my geth client seems to always stay behind by ~3 minutes and after some time it just stops doing anything. Don't have a solution, sorry.

psdlt avatar Apr 23 '21 07:04 psdlt

@psdlt similar issue here. I've to restart the geth, mostly, the height start grew again. I've tried and verified that, If you didn't expose the p2p port to internet, it seems happen more frequently. Appears like the status of the bsc peer network isn't good enough.

issaxyz avatar Apr 25 '21 02:04 issaxyz

@psdlt similar issue here. I've to restart the geth, mostly, the height start grew again. I've tried and verified that, If you didn't expose the p2p port to internet, it seems happen more frequently. Appears like the status of the bsc peer network isn't good enough.

@issaxyz can you help me? what's step? why i can't sync the new bsc block and eth_blocknumber is 0

1b1og-com avatar Apr 25 '21 06:04 1b1og-com

@issaxyz yea, after several restarts my geth caught up with the network and was stable for the past couple days.

psdlt avatar Apr 25 '21 07:04 psdlt

@1b1og-com 2 days ago state count was ~237M:

t=2021-04-23T03:31:29+0000 lvl=info msg="Imported new state entries"            count=583  elapsed=2.336ms   processed=237263917 pending=803    retry=0    duplicate=9535 unexpected=134561
t=2021-04-23T03:31:30+0000 lvl=info msg="Imported new state entries"            count=479  elapsed=4.725ms   processed=237264396 pending=0      retry=0    duplicate=9535 unexpected=134561

what's your eth.syncing? what hardware are you running your geth on?

psdlt avatar Apr 25 '21 07:04 psdlt

look

@1b1og-com 2 days ago state count was ~237M:

t=2021-04-23T03:31:29+0000 lvl=info msg="Imported new state entries"            count=583  elapsed=2.336ms   processed=237263917 pending=803    retry=0    duplicate=9535 unexpected=134561
t=2021-04-23T03:31:30+0000 lvl=info msg="Imported new state entries"            count=479  elapsed=4.725ms   processed=237264396 pending=0      retry=0    duplicate=9535 unexpected=134561

what's your eth.syncing? what hardware are you running your geth on?

look this

│> eth.syncing
{
  currentBlock: 6866290,
  highestBlock: 6866355,
  knownStates: 217406692,
  pulledStates: 217396756,
  startingBlock: 6866217
}

./geth --datadir datadir --config config.toml --pprofaddr 0.0.0.0 --metrics --pprof --syncmode=fast --gcmode=archive --nousb

t=2021-04-25T15:20:29+0800 lvl=info msg="Imported new block headers"          count=1    elapsed=447.321µs number=6866450 hash=0x2214b0c5930798adc2577302d9002d7d3692553664e65832ce4998e03e7bb64a
t=2021-04-25T15:20:29+0800 lvl=info msg="Imported new state entries"          count=458  elapsed=1.428ms   processed=217476371 pending=9296  retry=0   duplicate=4 unexpected=401
t=2021-04-25T15:20:32+0800 lvl=info msg="Imported new state entries"          count=872  elapsed=5.287ms   processed=217477243 pending=9503  retry=192 duplicate=4 unexpected=401
t=2021-04-25T15:20:32+0800 lvl=info msg="Initializing fast sync bloom"        items=167227635 errorrate=0.000 elapsed=8m48.882s
t=2021-04-25T15:20:34+0800 lvl=info msg="Imported new state entries"          count=384  elapsed=1.217ms   processed=217477627 pending=10006 retry=2   duplicate=4 unexpected=401
t=2021-04-25T15:20:35+0800 lvl=info msg="Imported new block headers"          count=2    elapsed=1.113ms   number=6866452 hash=0x512d517089560370921302462ce8f6d2bb25a55fcb26ad25988a5dfbbe1bae7f
t=2021-04-25T15:20:37+0800 lvl=info msg="Imported new state entries"          count=384  elapsed=977.518µs processed=217478011 pending=10655 retry=0   duplicate=4 unexpected=401
t=2021-04-25T15:20:39+0800 lvl=info msg="Imported new block headers"          count=1    elapsed=533.907µs number=6866453 hash=0x552d81e7a8be9f63178ed40f5eeb1153dc6a35ef8562c2bd17ea39e191f5ccf5
t=2021-04-25T15:20:40+0800 lvl=info msg="Initializing fast sync bloom"        items=174298789 errorrate=0.000 elapsed=8m56.882s
t=2021-04-25T15:20:41+0800 lvl=info msg="Imported new state entries"          count=1153 elapsed=6.086ms   processed=217479164 pending=10466 retry=0   duplicate=4 unexpected=401
t=2021-04-25T15:20:42+0800 lvl=info msg="Imported new block headers"          count=1    elapsed=544.292µs number=6866454 hash=0x4a43230945589e8fc8bb70a41bcddd80365bb726717e11cd2f84c32e8719cc6b
t=2021-04-25T15:20:43+0800 lvl=warn msg="Stalling state sync, dropping peer"  peer=9ea09b238aae926c
t=2021-04-25T15:20:44+0800 lvl=info msg="Imported new state entries"          count=826  elapsed=5.736ms   processed=217479990 pending=9967  retry=148 duplicate=4 unexpected=401
t=2021-04-25T15:20:45+0800 lvl=info msg="Imported new block headers"          count=2    elapsed=1.776ms   number=6866456 hash=0xa10d33447d5e76967a509871314e77a9028e9bc496f1a0cebef025cfa53f378c
t=2021-04-25T15:20:46+0800 lvl=info msg="Imported new state entries"          count=844  elapsed=5.412ms   processed=217480834 pending=9575  retry=0   duplicate=4 unexpected=401
t=2021-04-25T15:20:48+0800 lvl=info msg="Initializing fast sync bloom"        items=181431418 errorrate=0.000 elapsed=9m4.882s
t=2021-04-25T15:20:49+0800 lvl=info msg="Imported new state entries"          count=781  elapsed=26.961ms  processed=217481615 pending=9726  retry=2   duplicate=4 unexpected=401
t=2021-04-25T15:20:52+0800 lvl=info msg="Imported new block headers"          count=2    elapsed=1.495ms   number=6866458 hash=0xff8d73818481cae5ca518412aac052a8a4263ed301d4f83da994a2077749a5ad
t=2021-04-25T15:20:52+0800 lvl=info msg="Imported new state entries"          count=1157 elapsed=6.677ms   processed=217482772 pending=9238  retry=2   duplicate=4 unexpected=401
t=2021-04-25T15:20:54+0800 lvl=info msg="Imported new state entries"          count=386  elapsed=3.035ms   processed=217483158 pending=9041  retry=0   duplicate=4 unexpected=401
t=2021-04-25T15:20:55+0800 lvl=info msg="Imported new block headers"          count=1    elapsed=774.99µs  number=6866459 hash=0xe6a3f12549105f78d73524ccf2059b79062c020802b489a85de594c042a7a997
t=2021-04-25T15:20:56+0800 lvl=info msg="Initializing fast sync bloom"        items=188511532 errorrate=0.000 elapsed=9m12.882s
t=2021-04-25T15:20:57+0800 lvl=info msg="Imported new state entries"          count=769  elapsed=5.908ms   processed=217483927 pending=8860  retry=2   duplicate=4 unexpected=401
t=2021-04-25T15:20:58+0800 lvl=info msg="Imported new block headers"          count=1    elapsed=642.056µs number=6866460 hash=0x919a33d99e741d6c342679735aafac573a57da2a3c3baf08ee43a6c35dda9001
t=2021-04-25T15:21:00+0800 lvl=info msg="Imported new state entries"          count=770  elapsed=4.483ms   processed=217484697 pending=9136  retry=0   duplicate=4 unexpected=401
t=2021-04-25T15:21:02+0800 lvl=info msg="Imported new state entries"          count=1153 elapsed=6.790ms   processed=217485850 pending=8787  retry=2   duplicate=4 unexpected=401
t=2021-04-25T15:21:04+0800 lvl=info msg="Imported new block headers"          count=2    elapsed=825.606µs number=6866462 hash=0x60cd44c8bcb1d47e6e0c41bcec9ea100bf11d9f2e5e0bf69b4ca1c7db757bb24
t=2021-04-25T15:21:04+0800 lvl=info msg="Initializing fast sync bloom"        items=195636065 errorrate=0.000 elapsed=9m20.882s
t=2021-04-25T15:21:06+0800 lvl=info msg="Imported new state entries"          count=774  elapsed=3.902ms   processed=217486624 pending=8972  retry=3   duplicate=4 unexpected=401
t=2021-04-25T15:21:07+0800 lvl=info msg="Imported new block headers"          count=1    elapsed=515.842µs number=6866463 hash=0x5479e5857b1fc85009e52c7daa0bb8fe3e238d9ecd7e337076cec983fe72cdab
t=2021-04-25T15:21:07+0800 lvl=info msg="Imported new state entries"          count=384  elapsed=2.310ms   processed=217487008 pending=8996  retry=2   duplicate=4 unexpected=401
t=2021-04-25T15:21:10+0800 lvl=info msg="Imported new block headers"          count=1    elapsed=1.290ms   number=6866464 hash=0x6d9c42e859392da68a6cac8f65a6165597a78dbe7c910b83d83fd123e587ceb5

1b1og-com avatar Apr 25 '21 07:04 1b1og-com

@psdlt can you find problem ?

1b1og-com avatar Apr 25 '21 07:04 1b1og-com

i need used eth_blocknumber data, but return 0, It's terrible.

1b1og-com avatar Apr 25 '21 07:04 1b1og-com

@1b1og-com your geth is still syncing. Currently you're at 217M state entries; 2 days ago there were 237M, so you're behind by quite a lot. BTW, are you building an archive node? Why do you have --gcmode=archive in your options? What hardware are you running your geth on?

psdlt avatar Apr 25 '21 07:04 psdlt

@1b1og-com your geth is still syncing. Currently you're at 217M state entries; 2 days ago there were 237M, so you're behind by quite a lot. BTW, are you building an archive node? Why do you have --gcmode=archive in your options? What hardware are you running your geth on?

@psdlt I need to serve to graph-node, so I need to use --syncmode=fast --gcmode=archive But it's strange, that both Ethnet and heconet are OK

1b1og-com avatar Apr 25 '21 07:04 1b1og-com

@psdlt @issaxyz @fjl @holiman any body here?

1b1og-com avatar Apr 25 '21 08:04 1b1og-com

@huangsuyu

1b1og-com avatar Apr 25 '21 08:04 1b1og-com

I have zero affiliation with bsc, please don't @ me.

holiman avatar Apr 25 '21 08:04 holiman

my wechat is wu4yyy, Let's discuss it together @issaxyz @psdlt @fjl @HaoyangLiu

1b1og-com avatar Apr 26 '21 09:04 1b1og-com

I have similar issue as well. Always ~100 blocks behind Is there anybody have any progress so far? Is it the reason that the machine is not fast enough? But the case is I'm using the new M1 mac mini already... Stuck the syncing process for almost a week already. Should be the problem on state sync

stillnaughty avatar Apr 26 '21 11:04 stillnaughty

I haven’t had any issues at all. You definitely need good hardware. I9+/AMD equivalent, an NVME SSD, 16GB+ of memory, and 100Mb/s or faster Internet. Another thing that could help is increasing your maximum number of peers. Also, setting Syncmode=“fast” in config.toml can help a lot

heliosVII-tech avatar Apr 26 '21 14:04 heliosVII-tech

@psdlt @stillnaughty @1b1og-com

Please update your static nodes to increase connectivity

StaticNodes = ["enode://f56dcbe59ddcf52e2abe5d5f5fded28bf823e7e2fb887cebbfe3c540ed0dfbbd778872e6b0c9c6243fcb79fdf3e1805ae98a7c389091e9cc55bfe6dedfce04b8@3.115.208.145:30311","enode://b4feb14a8247917f25a4603a0a3a58827e6e3954fa1fc0499f3e084476dcb2dc32e444e7c51cecbc1066d2c94062fc16aa80da1a008c94e576b67b84a3a111c5@13.112.103.141:30311","enode://7fed0d5ebfec2d68106cf91d4bbf2c794a22f12a11c18ef643818e8b8a5022f63abccfa50cb34fd30343530f67a70523525d94247b4f8d143dca7524d2ba8630@52.194.28.137:30311","enode://64e87612bf91e145e019a2cf877891973151ba0acfe822346d5f6876feb4b031f80b6ff2334d9fccc7522d4c27f4a0003cfc29e20db25f6eb89fc72f5d058d89@99.80.96.58:30311","enode://c67e08daecbef6e78832a1fb7eef09725ee6671aeb6dd63cd880b9a2075b945df64b4a6181bf8ed31d43bd7b77587c5380d61095e6d7989e3880656b2fb9448d@54.76.80.25:30311","enode://45ad31700cfd9bce487b912d4b10d8f657a6b4a12f46a71707a351f350a28ea9183fe38f8e4cbd4371972bd6f096072fa65bcf59c0ffb719a8ef83f403b4d656@52.18.62.124:30311","enode://935d02d00d9c5ecdc3bee7a56201eb68c9a9e2fc684ff1e606d56bebcb45722b3812df2c408bd74495140b92214e4bd28a00853641e581cbc3ebbe6ee6b2f794@50.17.94.194:30311","enode://8e68f76aef70929084fbcdc527357aa97cf0091ed80639ba8e5c35933e50034c22a0c6d30775ec9bfdeef21fc029bb895ac2221b97e1595d35110a5a27589089@54.157.26.59:30311","enode://3da255f8abdeaafe3e8acd8e861314782aec365216948f203b5da5fa5457e92ac7dd7519e2e95487d99d7158a1b47e276c6a23efefbe8da423dfe090578d3bec@3.218.173.35:30311"]

chainwhisper avatar Apr 27 '21 08:04 chainwhisper