diff --git a/verify/verifier.go b/verify/verifier.go index 23845a0..9b74072 100644 --- a/verify/verifier.go +++ b/verify/verifier.go @@ -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) } diff --git a/verify/verify_test.go b/verify/verify_test.go index 310c2e6..dbcf72c 100644 --- a/verify/verify_test.go +++ b/verify/verify_test.go @@ -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)