Commit Graph

72 Commits (54061f941bd1826f710ebe5611f4cc457860bc03)

Author SHA1 Message Date
COMIT Botty McBotface 4ff74a3940 Prepare release 0.8.3 3 years ago
rishflab 2d64a8d356
Revert "Release version 0.8.3" 3 years ago
rishflab 27b1e60f0b
Revert "Release version 0.8.3" 3 years ago
COMIT Botty McBotface deadb7d4c8 Prepare release 0.8.3 3 years ago
COMIT Botty McBotface 2a4ffaeacb Prepare release 0.8.3 3 years ago
bors[bot] 1f371ecfee
Merge #724
724: Handle errors when waiting for subscriptions r=rishflab a=rishflab

We were not thorough enough in PR #705 and there were some remaining
unhandled errors.

Co-authored-by: rishflab <rishflab@hotmail.com>
3 years ago
rishflab ce58b8b333 Handle errors when waiting for subscriptions
We were not thorough enough in PR #705 and there were some remaining
unhandled errors.

Co-authored-by: Daniel Karzel <daniel@comit.network>
3 years ago
rishflab 5e35a2e575 Fix duplication of entry in CHANGELOG.md 3 years ago
COMIT Botty McBotface d482db4e67 Prepare release 0.8.2 3 years ago
devbordecraft 7a12a847a0 Fetch multiple UTXOs when we do max_giveable 3 years ago
devbordecraft f2df838a3c Allow withdrawing and viewing of the bitcoin balance on swap-cli 3 years ago
bors[bot] 51d8623ed7
Merge #704
704: Allow withdrawing and viewing of the bitcoin balance on swap-cli r=rishflab a=devbordecraft

Same mechanics of the ASB but on swap-cli as discussed in #694

Co-authored-by: devbordecraft <devbordecraft>
3 years ago
devbordecraft e8a6af1517 Allow withdrawing and viewing of the bitcoin balance on swap-cli
Fix formatting issue

Fix after review
3 years ago
rishflab 8598bcade1 Configure electrum client to retry 5 times 3 years ago
Daniel Karzel 18faa786d6 Fail if something goes wrong when checking tx lock status
Probably a failure when interacting with the electrum node to get script
 status updates
3 years ago
Thomas Eizinger 25b123d6ed
Load wallet in `monero-wallet-rpc` on demand if necessary
Previously, we relied on the wallet in the `monero-wallet-rpc` daemon
to be loaded as we do on startup. As a consequence of this expectation,
restarting `monero-wallet-rpc` to fix bugs like #652 resulted in the
ASB no longer operating correctly.

To fix this, we now load the wallet on-demand in case the daemon responds
with the error code -13.

Ideally, we would implement this behaviour generically using the proxy
pattern on the `MoneroWalletRpc` trait. Unfortunately, when attempting
to do so we uncover a limitation in the design of `jsonrpc_client`.
This limitation is tracked in https://github.com/thomaseizinger/rust-jsonrpc-client/issues/47.
Once fixed, we can implement this logic in a more robust way that is not
tied to the `check_tx_key` RPC call but applies to any RPC call automatically.
3 years ago
Thomas Eizinger c04d2dc944
Merge two `CHANGED` sections in old changelog entry 3 years ago
Thomas Eizinger 6c446825b7
Instruct `Ping` to keep the connection alive 3 years ago
COMIT Botty McBotface 7126d77dc1 Prepare release 0.8.1 3 years ago
Thomas Eizinger 0296509110
Upgrade to bdk 0.10
This fixes #546. I don't know why, but I can't reproduce the problem
with the updated dependency.
3 years ago
Thomas Eizinger 5c4aec6ae3
Rendezvous point is not defaulted 3 years ago
COMIT Botty McBotface 403e3d2b33 Prepare release 0.8.0 3 years ago
Daniel Karzel 0dc3943d9c
Update default Monero node URLs and info
xmr.to nodes are not served at the xmr.to domain but moved to melo.tools
3 years ago
Daniel Karzel ab24f7bce5
Revert "Prepare release 0.8.0"
This reverts commit 50da9580
3 years ago
COMIT Botty McBotface 50da958078 Prepare release 0.8.0 3 years ago
Thomas Eizinger 40eccd089f
Change `--data-dir` for `--data-base-dir` 3 years ago
Thomas Eizinger acfd2dd6bb
Store Monero receive address in database and load it on resume 3 years ago
Thomas Eizinger 5463bde4f8
Add a mandatory `--change-address` parameter to `buy-xmr`
Fixes #513.
3 years ago
Daniel Karzel 625ff4868a
Changelog entry for the rendezvous integration 3 years ago
Thomas Eizinger ec4234fbb9
Merge `--seller-addr` and `--seller-peer-id` into `--seller` parameter
This simplifies the CLI's interface.
3 years ago
Thomas Eizinger bb8e841b0d
Make CHANGELOG.md follow the semantic newline spec 3 years ago
Your Name 665ea503d2 Make price ticker ws url configurable 3 years ago
Daniel Karzel 8e80628a71
Changelog entry for price guarantee changes 3 years ago
Thomas Eizinger 8a30ef725c
Refactor transports to construct them specific for each application
Instead of splitting up the transports into capabilities, we compose
them directly for each application. This allows us to remove the
websocket transport for the CLI which is really only needed for the
ASB to allow retrieval of quotes via the browser.
3 years ago
xscd 03857ca835 Print the Bitcoin address to the terminal as a QR code 3 years ago
COMIT Botty McBotface 7e6ff81efb Prepare release 0.7.0 3 years ago
Daniel Karzel 202f6d1fa0
Bitcoin network check when building PSBT
This ensures that funds are not sent to an address on the wrong network.
3 years ago
Daniel Karzel c9064d5a37
Add ping protocol to ensure connection is alive
Adds the ping behaviour to both ASB and CLI behaviour that periodically pings a connected party to ensure that the underlying network connection is still alive.
This fixes problems with long-running connections that become dead without a connection closure being reported back to the swarm.
3 years ago
COMIT Botty McBotface 3f2d094f65
Prepare release 0.6.0 3 years ago
Daniel Karzel 01af9a5676
Bitcoin transaction published state
This improves the error handling on the ASB.
Once the Bitcoin redeem transaction is seen in mempool, the state machine cannot transition to a cancel scenario anymore because at that point the CLI will have redeemed the Monero.
The additional state then waits for transaction finality.
3 years ago
Daniel Karzel 7ec323ea1f
Mainnet changelog entry 3 years ago
Daniel Karzel 1cdc23de32
Explicitly specify `monero-wallet-rpc` deamon port
In order to allow people to plug into public nodes / be more flexible with their own setup we now enforce specifying the monero daemon port to be used by the `monero-wallet-rpc`.
3 years ago
Philipp Hoenisch fc0cceb180
Toggle json logs using commandline flag. 3 years ago
Daniel Karzel 652aae9590
Introduce a minimum buy amount
Introduces a minimum buy Bitcoin amount similar to the maximum amount already present.
For the CLI the minimum amount is enforced by waiting until at least the minimum is available as max-giveable amount.
3 years ago
Daniel Karzel 1d62f4916c
Move `max_buy` and `ask_spread` into config
Max-buy and spread is not something that one would configure on every run.
More convenient to keep this in the config.

The max-buy Bitcoin value was adapted to `0.02` which is more reasonable for mainnet.
Activated feature `serde-float` to serialize the spread (Decimal) as float instead of string.

```
...

[maker]
max_buy_btc = 0.02
ask_spread = 0.02
```
3 years ago
Daniel Karzel daa572e5bf
Move recovery commands in dedicated module
Less clutter in the folder structure.
3 years ago
Daniel Karzel 4deb96a3c5
ASB manual recovery commands
Adds `cancel`, `refund`, `punish`, `redeem` and `safely-abort` commands to the ASB that can be used to trigger the specific scenario for the swap by ID.
3 years ago
Daniel Karzel ea76ae5821
Return proper error to CLI for all expected scenarios
When a CLI requests a spot price have some errors that are expected, where we can provide a proper error message for the CLI:
- Balance of ASB too low
- Buy amount sent by CLI exceeds maximum buy amount accepted by ASB
- ASB is running in maintenance mode and does not accept incoming swap requests

All of these errors returns a proper error to the CLI and prints a warning in the ASB logs.
Any other unexpected error will result in closing the channel with the CLI and printing an error in the ASB logs.
3 years ago
Daniel Karzel f6497778ed
Add resume-only mode for the ASB
Resume-only is a maintenance mode where no swaps are accepted but unfinished swaps are resumed.
This is achieve by ignoring incoming spot-price requests (that would lead to execution setup) in the event-loop.
3 years ago
Daniel Karzel 69f7565746
!fixup Different default directories for CLI and ASB
Using the same default directory as data-/config-dir has caused unwanted side effects when running both applications on the same machine.
Use these directory names:
- ASB: xmr-btc-swap/asb
- CLI: xmr-btc-swap/cli

Since the functionality is now application specific the respective functions were moved into the appropriate module of the application.
3 years ago