mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-03 00:31:50 +00:00
Add more checks and logging before genesis (#4730)
## Proposed Changes This PR adds more logging prior to genesis, particularly on networks that start with execution enabled. There are new checks using `eth_getBlockByHash/Number` to verify that the genesis state's `latest_execution_payload_header` matches the execution node's genesis block. The first commit also runs the merge-readiness/Capella-readiness checks prior to genesis. This has two effects: - Give more information on the execution node's status and its readiness for genesis. - Prevent the `el_offline` status from being set on `/eth/v1/node/syncing`, which previously caused the VC to complain loudly. I would like to include this for the Holesky reboot. It would have caught the misconfig that doomed the first Holesky. ## Additional Info - Geth doesn't serve payload bodies prior to genesis, which is why we use the legacy methods. I haven't checked with other ELs yet. - Currently this is logging errors with _Capella_ genesis states generated by `ethereum-genesis-generator` because the `withdrawals_root` is not set correctly (it is 0x0). This is not a blocker for Holesky, as it starts from Bellatrix (Pari is investigating).
This commit is contained in:
@@ -4327,7 +4327,8 @@ pub fn serve<T: BeaconChainTypes>(
|
||||
.then(
|
||||
|task_spawner: TaskSpawner<T::EthSpec>, chain: Arc<BeaconChain<T>>| {
|
||||
task_spawner.spawn_async_with_rejection(Priority::P1, async move {
|
||||
let merge_readiness = chain.check_merge_readiness().await;
|
||||
let current_slot = chain.slot_clock.now_or_genesis().unwrap_or(Slot::new(0));
|
||||
let merge_readiness = chain.check_merge_readiness(current_slot).await;
|
||||
Ok::<_, warp::reject::Rejection>(
|
||||
warp::reply::json(&api_types::GenericResponse::from(merge_readiness))
|
||||
.into_response(),
|
||||
|
||||
Reference in New Issue
Block a user