Key Updates
1. Protocol Version Upgrade
- The protocol version has been upgraded to v4.
- Important: Swaps are now exclusively supported between peers using the same protocol version. To maintain compatibility, all peers must update to v4.
2. LBTC Swap Support via LWK
- Added support for LBTC swaps through
lwk
, removing the dependency onelementsd
. - This update reduces memory requirements for deploying Peerswap by approximately 3–4 GB, making it more lightweight and efficient.
Pros
- Lightweight: Minimal RAM and storage space needed.
- Ease of Setup: Simplifies deployment by eliminating the need for a full Elements node.
Cons
- Beta Software: LWK is currently in beta, which may result in reduced stability or reliability compared to elementsd.
- Outsourced Verification: Utilizes third-party services for blockchain verification instead of self-verification.
- Shared Public Service: By default, connects to a public service shared with other users, potentially impacting performance.
3. Confidential Transaction Discounts
- Implemented support for confidential transaction discounts, significantly lowering costs associated with LBTC swaps.
4. Stability Improvements
- This release includes various fixes and optimizations aimed at improving stability and reliability.
Note
Please refer to the upgrade procedure guide for detailed instructions on upgrading safely.
It is especially important to ensure you have no active swaps before upgrading. Following this procedure will help prevent potential issues during the transition.
Release Status
While most aspects of PeerSwap are considered stable, support for LWK remains experimental/beta in this release(v4.0rc1
).
Users exploring LWK as a backend option are encouraged to report any issues or provide feedback to aid in refining future releases.
Changelog
For a comprehensive list of changes and improvements, please refer to the detailed changelog below.
- Adjust liquid flat swapout fee by @nepet in #147
- Update lnd version by @nepet in #148
- Fix version comparison by @nepet in #156
- Add version log by @nepet in #158
- swap: Fix one swap per channel race by @nepet in #154
- Add nil check on gettxout by @nepet in #155
- Log errors from "main scope" by @nepet in #160
- bump LND version in setup doc to latest by @grubles in #164
- Reduce unconnected peer log spam by @nepet in #163
- Change oreder of parameters in cln swap commands by @nepet in #162
- Replace MPP with single-part
sendpay
by @nepet in #159 - More descriptive
--large-channel
error message by @nepet in #169 - Docker related changes by @grubles in #172
- Update dependencies and fix broken CI by @nepet in #175
- fix markdown in README and docs/docker.md by @grubles in #174
- Rename peerswap-plugin by @grubles in #173
- cln plugin config file by @nepet in #153
- tests: fix race condition in RemoveUnseen test by @JssDWt in #179
- cln: make Dup3 platform independent by @JssDWt in #176
- Fix timeout race in tests by @nepet in #184
- Update dev dependencies by @nepet in #180
- Glightning msat purge by @nepet in #183
- Fix
listpeers
response by @nepet in #188 - docs: Clean up docs regarding restarting CLN peerswap [skip ci] by @wtogami in #191
- Remove passwords from logs by @nepet in #190
- Silence noisy poll log by @nepet in #189
- docs: polished up LND and usage docs. fixed markdown typo in README. by @grubles in #193
- docs: add elementsd setup + manual usage guide by @grubles in #196
- Rework recovery by @nepet in #192
- Revert "Rework recovery" by @wtogami in #198
- docs: polishing up readme and setup guides [skip ci] by @grubles in #197
- docs: fixing a few errors [skip ci] by @grubles in #202
- Improve Logs by @nepet in #203
- Remove payload from log messages by @grubles in #205
- Wait for Elementsd to be synced by @nepet in #206
- add elements guide, update FAQ [skip ci] by @grubles in #209
- Update readme by @grubles in #210
- remove local_percentage from listpeers by @grubles in #208
- Fix Possible Polling Deadlock by @nepet in #213
- improve payment notifier log message by @grubles in #212
- Fix stuck recovery by @nepet in #215
- Fix test flake by @nepet in #218
- txwatcher: log once then exit if auth fails by @grubles in #219
- txwatcher: rework StartBlockchainWatcher() exits by @grubles in #220
- Add CLN config option to disable BTC swaps, fixup LND swap config by @grubles in #217
- Add new lnd error message to the
retry
middleware by @nepet in #227 - cln: bitcoin-rpcport is now an int in CLN 23.08 by @grubles in #226
- delete the comment of old issue link by @YusukeShimizu in #229
- Fix broken log message by @nepet in #234
- config: add function to detect allow-deprecated-apis=false in CLN config by @grubles in #230
- test: Change log output of mixedSetup by @YusukeShimizu in #236
- Wait for swap in State_SwapInSender_AwaitAgreement if it exists by @YusukeShimizu in #241
- Bump nixpkgs by @YusukeShimizu in #240
- test: the amount of the fee invoice is taken into account when testing by @YusukeShimizu in #242
- Fix CLN 23.08 crashing on NixOS by @chrisguida in #243
- Fix invoice description flake by @nepet in #244
- Docs: Fix sequence swapin by @YusukeShimizu in #245
- Add additional sanity checks before starting a swap by @nepet in #235
- makefile: make go fmt executable by @YusukeShimizu in #237
- Sanity check max htlc amount msat by @YusukeShimizu in #246
- ensures that the invoice is payed via the direct channel by @YusukeShimizu in #247
- cln: Sanity check max htlc amount msat by @YusukeShimizu in #248
- to make linter available for source code checking by @YusukeShimizu in #251
- compile protobufs in docker by @YusukeShimizu in #252
- swap: automatically add to the suspicious list If csv recovery by @YusukeShimizu in #253
- rpcwallet: change getaddress to request a blech32 address by @delta1 in #257
- cancel swap on recovery by @YusukeShimizu in #255
- liquid: return more accurate errors in createSpendingTransaction by @jamesdorfman in #258
- probe payment as sanity check by @YusukeShimizu in #260
- Update setup_cln.md - simple typo fix by @singlebeam in #265
- cln: remove wumbo check because CLN >=v23.11 defaults to enabling it by @grubles in #269
- docs: fix typos by @cristiantroy in #270
- [skip ci] Update signetguide_lnd by @Impa10r in #273
- test: force fee update by @YusukeShimizu in #271
- bump nixpkgs and add --developer flag to cln test config by @grubles in #263
- cln: bump minimum version to 23.11 by @grubles in #275
- elements: change sync progress string formatting to float from decimal by @grubles in #279
- lnd: label the tx to make it easier to audit by @YusukeShimizu in #282
- lnd: paying to the payment request by @YusukeShimizu in #281
- [skip ci] docs: add note about http:// for rpchost config option by @grubles in #285
- docs: add warning about alpine linux / musl and elementsd [skip ci] by @grubles in #286
- Set label by @YusukeShimizu in #283
- [skip ci]docs: transaction labels for on-chain transactions by @YusukeShimizu in #284
- Update nix pkgs by @YusukeShimizu in #292
- swap: add a recovery process for AwaitFeeInvoice by @YusukeShimizu in #293
- lnd: exponential backoff for ProbePayment by @YusukeShimizu in #294
- Update docs/elements.conf by @grubles in #295
- config: fix cln listconfig output by @grubles in #298
- make lwk available by @YusukeShimizu in #288
- clightning: use CLN's listpeerchannels instead by @YusukeShimizu in #300
- swap: calculate required balance including fee by @YusukeShimizu in #303
- wallet: add fee rate estimation to FundRawTx by @YusukeShimizu in #302
- clightning: liquid testnet port update by @YusukeShimizu in #306
- txwatcher: improve logging in csvPassedCallback by @YusukeShimizu in #310
- ci: update Nix installation and caching by @YusukeShimizu in #308
- nix: update dependencies by @YusukeShimizu in #313
- ignore non-peerswap related custom messages by @YusukeShimizu in #315
- poll: remove error handling for message send by @YusukeShimizu in #317
- swap: exclude non-active swap in csvPassedCallback by @YusukeShimizu in #316
- clightning: compatibility issue with v24.11 by @YusukeShimizu in #321
- lwk: add backoff for send by @YusukeShimizu in #326
- upgrade Go to 1.23.1 by @YusukeShimizu in #322
- mod: down grade Go version to 1.22.2 by @YusukeShimizu in #329
- lwk: increase default context timeout by @YusukeShimizu in #327
- golangci-lint configuration by @YusukeShimizu in #328
- clightning: add shutdown hook for plugin by @YusukeShimizu in #318
- mod: glightning to latest version by @YusukeShimizu in #331
- nixpkgs: Update to latest revision by @YusukeShimizu in #330
- liquid: ct discount by @YusukeShimizu in #304
- swap: bump protocol version to 4 by @grubles in #250
New Contributors
- @JssDWt made their first contribution in #179
- @YusukeShimizu made their first contribution in #229
- @chrisguida made their first contribution in #243
- @delta1 made their first contribution in #257
- @jamesdorfman made their first contribution in #258
- @singlebeam made their first contribution in #265
- @cristiantroy made their first contribution in #270
- @Impa10r made their first contribution in #273
Special thanks
Special thanks to ZmnSCPxj for specification review a while ago.
Full Changelog: v0.2.97...v4.0.0