-
Notifications
You must be signed in to change notification settings - Fork 193
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
[BatchConfirmer] Apply state transitions for full batches #691
Conversation
blobHeader := batchData.blobHeaders[blobIndex] | ||
|
||
blobHeaderHash, err := blobHeader.GetBlobHeaderHash() | ||
if err != nil { | ||
b.logger.Error("failed to get blob header hash", "err", err) | ||
blobsToRetry = append(blobsToRetry, batchData.blobs[blobIndex]) | ||
continue | ||
} | ||
merkleProof, err := batchData.merkleTree.GenerateProof(blobHeaderHash[:], 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Proof should be generated based on leaf index, not the leaf data
BatchHeaderHash: headerHash, | ||
BlobIndex: uint32(blobIndex), | ||
SignatoryRecordHash: core.ComputeSignatoryRecordHash(uint32(batchData.batchHeader.ReferenceBlockNumber), batchData.aggSig.NonSigners), | ||
ReferenceBlockNumber: uint32(batchData.batchHeader.ReferenceBlockNumber), | ||
BatchRoot: batchData.batchHeader.BatchRoot[:], | ||
BlobInclusionProof: proof, | ||
BlobCommitment: &batchData.blobHeaders[blobIndex].BlobCommitments, | ||
// This is onchain, external batch ID, which is different from the internal representation of batch UUID |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No change in this block. Just adding comment in L194
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one concern
Why are these changes needed?
This PR makes
BatchConfirmer
transition full batch state toFailed
orAttested
.It also improves the test coverage for batch confirmer.
Checks