Crypto Academy, Season 3: Week 4 | Homework post for @pelon53

in SteemitCryptoAcademy3 years ago (edited)
Hello professor @pelon53. I have read your post and I have got to know many things about Hash root and Merkle Tree that are very interested. Now I am going to submit my homework task.

Screenshot_20210724-101411_PicsArt.jpg

Question 1. Explain in detail the hash root.

Well, if we talk about hash root, then it is the speed at which any given mining machine can be operated. In the world of Crypto, blocks are find by solving Complex computational problems which are the mathematical puzzles.

Each data block has an incremental hashing of information frok which the root hash is generated. The process confirms that each of the blocks of information is treated with a hash which is unique, irreversible and somewhat not repeated.

Just as that the example of making a Merkle tree using the SHA-256 hash algorithm. The SHA256 is one of the cryptographic algorithm used to generate hash code of a particular word.

For example, When i typed Steem, I got the hash 7B8ABC5E9238266CBA885E7EE43DB7256F69EC2E120D8706DB2A4AB704E85A43

Screenshot_20210724-005057_Chrome.jpg

The actual unit of Hash is 'hash/second'. But as the power of mining increases, the unit of hash changes and it converts into many different units. Some of them are 1 H/S, 1KH/S, 1MH/S, 1GH/S, etc.

The miners require a complex computational problem and this require many number of attempt to create a new hash. When the creation of a new hash is completed, the block is added in Blockchain.

So, this is all about the Root hash.

Question 2: Make the following Merkle Tree: Transaction (tree leaves): Steem1; Steem2; Steem3; Steem4; Steem5; Steem6; Steem7; Steem8. I made it to the Root Hash. And put every hash generated using SHA-256 , show screenshots. Tell the steps to follow to verify if Steem6 is included in the Markle Tree.

Now, for this question I have found the hash of all the steems from SHA256.

I have created a merkle tree and the leaves on the tree are named as Steem1, Steem2, Steem3, Steem4, Steem5, Steem6, Steem7 and Steem8. Type the names of the leaves and you will get the Hash of each which are given below:

  • Steem1
    7760E25BCB80ADF1DD92DB339BF5790A59E90CD54EFA072F1250DCE13FA97045

Screenshot_20210724-010644_Chrome.jpg

  • Steem2
    FE00506E91CF52BC4B35321E6B978D1A7349397B19C6C1C01E095971FDEC9741

Screenshot_20210724-010952_Chrome.jpg

  • Steem3
    A9418332E0C351D6A50C835AA9E57D514F0573C231D491E97726DB8A5844F2DC

Screenshot_20210724-011130_Chrome.jpg

  • Steem4
    22F4EC8E20C9CCAF2C313B23F18981B1C73BF39081BCD739E5D998A95A46AB30

Screenshot_20210724-011229_Chrome.jpg

  • Steem5
    2A3C87336683AB0DDFA56AFEFC740E6C13A02FEA0A43D6797343B26D7AF0C57B

Screenshot_20210724-011303_Chrome.jpg

  • Steem6
    A7BAA6DE0C0658E9E3681966E542BACD116529F5AE9A2D9126CDB1C1D5BC1278

Screenshot_20210724-011341_Chrome.jpg

  • Steem7
    D441688DDA7F9285E8811728DD9A3955CF74F0A3C7600C1589D0F1D3B48FFAC7

Screenshot_20210724-011417_Chrome.jpg

  • Steem8
    F2E38ED4FF662087B6E9BEAFA4158EBC488B995732057BDA019A6A77FFB5F9F5

Screenshot_20210724-011439_Chrome.jpg

BRANCHES:

  • Steem1Steem2
    A5568957014F6AC3866923C7DE20D375E706B8D8C9F453636E90B9965ABEC62B

Screenshot_20210724-012545_Chrome.jpg

  • Steem3Steem4
    18D25196DB699F6AB9222B7302EB8A6F6EBFADEC703C07DD5DB8D9455913A499

Screenshot_20210724-012839_Chrome.jpg

  • Steem5Steem6
    D118E137F92A0DBEA138B6BF70C7714153A7BC393CD0272A44BD94864645224B

Screenshot_20210724-013013_Chrome.jpg

  • Steem7Steem8
    A81D57BA11AEDFA9EFBBA42F6523D75D1EFA50B22C5E3557A21CEFFE87DDFC4A

Screenshot_20210724-013132_Chrome.jpg

BRANCHES 2

  • Steem1Steem2Steem3Steem4
    8A248C05E69C4F1AA403AD18A7F445FF500C42483DA425CE0C980CDB2FD1AD9B

Screenshot_20210724-013833_Chrome.jpg

  • Steem5Steem6Steem7Steem8
    8B0935AEAB3F51BFA2B0750703EE2387E2B20EB19B0D24227E180C03A851AF17

Screenshot_20210724-013948_Chrome.jpg

ROOT:

  • Steem1Steem2Steem3Steem4Steem5Steem6Steem7Steem8
    9C2FC83F36D59B8ED5033D2BCC417728583C8DAA0AA9868FD374BE3619D6E4F9

Screenshot_20210724-014503_Chrome.jpg

MERKLE TREE:

PicsArt_07-24-09.44.33.jpg

If steem6 is included in the Merkle tree, then we have to follow some of the steps to verify. To assure the verification, we need to check the longest hash i.e. root hash.

First of all, calculate Hash of Steem5, then i have already calculated.
Screenshot_20210724-011303_Chrome.jpg

Then, calculate the combined Hash of Steem7Steem8 and Steem1Steem2Steem3Steem4.

Screenshot_20210724-013132_Chrome.jpg

Screenshot_20210724-013833_Chrome.jpg

Then calculate Steem6 and then calculate the combined hash of Steem5Steem6.
After calculating, then at the last calculate root hash which is of Steem1Steem2Steem3Steem4Steem5Steem6Steem7Steem8.

Screenshot_20210724-014503_Chrome.jpg

This is the way to verify every branch which we want to calculate without configuring the whole tree.

Question 3: 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, Show Screenshots. If The Number of Leaves on the Tree is Odd, What should you do? Explain.

In this, on the same algorithm SHA256, I have created a merkle tree and the leaves on the tree are named as SCA1, SCA2, SCA3, SCA4, SCA5, SCA6, SCA7, SCA8.

  • SCA1
    13E0A04BB0E669E1C638DBE3A704743F99F162B25245E4D8C064D35BA38FA8C8

Screenshot_20210724-021102_Chrome.jpg

  • SCA2
    27849353A9C8CC4E948EB6E5748EDD79CB83513D8C0ADAF3E8C83D3792C9149B

Screenshot_20210724-021312_Chrome.jpg

  • SCA3
    67E872F952C105C35E0BCE130536D061F4999DCA5593754BA9BA7BE59B8E7C0D

Screenshot_20210724-074320_Chrome.jpg

  • SCA4
    491928A32BAE70A12FA251412BBFD7C9999F317BA6BF577C283C724225270A43

Screenshot_20210724-074417_Chrome.jpg

  • SCA5
    99C078C39CDE7F47799E0E8691460A9F3E83E78D498EA989308FCFCC58907B19

Screenshot_20210724-074450_Chrome.jpg

  • SCA6
    7A648D887B124DB14E96E23BA92783E7F26D00957C19B9B8229632C2C1873729

Screenshot_20210724-074508_Chrome.jpg

  • SCA7
    7E0BBD6BA4BA9896F9911AF46B06DD2C47535F9C80B29D693FDF6B9319D0D68E

Screenshot_20210724-074539_Chrome.jpg

  • SCA8
    562ABCEEB497E1FE7AE275A883FD5EF9D92A05F5C19D82ABAA0DC1571B7DF3AD

Screenshot_20210724-074630_Chrome.jpg

BRANCHES:

  • SCA1SCA2
    91B09BBA815748166FB36413342C7E4E7E809F4BAC538C0418841A4476B527EF

Screenshot_20210724-074749_Chrome.jpg

  • SCA3SCA4
    B49B48697A3ACBC5E3D2E36B6EE49C44020D88E664C5C1AA7A7CF34058177379

Screenshot_20210724-074823_Chrome.jpg

  • SCA5SCA6
    F026924CD1285FF92C2A2DE9B9313027EB67273A82375C939348C887F6B52F77

Screenshot_20210724-074909_Chrome.jpg

  • SCA7SCA8
    AA55EC5A6B11393B289C4B2B6916172ACC2941C5C978FB1D7BF02696BAB323A4

Screenshot_20210724-074951_Chrome.jpg

BRANCHES 2:

  • SCA1SCA2SCA3SCA4
    F50DC120CBF6C46923037F6D7F41D4153ECC9AB7430DDA662C142DB1FFE483F7

Screenshot_20210724-075045_Chrome.jpg

  • SCA5SCA6SCA7SCA8
    A3D8CA8494CC426ABD5E1FC5FA0FEAE4F2B2ECE4C4CECDCA05E19EB66542533F

Screenshot_20210724-075134_Chrome.jpg

ROOT:

  • SCA1SCA2SCA3SCA4SCA5SCA6SCA7SCA8
    CB40CA6DB72DD507CF9118963F94B7740822258E74AFB0FD45D89DB35D24B386

Screenshot_20210724-075334_Chrome.jpg

MERKLE TREE

Screenshot_20210724-100305_PicsArt.jpg

If there are odd number of leaves on the tree, then the last leaf will be repeated again so as to continue the generation of rooh hash. Like, if the leaves are from SCA1 to SCA5, as 5 is odd then the last branch SCA5 will be repeated again in the form SCA5SCA5.

CONCLUSION

Now, at the last I want to conclude what We have discussed. We discussed about root hash and merkle tree. The speed of operation of any of the mining machine is call the hash rate. We can use the hashes to store any large information. And merkle tree is like a tree which is the collection of hash roots.

By the post of @pelon53, I have learnt many things and the homework task has done by me because of the wonderful lecture of the professor. I am thankful to him for making this lecture.

Thank you

Sort:  

You've got a free upvote from witness fuli.
Peace & Love!

Loading...

You have been upvoted by @sapwood, a Country Representative from INDIA. We are voting with the Steemit Community Curator @steemcurator07 account to support the newcomers coming into Steemit.

Engagement is essential to foster a sense of community. Therefore we would request our members to visit each other's post and make insightful comments.

Thank you

Coin Marketplace

STEEM 0.20
TRX 0.15
JST 0.029
BTC 62864.56
ETH 2538.87
USDT 1.00
SBD 2.93