├── .gitignore ├── rust-toolchain.toml ├── Cargo.toml ├── evm ├── rust-toolchain.toml ├── Cargo.toml ├── src │ ├── utils.rs │ └── lib.rs └── Cargo.lock ├── models ├── src │ ├── serializer.rs │ ├── deserializer.rs │ ├── spec.rs │ └── lib.rs └── Cargo.toml ├── bin ├── Cargo.toml └── src │ └── main.rs ├── README.md └── accessListExample.json /.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | evm/target 3 | -------------------------------------------------------------------------------- /rust-toolchain.toml: -------------------------------------------------------------------------------- 1 | [toolchain] 2 | channel = "1.77" 3 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [workspace] 2 | 3 | resolver = "2" 4 | 5 | members = ["bin", "models"] 6 | default-members = ["bin"] 7 | -------------------------------------------------------------------------------- /evm/rust-toolchain.toml: -------------------------------------------------------------------------------- 1 | [toolchain] 2 | channel = "nightly" 3 | targets = ["riscv32imac-unknown-none-elf"] 4 | profile = "minimal" 5 | -------------------------------------------------------------------------------- /models/src/serializer.rs: -------------------------------------------------------------------------------- 1 | use alloc::format; 2 | use serde::Serializer; 3 | 4 | pub fn serialize_u64_as_str(v: &u64, serializer: S) -> Result 5 | where 6 | S: Serializer, 7 | { 8 | let sv = format!("0x{:x}", v); 9 | serializer.serialize_str(&sv) 10 | } 11 | -------------------------------------------------------------------------------- /bin/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "bin" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [dependencies] 7 | powdr = { git = "https://github.com/powdr-labs/powdr", branch = "main" } 8 | 9 | env_logger = "0.10.2" 10 | walkdir = "2.4.0" 11 | clap = { version = "^4.4", features = ["derive"] } 12 | log = "0.4.17" 13 | -------------------------------------------------------------------------------- /models/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "models" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [dependencies] 7 | revm = { git = "https://github.com/powdr-labs/revm", branch = "serde-no-std", default-features = false, features = [ "serde" ] } 8 | 9 | serde = { version = "1.0", default-features = false, features = ["alloc", "derive", "rc"] } 10 | serde_json = { version = "1.0", default-features = false, features = ["alloc"] } 11 | -------------------------------------------------------------------------------- /evm/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "evm" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [dependencies] 7 | powdr-riscv-runtime = { git = "https://github.com/powdr-labs/powdr", branch = "main" } 8 | revm = { git = "https://github.com/powdr-labs/revm", branch = "serde-no-std", default-features = false, features = [ "serde" ] } 9 | 10 | models = { path = "../models" } 11 | serde = { version = "1.0", default-features = false, features = ["alloc", "derive", "rc"] } 12 | serde_json = { version = "1.0", default-features = false, features = ["alloc"] } 13 | k256 = { version = "0.13.3", features = ["ecdsa"], default-features = false } 14 | 15 | # TODO can be removed once the powdr RISCV nightly is updated 16 | ahash = { version = "=0.8.6", default-features = false } 17 | 18 | [workspace] 19 | -------------------------------------------------------------------------------- /evm/src/utils.rs: -------------------------------------------------------------------------------- 1 | use k256::ecdsa::SigningKey; 2 | use revm::primitives::Address; 3 | 4 | /// Recover the address from a private key (SigningKey). 5 | pub fn recover_address(private_key: &[u8]) -> Option
{ 6 | let key = SigningKey::from_slice(private_key).ok()?; 7 | let public_key = key.verifying_key().to_encoded_point(false); 8 | Some(Address::from_raw_public_key(&public_key.as_bytes()[1..])) 9 | } 10 | 11 | #[cfg(test)] 12 | mod tests { 13 | use super::*; 14 | use revm::primitives::{address, hex}; 15 | 16 | #[test] 17 | fn sanity_test() { 18 | assert_eq!( 19 | Some(address!("a94f5374fce5edbc8e2a8697c15331677e6ebf0b")), 20 | recover_address(&hex!( 21 | "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8" 22 | )) 23 | ) 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /models/src/deserializer.rs: -------------------------------------------------------------------------------- 1 | use revm::primitives::Address; 2 | use serde::{de, Deserialize}; 3 | 4 | use alloc::string::String; 5 | 6 | pub fn deserialize_str_as_u64<'de, D>(deserializer: D) -> Result 7 | where 8 | D: de::Deserializer<'de>, 9 | { 10 | let string = String::deserialize(deserializer)?; 11 | 12 | if let Some(stripped) = string.strip_prefix("0x") { 13 | u64::from_str_radix(stripped, 16) 14 | } else { 15 | string.parse() 16 | } 17 | .map_err(serde::de::Error::custom) 18 | } 19 | 20 | pub fn deserialize_maybe_empty<'de, D>(deserializer: D) -> Result, D::Error> 21 | where 22 | D: de::Deserializer<'de>, 23 | { 24 | let string = String::deserialize(deserializer)?; 25 | if string.is_empty() { 26 | Ok(None) 27 | } else { 28 | string.parse().map_err(de::Error::custom).map(Some) 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # powdr-revme 2 | 3 | This repository uses [powdr](https://github.com/powdr-labs/powdr) as a library 4 | to make ZK proofs for the [Ethereum tests](https://github.com/ethereum/tests) 5 | via [revm](https://github.com/bluealloy/revm). It is meant as test- and 6 | benchmark-bed for powdr and provers. 7 | 8 | Please see the [powdr docs](https://docs.powdr.org) for basic instructions on 9 | how to use powdr as a library. 10 | 11 | # Usage 12 | 13 | ```help 14 | Usage: bin [OPTIONS] --test 15 | 16 | Options: 17 | -t, --test 18 | -o, --output [default: .] 19 | -f, --fast-tracer 20 | -w, --witgen 21 | -p, --proofs 22 | -h, --help Print help 23 | ``` 24 | 25 | Checkout the [Ethereum tests](https://github.com/ethereum/tests). The only 26 | argument required is the test path. The path may be a single file or a 27 | directory. If only the path is given, powdr only compiles the Rust code all 28 | the way to powdr-PIL. The fast tracer is a powdr-IR executor that is useful 29 | for quick checks. Witness generation (witgen) creates the witness required for 30 | proofs. Proofs have not been added to this repo yet. 31 | 32 | Example running only the fast tracer: 33 | 34 | ```bash 35 | cargo run -r -- -t tests/accessListExample.json -f 36 | ``` 37 | 38 | # Crates 39 | 40 | This repo contains 3 crates: 41 | 42 | - `bin`: the main binary, meant to run natively. It reads the given tests and 43 | manages calls to powdr. 44 | - `evm`: the code we want to make proofs for. It deserializes a test suite, 45 | runs revm, and asserts that the test expectation is met. Most of the code 46 | here comes from 47 | [revme](https://github.com/bluealloy/revm/blob/main/bins/revme/src/cmd/statetest/runner.rs#L214). 48 | - `models`: some data structures needed for test ser/derialization. This code 49 | comes from 50 | [revme](https://github.com/bluealloy/revm/tree/main/bins/revme/src/cmd/statetest/models). 51 | -------------------------------------------------------------------------------- /models/src/spec.rs: -------------------------------------------------------------------------------- 1 | use revm::primitives::SpecId; 2 | use serde::{Deserialize, Serialize}; 3 | 4 | #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Deserialize, Hash, Serialize)] 5 | pub enum SpecName { 6 | Frontier, 7 | FrontierToHomesteadAt5, 8 | Homestead, 9 | HomesteadToDaoAt5, 10 | HomesteadToEIP150At5, 11 | EIP150, 12 | EIP158, // EIP-161: State trie clearing 13 | EIP158ToByzantiumAt5, 14 | Byzantium, 15 | ByzantiumToConstantinopleAt5, // SKIPPED 16 | ByzantiumToConstantinopleFixAt5, 17 | Constantinople, // SKIPPED 18 | ConstantinopleFix, 19 | Istanbul, 20 | Berlin, 21 | BerlinToLondonAt5, 22 | London, 23 | Merge, 24 | Shanghai, 25 | Cancun, 26 | #[serde(other)] 27 | Unknown, 28 | } 29 | 30 | impl SpecName { 31 | pub fn to_spec_id(&self) -> SpecId { 32 | match self { 33 | Self::Frontier => SpecId::FRONTIER, 34 | Self::Homestead | Self::FrontierToHomesteadAt5 => SpecId::HOMESTEAD, 35 | Self::EIP150 | Self::HomesteadToDaoAt5 | Self::HomesteadToEIP150At5 => { 36 | SpecId::TANGERINE 37 | } 38 | Self::EIP158 => SpecId::SPURIOUS_DRAGON, 39 | Self::Byzantium | Self::EIP158ToByzantiumAt5 => SpecId::BYZANTIUM, 40 | Self::ConstantinopleFix | Self::ByzantiumToConstantinopleFixAt5 => SpecId::PETERSBURG, 41 | Self::Istanbul => SpecId::ISTANBUL, 42 | Self::Berlin => SpecId::BERLIN, 43 | Self::London | Self::BerlinToLondonAt5 => SpecId::LONDON, 44 | Self::Merge => SpecId::MERGE, 45 | Self::Shanghai => SpecId::SHANGHAI, 46 | Self::Cancun => SpecId::CANCUN, 47 | Self::ByzantiumToConstantinopleAt5 | Self::Constantinople => { 48 | panic!("Overridden with PETERSBURG") 49 | } 50 | Self::Unknown => panic!("Unknown spec"), 51 | } 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /models/src/lib.rs: -------------------------------------------------------------------------------- 1 | #![no_std] 2 | 3 | use revm::primitives::{Address, Bytes, HashMap, B256, U256}; 4 | use serde::{Deserialize, Serialize}; 5 | 6 | extern crate alloc; 7 | use alloc::collections::BTreeMap; 8 | use alloc::string::String; 9 | use alloc::vec::Vec; 10 | 11 | mod deserializer; 12 | use deserializer::*; 13 | mod serializer; 14 | use serializer::*; 15 | 16 | mod spec; 17 | pub use self::spec::SpecName; 18 | 19 | #[derive(Debug, PartialEq, Eq, Deserialize, Serialize)] 20 | pub struct TestSuite(pub BTreeMap); 21 | 22 | #[derive(Debug, PartialEq, Eq, Deserialize, Serialize)] 23 | #[serde(deny_unknown_fields)] 24 | pub struct TestUnit { 25 | /// Test info is optional 26 | #[serde(default, rename = "_info")] 27 | pub info: Option, 28 | pub env: Env, 29 | pub pre: HashMap, 30 | pub post: BTreeMap>, 31 | pub transaction: TransactionParts, 32 | #[serde(default)] 33 | pub out: Option, 34 | } 35 | 36 | /// State test indexed state result deserialization. 37 | #[derive(Debug, PartialEq, Eq, Deserialize, Serialize)] 38 | #[serde(rename_all = "camelCase", deny_unknown_fields)] 39 | pub struct Test { 40 | pub expect_exception: Option, 41 | 42 | /// Indexes 43 | pub indexes: TxPartIndices, 44 | /// Post state hash 45 | pub hash: B256, 46 | /// Post state 47 | #[serde(default)] 48 | pub post_state: HashMap, 49 | 50 | /// Logs root 51 | pub logs: B256, 52 | 53 | /// Tx bytes 54 | pub txbytes: Option, 55 | } 56 | 57 | #[derive(Debug, PartialEq, Eq, Deserialize, Serialize)] 58 | #[serde(rename_all = "camelCase", deny_unknown_fields)] 59 | pub struct TxPartIndices { 60 | pub data: usize, 61 | pub gas: usize, 62 | pub value: usize, 63 | } 64 | 65 | #[derive(Clone, Debug, PartialEq, Eq, Deserialize, Serialize)] 66 | #[serde(rename_all = "camelCase", deny_unknown_fields)] 67 | pub struct AccountInfo { 68 | pub balance: U256, 69 | pub code: Bytes, 70 | #[serde( 71 | deserialize_with = "deserialize_str_as_u64", 72 | serialize_with = "serialize_u64_as_str" 73 | )] 74 | pub nonce: u64, 75 | pub storage: HashMap, 76 | } 77 | 78 | #[derive(Debug, PartialEq, Eq, Deserialize, Serialize)] 79 | #[serde(rename_all = "camelCase", deny_unknown_fields)] 80 | pub struct Env { 81 | pub current_coinbase: Address, 82 | pub current_difficulty: U256, 83 | pub current_gas_limit: U256, 84 | pub current_number: U256, 85 | pub current_timestamp: U256, 86 | pub current_base_fee: Option, 87 | pub previous_hash: Option, 88 | 89 | pub current_random: Option, 90 | pub current_beacon_root: Option, 91 | pub current_withdrawals_root: Option, 92 | 93 | pub parent_blob_gas_used: Option, 94 | pub parent_excess_blob_gas: Option, 95 | pub current_excess_blob_gas: Option, 96 | } 97 | 98 | #[derive(Debug, Default, PartialEq, Eq, Serialize, Deserialize)] 99 | #[serde(rename_all = "camelCase", deny_unknown_fields)] 100 | pub struct TransactionParts { 101 | pub data: Vec, 102 | pub gas_limit: Vec, 103 | pub gas_price: Option, 104 | pub nonce: U256, 105 | pub secret_key: B256, 106 | /// if sender is not present we need to derive it from secret key. 107 | #[serde(default)] 108 | pub sender: Option
, 109 | #[serde(deserialize_with = "deserialize_maybe_empty")] 110 | pub to: Option
, 111 | pub value: Vec, 112 | pub max_fee_per_gas: Option, 113 | pub max_priority_fee_per_gas: Option, 114 | 115 | #[serde(default)] 116 | pub access_lists: Vec>, 117 | 118 | #[serde(default)] 119 | pub blob_versioned_hashes: Vec, 120 | pub max_fee_per_blob_gas: Option, 121 | } 122 | 123 | #[derive(Debug, PartialEq, Eq, Deserialize, Clone, Serialize)] 124 | #[serde(rename_all = "camelCase", deny_unknown_fields)] 125 | pub struct AccessListItem { 126 | pub address: Address, 127 | pub storage_keys: Vec, 128 | } 129 | 130 | pub type AccessList = Vec; 131 | 132 | #[cfg(test)] 133 | mod tests { 134 | 135 | use super::*; 136 | use serde_json::Error; 137 | 138 | #[test] 139 | pub fn serialize_u256() -> Result<(), Error> { 140 | let json = r#"{"_item":"0x10"}"#; 141 | 142 | #[derive(Deserialize, Debug)] 143 | pub struct Test { 144 | _item: Option, 145 | } 146 | 147 | let out: Test = serde_json::from_str(json)?; 148 | println!("out:{out:?}"); 149 | Ok(()) 150 | } 151 | 152 | #[test] 153 | pub fn deserialize_minimal_transaction_parts() -> Result<(), Error> { 154 | let json = r#"{"data":[],"gasLimit":[],"nonce":"0x0","secretKey":"0x0000000000000000000000000000000000000000000000000000000000000000","to":"","value":[]}"#; 155 | 156 | let _: TransactionParts = serde_json::from_str(json)?; 157 | Ok(()) 158 | } 159 | 160 | #[test] 161 | pub fn serialize_b160() -> Result<(), Error> { 162 | let json = r#"{"_item":"0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba"}"#; 163 | 164 | #[derive(Deserialize, Debug)] 165 | pub struct Test { 166 | _item: Address, 167 | } 168 | 169 | let out: Test = serde_json::from_str(json)?; 170 | println!("out:{out:?}"); 171 | Ok(()) 172 | } 173 | } 174 | -------------------------------------------------------------------------------- /bin/src/main.rs: -------------------------------------------------------------------------------- 1 | use powdr::riscv::continuations::{ 2 | bootloader::default_input, rust_continuations, rust_continuations_dry_run, 3 | }; 4 | use powdr::riscv::{compile_rust, Runtime}; 5 | use powdr::GoldilocksField; 6 | use powdr::Pipeline; 7 | 8 | use std::path::{Path, PathBuf}; 9 | use std::time::Instant; 10 | 11 | use walkdir::{DirEntry, WalkDir}; 12 | 13 | use clap::Parser; 14 | 15 | fn main() { 16 | let mut options = Options::parse(); 17 | if options.proofs { 18 | options.witgen = true; 19 | } 20 | 21 | env_logger::init(); 22 | 23 | run_all_tests(&options) 24 | } 25 | 26 | #[derive(Parser)] 27 | struct Options { 28 | #[clap(short, long, required = true)] 29 | test: PathBuf, 30 | 31 | #[clap(short, long, default_value = ".")] 32 | output: PathBuf, 33 | 34 | #[clap(short, long)] 35 | fast_tracer: bool, 36 | 37 | #[clap(short, long)] 38 | witgen: bool, 39 | 40 | #[clap(short, long)] 41 | proofs: bool, 42 | } 43 | 44 | fn run_all_tests(options: &Options) { 45 | let all_tests = find_all_json_tests(&options.test); 46 | 47 | log::info!("{}", format!("All tests: {:?}", all_tests)); 48 | log::info!("Compiling powdr-revme..."); 49 | let (asm_file_path, asm_contents) = compile_rust::( 50 | "./evm", 51 | &options.output, 52 | true, 53 | &Runtime::base().with_poseidon(), 54 | true, 55 | ) 56 | .ok_or_else(|| vec!["could not compile rust".to_string()]) 57 | .unwrap(); 58 | 59 | log::debug!("powdr-asm code:\n{asm_contents}"); 60 | 61 | // Create a pipeline from the asm program 62 | let mut pipeline = Pipeline::::default() 63 | .from_asm_string(asm_contents, Some(asm_file_path.clone())) 64 | .with_output(options.output.clone(), true) 65 | .with_prover_inputs(vec![42.into()]) 66 | .with_backend(powdr::backend::BackendType::EStarkDump, None); 67 | 68 | assert!(pipeline.compute_fixed_cols().is_ok()); 69 | 70 | for t in all_tests { 71 | log::info!("Running test {}", t.display()); 72 | 73 | log::info!("Reading JSON test..."); 74 | let suite_json = std::fs::read_to_string(&t).unwrap(); 75 | 76 | let pipeline_with_data = pipeline.clone().add_data(42, &suite_json); 77 | 78 | if options.fast_tracer { 79 | log::info!("Running powdr-riscv executor in fast mode..."); 80 | let start = Instant::now(); 81 | 82 | let program = pipeline.compute_analyzed_asm().unwrap().clone(); 83 | let initial_memory = powdr::riscv::continuations::load_initial_memory(&program); 84 | let (trace, _mem) = powdr::riscv_executor::execute_ast::( 85 | &program, 86 | initial_memory, 87 | pipeline_with_data.data_callback().unwrap(), 88 | &default_input(&[]), 89 | usize::MAX, 90 | powdr::riscv_executor::ExecMode::Fast, 91 | None, 92 | ); 93 | 94 | let duration = start.elapsed(); 95 | log::info!("Fast executor took: {:?}", duration); 96 | log::info!("Trace length: {}", trace.len); 97 | } 98 | 99 | if options.witgen || options.proofs { 100 | log::info!("Running powdr-riscv executor in trace mode for continuations..."); 101 | let start = Instant::now(); 102 | 103 | let bootloader_inputs = 104 | rust_continuations_dry_run(&mut pipeline_with_data.clone(), None); 105 | 106 | let duration = start.elapsed(); 107 | log::info!("Trace executor took: {:?}", duration); 108 | 109 | let generate_witness = 110 | |mut pipeline: Pipeline| -> Result<(), Vec> { 111 | let start = Instant::now(); 112 | println!("Generating witness..."); 113 | pipeline.compute_witness()?; 114 | let duration = start.elapsed(); 115 | println!("Generating witness took: {:?}", duration); 116 | 117 | if options.proofs { 118 | log::info!("Generating proof..."); 119 | let start = Instant::now(); 120 | 121 | pipeline.compute_proof().unwrap(); 122 | 123 | let duration = start.elapsed(); 124 | log::info!("Proof generation took: {:?}", duration); 125 | } 126 | 127 | Ok(()) 128 | }; 129 | 130 | log::info!("Running witness and proof generation for all chunks..."); 131 | let start = Instant::now(); 132 | rust_continuations( 133 | pipeline_with_data.clone(), 134 | generate_witness, 135 | bootloader_inputs, 136 | ) 137 | .unwrap(); 138 | let duration = start.elapsed(); 139 | log::info!( 140 | "Witness and proof generation for all chunks took: {:?}", 141 | duration 142 | ); 143 | } 144 | 145 | log::info!("Done."); 146 | } 147 | } 148 | 149 | fn find_all_json_tests(path: &Path) -> Vec { 150 | WalkDir::new(path) 151 | .into_iter() 152 | .filter_map(|e| e.ok()) 153 | .filter(|e| e.file_name().to_string_lossy().ends_with(".json")) 154 | .map(DirEntry::into_path) 155 | .collect::>() 156 | } 157 | -------------------------------------------------------------------------------- /evm/src/lib.rs: -------------------------------------------------------------------------------- 1 | #![no_std] 2 | 3 | use revm::{ 4 | db::CacheState, 5 | interpreter::CreateScheme, 6 | primitives::{calc_excess_blob_gas, keccak256, Bytecode, Env, SpecId, TransactTo, U256}, 7 | Evm, 8 | }; 9 | 10 | use powdr_riscv_runtime::{input::get_data_serde, print}; 11 | 12 | use models::*; 13 | 14 | mod utils; 15 | 16 | use utils::recover_address; 17 | 18 | extern crate alloc; 19 | use alloc::string::String; 20 | use alloc::string::ToString; 21 | use alloc::vec::Vec; 22 | 23 | #[no_mangle] 24 | fn main() { 25 | ethereum_test(); 26 | } 27 | 28 | fn ethereum_test() { 29 | let suite_json: String = get_data_serde(42); 30 | let suite = read_suite(&suite_json); 31 | 32 | assert!(execute_test_suite(suite).is_ok()); 33 | } 34 | 35 | fn read_suite(s: &String) -> TestSuite { 36 | let suite: TestSuite = serde_json::from_str(s).map_err(|e| e).unwrap(); 37 | suite 38 | } 39 | 40 | fn execute_test_suite(suite: TestSuite) -> Result<(), String> { 41 | for (_name, unit) in suite.0 { 42 | // Create database and insert cache 43 | let mut cache_state = CacheState::new(false); 44 | for (address, info) in unit.pre { 45 | let acc_info = revm::primitives::AccountInfo { 46 | balance: info.balance, 47 | code_hash: keccak256(&info.code), 48 | code: Some(Bytecode::new_raw(info.code)), 49 | nonce: info.nonce, 50 | }; 51 | cache_state.insert_account_with_storage(address, acc_info, info.storage); 52 | } 53 | 54 | let mut env = Env::default(); 55 | // for mainnet 56 | env.cfg.chain_id = 1; 57 | // env.cfg.spec_id is set down the road 58 | 59 | // block env 60 | env.block.number = unit.env.current_number; 61 | env.block.coinbase = unit.env.current_coinbase; 62 | env.block.timestamp = unit.env.current_timestamp; 63 | env.block.gas_limit = unit.env.current_gas_limit; 64 | env.block.basefee = unit.env.current_base_fee.unwrap_or_default(); 65 | env.block.difficulty = unit.env.current_difficulty; 66 | // after the Merge prevrandao replaces mix_hash field in block and replaced difficulty opcode in EVM. 67 | env.block.prevrandao = unit.env.current_random; 68 | // EIP-4844 69 | if let (Some(parent_blob_gas_used), Some(parent_excess_blob_gas)) = ( 70 | unit.env.parent_blob_gas_used, 71 | unit.env.parent_excess_blob_gas, 72 | ) { 73 | env.block 74 | .set_blob_excess_gas_and_price(calc_excess_blob_gas( 75 | parent_blob_gas_used.to(), 76 | parent_excess_blob_gas.to(), 77 | )); 78 | } 79 | 80 | // tx env 81 | env.tx.caller = match unit.transaction.sender { 82 | Some(address) => address, 83 | _ => recover_address(unit.transaction.secret_key.as_slice()) 84 | .ok_or_else(|| String::new())?, 85 | }; 86 | env.tx.gas_price = unit 87 | .transaction 88 | .gas_price 89 | .or(unit.transaction.max_fee_per_gas) 90 | .unwrap_or_default(); 91 | env.tx.gas_priority_fee = unit.transaction.max_priority_fee_per_gas; 92 | // EIP-4844 93 | env.tx.blob_hashes = unit.transaction.blob_versioned_hashes; 94 | env.tx.max_fee_per_blob_gas = unit.transaction.max_fee_per_blob_gas; 95 | 96 | // post and execution 97 | for (spec_name, tests) in unit.post { 98 | if matches!( 99 | spec_name, 100 | SpecName::ByzantiumToConstantinopleAt5 101 | | SpecName::Constantinople 102 | | SpecName::Unknown 103 | ) { 104 | continue; 105 | } 106 | 107 | let spec_id = spec_name.to_spec_id(); 108 | 109 | for (_index, test) in tests.into_iter().enumerate() { 110 | env.tx.gas_limit = unit.transaction.gas_limit[test.indexes.gas].saturating_to(); 111 | 112 | env.tx.data = unit 113 | .transaction 114 | .data 115 | .get(test.indexes.data) 116 | .unwrap() 117 | .clone(); 118 | env.tx.value = unit.transaction.value[test.indexes.value]; 119 | 120 | env.tx.access_list = unit 121 | .transaction 122 | .access_lists 123 | .get(test.indexes.data) 124 | .and_then(Option::as_deref) 125 | .unwrap_or_default() 126 | .iter() 127 | .map(|item| { 128 | ( 129 | item.address, 130 | item.storage_keys 131 | .iter() 132 | .map(|key| U256::from_be_bytes(key.0)) 133 | .collect::>(), 134 | ) 135 | }) 136 | .collect(); 137 | 138 | let to = match unit.transaction.to { 139 | Some(add) => TransactTo::Call(add), 140 | None => TransactTo::Create(CreateScheme::Create), 141 | }; 142 | env.tx.transact_to = to; 143 | 144 | let mut cache = cache_state.clone(); 145 | cache.set_state_clear_flag(SpecId::enabled( 146 | spec_id, 147 | revm::primitives::SpecId::SPURIOUS_DRAGON, 148 | )); 149 | let mut state = revm::db::State::builder() 150 | .with_cached_prestate(cache) 151 | .with_bundle_update() 152 | .build(); 153 | let mut evm = Evm::builder() 154 | .with_db(&mut state) 155 | .modify_env(|e| *e = env.clone()) 156 | .spec_id(spec_id) 157 | .build(); 158 | 159 | // do the deed 160 | //let timer = Instant::now(); 161 | let mut check = || { 162 | let exec_result = evm.transact_commit(); 163 | 164 | match (&test.expect_exception, &exec_result) { 165 | // do nothing 166 | (None, Ok(_)) => (), 167 | // return okay, exception is expected. 168 | (Some(_), Err(_e)) => { 169 | //print!("ERROR: {e}"); 170 | return Ok(()); 171 | } 172 | _ => { 173 | let s = exec_result.clone().err().map(|e| e.to_string()).unwrap(); 174 | print!("UNEXPECTED ERROR: {s}"); 175 | return Err(s); 176 | } 177 | } 178 | Ok(()) 179 | }; 180 | 181 | let Err(e) = check() else { continue }; 182 | 183 | return Err(e); 184 | } 185 | } 186 | } 187 | Ok(()) 188 | } 189 | -------------------------------------------------------------------------------- /accessListExample.json: -------------------------------------------------------------------------------- 1 | { 2 | "accessListExample" : { 3 | "_info" : { 4 | "comment" : "A test shows accessList transaction example", 5 | "filling-rpc-server" : "evm version 1.13.5-unstable-cd295356-20231019", 6 | "filling-tool-version" : "retesteth-0.3.1-cancun+commit.1e18e0b3.Linux.g++", 7 | "generatedTestHash" : "a7e8ad0e6e80fc8cf4911e7e513a99c446d8bba45e68884c4543a8333b9bdee1", 8 | "labels" : { 9 | "0" : "declaredKeyWrite", 10 | "1" : "declaredKeyWrite2" 11 | }, 12 | "lllcversion" : "Version: 0.5.14-develop.2023.7.11+commit.c58ab2c6.mod.Linux.g++", 13 | "solidity" : "Version: 0.8.21+commit.d9974bed.Linux.g++", 14 | "source" : "src/GeneralStateTestsFiller/stExample/accessListExampleFiller.yml", 15 | "sourceHash" : "f8c1f392aebb04c64883399c2d194d22cc8aa864dc4b1d76736548255bdec76f" 16 | }, 17 | "env" : { 18 | "currentBaseFee" : "0x0a", 19 | "currentBeaconRoot" : "0x0000000000000000000000000000000000000000000000000000000000000000", 20 | "currentCoinbase" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", 21 | "currentDifficulty" : "0x020000", 22 | "currentGasLimit" : "0xff112233445566", 23 | "currentNumber" : "0x01", 24 | "currentRandom" : "0x0000000000000000000000000000000000000000000000000000000000020000", 25 | "currentTimestamp" : "0x03e8", 26 | "currentWithdrawalsRoot" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", 27 | "previousHash" : "0x5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" 28 | }, 29 | "post" : { 30 | "Berlin" : [ 31 | { 32 | "hash" : "0x92575ea202220f5f34292941b2ed9d6821c29f221d3ea417682b872d18094c55", 33 | "indexes" : { 34 | "data" : 0, 35 | "gas" : 0, 36 | "value" : 0 37 | }, 38 | "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", 39 | "txbytes" : "0x01f8f901800a83061a8094095e7baea6a6c7c4c2dfeb977efac326af552d87830186a000f893f85994095e7baea6a6c7c4c2dfeb977efac326af552d87f842a00000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000001f794195e7baea6a6c7c4c2dfeb977efac326af552d87e1a0000000000000000000000000000000000000000000000000000000000000000080a011c97e0bb8a356fe4f49b37863d059c6fe8cd3214a6ac06a8387a2f6f0b75f60a0212368a1097da30806edfd13d9c35662e1baee939235eb25de867980bd0eda26" 40 | }, 41 | { 42 | "hash" : "0x036bf17c08e7ee19bb2e2cd209947cf71ac16426a30afad455ae183bde397993", 43 | "indexes" : { 44 | "data" : 1, 45 | "gas" : 0, 46 | "value" : 0 47 | }, 48 | "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", 49 | "txbytes" : "0x01f89e01800a83061a8094095e7baea6a6c7c4c2dfeb977efac326af552d87830186a000f838f794195e7baea6a6c7c4c2dfeb977efac326af552d87e1a0000000000000000000000000000000000000000000000000000000000000000080a0378aab326d222137f330470cc4066787c24d0b1ec8cf858628633009a9ce5a82a01485155170a1cd7cf692d89e1a2fb302e0cde48871b6f760c8c6b0b7c11f6629" 50 | } 51 | ], 52 | "Byzantium" : [ 53 | { 54 | "expectException" : "TR_TypeNotSupported", 55 | "hash" : "0x23af372a0ccfd6a662f86652c982d9c769c0eb240428d6b124acd73a84057da5", 56 | "indexes" : { 57 | "data" : 0, 58 | "gas" : 0, 59 | "value" : 0 60 | }, 61 | "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", 62 | "txbytes" : "0x01f8f901800a83061a8094095e7baea6a6c7c4c2dfeb977efac326af552d87830186a000f893f85994095e7baea6a6c7c4c2dfeb977efac326af552d87f842a00000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000001f794195e7baea6a6c7c4c2dfeb977efac326af552d87e1a0000000000000000000000000000000000000000000000000000000000000000080a011c97e0bb8a356fe4f49b37863d059c6fe8cd3214a6ac06a8387a2f6f0b75f60a0212368a1097da30806edfd13d9c35662e1baee939235eb25de867980bd0eda26" 63 | }, 64 | { 65 | "expectException" : "TR_TypeNotSupported", 66 | "hash" : "0x23af372a0ccfd6a662f86652c982d9c769c0eb240428d6b124acd73a84057da5", 67 | "indexes" : { 68 | "data" : 1, 69 | "gas" : 0, 70 | "value" : 0 71 | }, 72 | "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", 73 | "txbytes" : "0x01f89e01800a83061a8094095e7baea6a6c7c4c2dfeb977efac326af552d87830186a000f838f794195e7baea6a6c7c4c2dfeb977efac326af552d87e1a0000000000000000000000000000000000000000000000000000000000000000080a0378aab326d222137f330470cc4066787c24d0b1ec8cf858628633009a9ce5a82a01485155170a1cd7cf692d89e1a2fb302e0cde48871b6f760c8c6b0b7c11f6629" 74 | } 75 | ], 76 | "Cancun" : [ 77 | { 78 | "hash" : "0x2a7d9d52c698e77f941c8337d58ed4875781ec766c39064ad85b19edb513cac3", 79 | "indexes" : { 80 | "data" : 0, 81 | "gas" : 0, 82 | "value" : 0 83 | }, 84 | "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", 85 | "txbytes" : "0x01f8f901800a83061a8094095e7baea6a6c7c4c2dfeb977efac326af552d87830186a000f893f85994095e7baea6a6c7c4c2dfeb977efac326af552d87f842a00000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000001f794195e7baea6a6c7c4c2dfeb977efac326af552d87e1a0000000000000000000000000000000000000000000000000000000000000000080a011c97e0bb8a356fe4f49b37863d059c6fe8cd3214a6ac06a8387a2f6f0b75f60a0212368a1097da30806edfd13d9c35662e1baee939235eb25de867980bd0eda26" 86 | }, 87 | { 88 | "hash" : "0x46ffc1400ed4ed57e528040b544067131b9e209b0a600ec3ff117cc38326e475", 89 | "indexes" : { 90 | "data" : 1, 91 | "gas" : 0, 92 | "value" : 0 93 | }, 94 | "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", 95 | "txbytes" : "0x01f89e01800a83061a8094095e7baea6a6c7c4c2dfeb977efac326af552d87830186a000f838f794195e7baea6a6c7c4c2dfeb977efac326af552d87e1a0000000000000000000000000000000000000000000000000000000000000000080a0378aab326d222137f330470cc4066787c24d0b1ec8cf858628633009a9ce5a82a01485155170a1cd7cf692d89e1a2fb302e0cde48871b6f760c8c6b0b7c11f6629" 96 | } 97 | ], 98 | "Constantinople" : [ 99 | { 100 | "expectException" : "TR_TypeNotSupported", 101 | "hash" : "0x23af372a0ccfd6a662f86652c982d9c769c0eb240428d6b124acd73a84057da5", 102 | "indexes" : { 103 | "data" : 0, 104 | "gas" : 0, 105 | "value" : 0 106 | }, 107 | "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", 108 | "txbytes" : "0x01f8f901800a83061a8094095e7baea6a6c7c4c2dfeb977efac326af552d87830186a000f893f85994095e7baea6a6c7c4c2dfeb977efac326af552d87f842a00000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000001f794195e7baea6a6c7c4c2dfeb977efac326af552d87e1a0000000000000000000000000000000000000000000000000000000000000000080a011c97e0bb8a356fe4f49b37863d059c6fe8cd3214a6ac06a8387a2f6f0b75f60a0212368a1097da30806edfd13d9c35662e1baee939235eb25de867980bd0eda26" 109 | }, 110 | { 111 | "expectException" : "TR_TypeNotSupported", 112 | "hash" : "0x23af372a0ccfd6a662f86652c982d9c769c0eb240428d6b124acd73a84057da5", 113 | "indexes" : { 114 | "data" : 1, 115 | "gas" : 0, 116 | "value" : 0 117 | }, 118 | "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", 119 | "txbytes" : "0x01f89e01800a83061a8094095e7baea6a6c7c4c2dfeb977efac326af552d87830186a000f838f794195e7baea6a6c7c4c2dfeb977efac326af552d87e1a0000000000000000000000000000000000000000000000000000000000000000080a0378aab326d222137f330470cc4066787c24d0b1ec8cf858628633009a9ce5a82a01485155170a1cd7cf692d89e1a2fb302e0cde48871b6f760c8c6b0b7c11f6629" 120 | } 121 | ], 122 | "ConstantinopleFix" : [ 123 | { 124 | "expectException" : "TR_TypeNotSupported", 125 | "hash" : "0x23af372a0ccfd6a662f86652c982d9c769c0eb240428d6b124acd73a84057da5", 126 | "indexes" : { 127 | "data" : 0, 128 | "gas" : 0, 129 | "value" : 0 130 | }, 131 | "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", 132 | "txbytes" : "0x01f8f901800a83061a8094095e7baea6a6c7c4c2dfeb977efac326af552d87830186a000f893f85994095e7baea6a6c7c4c2dfeb977efac326af552d87f842a00000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000001f794195e7baea6a6c7c4c2dfeb977efac326af552d87e1a0000000000000000000000000000000000000000000000000000000000000000080a011c97e0bb8a356fe4f49b37863d059c6fe8cd3214a6ac06a8387a2f6f0b75f60a0212368a1097da30806edfd13d9c35662e1baee939235eb25de867980bd0eda26" 133 | }, 134 | { 135 | "expectException" : "TR_TypeNotSupported", 136 | "hash" : "0x23af372a0ccfd6a662f86652c982d9c769c0eb240428d6b124acd73a84057da5", 137 | "indexes" : { 138 | "data" : 1, 139 | "gas" : 0, 140 | "value" : 0 141 | }, 142 | "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", 143 | "txbytes" : "0x01f89e01800a83061a8094095e7baea6a6c7c4c2dfeb977efac326af552d87830186a000f838f794195e7baea6a6c7c4c2dfeb977efac326af552d87e1a0000000000000000000000000000000000000000000000000000000000000000080a0378aab326d222137f330470cc4066787c24d0b1ec8cf858628633009a9ce5a82a01485155170a1cd7cf692d89e1a2fb302e0cde48871b6f760c8c6b0b7c11f6629" 144 | } 145 | ], 146 | "EIP150" : [ 147 | { 148 | "expectException" : "TR_TypeNotSupported", 149 | "hash" : "0x9c82fedcc33c3ae00088e615ddcad2d2b7bc2815c35194d11cbdf1bf7ba0cba3", 150 | "indexes" : { 151 | "data" : 0, 152 | "gas" : 0, 153 | "value" : 0 154 | }, 155 | "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", 156 | "txbytes" : "0x01f8f901800a83061a8094095e7baea6a6c7c4c2dfeb977efac326af552d87830186a000f893f85994095e7baea6a6c7c4c2dfeb977efac326af552d87f842a00000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000001f794195e7baea6a6c7c4c2dfeb977efac326af552d87e1a0000000000000000000000000000000000000000000000000000000000000000080a011c97e0bb8a356fe4f49b37863d059c6fe8cd3214a6ac06a8387a2f6f0b75f60a0212368a1097da30806edfd13d9c35662e1baee939235eb25de867980bd0eda26" 157 | }, 158 | { 159 | "expectException" : "TR_TypeNotSupported", 160 | "hash" : "0x9c82fedcc33c3ae00088e615ddcad2d2b7bc2815c35194d11cbdf1bf7ba0cba3", 161 | "indexes" : { 162 | "data" : 1, 163 | "gas" : 0, 164 | "value" : 0 165 | }, 166 | "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", 167 | "txbytes" : "0x01f89e01800a83061a8094095e7baea6a6c7c4c2dfeb977efac326af552d87830186a000f838f794195e7baea6a6c7c4c2dfeb977efac326af552d87e1a0000000000000000000000000000000000000000000000000000000000000000080a0378aab326d222137f330470cc4066787c24d0b1ec8cf858628633009a9ce5a82a01485155170a1cd7cf692d89e1a2fb302e0cde48871b6f760c8c6b0b7c11f6629" 168 | } 169 | ], 170 | "EIP158" : [ 171 | { 172 | "expectException" : "TR_TypeNotSupported", 173 | "hash" : "0x23af372a0ccfd6a662f86652c982d9c769c0eb240428d6b124acd73a84057da5", 174 | "indexes" : { 175 | "data" : 0, 176 | "gas" : 0, 177 | "value" : 0 178 | }, 179 | "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", 180 | "txbytes" : "0x01f8f901800a83061a8094095e7baea6a6c7c4c2dfeb977efac326af552d87830186a000f893f85994095e7baea6a6c7c4c2dfeb977efac326af552d87f842a00000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000001f794195e7baea6a6c7c4c2dfeb977efac326af552d87e1a0000000000000000000000000000000000000000000000000000000000000000080a011c97e0bb8a356fe4f49b37863d059c6fe8cd3214a6ac06a8387a2f6f0b75f60a0212368a1097da30806edfd13d9c35662e1baee939235eb25de867980bd0eda26" 181 | }, 182 | { 183 | "expectException" : "TR_TypeNotSupported", 184 | "hash" : "0x23af372a0ccfd6a662f86652c982d9c769c0eb240428d6b124acd73a84057da5", 185 | "indexes" : { 186 | "data" : 1, 187 | "gas" : 0, 188 | "value" : 0 189 | }, 190 | "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", 191 | "txbytes" : "0x01f89e01800a83061a8094095e7baea6a6c7c4c2dfeb977efac326af552d87830186a000f838f794195e7baea6a6c7c4c2dfeb977efac326af552d87e1a0000000000000000000000000000000000000000000000000000000000000000080a0378aab326d222137f330470cc4066787c24d0b1ec8cf858628633009a9ce5a82a01485155170a1cd7cf692d89e1a2fb302e0cde48871b6f760c8c6b0b7c11f6629" 192 | } 193 | ], 194 | "Frontier" : [ 195 | { 196 | "expectException" : "TR_TypeNotSupported", 197 | "hash" : "0x9c82fedcc33c3ae00088e615ddcad2d2b7bc2815c35194d11cbdf1bf7ba0cba3", 198 | "indexes" : { 199 | "data" : 0, 200 | "gas" : 0, 201 | "value" : 0 202 | }, 203 | "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", 204 | "txbytes" : "0x01f8f901800a83061a8094095e7baea6a6c7c4c2dfeb977efac326af552d87830186a000f893f85994095e7baea6a6c7c4c2dfeb977efac326af552d87f842a00000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000001f794195e7baea6a6c7c4c2dfeb977efac326af552d87e1a0000000000000000000000000000000000000000000000000000000000000000080a011c97e0bb8a356fe4f49b37863d059c6fe8cd3214a6ac06a8387a2f6f0b75f60a0212368a1097da30806edfd13d9c35662e1baee939235eb25de867980bd0eda26" 205 | }, 206 | { 207 | "expectException" : "TR_TypeNotSupported", 208 | "hash" : "0x9c82fedcc33c3ae00088e615ddcad2d2b7bc2815c35194d11cbdf1bf7ba0cba3", 209 | "indexes" : { 210 | "data" : 1, 211 | "gas" : 0, 212 | "value" : 0 213 | }, 214 | "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", 215 | "txbytes" : "0x01f89e01800a83061a8094095e7baea6a6c7c4c2dfeb977efac326af552d87830186a000f838f794195e7baea6a6c7c4c2dfeb977efac326af552d87e1a0000000000000000000000000000000000000000000000000000000000000000080a0378aab326d222137f330470cc4066787c24d0b1ec8cf858628633009a9ce5a82a01485155170a1cd7cf692d89e1a2fb302e0cde48871b6f760c8c6b0b7c11f6629" 216 | } 217 | ], 218 | "Homestead" : [ 219 | { 220 | "expectException" : "TR_TypeNotSupported", 221 | "hash" : "0x9c82fedcc33c3ae00088e615ddcad2d2b7bc2815c35194d11cbdf1bf7ba0cba3", 222 | "indexes" : { 223 | "data" : 0, 224 | "gas" : 0, 225 | "value" : 0 226 | }, 227 | "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", 228 | "txbytes" : "0x01f8f901800a83061a8094095e7baea6a6c7c4c2dfeb977efac326af552d87830186a000f893f85994095e7baea6a6c7c4c2dfeb977efac326af552d87f842a00000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000001f794195e7baea6a6c7c4c2dfeb977efac326af552d87e1a0000000000000000000000000000000000000000000000000000000000000000080a011c97e0bb8a356fe4f49b37863d059c6fe8cd3214a6ac06a8387a2f6f0b75f60a0212368a1097da30806edfd13d9c35662e1baee939235eb25de867980bd0eda26" 229 | }, 230 | { 231 | "expectException" : "TR_TypeNotSupported", 232 | "hash" : "0x9c82fedcc33c3ae00088e615ddcad2d2b7bc2815c35194d11cbdf1bf7ba0cba3", 233 | "indexes" : { 234 | "data" : 1, 235 | "gas" : 0, 236 | "value" : 0 237 | }, 238 | "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", 239 | "txbytes" : "0x01f89e01800a83061a8094095e7baea6a6c7c4c2dfeb977efac326af552d87830186a000f838f794195e7baea6a6c7c4c2dfeb977efac326af552d87e1a0000000000000000000000000000000000000000000000000000000000000000080a0378aab326d222137f330470cc4066787c24d0b1ec8cf858628633009a9ce5a82a01485155170a1cd7cf692d89e1a2fb302e0cde48871b6f760c8c6b0b7c11f6629" 240 | } 241 | ], 242 | "Istanbul" : [ 243 | { 244 | "expectException" : "TR_TypeNotSupported", 245 | "hash" : "0x23af372a0ccfd6a662f86652c982d9c769c0eb240428d6b124acd73a84057da5", 246 | "indexes" : { 247 | "data" : 0, 248 | "gas" : 0, 249 | "value" : 0 250 | }, 251 | "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", 252 | "txbytes" : "0x01f8f901800a83061a8094095e7baea6a6c7c4c2dfeb977efac326af552d87830186a000f893f85994095e7baea6a6c7c4c2dfeb977efac326af552d87f842a00000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000001f794195e7baea6a6c7c4c2dfeb977efac326af552d87e1a0000000000000000000000000000000000000000000000000000000000000000080a011c97e0bb8a356fe4f49b37863d059c6fe8cd3214a6ac06a8387a2f6f0b75f60a0212368a1097da30806edfd13d9c35662e1baee939235eb25de867980bd0eda26" 253 | }, 254 | { 255 | "expectException" : "TR_TypeNotSupported", 256 | "hash" : "0x23af372a0ccfd6a662f86652c982d9c769c0eb240428d6b124acd73a84057da5", 257 | "indexes" : { 258 | "data" : 1, 259 | "gas" : 0, 260 | "value" : 0 261 | }, 262 | "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", 263 | "txbytes" : "0x01f89e01800a83061a8094095e7baea6a6c7c4c2dfeb977efac326af552d87830186a000f838f794195e7baea6a6c7c4c2dfeb977efac326af552d87e1a0000000000000000000000000000000000000000000000000000000000000000080a0378aab326d222137f330470cc4066787c24d0b1ec8cf858628633009a9ce5a82a01485155170a1cd7cf692d89e1a2fb302e0cde48871b6f760c8c6b0b7c11f6629" 264 | } 265 | ], 266 | "London" : [ 267 | { 268 | "hash" : "0x2a7d9d52c698e77f941c8337d58ed4875781ec766c39064ad85b19edb513cac3", 269 | "indexes" : { 270 | "data" : 0, 271 | "gas" : 0, 272 | "value" : 0 273 | }, 274 | "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", 275 | "txbytes" : "0x01f8f901800a83061a8094095e7baea6a6c7c4c2dfeb977efac326af552d87830186a000f893f85994095e7baea6a6c7c4c2dfeb977efac326af552d87f842a00000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000001f794195e7baea6a6c7c4c2dfeb977efac326af552d87e1a0000000000000000000000000000000000000000000000000000000000000000080a011c97e0bb8a356fe4f49b37863d059c6fe8cd3214a6ac06a8387a2f6f0b75f60a0212368a1097da30806edfd13d9c35662e1baee939235eb25de867980bd0eda26" 276 | }, 277 | { 278 | "hash" : "0x46ffc1400ed4ed57e528040b544067131b9e209b0a600ec3ff117cc38326e475", 279 | "indexes" : { 280 | "data" : 1, 281 | "gas" : 0, 282 | "value" : 0 283 | }, 284 | "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", 285 | "txbytes" : "0x01f89e01800a83061a8094095e7baea6a6c7c4c2dfeb977efac326af552d87830186a000f838f794195e7baea6a6c7c4c2dfeb977efac326af552d87e1a0000000000000000000000000000000000000000000000000000000000000000080a0378aab326d222137f330470cc4066787c24d0b1ec8cf858628633009a9ce5a82a01485155170a1cd7cf692d89e1a2fb302e0cde48871b6f760c8c6b0b7c11f6629" 286 | } 287 | ], 288 | "Merge" : [ 289 | { 290 | "hash" : "0x2a7d9d52c698e77f941c8337d58ed4875781ec766c39064ad85b19edb513cac3", 291 | "indexes" : { 292 | "data" : 0, 293 | "gas" : 0, 294 | "value" : 0 295 | }, 296 | "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", 297 | "txbytes" : "0x01f8f901800a83061a8094095e7baea6a6c7c4c2dfeb977efac326af552d87830186a000f893f85994095e7baea6a6c7c4c2dfeb977efac326af552d87f842a00000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000001f794195e7baea6a6c7c4c2dfeb977efac326af552d87e1a0000000000000000000000000000000000000000000000000000000000000000080a011c97e0bb8a356fe4f49b37863d059c6fe8cd3214a6ac06a8387a2f6f0b75f60a0212368a1097da30806edfd13d9c35662e1baee939235eb25de867980bd0eda26" 298 | }, 299 | { 300 | "hash" : "0x46ffc1400ed4ed57e528040b544067131b9e209b0a600ec3ff117cc38326e475", 301 | "indexes" : { 302 | "data" : 1, 303 | "gas" : 0, 304 | "value" : 0 305 | }, 306 | "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", 307 | "txbytes" : "0x01f89e01800a83061a8094095e7baea6a6c7c4c2dfeb977efac326af552d87830186a000f838f794195e7baea6a6c7c4c2dfeb977efac326af552d87e1a0000000000000000000000000000000000000000000000000000000000000000080a0378aab326d222137f330470cc4066787c24d0b1ec8cf858628633009a9ce5a82a01485155170a1cd7cf692d89e1a2fb302e0cde48871b6f760c8c6b0b7c11f6629" 308 | } 309 | ], 310 | "Shanghai" : [ 311 | { 312 | "hash" : "0x2a7d9d52c698e77f941c8337d58ed4875781ec766c39064ad85b19edb513cac3", 313 | "indexes" : { 314 | "data" : 0, 315 | "gas" : 0, 316 | "value" : 0 317 | }, 318 | "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", 319 | "txbytes" : "0x01f8f901800a83061a8094095e7baea6a6c7c4c2dfeb977efac326af552d87830186a000f893f85994095e7baea6a6c7c4c2dfeb977efac326af552d87f842a00000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000001f794195e7baea6a6c7c4c2dfeb977efac326af552d87e1a0000000000000000000000000000000000000000000000000000000000000000080a011c97e0bb8a356fe4f49b37863d059c6fe8cd3214a6ac06a8387a2f6f0b75f60a0212368a1097da30806edfd13d9c35662e1baee939235eb25de867980bd0eda26" 320 | }, 321 | { 322 | "hash" : "0x46ffc1400ed4ed57e528040b544067131b9e209b0a600ec3ff117cc38326e475", 323 | "indexes" : { 324 | "data" : 1, 325 | "gas" : 0, 326 | "value" : 0 327 | }, 328 | "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", 329 | "txbytes" : "0x01f89e01800a83061a8094095e7baea6a6c7c4c2dfeb977efac326af552d87830186a000f838f794195e7baea6a6c7c4c2dfeb977efac326af552d87e1a0000000000000000000000000000000000000000000000000000000000000000080a0378aab326d222137f330470cc4066787c24d0b1ec8cf858628633009a9ce5a82a01485155170a1cd7cf692d89e1a2fb302e0cde48871b6f760c8c6b0b7c11f6629" 330 | } 331 | ] 332 | }, 333 | "pre" : { 334 | "0x095e7baea6a6c7c4c2dfeb977efac326af552d87" : { 335 | "balance" : "0x0de0b6b3a7640000", 336 | "code" : "0x600160010160005500", 337 | "nonce" : "0x00", 338 | "storage" : { 339 | } 340 | }, 341 | "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { 342 | "balance" : "0x0de0b6b3a7640000", 343 | "code" : "0x", 344 | "nonce" : "0x00", 345 | "storage" : { 346 | } 347 | } 348 | }, 349 | "transaction" : { 350 | "accessLists" : [ 351 | [ 352 | { 353 | "address" : "0x095e7baea6a6c7c4c2dfeb977efac326af552d87", 354 | "storageKeys" : [ 355 | "0x0000000000000000000000000000000000000000000000000000000000000000", 356 | "0x0000000000000000000000000000000000000000000000000000000000000001" 357 | ] 358 | }, 359 | { 360 | "address" : "0x195e7baea6a6c7c4c2dfeb977efac326af552d87", 361 | "storageKeys" : [ 362 | "0x0000000000000000000000000000000000000000000000000000000000000000" 363 | ] 364 | } 365 | ], 366 | [ 367 | { 368 | "address" : "0x195e7baea6a6c7c4c2dfeb977efac326af552d87", 369 | "storageKeys" : [ 370 | "0x0000000000000000000000000000000000000000000000000000000000000000" 371 | ] 372 | } 373 | ] 374 | ], 375 | "data" : [ 376 | "0x00", 377 | "0x00" 378 | ], 379 | "gasLimit" : [ 380 | "0x061a80" 381 | ], 382 | "gasPrice" : "0x0a", 383 | "nonce" : "0x00", 384 | "secretKey" : "0x45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", 385 | "sender" : "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b", 386 | "to" : "0x095e7baea6a6c7c4c2dfeb977efac326af552d87", 387 | "value" : [ 388 | "0x0186a0" 389 | ] 390 | } 391 | } 392 | } -------------------------------------------------------------------------------- /evm/Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "ahash" 7 | version = "0.8.6" 8 | source = "registry+https://github.com/rust-lang/crates.io-index" 9 | checksum = "91429305e9f0a25f6205c5b8e0d2db09e0708a7a6df0f42212bb56c32c8ac97a" 10 | dependencies = [ 11 | "cfg-if", 12 | "once_cell", 13 | "version_check", 14 | "zerocopy", 15 | ] 16 | 17 | [[package]] 18 | name = "allocator-api2" 19 | version = "0.2.18" 20 | source = "registry+https://github.com/rust-lang/crates.io-index" 21 | checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" 22 | 23 | [[package]] 24 | name = "alloy-primitives" 25 | version = "0.6.4" 26 | source = "registry+https://github.com/rust-lang/crates.io-index" 27 | checksum = "600d34d8de81e23b6d909c094e23b3d357e01ca36b78a8c5424c501eedbe86f0" 28 | dependencies = [ 29 | "alloy-rlp", 30 | "bytes", 31 | "cfg-if", 32 | "const-hex", 33 | "derive_more", 34 | "hex-literal", 35 | "itoa", 36 | "ruint", 37 | "serde", 38 | "tiny-keccak", 39 | ] 40 | 41 | [[package]] 42 | name = "alloy-rlp" 43 | version = "0.3.4" 44 | source = "registry+https://github.com/rust-lang/crates.io-index" 45 | checksum = "8d58d9f5da7b40e9bfff0b7e7816700be4019db97d4b6359fe7f94a9e22e42ac" 46 | dependencies = [ 47 | "bytes", 48 | ] 49 | 50 | [[package]] 51 | name = "aurora-engine-modexp" 52 | version = "1.1.0" 53 | source = "registry+https://github.com/rust-lang/crates.io-index" 54 | checksum = "0aef7712851e524f35fbbb74fa6599c5cd8692056a1c36f9ca0d2001b670e7e5" 55 | dependencies = [ 56 | "hex", 57 | "num", 58 | ] 59 | 60 | [[package]] 61 | name = "auto_impl" 62 | version = "1.2.0" 63 | source = "registry+https://github.com/rust-lang/crates.io-index" 64 | checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" 65 | dependencies = [ 66 | "proc-macro2", 67 | "quote", 68 | "syn 2.0.60", 69 | ] 70 | 71 | [[package]] 72 | name = "autocfg" 73 | version = "1.2.0" 74 | source = "registry+https://github.com/rust-lang/crates.io-index" 75 | checksum = "f1fdabc7756949593fe60f30ec81974b613357de856987752631dea1e3394c80" 76 | 77 | [[package]] 78 | name = "base16ct" 79 | version = "0.2.0" 80 | source = "registry+https://github.com/rust-lang/crates.io-index" 81 | checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" 82 | 83 | [[package]] 84 | name = "bitflags" 85 | version = "2.5.0" 86 | source = "registry+https://github.com/rust-lang/crates.io-index" 87 | checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" 88 | dependencies = [ 89 | "serde", 90 | ] 91 | 92 | [[package]] 93 | name = "bitvec" 94 | version = "1.0.1" 95 | source = "registry+https://github.com/rust-lang/crates.io-index" 96 | checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" 97 | dependencies = [ 98 | "funty", 99 | "radium", 100 | "serde", 101 | "tap", 102 | "wyz", 103 | ] 104 | 105 | [[package]] 106 | name = "block-buffer" 107 | version = "0.10.4" 108 | source = "registry+https://github.com/rust-lang/crates.io-index" 109 | checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" 110 | dependencies = [ 111 | "generic-array", 112 | ] 113 | 114 | [[package]] 115 | name = "blst" 116 | version = "0.3.11" 117 | source = "registry+https://github.com/rust-lang/crates.io-index" 118 | checksum = "c94087b935a822949d3291a9989ad2b2051ea141eda0fd4e478a75f6aa3e604b" 119 | dependencies = [ 120 | "cc", 121 | "glob", 122 | "threadpool", 123 | "zeroize", 124 | ] 125 | 126 | [[package]] 127 | name = "byteorder" 128 | version = "1.5.0" 129 | source = "registry+https://github.com/rust-lang/crates.io-index" 130 | checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" 131 | 132 | [[package]] 133 | name = "bytes" 134 | version = "1.6.0" 135 | source = "registry+https://github.com/rust-lang/crates.io-index" 136 | checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" 137 | dependencies = [ 138 | "serde", 139 | ] 140 | 141 | [[package]] 142 | name = "c-kzg" 143 | version = "0.4.2" 144 | source = "registry+https://github.com/rust-lang/crates.io-index" 145 | checksum = "94a4bc5367b6284358d2a6a6a1dc2d92ec4b86034561c3b9d3341909752fd848" 146 | dependencies = [ 147 | "blst", 148 | "cc", 149 | "glob", 150 | "hex", 151 | "libc", 152 | "serde", 153 | ] 154 | 155 | [[package]] 156 | name = "cc" 157 | version = "1.0.94" 158 | source = "registry+https://github.com/rust-lang/crates.io-index" 159 | checksum = "17f6e324229dc011159fcc089755d1e2e216a90d43a7dea6853ca740b84f35e7" 160 | 161 | [[package]] 162 | name = "cfg-if" 163 | version = "1.0.0" 164 | source = "registry+https://github.com/rust-lang/crates.io-index" 165 | checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 166 | 167 | [[package]] 168 | name = "const-hex" 169 | version = "1.11.3" 170 | source = "registry+https://github.com/rust-lang/crates.io-index" 171 | checksum = "5ba00838774b4ab0233e355d26710fbfc8327a05c017f6dc4873f876d1f79f78" 172 | dependencies = [ 173 | "cfg-if", 174 | "cpufeatures", 175 | "hex", 176 | "proptest", 177 | "serde", 178 | ] 179 | 180 | [[package]] 181 | name = "const-oid" 182 | version = "0.9.6" 183 | source = "registry+https://github.com/rust-lang/crates.io-index" 184 | checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" 185 | 186 | [[package]] 187 | name = "convert_case" 188 | version = "0.4.0" 189 | source = "registry+https://github.com/rust-lang/crates.io-index" 190 | checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" 191 | 192 | [[package]] 193 | name = "cpufeatures" 194 | version = "0.2.12" 195 | source = "registry+https://github.com/rust-lang/crates.io-index" 196 | checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" 197 | dependencies = [ 198 | "libc", 199 | ] 200 | 201 | [[package]] 202 | name = "crunchy" 203 | version = "0.2.2" 204 | source = "registry+https://github.com/rust-lang/crates.io-index" 205 | checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" 206 | 207 | [[package]] 208 | name = "crypto-bigint" 209 | version = "0.5.5" 210 | source = "registry+https://github.com/rust-lang/crates.io-index" 211 | checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" 212 | dependencies = [ 213 | "generic-array", 214 | "rand_core", 215 | "subtle", 216 | "zeroize", 217 | ] 218 | 219 | [[package]] 220 | name = "crypto-common" 221 | version = "0.1.6" 222 | source = "registry+https://github.com/rust-lang/crates.io-index" 223 | checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" 224 | dependencies = [ 225 | "generic-array", 226 | "typenum", 227 | ] 228 | 229 | [[package]] 230 | name = "der" 231 | version = "0.7.9" 232 | source = "registry+https://github.com/rust-lang/crates.io-index" 233 | checksum = "f55bf8e7b65898637379c1b74eb1551107c8294ed26d855ceb9fd1a09cfc9bc0" 234 | dependencies = [ 235 | "const-oid", 236 | "zeroize", 237 | ] 238 | 239 | [[package]] 240 | name = "derive_more" 241 | version = "0.99.17" 242 | source = "registry+https://github.com/rust-lang/crates.io-index" 243 | checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" 244 | dependencies = [ 245 | "convert_case", 246 | "proc-macro2", 247 | "quote", 248 | "rustc_version", 249 | "syn 1.0.109", 250 | ] 251 | 252 | [[package]] 253 | name = "digest" 254 | version = "0.10.7" 255 | source = "registry+https://github.com/rust-lang/crates.io-index" 256 | checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" 257 | dependencies = [ 258 | "block-buffer", 259 | "const-oid", 260 | "crypto-common", 261 | "subtle", 262 | ] 263 | 264 | [[package]] 265 | name = "ecdsa" 266 | version = "0.16.9" 267 | source = "registry+https://github.com/rust-lang/crates.io-index" 268 | checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" 269 | dependencies = [ 270 | "der", 271 | "digest", 272 | "elliptic-curve", 273 | "rfc6979", 274 | "signature", 275 | ] 276 | 277 | [[package]] 278 | name = "elliptic-curve" 279 | version = "0.13.8" 280 | source = "registry+https://github.com/rust-lang/crates.io-index" 281 | checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" 282 | dependencies = [ 283 | "base16ct", 284 | "crypto-bigint", 285 | "digest", 286 | "ff", 287 | "generic-array", 288 | "group", 289 | "rand_core", 290 | "sec1", 291 | "subtle", 292 | "zeroize", 293 | ] 294 | 295 | [[package]] 296 | name = "enumn" 297 | version = "0.1.13" 298 | source = "registry+https://github.com/rust-lang/crates.io-index" 299 | checksum = "6fd000fd6988e73bbe993ea3db9b1aa64906ab88766d654973924340c8cddb42" 300 | dependencies = [ 301 | "proc-macro2", 302 | "quote", 303 | "syn 2.0.60", 304 | ] 305 | 306 | [[package]] 307 | name = "evm" 308 | version = "0.1.0" 309 | dependencies = [ 310 | "ahash", 311 | "k256", 312 | "models", 313 | "powdr-riscv-runtime", 314 | "revm", 315 | "serde", 316 | "serde_json", 317 | ] 318 | 319 | [[package]] 320 | name = "ff" 321 | version = "0.13.0" 322 | source = "registry+https://github.com/rust-lang/crates.io-index" 323 | checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" 324 | dependencies = [ 325 | "rand_core", 326 | "subtle", 327 | ] 328 | 329 | [[package]] 330 | name = "funty" 331 | version = "2.0.0" 332 | source = "registry+https://github.com/rust-lang/crates.io-index" 333 | checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" 334 | 335 | [[package]] 336 | name = "generic-array" 337 | version = "0.14.7" 338 | source = "registry+https://github.com/rust-lang/crates.io-index" 339 | checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" 340 | dependencies = [ 341 | "typenum", 342 | "version_check", 343 | "zeroize", 344 | ] 345 | 346 | [[package]] 347 | name = "glob" 348 | version = "0.3.1" 349 | source = "registry+https://github.com/rust-lang/crates.io-index" 350 | checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" 351 | 352 | [[package]] 353 | name = "group" 354 | version = "0.13.0" 355 | source = "registry+https://github.com/rust-lang/crates.io-index" 356 | checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" 357 | dependencies = [ 358 | "ff", 359 | "rand_core", 360 | "subtle", 361 | ] 362 | 363 | [[package]] 364 | name = "half" 365 | version = "1.8.3" 366 | source = "registry+https://github.com/rust-lang/crates.io-index" 367 | checksum = "1b43ede17f21864e81be2fa654110bf1e793774238d86ef8555c37e6519c0403" 368 | 369 | [[package]] 370 | name = "hashbrown" 371 | version = "0.14.3" 372 | source = "registry+https://github.com/rust-lang/crates.io-index" 373 | checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" 374 | dependencies = [ 375 | "ahash", 376 | "allocator-api2", 377 | "serde", 378 | ] 379 | 380 | [[package]] 381 | name = "hermit-abi" 382 | version = "0.3.9" 383 | source = "registry+https://github.com/rust-lang/crates.io-index" 384 | checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" 385 | 386 | [[package]] 387 | name = "hex" 388 | version = "0.4.3" 389 | source = "registry+https://github.com/rust-lang/crates.io-index" 390 | checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" 391 | dependencies = [ 392 | "serde", 393 | ] 394 | 395 | [[package]] 396 | name = "hex-literal" 397 | version = "0.4.1" 398 | source = "registry+https://github.com/rust-lang/crates.io-index" 399 | checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" 400 | 401 | [[package]] 402 | name = "hmac" 403 | version = "0.12.1" 404 | source = "registry+https://github.com/rust-lang/crates.io-index" 405 | checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" 406 | dependencies = [ 407 | "digest", 408 | ] 409 | 410 | [[package]] 411 | name = "itoa" 412 | version = "1.0.11" 413 | source = "registry+https://github.com/rust-lang/crates.io-index" 414 | checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" 415 | 416 | [[package]] 417 | name = "k256" 418 | version = "0.13.3" 419 | source = "registry+https://github.com/rust-lang/crates.io-index" 420 | checksum = "956ff9b67e26e1a6a866cb758f12c6f8746208489e3e4a4b5580802f2f0a587b" 421 | dependencies = [ 422 | "cfg-if", 423 | "ecdsa", 424 | "elliptic-curve", 425 | "sha2", 426 | ] 427 | 428 | [[package]] 429 | name = "lazy_static" 430 | version = "1.4.0" 431 | source = "registry+https://github.com/rust-lang/crates.io-index" 432 | checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" 433 | dependencies = [ 434 | "spin", 435 | ] 436 | 437 | [[package]] 438 | name = "libc" 439 | version = "0.2.153" 440 | source = "registry+https://github.com/rust-lang/crates.io-index" 441 | checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" 442 | 443 | [[package]] 444 | name = "libm" 445 | version = "0.2.8" 446 | source = "registry+https://github.com/rust-lang/crates.io-index" 447 | checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" 448 | 449 | [[package]] 450 | name = "models" 451 | version = "0.1.0" 452 | dependencies = [ 453 | "revm", 454 | "serde", 455 | "serde_json", 456 | ] 457 | 458 | [[package]] 459 | name = "num" 460 | version = "0.4.2" 461 | source = "registry+https://github.com/rust-lang/crates.io-index" 462 | checksum = "3135b08af27d103b0a51f2ae0f8632117b7b185ccf931445affa8df530576a41" 463 | dependencies = [ 464 | "num-bigint", 465 | "num-complex", 466 | "num-integer", 467 | "num-iter", 468 | "num-rational", 469 | "num-traits", 470 | ] 471 | 472 | [[package]] 473 | name = "num-bigint" 474 | version = "0.4.4" 475 | source = "registry+https://github.com/rust-lang/crates.io-index" 476 | checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" 477 | dependencies = [ 478 | "autocfg", 479 | "num-integer", 480 | "num-traits", 481 | ] 482 | 483 | [[package]] 484 | name = "num-complex" 485 | version = "0.4.5" 486 | source = "registry+https://github.com/rust-lang/crates.io-index" 487 | checksum = "23c6602fda94a57c990fe0df199a035d83576b496aa29f4e634a8ac6004e68a6" 488 | dependencies = [ 489 | "num-traits", 490 | ] 491 | 492 | [[package]] 493 | name = "num-integer" 494 | version = "0.1.46" 495 | source = "registry+https://github.com/rust-lang/crates.io-index" 496 | checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" 497 | dependencies = [ 498 | "num-traits", 499 | ] 500 | 501 | [[package]] 502 | name = "num-iter" 503 | version = "0.1.44" 504 | source = "registry+https://github.com/rust-lang/crates.io-index" 505 | checksum = "d869c01cc0c455284163fd0092f1f93835385ccab5a98a0dcc497b2f8bf055a9" 506 | dependencies = [ 507 | "autocfg", 508 | "num-integer", 509 | "num-traits", 510 | ] 511 | 512 | [[package]] 513 | name = "num-rational" 514 | version = "0.4.1" 515 | source = "registry+https://github.com/rust-lang/crates.io-index" 516 | checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0" 517 | dependencies = [ 518 | "autocfg", 519 | "num-bigint", 520 | "num-integer", 521 | "num-traits", 522 | ] 523 | 524 | [[package]] 525 | name = "num-traits" 526 | version = "0.2.18" 527 | source = "registry+https://github.com/rust-lang/crates.io-index" 528 | checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a" 529 | dependencies = [ 530 | "autocfg", 531 | "libm", 532 | ] 533 | 534 | [[package]] 535 | name = "num_cpus" 536 | version = "1.16.0" 537 | source = "registry+https://github.com/rust-lang/crates.io-index" 538 | checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" 539 | dependencies = [ 540 | "hermit-abi", 541 | "libc", 542 | ] 543 | 544 | [[package]] 545 | name = "once_cell" 546 | version = "1.19.0" 547 | source = "registry+https://github.com/rust-lang/crates.io-index" 548 | checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" 549 | 550 | [[package]] 551 | name = "powdr-riscv-runtime" 552 | version = "0.1.0-alpha.1" 553 | source = "git+https://github.com/powdr-labs/powdr?branch=main#21ddd28cc75caee5b1f51667d871f5b4ac3ceccf" 554 | dependencies = [ 555 | "powdr-riscv-syscalls", 556 | "serde", 557 | "serde_cbor", 558 | ] 559 | 560 | [[package]] 561 | name = "powdr-riscv-syscalls" 562 | version = "0.1.0-alpha.1" 563 | source = "git+https://github.com/powdr-labs/powdr?branch=main#21ddd28cc75caee5b1f51667d871f5b4ac3ceccf" 564 | 565 | [[package]] 566 | name = "ppv-lite86" 567 | version = "0.2.17" 568 | source = "registry+https://github.com/rust-lang/crates.io-index" 569 | checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" 570 | 571 | [[package]] 572 | name = "proc-macro2" 573 | version = "1.0.81" 574 | source = "registry+https://github.com/rust-lang/crates.io-index" 575 | checksum = "3d1597b0c024618f09a9c3b8655b7e430397a36d23fdafec26d6965e9eec3eba" 576 | dependencies = [ 577 | "unicode-ident", 578 | ] 579 | 580 | [[package]] 581 | name = "proptest" 582 | version = "1.4.0" 583 | source = "registry+https://github.com/rust-lang/crates.io-index" 584 | checksum = "31b476131c3c86cb68032fdc5cb6d5a1045e3e42d96b69fa599fd77701e1f5bf" 585 | dependencies = [ 586 | "bitflags", 587 | "num-traits", 588 | "rand", 589 | "rand_chacha", 590 | "rand_xorshift", 591 | "unarray", 592 | ] 593 | 594 | [[package]] 595 | name = "quote" 596 | version = "1.0.36" 597 | source = "registry+https://github.com/rust-lang/crates.io-index" 598 | checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" 599 | dependencies = [ 600 | "proc-macro2", 601 | ] 602 | 603 | [[package]] 604 | name = "radium" 605 | version = "0.7.0" 606 | source = "registry+https://github.com/rust-lang/crates.io-index" 607 | checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" 608 | 609 | [[package]] 610 | name = "rand" 611 | version = "0.8.5" 612 | source = "registry+https://github.com/rust-lang/crates.io-index" 613 | checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" 614 | dependencies = [ 615 | "rand_core", 616 | ] 617 | 618 | [[package]] 619 | name = "rand_chacha" 620 | version = "0.3.1" 621 | source = "registry+https://github.com/rust-lang/crates.io-index" 622 | checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" 623 | dependencies = [ 624 | "ppv-lite86", 625 | "rand_core", 626 | ] 627 | 628 | [[package]] 629 | name = "rand_core" 630 | version = "0.6.4" 631 | source = "registry+https://github.com/rust-lang/crates.io-index" 632 | checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" 633 | 634 | [[package]] 635 | name = "rand_xorshift" 636 | version = "0.3.0" 637 | source = "registry+https://github.com/rust-lang/crates.io-index" 638 | checksum = "d25bf25ec5ae4a3f1b92f929810509a2f53d7dca2f50b794ff57e3face536c8f" 639 | dependencies = [ 640 | "rand_core", 641 | ] 642 | 643 | [[package]] 644 | name = "revm" 645 | version = "3.5.0" 646 | source = "git+https://github.com/powdr-labs/revm?branch=serde-no-std#8653c72bfd70cbac061b03d0c0de02153dbc6601" 647 | dependencies = [ 648 | "auto_impl", 649 | "revm-interpreter", 650 | "revm-precompile", 651 | "serde", 652 | "serde_json", 653 | ] 654 | 655 | [[package]] 656 | name = "revm-interpreter" 657 | version = "1.3.0" 658 | source = "git+https://github.com/powdr-labs/revm?branch=serde-no-std#8653c72bfd70cbac061b03d0c0de02153dbc6601" 659 | dependencies = [ 660 | "revm-primitives", 661 | "serde", 662 | ] 663 | 664 | [[package]] 665 | name = "revm-precompile" 666 | version = "2.2.0" 667 | source = "git+https://github.com/powdr-labs/revm?branch=serde-no-std#8653c72bfd70cbac061b03d0c0de02153dbc6601" 668 | dependencies = [ 669 | "aurora-engine-modexp", 670 | "k256", 671 | "once_cell", 672 | "revm-primitives", 673 | "ripemd", 674 | "sha2", 675 | "substrate-bn", 676 | ] 677 | 678 | [[package]] 679 | name = "revm-primitives" 680 | version = "1.3.0" 681 | source = "git+https://github.com/powdr-labs/revm?branch=serde-no-std#8653c72bfd70cbac061b03d0c0de02153dbc6601" 682 | dependencies = [ 683 | "alloy-primitives", 684 | "auto_impl", 685 | "bitflags", 686 | "bitvec", 687 | "c-kzg", 688 | "enumn", 689 | "hashbrown", 690 | "hex", 691 | "serde", 692 | ] 693 | 694 | [[package]] 695 | name = "rfc6979" 696 | version = "0.4.0" 697 | source = "registry+https://github.com/rust-lang/crates.io-index" 698 | checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" 699 | dependencies = [ 700 | "hmac", 701 | "subtle", 702 | ] 703 | 704 | [[package]] 705 | name = "ripemd" 706 | version = "0.1.3" 707 | source = "registry+https://github.com/rust-lang/crates.io-index" 708 | checksum = "bd124222d17ad93a644ed9d011a40f4fb64aa54275c08cc216524a9ea82fb09f" 709 | dependencies = [ 710 | "digest", 711 | ] 712 | 713 | [[package]] 714 | name = "ruint" 715 | version = "1.12.1" 716 | source = "registry+https://github.com/rust-lang/crates.io-index" 717 | checksum = "8f308135fef9fc398342da5472ce7c484529df23743fb7c734e0f3d472971e62" 718 | dependencies = [ 719 | "alloy-rlp", 720 | "proptest", 721 | "rand", 722 | "ruint-macro", 723 | "serde", 724 | "valuable", 725 | "zeroize", 726 | ] 727 | 728 | [[package]] 729 | name = "ruint-macro" 730 | version = "1.2.0" 731 | source = "registry+https://github.com/rust-lang/crates.io-index" 732 | checksum = "f86854cf50259291520509879a5c294c3c9a4c334e9ff65071c51e42ef1e2343" 733 | 734 | [[package]] 735 | name = "rustc-hex" 736 | version = "2.1.0" 737 | source = "registry+https://github.com/rust-lang/crates.io-index" 738 | checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" 739 | 740 | [[package]] 741 | name = "rustc_version" 742 | version = "0.4.0" 743 | source = "registry+https://github.com/rust-lang/crates.io-index" 744 | checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" 745 | dependencies = [ 746 | "semver", 747 | ] 748 | 749 | [[package]] 750 | name = "ryu" 751 | version = "1.0.17" 752 | source = "registry+https://github.com/rust-lang/crates.io-index" 753 | checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1" 754 | 755 | [[package]] 756 | name = "sec1" 757 | version = "0.7.3" 758 | source = "registry+https://github.com/rust-lang/crates.io-index" 759 | checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" 760 | dependencies = [ 761 | "base16ct", 762 | "der", 763 | "generic-array", 764 | "subtle", 765 | "zeroize", 766 | ] 767 | 768 | [[package]] 769 | name = "semver" 770 | version = "1.0.22" 771 | source = "registry+https://github.com/rust-lang/crates.io-index" 772 | checksum = "92d43fe69e652f3df9bdc2b85b2854a0825b86e4fb76bc44d945137d053639ca" 773 | 774 | [[package]] 775 | name = "serde" 776 | version = "1.0.198" 777 | source = "registry+https://github.com/rust-lang/crates.io-index" 778 | checksum = "9846a40c979031340571da2545a4e5b7c4163bdae79b301d5f86d03979451fcc" 779 | dependencies = [ 780 | "serde_derive", 781 | ] 782 | 783 | [[package]] 784 | name = "serde_cbor" 785 | version = "0.11.2" 786 | source = "registry+https://github.com/rust-lang/crates.io-index" 787 | checksum = "2bef2ebfde456fb76bbcf9f59315333decc4fda0b2b44b420243c11e0f5ec1f5" 788 | dependencies = [ 789 | "half", 790 | "serde", 791 | ] 792 | 793 | [[package]] 794 | name = "serde_derive" 795 | version = "1.0.198" 796 | source = "registry+https://github.com/rust-lang/crates.io-index" 797 | checksum = "e88edab869b01783ba905e7d0153f9fc1a6505a96e4ad3018011eedb838566d9" 798 | dependencies = [ 799 | "proc-macro2", 800 | "quote", 801 | "syn 2.0.60", 802 | ] 803 | 804 | [[package]] 805 | name = "serde_json" 806 | version = "1.0.116" 807 | source = "registry+https://github.com/rust-lang/crates.io-index" 808 | checksum = "3e17db7126d17feb94eb3fad46bf1a96b034e8aacbc2e775fe81505f8b0b2813" 809 | dependencies = [ 810 | "itoa", 811 | "ryu", 812 | "serde", 813 | ] 814 | 815 | [[package]] 816 | name = "sha2" 817 | version = "0.10.8" 818 | source = "registry+https://github.com/rust-lang/crates.io-index" 819 | checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" 820 | dependencies = [ 821 | "cfg-if", 822 | "cpufeatures", 823 | "digest", 824 | ] 825 | 826 | [[package]] 827 | name = "signature" 828 | version = "2.2.0" 829 | source = "registry+https://github.com/rust-lang/crates.io-index" 830 | checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" 831 | dependencies = [ 832 | "digest", 833 | "rand_core", 834 | ] 835 | 836 | [[package]] 837 | name = "spin" 838 | version = "0.5.2" 839 | source = "registry+https://github.com/rust-lang/crates.io-index" 840 | checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" 841 | 842 | [[package]] 843 | name = "substrate-bn" 844 | version = "0.6.0" 845 | source = "registry+https://github.com/rust-lang/crates.io-index" 846 | checksum = "72b5bbfa79abbae15dd642ea8176a21a635ff3c00059961d1ea27ad04e5b441c" 847 | dependencies = [ 848 | "byteorder", 849 | "crunchy", 850 | "lazy_static", 851 | "rand", 852 | "rustc-hex", 853 | ] 854 | 855 | [[package]] 856 | name = "subtle" 857 | version = "2.5.0" 858 | source = "registry+https://github.com/rust-lang/crates.io-index" 859 | checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" 860 | 861 | [[package]] 862 | name = "syn" 863 | version = "1.0.109" 864 | source = "registry+https://github.com/rust-lang/crates.io-index" 865 | checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" 866 | dependencies = [ 867 | "proc-macro2", 868 | "quote", 869 | "unicode-ident", 870 | ] 871 | 872 | [[package]] 873 | name = "syn" 874 | version = "2.0.60" 875 | source = "registry+https://github.com/rust-lang/crates.io-index" 876 | checksum = "909518bc7b1c9b779f1bbf07f2929d35af9f0f37e47c6e9ef7f9dddc1e1821f3" 877 | dependencies = [ 878 | "proc-macro2", 879 | "quote", 880 | "unicode-ident", 881 | ] 882 | 883 | [[package]] 884 | name = "tap" 885 | version = "1.0.1" 886 | source = "registry+https://github.com/rust-lang/crates.io-index" 887 | checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" 888 | 889 | [[package]] 890 | name = "threadpool" 891 | version = "1.8.1" 892 | source = "registry+https://github.com/rust-lang/crates.io-index" 893 | checksum = "d050e60b33d41c19108b32cea32164033a9013fe3b46cbd4457559bfbf77afaa" 894 | dependencies = [ 895 | "num_cpus", 896 | ] 897 | 898 | [[package]] 899 | name = "tiny-keccak" 900 | version = "2.0.2" 901 | source = "registry+https://github.com/rust-lang/crates.io-index" 902 | checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" 903 | dependencies = [ 904 | "crunchy", 905 | ] 906 | 907 | [[package]] 908 | name = "typenum" 909 | version = "1.17.0" 910 | source = "registry+https://github.com/rust-lang/crates.io-index" 911 | checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" 912 | 913 | [[package]] 914 | name = "unarray" 915 | version = "0.1.4" 916 | source = "registry+https://github.com/rust-lang/crates.io-index" 917 | checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" 918 | 919 | [[package]] 920 | name = "unicode-ident" 921 | version = "1.0.12" 922 | source = "registry+https://github.com/rust-lang/crates.io-index" 923 | checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" 924 | 925 | [[package]] 926 | name = "valuable" 927 | version = "0.1.0" 928 | source = "registry+https://github.com/rust-lang/crates.io-index" 929 | checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" 930 | 931 | [[package]] 932 | name = "version_check" 933 | version = "0.9.4" 934 | source = "registry+https://github.com/rust-lang/crates.io-index" 935 | checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" 936 | 937 | [[package]] 938 | name = "wyz" 939 | version = "0.5.1" 940 | source = "registry+https://github.com/rust-lang/crates.io-index" 941 | checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" 942 | dependencies = [ 943 | "tap", 944 | ] 945 | 946 | [[package]] 947 | name = "zerocopy" 948 | version = "0.7.32" 949 | source = "registry+https://github.com/rust-lang/crates.io-index" 950 | checksum = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be" 951 | dependencies = [ 952 | "zerocopy-derive", 953 | ] 954 | 955 | [[package]] 956 | name = "zerocopy-derive" 957 | version = "0.7.32" 958 | source = "registry+https://github.com/rust-lang/crates.io-index" 959 | checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" 960 | dependencies = [ 961 | "proc-macro2", 962 | "quote", 963 | "syn 2.0.60", 964 | ] 965 | 966 | [[package]] 967 | name = "zeroize" 968 | version = "1.7.0" 969 | source = "registry+https://github.com/rust-lang/crates.io-index" 970 | checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" 971 | dependencies = [ 972 | "zeroize_derive", 973 | ] 974 | 975 | [[package]] 976 | name = "zeroize_derive" 977 | version = "1.4.2" 978 | source = "registry+https://github.com/rust-lang/crates.io-index" 979 | checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" 980 | dependencies = [ 981 | "proc-macro2", 982 | "quote", 983 | "syn 2.0.60", 984 | ] 985 | --------------------------------------------------------------------------------