# Gas Cost Variable Naming Unification This document compares gas cost constant naming conventions between EELS and EEST for the Osaka fork. ## Mutual Variables | EELS | EEST | Value | Description | |------|------|-------|-------------| | `GAS_JUMPDEST` | `G_JUMPDEST` | 1 | Jump destination opcode | | `GAS_BASE` | `G_BASE` | 2 | Base operation cost | | `GAS_VERY_LOW` | `G_VERY_LOW` | 3 | Very low cost operations | | `GAS_MEMORY` | `G_MEMORY` | 3 | Memory allocation cost | | `GAS_COPY` | `G_COPY` | 3 | Copy operation cost | | `GAS_LOW` | `G_LOW` | 5 | Low cost operations | | `GAS_MID` | `G_MID` | 8 | Medium cost operations | | `GAS_HIGH` | `G_HIGH` | 10 | High cost operations | | `GAS_WARM_ACCESS` | `G_WARM_SLOAD` | 100 | Warm storage load | | `GAS_COLD_SLOAD` | `G_COLD_SLOAD` | 2100 | Cold storage load | | `GAS_STORAGE_UPDATE` | `G_STORAGE_RESET` | 5000 | Storage slot update cost | | `GAS_STORAGE_CLEAR_REFUND` | `R_STORAGE_CLEAR` | 4800 | Storage clear refund | | `GAS_STORAGE_SET` | `G_STORAGE_SET` | 20000 | Storage slot set cost | | `GAS_WARM_ACCESS` | `G_WARM_ACCOUNT_ACCESS` | 100 | Warm account access | | `GAS_COLD_ACCOUNT_ACCESS` | `G_COLD_ACCOUNT_ACCESS` | 2600 | Cold account access | | `GAS_INIT_CODE_WORD_COST` | `G_INITCODE_WORD` | 2 | Init code cost per word | | `GAS_CODE_DEPOSIT` | `G_CODE_DEPOSIT_BYTE` | 200 | Code deposit per byte | | `GAS_CREATE` | `G_CREATE` | 32000 | Contract creation cost | | `GAS_CALL_STIPEND` | `G_CALL_STIPEND` | 2300 | Call stipend | | `GAS_SELF_DESTRUCT` | `G_SELF_DESTRUCT` | 5000 | Self-destruct base cost | | `GAS_CALL_VALUE` | `G_CALL_VALUE` | 9000 | Value transfer cost | | `GAS_NEW_ACCOUNT` | `G_NEW_ACCOUNT` | 25000 | New account creation | | `GAS_EXPONENTIATION` | `G_EXP` | 10 | Exponentiation base cost | | `GAS_EXPONENTIATION_PER_BYTE` | `G_EXP_BYTE` | 50 | Exponentiation per byte | | `GAS_KECCAK256` | `G_KECCAK_256` | 30 | Keccak256 base cost | | `GAS_KECCAK256_WORD` | `G_KECCAK_256_WORD` | 6 | Keccak256 per word | | `GAS_BLOCK_HASH` | `G_BLOCKHASH` | 20 | Block hash cost | | `GAS_LOG_DATA` | `G_LOG_DATA` | 8 | Log data cost per byte | | `GAS_LOG` | `G_LOG` | 375 | Log operation cost | | `GAS_LOG_TOPIC` | `G_LOG_TOPIC` | 375 | Log topic cost | | `TX_BASE_COST` | `G_TRANSACTION` | 21000 | Base tx cost | | `TX_CREATE_COST` | `G_TRANSACTION_CREATE` | 21000 | Contract creation tx cost | | `TX_ACCESS_LIST_ADDRESS_COST` | `G_ACCESS_LIST_ADDRESS` | 2400 | Access list address cost (EIP-2930) | | `TX_ACCESS_LIST_STORAGE_KEY_COST` | `G_ACCESS_LIST_STORAGE` | 1900 | Access list storage key cost (EIP-2930) | | `FLOOR_CALLDATA_COST` | `G_TX_DATA_FLOOR_TOKEN_COST` | 10 | Floor calldata token cost | | `STANDARD_CALLDATA_TOKEN_COST` | `G_TX_DATA_STANDARD_TOKEN_COST` | 4 | Standard calldata token cost | | `PER_EMPTY_ACCOUNT_COST` | `G_AUTHORIZATION` | 25000 | Cost per empty account authorization | | `PER_AUTH_BASE_COST` | `R_AUTHORIZATION_EXISTING_AUTHORITY` | 12500 | Cost per empty account authorization | --- ## EELS-Specific Constants ```python # Transaction-Level Costs # Location: src/ethereum/forks/osaka/transactions.py TX_MAX_GAS_LIMIT = Uint(16_777_216) # Maximum gas limit per transaction (16 MiB) # Blob Gas Parameters (EIP-4844 + EIP-7918) # Location: src/ethereum/forks/osaka/vm/gas.py GAS_PER_BLOB = U64(2**17) # Gas per blob (131072) BLOB_SCHEDULE_TARGET = U64(6) # Target blobs per block TARGET_BLOB_GAS_PER_BLOCK = GAS_PER_BLOB * BLOB_SCHEDULE_TARGET # 786432 BLOB_BASE_COST = Uint(2**13) # Blob base cost (8192) BLOB_SCHEDULE_MAX = U64(9) # Max blobs per block MIN_BLOB_GASPRICE = Uint(1) # Minimum blob gas price BLOB_BASE_FEE_UPDATE_FRACTION = Uint(5007716) # Blob base fee update fraction # Location: src/ethereum/forks/osaka/fork.py MAX_BLOB_GAS_PER_BLOCK = U64(1179648) # Max blob gas per block (9 * 2^17) BLOB_COUNT_LIMIT = 6 # Blob count limit per transaction # BLS12-381 Precompile Costs (EIP-2537) # Location: src/ethereum/forks/osaka/vm/gas.py GAS_BLS_G1_ADD = Uint(375) # BLS12-381 G1 addition GAS_BLS_G1_MUL = Uint(12000) # BLS12-381 G1 multiplication GAS_BLS_G1_MAP = Uint(5500) # BLS12-381 G1 map to curve GAS_BLS_G2_ADD = Uint(600) # BLS12-381 G2 addition GAS_BLS_G2_MUL = Uint(22500) # BLS12-381 G2 multiplication GAS_BLS_G2_MAP = Uint(23800) # BLS12-381 G2 map to curve # Cryptographic Precompile Costs # Location: src/ethereum/forks/osaka/vm/gas.py GAS_ECRECOVER = Uint(3000) # ECRECOVER precompile GAS_SHA256 = Uint(60) # SHA256 base cost GAS_SHA256_WORD = Uint(12) # SHA256 per word GAS_RIPEMD160 = Uint(600) # RIPEMD160 base cost GAS_RIPEMD160_WORD = Uint(120) # RIPEMD160 per word GAS_IDENTITY = Uint(15) # Identity precompile base cost GAS_IDENTITY_WORD = Uint(3) # Identity precompile per word GAS_BLAKE2_PER_ROUND = Uint(1) # BLAKE2b per round GAS_P256VERIFY = Uint(6900) # P256 signature verification (EIP-7212) GAS_POINT_EVALUATION = Uint(50000) # KZG point evaluation (EIP-4844) # Opcode-Specific Costs # Location: src/ethereum/forks/osaka/vm/gas.py GAS_ZERO = Uint(0) # Zero gas cost operations GAS_RETURN_DATA_COPY = Uint(3) # Return data copy cost GAS_FAST_STEP = Uint(5) # Fast step operations GAS_BLOBHASH_OPCODE = Uint(3) # BLOBHASH opcode cost GAS_SELF_DESTRUCT_NEW_ACCOUNT = Uint(25000) # Self-destruct with new account # System and Block Parameters # Location: src/ethereum/forks/osaka/fork.py BASE_FEE_MAX_CHANGE_DENOMINATOR = Uint(8) # EIP-1559 base fee change denominator ELASTICITY_MULTIPLIER = Uint(2) # EIP-1559 elasticity multiplier GAS_LIMIT_ADJUSTMENT_FACTOR = Uint(1024) # Gas limit adjustment factor GAS_LIMIT_MINIMUM = Uint(5000) # Minimum gas limit SYSTEM_TRANSACTION_GAS = Uint(30000000) # System transaction gas limit MAX_BLOCK_SIZE = 10_485_760 # Maximum block size (10 MiB) SAFETY_MARGIN = 2_097_152 # Block size safety margin (2 MiB) ``` ## EEST-Specific Constants ```python G_TX_DATA_ZERO: int = 4 # Zero byte in transaction data G_TX_DATA_NON_ZERO: int = 68 # Non-zero byte (pre-Istanbul: 68, Istanbul+: 16) ```