You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue is a tracker for all the test cases in int.test.ts that throws the rangeCheckHelper. Every test case that runs into this error has been replicated in this PR to make it easier to debug the different places rangeCheckHelper is throwing.
// rangeCheckHelper: Expected 28948022309329048855892746252171976963363056481941560715954676764349967630336 to fit in 64 bitsit.skip("1<2=true",()=>{expect(()=>{Circuit.runAndCheck(()=>{constx=Circuit.witness(UInt64,()=>newUInt64(Field.one));consty=Circuit.witness(UInt64,()=>newUInt64(Field(2)));x.assertLt(y);});}).not.toThrow();});// rangeCheckHelper: Expected 28948022309329048855892746252171976963363056481941560715954676764349967531337 to fit in 64 bitsit.skip("1000<100000=true",()=>{expect(()=>{Circuit.runAndCheck(()=>{constx=Circuit.witness(UInt64,()=>newUInt64(Field(1000)));consty=Circuit.witness(UInt64,()=>newUInt64(Field(100000)));x.assertLt(y);});}).not.toThrow();});
// rangeCheckHelper: Expected 28948022309329048855892746252171976963363056481941560715954676764349967630336 to fit in 64 bitsit.skip("1<2=true",()=>{expect(newUInt64(Field.one).lt(newUInt64(Field(2)))).toEqual(Bool(true));});// rangeCheckHelper: Expected 28948022309329048855892746252171976963363056481941560715954676764349967531337 to fit in 64 bitsit.skip("1000<100000=true",()=>{expect(newUInt64(Field(1000)).lt(newUInt64(Field(100000)))).toEqual(Bool(true));});
// rangeCheckHelper: Expected 28948022309329048855892746252171976963363056481941560715954676764349967630336 to fit in 64 bitsit.skip('2>1=true',()=>{expect(newUInt64(Field(2)).gt(newUInt64(Field.one))).toEqual(Bool(true));});// rangeCheckHelper: Expected 28948022309329048855892746252171976963363056481941560715954676764349967630336 to fit in 64 bitsit.skip('1>2=false',()=>{expect(newUInt64(Field.one).lt(newUInt64(Field(2)))).toEqual(Bool(false));});// rangeCheckHelper: Expected 28948022309329048855892746252171976963363056481941560715954676764349967531337 to fit in 64 bitsit.skip('100000>1000=true',()=>{expect(newUInt64(Field(100000)).gt(newUInt64(Field(1000)))).toEqual(Bool(true));});// rangeCheckHelper: Expected 28948022309329048855892746252171976963363056481941560715954676764349967531337 to fit in 64 bitsit('100000>1000=true',()=>{expect(newUInt64(Field(100000)).assertGt(newUInt64(Field(1000)))).not.toThrow();});
UInt32
assertLt
// rangeCheckHelper: Expected 28948022309329048855892746252171976963363056481941560715954676764349967531337 to fit in 64 bitsit.skip('1000<100000=true',()=>{expect(()=>{Circuit.runAndCheck(()=>{constx=Circuit.witness(UInt32,()=>newUInt32(Field(1000)));consty=Circuit.witness(UInt32,()=>newUInt32(Field(100000)));x.assertLt(y);});}).not.toThrow();
assertGt
// rangeCheckHelper: Expected 28948022309329048855892746252171976963363056481941560715954676764349967630336 to fit in 64 bitsit.skip("2>1=true",()=>{expect(()=>{Circuit.runAndCheck(()=>{constx=Circuit.witness(UInt32,()=>newUInt32(Field(2)));consty=Circuit.witness(UInt32,()=>newUInt32(Field.one));x.assertGt(y);});}).not.toThrow();});// rangeCheckHelper: Expected 28948022309329048855892746252171976963363056481941560715954676764349967630336 to fit in 64 bitsit.skip("100000>1000=true",()=>{expect(()=>{Circuit.runAndCheck(()=>{constx=Circuit.witness(UInt32,()=>newUInt32(Field(100000)));consty=Circuit.witness(UInt32,()=>newUInt32(Field(1000)));x.assertGt(y);});}).not.toThrow();});
lt
// rangeCheckHelper: Expected 28948022309329048855892746252171976963363056481941560715954676764349967630336 to fit in 64 bitsit.skip("1<2=true",()=>{expect(newUInt32(Field.one).lt(newUInt32(Field(2)))).toEqual(Bool(true));});// rangeCheckHelper: Expected 28948022309329048855892746252171976963363056481941560715954676764349967531337 to fit in 64 bitsit.skip("1000<100000=true",()=>{expect(newUInt32(Field(1000)).lt(newUInt32(Field(100000)))).toEqual(Bool(true));});
lte
// rangeCheckHelper: Expected 28948022309329048855892746252171976963363056481941560715954676764349967531337 to fit in 64 bitsit.skip("1000<=100000=true",()=>{expect(newUInt32(Field(1000)).lte(newUInt32(Field(100000)))).toEqual(Bool(true));});
gt
// rangeCheckHelper: Expected 28948022309329048855892746252171976963363056481941560715954676764349967630336 to fit in 64 bitsit.skip("2>1=true",()=>{expect(newUInt32(Field(2)).gt(newUInt32(Field.one))).toEqual(Bool(true));});// rangeCheckHelper: Expected 28948022309329048855892746252171976963363056481941560715954676764349967630336 to fit in 64 bitsit.skip("1>2=false",()=>{expect(newUInt32(Field.one).lt(newUInt32(Field(2)))).toEqual(Bool(false));});// rangeCheckHelper: Expected 28948022309329048855892746252171976963363056481941560715954676764349967531337 to fit in 64 bitsit.skip("100000>1000=true",()=>{expect(newUInt32(Field(100000)).gt(newUInt32(Field(1000)))).toEqual(Bool(true));});
assertGt
// rangeCheckHelper: Expected 28948022309329048855892746252171976963363056481941560715954676764349967630336 to fit in 64 bitsit("2>1=true",()=>{expect(newUInt32(Field(2)).assertGt(newUInt32(Field.one))).not.toThrow();});// rangeCheckHelper: Expected 28948022309329048855892746252171976963363056481941560715954676764349967531337 to fit in 64 bitsit("100000>1000=true",()=>{expect(newUInt32(Field(100000)).assertGt(newUInt32(Field(1000)))).not.toThrow();});
The text was updated successfully, but these errors were encountered:
This issue is a tracker for all the test cases in
int.test.ts
that throws therangeCheckHelper
. Every test case that runs into this error has been replicated in this PR to make it easier to debug the different placesrangeCheckHelper
is throwing.These bugs are surfaced from #164
UInt64
assertLt
assertGt
lt
lte
gt
UInt32
assertLt
assertGt
lt
lte
gt
assertGt
The text was updated successfully, but these errors were encountered: