You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// 2. Get all code hashes that exist in the accounts that we have so that if we don't have the code we set it to empty bytes.
480
482
// We do these things because sometimes the witness may be incomplete and in those cases we don't want failures for missing data.
481
483
// This only applies when we use the InMemoryDatabase and not when we use the ExecutionWitness as database, that's because in the latter failures are dismissed and we fall back to default values.
482
-
letmut nodes = state_trie_nodes.lock().unwrap();
483
-
letmut referenced_node_hashes:HashSet<NodeHash> = HashSet::new();// All hashes referenced in the trie (by Branch or Ext nodes).
let storage_trie = matchInMemoryTrieDB::from_nodes(storage_root, all_nodes){
547
528
Ok(trie) => trie.inner,
548
529
Err(_) => continue,
549
530
};
550
531
532
+
// Fill storage trie with dummy branch nodes that have the hash of the missing nodes
533
+
// This is useful for eth_getProofs when we want to restructure the trie after removing a node whose sibling isn't known
534
+
// We assume the sibling is a branch node because we already covered the cases in which it's a Leaf or Extension node by injecting nodes in the witness.
535
+
// For more info read: https://github.com/kkrt-labs/zk-pig/blob/v0.8.0/docs/modified-mpt.md
0 commit comments