diff --git a/Cargo.toml b/Cargo.toml index 18c9fc37..26ef147f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -39,15 +39,18 @@ alloy-evm = { version = "0.24.2", path = "crates/evm", default-features = false alloy-op-evm = { version = "0.24.2", path = "crates/op-evm", default-features = false } # alloy + +# alloy-eip7928 = { version = "0.1.0", default-features = false, git = "https://github.com/alloy-rs/eips.git" } + alloy-eip2124 = { version = "0.2", default-features = false } alloy-chains = { version = "0.2.0", default-features = false } -alloy-eips = { version = "1.0.34", default-features = false } -alloy-consensus = { version = "1.0.27", default-features = false } +alloy-eips = { version = "1.1.2", default-features = false } +alloy-consensus = { version = "1.1.2", default-features = false } alloy-primitives = { version = "1.0.0", default-features = false } alloy-sol-types = { version = "1.0.0", default-features = false } -alloy-hardforks = { version = "0.4.2" } -alloy-rpc-types-eth = { version = "1.0.27", default-features = false } -alloy-rpc-types-engine = { version = "1.0.27", default-features = false } +alloy-rpc-types-eth = { version = "1.1.2", default-features = false } +alloy-rpc-types-engine = { version = "1.1.2", default-features = false } +alloy-hardforks = { version = "0.4.3" } # op-alloy alloy-op-hardforks = { version = "0.4.2" } @@ -56,8 +59,8 @@ op-alloy = { version = "0.22", default-features = false, features = [ ] } # revm -revm = { version = "33.0.0", default-features = false } -op-revm = { version = "14.0.0", default-features = false } +revm = { version = "31.0.0", default-features = false } +op-revm = { version = "12.0.0", default-features = false } # misc auto_impl = "1" @@ -65,11 +68,12 @@ derive_more = { version = "2", default-features = false, features = ["full"] } serde = { version = "1", default-features = false, features = ["derive"] } thiserror = { version = "2.0.0", default-features = false } serde_json = "1" +tracing = { version = "0.1.41", default-features = false } test-case = "3" - [patch.crates-io] -# revm = { git = "https://github.com/bluealloy/revm", rev = "11b16259" } -# op-revm = { git = "https://github.com/bluealloy/revm", rev = "11b16259" } - -#alloy-hardforks = { git = "https://github.com/alloy-rs/hardforks", rev = "0fd230f5aa24c4f6a8c593918b7449df0c20f60a" } -#alloy-op-hardforks = { git = "https://github.com/alloy-rs/hardforks", rev = "0fd230f5aa24c4f6a8c593918b7449df0c20f60a" } +revm = { git = "https://github.com/bluealloy/revm.git", branch = "rakita/bal" } +op-revm = { git = "https://github.com/bluealloy/revm.git", branch = "rakita/bal" } +alloy-eips = { git = "https://github.com/Soubhik-10/alloy", branch = "bal" } +alloy-consensus = { git = "https://github.com/Soubhik-10/alloy", branch = "bal" } +alloy-rpc-types-eth = { git = "https://github.com/Soubhik-10/alloy", branch = "bal" } +alloy-rpc-types-engine = { git = "https://github.com/Soubhik-10/alloy", branch = "bal" } diff --git a/crates/evm/Cargo.toml b/crates/evm/Cargo.toml index 27230925..e97786ec 100644 --- a/crates/evm/Cargo.toml +++ b/crates/evm/Cargo.toml @@ -23,6 +23,9 @@ alloy-op-hardforks = { workspace = true, optional = true } alloy-rpc-types-eth = { workspace = true, optional = true } alloy-rpc-types-engine = { workspace = true, optional = true } +tracing.workspace = true +# alloy-eip7928.workspace = true + revm.workspace = true op-revm = { workspace = true, optional = true } op-alloy = { workspace = true, optional = true } @@ -38,22 +41,20 @@ test-case.workspace = true [features] default = ["std"] -secp256k1 = [ - "std", - "alloy-consensus/secp256k1", -] +secp256k1 = ["std", "alloy-consensus/secp256k1"] std = [ - "alloy-primitives/std", - "revm/std", - "alloy-consensus/std", - "alloy-eips/std", - "alloy-sol-types/std", - "derive_more/std", - "op-revm?/std", - "thiserror/std", - "op-alloy?/std", - "alloy-rpc-types-eth?/std", - "alloy-rpc-types-engine?/std" + "alloy-primitives/std", + "revm/std", + "alloy-consensus/std", + "alloy-eips/std", + "alloy-sol-types/std", + "derive_more/std", + "op-revm?/std", + "thiserror/std", + "op-alloy?/std", + "alloy-rpc-types-eth?/std", + "alloy-rpc-types-engine?/std", + "tracing/std", ] op = ["op-revm", "op-alloy", "alloy-op-hardforks"] overrides = ["dep:alloy-rpc-types-eth"] diff --git a/crates/evm/src/block/mod.rs b/crates/evm/src/block/mod.rs index b4bfe450..62daca55 100644 --- a/crates/evm/src/block/mod.rs +++ b/crates/evm/src/block/mod.rs @@ -2,7 +2,7 @@ use crate::{Database, Evm, EvmFactory, FromRecoveredTx, FromTxWithEncoded, RecoveredTx, ToTxEnv}; use alloc::{boxed::Box, vec::Vec}; -use alloy_eips::eip7685::Requests; +use alloy_eips::{eip7685::Requests, eip7928::BlockAccessList}; use revm::{ context::result::{ExecutionResult, ResultAndState}, database::State, @@ -34,6 +34,8 @@ pub struct BlockExecutionResult { pub gas_used: u64, /// Blob gas used by the block. pub blob_gas_used: u64, + /// Block Access List of the block + pub block_access_list: Option, } /// Helper trait to encapsulate requirements for a type to be used as input for [`BlockExecutor`]. diff --git a/crates/evm/src/block/state_changes.rs b/crates/evm/src/block/state_changes.rs index 3663ca51..c038bdc1 100644 --- a/crates/evm/src/block/state_changes.rs +++ b/crates/evm/src/block/state_changes.rs @@ -115,6 +115,7 @@ pub fn balance_increment_state( where DB: Database, { + tracing::debug!("Entered balance incr fn"); let mut load_account = |address: &Address| -> Result<(Address, Account), BlockExecutionError> { let cache_account = state.load_cache_account(*address).map_err(|_| { BlockExecutionError::msg("could not load account for balance increment") @@ -131,13 +132,16 @@ where storage: Default::default(), status: AccountStatus::Touched, transaction_id: 0, + original_info: account.info.clone(), }, )) }; - balance_increments + let evm_state = balance_increments .iter() .filter(|(_, &balance)| balance != 0) .map(|(addr, _)| load_account(addr)) - .collect::>() + .collect::>(); + tracing::debug!("Created balance increment state for {:?} accounts", evm_state); + evm_state } diff --git a/crates/evm/src/eth/block.rs b/crates/evm/src/eth/block.rs index c77c9e1c..cd8ad055 100644 --- a/crates/evm/src/eth/block.rs +++ b/crates/evm/src/eth/block.rs @@ -17,9 +17,14 @@ use crate::{ }; use alloc::{borrow::Cow, boxed::Box, vec::Vec}; use alloy_consensus::{Header, Transaction, TxReceipt}; -use alloy_eips::{eip4895::Withdrawals, eip7685::Requests, Encodable2718}; +use alloy_eips::{ + eip4895::Withdrawals, + eip7685::Requests, + eip7928::{AccountChanges, BalanceChange, BlockAccessList}, + Encodable2718, +}; use alloy_hardforks::EthereumHardfork; -use alloy_primitives::{Log, B256}; +use alloy_primitives::{map::HashMap, Log, B256, U256}; use revm::{ context::Block, context_interface::result::ResultAndState, database::State, DatabaseCommit, Inspector, @@ -106,7 +111,7 @@ where self.system_caller.apply_blockhashes_contract_call(self.ctx.parent_hash, &mut self.evm)?; self.system_caller .apply_beacon_root_contract_call(self.ctx.parent_beacon_block_root, &mut self.evm)?; - + tracing::debug!(" Applied pre ex"); Ok(()) } @@ -144,6 +149,7 @@ where let gas_used = result.gas_used(); + //BAL TODO // append gas used self.gas_used += gas_used; @@ -163,9 +169,11 @@ where cumulative_gas_used: self.gas_used, })); + // Increment bal_index + self.evm.db_mut().bal_state.bump_bal_index(); + ::tracing::debug!("Updated BAL index to {}", self.evm.db().bal_state.bal_index); // Commit the state changes. self.evm.db_mut().commit(state); - Ok(gas_used) } @@ -233,7 +241,84 @@ where ) }) })?; + tracing::debug!("balance_increments{:?}", balance_increments); + let last_bal_index = self.receipts.len() as u64 + 1; + let mut bal = if self + .spec + .is_amsterdam_active_at_timestamp(self.evm.block().timestamp().saturating_to()) + { + let mut withdrawal_bal = BlockAccessList::default(); + if let Some(alloy_bal) = self.evm.db_mut().take_built_alloy_bal() { + if let Some(withdrawals) = self.ctx.withdrawals.as_deref() { + for withdrawal in withdrawals.iter() { + let initial = if let Some(account_changes) = + alloy_bal.iter().find(|ac| ac.address == withdrawal.address) + { + if let Some(last_balance) = account_changes.balance_changes.last() { + last_balance.post_balance + } else { + self.evm + .db_mut() + .database + .basic(withdrawal.address) + .unwrap() + .unwrap_or_default() + .balance + } + } else { + self.evm + .db_mut() + .database + .basic(withdrawal.address) + .unwrap() + .unwrap_or_default() + .balance + }; + + // let final_balance = initial + // .saturating_add(U256::from(withdrawal.amount_wei().to::())); + if let Some(balance) = balance_increments.get(&withdrawal.address) { + withdrawal_bal.push( + AccountChanges::new(withdrawal.address).with_balance_change( + BalanceChange::new( + last_bal_index, + U256::from(initial.saturating_add(U256::from(*balance))), + ), + ), + ); + } else { + withdrawal_bal.push(AccountChanges::new(withdrawal.address)); + } + } + } + // tracing::debug!("Block Access List converted to alloy: {:?}", alloy_bal); + sort_and_remove_duplicates_in_bal(alloy_bal, withdrawal_bal) + } else { + ::tracing::debug!("No Block Access List found in revm db; using default"); + BlockAccessList::default() + } + } else { + BlockAccessList::default() + } + .to_vec(); + // tracing::debug!("Before coinbase:{:?}", bal); + + let beneficiary = self.evm.block().beneficiary(); + if self.receipts.len() == 0 { + bal = + bal.into_iter() + .filter(|a| { + if a.address == beneficiary { + !a.balance_changes.is_empty() + } else { + true + } + }) + .collect(); + // tracing::debug!("After coinbase:{:?}", bal); + } + tracing::debug!("Block Coinbase: {}", beneficiary); Ok(( self.evm, BlockExecutionResult { @@ -241,6 +326,7 @@ where requests, gas_used: self.gas_used, blob_gas_used: self.blob_gas_used, + block_access_list: Some(bal), }, )) } @@ -324,3 +410,37 @@ where EthBlockExecutor::new(evm, ctx, &self.spec, &self.receipt_builder) } } + +/// Sort block-level access list and removes duplicates entries by merging them together. +pub fn sort_and_remove_duplicates_in_bal( + mut alloy_bal: BlockAccessList, + withdrawal_bal: BlockAccessList, +) -> BlockAccessList { + tracing::debug!("Bal before modification:{:?}", alloy_bal); + // tracing::debug!("Withdrawal bal before: {:?}", withdrawal_bal); + let mut last_per_address = HashMap::new(); + for account in withdrawal_bal { + last_per_address.insert(account.address, account); + } + // tracing::debug!("Withdrawal bal after: {:?}", last_per_address); + alloy_bal.extend(last_per_address.into_values()); + + alloy_bal.sort_by_key(|ac| ac.address); + + let mut merged: Vec = Vec::new(); + for account in alloy_bal { + if let Some(last) = merged.last_mut() { + if last.address == account.address { + last.storage_changes.extend(account.storage_changes); + last.storage_reads.extend(account.storage_reads); + last.balance_changes.extend(account.balance_changes); + last.nonce_changes.extend(account.nonce_changes); + last.code_changes.extend(account.code_changes); + continue; + } + } + merged.push(account); + } + tracing::debug!("Bal after modification:{:?}", merged); + merged +} diff --git a/crates/evm/src/overrides.rs b/crates/evm/src/overrides.rs index ce71c90b..d9d9126a 100644 --- a/crates/evm/src/overrides.rs +++ b/crates/evm/src/overrides.rs @@ -148,6 +148,7 @@ where status: AccountStatus::Touched, storage: Default::default(), transaction_id: 0, + ..Default::default() }; let storage_diff = match (account_override.state, account_override.state_diff) { diff --git a/crates/op-evm/Cargo.toml b/crates/op-evm/Cargo.toml index a959fb09..1a802a46 100644 --- a/crates/op-evm/Cargo.toml +++ b/crates/op-evm/Cargo.toml @@ -46,4 +46,3 @@ std = [ "op-alloy/std", "thiserror/std" ] -asm-keccak = ["alloy-evm/asm-keccak", "alloy-primitives/asm-keccak", "revm/asm-keccak"] diff --git a/crates/op-evm/src/block/mod.rs b/crates/op-evm/src/block/mod.rs index 9d44a64d..e77a51af 100644 --- a/crates/op-evm/src/block/mod.rs +++ b/crates/op-evm/src/block/mod.rs @@ -351,6 +351,7 @@ where requests: Default::default(), gas_used: legacy_gas_used, blob_gas_used: self.da_footprint_used, + block_access_list: None, }, )) } diff --git a/crates/op-evm/src/lib.rs b/crates/op-evm/src/lib.rs index 3d8f3804..eec28ea1 100644 --- a/crates/op-evm/src/lib.rs +++ b/crates/op-evm/src/lib.rs @@ -211,168 +211,168 @@ impl EvmFactory for OpEvmFactory { } } -#[cfg(test)] -mod tests { - use alloc::{string::ToString, vec}; - use alloy_evm::{ - precompiles::{Precompile, PrecompileInput}, - EvmInternals, - }; - use alloy_primitives::U256; - use op_revm::precompiles::{bls12_381, bn254_pair}; - use revm::{ - context::{CfgEnv, JournalTr}, - database::EmptyDB, - precompile::PrecompileError, - Journal, JournalEntry, - }; - - use super::*; - - #[test] - fn test_precompiles_jovian_fail() { - let evm = OpEvmFactory::default().create_evm( - EmptyDB::default(), - EvmEnv::new(CfgEnv::new_with_spec(OpSpecId::JOVIAN), BlockEnv::default()), - ); - - let jovian_precompile = evm.precompiles().get(bn254_pair::JOVIAN.address()).unwrap(); - let result = jovian_precompile.call(PrecompileInput { - data: &vec![0; bn254_pair::JOVIAN_MAX_INPUT_SIZE + 1], - gas: u64::MAX, - caller: Address::ZERO, - value: U256::ZERO, - target_address: Address::ZERO, - bytecode_address: Address::ZERO, - internals: EvmInternals::new( - &mut Journal::::new(EmptyDB::default()), - &BlockEnv::default(), - ), - }); - - assert!(result.is_err()); - assert!(matches!(result.unwrap_err(), PrecompileError::Bn254PairLength)); - - let jovian_precompile = evm.precompiles().get(bls12_381::JOVIAN_G1_MSM.address()).unwrap(); - let result = jovian_precompile.call(PrecompileInput { - data: &vec![0; bls12_381::JOVIAN_G1_MSM_MAX_INPUT_SIZE + 1], - gas: u64::MAX, - caller: Address::ZERO, - value: U256::ZERO, - target_address: Address::ZERO, - bytecode_address: Address::ZERO, - internals: EvmInternals::new( - &mut Journal::::new(EmptyDB::default()), - &BlockEnv::default(), - ), - }); - - assert!(result.is_err()); - assert!(result.unwrap_err().to_string().contains("G1MSM input length too long")); - - let jovian_precompile = evm.precompiles().get(bls12_381::JOVIAN_G2_MSM.address()).unwrap(); - let result = jovian_precompile.call(PrecompileInput { - data: &vec![0; bls12_381::JOVIAN_G2_MSM_MAX_INPUT_SIZE + 1], - gas: u64::MAX, - caller: Address::ZERO, - value: U256::ZERO, - target_address: Address::ZERO, - bytecode_address: Address::ZERO, - internals: EvmInternals::new( - &mut Journal::::new(EmptyDB::default()), - &BlockEnv::default(), - ), - }); - - assert!(result.is_err()); - assert!(result.unwrap_err().to_string().contains("G2MSM input length too long")); - - let jovian_precompile = evm.precompiles().get(bls12_381::JOVIAN_PAIRING.address()).unwrap(); - let result = jovian_precompile.call(PrecompileInput { - data: &vec![0; bls12_381::JOVIAN_PAIRING_MAX_INPUT_SIZE + 1], - gas: u64::MAX, - caller: Address::ZERO, - value: U256::ZERO, - target_address: Address::ZERO, - bytecode_address: Address::ZERO, - internals: EvmInternals::new( - &mut Journal::::new(EmptyDB::default()), - &BlockEnv::default(), - ), - }); - - assert!(result.is_err()); - assert!(result.unwrap_err().to_string().contains("Pairing input length too long")); - } - - #[test] - fn test_precompiles_jovian() { - let evm = OpEvmFactory::default().create_evm( - EmptyDB::default(), - EvmEnv::new(CfgEnv::new_with_spec(OpSpecId::JOVIAN), BlockEnv::default()), - ); - let jovian_precompile = evm.precompiles().get(bn254_pair::JOVIAN.address()).unwrap(); - let result = jovian_precompile.call(PrecompileInput { - data: &vec![0; bn254_pair::JOVIAN_MAX_INPUT_SIZE], - gas: u64::MAX, - caller: Address::ZERO, - value: U256::ZERO, - target_address: Address::ZERO, - bytecode_address: Address::ZERO, - internals: EvmInternals::new( - &mut Journal::::new(EmptyDB::default()), - &BlockEnv::default(), - ), - }); - - assert!(result.is_ok()); - - let jovian_precompile = evm.precompiles().get(bls12_381::JOVIAN_G1_MSM.address()).unwrap(); - let result = jovian_precompile.call(PrecompileInput { - data: &vec![0; bls12_381::JOVIAN_G1_MSM_MAX_INPUT_SIZE], - gas: u64::MAX, - caller: Address::ZERO, - value: U256::ZERO, - target_address: Address::ZERO, - bytecode_address: Address::ZERO, - internals: EvmInternals::new( - &mut Journal::::new(EmptyDB::default()), - &BlockEnv::default(), - ), - }); - - assert!(result.is_ok()); - - let jovian_precompile = evm.precompiles().get(bls12_381::JOVIAN_G2_MSM.address()).unwrap(); - let result = jovian_precompile.call(PrecompileInput { - data: &vec![0; bls12_381::JOVIAN_G2_MSM_MAX_INPUT_SIZE], - gas: u64::MAX, - caller: Address::ZERO, - value: U256::ZERO, - target_address: Address::ZERO, - bytecode_address: Address::ZERO, - internals: EvmInternals::new( - &mut Journal::::new(EmptyDB::default()), - &BlockEnv::default(), - ), - }); - - assert!(result.is_ok()); - - let jovian_precompile = evm.precompiles().get(bls12_381::JOVIAN_PAIRING.address()).unwrap(); - let result = jovian_precompile.call(PrecompileInput { - data: &vec![0; bls12_381::JOVIAN_PAIRING_MAX_INPUT_SIZE], - gas: u64::MAX, - caller: Address::ZERO, - value: U256::ZERO, - target_address: Address::ZERO, - bytecode_address: Address::ZERO, - internals: EvmInternals::new( - &mut Journal::::new(EmptyDB::default()), - &BlockEnv::default(), - ), - }); - - assert!(result.is_ok()); - } -} +// #[cfg(test)] +// mod tests { +// use alloc::{string::ToString, vec}; +// use alloy_evm::{ +// precompiles::{Precompile, PrecompileInput}, +// EvmInternals, +// }; +// use alloy_primitives::U256; +// use op_revm::precompiles::{bls12_381, bn254_pair}; +// use revm::{ +// context::{CfgEnv, JournalTr}, +// database::EmptyDB, +// precompile::PrecompileError, +// Journal, JournalEntry, +// }; + +// use super::*; + +// #[test] +// fn test_precompiles_jovian_fail() { +// let evm = OpEvmFactory::default().create_evm( +// EmptyDB::default(), +// EvmEnv::new(CfgEnv::new_with_spec(OpSpecId::JOVIAN), BlockEnv::default()), +// ); + +// let jovian_precompile = evm.precompiles().get(bn254_pair::JOVIAN.address()).unwrap(); +// let result = jovian_precompile.call(PrecompileInput { +// data: &vec![0; bn254_pair::JOVIAN_MAX_INPUT_SIZE + 1], +// gas: u64::MAX, +// caller: Address::ZERO, +// value: U256::ZERO, +// target_address: Address::ZERO, +// bytecode_address: Address::ZERO, +// internals: EvmInternals::new( +// &mut Journal::::new(EmptyDB::default()), +// &BlockEnv::default(), +// ), +// }); + +// assert!(result.is_err()); +// assert!(matches!(result.unwrap_err(), PrecompileError::Bn254PairLength)); + +// let jovian_precompile = +// evm.precompiles().get(bls12_381::JOVIAN_G1_MSM.address()).unwrap(); let result = +// jovian_precompile.call(PrecompileInput { data: &vec![0; +// bls12_381::JOVIAN_G1_MSM_MAX_INPUT_SIZE + 1], gas: u64::MAX, +// caller: Address::ZERO, +// value: U256::ZERO, +// target_address: Address::ZERO, +// bytecode_address: Address::ZERO, +// internals: EvmInternals::new( +// &mut Journal::::new(EmptyDB::default()), +// &BlockEnv::default(), +// ), +// }); + +// assert!(result.is_err()); +// assert!(result.unwrap_err().to_string().contains("G1MSM input length too long")); + +// let jovian_precompile = +// evm.precompiles().get(bls12_381::JOVIAN_G2_MSM.address()).unwrap(); let result = +// jovian_precompile.call(PrecompileInput { data: &vec![0; +// bls12_381::JOVIAN_G2_MSM_MAX_INPUT_SIZE + 1], gas: u64::MAX, +// caller: Address::ZERO, +// value: U256::ZERO, +// target_address: Address::ZERO, +// bytecode_address: Address::ZERO, +// internals: EvmInternals::new( +// &mut Journal::::new(EmptyDB::default()), +// &BlockEnv::default(), +// ), +// }); + +// assert!(result.is_err()); +// assert!(result.unwrap_err().to_string().contains("G2MSM input length too long")); + +// let jovian_precompile = +// evm.precompiles().get(bls12_381::JOVIAN_PAIRING.address()).unwrap(); let result = +// jovian_precompile.call(PrecompileInput { data: &vec![0; +// bls12_381::JOVIAN_PAIRING_MAX_INPUT_SIZE + 1], gas: u64::MAX, +// caller: Address::ZERO, +// value: U256::ZERO, +// target_address: Address::ZERO, +// bytecode_address: Address::ZERO, +// internals: EvmInternals::new( +// &mut Journal::::new(EmptyDB::default()), +// &BlockEnv::default(), +// ), +// }); + +// assert!(result.is_err()); +// assert!(result.unwrap_err().to_string().contains("Pairing input length too long")); +// } + +// #[test] +// fn test_precompiles_jovian() { +// let evm = OpEvmFactory::default().create_evm( +// EmptyDB::default(), +// EvmEnv::new(CfgEnv::new_with_spec(OpSpecId::JOVIAN), BlockEnv::default()), +// ); +// let jovian_precompile = evm.precompiles().get(bn254_pair::JOVIAN.address()).unwrap(); +// let result = jovian_precompile.call(PrecompileInput { +// data: &vec![0; bn254_pair::JOVIAN_MAX_INPUT_SIZE], +// gas: u64::MAX, +// caller: Address::ZERO, +// value: U256::ZERO, +// target_address: Address::ZERO, +// bytecode_address: Address::ZERO, +// internals: EvmInternals::new( +// &mut Journal::::new(EmptyDB::default()), +// &BlockEnv::default(), +// ), +// }); + +// assert!(result.is_ok()); + +// let jovian_precompile = +// evm.precompiles().get(bls12_381::JOVIAN_G1_MSM.address()).unwrap(); let result = +// jovian_precompile.call(PrecompileInput { data: &vec![0; +// bls12_381::JOVIAN_G1_MSM_MAX_INPUT_SIZE], gas: u64::MAX, +// caller: Address::ZERO, +// value: U256::ZERO, +// target_address: Address::ZERO, +// bytecode_address: Address::ZERO, +// internals: EvmInternals::new( +// &mut Journal::::new(EmptyDB::default()), +// &BlockEnv::default(), +// ), +// }); + +// assert!(result.is_ok()); + +// let jovian_precompile = +// evm.precompiles().get(bls12_381::JOVIAN_G2_MSM.address()).unwrap(); let result = +// jovian_precompile.call(PrecompileInput { data: &vec![0; +// bls12_381::JOVIAN_G2_MSM_MAX_INPUT_SIZE], gas: u64::MAX, +// caller: Address::ZERO, +// value: U256::ZERO, +// target_address: Address::ZERO, +// bytecode_address: Address::ZERO, +// internals: EvmInternals::new( +// &mut Journal::::new(EmptyDB::default()), +// &BlockEnv::default(), +// ), +// }); + +// assert!(result.is_ok()); + +// let jovian_precompile = +// evm.precompiles().get(bls12_381::JOVIAN_PAIRING.address()).unwrap(); let result = +// jovian_precompile.call(PrecompileInput { data: &vec![0; +// bls12_381::JOVIAN_PAIRING_MAX_INPUT_SIZE], gas: u64::MAX, +// caller: Address::ZERO, +// value: U256::ZERO, +// target_address: Address::ZERO, +// bytecode_address: Address::ZERO, +// internals: EvmInternals::new( +// &mut Journal::::new(EmptyDB::default()), +// &BlockEnv::default(), +// ), +// }); + +// assert!(result.is_ok()); +// } +// }