diff --git a/docs/release-notes/eclair-vnext.md b/docs/release-notes/eclair-vnext.md index eb89473faf..77b2859acf 100644 --- a/docs/release-notes/eclair-vnext.md +++ b/docs/release-notes/eclair-vnext.md @@ -4,7 +4,10 @@ ## Major changes - +### Update minimal version of Bitcoin Core + +With this release, eclair requires using Bitcoin Core 32.x. +Newer versions of Bitcoin Core may be used, but have not been extensively tested. ### Configuration changes diff --git a/eclair-core/pom.xml b/eclair-core/pom.xml index 7d91b6d0cd..2f4b3108de 100644 --- a/eclair-core/pom.xml +++ b/eclair-core/pom.xml @@ -85,8 +85,8 @@ true - https://bitcoincore.org/bin/bitcoin-core-31.1/bitcoin-31.1-x86_64-linux-gnu.tar.gz - b80d9c3e04da78fb6f0569685673418cf686fadba9042d926d13fb87ff503f9e + https://bitcoincore.org/bin/bitcoin-core-32.1/bitcoin-32.1-x86_64-linux-gnu.tar.gz + 61545c17c3120fb7412f896d248b11993af04ec8817aad3649c55b2afb044963 @@ -97,8 +97,8 @@ - https://bitcoincore.org/bin/bitcoin-core-31.1/bitcoin-31.1-x86_64-apple-darwin.tar.gz - bc506958d0f387c1ea770bdc7c7192a505fa645ff62cabcc7761fa7eb89e867e + https://bitcoincore.org/bin/bitcoin-core-32.1/bitcoin-32.1-x86_64-apple-darwin.tar.gz + 53b1e6ffd92843ca82ef4a737d7a53cb0a9fab15816a417a41f12fc954071447 @@ -109,8 +109,8 @@ - https://bitcoincore.org/bin/bitcoin-core-31.1/bitcoin-31.1-win64.zip - c99ef173471c58e6766d9eebd12e6c35349082eeed3939bc99eed58ef57db587 + https://bitcoincore.org/bin/bitcoin-core-32.1/bitcoin-32.1-win64.zip + b5b0c2cd007d69e96880907c79f9ae19ae82728f95fc8c923b4a07dab795b45d diff --git a/eclair-core/src/main/scala/fr/acinq/eclair/Setup.scala b/eclair-core/src/main/scala/fr/acinq/eclair/Setup.scala index 2f7566889a..b956a4bcb0 100644 --- a/eclair-core/src/main/scala/fr/acinq/eclair/Setup.scala +++ b/eclair-core/src/main/scala/fr/acinq/eclair/Setup.scala @@ -199,7 +199,7 @@ class Setup(val datadir: File, await(getBitcoinStatus(bitcoinClient), 30 seconds, "bitcoind did not respond after 30 seconds") } logger.info(s"bitcoind version=${bitcoinStatus.version}") - assert(bitcoinStatus.version >= 310000, "Eclair requires Bitcoin Core 31 or higher") + assert(bitcoinStatus.version >= 320000, "Eclair requires Bitcoin Core 32 or higher") bitcoinStatus.unspentAddresses.foreach { address => val isSegwit = addressToPublicKeyScript(bitcoinStatus.chainHash, address).map(script => Script.isNativeWitnessScript(script)).getOrElse(false) assert(isSegwit, s"Your wallet contains non-segwit UTXOs (e.g. address=$address). You must send those UTXOs to a segwit address to use Eclair (check out our README for more details).") diff --git a/eclair-core/src/test/scala/fr/acinq/eclair/blockchain/bitcoind/BitcoindService.scala b/eclair-core/src/test/scala/fr/acinq/eclair/blockchain/bitcoind/BitcoindService.scala index 83ad635303..ce83373ae6 100644 --- a/eclair-core/src/test/scala/fr/acinq/eclair/blockchain/bitcoind/BitcoindService.scala +++ b/eclair-core/src/test/scala/fr/acinq/eclair/blockchain/bitcoind/BitcoindService.scala @@ -62,7 +62,7 @@ trait BitcoindService extends Logging { val PATH_BITCOIND = sys.env.get("BITCOIND_DIR") match { case Some(customBitcoinDir) => new File(customBitcoinDir, "bitcoind") - case None => new File(TestUtils.BUILD_DIRECTORY, "bitcoin-31.1/bin/bitcoind") + case None => new File(TestUtils.BUILD_DIRECTORY, "bitcoin-32.1/bin/bitcoind") } logger.info(s"using bitcoind: $PATH_BITCOIND") val PATH_BITCOIND_DATADIR = new File(INTEGRATION_TMP_DIR, "datadir-bitcoin") diff --git a/eclair-core/src/test/scala/fr/acinq/eclair/channel/InteractiveTxBuilderSpec.scala b/eclair-core/src/test/scala/fr/acinq/eclair/channel/InteractiveTxBuilderSpec.scala index bd4f36998b..b20039cc18 100644 --- a/eclair-core/src/test/scala/fr/acinq/eclair/channel/InteractiveTxBuilderSpec.scala +++ b/eclair-core/src/test/scala/fr/acinq/eclair/channel/InteractiveTxBuilderSpec.scala @@ -1530,7 +1530,11 @@ class InteractiveTxBuilderSpec extends TestKitBaseClass with AnyFunSuiteLike wit test("fund transaction with previous inputs (with new inputs)") { val targetFeerate = FeeratePerKw(11_000 sat) val fundingA = 100_000 sat - val utxosA = Seq(55_000 sat, 55_000 sat, 55_000 sat) + // Two inputs are enough to fund the channel, but they don't leave enough room for a change output: at the target + // feerate, a transaction with two p2tr inputs and the funding output costs ~7_436 sat, while adding a change output + // would cost ~9_328 sat, which is more than the 8_000 sat remaining. This makes the first attempt changeless + // regardless of Bitcoin Core's internal change-discard rules, which depend on its fee estimators. + val utxosA = Seq(54_000 sat, 54_000 sat, 54_000 sat) withFixture(ChannelTypes.AnchorOutputsZeroFeeHtlcTx(), fundingA, utxosA, 0 sat, Nil, targetFeerate, 660 sat, 0, RequireConfirmedInputs(forLocal = false, forRemote = false)) { f => import f._