Crypto Academy | Season 3 | Week 6 - Homework Post for professor @stream4u | OPEN THE BLOCKCHAIN

in SteemitCryptoAcademy3 years ago

Hello Everyone, so today I invite you all to read today's Homework on THE BLOCKCHAIN ​subject which is given by Professor @stream4u.

So let us continue with our homework.


Pic downloaded from https://openclipart.org/ and edited on Canva.com


1. What is Blockchain and What are the types of Blockchains / Explain in detail the types of Blockchain?


Ever wonder the transactions we do in the Crypto platform where it got save? It's an actual blockchain where all the data is being recorded in the blocks and when one block gets filled, so the other block starts saving the data and those multiple blocks made a whole blockchain. And the data in the blocks are secured by the encryption method and that data can't be removed or change from another person.

So if we see in the Blockchain all the data is distributed with the users as the Blockchain works on the Transparency and anyone or the users of the Blockchain can see data which are stored or recorded on the Blocks.

The other word for the Blockchain is Record-Keeping technology or the Distributed Ledger Technology, as its data is distributed with the users of the Blockchain. And in Blockchain, there is no Centralized power which is working on that as in centralized database the authorities can delete anything from the data and can change the data but in the Blockchain, nobody can change the data as it works off the decentralized system.


So how blockchain works? As the professor told us that the blockchain is processed in Three important parts:


1. Block

2. Nodes

3. Miners


Blocks: As I also have said above that blocks are the ones where all the data and the transactions are being recorded. It contains all the transactions and once one block got filled up the information start recording in another block automatically.

Things which are found in a single block are:

  • The data which are being recorded and can be the data of anything such as the transactions.

  • There is 32 bit of Nonce, it is randomly generated and Nonce then create a **Hash.

  • There is 256 bit of numbers in Hash. And having some zeros at the start of it makes it a valid Hash

Nodes: Then there are Nodes and they are actually many computers that connect the blocks to keep the blockchain working smoothly. As blockchain is decentralized and anyone can take participate in that so Nodes help in this to work without any issues.

And as when the newly mined blocks enter into the system the Nodes makes sure that it is fully verified and trusted.

Miners: So in the mining, it is done by some Miners through some special software which solves the Algorithms and then creates a new block. And as we know that Miners also validate Mining by solving some hard math equations or you can say computational equations.

And in Mining if any changes have been made by any miner in the blocks then all the blocks from that point need to be mined again and that will also require the same amount of time which mostly be in loss because of changes in a block also changes the hash of the Block.


Types of Blockchain:


There are 4 different types of Blockchain technology:

1. Public Blockchain

2. Private Blockchain

3. Hybrid Blockchain

4. Consortium Blockchain


Public Blockchain: Like a normal blockchain Public blockchain is fully decentralized and it was the first blockchain that was being introduced into the crypto world, as it is open source any person can take participate in the mining, developing more things into that and can also become the community members and the users of that asset.

And it is fully transparent means anyone can see the details of the transaction of anyone, some examples of the cryptocurrencies which use public Blockchain are Bitcoin, Ethereum, and Litecoin.


Private Blockchain: In this as it is known by the name that it is a Private blockchain which is also known as the permission or the restrictive blockchain.

It only works in a small or closed network and it is usually used by private companies where only some individuals or private members are permissible to use it. And in this, the level of accessibility, permission, and security is being controlled by the organization which is controlling this Blockchain.


Hybrid Blockchain: So the Hybrid Blockchain is like a mixture of Public Blockchain and the Private Blockchain. As it's a hybrid blockchain it takes the benefits of the public and private blockchain, as in this it has the security and transparency of the Public blockchain and also has the same system of permission just like the private blockchain.

That gives flexibility in the business to the Blockchain users as to what data they want to make public and what data they don't have to share with the users.


Consortium Blockchain: So this type is also somewhat the same as Hybrid blockchain but also have a little more from the private blockchain as on that only one organizations can have access to that but in this many organizations can have access to the data in it but those access of data will only be accessible to those who are allowed to see this as it also has the permission or restrictions.

And it is not fully decentralized or you can say that it is a partially decentralized blockchain as many organizations can control its network and there can be anyone from any organization who can change the nodes. It is usually used by the government or banks.


----------------------------------------------❀-------------------------------------------


2. What are the benefits of blockchain?


The some benefits of the Blockchain are:


Transparency in Blockchain :


With the help of blockchain, we can organize a complete decentralized network where there is no need for centralized authority which enhanced the system’s transparency.

To carry out transactions and to validate them is the responsibility of the peers who are the parts of a blockchain. All the peers are allowed to choose if they want to take part consensus method or not. This method is used to promote validation through decentralization. A copy of the transaction record will be kept by each node once it has been validated. This way the transparency is being handled by the blockchain network.


Advanced security:


Blockchain networks are made immutable, which means once the data is written then it cannot be reversed. They are made in such a way that each node holds a copy of the transaction ever performed on the network. In that way, nobody would be able to make changes in the transaction so the other nodes will reject his written transaction request from the network. This process increases security and is very beneficial.


Minimize cost:


Nowadays businesses spend a lot of money to lead our present system, so we want to minimize the cost. Blockchain has the property to minimize costs for the organization. Because a blockchain does not contain any centralized player, therefore; we do not need to pay for any trader costs. Moreover, when it comes to validating a transaction we do not need more interaction.


Speed:


As we all know the Speed in the transactions of the blockchain are really fast than a normal centralized system, as if we see in the centralized system if we have to send some money to someone we will have to deposit our money in the bank account and then will have to transfer the money which will take a lot of time as I guess we all can relate to that as we all have been to the bank.


No Verfications:


As I have given the example of a bank in the above heading so let's continue that, so we went to the bank and we have to transfer our money to our some relative or somebody have sent us the money so when we have to transfer the money or have to take the money to have to show our identification and then they verify and even that process takes a lot of time but in blockchain, there is no such thing and we can send or receive money 24/7 at any point and we don't have to verify ourselves.


----------------------------------------------❀-------------------------------------------


3. Explain Blockchain Distributed ledger.


A Blockchain Distributed Ledger is like a database or sharing of data in the blocks to the users and also can be accessible by many people.


So the Distributed ledger is in which all the transactions and data are being recorded in a decentralized form and this can include the data from the different places and of the different people, so that means there is no centralized authority which is working in Blockchain Distributed ledger and there is no need for the centralized authority to authorize any transactions or data which are being recorded in the Blockchain Distributed ledger. The Blockchain Distributed ledger keeps the track of the nodes which are there in the blockchain, as the data is being recorded in the nodes which are connected with the Blockchain System or the platform. There is also transparency in the Blockchain Distributed ledger as anybody or the users can get access to any data of transactions.


There are also some properties which part of the Blockchain Distributed ledger. which is that it is Decentralized, as in the Blockchain Distributed ledger people can carry out their transaction or function without any intermediary. It is also very Secured as the transparency is also very maintained in it. Nobody can get access to the Records or can change anything in that and all the data in the Blockchain Distributed ledger can not be changed and will be in their original form every time.


----------------------------------------------❀-------------------------------------------


4. What Is Blockchain Double Spending and how Bitcoin handles this problem?


So if we see that Double Spending is like a risk in which the Digital currency can be spent twice. As there are some manipulative minds in this world and those minds always try to go wrong ways and so just like those minds are also in Blockchain where they manipulate the real digital currency and reproduce that currency and use it again.

But if we see in the physical currency there is no such thing in that as it is physical and it can not be replicate easily as people who do transactions in physical currency can verify it easily.

Usually, Double Spending happens occurs when in a blockchain network when usually the cryptocurrencies got stolen and then those fraudsters make a copy of those stolen cryptocurrencies and make it look real and turn to use them.

The types of Double Spending in blockchain are:

RACE ATTACK: The attacker creates two transactions at the same time and then sends them for confirmation to the blockchain network. The victim falls for the prey and accepts the transaction without confirming it. This results in the returning of the conflicting transaction and hence the first transaction becomes invalid. This is called a race attack.

FINNEY ATTACK: when an identical transaction of an already pre-mined transaction is created before its release to the blockchain thereby invalidating the identical transaction, this is known as the Finney attack.

VECTOR76 ATTACK: This type of attack is a combination of a race attack and a Finney attack. Two nodes are created by the attacker, one of which is attached to the exchange service while the other is connected to the blockchain network. Then two transactions are created, high value (sent to the exchange service for confirmation) and low-value transactions (to the main network). In short, fake transactions are done.


How Bitcoin handles this problem


As there is a primary concern of the Double Spending in the Blockchain, but it also has the solution in the Bitcoin Network as it can stop double-spending by denying the copy of the Bitcoin which someone tries to use by their security functions.

As to understand it we have to see an example, so for example I have bought a Bitcoin and at the same time of the same ID the person who made a copy of that Bitcoin also sell it to my cousin. So after some days I went to buy a car of 1 Bitcoin and I transfer the bitcoin to the car dealer and get the car but after some time my cousin went to buy some printer on the 1 Bitcoin but when he tries to pay the system will deny it process, as because there can only be 1 bitcoin of the one ID. And only the first transaction which was done by me will be accepted or verified. And the second transaction which was made by my cousin will get denied because of its invalidity as it will not get the confirmations from the miners.

An example of it can also be seen in the below picture:


image.png

This picture is taken from the javapoint.com


----------------------------------------------❀-------------------------------------------


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


So now I am going to Visit the Blockchain Demo and will show the section of Blockchain, how block hashes works, and what will happen when any middle of the block gets changed:


So if we see in the below screenshot we can see that there are 5 blocks in a Blockchain and this we can see the Block, Nonce, Previous Hash and finally the Hash. We can see that in every block there is a Hash of the previous block as it works on a chain and the data got distributed in those blocks make a whole blockchain.

We can see the Block 1 Previous hash is shown below is all Zeros as there was no previous block in that:
0000000000000000000000000000000000000000000000000000000000000000

And the Hash of Block 1 is:

000015783b764259d382017d91a36d206d0600e2cbb3567748f46a33fe9297cf

Which will be the previous hash of Block 2 and the cycle of that will continue as the Hash of the Block 2 will be the previous hash of Block 3.


image.png

Hash of block 1:000015783b764259d382017d91a36d206d0600e2cbb3567748f46a33fe9297cf

Hash of block 2:000012fa9b916eb9078f8d98a7864e697ae83ed54f5146bd84452cdafd043c19


image.png

Hash of block 3:0000b9015ce2a08b61216ba5a0778545bf4ddd7ceb7bbd85dd8062b29a9140bf

Hash of block 4:0000ae8bbc96cf89c68be6e10a865cc47c6c48a9ebec3c6cad729646cefaef83

Hash of block 5:0000e4b9052fd8aae92a8afda42e2ea0f17972ea67cead67352e74dd6f7d217c

And Now the hash of Block 5 will be the previous Hash of the Block 6.


How Blocks Hashes Work in Blockchain


So if we see in this the Block 1 has an Nonce of 72608 and it is showing the Hash which is:

0000f727854b50bb95c054b39c1fe5c92e5ebcfa4bcb5dc279f56aa96a365e5a


image.png

Hash without data: 0000f727854b50bb95c054b39c1fe5c92e5ebcfa4bcb5dc279f56aa96a365e5a


But when we put the data in the Block we will see that the hash has been changed and it works as even if we change the capital word to a small word it hash will get changed as you can see below:


image.png

Hash: 38b0e112a4bd690c51daf97fadd3dc9e831363f3e80294eb5b673426a1fa07c0


image.png

Hash: 1a67d80142c3c5b9e97285a148ac71afa75fd49f1ced5f2e844d727df305ac39


And if you notice one thing in the above pictures you can see that the length of the Hash isn't changed so that means if the data even is like a whole paragraph its hash Length will remain the same or it will not increase.


Mine:


Now if we see in the above pictures whose hashes are:

Hash: 38b0e112a4bd690c51daf97fadd3dc9e831363f3e80294eb5b673426a1fa07c0

Hash: 1a67d80142c3c5b9e97285a148ac71afa75fd49f1ced5f2e844d727df305ac39

And if we see that it is not starting with Zeros that means that this block is Invalid. As we now know that the hash which starts with Zero is the Valid hash. So the question here arises that how can we make it valid? So if I will change the Nonce so will it make it Valid so let's see:


image.png


As we change the Nonce from 72608 to 72680 but still the Hash is Invalid. So now what we can do to make it valid?

We actually will have to click on mine to make it Valid as we don't know which Nonce is not used and to find it we will have to start typing from 1 and it will take us days. But when we click on Mine it found the Nonce for us within seconds. And that Nonce has made our Block Valid as you can see in the below screenshot that the hash is being started with Zero here.


image.png

Valid Hash: 00002f65ad4c19f957b1d0bd4bca5ffeb136fd568d113ef0c74a0c2f5dd434f0


Middle of the block gets changed:


Now we have to see that if the Middle of the Block gets changed what will happen? I will try to explain it in some steps below.

  • In the beginning we will see that I have put the data but I haven't minded it yet so the Hash in these blocks is Invalid as we can see that the hash is not starting from Zeros.

image.png

Hash 1: d50795a3d366da3880026c6ec9b86a5aa1353b35a547bee32f7fc03b71745a3d

Hash 2: 29a6a6eb8c4ad551eb6471d9710e918e8ffe60802eb613bf1fdd9a69e4be85bf

Hash 3: b63dc2cdd57137f1d57e59b519412b84a0bd24caa714e5754271efb09efaf317


And now I have mined and it automatically has changed the Nonce which is not used yet used and the block has become Valid now.


image.png

Valid Hash 1: 0000b21afcecdf16e8a52b8ef2bb1a02d9bef95148332f07e4467f5309eadae6

Valid Hash 2: 00006d730a145cc3ae17c761ed2cbee7bbbdd78f93343cf0344fcd0a6f4c48e1

Valid Hash 3:0000017a002c2b333cdea280f613802ac107e905d47ed781876c9065407741c3


And now we will try to change the middle block, so I will try to change the block 2 and will see what will happen.


image.png


So as you can see above that the Hash has been changed but the more we have to see here is that I just changed the Data of Block 2 but all the other blocks after Block 2 have been changed and we will have to Mine again all the blocks which we have made.


----------------------------------------------❀-------------------------------------------


6. What Is Race Attack in blockchain? OR What Is Finney Attack in blockchain? OR What Is Vector76 Attack in blockchain?


VECTOR76 ATTACK:


This type of attack is a combination of a race attack and a Finney attack. Two nodes are created by the attacker, one of which is attached to the exchange service while the other is connected to the blockchain network. Then two transactions are created; high-value & low-value transactions.


High-value transaction: the attacker premises the high-value transaction withholding its block from the exchange service. Upon block confirmation, this pre-mined block is sent to the exchange service for further confirmation. This results in the visibility of only one part of the transaction to the network while the other part is completely invisible.
Low-value transactions: Now, after the confirmation of the high-value transaction, a low-value transaction is sent to the main network rejecting the high-value transaction.


Eventually, the entire amount of high-value transactions goes into the account of the attacker. In short, fake transactions are done.


----------------------------------------------❀-------------------------------------------


7. Limitations/disadvantages of Blockchain.


The Limitations or disadvantages of Blockchain are:


  • POWER CONSUMPTION: this is the main disadvantage of blockchain.
    Each node created and the time, it takes for connecting with other nodes requires high energy consumption.
    Verification and calculations of the transaction signature also require high energy consumption.

  • INEFFICIENCY: with the increased population connected to the blockchain platform, it grows. With this increased growth, more transactions are done and more nodes are created thus slowing down the system. This is the greatest inefficiency of blockchain technology.

  • DECENTRALIZATION CAN BE A PROBLEM: with a decentralized platform, private keys are provided to the users. This makes the users the owner of their bank. They need their private keys to access their wallet & if they lose this key then it means that they have lost access to their wallet thus lost all of their assets. This is the core problem of the user.

  • HIGH COST: The mining process is also very expensive on blockchain as it's the devices that are used in mining are also really expensive.
  • POOR NETWORK SECURITY: when miners combine, they tend to alter the records hence tampers the security.
  • SCALABILITY: we all know that bitcoin is the most successful among all blockchain implements but still very few people are connected to the blockchain. If more people start connecting themself to the platform, it will start to slow down.

Conclusion:


That was all from my side of the Homework, it was really an interesting topic THE BLOCKCHAIN and I have learned a lot from this lecture and homework.


A very important lecture for a person like me who doesn't have that much knowledge in the past but now I can say I know something.


So today we have learned what is Blockchain and get to know that it is a decentralized system and it works on the blocks, nodes, and miners, we got to know that there are 4 types of Blockchain as in the past I thought that Blockchain is only of 1 type so that was new for me. We also see the benefits of the blockchain that it is fast, has no verification, and many more. We see that nodes are connected and also have the same data in them.


We also see that there are also chances of a Fraud like Double spending and its somewhat types such as Race attacks, Vector 76, and Finney Attack.


We also see the Blockchain Demo and get to know that to get a valid hash we need the right Nonce, so Nonce is also important in that and to get the valid Nonce we will have to mine the Block.


And that was all from my sides.


Regards,
@maazmoid123

Sort:  
 3 years ago 

Hi @maazmoid123

Thank you for joining The Steemit Crypto Academy Courses and participated in the Homework Task.

Review Visit Level
Task Remark
Comment
Guidance, Feedback, Suggestions
Verification (Done, Hold)
Total Grade
First
Completed
The Presentation of the Task is good. Mentioned information has some good Content. All topics were explained very well.
In Blockchain Practical + Theory, you explain Blockchain well and screenshots are provided also good. In Types of Blockchain, you could try to explore them more like with their some example, use cases, and positive-negative. The rest of the task is good.
Done
8/10

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

Coin Marketplace

STEEM 0.18
TRX 0.16
JST 0.030
BTC 66431.89
ETH 2569.32
USDT 1.00
SBD 2.65