Blockchain – Part 2: Under the Hood

From nodes to hashes, here’s a look at the underlying structure of how a blockchain works.


Roll up your sleeves and get ready to have an up-close look at the technology behind blockchains. Last month (Technophilia, September) we explored what blockchains do. This month we’ll look at the underlying structure of how a blockchain works.

To recap: blockchain technology is what made Bitcoin possible. A blockchain is a database of transactions. It is publicly maintained by a network of computers or nodes (see below for more on nodes). The distributed locations of the nodes ensure that no one entity owns the blockchain. The technology ensures that all copies are constantly synchronized to keep the transactions up to date.

While there’s been a lot of buzz about how revolutionary blockchains are, the fact is we’ve been using their foundational concepts since financial reporting was established. The best example is retained earnings.

HOW A BLOCKCHAIN WORKS

A company pays October’s office rent. This authorized payment — cheque number, payee and amount — is recorded in chronological order in the general ledger by a bookkeeper. All income statement transactions are combined to produce net income for the year. Net income is then added to retained earnings. The following year’s transactions are then recorded. Retained earnings reflect all income statement transactions since the company’s beginning. This is a one-way function. In other words, you can’t figure out what October’s rent payment was by reviewing retained earnings.

Now, let’s reword this exact transaction in blockchainspeak: a single encrypted multiple field transaction’s hash (or value) is broadcast to all nodes. The nodes confirm the authenticity of the sender and record the hash in their database. All transaction hashes recorded in a block of time are then combined to provide a single hash of the block. The block hash is then added to the blockchain. (I hope you aren’t getting lost in all of the technobabble.)

HASH DEFINED

We communicate with computers via binary digits, which are a series of ones or zeros representing electronic on and off positions. All digital words, images, music and video are simply unique binary strings of ones and zeros. A hash is a fixed-length label used as an identifier of addresses, transactions and blocks. It can represent where you would find the land deed for your home, the rent payment for October or the block of transactions that produce net income.

A hash is produced by running a binary string through a hash function that applies an algorithm that performs some mathematical magic on the binary string to create a fixed-length alphanumeric value — a hash. Part of the mathematical magic is achieved via cryptography’s public/private keys to ensure secure transmission. You can search for a specific hash with a blockchain explorer.

A WORD ON NODES

The blockchain is a decentralized peer-to-peer network that maintains a publicly accessible ledger of transactions. A blockchain transaction is announced to anyone who is listening. These transactions are recorded at all locations on the network. A node is simply a computer connected to the Internet that listens for and then records a blockchain’s new transactions.

The nodes verify the authenticity of the transaction by confirming with other nodes that the sender of the transaction has the right to do so as verified by all the independently maintained copies of the blockchain. If they agree, then each node votes to add the transaction to the current block.

WHAT IT ALL MEANS

In the 1990s, when the Internet first emerged, most of us did not have a clue how fundamental or far-reaching its impact would be on our daily lives. Hello, Google, Facebook, Skype and cloud computing. It’s expected that blockchains will be just as game-changing. Imagine a future without the arbitrary influences of the government’s central bank, the burden of working through third parties such as banks and investment brokers, or the need to cast your vote from a specified location. In other words, blockchains make possible a future that is not based on locking everyone out but rather a future of transparency that is based upon letting everyone in.

This post was originally published in CPA Magazine