CBP Blockchain and Transaction Mechanics 2 — Questions and Answers
Question 1: What is the purpose of the nLockTime field in a Bitcoin transaction?
- It sets the maximum fee a transaction will pay
- It specifies the earliest block height or timestamp at which the transaction can be mined (Correct answer)
- It locks the UTXO for a specific public key
- It determines the minimum number of confirmations required
Correct answer: It specifies the earliest block height or timestamp at which the transaction can be mined
nLockTime specifies the earliest block height or Unix timestamp before which the transaction cannot be included in a block.
Question 2: In a Bitcoin transaction, what does the sequence number field on each input control when nLockTime is used?
- The order inputs are signed
- Whether the input opts into RBF (Replace-By-Fee) (Correct answer)
- The number of signatures required
- The fee priority of the transaction
Correct answer: Whether the input opts into RBF (Replace-By-Fee)
An input with a sequence number below 0xFFFFFFFE signals RBF opt-in and also allows nLockTime to be enforced.
Question 3: What is the maximum size of a standard Bitcoin block introduced by the SegWit upgrade (in weight units)?
- 1,000,000 weight units
- 2,000,000 weight units
- 4,000,000 weight units (Correct answer)
- 8,000,000 weight units
Correct answer: 4,000,000 weight units
SegWit replaced the 1 MB byte limit with a 4,000,000 weight unit limit, where witness data is discounted to 1/4 weight.
Question 4: Which hashing algorithm does Bitcoin use to produce a block's Proof-of-Work?
- SHA-3
- SHA-256 applied twice (double-SHA-256) (Correct answer)
- RIPEMD-160
- Scrypt
Correct answer: SHA-256 applied twice (double-SHA-256)
Bitcoin's Proof-of-Work hashes the block header using double-SHA-256 (SHA-256 applied twice) to find a hash below the target.
Question 5: What information is stored in the coinbase transaction of a Bitcoin block?
- The miner's private key
- A reference to all previous block headers
- The block reward plus fees, and an arbitrary data field (up to 100 bytes) (Correct answer)
- The Merkle root of all UTXOs
Correct answer: The block reward plus fees, and an arbitrary data field (up to 100 bytes)
The coinbase transaction creates new bitcoin (block subsidy + fees) and contains an arbitrary data field miners can use for extra nonce space or tagging.
Question 6: What does UTXO stand for in Bitcoin's transaction model?
- Unverified Transaction Exchange Output
- Unspent Transaction Output (Correct answer)
- Unified Token Exchange Order
- Unsigned Transaction eXecution Object
Correct answer: Unspent Transaction Output
UTXO stands for Unspent Transaction Output — the fundamental unit of bitcoin value that has been received but not yet spent.
Question 7: If a Bitcoin transaction consumes 3 inputs totaling 1.5 BTC and creates 2 outputs totaling 1.48 BTC, what happens to the remaining 0.02 BTC?
- It is returned to the sender automatically
- It is burned and permanently removed from circulation
- It is collected by the miner as a transaction fee (Correct answer)
- It rolls over to the next transaction
Correct answer: It is collected by the miner as a transaction fee
The difference between input value and output value in a Bitcoin transaction is implicitly claimed by the miner as the transaction fee.
What is the purpose of the nLockTime field in a Bitcoin transaction?