Skip to content

Commit

Permalink
Rebase on master fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanBratanov committed Oct 2, 2024
1 parent 06a1a69 commit 7514f95
Show file tree
Hide file tree
Showing 49 changed files with 432 additions and 627 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@
import tech.pegasys.teku.spec.datastructures.execution.ExecutionPayloadContext;
import tech.pegasys.teku.spec.datastructures.execution.ExecutionPayloadResult;
import tech.pegasys.teku.spec.datastructures.execution.SignedExecutionPayloadHeader;
import tech.pegasys.teku.spec.datastructures.execution.versions.electra.ExecutionRequestsBuilderElectra;
import tech.pegasys.teku.spec.datastructures.execution.versions.eip7732.ExecutionPayloadHeaderEip7732;
import tech.pegasys.teku.spec.datastructures.execution.versions.electra.ExecutionRequestsBuilderElectra;
import tech.pegasys.teku.spec.datastructures.operations.Attestation;
import tech.pegasys.teku.spec.datastructures.operations.AttesterSlashing;
import tech.pegasys.teku.spec.datastructures.operations.ProposerSlashing;
Expand All @@ -66,7 +66,6 @@
import tech.pegasys.teku.spec.schemas.SchemaDefinitions;
import tech.pegasys.teku.spec.schemas.SchemaDefinitionsBellatrix;
import tech.pegasys.teku.spec.schemas.SchemaDefinitionsDeneb;
import tech.pegasys.teku.spec.schemas.SchemaDefinitionsEip7732;
import tech.pegasys.teku.spec.schemas.SchemaDefinitionsElectra;
import tech.pegasys.teku.statetransition.OperationPool;
import tech.pegasys.teku.statetransition.attestation.AggregatingAttestationPool;
Expand Down Expand Up @@ -281,7 +280,7 @@ private SafeFuture<Void> setExecutionData(
if (bodyBuilder.supportsExecutionRequests()) {
bodyBuilder.executionRequests(
new ExecutionRequestsBuilderElectra(
SchemaDefinitionsElectra.required(schemaDefinitions).getExecutionRequestsSchema())
SchemaDefinitionsElectra.required(schemaDefinitions).getExecutionRequestsSchema())
.build());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
import tech.pegasys.teku.spec.datastructures.execution.GetPayloadResponse;
import tech.pegasys.teku.spec.datastructures.execution.SignedExecutionPayloadEnvelope;
import tech.pegasys.teku.spec.datastructures.execution.versions.eip7732.ExecutionPayloadHeaderEip7732;
import tech.pegasys.teku.spec.datastructures.execution.versions.electra.ExecutionRequestsSchema;
import tech.pegasys.teku.spec.datastructures.state.beaconstate.BeaconState;
import tech.pegasys.teku.spec.datastructures.type.SszKZGCommitment;
import tech.pegasys.teku.spec.datastructures.type.SszKZGProof;
Expand Down Expand Up @@ -81,11 +82,15 @@ public Optional<ExecutionPayloadEnvelope> revealExecutionPayload(
schemaDefinitions
.getBlobKzgCommitmentsSchema()
.createFromBlobsBundle(getPayloadResponse.getBlobsBundle().orElseThrow());
final ExecutionRequestsSchema executionRequestsSchema =
schemaDefinitions.getExecutionRequestsSchema();
final ExecutionPayloadEnvelope executionPayload =
schemaDefinitions
.getExecutionPayloadEnvelopeSchema()
.create(
getPayloadResponse.getExecutionPayload(),
// EIP7732 TODO: engine-API still in discussion
executionRequestsSchema.create(List.of(), List.of(), List.of()),
committedHeader.getBuilderIndex(),
block.getRoot(),
blobKzgCommitments,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"in" : "header",
"schema" : {
"type" : "string",
"enum" : [ "phase0", "altair", "bellatrix", "capella", "deneb", "electra" ],
"enum" : [ "phase0", "altair", "bellatrix", "capella", "deneb", "electra", "eip7732" ],
"description" : "Version of the block being submitted, if using SSZ encoding."
}
} ],
Expand Down Expand Up @@ -38,6 +38,8 @@
"$ref" : "#/components/schemas/SignedBlindedBlockDeneb"
}, {
"$ref" : "#/components/schemas/SignedBlindedBlockElectra"
}, {
"$ref" : "#/components/schemas/SignedBlindedBlockEip7732"
} ]
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,13 @@
"200" : {
"description" : "Request successful",
"headers" : {
"Eth-Consensus-Version": {
"description": "Required in response so client can deserialize returned json or ssz data more effectively.",
"required": true,
"schema": {
"type": "string",
"enum": [
"phase0",
"altair",
"bellatrix",
"capella",
"deneb",
"electra"
],
"example": "phase0"
"Eth-Consensus-Version" : {
"description" : "Required in response so client can deserialize returned json or ssz data more effectively.",
"required" : true,
"schema" : {
"type" : "string",
"enum" : [ "phase0", "altair", "bellatrix", "capella", "deneb", "electra", "eip7732" ],
"example" : "phase0"
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@
"bellatrix",
"capella",
"deneb",
"electra"
"electra",
"eip7732"
],
"example": "phase0"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"in" : "header",
"schema" : {
"type" : "string",
"enum" : [ "phase0", "altair", "bellatrix", "capella", "deneb", "electra" ],
"enum" : [ "phase0", "altair", "bellatrix", "capella", "deneb", "electra", "eip7732" ],
"description" : "Version of the block being submitted."
}
} ],
Expand Down Expand Up @@ -48,6 +48,8 @@
"$ref" : "#/components/schemas/SignedBlindedBlockDeneb"
}, {
"$ref" : "#/components/schemas/SignedBlindedBlockElectra"
}, {
"$ref" : "#/components/schemas/SignedBlindedBlockEip7732"
} ]
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"in" : "header",
"schema" : {
"type" : "string",
"enum" : [ "phase0", "altair", "bellatrix", "capella", "deneb", "electra" ],
"enum" : [ "phase0", "altair", "bellatrix", "capella", "deneb", "electra", "eip7732" ],
"description" : "Version of the block being submitted."
}
} ],
Expand Down Expand Up @@ -48,6 +48,8 @@
"$ref" : "#/components/schemas/SignedBlockContentsDeneb"
}, {
"$ref" : "#/components/schemas/SignedBlockContentsElectra"
}, {
"$ref" : "#/components/schemas/SignedBlockContentsEip7732"
} ]
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,13 @@
"200" : {
"description" : "Request successful",
"headers" : {
"Eth-Consensus-Version": {
"description": "Required in response so client can deserialize returned json or ssz data more effectively.",
"required": true,
"schema": {
"type": "string",
"enum": [
"phase0",
"altair",
"bellatrix",
"capella",
"deneb",
"electra"
],
"example": "phase0"
"Eth-Consensus-Version" : {
"description" : "Required in response so client can deserialize returned json or ssz data more effectively.",
"required" : true,
"schema" : {
"type" : "string",
"enum" : [ "phase0", "altair", "bellatrix", "capella", "deneb", "electra", "eip7732" ],
"example" : "phase0"
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,13 @@
"200" : {
"description" : "Request successful",
"headers" : {
"Eth-Consensus-Version": {
"description": "Required in response so client can deserialize returned json or ssz data more effectively.",
"required": true,
"schema": {
"type": "string",
"enum": [
"phase0",
"altair",
"bellatrix",
"capella",
"deneb",
"electra"
],
"example": "phase0"
"Eth-Consensus-Version" : {
"description" : "Required in response so client can deserialize returned json or ssz data more effectively.",
"required" : true,
"schema" : {
"type" : "string",
"enum" : [ "phase0", "altair", "bellatrix", "capella", "deneb", "electra", "eip7732" ],
"example" : "phase0"
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,13 @@
"200" : {
"description" : "Request successful",
"headers" : {
"Eth-Consensus-Version": {
"description": "Required in response so client can deserialize returned json or ssz data more effectively.",
"required": true,
"schema": {
"type": "string",
"enum": [
"phase0",
"altair",
"bellatrix",
"capella",
"deneb",
"electra"
],
"example": "phase0"
"Eth-Consensus-Version" : {
"description" : "Required in response so client can deserialize returned json or ssz data more effectively.",
"required" : true,
"schema" : {
"type" : "string",
"enum" : [ "phase0", "altair", "bellatrix", "capella", "deneb", "electra", "eip7732" ],
"example" : "phase0"
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,13 @@
"200" : {
"description" : "Request successful",
"headers" : {
"Eth-Consensus-Version": {
"description": "Required in response so client can deserialize returned json or ssz data more effectively.",
"required": true,
"schema": {
"type": "string",
"enum": [
"phase0",
"altair",
"bellatrix",
"capella",
"deneb",
"electra"
],
"example": "phase0"
"Eth-Consensus-Version" : {
"description" : "Required in response so client can deserialize returned json or ssz data more effectively.",
"required" : true,
"schema" : {
"type" : "string",
"enum" : [ "phase0", "altair", "bellatrix", "capella", "deneb", "electra", "eip7732" ],
"example" : "phase0"
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,20 +39,13 @@
"200" : {
"description" : "Request successful",
"headers" : {
"Eth-Consensus-Version": {
"description": "Required in response so client can deserialize returned json or ssz data more effectively.",
"required": true,
"schema": {
"type": "string",
"enum": [
"phase0",
"altair",
"bellatrix",
"capella",
"deneb",
"electra"
],
"example": "phase0"
"Eth-Consensus-Version" : {
"description" : "Required in response so client can deserialize returned json or ssz data more effectively.",
"required" : true,
"schema" : {
"type" : "string",
"enum" : [ "phase0", "altair", "bellatrix", "capella", "deneb", "electra", "eip7732" ],
"example" : "phase0"
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,44 +56,37 @@
"responses" : {
"200" : {
"description" : "Request successful",
"headers": {
"Eth-Consensus-Version": {
"description": "Required in response so client can deserialize returned json or ssz data more effectively.",
"required": true,
"schema": {
"type": "string",
"enum": [
"phase0",
"altair",
"bellatrix",
"capella",
"deneb",
"electra"
],
"example": "phase0"
"headers" : {
"Eth-Consensus-Version" : {
"description" : "Required in response so client can deserialize returned json or ssz data more effectively.",
"required" : true,
"schema" : {
"type" : "string",
"enum" : [ "phase0", "altair", "bellatrix", "capella", "deneb", "electra", "eip7732" ],
"example" : "phase0"
}
},
"Eth-Execution-Payload-Blinded": {
"description": "Required in response so client can deserialize returned json or ssz data to the correct object.",
"required": true,
"schema": {
"type": "boolean"
"Eth-Execution-Payload-Blinded" : {
"description" : "Required in response so client can deserialize returned json or ssz data to the correct object.",
"required" : true,
"schema" : {
"type" : "boolean"
}
},
"Eth-Execution-Payload-Value": {
"description": "Execution payload value in Wei. Required in response so client can determine relative value of execution payloads.",
"required": true,
"schema": {
"type": "string",
"example": "1"
"Eth-Execution-Payload-Value" : {
"description" : "Execution payload value in Wei. Required in response so client can determine relative value of execution payloads.",
"required" : true,
"schema" : {
"type" : "string",
"example" : "1"
}
},
"Eth-Consensus-Block-Value": {
"description": "Consensus rewards paid to the proposer for this block, in Wei. Required in response so client can determine relative value of consensus blocks.",
"required": true,
"schema": {
"type": "string",
"example": "1"
"Eth-Consensus-Block-Value" : {
"description" : "Consensus rewards paid to the proposer for this block, in Wei. Required in response so client can determine relative value of consensus blocks.",
"required" : true,
"schema" : {
"type" : "string",
"example" : "1"
}
}
},
Expand Down
Loading

0 comments on commit 7514f95

Please sign in to comment.