DEV Community

Cover image for From Blocks to Blinks: My Bitcoin Lightning Network Bootcamp Adventure(Day 1)
Samuel Thuku
Samuel Thuku

Posted on

From Blocks to Blinks: My Bitcoin Lightning Network Bootcamp Adventure(Day 1)

I woke up thinking I was just going to attend a normal Bitcoin bootcamp. By the end of the day I had fought with a build system, wrestled a missing CMake installation, mined coins on a private chain, and casually sent transactions between wallets named Alice and Bob like it was nothing.

It was the kind of day that feels longer than it actually is not because it was boring, but because every hour had a different kind of problem to solve.


The first battle: a machine with no sudo

The day started with what looked simple on paper: install Bitcoin Core and run it in regtest mode. In reality, I was working on a managed machine without sudo access. That one detail changed everything.

Normally you’d just:

apt-get install bitcoin-core
Enter fullscreen mode Exit fullscreen mode

But that wasn’t an option here. So the entire setup became a kind of “build everything yourself” exercise.

I cloned the Bitcoin repository and immediately ran into the first wall: dependencies and build tools. CMake, Boost, libevent all the usual suspects. The system version of CMake either wasn’t suitable or wasn’t consistently available, so I had to improvise.

That turned into a long detour.


The CMake scavenger hunt

What followed was basically a mini treasure hunt across installation methods:

  • Tried system packages (limited by permissions)
  • Searched for existing CMake binaries across /usr, /opt, and $HOME
  • Installed CMake manually using Kitware’s release script
  • Then reinstalled it again after path issues
  • Fixed PATH in .zshrc multiple times
  • Verified with cmake --version more times than I care to admit

At one point I even had multiple competing installations of CMake and had to figure out which one the shell was actually using.

There was a moment where cmake existed, but not where Bitcoin Core expected it. Another moment where it existed in $HOME/cmake, but the PATH pointed somewhere else entirely.

That part of the day felt less like development and more like debugging my own environment.


The Bitcoin Core build struggle

Once CMake finally behaved, I tried:

cmake -B build
Enter fullscreen mode Exit fullscreen mode

It failed. Not because Bitcoin Core was broken, but because dependencies were still missing or not properly aligned.

That led to the next strategy: building via the depends system.

So I:

  • Entered depends/
  • Ran make -j4
  • Attempted to compile dependencies manually
  • Rebuilt everything with flags to avoid GUI components (NO_QT=1)
  • Cleaned build artifacts with git clean -fdx
  • Restarted configuration multiple times

At some point the build directory had been created, deleted, and recreated so many times it stopped feeling like a project folder and started feeling like a scratchpad.

Eventually, I got to a working configuration using the toolchain file:

cmake -B build --toolchain depends/x86_64-pc-linux-gnu/toolchain.cmake
cmake --build build -j4
Enter fullscreen mode Exit fullscreen mode

That was the turning point. From there, Bitcoin Core actually compiled.


First successful run: regtest mode

Once bitcoind finally started, everything shifted from setup pain to actual exploration.

I configured:

  • ~/.bitcoin/bitcoin.conf
  • regtest mode (so I wasn’t touching real Bitcoin)
  • RPC access for CLI interaction

Then I started playing with the node.

The first real confirmation that everything worked:

bitcoin-cli -regtest getblockchaininfo
Enter fullscreen mode Exit fullscreen mode

Seeing a valid response from a freshly built Bitcoin node felt like crossing a threshold. At that point, all the earlier frustration made sense.


Wallets, mining, and “fake” Bitcoin that feels real

We created wallets:

  • Alice
  • Bob

Then generated addresses:

bitcoin-cli -regtest -rpcwallet=alice getnewaddress
bitcoin-cli -regtest -rpcwallet=bob getnewaddress
Enter fullscreen mode Exit fullscreen mode

Then came mining:

bitcoin-cli -regtest generatetoaddress 101 "$ALICE"
Enter fullscreen mode Exit fullscreen mode

The reason for 101 blocks was explained: coinbase maturity rules. Only after 100 confirmations do mined rewards become spendable.

That moment when Alice suddenly had spendable Bitcoin made the abstract idea of mining click properly. It wasn’t just theory anymore. It was observable state changes in a ledger I could control.


Sending transactions between Alice and Bob

The next step was moving coins around:

bitcoin-cli -regtest -rpcwallet=alice sendtoaddress "$BOB" 10
Enter fullscreen mode Exit fullscreen mode

Watching balances update between wallets felt surprisingly interactive. It wasn’t “simulation” in a toy sense it was a real node executing real consensus rules, just in a private sandbox.

We checked:

  • mempool state
  • transaction IDs
  • wallet balances
  • block confirmations

At one point I tried querying transactions with placeholder TXIDs, broke the command formatting a few times, and had to carefully inspect outputs to understand what actually got recorded.

That part taught something subtle: Bitcoin CLI is extremely literal. It doesn’t guess intent. It just executes exactly what you pass.


Flash quizzes and satoshis

Interspersed with the technical work were flash quizzes. They were fast-paced, and surprisingly fun. Answering correctly sometimes earned satoshis, which added a small but motivating game layer to the learning.

It changed the tone of the day. Instead of just debugging and reading outputs, there was a competitive rhythm to it.


Mining, decentralisation, and what actually matters

One of the bigger conceptual takeaways was mining and decentralisation.

Seeing mining in regtest mode made it clear that:

  • Mining is not “creating money from nowhere”
  • It’s validating state transitions
  • It enforces agreement on history through work

And decentralisation stopped being a slogan. It became a system where no single command or machine dictates the ledger even though in my setup, I was temporarily “all miners at once.”

That contrast actually helped understanding rather than hurting it.


The quantum computing concern

I had a lingering worry going into the session: if quantum computers become powerful enough, could they break Bitcoin’s cryptography and render it worthless?

We discussed it, and the key point that stuck was this:

Bitcoin’s security relies heavily on elliptic curve cryptography (ECC), specifically secp256k1. While quantum computers theoretically pose a threat via Shor’s algorithm, the practical barrier is still enormous. We are not at a point where private keys can be derived from public keys at scale.

Also, Bitcoin isn’t static. If that ever became a real threat, the protocol could migrate to quantum-resistant signature schemes through upgrades.

So the fear didn’t disappear, but it became more grounded. Less “Bitcoin will suddenly die”, more “cryptography evolves with threats”.


Ending the day

By the end of the session, I had:

  • Built Bitcoin Core from source under constraints
  • Fixed multiple environment/tooling issues without sudo
  • Run a regtest node
  • Created wallets
  • Mined blocks
  • Sent transactions
  • Explored the blockchain via CLI

But more importantly, I had gone from treating Bitcoin as a peer-to-peer trading tool I occasionally used, to understanding it as a system with rules I could directly interact with.

And then there’s Lightning Network which is what tomorrow is about. Today was the foundation. Tomorrow is where things start moving fast.

For a first day, it wasn’t smooth. But it was the kind of messy that actually teaches you something.

Top comments (0)