node-real / bsc-erigon

Ethereum implementation on the efficiency frontier
GNU Lesser General Public License v3.0
121 stars 41 forks source link

Unable to sync chapel testnet with erigon 3 (v1.3.0) #552

Open kidus-negesse-cb opened 1 day ago

kidus-negesse-cb commented 1 day ago

System information

Bsc-Erigon version: v1.3.0-alpha5

Chain/Network: chapel

Syncing Problem

I am attempting to start a bsc-erigon testnet node on v1.3.0-alpha5 to take advantage of erigon 3 and also have the bohr hard fork included.

During syncing, it fails at the execution stage on block 1:

[WARN] [11-13|19:15:58.246] [7/9 Execution] Execution failed         block=1 txNum=10 hash=0xd0bc67b50915467ada963c35ee00950f664788e47da8139d8c178653171034f1 err="invalid block, txnIdx=7, gas used by execution: 1490760, in header: 1509960, headerNum=1, d0bc67b50915467ada963c35ee00950f664788e47da8139d8c178653171034f1"

My startup command:

exec /app/erigon 
    --prune.mode=full \
    --chain=chapel
    --datadir="$DATADIR" \
    --port="$PEERING_PORT" \
    --http \
    --http.addr=0.0.0.0 \
    --http.vhosts=* \
    --http.api="eth, net, debug, txpool, trace, web3, rpc, erigon, bsc" \
    --http.port="$EVM_RPC_PORT" \
    --http.corsdomain="*" \
    --ws \
    --ws.port="$EVM_WS_PORT" \
    --authrpc.port=8551 \
    --torrent.port="$TORRENT_PORT" \
    --nat="$NAT" \
    --torrent.download.rate="$TORRENT_RATE" \
    --bootnodes="$BOOT_NODES \

I also tried alpha4 and alpha3, where it has the same issue. On alpha2, it's unable to find peers and ever start downloading the snapshot.

blxdyx commented 1 day ago

It should have error logs before this. Show more logs when ottersync finish.

kidus-negesse-cb commented 18 hours ago

@blxdyx Sure, thanks for the reply. Here's what I see including ottersync before it encounters that error:

[INFO] [11-14|15:57:22.650] [1/9 OtterSync] Requesting downloads 

[INFO] [11-14|15:57:14.491] [1/9 OtterSync] Downloading complete     time=19.734624719s

[INFO] [11-14|15:57:23.314] [snapshots:history] Stat                 blocks=45.20M txs=442.18M txNum2blockNum="256=41505K,272=44352K,280=44756K,282=44961K,283=45206K" first_history_idx_in_db=0 last_comitment_block=45206567 last_comitment_tx_num=442187500 alloc=4.3GB sys=7.4GB

[INFO] [11-14|15:57:23.313] [snapshots:download] Stat                blocks=45.35M indices=45.35M alloc=4.3GB sys=7.4GB

[INFO] [11-14|15:57:24.973] [2/9 Headers] Waiting for headers...     from=45366658 hash=0x21ae11f26a6724ac2a0f709d99384e8fec16ec098ecff005938540bdcd20f082

[INFO] [11-14|15:57:34.652] [2/9 Headers] Processed                  highest=45372254 age=1w1d19h headers=5596 in=9.680 blk/sec=578

[INFO] [11-14|15:57:34.685] [5/9 Bodies] Processing bodies...        from=45358339 to=45372254

[INFO] [11-14|15:58:02.518] [6/9 Senders] Started                    from=45354999 to=45372254

[INFO] [11-14|15:58:24.323] [7/9 Execution] starting                 from=0 to=45354999 fromTxNum=0 offsetFromBlockBeginning=0 initialCycle=true useExternalTx=false

[EROR] [11-14|15:58:02.893] Staged Sync                              err="bad block unwinding"

[WARN] [11-14|15:58:45.129] [7/9 Execution] Execution failed         block=1 txNum=10 hash=0xd0bc67b50915467ada963c35ee00950f664788e47da8139d8c178653171034f1 err="invalid block, txnIdx=7, gas used by execution: 1490760, in header: 1509960, headerNum=1, d0bc67b50915467ada963c35ee00950f664788e47da8139d8c178653171034f1"

[INFO] [11-14|15:58:45.129] [7/9 Execution] Done                     blk=0 blks=1 blk/s=45.5 txs=11 tx/s=500 gas/s=67.82M buf=375.0KB/512.0MB stepsInDB=0.00 step=0.0 alloc=4.7GB sys=7.7GB

I guess "bad block unwinding" should be the interesting one, it's the only other error log that I see, but don't know how informative that is... thanks for looking into this!

blxdyx commented 3 hours ago

Try rm -rf datadir/chaindata and datadir/parlia and show logs after restart with debug level log.