Add `Aggregate()` case
This commit is contained in:
parent
82073a4a83
commit
d07e594f92
|
@ -8,11 +8,11 @@ The test data is declared in a `data.yaml` file:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
input: List[BLS Signature] -- list of input BLS signatures
|
input: List[BLS Signature] -- list of input BLS signatures
|
||||||
output: BLS Signature -- expected output, single BLS signature
|
output: BLS Signature -- expected output, single BLS signature or empty.
|
||||||
```
|
```
|
||||||
|
|
||||||
`BLS Signature` here is encoded as a string: hexadecimal encoding of 96 bytes (192 nibbles), prefixed with `0x`.
|
- `BLS Signature` here is encoded as a string: hexadecimal encoding of 96 bytes (192 nibbles), prefixed with `0x`.
|
||||||
|
- No output value if the input is invalid.
|
||||||
|
|
||||||
## Condition
|
## Condition
|
||||||
|
|
||||||
|
|
|
@ -127,6 +127,19 @@ def case03_aggregate():
|
||||||
'output': encode_hex(bls.Aggregate(sigs)),
|
'output': encode_hex(bls.Aggregate(sigs)),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Invalid pubkeys -- len(pubkeys) == 0
|
||||||
|
try:
|
||||||
|
bls.Aggregate([])
|
||||||
|
except Exception:
|
||||||
|
pass
|
||||||
|
else:
|
||||||
|
raise Exception("Should have been INVALID")
|
||||||
|
|
||||||
|
yield f'aggregate_na_pubkeys', {
|
||||||
|
'input': [],
|
||||||
|
'output': None,
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
def case04_fast_aggregate_verify():
|
def case04_fast_aggregate_verify():
|
||||||
for i, message in enumerate(MESSAGES):
|
for i, message in enumerate(MESSAGES):
|
||||||
|
|
Loading…
Reference in New Issue