How to write the constraints for a zk-SNARK circuit

131 Views Asked by At

Need help with defining constraints for a zk-SNARK circuit Hi everyone,

I am developing a zk rollup SDK and I need help with defining the constraints for the circuit. I do not have access to a cryptography expert at the moment and I am looking for resources or community members who can help me.

I am using the circomlib library and I have a basic understanding of zk-SNARKs, but I am not sure how to define the constraints for the circuit. My inputs include the following:

  1. parentHash
  2. sha3Uncles
  3. miner
  4. stateRoot
  5. transactionsRoot
  6. receiptsRoot
  7. logsBloom
  8. difficulty
  9. totalDifficulty
  10. size
  11. number
  12. gasLimit
  13. gasUsed
  14. timestamp
  15. extraData
  16. mixHash
  17. nonce
  18. hash
  19. transactions[]
  20. uncles[] If anyone has experience with defining constraints for zk-SNARK circuits and could share some guidance or resources, I would be very grateful. Thank you in advance for your help!

Best regards, Shreyan

i tried reffering to the circuit of other rollups that are using circom for their circuits for example fluidex but i am not able to understand how they wrote such complex circuit and what exactly is happenning inside the circuits. i need to create a circuit with these inputs and later generate a proof and then verify it for our rollup sdk project.

0

There are 0 best solutions below