Skip to content
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

Open
wants to merge 2 commits into
base: unstable
Choose a base branch
from

Conversation

dapplion
Copy link
Collaborator

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:

  • iterate forks in descending order (latest first)
  • find the first fork that is in a preparation period
  • do the engine capabilities check

If a future fork requires more complex readiness checks, it can add a dedicated _readiness file like for the merge.

@dapplion dapplion added the ready-for-review The code is ready for review label Jan 13, 2025
@@ -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;
Copy link
Collaborator Author

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;
}
Copy link
Collaborator Author

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

@dapplion dapplion requested a review from macladson January 25, 2025 10:16
Copy link
Member

@macladson macladson left a 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

@@ -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>(
Copy link
Member

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:

Suggested change
async fn post_capella_readiness_logging<T: BeaconChainTypes>(
async fn post_bellatrix_readiness_logging<T: BeaconChainTypes>(

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed with af49dc8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-for-review The code is ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants