feat(l1): blob additional validations #1178
Open
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.
Motivation
We need to validate blob bundles through their commitments and proofs.
Description
Tis PR moves the Blob bundles validation to the blobs_bundle module in the common crate, it perform early return validations regarding the length of the blobs, commitments and proofs and after that validate both the versioned hashes in the transactions as well as the commitments and proofs generated.
Apart from that a couple of convinience functions were added, specially a way to generate a
BlobsBundle
from blobs (with both commitments and proofs) as well as a generation of the versioned hash from aBlobsBundle
. Apart from that a useful function from l2 utils was moved to this module to be able to generate blobs from bytes.TODO:
Closes #issue_number