Merge branch 'blop-pool' into validator-enhancements

This commit is contained in:
Age Manning
2019-03-30 16:16:30 +11:00
24 changed files with 1423 additions and 391 deletions

View File

@@ -1,7 +1,7 @@
use super::PublicKey;
use bls_aggregates::AggregatePublicKey as RawAggregatePublicKey;
/// A single BLS signature.
/// A BLS aggregate public key.
///
/// This struct is a wrapper upon a base type and provides helper functions (e.g., SSZ
/// serialization).
@@ -17,7 +17,7 @@ impl AggregatePublicKey {
self.0.add(public_key.as_raw())
}
/// Returns the underlying signature.
/// Returns the underlying public key.
pub fn as_raw(&self) -> &RawAggregatePublicKey {
&self.0
}

View File

@@ -27,6 +27,11 @@ impl AggregateSignature {
self.0.add(signature.as_raw())
}
/// Add (aggregate) another `AggregateSignature`.
pub fn add_aggregate(&mut self, agg_signature: &AggregateSignature) {
self.0.add_aggregate(&agg_signature.0)
}
/// Verify the `AggregateSignature` against an `AggregatePublicKey`.
///
/// Only returns `true` if the set of keys in the `AggregatePublicKey` match the set of keys

View File

@@ -35,6 +35,11 @@ impl FakeAggregateSignature {
// Do nothing.
}
/// Does glorious nothing.
pub fn add_aggregate(&mut self, _agg_sig: &FakeAggregateSignature) {
// Do nothing.
}
/// _Always_ returns `true`.
pub fn verify(
&self,