Public Inputs for SNARK Accounts #2902
Replies: 3 comments 17 replies
-
I only meant that the block height is the only consensus-enforced public input; the rest can be arbitrary. |
Beta Was this translation helpful? Give feedback.
-
Based on the discussions we've had so far in #2904 , it appears infeasible to establish a universal predicate applicable to all rollups. Consequently, while it's not possible to determine the exact public inputs required by each rollup, it is essential to anticipate potentially useful public inputs and provide them to the rollups predicate verification function. Rollups will have the option to utilize or disregard these inputs. However, they are expected to accept these inputs in their validity predicate/circuit. Such public inputs include:
|
Beta Was this translation helpful? Give feedback.
-
I’d like to present a classification of public inputs, which I've found beneficial in designing and managing the workflow of snark accounts and the current and future discussions:
The Dynamic Inputs can be further grouped:
And the last classification is about the Mutual Inputs:
With the presented classification, I'd like to draw several observations and design ideas:
|
Beta Was this translation helpful? Give feedback.
-
Typical zk-rollups utilize smart contracts to enforce what must be provided as a public input when verifying a proof. Since smart contracts are not an option, we must define sufficiently general required public inputs.
In the forum post, it suggests that
However AFAIU, this would require the Celestia state machine to parse the withdrawal transaction to check that the transaction controlling the SNARK Account is actually sending the correct amount of funds to the correct address.
Instead, I think we could actually pass the hash of the transaction (or the hash of the body of the transaction) as a public input. This would allow for much more arbitrary actions to be proven. The circuit would first prove that some tx bytes hash to some value, and then prove arbitrary things about those bytes. Such as they contain only the correct bank.MsgSends.
There might be values that would be very useful to include as [optional] public inputs. Recall that a rollup would have to prove the fork choice rule and inclusion of some data. This could be done by first proving a light celestia light client, and then using that light client to verify data roots. Those data roots could then be used to verify inclusion and or the fork choice rule.
Alternatively, the state machine could require that some commitment to block data be included as a public input. This commitment could be the raw data roots themselves, or perhaps some meta commitment such as what is used for blobstream.
Beta Was this translation helpful? Give feedback.
All reactions