Since the Elastos blockchain began merged-mining with BTC on April 1, it has drawn major BTC mining pools such as ViaBTC, BTC.com, F2 Pool and BTC.Top.
What is Merged-Mining?
According to the Crypto Briefing:
Merged mining allows two coins to be mined simultaneously, provided they share the same hashing algorithms. For example, a merged-mining system can simultaneously search for valid blocks for both Litecoin and Dogecoin, both of which use Scrypt, at a lower cost than mining the two coins separately. Bitcoin was formerly mined alongside Namecoin, though the drop in the latters’ value has made merged mining less lucrative.
Because Elastos uses the same SHA-256 algorithm as Bitcoin and Bitcoin Cash, any Bitcoin-capable ASIC can simultaneously mine ELA tokens and strengthen the Elastos network.
What is Difficulty?
Difficulty is a measure of how difficult it is to produce a hash output below a given target value.
The Elastos network has a global block difficulty (bdiff) and valid blocks must have a hash below this target. Mining pools also assign a specific share (generally equal to 1) within their pools in order to track each node’s hash outputs. From this calculation, mining pools are able to accurately calculate the amount of work contributed by each node and distribute block rewards accordingly. For more information on share and share difficulty click here
The Difficulty Target for each block is available in each block’s block header on the Elastos Blockchain Explorer
The highest possible target (difficulty 1) is defined on the ELA Code and will give us a hex target of:
Whereas BTC has the highest possible Hex Target at:
Thus, ELA Target_max is roughly 2,300 times higher than that of BTC. The ELA Difficulty is adjusted every 720 Blocks – about 24 hours – based on the time it took to solve the previous 720 blocks. In comparison, BTC is adjusted every 2,016 Blocks, or about every 2 weeks.
What is Hashrate?
Hashrate is the average number of hashes that are required to solve a block.
How to Calculate Hashrate?
Expected time to solve block in seconds = 120
hashmax is just the max 32 byte number or 2^256
target is the current target, which is calculated from the difficulty as:
As discussed earlier, Targetmax is the highest (hence, easiest) hash that was considered valid in Elastos (the genesis block’s target), and is 0x000008ff00000000000000000000000000000000000000000000000000000000
which is also equal to:
CurrentDifficulty is the difficulty obtained from the block in the Block explorer. For reference we will obtain from Block #359800
CurrentDifficulty = 941873199780623
Now we can compile the hashrate calculation:
which we calculated using Wolfram and equates to:
Now, let’s compare this value to the BTC Hashrate:
At the time of writing, April, 19, 2019, BTC Hashrate is equal to 47.492 EH/s
Percentage of BTC Hashrate = 30.54%
Thus, at the time of writing, Elastos has secured 30.54% of the total BTC hashrate only 20 days post-launch of merged-mining operations. The numbers speak for themselves; the Elastos blockchain is of the most secure blockchains in the world.
Seeing as the above calculation is rather complex, below is a simplified formula which calculates Hashrate from the difficulty shown in Elastos Blockchain Browser:
Which can be further simplified to:
hashrate = CurrentDifficulty x 15540.9
Community member Charles (TG @ccoombs) has also made a calculator that takes inputs “bits” from the Elastos Blockchain Explorer and Bitcoin hashrate. This calculation utilizes bits, whereas the previous works with Difficulty. Both compute the same Hashrate as output.
Charles’s Calculator can be used here:: https://repl.it/@CC3/Hashrate-calculator