Blockchain for Web Developers

Yes, there might be a plethora of articles about blockchain and how web developers can use to build applications. And this might not be a much different article either. In this post, I describe the basics of blockchain and crypto technology.

Introduction

Blockchain has been the underlying technology for cryptocurrencies like bitcoin.

Firstly, this is a basic understanding of blockchain. We will cover the rest of the basics of blockchain soon. In most banking or financial systems, all bank accounts track through a ledger that keeps track of incomes and expenses.

Secondly, in current times, our centralized financial systems follow certain rules and regulations. A central authority defined these rules and that’s how trust was built. But blockchain is a decentralized system of the ledger where a peer-to-peer network is involved. Based on the peer-to-peer network, miners involved in the process, build trust in a decentralized form. All transactions are recorded on ledger and ledger is verified by nodes in the network. These nodes communicate with each other cryptographically for verification of transactions. When new transactions are added, there is a consensus formed in the network, this consensus is nothing but a block.

Proof-of-work

One reason why blockchain is popular is that it solves a double-spending problem that has been there for a long time in computer science. When it comes to a distributed system, there is no way to correctly verify the integrity of transactions. In relational database systems, we use referential integrity to verify integrity.

This is the foundational algorithm in the blockchain. In the mining process, miners compete with each other in the network to verify transactions and produce new blocks. For this work, miners get cryptocurrency.

In network, transactions happen all the time between users. A decentralized ledger will keep track of all these transactions. Miners will verify these transactions through proof of work algorithm.

Person A sends $10 to person B and not to person C. How do we verify that money went to Person B and not to Person C? This is a double-spending problem. Proof of work helps to solve this problem. There are other aspects to this algorithm like how to avoid any security threats, faster block generation(Power of network), storage capabilities. We will not be discussing those aspects here.

Drawbacks

There are few drawbacks to this algorithm and one of the major one is 51% attack. The idea of 51% is when a user or a group of users control the majority of mining power. If this happens, the group can monopolize generating new blocks and this will lose the advantage of the decentralization principal.

Blocks

Blocks form the ledger which forms the basis of blockchain. Each block contains transaction information which we can call as a fact. A block is nothing but the arrangement of all these facts and each block will have a reference to the next block.

Blockchain for web developers

Before these facts get added to blocks, they are pending and as miners continue to work, they verify these facts to confirm.

Conclusion

In conclusion, I introduced blockchain with some basics of blockchain for the web developers. But this is just the tip of the iceberg, there is a lot to learn and bigger things to do in the cryptocurrency world. If you enjoyed this post, subscribe to my blog.

References

  1. Blockchain: A blueprint for the new economy by Melanie Swann – Blockchain
  2. Proof of work – Proof of work
  3. Ethereum for Web developers – Ethereum for web developers