From the course: Blockchain and Smart Contracts Security

What is blockchain?

- [Narrator] Blockchain is a decentralized and distributed ledger. A crude but easy way to internalize the concept of blockchain in your mind is to think of it as a special kind of database where the data is spread and stored across geographically distributed machines and without a single database administrator or a management layer. The reason it is called blockchain is data is stored in a series of blocks where one block is linked to its predecessor, almost like a chain. Hence the name blockchain. What makes blockchain unprecedented from other technologies is the combination of unique features it carries. It is distributed, decentralized, immutable, consensus driven and highly available. Let's review them, one by one. As a user, when you write data to blockchain, the data is replicated to multiple computers, or, also known as nodes. In fact, a node in a blockchain network may hold a copy of the entire database, sometimes also known as a ledger. Now keep in mind that a distributed system can be centralized, meaning it is operated and managed by a central governing body. Or it can be decentralized where it is not managed by such a controlling entity. Blockchain is a decentralized distributed system. The nodes of the blockchain coordinate with each other using specialized protocols to ensure that the data is recorded in a manner the user intended to. To illustrate these concepts of distributed and decentralized, let's take an example of an application that many of you are likely to be familiar with, the Bitcoin. Bitcoin is a cryptocurrency that uses blockchain technology, its network, and specialized protocols. Bitcoin network is a peer to peer network of distributed nodes. A node is just another word for a computer. Now that computer could very well be the computer you are on right now, provided it has the right software and configuration. When you send or receive Bitcoins to another person using a mobile wallet app, you are announcing to the distributed Bitcoin network that you have a transaction you wish to conduct. You also expect the underlying blockchain ecosystem to verify the financial accounting and finally record the transaction onto the blockchain ledger. No bank or financial institution is sitting between you, that is the sender, and the receiver, that is going to validate or even facilitate this transaction. While decentralized implies that there is no central authority to approve what gets written to the blockchain. But does it mean anyone can write to blockchain, whatever and whenever they wanted to? Wouldn't that be a security problem? Blockchain has another feature where data is written only after the changes have been approved by multiple participating nodes of the blockchain network. In other words, nodes must reach a consensus on what block is added to the chain of blocks. We will cover the concept of consensus in blockchain and security threats in depth later. Blockchain is an append only database. That means someone can't go back and alter the blocks of data at a previous time. Once data is written to blockchain it cannot be altered. In the security nomenclature this feature is known as immutability. Since the blockchain is distributed, meaning the data is replicated across nodes, if some of the nodes malfunction and leave the network or in the worst case, they become rogue, blockchain protocols will ensure the blockchain network continues to remain functional and the data remains accessible at all times. Blockchain records are public, meaning anyone can see the record of transactions published on the blockchain ledger. That said, some blockchains can be set up as private but most widely adopted blockchains today, such as Bitcoin and Ethereum are public. Obviously the public nature allows anyone to audit and spot any discrepancies but it can also be a privacy concern. So we reviewed the unique features of blockchain but before we dig deeper into security aspects of the blockchain, let's digress and take a look at another use case for blockchain that is beyond cryptocurrencies but has profound implications if not secured.

Contents