-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add validity constraints #84
Comments
I think |
Our existing "transition_constraints" currently includes both validity and transition constraints, so the only change needed there is to distinguish between the constraint types in the IR. I think the tasklist for this issue looks something like the following:
Question: Instead of tracking 1 array of entry nodes should we track 2 arrays of constraint entry nodes - one for validity constraints and one for transition constraints? We don't need this for Miden, but it would be needed for something like Polygon Zero. @bobbinth what do you think? |
For what we need now, two separate arrays will probably suffice, but I wonder if we should make this even more general for what we might do in the future. Specifically, each entry point could contain a set of row offsets used for a given constraints. The offsets here would be similar to the ones mentioned in #54. For example, if the set of offsets consists of a single offset |
Sure, I think this makes sense to do. The more general approach is better for the future, and it's probably equal work, since making the change for #54 will probably help with identifying validity vs. transition constraints. That means this issue is blocked by #54 and we should do that first. Then for this issue, we would need to update the way constraints are tracked, so that instead of an array of |
Agreed! And yes, instead of just struct ConstraintRoot {
index: NodeIndex,
offsets: Vec<usize>,
} (open to changing any of the names in the above) |
@Overcastan since there are 2 steps required, I recommend that the first PR just handles the renaming
|
closed by #111 |
We should add support for defining validity constraints. These constraints would be similar to transition constraints, with the only exception that they would work only with the current row of the trace. For example:
These constraints should be in the same section as transition constraints however we should change the name of the combined section to
integrity_constraints
(or something similar). Also, in the IR we should still probably have a single algebraic DAG, but we could mark entry points as transition vs. validity constraints.Originally posted by @bobbinth in #53.
The text was updated successfully, but these errors were encountered: