celo-org / celo-bls-snark-rs

Implements SNARK-friendly BLS signatures
https://celo.org
Apache License 2.0
84 stars 21 forks source link

Implement CIP22 padding #195

Closed kobigurk closed 4 years ago

kobigurk commented 4 years ago

Description

This PR adds support for padding the validator set by passing another maximum validators parameter. This is almost 100% based on @lucasege's work.

Drive-by change

We had a bug in encode_public_key where it checks c1 == half instead of the updated c1 == 0 as mentioned in https://github.com/celo-org/celo-bls-snark-rs/issues/149.

Tested

Tests on the encoding.