lighthouse/crypto/bls/src
Michael Sproul 923486f34c Use bulk verification for sync_aggregate signature (#2415)
## Proposed Changes

Add the `sync_aggregate` from `BeaconBlock` to the bulk signature verifier for blocks. This necessitates a new signature set constructor for the sync aggregate, which is different from the others due to the use of [`eth2_fast_aggregate_verify`](https://github.com/ethereum/eth2.0-specs/blob/v1.1.0-alpha.7/specs/altair/bls.md#eth2_fast_aggregate_verify) for sync aggregates, per [`process_sync_aggregate`](https://github.com/ethereum/eth2.0-specs/blob/v1.1.0-alpha.7/specs/altair/beacon-chain.md#sync-aggregate-processing). I made the choice to return an optional signature set, with `None` representing the case where the signature is valid on account of being the point at infinity (requires no further checking).

To "dogfood" the changes and prevent duplication, the consensus logic now uses the signature set approach as well whenever it is required to verify signatures (which should only be in testing AFAIK). The EF tests pass with the code as it exists currently, but failed before I adapted the `eth2_fast_aggregate_verify` changes (which is good).

As a result of this change Altair block processing should be a little faster, and importantly, we will no longer accidentally verify signatures when replaying blocks, e.g. when replaying blocks from the database.
2021-07-28 05:40:21 +00:00
..
impls Altair consensus changes and refactors (#2279) 2021-07-09 06:15:32 +00:00
generic_aggregate_public_key.rs Altair consensus changes and refactors (#2279) 2021-07-09 06:15:32 +00:00
generic_aggregate_signature.rs Use bulk verification for sync_aggregate signature (#2415) 2021-07-28 05:40:21 +00:00
generic_keypair.rs Support multiple BLS implementations (#1335) 2020-07-25 02:03:18 +00:00
generic_public_key_bytes.rs rust 1.53.0 updates (#2411) 2021-06-18 05:58:01 +00:00
generic_public_key.rs Altair consensus changes and refactors (#2279) 2021-07-09 06:15:32 +00:00
generic_secret_key.rs Update to spec v1.0.0-rc.0 and BLSv4 (#1765) 2020-10-28 22:19:38 +00:00
generic_signature_bytes.rs Implement standard eth2.0 API (#1569) 2020-10-01 11:12:36 +10:00
generic_signature_set.rs Altair consensus changes and refactors (#2279) 2021-07-09 06:15:32 +00:00
generic_signature.rs Implement slasher (#1567) 2020-11-23 03:43:22 +00:00
get_withdrawal_credentials.rs Support multiple BLS implementations (#1335) 2020-07-25 02:03:18 +00:00
lib.rs Altair consensus changes and refactors (#2279) 2021-07-09 06:15:32 +00:00
macros.rs Fix new clippy lints (#2036) 2020-12-03 01:10:26 +00:00
zeroize_hash.rs Implement key cache to reduce keystore loading times for validator_client (#1695) 2020-10-05 10:50:43 +00:00