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

Test test_bit_length_create_commitment_with_user_defined_randomness sometimes fails #56

Open
amanusk opened this issue Aug 20, 2019 · 1 comment

Comments

@amanusk
Copy link
Contributor

amanusk commented Aug 20, 2019

Related to #54, it seems that the test that fails once in 16 runs (in expectation) is:
https://github.com/KZen-networks/curv/blob/7f0586fd543f81f5202da766cd7c382e07876a04/src/cryptographic_primitives/commitments/hash_commitment.rs#L78
Because leading zeros are not translated into a string.

Possible fix suggestions:

  • Check not_zero
  • Check no error is returned from string conversion
  • Check length > (some number less than 64) (This is will still be probabilistic but with lower probability)
  • Ignore test
@omershlo
Copy link
Contributor

we should find a better way to test probabilistic commitments

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

No branches or pull requests

2 participants