# Capítulo 3: *"Bitcoin Core: The Reference Implementation"*
###### tags: `MB`
[TOC]
## Material Principal
Para esta sesión socrática debes instalar un nodo de Bitcoin, puedes apoyarte en este material: [Tutoriales para instalar nodos de Bitcoin](/jprsYssCTvuunqevvvzkZw).
También debes leer el [Capítulo 3: *"Bitcoin Core: The Reference Implementation"*](https://github.com/bitcoinbook/bitcoinbook/blob/develop/ch03.asciidoc) 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) |
|:-------- |:--------:|
|[Descarga inicial de Bloques](https://btctranscripts.com/es/andreas-antonopoulos/2018-10-23-andreas-antonopoulos-initial-blockchain-download/)| 10|
|[Bitcoin Core](https://es.wikipedia.org/wiki/Bitcoin_Core)| 30|
|[Conociendo la configuracion de Bitcoin Core](https://github.com/BlockchainCommons/Learning-Bitcoin-from-the-Command-Line/blob/spanish-translation/es/03_2_Conociendo_Su_Configuracion_Bitcoin.md)| 60|
|[Configuración del nodo de Bitcoin](https://dinerosinreglas.com/nodeconfiguration/)| 30|
## Preguntas
:::warning
🛑 Antes de resolver las preguntas del capítulo, revisa las instrucciones de trabajo de la sesión [aquí](https://hackmd.io/E5ZmWkcZRXi5K77gw0CVlg#Instrucciones-de-aprendizaje)
:::
1. What's the difference between a _"pruned node"_ and a _"full_ node"?
2. What is _"bitcoind"_ and how does it work?
3. Do you consider it important to have a node?, Why?
4. What does the term _"indexing transaccions"_ refer to?, What are its advantages and disadvantages, and where is it configured?
5. How does the _"Initial Block Download"_ work?, Can you process transactions while it happens?
6. Where is the _"bitcoin.conf"_ file located at, and how is it important for Bitcoin Core? is it created or do you have to?
7. What's the use of running Bitcoin Core in the background, and what command is used for it?
8. Bitcoin Core implements a JSON-RPC interface, how does it work?
:::spoiler _En español_
1. ¿Cuál es la diferencia entre un _"nodo podado"_ y un _"nodo completo"_?, ¿ambos son seguros?
2. ¿Qué es _"bitcoind"_ y cómo funciona?
3. ¿Consideras que es importante tener un nodo?, ¿por qué?
4. ¿A qué se refiere el término indexar las transacciones?, ¿qué ventajas o desventajas tiene y dónde se configura?
5. ¿Cómo funciona la _"descarga inicial de bloques"_?, ¿se pueden procesar transacciones mientras esto ocurre?
6. ¿Dónde se encuentra el archivo de configuración bitcoin.conf y qué importancia tiene para Bitcoin Core?, ¿se crea o lo creas?
7. ¿De qué nos sirve ejecutar Bitcoin Core en segundo plano y con qué comando se ejecuta?
8. Bitcoin Core implementa una interfaz JSON-RPC, ¿cómo funciona?
:::
## Ejercicios
:::info
1. If you have an indexed testnet node, run the following commands:
```sass
bitcoin-cli getrawtransaction 5a1594706cc3304091f6d9525413bb27f625d99d94aea2467637b0554827498c 1
```
- Specify what the following fields mean and what is their content: **size, vsize, vin, vout, blocktime.**
- Repeat the command with a different txid.
```sass
bitcoin-cli getblock 00000000000000670c5b09b16b576faa4dee230bf10a4945fb996501b82370ac
```
- Specify what the following fields mean and what is their content: **hex, totalfees, confirmations.**
- Repeat the command with a different block hash.
2. If you don't have a node, you could do the exercise using the following commands:
- Install curl in Linux
```sass
curl apt-get install curl
```
- Install curl in macOS
```sass
brew install curl
```
- Curl is already installed in Windows 10
- Once you've installed curl, run the following commands:
```sass
curl -s 'https://testnet.bitcoinexplorer.org/api/tx/5a1594706cc3304091f6d9525413bb27f625d99d94aea2467637b0554827498c'
```
- Specify what the following fields mean and what is their content: **size, vsize, vin, vout, blocktime.**
- Repeat the command with a different txid.
```sass
curl -s 'https://testnet.bitcoinexplorer.org/api/block/00000000000000670c5b09b16b576faa4dee230bf10a4945fb996501b82370ac'
```
- Specify what the following fields mean and what is their content: **hex, totalfees, confirmations.**
- Repeat the command with a different block hash.
:::
:::spoiler _En español_
:::info
1. Si tienes un nodo de testnet indexado ejecuta los siguientes comandos:
```sass
bitcoin-cli getrawtransaction 5a1594706cc3304091f6d9525413bb27f625d99d94aea2467637b0554827498c 1
```
- Especifica lo que significan los siguientes campos y lo que contienen: **size, vsize, vin, vout, blocktime.**
- Repite el comando con otra txid.
```sass
bitcoin-cli getblock 00000000000000670c5b09b16b576faa4dee230bf10a4945fb996501b82370ac
```
- Especifica lo que significan los siguientes campos y lo que contienen: **hex, totalfees, confirmations.**
- Repetir el comando con otro hash de bloque.
2. Si no tienes un nodo puedes hacer el ejercicio con los siguientes comandos:
- Instalar curl en Linux
```sass
curl apt-get install curl.
```
- Instalar curl en MacOS
```sass
brew install curl
```
- Para windows 10 curl ya está instalado por defecto
- Una vez instalado curl, ejecuta los siguientes comandos:
```sass
curl -s 'https://testnet.bitcoinexplorer.org/api/tx/5a1594706cc3304091f6d9525413bb27f625d99d94aea2467637b0554827498c'
```
- Especifica lo que significan los siguientes campos y lo que contienen: **size, vsize, vin, vout, blocktime.**
- Repite el comando con otra txid.
```sass
curl -s 'https://testnet.bitcoinexplorer.org/api/block/00000000000000670c5b09b16b576faa4dee230bf10a4945fb996501b82370ac'
```
- Especifica lo que significan los siguientes campos y lo que contienen: **hex, totalfees, confirmations.**
- Repite el comando con otro hash de bloque.
:::