Skip to content

Commit

Permalink
Merge branch 'master' into remove-ttd-check
Browse files Browse the repository at this point in the history
  • Loading branch information
zilm13 authored Jan 6, 2025
2 parents 8f46715 + b4f7c2d commit c12b91e
Show file tree
Hide file tree
Showing 43 changed files with 261 additions and 1,046 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@

### Additions and Improvements
- Optimized blobs validation pipeline
- Remove delay when fetching blobs from the local EL on block arrival

### Bug Fixes

This file was deleted.

2 changes: 0 additions & 2 deletions data/serializer/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,9 @@ dependencies {
api 'io.swagger.core.v3:swagger-annotations'

implementation project(':ethereum:execution-types')
implementation project(':ethereum:jackson-deserializers')
implementation project(':ethereum:spec')
implementation project(':infrastructure:bls')
implementation project(':infrastructure:bytes')
implementation project(':infrastructure:jackson')
implementation project(':infrastructure:async')

implementation 'io.tmio:tuweni-units'
Expand Down

This file was deleted.

2 changes: 1 addition & 1 deletion ethereum/execution-types/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ dependencies {
implementation project(':infrastructure:crypto')
implementation project(':infrastructure:json')

testFixturesApi project(':infrastructure:jackson')
testFixturesApi 'com.fasterxml.jackson.core:jackson-databind'
testImplementation project(':ethereum:json-types')

testImplementation testFixtures(project(':infrastructure:json'))
Expand Down
5 changes: 0 additions & 5 deletions ethereum/jackson-deserializers/build.gradle

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,12 @@
import tech.pegasys.teku.spec.datastructures.blobs.versions.deneb.BlobSidecarSchema;
import tech.pegasys.teku.spec.datastructures.blocks.BeaconBlock;
import tech.pegasys.teku.spec.datastructures.blocks.SignedBeaconBlock;
import tech.pegasys.teku.spec.datastructures.blocks.SignedBeaconBlockHeader;
import tech.pegasys.teku.spec.datastructures.blocks.blockbody.BeaconBlockBody;
import tech.pegasys.teku.spec.datastructures.blocks.blockbody.versions.deneb.BeaconBlockBodyDeneb;
import tech.pegasys.teku.spec.datastructures.blocks.blockbody.versions.deneb.BeaconBlockBodySchemaDeneb;
import tech.pegasys.teku.spec.datastructures.execution.BlobAndProof;
import tech.pegasys.teku.spec.datastructures.networking.libp2p.rpc.BlobIdentifier;
import tech.pegasys.teku.spec.datastructures.type.SszKZGCommitment;
import tech.pegasys.teku.spec.datastructures.type.SszKZGProof;
import tech.pegasys.teku.spec.logic.common.helpers.MiscHelpers;
Expand Down Expand Up @@ -266,6 +270,32 @@ public BlobSidecar constructBlobSidecar(
index, blob, commitment, proof, signedBeaconBlock.asHeader(), kzgCommitmentInclusionProof);
}

public BlobSidecar constructBlobSidecarFromBlobAndProof(
final BlobIdentifier blobIdentifier,
final BlobAndProof blobAndProof,
final BeaconBlockBodyDeneb beaconBlockBodyDeneb,
final SignedBeaconBlockHeader signedBeaconBlockHeader) {

final SszKZGCommitment sszKZGCommitment =
beaconBlockBodyDeneb.getBlobKzgCommitments().get(blobIdentifier.getIndex().intValue());

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) {
if (blobSidecar.isKzgCommitmentInclusionProofValidated()) {
return true;
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading

0 comments on commit c12b91e

Please sign in to comment.