Skip to content

Commit

Permalink
Merge branch 'main' into feature/secp256r1
Browse files Browse the repository at this point in the history
  • Loading branch information
mitschabaude committed Oct 25, 2024
2 parents ec38e56 + 90743e1 commit d28034b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm

- Support secp256r1 in elliptic curve and ECDSA gadgets https://github.com/o1-labs/o1js/pull/1885

### Fixed

- Witness generation error in `Gadgets.arrayGet()` when accessing out-of-bounds indices https://github.com/o1-labs/o1js/pull/1886

## [2.0.0](https://github.com/o1-labs/o1js/compare/7e9394...b04520d)

### Breaking Changes
Expand Down
2 changes: 1 addition & 1 deletion src/lib/provable/gadgets/basic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ function arrayGet(array: Field[], index: Field) {
let i = toVar(index);

// witness result
let a = existsOne(() => array[Number(i.toBigInt())].toBigInt() ?? 0n);
let a = existsOne(() => array[Number(i.toBigInt())]?.toBigInt() ?? 0n);

// we prove a === array[j] + z[j]*(i - j) for some z[j], for all j.
// setting j = i, this implies a === array[i]
Expand Down

0 comments on commit d28034b

Please sign in to comment.