Skip to content
Closed
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
52 changes: 26 additions & 26 deletions Cargo.lock

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

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,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 @@ -86,7 +87,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 @@ -142,6 +142,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.7"
ethereum_ssz = "0.8.2"
Expand Down Expand Up @@ -226,7 +227,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
2 changes: 1 addition & 1 deletion account_manager/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ 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 }
tokio = { workspace = true }
types = { workspace = true }
Expand Down
5 changes: 2 additions & 3 deletions account_manager/src/validator/create.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ use account_utils::{
use clap::{Arg, ArgAction, ArgMatches, Command};
use clap_utils::FLAG_HEADER;
use directory::{parse_path_or_default_with_flag, DEFAULT_SECRET_DIR, DEFAULT_WALLET_DIR};
use eip_3076::{SlashingDatabase, SLASHING_PROTECTION_FILENAME};
use environment::Environment;
use eth2_wallet_manager::WalletManager;
use slashing_protection::{SlashingDatabase, SLASHING_PROTECTION_FILENAME};
use std::ffi::OsStr;
use std::fs;
use std::fs::create_dir_all;
Expand Down Expand Up @@ -272,8 +272,7 @@ fn existing_validator_count<P: AsRef<Path>>(validator_dir: P) -> Result<usize, S
iter.filter_map(|e| e.ok())
.filter(|e| {
e.file_name() != OsStr::new(validator_definitions::CONFIG_FILENAME)
&& e.file_name()
!= OsStr::new(slashing_protection::SLASHING_PROTECTION_FILENAME)
&& e.file_name() != OsStr::new(eip_3076::SLASHING_PROTECTION_FILENAME)
})
.count()
})
Expand Down
2 changes: 1 addition & 1 deletion account_manager/src/validator/import.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use account_utils::{
};
use clap::{Arg, ArgAction, ArgMatches, Command};
use clap_utils::FLAG_HEADER;
use slashing_protection::{SlashingDatabase, SLASHING_PROTECTION_FILENAME};
use eip_3076::{SlashingDatabase, SLASHING_PROTECTION_FILENAME};
use std::fs;
use std::path::PathBuf;
use std::thread::sleep;
Expand Down
4 changes: 2 additions & 2 deletions account_manager/src/validator/slashing_protection.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
use clap::{Arg, ArgAction, ArgMatches, Command};
use environment::Environment;
use slashing_protection::{
use eip_3076::{
interchange::Interchange, InterchangeError, InterchangeImportOutcome, SlashingDatabase,
SLASHING_PROTECTION_FILENAME,
};
use environment::Environment;
use std::fs::File;
use std::path::PathBuf;
use std::str::FromStr;
Expand Down
2 changes: 1 addition & 1 deletion beacon_node/http_api/src/aggregate_attestation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,6 @@ pub fn get_aggregate_attestation<T: BeaconChainTypes>(
} else if endpoint_version == V1 {
Ok(warp::reply::json(&GenericResponse::from(aggregate_attestation)).into_response())
} else {
return Err(unsupported_version_rejection(endpoint_version));
Err(unsupported_version_rejection(endpoint_version))
}
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[package]
name = "slashing_protection"
name = "eip_3076"
version = "0.1.0"
authors = ["Michael Sproul <[email protected]>", "pscott <[email protected]>"]
edition = { workspace = true }
edition.workspace = true
autotests = false

[features]
Expand All @@ -26,5 +26,5 @@ types = { workspace = true }
rayon = { workspace = true }

[[test]]
name = "slashing_protection_tests"
name = "eip_3076_tests"
path = "tests/main.rs"
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,3 @@ generate:
clean: clean-test-files clean-archives

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

15 changes: 15 additions & 0 deletions common/eip_3076/interchange-tests/.github/workflows/check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: schema checks

on:
push:
pull_request:

jobs:
check_schema:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- run: make check
1 change: 1 addition & 0 deletions common/eip_3076/interchange-tests/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.tar.gz
9 changes: 9 additions & 0 deletions common/eip_3076/interchange-tests/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
VERSION:=$(shell git describe --tags)

check:
cargo run --manifest-path schema_validator/Cargo.toml --release -- schema.json tests/generated

# Build a tarball for a release.
# To make a new release: `git tag -s vX.Y.Z`
release:
tar -czvf eip-3076-tests-$(VERSION).tar.gz tests/
Loading
Loading