celo-org / celo-bls-snark-rs

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

Implement CIP22 padding #195

Closed kobigurk closed 3 years ago

kobigurk commented 3 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.