1

I am creating my own Cryptonote coin for a specific, business need. Can I only allow certain IPs to mine on it?

2

A typical blockchain does not include this kind of access control. This includes Cryptonote. However, you can easily add something similar.

Now, daemons could be made to sync only from the set of IPs you specify. If all the allowed IPs are set to only connect to other IPs in the set (for example using --add-exclusive-node), and set to disallow connections from other IPs, then you will achieve this, absent an attacker.

However, this is fairly brittle, as a single peer managing to connect to one of these allowed IPs will open the floodgates to a new blockchain. Moreover, you might want external IPs to have a "read only" view of the blockchain, so you might well want yourself to have your allowed IPs connect to external IPs for blockchain distribution.

A better way is to allow not by IP, but by public key cryptography. The high level steps are:

  • create a key pair
  • give all allowed miners the secret key, which they should keep secret
  • give any node asks the public key (ie, include it in the source code)
  • when mining, add a signature of something (say, nonce plus block height) in the coinbase tx's extra field
  • add a consensus rule that checks this signature is valid

Then mining is limited to those who have the secret key.

  • I wonder, is it possible to only allow mining by wallet public key?? – Ian Whitehouse May 15 '18 at 11:43
  • Monero addresses (and thus public keys) involved in a transaction cannot be found/deduced from the blockchain. So no. – user36303 May 15 '18 at 12:40

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.