How to Start Contributing to LND!

Vibhav Sharma
3 min readAug 26, 2022

--

About LND

The Lightning Network Daemon (lnd) - is a complete implementation of a Lightning Network node. lnd has several pluggable back-end chain services including btcd (a full-node), bitcoind, and neutrino (a new experimental light client). In the current state lnd is capable of:

  • Creating channels.
  • Closing channels.
  • Completely managing all channel states (including the exceptional ones!).
  • Maintaining a fully authenticated+validated channel graph.
  • Performing path finding within the network, passively forwarding incoming payments.
  • Sending outgoing onion-encrypted payments through the network.
  • Updating advertised fee schedules.
  • Automatic channel management (autopilot).

Prerequisite

For starters have a base foundation for Bitcoin and move to layer-2 which is Lightning Network.

Once through with the above content you will definitely have a fundamental understanding of Bitcoin and Lightning.

If you want to take your understanding to next level and want more clarity on the dev side do check out Basis of Lightning Technology (BOLT).

Contribution

  • LND Setup :

First, you need to setup LND Node and run it in regtest or testnet as per your convenience by following LND Installation guideline

  • Hands on with LND :

Once all set you can playaround by creating multiple nodes in regtest, further create channels, send invoices/payments further look for payment traversal explore the params involved while opening/closing channels or while routing payments/invoices.

You can try accomplishing the flow below and share the gist with me will be happy to guide you if you get stuck.

Alice sends payment to Bob. Add a new node (Carol), open a channel from Bob to Carol, and then send a payment from Alice to Bob to Carol.

  • Start with a PR

Look for beginner issues and fork the repo work on a starter PR, don’t get intimidated by the issue or if you are unaware of the tech stack, ask for guidance from LND community but make sure you first tried handling the issue at your own level and then go to mentors, so that you have something to discuss and conversation is not one-sided.

Alright Alright, I know you will have a lot of fun while working on the PR now it's time to tame it so that it gets merged!

  • Test Coverage:

Make sure any changes that you are trying to merge should have relevant test coverage for starters altleast one -ve and one +ve test path.

  • Commit Structure:

Your commits should be aligned in a modular fashion any changes you are trying to accommodate should have a well-defined commit message so that its purpose is crystal clear.

Also, make sure your commit shouldn’t be bulky if you think there are a lot of changes in different modules try to break your commits in a building block fashion. It looks neat while submitting PR for review to the community.

🧙‍ Voila! You are all set for a well-defined PR! 🎉🎊

Thank you for your time 🙌 , Feel free to write any suggestions below… If you feel like you this blog was useful, don’t forget to give an applaud 👏

--

--