-
Notifications
You must be signed in to change notification settings - Fork 115
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
rfq+priceoraclerpc: add counterparty field to QueryAssetRatesRequest #1161
Draft
ffranr
wants to merge
8
commits into
main
Choose a base branch
from
rfq-pass-peer-to-price-oracle
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+354
−219
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
This type relates an asset to BTC rate to its expiry time.
This commit includes the following changes: * Rename the `BuyRequest.SuggestedAssetRate` field to `AssetRateHint` with the new `AssetRate` type. * Update the `queryAskFromPriceOracle` function to accept the `AssetRate` type as an argument. * Update the `PriceOracle.QueryAskPrice` function to accept the `AssetRate` type as an argument. This change provides the price oracle with the asset rate hint's expiry timestamp from the BuyRequest, instead of relying on the default expiry lifetime.
Rename `SellRequest.SuggestedAssetRate` to `AssetRateHint` and change its type to the new `AssetRate`.
This update adds an asset rate hint argument to the `queryBidFromPriceOracle` negotiator method and the `PriceOracle` interface's `QueryBidPrice` method.
As a result of this change the price oracle's quote expiry value is used in the request constructor.
As a result of this change the price oracle's quote expiry value is used in the request constructor.
This commit does the following: * Make use of AssetRate in the OracleResponse type. * Modify functions queryBidFromPriceOracle and queryAskFromPriceOracle such that they return the new AssetRate types. Added TODOs noting that New*AcceptFromRequest functions will be modified similarly in future work.
This commit updates the price oracle RPC interface by adding a counterparty field to the QueryAssetRatesRequest message. This field allows the price oracle to adjust asset rates based on the Lightning Network topology.
Pull Request Test Coverage Report for Build 11556152827Details
💛 - Coveralls |
For privacy reasons, providing the peer ID to the price oracle service should be disabled by default. We should expect that a third-party public price oracle service will be used by default. |
ffranr
force-pushed
the
rfq-pass-rate-expiry-to-price-oracle
branch
2 times, most recently
from
October 29, 2024 19:59
029b0cb
to
5c2ad43
Compare
ffranr
force-pushed
the
rfq-pass-rate-expiry-to-price-oracle
branch
2 times, most recently
from
October 30, 2024 17:35
10a9192
to
71d2293
Compare
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.
This commit updates the price oracle RPC interface by adding a counterparty field to the QueryAssetRatesRequest message. This field allows the price oracle to adjust asset rates based on the Lightning Network topology.
Notes for Reviewers
This PR depends on #1160
Merge PR #1160 first.
This PR will be in draft until then but is ready for review.