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

Add other accessors necessary for zkVM memory #1383

Merged
merged 5 commits into from
Dec 5, 2023
Merged

Conversation

mrmr1993
Copy link
Member

@mrmr1993 mrmr1993 commented Dec 5, 2023

This PR builds upon #1382, adding counterpart operations for

  • writing to memory
  • reading the 'access index' for a memory address
  • writing the 'access index' for a memory address.

These primitives are essential for the correct operation of RAMLookup, ensuring that reads are 'temporal' (i.e. you can't read a value in the past that you wrote in the future).

Base automatically changed from feature/fetch-memory-alloc to master December 5, 2023 16:30
@@ -47,7 +47,7 @@ pub struct Env<Fp> {
pub instruction_parts: InstructionParts<u32>,
pub instruction_counter: usize,
pub memory: Vec<(u32, Vec<u8>)>,
Copy link
Member

Choose a reason for hiding this comment

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

Wasn't the content of the memory and registers of type Variable? Or does this casting only happen inside the interpreter?

Copy link
Member Author

Choose a reason for hiding this comment

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

The Variable type is only in the interpreter, yea.

@mrmr1993 mrmr1993 merged commit 6119341 into master Dec 5, 2023
4 checks passed
@mrmr1993 mrmr1993 deleted the feature/push-memory branch December 5, 2023 18:23
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