Blockchain workflow and challenges
Moving on in the blockchain, let's take a deeper dive in the blockchain domain and understand how does blockchain work and what are some of the challenges while working with blockchains.
First, let's see a basic blockchain
So as discussed in the previous blog, this is how the linked list gets connected, the next element in the blockchain consists of the Hash value of the previous element in the blockchain and so on.
Blockchain lexicon update
- Decentralized Ledger - The ledger for cryptocurrencies is maintained in a decentralized manner, wherein the same ledger is given to all the compute nodes thus there is no centralized node that manages everything thus the risk - wherein one node goes down, leading to the closure of the entire bank - is dislodged.
Now let's see something that's there in the blockchain and is very much important but is not talked about i.e. Double Spend Attack
As the name is self-explanatory, a Double Spend Attack (SDA) is something wherein a user who has 1 bitcoin, transfers 1 bitcoin to 2 different users and as the registry is decentralized there is a possibility that both transactions get approved.
Let's assume Sophie had 1 bitcoin, she transferred 1 bitcoin to Geoff(transaction A) and 1 to Mike(transaction B). Ideally, one transaction will fail but as the whole system is decentralized, transaction A went to Machine X and transaction B went Machine Y for processing. What happens next is as the ledger is also decentralized both the transactions might get approved, which is definitely an issue.
Then how is this issue solved?
By Randomness - Pick a note at random and then approve the transaction handled by that node, declining the other one. Once that is done, the address pointer of the linked list element for which the transaction was declined point to null.
This is how the list continues, thus solving the Double Spend Attack.
Now let's talk about something interesting - Bitcoin mining, so what basically is the mining of a cryptocurrency?
Bitcoin
mining is a resource-intensive activity that results in the discovery of new
coins. All you have to do is to solve The
Hash Puzzle.
- Nodes compete to have a chance to propose the next block
- They succeed if they are the first to solve a hash puzzle
- The only way to solve the cryptographic puzzle is through trial and error
That's all for this blog. Now, who wants to learn to code and create a blockchain of their own? If you do, comment below, I'll write a blog about how to create your own blockchain. Maybe you can be the founder of the next big cryptocurrency, who knows!!
Till then,
Happy Blogging
Comments
Post a Comment