Tony Aldon

2022 • Towards The Bitcoin Lightning Network

I believe in this philosophy that I call: the aggregation of marginal gains.

—Dave Brailsford

At the very end of 2021, I started to get interested in Bitcoin.

And as I kept hearing:

  • that Bitcoin will be the decentralized currency of the world,

  • that there will never be more than 21 million Bitcoins,

  • that Bictoin is open source software so that you can check that information yourself or even contribute to it,

on December 30, 2021, I cloned the Bitcoin source code and grep the string 21000000 which led me to src/consensus/amount.h file:

// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2018 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#ifndef BITCOIN_CONSENSUS_AMOUNT_H
#define BITCOIN_CONSENSUS_AMOUNT_H

#include <cstdint>

/** Amount in satoshis (Can be negative) */
typedef int64_t CAmount;

/** The amount of satoshis in one BTC. */
static constexpr CAmount COIN = 100000000;

/** No amount larger than this (in satoshi) is valid.
 *
 * Note that this constant is *not* the total money supply, which in Bitcoin
 * currently happens to be less than 21,000,000 BTC for various reasons, but
 * rather a sanity check. As this sanity check is used by consensus-critical
 * validation code, the exact value of the MAX_MONEY constant is consensus
 * critical; in unusual circumstances like a(nother) overflow bug that allowed
 * for the creation of coins out of thin air modification could lead to a fork.
 * */
static constexpr CAmount MAX_MONEY = 21000000 * COIN;
inline bool MoneyRange(const CAmount& nValue) { return (nValue >= 0 && nValue <= MAX_MONEY); }

#endif // BITCOIN_CONSENSUS_AMOUNT_H

From a programmer's point of view, this is when I realized that if the Bitcoin proponents are right, Bitcoin source code would become one of the most important source codes in history.

I thought that not embracing the Bitcoin history and being part of it might be the biggest mistake of my life.

So I made the decision not to lose this opportunity and my Bitcoin learning journey began.

Around May I learned about the Lightning Network.

In October, I attended Chaincode Labs Lightning Network seminar. This is when I discovered Core Lightning, a standard compliant implementation of the Lightning Network Protocol.

Soon after, I started LNROOM, a web site with videos that helps you learn how to hack on Core Lightning.

While I was learning about Bitcoin, I continued to contribute to the Emacs community by:

What did I learn?

  1. Everything counts,

  2. System are never simple by accident. Builders of such systems worked hard at it,

  3. When you truly think long term the systems you build and care about are really differents.