From 9126d627b0c80d52ea6bd463faf18576ab2a526b Mon Sep 17 00:00:00 2001 From: Stefan Bratanov Date: Mon, 16 Dec 2024 16:42:23 +0000 Subject: [PATCH] rebase fixes --- .../deneb/helpers/MiscHelpersDeneb.java | 24 ++++++++++++------- .../blobs/BlobSidecarManagerImpl.java | 4 +--- .../BlockBlobSidecarsTrackersPoolImpl.java | 2 +- 3 files changed, 17 insertions(+), 13 deletions(-) diff --git a/ethereum/spec/src/main/java/tech/pegasys/teku/spec/logic/versions/deneb/helpers/MiscHelpersDeneb.java b/ethereum/spec/src/main/java/tech/pegasys/teku/spec/logic/versions/deneb/helpers/MiscHelpersDeneb.java index bea7c222df7..87953843804 100644 --- a/ethereum/spec/src/main/java/tech/pegasys/teku/spec/logic/versions/deneb/helpers/MiscHelpersDeneb.java +++ b/ethereum/spec/src/main/java/tech/pegasys/teku/spec/logic/versions/deneb/helpers/MiscHelpersDeneb.java @@ -279,15 +279,21 @@ public BlobSidecar constructBlobSidecarFromBlobAndProof( final SszKZGCommitment sszKZGCommitment = beaconBlockBodyDeneb.getBlobKzgCommitments().get(blobIdentifier.getIndex().intValue()); - return blobSidecarSchema.create( - blobIdentifier.getIndex(), - blobAndProof.blob(), - sszKZGCommitment, - new SszKZGProof(blobAndProof.proof()), - signedBeaconBlockHeader, - computeKzgCommitmentInclusionProof(blobIdentifier.getIndex(), beaconBlockBodyDeneb)); - - + final BlobSidecar blobSidecar = + blobSidecarSchema.create( + blobIdentifier.getIndex(), + blobAndProof.blob(), + sszKZGCommitment, + new SszKZGProof(blobAndProof.proof()), + signedBeaconBlockHeader, + computeKzgCommitmentInclusionProof(blobIdentifier.getIndex(), beaconBlockBodyDeneb)); + + blobSidecar.markSignatureAsValidated(); + blobSidecar.markKzgCommitmentInclusionProofAsValidated(); + // assume kzg validation done by local EL + blobSidecar.markKzgAsValidated(); + + return blobSidecar; } public boolean verifyBlobKzgCommitmentInclusionProof(final BlobSidecar blobSidecar) { diff --git a/ethereum/statetransition/src/main/java/tech/pegasys/teku/statetransition/blobs/BlobSidecarManagerImpl.java b/ethereum/statetransition/src/main/java/tech/pegasys/teku/statetransition/blobs/BlobSidecarManagerImpl.java index fc20d0c60e8..22609e00b69 100644 --- a/ethereum/statetransition/src/main/java/tech/pegasys/teku/statetransition/blobs/BlobSidecarManagerImpl.java +++ b/ethereum/statetransition/src/main/java/tech/pegasys/teku/statetransition/blobs/BlobSidecarManagerImpl.java @@ -66,9 +66,7 @@ public BlobSidecarManagerImpl( invalidBlobSidecarRoots, (tracker) -> new ForkChoiceBlobSidecarsAvailabilityChecker(spec, recentChainData, tracker, kzg), - // we don't care to set maxBlobsPerBlock since it isn't used with this immediate validation - // flow - (block) -> new BlockBlobSidecarsTracker(block.getSlotAndBlockRoot(), UInt64.ZERO)); + (block) -> new BlockBlobSidecarsTracker(block.getSlotAndBlockRoot())); } @VisibleForTesting diff --git a/ethereum/statetransition/src/main/java/tech/pegasys/teku/statetransition/util/BlockBlobSidecarsTrackersPoolImpl.java b/ethereum/statetransition/src/main/java/tech/pegasys/teku/statetransition/util/BlockBlobSidecarsTrackersPoolImpl.java index d4aedb221fd..87000cc5da0 100644 --- a/ethereum/statetransition/src/main/java/tech/pegasys/teku/statetransition/util/BlockBlobSidecarsTrackersPoolImpl.java +++ b/ethereum/statetransition/src/main/java/tech/pegasys/teku/statetransition/util/BlockBlobSidecarsTrackersPoolImpl.java @@ -493,7 +493,7 @@ private BlockBlobSidecarsTracker internalOnNewBlock( // if we attempted to fetch this block via RPC, we missed the opportunity to // complete the blob sidecars via local EL and RPC (since the block is required to // be known) Let's try now - if (!existingTracker.isCompleted()) { + if (!existingTracker.isComplete()) { fetchMissingContent(slotAndBlockRoot).finish(this::logMissingContentFetchFailure); } }