Understand the Bitcoin Lightning Network with a simple experiment you can try for yourself

Bitcoin, in its current form, does not scale.

Currently, every single transaction is stored by every single participant on the network.

Imagine if that’s how the Internet worked. Instead of going and getting only the information you needed, you had to download a copy of the entire Internet to your computer. It just wouldn’t work.

Instead of keeping all the transactions on the blockchain, Lightning Network plans to move most of them elsewhere, so they are only stored by those who need them. This would allow it to scale near-infinitely.

It does this by routing payments through channels.

I’ve seen people speculating about using Lightning Network with multiple channels, one to pay for their coffee, another to pay for clothing, depending on which channel will likely be “quickest”. This reminds me of when I first learned about email in the 90s, people were discussing how it could be sent between computers “in minutes”.

In reality, data can make its way entirely around the world in a fraction of a second, at speeds not far behind the speed of light.

You can test this theory yourself. I live in the UK, on the opposite side of the world is Australia. Go to the command prompt and type:
“ping 139.130.4.5”

That is the IP of a computer located in Australia. The ping command tells my computer to send a ‘hello’ message to that computer, and then tells me the time it took to receive a reply.

The speed I am given is around 360ms. Just over 1/3 of a second (1000ms).

From where I am in the UK to Sydney, Australia is 10,645 miles. That means in around a third of a second, that ping request has travelled 21,290 miles around the world at a staggering 59,139 miles per second.

The speed of light however, is 186,282 miles per second. So, relatively speaking, why so slow?

The answer is that the request had to be routed. If there was a fibre optic cable directly from my house all the way to Sydney, we’d be able to achieve light speed. However, there isn’t, the request had to be routed through lots of different channels (connections between 2 different locations).

Considering how much we use and depend on the Internet, its easy to forget just how impressively it performs, and our computers possess the basic tools needed to enable us to see exactly how data is routed around the Internet between our computer and another.

Another trip to the Windows command line and I type: “tracert 139.130.4.5”.

This is the trace route command, and it will piece together exactly the route the ping request data took to get there.

In my case the first channel of the route is a 1ms trip from my laptop to my router over WiFi. It then makes a 20ms trip to my ISP, where it was passed around between a few switches, before by 24ms, on its 7th hop arriving at IP 195.66.236.166, the London Internet Exchange (LINX). From there, it takes 140ms to arrive in Hong Kong at IP 202.40.149.146, checking in a couple of times along the way. The next stage in its journey is a big one, taking a 340ms to arrive in Sydney at IP 203.50.13.97.

The journey the Internet traffic took can be summarised as follows:

Hop(s)  | Time   | Location
1         1 ms     WiFi Router
2-7       24 ms    My ISP
8         24 ms    London Internet Exchange
9-10      140 ms   Hong Kong
11-14     340 ms   Sydney
15        340 ms   Final Destination

As you can see, it took 15 hops in total for the data to get from my computer in the UK to its destination in Australia. The times mentioned are actually round-trip, so the trip to Hong Kong actually took 70ms one-way, but involved 20 hops round-trip.

If you visit an Australian website from the other side of the world, you don’t give a second thought to the route the data took, it all just happens really quickly and behind the scenes. This is exactly how the Lightning Network will work. It sounds incomprehensible to the end user, but so does the Internet which we take for granted.

The Lightning Network is the perfect solution to Bitcoin’s scaling problem. While it sounds complicated, and its hard to imagine what it will be like to use, thanks to the great minds working on it, its probably going to feel pretty similar to how we use Bitcoin now, except with confirmation times of less than a second and at near zero-cost.

Follow me

John Hardy

Software developer living in UK.
Longtime Bitcoin advocate.
Email [email protected]
Donations welcome: 1H2zNWjxkaVeeE3yX6uVqng5Qoi6gGvYTE
John Hardy
Follow me

Author: John Hardy

Software developer living in UK. Longtime Bitcoin advocate. Email [email protected] Donations welcome: 1H2zNWjxkaVeeE3yX6uVqng5Qoi6gGvYTE