# Capítulo 8: *“The Bitcoin Network”* ###### tags: `MB` [TOC] ## Material Principal Para esta sesión socrática, debes leer el [Capítulo 8: *“The Bitcoin Network”*](https://github.com/bitcoinbook/bitcoinbook/blob/develop/ch08.asciidoc#the-bitcoin-network) del Libro **Mastering Bitcoin**. Estos son los enlaces a la versión del [libro en inglés](https://github.com/bitcoinbook/bitcoinbook) y la versión del [libro en español](https://drive.google.com/file/d/18NDHehFLGBDi_EVQQ59wQ2I99cvrrTJZ/view?usp=sharing). **Se recomienda leer en inglés, ya que es la versión más actualizada y completa**, pero es tu elección. Hemos estructurado las sesiones de acuerdo con los capítulos del libro en inglés. :::info :bangbang: **Importante:** Los términos técnicos siempre se dirán en inglés para facilitar el aprendizaje del idioma y la inmersión en el desarrollo de software de Bitcoin y LN. [Ver metodología de traducción](https://docs.google.com/document/d/1uPy771hf2xUElcaOR_Sk9NTqODeg9QZENYWL9leQc1g/edit?usp=sharing). ::: ## Lecturas complementarias | Contenido | Tiempo (min) | |:-------- |:--------:| |[Map of the Bitcoin Network](https://medium.com/@gloriazhao/map-of-the-bitcoin-network-c6f2619a76f3)| 11| |[P2P with John Newbery](https://btctranscripts.com/scalingbitcoin/stanford-2017/edgeplusplus/p2p-john-newbery/) | 40 | |[P2P Network](https://developer.bitcoin.org/devguide/p2p_network.html)| 25 | |[Network Partitioning Attacks](https://btctranscripts.com/chaincode-labs/chaincode-residency/2019-06-12-ethan-heilman-network-partitioning-attacks/) |45| | [FIBRE](http://bitcoinfibre.org/)| 15 | | [Eclipse attacks](https://bitcoinops.org/en/topics/eclipse-attacks/) | 95 | ## Preguntas de aprendizaje :::warning 🛑 Antes de resolver las preguntas del capítulo, revisa las instrucciones de trabajo de la sesión [aquí](https://hackmd.io/tJ56-ztCT6WERvNdx1N10g?view#Instrucciones-de-aprendizaje) ::: 1. How many types of nodes are there? What is the function of each of them? 2. What do the terms Bitcoin Relay Network, and Fast Internet Bitcoin Relay Engine (FIBRE) mean? 3. Is it important for the Bitcoin network to know the geographical location of other nodes? Why? 4. Through which port do the nodes connect and what type of connection do they use? Can this port be changed? 5. Briefly explain the handshake process between nodes and the information they exchange. 6. What is the function of ```nVersion```? 7. What role do the DNS servers have in the connection of the nodes? 8. What kind of messages are sent by the nodes when they connect (for example: ``addr`` or ``version``)? 9. What is a Bloom Filter, what function does it have, and how does it work? 10. Are SPV nodes secure? Why would you have one of them? 11. What is the *"transaction pool"*? Is it the same as an *"orphan pool"*? 12. What kind of attacks could the P2P network have? 13. Do SPV nodes help or hurt the network? 14. The Bitcoin Relay Network section describes multiple projects intended to reduce block propagation latency. Why is so much effort being put into this? :::spoiler _En español_ 1. ¿Cuántos tipos de nodo existen?, ¿qué función tienen cada uno de ellos? 2. ¿Qué significan los términos Bitcoin Relay Network y Fast Internet Bitcoin Relay Engine (FIBRE)? 3. ¿Es importante para la red de Bitcoin conocer la ubicación geográfica de otros nodos?, ¿por qué? 4. ¿Por qué puerto se conectan los nodos y que tipo de conexión utilizan?, ¿Se puede cambiar este puerto? 5. Explica brevemente el proceso de “handshake” entre los nodos y la información que intercambian. 6. ¿Cuál es la función de ``nVersion``? 7. ¿Qué función tienen los servidores DNS en la conexión de los nodos? 8. ¿Qué tipo de mensajes se envían los nodos cuando se conectan (por ejemplo: ``addr`` o ``version``)? 9. ¿Qué es un Bloom Filters, qué función tiene y cómo trabaja? 10. ¿Los nodos SPV son seguros?, ¿por qué tendrías uno? 11. ¿Qué es el *"transaction pool"*? ¿Es lo mismo un *"transaction pool"* que un *"orphan pool"*? 12. ¿Qué tipo de ataques podría sufrir la red P2P? 13. ¿Los nodos SPV ayudan o dañan la red? 14. La seccion de Red de Retransmisión de Bitcoin describe varios proyectos destinados a reducir la latencia de propagación de bloques. ¿Por qué se está poniendo tanto esfuerzo en esto? ::: ### Ejercicios :::info 1. Create a diagram explaining the "handshake" between nodes and share it with your colleagues. 2. On your Bitcoin node, run the following command: ```sass $ bitcoin-cli getpeerinfo ``` 3. Check the result and debate with your peers what information is giving you. ::: :::spoiler _En español_ :::info 1. Crea un diagrama explicando el “handshake” entre nodos y compártelo con tus compañeros. 2. En tu nodo de Bitcoin, ejecuta el siguiente comando: ```sass $ bitcoin-cli getpeerinfo ``` 3. Revisa el resultado y discute con tus compañeros que información te está dando. ::: :::