

After changing the numbers to Hex and handing values with 0, we can go ahead and remove all the keys listed in Step2 and restructure the array as below: So the value used for gasUsed should be 0x and not 0x0 For elements with value as 0, use 0x and not 0x0Įxample: for block 400000, the value for gasUsed is 0. Convert values with numbers to Hex console.log((gasLimit)) Ĭonsole.log((difficulty)) Remove some of the elements from the above object, keep only those that are inputs into a blockHeader, and reorder it as below: This is the actual output which will be used later to compare the test results with.

Hash in the above object refers to the blockHash which we are trying to validate. The capital letter K represents Kelvin, which is the base unit of temperature in the International System of Units.Below are the steps to calculate blockHash, given a blockNumber: Except for the k in kH/s, all other units are indicated in capital letters. MH/s (Mega hashes per second) = 1,000,000 H/s

Hash rates are measured in standard metric prefixes in the same way that mass, volume, length, and time are expressed. This is all called hash rate and is calculated as the hash rate generated per second (H/s). This is the speed at which a given mining hardware solves a block. Difference between H/s, kH/s, MH/s, GH/s, TH/s, PH/s, EH/s and ZH/sĪll of these units (kH/s, Mh/s, GHs, etc.) are generic terms used in mining operations.
