mirror of
https://github.com/sigp/lighthouse.git
synced 2026-06-15 09:48:20 +00:00
merge conflicts
This commit is contained in:
@@ -7,10 +7,7 @@ use genesis::{generate_deterministic_keypairs, interop_genesis_state};
|
||||
use parking_lot::RwLock;
|
||||
use proto_array::PayloadStatus;
|
||||
use slot_clock::{SlotClock, TestingSlotClock};
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
use state_processing::AllCaches;
|
||||
>>>>>>> 028b5a42a9715c31f416d45db70add39d9934b12
|
||||
use state_processing::genesis::genesis_block;
|
||||
use store::{HotColdDB, StoreConfig};
|
||||
use types::{
|
||||
@@ -29,11 +26,7 @@ use crate::{
|
||||
GossipVerificationContext, VerifiedPayloadAttestationMessage,
|
||||
},
|
||||
},
|
||||
<<<<<<< HEAD
|
||||
test_utils::{EphemeralHarnessType, fork_name_from_env, test_spec},
|
||||
=======
|
||||
test_utils::{BeaconChainHarness, EphemeralHarnessType, fork_name_from_env, test_spec},
|
||||
>>>>>>> 028b5a42a9715c31f416d45db70add39d9934b12
|
||||
validator_pubkey_cache::ValidatorPubkeyCache,
|
||||
};
|
||||
|
||||
@@ -334,8 +327,6 @@ fn duplicate_after_valid() {
|
||||
Err(PayloadAttestationError::PriorPayloadAttestationMessageKnown { .. })
|
||||
));
|
||||
}
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
|
||||
/// Exercises the `partial_state_advance` fallback in gossip verification when
|
||||
/// the head state is too stale to compute PTC membership (e.g., during a
|
||||
@@ -429,4 +420,3 @@ async fn stale_head_with_partial_advance() {
|
||||
result.unwrap_err()
|
||||
);
|
||||
}
|
||||
>>>>>>> 028b5a42a9715c31f416d45db70add39d9934b12
|
||||
|
||||
@@ -543,20 +543,12 @@ pub fn post_beacon_pool_payload_attestations<T: BeaconChainTypes>(
|
||||
.and(network_tx_filter.clone())
|
||||
.then(
|
||||
|task_spawner: TaskSpawner<T::EthSpec>,
|
||||
<<<<<<< HEAD
|
||||
_chain: Arc<BeaconChain<T>>,
|
||||
=======
|
||||
chain: Arc<BeaconChain<T>>,
|
||||
>>>>>>> 028b5a42a9715c31f416d45db70add39d9934b12
|
||||
messages: Vec<PayloadAttestationMessage>,
|
||||
_fork_name: Option<ForkName>,
|
||||
network_tx: UnboundedSender<NetworkMessage<T::EthSpec>>| {
|
||||
task_spawner.blocking_json_task(Priority::P0, move || {
|
||||
<<<<<<< HEAD
|
||||
publish_payload_attestation_messages(&network_tx, messages)
|
||||
=======
|
||||
publish_payload_attestation_messages(&chain, &network_tx, messages)
|
||||
>>>>>>> 028b5a42a9715c31f416d45db70add39d9934b12
|
||||
})
|
||||
},
|
||||
)
|
||||
@@ -582,11 +574,7 @@ pub fn post_beacon_pool_payload_attestations_ssz<T: BeaconChainTypes>(
|
||||
.then(
|
||||
|body_bytes: Bytes,
|
||||
task_spawner: TaskSpawner<T::EthSpec>,
|
||||
<<<<<<< HEAD
|
||||
_chain: Arc<BeaconChain<T>>,
|
||||
=======
|
||||
chain: Arc<BeaconChain<T>>,
|
||||
>>>>>>> 028b5a42a9715c31f416d45db70add39d9934b12
|
||||
network_tx: UnboundedSender<NetworkMessage<T::EthSpec>>| {
|
||||
task_spawner.blocking_json_task(Priority::P0, move || {
|
||||
let item_len = <PayloadAttestationMessage as Encode>::ssz_fixed_len();
|
||||
@@ -608,31 +596,13 @@ pub fn post_beacon_pool_payload_attestations_ssz<T: BeaconChainTypes>(
|
||||
})
|
||||
.collect::<Result<_, _>>()?;
|
||||
|
||||
<<<<<<< HEAD
|
||||
publish_payload_attestation_messages(&network_tx, messages)
|
||||
=======
|
||||
publish_payload_attestation_messages(&chain, &network_tx, messages)
|
||||
>>>>>>> 028b5a42a9715c31f416d45db70add39d9934b12
|
||||
})
|
||||
},
|
||||
)
|
||||
.boxed()
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
fn publish_payload_attestation_messages<E: types::EthSpec>(
|
||||
network_tx: &UnboundedSender<NetworkMessage<E>>,
|
||||
messages: Vec<PayloadAttestationMessage>,
|
||||
) -> Result<(), warp::Rejection> {
|
||||
// TODO(gloas): add proper gossip verification and store in ptc op pool.
|
||||
for message in messages {
|
||||
utils::publish_pubsub_message(
|
||||
network_tx,
|
||||
PubsubMessage::PayloadAttestation(Box::new(message)),
|
||||
)?;
|
||||
}
|
||||
Ok(())
|
||||
=======
|
||||
fn publish_payload_attestation_messages<T: BeaconChainTypes>(
|
||||
chain: &BeaconChain<T>,
|
||||
network_tx: &UnboundedSender<NetworkMessage<T::EthSpec>>,
|
||||
@@ -690,5 +660,4 @@ fn publish_payload_attestation_messages<T: BeaconChainTypes>(
|
||||
failures,
|
||||
))
|
||||
}
|
||||
>>>>>>> 028b5a42a9715c31f416d45db70add39d9934b12
|
||||
}
|
||||
|
||||
@@ -2793,25 +2793,6 @@ impl ApiTester {
|
||||
self
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
pub async fn test_post_beacon_pool_payload_attestations_valid(mut self) -> Self {
|
||||
let slot = self.chain.slot().unwrap();
|
||||
let head_root = self.chain.head_beacon_block_root();
|
||||
|
||||
let message = PayloadAttestationMessage {
|
||||
validator_index: 0,
|
||||
data: PayloadAttestationData {
|
||||
beacon_block_root: head_root,
|
||||
slot,
|
||||
payload_present: true,
|
||||
blob_data_available: true,
|
||||
},
|
||||
signature: Signature::empty(),
|
||||
};
|
||||
|
||||
self.client
|
||||
.post_beacon_pool_payload_attestations(&[message])
|
||||
=======
|
||||
fn make_valid_payload_attestation_message(
|
||||
&self,
|
||||
ptc_offset: usize,
|
||||
@@ -2867,7 +2848,6 @@ impl ApiTester {
|
||||
|
||||
self.client
|
||||
.post_beacon_pool_payload_attestations(&[message], fork_name)
|
||||
>>>>>>> 028b5a42a9715c31f416d45db70add39d9934b12
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
@@ -2880,30 +2860,11 @@ impl ApiTester {
|
||||
}
|
||||
|
||||
pub async fn test_post_beacon_pool_payload_attestations_valid_ssz(mut self) -> Self {
|
||||
<<<<<<< HEAD
|
||||
let slot = self.chain.slot().unwrap();
|
||||
let head_root = self.chain.head_beacon_block_root();
|
||||
|
||||
let message = PayloadAttestationMessage {
|
||||
validator_index: 0,
|
||||
data: PayloadAttestationData {
|
||||
beacon_block_root: head_root,
|
||||
slot,
|
||||
payload_present: true,
|
||||
blob_data_available: true,
|
||||
},
|
||||
signature: Signature::empty(),
|
||||
};
|
||||
|
||||
self.client
|
||||
.post_beacon_pool_payload_attestations_ssz(&[message])
|
||||
=======
|
||||
let message = self.make_valid_payload_attestation_message(1);
|
||||
let fork_name = self.chain.spec.fork_name_at_slot::<E>(message.data.slot);
|
||||
|
||||
self.client
|
||||
.post_beacon_pool_payload_attestations_ssz(&[message], fork_name)
|
||||
>>>>>>> 028b5a42a9715c31f416d45db70add39d9934b12
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user