consensus-spec-tests icon indicating copy to clipboard operation
consensus-spec-tests copied to clipboard

Add tests for consensus on valid G2 points

Open blacktemplar opened this issue 6 years ago • 2 comments

The specs describe in https://github.com/ethereum/eth2.0-specs/blob/dev/specs/bls_signature.md#g2-points exactly the conditions when a G2 point is valid.

I think a potential consensus attack on the eth2.0 network could be creating deposits which have invalid signatures based on those rules. So it is very important to not break consensus that all clients recognize the same signatures (compressed as G2 points) as valid/invalid.

Therefore I propose adding tests which test the conditions specified in https://github.com/ethereum/eth2.0-specs/blob/dev/specs/bls_signature.md#g2-points. As far as I can see such tests are not existent at the moment (whenever we test invalid signatures for deposit we use the signature with all 0s).

blacktemplar avatar Jul 30 '19 14:07 blacktemplar

@JustinDrake What do you think? Does it make sense to prioritize this, even though the current hash_to_G2 is non-final/unsecure?

protolambda avatar Aug 08 '19 14:08 protolambda

A test suite is being developed alongside the standardisation effort. I expect we can merge those tests in when the standardisation is a bit more mature.

JustinDrake avatar Aug 08 '19 16:08 JustinDrake