Title: Lightning Network - Eclair: Installation of a testnet LN-node Post by: curiosity81 on January 27, 2018, 06:24:05 PM Hi guys,
following a tutorial for installing eclair (you find the original thread here: https://bitcointalk.org/index.php?topic=2778084.0). Additional references Lightning network megathread: https://www.reddit.com/r/Bitcoin/comments/7pwna9/lightning_network_megathread/ Questions are answered here, provided one owns a github account: https://gitter.im/ACINQ/eclair Current state of lightning network (mainnet): https://lnmainnet.gaben.win/ Graph of developmental state of lightning network (mainnet): https://p2sh.info/dashboard/db/lightning-network?orgId=1 Requirements
Enter the Download-directory (exits in Ubuntu by default): Code: cd /home/curiosity81/Downloads Bitcoin Core (before synchronizing) Download bitcoin core (https://bitcoin.org/en/download): Code: wget https://bitcoin.org/bin/bitcoin-core-0.15.1/bitcoin-0.15.1-x86_64-linux-gnu.tar.gz Additionally, download the signature of von van der Laan: Code: wget https://bitcoin.org/laanwj-releases.asc Import the key: Code: gpg --import laanwj-releases.asc Finally get the hash sums of the files: Code: wget https://bitcoin.org/bin/bitcoin-core-0.15.1/SHA256SUMS.asc Verify bitcoin core before unpacking: Code: gpg --verify SHA256SUMS.asc The hex number is included in SHA256SUM.asc and belongs to the downloaded file. If grep reports something, then everything is ok. Probably, there are more elegant ways to verify. Unpack bitcoin core: Code: tar -xzvf bitcoin-0.15.1-x86_64-linux-gnu.tar.gz And adapt the configuration file: Code: mkdir /home/curiosity81/.bitcoin Save the following lines in the configuration file: Code: testnet=1 The placeholders <user> and <password> have to be replaced correspondingly. Save and exit nano with Strg+X. Start bitcoin core: Code: /home/curiosity81/Downloads/bitcoin-0.15.1/bin/bitcoin-qt Bitcoin core is synchronizing now with the testnet. This takes a while (around 1.5h). JRE 1.8 For eclair, a Java Runtime Environment is necessary. JRE 1.8 from Oracle is recommended. Make sure that you satisfy the license conditions before you install the software. Visit (firefox) http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html and choose jre-8u162-linux-x64.tar.gz Confirm the License Agreement if it applies to you and start the download. The File is saved in the download directory. Since bitcoin core is likely still synchronizing, open a new terminal and enter the download directory again: Code: cd /home/curiosity81/Downloads Verify the hash sum again. Therefore, click on the download page (http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html), at the top JRE 8u162 Checksum on the "Checksum" link and save the 256sha value for the correct file: dfa25ebd1f90bf74ad7ba2dacb0e08d884594e733c9a522b58256778031341a4 Test the hash: Code: sha256sum jre-8u162-linux-x64.tar.gz | grep -o dfa25ebd1f90bf74ad7ba2dacb0e08d884594e733c9a522b58256778031341a4 If everything is ok, then unpack the file: Code: tar -xzfv jre-8u162-linux-x64.tar.gz And install java (https://wiki.ubuntuusers.de/Java/Installation/Oracle_Java/Java_8/): Code: sudo mkdir /opt/Oracle_Java If the last command reports the version as follows: Code: java version "1.8.0_162" Then everything was done correctly. Let's go on. Eclair We are still in the Download-directory in the second terminal. Download eclair (https://github.com/ACINQ/eclair). We are lazy and do not want to compile anything. So we are happy with the precompiled jar-file (Check: https://github.com/ACINQ/eclair/releases for newer releases): Code: wget https://github.com/ACINQ/eclair/releases/download/v0.2-alpha8/eclair-node-gui-0.2-alpha8-8edb2a4.jar That's it. Unfortunately, there is nothing more to verify. Important: So that eclair works correctly, bitcoin core must run in parallel! After: Code: java -jar eclair-node-gui-0.2-alpha8-8edb2a4.jar Something should happen, even though the program is not configured yet and ends with an error message. Bitcoin core (after synchronyzing) In the GUI: Help -> Debug window -> Console There: Code: getnewaddress We keep this address, in my case: mtDmzMz7NvuRjptrLWwbdVBs4j7Y3eXvCV Then, Code: addwitnessaddress mtDmzMz7NvuRjptrLWwbdVBs4j7Y3eXvCV Creates a segwit address, in my case: 2MswDJ1kf9aqiC6twrDyUbLqGmtnjtFG4XX We also keep this address. Now we need money for playing. Go to: https://testnet.manu.backend.hamburg/faucet Insert the segwit address and you will get some testnet BTC. Clearly, this will take 1h until the transaction is confirmed 6 times. Eclair configuration Enter the Download-directory again: Code: cd /home/curiosity81/Downloads If the configuration directory of eclair is not existent, create it: Code: mkdir /home/curiosity81/.eclair Then edit eclair.conf: Code: nano /home/curiosity81/.eclair/eclair.conf Add the following lines to the file: Code: eclair.server.port=9735 The placeholders <user> and <password> must be replaced by the corresponding values in the bitcoin.conf. Save and exit nano with Ctrl+X. eclair.server.public-ips can be set to your IP, then your node will be visible at https://explorer.acinq.co. Only this way other users can connect to your node. But eclair will also work with "xx.xx.xx.xx". Start eclair again: Code: java -jar eclair-node-gui-0.2-alpha8-8edb2a4.jar And tada, the eclair-GUI should open. Connecting to the Lightning Netzwerk Visit: https://explorer.acinq.co Select a node. Either by clicking on the map or in the scroll down menu on the right. After clicking, more information about a node is shown, like alias, publickey or IP. I used the node "pikefloyd" at the beginning. Whose data is as follows (clearly nodes can disappear of their data changes, so be flexible): Code: Alias: pikefloyd From this, built the following ID from publickey, IP and port: Code: 03c4b20397d476a0d008e61022c96803ada3c11918fff8133db4f7d27273710e03@81.149.149.156:9735 In the eclair-GUI, choose: Channels -> Open channel ... There, at "Target Node URI", the ID is inserted. Click on "Simple connection (no channel)" and press "Connect". After a while, the GUI should fill with information to nodes and channels. Creating payment channels As described above, select a node in the LN and copy the ID into the "Target Node URI" field. This time do NOT click on "Simple connection (no channel)"! Additionally, choose a bitcoin amount and insert it into the "Capacity" field. The amount must be less or equal to the amount in your bitcoin core test wallet. Press "Connect". Bitcoin core should report an outgoing transaction + fees. Eclair should show a new payment channel. Now wait 6 confirmations. Paying with the Lightning Network To pay with LN you need a payment order from someone you own money (https://medium.com/@btc_coach/lightning-network-in-action-b18a035c955d). So there are no public addresses where you can send your money. This is due to the payment routing through the network (see 9:00 in https://www.youtube.com/watch?v=wIhAmTqXhZQ) If someone ows you money go to: Channels -> Receive Payment. There at "Optional amount to receive" insert the corresponding amount and press "Generate". The result must be sent to the person who owes you money. Here you can by coffee with testnet money: https://starblocks.acinq.co Port forwarding and similar At https://explorer.acinq.co/#/faq, the last point: Quote I cannot connect to a node listed in the explorer. Connection can fail due to one of the following reasons: The node is currently offline right now (any channels it might have are temporarily unavailable but stay open). The node does not announce a public IP. The public IP announced by the node is not accurate. The node is not reachable (misconfiguration in port forwarding, firewall...). ... Eclair works without port forwarding. Simple paying in the LN will always work. Even with closed port 9735. However, with closed port 9735 no one can connect to you node even though you can connect to nodes with open port 9735. As a result, keep this port open. If people call other people via telephon, but if no one picks up, then the telephone is useless. Title: Re: Lightning Network - Eclair: Installation of a testnet LN-node Post by: curiosity81 on January 30, 2018, 08:46:51 AM Guys, get on with it.
>:( >:( >:( And do not always think on the money! Bitcoin is worthless without the technology. Here you find even a simpler method for playing with the LN: https://github.com/LN-Zap/zap-desktop/releases/tag/v0.1.0-beta For installation and usage see (in german): https://bitcointalk.org/index.php?topic=2837939.0 Title: Re: Lightning Network - Eclair: Installation of a testnet LN-node Post by: mocacinno on January 30, 2018, 08:50:52 AM I've been running a c-lightning node on the testnet for a while now...
The reason i chose c-lightning over eclair was that i don't really like running java applications on my sever (i find them slower and more resource intensive than compiled c code) and i like to run a headless server. Can eclair be run as a daemon, or only as a gui application? Title: Re: Lightning Network - Eclair: Installation of a testnet LN-node Post by: curiosity81 on January 30, 2018, 08:53:59 AM I've been running a c-lightning node on the testnet for a while now... The reason i chose c-lightning over eclair was that i don't really like running java applications on my sever (i find them slower and more resource intensive than compiled c code) and i like to run a headless server. Can eclair be run as a daemon, or only as a gui application? I did not tested that yet. But there is a pure node jar: https://bitcointalk.org/index.php?topic=2837939.0 I also think there was a kind of cli mode ... Title: Re: Lightning Network - Eclair: Installation of a testnet LN-node Post by: CryptoICOAlert on January 30, 2018, 11:02:28 AM Guys, get on with it. >:( >:( >:( And do not always think on the money! Bitcoin is worthless without the technology. Here you find even a simpler method for playing with the LN: https://github.com/LN-Zap/zap-desktop/releases/tag/v0.1.0-beta For installation and usage see (in german): https://bitcointalk.org/index.php?topic=2837939.0 Is that while Blockchain technology can be replicated without bitcoin purposely, there has to be some kind of token allied with the ledger in order for the system to work. Title: Re: Lightning Network - Eclair: Installation of a testnet LN-node Post by: mocacinno on January 30, 2018, 12:54:58 PM Guys, get on with it. >:( >:( >:( And do not always think on the money! Bitcoin is worthless without the technology. Here you find even a simpler method for playing with the LN: https://github.com/LN-Zap/zap-desktop/releases/tag/v0.1.0-beta For installation and usage see (in german): https://bitcointalk.org/index.php?topic=2837939.0 Is that while Blockchain technology can be replicated without bitcoin purposely, there has to be some kind of token allied with the ledger in order for the system to work. I have no idear what you're trying to ask/tell us. Maybe it would be a good starting point to read up on the lightning network? Title: Re: Lightning Network - Eclair: Installation of a testnet LN-node Post by: brunoaduarte on January 30, 2018, 09:01:39 PM Code: testnet=1 If i miss the "testnet=1" flag, i'll be running it on the Mainnet ? Title: Re: Lightning Network - Eclair: Installation of a testnet LN-node Post by: mocacinno on January 31, 2018, 06:33:58 AM Code: testnet=1 If i miss the "testnet=1" flag, i'll be running it on the Mainnet ? What do you mean, it's the first line in bitcoin.conf file posted by curiosity81. Since his post was last edited 2 days ago, and your post is less than 1 day ago, the line should have already been there at the time you were creating your post??? Title: Re: Lightning Network - Eclair: Installation of a testnet LN-node Post by: curiosity81 on January 31, 2018, 01:57:17 PM Code: testnet=1 If i miss the "testnet=1" flag, i'll be running it on the Mainnet ? This is very likely. Haven't tried that yet. But beware, bitcoin core will download the complete (!) bitcoin blockchain which has roughly 150GB. Title: Re: Lightning Network - Eclair: Installation of a testnet LN-node Post by: trantute on February 07, 2018, 06:31:43 AM One has to add, that Eclair is not ready for the mainnet yet. Coins can get lost, when the server is shut down, or the version of Eclair changes. So stay with the testnet.
|