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
5 changes: 0 additions & 5 deletions src/ethereum/forks/amsterdam/fork.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@
InsufficientMaxFeePerGasError,
InvalidBlobVersionedHashError,
NoBlobDataError,
PriorityFeeGreaterThanMaxFeeError,
TransactionTypeContractCreationError,
)
from .fork_types import Authorization, BlockAccessIndex, VersionedHash
Expand Down Expand Up @@ -579,10 +578,6 @@ def check_transaction(
sender_account = get_account(tx_state, sender_address)

if isinstance(tx, FeeMarketCapableTransaction):
if tx.max_fee_per_gas < tx.max_priority_fee_per_gas:
raise PriorityFeeGreaterThanMaxFeeError(
"priority fee greater than max fee"
)
if tx.max_fee_per_gas < block_env.base_fee_per_gas:
raise InsufficientMaxFeePerGasError(
tx.max_fee_per_gas, block_env.base_fee_per_gas
Expand Down
6 changes: 6 additions & 0 deletions src/ethereum/forks/amsterdam/transactions.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

from .exceptions import (
InitCodeTooLargeError,
PriorityFeeGreaterThanMaxFeeError,
TransactionTypeError,
)
from .fork_types import Authorization, VersionedHash
Expand Down Expand Up @@ -622,6 +623,11 @@ def validate_transaction(tx: Transaction) -> IntrinsicGasCost:
raise NonceOverflowError("Nonce too high")
if tx.to == Bytes0(b"") and len(tx.data) > MAX_INIT_CODE_SIZE:
raise InitCodeTooLargeError("Code size too large")
if isinstance(tx, FeeMarketCapableTransaction):
if tx.max_fee_per_gas < tx.max_priority_fee_per_gas:
raise PriorityFeeGreaterThanMaxFeeError(
"priority fee greater than max fee"
)

return intrinsic

Expand Down