status-im / nimbus-eth2

Nim implementation of the Ethereum Beacon Chain
https://nimbus.guide
Other
543 stars 233 forks source link

Eth1 sync progress status #2978

Closed jt9897253 closed 3 years ago

jt9897253 commented 3 years ago

Description I'm trying to sync nimbus using Erigon as Eth1 provider. However, in the log entry showing the Eth1 sync progress the reported blockNumber is constantly staying behind the latest block seen by Erigon or shown on http://etherscan.io

Additional context Previously, I was affected by https://github.com/status-im/nimbus-eth2/issues/2971. After updating to 1.5.1, the log entry Eth1 chain not synced disappeared. However, the following seems odd to me:

# curl -d '{"jsonrpc":"2.0","id":"id","method":"getEth1Chain","params":[] }' -H 'Content-Type: application/json' localhost:9190 -s | jq '.result' | tail
        "signature": "0xb0fc52a158b22bedf8ca4407ba3902cf87660239486525a610f166e7ff674ddc0dac003118685697c9e40fe4aad9dba609c47e33867b86db63ab201f8ba1ae32b77b229c61aa4a8d5247ab13ab1d5f7aa601f212295e7b828799664b7d8ebe9e"
      }
    ],
    "voteData": {
      "deposit_root": "0xe22543b6d6f386dfb78cfeed207c050082baaadcbb17bc0705090e2f64ed449c",
      "deposit_count": 247979,
      "block_hash": "0x4794afd55e59c06a4487665945beed6a28f3dbbb34d2ad8e2691298496e9e423"
    }
  }
]
# curl -d '{"jsonrpc":"2.0","id":"id","method":"getEth1ProposalData","params":[] }' -H 'Content-Type: application/json' localhost:9190 -s | jq '.result' 
{
  "vote": {
    "deposit_root": "0xaba50ebd526b9406fc29f76ad0455b445347f3b109e8cd11541ad9eae816a587",
    "deposit_count": 247844,
    "block_hash": "0x1ff611ac417556941e50f7b146fcc6b14dc4663284ed42738bdf1c238686e113"
  },
  "deposits": [],
  "hasMissingDeposits": false
}

Maybe nimbus is still not properly synced or is this expected behavior?

To Reproduce Steps to reproduce the behavior:

  1. Platform details (OS, architecture): Ubuntu 20.04, x64
  2. Branch/commit used: v1.5.1-592e49
  3. Commands being executed:
    nimbus \                                                 
    --non-interactive \                                                             
    --network=mainnet \                                                             
    --data-dir=/var/opt/nimbus/shared_mainnet_0 \                               
    --log-file=/var/log/nimbus.log \                                                
    --web3-url=ws://127.0.0.1:8545 \                                                
    --web3-url=wss://mainnet.infura.io/ws/v3/ID \     
    --web3-mode=enabled \                                                           
    --metrics=off \                                                                 
    --rpc=on \                                                                      
    --num-threads=8 \                                                               
    --log-level=INFO                                                                
  4. Relevant log lines:
    Oct 12 09:29:07 nimbus[403093]: NOT 2021-10-12 09:29:07.364+02:00 Eth1 sync progress topics="eth1" tid=403093 file=eth1_monitor.nim:932 blockNumber=13400108 depositsProcessed=247979
jt9897253 commented 3 years ago

Update: the dicrepancy of the deposit_count value returned by getEth1ProposalData and getEth1Chain got less, now they only differ by 3. I assume a slow sync and will close this issue if the offset stays this small or gets even less.

jt9897253 commented 3 years ago

I assume this was related to incorrect pruning settings of the Eth1 client.