You will need:
- the latest https://github.com/bitcoin/bitcoin/ (with segwit merged in)
- https://github.com/ACINQ/eclair branch wip-bolt2
- https://github.com/sstone/lightning branch estimate fee. This a a fork of Rusty's lighting with a tiny change in the RPC call to esimatefee
You need to start bitcoind in regtest mode, and have bitcoin-cli on the PATH. For example, you could use the following bitcoin.conf file:
regtest=1
server=1
txindex=1
rpcuser=foo
rpcpassword=bar
The first time you run bitcoind, you have to generate 500 blocks to activate segwit:
>bitcoin-cli generate 500
You can then check that segwit is active:
>bitcoin-cli getblockchaininfo
At the end of the info returned by bitcoind you should have something like:
"bip9_softforks": {
"csv": {
"status": "active",
"startTime": 0,
"timeout": 999999999999
},
"segwit": {
"status": "active",
"startTime": 0,
"timeout": 999999999999
}
}
Start bitcoind:
>bitcoind
Start lightingd:
>lightningd
Lightingd will try and connect to bitcoind through bitcoin-cli (that's why it should be on the PATH) and stop if it cannot connect.
Run the automated test from eclair/eclair-demo:
mvn exec:java -Dexec.mainClass="org.scalatest.tools.Runner" -Dexec.classpathScope="test" \
-Dexec.args="-s fr.acinq.eclair.channel.InteroperabilitySpec" \
-Dlightning-cli.path=/home/fabrice/code/lightning.sstone/daemon/lightning-cli
Use the java environment variable lightning-cli.path to specify the location of lighting-cli
This test will:
- open a channel between lightingd and eclair-demo
- add and fulfill HTLCs
- negotiate a closing fee and close the channel See https://github.com/ACINQ/eclair/blob/wip-bolt2/eclair-demo/src/test/scala/fr/acinq/eclair/channel/InteroperabilitySpec.scala for more details