... | ... | @@ -4,22 +4,22 @@ El trie `Root` contiene el estado actual del blockchain. Si hay cambios en el *w |
|
|
|
|
|
Como esta definido en `core/block.go`, un *block header* (cabeza de bloque) tiene el siguiente formato:
|
|
|
|
|
|
| **bytes** | **Nombre en Go** | **Tipo** | **Nombre en geth** |
|
|
|
|-------:|--------------|----------------|-------------------------|
|
|
|
| 64 | ParentHash | common.Hash | json:"parentHash" |
|
|
|
| 64 | UncleHash | common.Hash | json:"sha3Uncles" |
|
|
|
| 40 | Coinbase | common.Address | json:"miner" |
|
|
|
| 64 | Root | common.Hash | json:"stateRoot" |
|
|
|
| 64 | TxHash | common.Hash | json:"transactionsRoot" |
|
|
|
| 64 | ReceiptHash | common.Hash | json:"receiptsRoot" |
|
|
|
|256 | Bloom | [256]byte | json:"logsBloom" |
|
|
|
| 8 | Difficulty | int64 | json:"difficulty" |
|
|
|
| 8 | Number | int64 | json:"number" |
|
|
|
| 8 | GasLimit | uint64 | json:"gasLimit" |
|
|
|
| 8 | GasUsed | uint64 | json:"gasUsed" |
|
|
|
| 8 | Time | int64 | json:"timestamp" |
|
|
|
| 97[^1] | Extra | []byte | json:"extraData" |
|
|
|
| 64 | MixDigest | common.Hash | json:"mixHash" |
|
|
|
| 8 | Nonce | [8]byte | json:"nonce" |
|
|
|
| **bytes** | **Nombre en Go** | **Tipo** | **Nombre en geth** |
|
|
|
|-------:|--------------|----------------|------------------|
|
|
|
| 64 | ParentHash | common.Hash | parentHash |
|
|
|
| 64 | UncleHash | common.Hash | sha3Uncles |
|
|
|
| 40 | Coinbase | common.Address | miner |
|
|
|
| 64 | Root | common.Hash | stateRoot |
|
|
|
| 64 | TxHash | common.Hash | transactionsRoot |
|
|
|
| 64 | ReceiptHash | common.Hash | receiptsRoot |
|
|
|
|256 | Bloom | [256]byte | logsBloom |
|
|
|
| 8 | Difficulty | int64 | difficulty |
|
|
|
| 8 | Number | int64 | number |
|
|
|
| 8 | GasLimit | uint64 | gasLimit |
|
|
|
| 8 | GasUsed | uint64 | gasUsed |
|
|
|
| 8 | Time | int64 | timestamp |
|
|
|
| 97[^1] | Extra | []byte | extraData |
|
|
|
| 64 | MixDigest | common.Hash | mixHash |
|
|
|
| 8 | Nonce | [8]byte | nonce |
|
|
|
|
|
|
[^1]: El único campo con un tamaño flexible es el `Extra`. Esta compuesto por 32 bytes de Vanity + 65 bytes con la firma del bloque. Cada 30.000 bloques (un epoch), también tiene una lista (n * 64 bytes) de todos los selladores. |
|
|
\ No newline at end of file |