bitcoin network layer and information propagation · bitcoin_wp001.pdf.part : p0...
TRANSCRIPT
![Page 1: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/1.jpg)
Sergi Delgado SeguraBitcoin Network Layer and Information Propagation
sr_gi
![Page 2: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/2.jpg)
WHAT ARE WE GOING TO COVER?
Differences between client/server and peer-to-peer paradigms
How a new node joins the network
• How it learns about the network
• How others learn about it
Actors and their role in the network
The gossip protocol
Data propagation
• Transactions and blocks
• 0-conf and double-spending
Node misbehavior
Network based attacks
Network topology
![Page 3: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/3.jpg)
We will use Bitcoin as an example when explaining how certain parts of the network work. However, the same mechanisms apply to most of the existing cryptocurrencies with slight modifications (some times even without any).
Also keep in mind that for most things within cryptocurrencies there is no formal specification but the live code. Therefore some details may change in the near future.
BEFORE WE START
![Page 4: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/4.jpg)
Introduction
![Page 5: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/5.jpg)
Classic paradigm where actors are split into clients and servers
Servers:
• serve specific resources upon request
• can also provide different types of services
CLIENT-SERVER PARADIGM (1/2)
![Page 6: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/6.jpg)
Clients:
• resource/service requesters
• do not share resources or provide any service
Clients initiate the communication and need to know the server endpoint
Classical examples: WWW, DNS, Email, etc
CLIENT-SERVER PARADIGM (2/2)
![Page 7: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/7.jpg)
All actors (peers) are equal and have both client and server capabilities
Services / resources can be shared between several peers or found in a single location
Each peer can choose what to serve/request
Quite usual paradigm for distributed file sharing (e.g: BitTorrent)
Usual problems: Bootstrapping and file searching
PEER-TO-PEER (P2P) PARADIGM
![Page 8: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/8.jpg)
How do you find peers when you run a new node in the network?
P2P BOOTSTRAPPING
![Page 9: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/9.jpg)
How do you find peers when you run a new node in the network?
How do peers announce their presence in the network?
P2P BOOTSTRAPPING
![Page 10: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/10.jpg)
A
PEER DISCOVERY?
![Page 11: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/11.jpg)
A
PEER DISCOVERY?
![Page 12: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/12.jpg)
A
PEER DISCOVERY?
![Page 13: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/13.jpg)
A
Is someone there?
PEER DISCOVERY?
![Page 14: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/14.jpg)
A
PEER DISCOVERY?
![Page 15: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/15.jpg)
A **tumbleweed**
PEER DISCOVERY?
![Page 16: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/16.jpg)
A
**tumblew
eed**
PEER DISCOVERY?
![Page 17: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/17.jpg)
A **tumbleweed**
PEER DISCOVERY?
![Page 18: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/18.jpg)
A **tu
mbl
ewee
d**
PEER DISCOVERY?
![Page 19: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/19.jpg)
A **tumbleweed**
PEER DISCOVERY?
![Page 20: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/20.jpg)
A
PEER DISCOVERY?
![Page 21: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/21.jpg)
A
I need to find some peers
PEER DISCOVERY?
![Page 22: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/22.jpg)
How do you find peers when you run a new node in the network?
How do peers announce their presence in the network?
P2P BOOTSTRAPPING
![Page 23: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/23.jpg)
How do you find peers when you run a new node in the network?
How do peers announce their presence in the network?
Hardcoded trusted addresses / IRC bootstrapping / Trusted DNS seeds / etc
P2P BOOTSTRAPPING
![Page 24: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/24.jpg)
How to identify what other nodes are sharing (who knows what)?
How are files served?
P2P FILE SHARING (1/2)
![Page 25: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/25.jpg)
How to identify what other nodes are sharing (who knows what)?
How are files served?
Announce / Request
P2P FILE SHARING (1/2)
![Page 26: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/26.jpg)
Request paradigm: Files are requested by peers, so the network needs a lookup protocol to identify who knows what (e.g: DHT, trackers, etc)
Announce paradigm: Files are announced to peers, which will decide whether they would like a copy or not. No lookup protocol is required (e.g: gossip protocols)
P2P FILE SHARING (2/2)
![Page 27: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/27.jpg)
Request paradigm: Files are requested by peers, so the network needs a lookup protocol to identify who knows what (e.g: DHT, trackers, etc)
Announce paradigm: Files are announced to peers, which will decide whether they would like a copy or not. No lookup protocol is required (e.g: gossip protocols)
What paradigm do cryptocurrency networks follow?
P2P FILE SHARING (2/2)
![Page 28: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/28.jpg)
Request paradigm: Files are requested by peers, so the network needs a lookup protocol to identify who knows what (e.g: DHT, trackers, etc)
Announce paradigm: Files are announced to peers, which will decide whether they would like a copy or not. No lookup protocol is required (e.g: gossip protocols)
What paradigm do cryptocurrency networks follow? Announce
P2P FILE SHARING (2/2)
![Page 29: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/29.jpg)
A
REQUEST PARADIGM (BitTorrent)
![Page 30: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/30.jpg)
A T
Tracker
REQUEST PARADIGM (BitTorrent)
![Page 31: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/31.jpg)
• Get file information from a tracker
A T
TrackerHey, where can I find the
Bitcoin whitepaper?
REQUEST PARADIGM (BitTorrent)
![Page 32: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/32.jpg)
• Get file information from a tracker
A T
TrackerHey, where can I find the
Bitcoin whitepaper?
Check here!
bitcoin_wp.torrent
REQUEST PARADIGM (BitTorrent)
![Page 33: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/33.jpg)
• Get file information from a tracker
A
bitcoin_wp.torrent
REQUEST PARADIGM (BitTorrent)
![Page 34: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/34.jpg)
• Get file information from a tracker
• Check the .torrent file
A
bitcoin_wp.torrent
REQUEST PARADIGM (BitTorrent)
![Page 35: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/35.jpg)
• Get file information from a tracker
• Check the .torrent file
A
bitcoin_wp.torrent
bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2
… bitcoin_wp00N.pdf.part : PN
REQUEST PARADIGM (BitTorrent)
![Page 36: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/36.jpg)
• Get file information from a tracker
• Check the .torrent file
• Connect to peers and retrieve the file parts
A
bitcoin_wp.torrent
bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2
… bitcoin_wp00N.pdf.part : PN
REQUEST PARADIGM (BitTorrent)
![Page 37: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/37.jpg)
Why would a request paradigm (like the one we just saw) not work for cryptocurrency networks?
ANNOUNCE VS REQUEST
![Page 38: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/38.jpg)
Why would a request paradigm (like the one we just saw) not work for cryptocurrency networks?
New items (transactions and blocks) can be created by others, so we can’t know about them if they are not offered
ANNOUNCE VS REQUEST
![Page 39: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/39.jpg)
Why would a request paradigm (like the one we just saw) not work for cryptocurrency networks?
New items (transactions and blocks) can be created by others, so we can’t know about them if they are not offered
What information should a node know about the system?
ANNOUNCE VS REQUEST
![Page 40: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/40.jpg)
Why would a request paradigm (like the one we just saw) not work for cryptocurrency networks?
New items (transactions and blocks) can be created by others, so we can’t know about them if they are not offered
What information should a node know about the system?
A (full) node needs all the information in order to validate new items
ANNOUNCE VS REQUEST
![Page 41: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/41.jpg)
Node bootstrapping and peer discovery
![Page 42: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/42.jpg)
A
BITCOIN PEER DISCOVERY
![Page 43: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/43.jpg)
A
S0 S1 … Sn
DNS Seeds
BITCOIN PEER DISCOVERY
![Page 44: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/44.jpg)
A
S0 S1 … Sn
DNS Seeds
S0
BITCOIN PEER DISCOVERY
![Page 45: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/45.jpg)
A
S0 S1 … Sn
DNS Seeds
S0
S0
DNS Server
BITCOIN PEER DISCOVERY
![Page 46: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/46.jpg)
A
S0 S1 … Sn
DNS Seeds
S0
S0Hey! Send me some peers
DNS Server
BITCOIN PEER DISCOVERY
![Page 47: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/47.jpg)
A
S0 S1 … Sn
DNS Seeds
S0
S0Hey! Send me some peers
DNS Server
BITCOIN PEER DISCOVERY
![Page 48: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/48.jpg)
A
S0 S1 … Sn
DNS Seeds
S0
S0Hey! Send me some peers
DNS Server
BITCOIN PEER DISCOVERY
![Page 49: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/49.jpg)
A
S0 S1 … Sn
DNS Seeds
S0
S0Hey! Send me some peers
DNS Server
BITCOIN PEER DISCOVERY
![Page 50: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/50.jpg)
A
S0 S1 … Sn
DNS Seeds
S0
S0Hey! Send me some peers
DNS Server
BITCOIN PEER DISCOVERY
![Page 51: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/51.jpg)
A
S0 S1 … Sn
DNS Seeds
S0
S0Hey! Send me some peers
DNS Server
BITCOIN PEER DISCOVERY
![Page 52: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/52.jpg)
A
S0 S1 … Sn
DNS Seeds
S0
S0Hey! Send me some peers
DNS Server
BITCOIN PEER DISCOVERY
![Page 53: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/53.jpg)
A
S0 S1 … Sn
DNS Seeds
S0
BITCOIN PEER DISCOVERY
![Page 54: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/54.jpg)
A
S0 S1 … Sn
DNS Seeds
S0 S1S0
BITCOIN PEER DISCOVERY
![Page 55: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/55.jpg)
A
S0 S1 … Sn
DNS Seeds
S0 S1S0
S1
DNS Server
BITCOIN PEER DISCOVERY
![Page 56: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/56.jpg)
A
S0 S1 … Sn
DNS Seeds
S0 S1S0
S1Hey! Send me some peers
DNS Server
BITCOIN PEER DISCOVERY
![Page 57: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/57.jpg)
A
S0 S1 … Sn
DNS Seeds
S0 S1S0
S1Hey! Send me some peers
DNS Server
BITCOIN PEER DISCOVERY
![Page 58: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/58.jpg)
A
S0 S1 … Sn
DNS Seeds
S0 S1S0
BITCOIN PEER DISCOVERY
![Page 59: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/59.jpg)
A
S0 S1 … Sn
DNS Seeds
S0 S1S0 S1
BITCOIN PEER DISCOVERY
![Page 60: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/60.jpg)
A
S0 S1 … Sn
DNS Seeds
S0 S1S0 S1 …
BITCOIN PEER DISCOVERY
![Page 61: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/61.jpg)
A
S0 S1 … Sn
DNS Seeds
S0 S1S0 S1 … Sn
BITCOIN PEER DISCOVERY
![Page 62: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/62.jpg)
A
S0 S1 … Sn
DNS Seeds
S0 S1S0 S1 … Sn
Hey! Send me some peers Sn
DNS Server
BITCOIN PEER DISCOVERY
![Page 63: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/63.jpg)
A
S0 S1 … Sn
DNS Seeds
S0 S1S0 S1 … Sn
SnHere you have!
DNS Server
P0 P1 … Pn
Peer list
BITCOIN PEER DISCOVERY
![Page 64: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/64.jpg)
vSeeds.emplace_back("seed.bitcoin.sipa.be"); // Pieter Wuille vSeeds.emplace_back("dnsseed.bluematt.me"); // Matt Corallo vSeeds.emplace_back("dnsseed.bitcoin.dashjr.org"); // Luke Dashjr vSeeds.emplace_back("seed.bitcoinstats.com"); // Christian Decker vSeeds.emplace_back("seed.bitcoin.jonasschnelli.ch"); // Jonas Schnelli vSeeds.emplace_back("seed.btc.petertodd.org"); // Peter Todd vSeeds.emplace_back("seed.bitcoin.sprovoost.nl"); // Sjors Provoost
BITCOIN DNS SERVER HOSTS
![Page 65: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/65.jpg)
vSeeds.emplace_back("seed.bitcoin.sipa.be"); // Pieter Wuille vSeeds.emplace_back("dnsseed.bluematt.me"); // Matt Corallo vSeeds.emplace_back("dnsseed.bitcoin.dashjr.org"); // Luke Dashjr vSeeds.emplace_back("seed.bitcoinstats.com"); // Christian Decker vSeeds.emplace_back("seed.bitcoin.jonasschnelli.ch"); // Jonas Schnelli vSeeds.emplace_back("seed.btc.petertodd.org"); // Peter Todd vSeeds.emplace_back("seed.bitcoin.sprovoost.nl"); // Sjors Provoost
static SeedSpec6 pnSeed6_main[] = {
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x02,0x84,0x64,0x2f}, 8333},
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x05,0x01,0x61,0x04}, 8333},
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x05,0x27,0xae,0x74}, 8333},
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x05,0x2d,0x4f,0x0e}, 8333},
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x05,0x35,0x10,0x85}, 8333},
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x05,0x65,0x8b,0xa6}, 8333},
If DNS seeds do not work, a node will try to connect
to a hardcoded list of nodes (fixed seed)
…
BITCOIN DNS SERVER HOSTS
![Page 66: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/66.jpg)
A node bootstraps with no known peers
First it tries to query a list of well known DNS seeds
As a last resource it uses a hardcoded seed
BITCOIN P2P BOOTSTRAPPING (RECAP)
![Page 67: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/67.jpg)
BA
C
POPULATING THE PEERS DATABASE
![Page 68: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/68.jpg)
• A connects a subset of peers from the ones learned from the DNS seeds
BA
C
POPULATING THE PEERS DATABASE
![Page 69: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/69.jpg)
• A connects a subset of peers from the ones learned from the DNS seeds
• A requests more peers to his neighbors (getaddr)
BA getaddr
getaddrC
POPULATING THE PEERS DATABASE
![Page 70: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/70.jpg)
• A connects a subset of peers from the ones learned from the DNS seeds
• A requests more peers to his neighbors (getaddr)
• Peers reply with some addresses they know about (addr, up to 1000 addresses)
BA
peer_list_c
peer_list_b
C
POPULATING THE PEERS DATABASE
![Page 71: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/71.jpg)
• A connects a subset of peers from the ones learned from the DNS seeds
• A requests more peers to his neighbors (getaddr)
• Peers reply with some addresses they know about (addr, up to 1000 addresses)
• A adds the new addresses to its peers database (or updates the existing ones)B
A
peer_list_c
peer_list_b
C
POPULATING THE PEERS DATABASE
![Page 72: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/72.jpg)
• A connects a subset of peers from the ones learned from the DNS seeds
• A requests more peers to his neighbors (getaddr)
• Peers reply with some addresses they know about (addr, up to 1000 addresses)
• A adds the new addresses to its peers database (or updates the existing ones)
• The database is known as the addrman
BA
peer_list_c
peer_list_b
C
A’s addrman = A’s addrman U peer_list_c U peer_list_b
POPULATING THE PEERS DATABASE
![Page 73: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/73.jpg)
A
P0 P1 … Pn
Peer database (addrman)
INCOMING/OUTGOING CONNECTIONS
![Page 74: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/74.jpg)
• During bootstrap, a node will start some outgoing connections with peers it has learnt about (8 by default) and tries to maintain themA
P0 P1 … Pn
Peer database (addrman)
INCOMING/OUTGOING CONNECTIONS
![Page 75: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/75.jpg)
• During bootstrap, a node will start some outgoing connections with peers it has learnt about (8 by default) and tries to maintain them
• A node will also accept some incoming connections (117 by default)
A
P0 P1 … Pn
Peer database (addrman)
INCOMING/OUTGOING CONNECTIONS
![Page 76: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/76.jpg)
How does a node announce his presence to the rest of the network?
ADDRESS PROPAGATION (1/2)
![Page 77: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/77.jpg)
How does a node announce his presence to the rest of the network?
A B
P0 … Pn
Peer database (addrman)
ADDRESS PROPAGATION (1/2)
![Page 78: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/78.jpg)
How does a node announce his presence to the rest of the network?
A BLet’s connect!
(version)
P0 … Pn
Peer database (addrman)
ADDRESS PROPAGATION (1/2)
![Page 79: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/79.jpg)
How does a node announce his presence to the rest of the network?
A BLet’s connect!
(version)
P0 … Pn
Peer database (addrman)
OK! (verack)
ADDRESS PROPAGATION (1/2)
![Page 80: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/80.jpg)
How does a node announce his presence to the rest of the network?
A BLet’s connect!
(version)
P0 … Pn
Peer database (addrman)
PA
OK! (verack)
ADDRESS PROPAGATION (1/2)
![Page 81: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/81.jpg)
How does a node announce his presence to the rest of the network?
A
B
C
J F
G
I
D
K
E
H
ADDRESS PROPAGATION (2/2)
![Page 82: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/82.jpg)
How does a node announce his presence to the rest of the network?
A
B
C
J F
G
I
D
K
E
H
ADDRESS PROPAGATION (2/2)
![Page 83: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/83.jpg)
How does a node announce his presence to the rest of the network?
A
B
C
J F
G
I
D
KAddr(A
)
E
H
• B picks a random subset of its neighbors and relays A’s address
ADDRESS PROPAGATION (2/2)
![Page 84: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/84.jpg)
How does a node announce his presence to the rest of the network?
A
B
C
J F
G
I
D
KAddr(A
)
Addr
(A)
E
H
• B picks a random subset of its neighbors and relays A’s address
• The nodes picked by B pick a random subset of their neighbors and relay A’s address
ADDRESS PROPAGATION (2/2)
![Page 85: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/85.jpg)
How does a node announce his presence to the rest of the network?
A
B
C
J F
G
I
D
KAddr(A
)
Addr
(A)
Addr(A)
Addr(A)
E
H
• B picks a random subset of its neighbors and relays A’s address
• The nodes picked by B pick a random subset of their neighbors and relay A’s address
• And so on and so forth…
ADDRESS PROPAGATION (2/2)
![Page 86: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/86.jpg)
How does a node announce his presence to the rest of the network?
A
B
C
J F
G
I
D
KAddr(A
)
Addr
(A)
Addr(A)
Addr(A)
E
H
Addr
(A)
• B picks a random subset of its neighbors and relays A’s address
• The nodes picked by B pick a random subset of their neighbors and relay A’s address
• And so on and so forth…
ADDRESS PROPAGATION (2/2)
![Page 87: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/87.jpg)
How does a node announce his presence to the rest of the network?
…
A
B
C
J F
G
I
D
KAddr(A
)
Addr
(A)
Addr(A)
Addr(A)
E
H
Addr
(A)
• B picks a random subset of its neighbors and relays A’s address
• The nodes picked by B pick a random subset of their neighbors and relay A’s address
• And so on and so forth…
ADDRESS PROPAGATION (2/2)
![Page 88: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/88.jpg)
…
A
B
C
J F
G
I
D
Addr(A)
Addr
(A)
Addr(A)
Addr(A)
E
H
Addr
(A) K
ADDRESS PROPAGATION (2/2)
How does a node announce his presence to the rest of the network?
![Page 89: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/89.jpg)
• The address will eventually be spread throughout the network…
A
B
C
J F
G
I
D
Addr(A)
Addr
(A)
Addr(A)
Addr(A)
E
H
Addr
(A) K
ADDRESS PROPAGATION (2/2)
How does a node announce his presence to the rest of the network?
![Page 90: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/90.jpg)
• The address will eventually be spread throughout the network
• Nodes learning about the new peer will add it to their peers database
…
A
B
C
J F
G
I
D
Addr(A)
Addr
(A)
Addr(A)
Addr(A)
E
H
Addr
(A) K
ADDRESS PROPAGATION (2/2)
How does a node announce his presence to the rest of the network?
![Page 91: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/91.jpg)
A node learns about the peers in the network by asking other peers (after an initial bootstrap)
A node maintains a database of all the peers he has heard of and keeps populating it / updating it
A node initiates (and maintain) some outgoing connects and also accept some incoming ones
The address of a new node is propagated thought the network so all peers can know about it
CONNECTIONS (RECAP)
![Page 92: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/92.jpg)
Actors and purpose (what, who, why, and how)
![Page 93: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/93.jpg)
There are two main items that peers share in a cryptocurrency P2P network: transactions and blocks
From: Ford To: Arthur 42
THE DATA (WHAT?)
![Page 94: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/94.jpg)
There are two main roles followed by nodes: peers and miners
THE ACTORS (WHO?) (1/2)
![Page 95: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/95.jpg)
There are two main roles followed by nodes: peers and miners
(Normal) Peers:
THE ACTORS (WHO?) (1/2)
![Page 96: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/96.jpg)
There are two main roles followed by nodes: peers and miners
(Normal) Peers:
• Can create transactions that spend some of their bitcoins From: Alice To: Bob 5
THE ACTORS (WHO?) (1/2)
![Page 97: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/97.jpg)
There are two main roles followed by nodes: peers and miners
(Normal) Peers:
• Can create transactions that spend some of their bitcoins
• Do verify the correctness of received transactions and blocks (from other peers)
From: Alice To: Bob 5
THE ACTORS (WHO?) (1/2)
![Page 98: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/98.jpg)
There are two main roles followed by nodes: peers and miners
(Normal) Peers:
• Can create transactions that spend some of their bitcoins
• Do verify the correctness of received transactions and blocks (from other peers)
• Do relay valid transactions and blocks (created by them or obtained from other peers)
From: Alice To: Bob 5
A BtxA
THE ACTORS (WHO?) (1/2)
![Page 99: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/99.jpg)
THE ACTORS (WHO?) (2/2)
There are two main roles followed by nodes: peers and miners
![Page 100: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/100.jpg)
THE ACTORS (WHO?) (2/2)
There are two main roles followed by nodes: peers and miners
Miners:
![Page 101: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/101.jpg)
THE ACTORS (WHO?) (2/2)
There are two main roles followed by nodes: peers and miners
Miners:
• Can everything a peer could do*
![Page 102: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/102.jpg)
THE ACTORS (WHO?) (2/2)
There are two main roles followed by nodes: peers and miners
Miners:
• Can everything a peer could do*
• Can generate blocks through a process known as mining
![Page 103: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/103.jpg)
THE ACTORS (WHO?) (2/2)
There are two main roles followed by nodes: peers and miners
Miners:
• Can everything a peer could do*
• Can generate blocks through a process known as mining
* There are specific purpose miners (ASICS) that only perform mining
![Page 104: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/104.jpg)
Peers relay transactions in order to reach miners, which will include such transactions in future blocks
Miners generate blocks to obtain their reward (and also the transactions fees)
Blocks are relayed to ultimately achieve a consistent view of the blockchain
Peers validate transactions and blocks (and relay only the valid ones) in order to avoid cheating (e.g: double-spending, coin forgery, etc)
THE PURPOSE (WHY?)
![Page 105: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/105.jpg)
Items (transactions and blocks) are shared between peers in a push manner
A B
Announce paradigm
THE GOSSIP PROTOCOL (HOW?)
![Page 106: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/106.jpg)
Items (transactions and blocks) are shared between peers in a push manner
When a peer receives / generates a new item he announce it to his neighbors (announce)
A B
inv(h(txn))announce
Announce paradigm
THE GOSSIP PROTOCOL (HOW?)
![Page 107: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/107.jpg)
Items (transactions and blocks) are shared between peers in a push manner
When a peer receives / generates a new item he announce it to his neighbors (announce)
Upon receiving an announce of an item, a node that does not know about it will request the item back to the announcer (request)
A B
inv(h(txn))
get_data(h(txn
))
announce
request
Announce paradigm
THE GOSSIP PROTOCOL (HOW?)
![Page 108: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/108.jpg)
Items (transactions and blocks) are shared between peers in a push manner
When a peer receives / generates a new item he announce it to his neighbors (announce)
Upon receiving an announce of an item, a node that does not know about it will request the item back to the announcer (request)
Upon receiving a request of a known item, a node will reply back with it (deliver)
A B
inv(h(txn))
get_data(h(txn
))
tx(txn)
announce
request
deliver
Announce paradigm
THE GOSSIP PROTOCOL (HOW?)
![Page 109: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/109.jpg)
![Page 110: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/110.jpg)
Information propagation
![Page 111: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/111.jpg)
A
INFORMATION PROPAGATION (1/3)
![Page 112: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/112.jpg)
AB
INFORMATION PROPAGATION (1/3)
![Page 113: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/113.jpg)
ABtxn
INFORMATION PROPAGATION (1/3)
![Page 114: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/114.jpg)
AB
Do I already know about txn?
txn
INFORMATION PROPAGATION (1/3)
![Page 115: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/115.jpg)
AB
Do I already know about txn?
txn
Yes!
INFORMATION PROPAGATION (1/3)
![Page 116: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/116.jpg)
AB
Do I already know about txn?
txn
Yes! • Known transaction will be rejected
INFORMATION PROPAGATION (1/3)
![Page 117: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/117.jpg)
AB
Do I already know about txn?
txn
• Known transaction will be rejected
INFORMATION PROPAGATION (1/3)
![Page 118: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/118.jpg)
AB
Do I already know about txn?
txn
No! • Known transaction will be rejected
INFORMATION PROPAGATION (1/3)
![Page 119: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/119.jpg)
AB
Do I already know about txn?
txn
No! • Known transaction will be rejected
INFORMATION PROPAGATION (1/3)
![Page 120: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/120.jpg)
ABtxn
• Known transaction will be rejected
INFORMATION PROPAGATION (1/3)
![Page 121: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/121.jpg)
AB
• Known transaction will be rejected
INFORMATION PROPAGATION (1/3)
![Page 122: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/122.jpg)
AB
txn
• Known transaction will be rejected
INFORMATION PROPAGATION (1/3)
![Page 123: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/123.jpg)
AB
Is txn a valid transaction?
txn
• Known transaction will be rejected
INFORMATION PROPAGATION (1/3)
![Page 124: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/124.jpg)
AB
Is txn a valid transaction?
txn
• Known transaction will be rejected
INFORMATION PROPAGATION (1/3)
![Page 125: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/125.jpg)
AB
Is txn a valid transaction?
txn
• Known transaction will be rejected
INFORMATION PROPAGATION (1/3)
![Page 126: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/126.jpg)
AB
Is txn a valid transaction?
txn
• Known transaction will be rejected
INFORMATION PROPAGATION (1/3)
![Page 127: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/127.jpg)
AB
Is txn a valid transaction?
txn
• Known transaction will be rejected
INFORMATION PROPAGATION (1/3)
![Page 128: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/128.jpg)
AB
Is txn a valid transaction?
No!
txn
• Known transaction will be rejected
INFORMATION PROPAGATION (1/3)
![Page 129: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/129.jpg)
AB
Is txn a valid transaction?
No!
txn
• Known transaction will be rejected
• Invalid transaction will also be rejected
INFORMATION PROPAGATION (1/3)
![Page 130: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/130.jpg)
AB
Is txn a valid transaction?
txn
• Known transaction will be rejected
• Invalid transaction will also be rejected
INFORMATION PROPAGATION (1/3)
![Page 131: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/131.jpg)
AB
Is txn a valid transaction?
Yes!
txn
• Known transaction will be rejected
• Invalid transaction will also be rejected
INFORMATION PROPAGATION (1/3)
![Page 132: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/132.jpg)
AB
Is txn a valid transaction?
Yes!
txn
• Known transaction will be rejected
• Invalid transaction will also be rejected
INFORMATION PROPAGATION (1/3)
![Page 133: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/133.jpg)
AB
txn
• Known transaction will be rejected
• Invalid transaction will also be rejected
INFORMATION PROPAGATION (1/3)
![Page 134: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/134.jpg)
AB
txn
. . .
A’s memory (mempool)
txn-1
tx0
• Known transaction will be rejected
• Invalid transaction will also be rejected
INFORMATION PROPAGATION (1/3)
![Page 135: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/135.jpg)
AB. . .
A’s memory (mempool)
txn-1
tx0
txn
• Known transaction will be rejected
• Invalid transaction will also be rejected
INFORMATION PROPAGATION (1/3)
![Page 136: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/136.jpg)
AB. . .
A’s memory (mempool)
txn-1
tx0
txn
• Known transaction will be rejected
• Invalid transaction will also be rejected
• Valid (new) transactions will be kept in memory (mempool)
INFORMATION PROPAGATION (1/3)
![Page 137: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/137.jpg)
A
INFORMATION PROPAGATION (2/3)
![Page 138: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/138.jpg)
A
B
INFORMATION PROPAGATION (2/3)
![Page 139: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/139.jpg)
A
B
C
INFORMATION PROPAGATION (2/3)
![Page 140: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/140.jpg)
A
B
C D
INFORMATION PROPAGATION (2/3)
![Page 141: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/141.jpg)
A
B
C D
…
INFORMATION PROPAGATION (2/3)
![Page 142: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/142.jpg)
A
B
C D
…
Z
INFORMATION PROPAGATION (2/3)
![Page 143: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/143.jpg)
A
B
C D
…
Z
INFORMATION PROPAGATION (2/3)
![Page 144: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/144.jpg)
A
B
C D
…
Z
A BC
INFORMATION PROPAGATION (2/3)
![Page 145: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/145.jpg)
A
B
C D
…
Z
A B
inv(h(txn))announce
C
INFORMATION PROPAGATION (2/3)
![Page 146: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/146.jpg)
A
B
C D
…
Z
A B
inv(h(txn))
get_data(h(txn
))
announce
request
C
INFORMATION PROPAGATION (2/3)
![Page 147: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/147.jpg)
A
B
C D
…
Z
A B
inv(h(txn))
get_data(h(txn
))
tx(txn)
announce
request
deliver
C
INFORMATION PROPAGATION (2/3)
![Page 148: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/148.jpg)
A
B
C D
…
Z
A B
inv(h(txn))
get_data(h(txn
))
tx(txn)
announce
request
deliver
D
INFORMATION PROPAGATION (2/3)
![Page 149: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/149.jpg)
A
B
C D
…
Z
A B
inv(h(txn))
get_data(h(txn
))
tx(txn)
announce
request
deliver
Z
INFORMATION PROPAGATION (2/3)
![Page 150: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/150.jpg)
A
B
C D
…Z
INFORMATION PROPAGATION (3/3)
![Page 151: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/151.jpg)
A
B
C D
…Z
INFORMATION PROPAGATION (3/3)
![Page 152: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/152.jpg)
A
B
C D
…Z
INFORMATION PROPAGATION (3/3)
![Page 153: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/153.jpg)
A
B
C D
…Z
INFORMATION PROPAGATION (3/3)
![Page 154: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/154.jpg)
A
B
C D
…Z
INFORMATION PROPAGATION (3/3)
![Page 155: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/155.jpg)
A
B
C D
…Z
INFORMATION PROPAGATION (3/3)
![Page 156: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/156.jpg)
A
B
C D
…Z
INFORMATION PROPAGATION (3/3)
![Page 157: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/157.jpg)
A
B
C D
…Z
INFORMATION PROPAGATION (3/3)
![Page 158: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/158.jpg)
A
B
C D
…Z
• And so on and so forth until all the nodes are reached
INFORMATION PROPAGATION (3/3)
![Page 159: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/159.jpg)
A
B
C D
…Z
• And so on and so forth until all the nodes are reached
• Recall that a node will reject a transaction if it has already learnt about it from any of its neighbors
INFORMATION PROPAGATION (3/3)
![Page 160: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/160.jpg)
A
B
C D
…Z
• And so on and so forth until all the nodes are reached
• Recall that a node will reject a transaction if it has already learnt about it from any of its neighbors
• The same procedure applies for blocks
INFORMATION PROPAGATION (3/3)
![Page 161: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/161.jpg)
The bigger the network the more it takes for an item to propagate (this can be counterintuitive)
Long propagation times (for blocks) imply bigger likelihood of forking the blockchain
IMPLICATIONS
![Page 162: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/162.jpg)
The bigger the network the more it takes for an item to propagate (this can be counterintuitive)
Long propagation times (for blocks) imply bigger likelihood of forking the blockchain
Christian Decker and Roger WattenhoferInformation propagation in the Bitcoin network https://ieeexplore.ieee.org/document/6688704
IMPLICATIONS
![Page 163: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/163.jpg)
source: charts.satoshi.uab.cat
DATA PROPAGATION TIMES (TESTNET)
![Page 164: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/164.jpg)
source: https://dsn.tm.kit.edu/bitcoin/videos.html
MORE ABOUT PROPAGATION TIMES
![Page 165: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/165.jpg)
How can blocks propagate faster than transactions if the former are bigger than the later?
PROPAGATION DELAYS (1/2)
![Page 166: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/166.jpg)
How can blocks propagate faster than transactions if the former are bigger than the later?
• Transactions are accumulated in buffers and forwarded in batches to break the link between first relayer and origin of a transaction
PROPAGATION DELAYS (1/2)
![Page 167: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/167.jpg)
How can blocks propagate faster than transactions if the former are bigger than the later?
• Transactions are accumulated in buffers and forwarded in batches to break the link between first relayer and origin of a transaction
• The propagation of blocks is not delayed, in order to reach full network coverage as soon as possible
PROPAGATION DELAYS (1/2)
![Page 168: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/168.jpg)
But blocks are way bigger than transactions, how can they be propagated so fast!?
PROPAGATION DELAYS (2/2)
![Page 169: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/169.jpg)
But blocks are way bigger than transactions, how can they be propagated so fast!?
• Fast relay networks on top of Bitcoin exists (Falcon, FIBRE, etc) to enhance the propagation time of blocks
PROPAGATION DELAYS (2/2)
![Page 170: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/170.jpg)
But blocks are way bigger than transactions, how can they be propagated so fast!?
• Fast relay networks on top of Bitcoin exists (Falcon, FIBRE, etc) to enhance the propagation time of blocks
• Miners use such networks to ensure minimal propagation times as well as ensure being mining on top of the most recent block
PROPAGATION DELAYS (2/2)
![Page 171: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/171.jpg)
Reachable network: all nodes accept incoming / outgoing connections
Reachable
NETWORK TAXONOMY
![Page 172: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/172.jpg)
Reachable network: all nodes accept incoming / outgoing connections
Non-reachable: nodes do not accept incoming connections / cannot be reached (NAT/firewalls/…) Reachable
Non-reachable
NETWORK TAXONOMY
![Page 173: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/173.jpg)
Reachable network: all nodes accept incoming / outgoing connections
Non-reachable: nodes do not accept incoming connections / cannot be reached (NAT/firewalls/…)
Extended network: nodes use different protocol to communicate (not always P2P)
Reachable
Non-reachable
Extended
NETWORK TAXONOMY
![Page 174: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/174.jpg)
Nodes misbehavior
![Page 175: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/175.jpg)
Every node maintains a banscore with each of its neighbors
If a node finds that one if its peers is misbehaving, the former will increase the banscore of the later
If the banscore of a neighbor reaches (or surpasses) its maximum (100 by default), the node will ban that neighbor for a certain time (24h by default)
The banscore increase depends on how the neighbor is misbehaving
Nodes misbehavior
![Page 176: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/176.jpg)
Examples of banscore increase:
• Not sending a version message as the first message in a handshake (1)
• Sending more than 1000 addresses in a single address message (1)
• Sending more than 50000 ids in a single inventory message (20)
• Sending a transaction with a script too big (100)
src/net_processing.cpp for more
Banscore
![Page 177: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/177.jpg)
0-conf transactions and double-spending
![Page 178: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/178.jpg)
A
UNCONFIRMED TRANSACTIONS
• 0-conf transactions / unconfirmed transactions are those that are not part of the blockchain (they are stored in the mempool)
• 0-conf transactions are not covered by the double-spending protection offered by the blockchain (they are not part of it)
• Different nodes can have conflicting version of the “same transaction”
![Page 179: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/179.jpg)
A. . .
A’s mempool
txn-1
tx0
UNCONFIRMED TRANSACTIONS
• 0-conf transactions / unconfirmed transactions are those that are not part of the blockchain (they are stored in the mempool)
• 0-conf transactions are not covered by the double-spending protection offered by the blockchain (they are not part of it)
• Different nodes can have conflicting version of the “same transaction”
![Page 180: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/180.jpg)
AB. . .
A’s mempool
txn-1
tx0
UNCONFIRMED TRANSACTIONS
• 0-conf transactions / unconfirmed transactions are those that are not part of the blockchain (they are stored in the mempool)
• 0-conf transactions are not covered by the double-spending protection offered by the blockchain (they are not part of it)
• Different nodes can have conflicting version of the “same transaction”
![Page 181: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/181.jpg)
AB. . .
A’s mempool
txn-1
tx0
UNCONFIRMED TRANSACTIONS
• 0-conf transactions / unconfirmed transactions are those that are not part of the blockchain (they are stored in the mempool)
• 0-conf transactions are not covered by the double-spending protection offered by the blockchain (they are not part of it)
• Different nodes can have conflicting version of the “same transaction”
![Page 182: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/182.jpg)
AB txn. . .
A’s mempool
txn-1
tx0
UNCONFIRMED TRANSACTIONS
• 0-conf transactions / unconfirmed transactions are those that are not part of the blockchain (they are stored in the mempool)
• 0-conf transactions are not covered by the double-spending protection offered by the blockchain (they are not part of it)
• Different nodes can have conflicting version of the “same transaction”
![Page 183: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/183.jpg)
AB. . .
A’s mempool
txn-1
tx0
UNCONFIRMED TRANSACTIONS
• 0-conf transactions / unconfirmed transactions are those that are not part of the blockchain (they are stored in the mempool)
• 0-conf transactions are not covered by the double-spending protection offered by the blockchain (they are not part of it)
• Different nodes can have conflicting version of the “same transaction”
![Page 184: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/184.jpg)
AB. . .
A’s mempool
txn-1
tx0
txn
UNCONFIRMED TRANSACTIONS
• 0-conf transactions / unconfirmed transactions are those that are not part of the blockchain (they are stored in the mempool)
• 0-conf transactions are not covered by the double-spending protection offered by the blockchain (they are not part of it)
• Different nodes can have conflicting version of the “same transaction”
![Page 185: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/185.jpg)
AB. . .
A’s mempool
txn-1
tx0
txn
UNCONFIRMED TRANSACTIONS
• 0-conf transactions / unconfirmed transactions are those that are not part of the blockchain (they are stored in the mempool)
• 0-conf transactions are not covered by the double-spending protection offered by the blockchain (they are not part of it)
• Different nodes can have conflicting version of the “same transaction”
![Page 186: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/186.jpg)
AB. . .
A’s mempool
txn-1
tx0
UNCONFIRMED TRANSACTIONS
• 0-conf transactions / unconfirmed transactions are those that are not part of the blockchain (they are stored in the mempool)
• 0-conf transactions are not covered by the double-spending protection offered by the blockchain (they are not part of it)
• Different nodes can have conflicting version of the “same transaction”
![Page 187: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/187.jpg)
AB. . .
A’s mempool
txn-1
tx0
txn
UNCONFIRMED TRANSACTIONS
• 0-conf transactions / unconfirmed transactions are those that are not part of the blockchain (they are stored in the mempool)
• 0-conf transactions are not covered by the double-spending protection offered by the blockchain (they are not part of it)
• Different nodes can have conflicting version of the “same transaction”
![Page 188: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/188.jpg)
A
. . .
A’s mempool
txn
CONFIRMED TRANSACTIONS
The de facto confirmation time is 6 blocks (5 on top of the one including a certain transaction)
![Page 189: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/189.jpg)
A
. . .
A’s mempool
txn
D
CONFIRMED TRANSACTIONS
The de facto confirmation time is 6 blocks (5 on top of the one including a certain transaction)
![Page 190: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/190.jpg)
A
. . .
A’s mempool
txn
D
CONFIRMED TRANSACTIONS
The de facto confirmation time is 6 blocks (5 on top of the one including a certain transaction)
![Page 191: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/191.jpg)
A
. . .
A’s mempool
txn
Dblck x
CONFIRMED TRANSACTIONS
The de facto confirmation time is 6 blocks (5 on top of the one including a certain transaction)
![Page 192: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/192.jpg)
A
. . .
A’s mempool
txn
Dblck x
Is blck x a valid block?
CONFIRMED TRANSACTIONS
The de facto confirmation time is 6 blocks (5 on top of the one including a certain transaction)
![Page 193: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/193.jpg)
A
. . .
A’s mempool
txn
Dblck x
CONFIRMED TRANSACTIONS
The de facto confirmation time is 6 blocks (5 on top of the one including a certain transaction)
![Page 194: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/194.jpg)
A
. . .
A’s mempool
txn
Dblck x
CONFIRMED TRANSACTIONS
The de facto confirmation time is 6 blocks (5 on top of the one including a certain transaction)
![Page 195: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/195.jpg)
A
. . .
A’s mempool
txn
Dblck x
CONFIRMED TRANSACTIONS
The de facto confirmation time is 6 blocks (5 on top of the one including a certain transaction)
![Page 196: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/196.jpg)
A
. . .
A’s mempool
txn
Dblck x
CONFIRMED TRANSACTIONS
The de facto confirmation time is 6 blocks (5 on top of the one including a certain transaction)
![Page 197: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/197.jpg)
A
. . .
A’s mempool
txn
Dblck x
CONFIRMED TRANSACTIONS
The de facto confirmation time is 6 blocks (5 on top of the one including a certain transaction)
![Page 198: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/198.jpg)
A
. . .
A’s mempool
txn
Dblck x
CONFIRMED TRANSACTIONS
The de facto confirmation time is 6 blocks (5 on top of the one including a certain transaction)
![Page 199: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/199.jpg)
A
. . .
A’s mempool
txn
Dblck x
CONFIRMED TRANSACTIONS
The de facto confirmation time is 6 blocks (5 on top of the one including a certain transaction)
![Page 200: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/200.jpg)
A
. . .
A’s mempool
txn
Dblck x
CONFIRMED TRANSACTIONS
The de facto confirmation time is 6 blocks (5 on top of the one including a certain transaction)
![Page 201: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/201.jpg)
A
. . .
A’s mempool
txn
blck x
CONFIRMED TRANSACTIONS
The de facto confirmation time is 6 blocks (5 on top of the one including a certain transaction)
![Page 202: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/202.jpg)
A
. . .
A’s mempool
txn
blck x
Is any of my known transactions in blck
x?
CONFIRMED TRANSACTIONS
The de facto confirmation time is 6 blocks (5 on top of the one including a certain transaction)
![Page 203: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/203.jpg)
A
. . .
A’s mempool
txn
blck x
CONFIRMED TRANSACTIONS
The de facto confirmation time is 6 blocks (5 on top of the one including a certain transaction)
![Page 204: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/204.jpg)
A
. . .
A’s mempool
txn
blck x
txn
CONFIRMED TRANSACTIONS
The de facto confirmation time is 6 blocks (5 on top of the one including a certain transaction)
![Page 205: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/205.jpg)
A
. . .
A’s mempool
blck x
CONFIRMED TRANSACTIONS
The de facto confirmation time is 6 blocks (5 on top of the one including a certain transaction)
![Page 206: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/206.jpg)
A
. . .
A’s mempool
blck x
txn-1
CONFIRMED TRANSACTIONS
The de facto confirmation time is 6 blocks (5 on top of the one including a certain transaction)
![Page 207: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/207.jpg)
A
DOUBLE-SPENDING TRANSACTIONS (1/2)
![Page 208: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/208.jpg)
A
id = 4F3…ED
DOUBLE-SPENDING TRANSACTIONS (1/2)
![Page 209: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/209.jpg)
A
id = 4F3…ED
Source: 4F3…ED To: Bob
Source: 4F3…ED To: Alice
txB
txB’
DOUBLE-SPENDING TRANSACTIONS (1/2)
![Page 210: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/210.jpg)
A
id = 4F3…ED
Source: 4F3…ED To: Bob
Source: 4F3…ED To: Alice
txB
txB’
DOUBLE-SPENDING TRANSACTIONS (1/2)
![Page 211: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/211.jpg)
A
id = 4F3…ED
Source: 4F3…ED To: Bob
Source: 4F3…ED To: Alice
txB
txB’
DOUBLE-SPENDING TRANSACTIONS (1/2)
![Page 212: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/212.jpg)
A
B
C D
Z
DOUBLE-SPENDING TRANSACTIONS (2/2)
![Page 213: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/213.jpg)
A
B
C D
ZtxB
txB
DOUBLE-SPENDING TRANSACTIONS (2/2)
![Page 214: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/214.jpg)
A
B
C D
ZtxB
txB
txB’
txB’
DOUBLE-SPENDING TRANSACTIONS (2/2)
![Page 215: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/215.jpg)
A
B
C D
ZtxB
txB
txB’
txB’
• 0-conf transactions should not be trusted
DOUBLE-SPENDING TRANSACTIONS (2/2)
![Page 216: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/216.jpg)
A
B
C D
ZtxB
txB
txB’
txB’
• 0-conf transactions should not be trusted
• If B accepts txB before it appears in a block he can be deceived by A
DOUBLE-SPENDING TRANSACTIONS (2/2)
![Page 217: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/217.jpg)
A
B
C D
Z
WHEN THINGS GO SOUTH
![Page 218: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/218.jpg)
A
B
C D
ZtxB
WHEN THINGS GO SOUTH
![Page 219: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/219.jpg)
A
B
C D
ZtxB
txB’
txB’
txB’
WHEN THINGS GO SOUTH
![Page 220: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/220.jpg)
A
B
C D
ZtxB
• If A manages to control the network view of B, A can easily deceive B
txB’
txB’
txB’
WHEN THINGS GO SOUTH
![Page 221: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/221.jpg)
A
B
C D
ZtxB
• If A manages to control the network view of B, A can easily deceive B
• When a node controls the view of another subset of nodes, the latter is said to be eclipsed
txB’
txB’
txB’
WHEN THINGS GO SOUTH
![Page 222: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/222.jpg)
A
B
C D
ZtxB
• If A manages to control the network view of B, A can easily deceive B
• When a node controls the view of another subset of nodes, the latter is said to be eclipsed
Ethan Heilman, Alison Kendler, Aviv Zohar and Sharon GoldbergEclipse Attacks on Bitcoin’s Peer-to-Peer Networkhttps://www.usenix.org/node/190891
txB’
txB’
txB’
WHEN THINGS GO SOUTH
![Page 223: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/223.jpg)
BtxB
ECLIPSE ATTACKS (1/2)
txB’A
![Page 224: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/224.jpg)
BtxB
ECLIPSE ATTACKS (1/2)
txB’A
B will be deceived provided:
![Page 225: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/225.jpg)
BtxB
ECLIPSE ATTACKS (1/2)
txB’A
B will be deceived provided:
• B accepts 0-conf transactions
![Page 226: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/226.jpg)
BtxB
ECLIPSE ATTACKS (1/2)
txB’A
B will be deceived provided:
• B accepts 0-conf transactions
• A has enough hash power to generate blocks in a reasonable time
![Page 227: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/227.jpg)
BtxB
ECLIPSE ATTACKS (2/2)
txB’
30%
txB
A
70%
![Page 228: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/228.jpg)
BtxB
ECLIPSE ATTACKS (2/2)
txB’
30%
• A does not even need to hold any mining power
txB
A
70%
![Page 229: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/229.jpg)
BtxB
ECLIPSE ATTACKS (2/2)
txB’
30%
• A does not even need to hold any mining power
• With the right information it can participate the network in the most beneficial way for her
txB
A
70%
![Page 230: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/230.jpg)
Network topology
![Page 231: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/231.jpg)
Peers are chosen pseudorandomly from the peer database of a node in order to become neighbors
Peers can be requested from other peers, but no information about whether the responder is (or has been) a neighbor of any of the provided peers is given
The network topology should mimic a random network
UNKNOWN TOPOLOGY BY DESIGN
![Page 232: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/232.jpg)
Does the network really look random?
INFERRING THE TOPOLOGY
![Page 233: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/233.jpg)
Does the network really look random?
How can we known if we don’t know what the topology looks like?
INFERRING THE TOPOLOGY
![Page 234: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/234.jpg)
Does the network really look random?
How can we known if we don’t know what the topology looks like?
Can we do anything to infer the topology?
INFERRING THE TOPOLOGY
![Page 235: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/235.jpg)
Does the network really look random?
How can we known if we don’t know what the topology looks like?
Can we do anything to infer the topology?
INFERRING THE TOPOLOGY
![Page 236: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/236.jpg)
TESTNET TOPOLOGY
• Several communities can be easily identified
• The network looks far from a random graph of similar characteristics
• The topology can be used to identify undesired centralization
• But also to target some potential victims (e.g: Eclipse attacks)
![Page 237: Bitcoin Network Layer and Information Propagation · bitcoin_wp001.pdf.part : P0 bitcoin_wp002.pdf.part : P1 bitcoin_wp003.pdf.part : P2 … bitcoin_wp00N.pdf.part : PN REQUEST PARADIGM](https://reader031.vdocuments.site/reader031/viewer/2022012008/6122743cadbd12672d34ef41/html5/thumbnails/237.jpg)
TESTNET TOPOLOGY
Sergi Delgado-Segura, Surya Bakshi, Cristina Pérez-Solà, James Litton, Andrew Pachulski, Andrew Miller, Bobby BhattacharjeeTxProbe: Discovering Bitcoin's Network Topology Using Orphan Transactions https://fc19.ifca.ai/preproceedings/58-preproceedings.pdf
• Several communities can be easily identified
• The network looks far from a random graph of similar characteristics
• The topology can be used to identify undesired centralization
• But also to target some potential victims (e.g: Eclipse attacks)