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 config and reference tests to v1.0.0-rc.0 + Reject BLS infinity pubkeys and signatures #2971

Merged
merged 28 commits into from
Oct 16, 2020

Conversation

Nashatyrev
Copy link
Contributor

PR Description

This is the continuation of @ajsutton PR #2952:

  • Reject BLS infinity pubkeys and signatures
  • Allow zero private key creation but throw when signing with this key
  • Add BLSConstants.VALID_INFINITY temporary compatibility flag which may be set to true to preserve previous BLS behavior
  • Make reference BLS tests covering both BLS implementations
  • Mikuli implementation code clean up: many methods removed and/or inlined
  • Adjust unit tests for the new BLS infinity treatment

Fixed Issue(s)

Part of #2951

Documentation

  • I thought about documentation and added the documentation label to this PR if updates are required.

ajsutton and others added 22 commits October 13, 2020 08:33
… invalid, not allowed to sign with Zero privkey
@Nashatyrev
Copy link
Contributor Author

We just need to decide when and where to adjust the BLSConstants.VALID_INFINITY

@ajsutton
Copy link
Contributor

We just need to decide when and where to adjust the BLSConstants.VALID_INFINITY

I was thinking we'd put it in Constants and then it could be set via the network definition file. Would be a non-standard option in network config, default to rejecting infinity as per 1.0 spec but our medalla.yaml could set it to allow infinity just on Medalla (and probably also Zinken but it will die soon).

@Nashatyrev
Copy link
Contributor Author

I was thinking we'd put it in Constants

@ajsutton do you think that c80cdb9 crutch is ok as a temporary solution?

@ajsutton
Copy link
Contributor

I was thinking we'd put it in Constants

@ajsutton do you think that c80cdb9 crutch is ok as a temporary solution?

Yep, that's exactly what I had in mind. Bit ugly but effective. :)

Copy link
Contributor

@ajsutton ajsutton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@Nashatyrev Nashatyrev merged commit b8b2b56 into Consensys:master Oct 16, 2020
@Nashatyrev Nashatyrev deleted the feature/rc1-bls branch October 16, 2020 11:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants