This is my submission for the Steemit Crypto Academy task by @stream4u and this week its about The Blockchain. Earlier I learned about Cefi, Defi & Yield. This one is a nice and interesting lesson about blockchain that helped me to understand more about the blockchain. Blockchain is the base of crypto and very important to know more about it so that we can relate many things.
1-What is Blockchain and What are the types of Blockchains / Explain in detail the types of Blockchain?
We have seen impressive growth in the crypto space and when we talk about crypto then its anyways part of blockchain since crypto is built on blockchain. Blockchain is a highly advanced technology that is capable of handling the database in scale and this we cant manipulate the information. I simple words I can say that its a chain of blocks that are connected where block refers to a place where data is stored and the entire data is stored in the block. As the word itself explains that its a chain of blocks and one database is connected to another.
Blockchain is a digital distributed ledger that processes, records, and stores data, and its not possible to delete or manipulate the data.
Its digital ledger is decentralized and no one can control it. Its open for everyone and we can check the transactions on blockchain but we can change or modify anything. Its transparent and runs through many computers so it does not stop if one computer is turned off. It consists of 3 components- Blocks, Nodes, and Miners and now let's understand more of them.
Blocks
Blocks are kinds of files where data is stored and is available on the decentralized network platform. Blockchain transactions are recorded in the block and once the block is compiled the next block starts recording these transactions. So we can say that these blocks are created to record transactions and blocks are connected with one after another. A block contains so many transactions and it has 3 important parts
- Transaction Data that is available in the block.
- HASH number and 256-bit format and it starts with zeros that represent whether its valid or not.
- 32- bit number is known as NONCE and this number is randomly generated when after generation of new block
Nodes
Decentralization is an important aspect and nature of blockchain. Decentralization means its not controlled by anyone and one computer can not own the entire chain. Nodes are basically a set of computers that are connected for the smooth functioning of blockchain. Computers are required to keep the blockchain running and these connected computers are known as nodes. Like in the case of steem witnesses do this part and they set up their servers to keep the steem blockchain running smoothly. When we hear that node is down that means one or more connected computers are creating issues and that is why blockchain is not functioning normally.
Miners
Its a process that we use to mine new blocks and for the mining blocks, miners get rewarded with tokens. Most of the tokens are mineable through highly advanced PC and some special software. STEEM is not mineable and it works on the model of POS (proof of stake). A set of people who validate new blocks on the blockchains before addition to the chain are called miners.
Most of the coins work on the POW (proof of work) model and it requires a highly advanced computer to solve the equations and validate the transactions on the chain. In case of any changes in the block, re-mining is required and all nodes will accept the changes only after re-mining and for this also miners get rewarded.
I did some research on this and found that there are 4 types of blockchains and below are the names. We often know that blockchain is technology but rare people know that it has 4 types depending upon its characteristics. Let's try to understand more about these and what makes these different from others.
- Public blockchain
- Private Blockchain
- Hybrid Blockchain
- Consortium Blockchain
Public blockchain
Its one of the most popular blockchain that we have today and as its name is public so its does restrict anything and open for everyone. Anyone can have accessed this type of blokchain and become a part of it. We need not take any permission from anyone and anyone can run a node and connect to the chain network. Bitcin runs on the public blockchain and anyone can become part of bitcoin's blockchain. If you research on the internet then you find that anyone can join bitcoin mining if they have an advanced system. Profitability is something different but no need to gain approval from anyone to join this blockchain.
Private Blockchain
As the name says its private which means not everyone can access this type of blockchain and certain access is required to be part of this type of blockchain network. This is a kind of closed network and usually, these types of chains are managed are accessed by organizations and only involved people would be able to access it. For example, banks or companies can implement their own blockchain and they can control which transactions are added to the chain and its because they dont want any kind of transactions to get added to their network.
Hybrid Blockchain
This is another type of blockchain and its a combination of a private and public blockchain. Hybrid means something created with the combination of 2 things and here Hybrid blockchain is the combination of a private and public blockchain. Now since its made of both so here we get the functionalities of both types of chains. Its a kind of new kind of technology used in blockchain that integrates public and private chains and it gets dual features. This gives power to companies, organizations, and governments to handle their transaction workflow with a better technological solution.
It makes it to manage the blockchain in a way where some accesses require permission and some are permissionless. We know that both are different features but with hybrid, we get both and this is something that makes it a better blockchain. Sometimes we need control on full access so it can be done with this type of Blockchain and whatever fun sounds fun to be shared with the public can also be my next on the same chain. For example, Banks and governments would use this type of Blockchain because they cannot give open access to everyone and they like to share certain things with the public. With permission to access they can keep their transactions not accessible for the public which will be accessible only for the people who are involved with it.
Consortium Blockchain
The consortium is what type of Blockchain fair more than one organization, entity or institution can have control or access. It's not a public Blockchain that can be accessed by anyone however we can call it more of a private login which is limited to its owners who are from these entities having the access. There is restricted participation and selected people from the organization will only have the access to this type of blockchain. This type of Blockchain can also be used by traditional banking systems or government organizations where many departments are involved and certain people can have access from various departments or various bank branches.
2- What are the benefits of blockchain?
Blockchain is a highly advanced form of technology and it has who has potential to transform industries because it offers many benefits with its implementation. So let's talk about some of the benefits that blockchain offers-
Data is one of the really important things and we always try to keep it secure and it should not be manipulated or altered by anyone without our consent and with blockchain, we can make it happen. Data is crucial and sensitive and blockchain can manage it the way we want. By keeping our records on the Blockchain providers in and security of data which can not be altered and it also remains end to end encrypted so no one can access it and it prevents unauthorized access. With the help of Blockchain, we can also address data privacy issues. We can keep our data on multiple computers so hackers will not be able to hack it seems it is not on one computer and hacking the entire blockchain is not easy at all.
Transparency is another important aspect that is dealt easily with blockchain and keeping the data on-chain solves it easily. In the traditional system, each organization has to keep a separate database which creates issues on transparency since there is no track of data and even difficult to track the changes. Since blockchain technology uses a distributed ledger where data and transactions are recorded multiple computers/locations. Everyone who is part of the network has permission can access the same data at the same time. This eliminates the possibility of data fraud since the alteration is not possible and its result is great transparency in the system and information.
With the implementation of blockchain, we can trace the transactions since its all recorded on the chain and it does not allow deletion. Transactions are recorded in distributed ledger and if anyone tries to alter anything then we can trace it because if there is any change then it has to get validated first to get added in the chain. Blockchain makes it possible to share the proof with users or customers in case it is required.
Blockchain provides us the feature to automate things. For example, we can automate transactions using a smart contract that increases the speed of the overall process since there is no manual intervention involved and it all happens automatically. We can define certain criteria and once these are met then the transactions get triggered automatically. This helps reduce the intervention and dependency on humans that also leads to perform error-less transactions. This automation has already been used on defi using smart contracts and there is no human intervention.
Many industries look for ways to increase their efficiency and speed through technology. They go to various development and expect that this will help them increase the overall productivity which will help them save the cost of the operation. With Blockchain this is something that can be done with ease because this technology is way more advanced to transform things in a better way and it also reduces the possibility of human errors. With the operation we can surely achieve a highly possible target in productivity and reduction of human involvement will also help us to get increased efficiency and speed in deliverables. We know that the manual way to process transactions takes quite a long time but if it is automated then it can happen faster and more efficiently which will not disturb our time but will also contribute a far cost-effective solution.
3- Explain Blockchain Distributed ledger
In simple words, a ledger is a database of transactions and in the traditional method, we maintain it in one place. Tradition system does not allow us to have it on multiple computers and it has certain limitations as well.
Now with blockchain, things have gone to the next level since we have got the advancement of technology. This transaction database we can manage through blockchain now. A distributed ledger is a database that is distributed and synchronized across mutiple networks, geographies, and institutions and it is accessible by mutiple users. Any node user can access the information that is shared across the network. If there are any changes performed then it reflects all the people in real-time and with no delay from one person to another.
Members who run the nodes are called witnesses and they run the network from a different place. Everyone who is part of the net would have an identical copy of the information that means there is no difference in the ledger and all the users get the same. We can say that its a database that is shared across networks but the information remains the same and if there is any change required then it can be done by consensus of the participants.
This is useful when an organization wants to give access to people but wants that this information can't get changed unless they agree. Blockchain Distributed ledger makes it possible because it allows everyone to see the information as per the permissions provided but they would not have the option to change and if that organization wants to implement it then they can do it easily and the same will reflect with all the participants.
Below is the image that represents how Distributed ledger works on the blockchain. There is no controlling authority and all these nodes are connected. They can access the same information and there is no limitation of place etc.
If any one of the nodes is not functioning then also rest can access it since its not stored in one computer and that's the main characteristic of a distributed ledger.
4- What Is Blockchain Double Spending and how Bitcoin handles this problem?
In simple words, Blockchain Double Spending means we have sent the funds twice but this can be done by a highly tech-savvy person. A normal user can't perform this type of transaction since they're not able to manipulate the system. With double-spending, we can say its a risk that coins can be sent twice. Its a disastrous situation and should not be happening at all. In digital currencies its possible to send the same amount twice by manipulating the system but on the traditional payment system we dont have this scope of double-spending. Bitcoin blockchain takes all the transactions to be included in the blockchain and the confirmation process ensures that they really own it or not.
Double Spending is the term that is not good at all for the blockchain since tech-savvy users tried to manipulate the transaction whereas he has sent funds only one time. He tries to take the advantage of verification time which is a minimum of 10 minutes with bitcoin.
If one person sent 10 BTC to person A and this transaction is pending confirmation. Bitcoin requires 6 confirmations and there is a minimum of 10 minutes of the requirement to get it done. Within this 10 minute time, that person manipulates the block as he has the access and has required computing power to perform it. He manipulates the block and sends 10 bitcoin to another address whereas he owns only 10 BTC so practically its not possible to send 20 BTC and this is the scenario that is called Blockchain Double Spending.
Now there are two transactions in the fund pool and both can't get verified at the same time. So once one transaction gets verified then the second one will be marked as invalid because there is a fund balance. Bitcoin credits happen after 6 confirmations and this is recommended to wait for a minimum 6 confirmation to avoid this situation.
Bitcoin's blockchain distributed ledger for the recording of transactions in the network and this transaction is added in blocks. Bitcoin handles this problem with a minimum of 6 confirmations. When we transfer bitcoin then we can see the number of confirmations in blockchain explorer and its also mentioned that a minimum of 6 confirmations are required to get the funds credited and then only it can be considered as a successful transaction. Here 6 confirmation means that after the transfer 6 blocks are generated and added to the blockchain.
Once there are 6 blocks added then this transaction can not be reversed. Its always recommended waiting for 6 confirmations to avoid such issues and before this dont consider the transaction as legit as successful. If the receiver is aware of this information then there is no possibility to lose funds in bitcoin. Many exchanges mention it to educate their user's to void this problematic situation.
5- Practical + Theory: Visit Blockchain Demo and check section Blockchain, then explain in detail how Blocks Hashes Work in Blockchain, what will happen when any middle of the block gets changed, try to give screenshot for each possible details.
Hash is one of the key parts in the blockchain and this is a combination of alphanumeric code in fixed length. This code represents whether the transaction is legit or not and with this we can also verify the transaction on the blockchain. Block hash is irreversible after the generation and its one of the strong components of security on the blockchain. Block hash output value length is always fixed and it does not change even if we change the input value.
Let's check this out through the tool's URL- https://andersbrownworth.com/blockchain/hash
Input- Steemit is Awesome
generated output HASH- ed7592921a8080781342f69db24836f2a588ea4c0b4a60a33e6b8de4c8724f6f
Now I have made a slight change in the input text and let's see what output hash it shows-
Input data- Steemit is Awesome. - (all in small letter)
generated output HASH- eae3c2217c728c5c16a7b79e9cb7eeae96030c0c83a15234808f30717a2b3307
here I have taken input data as steemit is awesome in small letters however it remains the same but the value is changed.
Now lets enter large data to see how it works-
I have entered input data as-
Steemit is Awesome
Be part of Steemit Crypto Academy
generated output hash- ccbc41e328f78268ab3b5007cefb1fb6166117877020d56569cca0626d1b919f
In the above scenario, we have seen them when we change input data then generated output hash changes but length remains the same. We can enter small or large input data but it will not affect the length however value will change. Every time we enter the data the output hash gets generated in form of alphanumeric code
Now let's visit the block on the portal using the link- https://andersbrownworth.com/blockchain/block
So here in the block screenshot, we can see that block hash starts with 4 zeros which confirms that its a valid block. Here I have not entered any data so let's go ahead check it.
Here I have input data as- Steem Blockchain and it has changed the hash. Now, this hash is not starting with 4 zero so its not valid and I also noticed that this window color has turned red from green, and its not a valid hash so this blockchain gets added to the blockchain.
I clicked on mine now and it has changed the hash value now however the length and coding parameter remains the same. Now its starting with zero and it shows that its valid and good to get added in the blockchain.
Now we will see what happens when I change any middle of the block and to do it I have an open URL- https://andersbrownworth.com/blockchain/blockchain
Here I have taken the snapshot of 3 blocks and all these are arranged in sequence. I mean all these blocks are arranged one after another like 1, 2, and 3.
I have clicked on mine and this is what I can see-
I share the data below for each block and these blocks are connected to one after another.
Block: 1
Data: Day is good
Nonce: 3028
Hash: 000003d7b06ae5b18455137132d508c6d70fc8ce4a30170b09eb94e1237361ec
Block: 2
Data: Its weekend time
Nonce: 3265
Hash: 0000b8bed234963b9560394f7cd5fab2680485c31870ab5823f7df6277de9c4e
Block: 3
Data: Let us learn something new
Nonce: 3258
Hash: 00001d96c2b4cb73168a977ecf8ef42a55e7d584b0a34d657bc9ca7f4c65179a
all above hashes are starting with zero and it shows that blocks are valid and ok to get added in blokchain.
Now I will change the data in the middle block to see what happens-
I have changed the in middle block and now it has generated the hash which is not starting with four zero hence its invalid and cant get added to the blockchain. As we discussed before that if there is any change then we have to re-mine then only it will be added to the blockchain and for this action also miners get rewarded.
6- What Is Race Attack in blockchain?
Its something related to double-spending. In the blockchain, it happens when an attacker creates 2 conflicting transactions. It happens between buyers and sellers in the blockchain and this way attacker tries to scam the seller. He sends the first transaction to the seller and then the seller sends the product but did not claim the funds. Later buyer sends another transaction to the network and its routed back and this way buyer gets his funds back and the seller has already sent the product.
In this practice, both transactions will be in the pool as unconfirmed since there are no funds so both will be not successful and there will be no funds transferred to the seller's wallet. This is a way to do frau activities and its advised to check for confirmation and successful transactions before sending the product to avoid scams.
7-Limitations/disadvantages of Blockchain.
Everything has its pros and cons and in the same way, blockchain also has the same so let's go through and understand some disadvantages of blockchain-
1- Consume Too Much Energy
We have got the bitcoin through blockchain and its based on POW Proof-of-Work consensus algorithm where miners need to work hard for block validation. These miners are rewarded for their hard work because they solve difficult mathematical problems and it takes too long. Since it takes too long so their computers consume so much energy to keep it running. Data shows that bitcoin mining consumes huge energy and because of this china has banned crypto mining that's why many miners have started relocating to another place.
2- Immutable Data
This is a core feature of blockchain but its also one of the points that makes it a disadvantage. We know that data can be access through multiple nodes but immutability works well only when nodes are distributed fairly. If anyone owns 50% or more of the nodes then can he can have control over it.
We don't have the option to delete the data and if something is recorded on the blockchain if its something that affects anyone's privacy then also we has NO option to delete it.
3- Incomplete Security and 51% attack
I agree that this blockchain technology is way more secure than other platforms but we also have to understand that it's not completely secure. Some ways can be used to compromise the blockchain and it has happened many times.
51% attack is something that's very much popular in the blockchain world where anyone having 51% nodes can control the network and it makes the chain vulnerable. He can alter the ledger record and can even perform double-spending.
4- Private Keys
Blockchain is decentralized and this nature of technology gives us complete control as we own the private key but this also leads to the problem. We are the full owner of the key and its our responsibility to keep it safe because if we lose then we lose access to funds and there is no way we can get it back. In the centralized system we lose the key then we have the option to get it back through the authority but in decentralization its not possible. This is one of the disadvantages that has happened before and will continue to happen in the future as well.
5-Operating Cost
Cost is always involved with any operation and blockchain cost more than the traditional platforms. Its advanced hence it requires more nodes and miners to function for the smooth operation and that's what also contributes to higher operating costs. Because of the higher cost, many of the organizations are not able to adopt it since they are unable to afford higher charges to keep it running.
8- Conclusion
Blockchain is a new age technology and it has proven that it can transform many industries. As of now, we can see the use of blockchain few sectors including banking, healthcare, and aviation, and some more sectors are adopting it gradually.
In the last few years, we have the impressive growth of blockchain and the rate of adoption has also increased significantly because its making this better and smarter and also give no scope to fraud and manipulation. The best part of the blockchain is that once data is recorded then it cant get deleted and it will remain here forever so we never need to worry about the loss of information whereas with centralized systems this is one of the biggest concerns.
If you are in the crypto space then its very important to learn about blockchain and how it works because this is the base of any crypto and having strong knowledge about the base helps to make our decisions faster and better.
It was such a great experience to learn about blockchain and thanks to the amazing professor for giving us this opportunity and I enjoyed it thoroughly.
Thanks again to professor @stream4u for this great lesson
Hi @alokkumar121
Thank you for joining The Steemit Crypto Academy Courses and participated in the Homework Task.
Total | 9/10
Your Homework Task verification has been done by @Stream4u, hope you have enjoyed and learned something new.
Thank You.
@stream4u
Crypto Professors : Steemit Crypto Academy
#affable
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
I have enjoyed and learned useful things. Thanks for the feedback prof.
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit