Skip to content

Commit 31709ce

Browse files
Containers required for Gloas' BeaconBlockBody (#9806)
1 parent 49ea13b commit 31709ce

File tree

84 files changed

+3364
-272
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+3364
-272
lines changed

acceptance-tests/src/acceptance-test/java/tech/pegasys/teku/test/acceptance/MergedGenesisInteropModeAcceptanceTest.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@
2727
public class MergedGenesisInteropModeAcceptanceTest extends AcceptanceTestBase {
2828

2929
@ParameterizedTest
30-
@EnumSource(SpecMilestone.class)
30+
// TODO-GLOAS Fix test https://github.com/Consensys/teku/issues/9833
31+
@EnumSource(value = SpecMilestone.class, names = "GLOAS", mode = EnumSource.Mode.EXCLUDE)
3132
public void startFromMergedStatePerMilestoneUsingTerminalBlockHash(
3233
final SpecMilestone specMilestone) throws Exception {
3334
if (specMilestone.isGreaterThanOrEqualTo(SpecMilestone.CAPELLA)) {
@@ -47,7 +48,8 @@ public void startFromMergedStatePerMilestoneUsingTerminalBlockHash(
4748
}
4849

4950
@ParameterizedTest
50-
@EnumSource(SpecMilestone.class)
51+
// TODO-GLOAS Fix test https://github.com/Consensys/teku/issues/9833
52+
@EnumSource(value = SpecMilestone.class, names = "GLOAS", mode = EnumSource.Mode.EXCLUDE)
5153
public void startFromMergedStatePerMilestoneUsingTotalDifficultySimulation(
5254
final SpecMilestone specMilestone) throws Exception {
5355
if (specMilestone.isGreaterThanOrEqualTo(SpecMilestone.CAPELLA)) {

beacon/validator/src/test/java/tech/pegasys/teku/validator/coordinator/BlockOperationSelectorFactoryTest.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@
5353
import tech.pegasys.teku.spec.datastructures.blocks.blockbody.common.AbstractSignedBeaconBlockUnblinder;
5454
import tech.pegasys.teku.spec.datastructures.blocks.blockbody.versions.altair.SyncAggregate;
5555
import tech.pegasys.teku.spec.datastructures.builder.BuilderBid;
56+
import tech.pegasys.teku.spec.datastructures.epbs.versions.gloas.PayloadAttestation;
57+
import tech.pegasys.teku.spec.datastructures.epbs.versions.gloas.SignedExecutionPayloadHeader;
5658
import tech.pegasys.teku.spec.datastructures.execution.BlobsBundle;
5759
import tech.pegasys.teku.spec.datastructures.execution.BuilderBidOrFallbackData;
5860
import tech.pegasys.teku.spec.datastructures.execution.BuilderPayloadOrFallbackData;
@@ -1034,6 +1036,18 @@ public BeaconBlockBodyBuilder blobKzgCommitments(
10341036
return this;
10351037
}
10361038

1039+
@Override
1040+
public BeaconBlockBodyBuilder signedExecutionPayloadHeader(
1041+
final SignedExecutionPayloadHeader signedExecutionPayloadHeader) {
1042+
return this;
1043+
}
1044+
1045+
@Override
1046+
public BeaconBlockBodyBuilder payloadAttestations(
1047+
final SszList<PayloadAttestation> payloadAttestations) {
1048+
return this;
1049+
}
1050+
10371051
@Override
10381052
public BeaconBlockBody build() {
10391053
return null;

data/beaconrestapi/src/integration-test/java/tech/pegasys/teku/beaconrestapi/v3/GetNewBlockV3IntegrationTest.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
import static tech.pegasys.teku.infrastructure.unsigned.UInt64.ONE;
2929
import static tech.pegasys.teku.spec.SpecMilestone.BELLATRIX;
3030
import static tech.pegasys.teku.spec.SpecMilestone.DENEB;
31+
import static tech.pegasys.teku.spec.SpecMilestone.GLOAS;
3132

3233
import com.fasterxml.jackson.databind.JsonNode;
3334
import com.google.common.io.Resources;
@@ -57,7 +58,8 @@
5758
import tech.pegasys.teku.spec.datastructures.metadata.BlockContainerAndMetaData;
5859
import tech.pegasys.teku.spec.util.DataStructureUtil;
5960

60-
@TestSpecContext(allMilestones = true)
61+
// TODO-GLOAS Fix test https://github.com/Consensys/teku/issues/9833
62+
@TestSpecContext(allMilestones = true, ignoredMilestones = GLOAS)
6163
public class GetNewBlockV3IntegrationTest extends AbstractDataBackedRestAPIIntegrationTest {
6264

6365
private static final Logger LOG = LogManager.getLogger();

data/beaconrestapi/src/integration-test/resources/tech/pegasys/teku/beaconrestapi/beacon/paths/_eth_v1_beacon_blinded_blocks.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@
3838
"$ref" : "#/components/schemas/SignedBlindedBeaconBlockDeneb"
3939
}, {
4040
"$ref" : "#/components/schemas/SignedBlindedBeaconBlockElectra"
41+
}, {
42+
"$ref" : "#/components/schemas/SignedBlindedBeaconBlockGloas"
4143
} ]
4244
}
4345
}

data/beaconrestapi/src/integration-test/resources/tech/pegasys/teku/beaconrestapi/beacon/paths/_eth_v1_beacon_blocks.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@
4040
"$ref" : "#/components/schemas/SignedBlockContentsElectra"
4141
}, {
4242
"$ref" : "#/components/schemas/SignedBlockContentsFulu"
43+
}, {
44+
"$ref" : "#/components/schemas/SignedBlockContentsGloas"
4345
} ]
4446
}
4547
}

data/beaconrestapi/src/integration-test/resources/tech/pegasys/teku/beaconrestapi/beacon/paths/_eth_v2_beacon_blinded_blocks.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@
4848
"$ref" : "#/components/schemas/SignedBlindedBeaconBlockDeneb"
4949
}, {
5050
"$ref" : "#/components/schemas/SignedBlindedBeaconBlockElectra"
51+
}, {
52+
"$ref" : "#/components/schemas/SignedBlindedBeaconBlockGloas"
5153
} ]
5254
}
5355
}

data/beaconrestapi/src/integration-test/resources/tech/pegasys/teku/beaconrestapi/beacon/paths/_eth_v2_beacon_blocks.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@
5050
"$ref" : "#/components/schemas/SignedBlockContentsElectra"
5151
}, {
5252
"$ref" : "#/components/schemas/SignedBlockContentsFulu"
53+
}, {
54+
"$ref" : "#/components/schemas/SignedBlockContentsGloas"
5355
} ]
5456
}
5557
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
{
2+
"title" : "BeaconBlockBodyGloas",
3+
"type" : "object",
4+
"required" : [ "randao_reveal", "eth1_data", "graffiti", "proposer_slashings", "attester_slashings", "attestations", "deposits", "voluntary_exits", "sync_aggregate", "bls_to_execution_changes", "signed_execution_payload_header", "payload_attestations" ],
5+
"properties" : {
6+
"randao_reveal" : {
7+
"type" : "string",
8+
"pattern" : "^0x[a-fA-F0-9]{2,}$",
9+
"description" : "SSZ hexadecimal",
10+
"format" : "bytes"
11+
},
12+
"eth1_data" : {
13+
"$ref" : "#/components/schemas/Eth1Data"
14+
},
15+
"graffiti" : {
16+
"type" : "string",
17+
"description" : "Bytes32 hexadecimal",
18+
"example" : "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
19+
"format" : "byte"
20+
},
21+
"proposer_slashings" : {
22+
"type" : "array",
23+
"items" : {
24+
"$ref" : "#/components/schemas/ProposerSlashing"
25+
}
26+
},
27+
"attester_slashings" : {
28+
"type" : "array",
29+
"items" : {
30+
"$ref" : "#/components/schemas/AttesterSlashingElectra"
31+
}
32+
},
33+
"attestations" : {
34+
"type" : "array",
35+
"items" : {
36+
"$ref" : "#/components/schemas/AttestationElectra"
37+
}
38+
},
39+
"deposits" : {
40+
"type" : "array",
41+
"items" : {
42+
"$ref" : "#/components/schemas/Deposit"
43+
}
44+
},
45+
"voluntary_exits" : {
46+
"type" : "array",
47+
"items" : {
48+
"$ref" : "#/components/schemas/SignedVoluntaryExit"
49+
}
50+
},
51+
"sync_aggregate" : {
52+
"$ref" : "#/components/schemas/SyncAggregate"
53+
},
54+
"bls_to_execution_changes" : {
55+
"type" : "array",
56+
"items" : {
57+
"$ref" : "#/components/schemas/SignedBLSToExecutionChange"
58+
}
59+
},
60+
"signed_execution_payload_header" : {
61+
"$ref" : "#/components/schemas/SignedExecutionPayloadHeader"
62+
},
63+
"payload_attestations" : {
64+
"type" : "array",
65+
"items" : {
66+
"$ref" : "#/components/schemas/PayloadAttestation"
67+
}
68+
}
69+
}
70+
}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"title" : "BeaconBlockGloas",
3+
"type" : "object",
4+
"required" : [ "slot", "proposer_index", "parent_root", "state_root", "body" ],
5+
"properties" : {
6+
"slot" : {
7+
"type" : "string",
8+
"description" : "unsigned 64 bit integer",
9+
"example" : "1",
10+
"format" : "uint64"
11+
},
12+
"proposer_index" : {
13+
"type" : "string",
14+
"description" : "unsigned 64 bit integer",
15+
"example" : "1",
16+
"format" : "uint64"
17+
},
18+
"parent_root" : {
19+
"type" : "string",
20+
"description" : "Bytes32 hexadecimal",
21+
"example" : "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
22+
"format" : "byte"
23+
},
24+
"state_root" : {
25+
"type" : "string",
26+
"description" : "Bytes32 hexadecimal",
27+
"example" : "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
28+
"format" : "byte"
29+
},
30+
"body" : {
31+
"$ref" : "#/components/schemas/BeaconBlockBodyGloas"
32+
}
33+
}
34+
}

data/beaconrestapi/src/integration-test/resources/tech/pegasys/teku/beaconrestapi/beacon/schema/BeaconStateGloas.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@
151151
"$ref" : "#/components/schemas/SyncCommittee"
152152
},
153153
"latest_execution_payload_header" : {
154-
"$ref" : "#/components/schemas/ExecutionPayloadHeaderDeneb"
154+
"$ref" : "#/components/schemas/ExecutionPayloadHeaderGloas"
155155
},
156156
"next_withdrawal_index" : {
157157
"type" : "string",

0 commit comments

Comments
 (0)