Checkpoint sync is not working when finalized state is transitioned with empty slots
Description
If finalized epoch ends with empty slot(s) most clients provide state transitioned to the end of the epoch, so it cannot be used for AnchorPoint initialization without extra work. To fix this we should also request finalized block header from peer and patch finalized state so it could be used for AnchorPoint.
Discussion on Discord: https://discord.com/channels/697535391594446898/697539289042649190/1202083995815522364
Internal discussion: https://consensyssoftware.atlassian.net/wiki/spaces/PEG/pages/399517614166/Starting+from+transitioned+AnchorPoint+discussion
I need to do more reading on these, but i know finalized checkpoint is well defined in the spec, which is what the checkpoint sync is needing but we weren't providing (#7955) I've got a PR up to return the finalized checkpoint, but that may mean our startup logic changes because of that. I need to catch up on whether 'finalized anchor' is well defined in the spec, as that would inform this issue a lot.
7955 should resolve this now. closing.