Skip to content

dcrdex v0.5.0

Compare
Choose a tag to compare
@chappjc chappjc released this 29 Aug 18:28
· 701 commits to master since this release

DCRDEX v0.5.0

Aug 23, 2022

For a high level introduction to DCRDEX, please read the initial release's notes.

Retrieve binaries for the latest release. Just download the one for your system, extract it, and run the dexc executable in a terminal / command prompt. It will start up and display a link that you should open in the web browser of your choice. Keep the terminal with dexc opened until you are done and have signed out from the browser window. Hit CTRL+C in the terminal to shut it down.

Windows users must use v0.5.1 or newer, which contains an important fix for the user interface.

Important Notices

No Decred wallet is required with this release, but if using dcrwallet or Decrediton, the latest 1.7 release is required.

If upgrading from v0.2, read the Upgrading section of the v0.4.0 release notes for important information. If upgrading from v0.4, read the Upgrading section of this document.

Always record the "seed" that is generated by the DEX client on initialization (when you set your password the first time in the browser window). This is a string of characters that is used to derive DEX account identities and initialize any native/built-in wallets you create in the DEX client. You must have this seed to recover funds that you receive in such wallets if your lose access to your DEX client's data folder.

Although DCRDEX looks and feels like a regular exchange, the decentralized aspect brings an expanded role to the client. Please take the time to read and understand the following:

  • Never shutdown your external wallets with dexc running. When shutting down, always stop dexc before stopping your wallets.
  • If you have to restart dexc with active orders or swaps, you must immediately login again with your app password when dexc starts up.
  • There is an "inaction timeout" when it becomes your client's turn to broadcast a transaction, so be sure not to stop dexc or lose connectivity for too long or you risk having your active orders and swaps/matches revoked. If you do have to restart dexc, just remember to login as soon as you start it up again.
  • Only one dexc process should be running for a given user account at any time. For example, if you have identical dexc configurations on two computers and you run dexc and login on both, neither dexc instance will be adequately connected to successfully negotiate swaps.
  • Order history is not synchronized between different client installations.

Upgrading

Client (dexc)

The new native DCR wallet built into the DEX client can be used by changing the wallet type to "SPV" in the wallet settings view. If using Decrediton, it is recommended to continue using Decrediton's wallet instead of the native wallet. Funds do not automatically move between wallet types if you change it; you should send any funds first.

The native BTC wallet that was introduced in v0.4, but if you are still using and external Bitcoin Core wallet, v0.20 is no longer supported. Supported versions are v0.21, v22, and v23. Descriptor wallets may now be used with v22 and v23, but it is advised to use legacy (bdb) format wallets.

Server (dcrdex)

Bitcoin Core v0.20 is no longer supported.

Highlights

This is a major release. Please read the Important Notices before upgrading.

The most notable new features are:

  • Decred native/built-in wallet, just like the BTC native wallet that we already have. Using dcrwallet or Decrediton in SPV mode (not full node) was already supported, but now no external wallet software is even required to trade DCR. However, users should continue with their existing Decred wallet software that has all the governance features that makes Decred great. (#1633, #1759, #1773)

  • Support for ZCash (ZEC), using zcashd in this release to start, but we are looking at light wallet solutions. Unshielded addresses used for trades. (#1570, #1693)

  • Electrum light wallet support is added, with LTC and BTC to start, a common SPV wallet with forks for many different assets. The BCH wallet fork (Electron Cash) still requires a small update, which we hope will make it usable by DEX soon. (#1607)

  • Support for the latest Litecoin Core software (v0.21) that introduced MWEB (private addresses). Regular addresses are used for trades. (#1536)

  • DCRDEX can now work with mixed account configurations when using dcrwallet or Decrediton as the external DCR wallet, allowing Decred's privacy features to be used automatically when trading. (#1498)

  • Swap options may be set at time of placement of each order rather than in the wallet settings. This includes pre-sizing funds to avoid overlocking of UTXOs, and specifying higher network fee rates. (#1170, #1669)

  • Improved send/withdraw controls, allowing a complete sweep of the wallet minus transaction fees, or sending a precise amount like most wallets. (#1611)

  • Bitcoin swap acceleration using CPFP transactions to increase the swap fee rate in the event of a network fee spike. This has not been in demand much recently, but we have encountered rapid increases in Bitcoin fee rates in the past where this is valuable. (#1555)

  • Fiat currency value display. When enabled by the user, current USD exchange rates for all assets will be used to show equivalent fiat values on the UI. (#1600)

  • QR code display for wallet receiving addresses. (#1483)

  • There is now a "copy" button next to the wallet's receiving address. (#1639, #1675)

  • Rescan and recover functionality for the native BTC SPV wallet. You may also now reconfigure the native BTC wallet’s “birthday” to change the scope of the rescan. (#1507, #1439)

  • Add the option to obtain Decred network fee rates from dcrdata when the client wallet is unable. (#1654)

  • Bitcoin “descriptor” wallets are now supported. This only applies to users of the Bitcoin Core software, not the native BTC wallet, who also choose to create this type of wallet that is becoming the default in future versions of Bitcoin Core. Support for Bitcoin Core v23, dropped support for v0.19. (#1659, #1735)

  • A DEX server's host name and TLS certificates may now be updated. (#1605, #1602)

  • When a wallet regains peers after having lost connectivity, a notification is displayed. (#1701, #1719)

  • Reconfiguring BTC wallets is now less disruptive as it only requires an internal restart of the wallet and chain service when absolutely required. (#1686)

  • The user interface files are now embedded in the "dexc" executable. To use the DEX client, only the one file is required. Any "site" folders left from previous versions may be deleted. (#1710)

  • The optional dexcctl command line control application now has a version command to ensure compatibility with dexc. (#1645)

NOTE: While Ethereum trading is not in production yet, the native ETH wallet can be used if built from source with the -tags lgpl switch.
The built-in ETH wallet’s account private key can be exported, for import into other wallets like MetaMask or MEW. The ETH wallet is a “light” wallet that uses the native LES protocol. Unfortunately, we are waiting on an update to the go-ethereum light client software to support The Merge.

All the pieces for ETH and ERC20 trading are in place, however, The Merge upcoming in September requires the upstream light client package from go-ethereum to be updated before we can continue. In addition The Merge creates a need for the full node for the server to run an additional consensus layer node on the server. The ETH release will hopefully be in several weeks.

Server changes

  • The server will check that a node's transaction indexes are enabled, when possible. (#1549)

  • Fee rate estimation now has a median-based backup estimation method when the nodes fail to return a rate. (#1597, #1655)

  • The transaction search code is now smarter and blocks other routines less. (#1623)

  • Confirmation checks are now throttled for fast blocks. (#1629)

  • The server now begins signing untruncated messages, and ceases to recognize signatures created on truncated messages. (#1530) This follows #1528 in v0.4.2 in which both client and server began recognizing signatures of the full messages, and #1529 from v0.4.3 in which clients began signing untruncated messages. The final change will be in v0.5.1 (#1526), in which will cease to recognize the old signatures from servers that have not updated to v0.5.0.

Fixes

  • The native BTC wallet now allows spending unconfirmed funds from swap redemptions. (#1547)

  • The native BTC wallet will now reject transaction that create dust outputs. (#1705)

  • Client fee rate handling is improved to prevent excessive fee rate requests, particularly to remote providers like a DEX server or dcrdata. (#1721)

  • The "filled" percentage shown on the frontend is no longer 100% for canceled orders. (#1744)

  • Order and match amounts and percentages for market buys are now displayed correctly. (#1711)

  • Loading config files from the wallet settings dialog will only allow recognized extensions by default. (#1564)

  • Shutdown hang due to timeout dialing server are prevented. (#1567)

  • Memory containing unused private data is cleared in more cases. (#1584)

  • The file path for RPC certificates is expanded when it contains characters like "~". (#1525)

  • The client database can now accommodate larger data pushes, such as very large swap contract transactions with numerous funding UTXOs. (#1620)

  • Max order size estimation code has been optimized. (#1684)

  • Deadlock with multiple concurrent BTC client DB accesses is avoided. (#1756)

  • Shutdown hangs in certain circumstances are now prevented. (#1732, #1739)

  • Match status for revoked matches is now always shown correctly. (#1772)

  • Resolve an issue where creation of a native BTC wallet with a fee rate less than 1 sat/B would break the ability to create a wallet with a valid rate. (#1657)

  • The asset version is now saved in the client DB with order meta data. (#1780)

  • Frontend hangs, JavaScript errors, and minor bugs fixed. (#1624, #1637, #1647, #1640, #1662, #1667, #1644, #1543, #1704, #1736, #1757, #1776, #1799)

  • The server's markets table uses a larger integer for asset ID, which is important for eth-derived tokens. (#1621)

  • The server's swap checking has been updated to reduce lock contention. (#1563)

  • Revoked orders where the user was not at fault now correctly recognize that the user was not at fault. (#1707)

  • The 24hr price rate change calculation on the server has been fixed. (#1746)

Developer

  • Bitcoin Cash has switched from testnet3 to testnet4. Address string encoding/decoding is now consistent with the introduction of a custom address stringer. Previously the node was converting legacy addresses on the fly when retrieving private keys. (#1606)

  • The required Go versions are now 1.18 or 1.19. (#1519, #1650, #1753, #1747, #1774)

  • The required Node.js versions for building the frontend webpack bundle are now 16 and 18. (#1617)

  • The new btcsuite/btcd/btcec/v2 module is now used. (#1542)

  • Client Core methods to purge archived records. (#1475, #1503)

  • The core.Order type now has a SubmitTime field. (#1667)

  • The frontend has been updated to Bootstrap 5. (#1487)

  • The frontend has migrated from JavaScript to TypeScript. (#1534)

  • The dcr.Wallet interface is refactored for the native DCR wallet. (#1510, #1582, #1588)

  • server/wslink now offers a SendRaw method. (#1532)

  • The version meta data is update to use a single Version string. (#1590)

  • Simnet test are made modular to support all assets, and a command line utility is created to run them. (#1603, #1632, #1740)

  • The loadbot utility now works with all markets. (#1656, #1677)

  • Introduce a (*ConnectionMaster).ConnectOnce method, which terminates any background Connect retries if the first attempt fails. (#1616)

  • The ConnectionMaster has been redesigned, with the addition of a Done() <-chan struct{} method for waiting for disconnect on a channel rather than blocking on Wait(). (#1474)

  • Better npm script compatibility with Windows. (#1665)

  • If using the simnet-setup.sh script, a predetermined app seed will be used. (#1398)

  • The Decred simnet harness includes new node control helper scripts that are needed now that some of the wallets are SPV. (#1433)

  • The encode package's UnixTimeMilli, UnixMilli, and UnixMilliU functions have been removed in favor of the functionally equivalent functions in the "time" standard library. (#1668)

  • gofmt must be run with the -s (simplify) switch. (#1699)

Ethereum

Extensive work and testing on Ethereum and token support has almost wrapped up.

https://github.com/decred/dcrdex/pulls?q=is:pr+is:closed+label:ETH+milestone:0.5

Audit result: #1643

Testnet deployment: #1440, #1550

Solidity contract tweaks: #1455, #1679

Allow export of ETH wallet: #1648, #1702

Last client methods and refactoring: #1303, #1301,

Server validation of ETH-backed orders: #1293, #1284

Token work: #1394, #1394, #1402, #1509, #1523

Test harness improvements: #1385, #1476, #1479, #1490, #1691, #1722

Fixes, miscellaneous improvements, and housekeeping: #1464, #1306, #1307, #1309, #1313, #1391, #1392, #1397, #1447, #1465, #1482, #1552, #1556, #1593, #1599, #1626, #1630, #1642, #1692,

Build requirements

  • Go 1.18 or 1.19
  • Node 16 is the minimum supported version for building the site assets.

Code Summary

https://github.com/decred/dcrdex/milestone/16?closed=1

Full diff from v0.4.3: https://github.com/decred/dcrdex/compare/v0.4.3..v0.5.0
479 files changed, 65,781 insertions(+), 22,207 deletions(-)

contributors:

Since the release-v0.4 branch included many commits since it was branched from master, the list is approximate, using a reference commit on master around the time of the v0.4.3 release: [32721d8...v0.5.0)