Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@roberto-bayardo
Copy link
Collaborator

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.

@roberto-bayardo roberto-bayardo requested review from Copilot and patrick-ogrady and removed request for patrick-ogrady August 19, 2025 22:18
Copy link
Contributor

Copilot AI left a 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 Keyless operation enum to store values instead of offsets in Append operations
  • 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.

@commonwarexyz commonwarexyz deleted a comment from Copilot AI Aug 19, 2025
@commonwarexyz commonwarexyz deleted a comment from Copilot AI Aug 19, 2025
@roberto-bayardo roberto-bayardo marked this pull request as ready for review August 19, 2025 22:34
/// 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>,
Copy link
Contributor

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 🚀

@patrick-ogrady patrick-ogrady merged commit 314a104 into main Aug 19, 2025
36 checks passed
@patrick-ogrady patrick-ogrady deleted the fix-keyless branch August 19, 2025 22:50
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