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

De-duplicate enable_light_client_server #6988

Conversation

EllipticPoint
Copy link
Member

Issue Addressed

#6959

Proposed Changes

  • Use Arc<bool> type to create a single source of truth
  • A new field enable_light_client_server: Arc<bool> has been added to Config.
  • The 3 existing struct fields mentioned in the issue have been changed to Arc<bool>

@EllipticPoint EllipticPoint requested a review from jxs as a code owner February 11, 2025 23:39
@CLAassistant
Copy link

CLAassistant commented Feb 11, 2025

CLA assistant check
All committers have signed the CLA.

Copy link

mergify bot commented Feb 11, 2025

This pull request has merge conflicts. Could you please resolve them @EllipticPoint? 🙏

@@ -155,7 +155,7 @@ pub struct Config {
pub enable_beacon_processor: bool,
#[serde(with = "eth2::types::serde_status_code")]
pub duplicate_block_status_code: StatusCode,
pub enable_light_client_server: bool,
pub enable_light_client_server: Arc<bool>,
Copy link
Member

Choose a reason for hiding this comment

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

I don't think this really addresses the problem of there not being a single source of truth. It's the same situation as before with three struct fields, and they're manually kept in sync.

If you don't mind, I'll just close this PR, as I think to achieve the single-source-of-truth would be a larger refactor that probably isn't worth doing atm.

Copy link
Member

Choose a reason for hiding this comment

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

This is more along the lines of what I was thinking:

Maybe you could extend my PR to remove the config field from the network crate?

Copy link
Member Author

Choose a reason for hiding this comment

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

Happy to close this PR as I don't think I'll have the time anytime soon to properly do a larger refactor.

Copy link
Member

Choose a reason for hiding this comment

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

Nws, thanks for your efforts nonetheless!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants