diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml
index d1a8c9f614..28a84048c0 100644
--- a/.github/workflows/docker.yml
+++ b/.github/workflows/docker.yml
@@ -124,9 +124,6 @@ jobs:
push: true
tags: |
${{ github.repository_owner}}/${{ matrix.binary }}:${{ env.VERSION }}-${{ env.SHORT_ARCH }}${{ env.VERSION_SUFFIX }}
- ${{ github.repository_owner}}/${{ matrix.binary }}:${{ env.VERSION }}-${{ env.SHORT_ARCH }}${{ env.VERSION_SUFFIX }}-dev
- ${{ github.repository_owner}}/${{ matrix.binary }}:${{ env.VERSION }}-${{ env.SHORT_ARCH }}${{ env.VERSION_SUFFIX }}-modern
- ${{ github.repository_owner}}/${{ matrix.binary }}:${{ env.VERSION }}-${{ env.SHORT_ARCH }}${{ env.VERSION_SUFFIX }}-modern-dev
- name: Build and push (lcli)
if: startsWith(matrix.binary, 'lcli')
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 86f99b53e1..76925a8be0 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -253,13 +253,9 @@ jobs:
| System | Architecture | Binary | PGP Signature |
|:---:|:---:|:---:|:---|
|
| x86_64 | [lighthouse-${{ env.VERSION }}-x86_64-apple-darwin.tar.gz](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/lighthouse-${{ env.VERSION }}-x86_64-apple-darwin.tar.gz) | [PGP Signature](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/lighthouse-${{ env.VERSION }}-x86_64-apple-darwin.tar.gz.asc) |
- |
| x86_64 | [lighthouse-${{ env.VERSION }}-x86_64-apple-darwin-portable.tar.gz](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/lighthouse-${{ env.VERSION }}-x86_64-apple-darwin-portable.tar.gz) | [PGP Signature](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/lighthouse-${{ env.VERSION }}-x86_64-apple-darwin-portable.tar.gz.asc) |
|
| x86_64 | [lighthouse-${{ env.VERSION }}-x86_64-unknown-linux-gnu.tar.gz](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/lighthouse-${{ env.VERSION }}-x86_64-unknown-linux-gnu.tar.gz) | [PGP Signature](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/lighthouse-${{ env.VERSION }}-x86_64-unknown-linux-gnu.tar.gz.asc) |
- |
| x86_64 | [lighthouse-${{ env.VERSION }}-x86_64-unknown-linux-gnu-portable.tar.gz](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/lighthouse-${{ env.VERSION }}-x86_64-unknown-linux-gnu-portable.tar.gz) | [PGP Signature](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/lighthouse-${{ env.VERSION }}-x86_64-unknown-linux-gnu-portable.tar.gz.asc) |
|
| aarch64 | [lighthouse-${{ env.VERSION }}-aarch64-unknown-linux-gnu.tar.gz](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/lighthouse-${{ env.VERSION }}-aarch64-unknown-linux-gnu.tar.gz) | [PGP Signature](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/lighthouse-${{ env.VERSION }}-aarch64-unknown-linux-gnu.tar.gz.asc) |
- |
| aarch64 | [lighthouse-${{ env.VERSION }}-aarch64-unknown-linux-gnu-portable.tar.gz](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/lighthouse-${{ env.VERSION }}-aarch64-unknown-linux-gnu-portable.tar.gz) | [PGP Signature](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/lighthouse-${{ env.VERSION }}-aarch64-unknown-linux-gnu-portable.tar.gz.asc) |
|
| x86_64 | [lighthouse-${{ env.VERSION }}-x86_64-windows.tar.gz](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/lighthouse-${{ env.VERSION }}-x86_64-windows.tar.gz) | [PGP Signature](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/lighthouse-${{ env.VERSION }}-x86_64-windows.tar.gz.asc) |
- |
| x86_64 | [lighthouse-${{ env.VERSION }}-x86_64-windows-portable.tar.gz](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/lighthouse-${{ env.VERSION }}-x86_64-windows-portable.tar.gz) | [PGP Signature](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/lighthouse-${{ env.VERSION }}-x86_64-windows-portable.tar.gz.asc) |
| | | | |
| **System** | **Option** | - | **Resource** |
|
| Docker | [${{ env.VERSION }}](https://hub.docker.com/r/${{ env.IMAGE_NAME }}/tags?page=1&ordering=last_updated&name=${{ env.VERSION }}) | [${{ env.IMAGE_NAME }}](https://hub.docker.com/r/${{ env.IMAGE_NAME }}) |
diff --git a/Cargo.lock b/Cargo.lock
index 7bf7092595..e5589d5be3 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -780,7 +780,6 @@ dependencies = [
"bitvec 1.0.1",
"bls",
"derivative",
- "environment",
"eth1",
"eth2",
"eth2_network_config",
@@ -796,7 +795,6 @@ dependencies = [
"int_to_bytes",
"itertools 0.10.5",
"kzg",
- "lazy_static",
"lighthouse_metrics",
"lighthouse_version",
"logging",
@@ -836,7 +834,7 @@ dependencies = [
[[package]]
name = "beacon_node"
-version = "5.2.1"
+version = "5.3.0"
dependencies = [
"beacon_chain",
"clap",
@@ -872,7 +870,6 @@ dependencies = [
"fnv",
"futures",
"itertools 0.10.5",
- "lazy_static",
"lighthouse_metrics",
"lighthouse_network",
"logging",
@@ -1021,9 +1018,9 @@ dependencies = [
[[package]]
name = "blst"
-version = "0.3.12"
+version = "0.3.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "62dc83a094a71d43eeadd254b1ec2d24cb6a0bb6cadce00df51f0db594711a32"
+checksum = "4378725facc195f1a538864863f6de233b500a8862747e7f165078a419d5e874"
dependencies = [
"cc",
"glob",
@@ -1031,6 +1028,22 @@ dependencies = [
"zeroize",
]
+[[package]]
+name = "blstrs"
+version = "0.7.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7a8a8ed6fefbeef4a8c7b460e4110e12c5e22a5b7cf32621aae6ad650c4dcf29"
+dependencies = [
+ "blst",
+ "byte-slice-cast",
+ "ff 0.13.0",
+ "group 0.13.0",
+ "pairing",
+ "rand_core",
+ "serde",
+ "subtle",
+]
+
[[package]]
name = "bollard-stubs"
version = "1.42.0-rc.3"
@@ -1043,7 +1056,7 @@ dependencies = [
[[package]]
name = "boot_node"
-version = "5.2.1"
+version = "5.3.0"
dependencies = [
"beacon_node",
"clap",
@@ -1390,7 +1403,6 @@ dependencies = [
"genesis",
"http_api",
"http_metrics",
- "lazy_static",
"lighthouse_metrics",
"lighthouse_network",
"monitoring_api",
@@ -1517,6 +1529,52 @@ dependencies = [
"libc",
]
+[[package]]
+name = "crate_crypto_internal_eth_kzg_bls12_381"
+version = "0.3.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8761b04feb6031ffaf93933c955a0c91a2f3ce15dcac6b9586d2487fe55abf0b"
+dependencies = [
+ "blst",
+ "blstrs",
+ "ff 0.13.0",
+ "group 0.13.0",
+ "pairing",
+ "rayon",
+]
+
+[[package]]
+name = "crate_crypto_internal_eth_kzg_erasure_codes"
+version = "0.3.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "eca410dff79524a2babe8a0d9ab5fdce21b16808f8189eb8b6da6159681f8de2"
+dependencies = [
+ "crate_crypto_internal_eth_kzg_bls12_381",
+ "crate_crypto_internal_eth_kzg_polynomial",
+]
+
+[[package]]
+name = "crate_crypto_internal_eth_kzg_polynomial"
+version = "0.3.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "68be1a5f16bc1c09254dec5209e22278d7d395284443576886a5890e7131234f"
+dependencies = [
+ "crate_crypto_internal_eth_kzg_bls12_381",
+]
+
+[[package]]
+name = "crate_crypto_kzg_multi_open_fk20"
+version = "0.3.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "702fe5b687fe8c5a46851b8bc624ad49603a339dc93c920d4f7e61592c201ee8"
+dependencies = [
+ "crate_crypto_internal_eth_kzg_bls12_381",
+ "crate_crypto_internal_eth_kzg_polynomial",
+ "hex",
+ "rayon",
+ "sha2 0.10.8",
+]
+
[[package]]
name = "crc32fast"
version = "1.4.2"
@@ -2413,8 +2471,8 @@ dependencies = [
"ethereum_ssz_derive",
"execution_layer",
"futures",
- "lazy_static",
"lighthouse_metrics",
+ "logging",
"merkle_proof",
"parking_lot 0.12.3",
"sensitive_url",
@@ -2493,7 +2551,6 @@ dependencies = [
"bls",
"ethereum_hashing",
"hex",
- "lazy_static",
"num-bigint",
"serde",
"serde_yaml",
@@ -2901,7 +2958,6 @@ dependencies = [
"arc-swap",
"builder_client",
"bytes",
- "environment",
"eth2",
"eth2_network_config",
"ethereum_serde_utils",
@@ -2914,9 +2970,9 @@ dependencies = [
"jsonwebtoken",
"keccak-hash",
"kzg",
- "lazy_static",
"lighthouse_metrics",
"lighthouse_version",
+ "logging",
"lru",
"parking_lot 0.12.3",
"pretty_reqwest_error",
@@ -3008,6 +3064,7 @@ version = "0.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449"
dependencies = [
+ "bitvec 1.0.1",
"rand_core",
"subtle",
]
@@ -3106,6 +3163,7 @@ dependencies = [
"beacon_chain",
"ethereum_ssz",
"ethereum_ssz_derive",
+ "lighthouse_metrics",
"proto_array",
"slog",
"state_processing",
@@ -3438,7 +3496,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63"
dependencies = [
"ff 0.13.0",
+ "rand",
"rand_core",
+ "rand_xorshift",
"subtle",
]
@@ -3775,7 +3835,6 @@ dependencies = [
"bs58 0.4.0",
"bytes",
"directory",
- "environment",
"eth1",
"eth2",
"ethereum_serde_utils",
@@ -3784,7 +3843,6 @@ dependencies = [
"futures",
"genesis",
"hex",
- "lazy_static",
"lighthouse_metrics",
"lighthouse_network",
"lighthouse_version",
@@ -3818,10 +3876,10 @@ name = "http_metrics"
version = "0.1.0"
dependencies = [
"beacon_chain",
- "environment",
"lighthouse_metrics",
"lighthouse_network",
"lighthouse_version",
+ "logging",
"malloc_utils",
"reqwest",
"serde",
@@ -4350,13 +4408,17 @@ version = "0.1.0"
dependencies = [
"arbitrary",
"c-kzg",
+ "criterion",
"derivative",
+ "eth2_network_config",
"ethereum_hashing",
"ethereum_serde_utils",
"ethereum_ssz",
"ethereum_ssz_derive",
"hex",
+ "rust_eth_kzg",
"serde",
+ "serde_json",
"tree_hash",
]
@@ -4377,7 +4439,7 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55"
[[package]]
name = "lcli"
-version = "5.2.1"
+version = "5.3.0"
dependencies = [
"account_utils",
"beacon_chain",
@@ -4402,6 +4464,7 @@ dependencies = [
"serde",
"serde_json",
"serde_yaml",
+ "sloggers",
"snap",
"state_processing",
"store",
@@ -4948,7 +5011,7 @@ dependencies = [
[[package]]
name = "lighthouse"
-version = "5.2.1"
+version = "5.3.0"
dependencies = [
"account_manager",
"account_utils",
@@ -4966,7 +5029,6 @@ dependencies = [
"eth2_network_config",
"ethereum_hashing",
"futures",
- "lazy_static",
"lighthouse_metrics",
"lighthouse_network",
"lighthouse_version",
@@ -5014,7 +5076,6 @@ dependencies = [
"gossipsub",
"hex",
"itertools 0.10.5",
- "lazy_static",
"libp2p",
"libp2p-mplex",
"lighthouse_metrics",
@@ -5127,7 +5188,6 @@ name = "logging"
version = "0.2.0"
dependencies = [
"chrono",
- "lazy_static",
"lighthouse_metrics",
"parking_lot 0.12.3",
"serde",
@@ -5185,7 +5245,6 @@ version = "0.1.0"
dependencies = [
"jemalloc-ctl",
"jemallocator",
- "lazy_static",
"libc",
"lighthouse_metrics",
"parking_lot 0.12.3",
@@ -5272,7 +5331,6 @@ version = "0.2.0"
dependencies = [
"ethereum-types 0.14.1",
"ethereum_hashing",
- "lazy_static",
"quickcheck",
"quickcheck_macros",
"safe_arith",
@@ -5399,7 +5457,6 @@ name = "monitoring_api"
version = "0.1.0"
dependencies = [
"eth2",
- "lazy_static",
"lighthouse_metrics",
"lighthouse_version",
"regex",
@@ -5577,7 +5634,6 @@ dependencies = [
"hex",
"igd-next",
"itertools 0.10.5",
- "lazy_static",
"lighthouse_metrics",
"lighthouse_network",
"logging",
@@ -5752,9 +5808,9 @@ dependencies = [
[[package]]
name = "object"
-version = "0.36.1"
+version = "0.36.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "081b846d1d56ddfc18fdf1a922e4f6e07a11768ea1b92dec44e42b72712ccfce"
+checksum = "3f203fa8daa7bb185f760ae12bd8e097f63d17041dcdcaf675ac54cdf863170e"
dependencies = [
"memchr",
]
@@ -5882,7 +5938,6 @@ dependencies = [
"ethereum_ssz",
"ethereum_ssz_derive",
"itertools 0.10.5",
- "lazy_static",
"lighthouse_metrics",
"maplit",
"parking_lot 0.12.3",
@@ -5913,6 +5968,15 @@ dependencies = [
"sha2 0.10.8",
]
+[[package]]
+name = "pairing"
+version = "0.23.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "81fec4625e73cf41ef4bb6846cafa6d44736525f442ba45e407c4a000a13996f"
+dependencies = [
+ "group 0.13.0",
+]
+
[[package]]
name = "parity-scale-codec"
version = "2.3.1"
@@ -6514,8 +6578,7 @@ checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0"
[[package]]
name = "quick-protobuf"
version = "0.8.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9d6da84cc204722a989e01ba2f6e1e276e190f22263d0cb6ce8526fcdb0d2e1f"
+source = "git+https://github.com/sigp/quick-protobuf.git?rev=681f413312404ab6e51f0b46f39b0075c6f4ebfd#681f413312404ab6e51f0b46f39b0075c6f4ebfd"
dependencies = [
"byteorder",
]
@@ -7031,6 +7094,21 @@ dependencies = [
"smallvec",
]
+[[package]]
+name = "rust_eth_kzg"
+version = "0.3.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "013a850c7e131a8f9651ffbb151dc33240234f21dd357b692bd5ff4cdc84bf9a"
+dependencies = [
+ "crate_crypto_internal_eth_kzg_bls12_381",
+ "crate_crypto_internal_eth_kzg_erasure_codes",
+ "crate_crypto_kzg_multi_open_fk20",
+ "hex",
+ "rayon",
+ "serde",
+ "serde_json",
+]
+
[[package]]
name = "rustc-demangle"
version = "0.1.24"
@@ -7699,7 +7777,6 @@ dependencies = [
"ethereum_ssz_derive",
"filesystem",
"flate2",
- "lazy_static",
"libmdbx",
"lighthouse_metrics",
"lmdb-rkv",
@@ -7746,7 +7823,6 @@ dependencies = [
"arbitrary",
"ethereum_serde_utils",
"filesystem",
- "lazy_static",
"r2d2",
"r2d2_sqlite",
"rayon",
@@ -7863,7 +7939,6 @@ dependencies = [
name = "slot_clock"
version = "0.2.0"
dependencies = [
- "lazy_static",
"lighthouse_metrics",
"parking_lot 0.12.3",
"types",
@@ -7992,7 +8067,6 @@ dependencies = [
"int_to_bytes",
"integer-sqrt",
"itertools 0.10.5",
- "lazy_static",
"lighthouse_metrics",
"merkle_proof",
"rand",
@@ -8012,7 +8086,6 @@ version = "0.1.0"
dependencies = [
"beacon_chain",
"ethereum_ssz",
- "lazy_static",
"state_processing",
"tokio",
"types",
@@ -8034,7 +8107,6 @@ dependencies = [
"ethereum_ssz",
"ethereum_ssz_derive",
"itertools 0.10.5",
- "lazy_static",
"leveldb",
"lighthouse_metrics",
"lru",
@@ -8245,7 +8317,6 @@ version = "0.1.0"
dependencies = [
"async-channel",
"futures",
- "lazy_static",
"lighthouse_metrics",
"logging",
"slog",
@@ -8857,7 +8928,6 @@ dependencies = [
"int_to_bytes",
"itertools 0.10.5",
"kzg",
- "lazy_static",
"log",
"maplit",
"merkle_proof",
@@ -9023,7 +9093,6 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1"
name = "unused_port"
version = "0.1.0"
dependencies = [
- "lazy_static",
"lru_cache",
"parking_lot 0.12.3",
]
@@ -9077,7 +9146,6 @@ dependencies = [
"hex",
"hyper 1.4.1",
"itertools 0.10.5",
- "lazy_static",
"libsecp256k1",
"lighthouse_metrics",
"lighthouse_version",
@@ -9247,7 +9315,6 @@ dependencies = [
"bytes",
"eth2",
"headers",
- "lazy_static",
"lighthouse_metrics",
"safe_arith",
"serde",
@@ -9429,7 +9496,7 @@ dependencies = [
"eth2_keystore",
"eth2_network_config",
"futures",
- "lazy_static",
+ "logging",
"parking_lot 0.12.3",
"reqwest",
"serde",
diff --git a/Cargo.toml b/Cargo.toml
index b2957842d5..608b798f5c 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -107,13 +107,14 @@ bytes = "1"
clap = { version = "4.5.4", features = ["derive", "cargo", "wrap_help"] }
# Turn off c-kzg's default features which include `blst/portable`. We can turn on blst's portable
# feature ourselves when desired.
-c-kzg = { version = "1", default-features = false }
+c-kzg = { version = "1", default-features = false }
compare_fields_derive = { path = "common/compare_fields_derive" }
criterion = "0.5"
delay_map = "0.3"
derivative = "2"
dirs = "3"
either = "1.9"
+rust_eth_kzg = "0.3.4"
discv5 = { version = "0.4.1", features = ["libp2p"] }
env_logger = "0.9"
error-chain = "0.12"
@@ -132,7 +133,6 @@ hex = "0.4"
hashlink = "0.9.0"
hyper = "1"
itertools = "0.10"
-lazy_static = "1"
libsecp256k1 = "0.7"
log = "0.4"
lru = "0.12"
@@ -240,6 +240,9 @@ validator_client = { path = "validator_client" }
validator_dir = { path = "common/validator_dir" }
warp_utils = { path = "common/warp_utils" }
+[patch.crates-io]
+quick-protobuf = { git = "https://github.com/sigp/quick-protobuf.git", rev = "681f413312404ab6e51f0b46f39b0075c6f4ebfd" }
+
[profile.maxperf]
inherits = "release"
lto = "fat"
diff --git a/Dockerfile b/Dockerfile
index ff7f14d534..0f334e2ac8 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,4 +1,4 @@
-FROM rust:1.78.0-bullseye AS builder
+FROM rust:1.80.0-bullseye AS builder
RUN apt-get update && apt-get -y upgrade && apt-get install -y cmake libclang-dev
COPY . lighthouse
ARG FEATURES
diff --git a/Makefile b/Makefile
index d18a673880..a4cb70f687 100644
--- a/Makefile
+++ b/Makefile
@@ -62,16 +62,10 @@ install-lcli:
#
# The resulting binaries will be created in the `target/` directory.
#
-# The *-portable options compile the blst library *without* the use of some
-# optimized CPU functions that may not be available on some systems. This
-# results in a more portable binary with ~20% slower BLS verification.
+# The *-portable options is the default feature.
build-x86_64:
- cross build --bin lighthouse --target x86_64-unknown-linux-gnu --features "modern,$(CROSS_FEATURES)" --profile "$(CROSS_PROFILE)" --locked
-build-x86_64-portable:
cross build --bin lighthouse --target x86_64-unknown-linux-gnu --features "portable,$(CROSS_FEATURES)" --profile "$(CROSS_PROFILE)" --locked
build-aarch64:
- cross build --bin lighthouse --target aarch64-unknown-linux-gnu --features "$(CROSS_FEATURES)" --profile "$(CROSS_PROFILE)" --locked
-build-aarch64-portable:
cross build --bin lighthouse --target aarch64-unknown-linux-gnu --features "portable,$(CROSS_FEATURES)" --profile "$(CROSS_PROFILE)" --locked
build-lcli-x86_64:
@@ -96,12 +90,8 @@ build-release-tarballs:
[ -d $(BIN_DIR) ] || mkdir -p $(BIN_DIR)
$(MAKE) build-x86_64
$(call tarball_release_binary,$(BUILD_PATH_X86_64),$(X86_64_TAG),"")
- $(MAKE) build-x86_64-portable
- $(call tarball_release_binary,$(BUILD_PATH_X86_64),$(X86_64_TAG),"-portable")
$(MAKE) build-aarch64
$(call tarball_release_binary,$(BUILD_PATH_AARCH64),$(AARCH64_TAG),"")
- $(MAKE) build-aarch64-portable
- $(call tarball_release_binary,$(BUILD_PATH_AARCH64),$(AARCH64_TAG),"-portable")
# Runs the full workspace tests in **release**, without downloading any additional
# test vectors.
diff --git a/account_manager/src/validator/import.rs b/account_manager/src/validator/import.rs
index a7c72679f7..8f04e9059a 100644
--- a/account_manager/src/validator/import.rs
+++ b/account_manager/src/validator/import.rs
@@ -178,7 +178,13 @@ pub fn cli_run(matches: &ArgMatches, validator_dir: PathBuf) -> Result<(), Strin
let password_opt = loop {
if let Some(password) = previous_password.clone() {
eprintln!("Reuse previous password.");
- break Some(password);
+ if check_password_on_keystore(&keystore, &password)? {
+ break Some(password);
+ } else {
+ eprintln!("Reused password incorrect. Retry!");
+ previous_password = None;
+ continue;
+ }
}
eprintln!();
eprintln!("{}", PASSWORD_PROMPT);
@@ -201,20 +207,12 @@ pub fn cli_run(matches: &ArgMatches, validator_dir: PathBuf) -> Result<(), Strin
}
};
- match keystore.decrypt_keypair(password.as_ref()) {
- Ok(_) => {
- eprintln!("Password is correct.");
- eprintln!();
- sleep(Duration::from_secs(1)); // Provides nicer UX.
- if reuse_password {
- previous_password = Some(password.clone());
- }
- break Some(password);
+ // Check if the password unlocks the keystore
+ if check_password_on_keystore(&keystore, &password)? {
+ if reuse_password {
+ previous_password = Some(password.clone());
}
- Err(eth2_keystore::Error::InvalidPassword) => {
- eprintln!("Invalid password");
- }
- Err(e) => return Err(format!("Error whilst decrypting keypair: {:?}", e)),
+ break Some(password);
}
};
@@ -317,3 +315,27 @@ pub fn cli_run(matches: &ArgMatches, validator_dir: PathBuf) -> Result<(), Strin
Ok(())
}
+
+/// Checks if the given password unlocks the keystore.
+///
+/// Returns `Ok(true)` if password unlocks the keystore successfully.
+/// Returns `Ok(false` if password is incorrect.
+/// Otherwise, returns the keystore error.
+fn check_password_on_keystore(
+ keystore: &Keystore,
+ password: &ZeroizeString,
+) -> Result {
+ match keystore.decrypt_keypair(password.as_ref()) {
+ Ok(_) => {
+ eprintln!("Password is correct.");
+ eprintln!();
+ sleep(Duration::from_secs(1)); // Provides nicer UX.
+ Ok(true)
+ }
+ Err(eth2_keystore::Error::InvalidPassword) => {
+ eprintln!("Invalid password");
+ Ok(false)
+ }
+ Err(e) => Err(format!("Error whilst decrypting keypair: {:?}", e)),
+ }
+}
diff --git a/account_manager/src/validator/mod.rs b/account_manager/src/validator/mod.rs
index 6616bb0c45..61584cbfbb 100644
--- a/account_manager/src/validator/mod.rs
+++ b/account_manager/src/validator/mod.rs
@@ -27,7 +27,8 @@ pub fn cli_app() -> Command {
.help("Prints help information")
.action(ArgAction::HelpLong)
.display_order(0)
- .help_heading(FLAG_HEADER),
+ .help_heading(FLAG_HEADER)
+ .global(true),
)
.arg(
Arg::new(VALIDATOR_DIR_FLAG)
diff --git a/account_manager/src/wallet/mod.rs b/account_manager/src/wallet/mod.rs
index 59f5f36252..020858db77 100644
--- a/account_manager/src/wallet/mod.rs
+++ b/account_manager/src/wallet/mod.rs
@@ -22,6 +22,7 @@ pub fn cli_app() -> Command {
.action(ArgAction::HelpLong)
.display_order(0)
.help_heading(FLAG_HEADER)
+ .global(true)
)
.arg(
Arg::new(WALLETS_DIR_FLAG)
diff --git a/beacon_node/Cargo.toml b/beacon_node/Cargo.toml
index a5fd29c971..146f1c1018 100644
--- a/beacon_node/Cargo.toml
+++ b/beacon_node/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "beacon_node"
-version = "5.2.1"
+version = "5.3.0"
authors = [
"Paul Hauner ",
"Age Manning (
let signature_setup_timer =
metrics::start_timer(&metrics::ATTESTATION_PROCESSING_SIGNATURE_SETUP_TIMES);
- let pubkey_cache = chain
- .validator_pubkey_cache
- .try_read_for(VALIDATOR_PUBKEY_CACHE_LOCK_TIMEOUT)
- .ok_or(BeaconChainError::ValidatorPubkeyCacheLockTimeout)?;
+ let pubkey_cache = chain.validator_pubkey_cache.read();
let fork = chain
.spec
@@ -1272,10 +1268,7 @@ pub fn verify_signed_aggregate_signatures(
signed_aggregate: &SignedAggregateAndProof,
indexed_attestation: &IndexedAttestation,
) -> Result {
- let pubkey_cache = chain
- .validator_pubkey_cache
- .try_read_for(VALIDATOR_PUBKEY_CACHE_LOCK_TIMEOUT)
- .ok_or(BeaconChainError::ValidatorPubkeyCacheLockTimeout)?;
+ let pubkey_cache = chain.validator_pubkey_cache.read();
let aggregator_index = signed_aggregate.message().aggregator_index();
if aggregator_index >= pubkey_cache.len() as u64 {
diff --git a/beacon_node/beacon_chain/src/attestation_verification/batch.rs b/beacon_node/beacon_chain/src/attestation_verification/batch.rs
index 07fad1bd4a..5f856140ba 100644
--- a/beacon_node/beacon_chain/src/attestation_verification/batch.rs
+++ b/beacon_node/beacon_chain/src/attestation_verification/batch.rs
@@ -13,10 +13,7 @@ use super::{
CheckAttestationSignature, Error, IndexedAggregatedAttestation, IndexedUnaggregatedAttestation,
VerifiedAggregatedAttestation, VerifiedUnaggregatedAttestation,
};
-use crate::{
- beacon_chain::VALIDATOR_PUBKEY_CACHE_LOCK_TIMEOUT, metrics, BeaconChain, BeaconChainError,
- BeaconChainTypes,
-};
+use crate::{metrics, BeaconChain, BeaconChainError, BeaconChainTypes};
use bls::verify_signature_sets;
use state_processing::signature_sets::{
indexed_attestation_signature_set_from_pubkeys, signed_aggregate_selection_proof_signature_set,
@@ -60,10 +57,7 @@ where
let signature_setup_timer =
metrics::start_timer(&metrics::ATTESTATION_PROCESSING_BATCH_AGG_SIGNATURE_SETUP_TIMES);
- let pubkey_cache = chain
- .validator_pubkey_cache
- .try_read_for(VALIDATOR_PUBKEY_CACHE_LOCK_TIMEOUT)
- .ok_or(BeaconChainError::ValidatorPubkeyCacheLockTimeout)?;
+ let pubkey_cache = chain.validator_pubkey_cache.read();
let mut signature_sets = Vec::with_capacity(num_indexed * 3);
// Iterate, flattening to get only the `Ok` values.
@@ -169,10 +163,7 @@ where
&metrics::ATTESTATION_PROCESSING_BATCH_UNAGG_SIGNATURE_SETUP_TIMES,
);
- let pubkey_cache = chain
- .validator_pubkey_cache
- .try_read_for(VALIDATOR_PUBKEY_CACHE_LOCK_TIMEOUT)
- .ok_or(BeaconChainError::ValidatorPubkeyCacheLockTimeout)?;
+ let pubkey_cache = chain.validator_pubkey_cache.read();
let mut signature_sets = Vec::with_capacity(num_partially_verified);
diff --git a/beacon_node/beacon_chain/src/beacon_block_streamer.rs b/beacon_node/beacon_chain/src/beacon_block_streamer.rs
index f0a68b6be5..d63a3ee7ea 100644
--- a/beacon_node/beacon_chain/src/beacon_block_streamer.rs
+++ b/beacon_node/beacon_chain/src/beacon_block_streamer.rs
@@ -712,16 +712,16 @@ mod tests {
use crate::test_utils::{test_spec, BeaconChainHarness, EphemeralHarnessType};
use execution_layer::test_utils::{Block, DEFAULT_ENGINE_CAPABILITIES};
use execution_layer::EngineCapabilities;
- use lazy_static::lazy_static;
+ use std::sync::LazyLock;
use std::time::Duration;
use tokio::sync::mpsc;
use types::{ChainSpec, Epoch, EthSpec, Hash256, Keypair, MinimalEthSpec, Slot};
const VALIDATOR_COUNT: usize = 48;
- lazy_static! {
- /// A cached set of keys.
- static ref KEYPAIRS: Vec = types::test_utils::generate_deterministic_keypairs(VALIDATOR_COUNT);
- }
+
+ /// A cached set of keys.
+ static KEYPAIRS: LazyLock> =
+ LazyLock::new(|| types::test_utils::generate_deterministic_keypairs(VALIDATOR_COUNT));
fn get_harness(
validator_count: usize,
diff --git a/beacon_node/beacon_chain/src/beacon_chain.rs b/beacon_node/beacon_chain/src/beacon_chain.rs
index 1fa77a2043..e290b4903a 100644
--- a/beacon_node/beacon_chain/src/beacon_chain.rs
+++ b/beacon_node/beacon_chain/src/beacon_chain.rs
@@ -52,8 +52,8 @@ use crate::observed_aggregates::{
use crate::observed_attesters::{
ObservedAggregators, ObservedAttesters, ObservedSyncAggregators, ObservedSyncContributors,
};
-use crate::observed_blob_sidecars::ObservedBlobSidecars;
use crate::observed_block_producers::ObservedBlockProducers;
+use crate::observed_data_sidecars::ObservedDataSidecars;
use crate::observed_operations::{ObservationOutcome, ObservedOperations};
use crate::observed_slashable::ObservedSlashable;
use crate::persisted_beacon_chain::{PersistedBeaconChain, DUMMY_CANONICAL_HEAD_BLOCK_ROOT};
@@ -63,7 +63,6 @@ use crate::shuffling_cache::{BlockShufflingIds, ShufflingCache};
use crate::sync_committee_verification::{
Error as SyncCommitteeError, VerifiedSyncCommitteeMessage, VerifiedSyncContribution,
};
-use crate::timeout_rw_lock::TimeoutRwLock;
use crate::validator_monitor::{
get_slot_delay_ms, timestamp_now, ValidatorMonitor,
HISTORIC_EPOCHS as VALIDATOR_MONITOR_HISTORIC_EPOCHS,
@@ -132,17 +131,6 @@ pub type ForkChoiceError = fork_choice::Error;
/// Alias to appease clippy.
type HashBlockTuple = (Hash256, RpcBlock);
-/// The time-out before failure during an operation to take a read/write RwLock on the
-/// attestation cache.
-pub const ATTESTATION_CACHE_LOCK_TIMEOUT: Duration = Duration::from_secs(1);
-
-/// The time-out before failure during an operation to take a read/write RwLock on the
-/// validator pubkey cache.
-pub const VALIDATOR_PUBKEY_CACHE_LOCK_TIMEOUT: Duration = Duration::from_secs(1);
-
-/// The timeout for the eth1 finalization cache
-pub const ETH1_FINALIZATION_CACHE_LOCK_TIMEOUT: Duration = Duration::from_millis(200);
-
// These keys are all zero because they get stored in different columns, see `DBColumn` type.
pub const BEACON_CHAIN_DB_KEY: Hash256 = Hash256::zero();
pub const OP_POOL_DB_KEY: Hash256 = Hash256::zero();
@@ -427,7 +415,9 @@ pub struct BeaconChain {
/// Maintains a record of which validators have proposed blocks for each slot.
pub observed_block_producers: RwLock>,
/// Maintains a record of blob sidecars seen over the gossip network.
- pub observed_blob_sidecars: RwLock>,
+ pub observed_blob_sidecars: RwLock>>,
+ /// Maintains a record of column sidecars seen over the gossip network.
+ pub observed_column_sidecars: RwLock>>,
/// Maintains a record of slashable message seen over the gossip network or RPC.
pub observed_slashable: RwLock>,
/// Maintains a record of which validators have submitted voluntary exits.
@@ -465,13 +455,13 @@ pub struct BeaconChain {
/// Used to track the heads of the beacon chain.
pub(crate) head_tracker: Arc,
/// Caches the attester shuffling for a given epoch and shuffling key root.
- pub shuffling_cache: TimeoutRwLock,
+ pub shuffling_cache: RwLock,
/// A cache of eth1 deposit data at epoch boundaries for deposit finalization
- pub eth1_finalization_cache: TimeoutRwLock,
+ pub eth1_finalization_cache: RwLock,
/// Caches the beacon block proposer shuffling for a given epoch and shuffling key root.
pub beacon_proposer_cache: Arc>,
/// Caches a map of `validator_index -> validator_pubkey`.
- pub(crate) validator_pubkey_cache: TimeoutRwLock>,
+ pub(crate) validator_pubkey_cache: RwLock>,
/// A cache used when producing attestations.
pub(crate) attester_cache: Arc,
/// A cache used when producing attestations whilst the head block is still being imported.
@@ -1165,6 +1155,25 @@ impl BeaconChain {
.map_or_else(|| self.get_blobs(block_root), Ok)
}
+ pub fn get_data_column_checking_all_caches(
+ &self,
+ block_root: Hash256,
+ index: ColumnIndex,
+ ) -> Result