ethereum / execution-specs

Specification for the Execution Layer. Tracking network upgrades.
Creative Commons Zero v1.0 Universal
832 stars 234 forks source link

Move includability checks from `process_transaction()` to `check_transaction()` #799

Open petertdavies opened 1 year ago

petertdavies commented 1 year ago

Checks about whether a transaction is includable should be done in check_transaction(), but some of them are in process_transaction(). For example:

ensure(sender_account.nonce == tx.nonce, InvalidBlock)
ensure(sender_account.balance >= gas_fee + tx.value, InvalidBlock)
ensure(sender_account.code == bytearray(), InvalidBlock)

These checks should be identified and moved to check_transaction().

gurukamath commented 5 months ago

The checks have been moved for cancun and will need to be back ported to the older forks before closing the issue.