Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(evm): supports EVMLA PUSHSIZE #126

Merged
merged 3 commits into from
Dec 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions benchmark_analyzer/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ pub use self::benchmark::group::element::Element as BenchmarkElement;
pub use self::benchmark::group::Group as BenchmarkGroup;
pub use self::benchmark::metadata::Metadata;
pub use self::benchmark::Benchmark;

///
/// The all elements group name.
///
Expand Down
9 changes: 6 additions & 3 deletions compiler_tester/src/test/case/input/deploy_evm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,11 +131,14 @@ impl DeployEVM {
contract_identifier: self.identifier.clone(),
},
);

let size = self.deploy_code.len();
let calldata = self.calldata.inner.clone();
let mut code = self.deploy_code;
code.extend(self.calldata.inner);

let vm = vm.update_deploy_balance(&self.caller);
let mut vm =
vm.fill_deploy_new_transaction(self.caller, self.value, evm_version, self.deploy_code);
let mut vm = vm.fill_deploy_new_transaction(self.caller, self.value, evm_version, code);

let result = match vm.state.transact_commit() {
Ok(res) => res,
Expand Down Expand Up @@ -175,7 +178,7 @@ impl DeployEVM {
} else if let Some(error) = error {
Summary::invalid(summary, test, format!("{error:?}"));
} else {
Summary::failed(summary, test, self.expected, output, self.calldata.inner);
Summary::failed(summary, test, self.expected, output, calldata);
}

vm
Expand Down
4 changes: 2 additions & 2 deletions compiler_tester/src/vm/revm/init.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ impl<'a> Revm<'a> {
caller: web3::types::Address,
value: Option<u128>,
evm_version: Option<EVMVersion>,
deploy_code: Vec<u8>,
code: Vec<u8>,
) -> Self {
let vm = self
.state
Expand All @@ -146,7 +146,7 @@ impl<'a> Revm<'a> {
env.tx.gas_limit = evm_context.block_gas_limit;
env.tx.access_list = vec![];
env.tx.caller = web3_address_to_revm_address(&caller);
env.tx.data = revm::primitives::Bytes::from(deploy_code);
env.tx.data = revm::primitives::Bytes::from(code);
env.tx.value = revm::primitives::U256::from(value.unwrap_or_default());
env.tx.transact_to = TxKind::Create;
})
Expand Down
Loading