paradigmxyz / reth

Modular, contributor-friendly and blazing-fast implementation of the Ethereum protocol, in Rust
https://reth.rs/
Apache License 2.0
3.84k stars 1.08k forks source link

Error: range end index 32 out of range for slice of length 20 #10674

Open Q6Crypto opened 3 weeks ago

Q6Crypto commented 3 weeks ago

Describe the bug

I've been syncing my mainnet node since 1 week (it seems a little long cause I've seen people saying that it should take around 50 hours)

Now I'm getting this error message. The node crashes, then reboot cause I have a restart condition on Docker

Steps to reproduce

Steps to repoduce :

sudo docker-compose up -d

Here is my docker compose

version: "3.8"

services:
  reth:
    image: ghcr.io/paradigmxyz/reth:latest
    container_name: eth-reth
    restart: unless-stopped
    volumes:
      - ./reth_data:/root/.local/share/reth
      - ./jwt.hex:/jwt.hex:ro
    ports:
      - "20103:30303/tcp"
      - "20103:30303/udp"
      - "20145:8545"
      - "20101:9001"
    command: >
      node
      --full
      --http
      --http.addr 0.0.0.0
      --http.api eth,net,web3
      --authrpc.addr 0.0.0.0
      --authrpc.port 20151
      --authrpc.jwtsecret /jwt.hex
      --metrics 0.0.0.0:9001

  lighthouse:
    image: sigp/lighthouse:latest
    container_name: eth-lighthouse
    restart: unless-stopped
    volumes:
      - ./lighthouse_data:/root/.lighthouse
      - ./jwt.hex:/jwt.hex:ro
    ports:
      - "9000:9000/tcp"
      - "9000:9000/udp"
    command: >
      lighthouse bn
      --network mainnet
      --execution-endpoint http://reth:20151
      --execution-jwt /jwt.hex
      --checkpoint-sync-url https://mainnet.checkpoint.sigp.io
      --http
      --http-address 0.0.0.0
      --disable-deposit-contract-sync

Node logs

2024-09-03T13:34:05.808098Z  INFO Initialized tracing, debug log directory: /root/.cache/reth/logs/mainnet
2024-09-03T13:34:05.809062Z  INFO Starting reth version="1.0.6 (c228fe15)"
2024-09-03T13:34:05.810072Z  INFO Opening database path="/root/.local/share/reth/mainnet/db"
2024-09-03T13:34:05.821753Z  INFO Configuration loaded path="/root/.local/share/reth/mainnet/reth.toml"
2024-09-03T13:34:05.823996Z  INFO Verifying storage consistency.
2024-09-03T13:34:05.894429Z  INFO Database opened
2024-09-03T13:34:05.894456Z  INFO Starting metrics endpoint at 0.0.0.0:9001
2024-09-03T13:34:05.894470Z  INFO Starting metrics endpoint addr=0.0.0.0:9001
2024-09-03T13:34:05.894687Z  INFO 
Pre-merge hard forks (block based):
- Frontier                         @0
- Homestead                        @1150000
- Dao                              @1920000
- Tangerine                        @2463000
- SpuriousDragon                   @2675000
- Byzantium                        @4370000
- Constantinople                   @7280000
- Petersburg                       @7280000
- Istanbul                         @9069000
- MuirGlacier                      @9200000
- Berlin                           @12244000
- London                           @12965000
- ArrowGlacier                     @13773000
- GrayGlacier                      @15050000
Merge hard forks:
- Paris                            @58750000000000000000000 (network is known to be merged)
Post-merge hard forks (timestamp based):
- Shanghai                         @1681338455
- Cancun                           @1710338135
2024-09-03T13:34:05.895198Z  INFO Transaction pool initialized
2024-09-03T13:34:05.895345Z  INFO Loading saved peers file=/root/.local/share/reth/mainnet/known-peers.json
2024-09-03T13:34:05.898520Z  INFO StaticFileProducer initialized
2024-09-03T13:34:05.899240Z  INFO Pruner initialized prune_config=PruneConfig { block_interval: 5, segments: PruneModes { sender_recovery: Some(Full), transaction_lookup: None, receipts: Some(Before(11052984)), account_history: Some(Distance(10064)), storage_history: Some(Distance(10064)), receipts_log_filter: ReceiptsLogPruneConfig({0x00000000219ab540356cbb839cbe05303d7705fa: Before(11052984)}) } }
2024-09-03T13:34:05.899649Z  INFO Consensus engine initialized
2024-09-03T13:34:05.899822Z  INFO Engine API handler initialized
2024-09-03T13:34:05.901894Z  INFO RPC auth server started url=0.0.0.0:20151
2024-09-03T13:34:05.902133Z  INFO RPC IPC server started path=/tmp/reth.ipc
2024-09-03T13:34:05.902149Z  INFO RPC HTTP server started url=0.0.0.0:8545
2024-09-03T13:34:05.902214Z  INFO Starting consensus engine
2024-09-03T13:34:05.909217Z  INFO Preparing stage pipeline_stages=1/14 stage=Headers checkpoint=20608394 target=None
2024-09-03T13:34:05.909219Z  INFO Target block already reached checkpoint=20608394 target=Hash(0xe54fd695766c1dbffab4d1681fbd0489a69da10bf5688c5c76593b38a89c6965)
2024-09-03T13:34:05.909331Z  INFO Executing stage pipeline_stages=1/14 stage=Headers checkpoint=20608394 target=None
2024-09-03T13:34:05.909444Z  INFO Finished stage pipeline_stages=1/14 stage=Headers checkpoint=20608394 target=None stage_progress=100.00%
2024-09-03T13:34:05.909507Z  INFO Preparing stage pipeline_stages=2/14 stage=Bodies checkpoint=20608394 target=20608394
2024-09-03T13:34:05.909543Z  INFO Executing stage pipeline_stages=2/14 stage=Bodies checkpoint=20608394 target=20608394
2024-09-03T13:34:05.909631Z  INFO Finished stage pipeline_stages=2/14 stage=Bodies checkpoint=20608394 target=20608394 stage_progress=100.00%
2024-09-03T13:34:05.909645Z  INFO Preparing stage pipeline_stages=3/14 stage=SenderRecovery checkpoint=20608394 target=20608394
2024-09-03T13:34:05.909653Z  INFO Executing stage pipeline_stages=3/14 stage=SenderRecovery checkpoint=20608394 target=20608394
2024-09-03T13:34:05.909661Z  INFO Finished stage pipeline_stages=3/14 stage=SenderRecovery checkpoint=20608394 target=20608394 stage_progress=100.00%
2024-09-03T13:34:05.909669Z  INFO Preparing stage pipeline_stages=4/14 stage=Execution checkpoint=15353222 target=20608394
2024-09-03T13:34:05.909717Z  INFO Executing stage pipeline_stages=4/14 stage=Execution checkpoint=15353222 target=20608394
2024-09-03T13:34:08.901253Z  INFO Status connected_peers=0 stage=Execution checkpoint=15353222 target=20608394
2024-09-03T13:34:14.353018Z  INFO Received forkchoice updated message when syncing head_block_hash=0x12f97a1860328ffa24d2c2704b2cc3ea9e7fdd4d79ac5b5150fc4ec02d4f1833 safe_block_hash=0xbc59006014fecc864bb2aca644b8701187bc5b5f4585a905594d010256f23491 finalized_block_hash=0x8dd7bdac405c9bd177007e092c65ed0453e8274884c40b69c93c483a1c42be08
2024-09-03T13:34:15.924322Z  INFO Executed block range start=15353223 end=15353610 throughput="603.78 Mgas/second"
2024-09-03T13:34:25.934899Z  INFO Executed block range start=15353611 end=15354013 throughput="624.42 Mgas/second"
2024-09-03T13:34:33.900819Z  INFO Status connected_peers=1 stage=Execution checkpoint=15353222 target=20608394
2024-09-03T13:34:35.978442Z  INFO Executed block range start=15354014 end=15354466 throughput="712.92 Mgas/second"
2024-09-03T13:34:45.985638Z  INFO Executed block range start=15354467 end=15354977 throughput="815.06 Mgas/second"
2024-09-03T13:34:55.986663Z  INFO Executed block range start=15354978 end=15355457 throughput="733.27 Mgas/second"
2024-09-03T13:34:58.901239Z  INFO Status connected_peers=1 stage=Execution checkpoint=15353222 target=20608394
2024-09-03T13:35:06.043946Z  INFO Executed block range start=15355458 end=15355906 throughput="704.65 Mgas/second"
2024-09-03T13:35:16.078794Z  INFO Executed block range start=15355907 end=15356377 throughput="726.77 Mgas/second"
2024-09-03T13:35:23.901146Z  INFO Status connected_peers=1 stage=Execution checkpoint=15353222 target=20608394
2024-09-03T13:35:26.080428Z  INFO Executed block range start=15356378 end=15356854 throughput="740.67 Mgas/second"
2024-09-03T13:35:36.101509Z  INFO Executed block range start=15356855 end=15357303 throughput="714.34 Mgas/second"
thread 'tokio-runtime-worker' panicked at crates/primitives-traits/src/storage.rs:45:40:
range end index 32 out of range for slice of length 20
stack backtrace:
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
2024-09-03T13:35:42.278155Z ERROR Failed to receive spawned pipeline
2024-09-03T13:35:42.278155Z ERROR Critical task `pipeline task` panicked: `range end index 32 out of range for slice of length 20`
2024-09-03T13:35:42.278281Z ERROR shutting down due to error
Error: Critical task `pipeline task` panicked: `range end index 32 out of range for slice of length 20`


Platform(s)

Linux (x86)

What version/commit are you on?

I started the syncinc on 1.0.5 When the error happened, I updated to 1.0.6 to see if it fixes it, but it didn't

What database version are you on?

Version 2

Which chain / network are you on?

Ethereum Mainnet

What type of node are you running?

Full via --full flag

What prune config do you use, if any?

No response

If you've built Reth from source, provide the full command you used

No response

Code of Conduct

emhane commented 5 days ago

tagging authors of latest commits to the file where error originates @klkvr @mattsse @joshieDo as starting point to debug issue

https://github.com/paradigmxyz/reth/commits/main/crates/primitives-traits/src/storage.rs