Homework post for @pelon || Hash rate and Merkle tree

in hive-108451 •  3 years ago  (edited)

Hello steemians how are you? I hope you all are fit and fine in this pandemic time. Today I read season 3 lectures of the crypto academy and I found it a really interesting and creative way to increase quality content and knowledge.

Today professor @pelon53 explain a wonderful lecture on Hash Root and Merkle Tree. After complete analysis and reading now I am submitting my homework post to professor.

Photo_1626854495691.png

HOMEWORK by @rinkisaxena

Question 1:-

Explain in detail the hash root.

Answer 1:-

The speed at which any given mining machine operate is known as a hash rate. In Crypto world block are find by solving Complex computational problems that are considered to be the mathematical puzzles. All these blocks are hidden in mathematical puzzles. Every second mining machines make more than thousand of guesses to find the correct block. The first who solve will get the block and that speed is known as the hash rate.

For example if a machine is mining Bitcoin and it has rate is very high then it is considered to be more powerful and can easily find mining block on blockchain. This hash rate technology is very much useful for the cryptocurrency project that work on proof of work consensus algorithm. Hash rate is only telling about the speed of mining. Its actual SI unit is Hash/second but as the power increase the unit changes in many different units as shown below:

SI unitnumerical value
1H/S1
1KH/S1000
1MH/S1000000
1GH/S1000000000
1TH/S1000000000000
1PH/S1000000000000000

More the hair straight more will be the power of mining.
Let us see the Bitcoin network has rate to make our idea of hashrate more clear.
By 20th July 2021, hash rate of Bitcoin network is 82.92M TH/S.

IMG_20210721_210435.jpg

We talk about hash rate but the question arises that why it is important to see hash rate ?
So the reasons of checking hash rate is :

  • provide information about the strength of the blockchain network.
  • more the hash rate refers that more the number of users joining the project.
  • it strength it's security.

Show the good hash rate it will make a secure and user-friendly or miner friendly environment with honest miners.

Whenever the new data is added in a new block always mining machine use hash rate that is the computational power to generate new hashes that are the alphanumeric codes that is somewhere equal to targeted hash. This process is accomplished by changing a single value that is known as nounce.

This is the brief information about hash rate.

Question 2:

Make the following Merkle Tree: Transaction (tree leaves): Steem1; Steem2; Steem3; Steem4; Steem5; Steem6; Steem7; Steem8, 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.

Answer 2:

To create Merkle tree of the given leaves we are using the platform https://xorbin.com/tools/sha256-hash-calculator.

Merkle tree is an essential part of block-chain Technology with which it in sure security and efficiency off the blockchain. It contain hash codes in a form of tree.

In the given question we have to create a tree E with the leaves named as :
Steem1, Steem2, Steem3, Steem4, Steem5, Steem6, Steem7, Steem8

So let us create the hash of each leaf and complete our tree with hash codes.

  • Type Steem1 on SHA-256 and calculate hash you will get code as:
    7760e25bcb80adf1dd92db339bf5790a59e90cd54efa072f1250dce13fa97045
    IMG_20210722_012608.jpg
  • Type Steem2 on SHA-256 and calculate hash you will get code as:
    fe00506e91cf52bc4b35321e6b978d1a7349397b19c6c1c01e095971fdec9741
    IMG_20210722_012708.jpg
  • Type Steem3 on SHA-256 and calculate hash you will get code as:
    a9418332e0c351d6a50c835aa9e57d514f0573c231d491e97726db8a5844f2dc
    IMG_20210722_012736.jpg

  • Type Steem4 on SHA-256 and calculate hash you will get code as:
    22f4ec8e20c9ccaf2c313b23f18981b1c73bf39081bcd739e5d998a95a46ab30
    IMG_20210722_012833.jpg

  • Type Steem5 on SHA-256 and calculate hash you will get code as:
    2a3c87336683ab0ddfa56afefc740e6c13a02fea0a43d6797343b26d7af0c57b
    IMG_20210722_012914.jpg

  • Type Steem6 on SHA-256 and calculate hash you will get code as:
    a7baa6de0c0658e9e3681966e542bacd116529f5ae9a2d9126cdb1c1d5bc1278
    IMG_20210722_012957.jpg

  • Type Steem7 on SHA-256 and calculate hash you will get code as:
    d441688dda7f9285e8811728dd9a3955cf74f0a3c7600c1589d0f1d3b48ffac7
    IMG_20210722_013039.jpg

  • Type Steem8 on SHA-256 and calculate hash you will get code as:
    f2e38ed4ff662087b6e9beafa4158ebc488b995732057bda019a6a77ffb5f9f5
    IMG_20210722_013110.jpg

  • The Lower layer of merkle tree is now complete and shown below:
    IMG_20210722_013208.jpg

  • Type Steem1Steem2 on SHA-256 and calculate hash you will get code as:
    a5568957014f6ac3866923c7de20d375e706b8d8c9f453636e90b9965abec62b
    IMG_20210722_013245.jpg
  • Type Steem3Steem4 on SHA-256 and calculate hash you will get code as:
    18d25196db699f6ab9222b7302eb8a6f6ebfadec703c07dd5db8d9455913a499
    IMG_20210722_013440.jpg

  • Type Steem5Steem6 on SHA-256 and calculate hash you will get code as:
    d118e137f92a0dbea138b6bf70c7714153a7bc393cd0272a44bd94864645224b
    IMG_20210722_013323.jpg

  • Type Steem7Steem8 on SHA-256 and calculate hash you will get code as:
    a81d57ba11aedfa9efbba42f6523d75d1efa50b22c5e3557a21ceffe87ddfc4a
    IMG_20210722_013351.jpg
  • The second layer of merkle tree is now complete and shown below:
    IMG_20210722_013524.jpg

  • Type Steem1Steem2Steem3Steem4 on SHA-256 and calculate hash you will get code as:
    8a248c05e69c4f1aa403ad18a7f445ff500c42483da425ce0c980cdb2fd1ad9b
    IMG_20210722_013602.jpg

  • Type Steem5Steem6Steem7Steem8 on SHA-256 and calculate hash you will get code as:
    8b0935aeab3f51bfa2b0750703ee2387e2b20eb19b0d24227e180c03a851af17
    IMG_20210722_013632.jpg

  • Third layer of Merkle tree is completed and shown below:
    IMG_20210722_013710.jpg

  • Type Steem1Steem2Steem3Steem4Steem5Steem6Steem7Steem8 on SHA-256 and calculate hash you will get code as:
    9c2fc83f36d59b8ed5033d2bcc417728583c8daa0aa9868fd374be3619d6e4f9
    IMG_20210722_013807.jpg

  • The final merkle tree is now complete and shown below :
    IMG_20210722_013907.jpg

the steps to follow to verify if Steem6 is included in the Markle Tree are follow as :
For this assurance we only need to download aur check the route hash that is the longest hash. To check that we have to follow simple steps :

  • Calculate hash Steem5.
    IMG_20210722_012914.jpg

  • Then Calculate Hash Steem7Steem8, Steem1Steem2Steem3Steem4.
    IMG_20210722_013602.jpg
    IMG_20210722_013351.jpg

  • Now calculate Steem6.
    IMG_20210722_012957.jpg

  • Now combine Steem5Steem6 and calculate its hash.
    IMG_20210722_013323.jpg

  • Now finally Calculate the root hash that is
    Steem1Steem2Steem3Steem4Steem5Steem6Steem7Steem8.
    IMG_20210722_013807.jpg

  • After checking the last hash it is now clear that it is a root hash of the merkle tree.

  • And by this we can say that Steem6 is included in the Merkle tree of Steem leaves.


This is how we have to verify the transaction in merkle tree without checking the whole tree simply download the root hash and verify every node by calculating the 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. If The Number of Leaves on The Tree is Odd, What should you do? Explain.

Answer 3:-

To create Merkle tree of the given leaves we are using the platform https://xorbin.com/tools/sha256-hash-calculator.

Merkle tree is an essential part of block-chain Technology with which it in sure security and efficiency off the blockchain. It contain hash codes in a form of tree.

In the given question we have to create a tree E with the leaves named as :
SCA1, SCA2, SCA3, SCA4, SCA5, SCA6, SCA7, SCA8

So let us create the hash of each leaf and complete our tree with hash codes.

  • Type SCA1 on SHA-256 and calculate hash you will get code as:
    13e0a04bb0e669e1c638dbe3a704743f99f162b25245e4d8c064d35ba38fa8c8
    IMG_20210722_115719.jpg

  • Type SCA2 on SHA-256 and calculate hash you will get code as:
    27849353a9c8cc4e948eb6e5748edd79cb83513d8c0adaf3e8c83d3792c9149b
    IMG_20210722_115645.jpg

  • Type SCA3 on SHA-256 and calculate hash you will get code as:
    67e872f952c105c35e0bce130536d061f4999dca5593754ba9ba7be59b8e7c0d
    IMG_20210722_115624.jpg

  • Type SCA4 on SHA-256 and calculate hash you will get code as:
    491928a32bae70a12fa251412bbfd7c9999f317ba6bf577c283c724225270a43
    IMG_20210722_115606.jpg

  • Type SCA5 on SHA-256 and calculate hash you will get code as:
    99c078c39cde7f47799e0e8691460a9f3e83e78d498ea989308fcfcc58907b19
    IMG_20210722_115544.jpg

  • Type SCA6 on SHA-256 and calculate hash you will get code as:
    7a648d887b124db14e96e23ba92783e7f26d00957c19b9b8229632c2c1873729
    IMG_20210722_115518.jpg

  • Type SCA7 on SHA-256 and calculate hash you will get code as:
    7e0bbd6ba4ba9896f9911af46b06dd2c47535f9c80b29d693fdf6b9319d0d68e
    IMG_20210722_115404.jpg
  • Type SCA8 on SHA-256 and calculate hash you will get code as:
    562abceeb497e1fe7ae275a883fd5ef9d92a05f5c19d82abaa0dc1571b7df3ad
    IMG_20210722_115338.jpg
  • Type SCA1SCA2 on SHA-256 and calculate hash you will get code as:
    91b09bba815748166fb36413342c7e4e7e809f4bac538c0418841a4476b527ef
    IMG_20210722_114726.jpg
  • Type SCA3SCA4 on SHA-256 and calculate hash you will get code as:
    b49b48697a3acbc5e3d2e36b6ee49c44020d88e664c5c1aa7a7cf34058177379
    IMG_20210722_114807.jpg
  • Type SCA5SCA6 on SHA-256 and calculate hash you will get code as:
    f026924cd1285ff92c2a2de9b9313027eb67273a82375c939348c887f6b52f77
    IMG_20210722_114834.jpg
  • Type SCA7SCA8 on SHA-256 and calculate hash you will get code as:
    aa55ec5a6b11393b289c4b2b6916172acc2941c5c978fb1d7bf02696bab323a4
    IMG_20210722_114858.jpg
  • Type SCA1SCA2SCA3SCA4 on SHA-256 and calculate hash you will get code as:
    f50dc120cbf6c46923037f6d7f41d4153ecc9ab7430dda662c142db1ffe483f7
    IMG_20210722_114657.jpg
  • Type SCA5SCA6SCA7SCA8 on SHA-256 and calculate hash you will get code as:
    a3d8ca8494cc426abd5e1fc5fa0feae4f2b2ece4c4cecdca05e19eb66542533f
    IMG_20210722_114628.jpg
  • Type SCA1SCA2SCA3SCA4SCA5SCA6SCA7SCA8 on SHA-256 and calculate hash you will get code as:
    cb40ca6db72dd507cf9118963f94b7740822258e74afb0fd45d89db35d24b386
    IMG_20210722_114554.jpg

  • The final Merkel Tree ia shown below :
    IMG_20210722_115009.jpg


This is how we have to create the markel tree. The last line are the leave the middle are the branches and the top has is known as the root hash.

Now the question is what will happen if the number of leaves on the tree are odd in number. So in that case it will be create a duplicate pair of transaction which will complete the whole markle tree. The last transaction in odd number will get duplicated to create a even merkle tree. Let us see an example how how this will happen in odd pair of transactions.

Odd number of leaves.

Let us take an example A1,A2,A3,A4,A5,A6,A7 that means there are in total 7 transaction or 7 leaves in the Merkle tree.

Generated Hash codes are :-

  • Type A1 on SHA-256 and calculate hash you will get code as:
    16a36e86f6fed5d465ff332511a0ce1a863b55d364b25a7cdaa25db19abf9648
    IMG_20210722_155212.jpg

  • Type A2 on SHA-256 and calculate hash you will get code as:
    c8361f9b468e68c86da024270e0949ce139cb704b8d7cce586681b99f3a7ea56
    IMG_20210722_155233.jpg

  • Type A3 on SHA-256 and calculate hash you will get code as:
    1398b376fdcce25c5a5399367e76891e85121c010ec919cc243b1a519d95bbc6
    IMG_20210722_155250.jpg

  • Type A4 on SHA-256 and calculate hash you will get code as:
    4e808094851fc2eac7a386fc7d64677b34bda5e41d366ec4943233f9e6f2cd63
    IMG_20210722_155309.jpg

  • Type A5 on SHA-256 and calculate hash you will get code as:
    ea644b359f0b0abde72ab7dbdc03c7d630537bdd0fd7ca1bbb99d41e7f446eea
    IMG_20210722_155326.jpg

  • Type A6 on SHA-256 and calculate hash you will get code as:
    d94791a85f88d5f49c3cc06d5557316cf743d60149820c594f389a1b301ff021
    IMG_20210722_155345.jpg
  • Type A7 on SHA-256 and calculate hash you will get code as:
    724f7bdf7e74a5fe64337203fb8b6ccf4adfc2919665e67a81f02e81752c1c97
    IMG_20210722_155415.jpg
  • Type A1A2 on SHA-256 and calculate hash you will get code as:
    715a38a9be8f0bb3228fbff6b26bf6112513c4c8607bb944c3945e2149e392de
    IMG_20210722_160105.jpg

  • Type A3A4 on SHA-256 and calculate hash you will get code as:
    3d348c69c3dbd0eaa92764e925bbb6e542a1625cf48584ad17bd7805b628977c
    IMG_20210722_160123.jpg

  • Type A5A6 on SHA-256 and calculate hash you will get code as:
    880eaa1f0d20d8d6dae8a7413eae29953d3f53ad41b14ee9d60b99a22441f1b8
    IMG_20210722_160140.jpg

  • Type A7A7 on SHA-256 and calculate hash you will get code as:
    b07f94e8e359222467606be7c7e25bd7ce52d4101cf588cc0671e35e7dbee31b
    IMG_20210722_160157.jpg

  • Type A1A2A3A4 on SHA-256 and calculate hash you will get code as:
    9983e68d41738bcf03fd59001d4e88d7f6d84f9cc6ee03c48785f4701919719e
    IMG_20210722_160215.jpg

  • Type A5A6A7A7 on SHA-256 and calculate hash you will get code as:
    075ae2f1f018c9597b88a6f4bdf8fad0bcdbee5920fa503fb1af484772906a84
    IMG_20210722_160233.jpg

  • Type A1A2A3A4A5A6A7A7 on SHA-256 and calculate hash you will get code as:
    6f9cc0b3e9d846512404388659f80cb12cfc6514dfffa26d10b4e2d7dd0dfb90
    IMG_20210722_160251.jpg

  • The final merkle tree of odd number of transactions is :
    SAVE_20210722_161507.jpg
    The last odd transaction create a duplicate pair name as A7.


So when there is a odd number of transaction then the last odd transaction will create a duplicate pair that we can see and because of this our Merkle tree form set of even transactions.

Conclusion

Now it's time to conclude our homework post, in this post we discuss about hash rate and merkle tree. The speed at which any given mining machine operate is known as hashrate. In Crypto world block are solved or blocks are hidden in computational Complex mathematical puzzles which one have to solve and get a new block. Hashrate improve and strengthen the blockchain network and create security.Merkle tree is an essential part of block-chain Technology with which it in sure security and efficiency off the blockchain. It contain hash codes in a form of tree. We create to merkle tree of even transactions and also verify how to see single transaction and what happen when the transaction are odd in number. When there is a odd number of transaction then a duplicate block of last order transaction will formed which create and even merkle tree.

THANKYOU SO MUCH

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:  

Gracias por participar en Steemit Crypto Academy Season 3:

Espero seguir leyendo tus publicaciones.

NoPreguntas.Puntaje.
1Explique en detalle el hash rate.1.3
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.3.5
4Presentación y originalidad1.5
  • Pregunta 1, buena información, pero faltaron datos importantes. Como por ejemplo el ataque 51.

  • Pregunta 2, todos los hash coinciden. Pero para la verificación del Steem, no debes usar ese hash porque es el que vas a verificar.

  • Pregunta 3, todos los hash coincidieron y tu respuesta de las hojas impar fue buena

Buena tarea.

Recomendaciones:

  • Investigar un poco má a profundidad para obtener mejores calificaciones.

Calificación: 8.8

Thank you so much professor