Skip to content

Commit

Permalink
Merge branch 'unstable' into modularise-task-executor
Browse files Browse the repository at this point in the history
  • Loading branch information
macladson authored Oct 17, 2024
2 parents e580102 + 606a113 commit acfe400
Show file tree
Hide file tree
Showing 204 changed files with 6,715 additions and 4,621 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/test-suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -173,8 +187,19 @@ jobs:
channel: stable
cache-target: release
bins: cargo-nextest
- name: Create CI logger dir
run: mkdir ${{ runner.temp }}/network_test_logs
- name: Run network tests for all known forks
run: make test-network
env:
TEST_FEATURES: portable,ci_logger
CI_LOGGER_DIR: ${{ runner.temp }}/network_test_logs
- name: Upload logs
uses: actions/upload-artifact@v4
with:
name: network_test_logs
path: ${{ runner.temp }}/network_test_logs

slasher-tests:
name: slasher-tests
needs: [check-labels]
Expand Down Expand Up @@ -422,6 +447,7 @@ jobs:
'cargo-udeps',
'compile-with-beta-compiler',
'cli-check',
'lockbud',
]
steps:
- uses: actions/checkout@v4
Expand Down
7 changes: 5 additions & 2 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ resolver = "2"
edition = "2021"

[workspace.dependencies]
alloy-primitives = "0.8"
alloy-primitives = { version = "0.8", features = ["rlp", "getrandom"] }
alloy-rlp = "0.3.4"
alloy-consensus = "0.3.0"
anyhow = "1"
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ test-full: cargo-fmt test-release test-debug test-ef test-exec-engine
# Lints the code for bad style and potentially unsafe arithmetic using Clippy.
# Clippy lints are opt-in per-crate for now. By default, everything is allowed except for performance and correctness lints.
lint:
cargo clippy --workspace --tests $(EXTRA_CLIPPY_OPTS) --features "$(TEST_FEATURES)" -- \
cargo clippy --workspace --benches --tests $(EXTRA_CLIPPY_OPTS) --features "$(TEST_FEATURES)" -- \
-D clippy::fn_to_numeric_cast_any \
-D clippy::manual_let_else \
-D clippy::large_stack_frames \
Expand Down
9 changes: 5 additions & 4 deletions beacon_node/beacon_chain/src/attestation_verification.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1144,13 +1144,14 @@ pub fn verify_propagation_slot_range<S: SlotClock, E: EthSpec>(

let current_fork =
spec.fork_name_at_slot::<E>(slot_clock.now().ok_or(BeaconChainError::UnableToReadSlot)?);
let earliest_permissible_slot = if !current_fork.deneb_enabled() {
one_epoch_prior
// EIP-7045
} else {

let earliest_permissible_slot = if current_fork.deneb_enabled() {
// EIP-7045
one_epoch_prior
.epoch(E::slots_per_epoch())
.start_slot(E::slots_per_epoch())
} else {
one_epoch_prior
};

if attestation_slot < earliest_permissible_slot {
Expand Down
8 changes: 5 additions & 3 deletions beacon_node/beacon_chain/src/beacon_block_streamer.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::{metrics, BeaconChain, BeaconChainError, BeaconChainTypes, BlockProcessStatus};
use execution_layer::{ExecutionLayer, ExecutionPayloadBody};
use execution_layer::{ExecutionLayer, ExecutionPayloadBodyV1};
use slog::{crit, debug, error, Logger};
use std::collections::HashMap;
use std::sync::Arc;
Expand Down Expand Up @@ -57,7 +57,7 @@ struct BodiesByRange<E: EthSpec> {
struct BlockParts<E: EthSpec> {
blinded_block: Box<SignedBlindedBeaconBlock<E>>,
header: Box<ExecutionPayloadHeader<E>>,
body: Option<Box<ExecutionPayloadBody<E>>>,
body: Option<Box<ExecutionPayloadBodyV1<E>>>,
}

impl<E: EthSpec> BlockParts<E> {
Expand Down Expand Up @@ -711,6 +711,7 @@ mod tests {
use crate::beacon_block_streamer::{BeaconBlockStreamer, CheckCaches};
use crate::test_utils::{test_spec, BeaconChainHarness, EphemeralHarnessType};
use execution_layer::test_utils::Block;
use std::sync::Arc;
use std::sync::LazyLock;
use tokio::sync::mpsc;
use types::{
Expand All @@ -725,7 +726,7 @@ mod tests {

fn get_harness(
validator_count: usize,
spec: ChainSpec,
spec: Arc<ChainSpec>,
) -> BeaconChainHarness<EphemeralHarnessType<MinimalEthSpec>> {
let harness = BeaconChainHarness::builder(MinimalEthSpec)
.spec(spec)
Expand Down Expand Up @@ -756,6 +757,7 @@ mod tests {
spec.capella_fork_epoch = Some(Epoch::new(capella_fork_epoch as u64));
spec.deneb_fork_epoch = Some(Epoch::new(deneb_fork_epoch as u64));
spec.electra_fork_epoch = Some(Epoch::new(electra_fork_epoch as u64));
let spec = Arc::new(spec);

let harness = get_harness(VALIDATOR_COUNT, spec.clone());
// go to bellatrix fork
Expand Down
Loading

0 comments on commit acfe400

Please sign in to comment.