Hello professor! I'm honored being one of the students of the steemit crypto academy. This weeek's lecture by the respected professor @pelon53 was a continaution of the previous lecture on hash and cryptography, these two technologies form the basis of the blockchain security, all thanks to the professor for reaching us with this important topic. This is my presentation on the homework task assigned by professor at the end of his presentation
Question 1
Explain in detail, the Hash Rate
What is Hashrate
A hash rate in simple terms refers to the number of hashes that can be found/calculated by a particular computer processor or GPU in a second. For instance when the hash rate for mining for mining on a particular processor is 50m/s, it means it can take the miner 50Million times in a second to complete the particular algorithm.
The picture below shows some of the top hardware's with their Hash Rates. Screenshot from hashrates.com
Screenshot from hashrates.com
Different algorithms has different hash rates. That is why each coin on a particular processor /GPU has it’s own algorithm for mining, hence, their hash rates varies. There is no specific formula for the calculation of the hash rate as it solely depend on the GPU/processors architecture but one can get a list of the hardware's available and their respective rates through sites like hashrates.com. Example, the hash rate of BTC will be different from that of ETH even if the calculation is done on the exact same machine. Some of the benefits of the hash rates are that; The Hash rate secures the network, as the hash rate of a particular network is less, it would be easier to take over the control of that network. When the miners and computing power of a network increases, the hash rate also increase making it difficult to guess the calculation. This explains why the idea of Hashing ensures a higher security in blockchain technology and the fraudulent activities are less.
QUESTION2 MAKE THE FOLLOWING MERKLE TREE (TRANSACTION TREE LEAVES Steem1, Steem2, Steem3, Steem4, Steem5, Steem6, Steem7, Steem8) AND TELL THE STEPS TO FOLLOW TO VERIFY IF STEEM6 IS INCLUDED IN THE MARKLE TREE
The Merkle Tree
The idea of the merkle tree was developed in 1979 by a scientist called Ralph Merkle. It is a data structure in the form of a binary tree mainly applied in verifying blocks in the blockchain. The merkle tree cointain the hash of every block, The leaf node in a merkle tree is a hash of a particular block. The structure of the Merkle tree begins from the Merkle root, hence it is the final root of the nodes.
The question is about creating a Merkle tree with these 8 transactions(Tree Leaves) Steem1, Steem2, Steem3, Steem4, Steem5, Steem, Steem7 and Steem8. The Merkle tree is in the form of binary tree so with the eight(8) transactions, The tree will made up of 8 leaves hashes, 4 branche hashes, 2 second level branch hashes then the Root Hash. The root hash contain the summary of all the transactions which and this helps to facilitate the data validation within the block.
Steps I followed In Creating The Merkle Tree
First Step
I generated the hash of all the leaves (Steem1, Steem2, Steem3, Steem4, Steem5, Steem, Steem7 and Steem8.) through this site https://passwordsgenerator.net/sha256-hash-generator/.
The pictures below shows a proof of how the hashes was generated
Steem1
Steem2
Steem3
Steem4
This is the process I took in generating all the hashes in this presentation from https://passwordsgenerator.net/sha256-hash-generator/
All the leaves with their corresponding hashes generated
Steem1 7760E25BCB80ADF1DD92DB339BF5790A59E90CD54EFA072F1250DCE13FA97045
Steem2 FE00506E91CF52BC4B35321E6B978D1A7349397B19C6C1C01E095971FDEC9741
Steem3 A9418332E0C351D6A50C835AA9E57D514F0573C231D491E97726DB8A5844F2DC
Steem4 22F4EC8E20C9CCAF2C313B23F18981B1C73BF39081BCD739E5D998A95A46AB30
Steem5 2A3C87336683AB0DDFA56AFEFC740E6C13A02FEA0A43D6797343B26D7AF0C57B
Steem6 A7BAA6DE0C0658E9E3681966E542BACD116529F5AE9A2D9126CDB1C1D5BC1278
Steem7 D441688DDA7F9285E8811728DD9A3955CF74F0A3C7600C1589D0F1D3B48FFAC7
Steem8 F2E38ED4FF662087B6E9BEAFA4158EBC488B995732057BDA019A6A77FFB5F9F5
2nd Step
I generated the hashes of all the branches(Steem1Steem2, Steem3Steem4, Steem5Steem6 Steem7Steem8) also from the same site the leaves. The branches are four in number
Picture proofs of how the branch hashes was generated
Steem1Steem2
Steem3Steem4
Steem5Steem6
all branches with their hashes
Steem1Steem2 A5568957014F6AC3866923C7DE20D375E706B8D8C9F453636E90B9965ABEC62B
Steem3Steem4 18D25196DB699F6AB9222B7302EB8A6F6EBFADEC703C07DD5DB8D9455913A499
Steem5Steem6 D118E137F92A0DBEA138B6BF70C7714153A7BC393CD0272A44BD94864645224B
Steem7Steem8 A81D57BA11AEDFA9EFBBA42F6523D75D1EFA50B22C5E3557A21CEFFE87DDFC4A
3rd Step
The next step is to find the hashes of second level branches
Picture proof of the hashes of the second level branches
Steem1Steem2Steem3Steem4
Steem5Steem6Steem7Steem8
second level branches with their hashes.
Steem1Steem2Steem3Steem4 5B29139BCEDDD78DA023F9A1FA9EAC4D882534B02FC533F324D34B42854528EB
Steem5Steem6Steem7Steem8
7B1EAEB13AA3A8DB0D17767E4AD8A24D828254455D3A8662BD66C7AFAF5FB0C3
Last Stage
This is the final step where the Root Hash is generated
Steem1Steem2Steem3Steem4Steem5Steem6Steem7Steem8
AE23D128E6057C44BE2F2F797AC32E79D5D07B89E90C264FC087C6C0DAF45EEE
This is the Complete Merkle Tree for Steem1,Steem2,Steem3,Steem4,Steem5,Steem6,Steem7 and Steem8
Merkle Tree
TELL THE STEPS TO FOLLOW TO VERIFY IF STEEM6 IS INCLUDED IN THE MARKLE TREE
The first thing to do is to calculate for the hash of steem6, after the hash of Steem6 is calculated, the next thing is to find the hash of Steem5Steem6 by through the combination of Steem5 and Steem6(In this case, it is assumed that Steem5 is known and Steem6 hash has been calculated for). We then combine Steem5Steem6 with Steem7Steem8 for the second level branch for the right hand side, thus, Steem5Steem6Steem7Steem8 we then use this with the second level branch for the left hand side to calculate the root hash Steem1Steem2Steem3Steem4Steem5Steem6Steem7Steem8. With the root hash, we can verify the presence of Steem6 in the Merkle tree.
Question3 USING THE SHA-256; YOU MUST PLACE EACH COMPLETE HASH IN THE MARKEL TREE.
TRANSACTION (TREE LEAVES); SCA1; SCA2; SCA3; SCA4; SCA5; SCA6; SCA7; SCA8
Creating the Merkle tree with SCA1,SCA2,SCA3,SCA4,SCA5,SCA6,SCA7 and SCA8
I followed the same steps in Question two in here in order to form the hash tree with the transactions given. All the hash codes are generated from https://passwordsgenerator.net/sha256-hash-generator/.
First Step
The Leaves of the transaction.
SCA1
SCA2
This is the process I took in generating all the hashes in this presentation from https://passwordsgenerator.net/sha256-hash-generator/
All leaves and their hash codes
SCA1 13E0A04BB0E669E1C638DBE3A704743F99F162B25245E4D8C064D35BA38FA8C8
SCA2 27849353A9C8CC4E948EB6E5748EDD79CB83513D8C0ADAF3E8C83D3792C9149B
SCA3 67E872F952C105C35E0BCE130536D061F4999DCA5593754BA9BA7BE59B8E7C0D
SCA4 491928A32BAE70A12FA251412BBFD7C9999F317BA6BF577C283C724225270A43
SCA5 99C078C39CDE7F47799E0E8691460A9F3E83E78D498EA989308FCFCC58907B19
SCA6 7A648D887B124DB14E96E23BA92783E7F26D00957C19B9B8229632C2C1873729
SCA7 7E0BBD6BA4BA9896F9911AF46B06DD2C47535F9C80B29D693FDF6B9319D0D68E
SCA8 562ABCEEB497E1FE7AE275A883FD5EF9D92A05F5C19D82ABAA0DC1571B7DF3AD
Step2
The first level branches branches
Branches with their coresponding hashes
SCA1SCA2 562ABCEEB497E1FE7AE275A883FD5EF9D92A05F5C19D82ABAA0DC1571B7DF3AD
SCA3SCA4 B49B48697A3ACBC5E3D2E36B6EE49C44020D88E664C5C1AA7A7CF34058177379
SCA5SCA6 F026924CD1285FF92C2A2DE9B9313027EB67273A82375C939348C887F6B52F77
SCA7SCA8 AA55EC5A6B11393B289C4B2B6916172ACC2941C5C978FB1D7BF02696BAB323A4
Step3
The second level branches with their hash codes
SCA1SCA2SCA3SCA4 F50DC120CBF6C46923037F6D7F41D4153ECC9AB7430DDA662C142DB1FFE483F7
SCA5SCA6SCA7SCA8 A3D8CA8494CC426ABD5E1FC5FA0FEAE4F2B2ECE4C4CECDCA05E19EB66542533F
Last Stage
The Root Hash
The Root Hash
SCA1SCA2SCA3SCA4SCA5SCA6SCA7SCA8 CB406DB72DD507CF9118963F94B7740822258E74AFB0FD45D89DB35D24B386
Complete Merkle Tree for SCA1,SCA2,SCA3,SCA4,SCA5,SCA6,SCA7 and SCA8
Merkle Tree
IF THE NUMBER OF LEAVES ON THE TREE IS ODD, WHAT SHOULD YOU DO? EXPLAIN
If the leaves of the tree is odd say SCA1,SCA2,SCA3,SCA4,SCA5,SCA6 and SCA7, to form the Merkle tree, we double the last leaf SCA7 to make the number of leaves even since the Merkle tree is always in the form of binary data structure. So it will now be SCA1, SCA2, SCA3, SCA4, SCA5, SCA6, SCA7 and SCA7. The first level branch will consist of SCA1SCA2, SCA3SCA4, SCA5SCA6, and SCA7SCA7 and the second level branches consisting of hashes of SCA1SCA2SCA3SCA4 and SCA5SCA6SCA7SCA7 then the root Hash of SCA1SCA2SCA3SCA4SCA5SCA6SCA7SCA7
An example of such case is demonstrated in the picture below
Merkle Tree
Conclusion
The idea of the Merkle tree is vital as it sums up series of the entire transaction in an entire specific block, forming the foundation of the transaction. Additionally, with the Merkle tree, a speedy pursuit should be possible to check whether a specific transaction is incorporated or not. This task has assisted me with learning the Merkle tree and its effect in the bockchain network.