decred / dcrdata

Decred block explorer, with packages and apps for data collection and storage. Written in Go.
https://dcrdata.decred.org/
ISC License
129 stars 128 forks source link

Show which pool mined a block #1564

Open xaur opened 5 years ago

xaur commented 5 years ago

It is useful to see which pool has mined which block to make PoW pools more accountable and expose their work quality to the stakeholders, who have the power to vote down misbehaving blocks.

This feature requires a mechanism to map blocks to pools.

A trivial way is to use coinbase reward address. I suggest to maintain a table with records containing fields like: reward_address, miner_id, block_start, block_end. The latter two are optional and are needed to express the fact that mining pools come and go and/or change their reward address(es) over time.

Another table may contain additional info for miner_id such as full display name, website, contacts and the icon.

There might be other heuristics to derive the pool from a block.

See https://coin.dance/blocks for an example of this implemented (scroll past the charts).

I suggest to show miner name on block list and single block views.

jrick commented 5 years ago

This all assumes that the miner or pool wishes to be identified. They could not provide any identification at all and mine using a unique address and you wouldn't know for sure which pool (if any) did mine the block. Additionally, most identification that a miner would include in a coinbase is unauthenticated, meaning it can be replicated by any other pool and you wouldn't be able to prove or tell which identification is true or false.

xaur commented 5 years ago

Good points.

Of course addresses cannot be known for all miners, but for some they are known and that's the data I suggest to show. Addresses of like 5-6 pools were shared in #pow-mining room.

Interestingly, pool X can paint pool Y in bad light if it mines a "bad" block and uses Y's reward address. This is burning energy/money for X (disincentive), but because this is possible there must be a disclaimer that pool data cannot be 100% accurate.

chappjc commented 5 years ago

Pool Y could also mine blocks with false identification to make the blocks appear to be mined by Pool X. That could make Pool X to appear to have a much larger network share, perhaps even so high that it looks bad for decentralization. It's not just that accuracy cannot be guaranteed, but I'm not eager to be an accessory to miners playing tricks.