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

parallelize mpt updates #99

Merged
merged 14 commits into from
Nov 27, 2023
Merged

parallelize mpt updates #99

merged 14 commits into from
Nov 27, 2023

Conversation

kunxian-xia
Copy link
Contributor

@kunxian-xia kunxian-xia commented Nov 2, 2023

To turn on the parallel mode of witness assignment, set the env var PARALLEL_SYN=true. For example, you can run unit test tests::multiple_updates using

PARALLEL_SYN=true RUST_LOG=debug cargo test --release --lib tests::multiple_updates -- --nocapture

TODO list

  • batching inversions in difference_is_zero gadget.
  • parallelize canonical_representation.
  • parallelize mpt padding rows (0.4s).
  • parallelize mpt table assignment (1s). (fixed by scroll-tech/zkevm-circuits@a6f2288)
  • parallelize the key_bit_lookups function (1s).
  • add benches in which there are at least 10k mpt updates and get real world performance data.

@kunxian-xia
Copy link
Contributor Author

This is related to #94 #95 #96.

@z2trillion z2trillion self-requested a review November 27, 2023 09:06
Copy link
Member

@z2trillion z2trillion 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. for future reference, when we run this on the mpt updates from chunk_83587.zip, the assignment time should drop from ~40s to 1.5s.

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.

2 participants