-
Notifications
You must be signed in to change notification settings - Fork 59
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
Use fallback oracles in Rust client #838
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Lou-Kamades
commented
Jan 10, 2024
Lou-Kamades
changed the title
WIP: Use fallback oracles in Rust client
Use fallback oracles in Rust client
Jan 10, 2024
ckamm
reviewed
Jan 11, 2024
ckamm
reviewed
Jan 11, 2024
let oracle_acc = &KeyedAccountSharedData::new(bank.oracle, oracle.into()); | ||
let price = bank.oracle_price(&OracleAccountInfos::from_reader(oracle_acc), None)?; | ||
let oracle_data = self.fetch_raw(&bank.oracle)?; | ||
let oracle = &KeyedAccountSharedData::new(bank.oracle, oracle_data.into()); |
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.
looks like oracle
could also be fetched with the new helper?
Lou-Kamades
force-pushed
the
lou/fallback-oracles-client
branch
2 times, most recently
from
January 11, 2024 21:14
e73d551
to
fbb0c84
Compare
Lou-Kamades
force-pushed
the
lou/fallback-oracles-client
branch
from
January 11, 2024 21:16
fbb0c84
to
b70d3cb
Compare
ckamm
reviewed
Jan 17, 2024
Lou-Kamades
force-pushed
the
lou/fallback-oracles-client
branch
from
January 20, 2024 17:26
2b0e9f1
to
7417ae2
Compare
Lou-Kamades
force-pushed
the
lou/fallback-oracles-client
branch
from
January 20, 2024 17:31
7417ae2
to
46be2eb
Compare
ckamm
reviewed
Jan 22, 2024
ckamm
approved these changes
Jan 23, 2024
Lou-Kamades
added a commit
that referenced
this pull request
Jan 24, 2024
* rename usd_opt to usdc_opt in OracleAccountInfos * use fallbacks when fetching bank+ price in AccountFetcher struct * feat: add derive_fallback_oracle_keys to MangoGroupContext * test: properly assert failure CU in test_health_compute_tokens_fallback_oracles * provide fallback oracle accounts in the rust client * liquidator: update for fallback oracles * set fallback config in mango services * support fallback oracles in rust settler + keeper * fix send error related to fetching fallbacks dynamically in tcs_start * drop derive_fallback_oracle_keys_sync * add fetch_multiple_accounts to AccountFetcher trait * revert client::new() api * deriving oracle keys uses account_fetcher * use client helpers for deriving health_check account_metas * add health_cache helper to mango client * add get_slot to account_fetcher * lint * cached account fetcher only fetches uncached accounts * ensure keeper client does not use cached oracles for staleness checks * address minor review comments * create unique job keys for CachedAccountFetcher.fetch_multiple_accounts * fmt * improve hashing in CachedAccountFetcher.fetch_multiple_accounts --------- Co-authored-by: Christian Kamm <mail@ckamm.de>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.