Skip to content

Commit feecc5a

Browse files
committed
making eip-3076
Signed-off-by: Aliaksei Misiukevich <[email protected]>
1 parent e5b4983 commit feecc5a

File tree

34 files changed

+37
-770
lines changed

34 files changed

+37
-770
lines changed

Cargo.lock

Lines changed: 8 additions & 26 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ members = [
2323
"common/compare_fields_derive",
2424
"common/deposit_contract",
2525
"common/directory",
26+
"common/eip_3076",
2627
"common/eth2",
2728
"common/eth2_config",
2829
"common/eth2_interop_keypairs",
@@ -87,7 +88,6 @@ members = [
8788
"validator_client/initialized_validators",
8889
"validator_client/lighthouse_validator_store",
8990
"validator_client/signing_method",
90-
"validator_client/slashing_protection",
9191
"validator_client/validator_metrics",
9292
"validator_client/validator_services",
9393
"validator_manager",
@@ -144,6 +144,7 @@ eth2_key_derivation = { path = "crypto/eth2_key_derivation" }
144144
eth2_keystore = { path = "crypto/eth2_keystore" }
145145
eth2_network_config = { path = "common/eth2_network_config" }
146146
eth2_wallet = { path = "crypto/eth2_wallet" }
147+
eip_3076 = { path = "common/eip_3076" }
147148
ethereum_hashing = "0.7.0"
148149
ethereum_serde_utils = "0.8.0"
149150
ethereum_ssz = "0.9.0"
@@ -234,7 +235,6 @@ serde_yaml = "0.9"
234235
sha2 = "0.9"
235236
signing_method = { path = "validator_client/signing_method" }
236237
slasher = { path = "slasher", default-features = false }
237-
slashing_protection = { path = "validator_client/slashing_protection" }
238238
slot_clock = { path = "common/slot_clock" }
239239
smallvec = { version = "1.11.2", features = ["arbitrary"] }
240240
snap = "1"

account_manager/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ eth2_keystore = { workspace = true }
1919
eth2_network_config = { workspace = true }
2020
eth2_wallet = { workspace = true }
2121
eth2_wallet_manager = { path = "../common/eth2_wallet_manager" }
22+
eip_3076 = { workspace = true }
2223
filesystem = { workspace = true }
2324
safe_arith = { workspace = true }
2425
sensitive_url = { workspace = true }
2526
serde_json = { workspace = true }
26-
slashing_protection = { workspace = true }
2727
slot_clock = { workspace = true }
2828
tokio = { workspace = true }
2929
types = { workspace = true }

account_manager/src/validator/create.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ use account_utils::{
66
};
77
use clap::{Arg, ArgAction, ArgMatches, Command};
88
use clap_utils::FLAG_HEADER;
9-
use directory::{DEFAULT_SECRET_DIR, DEFAULT_WALLET_DIR, parse_path_or_default_with_flag};
9+
use directory::{parse_path_or_default_with_flag, DEFAULT_SECRET_DIR, DEFAULT_WALLET_DIR};
10+
use eip_3076::{SlashingDatabase, SLASHING_PROTECTION_FILENAME};
1011
use environment::Environment;
1112
use eth2_wallet_manager::WalletManager;
12-
use slashing_protection::{SLASHING_PROTECTION_FILENAME, SlashingDatabase};
1313
use std::ffi::OsStr;
1414
use std::fs;
1515
use std::fs::create_dir_all;
@@ -274,8 +274,7 @@ fn existing_validator_count<P: AsRef<Path>>(validator_dir: P) -> Result<usize, S
274274
iter.filter_map(|e| e.ok())
275275
.filter(|e| {
276276
e.file_name() != OsStr::new(validator_definitions::CONFIG_FILENAME)
277-
&& e.file_name()
278-
!= OsStr::new(slashing_protection::SLASHING_PROTECTION_FILENAME)
277+
&& e.file_name() != OsStr::new(eip_3076::SLASHING_PROTECTION_FILENAME)
279278
})
280279
.count()
281280
})

account_manager/src/validator/import.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use account_utils::{
1111
};
1212
use clap::{Arg, ArgAction, ArgMatches, Command};
1313
use clap_utils::FLAG_HEADER;
14-
use slashing_protection::{SLASHING_PROTECTION_FILENAME, SlashingDatabase};
14+
use eip_3076::{SlashingDatabase, SLASHING_PROTECTION_FILENAME};
1515
use std::fs;
1616
use std::path::PathBuf;
1717
use std::thread::sleep;

account_manager/src/validator/slashing_protection.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
use clap::{Arg, ArgAction, ArgMatches, Command};
2-
use environment::Environment;
3-
use slashing_protection::{
4-
InterchangeError, InterchangeImportOutcome, SLASHING_PROTECTION_FILENAME, SlashingDatabase,
5-
interchange::Interchange,
2+
use eip_3076::{
3+
interchange::Interchange, InterchangeError, InterchangeImportOutcome, SlashingDatabase,
4+
SLASHING_PROTECTION_FILENAME,
65
};
6+
use environment::Environment;
77
use std::fs::File;
88
use std::path::PathBuf;
99
use std::str::FromStr;

common/eth2/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ reqwest-eventsource = "0.5.0"
2929
sensitive_url = { workspace = true }
3030
serde = { workspace = true }
3131
serde_json = { workspace = true }
32-
slashing_protection = { workspace = true }
32+
eip_3076 = { workspace = true }
3333
ssz_types = { workspace = true }
3434
test_random_derive = { path = "../../common/test_random_derive" }
3535
types = { workspace = true }

common/eth2/src/lighthouse_vc/std_types.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use serde::{Deserialize, Serialize};
33
use types::{Address, Graffiti, PublicKeyBytes};
44
use zeroize::Zeroizing;
55

6-
pub use slashing_protection::interchange::Interchange;
6+
pub use eip_3076::interchange::Interchange;
77

88
#[derive(Debug, Deserialize, Serialize, PartialEq)]
99
pub struct GetFeeRecipientResponse {

lighthouse/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ eth2 = { workspace = true }
8787
initialized_validators = { workspace = true }
8888
lighthouse_network = { workspace = true }
8989
sensitive_url = { workspace = true }
90-
slashing_protection = { workspace = true }
90+
eip_3076 = { workspace = true }
9191
tempfile = { workspace = true }
9292
validator_dir = { workspace = true }
9393
zeroize = { workspace = true }

lighthouse/tests/account_manager.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ use account_utils::{
1818
eth2_keystore::KeystoreBuilder,
1919
validator_definitions::{SigningDefinition, ValidatorDefinition, ValidatorDefinitions},
2020
};
21-
use slashing_protection::{SLASHING_PROTECTION_FILENAME, SlashingDatabase};
21+
use eip_3076::{SlashingDatabase, SLASHING_PROTECTION_FILENAME};
2222
use std::env;
2323
use std::fs::{self, File};
2424
use std::io::{BufRead, BufReader, Write};

0 commit comments

Comments
 (0)