Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 24 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ members = [
"common/compare_fields_derive",
"common/deposit_contract",
"common/directory",
"common/eip_3076",
"common/eth2",
"common/eth2_config",
"common/eth2_interop_keypairs",
Expand Down Expand Up @@ -79,6 +80,7 @@ members = [
"testing/validator_test_rig",
"testing/web3signer_tests",
"validator_client",
"validator_client/slashing_protection",
"validator_client/beacon_node_fallback",
"validator_client/doppelganger_service",
"validator_client/graffiti_file",
Expand All @@ -87,7 +89,6 @@ members = [
"validator_client/initialized_validators",
"validator_client/lighthouse_validator_store",
"validator_client/signing_method",
"validator_client/slashing_protection",
"validator_client/validator_metrics",
"validator_client/validator_services",
"validator_manager",
Expand Down Expand Up @@ -144,6 +145,7 @@ eth2_key_derivation = { path = "crypto/eth2_key_derivation" }
eth2_keystore = { path = "crypto/eth2_keystore" }
eth2_network_config = { path = "common/eth2_network_config" }
eth2_wallet = { path = "crypto/eth2_wallet" }
eip_3076 = { path = "common/eip_3076" }
ethereum_hashing = "0.7.0"
ethereum_serde_utils = "0.8.0"
ethereum_ssz = "0.9.0"
Expand Down Expand Up @@ -234,7 +236,6 @@ serde_yaml = "0.9"
sha2 = "0.9"
signing_method = { path = "validator_client/signing_method" }
slasher = { path = "slasher", default-features = false }
slashing_protection = { path = "validator_client/slashing_protection" }
slot_clock = { path = "common/slot_clock" }
smallvec = { version = "1.11.2", features = ["arbitrary"] }
snap = "1"
Expand Down Expand Up @@ -275,6 +276,7 @@ validator_http_metrics = { path = "validator_client/http_metrics" }
validator_metrics = { path = "validator_client/validator_metrics" }
validator_services = { path = "validator_client/validator_services" }
validator_store = { path = "validator_client/validator_store" }
slashing_protection = { path = "validator_client/slashing_protection" }
validator_test_rig = { path = "testing/validator_test_rig" }
warp = { version = "0.3.7", default-features = false, features = ["tls"] }
warp_utils = { path = "common/warp_utils" }
Expand Down
3 changes: 2 additions & 1 deletion account_manager/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,13 @@ eth2_keystore = { workspace = true }
eth2_network_config = { workspace = true }
eth2_wallet = { workspace = true }
eth2_wallet_manager = { path = "../common/eth2_wallet_manager" }
eip_3076 = { workspace = true }
filesystem = { workspace = true }
safe_arith = { workspace = true }
sensitive_url = { workspace = true }
serde_json = { workspace = true }
slashing_protection = { workspace = true }
slot_clock = { workspace = true }
slashing_protection = { workspace = true }
tokio = { workspace = true }
types = { workspace = true }
validator_dir = { workspace = true }
Expand Down
6 changes: 2 additions & 4 deletions account_manager/src/validator/slashing_protection.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
use clap::{Arg, ArgAction, ArgMatches, Command};
use eip_3076::interchange::{Interchange, InterchangeError, InterchangeImportOutcome};
use environment::Environment;
use slashing_protection::{
InterchangeError, InterchangeImportOutcome, SLASHING_PROTECTION_FILENAME, SlashingDatabase,
interchange::Interchange,
};
use slashing_protection::{SLASHING_PROTECTION_FILENAME, SlashingDatabase};
use std::fs::File;
use std::path::PathBuf;
use std::str::FromStr;
Expand Down
2 changes: 0 additions & 2 deletions beacon_node/store/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ ethereum_ssz = { workspace = true }
ethereum_ssz_derive = { workspace = true }
itertools = { workspace = true }
leveldb = { version = "0.8.6", optional = true, default-features = false }
logging = { workspace = true }
lru = { workspace = true }
metrics = { workspace = true }
parking_lot = { workspace = true }
Expand All @@ -30,7 +29,6 @@ state_processing = { workspace = true }
strum = { workspace = true }
superstruct = { workspace = true }
tracing = { workspace = true }
tracing-subscriber = { workspace = true }
types = { workspace = true }
xdelta3 = { workspace = true }
zstd = { workspace = true }
Expand Down
23 changes: 23 additions & 0 deletions common/eip_3076/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[package]
name = "eip_3076"
version = "0.1.0"
authors = ["Michael Sproul <[email protected]>", "pscott <[email protected]>"]
edition.workspace = true
autotests = false

[features]
arbitrary-fuzz = ["types/arbitrary-fuzz"]
portable = ["types/portable"]

[dependencies]
arbitrary = { workspace = true, features = ["derive"] }
ethereum_serde_utils = { workspace = true }
r2d2 = { workspace = true }
rusqlite = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }
tracing = { workspace = true }
types = { workspace = true }

[dev-dependencies]
rayon = { workspace = true }
43 changes: 43 additions & 0 deletions common/eip_3076/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
TESTS_TAG := v5.3.0
GENERATE_DIR := generated-tests
OUTPUT_DIR := interchange-tests
TARBALL := $(OUTPUT_DIR)-$(TESTS_TAG).tar.gz
ARCHIVE_URL := https://github.com/eth-clients/slashing-protection-interchange-tests/tarball/$(TESTS_TAG)

ifeq ($(OS),Windows_NT)
ifeq (, $(shell where rm))
rmfile = if exist $(1) (del /F /Q $(1))
rmdir = if exist $(1) (rmdir /Q /S $(1))
makedir = if not exist $(1) (mkdir $(1))
else
rmfile = rm -f $(1)
rmdir = rm -rf $(1)
makedir = mkdir -p $(1)
endif
else
rmfile = rm -f $(1)
rmdir = rm -rf $(1)
makedir = mkdir -p $(1)
endif

$(OUTPUT_DIR): $(TARBALL)
$(call rmdir,$@)
$(call makedir,$@)
tar --strip-components=1 -xzf $^ -C $@

$(TARBALL):
curl --fail -L -o $@ $(ARCHIVE_URL)

clean-test-files:
$(call rmdir,$(OUTPUT_DIR))

clean-archives:
$(call rmfile,$(TARBALL))

generate:
$(call rmdir,$(GENERATE_DIR))
cargo run --release --bin test_generator -- $(GENERATE_DIR)

clean: clean-test-files clean-archives

.PHONY: clean clean-archives clean-test-files generate
Loading
Loading