The vm module should only contain stuff relevant to the EVM. Blob and tx fee calculations should be moved into a higher module.
A few other random gas constants that should be put somewhere better:
|
TX_BASE_COST = Uint(21000) |
|
""" |
|
Base cost of a transaction in gas units. This is the minimum amount of gas |
|
required to execute a transaction. |
|
""" |
|
|
|
FLOOR_CALLDATA_COST = Uint(10) |
|
""" |
|
Minimum gas cost per byte of calldata as per [EIP-7623]. Used to calculate |
|
the minimum gas cost for transactions that include calldata. |
|
|
|
[EIP-7623]: https://eips.ethereum.org/EIPS/eip-7623 |
|
""" |
|
|
|
STANDARD_CALLDATA_TOKEN_COST = Uint(4) |
|
""" |
|
Gas cost per byte of calldata as per [EIP-7623]. Used to calculate the |
|
gas cost for transactions that include calldata. |
|
|
|
[EIP-7623]: https://eips.ethereum.org/EIPS/eip-7623 |
|
""" |
|
|
|
TX_CREATE_COST = Uint(32000) |
|
""" |
|
Additional gas cost for creating a new contract. |
|
""" |
|
|
|
TX_ACCESS_LIST_ADDRESS_COST = Uint(2400) |
|
""" |
|
Gas cost for including an address in the access list of a transaction. |
|
""" |
|
|
|
TX_ACCESS_LIST_STORAGE_KEY_COST = Uint(1900) |
|
""" |
|
Gas cost for including a storage key in the access list of a transaction. |
|
""" |
|
|
|
TX_MAX_GAS_LIMIT = Uint(16_777_216) |
The vm module should only contain stuff relevant to the EVM. Blob and tx fee calculations should be moved into a higher module.
A few other random gas constants that should be put somewhere better:
execution-specs/src/ethereum/forks/amsterdam/transactions.py
Lines 31 to 68 in 7c41a14