# Unify gas cost variable naming ## Mutual Variable ### Basic Operation | 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_LOW` | `G_LOW` | 5 | Low cost operations | | `GAS_MID` | `G_MID` | 8 | Medium cost operations | | `GAS_HIGH` | `G_HIGH` | 10 | High cost operations | | `GAS_MEMORY` | `G_MEMORY` | 3 | Memory allocation cost | | `GAS_CREATE` | `G_CREATE` | 32000 | Contract creation cost | | `GAS_CODE_DEPOSIT` | `G_CODE_DEPOSIT_BYTE` | 200 | Code deposit per byte | | `GAS_CALL_VALUE` | `G_CALL_VALUE` | 9000 | Value transfer cost | | `GAS_CALL_STIPEND` | `G_CALL_STIPEND` | 2300 | Call stipend | | `GAS_NEW_ACCOUNT` | `G_NEW_ACCOUNT` | 25000 | New account creation | | `GAS_SELF_DESTRUCT` | `G_SELF_DESTRUCT` | 5000 | Self-destruct cost | | `GAS_LOG` | `G_LOG` | 375 | Log operation cost | | `GAS_LOG_DATA` | `G_LOG_DATA` | 8 | Log data cost per byte | | `GAS_LOG_TOPIC` | `G_LOG_TOPIC` | 375 | Log topic cost | | `GAS_KECCAK256` | `G_KECCAK_256` | 30 | Keccak256 base cost | | `GAS_KECCAK256_WORD` | `G_KECCAK_256_WORD` | 6 | Keccak256 per word | | `GAS_COPY` | `G_COPY` | 3 | Copy operation cost | | `GAS_BLOCK_HASH` | `G_BLOCKHASH` | 20 | Block hash cost | ### Storage Operations Mapping | Execution Spec | Test Framework | Value | Description | |----------------|----------------|-------|-------------| | `GAS_STORAGE_SET` | `G_STORAGE_SET` | 20000 | Storage slot set cost | | `GAS_STORAGE_UPDATE` | `G_STORAGE_RESET` | 5000 | Storage slot update cost | | `GAS_STORAGE_CLEAR_REFUND` | `R_STORAGE_CLEAR` | 4800 | Storage clear refund | | `GAS_COLD_SLOAD` | `G_COLD_SLOAD` | 2100 | Cold storage load | | `GAS_WARM_ACCESS` | `G_WARM_ACCOUNT_ACCESS` | 100 | Warm account access | | `GAS_COLD_ACCOUNT_ACCESS` | `G_COLD_ACCOUNT_ACCESS` | 2600 | Cold account access | ### Exponentiation Mapping | Execution Spec | Test Framework | Value | Description | |----------------|----------------|-------|-------------| | `GAS_EXPONENTIATION` | `G_EXP` | 10 | Exponentiation base cost | | `GAS_EXPONENTIATION_PER_BYTE` | `G_EXP_BYTE` | 50 | Exponentiation per byte | ## EELS Specific ```python # Blob Gas (EIP-4844) GAS_PER_BLOB = U64(2**17) BLOB_SCHEDULE_TARGET = U64(6) TARGET_BLOB_GAS_PER_BLOCK = GAS_PER_BLOB * BLOB_SCHEDULE_TARGET BLOB_BASE_COST = Uint(2**13) BLOB_SCHEDULE_MAX = U64(9) MIN_BLOB_GASPRICE = Uint(1) BLOB_BASE_FEE_UPDATE_FRACTION = Uint(5007716) # BLS Signature Operations GAS_BLS_G1_ADD = Uint(375) GAS_BLS_G1_MUL = Uint(12000) GAS_BLS_G1_MAP = Uint(5500) GAS_BLS_G2_ADD = Uint(600) GAS_BLS_G2_MUL = Uint(22500) GAS_BLS_G2_MAP = Uint(23800) # Advanced Precompiles GAS_P256VERIFY = Uint(6900) GAS_POINT_EVALUATION = Uint(50000) GAS_BLOBHASH_OPCODE = Uint(3) # Cryptographic Operations GAS_SHA256 = Uint(60) GAS_SHA256_WORD = Uint(12) GAS_RIPEMD160 = Uint(600) GAS_RIPEMD160_WORD = Uint(120) GAS_IDENTITY = Uint(15) GAS_IDENTITY_WORD = Uint(3) GAS_ECRECOVER = Uint(3000) # Memory and Execution GAS_RETURN_DATA_COPY = Uint(3) GAS_FAST_STEP = Uint(5) GAS_BLAKE2_PER_ROUND = Uint(1) GAS_INIT_CODE_WORD_COST = Uint(2) # Self-Destruct Operations GAS_SELF_DESTRUCT_NEW_ACCOUNT = Uint(25000) ``` ## EEST Specific ```python # Transaction Data Costs G_TX_DATA_ZERO: int = 4 G_TX_DATA_NON_ZERO: int = 68 G_TX_DATA_STANDARD_TOKEN_COST: int = 0 G_TX_DATA_FLOOR_TOKEN_COST: int = 0 G_TRANSACTION: int = 21000 G_TRANSACTION_CREATE: int = 32000 # Access List Costs (EIP-2930) G_ACCESS_LIST_ADDRESS: int = 2400 G_ACCESS_LIST_STORAGE: int = 1900 # Authorization Costs G_AUTHORIZATION: int = 25000 R_AUTHORIZATION_EXISTING_AUTHORITY: int = 12500 ```
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up