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

perf: put dirties in cache and move to database when commit #30

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

FletcherMan
Copy link
Collaborator

@FletcherMan FletcherMan commented Aug 25, 2023

Descriptions

It is an optimization for handling the dirty data based on zk trie.

In current zktrie implementation, the dirty data produced by transactions will be directly stored in trie.database when executing IntermediateRoot function, which means these data will be flushed into diskDB eventually, even the corresponding block is not confirmed yet.

We introduced a cache map to store the dirties produced during the txs execution. And the cache will be flushed to database only when the trie is determined to be commit

@FletcherMan FletcherMan changed the base branch from morph/v0.0.1 to main August 28, 2023 01:26
@FletcherMan FletcherMan changed the base branch from main to morph/v0.0.1 August 28, 2023 01:28
@FletcherMan FletcherMan reopened this Aug 28, 2023
@FletcherMan FletcherMan changed the base branch from morph/v0.0.1 to main August 28, 2023 03:05
@FletcherMan FletcherMan changed the title put dirties in cache and move to database when commit [feat]put dirties in cache and move to database when commit Aug 28, 2023
@FletcherMan FletcherMan changed the title [feat]put dirties in cache and move to database when commit perf: put dirties in cache and move to database when commit Apr 12, 2024
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.

None yet

1 participant