Skip to content

Instantly share code, notes, and snippets.

@RobertBarrow
Last active March 12, 2018 11:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RobertBarrow/50da73e096bf09b9beebd4be0501c1fd to your computer and use it in GitHub Desktop.
Save RobertBarrow/50da73e096bf09b9beebd4be0501c1fd to your computer and use it in GitHub Desktop.
Blockchain - Distributed Ledger Technologies (DLT)

Blockchain - Distributed Ledger Technologies (DLT)

Looking back to the last half century of computer technologies and architectures, one may observe a trend of fluctuation between the centralization and subsequent decentralization of computing power, storage, infrastructure, protocols, and code.

Mainframe computers are largely centralized. They typically house all computing power, memory, data storage, and code. Access to mainframes is mainly by 'dumb terminals', which only take inputs and outputs, and do not store or process data.

With the advent of personal computers and private networks, similar computational capabilities were now housed both on the clients, as well as the servers. This, in part, gave rise to the 'client-server' architecture, which supported the development of relational database systems. Massive data sets, which are housed on mainframes, could move onto a distributed architecture. This data could replicate from server to server, and subsets of the data could be accessed and processed on clients, and then, synced back to the server.

Over time, Internet and cloud computing architectures enabled global access from a variety of computing devices; whereas mainframes were largely designed to address the needs of large corporations and governments. Even though this 'cloud architecture' is decentralized in terms of hardware, it has given rise to application-level centralization (e.g. Facebook, Twitter, Google, etc).

Currently, we are witnessing the transition from centralized computing, storage, and processing to decentralized architectures and systems. According to Muneeb Ali, these systems aim to

"give explicit control of digital assets to end-users and remove the need to trust any third-party servers and infrastructure".

Distributed ledger technology is one of the key innovations making this shift possible.

A distributed ledger is a type of data structure which resides across multiple computer devices, generally spread across locations or regions.

Distributed Ledger Technology includes blockchain technologies and smart contracts. While distributed ledgers existed prior to Bitcoin, the Bitcoin blockchain marks the convergence of a host of technologies, including timestamping of transactions, Peer-to-Peer (P2P) networks, cryptography, and shared computational power, along with a new consensus algorithm.

In summary, distributed ledger technology generally consists of three basic components:

  • A data model that captures the current state of the ledger
  • A language of transactions that changes the ledger state
  • A protocol used to build consensus among participants around which transactions will be accepted, and in what order, by the ledger.

According to hyperledger.org:

"A blockchain is a peer-to-peer distributed ledger forged by consensus, combined with a system for "smart contracts" and other assistive technologies."

  • Consensus refers to a system of ensuring that parties agree to a certain state of the system as the true state.

  • Smart contracts are simple computer programs that execute predefined actions when certain conditions within the system are met.

Quote: "Blockchain Technology" as described by Robert Schwentker of the "Hyperledger" project (by "The Linux Foundation"):

A blockchain is a peer-to-peer distributed ledger, forged by consensus, combined with a system for smart contracts and other assistive technologies.

Together, these can be used to build a new generation of transactional applications that establish trust, accountability, and transparency at their core, while streamlining business processes and legal constraints.

With all distributed ledgers, there's an initial record or, in this case, a block, or a genesis block.

Each block will include one or more transactions.

Connecting to a blockchain involves people connecting to this distributed ledger via, typically, an application.

So, an example of this would be a wallet.

One person may transfer ownership of a digital asset, like a cryptocurrency, from one person to another, and that asset will move from one person's wallet to another person's wallet, and then, that transaction will be shown on a blockchain.

So, this distributed ledger transaction, such as a payment, will move from peer-to-peer throughout the network, and there's no intermediaries, like a bank, or a payment company, to process this transaction.

Can you give an example of a blockchain which has been in production since a few years?

Sure, Navroop. Blockchain is actually best known because of Bitcoin.

And Bitcoin's blockchain has been in existence since 2009.

It's a cryptocurrency, but, interestingly, people confuse the two terms.

Blockchain is actually not Bitcoin, or vice versa.

Blockchain is a distributed ledger. The blockchain then tracks various assets, other than cryptocurrencies, such as Bitcoin.

Those transactions are grouped into blocks, and there can be any number of transactions per block.

Turns out, nodes or machines on a blockchain network group up these transactions and they send them throughout the network.

So, you've mentioned how blockchains operate on peer-to-peer nodes.

How do they all sync up?

So, the process of blockchains syncing up have to do with a concept of consensus - an agreement among the network peers.

So, eventually, each machine has an exact copy of the blockchain throughout the network.

Source: https://youtu.be/wphKFa62pho

Blockchain is a specific form or subset of distributed ledger technologies, which constructs a chronological chain of blocks, hence the name 'block-chain'. A block refers to a set of transactions that are bundled together and added to the chain at the same time. In the Bitcoin blockchain, the miner nodes bundle unconfirmed and valid transactions into a block. Each block contains a given number of transactions. In the Bitcoin network, miners must solve a cryptographic challenge to propose the next block. This process is known as 'proof of work', and requires significant computing power. We shall discuss proof of work in more detail in the Consensus Algorithms section. For a brief history of blockchain technology, please click here.

Timestamping is another key feature of blockchain technology. Each block is timestamped, with each new block referring to the previous block. Combined with cryptographic hashes, this timestamped chain of blocks provides an immutable record of all transactions in the network, from the very first (or genesis) block.

A block commonly consists of four pieces of metadata:

  • The reference to the previous block
  • The proof of work, also known as a nonce
  • The timestamp
  • The Merkle tree root for the transactions included in this block.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment