bnb-chain / bsc-snapshots

254 stars 88 forks source link

erigon error #370

Closed testbugsec2022 closed 2 months ago

testbugsec2022 commented 3 months ago

root@bscnode:/data/erigon# ./erigon --txpool.disable --metrics.addr=0.0.0.0 --log.console.verbosity=dbug --db.pagesize=16k --datadir=/data/bscdata/ --private.api.addr=localhost:9090 --chain=bsc --metrics --log.dir.path=bsclog.log INFO[07-05|04:56:09.361] logging to file system log dir=bsclog.log file prefix=erigon log level=info json=false INFO[07-05|04:56:09.362] Enabling metrics export to prometheus path=http://0.0.0.0:6060/debug/metrics/prometheus INFO[07-05|04:56:09.363] Build info git_branch= git_tag= git_commit= INFO[07-05|04:56:09.363] Starting Erigon on BSC mainnet... INFO[07-05|04:56:09.368] Maximum peer count ETH=100 total=100 INFO[07-05|04:56:09.369] starting HTTP APIs port=8545 APIs=eth,erigon,engine INFO[07-05|04:56:09.370] torrent verbosity level=WRN INFO[07-05|04:56:11.377] Set global gas cap cap=50000000 INFO[07-05|04:56:11.390] [Downloader] Running with ipv6-enabled=true ipv4-enabled=true download.rate=16mb upload.rate=4mb INFO[07-05|04:56:11.391] Opening Database label=chaindata path=/data/bscdata/chaindata SIGBUS: bus error PC=0x40e9dc m=11 sigcode=2 signal arrived during cgo execution

goroutine 1 [syscall]: runtime.cgocall(0x24ae8a0, 0xc00269b768) /usr/local/go/src/runtime/cgocall.go:157 +0x4b fp=0xc00269b740 sp=0xc00269b708 pc=0x42642b github.com/erigontech/mdbx-go/mdbx._Cfunc_mdbx_env_open(0x7f7100000b60, 0x7f7100000ee0, 0x2a00000, 0x1b4) _cgo_gotypes.go:770 +0x4b fp=0xc00269b768 sp=0xc00269b740 pc=0x93096b github.com/erigontech/mdbx-go/mdbx.(*Env).Open.func2(0xc002180690?, 0x17?, 0x2800000, 0x6000?)

STdevK commented 3 months ago

Please share which Erigon snapshot was used for sync

testbugsec2022 commented 3 months ago

Please share which Erigon snapshot was used for sync

0520

STdevK commented 2 months ago

Kindly use the latest Erigon snapshot for sync

testbugsec2022 commented 2 months ago

root@bscnode:~# python3 check_blocknumber.py Current Block Number: 38874990 root@bscnode:~# python3 check check_block_number.py check_sync.py
root@bscnode:~# python3 check_sync.py Node is fully synced.

Why not the latest block? There is no error in the log.

testbugsec2022 commented 2 months ago

[INFO] [07-08|13:31:44.637] [mem] memory stats Rss=737.7MB Size=0B Pss=737.7MB SharedClean=4.0KB SharedDirty=0B PrivateClean=178.1MB PrivateDirty=559.6MB Referenced=645.1MB Anonymous=559.6MB Swap=0B alloc=499.6MB sys=580.8MB [INFO] [07-08|13:32:02.443] [1/15 Snapshots] Waiting for torrents metadata: 0/261 [INFO] [07-08|13:32:02.443] [1/15 Snapshots] download progress="0.00% 0B/0B" time-left=999hrs:99m total-time=8h50m40s download=0B/s upload=0B/s peers=0 files=261 metadata=0/261 connections=0 alloc=334.6MB sys=580.8MB [INFO] [07-08|13:32:04.378] [snapshots] no metadata yet files=261 list=v1-036000-036500-transactions.seg,v1-029000-029500-transactions.seg,v1-010500-011000-headers.seg,v1-038100-038200-bodies.seg,v1-009000-009500-headers.seg,... [INFO] [07-08|13:32:22.442] [1/15 Snapshots] Waiting for torrents metadata: 0/261 [INFO] [07-08|13:32:22.443] [1/15 Snapshots] download progress="0.00% 0B/0B" time-left=999hrs:99m total-time=8h51m0s download=0B/s upload=0B/s peers=0 files=261 metadata=0/261 connections=0 alloc=372.3MB sys=580.8MB [INFO] [07-08|13:32:24.378] [snapshots] no metadata yet files=261 list=v1-022500-023000-headers.seg,v1-000500-001000-bodies.seg,v1-005500-006000-transactions.seg,v1-022000-022500-bodies.seg,v1-036500-037000-transactions.seg,...

testbugsec2022 commented 2 months ago

[DBUG] [07-09|07:21:47.596] [p2p] Dial scheduler protocol=68 peers=33/33 tried=2313 static=6 connect: connection refused=341 i/o timeout=173 [DBUG] [07-09|07:21:47.597] [p2p] Server protocol=68 peers=33 trusted=0 inbound=0 useless peer=1 too many peers=138 EOF=197 closed by remote=904 i/o timeout=19 [INFO] [07-09|07:21:56.772] [1/15 Snapshots] Waiting for torrents metadata: 0/261 [INFO] [07-09|07:21:56.772] [1/15 Snapshots] download progress="0.00% 0B/0B" time-left=999hrs:99m total-time=1h44m0s download=0B/s upload=0B/s peers=0 files=261 metadata=0/261 connections=0 alloc=203.8MB sys=260.6MB [DBUG] [07-09|07:22:02.345] AnchorTree add anchor anchor.blockHeight=40316007 success=false [DBUG] [07-09|07:22:06.159] [snapshots] info len=261 webTransfers=0 torrent=0 db=0 t-complete=0 webseed-trips=0 webseed-discards=0 webseed-fails=0 webseed-bytes=0B localHashes=0 localHashTime=0s [INFO] [07-09|07:22:06.159] [snapshots] no metadata yet files=261 list=v1-020500-021000-transactions.seg,v1-029000-029500-headers.seg,v1-001500-002000-bodies.seg,v1-001500-002000-headers.seg,v1-007000-007500-transactions.seg,... [DBUG] [07-09|07:22:12.199] AnchorTree add anchor anchor.blockHeight=40316010 success=false [INFO] [07-09|07:22:16.771] [1/15 Snapshots] Waiting for torrents metadata: 0/261 [INFO] [07-09|07:22:16.771] [1/15 Snapshots] download progress="0.00% 0B/0B" time-left=999hrs:99m total-time=1h44m20s download=0B/s upload=0B/s peers=0 files=261 metadata=0/261 connections=0 alloc=124.3MB sys=260.6MB

testbugsec2022 commented 2 months ago

What is the reason for being out of sync?

STdevK commented 2 months ago

The known Issue with an Erigon client is that it does not really keep up with the latest blocks as mentioned in the Github. If you want to keep up with the latest blocks it is suggested to run a BSC archive node with high performance disk such as NVME, or run a BSC full node with a Geth client at the same time which means you need one proxy that will ask Erigon if it has the block height and if not forward it to the Geth client.

https://docs.bnbchain.org/bnb-smart-chain/developers/node_operators/archive_node/?h=erigon#run-with-an-erigon-client