-
Notifications
You must be signed in to change notification settings - Fork 117
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
More RFQ improvments #1197
More RFQ improvments #1197
Conversation
Things left to think about:
|
Pull Request Test Coverage Report for Build 11913943259Details
💛 - Coveralls |
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.
Very nice cleanup
Could you rebase so that we can see the LitD itests running against this too?
Refactor SellOrder by replacing the fields "asset ID" and "asset group key" with a single "asset specifier" field for simplicity and consistency.
Currently, the `SellOrder.Peer` field must be specified, but in the future, the negotiator should be able to select the optimal peer automatically. This commit updates the interface to support this future functionality by making `SellOrder.Peer` an Option type. Note that this field was already a pointer.
This commit removes the `peer` argument from the methods queryBidFromPriceOracle and queryAskFromPriceOracle
Populate the expiry timestamp field in SellOrder and use type `time.Time`.
df78d25
to
0ef0264
Compare
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.
Very nice, thanks for the additional cleanup!
One request and one nit, so we're quite close 🙏
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.
Lgtm!
Refactor BuyAccept by replacing multiple fields with a single asset rate field using the new AssetRate type.
When handling a quote request accept message, the peer-provided price must be validated against our price oracle. This commit passes the peer-provided price as a hint to the oracle, offering additional context to improve decision-making.
Improve doc by relating these types to the wider lightning payment flow context.
Populate the expiry timestamp field in BuyOder and use type `time.Time`.
Improve doc by relating this type to the wider lightning payment flow context.
Refactor SellAccept by replacing multiple fields with a single asset rate field using the new AssetRate type.
Changed the `expiry` argument in `expiryWithinBounds` to be of type `time.Time` for improved type safety and clarity.
Set the converted `time.Time` to UTC when transforming from Unix time. This change promotes consistency and simplifies debugging.
Ensure the request message version check validates only a specific version number, rather than accepting any version greater than or equal to the latest message number.
0ef0264
to
abf47dc
Compare
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.
Sorry, found one last thing. Other than that LGTM 🎉
Update the buy/sell classification logic for incoming requests to rely on the new transfer type field. When the requesting peer attempts to pay an invoice using a Tap asset, they are "selling" the Tap asset to the edge node. Conversely, when the requesting peer attempts to receive a Tap asset as payment to settle an invoice, they are "buying" the Tap asset from the edge node.
abf47dc
to
a1d989d
Compare
Improve docs for:
SellOrder
,SellRequest
,BuyOrder
,BuyRequest
.Populate transfer type field in request.
Make use of
AssetRate
type.