Skip to content

Commit

Permalink
Merge pull request #31 from mir-protocol/update_gen_inputs
Browse files Browse the repository at this point in the history
Add trie roots to generation inputs
  • Loading branch information
wborgeaud authored Aug 11, 2023
2 parents 64c0d69 + d0dd135 commit bf4de16
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions common/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ use std::{
};

use anyhow::{anyhow, Context};
use eth_trie_utils::partial_trie::{HashedPartialTrie, Node, PartialTrie};
use ethereum_types::{Address, H256};
use plonky2_evm::proof::TrieRoots;
use plonky2_evm::{
generation::{GenerationInputs, TrieInputs},
proof::BlockMetadata,
Expand Down Expand Up @@ -58,9 +60,15 @@ impl ParsedTestManifest {
None => true,
})
.map(|(variant_idx, (t_var, revm_variant))| {
let trie_roots_after = TrieRoots {
state_root: t_var.common.expected_final_account_state_root_hash,
transactions_root: HashedPartialTrie::from(Node::Empty).hash(), // TODO: Fix this when we have transactions trie.
receipts_root: HashedPartialTrie::from(Node::Empty).hash(), // TODO: Fix this when we have receipts trie.
};
let gen_inputs = GenerationInputs {
signed_txns: vec![t_var.txn_bytes],
tries: self.plonky2_variants.const_plonky2_inputs.tries.clone(),
trie_roots_after,
contract_code: self
.plonky2_variants
.const_plonky2_inputs
Expand Down

0 comments on commit bf4de16

Please sign in to comment.