diff --git a/beacon/validator/src/main/java/tech/pegasys/teku/validator/coordinator/publisher/AbstractBlockPublisher.java b/beacon/validator/src/main/java/tech/pegasys/teku/validator/coordinator/publisher/AbstractBlockPublisher.java index 922bb8f7efd..a64f7e262e9 100644 --- a/beacon/validator/src/main/java/tech/pegasys/teku/validator/coordinator/publisher/AbstractBlockPublisher.java +++ b/beacon/validator/src/main/java/tech/pegasys/teku/validator/coordinator/publisher/AbstractBlockPublisher.java @@ -61,7 +61,7 @@ public SafeFuture sendSignedBlock( .thenCompose( signedBlock -> { // creating blob sidecars after unblinding the block to ensure in the blinded flow we - // already have cached the builder payload + // will have the cached builder payload final List blobSidecars = blockFactory.createBlobSidecars(blockContainer); return gossipAndImportUnblindedSignedBlockAndBlobSidecars( diff --git a/ethereum/spec/src/testFixtures/java/tech/pegasys/teku/spec/util/DataStructureUtil.java b/ethereum/spec/src/testFixtures/java/tech/pegasys/teku/spec/util/DataStructureUtil.java index 71dbef4bbcf..d7a49cb3dbc 100644 --- a/ethereum/spec/src/testFixtures/java/tech/pegasys/teku/spec/util/DataStructureUtil.java +++ b/ethereum/spec/src/testFixtures/java/tech/pegasys/teku/spec/util/DataStructureUtil.java @@ -2561,7 +2561,7 @@ public BlobSidecar build() { .getBlobSidecarSchema(); return blobSidecarSchema.create( - index.orElse(randomUInt64()), + index.orElse(randomBlobSidecarIndex()), blob.orElse(randomBytes(blobSidecarSchema.getBlobSchema().getLength())), kzgCommitment.orElse(randomBytes48()), kzgProof.orElse(randomBytes48()), @@ -2612,6 +2612,10 @@ public RewardAndPenaltyDeltas randomRewardAndPenaltyDeltas(final int validatorCo return rewardAndPenaltyDeltas; } + private UInt64 randomBlobSidecarIndex() { + return randomUInt64(spec.getMaxBlobsPerBlock().orElseThrow()); + } + private int randomNumberOfBlobsPerBlock() { // minimum 1 blob return randomInt(1, spec.getMaxBlobsPerBlock().orElseThrow() + 1);