diff --git a/.github/workflows/local-testnet.yml b/.github/workflows/local-testnet.yml
index c6f9c075db..c129c0ec95 100644
--- a/.github/workflows/local-testnet.yml
+++ b/.github/workflows/local-testnet.yml
@@ -14,7 +14,7 @@ concurrency:
jobs:
dockerfile-ubuntu:
- runs-on: ${{ github.repository == 'sigp/lighthouse' && fromJson('["self-hosted", "linux", "CI", "large"]') || 'ubuntu-latest' }}
+ runs-on: ${{ github.repository == 'sigp/lighthouse' && 'warp-ubuntu-latest-x64-8x' || 'ubuntu-latest' }}
steps:
- uses: actions/checkout@v5
@@ -31,7 +31,7 @@ jobs:
retention-days: 3
run-local-testnet:
- runs-on: ubuntu-22.04
+ runs-on: ${{ github.repository == 'sigp/lighthouse' && 'warp-ubuntu-latest-x64-8x' || 'ubuntu-latest' }}
needs: dockerfile-ubuntu
steps:
- uses: actions/checkout@v5
@@ -89,7 +89,7 @@ jobs:
${{ steps.assertoor_test_result.outputs.failed_test_details }}
EOF
)
-
+
echo "Test Result: $test_result"
echo "$test_status"
if ! [ "$test_result" == "success" ]; then
@@ -100,7 +100,7 @@ jobs:
doppelganger-protection-success-test:
needs: dockerfile-ubuntu
- runs-on: ubuntu-22.04
+ runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
@@ -136,7 +136,7 @@ jobs:
doppelganger-protection-failure-test:
needs: dockerfile-ubuntu
- runs-on: ubuntu-22.04
+ runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
@@ -173,7 +173,7 @@ jobs:
# Tests checkpoint syncing to a live network (current fork) and a running devnet (usually next scheduled fork)
checkpoint-sync-test:
name: checkpoint-sync-test-${{ matrix.network }}
- runs-on: ubuntu-latest
+ runs-on: ${{ github.repository == 'sigp/lighthouse' && 'warp-ubuntu-latest-x64-8x' || 'ubuntu-latest' }}
needs: dockerfile-ubuntu
if: contains(github.event.pull_request.labels.*.name, 'syncing')
continue-on-error: true
@@ -216,7 +216,7 @@ jobs:
# Test syncing from genesis on a local testnet. Aims to cover forward syncing both short and long distances.
genesis-sync-test:
name: genesis-sync-test-${{ matrix.fork }}-${{ matrix.offline_secs }}s
- runs-on: ubuntu-latest
+ runs-on: ${{ github.repository == 'sigp/lighthouse' && 'warp-ubuntu-latest-x64-8x' || 'ubuntu-latest' }}
needs: dockerfile-ubuntu
strategy:
matrix:
@@ -259,7 +259,7 @@ jobs:
# a PR is safe to merge. New jobs should be added here.
local-testnet-success:
name: local-testnet-success
- runs-on: ubuntu-latest
+ runs-on: ${{ github.repository == 'sigp/lighthouse' && 'warp-ubuntu-latest-x64-8x' || 'ubuntu-latest' }}
needs: [
'dockerfile-ubuntu',
'run-local-testnet',
@@ -272,4 +272,4 @@ jobs:
- name: Check that success job is dependent on all others
run: |
exclude_jobs='checkpoint-sync-test'
- ./scripts/ci/check-success-job.sh ./.github/workflows/local-testnet.yml local-testnet-success "$exclude_jobs"
+ ./scripts/ci/check-success-job.sh ./.github/workflows/local-testnet.yml local-testnet-success "$exclude_jobs"
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 7c85cdd05c..f7b65f07c9 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -32,8 +32,7 @@ jobs:
matrix:
arch: [aarch64-unknown-linux-gnu,
x86_64-unknown-linux-gnu,
- aarch64-apple-darwin,
- x86_64-windows]
+ aarch64-apple-darwin]
include:
- arch: aarch64-unknown-linux-gnu
runner: ${{ github.repository == 'sigp/lighthouse' && fromJson('["self-hosted", "linux", "release", "large"]') || 'ubuntu-latest' }}
@@ -44,9 +43,6 @@ jobs:
- arch: aarch64-apple-darwin
runner: macos-14
profile: maxperf
- - arch: x86_64-windows
- runner: ${{ github.repository == 'sigp/lighthouse' && fromJson('["self-hosted", "windows", "release"]') || 'windows-2019' }}
- profile: maxperf
runs-on: ${{ matrix.runner }}
needs: extract-version
@@ -57,19 +53,6 @@ jobs:
if: env.SELF_HOSTED_RUNNERS == 'false'
run: rustup update stable
- # ==============================
- # Windows dependencies
- # ==============================
-
- - uses: KyleMayes/install-llvm-action@v1
- if: env.SELF_HOSTED_RUNNERS == 'false' && startsWith(matrix.arch, 'x86_64-windows')
- with:
- version: "17.0"
- directory: ${{ runner.temp }}/llvm
- - name: Set LIBCLANG_PATH
- if: startsWith(matrix.arch, 'x86_64-windows')
- run: echo "LIBCLANG_PATH=$((gcm clang).source -replace "clang.exe")" >> $env:GITHUB_ENV
-
# ==============================
# Builds
# ==============================
@@ -94,12 +77,7 @@ jobs:
if: matrix.arch == 'aarch64-apple-darwin'
run: cargo install --path lighthouse --force --locked --features portable,gnosis --profile ${{ matrix.profile }}
- - name: Build Lighthouse for Windows
- if: matrix.arch == 'x86_64-windows'
- run: cargo install --path lighthouse --force --locked --features portable,gnosis --profile ${{ matrix.profile }}
-
- name: Configure GPG and create artifacts
- if: startsWith(matrix.arch, 'x86_64-windows') != true
env:
GPG_SIGNING_KEY: ${{ secrets.GPG_SIGNING_KEY }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
@@ -118,20 +96,6 @@ jobs:
done
mv *tar.gz* ..
- - name: Configure GPG and create artifacts Windows
- if: startsWith(matrix.arch, 'x86_64-windows')
- env:
- GPG_SIGNING_KEY: ${{ secrets.GPG_SIGNING_KEY }}
- GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
- run: |
- echo $env:GPG_SIGNING_KEY | gpg --batch --import
- mkdir artifacts
- move $env:USERPROFILE/.cargo/bin/lighthouse.exe ./artifacts
- cd artifacts
- tar -czf lighthouse-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.arch }}.tar.gz lighthouse.exe
- gpg --passphrase "$env:GPG_PASSPHRASE" --batch --pinentry-mode loopback -ab lighthouse-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.arch }}.tar.gz
- move *tar.gz* ..
-
# =======================================================================
# Upload artifacts
# This is required to share artifacts between different jobs
@@ -239,7 +203,6 @@ jobs:
|
| aarch64 | [lighthouse-${{ env.VERSION }}-aarch64-apple-darwin.tar.gz](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/lighthouse-${{ env.VERSION }}-aarch64-apple-darwin.tar.gz) | [PGP Signature](https://github.com/${{ env.REPO_NAME }}/releases/download/${{ env.VERSION }}/lighthouse-${{ env.VERSION }}-aarch64-apple-darwin.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) |
|
| 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) |
- |
| 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) |
| | | | |
| **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/.github/workflows/test-suite.yml b/.github/workflows/test-suite.yml
index 0201bf9ae3..cc7282c351 100644
--- a/.github/workflows/test-suite.yml
+++ b/.github/workflows/test-suite.yml
@@ -22,8 +22,6 @@ env:
# NOTE: this token is a personal access token on Jimmy's account due to the default GITHUB_TOKEN
# not having access to other repositories. We should eventually devise a better solution here.
LIGHTHOUSE_GITHUB_TOKEN: ${{ secrets.LIGHTHOUSE_GITHUB_TOKEN }}
- # Enable self-hosted runners for the sigp repo only.
- SELF_HOSTED_RUNNERS: ${{ github.repository == 'sigp/lighthouse' }}
# Disable incremental compilation
CARGO_INCREMENTAL: 0
# Enable portable to prevent issues with caching `blst` for the wrong CPU type
@@ -78,8 +76,7 @@ jobs:
name: release-tests-ubuntu
needs: [check-labels]
if: needs.check-labels.outputs.skip_ci != 'true'
- # Use self-hosted runners only on the sigp repo.
- runs-on: ${{ github.repository == 'sigp/lighthouse' && fromJson('["self-hosted", "linux", "CI", "large"]') || 'ubuntu-latest' }}
+ runs-on: ${{ github.repository == 'sigp/lighthouse' && 'warp-ubuntu-latest-x64-8x' || 'ubuntu-latest' }}
steps:
- uses: actions/checkout@v5
# Set Java version to 21. (required since Web3Signer 24.12.0).
@@ -88,7 +85,6 @@ jobs:
distribution: 'temurin'
java-version: '21'
- name: Get latest version of stable Rust
- if: env.SELF_HOSTED_RUNNERS == 'false'
uses: moonrepo/setup-rust@v1
with:
channel: stable
@@ -97,7 +93,6 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Install Foundry (anvil)
- if: env.SELF_HOSTED_RUNNERS == 'false'
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly-ca67d15f4abd46394b324c50e21e66f306a1162d
@@ -107,50 +102,16 @@ jobs:
if: env.SELF_HOSTED_RUNNERS == 'true'
continue-on-error: true
run: sccache --show-stats
- release-tests-windows:
- name: release-tests-windows
- needs: [check-labels]
- if: needs.check-labels.outputs.skip_ci != 'true'
- runs-on: ${{ github.repository == 'sigp/lighthouse' && fromJson('["self-hosted", "windows", "CI"]') || 'windows-2019' }}
- steps:
- - uses: actions/checkout@v5
- - name: Get latest version of stable Rust
- if: env.SELF_HOSTED_RUNNERS == 'false'
- uses: moonrepo/setup-rust@v1
- with:
- channel: stable
- cache-target: release
- bins: cargo-nextest
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- - name: Install Foundry (anvil)
- if: env.SELF_HOSTED_RUNNERS == 'false'
- uses: foundry-rs/foundry-toolchain@v1
- with:
- version: nightly-ca67d15f4abd46394b324c50e21e66f306a1162d
- - name: Install make
- if: env.SELF_HOSTED_RUNNERS == 'false'
- run: choco install -y make
- - name: Set LIBCLANG_PATH
- run: echo "LIBCLANG_PATH=$((gcm clang).source -replace "clang.exe")" >> $env:GITHUB_ENV
- - name: Run tests in release
- run: make test-release
- - name: Show cache stats
- if: env.SELF_HOSTED_RUNNERS == 'true'
- continue-on-error: true
- run: sccache --show-stats
beacon-chain-tests:
name: beacon-chain-tests
needs: [check-labels]
if: needs.check-labels.outputs.skip_ci != 'true'
- # Use self-hosted runners only on the sigp repo.
- runs-on: ${{ github.repository == 'sigp/lighthouse' && fromJson('["self-hosted", "linux", "CI", "large"]') || 'ubuntu-latest' }}
+ runs-on: ${{ github.repository == 'sigp/lighthouse' && 'warp-ubuntu-latest-x64-8x' || 'ubuntu-latest' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v5
- name: Get latest version of stable Rust
- if: env.SELF_HOSTED_RUNNERS == 'false'
uses: moonrepo/setup-rust@v1
with:
channel: stable
@@ -158,22 +119,16 @@ jobs:
bins: cargo-nextest
- name: Run beacon_chain tests for all known forks
run: make test-beacon-chain
- - name: Show cache stats
- if: env.SELF_HOSTED_RUNNERS == 'true'
- continue-on-error: true
- run: sccache --show-stats
http-api-tests:
name: http-api-tests
needs: [check-labels]
if: needs.check-labels.outputs.skip_ci != 'true'
- # Use self-hosted runners only on the sigp repo.
- runs-on: ${{ github.repository == 'sigp/lighthouse' && fromJson('["self-hosted", "linux", "CI", "large"]') || 'ubuntu-latest' }}
+ runs-on: ${{ github.repository == 'sigp/lighthouse' && 'warp-ubuntu-latest-x64-8x' || 'ubuntu-latest' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v5
- name: Get latest version of stable Rust
- if: env.SELF_HOSTED_RUNNERS == 'false'
uses: moonrepo/setup-rust@v1
with:
channel: stable
@@ -181,10 +136,6 @@ jobs:
bins: cargo-nextest
- name: Run http_api tests for all recent forks
run: make test-http-api
- - name: Show cache stats
- if: env.SELF_HOSTED_RUNNERS == 'true'
- continue-on-error: true
- run: sccache --show-stats
op-pool-tests:
name: op-pool-tests
needs: [check-labels]
@@ -252,29 +203,22 @@ jobs:
name: debug-tests-ubuntu
needs: [check-labels]
if: needs.check-labels.outputs.skip_ci != 'true'
- # Use self-hosted runners only on the sigp repo.
- runs-on: ${{ github.repository == 'sigp/lighthouse' && fromJson('["self-hosted", "linux", "CI", "large"]') || 'ubuntu-latest' }}
+ runs-on: ${{ github.repository == 'sigp/lighthouse' && 'warp-ubuntu-latest-x64-8x' || 'ubuntu-latest' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v5
- name: Get latest version of stable Rust
- if: env.SELF_HOSTED_RUNNERS == 'false'
uses: moonrepo/setup-rust@v1
with:
channel: stable
bins: cargo-nextest
- name: Install Foundry (anvil)
- if: env.SELF_HOSTED_RUNNERS == 'false'
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly-ca67d15f4abd46394b324c50e21e66f306a1162d
- name: Run tests in debug
run: make test-debug
- - name: Show cache stats
- if: env.SELF_HOSTED_RUNNERS == 'true'
- continue-on-error: true
- run: sccache --show-stats
state-transition-vectors-ubuntu:
name: state-transition-vectors-ubuntu
needs: [check-labels]
@@ -293,14 +237,12 @@ jobs:
name: ef-tests-ubuntu
needs: [check-labels]
if: needs.check-labels.outputs.skip_ci != 'true'
- # Use self-hosted runners only on the sigp repo.
- runs-on: ${{ github.repository == 'sigp/lighthouse' && fromJson('["self-hosted", "linux", "CI", "small"]') || 'ubuntu-latest' }}
+ runs-on: ${{ github.repository == 'sigp/lighthouse' && 'warp-ubuntu-latest-x64-8x' || 'ubuntu-latest' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v5
- name: Get latest version of stable Rust
- if: env.SELF_HOSTED_RUNNERS == 'false'
uses: moonrepo/setup-rust@v1
with:
channel: stable
@@ -308,10 +250,6 @@ jobs:
bins: cargo-nextest
- name: Run consensus-spec-tests with blst and fake_crypto
run: make test-ef
- - name: Show cache stats
- if: env.SELF_HOSTED_RUNNERS == 'true'
- continue-on-error: true
- run: sccache --show-stats
basic-simulator-ubuntu:
name: basic-simulator-ubuntu
needs: [check-labels]
@@ -360,11 +298,10 @@ jobs:
name: execution-engine-integration-ubuntu
needs: [check-labels]
if: needs.check-labels.outputs.skip_ci != 'true'
- runs-on: ${{ github.repository == 'sigp/lighthouse' && fromJson('["self-hosted", "linux", "CI", "small"]') || 'ubuntu-latest' }}
+ runs-on: ${{ github.repository == 'sigp/lighthouse' && 'warp-ubuntu-latest-x64-8x' || 'ubuntu-latest' }}
steps:
- uses: actions/checkout@v5
- name: Get latest version of stable Rust
- if: env.SELF_HOSTED_RUNNERS == 'false'
uses: moonrepo/setup-rust@v1
with:
channel: stable
@@ -372,9 +309,6 @@ jobs:
cache: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- - name: Add go compiler to $PATH
- if: env.SELF_HOSTED_RUNNERS == 'true'
- run: echo "/usr/local/go/bin" >> $GITHUB_PATH
- name: Run exec engine integration tests in release
run: make test-exec-engine
check-code:
@@ -501,7 +435,6 @@ jobs:
'check-labels',
'target-branch-check',
'release-tests-ubuntu',
- 'release-tests-windows',
'beacon-chain-tests',
'op-pool-tests',
'network-tests',
diff --git a/Cargo.lock b/Cargo.lock
index 676f674b1b..e045c8697f 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -862,7 +862,7 @@ dependencies = [
"bitvec 1.0.1",
"bls",
"criterion",
- "derivative",
+ "educe",
"eth2",
"eth2_network_config",
"ethereum_hashing",
@@ -2236,7 +2236,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f55bf8e7b65898637379c1b74eb1551107c8294ed26d855ceb9fd1a09cfc9bc0"
dependencies = [
"const-oid",
- "pem-rfc7468",
"zeroize",
]
@@ -2544,7 +2543,7 @@ dependencies = [
"bls",
"compare_fields",
"context_deserialize",
- "derivative",
+ "educe",
"eth2_network_config",
"ethereum_ssz",
"ethereum_ssz_derive",
@@ -2722,7 +2721,6 @@ dependencies = [
"ff 0.13.1",
"generic-array 0.14.7",
"group 0.13.0",
- "pem-rfc7468",
"pkcs8 0.10.2",
"rand_core 0.6.4",
"sec1 0.7.3",
@@ -2864,7 +2862,7 @@ dependencies = [
name = "eth2"
version = "0.1.0"
dependencies = [
- "derivative",
+ "educe",
"eip_3076",
"either",
"enr",
@@ -5016,7 +5014,7 @@ dependencies = [
"arbitrary",
"c-kzg",
"criterion",
- "derivative",
+ "educe",
"ethereum_hashing",
"ethereum_serde_utils",
"ethereum_ssz",
@@ -5300,10 +5298,8 @@ dependencies = [
"hkdf",
"k256 0.13.4",
"multihash",
- "p256",
"quick-protobuf",
"rand 0.8.5",
- "sec1 0.7.3",
"sha2 0.10.8",
"thiserror 2.0.12",
"tracing",
@@ -6313,7 +6309,7 @@ dependencies = [
"beacon_processor",
"bls",
"delay_map",
- "derivative",
+ "educe",
"eth2",
"eth2_network_config",
"ethereum_ssz",
@@ -6749,7 +6745,7 @@ version = "0.2.0"
dependencies = [
"beacon_chain",
"bitvec 1.0.1",
- "derivative",
+ "educe",
"ethereum_ssz",
"ethereum_ssz_derive",
"itertools 0.10.5",
@@ -6774,18 +6770,6 @@ dependencies = [
"num-traits",
]
-[[package]]
-name = "p256"
-version = "0.13.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c9863ad85fa8f4460f9c48cb909d38a0d689dba1f6f6988a5e3e0d31071bcd4b"
-dependencies = [
- "ecdsa 0.16.9",
- "elliptic-curve 0.13.8",
- "primeorder",
- "sha2 0.10.8",
-]
-
[[package]]
name = "pairing"
version = "0.23.0"
@@ -6951,15 +6935,6 @@ dependencies = [
"serde",
]
-[[package]]
-name = "pem-rfc7468"
-version = "0.7.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "88b39c9bfcfc231068454382784bb460aae594343fb030d46e9f50a645418412"
-dependencies = [
- "base64ct",
-]
-
[[package]]
name = "percent-encoding"
version = "2.3.1"
@@ -7182,15 +7157,6 @@ dependencies = [
"syn 2.0.100",
]
-[[package]]
-name = "primeorder"
-version = "0.13.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "353e1ca18966c16d9deb1c69278edbc5f194139612772bd9537af60ac231e1e6"
-dependencies = [
- "elliptic-curve 0.13.8",
-]
-
[[package]]
name = "primitive-types"
version = "0.10.1"
@@ -8483,6 +8449,8 @@ checksum = "cd0b0ec5f1c1ca621c432a25813d8d60c88abe6d3e08a3eb9cf37d97a0fe3d73"
[[package]]
name = "sensitive_url"
version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "eb7b0221fa9905eec4163dbf7660b1876cc95663af1deddc3e19ebe49167c58c"
dependencies = [
"serde",
"url",
@@ -8780,7 +8748,7 @@ version = "0.1.0"
dependencies = [
"bincode",
"byteorder",
- "derivative",
+ "educe",
"ethereum_ssz",
"ethereum_ssz_derive",
"filesystem",
@@ -8949,7 +8917,7 @@ dependencies = [
"arbitrary",
"beacon_chain",
"bls",
- "derivative",
+ "educe",
"ethereum_hashing",
"ethereum_ssz",
"ethereum_ssz_derive",
@@ -9887,7 +9855,7 @@ dependencies = [
"compare_fields",
"context_deserialize",
"criterion",
- "derivative",
+ "educe",
"eth2_interop_keypairs",
"ethereum_hashing",
"ethereum_serde_utils",
@@ -10131,7 +10099,7 @@ version = "0.1.0"
dependencies = [
"bls",
"deposit_contract",
- "derivative",
+ "educe",
"eth2_keystore",
"filesystem",
"hex",
@@ -10219,7 +10187,7 @@ dependencies = [
"beacon_chain",
"clap",
"clap_utils",
- "derivative",
+ "educe",
"environment",
"eth2",
"eth2_network_config",
diff --git a/Cargo.toml b/Cargo.toml
index 1dfc753b8c..15fea466f0 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -39,7 +39,6 @@ members = [
"common/network_utils",
"common/oneshot_broadcast",
"common/pretty_reqwest_error",
- "common/sensitive_url",
"common/slot_clock",
"common/system_health",
"common/target_check",
@@ -129,11 +128,11 @@ context_deserialize_derive = { path = "consensus/context_deserialize/context_des
criterion = "0.5"
delay_map = "0.4"
deposit_contract = { path = "common/deposit_contract" }
-derivative = "2"
directory = { path = "common/directory" }
dirs = "3"
discv5 = { version = "0.10", features = ["libp2p"] }
doppelganger_service = { path = "validator_client/doppelganger_service" }
+educe = "0.6"
eip_3076 = { path = "common/eip_3076" }
either = "1.9"
environment = { path = "lighthouse/environment" }
@@ -225,7 +224,7 @@ rpds = "0.11"
rusqlite = { version = "0.28", features = ["bundled"] }
rust_eth_kzg = "0.9"
safe_arith = "0.1"
-sensitive_url = { path = "common/sensitive_url" }
+sensitive_url = { version = "0.1", features = ["serde"] }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
serde_repr = "0.1"
diff --git a/beacon_node/beacon_chain/Cargo.toml b/beacon_node/beacon_chain/Cargo.toml
index dca351cbac..e889f53bb0 100644
--- a/beacon_node/beacon_chain/Cargo.toml
+++ b/beacon_node/beacon_chain/Cargo.toml
@@ -18,7 +18,7 @@ test_backfill = []
alloy-primitives = { workspace = true }
bitvec = { workspace = true }
bls = { workspace = true }
-derivative = { workspace = true }
+educe = { workspace = true }
eth2 = { workspace = true }
eth2_network_config = { workspace = true }
ethereum_hashing = { workspace = true }
diff --git a/beacon_node/beacon_chain/src/beacon_chain.rs b/beacon_node/beacon_chain/src/beacon_chain.rs
index 3568c30207..0bad3198e9 100644
--- a/beacon_node/beacon_chain/src/beacon_chain.rs
+++ b/beacon_node/beacon_chain/src/beacon_chain.rs
@@ -883,6 +883,12 @@ impl BeaconChain {
return Ok(None);
}
+ // Fast-path for the split slot (which usually corresponds to the finalized slot).
+ let split = self.store.get_split_info();
+ if request_slot == split.slot {
+ return Ok(Some(split.state_root));
+ }
+
// Try an optimized path of reading the root directly from the head state.
let fast_lookup: Option = self.with_head(|head| {
if head.beacon_block.slot() <= request_slot {
diff --git a/beacon_node/beacon_chain/src/beacon_fork_choice_store.rs b/beacon_node/beacon_chain/src/beacon_fork_choice_store.rs
index 440388661c..0c203009bb 100644
--- a/beacon_node/beacon_chain/src/beacon_fork_choice_store.rs
+++ b/beacon_node/beacon_chain/src/beacon_fork_choice_store.rs
@@ -5,7 +5,7 @@
//! reads when fork choice requires the validator balances of the justified state.
use crate::{BeaconSnapshot, metrics};
-use derivative::Derivative;
+use educe::Educe;
use fork_choice::ForkChoiceStore;
use proto_array::JustifiedBalances;
use safe_arith::ArithError;
@@ -127,10 +127,10 @@ impl BalancesCache {
/// Implements `fork_choice::ForkChoiceStore` in order to provide a persistent backing to the
/// `fork_choice::ForkChoice` struct.
-#[derive(Debug, Derivative)]
-#[derivative(PartialEq(bound = "E: EthSpec, Hot: ItemStore, Cold: ItemStore"))]
+#[derive(Debug, Educe)]
+#[educe(PartialEq(bound(E: EthSpec, Hot: ItemStore, Cold: ItemStore)))]
pub struct BeaconForkChoiceStore, Cold: ItemStore> {
- #[derivative(PartialEq = "ignore")]
+ #[educe(PartialEq(ignore))]
store: Arc>,
balances_cache: BalancesCache,
time: Slot,
diff --git a/beacon_node/beacon_chain/src/blob_verification.rs b/beacon_node/beacon_chain/src/blob_verification.rs
index 53f2eff0ca..874673b52e 100644
--- a/beacon_node/beacon_chain/src/blob_verification.rs
+++ b/beacon_node/beacon_chain/src/blob_verification.rs
@@ -1,4 +1,4 @@
-use derivative::Derivative;
+use educe::Educe;
use slot_clock::SlotClock;
use std::marker::PhantomData;
use std::sync::Arc;
@@ -245,8 +245,8 @@ impl GossipVerifiedBlob {
/// Wrapper over a `BlobSidecar` for which we have completed kzg verification.
/// i.e. `verify_blob_kzg_proof(blob, commitment, proof) == true`.
-#[derive(Debug, Derivative, Clone, Encode, Decode)]
-#[derivative(PartialEq, Eq)]
+#[derive(Debug, Educe, Clone, Encode, Decode)]
+#[educe(PartialEq, Eq)]
#[ssz(struct_behaviour = "transparent")]
pub struct KzgVerifiedBlob {
blob: Arc>,
diff --git a/beacon_node/beacon_chain/src/block_verification.rs b/beacon_node/beacon_chain/src/block_verification.rs
index 691293b200..1ddc51cc35 100644
--- a/beacon_node/beacon_chain/src/block_verification.rs
+++ b/beacon_node/beacon_chain/src/block_verification.rs
@@ -66,7 +66,7 @@ use crate::{
beacon_chain::{BeaconForkChoice, ForkChoiceError},
metrics,
};
-use derivative::Derivative;
+use educe::Educe;
use eth2::types::{BlockGossip, EventKind};
use execution_layer::PayloadStatus;
pub use fork_choice::{AttestationFromBlock, PayloadVerificationStatus};
@@ -689,8 +689,8 @@ pub fn signature_verify_chain_segment(
/// A wrapper around a `SignedBeaconBlock` that indicates it has been approved for re-gossiping on
/// the p2p network.
-#[derive(Derivative)]
-#[derivative(Debug(bound = "T: BeaconChainTypes"))]
+#[derive(Educe)]
+#[educe(Debug(bound(T: BeaconChainTypes)))]
pub struct GossipVerifiedBlock {
pub block: Arc>,
pub block_root: Hash256,
diff --git a/beacon_node/beacon_chain/src/block_verification_types.rs b/beacon_node/beacon_chain/src/block_verification_types.rs
index 1a0b188fdc..5978e97c4d 100644
--- a/beacon_node/beacon_chain/src/block_verification_types.rs
+++ b/beacon_node/beacon_chain/src/block_verification_types.rs
@@ -2,7 +2,7 @@ use crate::data_availability_checker::AvailabilityCheckError;
pub use crate::data_availability_checker::{AvailableBlock, MaybeAvailableBlock};
use crate::data_column_verification::{CustodyDataColumn, CustodyDataColumnList};
use crate::{PayloadVerificationOutcome, get_block_root};
-use derivative::Derivative;
+use educe::Educe;
use ssz_types::VariableList;
use state_processing::ConsensusContext;
use std::fmt::{Debug, Formatter};
@@ -26,8 +26,8 @@ use types::{
/// Note: We make a distinction over blocks received over gossip because
/// in a post-deneb world, the blobs corresponding to a given block that are received
/// over rpc do not contain the proposer signature for dos resistance.
-#[derive(Clone, Derivative)]
-#[derivative(Hash(bound = "E: EthSpec"))]
+#[derive(Clone, Educe)]
+#[educe(Hash(bound(E: EthSpec)))]
pub struct RpcBlock {
block_root: Hash256,
block: RpcBlockInner,
@@ -80,8 +80,8 @@ impl RpcBlock {
/// Note: This variant is intentionally private because we want to safely construct the
/// internal variants after applying consistency checks to ensure that the block and blobs
/// are consistent with respect to each other.
-#[derive(Debug, Clone, Derivative)]
-#[derivative(Hash(bound = "E: EthSpec"))]
+#[derive(Debug, Clone, Educe)]
+#[educe(Hash(bound(E: EthSpec)))]
enum RpcBlockInner {
/// Single block lookup response. This should potentially hit the data availability cache.
Block(Arc>),
diff --git a/beacon_node/beacon_chain/src/data_column_verification.rs b/beacon_node/beacon_chain/src/data_column_verification.rs
index 7a8066351a..b998602566 100644
--- a/beacon_node/beacon_chain/src/data_column_verification.rs
+++ b/beacon_node/beacon_chain/src/data_column_verification.rs
@@ -4,7 +4,7 @@ use crate::block_verification::{
use crate::kzg_utils::{reconstruct_data_columns, validate_data_columns};
use crate::observed_data_sidecars::{ObservationStrategy, Observe};
use crate::{BeaconChain, BeaconChainError, BeaconChainTypes, metrics};
-use derivative::Derivative;
+use educe::Educe;
use fork_choice::ProtoBlock;
use kzg::{Error as KzgError, Kzg};
use proto_array::Block;
@@ -296,8 +296,8 @@ impl GossipVerifiedDataColumn
}
/// Wrapper over a `DataColumnSidecar` for which we have completed kzg verification.
-#[derive(Debug, Derivative, Clone, Encode, Decode)]
-#[derivative(PartialEq, Eq)]
+#[derive(Debug, Educe, Clone, Encode, Decode)]
+#[educe(PartialEq, Eq)]
#[ssz(struct_behaviour = "transparent")]
pub struct KzgVerifiedDataColumn {
data: Arc>,
@@ -353,8 +353,8 @@ pub type CustodyDataColumnList =
VariableList, ::NumberOfColumns>;
/// Data column that we must custody
-#[derive(Debug, Derivative, Clone, Encode, Decode)]
-#[derivative(PartialEq, Eq, Hash(bound = "E: EthSpec"))]
+#[derive(Debug, Educe, Clone, Encode, Decode)]
+#[educe(PartialEq, Eq, Hash(bound(E: EthSpec)))]
#[ssz(struct_behaviour = "transparent")]
pub struct CustodyDataColumn {
data: Arc>,
@@ -383,8 +383,8 @@ impl CustodyDataColumn {
}
/// Data column that we must custody and has completed kzg verification
-#[derive(Debug, Derivative, Clone, Encode, Decode)]
-#[derivative(PartialEq, Eq)]
+#[derive(Debug, Educe, Clone, Encode, Decode)]
+#[educe(PartialEq, Eq)]
#[ssz(struct_behaviour = "transparent")]
pub struct KzgVerifiedCustodyDataColumn {
data: Arc>,
diff --git a/beacon_node/beacon_chain/src/light_client_finality_update_verification.rs b/beacon_node/beacon_chain/src/light_client_finality_update_verification.rs
index fe62b8ef90..2dc4de7d04 100644
--- a/beacon_node/beacon_chain/src/light_client_finality_update_verification.rs
+++ b/beacon_node/beacon_chain/src/light_client_finality_update_verification.rs
@@ -1,5 +1,5 @@
use crate::{BeaconChain, BeaconChainTypes};
-use derivative::Derivative;
+use educe::Educe;
use slot_clock::SlotClock;
use std::time::Duration;
use strum::AsRefStr;
@@ -55,8 +55,8 @@ pub enum Error {
}
/// Wraps a `LightClientFinalityUpdate` that has been verified for propagation on the gossip network.
-#[derive(Derivative)]
-#[derivative(Clone(bound = "T: BeaconChainTypes"))]
+#[derive(Educe)]
+#[educe(Clone(bound(T: BeaconChainTypes)))]
pub struct VerifiedLightClientFinalityUpdate {
light_client_finality_update: LightClientFinalityUpdate,
seen_timestamp: Duration,
diff --git a/beacon_node/beacon_chain/src/light_client_optimistic_update_verification.rs b/beacon_node/beacon_chain/src/light_client_optimistic_update_verification.rs
index b59390ea0c..4079a374f8 100644
--- a/beacon_node/beacon_chain/src/light_client_optimistic_update_verification.rs
+++ b/beacon_node/beacon_chain/src/light_client_optimistic_update_verification.rs
@@ -1,5 +1,5 @@
use crate::{BeaconChain, BeaconChainTypes};
-use derivative::Derivative;
+use educe::Educe;
use eth2::types::Hash256;
use slot_clock::SlotClock;
use std::time::Duration;
@@ -49,8 +49,8 @@ pub enum Error {
}
/// Wraps a `LightClientOptimisticUpdate` that has been verified for propagation on the gossip network.
-#[derive(Derivative)]
-#[derivative(Clone(bound = "T: BeaconChainTypes"))]
+#[derive(Educe)]
+#[educe(Clone(bound(T: BeaconChainTypes)))]
pub struct VerifiedLightClientOptimisticUpdate {
light_client_optimistic_update: LightClientOptimisticUpdate,
pub parent_root: Hash256,
diff --git a/beacon_node/beacon_chain/src/metrics.rs b/beacon_node/beacon_chain/src/metrics.rs
index 8f1da7b67b..e6557c7a27 100644
--- a/beacon_node/beacon_chain/src/metrics.rs
+++ b/beacon_node/beacon_chain/src/metrics.rs
@@ -1185,7 +1185,7 @@ pub static VALIDATOR_MONITOR_UNAGGREGATED_ATTESTATION_DELAY_SECONDS: LazyLock<
> = LazyLock::new(|| {
try_create_histogram_vec(
"validator_monitor_unaggregated_attestation_delay_seconds",
- "The delay between when the validator should send the attestation and when it was received.",
+ "The delay between when the validator sent the attestation and the start of the slot.",
&["src", "validator"],
)
});
diff --git a/beacon_node/beacon_chain/src/observed_operations.rs b/beacon_node/beacon_chain/src/observed_operations.rs
index 49614c5b54..4ca5371242 100644
--- a/beacon_node/beacon_chain/src/observed_operations.rs
+++ b/beacon_node/beacon_chain/src/observed_operations.rs
@@ -1,4 +1,4 @@
-use derivative::Derivative;
+use educe::Educe;
use smallvec::{SmallVec, smallvec};
use state_processing::{SigVerifiedOp, TransformPersist, VerifyOperation, VerifyOperationAt};
use std::collections::HashSet;
@@ -14,8 +14,8 @@ pub const SMALL_VEC_SIZE: usize = 8;
/// Stateful tracker for exit/slashing operations seen on the network.
///
/// Implements the conditions for gossip verification of exits and slashings from the P2P spec.
-#[derive(Debug, Derivative)]
-#[derivative(Default(bound = "T: ObservableOperation, E: EthSpec"))]
+#[derive(Debug, Educe)]
+#[educe(Default(bound(T: ObservableOperation, E: EthSpec)))]
pub struct ObservedOperations, E: EthSpec> {
/// Indices of validators for whom we have already seen an instance of an operation `T`.
///
@@ -26,7 +26,7 @@ pub struct ObservedOperations, E: EthSpec> {
/// `attestation_1.attester_indices` and `attestation_2.attester_indices`.
observed_validator_indices: HashSet,
/// The name of the current fork. The default will be overwritten on first use.
- #[derivative(Default(value = "ForkName::Base"))]
+ #[educe(Default(expression = ForkName::Base))]
current_fork: ForkName,
_phantom: PhantomData<(T, E)>,
}
diff --git a/beacon_node/beacon_chain/src/sync_committee_verification.rs b/beacon_node/beacon_chain/src/sync_committee_verification.rs
index 41d29d5526..e72e9a6b21 100644
--- a/beacon_node/beacon_chain/src/sync_committee_verification.rs
+++ b/beacon_node/beacon_chain/src/sync_committee_verification.rs
@@ -31,7 +31,7 @@ use crate::{
BeaconChain, BeaconChainError, BeaconChainTypes, metrics, observed_aggregates::ObserveOutcome,
};
use bls::{PublicKeyBytes, verify_signature_sets};
-use derivative::Derivative;
+use educe::Educe;
use safe_arith::ArithError;
use slot_clock::SlotClock;
use ssz_derive::{Decode, Encode};
@@ -261,8 +261,8 @@ impl From for Error {
}
/// Wraps a `SignedContributionAndProof` that has been verified for propagation on the gossip network.\
-#[derive(Derivative)]
-#[derivative(Clone(bound = "T: BeaconChainTypes"))]
+#[derive(Educe)]
+#[educe(Clone(bound(T: BeaconChainTypes)))]
pub struct VerifiedSyncContribution {
signed_aggregate: SignedContributionAndProof,
participant_pubkeys: Vec,
diff --git a/beacon_node/beacon_chain/src/validator_monitor.rs b/beacon_node/beacon_chain/src/validator_monitor.rs
index 00c30e5ab1..ba06d5da4e 100644
--- a/beacon_node/beacon_chain/src/validator_monitor.rs
+++ b/beacon_node/beacon_chain/src/validator_monitor.rs
@@ -1214,7 +1214,7 @@ impl ValidatorMonitor {
let delay = get_message_delay_ms(
seen_timestamp,
data.slot,
- slot_clock.unagg_attestation_production_delay(),
+ Duration::from_secs(0),
slot_clock,
);
diff --git a/beacon_node/beacon_chain/tests/store_tests.rs b/beacon_node/beacon_chain/tests/store_tests.rs
index 88e4ee6956..fa7bd0e757 100644
--- a/beacon_node/beacon_chain/tests/store_tests.rs
+++ b/beacon_node/beacon_chain/tests/store_tests.rs
@@ -3159,6 +3159,10 @@ async fn weak_subjectivity_sync_test(
.get_state(&state_root, Some(slot), CACHE_STATE_IN_TESTS)
.unwrap()
.unwrap();
+ assert_eq!(
+ state_root,
+ beacon_chain.state_root_at_slot(slot).unwrap().unwrap()
+ );
assert_eq!(state.slot(), slot);
assert_eq!(state.canonical_root().unwrap(), state_root);
}
diff --git a/beacon_node/builder_client/src/lib.rs b/beacon_node/builder_client/src/lib.rs
index 6b993542f3..b486e77083 100644
--- a/beacon_node/builder_client/src/lib.rs
+++ b/beacon_node/builder_client/src/lib.rs
@@ -270,7 +270,7 @@ impl BuilderHttpClient {
&self,
validator: &[SignedValidatorRegistrationData],
) -> Result<(), Error> {
- let mut path = self.server.full.clone();
+ let mut path = self.server.expose_full().clone();
path.path_segments_mut()
.map_err(|()| Error::InvalidUrl(self.server.clone()))?
@@ -289,7 +289,7 @@ impl BuilderHttpClient {
&self,
blinded_block: &SignedBlindedBeaconBlock,
) -> Result, Error> {
- let mut path = self.server.full.clone();
+ let mut path = self.server.expose_full().clone();
let body = blinded_block.as_ssz_bytes();
@@ -337,7 +337,7 @@ impl BuilderHttpClient {
&self,
blinded_block: &SignedBlindedBeaconBlock,
) -> Result<(), Error> {
- let mut path = self.server.full.clone();
+ let mut path = self.server.expose_full().clone();
let body = blinded_block.as_ssz_bytes();
@@ -387,7 +387,7 @@ impl BuilderHttpClient {
&self,
blinded_block: &SignedBlindedBeaconBlock,
) -> Result>, Error> {
- let mut path = self.server.full.clone();
+ let mut path = self.server.expose_full().clone();
path.path_segments_mut()
.map_err(|()| Error::InvalidUrl(self.server.clone()))?
@@ -430,7 +430,7 @@ impl BuilderHttpClient {
&self,
blinded_block: &SignedBlindedBeaconBlock,
) -> Result<(), Error> {
- let mut path = self.server.full.clone();
+ let mut path = self.server.expose_full().clone();
path.path_segments_mut()
.map_err(|()| Error::InvalidUrl(self.server.clone()))?
@@ -480,7 +480,7 @@ impl BuilderHttpClient {
parent_hash: ExecutionBlockHash,
pubkey: &PublicKeyBytes,
) -> Result