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

Left shift overflow when calculating max_degree #49

Open
dark64 opened this issue Feb 8, 2023 · 0 comments
Open

Left shift overflow when calculating max_degree #49

dark64 opened this issue Feb 8, 2023 · 0 comments

Comments

@dark64
Copy link

dark64 commented Feb 8, 2023

let max_degree = (1 << E::Fr::S) - 1;

let max_degree = (1 << E::Fr::S) - 1;

This code fails when compiled to wasm with

panicked at 'attempt to shift left with overflow', 
/home/darko/.cargo/registry/src/github.com-1ecc6299db9ec823/bellman_ce-0.3.5/src/domain.rs:64:26

when E::Fr::S is greater or equal to 32, which seems to be the case with curve bls12_381.

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

1 participant