Crypto Academy / Season 3 / Week 6 - Homework Post for professor @stream4u

in SteemitCryptoAcademy3 years ago

Hello everyone,

I'm glad to be part of this lecture. I will go through the lecture and provide my answers to the questions as expected from me.

Lets get started...

Question 1


What Are Blockchain?


Blockchain is made up of Blocks which is made to record Information in a way which is difficult to manipulate, change, hack or cheat the system. User only have the ability to edit or change the blockchain that they own with the help of their private keys. Each block is with a time stamp which is linked to the previous block, which makes it a Blockchain

One of the important feature of the blockchain is that, its database is not stored in one location just like the centralized system but rather it is stored in millions of computers with many copies of the ledger. Some other people see blockchain as a distributed ledger which when a transaction is executed, it is duplicated and distributed to the nodes connected in the blockchain.

The blockchain system is made up of some important components which i will be explaining below:

Block

Blocks are files which stores and records data permanently. A block fully or partially record recent transactions which hasn't been recorded into any block yet. A block needs to go through a validation process before it is moved and added to the blockchain. Every block has a components which involve Nonses, Hash and the Data of the block.

A typical example of a block is shows below
image.png

Miners

Miners are active member of a network who validate blocks and transactions. These group of people validate transactions through mining. Miners makes sure the security of of the block and blockchain is free from hackers and intruders. Mining uses different networks which involve the use of high powered machine to contain the high amount of energy and electricity required.

Nodes
The node is one of the component of the blockchain. They are a group of computersin the blockchain that are responsible to mine, create and validate blocks. The nodes receive information on the current block such as the number of transactions involved. Every node connected to the network gets an update of the number of transactions attained.

Types of Blockchain


1- Public Blockchain


The public blockchain allow every user to gain access to the network with the use of internet connection. It is none restrictive blockchain. It uses distribution ledger technology to share and distribute saved data in the blockchain. Nodes have access to all the blocks in a blockchain and all other details involved. Nodes also have the ability to mine and verify transactions within a network.

Advantages of Public Blockchain


Enhance Security: The blockchain uses the hash cryptographic function for its transactions to ensure trust between users. Its decentralized feature form update all users on the network with the same data. A single user in a network can not change a transaction record and it is almost impossible for blockchain failure.

Transparency: This feature of the blockchain is one of the most important one. Every data or information about a transaction is made public for other users in a connected network or nodes.

Accessibility: The public blockchain is easily accessible. It is completely free so there anyone can access it. It can used by the general public, organizations and also institutions to run their business like sending and receiving funds and also payment of salaries.

Disadvantages of Public Blockchain


Scalability: The network gets slow when a lot of number of nodes joins a network. With the increase number and adoption of the blockchain technology, it has to scale up to be able to adapt to the increasing number of nodes.

Cost of Mining and maintenance: With the increasing number of users, maintaining the public blockchain is expensive. And also high consuming power computers are used to produce blocks which uses high energy and electricity making it expensive.

Exposed to Hackers: As discussed, there are no restrictions with the public blockchain. Nodes can easily get access to to the network or blockchain thereby exposing it to hackers or intruders to attack.


2- Private Blockchains


It's a sort of blockchain technology in which the network is controlled by a single company and organisations. It signifies that the general public is not permitted to participate. Authorized nodes within the network can store and access data. Because it is managed by an organization, not everyone can read or write data on a private blockchain; permission from the blockchain's owner is required. Since it used by small scaled organisations that means it used owned by individuals or groups of persons it is very fast.

Advantages of Private Blockchain


Improved security: This is because it is owned by either an individual or a group of individuals so before one can get a transaction processed he needs some sort of permission from the owners.

Transactions fees: They are basically very low with private blockchain. With a private blockchain transactions are fixed no matter the number of transactions done.


Disadvantages Of Private Blockchain


Not Truly Decentralized: A private blockchain is not actually decentralized. Access is restricted to only some limited number of nodes.

No Animosity: Nodes are connected in a blockchain and every user in the network know is knowed by others. This slows the animosity feature of the blockchain.


3- Hybrid Blockchain:


Just as the name implies hybrid, which means its a combination of the above two mentioned. It is made up of private and public blockchain. Members of the hybrid blockchain can choose who can join the blockchain and which transactions are made public. The cheap transaction cost is one of the few reasons why users prefer hybrid blockchain. Transactions will almost certainly be cheap because only a few nodes are required to verify them.

Advantages of Hybrid Blockchain


Fast And Secured: In the hybrid blockchain there is still restriction as the private blockchain is emerged with the public blockchain. With the restricted feature it makes the blockchain secured. There is only access to nodes connected to the network therefore few number of nodes involved get verified faster.

Low Fee On Maintenance and Transaction: Verification of transactions in hybrid blockchain use relatively low power. Unlike the Public blockchain which is more expensive than the hybrid blockchain.

Disadvantages of Hybrid Blockchain


Centralized Nature: Access to the blockchain is being restricted within the blockchain. This feature of it makes it not fully decentralized.

4- Consortium Blockchain


This blockchain is similar to that of a hybrid blockchain. This is the combination of the private and public blockchain working at the same time. Nodes which are from the Consortium Blockchain connects to verify transactions and blocks that are executed. Nodes connected from different blockchains works in a decentralized form such that it acts as validators of blocks. With the Consortium Blockchain it start, verify and receive transactions unlike the other blockchains which only starts and receive transactions. It has no ability to verify or validates transactions.

Advantages of Consortium Blockchain


Enhance Security and Faster: This blockchain is very fast and secured. It restrict other nodes from the network and selects which nodes to part of the network. This feature makes it secured from intruders. Due to the less number of nodes allows without being congested, it makes it very fast.

Multiple Blockchains: It has the ability to select some nodes to connect with other nodes in a different blockchain. This connection of nodes reveal or update transaction details to all the connected nodes in a decentralized way.

Disadvantages of Consortium Blockchain


Less Transparency: The transparency in Consortium Blockchain is very low because it authority have kept some restrictions on nodes that access data on a network.



Question 2


Enhance Security

Stored and saved records cant be manipulated or changed because of its decentralized nature. it is encrypted with end-to-end. The blockchain helps eliminates fraud and unauthorized use which addresses the issue of privacy by anonymizing personal data and with the usage of permissions to prevent unauthorized access. Hackers find it hard to view data due to data been stored accross network of computers.

Transparency

The blockchain is transparent as data are being stored. Users with permission to access the network view the same information of the transaction enhancing full transparency. The digital ledger where information is stored on shows the entire history of a transaction such as the amount, timestamp, transaction type, addresses involved and other details.

Efficiency And Speed

The Traditional way of use of papers for transactions is time consuming which is vulnerable to human error. The blockchain solves this problems by completing transactions more faster and efficient. Documents are stored on the blockchain with its transaction details eliminating the traditional way of exchanging papers.

Reduced Cost

Making a transaction in cryptocurrency is much more cheaper and faster than using the Centralized International Banks. The fee charged in making transaction in crypto is relatively cheaper than using a central bank. Crypto only require an address for a transaction but banks require some paper works which is a waste of time.

Immutability

In blockchain, when data is stored it cant be manipulated or changed. It maintain its originality when the transaction was made. This bring trust and confident into the blockchain encouraging individuals to invest and make transactions.

Traceability

Transactions can be easily traced because the blockchain in transparent. All details such as Amount, transaction time, receivers and senders address can be seen by all hence making it easy to trace from its source to its destination.



Question 3

Distributed Ledger is the distribution of a data of a transactions that are recorded in blocks to all connected nodes that are been authorized in the Blockchain It records transaction details among participants in a network. The distributed ledger distinguish the difference between Centralized and decentralized system. In eery transaction being made, every node is updated with the transaction details being stored and recorded permanently.

Properties of Blockchain Distributed Ledger


The properties of blockchain distributed ledger includes the following;

Security: The security of Distributed Ledger depends on the use of cryptographic hash to encrypt data

Time Stamp: Time and date of a transaction or any other activity on the blockchain is stored which promote transparency in the blockchain.

Privacy: Privacy of users is maintained unlike the centralized system which require user personal information. The blockchain does not require KYC.

Distribution: The blockchain distributed ledger updates all users in a connecting nodes when any activity is being done, changed or manipulated.

Immutability: This feature makes sure that any data that has been inputted in a block can not be changed, removed or manipulated.



Question 4


Blockchain Double Spending


Blockchain Double Spending is a flaw in the cryptocurrency world where the same amount of token is spent twice or more. This problem is caused by hackers attacking the blockchain in the process of making a transaction. Physical currency do not really have this issue since they can not be easily duplicated. The individuals involved can easily identify and verified the authenticity of the physical cash.

This was initially a Bitcoin problem due to its 10 mins blocks validation. It takes 10 mins to verify the authenticity of every transaction to prevent double-spending. Due to the longer time for verification, the hacker gets some time to create and manipulate another transaction in the block. The hacker makes it look like the first transaction is unspent and repeat this process as many times as he wants till the transaction is confirmed.

There are some types of double-spending of which i will explain below:

  • Race Attack: In this type of double spending, the hacker initiate multiple conflicting transaction with the same amount or asset before they get validated. The first transaction eventually comes back as an invalid transaction returning the same amount back to the attacker or hacker.

  • Finney Attacks: This type of attack is mainly possible when a transaction is premined in a block while another identical transaction is initiated before the first transaction is been released to the network. This attack is only successful if the recipient accepts an unconfirmed transaction.

  • Vector76: In this type of attack hackers use software to generate fake crypto asset. These fake crypto asset are use to make payments in the blockchain.

How Bitcoin Handles Double Spending Problem?


The Distributed Ledger
The primary issue of crypto developer is the problem of double spending. This is the spending of an asset twice or more. When double spending happens in the blockchain, we make good use of the distribution ledger. The distribution ledger is stored in thousands of nodes around the world. Every node has its copy of its entire history of transaction and also all nodes collectively update each other when transactions are made as blocks are created. Since each node has its full history of its Bitcoin transactions, we can be able to verify no coin is being double spent. A user is able to confirm their Bitcoin in possesion without relaying on any third party.

Time Stamps

The blockchain is made up of blocks made of time stamped. Blocks are stricly in linear and in order such that if two transaction tries to double spend the same amount of bitcoin. The nodes fairly decides which of the transactions are valid and which is not. In this case no need for intermediary to solve these disputes.



Question 5


Block Hashing is the use of cryptographic algorithm mechanism to encrypt and producerhe details of a transactions and being saved in a block. Below i will practically demonstrate how block hash works.

image.png

image.png

image.png

  • From the screenshot above the blockchain has 5 blocks with each block number being labelled. All the blocks are being linked together and this is done by adding the previous block to the new created block using their hashes. The hash of a previous block is being added to newly created once.

Block one previous hash is in zeros (0000000000000000000000000000000000000000000000000000000000000000) because it has no previous block and its Hash indicated(000015783b764259d382017d91a36d206d0600e2cbb3567748f46a33fe9297cf) . The first block is known as the genesis block marking it as the beginning of the blocks.

For the second block it has a previous hash of (000015783b764259d382017d91a36d206d0600e2cbb3567748f46a33fe9297cf) and its hash of (000012fa9b916eb9078f8d98a7864e697ae83ed54f5146bd84452cdafd043c19)

We can understand that Block 1 and Block 2 has been linked using the hash (000015783b764259d382017d91a36d206d0600e2cbb3567748f46a33fe9297cf). The hash is Block 1 Hash which is linked by Adding the Hash to block 2 Previous Hash.

The third block repeats the same processs which eventually links all the blocks to each other. The third block has a previous hash of (000012fa9b916eb9078f8d98a7864e697ae83ed54f5146bd84452cdafd043c19) and a Hash of (0000b9015ce2a08b61216ba5a0778545bf4ddd7ceb7bbd85dd8062b29a9140bf)

Additions Of Data To A Block In A Blockchain


Blocks produces new Hash when data is being added to blocks and being remined. Every data that is inputed in a block changes the hash of all other blocks because they are connected to each other. Lets take a practical practice with the image below;

image.png

image.png

With the first image i Input data "Crypto Academy" which produces a new hash across all the blocks. I also Input @roma078 and it produced different Hash which can be confirmed with the screenshot provided.

Mining Process Of A Block in A Blockchain


Mining a block in a blockchain is the process of validating of blocks. The interface shows RED which indicates that the block is invalid and needs to be validated. This is done with the use of high energy resource by calculating the nonce of a block. Powerful machines that uses high amount of electricity and energy is used to validate the process. Mining involves calculating for the correct nonce number to validate the block

Below i will use screenshot to demonstrate how the validation process is done by getting a correct nonce number.
image.png

We have a nonce number of 11316 and Hash 1ea5ec52a41737dba6d8eaf2cfe47a45aa53ed1aeb12625dbf68e2f97422593e in block 1 and block 2 has a nonce number of 35230 and hash of bdc31e7e4c588da6a4888239803bb565a9177176ebfb7c089ce654d7e700f688.

Now i try to get block 1 validated by clicking mine and i got a new nonce number of 91527 and hash of 000016245c48e90171d7d46c0e230fdb510872fc87693282f5b10b78d239913e. This is illustrated in the screenshot below
image.png

With the block 2 i did the same process and generated the nonce number of 26618 and hash of 0000dfe1cc150f23ee5424d623264d4f535a5654e27db23b5ccf9e6ec12a3e36. Screenshot can be seen below
image.png

The 3rd block also generated a new nonce number of 56265 and hash of 961204f0ca884ca8c2b9361a3be1867fa9e4474d6c25adcfde6ca2b1a399f1da which can be seen the screenshot below.
image.png



Question 6


A Race Attack is a type of Double-Spending which happens when an intruder create two or more conflicting transactions. This is done with the use of single token for exchange of multiple assets. The transaction is sent to the victim who then accept payment and gives receipt without waiting to confirm the transaction. With the two conflicting transaction, the blockchain mining process validates one of the transaction and invalidates the other means it will remove the invalid transaction from the blockchain.

We can avoid this type of hack by always waiting for confirmation from miners to validate the transaction. For example an intruder has 0.001 BTC and sends it to two different users using different nodes. The hacker succeeds if two of the victim releases item without confirming from the miners to validate the transaction. The hacker is able to spent the asset twice.



Question 7


In as much the blockchain has its positives and advantages it also has its diadvantages and limitations which hinder its ability to have a 100% efficiency work rate. Below i will explain some of its limitations and challenges that the blockchai faces;

51% Attack

This is one of the high challenge or limitation face in the blockchain. It is when a malicious miner or group of miners gain more than 50% control of a blockchain or hash rate. These hackers or miners have the ability to block the history of the rest of the network. In recent times developers have develop some written protocols to minimize or avoid such attacks.

Fraud

The blockchain feature which does not require Know Your Customer(KYC). No personal information is needed in the blockchain hence the rate at which crime is committed on the blockchain is high. Tracing in the blockchain to get and punish these offenders is most highly impossible.

High Energy Consumption

Blockchain energy consumption is one of the problems with miners. The blockchain uses proof of work consensus mechanism where miners uses strong energy consuming machines. With the high cost it makes it hard for individuals to get involved in the mining process. This is one of the limitation of the blockchain as face today.

Not Accepted By Some Governments

Blockchain is one of the best technology invented. Upon all its advantages and benefits some governments and countries have still not make it legal. Some believe it promote crimes since its difficult to trace and punish criminals and others too have their own reasons. Because of this it makes the blockchain being adapted by individuals very slow.



CONCLUSION


The blockchain is a very great technology and has the potential to take over the financial sector to which the centralized system will be less used.

The blockchain revolve and will make life easier. Making transactions for goods and services easier and how information are being stored. The blockchain save and records data permanently and immutable.

The technology will have a positive impact on most industries including financial, healthcare, transportation and alot more industries. The world revolve around technology hence the blockchain needs a chance to make an impact.

All countries and government bodies needs to legalize the operation of the blockchain. Although it has its limitations and disadvantages, that shouldnt hinder its ability and positive change it can bring to the world.


Thank you for reading through @stream4u

Sort:  

Hi @roma078

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 average Content. All topics were explained very well.
The types of Double spending explain very short. In Blockchain Practical + Theory, you explain Blockchain well and screenshots are provided also good. Still, the information is not cleared for what if any middle of the block gets changed? Practically you tried well but what did we understand from this Practical, that theory information need to be more clear with the correct explanation. The rest of the task is good.
Done
7/10

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