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

feat: persisting microchain server data #368

Merged
merged 1 commit into from
Nov 6, 2024

Conversation

arthurpaulino
Copy link
Contributor

Instead of bloating the server's RAM with data from potentially many microchains, persist the data on the file system. This allows servers to not lose data on temporary shutdowns.

@arthurpaulino arthurpaulino requested a review from wwared November 6, 2024 02:01
Instead of bloating the server's RAM with data from potentially
many microchains, persist the data on the file system. This allows
servers to not lose data on temporary shutdowns.
@arthurpaulino arthurpaulino force-pushed the ap/microchain-persisting-server branch from fd96b82 to 510cecd Compare November 6, 2024 02:01

fn dump_state(id: &[F], state: &ChainState) -> Result<()> {
dump_microchain_data(id, "state", state)
}
Copy link
Contributor

@wwared wwared Nov 6, 2024

Choose a reason for hiding this comment

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

nit: Renaming the functions to save_ instead of dump_ might be nicer (i.e. it's the counterparty to load_, and makes it clear it overwrites the on-disk state) (but it's a matter of opinion, I don't mind leaving it as-is)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm reusing the terminology from other places in the repo (e.g. dump-expr)

@arthurpaulino arthurpaulino merged commit 57c48b9 into main Nov 6, 2024
3 checks passed
@arthurpaulino arthurpaulino deleted the ap/microchain-persisting-server branch November 6, 2024 02:09
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