From 72a417f2ffe614f74f6e4599eaa6498927009523 Mon Sep 17 00:00:00 2001 From: pdobacz <5735525+pdobacz@users.noreply.github.com> Date: Wed, 22 May 2024 16:01:00 +0200 Subject: [PATCH] Fix numbering --- EIPS/eip-7620.md | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/EIPS/eip-7620.md b/EIPS/eip-7620.md index 7b37b3812cbd28..d48a797c42a801 100644 --- a/EIPS/eip-7620.md +++ b/EIPS/eip-7620.md @@ -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` @@ -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