-
Notifications
You must be signed in to change notification settings - Fork 794
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dedup post merge readiness notifiers #6797
base: unstable
Are you sure you want to change the base?
Conversation
beacon_node/client/src/notifier.rs
Outdated
@@ -63,7 +72,7 @@ pub fn spawn_notifier<T: BeaconChainTypes>( | |||
); | |||
eth1_logging(&beacon_chain, &log); | |||
bellatrix_readiness_logging(Slot::new(0), &beacon_chain, &log).await; | |||
capella_readiness_logging(Slot::new(0), &beacon_chain, &log).await; | |||
post_capella_readiness_logging(Slot::new(0), &beacon_chain, &log).await; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All forks after capella forgot to add the notifier here, resulting is the lack of readiness checks pre-genesis. Since it only affects devnets It was not noticed probably
); | ||
} | ||
return; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to do this check here, we have the EL status upcheck service
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! I'm kind of jealous I didn't think to do this first 🥲
Just a small nit
beacon_node/client/src/notifier.rs
Outdated
@@ -417,231 +410,139 @@ async fn bellatrix_readiness_logging<T: BeaconChainTypes>( | |||
} | |||
|
|||
/// Provides some helpful logging to users to indicate if their node is ready for Capella | |||
async fn capella_readiness_logging<T: BeaconChainTypes>( | |||
async fn post_capella_readiness_logging<T: BeaconChainTypes>( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For clarity I think this should be:
async fn post_capella_readiness_logging<T: BeaconChainTypes>( | |
async fn post_bellatrix_readiness_logging<T: BeaconChainTypes>( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed with af49dc8
Issue Addressed
Lots of repeated code that just checks if the engine API has the required methods for the next fork. All readiness checks after the merge just check if a specific methods are in the list of capabilities.
Proposed Changes
Delete boilerplate so future forks don't need to copypasta again.
The logic now will:
If a future fork requires more complex readiness checks, it can add a dedicated _readiness file like for the merge.