Crypto Academy / Season 3 / Week 6 - Homework Post for [@stream4u] by @liasteem
Hi all crypto friends...
How are you all friends?
Hope you are well too,
As well as me who is fine.
Best regards, Prof. @stream4u , I'm your new student.
This is my homework on Blockchain, which you explained in the Crypto Academy lecture. Hopefully my homework can be Prof. Accept.
- What is Blockchain and What are the types of Blockchains / Explain in detail the types of Blockchain?
What is blockchain?
Blockchain is a ledger that stores all digital data that is carried out and has guaranteed security and is also distributed decentralized to all nodes online. This digital data storage system contains records that are linked via cryptography. Blockchain itself has made all transactions much more secure and transparent so that we can find out whether transactions using this blockchain are fraudulent or not, we can even find out whether the transaction has committed other unlawful acts or not. This blockchain system contains all the data, time, place, and what types of transactions are carried out by the users of this system. And this technology can be accessed by anyone, anytime, and anywhere via a smartphone, or laptop without having to ask for approval from other parties, such as banks. This technology can save time, energy and space.
This is why blockchain technology is at the top of all digital media features. Blockchain works from one block and is connected to another Block and other Blocks are connected again with other Blocks in detail, so it is not possible to change it, even if you have to change, then everything has to be changed one by one which will take a lot of time, and a lot of costs, you could say this is an impossible thing to do. The blockchain protocol itself is formed by three important parts;
- BLOCK
All information is stored neatly in the form of data format and is interconnected. Each successive block will contain the hash of the previous block. If the next block contains new information, the hash changes. However, the previous blocks retain the old hash. All are stored neatly and cannot be changed and have strong data validity.
Blocks have several things;
- Data
- A 32-bit number or nonce, which then produces a hash (a number in data format that begins with some zeros, indicating whether the data is valid or not.
- Each block has a different hash, but the previous hash is also stored when a new hash is created.
NODE
Nodes are the infrastructure part of the blockchain, have multiple functions and which are responsible for acting as communication points.
All nodes in this advanced technology are interconnected and they are constantly exchanging the latest blockchain data with each other so that all nodes keep their data up to date. A node is basically a network device (like a computer) that contains a complete copy of the transaction history of the blockchain. A network of nodes, storing, deploying, and storing blockchain data.
like this :The node is in charge of checking each transaction block whether the transaction is valid or invalid.
Nodes store transaction blocks (store all blockchain transaction information).
After the transaction is valid, then the Node immediately broadcasts and disseminates this transaction history to other nodes that need to be synchronized with the blockchain.
- The MINER
The MINER is a mining actor, where the intent of mining here is the process carried out by miners to create new blocks into the blockchain. Since each block has a hash, if the miner wants to make changes made to the block, then the miner must re-mine, because each block has its own hash, and will have a different hash if the block is changed.
If the miner wants to re-mine a block, then of course the next block must also be re-mined. Once successful, the node will accept the changes and broadcast them to other blocks. If the mining process is successful, then the miner will get the results from the process of re-mining the block.
✓TYPES OF BLOCKCHAIN
1. Public Blockchain
Public Blockchain is a blockchain that is public and decentralized designed. As explained above, a blockchain designed in a decentralized manner means that no one party or any agency can control all transactions and all information contained in the blockchain.
As the name suggests, this public Blockchain (general) anyone can participate. No matter the rank, or related government agencies, or individual users or groups. Like the transparent nature of blockchain, this Public Blockchain also has it, namely transparency in all activities that occur within the blockchain. This means that all transaction data can be seen by anyone. There are no special conditions and limitations to join this Public Blockchain, the information available in this public blockchain is also available to everyone without exception. This is due to the nature of blockchains that thrive on trust from the transparency processes provided by the blockchain.
✓From this explanation, we can see the advantages of this public blockchain. Because this blockchain can be accessed by anyone (open source), this blockchain has more users than other types of blockchain. This blockchain also does not require a third party, only between the system and the user of the blockchain.
2. Private Blockchain
As the name suggests, a private blockchain is the opposite of a public blockchain. If the public blockchain is decentralized which no one else controls it, then the private blockchain is not decentralized which means this blockchain can be controlled by several organizations. If the public blockchain is open source, then the private blockchain is a closed network.
For the network, the private blockchain has a shorter time to reach consensus so that the private blockchain makes transactions faster. Because fewer users, the network will work faster. So it is very suitable if this type of blockchain is used by School Houses, Offices, and even companies where they want to share information but they don't want all activities on this blockchain to be known by the general public.
✓Each type of blockchain has its own advantages. One of them is that the private blockchain has a centralized aspect of decision-making, which even though the network is growing, the private blockchain is still able to work with the speed and efficiency that exists. And private blockchains are more scalable than public blockchains.
3. Hybrid Blockchain
Hybrid Blockchain is a split between the public blockchain and the private blockchain. As explained above how public blockchains that are open to anyone can participate in them (decentralized), while private blockchains are more closed source (not decentralized). Now that means hybrid Blockchain is a blockchain that can be accessed by anyone, and can also be accessed by a community or related agencies. But hybrid Blockchain is more decentralized.
This means that hybrid Blockchain users with both public and private blockchain functions can manage any transactions that will be published and can also manage what data they want not to publish which data may be private, of course with blockchain functions that have high security.
This blockchain is usually used by an organization or developer that has been determined with the conditions that have met the requirements and they will provide access to be able to join the blockchain managed by the organization.
✓Hybrid Blockchain Advantages
The advantage of this hybrid blockchain is that it can filter and make changes to the rules on the blockchain in an organization, for example and can still be accessed even though the Blockchain is in a close source system by parties who have an interest in it. One extraordinary advantage possessed by the Hybrid Blockchain is that it is able to avoid 51% of attacks.
4. Blockchain Consortium
Consortium Blockchain is a Blockchain which is a form of a new approach needed by an organization that also requires the functionality of the Public Blockchain and Private Blockchain features. Where the meaning of Consortium Blockchain is almost the same as seen with Hybrid Blockchain which both have the nature where some transactions carried out by an organization are published while others are private.
Well, the difference between the Hybrid Blockchain and the Consortium Blockchain is that the consortium is decentralized (anyone can participate in it) while the hybrid blockchain is not (not everyone can participate in the blockchain or some people who have met the requirements and have been verified by the organization).
Blockchain consortiums are managed by multiple organizations, so they are not concentrated on a single consolidated force. This is what makes the Blockchain consortium transparent, but private and efficient. This blockchain has transaction validator nodes and also initiates or accepts transactions.
✓Advantages of Consortium Blockchain
Because this is almost the same as a hybrid blockchain, which is a combination of Public and private blockchains, it will certainly save transaction costs and data redundancy and simplify document handling that was originally done manually.
- What are the benefits of blockchain?
After knowing and understanding what blockchain is and the types of blockchain, I can understand some of the benefits of Blockchain, including;
- Transparent
Because this blockchain has transparency in all transactions carried out on the blockchain, no one will be able to deceive the data from this technology. The benefits of transparency provided by blockchain will be very useful for all sectors and related agencies because it can be accessed by anyone, anytime and anywhere.
Ex; for a company there will be very many transactions, if these transactions are not carried out transparently, it can sue the possibility that the transaction has been modified and has invalid history results. - Save time, place and space, and money
Because blockchain technology is in software, wherever, whatever and whenever we can access and make transactions without having to spend a lot of time, place, space and even this technology does not spend a lot of money. - Better and safer
Because blockchain is a technology that uses a system and must be verified by miners before computer network devices execute it. Moreover, the blockchain database is Append only, which means it can only add and there are no commands to edit. This makes blockchain better and safer so that network thieves or hackers can't practice their expertise in blockchain technology. - No intermediaries
Because this blockchain is a decentralized technology, and does not require intermediaries or third parties, because all transactions carried out on the blockchain are only us and the network working. So that the role of brokers is not needed so that all transactions are faster, less complicated, and free from the potential for human error. - Good internal audit
Because the blockchain also stores all the data that is done, this will make it easier for technology users to find out all the information that happens before adding new data. So that if a company uses blockchain technology, any user can find out the audit trail of an asset and this can prevent it from corruption and even money laundering. - Trust
Because blockchain stores all data properly and securely, and is transparent, blockchain comes with users' trust in this advanced technology. Trust about all transactions, audited data, everything keeps a history that everyone can know whatever happened with the transaction, so this will minimize the danger and potential bad that will occur.
3.Explain Blockchain Distributed ledger
Blockchain Distributed ledger, an impartial ledger. It is a database shared by multiple participants where each participant changes and updates a copy of the data which is then synchronized. this is what makes distributed ledgers enable members to execute, verify and record their own transactions without third party intermediaries securely cryptographically secured, fast, and cost-effectively managed in a decentralized manner.
Blockchain is a secure technology, so that everything that happens in the blockchain is stored securely and uses cryptography and is accessed through a given key, so that all information cannot be changed and in accordance with the flow of the network. As Blockchain works, the Blockchain Ledger is a place where everything that happens in transactions, audits, sells and buys is stored, even anyone can participate in the blockchain. How Blockchain Distributed Ledger works is to share data between nodes. , if one node doesn't work, however, it doesn't affect other records and the network expands.
✓Advantages of a Distributed Ledger
Distributed ledgers are very different from centralized ledgers, where centralized ledgers are very vulnerable to bad things like cyber attacks, whereas Blockchain ledgers are more difficult to attack because blockchain ledgers are inherently distributed which if you want to be hacked, all copies which are distributed must be hacked simultaneously, this can be said to be impossible.
4.What is blockchain double-spending and how does Bitcoin handle this problem?
Double-spending is a double-spending where the problems that arise when transacting digital currencies involve the same tender being spent many times. This is very detrimental to the parties involved in the trader. This problem arises because multiple digital currency transactions broadcast the same input that is shared by the network, this means transactions on digital money are very reproducible so this is the weakness point of digital currency.
Because digital currencies are easy to reproduce, with them people who understand Blockchain and the computational power to manipulate it, I say again, this is a double spend. If cash is very difficult to replicate, because cash does not use software to get it. Cash also has a central agent tasked with verifying its use, whether it has been used or not, if it has been used it will be considered counterfeit. So this double-spending occurs in digital money because it does not have a central agent tasked with verifying its use, whether it has been used or not.
How does Bitcoin handle this problem?
As we know that Bitcoin is a very large digital currency, many traders and investors carry out various bitcoin transactions. So bitcoin has its own way to combat this double-spending. The way Bitcoin handles this problem is to have a Blockchain mechanism. As we know that blockchain has a very high level of security and can verify the authenticity of all transactions that occur and this mechanism can prevent double-spending.
By having a Blockchain mechanism, Bitcoin takes time for transactions to be verified which contains a number of difficult mathematical algorithms and this process consumes a lot of computing power. Therefore, hackers will need a lot of computing power and make this even more difficult due to blockchain technology.
But hackers are not running out of ways and ideas to get what they want. They are working hard to get around the bitcoin verification system, namely double-spending. They do this by sending transaction logs of the entire bitcoin network, which appear to have been accepted by traders and investors, even though they were routed back to the hackers. And this usually happens during a 51% attack. This 51% attack occurs when users control more than 50% of their computing power, and when users control blockchain, hackers who know about blockchain and bitcoin, they transfer bitcoins to their wallets and will reverse the Blockchain ledger. This makes it seem as if this transaction never existed. This is very surprising!
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.
Because this is homework which includes theory and practice, and you must visit Blockchain Demo and see and learn "How Blocks Hashes Work in Blockchain, what will happen when any middle of the block gets changed". I will describe it in detail and if there is an error, please correct me prof.
After I saw, heard and studied it this is what I can say;
Take a look at the screenshot below!
SHA256
- Ini adalah laman awal disaat kita mengklik tautan Blockchain Demo.
Dengan data yang kosong, hash muncul dengan angka e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
As we know that a valid hash always begins with some zeros. Means empty data is invalid.
Then I filled in the data with the word Love, then the hash I got was 9f4024faec10ef6d29aa32d7935d94b1a816fd4fe0359fbf12d49d44b5ff33b8 and this is invalid
Then to find out the hash in the blockchain, I click on the Blockchain link at the top and the page will appear like this.
Blok. 1
Nonce. 11316
Data.
Prev. 0000000000000000000000000000000000000000000000000000000000000000
Hash. 000015783b764259d382017d91a36d206d0600e2cbb3567748f46a33fe9297cf
lok. 2
Nonce. 35230
Data.
Prev. 000015783b764259d382017d91a36d206d0600e2cbb3567748f46a33fe9297cf
Hash. 000012fa9b916eb9078f8d98a7864e697ae83ed54f5146bd84452cdafd043c19
Even though there is no data that is filled in but has a nonce number, then the data is valid because it has a hash that starts with several zero.
Blok. 3
Nonce. 12937
Data.
Prev. 000012fa9b916eb9078f8d98a7864e697ae83ed54f5146bd84452cdafd043c19
Hash. 0000b9015ce2a08b61216ba5a0778545bf4ddd7ceb7bbd85dd8062b29a9140bf
Blok. 4
Nonce. 35990
Data.
Prev. 0000b9015ce2a08b61216ba5a0778545bf4ddd7ceb7bbd85dd8062b29a9140bf
Hash. 0000ae8bbc96cf89c68be6e10a865cc47c6c48a9ebec3c6cad729646cefaef83
Blok. 5
Nonce. 56265
Data.
Prev. 0000ae8bbc96cf89c68be6e10a865cc47c6c48a9ebec3c6cad729646cefaef83
Hash. 0000e4b9052fd8aae92a8afda42e2ea0f17972ea67cead67352e74dd6f7d217c
Look, from the information above we can see that each block is related, even though it has a different nonce.
Look at the two screenshots above, I added the word Love, but the hash changed and became invalid (f169e07919a7c54af95dfaefb32dea75f0f7837dc2794d8413bd4883f3732c74), because it starts not with some zeros. but blocks, and nonce doesn't change. Likewise for the next block where everything becomes invalid, because at the beginning of the data block it is invalid.
- But what happens if in the middle of the block I enter different data?
Here's the explanation!
Look when I enter "Love" in the data, the hash instantly becomes invalid and changes, as do the numbers in the prev. Everything does not match the previous block, namely blocks 1,2, and 3 which do not contain data, while blocks 4 and 5 I input with the word "Love" as input, with the same nonce, then the hash result is instantly invalid, but the hash on the block previously still valid.
Blok. 4
Nonce. 35990
Prev. 0000b9015ce2a08b61216ba5a0778545bf4ddd7ceb7bbd85dd8062b29a9140bf dan hash berubah menjadi angka 23dd6c1b46275682804f112b0906ff4cb30c5beab22a57a962e663a7b5119b84
Whereas in block 5, it has a prev with the previous hash number from block 4 and with the same nonce block 5 has a hash of 93f3141379e44577f32153bc153656f2e01ae20d884b8fc8859f48be9151c271.
Then I want to add all the data with the word "Love", to save time I press the mine button then the data becomes valid from block 1 to block 5.
The word Love to be valid must change the existing nonce, and each block has a nonce, and a different hash, but this becomes valid because the hash starts at zero.
Blok. 1
Nonce. 68856
Data. Love
Prev. 0000000000000000000000000000000000000000000000000000000000000000
Hash. 23dd6c1b46275682804f112b0906ff4cb30c5beab22a57a962e663a7b5119b84
Blok. 2
Nonce. 12352
Prev. 23dd6c1b46275682804f112b0906ff4cb30c5beab22a57a962e663a7b5119b84 dan hash berubah menjadi angka 0000e5677c474c4156384e0eaeedb9d17c61b96b5016ff4a6e5560ed298dece4
Blok. 3
Nonce. 7721
Prev. 0000e5677c474c4156384e0eaeedb9d17c61b96b5016ff4a6e5560ed298dece4 dan hash berubah menjadi angka 0000c11f8cc44a940063ae5c0f29f0331c67b52229c88aef806a278cc2790dcd
Blok. 4
Nonce. 86032
Prev. 0000c11f8cc44a940063ae5c0f29f0331c67b52229c88aef806a278cc2790dcd dan hash berubah menjadi angka 0000916a372c9950d5a7f7004993fe51cbf1f699f6b3e1c176fe26169d62c293
Blok. 5
Nonce. 44455
Prev. 0000916a372c9950d5a7f7004993fe51cbf1f699f6b3e1c176fe26169d62c293 dan hash berubah menjadi angka 000025896c7c1dd292b15ff9562e151d317c6345c41a69b3d32904382baf9d62
The same data will have different nonce and hash in each block. If the data is changed mid-block, the previous block will not change and remain valid, but the modified block and subsequent blocks are declared invalid and must be re-mined with a hash that must be preceded by a zero.
- What Is a Race Attack in blockchain? OR What Is Finney Attack in blockchain? OR What Is Vector76 Attack in blockchain?
Race Attack
A race attack is an attack in which the perpetrators or hackers make double payments simultaneously where the victim seems to receive payment for his product and send it without waiting for transaction confirmation, and at the same time, the conflicting transactions the hacker returns the same payment to himself one by one. So the first payment transaction becomes invalid. This is why transaction confirmation is necessary.
Well, if the hacker controls a node, the transactions that occur in the first round will refuse and will immediately prioritize the second transaction and spread it throughout the network then after this second transaction is broadcast, the second victim will occur.
To avoid this Race Attack, users need to do the following things;
- Use only with trusted nodes
- All incoming connections are disabled
- Sending ordered goods after transaction
- Waiting for confirmation of the order has been confirmed by at least one node.
7.Limitations/disadvantages of Blockchain
After studying Blockchain step by step, apart from knowing the benefits of Blockchain, we also have to know the limitations of Blockchain, because blockchain is a technology, where no one technology is perfect without one fault. Likewise with blockchain.
Some of the limitations of Blockchain are as follows;
- Blockchain cannot repeat all existing data, meaning that it can only add and cannot subtract.
- It takes a long time for a block to be confirmed by making an agreement with the parties on the blockchain network. This depends on the capacity and speed of the blockchain operating system.
- It requires a high cost to perform a transaction on the blockchain, considering that blockchain is a technology that performs many smart contracts.
- If you lose the access key to get the blockchain, then all the data in this technology will all become memories and there is no way to get it back, except by going back to the starting point to get the blockchain key.
- There is no recovery of transaction funds. If there are blockchain attacks that result in funds disappearing, after the transaction history has been released, but it is not yet on our blockchain, then the funds have been lost and are not possible to return, because there is no confirmed personal data and where the funds were flowed. This is why, waiting for confirmation of a transaction made will minimize losses.
8.Conclusion(Overall understanding of Blockchain).
From my description above about understanding of Blockchain, I draw the conclusion that;
Blockchain is a ledger that stores all digital data that is carried out and has guaranteed security and is also distributed decentralized to all nodes online. This digital data storage system contains records that are linked via cryptography.
Blockchain technology has helped a lot of human work where the work does not require intermediaries, saving time, space, and space. Blockchain is also decentralized where anyone can participate in the blockchain and anyone can find out the history of transactions carried out by an agency or an organization.
Therefore, we must be aware of any weaknesses that blockchain has, so as to minimize the occurrence of losses and money laundering. This is where the importance of learning to understand about everything that is in the blockchain to prevent feeling confused when doing any activity on the blockchain. Especially for the world of cryptocurrencies, an understanding of Blockchain is very necessary which is useful for yourself as a user of blockchain technology.
That's a review of the tasks given by prof. @stream4u . Many thanks to him for giving me the opportunity to be able to take this very useful class of his. Hopefully useful for all, especially for myself personally.
Thank you all for your attention,
See you
This is my reading list references;
- https://www.euromoney.com/learning/blockchain-explained/what-is-blockchain#:~:text=Blockchain%20is%20a%20system%20of,computer%20systems%20on%20the%20blockchain.
- https://accurate.id/ekonomi-keuangan/blockchain-adalah/#:~:text=Blockchain%20adalah%20suatu%20teknologi%20baru,uang%20bitcoin%20dan%20juga%20cryptocurrency.
- https://www.infoq.com/articles/blockchain-as-a-service-get-block/#:~:text=A%20blockchain%20node%20is%20an,about%20transactions%20and%20new%20blocks.&text=Each%20node%20can%20store%20a%20complete%20copy%20of%20the%20distributed%20ledger.
- https://zipmex.com/id/learn/4-tipe-blockchain-yang-perlu-diketahui/
- https://www.cloudcomputing.id/berita/manfaat-kegunaan-teknologi-blockchain-bagi-perusahaan
https://freemanlaw.com/blockchain-attacks-is-no-one-safe-in-the-world-of-cryptocurrencies/ - https://www.investopedia.com/terms/d/distributed-ledgers.asp#:~:text=A%20distributed%20ledger%20is%20a,geographies%2C%20accessible%20by%20multiple%20people.&text=Underlying%20distributed%20ledgers%20is%20the,that%20is%20used%20by%20bitcoin
- https://corporatefinanceinstitute.com/resources/knowledge/other/double-spending/
- https://andersbrownworth.com/blockchain/hash
- https://www.apriorit.com/dev-blog/578-blockchain-attack-vectors#:~:text=A%20race%20attack%20is%20executed,for%20confirmation%20of%20the%20transaction.
- https://www.sciencedirect.com/science/article/pii/S0065245820300759
- https://freemanlaw.com/blockchain-attacks-is-no-one-safe-in-the-world-of-cryptocurrencies/
- https://www.google.com/amp/s/101blockchains.com/disadvantages-of-blockchain/amp/
This post I shared on my Twitter Account
Hi @liasteem
Thank you for joining The Steemit Crypto Academy Courses and participated in the Homework Task.
Total | 8/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
Thanks you very much Prof. @stream4u
I Will study more about How block hash work and what if any middle of the block gets changed?
See you Prof. 😇