├── README.md ├── questions-4th-ed.md ├── questions-5th-ed.md ├── questions-2nd-ed.md └── questions-3rd-ed.md /README.md: -------------------------------------------------------------------------------- 1 | # Mastering Bitcoin - Study Cohort 2 | 3 | Welcome to the Mastering Bitcoin Study Cohort, where we'll dive deep into the foundational concepts and advanced topics of Bitcoin as covered in the book [Mastering Bitcoin](https://github.com/bitcoinbook/bitcoinbook) by Andreas M. Antonopoulos. This cohort is designed for anyone looking to gain a thorough understanding of Bitcoin, from its technical aspects to its broader implications in the world of finance and technology. 4 | 5 | ## Program Description 6 | 7 | The Mastering Bitcoin Study Cohort is an 8-week guided study group. We will read and discuss two chapters each week, covering both the fundamental principles and the advanced concepts in the book. Each session will include discussions on the key topics, practical exercises, and Q&A to deepen your understanding. 8 | 9 | ## Who Should Join? 10 | 11 | This cohort is perfect for: 12 | 13 | - Developers looking to build applications on top of Bitcoin. 14 | - Bitcoin enthusiasts wanting to understand the inner workings of the Bitcoin network. 15 | - Investors and financial professionals seeking a deeper understanding of Bitcoin technology. 16 | - Students and researchers interested in blockchain and cryptocurrency technologies. 17 | 18 | ## Prerequisites 19 | 20 | - Basic understanding of programming concepts. 21 | - Familiarity with Bitcoin and blockchain concepts is helpful but not required. 22 | 23 | ## Program Details 24 | 25 | ### Duration 26 | 27 | - **8 weeks** 28 | - **Start Date:** 28th June 2024 29 | - **End Date:** 23rd August 2024 30 | 31 | ### Weekly Schedule 32 | 33 | - **Sessions:** Once a week 34 | - **Day:** Friday 35 | - **Time:** [Insert Time] (Convert to your local time zone) 36 | 37 | ### Weekly Plan 38 | 39 | | Week | Chapters | Topics | Date | 40 | |------|--------------|--------|------| 41 | | 0 | - | - Orientation
- Overview of the Program | 28th June 2024 | 42 | | 1 | 1 & 2 | - Introduction
- How Bitcoin Works | 5th July 2024 | 43 | | 2 | 3 & 4 | - Bitcoin Core
- Keys, Addresses | 12th July 2024 | 44 | | 3 | 5 & 6 | - Wallets
- Transactions | 19th July 2024 | 45 | | 4 | 7 & 8 | - Authentication
- Digital Signatures | 26th July 2024 | 46 | | 5 | 9 & 10 | - Transaction Fees
- P2P Network | 2nd August 2024 | 47 | | 6 | 11 & 12 | - The Blockchain
- Mining and Consensus | 9th August 2024 | 48 | | 7 | 13 & 14 | - Bitcoin Security
- 2nd Layer Application | 16th August 2024 | 49 | | 8 | - | - Next Steps
- Summary and Closing Discussion | 23rd August 2024 | 50 | 51 | ## Program Style 52 | 53 | The structure of the cohort program is designed for self-study. Each week, participants will be assigned to a group to receive questions related to the scheduled chapters. Participants are expected to study the material, prepare answers to their questions, and actively participate in the weekly group discussion sessions, where they will explain their answers to other participants. 54 | 55 | Following the group discussion, Bitshala Teaching Assistants (TAs) will be available for doubt-clearing sessions, providing an opportunity to ask additional questions and clarify any doubts that arose during the study session. 56 | 57 | - **Weekly Group Session:** Fridays, 8:00 PM to 9:30 PM (IST) 58 | 59 | To apply for the cohort program, please apply [here](https://www.bitshala.org/apply). We look forward to providing you with an incredible learning experience at Bitshala! 60 | 61 | ## How to Join 62 | 63 | To join the Mastering Bitcoin Study Cohort, please fill out [this application form](https://bitshala.org/cohorts/mb/#applicationForm). Once you apply, you will receive an email with further registration instructions. 64 | 65 | ## Resources 66 | 67 | - [Mastering Bitcoin Book](https://github.com/bitcoinbook/bitcoinbook) 68 | - [Bitshala Website](https://www.bitshala.org) 69 | - [Bitshala Discord](https://discord.gg/jJ6nF6Yd67) 70 | 71 | Join us to become part of a vibrant community of Bitcoin learners and enthusiasts. Let's master Bitcoin together! 72 | 73 | ## Contact 74 | 75 | For any queries, please contact [contact@bitshala.org](mailto:contact@bitshala.org). -------------------------------------------------------------------------------- /questions-4th-ed.md: -------------------------------------------------------------------------------- 1 | # Week 3 2 | ## GD Questions 3 | - What is a Bitcoin wallet? What are the different types of wallets available? 4 | - What is the difference between deterministic and non-deterministic wallets? 5 | - What is a "seed" in the context of Bitcoin wallets? How are mnemonic words generated from the seed? 6 | - What is the optional passphrase for a mnemonic? In which situations passphrase can be useful? 7 | - What are the components of an extended key (XPub)? What is the fingerprint of a key? 8 | - What are hardened and non-hardened derivations? What are the advantages of having different types of derivations? 9 | - What are the different components of a Bitcoin transaction? What are transaction inputs and outputs, and how are they constructed? What are locking and unlocking scripts? 10 | - What are various sources of transaction malleability? How does segwit fix transaction malleability? What parts of the transaction structure got affected with the segwit upgrade? 11 | 12 | ## Bonus Questions 13 | - What is nSequence? What was it intended use when Satoshi created Bitcoin? How is it used today? 14 | - What are various sources of transaction malleability? How does segwit fix transaction malleability? 15 | - Can two transactions have the same transaction id? When can this happen? Is that a consensus violation? 16 | -------------- 17 | 18 | # Week 4 19 | ## GD Questions 20 | - Is the Turing incompleteness of Bitcoin's scripting language (SCRIPT) a feature or a deficiency? 21 | - Explain different types of timelocks available in a Bitcoin transaction and list the components of the transactions that can be used to set these timelocks. 22 | - How does Taproot upgrade increase security and privacy in Bitcoin? 23 | - Highlight the differences between Tapscript and native Bitcoin script? 24 | - What are digital signatures, where are they placed in a transaction, and what is their purpose? 25 | - What are sighashes, and what are their uses? How many types of sighashes are there? 26 | - What is the Discrete Log Problem, and why is it important in Cryptography? What does it mean when we say "DLP is hard"? What would have happened if DLP wasn't a "hard" problem? 27 | - Why is it important to use a random number (k) as the basis for a private/public nonce pair? What vulnerabilities can be exploited if k is known to be reused? Can you provide a real-life example of when such an exploit occurred? 28 | 29 | ## Bonus Questions 30 | - Why is the public key directly included in a P2TR output whereas in other script types we always include a hash? 31 | - Why are the locking and unlocking scripts executed separately? 32 | - Besides signing transactions, what other uses could digital signatures have? 33 | 34 | 35 | -------------- 36 | 37 | # Week 5 38 | ## GD Questions 39 | - Why do we need to pay transaction fees when we have block reward as an incentive? Is there a minimum fee that every transaction needs to pay? Is it a consensus rule or policy rule? 40 | - What is RBF. When is it useful? List all the conditions required to do a valid RBF. 41 | - What is CPFP (Child Pays For Parents)? When is it useful? In which situation RBF cannot be used, but CPFP can be used? 42 | - What is transaction pinning? How is it a vulnerability for multiparty time-sensitive protocols such as LN? 43 | - What is a peer-to-peer network? Give two examples of successful peer-to-peer networks that preceded Bitcoin. 44 | - Explain in brief what is a Mempool and what is an Orphan Pool. 45 | - How do light clients validate that a transaction exists? How is this different from the mechanism full archival nodes use to validate a transaction? 46 | - What are compact block filters? What data should be included in a block filter? 47 | 48 | ## Bonus Questions 49 | - What are the privacy trade-offs in using a light client? 50 | - What is fee sniping and how does it work? How can it be prevented? 51 | - What is CPFP carve out and anchor outputs? 52 | 53 | -------------- 54 | 55 | # Week 6 56 | ## GD Questions 57 | - Describe the structure of a block and what data does a block header contain? 58 | - What is a Merkle Tree? How is it used in the blockchain? What data does the Merkle Root verifies? 59 | - What is the difference between mainnet and testnet? Can testnet coins have value? 60 | - What is the difference between signet and testnet? What is regtest? When is it useful? 61 | - What is a coinbase transaction? What prevents the miners from inflating the coinbase reward? 62 | - Explain the 51% attack. Can it compromise the security of private keys and signing algorithms? 63 | - What is Mining Difficulty? How is it adjusted? What would happen if it wasn't adjusted? 64 | - What is the difference between Hard Fork and Soft Fork? Is it possible to do hard fork of Bitcoin, without creating a new coin/network, at current stage of the market? 65 | 66 | ## Bonus Questions 67 | - How are soft forks are activated in Bitcoin? What was the last soft fork that happened? 68 | - What is "Rough Consensus"? How does it affect Bitcoin's development? 69 | - When was the last Bitcoin hardfork? What caused it? 70 | 71 | -------------- 72 | 73 | # Week 7 74 | ## GD Questions 75 | - Why does the author say securing bitcoins is like securing cash or a chunk of precious metal? 76 | - What could be the consequences of applying centralised security models to a decentralised network like Bitcoin? 77 | - Explain the concept of root of trust in security models. What should be the root of trust for Bitcoin applications? 78 | - Why are hardware siging devices the most recommended way of storing Bitcoin? 79 | - What are payment channels in context to Bitcoin? How do they facilitate extremely high transaction throughput? 80 | - Can a Bitcoin transaction be cancelled? Explain asymmetric revocable transactions. 81 | - What is a HTLC? Which OP-code is used to achieve it in context to payment channels? 82 | - Explain what are funding and commitment transactions in context of payment channels. 83 | 84 | ## Bonus Questions 85 | - What could be the consequences of using unnecessarily complex techniques to secure bitcoins? 86 | - Explain at least two use-cases of applications build on top of Bitcoin. 87 | - Can a Bitcoin transaction be cancelled? Explain asymmetric revocable transactions. 88 | 89 | 90 | -------------------------------------------------------------------------------- /questions-5th-ed.md: -------------------------------------------------------------------------------- 1 | # Week 1 2 | ## GD Questions 3 | - What were the major problems of Digital Currencies before Bitcoin? How did Bitcoin 4 | solve them? 5 | - Do you think it would be better if bitcoin transactions were reversible? What are the 6 | potential benefits and drawbacks? 7 | - What is the Bitcoin Issuance Rate? How do we know the supply cap of Bitcoin is 21 million? 8 | - Is Bitcoin private? Does Bitcoin need to be private? Why isn't Bitcoin fungible? 9 | - What is a transaction fee? How is it calculated? What's the effect of transaction fee on transaction confirmation? 10 | - What are change addresses? When are change addresses required? What happens if the user (or wallet software) forgets to include the change address in a transaction? When will we not require a change address? 11 | - What does it mean by a transaction to be "confirmed"? How many confirmation is usually acceptable? Is it okay to accept unconfirmed transactions? Why or why not? 12 | - Why did Satoshi said transactions are "chain of digital signatures"? What is a UTXO? Whats the difference between UTXO and Account based model? Why did Bitcoin choose to stick with UTXO model? 13 | 14 | ## Bonus Questions 15 | - Do you believe Bitcoin needs to compete with Visa/MasterCard to succeed? Why or why 16 | not? 17 | - What are the two main components of a Transaction? What does each component 18 | include? 19 | - What is the lowest denomination of Bitcoin? Can we run out of decimals to denominate 20 | the smallest unit, as Bitcoin adoption increases? 21 | 22 | -------------- 23 | # Week 2 24 | ## GD Questions 25 | 26 | - Why is Bitcoin Core called a "Reference Implementation"? What other implementations of Bitcoin are out there? Is it preferable to have many implementations of Bitcoin? 27 | - What are BIPs (Bitcoin Improvement Proposals)? What are their role in the Bitcoin development process? 28 | - What is bitcoin-cli? What is it used for? Have you explored any bitcoin-cli commands? Which commands do you find most useful as a home node operator? 29 | - Describe the functions of ‘private keys’, ‘public keys’, ‘Bitcoin addresses’, and ‘digital signatures’. What is the mathematical relationship between them and how are they used in Bitcoin? 30 | - What is the discrete logarithm problem, and why is it considered hard to solve? 31 | - What is asymmetry in cryptography, and why are one-way functions useful? Identify a one-way cryptographic function used in deriving public keys from private keys. 32 | - Describe instances where private keys have been compromised due to lack of entropy. Why is it important to use a cryptographically secure pseudorandom number generator to produce a private key? What are some techniques of generating pseudo random numbers? 33 | - What are the different kinds of Bitcoin addresses? Explain the differences between P2PKH and P2SH. 34 | - What is the difference between a hot wallet and cold storage? 35 | - What is bech32? How is it better than base58? Are there any problems in bech32? How are they solved? 36 | 37 | ## Bonus Questions 38 | - What is the approximate disk space requirement for running Bitcoin Core? What are the approximate network bandwidth and memory requirements? Do you think it's "cheap" to run a node? 39 | - How can you verify the signatures of download binaries of Bitcoin Core? What are the potential damages of running a malicious version of the software? 40 | - What hash functions are used in the generation of Bitcoin addresses? 41 | 42 | -------------- 43 | 44 | # Week 3 45 | ## GD Questions 46 | - What is a Bitcoin wallet? What are the different types of wallets available? 47 | - What is the difference between deterministic and non-deterministic wallets? 48 | - What is a "seed" in the context of Bitcoin wallets? How are mnemonic words generated from the seed? 49 | - What is the optional passphrase for a mnemonic? In which situations passphrase can be useful? 50 | - What are the components of an extended key (XPub)? What is the fingerprint of a key? 51 | - What are hardened and non-hardened derivations? What are the advantages of having different types of derivations? 52 | - What are the different components of a Bitcoin transaction? What are transaction inputs and outputs, and how are they constructed? What are locking and unlocking scripts? 53 | - What are various sources of transaction malleability? How does segwit fix transaction malleability? What parts of the transaction structure got affected with the segwit upgrade? 54 | 55 | ## Bonus Questions 56 | - What is nSequence? What was it intended use when Satoshi created Bitcoin? How is it used today? 57 | - What are various sources of transaction malleability? How does segwit fix transaction malleability? 58 | - Can two transactions have the same transaction id? When can this happen? Is that a consensus violation? 59 | -------------- 60 | 61 | # Week 4 62 | ## GD Questions 63 | - Is the Turing incompleteness of Bitcoin's scripting language (SCRIPT) a feature or a deficiency? 64 | - Explain different types of timelocks available in a Bitcoin transaction and list the components of the transactions that can be used to set these timelocks. 65 | - How does Taproot upgrade increase security and privacy in Bitcoin? 66 | - Highlight the differences between Tapscript and native Bitcoin script? 67 | - What are digital signatures, where are they placed in a transaction, and what is their purpose? 68 | - What are sighashes, and what are their uses? How many types of sighashes are there? 69 | - What is the Discrete Log Problem, and why is it important in Cryptography? What does it mean when we say "DLP is hard"? What would have happened if DLP wasn't a "hard" problem? 70 | - Why is it important to use a random number (k) as the basis for a private/public nonce pair? What vulnerabilities can be exploited if k is known to be reused? Can you provide a real-life example of when such an exploit occurred? 71 | 72 | ## Bonus Questions 73 | - Why is the public key directly included in a P2TR output whereas in other script types we always include a hash? 74 | - Why are the locking and unlocking scripts executed separately? 75 | - Besides signing transactions, what other uses could digital signatures have? 76 | 77 | 78 | -------------- 79 | 80 | # Week 5 81 | ## GD Questions 82 | - Why do we need to pay transaction fees when we have block reward as an incentive? Is there a minimum fee that every transaction needs to pay? Is it a consensus rule or policy rule? 83 | - What is RBF. When is it useful? List all the conditions required to do a valid RBF. 84 | - What is CPFP (Child Pays For Parents)? When is it useful? In which situation RBF cannot be used, but CPFP can be used? 85 | - What is transaction pinning? How is it a vulnerability for multiparty time-sensitive protocols such as LN? 86 | - What is a peer-to-peer network? Give two examples of successful peer-to-peer networks that preceded Bitcoin. 87 | - Explain in brief what is a Mempool and what is an Orphan Pool. 88 | - How do light clients validate that a transaction exists? How is this different from the mechanism full archival nodes use to validate a transaction? 89 | - What are compact block filters? What data should be included in a block filter? 90 | 91 | ## Bonus Questions 92 | - What are the privacy trade-offs in using a light client? 93 | - What is fee sniping and how does it work? How can it be prevented? 94 | - What is CPFP carve out and anchor outputs? 95 | 96 | -------------- 97 | 98 | # Week 6 99 | ## GD Questions 100 | - Describe the structure of a block and what data does a block header contain? 101 | - What is a Merkle Tree? How is it used in the blockchain? What data does the Merkle Root verifies? 102 | - What is the difference between mainnet and testnet? Can testnet coins have value? 103 | - What is the difference between signet and testnet? What is regtest? When is it useful? 104 | - What is a coinbase transaction? What prevents the miners from inflating the coinbase reward? 105 | - Explain the 51% attack. Can it compromise the security of private keys and signing algorithms? 106 | - What is Mining Difficulty? How is it adjusted? What would happen if it wasn't adjusted? 107 | - What is the difference between Hard Fork and Soft Fork? Is it possible to do hard fork of Bitcoin, without creating a new coin/network, at current stage of the market? 108 | 109 | ## Bonus Questions 110 | - How are soft forks are activated in Bitcoin? What was the last soft fork that happened? 111 | - What is "Rough Consensus"? How does it affect Bitcoin's development? 112 | - When was the last Bitcoin hardfork? What caused it? 113 | 114 | -------------- 115 | 116 | # Week 7 117 | ## GD Questions 118 | - Why does the author say securing bitcoins is like securing cash or a chunk of precious metal? 119 | - What could be the consequences of applying centralised security models to a decentralised network like Bitcoin? 120 | - Explain the concept of root of trust in security models. What should be the root of trust for Bitcoin applications? 121 | - Why are hardware siging devices the most recommended way of storing Bitcoin? 122 | - What are payment channels in context to Bitcoin? How do they facilitate extremely high transaction throughput? 123 | - Can a Bitcoin transaction be cancelled? Explain asymmetric revocable transactions. 124 | - What is a HTLC? Which OP-code is used to achieve it in context to payment channels? 125 | - Explain what are funding and commitment transactions in context of payment channels. 126 | 127 | ## Bonus Questions 128 | - What could be the consequences of using unnecessarily complex techniques to secure bitcoins? 129 | - Explain at least two use-cases of applications build on top of Bitcoin. 130 | - Can a Bitcoin transaction be cancelled? Explain asymmetric revocable transactions. 131 | 132 | 133 | -------------------------------------------------------------------------------- /questions-2nd-ed.md: -------------------------------------------------------------------------------- 1 | # Mastering Bitcoin Discussion Questions 2 | 3 | This is the weekly discussion questions based on Mastering Bitcoin [2nd edition](https://github.com/bitcoinbook/bitcoinbook) by Bitshala Mastering Bitcoin Cohort, starting on 3rd Feb 2023. ([Apply](https://www.bitshala.org/mb-cohort-form)) 4 | 5 | ## Week 1 6 | ---- 7 | 8 | ### Chapter 1: Introduction 9 | 10 | - What is the difference between the bitcoin network and bitcoin as a currency? How do they interrelate? 11 | 12 | - Why doesn't bitcoin have a hierarchical network structure? What advantages or disadvantages does this bring? 13 | 14 | - What is the double-spend problem, and how did bitcoin solve it? Discuss the technical mechanisms involved. 15 | 16 | - What kind of privacy exists for transactions on a public ledger like bitcoin? What measures are taken to protect users' identities? 17 | 18 | - What determines the rate of inflation in bitcoin? How is this mechanism different from traditional currencies? 19 | 20 | - Do you think it would be better if bitcoin transactions were reversible? Discuss the potential benefits and drawbacks. 21 | 22 | - Do you believe that bitcoin needs to be competitive with Visa/MasterCard to succeed? Why or why not? 23 | 24 | ### Chapter 2: How Bitcoin Works 25 | 26 | #### Transactions 27 | 28 | - What is the smallest unit of Bitcoin? How many of those units make 1 Bitcoin? Can we subdivide the smallest unit into even smaller chunks if the need arise? 29 | 30 | - What information does the receiver need to provide to receive bitcoin from the sender? 31 | 32 | - What basic information do you need to construct a bitcoin transaction? 33 | 34 | - Why are transactions called a "chain of digital signatures"? Explain how spending a coin extends the "chain of digital signatures." 35 | 36 | - What is the status of a transaction that has not yet been included in a block but has been propagated around the network? 37 | 38 | #### Wallets 39 | 40 | - What is a transaction fee, and why is it required? How is it calculated? 41 | 42 | - What is change in a bitcoin transaction? When is change needed, and when should it be included or excluded? 43 | 44 | #### Blockchain and Mining 45 | 46 | - What is Proof of Work mining, and why is it compared to a "needle in a haystack" problem of random draws? 47 | 48 | - What is a mining pool, and why would a miner choose to join one? 49 | 50 | - What is a blockchain reorganization (reorg), and how does it occur? 51 | 52 | - How does the network decide which of two blocks at the same height to add to the chain? 53 | 54 | - What is difficulty adjustment in bitcoin mining, and why is it necessary? 55 | 56 | - Why do some services require six confirmations before clearing funds? 57 | 58 | ## Week 2 59 | ---- 60 | 61 | ### Chapter 3: Bitcoin Core 62 | 63 | - Why is Bitcoin Core referred to as the reference implementation? Are there other widely used implementations? 64 | 65 | - Run the unit test suite of Bitcoin Core and see if everything passes. What does this tell you about the software? 66 | 67 | - What are Bitcoin Improvement Proposals (BIPs), and what role do they play in determining the Bitcoin protocol? 68 | 69 | - Why should you run your own full node? Discuss the benefits and challenges. 70 | 71 | - What is the difference between a pruned node and a full (archival) node? 72 | 73 | #### bitcoind Configurations 74 | 75 | - What are some major configuration options in Bitcoin Core? Provide examples and their significance. 76 | 77 | #### bitcoin-cli RPC 78 | 79 | - What is bitcoin-cli, and what purposes does it serve? 80 | 81 | - List a few of the most important RPC commands you would use as a node operator. Explain their uses. 82 | 83 | - What kind of network information can you fetch using RPC? Refer to Clark Moody's Dashboard as a resource. 84 | 85 | #### Transactions 86 | 87 | - Describe the structure of a bitcoin transaction. What are the fields, and what does each field imply? 88 | 89 | #### Blocks 90 | 91 | - Describe the structure of a Bitcoin block header. What are the fields, and what does each field imply? 92 | 93 | ### Chapter 4: Keys, Addresses 94 | 95 | #### Elliptic Curves 96 | 97 | - Provide a brief history of public key cryptography. Refer to the Diffie-Hellman paper as a resource. 98 | 99 | - Describe the functions of private keys, public keys, Bitcoin addresses, and digital signatures. What is the mathematical relationship between them, and how are they used in Bitcoin? 100 | 101 | - What is the discrete logarithm problem, and why is it considered hard to solve? 102 | 103 | - What is asymmetry in cryptography, and why are one-way functions useful? Identify a one-way cryptographic function used in deriving public keys from private keys. 104 | 105 | - Describe instances where private keys have been compromised due to lack of entropy. Why is it important to use a cryptographically secure pseudorandom number generator to produce a private key? 106 | 107 | - What is secp256k1, and what are the curve constants used in Bitcoin? 108 | 109 | #### Address 110 | 111 | - What is a Bitcoin address, and why are addresses used instead of raw public keys? 112 | 113 | - What hash functions are used in the generation of Bitcoin addresses? 114 | 115 | - Why is Base58 used for Bitcoin addresses instead of Base64? Would you make any modifications beyond Base58? 116 | 117 | - What are the different private key formats used by wallets? 118 | 119 | - What are compressed public keys, and what are the benefits of compressing a public key? 120 | 121 | - What are the different kinds of Bitcoin addresses? Explain the differences between P2PKH and P2SH. 122 | 123 | - What is the difference between a hot wallet and cold storage? 124 | 125 | ## Week 3 126 | --- 127 | 128 | ### Chapter 5: Wallets 129 | 130 | - Why does address reuse reduce privacy in Bitcoin? Can you think of other de-anonymizing missteps that might occur due to poor user experience design or lack of privacy education? 131 | 132 | #### Wallet Types 133 | 134 | - What is a Bitcoin wallet? What are the different types of wallets available? 135 | 136 | - What is the difference between deterministic and non-deterministic wallets? 137 | 138 | - Why does the author argue that BIP32 wallets are superior? 139 | 140 | #### Seed and Mnemonic 141 | 142 | - What is a "seed" in the context of Bitcoin wallets? How are mnemonic words generated from the seed? 143 | 144 | - What is the optional passphrase for a mnemonic code? Discuss its potential advantages and disadvantages. 145 | 146 | #### Extended Keys 147 | 148 | - What are XPubs, XPrivs, and Chaincode? 149 | 150 | - What are the components of an extended key? What is the fingerprint of a key? 151 | 152 | - What are hardened and non-hardened derivations? Why is there a distinction, and what are the advantages of different kinds of derivations? 153 | 154 | - Why is a brainwallet not secure, while mnemonic code words are? 155 | 156 | ### Chapter 6: Transactions 157 | 158 | #### Transaction Structure 159 | 160 | - What is a Bitcoin transaction, and how is it constructed? 161 | 162 | - What are the different components of a Bitcoin transaction? 163 | 164 | - What is a coinbase transaction, how are they created, and why are they important? 165 | 166 | - What are UTXOs (Unspent Transaction Outputs), and how is the balance of a wallet calculated? 167 | 168 | #### Digital Signatures 169 | 170 | - What are digital signatures, where are they placed in a transaction, and what is their purpose? 171 | 172 | - Describe some real-life exploits that occurred due to poor randomness in digital signatures. 173 | 174 | - Besides signing transactions, what other uses could digital signatures have? 175 | 176 | #### Transaction Validation 177 | 178 | - What are transaction inputs, and how are they constructed? What are unlocking scripts? 179 | 180 | - Is the Turing incompleteness of Bitcoin's scripting language (SCRIPT) a feature or a deficiency? 181 | 182 | - What is the difference between a locking script (scriptPubKey) and an unlocking script (scriptSig)? What is the difference between a redeem script and a witness script? 183 | 184 | - Why are the locking and unlocking scripts executed separately? 185 | 186 | - What are sighashes, and what are their uses? How many types of sighashes are there? 187 | 188 | ## Week 4 189 | --- 190 | 191 | ### Chapter 7: Advanced Transactions and Scripting 192 | 193 | - What are some advanced scripting methods possible using Bitcoin scripts? What is not possible? 194 | 195 | - What are multisig scripts, and how can they be useful? 196 | 197 | - What was the bug in multisig script execution, and why can't we just fix it? 198 | 199 | - What is Pay-to-Script-Hash (P2SH), and why was it introduced? What problem does it solve? 200 | 201 | - What is OP_RETURN, and do you think non-transactional OP_RETURN data should be allowed in the Bitcoin blockchain? 202 | 203 | - What is a transaction lock time? What are the different kinds of time locks available in Bitcoin scripts? 204 | 205 | - Time locks (nLockTime) are used to lock funds until a certain time or block height after which they are valid. Is it possible to invalidate transactions after a certain time or block height? 206 | 207 | ### Chapter 8: The Bitcoin Network 208 | 209 | - Do SPV (Simplified Payment Verification) nodes help or hurt the network? 210 | 211 | - How many nodes are on the Bitcoin network today? Why is this number significant? 212 | 213 | - The Bitcoin Relay Network section describes multiple projects intended to reduce block propagation latency. Why is so much effort being put into this? 214 | 215 | - How do new nodes discover peers on the network? 216 | 217 | - What are the privacy concerns of using an SPV node? 218 | 219 | - What is TOR, and how does it provide privacy for Bitcoin users? 220 | 221 | - What happened to the original proposal to add peer-to-peer encryption (BIP150/151)? 222 | 223 | ## Week 5 224 | --- 225 | 226 | ### Chapter 9: The Bitcoin Blockchain 227 | 228 | - The genesis block contains a hidden message within it. What opcode is used for this, and what are some other examples of this opcode being used? Do you think superfluous data should be allowed in the blockchain? 229 | 230 | - How much data would be required to calculate a Merkle path for a tree with four transactions? 231 | 232 | - What is Signet, and how is it different from Testnet and Regtest? 233 | 234 | - Bloom filters have some problems. How are block filters better? 235 | 236 | ### Chapter 10: Mining and Consensus 237 | 238 | - How does mining solve the Byzantine Generals Problem? 239 | 240 | - What happens to a transaction that isn't validated by your node? 241 | 242 | - What happens if a miner tries to pay itself a higher subsidy than allowed? 243 | 244 | - In 2016, there was approximately 3 EH/sec of processing power. Today, there are 150 EH/sec. What is the right threshold for securing the network? Can you have too much security? 245 | 246 | - Under what circumstances would a node receive an orphan block? Why wouldn't it be discarded if its parent -------------------------------------------------------------------------------- /questions-3rd-ed.md: -------------------------------------------------------------------------------- 1 | # Week 1 2 | 3 | ## Chapter 1: Introduction 4 | 5 | - What were the major problems of Digital Currencies before Bitcoin? How did Bitcoin solve them? 6 | - What are the major components of the Bitcoin System? What does it mean by "consensus rules"? 7 | - What are the different types of Bitcoin Wallets? Which one among them is most and least secured? 8 | - What are the different types of Bitcoin Nodes? What are the tradeoffs between them? When is it applicable to use a "light node"? 9 | - Do you think it would be better if bitcoin transactions were reversible? What are the potential benefits and drawbacks? 10 | - Do you believe Bitcoin needs to compete with Visa/MasterCard to succeed? Why or why not? 11 | - What is the Bitcoin Issuance Rate? How do we know the supply cap of Bitcoin is 21 million? 12 | - Is Bitcoin private? Does Bitcoin need to be private? Why isn't Bitcoin fungible? 13 | 14 | 15 | ## Chapter 2: How Bitcoin Works 16 | 17 | - What is transaction fee? How is it calculated? Whats the effect of transaction fee on transaction confirmation? 18 | - What are the two main components of a Transaction? What does each component include? 19 | - What are change addresses? When are change addresses required? What happens if the user (or wallet sofwtware) forgets to include the change address in a transaction? When will we not require a change address? 20 | - What does coinselection mean? Can you name few popular coinselection algorithms? Is it better to manually select coins or let the wallet software automatically handle it? 21 | - How is Proof of Work mining similar to "needle in haystack" problem? What happens when two blocks are mined by different miners at the same height, how does the network decide which is the "right" block? 22 | - What does it mean by a transaction to be "confirmed"? How many confirmation is usually acceptable? Is it okay to accept unconfirmed transactions? Why or why not? 23 | - What is the lowest denomination of Bitcoin? Can we run out of decimals to denominate the smallest unit, as Bitcoin adoption increases? 24 | - Why did Satoshi said transactions are "chain of digital signatures"? What is a UTXO? Whats the difference between UTXO and Account based model? Why did Bitcoin choose to stick with UTXO model? 25 | 26 | 27 | 28 | -------------- 29 | 30 | 31 | # Week 2 32 | 33 | ## Chapter 3: Bitcoin Core 34 | 35 | - Why is Bitcoin Core called a "Reference Implementation"? What other implementations of Bitcoin are out there? Is it preferable to have many implementations of Bitcoin? 36 | - What are BIPs (Bitcoin Improvement Proposals)? What are their role in the Bitcoin development process? 37 | - What are the few major configuration options in Bitcoin Core? As a home node operator, which one do you think is most useful? 38 | - What is `txindex`? When would a node operator use this configuration flag? What are the overheads of turning this configuration on? 39 | - What is `bitcoin-cli`? What is it used for? Have you explored any `bitcoin-cli` commands? Which commands do you find most useful as a home node operator? 40 | - What is the approximate disk space requirement for running Bitcoin Core? What are the approximate network bandwidth and memory requirements? Do you think it's "cheap" to run a node? 41 | - What are commands you would use sequentially to get the fully deserialized coinbase transaction of the Block 100, using `bitcoin-cli`? 42 | - How can you verify the signatures of download binaries of Bitcoin Core? What are the potential damages of running a malicious version of the software? 43 | 44 | 45 | ## Chapter 4: Keys and Addresses 46 | 47 | ### Elliptic Curves 48 | 49 | - Describe the functions of ‘private keys’, ‘public keys’, ‘Bitcoin addresses’, and ‘digital signatures’. What is the mathematical relationship between them and how are they used in Bitcoin? 50 | 51 | - What is the discrete logarithm problem, and why is it considered hard to solve? 52 | 53 | - What is asymmetry in cryptography, and why are one-way functions useful? Identify a one-way cryptographic function used in deriving public keys from private keys. 54 | 55 | - Describe instances where private keys have been compromised due to lack of entropy. Why is it important to use a cryptographically secure pseudorandom number generator to produce a private key? What are some techniques of generating pseudo random numbers? 56 | 57 | - What is secp256k1, and what are the curve constants used in Bitcoin? How is ECDSA malleable? 58 | 59 | ### Address 60 | 61 | - What is a Bitcoin address, and why are addresses used instead of raw public keys? 62 | 63 | - What hash functions are used in the generation of Bitcoin addresses? 64 | 65 | - Why is Base58 used for Bitcoin addresses instead of Base64? Would you make any modifications beyond Base58? 66 | 67 | - What are the different private key formats used by wallets? 68 | 69 | - What are compressed public keys, and what are the benefits of compressing a public key? 70 | 71 | - What are the different kinds of Bitcoin addresses? Explain the differences between P2PKH and P2SH. 72 | 73 | - What is the difference between a hot wallet and cold storage? 74 | 75 | - What is bech32? How is it better than base58? Are there any problems in bech32? How are they solved? 76 | 77 | -------------- 78 | 79 | # Week 3 80 | 81 | ## Chapter 5: Wallet Recovery 82 | 83 | - Why does address reuse reduce privacy in Bitcoin? Can you think of other de-anonymizing missteps that might occur due to poor user experience design or lack of privacy education? What institutes perform the most address reuse? 84 | 85 | #### Wallet Types 86 | 87 | - What is a Bitcoin wallet? What are the different types of wallets available? 88 | 89 | - What is the difference between deterministic and non-deterministic wallets? 90 | 91 | - Why does the author argue that BIP32 wallets are superior? 92 | 93 | #### Seed and Mnemonic 94 | 95 | - What is a "seed" in the context of Bitcoin wallets? How are mnemonic words generated from the seed? 96 | 97 | - What is the optional passphrase for a mnemonic code? Discuss its potential advantages and disadvantages. 98 | 99 | #### Extended Keys 100 | 101 | - What are XPubs, XPrivs, and Chaincode? 102 | 103 | - What are the components of an extended key? What is the fingerprint of a key? 104 | 105 | - What are hardened and non-hardened derivations? Why is there a distinction, and what are the advantages of different kinds of derivations? 106 | 107 | - Why is a brainwallet not secure, while mnemonic code words are? 108 | 109 | 110 | ## Chapter 6: Transactions 111 | 112 | ### Transaction Structure 113 | 114 | - What are the different components of a Bitcoin transaction? 115 | 116 | - What parts of the transaction structure got affected with the segwit upgrade? Were there any new fields added to the transaction structure? 117 | 118 | - What is a coinbase transaction, how are they created, and why are they important? 119 | 120 | - Compare a coinbase transaction to a normal bitcoin transaction and highlight the differences between the two. 121 | 122 | - What are UTXOs (Unspent Transaction Outputs), and how is the balance of a wallet calculated? 123 | 124 | - Explain transaction weight and virtual bytes? How are they calculated? 125 | 126 | - What is witness marker and witness flag? How is it necessary? 127 | 128 | - What is nSequence? What was it intented use when Satoshi created Bitcoin? How is it used today? 129 | 130 | - What are various sources of transaction malleability? How does segwit fix transaction malleability? 131 | 132 | - Can two transactions have the same transaction id? What happens to the UTXOs in those two transactions in that case? 133 | 134 | - How is legacy serialization different from serialization after segwit upgrade? Highlight key differences. 135 | 136 | - What are transaction inputs, and how are they constructed? What are unlocking scripts? 137 | 138 | # Week 4 139 | 140 | ## Chapter 7: Authorization and Authentication 141 | 142 | - Is the Turing incompleteness of Bitcoin's scripting language (SCRIPT) a feature or a deficiency? 143 | 144 | - What is the difference between a locking script (scriptPubKey) and an unlocking script (scriptSig)? What is the difference between a redeem script and a witness script? 145 | 146 | - Why are the locking and unlocking scripts executed separately? 147 | 148 | - Explain different types of timelocks which you can have and list the components of the transactions that can be used to set timelocks. 149 | 150 | - What are the different ways to create contracts in the script? Briefly highlight pros and cons of each. 151 | 152 | - Why is the public key directly included in a P2TR output whereas in other script types we always include a hash? 153 | 154 | - Why is the Merkle path length limited to 128? 155 | 156 | - How does Taproot upgrade increase security and privacy in Bitcoin? 157 | 158 | - Highlight the differences between Tapscript and native Bitcoin script? 159 | 160 | 161 | ## Chapter 8: Digital Signature 162 | 163 | - What are sighashes, and what are their uses? How many types of sighashes are there? 164 | 165 | - What are digital signatures, where are they placed in a transaction, and what is their purpose? 166 | 167 | - Describe some real-life exploits that occurred due to poor randomness in digital signatures. 168 | 169 | - Besides signing transactions, what other uses could digital signatures have? 170 | 171 | - How does batch verification works in Schnorr signatures? 172 | 173 | - What are the difference in serialisation of Schnorr signatures and ECDSA signatures? 174 | 175 | - What is the quadratic sighash problem? How does segwit's new signing algorithm addresses it? 176 | 177 | - What is the Discrete Log Problem, and why is it important in Cryptography? What does it mean when we say "DLP is hard"? What would have happened if DLP wasn't a "hard" problem? 178 | 179 | - Why is it important to use a random number (k) as the basis for a private/public nonce pair? What vulnerabilities can be exploited if k is known to be reused? Can you provide a real-life example of when such an exploit occurred? 180 | 181 | - How are ECDSA signature malleable? Does this malleability also occur in Schnorr signatures? Is there a way to fix this malleability? 182 | 183 | - Explain the key difference between scriptless multisignature and scriptless threshhold signatures. Are they both possible in Bitcoin? If yes, then briefly discuss the different protocols for the same. 184 | 185 | -------------- 186 | 187 | # Week 5 188 | 189 | ## Chapter 9: Transaction Fess 190 | 191 | - Why do we need to pay transaction fees when we have block reward as an incentive? Is there a minimum fee that every transaction needs to pay? Is it a consensus rule or policy rule? 192 | 193 | - What are the different fee estimation algorithms? Briefly discuss the internal workings of each. 194 | 195 | - What are the RBF rules for fee-bumping a transaction? Which rules are important to protect against DoS attacks? 196 | 197 | - What is transaction pinning? How is it a vulnerability for multiparty time-sensitive protocols such as LN? 198 | 199 | - What is fee sniping and how does it work? How can it be prevented? 200 | 201 | - Explain CPFP carve out and anchor outputs. 202 | 203 | ## Chapter 10: The Bitcoin Network 204 | 205 | - What is a peer-to-peer network? Give two examples of successful peer-to-peer networks that preceded Bitcoin. 206 | - What is a block finding race? How does compact block relay prevent it? 207 | - How does a new node discover other Bitcoin nodes on the network in order to participate? 208 | - How do light weight clients validate that a transaction exists? How is this different from the mechanism full archival nodes use to validate a transaction? 209 | - What are bloom filters? How do they work? 210 | - What are compact block filters? What data should be included in a block filter? 211 | - What are the privacy trade-offs in using a light weight client? 212 | - Explain in brief what is a Mempool and what is an Orphan Pool. 213 | -------------- 214 | 215 | # Week 6 216 | 217 | ## Chapter 11: The Blockchain 218 | 219 | - How is the Bitcoin blockchain analogous to layers in a geological formation? 220 | - Describe the structure of a block and what data does a block header contain? 221 | - What are the two identifiers of a Block? Discuss each in brief. 222 | - What is a Merkle Tree and what significance does it have in the Blockchain? 223 | - What is a design flaw in the Merkle Tree used in Bitcoin? 224 | - What is a Light Client in context to Bitcoin? How do Light Clients verify transactions associated to their addresses? 225 | - Explain mainnet and testnet in brief. Can testned coins have value? 226 | - Explain signet and regtest in brief. When would you use regtest for testing, and when Signet? 227 | 228 | 229 | ## Chapter 12: Mining and Consensus 230 | 231 | - What are the goals of Bitcoin mining and what are the incentives for the miners? 232 | - Explain in brief how does the Bitcoin network attain emergent decentralised consensus. 233 | - What is a coin-base transaction? What prevents the miners from inflating the coin-base reward? 234 | - What is Mining Difficulty? Why and how is it adjusted? 235 | - Explain the 51% attack. Can it compromise the security of private keys and signing algorithms? 236 | - What factors could cause a change in Bitcoin’s consensus rules? How is a change in consensus rules achieved in a decentralised network like Bitcoin? 237 | - Define a Hard fork and explain whether a new software implementation of the consensus rules is a pre-requisite for it. 238 | - Explain a soft fork. What are some common criticisms of a soft fork? 239 | 240 | -------------- 241 | 242 | # Week 7 243 | 244 | ## Chapter 13: Bitcoin Security 245 | 246 | - Why does the author say securing bitcoins is like securing cash or a chunk of precious metal? 247 | - What could be the consequences of applying centralised security models to a decentralised network like Bitcoin? 248 | - Explain the concept of root of trust in security models. What should be the root of trust for Bitcoin applications? 249 | - How is physical storage of Bitcoin keys one of the most effective methods of securing bitcoins? 250 | - How do hardware signing devices secure bitcoins? 251 | - What could be the consequences of using unnecessarily complex techniques to secure bitcoins? 252 | - What is the importance of using diverse storing mechanisms for bitcoin? 253 | - What is a multi-sig address? In what situation is it advisable to share confidential information about your bitcoin keys with a trusted person? 254 | 255 | ## Chapter 14: Second-Layer Applications 256 | 257 | 258 | -------------- 259 | 260 | - Mention and explain three primitives that Bitcoin guarantees for applications built on top of it. 261 | - Explain at least two use-cases of applications build on top of Bitcoin. 262 | - What are payment channels in context to Bitcoin? How do they facilitate extremely high transaction throughput? 263 | - Explain what are funding and commitment transactions in context of payment channels. 264 | - What is a uni-directional payment channel? Give an example. 265 | - What is a bi-directional payment channel? Give an example. 266 | - Can a Bitcoin transaction be cancelled? Explain asymmetric revocable transactions. 267 | - What is a HTLC? Which OP-code is used to achieve it in context to payment channels? 268 | --------------------------------------------------------------------------------