-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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(rpc): add preimages to execution witness response #10456
Conversation
5c9158f
to
8df597a
Compare
crates/rpc/rpc/src/debug.rs
Outdated
@@ -659,6 +667,9 @@ where | |||
let witness = state_provider | |||
.witness(HashedPostState::default(), hashed_state) | |||
.map_err(Into::into)?; | |||
|
|||
// TODO(alexey): return `state_preimages` as well when https://github.com/alloy-rs/alloy/pull/1178 is released |
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.
lets add a follow up issue to track
crates/rpc/rpc/src/debug.rs
Outdated
state_preimages.insert(hashed_address, alloy_rlp::encode(address)); | ||
|
||
for (slot, value) in account.storage { | ||
let hashed_slot = keccak256(B256::from(slot)); | ||
let slot = B256::from(slot); | ||
let hashed_slot = keccak256(slot); | ||
storage.storage.insert(hashed_slot, value); | ||
|
||
state_preimages.insert(hashed_slot, alloy_rlp::encode(slot)); |
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.
ideally i'd want to reuse HashedPostState::from_cache_state
for this, but no need to tackle here
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.
right, but you'd need to walk the cache state anyway because HashedPostState
won't contain pre-images, no?
crates/rpc/rpc/src/debug.rs
Outdated
@@ -659,6 +667,9 @@ where | |||
let witness = state_provider | |||
.witness(HashedPostState::default(), hashed_state) | |||
.map_err(Into::into)?; | |||
|
|||
// TODO(alexey): return `state_preimages` as well when https://github.com/alloy-rs/alloy/pull/1178 is released |
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.
let's maybe wait for the release? otherwise, it's collecting preimages for no reason
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.
sg
blocked by alloy release w/ alloy-rs/alloy#1178 |
Alloy release just happened, cc @rkrasiuk |
Closes #10404