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 the following repositories and try to follow and complete their build processes:
NodeJS
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
Resources
Lightning Book - Bitcoin Fundamentals review
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.
The username:password to access the book is:
qala:lightning
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.
(Optional): If you finish all of the above, you can continue your progression by following the "TABConf wallet expansion" on Thursday
Deliverables
TABConf: please send us file:
src/util/bitcoinjs-lib.ts
.Screenshot of your lightning developer environment resulting from the guide from Bitstein.
(Optional): Any extensions you made to the TABConf wallet.
Thursday
Exercises
TABConf wallet expansion. Add some or all of the following functionality to the wallet:
one or more different receive address types, e.g. P2PK, P2PKH, P2SH, P2WPKH, P2WSH, P2TR, for the user to choose from
Add a "watch-only wallet" mode
Add full backup and restore functionality
Improve UI/UX for a user who has many different sub-wallets derived from their seed
Add ability to perform coin selection when sending payments
Bonus: Setup Bitcoin Core to use signet. Manually construct a transaction that could represent a 'uni-directional payment channel opening transaction' with an instructor, and produce (off-chain) update transactions for 3 purchases in hex format and send them to us.
Friday
Exercises
Run Bitcoin Core, which has been built from source, in Signet mode
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)
Follow through the Bitcoin Core v23.0 Release Candidate Testing Guide, report any bugs or issue that you find to the Bitcoin Core GitHub issue tracker.
You might find answers to questions you have in the meeting logs for a bitcoin-core-pre-review (club) meeting held on the guide: meeting log.
Send a regular P2WPKH tx to an instructor on signet.
Run the Miner simulation exercise.
Connect to the Bitcoin Network using tinybitcoinpeer.
Extend the functionality of tinybitcoinpeer to do something interesting!
BONUS: Modify bitcoind User Agent string in the source code and recompile
OPTION: Interact with a testnet instance of LightningK0ala/satoshis.place
Deliverables
Screenshot of Bitcoin Core running in signet mode (output of
bitcoin-cli -signet -getinfo
)Screenshot of Bitcoin Core unit tests completing (they should all pass, let us know if they don't!)
Screenshot of you running a single functional test that you chose
Some brief feedback/notes on the Release Testing Guide
A P2WPKH transaction in hex format
A brief explanation on what the miner simulation is able to simulate
Last updated