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: serializable journal for bundlestate #53

Merged
merged 5 commits into from
Sep 18, 2024
Merged

Conversation

prestwich
Copy link
Contributor

@prestwich prestwich commented Sep 18, 2024

Add a serializable journal for bundlestate

This adds the BundleStateIndex which generates a sorted index over a BundleState. The index can be serialized to a sorted, canonical format. The format is playable forwards and backwards. I.e. it can be used to apply blocks, or to rollback the same block

Copy link
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @prestwich and the rest of your teammates on Graphite Graphite

@prestwich prestwich marked this pull request as ready for review September 18, 2024 17:10
@Evalir Evalir self-requested a review September 18, 2024 17:43
#[derive(thiserror::Error, Debug, Copy, Clone, PartialEq, Eq)]
pub enum JournalDecodeError {
/// The buffer does not contain enough data to decode the type.
#[error("Buffer overrun while decoding {ty_name}. Expected {expected} bytes, but only {remaining} bytes remain.")]
Copy link
Member

Choose a reason for hiding this comment

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

nit: we usually keep errors without leading uppercase and without period for the closing sentence

Copy link
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @prestwich and the rest of your teammates on Graphite Graphite

@prestwich prestwich merged commit 365f9e0 into main Sep 18, 2024
5 checks passed
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