merge conflicts

This commit is contained in:
Eitan Seri- Levi
2026-04-03 09:26:40 -07:00
144 changed files with 8530 additions and 3436 deletions

View File

@@ -77,8 +77,10 @@ async fn get_chain_segment() -> (Vec<BeaconSnapshot<E>>, Vec<Option<DataSidecars
.unwrap();
let block_epoch = full_block.epoch();
// TODO(gloas): probably need to update this test
segment.push(BeaconSnapshot {
beacon_block_root: snapshot.beacon_block_root,
execution_envelope: None,
beacon_block: Arc::new(full_block),
beacon_state: snapshot.beacon_state,
});

View File

@@ -1350,7 +1350,7 @@ async fn recover_from_invalid_head_by_importing_blocks() {
"the fork block should become the head"
);
let manual_get_head = rig
let (manual_get_head, _) = rig
.harness
.chain
.canonical_head
@@ -1428,7 +1428,7 @@ async fn weights_after_resetting_optimistic_status() {
.fork_choice_read_lock()
.proto_array()
.iter_nodes(&head.head_block_root())
.map(|node| (node.root, node.weight))
.map(|node| (node.root(), node.weight()))
.collect::<HashMap<_, _>>();
rig.invalidate_manually(roots[1]).await;
@@ -1438,7 +1438,7 @@ async fn weights_after_resetting_optimistic_status() {
.canonical_head
.fork_choice_write_lock()
.proto_array_mut()
.set_all_blocks_to_optimistic::<E>(&rig.harness.chain.spec)
.set_all_blocks_to_optimistic::<E>()
.unwrap();
let new_weights = rig
@@ -1448,7 +1448,7 @@ async fn weights_after_resetting_optimistic_status() {
.fork_choice_read_lock()
.proto_array()
.iter_nodes(&head.head_block_root())
.map(|node| (node.root, node.weight))
.map(|node| (node.root(), node.weight()))
.collect::<HashMap<_, _>>();
assert_eq!(original_weights, new_weights);

View File

@@ -2910,7 +2910,7 @@ async fn reproduction_unaligned_checkpoint_sync_pruned_payload() {
let slot_clock = TestingSlotClock::new(
Slot::new(0),
Duration::from_secs(harness.chain.genesis_time),
Duration::from_secs(spec.seconds_per_slot),
spec.get_slot_duration(),
);
slot_clock.set_slot(harness.get_current_slot().as_u64());
@@ -3995,11 +3995,7 @@ async fn schema_downgrade_to_min_version(store_config: StoreConfig, archive: boo
)
.await;
let min_version = if spec.is_fulu_scheduled() {
SchemaVersion(27)
} else {
SchemaVersion(22)
};
let min_version = SchemaVersion(28);
// Save the slot clock so that the new harness doesn't revert in time.
let slot_clock = harness.chain.slot_clock.clone();
@@ -5338,8 +5334,8 @@ async fn test_safely_backfill_data_column_custody_info() {
.await;
let epoch_before_increase = Epoch::new(start_epochs);
let effective_delay_slots =
CUSTODY_CHANGE_DA_EFFECTIVE_DELAY_SECONDS / harness.chain.spec.seconds_per_slot;
let effective_delay_slots = CUSTODY_CHANGE_DA_EFFECTIVE_DELAY_SECONDS
/ harness.chain.spec.get_slot_duration().as_secs();
let cgc_change_slot = epoch_before_increase.end_slot(E::slots_per_epoch());
@@ -5430,10 +5426,12 @@ fn assert_chains_pretty_much_the_same<T: BeaconChainTypes>(a: &BeaconChain<T>, b
.fork_choice_write_lock()
.get_head(slot, &spec)
.unwrap()
.0
== b.canonical_head
.fork_choice_write_lock()
.get_head(slot, &spec)
.unwrap(),
.unwrap()
.0,
"fork_choice heads should be equal"
);
}
@@ -5599,6 +5597,7 @@ async fn test_gloas_block_and_envelope_storage_generic(
"slot = {slot}"
);
}
check_db_invariants(&harness);
}
/// Test that Pending and Full states have the correct payload status through round-trip
@@ -5666,6 +5665,7 @@ async fn test_gloas_state_payload_status() {
state = full_state;
}
check_db_invariants(&harness);
}
/// Test block replay with and without envelopes.
@@ -5805,6 +5805,7 @@ async fn test_gloas_block_replay_with_envelopes() {
replayed_full, expected_full,
"replayed full state should match stored full state"
);
check_db_invariants(&harness);
}
/// Test the hot state hierarchy with Full states stored as ReplayFrom.
@@ -5822,7 +5823,7 @@ async fn test_gloas_hot_state_hierarchy() {
// 40 slots covers 5 epochs.
let num_blocks = E::slots_per_epoch() * 5;
// TODO(gloas): enable finalisation by increasing this threshold
let some_validators = (0..LOW_VALIDATOR_COUNT / 2).collect::<Vec<_>>();
let some_validators = (0..LOW_VALIDATOR_COUNT).collect::<Vec<_>>();
let (genesis_state, _genesis_state_root) = harness.get_current_state_and_root();
@@ -5886,6 +5887,7 @@ async fn test_gloas_hot_state_hierarchy() {
// Verify chain dump and iterators work with Gloas states.
check_chain_dump(&harness, num_blocks + 1);
check_iterators(&harness);
check_db_invariants(&harness);
}
/// Check that the HotColdDB's split_slot is equal to the start slot of the last finalized epoch.
@@ -6131,7 +6133,7 @@ async fn bellatrix_produce_and_store_payloads() {
.genesis_time()
.safe_add(
slot.as_u64()
.safe_mul(harness.spec.seconds_per_slot)
.safe_mul(harness.spec.get_slot_duration().as_secs())
.unwrap(),
)
.unwrap();

View File

@@ -590,7 +590,10 @@ async fn unaggregated_attestations_added_to_fork_choice_some_none() {
if slot <= num_blocks_produced && slot != 0 {
assert_eq!(
latest_message.unwrap().1,
latest_message
.expect("latest message should be present")
.slot
.epoch(MinimalEthSpec::slots_per_epoch()),
slot.epoch(MinimalEthSpec::slots_per_epoch()),
"Latest message epoch for {} should be equal to epoch {}.",
validator,
@@ -700,10 +703,12 @@ async fn unaggregated_attestations_added_to_fork_choice_all_updated() {
let validator_slots: Vec<(&usize, Slot)> = validators.iter().zip(slots).collect();
for (validator, slot) in validator_slots {
let latest_message = fork_choice.latest_message(*validator);
let latest_message = fork_choice
.latest_message(*validator)
.expect("latest message should be present");
assert_eq!(
latest_message.unwrap().1,
latest_message.slot.epoch(MinimalEthSpec::slots_per_epoch()),
slot.epoch(MinimalEthSpec::slots_per_epoch()),
"Latest message slot should be equal to attester duty."
);
@@ -714,8 +719,7 @@ async fn unaggregated_attestations_added_to_fork_choice_all_updated() {
.expect("Should get block root at slot");
assert_eq!(
latest_message.unwrap().0,
*block_root,
latest_message.root, *block_root,
"Latest message block root should be equal to block at slot."
);
}