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: build state trie from proofs in host instead #40

Merged
merged 1 commit into from
Sep 9, 2024

Conversation

xJonathanLEI
Copy link
Contributor

@xJonathanLEI xJonathanLEI commented Sep 9, 2024

Moves the trie building process (from proofs) from the client to the host. The client now only verifies the root before and after the state transition. This saves a lot of cycles as the trie building process is expensive.

As a result, the account/storage loading logic has also been rewritten, since the proofs are no longer passed into the client. Instead, the client receive "state requests" which contains keys (i.e. addresses/ slots), with the actual values read from the trie.

Also switches to use the MPT implementation from zeth in rsp-mpt.

For the block tested of 20600000, the cycle count drops from 759,763,136 to 417,218,608 by 45.08%.

Moves the trie building process (from proofs) from the client to the
host. The client now only verifies the root before and after the state
transition. This saves a lot of cycles as the trie building process
is expensive.

As a result, the account/storage loading logic has also been rewritten,
since the proofs are no longer passed into the client. Instead, the
client receive "state requests" which contains keys (i.e. addresses/
slots), with the actual values read from the trie.

Also switches to use the MPT implementation from `zeth` in `rsp-mpt`.
@xJonathanLEI xJonathanLEI merged commit 2f2f1d9 into succinctlabs:main Sep 9, 2024
2 checks passed
@xJonathanLEI xJonathanLEI deleted the dev/host_trie branch September 9, 2024 19:49
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