|
34 | 34 | import tech.pegasys.teku.spec.datastructures.blocks.blockbody.versions.altair.BeaconBlockBodySchemaAltair;
|
35 | 35 | import tech.pegasys.teku.spec.datastructures.blocks.blockbody.versions.altair.SyncAggregate;
|
36 | 36 | import tech.pegasys.teku.spec.datastructures.execution.ExecutionPayload;
|
| 37 | +import tech.pegasys.teku.spec.datastructures.execution.versions.electra.DepositReceipt; |
| 38 | +import tech.pegasys.teku.spec.datastructures.execution.versions.electra.ExecutionLayerExit; |
37 | 39 | import tech.pegasys.teku.spec.datastructures.operations.Attestation;
|
38 | 40 | import tech.pegasys.teku.spec.datastructures.operations.AttesterSlashing;
|
39 | 41 | import tech.pegasys.teku.spec.datastructures.operations.Deposit;
|
@@ -71,7 +73,9 @@ private enum Operation {
|
71 | 73 | SYNC_AGGREGATE,
|
72 | 74 | EXECUTION_PAYLOAD,
|
73 | 75 | BLS_TO_EXECUTION_CHANGE,
|
74 |
| - WITHDRAWAL |
| 76 | + WITHDRAWAL, |
| 77 | + DEPOSIT_RECEIPT, |
| 78 | + EXECUTION_LAYER_EXIT |
75 | 79 | }
|
76 | 80 |
|
77 | 81 | public static final ImmutableMap<String, TestExecutor> OPERATIONS_TEST_TYPES =
|
@@ -112,6 +116,13 @@ private enum Operation {
|
112 | 116 | .put(
|
113 | 117 | "operations/withdrawals",
|
114 | 118 | new OperationsTestExecutor<>("execution_payload.ssz_snappy", Operation.WITHDRAWAL))
|
| 119 | + .put( |
| 120 | + "operations/deposit_receipt", |
| 121 | + new OperationsTestExecutor<>("deposit_receipt.ssz_snappy", Operation.DEPOSIT_RECEIPT)) |
| 122 | + .put( |
| 123 | + "operations/execution_layer_exit", |
| 124 | + new OperationsTestExecutor<>( |
| 125 | + "execution_layer_exit.ssz_snappy", Operation.EXECUTION_LAYER_EXIT)) |
115 | 126 | .build();
|
116 | 127 |
|
117 | 128 | private final String dataFileName;
|
@@ -298,6 +309,8 @@ private void processOperation(
|
298 | 309 | }
|
299 | 310 | case BLS_TO_EXECUTION_CHANGE -> processBlsToExecutionChange(testDefinition, state, processor);
|
300 | 311 | case WITHDRAWAL -> processWithdrawal(testDefinition, state, processor);
|
| 312 | + case DEPOSIT_RECEIPT -> processDepositReceipt(testDefinition, state, processor); |
| 313 | + case EXECUTION_LAYER_EXIT -> processExecutionLayerExit(testDefinition, state, processor); |
301 | 314 | default -> throw new UnsupportedOperationException(
|
302 | 315 | "Operation " + operation + " not implemented in OperationTestExecutor");
|
303 | 316 | }
|
@@ -325,6 +338,26 @@ private void processBlsToExecutionChange(
|
325 | 338 | processor.processBlsToExecutionChange(state, blsToExecutionChange);
|
326 | 339 | }
|
327 | 340 |
|
| 341 | + private void processDepositReceipt( |
| 342 | + final TestDefinition testDefinition, |
| 343 | + final MutableBeaconState state, |
| 344 | + final OperationProcessor processor) |
| 345 | + throws BlockProcessingException { |
| 346 | + final DepositReceipt depositReceipt = |
| 347 | + loadSsz(testDefinition, dataFileName, DepositReceipt.SSZ_SCHEMA); |
| 348 | + processor.processDepositReceipt(state, depositReceipt); |
| 349 | + } |
| 350 | + |
| 351 | + private void processExecutionLayerExit( |
| 352 | + final TestDefinition testDefinition, |
| 353 | + final MutableBeaconState state, |
| 354 | + final OperationProcessor processor) |
| 355 | + throws BlockProcessingException { |
| 356 | + final ExecutionLayerExit executionLayerExit = |
| 357 | + loadSsz(testDefinition, dataFileName, ExecutionLayerExit.SSZ_SCHEMA); |
| 358 | + processor.processExecutionLayerExit(state, executionLayerExit); |
| 359 | + } |
| 360 | + |
328 | 361 | private SignedVoluntaryExit loadVoluntaryExit(final TestDefinition testDefinition) {
|
329 | 362 | return loadSsz(testDefinition, dataFileName, SignedVoluntaryExit.SSZ_SCHEMA);
|
330 | 363 | }
|
@@ -387,7 +420,9 @@ public void checkBlockInclusionValidation(
|
387 | 420 | ATTESTATION,
|
388 | 421 | SYNC_AGGREGATE,
|
389 | 422 | EXECUTION_PAYLOAD,
|
390 |
| - WITHDRAWAL -> {} |
| 423 | + WITHDRAWAL, |
| 424 | + DEPOSIT_RECEIPT, |
| 425 | + EXECUTION_LAYER_EXIT -> {} |
391 | 426 | }
|
392 | 427 | }
|
393 | 428 |
|
|
0 commit comments