-
Notifications
You must be signed in to change notification settings - Fork 112
[storage/adb/keyless] fix authentication/proving in the keyless db #1438
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes authentication and proving in the keyless database by changing how operations are stored. Previously, only offsets were stored in the authenticated portion, but now the actual values are included to enable proper proving functionality.
Key changes:
- Modified the
Keylessoperation enum to store values instead of offsets inAppendoperations - Moved operation types from the locations journal to the values journal
- Updated the storage structure to use values journal for operations and locations journal for offsets
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| storage/src/store/operation.rs | Updated Keyless enum to be generic over value type and store actual values in Append operations instead of offsets |
| storage/src/adb/keyless.rs | Restructured storage to use values journal for operations and locations journal for offsets, enabling proper authentication |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
dbf3b0a to
7047b2c
Compare
4a6feed to
9b9eaf6
Compare
| /// The locations structure provides the "source of truth" for the db's pruning boundaries and | ||
| /// overall size, should there be any discrepancies. | ||
| locations: FJournal<E, Operation>, | ||
| locations: FJournal<E, u32>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool we can use u32 directly now 🚀
Previously we were incorrectly putting offsets instead of values into the authenticated portion. Moves the operation type from locations to the values journal so that proving works identically to other stores.