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

feat(continuations): write storage values directly in linked lists #433

Merged
merged 141 commits into from
Aug 2, 2024

Conversation

LindaGuiga
Copy link
Contributor

Closes #398 .

This PR makes linked lists store the slot values directly, instead of a pointer to the TrieDataSegment.

@github-actions github-actions bot added the crate: evm_arithmetization Anything related to the evm_arithmetization crate. label Jul 23, 2024
@Nashtare Nashtare changed the title Late hash continuations storage optim feat(continuations): write storage values directly in linked lists Jul 23, 2024
@Nashtare Nashtare requested a review from hratoanina July 23, 2024 21:24
@Nashtare Nashtare added this to the zk-continuations - Q3 2024 milestone Jul 24, 2024
evm_arithmetization/src/generation/mpt.rs Outdated Show resolved Hide resolved
evm_arithmetization/src/generation/mpt.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@4l0n50 4l0n50 left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@@ -165,6 +165,10 @@ global perform_final_checks:
PROVER_INPUT(trie_ptr::state)

%mstore_global_metadata(@GLOBAL_METADATA_STATE_TRIE_ROOT)

PROVER_INPUT(trie_ptr::trie_data_size)
%mstore_global_metadata(@GLOBAL_METADATA_TRIE_DATA_SIZE)
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe this needs a comment saying that is not unsound to simply guess the size. I think it's because the values in the storage linked lists are already non det. advice, so it doesn't matter from where you are reading them.

Base automatically changed from late_hash_continuations to feat/continuations August 1, 2024 14:39
@Nashtare Nashtare merged commit e4b2854 into feat/continuations Aug 2, 2024
13 of 14 checks passed
@Nashtare Nashtare deleted the late_hash_continuations_storage_optim branch August 2, 2024 21:43
Nashtare added a commit that referenced this pull request Aug 6, 2024
)

* Remove unnecessary linked_lists methods and payload_ptr

* Store storage value in linked list

* Fix Clippy and cleanup

* Apply comments

* Only write to TrieData if value nonzero

* Fix comments and name changed in merge

* Apply comments

---------

Co-authored-by: 4l0n50 <[email protected]>
Co-authored-by: Alonso Gonzalez <[email protected]>
Co-authored-by: Robin Salen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crate: evm_arithmetization Anything related to the evm_arithmetization crate.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants