Optimistically import any post-merge block #2844
Merged
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 implements a suggestion by @mkalinin to allow optimistic import of any post-merge block.
A post-merge block is any block where the parent block has a non-empty
ExecutionPayload
.The fork choice poisoning attack relies upon the ability to reliably send all execution engines into a syncing state. This is only possible on the merge block, since that block can reference a junk
payload.parent_hash
. So, it makes sense to only apply these optimistic-import restrictions to the merge block (and not their innocent descendants).This PR is an improvement since it avoids rejecting valid blocks in some scenarios where it is safe to (optimistically) import them.
This PR succeeds #2841 since it is a simpler and more general solution.