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:
parentHash
sha3Uncles
miner
stateRoot
transactionsRoot
receiptsRoot
logsBloom
difficulty
totalDifficulty
size
number
gasLimit
gasUsed
timestamp
extraData
mixHash
nonce
hash
transactions[]
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.
Related
I am evaluating OptaPlanner for a planning problem I have. I have seen several responses to this topic, but nothing quite like I am looking for.
I am looking for the capability to extend the problem on the fly; that is, as the planner is solving a problem.
For example, in the CloudComputing example, I would like to be able to add computers on the fly (to a point) while the problem is being solved. The easiest case is that the problem is initially over-constrained and to resolve this I would like to be able to add computers, and then replan.
Or, I would like to be able to add a lecture, or a lecturer in one of the scheduling problems, etc.
It seems like the OptaPlanner requires a static number of entities / variables at solve time.
Any pointers would be appreciated.
Take a look at the Real-time planning section of the OptaPlanner User Guide.
You could also look at the Travelling Salesman Problem example in optaplanner-examples. Specifically, look at the org.optaplanner.examples.tsp.swingui.TspPanel class and traverse down from there. It's a pretty standard implementation of real-time planning AFAIK. I can also recommend to run the TSP example first to "see" how it works.
I looked at the user guide http://docs.jboss.org/optaplanner/release/6.1.0.Final/optaplanner-docs/html_single/index.html#d0e2669
I looked at the example code from git, but still feel quite lost about how to model my planning problem (for example some special TSP variant, let's say TSPTW ). the way OptaPlanner user code is structured is that the user code is devided into several packages, and there is not a entire "end-to-end" flow of code, and as a developer I only see these "modules" , sort of. So as a result it's very difficult for me to figure out how to connect the dots, and how these "dots" interact together to accomplish the overall algorithm task.
the section in the link above "Model your planning problem " sort of touches on the above question I have, but still seems out of sync with the example code, so it's difficult to figure out how the current examples work, also it's difficult for me to see how to add my own special logic for the TSP variant .
is there a better "code walk-through" document to show the usage of the framework?
thanks
Yang
Take a look here this guy create a simple optaplanner project to test some concepts and learn how to use it.
I have been recently trying out crudRESTController in TG2.1.
Overall, I found that--
1] The community is helpful.
2] But, it is hard to find a help topic or docs, if I get stuck-up with a particular issue.
e.g. The name of instance of crudRESTController must be a plural of underlying model name.
Otherwise, it won't work correctly. It is nowhere given in their docs.
Hence I am thinking to use jqgrid for crud functionality.
Can anybody please point out whether it would be better to use jqgrid or stick to crudRESTController!
(keeping in mind the control I can have over the code, rapid application development, deployment, speed, etc.
Thanks in advance,
Vineet.
Give a look at EasyCrudRestController from tgext.crud, it provides an easy way to create working Crud Controllers on the fly. For more deep customization you can tune it as you would with CrudRestController.
I am a final year computer undergrad student looking for a unique (or semi-unique) application for audio fingerprinting, for my finally year project. My original idea was to have a program to figure out what song a user was humming, thru the use of audio fingerprint. But I did a search, and found out somebody had already implemented it (perfectly I might add). Any suggestions on how I can tweak it (it doesnt have to be TOTALLY new) or derive some thing along similar field will be VERY MUCH appreciated.
P.S. Thank you in advance.
(P.P.S. I don’t have to do a full implementation, just the core part or an essential part of my choosing)
Last.fm has an amazing API and song fingerprinting script. Maybe you could extend their app to do something different?
I am taking a Digital Circuits class in which we do not use a book, only lecture notes. In the section that covers adders I only have 2 small examples covering addition and subtraction of binary numbers. I am pretty sure i am going to have worded problems in the exam such as design a circuit to count something etc. Does anyone know any sites that have example questions and solution for me to go over?
I don't know of any particular sites, but I do know that when I took a similar class, the lecturer was awful and I relied entirely on the textbook. It was Digital Design, by M Morris Mano. I highly recommend it - it's got plenty of problems to go over and has all the information you need in case you get stuck on something.
Wikipedia is a useful resource. The best way to learn electronics is to build your own circuits, preferably with real hardware or using a simulator if the former is not practicable.
P.S. You do not need adders to count events. A cascade of bi-stable flip-flops will do this.