-
Notifications
You must be signed in to change notification settings - Fork 0
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
Get Proof implementation #2128
base: main
Are you sure you want to change the base?
Get Proof implementation #2128
Conversation
Bencher Report
Click to view all benchmark results
|
return Ok(Proof::default()); | ||
}; | ||
|
||
// get_proof() requires &mut so clone state and don't mutate the origin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not make this &mut self
instead? You already make a clone of it in the API implementation (by calling .at_root
).
let storage_proofs = { | ||
let mut storage_proofs = Vec::new(); | ||
for key in storage_keys { | ||
let key = Self::account_storage_key(address, *key); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@DrZoltanFazekas Are we happy that this exposes our trie encoding as part of our external API (and thus makes it hard to ever change it)?
I ask because I don't think we are encoding things into the trie the same way as Ethereum does and thus there's no guarantee that what we're doing is sensible.
This PR introduces eth_getProof implementation.