Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify transaction behavior w.r.t. archived entries #463

Closed
dmkozh opened this issue Apr 12, 2024 · 0 comments · Fixed by #878
Closed

Clarify transaction behavior w.r.t. archived entries #463

dmkozh opened this issue Apr 12, 2024 · 0 comments · Fixed by #878
Assignees

Comments

@dmkozh
Copy link
Contributor

dmkozh commented Apr 12, 2024

It's important to document the expectations around the behavior of transactions with regards to the archived entries, specifically, we should state that:

  • Any Soroban transaction that has a key of an archived Persistent entry in the footprint will fail immediately during apply stage
  • An important security implication is that archived persistent entries can never be re-created. They only can be restored and then updated/removed
  • The failed transaction can never reach the smart contract logic, i.e. smart contracts can always assume that they never access archived entries and thus there is no need to write any special logic for handling the archival
  • The statement above is also relevant for the contract unit tests - it makes sense to cover the TTL extension logic, but there isn't much value in trying to cover the archival behavior (it will be possible to do to some degree, but it doesn't need to be promoted as a default testing practice)

This may be added as a part of revisiting state archival documentation in general (#327), but I think some of the key points could be reiterated in a more discoverable page (specifically the point about contracts never accessing the archived entries)

@github-project-automation github-project-automation bot moved this to Backlog in Dev Docs Apr 12, 2024
@janewang janewang moved this from Backlog to To Do in Dev Docs Apr 25, 2024
@janewang janewang self-assigned this Apr 25, 2024
@janewang janewang assigned sisuresh and unassigned janewang Aug 5, 2024
@github-project-automation github-project-automation bot moved this from To Do to Done in Dev Docs Aug 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants
@janewang @sisuresh @dmkozh and others