From 5040655ef14d182a10220b63990010aaf100a20a Mon Sep 17 00:00:00 2001 From: BGluth Date: Mon, 27 Feb 2023 10:23:18 -0700 Subject: [PATCH 1/3] Temp hack for filling in the expected state trie hash - Just to get things going, sets the expected state trie hash to the hash in the first entry in merge. This is fine for tests with one txn variant, but incorrect for ones with multiple. Will fix soon. --- Cargo.lock | 4 ++-- eth_test_parser/src/main.rs | 5 ++++- evm_test_runner/Cargo.toml | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c5e0b3d..8ce4649 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1485,9 +1485,9 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "plonky2" -version = "0.1.1" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3cf672134f7f79739b0511f5abcfd110add584f2658d70be0cfb39ef0957d0a1" +checksum = "d2a3d3069fc716f2733c4bafeaf57c256e507f0a599fc206f41ef273568ca2b7" dependencies = [ "ahash", "anyhow", diff --git a/eth_test_parser/src/main.rs b/eth_test_parser/src/main.rs index a7e9971..c3c2d0a 100644 --- a/eth_test_parser/src/main.rs +++ b/eth_test_parser/src/main.rs @@ -46,11 +46,14 @@ async fn run(ProgArgs { no_fetch, out_path }: ProgArgs) -> anyhow::Result<()> { let generation_input_handles = get_deserialized_test_bodies()?.filter_map(|res| { match res { Ok((test_dir_entry, test_body)) => Some(tokio::task::spawn_blocking(move || { + // TODO: For now if there are multiple txns, we are just going to process the + // first one. Later we will switch to processing all txns in the text. + let state_trie_hash = test_body.post.merge[0].hash; ( test_dir_entry, serde_cbor::to_vec(&ParsedTest { plonky2_inputs: test_body.into_generation_inputs(), - expected_final_account_states: None, + expected_final_account_states: Some(state_trie_hash), }) .unwrap(), ) diff --git a/evm_test_runner/Cargo.toml b/evm_test_runner/Cargo.toml index ff75636..838277c 100644 --- a/evm_test_runner/Cargo.toml +++ b/evm_test_runner/Cargo.toml @@ -9,7 +9,7 @@ edition = "2021" [dependencies] common = { path = "../common" } -plonky2 = { version = "0.1.1", features = ["timing"] } +plonky2 = { version = "0.1.3", features = ["timing"] } plonky2_evm = { git = "https://github.com/mir-protocol/plonky2.git", rev = "6f2d99c7bce0728aff0374cf6bddff6c08b409ba" } anyhow = { version = "1.0", features = ["backtrace"] } From 7d8eb54a384b176704cf20e8d588bf20c79928a4 Mon Sep 17 00:00:00 2001 From: BGluth Date: Mon, 27 Feb 2023 10:30:07 -0700 Subject: [PATCH 2/3] Comment fix --- eth_test_parser/src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eth_test_parser/src/main.rs b/eth_test_parser/src/main.rs index c3c2d0a..af6d0c0 100644 --- a/eth_test_parser/src/main.rs +++ b/eth_test_parser/src/main.rs @@ -46,8 +46,8 @@ async fn run(ProgArgs { no_fetch, out_path }: ProgArgs) -> anyhow::Result<()> { let generation_input_handles = get_deserialized_test_bodies()?.filter_map(|res| { match res { Ok((test_dir_entry, test_body)) => Some(tokio::task::spawn_blocking(move || { - // TODO: For now if there are multiple txns, we are just going to process the - // first one. Later we will switch to processing all txns in the text. + // TODO: For now if there are multiple txn variants, we're just going to pick + // the first one. Later we will switch to processing all txns in the test. let state_trie_hash = test_body.post.merge[0].hash; ( test_dir_entry, From bc4fcdb7fe2a7b32ed137c5641a80d800b609889 Mon Sep 17 00:00:00 2001 From: BGluth Date: Mon, 27 Feb 2023 10:34:37 -0700 Subject: [PATCH 3/3] Bumped `plonky2_evm` dep --- Cargo.lock | 2 +- common/Cargo.toml | 2 +- eth_test_parser/Cargo.toml | 2 +- evm_test_runner/Cargo.toml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8ce4649..a1e22f0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1509,7 +1509,7 @@ dependencies = [ [[package]] name = "plonky2_evm" version = "0.1.0" -source = "git+https://github.com/mir-protocol/plonky2.git?rev=6f2d99c7bce0728aff0374cf6bddff6c08b409ba#6f2d99c7bce0728aff0374cf6bddff6c08b409ba" +source = "git+https://github.com/mir-protocol/plonky2.git?rev=5aafbaad491b89805b649650131ab80ee8c79605#5aafbaad491b89805b649650131ab80ee8c79605" dependencies = [ "anyhow", "blake2", diff --git a/common/Cargo.toml b/common/Cargo.toml index 829b2fa..54daa97 100644 --- a/common/Cargo.toml +++ b/common/Cargo.toml @@ -11,5 +11,5 @@ edition = "2021" ethereum-types = "0.14.0" eth_trie_utils = "0.4.1" flexi_logger = { version = "0.25.1", features = ["async"] } -plonky2_evm = { git = "https://github.com/mir-protocol/plonky2.git", rev = "6f2d99c7bce0728aff0374cf6bddff6c08b409ba" } +plonky2_evm = { git = "https://github.com/mir-protocol/plonky2.git", rev = "5aafbaad491b89805b649650131ab80ee8c79605" } serde = {version = "1.0.147", features = ["derive"] } diff --git a/eth_test_parser/Cargo.toml b/eth_test_parser/Cargo.toml index f2e5211..df2d0df 100644 --- a/eth_test_parser/Cargo.toml +++ b/eth_test_parser/Cargo.toml @@ -10,7 +10,7 @@ edition = "2021" [dependencies] common = { path = "../common" } eth_trie_utils = "0.4.1" -plonky2_evm = { git = "https://github.com/mir-protocol/plonky2.git", rev = "6f2d99c7bce0728aff0374cf6bddff6c08b409ba" } +plonky2_evm = { git = "https://github.com/mir-protocol/plonky2.git", rev = "5aafbaad491b89805b649650131ab80ee8c79605" } anyhow = { version = "1.0.66", features = ["backtrace"] } clap = {version = "4.0.19", features = ["derive"] } diff --git a/evm_test_runner/Cargo.toml b/evm_test_runner/Cargo.toml index 838277c..5972a7e 100644 --- a/evm_test_runner/Cargo.toml +++ b/evm_test_runner/Cargo.toml @@ -10,7 +10,7 @@ edition = "2021" [dependencies] common = { path = "../common" } plonky2 = { version = "0.1.3", features = ["timing"] } -plonky2_evm = { git = "https://github.com/mir-protocol/plonky2.git", rev = "6f2d99c7bce0728aff0374cf6bddff6c08b409ba" } +plonky2_evm = { git = "https://github.com/mir-protocol/plonky2.git", rev = "5aafbaad491b89805b649650131ab80ee8c79605" } anyhow = { version = "1.0", features = ["backtrace"] } askama = "0.11.1"