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

Decouple business logic from stored persistent state #2326

Merged
merged 3 commits into from
Mar 5, 2024

Conversation

frederikrothenberger
Copy link
Member

@frederikrothenberger frederikrothenberger commented Mar 1, 2024

This PR introduces an indirection between the PersistentState used in business logic and the one written to stable memory (in layout version v9). This allows decoupling refactoring the business logic from storage layout migrations.

Further, this PR makes sure that all the optionally configurable fields are initialized and serialized with a sensible default. This allows removing a lot of Option handling in the future.

This PR introduces an indirection between the `PersistentState` used in
business logic and the one written to stable memory (in layout version
v9). This allows decoupling refactoring the business logic from storage
layout migrations.

Further, this PR makes sure that all the optionally configurable fields
are initialized and serialized with a sensible default. This allows
removing a lot of `Option` handling in the future.
Copy link
Collaborator

@przydatek przydatek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

src/internet_identity/src/state.rs Outdated Show resolved Hide resolved
@frederikrothenberger frederikrothenberger added this pull request to the merge queue Mar 5, 2024
Merged via the queue into main with commit 0ae3705 Mar 5, 2024
63 checks passed
@frederikrothenberger frederikrothenberger deleted the frederik/remove-perstistent-state-opt branch March 5, 2024 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants