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: remove unnecessary tx version check #1648

Merged
merged 1 commit into from
Nov 29, 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: 0 additions & 6 deletions cairo_zero/kakarot/accounts/account_contract.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ from starkware.cairo.common.math import assert_le, assert_not_zero, assert_le_fe
from starkware.cairo.common.math_cmp import is_nn
from starkware.cairo.common.uint256 import Uint256
from starkware.starknet.common.syscalls import (
get_tx_info,
get_caller_address,
get_block_timestamp,
call_contract,
Expand Down Expand Up @@ -109,11 +108,6 @@ func execute_from_outside{
with_attr error_message("EOA: multicall not supported") {
assert call_array_len = 1;
}
let (tx_info) = get_tx_info();
let version = tx_info.version;
with_attr error_message("Deprecated tx version: 0") {
assert_le(1, version);
}

// EOA validation
let (bytecode_len) = Account_bytecode_len.read();
Expand Down
19 changes: 0 additions & 19 deletions cairo_zero/tests/src/kakarot/accounts/test_account_contract.py
Original file line number Diff line number Diff line change
Expand Up @@ -579,25 +579,6 @@ def test_should_raise_when_call_array_has_more_than_one_call(self, cairo_run):
signature=[],
)

@patch.dict(SyscallHandler.tx_info, {"version": 0})
def test_should_raise_when_tx_version_is_zero(self, cairo_run):
with cairo_error(message="Deprecated tx version: 0"):
cairo_run(
"test__execute_from_outside_entrypoint",
outside_execution={
"caller": SyscallHandler.caller_address,
"nonce": 0,
"execute_after": 0,
"execute_before": SyscallHandler.block_timestamp + 1,
},
call_array=[
{"to": 0, "selector": 0, "data_offset": 0, "data_len": 0},
],
calldata=[],
calldata_len=0,
signature=[],
)

@SyscallHandler.patch("Account_bytecode_len", 1)
def test_should_raise_when_eoa_has_code(self, cairo_run):
with cairo_error(message="EOAs cannot have code"):
Expand Down