2021-03-23 19:40:22 -04:00
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog ](https://keepachangelog.com/en/1.0.0/ ),
and this project adheres to [Semantic Versioning ](https://semver.org/spec/v2.0.0.html ).
## [Unreleased]
2021-09-01 19:16:25 -04:00
### Changed
2021-09-10 01:35:59 -04:00
- Timestamping is now enabled by default even when the ASB is not run inside an interactive terminal.
2021-09-01 19:16:25 -04:00
- The `cancel` , `refund` and `punish` subcommands in ASB and CLI are run with the `--force` by default and the `--force` option has been removed.
The force flag was used to ignore blockheight and protocol state checks.
Users can still restart a swap with these checks using the `resume` subcommand.
2021-09-11 08:17:32 -04:00
- Changed log level of the "Advancing state", "Establishing Connection through Tor proxy" and "Connection through Tor established" log message from tracing to debug in the CLI.
2021-09-01 19:16:25 -04:00
2021-09-10 01:35:59 -04:00
### Added
- Added a `disable-timestamp` flag to the ASB that disables timestamps from logs.
2021-09-03 00:05:48 -04:00
## [0.8.3] - 2021-09-03
2021-09-01 23:29:52 -04:00
### Fixed
- A bug where the ASB erroneously transitioned into a punishable state upon a bitcoin transaction monitoring error.
This could lead to a scenario where the ASB was neither able to punish, nor able to refund, so the XMR could stay locked up forever while the CLI refunded the BTC.
- A bug where the CLI erroneously transitioned into a cancel-timelock-expired state upon a bitcoin transaction monitoring error.
This could lead to a scenario where the CLI is forced to wait for cancel, even though the cancel timelock is not yet expired and the swap could still be redeemed.
2021-09-01 01:29:31 -04:00
## [0.8.2] - 2021-09-01
2021-08-29 12:31:41 -04:00
### Added
2021-09-01 22:01:32 -04:00
- Add the ability to view the swap-cli bitcoin balance and withdraw.
See issue < https: / / github . com / comit-network / xmr-btc-swap / issues / 694 > .
2021-08-29 12:31:41 -04:00
2021-08-17 22:39:06 -04:00
### Fixed
- An issue where the connection between ASB and CLI would get closed prematurely.
The CLI expects to be connected to the ASB throughout the entire swap and hence reconnects as soon as the connection is closed.
This resulted in a loop of connections being established but instantly closed again because the ASB deemed the connection to not be necessary.
2021-09-01 01:29:31 -04:00
See issue < https: / / github . com / comit-network / xmr-btc-swap / issues / 648 > .
2021-08-20 03:33:59 -04:00
- An issue where the ASB was unable to use the Monero wallet in case `monero-wallet-rpc` has been restarted.
In case no wallet is loaded when we try to interact with the `monero-wallet-rpc` daemon, we now load the correct wallet on-demand.
2021-09-01 01:29:31 -04:00
See issue < https: / / github . com / comit-network / xmr-btc-swap / issues / 652 > .
2021-08-29 22:07:01 -04:00
- An issue where swap protocol was getting stuck trying to submit the cancel transaction.
We were not handling the error when TxCancel submission fails.
2021-08-30 00:43:53 -04:00
We also configured the electrum client to retry 5 times in order to help with this problem.
2021-09-01 01:29:31 -04:00
See issues: < https: / / github . com / comit-network / xmr-btc-swap / issues / 709 > < https: / / github . com / comit-network / xmr-btc-swap / issues / 688 > , < https: / / github . com / comit-network / xmr-btc-swap / issues / 701 > .
2021-08-29 07:24:09 -04:00
- An issue where the ASB withdraw one bitcoin UTXO at a time instead of the whole balance.
2021-09-01 22:01:32 -04:00
See issue < https: / / github . com / comit-network / xmr-btc-swap / issues / 662 > .
2021-08-17 22:39:06 -04:00
2021-08-15 21:37:09 -04:00
## [0.8.1] - 2021-08-16
2021-08-12 02:40:52 -04:00
### Fixed
- An occasional error where users couldn't start a swap because of `InsufficientFunds` that were off by exactly 1 satoshi.
2021-07-08 22:02:13 -04:00
## [0.8.0] - 2021-07-09
2021-05-30 07:53:43 -04:00
### Added
- Printing the deposit address to the terminal as a QR code.
To not break automated scripts or integrations with other software, this behaviour is disabled if `--json` is passed to the application.
2021-06-28 21:05:41 -04:00
- Configuration setting for the websocket URL that the ASB connects to in order to receive price ticker updates.
Can be configured manually by editing the config.toml file directly.
It is expected that the server behind the url follows the same protocol as the [Kraken websocket api ](https://docs.kraken.com/websockets/ ).
2021-07-06 00:35:17 -04:00
- Registration and discovery of ASBs using the [libp2p rendezvous protocol ](https://github.com/libp2p/specs/blob/master/rendezvous/README.md ).
ASBs can register with a rendezvous node upon startup and, once registered, can be automatically discovered by the CLI using the `list-sellers` command.
The rendezvous node address (`rendezvous_point`), as well as the ASB's external addresses (`external_addresses`) to be registered, is configured in the `network` section of the ASB config file.
2021-07-09 00:19:21 -04:00
A rendezvous node is provided at `/dnsaddr/rendezvous.coblox.tech/p2p/12D3KooWQUt9DkNZxEn2R5ymJzWj15MpG6mTW84kyd8vDaRZi46o` for testing purposes.
2021-07-06 00:35:17 -04:00
Upon discovery using `list-sellers` CLI users are provided with quote and connection information for each ASB discovered through the rendezvous node.
2021-07-06 05:17:17 -04:00
- A mandatory `--change-address` parameter to the CLI's `buy-xmr` command.
The provided address is used to transfer Bitcoin in case of a refund and in case the user transfers more than the specified amount into the swap.
For more information see [#513 ](https://github.com/comit-network/xmr-btc-swap/issues/513 ).
2021-05-30 07:53:43 -04:00
2021-06-23 01:42:15 -04:00
### Fixed
- An issue where the ASB gives long price guarantees when setting up a swap.
Now, after sending a spot price the ASB will wait for one minute for the CLI's to trigger the execution setup, and three minutes to see the BTC lock transaction of the CLI in mempool after the swap started.
If the first timeout is triggered the execution setup will be aborted, if the second timeout is triggered the swap will be safely aborted.
2021-07-07 20:35:18 -04:00
- An issue where the default Monero node connection string would not work, because the public nodes were moved to a different domain.
The default monerod nodes were updated to use the [melo tool nodes ](https://melo.tools/nodes.html ).
2021-06-23 01:42:15 -04:00
2021-07-06 00:39:05 -04:00
### Changed
- The commandline interface of the CLI to combine `--seller-addr` and `--seller-peer-id` .
These two parameters have been merged into a parameter `--seller` that accepts a single [multiaddress ](https://docs.libp2p.io/concepts/addressing/ ).
The multiaddress must end with a `/p2p` protocol defining the seller's peer ID.
2021-07-06 23:03:42 -04:00
- The `--data-dir` option to `--data-base-dir` .
Previously, this option determined the final data directory, regardless of the `--testnet` flag.
With `--data-base-dir` , a subdirectory (either `testnet` or `mainnet` ) will be created under the given path.
This allows using the same command with or without `--testnet` .
2021-07-06 00:39:05 -04:00
2021-06-08 22:13:29 -04:00
### Removed
- The websocket transport from the CLI.
Websockets were only ever intended to be used for the ASB side to allow websites to retrieve quotes.
The CLI can use regular TCP connections and having both - TCP and websockets - causes problems and unnecessary overhead.
2021-07-06 00:39:05 -04:00
- The `--seller-addr` parameter from the CLI's `resume` command.
This information is now loaded from the database.
2021-07-06 05:34:02 -04:00
- The `--receive-address` parameter from the CLI's `resume` command.
This information is now loaded from the database.
2021-06-08 22:13:29 -04:00
2021-05-28 03:17:26 -04:00
## [0.7.0] - 2021-05-28
2021-05-25 21:40:55 -04:00
### Fixed
- An issue where long-running connections are dead without a connection closure being reported back to the swarm.
Adding a periodic ping ensures that the connection is kept alive, and a broken connection is reported back resulting in a close event on the swarm.
This fixes the error of the ASB being unable to send a transfer proof to the CLI.
2021-05-24 21:36:24 -04:00
- An issue where ASB Bitcoin withdrawal can be done to an address on the wrong network.
A network check was added that compares the wallet's network against the network of the given address when building the transaction.
2021-05-25 21:40:55 -04:00
2021-05-23 23:46:07 -04:00
## [0.6.0] - 2021-05-24
2021-04-29 05:26:19 -04:00
### Added
2021-04-27 00:51:53 -04:00
- Cancel command for the ASB that allows cancelling a specific swap by id.
Using the cancel command requires the cancel timelock to be expired, but `--force` can be used to circumvent this check.
- Refund command for the ASB that allows refunding a specific swap by id.
Using the refund command to refund the XMR locked by the ASB requires the CLI to first refund the BTC of the swap.
If the BTC was not refunded yet the command will print an error accordingly.
The command has a `--force` flag that allows executing the command without checking for cancel constraints.
2021-04-28 02:13:04 -04:00
- Punish command for the ASB that allows punishing a specific swap by id.
Includes a `--force` parameter that when set disables the punish timelock check and verifying that the swap is in a cancelled state already.
- Abort command for the ASB that allows safely aborting a specific swap.
Only swaps in a state prior to locking XMR can be safely aborted.
- Redeem command for the ASB that allows redeeming a specific swap.
Only swaps where we learned the encrypted signature are redeemable.
The command checks for expired timelocks to ensure redeeming is safe, but the timelock check can be disable using the `--force` flag.
By default we wait for finality of the redeem transaction; this can be disabled by setting `--do-not-await-finality` .
2021-04-29 05:26:19 -04:00
- Resume-only mode for the ASB.
When started with `--resume-only` the ASB does not accept new, incoming swap requests but only finishes swaps that are resumed upon startup.
2021-05-07 05:06:58 -04:00
- A minimum accepted Bitcoin amount for the ASB 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.
2021-05-09 22:03:43 -04:00
- Added a new argument to ASB: `--json` or `-j` . If set, log messages will be printed in JSON format.
2021-04-29 05:26:19 -04:00
2021-04-29 04:50:49 -04:00
### Fixed
- An issue where both the ASB and the CLI point to the same default directory `xmr-btc-swap` for storing data.
2021-04-29 21:01:30 -04:00
The asb now uses `xmr-btc-swap/asb` and the CLI `xmr-btc-swap/cli` as default directory.
2021-04-29 04:50:49 -04:00
This is a breaking change.
2021-04-29 21:01:30 -04:00
If you want to access data created by a previous version you will have to rename the data folder or one of the following:
1. For the CLI you can use `--data-dir` to point to the old directory.
2. For the ASB you can change the data-dir in the config file of the ASB.
2021-04-29 22:36:26 -04:00
- The CLI receives proper Error messages if setting up a swap with the ASB fails.
This is a breaking change because the spot-price protocol response changed.
Expected errors scenarios that are now reported back to the CLI:
1. Balance of ASB too low
2. Buy amount sent by CLI exceeds maximum buy amount accepted by ASB
3. ASB is running in resume-only mode and does not accept incoming swap requests
2021-05-10 22:37:13 -04:00
- An issue where the monero daemon port used by the `monero-wallet-rpc` could not be specified.
The CLI parameter `--monero-daemon-host` was changed to `--monero-daemon-address` where host and port have to be specified.
2021-05-22 22:59:21 -04:00
- An issue where an ASB redeem scenario can transition to a cancel and publish scenario that will fail.
This is a breaking change for the ASB, because it introduces a new state into the database.
2021-04-29 04:50:49 -04:00
2021-05-06 23:25:25 -04:00
### Changed
2021-05-07 05:06:58 -04:00
- The ASB's `--max-buy` and `ask-spread` parameter were removed in favour of entries in the config file.
2021-05-06 23:25:25 -04:00
The initial setup includes setting these two values now.
2021-05-11 08:30:48 -04:00
- From this version on the CLI and ASB run on **mainnet** by default!
When running either application with `--testnet` Monero network defaults to `stagenet` and Bitcoin network to `testnet3` .
This is a breaking change.
It is recommended to run the applications with `--testnet` first and not just run the application on `mainnet` without experience.
2021-05-06 23:25:25 -04:00
2021-04-17 03:23:09 -04:00
## [0.5.0] - 2021-04-17
2021-04-14 20:16:34 -04:00
### Changed
2021-04-17 02:51:41 -04:00
- The quote protocol returns JSON encoded data instead of CBOR.
2021-04-14 20:16:34 -04:00
This is a breaking change in the protocol handling, old CLI versions will not be able to process quote requests of ASBs running this version.
2021-04-14 20:15:11 -04:00
### Fixed
2021-04-08 04:56:26 -04:00
2021-04-14 20:15:11 -04:00
- An issue where concurrent swaps with the same peer would cause the ASB to handle network communication incorrectly.
To fix this, all messages are now tagged with a unique identifier that is agreed upon at the start of the swap.
This is a breaking change in the network layer and hence old versions are not compatible with this version.
We advise to also not resume any swaps that have been created with an older version.
It is recommended to reset / delete the database after upgrading.
2021-04-14 20:16:34 -04:00
- An issue where the CLI would not reconnect to the ASB in case the network connection dropped.
We now attempt to re-establish the connection using an exponential backoff but will give up eventually after 5 minutes.
2021-04-08 04:56:26 -04:00
2021-04-07 20:02:13 -04:00
### Added
- Websocket support for the ASB.
The ASB is now capable to listen on both TCP and Websocket connections.
Default websocket listening port is 9940.
2021-04-21 21:33:36 -04:00
- Tor support as an optional feature.
2021-04-28 02:04:25 -04:00
If ASB detects that Tor's control port is open, a hidden service is created for
the network it is listening on (currently 2).
2021-04-21 21:33:36 -04:00
The Tor control port as well as Tor socks5 proxy port is configurable.
2021-04-07 20:02:13 -04:00
2021-04-06 04:20:31 -04:00
## [0.4.0] - 2021-04-06
2021-03-23 19:40:22 -04:00
### Added
- A changelog file.
2021-03-26 00:38:30 -04:00
- Automatic resume of unfinished swaps for the `asb` upon startup.
Unfinished swaps from earlier versions will be skipped.
2021-03-31 22:00:15 -04:00
- A configurable spread for the ASB that is applied to the asking price received from the Kraken price ticker.
The default value is 2% and can be configured using the `--ask-spread` parameter.
See `./asb --help` for details.
2021-03-23 19:40:22 -04:00
2021-04-01 00:13:29 -04:00
### Changed
- Require the buyer to specify the connection details of the peer they wish to swap with.
Throughout the public demo phase of this project, the CLI traded with us by default if the peer id and multiaddress of the seller were not specified.
Having the defaults made it easy for us to give something to the community that can easily be tested, however it is not aligned with our long-term vision of a decentralised network of sellers.
We have removed these defaults forcing the user to specify the seller they wish to trade with.
2021-08-19 21:43:29 -04:00
- The `resume` command of the `swap` CLI no longer require the `--seller-peer-id` parameter.
This information is now saved in the database.
2021-04-01 00:13:29 -04:00
2021-03-24 23:03:00 -04:00
### Fixed
2021-03-31 20:31:05 -04:00
- An [issue ](https://github.com/comit-network/xmr-btc-swap/issues/353 ) where the `swap` CLI would fail on systems that were set to a locale different than English.
A bad readiness check when waiting for `monero-wallet-rpc` to be ready caused the CLI to hang forever, preventing users from perform a swap.
2021-03-24 23:03:00 -04:00
2021-03-24 03:30:55 -04:00
### Security
- Fixed an issue where Alice would not verify if Bob's Bitcoin lock transaction is semantically correct, i.e. pays the agreed upon amount to an output owned by both of them.
Fixing this required a **breaking change** on the network layer and hence old versions are not compatible with this version.
2021-09-03 00:05:48 -04:00
[Unreleased]: https://github.com/comit-network/xmr-btc-swap/compare/0.8.3...HEAD
[0.8.3]: https://github.com/comit-network/xmr-btc-swap/compare/0.8.2...0.8.3
2021-09-01 01:29:31 -04:00
[0.8.2]: https://github.com/comit-network/xmr-btc-swap/compare/0.8.1...0.8.2
2021-08-15 21:37:09 -04:00
[0.8.1]: https://github.com/comit-network/xmr-btc-swap/compare/0.8.0...0.8.1
2021-07-08 22:02:13 -04:00
[0.8.0]: https://github.com/comit-network/xmr-btc-swap/compare/0.7.0...0.8.0
2021-05-28 03:17:26 -04:00
[0.7.0]: https://github.com/comit-network/xmr-btc-swap/compare/0.6.0...0.7.0
2021-05-23 23:46:07 -04:00
[0.6.0]: https://github.com/comit-network/xmr-btc-swap/compare/0.5.0...0.6.0
2021-04-17 03:23:09 -04:00
[0.5.0]: https://github.com/comit-network/xmr-btc-swap/compare/0.4.0...0.5.0
2021-04-06 06:09:42 -04:00
[0.4.0]: https://github.com/comit-network/xmr-btc-swap/compare/v0.3...0.4.0