fix: Support range checking non aligned bitwidth values (#47)

* initial commit

* most of the code done

* made global poseidon chip

* changed decompSize and added some panics

* made all gl chip as pointers

* working code

* revert go.mod and go.sum

* cleanup and comments

* cleaned up range checker selection

* renamed gnarkRangeCheckSelector to gnarkRangeCheckerSelector

* addressed PR comment

* addressed overflow issue identified by Veridise

* added some comments

* fixed some comment typos

* restore change made from commit hash 85d20ce and 9617141
This commit is contained in:
Kevin Jue
2024-01-04 13:56:13 -08:00
committed by GitHub
parent c82e6f3747
commit c01f530fe1
24 changed files with 224 additions and 41 deletions

View File

@@ -16,7 +16,7 @@ import (
type Chip struct {
api frontend.API `gnark:"-"`
gl gl.Chip `gnark:"-"`
gl *gl.Chip `gnark:"-"`
poseidonBN254Chip *poseidon.BN254Chip `gnark:"-"`
commonData *types.CommonCircuitData `gnark:"-"`
friParams *types.FriParams `gnark:"-"`
@@ -33,7 +33,7 @@ func NewChip(
poseidonBN254Chip: poseidonBN254Chip,
commonData: commonData,
friParams: friParams,
gl: *gl.New(api),
gl: gl.New(api),
}
}