Allow len(signatures) == 0
in aggregate function and len(pubkeys) == 0
in verify functions
#2070
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Based on #2068
Also suggested by @JustinDrake, we can go farther to allow empty aggregate signatures in the verification for phases 1+.
Issue
IETF BLS draft 2 requires (preconditions):
len(signatures) >= 1
inAggregate(signatures)
len(pubkeys) >= 1
in-AggregateVerify
functions.For phase 1
light_client_signature
and shard blockproposer_signature_aggregate
use cases, there are two phase 1 helper functions were added in #1812 to allow no-signatures case (len(signatures) == 0
/len(pubkeys) == 0
):optional_aggregate_verify
optional_fast_aggregate_verify
Proposed solution
Some BLSv4 compatible wrappers are added in #2068.
If we implement wrappers to allow
len(signatures) == 0
inAggregate(signatures)
, we could also make -verify function wrappers allowlen(pubkeys) == 0
and remove theoptional_
helpers.Note that it's a non-substantive change for phase 0.