How to install, configure the Lightning Network node
The Lightning Network (LN) is currently the most promising solution for scaling in the Bitcoin network. LN proponents say the bitcoin network speed could rise from the current seven transactions per second (TPS) to several million.
This is astronomical scalability in our time, and perhaps the crypto industry will need another decades to achieve such a throughput. However, everyone can create and configure their own node (node) Lightning Network today.
What is the Lightning Network node for
Whenever the number of people wishing to complete a transaction in the Bitcoin network increases, the commission of the network also increases, while the speed of processing payments remains very low. This is exactly what happened in the midst of market activity in December 2017, when a transaction on the Bitcoin blockchain could take several days or cost $ 50 if you wanted to send your funds faster. This state of affairs is becoming a serious obstacle to the mass recognition of the main cryptocurrency.
Here’s why you should create and configure your own Lightning Network node:
- If you are really interested in the success of bitcoin, then creating a node will contribute to greater decentralization of the bitcoin blockchain and the LN network;
- You can send and receive micropayments (or even large payments) almost instantly and at a very low commission;
- You will be able to receive a small income from transactions that go through your payment channels.
How to install and configure the Lightning Network node
There are several implementations of the Lightning Network, however this guide will cover only Eclair as the most user-friendly and understandable.
Download and configure Bitcoin blockchain: First of all, you should download Bitcoin Core (this is the wallet of Bitcoin and its blockchain) and run it.
The Bitcoin blockchain takes up more than 200 GB, and you should have enough hard disk space to host it. While the blockchain is loading, you can edit the configuration file, making the required settings in it.
Open the bitcoin.conf file in the application – select Settings → Options → Open Configuration File. (Alternatively, go to your file system on the path C: \\ Users \\ [user] \\ AppData \\ Roaming \\ Bitcoin).
If you cannot find the file in the Bitcoin folder, then you need to create it. To do this, create a .txt file in the Notepad editor and paste the following lines:
Testnet \u003d 0
Server \u003d 1
Rpcuser \u003d username [username]
Rpcpassword \u003d password [password]
Txindex \u003d 1
Rpcport \u003d 8332
Zmqpubrawblock \u003d tcp: //127.0.0.1: 29000
Zmqpubrawtx \u003d tcp: //127.0.0.1: 29000
Addresstype \u003d p2sh-segwit
Deprecatedrpc \u003d signrawtransaction
Replace “username” and “password” with your own data. Close the text file, saving it as bitcoin.conf. Make sure you end up with a .conf file, not a .txt file. Then it remains to wait for the synchronization of the entire blockchain. This may take several hours or days, depending on the speed of your internet connection. Once the synchronization is complete, you should restart the program.
Download and configure Eclair
You must download an implementation of the LN node called Eclair. Next, open the clair.conf file in the directory C: \\ Users \\ [user] \\ eclair. Be sure to click ‘View hidden files’ in the settings of the ‘Explorer’ of your computer on the tab ‘View’. Enter the following lines in the clair.conf file:
Eclair.chain \u003d mainnet
Eclair.node-alias \u003d ”node-alias”
Eclair.bitcoind.rpcport \u003d 8332
Eclair.bitcoind.rpcuser \u003d username [username]
Eclair.bitcoind.rpcpassword \u003d password [password]
Eclair.bitcoind.zmq \u003d ”tcp: //127.0.0.1: 29000 ″
Eclair.server.public-ips \u003d [“xxx.xxx.xx.x”]
Eclair.node-color \u003d ”ffffff”
This will connect Eclair to the core Bitcoin Core network. The ‘username’ and ‘password’ must exactly match what was entered in the bitcoin.conf file.
Eclair and Bitcoin Core should work simultaneously. If everything works fine, then the Eclair node should open as an interface, not an error message. In the bottom row you will see your private LN public key. In the lower right corner you can confirm your network connection.
Finally, it’s time to open the channels and start sending / receiving Lightning Network transactions. You can use a special search engine for LN – the site 1ml.com, which allows you to find the required nodes, study important statistics and even provide a snapshot of the network.
When you find the node you want to be associated with, click Channels → Open Channel, then copy the node address and paste it into the Target Node URI. Your Capacity (bandwidth) cannot exceed the available balance of your Bitcoin wallet.
Fee rate is the commission of your node, which you set yourself to allow this or that payment through your node. The commission must be fair. Do not put too high a commission, otherwise no one will want to make payments through your site. You can also use the standard bid that Eclair recommends.
If you want other users of the network to find your site, you need to check the Public Channel line.
Click Connect to create your first billing channel. The State section will indicate WAITING_FOR_FUNDING _CONFIRMED – until the transaction is fully confirmed on the blockchain; After that the inscription will switch to NORMAL.
Your site can send and receive payments only in the Lightning Network. Therefore, you need to send a payment to yourself from another Lightning Network wallet or ask a friend to make a payment from his wallet so that you can open a receive channel. When you do this, you can easily send and receive payments to the Lightning Network.
Although the LN system allows you to receive instant payments with small commissions, it is still in beta testing (the network is not fully developed). Do not store your investment funds in Lightning Network wallets; And most importantly, do not send large payments on this network. There is always a small chance that you can lose your money. In any case, caution should be exercised when handling your money.
If you want to send bitcoins worth more than $ 200, then you better use the usual bitcoin network. The Lightning Network has not yet fully entered our lives, and all of the above can be seen as a call to join in the experiment and gain some experience with payments in this new network.
However, you can probably find hundreds of online stores that accept LN payments, and shopping with them can also bring you practical benefits.
The process of setting up the Lightning Network seems a little difficult, but in the end this business can be very useful for you, given the low fees and instant transactions of this bitcoin network.