mirror of
https://github.com/arnaucube/gnark-plonky2-verifier.git
synced 2026-01-12 09:01:32 +01:00
Merge pull request #45 from succinctlabs/kevjue/assert_leading_zeros_optimizations
perf: assertLeadingZeros constraint optimizations
This commit is contained in:
@@ -328,6 +328,11 @@ func (p *Chip) RangeCheck(x Variable) {
|
||||
)
|
||||
}
|
||||
|
||||
// This function will assert that the field element x is less than 2^maxNbBits.
|
||||
func (p *Chip) RangeCheckWithMaxBits(x Variable, maxNbBits uint64) {
|
||||
p.rangeChecker.Check(x.Limb, int(maxNbBits))
|
||||
}
|
||||
|
||||
func (p *Chip) AssertIsEqual(x, y Variable) {
|
||||
p.api.AssertIsEqual(x.Limb, y.Limb)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user