Crypto Academy / Season 3 / Week 4 - Homework Post for @pelon53 | ROOT HASH AND MERKLE TREE by @ruggedangel

in hive-108451 •  3 years ago 

Merkle_Tree_Explained.jpg
image source

Hello fellow steemains, i welcome you all in to the week 4 of steemit cryptoacademy season 3. Professor @pelon53 has impact some knowledge through his lecture. It was really benefitting.

INTRODUCTION

When we talk about hash, what is it? Hash is the passing of data over or through a formula that makes or brings out a result, which is called "a hash". This hash often has alphanumeric charcters and also, the hashes which is created or produced by a formula are constantly equal lenth, irrespective of how many data you pass in to it. It is a crucial security factor or attributes acquired in the transfer of data or information within sender or receiver taking part in network.

Merkle tree÷ this is a tree where leaf node is indicated or displayed with the cryptograhic hash from data block, moreover, any non-leaf node is displayed together with cryptograhic hash of label of its child node. Merkle tree are beneficial in distributed method at which same data need to exist in many places. Merkle tree is being used in bitcoin and as well blockchain.

QUESTION 1


Explain in detail the hash rate.


Hash rate is signifies as the speed of mining. The measure of the complete computational power for each second utilized or meant for mining and preparing transcations. In the event of bitcoin, hash rate shows that the number of period hash esteems or evaluates are produced each second for proof of work blockchain. Like i explained earlier, hash is an alphanumeric code which involves, numbes, letters and words. Its a random word innovator where by every hashing algorithm is a disparate method to generate words. Whenever a hash found the target and a miner gains or accomplish the right to fill the next block, a block of recent minted coins will be given to the miner including any cost payment for every transaction in the fresh block. In brief, the hash rate is just the speed of mining, and also the period required to mine any cryptocurrency determined by the hash rate.

QUESTION 2


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


To be able to make a merkle tree, the tree leave hashes need to be generated. First visit SHA-256
Steem1

Screenshot_20210720_233117.jpg

Hash:
7760E25BCB80ADF1DD92DB339BF5790A59E90CD54EFA072F1250DCE13FA97045

Steem2

Screenshot_20210720_233329.jpg
Hash:
FE00506E91CF52BC4B35321E6B978D1A7349397B19C6C1C01E095971FDEC9741

Steem3

Screenshot_20210720_233524.jpg
Hash:
A9418332E0C351D6A50C835AA9E57D514F0573C231D491E97726DB8A5844F2DC

Steem4

Screenshot_20210720_233647.jpg
Hash:
22F4EC8E20C9CCAF2C313B23F18981B1C73BF39081BCD739E5D998A95A46AB30

Steem5

Screenshot_20210720_233806.jpg
Hash:
2A3C87336683AB0DDFA56AFEFC740E6C13A02FEA0A43D6797343B26D7AF0C57B

Steem6

Screenshot_20210720_233914.jpg
Hash:
A7BAA6DE0C0658E9E3681966E542BACD116529F5AE9A2D9126CDB1C1D5BC1278

Steem7

Screenshot_20210720_234028.jpg
Hash:
D441688DDA7F9285E8811728DD9A3955CF74F0A3C7600C1589D0F1D3B48FFAC7

Steem8

Screenshot_20210720_234149.jpg
Hash:
F2E38ED4FF662087B6E9BEAFA4158EBC488B995732057BDA019A6A77FFB5F9F5

now the next thing is to generate the the branches

Steem1Steem2

Screenshot_20210720_234624.jpg
Hash:
A5568957014F6AC3866923C7DE20D375E706B8D8C9F453636E90B9965ABEC62B

Steem3Steem4

Screenshot_20210720_234748.jpg
Hash:
18D25196DB699F6AB9222B7302EB8A6F6EBFADEC703C07DD5DB8D9455913A499

Steem5Steem6

Screenshot_20210720_234921.jpg
Hash:
D118E137F92A0DBEA138B6BF70C7714153A7BC393CD0272A44BD94864645224B

Steem7Steem8

Screenshot_20210720_235044.jpg
Hash:
A81D57BA11AEDFA9EFBBA42F6523D75D1EFA50B22C5E3557A21CEFFE87DDFC4A

Now, next step is to generate the second level of branches hash

Steem1Steem2Steem3Steem4

Screenshot_20210720_235441.jpg
Hash:
8A248C05E69C4F1AA403AD18A7F445FF500C42483DA425CE0C980CDB2FD1AD9B

Steem5Steem6Steem7Steem8

Screenshot_20210720_235638.jpg
Hash:
8B0935AEAB3F51BFA2B0750703EE2387E2B20EB19B0D24227E180C03A851AF17

Now the next step is to generate the root of the branches hash

Steem1Steem2Steem3Steem4Steem5Steem6Steem7Steem8

Screenshot_20210721_044902.jpg
Hash:
9C2FC83F36D59B8ED5033D2BCC417728583C8DAA0AA9868FD374BE3619D6E4F9

The next thing to do is to create the tree of the information and hashes.

The Merkel Tree

Screenshot_20210721_144409.jpg


Tell the steps to follow to verify if Steem6 is included in the Markle Tree.


Steps on how to verify that Steem6 is included in the root hash for merkle tree. You need to enter the -
Hash of Steem5 Hash of Steem7Steem8 and Hash of Steem1Steem2Steem3Steem4
This are the steps÷

First step
You have to calculate the hash of Steem6


Second step

In view of the fact that the hash of Steem5 is esteblished, then the hash of Steem5 and Steem6 needs to be calculated. The result will be - Steem5Steem6.

Third step

Seeing that the hash of Steem7 and Steem8 is established, now the hash of Steem5Steem6 and Steem7Steem8 needs to be calculated. And the result will be - Steem5Steem6Steem7Steem8.

The last step

In view of the fact that the hash of Steem1Steem2Steem3Steem4 is established, now the hash of Steem5Steem6Steem7Steem8 needs to be calculated. The result will be - Steem1Steem2Steem3Steem4Steem5Steem6Steem7Steem8. Which is the merkle root hash.

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.


Before making a merkle tree, the tree leaves hashes needs to be generated first.

SCA1

Screenshot_20210721_054804.jpg
Hash:
13E0A04BB0E669E1C638DBE3A704743F99F162B25245E4D8C064D35BA38FA8C8

SCA2

Screenshot_20210721_055006.jpg
Hash:
27849353A9C8CC4E948EB6E5748EDD79CB83513D8C0ADAF3E8C83D3792C9149B

SCA3

Screenshot_20210721_055210.jpg
Hash:
67E872F952C105C35E0BCE130536D061F4999DCA5593754BA9BA7BE59B8E7C0D

SCA4

Screenshot_20210721_055358.jpg
Hash:
491928A32BAE70A12FA251412BBFD7C9999F317BA6BF577C283C724225270A43

SCA5

Screenshot_20210721_055544.jpg
Hash:
99C078C39CDE7F47799E0E8691460A9F3E83E78D498EA989308FCFCC58907B19

SCA6

Screenshot_20210721_055728.jpg
Hash:
7A648D887B124DB14E96E23BA92783E7F26D00957C19B9B8229632C2C1873729

SCA7

Screenshot_20210721_055856.jpg
Hash:
7E0BBD6BA4BA9896F9911AF46B06DD2C47535F9C80B29D693FDF6B9319D0D68E

SCA8

Screenshot_20210721_060056.jpg
Hash:
7E0BBD6BA4BA9896F9911AF46B06DD2C47535F9C80B29D693FDF6B9319D0D68E

Now, i will have to generate the branches of the merkel tree

SCA1SCA2

Screenshot_20210721_061848.jpg
Hash:
91B09BBA815748166FB36413342C7E4E7E809F4BAC538C0418841A4476B527EF

SCA3SCA4

Screenshot_20210721_062014.jpg
Hash:
B49B48697A3ACBC5E3D2E36B6EE49C44020D88E664C5C1AA7A7CF34058177379

SCA5SCA6

Screenshot_20210721_062159.jpg
Hash:
F026924CD1285FF92C2A2DE9B9313027EB67273A82375C939348C887F6B52F77

SCA7SCA8

Screenshot_20210721_062410.jpg
Hash:
AA55EC5A6B11393B289C4B2B6916172ACC2941C5C978FB1D7BF02696BAB323A4

Now, the next step is to generate the second level of branches hash.

SCA1SCA2SCA3SCA4

Screenshot_20210721_063031.jpg
Hash:
F50DC120CBF6C46923037F6D7F41D4153ECC9AB7430DDA662C142DB1FFE483F7

SCA5SCA6SCA7SCA8

Screenshot_20210721_063250.jpg
Hash:
A3D8CA8494CC426ABD5E1FC5FA0FEAE4F2B2ECE4C4CECDCA05E19EB66542533F

The next step is to generate the root hash

SCA1SCA2SCA3SCA4SCA5SCA6SCA7SCA8

Screenshot_20210721_063653.jpg
Hash:
CB40CA6DB72DD507CF9118963F94B7740822258E74AFB0FD45D89DB35D24B386

The next thing to do is to create the tree of the information and hashes.

Screenshot_20210721_151215.jpg


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


Merkle tree was created to a certain extent where the leave and branches will generate the outcome when they are even. Now what should one do when the number of leaves on the tree is odd?. Now when the number of leaves on the tree appears to be odd, all we have to do is to repeat the last leave hash, so as to balance the tree. By doing so, the branch hash for the leave will be generated.

CONCLUSION

Merkle tree is present to encode blockchain data more easily and reliably i.e it is well secured. Merkle tree are efficient owing the fact that they use hashes rather than full files. The lecture was really beenfitting and i was able to learn a lot. Special regards to professor @pelon53.

Thanks for going through my homework post

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:  

@tipu curate

nice post! if you to earn extra bitcoin by only playing online games you can sign up to bk8 dot com! Check them out!

Gracias por participar en Steemit Crypto Academy Season 3:

Espero seguir leyendo tus publicaciones.

NoPreguntas.Puntaje.
1Explique en detalle el hash rate.0.5
2Realice el Árbol Merkle. Pregunta 2. Diga los pasos a seguir para verificar si Steem6 está incluido en el Árbol Markle.2.5
3Realice el Árbol Merkle. Pregunta 3. Si el número de las hojas del árbol es impar, ¿Qué debes hacer? Explique.2.8
4Presentación y originalidad1.0
  • Pregunta 1, no explicó en datalle el Hash rate, faltó mucha información.

  • Pregunta 2, sus hash fueron todos verificados. Para determinar Steem 6 si está incluida en el árbol, su respuesta no fue muy clara. Se puede haber colocado un ejemplo.

  • Pregunta 3, Sus hahs fueron todos verificados. Si el número de hoja es impar, se pudo haber colocado un ejemplo para una mejor explicación.

Recomendaciones:

Calificación: 6.8