1
Mastering Blockchain
Third Edition
Chapter 7, Bitcoin Network and Payments
Outline 2
• The Bitcoin network
• Clients
• Discovery
• Wallets
• Bitcoin payments
• Innovation in Bitcoin
Nodes 3
• Node types
• Full nodes
• SPV (Simple Payment Verification)
• Pool protocols
• Stratum
Bitcoin network 4
A Bitcoin network is identified by its magic value. Magic values are used
to indicate the message's origin network.
Network Magic value (in hex)
main 0xD9B4BEF9
testnet 0xDAB5BFFA
testnet3 0x0709110B
Protocol messages 5
This shows the Bitcoin block synchronization process between
two nodes on the Bitcoin network.
• Version • Tx
• Verack • Block
• Inv • Headers
• Getdata • Getaddr
• Getblocks • Addr
• Getheaders • Ping
• Pong
Bloom filters 6
A Bloom filter is a data structure which is used to find out whether an element is present in a
set.
• Bloom filters are quick and memory efficient. Due to efficiency requirements they are
probabilistic in nature.
• Bloom filters provide probabilistic lookup with false positives but no false negatives.
• fnv, murmur, and Jenkins are commonly used hash functions in bloom filters due to their
speed and uniformity.
• Used in SPV Bitcoin clients.
• Bitcoin Improvement Proposal 37, implemented in Bitcoin as BIP37, introduced three new
message types : filterload, filteradd and filterclear.
Wallets 7
• Non-deterministic wallets
• Deterministic wallets
• Hierarchical deterministic wallets
• Brain wallets
• Paper wallets
• Hardware wallets
• Online wallets
• Mobile wallets
Bitcoin payments 8
Bitcoin can be accepted as payment
using various techniques.
Bitcoin is not recognized as a legal Bitcoin payment sign, usually used at stores
currency in many jurisdictions, but it is where Bitcoin payments are accepted
increasingly being accepted as a
payment method by many online
merchants and e-commerce websites.
Point of sale terminal
Innovation in Bitcoin 9
• Bitcoin Improvement Proposals (BIPs)
• Standard BIP
• Process BIP
• Informational BIP
• Advanced protocols
• SegWit
• Bitcoin Cash
• Bitcoin Unlimited
• Bitcoin Gold
10
Exercise
• Consider how a Bitcoin ATM could be designed.
Summary 11
In this presentation, we explored:
• The Bitcoin network
• Bitcoin node discovery
• Block synchronization protocols
• Network messages
• Bitcoin wallets
• Bitcoin payments and payment processors
• BIPs
• Advanced Bitcoin protocols