Summer of Bitcoin'21 @ mempool

Summer of Bitcoin'21 @ mempool

·

4 min read

This summer I created a Lightning Explorer for mempool alongside Priyansh, and I was mentored by wiz and softsimon.

I had no experience working on Bitcoin-related projects before. I had a little experience with open source projects, but this program was a totally new experience for me. Summer of Bitcoin for me was an ecstatic and an illuminating learning experience.

In the first week of the program Kalle Rosenbaum gave us a technical deep dive on the fundamentals of Bitcoin, which was really crucial for me as a learner and I learned a lot in a short amount of time. This was followed by a five-week chaincode seminar in which we had a ton of excellent discussions with our peers.

Mempool

Mempool is the fully featured visualizer, explorer, and API service running on mempool.space, an open source project developed and operated for the benefit of the Bitcoin community, with a focus on the emerging transaction fee market to help our transition into a multi-layer ecosystem.

Read more about mempool on Priyansh's blog

The Lightning Network

The Lightning Network is a layer on top of Bitcoin's blockchain. The Lightning Network provides to Bitcoin improved privacy, speed, and scale.

The Lightning Explorer

Setting up lnd

To create a lightning explorer we needed to first set up our own lightning network daemon(lnd) nodes. You can download a suitable release from github.com/lightningnetwork/lnd/releases and follow the instructions to set it up. For backend I used bitcoind(testnet) but you have other options too.

Once you have set up lnd, you need to create a wallet with: lncli create

lnd will then print a 24 word cipher seed mnemonic, which can be used to recover the wallet in case of data loss. The user should write this down and keep in a safe place.

The next step is to set up mempool in your local development environment by following the instructions on mempool's github repository.

The frontend is written in Angular and the backend is written in node with a MariaDB database.

Features Added

The Lightning Network

  1. Dashboard with number of channels, network capacity, number of nodes and average channel size. Dashboard
  2. List of latest updated channels and nodes on the dashboard Latest nodes and channels
  3. A dedicated page to display all the channels on the network Channels Page
  4. A dedicated page to display all the nodes on the network Nodes Page
  5. A channel dashboard to display information about the channel Channel Clicking on the channel point here will navigate you to the transaction that created the channel on the Bitcoin explorer.
  6. A node dashboard to display information about the node Node
  7. Search feature for the explorer Screenshot 2021-09-16 at 12.27.30 PM.png

What's next?

  1. Creating a mempool-Lightning API Service
  2. Store lightning data to create and display advanced statistics about the network

It is fun working on creating the lightning explorer and hopefully we will be able to make it deployable soon with all the features.

Other work

  • Apart from creating the Lightning explorer I translated mempool.space to Hindi. It took some thinking but looking at the explorer in my own language is extremely gratifying. Screenshot 2021-09-16 at 1.02.52 PM.png

  • I also added missing Block Header API endpoint to the node.js backend and added documentation for the API: Pull Request #630

  • Only display "Load all" if there are at least 3 more items to load: Pull Request #724

Blog Posts

I also wrote some Blog Posts related to my learnings in the Program.

  1. Bitcoin P2P Security Network
  2. What is SegWit
  3. Understanding Bitcoin Script
  4. Should a legacy node be considered a full node?

Conclusion

In conclusion I would say that I learned a lot in these 10 weeks of Summer of Bitcoin from my mentors wiz and softsimon, from my partner Priyansh, from my other peers, from Jarold, thunderbiscuit and the organizers Adi, Caralie and Jonas.

I will stick around the community for as long as I can because I believe in Bitcoin and the people working on it.