ethereum / consensus-spec-tests

Common tests for the Ethereum proof-of-stake consensus layer
MIT License
69 stars 22 forks source link

bls/msg_hash_g2_compressed little issue #3

Closed zilm13 closed 5 years ago

zilm13 commented 5 years ago

case 5:

- input: {message: '0x0000000000000000000000000000000000000000000000000000000000000000',
    domain: '0xffffffffffffffff'}
  output: ['0x83f7465e351f7bd0216fc5fcad4dcd1a4f45410bba304fbb8cab225c526fffafdd90f169add5c752d737f039242343a3',
    '0xa62b52965b0a1e44a1b2e5bed5eaa448028317603d2bacf4acd7b7e263e01e2a841e7537a827cb1502a4109dbac0ff']

output should be of two 48-bytes points, but second is trimmed to 47 bytes, should be 0x00a62b.. instead. I guess, we shouldn't trim leading zeroes that as we don't do this with message, we have fixed size ssz fields etc.

kirk-baird commented 5 years ago

I agree with @zilm13 on this one. As Signatures are set to exactly 96 bytes so we should pad leading 0's when representing a G2 point.

djrtwo commented 5 years ago

Just saw this. Is this still the case? Probably an error in the yaml writer

kirk-baird commented 5 years ago

Yep it's still there. That's the only test case I can see this is an issue.

djrtwo commented 5 years ago

looking into it for v0.7.1 release!

protolambda commented 5 years ago

This may be the reason: https://github.com/ethereum/py_ecc/pull/70 Sorry, wrong BLS issue, intended to comment on another

djrtwo commented 5 years ago

addressed in https://github.com/ethereum/eth2.0-specs/pull/1179 To be released in v0.7.1