You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-`aux_data` is the data which is appended to `pre_deploy_data_section` on `RETURNCONTRACT` instruction [see New Behavior](#new-behavior).
86
-
-`static_aux_data` is a subrange of `aux_data`, which size is known before `RETURNCONTRACT` and equals `pre_deploy_data_size - len(pre_deploy_data_section)`.
85
+
-`aux_data` is the data which is appended to `pre_deploy_data_section` on `RETURNCODE` instruction [see New Behavior](#new-behavior).
86
+
-`static_aux_data` is a subrange of `aux_data`, which size is known before `RETURNCODE` and equals `pre_deploy_data_size - len(pre_deploy_data_section)`.
87
87
-`dynamic_aux_data` is the remainder of `aux_data`.
88
88
89
89
`data_size` in the deployed container header is also updated to be equal `len(data_section)`.
@@ -141,8 +141,8 @@ Creation transactions (tranactions with empty `to`), with `data` containing EOF
141
141
5.`calldata` part of transaction `data` that follows `initcontainer` is treated as calldata to pass into the execution frame
142
142
6. execute the container and deduct gas for execution
143
143
1. Calculate `new_address` as `keccak256(sender || sender_nonce)[12:]`
144
-
2. A successful execution ends with initcode executing `RETURNCONTRACT{deploy_container_index}(aux_data_offset, aux_data_size)` instruction (see below). After that:
145
-
- load deploy-contract from EOF subcontainer at `deploy_container_index` in the container from which `RETURNCONTRACT` is executed
144
+
2. A successful execution ends with initcode executing `RETURNCODE{deploy_container_index}(aux_data_offset, aux_data_size)` instruction (see below). After that:
145
+
- load deploy-contract from EOF subcontainer at `deploy_container_index` in the container from which `RETURNCODE` is executed
146
146
- concatenate data section with `(aux_data_offset, aux_data_offset + aux_data_size)` memory segment and update data size in the header
147
147
- let `deployed_code_size` be updated deploy container size
148
148
- if `deployed_code_size > MAX_CODE_SIZE` instruction exceptionally aborts
@@ -208,15 +208,15 @@ The following instructions are introduced in EOF code:
208
208
- behavior on `accessed_addresses` and address colission is same as `CREATE2` (rules for `CREATE2` from [EIP-684](https://eips.ethereum.org/EIPS/eip-684) and [EIP-2929](https://eips.ethereum.org/EIPS/eip-2929) apply to `EOFCREATE`)
209
209
- an unsuccesful execution of initcode results in pushing `0` onto the stack
210
210
- can populate returndata if execution `REVERT`ed
211
-
- a successful execution ends with initcode executing `RETURNCONTRACT{deploy_container_index}(aux_data_offset, aux_data_size)` instruction (see below). After that:
212
-
- load deploy-contract from EOF subcontainer at `deploy_container_index` in the container from which `RETURNCONTRACT` is executed
211
+
- a successful execution ends with initcode executing `RETURNCODE{deploy_container_index}(aux_data_offset, aux_data_size)` instruction (see below). After that:
212
+
- load deploy-contract from EOF subcontainer at `deploy_container_index` in the container from which `RETURNCODE` is executed
213
213
- concatenate data section with `(aux_data_offset, aux_data_offset + aux_data_size)` memory segment and update data size in the header
214
214
- let `deployed_code_size` be updated deploy container size
215
215
- if `deployed_code_size > MAX_CODE_SIZE` instruction exceptionally aborts
216
216
- set `state[new_address].code` to the updated deploy container
- 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
222
222
- cost 0 gas + possible memory expansion for aux data
@@ -289,14 +289,14 @@ The following instructions are introduced in EOF code:
289
289
-`EOFCREATE``initcontainer_index` must be less than `num_container_sections`
290
290
-`EOFCREATE` the subcontainer pointed to by `initcontainer_index` must have its `len(data_section)` equal `data_size`, i.e. data section content is exactly as the size declared in the header (see [Data section lifecycle](#data-section-lifecycle))
291
291
-`EOFCREATE` the subcontainer pointed to by `initcontainer_index`*must not* contain either a `RETURN` or `STOP` instruction.
292
-
-`RETURNCONTRACT``deploy_container_index` must be less than `num_container_sections`
293
-
-`RETURNCONTRACT` the subcontainer pointed to `deploy_container_index`*must not* contain a `RETURNCONTRACT` instruction.
292
+
-`RETURNCODE``deploy_container_index` must be less than `num_container_sections`
293
+
-`RETURNCODE` the subcontainer pointed to `deploy_container_index`*must not* contain a `RETURNCODE` instruction.
294
294
-`DATALOADN`'s `immediate + 32` must be within `pre_deploy_data_size` (see [Data Section Lifecycle](#data-section-lifecycle))
295
295
- the part of the data section which exceeds these bounds (the `dynamic_aux_data` portion) needs to be accessed using `DATALOAD` or `DATACOPY`
296
296
- no unreachable code sections are allowed, i.e. every code section can be reached from the 0th code section with a series of CALLF / JUMPF instructions, and section 0 is implicitly reachable.
297
-
- it is an error for a container to contain both `RETURNCONTRACT` and either of `RETURN` or `STOP`.
297
+
- it is an error for a container to contain both `RETURNCODE` and either of `RETURN` or `STOP`.
298
298
- it is an error for a subcontainer to never be referenced in its parent container
299
-
- it is an error for a given subcontainer to be referenced by both `RETURNCONTRACT` and `EOFCREATE`
299
+
- it is an error for a given subcontainer to be referenced by both `RETURNCODE` and `EOFCREATE`
300
300
301
301
## Stack Validation
302
302
@@ -309,7 +309,7 @@ The following instructions are introduced in EOF code:
309
309
-*Forward jump* refers to any of `RJUMP`/`RJUMPI`/`RJUMPV` instruction with relative offset greater than or equal to 0. *Backwards jump* refers to any of `RJUMP`/`RJUMPI`/`RJUMPV` instruction with relative offset less than 0, including jumps to the same jump instruction (e.g. `RJUMP(-3)`)
- For each instruction in the code the operand stack height bounds are recorded as `stack_height_min` and `stack_height_max`. Instructions are scanned in a single linear pass over the code.
314
314
- first instruction has `stack_height_min = stack_height_max = types[current_section_index].inputs`.
0 commit comments