feat(trading-proto-upgrade): swap UTXO PoC using Storable State Machine.#1958
feat(trading-proto-upgrade): swap UTXO PoC using Storable State Machine.#1958
Conversation
laruh
left a comment
There was a problem hiding this comment.
Great work!
Left comments to add doc coms and asked one question
| pub type ValidateDexFeeResult = MmResult<(), ValidateTakerPaymentError>; | ||
| pub type ValidateDexFeeSpendPreimageResult = MmResult<(), ValidateDexFeeSpendPreimageError>; | ||
|
|
||
| pub type IguanaPrivKey = Secp256k1Secret; |
|
@laruh I added as many doc comments as I could 🙂 Can you review the PR again, please? |
shamardy
left a comment
There was a problem hiding this comment.
Huge work!
First review iteration, Will do another last review iteration before the end of the week.
For this review, only minor issues and opening some points for discussion.
|
I looked over the whole swap v2 code for better understanding. Do I understand it correct that in swap v2 we eliminate step1 (taker sends dex fee) and now taker sends all amounts in his tx: dex fee, premium, trading amount as step1? |
|
Hey @dimxy, thanks for your feedback! 🙂
Yes, it's correct.
Yes, it does, but we are looking for ways to solve this problem or at least reduce attack surface. |
|
@KomodoPlatform/qa: This comment #1958 (comment) has a test plan to test only the success case of utxo/utxo swap using the new trading protocol. |
|
@kivqa I've setup 3 seednodes for use in testing this PR. Add the following to your MM2.json: |
|
Taker Maker Seednode |
|
Added this PR to v1.1.0-beta since it's a WIP PR and doesn't require any changes for GUIs yet. |
#1895
What's done:
broadcast_swap_v2_messagecan (and likely should) be used for other protocols utilizing protobuf, but I preferred to keep them inlp_swapfor now to not overlap with P2P upgrade PR.Important notes:
Test plan:
"use_trading_proto_v2": truein MM2.conf."protocol": { "type": "UTXO" }.setpriceandbuy/sellcalls.