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

chore(rpc): rename witness fields #1293

Merged
merged 2 commits into from
Sep 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions crates/rpc-types-debug/src/debug.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,12 @@ use std::collections::HashMap;
pub struct ExecutionWitness {
/// Map of all hashed trie nodes to their preimages that were required during the execution of
/// the block, including during state root recomputation.
pub witness: HashMap<B256, Bytes>,
/// Map of all hashed account addresses and storage slots to their preimages (unhashed account
/// addresses and storage slots, respectively) that were required during the execution of the
/// block. during the execution of the block.
pub state_preimages: Option<HashMap<B256, Bytes>>,
/// keccak(rlp(node)) => rlp(node)
pub state: HashMap<B256, Bytes>,
/// Map of all hashed account and storage keys (addresses and slots) to their preimages
Copy link
Contributor

@0x00101010 0x00101010 Sep 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add codes here as well? 🙏 It will be needed per our discussion in the thread

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can add those separately once we resolve some questions regarding compatibility

/// (unhashed account addresses and storage slots, respectively) that were required during
/// the execution of the block. during the execution of the block.
/// keccak(address|slot) => address|slot
#[serde(default)]
pub keys: Option<HashMap<B256, Bytes>>,
}