Conversation
TIP-1000: - Clarify SSTORE cold/warm access: 250k is the state creation component, EIP-2929 access cost (2100 cold / 100 warm) is charged separately - Fix all "keccak + codesize" references to "keccak + nonce" (codesize is not stored as a separate account field) - Clarify that the 500k CREATE cost includes the contract's nonce write; there is no separate 250k account creation charge for contracts - Add 7702 delegation keccak write cost (250k for no-delegation → delegation) - Remove sender account creation cost from contract deployment examples (assume initialized sender) TIP-1010: - Rename "Payment Lane Gas Limit" to "Block Gas Limit" (500M is total, not payment-specific) and add gas budget breakdown - Fix test case 3 from stale 25M to 30M general gas limit - Replace vague Invariant 1 with concrete base fee invariant - Fix Invariant 5 to match shared capacity model (non-shared 450M, general 30M, shared 50M) - Remove sender account creation from tx gas cap rationale and cost table Also fix misleading test comment in evm.rs and TxBuilder.sol constant comment. Made-with: Cursor
📊 Tempo Precompiles CoverageprecompilesCoverage: 20839/21903 lines (95.14%) File details
contractsCoverage: 209/383 lines (54.57%) File details
Total: 21048/22286 lines (94.44%) |
| uint64 constant CREATE_BASE_COST = 500_000; // CREATE/CREATE2 base | ||
| uint64 constant CODE_DEPOSIT_COST = 1000; // per byte | ||
| uint64 constant CREATE_FIELDS_COST = 500_000; // keccak + codesize (2 × 250,000) | ||
| uint64 constant CREATE_FIELDS_COST = 500_000; // keccak + nonce (2 × 250,000) |
There was a problem hiding this comment.
| uint64 constant CREATE_FIELDS_COST = 500_000; // keccak + nonce (2 × 250,000) | |
| uint64 constant CREATE_FIELDS_COST = 500_000; // nonce (Account creation) + bytecode insertion (2 × 250,000) |
We create the account with nonce bump, and we insert the bytecode to saparate table. So is it two creations that is covered by base cost.
It is not exactly the keccak that is covered. There is an additional price of 6gas per word of data that is hashed (keccak).
Edit: maybe comment from here #2883 (comment)
| ## Abstract | ||
|
|
||
| This TIP increases the gas cost for creating new state elements, accounts, and contract code to provide economic protection against state growth spam attacks. The proposal increases the cost of writing a new state element from 20,000 gas to 250,000 gas, introduces a 250,000 gas charge for account creation (when the account's nonce is first written), and implements a new contract creation cost model: 1,000 gas per byte of contract code plus 500,000 gas for keccak hash and codesize fields. | ||
| This TIP increases the gas cost for creating new state elements, accounts, and contract code to provide economic protection against state growth spam attacks. The proposal increases the cost of writing a new state element from 20,000 gas to 250,000 gas, introduces a 250,000 gas charge for account creation (when the account's nonce is first written), and implements a new contract creation cost model: 1,000 gas per byte of contract code plus 500,000 gas for keccak hash and nonce fields. |
There was a problem hiding this comment.
| This TIP increases the gas cost for creating new state elements, accounts, and contract code to provide economic protection against state growth spam attacks. The proposal increases the cost of writing a new state element from 20,000 gas to 250,000 gas, introduces a 250,000 gas charge for account creation (when the account's nonce is first written), and implements a new contract creation cost model: 1,000 gas per byte of contract code plus 500,000 gas for keccak hash and nonce fields. | |
| This TIP increases the gas cost for creating new state elements, accounts, and contract code to provide economic protection against state growth spam attacks. The proposal increases the cost of writing a new state element from 20,000 gas to 250,000 gas, introduces a 250,000 gas charge for account creation (when the account's nonce is first written), and implements a new contract creation cost model: 1,000 gas per byte of contract code plus 500,000 base gas for nonce bump (account creation) and bytecode insertion. |
Keccak is priced differently as 6ga sper word and this is only for CREATE2, for CREATE and create tx you dont have keccak
Did you mean keccak hash, as in merkle trie hash? I would propose rephrasing it as account creation and bytecode insertion.
| * EIP-7702 authorisation list entries with `auth_list.nonce == 0` require an additional 250,000 gas. | ||
| * The base cost per authorization is reduced to 12,500 gas | ||
| * EIP-7702 authorisation list entries with `auth_list.nonce == 0` require an additional 250,000 gas (account creation for the nonce field) | ||
| * EIP-7702 authorisation list entries going from no delegation to delegation require an additional 250,000 gas (state creation for the keccak/code hash field) |
There was a problem hiding this comment.
We are not doing this in the code, we just did the previous line. We could fix it by adding more gas if condition
if !authorization.address().is_zero() is true
Summary
Addresses review comments on TIP-1000 and TIP-1010:
TIP-1000:
TIP-1010:
Test plan
Made with Cursor