Chaincode Seminars
  • Seminar for Bitcoin and Lightning protocol
  • Bitcoin Protocol Development
    • Welcome to the Bitcoin Protocol Development Seminar
    • SegWit
    • Mining and Network Block Propagation
    • P2P
    • Scripts and Wallets
  • Lightning Protocol Development
    • Payment Channels, Intro to Lightning, and HTLCs
    • How the layers of Lightning Fit Together
    • Lightning Routing
    • Lightning Limitations
    • The Future of Lightning
Powered by GitBook
On this page
  • Reading
  • Optional Practical Exercise
  • Discussion Questions
  • Attacking P2P
  • P2P Connections
  • Eclipse Attacks on Bitcoin’s Peer-to-Peer Network
  • Transaction Trivia
  • [OPTIONAL] Researching P2P privacy attacks
Edit on GitHub
  1. Bitcoin Protocol Development

P2P

PreviousMining and Network Block PropagationNextScripts and Wallets

Last updated 2 months ago

Note that this section depends on reviewing the network propagation resources of the mining and network propagation seminar. If you are doing these out of order, please take a look at that section first.

Reading

Content
Time (min)

25

45

60

20

20

75

50

15

90

Optional Practical Exercise

  • has an updated fork of , a 200 line python program that allows you to explore the Bitcoin p2p network.

Discussion Questions

Attacking P2P

  1. Given the attack surface in P2P, is running a full node worth it?

  2. How many honest nodes do you need to be connected to be sure you are connected to the right network/blockchain?

  3. Does it make sense to have separate networks which are more resistant against p2p attacks, and regular nodes will keep at least one connection to them if they choose so?

P2P Connections

  1. What is the reasoning behind the max inbound and max outbound defaults? For which type of user would they be considered ideal, and when might they be optimized?

  2. What is the rationale behind the "new"/"tried" table design? Were there any prior inspirations within the field of distributed computing?

  3. How are anchor connections chosen? In what circumstances would you evict or change them?

  4. What are feeler connections, and when are they used?

Eclipse Attacks on Bitcoin’s Peer-to-Peer Network

  1. What can an attacker do if they are able to eclipse a mining pool?

  2. What is the difficulty of successfully achieving an eclipse attack? What resources and skills would be required to achieve such an attack?

Transaction Trivia

  1. Why must transaction unlocking scripts only push numbers to be relayed?

  2. What output scripts are 'IsStandard'?

  3. Why must transactions be no less than 82 bytes to be relayed?

  4. Why is the blockheight now encoded in the coinbase transaction?

[OPTIONAL] Researching P2P privacy attacks

  1. How does "diffusion" message spreading work and why is it ineffective against de-anonymization?

Attacking p2p of Bitcoin Core w/ Amiti Uttarwar ( or )

(optional)

(optional)

Will Clark
tinybitcoinpeer
Map of the Bitcoin Network
video (until min 41)
transcript
The Bitcoin p2p Network
The Bitcoin Network in Mastering Bitcoin (start at Network Discovery section)
Network partition resistance
Eclipse Attacks on Bitcoin’s Peer-to-Peer Network
Network partitioning & network level privacy attacks
Transport Encryption & BIP 324
Researching P2P privacy attacks