Skip to content

Commit c066561

Browse files
committed
Clearifies delay visibility and deployment cooldown.
1 parent 7374044 commit c066561

File tree

1 file changed

+8
-14
lines changed

1 file changed

+8
-14
lines changed

proposals/0167-loader-v4.md

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -92,19 +92,11 @@ otherwise throw `UnsupportedProgramId`
9292
otherwise throw `AccountDataTooSmall`
9393
- the status stored in the program account is not retracted,
9494
otherwise throw `UnsupportedProgramId`
95-
- the program account was not deployed recently (delay-visibility),
96-
otherwise throw `UnsupportedProgramId`
95+
- the program account was not deployed within the current slot
96+
(delay visibility), otherwise throw `UnsupportedProgramId`
9797
- the executable file stored in the program account passes executable
9898
verification, otherwise throw `UnsupportedProgramId`
9999

100-
Otherwise the execution semantics stay the same as in loader-v2 and v3.
101-
Delay-visibility also stays the same as in loader-v3:
102-
103-
- Re/deployed programs act as closed until the end of the slot,
104-
only then becoming available for execution
105-
- The feature set that the executable file is verified against is not
106-
necessarily the current one, but the one of the epoch of the next slot
107-
108100
### Program Management Instructions
109101

110102
#### Write
@@ -185,8 +177,8 @@ necessarily the current one, but the one of the epoch of the next slot
185177
- Check there are at least two instruction accounts,
186178
otherwise throw `NotEnoughAccountKeys`
187179
- Verify the program account
188-
- Check that the deployment cooldown expired,
189-
otherwise throw `InvalidArgument`
180+
- Check that the slot stored in the program account is not the current
181+
(deployment cooldown), otherwise throw `InvalidArgument`
190182
- Check that the status stored in the program account is retracted
191183
otherwise throw `InvalidArgument`
192184
- In case a source program was provided (instruction account at index 2):
@@ -195,6 +187,8 @@ necessarily the current one, but the one of the epoch of the next slot
195187
otherwise throw `InvalidArgument`
196188
- Check that the executable file stored in the source program account
197189
passes executable verification
190+
- The feature set that the executable file is verified against is not
191+
necessarily the current one, but the one of the epoch of the next slot
198192
- Copy the entire source program account into the program account
199193
- Set the length of the source program account to zero
200194
- Transfer all funds of the source program account to the program
@@ -216,8 +210,8 @@ necessarily the current one, but the one of the epoch of the next slot
216210
- Check there are at least two instruction accounts,
217211
otherwise throw `NotEnoughAccountKeys`
218212
- Verify the program account
219-
- Check that the deployment cooldown expired,
220-
otherwise throw `InvalidArgument`
213+
- Check that the slot stored in the program account is not the current
214+
(deployment cooldown), otherwise throw `InvalidArgument`
221215
- Check that the status stored in the program account is deployed,
222216
otherwise throw `InvalidArgument`
223217
- Note: The slot is **not** set to the current slot to allow a

0 commit comments

Comments
 (0)