You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Let's document how devs can leverage the recent bitwise gadgets, starting with those landed in time for ZK Hack
From Nov What's new in o1js blog post:
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.
Gadgets.rangeCheck64(): A provable method for efficient 64-bit range checks using lookup tables. (0.14.0, #1181)
Gadgets.rotate(): A provable method to support bitwise rotation for native field elements. (0.14.0, #1182)
Gadgets.xor(): A provable method to support bitwise XOR operations for native field elements. (0.14.0, #1177)
list of merged gadgets: xor, and, rot, not, range checks, left shift and right shift
in review: ffadd, ffmul
AND gadget to the existing Gadgets namespace, which behaves similarly to the & operator in JavaScript. Implements AND gadget o1js#1193
NOT adds the implementation for a NOT gate to the existing Gadgets namespace. A bitwise NOT is an operation that returns 1 in each bit position if the corresponding bit of the operand is 0, and returns 0 if the corresponding bit of the operand is 1. Implement NOT gadget o1js#1198
Per @garwalsh suggestion, first create the explainer doc in the o1js with:
"deep dive" explainer doc: high-level description of what the gadgets are, what they can be used for in their current state (i.e. not integrated into higher-level APIs)
In the short term, this gets us out of the situation we are currently in, where we have functionality with no docs.
From there, we can work on a tutorial (love the idea of using keccak), but not until the tutorial audit is finished
two types of content about the gadgets: A tutorial showing how to use them and some sort of "deep dive" that explains them in detail
Let's document how devs can leverage the recent bitwise gadgets, starting with those landed in time for ZK Hack
From Nov What's new in o1js blog post:
list of merged gadgets: xor, and, rot, not, range checks, left shift and right shift
in review: ffadd, ffmul
In addition to the auto-generated reference docs https://docs.minaprotocol.com/zkapps/o1js-reference/modules#gadgets what content can help our devs build?
XOR
operation support for native field elements. implements XOR gadget o1js#1177include: Gadgets.leftShift() / Gadgets.rightShift(), new provable methods to support bitwise shifting. #1194
The text was updated successfully, but these errors were encountered: