diff --git a/.github/workflows/local-testnet.yml b/.github/workflows/local-testnet.yml
index 42293d38a79..bcade948d79 100644
--- a/.github/workflows/local-testnet.yml
+++ b/.github/workflows/local-testnet.yml
@@ -13,87 +13,154 @@ concurrency:
cancel-in-progress: true
jobs:
- run-local-testnet:
- strategy:
- matrix:
- os:
- - ubuntu-22.04
- - macos-12
- runs-on: ${{ matrix.os }}
- env:
- # Enable portable to prevent issues with caching `blst` for the wrong CPU type
- FEATURES: portable,jemalloc
+ dockerfile-ubuntu:
+ runs-on: ${{ github.repository == 'sigp/lighthouse' && fromJson('["self-hosted", "linux", "CI", "large"]') || 'ubuntu-latest' }}
steps:
- uses: actions/checkout@v4
- - name: Get latest version of stable Rust
- run: rustup update stable
- - name: Install geth (ubuntu)
- if: matrix.os == 'ubuntu-22.04'
- run: |
- sudo add-apt-repository -y ppa:ethereum/ethereum
- sudo apt-get update
- sudo apt-get install ethereum
- - name: Install geth (mac)
- if: matrix.os == 'macos-12'
+ - name: Build Docker image
run: |
- brew tap ethereum/ethereum
- brew install ethereum
- - name: Install GNU sed & GNU grep
- if: matrix.os == 'macos-12'
+ docker build --build-arg FEATURES=portable -t lighthouse:local .
+ docker save lighthouse:local -o lighthouse-docker.tar
+
+ - name: Upload Docker image artifact
+ uses: actions/upload-artifact@v4
+ with:
+ name: lighthouse-docker
+ path: lighthouse-docker.tar
+ retention-days: 3
+
+ run-local-testnet:
+ runs-on: ubuntu-22.04
+ needs: dockerfile-ubuntu
+ steps:
+ - uses: actions/checkout@v4
+
+ - name: Install dependencies
run: |
- brew install gnu-sed grep
- echo "$(brew --prefix)/opt/gnu-sed/libexec/gnubin" >> $GITHUB_PATH
- echo "$(brew --prefix)/opt/grep/libexec/gnubin" >> $GITHUB_PATH
- # https://github.com/actions/cache/blob/main/examples.md#rust---cargo
- - uses: actions/cache@v4
- id: cache-cargo
+ sudo add-apt-repository ppa:rmescandon/yq
+ echo "deb [trusted=yes] https://apt.fury.io/kurtosis-tech/ /" | sudo tee /etc/apt/sources.list.d/kurtosis.list
+ sudo apt update
+ sudo apt install -y kurtosis-cli yq
+ kurtosis analytics disable
+
+ - name: Download Docker image artifact
+ uses: actions/download-artifact@v4
with:
- path: |
- ~/.cargo/bin/
- ~/.cargo/registry/index/
- ~/.cargo/registry/cache/
- ~/.cargo/git/db/
- target/
- key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
+ name: lighthouse-docker
+ path: .
- - name: Install lighthouse
- run: make && make install-lcli
+ - name: Load Docker image
+ run: docker load -i lighthouse-docker.tar
- name: Start local testnet
- run: ./start_local_testnet.sh genesis.json && sleep 60
+ run: ./start_local_testnet.sh -e local -c -b false && sleep 60
working-directory: scripts/local_testnet
- - name: Print logs
- run: ./dump_logs.sh
+ - name: Stop local testnet and dump logs
+ run: ./stop_local_testnet.sh local
working-directory: scripts/local_testnet
- - name: Stop local testnet
- run: ./stop_local_testnet.sh
+ - name: Start local testnet with blinded block production
+ run: ./start_local_testnet.sh -e local-blinded -c -p -b false && sleep 60
working-directory: scripts/local_testnet
- - name: Clean-up testnet
- run: ./clean.sh
+ - name: Stop local testnet and dump logs
+ run: ./stop_local_testnet.sh local-blinded
working-directory: scripts/local_testnet
- - name: Start local testnet with blinded block production
- run: ./start_local_testnet.sh -p genesis.json && sleep 60
- working-directory: scripts/local_testnet
+ - name: Upload logs artifact
+ uses: actions/upload-artifact@v4
+ with:
+ name: logs-local-testnet
+ path: |
+ scripts/local_testnet/logs
+ retention-days: 3
- - name: Print logs for blinded block testnet
- run: ./dump_logs.sh
- working-directory: scripts/local_testnet
+ doppelganger-protection-success-test:
+ needs: dockerfile-ubuntu
+ runs-on: ubuntu-22.04
+ steps:
+ - uses: actions/checkout@v4
+
+ - name: Install dependencies
+ run: |
+ sudo add-apt-repository ppa:rmescandon/yq
+ echo "deb [trusted=yes] https://apt.fury.io/kurtosis-tech/ /" | sudo tee /etc/apt/sources.list.d/kurtosis.list
+ sudo apt update
+ sudo apt install -y kurtosis-cli yq
+ kurtosis analytics disable
+
+ - name: Download Docker image artifact
+ uses: actions/download-artifact@v4
+ with:
+ name: lighthouse-docker
+ path: .
+
+ - name: Load Docker image
+ run: docker load -i lighthouse-docker.tar
+
+ - name: Run the doppelganger protection success test script
+ run: |
+ ./doppelganger_protection.sh success
+ working-directory: scripts/tests
+
+ - name: Upload logs artifact
+ uses: actions/upload-artifact@v4
+ with:
+ name: logs-doppelganger-protection-success
+ path: |
+ scripts/local_testnet/logs
+ retention-days: 3
+
+ doppelganger-protection-failure-test:
+ needs: dockerfile-ubuntu
+ runs-on: ubuntu-22.04
+ steps:
+ - uses: actions/checkout@v4
+
+ - name: Install dependencies
+ run: |
+ sudo add-apt-repository ppa:rmescandon/yq
+ echo "deb [trusted=yes] https://apt.fury.io/kurtosis-tech/ /" | sudo tee /etc/apt/sources.list.d/kurtosis.list
+ sudo apt update
+ sudo apt install -y kurtosis-cli yq
+ kurtosis analytics disable
+
+ - name: Download Docker image artifact
+ uses: actions/download-artifact@v4
+ with:
+ name: lighthouse-docker
+ path: .
+
+ - name: Load Docker image
+ run: docker load -i lighthouse-docker.tar
+
+ - name: Run the doppelganger protection failure test script
+ run: |
+ ./doppelganger_protection.sh failure
+ working-directory: scripts/tests
+
+ - name: Upload logs artifact
+ uses: actions/upload-artifact@v4
+ with:
+ name: logs-doppelganger-protection-failure
+ path: |
+ scripts/local_testnet/logs
+ retention-days: 3
- - name: Stop local testnet with blinded block production
- run: ./stop_local_testnet.sh
- working-directory: scripts/local_testnet
# This job succeeds ONLY IF all others succeed. It is used by the merge queue to determine whether
# a PR is safe to merge. New jobs should be added here.
local-testnet-success:
name: local-testnet-success
runs-on: ubuntu-latest
- needs: ["run-local-testnet"]
+ needs: [
+ 'dockerfile-ubuntu',
+ 'run-local-testnet',
+ 'doppelganger-protection-success-test',
+ 'doppelganger-protection-failure-test',
+ ]
steps:
- uses: actions/checkout@v4
- name: Check that success job is dependent on all others
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 3d23b4110e7..86f99b53e10 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -31,38 +31,22 @@ jobs:
strategy:
matrix:
arch: [aarch64-unknown-linux-gnu,
- aarch64-unknown-linux-gnu-portable,
x86_64-unknown-linux-gnu,
- x86_64-unknown-linux-gnu-portable,
x86_64-apple-darwin,
- x86_64-apple-darwin-portable,
- x86_64-windows,
- x86_64-windows-portable]
+ x86_64-windows]
include:
- arch: aarch64-unknown-linux-gnu
runner: ${{ github.repository == 'sigp/lighthouse' && fromJson('["self-hosted", "linux", "release", "large"]') || 'ubuntu-latest' }}
profile: maxperf
- - arch: aarch64-unknown-linux-gnu-portable
- runner: ${{ github.repository == 'sigp/lighthouse' && fromJson('["self-hosted", "linux", "release", "large"]') || 'ubuntu-latest' }}
- profile: maxperf
- arch: x86_64-unknown-linux-gnu
runner: ${{ github.repository == 'sigp/lighthouse' && fromJson('["self-hosted", "linux", "release", "large"]') || 'ubuntu-latest' }}
profile: maxperf
- - arch: x86_64-unknown-linux-gnu-portable
- runner: ${{ github.repository == 'sigp/lighthouse' && fromJson('["self-hosted", "linux", "release", "large"]') || 'ubuntu-latest' }}
- profile: maxperf
- arch: x86_64-apple-darwin
- runner: macos-latest
- profile: maxperf
- - arch: x86_64-apple-darwin-portable
- runner: macos-latest
+ runner: macos-13
profile: maxperf
- arch: x86_64-windows
runner: ${{ github.repository == 'sigp/lighthouse' && fromJson('["self-hosted", "windows", "release"]') || 'windows-2019' }}
profile: maxperf
- - arch: x86_64-windows-portable
- runner: ${{ github.repository == 'sigp/lighthouse' && fromJson('["self-hosted", "windows", "release"]') || 'windows-2019' }}
- profile: maxperf
runs-on: ${{ matrix.runner }}
needs: extract-version
@@ -80,7 +64,7 @@ jobs:
- uses: KyleMayes/install-llvm-action@v1
if: env.SELF_HOSTED_RUNNERS == 'false' && startsWith(matrix.arch, 'x86_64-windows')
with:
- version: "16.0"
+ version: "17.0"
directory: ${{ runner.temp }}/llvm
- name: Set LIBCLANG_PATH
if: startsWith(matrix.arch, 'x86_64-windows')
@@ -90,53 +74,29 @@ jobs:
# Builds
# ==============================
- - name: Build Lighthouse for aarch64-unknown-linux-gnu-portable
- if: matrix.arch == 'aarch64-unknown-linux-gnu-portable'
- run: |
- cargo install cross
- env CROSS_PROFILE=${{ matrix.profile }} make build-aarch64-portable
-
- name: Build Lighthouse for aarch64-unknown-linux-gnu
if: matrix.arch == 'aarch64-unknown-linux-gnu'
run: |
cargo install cross
- env CROSS_PROFILE=${{ matrix.profile }} make build-aarch64
-
- - name: Build Lighthouse for x86_64-unknown-linux-gnu-portable
- if: matrix.arch == 'x86_64-unknown-linux-gnu-portable'
- run: |
- cargo install cross
- env CROSS_PROFILE=${{ matrix.profile }} make build-x86_64-portable
+ env CROSS_PROFILE=${{ matrix.profile }} make build-aarch64-portable
- name: Build Lighthouse for x86_64-unknown-linux-gnu
if: matrix.arch == 'x86_64-unknown-linux-gnu'
run: |
cargo install cross
- env CROSS_PROFILE=${{ matrix.profile }} make build-x86_64
-
- - name: Move cross-compiled binary
- if: startsWith(matrix.arch, 'aarch64')
- run: mv target/aarch64-unknown-linux-gnu/${{ matrix.profile }}/lighthouse ~/.cargo/bin/lighthouse
+ env CROSS_PROFILE=${{ matrix.profile }} make build-x86_64-portable
- name: Move cross-compiled binary
- if: startsWith(matrix.arch, 'x86_64-unknown-linux-gnu')
- run: mv target/x86_64-unknown-linux-gnu/${{ matrix.profile }}/lighthouse ~/.cargo/bin/lighthouse
-
- - name: Build Lighthouse for x86_64-apple-darwin portable
- if: matrix.arch == 'x86_64-apple-darwin-portable'
- run: cargo install --path lighthouse --force --locked --features portable,gnosis --profile ${{ matrix.profile }}
+ if: contains(matrix.arch, 'unknown-linux-gnu')
+ run: mv target/${{ matrix.arch }}/${{ matrix.profile }}/lighthouse ~/.cargo/bin/lighthouse
- - name: Build Lighthouse for x86_64-apple-darwin modern
+ - name: Build Lighthouse for x86_64-apple-darwin
if: matrix.arch == 'x86_64-apple-darwin'
- run: cargo install --path lighthouse --force --locked --features modern,gnosis --profile ${{ matrix.profile }}
-
- - name: Build Lighthouse for Windows portable
- if: matrix.arch == 'x86_64-windows-portable'
run: cargo install --path lighthouse --force --locked --features portable,gnosis --profile ${{ matrix.profile }}
- - name: Build Lighthouse for Windows modern
+ - name: Build Lighthouse for Windows
if: matrix.arch == 'x86_64-windows'
- run: cargo install --path lighthouse --force --locked --features modern,gnosis --profile ${{ matrix.profile }}
+ 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
@@ -151,6 +111,11 @@ jobs:
cd artifacts
tar -czf lighthouse-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.arch }}.tar.gz lighthouse
echo "$GPG_PASSPHRASE" | gpg --passphrase-fd 0 --pinentry-mode loopback --batch -ab lighthouse-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.arch }}.tar.gz
+ for ext in "tar.gz" "tar.gz.asc";\
+ do for f in *.$ext;\
+ do cp $f "../${f%.$ext}-portable.$ext";\
+ done;\
+ done
mv *tar.gz* ..
- name: Configure GPG and create artifacts Windows
@@ -179,6 +144,14 @@ jobs:
path: lighthouse-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.arch }}.tar.gz
compression-level: 0
+ - name: Upload artifact (copy)
+ if: startsWith(matrix.arch, 'x86_64-windows') != true
+ uses: actions/upload-artifact@v4
+ with:
+ name: lighthouse-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.arch }}-portable.tar.gz
+ path: lighthouse-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.arch }}-portable.tar.gz
+ compression-level: 0
+
- name: Upload signature
uses: actions/upload-artifact@v4
with:
@@ -186,6 +159,14 @@ jobs:
path: lighthouse-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.arch }}.tar.gz.asc
compression-level: 0
+ - name: Upload signature (copy)
+ if: startsWith(matrix.arch, 'x86_64-windows') != true
+ uses: actions/upload-artifact@v4
+ with:
+ name: lighthouse-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.arch }}-portable.tar.gz.asc
+ path: lighthouse-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.arch }}-portable.tar.gz.asc
+ compression-level: 0
+
draft-release:
name: Draft Release
needs: [build, extract-version]
@@ -229,9 +210,9 @@ jobs:
## Testing Checklist (DELETE ME)
- - [ ] Run on synced Prater Sigma Prime nodes.
+ - [ ] Run on synced Holesky Sigma Prime nodes.
- [ ] Run on synced Canary (mainnet) Sigma Prime nodes.
- - [ ] Resync a Prater node.
+ - [ ] Resync a Holesky node.
- [ ] Resync a mainnet node.
## Release Checklist (DELETE ME)
@@ -277,8 +258,8 @@ jobs:
|
| 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) |
+ |
| 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/.github/workflows/test-suite.yml b/.github/workflows/test-suite.yml
index 413dd2b95dd..769b889de4d 100644
--- a/.github/workflows/test-suite.yml
+++ b/.github/workflows/test-suite.yml
@@ -29,6 +29,31 @@ env:
# Enable portable to prevent issues with caching `blst` for the wrong CPU type
TEST_FEATURES: portable
jobs:
+ check-labels:
+ runs-on: ubuntu-latest
+ name: Check for 'skip-ci' label
+ outputs:
+ skip_ci: ${{ steps.set-output.outputs.SKIP_CI }}
+ steps:
+ - name: check for skip-ci label
+ id: set-output
+ env:
+ LABELS: ${{ toJson(github.event.pull_request.labels) }}
+ run: |
+ SKIP_CI="false"
+ if [ -z "${LABELS}" ] || [ "${LABELS}" = "null" ]; then
+ LABELS="none";
+ else
+ LABELS=$(echo ${LABELS} | jq -r '.[].name')
+ fi
+ for label in ${LABELS}; do
+ if [ "$label" = "skip-ci" ]; then
+ SKIP_CI="true"
+ break
+ fi
+ done
+ echo "skip_ci=$SKIP_CI" >> $GITHUB_OUTPUT
+
target-branch-check:
name: target-branch-check
runs-on: ubuntu-latest
@@ -38,6 +63,8 @@ jobs:
run: test ${{ github.base_ref }} != "stable"
release-tests-ubuntu:
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' }}
steps:
@@ -63,6 +90,8 @@ jobs:
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@v4
@@ -83,11 +112,6 @@ jobs:
- name: Install make
if: env.SELF_HOSTED_RUNNERS == 'false'
run: choco install -y make
-# - uses: KyleMayes/install-llvm-action@v1
-# if: env.SELF_HOSTED_RUNNERS == 'false'
-# with:
-# version: "16.0"
-# directory: ${{ runner.temp }}/llvm
- name: Set LIBCLANG_PATH
run: echo "LIBCLANG_PATH=$((gcm clang).source -replace "clang.exe")" >> $env:GITHUB_ENV
- name: Run tests in release
@@ -97,6 +121,8 @@ jobs:
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' }}
env:
@@ -117,6 +143,8 @@ jobs:
run: sccache --show-stats
op-pool-tests:
name: op-pool-tests
+ needs: [check-labels]
+ if: needs.check-labels.outputs.skip_ci != 'true'
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -132,6 +160,8 @@ jobs:
run: make test-op-pool
network-tests:
name: network-tests
+ needs: [check-labels]
+ if: needs.check-labels.outputs.skip_ci != 'true'
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -147,6 +177,8 @@ jobs:
run: make test-network
slasher-tests:
name: slasher-tests
+ needs: [check-labels]
+ if: needs.check-labels.outputs.skip_ci != 'true'
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -162,6 +194,8 @@ jobs:
run: make test-slasher
debug-tests-ubuntu:
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' }}
env:
@@ -186,6 +220,8 @@ jobs:
run: sccache --show-stats
state-transition-vectors-ubuntu:
name: state-transition-vectors-ubuntu
+ needs: [check-labels]
+ if: needs.check-labels.outputs.skip_ci != 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
@@ -198,6 +234,8 @@ jobs:
run: make run-state-transition-tests
ef-tests-ubuntu:
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' }}
env:
@@ -216,17 +254,10 @@ jobs:
- name: Show cache stats
if: env.SELF_HOSTED_RUNNERS == 'true'
run: sccache --show-stats
- dockerfile-ubuntu:
- name: dockerfile-ubuntu
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v4
- - name: Build the root Dockerfile
- run: docker build --build-arg FEATURES=portable -t lighthouse:local .
- - name: Test the built image
- run: docker run -t lighthouse:local lighthouse --version
basic-simulator-ubuntu:
name: basic-simulator-ubuntu
+ needs: [check-labels]
+ if: needs.check-labels.outputs.skip_ci != 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
@@ -239,6 +270,8 @@ jobs:
run: cargo run --release --bin simulator basic-sim
fallback-simulator-ubuntu:
name: fallback-simulator-ubuntu
+ needs: [check-labels]
+ if: needs.check-labels.outputs.skip_ci != 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
@@ -249,44 +282,10 @@ jobs:
cache-target: release
- name: Run a beacon chain sim which tests VC fallback behaviour
run: cargo run --release --bin simulator fallback-sim
- doppelganger-protection-test:
- name: doppelganger-protection-test
- runs-on: ${{ github.repository == 'sigp/lighthouse' && fromJson('["self-hosted", "linux", "CI", "small"]') || 'ubuntu-latest' }}
- env:
- # Enable portable to prevent issues with caching `blst` for the wrong CPU type
- FEATURES: jemalloc,portable
- steps:
- - uses: actions/checkout@v4
- - name: Get latest version of stable Rust
- if: env.SELF_HOSTED_RUNNERS == 'false'
- uses: moonrepo/setup-rust@v1
- with:
- channel: stable
- cache-target: release
- - name: Install geth
- if: env.SELF_HOSTED_RUNNERS == 'false'
- run: |
- sudo add-apt-repository -y ppa:ethereum/ethereum
- sudo apt-get update
- sudo apt-get install ethereum
- - name: Install lighthouse
- run: |
- make
- - name: Install lcli
- # TODO: uncomment after the version of lcli in https://github.com/sigp/lighthouse/pull/5137
- # is installed on the runners
- # if: env.SELF_HOSTED_RUNNERS == 'false'
- run: make install-lcli
- - name: Run the doppelganger protection failure test script
- run: |
- cd scripts/tests
- ./doppelganger_protection.sh failure genesis.json
- - name: Run the doppelganger protection success test script
- run: |
- cd scripts/tests
- ./doppelganger_protection.sh success genesis.json
execution-engine-integration-ubuntu:
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' }}
steps:
- uses: actions/checkout@v4
@@ -332,6 +331,8 @@ jobs:
run: make audit-CI
- name: Run cargo vendor to make sure dependencies can be vendored for packaging, reproducibility and archival purpose
run: CARGO_HOME=$(readlink -f $HOME) make vendor
+ - name: Markdown-linter
+ run: make mdlint
check-msrv:
name: check-msrv
runs-on: ubuntu-latest
@@ -346,6 +347,8 @@ jobs:
run: cargo check --workspace
cargo-udeps:
name: cargo-udeps
+ needs: [check-labels]
+ if: needs.check-labels.outputs.skip_ci != 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
@@ -368,6 +371,8 @@ jobs:
RUSTFLAGS: ""
compile-with-beta-compiler:
name: compile-with-beta-compiler
+ needs: [check-labels]
+ if: needs.check-labels.outputs.skip_ci != 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
@@ -379,6 +384,8 @@ jobs:
run: make
cli-check:
name: cli-check
+ needs: [check-labels]
+ if: needs.check-labels.outputs.skip_ci != 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
@@ -393,8 +400,10 @@ jobs:
# a PR is safe to merge. New jobs should be added here.
test-suite-success:
name: test-suite-success
+ if: needs.check-labels.outputs.skip_ci != 'true'
runs-on: ubuntu-latest
needs: [
+ 'check-labels',
'target-branch-check',
'release-tests-ubuntu',
'release-tests-windows',
@@ -405,10 +414,8 @@ jobs:
'debug-tests-ubuntu',
'state-transition-vectors-ubuntu',
'ef-tests-ubuntu',
- 'dockerfile-ubuntu',
'basic-simulator-ubuntu',
'fallback-simulator-ubuntu',
- 'doppelganger-protection-test',
'execution-engine-integration-ubuntu',
'check-code',
'check-msrv',
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index a408fcdd52f..3c53558a100 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -1,12 +1,14 @@
# Contributors Guide
+
[](https://www.gitpoap.io/gh/sigp/lighthouse)
-Lighthouse is an open-source Ethereum 2.0 client. We're community driven and
+Lighthouse is an open-source Ethereum consensus client. We're community driven and
welcome all contribution. We aim to provide a constructive, respectful and fun
environment for collaboration.
-We are active contributors to the [Ethereum 2.0 specification](https://github.com/ethereum/eth2.0-specs) and attend all [Eth
-2.0 implementers calls](https://github.com/ethereum/eth2.0-pm).
+We are active contributors to
+the [Ethereum Proof-of-Stake Consensus specification](https://github.com/ethereum/consensus-specs) and attend
+all [Ethereum implementers calls](https://github.com/ethereum/pm/).
This guide is geared towards beginners. If you're an open-source veteran feel
free to just skim this document and get straight into crushing issues.
@@ -41,7 +43,7 @@ We recommend the following work-flow for contributors:
1. **Find an issue** to work on, either because it's interesting or suitable to
your skill-set. Use comments to communicate your intentions and ask
-questions.
+ questions.
2. **Work in a feature branch** of your personal fork
(github.com/YOUR_NAME/lighthouse) of the main repository
(github.com/sigp/lighthouse).
@@ -49,13 +51,13 @@ questions.
`unstable` as the base branch to merge your changes into the main repository.
4. Wait for the repository maintainers to **review your changes** to ensure the
issue is addressed satisfactorily. Optionally, mention your PR on
-[discord](https://discord.gg/cyAszAh).
+ [discord](https://discord.gg/cyAszAh).
5. If the issue is addressed the repository maintainers will **merge your
pull-request** and you'll be an official contributor!
Generally, you find an issue you'd like to work on and announce your intentions
to start work in a comment on the issue. Then, do your work on a separate
-branch (a "feature branch") in your own fork of the main repository. Once
+branch (a "feature branch") in your own fork of the main repository. Once
you're happy and you think the issue has been addressed, create a pull request
into the main repository.
@@ -66,18 +68,20 @@ steps:
1. [Create a
fork](https://help.github.com/articles/fork-a-repo/#fork-an-example-repository)
-and [clone
-it](https://help.github.com/articles/fork-a-repo/#step-2-create-a-local-clone-of-your-fork)
-to your local machine.
+ and [clone
+ it](https://help.github.com/articles/fork-a-repo/#step-2-create-a-local-clone-of-your-fork)
+ to your local machine.
2. [Add an _"upstream"_
branch](https://help.github.com/articles/fork-a-repo/#step-3-configure-git-to-sync-your-fork-with-the-original-spoon-knife-repository)
-that tracks github.com/sigp/lighthouse using `$ git remote add upstream
-https://github.com/sigp/lighthouse.git` (pro-tip: [use SSH](https://help.github.com/articles/connecting-to-github-with-ssh/) instead of HTTPS).
+ that tracks github.com/sigp/lighthouse using `$ git remote add upstream
+ https://github.com/sigp/lighthouse.git` (
+ pro-tip: [use SSH](https://help.github.com/articles/connecting-to-github-with-ssh/) instead of HTTPS).
3. Create a new feature branch with `$ git checkout -b your_feature_name`. The
name of your branch isn't critical but it should be short and instructive.
-E.g., if you're fixing a bug with serialization, you could name your branch
-`fix_serialization_bug`.
-4. Make sure you sign your commits. See [relevant doc](https://help.github.com/en/github/authenticating-to-github/about-commit-signature-verification).
+ E.g., if you're fixing a bug with serialization, you could name your branch
+ `fix_serialization_bug`.
+4. Make sure you sign your commits.
+ See [relevant doc](https://help.github.com/en/github/authenticating-to-github/about-commit-signature-verification).
5. Commit your changes and push them to your fork with `$ git push origin
your_feature_name`.
6. Go to your fork on github.com and use the web interface to create a pull
@@ -92,22 +96,28 @@ by Rob Allen that provides much more detail on each of these steps, if you're
having trouble. As always, jump on [discord](https://discord.gg/cyAszAh)
if you get stuck.
+Additionally,
+the ["Contributing to Lighthouse" section](https://lighthouse-book.sigmaprime.io/contributing.html#contributing-to-lighthouse)
+of the Lighthouse Book provides more details on the setup.
## FAQs
### I don't think I have anything to add
There's lots to be done and there's all sorts of tasks. You can do anything
-from correcting typos through to writing core consensus code. If you reach out,
+from enhancing documentation through to writing core consensus code. If you reach out,
we'll include you.
+Please note, to maintain project quality, we may not accept PRs for small typos or changes
+with minimal impact.
+
### I'm not sure my Rust is good enough
We're open to developers of all levels. If you create a PR and your code
doesn't meet our standards, we'll help you fix it and we'll share the reasoning
with you. Contributing to open-source is a great way to learn.
-### I'm not sure I know enough about Ethereum 2.0
+### I'm not sure I know enough about Ethereum
No problems, there's plenty of tasks that don't require extensive Ethereum
knowledge. You can learn about Ethereum as you go.
diff --git a/Cargo.lock b/Cargo.lock
index cc38877fe76..28f1284068e 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -30,10 +30,7 @@ dependencies = [
"filesystem",
"safe_arith",
"sensitive_url",
- "serde",
- "serde_json",
"slashing_protection",
- "slog",
"slot_clock",
"tempfile",
"tokio",
@@ -62,9 +59,9 @@ dependencies = [
[[package]]
name = "addr2line"
-version = "0.21.0"
+version = "0.22.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb"
+checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678"
dependencies = [
"gimli",
]
@@ -248,9 +245,9 @@ dependencies = [
[[package]]
name = "alloy-rlp"
-version = "0.3.4"
+version = "0.3.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8d58d9f5da7b40e9bfff0b7e7816700be4019db97d4b6359fe7f94a9e22e42ac"
+checksum = "b155716bab55763c95ba212806cf43d05bcc70e5f35b02bad20cf5ec7fe11fed"
dependencies = [
"alloy-rlp-derive",
"arrayvec",
@@ -259,13 +256,13 @@ dependencies = [
[[package]]
name = "alloy-rlp-derive"
-version = "0.3.4"
+version = "0.3.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1a047897373be4bbb0224c1afdabca92648dc57a9c9ef6e7b0be3aff7a859c83"
+checksum = "8037e03c7f462a063f28daec9fda285a9a89da003c552f8637a80b9c8fd96241"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.60",
+ "syn 2.0.66",
]
[[package]]
@@ -284,19 +281,65 @@ dependencies = [
]
[[package]]
-name = "ansi_term"
-version = "0.12.1"
+name = "anes"
+version = "0.1.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299"
+
+[[package]]
+name = "anstream"
+version = "0.6.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2"
+checksum = "418c75fa768af9c03be99d17643f93f79bbba589895012a80e3452a19ddda15b"
dependencies = [
- "winapi",
+ "anstyle",
+ "anstyle-parse",
+ "anstyle-query",
+ "anstyle-wincon",
+ "colorchoice",
+ "is_terminal_polyfill",
+ "utf8parse",
+]
+
+[[package]]
+name = "anstyle"
+version = "1.0.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "038dfcf04a5feb68e9c60b21c9625a54c2c0616e79b72b0fd87075a056ae1d1b"
+
+[[package]]
+name = "anstyle-parse"
+version = "0.2.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c03a11a9034d92058ceb6ee011ce58af4a9bf61491aa7e1e59ecd24bd40d22d4"
+dependencies = [
+ "utf8parse",
+]
+
+[[package]]
+name = "anstyle-query"
+version = "1.0.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a64c907d4e79225ac72e2a354c9ce84d50ebb4586dee56c82b3ee73004f537f5"
+dependencies = [
+ "windows-sys 0.52.0",
+]
+
+[[package]]
+name = "anstyle-wincon"
+version = "3.0.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "61a38449feb7068f52bb06c12759005cf459ee52bb4adc1d5a7c4322d716fb19"
+dependencies = [
+ "anstyle",
+ "windows-sys 0.52.0",
]
[[package]]
name = "anyhow"
-version = "1.0.82"
+version = "1.0.86"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f538837af36e6f6a9be0faa67f9a314f8119e4e4b5867c6ab40ed60360142519"
+checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da"
[[package]]
name = "arbitrary"
@@ -466,9 +509,9 @@ checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711"
[[package]]
name = "asn1-rs"
-version = "0.5.2"
+version = "0.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7f6fd5ddaf0351dff5b8da21b2fb4ff8e08ddd02857f0bf69c47639106c0fff0"
+checksum = "22ad1373757efa0f70ec53939aabc7152e1591cb485208052993070ac8d2429d"
dependencies = [
"asn1-rs-derive",
"asn1-rs-impl",
@@ -482,25 +525,25 @@ dependencies = [
[[package]]
name = "asn1-rs-derive"
-version = "0.4.0"
+version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "726535892e8eae7e70657b4c8ea93d26b8553afb1ce617caee529ef96d7dee6c"
+checksum = "7378575ff571966e99a744addeff0bff98b8ada0dedf1956d59e634db95eaac1"
dependencies = [
"proc-macro2",
"quote",
- "syn 1.0.109",
+ "syn 2.0.66",
"synstructure",
]
[[package]]
name = "asn1-rs-impl"
-version = "0.1.0"
+version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2777730b2039ac0f95f093556e61b6d26cebed5393ca6f152717777cec3a42ed"
+checksum = "7b18050c2cd6fe86c3a76584ef5e0baf286d038cda203eb6223df2cc413565f7"
dependencies = [
"proc-macro2",
"quote",
- "syn 1.0.109",
+ "syn 2.0.66",
]
[[package]]
@@ -533,7 +576,7 @@ dependencies = [
"futures-lite",
"parking",
"polling",
- "rustix 0.38.33",
+ "rustix 0.38.34",
"slab",
"tracing",
"windows-sys 0.52.0",
@@ -558,7 +601,7 @@ checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.60",
+ "syn 2.0.66",
]
[[package]]
@@ -628,14 +671,14 @@ checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.60",
+ "syn 2.0.66",
]
[[package]]
name = "autocfg"
-version = "1.2.0"
+version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f1fdabc7756949593fe60f30ec81974b613357de856987752631dea1e3394c80"
+checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0"
[[package]]
name = "axum"
@@ -694,9 +737,9 @@ dependencies = [
[[package]]
name = "backtrace"
-version = "0.3.71"
+version = "0.3.72"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "26b05800d2e817c8b3b4b54abd461726265fa9789ae34330622f2db9ee696f9d"
+checksum = "17c6a35df3749d2e8bb1b7b21a976d82b15548788d2735b9d82f329268f71a11"
dependencies = [
"addr2line",
"cc",
@@ -739,9 +782,9 @@ checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567"
[[package]]
name = "base64"
-version = "0.22.0"
+version = "0.22.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9475866fec1451be56a3c2400fd081ff546538961565ccb5b7142cbd22bc7a51"
+checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6"
[[package]]
name = "base64ct"
@@ -781,7 +824,7 @@ dependencies = [
"merkle_proof",
"oneshot_broadcast",
"operation_pool",
- "parking_lot 0.12.1",
+ "parking_lot 0.12.3",
"proto_array",
"rand",
"rayon",
@@ -812,7 +855,7 @@ dependencies = [
[[package]]
name = "beacon_node"
-version = "5.1.3"
+version = "5.2.1"
dependencies = [
"beacon_chain",
"clap",
@@ -822,19 +865,15 @@ dependencies = [
"dirs",
"environment",
"eth2_config",
- "eth2_network_config",
"execution_layer",
- "futures",
"genesis",
"hex",
"http_api",
"hyper 1.3.1",
"lighthouse_network",
- "lighthouse_version",
"monitoring_api",
"node_test_rig",
"sensitive_url",
- "serde",
"serde_json",
"slasher",
"slog",
@@ -849,25 +888,22 @@ dependencies = [
name = "beacon_processor"
version = "0.1.0"
dependencies = [
- "derivative",
- "ethereum_ssz",
"fnv",
"futures",
- "hex",
"itertools",
"lazy_static",
"lighthouse_metrics",
"lighthouse_network",
"logging",
"num_cpus",
- "parking_lot 0.12.1",
+ "parking_lot 0.12.3",
"serde",
"slog",
"slot_clock",
"strum",
"task_executor",
"tokio",
- "tokio-util 0.6.10",
+ "tokio-util",
"types",
]
@@ -882,21 +918,22 @@ dependencies = [
[[package]]
name = "bindgen"
-version = "0.59.2"
+version = "0.69.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2bd2a9a458e8f4304c52c43ebb0cfbd520289f8379a52e329a38afda99bf8eb8"
+checksum = "a00dc851838a2120612785d195287475a3ac45514741da670b735818822129a0"
dependencies = [
- "bitflags 1.3.2",
+ "bitflags 2.5.0",
"cexpr",
"clang-sys",
+ "itertools",
"lazy_static",
"lazycell",
- "peeking_take_while",
"proc-macro2",
"quote",
"regex",
"rustc-hash",
"shlex",
+ "syn 2.0.66",
]
[[package]]
@@ -1025,7 +1062,7 @@ dependencies = [
[[package]]
name = "boot_node"
-version = "5.1.3"
+version = "5.2.1"
dependencies = [
"beacon_node",
"clap",
@@ -1037,12 +1074,9 @@ dependencies = [
"log",
"logging",
"serde",
- "serde_json",
- "serde_yaml",
"slog",
"slog-async",
"slog-scope",
- "slog-stdlog",
"slog-term",
"tokio",
"types",
@@ -1072,7 +1106,6 @@ dependencies = [
"reqwest",
"sensitive_url",
"serde",
- "serde_json",
]
[[package]]
@@ -1125,9 +1158,9 @@ dependencies = [
[[package]]
name = "c-kzg"
-version = "1.0.0"
+version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3130f3d8717cc02e668a896af24984d5d5d4e8bf12e278e982e0f1bd88a0f9af"
+checksum = "cdf100c4cea8f207e883ff91ca886d621d8a166cb04971dfaa9bb8fd99ed95df"
dependencies = [
"blst",
"cc",
@@ -1136,26 +1169,11 @@ dependencies = [
"libc",
]
-[[package]]
-name = "cached_tree_hash"
-version = "0.1.0"
-dependencies = [
- "ethereum-types 0.14.1",
- "ethereum_hashing",
- "ethereum_ssz",
- "ethereum_ssz_derive",
- "quickcheck",
- "quickcheck_macros",
- "smallvec",
- "ssz_types",
- "tree_hash",
-]
-
[[package]]
name = "camino"
-version = "1.1.6"
+version = "1.1.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c59e92b5a388f549b863a7bea62612c09f24c8393560709a54558a9abdfb3b9c"
+checksum = "e0ec6b951b160caa93cc0c7b209e5a3bff7aae9062213451ac99493cd844c239"
dependencies = [
"serde",
]
@@ -1177,7 +1195,7 @@ checksum = "eee4243f1f26fc7a42710e7439c149e2b10b05472f88090acce52632f231a73a"
dependencies = [
"camino",
"cargo-platform",
- "semver 1.0.22",
+ "semver 1.0.23",
"serde",
"serde_json",
"thiserror",
@@ -1191,9 +1209,9 @@ checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5"
[[package]]
name = "cc"
-version = "1.0.95"
+version = "1.0.98"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d32a725bc159af97c3e629873bb9f88fb8cf8a4867175f76dc987815ea07c83b"
+checksum = "41c270e7540d725e65ac7f1b212ac8ce349719624d7bcff99f8e2e488e8cf03f"
dependencies = [
"jobserver",
"libc",
@@ -1257,6 +1275,33 @@ dependencies = [
"windows-targets 0.52.5",
]
+[[package]]
+name = "ciborium"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "42e69ffd6f0917f5c029256a24d0161db17cea3997d185db0d35926308770f0e"
+dependencies = [
+ "ciborium-io",
+ "ciborium-ll",
+ "serde",
+]
+
+[[package]]
+name = "ciborium-io"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "05afea1e0a06c9be33d539b876f1ce3692f4afea2cb41f740e7743225ed1c757"
+
+[[package]]
+name = "ciborium-ll"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "57663b653d948a338bfb3eeba9bb2fd5fcfaecb9e199e87e1eda4d9e8b240fd9"
+dependencies = [
+ "ciborium-io",
+ "half",
+]
+
[[package]]
name = "cipher"
version = "0.3.0"
@@ -1279,9 +1324,9 @@ dependencies = [
[[package]]
name = "clang-sys"
-version = "1.7.0"
+version = "1.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "67523a3b4be3ce1989d607a828d036249522dd9c1c8de7f4dd2dae43a37369d1"
+checksum = "f803f94ecf597339c7a34eed2036ef83f86aaba937f001f7c5b5e251f043f1f9"
dependencies = [
"glob",
"libc",
@@ -1290,19 +1335,45 @@ dependencies = [
[[package]]
name = "clap"
-version = "2.34.0"
+version = "4.5.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c"
+checksum = "90bc066a67923782aa8515dbaea16946c5bcc5addbd668bb80af688e53e548a0"
dependencies = [
- "ansi_term",
- "atty",
- "bitflags 1.3.2",
- "strsim 0.8.0",
- "textwrap",
- "unicode-width",
- "vec_map",
+ "clap_builder",
+ "clap_derive",
+]
+
+[[package]]
+name = "clap_builder"
+version = "4.5.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ae129e2e766ae0ec03484e609954119f123cc1fe650337e155d03b022f24f7b4"
+dependencies = [
+ "anstream",
+ "anstyle",
+ "clap_lex",
+ "strsim 0.11.1",
+ "terminal_size",
+]
+
+[[package]]
+name = "clap_derive"
+version = "4.5.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "528131438037fd55894f62d6e9f068b8f45ac57ffa77517819645d10aed04f64"
+dependencies = [
+ "heck 0.5.0",
+ "proc-macro2",
+ "quote",
+ "syn 2.0.66",
]
+[[package]]
+name = "clap_lex"
+version = "0.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce"
+
[[package]]
name = "clap_utils"
version = "0.1.0"
@@ -1341,12 +1412,9 @@ dependencies = [
"lazy_static",
"lighthouse_metrics",
"lighthouse_network",
- "logging",
"monitoring_api",
"network",
- "num_cpus",
"operation_pool",
- "parking_lot 0.12.1",
"sensitive_url",
"serde",
"serde_yaml",
@@ -1360,7 +1428,6 @@ dependencies = [
"time",
"timer",
"tokio",
- "tree_hash",
"types",
]
@@ -1373,6 +1440,12 @@ dependencies = [
"cc",
]
+[[package]]
+name = "colorchoice"
+version = "1.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0b6a852b24ab71dffc585bcb46eaf7959d175cb865a7152e35b348d1b2960422"
+
[[package]]
name = "compare_fields"
version = "0.2.0"
@@ -1391,18 +1464,18 @@ dependencies = [
[[package]]
name = "concurrent-queue"
-version = "2.4.0"
+version = "2.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d16048cd947b08fa32c24458a22f5dc5e835264f689f4f5653210c69fd107363"
+checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973"
dependencies = [
"crossbeam-utils",
]
[[package]]
name = "const-hex"
-version = "1.11.3"
+version = "1.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5ba00838774b4ab0233e355d26710fbfc8327a05c017f6dc4873f876d1f79f78"
+checksum = "94fb8a24a26d37e1ffd45343323dc9fe6654ceea44c12f2fcb3d7ac29e610bc6"
dependencies = [
"cfg-if",
"cpufeatures",
@@ -1465,33 +1538,33 @@ dependencies = [
[[package]]
name = "crc32fast"
-version = "1.4.0"
+version = "1.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b3855a8a784b474f333699ef2bbca9db2c4a1f6d9088a90a2d25b1eb53111eaa"
+checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3"
dependencies = [
"cfg-if",
]
[[package]]
name = "criterion"
-version = "0.3.6"
+version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b01d6de93b2b6c65e17c634a26653a29d107b3c98c607c765bf38d041531cd8f"
+checksum = "f2b12d017a929603d80db1831cd3a24082f8137ce19c69e6447f54f5fc8d692f"
dependencies = [
- "atty",
+ "anes",
"cast",
+ "ciborium",
"clap",
"criterion-plot",
- "csv",
+ "is-terminal",
"itertools",
- "lazy_static",
"num-traits",
+ "once_cell",
"oorandom",
"plotters",
"rayon",
"regex",
"serde",
- "serde_cbor",
"serde_derive",
"serde_json",
"tinytemplate",
@@ -1500,9 +1573,9 @@ dependencies = [
[[package]]
name = "criterion-plot"
-version = "0.4.5"
+version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2673cc8207403546f45f5fd319a974b1e6983ad1a3ee7e6041650013be041876"
+checksum = "6b50826342786a51a89e2da3a28f1c32b06e387201bc2d19791f622c673706b1"
dependencies = [
"cast",
"itertools",
@@ -1510,9 +1583,9 @@ dependencies = [
[[package]]
name = "crossbeam-channel"
-version = "0.5.12"
+version = "0.5.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ab3db02a9c5b5121e1e42fbdb1aeb65f5e02624cc58c43f2884c6ccac0b82f95"
+checksum = "33480d6946193aa8033910124896ca395333cae7e2d1113d1fef6c3272217df2"
dependencies = [
"crossbeam-utils",
]
@@ -1538,9 +1611,9 @@ dependencies = [
[[package]]
name = "crossbeam-utils"
-version = "0.8.19"
+version = "0.8.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345"
+checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80"
[[package]]
name = "crunchy"
@@ -1603,27 +1676,6 @@ dependencies = [
"subtle",
]
-[[package]]
-name = "csv"
-version = "1.3.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ac574ff4d437a7b5ad237ef331c17ccca63c46479e5b5453eb8e10bb99a759fe"
-dependencies = [
- "csv-core",
- "itoa",
- "ryu",
- "serde",
-]
-
-[[package]]
-name = "csv-core"
-version = "0.1.11"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5efa2b3d7902f4b634a20cae3c9c4e6209dc4779feb6863329607560143efa70"
-dependencies = [
- "memchr",
-]
-
[[package]]
name = "ctr"
version = "0.7.0"
@@ -1663,16 +1715,15 @@ dependencies = [
[[package]]
name = "curve25519-dalek"
-version = "4.1.2"
+version = "4.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0a677b8922c94e01bdbb12126b0bc852f00447528dee1782229af9c720c3f348"
+checksum = "97fb8b7c4503de7d6ae7b42ab72a5a59857b4c937ec27a3d4539dba95b5ab2be"
dependencies = [
"cfg-if",
"cpufeatures",
"curve25519-dalek-derive",
"digest 0.10.7",
"fiat-crypto",
- "platforms 3.4.0",
"rustc_version 0.4.0",
"subtle",
"zeroize",
@@ -1686,7 +1737,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.60",
+ "syn 2.0.66",
]
[[package]]
@@ -1752,15 +1803,15 @@ checksum = "7762d17f1241643615821a8455a0b2c3e803784b058693d990b11f2dce25a0ca"
[[package]]
name = "data-encoding"
-version = "2.5.0"
+version = "2.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7e962a19be5cfc3f3bf6dd8f61eb50107f356ad6270fbb3ed41476571db78be5"
+checksum = "e8566979429cf69b49a5c740c60791108e86440e8be149bbea4fe54d2c32d6e2"
[[package]]
name = "data-encoding-macro"
-version = "0.1.14"
+version = "0.1.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "20c01c06f5f429efdf2bae21eb67c28b3df3cf85b7dd2d8ef09c0838dac5d33e"
+checksum = "f1559b6cba622276d6d63706db152618eeb15b89b3e4041446b05876e352e639"
dependencies = [
"data-encoding",
"data-encoding-macro-internal",
@@ -1768,9 +1819,9 @@ dependencies = [
[[package]]
name = "data-encoding-macro-internal"
-version = "0.1.12"
+version = "0.1.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0047d07f2c89b17dd631c80450d69841a6b5d7fb17278cbc43d7e4cfcf2576f3"
+checksum = "332d754c0af53bc87c108fed664d121ecf59207ec4196041f04d6ab9002ad33f"
dependencies = [
"data-encoding",
"syn 1.0.109",
@@ -1786,12 +1837,10 @@ dependencies = [
"clap_utils",
"environment",
"hex",
- "logging",
+ "serde",
"slog",
- "sloggers",
"store",
"strum",
- "tempfile",
"types",
]
@@ -1808,7 +1857,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e4355c25cbf99edcb6b4a0e906f6bdc6956eda149e84455bea49696429b2f8e8"
dependencies = [
"futures",
- "tokio-util 0.7.10",
+ "tokio-util",
]
[[package]]
@@ -1848,9 +1897,9 @@ dependencies = [
[[package]]
name = "der-parser"
-version = "8.2.0"
+version = "9.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dbd676fbbab537128ef0278adb5576cf363cff6aa22a7b24effe97347cfab61e"
+checksum = "5cd0a5c643689626bec213c4d8bd4d96acc8ffdb4ad4bb6bc16abf27d5f4b553"
dependencies = [
"asn1-rs",
"displaydoc",
@@ -1888,7 +1937,7 @@ checksum = "67e77553c4162a157adbf834ebae5b415acbecbeafc7a74b0e886657506a7611"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.60",
+ "syn 2.0.66",
]
[[package]]
@@ -1927,7 +1976,7 @@ dependencies = [
"diesel_table_macro_syntax",
"proc-macro2",
"quote",
- "syn 2.0.60",
+ "syn 2.0.66",
]
[[package]]
@@ -1947,7 +1996,7 @@ version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fc5557efc453706fed5e4fa85006fe9817c224c3f480a34c7e5959fd700921c5"
dependencies = [
- "syn 2.0.60",
+ "syn 2.0.66",
]
[[package]]
@@ -2034,7 +2083,7 @@ dependencies = [
"enr",
"fnv",
"futures",
- "hashlink",
+ "hashlink 0.8.4",
"hex",
"hkdf",
"lazy_static",
@@ -2060,7 +2109,7 @@ checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.60",
+ "syn 2.0.66",
]
[[package]]
@@ -2132,13 +2181,11 @@ version = "0.2.0"
dependencies = [
"beacon_chain",
"bls",
- "cached_tree_hash",
"compare_fields",
"compare_fields_derive",
"derivative",
"eth2_network_config",
"ethereum-types 0.14.1",
- "ethereum_serde_utils",
"ethereum_ssz",
"ethereum_ssz_derive",
"execution_layer",
@@ -2154,7 +2201,6 @@ dependencies = [
"serde_yaml",
"snap",
"state_processing",
- "store",
"swap_or_not_shuffle",
"tree_hash",
"tree_hash_derive",
@@ -2163,9 +2209,9 @@ dependencies = [
[[package]]
name = "either"
-version = "1.11.0"
+version = "1.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a47c1c47d2f5964e29c61246e81db715514cd532db6b5116a25ea3c03d6780a2"
+checksum = "3dca9240753cf90908d7e4aac30f630662b02aebaa1b58a3cadabdb23385b58b"
[[package]]
name = "elliptic-curve"
@@ -2240,10 +2286,10 @@ version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5ffccbb6966c05b32ef8fbac435df276c4ae4d3dc55a8cd0eb9745e6c12f546a"
dependencies = [
- "heck",
+ "heck 0.4.1",
"proc-macro2",
"quote",
- "syn 2.0.60",
+ "syn 2.0.66",
]
[[package]]
@@ -2307,9 +2353,9 @@ dependencies = [
[[package]]
name = "errno"
-version = "0.3.8"
+version = "0.3.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245"
+checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba"
dependencies = [
"libc",
"windows-sys 0.52.0",
@@ -2336,15 +2382,12 @@ dependencies = [
"ethereum_ssz_derive",
"execution_layer",
"futures",
- "hex",
"lazy_static",
"lighthouse_metrics",
"merkle_proof",
- "parking_lot 0.12.1",
- "reqwest",
+ "parking_lot 0.12.3",
"sensitive_url",
"serde",
- "serde_json",
"serde_yaml",
"slog",
"sloggers",
@@ -2386,7 +2429,6 @@ dependencies = [
"libsecp256k1",
"lighthouse_network",
"mediatype",
- "mime",
"pretty_reqwest_error",
"procfs",
"proto_array",
@@ -2400,7 +2442,6 @@ dependencies = [
"ssz_types",
"store",
"tokio",
- "tree_hash",
"types",
]
@@ -2472,7 +2513,6 @@ dependencies = [
"pretty_reqwest_error",
"reqwest",
"sensitive_url",
- "serde_json",
"serde_yaml",
"sha2 0.9.9",
"slog",
@@ -2802,7 +2842,6 @@ version = "0.1.0"
dependencies = [
"async-channel",
"deposit_contract",
- "environment",
"ethers-core",
"ethers-providers",
"execution_layer",
@@ -2827,7 +2866,6 @@ dependencies = [
"alloy-consensus",
"alloy-rlp",
"arc-swap",
- "async-trait",
"builder_client",
"bytes",
"environment",
@@ -2837,7 +2875,6 @@ dependencies = [
"ethereum_ssz",
"ethers-core",
"fork_choice",
- "futures",
"hash-db",
"hash256-std-hasher",
"hex",
@@ -2848,7 +2885,7 @@ dependencies = [
"lighthouse_metrics",
"lighthouse_version",
"lru",
- "parking_lot 0.12.1",
+ "parking_lot 0.12.3",
"pretty_reqwest_error",
"rand",
"reqwest",
@@ -2897,9 +2934,9 @@ checksum = "7360491ce676a36bf9bb3c56c1aa791658183a54d2744120f27285738d90465a"
[[package]]
name = "fastrand"
-version = "2.0.2"
+version = "2.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "658bd65b1cf4c852a3cc96f18a8ce7b5640f6b703f905c7d74532294c2a63984"
+checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a"
[[package]]
name = "fastrlp"
@@ -2912,6 +2949,16 @@ dependencies = [
"bytes",
]
+[[package]]
+name = "fdlimit"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e182f7dbc2ef73d9ef67351c5fbbea084729c48362d3ce9dd44c28e32e277fe5"
+dependencies = [
+ "libc",
+ "thiserror",
+]
+
[[package]]
name = "ff"
version = "0.12.1"
@@ -2940,9 +2987,9 @@ checksum = "ec54ac60a7f2ee9a97cad9946f9bf629a3bc6a7ae59e68983dc9318f5a54b81a"
[[package]]
name = "fiat-crypto"
-version = "0.2.7"
+version = "0.2.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c007b1ae3abe1cb6f85a16305acd418b7ca6343b953633fee2b76d8f108b830f"
+checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d"
[[package]]
name = "field-offset"
@@ -2962,12 +3009,6 @@ dependencies = [
"windows-acl",
]
-[[package]]
-name = "finl_unicode"
-version = "1.2.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8fcfdc7a0362c9f4444381a9e697c79d435fe65b52a37466fc2c1184cee9edc6"
-
[[package]]
name = "fixed-hash"
version = "0.7.0"
@@ -2995,9 +3036,9 @@ dependencies = [
[[package]]
name = "flate2"
-version = "1.0.28"
+version = "1.0.30"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e"
+checksum = "5f54427cfd1c7829e2a139fcefea601bf088ebca651d2bf53ebc600eac295dae"
dependencies = [
"crc32fast",
"libz-sys",
@@ -3148,17 +3189,18 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.60",
+ "syn 2.0.66",
]
[[package]]
name = "futures-rustls"
-version = "0.24.0"
+version = "0.26.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "35bd3cf68c183738046838e300353e4716c674dc5e56890de4826801a6622a28"
+checksum = "a8f2f12607f92c69b12ed746fabf9ca4f5c482cba46679c1a75b874ed7c26adb"
dependencies = [
"futures-io",
- "rustls 0.21.11",
+ "rustls 0.23.8",
+ "rustls-pki-types",
]
[[package]]
@@ -3251,9 +3293,9 @@ dependencies = [
[[package]]
name = "getrandom"
-version = "0.2.14"
+version = "0.2.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "94b22e06ecb0110981051723910cbf0b5f5e09a2062dd7663334ee79a9d1286c"
+checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7"
dependencies = [
"cfg-if",
"js-sys",
@@ -3284,9 +3326,9 @@ dependencies = [
[[package]]
name = "gimli"
-version = "0.28.1"
+version = "0.29.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253"
+checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd"
[[package]]
name = "git-version"
@@ -3305,7 +3347,7 @@ checksum = "53010ccb100b96a67bc32c0175f0ed1426b31b655d562898e57325f81c023ac0"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.60",
+ "syn 2.0.66",
]
[[package]]
@@ -3329,8 +3371,8 @@ dependencies = [
"futures-ticker",
"futures-timer",
"getrandom",
+ "hashlink 0.9.0",
"hex_fmt",
- "instant",
"libp2p",
"prometheus-client",
"quick-protobuf",
@@ -3340,9 +3382,9 @@ dependencies = [
"regex",
"serde",
"sha2 0.10.8",
- "smallvec",
"tracing",
"void",
+ "web-time",
]
[[package]]
@@ -3382,15 +3424,19 @@ dependencies = [
"indexmap 2.2.6",
"slab",
"tokio",
- "tokio-util 0.7.10",
+ "tokio-util",
"tracing",
]
[[package]]
name = "half"
-version = "1.8.3"
+version = "2.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1b43ede17f21864e81be2fa654110bf1e793774238d86ef8555c37e6519c0403"
+checksum = "6dd08c532ae367adf81c312a4580bc67f1d0fe8bc9c460520283f4c0ff277888"
+dependencies = [
+ "cfg-if",
+ "crunchy",
+]
[[package]]
name = "hash-db"
@@ -3415,18 +3461,9 @@ checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888"
[[package]]
name = "hashbrown"
-version = "0.13.2"
+version = "0.14.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e"
-dependencies = [
- "ahash",
-]
-
-[[package]]
-name = "hashbrown"
-version = "0.14.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604"
+checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1"
dependencies = [
"ahash",
"allocator-api2",
@@ -3447,7 +3484,16 @@ version = "0.8.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e8094feaf31ff591f651a2664fb9cfd92bba7a60ce3197265e9482ebe753c8f7"
dependencies = [
- "hashbrown 0.14.3",
+ "hashbrown 0.14.5",
+]
+
+[[package]]
+name = "hashlink"
+version = "0.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "692eaaf7f7607518dd3cef090f1474b61edc5301d8012f09579920df68b725ee"
+dependencies = [
+ "hashbrown 0.14.5",
]
[[package]]
@@ -3480,6 +3526,12 @@ version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8"
+[[package]]
+name = "heck"
+version = "0.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
+
[[package]]
name = "hermit-abi"
version = "0.1.19"
@@ -3533,7 +3585,7 @@ dependencies = [
"ipnet",
"once_cell",
"rand",
- "socket2 0.5.6",
+ "socket2 0.5.7",
"thiserror",
"tinyvec",
"tokio",
@@ -3553,7 +3605,7 @@ dependencies = [
"ipconfig",
"lru-cache",
"once_cell",
- "parking_lot 0.12.1",
+ "parking_lot 0.12.3",
"rand",
"resolv-conf",
"smallvec",
@@ -3704,7 +3756,7 @@ dependencies = [
"lru",
"network",
"operation_pool",
- "parking_lot 0.12.1",
+ "parking_lot 0.12.3",
"proto_array",
"safe_arith",
"sensitive_url",
@@ -3781,7 +3833,7 @@ dependencies = [
"httpdate",
"itoa",
"pin-project-lite",
- "socket2 0.5.6",
+ "socket2 0.5.7",
"tokio",
"tower-service",
"tracing",
@@ -3816,7 +3868,7 @@ dependencies = [
"futures-util",
"http 0.2.12",
"hyper 0.14.28",
- "rustls 0.21.11",
+ "rustls 0.21.12",
"tokio",
"tokio-rustls 0.24.1",
]
@@ -3836,9 +3888,9 @@ dependencies = [
[[package]]
name = "hyper-util"
-version = "0.1.3"
+version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ca38ef113da30126bbff9cd1705f9273e15d45498615d138b0c20279ac7a76aa"
+checksum = "7b875924a60b96e5d7b9ae7b066540b1dd1cbd90d1828f54c92e02a283351c56"
dependencies = [
"bytes",
"futures-util",
@@ -3846,7 +3898,6 @@ dependencies = [
"http-body 1.0.0",
"hyper 1.3.1",
"pin-project-lite",
- "socket2 0.5.6",
"tokio",
]
@@ -3962,7 +4013,7 @@ version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ba6a270039626615617f3f36d15fc827041df3b78c439da2cadfa47455a77f2f"
dependencies = [
- "parity-scale-codec 3.6.9",
+ "parity-scale-codec 3.6.12",
]
[[package]]
@@ -4026,7 +4077,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26"
dependencies = [
"equivalent",
- "hashbrown 0.14.3",
+ "hashbrown 0.14.5",
]
[[package]]
@@ -4040,9 +4091,9 @@ dependencies = [
[[package]]
name = "instant"
-version = "0.1.12"
+version = "0.1.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c"
+checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222"
dependencies = [
"cfg-if",
"js-sys",
@@ -4085,7 +4136,7 @@ version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b58db92f96b720de98181bbbe63c831e87005ab460c1bf306eb2622b4707997f"
dependencies = [
- "socket2 0.5.6",
+ "socket2 0.5.7",
"widestring 1.1.0",
"windows-sys 0.48.0",
"winreg",
@@ -4108,6 +4159,12 @@ dependencies = [
"windows-sys 0.52.0",
]
+[[package]]
+name = "is_terminal_polyfill"
+version = "1.70.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f8478577c03552c21db0e2724ffb8986a5ce7af88107e6be5d2ee6e158c12800"
+
[[package]]
name = "itertools"
version = "0.10.5"
@@ -4224,9 +4281,9 @@ dependencies = [
[[package]]
name = "keccak-asm"
-version = "0.1.0"
+version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bb8515fff80ed850aea4a1595f2e519c003e2a00a82fe168ebf5269196caf444"
+checksum = "47a3633291834c4fbebf8673acbc1b04ec9d151418ff9b8e26dcd79129928758"
dependencies = [
"digest 0.10.7",
"sha3-asm",
@@ -4275,7 +4332,7 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55"
[[package]]
name = "lcli"
-version = "5.1.3"
+version = "5.2.1"
dependencies = [
"account_utils",
"beacon_chain",
@@ -4283,25 +4340,20 @@ dependencies = [
"clap",
"clap_utils",
"deposit_contract",
- "directory",
"env_logger 0.9.3",
"environment",
- "eth1_test_rig",
"eth2",
"eth2_network_config",
"eth2_wallet",
"ethereum_hashing",
"ethereum_ssz",
"execution_layer",
- "genesis",
"hex",
- "int_to_bytes",
"lighthouse_network",
"lighthouse_version",
"log",
"malloc_utils",
"rayon",
- "sensitive_url",
"serde",
"serde_json",
"serde_yaml",
@@ -4338,15 +4390,15 @@ dependencies = [
[[package]]
name = "libc"
-version = "0.2.153"
+version = "0.2.155"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd"
+checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c"
[[package]]
name = "libflate"
-version = "2.0.0"
+version = "2.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9f7d5654ae1795afc7ff76f4365c2c8791b0feb18e8996a96adad8ffd7c3b2bf"
+checksum = "45d9dfdc14ea4ef0900c1cddbc8dcd553fbaacd8a4a282cf4018ae9dd04fb21e"
dependencies = [
"adler32",
"core2",
@@ -4357,12 +4409,12 @@ dependencies = [
[[package]]
name = "libflate_lz77"
-version = "2.0.0"
+version = "2.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "be5f52fb8c451576ec6b79d3f4deb327398bc05bbdbd99021a6e77a4c855d524"
+checksum = "e6e0d73b369f386f1c44abd9c570d5318f55ccde816ff4b562fa452e5182863d"
dependencies = [
"core2",
- "hashbrown 0.13.2",
+ "hashbrown 0.14.5",
"rle-decode-fast",
]
@@ -4385,7 +4437,7 @@ checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058"
[[package]]
name = "libmdbx"
version = "0.1.4"
-source = "git+https://github.com/sigp/libmdbx-rs?tag=v0.1.4#096da80a83d14343f8df833006483f48075cd135"
+source = "git+https://github.com/sigp/libmdbx-rs?rev=e6ff4b9377c1619bcf0bfdf52bee5a980a432a1a#e6ff4b9377c1619bcf0bfdf52bee5a980a432a1a"
dependencies = [
"bitflags 1.3.2",
"byteorder",
@@ -4393,7 +4445,7 @@ dependencies = [
"indexmap 1.9.3",
"libc",
"mdbx-sys",
- "parking_lot 0.12.1",
+ "parking_lot 0.12.3",
"thiserror",
]
@@ -4470,7 +4522,7 @@ dependencies = [
"multihash",
"multistream-select",
"once_cell",
- "parking_lot 0.12.1",
+ "parking_lot 0.12.3",
"pin-project",
"quick-protobuf",
"rand",
@@ -4493,16 +4545,16 @@ dependencies = [
"hickory-resolver",
"libp2p-core",
"libp2p-identity",
- "parking_lot 0.12.1",
+ "parking_lot 0.12.3",
"smallvec",
"tracing",
]
[[package]]
name = "libp2p-identify"
-version = "0.44.1"
+version = "0.44.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "20499a945d2f0221fdc6269b3848892c0f370d2ee3e19c7f65a29d8f860f6126"
+checksum = "b5d635ebea5ca0c3c3e77d414ae9b67eccf2a822be06091b9c1a0d13029a1e2f"
dependencies = [
"asynchronous-codec 0.7.0",
"either",
@@ -4559,7 +4611,7 @@ dependencies = [
"libp2p-swarm",
"rand",
"smallvec",
- "socket2 0.5.6",
+ "socket2 0.5.7",
"tokio",
"tracing",
"void",
@@ -4593,7 +4645,7 @@ dependencies = [
"libp2p-core",
"libp2p-identity",
"nohash-hasher",
- "parking_lot 0.12.1",
+ "parking_lot 0.12.3",
"rand",
"smallvec",
"tracing",
@@ -4644,9 +4696,9 @@ dependencies = [
[[package]]
name = "libp2p-quic"
-version = "0.10.2"
+version = "0.10.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a0375cdfee57b47b313ef1f0fdb625b78aed770d33a40cf1c294a371ff5e6666"
+checksum = "c67296ad4e092e23f92aea3d2bdb6f24eab79c0929ed816dfb460ea2f4567d2b"
dependencies = [
"bytes",
"futures",
@@ -4655,12 +4707,12 @@ dependencies = [
"libp2p-core",
"libp2p-identity",
"libp2p-tls",
- "parking_lot 0.12.1",
+ "parking_lot 0.12.3",
"quinn",
"rand",
- "ring 0.16.20",
- "rustls 0.21.11",
- "socket2 0.5.6",
+ "ring 0.17.8",
+ "rustls 0.23.8",
+ "socket2 0.5.7",
"thiserror",
"tokio",
"tracing",
@@ -4668,9 +4720,9 @@ dependencies = [
[[package]]
name = "libp2p-swarm"
-version = "0.44.1"
+version = "0.44.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e92532fc3c4fb292ae30c371815c9b10103718777726ea5497abc268a4761866"
+checksum = "80cae6cb75f89dbca53862f9ebe0b9f463aa7b302762fcfaafb9e51dcc9b0f7e"
dependencies = [
"either",
"fnv",
@@ -4680,6 +4732,7 @@ dependencies = [
"libp2p-core",
"libp2p-identity",
"libp2p-swarm-derive",
+ "lru",
"multistream-select",
"once_cell",
"rand",
@@ -4691,14 +4744,14 @@ dependencies = [
[[package]]
name = "libp2p-swarm-derive"
-version = "0.34.1"
+version = "0.34.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b644268b4acfdaa6a6100b31226ee7a36d96ab4c43287d113bfd2308607d8b6f"
+checksum = "5daceb9dd908417b6dfcfe8e94098bc4aac54500c282e78120b885dadc09b999"
dependencies = [
- "heck",
+ "heck 0.5.0",
"proc-macro2",
"quote",
- "syn 2.0.60",
+ "syn 2.0.66",
]
[[package]]
@@ -4713,24 +4766,24 @@ dependencies = [
"libc",
"libp2p-core",
"libp2p-identity",
- "socket2 0.5.6",
+ "socket2 0.5.7",
"tokio",
"tracing",
]
[[package]]
name = "libp2p-tls"
-version = "0.3.0"
+version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "93ce7e3c2e7569d685d08ec795157981722ff96e9e9f9eae75df3c29d02b07a5"
+checksum = "251b17aebdd29df7e8f80e4d94b782fae42e934c49086e1a81ba23b60a8314f2"
dependencies = [
"futures",
"futures-rustls",
"libp2p-core",
"libp2p-identity",
"rcgen",
- "ring 0.16.20",
- "rustls 0.21.11",
+ "ring 0.17.8",
+ "rustls 0.23.8",
"rustls-webpki 0.101.7",
"thiserror",
"x509-parser",
@@ -4739,9 +4792,9 @@ dependencies = [
[[package]]
name = "libp2p-upnp"
-version = "0.2.1"
+version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b49cc89949bf0e06869297cd4fe2c132358c23fe93e76ad43950453df4da3d35"
+checksum = "cccf04b0e3ff3de52d07d5fd6c3b061d0e7f908ffc683c32d9638caedce86fc8"
dependencies = [
"futures",
"futures-timer",
@@ -4765,7 +4818,7 @@ dependencies = [
"thiserror",
"tracing",
"yamux 0.12.1",
- "yamux 0.13.1",
+ "yamux 0.13.2",
]
[[package]]
@@ -4839,9 +4892,9 @@ dependencies = [
[[package]]
name = "libz-sys"
-version = "1.1.16"
+version = "1.1.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5e143b5e666b2695d28f6bca6497720813f699c9602dd7f5cac91008b8ada7f9"
+checksum = "c15da26e5af7e25c90b37a2d75cdbf940cf4a55316de9d84c679c9b8bfabf82e"
dependencies = [
"cc",
"pkg-config",
@@ -4850,7 +4903,7 @@ dependencies = [
[[package]]
name = "lighthouse"
-version = "5.1.3"
+version = "5.2.1"
dependencies = [
"account_manager",
"account_utils",
@@ -4881,10 +4934,8 @@ dependencies = [
"slasher",
"slashing_protection",
"slog",
- "sloggers",
"task_executor",
"tempfile",
- "tracing-subscriber",
"types",
"unused_port",
"validator_client",
@@ -4896,7 +4947,6 @@ dependencies = [
name = "lighthouse_metrics"
version = "0.2.0"
dependencies = [
- "lazy_static",
"prometheus",
]
@@ -4905,8 +4955,6 @@ name = "lighthouse_network"
version = "0.2.0"
dependencies = [
"async-channel",
- "base64 0.21.7",
- "byteorder",
"bytes",
"delay_map",
"directory",
@@ -4918,20 +4966,17 @@ dependencies = [
"ethereum_ssz_derive",
"fnv",
"futures",
- "futures-ticker",
- "getrandom",
"gossipsub",
"hex",
- "hex_fmt",
- "instant",
"lazy_static",
"libp2p",
"libp2p-mplex",
"lighthouse_metrics",
"lighthouse_version",
+ "logging",
"lru",
"lru_cache",
- "parking_lot 0.12.1",
+ "parking_lot 0.12.3",
"prometheus-client",
"quickcheck",
"quickcheck_macros",
@@ -4952,12 +4997,9 @@ dependencies = [
"tiny-keccak",
"tokio",
"tokio-io-timeout",
- "tokio-util 0.6.10",
- "tracing",
- "tree_hash",
- "tree_hash_derive",
+ "tokio-util",
"types",
- "unsigned-varint 0.6.0",
+ "unsigned-varint 0.8.0",
"unused_port",
"void",
]
@@ -4985,9 +5027,9 @@ checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4"
[[package]]
name = "linux-raw-sys"
-version = "0.4.13"
+version = "0.4.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c"
+checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89"
[[package]]
name = "lmdb-rkv"
@@ -5012,9 +5054,9 @@ dependencies = [
[[package]]
name = "lock_api"
-version = "0.4.11"
+version = "0.4.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45"
+checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17"
dependencies = [
"autocfg",
"scopeguard",
@@ -5041,11 +5083,10 @@ dependencies = [
"chrono",
"lazy_static",
"lighthouse_metrics",
- "parking_lot 0.12.1",
+ "parking_lot 0.12.3",
"serde",
"serde_json",
"slog",
- "slog-async",
"slog-term",
"sloggers",
"take_mut",
@@ -5063,7 +5104,7 @@ version = "0.12.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d3262e75e648fce39813cb56ac41f3c3e3f65217ebf3844d818d1f9398cfb0dc"
dependencies = [
- "hashbrown 0.14.3",
+ "hashbrown 0.14.5",
]
[[package]]
@@ -5101,7 +5142,7 @@ dependencies = [
"lazy_static",
"libc",
"lighthouse_metrics",
- "parking_lot 0.12.1",
+ "parking_lot 0.12.3",
]
[[package]]
@@ -5150,7 +5191,7 @@ dependencies = [
[[package]]
name = "mdbx-sys"
version = "0.11.6-4"
-source = "git+https://github.com/sigp/libmdbx-rs?tag=v0.1.4#096da80a83d14343f8df833006483f48075cd135"
+source = "git+https://github.com/sigp/libmdbx-rs?rev=e6ff4b9377c1619bcf0bfdf52bee5a980a432a1a#e6ff4b9377c1619bcf0bfdf52bee5a980a432a1a"
dependencies = [
"bindgen",
"cc",
@@ -5248,7 +5289,7 @@ dependencies = [
"ethereum_ssz",
"ethereum_ssz_derive",
"itertools",
- "parking_lot 0.12.1",
+ "parking_lot 0.12.3",
"rayon",
"serde",
"smallvec",
@@ -5282,9 +5323,9 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a"
[[package]]
name = "miniz_oxide"
-version = "0.7.2"
+version = "0.7.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7"
+checksum = "87dfd01fe195c66b572b37921ad8803d010623c0aca821bea2302239d155cdae"
dependencies = [
"adler",
]
@@ -5387,11 +5428,10 @@ dependencies = [
[[package]]
name = "native-tls"
-version = "0.2.11"
+version = "0.2.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e"
+checksum = "a8614eb2c83d59d1c8cc974dd3f920198647674a0a035e1af1fa58707e317466"
dependencies = [
- "lazy_static",
"libc",
"log",
"openssl",
@@ -5479,10 +5519,8 @@ dependencies = [
"beacon_processor",
"delay_map",
"derivative",
- "environment",
"error-chain",
"eth2",
- "ethereum-types 0.14.1",
"ethereum_ssz",
"execution_layer",
"fnv",
@@ -5496,12 +5534,10 @@ dependencies = [
"lighthouse_metrics",
"lighthouse_network",
"logging",
- "lru",
"lru_cache",
"matches",
- "num_cpus",
"operation_pool",
- "parking_lot 0.12.1",
+ "parking_lot 0.12.3",
"rand",
"rlp",
"slog",
@@ -5516,7 +5552,6 @@ dependencies = [
"task_executor",
"tokio",
"tokio-stream",
- "tokio-util 0.6.10",
"types",
]
@@ -5596,11 +5631,10 @@ dependencies = [
[[package]]
name = "num-bigint"
-version = "0.4.4"
+version = "0.4.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0"
+checksum = "c165a9ab64cf766f73521c0dd2cfdff64f488b8f0b3e621face3462d3db536d7"
dependencies = [
- "autocfg",
"num-integer",
"num-traits",
]
@@ -5640,9 +5674,9 @@ dependencies = [
[[package]]
name = "num-iter"
-version = "0.1.44"
+version = "0.1.45"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d869c01cc0c455284163fd0092f1f93835385ccab5a98a0dcc497b2f8bf055a9"
+checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf"
dependencies = [
"autocfg",
"num-integer",
@@ -5651,9 +5685,9 @@ dependencies = [
[[package]]
name = "num-traits"
-version = "0.2.18"
+version = "0.2.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a"
+checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841"
dependencies = [
"autocfg",
"libm",
@@ -5671,18 +5705,18 @@ dependencies = [
[[package]]
name = "object"
-version = "0.32.2"
+version = "0.35.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441"
+checksum = "b8ec7ab813848ba4522158d5517a6093db1ded27575b070f4177b8d12b41db5e"
dependencies = [
"memchr",
]
[[package]]
name = "oid-registry"
-version = "0.6.1"
+version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9bedf36ffb6ba96c2eb7144ef6270557b52e54b20c0a8e1eb2ff99a6c6959bff"
+checksum = "1c958dd45046245b9c3c2547369bb634eb461670b2e7e0de552905801a648d1d"
dependencies = [
"asn1-rs",
]
@@ -5697,7 +5731,7 @@ checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92"
name = "oneshot_broadcast"
version = "0.1.0"
dependencies = [
- "parking_lot 0.12.1",
+ "parking_lot 0.12.3",
]
[[package]]
@@ -5760,7 +5794,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.60",
+ "syn 2.0.66",
]
[[package]]
@@ -5771,9 +5805,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf"
[[package]]
name = "openssl-src"
-version = "300.2.3+3.2.1"
+version = "300.3.0+3.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5cff92b6f71555b61bb9315f7c64da3ca43d87531622120fea0195fc761b4843"
+checksum = "eba8804a1c5765b18c4b3f907e6897ebabeedebc9830e1a0046c4a4cf44663e1"
dependencies = [
"cc",
]
@@ -5804,7 +5838,7 @@ dependencies = [
"lazy_static",
"lighthouse_metrics",
"maplit",
- "parking_lot 0.12.1",
+ "parking_lot 0.12.3",
"rand",
"rayon",
"serde",
@@ -5848,15 +5882,15 @@ dependencies = [
[[package]]
name = "parity-scale-codec"
-version = "3.6.9"
+version = "3.6.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "881331e34fa842a2fb61cc2db9643a8fedc615e47cfcc52597d1af0db9a7e8fe"
+checksum = "306800abfa29c7f16596b5970a588435e3d5b3149683d00c12b699cc19f895ee"
dependencies = [
"arrayvec",
"bitvec 1.0.1",
"byte-slice-cast",
"impl-trait-for-tuples",
- "parity-scale-codec-derive 3.6.9",
+ "parity-scale-codec-derive 3.6.12",
"serde",
]
@@ -5874,11 +5908,11 @@ dependencies = [
[[package]]
name = "parity-scale-codec-derive"
-version = "3.6.9"
+version = "3.6.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "be30eaf4b0a9fba5336683b38de57bb86d179a35862ba6bfcf57625d006bde5b"
+checksum = "d830939c76d294956402033aee57a6da7b438f2294eb94864c37b0569053a42c"
dependencies = [
- "proc-macro-crate 2.0.0",
+ "proc-macro-crate 3.1.0",
"proc-macro2",
"quote",
"syn 1.0.109",
@@ -5903,12 +5937,12 @@ dependencies = [
[[package]]
name = "parking_lot"
-version = "0.12.1"
+version = "0.12.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f"
+checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27"
dependencies = [
"lock_api",
- "parking_lot_core 0.9.9",
+ "parking_lot_core 0.9.10",
]
[[package]]
@@ -5927,15 +5961,15 @@ dependencies = [
[[package]]
name = "parking_lot_core"
-version = "0.9.9"
+version = "0.9.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e"
+checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8"
dependencies = [
"cfg-if",
"libc",
- "redox_syscall 0.4.1",
+ "redox_syscall 0.5.1",
"smallvec",
- "windows-targets 0.48.5",
+ "windows-targets 0.52.5",
]
[[package]]
@@ -5951,9 +5985,9 @@ dependencies = [
[[package]]
name = "paste"
-version = "1.0.14"
+version = "1.0.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c"
+checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a"
[[package]]
name = "pbkdf2"
@@ -5976,12 +6010,6 @@ dependencies = [
"sha2 0.10.8",
]
-[[package]]
-name = "peeking_take_while"
-version = "0.1.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099"
-
[[package]]
name = "pem"
version = "1.1.1"
@@ -5997,7 +6025,7 @@ version = "3.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8e459365e590736a54c3fa561947c84837534b8e9af6fc5bf781307e82658fae"
dependencies = [
- "base64 0.22.0",
+ "base64 0.22.1",
"serde",
]
@@ -6018,9 +6046,9 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e"
[[package]]
name = "pest"
-version = "2.7.9"
+version = "2.7.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "311fb059dee1a7b802f036316d790138c613a4e8b180c822e3925a662e9f0c95"
+checksum = "560131c633294438da9f7c4b08189194b20946c8274c6b9e38881a7874dc8ee8"
dependencies = [
"memchr",
"thiserror",
@@ -6072,7 +6100,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.60",
+ "syn 2.0.66",
]
[[package]]
@@ -6119,17 +6147,11 @@ version = "2.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e8d0eef3571242013a0d5dc84861c3ae4a652e56e12adf8bdc26ff5f8cb34c94"
-[[package]]
-name = "platforms"
-version = "3.4.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "db23d408679286588f4d4644f965003d056e3dd5abcaaa938116871d7ce2fee7"
-
[[package]]
name = "plotters"
-version = "0.3.5"
+version = "0.3.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d2c224ba00d7cadd4d5c660deaf2098e5e80e07846537c51f9cfa4be50c1fd45"
+checksum = "a15b6eccb8484002195a3e44fe65a4ce8e93a625797a063735536fd59cb01cf3"
dependencies = [
"num-traits",
"plotters-backend",
@@ -6140,30 +6162,30 @@ dependencies = [
[[package]]
name = "plotters-backend"
-version = "0.3.5"
+version = "0.3.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9e76628b4d3a7581389a35d5b6e2139607ad7c75b17aed325f210aa91f4a9609"
+checksum = "414cec62c6634ae900ea1c56128dfe87cf63e7caece0852ec76aba307cebadb7"
[[package]]
name = "plotters-svg"
-version = "0.3.5"
+version = "0.3.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "38f6d39893cca0701371e3c27294f09797214b86f1fb951b89ade8ec04e2abab"
+checksum = "81b30686a7d9c3e010b84284bdd26a29f2138574f52f5eb6f794fc0ad924e705"
dependencies = [
"plotters-backend",
]
[[package]]
name = "polling"
-version = "3.6.0"
+version = "3.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e0c976a60b2d7e99d6f229e414670a9b85d13ac305cc6d1e9c134de58c5aaaf6"
+checksum = "645493cf344456ef24219d02a768cf1fb92ddf8c92161679ae3d91b91a637be3"
dependencies = [
"cfg-if",
"concurrent-queue",
"hermit-abi 0.3.9",
"pin-project-lite",
- "rustix 0.38.33",
+ "rustix 0.38.34",
"tracing",
"windows-sys 0.52.0",
]
@@ -6309,18 +6331,18 @@ dependencies = [
[[package]]
name = "proc-macro-crate"
-version = "2.0.0"
+version = "3.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7e8366a6159044a37876a2b9817124296703c586a5c92e2c53751fa06d8d43e8"
+checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284"
dependencies = [
- "toml_edit 0.20.7",
+ "toml_edit 0.21.1",
]
[[package]]
name = "proc-macro2"
-version = "1.0.81"
+version = "1.0.84"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3d1597b0c024618f09a9c3b8655b7e430397a36d23fdafec26d6965e9eec3eba"
+checksum = "ec96c6a92621310b51366f1e28d05ef11489516e93be030060e5fc12024a49d6"
dependencies = [
"unicode-ident",
]
@@ -6342,15 +6364,15 @@ dependencies = [
[[package]]
name = "prometheus"
-version = "0.13.3"
+version = "0.13.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "449811d15fbdf5ceb5c1144416066429cf82316e2ec8ce0c1f6f8a02e7bbcf8c"
+checksum = "3d33c28a30771f7f96db69893f78b857f7450d7e0237e9c8fc6427a81bae7ed1"
dependencies = [
"cfg-if",
"fnv",
"lazy_static",
"memchr",
- "parking_lot 0.12.1",
+ "parking_lot 0.12.3",
"protobuf",
"thiserror",
]
@@ -6363,7 +6385,7 @@ checksum = "c1ca959da22a332509f2a73ae9e5f23f9dcfc31fd3a54d71f159495bd5909baa"
dependencies = [
"dtoa",
"itoa",
- "parking_lot 0.12.1",
+ "parking_lot 0.12.3",
"prometheus-client-derive-encode",
]
@@ -6375,7 +6397,7 @@ checksum = "440f724eba9f6996b75d63681b0a92b06947f1457076d503a4d2e2c8f56442b8"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.60",
+ "syn 2.0.66",
]
[[package]]
@@ -6431,7 +6453,7 @@ dependencies = [
"nix 0.24.3",
"num_cpus",
"once_cell",
- "platforms 2.0.0",
+ "platforms",
"thiserror",
"unescape",
]
@@ -6501,9 +6523,9 @@ dependencies = [
[[package]]
name = "quinn"
-version = "0.10.2"
+version = "0.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8cc2c5017e4b43d5995dcea317bc46c1e09404c0a9664d2908f7f02dfe943d75"
+checksum = "904e3d3ba178131798c6d9375db2b13b34337d489b089fc5ba0825a2ff1bee73"
dependencies = [
"bytes",
"futures-io",
@@ -6511,7 +6533,7 @@ dependencies = [
"quinn-proto",
"quinn-udp",
"rustc-hash",
- "rustls 0.21.11",
+ "rustls 0.23.8",
"thiserror",
"tokio",
"tracing",
@@ -6519,15 +6541,15 @@ dependencies = [
[[package]]
name = "quinn-proto"
-version = "0.10.6"
+version = "0.11.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "141bf7dfde2fbc246bfd3fe12f2455aa24b0fbd9af535d8c86c7bd1381ff2b1a"
+checksum = "e974563a4b1c2206bbc61191ca4da9c22e4308b4c455e8906751cc7828393f08"
dependencies = [
"bytes",
"rand",
- "ring 0.16.20",
+ "ring 0.17.8",
"rustc-hash",
- "rustls 0.21.11",
+ "rustls 0.23.8",
"slab",
"thiserror",
"tinyvec",
@@ -6536,15 +6558,15 @@ dependencies = [
[[package]]
name = "quinn-udp"
-version = "0.4.1"
+version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "055b4e778e8feb9f93c4e439f71dc2156ef13360b432b799e179a8c4cdf0b1d7"
+checksum = "e4f0def2590301f4f667db5a77f9694fb004f82796dc1a8b1508fafa3d0e8b72"
dependencies = [
- "bytes",
"libc",
- "socket2 0.5.6",
+ "once_cell",
+ "socket2 0.5.7",
"tracing",
- "windows-sys 0.48.0",
+ "windows-sys 0.52.0",
]
[[package]]
@@ -6563,7 +6585,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "51de85fb3fb6524929c8a2eb85e6b6d363de4e8c48f9e2c2eac4944abc181c93"
dependencies = [
"log",
- "parking_lot 0.12.1",
+ "parking_lot 0.12.3",
"scheduled-thread-pool",
]
@@ -6660,6 +6682,15 @@ dependencies = [
"yasna",
]
+[[package]]
+name = "redb"
+version = "2.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ed7508e692a49b6b2290b56540384ccae9b1fb4d77065640b165835b56ffe3bb"
+dependencies = [
+ "libc",
+]
+
[[package]]
name = "redox_syscall"
version = "0.2.16"
@@ -6678,6 +6709,15 @@ dependencies = [
"bitflags 1.3.2",
]
+[[package]]
+name = "redox_syscall"
+version = "0.5.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "469052894dcb553421e483e4209ee581a45100d31b4018de03e5a7ad86374a7e"
+dependencies = [
+ "bitflags 2.5.0",
+]
+
[[package]]
name = "redox_users"
version = "0.4.5"
@@ -6758,7 +6798,7 @@ dependencies = [
"once_cell",
"percent-encoding",
"pin-project-lite",
- "rustls 0.21.11",
+ "rustls 0.21.12",
"rustls-pemfile 1.0.4",
"serde",
"serde_json",
@@ -6768,7 +6808,7 @@ dependencies = [
"tokio",
"tokio-native-tls",
"tokio-rustls 0.24.1",
- "tokio-util 0.7.10",
+ "tokio-util",
"tower-service",
"url",
"wasm-bindgen",
@@ -6914,7 +6954,7 @@ dependencies = [
"fastrlp",
"num-bigint",
"num-traits",
- "parity-scale-codec 3.6.9",
+ "parity-scale-codec 3.6.12",
"primitive-types 0.12.2",
"proptest",
"rand",
@@ -6940,16 +6980,16 @@ dependencies = [
"bitflags 1.3.2",
"fallible-iterator",
"fallible-streaming-iterator",
- "hashlink",
+ "hashlink 0.8.4",
"libsqlite3-sys",
"smallvec",
]
[[package]]
name = "rustc-demangle"
-version = "0.1.23"
+version = "0.1.24"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76"
+checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f"
[[package]]
name = "rustc-hash"
@@ -6978,7 +7018,7 @@ version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366"
dependencies = [
- "semver 1.0.22",
+ "semver 1.0.23",
]
[[package]]
@@ -7006,22 +7046,22 @@ dependencies = [
[[package]]
name = "rustix"
-version = "0.38.33"
+version = "0.38.34"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e3cc72858054fcff6d7dea32df2aeaee6a7c24227366d7ea429aada2f26b16ad"
+checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f"
dependencies = [
"bitflags 2.5.0",
"errno",
"libc",
- "linux-raw-sys 0.4.13",
+ "linux-raw-sys 0.4.14",
"windows-sys 0.52.0",
]
[[package]]
name = "rustls"
-version = "0.21.11"
+version = "0.21.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7fecbfb7b1444f477b345853b1fce097a2c6fb637b2bfb87e6bc5db0f043fae4"
+checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e"
dependencies = [
"log",
"ring 0.17.8",
@@ -7038,7 +7078,21 @@ dependencies = [
"log",
"ring 0.17.8",
"rustls-pki-types",
- "rustls-webpki 0.102.2",
+ "rustls-webpki 0.102.4",
+ "subtle",
+ "zeroize",
+]
+
+[[package]]
+name = "rustls"
+version = "0.23.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "79adb16721f56eb2d843e67676896a61ce7a0fa622dc18d3e372477a029d2740"
+dependencies = [
+ "once_cell",
+ "ring 0.17.8",
+ "rustls-pki-types",
+ "rustls-webpki 0.102.4",
"subtle",
"zeroize",
]
@@ -7058,15 +7112,15 @@ version = "2.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "29993a25686778eb88d4189742cd713c9bce943bc54251a33509dc63cbacf73d"
dependencies = [
- "base64 0.22.0",
+ "base64 0.22.1",
"rustls-pki-types",
]
[[package]]
name = "rustls-pki-types"
-version = "1.4.1"
+version = "1.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ecd36cc4259e3e4514335c4a138c6b43171a8d61d8f5c9348f9fc7529416f247"
+checksum = "976295e77ce332211c0d24d92c0e83e50f5c5f046d11082cea19f3df13a3562d"
[[package]]
name = "rustls-webpki"
@@ -7080,9 +7134,9 @@ dependencies = [
[[package]]
name = "rustls-webpki"
-version = "0.102.2"
+version = "0.102.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "faaa0a62740bedb9b2ef5afa303da42764c012f743917351dc9a237ea1663610"
+checksum = "ff448f7e92e913c4b7d4c6d8e4540a1724b319b4152b8aef6d4cf8339712b33e"
dependencies = [
"ring 0.17.8",
"rustls-pki-types",
@@ -7091,9 +7145,9 @@ dependencies = [
[[package]]
name = "rustversion"
-version = "1.0.15"
+version = "1.0.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "80af6f9131f277a45a3fba6ce8e2258037bb0477a67e610d3c1fe046ab31de47"
+checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6"
[[package]]
name = "rusty-fork"
@@ -7120,9 +7174,9 @@ dependencies = [
[[package]]
name = "ryu"
-version = "1.0.17"
+version = "1.0.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1"
+checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f"
[[package]]
name = "safe_arith"
@@ -7148,23 +7202,23 @@ dependencies = [
[[package]]
name = "scale-info"
-version = "2.11.2"
+version = "2.11.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7c453e59a955f81fb62ee5d596b450383d699f152d350e9d23a0db2adb78e4c0"
+checksum = "eca070c12893629e2cc820a9761bedf6ce1dcddc9852984d1dc734b8bd9bd024"
dependencies = [
"cfg-if",
"derive_more",
- "parity-scale-codec 3.6.9",
+ "parity-scale-codec 3.6.12",
"scale-info-derive",
]
[[package]]
name = "scale-info-derive"
-version = "2.11.2"
+version = "2.11.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "18cf6c6447f813ef19eb450e985bcce6705f9ce7660db221b59093d15c79c4b7"
+checksum = "2d35494501194174bda522a32605929eefc9ecf7e0a326c26db1fdd85881eb62"
dependencies = [
- "proc-macro-crate 1.3.1",
+ "proc-macro-crate 3.1.0",
"proc-macro2",
"quote",
"syn 1.0.109",
@@ -7185,7 +7239,7 @@ version = "0.2.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3cbc66816425a074528352f5789333ecff06ca41b36b0b0efdfbb29edc391a19"
dependencies = [
- "parking_lot 0.12.1",
+ "parking_lot 0.12.3",
]
[[package]]
@@ -7252,11 +7306,11 @@ dependencies = [
[[package]]
name = "security-framework"
-version = "2.10.0"
+version = "2.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "770452e37cad93e0a50d5abc3990d2bc351c36d0328f86cefec2f2fb206eaef6"
+checksum = "c627723fd09706bacdb5cf41499e95098555af3c3c29d014dc3c458ef6be11c0"
dependencies = [
- "bitflags 1.3.2",
+ "bitflags 2.5.0",
"core-foundation",
"core-foundation-sys",
"libc",
@@ -7265,9 +7319,9 @@ dependencies = [
[[package]]
name = "security-framework-sys"
-version = "2.10.0"
+version = "2.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "41f3cc463c0ef97e11c3461a9d3787412d30e8e7eb907c79180c4a57bf7c04ef"
+checksum = "317936bbbd05227752583946b9e66d7ce3b489f84e11a94a510b4437fef407d7"
dependencies = [
"core-foundation-sys",
"libc",
@@ -7284,9 +7338,9 @@ dependencies = [
[[package]]
name = "semver"
-version = "1.0.22"
+version = "1.0.23"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "92d43fe69e652f3df9bdc2b85b2854a0825b86e4fb76bc44d945137d053639ca"
+checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b"
dependencies = [
"serde",
]
@@ -7316,9 +7370,9 @@ dependencies = [
[[package]]
name = "serde"
-version = "1.0.198"
+version = "1.0.203"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9846a40c979031340571da2545a4e5b7c4163bdae79b301d5f86d03979451fcc"
+checksum = "7253ab4de971e72fb7be983802300c30b5a7f0c2e56fab8abfc6a214307c0094"
dependencies = [
"serde_derive",
]
@@ -7333,32 +7387,22 @@ dependencies = [
"serde_urlencoded",
]
-[[package]]
-name = "serde_cbor"
-version = "0.11.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2bef2ebfde456fb76bbcf9f59315333decc4fda0b2b44b420243c11e0f5ec1f5"
-dependencies = [
- "half",
- "serde",
-]
-
[[package]]
name = "serde_derive"
-version = "1.0.198"
+version = "1.0.203"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e88edab869b01783ba905e7d0153f9fc1a6505a96e4ad3018011eedb838566d9"
+checksum = "500cbc0ebeb6f46627f50f3f5811ccf6bf00643be300b4c3eabc0ef55dc5b5ba"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.60",
+ "syn 2.0.66",
]
[[package]]
name = "serde_json"
-version = "1.0.116"
+version = "1.0.117"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3e17db7126d17feb94eb3fad46bf1a96b034e8aacbc2e775fe81505f8b0b2813"
+checksum = "455182ea6142b14f93f4bc5320a2b31c1f266b66a4a5c858b013302a5d8cbfc3"
dependencies = [
"itoa",
"ryu",
@@ -7383,14 +7427,14 @@ checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.60",
+ "syn 2.0.66",
]
[[package]]
name = "serde_spanned"
-version = "0.6.5"
+version = "0.6.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "eb3622f419d1296904700073ea6cc23ad690adbd66f13ea683df73298736f0c1"
+checksum = "79e674e01f999af37c49f70a6ede167a8a60b2503e56c5599532a65baa5969a0"
dependencies = [
"serde",
]
@@ -7501,9 +7545,9 @@ dependencies = [
[[package]]
name = "sha3-asm"
-version = "0.1.0"
+version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bac61da6b35ad76b195eb4771210f947734321a8d81d7738e1580d953bc7a15e"
+checksum = "a9b57fd861253bff08bb1919e995f90ba8f4889de2726091c8876f3a4e823b40"
dependencies = [
"cc",
"cfg-if",
@@ -7571,17 +7615,14 @@ version = "0.2.0"
dependencies = [
"clap",
"env_logger 0.9.3",
- "eth1",
"eth2_network_config",
- "ethereum-types 0.14.1",
"execution_layer",
"futures",
"node_test_rig",
- "parking_lot 0.12.1",
+ "parking_lot 0.12.3",
"rayon",
"sensitive_url",
"serde_json",
- "ssz_types",
"tokio",
"types",
]
@@ -7607,6 +7648,7 @@ version = "0.1.0"
dependencies = [
"bincode",
"byteorder",
+ "derivative",
"ethereum_ssz",
"ethereum_ssz_derive",
"filesystem",
@@ -7619,13 +7661,14 @@ dependencies = [
"logging",
"lru",
"maplit",
- "parking_lot 0.12.1",
+ "parking_lot 0.12.3",
"rand",
"rayon",
+ "redb",
"safe_arith",
"serde",
"slog",
- "sloggers",
+ "ssz_types",
"strum",
"tempfile",
"tree_hash",
@@ -7776,7 +7819,7 @@ version = "0.2.0"
dependencies = [
"lazy_static",
"lighthouse_metrics",
- "parking_lot 0.12.1",
+ "parking_lot 0.12.3",
"types",
]
@@ -7785,6 +7828,9 @@ name = "smallvec"
version = "1.13.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67"
+dependencies = [
+ "arbitrary",
+]
[[package]]
name = "snap"
@@ -7821,9 +7867,9 @@ dependencies = [
[[package]]
name = "socket2"
-version = "0.5.6"
+version = "0.5.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "05ffd9c0a93b7543e062e759284fcf5f5e3b098501104bfbdde4d404db792871"
+checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c"
dependencies = [
"libc",
"windows-sys 0.52.0",
@@ -7903,10 +7949,12 @@ dependencies = [
"lazy_static",
"lighthouse_metrics",
"merkle_proof",
+ "rand",
"rayon",
"safe_arith",
"smallvec",
"ssz_types",
+ "test_random_derive",
"tokio",
"tree_hash",
"types",
@@ -7935,7 +7983,6 @@ name = "store"
version = "0.2.0"
dependencies = [
"beacon_chain",
- "bls",
"db-key",
"directory",
"ethereum_ssz",
@@ -7944,14 +7991,11 @@ dependencies = [
"lazy_static",
"leveldb",
"lighthouse_metrics",
- "logging",
"lru",
- "parking_lot 0.12.1",
- "safe_arith",
+ "parking_lot 0.12.3",
"serde",
"slog",
"sloggers",
- "smallvec",
"state_processing",
"strum",
"tempfile",
@@ -7960,26 +8004,26 @@ dependencies = [
[[package]]
name = "stringprep"
-version = "0.1.4"
+version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bb41d74e231a107a1b4ee36bd1214b11285b77768d2e3824aedafa988fd36ee6"
+checksum = "7b4df3d392d81bd458a8a621b8bffbd2302a12ffe288a9d931670948749463b1"
dependencies = [
- "finl_unicode",
"unicode-bidi",
"unicode-normalization",
+ "unicode-properties",
]
[[package]]
name = "strsim"
-version = "0.8.0"
+version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a"
+checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623"
[[package]]
name = "strsim"
-version = "0.10.0"
+version = "0.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623"
+checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"
[[package]]
name = "strum"
@@ -7996,7 +8040,7 @@ version = "0.24.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1e385be0d24f186b4ce2f9982191e7101bb737312ad61c1f2f984f34bcf85d59"
dependencies = [
- "heck",
+ "heck 0.4.1",
"proc-macro2",
"quote",
"rustversion",
@@ -8011,9 +8055,9 @@ checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc"
[[package]]
name = "superstruct"
-version = "0.7.0"
+version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6f4e1f478a7728f8855d7e620e9a152cf8932c6614f86564c886f9b8141f3201"
+checksum = "bf0f31f730ad9e579364950e10d6172b4a9bd04b447edf5988b066a860cc340e"
dependencies = [
"darling",
"itertools",
@@ -8045,9 +8089,9 @@ dependencies = [
[[package]]
name = "syn"
-version = "2.0.60"
+version = "2.0.66"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "909518bc7b1c9b779f1bbf07f2929d35af9f0f37e47c6e9ef7f9dddc1e1821f3"
+checksum = "c42f3f41a2de00b01c0aaad383c5a45241efc8b2d1eda5661812fda5f3cdcff5"
dependencies = [
"proc-macro2",
"quote",
@@ -8068,14 +8112,13 @@ checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394"
[[package]]
name = "synstructure"
-version = "0.12.6"
+version = "0.13.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f"
+checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971"
dependencies = [
"proc-macro2",
"quote",
- "syn 1.0.109",
- "unicode-xid",
+ "syn 2.0.66",
]
[[package]]
@@ -8119,9 +8162,8 @@ name = "system_health"
version = "0.1.0"
dependencies = [
"lighthouse_network",
- "parking_lot 0.12.1",
+ "parking_lot 0.12.3",
"serde",
- "serde_json",
"sysinfo",
"types",
]
@@ -8173,7 +8215,7 @@ checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1"
dependencies = [
"cfg-if",
"fastrand",
- "rustix 0.38.33",
+ "rustix 0.38.34",
"windows-sys 0.52.0",
]
@@ -8197,6 +8239,16 @@ dependencies = [
"winapi-util",
]
+[[package]]
+name = "terminal_size"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "21bebf2b7c9e0a515f6e0f8c51dc0f8e4696391e6f1ff30379559f8365fb0df7"
+dependencies = [
+ "rustix 0.38.34",
+ "windows-sys 0.48.0",
+]
+
[[package]]
name = "test-test_logger"
version = "0.1.0"
@@ -8230,33 +8282,24 @@ dependencies = [
"sha2 0.10.8",
]
-[[package]]
-name = "textwrap"
-version = "0.11.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060"
-dependencies = [
- "unicode-width",
-]
-
[[package]]
name = "thiserror"
-version = "1.0.59"
+version = "1.0.61"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f0126ad08bff79f29fc3ae6a55cc72352056dfff61e3ff8bb7129476d44b23aa"
+checksum = "c546c80d6be4bc6a00c0f01730c08df82eaa7a7a61f11d656526506112cc1709"
dependencies = [
"thiserror-impl",
]
[[package]]
name = "thiserror-impl"
-version = "1.0.59"
+version = "1.0.61"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d1cd413b5d558b4c5bf3680e324a6fa5014e7b7c067a51e69dbdf47eb7148b66"
+checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.60",
+ "syn 2.0.66",
]
[[package]]
@@ -8386,7 +8429,7 @@ dependencies = [
"num_cpus",
"pin-project-lite",
"signal-hook-registry",
- "socket2 0.5.6",
+ "socket2 0.5.7",
"tokio-macros",
"windows-sys 0.48.0",
]
@@ -8409,7 +8452,7 @@ checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.60",
+ "syn 2.0.66",
]
[[package]]
@@ -8435,16 +8478,16 @@ dependencies = [
"futures-channel",
"futures-util",
"log",
- "parking_lot 0.12.1",
+ "parking_lot 0.12.3",
"percent-encoding",
"phf",
"pin-project-lite",
"postgres-protocol",
"postgres-types",
"rand",
- "socket2 0.5.6",
+ "socket2 0.5.7",
"tokio",
- "tokio-util 0.7.10",
+ "tokio-util",
"whoami",
]
@@ -8454,7 +8497,7 @@ version = "0.24.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081"
dependencies = [
- "rustls 0.21.11",
+ "rustls 0.21.12",
"tokio",
]
@@ -8478,38 +8521,22 @@ dependencies = [
"futures-core",
"pin-project-lite",
"tokio",
- "tokio-util 0.7.10",
+ "tokio-util",
]
[[package]]
name = "tokio-util"
-version = "0.6.10"
+version = "0.7.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "36943ee01a6d67977dd3f84a5a1d2efeb4ada3a1ae771cadfaa535d9d9fc6507"
+checksum = "9cf6b47b3771c49ac75ad09a6162f53ad4b8088b76ac60e8ec1455b31a189fe1"
dependencies = [
"bytes",
"futures-core",
"futures-io",
"futures-sink",
- "log",
- "pin-project-lite",
- "slab",
- "tokio",
-]
-
-[[package]]
-name = "tokio-util"
-version = "0.7.10"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15"
-dependencies = [
- "bytes",
- "futures-core",
- "futures-sink",
"pin-project-lite",
"slab",
"tokio",
- "tracing",
]
[[package]]
@@ -8535,9 +8562,9 @@ dependencies = [
[[package]]
name = "toml_datetime"
-version = "0.6.5"
+version = "0.6.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1"
+checksum = "4badfd56924ae69bcc9039335b2e017639ce3f9b001c393c1b2d1ef846ce2cbf"
dependencies = [
"serde",
]
@@ -8557,9 +8584,9 @@ dependencies = [
[[package]]
name = "toml_edit"
-version = "0.20.7"
+version = "0.21.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "70f427fce4d84c72b5b732388bf4a9f4531b53f74e2887e3ecb2481f68f66d81"
+checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1"
dependencies = [
"indexmap 2.2.6",
"toml_datetime",
@@ -8626,7 +8653,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.60",
+ "syn 2.0.66",
]
[[package]]
@@ -8731,9 +8758,9 @@ dependencies = [
[[package]]
name = "triomphe"
-version = "0.1.9"
+version = "0.1.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0eee8098afad3fb0c54a9007aab6804558410503ad676d4633f9c2559a00ac0f"
+checksum = "1b2cb4fbb9995eeb36ac86fadf24031ccd58f99d6b4b2d7b911db70bddb80d90"
dependencies = [
"serde",
"stable_deref_trait",
@@ -8758,7 +8785,6 @@ dependencies = [
"arbitrary",
"beacon_chain",
"bls",
- "cached_tree_hash",
"compare_fields",
"compare_fields_derive",
"criterion",
@@ -8779,7 +8805,7 @@ dependencies = [
"merkle_proof",
"metastruct",
"milhouse",
- "parking_lot 0.12.1",
+ "parking_lot 0.12.3",
"paste",
"rand",
"rand_xorshift",
@@ -8795,7 +8821,6 @@ dependencies = [
"smallvec",
"ssz_types",
"state_processing",
- "strum",
"superstruct",
"swap_or_not_shuffle",
"tempfile",
@@ -8867,10 +8892,10 @@ dependencies = [
]
[[package]]
-name = "unicode-width"
-version = "0.1.11"
+name = "unicode-properties"
+version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85"
+checksum = "e4259d9d4425d9f0661581b804cb85fe66a4c631cadd8f490d1c13a35d5d9291"
[[package]]
name = "unicode-xid"
@@ -8904,16 +8929,6 @@ version = "0.2.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "673aac59facbab8a9007c7f6108d11f63b603f7cabff99fabf650fea5c32b861"
-[[package]]
-name = "unsigned-varint"
-version = "0.6.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "35581ff83d4101e58b582e607120c7f5ffb17e632a980b1f38334d76b36908b2"
-dependencies = [
- "bytes",
- "tokio-util 0.6.10",
-]
-
[[package]]
name = "unsigned-varint"
version = "0.7.2"
@@ -8929,6 +8944,10 @@ name = "unsigned-varint"
version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "eb066959b24b5196ae73cb057f45598450d2c5f71460e98c49b738086eff9c06"
+dependencies = [
+ "bytes",
+ "tokio-util",
+]
[[package]]
name = "untrusted"
@@ -8948,7 +8967,7 @@ version = "0.1.0"
dependencies = [
"lazy_static",
"lru_cache",
- "parking_lot 0.12.1",
+ "parking_lot 0.12.3",
]
[[package]]
@@ -8962,6 +8981,12 @@ dependencies = [
"percent-encoding",
]
+[[package]]
+name = "utf8parse"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a"
+
[[package]]
name = "uuid"
version = "0.8.2"
@@ -8988,6 +9013,7 @@ dependencies = [
"eth2",
"eth2_keystore",
"ethereum_serde_utils",
+ "fdlimit",
"filesystem",
"futures",
"hex",
@@ -9001,7 +9027,7 @@ dependencies = [
"logging",
"malloc_utils",
"monitoring_api",
- "parking_lot 0.12.1",
+ "parking_lot 0.12.3",
"rand",
"reqwest",
"ring 0.16.20",
@@ -9050,12 +9076,10 @@ name = "validator_manager"
version = "0.1.0"
dependencies = [
"account_utils",
- "bls",
"clap",
"clap_utils",
"environment",
"eth2",
- "eth2_keystore",
"eth2_network_config",
"eth2_wallet",
"ethereum_serde_utils",
@@ -9152,7 +9176,7 @@ dependencies = [
"serde_urlencoded",
"tokio",
"tokio-rustls 0.25.0",
- "tokio-util 0.7.10",
+ "tokio-util",
"tower-service",
"tracing",
]
@@ -9210,7 +9234,7 @@ dependencies = [
"once_cell",
"proc-macro2",
"quote",
- "syn 2.0.60",
+ "syn 2.0.66",
"wasm-bindgen-shared",
]
@@ -9244,7 +9268,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.60",
+ "syn 2.0.66",
"wasm-bindgen-backend",
"wasm-bindgen-shared",
]
@@ -9291,13 +9315,12 @@ dependencies = [
"beacon_chain",
"beacon_node",
"bls",
- "byteorder",
"clap",
+ "clap_utils",
"diesel",
"diesel_migrations",
"env_logger 0.9.3",
"eth2",
- "hex",
"http_api",
"hyper 1.3.1",
"log",
@@ -9328,6 +9351,16 @@ dependencies = [
"wasm-bindgen",
]
+[[package]]
+name = "web-time"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb"
+dependencies = [
+ "js-sys",
+ "wasm-bindgen",
+]
+
[[package]]
name = "web3signer_tests"
version = "0.1.0"
@@ -9339,7 +9372,7 @@ dependencies = [
"eth2_network_config",
"futures",
"lazy_static",
- "parking_lot 0.12.1",
+ "parking_lot 0.12.3",
"reqwest",
"serde",
"serde_json",
@@ -9401,11 +9434,11 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
[[package]]
name = "winapi-util"
-version = "0.1.6"
+version = "0.1.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596"
+checksum = "4d4cc384e1e73b93bafa6fb4f1df8c41695c8a91cf9c4c64358067d15a7b6c6b"
dependencies = [
- "winapi",
+ "windows-sys 0.52.0",
]
[[package]]
@@ -9726,9 +9759,9 @@ dependencies = [
[[package]]
name = "x509-parser"
-version = "0.15.1"
+version = "0.16.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7069fba5b66b9193bd2c5d3d4ff12b839118f6bcbef5328efafafb5395cf63da"
+checksum = "fcbc162f30700d6f3f82a24bf7cc62ffe7caea42c0b2cba8bf7f3ae50cf51f69"
dependencies = [
"asn1-rs",
"data-encoding",
@@ -9764,7 +9797,7 @@ checksum = "498f4d102a79ea1c9d4dd27573c0fc96ad74c023e8da38484e47883076da25fb"
dependencies = [
"arraydeque",
"encoding_rs",
- "hashlink",
+ "hashlink 0.8.4",
]
[[package]]
@@ -9776,7 +9809,7 @@ dependencies = [
"futures",
"log",
"nohash-hasher",
- "parking_lot 0.12.1",
+ "parking_lot 0.12.3",
"pin-project",
"rand",
"static_assertions",
@@ -9784,14 +9817,15 @@ dependencies = [
[[package]]
name = "yamux"
-version = "0.13.1"
-source = "git+https://github.com/sigp/rust-yamux.git#12a23aa0e34b7807c0c5f87f06b3438f7d6c2ed0"
+version = "0.13.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5f97202f6b125031b95d83e01dc57292b529384f80bfae4677e4bbc10178cf72"
dependencies = [
"futures",
"instant",
"log",
"nohash-hasher",
- "parking_lot 0.12.1",
+ "parking_lot 0.12.3",
"pin-project",
"rand",
"static_assertions",
@@ -9808,29 +9842,29 @@ dependencies = [
[[package]]
name = "zerocopy"
-version = "0.7.32"
+version = "0.7.34"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be"
+checksum = "ae87e3fcd617500e5d106f0380cf7b77f3c6092aae37191433159dda23cfb087"
dependencies = [
"zerocopy-derive",
]
[[package]]
name = "zerocopy-derive"
-version = "0.7.32"
+version = "0.7.34"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6"
+checksum = "15e934569e47891f7d9411f1a451d947a60e000ab3bd24fbb970f000387d1b3b"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.60",
+ "syn 2.0.66",
]
[[package]]
name = "zeroize"
-version = "1.7.0"
+version = "1.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d"
+checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde"
dependencies = [
"zeroize_derive",
]
@@ -9843,7 +9877,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.60",
+ "syn 2.0.66",
]
[[package]]
diff --git a/Cargo.toml b/Cargo.toml
index be2011ba286..fad5fbead14 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -51,7 +51,6 @@ members = [
"database_manager",
- "consensus/cached_tree_hash",
"consensus/int_to_bytes",
"consensus/fork_choice",
"consensus/proto_array",
@@ -102,12 +101,12 @@ bincode = "1"
bitvec = "1"
byteorder = "1"
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 }
-clap = "2"
compare_fields_derive = { path = "common/compare_fields_derive" }
-criterion = "0.3"
+criterion = "0.5"
delay_map = "0.3"
derivative = "2"
dirs = "3"
@@ -127,6 +126,7 @@ fnv = "1"
fs2 = "0.4"
futures = "0.3"
hex = "0.4"
+hashlink = "0.9.0"
hyper = "1"
itertools = "0.10"
lazy_static = "1"
@@ -154,21 +154,21 @@ serde_json = "1"
serde_repr = "0.1"
serde_yaml = "0.9"
sha2 = "0.9"
-slog = { version = "2", features = ["max_level_trace", "release_max_level_trace", "nested-values"] }
+slog = { version = "2", features = ["max_level_debug", "release_max_level_debug", "nested-values"] }
slog-async = "2"
slog-term = "2"
sloggers = { version = "2", features = ["json"] }
-smallvec = "1.11.2"
+smallvec = { version = "1.11.2", features = ["arbitrary"] }
snap = "1"
ssz_types = "0.6"
strum = { version = "0.24", features = ["derive"] }
-superstruct = "0.7"
+superstruct = "0.8"
syn = "1"
sysinfo = "0.26"
tempfile = "3"
tokio = { version = "1", features = ["rt-multi-thread", "sync", "signal"] }
tokio-stream = { version = "0.1", features = ["sync"] }
-tokio-util = { version = "0.6", features = ["codec", "compat", "time"] }
+tokio-util = { version = "0.7", features = ["codec", "compat", "time"] }
tracing = "0.1.40"
tracing-appender = "0.2"
tracing-core = "0.1"
@@ -188,7 +188,6 @@ beacon_chain = { path = "beacon_node/beacon_chain" }
beacon_node = { path = "beacon_node" }
beacon_processor = { path = "beacon_node/beacon_processor" }
bls = { path = "crypto/bls" }
-cached_tree_hash = { path = "consensus/cached_tree_hash" }
clap_utils = { path = "common/clap_utils" }
compare_fields = { path = "common/compare_fields" }
deposit_contract = { path = "common/deposit_contract" }
@@ -238,9 +237,6 @@ validator_client = { path = "validator_client" }
validator_dir = { path = "common/validator_dir" }
warp_utils = { path = "common/warp_utils" }
-[patch.crates-io]
-yamux = { git = "https://github.com/sigp/rust-yamux.git" }
-
[profile.maxperf]
inherits = "release"
lto = "fat"
diff --git a/Dockerfile b/Dockerfile
index 901c1b83d63..ff7f14d534e 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,11 +1,11 @@
-FROM rust:1.75.0-bullseye AS builder
+FROM rust:1.78.0-bullseye AS builder
RUN apt-get update && apt-get -y upgrade && apt-get install -y cmake libclang-dev
COPY . lighthouse
ARG FEATURES
ARG PROFILE=release
ARG CARGO_USE_GIT_CLI=true
-ENV FEATURES $FEATURES
-ENV PROFILE $PROFILE
+ENV FEATURES=$FEATURES
+ENV PROFILE=$PROFILE
ENV CARGO_NET_GIT_FETCH_WITH_CLI=$CARGO_USE_GIT_CLI
RUN cd lighthouse && make
diff --git a/FUNDING.json b/FUNDING.json
new file mode 100644
index 00000000000..5001999927c
--- /dev/null
+++ b/FUNDING.json
@@ -0,0 +1,7 @@
+{
+ "drips": {
+ "ethereum": {
+ "ownedBy": "0x25c4a76E7d118705e7Ea2e9b7d8C59930d8aCD3b"
+ }
+ }
+}
\ No newline at end of file
diff --git a/Makefile b/Makefile
index 12d33cc3a8b..d18a6738803 100644
--- a/Makefile
+++ b/Makefile
@@ -14,16 +14,8 @@ BUILD_PATH_AARCH64 = "target/$(AARCH64_TAG)/release"
PINNED_NIGHTLY ?= nightly
CLIPPY_PINNED_NIGHTLY=nightly-2022-05-19
-# List of features to use when building natively. Can be overridden via the environment.
-# No jemalloc on Windows
-ifeq ($(OS),Windows_NT)
- FEATURES?=
-else
- FEATURES?=jemalloc
-endif
-
# List of features to use when cross-compiling. Can be overridden via the environment.
-CROSS_FEATURES ?= gnosis,slasher-lmdb,slasher-mdbx,jemalloc
+CROSS_FEATURES ?= gnosis,slasher-lmdb,slasher-mdbx,slasher-redb,jemalloc
# Cargo profile for Cross builds. Default is for local builds, CI uses an override.
CROSS_PROFILE ?= release
@@ -182,8 +174,9 @@ test-network-%:
# Run the tests in the `slasher` crate for all supported database backends.
test-slasher:
cargo nextest run --release -p slasher --features "lmdb,$(TEST_FEATURES)"
+ cargo nextest run --release -p slasher --no-default-features --features "redb,$(TEST_FEATURES)"
cargo nextest run --release -p slasher --no-default-features --features "mdbx,$(TEST_FEATURES)"
- cargo nextest run --release -p slasher --features "lmdb,mdbx,$(TEST_FEATURES)" # both backends enabled
+ cargo nextest run --release -p slasher --features "lmdb,mdbx,redb,$(TEST_FEATURES)" # all backends enabled
# Runs only the tests/state_transition_vectors tests.
run-state-transition-tests:
@@ -214,6 +207,10 @@ cli:
cli-local:
make && ./scripts/cli.sh
+# Check for markdown files
+mdlint:
+ ./scripts/mdlint.sh
+
# Runs the entire test suite, downloading test vectors if required.
test-full: cargo-fmt test-release test-debug test-ef test-exec-engine
@@ -225,7 +222,6 @@ lint:
-D clippy::manual_let_else \
-D warnings \
-A clippy::derive_partial_eq_without_eq \
- -A clippy::from-over-into \
-A clippy::upper-case-acronyms \
-A clippy::vec-init-then-push \
-A clippy::question-mark \
diff --git a/account_manager/Cargo.toml b/account_manager/Cargo.toml
index 0fab7b31fe3..7f2fa05a888 100644
--- a/account_manager/Cargo.toml
+++ b/account_manager/Cargo.toml
@@ -27,9 +27,6 @@ safe_arith = { workspace = true }
slot_clock = { workspace = true }
filesystem = { workspace = true }
sensitive_url = { workspace = true }
-serde = { workspace = true }
-serde_json = { workspace = true }
-slog = { workspace = true }
[dev-dependencies]
tempfile = { workspace = true }
diff --git a/account_manager/src/lib.rs b/account_manager/src/lib.rs
index ce7e8a42c24..534939cf6bd 100644
--- a/account_manager/src/lib.rs
+++ b/account_manager/src/lib.rs
@@ -2,8 +2,11 @@ mod common;
pub mod validator;
pub mod wallet;
-use clap::App;
+use clap::Arg;
+use clap::ArgAction;
use clap::ArgMatches;
+use clap::Command;
+use clap_utils::FLAG_HEADER;
use environment::Environment;
use types::EthSpec;
@@ -13,25 +16,36 @@ pub const VALIDATOR_DIR_FLAG: &str = "validator-dir";
pub const VALIDATOR_DIR_FLAG_ALIAS: &str = "validators-dir";
pub const WALLETS_DIR_FLAG: &str = "wallets-dir";
-pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
- App::new(CMD)
- .visible_aliases(&["a", "am", "account", CMD])
+pub fn cli_app() -> Command {
+ Command::new(CMD)
+ .visible_aliases(["a", "am", "account"])
.about("Utilities for generating and managing Ethereum 2.0 accounts.")
+ .display_order(0)
+ .arg(
+ Arg::new("help")
+ .long("help")
+ .short('h')
+ .help("Prints help information")
+ .action(ArgAction::HelpLong)
+ .display_order(0)
+ .help_heading(FLAG_HEADER),
+ )
.subcommand(wallet::cli_app())
.subcommand(validator::cli_app())
}
/// Run the account manager, returning an error if the operation did not succeed.
-pub fn run(matches: &ArgMatches<'_>, env: Environment) -> Result<(), String> {
+pub fn run(matches: &ArgMatches, env: Environment) -> Result<(), String> {
match matches.subcommand() {
- (wallet::CMD, Some(matches)) => wallet::cli_run(matches)?,
- (validator::CMD, Some(matches)) => validator::cli_run(matches, env)?,
- (unknown, _) => {
+ Some((wallet::CMD, matches)) => wallet::cli_run(matches)?,
+ Some((validator::CMD, matches)) => validator::cli_run(matches, env)?,
+ Some((unknown, _)) => {
return Err(format!(
"{} is not a valid {} command. See --help.",
unknown, CMD
));
}
+ _ => return Err("No subcommand provided, see --help for options".to_string()),
}
Ok(())
diff --git a/account_manager/src/validator/create.rs b/account_manager/src/validator/create.rs
index 93b041c61c4..cfe4d8e94ad 100644
--- a/account_manager/src/validator/create.rs
+++ b/account_manager/src/validator/create.rs
@@ -4,7 +4,8 @@ use crate::{SECRETS_DIR_FLAG, WALLETS_DIR_FLAG};
use account_utils::{
random_password, read_password_from_user, strip_off_newlines, validator_definitions, PlainText,
};
-use clap::{App, Arg, ArgMatches};
+use clap::{Arg, ArgAction, ArgMatches, Command};
+use clap_utils::FLAG_HEADER;
use directory::{
ensure_dir_exists, parse_path_or_default_with_flag, DEFAULT_SECRET_DIR, DEFAULT_WALLET_DIR,
};
@@ -26,73 +27,83 @@ pub const COUNT_FLAG: &str = "count";
pub const AT_MOST_FLAG: &str = "at-most";
pub const WALLET_PASSWORD_PROMPT: &str = "Enter your wallet's password:";
-pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
- App::new(CMD)
+pub fn cli_app() -> Command {
+ Command::new(CMD)
.about(
"Creates new validators from an existing EIP-2386 wallet using the EIP-2333 HD key \
derivation scheme.",
)
.arg(
- Arg::with_name(WALLET_NAME_FLAG)
+ Arg::new(WALLET_NAME_FLAG)
.long(WALLET_NAME_FLAG)
.value_name("WALLET_NAME")
.help("Use the wallet identified by this name")
- .takes_value(true),
+ .action(ArgAction::Set)
+ .display_order(0)
)
.arg(
- Arg::with_name(WALLET_PASSWORD_FLAG)
+ Arg::new(WALLET_PASSWORD_FLAG)
.long(WALLET_PASSWORD_FLAG)
.value_name("WALLET_PASSWORD_PATH")
.help("A path to a file containing the password which will unlock the wallet.")
- .takes_value(true),
+ .action(ArgAction::Set)
+ .display_order(0)
)
.arg(
- Arg::with_name(WALLETS_DIR_FLAG)
+ Arg::new(WALLETS_DIR_FLAG)
.long(WALLETS_DIR_FLAG)
.value_name(WALLETS_DIR_FLAG)
.help("A path containing Eth2 EIP-2386 wallets. Defaults to ~/.lighthouse/{network}/wallets")
- .takes_value(true)
- .conflicts_with("datadir"),
+ .action(ArgAction::Set)
+ .conflicts_with("datadir")
+ .display_order(0)
)
.arg(
- Arg::with_name(SECRETS_DIR_FLAG)
+ Arg::new(SECRETS_DIR_FLAG)
.long(SECRETS_DIR_FLAG)
.value_name("SECRETS_DIR")
.help(
"The path where the validator keystore passwords will be stored. \
Defaults to ~/.lighthouse/{network}/secrets",
)
- .takes_value(true),
+ .conflicts_with("datadir")
+ .action(ArgAction::Set)
+ .display_order(0)
)
.arg(
- Arg::with_name(DEPOSIT_GWEI_FLAG)
+ Arg::new(DEPOSIT_GWEI_FLAG)
.long(DEPOSIT_GWEI_FLAG)
.value_name("DEPOSIT_GWEI")
.help(
"The GWEI value of the deposit amount. Defaults to the minimum amount \
required for an active validator (MAX_EFFECTIVE_BALANCE)",
)
- .takes_value(true),
+ .action(ArgAction::Set)
+ .display_order(0)
)
.arg(
- Arg::with_name(STORE_WITHDRAW_FLAG)
+ Arg::new(STORE_WITHDRAW_FLAG)
.long(STORE_WITHDRAW_FLAG)
.help(
"If present, the withdrawal keystore will be stored alongside the voting \
keypair. It is generally recommended to *not* store the withdrawal key and \
instead generate them from the wallet seed when required.",
- ),
+ )
+ .action(ArgAction::SetTrue)
+ .help_heading(FLAG_HEADER)
+ .display_order(0)
)
.arg(
- Arg::with_name(COUNT_FLAG)
+ Arg::new(COUNT_FLAG)
.long(COUNT_FLAG)
.value_name("VALIDATOR_COUNT")
.help("The number of validators to create, regardless of how many already exist")
.conflicts_with("at-most")
- .takes_value(true),
+ .action(ArgAction::Set)
+ .display_order(0)
)
.arg(
- Arg::with_name(AT_MOST_FLAG)
+ Arg::new(AT_MOST_FLAG)
.long(AT_MOST_FLAG)
.value_name("AT_MOST_VALIDATORS")
.help(
@@ -100,14 +111,18 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
reach the given count. Never deletes an existing validator.",
)
.conflicts_with("count")
- .takes_value(true),
+ .action(ArgAction::Set)
+ .display_order(0)
)
.arg(
- Arg::with_name(STDIN_INPUTS_FLAG)
- .takes_value(false)
- .hidden(cfg!(windows))
+ Arg::new(STDIN_INPUTS_FLAG)
+ .action(ArgAction::SetTrue)
+ .help_heading(FLAG_HEADER)
+ .hide(cfg!(windows))
.long(STDIN_INPUTS_FLAG)
- .help("If present, read all user inputs from stdin instead of tty."),
+ .help("If present, read all user inputs from stdin instead of tty.")
+ .display_order(0)
+ .action(ArgAction::SetTrue)
)
}
@@ -119,15 +134,15 @@ pub fn cli_run(
let spec = env.core_context().eth2_config.spec;
let name: Option = clap_utils::parse_optional(matches, WALLET_NAME_FLAG)?;
- let stdin_inputs = cfg!(windows) || matches.is_present(STDIN_INPUTS_FLAG);
+ let stdin_inputs = cfg!(windows) || matches.get_flag(STDIN_INPUTS_FLAG);
- let wallet_base_dir = if matches.value_of("datadir").is_some() {
+ let wallet_base_dir = if matches.get_one::("datadir").is_some() {
let path: PathBuf = clap_utils::parse_required(matches, "datadir")?;
path.join(DEFAULT_WALLET_DIR)
} else {
parse_path_or_default_with_flag(matches, WALLETS_DIR_FLAG, DEFAULT_WALLET_DIR)?
};
- let secrets_dir = if matches.value_of("datadir").is_some() {
+ let secrets_dir = if matches.get_one::("datadir").is_some() {
let path: PathBuf = clap_utils::parse_required(matches, "datadir")?;
path.join(DEFAULT_SECRET_DIR)
} else {
@@ -144,7 +159,7 @@ pub fn cli_run(
return Err(format!(
"No wallet directory at {:?}. Use the `lighthouse --network {} {} {} {}` command to create a wallet",
wallet_base_dir,
- matches.value_of("network").unwrap_or(""),
+ matches.get_one::("network").unwrap_or(&String::from("")),
crate::CMD,
crate::wallet::CMD,
crate::wallet::create::CMD
@@ -245,7 +260,7 @@ pub fn cli_run(
.voting_keystore(keystores.voting, voting_password.as_bytes())
.withdrawal_keystore(keystores.withdrawal, withdrawal_password.as_bytes())
.create_eth1_tx_data(deposit_gwei, &spec)
- .store_withdrawal_keystore(matches.is_present(STORE_WITHDRAW_FLAG))
+ .store_withdrawal_keystore(matches.get_flag(STORE_WITHDRAW_FLAG))
.build()
.map_err(|e| format!("Unable to build validator directory: {:?}", e))?;
diff --git a/account_manager/src/validator/exit.rs b/account_manager/src/validator/exit.rs
index bc9e0ee1dd6..277d2ae8eca 100644
--- a/account_manager/src/validator/exit.rs
+++ b/account_manager/src/validator/exit.rs
@@ -1,6 +1,7 @@
use crate::wallet::create::STDIN_INPUTS_FLAG;
use bls::{Keypair, PublicKey};
-use clap::{App, Arg, ArgMatches};
+use clap::{Arg, ArgAction, ArgMatches, Command};
+use clap_utils::FLAG_HEADER;
use environment::Environment;
use eth2::{
types::{GenesisData, StateId, ValidatorData, ValidatorId, ValidatorStatus},
@@ -28,48 +29,59 @@ pub const DEFAULT_BEACON_NODE: &str = "http://localhost:5052/";
pub const CONFIRMATION_PHRASE: &str = "Exit my validator";
pub const WEBSITE_URL: &str = "https://lighthouse-book.sigmaprime.io/voluntary-exit.html";
-pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
- App::new("exit")
+pub fn cli_app() -> Command {
+ Command::new("exit")
.about("Submits a VoluntaryExit to the beacon chain for a given validator keystore.")
.arg(
- Arg::with_name(KEYSTORE_FLAG)
+ Arg::new(KEYSTORE_FLAG)
.long(KEYSTORE_FLAG)
.value_name("KEYSTORE_PATH")
.help("The path to the EIP-2335 voting keystore for the validator")
- .takes_value(true)
- .required(true),
+ .action(ArgAction::Set)
+ .required(true)
+ .display_order(0)
)
.arg(
- Arg::with_name(PASSWORD_FILE_FLAG)
+ Arg::new(PASSWORD_FILE_FLAG)
.long(PASSWORD_FILE_FLAG)
.value_name("PASSWORD_FILE_PATH")
.help("The path to the password file which unlocks the validator voting keystore")
- .takes_value(true),
+ .action(ArgAction::Set)
+ .display_order(0)
)
.arg(
- Arg::with_name(BEACON_SERVER_FLAG)
+ Arg::new(BEACON_SERVER_FLAG)
.long(BEACON_SERVER_FLAG)
.value_name("NETWORK_ADDRESS")
.help("Address to a beacon node HTTP API")
.default_value(DEFAULT_BEACON_NODE)
- .takes_value(true),
+ .action(ArgAction::Set)
+ .display_order(0)
)
.arg(
- Arg::with_name(NO_WAIT)
+ Arg::new(NO_WAIT)
.long(NO_WAIT)
.help("Exits after publishing the voluntary exit without waiting for confirmation that the exit was included in the beacon chain")
+ .action(ArgAction::SetTrue)
+ .help_heading(FLAG_HEADER)
+ .display_order(0)
)
.arg(
- Arg::with_name(NO_CONFIRMATION)
+ Arg::new(NO_CONFIRMATION)
.long(NO_CONFIRMATION)
.help("Exits without prompting for confirmation that you understand the implications of a voluntary exit. This should be used with caution")
+ .display_order(0)
+ .action(ArgAction::SetTrue)
+ .help_heading(FLAG_HEADER)
)
.arg(
- Arg::with_name(STDIN_INPUTS_FLAG)
- .takes_value(false)
- .hidden(cfg!(windows))
+ Arg::new(STDIN_INPUTS_FLAG)
+ .action(ArgAction::SetTrue)
+ .help_heading(FLAG_HEADER)
+ .hide(cfg!(windows))
.long(STDIN_INPUTS_FLAG)
- .help("If present, read all user inputs from stdin instead of tty."),
+ .help("If present, read all user inputs from stdin instead of tty.")
+ .display_order(0)
)
}
@@ -78,9 +90,9 @@ pub fn cli_run(matches: &ArgMatches, env: Environment) -> Result<
let password_file_path: Option =
clap_utils::parse_optional(matches, PASSWORD_FILE_FLAG)?;
- let stdin_inputs = cfg!(windows) || matches.is_present(STDIN_INPUTS_FLAG);
- let no_wait = matches.is_present(NO_WAIT);
- let no_confirmation = matches.is_present(NO_CONFIRMATION);
+ let stdin_inputs = cfg!(windows) || matches.get_flag(STDIN_INPUTS_FLAG);
+ let no_wait = matches.get_flag(NO_WAIT);
+ let no_confirmation = matches.get_flag(NO_CONFIRMATION);
let spec = env.eth2_config().spec.clone();
let server_url: String = clap_utils::parse_required(matches, BEACON_SERVER_FLAG)?;
diff --git a/account_manager/src/validator/import.rs b/account_manager/src/validator/import.rs
index bf000385f3a..a7c72679f74 100644
--- a/account_manager/src/validator/import.rs
+++ b/account_manager/src/validator/import.rs
@@ -9,7 +9,8 @@ use account_utils::{
},
ZeroizeString,
};
-use clap::{App, Arg, ArgMatches};
+use clap::{Arg, ArgAction, ArgMatches, Command};
+use clap_utils::FLAG_HEADER;
use slashing_protection::{SlashingDatabase, SLASHING_PROTECTION_FILENAME};
use std::fs;
use std::path::PathBuf;
@@ -25,8 +26,8 @@ pub const PASSWORD_PROMPT: &str = "Enter the keystore password, or press enter t
pub const KEYSTORE_REUSE_WARNING: &str = "DO NOT USE THE ORIGINAL KEYSTORES TO VALIDATE WITH \
ANOTHER CLIENT, OR YOU WILL GET SLASHED.";
-pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
- App::new(CMD)
+pub fn cli_app() -> Command {
+ Command::new(CMD)
.about(
"Imports one or more EIP-2335 passwords into a Lighthouse VC directory, \
requesting passwords interactively. The directory flag provides a convenient \
@@ -34,16 +35,17 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
Python utility.",
)
.arg(
- Arg::with_name(KEYSTORE_FLAG)
+ Arg::new(KEYSTORE_FLAG)
.long(KEYSTORE_FLAG)
.value_name("KEYSTORE_PATH")
.help("Path to a single keystore to be imported.")
.conflicts_with(DIR_FLAG)
- .required_unless(DIR_FLAG)
- .takes_value(true),
+ .required_unless_present(DIR_FLAG)
+ .action(ArgAction::Set)
+ .display_order(0),
)
.arg(
- Arg::with_name(DIR_FLAG)
+ Arg::new(DIR_FLAG)
.long(DIR_FLAG)
.value_name("KEYSTORES_DIRECTORY")
.help(
@@ -53,23 +55,29 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
has the '.json' extension will be attempted to be imported.",
)
.conflicts_with(KEYSTORE_FLAG)
- .required_unless(KEYSTORE_FLAG)
- .takes_value(true),
+ .required_unless_present(KEYSTORE_FLAG)
+ .action(ArgAction::Set)
+ .display_order(0),
)
.arg(
- Arg::with_name(STDIN_INPUTS_FLAG)
- .takes_value(false)
- .hidden(cfg!(windows))
+ Arg::new(STDIN_INPUTS_FLAG)
+ .action(ArgAction::SetTrue)
+ .help_heading(FLAG_HEADER)
+ .hide(cfg!(windows))
.long(STDIN_INPUTS_FLAG)
- .help("If present, read all user inputs from stdin instead of tty."),
+ .help("If present, read all user inputs from stdin instead of tty.")
+ .display_order(0),
)
.arg(
- Arg::with_name(REUSE_PASSWORD_FLAG)
+ Arg::new(REUSE_PASSWORD_FLAG)
.long(REUSE_PASSWORD_FLAG)
- .help("If present, the same password will be used for all imported keystores."),
+ .action(ArgAction::SetTrue)
+ .help_heading(FLAG_HEADER)
+ .help("If present, the same password will be used for all imported keystores.")
+ .display_order(0),
)
.arg(
- Arg::with_name(PASSWORD_FLAG)
+ Arg::new(PASSWORD_FLAG)
.long(PASSWORD_FLAG)
.value_name("KEYSTORE_PASSWORD_PATH")
.requires(REUSE_PASSWORD_FLAG)
@@ -79,15 +87,16 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
The password will be copied to the `validator_definitions.yml` file, so after \
import we strongly recommend you delete the file at KEYSTORE_PASSWORD_PATH.",
)
- .takes_value(true),
+ .action(ArgAction::Set)
+ .display_order(0),
)
}
pub fn cli_run(matches: &ArgMatches, validator_dir: PathBuf) -> Result<(), String> {
let keystore: Option = clap_utils::parse_optional(matches, KEYSTORE_FLAG)?;
let keystores_dir: Option = clap_utils::parse_optional(matches, DIR_FLAG)?;
- let stdin_inputs = cfg!(windows) || matches.is_present(STDIN_INPUTS_FLAG);
- let reuse_password = matches.is_present(REUSE_PASSWORD_FLAG);
+ let stdin_inputs = cfg!(windows) || matches.get_flag(STDIN_INPUTS_FLAG);
+ let reuse_password = matches.get_flag(REUSE_PASSWORD_FLAG);
let keystore_password_path: Option =
clap_utils::parse_optional(matches, PASSWORD_FLAG)?;
diff --git a/account_manager/src/validator/list.rs b/account_manager/src/validator/list.rs
index 33857283695..d082a49590b 100644
--- a/account_manager/src/validator/list.rs
+++ b/account_manager/src/validator/list.rs
@@ -1,11 +1,11 @@
use account_utils::validator_definitions::ValidatorDefinitions;
-use clap::App;
+use clap::Command;
use std::path::PathBuf;
pub const CMD: &str = "list";
-pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
- App::new(CMD).about("Lists the public keys of all validators.")
+pub fn cli_app() -> Command {
+ Command::new(CMD).about("Lists the public keys of all validators.")
}
pub fn cli_run(validator_dir: PathBuf) -> Result<(), String> {
diff --git a/account_manager/src/validator/mod.rs b/account_manager/src/validator/mod.rs
index af977dcf034..6616bb0c45c 100644
--- a/account_manager/src/validator/mod.rs
+++ b/account_manager/src/validator/mod.rs
@@ -7,7 +7,8 @@ pub mod recover;
pub mod slashing_protection;
use crate::{VALIDATOR_DIR_FLAG, VALIDATOR_DIR_FLAG_ALIAS};
-use clap::{App, Arg, ArgMatches};
+use clap::{Arg, ArgAction, ArgMatches, Command};
+use clap_utils::FLAG_HEADER;
use directory::{parse_path_or_default_with_flag, DEFAULT_VALIDATOR_DIR};
use environment::Environment;
use std::path::PathBuf;
@@ -15,11 +16,21 @@ use types::EthSpec;
pub const CMD: &str = "validator";
-pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
- App::new(CMD)
+pub fn cli_app() -> Command {
+ Command::new(CMD)
+ .display_order(0)
.about("Provides commands for managing Eth2 validators.")
.arg(
- Arg::with_name(VALIDATOR_DIR_FLAG)
+ Arg::new("help")
+ .long("help")
+ .short('h')
+ .help("Prints help information")
+ .action(ArgAction::HelpLong)
+ .display_order(0)
+ .help_heading(FLAG_HEADER),
+ )
+ .arg(
+ Arg::new(VALIDATOR_DIR_FLAG)
.long(VALIDATOR_DIR_FLAG)
.alias(VALIDATOR_DIR_FLAG_ALIAS)
.value_name("VALIDATOR_DIRECTORY")
@@ -27,7 +38,7 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
"The path to search for validator directories. \
Defaults to ~/.lighthouse/{network}/validators",
)
- .takes_value(true)
+ .action(ArgAction::Set)
.conflicts_with("datadir"),
)
.subcommand(create::cli_app())
@@ -40,7 +51,7 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
}
pub fn cli_run(matches: &ArgMatches, env: Environment) -> Result<(), String> {
- let validator_base_dir = if matches.value_of("datadir").is_some() {
+ let validator_base_dir = if matches.get_one::("datadir").is_some() {
let path: PathBuf = clap_utils::parse_required(matches, "datadir")?;
path.join(DEFAULT_VALIDATOR_DIR)
} else {
@@ -49,18 +60,19 @@ pub fn cli_run(matches: &ArgMatches, env: Environment) -> Result<
eprintln!("validator-dir path: {:?}", validator_base_dir);
match matches.subcommand() {
- (create::CMD, Some(matches)) => create::cli_run::(matches, env, validator_base_dir),
- (modify::CMD, Some(matches)) => modify::cli_run(matches, validator_base_dir),
- (import::CMD, Some(matches)) => import::cli_run(matches, validator_base_dir),
- (list::CMD, Some(_)) => list::cli_run(validator_base_dir),
- (recover::CMD, Some(matches)) => recover::cli_run(matches, validator_base_dir),
- (slashing_protection::CMD, Some(matches)) => {
+ Some((create::CMD, matches)) => create::cli_run::(matches, env, validator_base_dir),
+ Some((modify::CMD, matches)) => modify::cli_run(matches, validator_base_dir),
+ Some((import::CMD, matches)) => import::cli_run(matches, validator_base_dir),
+ Some((list::CMD, _)) => list::cli_run(validator_base_dir),
+ Some((recover::CMD, matches)) => recover::cli_run(matches, validator_base_dir),
+ Some((slashing_protection::CMD, matches)) => {
slashing_protection::cli_run(matches, env, validator_base_dir)
}
- (exit::CMD, Some(matches)) => exit::cli_run(matches, env),
- (unknown, _) => Err(format!(
+ Some((exit::CMD, matches)) => exit::cli_run(matches, env),
+ Some((unknown, _)) => Err(format!(
"{} does not have a {} command. See --help",
CMD, unknown
)),
+ _ => Err(format!("No command provided for {}. See --help", CMD)),
}
}
diff --git a/account_manager/src/validator/modify.rs b/account_manager/src/validator/modify.rs
index bd4ae4d8f49..571cd28bf5e 100644
--- a/account_manager/src/validator/modify.rs
+++ b/account_manager/src/validator/modify.rs
@@ -1,6 +1,7 @@
use account_utils::validator_definitions::ValidatorDefinitions;
use bls::PublicKey;
-use clap::{App, Arg, ArgMatches};
+use clap::{Arg, ArgAction, ArgMatches, Command};
+use clap_utils::FLAG_HEADER;
use std::{collections::HashSet, path::PathBuf};
pub const CMD: &str = "modify";
@@ -10,43 +11,50 @@ pub const DISABLE: &str = "disable";
pub const PUBKEY_FLAG: &str = "pubkey";
pub const ALL: &str = "all";
-pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
- App::new(CMD)
+pub fn cli_app() -> Command {
+ Command::new(CMD)
.about("Modify validator status in validator_definitions.yml.")
+ .display_order(0)
.subcommand(
- App::new(ENABLE)
+ Command::new(ENABLE)
.about("Enable validator(s) in validator_definitions.yml.")
.arg(
- Arg::with_name(PUBKEY_FLAG)
+ Arg::new(PUBKEY_FLAG)
.long(PUBKEY_FLAG)
.value_name("PUBKEY")
.help("Validator pubkey to enable")
- .takes_value(true),
+ .action(ArgAction::Set)
+ .display_order(0),
)
.arg(
- Arg::with_name(ALL)
+ Arg::new(ALL)
.long(ALL)
.help("Enable all validators in the validator directory")
- .takes_value(false)
- .conflicts_with(PUBKEY_FLAG),
+ .action(ArgAction::SetTrue)
+ .help_heading(FLAG_HEADER)
+ .conflicts_with(PUBKEY_FLAG)
+ .display_order(0),
),
)
.subcommand(
- App::new(DISABLE)
+ Command::new(DISABLE)
.about("Disable validator(s) in validator_definitions.yml.")
.arg(
- Arg::with_name(PUBKEY_FLAG)
+ Arg::new(PUBKEY_FLAG)
.long(PUBKEY_FLAG)
.value_name("PUBKEY")
.help("Validator pubkey to disable")
- .takes_value(true),
+ .action(ArgAction::Set)
+ .display_order(0),
)
.arg(
- Arg::with_name(ALL)
+ Arg::new(ALL)
.long(ALL)
.help("Disable all validators in the validator directory")
- .takes_value(false)
- .conflicts_with(PUBKEY_FLAG),
+ .action(ArgAction::SetTrue)
+ .help_heading(FLAG_HEADER)
+ .conflicts_with(PUBKEY_FLAG)
+ .display_order(0),
),
)
}
@@ -55,14 +63,15 @@ pub fn cli_run(matches: &ArgMatches, validator_dir: PathBuf) -> Result<(), Strin
// `true` implies we are setting `validator_definition.enabled = true` and
// vice versa.
let (enabled, sub_matches) = match matches.subcommand() {
- (ENABLE, Some(sub_matches)) => (true, sub_matches),
- (DISABLE, Some(sub_matches)) => (false, sub_matches),
- (unknown, _) => {
+ Some((ENABLE, sub_matches)) => (true, sub_matches),
+ Some((DISABLE, sub_matches)) => (false, sub_matches),
+ Some((unknown, _)) => {
return Err(format!(
"{} does not have a {} command. See --help",
CMD, unknown
))
}
+ _ => return Err(format!("No command provided for {}. See --help", CMD)),
};
let mut defs = ValidatorDefinitions::open(&validator_dir).map_err(|e| {
format!(
@@ -70,7 +79,7 @@ pub fn cli_run(matches: &ArgMatches, validator_dir: PathBuf) -> Result<(), Strin
validator_dir, e
)
})?;
- let pubkeys_to_modify = if sub_matches.is_present(ALL) {
+ let pubkeys_to_modify = if sub_matches.get_flag(ALL) {
defs.as_slice()
.iter()
.map(|def| def.voting_public_key.clone())
diff --git a/account_manager/src/validator/recover.rs b/account_manager/src/validator/recover.rs
index 33d3b189266..4677db18df3 100644
--- a/account_manager/src/validator/recover.rs
+++ b/account_manager/src/validator/recover.rs
@@ -4,7 +4,8 @@ use crate::wallet::create::STDIN_INPUTS_FLAG;
use crate::SECRETS_DIR_FLAG;
use account_utils::eth2_keystore::{keypair_from_secret, Keystore, KeystoreBuilder};
use account_utils::{random_password, read_mnemonic_from_cli};
-use clap::{App, Arg, ArgMatches};
+use clap::{Arg, ArgAction, ArgMatches, Command};
+use clap_utils::FLAG_HEADER;
use directory::ensure_dir_exists;
use directory::{parse_path_or_default_with_flag, DEFAULT_SECRET_DIR};
use eth2_wallet::bip39::Seed;
@@ -15,70 +16,79 @@ pub const CMD: &str = "recover";
pub const FIRST_INDEX_FLAG: &str = "first-index";
pub const MNEMONIC_FLAG: &str = "mnemonic-path";
-pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
- App::new(CMD)
+pub fn cli_app() -> Command {
+ Command::new(CMD)
.about(
"Recovers validator private keys given a BIP-39 mnemonic phrase. \
If you did not specify a `--first-index` or count `--count`, by default this will \
only recover the keys associated with the validator at index 0 for an HD wallet \
in accordance with the EIP-2333 spec.")
.arg(
- Arg::with_name(FIRST_INDEX_FLAG)
+ Arg::new(FIRST_INDEX_FLAG)
.long(FIRST_INDEX_FLAG)
.value_name("FIRST_INDEX")
.help("The first of consecutive key indexes you wish to recover.")
- .takes_value(true)
+ .action(ArgAction::Set)
.required(false)
- .default_value("0"),
+ .default_value("0")
+ .display_order(0)
)
.arg(
- Arg::with_name(COUNT_FLAG)
+ Arg::new(COUNT_FLAG)
.long(COUNT_FLAG)
.value_name("COUNT")
.help("The number of validator keys you wish to recover. Counted consecutively from the provided `--first_index`.")
- .takes_value(true)
+ .action(ArgAction::Set)
.required(false)
- .default_value("1"),
+ .default_value("1")
+ .display_order(0)
)
.arg(
- Arg::with_name(MNEMONIC_FLAG)
+ Arg::new(MNEMONIC_FLAG)
.long(MNEMONIC_FLAG)
.value_name("MNEMONIC_PATH")
.help(
"If present, the mnemonic will be read in from this file.",
)
- .takes_value(true)
+ .action(ArgAction::Set)
+ .display_order(0)
)
.arg(
- Arg::with_name(SECRETS_DIR_FLAG)
+ Arg::new(SECRETS_DIR_FLAG)
.long(SECRETS_DIR_FLAG)
.value_name("SECRETS_DIR")
.help(
"The path where the validator keystore passwords will be stored. \
Defaults to ~/.lighthouse/{network}/secrets",
)
- .takes_value(true),
+ .action(ArgAction::Set)
+ .display_order(0)
)
.arg(
- Arg::with_name(STORE_WITHDRAW_FLAG)
+ Arg::new(STORE_WITHDRAW_FLAG)
.long(STORE_WITHDRAW_FLAG)
.help(
"If present, the withdrawal keystore will be stored alongside the voting \
keypair. It is generally recommended to *not* store the withdrawal key and \
instead generate them from the wallet seed when required.",
- ),
+ )
+ .action(ArgAction::SetTrue)
+ .help_heading(FLAG_HEADER)
+ .display_order(0)
)
.arg(
- Arg::with_name(STDIN_INPUTS_FLAG)
- .takes_value(false)
- .hidden(cfg!(windows))
+ Arg::new(STDIN_INPUTS_FLAG)
+ .action(ArgAction::SetTrue)
+ .help_heading(FLAG_HEADER)
+ .hide(cfg!(windows))
.long(STDIN_INPUTS_FLAG)
- .help("If present, read all user inputs from stdin instead of tty."),
+ .help("If present, read all user inputs from stdin instead of tty.")
+ .display_order(0)
)
}
pub fn cli_run(matches: &ArgMatches, validator_dir: PathBuf) -> Result<(), String> {
- let secrets_dir = if matches.value_of("datadir").is_some() {
+ let secrets_dir = if matches.get_one::("datadir").is_some() {
let path: PathBuf = clap_utils::parse_required(matches, "datadir")?;
path.join(DEFAULT_SECRET_DIR)
} else {
@@ -87,7 +97,7 @@ pub fn cli_run(matches: &ArgMatches, validator_dir: PathBuf) -> Result<(), Strin
let first_index: u32 = clap_utils::parse_required(matches, FIRST_INDEX_FLAG)?;
let count: u32 = clap_utils::parse_required(matches, COUNT_FLAG)?;
let mnemonic_path: Option = clap_utils::parse_optional(matches, MNEMONIC_FLAG)?;
- let stdin_inputs = cfg!(windows) || matches.is_present(STDIN_INPUTS_FLAG);
+ let stdin_inputs = cfg!(windows) || matches.get_flag(STDIN_INPUTS_FLAG);
eprintln!("secrets-dir path: {:?}", secrets_dir);
@@ -131,7 +141,7 @@ pub fn cli_run(matches: &ArgMatches, validator_dir: PathBuf) -> Result<(), Strin
.password_dir(secrets_dir.clone())
.voting_keystore(keystores.voting, voting_password.as_bytes())
.withdrawal_keystore(keystores.withdrawal, withdrawal_password.as_bytes())
- .store_withdrawal_keystore(matches.is_present(STORE_WITHDRAW_FLAG))
+ .store_withdrawal_keystore(matches.get_flag(STORE_WITHDRAW_FLAG))
.build()
.map_err(|e| format!("Unable to build validator directory: {:?}", e))?;
diff --git a/account_manager/src/validator/slashing_protection.rs b/account_manager/src/validator/slashing_protection.rs
index ff2eeb9cbfe..bcd860a4847 100644
--- a/account_manager/src/validator/slashing_protection.rs
+++ b/account_manager/src/validator/slashing_protection.rs
@@ -1,4 +1,4 @@
-use clap::{App, Arg, ArgMatches};
+use clap::{Arg, ArgAction, ArgMatches, Command};
use environment::Environment;
use slashing_protection::{
interchange::Interchange, InterchangeError, InterchangeImportOutcome, SlashingDatabase,
@@ -18,43 +18,47 @@ pub const EXPORT_FILE_ARG: &str = "EXPORT-FILE";
pub const PUBKEYS_FLAG: &str = "pubkeys";
-pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
- App::new(CMD)
+pub fn cli_app() -> Command {
+ Command::new(CMD)
.about("Import or export slashing protection data to or from another client")
+ .display_order(0)
.subcommand(
- App::new(IMPORT_CMD)
+ Command::new(IMPORT_CMD)
.about("Import an interchange file")
.arg(
- Arg::with_name(IMPORT_FILE_ARG)
- .takes_value(true)
+ Arg::new(IMPORT_FILE_ARG)
+ .action(ArgAction::Set)
.value_name("FILE")
+ .display_order(0)
.help("The slashing protection interchange file to import (.json)"),
)
)
.subcommand(
- App::new(EXPORT_CMD)
+ Command::new(EXPORT_CMD)
.about("Export an interchange file")
.arg(
- Arg::with_name(EXPORT_FILE_ARG)
- .takes_value(true)
+ Arg::new(EXPORT_FILE_ARG)
+ .action(ArgAction::Set)
.value_name("FILE")
- .help("The filename to export the interchange file to"),
+ .help("The filename to export the interchange file to")
+ .display_order(0)
)
.arg(
- Arg::with_name(PUBKEYS_FLAG)
+ Arg::new(PUBKEYS_FLAG)
.long(PUBKEYS_FLAG)
- .takes_value(true)
+ .action(ArgAction::Set)
.value_name("PUBKEYS")
.help(
"List of public keys to export history for. Keys should be 0x-prefixed, \
comma-separated. All known keys will be exported if omitted",
- ),
+ )
+ .display_order(0)
)
)
}
pub fn cli_run(
- matches: &ArgMatches<'_>,
+ matches: &ArgMatches,
env: Environment,
validator_base_dir: PathBuf,
) -> Result<(), String> {
@@ -68,7 +72,7 @@ pub fn cli_run(
.ok_or_else(|| "Unable to get genesis state, has genesis occurred?".to_string())?;
match matches.subcommand() {
- (IMPORT_CMD, Some(matches)) => {
+ Some((IMPORT_CMD, matches)) => {
let import_filename: PathBuf = clap_utils::parse_required(matches, IMPORT_FILE_ARG)?;
let import_file = File::open(&import_filename).map_err(|e| {
format!(
@@ -168,7 +172,7 @@ pub fn cli_run(
Ok(())
}
- (EXPORT_CMD, Some(matches)) => {
+ Some((EXPORT_CMD, matches)) => {
let export_filename: PathBuf = clap_utils::parse_required(matches, EXPORT_FILE_ARG)?;
let selected_pubkeys = if let Some(pubkeys) =
@@ -215,7 +219,7 @@ pub fn cli_run(
Ok(())
}
- ("", _) => Err("No subcommand provided, see --help for options".to_string()),
- (command, _) => Err(format!("No such subcommand `{}`", command)),
+ Some((command, _)) => Err(format!("No such subcommand `{}`", command)),
+ _ => Err("No subcommand provided, see --help for options".to_string()),
}
}
diff --git a/account_manager/src/wallet/create.rs b/account_manager/src/wallet/create.rs
index accee11b5a2..12aa5d3801a 100644
--- a/account_manager/src/wallet/create.rs
+++ b/account_manager/src/wallet/create.rs
@@ -3,7 +3,7 @@ use crate::WALLETS_DIR_FLAG;
use account_utils::{
is_password_sufficiently_complex, random_password, read_password_from_user, strip_off_newlines,
};
-use clap::{App, Arg, ArgMatches};
+use clap::{Arg, ArgAction, ArgMatches, Command};
use eth2_wallet::{
bip39::{Language, Mnemonic, MnemonicType},
PlainText,
@@ -33,21 +33,22 @@ pub const NEW_WALLET_PASSWORD_PROMPT: &str =
"Enter a password for your new wallet that is at least 12 characters long:";
pub const RETYPE_PASSWORD_PROMPT: &str = "Please re-enter your wallet's new password:";
-pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
- App::new(CMD)
+pub fn cli_app() -> Command {
+ Command::new(CMD)
.about("Creates a new HD (hierarchical-deterministic) EIP-2386 wallet.")
.arg(
- Arg::with_name(NAME_FLAG)
+ Arg::new(NAME_FLAG)
.long(NAME_FLAG)
.value_name("WALLET_NAME")
.help(
"The wallet will be created with this name. It is not allowed to \
create two wallets with the same name for the same --base-dir.",
)
- .takes_value(true),
+ .action(ArgAction::Set)
+ .display_order(0)
)
.arg(
- Arg::with_name(PASSWORD_FLAG)
+ Arg::new(PASSWORD_FLAG)
.long(PASSWORD_FLAG)
.value_name("WALLET_PASSWORD_PATH")
.help(
@@ -56,49 +57,65 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
saved at that path. To avoid confusion, if the file does not already \
exist it must include a '.pass' suffix.",
)
- .takes_value(true),
+ .action(ArgAction::Set)
+ .display_order(0)
)
.arg(
- Arg::with_name(TYPE_FLAG)
+ Arg::new(TYPE_FLAG)
.long(TYPE_FLAG)
.value_name("WALLET_TYPE")
.help(
"The type of wallet to create. Only HD (hierarchical-deterministic) \
wallets are supported presently..",
)
- .takes_value(true)
- .possible_values(&[HD_TYPE])
- .default_value(HD_TYPE),
+ .action(ArgAction::Set)
+ .value_parser([HD_TYPE])
+ .default_value(HD_TYPE)
+ .display_order(0)
)
.arg(
- Arg::with_name(MNEMONIC_FLAG)
+ Arg::new(MNEMONIC_FLAG)
.long(MNEMONIC_FLAG)
.value_name("MNEMONIC_PATH")
.help(
"If present, the mnemonic will be saved to this file. DO NOT SHARE THE MNEMONIC.",
)
- .takes_value(true)
+ .action(ArgAction::Set)
+ .display_order(0)
)
.arg(
- Arg::with_name(STDIN_INPUTS_FLAG)
- .takes_value(false)
- .hidden(cfg!(windows))
+ Arg::new(STDIN_INPUTS_FLAG)
+ .action(ArgAction::SetTrue)
+ .hide(cfg!(windows))
.long(STDIN_INPUTS_FLAG)
- .help("If present, read all user inputs from stdin instead of tty."),
+ .help("If present, read all user inputs from stdin instead of tty.")
+ .display_order(0)
)
.arg(
- Arg::with_name(MNEMONIC_LENGTH_FLAG)
+ Arg::new(MNEMONIC_LENGTH_FLAG)
.long(MNEMONIC_LENGTH_FLAG)
.value_name("MNEMONIC_LENGTH")
.help("The number of words to use for the mnemonic phrase.")
- .takes_value(true)
- .validator(|len| {
- match len.parse::().ok().and_then(|words| MnemonicType::for_word_count(words).ok()) {
- Some(_) => Ok(()),
- None => Err(format!("Mnemonic length must be one of {}", MNEMONIC_TYPES.iter().map(|t| t.word_count().to_string()).collect::>().join(", "))),
- }
+ .action(ArgAction::Set)
+ .value_parser(|len: &str| {
+ match len
+ .parse::()
+ .ok()
+ .and_then(|words| MnemonicType::for_word_count(words).ok())
+ {
+ Some(_) => Ok(len.to_string()),
+ None => Err(format!(
+ "Mnemonic length must be one of {}",
+ MNEMONIC_TYPES
+ .iter()
+ .map(|t| t.word_count().to_string())
+ .collect::>()
+ .join(", ")
+ )),
+ }
})
- .default_value("24"),
+ .default_value("24")
+ .display_order(0)
)
}
@@ -153,7 +170,7 @@ pub fn create_wallet_from_mnemonic(
let name: Option = clap_utils::parse_optional(matches, NAME_FLAG)?;
let wallet_password_path: Option = clap_utils::parse_optional(matches, PASSWORD_FLAG)?;
let type_field: String = clap_utils::parse_required(matches, TYPE_FLAG)?;
- let stdin_inputs = cfg!(windows) || matches.is_present(STDIN_INPUTS_FLAG);
+ let stdin_inputs = cfg!(windows) || matches.get_flag(STDIN_INPUTS_FLAG);
let wallet_type = match type_field.as_ref() {
HD_TYPE => WalletType::Hd,
unknown => return Err(format!("--{} {} is not supported", TYPE_FLAG, unknown)),
diff --git a/account_manager/src/wallet/list.rs b/account_manager/src/wallet/list.rs
index 9190de3915d..a551ffae128 100644
--- a/account_manager/src/wallet/list.rs
+++ b/account_manager/src/wallet/list.rs
@@ -1,12 +1,12 @@
use crate::WALLETS_DIR_FLAG;
-use clap::App;
+use clap::Command;
use eth2_wallet_manager::WalletManager;
use std::path::PathBuf;
pub const CMD: &str = "list";
-pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
- App::new(CMD).about("Lists the names of all wallets.")
+pub fn cli_app() -> Command {
+ Command::new(CMD).about("Lists the names of all wallets.")
}
pub fn cli_run(wallet_base_dir: PathBuf) -> Result<(), String> {
diff --git a/account_manager/src/wallet/mod.rs b/account_manager/src/wallet/mod.rs
index dfadebf57f3..59f5f362529 100644
--- a/account_manager/src/wallet/mod.rs
+++ b/account_manager/src/wallet/mod.rs
@@ -3,21 +3,32 @@ pub mod list;
pub mod recover;
use crate::WALLETS_DIR_FLAG;
-use clap::{App, Arg, ArgMatches};
+use clap::{Arg, ArgAction, ArgMatches, Command};
+use clap_utils::FLAG_HEADER;
use directory::{ensure_dir_exists, parse_path_or_default_with_flag, DEFAULT_WALLET_DIR};
use std::path::PathBuf;
pub const CMD: &str = "wallet";
-pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
- App::new(CMD)
+pub fn cli_app() -> Command {
+ Command::new(CMD)
.about("Manage wallets, from which validator keys can be derived.")
+ .display_order(0)
.arg(
- Arg::with_name(WALLETS_DIR_FLAG)
+ Arg::new("help")
+ .long("help")
+ .short('h')
+ .help("Prints help information")
+ .action(ArgAction::HelpLong)
+ .display_order(0)
+ .help_heading(FLAG_HEADER)
+ )
+ .arg(
+ Arg::new(WALLETS_DIR_FLAG)
.long(WALLETS_DIR_FLAG)
.value_name("WALLETS_DIRECTORY")
.help("A path containing Eth2 EIP-2386 wallets. Defaults to ~/.lighthouse/{network}/wallets")
- .takes_value(true)
+ .action(ArgAction::Set)
.conflicts_with("datadir"),
)
.subcommand(create::cli_app())
@@ -26,7 +37,7 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
}
pub fn cli_run(matches: &ArgMatches) -> Result<(), String> {
- let wallet_base_dir = if matches.value_of("datadir").is_some() {
+ let wallet_base_dir = if matches.get_one::("datadir").is_some() {
let path: PathBuf = clap_utils::parse_required(matches, "datadir")?;
path.join(DEFAULT_WALLET_DIR)
} else {
@@ -37,12 +48,13 @@ pub fn cli_run(matches: &ArgMatches) -> Result<(), String> {
eprintln!("wallet-dir path: {:?}", wallet_base_dir);
match matches.subcommand() {
- (create::CMD, Some(matches)) => create::cli_run(matches, wallet_base_dir),
- (list::CMD, Some(_)) => list::cli_run(wallet_base_dir),
- (recover::CMD, Some(matches)) => recover::cli_run(matches, wallet_base_dir),
- (unknown, _) => Err(format!(
+ Some((create::CMD, matches)) => create::cli_run(matches, wallet_base_dir),
+ Some((list::CMD, _)) => list::cli_run(wallet_base_dir),
+ Some((recover::CMD, matches)) => recover::cli_run(matches, wallet_base_dir),
+ Some((unknown, _)) => Err(format!(
"{} does not have a {} command. See --help",
CMD, unknown
)),
+ _ => Err("No subcommand provided, see --help for options".to_string()),
}
}
diff --git a/account_manager/src/wallet/recover.rs b/account_manager/src/wallet/recover.rs
index 6e047aca8d2..b9641f11521 100644
--- a/account_manager/src/wallet/recover.rs
+++ b/account_manager/src/wallet/recover.rs
@@ -1,27 +1,28 @@
use crate::wallet::create::{create_wallet_from_mnemonic, STDIN_INPUTS_FLAG};
use crate::wallet::create::{HD_TYPE, NAME_FLAG, PASSWORD_FLAG, TYPE_FLAG};
use account_utils::read_mnemonic_from_cli;
-use clap::{App, Arg, ArgMatches};
+use clap::{Arg, ArgAction, ArgMatches, Command};
use std::path::PathBuf;
pub const CMD: &str = "recover";
pub const MNEMONIC_FLAG: &str = "mnemonic-path";
-pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
- App::new(CMD)
+pub fn cli_app() -> Command {
+ Command::new(CMD)
.about("Recovers an EIP-2386 wallet from a given a BIP-39 mnemonic phrase.")
.arg(
- Arg::with_name(NAME_FLAG)
+ Arg::new(NAME_FLAG)
.long(NAME_FLAG)
.value_name("WALLET_NAME")
.help(
"The wallet will be created with this name. It is not allowed to \
create two wallets with the same name for the same --base-dir.",
)
- .takes_value(true),
+ .action(ArgAction::Set)
+ .display_order(0),
)
.arg(
- Arg::with_name(PASSWORD_FLAG)
+ Arg::new(PASSWORD_FLAG)
.long(PASSWORD_FLAG)
.value_name("PASSWORD_FILE_PATH")
.help(
@@ -31,39 +32,43 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
saved at that path. To avoid confusion, if the file does not already \
exist it must include a '.pass' suffix.",
)
- .takes_value(true),
+ .action(ArgAction::Set)
+ .display_order(0),
)
.arg(
- Arg::with_name(MNEMONIC_FLAG)
+ Arg::new(MNEMONIC_FLAG)
.long(MNEMONIC_FLAG)
.value_name("MNEMONIC_PATH")
.help("If present, the mnemonic will be read in from this file.")
- .takes_value(true),
+ .action(ArgAction::Set)
+ .display_order(0),
)
.arg(
- Arg::with_name(TYPE_FLAG)
+ Arg::new(TYPE_FLAG)
.long(TYPE_FLAG)
.value_name("WALLET_TYPE")
.help(
"The type of wallet to create. Only HD (hierarchical-deterministic) \
wallets are supported presently..",
)
- .takes_value(true)
- .possible_values(&[HD_TYPE])
- .default_value(HD_TYPE),
+ .action(ArgAction::Set)
+ .value_parser([HD_TYPE])
+ .default_value(HD_TYPE)
+ .display_order(0),
)
.arg(
- Arg::with_name(STDIN_INPUTS_FLAG)
- .takes_value(false)
- .hidden(cfg!(windows))
+ Arg::new(STDIN_INPUTS_FLAG)
+ .action(ArgAction::SetTrue)
+ .hide(cfg!(windows))
.long(STDIN_INPUTS_FLAG)
- .help("If present, read all user inputs from stdin instead of tty."),
+ .help("If present, read all user inputs from stdin instead of tty.")
+ .display_order(0),
)
}
pub fn cli_run(matches: &ArgMatches, wallet_base_dir: PathBuf) -> Result<(), String> {
let mnemonic_path: Option = clap_utils::parse_optional(matches, MNEMONIC_FLAG)?;
- let stdin_inputs = cfg!(windows) || matches.is_present(STDIN_INPUTS_FLAG);
+ let stdin_inputs = cfg!(windows) || matches.get_flag(STDIN_INPUTS_FLAG);
eprintln!();
eprintln!("WARNING: KEY RECOVERY CAN LEAD TO DUPLICATING VALIDATORS KEYS, WHICH CAN LEAD TO SLASHING.");
diff --git a/beacon_node/Cargo.toml b/beacon_node/Cargo.toml
index 7cc6e2b6ae8..a5fd29c971f 100644
--- a/beacon_node/Cargo.toml
+++ b/beacon_node/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "beacon_node"
-version = "5.1.3"
+version = "5.2.1"
authors = [
"Paul Hauner ",
"Age Manning (
// Store the unaggregated attestation in the validator monitor for later processing
match chain.produce_unaggregated_attestation(current_slot, beacon_committee_index) {
Ok(unaggregated_attestation) => {
- let data = &unaggregated_attestation.data;
+ let data = unaggregated_attestation.data();
debug!(
chain.log,
diff --git a/beacon_node/beacon_chain/src/attestation_verification.rs b/beacon_node/beacon_chain/src/attestation_verification.rs
index 471c43d94f8..06fba937d84 100644
--- a/beacon_node/beacon_chain/src/attestation_verification.rs
+++ b/beacon_node/beacon_chain/src/attestation_verification.rs
@@ -35,17 +35,23 @@
mod batch;
use crate::{
- beacon_chain::VALIDATOR_PUBKEY_CACHE_LOCK_TIMEOUT, metrics,
- observed_aggregates::ObserveOutcome, observed_attesters::Error as ObservedAttestersError,
+ beacon_chain::VALIDATOR_PUBKEY_CACHE_LOCK_TIMEOUT,
+ metrics,
+ observed_aggregates::{ObserveOutcome, ObservedAttestationKey},
+ observed_attesters::Error as ObservedAttestersError,
BeaconChain, BeaconChainError, BeaconChainTypes,
};
use bls::verify_signature_sets;
+use itertools::Itertools;
use proto_array::Block as ProtoBlock;
use slog::debug;
use slot_clock::SlotClock;
use state_processing::{
- common::get_indexed_attestation,
- per_block_processing::errors::AttestationValidationError,
+ common::{
+ attesting_indices_base,
+ attesting_indices_electra::{self, get_committee_indices},
+ },
+ per_block_processing::errors::{AttestationValidationError, BlockOperationError},
signature_sets::{
indexed_attestation_signature_set_from_pubkeys,
signed_aggregate_selection_proof_signature_set, signed_aggregate_signature_set,
@@ -55,8 +61,9 @@ use std::borrow::Cow;
use strum::AsRefStr;
use tree_hash::TreeHash;
use types::{
- Attestation, BeaconCommittee, ChainSpec, CommitteeIndex, Epoch, EthSpec, ForkName, Hash256,
- IndexedAttestation, SelectionProof, SignedAggregateAndProof, Slot, SubnetId,
+ Attestation, AttestationRef, BeaconCommittee, BeaconStateError::NoCommitteeFound, ChainSpec,
+ CommitteeIndex, Epoch, EthSpec, Hash256, IndexedAttestation, SelectionProof,
+ SignedAggregateAndProof, Slot, SubnetId,
};
pub use batch::{batch_verify_aggregated_attestations, batch_verify_unaggregated_attestations};
@@ -137,6 +144,12 @@ pub enum Error {
///
/// The peer has sent an invalid message.
ValidatorIndexTooHigh(usize),
+ /// The validator index is not set to zero after Electra.
+ ///
+ /// ## Peer scoring
+ ///
+ /// The peer has sent an invalid message.
+ CommitteeIndexNonZero(usize),
/// The `attestation.data.beacon_block_root` block is unknown.
///
/// ## Peer scoring
@@ -185,6 +198,12 @@ pub enum Error {
///
/// The peer has sent an invalid message.
NotExactlyOneAggregationBitSet(usize),
+ /// The attestation doesn't have only one aggregation bit set.
+ ///
+ /// ## Peer scoring
+ ///
+ /// The peer has sent an invalid message.
+ NotExactlyOneCommitteeBitSet(usize),
/// We have already observed an attestation for the `validator_index` and refuse to process
/// another.
///
@@ -248,7 +267,7 @@ pub enum Error {
impl From for Error {
fn from(e: BeaconChainError) -> Self {
- Error::BeaconChainError(e)
+ Self::BeaconChainError(e)
}
}
@@ -263,10 +282,11 @@ enum CheckAttestationSignature {
/// `IndexedAttestation` can be derived.
///
/// These attestations have *not* undergone signature verification.
+/// The `observed_attestation_key_root` is the hashed value of an `ObservedAttestationKey`.
struct IndexedAggregatedAttestation<'a, T: BeaconChainTypes> {
signed_aggregate: &'a SignedAggregateAndProof,
indexed_attestation: IndexedAttestation,
- attestation_data_root: Hash256,
+ observed_attestation_key_root: Hash256,
}
/// Wraps a `Attestation` that has been verified up until the point that an `IndexedAttestation` can
@@ -274,7 +294,7 @@ struct IndexedAggregatedAttestation<'a, T: BeaconChainTypes> {
///
/// These attestations have *not* undergone signature verification.
struct IndexedUnaggregatedAttestation<'a, T: BeaconChainTypes> {
- attestation: &'a Attestation,
+ attestation: AttestationRef<'a, T::EthSpec>,
indexed_attestation: IndexedAttestation,
subnet_id: SubnetId,
validator_index: u64,
@@ -295,7 +315,7 @@ impl<'a, T: BeaconChainTypes> VerifiedAggregatedAttestation<'a, T> {
/// Wraps an `Attestation` that has been fully verified for propagation on the gossip network.
pub struct VerifiedUnaggregatedAttestation<'a, T: BeaconChainTypes> {
- attestation: &'a Attestation,
+ attestation: AttestationRef<'a, T::EthSpec>,
indexed_attestation: IndexedAttestation,
subnet_id: SubnetId,
}
@@ -322,20 +342,20 @@ impl<'a, T: BeaconChainTypes> Clone for IndexedUnaggregatedAttestation<'a, T> {
/// A helper trait implemented on wrapper types that can be progressed to a state where they can be
/// verified for application to fork choice.
pub trait VerifiedAttestation: Sized {
- fn attestation(&self) -> &Attestation;
+ fn attestation(&self) -> AttestationRef;
fn indexed_attestation(&self) -> &IndexedAttestation;
// Inefficient default implementation. This is overridden for gossip verified attestations.
fn into_attestation_and_indices(self) -> (Attestation, Vec) {
- let attestation = self.attestation().clone();
- let attesting_indices = self.indexed_attestation().attesting_indices.clone().into();
+ let attestation = self.attestation().clone_as_attestation();
+ let attesting_indices = self.indexed_attestation().attesting_indices_to_vec();
(attestation, attesting_indices)
}
}
impl<'a, T: BeaconChainTypes> VerifiedAttestation for VerifiedAggregatedAttestation<'a, T> {
- fn attestation(&self) -> &Attestation {
+ fn attestation(&self) -> AttestationRef {
self.attestation()
}
@@ -345,7 +365,7 @@ impl<'a, T: BeaconChainTypes> VerifiedAttestation for VerifiedAggregatedAttes
}
impl<'a, T: BeaconChainTypes> VerifiedAttestation for VerifiedUnaggregatedAttestation<'a, T> {
- fn attestation(&self) -> &Attestation {
+ fn attestation(&self) -> AttestationRef {
self.attestation
}
@@ -357,7 +377,7 @@ impl<'a, T: BeaconChainTypes> VerifiedAttestation for VerifiedUnaggregatedAtt
/// Information about invalid attestations which might still be slashable despite being invalid.
pub enum AttestationSlashInfo<'a, T: BeaconChainTypes, TErr> {
/// The attestation is invalid, but its signature wasn't checked.
- SignatureNotChecked(&'a Attestation, TErr),
+ SignatureNotChecked(AttestationRef<'a, T::EthSpec>, TErr),
/// As for `SignatureNotChecked`, but we know the `IndexedAttestation`.
SignatureNotCheckedIndexed(IndexedAttestation, TErr),
/// The attestation's signature is invalid, so it will never be slashable.
@@ -381,6 +401,11 @@ fn process_slash_info(
if let Some(slasher) = chain.slasher.as_ref() {
let (indexed_attestation, check_signature, err) = match slash_info {
SignatureNotChecked(attestation, err) => {
+ if let Error::UnknownHeadBlock { .. } = err {
+ if attestation.data().beacon_block_root == attestation.data().target.root {
+ return err;
+ }
+ }
match obtain_indexed_attestation_and_committees_per_slot(chain, attestation) {
Ok((indexed, _)) => (indexed, true, err),
Err(e) => {
@@ -446,7 +471,7 @@ impl<'a, T: BeaconChainTypes> IndexedAggregatedAttestation<'a, T> {
signed_aggregate: &SignedAggregateAndProof,
chain: &BeaconChain,
) -> Result {
- let attestation = &signed_aggregate.message.aggregate;
+ let attestation = signed_aggregate.message().aggregate();
// Ensure attestation is within the last ATTESTATION_PROPAGATION_SLOT_RANGE slots (within a
// MAXIMUM_GOSSIP_CLOCK_DISPARITY allowance).
@@ -455,30 +480,39 @@ impl<'a, T: BeaconChainTypes> IndexedAggregatedAttestation<'a, T> {
verify_propagation_slot_range(&chain.slot_clock, attestation, &chain.spec)?;
// Check the attestation's epoch matches its target.
- if attestation.data.slot.epoch(T::EthSpec::slots_per_epoch())
- != attestation.data.target.epoch
+ if attestation.data().slot.epoch(T::EthSpec::slots_per_epoch())
+ != attestation.data().target.epoch
{
return Err(Error::InvalidTargetEpoch {
- slot: attestation.data.slot,
- epoch: attestation.data.target.epoch,
+ slot: attestation.data().slot,
+ epoch: attestation.data().target.epoch,
});
}
- // Ensure the valid aggregated attestation has not already been seen locally.
- let attestation_data = &attestation.data;
- let attestation_data_root = attestation_data.tree_hash_root();
+ let observed_attestation_key_root = ObservedAttestationKey {
+ committee_index: attestation
+ .committee_index()
+ .ok_or(Error::NotExactlyOneCommitteeBitSet(0))?,
+ attestation_data: attestation.data().clone(),
+ }
+ .tree_hash_root();
+
+ // [New in Electra:EIP7549]
+ verify_committee_index(attestation)?;
if chain
.observed_attestations
.write()
- .is_known_subset(attestation, attestation_data_root)
+ .is_known_subset(attestation, observed_attestation_key_root)
.map_err(|e| Error::BeaconChainError(e.into()))?
{
metrics::inc_counter(&metrics::AGGREGATED_ATTESTATION_SUBSETS);
- return Err(Error::AttestationSupersetKnown(attestation_data_root));
+ return Err(Error::AttestationSupersetKnown(
+ observed_attestation_key_root,
+ ));
}
- let aggregator_index = signed_aggregate.message.aggregator_index;
+ let aggregator_index = signed_aggregate.message().aggregator_index();
// Ensure there has been no other observed aggregate for the given `aggregator_index`.
//
@@ -486,7 +520,7 @@ impl<'a, T: BeaconChainTypes> IndexedAggregatedAttestation<'a, T> {
match chain
.observed_aggregators
.read()
- .validator_has_been_observed(attestation.data.target.epoch, aggregator_index as usize)
+ .validator_has_been_observed(attestation.data().target.epoch, aggregator_index as usize)
{
Ok(true) => Err(Error::AggregatorAlreadyKnown(aggregator_index)),
Ok(false) => Ok(()),
@@ -518,10 +552,10 @@ impl<'a, T: BeaconChainTypes> IndexedAggregatedAttestation<'a, T> {
verify_attestation_target_root::(&head_block, attestation)?;
// Ensure that the attestation has participants.
- if attestation.aggregation_bits.is_zero() {
+ if attestation.is_aggregation_bits_zero() {
Err(Error::EmptyAggregationBitfield)
} else {
- Ok(attestation_data_root)
+ Ok(observed_attestation_key_root)
}
}
@@ -531,23 +565,47 @@ impl<'a, T: BeaconChainTypes> IndexedAggregatedAttestation<'a, T> {
chain: &BeaconChain,
) -> Result> {
use AttestationSlashInfo::*;
-
- let attestation = &signed_aggregate.message.aggregate;
- let aggregator_index = signed_aggregate.message.aggregator_index;
- let attestation_data_root = match Self::verify_early_checks(signed_aggregate, chain) {
+ let observed_attestation_key_root = match Self::verify_early_checks(signed_aggregate, chain)
+ {
Ok(root) => root,
- Err(e) => return Err(SignatureNotChecked(&signed_aggregate.message.aggregate, e)),
+ Err(e) => {
+ return Err(SignatureNotChecked(
+ signed_aggregate.message().aggregate(),
+ e,
+ ))
+ }
};
+ // Committees must be sorted by ascending index order 0..committees_per_slot
let get_indexed_attestation_with_committee =
- |(committee, _): (BeaconCommittee, CommitteesPerSlot)| {
- // Note: this clones the signature which is known to be a relatively slow operation.
- //
- // Future optimizations should remove this clone.
- let selection_proof =
- SelectionProof::from(signed_aggregate.message.selection_proof.clone());
-
- if !selection_proof
+ |(committees, _): (Vec, CommitteesPerSlot)| {
+ let (index, aggregator_index, selection_proof, data) = match signed_aggregate {
+ SignedAggregateAndProof::Base(signed_aggregate) => (
+ signed_aggregate.message.aggregate.data.index,
+ signed_aggregate.message.aggregator_index,
+ // Note: this clones the signature which is known to be a relatively slow operation.
+ // Future optimizations should remove this clone.
+ signed_aggregate.message.selection_proof.clone(),
+ signed_aggregate.message.aggregate.data.clone(),
+ ),
+ SignedAggregateAndProof::Electra(signed_aggregate) => (
+ signed_aggregate
+ .message
+ .aggregate
+ .committee_index()
+ .ok_or(Error::NotExactlyOneCommitteeBitSet(0))?,
+ signed_aggregate.message.aggregator_index,
+ signed_aggregate.message.selection_proof.clone(),
+ signed_aggregate.message.aggregate.data.clone(),
+ ),
+ };
+ let slot = data.slot;
+
+ let committee = committees
+ .get(index as usize)
+ .ok_or(Error::NoCommitteeForSlotAndIndex { slot, index })?;
+
+ if !SelectionProof::from(selection_proof)
.is_aggregator(committee.committee.len(), &chain.spec)
.map_err(|e| Error::BeaconChainError(e.into()))?
{
@@ -559,23 +617,44 @@ impl<'a, T: BeaconChainTypes> IndexedAggregatedAttestation<'a, T> {
return Err(Error::AggregatorNotInCommittee { aggregator_index });
}
- get_indexed_attestation(committee.committee, attestation)
- .map_err(|e| BeaconChainError::from(e).into())
+ // p2p aggregates have a single committee, we can assert that aggregation_bits is always
+ // less then MaxValidatorsPerCommittee
+ match signed_aggregate {
+ SignedAggregateAndProof::Base(signed_aggregate) => {
+ attesting_indices_base::get_indexed_attestation(
+ committee.committee,
+ &signed_aggregate.message.aggregate,
+ )
+ .map_err(|e| BeaconChainError::from(e).into())
+ }
+ SignedAggregateAndProof::Electra(signed_aggregate) => {
+ attesting_indices_electra::get_indexed_attestation(
+ &committees,
+ &signed_aggregate.message.aggregate,
+ )
+ .map_err(|e| BeaconChainError::from(e).into())
+ }
+ }
};
- let indexed_attestation = match map_attestation_committee(
+ let attestation = signed_aggregate.message().aggregate();
+ let indexed_attestation = match map_attestation_committees(
chain,
attestation,
get_indexed_attestation_with_committee,
) {
Ok(indexed_attestation) => indexed_attestation,
- Err(e) => return Err(SignatureNotChecked(&signed_aggregate.message.aggregate, e)),
+ Err(e) => {
+ return Err(SignatureNotChecked(
+ signed_aggregate.message().aggregate(),
+ e,
+ ))
+ }
};
-
Ok(IndexedAggregatedAttestation {
signed_aggregate,
indexed_attestation,
- attestation_data_root,
+ observed_attestation_key_root,
})
}
}
@@ -584,11 +663,11 @@ impl<'a, T: BeaconChainTypes> VerifiedAggregatedAttestation<'a, T> {
/// Run the checks that happen after the indexed attestation and signature have been checked.
fn verify_late_checks(
signed_aggregate: &SignedAggregateAndProof,
- attestation_data_root: Hash256,
+ observed_attestation_key_root: Hash256,
chain: &BeaconChain,
) -> Result<(), Error> {
- let attestation = &signed_aggregate.message.aggregate;
- let aggregator_index = signed_aggregate.message.aggregator_index;
+ let attestation = signed_aggregate.message().aggregate();
+ let aggregator_index = signed_aggregate.message().aggregator_index();
// Observe the valid attestation so we do not re-process it.
//
@@ -597,11 +676,13 @@ impl<'a, T: BeaconChainTypes> VerifiedAggregatedAttestation<'a, T> {
if let ObserveOutcome::Subset = chain
.observed_attestations
.write()
- .observe_item(attestation, Some(attestation_data_root))
+ .observe_item(attestation, Some(observed_attestation_key_root))
.map_err(|e| Error::BeaconChainError(e.into()))?
{
metrics::inc_counter(&metrics::AGGREGATED_ATTESTATION_SUBSETS);
- return Err(Error::AttestationSupersetKnown(attestation_data_root));
+ return Err(Error::AttestationSupersetKnown(
+ observed_attestation_key_root,
+ ));
}
// Observe the aggregator so we don't process another aggregate from them.
@@ -611,12 +692,12 @@ impl<'a, T: BeaconChainTypes> VerifiedAggregatedAttestation<'a, T> {
if chain
.observed_aggregators
.write()
- .observe_validator(attestation.data.target.epoch, aggregator_index as usize)
+ .observe_validator(attestation.data().target.epoch, aggregator_index as usize)
.map_err(BeaconChainError::from)?
{
return Err(Error::PriorAttestationKnown {
validator_index: aggregator_index,
- epoch: attestation.data.target.epoch,
+ epoch: attestation.data().target.epoch,
});
}
@@ -661,7 +742,7 @@ impl<'a, T: BeaconChainTypes> VerifiedAggregatedAttestation<'a, T> {
let IndexedAggregatedAttestation {
signed_aggregate,
indexed_attestation,
- attestation_data_root,
+ observed_attestation_key_root,
} = signed_aggregate;
match check_signature {
@@ -685,7 +766,9 @@ impl<'a, T: BeaconChainTypes> VerifiedAggregatedAttestation<'a, T> {
CheckAttestationSignature::No => (),
};
- if let Err(e) = Self::verify_late_checks(signed_aggregate, attestation_data_root, chain) {
+ if let Err(e) =
+ Self::verify_late_checks(signed_aggregate, observed_attestation_key_root, chain)
+ {
return Err(SignatureValid(indexed_attestation, e));
}
@@ -696,8 +779,8 @@ impl<'a, T: BeaconChainTypes> VerifiedAggregatedAttestation<'a, T> {
}
/// Returns the underlying `attestation` for the `signed_aggregate`.
- pub fn attestation(&self) -> &Attestation {
- &self.signed_aggregate.message.aggregate
+ pub fn attestation(&self) -> AttestationRef<'a, T::EthSpec> {
+ self.signed_aggregate.message().aggregate()
}
/// Returns the underlying `signed_aggregate`.
@@ -709,16 +792,16 @@ impl<'a, T: BeaconChainTypes> VerifiedAggregatedAttestation<'a, T> {
impl<'a, T: BeaconChainTypes> IndexedUnaggregatedAttestation<'a, T> {
/// Run the checks that happen before an indexed attestation is constructed.
pub fn verify_early_checks(
- attestation: &Attestation,
+ attestation: AttestationRef,
chain: &BeaconChain,
) -> Result<(), Error> {
- let attestation_epoch = attestation.data.slot.epoch(T::EthSpec::slots_per_epoch());
+ let attestation_epoch = attestation.data().slot.epoch(T::EthSpec::slots_per_epoch());
// Check the attestation's epoch matches its target.
- if attestation_epoch != attestation.data.target.epoch {
+ if attestation_epoch != attestation.data().target.epoch {
return Err(Error::InvalidTargetEpoch {
- slot: attestation.data.slot,
- epoch: attestation.data.target.epoch,
+ slot: attestation.data().slot,
+ epoch: attestation.data().target.epoch,
});
}
@@ -730,11 +813,14 @@ impl<'a, T: BeaconChainTypes> IndexedUnaggregatedAttestation<'a, T> {
// Check to ensure that the attestation is "unaggregated". I.e., it has exactly one
// aggregation bit set.
- let num_aggregation_bits = attestation.aggregation_bits.num_set_bits();
+ let num_aggregation_bits = attestation.num_set_aggregation_bits();
if num_aggregation_bits != 1 {
return Err(Error::NotExactlyOneAggregationBitSet(num_aggregation_bits));
}
+ // [New in Electra:EIP7549]
+ verify_committee_index(attestation)?;
+
// Attestations must be for a known block. If the block is unknown, we simply drop the
// attestation and do not delay consideration for later.
//
@@ -750,14 +836,14 @@ impl<'a, T: BeaconChainTypes> IndexedUnaggregatedAttestation<'a, T> {
/// Run the checks that apply to the indexed attestation before the signature is checked.
pub fn verify_middle_checks(
- attestation: &Attestation,
+ attestation: AttestationRef,
indexed_attestation: &IndexedAttestation,
committees_per_slot: u64,
subnet_id: Option,
chain: &BeaconChain,
) -> Result<(u64, SubnetId), Error> {
- let expected_subnet_id = SubnetId::compute_subnet_for_attestation_data::(
- &indexed_attestation.data,
+ let expected_subnet_id = SubnetId::compute_subnet_for_attestation::(
+ attestation,
committees_per_slot,
&chain.spec,
)
@@ -774,8 +860,7 @@ impl<'a, T: BeaconChainTypes> IndexedUnaggregatedAttestation<'a, T> {
};
let validator_index = *indexed_attestation
- .attesting_indices
- .first()
+ .attesting_indices_first()
.ok_or(Error::NotExactlyOneAggregationBitSet(0))?;
/*
@@ -785,12 +870,12 @@ impl<'a, T: BeaconChainTypes> IndexedUnaggregatedAttestation<'a, T> {
if chain
.observed_gossip_attesters
.read()
- .validator_has_been_observed(attestation.data.target.epoch, validator_index as usize)
+ .validator_has_been_observed(attestation.data().target.epoch, validator_index as usize)
.map_err(BeaconChainError::from)?
{
return Err(Error::PriorAttestationKnown {
validator_index,
- epoch: attestation.data.target.epoch,
+ epoch: attestation.data().target.epoch,
});
}
@@ -807,7 +892,7 @@ impl<'a, T: BeaconChainTypes> IndexedUnaggregatedAttestation<'a, T> {
subnet_id: Option,
chain: &BeaconChain,
) -> Result {
- Self::verify_slashable(attestation, subnet_id, chain)
+ Self::verify_slashable(attestation.to_ref(), subnet_id, chain)
.map(|verified_unaggregated| {
if let Some(slasher) = chain.slasher.as_ref() {
slasher.accept_attestation(verified_unaggregated.indexed_attestation.clone());
@@ -819,7 +904,7 @@ impl<'a, T: BeaconChainTypes> IndexedUnaggregatedAttestation<'a, T> {
/// Verify the attestation, producing extra information about whether it might be slashable.
pub fn verify_slashable(
- attestation: &'a Attestation,
+ attestation: AttestationRef<'a, T::EthSpec>,
subnet_id: Option,
chain: &BeaconChain,
) -> Result> {
@@ -868,7 +953,7 @@ impl<'a, T: BeaconChainTypes> IndexedUnaggregatedAttestation<'a, T> {
impl<'a, T: BeaconChainTypes> VerifiedUnaggregatedAttestation<'a, T> {
/// Run the checks that apply after the signature has been checked.
fn verify_late_checks(
- attestation: &Attestation,
+ attestation: AttestationRef,
validator_index: u64,
chain: &BeaconChain,
) -> Result<(), Error> {
@@ -881,12 +966,12 @@ impl<'a, T: BeaconChainTypes> VerifiedUnaggregatedAttestation<'a, T> {
if chain
.observed_gossip_attesters
.write()
- .observe_validator(attestation.data.target.epoch, validator_index as usize)
+ .observe_validator(attestation.data().target.epoch, validator_index as usize)
.map_err(BeaconChainError::from)?
{
return Err(Error::PriorAttestationKnown {
validator_index,
- epoch: attestation.data.target.epoch,
+ epoch: attestation.data().target.epoch,
});
}
Ok(())
@@ -962,7 +1047,7 @@ impl<'a, T: BeaconChainTypes> VerifiedUnaggregatedAttestation<'a, T> {
}
/// Returns the wrapped `attestation`.
- pub fn attestation(&self) -> &Attestation {
+ pub fn attestation(&self) -> AttestationRef {
self.attestation
}
@@ -992,34 +1077,34 @@ impl<'a, T: BeaconChainTypes> VerifiedUnaggregatedAttestation<'a, T> {
/// already finalized.
fn verify_head_block_is_known(
chain: &BeaconChain,
- attestation: &Attestation,
+ attestation: AttestationRef,
max_skip_slots: Option,
) -> Result {
let block_opt = chain
.canonical_head
.fork_choice_read_lock()
- .get_block(&attestation.data.beacon_block_root)
+ .get_block(&attestation.data().beacon_block_root)
.or_else(|| {
chain
.early_attester_cache
- .get_proto_block(attestation.data.beacon_block_root)
+ .get_proto_block(attestation.data().beacon_block_root)
});
if let Some(block) = block_opt {
// Reject any block that exceeds our limit on skipped slots.
if let Some(max_skip_slots) = max_skip_slots {
- if attestation.data.slot > block.slot + max_skip_slots {
+ if attestation.data().slot > block.slot + max_skip_slots {
return Err(Error::TooManySkippedSlots {
head_block_slot: block.slot,
- attestation_slot: attestation.data.slot,
+ attestation_slot: attestation.data().slot,
});
}
}
Ok(block)
- } else if chain.is_pre_finalization_block(attestation.data.beacon_block_root)? {
+ } else if chain.is_pre_finalization_block(attestation.data().beacon_block_root)? {
Err(Error::HeadBlockFinalized {
- beacon_block_root: attestation.data.beacon_block_root,
+ beacon_block_root: attestation.data().beacon_block_root,
})
} else {
// The block is either:
@@ -1029,7 +1114,7 @@ fn verify_head_block_is_known(
// 2) A post-finalization block that we don't know about yet. We'll queue
// the attestation until the block becomes available (or we time out).
Err(Error::UnknownHeadBlock {
- beacon_block_root: attestation.data.beacon_block_root,
+ beacon_block_root: attestation.data().beacon_block_root,
})
}
}
@@ -1040,10 +1125,10 @@ fn verify_head_block_is_known(
/// Accounts for `MAXIMUM_GOSSIP_CLOCK_DISPARITY`.
pub fn verify_propagation_slot_range(
slot_clock: &S,
- attestation: &Attestation,
+ attestation: AttestationRef,
spec: &ChainSpec,
) -> Result<(), Error> {
- let attestation_slot = attestation.data.slot;
+ let attestation_slot = attestation.data().slot;
let latest_permissible_slot = slot_clock
.now_with_future_tolerance(spec.maximum_gossip_clock_disparity())
.ok_or(BeaconChainError::UnableToReadSlot)?;
@@ -1062,14 +1147,13 @@ pub fn verify_propagation_slot_range(
let current_fork =
spec.fork_name_at_slot::(slot_clock.now().ok_or(BeaconChainError::UnableToReadSlot)?);
- let earliest_permissible_slot = match current_fork {
- ForkName::Base | ForkName::Altair | ForkName::Bellatrix | ForkName::Capella => {
- one_epoch_prior
- }
- // EIP-7045
- ForkName::Deneb | ForkName::Electra => one_epoch_prior
+ let earliest_permissible_slot = if !current_fork.deneb_enabled() {
+ one_epoch_prior
+ // EIP-7045
+ } else {
+ one_epoch_prior
.epoch(E::slots_per_epoch())
- .start_slot(E::slots_per_epoch()),
+ .start_slot(E::slots_per_epoch())
};
if attestation_slot < earliest_permissible_slot {
@@ -1097,18 +1181,17 @@ pub fn verify_attestation_signature(
let fork = chain
.spec
- .fork_at_epoch(indexed_attestation.data.target.epoch);
+ .fork_at_epoch(indexed_attestation.data().target.epoch);
let signature_set = indexed_attestation_signature_set_from_pubkeys(
|validator_index| pubkey_cache.get(validator_index).map(Cow::Borrowed),
- &indexed_attestation.signature,
+ indexed_attestation.signature(),
indexed_attestation,
&fork,
chain.genesis_validators_root,
&chain.spec,
)
.map_err(BeaconChainError::SignatureSetError)?;
-
metrics::stop_timer(signature_setup_timer);
let _signature_verification_timer =
@@ -1125,11 +1208,11 @@ pub fn verify_attestation_signature(
/// `attestation.data.beacon_block_root`.
pub fn verify_attestation_target_root(
head_block: &ProtoBlock,
- attestation: &Attestation,
+ attestation: AttestationRef,
) -> Result<(), Error> {
// Check the attestation target root.
let head_block_epoch = head_block.slot.epoch(E::slots_per_epoch());
- let attestation_epoch = attestation.data.slot.epoch(E::slots_per_epoch());
+ let attestation_epoch = attestation.data().slot.epoch(E::slots_per_epoch());
if head_block_epoch > attestation_epoch {
// The epoch references an invalid head block from a future epoch.
//
@@ -1142,7 +1225,7 @@ pub fn verify_attestation_target_root(
// Reference:
// https://github.com/ethereum/eth2.0-specs/pull/2001#issuecomment-699246659
return Err(Error::InvalidTargetRoot {
- attestation: attestation.data.target.root,
+ attestation: attestation.data().target.root,
// It is not clear what root we should expect in this case, since the attestation is
// fundamentally invalid.
expected: None,
@@ -1161,9 +1244,9 @@ pub fn verify_attestation_target_root(
};
// Reject any attestation with an invalid target root.
- if target_root != attestation.data.target.root {
+ if target_root != attestation.data().target.root {
return Err(Error::InvalidTargetRoot {
- attestation: attestation.data.target.root,
+ attestation: attestation.data().target.root,
expected: Some(target_root),
});
}
@@ -1194,14 +1277,14 @@ pub fn verify_signed_aggregate_signatures(
.try_read_for(VALIDATOR_PUBKEY_CACHE_LOCK_TIMEOUT)
.ok_or(BeaconChainError::ValidatorPubkeyCacheLockTimeout)?;
- let aggregator_index = signed_aggregate.message.aggregator_index;
+ let aggregator_index = signed_aggregate.message().aggregator_index();
if aggregator_index >= pubkey_cache.len() as u64 {
return Err(Error::AggregatorPubkeyUnknown(aggregator_index));
}
let fork = chain
.spec
- .fork_at_epoch(indexed_attestation.data.target.epoch);
+ .fork_at_epoch(indexed_attestation.data().target.epoch);
let signature_sets = vec![
signed_aggregate_selection_proof_signature_set(
@@ -1222,7 +1305,7 @@ pub fn verify_signed_aggregate_signatures(
.map_err(BeaconChainError::SignatureSetError)?,
indexed_attestation_signature_set_from_pubkeys(
|validator_index| pubkey_cache.get(validator_index).map(Cow::Borrowed),
- &indexed_attestation.signature,
+ indexed_attestation.signature(),
indexed_attestation,
&fork,
chain.genesis_validators_root,
@@ -1234,6 +1317,28 @@ pub fn verify_signed_aggregate_signatures(
Ok(verify_signature_sets(signature_sets.iter()))
}
+/// Verify that the `attestation` committee index is properly set for the attestation's fork.
+/// This function will only apply verification post-Electra.
+pub fn verify_committee_index(attestation: AttestationRef) -> Result<(), Error> {
+ if let Ok(committee_bits) = attestation.committee_bits() {
+ // Check to ensure that the attestation is for a single committee.
+ let num_committee_bits = get_committee_indices::(committee_bits);
+ if num_committee_bits.len() != 1 {
+ return Err(Error::NotExactlyOneCommitteeBitSet(
+ num_committee_bits.len(),
+ ));
+ }
+
+ // Ensure the attestation index is set to zero post Electra.
+ if attestation.data().index != 0 {
+ return Err(Error::CommitteeIndexNonZero(
+ attestation.data().index as usize,
+ ));
+ }
+ }
+ Ok(())
+}
+
/// Assists in readability.
type CommitteesPerSlot = u64;
@@ -1241,35 +1346,71 @@ type CommitteesPerSlot = u64;
/// public keys cached in the `chain`.
pub fn obtain_indexed_attestation_and_committees_per_slot(
chain: &BeaconChain,
- attestation: &Attestation,
+ attestation: AttestationRef,
) -> Result<(IndexedAttestation, CommitteesPerSlot), Error> {
- map_attestation_committee(chain, attestation, |(committee, committees_per_slot)| {
- get_indexed_attestation(committee.committee, attestation)
- .map(|attestation| (attestation, committees_per_slot))
- .map_err(Error::Invalid)
+ map_attestation_committees(chain, attestation, |(committees, committees_per_slot)| {
+ match attestation {
+ AttestationRef::Base(att) => {
+ let committee = committees
+ .iter()
+ .filter(|&committee| committee.index == att.data.index)
+ .at_most_one()
+ .map_err(|_| Error::NoCommitteeForSlotAndIndex {
+ slot: att.data.slot,
+ index: att.data.index,
+ })?;
+
+ if let Some(committee) = committee {
+ attesting_indices_base::get_indexed_attestation(committee.committee, att)
+ .map(|attestation| (attestation, committees_per_slot))
+ .map_err(Error::Invalid)
+ } else {
+ Err(Error::NoCommitteeForSlotAndIndex {
+ slot: att.data.slot,
+ index: att.data.index,
+ })
+ }
+ }
+ AttestationRef::Electra(att) => {
+ attesting_indices_electra::get_indexed_attestation(&committees, att)
+ .map(|attestation| (attestation, committees_per_slot))
+ .map_err(|e| {
+ if let BlockOperationError::BeaconStateError(NoCommitteeFound(index)) = e {
+ Error::NoCommitteeForSlotAndIndex {
+ slot: att.data.slot,
+ index,
+ }
+ } else {
+ Error::Invalid(e)
+ }
+ })
+ }
+ }
})
}
/// Runs the `map_fn` with the committee and committee count per slot for the given `attestation`.
///
-/// This function exists in this odd "map" pattern because efficiently obtaining the committee for
-/// an attestation can be complex. It might involve reading straight from the
+/// This function exists in this odd "map" pattern because efficiently obtaining the committees for
+/// an attestation's slot can be complex. It might involve reading straight from the
/// `beacon_chain.shuffling_cache` or it might involve reading it from a state from the DB. Due to
/// the complexities of `RwLock`s on the shuffling cache, a simple `Cow` isn't suitable here.
///
-/// If the committee for `attestation` isn't found in the `shuffling_cache`, we will read a state
+/// If the committees for an `attestation`'s slot aren't found in the `shuffling_cache`, we will read a state
/// from disk and then update the `shuffling_cache`.
-fn map_attestation_committee(
+///
+/// Committees are sorted by ascending index order 0..committees_per_slot
+fn map_attestation_committees(
chain: &BeaconChain,
- attestation: &Attestation,
+ attestation: AttestationRef,
map_fn: F,
) -> Result
where
T: BeaconChainTypes,
- F: Fn((BeaconCommittee, CommitteesPerSlot)) -> Result,
+ F: Fn((Vec, CommitteesPerSlot)) -> Result,
{
- let attestation_epoch = attestation.data.slot.epoch(T::EthSpec::slots_per_epoch());
- let target = &attestation.data.target;
+ let attestation_epoch = attestation.data().slot.epoch(T::EthSpec::slots_per_epoch());
+ let target = &attestation.data().target;
// Attestation target must be for a known block.
//
@@ -1292,12 +1433,12 @@ where
let committees_per_slot = committee_cache.committees_per_slot();
Ok(committee_cache
- .get_beacon_committee(attestation.data.slot, attestation.data.index)
- .map(|committee| map_fn((committee, committees_per_slot)))
- .unwrap_or_else(|| {
+ .get_beacon_committees_at_slot(attestation.data().slot)
+ .map(|committees| map_fn((committees, committees_per_slot)))
+ .unwrap_or_else(|_| {
Err(Error::NoCommitteeForSlotAndIndex {
- slot: attestation.data.slot,
- index: attestation.data.index,
+ slot: attestation.data().slot,
+ index: attestation.committee_index().unwrap_or(0),
})
}))
})
diff --git a/beacon_node/beacon_chain/src/attestation_verification/batch.rs b/beacon_node/beacon_chain/src/attestation_verification/batch.rs
index 6aec2bef68a..07fad1bd4a8 100644
--- a/beacon_node/beacon_chain/src/attestation_verification/batch.rs
+++ b/beacon_node/beacon_chain/src/attestation_verification/batch.rs
@@ -66,14 +66,13 @@ where
.ok_or(BeaconChainError::ValidatorPubkeyCacheLockTimeout)?;
let mut signature_sets = Vec::with_capacity(num_indexed * 3);
-
// Iterate, flattening to get only the `Ok` values.
for indexed in indexing_results.iter().flatten() {
let signed_aggregate = &indexed.signed_aggregate;
let indexed_attestation = &indexed.indexed_attestation;
let fork = chain
.spec
- .fork_at_epoch(indexed_attestation.data.target.epoch);
+ .fork_at_epoch(indexed_attestation.data().target.epoch);
signature_sets.push(
signed_aggregate_selection_proof_signature_set(
@@ -98,7 +97,7 @@ where
signature_sets.push(
indexed_attestation_signature_set_from_pubkeys(
|validator_index| pubkey_cache.get(validator_index).map(Cow::Borrowed),
- &indexed_attestation.signature,
+ indexed_attestation.signature(),
indexed_attestation,
&fork,
chain.genesis_validators_root,
@@ -182,11 +181,11 @@ where
let indexed_attestation = &partially_verified.indexed_attestation;
let fork = chain
.spec
- .fork_at_epoch(indexed_attestation.data.target.epoch);
+ .fork_at_epoch(indexed_attestation.data().target.epoch);
let signature_set = indexed_attestation_signature_set_from_pubkeys(
|validator_index| pubkey_cache.get(validator_index).map(Cow::Borrowed),
- &indexed_attestation.signature,
+ indexed_attestation.signature(),
indexed_attestation,
&fork,
chain.genesis_validators_root,
diff --git a/beacon_node/beacon_chain/src/attester_cache.rs b/beacon_node/beacon_chain/src/attester_cache.rs
index 2e07cd32ed9..b5012e8e4e4 100644
--- a/beacon_node/beacon_chain/src/attester_cache.rs
+++ b/beacon_node/beacon_chain/src/attester_cache.rs
@@ -15,6 +15,7 @@ use state_processing::state_advance::{partial_state_advance, Error as StateAdvan
use std::collections::HashMap;
use std::ops::Range;
use types::{
+ attestation::Error as AttestationError,
beacon_state::{
compute_committee_index_in_epoch, compute_committee_range_in_epoch, epoch_committee_count,
},
@@ -59,6 +60,7 @@ pub enum Error {
InverseRange {
range: Range,
},
+ AttestationError(AttestationError),
}
impl From for Error {
diff --git a/beacon_node/beacon_chain/src/beacon_block_reward.rs b/beacon_node/beacon_chain/src/beacon_block_reward.rs
index 5b70215d225..33567001e3c 100644
--- a/beacon_node/beacon_chain/src/beacon_block_reward.rs
+++ b/beacon_node/beacon_chain/src/beacon_block_reward.rs
@@ -202,7 +202,7 @@ impl BeaconChain {
let mut previous_epoch_participation = state.previous_epoch_participation()?.clone();
for attestation in block.body().attestations() {
- let data = &attestation.data;
+ let data = attestation.data();
let inclusion_delay = state.slot().safe_sub(data.slot)?.as_u64();
// [Modified in Deneb:EIP7045]
let participation_flag_indices = get_attestation_participation_flag_indices(
diff --git a/beacon_node/beacon_chain/src/beacon_block_streamer.rs b/beacon_node/beacon_chain/src/beacon_block_streamer.rs
index 0c92b7c1f62..f0a68b6be55 100644
--- a/beacon_node/beacon_chain/src/beacon_block_streamer.rs
+++ b/beacon_node/beacon_chain/src/beacon_block_streamer.rs
@@ -1,4 +1,4 @@
-use crate::{metrics, BeaconChain, BeaconChainError, BeaconChainTypes};
+use crate::{metrics, BeaconChain, BeaconChainError, BeaconChainTypes, BlockProcessStatus};
use execution_layer::{ExecutionLayer, ExecutionPayloadBodyV1};
use slog::{crit, debug, error, Logger};
use std::collections::HashMap;
@@ -410,15 +410,14 @@ impl BeaconBlockStreamer {
fn check_caches(&self, root: Hash256) -> Option>> {
if self.check_caches == CheckCaches::Yes {
- self.beacon_chain
- .reqresp_pre_import_cache
- .read()
- .get(&root)
- .map(|block| {
+ match self.beacon_chain.get_block_process_status(&root) {
+ BlockProcessStatus::Unknown => None,
+ BlockProcessStatus::NotValidated(block)
+ | BlockProcessStatus::ExecutionValidated(block) => {
metrics::inc_counter(&metrics::BEACON_REQRESP_PRE_IMPORT_CACHE_HITS);
- block.clone()
- })
- .or(self.beacon_chain.early_attester_cache.get_block(root))
+ Some(block)
+ }
+ }
} else {
None
}
diff --git a/beacon_node/beacon_chain/src/beacon_chain.rs b/beacon_node/beacon_chain/src/beacon_chain.rs
index 9c7ded313b6..19ee3d116c1 100644
--- a/beacon_node/beacon_chain/src/beacon_chain.rs
+++ b/beacon_node/beacon_chain/src/beacon_chain.rs
@@ -85,7 +85,9 @@ use futures::channel::mpsc::Sender;
use itertools::process_results;
use itertools::Itertools;
use kzg::Kzg;
-use operation_pool::{AttestationRef, OperationPool, PersistedOperationPool, ReceivedPreCapella};
+use operation_pool::{
+ CompactAttestationRef, OperationPool, PersistedOperationPool, ReceivedPreCapella,
+};
use parking_lot::{Mutex, RwLock};
use proto_array::{DoNotReOrg, ProposerHeadError};
use safe_arith::SafeArith;
@@ -112,7 +114,7 @@ use std::collections::HashSet;
use std::io::prelude::*;
use std::marker::PhantomData;
use std::sync::Arc;
-use std::time::{Duration, Instant};
+use std::time::Duration;
use store::iter::{BlockRootsIterator, ParentRootBlockIterator, StateRootsIterator};
use store::{
DatabaseBlock, Error as DBError, HotColdDB, KeyValueStore, KeyValueStoreOp, StoreItem, StoreOp,
@@ -337,6 +339,20 @@ struct PartialBeaconBlock {
bls_to_execution_changes: Vec,
}
+pub enum BlockProcessStatus {
+ /// Block is not in any pre-import cache. Block may be in the data-base or in the fork-choice.
+ Unknown,
+ /// Block is currently processing but not yet validated.
+ NotValidated(Arc>),
+ /// Block is fully valid, but not yet imported. It's cached in the da_checker while awaiting
+ /// missing block components.
+ ExecutionValidated(Arc>),
+}
+
+pub struct BeaconChainMetrics {
+ pub reqresp_pre_import_cache_len: usize,
+}
+
pub type LightClientProducerEvent = (Hash256, Slot, SyncAggregate);
pub type BeaconForkChoice = ForkChoice<
@@ -707,13 +723,6 @@ impl BeaconChain {
Ok(())
}
- pub fn persist_data_availability_checker(&self) -> Result<(), Error> {
- let _timer = metrics::start_timer(&metrics::PERSIST_DATA_AVAILABILITY_CHECKER);
- self.data_availability_checker.persist_all()?;
-
- Ok(())
- }
-
/// Returns the slot _right now_ according to `self.slot_clock`. Returns `Err` if the slot is
/// unavailable.
///
@@ -1237,6 +1246,27 @@ impl BeaconChain {
Ok(self.store.get_blinded_block(block_root)?)
}
+ /// Return the status of a block as it progresses through the various caches of the beacon
+ /// chain. Used by sync to learn the status of a block and prevent repeated downloads /
+ /// processing attempts.
+ pub fn get_block_process_status(&self, block_root: &Hash256) -> BlockProcessStatus {
+ if let Some(block) = self
+ .data_availability_checker
+ .get_execution_valid_block(block_root)
+ {
+ return BlockProcessStatus::ExecutionValidated(block);
+ }
+
+ if let Some(block) = self.reqresp_pre_import_cache.read().get(block_root) {
+ // A block is on the `reqresp_pre_import_cache` but NOT in the
+ // `data_availability_checker` only if it is actively processing. We can expect a future
+ // event with the result of processing
+ return BlockProcessStatus::NotValidated(block.clone());
+ }
+
+ BlockProcessStatus::Unknown
+ }
+
/// Returns the state at the given root, if any.
///
/// ## Errors
@@ -1373,10 +1403,6 @@ impl BeaconChain {
)
}
- let start_slot = head_state.slot();
- let task_start = Instant::now();
- let max_task_runtime = Duration::from_secs(self.spec.seconds_per_slot);
-
let head_state_slot = head_state.slot();
let mut state = head_state;
@@ -1386,18 +1412,6 @@ impl BeaconChain {
};
while state.slot() < slot {
- // Do not allow and forward state skip that takes longer than the maximum task duration.
- //
- // This is a protection against nodes doing too much work when they're not synced
- // to a chain.
- if task_start + max_task_runtime < Instant::now() {
- return Err(Error::StateSkipTooLarge {
- start_slot,
- requested_slot: slot,
- max_task_runtime,
- });
- }
-
// Note: supplying some `state_root` when it is known would be a cheap and easy
// optimization.
match per_slot_processing(&mut state, skip_state_root, &self.spec) {
@@ -1608,14 +1622,49 @@ impl BeaconChain {
Ok((duties, dependent_root, execution_status))
}
+ pub fn get_aggregated_attestation(
+ &self,
+ attestation: AttestationRef,
+ ) -> Result