mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-30 20:57:10 +00:00
Add payload attestation to op pool and pack into block (#9180)
Store gossip-verified `PayloadAttestationMessage`s in the operation pool and pack them into the block body at during block production. Built on top of #9145. Co-Authored-By: Jimmy Chen <jchen.tc@gmail.com>
This commit is contained in:
@@ -61,6 +61,7 @@ use crate::observed_data_sidecars::ObservedDataSidecars;
|
||||
use crate::observed_operations::{ObservationOutcome, ObservedOperations};
|
||||
use crate::observed_slashable::ObservedSlashable;
|
||||
use crate::partial_data_column_assembler::PartialMergeResult;
|
||||
use crate::payload_attestation_verification::VerifiedPayloadAttestationMessage;
|
||||
use crate::payload_bid_verification::payload_bid_cache::GossipVerifiedPayloadBidCache;
|
||||
#[cfg(not(test))]
|
||||
use crate::payload_envelope_streamer::{EnvelopeRequestSource, launch_payload_envelope_stream};
|
||||
@@ -2328,6 +2329,17 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
|
||||
.map_err(Into::into)
|
||||
}
|
||||
|
||||
/// Add a verified payload attestation message to the operation pool for block inclusion.
|
||||
pub fn add_payload_attestation_to_pool(
|
||||
&self,
|
||||
verified: &VerifiedPayloadAttestationMessage<T>,
|
||||
) -> Result<(), Error> {
|
||||
self.op_pool
|
||||
.insert_payload_attestation_message(verified.payload_attestation_message().clone())
|
||||
.map_err(Error::OpPoolError)?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Accepts some `SyncCommitteeMessage` from the network and attempts to verify it, returning `Ok(_)` if
|
||||
/// it is valid to be (re)broadcast on the gossip network.
|
||||
pub fn verify_sync_committee_message_for_gossip(
|
||||
|
||||
Reference in New Issue
Block a user