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
Each public input that is passed to the snark costs ~ 40k gas. We want to reduce this by hashing together all the inputs inside the EVM and then hashing them together again inside the snark and ensuring that they match. The data being the merkle tree address of each leaf updated AND its new leaf. We can reduce the size of the data we need to pass in the future but this is a good conservative first step.
With the new sha256_many gadget you can pass-in an arbitrary sized array of bits, so a large amount of data can be verified between Ethereum and the circuit using only 2 public puts to verify (or a single input, truncated to 253 bits, and it's safe to truncate SHA256 outputs in the random oracle model)
The sha256_many gadget is compatible with the SHA256 function as used on Ethereum, in Python and generally everywhere, whereas only the raw compression function gadget is implemented in libsnark.
sha256_many extends the compression function gadget to perform input padding for arbitrary length inputs, and chains the raw compression function together.
Each public input that is passed to the snark costs ~ 40k gas. We want to reduce this by hashing together all the inputs inside the EVM and then hashing them together again inside the snark and ensuring that they match. The data being the merkle tree address of each leaf updated AND its new leaf. We can reduce the size of the data we need to pass in the future but this is a good conservative first step.
https://github.com/barryWhiteHat/roll_up/blob/master/src/roll_up.tcc#L40 we start to pack our inputs into feild elements so we can pass them.
https://github.com/barryWhiteHat/roll_up/blob/master/src/roll_up.tcc#L82 is where we define the number of public inputs we want to allow. We want to in the snark
And In the contract
And in python
We can use HarryR/ethsnarks#78 once it is ready. @HarryR can you advise when this is ready?
The text was updated successfully, but these errors were encountered: