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

fix(sequencer): update put_price_for_currency_pair #1959

Merged
merged 1 commit into from
Feb 11, 2025

Conversation

noot
Copy link
Collaborator

@noot noot commented Feb 10, 2025

Summary

update put_price_for_currency_pair to error if state is not found. this is correct as the function is only called from apply_prices_from_vote_extensions, which only contains currency pairs that are already in the app state, as an invariant of the id_to_currency_pair validation done inside validate_id_to_currency_pair_mapping. thus, the previous else case where the state didn't exist would never be hit.

Background

resolves oracle audit issue 3.1.

Changes

  • update put_price_for_currency_pair to error if state is not found.

Testing

existing unit tests

@noot noot requested a review from a team as a code owner February 10, 2025 16:59
@noot noot requested a review from Fraser999 February 10, 2025 16:59
@github-actions github-actions bot added the sequencer pertaining to the astria-sequencer crate label Feb 10, 2025
@noot noot merged commit b2083b4 into feat/oracle Feb 11, 2025
45 checks passed
@noot noot deleted the noot/oracle-fix-3.1 branch February 11, 2025 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sequencer pertaining to the astria-sequencer crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants