Skip to content

Commit

Permalink
Apply PR feedback from Danny and clean up the BLS test format docs
Browse files Browse the repository at this point in the history
  • Loading branch information
hwwhww committed Aug 6, 2021
1 parent 93af122 commit ad4445f
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 10 deletions.
2 changes: 2 additions & 0 deletions tests/formats/bls/aggregate.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ 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`.
- No output value if the input is invalid.

All byte(s) fields are encoded as strings, hexadecimal encoding, prefixed with `0x`.

## Condition

The `aggregate` handler should aggregate the signatures in the `input`, and the result should match the expected `output`.
13 changes: 10 additions & 3 deletions tests/formats/bls/aggregate_verify.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,17 @@ The test data is declared in a `data.yaml` file:

```yaml
input:
pubkeys: List[bytes48] -- the pubkeys
pubkeys: List[BLS Pubkey] -- the pubkeys
messages: List[bytes32] -- the messages
signature: bytes96 -- the signature to verify against pubkeys and messages
output: bool -- VALID or INVALID
signature: BLS Signature -- the signature to verify against pubkeys and messages
output: bool -- true (VALID) or false (INVALID)
```
- `BLS Pubkey` here is encoded as a string: hexadecimal encoding of 48 bytes (96 nibbles), prefixed with `0x`.
- `BLS Signature` here is encoded as a string: hexadecimal encoding of 96 bytes (192 nibbles), prefixed with `0x`.

All byte(s) fields are encoded as strings, hexadecimal encoding, prefixed with `0x`.

## Condition

The `aggregate_verify` handler should verify the signature with pubkeys and messages in the `input`, and the result should match the expected `output`.
2 changes: 1 addition & 1 deletion tests/formats/bls/eth_aggregate_pubkeys.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ The test data is declared in a `data.yaml` file:

```yaml
input: List[BLS Pubkey] -- list of input BLS pubkeys
output: BLS Pubkey -- expected output, single BLS pubkeys or empty.
output: BLSPubkey -- expected output, single BLS pubkeys or empty.
```
- `BLS Pubkey` here is encoded as a string: hexadecimal encoding of 48 bytes (96 nibbles), prefixed with `0x`.
Expand Down
13 changes: 10 additions & 3 deletions tests/formats/bls/eth_fast_aggregate_verify.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,17 @@ The test data is declared in a `data.yaml` file:

```yaml
input:
pubkeys: List[bytes48] -- the pubkey
pubkeys: List[BLS Pubkey] -- list of input BLS pubkeys
message: bytes32 -- the message
signature: bytes96 -- the signature to verify against pubkeys and message
output: bool -- VALID or INVALID
signature: BLS Signature -- the signature to verify against pubkeys and message
output: bool -- true (VALID) or false (INVALID)
```
- `BLS Pubkey` here is encoded as a string: hexadecimal encoding of 48 bytes (96 nibbles), prefixed with `0x`.
- `BLS Signature` here is encoded as a string: hexadecimal encoding of 96 bytes (192 nibbles), prefixed with `0x`.

All byte(s) fields are encoded as strings, hexadecimal encoding, prefixed with `0x`.

## Condition

The `eth_fast_aggregate_verify` handler should verify the signature with pubkeys and message in the `input`, and the result should match the expected `output`.
13 changes: 10 additions & 3 deletions tests/formats/bls/fast_aggregate_verify.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,17 @@ The test data is declared in a `data.yaml` file:

```yaml
input:
pubkeys: List[bytes48] -- the pubkey
pubkeys: List[BLS Pubkey] -- list of input BLS pubkeys
message: bytes32 -- the message
signature: bytes96 -- the signature to verify against pubkeys and message
output: bool -- VALID or INVALID
signature: BLS Signature -- the signature to verify against pubkeys and message
output: bool -- true (VALID) or false (INVALID)
```
- `BLS Pubkey` here is encoded as a string: hexadecimal encoding of 48 bytes (96 nibbles), prefixed with `0x`.
- `BLS Signature` here is encoded as a string: hexadecimal encoding of 96 bytes (192 nibbles), prefixed with `0x`.

All byte(s) fields are encoded as strings, hexadecimal encoding, prefixed with `0x`.

## Condition

The `fast_aggregate_verify` handler should verify the signature with pubkeys and message in the `input`, and the result should match the expected `output`.

0 comments on commit ad4445f

Please sign in to comment.