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

Apply new storage conventions to Connect oracle #1774

Merged
merged 120 commits into from
Nov 6, 2024
Merged

Conversation

Fraser999
Copy link
Contributor

Summary

This mainly brings the new oracle code in line with storage conventions formed after the initial cut of the PR.

Background

We want a consistent approach to storage across all components. As well as using a single serialization format (Borsh), this will allow us to iterate on the storage design in the near future.

Changes

  • Added storage submodules to the two sequencer modules connect::market_map and connect::oracle. These provide the keys and values which are used to store the relevant data.
  • Added snapshot tests and other unit tests for the keys.
  • Added put/get tests for the extension traits, which revealed bugs in both the streaming getters of the oracle.
  • Removed unneeded serde trait derives from several core types.
  • Renamed connect::marketmap in the sequencer to connect::market_map

Testing

Added several unit tests.

Changelogs

We should update changelogs once the feature is ready to be merged to main. Not done in this PR.

Breaking Changelist

  • This breaks the state snapshot tests due to changing how the oracle data is serialized in storage.

@Fraser999 Fraser999 requested a review from noot October 31, 2024 18:34
@Fraser999 Fraser999 requested review from a team and joroshiba as code owners October 31, 2024 18:34
@github-actions github-actions bot added the sequencer pertaining to the astria-sequencer crate label Oct 31, 2024
rollup_transactions_proof,
rollup_ids_root,
rollup_ids_proof,
} = take_initial_elements_from_data(data)?;
Copy link
Collaborator

Choose a reason for hiding this comment

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

note to self: need to allow this to not have the extended_commit_info as to be nonbreaking

Base automatically changed from noot/slinky to feat/oracle November 6, 2024 00:15
@noot noot requested review from a team as code owners November 6, 2024 00:15
@github-actions github-actions bot added proto pertaining to the Astria Protobuf spec cd labels Nov 6, 2024
Copy link
Collaborator

@noot noot left a comment

Choose a reason for hiding this comment

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

looks great!

@noot noot merged commit 6316565 into feat/oracle Nov 6, 2024
45 checks passed
@noot noot deleted the fraser/slinky branch November 6, 2024 00:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cd proto pertaining to the Astria Protobuf spec sequencer pertaining to the astria-sequencer crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants