mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-06 10:11:44 +00:00
Remove KZG verification on blobs fetched from the EL (#7771)
Continuation of #7713, addresses comment about skipping KZG verification on EL fetched blobs: https://github.com/sigp/lighthouse/pull/7713#discussion_r2198542501
This commit is contained in:
@@ -1,12 +1,11 @@
|
||||
use crate::sync::manager::BlockProcessType;
|
||||
use crate::{service::NetworkMessage, sync::manager::SyncMessage};
|
||||
use beacon_chain::blob_verification::{GossipBlobError, GossipVerifiedBlob};
|
||||
use beacon_chain::blob_verification::{observe_gossip_blob, GossipBlobError};
|
||||
use beacon_chain::block_verification_types::RpcBlock;
|
||||
use beacon_chain::data_column_verification::{observe_gossip_data_column, GossipDataColumnError};
|
||||
use beacon_chain::fetch_blobs::{
|
||||
fetch_and_process_engine_blobs, EngineGetBlobsOutput, FetchEngineBlobError,
|
||||
};
|
||||
use beacon_chain::observed_data_sidecars::DoNotObserve;
|
||||
use beacon_chain::{
|
||||
AvailabilityProcessingStatus, BeaconChain, BeaconChainTypes, BlockError, NotifyExecutionLayer,
|
||||
};
|
||||
@@ -760,7 +759,10 @@ impl<T: BeaconChainTypes> NetworkBeaconProcessor<T> {
|
||||
if publish_blobs {
|
||||
match blobs_or_data_column {
|
||||
EngineGetBlobsOutput::Blobs(blobs) => {
|
||||
self_cloned.publish_blobs_gradually(blobs, block_root);
|
||||
self_cloned.publish_blobs_gradually(
|
||||
blobs.into_iter().map(|b| b.to_blob()).collect(),
|
||||
block_root,
|
||||
);
|
||||
}
|
||||
EngineGetBlobsOutput::CustodyColumns(columns) => {
|
||||
self_cloned.publish_data_columns_gradually(
|
||||
@@ -903,7 +905,7 @@ impl<T: BeaconChainTypes> NetworkBeaconProcessor<T> {
|
||||
/// publisher exists for a blob, it will eventually get published here.
|
||||
fn publish_blobs_gradually(
|
||||
self: &Arc<Self>,
|
||||
mut blobs: Vec<GossipVerifiedBlob<T, DoNotObserve>>,
|
||||
mut blobs: Vec<Arc<BlobSidecar<T::EthSpec>>>,
|
||||
block_root: Hash256,
|
||||
) {
|
||||
let self_clone = self.clone();
|
||||
@@ -934,8 +936,8 @@ impl<T: BeaconChainTypes> NetworkBeaconProcessor<T> {
|
||||
while blobs_iter.peek().is_some() {
|
||||
let batch = blobs_iter.by_ref().take(batch_size);
|
||||
let publishable = batch
|
||||
.filter_map(|unobserved| match unobserved.observe(&chain) {
|
||||
Ok(observed) => Some(observed.clone_blob()),
|
||||
.filter_map(|blob| match observe_gossip_blob(&blob, &chain) {
|
||||
Ok(()) => Some(blob),
|
||||
Err(GossipBlobError::RepeatBlob { .. }) => None,
|
||||
Err(e) => {
|
||||
warn!(
|
||||
|
||||
Reference in New Issue
Block a user