From 1fb10dcd7ee72def058e322a5230d04f9264e0d5 Mon Sep 17 00:00:00 2001 From: Oliver Gugger Date: Thu, 21 Mar 2024 10:12:16 +0100 Subject: [PATCH 1/6] GitHub+scripts: use bitcoind v27.0 --- .github/workflows/main.yml | 2 +- scripts/install_bitcoind.sh | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ed5b618ef..0c0fc737c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -21,7 +21,7 @@ defaults: shell: bash env: - BITCOIN_VERSION: "23.0" + BITCOIN_VERSION: "27" # If you change this value, please change it in the following files as well: # /.travis.yml diff --git a/scripts/install_bitcoind.sh b/scripts/install_bitcoind.sh index 16ea5a337..8c6490810 100755 --- a/scripts/install_bitcoind.sh +++ b/scripts/install_bitcoind.sh @@ -4,7 +4,7 @@ set -ev BITCOIND_VERSION=${BITCOIN_VERSION:-23.0} -docker pull lightninglabs/bitcoin-core:$BITCOIND_VERSION -CONTAINER_ID=$(docker create lightninglabs/bitcoin-core:$BITCOIND_VERSION) -sudo docker cp $CONTAINER_ID:/opt/bitcoin-$BITCOIND_VERSION/bin/bitcoind /usr/local/bin/bitcoind +docker pull lightninglabs/bitcoin-core:${BITCOIND_VERSION} +CONTAINER_ID=$(docker create lightninglabs/bitcoin-core:${BITCOIND_VERSION}) +sudo docker cp $CONTAINER_ID:/opt/bitcoin-${BITCOIND_VERSION}.0/bin/bitcoind /usr/local/bin/bitcoind docker rm $CONTAINER_ID From 5394ad27a6f0f0cb9217b05762ff0687c25ab666 Mon Sep 17 00:00:00 2001 From: Oliver Gugger Date: Thu, 21 Mar 2024 10:12:34 +0100 Subject: [PATCH 2/6] mod: bump btcd to fix sendrawtransaction max fee issue --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 655ccede0..59e325586 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/lightningnetwork/lnd require ( github.com/NebulousLabs/go-upnp v0.0.0-20180202185039-29b680b06c82 github.com/Yawning/aez v0.0.0-20211027044916-e49e68abd344 - github.com/btcsuite/btcd v0.24.1-0.20240123000108-62e6af035ec5 + github.com/btcsuite/btcd v0.24.2-beta.rc1.0.20240403021926-ae5533602c46 github.com/btcsuite/btcd/btcec/v2 v2.3.2 github.com/btcsuite/btcd/btcutil v1.1.5 github.com/btcsuite/btcd/btcutil/psbt v1.1.8 diff --git a/go.sum b/go.sum index 28c0047ac..2f5952a55 100644 --- a/go.sum +++ b/go.sum @@ -74,8 +74,8 @@ github.com/btcsuite/btcd v0.22.0-beta.0.20220111032746-97732e52810c/go.mod h1:tj github.com/btcsuite/btcd v0.22.0-beta.0.20220204213055-eaf0459ff879/go.mod h1:osu7EoKiL36UThEgzYPqdRaxeo0NU8VoXqgcnwpey0g= github.com/btcsuite/btcd v0.23.1/go.mod h1:0QJIIN1wwIXF/3G/m87gIwGniDMDQqjVn4SZgnFpsYY= github.com/btcsuite/btcd v0.23.5-0.20231215221805-96c9fd8078fd/go.mod h1:nm3Bko6zh6bWP60UxwoT5LzdGJsQJaPo6HjduXq9p6A= -github.com/btcsuite/btcd v0.24.1-0.20240123000108-62e6af035ec5 h1:8BHBWvtP6kkzvmCpyWEznq4eS0gfLOSVuXLesv413Xs= -github.com/btcsuite/btcd v0.24.1-0.20240123000108-62e6af035ec5/go.mod h1:5C8ChTkl5ejr3WHj8tkQSCmydiMEPB0ZhQhehpq7Dgg= +github.com/btcsuite/btcd v0.24.2-beta.rc1.0.20240403021926-ae5533602c46 h1:tjpNTdZNQqE14menwDGAxWfzN0DFHVTXFEyEL8yvA/4= +github.com/btcsuite/btcd v0.24.2-beta.rc1.0.20240403021926-ae5533602c46/go.mod h1:5C8ChTkl5ejr3WHj8tkQSCmydiMEPB0ZhQhehpq7Dgg= github.com/btcsuite/btcd/btcec/v2 v2.1.0/go.mod h1:2VzYrv4Gm4apmbVVsSq5bqf1Ec8v56E48Vt0Y/umPgA= github.com/btcsuite/btcd/btcec/v2 v2.1.1/go.mod h1:ctjw4H1kknNJmRN4iP1R7bTQ+v3GJkZBd6mui8ZsAZE= github.com/btcsuite/btcd/btcec/v2 v2.1.3/go.mod h1:ctjw4H1kknNJmRN4iP1R7bTQ+v3GJkZBd6mui8ZsAZE= From 2be0615ed6f31a701cb3c7352f90c963c2e538a1 Mon Sep 17 00:00:00 2001 From: Oliver Gugger Date: Thu, 18 Apr 2024 18:13:02 +0200 Subject: [PATCH 3/6] docs: add release notes --- docs/release-notes/release-notes-0.17.5.md | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 docs/release-notes/release-notes-0.17.5.md diff --git a/docs/release-notes/release-notes-0.17.5.md b/docs/release-notes/release-notes-0.17.5.md new file mode 100644 index 000000000..1ef8d5f58 --- /dev/null +++ b/docs/release-notes/release-notes-0.17.5.md @@ -0,0 +1,33 @@ +# Release Notes +- [Release Notes](#release-notes) +- [Bug Fixes](#bug-fixes) +- [New Features](#new-features) + - [Functional Enhancements](#functional-enhancements) + - [RPC Additions](#rpc-additions) + - [lncli Additions](#lncli-additions) +- [Improvements](#improvements) + - [Functional Updates](#functional-updates) + - [Tlv](#tlv) + - [Misc](#misc) + - [Logging](#logging) + - [RPC Updates](#rpc-updates) + - [lncli Updates](#lncli-updates) + - [Code Health](#code-health) + - [Breaking Changes](#breaking-changes) + - [Performance Improvements](#performance-improvements) +- [Technical and Architectural Updates](#technical-and-architectural-updates) + - [BOLT Spec Updates](#bolt-spec-updates) + - [Testing](#testing) + - [Database](#database) + - [Code Health](#code-health-1) + - [Tooling and Documentation](#tooling-and-documentation) +- [Contributors (Alphabetical Order)](#contributors-alphabetical-order) + +# Bug Fixes + +* [Fixed a bug in `btcd` that caused an incompatibility with + `bitcoind v27.0`](https://github.com/lightningnetwork/lnd/pull/8573). + +# Contributors (Alphabetical Order) + +* Oliver Gugger From 5793f3df07c9d4c68709e452d89cb8228ccce874 Mon Sep 17 00:00:00 2001 From: yyforyongyu Date: Tue, 16 Jan 2024 16:31:18 +0800 Subject: [PATCH 4/6] lnwallet/test: stop creating burning tx in tests bitcoind v25.0 updated the `sendrawtransaction` RPC to have an optional argument `maxburnamount` with a default value of 0. This means our existing test that uses burning output cannot be published, hence, we remove the usage of it in our tests and replace it with a normal tx. --- lnwallet/test/test_interface.go | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/lnwallet/test/test_interface.go b/lnwallet/test/test_interface.go index 563a975f8..223bf9a2f 100644 --- a/lnwallet/test/test_interface.go +++ b/lnwallet/test/test_interface.go @@ -1468,15 +1468,20 @@ func testTransactionSubscriptions(miner *rpctest.Harness, // We'll also ensure that the client is able to send our new // notifications when we _create_ transactions ourselves that spend our // own outputs. - b := txscript.NewScriptBuilder() - b.AddOp(txscript.OP_RETURN) - outputScript, err := b.Script() - require.NoError(t, err, "unable to make output script") + addr, err := alice.NewAddress( + lnwallet.WitnessPubKey, false, + lnwallet.DefaultAccountName, + ) + require.NoError(t, err) + + outputScript, err := txscript.PayToAddrScript(addr) + require.NoError(t, err) + burnOutput := wire.NewTxOut(outputAmt, outputScript) tx, err := alice.SendOutputs( []*wire.TxOut{burnOutput}, 2500, 1, labels.External, ) - require.NoError(t, err, "unable to create burn tx") + require.NoError(t, err, "unable to create tx") txid := tx.TxHash() err = waitForMempoolTx(miner, &txid) require.NoError(t, err, "tx not relayed to miner") From 5ebc9423e3cf84677d33487894e21643c594ce98 Mon Sep 17 00:00:00 2001 From: Oliver Gugger Date: Fri, 19 Apr 2024 08:03:27 +0200 Subject: [PATCH 5/6] multi: use TCP for ZMQ in unit tests --- chainntnfs/test_utils.go | 4 ++-- lnwallet/test/test_interface.go | 6 ++++-- routing/chainview/interface_test.go | 6 ++++-- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/chainntnfs/test_utils.go b/chainntnfs/test_utils.go index fa6b7cd56..70d297ce5 100644 --- a/chainntnfs/test_utils.go +++ b/chainntnfs/test_utils.go @@ -205,8 +205,8 @@ func NewBitcoindBackend(t *testing.T, minerAddr string, txindex, require.NoError(t, err, "unable to create temp dir") rpcPort := rand.Intn(65536-1024) + 1024 - zmqBlockHost := "ipc:///" + tempBitcoindDir + "/blocks.socket" - zmqTxHost := "ipc:///" + tempBitcoindDir + "/tx.socket" + zmqBlockHost := fmt.Sprintf("tcp://localhost:%d", rpcPort+1) + zmqTxHost := fmt.Sprintf("tcp://localhost:%d", rpcPort+2) args := []string{ "-connect=" + minerAddr, diff --git a/lnwallet/test/test_interface.go b/lnwallet/test/test_interface.go index 223bf9a2f..5d2d16dd3 100644 --- a/lnwallet/test/test_interface.go +++ b/lnwallet/test/test_interface.go @@ -3218,8 +3218,10 @@ func runTests(t *testing.T, walletDriver *lnwallet.WalletDriver, case "bitcoind": // Start a bitcoind instance. tempBitcoindDir := t.TempDir() - zmqBlockHost := "ipc:///" + tempBitcoindDir + "/blocks.socket" - zmqTxHost := "ipc:///" + tempBitcoindDir + "/tx.socket" + zmqBlockHost := fmt.Sprintf("tcp://localhost:%d", + getFreePort()) + zmqTxHost := fmt.Sprintf("tcp://localhost:%d", + getFreePort()) rpcPort := getFreePort() bitcoind := exec.Command( "bitcoind", diff --git a/routing/chainview/interface_test.go b/routing/chainview/interface_test.go index 010f33807..9e91929dd 100644 --- a/routing/chainview/interface_test.go +++ b/routing/chainview/interface_test.go @@ -713,8 +713,10 @@ var interfaceImpls = []struct { // Start a bitcoind instance. tempBitcoindDir := t.TempDir() - zmqBlockHost := "ipc:///" + tempBitcoindDir + "/blocks.socket" - zmqTxHost := "ipc:///" + tempBitcoindDir + "/tx.socket" + zmqBlockHost := fmt.Sprintf("tcp://localhost:%d", + getFreePort()) + zmqTxHost := fmt.Sprintf("tcp://localhost:%d", + getFreePort()) rpcPort := getFreePort() bitcoind := exec.Command( From f8211a2c3b3d2112159cd119bd7674743336c661 Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Thu, 18 Apr 2024 15:37:31 -0700 Subject: [PATCH 6/6] build: bump version to v0.17.5-beta --- build/version.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/version.go b/build/version.go index 08c9de93d..da0d530cc 100644 --- a/build/version.go +++ b/build/version.go @@ -43,7 +43,7 @@ const ( AppMinor uint = 17 // AppPatch defines the application patch for this binary. - AppPatch uint = 4 + AppPatch uint = 5 // AppPreRelease MUST only contain characters from semanticAlphabet per // the semantic versioning spec.