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

Refactor access list search #637

Merged
merged 14 commits into from
Sep 26, 2024
Merged

Refactor access list search #637

merged 14 commits into from
Sep 26, 2024

Conversation

4l0n50
Copy link
Contributor

@4l0n50 4l0n50 commented Sep 18, 2024

This PR removes the linear search required for finding a node's pointer in the access list. Closes #611.

@github-actions github-actions bot added the crate: evm_arithmetization Anything related to the evm_arithmetization crate. label Sep 18, 2024
@Nashtare Nashtare added this to the Performance Tuning milestone Sep 18, 2024
@Nashtare
Copy link
Collaborator

Reminder for rustfmt if you're using VSCode, you can have "editor.formatOnSave": true in your user settings to not have to think about it :)

evm_arithmetization/src/cpu/kernel/interpreter.rs Outdated Show resolved Hide resolved
evm_arithmetization/src/generation/linked_list.rs Outdated Show resolved Hide resolved
Comment on lines 47 to 50
#[allow(dead_code)]
pub const ADDRESSES_ACCESS_LIST_LEN: usize = 2;
#[allow(dead_code)]
pub const STORAGE_KEYS_ACCESS_LIST_LEN: usize = 4;
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: we probably don't wanna keep all these dead code lines

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was using those when debugging. How can I keep it for future use?

Copy link
Collaborator

@Nashtare Nashtare Sep 19, 2024

Choose a reason for hiding this comment

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

Hmm ideally if you want to keep it then we could group all of these unused into some

#[allow(unused)]
pub(crate) mod debugging {

}

but is it really going to be useful in the future? Or was it helpful only for the transition of access list searching?

Copy link
Contributor Author

@4l0n50 4l0n50 Sep 26, 2024

Choose a reason for hiding this comment

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

In the end there was a test using ADDRESSES_ACCESS_LIST_LEN

evm_arithmetization/src/generation/state.rs Outdated Show resolved Hide resolved
evm_arithmetization/src/generation/linked_list.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@einar-polygon einar-polygon left a comment

Choose a reason for hiding this comment

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

After our walk-through I think this looks good.

evm_arithmetization/src/generation/prover_input.rs Outdated Show resolved Hide resolved
Copy link
Collaborator

@Nashtare Nashtare left a comment

Choose a reason for hiding this comment

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

LGTM, modulo the remaining points mentioned by @einar-polygon

@Nashtare Nashtare merged commit fc28337 into develop Sep 26, 2024
16 checks passed
@Nashtare Nashtare deleted the refactor_access_list_search branch September 26, 2024 15:09
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.

perf(continuations): Access list search should run in sublinear time
3 participants