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

UInt64.lt Bug #101

Closed
frisitano opened this issue Mar 12, 2022 · 3 comments
Closed

UInt64.lt Bug #101

frisitano opened this issue Mar 12, 2022 · 3 comments

Comments

@frisitano
Copy link

There appears to be a bug on UInt64 implementation. When we execute value.lt(otherValue) when otherValue > value we receive an error.

How to recreate:

import { Field, isReady, shutdown, UInt64 } from "snarkyjs";

const main = async () => {
    await isReady;
    const value1 = new UInt64(new Field("5000"));
    const value2 = new UInt64(new Field("10000"));
    value1.lt(value2);
}

Promise.resolve()
    .then(async () => await main())

shutdown();

Error:

Error: rangeCheckHelper: Expected 28948022309329048855892746252171976963363056481941560715954676764349967625337 to fit in 64 bits
@mitschabaude
Copy link
Member

Thanks for reporting - will check it out

@mitschabaude
Copy link
Member

@mitschabaude
Copy link
Member

This is fixed by #307!

gabrielbosio pushed a commit to lambdaclass/o1js that referenced this issue Nov 17, 2023
…ns-for-prettier-berkeley

[berkeley] Add GitHub actions for prettier
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