Skip to content

Commit

Permalink
test: fix verifier test
Browse files Browse the repository at this point in the history
  • Loading branch information
samlaf committed Jan 10, 2025
1 parent 72451c6 commit 496320e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions verify/verifier.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ func (v *Verifier) VerifyCert(ctx context.Context, cert *Certificate, args commo
batchRBN := int64(cert.BlobVerificationProof.BatchMetadata.BatchHeader.ReferenceBlockNumber)
rollupInclusionBlock := args.RollupL1InclusionBlockNum
// We need batchRBN < rollupInclusionBlock <= batch.RBN + rollupBlobInclusionWindow
// TODO: should we be using <= <= instead?
if !(batchRBN < rollupInclusionBlock) {
return fmt.Errorf("eigenda batch reference block number (%d) needs to be < rollup inclusion block number (%d)", batchRBN, rollupInclusionBlock)
}
Expand Down
2 changes: 1 addition & 1 deletion verify/verify_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ func TestVerifyCertRollupBlobInclusionWindow(t *testing.T) {
ctx, cancel = context.WithTimeout(context.Background(), 5*time.Second)
defer cancel()
err = verifier.VerifyCert(ctx, &cert, common.VerifyArgs{RollupL1InclusionBlockNum: int64(blobInfo.BlobVerificationProof.BatchMetadata.BatchHeader.ReferenceBlockNumber) + 200})
require.EqualError(t, err, "rollup inclusion block number (3106502) needs to be < eigenda batch reference block number (3106302) + rollupBlobInclusionWindow (100)")
require.EqualError(t, err, "rollup inclusion block number (3106502) needs to be <= eigenda batch reference block number (3106302) + rollupBlobInclusionWindow (100)")

// RBN-50 < RBN, so we expect an error to be caught
ctx, cancel = context.WithTimeout(context.Background(), 5*time.Second)
Expand Down

0 comments on commit 496320e

Please sign in to comment.