SNARK Account Predicates #2904
Replies: 4 comments 6 replies
-
Thanks Evan for opening the discussions. Among the three discussions underway (i.e., this and this), the current one is the most pivotal, as it has the potential to significantly alter the course of the other two conversations. Context and NotationI’d like to introduce some formal notations and context for clarity: Consider a SNARK account associated with a One example would be a SNARK account that permits withdrawals only if the issuer knows the preimage To identify the public inputs for SNARK accounts, it's essential to first define the specific predicates that the account is designed to verify. Once this predicate is established, the associated public and private inputs can be more clearly understood and defined. Discussion PointsIn order to foster a thorough and structured discussion, I suggest addressing the following questions sequentially.
|
Beta Was this translation helpful? Give feedback.
-
Thank you, Evan, for your comprehensive feedback; it was instrumental in shaping the user story and validity rules, and also in determining whether a generic SNARK account is required or if a specific predicate can be universally applied to all rollups. Here's my interpretation of the user story and rules (inspired by your feedback), with minor modifications and a revised narrative approach. We're examining a scenario where a transaction Based on state
Except for points 7 and 8, the other validity criteria are internal to the rollup and vary depending on its design. Consequently, the answer to the first and second questions of this discussion would be no, i.e., it's challenging to establish a universal and generic predicate applicable to all rollups, given that they do not conform to the same validity rules e.g., state transition rules, transaction validity rules, and fork-choice rules. Please let me know if you have a different perspective. Regarding the third question about Generic vs Hybrid accounts, and specifically about your comment:
In the generic model (non-hybrid), Celestia does not supply any public inputs. Instead, it uses the public inputs provided by the transaction or specified by the account holder. For instance, the hash of the SNARK transaction submitted to Celestia could serve as one of the public parameters attached to the transaction. Celestia's state can then use this hash to verify the authenticity of the transaction (i.e., to check if the transaction's hash matches the submitted transaction). Conversely, in a hybrid model, the hash is computed by the Celestia app and fed into the SNARK verification function. In this scenario, the transaction itself does not need to include the hash. Some final points: Initially, I viewed one of the design distinction between generic and hybrid accounts as follows: In a generic model, Celestia doesn't need to understand the meaning of public inputs supplied by the transaction or SNARK account holders. However, upon further reflection, in both generic and hybrid approaches, it's beneficial for some public inputs to hold common meanings for both Celestia and the rollup. This means a transaction should not merely carry arbitrary data; certain elements need to be mutually understandable. The bare minimum is the transaction hash, which is essential to bind the SNARK proof to the transaction regardless of who provides that data, celestia or the transaction origin. |
Beta Was this translation helpful? Give feedback.
-
Would there need to be a validity predicate for depositing into an account or just for withdrawing? |
Beta Was this translation helpful? Give feedback.
-
I’m trying to develop an intuition around the snark account work as it’s likely that I will be involved in reviewing it. As I see it, at a high level it mimics the same flow as a smart contract however using proofs to reduce the amount of on-chain state. How I see the usage as it relates to rollup bridging is as follows:
Some questions I have (which I've tried to direct in the appropriate discussions):
|
Beta Was this translation helpful? Give feedback.
-
In the original forum post and in other sync discussions, we've briefly discussed what a validity predicate would actually be for a rollup that controls a SNARK Account. We can continue those discussions of what different predicates for SNARK accounts would look like, what they would require from the state machine (ie perhaps an apphash), and what they would be useful for here.
Beta Was this translation helpful? Give feedback.
All reactions