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] Optimize zktrieState with flatten proofs #1388

Merged
merged 8 commits into from
Aug 13, 2024
Merged

[Feat] Optimize zktrieState with flatten proofs #1388

merged 8 commits into from
Aug 13, 2024

Conversation

noel2004
Copy link
Member

@noel2004 noel2004 commented Aug 4, 2024

This PR make use of the new "flatten proof" in l2trace to optimize the construction of zktrie state.

With flatten proof and key hashes, no poseidon calculation would be required in constructing the initial zktrie state.

DO NOT MERGE unti following tasks are completed

  • The dependency of zktrie has been merged tagged
  • Test against with enough blocks of mainnet
  • Test against with enough chunks of mainnet
  • Regression tests for compatible with old l2trace
    usage of txStorageTrace has been proven to be correct

zktrie/src/state.rs Outdated Show resolved Hide resolved
use key cache
@noel2004 noel2004 marked this pull request as ready for review August 11, 2024 14:47
@noel2004
Copy link
Member Author

Has passed >300 blocks on l2 mainnet with chunk_prover binary

@noel2004
Copy link
Member Author

Passed another bulk of blocks with chunk builder in chunk_prover binary. So the chunk building has been covered.

(Also with a tirival fixing on chunk_prover: scroll-tech/scroll-prover#335)

@noel2004
Copy link
Member Author

Test for compatibility of old trace has passed.

A regression has completed with the newest commit.

@lispc lispc merged commit 05ccc94 into develop Aug 13, 2024
17 checks passed
@lispc lispc deleted the opt/zkstate branch August 13, 2024 10:21
lispc pushed a commit that referenced this pull request Aug 13, 2024
* induce "query" mode for building sdb

Signed-off-by: noelwei <[email protected]>

* switch zktrie dep

Signed-off-by: noelwei <[email protected]>

* induce flatten proof and integration test

Signed-off-by: noelwei <[email protected]>

* update zk_dep
use key cache

* fix test issue

* update zktrie dep

* induce mpt state updating

* fix issue in chunk building

---------

Signed-off-by: noelwei <[email protected]>
lispc added a commit that referenced this pull request Aug 14, 2024
…hanges (#1392)

* [Feat] Optimize zktrieState with flatten proofs (#1388)

* induce "query" mode for building sdb

Signed-off-by: noelwei <[email protected]>

* switch zktrie dep

Signed-off-by: noelwei <[email protected]>

* induce flatten proof and integration test

Signed-off-by: noelwei <[email protected]>

* update zk_dep
use key cache

* fix test issue

* update zktrie dep

* induce mpt state updating

* fix issue in chunk building

---------

Signed-off-by: noelwei <[email protected]>

* update zktrie

* use v0.8 for zktrie

* use v0.9 for zktrie

* update cargo lock

---------

Signed-off-by: noelwei <[email protected]>
Co-authored-by: Ho <[email protected]>
lispc added a commit that referenced this pull request Sep 5, 2024
…hanges (#1392)

* [Feat] Optimize zktrieState with flatten proofs (#1388)

* induce "query" mode for building sdb

Signed-off-by: noelwei <[email protected]>

* switch zktrie dep

Signed-off-by: noelwei <[email protected]>

* induce flatten proof and integration test

Signed-off-by: noelwei <[email protected]>

* update zk_dep
use key cache

* fix test issue

* update zktrie dep

* induce mpt state updating

* fix issue in chunk building

---------

Signed-off-by: noelwei <[email protected]>

* update zktrie

* use v0.8 for zktrie

* use v0.9 for zktrie

* update cargo lock

---------

Signed-off-by: noelwei <[email protected]>
Co-authored-by: Ho <[email protected]>
lispc added a commit that referenced this pull request Sep 10, 2024
…hanges (#1392)

* [Feat] Optimize zktrieState with flatten proofs (#1388)

* induce "query" mode for building sdb

Signed-off-by: noelwei <[email protected]>

* switch zktrie dep

Signed-off-by: noelwei <[email protected]>

* induce flatten proof and integration test

Signed-off-by: noelwei <[email protected]>

* update zk_dep
use key cache

* fix test issue

* update zktrie dep

* induce mpt state updating

* fix issue in chunk building

---------

Signed-off-by: noelwei <[email protected]>

* update zktrie

* use v0.8 for zktrie

* use v0.9 for zktrie

* update cargo lock

---------

Signed-off-by: noelwei <[email protected]>
Co-authored-by: Ho <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants