kobigurk / phase2-bn254

71 stars 234 forks source link

[Phase2] Mismatch reading/writing H #1

Closed Brechtpd closed 4 years ago

Brechtpd commented 5 years ago

There seems to be mismatch in the number of elements that are written to and then read from the phase1radix2 files for H.

For me this results in the following error when reading the H elements running the examples:

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: IoError(Custom { kind: UnexpectedEof, error: "failed to fill whole buffer" })'

Is there something I'm missing or is this indeed the problem?

kobigurk commented 5 years ago

Hey @Brechtpd, thanks for catching this. It seems you're right, I probably missed one of the changes I should have committed.

Small point - we use https://github.com/kobigurk/phase2-bn254/blob/master/powersoftau/src/bin/prepare_phase2.rs rather than verify.rs, since it doesn't perform re-verification of all the previous contributions.

I'll test that and commit the right version in the coming days - if you want to test it before, feel free to get in touch.

Brechtpd commented 4 years ago

Fixed in #2.