Skip to content
Open
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
3 changes: 1 addition & 2 deletions src/ethereum/forks/amsterdam/transactions.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,6 @@
Gas cost for including a storage key in the access list of a transaction.
"""

TX_MAX_GAS_LIMIT = Uint(16_777_216)


@slotted_freezable
@dataclass
Expand Down Expand Up @@ -579,6 +577,7 @@ def validate_transaction(tx: Transaction) -> Tuple[Uint, Uint]:
[EIP-2681]: https://eips.ethereum.org/EIPS/eip-2681
[EIP-7623]: https://eips.ethereum.org/EIPS/eip-7623
"""
from .vm.gas import TX_MAX_GAS_LIMIT
from .vm.interpreter import MAX_INIT_CODE_SIZE

intrinsic_gas, data_floor_gas_cost = calculate_intrinsic_cost(tx)
Expand Down
7 changes: 5 additions & 2 deletions src/ethereum/forks/amsterdam/vm/eoa_delegation.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,18 @@
set_code,
)
from ..utils.hexadecimal import hex_to_address
from ..vm.gas import GAS_COLD_ACCOUNT_ACCESS, GAS_WARM_ACCESS
from ..vm.gas import (
GAS_COLD_ACCOUNT_ACCESS,
GAS_WARM_ACCESS,
REFUND_AUTH_PER_EXISTING_ACCOUNT,
)
from . import Evm, Message

SET_CODE_TX_MAGIC = b"\x05"
EOA_DELEGATION_MARKER = b"\xef\x01\x00"
EOA_DELEGATION_MARKER_LENGTH = len(EOA_DELEGATION_MARKER)
EOA_DELEGATED_CODE_LENGTH = 23
GAS_AUTH_PER_EMPTY_ACCOUNT = 25000
REFUND_AUTH_PER_EXISTING_ACCOUNT = 12500
NULL_ADDRESS = hex_to_address("0x0000000000000000000000000000000000000000")


Expand Down
3 changes: 3 additions & 0 deletions src/ethereum/forks/amsterdam/vm/gas.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@

GAS_BLOCK_ACCESS_LIST_ITEM = Uint(2000)

REFUND_AUTH_PER_EXISTING_ACCOUNT = 12500
TX_MAX_GAS_LIMIT = Uint(16_777_216)


@dataclass
class ExtendMemory:
Expand Down
3 changes: 1 addition & 2 deletions src/ethereum/forks/bpo1/transactions.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,6 @@
Gas cost for including a storage key in the access list of a transaction.
"""

TX_MAX_GAS_LIMIT = Uint(16_777_216)


@slotted_freezable
@dataclass
Expand Down Expand Up @@ -572,6 +570,7 @@ def validate_transaction(tx: Transaction) -> Tuple[Uint, Uint]:
[EIP-2681]: https://eips.ethereum.org/EIPS/eip-2681
[EIP-7623]: https://eips.ethereum.org/EIPS/eip-7623
"""
from .vm.gas import TX_MAX_GAS_LIMIT
from .vm.interpreter import MAX_INIT_CODE_SIZE

intrinsic_gas, calldata_floor_gas_cost = calculate_intrinsic_cost(tx)
Expand Down
7 changes: 5 additions & 2 deletions src/ethereum/forks/bpo1/vm/eoa_delegation.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,18 @@
set_code,
)
from ..utils.hexadecimal import hex_to_address
from ..vm.gas import GAS_COLD_ACCOUNT_ACCESS, GAS_WARM_ACCESS
from ..vm.gas import (
GAS_COLD_ACCOUNT_ACCESS,
GAS_WARM_ACCESS,
REFUND_AUTH_PER_EXISTING_ACCOUNT,
)
from . import Evm, Message

SET_CODE_TX_MAGIC = b"\x05"
EOA_DELEGATION_MARKER = b"\xef\x01\x00"
EOA_DELEGATION_MARKER_LENGTH = len(EOA_DELEGATION_MARKER)
EOA_DELEGATED_CODE_LENGTH = 23
GAS_AUTH_PER_EMPTY_ACCOUNT = 25000
REFUND_AUTH_PER_EXISTING_ACCOUNT = 12500
NULL_ADDRESS = hex_to_address("0x0000000000000000000000000000000000000000")


Expand Down
3 changes: 3 additions & 0 deletions src/ethereum/forks/bpo1/vm/gas.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@
GAS_PRECOMPILE_BLS_G2MUL = Uint(22500)
GAS_PRECOMPILE_BLS_G2MAP = Uint(23800)

REFUND_AUTH_PER_EXISTING_ACCOUNT = 12500
TX_MAX_GAS_LIMIT = Uint(16_777_216)


@dataclass
class ExtendMemory:
Expand Down
3 changes: 1 addition & 2 deletions src/ethereum/forks/bpo2/transactions.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,6 @@
Gas cost for including a storage key in the access list of a transaction.
"""

TX_MAX_GAS_LIMIT = Uint(16_777_216)


@slotted_freezable
@dataclass
Expand Down Expand Up @@ -572,6 +570,7 @@ def validate_transaction(tx: Transaction) -> Tuple[Uint, Uint]:
[EIP-2681]: https://eips.ethereum.org/EIPS/eip-2681
[EIP-7623]: https://eips.ethereum.org/EIPS/eip-7623
"""
from .vm.gas import TX_MAX_GAS_LIMIT
from .vm.interpreter import MAX_INIT_CODE_SIZE

intrinsic_gas, calldata_floor_gas_cost = calculate_intrinsic_cost(tx)
Expand Down
7 changes: 5 additions & 2 deletions src/ethereum/forks/bpo2/vm/eoa_delegation.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,18 @@
set_code,
)
from ..utils.hexadecimal import hex_to_address
from ..vm.gas import GAS_COLD_ACCOUNT_ACCESS, GAS_WARM_ACCESS
from ..vm.gas import (
GAS_COLD_ACCOUNT_ACCESS,
GAS_WARM_ACCESS,
REFUND_AUTH_PER_EXISTING_ACCOUNT,
)
from . import Evm, Message

SET_CODE_TX_MAGIC = b"\x05"
EOA_DELEGATION_MARKER = b"\xef\x01\x00"
EOA_DELEGATION_MARKER_LENGTH = len(EOA_DELEGATION_MARKER)
EOA_DELEGATED_CODE_LENGTH = 23
GAS_AUTH_PER_EMPTY_ACCOUNT = 25000
REFUND_AUTH_PER_EXISTING_ACCOUNT = 12500
NULL_ADDRESS = hex_to_address("0x0000000000000000000000000000000000000000")


Expand Down
3 changes: 3 additions & 0 deletions src/ethereum/forks/bpo2/vm/gas.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@
GAS_PRECOMPILE_BLS_G2MUL = Uint(22500)
GAS_PRECOMPILE_BLS_G2MAP = Uint(23800)

REFUND_AUTH_PER_EXISTING_ACCOUNT = 12500
TX_MAX_GAS_LIMIT = Uint(16_777_216)


@dataclass
class ExtendMemory:
Expand Down
3 changes: 1 addition & 2 deletions src/ethereum/forks/bpo3/transactions.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,6 @@
Gas cost for including a storage key in the access list of a transaction.
"""

TX_MAX_GAS_LIMIT = Uint(16_777_216)


@slotted_freezable
@dataclass
Expand Down Expand Up @@ -572,6 +570,7 @@ def validate_transaction(tx: Transaction) -> Tuple[Uint, Uint]:
[EIP-2681]: https://eips.ethereum.org/EIPS/eip-2681
[EIP-7623]: https://eips.ethereum.org/EIPS/eip-7623
"""
from .vm.gas import TX_MAX_GAS_LIMIT
from .vm.interpreter import MAX_INIT_CODE_SIZE

intrinsic_gas, calldata_floor_gas_cost = calculate_intrinsic_cost(tx)
Expand Down
7 changes: 5 additions & 2 deletions src/ethereum/forks/bpo3/vm/eoa_delegation.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,18 @@
set_code,
)
from ..utils.hexadecimal import hex_to_address
from ..vm.gas import GAS_COLD_ACCOUNT_ACCESS, GAS_WARM_ACCESS
from ..vm.gas import (
GAS_COLD_ACCOUNT_ACCESS,
GAS_WARM_ACCESS,
REFUND_AUTH_PER_EXISTING_ACCOUNT,
)
from . import Evm, Message

SET_CODE_TX_MAGIC = b"\x05"
EOA_DELEGATION_MARKER = b"\xef\x01\x00"
EOA_DELEGATION_MARKER_LENGTH = len(EOA_DELEGATION_MARKER)
EOA_DELEGATED_CODE_LENGTH = 23
GAS_AUTH_PER_EMPTY_ACCOUNT = 25000
REFUND_AUTH_PER_EXISTING_ACCOUNT = 12500
NULL_ADDRESS = hex_to_address("0x0000000000000000000000000000000000000000")


Expand Down
3 changes: 3 additions & 0 deletions src/ethereum/forks/bpo3/vm/gas.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@
GAS_PRECOMPILE_BLS_G2MUL = Uint(22500)
GAS_PRECOMPILE_BLS_G2MAP = Uint(23800)

REFUND_AUTH_PER_EXISTING_ACCOUNT = 12500
TX_MAX_GAS_LIMIT = Uint(16_777_216)


@dataclass
class ExtendMemory:
Expand Down
3 changes: 1 addition & 2 deletions src/ethereum/forks/bpo4/transactions.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,6 @@
Gas cost for including a storage key in the access list of a transaction.
"""

TX_MAX_GAS_LIMIT = Uint(16_777_216)


@slotted_freezable
@dataclass
Expand Down Expand Up @@ -572,6 +570,7 @@ def validate_transaction(tx: Transaction) -> Tuple[Uint, Uint]:
[EIP-2681]: https://eips.ethereum.org/EIPS/eip-2681
[EIP-7623]: https://eips.ethereum.org/EIPS/eip-7623
"""
from .vm.gas import TX_MAX_GAS_LIMIT
from .vm.interpreter import MAX_INIT_CODE_SIZE

intrinsic_gas, calldata_floor_gas_cost = calculate_intrinsic_cost(tx)
Expand Down
7 changes: 5 additions & 2 deletions src/ethereum/forks/bpo4/vm/eoa_delegation.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,18 @@
set_code,
)
from ..utils.hexadecimal import hex_to_address
from ..vm.gas import GAS_COLD_ACCOUNT_ACCESS, GAS_WARM_ACCESS
from ..vm.gas import (
GAS_COLD_ACCOUNT_ACCESS,
GAS_WARM_ACCESS,
REFUND_AUTH_PER_EXISTING_ACCOUNT,
)
from . import Evm, Message

SET_CODE_TX_MAGIC = b"\x05"
EOA_DELEGATION_MARKER = b"\xef\x01\x00"
EOA_DELEGATION_MARKER_LENGTH = len(EOA_DELEGATION_MARKER)
EOA_DELEGATED_CODE_LENGTH = 23
GAS_AUTH_PER_EMPTY_ACCOUNT = 25000
REFUND_AUTH_PER_EXISTING_ACCOUNT = 12500
NULL_ADDRESS = hex_to_address("0x0000000000000000000000000000000000000000")


Expand Down
3 changes: 3 additions & 0 deletions src/ethereum/forks/bpo4/vm/gas.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@
GAS_PRECOMPILE_BLS_G2MUL = Uint(22500)
GAS_PRECOMPILE_BLS_G2MAP = Uint(23800)

REFUND_AUTH_PER_EXISTING_ACCOUNT = 12500
TX_MAX_GAS_LIMIT = Uint(16_777_216)


@dataclass
class ExtendMemory:
Expand Down
3 changes: 1 addition & 2 deletions src/ethereum/forks/bpo5/transactions.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,6 @@
Gas cost for including a storage key in the access list of a transaction.
"""

TX_MAX_GAS_LIMIT = Uint(16_777_216)


@slotted_freezable
@dataclass
Expand Down Expand Up @@ -572,6 +570,7 @@ def validate_transaction(tx: Transaction) -> Tuple[Uint, Uint]:
[EIP-2681]: https://eips.ethereum.org/EIPS/eip-2681
[EIP-7623]: https://eips.ethereum.org/EIPS/eip-7623
"""
from .vm.gas import TX_MAX_GAS_LIMIT
from .vm.interpreter import MAX_INIT_CODE_SIZE

intrinsic_gas, calldata_floor_gas_cost = calculate_intrinsic_cost(tx)
Expand Down
7 changes: 5 additions & 2 deletions src/ethereum/forks/bpo5/vm/eoa_delegation.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,18 @@
set_code,
)
from ..utils.hexadecimal import hex_to_address
from ..vm.gas import GAS_COLD_ACCOUNT_ACCESS, GAS_WARM_ACCESS
from ..vm.gas import (
GAS_COLD_ACCOUNT_ACCESS,
GAS_WARM_ACCESS,
REFUND_AUTH_PER_EXISTING_ACCOUNT,
)
from . import Evm, Message

SET_CODE_TX_MAGIC = b"\x05"
EOA_DELEGATION_MARKER = b"\xef\x01\x00"
EOA_DELEGATION_MARKER_LENGTH = len(EOA_DELEGATION_MARKER)
EOA_DELEGATED_CODE_LENGTH = 23
GAS_AUTH_PER_EMPTY_ACCOUNT = 25000
REFUND_AUTH_PER_EXISTING_ACCOUNT = 12500
NULL_ADDRESS = hex_to_address("0x0000000000000000000000000000000000000000")


Expand Down
3 changes: 3 additions & 0 deletions src/ethereum/forks/bpo5/vm/gas.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@
GAS_PRECOMPILE_BLS_G2MUL = Uint(22500)
GAS_PRECOMPILE_BLS_G2MAP = Uint(23800)

REFUND_AUTH_PER_EXISTING_ACCOUNT = 12500
TX_MAX_GAS_LIMIT = Uint(16_777_216)


@dataclass
class ExtendMemory:
Expand Down
3 changes: 1 addition & 2 deletions src/ethereum/forks/osaka/transactions.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,6 @@
Gas cost for including a storage key in the access list of a transaction.
"""

TX_MAX_GAS_LIMIT = Uint(16_777_216)


@slotted_freezable
@dataclass
Expand Down Expand Up @@ -572,6 +570,7 @@ def validate_transaction(tx: Transaction) -> Tuple[Uint, Uint]:
[EIP-2681]: https://eips.ethereum.org/EIPS/eip-2681
[EIP-7623]: https://eips.ethereum.org/EIPS/eip-7623
"""
from .vm.gas import TX_MAX_GAS_LIMIT
from .vm.interpreter import MAX_INIT_CODE_SIZE

intrinsic_gas, calldata_floor_gas_cost = calculate_intrinsic_cost(tx)
Expand Down
7 changes: 5 additions & 2 deletions src/ethereum/forks/osaka/vm/eoa_delegation.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,18 @@
set_code,
)
from ..utils.hexadecimal import hex_to_address
from ..vm.gas import GAS_COLD_ACCOUNT_ACCESS, GAS_WARM_ACCESS
from ..vm.gas import (
GAS_COLD_ACCOUNT_ACCESS,
GAS_WARM_ACCESS,
REFUND_AUTH_PER_EXISTING_ACCOUNT,
)
from . import Evm, Message

SET_CODE_TX_MAGIC = b"\x05"
EOA_DELEGATION_MARKER = b"\xef\x01\x00"
EOA_DELEGATION_MARKER_LENGTH = len(EOA_DELEGATION_MARKER)
EOA_DELEGATED_CODE_LENGTH = 23
GAS_AUTH_PER_EMPTY_ACCOUNT = 25000
REFUND_AUTH_PER_EXISTING_ACCOUNT = 12500
NULL_ADDRESS = hex_to_address("0x0000000000000000000000000000000000000000")


Expand Down
3 changes: 3 additions & 0 deletions src/ethereum/forks/osaka/vm/gas.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@
GAS_PRECOMPILE_BLS_G2MUL = Uint(22500)
GAS_PRECOMPILE_BLS_G2MAP = Uint(23800)

REFUND_AUTH_PER_EXISTING_ACCOUNT = 12500
TX_MAX_GAS_LIMIT = Uint(16_777_216)


@dataclass
class ExtendMemory:
Expand Down
7 changes: 5 additions & 2 deletions src/ethereum/forks/prague/vm/eoa_delegation.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,18 @@
set_code,
)
from ..utils.hexadecimal import hex_to_address
from ..vm.gas import GAS_COLD_ACCOUNT_ACCESS, GAS_WARM_ACCESS
from ..vm.gas import (
GAS_COLD_ACCOUNT_ACCESS,
GAS_WARM_ACCESS,
REFUND_AUTH_PER_EXISTING_ACCOUNT,
)
from . import Evm, Message

SET_CODE_TX_MAGIC = b"\x05"
EOA_DELEGATION_MARKER = b"\xef\x01\x00"
EOA_DELEGATION_MARKER_LENGTH = len(EOA_DELEGATION_MARKER)
EOA_DELEGATED_CODE_LENGTH = 23
GAS_AUTH_PER_EMPTY_ACCOUNT = 25000
REFUND_AUTH_PER_EXISTING_ACCOUNT = 12500
NULL_ADDRESS = hex_to_address("0x0000000000000000000000000000000000000000")


Expand Down
2 changes: 2 additions & 0 deletions src/ethereum/forks/prague/vm/gas.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@
GAS_PRECOMPILE_BLS_G2MUL = Uint(22500)
GAS_PRECOMPILE_BLS_G2MAP = Uint(23800)

REFUND_AUTH_PER_EXISTING_ACCOUNT = 12500


@dataclass
class ExtendMemory:
Expand Down