-
Notifications
You must be signed in to change notification settings - Fork 4
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
Statediffing mode for specific contract proofs #29
Comments
#29) * adding action to publish image to dockerhub on merge to testnet
I will double check this is satisfied |
@AFDudley @ashwinphatak I don't think this is currently satisfied, if we watch a set of addresses the builder only diffs leaf nodes: https://github.com/vulcanize/go-ethereum/blob/v1.10.18-statediff-4.0.2-alpha/statediff/builder.go#L173 And rather than just a potentially vestigial comment, here is the code: Only in Instead, what we want is that when we specify a list of watched addresses we can diff only those associated leaf nodes and all the intermediate nodes along the paths to them (required to prove them). Seems there are two approaches to this:
2 would be a huge boon to performance as we would avoid traversing portions of the difference trie that we aren't actually interested in (instead of waiting til we get to a leaf to find out we didn't need to walk all the way down to said leaf). |
@i-norden The suggested approach in cerc-io/ipld-eth-state-snapshot#46 (comment) to limit the trie traversal only to paths that lead to watched addresses requires the ability to restrict the descent down the trie when required. In state trie iteration, this is allowed by the However, I think that checking paths as prefix for filtering out nodes is still a simpler approach than using a stack to hold on to intermediate nodes. |
Further optimization tracked in #252 |
Mode for the statediffing service that returns a state object with only the nodes required for accessing and proving data in the specified contract(s)
Provided a set of contract addresses, we want to:
Iterate down state trie only along paths to leaf nodes for the provided contracts, collecting all of the nodes along this path (which are required for generating a proof against the state root hash)
Iterate through the entire storage tries for these contracts, producing complete statediff objects for the specified contracts only
Unit and integration tests
Support both ipld-eth-indexer endpoints and direct indexing from inside geth (should be able to use same database)
The text was updated successfully, but these errors were encountered: