Couple blocks and blobs in gossip (#3670)

* Revert "Add more gossip verification conditions"

This reverts commit 1430b561c3.

* Revert "Add todos"

This reverts commit 91efb9d4c7.

* Revert "Reprocess blob sidecar messages"

This reverts commit 21bf3d37cd.

* Add the coupled topic

* Decode SignedBeaconBlockAndBlobsSidecar correctly

* Process Block and Blobs in beacon processor

* Remove extra blob publishing logic from vc

* Remove blob signing in vc

* Ugly hack to compile
This commit is contained in:
Pawan Dhananjay
2022-11-01 19:58:21 +05:30
committed by GitHub
parent 9f155eec7a
commit 29f2ec46d3
25 changed files with 293 additions and 989 deletions

View File

@@ -236,12 +236,12 @@ impl<T: BeaconChainTypes> Router<T> {
block,
);
}
PubsubMessage::BlobsSidecars(blobs) => {
self.processor.on_blobs_gossip(
PubsubMessage::BeaconBlockAndBlobsSidecars(block_and_blobs) => {
self.processor.on_block_and_blobs_sidecar_gossip(
id,
peer_id,
self.network_globals.client(&peer_id),
blobs,
block_and_blobs,
);
}
PubsubMessage::VoluntaryExit(exit) => {

View File

@@ -7,7 +7,7 @@ use crate::sync::manager::RequestId as SyncId;
use crate::sync::SyncMessage;
use beacon_chain::{BeaconChain, BeaconChainTypes};
use lighthouse_network::rpc::methods::BlobsByRangeRequest;
use lighthouse_network::rpc::*;
use lighthouse_network::{rpc::*, SignedBeaconBlockAndBlobsSidecar};
use lighthouse_network::{
Client, MessageId, NetworkGlobals, PeerId, PeerRequestId, Request, Response,
};
@@ -17,7 +17,6 @@ use std::sync::Arc;
use std::time::{Duration, SystemTime, UNIX_EPOCH};
use store::SyncCommitteeMessage;
use tokio::sync::mpsc;
use types::signed_blobs_sidecar::SignedBlobsSidecar;
use types::{
Attestation, AttesterSlashing, BlobsSidecar, EthSpec, ProposerSlashing,
SignedAggregateAndProof, SignedBeaconBlock, SignedContributionAndProof, SignedVoluntaryExit,
@@ -295,18 +294,18 @@ impl<T: BeaconChainTypes> Processor<T> {
))
}
pub fn on_blobs_gossip(
pub fn on_block_and_blobs_sidecar_gossip(
&mut self,
message_id: MessageId,
peer_id: PeerId,
peer_client: Client,
blobs: Arc<SignedBlobsSidecar<T::EthSpec>>,
block_and_blobs: Arc<SignedBeaconBlockAndBlobsSidecar<T::EthSpec>>,
) {
self.send_beacon_processor_work(BeaconWorkEvent::gossip_blobs_sidecar(
self.send_beacon_processor_work(BeaconWorkEvent::gossip_block_and_blobs_sidecar(
message_id,
peer_id,
peer_client,
blobs,
block_and_blobs,
timestamp_now(),
))
}