Skip to content
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/circuit-order: Reliable order of circuits in proofs #522

Merged
merged 11 commits into from
Nov 6, 2024

Conversation

naure
Copy link
Collaborator

@naure naure commented Nov 1, 2024

Extracted from #368

let wits_in = zkvm_witness.witnesses.remove(&name).unwrap().into_mles();
let wits_in = zkvm_witness
.into_iter_sorted()
.next()
Copy link
Collaborator

@matthiasgoergens matthiasgoergens Nov 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't that just first?

Seems a bit weird in any case, why not just ask for the one we know we want by name?

Copy link
Collaborator Author

@naure naure Nov 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or exactly_once but somehow didn't work.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I'll have a look.

@@ -205,7 +205,8 @@ impl<E: ExtensionField> ZKVMFixedTraces<E> {

#[derive(Default)]
pub struct ZKVMWitnesses<E: ExtensionField> {
pub witnesses: BTreeMap<String, RowMajorMatrix<E::BaseField>>,
witnesses_opcodes: BTreeMap<String, RowMajorMatrix<E::BaseField>>,
Copy link
Collaborator

@matthiasgoergens matthiasgoergens Nov 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't we want the kinds instead of the opcodes?

Or what does witnesses_opcodes mean?

Copy link
Collaborator Author

@naure naure Nov 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There can be other circuits despite the name. It is called "opcode" everywhere until we find a more precise name.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So what's actually in there? The instructions or something else?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's what the caller of this type passed in assign_opcode_circuit, respectively assign_table_circuit.

@naure naure enabled auto-merge (squash) November 6, 2024 11:11
@naure naure merged commit ffd5773 into master Nov 6, 2024
6 checks passed
@naure naure deleted the fix/circuit-order branch November 6, 2024 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants