nimbus-eth2 icon indicating copy to clipboard operation
nimbus-eth2 copied to clipboard

Consider checkpoint sync to main beacon node startup

Open arnetheduck opened this issue 3 years ago • 12 comments

  • My ideal mode of operation would be to add both --trusted-node-url and --backfill as command line arguments to the normal nimbus_beacon_node command (i.e. "no action"), and include them if the user specified that they would like to checkpoint sync. I would then set --trusted-node-url to whatever they specified, and --backfill to false so Nimbus pulls the historical blocks from gossip once checkpoint syncing has completed.
    • This is the behavior that both Lighthouse and Teku currently provide.
    • With the separate trustedNodeSync action, I have to manually determine whether or not Nimbus has sync'd before starting it up, and whether or not to start with the special action first and then restart into the conventional mode after. I'd strongly suggest removing the explicit action and building support for this into the "no action" mode so the client itself can make this determination and behave accordingly.

Originally posted by @jclapis in https://github.com/status-im/nimbus-eth2/issues/3209#issuecomment-1003598851

arnetheduck avatar Jan 14 '22 11:01 arnetheduck

TODO:

  • [ ] Evaluate backfill mode in automated checkpoint sync - this is going to trip people syncing from infura etc
  • [ ] Consider what to do when checkpoint is newer than head but head is newer than WS point: trust checkpoint or own head? (probably the latter)
  • [ ] Consider what to do when head is older than WS point: who do we trust more?

arnetheduck avatar Jan 14 '22 11:01 arnetheduck

For those looking for behavior similar to checkpoint sync in other clients:

# Run TNS when database is missing, skipping the backfill
[ -f "$DATADIR/db/nbc.sqlite3" ] || build/nimbus_beacon_node --data-dir:"$DATADIR" trustedNodeSync --backfill:false
# now run beacon node as normal..
build/nimbus_beacon_node ...

arnetheduck avatar May 05 '22 06:05 arnetheduck

This would be nice!

dapplion avatar Nov 24 '22 08:11 dapplion

Yes, huge +1 on this. I'm new to the ETH staking community, and this particular UX discomfort was a big negative of Nimbus compared to others (Lighthouse, Teku, I think Prysm has it or something like it too?)

maxtreyver avatar Mar 10 '23 21:03 maxtreyver