1

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

1 Answer 1

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.

2
  • I wonder, is it possible to only allow mining by wallet public key?? May 15, 2018 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, 2018 at 12:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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