Releases: comit-network/xmr-btc-swap
Releases · comit-network/xmr-btc-swap
0.12.0
Changed
- Update
bdk
library to latest version. This introduces an incompatability with previous versions due to different formats being used to exchange Bitcoin transactions - Changed ASB to quote on Monero unlocked balance instead of total balance
- Allow
asb
to set a bitcoin address that is controlled by the asb itself to redeem/punish bitcoin to
Added
- Allow asb config overrides using environment variables. See 1231
0.11.1
Changed
- Immediately fetch transaction status upon subscription
- Dependency updates
0.11.0
Changed
- Update from Monero v0.17.2.0 to Monero v0.18.0.0
- Change Monero nodes to Rino tool nodes
- Always write logs as JSON to files
- Change to UTC time for log messages, due to a bug causing no logging at all to be printed (linux/macos), and an unsoundness issue with local time in the time crate
- Fix potential integer overflow in ASB when calculating maximum Bitcoin amount for Monero balance
- Reduce Monero locking transaction fee amount from 0.000030 to 0.000016 XMR, which is still double the current median fee as reported at monero.how
Added
- Adjust quote based on Bitcoin balance.
If the max_buy_btc in the ASB config is higher than the available balance to trade, it will return the max available balance discounting the Monero locking fees. In the case the balance is lower than the min_buy_btc config it will return 0 to the CLI. If the ASB returns a quote of 0 the CLI will not allow you continue with a trade. - Reduce required confirmations for Bitcoin transactions from 2 to 1
- Both the ASB and CLI now support the Identify protocol. This makes its version and network (testnet/mainnet) avaliable to others
- Display minimum BTC deposit required to cover the minimum quantity plus fee in the Swap CLI
- Swap CLI will check its monero-wallet-rpc version and remove it if it's older than Fluorine Fermi (0.18)
0.10.2
Changed
- Record monero wallet restore blockheight in state
SwapSetupCompleted
already.
This solves issues where the CLI went offline after sending the BTC transaction, and the monero wallet restore blockheight being recorded after Alice locked the Monero, resulting in the generated XMR redeem wallet not detecting the transaction and reportingNo unlocked balance in the specified account
.
This is a breaking database change!
Swaps that were saved prior to this change may fail to load if they are in stateSwapSetupCompleted
ofBtcLocked
.
Make sure to finish your swaps before upgrading. - logs to use rfc3339 local time formatting.
0.10.1
Added
monero-recovery
command that can be used to print the monero address, private spend and view key so one can manually recover instances where themonero-wallet-rpc
does not pick up the Monero funds locked up by the ASB.
Related issue: #537
The command takes the swap-id as parameter.
The swap has to be in aBtcRedeemed
state.
Use--help
for more details.
0.10.0
Removed
- Support for the old sled database.
The ASB and CLI only support the new sqlite database.
If you haven't already, you can migrate your old data using the 0.9.0 release.
Changed
- The ASB to no longer work as a rendezvous server.
The ASB can still register with rendezvous server as usual - The CLI and ASB are no longer compatible 0.1.0 release of the rendezvous server.
You will have to register and discover to a 0.2.0 release of the rendezvous server.
eg./dnsaddr/swap.sethforprivacy.com/p2p/12D3KooWCULyZKuV9YEkb6BX8FuwajdvktSzmMg4U5ZX2uYZjHeu
0.9.0
Changed
- Timestamping is now enabled by default even when the ASB is not run inside an interactive terminal.
- The
cancel
,refund
andpunish
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 theresume
subcommand. - 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.
- ASB and CLI can migrate their data to sqlite to store swaps and related data.
This makes it easier to build applications on top of xmr-btc-swap by enabling developers to read swap information directly from the database.
This resolved an issue where users where unable to run concurrent processes, for example, users could not print the swap history if another ASB or CLI process was running.
The sqlite database filed is namedsqlite
and is found in the data directory.
You can print the data directory using theconfig
subcommand.
The schema can be found here here.
Database migration guide
Delete old data
The simplest way to migrate is to accept the loss of data and delete the old database.
- Find the location of the old database using the
config
subcommand. - Delete the database
- Run xmr-btc-swap
xmr-btc swap will create a new sqlite database and use that from now on.
Preserve old data
It is possible to migrate critical data from the old db to the sqlite but there are many pitfalls.
- Run xmr-btc-swap as you would normally
xmr-btc-swap will try and automatically migrate your existing data to the new database.
If the existing database contains swaps for very early releases, the migration will fail due to an incompatible schema. - Print out the swap history using the
history
subcommand. - Print out the swap history stored in the old database by also passing the
--sled
flag.
eg.swap-cli --sled history
- Compare the old and new history to see if you are happy with migration.
- If you are unhappy with the new history you can continue to use the old database by passing the
--sled flag
Added
- Added a
disable-timestamp
flag to the ASB that disables timestamps from logs. - A
config
subcommand that prints the current configuration including the data directory location.
This feature should alleviate difficulties users were having when finding where xmr-btc-swap was storing data. - Added
export-bitcoin-wallet
subcommand to the CLI and ASB, to print the internal bitcoin wallet descriptor.
This will allow users to transact and monitor using external wallets.
Removed
- The
bitcoin-target-block
argument from thebalance
subcommand on the CLI.
This argument did not affect how the balance was calculated and was pointless.
0.8.3
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.
0.8.2
Added
- Add the ability to view the swap-cli bitcoin balance and withdraw
See issue #694
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.
See issue #648. - 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 themonero-wallet-rpc
daemon, we now load the correct wallet on-demand.
See issue #652. - An issue where swap protocol was getting stuck trying to submit the cancel transaction.
We were not handling the error when TxCancel submission fails.
We also configured the electrum client to retry 5 times in order to help with this problem.
See issues: #709 #688, #701. - An issue where the ASB withdraw one bitcoin UTXO at a time instead of the whole balance.
See issue #662
0.8.1
Fixed
- An occasional error where users couldn't start a swap because of
InsufficientFunds
that were off by exactly 1 satoshi.