Skip to content

Commit 223e1ec

Browse files
Gua00vaWoodpile37
authored andcommitted
Deprecate exchangeTransitionConfiguration functionality (sigp#4517)
Solves sigp#4442 EL clients log errors if we don't query this endpoint, but they are making releases that remove this error logging. After those are out we can stop calling it, after which point EL teams will remove the endpoint entirely. Refer https://hackmd.io/@n0ble/deprecate-exchgTC
1 parent a2ff657 commit 223e1ec

File tree

6 files changed

+0
-114
lines changed

6 files changed

+0
-114
lines changed

beacon_node/beacon_chain/src/merge_readiness.rs

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,6 @@ pub enum MergeReadiness {
8686
#[serde(serialize_with = "serialize_uint256")]
8787
current_difficulty: Option<Uint256>,
8888
},
89-
/// The transition configuration with the EL failed, there might be a problem with
90-
/// connectivity, authentication or a difference in configuration.
91-
ExchangeTransitionConfigurationFailed { error: String },
9289
/// The EL can be reached and has the correct configuration, however it's not yet synced.
9390
NotSynced,
9491
/// The user has not configured this node to use an execution endpoint.
@@ -109,12 +106,6 @@ impl fmt::Display for MergeReadiness {
109106
params, current_difficulty
110107
)
111108
}
112-
MergeReadiness::ExchangeTransitionConfigurationFailed { error } => write!(
113-
f,
114-
"Could not confirm the transition configuration with the \
115-
execution endpoint: {:?}",
116-
error
117-
),
118109
MergeReadiness::NotSynced => write!(
119110
f,
120111
"The execution endpoint is connected and configured, \
@@ -155,14 +146,6 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
155146
/// Attempts to connect to the EL and confirm that it is ready for the merge.
156147
pub async fn check_merge_readiness(&self) -> MergeReadiness {
157148
if let Some(el) = self.execution_layer.as_ref() {
158-
if let Err(e) = el.exchange_transition_configuration(&self.spec).await {
159-
// The EL was either unreachable, responded with an error or has a different
160-
// configuration.
161-
return MergeReadiness::ExchangeTransitionConfigurationFailed {
162-
error: format!("{:?}", e),
163-
};
164-
}
165-
166149
if !el.is_synced_for_notifier().await {
167150
// The EL is not synced.
168151
return MergeReadiness::NotSynced;

beacon_node/client/src/builder.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -858,9 +858,6 @@ where
858858
execution_layer.spawn_clean_proposer_caches_routine::<TSlotClock>(
859859
beacon_chain.slot_clock.clone(),
860860
);
861-
862-
// Spawns a routine that polls the `exchange_transition_configuration` endpoint.
863-
execution_layer.spawn_transition_configuration_poll(beacon_chain.spec.clone());
864861
}
865862

866863
// Spawn a service to publish BLS to execution changes at the Capella fork.

beacon_node/client/src/notifier.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -404,14 +404,6 @@ async fn merge_readiness_logging<T: BeaconChainTypes>(
404404
"config" => ?other
405405
),
406406
},
407-
readiness @ MergeReadiness::ExchangeTransitionConfigurationFailed { error: _ } => {
408-
error!(
409-
log,
410-
"Not ready for merge";
411-
"info" => %readiness,
412-
"hint" => "try updating Lighthouse and/or the execution layer",
413-
)
414-
}
415407
readiness @ MergeReadiness::NotSynced => warn!(
416408
log,
417409
"Not ready for merge";

beacon_node/execution_layer/src/lib.rs

Lines changed: 0 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,6 @@ const EXECUTION_BLOCKS_LRU_CACHE_SIZE: usize = 128;
8484
const DEFAULT_SUGGESTED_FEE_RECIPIENT: [u8; 20] =
8585
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1];
8686

87-
const CONFIG_POLL_INTERVAL: Duration = Duration::from_secs(60);
88-
8987
/// A payload alongside some information about where it came from.
9088
pub enum ProvenancedPayload<P> {
9189
/// A good ol' fashioned farm-to-table payload from your local EE.
@@ -551,24 +549,6 @@ impl<T: EthSpec> ExecutionLayer<T> {
551549
self.spawn(preparation_cleaner, "exec_preparation_cleanup");
552550
}
553551

554-
/// Spawns a routine that polls the `exchange_transition_configuration` endpoint.
555-
pub fn spawn_transition_configuration_poll(&self, spec: ChainSpec) {
556-
let routine = |el: ExecutionLayer<T>| async move {
557-
loop {
558-
if let Err(e) = el.exchange_transition_configuration(&spec).await {
559-
error!(
560-
el.log(),
561-
"Failed to check transition config";
562-
"error" => ?e
563-
);
564-
}
565-
sleep(CONFIG_POLL_INTERVAL).await;
566-
}
567-
};
568-
569-
self.spawn(routine, "exec_config_poll");
570-
}
571-
572552
/// Returns `true` if the execution engine is synced and reachable.
573553
pub async fn is_synced(&self) -> bool {
574554
self.engine().is_synced().await
@@ -1391,53 +1371,6 @@ impl<T: EthSpec> ExecutionLayer<T> {
13911371
.map_err(Error::EngineError)
13921372
}
13931373

1394-
pub async fn exchange_transition_configuration(&self, spec: &ChainSpec) -> Result<(), Error> {
1395-
let local = TransitionConfigurationV1 {
1396-
terminal_total_difficulty: spec.terminal_total_difficulty,
1397-
terminal_block_hash: spec.terminal_block_hash,
1398-
terminal_block_number: 0,
1399-
};
1400-
1401-
let result = self
1402-
.engine()
1403-
.request(|engine| engine.api.exchange_transition_configuration_v1(local))
1404-
.await;
1405-
1406-
match result {
1407-
Ok(remote) => {
1408-
if local.terminal_total_difficulty != remote.terminal_total_difficulty
1409-
|| local.terminal_block_hash != remote.terminal_block_hash
1410-
{
1411-
error!(
1412-
self.log(),
1413-
"Execution client config mismatch";
1414-
"msg" => "ensure lighthouse and the execution client are up-to-date and \
1415-
configured consistently",
1416-
"remote" => ?remote,
1417-
"local" => ?local,
1418-
);
1419-
Err(Error::EngineError(Box::new(EngineError::Api {
1420-
error: ApiError::TransitionConfigurationMismatch,
1421-
})))
1422-
} else {
1423-
debug!(
1424-
self.log(),
1425-
"Execution client config is OK";
1426-
);
1427-
Ok(())
1428-
}
1429-
}
1430-
Err(e) => {
1431-
error!(
1432-
self.log(),
1433-
"Unable to get transition config";
1434-
"error" => ?e,
1435-
);
1436-
Err(Error::EngineError(Box::new(e)))
1437-
}
1438-
}
1439-
}
1440-
14411374
/// Returns the execution engine capabilities resulting from a call to
14421375
/// engine_exchangeCapabilities. If the capabilities cache is not populated,
14431376
/// or if it is populated with a cached result of age >= `age_limit`, this

beacon_node/execution_layer/src/test_utils/handle_rpc.rs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -427,15 +427,6 @@ pub async fn handle_rpc<T: EthSpec>(
427427

428428
Ok(serde_json::to_value(response).unwrap())
429429
}
430-
ENGINE_EXCHANGE_TRANSITION_CONFIGURATION_V1 => {
431-
let block_generator = ctx.execution_block_generator.read();
432-
let transition_config: TransitionConfigurationV1 = TransitionConfigurationV1 {
433-
terminal_total_difficulty: block_generator.terminal_total_difficulty,
434-
terminal_block_hash: block_generator.terminal_block_hash,
435-
terminal_block_number: block_generator.terminal_block_number,
436-
};
437-
Ok(serde_json::to_value(transition_config).unwrap())
438-
}
439430
ENGINE_EXCHANGE_CAPABILITIES => {
440431
let engine_capabilities = ctx.engine_capabilities.read();
441432
Ok(serde_json::to_value(engine_capabilities.to_response()).unwrap())

testing/execution_engine_integration/src/test_rig.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -204,16 +204,6 @@ impl<E: GenericExecutionEngine> TestRig<E> {
204204
let account1 = ethers_core::types::Address::from_slice(&hex::decode(ACCOUNT1).unwrap());
205205
let account2 = ethers_core::types::Address::from_slice(&hex::decode(ACCOUNT2).unwrap());
206206

207-
/*
208-
* Check the transition config endpoint.
209-
*/
210-
for ee in [&self.ee_a, &self.ee_b] {
211-
ee.execution_layer
212-
.exchange_transition_configuration(&self.spec)
213-
.await
214-
.unwrap();
215-
}
216-
217207
/*
218208
* Read the terminal block hash from both pairs, check it's equal.
219209
*/

0 commit comments

Comments
 (0)