Resolve merge conflicts

This commit is contained in:
Eitan Seri-Levi
2026-01-02 08:52:14 -06:00
918 changed files with 49304 additions and 37273 deletions

View File

@@ -5,11 +5,12 @@ mod votes;
use crate::proto_array_fork_choice::{Block, ExecutionStatus, ProtoArrayForkChoice};
use crate::{InvalidationOperation, JustifiedBalances};
use fixed_bytes::FixedBytesExtended;
use serde::{Deserialize, Serialize};
use std::collections::{BTreeSet, HashMap};
use types::{
AttestationShufflingId, Checkpoint, Epoch, EthSpec, ExecutionBlockHash, FixedBytesExtended,
Hash256, MainnetEthSpec, Slot,
AttestationShufflingId, Checkpoint, Epoch, EthSpec, ExecutionBlockHash, Hash256,
MainnetEthSpec, Slot,
};
pub use execution_status::*;
@@ -213,7 +214,12 @@ impl ForkChoiceTestDefinition {
unrealized_finalized_checkpoint: None,
};
fork_choice
.process_block::<MainnetEthSpec>(block, slot)
.process_block::<MainnetEthSpec>(
block,
slot,
self.justified_checkpoint,
self.finalized_checkpoint,
)
.unwrap_or_else(|e| {
panic!(
"process_block op at index {} returned error: {:?}",
@@ -273,7 +279,10 @@ impl ForkChoiceTestDefinition {
}
};
fork_choice
.process_execution_payload_invalidation::<MainnetEthSpec>(&op)
.process_execution_payload_invalidation::<MainnetEthSpec>(
&op,
self.finalized_checkpoint,
)
.unwrap()
}
Operation::AssertWeight { block_root, weight } => assert_eq!(
@@ -306,9 +315,10 @@ fn get_checkpoint(i: u64) -> Checkpoint {
}
fn check_bytes_round_trip(original: &ProtoArrayForkChoice) {
let bytes = original.as_bytes();
let decoded =
ProtoArrayForkChoice::from_bytes(&bytes).expect("fork choice should decode from bytes");
// The checkpoint are ignored `ProtoArrayForkChoice::from_bytes` so any value is ok
let bytes = original.as_bytes(Checkpoint::default(), Checkpoint::default());
let decoded = ProtoArrayForkChoice::from_bytes(&bytes, original.balances.clone())
.expect("fork choice should decode from bytes");
assert!(
*original == decoded,
"fork choice should encode and decode without change"