-
Notifications
You must be signed in to change notification settings - Fork 81
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
PIL LogUp implementation: Generate multiplicity column #2042
Conversation
@@ -174,7 +174,7 @@ impl<T: FieldElement> IndexedColumns<T> { | |||
} | |||
} | |||
|
|||
const MULTIPLICITY_LOOKUP_COLUMN: &str = "m_logup_multiplicity"; | |||
const MULTIPLICITY_LOOKUP_COLUMN: &str = "multiplicities"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Planning to remove this ASAP (prototype in #1958) and get this from the phantom lookups.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let column = columns.remove(&name).unwrap(); | ||
let column = columns | ||
.remove(&name) | ||
.unwrap_or_else(|| panic!("No machine generated witness for column: {name}")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand this, in which situations can this fail?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
std/protocols/lookup.asm
Outdated
/// - lookup_constraint: The lookup constraint | ||
/// - multiplicities: A multiplicities column which shows how many times each row of the RHS value appears in the LHS | ||
let lookup: Constr, expr -> () = constr |lookup_constraint, multiplicities| { | ||
/// - lookup_constraint: The lookup constraint |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Quite redundant, I would just remove it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
std/protocols/lookup.asm
Outdated
@@ -75,6 +74,7 @@ let lookup: Constr, expr -> () = constr |lookup_constraint, multiplicities| { | |||
|
|||
let lhs_denom = sub_ext(beta, fingerprint(lhs, alpha)); | |||
let rhs_denom = sub_ext(beta, fingerprint(rhs, alpha)); | |||
let multiplicities = std::prover::new_witness_col_at_stage("multiplicities", 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why specify the stage explicitly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you use let multiplicities
, it will be create at the "current stage".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, if we use capture_stage
, then we might already be at a higher stage, but I think there should still be a better way around that than just setting the stage to zero explicitly. I think I would just use let multiplicites
now until we reach that problem.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still don't understand the panic message but it's fine.
No need to have the user create the multiplicity column anymore.