
Mastering Bitcoin

Utreexo,
David A. Harding • Mastering Bitcoin
In addition to one or more outputs that pay the receiver of bitcoins, many transactions will also include an output that pays the spender of the bitcoins, called a change output. This is because transaction inputs, like currency notes, cannot be partly spent.
David A. Harding • Mastering Bitcoin
the original Bitcoin whitepaper describes a system where bitcoins were received to public keys (pubkeys) and spent with signatures (sigs). The public key defined who was authorized to spend the bitcoins (whoever controlled the corresponding private key) and the signature provided authentication that the spending transaction came from someone who
... See moreDavid A. Harding • Mastering Bitcoin
An alternative approach to segwit was described in late 2015. This would use a backward-compatible change to the consensus rules, called a soft fork. Backward compatible means that full nodes implementing the change must not accept any blocks that full nodes without the change would consider invalid. As long as they obey that rule, newer full nodes
... See moreDavid A. Harding • Mastering Bitcoin
Figure 7-3. Evaluating a script for a P2PKH transaction (part 1 of 2). Figure 7-4. Evaluating a script for a…
Some highlights have been hidden or truncated due to export limits.
David A. Harding • Mastering Bitcoin
At approximately block 1,411,200, which is expected to be produced around the year 2035, 99% of all bitcoins that will ever exist will have been issued. Due to Bitcoin’s diminishing rate of issuance, over the long term, the Bitcoin currency is deflationary.
David A. Harding • Mastering Bitcoin
Multisignature scripts set a condition where k public keys are recorded in the script and at least t of those must provide signatures to spend the funds, called t-of-k. For example, a 2-of-3 multisignature is one where three public keys are listed as potential signers and at least two of those…
Some highlights have been hidden or truncated due to
David A. Harding • Mastering Bitcoin
as of early 2023, all Bitcoin miners combined execute about 280 hash functions every hour. They run a different hash function than HASH160, so their existing hardware can’t create collision attacks for it, but the existence of the Bitcoin network proves that collision attacks against 160-bit functions like HASH160 are practical. Bitcoin miners have
... See moreDavid A. Harding • Mastering Bitcoin
Each Bitcoin block is limited in the amount of transaction data it can contain, so most Bitcoin software needs to be able to measure the transactions it creates or processes. The modern unit of measurement for Bitcoin is called weight. An alternative version of weight is vbytes, where four units of weight equal one vbyte, providing an…
Some