Steemit Crypto Academy|Season 3 Week 6| Homework Post for @stream4u.

in hive-108451 •  3 years ago  (edited)
Greetings everyone,


image.png


image.png

Introduction

This week professor @stream4u has delivered his lecture on blockchain.
A topic I find a big interesting because it teaches things we never knew about.
After going through his lecture and doing my research, I will now complete his homework task.

image.png

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


When we hear the word blockchain, different ideas come into our minds as to what it means.

Blockchain in simple English terms is a technology, a technology that stores its information in blocks.
This technology is a type of database
On a blockchain once the information is entered it cannot be altered or changed.
What thus means is that the information is safe from hackers, can no longer be deleted like other technologies.



image.png

S


We have heard of decentralized technologies right? A blockchain looks to make its technology as open as possible which is why it is decentralized. So information can be read and seen by other blocks.

A blockchain works by using cryptographic functions that are known as hash to secure the block that are created.
The hash makes sure that these blocks crested are secured from hackers.

A blockchain system has three types.
These are;

Miners: Just as in the real world, miners are those that do the first and most demanding work on the blockchain.
Miners are the people who are supposed to solve complex algorithms.
Miners are able to validate blocks and transactions by solving these algorithms.
When they are mining they use high quality and expensive machines that consume a lot of electricity.

Nodes: Nodes are also essential part on a blockchain.
Nodes are basically computers which are connected to the blockchain.
Their function is to first of all create blocks, after the blocks are created they then mine these blocks and after they are mined they are approved.

Blocks: When data is created they have to be stored in order for them not to be lost.
Blocks are tasked with the job of storing data with the help of digital ledgers.

Digital ledgers is a digital platform for storing vital information of transactions that occur in a blockchain.

Types of blockchain

There are generally 4 types of blockchain which are,

Public Blockchain
Private Blockchain
Hybrid Blockchain
Consortium Blockchain

Now I will shed more light on these types of blockchain I stated above

Public Blockchain.

Just as the name suggests, a Public blockchain is a type of blockchain which is open.
It's does not restrict any user from accessing it.
What a user needs to gain access to it is just Internet connection.
In this type of Blockchain, the people who are able to participate or involve their selves in validation of a transaction is not restricted as any user can participate in it.

What a user should know is that once a transaction is transmitted or occurs the Blockchain does not allow for any edition so we are advised to cross check our transactions before confirming it when using these type of Blockchain.
All these are made possible because these type of Blockchain is actually decentralized so it is in no one's hand to handle the business of the Blockchain but rather miners are entitled to run the necessary nodes on the Blockchain and by doing this they are tasked with the work of securing the Blockchain.

The aim of the public blockchain is to work with cryptocurrency by allowing users to mine and exchange the cryptocurrencies. such as bitcoin and Ethereum.

Remember I said before blocks are mined on a blockchain complex algorithm must be solved by the miners?
Well In public Blockchain, it uses the PoW(Proof Of Work) or PoS(Proof Of Stake) consensus algorithm.
The miners in the public blockchain are rewarded with the native token as a form of motivation for running and securing the nodes on the blockchain.

Private blockchain.

Just as the word suggests.
Something that is private means that it is not as open as the public blockchain.
In these type of blockchain, access is limited.
A private blockchain is a a type of blockchain that makes access to it's platform very limited.
Which means without some kind of authority a user cannot access these blockchain.

On these blockchain, privacy is highly valued.
Unlike the public blockchain, the private blockchain is not decentralized which means it cannot be as secure as the public blockchain.
When something is not decentralized it means it has authority that take care of the blockchain.
What this means is that unlike the public blockchain data or information entered into the system can be altered, changed or modified by the governing body.
It is mostly used by a small group of people.
Because of this it does not use a lot of energy.
Transactions on these type of blockchain are generally faster and more efficient

Hybrid blockchain
In normal English terms, Hybrid means to create

So what a Hybrid blockchain basically means is that they have employed the use of the public and private blockchain.
But what is fascinating about this type of blockchain is that even they it combines the private and public blockchain features it still manages to makes it platform transparent, but the blockchain is not open to all.
Since it also employs the feature of private blockchain, it also tries its best to be as private as possible whilst providing high security and at the same time open and transparent.

On the Hybrid blockchain, participating members are not allowed to alter or change data already entered but users have the option of choosing which of their activities or transactions they want to make public.

One nice and pleasing feature I like about these blockchain is that nodes have access to all transactions that are made by other nodes but their identity is hidden.
A node can only access or see the identity of another node when they perform or transmit a transaction together.

Consortium blockchain.

These type of blockchain also employs the use of other blockchains.
As I explained earlier in the hybrid blockchain; the use of this blockchain is mostly employed by small organisations or small groups of people.

So in the consortium blockchain, these small groups come together to run a single blockchain.
But they do not give control or authority to one particular body as it is decentralized.
In this type of blockchain, a block can only be added when all the other nodes confirm the transaction.

Involving or participating in this type of blockchain is beneficial to all parties as a problem can be solved much faster with efficiency.

image.png

. What are the benefits of blockchain?


The blockchain technology has a lot of advantages.
The following are some of them.

Decentralization

This might just be my favorite part of a blockchain.
We all know that the primary aim for the introduction of cryptocurrency was because users wanted freedom and this gives us the freedom we so desire.
The blockchain is a perfect exam of decentralization in that no central authority controls what happens.

Security.

Even though some of the types of blockchain are not very secure.
Because of the use of the hash technology.
Most part of the blockchain is very secure because of the fact that information or transaction once confirmed on the blockchain cannot be altered.
This single reason makes the blockchain very secure from hackers who are looking to cheat the system.

Transparency
The data on the blockchain is free to seen by other users.
Because of the decentralization aspect of the technology no data stays hidden as everything one does can be seen by other users and nodes.
Even though everything is transparent the system is still not vulnerable to hacks.

Cost effective.
Because the blockchain is not controlled by a central body, transactions that are transmitted or made on the blockchain are cheap.
We all know that transactions between users happens directly between them which is l known by peer to peer.
This system reduces the cost that a user would have paid in a centralized system or traditional system.
image.png

.Explain Blockchain Distributed ledger.


Blockchain distributed ledger is a what makes it possible for a blockchain to store data.
Just like the world Wide Web, before information is distributed the computer are interconnected all over the globe so that these information can have shared within seconds.
As information is shared between the nodes we have to keep in mind that the data can't be altered but they can be seen as the blockchain is decentralized which means it is transparent.

As the nodes are transmitting the data it is transmitted in real time.
Because of this it is highly difficult for the system to record failure because all the nodes are need before a transaction is approved.

The Blockchain distributed ledger is very secured, it uses a cryptography to secure its network.

Properties of distributed ledger

Distribution

The distributed ledger on the Blockchain makes sure to send all data on the blocks and nodes to the other users on the blockchain.
Because of transparency, all other information is seen by the other nodes

Security

The system uses a technology called the hash cryptographic technology to secure it's ledger.

Transparency
Information or data stored is seen by other users because the blockchain is decentralized.
Nothing is hidden from any user.

Immutability
The blockchain distributed ledger makes sure that data entered cannot be changes, altered or deleted.

Unanimous decision.
Transactions are confirmed and approved by all other nodes which are interconnected.

Programmable
The blockchain distributed ledger is Programmable to work automatically.
image.png

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


Bitcoin double spending is when a user makes a payment multiple times with the same currency so that he or she receives more.
Usually more than what he or she is supposed to receive.
This issue is only common to cryptocurrencies, know as digital cryptocurrencies.
It cannot happen with local currency, it happens with digital currency when the seller is careless.
When the seller is careless, and the buyer is a fraud he is able to cheat the seller and then double spending occurs.

When double spending occurs in the blockchain, it means the blockchain has been attacked.
This usually occurs from unverified transactions.

A perfect example to this is when a trader wants to make a sale of a cryptocurrency assets, let's say btc.
When the trader sends the btc into the buyers account but the exchange does not remove the btc bought by the buyer.
The seller can still sell the same asset to another buyer and receive funds for that same cryptocurrency sold to the first buyer.

This is when double spending occurs on the blockchain.

There are basically 3 types of double spending.
These are • Race attacks
Finney attack
Vector 76 attack.

I will like to talk a little about these.

Race attack

In these type of attack, the fraudster makes a moves in anticipation that the receiver will be careless enough to make a wrong move by accepting an unconfirmed transaction.
This allows the hacker to double spend with the same token.

Finney attack.

In these type of attack, it happens when the miners uses duplicate details of a transaction that has already occurred.

Vector 76 attack

In this form of attack, it happens when a user sends fake assets to users with the blockchain community.
This is just like in real world scenario when fraudsters are able to make counterfeit notes of local currency, they can also make fake crypto.

How does bitcoin handle blockchain double spending

As explained earlier, when double spending happen in the blockchain it means that the blockchain is compromised.

The bitcoin blockchain handles blockchain double spending by; first of all when a user tries to send one crypto asset two times the btc blockchain makes sure it validates the first transaction which was initiated making sure it adds it to the block.

The first transaction is directed to the unconfirmed transaction pool.
What we should realize is that because the transaction happens in real time, it is validated before it is added to the block.

After the first transaction is validated, the second transaction is also sent to the unconfirmed transaction pool and then it is rejected.
After it us rejected it is removed from the blockchain.

So what this basically means is that btc blockchain handles double transaction by making sure it accepts the first transaction and then it rejects the second transaction.
image.png

.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.


Block hash is used to encrypt blockchain transaction details. The output data obtained from inputs into data section of hashes are of fixed length. No matter how long or long an input data is, the output data in hash form is always of the same length.

We would be visiting blockchain demo to verify all this including what happens to data editing in blocks and blockchains.


r1.PNG

Screenshot of interface of blockchain demo.

  • Hash.

Hash is the first feature or characteristics of blockchain displayed when blockchain demo is launched.

It has already been established that hashes are of fixed length regardless of length of input data so I would be exploring the output of homework and HomeWork.


r2.PNG

The screenshot above is the output data given from the input of homework.

The hash value given is 404355522396b92953086038cf05a41b27a9f1368be92c0e6b71a1e8c93f420a

Let's now see what happens when we change the h and w in homework to HomeWork.


r3.PNG

It is observed that the hash value is changed but is still the same length as it was in homework.
12b085426d02d69e15112636a1338ed9a0552dc9e857959cf6817c254de9abb0

  • Block.

The block of the blockchains starts from blockchain number 1 with a nonce value and o data. There is also a verified hash value.


r4.PNG

Nonce is what is used to verify blocks on a blockchain. A block is verified when the resulting has value starts with 0000.

I want to show how to verify a block with data homework so I enter homwork into the data box and immediately realize that the color change from green to red and the start of the hash value change from 0000 to to 9954 and the nonce changed.


r5.PNG

Because nonce is used to validate you would have to get a new valid nonce to verify the block. You can either do this manually or through mining with high computin power.

It is better and faster to do it automatically so you click on mine and the new block would get validated.

The block 1 with data homework now has nonce 97719 and hash value
0000412ca36861afcdeba353bcc5cca987b6a8ca54876cf7c3a5caf5e4b81cee.

  • Blockchain.

There are five blocks in the blockchain page.

I noticed that block 1 has nonce 11316 no data and no previous hash hence, 0000000000000000000000000000000000000000000000000000000000000000 and hash 000015783b764259d382017d91a36d206d0600e2cbb3567748f46a33fe9297cf .


r10.PNG

Block 2 has a nonce number 35230, no data but has a previous hash 000015783b764259d382017d91a36d206d0600e2cbb3567748f46a33fe9297cf and hash value 000012fa9b916eb9078f8d98a7864e697ae83ed54f5146bd84452cdafd043c19 .

Block 3 has nonce 12937, no data, previous hash which is the same hash of block 2 0000b9015ce2a08b61216ba5a0778545bf4ddd7ceb7bbd85dd8062b29a9140bf and a hash value 0000b9015ce2a08b61216ba5a0778545bf4ddd7ceb7bbd85dd8062b29a9140bf .

Input data entered into block 1 immediately invalidates all the block.

I entered the same data homework into block 1 and the blockchain turned red.

r7.PNG

As already established, nonce validates blocks so we would click on mine to get the block validation. Let's observe what happens when we mine block 1.

r8.PNG

It is observed that only block 1 gets validated and turns green with a new hash 00007c0e058207eb8071cb7ce3c5a3e3dbb17195a875b122a1338ba0b9614a6e and nonce 6782.

Let's validate block 2 using the same method. After clicking on mine, block 2 turns green as well leaving 3,4 and 5 red.


r9.PNG

The new nonce 10705 validates the block with a previous hash 00007c0e058207eb8071cb7ce3c5a3e3dbb17195a875b122a1338ba0b9614a6e
and hash value
00005c7c75e3f5af1feb98d9ef739bd4f5c27fe54b9a11a5413c734db4b9f261 .

With the results from entering input data homework, it is noticed that all the blocks gets invalidated and re validation of the blockchain means that all individual blocks must individually get re mined again.

image.png

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


Race attack as explained earlier is the fraudster makes a moves in anticipation that the receiver will be careless enough to make a wrong move by accepting an unconfirmed transaction.
This allows the hacker to double spend with the same token.

Let's take an example.
Imagine a user sends a token to a receiver already.
After the transaction is confirmed, the sender then decides to use the same details he used already in sending the previous asset for the second transaction he is performing.
Now when the receiver is careless enough and doesn't confirm the transaction before approving the sender then receives double funds for the same crypto asset.

This is what is known as race attack.

This is why the receiver is always advised to verify a transaction before confirming or releasing funds, to prevent double spending.
image.png

.Limitations/disadvantages of Blockchain.


Disadvantages of blockchain

Cost of mining.

The problem with mining crypto assets does not always come easy as a user has to have highly efficient machines.
And these machines are very expensive.
The user also consumes a lot of electricity and these electricity does not come at a cheap cost either

Scalability

Because the blockchain is decentralized it allows for users to join at anytime without preventing any user.
This mostly cause the system to be busy as many users are mining and busy on the network, and this in turn reduces the efficiency of the system.

Loss of funds to a wrong transaction.

We all know that once a transaction is confirmed on the blockchain it can no longer be reversed so mostly users who make wrong transactions end up loosing their funds.

Double spending

We all know that the blockchain hardly fails but one deficiency is the double spending.
When users fail to confirm a transaction and them carelessly make payment they end up loosing their funds due to double spending.

image.png

Conclusion

I must admit that at first glance this topic looks a bit difficult, but after making much research into the topic it becomes understandable.

The blockchain has been decentralized mainly because it was introduced to cater for the high fees with centralized system.

This is why most users prefer the decentralized system to the traditional system as it has less transaction fees.

Even though the blockchain has its Disadvantages, it also has its advantages which have overshadowed the Disadvantages.
Some advantages which are how efficient and secure the blockchain is.

It is transparent which makes a user more safe when he is making a transaction on the platform.

Double spending is something that compromise the blockchain but it also helps traders to be more careful to confirm transactions before they release their funds.

This lecture has been educative and I will like to thank the professor for going through this.
Thank you.

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

Hi @rubilu123

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
All topics explained very well. The Presentation of the Task is good. Mentioned information has a Quality Content. Blockchain Practicle and explanation done very well.
Looks Fine.
Done
10/10

Total | 10/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

Thank you professor for the kind review.