Reduce load on validator subscription channels (#5311)

* Fix tests

* Merge branch 'unstable' into unclog-channels

* Avoid reallocations

* Reduce subscription load on beacon node
This commit is contained in:
Pawan Dhananjay
2024-03-07 18:02:27 +05:30
committed by GitHub
parent 8cd2b1ca87
commit 84a902a589
5 changed files with 39 additions and 54 deletions

View File

@@ -4,10 +4,8 @@ use ssz_derive::{Decode, Encode};
/// A validator subscription, created when a validator subscribes to a slot to perform optional aggregation
/// duties.
#[derive(PartialEq, Debug, Serialize, Deserialize, Clone, Encode, Decode)]
#[derive(PartialEq, Debug, Serialize, Deserialize, Clone, Encode, Decode, Eq, PartialOrd, Ord)]
pub struct ValidatorSubscription {
/// The validators index.
pub validator_index: u64,
/// The index of the committee within `slot` of which the validator is a member. Used by the
/// beacon node to quickly evaluate the associated `SubnetId`.
pub attestation_committee_index: CommitteeIndex,