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

Define type for BLS suite test cases #16

Open
mkalinin opened this issue Jan 30, 2019 · 1 comment
Open

Define type for BLS suite test cases #16

mkalinin opened this issue Jan 30, 2019 · 1 comment

Comments

@mkalinin
Copy link

Problem

It's tricky to build BLS test suite without knowing which routine is covered by a certain test case.

Solution

Specify routine for test case over a type field.

Example

case01_message_hash_G2_uncompressed:
- type: hash_to_G2_uncompressed
- input: {domain: '0x00', message: '0x6d657373616765'}
  output:
  - ['0x0e34a428411c115e094b51afa596b0e594fb325dfe42d481a87a1e89ab35f531aadc7b4f8eb5ce9d3973d2cfef8f20fd',
    '0x12830258cc04219871cd71eb9478eb1f1971104bcf49ac60ec6e3368e9047e10acef61b75d803849942bea06e3bc99a8']
  - ['0x162f48744b91343105f5b1830f3346da815ada6b615afc57c611b423470fb53d26c9e8a1e6288b524f75a8e69492cd31',
    '0x129b6b431d1d3dabda12739eadac269e7d85e2940f270b5486bfddf2c36109164dd20ba5369e9305ef16e470d0eafad0']
  - ['0x05825be2264001369d47bfac0fef4735d4cbbc8e6e0cd2f25b68948122b94a856473f07b9e6d16af7a7286bab41fc9d6',
    '0x0a2fba34dddfa47d0363fdf88d6d7fdb9db3d914f70275ea6923b3fceffee565dd7de1b2109293a72139bf3b82126a52']
case04_sign_messages:
- type: sign
- input: {domain: '0x00', message: '0x56657279202e2e2e2e2e2e2e2e2e2e2e2e2e2e206c6f6e67202e2e2e2e2e2e2e2e2e2e2e2e2e206d657373616765202e2e2e2e207769746820656e74726f70793a20313233343536373839302d626561636f6e2d636861696e',
    privkey: '0x81376b9868b292a46a1c486d344e427a3088657fda629b5f4a647822d329cd6a4620faa42d0ede402d794c367ec9c97f'}
  output: '0x09ad5dc89d7cc772cb58e61e26f4dc9fe8b43ad2a45feae2d15f09ec278ab9428dd3df9c0e2dcbee879b5436ae3609f00e2da1169b97434383157e7697f59412540a01f79ddd39a3d7df845aa4922de18723ebd66db3c69bea3e0a3240e6d3c0'

Relates to https://github.com/ethereum/eth2.0-tests/issues/14.

@djrtwo
Copy link
Contributor

djrtwo commented Feb 6, 2019

Agreed. The type is essentially embedded in the name right now which requires apriori knowledge of naming or ordering. We either need to pull different "types" into separate files or make it more explicit with the field imo

@hwwhww hwwhww transferred this issue from ethereum/eth2.0-tests Feb 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants