mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-19 22:08:30 +00:00
Add Electra forks to basic sim tests (#7199)
This PR adds transitions to Electra ~~and Fulu~~ fork epochs in the simulator tests. ~~It also covers blob inclusion verification and data column syncing on a full node in Fulu.~~ UPDATE: Remove fulu fork from sim tests due to https://github.com/sigp/lighthouse/pull/7199#issuecomment-2852281176
This commit is contained in:
@@ -331,7 +331,7 @@ impl<E: EthSpec> PendingComponents<E> {
|
||||
format!(
|
||||
"block {} blobs {}/{}",
|
||||
block_count,
|
||||
self.verified_blobs.len(),
|
||||
self.verified_blobs.iter().flatten().count(),
|
||||
num_expected_blobs
|
||||
)
|
||||
}
|
||||
|
||||
@@ -10,7 +10,6 @@ use derivative::Derivative;
|
||||
use fork_choice::ProtoBlock;
|
||||
use kzg::{Error as KzgError, Kzg};
|
||||
use proto_array::Block;
|
||||
use slasher::test_utils::E;
|
||||
use slot_clock::SlotClock;
|
||||
use ssz_derive::{Decode, Encode};
|
||||
use std::iter;
|
||||
@@ -589,19 +588,19 @@ fn verify_proposer_and_signature<T: BeaconChainTypes>(
|
||||
chain: &BeaconChain<T>,
|
||||
) -> Result<(), GossipDataColumnError> {
|
||||
let column_slot = data_column.slot();
|
||||
let column_epoch = column_slot.epoch(E::slots_per_epoch());
|
||||
let slots_per_epoch = T::EthSpec::slots_per_epoch();
|
||||
let column_epoch = column_slot.epoch(slots_per_epoch);
|
||||
let column_index = data_column.index;
|
||||
let block_root = data_column.block_root();
|
||||
let block_parent_root = data_column.block_parent_root();
|
||||
|
||||
let proposer_shuffling_root =
|
||||
if parent_block.slot.epoch(T::EthSpec::slots_per_epoch()) == column_epoch {
|
||||
parent_block
|
||||
.next_epoch_shuffling_id
|
||||
.shuffling_decision_block
|
||||
} else {
|
||||
parent_block.root
|
||||
};
|
||||
let proposer_shuffling_root = if parent_block.slot.epoch(slots_per_epoch) == column_epoch {
|
||||
parent_block
|
||||
.next_epoch_shuffling_id
|
||||
.shuffling_decision_block
|
||||
} else {
|
||||
parent_block.root
|
||||
};
|
||||
|
||||
// We lock the cache briefly to get or insert a OnceCell, then drop the lock
|
||||
// before doing proposer shuffling calculation via `OnceCell::get_or_try_init`. This avoids
|
||||
@@ -649,7 +648,7 @@ fn verify_proposer_and_signature<T: BeaconChainTypes>(
|
||||
|
||||
let proposer_index = *epoch_proposers
|
||||
.proposers
|
||||
.get(column_slot.as_usize() % T::EthSpec::slots_per_epoch() as usize)
|
||||
.get(column_slot.as_usize() % slots_per_epoch as usize)
|
||||
.ok_or_else(|| BeaconChainError::NoProposerForSlot(column_slot))?;
|
||||
|
||||
let fork = epoch_proposers.fork;
|
||||
|
||||
Reference in New Issue
Block a user