Commit Graph

430 Commits (ece689f5caff7a0e1f85387c94bc3941dc0b9ad4)
 

Author SHA1 Message Date
Franck Royer ece689f5ca
There is only one binary, we should use `main.rs` naming convention 4 years ago
Franck Royer 4150e75488
Replace `Try_From` state conversion with `From` for Bob 4 years ago
Franck Royer 5d1b10cc58
Align Bob DB states with swap states 4 years ago
Franck Royer e541f7b83d
Replace `TryFrom` with `From` for Alice states 4 years ago
Franck Royer 69e1c2bb27
Align Alice DB states with swap states 4 years ago
Franck Royer a31db63e54
Improve state names and display 4 years ago
Franck Royer f0736d0906
Remove Refund timelock and T0/T1/T2
There are no refund timelock, only a cancellation timelock and punish
timelock.

Refund can be done as soon as the cancellation transaction is published.
4 years ago
Franck Royer 405e377f79
Rename `EncSign` to `EncSig`
`EncSig` means "encrypted signature", the item,
not be confused with "signing", the action
4 years ago
bors[bot] 9c83ca52ad
Merge #107
107: Ensure that Bob can cancel correctly if T1 expired and Alice did not … r=da-kami a=da-kami

Bob has to check for the possibility to cancel in every state after he locked the BTC.
Otherwise Bob will try to perform actions that don't have any point and it might be impossible to use the `resume` command because it will always fail in trying to go on with Alice even though that might not be possible.

Co-authored-by: Daniel Karzel <daniel@comit.network>
4 years ago
bors[bot] 4191d41ccf
Merge #102
102: Separate Buy/Sell for resume command r=D4nte a=D4nte

And other clean ups from #100.

Co-authored-by: Franck Royer <franck@coblox.tech>
4 years ago
Franck Royer 058c214892
Only run 2 tests at the same time to avoid resource issue with docker 4 years ago
Franck Royer 297b15e3ce
Remove async block when it is not needed 4 years ago
Franck Royer e079b84500
Ensure we wait for other party to complete
Before we check the balances.
4 years ago
Franck Royer 1fa812b727
Separate Buy/Sell for resume command
To avoid confusing the user on whether person should enter a listen addr
or a connect peer id and address
4 years ago
bors[bot] 672377b216
Merge #108
108: Remove all CLI short-codes because they don't add value at the moment r=da-kami a=da-kami

`struct_opt` does not check at compile time, if there is a duplicate. Only when running the application. We have been running in this annoyance twice, so let's remove the shortcodes for now. 

Co-authored-by: Daniel Karzel <daniel@comit.network>
4 years ago
Daniel Karzel a692cf9299 Remove all short-codes because they don't add value at the moment 4 years ago
Daniel Karzel c9d492d155 Only wait for xmr-lock until t1 expired 4 years ago
Daniel Karzel 0cdb7ca8a8 Move current_epoch from lib to bitcoin.rs 4 years ago
Daniel Karzel 83ce6f2c85 Ensure that Bob can cancel correctly if T1 expired and Alice did not move
Bob has to check for the possibility to cancel in every state after he locked the BTC.
Otherwise Bob will try to perform actions that don't have any point.
4 years ago
Daniel Karzel 8296490764
Merge pull request #111 from comit-network/trace-xmr-btc
Fix tracing subscribe filter for xmr-btc`
4 years ago
Franck Royer 25703a778e
Merge pull request #110 from comit-network/add-address 4 years ago
Daniel Karzel 5f8b7f2624 Fix tracing subscribe filter for xmr-btc` 4 years ago
Franck Royer b05a96d49b
Merge pull request #105 from comit-network/delete-merged-branch
Add Mergify rule to delete merged branch and bors+
4 years ago
Franck Royer 40a27a2438
Remove dead code 4 years ago
Franck Royer df237f82cf
Fix clippy warning 4 years ago
Franck Royer 49b84d84b9
Add address at the start
Do not carry peer id around as we currently only expect one peer.
4 years ago
Franck Royer a1c3e1fcbb
Add Mergify rule to delete merged branch and bors+ 4 years ago
Franck Royer 7d3b2faedd
Merge pull request #100 from comit-network/Bob-restart
Merging now, will tackle comments in follow-up.
4 years ago
Franck Royer 1e4b115556
Separate Bob restart tests
To stabilize CI
4 years ago
Franck Royer e366d3a73b
Join all futures to avoid hanging tests 4 years ago
Franck Royer 2abf65f3b6
Remove sleep that seems unnecessary 4 years ago
Franck Royer 4a4e23038b
Add logging to investigate add address race condition 4 years ago
Franck Royer 1a4bd0e2b4
Bob refunds swap after restart that requires communication
As Bob is dialing Alice, we now ensure that we are connected to Alice
at each step that needs communication.
If we are not connected, we proceed with dialing.

In an attempt to improve libp2p usage, we also add known address of
Alice first and only use peer_id to dial.
This ensures that we use the expected peer id.
4 years ago
Franck Royer d9ea7ab605
Only carry the tx_lock_id instead of the full state 4 years ago
Franck Royer edfab58246
Scope alice db
To better match the restart scenario
4 years ago
Franck Royer dc96b3d1e9
Stop running first event loop after Alice restarts 4 years ago
Franck Royer 638143a10d
Replace hard coded port by dynamic available one
Fixes #84.
4 years ago
Franck Royer 2212758d17
Rename refund test as it is alice specific 4 years ago
Franck Royer 9af8ab3028
Increase stack size to 16MB
Default is 8MB. As we start both Alice and bob in test, it is fine to
double the stack size but still assume it does not impact the
normal execution of the binary.
4 years ago
bors[bot] 3db71997d3
Merge #99
99: Cleanup resume_from_database functions only used in tests r=da-kami a=da-kami

Follow up of https://github.com/comit-network/xmr-btc-swap/pull/88

Co-authored-by: Daniel Karzel <daniel@comit.network>
4 years ago
bors[bot] 4f631c0c9b
Merge #98
98: Remove tor module r=da-kami a=da-kami

This removes the currently unused `tor module`.
Different `tokio` versions have been causing issues with the `tor` module in the past (i.e. `Cargo.lock` broken problem...). It started causing issues again when adding a dependency to `jsonrpc_client` working on https://github.com/comit-network/xmr-btc-swap/pull/97

We don't support `tor` at the moment and are no planning to add this feature initially as it is not super important to users. 
The functionality can easily added again at a later point.

Co-authored-by: Daniel Karzel <daniel@comit.network>
4 years ago
bors[bot] 88c29dbce5
Merge #94
94: T1Expired state for Bob and check expiries in states after both locked r=da-kami a=da-kami



Co-authored-by: Daniel Karzel <daniel@comit.network>
4 years ago
Daniel Karzel 4046305474
Merge pull request #88 from comit-network/resume-swap-cli
Resume command and global database cl-parameter
4 years ago
Daniel Karzel 20893c1bb1 Cleanup Display for database states 4 years ago
Daniel Karzel e6493784bf Change `pin_mut!` to `select!` 4 years ago
Daniel Karzel 773eebc723 Cleanup resume_from_database functions only used in tests 4 years ago
Daniel Karzel e9681b6e2b Work in review comments 4 years ago
Daniel Karzel 43d05935e7 Remove tor module 4 years ago
Daniel Karzel 093cbaa4b4 Introduce T1Expired state for Bob properly and check expiries in states after both locked 4 years ago
Daniel Karzel 6d03d1bbff Resume command and global database cl-parameter 4 years ago