mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-30 20:57:10 +00:00
Refine Gloas data column availability
This commit is contained in:
@@ -698,15 +698,6 @@ impl<T: BeaconChainTypes> NetworkBeaconProcessor<T> {
|
||||
}
|
||||
Err(err) => {
|
||||
match err {
|
||||
GossipDataColumnError::InvalidVariant => {
|
||||
// TODO(gloas) we should probably penalize the peer here
|
||||
debug!(
|
||||
%slot,
|
||||
%block_root,
|
||||
%index,
|
||||
"Invalid gossip data column variant."
|
||||
)
|
||||
}
|
||||
GossipDataColumnError::PriorKnownUnpublished => {
|
||||
debug!(
|
||||
%slot,
|
||||
@@ -732,6 +723,25 @@ impl<T: BeaconChainTypes> NetworkBeaconProcessor<T> {
|
||||
column_sidecar,
|
||||
));
|
||||
}
|
||||
GossipDataColumnError::BlockRootUnknown {
|
||||
block_root: unknown_block_root,
|
||||
..
|
||||
} => {
|
||||
debug!(
|
||||
action = "requesting block",
|
||||
%unknown_block_root,
|
||||
"Unknown block root for column"
|
||||
);
|
||||
self.send_sync_message(SyncMessage::UnknownBlockHashFromAttestation(
|
||||
peer_id,
|
||||
unknown_block_root,
|
||||
));
|
||||
self.propagate_validation_result(
|
||||
message_id,
|
||||
peer_id,
|
||||
MessageAcceptance::Ignore,
|
||||
);
|
||||
}
|
||||
GossipDataColumnError::PubkeyCacheTimeout
|
||||
| GossipDataColumnError::BeaconChainError(_) => {
|
||||
crit!(
|
||||
@@ -739,10 +749,12 @@ impl<T: BeaconChainTypes> NetworkBeaconProcessor<T> {
|
||||
"Internal error when verifying column sidecar"
|
||||
)
|
||||
}
|
||||
GossipDataColumnError::ProposalSignatureInvalid
|
||||
GossipDataColumnError::InvalidVariant
|
||||
| GossipDataColumnError::ProposalSignatureInvalid
|
||||
| GossipDataColumnError::UnknownValidator(_)
|
||||
| GossipDataColumnError::ProposerIndexMismatch { .. }
|
||||
| GossipDataColumnError::IsNotLaterThanParent { .. }
|
||||
| GossipDataColumnError::BlockSlotMismatch { .. }
|
||||
| GossipDataColumnError::InvalidSubnetId { .. }
|
||||
| GossipDataColumnError::InvalidInclusionProof
|
||||
| GossipDataColumnError::InvalidKzgProof { .. }
|
||||
@@ -904,14 +916,6 @@ impl<T: BeaconChainTypes> NetworkBeaconProcessor<T> {
|
||||
) {
|
||||
match err {
|
||||
GossipPartialDataColumnError::GossipDataColumnError(err) => match err {
|
||||
GossipDataColumnError::InvalidVariant => {
|
||||
// TODO(gloas) we should probably penalize the peer here
|
||||
debug!(
|
||||
%block_root,
|
||||
%index,
|
||||
"Invalid gossip partial data column variant."
|
||||
)
|
||||
}
|
||||
GossipDataColumnError::PriorKnownUnpublished => {
|
||||
debug!(
|
||||
%block_root,
|
||||
@@ -933,6 +937,20 @@ impl<T: BeaconChainTypes> NetworkBeaconProcessor<T> {
|
||||
slot,
|
||||
});
|
||||
}
|
||||
GossipDataColumnError::BlockRootUnknown {
|
||||
block_root: unknown_block_root,
|
||||
..
|
||||
} => {
|
||||
debug!(
|
||||
action = "requesting block",
|
||||
%unknown_block_root,
|
||||
"Unknown block root for partial column"
|
||||
);
|
||||
self.send_sync_message(SyncMessage::UnknownBlockHashFromAttestation(
|
||||
peer_id,
|
||||
unknown_block_root,
|
||||
));
|
||||
}
|
||||
GossipDataColumnError::PubkeyCacheTimeout
|
||||
| GossipDataColumnError::BeaconChainError(_) => {
|
||||
crit!(
|
||||
@@ -940,10 +958,12 @@ impl<T: BeaconChainTypes> NetworkBeaconProcessor<T> {
|
||||
"Internal error when verifying partial column sidecar"
|
||||
)
|
||||
}
|
||||
GossipDataColumnError::ProposalSignatureInvalid
|
||||
GossipDataColumnError::InvalidVariant
|
||||
| GossipDataColumnError::ProposalSignatureInvalid
|
||||
| GossipDataColumnError::UnknownValidator(_)
|
||||
| GossipDataColumnError::ProposerIndexMismatch { .. }
|
||||
| GossipDataColumnError::IsNotLaterThanParent { .. }
|
||||
| GossipDataColumnError::BlockSlotMismatch { .. }
|
||||
| GossipDataColumnError::InvalidSubnetId { .. }
|
||||
| GossipDataColumnError::InvalidInclusionProof
|
||||
| GossipDataColumnError::InvalidKzgProof { .. }
|
||||
|
||||
@@ -10,7 +10,7 @@ use crate::{
|
||||
};
|
||||
use beacon_chain::block_verification_types::LookupBlock;
|
||||
use beacon_chain::custody_context::NodeCustodyType;
|
||||
use beacon_chain::data_column_verification::validate_data_column_sidecar_for_gossip_fulu;
|
||||
use beacon_chain::data_column_verification::GossipVerifiedDataColumn;
|
||||
use beacon_chain::kzg_utils::blobs_to_data_column_sidecars;
|
||||
use beacon_chain::observed_data_sidecars::DoNotObserve;
|
||||
use beacon_chain::test_utils::{
|
||||
@@ -1185,12 +1185,8 @@ async fn accept_processed_gossip_data_columns_without_import() {
|
||||
.map(|data_column| {
|
||||
let subnet_id =
|
||||
DataColumnSubnetId::from_column_index(*data_column.index(), &rig.chain.spec);
|
||||
validate_data_column_sidecar_for_gossip_fulu::<_, DoNotObserve>(
|
||||
data_column,
|
||||
subnet_id,
|
||||
&rig.chain,
|
||||
)
|
||||
.expect("should be valid data column")
|
||||
GossipVerifiedDataColumn::<_, DoNotObserve>::new(data_column, subnet_id, &rig.chain)
|
||||
.expect("should be valid data column")
|
||||
})
|
||||
.collect();
|
||||
|
||||
|
||||
@@ -906,9 +906,9 @@ impl<T: BeaconChainTypes> SyncManager<T> {
|
||||
}),
|
||||
);
|
||||
}
|
||||
// TODO(gloas) support gloas data column variant
|
||||
DataColumnSidecar::Gloas(_) => {
|
||||
error!("Gloas variant not yet supported")
|
||||
debug!(%block_root, "Received unknown block data column message");
|
||||
self.handle_unknown_block_root(peer_id, block_root);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user