Skip to content

Commit

Permalink
Fix numbering
Browse files Browse the repository at this point in the history
  • Loading branch information
pdobacz committed May 23, 2024
1 parent 15b9a1b commit 72a417f
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions EIPS/eip-7620.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ Details on each instruction follow in the next sections.


For terminology purposes, the following concepts are defined:

- an "initcode" container is one which does not contain `RETURN` or `STOP`
- a "runtime" container is one which does not contain `RETURNCONTRACT`

Expand All @@ -104,13 +105,13 @@ Note a container can be both "initcode" and "runtime" if it does not contain any
We extend code section validation rules (as defined in [EIP-3670](./eip-3670.md)).

1. `EOFCREATE` `initcontainer_index` must be less than `num_container_sections`
1. `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))
1. `EOFCREATE` the subcontainer pointed to by `initcontainer_index` must be an "initcode" subcontainer
2. `RETURNCONTRACT` `deploy_container_index` must be less than `num_container_sections`
2. `RETURNCONTRACT` the subcontainer pointed to `deploy_container_index` must be a "runtime" subcontainer
2. It is an error for a container to contain both `RETURNCONTRACT` and either of `RETURN` or `STOP`
2. It is an error for a subcontainer to never be referenced in code sections of its parent container
3. `RJUMP`, `RJUMPI` and `RJUMPV` immediate argument value (jump destination relative offset) validation: code section is invalid in case offset points to the byte directly following either `EOFCREATE` or `RETURNCONTRACT` instruction.
2. `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))
3. `EOFCREATE` the subcontainer pointed to by `initcontainer_index` must be an "initcode" subcontainer
4. `RETURNCONTRACT` `deploy_container_index` must be less than `num_container_sections`
5. `RETURNCONTRACT` the subcontainer pointed to `deploy_container_index` must be a "runtime" subcontainer
6. It is an error for a container to contain both `RETURNCONTRACT` and either of `RETURN` or `STOP`
7. It is an error for a subcontainer to never be referenced in code sections of its parent container
8. `RJUMP`, `RJUMPI` and `RJUMPV` immediate argument value (jump destination relative offset) validation: code section is invalid in case offset points to the byte directly following either `EOFCREATE` or `RETURNCONTRACT` instruction.

### Data Section Lifecycle

Expand Down

0 comments on commit 72a417f

Please sign in to comment.