OffchainLabs / nitro

Nitro goes vroom and fixes everything
Other
736 stars 428 forks source link

Head state missing, repairing at prune mode #2283

Closed andreyddk closed 3 months ago

andreyddk commented 4 months ago

Describe the bug I started the node with nitro-pruned snapshot, after compacting database log the node has been stacked with message.

Head state missing, repairing number=205,131,834 hash=146360..8773da snaproot=b97cfc..c48be4

This message not goes away, more then 2-4 hours. And node does not accept calls.

nmap 10.1.0.5 -p 8547
Starting Nmap 7.93 ( https://nmap.org ) at 2024-05-07 16:25 +04
Nmap scan report for 10.1.0.5
Host is up (0.00012s latency).

PORT     STATE  SERVICE
8547/tcp closed unknown

Nmap done: 1 IP address (1 host up) scanned in 0.41 seconds

But if using archive mode thats works fine. Without errors.

To Reproduce Get the snapshot from docs, prepare docker-compose.yml

version: '3.8'

services:
  nitro-node:
    container_name: arbitrum-nitro-node
    image: offchainlabs/nitro-node:v2.3.3-6a1c1a7
    volumes:
      - ./volumes/arbitrum:/home/user/.arbitrum
      - ./nitro-pruned.tar:/tmp/nitro-pruned.tar
    ports:
      - "10.1.0.5:8547:8547"
      - "10.1.0.5:8548:8548"
      - "10.1.0.5:9642:9642"
    command:
      - --parent-chain.connection.url=https://eth-mainnet.g.alchemy.com/v2/***
      - --parent-chain.blob-client.beacon-url=https://lively-smart-diamond.quiknode.pro/***
      - --chain.id=42161
      - --http.api=net,web3,eth,arb
      - --http.corsdomain=*
      - --http.addr=0.0.0.0
      - --http.port=8547
      - --http.vhosts=*
      - --ws.port=8548
      - --ws.addr=0.0.0.0
      - --ws.origins=*
      - --init.prune=full
      - --init.url=file://tmp/nitro-pruned.tar
      - --init.download-path=/tmp
    restart: unless-stopped
    user: "1000:1000"

mkdir -p ./volumes/arbitrum chmod -R 777 ./volumes/arbitrum

docker-compose up -d && docker-compose logs -f

Expected behavior I am expecting the correct sync of node and starts to accept calls.

Additional context Logs here arb-node-log.txt

joshuacolvin0 commented 3 months ago

Pruning takes a lot of time, even on a recently pruned database. Archive mode doesn't prune, so doesn't have the delay. Node cannot serve calls during pruning