Skip to content

Commit

Permalink
Merge branch 'remove-ttd-check' into pow-block-no-td
Browse files Browse the repository at this point in the history
  • Loading branch information
zilm13 committed Jan 8, 2025
2 parents b586aeb + 68989d4 commit b264112
Show file tree
Hide file tree
Showing 46 changed files with 341 additions and 1,075 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 @@ -751,6 +751,9 @@ private Builder reset() {
eth1DepositContractAddress = null;
eth1DepositContractDeployBlock = Optional.empty();
trustedSetup = Optional.empty();
terminalBlockHashOverride = Optional.empty();
terminalBlockHashEpochOverride = Optional.empty();
totalTerminalDifficultyOverride = Optional.empty();
return this;
}

Expand Down Expand Up @@ -802,7 +805,11 @@ public Builder applyMainnetNetworkDefaults() {

// Nimbus
"enr:-LK4QA8FfhaAjlb_BXsXxSfiysR7R52Nhi9JBt4F8SPssu8hdE1BXQQEtVDC3qStCW60LSO7hEsVHv5zm8_6Vnjhcn0Bh2F0dG5ldHOIAAAAAAAAAACEZXRoMpC1MD8qAAAAAP__________gmlkgnY0gmlwhAN4aBKJc2VjcDI1NmsxoQJerDhsJ-KxZ8sHySMOCmTO6sHM3iCFQ6VMvLTe948MyYN0Y3CCI4yDdWRwgiOM",
"enr:-LK4QKWrXTpV9T78hNG6s8AM6IO4XH9kFT91uZtFg1GcsJ6dKovDOr1jtAAFPnS2lvNltkOGA9k29BUN7lFh_sjuc9QBh2F0dG5ldHOIAAAAAAAAAACEZXRoMpC1MD8qAAAAAP__________gmlkgnY0gmlwhANAdd-Jc2VjcDI1NmsxoQLQa6ai7y9PMN5hpLe5HmiJSlYzMuzP7ZhwRiwHvqNXdoN0Y3CCI4yDdWRwgiOM");
"enr:-LK4QKWrXTpV9T78hNG6s8AM6IO4XH9kFT91uZtFg1GcsJ6dKovDOr1jtAAFPnS2lvNltkOGA9k29BUN7lFh_sjuc9QBh2F0dG5ldHOIAAAAAAAAAACEZXRoMpC1MD8qAAAAAP__________gmlkgnY0gmlwhANAdd-Jc2VjcDI1NmsxoQLQa6ai7y9PMN5hpLe5HmiJSlYzMuzP7ZhwRiwHvqNXdoN0Y3CCI4yDdWRwgiOM")
.terminalBlockHashEpochOverride(UInt64.valueOf(146875))
.terminalBlockHashOverride(
Bytes32.fromHexString(
"0x55b11b918355b1ef9c5db810302ebad0bf2544255b530cdce90674d5887bb286"));
}

private Builder applySepoliaNetworkDefaults() {
Expand All @@ -827,7 +834,11 @@ private Builder applySepoliaNetworkDefaults() {
// Another bootnode
"enr:-L64QC9Hhov4DhQ7mRukTOz4_jHm4DHlGL726NWH4ojH1wFgEwSin_6H95Gs6nW2fktTWbPachHJ6rUFu0iJNgA0SB2CARqHYXR0bmV0c4j__________4RldGgykDb6UBOQAABx__________-CaWSCdjSCaXCEA-2vzolzZWNwMjU2azGhA17lsUg60R776rauYMdrAz383UUgESoaHEzMkvm4K6k6iHN5bmNuZXRzD4N0Y3CCIyiDdWRwgiMo",
// Lodestart bootnode
"enr:-KG4QJejf8KVtMeAPWFhN_P0c4efuwu1pZHELTveiXUeim6nKYcYcMIQpGxxdgT2Xp9h-M5pr9gn2NbbwEAtxzu50Y8BgmlkgnY0gmlwhEEVkQCDaXA2kCoBBPnAEJg4AAAAAAAAAAGJc2VjcDI1NmsxoQLEh_eVvk07AQABvLkTGBQTrrIOQkzouMgSBtNHIRUxOIN1ZHCCIyiEdWRwNoIjKA");
"enr:-KG4QJejf8KVtMeAPWFhN_P0c4efuwu1pZHELTveiXUeim6nKYcYcMIQpGxxdgT2Xp9h-M5pr9gn2NbbwEAtxzu50Y8BgmlkgnY0gmlwhEEVkQCDaXA2kCoBBPnAEJg4AAAAAAAAAAGJc2VjcDI1NmsxoQLEh_eVvk07AQABvLkTGBQTrrIOQkzouMgSBtNHIRUxOIN1ZHCCIyiEdWRwNoIjKA")
.terminalBlockHashEpochOverride(UInt64.valueOf(3599))
.terminalBlockHashOverride(
Bytes32.fromHexString(
"0xd07cce9785d39c0dd2409b7d8e69d6bff26a69a0fa5308ac781c63ffe2a37bc1"));
}

private Builder applyLuksoNetworkDefaults() {
Expand Down Expand Up @@ -860,7 +871,11 @@ public Builder applyGnosisNetworkDefaults() {
"enr:-Ly4QCD5D99p36WafgTSxB6kY7D2V1ca71C49J4VWI2c8UZCCPYBvNRWiv0-HxOcbpuUdwPVhyWQCYm1yq2ZH0ukCbQBh2F0dG5ldHOIAAAAAAAAAACEZXRoMpCCS-QxAgAAZP__________gmlkgnY0gmlwhI1eYVSJc2VjcDI1NmsxoQJJMSV8iSZ8zvkgbi8cjIGEUVJeekLqT0LQha_co-siT4hzeW5jbmV0cwCDdGNwgiMog3VkcIIjKA",
"enr:-KK4QKXJq1QOVWuJAGige4uaT8LRPQGCVRf3lH3pxjaVScMRUfFW1eiiaz8RwOAYvw33D4EX-uASGJ5QVqVCqwccxa-Bi4RldGgykCGm-DYDAABk__________-CaWSCdjSCaXCEM0QnzolzZWNwMjU2azGhAhNvrRkpuK4MWTf3WqiOXSOePL8Zc-wKVpZ9FQx_BDadg3RjcIIjKIN1ZHCCIyg",
"enr:-LO4QO87Rn2ejN3SZdXkx7kv8m11EZ3KWWqoIN5oXwQ7iXR9CVGd1dmSyWxOL1PGsdIqeMf66OZj4QGEJckSi6okCdWBpIdhdHRuZXRziAAAAABgAAAAhGV0aDKQPr_UhAQAAGT__________4JpZIJ2NIJpcIQj0iX1iXNlY3AyNTZrMaEDd-_eqFlWWJrUfEp8RhKT9NxdYaZoLHvsp3bbejPyOoeDdGNwgiMog3VkcIIjKA",
"enr:-LK4QIJUAxX9uNgW4ACkq8AixjnSTcs9sClbEtWRq9F8Uy9OEExsr4ecpBTYpxX66cMk6pUHejCSX3wZkK2pOCCHWHEBh2F0dG5ldHOIAAAAAAAAAACEZXRoMpA-v9SEBAAAZP__________gmlkgnY0gmlwhCPSnDuJc2VjcDI1NmsxoQNuaAjFE-ANkH3pbeBdPiEIwjR5kxFuKaBWxHkqFuPz5IN0Y3CCIyiDdWRwgiMo");
"enr:-LK4QIJUAxX9uNgW4ACkq8AixjnSTcs9sClbEtWRq9F8Uy9OEExsr4ecpBTYpxX66cMk6pUHejCSX3wZkK2pOCCHWHEBh2F0dG5ldHOIAAAAAAAAAACEZXRoMpA-v9SEBAAAZP__________gmlkgnY0gmlwhCPSnDuJc2VjcDI1NmsxoQNuaAjFE-ANkH3pbeBdPiEIwjR5kxFuKaBWxHkqFuPz5IN0Y3CCIyiDdWRwgiMo")
.terminalBlockHashEpochOverride(UInt64.valueOf(394147))
.terminalBlockHashOverride(
Bytes32.fromHexString(
"0xf5cff68065ac6014bb7c9aa731d4d4084de0994f807ac1df3856308b3c9b2b48"));
}

public Builder applyChiadoNetworkDefaults() {
Expand Down Expand Up @@ -891,7 +906,11 @@ public Builder applyChiadoNetworkDefaults() {
// GnosisDAO Bootnode: 35.206.174.92
"enr:-KG4QF7z4LUdMfgwvh-fS-MDv_1hPSUCqGfyOWGLNJuoBHKFAMSHz8geQn8v3qDDbuSQKud3WIAjKqR4gqJoLBUEJ08ZhGV0aDKQDc1ElgAAAG___________4JpZIJ2NIJpcIQjzq5ciXNlY3AyNTZrMaECt7YO363pV54d3QdgnluL5kxzhCR_k0yM9C-G6bqMGoKDdGNwgiMog3VkcIIjKA",
// GnosisDAO Bootnode: 35.210.126.23
"enr:-LK4QCUTEmZrT1AgCKdyVgwnHL5J0VSoxsyjruAtwo-owBTBVEOyAnQRVNXlcW5aL-ycntk5oHDrKCR-DXZAlUAKpjEBh2F0dG5ldHOIAAAAAAAAAACEZXRoMpCdM7Z1BAAAb___________gmlkgnY0gmlwhCPSfheJc2VjcDI1NmsxoQNpdf8U9pzsU9m6Hzgd1rmTI-On-QImJnkZBGqDp4org4N0Y3CCIyiDdWRwgiMo");
"enr:-LK4QCUTEmZrT1AgCKdyVgwnHL5J0VSoxsyjruAtwo-owBTBVEOyAnQRVNXlcW5aL-ycntk5oHDrKCR-DXZAlUAKpjEBh2F0dG5ldHOIAAAAAAAAAACEZXRoMpCdM7Z1BAAAb___________gmlkgnY0gmlwhCPSfheJc2VjcDI1NmsxoQNpdf8U9pzsU9m6Hzgd1rmTI-On-QImJnkZBGqDp4org4N0Y3CCIyiDdWRwgiMo")
.terminalBlockHashEpochOverride(UInt64.valueOf(27263))
.terminalBlockHashOverride(
Bytes32.fromHexString(
"0x39f44fc16dc964e8d2d1637b99e12992be4a4f766a66658da730e20e511ced64"));
}

private Builder applyHoleskyNetworkDefaults() {
Expand Down
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 b264112

Please sign in to comment.