Skip to content

Comments

Testnet mods#188

Merged
jking-aus merged 4 commits intosigp:unstablefrom
Zacholme7:testnet-mods
Mar 18, 2025
Merged

Testnet mods#188
jking-aus merged 4 commits intosigp:unstablefrom
Zacholme7:testnet-mods

Conversation

@Zacholme7
Copy link
Member

Issue Addressed

N/A

Proposed Changes

This PR changes a few things needed to be able to run the client in ssv-mini

  1. Adds a devenet dockerfile for building images specifically for ssv-mini
  2. Adjusts the event processor to handle key registrations that are not ssz encoded on chain.
  3. Write out enr to file

@dknopik
Copy link
Member

dknopik commented Mar 17, 2025

LGTM

@Zacholme7 Zacholme7 requested a review from jking-aus March 17, 2025 15:56
@diegomrsantos diegomrsantos requested a review from Copilot March 17, 2025 15:58
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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);
Copy link

Copilot AI Mar 17, 2025

Choose a reason for hiding this comment

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

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;
}

Copilot uses AI. Check for mistakes.
Copy link
Member

@jking-aus jking-aus left a comment

Choose a reason for hiding this comment

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

lgtm

@jking-aus jking-aus merged commit a3db88f into sigp:unstable Mar 18, 2025
10 checks passed
@Zacholme7 Zacholme7 deleted the testnet-mods branch March 18, 2025 12:39
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