Squashed reset to unstable

This commit is contained in:
Daniel Knopik
2025-03-13 12:50:29 +01:00
committed by Daniel Knopik
parent b71b5f2231
commit f61f0b654c
416 changed files with 13195 additions and 38478 deletions

View File

@@ -14,7 +14,7 @@ regex = { workspace = true }
rpassword = "5.0.0"
serde = { workspace = true }
serde_yaml = { workspace = true }
slog = { workspace = true }
tracing = { workspace = true }
types = { workspace = true }
validator_dir = { workspace = true }
zeroize = { workspace = true }

View File

@@ -7,11 +7,11 @@ use crate::{default_keystore_password_path, read_password_string, write_file_via
use eth2_keystore::Keystore;
use regex::Regex;
use serde::{Deserialize, Serialize};
use slog::{error, Logger};
use std::collections::HashSet;
use std::fs::{self, create_dir_all, File};
use std::io;
use std::path::{Path, PathBuf};
use tracing::error;
use types::{graffiti::GraffitiString, Address, PublicKey};
use validator_dir::VOTING_KEYSTORE_FILE;
use zeroize::Zeroizing;
@@ -115,7 +115,6 @@ impl SigningDefinition {
voting_keystore_password_path: Some(path),
..
} => read_password_string(path)
.map(Into::into)
.map(Option::Some)
.map_err(Error::UnableToReadKeystorePassword),
SigningDefinition::LocalKeystore { .. } => Err(Error::KeystoreWithoutPassword),
@@ -267,7 +266,6 @@ impl ValidatorDefinitions {
&mut self,
validators_dir: P,
secrets_dir: P,
log: &Logger,
) -> Result<usize, Error> {
let mut keystore_paths = vec![];
recursively_find_voting_keystores(validators_dir, &mut keystore_paths)
@@ -312,10 +310,9 @@ impl ValidatorDefinitions {
Ok(keystore) => keystore,
Err(e) => {
error!(
log,
"Unable to read validator keystore";
"error" => e,
"keystore" => format!("{:?}", voting_keystore_path)
error = ?e,
keystore = ?voting_keystore_path,
"Unable to read validator keystore"
);
return None;
}
@@ -337,9 +334,8 @@ impl ValidatorDefinitions {
}
None => {
error!(
log,
"Invalid keystore public key";
"keystore" => format!("{:?}", voting_keystore_path)
keystore = ?voting_keystore_path,
"Invalid keystore public key"
);
return None;
}