Commit Graph

902 Commits (2041f367c6c0d0fd80ccd37f2496d119c1df8b54)
 

Author SHA1 Message Date
bors[bot] 903469f62a
Merge #118
118: Add minimum monero confirmations to config use it for Bob r=da-kami a=da-kami

After discussion with @bonomat about enforced `10` confirmations until a tx is spendable on Monero I gave it a try with only `1` confirmation on regtest happy-path-test and `5` for `stagenet` and did not encounter problems. Both swaps passed without problems so I am proposing to merge these changes. 

One additional change crept in: Changed the average blocktime for `stagenet` to `4` mins, because the blocktime fluctuates a lot. See: https://monero-stagenet.exan.tech/

Co-authored-by: Daniel Karzel <daniel@comit.network>
4 years ago
Daniel Karzel e031681369 Add minimum monero confirmations to config use it for Bob 4 years ago
bors[bot] 184f179044
Merge #115
115: Monero wallet network, Testnet r=da-kami a=da-kami

Add network for monero and switch application to run on Bitcoin `testnet3` and Monero `stagenet`.

Co-authored-by: Daniel Karzel <daniel@comit.network>
4 years ago
Daniel Karzel c6bc45e7a0 Wait for bitcoin tx finality before locking XMR 4 years ago
Daniel Karzel 30dd15774e Log Bitcoin and Monero transaction IDs on info instead of debug 4 years ago
Daniel Karzel 0977d36703 Set log level to info instead of trace 4 years ago
Daniel Karzel 72aa517af8 Work in review comments 4 years ago
Daniel Karzel 8a2128e93a Correct monero-wallet-rpc parameter name 4 years ago
Daniel Karzel 4d9559fc2e Monero network settings and testnet 4 years ago
Daniel Karzel 1f7e72b230 Log bitcoin harness and monero harness 4 years ago
Franck Royer dd10e68db4
Merge pull request #113 from comit-network/clippy 4 years ago
bors[bot] 97eb24a26c
Merge #114
114: Type timelock and block height r=D4nte a=D4nte

To ensure no mistake is made (and none were!)

Co-authored-by: Franck Royer <franck@coblox.tech>
4 years ago
Franck Royer bcbc54b569
Type timelock and block height
To ensure no mistake is made (and none were!)
4 years ago
Franck Royer 81cbc24c46
Use action to name trait 4 years ago
Franck Royer e1e8533862
Embed state mod in database mod
The `Swap` struct is now database specific, no need to have a 20 lines
 module.
4 years ago
Franck Royer 59708c57e6
Move Alice and Bob db states in separate modules 4 years ago
Franck Royer b410de01df
Move state.rs under database module
The types in state are only used for the database
4 years ago
Franck Royer 8c7964bfee
Rename storage.rs to database.rs to reduce terminology variants 4 years ago
Franck Royer 5ed18469e4
Move db state conversion with db type definition
Those conversion are specific to the database and should be defined with
in the database module.
4 years ago
Franck Royer 2a778f5644
Remove overzealous clippy overrides
We have overridden a number of clippy warnings such as
"large enum variant".

Considering that we have a number of issues
 with the stack size in CI, it is more prudent to follow clippy's advice
 and box larger items so that the enum does not take larger space.

Do note that an instance of the enum always takes as much space as its
largest variant.
4 years ago
Franck Royer cdf2800fa5
Align clippy lints
Lints in `main.rs` are not used if there is a `lib.rs` file.
4 years ago
Franck Royer ece689f5ca
There is only one binary, we should use `main.rs` naming convention 4 years ago
bors[bot] 4e91ac467b
Merge #112
112: Align database types with swap states r=D4nte a=D4nte

- Removing naming ambiguities and errors
- Clean up the DB state now that they are only use in the new recursive function.
- Remove few todos and panics.

Co-authored-by: Franck Royer <franck@coblox.tech>
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