<p>I'm not sure I see <em>why</em> you'd want to do it (increased centralization, likely decreased anonymization, and decreased mining incentive are generally considered bad things), but here's how I think I would do it, in general terms.</p>

<p>Have one (or more) master public keys hardcoded into the app. Have a special type of transaction that must be signed by a master's private key that authorizes an address to mine. Only blocks that have a reward, with the reward paid to an authorized address are considered valid. The address-authorization could exist in the same block that it's mined in, or any prior block in the chain.</p>

<ul>
<li>(optionally) Allow blocks with no reward.</li>
<li>(optionally) Have another special type of transaction that authorizes
a new master key, to try to ensure that you won't be left without
valid masters in the future.   </li>
<li>(optionally) Make the authorization limited by time and/or number of
successfully mined blocks, so that it must be renewed periodically.</li>
</ul>

CC BY-SA 3.0
2014-05-09T19:03:50.260Z
It's more for some tests and to see how it's possible to do it. Nothing for the usual use. Where should I search to add a new type of transaction?
Raito
CC BY-SA 3.0
2014-05-09T19:30:24.000Z
I'm not familiar with the code, so I don't know.
Tim S.
CC BY-SA 3.0
2014-05-09T18:59:35.103Z
2014-05-09T19:19:21.130Z
2014-05-09T19:19:21.130Z
Tim S.
<p>I know how to code in C++, but I don't know really how all mining system works.
I have my altcoin, and I would like to block reward blocks to miners which are not authentified (something by private key or Wallet Address).
I would let miners generate blocks and coins, but I don't want them they get it, all coins mined for nothing would be sent to a master wallet or be lost forever. But, if a miner has generated coins and he is authentificated and authorized to generate coin, he would get them.</p>

<p>To put it simple, I just want to block coin generation ability to everyone.
I've thought I could just stop them to run a thread for mining, but they could modify the client and start it.
So I was wondering how can I can do that, I've read the code about CheckWork, ProcessBlock, etc...
But I can't understand it fully.</p>

<p>Thanks from advance for your help.</p>

<block><altcoin><mining-reward><altcoin-development><authentication>
How can I limit the mining to specifics miners authentified by private key or something like that?
Raito
# How can I limit the mining to specifics miners authentified by private key or something like that?

(Asked by: username_0 on 2014-05-09)

I know how to code in C++, but I don't know really how all mining system works.
I have my altcoin, and I would like to block reward blocks to miners which are not authentified (something by private key or Wallet Address).
I would let miners generate blocks and coins, but I don't want them they get it, all coins mined for nothing would be sent to a master wallet or be lost forever. But, if a miner has generated coins and he is authentificated and authorized to generate coin, he would get them.

To put it simple, I just want to block coin generation ability to everyone.
I've thought I could just stop them to run a thread for mining, but they could modify the client and start it.
So I was wondering how can I can do that, I've read the code about CheckWork, ProcessBlock, etc...
But I can't understand it fully.

Thanks from advance for your help.

**Tags:** block, altcoin, mining-reward, altcoin-development, authentication


---

## 1 answers

### Answer by username_1 on 2014-05-09. Score: 1 | Accepted answer

I'm not sure I see *why* you'd want to do it (increased centralization, likely decreased anonymization, and decreased mining incentive are generally considered bad things), but here's how I think I would do it, in general terms.

Have one (or more) master public keys hardcoded into the app. Have a special type of transaction that must be signed by a master's private key that authorizes an address to mine. Only blocks that have a reward, with the reward paid to an authorized address are considered valid. The address-authorization could exist in the same block that it's mined in, or any prior block in the chain.

* (optionally) Allow blocks with no reward.
* (optionally) Have another special type of transaction that authorizes
  a new master key, to try to ensure that you won't be left without
  valid masters in the future.
* (optionally) Make the authorization limited by time and/or number of
  successfully mined blocks, so that it must be renewed periodically.

> **Comments:**
> **username_0**: It's more for some tests and to see how it's possible to do it. Nothing for the usual use. Where should I search to add a new type of transaction?  
> **username_1**: I'm not familiar with the code, so I don't know.  

---

