bnb-chain / op-geth

GNU Lesser General Public License v3.0
59 stars 45 forks source link

Unable to get node height #86

Closed YuXiaoCoder closed 6 months ago

YuXiaoCoder commented 6 months ago

System information

Network: mainnet

if you are running a local node, please provide the following information: op-node version: v0.3.2 op-geth version: op-geth version 0.1.0-unstable-ebb5060fv0.3.0 OS & Version: Linux

Expected behaviour

Nodes can fetch the block height and synchronise properly

Actual behaviour

The node suddenly fails to fetch the block height and stays stuck at the synchronise block step

Steps to reproduce the behaviour

op-geth

/opt/opbnbmain/core/op-geth --networkid=204 --opBNBMainnet --gcmode=full --syncmode=full --db.engine=pebble --s
tate.scheme=path --snapshot=false --datadir=/mnt/opbnbmain/node/geth --http --http.addr=0.0.0.0 --http.port=8545 --http.vhosts=* --http.corsdomain=* --http.api=admin,eth,engine,n
et,web3,personal,debug,txpool --ws --ws.addr=0.0.0.0 --ws.port=8546 --ws.origins=* --ws.api=eadmin,eth,engine,net,web3,personal,debug,txpool --authrpc.addr=127.0.0.1 --authrpc.po
rt=8551 --authrpc.jwtsecret=/mnt/opbnbmain/node/jwt.hex --authrpc.vhosts=* --rollup.sequencerhttp=https://opbnb-mainnet-rpc.bnbchain.org --maxpeers=100 --port=30303 --rpc.gascap=
0 --rpc.txfeecap=0 --txpool.globalslots=10000 --txpool.globalqueue=5000 --cache=6000 --cache.preimages --bootnodes=enr:-KO4QHs5qh_kPFcjMgqkuN9dbxXT4C5Cjad4SAheaUxveCbJQ3XdeMMDHeH
ilHyqisyYQAByfdhzyKAdUp2SvyzWeBqGAYvRDf80g2V0aMfGhHFtSjqAgmlkgnY0gmlwhDaykUmJc2VjcDI1NmsxoQJUevTL3hJwj21IT2GC6VaNqVQEsJFPtNtO-ld5QTNCfIRzbmFwwIN0Y3CCdl-DdWRwgnZf,enr:-KO4QKIByq-Y
Mjs6IL2YCNZEmlo3dKWNOy4B6sdqE3gjOrXeKdNbwZZGK_JzT1epqCFs3mujjg2vO1lrZLzLy4Rl7PyGAYvRA8bEg2V0aMfGhHFtSjqAgmlkgnY0gmlwhDbjSM6Jc2VjcDI1NmsxoQNQhJ5pqCPnTbK92gEc2F98y-u1OgZVAI1Msx-UiH
ezY4RzbmFwwIN0Y3CCdl-DdWRwgnZf

op-node

/opt/opbnbmain/core/op-node --network=opBNBMainnet --l1.trustrpc --l1=http://bsc-0.bsc.blocknodehub.com:8
545 --sequencer.l1-confs=15 --verifier.l1-confs=15 --l1.http-poll-interval=3s --l1.epoch-poll-interval=45s --l1.rpc-max-batch-size=20 --l1.rpc-max-batch-size=20 --rollup.config=/
mnt/opbnbmain/conf/rollup.json --rpc.addr=127.0.0.1 --rpc.port=9545 --rpc.enable-admin --p2p.sync.req-resp --p2p.listen.ip=0.0.0.0 --p2p.listen.tcp=13000 --p2p.listen.udp=12000 -
-p2p.bootnodes=enr:-J24QPSZMaGw3NhO6Ll25cawknKcOFLPjUnpy72HCkwqaHBKaaR9ylr-ejx20INZ69BLLj334aEqjNHKJeWhiAdVcn-GAYv28FmZgmlkgnY0gmlwhDTDWQOHb3BzdGFja4PMAQCJc2VjcDI1NmsxoQJ-_5GZKjs
7jaB4TILdgC8EwnwyL3Qip89wmjnyjvDDwoN0Y3CCIyuDdWRwgiMs,enr:-J24QA9sgVxbZ0KoJ7-1gx_szfc7Oexzz7xL2iHS7VMHGj2QQaLc_IQZmFthywENgJWXbApj7tw7BiouKDOZD4noWEWGAYppffmvgmlkgnY0gmlwhDbjSM6H
b3BzdGFja4PMAQCJc2VjcDI1NmsxoQKetGQX7sXd4u8hZr6uayTZgHRDvGm36YaryqZkgnidS4N0Y3CCIyuDdWRwgiMs --l2=http://127.0.0.1:8551 --l2.jwt-secret=/mnt/opbnbmain/node/jwt.hex --l2.engine-sy
nc --l2.skip-sync-start-check --p2p.discovery.path=/mnt/opbnbmain/node/node/discovery_db --p2p.peerstore.path=/mnt/opbnbmain/node/node/peerstore_db --p2p.priv.path=/mnt/opbnbmain
/conf/p2p_priv.txt

get height:

curl -s -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":0}' http://127.0.0.1:8545 | jq
{
  "jsonrpc": "2.0",
  "id": 0,
  "result": "0x0"
}

Backtrace

op-geth

INFO [04-16|23:28:22.232] Forkchoice requested sync to new head    number=21,527,579 hash=4208de..834fa9 finalized=unknown
INFO [04-16|23:28:23.261] Forkchoice requested sync to new head    number=21,527,580 hash=70f024..34b11b finalized=unknown
INFO [04-16|23:28:24.195] Forkchoice requested sync to new head    number=21,527,581 hash=5a6a17..a6b2f2 finalized=unknown
INFO [04-16|23:28:25.456] Forkchoice requested sync to new head    number=21,527,582 hash=845bbb..471b14 finalized=unknown
INFO [04-16|23:28:26.332] Forkchoice requested sync to new head    number=21,527,583 hash=9e2f35..1597ca finalized=unknown
INFO [04-16|23:28:26.381] Syncing: chain download in progress      synced=100.00% chain=137.67GiB headers=21,527,580@7.72GiB bodies=21,527,488@90.35GiB receipts=21,527,488@39.60GiB eta=1m30.378s
INFO [04-16|23:28:27.233] Forkchoice requested sync to new head    number=21,527,584 hash=312f3f..549607 finalized=unknown
INFO [04-16|23:28:28.425] Forkchoice requested sync to new head    number=21,527,585 hash=a60156..7e8e00 finalized=unknown
INFO [04-16|23:28:29.230] Forkchoice requested sync to new head    number=21,527,586 hash=7d5378..0b2342 finalized=unknown
INFO [04-16|23:28:30.195] Forkchoice requested sync to new head    number=21,527,587 hash=35abd0..fdc5b5 finalized=unknown
INFO [04-16|23:28:31.195] Forkchoice requested sync to new head    number=21,527,588 hash=f362d2..d0844f finalized=unknown
INFO [04-16|23:28:32.209] Forkchoice requested sync to new head    number=21,527,589 hash=721f3d..74705d finalized=unknown
INFO [04-16|23:28:33.196] Forkchoice requested sync to new head    number=21,527,590 hash=8a27fd..e63f35 finalized=unknown
INFO [04-16|23:28:34.193] Forkchoice requested sync to new head    number=21,527,591 hash=810adc..4f8445 finalized=unknown
INFO [04-16|23:28:34.386] Syncing: chain download in progress      synced=100.00% chain=137.67GiB headers=21,527,589@7.72GiB bodies=21,527,488@90.35GiB receipts=21,527,488@39.60GiB eta=1m38.347s
STdevK commented 6 months ago

Can you restart the node to see if it resyncs?

YuXiaoCoder commented 6 months ago

Can you restart the node to see if it resyncs?

I've rebooted many times but still can't resync

redhdx commented 6 months ago

From the log, I think you are using snap sync mode. Can you check start parameter again what syncmode is? Please set --verbosity=4 to open debug log, Check whether the log contains Synchronization terminated content or find the keyword backfilling with the network to see what the synchronization mode is.