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

Persist Sigchain changes on sync #2630

Open
adrastaea opened this issue Oct 8, 2024 · 0 comments
Open

Persist Sigchain changes on sync #2630

adrastaea opened this issue Oct 8, 2024 · 0 comments
Labels
lfa Features related to local-first-web/auth implementation

Comments

@adrastaea
Copy link
Collaborator

adrastaea commented Oct 8, 2024

Description

In the first pass of persistence, #2626, we will just save the sigchain to a file when the application closes gracefully, but we want to be resilient against crashes and kills. To achieve this resiliency, we want to save the sigchain to persistent storage whenever a block is added. However, serializing the entire chain with Team.save() is very intensive because the hash of each link in chain is validated. Ideally, we would come up with some way to just append new blocks to the existing persistent store, or use OrbitDB as the storage for blocks in the chain so that blocks are automatically added to the persistent store when replicated. For this ticket, we will prioritize correctness over performance, and just add blocks to whatever persistent store we're using whenever the team state changes.

Acceptance Criteria

  1. New changes created or received on Sigchain should be persisted in LevelDB
  2. Persist on each change (prioritize correctness over performance, for now)
@adrastaea adrastaea added this to Quiet Oct 8, 2024
@adrastaea adrastaea converted this from a draft issue Oct 8, 2024
@adrastaea adrastaea added the lfa Features related to local-first-web/auth implementation label Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lfa Features related to local-first-web/auth implementation
Projects
Status: Next sprint
Development

No branches or pull requests

1 participant