Repository navigation
Description
Finding
The state-archival docs now correctly describe Protocol 23 automatic
restoration, but adjacent sections/pages still contain pre-Protocol-23 or
underqualified wording that can lead readers to conclude that archived
Persistent/Instance entries always require a separate RestoreFootprintOp.
The clear current-truth section says archived Persistent or Instance
entries can be automatically restored before a host function runs when included
in the transaction restore list, and that a manually built transaction without
the needed restore list will fail. The same page later says a Soroban
transaction with an archived Persistent key in its footprint "will fail
immediately" before contract execution, without qualifying that this is only
true when the entry is not declared for auto-restore. The storage-choice page
also says Persistent entries can be restored using RestoreFootprintOp but
does not mention the Protocol 23 auto-restore path.
Evidence
Docs (2026-07-07): state-archival "Contract Data Automatic Restoration" says
"Starting in Protocol 23 ... archived Persistent or Instance contract
entries can be automatically restored before a host function runs, but only if
they're included in the transaction's restore list."
Docs (same page): "A Soroban transaction that has a key to an archived
Persistent entry in the footprint will fail immediately during the apply stage
prior to contract execution." This is stale/ambiguous unless qualified as
"without the archived entry listed for auto-restore."
Docs (choosing-the-right-storage): "For persistent storage, when the TTL reaches
zero, the entry is moved to the archival storage. It can then be restored when
needed using the RestoreFootprintOp operation." This omits the P23
InvokeHostFunctionOp auto-restore path.
CAP/source: CAP-0066 says it introduces automatic restoration via
InvokeHostFunctionOp, where any archived key present in the footprint is
automatically restored, and specifies the archived entries vector. Current
stellar-core source and tests exercise both contract-instance and persistent
entry auto-restore through InvokeHostFunctionOp.
Additional recorded evidence:
- developers.stellar.org state-archival page fetched 2026-07-07
- developers.stellar.org choosing-the-right-storage page fetched 2026-07-07
- stellar/stellar-protocol core/cap-0066.md at 1b1c22e02fc0cec6fff1175c2d7d08ad83a828e1
- stellar/stellar-core InvokeHostFunctionOpFrame.cpp and InvokeHostFunctionTests.cpp at d6f2546791774d0b2cd925b8a4026adf967a92a3
Recommendation
On the state-archival page, qualify the "will fail immediately" section with
"unless the archived entries are included in the transaction restore list /
SorobanResourcesExtV0.archivedSorobanEntries for Protocol 23+ auto-restore."
On the storage-choice page, update the Persistent-storage section to mention
that Protocol 23+ InvokeHostFunctionOp can auto-restore archived
Persistent/Instance entries when simulation/transaction construction includes
the restore list, while RestoreFootprintOp remains the manual/rare fallback.
Source Record
This was found by the downstream Raven eval/improvements loop and recorded as sd-007 (stellar-docs, discovered 2026-07-07). Public record: https://github.com/kalepail/stellar-raven/blob/main/improvements/stellar-docs/sd-007-state-archival-auto-restore-ambiguity.md
Activity
kalepail commentedon Jul 15, 2026
Fix-scope correction from independent re-verification: a consistent CAP-66 restore-list fix spans about 4–5 edits across three files. Besides the two surfaces named above, later sections in
state-archival.mdxoverstate auto-restoration by omitting the restore-list requirement, andcreate-restoration-footprint-js.mdxrepeats that overstatement. Updating only the original two sentences would leave the docs self-contradictory.Audit evidence: https://gist.githubusercontent.com/ElliotFriend/3b3641b929b4408a834b85bcb4e75449/raw/a90e6b453ee3505ef2525b4428eaa75752e3ae08/raven-audit-rebuttal.md
ElliotFriend commentedon Jul 15, 2026
Agreed, and the wider scope is what shipped: PR #2620 makes the consistent CAP-66 fix across all three files (5 edits) — the unqualified "will fail immediately" claim at
state-archival.mdx:96now carries the restore-list condition, the two later sections of the same page that overstated auto-restoration (RestoreFootprintOpintro and the Examples overview note) now state the restore-list requirement,create-restoration-footprint-js.mdxgets the same correction to its repeated sentence, andchoosing-the-right-storage.mdxno longer presentsRestoreFootprintOpas the only restoration path.kalepail commentedon Jul 27, 2026
Raven independently rechecked sd-007 on 2026-07-27 and confirmed the original trigger is resolved live.
Live recheck: 2026-07-27 GET https://developers.stellar.org/docs/learn/fundamentals/contract-development/storage/state-archival - the page now carries a 'Contract Data Automatic Restoration' section citing Protocol 23 / CAP-0066, the simulation-populated restore list, and the manual-build caveat
Thanks for the fix and for the deployment handoff. The active finding is being retired under the ephemeral improvements lifecycle. Immutable source snapshot: https://github.com/kalepail/stellar-raven/blob/773857262d462506947a324b7437b8499f886287/improvements/stellar-docs/sd-007-state-archival-auto-restore-ambiguity.md