Skip to content

Commit

Permalink
Merge pull request #1827 from o1-labs/fix-proofs-enabled
Browse files Browse the repository at this point in the history
avoid overwriting `proofsEnabled` through default parameter
  • Loading branch information
mitschabaude authored Sep 18, 2024
2 parents 9cbe10f + 1b20c88 commit f37d476
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
- Added `fromEthers` method for parsing and converting Ethereum public keys into `ForeignCurve` points, supporting both compressed and uncompressed formats.
- Added `fromHex` method for converting hexadecimal strings into `ForeignCurve` points.

### Fixes

- Fix incorrect behavior of optional proving for zkPrograms where `myProgram.setProofsEnabled(false)` wouldn't work when called before `myProgram.compile()` https://github.com/o1-labs/o1js/pull/1827

## [1.7.0](https://github.com/o1-labs/o1js/compare/d6abf1d97...5006e4f) - 2024-09-04

### Added
Expand Down
4 changes: 2 additions & 2 deletions src/lib/proof-system/zkprogram.ts
Original file line number Diff line number Diff line change
Expand Up @@ -666,9 +666,9 @@ function ZkProgram<
async function compile({
cache = Cache.FileSystemDefault,
forceRecompile = false,
proofsEnabled = true,
proofsEnabled = undefined,
} = {}) {
doProving = proofsEnabled;
doProving = proofsEnabled ?? doProving;

if (doProving) {
let methodsMeta = await analyzeMethods();
Expand Down

0 comments on commit f37d476

Please sign in to comment.