-
Notifications
You must be signed in to change notification settings - Fork 285
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
Lookup serialization #1111
Lookup serialization #1111
Conversation
The CI errors are not related to these changes. See #1113 . |
@@ -1689,12 +1697,14 @@ pub trait Write { | |||
&mut self, | |||
gate: &GateRef<F, D>, | |||
gate_serializer: &dyn GateSerializer<F, D>, | |||
common_data: &CommonCircuitData<F, D>, |
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.
Same with this
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.
common_data is actually being used in quite a lot of places (and consistently across this file). Do you want me to address this particular case still?
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.
Hm maybe it should just be called common_data
everywhere (instead of cd
)?
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.
Ok! Addressed in additional commit.
@npwardberkeley I've added another commit on top of what you already reviewed, addressing a point mentioned in #1114 about circuit building which can take quite some time when we are loaded with lookups. For 8192 |
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.
Looks good!
This PR updates the way lookup tables are being serialized, and more generally gives access to
CommonCircuitData
to gates and generators during serialization/deserialization.This allows:
lookup_table
in a given circuitDummyCircuitGenerator
to be placed first in the GeneratorSerializer object (could have easily been source of errors for external users defining their own gate/generators and needing to implement a custom serializer.For this, it updates the underlying
F
type ofWitnessGeneratorRef
fromF: Field
toF: RichField + Extendable<D>
. I am not sure as to why it was set only toField
in the first place, as the restriction is natural here.