diff --git a/eth-reference-tests/src/referenceTest/java/tech/pegasys/teku/reference/phase0/forkchoice/StubBlobSidecarManager.java b/eth-reference-tests/src/referenceTest/java/tech/pegasys/teku/reference/phase0/forkchoice/StubBlobSidecarManager.java index a8608be6960..f2d520a1fb4 100644 --- a/eth-reference-tests/src/referenceTest/java/tech/pegasys/teku/reference/phase0/forkchoice/StubBlobSidecarManager.java +++ b/eth-reference-tests/src/referenceTest/java/tech/pegasys/teku/reference/phase0/forkchoice/StubBlobSidecarManager.java @@ -95,11 +95,7 @@ public SafeFuture getAvailabilityCheckResult() if (blobsAndProofs == null) { return SafeFuture.completedFuture(BlobSidecarsAndValidationResult.NOT_REQUIRED); } - try { - return SafeFuture.completedFuture(validateImmediately(block, blobsAndProofs)); - } catch (RuntimeException e) { - return SafeFuture.completedFuture(BlobSidecarsAndValidationResult.notAvailable(e)); - } + return SafeFuture.completedFuture(validateImmediately(block, blobsAndProofs)); } private BlobSidecarsAndValidationResult validateImmediately( @@ -111,8 +107,12 @@ private BlobSidecarsAndValidationResult validateImmediately( .map(SszKZGCommitment::getKZGCommitment) .toList(); final List blobs = blobsAndProofs.blobs.stream().map(Blob::getBytes).toList(); - if (!kzg.verifyBlobKzgProofBatch(blobs, kzgCommitments, blobsAndProofs.proofs)) { - throw new RuntimeException("Invalid KZG proof"); + try { + if (!kzg.verifyBlobKzgProofBatch(blobs, kzgCommitments, blobsAndProofs.proofs)) { + return BlobSidecarsAndValidationResult.invalidResult(Collections.emptyList()); + } + } catch (final Exception ex) { + return BlobSidecarsAndValidationResult.invalidResult(Collections.emptyList(), ex); } return BlobSidecarsAndValidationResult.validResult(Collections.emptyList()); }