From bcb3afe2a4248a6e82445bdc99513d16312ef010 Mon Sep 17 00:00:00 2001 From: wborgeaud Date: Thu, 10 Aug 2023 12:37:45 +0200 Subject: [PATCH 1/2] Update GenerationInputs --- common/src/types.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/common/src/types.rs b/common/src/types.rs index 5ff61f3..7ef4b0c 100644 --- a/common/src/types.rs +++ b/common/src/types.rs @@ -5,11 +5,13 @@ use std::{ }; use anyhow::{anyhow, Context}; +use eth_trie_utils::partial_trie::{HashedPartialTrie, Node, PartialTrie}; use ethereum_types::{Address, H256}; use plonky2_evm::{ generation::{GenerationInputs, TrieInputs}, proof::BlockMetadata, }; +use plonky2_evm::proof::TrieRoots; use serde::{Deserialize, Serialize}; use crate::revm::SerializableEVMInstance; @@ -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 From d0dd135bdb0edd920fa0774c554afe31f92aa39e Mon Sep 17 00:00:00 2001 From: wborgeaud Date: Thu, 10 Aug 2023 13:30:55 +0200 Subject: [PATCH 2/2] rustfmt --- common/src/types.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/src/types.rs b/common/src/types.rs index 7ef4b0c..1dec0fc 100644 --- a/common/src/types.rs +++ b/common/src/types.rs @@ -7,11 +7,11 @@ 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, }; -use plonky2_evm::proof::TrieRoots; use serde::{Deserialize, Serialize}; use crate::revm::SerializableEVMInstance;