OffchainLabs / nitro

Nitro goes vroom and fixes everything
Other
745 stars 441 forks source link

Initialization of the DB fails #2416

Open nuliknol opened 3 months ago

nuliknol commented 3 months ago

Whenever I try to initialize with existing DB (either nitro-pruned.tar or nitro-genesis.tar) I am getting weird errors of EOF type. What is the problem here? (I downloaded the files from your snapshot website) Checksum is fine. Version 3.0.2 , compiled from sources.

Log file attached arbitrum-init

nohup.txt

nuliknol commented 3 months ago

possibly related to this https://github.com/ethereum/go-ethereum/issues/24158

nuliknol commented 3 months ago

nohup.txt

attached is the logfile for using nitro-pruned.tar file

nuliknol commented 3 months ago

I added a stack dump when the warning is shown:

                        if err := rlp.DecodeBytes(data.rlp, &body); err != nil {
                                log.Warn("Failed to decode block body", "block", data.number, "error", err)
                                panic("mydebug: panicking on demand")
                                return
                        }

go-ethereum/core/rawdb/chain_iterator.go , line 146

the resulting stack dump is attached for further investigation nohup.txt

diegoximenes commented 3 months ago

Could you check if following the strategy described here solves the issue?

vdoflip commented 3 months ago

I'm having the same issue, and I'm not using the --p2p.listen-addr="0.0.0.0" option at all.

My node fails to sync and shows:

INFO [07-04|07:42:16.035] created block                            l2Block=226,154,930 l2BlockHash=aacf67..1017a3
WARN [07-04|07:42:16.042] Failed to decode block body              block=73,379,120 error=EOF
WARN [07-04|07:42:16.042] Failed to decode block body              block=73,379,121 error=EOF
WARN [07-04|07:42:16.042] Failed to decode block body              block=73,379,122 error=EOF
WARN [07-04|07:42:16.042] Failed to decode block body              block=73,379,123 error=EOF
WARN [07-04|07:42:16.070] Failed to decode block body              block=73,379,124 error=EOF
WARN [07-04|07:42:16.070] Failed to decode block body              block=73,379,125 error=EOF
WARN [07-04|07:42:16.070] Failed to decode block body              block=73,379,126 error=EOF
WARN [07-04|07:42:16.070] Failed to decode block body              block=73,379,127 error=EOF
WARN [07-04|07:42:16.107] Failed to decode block body              block=73,379,120 error=EOF
WARN [07-04|07:42:16.108] Failed to decode block body              block=73,379,121 error=EOF
WARN [07-04|07:42:16.108] Failed to decode block body              block=73,379,122 error=EOF

I tried with a couple of providers and my own L1 node, but no luck.

zhangxf55 commented 3 months ago

I'm having the same issue, and I'm not using the --p2p.listen-addr="0.0.0.0" option at all.

My node fails to sync and shows:

INFO [07-04|07:42:16.035] created block                            l2Block=226,154,930 l2BlockHash=aacf67..1017a3
WARN [07-04|07:42:16.042] Failed to decode block body              block=73,379,120 error=EOF
WARN [07-04|07:42:16.042] Failed to decode block body              block=73,379,121 error=EOF
WARN [07-04|07:42:16.042] Failed to decode block body              block=73,379,122 error=EOF
WARN [07-04|07:42:16.042] Failed to decode block body              block=73,379,123 error=EOF
WARN [07-04|07:42:16.070] Failed to decode block body              block=73,379,124 error=EOF
WARN [07-04|07:42:16.070] Failed to decode block body              block=73,379,125 error=EOF
WARN [07-04|07:42:16.070] Failed to decode block body              block=73,379,126 error=EOF
WARN [07-04|07:42:16.070] Failed to decode block body              block=73,379,127 error=EOF
WARN [07-04|07:42:16.107] Failed to decode block body              block=73,379,120 error=EOF
WARN [07-04|07:42:16.108] Failed to decode block body              block=73,379,121 error=EOF
WARN [07-04|07:42:16.108] Failed to decode block body              block=73,379,122 error=EOF

I tried with a couple of providers and my own L1 node, but no luck.

I start my node with the following command:

/root/arbitrum/bin/nitro \
    --init.url="file:///data/nitro-pruned.tar" \
    --parent-chain.connection.url="http://192.168.1.1/api" \
    --parent-chain.blob-client.beacon-url="http://192.168.1.1/blob" \
    --chain.name="arb1" \
    --http.addr="localhost" \
    --http.api="net,web3,eth,arb,txpool" \
    --http.port=8547 \
    --node.feed.output.port=9642 \
    --ws.addr="localhost" \
    --ws.api="net,web3,eth,arb,txpool" \
    --ws.port=8548 \
    --persistent.log-dir="/var/log/arbitrum" \
    --persistent.global-config="/data/arbitrum" \
    --node.staker.enable=false \
    --validation.wasm.allowed-wasm-module-roots="/root/arbitrum/conf/nitro-legacy/machines,/root/arbitrum/conf/target/machines"

Before starting the node, I copy the following files from image: offchainlabs/nitro-node:v3.0.3-3ecd01e

docker create --name nitro-tmp-extract offchainlabs/nitro-node:v3.0.3-3ecd01e
docker cp -a nitro-tmp-extract:/usr/local/bin/daserver /root/arbitrum/bin
docker cp -a nitro-tmp-extract:/usr/local/bin/datool /root/arbitrum/bin
docker cp -a nitro-tmp-extract:/usr/local/bin/jit /root/arbitrum/bin
docker cp -a nitro-tmp-extract:/usr/local/bin/nitro /root/arbitrum/bin
docker cp -a nitro-tmp-extract:/usr/local/bin/nitro-val /root/arbitrum/bin
docker cp -a nitro-tmp-extract:/usr/local/bin/relay /root/arbitrum/bin
docker cp -a nitro-tmp-extract:/usr/local/bin/seq-coordinator-manager /root/arbitrum/bin
docker cp -a nitro-tmp-extract:/home/user/nitro-legacy /root/arbitrum/conf
docker cp -a nitro-tmp-extract:/home/user/target /root/arbitrum/conf

or you can try this:

--validation.wasm.allowed-wasm-module-roots="0x8b104a2e80ac6165dc58b9048de12f301d70b02a0ab51396c22b4b4b802a16a4"

or you may redownload the nitro-pruned.tar, for it might be updated already since your last download, the sha256sum has been changed.

aria2c -s8 -x8 -k1000M --max-download-limit=30M https://snapshot.arbitrum.foundation/arb1/nitro-pruned.tar -d /data

and you must pay attention to your l1 consensus client start param --enable-experimental-backfill=true:

bash /root/ethereum/bin/prysm.sh beacon-chain \
    --mainnet \
    --execution-endpoint="http://localhost:8551" \
    --jwt-secret="/root/ethereum/conf/jwt.hex" \
    --checkpoint-sync-url="https://sync-mainnet.beaconcha.in" \
    --genesis-beacon-api-url="https://sync-mainnet.beaconcha.in" \
    --datadir="/data/ethereum/prysm" \
    --enable-experimental-backfill=true \
    --p2p-host-ip="118.143.*.*" \
    --p2p-tcp-port=12000 \
    --p2p-udp-port=12000

Hope it will help~~~