Merged
Conversation
* separate health_metrics crate * remove metrics from warp_utils * move ProcessHealth::observe and SystemHealth::observe to health_metrics * fix errors * nitpick `Cargo.toml`s --------- Co-authored-by: Daniel Knopik <daniel@dknopik.de> # Conflicts: # Cargo.toml
Member
|
Does anchor depend on |
AgeManning
approved these changes
Jan 16, 2025
Member
AgeManning
left a comment
There was a problem hiding this comment.
Looks like an improvement to me
Member
|
@Mergifyio queue |
✅ The pull request has been merged automaticallyDetailsThe pull request has been merged automatically at 669932a |
Member
Author
Not any more after the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue Addressed
Anchor depends on some parts of Lighthouse. Due to certain dependencies between crates, it pulled in far more crates than necessary, causing longer builds.
Proposed Changes
remove ensure_dir_exists:
account_utilsandvalidator_dirused thedirectorycrate for a single function:ensure_dir_exists. This function had questionable value, ascreate_dir_allis a no-op if the directory exists anyway. Removeensure_dir_existsand the two dependencies ondirectory, which is potentially expensive to depend on due to its dependency onclap_utils.group UNHANDLED_ERRORs into a generic:
warp_utilsdepends onbeacon_chainto providebeacon_chain_error. This causesvalidator_clientto depend onbeacon_chaintransitively, which is not nice.Remove
beacon_chain_errorand similar functions and provide a genericunhandled_errorinstead, which behaves exactly the same.Introduce separate
health_metricscrate by Sayan: Thewarp_utilscrate contained facilities for capturing health metrics. Anchor wants those metrics, but also wants to avoid pulling inwarp, as we areaxum-only, so we introduce a new crate calledhealth_metrics. We use the opportunity to also move the logic for capturing this data frometh2to that new crate.Additional Info
Lighthouse also benefits from this, as the build can run more parallelized.