Understanding Blockchain technology using slightly older technologies

Blockchain technology, such as that underlying Bitcoin, is conceptually similar to a few earlier technologies. This is an attempt to convey how older technologies correlate to Blockchain to help people who are familiar with public key encryption to understand Blockchain.

Blockchain generally aims to be fully distributed, to provide trust within an environment where each participant may not be trustworthy, to provide sequencing in an environment where timestamps can’t be trusted as an accurate way to avoid “double spending,” to ensure that records cannot be altered, and to convey ownership.

Fundamentally, Blockchain is exactly what it sounds like, a chain of blocks. It is very similar to a linked-list, except it uses hashes of the block information to reference the previous block instead of the memory address of a linked-list structure. A block is a data structure that contains data, programming code, and other information stored within the block.

The blockchain network operates somewhat like the Bittorrent application, where peers connect to each other, data is replicated, and multiple nodes can contain the same data. When the Bitcoin application is started, it tries to connect with peer hosts by trying a few different methods, including attempting to contact the most recently contacted hosts, attempting to contact a few DNS seed hosts coded into the application, and finally attempting some hard coded IP addresses. Full nodes on the Bitcoin network download all transactions, so the entire chain is replicated by each full node.

Bitcoin blocks have traditionally had a 1MB maximum block size. The Bitcoin Cash fork has increased the limit to 8MB. Bitcoin also has a programming language called Script that does not loop, so it always terminates, and that only provides stack based memory using opcodes similar to assembly language that has codes for blockchain operations.

Bitcoin utilizes elliptic curve digital signature algorithm (ECDSA) for public keys and digital signatures. This is very similar to the following GPG commands:

gpg --clearsign block.txt # to sign block.txt, containing your block transaction into block.txt.asc
gpg --armor --export your@email.com # to export your public key that can verify the signatures

and then distributing those two items to the network, for instance on Bittorrent, to be replicated and verified by the “miners.”

Providing trust within an untrusted environment and sequencing within Bitcoin is the function of “miners.” Bitcoin mining is an implementation of the Byzantine Generals problem, which reaches consensus when presented with differing information by requiring proof of work. In the case of Bitcoin, this proof of work entails brute force calculations of the double SHA-256 hash value of a combination of block information, then trying different 32 bit “nonce” values. This “proof of work” determination of the nonce value that produces a hash value lower than the difficulty threshold serves to verify the sequencing and legitimacy of transactions by ensuring that sufficient computational power was devoted by the network to determine the block should be in the blockchain.

In Bitcoin, the hash is calculated by concatenating the block number, Nonce, Coinbase, Transaction List, Previous Block Hash and then applying SHA-256.

The algorithm automatically adjusts the difficulty to target approximately 10 minutes for the network to solve finding the SHA-256 value by specifying the number of leading zeros in the threshold that the resulting SHA-256 needs to be below. The more zeros, the smaller the resulting value, the more difficult it is to determine.

The Bitcoin specific implementation of block hashing is described in detail at https://en.bitcoin.it/wiki/Block_hashing_algorithm

H2
H3
H4
3 columns
2 columns
1 column
Join the conversation now