-
Notifications
You must be signed in to change notification settings - Fork 104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Partial verification of blob #401
Merged
Merged
Conversation
This file contains 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
Codecov Report
|
bkolad
reviewed
Jun 12, 2023
bkolad
reviewed
Jun 12, 2023
bkolad
reviewed
Jun 12, 2023
bkolad
reviewed
Jun 12, 2023
…overeign into theo/partial_blob_verif
preston-evans98
requested changes
Jun 13, 2023
bkolad
approved these changes
Jun 13, 2023
Also, I realized now that merging this PR will very likely solve #298 |
preston-evans98
approved these changes
Jun 16, 2023
This was referenced Jul 4, 2023
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.
Description
This PR enables partial verification of blobs. It solves the issue #268
Meaningful changes
hash
has been added to theBlobTransactionTrait
, it returns a [u8; 32] array, to be compliant with the internal hash representations used in the template.BufWithCounter
has been created, which is a wrapper aroundBuf
. This wrapper maintains an internal counter which tracks the number of bytes read from the inner buffer.get_extraction_proof
function has been added, it produces proofs that the data have been correctly extracted from the block. Theextract_relevant_txs_with_proof
has been kept for legacy reasons but it should simply callsextract_relevant_txs
followed byget_extraction_proof
. Theget_extraction_proof
should be called after the rollup has processed the transaction so that we can track how far we've read from the blob (and hence do the partial blob verification optimization).apply_blob
function of the module_stf_template. Mainly it avoids reading the whole buffer before checking the headers.Linked Issues
Tests
The test suite has been ran, no other new tests have been created