-
Notifications
You must be signed in to change notification settings - Fork 104
More robust publics implementation for WriteOnceMemory
#2600
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
base: update-public-examples
Are you sure you want to change the base?
Conversation
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.
Pull Request Overview
This PR improves the robustness of the publics handling in the WriteOnceMemory machine by explicitly detecting the WriteOnceMemoryWith8Publics case. Key changes include:
- Adding new fields (exposes_8_publics and namespace) to drive the special publics behavior.
- Refactoring witness value retrieval into a new get_witness_values() method.
- Updating the take_public_values() logic to handle the WriteOnceMemoryWith8Publics case.
.iter() | ||
.enumerate() | ||
.map(|(value_index, poly)| { | ||
let column = self.fixed_data.witness_cols[poly] |
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.
The get_witness_values() method references 'self.fixed_data', but 'fixed_data' is no longer stored in the WriteOnceMemory struct. Consider either adding 'fixed_data' as a field in the struct or passing it as an argument to get_witness_values() to avoid a potential compile error.
let column = self.fixed_data.witness_cols[poly] | |
let column = fixed_data.witness_cols[poly] |
Copilot is powered by AI, so mistakes are possible. Review output carefully before use.
@georgwiese do we still want to merge this? |
Depends on whether we merge #2572 |
A suggestion to #2572.
The previous implementation assumed that only the instance of
WriteOnceMemory
has publics. Here, we detect theWriteOnceMemoryWith8Publics
case more explicitly.