bnb-chain / opbnb

MIT License
403 stars 163 forks source link

syncing stuck at height 14828542, bad block 14828543 #116

Closed cryptocifer closed 9 months ago

cryptocifer commented 9 months ago

System information

Network: mainnet

if you are running a local node, please provide the following information: op-node version: v0.2.4 op-geth version: v0.2.2 OS & Version: Linux

Backtrace

opbnb-op-geth-1  | INFO [01-30|03:24:25.417] StateProcessor Apply all transaction messages finished elapsed=21.772ms   blockNumber=14,828,543 txs=72
opbnb-op-geth-1  | INFO [01-30|03:24:25.424] Skip duplicated bad block                number=14,828,543 hash=cfaddf..835972
opbnb-op-geth-1  | ERROR[01-30|03:24:25.425]
opbnb-op-geth-1  | ########## BAD BLOCK #########
opbnb-op-geth-1  | Block: 14828543 (0xcfaddfbe590793ccfad929114f2033145da259ff5e03ad09be46ddf093835972)
opbnb-op-geth-1  | Error: invalid merkle root (remote: 86f3b5b7edaaa0f2f71c3a30ac56766fcfab784dd680a1c49348d331251f1dbe local: 653394266566c93b8e7f0a1c247e9a8a84861473afcdb3c395ddbcd181ec4f00) dberr: missing trie
 node 2c8e31842f5de395ee75aa4f692b814cedb09f583183c896950474ebde5a01a8 (owner 6b44941a8dbe3ef20d36537f5ea43ce994efeedd3e21b3ee9d2d34153068cefe) (path 0e0d08040a) <nil>
opbnb-op-geth-1  | Platform: geth (devel) go1.20.13 amd64 linux
opbnb-op-geth-1  | VCS: 8cc334bb-
opbnb-op-geth-1  | Chain config: &params.ChainConfig{ChainID:204, HomesteadBlock:0, DAOForkBlock:<nil>, DAOForkSupport:false, EIP150Block:0, EIP150Hash:0x0000000000000000000000000000000000000000000000000000000000
000000, EIP155Block:0, EIP158Block:0, ByzantiumBlock:0, ConstantinopleBlock:0, PetersburgBlock:0, IstanbulBlock:0, MuirGlacierBlock:0, BerlinBlock:0, LondonBlock:0, ArrowGlacierBlock:0, GrayGlacierBlock:0, MergeN
etsplitBlock:0, ShanghaiTime:(*uint64)(nil), CancunTime:(*uint64)(nil), PragueTime:(*uint64)(nil), BedrockBlock:0, RegolithTime:(*uint64)(0xc0000483a0), TerminalTotalDifficulty:0, TerminalTotalDifficultyPassed:tr
ue, Ethash:(*params.EthashConfig)(nil), Clique:(*params.CliqueConfig)(nil), Optimism:(*params.OptimismConfig)(0x2ebf1d0), PreContractForkBlock:<nil>, Fermat:9397477}
opbnb-op-geth-1  | Receipts:
STdevK commented 9 months ago

Can you share the node start-up command? Did you sync the node from scratch or use a snapshot?

cryptocifer commented 9 months ago

I setHead to a far previous block and manage to pass the badblock but today get stuck again at block 15389569.

ERROR[02-06|02:27:48.062] 
########## BAD BLOCK #########
Block: 15389569 (0x484709b86adbcb6f8ecf6d24455eeeef5a6ae2cb261ac590682e30a665022a72)
Error: invalid gas used (remote: 2716523 local: 2714811)
Platform: geth (devel) go1.20.13 amd64 linux
VCS: 4724fd7f-
Chain config: &params.ChainConfig{ChainID:204, HomesteadBlock:0, DAOForkBlock:<nil>, DAOForkSupport:false, EIP150Block:0, EIP150Hash:0x0000000000000000000000000000000000000000000000000000000000000000, EIP155Block:0, EIP158Block:0, ByzantiumBlock:0, ConstantinopleBlock:0, PetersburgBlock:0, IstanbulBlock:0, MuirGlacierBlock:0, BerlinBlock:0, LondonBlock:0, ArrowGlacierBlock:0, GrayGlacierBlock:0, MergeNetsplitBlock:0, ShanghaiTime:(*uint64)(nil), CancunTime:(*uint64)(nil), PragueTime:(*uint64)(nil), BedrockBlock:0, RegolithTime:(*uint64)(0xc00004a3b8), TerminalTotalDifficulty:0, TerminalTotalDifficultyPassed:true, Ethash:(*params.EthashConfig)(nil), Clique:(*params.CliqueConfig)(nil), Optimism:(*params.OptimismConfig)(0x2ebf1d0), PreContractForkBlock:<nil>, Fermat:9397477}
Receipts:

@STdevK I sync the node from scratch(as a full node), the startup command is:

/app/bin/geth \
      --config=/var/data/config.toml \
      --datadir=/var/data \
      --http \
      --http.addr=0.0.0.0 \
      --http.port=8545 \
      --http.api=net,eth,pre,trace \
      --syncmode=full \
      --networkid=204 \
      --triesInMemory=32 \
      --gcmode=full \
      --metrics \
      --metrics.port=6060 \
      --metrics.addr=0.0.0.0 \
      --authrpc.addr=0.0.0.0 \
      --authrpc.port=8551 \
      --authrpc.jwtsecret=/var/data/jwt.txt \
      --rollup.sequencerhttp=https://opbnb-mainnet-rpc.bnbchain.org \
      --txlookuplimit=0 \
      --snapshot=false
op-node \
      --l1.trustrpc \
      --sequencer.l1-confs=15 \
      --verifier.l1-confs=15 \
      --l1.http-poll-interval=3s \
      --l1.epoch-poll-interval=45s \
      --l1.rpc-max-batch-size=20 \
      --network=opBNBMainnet \
      --rpc.addr=0.0.0.0 \
      --rpc.port=8547 \
      --p2p.sync.req-resp \
      --metrics.enabled \
      --metrics.addr=0.0.0.0 \
      --metrics.port=7300 \
      --pprof.enabled \
      --rpc.enable-admin \
      --l1=http://bsc-datatrace.defiapp.com \
      --l2.engine-sync=true \
      --l2.skip-sync-start-check=true \
      --l2=http://127.0.0.1:8551 \
      --l2.jwt-secret=/var/data/jwt.txt
welkin22 commented 9 months ago

--gcmode=full

@cryptocifer Hello, currently the op stack does not support full node mode. You need to modify the gcmode configuration to archive. We are trying to figure out how to support full mode, but it is not possible at the moment.

cryptocifer commented 9 months ago

Thank you @welkin22 , resync with gcmode=archive has succeeded!