mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-18 13:28:33 +00:00
Merge unstable (needs a few more fixes)
This commit is contained in:
@@ -53,6 +53,7 @@ async fn merge_with_terminal_block_hash_override() {
|
||||
|
||||
let harness = BeaconChainHarness::builder(E::default())
|
||||
.spec(spec)
|
||||
.logger(logging::test_logger())
|
||||
.deterministic_keypairs(VALIDATOR_COUNT)
|
||||
.fresh_ephemeral_store()
|
||||
.mock_execution_layer()
|
||||
@@ -109,6 +110,7 @@ async fn base_altair_merge_with_terminal_block_after_fork() {
|
||||
|
||||
let harness = BeaconChainHarness::builder(E::default())
|
||||
.spec(spec)
|
||||
.logger(logging::test_logger())
|
||||
.deterministic_keypairs(VALIDATOR_COUNT)
|
||||
.fresh_ephemeral_store()
|
||||
.mock_execution_layer()
|
||||
|
||||
@@ -7,8 +7,9 @@ use beacon_chain::otb_verification_service::{
|
||||
use beacon_chain::{
|
||||
canonical_head::{CachedHead, CanonicalHead},
|
||||
test_utils::{BeaconChainHarness, EphemeralHarnessType},
|
||||
BeaconChainError, BlockError, ExecutionPayloadError, NotifyExecutionLayer, StateSkipConfig,
|
||||
WhenSlotSkipped, INVALID_FINALIZED_MERGE_TRANSITION_BLOCK_SHUTDOWN_REASON,
|
||||
BeaconChainError, BlockError, ExecutionPayloadError, NotifyExecutionLayer,
|
||||
OverrideForkchoiceUpdate, StateSkipConfig, WhenSlotSkipped,
|
||||
INVALID_FINALIZED_MERGE_TRANSITION_BLOCK_SHUTDOWN_REASON,
|
||||
INVALID_JUSTIFIED_PAYLOAD_SHUTDOWN_REASON,
|
||||
};
|
||||
use execution_layer::{
|
||||
@@ -19,6 +20,7 @@ use execution_layer::{
|
||||
use fork_choice::{
|
||||
CountUnrealized, Error as ForkChoiceError, InvalidationOperation, PayloadVerificationStatus,
|
||||
};
|
||||
use logging::test_logger;
|
||||
use proto_array::{Error as ProtoArrayError, ExecutionStatus};
|
||||
use slot_clock::SlotClock;
|
||||
use std::collections::HashMap;
|
||||
@@ -59,6 +61,7 @@ impl InvalidPayloadRig {
|
||||
|
||||
let harness = BeaconChainHarness::builder(MainnetEthSpec)
|
||||
.spec(spec)
|
||||
.logger(test_logger())
|
||||
.deterministic_keypairs(VALIDATOR_COUNT)
|
||||
.mock_execution_layer()
|
||||
.fresh_ephemeral_store()
|
||||
@@ -383,7 +386,7 @@ impl InvalidPayloadRig {
|
||||
.fork_choice_write_lock()
|
||||
.get_head(self.harness.chain.slot().unwrap(), &self.harness.chain.spec)
|
||||
{
|
||||
Err(ForkChoiceError::ProtoArrayError(e)) if e.contains(s) => (),
|
||||
Err(ForkChoiceError::ProtoArrayStringError(e)) if e.contains(s) => (),
|
||||
other => panic!("expected {} error, got {:?}", s, other),
|
||||
};
|
||||
}
|
||||
@@ -978,6 +981,10 @@ async fn payload_preparation() {
|
||||
)
|
||||
.await;
|
||||
|
||||
rig.harness.advance_to_slot_lookahead(
|
||||
next_slot,
|
||||
rig.harness.chain.config.prepare_payload_lookahead,
|
||||
);
|
||||
rig.harness
|
||||
.chain
|
||||
.prepare_beacon_proposer(rig.harness.chain.slot().unwrap())
|
||||
@@ -1054,7 +1061,7 @@ async fn invalid_parent() {
|
||||
&rig.harness.chain.spec,
|
||||
CountUnrealized::True,
|
||||
),
|
||||
Err(ForkChoiceError::ProtoArrayError(message))
|
||||
Err(ForkChoiceError::ProtoArrayStringError(message))
|
||||
if message.contains(&format!(
|
||||
"{:?}",
|
||||
ProtoArrayError::ParentExecutionStatusIsInvalid {
|
||||
@@ -1121,7 +1128,11 @@ async fn payload_preparation_before_transition_block() {
|
||||
.get_forkchoice_update_parameters();
|
||||
rig.harness
|
||||
.chain
|
||||
.update_execution_engine_forkchoice(current_slot, forkchoice_update_params)
|
||||
.update_execution_engine_forkchoice(
|
||||
current_slot,
|
||||
forkchoice_update_params,
|
||||
OverrideForkchoiceUpdate::Yes,
|
||||
)
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ use beacon_chain::builder::BeaconChainBuilder;
|
||||
use beacon_chain::test_utils::{
|
||||
test_spec, AttestationStrategy, BeaconChainHarness, BlockStrategy, DiskHarnessType,
|
||||
};
|
||||
use beacon_chain::validator_monitor::DEFAULT_INDIVIDUAL_TRACKING_THRESHOLD;
|
||||
use beacon_chain::{
|
||||
historical_blocks::HistoricalBlockError, migrate::MigratorConfig, BeaconChain,
|
||||
BeaconChainError, BeaconChainTypes, BeaconSnapshot, ChainConfig, NotifyExecutionLayer,
|
||||
@@ -2085,7 +2086,7 @@ async fn weak_subjectivity_sync() {
|
||||
log.clone(),
|
||||
1,
|
||||
)))
|
||||
.monitor_validators(true, vec![], log)
|
||||
.monitor_validators(true, vec![], DEFAULT_INDIVIDUAL_TRACKING_THRESHOLD, log)
|
||||
.build()
|
||||
.expect("should build"),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user