-
Notifications
You must be signed in to change notification settings - Fork 297
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
feat: Origin Tags part 3 (Memory) #9758
Conversation
dfa79be
to
ccc27ff
Compare
44d3d72
to
85eec78
Compare
@@ -247,7 +273,13 @@ template <typename Builder> void ram_table<Builder>::write(const field_pt& index | |||
|
|||
_index_initialized[cast_index] = true; | |||
} else { | |||
_context->write_RAM_array(_ram_id, index_wire.normalize().get_witness_index(), value_wire.get_witness_index()); |
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.
Here's the bug
@@ -49,13 +52,19 @@ template <typename Builder> void rom_table<Builder>::initialize_table() const | |||
context->set_ROM_element(rom_id, i, entries[i].get_witness_index()); | |||
} | |||
|
|||
// Preserve tags to restore them in the future 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.
I think you forgot to initialize the tags inside the rom_table
constructor
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.
It's a vector, so it is default-initialized
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.
LGTM
This PR: 1. Adds Origin Tags for tracking dangerous interactions to all stdlib memory primitives 2. Expands the tests from TwinRomTable 3. Fixes a bug with the use of nonnormalized value.
This PR: