Conversation
Member
|
LGTM |
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR implements modifications to support running the client in ssv-mini, including changes to key registration handling, ENR output, and minor instrumentation updates.
- Adjusts the event processor to handle key registrations that are and are not ssz encoded.
- Adds a new utility to write out the ENR to disk and updates discovery initialization accordingly.
- Updates instrumentation in the sync module to skip additional parameters.
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| anchor/eth/src/event_processor.rs | Updated key data handling when data length is 704 and when it is not 704. |
| anchor/network/src/discovery.rs | Introduced ENR file writing functionality and adjusted discovery initialization. |
| anchor/eth/src/sync.rs | Modified instrumentation attributes to skip additional parameters. |
|
|
||
| /// Saves an ENR to disk | ||
| pub fn save_enr_to_disk(dir: &Path, enr: &Enr) { | ||
| let _ = std::fs::create_dir_all(dir); |
There was a problem hiding this comment.
Consider handling errors from create_dir_all instead of ignoring them. Logging or propagating the error may help diagnose filesystem permission issues.
Suggested change
| let _ = std::fs::create_dir_all(dir); | |
| if let Err(e) = std::fs::create_dir_all(dir) { | |
| warn!( | |
| directory = format!("{:?}", dir), | |
| error = %e, | |
| "Could not create directory" | |
| ); | |
| return; | |
| } |
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
N/A
Proposed Changes
This PR changes a few things needed to be able to run the client in ssv-mini