mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-14 10:22:38 +00:00
[Altair] Sync committee pools (#2321)
Add pools supporting sync committees: - naive sync aggregation pool - observed sync contributions pool - observed sync contributors pool - observed sync aggregators pool Add SSZ types and tests related to sync committee signatures. Co-authored-by: Michael Sproul <michael@sigmaprime.io> Co-authored-by: realbigsean <seananderson33@gmail.com>
This commit is contained in:
@@ -219,6 +219,20 @@ where
|
||||
}
|
||||
}
|
||||
|
||||
/// Allow aggregate signatures to be created from single signatures.
|
||||
impl<Pub, AggPub, Sig, AggSig> From<&GenericSignature<Pub, Sig>>
|
||||
for GenericAggregateSignature<Pub, AggPub, Sig, AggSig>
|
||||
where
|
||||
Sig: TSignature<Pub>,
|
||||
AggSig: TAggregateSignature<Pub, AggPub, Sig>,
|
||||
{
|
||||
fn from(sig: &GenericSignature<Pub, Sig>) -> Self {
|
||||
let mut agg = Self::infinity();
|
||||
agg.add_assign(&sig);
|
||||
agg
|
||||
}
|
||||
}
|
||||
|
||||
impl<Pub, AggPub, Sig, AggSig> Encode for GenericAggregateSignature<Pub, AggPub, Sig, AggSig>
|
||||
where
|
||||
Sig: TSignature<Pub>,
|
||||
|
||||
Reference in New Issue
Block a user