chore: avoid pruning split block execution payloads#8572
Draft
Andrurachi wants to merge 1 commit intosigp:unstablefrom
Draft
chore: avoid pruning split block execution payloads#8572Andrurachi wants to merge 1 commit intosigp:unstablefrom
Andrurachi wants to merge 1 commit intosigp:unstablefrom
Conversation
Add a condition to skip pruning when the block is the split block root. Prevents `try_prune_execution_payloads` from deleting the split block's execution payload. Add two tests `pruning_preserves_payload_aligned` and `pruning_preserves_payload_unaligned` using the helper `verify_pruning_preserves_payload` to ensure correct behavior.
0121f88 to
e9311d8
Compare
Author
|
Hey @michaelsproul, I have a quick question on test coverage. This PR covers the same regression as the recently merged Would you prefer removing the earlier reproduction test to avoid overlapping coverage, or keeping both? Happy to update the PR either way. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
This PR ensures that the split block’s execution payload is never pruned during weak subjectivity checkpoint sync.
A guard is added to
try_prune_execution_payloadsso that pruning is skipped whenblock_root == split_block_root.Two new regression tests verify this behavior across aligned and unaligned checkpoint scenarios.
Changes
Code
try_prune_execution_payloadsto skip pruning for the split block root.Tests
Add helper
verify_pruning_preserves_payloadto set up aligned/unaligned checkpoint cases, enableprune_payloads = true, run checkpoint sync, and assert the split block payload is preserved.Add:
pruning_preserves_payload_alignedpruning_preserves_payload_unalignedRelation to Other Work
The new test
pruning_preserves_payload_unalignedcovers the failure mode tested by this open PR #8458 and goes further. It verifies both that:Because of this, the earlier reproduction test becomes partially redundant, but it can still be useful because it explicitly demonstrates the original bug fixed in #8426
Issue
Fixes: #8431