What’s in a block?

By | February 26, 2016


If you’ve spent some time reading up on the fundamentals of bitcoins and the block chain but felt it was way over your head, here it is from another angle.

Reading the likes of:

can be a bit daunting so I’ve created some pretty pictures instead.

The secret sauce at the source

Analyzing a single block is a good starting point. It is not actually that hard to view a single block. You can see the command I ran, but it did take a while to understand it.

Screen Shot 2016-02-23 at 5.13.03 PM

Here is the very first block that was ever created called the “genesis” block. You can see the hexadecimal representation in the centre column and the ASCII on the right. 5 different parts of the block can be identified. The magic number, block size, block header, transaction count and transaction.See the diagram below.

Screen Shot 2016-02-23 at 5.17.55 PM

But wait. There’s more!

The block header and the transactions portion can be expanded.

Screen Shot 2016-02-23 at 5.21.32 PM

The updated block diagram shows the composition of the block header (6 further fields within) and the transaction (also 6 further fields).

Are we there yet?

Almost. The list of inputs and list of outputs in the transaction portion can also be expanded.

Screen Shot 2016-02-23 at 5.32.31 PM

Pictures are worth a thousand words as they say. Now, hopefully those links make more sense.

Other points

Block Size

Understanding a block composition allows insight into other concepts also. For example, the recent bitcoin scaling debate of increasing the block size. The transactions in a block are not fixed in size or capped. They are of type Var Int which meansĀ it’s of type integer but the size is variable. Does this mean you can put as many transactions as you want here? Yes…. but it’s thisĀ line of code that will stop you.

Screen Shot 2016-02-24 at 2.54.06 PM

Note this is in contrast to bitcoinClassic where the size is currently 2Mb.

Screen Shot 2016-02-24 at 3.02.13 PM

Smart Contracts

The capabilities and potential of smart contracts has been widely publicised. For example, a smart contract is where 3 out of 5 board member’s signatures are required to pass a vote. This can be programmed into the ScriptSig field which lies in the transaction input. Only when the condition is met, will the rule execute.


It’s great that new applications are being dreamt up everyday utilising the “block chain” technology. From all the hype, it feels as if humanity itself is changing. Regardless though, understanding how things work is the first step in the entire process.

One thought on “What’s in a block?

  1. Pingback: Wellington Blockchain Meetup: Securing Transactions on the Blockchain – Talk Crypto Blog

Leave a Reply

Your email address will not be published. Required fields are marked *