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

Left shift overflow when calculating max_degree #49

@dark64

Description

@dark64

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions