Skip to content

[Merged by Bors] - Further remove EE redundancy #3324

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

Closed
wants to merge 7 commits into from

Conversation

paulhauner
Copy link
Member

@paulhauner paulhauner commented Jul 12, 2022

Issue Addressed

Resolves #3176

Proposed Changes

Continues from PRs by @divagant-martian to gradually remove EL redundancy (see #3284, #3257).

This PR achieves:

  • Removes the broadcast and first_success methods. The functional impact is that every request to the EE will always be tried immediately, regardless of the cached EngineState (this resolves Don't mark EL as offline if non-essential API call fails #3176). Previously we would check the engine state before issuing requests, this doesn't make sense in a single-EE world; there's only one EE so we might as well try it for every request.
  • Runs the upcheck/watchdog routine once per slot rather than thrice. When we had multiple EEs frequent polling was useful to try and detect when the primary EE had come back online and we could switch to it. That's not as relevant now.
  • Always creates logs in the Engines::upcheck function. Previously we would mute some logs since they could get really noisy when one EE was down but others were functioning fine. Now we only have one EE and are upcheck-ing it less, it makes sense to always produce logs.

This PR purposefully does not achieve:

  • Updating all occurances of "engines" to "engine". I'm trying to keep the diff small and manageable. We can come back for this.

Additional Info

NA

@paulhauner paulhauner added the work-in-progress PR is a work-in-progress label Jul 12, 2022
@paulhauner paulhauner changed the title Tidy ee redundancy Further remove EE redundancy Jul 12, 2022
@divagant-martian divagant-martian marked this pull request as ready for review July 12, 2022 03:34
@divagant-martian divagant-martian marked this pull request as draft July 12, 2022 04:18
@paulhauner paulhauner added ready-for-review The code is ready for review and removed work-in-progress PR is a work-in-progress labels Jul 12, 2022
@paulhauner paulhauner marked this pull request as ready for review July 12, 2022 05:51
@paulhauner paulhauner requested a review from ethDreamer July 12, 2022 05:51
)
}
}
Err(EngineApiError::IsSyncing) => {
Copy link
Member

Choose a reason for hiding this comment

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

Seems like we've lost the WARN Execution engine syncing log, is this intentional?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yep, that's right! We'll get a warning whenever the head is optimistic so I figured this one is effectively a duplicate.

warn!(
log,
"Head is optimistic";
"info" => "chain not fully verified, \
block and attestation production disabled until execution engine syncs",
"execution_block_hash" => ?hash,
);

Thanks for noticing and raising it.

@@ -132,7 +132,7 @@ pub struct Config {
pub default_datadir: PathBuf,
}

/// Provides access to one or more execution engines and provides a neat interface for consumption
/// Provides access to one execution engine and provides a neat interface for consumption
/// by the `BeaconChain`.
///
/// When there is more than one execution node specified, the others will be used in a "fallback"
Copy link
Member

Choose a reason for hiding this comment

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

Can remove the comments about fallback here

);
}
pub async fn upcheck(&self) {
let state = match self.api.upcheck().await {
Copy link
Member

@ethDreamer ethDreamer Jul 12, 2022

Choose a reason for hiding this comment

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

nothing wrong here specifically but I noticed this comment in this upcheck() function. I want to make sure this hasn't fallen off the radar? Perhaps verification of the network and chain ids should go outside the upcheck function since it doesn't really need to be done over and over?

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah yeah, I also had a think about this during the PR. I'm not sure the chain-id checks are necessary, they're a bit of a hangover from "eth1". It was to prevent, say, a mainnet node from unwittingly building it's caches from Goerli.

The "exchange transition config" endpoint should achieve the same thing before the merge, then after the merge it should become obvious very quickly if the nodes are on the wrong chain.

I'm tempted to just leave the TODO there for now, we can pick it up again when we do a git grep TODO at some point in the future.

@realbigsean realbigsean added waiting-on-author The reviewer has suggested changes and awaits thier implementation. and removed ready-for-review The code is ready for review labels Jul 12, 2022
paulhauner and others added 3 commits July 13, 2022 10:18
Co-authored-by: realbigsean <seananderson33@GMAIL.com>
@paulhauner
Copy link
Member Author

All comments addressed, thank you @ethDreamer and @realbigsean!

@paulhauner paulhauner added ready-for-review The code is ready for review and removed waiting-on-author The reviewer has suggested changes and awaits thier implementation. labels Jul 13, 2022
@realbigsean
Copy link
Member

bors r+

bors bot pushed a commit that referenced this pull request Jul 13, 2022
## Issue Addressed

Resolves #3176

## Proposed Changes

Continues from PRs by @divagant-martian to gradually remove EL redundancy (see #3284, #3257).

This PR achieves:

- Removes the `broadcast` and `first_success` methods. The functional impact is that every request to the EE will always be tried immediately, regardless of the cached `EngineState` (this resolves #3176). Previously we would check the engine state before issuing requests, this doesn't make sense in a single-EE world; there's only one EE so we might as well try it for every request.
- Runs the upcheck/watchdog routine once per slot rather than thrice. When we had multiple EEs frequent polling was useful to try and detect when the primary EE had come back online and we could switch to it. That's not as relevant now.
- Always creates logs in the `Engines::upcheck` function. Previously we would mute some logs since they could get really noisy when one EE was down but others were functioning fine. Now we only have one EE and are upcheck-ing it less, it makes sense to always produce logs.

This PR purposefully does not achieve:

- Updating all occurances of "engines" to "engine". I'm trying to keep the diff small and manageable. We can come back for this.

## Additional Info

NA
@realbigsean realbigsean added ready-for-merge This PR is ready to merge. and removed ready-for-review The code is ready for review labels Jul 13, 2022
@bors bors bot changed the title Further remove EE redundancy [Merged by Bors] - Further remove EE redundancy Jul 13, 2022
@bors bors bot closed this Jul 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-for-merge This PR is ready to merge.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants