Skip to content

Commit

Permalink
Remove EIP-3869 charge from TXCREATE
Browse files Browse the repository at this point in the history
The cost of validation is covered by transaction's initcode cost (part of intrinsic cost.)
  • Loading branch information
gumb0 committed Feb 6, 2025
1 parent fc6a529 commit b1903a1
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions spec/eof.md
Original file line number Diff line number Diff line change
Expand Up @@ -242,13 +242,12 @@ The following instructions are introduced in EOF code:
- fails (returns 0 on the stack) if such initcode does not exist in the transaction, or if called from a transaction of `TransactionType` other than `INITCODE_TX_TYPE`
- caller's nonce is not updated and gas for initcode execution is not consumed. Only `TXCREATE` constant gas was consumed
- let `initcontainer` be that EOF container, and `initcontainer_size` its length in bytes
- deduct `2 * ((initcontainer_size + 31) // 32)` gas (EIP-3860 charge)
- just before executing the initcode container:
- **validates the initcode container and all its subcontainers recursively**
- validation includes checking that the `initcontainer` does not contain `RETURN` or `STOP`
- in addition to this, checks if the initcode container has its `len(data_section)` equal to `data_size`, i.e. data section content is exactly as the size declared in the header (see [Data section lifecycle](#data-section-lifecycle))
- fails (returns 0 on the stack) if any of those was invalid
- caller’s nonce is not updated and gas for initcode execution is not consumed. Only `TXCREATE` constant and EIP-3860 gas were consumed
- caller’s nonce is not updated and gas for initcode execution is not consumed. Only `TXCREATE` constant gas was consumed
- `RETURNCONTRACT (0xee)` instruction
- loads `uint8` immediate `deploy_container_index`
- pops two values from the stack: `aux_data_offset`, `aux_data_size` referring to memory section that will be appended to deployed container's data
Expand Down

0 comments on commit b1903a1

Please sign in to comment.