execution/engineapi: reject engine_getBlobsV1 post-osaka#21857
Open
Sahil-4555 wants to merge 3 commits into
Open
execution/engineapi: reject engine_getBlobsV1 post-osaka#21857Sahil-4555 wants to merge 3 commits into
Sahil-4555 wants to merge 3 commits into
Conversation
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.
As per the Engine API specifications, once the Osaka fork is activated on the network, we must not support the
engine_getBlobsV1method anymore and it should return the-38005: Unsupported forkerror. To handle this, I have added a check inGetBlobsV1ofEngineServerto check if the current canonical head block's timestamp has crossed the Osaka activation time or not. If it is active, we are directly returning theUnsupportedForkError.Additionally, I have also added validations for the V2 and V3 methods. Previously, if someone called
engine_getBlobsV2orengine_getBlobsV3before Osaka activation, Erigon was querying the txpool and then returningnullbecause the proofs were not 128 elements. But this was wasting CPU cycles by unnecessarily searching the pool and it was also spamming the logs with warning messages like "pre-Fusaka proofs, len(proof)=1" every time.Now, with this change, if Osaka is not active, both
GetBlobsV2andGetBlobsV3will directly returnnullwithout calling the pool.