Capítulo 3: “Bitcoin Core: The Reference Implementation”
Material Principal
Para esta sesión socrática debes instalar un nodo de Bitcoin, puedes apoyarte en el material: Tutoriales y Talleres, sección: «Nodos de Bitcoin»
También debes leer el Capítulo 3: “Bitcoin Core: The Reference Implementation” del Libro Mastering Bitcoin. Estos son los enlaces a la segunda edición del libro en inglés y la versión del libro en español. 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.
⚠️ 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.
🛑 Antes de resolver las preguntas del capítulo, revisa las instrucciones de trabajo de la sesión
aquí
- What’s the difference between a “pruned node” and a "full node"?
- What is “bitcoind” and how does it work?
- Do you consider it important to have a node?, Why?
- What does the term “indexing transaccions” refer to?, What are its advantages and disadvantages, and where is it configured?
- How does the “Initial Block Download” work?, Can you process transactions while it happens?
- Where is the “bitcoin.conf” file located at, and how is it important for Bitcoin Core? is it created or do you have to?
- Where are the transactions stored?
- In the configuration file you could add “txindex=1”, What does it work for?, what happens if it’s set to “0”?
- What’s the use of running Bitcoin Core in the background, and what command is used for it?
- Bitcoin Core implements a JSON-RPC interface, how does it work?
+ EN ESPAÑOL
- ¿Cuál es la diferencia entre un “nodo podado” y un “nodo completo”?, ¿ambos son seguros?
- ¿Qué es “bitcoind” y cómo funciona?
- ¿Consideras que es importante tener un nodo?, ¿por qué?
- ¿A qué se refiere el término indexar las transacciones?, ¿qué ventajas o desventajas tiene y dónde se configura?
- ¿Cómo funciona la “descarga inicial de bloques”?, ¿se pueden procesar transacciones mientras esto ocurre?
- ¿Dónde se encuentra el archivo de configuración bitcoin.conf y qué importancia tiene para Bitcoin Core?, ¿se crea o lo creas?
- ¿Dónde se guardan las transacciones?
- En el archivo de configuración se puede agregar “txindex=1”, ¿para qué sirve?, ¿qué pasa si está en “0”?
- ¿De qué nos sirve ejecutar Bitcoin Core en segundo plano y con qué comando se ejecuta?
- Bitcoin Core implementa una interfaz JSON-RPC, ¿cómo funciona?
Ejercicios
- If you have a node, run the following commands:
- bitcoin-cli getrawtransaction 6eff78915a5ef60c794aa990f205573d9a8168b7ed01b6d63c00933014e20564 1
- Specify what the following fields mean and what is their content: size, vsize, vin, vout, blocktime.
- Repeat the command with a different txid.
- bitcoin-cli getblock
0000000000000000001c8018d9cb3b742ef25114f27563e3fc4a1902167f9893
- Specify what the following fields mean and what is their content: hex, totalfees, confirmations.
- Repeat the command with a different block hash.
- If you don’t have a node, you could do the exercise using the following commands:
- Install curl in Linux
- curl apt-get install curl
- Install curl in macOS
- brew install curl
- Curl is already installed in Windows 10
- Once you’ve installed curl, run the following commands:
- curl -s 'https://bitcoinexplorer.org/api/tx/6eff78915a5ef60c794aa990f205573d9a8168b7ed01b6d63c00933014e20564' | jq -C
- Specify what the following fields mean and what is their content: size, vsize, vin, vout, blocktime.
- Repeat the command with a different txid.
- curl -s 'https://bitcoinexplorer.org/api/block/0000000000000000001c8018d9cb3b742ef25114f27563e3fc4a1902167f9893' | jq -C
- Specify what the following fields mean and what is their content: hex, totalfees, confirmations.
- Repeat the command with a different txid.
- Si tienes un nodo ejecuta los siguientes comandos:
- bitcoin-cli getrawtransaction 6eff78915a5ef60c794aa990f205573d9a8168b7ed01b6d63c00933014e20564 1
- Especifica lo que significan los siguientes campos y lo que contienen: size, vsize, vin, vout, blocktime.
- Repite el comando con otra txid.
- bitcoin-cli getblock
0000000000000000001c8018d9cb3b742ef25114f27563e3fc4a1902167f9893
- Especifica lo que significan los siguientes campos y lo que contienen: hex, totalfees, confirmations.
- Repetir el comando con otro hash de bloque.
- Si no tienes un nodo puedes hacer el ejercicio con los siguientes comandos:
- Instalar curl en Linux
- curl apt-get install curl
- Instalar curl en MacOS
- brew install curl
- Para windows 10 curl ya está instalado por defecto
- Una vez instalado curl, ejecuta los siguientes comandos:
- curl -s 'https://bitcoinexplorer.org/api/tx/6eff78915a5ef60c794aa990f205573d9a8168b7ed01b6d63c00933014e20564' | jq -C
- Especifica lo que significan los siguientes campos y lo que contienen: size, vsize, vin, vout, blocktime.
- Repite el comando con otra txid.
- curl -s 'https://bitcoinexplorer.org/api/block/0000000000000000001c8018d9cb3b742ef25114f27563e3fc4a1902167f9893' | jq -C
- Especifica lo que significan los siguientes campos y lo que contienen: hex, totalfees, confirmations.
- Repite el comando con otro hash de bloque.