Eclair + Bitcoin Qt/Core GUI - Setting up a lightning network node
Heheeeheeeee!
Let's coneeeeeeeect you to the Lightning Network on Mainnet and stake some real money in a risky network of scripted channels where things can go wrong and make you lose all your money 😱... really don't put more in than you are willing to lose or spend on emoji's, articles and cookies?
...
This week I've gained enough confidence in the current state of the Béta Lightning Network wallet to put in some sweat, tears and satoshi's.
I've had been running the LND electron wallet on testnet, but was not very happy with the performance at that time. The channels I tried to open failed at first and I never managed to buy an imaginary coffee at starblocks https://starblocks.acinq.co/
This time around I went with the Eclair wallet v0.2: https://github.com/ACINQ/eclair/releases
A requirement for this wallet is to have a full node running on the same machine, with these minimal configuration settings in bitcoin.conf
:
testnet=0
server=1
rpcuser=XXX
rpcpassword=XXX
txindex=1
zmqpubrawblock=tcp://127.0.0.1:29000
zmqpubrawtx=tcp://127.0.0.1:29000
addresstype=p2sh-segwit
If you already have a fully synced bitcoin node, what takes the longest is the txindex=1
setting, as it will rebuild the entire blockchain including all transaction ID's.
After a good night's rest you can continue with setting the right configuration for Eclair by making the file eclair.conf
in your user directory/.eclair/
eclair.chain=mainnet
eclair.node-alias=⚡🇺₿🇺🇳🇹🇺⚡🌍
eclair.bitcoind.rpcport=8332
eclair.bitcoind.rpcuser=XXX
eclair.bitcoind.rpcpassword=XXX
eclair.bitcoind.zmq="tcp://127.0.0.1:29000"
eclair.gui.unit=sat
eclair.node-color="40E0D0"
eclair.server.public-ips=[http://www.whatsmyip.org/]
Make sure to match your RPC username and password and the public-IP is optional, you could stay anonymous. Here you can explore the other nodes and channels visually: https://lnmainnet.gaben.win/
I've given my node a noticable and idealistic name, in the hope that people will start opening channels to my node on their own. So be creative!
Next step is to open a channel, I suggest either to my node 027ba5217fecd12ebb621e51b88b8c9640cce659bd894f4c8e820e09173826fca2@83.83.183.70:9735
or the ''cookie jar'' node: https://www.coinpanic.com/Lightning/CommunityJar
If you have been running a Bitcoin Qt/Core node (update to v0.16!) for a while, you'll have to make a transaction to yourself to move the funds from Pay-to-Public-Key-Hash (starts with 1) to the so called Pay-to-Script-Hash on a Segwit address (starts with 3) before you can open a channel with those funds. Actually Eclair did not start until there was UTXO/spendable bitcoin in a segwit address on my node.
I ran into two error codes, which were easily solved by following some advice on Github: https://github.com/ACINQ/eclair/issues/571
- bitcoin-cli lockunspent true (or restart bitcoin core, this will remove utxo locks)
- bitcoin-cli walletpassphrase
<passphrase>
60 - open a channel
You should have encrypted your Bitcoin wallet, so in order to spend funds with Eclair you can use the console in Bitcoin Qt/Core to unlock the funds and set a certain time window where the app can open a new channel. Be patient when opening a new channel, as the network suggests 6 confirmations (~1 hour) before accepting payments over a lightning channel.
As you can see I've succesfully bought myself a rocket reaction on https://mainnet.yalls.org/
- Click Channel - Send Payment to pay an LN invoice
And then stole some cookies (actually satoshi's) from the Community Jar 😛
- Click Channel - Receive Payment to generate the request.
Hope this helps you all to smoothly get unto the second layer magic called ⚡Lightning Network⚡.
Love & Light,
Kevin
Sources: https://github.com/ACINQ/eclair#eclair-configuration
Is it safe to use my home IP? I've heard of DDoS attacks and I don't really want that to happen to me
I have not had any problems, except for the logfile growing several GB big. You can leave the IP-field blank if you don't want to broadcast that info.