Week 1
Building on bitcoin and setting up a dev environment
Prerequisites
We would like you to download some source code and attempt to compile it by following its build instructions before the course begins. This is to prevent any delays when starting on the day.
Please download/clone the following tools/repositories and try to follow and complete their build processes:
TABconf wallet
Bitcoin Core
LND
Polar
Don't run bitcoind
without specifying regtest
(or signet
) as the network in the configuration file (bitcoin.conf
) or as a command line argument (see bitcoind --help
). Otherwise you will start synchronising blocks for mainnet which is over 400 GB! At this point, you don't even need to run bitcoind just yet.
Goals
Discuss and understand bitcoin philosophy
Become comfortable and proficient in setting up bitcoin developer environments
Be able to run and interface with Bitcoin Core and LND
Understand signet and regtest
Connect Bitcoin Core and LND programmatically
Interface with Bitcoin Core and LND using the CLI tools
Programmatic control of bitcoind and LND
Comfortable with running the full test suite(s) of Bitcoin Core
Build a toy bitcoin wallet using a library
Add additional functionality of your choosing
Develop a robust understanding of bitcoin topics both in theory and in practice:
Random number generation
Keys and key material
Derivation paths
Address types
Coin selection
Gain experience with developing and using a Bitcoin wallet UI
Monday & Tuesday
Introduction to Qala
Programme structure
Icebreakers
Bitcoin Philosophy
Why we bitcoin
Wednesday - Friday
Resources
BIP0032
TABConf 2021 Building Your own bitcoin wallet with BitcoinJS
Bitstein - Setting up a bitcoin lightning network test environment
Exercises
Read the Mastering Lightning book appendix on bitcoin transactions.
Read about Hierarchical Deterministic Wallets in BIP0032.
You do not need to read/understand the child key derivation functions.
You should conclude with a strong understanding of how parent and child keys are derived from each other, and from a master seed .
Run through the TABconf wallet demo video found in the link above, following along with the demonstration.
Set up a manual bitcoin and lightning developer environment on regtest by following the guide from Bitstein: Setting up a Bitcoin/Lightning test environment
Note, this environment should ideally be built using Bitcoin Core and LND which have been build from source by yourself.
Run all Bitcoin Core unit tests
Choose area of the codebase you're interested in, pick a functional test that covers it, and then run that test
hint: see documentation in
test/README.md
for clues on how to run individual tests)
OPTIONAL: Set up a simulated Lightning Network with Polar using at least three lightning nodes with two channels connecting them.
Try create some invoices and paying them. See how the balances of the channels change.
Play around a bit and expand your network. Try adding some more nodes.
NOTE: Knowing your way around Polar will be useful for upcoming weeks' exercises as we'll be using it as part of our development environment.
Deliverables
TABConf: please send us file:
src/util/bitcoinjs-lib.ts
.Screenshot of your lightning developer environment resulting from the guide from Bitstein.
Screenshot of your simulated lightning network on Polar.
A P2WPKH transaction in hex format
Last updated