Transactions for the Future

Lightning is a decentralized network using smart contract functionality in the blockchain to enable instant payments across a network of participants.

Instant Payments. Lightning-fast blockchain payments without worrying about block confirmation times. Security is enforced by blockchain smart-contracts without creating a on-blockchain transaction for individual payments. Payment speed measured in milliseconds to seconds.

Scalability. Capable of millions to billions of transactions per second across the network. Capacity blows away legacy payment rails by many orders of magnitude. Attaching payment per action/click is now possible without custodians.

Low Cost. By transacting and settling off-blockchain, the Lightning Network allows for exceptionally low fees, which allows for emerging use cases such as instant micropayments.

Cross Blockchains. Cross-chain atomic swaps can occur off-chain instantly with heterogeneous blockchain consensus rules. So long as the chains can support the same cryptographic hash function, it is possible to make transactions across blockchains without trust in 3rd party custodians.

More info about Lightning network can be found here: http://lightning.network/

 

Download

On the following links you can download EMC2 lightning network daemon and CLI so you can easily implement EMC2 lightning payment within your application:

When downloading the files, you can verify the authenticity with http://onlinemd5.com/

  • For Windows: 0E5A1C6DDC3C3D6B060267D6F2078CDD

  • For macOS: EE90DCC0CB8E7B56A92AF538FB3C2926

  • For linux: C161A6BA779C8BE36A1D9791BEF903B1

If you need any help feel free to contact us via form on the home page or send us an email to developer@emc2.foundation.

EMC2 Lightning Network GUI wallet, explorer, EMC2 LN apps and many more are still to come.


HOW TO SET UP EMC2 LIGHTNING NODE

 

How it Works

The Lightning Network is dependent upon the underlying technology of the blockchain. By using real Einsteinium/blockchain transactions and using its native smart-contract scripting language, it is possible to create a secure network of participants which are able to transact at high volume and high speed.

Bidirectional Payment Channels. Two participants create a ledger entry on the blockchain which requires both participants to sign off on any spending of funds. Both parties create transactions which refund the ledger entry to their individual allocation, but do not broadcast them to the blockchain. They can update their individual allocations for the ledger entry by creating many transactions spending from the current ledger entry output. Only the most recent version is valid, which is enforced by blockchain-parsable smart-contract scripting. This entry can be closed out at any time by either party without any trust or custodianship by broadcasting the most recent version to the blockchain.

Lightning Network. By creating a network of these two-party ledger entries, it is possible to find a path across the network similar to routing packets on the internet. The nodes along the path are not trusted, as the payment is enforced using a script which enforces the atomicity (either the entire payment succeeds or fails) via decrementing time-locks.

Blockchain as Arbiter. As a result, it is possible to conduct transactions off-blockchain without limitations. Transactions can be made off-chain with confidence of on-blockchain enforceability. This is similar to how one makes many legal contracts with others, but one does not go to court every time a contract is made. By making the transactions and scripts parsable, the smart-contract can be enforced on-blockchain. Only in the event of non-cooperation is the court involved – but with the blockchain, the result is deterministic.

 

overview

Einsteinium supported LND implementation of Lighting network protocol created by Lighting Labs. Other implementations will be supported soon. Current implementation does not contain any GUI and this step by step command line tutorial will overcome that issue until proper solution is released.

 

instructions

  1. Download latest Einsteinium wallet release (0.13.48 - Excalibur) for your OS. (If you are Windows user, please make sure you have latest version of wallet with ZMQ bug fixed). Check wallets page to download and for more info.

  2. Make sure that your EMC2 wallet is not running, then edit or create Einsteinium configuration file einsteinium.conf that should be on the following location:

    • Windows Vista, 7, 10: C:\Users\[username]\AppData\Roaming\Einsteinium\einsteinium.conf

    • Linux: /home/[username]/.einsteinium/einsteinium.conf

    • MacOS: /Users/[username]/Library/Application Support/Einsteinium/einsteinium.conf

    • Configuration file (einsteinium.config) should have following lines:

      rpcuser=[YOUR_USERNAME]

      rpcpassword=[YOUR_PASSWORD]

      rpcport=41874

      rpcallowip=127.0.0.1

      zmqpubrawblock=tcp://127.0.0.1:28332

      zmqpubrawtx=tcp://127.0.0.1:28332

    • Replace [YOU_USERNAME] and [YOUR_PASSWORD] with something you would like to be your username and password.

  3. Run EMC2 wallet and wait until it is fully synchronized (until it downloads all blocks from the einsteinium main network).

  4. Download EMC2 Lightning Network daemon for your OS and extract archive on your desired location (download links are at the top of this page).

  5. Create lnd.conf file on the following location:

    • Windows Vista, 7, 10: C:\Users\[username]\AppData\Local\Lnd\lnd.conf

    • Linux: /home/[username]/.lnd/lnd.conf

    • MacOS: /Users/[username]/Library/Application Support/Lnd/lnd.conf

    • Then add following lines into the file:

      [Application Options]

      externalip =[YOUR-IP-ADDRESS]

      debuglevel=info

      [Einsteinium]

      einsteinium.active = 1

      einsteinium.mainnet =1

      einsteinium.node=einsteiniumd

      [einsteiniumd]

      einsteiniumd.rpcuser=[YOUR_USERNAME]

      einsteiniumd.rpcpass={YOUR_PASSWORD]

      einsteiniumd.zmqpath=tcp://127.0.0.1:28332

    • Replace [YOUR-IP-ADDRESS] with your external ip address. You can find it by visiting: https://whatsmyip.com/. Replace [YOUR_USERNAME] and {YOUR_PASSWORD] with the username and password you previously used in einsteinium.conf file.

  6. Start EMC2 Lighting deamon (LND) in terminal and navigate to folder where LND executable file is located. Bellow you can find how to start terminal on different platforms and instruction for starting deamon.

    • Windows

      • Select the Start button.

      • Type cmd.

      • Click or tap Command Prompt from the list.

    • Linux

      • On Linux based platforms you can use hotkeys Ctrl+Alt+T

    • MacOS

      • Click the Finder icon in your dock.

      • Click Go.

      • Click Utilities.

      • Double-click Terminal.

    • Once terminal is opened write following: cd [PATH-TO-EMC2-LND-FOLDER]

      Replace [PATH-TO-EMC2-LND-FOLDER] with the path where you extracted previously downloaded EMC2 LND daemon (step 4).

    • Then, to run EMC2 LND daemon enter following command in the terminal: lnd --noencryptwallet

      Flag that defines wallet encryption (—noencryptwallet) is not necessary, but for the first time users it will speed up the process. If you want your LND wallet to be encrypted, first enter command: lncli create and follow step by step instructions. After you finish with it you can just run lnd command to start the wallet.

  7. Wait until EMC2 Lighting network deamon is synchronized with Einsteinium wallet (Caught at [Latest_block_number]).

  8. In another terminal start EMC2 Lighting network command line interface (LNCLI) with following command that lists all information about your Lighting wallet: lncli getinfo

    • Using following command you can list all Lighting commands:

      • lncli help

    • With following command check wether you already have connection with Einsteinium official Lighting node which you can identify with public key "0319614abc55fc3ff4e1f8fd7ac524d391cd568795f6ed5c472ee4fb13c0da0e62"

      • lncli  listpeers

    • If you don’t have connection to any of the Einsteinium official Lighting nodes, you can easily add it using following command:

      • lncli  connect 0230bac7eca2cdb0a328f8ab2d7545a0d91b812dd0a82c50301428808fe06016ee@142.93.17.166:9735

      • lncli  connect 0319614abc55fc3ff4e1f8fd7ac524d391cd568795f6ed5c472ee4fb13c0da0e62@159.89.98.111:52824

    • Lighting wallet can be funded by creating new SegWit address and sending some amount of EMC2 coins to it with regular onchain transaction. To create address run following command:

      • lncli  newaddress np2wkh

    • Funds can be checked with following command:

      • lncli  walletbalance

    • With following command you can easily open channel with official Einsteinium Lighting node:

      • lncli  openchannel --node_key= --amt=200000000

      • Be aware that amount (—amt) must be input in SATOSHI (20EMC2=2000000000 SATOSHI).

    • You should wait about 30 confirmations to be sure that channel is open. Channel status can be checked with following command:

      • lncli listchannels

If you need any more help with setting up EMC2 Lightning node or you encounter any other issue feel free to contact us via form on the contact page here or send us an email to developer@emc2.foundation we will be more than happy to assist.


If you want to support future development please donate to the following addresses:

EMC2: EQgarWNx3e9hrH3PmFXPWty2qWvprm53hN

BTC: 15G6LP3s7u7YYEsShBagSxWZdrWLJUJVQ5

To help with funding scientific projects donate to the following address:

EMC2: EKnqTC9XEuucZEhD3miDGnbJxBptcxhByA