What is BlockChain? – Part 2 – Forging The Chain

Posted: August 9, 2016 in Work Stuff

In Part 1 I discussed the technologies that make up the Blocks themselves, adding a block to the end of the chain and handle the distribution of the final BlockChain. Now we can consider how we protect each block in the chain and how we can ensure that the chain stays unbroken.

Changing A Block

We have a new block with the contents all secured and consensus has agreed that this block will be added to the end of the chain. What is to stop someone from removing a previously created block from the chain and replacing it with something else?

If we calculate the hash of the contents of the previous block we can then use this ‘signature hash’ value as part of the process of adding the new block on the end of the chain.


Screen Shot 2016-08-09 at 10.50.22

If the contents of a block is changed, the ‘signature hash’ will be different from the one stored in the next block of the chain and everyone will know that it has been changed. Consensus ensures that only consistent chains exist and that broken chains get dropped.


We’ve shown that the BlockChain won’t allow alterations to existing blocks, how could we add a false block to the end?

  • Create a false block that contains the fake data and the correct references to the previous block in the chain.
  • Control 51% of all the nodes in the network and force them all to agree that the false block should be the new one.
  • Do all this before the network decides which block to add to the chain as part of the normal process. FYI – BitCoin currently adds 9304 blocks per hour to the chain or 2.5 every second.

Smart Contracts

Smart Contracts are the next iteration of the original BlockChain concept.

They work on the idea of storing a small program within the BlockChain that can then run in its own virtual machine when required. When invoked this contract programme can then be used to validate, enforce and manage transactions between two or more parties in a trusted way without requiring the services of a middleman.

The outcome of this invocation can then be written back to the BlockChain or to local contract storage where it will remain.

Smart Contracts Vulnerabilities

While seen as the next big thing int an already big thing, Smart Contracts are still trying to establish themselves in real world use.

As they use ‘Turing Complete’ languages to define the contract they are vulnerable to poor coding or flaws in the underlying virtual machine. Development environments are still immature increasing the risks further.

Ethereum ‘lost’ ~$53 million because they built a VM and a language that had flaws that were exploited to make contracts do unexpected things, in this case transfer the holdings to another account within the Ethereum ecosystem.

N.B. This issue has since been rectified by basically rolling back to a point in the ledger prior to the loss and then forcing a fork in the BlockChain where the monies never left the DAO. This has caused a debate in that it proves that the BlockChain is not inviolate – if enough people say so, the BlockChain can be changed and more importantly there are no attempts to fix the underlying issues in the VM and language itself. So in theory this loss could be replicated again in the future.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s