-
Notifications
You must be signed in to change notification settings - Fork 12
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
Fix: the transcript should not depend on the proving order #223
Conversation
This seems → Make each thread different, e.g. by appending a unique circuit name or ID. Also, an argument by-ref → Change the argument to by-value In case you want to support a larger protocol that builds on top of that → Introduce a impl Transcript {
/// Fork this transcript into n different threads.
pub fn fork(&mut self, n: usize) -> Vec<Self> {
let mut forks = Vec::with_capacity(n);
for i in 0..n {
let mut t = self.clone();
t.append_field_element(&(i as u64).into());
forks.push(t);
}
forks
}
/// Include the history of the forks into the current transcript.
pub fn merge(&mut self, forks: Vec<Self>) {
for fork in forks {
self.append_field_element_ext(&fork.read_field_element_ext());
}
}
} |
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.
→ Alternative in #224 .
This does solve the issue though, nice catch. |
Close this as #224 is better. |
This is another approach to #223, fixing #222 / #210. Features: - Prepare for parallel proving with independent transcripts per thread. - Soundness with different transcripts in each thread. - Type-safe API which captures the transcript by value. There is no function to merge the threads back into one transcript, but that can be added if ever needed. --------- Co-authored-by: Aurélien Nicolas <[email protected]>
This is another approach to #223, fixing #222 / #210. Features: - Prepare for parallel proving with independent transcripts per thread. - Soundness with different transcripts in each thread. - Type-safe API which captures the transcript by value. There is no function to merge the threads back into one transcript, but that can be added if ever needed. --------- Co-authored-by: Aurélien Nicolas <[email protected]>
The input transcript to opcode circuits and table circuits should be the same.
This will fix #222 and also resolve the failure in #210.