mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-30 12:47:05 +00:00
[Merge] Optimistic Sync: Stage 1 (#2686)
* Add payload verification status to fork choice * Pass payload verification status to import_block * Add valid back-propagation * Add head safety status latch to API * Remove ExecutionLayerStatus * Add execution info to client notifier * Update notifier logs * Change use of "hash" to refer to beacon block * Shutdown on invalid finalized block * Tidy, add comments * Fix failing FC tests * Allow blocks with unsafe head * Fix forkchoiceUpdate call on startup
This commit is contained in:
@@ -10,7 +10,10 @@ use beacon_chain::{
|
||||
BeaconChain, BeaconChainError, BeaconForkChoiceStore, ChainConfig, ForkChoiceError,
|
||||
StateSkipConfig, WhenSlotSkipped,
|
||||
};
|
||||
use fork_choice::{ForkChoiceStore, InvalidAttestation, InvalidBlock, QueuedAttestation};
|
||||
use fork_choice::{
|
||||
ForkChoiceStore, InvalidAttestation, InvalidBlock, PayloadVerificationStatus,
|
||||
QueuedAttestation, SAFE_SLOTS_TO_UPDATE_JUSTIFIED,
|
||||
};
|
||||
use store::MemoryStore;
|
||||
use types::{
|
||||
test_utils::generate_deterministic_keypair, BeaconBlock, BeaconBlockRef, BeaconState,
|
||||
@@ -268,7 +271,13 @@ impl ForkChoiceTest {
|
||||
.chain
|
||||
.fork_choice
|
||||
.write()
|
||||
.on_block(current_slot, &block, block.canonical_root(), &state)
|
||||
.on_block(
|
||||
current_slot,
|
||||
&block,
|
||||
block.canonical_root(),
|
||||
&state,
|
||||
PayloadVerificationStatus::Verified,
|
||||
)
|
||||
.unwrap();
|
||||
self
|
||||
}
|
||||
@@ -303,7 +312,13 @@ impl ForkChoiceTest {
|
||||
.chain
|
||||
.fork_choice
|
||||
.write()
|
||||
.on_block(current_slot, &block, block.canonical_root(), &state)
|
||||
.on_block(
|
||||
current_slot,
|
||||
&block,
|
||||
block.canonical_root(),
|
||||
&state,
|
||||
PayloadVerificationStatus::Verified,
|
||||
)
|
||||
.err()
|
||||
.expect("on_block did not return an error");
|
||||
comparison_func(err);
|
||||
|
||||
Reference in New Issue
Block a user