feat(epoch-sync): implement function to extend epoch sync proof by one epoch #14799
+211
−79
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds the core functionality of adding the function
extend_epoch_sync_proof.While at it, the function
derive_epoch_sync_proof_from_last_final_blockis also updated to take thelast_block_hashas parameter instead ofnext_block_header_after_last_final_block_of_current_epoch.There is some refactoring involved for the function
derive_epoch_sync_proof_from_last_final_blockto reuse some of the functions between itself andextend_epoch_sync_proofbut there should be functionality or logic change forderive_epoch_sync_proof_from_last_final_block.This PR requires careful review.
For testing these changes I plan to do the following in follow up PRs