From 14fa1e527f52785a97da5861893de08a2a71d957 Mon Sep 17 00:00:00 2001 From: realbigsean Date: Thu, 8 Dec 2022 08:32:59 -0500 Subject: [PATCH] remove unused log and fix EL config serde --- beacon_node/client/src/config.rs | 2 -- beacon_node/execution_layer/src/lib.rs | 32 ++---------------------- testing/ef_tests/src/cases/operations.rs | 3 ++- 3 files changed, 4 insertions(+), 33 deletions(-) diff --git a/beacon_node/client/src/config.rs b/beacon_node/client/src/config.rs index 08edcb152..e3c0ccd52 100644 --- a/beacon_node/client/src/config.rs +++ b/beacon_node/client/src/config.rs @@ -67,8 +67,6 @@ pub struct Config { pub network: network::NetworkConfig, pub chain: beacon_chain::ChainConfig, pub eth1: eth1::Config, - //FIXME(sean) - #[serde(skip)] pub execution_layer: Option, pub trusted_setup_file: Option, pub http_api: http_api::Config, diff --git a/beacon_node/execution_layer/src/lib.rs b/beacon_node/execution_layer/src/lib.rs index f8819520b..cf7170559 100644 --- a/beacon_node/execution_layer/src/lib.rs +++ b/beacon_node/execution_layer/src/lib.rs @@ -218,7 +218,7 @@ struct Inner { log: Logger, } -#[derive(Debug, Default, Clone)] +#[derive(Debug, Default, Clone, Serialize, Deserialize)] pub struct Config { /// Endpoint urls for EL nodes that are running the engine api. pub execution_endpoints: Vec, @@ -238,6 +238,7 @@ pub struct Config { /// The minimum value of an external payload for it to be considered in a proposal. pub builder_profit_threshold: u128, pub execution_timeout_multiplier: Option, + #[serde(skip)] pub spec: ChainSpec, } @@ -1273,35 +1274,6 @@ impl ExecutionLayer { .spec .fork_name_at_epoch(next_slot.epoch(T::slots_per_epoch())); - let epoch = next_slot.epoch(T::slots_per_epoch()); - - let eip4844_fork_epoch = self.inner.spec.eip4844_fork_epoch; - let capella_fork_epoch = self.inner.spec.capella_fork_epoch; - let bellatrix_fork_epoch = self.inner.spec.bellatrix_fork_epoch; - let altair_fork_epoch = self.inner.spec.altair_fork_epoch; - let genesis_slot = self.inner.spec.genesis_slot; - - info!( - self.log(), - "fork name at slot"; - "fork_name" => ?fork_name, - "next_slot" => ?next_slot, - "epoch" => ?epoch, - "eip4844_fork_epoch" => ?eip4844_fork_epoch, - "capella_fork_epoch" => ?capella_fork_epoch, - "bellatrix_fork_epoch" => ?bellatrix_fork_epoch, - "altair_fork_epoch" => ?altair_fork_epoch, - "genesis_slot" => ?genesis_slot, - ); - - // Dec 06 16:47:39.049 INFO fork name at slot - // genesis_slot: Slot(0), - // altair_fork_epoch: Some(Epoch(74240)), - // bellatrix_fork_epoch: Some(Epoch(144896)), - // capella_fork_epoch: Some(Epoch(18446744073709551615)), - // eip4844_fork_epoch: None, epoch: Epoch(0), - // next_slot: Slot(12), fork_name: Base, service: exec - self.engine() .set_latest_forkchoice_state(fork_name, forkchoice_state) .await; diff --git a/testing/ef_tests/src/cases/operations.rs b/testing/ef_tests/src/cases/operations.rs index 38af4d23b..29b0723f7 100644 --- a/testing/ef_tests/src/cases/operations.rs +++ b/testing/ef_tests/src/cases/operations.rs @@ -23,7 +23,7 @@ use std::fmt::Debug; #[cfg(not(all(feature = "withdrawals", feature = "withdrawals-processing")))] use std::marker::PhantomData; use std::path::Path; -#[cfg(all(feature = "withdrawals"))] +#[cfg(feature = "withdrawals")] use types::SignedBlsToExecutionChange; use types::{ Attestation, AttesterSlashing, BeaconBlock, BeaconState, BlindedPayload, ChainSpec, Deposit, @@ -397,6 +397,7 @@ impl Operation for WithdrawalsPayload { } } +#[cfg(feature = "withdrawals")] impl Operation for SignedBlsToExecutionChange { fn handler_name() -> String { "bls_to_execution_change".into()