mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-16 03:12:41 +00:00
add new gossip conditions
This commit is contained in:
@@ -2038,6 +2038,27 @@ impl<T: BeaconChainTypes> NetworkBeaconProcessor<T> {
|
||||
"attn_val_index_too_high",
|
||||
);
|
||||
}
|
||||
AttnError::CommitteeIndexNonZero(index) => {
|
||||
/*
|
||||
* The validator index is not set to zero after Electra.
|
||||
*
|
||||
* The peer has published an invalid consensus message.
|
||||
*/
|
||||
debug!(
|
||||
self.log,
|
||||
"Committee index non zero";
|
||||
"peer_id" => %peer_id,
|
||||
"block" => ?beacon_block_root,
|
||||
"type" => ?attestation_type,
|
||||
"committee_index" => index,
|
||||
);
|
||||
self.propagate_validation_result(message_id, peer_id, MessageAcceptance::Reject);
|
||||
self.gossip_penalize_peer(
|
||||
peer_id,
|
||||
PeerAction::LowToleranceError,
|
||||
"attn_comm_index_non_zero",
|
||||
);
|
||||
}
|
||||
AttnError::UnknownHeadBlock { beacon_block_root } => {
|
||||
trace!(
|
||||
self.log,
|
||||
@@ -2193,6 +2214,19 @@ impl<T: BeaconChainTypes> NetworkBeaconProcessor<T> {
|
||||
"attn_too_many_agg_bits",
|
||||
);
|
||||
}
|
||||
AttnError::NotExactlyOneCommitteeBitSet(_) => {
|
||||
/*
|
||||
* The attestation doesn't have only one committee bit set.
|
||||
*
|
||||
* The peer has published an invalid consensus message.
|
||||
*/
|
||||
self.propagate_validation_result(message_id, peer_id, MessageAcceptance::Reject);
|
||||
self.gossip_penalize_peer(
|
||||
peer_id,
|
||||
PeerAction::LowToleranceError,
|
||||
"attn_too_many_comm_bits",
|
||||
);
|
||||
}
|
||||
AttnError::AttestsToFutureBlock { .. } => {
|
||||
/*
|
||||
* The beacon_block_root is from a higher slot than the attestation.
|
||||
|
||||
Reference in New Issue
Block a user