Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update BLS test format: output null for invalid case #3001

Merged
merged 1 commit into from
Sep 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions tests/formats/bls/aggregate.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ The test data is declared in a `data.yaml` file:

```yaml
input: List[BLS Signature] -- list of input BLS signatures
output: BLS Signature -- expected output, single BLS signature or empty.
output: BLS Signature -- expected output, single BLS signature or `null`.
```

- `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.
- output value is `null` if the input is invalid.

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

Expand Down
4 changes: 2 additions & 2 deletions tests/formats/bls/eth_aggregate_pubkeys.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ The test data is declared in a `data.yaml` file:

```yaml
input: List[BLS Pubkey] -- list of input BLS pubkeys
output: BLSPubkey -- expected output, single BLS pubkeys or empty.
output: BLSPubkey -- expected output, single BLS pubkeys or `null`.
```

- `BLS Pubkey` here is encoded as a string: hexadecimal encoding of 48 bytes (96 nibbles), prefixed with `0x`.
- No output value if the input is invalid.
- output value is `null` if the input is invalid.

## Condition

Expand Down
9 changes: 7 additions & 2 deletions tests/formats/bls/sign.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,12 @@ The test data is declared in a `data.yaml` file:
input:
privkey: bytes32 -- the private key used for signing
message: bytes32 -- input message to sign (a hash)
output: BLS Signature -- expected output, single BLS signature or empty.
output: BLS Signature -- expected output, single BLS signature or `null`.
```

All byte(s) fields are encoded as strings, hexadecimal encoding, prefixed with `0x`.
- All byte(s) fields are encoded as strings, hexadecimal encoding, prefixed with `0x`.
- output value is `null` if the input is invalid.

## Condition

The `sign` handler should sign `message` with `privkey`, and the resulting signature should match the expected `output`.