- Browse
- » Grokking Bitcoin
Grokking Bitcoin
Author
Publisher
Manning Publications
Publication Date
2019.
Edition
1st edition.
Language
English
Description
Loading Description...
Table of Contents
From the eBook - 1st edition.
Machine generated contents note: 1. Introduction to Bitcoin
What is Bitcoin?
The big picture
Step 1 Transactions
Step 2 The Bitcoin network
Step 3 The blockchain
Step 4 Wallets
Problems with money today
Segregation
Privacy issues
Inflation
Borders
The Bitcoin approach
Decentralized
Limited supply
Borderless
How is Bitcoin used?
Savings
Cross-border payments
Shopping
Speculation
Noncurrency uses
How is Bitcoin valued?
When not to use Bitcoin
Other cryptocurrencies
2. Cryptographic hash functions and digital signatures
The cookie token spreadsheet
Cryptographic hashes
Why are cryptographic hash functions useful?
How does a cryptographic hash function work?
Properties of a cryptographic hash function
Illustration of "hard"
Some well-known hash functions
Exercises
Digital signatures
Typical use of digital signatures
Improving cookie token security
Note continued: Preparation: John generates a key pair
John signs his payment
Lisa verifies the signature
Private key security
3. Addresses
Cookie-eating habits disclosed
Replacing names with public keys
New payment process
Shortening the public key
Hashing the public key to 20 bytes
Why SHA256 and RIPEMD160?
Avoiding expensive typing errors
Base58check
Back to privacy
4. Wallets
First wallet version
Private key backups
A few words on password strength
Problems with password-encrypted backups
Hierarchical deterministic wallets
Deriving a master extended private key
Deriving a child extended private key
Back to backup
Mnemonic sentences
Encoding a seed into a mnemonic sentence
Decoding a mnemonic sentence into a seed
Extended public keys
Deriving hardened private keys
Public key math
Public key multiplication
Why is this secure?
Xpub derivation
Public key encoding
Note continued: 5. Transactions
Problems with the old system
Paying using a transaction
Creating the transaction
Lisa confirms the transaction
Anyone verifies the transaction
Account-based and value-based systems
Script
Why use a program?
Why signature script and pubkey script?
Fancy payment types
Multiple signatures
Pay-to-script-hash
Pay-to-script-hash addresses
More stuff in transactions
Rewards and coin creation
Transition from version 4.0
Trust in Lisa
6. The blockchain
Lisa can delete transactions
Building the blockchain
Lisa builds a block
How does this process protect you from deletes?
Why use a blockchain?
Lightweight wallets
Bloom filters obfuscate addresses
Merkle trees
Creating the merkle root
Proving that a transaction is in a block
How it really works
Security of lightweight wallets
7. Proof of work
Cloning Lisa
Block collisions
Drawing lucky numbers
Note continued: Probability of splits
Forcing honest lucky numbers
Producing a valid proof of work
Why is this good?
Comparing with lucky numbers
What if you run out of nonces?
Miners have to move out
Adding more hashrate
Problems with a high block rate
What's fixed?
Difficulty adjustments
Rules for timestamps
Chain strength vs. chain length
What harm can miners do?
Double spending
Protecting against double-spend attacks
Transaction fees
Bigger blocks are slower
But wasn't this about transaction fees?
Block size is limited
When the block subsidy is 0
8. Peer-to-peer network
The shared folder
Let's build a peer-to-peer network
How do peers talk?
The network protocol
John sends the transaction
Tom forwards the transaction
The cafe's lightweight wallet is notified
Including the transaction in a block
Notifying wallets
More confirmations
Leaving the cookie token system
Note continued: Bitcoin at a glance
Bootstrapping the network
Step 1 Run the software
Step 2 Connect to nodes
Step 3 Synchronize
Step 4 Normal operation
Running your own full node
Downloading Bitcoin Core
Verifying the software
Unpacking and starting
Initial blockchain download
9. Transactions revisited
Time-locked transactions
Time measurements
Relative time locks
Time-locked outputs
Absolute time-locked outputs
Relative time-locked outputs
Atomic swaps
Storing stuff in the Bitcoin blockchain
Bloated UTXO set
Creating a token in Bitcoin
Starting the car with proof of ownership
Replacing pending transactions
Opt-in replace-by-fee
Child pays for parent
Different signature types
10. Segregated witness
Problems solved by segwit
Transaction malleability
Inefficient signature verification
Waste of bandwidth
Script upgrades are hard
Solutions
Segwit addresses
Note continued: Spending your segwit output
Verifying the segwit transaction
Including your segwit transaction in a block
Pay-to-witness-script-hash
New hashing method for signatures
Bandwidth savings
Upgradable script
Wallet compatibility
Block limits
Block size limit
Signature operations limit
Increasing the limits
11. Bitcoin upgrades
Bitcoin forks
Nonconsensus rule changes
Hard forks
Soft forks
Differences between hard and soft forks
Transaction replay
Replay protection
Upgrade mechanisms
Using coinbase signaling
BIP16
Using incremented block version number signaling
BIP34, 66, and 65
Using block version bits signaling
BIP9
Using BIP9 to deploy relative lock time
Using BIP9 to deploy segwit
User-activated soft forks
Communicating with bitcoind
Using curl
Graphical user interface
Getting to know bitcoin-cli
Getting to work
Creating an encrypted wallet
Note continued: Backing up the wallet
Receiving money
Sending money.
Excerpt
Loading Excerpt...
Author Notes
Loading Author Notes...
More Details
Contributors
ISBN
9781617294648
Reviews from GoodReads
Loading GoodReads Reviews.