lighthouse icon indicating copy to clipboard operation
lighthouse copied to clipboard

Allow Checkpoint Sync on State Beyond Finalization

Open ethDreamer opened this issue 1 year ago • 8 comments

Issue Addressed

  • #5082

Proposed Changes

  • [x] Add --checkpoint-sync-state-id to enable user to specify a checkpoint StateId on CLI
  • [x] Prevent checkpoint syncing from a state outside the DA boundary if the chain is past the deneb fork
  • [x] Add AnchorState enum to ForkChoice to specify if the finalized state is truly finalized or just a non-revertible checkpiont state
  • [x] Detect if checkpoint state is newer than finalization automatically when using --checkpoint-sync-url
  • [ ] Verify above automatic detection works with checkpointz
  • [x] Don't filter out sync peers with younger finalization if our finalized state is a non-revertible checkpoint state
  • [x] Properly persist AnchorState during shutdown

Additional Info

This is my first time messing around with fork-choice (been avoiding it..). I could use some extra scrutiny on the fork-choice modifications specifically.

ethDreamer avatar Jan 25 '24 09:01 ethDreamer

So this PR doesn't work with checkpointz but I have made @samcm aware of the need to implement this. That's the last thing on the checklist. Not sure what else should be added to this PR.

ethDreamer avatar Feb 07 '24 03:02 ethDreamer

So this PR doesn't work with checkpointz but I have made @samcm aware of the need to implement this. That's the last thing on the checklist. Not sure what else should be added to this PR.

default behavior still works right? is it just that checkpointz won't serve non-finalized?

realbigsean avatar Feb 07 '24 12:02 realbigsean

labeling this one as backwards incompat because it has a db migration

realbigsean avatar Feb 18 '24 08:02 realbigsean

Pushing this back to v5.2 after talking to @ethDreamer . Since this PR is almost ready, we can always make a patch release with this if really required. Feel free to change it back if you feel this should go into 5.1.0

pawanjay176 avatar Mar 07 '24 11:03 pawanjay176

This needs some updates to address the merge conflict caused by downloading checkpoint blobs

michaelsproul avatar Mar 22 '24 01:03 michaelsproul

Trying this on Goerli, I can't get any peers:

Mar 22 02:09:24.756 DEBG Handshake Failure, reason: Different finalized chain, peer: 16Uiu2HAmTyzbanJu6xJRi7efeUGMdDu1ae4qNm4aBfViNjfeZmLv, module: network::network_beacon_processor::rpc_methods:112

My node gets insta-banned after syncing off an unfinalized state. We had some fix for this I thought? Or does it require the peer to be running this PR as well?

michaelsproul avatar Mar 22 '24 02:03 michaelsproul

Trying this on Goerli, I can't get any peers:

Mar 22 02:09:24.756 DEBG Handshake Failure, reason: Different finalized chain, peer: 16Uiu2HAmTyzbanJu6xJRi7efeUGMdDu1ae4qNm4aBfViNjfeZmLv, module: network::network_beacon_processor::rpc_methods:112

My node gets insta-banned after syncing off an unfinalized state. We had some fix for this I thought? Or does it require the peer to be running this PR as well?

Concerning.. I had only tested it locally with kurtosis. I guess I'll have to dig into this :/

ethDreamer avatar Mar 25 '24 15:03 ethDreamer

Dropping this from v5.2.0

michaelsproul avatar Apr 30 '24 06:04 michaelsproul