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: push0 should increment program counter by 1 instead of 2 #803

Merged
merged 4 commits into from
Jul 26, 2023
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
10 changes: 5 additions & 5 deletions Cargo.lock

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

25 changes: 25 additions & 0 deletions engine-tests/src/tests/sanity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -694,6 +694,31 @@ fn test_eth_transfer_incorrect_nonce() {
utils::validate_address_balance_and_nonce(&runner, dest_address, Wei::zero(), 0.into());
}

#[test]
fn test_tx_support_shanghai() {
let (mut runner, mut source_account, _) = initialize_transfer();
// Encoded EVM transaction with parameter: `evmVersion: 'shanghai'`.
let data = "6080604052348015600e575f80fd5b50607480601a5f395ff3fe6080604052348015600e575\
f80fd5b50600436106026575f3560e01c8063919840ad14602a575b5f80fd5b600560405190815260200160\
405180910390f3fea2646970667358221220cb01b9b9c75e5cd079a1980af2fe4397d2029888d12737d74cb\
bc10e0de65bd364736f6c63430008150033";

let result = runner
.submit_with_signer(&mut source_account, |nonce| {
aurora_engine_transactions::legacy::TransactionLegacy {
nonce,
gas_price: 0.into(),
gas_limit: u64::MAX.into(),
to: None,
value: Wei::zero(),
data: hex::decode(data).unwrap(),
}
})
.expect("Should be able to execute EVM bytecode including PUSH0");

assert!(result.status.is_ok());
}

#[test]
fn test_eth_transfer_not_enough_gas() {
let (mut runner, mut source_account, dest_address) = initialize_transfer();
Expand Down
Loading