Skip to content

Commit 3680ba9

Browse files
committed
Merge branch 'unstable' into kw/sel-alternative
2 parents 64e5a45 + 0507eca commit 3680ba9

File tree

75 files changed

+872
-501
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+872
-501
lines changed

Cargo.lock

Lines changed: 7 additions & 28 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ resolver = "2"
9797

9898
[workspace.package]
9999
edition = "2024"
100+
version = "8.0.0"
100101

101102
[workspace.dependencies]
102103
account_utils = { path = "common/account_utils" }

Makefile

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,8 @@ TEST_FEATURES ?=
3030
# Cargo profile for regular builds.
3131
PROFILE ?= release
3232

33-
# List of all hard forks. This list is used to set env variables for several tests so that
34-
# they run for different forks.
35-
FORKS=phase0 altair bellatrix capella deneb electra fulu gloas
36-
3733
# List of all recent hard forks. This list is used to set env variables for http_api tests
38-
RECENT_FORKS=electra fulu
34+
RECENT_FORKS=electra fulu gloas
3935

4036
# Extra flags for Cargo
4137
CARGO_INSTALL_EXTRA_FLAGS?=
@@ -170,8 +166,8 @@ run-ef-tests:
170166
cargo nextest run --release -p ef_tests --features "ef_tests,$(EF_TEST_FEATURES),fake_crypto"
171167
./$(EF_TESTS)/check_all_files_accessed.py $(EF_TESTS)/.accessed_file_log.txt $(EF_TESTS)/consensus-spec-tests
172168

173-
# Run the tests in the `beacon_chain` crate for all known forks.
174-
test-beacon-chain: $(patsubst %,test-beacon-chain-%,$(FORKS))
169+
# Run the tests in the `beacon_chain` crate for recent forks.
170+
test-beacon-chain: $(patsubst %,test-beacon-chain-%,$(RECENT_FORKS))
175171

176172
test-beacon-chain-%:
177173
env FORK_NAME=$* cargo nextest run --release --features "fork_from_env,slasher/lmdb,$(TEST_FEATURES)" -p beacon_chain
@@ -184,15 +180,15 @@ test-http-api-%:
184180

185181

186182
# Run the tests in the `operation_pool` crate for all known forks.
187-
test-op-pool: $(patsubst %,test-op-pool-%,$(FORKS))
183+
test-op-pool: $(patsubst %,test-op-pool-%,$(RECENT_FORKS))
188184

189185
test-op-pool-%:
190186
env FORK_NAME=$* cargo nextest run --release \
191187
--features "beacon_chain/fork_from_env,$(TEST_FEATURES)"\
192188
-p operation_pool
193189

194-
# Run the tests in the `network` crate for all known forks.
195-
test-network: $(patsubst %,test-network-%,$(FORKS))
190+
# Run the tests in the `network` crate for recent forks.
191+
test-network: $(patsubst %,test-network-%,$(RECENT_FORKS))
196192

197193
test-network-%:
198194
env FORK_NAME=$* cargo nextest run --release \

account_manager/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "account_manager"
3-
version = "0.3.5"
3+
version = { workspace = true }
44
authors = [
55
"Paul Hauner <paul@paulhauner.com>",
66
"Luke Anderson <luke@sigmaprime.io>",

beacon_node/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "beacon_node"
3-
version = "8.0.0-rc.2"
3+
version = { workspace = true }
44
authors = [
55
"Paul Hauner <paul@paulhauner.com>",
66
"Age Manning <Age@AgeManning.com",

beacon_node/beacon_chain/src/attestation_verification.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1371,7 +1371,7 @@ pub fn verify_signed_aggregate_signatures<T: BeaconChainTypes>(
13711371
.spec
13721372
.fork_at_epoch(indexed_attestation.data().target.epoch);
13731373

1374-
let signature_sets = vec![
1374+
let signature_sets = [
13751375
signed_aggregate_selection_proof_signature_set(
13761376
|validator_index| pubkey_cache.get(validator_index).map(Cow::Borrowed),
13771377
signed_aggregate,

beacon_node/beacon_chain/src/beacon_proposer_cache.rs

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,10 +166,17 @@ impl BeaconProposerCache {
166166
}
167167

168168
/// Compute the proposer duties using the head state without cache.
169+
///
170+
/// Return:
171+
/// - Proposer indices.
172+
/// - True dependent root.
173+
/// - Legacy dependent root (last block of epoch `N - 1`).
174+
/// - Head execution status.
175+
/// - Fork at `request_epoch`.
169176
pub fn compute_proposer_duties_from_head<T: BeaconChainTypes>(
170177
request_epoch: Epoch,
171178
chain: &BeaconChain<T>,
172-
) -> Result<(Vec<usize>, Hash256, ExecutionStatus, Fork), BeaconChainError> {
179+
) -> Result<(Vec<usize>, Hash256, Hash256, ExecutionStatus, Fork), BeaconChainError> {
173180
// Atomically collect information about the head whilst holding the canonical head `Arc` as
174181
// short as possible.
175182
let (mut state, head_state_root, head_block_root) = {
@@ -203,11 +210,23 @@ pub fn compute_proposer_duties_from_head<T: BeaconChainTypes>(
203210
.proposer_shuffling_decision_root_at_epoch(request_epoch, head_block_root, &chain.spec)
204211
.map_err(BeaconChainError::from)?;
205212

213+
// This is only required because the V1 proposer duties endpoint spec wasn't updated for Fulu. We
214+
// can delete this once the V1 endpoint is deprecated at the Glamsterdam fork.
215+
let legacy_dependent_root = state
216+
.legacy_proposer_shuffling_decision_root_at_epoch(request_epoch, head_block_root)
217+
.map_err(BeaconChainError::from)?;
218+
206219
// Use fork_at_epoch rather than the state's fork, because post-Fulu we may not have advanced
207220
// the state completely into the new epoch.
208221
let fork = chain.spec.fork_at_epoch(request_epoch);
209222

210-
Ok((indices, dependent_root, execution_status, fork))
223+
Ok((
224+
indices,
225+
dependent_root,
226+
legacy_dependent_root,
227+
execution_status,
228+
fork,
229+
))
211230
}
212231

213232
/// If required, advance `state` to the epoch required to determine proposer indices in `target_epoch`.

0 commit comments

Comments
 (0)