I know bitcoin has a block chain that is from my best representation a list of blocks. I know the block holds many transactions. But i'm still very much lost as to what a block is and how a block can be the function of the transactions at the time prior to the block being solved and how a block can have any number of transactions prior to it being solved and locked in.

I'm also lost on the process of "solving" a block. I know it requires computers encrypting the transaction. If a block is multiple transaction would that imply that you have to solve all the transactions to get the block.


1 Answer 1


There are a lot of questions on the Bitcoin SE about blocks, but remarkably I couldn't find any that explicitly lay out what a block is.

A blocks has two things: A block header and a list of transactions.


  • Block Header
    • Version Number (4 byte integer)
    • Previous Block Id (32 byte hash)
    • Merkle Root (32 byte hash)
    • Time (4 byte integer)
    • Difficulty (4 byte integer)
    • Nonce (4 byte integer)
  • List of Transactions
    • Number of transactions in List
    • Tx1
    • Tx2
    • ...
    • TxN

In the block header part of the block:

  1. The version number is a parameter to help in updating how blocks are treated by the network.
  2. The reference to the hash of the previous block is what makes the group of blocks a "block chain".
  3. The merkle root is hash that can be used to prove that a transaction is in the block without providing all of the details of the block (this is a bit complicated, see this for more info).
  4. The time field is to show the network what time the block was solved at, and to help in calculating the difficulty parameter.
  5. The difficulty (or nBits as it is called in the code) is shorthand for how difficult it is to solve the block. Essentially, it encodes a target value, and the hash of the block (when treated as a 256 bit integer) must be below that target value to be considered solved.
  6. The nonce (number used once) is just an integer that miners can change repeatedly to hash the header and get a different result each time, hoping to get a hash that is below the difficulty value encoded by the previous parameter.

The list of transactions is fairly straightforward, it's just the number of transactions and then the transactions themselves concatenated together.

Take for example the genesis block. The raw bytes are:


When we break this up, we can see what is in it:

01000000                                                          // Version
0000000000000000000000000000000000000000000000000000000000000000  // Hash Previous Block
3ba3edfd7a7b12b27ac72c3e67768f617fc81bc3888a51323a9fb8aa4b1e5e4a  // Merkle Root
29ab5f49                                                          // Time
ffff001d                                                          // Difficulty
1dac2b7c                                                          // Nonce
01                                                                // Number of Transactions

When you hash the block header of the genesis block, you get:


See how it starts with all these zeroes? That's because many many tries were taken (changing the nonce each time) until the miner was lucky enough to find a nonce that makes the block header hash to a low enough value (look at the hash as a hex encoded integer, with the most significant bits on the left, and the least significant on the right).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.