Fixes after rebasing Kintsugi onto unstable (#2799)

* Fix fork choice after rebase

* Remove paulhauner warp dep

* Fix fork choice test compile errors

* Assume fork choice payloads are valid

* Add comment

* Ignore new tests

* Fix error in test skipping
This commit is contained in:
Paul Hauner
2021-11-15 11:26:42 +11:00
parent eb35c64afd
commit cbd2201164
14 changed files with 55 additions and 15 deletions

View File

@@ -2448,6 +2448,7 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
block_root,
&state,
payload_verification_status,
&self.spec,
)
.map_err(|e| BlockError::BeaconChainError(e.into()))?;
}

View File

@@ -178,6 +178,7 @@ pub fn reset_fork_choice_to_finalization<E: EthSpec, Hot: ItemStore<E>, Cold: It
block.canonical_root(),
&state,
payload_verification_status,
spec,
)
.map_err(|e| format!("Error applying replayed block to fork choice: {:?}", e))?;
}

View File

@@ -36,7 +36,7 @@ mod validator_pubkey_cache;
pub use self::beacon_chain::{
AttestationProcessingOutcome, BeaconChain, BeaconChainTypes, BeaconStore, ChainSegmentResult,
ForkChoiceError, HeadSafetyStatus, StateSkipConfig, WhenSlotSkipped, HeadInfo
ForkChoiceError, HeadInfo, HeadSafetyStatus, StateSkipConfig, WhenSlotSkipped,
MAXIMUM_GOSSIP_CLOCK_DISPARITY,
};
pub use self::beacon_snapshot::BeaconSnapshot;

View File

@@ -370,6 +370,17 @@ where
self
}
/// Instruct the mock execution engine to always return a "valid" response to any payload it is
/// asked to execute.
pub fn mock_execution_layer_all_payloads_valid(self) -> Self {
self.mock_execution_layer
.as_ref()
.expect("requires mock execution layer")
.server
.all_payloads_valid();
self
}
pub fn build(self) -> BeaconChainHarness<BaseHarnessType<E, Hot, Cold>> {
let (shutdown_tx, shutdown_receiver) = futures::channel::mpsc::channel(1);