bitpay / insight-api

The bitcoin blockchain API powering Insight
https://github.com/bitpay/insight
591 stars 1.04k forks source link

pools.json - How does it works? #502

Open globaltoken opened 7 years ago

globaltoken commented 7 years ago

Hey,

How does Pools.json works, how can the Blockexplorer can find which Address is from Which Pool - I mean how is it possible to match them ?

So how can I modify these pools.json, that it shows in Frontend the Mined By Tag?

Thanks.

losh11 commented 7 years ago

Unfortunately Insight doesn't look at Coinbase output address to match a miner/pool. This would've been the best solution.

Currently, miners voluntarily insert some unique text into the coinbase identifier of the block they've mined. In lib/blocks.js it cycles through the coinbase identifier and tries to find keywords from pools.json. So a keyword for F2Pool/Discus Fish might be 'Mined by'. Probably not the most unique identifier. Lots of pools don't even bother to do this, some even keep the default identifier for their pool software.

In the future, someone should add the feature to look at coinbase output address and compare it to a list of known pools addresses.