What is a blockchain? To explain blockchain technology we must first understand the basis of a computer network. There are two main network architectures:
- Client-server model
- Peer-to-peer model (P2P)
In client-server model, there is a system that holds and provides the resources—the server, and one or more devices—the clients, that access the data or services provided by the server. An example could be the internet, when you perform a search on Google, your browser (the client) sends a request to Google (the server) which then returns the requested data. This architecture is slower and has a single point of failure.
A P2P network is a collection of nodes or peers in an egalitarian model, which means there are no hierarchies and all have the same privileges. The nodes can both request and supply data, they are faster and there is no single point of failure. Their main purpose is file and data sharing.
Blockchain is a peer-to-peer network, or a network of nodes. The blockchain can be seen as a decentralized database where data is not stored in a single location but across millions of computers, and all the records are public. Imagine it like a spreadsheet that anybody can access at the same time but no record can be deleted—intentionally or accidentally.
Why do we need blockchain technology? What is its purpose?
In 2008 during the economic crisis, people has lost faith in financial institutions and the government’s ability to regulate financial markets. Blockchain was developed as an attempt to replace financial institutions in their roll of policing financial transactions. Instead of trusting one single institution, a new concept is in place, decentralization, which puts the authority back to the individuals. Among other advantages, blockchain technology takes human error out of the equation, transactions can occur at high speed and very low cost, the records are public but secured, and most importantly, there is no single point of failure in the network.
How does blockchain work?
How can you develop trust between millions of total strangers and at the same time prevent fraud? The secret is in its name: “block” “chain”. A block is a list of transactions that happen in the network in a defined period of time, once a block has been secured in the network, it is linked to the previous block through cryptographic algorithms, this process continues one block at the time, creating a blockchain. Each blockchain has a ledger that includes all the information pertaining every single transaction that ever occurred. Every node in in the blockchain has a copy of the ledger, which is updated every time a record is added and its verified in the network by consensus. Once a transaction has been verified in the network a unique string of characters is created, known as a transaction hash.
What is a hash?
A hash value is the result of a one-way cryptographic function which always produces the same output given the same input. Take for example the hashes of the words “Slicecore” and "slicecore"using SHA-1 (SHA = Secure Hash Algorithm) and notice how the lowercase "s" caused the hash to be completely different.
The strength of a blockchain is typically in its immutability properties. You would not want a distributed bank ledger where any one of the million users could change your account balance at anytime. To achieve this immutability a blockchain implements hashing. Remember how changing "S" to "s" caused a completely different hash? Well, if you were to attempt to alter data in a block then the network would not be able to validate that change. An attacker must control more than half of the network to cause some damage (known as the 51% attack), and even then, he cannot reverse other people’s transactions, prevent transactions from being sent or generate coins at will.
What is Proof-of-Work (PoW)?
PoW is a cryptographic protocol used in many blockchains to increase the network security and limit the speed at which blocks are created. PoW also solves a potential flaw in cryptocurrency known as double-spending, where a digital token could be duplicated, thus creating inflation and devaluating the digital currency. For a block to be accepted by the network it must have reproducable proof-of-work. PoW is used by nodes to validate a blocks which is time-consuming and requires a lot of computing power and resources.
The term "mining" is used to help visualize the creation of a block in a blockchain. PoW and some systems require the nodes to done useless work in order to verify blocks, this represents a lot of wasted resources, electricity in particular, and some cryptocurrencies such as Ethereum are using their network to perform useful work, such as executing transaction protocols known as Smart Contracts.
What is Proof-of-Stake (PoS)?
PoS is an alternative to PoW protocol that was created as a more efficient way of mining. A PoS miner is limited to only a percentage of transactions in proportion to the amount of coins he owns. Here are some advantages:
- It uses less computational power that not only save in electricity cost of running the mining rigs, but it will eliminate the need to sell a fraction of the awarded coin to upset the costs, which it has a negative effect on the price of the digital currency.
- It will deter anyone from running a 51% attack, assuming that someone could, it would make no sense to attack the network, being the person holding the most stakes.
- It will lessen the risk of reaching a state known as “tragedy of commons”, where a demand for a resource overwhelms the supply.
Thats it for now
Wow, you must have really enjoyed our first blog post if you made it this far. We covered the basics of what makes up a blockchain and how they function. I am sure we missed key information somewhere but dont worry, we plan on putting together an entire blockchain collection of articles in the near future. Be sure to come back!