Add instructions for Bitcoin Core 0.17.0 [ci skip]#732
Conversation
Bitcoin Core 0.17.0 deprecates the `signrawtransaction` RPC call, which will be removed in version 0.18.0, you need to enable this call if you want your eclair node to use a 0.1.70 node.
pm47
left a comment
There was a problem hiding this comment.
One minor remark, but other than that integration tests indeed pass, using the following patch. Should we test against 0.17.0 by default?
diff --git a/eclair-core/pom.xml b/eclair-core/pom.xml
index a563e880..a3d4e470 100644
--- a/eclair-core/pom.xml
+++ b/eclair-core/pom.xml
@@ -79,10 +79,10 @@
<activeByDefault>true</activeByDefault>
</activation>
<properties>
- <bitcoind.url>https://bitcoin.org/bin/bitcoin-core-0.16.3/bitcoin-0.16.3-x86_64-linux-gnu.tar.gz
+ <bitcoind.url>https://bitcoin.org/bin/bitcoin-core-0.17.0/bitcoin-0.17.0-x86_64-linux-gnu.tar.gz
</bitcoind.url>
- <bitcoind.md5>c371e383f024c6c45fb255d528a6beec</bitcoind.md5>
- <bitcoind.sha1>e6d8ab1f7661a6654fd81e236b9b5fd35a3d4dcb</bitcoind.sha1>
+ <bitcoind.md5>988053e5775aeddca9a8496cd3a3bba7</bitcoind.md5>
+ <bitcoind.sha1>ef521402e19030f4511fa8c0a297855d4a6106b3</bitcoind.sha1>
</properties>
</profile>
<profile>
@@ -93,10 +93,10 @@
</os>
</activation>
<properties>
- <bitcoind.url>https://bitcoin.org/bin/bitcoin-core-0.16.3/bitcoin-0.16.3-osx64.tar.gz
+ <bitcoind.url>https://bitcoin.org/bin/bitcoin-core-0.17.0/bitcoin-0.17.0-osx64.tar.gz
</bitcoind.url>
- <bitcoind.md5>bacd87d0c3f65a5acd666e33d094a59e</bitcoind.md5>
- <bitcoind.sha1>62cc5bd9ced610bb9e8d4a854396bfe2139e3d0f</bitcoind.sha1>
+ <bitcoind.md5>9b4aefb16a37a457ea0f856120cf615d</bitcoind.md5>
+ <bitcoind.sha1>4aa6d060a5b72a3985c2ef52fe09284389bbc1d4</bitcoind.sha1>
</properties>
</profile>
<profile>
@@ -107,9 +107,9 @@
</os>
</activation>
<properties>
- <bitcoind.url>https://bitcoin.org/bin/bitcoin-core-0.16.3/bitcoin-0.16.3-win64.zip</bitcoind.url>
- <bitcoind.md5>bbde9b1206956d19298034319e9f405e</bitcoind.md5>
- <bitcoind.sha1>85e3dc8a9c6f93b1b20cb79fa5850b5ce81da221</bitcoind.sha1>
+ <bitcoind.url>https://bitcoin.org/bin/bitcoin-core-0.17.0/bitcoin-0.17.0-win64.zip</bitcoind.url>
+ <bitcoind.md5>bb55d2be8fb2a79fa8776a941a869475</bitcoind.md5>
+ <bitcoind.sha1>a49da6fc299d612ffb50488f8459db144899aaac</bitcoind.sha1>
</properties>
</profile>
</profiles>
diff --git a/eclair-core/src/test/resources/integration/bitcoin.conf b/eclair-core/src/test/resources/integration/bitcoin.conf
index 25e7711f..0ea4746c 100644
--- a/eclair-core/src/test/resources/integration/bitcoin.conf
+++ b/eclair-core/src/test/resources/integration/bitcoin.conf
@@ -1,4 +1,6 @@
regtest=1
+
+[regtest]
server=1
port=28333
rpcport=28332
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 67a171ab..aaa57c34 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
@@ -41,7 +41,7 @@ trait BitcoindService extends Logging {
val INTEGRATION_TMP_DIR = s"${System.getProperty("buildDirectory")}/integration-${UUID.randomUUID().toString}"
logger.info(s"using tmp dir: $INTEGRATION_TMP_DIR")
- val PATH_BITCOIND = new File(System.getProperty("buildDirectory"), "bitcoin-0.16.3/bin/bitcoind")
+ val PATH_BITCOIND = new File(System.getProperty("buildDirectory"), "bitcoin-0.17.0/bin/bitcoind")
val PATH_BITCOIND_DATADIR = new File(INTEGRATION_TMP_DIR, "datadir-bitcoin")
var bitcoind: Process = null
@@ -56,7 +56,7 @@ trait BitcoindService extends Logging {
Files.copy(classOf[IntegrationSpec].getResourceAsStream("/integration/bitcoin.conf"), new File(PATH_BITCOIND_DATADIR.toString, "bitcoin.conf").toPath, StandardCopyOption.REPLACE_EXISTING)
}
- bitcoind = s"$PATH_BITCOIND -datadir=$PATH_BITCOIND_DATADIR".run()
+ bitcoind = s"$PATH_BITCOIND -datadir=$PATH_BITCOIND_DATADIR -deprecatedrpc=signrawtransaction -printtoconsole=0".run()
bitcoinrpcclient = new BasicBitcoinJsonRPCClient(user = "foo", password = "bar", host = "localhost", port = 28332)
bitcoincli = system.actorOf(Props(new Actor {
override def receive: Receive = {
| :warning: Eclair requires Bitcoin Core 0.16.3 or higher. If you are upgrading an existing wallet, you need to create a new address and send all your funds to that address. | ||
|
|
||
| Eclair needs a _synchronized_, _segwit-ready_, **_zeromq-enabled_**, _wallet-enabled_, _non-pruning_, _tx-indexing_ [Bitcoin Core](https://github.com/bitcoin/bitcoin) node. | ||
| Eclair will use any BTC it finds in the Bitcoin Core wallet to fund any channels you choose to open. Eclair will return BTC from closed channels to this wallet. |
There was a problem hiding this comment.
The default bitcoin.conf needs to be amended because 0.17.0 introduced config sections. By default some parameters like rpcport only apply to mainnet if no section is provided. See the release notes.
There was a problem hiding this comment.
Hmm on 2nd thought it should work, but I still think adding a [testnet] section like I did for the integration tests conf file would save users some headaches.
There was a problem hiding this comment.
I don't think we should add the changes to use 0.17.0 in our integration tests in this PR, my intention was to have something that is clean and that people can use right away with 0.17.0 and 0.16.3, while we work on changing our RPC calls (AFAIU 0.18.0 won't have signrawtransaction anymore)
Yes I will add a few words about the new sections as soon as I figure out how to use them properly :)
18eb83d to
67e9e83
Compare
67e9e83 to
4c1ce97
Compare
* Fixed regression in rebroadcast (#713) Fixed regression caused by 2c1811d: we now don't force sending a channel_update at the same time with channel_announcement. This greatly simplifies the rebroadcast logic, and is what caused the integration test to fail. Added proper test on Peer, testing the actor, not only static methods. * Routing sync fixes (#712) * Router: reset sync state on reconnection When we're reconnected to a peer we will start a new sync process and should reset our sync state with that peer. * Ignore 'origin htlc not found' in CLOSING (#708) If we don't have the origin, it means that we already have forwarded the fulfill so that's not a big deal. This can happen if they send a signature containing the fulfill, then fail the channel before we have time to sign it. * Fix handling of born again channels (#717) * Fix handling of born again channels When we receive a recent update for a channel that we had marked as stale we must send a query to the underlying transport, not the origin of the update (which would send the query back to the router) * Replace `update_fee` in commitments (#709) This is a simple optimisation, we don't have to keep all `update_fee`, just the last one. cf BOLT 2: > An update_fee message is sent by the node which is paying the Bitcoin fee. Like any update, it's first committed to the receiver's commitment transaction and then (once acknowledged) committed to the sender's. Unlike an HTLC, update_fee is never closed but simply replaced. * Tests: use bitcoind 0.16.3 (#715) Bitcoind 0.16.0 is no longer available * Make `publishTransaction` idempotent (#711) Bitcoin core returns an error `missing inputs (code: -25)` if the tx that we want to publish has already been published and its output have been spent. When we receive this error, we try to get the tx, in order to know if it is in the blockchain, or if its inputs were spent by another tx. Note: If the outputs of the tx were still unspent, bitcoin core would return "transaction already in block chain (code: -27)" and this is already handled. * Improved eclair-cli (#718) This fixes #695, and also adds the channel point in the default channel output. ```bash $ ./eclair-cli channel 00fd4d56d94af93765561bb6cb081f519b9627d3f455eba3215a7846a1af0e46 { "nodeId": "0232e20e7b68b9b673fb25f48322b151a93186bffe4550045040673797ceca43cf", "shortChannelId": "845230006070001", "channelId": "00fd4d56d94af93765561bb6cb081f519b9627d3f455eba3215a7846a1af0e46", "state": "NORMAL", "balanceSat": 9858759, "capacitySat": 10000000, "channelPoint": "470eafa146785a21a3eb55f4d327969b511f08cbb61b566537f94ad9564dfd00:1" } ``` * Handle update relay fee in OFFLINE state (#719) Previously it was only possible to update relay fee in NORMAL state, which is not very convenient because most of the time there are always some channels in OFFLINE state. This works like the NORMAL case, except that the new `channel_update` won't be broadcast immediately. It will be sent out next time the channel goes back to NORMAL, in the same `channel_update` that sets the `enable` flag to true. Also added a default handler that properly rejects the CMD_UPDATE_RELAY_FEE command in all other states. * Fixed regression caused by 7a4f175 (#722) When updating relay fee in state OFFLINE, the new channel_update must have the disabled flag on. This caused tests to be flaky, added necessary checks to always make them fail in case that kind of regression happens again. * Logging: use a rolling file appender (#721) * Logging: use a rolling file appender Use one file per day, keep 90 days of logs with a total maximum size capped at 5 Gb * Router: log routing broadcast in debug level only * set version to 0.2-beta6 * set version back to 0.2-SNAPSHOT * Simplify bitcoind version check (#731) Bitcoind returns version as MMmmrr (major, minor, revision), use an int representation and compare it to our minimum version target. * Update scalatest and remove junit runner (#728) * updated to scalatest 3.0.5 * use scalatest runner instead of junit Output is far more readable, and makes console (incl. travis) reports actually usable. Turned off test logs as error reporting is enough to figure out what happens. The only downside is that we can't use junit's categories to group tests, like we did for docker related tests. We could use nested suites, but that seems to be overkill so I just removed the categories. Users will only have the possibility to either skip/run all tests. * update scala-maven-plugin to 3.4.2 NB: This requires maven 3.5.4, which means that we currently need to manually install maven on travis. Also updated Docker java version to 8u181 (8u171 for compiling). * Add instructions for Bitcoin Core 0.17.0 [ci skip] (#732) * Add instructions for Bitcoin Core 0.17.0 [ci skip] Bitcoin Core 0.17.0 deprecates the `signrawtransaction` RPC call, which will be removed in version 0.18.0, you need to enable this call if you want your eclair node to use a 0.1.70 node. * README: add an example of how to use the new bitcoin.conf sections [ci skip] * Only persist trimmed htlcs (#724) We persist htlc data in order to be able to claim htlc outputs in case a revoked tx is published by our counterparty, so only htlcs above remote's `dust_limit` matter. Removed the TODO because we need data to be indexed by commit number so it is ok to write the same htlc data for every commitment it is included in. * set version to 0.2-beta7 * set version to 0.2-SNAPSHOT * Add `htlcMaximumMsat` field to `ChannelUpdate` message (#738) * Add `htlcMaximumMsat` field to `ChannelUpdate` message * added compatibility test with c-lightning * Fix encoding of FinalIncorrectHtlcAmount error message (#740) * set version to 0.2-beta8 * set version to 0.2-SNAPSHOT * Always add 1 block to the `finalCltvExpiry` (#742) This fixes #651. * ignore IntegrationSpec (no server on android) * back to SNAPSHOT * use proper [gs]etNullableLong method for Sqlite
Bitcoin Core 0.17.0 deprecates the
signrawtransactionRPC call, which will be removed in version 0.18.0, you need to enable it call if you want your eclair node to use a 0.1.70 node.See #730