<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Barrie Byron on Medium]]></title>
        <description><![CDATA[Stories by Barrie Byron on Medium]]></description>
        <link>https://medium.com/@zkbarrie?source=rss-63a6433541e------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*EGDqLB5Fz3LTVuXl1u9SRA.jpeg</url>
            <title>Stories by Barrie Byron on Medium</title>
            <link>https://medium.com/@zkbarrie?source=rss-63a6433541e------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 00:54:18 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@zkbarrie/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[What’s New in o1js: February 2024]]></title>
            <link>https://blog.o1labs.org/whats-new-in-o1js-february-2024-b06cdd05f7bd?source=rss-63a6433541e------2</link>
            <guid isPermaLink="false">https://medium.com/p/b06cdd05f7bd</guid>
            <category><![CDATA[zkp]]></category>
            <category><![CDATA[smart-contracts]]></category>
            <category><![CDATA[zkapps]]></category>
            <category><![CDATA[zero-knowledge-proofs]]></category>
            <category><![CDATA[o1js]]></category>
            <dc:creator><![CDATA[Barrie Byron]]></dc:creator>
            <pubDate>Thu, 08 Feb 2024 14:02:44 GMT</pubDate>
            <atom:updated>2024-03-05T18:35:10.232Z</atom:updated>
            <content:encoded><![CDATA[<h4>Bridging the gap between Web2 and Web3</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*El3ZFlcJ_T5BuMmoPh5M1g.jpeg" /></figure><p>o1js can now generate proofs of <a href="https://docs.minaprotocol.com/zkapps/o1js/sha256">SHA-256 cryptographic hash function</a> within a circuit. This opens up a world of possibilities for various applications in decentralized and traditional systems. For example, you can verify a Merkle tree with SHA-256 hashes or validate Bitcoin block headers for a Bitcoin light client.</p><h3>Added</h3><ul><li>Configurable NetworkId when declaring a Mina instance. (0.15.4, <a href="https://github.com/o1-labs/o1js/pull/1387">#1387</a>)<br>- Defaults to “testnet”, the other option is “mainnet”<br>- The networkId parameter influences the algorithm used for signatures and ensures that testnet transactions can’t be replayed on mainnet</li><li>SHA256 hash function exposed via Hash.SHA2_256 or Gadgets.SHA256. (0.15.3, <a href="https://github.com/o1-labs/o1js/pull/1285">#1285</a>)</li><li>Provable type Packed&lt;T&gt; to pack small field elements into fewer field elements (0.16.0, <a href="https://github.com/o1-labs/o1js/pull/1376">#1376</a>)</li><li>Provable type Hashed&lt;T&gt; to represent provable types by their hash (0.16.0, <a href="https://github.com/o1-labs/o1js/pull/1377">#1377</a>)<br>- This also exposes Poseidon.hashPacked() to efficiently hash an arbitrary type</li></ul><h3>Changed</h3><ul><li>Improve performance of Wasm Poseidon hashing by a factor of 13x (0.15.4, <a href="https://github.com/o1-labs/o1js/pull/1378">#1378</a>)<br>- Speeds up local blockchain tests without proving by ~40%</li><li>Improve performance of Field inverse (0.15.4, <a href="https://github.com/o1-labs/o1js/pull/1373">#1373</a>)<br>- Speeds up proving by ~2–4%</li><li>Mina.accountCreationFee() is deprecated in favor of Mina.getNetworkConstants().accountCreationFee. (0.15.3, <a href="https://github.com/o1-labs/o1js/pull/1367">#1367</a>)<br>- Mina.getNetworkConstants() returns:<br> - <a href="https://github.com/o1-labs/o1js/pull/1367/files#diff-ef2c3547d64a8eaa8253cd82b3623288f3271e14f1dc893a0a3ddc1ff4b9688fR7">default</a> network constants if used outside of the transaction scope.<br> - <a href="https://github.com/o1-labs/o1js/pull/1367/files#diff-437f2c15df7c90ad8154c5de1677ec0838d51859bcc0a0cefd8a0424b5736f31R1051">actual</a> network constants if used within the transaction scope.</li></ul><h3>Fixed</h3><ul><li>Fix approving of complex account update layouts (0.15.3, <a href="https://github.com/o1-labs/o1js/pull/1364">#1364</a>)</li></ul><h3>Breaking Changes</h3><ul><li>Protocol change that adds a “transaction version” to the permission to set verification keys (0.16.0, <a href="https://github.com/MinaProtocol/mina/pull/14407">MinaProtocol/mina #14407</a>)<br>- See the relevant <a href="https://github.com/MinaProtocol/mina/blob/9577ad689a8e4d4f97e1d0fc3d26e20219f4abd1/rfcs/0051-verification-key-permissions.md">Verification Key Permissions RFC</a> for the motivation behind this change.<br>- Breaks all deployed contracts, as it changes the account update layout</li></ul><h3>zkApp CLI Updates</h3><p>We continue to develop the zkApp CLI with the developer experience in mind.</p><h3>Added</h3><ul><li><strong>Lightnet! </strong>The most efficient way to deploy and run a lightweight Mina blockchain network for testing purposes is to spin up a lightweight Mina network (Lightnet) in a single Docker container. Lightnet is a resource-efficient solution with fast startup and syncing times. Lightnet lets you test your zkApp locally on an accurate representation of the Mina blockchain before you test with a live network.<br>- Use the zkApp CLI to start Lightnet zk lightnet start<br>- Use zk lightnet --help to see all the options</li><li>Developer documentation for using Lightnet:<br>- zkApp docs <a href="https://docs.minaprotocol.com/zkapps/testing-zkapps-lightnet">Testing zkApps with Lightnet</a>. (<a href="https://github.com/o1-labs/docs2/pull/780">#780</a>)<br>- zkApp CLI <a href="https://github.com/o1-labs/zkapp-cli/blob/main/README.md">README</a> (<a href="https://github.com/o1-labs/zkapp-cli/pull/562">#562</a>) <a href="https://github.com/45930">@45930</a></li><li>Possibility to configure the target network to testnet or mainnet during the zk config process. (0.16.1, <a href="https://github.com/o1-labs/zkapp-cli/pull/564">#564</a>)</li></ul><h3>Changed</h3><ul><li>Update project scaffold tsconfig to handle esnext and es2022 targets. (0.16.2, <a href="https://github.com/o1-labs/zkapp-cli/pull/570">#570</a>)</li><li>Dependencies updated. (0.16.2, <a href="https://github.com/o1-labs/zkapp-cli/pull/573">#573</a>)</li><li>Bump minor version to 0.17.0. (0.17.0, <a href="https://github.com/o1-labs/zkapp-cli/pull/574">#574</a>)</li></ul><h3>Shout outs</h3><p>A strong community helps us build and deliver better software faster. We are always grateful for community members who contribute, engage, explore, and share knowledge.</p><p>Thank you to our developers who test, build, and contribute.</p><p>We see an uptick in docs use, including new issues and fixes. Thanks to our many docs contributors who submit updates and quick fixes. Did you know you can click <strong>EDIT THIS PAGE</strong> on any docs page to submit a simple fix?</p><ul><li><a href="https://github.com/LuffySama-Dev">@LuffySama-Dev</a> continues to contribute significant updates and fixes to zkApp docs.</li><li><a href="https://github.com/45930">@45930</a> for updating the zkApp CLI <a href="https://github.com/o1-labs/zkapp-cli/blob/main/README.md#testing-your-zkapp">README</a> to include Lightnet in response to Discord conversations.</li></ul><p>Are you building zkApps with o1js? Help us celebrate you. Tag <a href="https://twitter.com/o1_labs">@o1_labs</a> on Twitter/X when you share your work.</p><h3>To stay up to date</h3><p>Follow the official o1Labs <a href="https://twitter.com/o1_labs">@o1_labs</a> on Twitter/X.</p><h3>To participate</h3><p><a href="https://discord.gg/minaprotocol">Mina Protocol Discord</a> is the most popular place where Mina enthusiasts and technical contributors gather to share knowledge.</p><p>Join us in these zkApps channels:</p><ul><li><a href="https://discord.com/channels/484437221055922177/915745847692636181">#zkapps-developers</a> to meet other developers building zkApps with o1js</li><li><a href="https://discord.com/channels/484437221055922177/910549624413102100">#zkapps-general</a> to ask general questions about zkApps, how to use a zkApp, and so on</li><li><a href="https://discord.com/channels/484437221055922177/1047214314349658172">#zkapps-questions</a> to ask zkApps-related questions and see Q&amp;A history</li></ul><h3>To contribute</h3><p>To learn how you can help us improve the functionality and user experience, which in turn helps you build better projects, see:</p><ul><li>o1js <a href="https://github.com/o1-labs/o1js/blob/main/CONTRIBUTING.md">Contributing guidelines</a></li><li>zkApp CLI <a href="https://github.com/o1-labs/zkapp-cli/blob/main/CONTRIBUTING.md">Contributing guidelines</a></li><li>Docs <a href="https://github.com/o1-labs/docs2/blob/main/CONTRIBUTING.md">Contributing guidelines</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b06cdd05f7bd" width="1" height="1" alt=""><hr><p><a href="https://blog.o1labs.org/whats-new-in-o1js-february-2024-b06cdd05f7bd">What’s New in o1js: February 2024</a> was originally published in <a href="https://blog.o1labs.org/">o1Labs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What’s New in o1js: January 2024]]></title>
            <link>https://blog.o1labs.org/whats-new-in-o1js-january-2024-ea2a38b6bd6c?source=rss-63a6433541e------2</link>
            <guid isPermaLink="false">https://medium.com/p/ea2a38b6bd6c</guid>
            <category><![CDATA[ecdsa]]></category>
            <category><![CDATA[zero-knowledge-proofs]]></category>
            <category><![CDATA[smart-contracts]]></category>
            <category><![CDATA[o1js]]></category>
            <category><![CDATA[zkapps]]></category>
            <dc:creator><![CDATA[Barrie Byron]]></dc:creator>
            <pubDate>Wed, 10 Jan 2024 19:20:05 GMT</pubDate>
            <atom:updated>2024-01-10T19:20:05.449Z</atom:updated>
            <content:encoded><![CDATA[<h4>Ethereum compatibility with Keccak, ECDSA, bitwise operations, and foreign field arithmetic</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qK_PQ1pJongcpsFCj9vHsw.png" /></figure><p>Our commitment to our vibrant developer community led us here. Ethereum compatibility has been a resounding ask. <strong>Keccak</strong>, integral for hashing addresses, transactions, and blocks in Ethereum, and <strong>ECDSA</strong>, crucial for signing and verifying messages, are now natively supported in o1js.</p><p>Used together, Keccak hashing and ECDSA signature verification enable a wide range of use cases, such as proof of ownership of an Ethereum address for exclusive chat or private voting. These substantial updates to o1js greatly expand the capabilities of what’s possible in the realm of zkApps on the Mina Protocol.</p><h3>o1js Highlights</h3><p>First, we released <a href="https://docs.minaprotocol.com/zkapps/o1js/bitwise-operations"><strong>Bitwise Operations</strong></a> to make the process of implementing new cryptographic primitives in o1js easier and more efficient. By having access to fast and provable binary operations, you can use bitwise operations as building blocks for more advanced cryptographic algorithms, such as SHA, RSA, and more.</p><p><a href="https://docs.minaprotocol.com/zkapps/o1js/foreign-fields"><strong>Foreign Field Arithmetic</strong></a> extends o1js capabilities to handle operations in fields different from its native proof system. Foreign fields facilitate the implementation of cryptographic functions that are compatible with external systems, making it possible for applications to work with external cryptographic systems.</p><p>With the foundations in place, we built on that work to implement Keccak and ECDSA.</p><ul><li><a href="https://docs.minaprotocol.com/zkapps/o1js/keccak"><strong>Keccak</strong></a> is a flexible cryptographic hash function that provides more security than traditional SHA hash algorithms. You can use Keccak to verify Ethereum transactions and blocks in o1js, bridging a crucial gap in blockchain interoperability. Keccak enhances the security of applications and provides a flexible and powerful tool so you can implement a range of cryptographic solutions, from creating unique digital fingerprints to ensuring data integrity.</li><li><a href="https://docs.minaprotocol.com/zkapps/o1js/ecdsa"><strong>ECDSA</strong></a> is a cryptographic algorithm that is used to sign and verify messages for enhanced security. While ECDSA has various applications, a key advantage is its role in Ethereum signature verification. This integration equips you with the tools required for generating and verifying Ethereum signatures, effectively linking zkApps with the Ethereum ecosystem.</li></ul><h3>Added</h3><ul><li>Non-native elliptic curve operations exposed through createForeignCurve() class factory. (0.15.1, <a href="https://github.com/o1-labs/o1js/pull/1007">#1007</a>)</li><li><strong>ECDSA signature verification</strong> exposed through createEcdsa() class factory. (0.15.1, <a href="https://github.com/o1-labs/o1js/pull/1240">#1240</a>, <a href="https://github.com/o1-labs/o1js/pull/1007">#1007</a>, <a href="https://github.com/o1-labs/o1js/pull/1307">#1307</a>)<br>- For an example, see <a href="https://github.com/o1-labs/o1js/tree/main/src/examples/crypto/ecdsa">./src/examples/crypto/ecdsa</a>.</li><li><strong>Keccak/SHA3</strong> hash function exposed on Keccak namespace. (0.15.1, <a href="https://github.com/o1-labs/o1js/pull/1291">#1291</a>)</li><li>Hash namespace which holds all hash functions. (0.15.1, <a href="https://github.com/o1-labs/o1js/pull/999">#999</a>)<br>- Bytes, provable type to hold a byte array, which serves as input and output for Keccak variants.<br>- UInt8, provable type to hold a single byte, which is constrained to be in the 0 to 255 range.</li><li>Gadgets.rotate32() for rotation over 32 bit values. (0.15.1, <a href="https://github.com/o1-labs/o1js/pull/1259">#1259</a>)</li><li>Gadgets.leftShift32() for left shift over 32 bit values. (0.15.1, <a href="https://github.com/o1-labs/o1js/pull/1259">#1259</a>)</li><li>Gadgets.divMod32() division modulo 2^32 that returns the remainder and quotient of the operation (0.15.1, <a href="https://github.com/o1-labs/o1js/pull/1259">#1259</a>)</li><li>Gadgets.rangeCheck32() range check for 32 bit values. (0.15.1, <a href="https://github.com/o1-labs/o1js/pull/1259">#1259</a>)</li><li>Gadgets.addMod32() addition modulo 2^32. (0.15.1, <a href="https://github.com/o1-labs/o1js/pull/1259">#1259</a>)</li><li>Expose new bitwise gadgets on UInt32 and UInt64. (0.15.1, <a href="https://github.com/o1-labs/o1js/pull/1259">#1259</a>)<br>-bitwise XOR via {UInt32, UInt64}.xor()<br>-bitwise NOT via {UInt32, UInt64}.not()<br>-bitwise ROTATE via {UInt32, UInt64}.rotate()<br>-bitwise LEFTSHIFT via {UInt32, UInt64}.leftShift()<br>-bitwise RIGHTSHIFT via {UInt32, UInt64}.rightShift()<br>-bitwise AND via {UInt32, UInt64}.and()</li><li>Example for using actions to store a map data structure. (0.15.1, <a href="https://github.com/o1-labs/o1js/pull/1300">#1300</a>)</li><li>Provable.constraintSystem()and{ZkProgram,SmartContract}.analyzeMethods() return a summary() method to return a summary of the constraints used by a method. (0.15.1, <a href="https://github.com/o1-labs/o1js/pull/1007">#1007</a>)</li><li><strong>Foreign field arithmetic</strong> exposed through the createForeignField() class factory. (0.15.0, <a href="https://github.com/o1-labs/o1js/pull/985">#985</a>)</li><li>Crypto namespace which exposes elliptic curve and finite field arithmetic on BigInts, as well as example curve parameters. (0.15.0, <a href="https://github.com/o1-labs/o1js/pull/1240">#1240</a>)</li><li>Gadgets.ForeignField.assertMul() for efficiently constraining products of sums in non-native arithmetic. (0.15.0, <a href="https://github.com/o1-labs/o1js/pull/1262">#1262</a>)</li><li>Unconstrained for safely maintaining unconstrained values in provable code. (0.15.0, <a href="https://github.com/o1-labs/o1js/pull/1262">#1262</a>)</li><li>Gadgets.rangeCheck8() to assert that a value fits in 8 bits. (0.15.0, <a href="https://github.com/o1-labs/o1js/pull/1288">#1288</a>)</li><li>Provable non-native field arithmetic:</li><li>Gadgets.ForeignField.{add, sub, sumchain}() for addition and subtraction. (0.14.2, <a href="https://github.com/o1-labs/o1js/pull/1220">#1220</a>)</li><li>Gadgets.ForeignField.{mul, inv, div}() for multiplication and division. (0.14.2, <a href="https://github.com/o1-labs/o1js/pull/1223">#1223</a>)</li><li>Comprehensive internal testing of constraint system layouts generated by new gadgets. (0.14.2, <a href="https://github.com/o1-labs/o1js/pull/1241">#1241</a>, <a href="https://github.com/o1-labs/o1js/pull/1220">#1220</a>)</li><li>Gadgets.not(), new provable method to support bitwise not. (0.14.1, <a href="https://github.com/o1-labs/o1js/pull/1198">#1198</a>)</li><li>Gadgets.leftShift() / Gadgets.rightShift(), new provable methods to support bitwise shifting. (0.14.1, <a href="https://github.com/o1-labs/o1js/pull/1194">#1194</a>)</li><li>Gadgets.and(), new provable method to support bitwise and. (0.14.1, <a href="https://github.com/o1-labs/o1js/pull/1193">#1193</a>)</li><li>Gadgets.multiRangeCheck() and Gadgets.compactMultiRangeCheck(), two building blocks for non-native arithmetic with BigInts of size up to 264 bits. (0.14.1, <a href="https://github.com/o1-labs/o1js/pull/1216">#1216</a>)</li></ul><h3>Changed</h3><ul><li>Change precondition APIs to use “require” instead of “assert” as the verb, to distinguish them from provable assertions. <a href="https://github.com/LuffySama-Dev">@LuffySama-Dev</a><br>- this.x.getAndAssertEquals() is now this.x.getAndRequireEquals() (0.15.0, <a href="https://github.com/o1-labs/o1js/pull/1263">#1263</a>) <a href="https://github.com/LuffySama-Dev">@LuffySama-Dev</a><br>- this.x.assertEquals(x) is now this.x.requireEquals(x). (0.15.0, <a href="https://github.com/o1-labs/o1js/pull/1263">#1263</a>) <a href="https://github.com/LuffySama-Dev">@LuffySama-Dev</a><br>- this.account.x.getAndAssertEquals(x) is now this.account.x.requireEquals(x). (0.15.0, <a href="https://github.com/o1-labs/o1js/pull/1265">#1265</a>) <a href="https://github.com/LuffySama-Dev">@LuffySama-Dev</a><br>- this.account.x.assertBetween() is now this.account.x.requireBetween(). (0.15.0, <a href="https://github.com/o1-labs/o1js/pull/1265">#1265</a>) <a href="https://github.com/LuffySama-Dev">@LuffySama-Dev</a><br>- this.network.x.getAndAssertEquals() is now this.network.x.getAndRequireEquals(). (0.15.0, <a href="https://github.com/o1-labs/o1js/pull/1265">#1265</a>) <a href="https://github.com/LuffySama-Dev">@LuffySama-Dev</a></li><li>Provable.constraintSystem() and {ZkProgram,SmartContract}.analyzeMethods() return a print() method for pretty-printing the constraint system. (0.15.0, <a href="https://github.com/o1-labs/o1js/pull/1240">#1240</a>)</li><li>Lightnet namespace API updates with added listAcquiredKeyPairs() method. (0.14.2, <a href="https://github.com/o1-labs/o1js/pull/1256">#1256</a>)</li><li>Expose raw provable methods of a ZkProgram on zkProgram.rawMethods. (0.14.2, <a href="https://github.com/o1-labs/o1js/pull/1241">#1241</a>)</li><li>Reduce number of constraints needed by rotate(), leftShift(), and rightShift() gadgets. (0.14.2, <a href="https://github.com/o1-labs/o1js/pull/1201">#1201</a>)</li></ul><h3>Fixed</h3><ul><li>Fix bug in Hash.hash() which always resulted in an error. (0.15.2, <a href="https://github.com/o1-labs/o1js/pull/1346">#1346</a>)</li><li>Fix stack overflows when calling provable methods with large inputs. (0.15.1, <a href="https://github.com/o1-labs/o1js/pull/1334">#1334</a>)</li><li>Fix Local.setProofsEnabled() which would not get picked up by deploy(). (0.15.1, <a href="https://github.com/o1-labs/o1js/pull/1330">#1330</a>)</li><li>Remove usage of private class fields in core types like Field, for better type compatibility between different o1js versions. (0.15.1, <a href="https://github.com/o1-labs/o1js/pull/1319">#1319</a>)</li><li>Fix missing recursive verification of proofs in smart contracts. (0.15.0, <a href="https://github.com/o1-labs/o1js/pull/1302">#1302</a>)</li><li>Add a parameter to checkZkappTransaction for block length to check for transaction inclusion. This fixes a case where Transaction.wait() only checked the latest block, which led to an error once the transaction was included in a block that was not the latest. (0.14.2, <a href="https://github.com/o1-labs/o1js/pull/1239">#1239</a>)</li><li>Removed array reversal of fetched actions, since they are returned in the correct order. (0.14.1, <a href="https://github.com/o1-labs/o1js/pull/1258">#1258</a>)</li></ul><h3>Breaking changes</h3><ul><li>Rename Gadgets.rotate() to Gadgets.rotate64() to better reflect the amount of bits the gadget operates on. (0.15.1, <a href="https://github.com/o1-labs/o1js/pull/1259">#1259</a>)</li><li>Rename Gadgets.{leftShift(), rightShift()} to Gadgets.{leftShift64(), rightShift64()} to better reflect the amount of bits the gadget operates on. (0.15.1, <a href="https://github.com/o1-labs/o1js/pull/1259">#1259</a>)</li><li>ZkProgram.compile() now returns the verification key and its hash, to be consistent with SmartContract.compile(). (0.15.0, <a href="https://github.com/o1-labs/o1js/pull/1292">#1292</a>) <a href="https://github.com/rpanic">@rpanic</a></li><li>Change return signature of ZkProgram.analyzeMethods() to be a keyed object. (0.14.2, <a href="https://github.com/o1-labs/o1js/pull/1223">#1223</a>)</li></ul><h3>zkApp CLI Updates</h3><h3>Added</h3><ul><li>Possibility to configure the lightnet Mina processes logging level. (0.16.0, <a href="https://github.com/o1-labs/zkapp-cli/pull/536">#536</a>)</li><li>Lightnet sub-commands implementation (explorer). (0.15.2, <a href="https://github.com/o1-labs/zkapp-cli/pull/521">#521</a>)</li><li>Lightnet sub-commands implementation (logs). (0.15.1, <a href="https://github.com/o1-labs/zkapp-cli/pull/520">#520</a>)</li></ul><h3>Changed</h3><ul><li>Updates the GitHub Pages UI scaffold deploy flow configuration in next.config.js to be compatible with the current version of NextJS. (0.16.0, <a href="https://github.com/o1-labs/zkapp-cli/pull/534">#534</a>)</li><li>Explorer links for deployment and interaction transactions. (0.14.1, <a href="https://github.com/o1-labs/zkapp-cli/pull/516">#516</a>)</li></ul><h3>Fixed</h3><ul><li>Fix to allow a deployment to GitHub Pages using the npm run deploy command in a NextJS UI project. (0.16.0, <a href="https://github.com/o1-labs/zkapp-cli/pull/534">#534</a>)</li></ul><h3>Shout outs</h3><p>A strong community helps us build and deliver better software faster. We are always grateful for community members who contribute, engage, explore, and share knowledge.</p><p>We appreciate quality contributions from highly motivated community members. Thanks for earning extra points for making updates to the CHANGELOG.</p><ul><li>Special thanks to <a href="https://github.com/LuffySama-Dev">@LuffySama-Dev</a> for making more than a few significant contributions to the o1js codebase and the docs.</li><li>Thanks to <a href="https://github.com/rpanic">@rpanic</a> for fixes.</li></ul><p>Small fixes are also appreciated. Thanks to <a href="https://github.com/Ursulafe">@Ursulafe</a> for fixing several typos in the codebase doc comments and <a href="https://github.com/Violet-Bora-Lee">Violet-Bora-Lee</a> for contributing to docs. It’s better together.</p><p>Shout out to <a href="https://twitter.com/dfst_io">DFST</a> for posting about faster compile times on <a href="https://twitter.com/dfst_io/status/1725460101933203585?t=6v52lQswMUTjotW0BeqF3w&amp;s=19">Twitter/X</a>:</p><blockquote>The latest update to the o1js library has revolutionized the way we compile recursive proofs ZkPrograms. Imagine this: a staggering FIFTEEN MILLION TIMES faster compilation in a serverless environment!</blockquote><p>And posting results on Mina Protocol Discord in the <a href="https://discord.com/channels/484437221055922177/1171938451193593856/1175019217477701754">#zkapps-questions</a> channel.</p><p>Are you building zkApps with o1js? Help us celebrate you. Tag <a href="https://twitter.com/o1_labs">@o1_labs</a> on Twitter/X when you share your work.</p><h3>To stay up to date</h3><p>Follow the official o1Labs <a href="https://twitter.com/o1_labs">@o1_labs</a> on Twitter/X.</p><h3>To participate</h3><p><a href="https://discord.gg/minaprotocol">Mina Protocol Discord</a> is the most popular place where Mina enthusiasts and technical contributors gather to share knowledge.</p><p>Join us in these zkApps channels:</p><ul><li><a href="https://discord.com/channels/484437221055922177/915745847692636181">#zkapps-developers</a> to meet other developers building zkApps with o1js</li><li><a href="https://discord.com/channels/484437221055922177/910549624413102100">#zkapps-general</a> to ask general questions about zkApps, how to use a zkApp, and so on</li><li><a href="https://discord.com/channels/484437221055922177/1047214314349658172">#zkapps-questions</a> to ask zkApps-related questions and see Q&amp;A history</li></ul><h3>To contribute</h3><p>To learn how you can help us improve the functionality and user experience, which in turn helps you build better projects, see:</p><ul><li>o1js <a href="https://github.com/o1-labs/o1js/blob/main/CONTRIBUTING.md">Contributing guidelines</a></li><li>zkApp CLI <a href="https://github.com/o1-labs/zkapp-cli/blob/main/CONTRIBUTING.md">Contributing guidelines</a></li><li>Docs <a href="https://github.com/o1-labs/docs2/blob/main/CONTRIBUTING.md">Contributing guidelines</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ea2a38b6bd6c" width="1" height="1" alt=""><hr><p><a href="https://blog.o1labs.org/whats-new-in-o1js-january-2024-ea2a38b6bd6c">What’s New in o1js: January 2024</a> was originally published in <a href="https://blog.o1labs.org/">o1Labs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What’s New in o1js: November 2023]]></title>
            <link>https://blog.o1labs.org/whats-new-in-o1js-november-2023-e890a9e3b974?source=rss-63a6433541e------2</link>
            <guid isPermaLink="false">https://medium.com/p/e890a9e3b974</guid>
            <category><![CDATA[zkapps]]></category>
            <category><![CDATA[smart-contracts]]></category>
            <category><![CDATA[snarkyjs]]></category>
            <category><![CDATA[zero-knowledge-proofs]]></category>
            <category><![CDATA[o1js]]></category>
            <dc:creator><![CDATA[Barrie Byron]]></dc:creator>
            <pubDate>Thu, 02 Nov 2023 19:10:45 GMT</pubDate>
            <atom:updated>2023-11-02T19:10:45.292Z</atom:updated>
            <content:encoded><![CDATA[<h4><strong>ZK Hack, ZkProgram, Custom Gates, and Lookup Tables</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ggt9VMDx6qPpFTmFzUyXlw.png" /></figure><h3>Features and optimizations</h3><p>We are excited to announce a significant update to o1js, bringing both new features and optimizations to enhance the performance and capabilities of our library. With these changes, it is easier and more efficient to build and work with zkApps on Mina Protocol.</p><h3>o1js highlights</h3><h4>Added</h4><p><strong>Custom Gates and Lookup Tables</strong></p><p>Internal support has been added for various custom gates (such as range check, bitwise operations, and foreign field operations) and lookup tables. (0.14.0, <a href="https://github.com/o1-labs/o1js/pull/1176">#1176</a>) These additions enhance the capability of the o1js prover to work with more complex proofs, improving both functionality and performance.</p><p><strong>New Gadgets</strong></p><p>Gadgets are amalgamations of the lowest level gates in the proof system (addition, multiplication) into more sophisticated boolean operations (XOR, NOT). This simplifies the process of creating new cryptographic primitives. In this case, the gadgets will form the basis of upcoming ECDSA signature verification. These gadgets will also allow the community to implement other crypto algorithms, such as SHA.</p><ul><li><strong>Gadgets.rangeCheck64()</strong>: A provable method for efficient 64-bit range checks using lookup tables. (0.14.0, <a href="https://github.com/o1-labs/o1js/pull/1181">#1181</a>)</li><li><strong>Gadgets.rotate()</strong>: A provable method to support bitwise rotation for native field elements. (0.14.0, <a href="https://github.com/o1-labs/o1js/pull/1182">#1182</a>)</li><li><strong>Gadgets.xor()</strong>: A provable method to support bitwise XOR operations for native field elements. (0.14.0, <a href="https://github.com/o1-labs/o1js/pull/1177">#1177</a>)</li></ul><p><strong>Dummy Proofs: </strong>The Proof.dummy() method has been introduced to create dummy proofs, aiding in the construction of ZkPrograms that cover both base and recursive cases within the same method (0.14.0, <a href="https://github.com/o1-labs/o1js/pull/1188">#1188</a>). This can significantly reduce proof time in recursive chains without impacting the efficiency of the base case.</p><p><strong>Lightnet Namespace: </strong>A new namespace has been added to interact with the account manager provided by the <a href="https://hub.docker.com/r/o1labs/mina-local-network">Lightnet Mina network</a>. (0.14.0, <a href="https://github.com/o1-labs/o1js/pull/1167">#1167</a>) This namespace is part of our initiative to streamline the deployment and testing of zkApps on Mina, making them more accessible and efficient for developers.</p><h4>Changed</h4><p><strong>ZkProgram Enhancements: </strong>The ZkProgram class has been moved out of the Experimental namespace and is now a top-level import. A new name input argument is required in the non-experimental API to help identify a ZkProgram when caching prover keys. See [ZkProgram Overview](<a href="https://docs.minaprotocol.com/zkapps/o1js/recursion#zkprogram-overview">https://docs.minaprotocol.com/zkapps/o1js/recursion#zkprogram-overview</a>). TheExperimental.ZkProgram has been deprecated. (0.14.0, <a href="https://github.com/o1-labs/o1js/pull/1200">#1200</a>)</p><h4>Breaking Changes</h4><p><strong>Verification Key Changes</strong>: Due to optimizations in Field methods and core cryptographic changes, you must redeploy your smart contracts to regenerate all verification keys to ensure compatibility with the latest version of o1js. (0.14.0, <a href="https://github.com/o1-labs/o1js/pull/1171">#1171</a>, <a href="https://github.com/o1-labs/o1js/pull/1178">#1178</a>)</p><h3>zkApp CLI Updates</h3><h4>Changed</h4><p><strong>zkApp CLI release 0.14.0</strong> corresponds with o1js <a href="https://github.com/o1-labs/o1js/pull/1209">release 0.14.0</a>. The o1js release includes constraint optimizations in Field methods and core crypto changes that break all verification keys. You must redeploy all contracts. Use the zk deploy command to compute a verification key for your zkApp (takes ~1-2 minutes). See <a href="https://docs.minaprotocol.com/zkapps/how-to-deploy-a-zkapp">How to Deploy a zkApp</a>. (0.14.0, <a href="https://github.com/o1-labs/zkapp-cli/pull/514">#514</a>)</p><ul><li>o1js minor version dependency updated in package.json to 0.14.*.</li><li>o1js minor version peer dependency updated in template/example contract package.json to 0.14.*.</li></ul><p><strong>DX improvements</strong>: Husky and the pre-commit hooks have been removed from the project templates to remove friction and create a better DX when building zkApps. (0.13.1, <a href="https://github.com/o1-labs/zkapp-cli/pull/505">#505</a>) and (0.13.2, <a href="https://github.com/o1-labs/zkapp-cli/pull/507">#507</a>)</p><h3>Shout out</h3><p>Community member <a href="https://twitter.com/furkanakalcom">Furkan</a> wrote <a href="https://furkanakal.com/2023/10/24/mina-protocol/">Exploring Mina Protocol: Building zkApps w/ ‘o1js’</a> to make developer onboarding easier for zkApp newbies. Thank you, Furkan.</p><p>Are you building zkApps with o1js? Help us celebrate you. Tag <a href="https://twitter.com/o1_labs">@o1_labs</a> on Twitter/X when you share your work.</p><h3>ZK Hack Istanbul</h3><p>O(1) Labs is all about fueling innovation in the zk space. As a <a href="https://www.zkistanbul.com/">ZK Hack Istanbul</a> partner sponsor, we are offering $10K in bounties across various tracks: <strong>ZK Gaming</strong>, <strong>ZK Voting</strong>, <strong>Crypto Primitive</strong>, <strong>ZK Data Structure</strong>, and <strong>Build your own idea</strong>. Be sure to register for this hackathon for the opportunity to build with o1js and potentially win <a href="https://zk-hack-istanbul.devfolio.co/prizes?partner=O%281%29Labs">bounties</a>.</p><h3>To stay up to date</h3><p>Follow the official O(1) Labs <a href="https://twitter.com/o1_labs">Twitter/X</a>.</p><h3>To participate</h3><p><a href="https://discord.gg/minaprotocol">Mina Protocol Discord</a> is the most popular place where Mina enthusiasts and technical contributors gather.</p><p>Join us in these zkApps channels:</p><ul><li><a href="https://discord.com/channels/484437221055922177/915745847692636181">#zkapps-developers</a> to meet other developers building zkApps with o1js</li><li><a href="https://discord.com/channels/484437221055922177/910549624413102100">#zkapps-general</a> to ask general questions about zkApps, how to use a zkApp, and so on</li><li><a href="https://discord.com/channels/484437221055922177/1047214314349658172">#zkapps-questions</a> to ask zkApps-related questions and see Q&amp;A history</li></ul><h3>To contribute</h3><p>To learn how you can help us improve the functionality and user experience, which in turn helps you build better projects, see:</p><ul><li>o1js <a href="https://github.com/o1-labs/o1js/blob/main/CONTRIBUTING.md">Contributing guidelines</a></li><li>zkApp CLI <a href="https://github.com/o1-labs/zkapp-cli/blob/main/CONTRIBUTING.md">Contributing guidelines</a></li><li>Docs <a href="https://github.com/o1-labs/docs2/blob/main/CONTRIBUTING.md">Contributing guidelines</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e890a9e3b974" width="1" height="1" alt=""><hr><p><a href="https://blog.o1labs.org/whats-new-in-o1js-november-2023-e890a9e3b974">What’s New in o1js: November 2023</a> was originally published in <a href="https://blog.o1labs.org/">o1Labs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What’s New in o1js: October 2023]]></title>
            <link>https://blog.o1labs.org/whats-new-in-o1js-october-2023-38854bbf95b2?source=rss-63a6433541e------2</link>
            <guid isPermaLink="false">https://medium.com/p/38854bbf95b2</guid>
            <category><![CDATA[smart-contracts]]></category>
            <category><![CDATA[o1js]]></category>
            <category><![CDATA[zkapps]]></category>
            <category><![CDATA[snarkyjs]]></category>
            <category><![CDATA[zero-knowledge-proofs]]></category>
            <dc:creator><![CDATA[Barrie Byron]]></dc:creator>
            <pubDate>Wed, 04 Oct 2023 22:00:33 GMT</pubDate>
            <atom:updated>2023-10-04T22:00:33.681Z</atom:updated>
            <content:encoded><![CDATA[<h4>o1js prover performance boost</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NhgAkWuiJRjoCHXcH4QLZQ.png" /></figure><p>In this month’s update, we’re thrilled to introduce a significant performance boost to the o1js prover, with improvements of about 25%. This leap in efficiency is partially attributed to our shift in the internal representation of field elements, transitioning from Uint8Array to JavaScript’s bigint. Together with a few smaller optimizations, this change has accelerated witness generation by more than 5x!</p><p>Additionally, we’ve made some adjustments to the verification keys due to modifications in how Struct orders object properties. If you need to recover existing verification keys and behavior, simply adjust the order of properties in your Struct definitions alphabetically.</p><h3>o1js Updates</h3><h4>Changed</h4><ul><li>Change internal representation of field elements to be JS bigint instead of Uint8Array, plus other low-hanging performance improvements to witness generation. (0.13.1, <a href="https://github.com/o1-labs/o1js/pull/1092">#1092</a>)</li><li>Change the way Struct orders object properties, impacting some verification keys. (0.13.1, <a href="https://github.com/o1-labs/o1js/pull/1124">#1124 @Comdex</a>)</li></ul><h3>Mina zkApp CLI Updates</h3><h4>Changed</h4><ul><li>zkApp CLI Release 0.13.0 corresponds with o1js release 0.13.0. The o1js release includes changes to verification keys caused by updates to the proof system, which breaks all deployed contracts. (<a href="https://github.com/o1-labs/zkapp-cli/pull/492">0.13.0, #492</a>)<br>- o1js minor version dependency updated in cli package.json to 0.13.*.<br>- o1js minor version peer dependency updated in template/example contract package.json to 0.13.*.</li><li>Both local and global installed versions are checked to determine if an update of the zkApp CLI is necessary. (<a href="https://github.com/o1-labs/zkapp-cli/pull/448">0.12.1, #448</a>)</li><li>zkApp CLI and all dependencies migrated from CommonJS to ESM. (<a href="https://github.com/o1-labs/zkapp-cli/pull/447">0.12.0, #447</a>)</li></ul><h4>Added</h4><ul><li>E2E tests for critical user flows against mocked and real networks. (<a href="https://github.com/o1-labs/zkapp-cli/pull/447">0.12.0, #447</a>)</li></ul><h4>Fixed</h4><ul><li>Fix to allow the zkApp-cli to be used from a projects local node_modules. (<a href="https://github.com/o1-labs/zkapp-cli/pull/448">0.12.1, #448</a>)</li></ul><h3>Shout out</h3><p>Community members make our ecosystem stronger. Tutorials make our learning last longer.</p><p>Shout out to community developer Saurabh who created a tutorial for zkApps using o1js. They explain it in their own way and create space for future contributions. Check out <a href="https://saurabhpatil.hashnode.dev/zkapp-tutorial-guess-game-using-o1js-from-o1labs-and-deploying-it-locally">zkApp Tutorial: Guess Game using o1js from o1Labs and deploying it locally</a>.</p><h3>To stay up to date</h3><p>Follow the official O(1) Labs <a href="https://twitter.com/o1_labs">Twitter/X</a>.</p><h3>To participate</h3><p><a href="https://discord.gg/minaprotocol">Mina Protocol Discord</a> is the most popular place where Mina enthusiasts and technical contributors gather.</p><p>Join us in these zkApps channels:</p><ul><li><a href="https://discord.com/channels/484437221055922177/915745847692636181">#zkapps-developers</a> to meet other developers building zkApps with o1js</li><li><a href="https://discord.com/channels/484437221055922177/910549624413102100">#zkapps-general</a> to ask general questions about zkApps, how to use a zkApp, and so on</li><li><a href="https://discord.com/channels/484437221055922177/1047214314349658172">#zkapps-questions</a> to ask zkApps-related questions and see Q&amp;A history</li></ul><h3>To contribute</h3><p>To learn how you can help us improve the functionality and user experience, which in turn helps you build better projects, see:</p><ul><li>o1js <a href="https://github.com/o1-labs/o1js/blob/main/CONTRIBUTING.md">Contributing guidelines</a></li><li>zkApp CLI <a href="https://github.com/o1-labs/zkapp-cli/blob/main/CONTRIBUTING.md">Contributing guidelines</a></li><li>Docs <a href="https://github.com/o1-labs/docs2/blob/main/CONTRIBUTING.md">Contributing guidelines</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=38854bbf95b2" width="1" height="1" alt=""><hr><p><a href="https://blog.o1labs.org/whats-new-in-o1js-october-2023-38854bbf95b2">What’s New in o1js: October 2023</a> was originally published in <a href="https://blog.o1labs.org/">o1Labs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SnarkyJS is now o1js]]></title>
            <link>https://blog.o1labs.org/snarkyjs-is-now-o1js-e220e56fe570?source=rss-63a6433541e------2</link>
            <guid isPermaLink="false">https://medium.com/p/e220e56fe570</guid>
            <category><![CDATA[snarkyjs]]></category>
            <category><![CDATA[smart-contracts]]></category>
            <category><![CDATA[o1js]]></category>
            <category><![CDATA[zero-knowledge-proofs]]></category>
            <category><![CDATA[zkapps]]></category>
            <dc:creator><![CDATA[Barrie Byron]]></dc:creator>
            <pubDate>Fri, 08 Sep 2023 14:46:29 GMT</pubDate>
            <atom:updated>2023-09-08T14:46:29.721Z</atom:updated>
            <content:encoded><![CDATA[<h4>Improved performance, reduced loading time</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/0*VqdJrZRfOOGNabCd.png" /></figure><p>Our eagle-eyed readers may have already noticed, but we’ve got an exciting change to announce… We’re thrilled to share that starting today, SnarkyJS is called <strong>o1js</strong>.</p><p>This name change reflects the evolution of our vision for the premiere toolkit used by developers to build zero knowledge-enabled applications while paying homage to our technology’s recursive proof generation capabilities.</p><p>Your favorite functionality stays the same. Transitioning to the newly published <a href="https://www.npmjs.com/package/o1js">o1js npm</a> package is a quick and easy process:</p><ul><li>Remove the deprecated SnarkyJs package and install o1js:<br>npm remove snarkyjs &amp;&amp; npm install o1js</li><li>Update to the latest version of the Mina zkApp CLI:<br>npm update -g zkapp-cli</li><li>For existing zkApps, make sure to update imports from snarkyjs to o1js</li><li>Also, for existing projects, you’ll have to replace snarkyjs with o1js in your Jest config files: <a href="https://github.com/o1-labs/zkapp-cli/commit/75c14c9755eb2948ead21e22c31d62e510b39123#diff-1ea0f1c3e3e4b7f70815acbe2765b9abb201134d55718343eee97a1eb8b49719R4-R6">jest-resolver.cjs</a> and <a href="https://github.com/o1-labs/zkapp-cli/commit/75c14c9755eb2948ead21e22c31d62e510b39123#diff-664a6c239796205f6d42d146fe6ef364fb914c6f2bee4ef755ef3c2f77b44f44R17-R18">jest.config.js</a></li><li>No need to redeploy, you should be good to go!</li></ul><p>If you have any questions, please head over to <a href="https://discord.com/channels/484437221055922177/910549624413102100">#zkapps-general</a> in the Mina Protocol Discord.</p><p>Now, back to our regularly scheduled programming — let’s dive into this month’s updates!</p><h3>o1js</h3><p>One of the major points of focus this quarter is <strong>improving the performance</strong> of o1js. As you all know, zk is a complex technology and comes with a large overhead compared to normal programming. By putting extra care into performance, we still hope to achieve a snappy experience for o1js developers and users.</p><p>This month, we are shipping the first major improvement: <strong>Loading time of o1js </strong><a href="https://github.com/o1-labs/o1js/pull/1073"><strong>drops from about 2 to 0.5 seconds</strong></a> on the web and from ~1.7 to 0.5 seconds in Node.js.</p><p>Loading time here refers to the time spent importing o1js, which blocks the main thread. On the web, this metric is especially important because it corresponds to the time in which a website’s JavaScript can’t execute, which might delay rendering of the entire page.</p><p>In the past, slow loading time led developers to complex workarounds like importing o1js lazily or in a web worker. With this release, we made a significant leap on the path to making these workarounds unnecessary. Expect more to come!</p><h4>Changed</h4><ul><li>Rename SnarkyJS to o1js (0.12.2, <a href="https://github.com/o1-labs/o1js/pull/1104">#1104</a>)</li><li>Reduce loading time of the library by 3–4x (0.12.2, <a href="https://github.com/o1-labs/o1js/pull/1073">#1073</a>)</li><li>Improve error when forgetting transaction.prove() (0.12.2, <a href="https://github.com/o1-labs/o1js/pull/1095">#1095</a>)</li></ul><h3>Archive Node API</h3><p>We’re excited to announce new improvements to the Archive Node API that aim to bolster reliability and clarity.</p><h4>Enhanced Filtering and Selection for Best Tip</h4><p>Tiebreaking Mechanism:</p><ul><li>We’ve refined the way the API handles multiple blocks at the tip of the network (the most recent block height). This ensures users get accurate and timely data from the latest block, which is vital for events and actions that rely on the freshest block information.</li><li>When confronted with blocks that share the highest tip, we’ve incorporated a robust tiebreaker mechanism that mimics the Mina Protocol short fork consensus rules to determine the best block to proceed with. For a detailed explanation, see <a href="https://github.com/MinaProtocol/mina/blob/36d39cd0b2e3ba6c5e687770a5c683984ca587fc/docs/specs/consensus/README.md">Consensus Tie Breaker Rules</a>. (<a href="https://github.com/o1-labs/Archive-Node-API/pull/80">#80</a>)</li></ul><h3>Mina zkApp CLI Updates</h3><p>Building UIs for your zkApp project just got easier.</p><h4>Added</h4><p>A post-build script was added to prepend a project repo name to built CSS asset URLs so a Next.js UI project can be correctly deployed to GitHub Pages. (0.11.1, <a href="https://github.com/o1-labs/zkapp-cli/pull/468">#468</a>)</p><h4>Fixed</h4><p>A fix to deploy a Next.js UI project to GitHub Pages without manual configuration by running npm run deploy. (0.11.1, <a href="https://github.com/o1-labs/zkapp-cli/pull/468">#468</a>)</p><h3>To stay up to date</h3><p>Follow the official O(1) Labs <a href="https://twitter.com/o1_labs">Twitter/X</a>.</p><h3>To participate</h3><p><a href="https://discord.gg/minaprotocol">Mina Protocol Discord</a> is the most popular place where Mina enthusiasts and technical contributors gather.</p><p>Join us in these zkApps channels:</p><ul><li><a href="https://discord.com/channels/484437221055922177/915745847692636181">#zkapps-developers</a> to meet other developers building zkApps with o1js</li><li><a href="https://discord.com/channels/484437221055922177/910549624413102100">#zkapps-general</a> to ask general questions about zkApps, how to use a zkApp, and so on</li><li><a href="https://discord.com/channels/484437221055922177/1047214314349658172">#zkapps-questions</a> to ask zkApps-related questions and see Q&amp;A history</li></ul><h3>To contribute</h3><p>To learn how you can help us improve the functionality and user experience, which in turn helps you build better projects, see:</p><ul><li>o1js <a href="https://github.com/o1-labs/o1js/blob/main/CONTRIBUTING.md">Contributing guidelines</a></li><li>zkApp CLI <a href="https://github.com/o1-labs/zkapp-cli/blob/main/CONTRIBUTING.md">Contributing guidelines</a></li><li>Docs <a href="https://github.com/o1-labs/docs2/blob/main/CONTRIBUTING.md">Contributing guidelines</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e220e56fe570" width="1" height="1" alt=""><hr><p><a href="https://blog.o1labs.org/snarkyjs-is-now-o1js-e220e56fe570">SnarkyJS is now o1js</a> was originally published in <a href="https://blog.o1labs.org/">o1Labs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What’s New in SnarkyJS: August 2023]]></title>
            <link>https://blog.o1labs.org/whats-new-in-snarkyjs-august-2023-94a185dffea3?source=rss-63a6433541e------2</link>
            <guid isPermaLink="false">https://medium.com/p/94a185dffea3</guid>
            <category><![CDATA[zkp]]></category>
            <category><![CDATA[zero-knowledge-proofs]]></category>
            <category><![CDATA[smart-contracts]]></category>
            <category><![CDATA[snarkyjs]]></category>
            <category><![CDATA[zkapps]]></category>
            <dc:creator><![CDATA[Barrie Byron]]></dc:creator>
            <pubDate>Thu, 03 Aug 2023 18:03:34 GMT</pubDate>
            <atom:updated>2023-08-03T18:03:34.029Z</atom:updated>
            <content:encoded><![CDATA[<h4>Focus on performance and usability</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gk26WmtNayjQZeeVXtdloA.png" /></figure><p>In August, we introduced several new features and fixes to enhance SnarkyJS’s performance and usability. One notable addition was the createTestNullifier() method to the Nullifier class. This method facilitates the creation of a Nullifier for testing purposes outside of provable code, enhancing security measures within the testing environment. However, while this function boosts the testing process, it’s not advised for use in production. In a production setting, use <a href="https://www.npmjs.com/package/mina-signer">mina-signer</a> to generate Nullifiers, ensuring the user’s private key remains securely within its enclave.</p><p>Additionally, we addressed some critical issues and introduced enhancements like adding field.isEven() to check if a Field element is odd or even and rectifying a NodeJS error caused by an invalid import.</p><p>Overall, these updates mark an essential step in improving SnarkyJS, with an emphasis on user experience. We remain committed to refining our toolkit for zkApp developers and look forward to more enhancements in the future.</p><h3>Added</h3><ul><li>Added the createTestNullifier() method to the Nullifier class for testing purposes. It is recommended to use mina-signer to create Nullifiers in production since it does not leak the private key of the user. The Nullifier.createTestNullifier method requires the private key as an input outside of the user’s wallet. (0.12.1, <a href="https://github.com/o1-labs/snarkyjs/pull/1026">#1026</a>)</li><li>Added field.isEven to check if a Field element is odd or even. (0.12.1, <a href="https://github.com/o1-labs/snarkyjs/pull/1026">#1026</a>)</li></ul><h3>Fixed</h3><ul><li>Revert verification key hash change from previous release to stay compatible with the current testnet. (0.12.1, <a href="https://github.com/o1-labs/snarkyjs/pull/1032">#1032</a>)</li><li>NodeJS error caused by invalid import (0.11.4, <a href="https://github.com/o1-labs/snarkyjs/pull/1012">#1012</a>)</li></ul><h3>Breaking Changes</h3><ul><li>Fix the default verification key hash that was generated for AccountUpdates. This change adopts the default mechanism provided by Mina Protocol (0.12.0, <a href="https://github.com/o1-labs/snarkyjs/pull/1021">#1021</a>)<br>This alteration results in a breaking change affecting the verification key of already deployed contracts.</li></ul><h3>Mina zkApp CLI Updates</h3><p>The best way to get started with SnarkyJS is to use the Mina zkApp CLI to <a href="https://docs.minaprotocol.com/zkapps/how-to-write-a-zkapp">write a zkApp</a>.</p><p>Version 0.11.0 of the zkApp CLI has been released! This version includes updates to the CLI prompts for better clarity so that you can build faster, an update for Nuxt UI project generation that fixes an error previously blocking project creation, and an update to SnarkyJS version 0.12.*.</p><p>To update to the latest version of the Mina zkApp CLI:</p><p>$ npm update -g zkapp-cli</p><p>For upgrade guidance, see the <a href="https://github.com/o1-labs/zkapp-cli/blob/main/README.md#update-the-mina-zkapp-cli">README</a></p><h3>Changed</h3><ul><li>SnarkyJS minor version dependency updated in cli package.json to 0.12. (0.11.0, <a href="https://github.com/o1-labs/zkapp-cli/pull/459">#459</a>)</li><li>SnarkyJS minor version peer dependency updated in template/example contract package.json to 0.12.*. (0.11.0, <a href="https://github.com/o1-labs/zkapp-cli/pull/459">#459</a>)</li><li>Improve cli prompt language and instructions to upgrade version (0.10.1, <a href="https://github.com/o1-labs/zkapp-cli/pull/437">#437</a>, <a href="https://github.com/o1-labs/zkapp-cli/pull/438">#438</a>)</li></ul><h3>Fixed</h3><ul><li>Fix for zkApp project generation with Nuxt UI framework issue (0.10.2, <a href="https://github.com/o1-labs/zkapp-cli/pull/449">#449</a>)</li></ul><h3>To watch</h3><p>Subscribe to the official O(1) Labs YouTube channel <a href="http://youtube.com/@o1labsofficial">youtube.com/@o1labsofficial</a>.</p><h3>To contribute</h3><p>To learn how you can help us improve the functionality and user experience, which in turn helps you build better projects, see:</p><ul><li>SnarkyJS <a href="https://github.com/o1-labs/snarkyjs/blob/main/CONTRIBUTING.md">Contributing guidelines</a></li><li>zkApp CLI <a href="https://github.com/o1-labs/zkapp-cli/blob/main/CONTRIBUTING.md">Contributing guidelines</a></li><li>Docs <a href="https://github.com/o1-labs/docs2/blob/main/CONTRIBUTING.md">Contributing guidelines</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=94a185dffea3" width="1" height="1" alt=""><hr><p><a href="https://blog.o1labs.org/whats-new-in-snarkyjs-august-2023-94a185dffea3">What’s New in SnarkyJS: August 2023</a> was originally published in <a href="https://blog.o1labs.org/">o1Labs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What’s New in SnarkyJS: July 2023]]></title>
            <link>https://blog.o1labs.org/whats-new-in-snarkyjs-july-2023-2ba001b0d409?source=rss-63a6433541e------2</link>
            <guid isPermaLink="false">https://medium.com/p/2ba001b0d409</guid>
            <category><![CDATA[zero-knowledge-proofs]]></category>
            <category><![CDATA[zkp]]></category>
            <category><![CDATA[snarkyjs]]></category>
            <category><![CDATA[smart-contracts]]></category>
            <category><![CDATA[zkapps]]></category>
            <dc:creator><![CDATA[Barrie Byron]]></dc:creator>
            <pubDate>Mon, 03 Jul 2023 16:25:08 GMT</pubDate>
            <atom:updated>2023-07-03T16:25:41.171Z</atom:updated>
            <content:encoded><![CDATA[<h4>Nullifier primitives in SnarkyJS, fee payer accounts in zkApp CLI</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cUwowGDD9JXaoy3vxa2Hvg.png" /></figure><p>This month&#39;s SnarkyJS release finishes all outstanding refactor work. This includes a refactor of Scalar and Bool as well as the Group class, adding more checks to it, fixing bugs found in the previous implementation, and handling the “point at infinity” correctly. It is important to mention that due to the refactoring of the Group class, constraints for already deployed smart contracts that used the old Group implementation have changed.</p><p>The famous Can&#39;t evaluate prover code outside an as_prover block error message has been improved and now provides more information, describing the encountered error in more detail. This helps you, the developer, gain a better understanding of the errors you encounter.</p><p>Nullifiers are an important primitive in the world of blockchains.</p><ul><li>Nullifiers unlock a wide range of privacy use cases, enabling developers to build the next-generation privacy zkApp. And now, nullifiers are available in SnarkyJS as a first-class primitive! Based on the paper <a href="https://eprint.iacr.org/2022/1255">PLUME: An ECDSA Nullifier Scheme for Unique Pseudonymity within Zero Knowledge Proofs</a> by Aayush Gupta and Kobi Gurkan, we have implemented the proposed non-interactive nullifier scheme in SnarkyJS. Additionally, <a href="https://github.com/o1-labs/snarkyjs/tree/main/src/mina-signer">mina-signer</a> has also been equipped with a nullifier primitive that allows users to generate a nullifier direct inside their browser wallet. As opposed to popular other nullifier schemes, the private key does not become an input into provable code. This means that your private key never leaves your wallet. Stay tuned for a more in-depth blog post on this!</li></ul><p>To give you a small preview of what’s coming in the next months: New bitwise operations XOR, ROT, AND, and NOT have been implemented but are not yet released. This work also unlocks the road to SHA3 and ECDSA in SnarkyJS. Stay tuned for more details!</p><h3>Breaking changes</h3><ul><li>Group operations now generate a different set of constraints. This breaks deployed contracts because the circuit changed. (0.11.1, <a href="https://github.com/o1-labs/snarkyjs/pull/967">#967</a>)</li></ul><h3>Added</h3><ul><li>Implemented Nullifier as a new primitive (0.11.1, <a href="https://github.com/o1-labs/snarkyjs/pull/882">#967</a>)<br>- mina-signer can now be used to generate a Nullifier that can be consumed by zkApps using the newly added Nullifier Struct</li></ul><h3>Changed</h3><ul><li>Improve error message Can&#39;t evaluate prover code outside an as_prover block (0.11.1, <a href="https://github.com/o1-labs/snarkyjs/pull/998">#967</a>)</li></ul><h3>Fixed</h3><ul><li>Fix unsupported use of window when running SnarkyJS in workers (0.11.1, <a href="https://github.com/o1-labs/snarkyjs/pull/1002">#967</a>)</li><li>Fix commonJS version of SnarkyJS (0.11.3, <a href="https://github.com/o1-labs/snarkyjs/pull/1006">#1006</a>)</li></ul><h3>Mina zkApp CLI Updates</h3><p>The best way to get started with SnarkyJS is to use the Mina zkApp CLI to <a href="https://docs.minaprotocol.com/zkapps/how-to-write-a-zkapp">write a zkApp</a>.</p><p>Developing with zkApps just got easier! Save time with an option to use a developer account that is funded and can always pay fees immediately. You now have the option to create or select an existing key pair to use as a fee payer account for updates and deployments. Public and private keys are stored on your local computer and can be used across multiple projects. Learn about fee payer accounts in <a href="https://docs.minaprotocol.com/zkapps/tutorials/deploying-to-a-network">Tutorial 3: Deploying to a Live Network</a>.</p><h3>Added</h3><ul><li>Third-party fee payer accounts for deployment transactions can be used across multiple projects (0.10.0, <a href="https://github.com/o1-labs/zkapp-cli/pull/424">#424</a>)<br>- A new zk config option creates or selects a third-party fee payer account.</li></ul><h3>Fixed</h3><ul><li>A fee payer tries to pay the fee using signature authorization (proofs are not supported). If the zkApp account is used as a fee payer account after deployment, the transaction was rejected because the permissions of the account would be violated, breaking all re-deployments and the interact.ts script in the template project. (0.10.0, <a href="https://github.com/o1-labs/zkapp-cli/pull/424">#424</a>)</li></ul><h3>To watch</h3><p>Subscribe to the official O(1) Labs YouTube channel <a href="http://youtube.com/@o1labsofficial">youtube.com/@o1labsofficial</a>.</p><h3>To celebrate</h3><p>We appreciate our community members who contribute fixes, like <a href="https://github.com/blorgon1">@blorgon1</a> who searched and found an answer and then updated package.json to help others find <a href="https://github.com/o1-labs/snarkyjs/pull/1000/">mina.signer</a>.</p><p>Another shoutout goes to <a href="https://github.com/yunus433">@yunus433</a> for continuing his work on <a href="https://github.com/o1-labs/snarkyjs/pull/929">improving doc comments</a>, this time on the Provable and ProvablePure.</p><h3>To contribute</h3><p>To learn how you can help us improve the functionality and user experience, which in turn helps you build better projects, see:</p><ul><li>SnarkyJS <a href="https://github.com/o1-labs/snarkyjs/blob/main/CONTRIBUTING.md">Contributing guidelines</a></li><li>zkApp CLI <a href="https://github.com/o1-labs/zkapp-cli/blob/main/CONTRIBUTING.md">Contributing guidelines</a></li><li>Docs <a href="https://github.com/o1-labs/docs2/blob/main/CONTRIBUTING.md">Contributing guidelines</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2ba001b0d409" width="1" height="1" alt=""><hr><p><a href="https://blog.o1labs.org/whats-new-in-snarkyjs-july-2023-2ba001b0d409">What’s New in SnarkyJS: July 2023</a> was originally published in <a href="https://blog.o1labs.org/">o1Labs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What’s New in SnarkyJS: June 2023]]></title>
            <link>https://blog.o1labs.org/whats-new-in-snarkyjs-june-2023-8a75e46cd849?source=rss-63a6433541e------2</link>
            <guid isPermaLink="false">https://medium.com/p/8a75e46cd849</guid>
            <category><![CDATA[zero-knowledge-proofs]]></category>
            <category><![CDATA[zkapps]]></category>
            <category><![CDATA[snarkyjs]]></category>
            <category><![CDATA[smart-contracts]]></category>
            <category><![CDATA[zkp]]></category>
            <dc:creator><![CDATA[Barrie Byron]]></dc:creator>
            <pubDate>Tue, 06 Jun 2023 18:45:44 GMT</pubDate>
            <atom:updated>2023-06-29T18:05:26.452Z</atom:updated>
            <content:encoded><![CDATA[<h4>Refactor the SnarkyJS code base, improved error messages, and a new interface for ZkPrograms</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MyxQzAloMWQT5nr1a7bpPw.png" /></figure><p>This month in SnarkyJS lands in the midst of a deep refactor of the SnarkyJS code base: core modules such as <a href="https://github.com/o1-labs/snarkyjs/pull/902">Field</a> and <a href="https://github.com/o1-labs/snarkyjs/pull/889">Circuit</a> were rewritten in TypeScript (replacing the previous OCaml implementations). Future releases will include a refactor of other modules like <a href="https://github.com/o1-labs/snarkyjs/pull/936">Bool</a> and <a href="https://github.com/o1-labs/snarkyjs/pull/932">Group</a>.</p><p>For SnarkyJS users, refactors are expected to go by smoothly and largely unnoticed, with the occasional happy surprise such as <a href="https://github.com/o1-labs/snarkyjs/issues/858">bug</a> <a href="https://github.com/o1-labs/snarkyjs/issues/432">fixes</a> and <a href="https://github.com/o1-labs/snarkyjs/issues/743">small improvements</a>. The end result will be a code base that is more maintainable for core developers and more accessible to outside contributors.</p><p>Two other improvements have direct impact:</p><ul><li><strong>Error messages</strong> now have <a href="https://github.com/o1-labs/snarkyjs/pull/890">their stack traces prettified</a> before throwing them. SnarkyJS has been notorious for its unwieldy stack traces, reflecting the deep multi-language stack it is built on. The <a href="https://o1labs.org/">O(1) Labs</a> team is dedicated to improving the developer experience and continues this effort by cleaning up stack traces from noisy details that don’t contribute to finding the problem. Expect more error message improvements soon!</li><li><strong>ZkPrograms</strong> have been enhanced with a new interface where you can now <a href="https://github.com/o1-labs/snarkyjs/pull/874">return a <em>public output</em></a> instead of accepting a public input as parameter of each method. The underlying effect is the same, but the new API is more natural in many cases and saves you from duplicating logic in- and outside provable code. Public outputs fit the mental model of proving a computation with some result exposed to the verifier.</li></ul><p>A side note on language: The terminology of “circuits” is replaced with “provable code” for logic that eventually gets converted to a zero-knowledge proof. This month’s release reflects the language shift by deprecating the Circuit module, with methods like Circuit.if(), and replacing it with a <a href="https://github.com/o1-labs/snarkyjs/pull/889">new namespace called </a><a href="https://github.com/o1-labs/snarkyjs/pull/889">Provable</a>. “Circuits” are an implementation detail for code that could equally well be run in other backend contexts like zkVMs or others that haven’t been invented yet. Moreover, the mapping that “circuit logic” means “provable logic” is unnecessary learning overhead for application developers.</p><h3>Breaking changes</h3><ul><li>Rewrite of Provable.if() causes breaking changes to all deployed contracts (0.11.0, <a href="https://github.com/o1-labs/snarkyjs/pull/889">#889</a>)</li><li>Remove all deprecated methods and properties on Field (0.11.0, <a href="https://github.com/o1-labs/snarkyjs/pull/902">#902</a>)<br>- The Field(x) constructor and other Field methods no longer accept a boolean as input. Instead, you can now pass in a bigint to all Field methods. (0.11.0, <a href="https://github.com/o1-labs/snarkyjs/pull/902">#902</a>)</li></ul><h3>Added</h3><ul><li>Add field.assertNotEquals() to assert that a field element does not equal some value (0.11.0, <a href="https://github.com/o1-labs/snarkyjs/pull/902">#902</a>)<br>- More efficient than field.equals(x).assertFalse()</li></ul><h3>Changed</h3><ul><li><strong>Make stack traces more readable</strong> (0.11.0, <a href="https://github.com/o1-labs/snarkyjs/pull/890">#890</a>)<br>- Stack traces thrown from SnarkyJS are cleaned up by filtering out unnecessary lines and other noisy details</li><li>Remove optional zkappKey argument in smartContract.init(), and instead assert that provedState is false when init() is called (0.11.0, <a href="https://github.com/o1-labs/snarkyjs/pull/908">#908</a>)</li><li>Improve assertion error messages on Field methods (0.11.0, <a href="https://github.com/o1-labs/snarkyjs/issues/743">#743</a>, <a href="https://github.com/o1-labs/snarkyjs/pull/902">#902</a>)</li><li>Publicly expose the internal details of the Field type (0.11.0, <a href="https://github.com/o1-labs/snarkyjs/pull/902">#902</a>)</li><li><strong>Allow ZkPrograms to return their public output</strong> (0.10.1, <a href="https://github.com/o1-labs/snarkyjs/pull/874">#874</a>, <a href="https://github.com/o1-labs/snarkyjs/pull/876">#876</a>)<br>- new option ZkProgram({ publicOutput?: Provable&lt;any&gt;, ... }); publicOutput has to match the <em>return type</em> of all ZkProgram methods.<br>- the publicInput option becomes optional; if not provided, methods no longer expect the public input as the first argument<br>- full usage example: <a href="https://github.com/o1-labs/snarkyjs/blob/f95cf2903e97292df9e703b74ee1fc3825df826d/src/examples/program.ts">https://github.com/o1-labs/snarkyjs/blob/f95cf2903e97292df9e703b74ee1fc3825df826d/src/examples/program.ts</a></li></ul><h3>Deprecated</h3><ul><li>Utility methods on Circuit are deprecated in favor of the same methods on Provable (0.11.0, <a href="https://github.com/o1-labs/snarkyjs/pull/889">#889</a>)<br>- Circuit.if(), Circuit.witness(), Circuit.log(), and others are replaced by Provable.if(), Provable.witness(), Provable.log()<br>- Under the hood, some of these methods were rewritten in TypeScript</li><li>Deprecate field.isZero() (0.11.0, <a href="https://github.com/o1-labs/snarkyjs/pull/902">#902</a>)</li></ul><h3>Fixed</h3><ul><li>Fix running SnarkyJS in Node.js on Windows (0.11.0, <a href="https://github.com/o1-labs/snarkyjs-bindings/pull/19">#19</a>) <a href="https://github.com/wizicer">@wizicer</a></li><li>Fix error reporting from GraphQL requests (0.11.0, <a href="https://github.com/o1-labs/snarkyjs/pull/919">#919</a>)</li><li>Resolved an Out of Memory error experienced on iOS devices (iPhones and iPads) during the initialization of the WASM memory (0.11.0, <a href="https://github.com/o1-labs/snarkyjs-bindings/pull/26">#26</a>)</li><li>Fix field.greaterThan() and other comparison methods outside provable code (0.11.0, <a href="https://github.com/o1-labs/snarkyjs/issues/858">#858</a>, <a href="https://github.com/o1-labs/snarkyjs/pull/902">#902</a>)</li><li>Fix field.assertBool() (0.11.0, <a href="https://github.com/o1-labs/snarkyjs/issues/469">#469</a>, <a href="https://github.com/o1-labs/snarkyjs/pull/902">#902</a>)</li><li>Fix Field(bigint) where bigint is larger than the field modulus (0.11.0, <a href="https://github.com/o1-labs/snarkyjs/issues/432">#432</a>, <a href="https://github.com/o1-labs/snarkyjs/pull/902">#902</a>)<br>- The new behavior is to use the modular residual of the input</li><li>No longer fail on missing signature in tx.send(). This fixes the flow of deploying a zkApp from a UI via a wallet (0.11.0, <a href="https://github.com/o1-labs/snarkyjs/pull/931">#931</a>) <a href="https://github.com/marekyggdrasil">@marekyggdrasil</a></li></ul><h3>To watch</h3><p>Subscribe to the official O(1) Labs YouTube channel <a href="http://youtube.com/@o1labsofficial">youtube.com/@o1labsofficial</a>.</p><h3>To read</h3><p>Guidance for branch compatibility for internal contributors in <a href="https://github.com/o1-labs/snarkyjs/blob/main/README-dev.md">snarkyjs/README-dev</a>.</p><h3>To celebrate</h3><p>We appreciate our community members <a href="https://github.com/wizicer">@wizicer</a> and <a href="https://github.com/marekyggdrasil">@marekyggdrasil</a> who contributed fixes.</p><p>A special shoutout goes to <a href="https://github.com/yunus433">@yunus433</a> for working hard on <a href="https://github.com/o1-labs/snarkyjs/pull/917">improving doc comments</a> on the Field class.</p><h3>To contribute</h3><ul><li>See the SnarkyJS <a href="https://github.com/o1-labs/snarkyjs/blob/main/CONTRIBUTING.md">Contributing guidelines</a>.</li><li>To learn how you can help us improve the functionality and user experience of the docs which in turn helps you build better projects, see the <a href="https://github.com/o1-labs/docs2/blob/main/CONTRIBUTING.md">Docs Contributing Guidelines</a>.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8a75e46cd849" width="1" height="1" alt=""><hr><p><a href="https://blog.o1labs.org/whats-new-in-snarkyjs-june-2023-8a75e46cd849">What’s New in SnarkyJS: June 2023</a> was originally published in <a href="https://blog.o1labs.org/">o1Labs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What’s New in SnarkyJS: May 2023]]></title>
            <link>https://blog.o1labs.org/whats-new-in-snarkyjs-may-2023-7c284dc98519?source=rss-63a6433541e------2</link>
            <guid isPermaLink="false">https://medium.com/p/7c284dc98519</guid>
            <category><![CDATA[smart-contracts]]></category>
            <category><![CDATA[zero-knowledge-proofs]]></category>
            <category><![CDATA[zkapps]]></category>
            <category><![CDATA[zkp]]></category>
            <category><![CDATA[snarkyjs]]></category>
            <dc:creator><![CDATA[Barrie Byron]]></dc:creator>
            <pubDate>Mon, 08 May 2023 18:13:54 GMT</pubDate>
            <atom:updated>2023-05-08T18:13:54.897Z</atom:updated>
            <content:encoded><![CDATA[<h4>Massive memory improvements, focus on improving the developer experience, and our first community package</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*h2Fz4gsfxE9zIAsYAZKAoQ.png" /></figure><p>8 MAY 2023</p><p>This month in SnarkyJS starts with a fresh minor release: 0.10.0 to address two long-standing developer pain points: memory usage and the need to wrap every SnarkyJS program with calls to await isReady and shutdown().</p><p>To get an idea of the memory improvements, here are some stats of memory consumed when running SnarkyJS in Node.js (16-core machine):</p><ul><li>When not compiling or proving<br>- Before: <strong>3.2 GB<br>- </strong>Now: <strong>300 MB</strong></li><li>When proving a small contract<br>- Before: <strong>3.6 GB<br>- </strong>Now: <strong>1.7 GB</strong></li><li>When proving complex, multi-contract zkApp<br>- Before: <strong>4.9 GB<br>- </strong>Now: <strong>3.2 GB</strong></li></ul><p>The first point — 10x reduction when SnarkyJS is not doing much — unlocks running SnarkyJS on light-weight serverless infrastructure, for use cases such as oracle services that sign data consumed by smart contracts.</p><p>If you’re curious — that reduction was possible by being more careful about how SnarkyJS uses worker threads. Previously, workers were running the whole time to potentially support parallelism in Wasm (compiled from Rust, using the `rayon` library). Now, workers are started, and subsequently shut down, only for operations that actually make use of that parallelism.</p><p>The need to shut down workers at the end of the Node.js process previously required the calling of `shutdown()`. Since this is now handled automatically, developers no longer have to call this function!</p><p>Under the hood, we’ve also begun refactoring work to make SnarkyJS more modular which will further improve memory, performance, and debuggability. One change is pulling out <a href="https://github.com/o1-labs/snarkyjs-bindings">snarkyjs-bindings</a> as a submodule. Bindings are code that <a href="https://github.com/o1-labs/snarkyjs">SnarkyJS</a> uses to bind to lower layers of the proof system and the Mina transaction logic that are written in Rust and OCaml. For contributors, make sure you git submodule update — init — recursive next time you pull SnarkyJS.</p><h3>Breaking Changes</h3><ul><li>All references to actionsHash are renamed to actionState to better mirror what is used in Mina protocol APIs (0.10.0, <a href="https://github.com/o1-labs/snarkyjs/pull/833">#833</a>)</li><li>No longer make MayUseToken.InheritFromParent the default mayUseToken value on the caller if one zkApp method calls another one; this removes the need to manually override mayUseToken in several known cases (0.10.0, <a href="https://github.com/o1-labs/snarkyjs/pull/863">#863</a>)<br>- Causes a breaking change to the verification key of deployed contracts that use zkApp composability</li><li>Circuits changed due to an internal rename of “sequence events” to “actions” which included a change to some hash prefixes; this breaks all deployed contracts.</li><li>Improve the number of constraints needed for Merkle tree hashing (0.9.6, <a href="https://github.com/o1-labs/snarkyjs/pull/820">#820</a>)<br>- This breaks deployed zkApps that use MerkleWitness.calculateRoot() because the circuit is changed<br>- You can make your existing contracts compatible again by switching to MerkleWitness.calculateRootSlow() that has the old circuit</li><li>Renamed function parameters: The getAction function now accepts a new object structure for its parameters. (0.9.6, <a href="https://github.com/o1-labs/snarkyjs/pull/828">#828</a>)<br>- The previous object keys, fromActionHash and endActionHash, have been replaced by fromActionState and endActionState.</li><li>Change type of verification key returned by SmartContract.compile() to match VerificationKey (0.9.5, <a href="https://github.com/o1-labs/snarkyjs/pull/812">#812</a>)</li></ul><h3>Added</h3><ul><li>this.state.getAndAssertEquals() as a shortcut for let x = this.state.get(); this.state.assertEquals(x); (0.10.0, <a href="https://github.com/o1-labs/snarkyjs/pull/863">#863</a>)<br>- also added .getAndAssertEquals() on this.account and this.network fields</li><li>Support for fallback endpoints when making network requests, allowing users to provide an array of endpoints for GraphQL network requests. (0.10.0, <a href="https://github.com/o1-labs/snarkyjs/pull/871">#871</a>)<br>- Endpoints are fetched two at a time, and the result returned from the faster response</li><li>reducer.forEach(actions, …) as a shortcut for reducer.reduce() when you don’t need a state (0.10.0, <a href="https://github.com/o1-labs/snarkyjs/pull/863">#863</a>)</li><li>New export TokenId which supersedes Token.Id; TokenId.deriveId() replaces Token.Id.getId() (0.10.0, <a href="https://github.com/o1-labs/snarkyjs/pull/863">#863</a>)</li><li>Add Permissions.allImpossible() for the set of permissions where nothing is allowed (more convenient than Permissions.default() when you want to make most actions impossible) (0.10.0, <a href="https://github.com/o1-labs/snarkyjs/pull/863">#863</a>)</li><li>smartContract.fetchActions() and Mina.fetchActions() asynchronous methods to fetch actions directly from an archive node (0.9.7, <a href="https://github.com/o1-labs/snarkyjs/pull/843">#843</a>) <a href="https://github.com/Comdex">@Comdex</a></li><li>zkProgram.analyzeMethods() to obtain metadata about a ZkProgram’s methods (0.9.6, <a href="https://github.com/o1-labs/snarkyjs/pull/829">#829</a>) <a href="https://github.com/maht0rz">@maht0rz</a></li></ul><h3>Changes</h3><ul><li><strong>Massive improvement of memory consumption</strong>, thanks to a refactor of SnarkyJS’ worker usage (0.10.0, <a href="https://github.com/o1-labs/snarkyjs/pull/872">#872</a>)<br>- Memory reduced by up to 10x; see <a href="https://github.com/o1-labs/snarkyjs/pull/872">the PR</a> for details<br>- Side effect: Circuit API becomes async, for example, MyCircuit.prove(…) becomes await MyCircuit.prove(…)</li><li>Token APIs this.token.{send,burn,mint}() now accept an AccountUpdate or SmartContract as from / to input (0.10.0, <a href="https://github.com/o1-labs/snarkyjs/pull/863">#863</a>)</li><li>Improve Transaction.toPretty() output by adding account update labels in most methods that create account updates (0.10.0, <a href="https://github.com/o1-labs/snarkyjs/pull/863">#863</a>)</li><li>Circuit.runAndCheck() now uses snarky to create a constraint system and witnesses, and check constraints. It closely matches behavior during proving and can be used to test provable code without having to create an expensive proof (0.9.7, <a href="https://github.com/o1-labs/snarkyjs/pull/840">#840</a>)</li></ul><h3>Deprecated</h3><p>Deprecate both shutdown() and await isReady, which are no longer needed (0.10.0, <a href="https://github.com/o1-labs/snarkyjs/pull/872">#872</a>)</p><h3>Fixed</h3><ul><li>SmartContract.deploy() now throws an error when no verification key is found (0.10.0, <a href="https://github.com/o1-labs/snarkyjs/pull/885">#885</a>)<br>- The old, confusing behavior was to silently not update the verification key (but still update some permissions to “proof”, breaking the zkApp)</li><li>Fix failing Mina.transaction on Berkeley because of unsatisfied constraints caused by dummy data before we fetched account state (0.9.5, <a href="https://github.com/o1-labs/snarkyjs/pull/807">#807</a>)<br>- Previously, you could work around this by calling fetchAccount() for every account involved in a transaction. This is not necessary anymore.</li><li>Update the zkApp verification key from within one of its own methods, via proof (0.9.5, <a href="https://github.com/o1-labs/snarkyjs/pull/812">#812</a>)</li><li>Fix fetching the access permission on accounts (0.9.8, <a href="https://github.com/o1-labs/snarkyjs/pull/851">#863</a>)</li><li>Fix fetchActions (0.9.8, <a href="https://github.com/o1-labs/snarkyjs/pull/844">#854</a>) <a href="https://github.com/Comdex">@Comdex</a></li><li>Updated Mina.TransactionId.isSuccess to accurately verify zkApp transaction status after using Mina.TransactionId.wait(). (0.9.8, <a href="https://github.com/o1-labs/snarkyjs/pull/826">#826</a>)<br>- This change ensures that the function correctly checks for transaction completion and provides the expected result.</li><li>Improved Event Handling in SnarkyJS (0.9.6, <a href="https://github.com/o1-labs/snarkyjs/pull/825">#825</a>)<br>- Updated the internal event type to better handle events emitted in different zkApp transactions and when multiple zkApp transactions are present within a block.<br>- The internal event type now includes event data and transaction information as separate objects, allowing for more accurate information about each event and its associated transaction.</li><li>Removed multiple best tip blocks when fetching action data (0.9.6, <a href="https://github.com/o1-labs/snarkyjs/pull/817">#817</a>)<br>- Implemented a temporary fix that filters out multiple best tip blocks, if they exist, while fetching actions. This fix will be removed once the related issue in the Archive-Node-API repository (<a href="https://github.com/o1-labs/Archive-Node-API/issues/7">https://github.com/o1-labs/Archive-Node-API/issues/7</a>) is resolved.</li><li>New fromActionState and endActionState parameters for fetchActions function in SnarkyJS (0.9.6, <a href="https://github.com/o1-labs/snarkyjs/pull/828">#828</a>)<br>- Allows fetching only necessary actions to compute the latest actions state<br>- Eliminates the need to retrieve the entire actions history of a zkApp<br>- Utilizes actionStateTwo field returned by Archive Node API as a safe starting point for deriving the most recent action hash</li><li>Update the zkApp verification key from within one of its own methods, via proof (0.9.5, <a href="https://github.com/o1-labs/snarkyjs/pull/812">#812</a>)</li></ul><h3>To watch</h3><ul><li>Subscribe to the official O(1) Labs YouTube is <a href="https://www.youtube.com/@o1labsofficial">youtube.com/@o1labsofficial</a>.</li></ul><h3>To read</h3><ul><li><a href="https://blog.o1labs.org/zero-knowledge-proofs-for-voting-3c6a6d5d89db">Zero-Knowledge Proofs for Voting</a> blog post that illustrates efficient, private, multi-chain services, and architectural patterns with voting and zero-knowledge proof-based off-chain smart contracts, homomorphic encryption, and distributed key generation.</li><li><a href="https://medium.com/p/6cab3b1e9325/edit">Unlocking the Power of Privacy: How Developers Can Leverage Homomorphic Encryption and Zero-Knowledge Proofs</a> blog post about using Elgamal as a partially homomorphic encryption scheme in a smart contract on Mina.</li></ul><h3>To celebrate</h3><ul><li>SnarkyJS is extensible. Developers are free to build, compose, and use libraries within the ecosystem. The first official <a href="https://github.com/o1-labs/snarkyjs/blob/main/README.md#community-packages">community package</a> is available for use.</li></ul><h3>To contribute</h3><ul><li>See the SnarkyJS <a href="https://github.com/o1-labs/snarkyjs/blob/main/CONTRIBUTING.md#creating-high-quality-community-packages">Contributing guidelines</a> for steps to create high-quality community packages.</li><li>To learn how you can help us improve the functionality and user experience of the docs which in turn helps you build better projects, see the <a href="https://github.com/o1-labs/docs2/blob/main/CONTRIBUTING.md">Docs Contributing Guidelines</a>.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7c284dc98519" width="1" height="1" alt=""><hr><p><a href="https://blog.o1labs.org/whats-new-in-snarkyjs-may-2023-7c284dc98519">What’s New in SnarkyJS: May 2023</a> was originally published in <a href="https://blog.o1labs.org/">o1Labs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What’s New in SnarkyJS: April 2023]]></title>
            <link>https://blog.o1labs.org/whats-new-in-snarkyjs-april-2023-76253e979153?source=rss-63a6433541e------2</link>
            <guid isPermaLink="false">https://medium.com/p/76253e979153</guid>
            <category><![CDATA[zero-knowledge-proofs]]></category>
            <category><![CDATA[snarkyjs]]></category>
            <category><![CDATA[smart-contracts]]></category>
            <category><![CDATA[zkapps]]></category>
            <category><![CDATA[zkp]]></category>
            <dc:creator><![CDATA[Barrie Byron]]></dc:creator>
            <pubDate>Thu, 06 Apr 2023 19:35:07 GMT</pubDate>
            <atom:updated>2023-05-05T18:16:26.131Z</atom:updated>
            <content:encoded><![CDATA[<h4>Minor fixes, major steps forward, and codebase contribution resources</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gsXQg7mvtv1h0FDin1K0Og.png" /></figure><p>6 APRIL 2023</p><p>This month in SnarkyJS sees the long-awaited integration of zkApp <a href="https://docs.minaprotocol.com/zkapps/advanced-snarkyjs/events">events</a> and <a href="https://docs.minaprotocol.com/zkapps/advanced-snarkyjs/actions-and-reducer">actions</a> with the Berkeley Testnet. A new Archive Node API enables SnarkyJS to fetch these two event types using GraphQL. New SnarkyJS functions that work with the Berkeley Testnet are smartContract.fetchEvents() and smartContract.reducer.getActions().</p><p>The Berkeley Testnet was redeployed with a few final touches on the zkApp protocol that also improved SnarkyJS:</p><ul><li>New access and setTiming permissions. The access permission is an essential puzzle piece for token contracts to guard against unauthorized approval of token transactions. Check out our <a href="https://docs.minaprotocol.com/zkapps/advanced-snarkyjs/permissions">Permissions</a> docs where these new permissions are explained!</li><li>New currentSlot and provedState on-chain values. The provedState value enables you to assert that the entire on-chain state was last modified by a proof. By checking for this property in every zkApp method, you can make the contract tamper-proof to prevent arbitrarily modifying the state of the smart contract.</li></ul><p>The SnarkyJS codebase is open source. We’ve made it easier for you to contribute with these new and updated resources:</p><ul><li>Badges on the <a href="https://github.com/o1-labs/snarkyjs/blob/main/README.md">SnarkyJS README</a> show the latest version and show that the code is open for PR contributions.</li><li><a href="https://github.com/o1-labs/snarkyjs/blob/main/CONTRIBUTING.md">Contributing guidelines</a> for creating high-quality community packages.</li><li><a href="https://github.com/o1-labs/snarkyjs/blob/main/README-dev.md">How to contribute to the SnarkyJS codebase</a> guidance.</li></ul><h3>Updates</h3><ul><li>getActions() adds support for multiple account updates with events in the same transaction (0.9.4, <a href="https://github.com/o1-labs/snarkyjs/pull/801">#801</a>)</li><li>Use fetchEvents() to fetch events for a specified zkApp from an archive node GraphQL API that implements <a href="https://github.com/o1-labs/Archive-Node-API/blob/efebc9fd3cfc028f536ae2125e0d2676e2b86cd2/src/schema.ts#L1">this schema</a>. Mina.Network() accepts an additional property to specify an archive node API URL to use. (0.9.3, <a href="https://github.com/o1-labs/snarkyjs/pull/749">#749</a>)<br>- Use the mina property for the Mina node<br>- Use archive for the archive node</li><li>Use getActions() to retrieve actions for a specified zkApp from an archive node using the GraphQL API (0.9.3, <a href="https://github.com/o1-labs/snarkyjs/pull/788">#788</a>)</li><li>Export the type returned by transaction.send(),Mina.TransactionIdso that you can directly interact with this type (0.9.3, <a href="https://github.com/o1-labs/snarkyjs/pull/785">#785</a>)</li><li>Added an option to specify tokenId as Field in fetchAccount(). (0.9.3, <a href="https://github.com/o1-labs/snarkyjs/pull/787">#787</a>)</li><li>this.network.timestamp is now implemented on top of this.network.globalSlotSinceGenesis (0.9.2, <a href="https://github.com/o1-labs/snarkyjs/pull/755">#755</a>)</li><li>A new on-chain value is available to use in your smart contracts: currentSlot (0.9.2, <a href="https://github.com/o1-labs/snarkyjs/pull/755">#755</a>)<br>- currentSlot refers to the slot at which the transaction <em>will be included in a block<br>- </em>the only supported method is currentSlot.assertBetween() because currentSlot.get() is impossible to implement since the value is determined in the future and currentSlot.assertEquals() is error-prone</li><li>Fixed incorrect counting of limit on events and actions (0.9.2, <a href="https://github.com/o1-labs/snarkyjs/pull/758">#758</a>)</li><li>Fixed a type error when using Circuit.array in on-chain state or events (0.9.2, <a href="https://github.com/o1-labs/snarkyjs/pull/758">#758</a>)</li><li>Fixed an issue when using Circuit.witness outside the prover (0.9.2, <a href="https://github.com/o1-labs/snarkyjs/pull/774">#774</a>)</li><li>Fixed an issue when using this.&lt;state&gt;.get() outside a transaction (0.9.1, <a href="https://github.com/o1-labs/snarkyjs/pull/754">#754</a>)</li><li>Transaction.fromJSON to recover transaction object from JSON (0.9.0, <a href="https://github.com/o1-labs/snarkyjs/pull/705">#705</a>)</li><li>New precondition: provedState is a Boolean that is true if the entire on-chain state of this account was last modified by a proof (0.9.0, <a href="https://github.com/o1-labs/snarkyjs/pull/741">#741</a>)<br>- Offers same API as all preconditions, for example, this.account.provedState.assertEquals(Bool(true)) <br>- Can be used to assert that the state wasn’t tampered with by the zkApp developer using non-contract logic, for example, before deploying the zkApp</li><li>New permissions:<br>- access to control whether account updates for this account can be used at all (0.9.0, <a href="https://github.com/o1-labs/snarkyjs/pull/500">#500</a>)<br>- setTiming to control who can update the account’s timing field (0.9.0, <a href="https://github.com/o1-labs/snarkyjs/pull/685">#685</a>)<br>Example: this.permissions.set({ …Permissions.default(), access: Permissions.proofOrSignature() })</li><li>Expose a low-level view into the PLONK gates created by a smart contract method (0.9.0, <a href="https://github.com/o1-labs/snarkyjs/pull/687">#687</a>)<br>- MyContract.analyzeMethods().&lt;method name&gt;.gates</li></ul><h3>To watch</h3><ul><li>The official O(1) Labs YouTube is now <a href="https://www.youtube.com/@o1labsofficial">youtube.com/@o1labsofficial</a>.</li><li><a href="https://www.youtube.com/watch?v=rvpNnjnBpP4">Mina zkApp Architecture Workshop: Zero-Knowledge Voting App</a> Part of the Mina Protocol zkIgnite (cohort 1 — week 4) O(1) Labs engineers <a href="https://twitter.com/zktrivo">Florian Kluge</a> and <a href="https://twitter.com/mitschabaude">Gregor Mitscha-Baude</a> demonstrate the architecture of a zk voting app starting at the 9:00 minute mark.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=76253e979153" width="1" height="1" alt=""><hr><p><a href="https://blog.o1labs.org/whats-new-in-snarkyjs-april-2023-76253e979153">What’s New in SnarkyJS: April 2023</a> was originally published in <a href="https://blog.o1labs.org/">o1Labs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>