Crypto Academy / Season 3 / Week 4- Homework Post for Professor //@pelon53// - Topic: Root Hash And Merkle Tree

in SteemitCryptoAcademy3 years ago

Hello Steemians how are you I hope you will be fine. Alhamdulilah I am also fine with the grace of God. I am very thankful to Professor:@pelon53 for this wonderful lecture. so lets start.

Capture.PNG

Question:

Explain in detail the hash rate?

Ans:

A hash rate is a unit that measures the processing power of a bitcoin network.The hash rate is simply described as a measure of the computing power. Algorithms of hash functions are required to extract cryptocurrencies in the cryptos ecosystem. This calculation is performed by high power supercomputers. The hash rate is measured in hashes per second. Powerful computers are not all the same, some perform their work faster and some perform their work slow. It means that their power rating are very different from each others. Another name for Hashrate is hashing power with SI prefix hour/second. Hash rat is an important factor in extracting cryptocurrencies to evaluate the performance of blockchain networks. High hash rates are very important in extracting cryptocurrencies, especially for bitcoin miners, because a miner has a higher hash rate, the speed at which miners solve complex hash and reward algorithms for blockchain extraction. , And find the location for the hash and find the next part.

Cxd_zOLVEAEne74.jpg
source

Sometimes prefixes lie Mega , Giga , Tera , Peta , and Exa are included in the S.I unit. High host, this means faster miner performance and thus more data processing per second. It is worth noting that the use of computers with high hash rates can increase the speed of transaction processing in blockchain mining and thus increase the extraction cost. Depends on the cryptocurrency extraction and the type of device or device extracting it. Because different cryptocurrencies do not have the same hash rate. Different currencies do not have the same extraction rate. When the same powerful computer is used to run them, at the same time, you will find that one hash has a higher hash rate than another. Having a high hash rate is very important especially for Bitcoin miners.

Question:

Make the following Merkle Tree: Transaction (tree leaves): Steem1; Steem2; Steem3; STEEM4; Steem5; Steem6; Steem7; Steem8?

Ans:

To create a Merkle Tree for the transaction above, I will do this task by generating SHA-256 for all the leaves. For doing this , I will use SHA-256

Steem1:

Hash
7760E25BCB80ADF1DD92DB339BF5790A59E90CD54EFA072F1250DCE13FA97045

1.png

Steem2:

Hash
FE00506E91CF52BC4B35321E6B978D1A7349397B19C6C1C01E095971FDEC9741
1.png

Steem3:

Hash
A9418332E0C351D6A50C835AA9E57D514F0573C231D491E97726DB8A5844F2DC

3.png

Steem4:

Hash
22F4EC8E20C9CCAF2C313B23F18981B1C73BF39081BCD739E5D998A95A46AB30

4.png

Steem5:

Hash
2A3C87336683AB0DDFA56AFEFC740E6C13A02FEA0A43D6797343B26D7AF0C57B

5.png

Steem6:

Hash
A7BAA6DE0C0658E9E3681966E542BACD116529F5AE9A2D9126CDB1C1D5BC1278

6.png

Steem7:

Hash
D441688DDA7F9285E8811728DD9A3955CF74F0A3C7600C1589D0F1D3B48FFAC7

7.png

Steem8:

Hash
F2E38ED4FF662087B6E9BEAFA4158EBC488B995732057BDA019A6A77FFB5F9F5

8.png

After creating the hashes for the leaves, the next step is to generate the branches. Now we will perfomr to generate the Merkel Tree branches hash:

Steem1Steem2:

Hash
A5568957014F6AC3866923C7DE20D375E706B8D8C9F453636E90B9965ABEC62B

1.png

Steem3Steem4:

Hash
18D25196DB699F6AB9222B7302EB8A6F6EBFADEC703C07DD5DB8D9455913A499

2.png

Steem5Steem6:

Hash
D118E137F92A0DBEA138B6BF70C7714153A7BC393CD0272A44BD94864645224B

3.png

Steem7Steem8:

Hash
A81D57BA11AEDFA9EFBBA42F6523D75D1EFA50B22C5E3557A21CEFFE87DDFC4A

4.png

After generating the branches now i will generate in the Merkel Tree is the higher branches:

Steem1Steem2Steem3Steem4:

Hash
8A248C05E69C4F1AA403AD18A7F445FF500C42483DA425CE0C980CDB2FD1AD9B

1.png

Steem5Steem6Steem7Steem8:

Hash
8B0935AEAB3F51BFA2B0750703EE2387E2B20EB19B0D24227E180C03A851AF17

2.png

After generating in the Merkel Tree is the higher branches now i we will generate root hash:

Steem1Steem2Steem3Steem4Steem5Steem6Steem7Steem8
Hash:
9C2FC83F36D59B8ED5033D2BCC417728583C8DAA0AA9868FD374BE3619D6E4F9

21.png

Now we will combine all of these to make Merkle Tree:

The zoom level is very low therefore, i am also showing you screenshort by dividing them into two parts:

Capture.PNG

Screenshort of both parts:

1.PNG

2.PNG

Question:

Tell The Steps To Follow To Verify IF Steem6 IS INCLUDED IN THE MERKLE TREE?

First of all generate the hash of the leaf on one side, which is Steem5

11.png

Now we generate Steem5Steem6:

11.png

Now we will generate Steem5Steem6 and Steem7Steem8

11.png

Now we will combine all parts which is Steem1Steem2Steem3Steem4Steem5Steem6Steem7Steem8 to generate the root hash:

11.png

Question:

USING THE SHA-256; YOU MUST PLACE EACH COMPLETE HASH IN THE MERKLE TREE. TRANSACTION (TREE LEAVES): SCA1; SCA2; SCA3; SCA4; SCA5; SCA6; SCA7; SCA8. Explain each step?
Ans:
To create the Merkle tree, i will use this SHA-256

SCA1:

Hash
13E0A04BB0E669E1C638DBE3A704743F99F162B25245E4D8C064D35BA38FA8C8

1.png

SCA2:

Hash
27849353A9C8CC4E948EB6E5748EDD79CB83513D8C0ADAF3E8C83D3792C9149B

2.png

SCA3:

Hash
67E872F952C105C35E0BCE130536D061F4999DCA5593754BA9BA7BE59B8E7C0D

3.png

SCA4:

Hash
491928A32BAE70A12FA251412BBFD7C9999F317BA6BF577C283C724225270A43

4.png

SCA5:

Hash
99C078C39CDE7F47799E0E8691460A9F3E83E78D498EA989308FCFCC58907B19

5.png

SCA6:

Hash
7A648D887B124DB14E96E23BA92783E7F26D00957C19B9B8229632C2C1873729

6.png

SCA7:

Hash
7E0BBD6BA4BA9896F9911AF46B06DD2C47535F9C80B29D693FDF6B9319D0D68E

7.png

SCA8:

Hash
562ABCEEB497E1FE7AE275A883FD5EF9D92A05F5C19D82ABAA0DC1571B7DF3AD

8.png

After creating the hashes for the leaves, the next step is to generate the branches.

SCA1SCA2

Hash
91B09BBA815748166FB36413342C7E4E7E809F4BAC538C0418841A4476B527EF

1.png

SCA3SCA4

Hash
B49B48697A3ACBC5E3D2E36B6EE49C44020D88E664C5C1AA7A7CF34058177379

2.png

SCA5SCA6

Hash
F026924CD1285FF92C2A2DE9B9313027EB67273A82375C939348C887F6B52F77

3.png

SCA7SCA8

Hash
AA55EC5A6B11393B289C4B2B6916172ACC2941C5C978FB1D7BF02696BAB323A4

4.png

Now we will generate second level branches:

SCA1SCA2SCA3SCA4

Hash
F50DC120CBF6C46923037F6D7F41D4153ECC9AB7430DDA662C142DB1FFE483F7

1.png

SCA5SCA6SCA7SCA8

Hash
A3D8CA8494CC426ABD5E1FC5FA0FEAE4F2B2ECE4C4CECDCA05E19EB66542533F

2.png

After creating the second level branches, the next step is to generate the root hash.

SCA1SCA2SCA3SCA4SCA5SCA6SCA7SCA8

Hash
CB40CA6DB72DD507CF9118963F94B7740822258E74AFB0FD45D89DB35D24B386

22.png

Now we will create the Merkle tree to combine all inputs:

z.png

Due to low zoom level i am also showing two screenshort by doing zoom in:

1.png

2.png

Question:

If the number of leaves on the tree is odd, what should you do? Explain?

Ans:

If the number of leaves on the Merkel Tree is odd then we cannot calculate the hash root. In below figure
The last leaf must be doubled to get parent hash.
11.png

The above tree have seven leaves as you can see this. We can make the last leaf double by creating new SCA7. We can combine last leaves SCA7 and it will be show SCA7SCA7. As its parent hash and from there we can go to higher level branches and then root the hash.

11.png

Conclusion:

Hashing is one of the pillars of blockchain. In addition to the security that this operating system provides, miners are rewarded every time they verify hash values ​​by examining complex mathematical problems. In this lecture i have learned more about the importance of hash roots and hastages in the blockchain system. We also found that the cascading system used to manage information in the blockchain is called the Merkel Tree, and its key is to maintain the security and reliability of the data in the blockchain.
Each subject block and transaction data has its own hash, and there are many transactions in a block, so calculating transaction data to manage it is just as complicated. These figures are arranged in a pattern of trees that are known as. Merkel tree, easy and fast deals on blockchain. However, due to the fast trading process in mining, miners who use computing systems with higher hash rates also receive more rewards.

Again thanks to Professor @pelon53 for this wonderful lecture.

Sort:  

Nice wrote up bro . You explained very well your assignment. I hope you will get the good marks from the professor @pelon53 . I will pray for you . Best of luck for the above assignment.

Best regards:
@shahzadprincejee

Loading...

Coin Marketplace

STEEM 0.18
TRX 0.14
JST 0.030
BTC 60209.45
ETH 3212.30
USDT 1.00
SBD 2.43