Crypto Academy Season 3 Week 4 Homework Post for @pelon53 | Hash rates and Merkle Tree

in SteemitCryptoAcademy3 years ago

PicsArt_07-24-01.42.45.jpg

Hello mates. Another week of exciting and educative lectures in Steemit Crypto Academy. Thanks to all the professors for the work done so far. This is my submission for the homework task given by @pelon53 in his lecture on Hash rate and Merkle Tree.

1. Explain in Detail The Hash Rate

Hashing and hash rates are very popular issues in cryptocurrency. They are normally concerned with Proof of work blockchain systems like Bitcoin and Ethereum.
Hash is a mix of alphabets and numbers used to represent a message or data in a blockchain. A popular example of hash generator is SHA256.
Hash rate or hash power simply, is the speed it takes to mine a block in a blockchain. The hash rate is determined by the processing power of the device used in mining. The hash rate is a very important component of the blockchain system because it measures and also indicates the productivity and efficiency of the device used in mining.
Hash rate is measured using the unit hash per second.
Below are some hash rate measurement terms.

Measurement termUnit measure
1 kilo hash per second (1 Kh/s)one thousand hashes per second (1,000 h/s)
1 mega hash per second (1 Mh/s)one million hashes per second (1,000,000 h/s)
1 giga hash per second (1 Gh/s)one billion hashes per second (1,000,000,000 h/s)
1 tera hash per second (1 Th/s)one trillion hashes per second (1,000,000,000,000 h/s)
1 peta hash per second (1 Ph/s)one quadrillion hashes per second (1,000,000,000,000,000 h/s)

It should be noted that, the higher the hash rate of a mining device, the faster mining is completed. Hash rates can also vary depending on the cryptocurrency and the device used for mining. The hash rate to mine a blockchain keeps increasing as more users join to mine; increasing the difficulty to mine hence increasing the hash rate. Higher hash rate implies higher network security and higher rewards after successful mining.
There are instances where a group of miners gain over 50% control of a blockchain network. This is known as the 51% attack and these group of miners can interrupt the whole mining process by preventing other miners from completing blocks in the blockchain.

2. Make The Following Merkle Tree:
Transaction (Tree Leaves): Steem1, Steem2, Steem3, Steem4, Steem5, Steem6, Steem7, Steem8.
Make 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


Tree Leaves Hash


Steem 1

PicsArt_07-22-05.34.44.png

Hash: 7760E25BCB80ADF1DD92DB339BF5790A59E90CD54EFA072F1250DCE13FA97045


Steem 2

PicsArt_07-22-05.35.34.png

Hash: FE00506E91CF52BC4B35321E6B978D1A7349397B19C6C1C01E095971FDEC9741


Steem 3

PicsArt_07-22-05.36.07.png

Hash:
A9418332E0C351D6A50C835AA9E57D514F0573C231D491E97726DB8A5844F2DC


Steem 4

PicsArt_07-22-05.36.38.png
Hash:
22F4EC8E20C9CCAF2C313B23F18981B1C73BF39081BCD739E5D998A95A46AB30


Steem 5

PicsArt_07-22-05.37.13.png

Hash:
2A3C87336683AB0DDFA56AFEFC740E6C13A02FEA0A43D6797343B26D7AF0C57B


Steem 6

PicsArt_07-22-05.37.56.png

Hash: A7BAA6DE0C0658E9E3681966E542BACD116529F5AE9A2D9126CDB1C1D5BC1278


Steem 7

PicsArt_07-22-05.38.52.png

Hash: D441688DDA7F9285E8811728DD9A3955CF74F0A3C7600C1589D0F1D3B48FFAC7


Steem 8

PicsArt_07-22-05.39.35.png

Hash: F2E38ED4FF662087B6E9BEAFA4158EBC488B995732057BDA019A6A77FFB5F9F5


Tree Branches

Steem1Steem2

PicsArt_07-22-05.33.38.png

Hash: A5568957014F6AC3866923C7DE20D375E706B8D8C9F453636E90B9965ABEC62B


Steem3Steem4

PicsArt_07-22-05.32.45.png

Hash: 18D25196DB699F6AB9222B7302EB8A6F6EBFADEC703C07DD5DB8D9455913A499


Steem5Steem6

PicsArt_07-22-04.45.10.png

Hash: D118E137F92A0DBEA138B6BF70C7714153A7BC393CD0272A44BD94864645224B


Steem7Steem8

PicsArt_07-22-04.44.39.png

Hash: A81D57BA11AEDFA9EFBBA42F6523D75D1EFA50B22C5E3557A21CEFFE87DDFC4A


Second Level Tree Branches

Steem1Steem2Steem3Steem4

PicsArt_07-22-04.44.13.png

Hash: 8A248C05E69C4F1AA403AD18A7F445FF500C42483DA425CE0C980CDB2FD1AD9B


Steem5Steem6Steem7Steem8

PicsArt_07-22-04.43.24.png

Hash: 8B0935AEAB3F51BFA2B0750703EE2387E2B20EB19B0D24227E180C03A851AF17


Root Hash


Steem1Steem2Steem3Steem4Steem5Steem6Steem7Steem8

PicsArt_07-22-04.42.53.png

Hash: 9C2FC83F36D59B8ED5033D2BCC417728583C8DAA0AA9868FD374BE3619D6E4F9


Creating the Merkle Tree

PicsArt_07-22-04.30.55.png



Steps to Follow to Verify if Steem6 is Included in The Merkle Tree

  • To verify if Steem6 is included in the tree, you first verify Steem5; the leaf node next to it and in the same branch.

Screenshot_20210724-091030.png

  • You then verify Steem7Steem8.

Screenshot_20210724-091148.png

  • Verify the Branch Steem1Steem2Steem3Steem4 and

Screenshot_20210724-091341.png

  • Lastly verify Steem1Steem2Steem3Steem4Steem5Steem6Steem7Steem8, the Root Hash of the block.

Screenshot_20210724-091426.png


Tree leaves

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.


SCA1

PicsArt_07-22-04.42.21.png

Hash: 13E0A04BB0E669E1C638DBE3A704743F99F162B25245E4D8C064D35BA38FA8C8


SCA2

PicsArt_07-22-04.41.46.png

Hash: 27849353A9C8CC4E948EB6E5748EDD79CB83513D8C0ADAF3E8C83D3792C9149B


SCA3

PicsArt_07-22-04.41.13.png

Hash: 67E872F952C105C35E0BCE130536D061F4999DCA5593754BA9BA7BE59B8E7C0D


SCA4

PicsArt_07-22-04.40.43.png

Hash:
491928A32BAE70A12FA251412BBFD7C9999F317BA6BF577C283C724225270A43


SCA5

PicsArt_07-22-04.40.11.png

Hash: 99C078C39CDE7F47799E0E8691460A9F3E83E78D498EA989308FCFCC58907B19


SCA6

PicsArt_07-22-04.39.06.png

Hash: 7A648D887B124DB14E96E23BA92783E7F26D00957C19B9B8229632C2C1873729


SCA7

PicsArt_07-22-06.36.56.jpg

Hash:
7E0BBD6BA4BA9896F9911AF46B06DD2C47535F9C80B29D693FDF6B9319D0D68E


SCA8

PicsArt_07-22-04.36.41.png
Hash: 562ABCEEB497E1FE7AE275A883FD5EF9D92A05F5C19D82ABAA0DC1571B7DF3AD



Tree Branches

SCA1SCA2

PicsArt_07-22-04.36.01.png

Hash:
91B09BBA815748166FB36413342C7E4E7E809F4BAC538C0418841A4476B527EF


SCA3SCA4

PicsArt_07-22-04.35.15.png

Hash:
B49B48697A3ACBC5E3D2E36B6EE49C44020D88E664C5C1AA7A7CF34058177379


SCA5SCA6

PicsArt_07-22-04.34.39.png

Hash: F026924CD1285FF92C2A2DE9B9313027EB67273A82375C939348C887F6B52F77


SCA7SCA8

PicsArt_07-22-04.33.54.png

Hash: AA55EC5A6B11393B289C4B2B6916172ACC2941C5C978FB1D7BF02696BAB323A4



Second Level Tree Branches

SCA1SCA2SCA3SCA4

PicsArt_07-22-04.32.53.png

Hash: F50DC120CBF6C46923037F6D7F41D4153ECC9AB7430DDA662C142DB1FFE483F7


SCA5SCA6SCA7SCA8

PicsArt_07-22-04.32.19.png

Hash:
A3D8CA8494CC426ABD5E1FC5FA0FEAE4F2B2ECE4C4CECDCA05E19EB66542533F



Root Hash

SCA1SCA2SCA3SCA4SCA5SCA6SCA7SCA8

PicsArt_07-22-06.36.34.jpg

Hash: CB40CA6DB72DD507CF9118963F94B7740822258E74AFB0FD45D89DB35D24B386


Creating the Merkle Tree

PicsArt_07-22-04.30.24.png


If The Number of Leaves on The Tree is Odd, What should you do? Explain.

The merkle tree can only be complete if the leaves in the tree is even because the leaves are usually paired and continued till the root hash is generated. In an event where the number of leaves is odd, the last leaf should be duplicated to make the number even.

Example

A tree with 3 leaves; SCA1, SCA2 and SCA3 will look like this:

PicsArt_07-22-06.35.59.jpg

SCA3 will have to be duplicated so we have another SCA3 to complete the tree. The Tree Branch will then be SCA3SCA3, and the Root will be SCA1SCA2SCA3SCA3.
Below is how the Merkel Tree will look like:

PicsArt_07-22-05.43.43.png


Conclusion

As discussed hash and hash rates are two important components of the Blockchain technology. Hash is the alphanumeric codes use to represent a message or text in a blockchain. Hash rates or hash power is simply the speed or time it takes to mine a block in a blockchain.
Blocks in the Blockchain can be arranged in a Merkle Tree identifying from individual leaf nodes and their hash, to branches and finally the root hash. The Merkle tree helps miners to verify a block or a transaction in the blockchain without downloading the entire blockchain.


Thanks for reading. Huge credits to @pelon53 for this lecture.

Sort:  

Gracias por participar en Steemit Crypto Academy Season 3:

Espero seguir leyendo tus publicaciones.

NoPreguntas.Puntaje.
1Explique en detalle el hash rate.0.7
2Realice el Árbol Merkle. Pregunta 2. Diga los pasos a seguir para verificar si Steem6 está incluido en el Árbol Markle.3.1
3Realice el Árbol Merkle. Pregunta 3. Si el número de las hojas del árbol es impar, ¿Qué debes hacer? Explique.3.1
4Presentación y originalidad1.0
  • Pregunta 1, debe investigar con mayor profundidad.

  • Pregunta 2, todos los hash coinciden

  • Pregunta 3, todos los hash coinciden.

Recomendaciones:

  • La investigación se debe hacer con mayor profundidad.

  • Los árboles pueden hacese que sean más legibles.

Calificación: 7.9

Coin Marketplace

STEEM 0.27
TRX 0.21
JST 0.038
BTC 96978.60
ETH 3697.93
USDT 1.00
SBD 3.87