-
Notifications
You must be signed in to change notification settings - Fork 106
fix(replay): fix execution with eth_getProof #4616
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
Merged
Merged
Changes from all commits
Commits
Show all changes
79 commits
Select commit
Hold shift + click to select a range
9565da9
initial steps for replay with add block
JereSalo 0c45d47
add a lot of prints...
JereSalo fb7928d
add more prints i guess
JereSalo 8dfe9c6
add no backend to replayer
JereSalo 49b098c
fix some stuff regarding rlp encoding
JereSalo 53eaa3d
merge main
JereSalo fec2842
start with storage stuff
JereSalo 299a513
add fix for mistake
JereSalo b22f7ca
comment a lot of prints that i use for debugging
JereSalo a47d427
tidy up code and improve genesis stuff
JereSalo 5fc0e2f
remove prints
JereSalo baac10a
add prints of time
JereSalo 7337926
remove 0x80 for reth nodes and add some prints commented
JereSalo 29c8d4d
uncomment stuff
JereSalo b0d8b66
improve getting embedded root
JereSalo a19bf66
improve code quality
JereSalo e148f8f
improve code quality
JereSalo bfb3462
remove some stuff
JereSalo 232096a
remove a lot of prints
JereSalo c8ff6cd
make improvements in code
JereSalo 58959a8
leave a todo
JereSalo 0cb25c5
add feature no backend to replayer
JereSalo bc898c7
modify cargo.toml
JereSalo 161eb80
stop using hashed address fixed
JereSalo 8d089d8
change comment
JereSalo f0a38fb
add replay feature flag
JereSalo 50c85ef
remove todo
JereSalo a2aa4a3
add help to no_backend
JereSalo 93acd40
merge main
JereSalo 8a9be6c
fix clippy lint
JereSalo 8e38d87
merge main
JereSalo b170ef3
add docs
JereSalo 1c04c6e
remove clone chain config
JereSalo dd6eee3
change something in replayer_mode
JereSalo 371d755
remove some unwraps
JereSalo 9dd5334
replace unnecessary unwraps
JereSalo 9f8324e
replace no-backend for no-zkvm
JereSalo ce55287
merge replay add fallback
JereSalo 74db98c
merge main
JereSalo 2bdb387
remove more references to prover backend
JereSalo a87c935
merge main
JereSalo c29eea5
remove into
JereSalo 9bbbe7f
Revert "add replay feature flag"
JereSalo ef52f4d
start debugging
JereSalo dd97748
try inserting an arbitrary node in the trie
JereSalo 0d0f03a
comment some stuff
JereSalo ccd80ad
comment some stuff
JereSalo eafecad
make some improvements in debugging
JereSalo 3b18de9
first iteration that works I think
JereSalo 0ec9838
remove commented prints
JereSalo f08cc7d
tidy code
JereSalo 1e2cd88
tidy the code a bit more
JereSalo 48f6d6e
remove added stuff
JereSalo 530b998
improve code quality
JereSalo fdb829f
improve code quality part 10
JereSalo 0baf727
keep on improving code
JereSalo e46ae23
Merge branch 'main' into replay_add_block
JereSalo 7574c7b
add inner block because replayer wont compile otherwise
JereSalo cd9a580
clippy lint
JereSalo c1d39a9
Merge branch 'main' into replay_add_block
JereSalo ddc2f7b
remove unwant empty nodes
JereSalo 7f07512
Merge branch 'replay_add_block' of github.com:lambdaclass/ethrex into…
JereSalo a8747b6
remove it
JereSalo 5382c50
propagate error
JereSalo 301829e
chain the ifs in chain config
JereSalo 69fc90c
insert to state nodes
JereSalo 254eaa8
quick and dirty fix
JereSalo b5447ad
improve some code
JereSalo 1b076c7
improve code hash thing
JereSalo ecf6dc6
improve code quality
JereSalo 7cad88a
add some comments
JereSalo 182f298
merge main
JereSalo 3ec04b2
Update cmd/ethrex_replay/src/cli.rs
JereSalo cd843f0
return error instead of unreachable
JereSalo d68ce59
merge main
JereSalo 53ccee6
Merge branch 'main' into debugging_eth_getProof
JereSalo c2a9e37
Merge branch 'main' into debugging_eth_getProof
JereSalo b243784
Merge branch 'main' into debugging_eth_getProof
JereSalo fe773e6
Merge branch 'main' into debugging_eth_getProof
JereSalo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
use std::collections::{BTreeMap, HashSet}; | ||
|
||
use ethrex_rlp::decode::RLPDecode; | ||
use ethrex_trie::{Node, NodeHash, NodeRef}; | ||
|
||
/// Given a mapping of nodes with their corresponding hash get all hashes referenced by branch and extension nodes. | ||
pub fn get_referenced_hashes( | ||
nodes: &BTreeMap<NodeHash, Vec<u8>>, | ||
) -> eyre::Result<HashSet<NodeHash>> { | ||
let mut referenced_hashes: HashSet<NodeHash> = HashSet::new(); | ||
|
||
for (_node_hash, node_rlp) in nodes.iter() { | ||
let node = Node::decode(node_rlp)?; | ||
match node { | ||
Node::Branch(node) => { | ||
for choice in &node.choices { | ||
if let NodeRef::Hash(hash) = *choice { | ||
referenced_hashes.insert(hash); | ||
} else { | ||
return Err(eyre::eyre!("Branch node contains non-hash reference")); | ||
} | ||
} | ||
} | ||
Node::Extension(node) => { | ||
if let NodeRef::Hash(hash) = node.child { | ||
referenced_hashes.insert(hash); | ||
} else { | ||
return Err(eyre::eyre!("Extension node contains non-hash reference")); | ||
} | ||
} | ||
Node::Leaf(_node) => {} | ||
} | ||
} | ||
|
||
Ok(referenced_hashes) | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,4 +45,3 @@ path = "./trie.rs" | |
[[bench]] | ||
name = "trie_bench" | ||
harness = false | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.