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

Reduce RFQ wire message type count #921

Merged
merged 7 commits into from
Jun 5, 2024
Merged

Reduce RFQ wire message type count #921

merged 7 commits into from
Jun 5, 2024

Conversation

ffranr
Copy link
Contributor

@ffranr ffranr commented Jun 1, 2024

Issue: #914

This PR includes request message changes. It does not include accept message changes, however, should be ready for review and merge as is.

@ffranr ffranr self-assigned this Jun 1, 2024
@ffranr ffranr force-pushed the rfq-wire-messages branch from 13e85f6 to 6b09ffa Compare June 3, 2024 13:02
@ffranr ffranr marked this pull request as ready for review June 3, 2024 13:05
@ffranr ffranr requested a review from guggero June 3, 2024 13:05
@dstadulis dstadulis added this to the v0.4 milestone Jun 3, 2024
@dstadulis dstadulis added the rfq label Jun 3, 2024
Copy link
Member

@guggero guggero left a comment

Choose a reason for hiding this comment

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

Did a first pass and it looks great! Will probably want to run it through some manual and integration tests with the whole custom channel setup to make sure nothing breaks, so we might want to get in the other RFQ PR first.

rfqmsg/messages.go Outdated Show resolved Hide resolved
rfqmsg/request.go Show resolved Hide resolved
rfqmsg/request.go Outdated Show resolved Hide resolved
rfqmsg/buy_request.go Outdated Show resolved Hide resolved
ffranr added 7 commits June 4, 2024 15:22
Adding this method ensures that `WireMsgDataVersion` satisfies the
record producer interface.
This commit introduces the `requestWireMsgData` type, encapsulating the fields present in a quote request wire message data field.
This commit refactors the `ToWire` methods for `BuyRequest` and
`SellRequest` types to utilize the new `requestWireMsgData` type.

This change unifies the wire message type integer for both buy and sell
requests.
Having introduced the type `requestWireMsgData`, the inner type
`buyRequestMsgData` is now unnecessary.
Having introduced the type `sellRequestMsgData`, the inner type
`sellRequestMsgData` is now unnecessary.
@ffranr ffranr force-pushed the rfq-wire-messages branch from 6b09ffa to 8632509 Compare June 4, 2024 14:53
@ffranr ffranr requested review from guggero and GeorgeTsagk June 4, 2024 18:26
Copy link
Member

@guggero guggero left a comment

Choose a reason for hiding this comment

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

tACK, validated against the custom channel integration test, things still work as before.

Copy link
Member

@GeorgeTsagk GeorgeTsagk left a comment

Choose a reason for hiding this comment

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

ACK ✔️

@ffranr ffranr added this pull request to the merge queue Jun 5, 2024
Merged via the queue into main with commit 7dd2bee Jun 5, 2024
14 checks passed
@guggero guggero deleted the rfq-wire-messages branch June 5, 2024 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

4 participants