Bitcoin + Lightning

tl;dr: if you want to throw some Satoshis around, open up a channel to our very own lightning node (CombinatLN) or send us a tip via tippin.me.

CombinatLN lightning node public key: 025b4f75edbad4b02468af6a7d39c1c10280a764756819cb8fc367283d945a5e49

CombinatLN public address: 025b4f75edbad4b02468af6a7d39c1c10280a764756819cb8fc367283d945a5e49@jn2hxf45fgeksudd.onion:9735

Good news everyone

Combinat now runs its own bitcoin full node with lightning on top. As we are enthusiastic about all the potential applications and use cases that could be enabled by distributet ledger technologies (DLT), we had to start with having a look at the king first: Bitcoin.

Despite just buying some Satoshis and watching prices at coinmarketcap, our goal is to get some experience with the technology behind; especially with regard to its application for micro transactions and controlling transactions. I dare to use the phrase “Smart Contracts” as it might sound way cooler than what we might be able to do.

There is an upcoming blog post planned that goes more into detail on what kind of projects we have on our to do list and what drives us. There will be a more general motivation given for the whole Bitcoin/Blockchain/DLT stuff.

So what has been actually done?

At first we set up a RaspiBlitz. The RaspiBlitz combines both, a Bitcoin full node and a Lightning node.

A whole list of parts neccessary to build the RaspiBlitz from scratch is included in the readme. It consists of the Raspberry Pi itself, an SD card for the operating system, an extra hard drive to store the bitcoin blockchain and lightning information, some cables and power supply a case and an LCD display. The overall costs were approximately 140€ per node.

When putting all the parts together, we noticed that the LCD is a little too big for the case, so the upper part of the case had to be left off , which is not a big problem.

There is an image available at the raspiblitz github site that has to be flashed onto the SD card. We used Balenaetcher for flashing. We ran into some trouble, when we had to start over again and could not flash the same card a second time. At some point we figured out that before flashing the card again, all volumes created at the SD card had to be deleted and combined again. Use “diskpart” (https://learn.microsoft.com/de-de/windows-server/administration/windows-commands/diskpart)

Following the installation instructions, severeal passwords have to be created followed by receiving the complete blockchain; approximately 210GB at the time. Unfortunately, back then my deskop computer’s hard drive started to fail. As a result, the plan to validate the complete bitcoin blockchain from the beginning via the bitcoin core node has been thwarted. Several attemps to copy the blockchain data failed. Therefore, the alternative option of downloading the pre-prepared blockchain via torrent was used. The final synchronization took the Raspberry Pi several days and ended in some error message. Some well known bug in RaspiBlitz v1.0.

Having said this, the RaspiBlitz project and the whole efforts of adding Lightning as a second layer on top of Bitcoin are under heavy development. So the instructions we used to build our node are most probably already outdatet; just like the problems we encountered. Meanwhile there is even the possibility to directly buy a ready-2-go RaspiBlitz right away.

Preliminary result

Fast forward. Some time went by, and when continuing with the RaspiBlitz there was an update to version 1.2 avalable. Switch off the RaspiBlitz. Flash the SD card with the new image and on we go.

Load up some funds worth 25€. Enable Tor. Switch on Lightning Autopilot. Interestingly, there were quite some problems adding other nodes as peers or, even worse, opening channels to other peers without the Autopilot. But sure this is a problem of us having no idea what exactly we are doing here.

However, our node has two lightning channels open at the moment of writing and we just made the first successfull micro transaction via lightning. The two Satoshis safely arrived within approximately 10 seconds, alhough there was no direct channel to the tippin.me node.

Ride the lightning web interface for RaspiBlitz
The two Satoshis safely arrived at our tippin.me account

Tippin tweets

Tippin what? Some while ago we heard of a cool plugin for twitter that let’s you tip tiny amounts of Bitcoins as a response to tweets you like. As the one who wants to recieve the tips, you just sign up with your twitter credentials at tippin.me. Unfortunately, it is more complicated to actually send tips. First of all, because you need a funded lightnig wallet. Furthermore, you cannot use the tippin function within the android, iOS or whatever twitter app, but you need a browser plug in (Chrome or Firefox). Once you installed the plugin and view your twitter feed in the browser, there is an additional symbol below each tweet; a small lightning bolt.

Press the button, scan or copy the request. Pay via Lightning. As easy as that. By the way, as you can see in the image of the RTL interface above, this is an empty invoice you get from tippin.me. You can put in the amount by yourself. Makes definitly sense.

What a piece of art

Zeus

There is one more thing we checked out during our run through Lightning land. The Zeus mobile app was installed to one of our android phones. As its description says it’s a mobile Bitcoin app for Lightning Network Daemon (lnd) node operators. As we are now Lightning Node Daemon node operators, Zeus is what we need. To connect to your node, phone and node need to be in the same LAN. The RaspiBlitz offers the possibility to show a QR code including all the neccessary information. This code is scanned within the Zeus app and thats it.

Brave new world

Isn’t it? The whole lightning experience is kinda cool when it finally works. During our journey, we painfully noted how little we know. Starting with the Raspberry Pi to the functionality of the Lightning Network itself.

Of course you don’t need to setup your own node and if you decide to do so, you could go for a, I guess, more user friendly solution like NODL. But hey, as it is not completely unlikely, that we need the Raspi also for other projects, it was a good starting point.

We have to admit, at one point there was this “This whole Lightning thing is not going to work out” thought. But I guess, this is due to the beta status of Lightning itself and, again, us beeing absolute beginners. It’s funny to google some problem and finally find an answer from Bitcoin core developer Pieter Wuille, just to find out you have no idea what this answer actually means.

Furthermore, it’s hard to realize what it means that channel creation and closing are on chain transactions. First off all it takes some time and second of all everything costs you some fees. After opening and closing like 4 channels there was only half of our funds left. Yes, of course also because we have deposited very little.

Most channels have a lower funding limit and once a channel is open, these funds are locked. You have to use your remaining funds to open further channels.

And last but not least there is the infamous inbound liquidity. In case you open a channel to a peer, you fund the channel and these funds are local. Your peer cannot send you Bitcoin via this channel as there is no liquidity at her side. How to get this remote funding? You could send some of your local funds through the channel to your peer. Or she could open another channel to you (, I hink). This is not a problem if somebody wants to do a specific payment to you. She opens a channel to you with enough funding, sends the amount of Bitcoin she wants and closes the channel (optional) again. Inbound liquidity becomes a problem if you want to be part of the Lightning Network routing. As long as you don’t have an open channel with inbound liquidity (remote funds), other payments are not going to be routed via your node.

Outlook

All the remaining problems aside, having its own node with its own wallet and beeing able to send funds within seconds around the globe in a censorship resistant way is just a very good thing. Of course there is room for improvement, most of all on our side.

First of all, we want to enable the DynDNS feature of the RaspiBlitz to be able to connect Zeus not only within our local LAN to the node, but from everywhere. Furthermore, it would be super cool to see some payments beeing routed via our node. Maybe we have to increase the funding and open some more channels. Right now, we don’t know how to solve the inbound liquidity issue for our node. Feel free to open a channel to the CombinatLN node.

Last but not least, it would be awesome to build some application that makes use of our lightning node; maybe even something that runs in parallel at the Raspi. This would be the controlling transaction mentioned at the begining of this post.