PinSave
PinSave copied to clipboard
Bump o1js from 0.17.0 to 1.6.0 in /packages/frontend
Bumps o1js from 0.17.0 to 1.6.0.
Changelog
Sourced from o1js's changelog.
1.6.0 - 2024-07-23
Added
SmartContract.emitEventIf()to conditionally emit an event o1-labs/o1js#1746Changed
- Reduced maximum bit length for
xor,not, andand, operations from 254 to 240 bits to prevent overflow vulnerabilities. o1-labs/o1js#1745- Allow using
Typeinstead ofType.provablein APIs that expect a provable type o1-labs/o1js#1751
- Example:
Provable.witness(Bytes32, () => bytes)- Automatically wrap and unwrap
UnconstrainedinfromValueandtoValue, so that we don't need to deal with "unconstrained" values outside provable code o1-labs/o1js#17511.5.0 - 2024-07-09
Breaking changes
- Fixed a vulnerability in
OffchainStatewhere it didn't store theIndexedMerkleTreelength onchain and left it unconstrained o1-labs/o1js#1676Added
- A warning about the current reducer API limitations, as well as a mention of active work to mitigate them was added to doc comments and examples o1-labs/o1js#1728
ForeignField-based representation of scalars viaScalarFieldo1-labs/o1js#1705- Introduced new V2 methods for nullifier operations:
isUnusedV2(),assertUnusedV2(), andsetUsedV2()o1-labs/o1js#1715Int64.create()method for safe instance creation with canonical zero representation o1-labs/o1js#1735- New V2 methods for
Int64operations:fromObjectV2,divV2()o1-labs/o1js#1735Experimental.BatchReducerto reduce actions in batches o1-labs/o1js#1676
- Avoids the account update limit
- Handles arbitrary numbers of pending actions thanks to recursive validation of the next batch
- Add conditional versions of all preconditions:
.requireEqualsIf()o1-labs/o1js#1676AccountUpdate.createIf()to conditionally add an account update to the current transaction o1-labs/o1js#1676IndexedMerkleMap.setIf()to set a key-value pair conditionally o1-labs/o1js#1676Provable.assertEqualIf()to conditionally assert that two values are equal o1-labs/o1js#1676- Add
offchainState.setContractClass()which enables us to declare the connected contract at the top level, without creating a contract instance o1-labs/o1js#1676
- This is enough to call
offchainState.compile()- More low-level methods to interact with
MerkleListo1-labs/o1js#1676
popIfUnsafe(),toArrayUnconstrained()andlengthUnconstrained()Changed
- Improve error message when o1js global state is accessed in an invalid way o1-labs/o1js#1676
- Start developing an internal framework for local zkapp testing o1-labs/o1js#1676
- Internally upgrade o1js to TypeScript 5.4 o1-labs/o1js#1676
Deprecated
- Deprecated
Nullifier.isUnused(),Nullifier.assertUnused(), andNullifier.setUsed()methods o1-labs/o1js#1715createEcdsa,createForeignCurve,ForeignCurveandEcdsaSignaturedeprecated in favor ofV2versions due to a security vulnerability found in the current implementation o1-labs/o1js#1703Int64constructor, recommendingInt64.create()instead o1-labs/o1js#1735- Original
div()andfromObject, methods in favor of V2 versions o1-labs/o1js#1735
... (truncated)
Commits
- See full diff in compare view
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot mergewill merge this PR after your CI passes on it@dependabot squash and mergewill squash and merge this PR after your CI passes on it@dependabot cancel mergewill cancel a previously requested merge and block automerging@dependabot reopenwill reopen this PR if it is closed@dependabot closewill close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency@dependabot ignore this major versionwill close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor versionwill close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)