Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
56de6f1
fix
xqft Dec 5, 2025
ca33776
first impl
xqft Dec 8, 2025
b6b7fe8
implementr get and authenticate
xqft Dec 8, 2025
c356751
adapt to guest
xqft Dec 8, 2025
45fb925
temp: dbg
xqft Dec 8, 2025
afc6c06
temp: dbg
xqft Dec 8, 2025
3977c10
temp: dbg
xqft Dec 8, 2025
c8883f1
fix rlp
xqft Dec 8, 2025
b344fe4
remove dbg
xqft Dec 8, 2025
3e77e64
fix ext
xqft Dec 8, 2025
4161895
fix branch get
xqft Dec 9, 2025
31479b4
fix ext prefix decoding
xqft Dec 9, 2025
c83dcb5
fix decoding
xqft Dec 9, 2025
f7bd2ce
add value to branch
xqft Dec 9, 2025
ae0d662
tmp debug
xqft Dec 9, 2025
0645fcf
tmp debug
xqft Dec 9, 2025
e760ed4
dng
xqft Dec 9, 2025
b1ec442
tmp debug
xqft Dec 9, 2025
5149614
dbg
xqft Dec 9, 2025
1d9b00f
Merge branch 'sp1_fix_g1_mul' into zerocopy_trie
xqft Dec 10, 2025
4d282db
WIP
xqft Dec 11, 2025
b413ba0
WIP
xqft Dec 12, 2025
29357f5
fix extension case
xqft Dec 12, 2025
f5259ae
wip apply_account_updates
xqft Dec 12, 2025
2c38938
remove dbg
xqft Dec 12, 2025
780403f
wip remove
xqft Dec 12, 2025
e389bd9
add remove
xqft Dec 12, 2025
235b38c
finish apply_account_updates
xqft Dec 12, 2025
47bde10
fix extension child decoding
xqft Dec 12, 2025
5a37a3c
generalize put_extension
xqft Dec 12, 2025
7cf19be
change insert case for extension
xqft Dec 12, 2025
2d5b272
generalize put_branch
xqft Dec 12, 2025
7e0e0bc
remove child assumption
xqft Dec 12, 2025
6c9e6c1
uncomment validate state root
xqft Dec 12, 2025
8b165d2
Revert "uncomment validate state root"
xqft Dec 12, 2025
37fa9cb
more robust proptest
xqft Dec 12, 2025
e5788fd
fmt
xqft Dec 12, 2025
d446390
Merge branch 'main' into zerocopy_trie
xqft Dec 12, 2025
b5b8a3f
authenticate
xqft Dec 12, 2025
1e80ced
Revert "Revert "uncomment validate state root""
xqft Dec 12, 2025
34f67df
authenticate storage
xqft Dec 12, 2025
2574964
use root_hash()
xqft Dec 12, 2025
a85c367
clear removed storage trie
xqft Dec 12, 2025
64c4bac
Revert "clear removed storage trie"
xqft Dec 12, 2025
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
11 changes: 7 additions & 4 deletions crates/blockchain/blockchain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ use ethrex_rlp::encode::RLPEncode;
use ethrex_storage::{
AccountUpdatesList, Store, UpdateBatch, error::StoreError, hash_address, hash_key,
};
use ethrex_trie::flattrie::FlatTrie;
use ethrex_trie::node::{BranchNode, ExtensionNode};
use ethrex_trie::{Nibbles, Node, NodeRef, Trie};
use ethrex_vm::backends::levm::db::DatabaseLogger;
Expand Down Expand Up @@ -988,7 +989,7 @@ impl Blockchain {
} else {
Trie::new_temp()
};
let mut storage_trie_roots = BTreeMap::new();
let mut storage_tries = BTreeMap::new();
for key in &keys {
if key.len() != 20 {
continue; // not an address
Expand All @@ -1011,16 +1012,18 @@ impl Blockchain {
"execution witness does not contain non-empty storage trie".to_string(),
));
};
storage_trie_roots.insert(address, (*node).clone());
storage_tries.insert(address, FlatTrie::from(&(*node)));
}

let state_trie = state_trie_root.map(|n| FlatTrie::from(&n));

Ok(ExecutionWitness {
codes,
block_headers_bytes,
first_block_number: first_block_header.number,
chain_config: self.storage.get_chain_config(),
state_trie_root,
storage_trie_roots,
state_trie,
storage_tries,
keys,
})
}
Expand Down
Loading
Loading