OffchainLabs / nitro

Nitro goes vroom and fixes everything
Other
752 stars 446 forks source link

How to speed up Archival Node Sync and avoid checking old blocks? #2639

Closed ThomasBlock closed 1 week ago

ThomasBlock commented 2 months ago

How are we expected to run a full archival node?

as several posts suggest, it grows really fast ( #2431 #2615 , for me 38TB after one year ) and pruning often does not work ( #2441 #2580 #2586 ) ( and probably not viable for archival ) , so a periodic reinstall is a must. The problem:

INFO [09-06|08:50:28.971] created block                            l2Block=140,516,812 l2BlockHash=734523..689678
INFO [09-06|08:50:29.744] latest assertion not yet in our node     staker=0x0000000000000000000000000000000000000000 assertion=16635 state="{BlockHash:0x168c0639b8aec4d60cd156c7d230990505abd5bb6a78005533457f9efe416692 SendRoot:0xe093081ccfa08219309709a929aa561ba3dda3906a3e839ca421a5e6be3b3404 Batch:683243 PosInBatch:0}"
INFO [09-06|08:50:29.971] created block                            l2Block=140,516,824 l2BlockHash=2933bc..58daef
INFO [09-06|08:50:30.392] catching up to chain blocks              target="{BatchNumber:683243 PosInBatch:0}" current="{BatchNumber:0 PosInBatch:0}"
INFO [09-06|08:50:30.972] created block                            l2Block=140,516,842 l2BlockHash=650701..62a9a7
INFO [09-06|08:50:31.972] created block                            l2Block=140,516,866 l2BlockHash=99923d..e8bc84

The node is checking "half the blocks" ? starting from around 135.000.000 of 250.000.000 . Even on my high performance node ( Ryzen 9 7900X , 3x nvme in Raid0 ), this is expected to take around 30 days to complete.

How can we skip this part? Here my boot command:

/root/nitro/target/bin/nitro \
        --execution.caching.archive \
        --parent-chain.connection.url=http://execution:8545 \
        --parent-chain.blob-client.beacon-url=http://consensus-archival:5052 \
        --chain.name=arb1 \
        --http.api=net,web3,eth,debug \
        --http.corsdomain=* \
        --http.addr=0.0.0.0 \
        --http.port=9657 \
        --http.vhosts=* \
        --log-level=3 --metrics --metrics-server.addr 0.0.0.0 --metrics-server.port=6070 --execution.rpc.evm-timeout 30s  --execution.rpc.gas-cap 0 --execution.rpc.tx-fee-cap 0 \
        --init.url="https://snapshot.arbitrum.foundation/arb1/nitro-archive.tar" \
       --validation.wasm.root-path /root/wasm

image

or is the image just really old? it is 5 TB big

ThomasBlock commented 2 months ago

okay i found your statement here.. so in principle you gave up supporting archival nodes 4 month ago..

As of May 2024, archive node snapshots for Arbitrum One, Arbitrum Nova, and Arbitrum Sepolia are no longer being updated on https://snapshot.arbitrum.foundation/index.html due to accelerated database and state growth. https://docs.arbitrum.io/run-arbitrum-node/more-types/run-archive-node

but the block 140516812 from above is even from October 2023.. so the archive is that old?

calebcall commented 1 month ago

Yes, the archive snapshot is really that old.

joshuacolvin0 commented 1 week ago

Arbitrum One runs a lot faster than mainnet Ethereum, so archive nodes take longer to sync, and create much larger database state.