From fff88865b1a2d0e237e2407a19508a322ef7a1dc Mon Sep 17 00:00:00 2001 From: Stefan Bratanov Date: Wed, 17 Aug 2022 10:22:56 +0200 Subject: [PATCH] Rename and/or move builder specific classes (#6082) --- .../coordinator/ValidatorApiHandler.java | 2 +- .../validator/PostRegisterValidatorTest.java | 2 +- .../validator/PostRegisterValidatorTest.java | 2 +- .../teku/api/ValidatorDataProvider.java | 2 +- ...ntTest.java => RestBuilderClientTest.java} | 36 ++++++------ ...nBuilderClient.java => BuilderClient.java} | 6 +- ...ient.java => ThrottlingBuilderClient.java} | 14 ++--- ...java => MetricRecordingBuilderClient.java} | 16 +++--- ...lderClient.java => RestBuilderClient.java} | 12 ++-- .../executionlayer/BuilderBidValidator.java | 4 +- .../BuilderBidValidatorImpl.java | 6 +- .../ExecutionLayerManagerImpl.java | 55 +++++++++--------- .../BuilderBidValidatorTest.java | 6 +- .../ExecutionLayerManagerImplTest.java | 57 +++++++++---------- .../{execution => builder}/BuilderBid.java | 3 +- .../BuilderBidSchema.java | 4 +- .../SignedBuilderBid.java | 2 +- .../SignedBuilderBidSchema.java | 2 +- .../SignedValidatorRegistration.java | 2 +- .../SignedValidatorRegistrationSchema.java | 2 +- .../SignedValidatorRegistrationsSchema.java | 2 +- .../ValidatorRegistration.java | 2 +- .../ValidatorRegistrationSchema.java | 2 +- .../executionlayer/ExecutionLayerChannel.java | 2 +- .../ExecutionLayerChannelStub.java | 14 ++--- .../PayloadBuildingAttributes.java | 2 +- .../pegasys/teku/spec/schemas/ApiSchemas.java | 6 +- .../schemas/SchemaDefinitionsBellatrix.java | 4 +- .../teku/spec/signatures/DeletableSigner.java | 2 +- .../teku/spec/signatures/LocalSigner.java | 2 +- .../pegasys/teku/spec/signatures/Signer.java | 2 +- .../teku/spec/signatures/SigningRootUtil.java | 2 +- .../signatures/SlashingProtectedSigner.java | 2 +- .../execution/BuilderBidPropertyTest.java | 2 + .../SignedBuilderBidPropertyTest.java | 3 + ...gnedValidatorRegistrationPropertyTest.java | 3 + .../ValidatorRegistrationPropertyTest.java | 2 + .../spec/signatures/DeletableSignerTest.java | 2 +- .../teku/spec/signatures/LocalSignerTest.java | 2 +- .../SlashingProtectedSignerTest.java | 2 +- .../spec/generator/signatures/NoOpSigner.java | 2 +- .../teku/spec/util/DataStructureUtil.java | 8 +-- .../forkchoice/ProposersDataManager.java | 2 +- .../forkchoice/RegisteredValidatorInfo.java | 2 +- .../forkchoice/ForkChoiceNotifierTest.java | 2 +- .../forkchoice/ProposerDataManagerTest.java | 2 +- .../infrastructure/logging/EventLogger.java | 16 +++--- .../executionlayer/ExecutionLayerService.java | 6 +- .../cli/options/ExecutionLayerOptions.java | 4 +- .../validator/api/ValidatorApiChannel.java | 2 +- .../MetricRecordingValidatorApiChannel.java | 2 +- .../signer/ExternalSignerIntegrationTest.java | 2 +- .../ValidatorRegistrationBatchSender.java | 2 +- .../client/ValidatorRegistrator.java | 4 +- .../client/signer/ExternalSigner.java | 2 +- .../ValidatorRegistrationBatchSenderTest.java | 2 +- .../client/ValidatorRegistratorTest.java | 4 +- .../OkHttpValidatorTypeDefClientTest.java | 2 +- .../remote/FailoverValidatorApiHandler.java | 2 +- .../remote/RemoteValidatorApiHandler.java | 2 +- .../typedef/OkHttpValidatorTypeDefClient.java | 2 +- .../handlers/RegisterValidatorsRequest.java | 2 +- .../FailoverValidatorApiHandlerTest.java | 2 +- .../remote/RemoteValidatorApiHandlerTest.java | 2 +- 64 files changed, 192 insertions(+), 181 deletions(-) rename ethereum/executionclient/src/integration-test/java/tech/pegasys/teku/ethereum/executionclient/rest/{RestExecutionBuilderClientTest.java => RestBuilderClientTest.java} (91%) rename ethereum/executionclient/src/main/java/tech/pegasys/teku/ethereum/executionclient/{ExecutionBuilderClient.java => BuilderClient.java} (88%) rename ethereum/executionclient/src/main/java/tech/pegasys/teku/ethereum/executionclient/{ThrottlingExecutionBuilderClient.java => ThrottlingBuilderClient.java} (85%) rename ethereum/executionclient/src/main/java/tech/pegasys/teku/ethereum/executionclient/metrics/{MetricRecordingExecutionBuilderClient.java => MetricRecordingBuilderClient.java} (86%) rename ethereum/executionclient/src/main/java/tech/pegasys/teku/ethereum/executionclient/rest/{RestExecutionBuilderClient.java => RestBuilderClient.java} (93%) rename ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/{execution => builder}/BuilderBid.java (92%) rename ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/{execution => builder}/BuilderBidSchema.java (89%) rename ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/{execution => builder}/SignedBuilderBid.java (96%) rename ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/{execution => builder}/SignedBuilderBidSchema.java (96%) rename ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/{execution => builder}/SignedValidatorRegistration.java (96%) rename ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/{execution => builder}/SignedValidatorRegistrationSchema.java (96%) rename ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/{execution => builder}/SignedValidatorRegistrationsSchema.java (95%) rename ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/{execution => builder}/ValidatorRegistration.java (97%) rename ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/{execution => builder}/ValidatorRegistrationSchema.java (97%) diff --git a/beacon/validator/src/main/java/tech/pegasys/teku/validator/coordinator/ValidatorApiHandler.java b/beacon/validator/src/main/java/tech/pegasys/teku/validator/coordinator/ValidatorApiHandler.java index 9b427fe3ba7..07c0fb41c0c 100644 --- a/beacon/validator/src/main/java/tech/pegasys/teku/validator/coordinator/ValidatorApiHandler.java +++ b/beacon/validator/src/main/java/tech/pegasys/teku/validator/coordinator/ValidatorApiHandler.java @@ -52,7 +52,7 @@ import tech.pegasys.teku.spec.datastructures.blocks.BeaconBlock; import tech.pegasys.teku.spec.datastructures.blocks.SignedBeaconBlock; import tech.pegasys.teku.spec.datastructures.blocks.SignedBlockAndState; -import tech.pegasys.teku.spec.datastructures.execution.SignedValidatorRegistration; +import tech.pegasys.teku.spec.datastructures.builder.SignedValidatorRegistration; import tech.pegasys.teku.spec.datastructures.genesis.GenesisData; import tech.pegasys.teku.spec.datastructures.operations.Attestation; import tech.pegasys.teku.spec.datastructures.operations.AttestationData; diff --git a/data/beaconrestapi/src/integration-test/java/tech/pegasys/teku/beaconrestapi/v1/validator/PostRegisterValidatorTest.java b/data/beaconrestapi/src/integration-test/java/tech/pegasys/teku/beaconrestapi/v1/validator/PostRegisterValidatorTest.java index 27cd178206c..461ae87cd69 100644 --- a/data/beaconrestapi/src/integration-test/java/tech/pegasys/teku/beaconrestapi/v1/validator/PostRegisterValidatorTest.java +++ b/data/beaconrestapi/src/integration-test/java/tech/pegasys/teku/beaconrestapi/v1/validator/PostRegisterValidatorTest.java @@ -33,7 +33,7 @@ import tech.pegasys.teku.infrastructure.json.JsonUtil; import tech.pegasys.teku.infrastructure.ssz.SszList; import tech.pegasys.teku.spec.SpecMilestone; -import tech.pegasys.teku.spec.datastructures.execution.SignedValidatorRegistration; +import tech.pegasys.teku.spec.datastructures.builder.SignedValidatorRegistration; import tech.pegasys.teku.spec.util.DataStructureUtil; public class PostRegisterValidatorTest extends AbstractDataBackedRestAPIIntegrationTest { diff --git a/data/beaconrestapi/src/test/java/tech/pegasys/teku/beaconrestapi/handlers/v1/validator/PostRegisterValidatorTest.java b/data/beaconrestapi/src/test/java/tech/pegasys/teku/beaconrestapi/handlers/v1/validator/PostRegisterValidatorTest.java index 912e6fb0e8d..8c557edb579 100644 --- a/data/beaconrestapi/src/test/java/tech/pegasys/teku/beaconrestapi/handlers/v1/validator/PostRegisterValidatorTest.java +++ b/data/beaconrestapi/src/test/java/tech/pegasys/teku/beaconrestapi/handlers/v1/validator/PostRegisterValidatorTest.java @@ -26,7 +26,7 @@ import tech.pegasys.teku.beaconrestapi.AbstractMigratedBeaconHandlerTest; import tech.pegasys.teku.infrastructure.async.SafeFuture; import tech.pegasys.teku.infrastructure.ssz.SszList; -import tech.pegasys.teku.spec.datastructures.execution.SignedValidatorRegistration; +import tech.pegasys.teku.spec.datastructures.builder.SignedValidatorRegistration; public class PostRegisterValidatorTest extends AbstractMigratedBeaconHandlerTest { diff --git a/data/provider/src/main/java/tech/pegasys/teku/api/ValidatorDataProvider.java b/data/provider/src/main/java/tech/pegasys/teku/api/ValidatorDataProvider.java index 2ef6ae16f4c..1680d2ade42 100644 --- a/data/provider/src/main/java/tech/pegasys/teku/api/ValidatorDataProvider.java +++ b/data/provider/src/main/java/tech/pegasys/teku/api/ValidatorDataProvider.java @@ -43,7 +43,7 @@ import tech.pegasys.teku.spec.Spec; import tech.pegasys.teku.spec.SpecMilestone; import tech.pegasys.teku.spec.datastructures.blocks.BeaconBlock; -import tech.pegasys.teku.spec.datastructures.execution.SignedValidatorRegistration; +import tech.pegasys.teku.spec.datastructures.builder.SignedValidatorRegistration; import tech.pegasys.teku.spec.datastructures.operations.Attestation; import tech.pegasys.teku.spec.datastructures.operations.AttestationData; import tech.pegasys.teku.spec.datastructures.operations.SignedAggregateAndProof; diff --git a/ethereum/executionclient/src/integration-test/java/tech/pegasys/teku/ethereum/executionclient/rest/RestExecutionBuilderClientTest.java b/ethereum/executionclient/src/integration-test/java/tech/pegasys/teku/ethereum/executionclient/rest/RestBuilderClientTest.java similarity index 91% rename from ethereum/executionclient/src/integration-test/java/tech/pegasys/teku/ethereum/executionclient/rest/RestExecutionBuilderClientTest.java rename to ethereum/executionclient/src/integration-test/java/tech/pegasys/teku/ethereum/executionclient/rest/RestBuilderClientTest.java index c1ae2e9dacb..b706f994e51 100644 --- a/ethereum/executionclient/src/integration-test/java/tech/pegasys/teku/ethereum/executionclient/rest/RestExecutionBuilderClientTest.java +++ b/ethereum/executionclient/src/integration-test/java/tech/pegasys/teku/ethereum/executionclient/rest/RestBuilderClientTest.java @@ -46,16 +46,16 @@ import tech.pegasys.teku.spec.TestSpecContext; import tech.pegasys.teku.spec.TestSpecInvocationContextProvider.SpecContext; import tech.pegasys.teku.spec.datastructures.blocks.SignedBeaconBlock; +import tech.pegasys.teku.spec.datastructures.builder.SignedBuilderBid; +import tech.pegasys.teku.spec.datastructures.builder.SignedValidatorRegistration; import tech.pegasys.teku.spec.datastructures.execution.ExecutionPayload; -import tech.pegasys.teku.spec.datastructures.execution.SignedBuilderBid; -import tech.pegasys.teku.spec.datastructures.execution.SignedValidatorRegistration; import tech.pegasys.teku.spec.networks.Eth2Network; import tech.pegasys.teku.spec.schemas.SchemaDefinitionsBellatrix; @TestSpecContext( milestone = SpecMilestone.BELLATRIX, network = {Eth2Network.MAINNET}) -class RestExecutionBuilderClientTest { +class RestBuilderClientTest { private static final ObjectMapper OBJECT_MAPPER = new ObjectMapper(); @@ -91,7 +91,7 @@ class RestExecutionBuilderClientTest { private SchemaDefinitionsBellatrix schemaDefinitionsBellatrix; - private RestExecutionBuilderClient restExecutionBuilderClient; + private RestBuilderClient restBuilderClient; @BeforeEach void setUp(SpecContext specContext) throws IOException { @@ -104,7 +104,7 @@ void setUp(SpecContext specContext) throws IOException { .getSchemaDefinitions() .toVersionBellatrix() .orElseThrow(); - this.restExecutionBuilderClient = new RestExecutionBuilderClient(okHttpRestClient, spec); + this.restBuilderClient = new RestBuilderClient(okHttpRestClient, spec); } @AfterEach @@ -116,7 +116,7 @@ void afterEach() throws Exception { void getStatus_success() { mockWebServer.enqueue(new MockResponse().setResponseCode(200)); - assertThat(restExecutionBuilderClient.status()) + assertThat(restBuilderClient.status()) .succeedsWithin(WAIT_FOR_CALL_COMPLETION) .satisfies( response -> { @@ -132,7 +132,7 @@ void getStatus_failures() { mockWebServer.enqueue( new MockResponse().setResponseCode(500).setBody(INTERNAL_SERVER_ERROR_MESSAGE)); - assertThat(restExecutionBuilderClient.status()) + assertThat(restBuilderClient.status()) .succeedsWithin(WAIT_FOR_CALL_COMPLETION) .satisfies( response -> { @@ -151,7 +151,7 @@ void registerValidators_success() { SszList signedValidatorRegistrations = createSignedValidatorRegistrations(); - assertThat(restExecutionBuilderClient.registerValidators(SLOT, signedValidatorRegistrations)) + assertThat(restBuilderClient.registerValidators(SLOT, signedValidatorRegistrations)) .succeedsWithin(WAIT_FOR_CALL_COMPLETION) .satisfies( response -> { @@ -168,7 +168,7 @@ void registerValidators_zeroRegistrationsDoesNotMakeRequest() { SszList zeroRegistrations = SIGNED_VALIDATOR_REGISTRATIONS_SCHEMA.getDefault(); - assertThat(restExecutionBuilderClient.registerValidators(SLOT, zeroRegistrations)) + assertThat(restBuilderClient.registerValidators(SLOT, zeroRegistrations)) .succeedsWithin(WAIT_FOR_CALL_COMPLETION) .satisfies( response -> { @@ -189,7 +189,7 @@ void registerValidators_failures() { SszList signedValidatorRegistrations = createSignedValidatorRegistrations(); - assertThat(restExecutionBuilderClient.registerValidators(SLOT, signedValidatorRegistrations)) + assertThat(restBuilderClient.registerValidators(SLOT, signedValidatorRegistrations)) .succeedsWithin(WAIT_FOR_CALL_COMPLETION) .satisfies( response -> { @@ -202,7 +202,7 @@ void registerValidators_failures() { mockWebServer.enqueue( new MockResponse().setResponseCode(500).setBody(INTERNAL_SERVER_ERROR_MESSAGE)); - assertThat(restExecutionBuilderClient.registerValidators(SLOT, signedValidatorRegistrations)) + assertThat(restBuilderClient.registerValidators(SLOT, signedValidatorRegistrations)) .succeedsWithin(WAIT_FOR_CALL_COMPLETION) .satisfies( response -> { @@ -219,7 +219,7 @@ void getExecutionPayloadHeader_success() { mockWebServer.enqueue( new MockResponse().setResponseCode(200).setBody(EXECUTION_PAYLOAD_HEADER_RESPONSE)); - assertThat(restExecutionBuilderClient.getHeader(SLOT, PUB_KEY, PARENT_HASH)) + assertThat(restBuilderClient.getHeader(SLOT, PUB_KEY, PARENT_HASH)) .succeedsWithin(WAIT_FOR_CALL_COMPLETION) .satisfies( response -> { @@ -237,7 +237,7 @@ void getExecutionPayloadHeader_noHeaderAvailable() { mockWebServer.enqueue(new MockResponse().setResponseCode(204)); - assertThat(restExecutionBuilderClient.getHeader(SLOT, PUB_KEY, PARENT_HASH)) + assertThat(restBuilderClient.getHeader(SLOT, PUB_KEY, PARENT_HASH)) .succeedsWithin(WAIT_FOR_CALL_COMPLETION) .satisfies( response -> { @@ -255,7 +255,7 @@ void getExecutionPayloadHeader_failures() { "{\"code\":400,\"message\":\"Unknown hash: missing parent hash\"}"; mockWebServer.enqueue(new MockResponse().setResponseCode(400).setBody(missingParentHashError)); - assertThat(restExecutionBuilderClient.getHeader(SLOT, PUB_KEY, PARENT_HASH)) + assertThat(restBuilderClient.getHeader(SLOT, PUB_KEY, PARENT_HASH)) .succeedsWithin(WAIT_FOR_CALL_COMPLETION) .satisfies( response -> { @@ -268,7 +268,7 @@ void getExecutionPayloadHeader_failures() { mockWebServer.enqueue( new MockResponse().setResponseCode(500).setBody(INTERNAL_SERVER_ERROR_MESSAGE)); - assertThat(restExecutionBuilderClient.getHeader(SLOT, PUB_KEY, PARENT_HASH)) + assertThat(restBuilderClient.getHeader(SLOT, PUB_KEY, PARENT_HASH)) .succeedsWithin(WAIT_FOR_CALL_COMPLETION) .satisfies( response -> { @@ -287,7 +287,7 @@ void sendSignedBlindedBlock_success() { SignedBeaconBlock signedBlindedBeaconBlock = createSignedBlindedBeaconBlock(); - assertThat(restExecutionBuilderClient.getPayload(signedBlindedBeaconBlock)) + assertThat(restBuilderClient.getPayload(signedBlindedBeaconBlock)) .succeedsWithin(WAIT_FOR_CALL_COMPLETION) .satisfies( response -> { @@ -308,7 +308,7 @@ void sendSignedBlindedBlock_failures() { SignedBeaconBlock signedBlindedBeaconBlock = createSignedBlindedBeaconBlock(); - assertThat(restExecutionBuilderClient.getPayload(signedBlindedBeaconBlock)) + assertThat(restBuilderClient.getPayload(signedBlindedBeaconBlock)) .succeedsWithin(WAIT_FOR_CALL_COMPLETION) .satisfies( response -> { @@ -321,7 +321,7 @@ void sendSignedBlindedBlock_failures() { mockWebServer.enqueue( new MockResponse().setResponseCode(500).setBody(INTERNAL_SERVER_ERROR_MESSAGE)); - assertThat(restExecutionBuilderClient.getPayload(signedBlindedBeaconBlock)) + assertThat(restBuilderClient.getPayload(signedBlindedBeaconBlock)) .succeedsWithin(WAIT_FOR_CALL_COMPLETION) .satisfies( response -> { diff --git a/ethereum/executionclient/src/main/java/tech/pegasys/teku/ethereum/executionclient/ExecutionBuilderClient.java b/ethereum/executionclient/src/main/java/tech/pegasys/teku/ethereum/executionclient/BuilderClient.java similarity index 88% rename from ethereum/executionclient/src/main/java/tech/pegasys/teku/ethereum/executionclient/ExecutionBuilderClient.java rename to ethereum/executionclient/src/main/java/tech/pegasys/teku/ethereum/executionclient/BuilderClient.java index a4039fcbe26..ca67d0e1d89 100644 --- a/ethereum/executionclient/src/main/java/tech/pegasys/teku/ethereum/executionclient/ExecutionBuilderClient.java +++ b/ethereum/executionclient/src/main/java/tech/pegasys/teku/ethereum/executionclient/BuilderClient.java @@ -21,11 +21,11 @@ import tech.pegasys.teku.infrastructure.ssz.SszList; import tech.pegasys.teku.infrastructure.unsigned.UInt64; import tech.pegasys.teku.spec.datastructures.blocks.SignedBeaconBlock; +import tech.pegasys.teku.spec.datastructures.builder.SignedBuilderBid; +import tech.pegasys.teku.spec.datastructures.builder.SignedValidatorRegistration; import tech.pegasys.teku.spec.datastructures.execution.ExecutionPayload; -import tech.pegasys.teku.spec.datastructures.execution.SignedBuilderBid; -import tech.pegasys.teku.spec.datastructures.execution.SignedValidatorRegistration; -public interface ExecutionBuilderClient { +public interface BuilderClient { SafeFuture> status(); diff --git a/ethereum/executionclient/src/main/java/tech/pegasys/teku/ethereum/executionclient/ThrottlingExecutionBuilderClient.java b/ethereum/executionclient/src/main/java/tech/pegasys/teku/ethereum/executionclient/ThrottlingBuilderClient.java similarity index 85% rename from ethereum/executionclient/src/main/java/tech/pegasys/teku/ethereum/executionclient/ThrottlingExecutionBuilderClient.java rename to ethereum/executionclient/src/main/java/tech/pegasys/teku/ethereum/executionclient/ThrottlingBuilderClient.java index af05a8d14e1..709e7c98cbc 100644 --- a/ethereum/executionclient/src/main/java/tech/pegasys/teku/ethereum/executionclient/ThrottlingExecutionBuilderClient.java +++ b/ethereum/executionclient/src/main/java/tech/pegasys/teku/ethereum/executionclient/ThrottlingBuilderClient.java @@ -24,16 +24,16 @@ import tech.pegasys.teku.infrastructure.ssz.SszList; import tech.pegasys.teku.infrastructure.unsigned.UInt64; import tech.pegasys.teku.spec.datastructures.blocks.SignedBeaconBlock; +import tech.pegasys.teku.spec.datastructures.builder.SignedBuilderBid; +import tech.pegasys.teku.spec.datastructures.builder.SignedValidatorRegistration; import tech.pegasys.teku.spec.datastructures.execution.ExecutionPayload; -import tech.pegasys.teku.spec.datastructures.execution.SignedBuilderBid; -import tech.pegasys.teku.spec.datastructures.execution.SignedValidatorRegistration; -public class ThrottlingExecutionBuilderClient implements ExecutionBuilderClient { - private final ExecutionBuilderClient delegate; +public class ThrottlingBuilderClient implements BuilderClient { + private final BuilderClient delegate; private final ThrottlingTaskQueue taskQueue; - public ThrottlingExecutionBuilderClient( - final ExecutionBuilderClient delegate, + public ThrottlingBuilderClient( + final BuilderClient delegate, final int maximumConcurrentRequests, final MetricsSystem metricsSystem) { this.delegate = delegate; @@ -42,7 +42,7 @@ public ThrottlingExecutionBuilderClient( maximumConcurrentRequests, metricsSystem, TekuMetricCategory.BEACON, - "eb_request_queue_size"); + "builder_request_queue_size"); } @Override diff --git a/ethereum/executionclient/src/main/java/tech/pegasys/teku/ethereum/executionclient/metrics/MetricRecordingExecutionBuilderClient.java b/ethereum/executionclient/src/main/java/tech/pegasys/teku/ethereum/executionclient/metrics/MetricRecordingBuilderClient.java similarity index 86% rename from ethereum/executionclient/src/main/java/tech/pegasys/teku/ethereum/executionclient/metrics/MetricRecordingExecutionBuilderClient.java rename to ethereum/executionclient/src/main/java/tech/pegasys/teku/ethereum/executionclient/metrics/MetricRecordingBuilderClient.java index 5ab1b8b9a1a..2669281a8e6 100644 --- a/ethereum/executionclient/src/main/java/tech/pegasys/teku/ethereum/executionclient/metrics/MetricRecordingExecutionBuilderClient.java +++ b/ethereum/executionclient/src/main/java/tech/pegasys/teku/ethereum/executionclient/metrics/MetricRecordingBuilderClient.java @@ -19,7 +19,7 @@ import org.apache.tuweni.bytes.Bytes32; import org.hyperledger.besu.plugin.services.MetricsSystem; import tech.pegasys.teku.bls.BLSPublicKey; -import tech.pegasys.teku.ethereum.executionclient.ExecutionBuilderClient; +import tech.pegasys.teku.ethereum.executionclient.BuilderClient; import tech.pegasys.teku.ethereum.executionclient.schema.Response; import tech.pegasys.teku.infrastructure.async.SafeFuture; import tech.pegasys.teku.infrastructure.metrics.MetricsCountersByIntervals; @@ -28,12 +28,12 @@ import tech.pegasys.teku.infrastructure.time.TimeProvider; import tech.pegasys.teku.infrastructure.unsigned.UInt64; import tech.pegasys.teku.spec.datastructures.blocks.SignedBeaconBlock; +import tech.pegasys.teku.spec.datastructures.builder.SignedBuilderBid; +import tech.pegasys.teku.spec.datastructures.builder.SignedValidatorRegistration; import tech.pegasys.teku.spec.datastructures.execution.ExecutionPayload; -import tech.pegasys.teku.spec.datastructures.execution.SignedBuilderBid; -import tech.pegasys.teku.spec.datastructures.execution.SignedValidatorRegistration; -public class MetricRecordingExecutionBuilderClient extends MetricRecordingAbstractClient - implements ExecutionBuilderClient { +public class MetricRecordingBuilderClient extends MetricRecordingAbstractClient + implements BuilderClient { public static final String BUILDER_REQUESTS_COUNTER_NAME = "builder_requests_total"; @@ -42,10 +42,10 @@ public class MetricRecordingExecutionBuilderClient extends MetricRecordingAbstra public static final String GET_HEADER_METHOD = "get_header"; public static final String GET_PAYLOAD_METHOD = "get_payload"; - private final ExecutionBuilderClient delegate; + private final BuilderClient delegate; - public MetricRecordingExecutionBuilderClient( - final ExecutionBuilderClient delegate, + public MetricRecordingBuilderClient( + final BuilderClient delegate, final TimeProvider timeProvider, final MetricsSystem metricsSystem) { super( diff --git a/ethereum/executionclient/src/main/java/tech/pegasys/teku/ethereum/executionclient/rest/RestExecutionBuilderClient.java b/ethereum/executionclient/src/main/java/tech/pegasys/teku/ethereum/executionclient/rest/RestBuilderClient.java similarity index 93% rename from ethereum/executionclient/src/main/java/tech/pegasys/teku/ethereum/executionclient/rest/RestExecutionBuilderClient.java rename to ethereum/executionclient/src/main/java/tech/pegasys/teku/ethereum/executionclient/rest/RestBuilderClient.java index 06e4f7b9574..a88eb81cc20 100644 --- a/ethereum/executionclient/src/main/java/tech/pegasys/teku/ethereum/executionclient/rest/RestExecutionBuilderClient.java +++ b/ethereum/executionclient/src/main/java/tech/pegasys/teku/ethereum/executionclient/rest/RestBuilderClient.java @@ -26,7 +26,7 @@ import org.apache.tuweni.bytes.Bytes32; import tech.pegasys.teku.bls.BLSPublicKey; import tech.pegasys.teku.ethereum.executionclient.BuilderApiMethod; -import tech.pegasys.teku.ethereum.executionclient.ExecutionBuilderClient; +import tech.pegasys.teku.ethereum.executionclient.BuilderClient; import tech.pegasys.teku.ethereum.executionclient.schema.BuilderApiResponse; import tech.pegasys.teku.ethereum.executionclient.schema.Response; import tech.pegasys.teku.infrastructure.async.SafeFuture; @@ -36,15 +36,15 @@ import tech.pegasys.teku.spec.Spec; import tech.pegasys.teku.spec.SpecMilestone; import tech.pegasys.teku.spec.datastructures.blocks.SignedBeaconBlock; +import tech.pegasys.teku.spec.datastructures.builder.SignedBuilderBid; +import tech.pegasys.teku.spec.datastructures.builder.SignedBuilderBidSchema; +import tech.pegasys.teku.spec.datastructures.builder.SignedValidatorRegistration; import tech.pegasys.teku.spec.datastructures.execution.ExecutionPayload; import tech.pegasys.teku.spec.datastructures.execution.ExecutionPayloadSchema; -import tech.pegasys.teku.spec.datastructures.execution.SignedBuilderBid; -import tech.pegasys.teku.spec.datastructures.execution.SignedBuilderBidSchema; -import tech.pegasys.teku.spec.datastructures.execution.SignedValidatorRegistration; import tech.pegasys.teku.spec.schemas.SchemaDefinitionCache; import tech.pegasys.teku.spec.schemas.SchemaDefinitionsBellatrix; -public class RestExecutionBuilderClient implements ExecutionBuilderClient { +public class RestBuilderClient implements BuilderClient { private final Map< SpecMilestone, DeserializableTypeDefinition>> @@ -57,7 +57,7 @@ public class RestExecutionBuilderClient implements ExecutionBuilderClient { private final RestClient restClient; private final SchemaDefinitionCache schemaDefinitionCache; - public RestExecutionBuilderClient(final RestClient restClient, final Spec spec) { + public RestBuilderClient(final RestClient restClient, final Spec spec) { this.restClient = restClient; this.schemaDefinitionCache = new SchemaDefinitionCache(spec); } diff --git a/ethereum/executionlayer/src/main/java/tech/pegasys/teku/ethereum/executionlayer/BuilderBidValidator.java b/ethereum/executionlayer/src/main/java/tech/pegasys/teku/ethereum/executionlayer/BuilderBidValidator.java index fba79713118..c9ef37a20ac 100644 --- a/ethereum/executionlayer/src/main/java/tech/pegasys/teku/ethereum/executionlayer/BuilderBidValidator.java +++ b/ethereum/executionlayer/src/main/java/tech/pegasys/teku/ethereum/executionlayer/BuilderBidValidator.java @@ -14,9 +14,9 @@ package tech.pegasys.teku.ethereum.executionlayer; import tech.pegasys.teku.spec.Spec; +import tech.pegasys.teku.spec.datastructures.builder.SignedBuilderBid; +import tech.pegasys.teku.spec.datastructures.builder.SignedValidatorRegistration; import tech.pegasys.teku.spec.datastructures.execution.ExecutionPayloadHeader; -import tech.pegasys.teku.spec.datastructures.execution.SignedBuilderBid; -import tech.pegasys.teku.spec.datastructures.execution.SignedValidatorRegistration; import tech.pegasys.teku.spec.datastructures.state.beaconstate.BeaconState; @FunctionalInterface diff --git a/ethereum/executionlayer/src/main/java/tech/pegasys/teku/ethereum/executionlayer/BuilderBidValidatorImpl.java b/ethereum/executionlayer/src/main/java/tech/pegasys/teku/ethereum/executionlayer/BuilderBidValidatorImpl.java index f7d526efc9a..4c3bc7911b7 100644 --- a/ethereum/executionlayer/src/main/java/tech/pegasys/teku/ethereum/executionlayer/BuilderBidValidatorImpl.java +++ b/ethereum/executionlayer/src/main/java/tech/pegasys/teku/ethereum/executionlayer/BuilderBidValidatorImpl.java @@ -21,11 +21,11 @@ import tech.pegasys.teku.infrastructure.logging.EventLogger; import tech.pegasys.teku.infrastructure.unsigned.UInt64; import tech.pegasys.teku.spec.Spec; +import tech.pegasys.teku.spec.datastructures.builder.SignedBuilderBid; +import tech.pegasys.teku.spec.datastructures.builder.SignedValidatorRegistration; +import tech.pegasys.teku.spec.datastructures.builder.ValidatorRegistration; import tech.pegasys.teku.spec.datastructures.eth1.Eth1Address; import tech.pegasys.teku.spec.datastructures.execution.ExecutionPayloadHeader; -import tech.pegasys.teku.spec.datastructures.execution.SignedBuilderBid; -import tech.pegasys.teku.spec.datastructures.execution.SignedValidatorRegistration; -import tech.pegasys.teku.spec.datastructures.execution.ValidatorRegistration; import tech.pegasys.teku.spec.datastructures.state.beaconstate.BeaconState; import tech.pegasys.teku.spec.logic.common.statetransition.exceptions.BlockProcessingException; diff --git a/ethereum/executionlayer/src/main/java/tech/pegasys/teku/ethereum/executionlayer/ExecutionLayerManagerImpl.java b/ethereum/executionlayer/src/main/java/tech/pegasys/teku/ethereum/executionlayer/ExecutionLayerManagerImpl.java index 4e65517fccb..f73bc3ae681 100644 --- a/ethereum/executionlayer/src/main/java/tech/pegasys/teku/ethereum/executionlayer/ExecutionLayerManagerImpl.java +++ b/ethereum/executionlayer/src/main/java/tech/pegasys/teku/ethereum/executionlayer/ExecutionLayerManagerImpl.java @@ -32,14 +32,14 @@ import org.hyperledger.besu.plugin.services.metrics.Counter; import org.hyperledger.besu.plugin.services.metrics.LabelledMetric; import tech.pegasys.teku.bls.BLSPublicKey; -import tech.pegasys.teku.ethereum.executionclient.ExecutionBuilderClient; +import tech.pegasys.teku.ethereum.executionclient.BuilderClient; import tech.pegasys.teku.ethereum.executionclient.ExecutionEngineClient; -import tech.pegasys.teku.ethereum.executionclient.ThrottlingExecutionBuilderClient; +import tech.pegasys.teku.ethereum.executionclient.ThrottlingBuilderClient; import tech.pegasys.teku.ethereum.executionclient.ThrottlingExecutionEngineClient; -import tech.pegasys.teku.ethereum.executionclient.metrics.MetricRecordingExecutionBuilderClient; +import tech.pegasys.teku.ethereum.executionclient.metrics.MetricRecordingBuilderClient; import tech.pegasys.teku.ethereum.executionclient.metrics.MetricRecordingExecutionEngineClient; +import tech.pegasys.teku.ethereum.executionclient.rest.RestBuilderClient; import tech.pegasys.teku.ethereum.executionclient.rest.RestClient; -import tech.pegasys.teku.ethereum.executionclient.rest.RestExecutionBuilderClient; import tech.pegasys.teku.ethereum.executionclient.schema.ExecutionPayloadV1; import tech.pegasys.teku.ethereum.executionclient.schema.ForkChoiceStateV1; import tech.pegasys.teku.ethereum.executionclient.schema.ForkChoiceUpdatedResult; @@ -59,13 +59,13 @@ import tech.pegasys.teku.spec.Spec; import tech.pegasys.teku.spec.SpecMilestone; import tech.pegasys.teku.spec.datastructures.blocks.SignedBeaconBlock; -import tech.pegasys.teku.spec.datastructures.execution.BuilderBid; +import tech.pegasys.teku.spec.datastructures.builder.BuilderBid; +import tech.pegasys.teku.spec.datastructures.builder.SignedBuilderBid; +import tech.pegasys.teku.spec.datastructures.builder.SignedValidatorRegistration; import tech.pegasys.teku.spec.datastructures.execution.ExecutionPayload; import tech.pegasys.teku.spec.datastructures.execution.ExecutionPayloadContext; import tech.pegasys.teku.spec.datastructures.execution.ExecutionPayloadHeader; import tech.pegasys.teku.spec.datastructures.execution.PowBlock; -import tech.pegasys.teku.spec.datastructures.execution.SignedBuilderBid; -import tech.pegasys.teku.spec.datastructures.execution.SignedValidatorRegistration; import tech.pegasys.teku.spec.datastructures.state.beaconstate.BeaconState; import tech.pegasys.teku.spec.executionlayer.ForkChoiceState; import tech.pegasys.teku.spec.executionlayer.PayloadBuildingAttributes; @@ -91,7 +91,7 @@ public class ExecutionLayerManagerImpl implements ExecutionLayerManager { new ConcurrentSkipListMap<>(); private final ExecutionEngineClient executionEngineClient; - private final Optional executionBuilderClient; + private final Optional builderClient; private final AtomicBoolean latestBuilderAvailability; private final Spec spec; private final EventLogger eventLogger; @@ -101,7 +101,7 @@ public class ExecutionLayerManagerImpl implements ExecutionLayerManager { public static ExecutionLayerManagerImpl create( final EventLogger eventLogger, final ExecutionEngineClient executionEngineClient, - final Optional builderRestClient, + final Optional builderClient, final Spec spec, final MetricsSystem metricsSystem, final BuilderBidValidator builderBidValidator) { @@ -127,7 +127,7 @@ public static ExecutionLayerManagerImpl create( return new ExecutionLayerManagerImpl( executionEngineClient, - builderRestClient, + builderClient, spec, eventLogger, builderBidValidator, @@ -151,30 +151,29 @@ public static ExecutionEngineClient createEngineClient( metricEngineClient, MAXIMUM_CONCURRENT_EE_REQUESTS, metricsSystem); } - public static ExecutionBuilderClient createBuilderClient( + public static BuilderClient createBuilderClient( final RestClient builderRestClient, final Spec spec, final TimeProvider timeProvider, final MetricsSystem metricsSystem) { - final RestExecutionBuilderClient restBuilderClient = - new RestExecutionBuilderClient(builderRestClient, spec); - final MetricRecordingExecutionBuilderClient metricRecordingBuilderClient = - new MetricRecordingExecutionBuilderClient(restBuilderClient, timeProvider, metricsSystem); - return new ThrottlingExecutionBuilderClient( + final RestBuilderClient restBuilderClient = new RestBuilderClient(builderRestClient, spec); + final MetricRecordingBuilderClient metricRecordingBuilderClient = + new MetricRecordingBuilderClient(restBuilderClient, timeProvider, metricsSystem); + return new ThrottlingBuilderClient( metricRecordingBuilderClient, MAXIMUM_CONCURRENT_EB_REQUESTS, metricsSystem); } private ExecutionLayerManagerImpl( final ExecutionEngineClient executionEngineClient, - final Optional executionBuilderClient, + final Optional builderClient, final Spec spec, final EventLogger eventLogger, final BuilderBidValidator builderBidValidator, final LabelledMetric executionPayloadSourceCounter) { this.executionEngineClient = executionEngineClient; - this.executionBuilderClient = executionBuilderClient; - this.latestBuilderAvailability = new AtomicBoolean(executionBuilderClient.isPresent()); + this.builderClient = builderClient; + this.latestBuilderAvailability = new AtomicBoolean(builderClient.isPresent()); this.spec = spec; this.eventLogger = eventLogger; this.builderBidValidator = builderBidValidator; @@ -322,7 +321,7 @@ public SafeFuture builderRegisterValidators( new RuntimeException("Unable to register validators: builder not available")); } - return executionBuilderClient + return builderClient .orElseThrow() .registerValidators(slot, signedValidatorRegistrations) .thenApply(ExecutionLayerManagerImpl::unwrapResponseOrThrow) @@ -349,11 +348,11 @@ public SafeFuture builderGetHeader( // fallback conditions final FallbackReason fallbackReason; - if (executionBuilderClient.isEmpty() && validatorRegistration.isEmpty()) { + if (builderClient.isEmpty() && validatorRegistration.isEmpty()) { fallbackReason = FallbackReason.NOT_NEEDED; } else if (transitionNotFinalized) { fallbackReason = FallbackReason.TRANSITION_NOT_FINALIZED; - } else if (executionBuilderClient.isEmpty()) { + } else if (builderClient.isEmpty()) { fallbackReason = FallbackReason.BUILDER_NOT_CONFIGURED; } else if (!isBuilderAvailable()) { fallbackReason = FallbackReason.BUILDER_NOT_AVAILABLE; @@ -375,7 +374,7 @@ public SafeFuture builderGetHeader( validatorPublicKey, executionPayloadContext.getParentHash()); - return executionBuilderClient + return builderClient .orElseThrow() .getHeader(slot, validatorPublicKey, executionPayloadContext.getParentHash()) .thenApply(ExecutionLayerManagerImpl::unwrapResponseOrThrow) @@ -463,7 +462,7 @@ private SafeFuture getPayloadFromBuilder( final SignedBeaconBlock signedBlindedBeaconBlock) { LOG.trace("calling builderGetPayload(signedBlindedBeaconBlock={})", signedBlindedBeaconBlock); - return executionBuilderClient + return builderClient .orElseThrow( () -> new RuntimeException( @@ -501,10 +500,10 @@ private static K unwrapResponseOrThrow(final Response response) { } private void updateBuilderAvailability() { - if (executionBuilderClient.isEmpty()) { + if (builderClient.isEmpty()) { return; } - executionBuilderClient + builderClient .get() .status() .finish( @@ -513,7 +512,7 @@ private void updateBuilderAvailability() { markBuilderAsNotAvailable(statusResponse.getErrorMessage()); } else { if (latestBuilderAvailability.compareAndSet(false, true)) { - eventLogger.executionBuilderIsBackOnline(); + eventLogger.builderIsBackOnline(); } } }, @@ -522,7 +521,7 @@ private void updateBuilderAvailability() { private void markBuilderAsNotAvailable(final String errorMessage) { latestBuilderAvailability.set(false); - eventLogger.executionBuilderIsOffline(errorMessage); + eventLogger.builderIsOffline(errorMessage); } private void logFallbackToLocalExecutionPayload(final FallbackData fallbackData) { diff --git a/ethereum/executionlayer/src/test/java/tech/pegasys/teku/ethereum/executionlayer/BuilderBidValidatorTest.java b/ethereum/executionlayer/src/test/java/tech/pegasys/teku/ethereum/executionlayer/BuilderBidValidatorTest.java index 1bbbc26bfcc..89f8e886dc9 100644 --- a/ethereum/executionlayer/src/test/java/tech/pegasys/teku/ethereum/executionlayer/BuilderBidValidatorTest.java +++ b/ethereum/executionlayer/src/test/java/tech/pegasys/teku/ethereum/executionlayer/BuilderBidValidatorTest.java @@ -39,10 +39,10 @@ import tech.pegasys.teku.spec.Spec; import tech.pegasys.teku.spec.SpecVersion; import tech.pegasys.teku.spec.TestSpecFactory; -import tech.pegasys.teku.spec.datastructures.execution.BuilderBid; +import tech.pegasys.teku.spec.datastructures.builder.BuilderBid; +import tech.pegasys.teku.spec.datastructures.builder.SignedBuilderBid; +import tech.pegasys.teku.spec.datastructures.builder.SignedValidatorRegistration; import tech.pegasys.teku.spec.datastructures.execution.ExecutionPayloadHeader; -import tech.pegasys.teku.spec.datastructures.execution.SignedBuilderBid; -import tech.pegasys.teku.spec.datastructures.execution.SignedValidatorRegistration; import tech.pegasys.teku.spec.datastructures.state.beaconstate.BeaconState; import tech.pegasys.teku.spec.logic.common.block.BlockProcessor; import tech.pegasys.teku.spec.logic.common.statetransition.exceptions.BlockProcessingException; diff --git a/ethereum/executionlayer/src/test/java/tech/pegasys/teku/ethereum/executionlayer/ExecutionLayerManagerImplTest.java b/ethereum/executionlayer/src/test/java/tech/pegasys/teku/ethereum/executionlayer/ExecutionLayerManagerImplTest.java index 0767ae638c0..85766165b1d 100644 --- a/ethereum/executionlayer/src/test/java/tech/pegasys/teku/ethereum/executionlayer/ExecutionLayerManagerImplTest.java +++ b/ethereum/executionlayer/src/test/java/tech/pegasys/teku/ethereum/executionlayer/ExecutionLayerManagerImplTest.java @@ -26,7 +26,7 @@ import java.util.stream.IntStream; import org.junit.jupiter.api.Test; import org.mockito.Mockito; -import tech.pegasys.teku.ethereum.executionclient.ExecutionBuilderClient; +import tech.pegasys.teku.ethereum.executionclient.BuilderClient; import tech.pegasys.teku.ethereum.executionclient.ExecutionEngineClient; import tech.pegasys.teku.ethereum.executionclient.schema.ExecutionPayloadV1; import tech.pegasys.teku.ethereum.executionclient.schema.Response; @@ -40,10 +40,10 @@ import tech.pegasys.teku.spec.Spec; import tech.pegasys.teku.spec.TestSpecFactory; import tech.pegasys.teku.spec.datastructures.blocks.SignedBeaconBlock; +import tech.pegasys.teku.spec.datastructures.builder.SignedBuilderBid; import tech.pegasys.teku.spec.datastructures.execution.ExecutionPayload; import tech.pegasys.teku.spec.datastructures.execution.ExecutionPayloadContext; import tech.pegasys.teku.spec.datastructures.execution.ExecutionPayloadHeader; -import tech.pegasys.teku.spec.datastructures.execution.SignedBuilderBid; import tech.pegasys.teku.spec.datastructures.state.beaconstate.BeaconState; import tech.pegasys.teku.spec.util.DataStructureUtil; @@ -52,8 +52,7 @@ class ExecutionLayerManagerImplTest { private final ExecutionEngineClient executionEngineClient = Mockito.mock(ExecutionEngineClient.class); - private final ExecutionBuilderClient executionBuilderClient = - Mockito.mock(ExecutionBuilderClient.class); + private final BuilderClient builderClient = Mockito.mock(BuilderClient.class); private final Spec spec = TestSpecFactory.createMinimalBellatrix(); @@ -74,7 +73,7 @@ public void builderShouldNotBeAvailableWhenBuilderNotEnabled() { executionLayerManager.onSlot(UInt64.ONE); assertThat(executionLayerManager.isBuilderAvailable()).isFalse(); - verifyNoInteractions(executionBuilderClient); + verifyNoInteractions(builderClient); verifyNoInteractions(eventLogger); } @@ -97,7 +96,7 @@ public void builderShouldNotBeAvailableWhenBuilderIsNotOperatingNormally() { updateBuilderStatus(builderClientResponse); assertThat(executionLayerManager.isBuilderAvailable()).isFalse(); - verify(eventLogger).executionBuilderIsOffline("oops"); + verify(eventLogger).builderIsOffline("oops"); } @Test @@ -108,7 +107,7 @@ public void builderShouldNotBeAvailableWhenBuilderStatusCallFails() { updateBuilderStatus(builderClientResponse); assertThat(executionLayerManager.isBuilderAvailable()).isFalse(); - verify(eventLogger).executionBuilderIsOffline("oops"); + verify(eventLogger).builderIsOffline("oops"); } @Test @@ -128,14 +127,14 @@ public void builderAvailabilityIsUpdatedOnSlotEventAndLoggedAdequately() { // Then assertThat(executionLayerManager.isBuilderAvailable()).isFalse(); - verify(eventLogger).executionBuilderIsOffline("oops"); + verify(eventLogger).builderIsOffline("oops"); // Given builder status is back to being ok updateBuilderStatus(SafeFuture.completedFuture(Response.withNullPayload())); // Then assertThat(executionLayerManager.isBuilderAvailable()).isTrue(); - verify(eventLogger).executionBuilderIsBackOnline(); + verify(eventLogger).builderIsBackOnline(); } @Test @@ -150,7 +149,7 @@ public void engineGetPayload_shouldReturnPayloadViaEngine() { .isCompletedWithValue(payload); // we expect no calls to builder - verifyNoInteractions(executionBuilderClient); + verifyNoInteractions(builderClient); verifySourceCounter(Source.LOCAL_EL, FallbackReason.NONE); } @@ -186,7 +185,7 @@ public void builderGetHeaderGetPayload_shouldReturnHeaderAndPayloadViaBuilder() .isCompletedWithValue(payload); // we expect both builder and local engine have been called - verify(executionBuilderClient).getPayload(signedBlindedBeaconBlock); + verify(builderClient).getPayload(signedBlindedBeaconBlock); verifyNoMoreInteractions(executionEngineClient); verifySourceCounter(Source.BUILDER, FallbackReason.NONE); @@ -228,7 +227,7 @@ public void builderGetHeaderGetPayload_shouldReturnHeaderAndPayloadViaEngineOnBu .isCompletedWithValue(payload); // we expect no additional calls - verifyNoMoreInteractions(executionBuilderClient); + verifyNoMoreInteractions(builderClient); verifyNoMoreInteractions(executionEngineClient); verifySourceCounter(Source.BUILDER_LOCAL_EL_FALLBACK, FallbackReason.BUILDER_ERROR); @@ -272,7 +271,7 @@ public void builderGetHeaderGetPayload_shouldReturnHeaderAndPayloadViaEngineOnBu .isCompletedWithValue(payload); // we expect no additional calls - verifyNoMoreInteractions(executionBuilderClient); + verifyNoMoreInteractions(builderClient); verifyNoMoreInteractions(executionEngineClient); verifySourceCounter(Source.BUILDER_LOCAL_EL_FALLBACK, FallbackReason.BUILDER_ERROR); @@ -302,7 +301,7 @@ public void builderGetHeaderGetPayload_shouldReturnHeaderAndPayloadViaEngineIfBu .isCompletedWithValue(header); // we expect only local engine have been called - verifyNoInteractions(executionBuilderClient); + verifyNoInteractions(builderClient); verifyEngineCalled(executionPayloadContext); final SignedBeaconBlock signedBlindedBeaconBlock = @@ -313,7 +312,7 @@ public void builderGetHeaderGetPayload_shouldReturnHeaderAndPayloadViaEngineIfBu .isCompletedWithValue(payload); // we expect no additional calls - verifyNoMoreInteractions(executionBuilderClient); + verifyNoMoreInteractions(builderClient); verifyNoMoreInteractions(executionEngineClient); verifySourceCounter(Source.BUILDER_LOCAL_EL_FALLBACK, FallbackReason.BUILDER_NOT_AVAILABLE); @@ -357,7 +356,7 @@ public void builderGetHeaderGetPayload_shouldReturnHeaderAndPayloadViaEngineIfBu .isCompletedWithValue(payload); // we expect no additional calls - verifyNoMoreInteractions(executionBuilderClient); + verifyNoMoreInteractions(builderClient); verifyNoMoreInteractions(executionEngineClient); verifySourceCounter( @@ -389,7 +388,7 @@ public void builderGetHeaderGetPayload_shouldReturnHeaderAndPayloadViaEngineIfBu .isCompletedWithValue(header); // we expect only local engine have been called - verifyNoInteractions(executionBuilderClient); + verifyNoInteractions(builderClient); verifyEngineCalled(executionPayloadContext); final SignedBeaconBlock signedBlindedBeaconBlock = @@ -400,7 +399,7 @@ public void builderGetHeaderGetPayload_shouldReturnHeaderAndPayloadViaEngineIfBu .isCompletedWithValue(payload); // we expect no additional calls - verifyNoMoreInteractions(executionBuilderClient); + verifyNoMoreInteractions(builderClient); verifyNoMoreInteractions(executionEngineClient); verifySourceCounter(Source.BUILDER_LOCAL_EL_FALLBACK, FallbackReason.TRANSITION_NOT_FINALIZED); @@ -431,7 +430,7 @@ public void builderGetHeaderGetPayload_shouldReturnHeaderAndPayloadViaEngineIfBu .isCompletedWithValue(header); // we expect only local engine have been called - verifyNoInteractions(executionBuilderClient); + verifyNoInteractions(builderClient); verifyEngineCalled(executionPayloadContext); final SignedBeaconBlock signedBlindedBeaconBlock = @@ -442,7 +441,7 @@ public void builderGetHeaderGetPayload_shouldReturnHeaderAndPayloadViaEngineIfBu .isCompletedWithValue(payload); // we expect no additional calls - verifyNoMoreInteractions(executionBuilderClient); + verifyNoMoreInteractions(builderClient); verifyNoMoreInteractions(executionEngineClient); verifySourceCounter(Source.BUILDER_LOCAL_EL_FALLBACK, FallbackReason.VALIDATOR_NOT_REGISTERED); @@ -484,7 +483,7 @@ void onSlot_shouldCleanUpFallbackCache() { .isCompletedWithValue(payload); // we expect both builder and local engine have been called - verify(executionBuilderClient).getPayload(signedBlindedBeaconBlock); + verify(builderClient).getPayload(signedBlindedBeaconBlock); verifyNoMoreInteractions(executionEngineClient); } @@ -501,7 +500,7 @@ private ExecutionPayloadHeader prepareBuilderGetHeaderResponse( } return SafeFuture.completedFuture(new Response<>(Optional.of(signedBuilderBid))); }) - .when(executionBuilderClient) + .when(builderClient) .getHeader( slot, executionPayloadContext @@ -518,7 +517,7 @@ private ExecutionPayload prepareBuilderGetPayloadResponse( final ExecutionPayload payload = dataStructureUtil.randomExecutionPayload(); - when(executionBuilderClient.getPayload(signedBlindedBeaconBlock)) + when(builderClient.getPayload(signedBlindedBeaconBlock)) .thenReturn(SafeFuture.completedFuture(new Response<>(payload))); return payload; @@ -528,7 +527,7 @@ private void prepareBuilderGetHeaderFailure( final ExecutionPayloadContext executionPayloadContext) { final UInt64 slot = executionPayloadContext.getForkChoiceState().getHeadBlockSlot(); - when(executionBuilderClient.getHeader( + when(builderClient.getHeader( slot, executionPayloadContext .getPayloadBuildingAttributes() @@ -556,7 +555,7 @@ private ExecutionLayerManagerImpl createExecutionLayerChannelImpl( return ExecutionLayerManagerImpl.create( eventLogger, executionEngineClient, - builderEnabled ? Optional.of(executionBuilderClient) : Optional.empty(), + builderEnabled ? Optional.of(builderClient) : Optional.empty(), spec, stubMetricsSystem, builderValidatorEnabled @@ -569,7 +568,7 @@ private void updateBuilderStatus(final SafeFuture> builderClientR } private void updateBuilderStatus(SafeFuture> builderClientResponse, UInt64 slot) { - when(executionBuilderClient.status()).thenReturn(builderClientResponse); + when(builderClient.status()).thenReturn(builderClientResponse); // trigger update of the builder status executionLayerManager.onSlot(slot); } @@ -580,19 +579,19 @@ private void setBuilderOffline() { private void setBuilderOffline(final UInt64 slot) { updateBuilderStatus(SafeFuture.completedFuture(Response.withErrorMessage("oops")), slot); - reset(executionBuilderClient); + reset(builderClient); assertThat(executionLayerManager.isBuilderAvailable()).isFalse(); } private void setBuilderOnline() { updateBuilderStatus(SafeFuture.completedFuture(Response.withNullPayload()), UInt64.ONE); - reset(executionBuilderClient); + reset(builderClient); assertThat(executionLayerManager.isBuilderAvailable()).isTrue(); } private void verifyBuilderCalled( final UInt64 slot, final ExecutionPayloadContext executionPayloadContext) { - verify(executionBuilderClient) + verify(builderClient) .getHeader( slot, executionPayloadContext diff --git a/ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/execution/BuilderBid.java b/ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/builder/BuilderBid.java similarity index 92% rename from ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/execution/BuilderBid.java rename to ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/builder/BuilderBid.java index 87453cba4d8..ddc0e34a3da 100644 --- a/ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/execution/BuilderBid.java +++ b/ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/builder/BuilderBid.java @@ -11,13 +11,14 @@ * specific language governing permissions and limitations under the License. */ -package tech.pegasys.teku.spec.datastructures.execution; +package tech.pegasys.teku.spec.datastructures.builder; import org.apache.tuweni.units.bigints.UInt256; import tech.pegasys.teku.bls.BLSPublicKey; import tech.pegasys.teku.infrastructure.ssz.containers.Container3; import tech.pegasys.teku.infrastructure.ssz.primitive.SszUInt256; import tech.pegasys.teku.infrastructure.ssz.tree.TreeNode; +import tech.pegasys.teku.spec.datastructures.execution.ExecutionPayloadHeader; import tech.pegasys.teku.spec.datastructures.type.SszPublicKey; public class BuilderBid diff --git a/ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/execution/BuilderBidSchema.java b/ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/builder/BuilderBidSchema.java similarity index 89% rename from ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/execution/BuilderBidSchema.java rename to ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/builder/BuilderBidSchema.java index 682828152e8..c110d5c1948 100644 --- a/ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/execution/BuilderBidSchema.java +++ b/ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/builder/BuilderBidSchema.java @@ -11,7 +11,7 @@ * specific language governing permissions and limitations under the License. */ -package tech.pegasys.teku.spec.datastructures.execution; +package tech.pegasys.teku.spec.datastructures.builder; import org.apache.tuweni.units.bigints.UInt256; import tech.pegasys.teku.bls.BLSPublicKey; @@ -19,6 +19,8 @@ import tech.pegasys.teku.infrastructure.ssz.primitive.SszUInt256; import tech.pegasys.teku.infrastructure.ssz.schema.SszPrimitiveSchemas; import tech.pegasys.teku.infrastructure.ssz.tree.TreeNode; +import tech.pegasys.teku.spec.datastructures.execution.ExecutionPayloadHeader; +import tech.pegasys.teku.spec.datastructures.execution.ExecutionPayloadHeaderSchema; import tech.pegasys.teku.spec.datastructures.type.SszPublicKey; import tech.pegasys.teku.spec.datastructures.type.SszPublicKeySchema; diff --git a/ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/execution/SignedBuilderBid.java b/ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/builder/SignedBuilderBid.java similarity index 96% rename from ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/execution/SignedBuilderBid.java rename to ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/builder/SignedBuilderBid.java index 929c1e7b67d..12955dc5f49 100644 --- a/ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/execution/SignedBuilderBid.java +++ b/ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/builder/SignedBuilderBid.java @@ -11,7 +11,7 @@ * specific language governing permissions and limitations under the License. */ -package tech.pegasys.teku.spec.datastructures.execution; +package tech.pegasys.teku.spec.datastructures.builder; import tech.pegasys.teku.bls.BLSSignature; import tech.pegasys.teku.infrastructure.ssz.containers.Container2; diff --git a/ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/execution/SignedBuilderBidSchema.java b/ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/builder/SignedBuilderBidSchema.java similarity index 96% rename from ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/execution/SignedBuilderBidSchema.java rename to ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/builder/SignedBuilderBidSchema.java index 899e14883e4..70e1a798e94 100644 --- a/ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/execution/SignedBuilderBidSchema.java +++ b/ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/builder/SignedBuilderBidSchema.java @@ -11,7 +11,7 @@ * specific language governing permissions and limitations under the License. */ -package tech.pegasys.teku.spec.datastructures.execution; +package tech.pegasys.teku.spec.datastructures.builder; import tech.pegasys.teku.bls.BLSSignature; import tech.pegasys.teku.infrastructure.ssz.containers.ContainerSchema2; diff --git a/ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/execution/SignedValidatorRegistration.java b/ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/builder/SignedValidatorRegistration.java similarity index 96% rename from ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/execution/SignedValidatorRegistration.java rename to ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/builder/SignedValidatorRegistration.java index c347dc76efd..f112099e7e7 100644 --- a/ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/execution/SignedValidatorRegistration.java +++ b/ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/builder/SignedValidatorRegistration.java @@ -11,7 +11,7 @@ * specific language governing permissions and limitations under the License. */ -package tech.pegasys.teku.spec.datastructures.execution; +package tech.pegasys.teku.spec.datastructures.builder; import tech.pegasys.teku.bls.BLSSignature; import tech.pegasys.teku.infrastructure.ssz.containers.Container2; diff --git a/ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/execution/SignedValidatorRegistrationSchema.java b/ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/builder/SignedValidatorRegistrationSchema.java similarity index 96% rename from ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/execution/SignedValidatorRegistrationSchema.java rename to ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/builder/SignedValidatorRegistrationSchema.java index e7c8fb7eeb4..3984b69cba5 100644 --- a/ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/execution/SignedValidatorRegistrationSchema.java +++ b/ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/builder/SignedValidatorRegistrationSchema.java @@ -11,7 +11,7 @@ * specific language governing permissions and limitations under the License. */ -package tech.pegasys.teku.spec.datastructures.execution; +package tech.pegasys.teku.spec.datastructures.builder; import tech.pegasys.teku.bls.BLSSignature; import tech.pegasys.teku.infrastructure.ssz.containers.ContainerSchema2; diff --git a/ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/execution/SignedValidatorRegistrationsSchema.java b/ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/builder/SignedValidatorRegistrationsSchema.java similarity index 95% rename from ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/execution/SignedValidatorRegistrationsSchema.java rename to ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/builder/SignedValidatorRegistrationsSchema.java index 0d1767b2ab6..674e507cd69 100644 --- a/ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/execution/SignedValidatorRegistrationsSchema.java +++ b/ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/builder/SignedValidatorRegistrationsSchema.java @@ -11,7 +11,7 @@ * specific language governing permissions and limitations under the License. */ -package tech.pegasys.teku.spec.datastructures.execution; +package tech.pegasys.teku.spec.datastructures.builder; import tech.pegasys.teku.infrastructure.ssz.SszList; import tech.pegasys.teku.infrastructure.ssz.impl.SszListImpl; diff --git a/ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/execution/ValidatorRegistration.java b/ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/builder/ValidatorRegistration.java similarity index 97% rename from ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/execution/ValidatorRegistration.java rename to ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/builder/ValidatorRegistration.java index a861056fddf..118f0def3cf 100644 --- a/ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/execution/ValidatorRegistration.java +++ b/ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/builder/ValidatorRegistration.java @@ -11,7 +11,7 @@ * specific language governing permissions and limitations under the License. */ -package tech.pegasys.teku.spec.datastructures.execution; +package tech.pegasys.teku.spec.datastructures.builder; import tech.pegasys.teku.bls.BLSPublicKey; import tech.pegasys.teku.infrastructure.ssz.collections.SszByteVector; diff --git a/ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/execution/ValidatorRegistrationSchema.java b/ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/builder/ValidatorRegistrationSchema.java similarity index 97% rename from ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/execution/ValidatorRegistrationSchema.java rename to ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/builder/ValidatorRegistrationSchema.java index 35e6a0d555c..34cdd930d2e 100644 --- a/ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/execution/ValidatorRegistrationSchema.java +++ b/ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/builder/ValidatorRegistrationSchema.java @@ -11,7 +11,7 @@ * specific language governing permissions and limitations under the License. */ -package tech.pegasys.teku.spec.datastructures.execution; +package tech.pegasys.teku.spec.datastructures.builder; import tech.pegasys.teku.bls.BLSPublicKey; import tech.pegasys.teku.infrastructure.bytes.Bytes20; diff --git a/ethereum/spec/src/main/java/tech/pegasys/teku/spec/executionlayer/ExecutionLayerChannel.java b/ethereum/spec/src/main/java/tech/pegasys/teku/spec/executionlayer/ExecutionLayerChannel.java index dee99990959..034f8438b04 100644 --- a/ethereum/spec/src/main/java/tech/pegasys/teku/spec/executionlayer/ExecutionLayerChannel.java +++ b/ethereum/spec/src/main/java/tech/pegasys/teku/spec/executionlayer/ExecutionLayerChannel.java @@ -20,11 +20,11 @@ import tech.pegasys.teku.infrastructure.ssz.SszList; import tech.pegasys.teku.infrastructure.unsigned.UInt64; import tech.pegasys.teku.spec.datastructures.blocks.SignedBeaconBlock; +import tech.pegasys.teku.spec.datastructures.builder.SignedValidatorRegistration; import tech.pegasys.teku.spec.datastructures.execution.ExecutionPayload; import tech.pegasys.teku.spec.datastructures.execution.ExecutionPayloadContext; import tech.pegasys.teku.spec.datastructures.execution.ExecutionPayloadHeader; import tech.pegasys.teku.spec.datastructures.execution.PowBlock; -import tech.pegasys.teku.spec.datastructures.execution.SignedValidatorRegistration; import tech.pegasys.teku.spec.datastructures.state.beaconstate.BeaconState; public interface ExecutionLayerChannel extends ChannelInterface { diff --git a/ethereum/spec/src/main/java/tech/pegasys/teku/spec/executionlayer/ExecutionLayerChannelStub.java b/ethereum/spec/src/main/java/tech/pegasys/teku/spec/executionlayer/ExecutionLayerChannelStub.java index 93df377f27e..6be96f8805e 100644 --- a/ethereum/spec/src/main/java/tech/pegasys/teku/spec/executionlayer/ExecutionLayerChannelStub.java +++ b/ethereum/spec/src/main/java/tech/pegasys/teku/spec/executionlayer/ExecutionLayerChannelStub.java @@ -40,11 +40,11 @@ import tech.pegasys.teku.spec.SpecVersion; import tech.pegasys.teku.spec.config.SpecConfigBellatrix; import tech.pegasys.teku.spec.datastructures.blocks.SignedBeaconBlock; +import tech.pegasys.teku.spec.datastructures.builder.SignedValidatorRegistration; import tech.pegasys.teku.spec.datastructures.execution.ExecutionPayload; import tech.pegasys.teku.spec.datastructures.execution.ExecutionPayloadContext; import tech.pegasys.teku.spec.datastructures.execution.ExecutionPayloadHeader; import tech.pegasys.teku.spec.datastructures.execution.PowBlock; -import tech.pegasys.teku.spec.datastructures.execution.SignedValidatorRegistration; import tech.pegasys.teku.spec.datastructures.state.beaconstate.BeaconState; import tech.pegasys.teku.spec.schemas.SchemaDefinitionsBellatrix; @@ -72,7 +72,7 @@ public class ExecutionLayerChannelStub implements ExecutionLayerChannel { private Optional transitionConfiguration = Optional.empty(); // block and payload tracking - private Optional lastMevBoostPayloadToBeUnblinded = Optional.empty(); + private Optional lastBuilderPayloadToBeUnblinded = Optional.empty(); private Optional lastValidBlock = Optional.empty(); public ExecutionLayerChannelStub( @@ -296,7 +296,7 @@ public SafeFuture builderGetHeader( executionPayloadContext, slot, executionPayload.getBlockHash()); - lastMevBoostPayloadToBeUnblinded = Optional.of(executionPayload); + lastBuilderPayloadToBeUnblinded = Optional.of(executionPayload); return spec.atSlot(slot) .getSchemaDefinitions() .toVersionBellatrix() @@ -321,7 +321,7 @@ public SafeFuture builderGetPayload( "proposeBlindedBlock requires a signed blinded beacon block"); checkState( - lastMevBoostPayloadToBeUnblinded.isPresent(), + lastBuilderPayloadToBeUnblinded.isPresent(), "proposeBlindedBlock requires a previous call to getPayloadHeader"); final ExecutionPayloadHeader executionPayloadHeader = @@ -335,16 +335,16 @@ public SafeFuture builderGetPayload( checkState( executionPayloadHeader .hashTreeRoot() - .equals(lastMevBoostPayloadToBeUnblinded.get().hashTreeRoot()), + .equals(lastBuilderPayloadToBeUnblinded.get().hashTreeRoot()), "provided signed blinded block contains an execution payload header not matching the previously retrieved execution payload via getPayloadHeader"); LOG.info( "proposeBlindedBlock: slot: {} block: {} -> unblinded executionPayload blockHash: {}", signedBlindedBeaconBlock.getSlot(), signedBlindedBeaconBlock.getRoot(), - lastMevBoostPayloadToBeUnblinded.get().getBlockHash()); + lastBuilderPayloadToBeUnblinded.get().getBlockHash()); - return SafeFuture.completedFuture(lastMevBoostPayloadToBeUnblinded.get()); + return SafeFuture.completedFuture(lastBuilderPayloadToBeUnblinded.get()); } public PayloadStatus getPayloadStatus() { diff --git a/ethereum/spec/src/main/java/tech/pegasys/teku/spec/executionlayer/PayloadBuildingAttributes.java b/ethereum/spec/src/main/java/tech/pegasys/teku/spec/executionlayer/PayloadBuildingAttributes.java index 584b6ae7581..c5e358b1e70 100644 --- a/ethereum/spec/src/main/java/tech/pegasys/teku/spec/executionlayer/PayloadBuildingAttributes.java +++ b/ethereum/spec/src/main/java/tech/pegasys/teku/spec/executionlayer/PayloadBuildingAttributes.java @@ -19,8 +19,8 @@ import org.apache.tuweni.bytes.Bytes32; import tech.pegasys.teku.bls.BLSPublicKey; import tech.pegasys.teku.infrastructure.unsigned.UInt64; +import tech.pegasys.teku.spec.datastructures.builder.SignedValidatorRegistration; import tech.pegasys.teku.spec.datastructures.eth1.Eth1Address; -import tech.pegasys.teku.spec.datastructures.execution.SignedValidatorRegistration; public class PayloadBuildingAttributes { private final UInt64 timestamp; diff --git a/ethereum/spec/src/main/java/tech/pegasys/teku/spec/schemas/ApiSchemas.java b/ethereum/spec/src/main/java/tech/pegasys/teku/spec/schemas/ApiSchemas.java index 51ceab50c71..4fa92d1652b 100644 --- a/ethereum/spec/src/main/java/tech/pegasys/teku/spec/schemas/ApiSchemas.java +++ b/ethereum/spec/src/main/java/tech/pegasys/teku/spec/schemas/ApiSchemas.java @@ -13,9 +13,9 @@ package tech.pegasys.teku.spec.schemas; -import tech.pegasys.teku.spec.datastructures.execution.SignedValidatorRegistrationSchema; -import tech.pegasys.teku.spec.datastructures.execution.SignedValidatorRegistrationsSchema; -import tech.pegasys.teku.spec.datastructures.execution.ValidatorRegistrationSchema; +import tech.pegasys.teku.spec.datastructures.builder.SignedValidatorRegistrationSchema; +import tech.pegasys.teku.spec.datastructures.builder.SignedValidatorRegistrationsSchema; +import tech.pegasys.teku.spec.datastructures.builder.ValidatorRegistrationSchema; public class ApiSchemas { diff --git a/ethereum/spec/src/main/java/tech/pegasys/teku/spec/schemas/SchemaDefinitionsBellatrix.java b/ethereum/spec/src/main/java/tech/pegasys/teku/spec/schemas/SchemaDefinitionsBellatrix.java index be45c98c38b..eafffe13b51 100644 --- a/ethereum/spec/src/main/java/tech/pegasys/teku/spec/schemas/SchemaDefinitionsBellatrix.java +++ b/ethereum/spec/src/main/java/tech/pegasys/teku/spec/schemas/SchemaDefinitionsBellatrix.java @@ -24,10 +24,10 @@ import tech.pegasys.teku.spec.datastructures.blocks.blockbody.versions.bellatrix.BeaconBlockBodySchemaBellatrixImpl; import tech.pegasys.teku.spec.datastructures.blocks.blockbody.versions.bellatrix.BlindedBeaconBlockBodySchemaBellatrix; import tech.pegasys.teku.spec.datastructures.blocks.blockbody.versions.bellatrix.BlindedBeaconBlockBodySchemaBellatrixImpl; -import tech.pegasys.teku.spec.datastructures.execution.BuilderBidSchema; +import tech.pegasys.teku.spec.datastructures.builder.BuilderBidSchema; +import tech.pegasys.teku.spec.datastructures.builder.SignedBuilderBidSchema; import tech.pegasys.teku.spec.datastructures.execution.ExecutionPayloadHeaderSchema; import tech.pegasys.teku.spec.datastructures.execution.ExecutionPayloadSchema; -import tech.pegasys.teku.spec.datastructures.execution.SignedBuilderBidSchema; import tech.pegasys.teku.spec.datastructures.state.beaconstate.BeaconStateSchema; import tech.pegasys.teku.spec.datastructures.state.beaconstate.versions.bellatrix.BeaconStateBellatrix; import tech.pegasys.teku.spec.datastructures.state.beaconstate.versions.bellatrix.BeaconStateSchemaBellatrix; diff --git a/ethereum/spec/src/main/java/tech/pegasys/teku/spec/signatures/DeletableSigner.java b/ethereum/spec/src/main/java/tech/pegasys/teku/spec/signatures/DeletableSigner.java index 773d8e6c99a..662a176eabb 100644 --- a/ethereum/spec/src/main/java/tech/pegasys/teku/spec/signatures/DeletableSigner.java +++ b/ethereum/spec/src/main/java/tech/pegasys/teku/spec/signatures/DeletableSigner.java @@ -24,7 +24,7 @@ import tech.pegasys.teku.infrastructure.async.SafeFuture; import tech.pegasys.teku.infrastructure.unsigned.UInt64; import tech.pegasys.teku.spec.datastructures.blocks.BeaconBlock; -import tech.pegasys.teku.spec.datastructures.execution.ValidatorRegistration; +import tech.pegasys.teku.spec.datastructures.builder.ValidatorRegistration; import tech.pegasys.teku.spec.datastructures.operations.AggregateAndProof; import tech.pegasys.teku.spec.datastructures.operations.AttestationData; import tech.pegasys.teku.spec.datastructures.operations.VoluntaryExit; diff --git a/ethereum/spec/src/main/java/tech/pegasys/teku/spec/signatures/LocalSigner.java b/ethereum/spec/src/main/java/tech/pegasys/teku/spec/signatures/LocalSigner.java index 6566f9aa9ea..2f1e049e357 100644 --- a/ethereum/spec/src/main/java/tech/pegasys/teku/spec/signatures/LocalSigner.java +++ b/ethereum/spec/src/main/java/tech/pegasys/teku/spec/signatures/LocalSigner.java @@ -26,7 +26,7 @@ import tech.pegasys.teku.infrastructure.unsigned.UInt64; import tech.pegasys.teku.spec.Spec; import tech.pegasys.teku.spec.datastructures.blocks.BeaconBlock; -import tech.pegasys.teku.spec.datastructures.execution.ValidatorRegistration; +import tech.pegasys.teku.spec.datastructures.builder.ValidatorRegistration; import tech.pegasys.teku.spec.datastructures.operations.AggregateAndProof; import tech.pegasys.teku.spec.datastructures.operations.AttestationData; import tech.pegasys.teku.spec.datastructures.operations.VoluntaryExit; diff --git a/ethereum/spec/src/main/java/tech/pegasys/teku/spec/signatures/Signer.java b/ethereum/spec/src/main/java/tech/pegasys/teku/spec/signatures/Signer.java index d6b93940235..be8781f9950 100644 --- a/ethereum/spec/src/main/java/tech/pegasys/teku/spec/signatures/Signer.java +++ b/ethereum/spec/src/main/java/tech/pegasys/teku/spec/signatures/Signer.java @@ -20,7 +20,7 @@ import tech.pegasys.teku.infrastructure.async.SafeFuture; import tech.pegasys.teku.infrastructure.unsigned.UInt64; import tech.pegasys.teku.spec.datastructures.blocks.BeaconBlock; -import tech.pegasys.teku.spec.datastructures.execution.ValidatorRegistration; +import tech.pegasys.teku.spec.datastructures.builder.ValidatorRegistration; import tech.pegasys.teku.spec.datastructures.operations.AggregateAndProof; import tech.pegasys.teku.spec.datastructures.operations.AttestationData; import tech.pegasys.teku.spec.datastructures.operations.VoluntaryExit; diff --git a/ethereum/spec/src/main/java/tech/pegasys/teku/spec/signatures/SigningRootUtil.java b/ethereum/spec/src/main/java/tech/pegasys/teku/spec/signatures/SigningRootUtil.java index fa9a40463aa..b1e37bbde58 100644 --- a/ethereum/spec/src/main/java/tech/pegasys/teku/spec/signatures/SigningRootUtil.java +++ b/ethereum/spec/src/main/java/tech/pegasys/teku/spec/signatures/SigningRootUtil.java @@ -21,7 +21,7 @@ import tech.pegasys.teku.spec.constants.Domain; import tech.pegasys.teku.spec.datastructures.blocks.BeaconBlock; import tech.pegasys.teku.spec.datastructures.blocks.BeaconBlockHeader; -import tech.pegasys.teku.spec.datastructures.execution.ValidatorRegistration; +import tech.pegasys.teku.spec.datastructures.builder.ValidatorRegistration; import tech.pegasys.teku.spec.datastructures.operations.AggregateAndProof; import tech.pegasys.teku.spec.datastructures.operations.AttestationData; import tech.pegasys.teku.spec.datastructures.operations.VoluntaryExit; diff --git a/ethereum/spec/src/main/java/tech/pegasys/teku/spec/signatures/SlashingProtectedSigner.java b/ethereum/spec/src/main/java/tech/pegasys/teku/spec/signatures/SlashingProtectedSigner.java index 282fdd00051..9611d1b5fcd 100644 --- a/ethereum/spec/src/main/java/tech/pegasys/teku/spec/signatures/SlashingProtectedSigner.java +++ b/ethereum/spec/src/main/java/tech/pegasys/teku/spec/signatures/SlashingProtectedSigner.java @@ -23,7 +23,7 @@ import tech.pegasys.teku.infrastructure.async.SafeFuture; import tech.pegasys.teku.infrastructure.unsigned.UInt64; import tech.pegasys.teku.spec.datastructures.blocks.BeaconBlock; -import tech.pegasys.teku.spec.datastructures.execution.ValidatorRegistration; +import tech.pegasys.teku.spec.datastructures.builder.ValidatorRegistration; import tech.pegasys.teku.spec.datastructures.operations.AggregateAndProof; import tech.pegasys.teku.spec.datastructures.operations.AttestationData; import tech.pegasys.teku.spec.datastructures.operations.VoluntaryExit; diff --git a/ethereum/spec/src/property-test/java/tech/pegasys/teku/spec/datastructures/execution/BuilderBidPropertyTest.java b/ethereum/spec/src/property-test/java/tech/pegasys/teku/spec/datastructures/execution/BuilderBidPropertyTest.java index b4633ce822a..514d75892e7 100644 --- a/ethereum/spec/src/property-test/java/tech/pegasys/teku/spec/datastructures/execution/BuilderBidPropertyTest.java +++ b/ethereum/spec/src/property-test/java/tech/pegasys/teku/spec/datastructures/execution/BuilderBidPropertyTest.java @@ -26,6 +26,8 @@ import tech.pegasys.teku.spec.Spec; import tech.pegasys.teku.spec.SpecMilestone; import tech.pegasys.teku.spec.TestSpecFactory; +import tech.pegasys.teku.spec.datastructures.builder.BuilderBid; +import tech.pegasys.teku.spec.datastructures.builder.BuilderBidSchema; import tech.pegasys.teku.spec.networks.Eth2Network; import tech.pegasys.teku.spec.util.DataStructureUtil; diff --git a/ethereum/spec/src/property-test/java/tech/pegasys/teku/spec/datastructures/execution/SignedBuilderBidPropertyTest.java b/ethereum/spec/src/property-test/java/tech/pegasys/teku/spec/datastructures/execution/SignedBuilderBidPropertyTest.java index 61507467f5d..7ed44103e8a 100644 --- a/ethereum/spec/src/property-test/java/tech/pegasys/teku/spec/datastructures/execution/SignedBuilderBidPropertyTest.java +++ b/ethereum/spec/src/property-test/java/tech/pegasys/teku/spec/datastructures/execution/SignedBuilderBidPropertyTest.java @@ -26,6 +26,9 @@ import tech.pegasys.teku.spec.Spec; import tech.pegasys.teku.spec.SpecMilestone; import tech.pegasys.teku.spec.TestSpecFactory; +import tech.pegasys.teku.spec.datastructures.builder.BuilderBidSchema; +import tech.pegasys.teku.spec.datastructures.builder.SignedBuilderBid; +import tech.pegasys.teku.spec.datastructures.builder.SignedBuilderBidSchema; import tech.pegasys.teku.spec.networks.Eth2Network; import tech.pegasys.teku.spec.util.DataStructureUtil; diff --git a/ethereum/spec/src/property-test/java/tech/pegasys/teku/spec/datastructures/execution/SignedValidatorRegistrationPropertyTest.java b/ethereum/spec/src/property-test/java/tech/pegasys/teku/spec/datastructures/execution/SignedValidatorRegistrationPropertyTest.java index a361da65891..a33645c8799 100644 --- a/ethereum/spec/src/property-test/java/tech/pegasys/teku/spec/datastructures/execution/SignedValidatorRegistrationPropertyTest.java +++ b/ethereum/spec/src/property-test/java/tech/pegasys/teku/spec/datastructures/execution/SignedValidatorRegistrationPropertyTest.java @@ -26,6 +26,9 @@ import tech.pegasys.teku.spec.Spec; import tech.pegasys.teku.spec.SpecMilestone; import tech.pegasys.teku.spec.TestSpecFactory; +import tech.pegasys.teku.spec.datastructures.builder.SignedValidatorRegistration; +import tech.pegasys.teku.spec.datastructures.builder.SignedValidatorRegistrationSchema; +import tech.pegasys.teku.spec.datastructures.builder.ValidatorRegistrationSchema; import tech.pegasys.teku.spec.networks.Eth2Network; import tech.pegasys.teku.spec.util.DataStructureUtil; diff --git a/ethereum/spec/src/property-test/java/tech/pegasys/teku/spec/datastructures/execution/ValidatorRegistrationPropertyTest.java b/ethereum/spec/src/property-test/java/tech/pegasys/teku/spec/datastructures/execution/ValidatorRegistrationPropertyTest.java index 7944d2bf20b..f792dee700e 100644 --- a/ethereum/spec/src/property-test/java/tech/pegasys/teku/spec/datastructures/execution/ValidatorRegistrationPropertyTest.java +++ b/ethereum/spec/src/property-test/java/tech/pegasys/teku/spec/datastructures/execution/ValidatorRegistrationPropertyTest.java @@ -26,6 +26,8 @@ import tech.pegasys.teku.spec.Spec; import tech.pegasys.teku.spec.SpecMilestone; import tech.pegasys.teku.spec.TestSpecFactory; +import tech.pegasys.teku.spec.datastructures.builder.ValidatorRegistration; +import tech.pegasys.teku.spec.datastructures.builder.ValidatorRegistrationSchema; import tech.pegasys.teku.spec.networks.Eth2Network; import tech.pegasys.teku.spec.util.DataStructureUtil; diff --git a/ethereum/spec/src/test/java/tech/pegasys/teku/spec/signatures/DeletableSignerTest.java b/ethereum/spec/src/test/java/tech/pegasys/teku/spec/signatures/DeletableSignerTest.java index e09384ab034..49ff0e069db 100644 --- a/ethereum/spec/src/test/java/tech/pegasys/teku/spec/signatures/DeletableSignerTest.java +++ b/ethereum/spec/src/test/java/tech/pegasys/teku/spec/signatures/DeletableSignerTest.java @@ -31,7 +31,7 @@ import tech.pegasys.teku.spec.Spec; import tech.pegasys.teku.spec.TestSpecFactory; import tech.pegasys.teku.spec.datastructures.blocks.BeaconBlock; -import tech.pegasys.teku.spec.datastructures.execution.ValidatorRegistration; +import tech.pegasys.teku.spec.datastructures.builder.ValidatorRegistration; import tech.pegasys.teku.spec.datastructures.operations.AggregateAndProof; import tech.pegasys.teku.spec.datastructures.operations.AttestationData; import tech.pegasys.teku.spec.datastructures.operations.VoluntaryExit; diff --git a/ethereum/spec/src/test/java/tech/pegasys/teku/spec/signatures/LocalSignerTest.java b/ethereum/spec/src/test/java/tech/pegasys/teku/spec/signatures/LocalSignerTest.java index 18e15cb12ce..d1aa2ba90b4 100644 --- a/ethereum/spec/src/test/java/tech/pegasys/teku/spec/signatures/LocalSignerTest.java +++ b/ethereum/spec/src/test/java/tech/pegasys/teku/spec/signatures/LocalSignerTest.java @@ -26,7 +26,7 @@ import tech.pegasys.teku.spec.Spec; import tech.pegasys.teku.spec.TestSpecFactory; import tech.pegasys.teku.spec.datastructures.blocks.BeaconBlock; -import tech.pegasys.teku.spec.datastructures.execution.ValidatorRegistration; +import tech.pegasys.teku.spec.datastructures.builder.ValidatorRegistration; import tech.pegasys.teku.spec.datastructures.operations.AggregateAndProof; import tech.pegasys.teku.spec.datastructures.operations.AttestationData; import tech.pegasys.teku.spec.datastructures.operations.VoluntaryExit; diff --git a/ethereum/spec/src/test/java/tech/pegasys/teku/spec/signatures/SlashingProtectedSignerTest.java b/ethereum/spec/src/test/java/tech/pegasys/teku/spec/signatures/SlashingProtectedSignerTest.java index aa8d70744b0..f00971b0452 100644 --- a/ethereum/spec/src/test/java/tech/pegasys/teku/spec/signatures/SlashingProtectedSignerTest.java +++ b/ethereum/spec/src/test/java/tech/pegasys/teku/spec/signatures/SlashingProtectedSignerTest.java @@ -26,7 +26,7 @@ import tech.pegasys.teku.infrastructure.unsigned.UInt64; import tech.pegasys.teku.spec.TestSpecFactory; import tech.pegasys.teku.spec.datastructures.blocks.BeaconBlock; -import tech.pegasys.teku.spec.datastructures.execution.ValidatorRegistration; +import tech.pegasys.teku.spec.datastructures.builder.ValidatorRegistration; import tech.pegasys.teku.spec.datastructures.operations.AggregateAndProof; import tech.pegasys.teku.spec.datastructures.operations.AttestationData; import tech.pegasys.teku.spec.datastructures.operations.VoluntaryExit; diff --git a/ethereum/spec/src/testFixtures/java/tech/pegasys/teku/spec/generator/signatures/NoOpSigner.java b/ethereum/spec/src/testFixtures/java/tech/pegasys/teku/spec/generator/signatures/NoOpSigner.java index 85481707c88..fb5894c6bbd 100644 --- a/ethereum/spec/src/testFixtures/java/tech/pegasys/teku/spec/generator/signatures/NoOpSigner.java +++ b/ethereum/spec/src/testFixtures/java/tech/pegasys/teku/spec/generator/signatures/NoOpSigner.java @@ -20,7 +20,7 @@ import tech.pegasys.teku.infrastructure.async.SafeFuture; import tech.pegasys.teku.infrastructure.unsigned.UInt64; import tech.pegasys.teku.spec.datastructures.blocks.BeaconBlock; -import tech.pegasys.teku.spec.datastructures.execution.ValidatorRegistration; +import tech.pegasys.teku.spec.datastructures.builder.ValidatorRegistration; import tech.pegasys.teku.spec.datastructures.operations.AggregateAndProof; import tech.pegasys.teku.spec.datastructures.operations.AttestationData; import tech.pegasys.teku.spec.datastructures.operations.VoluntaryExit; diff --git a/ethereum/spec/src/testFixtures/java/tech/pegasys/teku/spec/util/DataStructureUtil.java b/ethereum/spec/src/testFixtures/java/tech/pegasys/teku/spec/util/DataStructureUtil.java index 4fa0e6dc636..61755b99003 100644 --- a/ethereum/spec/src/testFixtures/java/tech/pegasys/teku/spec/util/DataStructureUtil.java +++ b/ethereum/spec/src/testFixtures/java/tech/pegasys/teku/spec/util/DataStructureUtil.java @@ -85,16 +85,16 @@ import tech.pegasys.teku.spec.datastructures.blocks.blockbody.BeaconBlockBodySchema; import tech.pegasys.teku.spec.datastructures.blocks.blockbody.versions.altair.SyncAggregate; import tech.pegasys.teku.spec.datastructures.blocks.blockbody.versions.altair.SyncAggregateSchema; +import tech.pegasys.teku.spec.datastructures.builder.BuilderBid; +import tech.pegasys.teku.spec.datastructures.builder.SignedBuilderBid; +import tech.pegasys.teku.spec.datastructures.builder.SignedValidatorRegistration; +import tech.pegasys.teku.spec.datastructures.builder.ValidatorRegistration; import tech.pegasys.teku.spec.datastructures.eth1.Eth1Address; -import tech.pegasys.teku.spec.datastructures.execution.BuilderBid; import tech.pegasys.teku.spec.datastructures.execution.ExecutionPayload; import tech.pegasys.teku.spec.datastructures.execution.ExecutionPayloadContext; import tech.pegasys.teku.spec.datastructures.execution.ExecutionPayloadHeader; -import tech.pegasys.teku.spec.datastructures.execution.SignedBuilderBid; -import tech.pegasys.teku.spec.datastructures.execution.SignedValidatorRegistration; import tech.pegasys.teku.spec.datastructures.execution.Transaction; import tech.pegasys.teku.spec.datastructures.execution.TransactionSchema; -import tech.pegasys.teku.spec.datastructures.execution.ValidatorRegistration; import tech.pegasys.teku.spec.datastructures.forkchoice.VoteTracker; import tech.pegasys.teku.spec.datastructures.networking.libp2p.rpc.EnrForkId; import tech.pegasys.teku.spec.datastructures.operations.AggregateAndProof; diff --git a/ethereum/statetransition/src/main/java/tech/pegasys/teku/statetransition/forkchoice/ProposersDataManager.java b/ethereum/statetransition/src/main/java/tech/pegasys/teku/statetransition/forkchoice/ProposersDataManager.java index a45e5b51542..e4b6c6aea51 100644 --- a/ethereum/statetransition/src/main/java/tech/pegasys/teku/statetransition/forkchoice/ProposersDataManager.java +++ b/ethereum/statetransition/src/main/java/tech/pegasys/teku/statetransition/forkchoice/ProposersDataManager.java @@ -33,8 +33,8 @@ import tech.pegasys.teku.infrastructure.unsigned.UInt64; import tech.pegasys.teku.spec.Spec; import tech.pegasys.teku.spec.datastructures.blocks.SlotAndBlockRoot; +import tech.pegasys.teku.spec.datastructures.builder.SignedValidatorRegistration; import tech.pegasys.teku.spec.datastructures.eth1.Eth1Address; -import tech.pegasys.teku.spec.datastructures.execution.SignedValidatorRegistration; import tech.pegasys.teku.spec.datastructures.operations.versions.bellatrix.BeaconPreparableProposer; import tech.pegasys.teku.spec.datastructures.state.beaconstate.BeaconState; import tech.pegasys.teku.spec.executionlayer.ExecutionLayerChannel; diff --git a/ethereum/statetransition/src/main/java/tech/pegasys/teku/statetransition/forkchoice/RegisteredValidatorInfo.java b/ethereum/statetransition/src/main/java/tech/pegasys/teku/statetransition/forkchoice/RegisteredValidatorInfo.java index 534f97a143c..352e4da9801 100644 --- a/ethereum/statetransition/src/main/java/tech/pegasys/teku/statetransition/forkchoice/RegisteredValidatorInfo.java +++ b/ethereum/statetransition/src/main/java/tech/pegasys/teku/statetransition/forkchoice/RegisteredValidatorInfo.java @@ -14,7 +14,7 @@ package tech.pegasys.teku.statetransition.forkchoice; import tech.pegasys.teku.infrastructure.unsigned.UInt64; -import tech.pegasys.teku.spec.datastructures.execution.SignedValidatorRegistration; +import tech.pegasys.teku.spec.datastructures.builder.SignedValidatorRegistration; public class RegisteredValidatorInfo extends ExpiringInfo { private final SignedValidatorRegistration signedValidatorRegistration; diff --git a/ethereum/statetransition/src/test/java/tech/pegasys/teku/statetransition/forkchoice/ForkChoiceNotifierTest.java b/ethereum/statetransition/src/test/java/tech/pegasys/teku/statetransition/forkchoice/ForkChoiceNotifierTest.java index bf209eee15c..7dd9c69e6b9 100644 --- a/ethereum/statetransition/src/test/java/tech/pegasys/teku/statetransition/forkchoice/ForkChoiceNotifierTest.java +++ b/ethereum/statetransition/src/test/java/tech/pegasys/teku/statetransition/forkchoice/ForkChoiceNotifierTest.java @@ -48,9 +48,9 @@ import tech.pegasys.teku.spec.TestSpecFactory; import tech.pegasys.teku.spec.datastructures.blocks.SignedBlockAndState; import tech.pegasys.teku.spec.datastructures.blocks.SlotAndBlockRoot; +import tech.pegasys.teku.spec.datastructures.builder.SignedValidatorRegistration; import tech.pegasys.teku.spec.datastructures.eth1.Eth1Address; import tech.pegasys.teku.spec.datastructures.execution.ExecutionPayloadContext; -import tech.pegasys.teku.spec.datastructures.execution.SignedValidatorRegistration; import tech.pegasys.teku.spec.datastructures.forkchoice.ReadOnlyForkChoiceStrategy; import tech.pegasys.teku.spec.datastructures.operations.versions.bellatrix.BeaconPreparableProposer; import tech.pegasys.teku.spec.datastructures.state.beaconstate.BeaconState; diff --git a/ethereum/statetransition/src/test/java/tech/pegasys/teku/statetransition/forkchoice/ProposerDataManagerTest.java b/ethereum/statetransition/src/test/java/tech/pegasys/teku/statetransition/forkchoice/ProposerDataManagerTest.java index 517e305d68d..218b3e6d1b1 100644 --- a/ethereum/statetransition/src/test/java/tech/pegasys/teku/statetransition/forkchoice/ProposerDataManagerTest.java +++ b/ethereum/statetransition/src/test/java/tech/pegasys/teku/statetransition/forkchoice/ProposerDataManagerTest.java @@ -32,8 +32,8 @@ import tech.pegasys.teku.infrastructure.unsigned.UInt64; import tech.pegasys.teku.spec.Spec; import tech.pegasys.teku.spec.TestSpecFactory; +import tech.pegasys.teku.spec.datastructures.builder.SignedValidatorRegistration; import tech.pegasys.teku.spec.datastructures.eth1.Eth1Address; -import tech.pegasys.teku.spec.datastructures.execution.SignedValidatorRegistration; import tech.pegasys.teku.spec.datastructures.operations.versions.bellatrix.BeaconPreparableProposer; import tech.pegasys.teku.spec.datastructures.state.beaconstate.BeaconState; import tech.pegasys.teku.spec.executionlayer.ExecutionLayerChannel; diff --git a/infrastructure/logging/src/main/java/tech/pegasys/teku/infrastructure/logging/EventLogger.java b/infrastructure/logging/src/main/java/tech/pegasys/teku/infrastructure/logging/EventLogger.java index 4b89a387aea..fc6b2e87960 100644 --- a/infrastructure/logging/src/main/java/tech/pegasys/teku/infrastructure/logging/EventLogger.java +++ b/infrastructure/logging/src/main/java/tech/pegasys/teku/infrastructure/logging/EventLogger.java @@ -143,18 +143,18 @@ public void executionClientIsOnline() { info("Execution Client is back online", Color.GREEN); } - public void executionBuilderIsOffline(String errorMessage) { - String executionBuilderOfflineEventLog = + public void builderIsOffline(final String errorMessage) { + String builderOfflineEventLog = String.format( - "The execution builder is offline: %s. Block production will fallback to the execution engine.", + "The builder is offline: %s. Block production will fallback to the execution engine.", errorMessage); - warn(executionBuilderOfflineEventLog, Color.YELLOW); + warn(builderOfflineEventLog, Color.YELLOW); } - public void executionBuilderIsBackOnline() { - String executionBuilderOnlineEventLog = - "The execution builder is back online. It will be used for block production."; - info(executionBuilderOnlineEventLog, Color.GREEN); + public void builderIsBackOnline() { + String builderOnlineEventLog = + "The builder is back online. It will be used for block production."; + info(builderOnlineEventLog, Color.GREEN); } public void syncStart() { diff --git a/services/executionlayer/src/main/java/tech/pegasys/teku/services/executionlayer/ExecutionLayerService.java b/services/executionlayer/src/main/java/tech/pegasys/teku/services/executionlayer/ExecutionLayerService.java index b220c047291..c50bdfcdcc1 100644 --- a/services/executionlayer/src/main/java/tech/pegasys/teku/services/executionlayer/ExecutionLayerService.java +++ b/services/executionlayer/src/main/java/tech/pegasys/teku/services/executionlayer/ExecutionLayerService.java @@ -26,7 +26,7 @@ import org.apache.tuweni.bytes.Bytes32; import org.hyperledger.besu.plugin.services.MetricsSystem; import tech.pegasys.teku.ethereum.events.SlotEventsChannel; -import tech.pegasys.teku.ethereum.executionclient.ExecutionBuilderClient; +import tech.pegasys.teku.ethereum.executionclient.BuilderClient; import tech.pegasys.teku.ethereum.executionclient.ExecutionEngineClient; import tech.pegasys.teku.ethereum.executionclient.rest.RestClientProvider; import tech.pegasys.teku.ethereum.executionclient.web3j.ExecutionWeb3jClientProvider; @@ -115,7 +115,7 @@ public static ExecutionLayerService create( engineWeb3jClientProvider.getWeb3JClient(), timeProvider, metricsSystem); - final Optional executionBuilderClient = + final Optional builderClient = builderRestClientProvider.map( restClientProvider -> ExecutionLayerManagerImpl.createBuilderClient( @@ -128,7 +128,7 @@ public static ExecutionLayerService create( ExecutionLayerManagerImpl.create( EVENT_LOG, executionEngineClient, - executionBuilderClient, + builderClient, config.getSpec(), metricsSystem, new BuilderBidValidatorImpl(EVENT_LOG)); diff --git a/teku/src/main/java/tech/pegasys/teku/cli/options/ExecutionLayerOptions.java b/teku/src/main/java/tech/pegasys/teku/cli/options/ExecutionLayerOptions.java index 47706743bf0..8a3d22eb313 100644 --- a/teku/src/main/java/tech/pegasys/teku/cli/options/ExecutionLayerOptions.java +++ b/teku/src/main/java/tech/pegasys/teku/cli/options/ExecutionLayerOptions.java @@ -52,7 +52,7 @@ public class ExecutionLayerOptions { paramLabel = "", description = "URL for an external Builder node (optional).", arity = "1") - private String executionBuilderEndpoint = null; + private String builderEndpoint = null; public void configure(final Builder builder) { builder.executionLayer( @@ -60,7 +60,7 @@ public void configure(final Builder builder) { b.engineEndpoint(executionEngineEndpoint) .engineVersion(executionEngineVersion) .engineJwtSecretFile(engineJwtSecretFile) - .builderEndpoint(executionBuilderEndpoint)); + .builderEndpoint(builderEndpoint)); depositOptions.configure(builder); } } diff --git a/validator/api/src/main/java/tech/pegasys/teku/validator/api/ValidatorApiChannel.java b/validator/api/src/main/java/tech/pegasys/teku/validator/api/ValidatorApiChannel.java index 4820488c52d..e8fce323e45 100644 --- a/validator/api/src/main/java/tech/pegasys/teku/validator/api/ValidatorApiChannel.java +++ b/validator/api/src/main/java/tech/pegasys/teku/validator/api/ValidatorApiChannel.java @@ -29,7 +29,7 @@ import tech.pegasys.teku.infrastructure.unsigned.UInt64; import tech.pegasys.teku.spec.datastructures.blocks.BeaconBlock; import tech.pegasys.teku.spec.datastructures.blocks.SignedBeaconBlock; -import tech.pegasys.teku.spec.datastructures.execution.SignedValidatorRegistration; +import tech.pegasys.teku.spec.datastructures.builder.SignedValidatorRegistration; import tech.pegasys.teku.spec.datastructures.genesis.GenesisData; import tech.pegasys.teku.spec.datastructures.operations.Attestation; import tech.pegasys.teku.spec.datastructures.operations.AttestationData; diff --git a/validator/beaconnode/src/main/java/tech/pegasys/teku/validator/beaconnode/metrics/MetricRecordingValidatorApiChannel.java b/validator/beaconnode/src/main/java/tech/pegasys/teku/validator/beaconnode/metrics/MetricRecordingValidatorApiChannel.java index 18fe2bfded4..9a26f708fab 100644 --- a/validator/beaconnode/src/main/java/tech/pegasys/teku/validator/beaconnode/metrics/MetricRecordingValidatorApiChannel.java +++ b/validator/beaconnode/src/main/java/tech/pegasys/teku/validator/beaconnode/metrics/MetricRecordingValidatorApiChannel.java @@ -32,7 +32,7 @@ import tech.pegasys.teku.infrastructure.unsigned.UInt64; import tech.pegasys.teku.spec.datastructures.blocks.BeaconBlock; import tech.pegasys.teku.spec.datastructures.blocks.SignedBeaconBlock; -import tech.pegasys.teku.spec.datastructures.execution.SignedValidatorRegistration; +import tech.pegasys.teku.spec.datastructures.builder.SignedValidatorRegistration; import tech.pegasys.teku.spec.datastructures.genesis.GenesisData; import tech.pegasys.teku.spec.datastructures.operations.Attestation; import tech.pegasys.teku.spec.datastructures.operations.AttestationData; diff --git a/validator/client/src/integration-test/java/tech/pegasys/teku/validator/client/signer/ExternalSignerIntegrationTest.java b/validator/client/src/integration-test/java/tech/pegasys/teku/validator/client/signer/ExternalSignerIntegrationTest.java index dc6d918da2f..0aff33605b0 100644 --- a/validator/client/src/integration-test/java/tech/pegasys/teku/validator/client/signer/ExternalSignerIntegrationTest.java +++ b/validator/client/src/integration-test/java/tech/pegasys/teku/validator/client/signer/ExternalSignerIntegrationTest.java @@ -50,7 +50,7 @@ import tech.pegasys.teku.spec.Spec; import tech.pegasys.teku.spec.TestSpecFactory; import tech.pegasys.teku.spec.datastructures.blocks.BeaconBlock; -import tech.pegasys.teku.spec.datastructures.execution.ValidatorRegistration; +import tech.pegasys.teku.spec.datastructures.builder.ValidatorRegistration; import tech.pegasys.teku.spec.datastructures.operations.AggregateAndProof; import tech.pegasys.teku.spec.datastructures.operations.AttestationData; import tech.pegasys.teku.spec.datastructures.operations.VoluntaryExit; diff --git a/validator/client/src/main/java/tech/pegasys/teku/validator/client/ValidatorRegistrationBatchSender.java b/validator/client/src/main/java/tech/pegasys/teku/validator/client/ValidatorRegistrationBatchSender.java index 5415a37f3b7..1e15074d614 100644 --- a/validator/client/src/main/java/tech/pegasys/teku/validator/client/ValidatorRegistrationBatchSender.java +++ b/validator/client/src/main/java/tech/pegasys/teku/validator/client/ValidatorRegistrationBatchSender.java @@ -22,7 +22,7 @@ import tech.pegasys.teku.infrastructure.async.SafeFuture; import tech.pegasys.teku.infrastructure.ssz.SszList; import tech.pegasys.teku.infrastructure.ssz.impl.SszUtils; -import tech.pegasys.teku.spec.datastructures.execution.SignedValidatorRegistration; +import tech.pegasys.teku.spec.datastructures.builder.SignedValidatorRegistration; import tech.pegasys.teku.spec.schemas.ApiSchemas; import tech.pegasys.teku.validator.api.ValidatorApiChannel; diff --git a/validator/client/src/main/java/tech/pegasys/teku/validator/client/ValidatorRegistrator.java b/validator/client/src/main/java/tech/pegasys/teku/validator/client/ValidatorRegistrator.java index 6881f8a319c..c55c28af4d8 100644 --- a/validator/client/src/main/java/tech/pegasys/teku/validator/client/ValidatorRegistrator.java +++ b/validator/client/src/main/java/tech/pegasys/teku/validator/client/ValidatorRegistrator.java @@ -34,9 +34,9 @@ import tech.pegasys.teku.infrastructure.unsigned.UInt64; import tech.pegasys.teku.spec.Spec; import tech.pegasys.teku.spec.config.Constants; +import tech.pegasys.teku.spec.datastructures.builder.SignedValidatorRegistration; +import tech.pegasys.teku.spec.datastructures.builder.ValidatorRegistration; import tech.pegasys.teku.spec.datastructures.eth1.Eth1Address; -import tech.pegasys.teku.spec.datastructures.execution.SignedValidatorRegistration; -import tech.pegasys.teku.spec.datastructures.execution.ValidatorRegistration; import tech.pegasys.teku.spec.schemas.ApiSchemas; import tech.pegasys.teku.spec.signatures.Signer; import tech.pegasys.teku.validator.api.ValidatorConfig; diff --git a/validator/client/src/main/java/tech/pegasys/teku/validator/client/signer/ExternalSigner.java b/validator/client/src/main/java/tech/pegasys/teku/validator/client/signer/ExternalSigner.java index 45dbc30691f..9e421a629ae 100644 --- a/validator/client/src/main/java/tech/pegasys/teku/validator/client/signer/ExternalSigner.java +++ b/validator/client/src/main/java/tech/pegasys/teku/validator/client/signer/ExternalSigner.java @@ -47,7 +47,7 @@ import tech.pegasys.teku.provider.JsonProvider; import tech.pegasys.teku.spec.Spec; import tech.pegasys.teku.spec.datastructures.blocks.BeaconBlock; -import tech.pegasys.teku.spec.datastructures.execution.ValidatorRegistration; +import tech.pegasys.teku.spec.datastructures.builder.ValidatorRegistration; import tech.pegasys.teku.spec.datastructures.operations.AggregateAndProof; import tech.pegasys.teku.spec.datastructures.operations.AttestationData; import tech.pegasys.teku.spec.datastructures.operations.VoluntaryExit; diff --git a/validator/client/src/test/java/tech/pegasys/teku/validator/client/ValidatorRegistrationBatchSenderTest.java b/validator/client/src/test/java/tech/pegasys/teku/validator/client/ValidatorRegistrationBatchSenderTest.java index 67c7fb868f2..974ab92deda 100644 --- a/validator/client/src/test/java/tech/pegasys/teku/validator/client/ValidatorRegistrationBatchSenderTest.java +++ b/validator/client/src/test/java/tech/pegasys/teku/validator/client/ValidatorRegistrationBatchSenderTest.java @@ -30,7 +30,7 @@ import tech.pegasys.teku.spec.SpecMilestone; import tech.pegasys.teku.spec.TestSpecContext; import tech.pegasys.teku.spec.TestSpecInvocationContextProvider.SpecContext; -import tech.pegasys.teku.spec.datastructures.execution.SignedValidatorRegistration; +import tech.pegasys.teku.spec.datastructures.builder.SignedValidatorRegistration; import tech.pegasys.teku.spec.util.DataStructureUtil; import tech.pegasys.teku.validator.api.ValidatorApiChannel; diff --git a/validator/client/src/test/java/tech/pegasys/teku/validator/client/ValidatorRegistratorTest.java b/validator/client/src/test/java/tech/pegasys/teku/validator/client/ValidatorRegistratorTest.java index 1cb93a5fa90..71ae61fec95 100644 --- a/validator/client/src/test/java/tech/pegasys/teku/validator/client/ValidatorRegistratorTest.java +++ b/validator/client/src/test/java/tech/pegasys/teku/validator/client/ValidatorRegistratorTest.java @@ -41,9 +41,9 @@ import tech.pegasys.teku.spec.SpecMilestone; import tech.pegasys.teku.spec.TestSpecContext; import tech.pegasys.teku.spec.TestSpecInvocationContextProvider.SpecContext; +import tech.pegasys.teku.spec.datastructures.builder.SignedValidatorRegistration; +import tech.pegasys.teku.spec.datastructures.builder.ValidatorRegistration; import tech.pegasys.teku.spec.datastructures.eth1.Eth1Address; -import tech.pegasys.teku.spec.datastructures.execution.SignedValidatorRegistration; -import tech.pegasys.teku.spec.datastructures.execution.ValidatorRegistration; import tech.pegasys.teku.spec.signatures.Signer; import tech.pegasys.teku.spec.util.DataStructureUtil; import tech.pegasys.teku.validator.api.ValidatorConfig; diff --git a/validator/remote/src/integration-test/java/tech/pegasys/teku/validator/remote/typedef/OkHttpValidatorTypeDefClientTest.java b/validator/remote/src/integration-test/java/tech/pegasys/teku/validator/remote/typedef/OkHttpValidatorTypeDefClientTest.java index 5830e6906be..bcf05ced28b 100644 --- a/validator/remote/src/integration-test/java/tech/pegasys/teku/validator/remote/typedef/OkHttpValidatorTypeDefClientTest.java +++ b/validator/remote/src/integration-test/java/tech/pegasys/teku/validator/remote/typedef/OkHttpValidatorTypeDefClientTest.java @@ -41,7 +41,7 @@ import tech.pegasys.teku.spec.TestSpecInvocationContextProvider.SpecContext; import tech.pegasys.teku.spec.datastructures.blocks.BeaconBlock; import tech.pegasys.teku.spec.datastructures.blocks.SignedBeaconBlock; -import tech.pegasys.teku.spec.datastructures.execution.SignedValidatorRegistration; +import tech.pegasys.teku.spec.datastructures.builder.SignedValidatorRegistration; import tech.pegasys.teku.spec.networks.Eth2Network; import tech.pegasys.teku.spec.schemas.ApiSchemas; import tech.pegasys.teku.spec.util.DataStructureUtil; diff --git a/validator/remote/src/main/java/tech/pegasys/teku/validator/remote/FailoverValidatorApiHandler.java b/validator/remote/src/main/java/tech/pegasys/teku/validator/remote/FailoverValidatorApiHandler.java index c6085bab968..30fe27b2606 100644 --- a/validator/remote/src/main/java/tech/pegasys/teku/validator/remote/FailoverValidatorApiHandler.java +++ b/validator/remote/src/main/java/tech/pegasys/teku/validator/remote/FailoverValidatorApiHandler.java @@ -40,7 +40,7 @@ import tech.pegasys.teku.infrastructure.unsigned.UInt64; import tech.pegasys.teku.spec.datastructures.blocks.BeaconBlock; import tech.pegasys.teku.spec.datastructures.blocks.SignedBeaconBlock; -import tech.pegasys.teku.spec.datastructures.execution.SignedValidatorRegistration; +import tech.pegasys.teku.spec.datastructures.builder.SignedValidatorRegistration; import tech.pegasys.teku.spec.datastructures.genesis.GenesisData; import tech.pegasys.teku.spec.datastructures.operations.Attestation; import tech.pegasys.teku.spec.datastructures.operations.AttestationData; diff --git a/validator/remote/src/main/java/tech/pegasys/teku/validator/remote/RemoteValidatorApiHandler.java b/validator/remote/src/main/java/tech/pegasys/teku/validator/remote/RemoteValidatorApiHandler.java index b8eddb43693..58e70bcefe6 100644 --- a/validator/remote/src/main/java/tech/pegasys/teku/validator/remote/RemoteValidatorApiHandler.java +++ b/validator/remote/src/main/java/tech/pegasys/teku/validator/remote/RemoteValidatorApiHandler.java @@ -51,7 +51,7 @@ import tech.pegasys.teku.spec.Spec; import tech.pegasys.teku.spec.datastructures.blocks.BeaconBlock; import tech.pegasys.teku.spec.datastructures.blocks.SignedBeaconBlock; -import tech.pegasys.teku.spec.datastructures.execution.SignedValidatorRegistration; +import tech.pegasys.teku.spec.datastructures.builder.SignedValidatorRegistration; import tech.pegasys.teku.spec.datastructures.genesis.GenesisData; import tech.pegasys.teku.spec.datastructures.operations.Attestation; import tech.pegasys.teku.spec.datastructures.operations.AttestationData; diff --git a/validator/remote/src/main/java/tech/pegasys/teku/validator/remote/typedef/OkHttpValidatorTypeDefClient.java b/validator/remote/src/main/java/tech/pegasys/teku/validator/remote/typedef/OkHttpValidatorTypeDefClient.java index 91206981ab5..8455c24577e 100644 --- a/validator/remote/src/main/java/tech/pegasys/teku/validator/remote/typedef/OkHttpValidatorTypeDefClient.java +++ b/validator/remote/src/main/java/tech/pegasys/teku/validator/remote/typedef/OkHttpValidatorTypeDefClient.java @@ -25,7 +25,7 @@ import tech.pegasys.teku.spec.Spec; import tech.pegasys.teku.spec.datastructures.blocks.BeaconBlock; import tech.pegasys.teku.spec.datastructures.blocks.SignedBeaconBlock; -import tech.pegasys.teku.spec.datastructures.execution.SignedValidatorRegistration; +import tech.pegasys.teku.spec.datastructures.builder.SignedValidatorRegistration; import tech.pegasys.teku.spec.datastructures.genesis.GenesisData; import tech.pegasys.teku.validator.api.SendSignedBlockResult; import tech.pegasys.teku.validator.api.required.SyncingStatus; diff --git a/validator/remote/src/main/java/tech/pegasys/teku/validator/remote/typedef/handlers/RegisterValidatorsRequest.java b/validator/remote/src/main/java/tech/pegasys/teku/validator/remote/typedef/handlers/RegisterValidatorsRequest.java index 7125c75d970..891935b7bf0 100644 --- a/validator/remote/src/main/java/tech/pegasys/teku/validator/remote/typedef/handlers/RegisterValidatorsRequest.java +++ b/validator/remote/src/main/java/tech/pegasys/teku/validator/remote/typedef/handlers/RegisterValidatorsRequest.java @@ -23,7 +23,7 @@ import okhttp3.Request; import okhttp3.Response; import tech.pegasys.teku.infrastructure.ssz.SszList; -import tech.pegasys.teku.spec.datastructures.execution.SignedValidatorRegistration; +import tech.pegasys.teku.spec.datastructures.builder.SignedValidatorRegistration; import tech.pegasys.teku.spec.schemas.ApiSchemas; import tech.pegasys.teku.validator.remote.apiclient.ValidatorApiMethod; import tech.pegasys.teku.validator.remote.typedef.ResponseHandler; diff --git a/validator/remote/src/test/java/tech/pegasys/teku/validator/remote/FailoverValidatorApiHandlerTest.java b/validator/remote/src/test/java/tech/pegasys/teku/validator/remote/FailoverValidatorApiHandlerTest.java index e19af2c48d5..98f0c710cb9 100644 --- a/validator/remote/src/test/java/tech/pegasys/teku/validator/remote/FailoverValidatorApiHandlerTest.java +++ b/validator/remote/src/test/java/tech/pegasys/teku/validator/remote/FailoverValidatorApiHandlerTest.java @@ -52,7 +52,7 @@ import tech.pegasys.teku.spec.TestSpecFactory; import tech.pegasys.teku.spec.datastructures.blocks.BeaconBlock; import tech.pegasys.teku.spec.datastructures.blocks.SignedBeaconBlock; -import tech.pegasys.teku.spec.datastructures.execution.SignedValidatorRegistration; +import tech.pegasys.teku.spec.datastructures.builder.SignedValidatorRegistration; import tech.pegasys.teku.spec.datastructures.genesis.GenesisData; import tech.pegasys.teku.spec.datastructures.operations.Attestation; import tech.pegasys.teku.spec.datastructures.operations.AttestationData; diff --git a/validator/remote/src/test/java/tech/pegasys/teku/validator/remote/RemoteValidatorApiHandlerTest.java b/validator/remote/src/test/java/tech/pegasys/teku/validator/remote/RemoteValidatorApiHandlerTest.java index 22c0678921a..bdd5833037b 100644 --- a/validator/remote/src/test/java/tech/pegasys/teku/validator/remote/RemoteValidatorApiHandlerTest.java +++ b/validator/remote/src/test/java/tech/pegasys/teku/validator/remote/RemoteValidatorApiHandlerTest.java @@ -63,7 +63,7 @@ import tech.pegasys.teku.spec.TestSpecFactory; import tech.pegasys.teku.spec.datastructures.blocks.BeaconBlock; import tech.pegasys.teku.spec.datastructures.blocks.SignedBeaconBlock; -import tech.pegasys.teku.spec.datastructures.execution.SignedValidatorRegistration; +import tech.pegasys.teku.spec.datastructures.builder.SignedValidatorRegistration; import tech.pegasys.teku.spec.datastructures.genesis.GenesisData; import tech.pegasys.teku.spec.datastructures.operations.AggregateAndProof; import tech.pegasys.teku.spec.datastructures.operations.Attestation;