Skip to content

Commit

Permalink
fix spotless and assemble hopefully
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanBratanov committed Oct 1, 2024
1 parent d34da85 commit 60d945f
Show file tree
Hide file tree
Showing 7 changed files with 50 additions and 56 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -280,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 @@ -156,7 +156,8 @@ static SpecVersion createElectra(
return new SpecVersion(SpecMilestone.ELECTRA, specConfig, schemaDefinitions, specLogic);
}

static SpecVersion createEip7732(final SpecConfigEip7732 specConfig, final SchemaRegistryBuilder schemaRegistryBuilder) {
static SpecVersion createEip7732(
final SpecConfigEip7732 specConfig, final SchemaRegistryBuilder schemaRegistryBuilder) {
final SchemaRegistry schemaRegistry =
schemaRegistryBuilder.build(SpecMilestone.EIP7732, specConfig);
final SchemaDefinitionsEip7732 schemaDefinitions = new SchemaDefinitionsEip7732(schemaRegistry);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
import tech.pegasys.teku.spec.datastructures.blocks.blockbody.versions.altair.SyncAggregate;
import tech.pegasys.teku.spec.datastructures.execution.ExecutionPayload;
import tech.pegasys.teku.spec.datastructures.execution.ExecutionPayloadHeader;
import tech.pegasys.teku.spec.datastructures.execution.versions.electra.ExecutionRequests;
import tech.pegasys.teku.spec.datastructures.execution.SignedExecutionPayloadHeader;
import tech.pegasys.teku.spec.datastructures.execution.versions.electra.ExecutionRequests;
import tech.pegasys.teku.spec.datastructures.operations.Attestation;
import tech.pegasys.teku.spec.datastructures.operations.AttesterSlashing;
import tech.pegasys.teku.spec.datastructures.operations.Deposit;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
import tech.pegasys.teku.spec.datastructures.blocks.blockbody.versions.altair.SyncAggregate;
import tech.pegasys.teku.spec.datastructures.execution.ExecutionPayload;
import tech.pegasys.teku.spec.datastructures.execution.ExecutionPayloadHeader;
import tech.pegasys.teku.spec.datastructures.execution.versions.electra.ExecutionRequests;
import tech.pegasys.teku.spec.datastructures.execution.SignedExecutionPayloadHeader;
import tech.pegasys.teku.spec.datastructures.execution.versions.electra.ExecutionRequests;
import tech.pegasys.teku.spec.datastructures.operations.Attestation;
import tech.pegasys.teku.spec.datastructures.operations.AttesterSlashing;
import tech.pegasys.teku.spec.datastructures.operations.Deposit;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,46 +34,46 @@

public class ExecutionPayloadEip7732Impl
extends Container17<
ExecutionPayloadEip7732Impl,
SszBytes32,
SszByteVector,
SszBytes32,
SszBytes32,
SszByteVector,
SszBytes32,
SszUInt64,
SszUInt64,
SszUInt64,
SszUInt64,
SszByteList,
SszUInt256,
SszBytes32,
SszList<Transaction>,
SszList<Withdrawal>,
SszUInt64,
SszUInt64>
ExecutionPayloadEip7732Impl,
SszBytes32,
SszByteVector,
SszBytes32,
SszBytes32,
SszByteVector,
SszBytes32,
SszUInt64,
SszUInt64,
SszUInt64,
SszUInt64,
SszByteList,
SszUInt256,
SszBytes32,
SszList<Transaction>,
SszList<Withdrawal>,
SszUInt64,
SszUInt64>
implements ExecutionPayloadEip7732 {

public ExecutionPayloadEip7732Impl(
final ContainerSchema17<
ExecutionPayloadEip7732Impl,
SszBytes32,
SszByteVector,
SszBytes32,
SszBytes32,
SszByteVector,
SszBytes32,
SszUInt64,
SszUInt64,
SszUInt64,
SszUInt64,
SszByteList,
SszUInt256,
SszBytes32,
SszList<Transaction>,
SszList<Withdrawal>,
SszUInt64,
SszUInt64>
ExecutionPayloadEip7732Impl,
SszBytes32,
SszByteVector,
SszBytes32,
SszBytes32,
SszByteVector,
SszBytes32,
SszUInt64,
SszUInt64,
SszUInt64,
SszUInt64,
SszByteList,
SszUInt256,
SszBytes32,
SszList<Transaction>,
SszList<Withdrawal>,
SszUInt64,
SszUInt64>
schema,
final TreeNode backingNode) {
super(schema, backingNode);
Expand Down Expand Up @@ -226,8 +226,6 @@ public UInt64 getExcessBlobGas() {

@Override
public List<TreeNode> getUnblindedTreeNodes() {
return List.of(
getTransactions().getBackingNode(),
getWithdrawals().getBackingNode());
return List.of(getTransactions().getBackingNode(), getWithdrawals().getBackingNode());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -303,5 +303,5 @@ public ExecutionPayloadHeader extractExecutionPayloadHeader(final BeaconBlockBod
return null;
}

//EIP7732 TODO: remove processStuff
// EIP7732 TODO: remove processStuff
}
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,13 @@ void shouldCreateSpec(final SpecMilestone milestone) {
actualVersion =
SpecVersion.create(SpecMilestone.ELECTRA, minimalConfig, schemaRegistryBuilder);
}
case EIP7732 -> {
expectedVersion =
SpecVersion.createEip7732(
SpecConfigEip7732.required(minimalConfig), schemaRegistryBuilder);
actualVersion =
SpecVersion.create(SpecMilestone.EIP7732, minimalConfig, schemaRegistryBuilder);
}
}

assertThat(actualVersion).isPresent();
Expand All @@ -91,16 +98,4 @@ void shouldCreateSpec(final SpecMilestone milestone) {
assertThat(actualVersion.get().getSchemaDefinitions().getSchemaRegistry().getMilestone())
.isSameAs(milestone);
}

@Test
void shouldCreateEip7732Spec() {
final SpecConfigEip7732 eip7732SpecConfig = SpecConfigEip7732.required(minimalConfig);
final SpecVersion expectedVersion = SpecVersion.createEip7732(eip7732SpecConfig);
final Optional<SpecVersion> actualVersion =
SpecVersion.create(SpecMilestone.EIP7732, minimalConfig);
assertThat(actualVersion).isPresent();
assertThat(actualVersion.get().getMilestone()).isEqualTo(SpecMilestone.EIP7732);
assertThat(actualVersion.get().getSchemaDefinitions())
.hasSameClassAs(expectedVersion.getSchemaDefinitions());
}
}

0 comments on commit 60d945f

Please sign in to comment.