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(client/host): Remove debug_dbGet dependency #235

Open
clabby opened this issue Jun 11, 2024 · 3 comments
Open

feat(client/host): Remove debug_dbGet dependency #235

clabby opened this issue Jun 11, 2024 · 3 comments
Labels
A-client Area: client binary A-host Area: host binary K-feature Kind: feature M-help-wanted Meta: Extra attention is needed

Comments

@clabby
Copy link
Collaborator

clabby commented Jun 11, 2024

Overview

Currently, we have a dependency on hash-scheme geth's debug_dbGet endpoint to fetch specific trie node preimages by hash. For the most part, eth_getProof gives us what we need, except for in the special case of trie node deletions where a branch with one remaining child needs to be compacted.

Unless overlooking something, we will still need some sort of trie-node-preimage-by-hash fetcher, though we should explore options that are more robust.

Brainstorm

  • reth execution extension to index changed trie nodes
    • Only store merkle diffs; key by path. We should be able to consult the state at tip for trie paths that have not been altered within or after the block at which the trie path is being queried.
@clabby clabby added M-help-wanted Meta: Extra attention is needed K-feature Kind: feature A-host Area: host binary A-client Area: client binary labels Jun 11, 2024
@clabby clabby modified the milestones: Phase 3: Kona Client & Host, Phase 5: Nice to Have Jun 11, 2024
@refcell refcell removed this from the Maintenance: Nice to Have milestone Aug 9, 2024
@hashcashier
Copy link
Contributor

Dropping dbGet would be very nice to have right now. It's very much in the way of testing against mainnet/sepolia blocks.

In zeth, we used inclusion proofs from before and after execution to get around this issue:
https://github.com/risc0/zeth/blob/079d1a077280f4108ec2612dfa7f34160567b52c/lib/src/host/preflight.rs#L282C4-L282C19

@mahmudsudo
Copy link

hi , can i take on this ?

@clabby
Copy link
Collaborator Author

clabby commented Nov 5, 2024

hi , can i take on this ?

Hi @mahmudsudo! This issue is currently being worked on over in op-reth and op-geth, as we need a new endpoint for state witness access first. Once we have that, we'll standardize the hint-route we use for the op-program and kona.

Once the endpoints are ready to go, I'll ping this issue with details on how we can implement it in kona.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-client Area: client binary A-host Area: host binary K-feature Kind: feature M-help-wanted Meta: Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants