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:
0x000008ff00000000000000000000000000000000000000000000000000000000

Whereas BTC has the highest possible Hex Target at:
0x00000000FFFF0000000000000000000000000000000000000000000000000000

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?

hashrate = \frac{work}{Expected Time To Solve A Block}

Expected time to solve block in seconds = 120

work = \frac{hash_{max}}{(target +1)}

hashmax is just the max 32 byte number or 2^256

hash_{max} = 2^{256}

target is the current target, which is calculated from the difficulty as:

Target = \frac{Target_{max}}{CurrentDifficulty}

As discussed earlier, Targetmax is the highest (hence, easiest) hash that was considered valid in Elastos (the genesis block’s target), and is 0x000008ff00000000000000000000000000000000000000000000000000000000

Targetmax=0x000008ff00000000000000000000000000000000000000000000000000000000

which is also equal to:

Target_{max} = 150929408 * 2^{208}

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:

target= \frac{150929408 * 2^{208}}{941873199780623}

work = \frac{2^{256}}{(\frac{150929408 * 2^{208} }{941873199780623}+1)}

hashrate = \frac{\frac{2^{256}}{(\frac{150929408 * 2^{208} }{941873199780623}+1)}}{120}
= 14.637 * 10^{18}

which we calculated using Wolfram and equates to:

14.637 EH/s 

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=\frac{ELA Hashrate}{BTC Hashrate}

Percentage Of BTC Hashrate = \frac{14.637}{47.492}

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.

Simplified Formula

Seeing as the above calculation is rather complex, below is a simplified formula which calculates Hashrate from the difficulty shown in Elastos Blockchain Browser:

hashrate = \frac{\frac{2^{256}}{(\frac{150929408 * 2^{208} }{CurrentDifficulty}+1)}}{120}

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

 


References:
https://en.bitcoin.it/wiki/Difficulty
https://medium.com/@jordan.baczuk/how-bitcoin-network-hashrate-is-estimated-269766a809f5
https://en.bitcoinwiki.org/wiki/Difficulty_in_Mining
https://2miners.com/blog/what-is-share-and-the-share-difficulty-when-you-are-mining-at-the-pool/
https://github.com/elastos
https://blockchain.elastos.org
https://bitinfocharts.com/bitcoin/
https://www.mathsisfun.com/hexadecimals.html
https://www.wolframalpha.com

 

 

 

LEAVE A REPLY

Please enter your comment!
Please enter your name here