Allow Checkpoint Sync on State Beyond Finalization
Issue Addressed
- #5082
Proposed Changes
- [x] Add
--checkpoint-sync-state-idto enable user to specify a checkpointStateIdon CLI - [x] Prevent checkpoint syncing from a state outside the DA boundary if the chain is past the
denebfork - [x] Add
AnchorStateenum toForkChoiceto 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
AnchorStateduring 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.
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.
So this PR doesn't work with
checkpointzbut 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?
labeling this one as backwards incompat because it has a db migration
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
This needs some updates to address the merge conflict caused by downloading checkpoint blobs
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?
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 :/
Dropping this from v5.2.0