Skip to content

Commit ddff828

Browse files
committed
Updated malformed evictedSorobanEntries section
1 parent a6d9034 commit ddff828

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

core/cap-0063.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,12 +214,23 @@ on in-memory read limits and fees. If an archived Soroban entry has been evicted
214214
on on-disk limits and fees. All evicted keys must be declared in the `evictedSorobanEntries` vector via `SorobanResourcesExtV0`.
215215
If no evicted entries are present in the footprint, `SorobanResourcesExtV0` may be omitted.
216216

217+
##### Incorrect Entries in `evictedSorobanEntries` Vector
218+
219+
If a key is not marked as evicted, but the entry is actually evicted, then the TX fails. If a Soroban key is marked as evicted when
220+
it is not, the transaction does not fail. The entry is treated as if it is evicted from a resource and fee perspective.
221+
This is appropriate, as on disk reads are more expensive than in-memory. So long as the TX pays the disk based fees,
222+
there is no issue with actually loading an in-memory entry.
223+
224+
If a classic key is marked as evicted, the TX fails, as the footprint is malformed.
225+
217226
##### Failure Codes
218227

219228
If an evicted entry is included in the TX's footprint but is not specified via the `evictedSorobanEntries` vector, the
220229
tx will fail with the `INVOKE_HOST_FUNCTION_ENTRY_ARCHIVED` code. If there are insufficient resources for entry restoration,
221230
the tx will fail with the `INVOKE_HOST_FUNCTION_RESOURCE_LIMIT_EXCEEDED` code.
222231

232+
If a classic entry is marked as evicted, the TX fails with `INVOKE_HOST_FUNCTION_MALFORMED` during apply time.
233+
223234
##### Meta
224235

225236
Whenever an entry is restored, it will be emitted as a `LedgerEntryChangeType` of type `LEDGER_ENTRY_RESTORE`.

0 commit comments

Comments
 (0)