Overview of Blockchain (Part 1)

in #cryptocurrency6 years ago (edited)

In 2008 a paper was published titled “Bitcoin: A Peer-to-Peer Electronic Cash System” by the anonymous Satoshi Nakamoto, the paper described using a peer to peer network to generate a system for electronic transactions without relying on trust. It was essentially describing an open, distributed ledger than can record transactions between two parties in a verifiable and permanent way using cryptography without needing an intermediary.

This was implemented in 2009 as the first cryptocurrency known as Bitcoin. For the first time, a blockchain was used to manage a database autonomously through a peer to peer network with distributed timestamping and cryptography.
So, what is a blockchain?

A blockchain is essentially a digital ledger of transactions that is shared equally amongst all parties and cannot be altered without consent of the majority. It is essentially a large, worldwide computer that can be used to store data, make transactions and be accessed by many securely. The data is stored in blocks, and once stored is very hard to manipulate or fake so provides a way to securely store data in scenarios where there is limited trust between parties.

Bitcoin was the first use case and is also the market leader that this technology demonstrates, allowing currency to be sent between two untrusted parties over a peer-to-peer network but in a secure way and the transaction record stored in an immutable blockchain.

How does it work?

To explain this, I will use an analogy known as the “Byzantine Generals Problem” and run through the way this is solved.

Imagine a scenario where there are several generals, each in command of an army surrounding a castle they are attacking. To succeed, they must all attack at the same time or the castle will repel a single army, or they must all retreat at the same time or the castle will defeat the stragglers.

To organise this, a messenger is sent to each of the camps from the each general to say when they should attack, such as “Attack Monday”.

The problem each general has is how can they decide if the message is true? The messenger could be corrupted, or the message replaced which could lead to the failure of the attack. One of the generals might even be a traitor and sending a wrong message on purpose.

We have a what is known as a consensus problem, we have a communication channel that cannot be trusted.

In blockchain, this could be thought of as sending a transaction over the internet. If Alice wants to send £10 to Bob, it could be intercepted and changed in a similar way to how the general’s message could be corrupted.

Types of consensus

Proof-of-work

The most common way used in blockchain to overcome this problem is known as the proof-of-work consensus.
The generals decide to solve this problem by using a code to encrypt (or hash) the message, where A=1, B=2, C=3 and so on. As well as “Attack Monday” converted using their code they tell the messenger to also add a random number to the message. They decide on a mathematical equation to use and run the message and the random number through it and then add the result to the message alongside the actual message and the random number. The messenger then runs the whole new message again through the equation to get a single number.

Now if the message is changed by any party, they not only have to change the message but make sure it still gives the same number when run through the equation. This takes far too long, many weeks in fact trying out different random numbers so each general would know if the message could not be trusted if it arrives much later. To make this more secure, the messenger is rewarded when the true message is delivered, this makes it more likely the messenger won’t be coerced. After a while, each general receives all the messages and they can establish what the consensus is.
This is basically how a proof-of-work blockchain works, using cryptography it allows parties to share data over untrusted communication channels in a secure way.

In sending a bitcoin transaction, the transaction between Alice and Bob can be thought of as a message stored in the blockchain, and the code and equation that must be solved known as hashing. A bitcoin block is made up of the inputs and outputs of several transactions as well as the hashing result. The messengers are like the nodes or “miners” in bitcoin, sending and receiving the messages and being given a reward for solving the equation.

In proof-of-work the idea of hashing is to make sure it takes a lot of work to create a new block and uses lots of electricity in return, the node or miner is rewarded some currency for this. If a miner gets a different result to all the other miners, the answer is rejected and would waste electricity so they are incentivised not to lie. The only way to fake a transaction in the blockchain would be to coerce or own 51% of all the miners so a new consensus could be formed. The capital required to do this does not make economic sense.

Proof-of-Stake

In proof-of-stake, this tackles the problem in a different way. Instead of mining, nodes are chosen to process transactions without the complex equation. A chosen node processes the transactions but to be trusted they must stake the currency they have, locked into the system. Other nodes verify the blocks created and if a block is detected that deviates from the consensus, the responsible node’s staked currency is forfeited. A result of a successful block returns a reward for the node. The more currency staked by the node owner, the more likely a node is chosen to process a block.

Delegated Proof-of-Stake

A slight variation on POS, this method is one of the most democratic ways of reaching consensus. People in a blockchain that uses dpos vote for the nodes to process the transactions, these are known as Delegates or Witnesses. Only the top x number of Delegates are paid for their service and because people want to be in the top x, there are many backup Delegates.

People that hold the currency vote for who they want to run the network, the voting power is determined by the number of tokens or coins they have. As the network grows, so does the competition to be a Delegate. If a Delegate acts badly, the community remove their votes and this process is ongoing.

There are also a few other methods of solving this problem that are deployed however only proof-of-work has really been tested in the real world by several attacks to the security of the network. Ethereum is the second largest crypto currency after Bitcoin and currently operates using proof-of-work but is due to move to proof-of-stake in the future.

https://steemit.com/cryptocurrency/@nickmoore/overview-of-blockchain-part-2

Sort:  

Blockchain has changed the internet forever. Decentralising technology will continue to disrupt many different sectors in society. Steemit has already made a big impact in the social media arena..... more changes and improvements will arise over time....

Coin Marketplace

STEEM 0.30
TRX 0.12
JST 0.033
BTC 64303.16
ETH 3137.29
USDT 1.00
SBD 3.97