From 352a9cf054b442ae9140c0c399094ca264311dac Mon Sep 17 00:00:00 2001 From: Eitan Seri-Levi Date: Wed, 9 Oct 2024 16:11:24 -0700 Subject: [PATCH] Add lockbud task to CI (#6470) * Add lockbud task to CI * Allow unknown lint * Merge branch 'unstable' of https://github.com/sigp/lighthouse into lockbud * remove potential deadlock * ignore tokio util crate * Update image --- .github/workflows/test-suite.yml | 15 +++++++++++++++ beacon_node/eth1/src/service.rs | 3 ++- .../state_processing/src/consensus_context.rs | 2 ++ 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-suite.yml b/.github/workflows/test-suite.yml index aff9a71b4ad..7cda3e477d6 100644 --- a/.github/workflows/test-suite.yml +++ b/.github/workflows/test-suite.yml @@ -54,6 +54,20 @@ jobs: done echo "skip_ci=$SKIP_CI" >> $GITHUB_OUTPUT + lockbud: + name: lockbud + runs-on: ubuntu-latest + container: + image: sigmaprime/lockbud:latest + steps: + - name: Checkout repository + uses: actions/checkout@v3 + - name: Install dependencies + run: apt update && apt install -y cmake + - name: Generate code coverage + run: | + cargo lockbud -k deadlock -b -l tokio_util + target-branch-check: name: target-branch-check runs-on: ubuntu-latest @@ -433,6 +447,7 @@ jobs: 'cargo-udeps', 'compile-with-beta-compiler', 'cli-check', + 'lockbud', ] steps: - uses: actions/checkout@v4 diff --git a/beacon_node/eth1/src/service.rs b/beacon_node/eth1/src/service.rs index a70a927307d..71ab98a6a20 100644 --- a/beacon_node/eth1/src/service.rs +++ b/beacon_node/eth1/src/service.rs @@ -549,10 +549,11 @@ impl Service { /// Returns the number of deposits with valid signatures that have been observed. pub fn get_valid_signature_count(&self) -> Option { + let highest_safe_block = self.highest_safe_block()?; self.deposits() .read() .cache - .get_valid_signature_count(self.highest_safe_block()?) + .get_valid_signature_count(highest_safe_block) } /// Returns the number of deposits with valid signatures that have been observed, without diff --git a/consensus/state_processing/src/consensus_context.rs b/consensus/state_processing/src/consensus_context.rs index b0eaf3422d3..0c176d4ab14 100644 --- a/consensus/state_processing/src/consensus_context.rs +++ b/consensus/state_processing/src/consensus_context.rs @@ -147,6 +147,8 @@ impl ConsensusContext { } } + #[allow(unknown_lints)] + #[allow(elided_named_lifetimes)] pub fn get_indexed_attestation<'a>( &'a mut self, state: &BeaconState,