Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Merged by Bors] - Realized unrealized experimentation #3322

Closed
Closed
Changes from 1 commit
Commits
Show all changes
179 commits
Select commit Hold shift + click to select a range
5cae2f9
separate participation cache by epoch and add it to the beacon state
realbigsean Apr 23, 2022
6c7ab85
Mutate state via mini beacon state in epoch processing
realbigsean May 3, 2022
fb16cd7
fork choice schema migration
realbigsean May 5, 2022
24a5c16
update filter block tree
realbigsean May 5, 2022
24c6273
cargo fmt and fix
realbigsean May 5, 2022
513d2b2
refactors
realbigsean May 5, 2022
1b81c56
fixes and debugging
realbigsean May 6, 2022
e67f07d
debugging
realbigsean May 9, 2022
1854a23
remove debugging lines, fix chache initialization slot
realbigsean May 9, 2022
365d58c
Add first unit test
paulhauner Apr 20, 2022
2ae43cd
adjust pauls test to only run for altair and to, and to assert the he…
realbigsean May 9, 2022
8a5d9f3
Add scenario for n + 2
realbigsean May 12, 2022
e166d55
Merge branch 'unstable' of https://github.com/sigp/lighthouse into fc…
realbigsean Jun 14, 2022
dc51a24
updates for fc store unrealized justification tracking
realbigsean Jun 14, 2022
da9047c
filter block tree changes
realbigsean Jun 15, 2022
58b2892
changes for tests
realbigsean Jun 17, 2022
0ce2a6b
Merge branch 'unstable' of https://github.com/sigp/lighthouse into fc…
realbigsean Jun 17, 2022
3a0fea7
test
realbigsean Jun 17, 2022
76b5344
revert changes to ef test tester
realbigsean Jun 18, 2022
5b43461
remove ef-test proposer boost shim
realbigsean Jun 18, 2022
4ce3e40
- pass thrugh spec argument
realbigsean Jun 20, 2022
c8315e1
EthSpec generic in proto array
realbigsean Jun 20, 2022
2421281
process justifiable for base as well
realbigsean Jun 20, 2022
a7b1e82
Merge branch 'fc-refactor' of https://github.com/realbigsean/lighthou…
realbigsean Jun 21, 2022
7d8f85f
update justification and finalization method
realbigsean Jun 21, 2022
ec5f058
Squash previous works
macladson Mar 10, 2022
61ff3b5
Resolve `BeaconChain` compile errors
paulhauner May 30, 2022
4fa5be6
Revert `common/eth2` to `unstable`
paulhauner May 30, 2022
ac01a7e
Fix `http_api` to pass `make lint`
paulhauner Jun 7, 2022
8ade87e
Remove old fork choice functions
paulhauner May 30, 2022
b00c0db
Fix compile errors in HTTP tests
paulhauner May 31, 2022
095ff72
Wrap harness in Arc
paulhauner May 31, 2022
211e4cc
Start *horrific* async test refactor
paulhauner May 31, 2022
3438ac2
More test fixes
paulhauner May 31, 2022
9aa796f
Make tests *finally* compile with async FC
paulhauner Jun 1, 2022
87b4760
Add progress on async block import
paulhauner Jun 2, 2022
3cbffa4
Solve `StoreOp` lifetime problem
paulhauner Jun 2, 2022
ac35a43
Reinstate panda banner
paulhauner Jun 4, 2022
2d0f5b9
Partially add `PayloadNotifier`
paulhauner Jun 4, 2022
4597d24
Start Arc-ifying SignedBeaconBlock
paulhauner Jun 5, 2022
0a6b9ae
Arc-ification of networking crate
paulhauner Jun 6, 2022
3e21adb
Fix http_api, `make lint` passes
paulhauner Jun 6, 2022
689f3e6
Refactor exec payload "prepare payload"
paulhauner Jun 6, 2022
59351d2
Make block production async (make lint passing)
paulhauner Jun 6, 2022
f9634a6
Fix test compilation errors
paulhauner Jun 6, 2022
dc4c7b6
Fix justified checkpoint getter
paulhauner Jun 6, 2022
d21536e
Remove deadlock from block import
paulhauner Jun 7, 2022
f452bd8
Fix clippy lint
paulhauner Jun 7, 2022
49fce95
Update test for finalized_checkpoint event
paulhauner Jun 7, 2022
11a3eaa
Fix MSRV issue
paulhauner Jun 7, 2022
d305f49
Fix failing network tests
paulhauner Jun 7, 2022
c3d04bd
Remove HeadSafetyStatus
paulhauner Jun 7, 2022
b7bee40
Remove unused error
paulhauner Jun 7, 2022
2e9a8c0
Fix compile errors in beacon chain tests
paulhauner Jun 7, 2022
5be6374
Simplify chain segment processing
paulhauner Jun 8, 2022
1bcf234
Remove some blocking methods
paulhauner Jun 8, 2022
7b7b356
Fix missing `!`
paulhauner Jun 8, 2022
2296643
Fix failing payload_invalidation tests
paulhauner Jun 10, 2022
a6a6aae
Fix store test
paulhauner Jun 10, 2022
a861777
Remove commented-out code
paulhauner Jun 10, 2022
93864b8
Fix weak subjectivity test
paulhauner Jun 10, 2022
ab4e1e8
Move EL update spawning
paulhauner Jun 10, 2022
1faf17a
Fix http_api compile error
paulhauner Jun 11, 2022
52bbd94
Fix compile error in client builder
paulhauner Jun 11, 2022
81d7fc7
Remove genesis alias workaround from EF tests
paulhauner Jun 11, 2022
cb8677c
Remove `block_on` from EL
paulhauner Jun 11, 2022
706e385
Remove block_on for blinded blocks in HTTP API
paulhauner Jun 11, 2022
67fd2a4
Disable rayon for fork choice tests
paulhauner Jun 14, 2022
de8482d
Simplify getting for active val count
paulhauner Jun 14, 2022
8f24eb1
Make block_on_dangerous respect exit, metrics
paulhauner Jun 14, 2022
1a3070f
Patch and unify status_message
paulhauner Jun 14, 2022
5cda3ee
Move recompute_head into canonical_head
paulhauner Jun 14, 2022
67ca5d7
Remove head_proposer_shuffling_decision_root
paulhauner Jun 14, 2022
ccdc74d
Arc-ify BeaconSnapshot
paulhauner Jun 15, 2022
be38daa
Spawn new task for after_finalization
paulhauner Jun 15, 2022
90730a7
Provide different state root to db migrator
paulhauner Jun 15, 2022
d84550f
Don't log crit when tokio stops block import
paulhauner Jun 15, 2022
0ab1b64
Add back warning for opt head
paulhauner Jun 15, 2022
4badadf
Remove debug formatting for roots
paulhauner Jun 15, 2022
98bed99
Raise gossip block log levels
paulhauner Jun 15, 2022
52cb170
Revert "Remove debug formatting for roots"
paulhauner Jun 15, 2022
6426347
Add weight logging
paulhauner Jun 15, 2022
1603b44
Drop txn_lock
paulhauner Jun 15, 2022
5b2f46a
Compute state root in spawned function
paulhauner Jun 15, 2022
7552f9a
Use state roots iter directly
paulhauner Jun 15, 2022
888b278
Avoid blocking async on canon head lock
paulhauner Jun 16, 2022
161c923
Add fast canonical head
paulhauner Jun 16, 2022
1a4bb67
Remove inconsistent head errors
paulhauner Jun 16, 2022
7f2db8e
Update fast head earlier
paulhauner Jun 16, 2022
1d67297
Ensure FFG checkpoints are consistent with head
paulhauner Jun 16, 2022
4ffdb41
Do timeout lock for beacon state metrics
paulhauner Jun 16, 2022
7199425
Use fast head in http_api
paulhauner Jun 16, 2022
7a44522
Use fast head in notifier
paulhauner Jun 16, 2022
611db3a
Split head and FC locks
paulhauner Jun 17, 2022
79aab62
Get make lint passing
paulhauner Jun 17, 2022
5d4ad4e
Tidy, add comments
paulhauner Jun 17, 2022
65ead81
Tidy comments
paulhauner Jun 17, 2022
7cc0d27
Switch to `Arc<Snapshot>` for `CachedHead`
paulhauner Jun 20, 2022
dbde4bf
Expose fork choice locks
paulhauner Jun 20, 2022
08082fb
Tidy
paulhauner Jun 20, 2022
82d8068
Fix test compile errors
paulhauner Jun 20, 2022
858db36
Update Cargo.lock
paulhauner Jun 20, 2022
b5043b9
Unify is_optimistic_candidate_block
paulhauner Jun 20, 2022
44a75e7
Fix flipped bool
paulhauner Jun 20, 2022
7c5ea7a
Revert changes to clippy.toml
paulhauner Jun 21, 2022
01e760f
Revert changes to beacon_chain Cargo.toml
paulhauner Jun 21, 2022
459c677
Refactor head accessor methods
paulhauner Jun 21, 2022
2905a9d
Fix broken store test
paulhauner Jun 21, 2022
fcbe53f
Fix state_advance_timer TODO
paulhauner Jun 21, 2022
0d8a9d8
Refactor `BeaconChain::best_slot`
paulhauner Jun 21, 2022
b5388ae
Fix conflict in `state_advance_timer`
paulhauner Jun 21, 2022
2b1bb42
Use blocking task for FC notifier tx
paulhauner Jun 21, 2022
57d62f1
Update opt sync error message
paulhauner Jun 21, 2022
9d73de2
Remove commented-out code from beacon_processor
paulhauner Jun 21, 2022
343aa37
Add comments to `TaskSpawner`
paulhauner Jun 21, 2022
6de54f1
Reduce duplicate code in sync_methods
paulhauner Jun 21, 2022
934a147
Add comment about val count caches
paulhauner Jun 21, 2022
9ca7d49
Update block_on_dangerous comments
paulhauner Jun 21, 2022
42af8db
Remove phantom block_efficiency file
paulhauner Jun 21, 2022
219327b
Remove parking lot from ef_tests
paulhauner Jun 21, 2022
836ac1c
Use rayon in ef_tests by default
paulhauner Jun 21, 2022
19870a8
Remove erroneous log for opt transition block
paulhauner Jun 22, 2022
6b3b2b7
Tidy
paulhauner Jun 22, 2022
2afe98d
Undo changes to `BeaconChain::import_block`
paulhauner Jun 22, 2022
f3ac736
Reduce diff for attestation production
paulhauner Jun 22, 2022
de9a72e
Reduce chain segment diff
paulhauner Jun 22, 2022
74f8e0b
Tidy
paulhauner Jun 22, 2022
b46088d
Tidy
paulhauner Jun 22, 2022
5f67350
Tidy
paulhauner Jun 22, 2022
733192a
Apply suggestions from code review
paulhauner Jun 22, 2022
acc9aac
Use fc write lock for restore
paulhauner Jun 23, 2022
011818f
Address review comments from @realbigsean
paulhauner Jun 23, 2022
91b877f
Squash-merge `nfd-2`
paulhauner Jun 28, 2022
49321ec
Merge pull request #4 from sigp/fc-refactor-nfd-2
paulhauner Jun 28, 2022
33d7305
Merge branch 'nfd-2' into fc-refactor
paulhauner Jun 28, 2022
d98041e
Fix trivial test compile errors
paulhauner Jun 28, 2022
9212770
Revert state_processing and types/beacon_state
paulhauner Jun 28, 2022
6764608
Add `JustificationAndFinalizationState`
paulhauner Jun 28, 2022
eb64294
Tidy, fix compile errors
paulhauner Jun 28, 2022
94557f2
uncomment ef tests
realbigsean Jun 28, 2022
1b59be9
add reorg test
realbigsean Jun 28, 2022
ab76e2c
Account for `state.get_block_root_at_epoch` errors
paulhauner Jun 28, 2022
060c3d1
Merge branch 'fc-refactor-participation-cache' of https://github.com/…
realbigsean Jun 28, 2022
af1623d
Remove participation_cache.rs
paulhauner Jun 28, 2022
d73b74c
Merge branch 'fc-refactor-participation-cache' of https://github.com/…
realbigsean Jun 28, 2022
de0a2bb
Remove mut ref
paulhauner Jun 29, 2022
24b4667
Use fork choice for block import finalization
paulhauner Jun 29, 2022
cbd8237
Fix failing gossip verification test
paulhauner Jun 29, 2022
aa44285
Ensure best justified is finalized descendent
paulhauner Jun 29, 2022
f57cbbb
remove n plus 2 test
realbigsean Jul 5, 2022
aff44e8
Add schema 10 -> 9 downgrade
realbigsean Jul 5, 2022
f073510
fix failing test
realbigsean Jul 5, 2022
d935728
Merge branch 'unstable' of https://github.com/sigp/lighthouse into re…
realbigsean Jul 5, 2022
6b71365
fix compile errors after merging
realbigsean Jul 5, 2022
d0f6f9e
add flag to enable unrealized vote counting
realbigsean Jul 7, 2022
1df5164
Merge branch 'unstable' of https://github.com/sigp/lighthouse into re…
realbigsean Jul 8, 2022
9951c2f
get tests passing
realbigsean Jul 8, 2022
b8ce0cb
Only count unrealized when we are syncing non-finalized chain segments
realbigsean Jul 8, 2022
c1a44c7
fix test
realbigsean Jul 10, 2022
dc6e836
fix tests
realbigsean Jul 10, 2022
9737b2b
delete commented out test
realbigsean Jul 10, 2022
e939bd4
copied on Result in unstable in our current msrv
realbigsean Jul 12, 2022
828d5bc
Merge branch 'unstable' of https://github.com/sigp/lighthouse into re…
realbigsean Jul 12, 2022
d4269a1
Update beacon_node/src/cli.rs
realbigsean Jul 13, 2022
5e512f7
Update consensus/fork_choice/src/fork_choice.rs
realbigsean Jul 13, 2022
8fbb9e7
Update consensus/state_processing/src/per_epoch_processing/justificat…
realbigsean Jul 13, 2022
3f9e6c3
Update consensus/state_processing/src/per_epoch_processing/altair/par…
realbigsean Jul 13, 2022
3c80207
Update testing/ef_tests/src/cases/fork_choice.rs
realbigsean Jul 13, 2022
e01fa88
Update testing/ef_tests/src/cases/fork_choice.rs
realbigsean Jul 13, 2022
b3ef232
only count unrealized in last block of chain in block replay
realbigsean Jul 13, 2022
0c6de63
cargo fmt
realbigsean Jul 13, 2022
8496857
cargo fmt
realbigsean Jul 13, 2022
ec06f03
Add `UpdateJustifiedCheckpointSlots`
paulhauner Jul 13, 2022
3e3b9e0
Add late-epoch optimisation
paulhauner Jul 13, 2022
89c27d0
iter
realbigsean Jul 13, 2022
04647be
fix compile error
realbigsean Jul 13, 2022
7265479
hide -> hidden
realbigsean Jul 14, 2022
58e8134
Merge branch 'unstable' of https://github.com/sigp/lighthouse into re…
realbigsean Jul 21, 2022
be4955e
lints
realbigsean Jul 22, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
EthSpec generic in proto array
realbigsean committed Jun 20, 2022
commit c8315e123a88c00b13849a2fde9db9dd54c797c4
4 changes: 2 additions & 2 deletions consensus/fork_choice/src/fork_choice.rs
Original file line number Diff line number Diff line change
@@ -303,7 +303,7 @@ where
},
);

let proto_array = ProtoArrayForkChoice::new(
let proto_array = ProtoArrayForkChoice::new::<E>(
finalized_block_slot,
finalized_block_state_root,
*fc_store.justified_checkpoint(),
@@ -695,7 +695,7 @@ where

// This does not apply a vote to the block, it just makes fork choice aware of the block so
// it can still be identified as the head even if it doesn't have any votes.
self.proto_array.process_block(
self.proto_array.process_block::<E>(
ProtoBlock {
slot: block.slot(),
root: block_root,
16 changes: 9 additions & 7 deletions consensus/proto_array/src/fork_choice_test_definition.rs
Original file line number Diff line number Diff line change
@@ -78,7 +78,7 @@ impl ForkChoiceTestDefinition {

let junk_shuffling_id =
AttestationShufflingId::from_components(Epoch::new(0), Hash256::zero());
let mut fork_choice = ProtoArrayForkChoice::new(
let mut fork_choice = ProtoArrayForkChoice::new::<MainnetEthSpec>(
self.finalized_block_slot,
Hash256::zero(),
self.justified_checkpoint,
@@ -198,12 +198,14 @@ impl ForkChoiceTestDefinition {
unrealized_justified_checkpoint: None,
unrealized_finalized_checkpoint: None,
};
fork_choice.process_block(block, slot).unwrap_or_else(|e| {
panic!(
"process_block op at index {} returned error: {:?}",
op_index, e
)
});
fork_choice
.process_block::<MainnetEthSpec>(block, slot)
.unwrap_or_else(|e| {
panic!(
"process_block op at index {} returned error: {:?}",
op_index, e
)
});
check_bytes_round_trip(&fork_choice);
}
Operation::ProcessAttestation {
34 changes: 19 additions & 15 deletions consensus/proto_array/src/proto_array.rs
Original file line number Diff line number Diff line change
@@ -284,7 +284,7 @@ impl ProtoArray {

// If the node has a parent, try to update its best-child and best-descendant.
if let Some(parent_index) = node.parent {
self.maybe_update_best_child_and_descendant(
self.maybe_update_best_child_and_descendant::<E>(
parent_index,
node_index,
current_slot,
@@ -298,7 +298,7 @@ impl ProtoArray {
/// Register a block with the fork choice.
///
/// It is only sane to supply a `None` parent for the genesis block.
pub fn on_block(&mut self, block: Block, current_slot: Slot) -> Result<(), Error> {
pub fn on_block<E: EthSpec>(&mut self, block: Block, current_slot: Slot) -> Result<(), Error> {
// If the block is already known, simply ignore it.
if self.indices.contains_key(&block.root) {
return Ok(());
@@ -345,7 +345,11 @@ impl ProtoArray {
self.nodes.push(node.clone());

if let Some(parent_index) = node.parent {
self.maybe_update_best_child_and_descendant(parent_index, node_index, current_slot)?;
self.maybe_update_best_child_and_descendant::<E>(
parent_index,
node_index,
current_slot,
)?;

if matches!(block.execution_status, ExecutionStatus::Valid(_)) {
self.propagate_execution_payload_validation_by_index(parent_index)?;
@@ -617,7 +621,7 @@ impl ProtoArray {
/// been called without a subsequent `Self::apply_score_changes` call. This is because
/// `on_new_block` does not attempt to walk backwards through the tree and update the
/// best-child/best-descendant links.
pub fn find_head(
pub fn find_head<E: EthSpec>(
&self,
justified_root: &Hash256,
current_slot: Slot,
@@ -654,7 +658,7 @@ impl ProtoArray {
.ok_or(Error::InvalidBestDescendant(best_descendant_index))?;

// Perform a sanity check that the node is indeed valid to be the head.
if !self.node_is_viable_for_head(best_node, current_slot) {
if !self.node_is_viable_for_head::<E>(best_node, current_slot) {
return Err(Error::InvalidBestNode(Box::new(InvalidBestNodeInfo {
start_root: *justified_root,
justified_checkpoint: self.justified_checkpoint,
@@ -750,7 +754,7 @@ impl ProtoArray {
/// best-descendant.
/// - The child is not the best child but becomes the best child.
/// - The child is not the best child and does not become the best child.
fn maybe_update_best_child_and_descendant(
fn maybe_update_best_child_and_descendant<E: EthSpec>(
&mut self,
parent_index: usize,
child_index: usize,
@@ -766,7 +770,8 @@ impl ProtoArray {
.get(parent_index)
.ok_or(Error::InvalidNodeIndex(parent_index))?;

let child_leads_to_viable_head = self.node_leads_to_viable_head(child, current_slot)?;
let child_leads_to_viable_head =
self.node_leads_to_viable_head::<E>(child, current_slot)?;

// These three variables are aliases to the three options that we may set the
// `parent.best_child` and `parent.best_descendant` to.
@@ -796,7 +801,7 @@ impl ProtoArray {
.ok_or(Error::InvalidBestDescendant(best_child_index))?;

let best_child_leads_to_viable_head =
self.node_leads_to_viable_head(best_child, current_slot)?;
self.node_leads_to_viable_head::<E>(best_child, current_slot)?;

if child_leads_to_viable_head && !best_child_leads_to_viable_head {
// The child leads to a viable head, but the current best-child doesn't.
@@ -841,7 +846,7 @@ impl ProtoArray {

/// Indicates if the node itself is viable for the head, or if it's best descendant is viable
/// for the head.
fn node_leads_to_viable_head(
fn node_leads_to_viable_head<E: EthSpec>(
&self,
node: &ProtoNode,
current_slot: Slot,
@@ -853,12 +858,13 @@ impl ProtoArray {
.get(best_descendant_index)
.ok_or(Error::InvalidBestDescendant(best_descendant_index))?;

self.node_is_viable_for_head(best_descendant, current_slot)
self.node_is_viable_for_head::<E>(best_descendant, current_slot)
} else {
false
};

Ok(best_descendant_is_viable_for_head || self.node_is_viable_for_head(node, current_slot))
Ok(best_descendant_is_viable_for_head
|| self.node_is_viable_for_head::<E>(node, current_slot))
}

/// This is the equivalent to the `filter_block_tree` function in the eth2 spec:
@@ -867,7 +873,7 @@ impl ProtoArray {
///
/// Any node that has a different finalized or justified epoch should not be viable for the
/// head.
fn node_is_viable_for_head(&self, node: &ProtoNode, current_slot: Slot) -> bool {
fn node_is_viable_for_head<E: EthSpec>(&self, node: &ProtoNode, current_slot: Slot) -> bool {
if node.execution_status.is_invalid() {
return false;
}
@@ -892,9 +898,7 @@ impl ProtoArray {
node.justified_checkpoint,
node.finalized_checkpoint,
) {
if node.slot.epoch(MainnetEthSpec::slots_per_epoch())
< current_slot.epoch(MainnetEthSpec::slots_per_epoch())
{
if node.slot.epoch(E::slots_per_epoch()) < current_slot.epoch(E::slots_per_epoch()) {
checkpoint_match_predicate(
unrealized_justified_checkpoint,
unrealized_finalized_checkpoint,
21 changes: 13 additions & 8 deletions consensus/proto_array/src/proto_array_fork_choice.rs
Original file line number Diff line number Diff line change
@@ -164,7 +164,7 @@ pub struct ProtoArrayForkChoice {

impl ProtoArrayForkChoice {
#[allow(clippy::too_many_arguments)]
pub fn new(
pub fn new<E: EthSpec>(
finalized_block_slot: Slot,
finalized_block_state_root: Hash256,
justified_checkpoint: Checkpoint,
@@ -200,7 +200,7 @@ impl ProtoArrayForkChoice {
};

proto_array
.on_block(block, finalized_block_slot)
.on_block::<E>(block, finalized_block_slot)
.map_err(|e| format!("Failed to add finalized block to proto_array: {:?}", e))?;

Ok(Self {
@@ -246,13 +246,17 @@ impl ProtoArrayForkChoice {
Ok(())
}

pub fn process_block(&mut self, block: Block, current_slot: Slot) -> Result<(), String> {
pub fn process_block<E: EthSpec>(
&mut self,
block: Block,
current_slot: Slot,
) -> Result<(), String> {
if block.parent_root.is_none() {
return Err("Missing parent root".to_string());
}

self.proto_array
.on_block(block, current_slot)
.on_block::<E>(block, current_slot)
.map_err(|e| format!("process_block_error: {:?}", e))
}

@@ -292,7 +296,7 @@ impl ProtoArrayForkChoice {
*old_balances = new_balances.to_vec();

self.proto_array
.find_head(&justified_checkpoint.root, current_slot)
.find_head::<E>(&justified_checkpoint.root, current_slot)
.map_err(|e| format!("find_head failed: {:?}", e))
}

@@ -493,6 +497,7 @@ fn compute_deltas(
#[cfg(test)]
mod test_compute_deltas {
use super::*;
use types::MainnetEthSpec;

/// Gives a hash that is not the zero hash (unless i is `usize::max_value)`.
fn hash_from_index(i: usize) -> Hash256 {
@@ -518,7 +523,7 @@ mod test_compute_deltas {
root: finalized_root,
};

let mut fc = ProtoArrayForkChoice::new(
let mut fc = ProtoArrayForkChoice::new::<MainnetEthSpec>(
genesis_slot,
state_root,
genesis_checkpoint,
@@ -531,7 +536,7 @@ mod test_compute_deltas {

// Add block that is a finalized descendant.
fc.proto_array
.on_block(Block {
.on_block::<MainnetEthSpec>(Block {
slot: genesis_slot + 1,
root: finalized_desc,
parent_root: Some(finalized_root),
@@ -549,7 +554,7 @@ mod test_compute_deltas {

// Add block that is *not* a finalized descendant.
fc.proto_array
.on_block(Block {
.on_block::<MainnetEthSpec>(Block {
slot: genesis_slot + 1,
root: not_finalized_desc,
parent_root: None,