M 02/version check can be arbitrarily bypassed #26
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.
remove supported version checks on _verifyBlockBuilderProof
This addresses the Q3 2025 OZ audit item M-02, which pointed out that there
are no onchain checks that verify the proof was built according to
the version passed in the '_verifyBlockBuilderProof' function call.
This is correct, there are no checks, and in fact there is no way to perform
these checks since the 'blockContentHash' portion of the proof is generated
entirely offchain. So rather than perform these needless 'isSupportedVersion'
checks, we are going to remove that check to save gas, and we assume that the
version passed in the function call is not to be trusted.
Instead, it serves as a notice to any offchain verifiers reading the event data
that this is the version of the flashtestation proof they should assume when
verifying the proof. It could be the wrong version, but that's fine because the
proving code is assumed to perform adequate checks if the version is wrong