Skip to content
This repository has been archived by the owner on Aug 15, 2024. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant